mcp-dashboards 1.0.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mcp-app.html +138 -97
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +32 -1
- package/dist/server.js.map +1 -1
- package/package.json +3 -2
package/dist/mcp-app.html
CHANGED
|
@@ -4,84 +4,84 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>MCP Dashboard</title>
|
|
7
|
-
<script type="module" crossorigin>var lx=Object.defineProperty;var ux=(t,e,n)=>e in t?lx(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var D=(t,e,n)=>ux(t,typeof e!="symbol"?e+"":e,n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function S(t,e,n){function r(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,l);const u=o.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){const f=c[d];f in a||(a[f]=u[f].bind(a))}}const i=(n==null?void 0:n.Parent)??Object;class s extends i{}Object.defineProperty(s,"name",{value:t});function o(a){var l;const u=n!=null&&n.Parent?new s:this;r(u,a),(l=u._zod).deferred??(l.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>{var l,u;return n!=null&&n.Parent&&a instanceof n.Parent?!0:(u=(l=a==null?void 0:a._zod)==null?void 0:l.traits)==null?void 0:u.has(t)}}),Object.defineProperty(o,"name",{value:t}),o}class ai extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class km extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const $m={};function un(t){return $m}function xm(t){const e=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,i])=>e.indexOf(+r)===-1).map(([r,i])=>i)}function ul(t,e){return typeof e=="bigint"?e.toString():e}function Io(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function Vl(t){return t==null}function Wl(t){const e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function cx(t,e){const n=(t.toString().split(".")[1]||"").length,r=e.toString();let i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){const l=r.match(/\d?e-(\d?)/);l!=null&&l[1]&&(i=Number.parseInt(l[1]))}const s=n>i?n:i,o=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return o%a/10**s}const Cd=Symbol("evaluating");function se(t,e,n){let r;Object.defineProperty(t,e,{get(){if(r!==Cd)return r===void 0&&(r=Cd,r=n()),r},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function Fn(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function pn(...t){const e={};for(const n of t){const r=Object.getOwnPropertyDescriptors(n);Object.assign(e,r)}return Object.defineProperties({},e)}function Ad(t){return JSON.stringify(t)}function dx(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const wm="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function cr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const fx=Io(()=>{var t;if(typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)!=null&&t.includes("Cloudflare")))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function mi(t){if(cr(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const n=e.prototype;return!(cr(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Sm(t){return mi(t)?{...t}:Array.isArray(t)?[...t]:t}const hx=new Set(["string","number","symbol"]);function pi(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gn(t,e,n){const r=new t._zod.constr(e??t._zod.def);return(!e||n!=null&&n.parent)&&(r._zod.parent=t),r}function A(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if((e==null?void 0:e.message)!==void 0){if((e==null?void 0:e.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function mx(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const px={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function gx(t,e){const n=t._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const s=pn(t._zod.def,{get shape(){const o={};for(const a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&(o[a]=n.shape[a])}return Fn(this,"shape",o),o},checks:[]});return gn(t,s)}function vx(t,e){const n=t._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const s=pn(t._zod.def,{get shape(){const o={...t._zod.def.shape};for(const a in e){if(!(a in n.shape))throw new Error(`Unrecognized key: "${a}"`);e[a]&&delete o[a]}return Fn(this,"shape",o),o},checks:[]});return gn(t,s)}function bx(t,e){if(!mi(e))throw new Error("Invalid input to extend: expected a plain object");const n=t._zod.def.checks;if(n&&n.length>0){const s=t._zod.def.shape;for(const o in e)if(Object.getOwnPropertyDescriptor(s,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const i=pn(t._zod.def,{get shape(){const s={...t._zod.def.shape,...e};return Fn(this,"shape",s),s}});return gn(t,i)}function yx(t,e){if(!mi(e))throw new Error("Invalid input to safeExtend: expected a plain object");const n=pn(t._zod.def,{get shape(){const r={...t._zod.def.shape,...e};return Fn(this,"shape",r),r}});return gn(t,n)}function _x(t,e){const n=pn(t._zod.def,{get shape(){const r={...t._zod.def.shape,...e._zod.def.shape};return Fn(this,"shape",r),r},get catchall(){return e._zod.def.catchall},checks:[]});return gn(t,n)}function kx(t,e,n){const i=e._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=pn(e._zod.def,{get shape(){const a=e._zod.def.shape,l={...a};if(n)for(const u in n){if(!(u in a))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(l[u]=t?new t({type:"optional",innerType:a[u]}):a[u])}else for(const u in a)l[u]=t?new t({type:"optional",innerType:a[u]}):a[u];return Fn(this,"shape",l),l},checks:[]});return gn(e,o)}function $x(t,e,n){const r=pn(e._zod.def,{get shape(){const i=e._zod.def.shape,s={...i};if(n)for(const o in n){if(!(o in s))throw new Error(`Unrecognized key: "${o}"`);n[o]&&(s[o]=new t({type:"nonoptional",innerType:i[o]}))}else for(const o in i)s[o]=new t({type:"nonoptional",innerType:i[o]});return Fn(this,"shape",s),s}});return gn(e,r)}function ii(t,e=0){var n;if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(((n=t.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function ri(t,e){return e.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(t),n})}function gs(t){return typeof t=="string"?t:t==null?void 0:t.message}function cn(t,e,n){var i,s,o,a,l,u;const r={...t,path:t.path??[]};if(!t.message){const c=gs((o=(s=(i=t.inst)==null?void 0:i._zod.def)==null?void 0:s.error)==null?void 0:o.call(s,t))??gs((a=e==null?void 0:e.error)==null?void 0:a.call(e,t))??gs((l=n.customError)==null?void 0:l.call(n,t))??gs((u=n.localeError)==null?void 0:u.call(n,t))??"Invalid input";r.message=c}return delete r.inst,delete r.continue,e!=null&&e.reportInput||delete r.input,r}function Hl(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function dr(...t){const[e,n,r]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:r}:{...e}}const Im=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,ul,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},zm=S("$ZodError",Im),Om=S("$ZodError",Im,{Parent:Error});function xx(t,e=n=>n.message){const n={},r=[];for(const i of t.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}function wx(t,e=n=>n.message){const n={_errors:[]},r=i=>{for(const s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>r({issues:o}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(e(s));else{let o=n,a=0;for(;a<s.path.length;){const l=s.path[a];a===s.path.length-1?(o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(s))):o[l]=o[l]||{_errors:[]},o=o[l],a++}}};return r(t),n}const Bl=t=>(e,n,r,i)=>{const s=r?Object.assign(r,{async:!1}):{async:!1},o=e._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new ai;if(o.issues.length){const a=new((i==null?void 0:i.Err)??t)(o.issues.map(l=>cn(l,s,un())));throw wm(a,i==null?void 0:i.callee),a}return o.value},ql=t=>async(e,n,r,i)=>{const s=r?Object.assign(r,{async:!0}):{async:!0};let o=e._zod.run({value:n,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){const a=new((i==null?void 0:i.Err)??t)(o.issues.map(l=>cn(l,s,un())));throw wm(a,i==null?void 0:i.callee),a}return o.value},zo=t=>(e,n,r)=>{const i=r?{...r,async:!1}:{async:!1},s=e._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new ai;return s.issues.length?{success:!1,error:new(t??zm)(s.issues.map(o=>cn(o,i,un())))}:{success:!0,data:s.value}},Tm=zo(Om),Oo=t=>async(e,n,r)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let s=e._zod.run({value:n,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(o=>cn(o,i,un())))}:{success:!0,data:s.value}},Sx=Oo(Om),Ix=t=>(e,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Bl(t)(e,n,i)},zx=t=>(e,n,r)=>Bl(t)(e,n,r),Ox=t=>async(e,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return ql(t)(e,n,i)},Tx=t=>async(e,n,r)=>ql(t)(e,n,r),Dx=t=>(e,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return zo(t)(e,n,i)},Px=t=>(e,n,r)=>zo(t)(e,n,r),Ex=t=>async(e,n,r)=>{const i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Oo(t)(e,n,i)},Mx=t=>async(e,n,r)=>Oo(t)(e,n,r),Nx=/^[cC][^\s-]{8,}$/,Cx=/^[0-9a-z]+$/,Ax=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Rx=/^[0-9a-vA-V]{20}$/,Zx=/^[A-Za-z0-9]{27}$/,jx=/^[a-zA-Z0-9_-]{21}$/,Ux=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Lx=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Rd=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Fx=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Vx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Wx(){return new RegExp(Vx,"u")}const Hx=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Bx=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,qx=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Jx=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Yx=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Dm=/^[A-Za-z0-9_-]*$/,Gx=/^\+[1-9]\d{6,14}$/,Pm="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Kx=new RegExp(`^${Pm}$`);function Em(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Xx(t){return new RegExp(`^${Em(t)}$`)}function Qx(t){const e=Em({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${e}(?:${n.join("|")})`;return new RegExp(`^${Pm}T(?:${r})$`)}const e0=t=>{const e=t?`[\\s\\S]{${(t==null?void 0:t.minimum)??0},${(t==null?void 0:t.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},t0=/^-?\d+$/,Mm=/^-?\d+(?:\.\d+)?$/,n0=/^(?:true|false)$/i,i0=/^null$/i,r0=/^[^A-Z]*$/,s0=/^[^a-z]*$/,nt=S("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),Nm={number:"number",bigint:"bigint",object:"date"},Cm=S("$ZodCheckLessThan",(t,e)=>{nt.init(t,e);const n=Nm[typeof e.value];t._zod.onattach.push(r=>{const i=r._zod.bag,s=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<s&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Am=S("$ZodCheckGreaterThan",(t,e)=>{nt.init(t,e);const n=Nm[typeof e.value];t._zod.onattach.push(r=>{const i=r._zod.bag,s=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),o0=S("$ZodCheckMultipleOf",(t,e)=>{nt.init(t,e),t._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):cx(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),a0=S("$ZodCheckNumberFormat",(t,e)=>{var o;nt.init(t,e),e.format=e.format||"float64";const n=(o=e.format)==null?void 0:o.includes("int"),r=n?"int":"number",[i,s]=px[e.format];t._zod.onattach.push(a=>{const l=a._zod.bag;l.format=e.format,l.minimum=i,l.maximum=s,n&&(l.pattern=t0)}),t._zod.check=a=>{const l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:r,format:e.format,code:"invalid_type",continue:!1,input:l,inst:t});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!e.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!e.abort});return}}l<i&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),l>s&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inclusive:!0,inst:t,continue:!e.abort})}}),l0=S("$ZodCheckMaxLength",(t,e)=>{var n;nt.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!Vl(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{const i=r.value;if(i.length<=e.maximum)return;const o=Hl(i);r.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),u0=S("$ZodCheckMinLength",(t,e)=>{var n;nt.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!Vl(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{const i=r.value;if(i.length>=e.minimum)return;const o=Hl(i);r.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),c0=S("$ZodCheckLengthEquals",(t,e)=>{var n;nt.init(t,e),(n=t._zod.def).when??(n.when=r=>{const i=r.value;return!Vl(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{const i=r._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=r=>{const i=r.value,s=i.length;if(s===e.length)return;const o=Hl(i),a=s>e.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),To=S("$ZodCheckStringFormat",(t,e)=>{var n,r;nt.init(t,e),t._zod.onattach.push(i=>{const s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),d0=S("$ZodCheckRegex",(t,e)=>{To.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),f0=S("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=r0),To.init(t,e)}),h0=S("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=s0),To.init(t,e)}),m0=S("$ZodCheckIncludes",(t,e)=>{nt.init(t,e);const n=pi(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=r,t._zod.onattach.push(i=>{const s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),p0=S("$ZodCheckStartsWith",(t,e)=>{nt.init(t,e);const n=new RegExp(`^${pi(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),g0=S("$ZodCheckEndsWith",(t,e)=>{nt.init(t,e);const n=new RegExp(`.*${pi(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{const i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}}),v0=S("$ZodCheckOverwrite",(t,e)=>{nt.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class b0{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const r=e.split(`
|
|
8
|
-
`).filter(
|
|
9
|
-
`))}}const
|
|
10
|
-
if (${
|
|
11
|
-
if (${
|
|
12
|
-
payload.issues = payload.issues.concat(${
|
|
7
|
+
<script type="module" crossorigin>var Ox=Object.defineProperty;var Hx=(t,e,A)=>e in t?Ox(t,e,{enumerable:!0,configurable:!0,writable:!0,value:A}):t[e]=A;var k=(t,e,A)=>Hx(t,typeof e!="symbol"?e+"":e,A);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const r of n)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&i(s)}).observe(document,{childList:!0,subtree:!0});function A(n){const r={};return n.integrity&&(r.integrity=n.integrity),n.referrerPolicy&&(r.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?r.credentials="include":n.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(n){if(n.ep)return;n.ep=!0;const r=A(n);fetch(n.href,r)}})();function I(t,e,A){function i(o,a){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:a,constr:s,traits:new Set},enumerable:!1}),o._zod.traits.has(t))return;o._zod.traits.add(t),e(o,a);const l=s.prototype,u=Object.keys(l);for(let c=0;c<u.length;c++){const d=u[c];d in o||(o[d]=l[d].bind(o))}}const n=(A==null?void 0:A.Parent)??Object;class r extends n{}Object.defineProperty(r,"name",{value:t});function s(o){var a;const l=A!=null&&A.Parent?new r:this;i(l,o),(a=l._zod).deferred??(a.deferred=[]);for(const u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:o=>{var a,l;return A!=null&&A.Parent&&o instanceof A.Parent?!0:(l=(a=o==null?void 0:o._zod)==null?void 0:a.traits)==null?void 0:l.has(t)}}),Object.defineProperty(s,"name",{value:t}),s}class mi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Kv extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}const Zv={};function sn(t){return Zv}function Vv(t){const e=Object.values(t).filter(i=>typeof i=="number");return Object.entries(t).filter(([i,n])=>e.indexOf(+i)===-1).map(([i,n])=>n)}function ec(t,e){return typeof e=="bigint"?e.toString():e}function Na(t){return{get value(){{const e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function id(t){return t==null}function rd(t){const e=t.startsWith("^")?1:0,A=t.endsWith("$")?t.length-1:t.length;return t.slice(e,A)}function Dx(t,e){const A=(t.toString().split(".")[1]||"").length,i=e.toString();let n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){const a=i.match(/\d?e-(\d?)/);a!=null&&a[1]&&(n=Number.parseInt(a[1]))}const r=A>n?A:n,s=Number.parseInt(t.toFixed(r).replace(".","")),o=Number.parseInt(e.toFixed(r).replace(".",""));return s%o/10**r}const sg=Symbol("evaluating");function fe(t,e,A){let i;Object.defineProperty(t,e,{get(){if(i!==sg)return i===void 0&&(i=sg,i=A()),i},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function Kn(t,e,A){Object.defineProperty(t,e,{value:A,writable:!0,enumerable:!0,configurable:!0})}function fn(...t){const e={};for(const A of t){const i=Object.getOwnPropertyDescriptors(A);Object.assign(e,i)}return Object.defineProperties({},e)}function og(t){return JSON.stringify(t)}function Lx(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const jv="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function Hr(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const Mx=Na(()=>{var t;if(typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)!=null&&t.includes("Cloudflare")))return!1;try{const e=Function;return new e(""),!0}catch{return!1}});function Ci(t){if(Hr(t)===!1)return!1;const e=t.constructor;if(e===void 0||typeof e!="function")return!0;const A=e.prototype;return!(Hr(A)===!1||Object.prototype.hasOwnProperty.call(A,"isPrototypeOf")===!1)}function Gv(t){return Ci(t)?{...t}:Array.isArray(t)?[...t]:t}const Nx=new Set(["string","number","symbol"]);function Ui(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function hn(t,e,A){const i=new t._zod.constr(e??t._zod.def);return(!e||A!=null&&A.parent)&&(i._zod.parent=t),i}function N(t){const e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if((e==null?void 0:e.message)!==void 0){if((e==null?void 0:e.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function zx(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}const Px={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function Rx(t,e){const A=t._zod.def,i=A.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const r=fn(t._zod.def,{get shape(){const s={};for(const o in e){if(!(o in A.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&(s[o]=A.shape[o])}return Kn(this,"shape",s),s},checks:[]});return hn(t,r)}function Kx(t,e){const A=t._zod.def,i=A.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const r=fn(t._zod.def,{get shape(){const s={...t._zod.def.shape};for(const o in e){if(!(o in A.shape))throw new Error(`Unrecognized key: "${o}"`);e[o]&&delete s[o]}return Kn(this,"shape",s),s},checks:[]});return hn(t,r)}function Zx(t,e){if(!Ci(e))throw new Error("Invalid input to extend: expected a plain object");const A=t._zod.def.checks;if(A&&A.length>0){const r=t._zod.def.shape;for(const s in e)if(Object.getOwnPropertyDescriptor(r,s)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const n=fn(t._zod.def,{get shape(){const r={...t._zod.def.shape,...e};return Kn(this,"shape",r),r}});return hn(t,n)}function Vx(t,e){if(!Ci(e))throw new Error("Invalid input to safeExtend: expected a plain object");const A=fn(t._zod.def,{get shape(){const i={...t._zod.def.shape,...e};return Kn(this,"shape",i),i}});return hn(t,A)}function jx(t,e){const A=fn(t._zod.def,{get shape(){const i={...t._zod.def.shape,...e._zod.def.shape};return Kn(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:[]});return hn(t,A)}function Gx(t,e,A){const n=e._zod.def.checks;if(n&&n.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const s=fn(e._zod.def,{get shape(){const o=e._zod.def.shape,a={...o};if(A)for(const l in A){if(!(l in o))throw new Error(`Unrecognized key: "${l}"`);A[l]&&(a[l]=t?new t({type:"optional",innerType:o[l]}):o[l])}else for(const l in o)a[l]=t?new t({type:"optional",innerType:o[l]}):o[l];return Kn(this,"shape",a),a},checks:[]});return hn(e,s)}function Wx(t,e,A){const i=fn(e._zod.def,{get shape(){const n=e._zod.def.shape,r={...n};if(A)for(const s in A){if(!(s in r))throw new Error(`Unrecognized key: "${s}"`);A[s]&&(r[s]=new t({type:"nonoptional",innerType:n[s]}))}else for(const s in n)r[s]=new t({type:"nonoptional",innerType:n[s]});return Kn(this,"shape",r),r}});return hn(e,i)}function ci(t,e=0){var A;if(t.aborted===!0)return!0;for(let i=e;i<t.issues.length;i++)if(((A=t.issues[i])==null?void 0:A.continue)!==!0)return!0;return!1}function di(t,e){return e.map(A=>{var i;return(i=A).path??(i.path=[]),A.path.unshift(t),A})}function Vs(t){return typeof t=="string"?t:t==null?void 0:t.message}function on(t,e,A){var n,r,s,o,a,l;const i={...t,path:t.path??[]};if(!t.message){const u=Vs((s=(r=(n=t.inst)==null?void 0:n._zod.def)==null?void 0:r.error)==null?void 0:s.call(r,t))??Vs((o=e==null?void 0:e.error)==null?void 0:o.call(e,t))??Vs((a=A.customError)==null?void 0:a.call(A,t))??Vs((l=A.localeError)==null?void 0:l.call(A,t))??"Invalid input";i.message=u}return delete i.inst,delete i.continue,e!=null&&e.reportInput||delete i.input,i}function sd(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Dr(...t){const[e,A,i]=t;return typeof e=="string"?{message:e,code:"custom",input:A,inst:i}:{...e}}const Wv=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,ec,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Jv=I("$ZodError",Wv),Xv=I("$ZodError",Wv,{Parent:Error});function Jx(t,e=A=>A.message){const A={},i=[];for(const n of t.issues)n.path.length>0?(A[n.path[0]]=A[n.path[0]]||[],A[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:A}}function Xx(t,e=A=>A.message){const A={_errors:[]},i=n=>{for(const r of n.issues)if(r.code==="invalid_union"&&r.errors.length)r.errors.map(s=>i({issues:s}));else if(r.code==="invalid_key")i({issues:r.issues});else if(r.code==="invalid_element")i({issues:r.issues});else if(r.path.length===0)A._errors.push(e(r));else{let s=A,o=0;for(;o<r.path.length;){const a=r.path[o];o===r.path.length-1?(s[a]=s[a]||{_errors:[]},s[a]._errors.push(e(r))):s[a]=s[a]||{_errors:[]},s=s[a],o++}}};return i(t),A}const od=t=>(e,A,i,n)=>{const r=i?Object.assign(i,{async:!1}):{async:!1},s=e._zod.run({value:A,issues:[]},r);if(s instanceof Promise)throw new mi;if(s.issues.length){const o=new((n==null?void 0:n.Err)??t)(s.issues.map(a=>on(a,r,sn())));throw jv(o,n==null?void 0:n.callee),o}return s.value},ad=t=>async(e,A,i,n)=>{const r=i?Object.assign(i,{async:!0}):{async:!0};let s=e._zod.run({value:A,issues:[]},r);if(s instanceof Promise&&(s=await s),s.issues.length){const o=new((n==null?void 0:n.Err)??t)(s.issues.map(a=>on(a,r,sn())));throw jv(o,n==null?void 0:n.callee),o}return s.value},za=t=>(e,A,i)=>{const n=i?{...i,async:!1}:{async:!1},r=e._zod.run({value:A,issues:[]},n);if(r instanceof Promise)throw new mi;return r.issues.length?{success:!1,error:new(t??Jv)(r.issues.map(s=>on(s,n,sn())))}:{success:!0,data:r.value}},Yv=za(Xv),Pa=t=>async(e,A,i)=>{const n=i?Object.assign(i,{async:!0}):{async:!0};let r=e._zod.run({value:A,issues:[]},n);return r instanceof Promise&&(r=await r),r.issues.length?{success:!1,error:new t(r.issues.map(s=>on(s,n,sn())))}:{success:!0,data:r.value}},Yx=Pa(Xv),qx=t=>(e,A,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return od(t)(e,A,n)},eF=t=>(e,A,i)=>od(t)(e,A,i),tF=t=>async(e,A,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ad(t)(e,A,n)},AF=t=>async(e,A,i)=>ad(t)(e,A,i),nF=t=>(e,A,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return za(t)(e,A,n)},iF=t=>(e,A,i)=>za(t)(e,A,i),rF=t=>async(e,A,i)=>{const n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return Pa(t)(e,A,n)},sF=t=>async(e,A,i)=>Pa(t)(e,A,i),oF=/^[cC][^\s-]{8,}$/,aF=/^[0-9a-z]+$/,lF=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,uF=/^[0-9a-vA-V]{20}$/,cF=/^[A-Za-z0-9]{27}$/,dF=/^[a-zA-Z0-9_-]{21}$/,fF=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,hF=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ag=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,gF=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,mF="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function pF(){return new RegExp(mF,"u")}const vF=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,BF=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,wF=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,yF=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bF=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,qv=/^[A-Za-z0-9_-]*$/,_F=/^\+[1-9]\d{6,14}$/,eB="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",CF=new RegExp(`^${eB}$`);function tB(t){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${e}`:t.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${t.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function UF(t){return new RegExp(`^${tB(t)}$`)}function QF(t){const e=tB({precision:t.precision}),A=["Z"];t.local&&A.push(""),t.offset&&A.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${e}(?:${A.join("|")})`;return new RegExp(`^${eB}T(?:${i})$`)}const xF=t=>{const e=t?`[\\s\\S]{${(t==null?void 0:t.minimum)??0},${(t==null?void 0:t.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},FF=/^-?\d+$/,AB=/^-?\d+(?:\.\d+)?$/,IF=/^(?:true|false)$/i,SF=/^null$/i,kF=/^[^A-Z]*$/,EF=/^[^a-z]*$/,Ft=I("$ZodCheck",(t,e)=>{var A;t._zod??(t._zod={}),t._zod.def=e,(A=t._zod).onattach??(A.onattach=[])}),nB={number:"number",bigint:"bigint",object:"date"},iB=I("$ZodCheckLessThan",(t,e)=>{Ft.init(t,e);const A=nB[typeof e.value];t._zod.onattach.push(i=>{const n=i._zod.bag,r=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<r&&(e.inclusive?n.maximum=e.value:n.exclusiveMaximum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:A,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),rB=I("$ZodCheckGreaterThan",(t,e)=>{Ft.init(t,e);const A=nB[typeof e.value];t._zod.onattach.push(i=>{const n=i._zod.bag,r=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>r&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:A,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),$F=I("$ZodCheckMultipleOf",(t,e)=>{Ft.init(t,e),t._zod.onattach.push(A=>{var i;(i=A._zod.bag).multipleOf??(i.multipleOf=e.value)}),t._zod.check=A=>{if(typeof A.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof A.value=="bigint"?A.value%e.value===BigInt(0):Dx(A.value,e.value)===0)||A.issues.push({origin:typeof A.value,code:"not_multiple_of",divisor:e.value,input:A.value,inst:t,continue:!e.abort})}}),TF=I("$ZodCheckNumberFormat",(t,e)=>{var s;Ft.init(t,e),e.format=e.format||"float64";const A=(s=e.format)==null?void 0:s.includes("int"),i=A?"int":"number",[n,r]=Px[e.format];t._zod.onattach.push(o=>{const a=o._zod.bag;a.format=e.format,a.minimum=n,a.maximum=r,A&&(a.pattern=FF)}),t._zod.check=o=>{const a=o.value;if(A){if(!Number.isInteger(a)){o.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort});return}}a<n&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),a>r&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:r,inclusive:!0,inst:t,continue:!e.abort})}}),OF=I("$ZodCheckMaxLength",(t,e)=>{var A;Ft.init(t,e),(A=t._zod.def).when??(A.when=i=>{const n=i.value;return!id(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{const n=i.value;if(n.length<=e.maximum)return;const s=sd(n);i.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),HF=I("$ZodCheckMinLength",(t,e)=>{var A;Ft.init(t,e),(A=t._zod.def).when??(A.when=i=>{const n=i.value;return!id(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{const n=i.value;if(n.length>=e.minimum)return;const s=sd(n);i.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),DF=I("$ZodCheckLengthEquals",(t,e)=>{var A;Ft.init(t,e),(A=t._zod.def).when??(A.when=i=>{const n=i.value;return!id(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{const n=i._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=i=>{const n=i.value,r=n.length;if(r===e.length)return;const s=sd(n),o=r>e.length;i.issues.push({origin:s,...o?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),Ra=I("$ZodCheckStringFormat",(t,e)=>{var A,i;Ft.init(t,e),t._zod.onattach.push(n=>{const r=n._zod.bag;r.format=e.format,e.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(e.pattern))}),e.pattern?(A=t._zod).check??(A.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),LF=I("$ZodCheckRegex",(t,e)=>{Ra.init(t,e),t._zod.check=A=>{e.pattern.lastIndex=0,!e.pattern.test(A.value)&&A.issues.push({origin:"string",code:"invalid_format",format:"regex",input:A.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),MF=I("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=kF),Ra.init(t,e)}),NF=I("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=EF),Ra.init(t,e)}),zF=I("$ZodCheckIncludes",(t,e)=>{Ft.init(t,e);const A=Ui(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${A}`:A);e.pattern=i,t._zod.onattach.push(n=>{const r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(i)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),PF=I("$ZodCheckStartsWith",(t,e)=>{Ft.init(t,e);const A=new RegExp(`^${Ui(e.prefix)}.*`);e.pattern??(e.pattern=A),t._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(A)}),t._zod.check=i=>{i.value.startsWith(e.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:i.value,inst:t,continue:!e.abort})}}),RF=I("$ZodCheckEndsWith",(t,e)=>{Ft.init(t,e);const A=new RegExp(`.*${Ui(e.suffix)}$`);e.pattern??(e.pattern=A),t._zod.onattach.push(i=>{const n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(A)}),t._zod.check=i=>{i.value.endsWith(e.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:i.value,inst:t,continue:!e.abort})}}),KF=I("$ZodCheckOverwrite",(t,e)=>{Ft.init(t,e),t._zod.check=A=>{A.value=e.tx(A.value)}});class ZF{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const i=e.split(`
|
|
8
|
+
`).filter(s=>s),n=Math.min(...i.map(s=>s.length-s.trimStart().length)),r=i.map(s=>s.slice(n)).map(s=>" ".repeat(this.indent*2)+s);for(const s of r)this.content.push(s)}compile(){const e=Function,A=this==null?void 0:this.args,n=[...((this==null?void 0:this.content)??[""]).map(r=>` ${r}`)];return new e(...A,n.join(`
|
|
9
|
+
`))}}const VF={major:4,minor:3,patch:6},Fe=I("$ZodType",(t,e)=>{var n;var A;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=VF;const i=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&i.unshift(t);for(const r of i)for(const s of r._zod.onattach)s(t);if(i.length===0)(A=t._zod).deferred??(A.deferred=[]),(n=t._zod.deferred)==null||n.push(()=>{t._zod.run=t._zod.parse});else{const r=(o,a,l)=>{let u=ci(o),c;for(const d of a){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(u)continue;const f=o.issues.length,h=d._zod.check(o);if(h instanceof Promise&&(l==null?void 0:l.async)===!1)throw new mi;if(c||h instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await h,o.issues.length!==f&&(u||(u=ci(o,f)))});else{if(o.issues.length===f)continue;u||(u=ci(o,f))}}return c?c.then(()=>o):o},s=(o,a,l)=>{if(ci(o))return o.aborted=!0,o;const u=r(a,i,l);if(u instanceof Promise){if(l.async===!1)throw new mi;return u.then(c=>t._zod.parse(c,l))}return t._zod.parse(u,l)};t._zod.run=(o,a)=>{if(a.skipChecks)return t._zod.parse(o,a);if(a.direction==="backward"){const u=t._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(c=>s(c,o,a)):s(u,o,a)}const l=t._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new mi;return l.then(u=>r(u,i,a))}return r(l,i,a)}}fe(t,"~standard",()=>({validate:r=>{var s;try{const o=Yv(t,r);return o.success?{value:o.data}:{issues:(s=o.error)==null?void 0:s.issues}}catch{return Yx(t,r).then(a=>{var l;return a.success?{value:a.data}:{issues:(l=a.error)==null?void 0:l.issues}})}},vendor:"zod",version:1}))}),ld=I("$ZodString",(t,e)=>{var A;Fe.init(t,e),t._zod.pattern=[...((A=t==null?void 0:t._zod.bag)==null?void 0:A.patterns)??[]].pop()??xF(t._zod.bag),t._zod.parse=(i,n)=>{if(e.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:t}),i}}),Ie=I("$ZodStringFormat",(t,e)=>{Ra.init(t,e),ld.init(t,e)}),jF=I("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=hF),Ie.init(t,e)}),GF=I("$ZodUUID",(t,e)=>{if(e.version){const i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(i===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=ag(i))}else e.pattern??(e.pattern=ag());Ie.init(t,e)}),WF=I("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=gF),Ie.init(t,e)}),JF=I("$ZodURL",(t,e)=>{Ie.init(t,e),t._zod.check=A=>{try{const i=A.value.trim(),n=new URL(i);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(n.hostname)||A.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:A.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)||A.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:A.value,inst:t,continue:!e.abort})),e.normalize?A.value=n.href:A.value=i;return}catch{A.issues.push({code:"invalid_format",format:"url",input:A.value,inst:t,continue:!e.abort})}}}),XF=I("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=pF()),Ie.init(t,e)}),YF=I("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=dF),Ie.init(t,e)}),qF=I("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=oF),Ie.init(t,e)}),eI=I("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=aF),Ie.init(t,e)}),tI=I("$ZodULID",(t,e)=>{e.pattern??(e.pattern=lF),Ie.init(t,e)}),AI=I("$ZodXID",(t,e)=>{e.pattern??(e.pattern=uF),Ie.init(t,e)}),nI=I("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=cF),Ie.init(t,e)}),iI=I("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=QF(e)),Ie.init(t,e)}),rI=I("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=CF),Ie.init(t,e)}),sI=I("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=UF(e)),Ie.init(t,e)}),oI=I("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=fF),Ie.init(t,e)}),aI=I("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=vF),Ie.init(t,e),t._zod.bag.format="ipv4"}),lI=I("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=BF),Ie.init(t,e),t._zod.bag.format="ipv6",t._zod.check=A=>{try{new URL(`http://[${A.value}]`)}catch{A.issues.push({code:"invalid_format",format:"ipv6",input:A.value,inst:t,continue:!e.abort})}}}),uI=I("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=wF),Ie.init(t,e)}),cI=I("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=yF),Ie.init(t,e),t._zod.check=A=>{const i=A.value.split("/");try{if(i.length!==2)throw new Error;const[n,r]=i;if(!r)throw new Error;const s=Number(r);if(`${s}`!==r)throw new Error;if(s<0||s>128)throw new Error;new URL(`http://[${n}]`)}catch{A.issues.push({code:"invalid_format",format:"cidrv6",input:A.value,inst:t,continue:!e.abort})}}});function sB(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const dI=I("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=bF),Ie.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=A=>{sB(A.value)||A.issues.push({code:"invalid_format",format:"base64",input:A.value,inst:t,continue:!e.abort})}});function fI(t){if(!qv.test(t))return!1;const e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),A=e.padEnd(Math.ceil(e.length/4)*4,"=");return sB(A)}const hI=I("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=qv),Ie.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=A=>{fI(A.value)||A.issues.push({code:"invalid_format",format:"base64url",input:A.value,inst:t,continue:!e.abort})}}),gI=I("$ZodE164",(t,e)=>{e.pattern??(e.pattern=_F),Ie.init(t,e)});function mI(t,e=null){try{const A=t.split(".");if(A.length!==3)return!1;const[i]=A;if(!i)return!1;const n=JSON.parse(atob(i));return!("typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}const pI=I("$ZodJWT",(t,e)=>{Ie.init(t,e),t._zod.check=A=>{mI(A.value,e.alg)||A.issues.push({code:"invalid_format",format:"jwt",input:A.value,inst:t,continue:!e.abort})}}),oB=I("$ZodNumber",(t,e)=>{Fe.init(t,e),t._zod.pattern=t._zod.bag.pattern??AB,t._zod.parse=(A,i)=>{if(e.coerce)try{A.value=Number(A.value)}catch{}const n=A.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return A;const r=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return A.issues.push({expected:"number",code:"invalid_type",input:n,inst:t,...r?{received:r}:{}}),A}}),vI=I("$ZodNumberFormat",(t,e)=>{TF.init(t,e),oB.init(t,e)}),BI=I("$ZodBoolean",(t,e)=>{Fe.init(t,e),t._zod.pattern=IF,t._zod.parse=(A,i)=>{if(e.coerce)try{A.value=!!A.value}catch{}const n=A.value;return typeof n=="boolean"||A.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:t}),A}}),wI=I("$ZodNull",(t,e)=>{Fe.init(t,e),t._zod.pattern=SF,t._zod.values=new Set([null]),t._zod.parse=(A,i)=>{const n=A.value;return n===null||A.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),A}}),yI=I("$ZodUnknown",(t,e)=>{Fe.init(t,e),t._zod.parse=A=>A}),bI=I("$ZodNever",(t,e)=>{Fe.init(t,e),t._zod.parse=(A,i)=>(A.issues.push({expected:"never",code:"invalid_type",input:A.value,inst:t}),A)});function lg(t,e,A){t.issues.length&&e.issues.push(...di(A,t.issues)),e.value[A]=t.value}const _I=I("$ZodArray",(t,e)=>{Fe.init(t,e),t._zod.parse=(A,i)=>{const n=A.value;if(!Array.isArray(n))return A.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),A;A.value=Array(n.length);const r=[];for(let s=0;s<n.length;s++){const o=n[s],a=e.element._zod.run({value:o,issues:[]},i);a instanceof Promise?r.push(a.then(l=>lg(l,A,s))):lg(a,A,s)}return r.length?Promise.all(r).then(()=>A):A}});function ta(t,e,A,i,n){if(t.issues.length){if(n&&!(A in i))return;e.issues.push(...di(A,t.issues))}t.value===void 0?A in i&&(e.value[A]=void 0):e.value[A]=t.value}function aB(t){var i,n,r,s;const e=Object.keys(t.shape);for(const o of e)if(!((s=(r=(n=(i=t.shape)==null?void 0:i[o])==null?void 0:n._zod)==null?void 0:r.traits)!=null&&s.has("$ZodType")))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const A=zx(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(A)}}function lB(t,e,A,i,n,r){const s=[],o=n.keySet,a=n.catchall._zod,l=a.def.type,u=a.optout==="optional";for(const c in e){if(o.has(c))continue;if(l==="never"){s.push(c);continue}const d=a.run({value:e[c],issues:[]},i);d instanceof Promise?t.push(d.then(f=>ta(f,A,c,e,u))):ta(d,A,c,e,u)}return s.length&&A.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:r}),t.length?Promise.all(t).then(()=>A):A}const CI=I("$ZodObject",(t,e)=>{Fe.init(t,e);const A=Object.getOwnPropertyDescriptor(e,"shape");if(!(A!=null&&A.get)){const o=e.shape;Object.defineProperty(e,"shape",{get:()=>{const a={...o};return Object.defineProperty(e,"shape",{value:a}),a}})}const i=Na(()=>aB(e));fe(t._zod,"propValues",()=>{const o=e.shape,a={};for(const l in o){const u=o[l]._zod;if(u.values){a[l]??(a[l]=new Set);for(const c of u.values)a[l].add(c)}}return a});const n=Hr,r=e.catchall;let s;t._zod.parse=(o,a)=>{s??(s=i.value);const l=o.value;if(!n(l))return o.issues.push({expected:"object",code:"invalid_type",input:l,inst:t}),o;o.value={};const u=[],c=s.shape;for(const d of s.keys){const f=c[d],h=f._zod.optout==="optional",g=f._zod.run({value:l[d],issues:[]},a);g instanceof Promise?u.push(g.then(m=>ta(m,o,d,l,h))):ta(g,o,d,l,h)}return r?lB(u,l,o,a,i.value,t):u.length?Promise.all(u).then(()=>o):o}}),UI=I("$ZodObjectJIT",(t,e)=>{CI.init(t,e);const A=t._zod.parse,i=Na(()=>aB(e)),n=d=>{var b;const f=new ZF(["shape","payload","ctx"]),h=i.value,g=_=>{const y=og(_);return`shape[${y}]._zod.run({ value: input[${y}], issues: [] }, ctx)`};f.write("const input = payload.value;");const m=Object.create(null);let p=0;for(const _ of h.keys)m[_]=`key_${p++}`;f.write("const newResult = {};");for(const _ of h.keys){const y=m[_],w=og(_),U=d[_],F=((b=U==null?void 0:U._zod)==null?void 0:b.optout)==="optional";f.write(`const ${y} = ${g(_)};`),F?f.write(`
|
|
10
|
+
if (${y}.issues.length) {
|
|
11
|
+
if (${w} in input) {
|
|
12
|
+
payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
|
|
13
13
|
...iss,
|
|
14
|
-
path: iss.path ? [${
|
|
14
|
+
path: iss.path ? [${w}, ...iss.path] : [${w}]
|
|
15
15
|
})));
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
if (${
|
|
20
|
-
if (${
|
|
21
|
-
newResult[${
|
|
19
|
+
if (${y}.value === undefined) {
|
|
20
|
+
if (${w} in input) {
|
|
21
|
+
newResult[${w}] = undefined;
|
|
22
22
|
}
|
|
23
23
|
} else {
|
|
24
|
-
newResult[${
|
|
24
|
+
newResult[${w}] = ${y}.value;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
`):
|
|
28
|
-
if (${
|
|
29
|
-
payload.issues = payload.issues.concat(${
|
|
27
|
+
`):f.write(`
|
|
28
|
+
if (${y}.issues.length) {
|
|
29
|
+
payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
|
|
30
30
|
...iss,
|
|
31
|
-
path: iss.path ? [${
|
|
31
|
+
path: iss.path ? [${w}, ...iss.path] : [${w}]
|
|
32
32
|
})));
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
if (${
|
|
36
|
-
if (${
|
|
37
|
-
newResult[${
|
|
35
|
+
if (${y}.value === undefined) {
|
|
36
|
+
if (${w} in input) {
|
|
37
|
+
newResult[${w}] = undefined;
|
|
38
38
|
}
|
|
39
39
|
} else {
|
|
40
|
-
newResult[${
|
|
40
|
+
newResult[${w}] = ${y}.value;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
`)}h.write("payload.value = newResult;"),h.write("return payload;");const k=h.compile();return(w,_)=>k(f,w,_)};let s;const o=cr,a=!$m.jitless,u=a&&fx.value,c=e.catchall;let d;t._zod.parse=(f,h)=>{d??(d=r.value);const m=f.value;return o(m)?a&&u&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(s||(s=i(e.shape)),f=s(f,h),c?Um([],m,f,h,d,t):f):n(f,h):(f.issues.push({expected:"object",code:"invalid_type",input:m,inst:t}),f)}});function jd(t,e,n,r){for(const s of t)if(s.issues.length===0)return e.value=s.value,e;const i=t.filter(s=>!ii(s));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(s=>s.issues.map(o=>cn(o,r,un())))}),e)}const Lm=S("$ZodUnion",(t,e)=>{be.init(t,e),se(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),se(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),se(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),se(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){const i=e.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>Wl(s.source)).join("|")})$`)}});const n=e.options.length===1,r=e.options[0]._zod.run;t._zod.parse=(i,s)=>{if(n)return r(i,s);let o=!1;const a=[];for(const l of e.options){const u=l._zod.run({value:i.value,issues:[]},s);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(l=>jd(l,i,t,s)):jd(a,i,t,s)}}),Q0=S("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,Lm.init(t,e);const n=t._zod.parse;se(t._zod,"propValues",()=>{const i={};for(const s of e.options){const o=s._zod.propValues;if(!o||Object.keys(o).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(const[a,l]of Object.entries(o)){i[a]||(i[a]=new Set);for(const u of l)i[a].add(u)}}return i});const r=Io(()=>{var o;const i=e.options,s=new Map;for(const a of i){const l=(o=a._zod.propValues)==null?void 0:o[e.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(const u of l){if(s.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);s.set(u,a)}}return s});t._zod.parse=(i,s)=>{const o=i.value;if(!cr(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:t}),i;const a=r.value.get(o==null?void 0:o[e.discriminator]);return a?a._zod.run(i,s):e.unionFallback?n(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:o,path:[e.discriminator],inst:t}),i)}}),ew=S("$ZodIntersection",(t,e)=>{be.init(t,e),t._zod.parse=(n,r)=>{const i=n.value,s=e.left._zod.run({value:i,issues:[]},r),o=e.right._zod.run({value:i,issues:[]},r);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([l,u])=>Ud(n,l,u)):Ud(n,s,o)}});function cl(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(mi(t)&&mi(e)){const n=Object.keys(e),r=Object.keys(t).filter(s=>n.indexOf(s)!==-1),i={...t,...e};for(const s of r){const o=cl(t[s],e[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<t.length;r++){const i=t[r],s=e[r],o=cl(i,s);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function Ud(t,e,n){const r=new Map;let i;for(const a of e.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else t.issues.push(a);for(const a of n.issues)if(a.code==="unrecognized_keys")for(const l of a.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else t.issues.push(a);const s=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&t.issues.push({...i,keys:s}),ii(t))return t;const o=cl(e.value,n.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}const tw=S("$ZodRecord",(t,e)=>{be.init(t,e),t._zod.parse=(n,r)=>{const i=n.value;if(!mi(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),n;const s=[],o=e.keyType._zod.values;if(o){n.value={};const a=new Set;for(const u of o)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);const c=e.valueType._zod.run({value:i[u],issues:[]},r);c instanceof Promise?s.push(c.then(d=>{d.issues.length&&n.issues.push(...ri(u,d.issues)),n.value[u]=d.value})):(c.issues.length&&n.issues.push(...ri(u,c.issues)),n.value[u]=c.value)}let l;for(const u in i)a.has(u)||(l=l??[],l.push(u));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:l})}else{n.value={};for(const a of Reflect.ownKeys(i)){if(a==="__proto__")continue;let l=e.keyType._zod.run({value:a,issues:[]},r);if(l instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Mm.test(a)&&l.issues.length){const d=e.keyType._zod.run({value:Number(a),issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(l=d)}if(l.issues.length){e.mode==="loose"?n.value[a]=i[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(d=>cn(d,r,un())),input:a,path:[a],inst:t});continue}const c=e.valueType._zod.run({value:i[a],issues:[]},r);c instanceof Promise?s.push(c.then(d=>{d.issues.length&&n.issues.push(...ri(a,d.issues)),n.value[l.value]=d.value})):(c.issues.length&&n.issues.push(...ri(a,c.issues)),n.value[l.value]=c.value)}}return s.length?Promise.all(s).then(()=>n):n}}),nw=S("$ZodEnum",(t,e)=>{be.init(t,e);const n=xm(e.entries),r=new Set(n);t._zod.values=r,t._zod.pattern=new RegExp(`^(${n.filter(i=>hx.has(typeof i)).map(i=>typeof i=="string"?pi(i):i.toString()).join("|")})$`),t._zod.parse=(i,s)=>{const o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:n,input:o,inst:t}),i}}),iw=S("$ZodLiteral",(t,e)=>{if(be.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(e.values);t._zod.values=n,t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?pi(r):r?pi(r.toString()):String(r)).join("|")})$`),t._zod.parse=(r,i)=>{const s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:e.values,input:s,inst:t}),r}}),rw=S("$ZodTransform",(t,e)=>{be.init(t,e),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new km(t.constructor.name);const i=e.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(o=>(n.value=o,n));if(i instanceof Promise)throw new ai;return n.value=i,n}});function Ld(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const Fm=S("$ZodOptional",(t,e)=>{be.init(t,e),t._zod.optin="optional",t._zod.optout="optional",se(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),se(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${Wl(n.source)})?$`):void 0}),t._zod.parse=(n,r)=>{if(e.innerType._zod.optin==="optional"){const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>Ld(s,n.value)):Ld(i,n.value)}return n.value===void 0?n:e.innerType._zod.run(n,r)}}),sw=S("$ZodExactOptional",(t,e)=>{Fm.init(t,e),se(t._zod,"values",()=>e.innerType._zod.values),se(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(n,r)=>e.innerType._zod.run(n,r)}),ow=S("$ZodNullable",(t,e)=>{be.init(t,e),se(t._zod,"optin",()=>e.innerType._zod.optin),se(t._zod,"optout",()=>e.innerType._zod.optout),se(t._zod,"pattern",()=>{const n=e.innerType._zod.pattern;return n?new RegExp(`^(${Wl(n.source)}|null)$`):void 0}),se(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,r)=>n.value===null?n:e.innerType._zod.run(n,r)}),aw=S("$ZodDefault",(t,e)=>{be.init(t,e),t._zod.optin="optional",se(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);if(n.value===void 0)return n.value=e.defaultValue,n;const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>Fd(s,e)):Fd(i,e)}});function Fd(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const lw=S("$ZodPrefault",(t,e)=>{be.init(t,e),t._zod.optin="optional",se(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,r))}),uw=S("$ZodNonOptional",(t,e)=>{be.init(t,e),se(t._zod,"values",()=>{const n=e.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),t._zod.parse=(n,r)=>{const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>Vd(s,t)):Vd(i,t)}});function Vd(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const cw=S("$ZodCatch",(t,e)=>{be.init(t,e),se(t._zod,"optin",()=>e.innerType._zod.optin),se(t._zod,"optout",()=>e.innerType._zod.optout),se(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>(n.value=s.value,s.issues.length&&(n.value=e.catchValue({...n,error:{issues:s.issues.map(o=>cn(o,r,un()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=e.catchValue({...n,error:{issues:i.issues.map(s=>cn(s,r,un()))},input:n.value}),n.issues=[]),n)}}),dw=S("$ZodPipe",(t,e)=>{be.init(t,e),se(t._zod,"values",()=>e.in._zod.values),se(t._zod,"optin",()=>e.in._zod.optin),se(t._zod,"optout",()=>e.out._zod.optout),se(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,r)=>{if(r.direction==="backward"){const s=e.out._zod.run(n,r);return s instanceof Promise?s.then(o=>vs(o,e.in,r)):vs(s,e.in,r)}const i=e.in._zod.run(n,r);return i instanceof Promise?i.then(s=>vs(s,e.out,r)):vs(i,e.out,r)}});function vs(t,e,n){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},n)}const fw=S("$ZodReadonly",(t,e)=>{be.init(t,e),se(t._zod,"propValues",()=>e.innerType._zod.propValues),se(t._zod,"values",()=>e.innerType._zod.values),se(t._zod,"optin",()=>{var n,r;return(r=(n=e.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),se(t._zod,"optout",()=>{var n,r;return(r=(n=e.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);const i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(Wd):Wd(i)}});function Wd(t){return t.value=Object.freeze(t.value),t}const hw=S("$ZodCustom",(t,e)=>{nt.init(t,e),be.init(t,e),t._zod.parse=(n,r)=>n,t._zod.check=n=>{const r=n.value,i=e.fn(r);if(i instanceof Promise)return i.then(s=>Hd(s,n,r,t));Hd(i,n,r,t)}});function Hd(t,e,n,r){if(!t){const i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),e.issues.push(dr(i))}}var Bd;class mw{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){const r=n[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){const n=e._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function pw(){return new mw}(Bd=globalThis).__zod_globalRegistry??(Bd.__zod_globalRegistry=pw());const Gi=globalThis.__zod_globalRegistry;function gw(t,e){return new t({type:"string",...A(e)})}function vw(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...A(e)})}function qd(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...A(e)})}function bw(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...A(e)})}function yw(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...A(e)})}function _w(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...A(e)})}function kw(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...A(e)})}function $w(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...A(e)})}function xw(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...A(e)})}function ww(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...A(e)})}function Sw(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...A(e)})}function Iw(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...A(e)})}function zw(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...A(e)})}function Ow(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...A(e)})}function Tw(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...A(e)})}function Dw(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...A(e)})}function Pw(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...A(e)})}function Ew(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...A(e)})}function Mw(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...A(e)})}function Nw(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...A(e)})}function Cw(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...A(e)})}function Aw(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...A(e)})}function Rw(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...A(e)})}function Zw(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...A(e)})}function jw(t,e){return new t({type:"string",format:"date",check:"string_format",...A(e)})}function Uw(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...A(e)})}function Lw(t,e){return new t({type:"string",format:"duration",check:"string_format",...A(e)})}function Fw(t,e){return new t({type:"number",checks:[],...A(e)})}function Vw(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...A(e)})}function Ww(t,e){return new t({type:"boolean",...A(e)})}function Hw(t,e){return new t({type:"null",...A(e)})}function Bw(t){return new t({type:"unknown"})}function qw(t,e){return new t({type:"never",...A(e)})}function Jd(t,e){return new Cm({check:"less_than",...A(e),value:t,inclusive:!1})}function Ra(t,e){return new Cm({check:"less_than",...A(e),value:t,inclusive:!0})}function Yd(t,e){return new Am({check:"greater_than",...A(e),value:t,inclusive:!1})}function Za(t,e){return new Am({check:"greater_than",...A(e),value:t,inclusive:!0})}function Gd(t,e){return new o0({check:"multiple_of",...A(e),value:t})}function Vm(t,e){return new l0({check:"max_length",...A(e),maximum:t})}function Gs(t,e){return new u0({check:"min_length",...A(e),minimum:t})}function Wm(t,e){return new c0({check:"length_equals",...A(e),length:t})}function Jw(t,e){return new d0({check:"string_format",format:"regex",...A(e),pattern:t})}function Yw(t){return new f0({check:"string_format",format:"lowercase",...A(t)})}function Gw(t){return new h0({check:"string_format",format:"uppercase",...A(t)})}function Kw(t,e){return new m0({check:"string_format",format:"includes",...A(e),includes:t})}function Xw(t,e){return new p0({check:"string_format",format:"starts_with",...A(e),prefix:t})}function Qw(t,e){return new g0({check:"string_format",format:"ends_with",...A(e),suffix:t})}function Oi(t){return new v0({check:"overwrite",tx:t})}function eS(t){return Oi(e=>e.normalize(t))}function tS(){return Oi(t=>t.trim())}function nS(){return Oi(t=>t.toLowerCase())}function iS(){return Oi(t=>t.toUpperCase())}function rS(){return Oi(t=>dx(t))}function sS(t,e,n){return new t({type:"array",element:e,...A(n)})}function oS(t,e,n){const r=A(n);return r.abort??(r.abort=!0),new t({type:"custom",check:"custom",fn:e,...r})}function aS(t,e,n){return new t({type:"custom",check:"custom",fn:e,...A(n)})}function lS(t){const e=uS(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(dr(r,n.value,e._zod.def));else{const i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),n.issues.push(dr(i))}},t(n.value,n)));return e}function uS(t,e){const n=new nt({check:"custom",...A(e)});return n._zod.check=t,n}function Hm(t){let e=(t==null?void 0:t.target)??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:(t==null?void 0:t.metadata)??Gi,target:e,unrepresentable:(t==null?void 0:t.unrepresentable)??"throw",override:(t==null?void 0:t.override)??(()=>{}),io:(t==null?void 0:t.io)??"output",counter:0,seen:new Map,cycles:(t==null?void 0:t.cycles)??"ref",reused:(t==null?void 0:t.reused)??"inline",external:(t==null?void 0:t.external)??void 0}}function Ee(t,e,n={path:[],schemaPath:[]}){var c,d;var r;const i=t._zod.def,s=e.seen.get(t);if(s)return s.count++,n.schemaPath.includes(t)&&(s.cycle=n.path),s.schema;const o={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(t,o);const a=(d=(c=t._zod).toJSONSchema)==null?void 0:d.call(c);if(a)o.schema=a;else{const f={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,f);else{const m=o.schema,p=e.processors[i.type];if(!p)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);p(t,e,m,f)}const h=t._zod.parent;h&&(o.ref||(o.ref=h),Ee(h,e,f),e.seen.get(h).isParent=!0)}const l=e.metadataRegistry.get(t);return l&&Object.assign(o.schema,l),e.io==="input"&&Je(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function Bm(t,e){var o,a,l,u;const n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const c of t.seen.entries()){const d=(o=t.metadataRegistry.get(c[0]))==null?void 0:o.id;if(d){const f=r.get(d);if(f&&f!==c[0])throw new Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(d,c[0])}}const i=c=>{var p;const d=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const g=(p=t.external.registry.get(c[0]))==null?void 0:p.id,b=t.external.uri??($=>$);if(g)return{ref:b(g)};const k=c[1].defId??c[1].schema.id??`schema${t.counter++}`;return c[1].defId=k,{defId:k,ref:`${b("__shared")}#/${d}/${k}`}}if(c[1]===n)return{ref:"#"};const h=`#/${d}/`,m=c[1].schema.id??`__schema${t.counter++}`;return{defId:m,ref:h+m}},s=c=>{if(c[1].schema.$ref)return;const d=c[1],{ref:f,defId:h}=i(c);d.def={...d.schema},h&&(d.defId=h);const m=d.schema;for(const p in m)delete m[p];m.$ref=f};if(t.cycles==="throw")for(const c of t.seen.entries()){const d=c[1];if(d.cycle)throw new Error(`Cycle detected: #/${(a=d.cycle)==null?void 0:a.join("/")}/<root>
|
|
43
|
+
`)}f.write("payload.value = newResult;"),f.write("return payload;");const B=f.compile();return(_,y)=>B(d,_,y)};let r;const s=Hr,o=!Zv.jitless,l=o&&Mx.value,u=e.catchall;let c;t._zod.parse=(d,f)=>{c??(c=i.value);const h=d.value;return s(h)?o&&l&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(r||(r=n(e.shape)),d=r(d,f),u?lB([],h,d,f,c,t):d):A(d,f):(d.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),d)}});function ug(t,e,A,i){for(const r of t)if(r.issues.length===0)return e.value=r.value,e;const n=t.filter(r=>!ci(r));return n.length===1?(e.value=n[0].value,n[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:A,errors:t.map(r=>r.issues.map(s=>on(s,i,sn())))}),e)}const uB=I("$ZodUnion",(t,e)=>{Fe.init(t,e),fe(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),fe(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),fe(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),fe(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){const n=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${n.map(r=>rd(r.source)).join("|")})$`)}});const A=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,r)=>{if(A)return i(n,r);let s=!1;const o=[];for(const a of e.options){const l=a._zod.run({value:n.value,issues:[]},r);if(l instanceof Promise)o.push(l),s=!0;else{if(l.issues.length===0)return l;o.push(l)}}return s?Promise.all(o).then(a=>ug(a,n,t,r)):ug(o,n,t,r)}}),QI=I("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,uB.init(t,e);const A=t._zod.parse;fe(t._zod,"propValues",()=>{const n={};for(const r of e.options){const s=r._zod.propValues;if(!s||Object.keys(s).length===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(const[o,a]of Object.entries(s)){n[o]||(n[o]=new Set);for(const l of a)n[o].add(l)}}return n});const i=Na(()=>{var s;const n=e.options,r=new Map;for(const o of n){const a=(s=o._zod.propValues)==null?void 0:s[e.discriminator];if(!a||a.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(const l of a){if(r.has(l))throw new Error(`Duplicate discriminator value "${String(l)}"`);r.set(l,o)}}return r});t._zod.parse=(n,r)=>{const s=n.value;if(!Hr(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),n;const o=i.value.get(s==null?void 0:s[e.discriminator]);return o?o._zod.run(n,r):e.unionFallback?A(n,r):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:s,path:[e.discriminator],inst:t}),n)}}),xI=I("$ZodIntersection",(t,e)=>{Fe.init(t,e),t._zod.parse=(A,i)=>{const n=A.value,r=e.left._zod.run({value:n,issues:[]},i),s=e.right._zod.run({value:n,issues:[]},i);return r instanceof Promise||s instanceof Promise?Promise.all([r,s]).then(([a,l])=>cg(A,a,l)):cg(A,r,s)}});function tc(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Ci(t)&&Ci(e)){const A=Object.keys(e),i=Object.keys(t).filter(r=>A.indexOf(r)!==-1),n={...t,...e};for(const r of i){const s=tc(t[r],e[r]);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n[r]=s.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};const A=[];for(let i=0;i<t.length;i++){const n=t[i],r=e[i],s=tc(n,r);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};A.push(s.data)}return{valid:!0,data:A}}return{valid:!1,mergeErrorPath:[]}}function cg(t,e,A){const i=new Map;let n;for(const o of e.issues)if(o.code==="unrecognized_keys"){n??(n=o);for(const a of o.keys)i.has(a)||i.set(a,{}),i.get(a).l=!0}else t.issues.push(o);for(const o of A.issues)if(o.code==="unrecognized_keys")for(const a of o.keys)i.has(a)||i.set(a,{}),i.get(a).r=!0;else t.issues.push(o);const r=[...i].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(r.length&&n&&t.issues.push({...n,keys:r}),ci(t))return t;const s=tc(e.value,A.value);if(!s.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}const FI=I("$ZodRecord",(t,e)=>{Fe.init(t,e),t._zod.parse=(A,i)=>{const n=A.value;if(!Ci(n))return A.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),A;const r=[],s=e.keyType._zod.values;if(s){A.value={};const o=new Set;for(const l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){o.add(typeof l=="number"?l.toString():l);const u=e.valueType._zod.run({value:n[l],issues:[]},i);u instanceof Promise?r.push(u.then(c=>{c.issues.length&&A.issues.push(...di(l,c.issues)),A.value[l]=c.value})):(u.issues.length&&A.issues.push(...di(l,u.issues)),A.value[l]=u.value)}let a;for(const l in n)o.has(l)||(a=a??[],a.push(l));a&&a.length>0&&A.issues.push({code:"unrecognized_keys",input:n,inst:t,keys:a})}else{A.value={};for(const o of Reflect.ownKeys(n)){if(o==="__proto__")continue;let a=e.keyType._zod.run({value:o,issues:[]},i);if(a instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof o=="string"&&AB.test(o)&&a.issues.length){const c=e.keyType._zod.run({value:Number(o),issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");c.issues.length===0&&(a=c)}if(a.issues.length){e.mode==="loose"?A.value[o]=n[o]:A.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(c=>on(c,i,sn())),input:o,path:[o],inst:t});continue}const u=e.valueType._zod.run({value:n[o],issues:[]},i);u instanceof Promise?r.push(u.then(c=>{c.issues.length&&A.issues.push(...di(o,c.issues)),A.value[a.value]=c.value})):(u.issues.length&&A.issues.push(...di(o,u.issues)),A.value[a.value]=u.value)}}return r.length?Promise.all(r).then(()=>A):A}}),II=I("$ZodEnum",(t,e)=>{Fe.init(t,e);const A=Vv(e.entries),i=new Set(A);t._zod.values=i,t._zod.pattern=new RegExp(`^(${A.filter(n=>Nx.has(typeof n)).map(n=>typeof n=="string"?Ui(n):n.toString()).join("|")})$`),t._zod.parse=(n,r)=>{const s=n.value;return i.has(s)||n.issues.push({code:"invalid_value",values:A,input:s,inst:t}),n}}),SI=I("$ZodLiteral",(t,e)=>{if(Fe.init(t,e),e.values.length===0)throw new Error("Cannot create literal schema with no valid values");const A=new Set(e.values);t._zod.values=A,t._zod.pattern=new RegExp(`^(${e.values.map(i=>typeof i=="string"?Ui(i):i?Ui(i.toString()):String(i)).join("|")})$`),t._zod.parse=(i,n)=>{const r=i.value;return A.has(r)||i.issues.push({code:"invalid_value",values:e.values,input:r,inst:t}),i}}),kI=I("$ZodTransform",(t,e)=>{Fe.init(t,e),t._zod.parse=(A,i)=>{if(i.direction==="backward")throw new Kv(t.constructor.name);const n=e.transform(A.value,A);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(s=>(A.value=s,A));if(n instanceof Promise)throw new mi;return A.value=n,A}});function dg(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}const cB=I("$ZodOptional",(t,e)=>{Fe.init(t,e),t._zod.optin="optional",t._zod.optout="optional",fe(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),fe(t._zod,"pattern",()=>{const A=e.innerType._zod.pattern;return A?new RegExp(`^(${rd(A.source)})?$`):void 0}),t._zod.parse=(A,i)=>{if(e.innerType._zod.optin==="optional"){const n=e.innerType._zod.run(A,i);return n instanceof Promise?n.then(r=>dg(r,A.value)):dg(n,A.value)}return A.value===void 0?A:e.innerType._zod.run(A,i)}}),EI=I("$ZodExactOptional",(t,e)=>{cB.init(t,e),fe(t._zod,"values",()=>e.innerType._zod.values),fe(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(A,i)=>e.innerType._zod.run(A,i)}),$I=I("$ZodNullable",(t,e)=>{Fe.init(t,e),fe(t._zod,"optin",()=>e.innerType._zod.optin),fe(t._zod,"optout",()=>e.innerType._zod.optout),fe(t._zod,"pattern",()=>{const A=e.innerType._zod.pattern;return A?new RegExp(`^(${rd(A.source)}|null)$`):void 0}),fe(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(A,i)=>A.value===null?A:e.innerType._zod.run(A,i)}),TI=I("$ZodDefault",(t,e)=>{Fe.init(t,e),t._zod.optin="optional",fe(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(A,i)=>{if(i.direction==="backward")return e.innerType._zod.run(A,i);if(A.value===void 0)return A.value=e.defaultValue,A;const n=e.innerType._zod.run(A,i);return n instanceof Promise?n.then(r=>fg(r,e)):fg(n,e)}});function fg(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}const OI=I("$ZodPrefault",(t,e)=>{Fe.init(t,e),t._zod.optin="optional",fe(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(A,i)=>(i.direction==="backward"||A.value===void 0&&(A.value=e.defaultValue),e.innerType._zod.run(A,i))}),HI=I("$ZodNonOptional",(t,e)=>{Fe.init(t,e),fe(t._zod,"values",()=>{const A=e.innerType._zod.values;return A?new Set([...A].filter(i=>i!==void 0)):void 0}),t._zod.parse=(A,i)=>{const n=e.innerType._zod.run(A,i);return n instanceof Promise?n.then(r=>hg(r,t)):hg(n,t)}});function hg(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}const DI=I("$ZodCatch",(t,e)=>{Fe.init(t,e),fe(t._zod,"optin",()=>e.innerType._zod.optin),fe(t._zod,"optout",()=>e.innerType._zod.optout),fe(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(A,i)=>{if(i.direction==="backward")return e.innerType._zod.run(A,i);const n=e.innerType._zod.run(A,i);return n instanceof Promise?n.then(r=>(A.value=r.value,r.issues.length&&(A.value=e.catchValue({...A,error:{issues:r.issues.map(s=>on(s,i,sn()))},input:A.value}),A.issues=[]),A)):(A.value=n.value,n.issues.length&&(A.value=e.catchValue({...A,error:{issues:n.issues.map(r=>on(r,i,sn()))},input:A.value}),A.issues=[]),A)}}),LI=I("$ZodPipe",(t,e)=>{Fe.init(t,e),fe(t._zod,"values",()=>e.in._zod.values),fe(t._zod,"optin",()=>e.in._zod.optin),fe(t._zod,"optout",()=>e.out._zod.optout),fe(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(A,i)=>{if(i.direction==="backward"){const r=e.out._zod.run(A,i);return r instanceof Promise?r.then(s=>js(s,e.in,i)):js(r,e.in,i)}const n=e.in._zod.run(A,i);return n instanceof Promise?n.then(r=>js(r,e.out,i)):js(n,e.out,i)}});function js(t,e,A){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},A)}const MI=I("$ZodReadonly",(t,e)=>{Fe.init(t,e),fe(t._zod,"propValues",()=>e.innerType._zod.propValues),fe(t._zod,"values",()=>e.innerType._zod.values),fe(t._zod,"optin",()=>{var A,i;return(i=(A=e.innerType)==null?void 0:A._zod)==null?void 0:i.optin}),fe(t._zod,"optout",()=>{var A,i;return(i=(A=e.innerType)==null?void 0:A._zod)==null?void 0:i.optout}),t._zod.parse=(A,i)=>{if(i.direction==="backward")return e.innerType._zod.run(A,i);const n=e.innerType._zod.run(A,i);return n instanceof Promise?n.then(gg):gg(n)}});function gg(t){return t.value=Object.freeze(t.value),t}const NI=I("$ZodCustom",(t,e)=>{Ft.init(t,e),Fe.init(t,e),t._zod.parse=(A,i)=>A,t._zod.check=A=>{const i=A.value,n=e.fn(i);if(n instanceof Promise)return n.then(r=>mg(r,A,i,t));mg(n,A,i,t)}});function mg(t,e,A,i){if(!t){const n={code:"custom",input:A,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),e.issues.push(Dr(n))}}var pg;class zI{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...A){const i=A[0];return this._map.set(e,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const A=this._map.get(e);return A&&typeof A=="object"&&"id"in A&&this._idmap.delete(A.id),this._map.delete(e),this}get(e){const A=e._zod.parent;if(A){const i={...this.get(A)??{}};delete i.id;const n={...i,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function PI(){return new zI}(pg=globalThis).__zod_globalRegistry??(pg.__zod_globalRegistry=PI());const ur=globalThis.__zod_globalRegistry;function RI(t,e){return new t({type:"string",...N(e)})}function KI(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...N(e)})}function vg(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...N(e)})}function ZI(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...N(e)})}function VI(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...N(e)})}function jI(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...N(e)})}function GI(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...N(e)})}function WI(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...N(e)})}function JI(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...N(e)})}function XI(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...N(e)})}function YI(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...N(e)})}function qI(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...N(e)})}function eS(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...N(e)})}function tS(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...N(e)})}function AS(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...N(e)})}function nS(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...N(e)})}function iS(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...N(e)})}function rS(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...N(e)})}function sS(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...N(e)})}function oS(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...N(e)})}function aS(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...N(e)})}function lS(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...N(e)})}function uS(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...N(e)})}function cS(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...N(e)})}function dS(t,e){return new t({type:"string",format:"date",check:"string_format",...N(e)})}function fS(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...N(e)})}function hS(t,e){return new t({type:"string",format:"duration",check:"string_format",...N(e)})}function gS(t,e){return new t({type:"number",checks:[],...N(e)})}function mS(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...N(e)})}function pS(t,e){return new t({type:"boolean",...N(e)})}function vS(t,e){return new t({type:"null",...N(e)})}function BS(t){return new t({type:"unknown"})}function wS(t,e){return new t({type:"never",...N(e)})}function Bg(t,e){return new iB({check:"less_than",...N(e),value:t,inclusive:!1})}function su(t,e){return new iB({check:"less_than",...N(e),value:t,inclusive:!0})}function wg(t,e){return new rB({check:"greater_than",...N(e),value:t,inclusive:!1})}function ou(t,e){return new rB({check:"greater_than",...N(e),value:t,inclusive:!0})}function yg(t,e){return new $F({check:"multiple_of",...N(e),value:t})}function dB(t,e){return new OF({check:"max_length",...N(e),maximum:t})}function Aa(t,e){return new HF({check:"min_length",...N(e),minimum:t})}function fB(t,e){return new DF({check:"length_equals",...N(e),length:t})}function yS(t,e){return new LF({check:"string_format",format:"regex",...N(e),pattern:t})}function bS(t){return new MF({check:"string_format",format:"lowercase",...N(t)})}function _S(t){return new NF({check:"string_format",format:"uppercase",...N(t)})}function CS(t,e){return new zF({check:"string_format",format:"includes",...N(e),includes:t})}function US(t,e){return new PF({check:"string_format",format:"starts_with",...N(e),prefix:t})}function QS(t,e){return new RF({check:"string_format",format:"ends_with",...N(e),suffix:t})}function Mi(t){return new KF({check:"overwrite",tx:t})}function xS(t){return Mi(e=>e.normalize(t))}function FS(){return Mi(t=>t.trim())}function IS(){return Mi(t=>t.toLowerCase())}function SS(){return Mi(t=>t.toUpperCase())}function kS(){return Mi(t=>Lx(t))}function ES(t,e,A){return new t({type:"array",element:e,...N(A)})}function $S(t,e,A){const i=N(A);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function TS(t,e,A){return new t({type:"custom",check:"custom",fn:e,...N(A)})}function OS(t){const e=HS(A=>(A.addIssue=i=>{if(typeof i=="string")A.issues.push(Dr(i,A.value,e._zod.def));else{const n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=A.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),A.issues.push(Dr(n))}},t(A.value,A)));return e}function HS(t,e){const A=new Ft({check:"custom",...N(e)});return A._zod.check=t,A}function hB(t){let e=(t==null?void 0:t.target)??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:(t==null?void 0:t.metadata)??ur,target:e,unrepresentable:(t==null?void 0:t.unrepresentable)??"throw",override:(t==null?void 0:t.override)??(()=>{}),io:(t==null?void 0:t.io)??"output",counter:0,seen:new Map,cycles:(t==null?void 0:t.cycles)??"ref",reused:(t==null?void 0:t.reused)??"inline",external:(t==null?void 0:t.external)??void 0}}function Ke(t,e,A={path:[],schemaPath:[]}){var u,c;var i;const n=t._zod.def,r=e.seen.get(t);if(r)return r.count++,A.schemaPath.includes(t)&&(r.cycle=A.path),r.schema;const s={schema:{},count:1,cycle:void 0,path:A.path};e.seen.set(t,s);const o=(c=(u=t._zod).toJSONSchema)==null?void 0:c.call(u);if(o)s.schema=o;else{const d={...A,schemaPath:[...A.schemaPath,t],path:A.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,d);else{const h=s.schema,g=e.processors[n.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);g(t,e,h,d)}const f=t._zod.parent;f&&(s.ref||(s.ref=f),Ke(f,e,d),e.seen.get(f).isParent=!0)}const a=e.metadataRegistry.get(t);return a&&Object.assign(s.schema,a),e.io==="input"&>(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}function gB(t,e){var s,o,a,l;const A=t.seen.get(e);if(!A)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=new Map;for(const u of t.seen.entries()){const c=(s=t.metadataRegistry.get(u[0]))==null?void 0:s.id;if(c){const d=i.get(c);if(d&&d!==u[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(c,u[0])}}const n=u=>{var g;const c=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const m=(g=t.external.registry.get(u[0]))==null?void 0:g.id,p=t.external.uri??(b=>b);if(m)return{ref:p(m)};const B=u[1].defId??u[1].schema.id??`schema${t.counter++}`;return u[1].defId=B,{defId:B,ref:`${p("__shared")}#/${c}/${B}`}}if(u[1]===A)return{ref:"#"};const f=`#/${c}/`,h=u[1].schema.id??`__schema${t.counter++}`;return{defId:h,ref:f+h}},r=u=>{if(u[1].schema.$ref)return;const c=u[1],{ref:d,defId:f}=n(u);c.def={...c.schema},f&&(c.defId=f);const h=c.schema;for(const g in h)delete h[g];h.$ref=d};if(t.cycles==="throw")for(const u of t.seen.entries()){const c=u[1];if(c.cycle)throw new Error(`Cycle detected: #/${(o=c.cycle)==null?void 0:o.join("/")}/<root>
|
|
44
44
|
|
|
45
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of t.seen.entries()){const d=c[1];if(e===c[0]){s(c);continue}if(t.external){const h=(l=t.external.registry.get(c[0]))==null?void 0:l.id;if(e!==c[0]&&h){s(c);continue}}if((u=t.metadataRegistry.get(c[0]))==null?void 0:u.id){s(c);continue}if(d.cycle){s(c);continue}if(d.count>1&&t.reused==="ref"){s(c);continue}}}function qm(t,e){var o,a,l;const n=t.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const c=t.seen.get(u);if(c.ref===null)return;const d=c.def??c.schema,f={...d},h=c.ref;if(c.ref=null,h){r(h);const p=t.seen.get(h),g=p.schema;if(g.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(g)):Object.assign(d,g),Object.assign(d,f),u._zod.parent===h)for(const k in d)k==="$ref"||k==="allOf"||k in f||delete d[k];if(g.$ref&&p.def)for(const k in d)k==="$ref"||k==="allOf"||k in p.def&&JSON.stringify(d[k])===JSON.stringify(p.def[k])&&delete d[k]}const m=u._zod.parent;if(m&&m!==h){r(m);const p=t.seen.get(m);if(p!=null&&p.schema.$ref&&(d.$ref=p.schema.$ref,p.def))for(const g in d)g==="$ref"||g==="allOf"||g in p.def&&JSON.stringify(d[g])===JSON.stringify(p.def[g])&&delete d[g]}t.override({zodSchema:u,jsonSchema:d,path:c.path??[]})};for(const u of[...t.seen.entries()].reverse())r(u[0]);const i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,(o=t.external)!=null&&o.uri){const u=(a=t.external.registry.get(e))==null?void 0:a.id;if(!u)throw new Error("Schema is missing an `id` property");i.$id=t.external.uri(u)}Object.assign(i,n.def??n.schema);const s=((l=t.external)==null?void 0:l.defs)??{};for(const u of t.seen.entries()){const c=u[1];c.def&&c.defId&&(s[c.defId]=c.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{const u=JSON.parse(JSON.stringify(i));return Object.defineProperty(u,"~standard",{value:{...e["~standard"],jsonSchema:{input:Ks(e,"input",t.processors),output:Ks(e,"output",t.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function Je(t,e){const n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);const r=t._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Je(r.element,n);if(r.type==="set")return Je(r.valueType,n);if(r.type==="lazy")return Je(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Je(r.innerType,n);if(r.type==="intersection")return Je(r.left,n)||Je(r.right,n);if(r.type==="record"||r.type==="map")return Je(r.keyType,n)||Je(r.valueType,n);if(r.type==="pipe")return Je(r.in,n)||Je(r.out,n);if(r.type==="object"){for(const i in r.shape)if(Je(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(const i of r.options)if(Je(i,n))return!0;return!1}if(r.type==="tuple"){for(const i of r.items)if(Je(i,n))return!0;return!!(r.rest&&Je(r.rest,n))}return!1}const cS=(t,e={})=>n=>{const r=Hm({...n,processors:e});return Ee(t,r),Bm(r,t),qm(r,t)},Ks=(t,e,n={})=>r=>{const{libraryOptions:i,target:s}=r??{},o=Hm({...i??{},target:s,io:e,processors:n});return Ee(t,o),Bm(o,t),qm(o,t)},dS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},fS=(t,e,n,r)=>{const i=n;i.type="string";const{minimum:s,maximum:o,format:a,patterns:l,contentEncoding:u}=t._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=dS[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),u&&(i.contentEncoding=u),l&&l.size>0){const c=[...l];c.length===1?i.pattern=c[0].source:c.length>1&&(i.allOf=[...c.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},hS=(t,e,n,r)=>{const i=n,{minimum:s,maximum:o,format:a,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:c}=t._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number",typeof c=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.minimum=c,i.exclusiveMinimum=!0):i.exclusiveMinimum=c),typeof s=="number"&&(i.minimum=s,typeof c=="number"&&e.target!=="draft-04"&&(c>=s?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof o=="number"&&(i.maximum=o,typeof u=="number"&&e.target!=="draft-04"&&(u<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof l=="number"&&(i.multipleOf=l)},mS=(t,e,n,r)=>{n.type="boolean"},pS=(t,e,n,r)=>{e.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},gS=(t,e,n,r)=>{n.not={}},vS=(t,e,n,r)=>{},bS=(t,e,n,r)=>{const i=t._zod.def,s=xm(i.entries);s.every(o=>typeof o=="number")&&(n.type="number"),s.every(o=>typeof o=="string")&&(n.type="string"),n.enum=s},yS=(t,e,n,r)=>{const i=t._zod.def,s=[];for(const o of i.values)if(o===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(o))}else s.push(o);if(s.length!==0)if(s.length===1){const o=s[0];n.type=o===null?"null":typeof o,e.target==="draft-04"||e.target==="openapi-3.0"?n.enum=[o]:n.const=o}else s.every(o=>typeof o=="number")&&(n.type="number"),s.every(o=>typeof o=="string")&&(n.type="string"),s.every(o=>typeof o=="boolean")&&(n.type="boolean"),s.every(o=>o===null)&&(n.type="null"),n.enum=s},_S=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},kS=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},$S=(t,e,n,r)=>{const i=n,s=t._zod.def,{minimum:o,maximum:a}=t._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=Ee(s.element,e,{...r,path:[...r.path,"items"]})},xS=(t,e,n,r)=>{var u;const i=n,s=t._zod.def;i.type="object",i.properties={};const o=s.shape;for(const c in o)i.properties[c]=Ee(o[c],e,{...r,path:[...r.path,"properties",c]});const a=new Set(Object.keys(o)),l=new Set([...a].filter(c=>{const d=s.shape[c]._zod;return e.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(i.required=Array.from(l)),((u=s.catchall)==null?void 0:u._zod.def.type)==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=Ee(s.catchall,e,{...r,path:[...r.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},wS=(t,e,n,r)=>{const i=t._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>Ee(a,e,{...r,path:[...r.path,s?"oneOf":"anyOf",l]}));s?n.oneOf=o:n.anyOf=o},SS=(t,e,n,r)=>{const i=t._zod.def,s=Ee(i.left,e,{...r,path:[...r.path,"allOf",0]}),o=Ee(i.right,e,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]];n.allOf=l},IS=(t,e,n,r)=>{const i=n,s=t._zod.def;i.type="object";const o=s.keyType,a=o._zod.bag,l=a==null?void 0:a.patterns;if(s.mode==="loose"&&l&&l.size>0){const c=Ee(s.valueType,e,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(const d of l)i.patternProperties[d.source]=c}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=Ee(s.keyType,e,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=Ee(s.valueType,e,{...r,path:[...r.path,"additionalProperties"]});const u=o._zod.values;if(u){const c=[...u].filter(d=>typeof d=="string"||typeof d=="number");c.length>0&&(i.required=c)}},zS=(t,e,n,r)=>{const i=t._zod.def,s=Ee(i.innerType,e,r),o=e.seen.get(t);e.target==="openapi-3.0"?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},OS=(t,e,n,r)=>{const i=t._zod.def;Ee(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType},TS=(t,e,n,r)=>{const i=t._zod.def;Ee(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},DS=(t,e,n,r)=>{const i=t._zod.def;Ee(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType,e.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},PS=(t,e,n,r)=>{const i=t._zod.def;Ee(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},ES=(t,e,n,r)=>{const i=t._zod.def,s=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;Ee(s,e,r);const o=e.seen.get(t);o.ref=s},MS=(t,e,n,r)=>{const i=t._zod.def;Ee(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType,n.readOnly=!0},Jm=(t,e,n,r)=>{const i=t._zod.def;Ee(i.innerType,e,r);const s=e.seen.get(t);s.ref=i.innerType};function Yl(t){return!!t._zod}function Ym(t,e){return Yl(t)?Tm(t,e):t.safeParse(e)}function NS(t){var n,r;if(!t)return;let e;if(Yl(t)?e=(r=(n=t._zod)==null?void 0:n.def)==null?void 0:r.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function CS(t){var i;if(Yl(t)){const o=(i=t._zod)==null?void 0:i.def;if(o){if(o.value!==void 0)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}const n=t._def;if(n){if(n.value!==void 0)return n.value;if(Array.isArray(n.values)&&n.values.length>0)return n.values[0]}const r=t.value;if(r!==void 0)return r}const AS=S("ZodISODateTime",(t,e)=>{P0.init(t,e),Se.init(t,e)});function Gm(t){return Zw(AS,t)}const RS=S("ZodISODate",(t,e)=>{E0.init(t,e),Se.init(t,e)});function ZS(t){return jw(RS,t)}const jS=S("ZodISOTime",(t,e)=>{M0.init(t,e),Se.init(t,e)});function US(t){return Uw(jS,t)}const LS=S("ZodISODuration",(t,e)=>{N0.init(t,e),Se.init(t,e)});function FS(t){return Lw(LS,t)}const VS=(t,e)=>{zm.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>wx(t,n)},flatten:{value:n=>xx(t,n)},addIssue:{value:n=>{t.issues.push(n),t.message=JSON.stringify(t.issues,ul,2)}},addIssues:{value:n=>{t.issues.push(...n),t.message=JSON.stringify(t.issues,ul,2)}},isEmpty:{get(){return t.issues.length===0}}})},bt=S("ZodError",VS,{Parent:Error}),WS=Bl(bt),HS=ql(bt),BS=zo(bt),qS=Oo(bt),JS=Ix(bt),YS=zx(bt),GS=Ox(bt),KS=Tx(bt),XS=Dx(bt),QS=Px(bt),eI=Ex(bt),tI=Mx(bt),_e=S("ZodType",(t,e)=>(be.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Ks(t,"input"),output:Ks(t,"output")}}),t.toJSONSchema=cS(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...n)=>t.clone(pn(e,{checks:[...e.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),t.with=t.check,t.clone=(n,r)=>gn(t,n,r),t.brand=()=>t,t.register=((n,r)=>(n.add(t,r),t)),t.parse=(n,r)=>WS(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>BS(t,n,r),t.parseAsync=async(n,r)=>HS(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>qS(t,n,r),t.spa=t.safeParseAsync,t.encode=(n,r)=>JS(t,n,r),t.decode=(n,r)=>YS(t,n,r),t.encodeAsync=async(n,r)=>GS(t,n,r),t.decodeAsync=async(n,r)=>KS(t,n,r),t.safeEncode=(n,r)=>XS(t,n,r),t.safeDecode=(n,r)=>QS(t,n,r),t.safeEncodeAsync=async(n,r)=>eI(t,n,r),t.safeDecodeAsync=async(n,r)=>tI(t,n,r),t.refine=(n,r)=>t.check(BI(n,r)),t.superRefine=n=>t.check(qI(n)),t.overwrite=n=>t.check(Oi(n)),t.optional=()=>Te(t),t.exactOptional=()=>MI(t),t.nullable=()=>Qd(t),t.nullish=()=>Te(Qd(t)),t.nonoptional=n=>jI(t,n),t.array=()=>Q(t),t.or=n=>pe([t,n]),t.and=n=>Gl(t,n),t.transform=n=>fl(t,ip(n)),t.default=n=>AI(t,n),t.prefault=n=>ZI(t,n),t.catch=n=>LI(t,n),t.pipe=n=>fl(t,n),t.readonly=()=>WI(t),t.describe=n=>{const r=t.clone();return Gi.add(r,{description:n}),r},Object.defineProperty(t,"description",{get(){var n;return(n=Gi.get(t))==null?void 0:n.description},configurable:!0}),t.meta=(...n)=>{if(n.length===0)return Gi.get(t);const r=t.clone();return Gi.add(r,n[0]),r},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=n=>n(t),t)),Km=S("_ZodString",(t,e)=>{Jl.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,i,s)=>fS(t,r,i);const n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...r)=>t.check(Jw(...r)),t.includes=(...r)=>t.check(Kw(...r)),t.startsWith=(...r)=>t.check(Xw(...r)),t.endsWith=(...r)=>t.check(Qw(...r)),t.min=(...r)=>t.check(Gs(...r)),t.max=(...r)=>t.check(Vm(...r)),t.length=(...r)=>t.check(Wm(...r)),t.nonempty=(...r)=>t.check(Gs(1,...r)),t.lowercase=r=>t.check(Yw(r)),t.uppercase=r=>t.check(Gw(r)),t.trim=()=>t.check(tS()),t.normalize=(...r)=>t.check(eS(...r)),t.toLowerCase=()=>t.check(nS()),t.toUpperCase=()=>t.check(iS()),t.slugify=()=>t.check(rS())}),nI=S("ZodString",(t,e)=>{Jl.init(t,e),Km.init(t,e),t.email=n=>t.check(vw(iI,n)),t.url=n=>t.check($w(rI,n)),t.jwt=n=>t.check(Rw(yI,n)),t.emoji=n=>t.check(xw(sI,n)),t.guid=n=>t.check(qd(Kd,n)),t.uuid=n=>t.check(bw(bs,n)),t.uuidv4=n=>t.check(yw(bs,n)),t.uuidv6=n=>t.check(_w(bs,n)),t.uuidv7=n=>t.check(kw(bs,n)),t.nanoid=n=>t.check(ww(oI,n)),t.guid=n=>t.check(qd(Kd,n)),t.cuid=n=>t.check(Sw(aI,n)),t.cuid2=n=>t.check(Iw(lI,n)),t.ulid=n=>t.check(zw(uI,n)),t.base64=n=>t.check(Nw(gI,n)),t.base64url=n=>t.check(Cw(vI,n)),t.xid=n=>t.check(Ow(cI,n)),t.ksuid=n=>t.check(Tw(dI,n)),t.ipv4=n=>t.check(Dw(fI,n)),t.ipv6=n=>t.check(Pw(hI,n)),t.cidrv4=n=>t.check(Ew(mI,n)),t.cidrv6=n=>t.check(Mw(pI,n)),t.e164=n=>t.check(Aw(bI,n)),t.datetime=n=>t.check(Gm(n)),t.date=n=>t.check(ZS(n)),t.time=n=>t.check(US(n)),t.duration=n=>t.check(FS(n))});function x(t){return gw(nI,t)}const Se=S("ZodStringFormat",(t,e)=>{ye.init(t,e),Km.init(t,e)}),iI=S("ZodEmail",(t,e)=>{$0.init(t,e),Se.init(t,e)}),Kd=S("ZodGUID",(t,e)=>{_0.init(t,e),Se.init(t,e)}),bs=S("ZodUUID",(t,e)=>{k0.init(t,e),Se.init(t,e)}),rI=S("ZodURL",(t,e)=>{x0.init(t,e),Se.init(t,e)}),sI=S("ZodEmoji",(t,e)=>{w0.init(t,e),Se.init(t,e)}),oI=S("ZodNanoID",(t,e)=>{S0.init(t,e),Se.init(t,e)}),aI=S("ZodCUID",(t,e)=>{I0.init(t,e),Se.init(t,e)}),lI=S("ZodCUID2",(t,e)=>{z0.init(t,e),Se.init(t,e)}),uI=S("ZodULID",(t,e)=>{O0.init(t,e),Se.init(t,e)}),cI=S("ZodXID",(t,e)=>{T0.init(t,e),Se.init(t,e)}),dI=S("ZodKSUID",(t,e)=>{D0.init(t,e),Se.init(t,e)}),fI=S("ZodIPv4",(t,e)=>{C0.init(t,e),Se.init(t,e)}),hI=S("ZodIPv6",(t,e)=>{A0.init(t,e),Se.init(t,e)}),mI=S("ZodCIDRv4",(t,e)=>{R0.init(t,e),Se.init(t,e)}),pI=S("ZodCIDRv6",(t,e)=>{Z0.init(t,e),Se.init(t,e)}),gI=S("ZodBase64",(t,e)=>{j0.init(t,e),Se.init(t,e)}),vI=S("ZodBase64URL",(t,e)=>{L0.init(t,e),Se.init(t,e)}),bI=S("ZodE164",(t,e)=>{F0.init(t,e),Se.init(t,e)}),yI=S("ZodJWT",(t,e)=>{W0.init(t,e),Se.init(t,e)}),Xm=S("ZodNumber",(t,e)=>{Zm.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,i,s)=>hS(t,r,i),t.gt=(r,i)=>t.check(Yd(r,i)),t.gte=(r,i)=>t.check(Za(r,i)),t.min=(r,i)=>t.check(Za(r,i)),t.lt=(r,i)=>t.check(Jd(r,i)),t.lte=(r,i)=>t.check(Ra(r,i)),t.max=(r,i)=>t.check(Ra(r,i)),t.int=r=>t.check(Xd(r)),t.safe=r=>t.check(Xd(r)),t.positive=r=>t.check(Yd(0,r)),t.nonnegative=r=>t.check(Za(0,r)),t.negative=r=>t.check(Jd(0,r)),t.nonpositive=r=>t.check(Ra(0,r)),t.multipleOf=(r,i)=>t.check(Gd(r,i)),t.step=(r,i)=>t.check(Gd(r,i)),t.finite=()=>t;const n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function ue(t){return Fw(Xm,t)}const _I=S("ZodNumberFormat",(t,e)=>{H0.init(t,e),Xm.init(t,e)});function Xd(t){return Vw(_I,t)}const kI=S("ZodBoolean",(t,e)=>{B0.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>mS(t,n,r)});function Ae(t){return Ww(kI,t)}const $I=S("ZodNull",(t,e)=>{q0.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>pS(t,n,r)});function Qm(t){return Hw($I,t)}const xI=S("ZodUnknown",(t,e)=>{J0.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>vS()});function xe(){return Bw(xI)}const wI=S("ZodNever",(t,e)=>{Y0.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>gS(t,n,r)});function SI(t){return qw(wI,t)}const II=S("ZodArray",(t,e)=>{G0.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>$S(t,n,r,i),t.element=e.element,t.min=(n,r)=>t.check(Gs(n,r)),t.nonempty=n=>t.check(Gs(1,n)),t.max=(n,r)=>t.check(Vm(n,r)),t.length=(n,r)=>t.check(Wm(n,r)),t.unwrap=()=>t.element});function Q(t,e){return sS(II,t,e)}const ep=S("ZodObject",(t,e)=>{X0.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>xS(t,n,r,i),se(t,"shape",()=>e.shape),t.keyof=()=>at(Object.keys(t._zod.def.shape)),t.catchall=n=>t.clone({...t._zod.def,catchall:n}),t.passthrough=()=>t.clone({...t._zod.def,catchall:xe()}),t.loose=()=>t.clone({...t._zod.def,catchall:xe()}),t.strict=()=>t.clone({...t._zod.def,catchall:SI()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>bx(t,n),t.safeExtend=n=>yx(t,n),t.merge=n=>_x(t,n),t.pick=n=>gx(t,n),t.omit=n=>vx(t,n),t.partial=(...n)=>kx(rp,t,n[0]),t.required=(...n)=>$x(sp,t,n[0])});function C(t,e){const n={type:"object",shape:t??{},...A(e)};return new ep(n)}function et(t,e){return new ep({type:"object",shape:t,catchall:xe(),...A(e)})}const tp=S("ZodUnion",(t,e)=>{Lm.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>wS(t,n,r,i),t.options=e.options});function pe(t,e){return new tp({type:"union",options:t,...A(e)})}const zI=S("ZodDiscriminatedUnion",(t,e)=>{tp.init(t,e),Q0.init(t,e)});function np(t,e,n){return new zI({type:"union",options:e,discriminator:t,...A(n)})}const OI=S("ZodIntersection",(t,e)=>{ew.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>SS(t,n,r,i)});function Gl(t,e){return new OI({type:"intersection",left:t,right:e})}const TI=S("ZodRecord",(t,e)=>{tw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>IS(t,n,r,i),t.keyType=e.keyType,t.valueType=e.valueType});function we(t,e,n){return new TI({type:"record",keyType:t,valueType:e,...A(n)})}const dl=S("ZodEnum",(t,e)=>{nw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(r,i,s)=>bS(t,r,i),t.enum=e.entries,t.options=Object.values(e.entries);const n=new Set(Object.keys(e.entries));t.extract=(r,i)=>{const s={};for(const o of r)if(n.has(o))s[o]=e.entries[o];else throw new Error(`Key ${o} not found in enum`);return new dl({...e,checks:[],...A(i),entries:s})},t.exclude=(r,i)=>{const s={...e.entries};for(const o of r)if(n.has(o))delete s[o];else throw new Error(`Key ${o} not found in enum`);return new dl({...e,checks:[],...A(i),entries:s})}});function at(t,e){const n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new dl({type:"enum",entries:n,...A(e)})}const DI=S("ZodLiteral",(t,e)=>{iw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>yS(t,n,r),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function R(t,e){return new DI({type:"literal",values:Array.isArray(t)?t:[t],...A(e)})}const PI=S("ZodTransform",(t,e)=>{rw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>kS(t,n),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new km(t.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(dr(s,n.value,e));else{const o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),n.issues.push(dr(o))}};const i=e.transform(n.value,n);return i instanceof Promise?i.then(s=>(n.value=s,n)):(n.value=i,n)}});function ip(t){return new PI({type:"transform",transform:t})}const rp=S("ZodOptional",(t,e)=>{Fm.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>Jm(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function Te(t){return new rp({type:"optional",innerType:t})}const EI=S("ZodExactOptional",(t,e)=>{sw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>Jm(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function MI(t){return new EI({type:"optional",innerType:t})}const NI=S("ZodNullable",(t,e)=>{ow.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>zS(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function Qd(t){return new NI({type:"nullable",innerType:t})}const CI=S("ZodDefault",(t,e)=>{aw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>TS(t,n,r,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function AI(t,e){return new CI({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():Sm(e)}})}const RI=S("ZodPrefault",(t,e)=>{lw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>DS(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function ZI(t,e){return new RI({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():Sm(e)}})}const sp=S("ZodNonOptional",(t,e)=>{uw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>OS(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function jI(t,e){return new sp({type:"nonoptional",innerType:t,...A(e)})}const UI=S("ZodCatch",(t,e)=>{cw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>PS(t,n,r,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function LI(t,e){return new UI({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const FI=S("ZodPipe",(t,e)=>{dw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>ES(t,n,r,i),t.in=e.in,t.out=e.out});function fl(t,e){return new FI({type:"pipe",in:t,out:e})}const VI=S("ZodReadonly",(t,e)=>{fw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>MS(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function WI(t){return new VI({type:"readonly",innerType:t})}const op=S("ZodCustom",(t,e)=>{hw.init(t,e),_e.init(t,e),t._zod.processJSONSchema=(n,r,i)=>_S(t,n)});function HI(t,e){return oS(op,t??(()=>!0),e)}function BI(t,e={}){return aS(op,t,e)}function qI(t){return lS(t)}function ap(t,e){return fl(ip(t),e)}const In="io.modelcontextprotocol/related-task",Do="2.0",Re=HI(t=>t!==null&&(typeof t=="object"||typeof t=="function")),lp=pe([x(),ue().int()]),up=x();et({ttl:pe([ue(),Qm()]).optional(),pollInterval:ue().optional()});const JI=C({ttl:ue().optional()}),YI=C({taskId:x()}),Kl=et({progressToken:lp.optional(),[In]:YI.optional()}),lt=C({_meta:Kl.optional()}),Tr=lt.extend({task:JI.optional()}),GI=t=>Tr.safeParse(t).success,Ze=C({method:x(),params:lt.loose().optional()}),yt=C({_meta:Kl.optional()}),_t=C({method:x(),params:yt.loose().optional()}),je=et({_meta:Kl.optional()}),Dr=pe([x(),ue().int()]),cp=C({jsonrpc:R(Do),id:Dr,...Ze.shape}).strict(),ef=t=>cp.safeParse(t).success,dp=C({jsonrpc:R(Do),..._t.shape}).strict(),KI=t=>dp.safeParse(t).success,Xl=C({jsonrpc:R(Do),id:Dr,result:je}).strict(),ys=t=>Xl.safeParse(t).success;var oe;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(oe||(oe={}));const Ql=C({jsonrpc:R(Do),id:Dr.optional(),error:C({code:ue().int(),message:x(),data:xe().optional()})}).strict(),XI=t=>Ql.safeParse(t).success,QI=pe([cp,dp,Xl,Ql]);pe([Xl,Ql]);const eu=je.strict(),ez=yt.extend({requestId:Dr.optional(),reason:x().optional()}),tu=_t.extend({method:R("notifications/cancelled"),params:ez}),tz=C({src:x(),mimeType:x().optional(),sizes:Q(x()).optional(),theme:at(["light","dark"]).optional()}),Pr=C({icons:Q(tz).optional()}),gi=C({name:x(),title:x().optional()}),Po=gi.extend({...gi.shape,...Pr.shape,version:x(),websiteUrl:x().optional(),description:x().optional()}),nz=Gl(C({applyDefaults:Ae().optional()}),we(x(),xe())),iz=ap(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,Gl(C({form:nz.optional(),url:Re.optional()}),we(x(),xe()).optional())),rz=et({list:Re.optional(),cancel:Re.optional(),requests:et({sampling:et({createMessage:Re.optional()}).optional(),elicitation:et({create:Re.optional()}).optional()}).optional()}),sz=et({list:Re.optional(),cancel:Re.optional(),requests:et({tools:et({call:Re.optional()}).optional()}).optional()}),oz=C({experimental:we(x(),Re).optional(),sampling:C({context:Re.optional(),tools:Re.optional()}).optional(),elicitation:iz.optional(),roots:C({listChanged:Ae().optional()}).optional(),tasks:rz.optional()}),az=lt.extend({protocolVersion:x(),capabilities:oz,clientInfo:Po}),lz=Ze.extend({method:R("initialize"),params:az}),uz=C({experimental:we(x(),Re).optional(),logging:Re.optional(),completions:Re.optional(),prompts:C({listChanged:Ae().optional()}).optional(),resources:C({subscribe:Ae().optional(),listChanged:Ae().optional()}).optional(),tools:C({listChanged:Ae().optional()}).optional(),tasks:sz.optional()}),cz=je.extend({protocolVersion:x(),capabilities:uz,serverInfo:Po,instructions:x().optional()}),dz=_t.extend({method:R("notifications/initialized"),params:yt.optional()}),Eo=Ze.extend({method:R("ping"),params:lt.optional()}),fz=C({progress:ue(),total:Te(ue()),message:Te(x())}),hz=C({...yt.shape,...fz.shape,progressToken:lp}),nu=_t.extend({method:R("notifications/progress"),params:hz}),mz=lt.extend({cursor:up.optional()}),Er=Ze.extend({params:mz.optional()}),Mr=je.extend({nextCursor:up.optional()}),pz=at(["working","input_required","completed","failed","cancelled"]),Nr=C({taskId:x(),status:pz,ttl:pe([ue(),Qm()]),createdAt:x(),lastUpdatedAt:x(),pollInterval:Te(ue()),statusMessage:Te(x())}),iu=je.extend({task:Nr}),gz=yt.merge(Nr),Xs=_t.extend({method:R("notifications/tasks/status"),params:gz}),ru=Ze.extend({method:R("tasks/get"),params:lt.extend({taskId:x()})}),su=je.merge(Nr),ou=Ze.extend({method:R("tasks/result"),params:lt.extend({taskId:x()})});je.loose();const au=Er.extend({method:R("tasks/list")}),lu=Mr.extend({tasks:Q(Nr)}),uu=Ze.extend({method:R("tasks/cancel"),params:lt.extend({taskId:x()})}),vz=je.merge(Nr),fp=C({uri:x(),mimeType:Te(x()),_meta:we(x(),xe()).optional()}),hp=fp.extend({text:x()}),cu=x().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),mp=fp.extend({blob:cu}),Cr=at(["user","assistant"]),Ti=C({audience:Q(Cr).optional(),priority:ue().min(0).max(1).optional(),lastModified:Gm({offset:!0}).optional()}),pp=C({...gi.shape,...Pr.shape,uri:x(),description:Te(x()),mimeType:Te(x()),annotations:Ti.optional(),_meta:Te(et({}))}),bz=C({...gi.shape,...Pr.shape,uriTemplate:x(),description:Te(x()),mimeType:Te(x()),annotations:Ti.optional(),_meta:Te(et({}))}),yz=Er.extend({method:R("resources/list")}),_z=Mr.extend({resources:Q(pp)}),kz=Er.extend({method:R("resources/templates/list")}),$z=Mr.extend({resourceTemplates:Q(bz)}),du=lt.extend({uri:x()}),xz=du,wz=Ze.extend({method:R("resources/read"),params:xz}),Sz=je.extend({contents:Q(pe([hp,mp]))}),Iz=_t.extend({method:R("notifications/resources/list_changed"),params:yt.optional()}),zz=du,Oz=Ze.extend({method:R("resources/subscribe"),params:zz}),Tz=du,Dz=Ze.extend({method:R("resources/unsubscribe"),params:Tz}),Pz=yt.extend({uri:x()}),Ez=_t.extend({method:R("notifications/resources/updated"),params:Pz}),Mz=C({name:x(),description:Te(x()),required:Te(Ae())}),Nz=C({...gi.shape,...Pr.shape,description:Te(x()),arguments:Te(Q(Mz)),_meta:Te(et({}))}),Cz=Er.extend({method:R("prompts/list")}),Az=Mr.extend({prompts:Q(Nz)}),Rz=lt.extend({name:x(),arguments:we(x(),x()).optional()}),Zz=Ze.extend({method:R("prompts/get"),params:Rz}),fu=C({type:R("text"),text:x(),annotations:Ti.optional(),_meta:we(x(),xe()).optional()}),hu=C({type:R("image"),data:cu,mimeType:x(),annotations:Ti.optional(),_meta:we(x(),xe()).optional()}),mu=C({type:R("audio"),data:cu,mimeType:x(),annotations:Ti.optional(),_meta:we(x(),xe()).optional()}),jz=C({type:R("tool_use"),name:x(),id:x(),input:we(x(),xe()),_meta:we(x(),xe()).optional()}),Uz=C({type:R("resource"),resource:pe([hp,mp]),annotations:Ti.optional(),_meta:we(x(),xe()).optional()}),Lz=pp.extend({type:R("resource_link")}),Ar=pe([fu,hu,mu,Lz,Uz]),Fz=C({role:Cr,content:Ar}),Vz=je.extend({description:x().optional(),messages:Q(Fz)}),Wz=_t.extend({method:R("notifications/prompts/list_changed"),params:yt.optional()}),Hz=C({title:x().optional(),readOnlyHint:Ae().optional(),destructiveHint:Ae().optional(),idempotentHint:Ae().optional(),openWorldHint:Ae().optional()}),Bz=C({taskSupport:at(["required","optional","forbidden"]).optional()}),pu=C({...gi.shape,...Pr.shape,description:x().optional(),inputSchema:C({type:R("object"),properties:we(x(),Re).optional(),required:Q(x()).optional()}).catchall(xe()),outputSchema:C({type:R("object"),properties:we(x(),Re).optional(),required:Q(x()).optional()}).catchall(xe()).optional(),annotations:Hz.optional(),execution:Bz.optional(),_meta:we(x(),xe()).optional()}),gp=Er.extend({method:R("tools/list")}),qz=Mr.extend({tools:Q(pu)}),Mo=je.extend({content:Q(Ar).default([]),structuredContent:we(x(),xe()).optional(),isError:Ae().optional()});Mo.or(je.extend({toolResult:xe()}));const Jz=Tr.extend({name:x(),arguments:we(x(),xe()).optional()}),vp=Ze.extend({method:R("tools/call"),params:Jz}),Yz=_t.extend({method:R("notifications/tools/list_changed"),params:yt.optional()});C({autoRefresh:Ae().default(!0),debounceMs:ue().int().nonnegative().default(300)});const bp=at(["debug","info","notice","warning","error","critical","alert","emergency"]),Gz=lt.extend({level:bp}),Kz=Ze.extend({method:R("logging/setLevel"),params:Gz}),Xz=yt.extend({level:bp,logger:x().optional(),data:xe()}),Qz=_t.extend({method:R("notifications/message"),params:Xz}),eO=C({name:x().optional()}),tO=C({hints:Q(eO).optional(),costPriority:ue().min(0).max(1).optional(),speedPriority:ue().min(0).max(1).optional(),intelligencePriority:ue().min(0).max(1).optional()}),nO=C({mode:at(["auto","required","none"]).optional()}),iO=C({type:R("tool_result"),toolUseId:x().describe("The unique identifier for the corresponding tool call."),content:Q(Ar).default([]),structuredContent:C({}).loose().optional(),isError:Ae().optional(),_meta:we(x(),xe()).optional()}),rO=np("type",[fu,hu,mu]),Qs=np("type",[fu,hu,mu,jz,iO]),sO=C({role:Cr,content:pe([Qs,Q(Qs)]),_meta:we(x(),xe()).optional()}),oO=Tr.extend({messages:Q(sO),modelPreferences:tO.optional(),systemPrompt:x().optional(),includeContext:at(["none","thisServer","allServers"]).optional(),temperature:ue().optional(),maxTokens:ue().int(),stopSequences:Q(x()).optional(),metadata:Re.optional(),tools:Q(pu).optional(),toolChoice:nO.optional()}),aO=Ze.extend({method:R("sampling/createMessage"),params:oO}),lO=je.extend({model:x(),stopReason:Te(at(["endTurn","stopSequence","maxTokens"]).or(x())),role:Cr,content:rO}),uO=je.extend({model:x(),stopReason:Te(at(["endTurn","stopSequence","maxTokens","toolUse"]).or(x())),role:Cr,content:pe([Qs,Q(Qs)])}),cO=C({type:R("boolean"),title:x().optional(),description:x().optional(),default:Ae().optional()}),dO=C({type:R("string"),title:x().optional(),description:x().optional(),minLength:ue().optional(),maxLength:ue().optional(),format:at(["email","uri","date","date-time"]).optional(),default:x().optional()}),fO=C({type:at(["number","integer"]),title:x().optional(),description:x().optional(),minimum:ue().optional(),maximum:ue().optional(),default:ue().optional()}),hO=C({type:R("string"),title:x().optional(),description:x().optional(),enum:Q(x()),default:x().optional()}),mO=C({type:R("string"),title:x().optional(),description:x().optional(),oneOf:Q(C({const:x(),title:x()})),default:x().optional()}),pO=C({type:R("string"),title:x().optional(),description:x().optional(),enum:Q(x()),enumNames:Q(x()).optional(),default:x().optional()}),gO=pe([hO,mO]),vO=C({type:R("array"),title:x().optional(),description:x().optional(),minItems:ue().optional(),maxItems:ue().optional(),items:C({type:R("string"),enum:Q(x())}),default:Q(x()).optional()}),bO=C({type:R("array"),title:x().optional(),description:x().optional(),minItems:ue().optional(),maxItems:ue().optional(),items:C({anyOf:Q(C({const:x(),title:x()}))}),default:Q(x()).optional()}),yO=pe([vO,bO]),_O=pe([pO,gO,yO]),kO=pe([_O,cO,dO,fO]),$O=Tr.extend({mode:R("form").optional(),message:x(),requestedSchema:C({type:R("object"),properties:we(x(),kO),required:Q(x()).optional()})}),xO=Tr.extend({mode:R("url"),message:x(),elicitationId:x(),url:x().url()}),wO=pe([$O,xO]),SO=Ze.extend({method:R("elicitation/create"),params:wO}),IO=yt.extend({elicitationId:x()}),zO=_t.extend({method:R("notifications/elicitation/complete"),params:IO}),OO=je.extend({action:at(["accept","decline","cancel"]),content:ap(t=>t===null?void 0:t,we(x(),pe([x(),ue(),Ae(),Q(x())])).optional())}),TO=C({type:R("ref/resource"),uri:x()}),DO=C({type:R("ref/prompt"),name:x()}),PO=lt.extend({ref:pe([DO,TO]),argument:C({name:x(),value:x()}),context:C({arguments:we(x(),x()).optional()}).optional()}),EO=Ze.extend({method:R("completion/complete"),params:PO}),MO=je.extend({completion:et({values:Q(x()).max(100),total:Te(ue().int()),hasMore:Te(Ae())})}),NO=C({uri:x().startsWith("file://"),name:x().optional(),_meta:we(x(),xe()).optional()}),CO=Ze.extend({method:R("roots/list"),params:lt.optional()}),AO=je.extend({roots:Q(NO)}),RO=_t.extend({method:R("notifications/roots/list_changed"),params:yt.optional()});pe([Eo,lz,EO,Kz,Zz,Cz,yz,kz,wz,Oz,Dz,vp,gp,ru,ou,au,uu]);pe([tu,nu,dz,RO,Xs]);pe([eu,lO,uO,OO,AO,su,lu,iu]);pe([Eo,aO,SO,CO,ru,ou,au,uu]);pe([tu,nu,Qz,Ez,Iz,Yz,Wz,Xs,zO]);pe([eu,cz,MO,Vz,Az,_z,$z,Sz,Mo,qz,su,lu,iu]);class ee extends Error{constructor(e,n,r){super(`MCP error ${e}: ${n}`),this.code=e,this.data=r,this.name="McpError"}static fromError(e,n,r){if(e===oe.UrlElicitationRequired&&r){const i=r;if(i.elicitations)return new ZO(i.elicitations,n)}return new ee(e,n,r)}}class ZO extends ee{constructor(e,n=`URL elicitation${e.length>1?"s":""} required`){super(oe.UrlElicitationRequired,n,{elicitations:e})}get elicitations(){var e;return((e=this.data)==null?void 0:e.elicitations)??[]}}function _n(t){return t==="completed"||t==="failed"||t==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function tf(t){const e=NS(t),n=e==null?void 0:e.method;if(!n)throw new Error("Schema is missing a method literal");const r=CS(n);if(typeof r!="string")throw new Error("Schema method literal must be a string");return r}function nf(t,e){const n=Ym(t,e);if(!n.success)throw n.error;return n.data}const jO=6e4;class UO{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(tu,n=>{this._oncancel(n)}),this.setNotificationHandler(nu,n=>{this._onprogress(n)}),this.setRequestHandler(Eo,n=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(ru,async(n,r)=>{const i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new ee(oe.InvalidParams,"Failed to retrieve task: Task not found");return{...i}}),this.setRequestHandler(ou,async(n,r)=>{const i=async()=>{var a;const s=n.params.taskId;if(this._taskMessageQueue){let l;for(;l=await this._taskMessageQueue.dequeue(s,r.sessionId);){if(l.type==="response"||l.type==="error"){const u=l.message,c=u.id,d=this._requestResolvers.get(c);if(d)if(this._requestResolvers.delete(c),l.type==="response")d(u);else{const f=u,h=new ee(f.error.code,f.error.message,f.error.data);d(h)}else{const f=l.type==="response"?"Response":"Error";this._onerror(new Error(`${f} handler missing for request ${c}`))}continue}await((a=this._transport)==null?void 0:a.send(l.message,{relatedRequestId:r.requestId}))}}const o=await this._taskStore.getTask(s,r.sessionId);if(!o)throw new ee(oe.InvalidParams,`Task not found: ${s}`);if(!_n(o.status))return await this._waitForTaskUpdate(s,r.signal),await i();if(_n(o.status)){const l=await this._taskStore.getTaskResult(s,r.sessionId);return this._clearTaskQueue(s),{...l,_meta:{...l._meta,[In]:{taskId:s}}}}return await i()};return await i()}),this.setRequestHandler(au,async(n,r)=>{var i;try{const{tasks:s,nextCursor:o}=await this._taskStore.listTasks((i=n.params)==null?void 0:i.cursor,r.sessionId);return{tasks:s,nextCursor:o,_meta:{}}}catch(s){throw new ee(oe.InvalidParams,`Failed to list tasks: ${s instanceof Error?s.message:String(s)}`)}}),this.setRequestHandler(uu,async(n,r)=>{try{const i=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!i)throw new ee(oe.InvalidParams,`Task not found: ${n.params.taskId}`);if(_n(i.status))throw new ee(oe.InvalidParams,`Cannot cancel task in terminal status: ${i.status}`);await this._taskStore.updateTaskStatus(n.params.taskId,"cancelled","Client cancelled task execution.",r.sessionId),this._clearTaskQueue(n.params.taskId);const s=await this._taskStore.getTask(n.params.taskId,r.sessionId);if(!s)throw new ee(oe.InvalidParams,`Task not found after cancellation: ${n.params.taskId}`);return{_meta:{},...s}}catch(i){throw i instanceof ee?i:new ee(oe.InvalidRequest,`Failed to cancel task: ${i instanceof Error?i.message:String(i)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;const n=this._requestHandlerAbortControllers.get(e.params.requestId);n==null||n.abort(e.params.reason)}_setupTimeout(e,n,r,i,s=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,n),startTime:Date.now(),timeout:n,maxTotalTimeout:r,resetTimeoutOnProgress:s,onTimeout:i})}_resetTimeout(e){const n=this._timeoutInfo.get(e);if(!n)return!1;const r=Date.now()-n.startTime;if(n.maxTotalTimeout&&r>=n.maxTotalTimeout)throw this._timeoutInfo.delete(e),ee.fromError(oe.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:n.maxTotalTimeout,totalElapsed:r});return clearTimeout(n.timeoutId),n.timeoutId=setTimeout(n.onTimeout,n.timeout),!0}_cleanupTimeout(e){const n=this._timeoutInfo.get(e);n&&(clearTimeout(n.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var s,o,a;if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const n=(s=this.transport)==null?void 0:s.onclose;this._transport.onclose=()=>{n==null||n(),this._onclose()};const r=(o=this.transport)==null?void 0:o.onerror;this._transport.onerror=l=>{r==null||r(l),this._onerror(l)};const i=(a=this._transport)==null?void 0:a.onmessage;this._transport.onmessage=(l,u)=>{i==null||i(l,u),ys(l)||XI(l)?this._onresponse(l):ef(l)?this._onrequest(l,u):KI(l)?this._onnotification(l):this._onerror(new Error(`Unknown message type: ${JSON.stringify(l)}`))},await this._transport.start()}_onclose(){var r;const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const i of this._requestHandlerAbortControllers.values())i.abort();this._requestHandlerAbortControllers.clear();const n=ee.fromError(oe.ConnectionClosed,"Connection closed");this._transport=void 0,(r=this.onclose)==null||r.call(this);for(const i of e.values())i(n)}_onerror(e){var n;(n=this.onerror)==null||n.call(this,e)}_onnotification(e){const n=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;n!==void 0&&Promise.resolve().then(()=>n(e)).catch(r=>this._onerror(new Error(`Uncaught error in notification handler: ${r}`)))}_onrequest(e,n){var c,d,f,h;const r=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,i=this._transport,s=(f=(d=(c=e.params)==null?void 0:c._meta)==null?void 0:d[In])==null?void 0:f.taskId;if(r===void 0){const m={jsonrpc:"2.0",id:e.id,error:{code:oe.MethodNotFound,message:"Method not found"}};s&&this._taskMessageQueue?this._enqueueTaskMessage(s,{type:"error",message:m,timestamp:Date.now()},i==null?void 0:i.sessionId).catch(p=>this._onerror(new Error(`Failed to enqueue error response: ${p}`))):i==null||i.send(m).catch(p=>this._onerror(new Error(`Failed to send an error response: ${p}`)));return}const o=new AbortController;this._requestHandlerAbortControllers.set(e.id,o);const a=GI(e.params)?e.params.task:void 0,l=this._taskStore?this.requestTaskStore(e,i==null?void 0:i.sessionId):void 0,u={signal:o.signal,sessionId:i==null?void 0:i.sessionId,_meta:(h=e.params)==null?void 0:h._meta,sendNotification:async m=>{if(o.signal.aborted)return;const p={relatedRequestId:e.id};s&&(p.relatedTask={taskId:s}),await this.notification(m,p)},sendRequest:async(m,p,g)=>{var $;if(o.signal.aborted)throw new ee(oe.ConnectionClosed,"Request was cancelled");const b={...g,relatedRequestId:e.id};s&&!b.relatedTask&&(b.relatedTask={taskId:s});const k=(($=b.relatedTask)==null?void 0:$.taskId)??s;return k&&l&&await l.updateTaskStatus(k,"input_required"),await this.request(m,p,b)},authInfo:n==null?void 0:n.authInfo,requestId:e.id,requestInfo:n==null?void 0:n.requestInfo,taskId:s,taskStore:l,taskRequestedTtl:a==null?void 0:a.ttl,closeSSEStream:n==null?void 0:n.closeSSEStream,closeStandaloneSSEStream:n==null?void 0:n.closeStandaloneSSEStream};Promise.resolve().then(()=>{a&&this.assertTaskHandlerCapability(e.method)}).then(()=>r(e,u)).then(async m=>{if(o.signal.aborted)return;const p={result:m,jsonrpc:"2.0",id:e.id};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"response",message:p,timestamp:Date.now()},i==null?void 0:i.sessionId):await(i==null?void 0:i.send(p))},async m=>{if(o.signal.aborted)return;const p={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(m.code)?m.code:oe.InternalError,message:m.message??"Internal error",...m.data!==void 0&&{data:m.data}}};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"error",message:p,timestamp:Date.now()},i==null?void 0:i.sessionId):await(i==null?void 0:i.send(p))}).catch(m=>this._onerror(new Error(`Failed to send response: ${m}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:n,...r}=e.params,i=Number(n),s=this._progressHandlers.get(i);if(!s){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const o=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&o&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(l){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),o(l);return}s(r)}_onresponse(e){const n=Number(e.id),r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),ys(e))r(e);else{const o=new ee(e.error.code,e.error.message,e.error.data);r(o)}return}const i=this._responseHandlers.get(n);if(i===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(n),this._cleanupTimeout(n);let s=!1;if(ys(e)&&e.result&&typeof e.result=="object"){const o=e.result;if(o.task&&typeof o.task=="object"){const a=o.task;typeof a.taskId=="string"&&(s=!0,this._taskProgressTokens.set(a.taskId,n))}}if(s||this._progressHandlers.delete(n),ys(e))i(e);else{const o=ee.fromError(e.error.code,e.error.message,e.error.data);i(o)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)==null?void 0:e.close())}async*requestStream(e,n,r){var o,a;const{task:i}=r??{};if(!i){try{yield{type:"result",result:await this.request(e,n,r)}}catch(l){yield{type:"error",error:l instanceof ee?l:new ee(oe.InternalError,String(l))}}return}let s;try{const l=await this.request(e,iu,r);if(l.task)s=l.task.taskId,yield{type:"taskCreated",task:l.task};else throw new ee(oe.InternalError,"Task creation did not return a task");for(;;){const u=await this.getTask({taskId:s},r);if(yield{type:"taskStatus",task:u},_n(u.status)){u.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:s},n,r)}:u.status==="failed"?yield{type:"error",error:new ee(oe.InternalError,`Task ${s} failed`)}:u.status==="cancelled"&&(yield{type:"error",error:new ee(oe.InternalError,`Task ${s} was cancelled`)});return}if(u.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:s},n,r)};return}const c=u.pollInterval??((o=this._options)==null?void 0:o.defaultTaskPollInterval)??1e3;await new Promise(d=>setTimeout(d,c)),(a=r==null?void 0:r.signal)==null||a.throwIfAborted()}}catch(l){yield{type:"error",error:l instanceof ee?l:new ee(oe.InternalError,String(l))}}}request(e,n,r){const{relatedRequestId:i,resumptionToken:s,onresumptiontoken:o,task:a,relatedTask:l}=r??{};return new Promise((u,c)=>{var k,$,w,_,I;const d=z=>{c(z)};if(!this._transport){d(new Error("Not connected"));return}if(((k=this._options)==null?void 0:k.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(e.method),a&&this.assertTaskCapability(e.method)}catch(z){d(z);return}($=r==null?void 0:r.signal)==null||$.throwIfAborted();const f=this._requestMessageId++,h={...e,jsonrpc:"2.0",id:f};r!=null&&r.onprogress&&(this._progressHandlers.set(f,r.onprogress),h.params={...e.params,_meta:{...((w=e.params)==null?void 0:w._meta)||{},progressToken:f}}),a&&(h.params={...h.params,task:a}),l&&(h.params={...h.params,_meta:{...((_=h.params)==null?void 0:_._meta)||{},[In]:l}});const m=z=>{var E;this._responseHandlers.delete(f),this._progressHandlers.delete(f),this._cleanupTimeout(f),(E=this._transport)==null||E.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:f,reason:String(z)}},{relatedRequestId:i,resumptionToken:s,onresumptiontoken:o}).catch(Z=>this._onerror(new Error(`Failed to send cancellation: ${Z}`)));const O=z instanceof ee?z:new ee(oe.RequestTimeout,String(z));c(O)};this._responseHandlers.set(f,z=>{var O;if(!((O=r==null?void 0:r.signal)!=null&&O.aborted)){if(z instanceof Error)return c(z);try{const E=Ym(n,z.result);E.success?u(E.data):c(E.error)}catch(E){c(E)}}}),(I=r==null?void 0:r.signal)==null||I.addEventListener("abort",()=>{var z;m((z=r==null?void 0:r.signal)==null?void 0:z.reason)});const p=(r==null?void 0:r.timeout)??jO,g=()=>m(ee.fromError(oe.RequestTimeout,"Request timed out",{timeout:p}));this._setupTimeout(f,p,r==null?void 0:r.maxTotalTimeout,g,(r==null?void 0:r.resetTimeoutOnProgress)??!1);const b=l==null?void 0:l.taskId;if(b){const z=O=>{const E=this._responseHandlers.get(f);E?E(O):this._onerror(new Error(`Response handler missing for side-channeled request ${f}`))};this._requestResolvers.set(f,z),this._enqueueTaskMessage(b,{type:"request",message:h,timestamp:Date.now()}).catch(O=>{this._cleanupTimeout(f),c(O)})}else this._transport.send(h,{relatedRequestId:i,resumptionToken:s,onresumptiontoken:o}).catch(z=>{this._cleanupTimeout(f),c(z)})})}async getTask(e,n){return this.request({method:"tasks/get",params:e},su,n)}async getTaskResult(e,n,r){return this.request({method:"tasks/result",params:e},n,r)}async listTasks(e,n){return this.request({method:"tasks/list",params:e},lu,n)}async cancelTask(e,n){return this.request({method:"tasks/cancel",params:e},vz,n)}async notification(e,n){var a,l,u,c;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const r=(a=n==null?void 0:n.relatedTask)==null?void 0:a.taskId;if(r){const d={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...((l=e.params)==null?void 0:l._meta)||{},[In]:n.relatedTask}}};await this._enqueueTaskMessage(r,{type:"notification",message:d,timestamp:Date.now()});return}if((((u=this._options)==null?void 0:u.debouncedNotificationMethods)??[]).includes(e.method)&&!e.params&&!(n!=null&&n.relatedRequestId)&&!(n!=null&&n.relatedTask)){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var f,h;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let d={...e,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(d={...d,params:{...d.params,_meta:{...((f=d.params)==null?void 0:f._meta)||{},[In]:n.relatedTask}}}),(h=this._transport)==null||h.send(d,n).catch(m=>this._onerror(m))});return}let o={...e,jsonrpc:"2.0"};n!=null&&n.relatedTask&&(o={...o,params:{...o.params,_meta:{...((c=o.params)==null?void 0:c._meta)||{},[In]:n.relatedTask}}}),await this._transport.send(o,n)}setRequestHandler(e,n){const r=tf(e);this.assertRequestHandlerCapability(r),this._requestHandlers.set(r,(i,s)=>{const o=nf(e,i);return Promise.resolve(n(o,s))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,n){const r=tf(e);this._notificationHandlers.set(r,i=>{const s=nf(e,i);return Promise.resolve(n(s))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const n=this._taskProgressTokens.get(e);n!==void 0&&(this._progressHandlers.delete(n),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,n,r){var s;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const i=(s=this._options)==null?void 0:s.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,n,r,i)}async _clearTaskQueue(e,n){if(this._taskMessageQueue){const r=await this._taskMessageQueue.dequeueAll(e,n);for(const i of r)if(i.type==="request"&&ef(i.message)){const s=i.message.id,o=this._requestResolvers.get(s);o?(o(new ee(oe.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(s)):this._onerror(new Error(`Resolver missing for request ${s} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,n){var i,s;let r=((i=this._options)==null?void 0:i.defaultTaskPollInterval)??1e3;try{const o=await((s=this._taskStore)==null?void 0:s.getTask(e));o!=null&&o.pollInterval&&(r=o.pollInterval)}catch{}return new Promise((o,a)=>{if(n.aborted){a(new ee(oe.InvalidRequest,"Request cancelled"));return}const l=setTimeout(o,r);n.addEventListener("abort",()=>{clearTimeout(l),a(new ee(oe.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,n){const r=this._taskStore;if(!r)throw new Error("No task store configured");return{createTask:async i=>{if(!e)throw new Error("No request provided");return await r.createTask(i,e.id,{method:e.method,params:e.params},n)},getTask:async i=>{const s=await r.getTask(i,n);if(!s)throw new ee(oe.InvalidParams,"Failed to retrieve task: Task not found");return s},storeTaskResult:async(i,s,o)=>{await r.storeTaskResult(i,s,o,n);const a=await r.getTask(i,n);if(a){const l=Xs.parse({method:"notifications/tasks/status",params:a});await this.notification(l),_n(a.status)&&this._cleanupTaskProgressHandler(i)}},getTaskResult:i=>r.getTaskResult(i,n),updateTaskStatus:async(i,s,o)=>{const a=await r.getTask(i,n);if(!a)throw new ee(oe.InvalidParams,`Task "${i}" not found - it may have been cleaned up`);if(_n(a.status))throw new ee(oe.InvalidParams,`Cannot update task "${i}" from terminal status "${a.status}" to "${s}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await r.updateTaskStatus(i,s,o,n);const l=await r.getTask(i,n);if(l){const u=Xs.parse({method:"notifications/tasks/status",params:l});await this.notification(u),_n(l.status)&&this._cleanupTaskProgressHandler(i)}},listTasks:i=>r.listTasks(i,n)}}}var LO=Object.defineProperty,qt=(t,e)=>{for(var n in e)LO(t,n,{get:e[n],enumerable:!0,configurable:!0,set:r=>e[n]=()=>r})};class FO{constructor(e=window.parent,n){D(this,"eventTarget");D(this,"eventSource");D(this,"messageListener");D(this,"onclose");D(this,"onerror");D(this,"onmessage");D(this,"sessionId");D(this,"setProtocolVersion");this.eventTarget=e,this.eventSource=n,this.messageListener=r=>{var s,o;if(n&&r.source!==this.eventSource){console.debug("Ignoring message from unknown source",r);return}let i=QI.safeParse(r.data);i.success?(console.debug("Parsed message",i.data),(s=this.onmessage)==null||s.call(this,i.data)):(console.error("Failed to parse message",i.error.message,r),(o=this.onerror)==null||o.call(this,Error("Invalid JSON-RPC message received: "+i.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,n){console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){var e;window.removeEventListener("message",this.messageListener),(e=this.onclose)==null||e.call(this)}}var VO="2026-01-26",v={};qt(v,{xor:()=>C_,xid:()=>r_,void:()=>T_,uuidv7:()=>Gy,uuidv6:()=>Yy,uuidv4:()=>Jy,uuid:()=>qy,util:()=>G,url:()=>Ky,uppercase:()=>Fo,unknown:()=>Zn,union:()=>ba,undefined:()=>z_,ulid:()=>i_,uint64:()=>S_,uint32:()=>$_,tuple:()=>Rc,trim:()=>Jo,treeifyError:()=>Mp,transform:()=>_a,toUpperCase:()=>Go,toLowerCase:()=>Yo,toJSONSchema:()=>Sy,templateLiteral:()=>J_,symbol:()=>I_,superRefine:()=>cd,success:()=>H_,stringbool:()=>tk,stringFormat:()=>p_,string:()=>oo,strictObject:()=>M_,startsWith:()=>Wo,slugify:()=>Ko,size:()=>Br,setErrorMap:()=>cP,set:()=>U_,safeParseAsync:()=>Ay,safeParse:()=>Cy,safeEncodeAsync:()=>Vy,safeEncode:()=>Ly,safeDecodeAsync:()=>Wy,safeDecode:()=>Fy,registry:()=>Lu,regexes:()=>Wn,regex:()=>Uo,refine:()=>ud,record:()=>Zc,readonly:()=>id,property:()=>fc,promise:()=>Y_,prettifyError:()=>Cp,preprocess:()=>ik,prefault:()=>Gc,positive:()=>lc,pipe:()=>gr,partialRecord:()=>R_,parseAsync:()=>Ny,parse:()=>My,overwrite:()=>Yt,optional:()=>mr,object:()=>E_,number:()=>kc,nullish:()=>W_,nullable:()=>pr,null:()=>Ic,normalize:()=>qo,nonpositive:()=>cc,nonoptional:()=>Kc,nonnegative:()=>dc,never:()=>ga,negative:()=>uc,nativeEnum:()=>L_,nanoid:()=>e_,nan:()=>B_,multipleOf:()=>yi,minSize:()=>hn,minLength:()=>Rn,mime:()=>Bo,meta:()=>Q_,maxSize:()=>Di,maxLength:()=>qr,map:()=>j_,mac:()=>a_,lte:()=>gt,lt:()=>dn,lowercase:()=>Lo,looseRecord:()=>Z_,looseObject:()=>N_,locales:()=>Uu,literal:()=>F_,length:()=>Jr,lazy:()=>od,ksuid:()=>s_,keyof:()=>P_,jwt:()=>m_,json:()=>nk,iso:()=>pc,ipv6:()=>l_,ipv4:()=>o_,intersection:()=>Cc,int64:()=>w_,int32:()=>k_,int:()=>ao,instanceof:()=>ek,includes:()=>Vo,httpUrl:()=>Xy,hostname:()=>g_,hex:()=>v_,hash:()=>b_,guid:()=>By,gte:()=>Xe,gt:()=>fn,globalRegistry:()=>ht,getErrorMap:()=>dP,function:()=>lo,fromJSONSchema:()=>pP,formatError:()=>_u,float64:()=>__,float32:()=>y_,flattenError:()=>yu,file:()=>V_,exactOptional:()=>Hc,enum:()=>ya,endsWith:()=>Ho,encodeAsync:()=>jy,encode:()=>Ry,emoji:()=>Qy,email:()=>Hy,e164:()=>h_,discriminatedUnion:()=>A_,describe:()=>X_,decodeAsync:()=>Uy,decode:()=>Zy,date:()=>D_,custom:()=>K_,cuid2:()=>n_,cuid:()=>t_,core:()=>yp,config:()=>Be,coerce:()=>sk,codec:()=>q_,clone:()=>kt,cidrv6:()=>c_,cidrv4:()=>u_,check:()=>G_,catch:()=>ed,boolean:()=>$c,bigint:()=>x_,base64url:()=>f_,base64:()=>d_,array:()=>ts,any:()=>O_,_function:()=>lo,_default:()=>Jc,_ZodString:()=>Xo,ZodXor:()=>Ec,ZodXID:()=>sa,ZodVoid:()=>Dc,ZodUnknown:()=>Oc,ZodUnion:()=>is,ZodUndefined:()=>wc,ZodUUID:()=>Mt,ZodURL:()=>Kr,ZodULID:()=>ra,ZodType:()=>J,ZodTuple:()=>Ac,ZodTransform:()=>Vc,ZodTemplateLiteral:()=>rd,ZodSymbol:()=>xc,ZodSuccess:()=>Xc,ZodStringFormat:()=>he,ZodString:()=>Gr,ZodSet:()=>Uc,ZodRecord:()=>rs,ZodRealError:()=>ct,ZodReadonly:()=>nd,ZodPromise:()=>ad,ZodPrefault:()=>Yc,ZodPipe:()=>xa,ZodOptional:()=>ka,ZodObject:()=>ns,ZodNumberFormat:()=>Hn,ZodNumber:()=>Xr,ZodNullable:()=>Bc,ZodNull:()=>Sc,ZodNonOptional:()=>$a,ZodNever:()=>Tc,ZodNanoID:()=>ta,ZodNaN:()=>td,ZodMap:()=>jc,ZodMAC:()=>_c,ZodLiteral:()=>Lc,ZodLazy:()=>sd,ZodKSUID:()=>oa,ZodJWT:()=>ma,ZodIssueCode:()=>uP,ZodIntersection:()=>Nc,ZodISOTime:()=>bc,ZodISODuration:()=>yc,ZodISODateTime:()=>gc,ZodISODate:()=>vc,ZodIPv6:()=>la,ZodIPv4:()=>aa,ZodGUID:()=>hr,ZodFunction:()=>ld,ZodFirstPartyTypeKind:()=>bl,ZodFile:()=>Fc,ZodExactOptional:()=>Wc,ZodError:()=>lP,ZodEnum:()=>xi,ZodEmoji:()=>ea,ZodEmail:()=>Qo,ZodE164:()=>ha,ZodDiscriminatedUnion:()=>Mc,ZodDefault:()=>qc,ZodDate:()=>va,ZodCustomStringFormat:()=>Pi,ZodCustom:()=>ss,ZodCodec:()=>wa,ZodCatch:()=>Qc,ZodCUID2:()=>ia,ZodCUID:()=>na,ZodCIDRv6:()=>ca,ZodCIDRv4:()=>ua,ZodBoolean:()=>Qr,ZodBigIntFormat:()=>pa,ZodBigInt:()=>es,ZodBase64URL:()=>fa,ZodBase64:()=>da,ZodArray:()=>Pc,ZodAny:()=>zc,TimePrecision:()=>rb,NEVER:()=>_p,$output:()=>Xv,$input:()=>Qv,$brand:()=>kp});var yp={};qt(yp,{version:()=>Cg,util:()=>G,treeifyError:()=>Mp,toJSONSchema:()=>Sy,toDotPath:()=>Np,safeParseAsync:()=>Rp,safeParse:()=>Ap,safeEncodeAsync:()=>$1,safeEncode:()=>_1,safeDecodeAsync:()=>x1,safeDecode:()=>k1,registry:()=>Lu,regexes:()=>Wn,process:()=>ce,prettifyError:()=>Cp,parseAsync:()=>pl,parse:()=>ml,meta:()=>jb,locales:()=>Uu,isValidJWT:()=>ov,isValidBase64URL:()=>iv,isValidBase64:()=>Mu,initializeContext:()=>_i,globalRegistry:()=>ht,globalConfig:()=>eo,formatError:()=>_u,flattenError:()=>yu,finalize:()=>$i,extractDefs:()=>ki,encodeAsync:()=>b1,encode:()=>g1,describe:()=>Zb,decodeAsync:()=>y1,decode:()=>v1,createToJSONSchemaMethod:()=>Lb,createStandardJSONSchemaMethod:()=>fr,config:()=>Be,clone:()=>kt,_xor:()=>RD,_xid:()=>Xu,_void:()=>Ob,_uuidv7:()=>Bu,_uuidv6:()=>Hu,_uuidv4:()=>Wu,_uuid:()=>Vu,_url:()=>jo,_uppercase:()=>Fo,_unknown:()=>Ib,_union:()=>AD,_undefined:()=>xb,_ulid:()=>Ku,_uint64:()=>kb,_uint32:()=>pb,_tuple:()=>UD,_trim:()=>Jo,_transform:()=>qD,_toUpperCase:()=>Go,_toLowerCase:()=>Yo,_templateLiteral:()=>nP,_symbol:()=>$b,_superRefine:()=>Ab,_success:()=>XD,_stringbool:()=>Ub,_stringFormat:()=>Yr,_string:()=>tb,_startsWith:()=>Wo,_slugify:()=>Ko,_size:()=>Br,_set:()=>VD,_safeParseAsync:()=>Lr,_safeParse:()=>Ur,_safeEncodeAsync:()=>zu,_safeEncode:()=>Su,_safeDecodeAsync:()=>Ou,_safeDecode:()=>Iu,_regex:()=>Uo,_refine:()=>Cb,_record:()=>LD,_readonly:()=>tP,_property:()=>fc,_promise:()=>rP,_positive:()=>lc,_pipe:()=>eP,_parseAsync:()=>jr,_parse:()=>Zr,_overwrite:()=>Yt,_optional:()=>JD,_number:()=>ub,_nullable:()=>YD,_null:()=>wb,_normalize:()=>qo,_nonpositive:()=>cc,_nonoptional:()=>KD,_nonnegative:()=>dc,_never:()=>zb,_negative:()=>uc,_nativeEnum:()=>HD,_nanoid:()=>Ju,_nan:()=>Pb,_multipleOf:()=>yi,_minSize:()=>hn,_minLength:()=>Rn,_min:()=>Xe,_mime:()=>Bo,_maxSize:()=>Di,_maxLength:()=>qr,_max:()=>gt,_map:()=>FD,_mac:()=>ib,_lte:()=>gt,_lt:()=>dn,_lowercase:()=>Lo,_literal:()=>BD,_length:()=>Jr,_lazy:()=>iP,_ksuid:()=>Qu,_jwt:()=>ac,_isoTime:()=>ab,_isoDuration:()=>lb,_isoDateTime:()=>sb,_isoDate:()=>ob,_ipv6:()=>tc,_ipv4:()=>ec,_intersection:()=>jD,_int64:()=>_b,_int32:()=>mb,_int:()=>db,_includes:()=>Vo,_guid:()=>so,_gte:()=>Xe,_gt:()=>fn,_float64:()=>hb,_float32:()=>fb,_file:()=>Mb,_enum:()=>WD,_endsWith:()=>Ho,_encodeAsync:()=>xu,_encode:()=>ku,_emoji:()=>qu,_email:()=>Fu,_e164:()=>oc,_discriminatedUnion:()=>ZD,_default:()=>GD,_decodeAsync:()=>wu,_decode:()=>$u,_date:()=>Tb,_custom:()=>Nb,_cuid2:()=>Gu,_cuid:()=>Yu,_coercedString:()=>nb,_coercedNumber:()=>cb,_coercedDate:()=>Db,_coercedBoolean:()=>vb,_coercedBigint:()=>yb,_cidrv6:()=>ic,_cidrv4:()=>nc,_check:()=>Rb,_catch:()=>QD,_boolean:()=>gb,_bigint:()=>bb,_base64url:()=>sc,_base64:()=>rc,_array:()=>Eb,_any:()=>Sb,TimePrecision:()=>rb,NEVER:()=>_p,JSONSchemaGenerator:()=>oP,JSONSchema:()=>aP,Doc:()=>Ng,$output:()=>Xv,$input:()=>Qv,$constructor:()=>y,$brand:()=>kp,$ZodXor:()=>wv,$ZodXID:()=>Hg,$ZodVoid:()=>vv,$ZodUnknown:()=>pv,$ZodUnion:()=>Zo,$ZodUndefined:()=>fv,$ZodUUID:()=>Rg,$ZodURL:()=>jg,$ZodULID:()=>Wg,$ZodType:()=>H,$ZodTuple:()=>Ru,$ZodTransform:()=>Mv,$ZodTemplateLiteral:()=>Wv,$ZodSymbol:()=>dv,$ZodSuccess:()=>jv,$ZodStringFormat:()=>fe,$ZodString:()=>Hr,$ZodSet:()=>Tv,$ZodRegistry:()=>eb,$ZodRecord:()=>zv,$ZodRealError:()=>ut,$ZodReadonly:()=>Vv,$ZodPromise:()=>Bv,$ZodPrefault:()=>Rv,$ZodPipe:()=>Fv,$ZodOptional:()=>Zu,$ZodObjectJIT:()=>xv,$ZodObject:()=>$v,$ZodNumberFormat:()=>uv,$ZodNumber:()=>Nu,$ZodNullable:()=>Cv,$ZodNull:()=>hv,$ZodNonOptional:()=>Zv,$ZodNever:()=>gv,$ZodNanoID:()=>Lg,$ZodNaN:()=>Lv,$ZodMap:()=>Ov,$ZodMAC:()=>Qg,$ZodLiteral:()=>Pv,$ZodLazy:()=>qv,$ZodKSUID:()=>Bg,$ZodJWT:()=>av,$ZodIntersection:()=>Iv,$ZodISOTime:()=>Yg,$ZodISODuration:()=>Gg,$ZodISODateTime:()=>qg,$ZodISODate:()=>Jg,$ZodIPv6:()=>Xg,$ZodIPv4:()=>Kg,$ZodGUID:()=>Ag,$ZodFunction:()=>Hv,$ZodFile:()=>Ev,$ZodExactOptional:()=>Nv,$ZodError:()=>bu,$ZodEnum:()=>Dv,$ZodEncodeError:()=>No,$ZodEmoji:()=>Ug,$ZodEmail:()=>Zg,$ZodE164:()=>sv,$ZodDiscriminatedUnion:()=>Sv,$ZodDefault:()=>Av,$ZodDate:()=>bv,$ZodCustomStringFormat:()=>lv,$ZodCustom:()=>Jv,$ZodCodec:()=>ju,$ZodCheckUpperCase:()=>zg,$ZodCheckStringFormat:()=>Wr,$ZodCheckStartsWith:()=>Tg,$ZodCheckSizeEquals:()=>kg,$ZodCheckRegex:()=>Sg,$ZodCheckProperty:()=>Pg,$ZodCheckOverwrite:()=>Mg,$ZodCheckNumberFormat:()=>vg,$ZodCheckMultipleOf:()=>gg,$ZodCheckMinSize:()=>_g,$ZodCheckMinLength:()=>xg,$ZodCheckMimeType:()=>Eg,$ZodCheckMaxSize:()=>yg,$ZodCheckMaxLength:()=>$g,$ZodCheckLowerCase:()=>Ig,$ZodCheckLessThan:()=>Pu,$ZodCheckLengthEquals:()=>wg,$ZodCheckIncludes:()=>Og,$ZodCheckGreaterThan:()=>Eu,$ZodCheckEndsWith:()=>Dg,$ZodCheckBigIntFormat:()=>bg,$ZodCheck:()=>ke,$ZodCatch:()=>Uv,$ZodCUID2:()=>Vg,$ZodCUID:()=>Fg,$ZodCIDRv6:()=>tv,$ZodCIDRv4:()=>ev,$ZodBoolean:()=>Cu,$ZodBigIntFormat:()=>cv,$ZodBigInt:()=>Au,$ZodBase64URL:()=>rv,$ZodBase64:()=>nv,$ZodAsyncError:()=>Mn,$ZodArray:()=>yv,$ZodAny:()=>mv});var _p=Object.freeze({status:"aborted"});function y(t,e,n){function r(a,l){if(a._zod||Object.defineProperty(a,"_zod",{value:{def:l,constr:o,traits:new Set},enumerable:!1}),a._zod.traits.has(t))return;a._zod.traits.add(t),e(a,l);let u=o.prototype,c=Object.keys(u);for(let d=0;d<c.length;d++){let f=c[d];f in a||(a[f]=u[f].bind(a))}}let i=(n==null?void 0:n.Parent)??Object;class s extends i{}Object.defineProperty(s,"name",{value:t});function o(a){var l;let u=n!=null&&n.Parent?new s:this;r(u,a),(l=u._zod).deferred??(l.deferred=[]);for(let c of u._zod.deferred)c();return u}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:a=>{var l,u;return n!=null&&n.Parent&&a instanceof n.Parent?!0:(u=(l=a==null?void 0:a._zod)==null?void 0:l.traits)==null?void 0:u.has(t)}}),Object.defineProperty(o,"name",{value:t}),o}var kp=Symbol("zod_brand");class Mn extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class No extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}var eo={};function Be(t){return t&&Object.assign(eo,t),eo}var G={};qt(G,{unwrapMessage:()=>Ki,uint8ArrayToHex:()=>m1,uint8ArrayToBase64url:()=>f1,uint8ArrayToBase64:()=>Pp,stringifyPrimitive:()=>F,slugify:()=>xp,shallowClone:()=>Sp,safeExtend:()=>o1,required:()=>u1,randomString:()=>QO,propertyKeyTypes:()=>no,promiseAllObject:()=>XO,primitiveTypes:()=>Ip,prefixIssues:()=>St,pick:()=>i1,partial:()=>l1,parsedType:()=>V,optionalKeys:()=>zp,omit:()=>r1,objectClone:()=>YO,numKeys:()=>e1,nullish:()=>Vn,normalizeParams:()=>P,mergeDefs:()=>Jt,merge:()=>a1,jsonStringifyReplacer:()=>to,joinValues:()=>T,issue:()=>io,isPlainObject:()=>An,isObject:()=>vi,hexToUint8Array:()=>h1,getSizableOrigin:()=>Ao,getParsedType:()=>t1,getLengthableOrigin:()=>Ro,getEnumValues:()=>gu,getElementAtPath:()=>KO,floatSafeRemainder:()=>$p,finalizeIssue:()=>vt,extend:()=>s1,escapeRegex:()=>Ht,esc:()=>hl,defineLazy:()=>Y,createTransparentProxy:()=>n1,cloneDef:()=>GO,clone:()=>kt,cleanRegex:()=>Co,cleanEnum:()=>c1,captureStackTrace:()=>vu,cached:()=>Rr,base64urlToUint8Array:()=>d1,base64ToUint8Array:()=>Dp,assignProp:()=>vn,assertNotEqual:()=>HO,assertNever:()=>qO,assertIs:()=>BO,assertEqual:()=>WO,assert:()=>JO,allowsEval:()=>wp,aborted:()=>Tn,NUMBER_FORMAT_RANGES:()=>Op,Class:()=>p1,BIGINT_FORMAT_RANGES:()=>Tp});function WO(t){return t}function HO(t){return t}function BO(t){}function qO(t){throw Error("Unexpected value in exhaustive check")}function JO(t){}function gu(t){let e=Object.values(t).filter(n=>typeof n=="number");return Object.entries(t).filter(([n,r])=>e.indexOf(+n)===-1).map(([n,r])=>r)}function T(t,e="|"){return t.map(n=>F(n)).join(e)}function to(t,e){return typeof e=="bigint"?e.toString():e}function Rr(t){return{get value(){{let e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function Vn(t){return t==null}function Co(t){let e=t.startsWith("^")?1:0,n=t.endsWith("$")?t.length-1:t.length;return t.slice(e,n)}function $p(t,e){let n=(t.toString().split(".")[1]||"").length,r=e.toString(),i=(r.split(".")[1]||"").length;if(i===0&&/\d?e-\d?/.test(r)){let l=r.match(/\d?e-(\d?)/);l!=null&&l[1]&&(i=Number.parseInt(l[1]))}let s=n>i?n:i,o=Number.parseInt(t.toFixed(s).replace(".","")),a=Number.parseInt(e.toFixed(s).replace(".",""));return o%a/10**s}var rf=Symbol("evaluating");function Y(t,e,n){let r;Object.defineProperty(t,e,{get(){if(r!==rf)return r===void 0&&(r=rf,r=n()),r},set(i){Object.defineProperty(t,e,{value:i})},configurable:!0})}function YO(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function vn(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Jt(...t){let e={};for(let n of t){let r=Object.getOwnPropertyDescriptors(n);Object.assign(e,r)}return Object.defineProperties({},e)}function GO(t){return Jt(t._zod.def)}function KO(t,e){return e?e.reduce((n,r)=>n==null?void 0:n[r],t):t}function XO(t){let e=Object.keys(t),n=e.map(r=>t[r]);return Promise.all(n).then(r=>{let i={};for(let s=0;s<e.length;s++)i[e[s]]=r[s];return i})}function QO(t=10){let e="";for(let n=0;n<t;n++)e+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return e}function hl(t){return JSON.stringify(t)}function xp(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var vu="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function vi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var wp=Rr(()=>{var t;if(typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)!=null&&t.includes("Cloudflare")))return!1;try{return new Function(""),!0}catch{return!1}});function An(t){if(vi(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let n=e.prototype;return!(vi(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function Sp(t){return An(t)?{...t}:Array.isArray(t)?[...t]:t}function e1(t){let e=0;for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&e++;return e}var t1=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw Error(`Unknown data type: ${e}`)}},no=new Set(["string","number","symbol"]),Ip=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Ht(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function kt(t,e,n){let r=new t._zod.constr(e??t._zod.def);return(!e||n!=null&&n.parent)&&(r._zod.parent=t),r}function P(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if((e==null?void 0:e.message)!==void 0){if((e==null?void 0:e.error)!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function n1(t){let e;return new Proxy({},{get(n,r,i){return e??(e=t()),Reflect.get(e,r,i)},set(n,r,i,s){return e??(e=t()),Reflect.set(e,r,i,s)},has(n,r){return e??(e=t()),Reflect.has(e,r)},deleteProperty(n,r){return e??(e=t()),Reflect.deleteProperty(e,r)},ownKeys(n){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(n,r){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,r)},defineProperty(n,r,i){return e??(e=t()),Reflect.defineProperty(e,r,i)}})}function F(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function zp(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var Op={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Tp={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function i1(t,e){let n=t._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let i=Jt(t._zod.def,{get shape(){let s={};for(let o in e){if(!(o in n.shape))throw Error(`Unrecognized key: "${o}"`);e[o]&&(s[o]=n.shape[o])}return vn(this,"shape",s),s},checks:[]});return kt(t,i)}function r1(t,e){let n=t._zod.def,r=n.checks;if(r&&r.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let i=Jt(t._zod.def,{get shape(){let s={...t._zod.def.shape};for(let o in e){if(!(o in n.shape))throw Error(`Unrecognized key: "${o}"`);e[o]&&delete s[o]}return vn(this,"shape",s),s},checks:[]});return kt(t,i)}function s1(t,e){if(!An(e))throw Error("Invalid input to extend: expected a plain object");let n=t._zod.def.checks;if(n&&n.length>0){let i=t._zod.def.shape;for(let s in e)if(Object.getOwnPropertyDescriptor(i,s)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let r=Jt(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e};return vn(this,"shape",i),i}});return kt(t,r)}function o1(t,e){if(!An(e))throw Error("Invalid input to safeExtend: expected a plain object");let n=Jt(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e};return vn(this,"shape",r),r}});return kt(t,n)}function a1(t,e){let n=Jt(t._zod.def,{get shape(){let r={...t._zod.def.shape,...e._zod.def.shape};return vn(this,"shape",r),r},get catchall(){return e._zod.def.catchall},checks:[]});return kt(t,n)}function l1(t,e,n){let r=e._zod.def.checks;if(r&&r.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let i=Jt(e._zod.def,{get shape(){let s=e._zod.def.shape,o={...s};if(n)for(let a in n){if(!(a in s))throw Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=t?new t({type:"optional",innerType:s[a]}):s[a])}else for(let a in s)o[a]=t?new t({type:"optional",innerType:s[a]}):s[a];return vn(this,"shape",o),o},checks:[]});return kt(e,i)}function u1(t,e,n){let r=Jt(e._zod.def,{get shape(){let i=e._zod.def.shape,s={...i};if(n)for(let o in n){if(!(o in s))throw Error(`Unrecognized key: "${o}"`);n[o]&&(s[o]=new t({type:"nonoptional",innerType:i[o]}))}else for(let o in i)s[o]=new t({type:"nonoptional",innerType:i[o]});return vn(this,"shape",s),s}});return kt(e,r)}function Tn(t,e=0){var n;if(t.aborted===!0)return!0;for(let r=e;r<t.issues.length;r++)if(((n=t.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function St(t,e){return e.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(t),n})}function Ki(t){return typeof t=="string"?t:t==null?void 0:t.message}function vt(t,e,n){var i,s,o,a,l,u;let r={...t,path:t.path??[]};if(!t.message){let c=Ki((o=(s=(i=t.inst)==null?void 0:i._zod.def)==null?void 0:s.error)==null?void 0:o.call(s,t))??Ki((a=e==null?void 0:e.error)==null?void 0:a.call(e,t))??Ki((l=n.customError)==null?void 0:l.call(n,t))??Ki((u=n.localeError)==null?void 0:u.call(n,t))??"Invalid input";r.message=c}return delete r.inst,delete r.continue,!(e!=null&&e.reportInput)&&delete r.input,r}function Ao(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Ro(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function V(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let n=t;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return e}function io(...t){let[e,n,r]=t;return typeof e=="string"?{message:e,code:"custom",input:n,inst:r}:{...e}}function c1(t){return Object.entries(t).filter(([e,n])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Dp(t){let e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}function Pp(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return btoa(e)}function d1(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-e.length%4)%4);return Dp(e+n)}function f1(t){return Pp(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function h1(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw Error("Invalid hex string length");let n=new Uint8Array(e.length/2);for(let r=0;r<e.length;r+=2)n[r/2]=Number.parseInt(e.slice(r,r+2),16);return n}function m1(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}class p1{constructor(...e){}}var Ep=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,to,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},bu=y("$ZodError",Ep),ut=y("$ZodError",Ep,{Parent:Error});function yu(t,e=n=>n.message){let n={},r=[];for(let i of t.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}function _u(t,e=n=>n.message){let n={_errors:[]},r=i=>{for(let s of i.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(o=>r({issues:o}));else if(s.code==="invalid_key")r({issues:s.issues});else if(s.code==="invalid_element")r({issues:s.issues});else if(s.path.length===0)n._errors.push(e(s));else{let o=n,a=0;for(;a<s.path.length;){let l=s.path[a];a!==s.path.length-1?o[l]=o[l]||{_errors:[]}:(o[l]=o[l]||{_errors:[]},o[l]._errors.push(e(s))),o=o[l],a++}}};return r(t),n}function Mp(t,e=n=>n.message){let n={errors:[]},r=(i,s=[])=>{var o,a;for(let l of i.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>r({issues:u},l.path));else if(l.code==="invalid_key")r({issues:l.issues},l.path);else if(l.code==="invalid_element")r({issues:l.issues},l.path);else{let u=[...s,...l.path];if(u.length===0){n.errors.push(e(l));continue}let c=n,d=0;for(;d<u.length;){let f=u[d],h=d===u.length-1;typeof f=="string"?(c.properties??(c.properties={}),(o=c.properties)[f]??(o[f]={errors:[]}),c=c.properties[f]):(c.items??(c.items=[]),(a=c.items)[f]??(a[f]={errors:[]}),c=c.items[f]),h&&c.errors.push(e(l)),d++}}};return r(t),n}function Np(t){let e=[],n=t.map(r=>typeof r=="object"?r.key:r);for(let r of n)typeof r=="number"?e.push(`[${r}]`):typeof r=="symbol"?e.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?e.push(`[${JSON.stringify(r)}]`):(e.length&&e.push("."),e.push(r));return e.join("")}function Cp(t){var r;let e=[],n=[...t.issues].sort((i,s)=>(i.path??[]).length-(s.path??[]).length);for(let i of n)e.push(`✖ ${i.message}`),(r=i.path)!=null&&r.length&&e.push(` → at ${Np(i.path)}`);return e.join(`
|
|
46
|
-
`)}var Zr=t=>(e,n,r,i)=>{let s=r?Object.assign(r,{async:!1}):{async:!1},o=e._zod.run({value:n,issues:[]},s);if(o instanceof Promise)throw new Mn;if(o.issues.length){let a=new((i==null?void 0:i.Err)??t)(o.issues.map(l=>vt(l,s,Be())));throw vu(a,i==null?void 0:i.callee),a}return o.value},ml=Zr(ut),jr=t=>async(e,n,r,i)=>{let s=r?Object.assign(r,{async:!0}):{async:!0},o=e._zod.run({value:n,issues:[]},s);if(o instanceof Promise&&(o=await o),o.issues.length){let a=new((i==null?void 0:i.Err)??t)(o.issues.map(l=>vt(l,s,Be())));throw vu(a,i==null?void 0:i.callee),a}return o.value},pl=jr(ut),Ur=t=>(e,n,r)=>{let i=r?{...r,async:!1}:{async:!1},s=e._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw new Mn;return s.issues.length?{success:!1,error:new(t??bu)(s.issues.map(o=>vt(o,i,Be())))}:{success:!0,data:s.value}},Ap=Ur(ut),Lr=t=>async(e,n,r)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},s=e._zod.run({value:n,issues:[]},i);return s instanceof Promise&&(s=await s),s.issues.length?{success:!1,error:new t(s.issues.map(o=>vt(o,i,Be())))}:{success:!0,data:s.value}},Rp=Lr(ut),ku=t=>(e,n,r)=>{let i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Zr(t)(e,n,i)},g1=ku(ut),$u=t=>(e,n,r)=>Zr(t)(e,n,r),v1=$u(ut),xu=t=>async(e,n,r)=>{let i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return jr(t)(e,n,i)},b1=xu(ut),wu=t=>async(e,n,r)=>jr(t)(e,n,r),y1=wu(ut),Su=t=>(e,n,r)=>{let i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Ur(t)(e,n,i)},_1=Su(ut),Iu=t=>(e,n,r)=>Ur(t)(e,n,r),k1=Iu(ut),zu=t=>async(e,n,r)=>{let i=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Lr(t)(e,n,i)},$1=zu(ut),Ou=t=>async(e,n,r)=>Lr(t)(e,n,r),x1=Ou(ut),Wn={};qt(Wn,{xid:()=>Lp,uuid7:()=>z1,uuid6:()=>I1,uuid4:()=>S1,uuid:()=>bi,uppercase:()=>mg,unicodeEmail:()=>qp,undefined:()=>fg,ulid:()=>Up,time:()=>sg,string:()=>ag,sha512_hex:()=>J1,sha512_base64url:()=>G1,sha512_base64:()=>Y1,sha384_hex:()=>H1,sha384_base64url:()=>q1,sha384_base64:()=>B1,sha256_hex:()=>F1,sha256_base64url:()=>W1,sha256_base64:()=>V1,sha1_hex:()=>j1,sha1_base64url:()=>L1,sha1_base64:()=>U1,rfc5322Email:()=>T1,number:()=>Du,null:()=>dg,nanoid:()=>Vp,md5_hex:()=>A1,md5_base64url:()=>Z1,md5_base64:()=>R1,mac:()=>Kp,lowercase:()=>hg,ksuid:()=>Fp,ipv6:()=>Gp,ipv4:()=>Yp,integer:()=>ug,idnEmail:()=>D1,html5Email:()=>O1,hostname:()=>M1,hex:()=>C1,guid:()=>Hp,extendedDuration:()=>w1,emoji:()=>Jp,email:()=>Bp,e164:()=>tg,duration:()=>Wp,domain:()=>N1,datetime:()=>og,date:()=>ig,cuid2:()=>jp,cuid:()=>Zp,cidrv6:()=>Qp,cidrv4:()=>Xp,browserEmail:()=>P1,boolean:()=>cg,bigint:()=>lg,base64url:()=>Tu,base64:()=>eg});var Zp=/^[cC][^\s-]{8,}$/,jp=/^[0-9a-z]+$/,Up=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Lp=/^[0-9a-vA-V]{20}$/,Fp=/^[A-Za-z0-9]{27}$/,Vp=/^[a-zA-Z0-9_-]{21}$/,Wp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,w1=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Hp=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,bi=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,S1=bi(4),I1=bi(6),z1=bi(7),Bp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,O1=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,T1=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,qp=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,D1=qp,P1=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,E1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Jp(){return new RegExp(E1,"u")}var Yp=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Gp=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Kp=t=>{let e=Ht(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},Xp=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Qp=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,eg=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Tu=/^[A-Za-z0-9_-]*$/,M1=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,N1=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,tg=/^\+[1-9]\d{6,14}$/,ng="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",ig=new RegExp(`^${ng}$`);function rg(t){return typeof t.precision=="number"?t.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":t.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${t.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function sg(t){return new RegExp(`^${rg(t)}$`)}function og(t){let e=rg({precision:t.precision}),n=["Z"];t.local&&n.push(""),t.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${e}(?:${n.join("|")})`;return new RegExp(`^${ng}T(?:${r})$`)}var ag=t=>{let e=t?`[\\s\\S]{${(t==null?void 0:t.minimum)??0},${(t==null?void 0:t.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},lg=/^-?\d+n?$/,ug=/^-?\d+$/,Du=/^-?\d+(?:\.\d+)?$/,cg=/^(?:true|false)$/i,dg=/^null$/i,fg=/^undefined$/i,hg=/^[^A-Z]*$/,mg=/^[^a-z]*$/,C1=/^[0-9a-fA-F]*$/;function Fr(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function Vr(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var A1=/^[0-9a-fA-F]{32}$/,R1=Fr(22,"=="),Z1=Vr(22),j1=/^[0-9a-fA-F]{40}$/,U1=Fr(27,"="),L1=Vr(27),F1=/^[0-9a-fA-F]{64}$/,V1=Fr(43,"="),W1=Vr(43),H1=/^[0-9a-fA-F]{96}$/,B1=Fr(64,""),q1=Vr(64),J1=/^[0-9a-fA-F]{128}$/,Y1=Fr(86,"=="),G1=Vr(86),ke=y("$ZodCheck",(t,e)=>{var n;t._zod??(t._zod={}),t._zod.def=e,(n=t._zod).onattach??(n.onattach=[])}),pg={number:"number",bigint:"bigint",object:"date"},Pu=y("$ZodCheckLessThan",(t,e)=>{ke.init(t,e);let n=pg[typeof e.value];t._zod.onattach.push(r=>{let i=r._zod.bag,s=(e.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<s&&(e.inclusive?i.maximum=e.value:i.exclusiveMaximum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value<=e.value:r.value<e.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Eu=y("$ZodCheckGreaterThan",(t,e)=>{ke.init(t,e);let n=pg[typeof e.value];t._zod.onattach.push(r=>{let i=r._zod.bag,s=(e.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>s&&(e.inclusive?i.minimum=e.value:i.exclusiveMinimum=e.value)}),t._zod.check=r=>{(e.inclusive?r.value>=e.value:r.value>e.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:r.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),gg=y("$ZodCheckMultipleOf",(t,e)=>{ke.init(t,e),t._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=e.value)}),t._zod.check=n=>{if(typeof n.value!=typeof e.value)throw Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%e.value===BigInt(0):$p(n.value,e.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:e.value,input:n.value,inst:t,continue:!e.abort})}}),vg=y("$ZodCheckNumberFormat",(t,e)=>{var o;ke.init(t,e),e.format=e.format||"float64";let n=(o=e.format)==null?void 0:o.includes("int"),r=n?"int":"number",[i,s]=Op[e.format];t._zod.onattach.push(a=>{let l=a._zod.bag;l.format=e.format,l.minimum=i,l.maximum=s,n&&(l.pattern=ug)}),t._zod.check=a=>{let l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:r,format:e.format,code:"invalid_type",continue:!1,input:l,inst:t});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!e.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!e.abort});return}}l<i&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!e.abort}),l>s&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:s,inclusive:!0,inst:t,continue:!e.abort})}}),bg=y("$ZodCheckBigIntFormat",(t,e)=>{ke.init(t,e);let[n,r]=Tp[e.format];t._zod.onattach.push(i=>{let s=i._zod.bag;s.format=e.format,s.minimum=n,s.maximum=r}),t._zod.check=i=>{let s=i.value;s<n&&i.issues.push({origin:"bigint",input:s,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),s>r&&i.issues.push({origin:"bigint",input:s,code:"too_big",maximum:r,inclusive:!0,inst:t,continue:!e.abort})}}),yg=y("$ZodCheckMaxSize",(t,e)=>{var n;ke.init(t,e),(n=t._zod.def).when??(n.when=r=>{let i=r.value;return!Vn(i)&&i.size!==void 0}),t._zod.onattach.push(r=>{let i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{let i=r.value;i.size<=e.maximum||r.issues.push({origin:Ao(i),code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),_g=y("$ZodCheckMinSize",(t,e)=>{var n;ke.init(t,e),(n=t._zod.def).when??(n.when=r=>{let i=r.value;return!Vn(i)&&i.size!==void 0}),t._zod.onattach.push(r=>{let i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{let i=r.value;i.size>=e.minimum||r.issues.push({origin:Ao(i),code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),kg=y("$ZodCheckSizeEquals",(t,e)=>{var n;ke.init(t,e),(n=t._zod.def).when??(n.when=r=>{let i=r.value;return!Vn(i)&&i.size!==void 0}),t._zod.onattach.push(r=>{let i=r._zod.bag;i.minimum=e.size,i.maximum=e.size,i.size=e.size}),t._zod.check=r=>{let i=r.value,s=i.size;if(s===e.size)return;let o=s>e.size;r.issues.push({origin:Ao(i),...o?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),$g=y("$ZodCheckMaxLength",(t,e)=>{var n;ke.init(t,e),(n=t._zod.def).when??(n.when=r=>{let i=r.value;return!Vn(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{let i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<i&&(r._zod.bag.maximum=e.maximum)}),t._zod.check=r=>{let i=r.value;if(i.length<=e.maximum)return;let s=Ro(i);r.issues.push({origin:s,code:"too_big",maximum:e.maximum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),xg=y("$ZodCheckMinLength",(t,e)=>{var n;ke.init(t,e),(n=t._zod.def).when??(n.when=r=>{let i=r.value;return!Vn(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{let i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>i&&(r._zod.bag.minimum=e.minimum)}),t._zod.check=r=>{let i=r.value;if(i.length>=e.minimum)return;let s=Ro(i);r.issues.push({origin:s,code:"too_small",minimum:e.minimum,inclusive:!0,input:i,inst:t,continue:!e.abort})}}),wg=y("$ZodCheckLengthEquals",(t,e)=>{var n;ke.init(t,e),(n=t._zod.def).when??(n.when=r=>{let i=r.value;return!Vn(i)&&i.length!==void 0}),t._zod.onattach.push(r=>{let i=r._zod.bag;i.minimum=e.length,i.maximum=e.length,i.length=e.length}),t._zod.check=r=>{let i=r.value,s=i.length;if(s===e.length)return;let o=Ro(i),a=s>e.length;r.issues.push({origin:o,...a?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!e.abort})}}),Wr=y("$ZodCheckStringFormat",(t,e)=>{var n,r;ke.init(t,e),t._zod.onattach.push(i=>{let s=i._zod.bag;s.format=e.format,e.pattern&&(s.patterns??(s.patterns=new Set),s.patterns.add(e.pattern))}),e.pattern?(n=t._zod).check??(n.check=i=>{e.pattern.lastIndex=0,!e.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:e.format,input:i.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(r=t._zod).check??(r.check=()=>{})}),Sg=y("$ZodCheckRegex",(t,e)=>{Wr.init(t,e),t._zod.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Ig=y("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=hg),Wr.init(t,e)}),zg=y("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=mg),Wr.init(t,e)}),Og=y("$ZodCheckIncludes",(t,e)=>{ke.init(t,e);let n=Ht(e.includes),r=new RegExp(typeof e.position=="number"?`^.{${e.position}}${n}`:n);e.pattern=r,t._zod.onattach.push(i=>{let s=i._zod.bag;s.patterns??(s.patterns=new Set),s.patterns.add(r)}),t._zod.check=i=>{i.value.includes(e.includes,e.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:i.value,inst:t,continue:!e.abort})}}),Tg=y("$ZodCheckStartsWith",(t,e)=>{ke.init(t,e);let n=new RegExp(`^${Ht(e.prefix)}.*`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.startsWith(e.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:r.value,inst:t,continue:!e.abort})}}),Dg=y("$ZodCheckEndsWith",(t,e)=>{ke.init(t,e);let n=new RegExp(`.*${Ht(e.suffix)}$`);e.pattern??(e.pattern=n),t._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),t._zod.check=r=>{r.value.endsWith(e.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:r.value,inst:t,continue:!e.abort})}});function sf(t,e,n){t.issues.length&&e.issues.push(...St(n,t.issues))}var Pg=y("$ZodCheckProperty",(t,e)=>{ke.init(t,e),t._zod.check=n=>{let r=e.schema._zod.run({value:n.value[e.property],issues:[]},{});if(r instanceof Promise)return r.then(i=>sf(i,n,e.property));sf(r,n,e.property)}}),Eg=y("$ZodCheckMimeType",(t,e)=>{ke.init(t,e);let n=new Set(e.mime);t._zod.onattach.push(r=>{r._zod.bag.mime=e.mime}),t._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:e.mime,input:r.value.type,inst:t,continue:!e.abort})}}),Mg=y("$ZodCheckOverwrite",(t,e)=>{ke.init(t,e),t._zod.check=n=>{n.value=e.tx(n.value)}});class Ng{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let n=e.split(`
|
|
47
|
-
`).filter(
|
|
48
|
-
`))}}var Cg={major:4,minor:3,patch:5},H=y("$ZodType",(t,e)=>{var i;var n;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=Cg;let r=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&r.unshift(t);for(let s of r)for(let o of s._zod.onattach)o(t);if(r.length===0)(n=t._zod).deferred??(n.deferred=[]),(i=t._zod.deferred)==null||i.push(()=>{t._zod.run=t._zod.parse});else{let s=(a,l,u)=>{let c=Tn(a),d;for(let f of l){if(f._zod.def.when){if(!f._zod.def.when(a))continue}else if(c)continue;let h=a.issues.length,m=f._zod.check(a);if(m instanceof Promise&&(u==null?void 0:u.async)===!1)throw new Mn;if(d||m instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await m,a.issues.length!==h&&(c||(c=Tn(a,h)))});else{if(a.issues.length===h)continue;c||(c=Tn(a,h))}}return d?d.then(()=>a):a},o=(a,l,u)=>{if(Tn(a))return a.aborted=!0,a;let c=s(l,r,u);if(c instanceof Promise){if(u.async===!1)throw new Mn;return c.then(d=>t._zod.parse(d,u))}return t._zod.parse(c,u)};t._zod.run=(a,l)=>{if(l.skipChecks)return t._zod.parse(a,l);if(l.direction==="backward"){let c=t._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return c instanceof Promise?c.then(d=>o(d,a,l)):o(c,a,l)}let u=t._zod.parse(a,l);if(u instanceof Promise){if(l.async===!1)throw new Mn;return u.then(c=>s(c,r,l))}return s(u,r,l)}}Y(t,"~standard",()=>({validate:s=>{var o;try{let a=Ap(t,s);return a.success?{value:a.data}:{issues:(o=a.error)==null?void 0:o.issues}}catch{return Rp(t,s).then(l=>{var u;return l.success?{value:l.data}:{issues:(u=l.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),Hr=y("$ZodString",(t,e)=>{var n;H.init(t,e),t._zod.pattern=[...((n=t==null?void 0:t._zod.bag)==null?void 0:n.patterns)??[]].pop()??ag(t._zod.bag),t._zod.parse=(r,i)=>{if(e.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:t}),r}}),fe=y("$ZodStringFormat",(t,e)=>{Wr.init(t,e),Hr.init(t,e)}),Ag=y("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=Hp),fe.init(t,e)}),Rg=y("$ZodUUID",(t,e)=>{if(e.version){let n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=bi(n))}else e.pattern??(e.pattern=bi());fe.init(t,e)}),Zg=y("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=Bp),fe.init(t,e)}),jg=y("$ZodURL",(t,e)=>{fe.init(t,e),t._zod.check=n=>{try{let r=n.value.trim(),i=new URL(r);e.hostname&&(e.hostname.lastIndex=0,!e.hostname.test(i.hostname)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:n.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,!e.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)&&n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:n.value,inst:t,continue:!e.abort})),e.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:t,continue:!e.abort})}}}),Ug=y("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=Jp()),fe.init(t,e)}),Lg=y("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=Vp),fe.init(t,e)}),Fg=y("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=Zp),fe.init(t,e)}),Vg=y("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=jp),fe.init(t,e)}),Wg=y("$ZodULID",(t,e)=>{e.pattern??(e.pattern=Up),fe.init(t,e)}),Hg=y("$ZodXID",(t,e)=>{e.pattern??(e.pattern=Lp),fe.init(t,e)}),Bg=y("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=Fp),fe.init(t,e)}),qg=y("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=og(e)),fe.init(t,e)}),Jg=y("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=ig),fe.init(t,e)}),Yg=y("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=sg(e)),fe.init(t,e)}),Gg=y("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=Wp),fe.init(t,e)}),Kg=y("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=Yp),fe.init(t,e),t._zod.bag.format="ipv4"}),Xg=y("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Gp),fe.init(t,e),t._zod.bag.format="ipv6",t._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:t,continue:!e.abort})}}}),Qg=y("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=Kp(e.delimiter)),fe.init(t,e),t._zod.bag.format="mac"}),ev=y("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=Xp),fe.init(t,e)}),tv=y("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=Qp),fe.init(t,e),t._zod.check=n=>{let r=n.value.split("/");try{if(r.length!==2)throw Error();let[i,s]=r;if(!s)throw Error();let o=Number(s);if(`${o}`!==s||o<0||o>128)throw Error();new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:t,continue:!e.abort})}}});function Mu(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var nv=y("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=eg),fe.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=n=>{Mu(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:t,continue:!e.abort})}});function iv(t){if(!Tu.test(t))return!1;let e=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=e.padEnd(Math.ceil(e.length/4)*4,"=");return Mu(n)}var rv=y("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Tu),fe.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=n=>{iv(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:t,continue:!e.abort})}}),sv=y("$ZodE164",(t,e)=>{e.pattern??(e.pattern=tg),fe.init(t,e)});function ov(t,e=null){try{let n=t.split(".");if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!("typ"in i&&(i==null?void 0:i.typ)!=="JWT"||!i.alg||e&&(!("alg"in i)||i.alg!==e))}catch{return!1}}var av=y("$ZodJWT",(t,e)=>{fe.init(t,e),t._zod.check=n=>{ov(n.value,e.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:t,continue:!e.abort})}}),lv=y("$ZodCustomStringFormat",(t,e)=>{fe.init(t,e),t._zod.check=n=>{e.fn(n.value)||n.issues.push({code:"invalid_format",format:e.format,input:n.value,inst:t,continue:!e.abort})}}),Nu=y("$ZodNumber",(t,e)=>{H.init(t,e),t._zod.pattern=t._zod.bag.pattern??Du,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;let s=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:t,...s?{received:s}:{}}),n}}),uv=y("$ZodNumberFormat",(t,e)=>{vg.init(t,e),Nu.init(t,e)}),Cu=y("$ZodBoolean",(t,e)=>{H.init(t,e),t._zod.pattern=cg,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:t}),n}}),Au=y("$ZodBigInt",(t,e)=>{H.init(t,e),t._zod.pattern=lg,t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:t}),n}}),cv=y("$ZodBigIntFormat",(t,e)=>{bg.init(t,e),Au.init(t,e)}),dv=y("$ZodSymbol",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>{let i=n.value;return typeof i=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:t}),n}}),fv=y("$ZodUndefined",(t,e)=>{H.init(t,e),t._zod.pattern=fg,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(n,r)=>{let i=n.value;return typeof i>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:t}),n}}),hv=y("$ZodNull",(t,e)=>{H.init(t,e),t._zod.pattern=dg,t._zod.values=new Set([null]),t._zod.parse=(n,r)=>{let i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:t}),n}}),mv=y("$ZodAny",(t,e)=>{H.init(t,e),t._zod.parse=n=>n}),pv=y("$ZodUnknown",(t,e)=>{H.init(t,e),t._zod.parse=n=>n}),gv=y("$ZodNever",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:t}),n)}),vv=y("$ZodVoid",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>{let i=n.value;return typeof i>"u"||n.issues.push({expected:"void",code:"invalid_type",input:i,inst:t}),n}}),bv=y("$ZodDate",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>{if(e.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,s=i instanceof Date;return s&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...s?{received:"Invalid Date"}:{},inst:t}),n}});function of(t,e,n){t.issues.length&&e.issues.push(...St(n,t.issues)),e.value[n]=t.value}var yv=y("$ZodArray",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:t}),n;n.value=Array(i.length);let s=[];for(let o=0;o<i.length;o++){let a=i[o],l=e.element._zod.run({value:a,issues:[]},r);l instanceof Promise?s.push(l.then(u=>of(u,n,o))):of(l,n,o)}return s.length?Promise.all(s).then(()=>n):n}});function ro(t,e,n,r,i){if(t.issues.length){if(i&&!(n in r))return;e.issues.push(...St(n,t.issues))}t.value===void 0?n in r&&(e.value[n]=void 0):e.value[n]=t.value}function _v(t){var r,i,s,o;let e=Object.keys(t.shape);for(let a of e)if(!((o=(s=(i=(r=t.shape)==null?void 0:r[a])==null?void 0:i._zod)==null?void 0:s.traits)!=null&&o.has("$ZodType")))throw Error(`Invalid element at key "${a}": expected a Zod schema`);let n=zp(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(n)}}function kv(t,e,n,r,i,s){let o=[],a=i.keySet,l=i.catchall._zod,u=l.def.type,c=l.optout==="optional";for(let d in e){if(a.has(d))continue;if(u==="never"){o.push(d);continue}let f=l.run({value:e[d],issues:[]},r);f instanceof Promise?t.push(f.then(h=>ro(h,n,d,e,c))):ro(f,n,d,e,c)}return o.length&&n.issues.push({code:"unrecognized_keys",keys:o,input:e,inst:s}),t.length?Promise.all(t).then(()=>n):n}var $v=y("$ZodObject",(t,e)=>{var o;if(H.init(t,e),!((o=Object.getOwnPropertyDescriptor(e,"shape"))!=null&&o.get)){let a=e.shape;Object.defineProperty(e,"shape",{get:()=>{let l={...a};return Object.defineProperty(e,"shape",{value:l}),l}})}let n=Rr(()=>_v(e));Y(t._zod,"propValues",()=>{let a=e.shape,l={};for(let u in a){let c=a[u]._zod;if(c.values){l[u]??(l[u]=new Set);for(let d of c.values)l[u].add(d)}}return l});let r=vi,i=e.catchall,s;t._zod.parse=(a,l)=>{s??(s=n.value);let u=a.value;if(!r(u))return a.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),a;a.value={};let c=[],d=s.shape;for(let f of s.keys){let h=d[f],m=h._zod.optout==="optional",p=h._zod.run({value:u[f],issues:[]},l);p instanceof Promise?c.push(p.then(g=>ro(g,a,f,u,m))):ro(p,a,f,u,m)}return i?kv(c,u,a,l,n.value,t):c.length?Promise.all(c).then(()=>a):a}}),xv=y("$ZodObjectJIT",(t,e)=>{$v.init(t,e);let n=t._zod.parse,r=Rr(()=>_v(e)),i=d=>{var k,$;let f=new Ng(["shape","payload","ctx"]),h=r.value,m=w=>{let _=hl(w);return`shape[${_}]._zod.run({ value: input[${_}], issues: [] }, ctx)`};f.write("const input = payload.value;");let p=Object.create(null),g=0;for(let w of h.keys)p[w]=`key_${g++}`;f.write("const newResult = {};");for(let w of h.keys){let _=p[w],I=hl(w),z=(($=(k=d[w])==null?void 0:k._zod)==null?void 0:$.optout)==="optional";f.write(`const ${_} = ${m(w)};`),z?f.write(`
|
|
49
|
-
if (${
|
|
50
|
-
if (${
|
|
51
|
-
payload.issues = payload.issues.concat(${
|
|
45
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const u of t.seen.entries()){const c=u[1];if(e===u[0]){r(u);continue}if(t.external){const f=(a=t.external.registry.get(u[0]))==null?void 0:a.id;if(e!==u[0]&&f){r(u);continue}}if((l=t.metadataRegistry.get(u[0]))==null?void 0:l.id){r(u);continue}if(c.cycle){r(u);continue}if(c.count>1&&t.reused==="ref"){r(u);continue}}}function mB(t,e){var s,o,a;const A=t.seen.get(e);if(!A)throw new Error("Unprocessed schema. This is a bug in Zod.");const i=l=>{const u=t.seen.get(l);if(u.ref===null)return;const c=u.def??u.schema,d={...c},f=u.ref;if(u.ref=null,f){i(f);const g=t.seen.get(f),m=g.schema;if(m.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(m)):Object.assign(c,m),Object.assign(c,d),l._zod.parent===f)for(const B in c)B==="$ref"||B==="allOf"||B in d||delete c[B];if(m.$ref&&g.def)for(const B in c)B==="$ref"||B==="allOf"||B in g.def&&JSON.stringify(c[B])===JSON.stringify(g.def[B])&&delete c[B]}const h=l._zod.parent;if(h&&h!==f){i(h);const g=t.seen.get(h);if(g!=null&&g.schema.$ref&&(c.$ref=g.schema.$ref,g.def))for(const m in c)m==="$ref"||m==="allOf"||m in g.def&&JSON.stringify(c[m])===JSON.stringify(g.def[m])&&delete c[m]}t.override({zodSchema:l,jsonSchema:c,path:u.path??[]})};for(const l of[...t.seen.entries()].reverse())i(l[0]);const n={};if(t.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":t.target,(s=t.external)!=null&&s.uri){const l=(o=t.external.registry.get(e))==null?void 0:o.id;if(!l)throw new Error("Schema is missing an `id` property");n.$id=t.external.uri(l)}Object.assign(n,A.def??A.schema);const r=((a=t.external)==null?void 0:a.defs)??{};for(const l of t.seen.entries()){const u=l[1];u.def&&u.defId&&(r[u.defId]=u.def)}t.external||Object.keys(r).length>0&&(t.target==="draft-2020-12"?n.$defs=r:n.definitions=r);try{const l=JSON.parse(JSON.stringify(n));return Object.defineProperty(l,"~standard",{value:{...e["~standard"],jsonSchema:{input:na(e,"input",t.processors),output:na(e,"output",t.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function gt(t,e){const A=e??{seen:new Set};if(A.seen.has(t))return!1;A.seen.add(t);const i=t._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return gt(i.element,A);if(i.type==="set")return gt(i.valueType,A);if(i.type==="lazy")return gt(i.getter(),A);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return gt(i.innerType,A);if(i.type==="intersection")return gt(i.left,A)||gt(i.right,A);if(i.type==="record"||i.type==="map")return gt(i.keyType,A)||gt(i.valueType,A);if(i.type==="pipe")return gt(i.in,A)||gt(i.out,A);if(i.type==="object"){for(const n in i.shape)if(gt(i.shape[n],A))return!0;return!1}if(i.type==="union"){for(const n of i.options)if(gt(n,A))return!0;return!1}if(i.type==="tuple"){for(const n of i.items)if(gt(n,A))return!0;return!!(i.rest&>(i.rest,A))}return!1}const DS=(t,e={})=>A=>{const i=hB({...A,processors:e});return Ke(t,i),gB(i,t),mB(i,t)},na=(t,e,A={})=>i=>{const{libraryOptions:n,target:r}=i??{},s=hB({...n??{},target:r,io:e,processors:A});return Ke(t,s),gB(s,t),mB(s,t)},LS={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},MS=(t,e,A,i)=>{const n=A;n.type="string";const{minimum:r,maximum:s,format:o,patterns:a,contentEncoding:l}=t._zod.bag;if(typeof r=="number"&&(n.minLength=r),typeof s=="number"&&(n.maxLength=s),o&&(n.format=LS[o]??o,n.format===""&&delete n.format,o==="time"&&delete n.format),l&&(n.contentEncoding=l),a&&a.size>0){const u=[...a];u.length===1?n.pattern=u[0].source:u.length>1&&(n.allOf=[...u.map(c=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:c.source}))])}},NS=(t,e,A,i)=>{const n=A,{minimum:r,maximum:s,format:o,multipleOf:a,exclusiveMaximum:l,exclusiveMinimum:u}=t._zod.bag;typeof o=="string"&&o.includes("int")?n.type="integer":n.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),typeof r=="number"&&(n.minimum=r,typeof u=="number"&&e.target!=="draft-04"&&(u>=r?delete n.minimum:delete n.exclusiveMinimum)),typeof l=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l),typeof s=="number"&&(n.maximum=s,typeof l=="number"&&e.target!=="draft-04"&&(l<=s?delete n.maximum:delete n.exclusiveMaximum)),typeof a=="number"&&(n.multipleOf=a)},zS=(t,e,A,i)=>{A.type="boolean"},PS=(t,e,A,i)=>{e.target==="openapi-3.0"?(A.type="string",A.nullable=!0,A.enum=[null]):A.type="null"},RS=(t,e,A,i)=>{A.not={}},KS=(t,e,A,i)=>{},ZS=(t,e,A,i)=>{const n=t._zod.def,r=Vv(n.entries);r.every(s=>typeof s=="number")&&(A.type="number"),r.every(s=>typeof s=="string")&&(A.type="string"),A.enum=r},VS=(t,e,A,i)=>{const n=t._zod.def,r=[];for(const s of n.values)if(s===void 0){if(e.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");r.push(Number(s))}else r.push(s);if(r.length!==0)if(r.length===1){const s=r[0];A.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?A.enum=[s]:A.const=s}else r.every(s=>typeof s=="number")&&(A.type="number"),r.every(s=>typeof s=="string")&&(A.type="string"),r.every(s=>typeof s=="boolean")&&(A.type="boolean"),r.every(s=>s===null)&&(A.type="null"),A.enum=r},jS=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},GS=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},WS=(t,e,A,i)=>{const n=A,r=t._zod.def,{minimum:s,maximum:o}=t._zod.bag;typeof s=="number"&&(n.minItems=s),typeof o=="number"&&(n.maxItems=o),n.type="array",n.items=Ke(r.element,e,{...i,path:[...i.path,"items"]})},JS=(t,e,A,i)=>{var l;const n=A,r=t._zod.def;n.type="object",n.properties={};const s=r.shape;for(const u in s)n.properties[u]=Ke(s[u],e,{...i,path:[...i.path,"properties",u]});const o=new Set(Object.keys(s)),a=new Set([...o].filter(u=>{const c=r.shape[u]._zod;return e.io==="input"?c.optin===void 0:c.optout===void 0}));a.size>0&&(n.required=Array.from(a)),((l=r.catchall)==null?void 0:l._zod.def.type)==="never"?n.additionalProperties=!1:r.catchall?r.catchall&&(n.additionalProperties=Ke(r.catchall,e,{...i,path:[...i.path,"additionalProperties"]})):e.io==="output"&&(n.additionalProperties=!1)},XS=(t,e,A,i)=>{const n=t._zod.def,r=n.inclusive===!1,s=n.options.map((o,a)=>Ke(o,e,{...i,path:[...i.path,r?"oneOf":"anyOf",a]}));r?A.oneOf=s:A.anyOf=s},YS=(t,e,A,i)=>{const n=t._zod.def,r=Ke(n.left,e,{...i,path:[...i.path,"allOf",0]}),s=Ke(n.right,e,{...i,path:[...i.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1,a=[...o(r)?r.allOf:[r],...o(s)?s.allOf:[s]];A.allOf=a},qS=(t,e,A,i)=>{const n=A,r=t._zod.def;n.type="object";const s=r.keyType,o=s._zod.bag,a=o==null?void 0:o.patterns;if(r.mode==="loose"&&a&&a.size>0){const u=Ke(r.valueType,e,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(const c of a)n.patternProperties[c.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(n.propertyNames=Ke(r.keyType,e,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=Ke(r.valueType,e,{...i,path:[...i.path,"additionalProperties"]});const l=s._zod.values;if(l){const u=[...l].filter(c=>typeof c=="string"||typeof c=="number");u.length>0&&(n.required=u)}},ek=(t,e,A,i)=>{const n=t._zod.def,r=Ke(n.innerType,e,i),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=n.innerType,A.nullable=!0):A.anyOf=[r,{type:"null"}]},tk=(t,e,A,i)=>{const n=t._zod.def;Ke(n.innerType,e,i);const r=e.seen.get(t);r.ref=n.innerType},Ak=(t,e,A,i)=>{const n=t._zod.def;Ke(n.innerType,e,i);const r=e.seen.get(t);r.ref=n.innerType,A.default=JSON.parse(JSON.stringify(n.defaultValue))},nk=(t,e,A,i)=>{const n=t._zod.def;Ke(n.innerType,e,i);const r=e.seen.get(t);r.ref=n.innerType,e.io==="input"&&(A._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},ik=(t,e,A,i)=>{const n=t._zod.def;Ke(n.innerType,e,i);const r=e.seen.get(t);r.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}A.default=s},rk=(t,e,A,i)=>{const n=t._zod.def,r=e.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;Ke(r,e,i);const s=e.seen.get(t);s.ref=r},sk=(t,e,A,i)=>{const n=t._zod.def;Ke(n.innerType,e,i);const r=e.seen.get(t);r.ref=n.innerType,A.readOnly=!0},pB=(t,e,A,i)=>{const n=t._zod.def;Ke(n.innerType,e,i);const r=e.seen.get(t);r.ref=n.innerType};function ud(t){return!!t._zod}function vB(t,e){return ud(t)?Yv(t,e):t.safeParse(e)}function ok(t){var A,i;if(!t)return;let e;if(ud(t)?e=(i=(A=t._zod)==null?void 0:A.def)==null?void 0:i.shape:e=t.shape,!!e){if(typeof e=="function")try{return e()}catch{return}return e}}function ak(t){var n;if(ud(t)){const s=(n=t._zod)==null?void 0:n.def;if(s){if(s.value!==void 0)return s.value;if(Array.isArray(s.values)&&s.values.length>0)return s.values[0]}}const A=t._def;if(A){if(A.value!==void 0)return A.value;if(Array.isArray(A.values)&&A.values.length>0)return A.values[0]}const i=t.value;if(i!==void 0)return i}const lk=I("ZodISODateTime",(t,e)=>{iI.init(t,e),Oe.init(t,e)});function BB(t){return cS(lk,t)}const uk=I("ZodISODate",(t,e)=>{rI.init(t,e),Oe.init(t,e)});function ck(t){return dS(uk,t)}const dk=I("ZodISOTime",(t,e)=>{sI.init(t,e),Oe.init(t,e)});function fk(t){return fS(dk,t)}const hk=I("ZodISODuration",(t,e)=>{oI.init(t,e),Oe.init(t,e)});function gk(t){return hS(hk,t)}const mk=(t,e)=>{Jv.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:A=>Xx(t,A)},flatten:{value:A=>Jx(t,A)},addIssue:{value:A=>{t.issues.push(A),t.message=JSON.stringify(t.issues,ec,2)}},addIssues:{value:A=>{t.issues.push(...A),t.message=JSON.stringify(t.issues,ec,2)}},isEmpty:{get(){return t.issues.length===0}}})},Jt=I("ZodError",mk,{Parent:Error}),pk=od(Jt),vk=ad(Jt),Bk=za(Jt),wk=Pa(Jt),yk=qx(Jt),bk=eF(Jt),_k=tF(Jt),Ck=AF(Jt),Uk=nF(Jt),Qk=iF(Jt),xk=rF(Jt),Fk=sF(Jt),Se=I("ZodType",(t,e)=>(Fe.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:na(t,"input"),output:na(t,"output")}}),t.toJSONSchema=DS(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...A)=>t.clone(fn(e,{checks:[...e.checks??[],...A.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),t.with=t.check,t.clone=(A,i)=>hn(t,A,i),t.brand=()=>t,t.register=((A,i)=>(A.add(t,i),t)),t.parse=(A,i)=>pk(t,A,i,{callee:t.parse}),t.safeParse=(A,i)=>Bk(t,A,i),t.parseAsync=async(A,i)=>vk(t,A,i,{callee:t.parseAsync}),t.safeParseAsync=async(A,i)=>wk(t,A,i),t.spa=t.safeParseAsync,t.encode=(A,i)=>yk(t,A,i),t.decode=(A,i)=>bk(t,A,i),t.encodeAsync=async(A,i)=>_k(t,A,i),t.decodeAsync=async(A,i)=>Ck(t,A,i),t.safeEncode=(A,i)=>Uk(t,A,i),t.safeDecode=(A,i)=>Qk(t,A,i),t.safeEncodeAsync=async(A,i)=>xk(t,A,i),t.safeDecodeAsync=async(A,i)=>Fk(t,A,i),t.refine=(A,i)=>t.check(BE(A,i)),t.superRefine=A=>t.check(wE(A)),t.overwrite=A=>t.check(Mi(A)),t.optional=()=>Me(t),t.exactOptional=()=>sE(t),t.nullable=()=>Cg(t),t.nullish=()=>Me(Cg(t)),t.nonoptional=A=>dE(t,A),t.array=()=>se(t),t.or=A=>Qe([t,A]),t.and=A=>cd(t,A),t.transform=A=>nc(t,QB(A)),t.default=A=>lE(t,A),t.prefault=A=>cE(t,A),t.catch=A=>hE(t,A),t.pipe=A=>nc(t,A),t.readonly=()=>pE(t),t.describe=A=>{const i=t.clone();return ur.add(i,{description:A}),i},Object.defineProperty(t,"description",{get(){var A;return(A=ur.get(t))==null?void 0:A.description},configurable:!0}),t.meta=(...A)=>{if(A.length===0)return ur.get(t);const i=t.clone();return ur.add(i,A[0]),i},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=A=>A(t),t)),wB=I("_ZodString",(t,e)=>{ld.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(i,n,r)=>MS(t,i,n);const A=t._zod.bag;t.format=A.format??null,t.minLength=A.minimum??null,t.maxLength=A.maximum??null,t.regex=(...i)=>t.check(yS(...i)),t.includes=(...i)=>t.check(CS(...i)),t.startsWith=(...i)=>t.check(US(...i)),t.endsWith=(...i)=>t.check(QS(...i)),t.min=(...i)=>t.check(Aa(...i)),t.max=(...i)=>t.check(dB(...i)),t.length=(...i)=>t.check(fB(...i)),t.nonempty=(...i)=>t.check(Aa(1,...i)),t.lowercase=i=>t.check(bS(i)),t.uppercase=i=>t.check(_S(i)),t.trim=()=>t.check(FS()),t.normalize=(...i)=>t.check(xS(...i)),t.toLowerCase=()=>t.check(IS()),t.toUpperCase=()=>t.check(SS()),t.slugify=()=>t.check(kS())}),Ik=I("ZodString",(t,e)=>{ld.init(t,e),wB.init(t,e),t.email=A=>t.check(KI(Sk,A)),t.url=A=>t.check(WI(kk,A)),t.jwt=A=>t.check(uS(Vk,A)),t.emoji=A=>t.check(JI(Ek,A)),t.guid=A=>t.check(vg(bg,A)),t.uuid=A=>t.check(ZI(Gs,A)),t.uuidv4=A=>t.check(VI(Gs,A)),t.uuidv6=A=>t.check(jI(Gs,A)),t.uuidv7=A=>t.check(GI(Gs,A)),t.nanoid=A=>t.check(XI($k,A)),t.guid=A=>t.check(vg(bg,A)),t.cuid=A=>t.check(YI(Tk,A)),t.cuid2=A=>t.check(qI(Ok,A)),t.ulid=A=>t.check(eS(Hk,A)),t.base64=A=>t.check(oS(Rk,A)),t.base64url=A=>t.check(aS(Kk,A)),t.xid=A=>t.check(tS(Dk,A)),t.ksuid=A=>t.check(AS(Lk,A)),t.ipv4=A=>t.check(nS(Mk,A)),t.ipv6=A=>t.check(iS(Nk,A)),t.cidrv4=A=>t.check(rS(zk,A)),t.cidrv6=A=>t.check(sS(Pk,A)),t.e164=A=>t.check(lS(Zk,A)),t.datetime=A=>t.check(BB(A)),t.date=A=>t.check(ck(A)),t.time=A=>t.check(fk(A)),t.duration=A=>t.check(gk(A))});function Q(t){return RI(Ik,t)}const Oe=I("ZodStringFormat",(t,e)=>{Ie.init(t,e),wB.init(t,e)}),Sk=I("ZodEmail",(t,e)=>{WF.init(t,e),Oe.init(t,e)}),bg=I("ZodGUID",(t,e)=>{jF.init(t,e),Oe.init(t,e)}),Gs=I("ZodUUID",(t,e)=>{GF.init(t,e),Oe.init(t,e)}),kk=I("ZodURL",(t,e)=>{JF.init(t,e),Oe.init(t,e)}),Ek=I("ZodEmoji",(t,e)=>{XF.init(t,e),Oe.init(t,e)}),$k=I("ZodNanoID",(t,e)=>{YF.init(t,e),Oe.init(t,e)}),Tk=I("ZodCUID",(t,e)=>{qF.init(t,e),Oe.init(t,e)}),Ok=I("ZodCUID2",(t,e)=>{eI.init(t,e),Oe.init(t,e)}),Hk=I("ZodULID",(t,e)=>{tI.init(t,e),Oe.init(t,e)}),Dk=I("ZodXID",(t,e)=>{AI.init(t,e),Oe.init(t,e)}),Lk=I("ZodKSUID",(t,e)=>{nI.init(t,e),Oe.init(t,e)}),Mk=I("ZodIPv4",(t,e)=>{aI.init(t,e),Oe.init(t,e)}),Nk=I("ZodIPv6",(t,e)=>{lI.init(t,e),Oe.init(t,e)}),zk=I("ZodCIDRv4",(t,e)=>{uI.init(t,e),Oe.init(t,e)}),Pk=I("ZodCIDRv6",(t,e)=>{cI.init(t,e),Oe.init(t,e)}),Rk=I("ZodBase64",(t,e)=>{dI.init(t,e),Oe.init(t,e)}),Kk=I("ZodBase64URL",(t,e)=>{hI.init(t,e),Oe.init(t,e)}),Zk=I("ZodE164",(t,e)=>{gI.init(t,e),Oe.init(t,e)}),Vk=I("ZodJWT",(t,e)=>{pI.init(t,e),Oe.init(t,e)}),yB=I("ZodNumber",(t,e)=>{oB.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(i,n,r)=>NS(t,i,n),t.gt=(i,n)=>t.check(wg(i,n)),t.gte=(i,n)=>t.check(ou(i,n)),t.min=(i,n)=>t.check(ou(i,n)),t.lt=(i,n)=>t.check(Bg(i,n)),t.lte=(i,n)=>t.check(su(i,n)),t.max=(i,n)=>t.check(su(i,n)),t.int=i=>t.check(_g(i)),t.safe=i=>t.check(_g(i)),t.positive=i=>t.check(wg(0,i)),t.nonnegative=i=>t.check(ou(0,i)),t.negative=i=>t.check(Bg(0,i)),t.nonpositive=i=>t.check(su(0,i)),t.multipleOf=(i,n)=>t.check(yg(i,n)),t.step=(i,n)=>t.check(yg(i,n)),t.finite=()=>t;const A=t._zod.bag;t.minValue=Math.max(A.minimum??Number.NEGATIVE_INFINITY,A.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(A.maximum??Number.POSITIVE_INFINITY,A.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(A.format??"").includes("int")||Number.isSafeInteger(A.multipleOf??.5),t.isFinite=!0,t.format=A.format??null});function ve(t){return gS(yB,t)}const jk=I("ZodNumberFormat",(t,e)=>{vI.init(t,e),yB.init(t,e)});function _g(t){return mS(jk,t)}const Gk=I("ZodBoolean",(t,e)=>{BI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>zS(t,A,i)});function Ye(t){return pS(Gk,t)}const Wk=I("ZodNull",(t,e)=>{wI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>PS(t,A,i)});function bB(t){return vS(Wk,t)}const Jk=I("ZodUnknown",(t,e)=>{yI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>KS()});function $e(){return BS(Jk)}const Xk=I("ZodNever",(t,e)=>{bI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>RS(t,A,i)});function Yk(t){return wS(Xk,t)}const qk=I("ZodArray",(t,e)=>{_I.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>WS(t,A,i,n),t.element=e.element,t.min=(A,i)=>t.check(Aa(A,i)),t.nonempty=A=>t.check(Aa(1,A)),t.max=(A,i)=>t.check(dB(A,i)),t.length=(A,i)=>t.check(fB(A,i)),t.unwrap=()=>t.element});function se(t,e){return ES(qk,t,e)}const _B=I("ZodObject",(t,e)=>{UI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>JS(t,A,i,n),fe(t,"shape",()=>e.shape),t.keyof=()=>Tt(Object.keys(t._zod.def.shape)),t.catchall=A=>t.clone({...t._zod.def,catchall:A}),t.passthrough=()=>t.clone({...t._zod.def,catchall:$e()}),t.loose=()=>t.clone({...t._zod.def,catchall:$e()}),t.strict=()=>t.clone({...t._zod.def,catchall:Yk()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=A=>Zx(t,A),t.safeExtend=A=>Vx(t,A),t.merge=A=>jx(t,A),t.pick=A=>Rx(t,A),t.omit=A=>Kx(t,A),t.partial=(...A)=>Gx(xB,t,A[0]),t.required=(...A)=>Wx(FB,t,A[0])});function L(t,e){const A={type:"object",shape:t??{},...N(e)};return new _B(A)}function Qt(t,e){return new _B({type:"object",shape:t,catchall:$e(),...N(e)})}const CB=I("ZodUnion",(t,e)=>{uB.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>XS(t,A,i,n),t.options=e.options});function Qe(t,e){return new CB({type:"union",options:t,...N(e)})}const eE=I("ZodDiscriminatedUnion",(t,e)=>{CB.init(t,e),QI.init(t,e)});function UB(t,e,A){return new eE({type:"union",options:e,discriminator:t,...N(A)})}const tE=I("ZodIntersection",(t,e)=>{xI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>YS(t,A,i,n)});function cd(t,e){return new tE({type:"intersection",left:t,right:e})}const AE=I("ZodRecord",(t,e)=>{FI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>qS(t,A,i,n),t.keyType=e.keyType,t.valueType=e.valueType});function Te(t,e,A){return new AE({type:"record",keyType:t,valueType:e,...N(A)})}const Ac=I("ZodEnum",(t,e)=>{II.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(i,n,r)=>ZS(t,i,n),t.enum=e.entries,t.options=Object.values(e.entries);const A=new Set(Object.keys(e.entries));t.extract=(i,n)=>{const r={};for(const s of i)if(A.has(s))r[s]=e.entries[s];else throw new Error(`Key ${s} not found in enum`);return new Ac({...e,checks:[],...N(n),entries:r})},t.exclude=(i,n)=>{const r={...e.entries};for(const s of i)if(A.has(s))delete r[s];else throw new Error(`Key ${s} not found in enum`);return new Ac({...e,checks:[],...N(n),entries:r})}});function Tt(t,e){const A=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new Ac({type:"enum",entries:A,...N(e)})}const nE=I("ZodLiteral",(t,e)=>{SI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>VS(t,A,i),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function P(t,e){return new nE({type:"literal",values:Array.isArray(t)?t:[t],...N(e)})}const iE=I("ZodTransform",(t,e)=>{kI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>GS(t,A),t._zod.parse=(A,i)=>{if(i.direction==="backward")throw new Kv(t.constructor.name);A.addIssue=r=>{if(typeof r=="string")A.issues.push(Dr(r,A.value,e));else{const s=r;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=A.value),s.inst??(s.inst=t),A.issues.push(Dr(s))}};const n=e.transform(A.value,A);return n instanceof Promise?n.then(r=>(A.value=r,A)):(A.value=n,A)}});function QB(t){return new iE({type:"transform",transform:t})}const xB=I("ZodOptional",(t,e)=>{cB.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>pB(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function Me(t){return new xB({type:"optional",innerType:t})}const rE=I("ZodExactOptional",(t,e)=>{EI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>pB(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function sE(t){return new rE({type:"optional",innerType:t})}const oE=I("ZodNullable",(t,e)=>{$I.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>ek(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function Cg(t){return new oE({type:"nullable",innerType:t})}const aE=I("ZodDefault",(t,e)=>{TI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>Ak(t,A,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function lE(t,e){return new aE({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():Gv(e)}})}const uE=I("ZodPrefault",(t,e)=>{OI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>nk(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function cE(t,e){return new uE({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():Gv(e)}})}const FB=I("ZodNonOptional",(t,e)=>{HI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>tk(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function dE(t,e){return new FB({type:"nonoptional",innerType:t,...N(e)})}const fE=I("ZodCatch",(t,e)=>{DI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>ik(t,A,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function hE(t,e){return new fE({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}const gE=I("ZodPipe",(t,e)=>{LI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>rk(t,A,i,n),t.in=e.in,t.out=e.out});function nc(t,e){return new gE({type:"pipe",in:t,out:e})}const mE=I("ZodReadonly",(t,e)=>{MI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>sk(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function pE(t){return new mE({type:"readonly",innerType:t})}const IB=I("ZodCustom",(t,e)=>{NI.init(t,e),Se.init(t,e),t._zod.processJSONSchema=(A,i,n)=>jS(t,A)});function vE(t,e){return $S(IB,t??(()=>!0),e)}function BE(t,e={}){return TS(IB,t,e)}function wE(t){return OS(t)}function SB(t,e){return nc(QB(t),e)}const _n="io.modelcontextprotocol/related-task",Ka="2.0",qe=vE(t=>t!==null&&(typeof t=="object"||typeof t=="function")),kB=Qe([Q(),ve().int()]),EB=Q();Qt({ttl:Qe([ve(),bB()]).optional(),pollInterval:ve().optional()});const yE=L({ttl:ve().optional()}),bE=L({taskId:Q()}),dd=Qt({progressToken:kB.optional(),[_n]:bE.optional()}),Ot=L({_meta:dd.optional()}),is=Ot.extend({task:yE.optional()}),_E=t=>is.safeParse(t).success,tt=L({method:Q(),params:Ot.loose().optional()}),Xt=L({_meta:dd.optional()}),Yt=L({method:Q(),params:Xt.loose().optional()}),At=Qt({_meta:dd.optional()}),rs=Qe([Q(),ve().int()]),$B=L({jsonrpc:P(Ka),id:rs,...tt.shape}).strict(),Ug=t=>$B.safeParse(t).success,TB=L({jsonrpc:P(Ka),...Yt.shape}).strict(),CE=t=>TB.safeParse(t).success,fd=L({jsonrpc:P(Ka),id:rs,result:At}).strict(),Ws=t=>fd.safeParse(t).success;var he;(function(t){t[t.ConnectionClosed=-32e3]="ConnectionClosed",t[t.RequestTimeout=-32001]="RequestTimeout",t[t.ParseError=-32700]="ParseError",t[t.InvalidRequest=-32600]="InvalidRequest",t[t.MethodNotFound=-32601]="MethodNotFound",t[t.InvalidParams=-32602]="InvalidParams",t[t.InternalError=-32603]="InternalError",t[t.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(he||(he={}));const hd=L({jsonrpc:P(Ka),id:rs.optional(),error:L({code:ve().int(),message:Q(),data:$e().optional()})}).strict(),UE=t=>hd.safeParse(t).success,QE=Qe([$B,TB,fd,hd]);Qe([fd,hd]);const gd=At.strict(),xE=Xt.extend({requestId:rs.optional(),reason:Q().optional()}),md=Yt.extend({method:P("notifications/cancelled"),params:xE}),FE=L({src:Q(),mimeType:Q().optional(),sizes:se(Q()).optional(),theme:Tt(["light","dark"]).optional()}),ss=L({icons:se(FE).optional()}),Qi=L({name:Q(),title:Q().optional()}),Za=Qi.extend({...Qi.shape,...ss.shape,version:Q(),websiteUrl:Q().optional(),description:Q().optional()}),IE=cd(L({applyDefaults:Ye().optional()}),Te(Q(),$e())),SE=SB(t=>t&&typeof t=="object"&&!Array.isArray(t)&&Object.keys(t).length===0?{form:{}}:t,cd(L({form:IE.optional(),url:qe.optional()}),Te(Q(),$e()).optional())),kE=Qt({list:qe.optional(),cancel:qe.optional(),requests:Qt({sampling:Qt({createMessage:qe.optional()}).optional(),elicitation:Qt({create:qe.optional()}).optional()}).optional()}),EE=Qt({list:qe.optional(),cancel:qe.optional(),requests:Qt({tools:Qt({call:qe.optional()}).optional()}).optional()}),$E=L({experimental:Te(Q(),qe).optional(),sampling:L({context:qe.optional(),tools:qe.optional()}).optional(),elicitation:SE.optional(),roots:L({listChanged:Ye().optional()}).optional(),tasks:kE.optional()}),TE=Ot.extend({protocolVersion:Q(),capabilities:$E,clientInfo:Za}),OE=tt.extend({method:P("initialize"),params:TE}),HE=L({experimental:Te(Q(),qe).optional(),logging:qe.optional(),completions:qe.optional(),prompts:L({listChanged:Ye().optional()}).optional(),resources:L({subscribe:Ye().optional(),listChanged:Ye().optional()}).optional(),tools:L({listChanged:Ye().optional()}).optional(),tasks:EE.optional()}),DE=At.extend({protocolVersion:Q(),capabilities:HE,serverInfo:Za,instructions:Q().optional()}),LE=Yt.extend({method:P("notifications/initialized"),params:Xt.optional()}),Va=tt.extend({method:P("ping"),params:Ot.optional()}),ME=L({progress:ve(),total:Me(ve()),message:Me(Q())}),NE=L({...Xt.shape,...ME.shape,progressToken:kB}),pd=Yt.extend({method:P("notifications/progress"),params:NE}),zE=Ot.extend({cursor:EB.optional()}),os=tt.extend({params:zE.optional()}),as=At.extend({nextCursor:EB.optional()}),PE=Tt(["working","input_required","completed","failed","cancelled"]),ls=L({taskId:Q(),status:PE,ttl:Qe([ve(),bB()]),createdAt:Q(),lastUpdatedAt:Q(),pollInterval:Me(ve()),statusMessage:Me(Q())}),vd=At.extend({task:ls}),RE=Xt.merge(ls),ia=Yt.extend({method:P("notifications/tasks/status"),params:RE}),Bd=tt.extend({method:P("tasks/get"),params:Ot.extend({taskId:Q()})}),wd=At.merge(ls),yd=tt.extend({method:P("tasks/result"),params:Ot.extend({taskId:Q()})});At.loose();const bd=os.extend({method:P("tasks/list")}),_d=as.extend({tasks:se(ls)}),Cd=tt.extend({method:P("tasks/cancel"),params:Ot.extend({taskId:Q()})}),KE=At.merge(ls),OB=L({uri:Q(),mimeType:Me(Q()),_meta:Te(Q(),$e()).optional()}),HB=OB.extend({text:Q()}),Ud=Q().refine(t=>{try{return atob(t),!0}catch{return!1}},{message:"Invalid Base64 string"}),DB=OB.extend({blob:Ud}),us=Tt(["user","assistant"]),Ni=L({audience:se(us).optional(),priority:ve().min(0).max(1).optional(),lastModified:BB({offset:!0}).optional()}),LB=L({...Qi.shape,...ss.shape,uri:Q(),description:Me(Q()),mimeType:Me(Q()),annotations:Ni.optional(),_meta:Me(Qt({}))}),ZE=L({...Qi.shape,...ss.shape,uriTemplate:Q(),description:Me(Q()),mimeType:Me(Q()),annotations:Ni.optional(),_meta:Me(Qt({}))}),VE=os.extend({method:P("resources/list")}),jE=as.extend({resources:se(LB)}),GE=os.extend({method:P("resources/templates/list")}),WE=as.extend({resourceTemplates:se(ZE)}),Qd=Ot.extend({uri:Q()}),JE=Qd,XE=tt.extend({method:P("resources/read"),params:JE}),YE=At.extend({contents:se(Qe([HB,DB]))}),qE=Yt.extend({method:P("notifications/resources/list_changed"),params:Xt.optional()}),e$=Qd,t$=tt.extend({method:P("resources/subscribe"),params:e$}),A$=Qd,n$=tt.extend({method:P("resources/unsubscribe"),params:A$}),i$=Xt.extend({uri:Q()}),r$=Yt.extend({method:P("notifications/resources/updated"),params:i$}),s$=L({name:Q(),description:Me(Q()),required:Me(Ye())}),o$=L({...Qi.shape,...ss.shape,description:Me(Q()),arguments:Me(se(s$)),_meta:Me(Qt({}))}),a$=os.extend({method:P("prompts/list")}),l$=as.extend({prompts:se(o$)}),u$=Ot.extend({name:Q(),arguments:Te(Q(),Q()).optional()}),c$=tt.extend({method:P("prompts/get"),params:u$}),xd=L({type:P("text"),text:Q(),annotations:Ni.optional(),_meta:Te(Q(),$e()).optional()}),Fd=L({type:P("image"),data:Ud,mimeType:Q(),annotations:Ni.optional(),_meta:Te(Q(),$e()).optional()}),Id=L({type:P("audio"),data:Ud,mimeType:Q(),annotations:Ni.optional(),_meta:Te(Q(),$e()).optional()}),d$=L({type:P("tool_use"),name:Q(),id:Q(),input:Te(Q(),$e()),_meta:Te(Q(),$e()).optional()}),f$=L({type:P("resource"),resource:Qe([HB,DB]),annotations:Ni.optional(),_meta:Te(Q(),$e()).optional()}),h$=LB.extend({type:P("resource_link")}),cs=Qe([xd,Fd,Id,h$,f$]),g$=L({role:us,content:cs}),m$=At.extend({description:Q().optional(),messages:se(g$)}),p$=Yt.extend({method:P("notifications/prompts/list_changed"),params:Xt.optional()}),v$=L({title:Q().optional(),readOnlyHint:Ye().optional(),destructiveHint:Ye().optional(),idempotentHint:Ye().optional(),openWorldHint:Ye().optional()}),B$=L({taskSupport:Tt(["required","optional","forbidden"]).optional()}),Sd=L({...Qi.shape,...ss.shape,description:Q().optional(),inputSchema:L({type:P("object"),properties:Te(Q(),qe).optional(),required:se(Q()).optional()}).catchall($e()),outputSchema:L({type:P("object"),properties:Te(Q(),qe).optional(),required:se(Q()).optional()}).catchall($e()).optional(),annotations:v$.optional(),execution:B$.optional(),_meta:Te(Q(),$e()).optional()}),MB=os.extend({method:P("tools/list")}),w$=as.extend({tools:se(Sd)}),ja=At.extend({content:se(cs).default([]),structuredContent:Te(Q(),$e()).optional(),isError:Ye().optional()});ja.or(At.extend({toolResult:$e()}));const y$=is.extend({name:Q(),arguments:Te(Q(),$e()).optional()}),NB=tt.extend({method:P("tools/call"),params:y$}),b$=Yt.extend({method:P("notifications/tools/list_changed"),params:Xt.optional()});L({autoRefresh:Ye().default(!0),debounceMs:ve().int().nonnegative().default(300)});const zB=Tt(["debug","info","notice","warning","error","critical","alert","emergency"]),_$=Ot.extend({level:zB}),C$=tt.extend({method:P("logging/setLevel"),params:_$}),U$=Xt.extend({level:zB,logger:Q().optional(),data:$e()}),Q$=Yt.extend({method:P("notifications/message"),params:U$}),x$=L({name:Q().optional()}),F$=L({hints:se(x$).optional(),costPriority:ve().min(0).max(1).optional(),speedPriority:ve().min(0).max(1).optional(),intelligencePriority:ve().min(0).max(1).optional()}),I$=L({mode:Tt(["auto","required","none"]).optional()}),S$=L({type:P("tool_result"),toolUseId:Q().describe("The unique identifier for the corresponding tool call."),content:se(cs).default([]),structuredContent:L({}).loose().optional(),isError:Ye().optional(),_meta:Te(Q(),$e()).optional()}),k$=UB("type",[xd,Fd,Id]),ra=UB("type",[xd,Fd,Id,d$,S$]),E$=L({role:us,content:Qe([ra,se(ra)]),_meta:Te(Q(),$e()).optional()}),$$=is.extend({messages:se(E$),modelPreferences:F$.optional(),systemPrompt:Q().optional(),includeContext:Tt(["none","thisServer","allServers"]).optional(),temperature:ve().optional(),maxTokens:ve().int(),stopSequences:se(Q()).optional(),metadata:qe.optional(),tools:se(Sd).optional(),toolChoice:I$.optional()}),T$=tt.extend({method:P("sampling/createMessage"),params:$$}),O$=At.extend({model:Q(),stopReason:Me(Tt(["endTurn","stopSequence","maxTokens"]).or(Q())),role:us,content:k$}),H$=At.extend({model:Q(),stopReason:Me(Tt(["endTurn","stopSequence","maxTokens","toolUse"]).or(Q())),role:us,content:Qe([ra,se(ra)])}),D$=L({type:P("boolean"),title:Q().optional(),description:Q().optional(),default:Ye().optional()}),L$=L({type:P("string"),title:Q().optional(),description:Q().optional(),minLength:ve().optional(),maxLength:ve().optional(),format:Tt(["email","uri","date","date-time"]).optional(),default:Q().optional()}),M$=L({type:Tt(["number","integer"]),title:Q().optional(),description:Q().optional(),minimum:ve().optional(),maximum:ve().optional(),default:ve().optional()}),N$=L({type:P("string"),title:Q().optional(),description:Q().optional(),enum:se(Q()),default:Q().optional()}),z$=L({type:P("string"),title:Q().optional(),description:Q().optional(),oneOf:se(L({const:Q(),title:Q()})),default:Q().optional()}),P$=L({type:P("string"),title:Q().optional(),description:Q().optional(),enum:se(Q()),enumNames:se(Q()).optional(),default:Q().optional()}),R$=Qe([N$,z$]),K$=L({type:P("array"),title:Q().optional(),description:Q().optional(),minItems:ve().optional(),maxItems:ve().optional(),items:L({type:P("string"),enum:se(Q())}),default:se(Q()).optional()}),Z$=L({type:P("array"),title:Q().optional(),description:Q().optional(),minItems:ve().optional(),maxItems:ve().optional(),items:L({anyOf:se(L({const:Q(),title:Q()}))}),default:se(Q()).optional()}),V$=Qe([K$,Z$]),j$=Qe([P$,R$,V$]),G$=Qe([j$,D$,L$,M$]),W$=is.extend({mode:P("form").optional(),message:Q(),requestedSchema:L({type:P("object"),properties:Te(Q(),G$),required:se(Q()).optional()})}),J$=is.extend({mode:P("url"),message:Q(),elicitationId:Q(),url:Q().url()}),X$=Qe([W$,J$]),Y$=tt.extend({method:P("elicitation/create"),params:X$}),q$=Xt.extend({elicitationId:Q()}),e1=Yt.extend({method:P("notifications/elicitation/complete"),params:q$}),t1=At.extend({action:Tt(["accept","decline","cancel"]),content:SB(t=>t===null?void 0:t,Te(Q(),Qe([Q(),ve(),Ye(),se(Q())])).optional())}),A1=L({type:P("ref/resource"),uri:Q()}),n1=L({type:P("ref/prompt"),name:Q()}),i1=Ot.extend({ref:Qe([n1,A1]),argument:L({name:Q(),value:Q()}),context:L({arguments:Te(Q(),Q()).optional()}).optional()}),r1=tt.extend({method:P("completion/complete"),params:i1}),s1=At.extend({completion:Qt({values:se(Q()).max(100),total:Me(ve().int()),hasMore:Me(Ye())})}),o1=L({uri:Q().startsWith("file://"),name:Q().optional(),_meta:Te(Q(),$e()).optional()}),a1=tt.extend({method:P("roots/list"),params:Ot.optional()}),l1=At.extend({roots:se(o1)}),u1=Yt.extend({method:P("notifications/roots/list_changed"),params:Xt.optional()});Qe([Va,OE,r1,C$,c$,a$,VE,GE,XE,t$,n$,NB,MB,Bd,yd,bd,Cd]);Qe([md,pd,LE,u1,ia]);Qe([gd,O$,H$,t1,l1,wd,_d,vd]);Qe([Va,T$,Y$,a1,Bd,yd,bd,Cd]);Qe([md,pd,Q$,r$,qE,b$,p$,ia,e1]);Qe([gd,DE,s1,m$,l$,jE,WE,YE,ja,w$,wd,_d,vd]);class oe extends Error{constructor(e,A,i){super(`MCP error ${e}: ${A}`),this.code=e,this.data=i,this.name="McpError"}static fromError(e,A,i){if(e===he.UrlElicitationRequired&&i){const n=i;if(n.elicitations)return new c1(n.elicitations,A)}return new oe(e,A,i)}}class c1 extends oe{constructor(e,A=`URL elicitation${e.length>1?"s":""} required`){super(he.UrlElicitationRequired,A,{elicitations:e})}get elicitations(){var e;return((e=this.data)==null?void 0:e.elicitations)??[]}}function mn(t){return t==="completed"||t==="failed"||t==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function Qg(t){const e=ok(t),A=e==null?void 0:e.method;if(!A)throw new Error("Schema is missing a method literal");const i=ak(A);if(typeof i!="string")throw new Error("Schema method literal must be a string");return i}function xg(t,e){const A=vB(t,e);if(!A.success)throw A.error;return A.data}const d1=6e4;class f1{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(md,A=>{this._oncancel(A)}),this.setNotificationHandler(pd,A=>{this._onprogress(A)}),this.setRequestHandler(Va,A=>({})),this._taskStore=e==null?void 0:e.taskStore,this._taskMessageQueue=e==null?void 0:e.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Bd,async(A,i)=>{const n=await this._taskStore.getTask(A.params.taskId,i.sessionId);if(!n)throw new oe(he.InvalidParams,"Failed to retrieve task: Task not found");return{...n}}),this.setRequestHandler(yd,async(A,i)=>{const n=async()=>{var o;const r=A.params.taskId;if(this._taskMessageQueue){let a;for(;a=await this._taskMessageQueue.dequeue(r,i.sessionId);){if(a.type==="response"||a.type==="error"){const l=a.message,u=l.id,c=this._requestResolvers.get(u);if(c)if(this._requestResolvers.delete(u),a.type==="response")c(l);else{const d=l,f=new oe(d.error.code,d.error.message,d.error.data);c(f)}else{const d=a.type==="response"?"Response":"Error";this._onerror(new Error(`${d} handler missing for request ${u}`))}continue}await((o=this._transport)==null?void 0:o.send(a.message,{relatedRequestId:i.requestId}))}}const s=await this._taskStore.getTask(r,i.sessionId);if(!s)throw new oe(he.InvalidParams,`Task not found: ${r}`);if(!mn(s.status))return await this._waitForTaskUpdate(r,i.signal),await n();if(mn(s.status)){const a=await this._taskStore.getTaskResult(r,i.sessionId);return this._clearTaskQueue(r),{...a,_meta:{...a._meta,[_n]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(bd,async(A,i)=>{var n;try{const{tasks:r,nextCursor:s}=await this._taskStore.listTasks((n=A.params)==null?void 0:n.cursor,i.sessionId);return{tasks:r,nextCursor:s,_meta:{}}}catch(r){throw new oe(he.InvalidParams,`Failed to list tasks: ${r instanceof Error?r.message:String(r)}`)}}),this.setRequestHandler(Cd,async(A,i)=>{try{const n=await this._taskStore.getTask(A.params.taskId,i.sessionId);if(!n)throw new oe(he.InvalidParams,`Task not found: ${A.params.taskId}`);if(mn(n.status))throw new oe(he.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(A.params.taskId,"cancelled","Client cancelled task execution.",i.sessionId),this._clearTaskQueue(A.params.taskId);const r=await this._taskStore.getTask(A.params.taskId,i.sessionId);if(!r)throw new oe(he.InvalidParams,`Task not found after cancellation: ${A.params.taskId}`);return{_meta:{},...r}}catch(n){throw n instanceof oe?n:new oe(he.InvalidRequest,`Failed to cancel task: ${n instanceof Error?n.message:String(n)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;const A=this._requestHandlerAbortControllers.get(e.params.requestId);A==null||A.abort(e.params.reason)}_setupTimeout(e,A,i,n,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(n,A),startTime:Date.now(),timeout:A,maxTotalTimeout:i,resetTimeoutOnProgress:r,onTimeout:n})}_resetTimeout(e){const A=this._timeoutInfo.get(e);if(!A)return!1;const i=Date.now()-A.startTime;if(A.maxTotalTimeout&&i>=A.maxTotalTimeout)throw this._timeoutInfo.delete(e),oe.fromError(he.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:A.maxTotalTimeout,totalElapsed:i});return clearTimeout(A.timeoutId),A.timeoutId=setTimeout(A.onTimeout,A.timeout),!0}_cleanupTimeout(e){const A=this._timeoutInfo.get(e);A&&(clearTimeout(A.timeoutId),this._timeoutInfo.delete(e))}async connect(e){var r,s,o;if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const A=(r=this.transport)==null?void 0:r.onclose;this._transport.onclose=()=>{A==null||A(),this._onclose()};const i=(s=this.transport)==null?void 0:s.onerror;this._transport.onerror=a=>{i==null||i(a),this._onerror(a)};const n=(o=this._transport)==null?void 0:o.onmessage;this._transport.onmessage=(a,l)=>{n==null||n(a,l),Ws(a)||UE(a)?this._onresponse(a):Ug(a)?this._onrequest(a,l):CE(a)?this._onnotification(a):this._onerror(new Error(`Unknown message type: ${JSON.stringify(a)}`))},await this._transport.start()}_onclose(){var i;const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const n of this._requestHandlerAbortControllers.values())n.abort();this._requestHandlerAbortControllers.clear();const A=oe.fromError(he.ConnectionClosed,"Connection closed");this._transport=void 0,(i=this.onclose)==null||i.call(this);for(const n of e.values())n(A)}_onerror(e){var A;(A=this.onerror)==null||A.call(this,e)}_onnotification(e){const A=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;A!==void 0&&Promise.resolve().then(()=>A(e)).catch(i=>this._onerror(new Error(`Uncaught error in notification handler: ${i}`)))}_onrequest(e,A){var u,c,d,f;const i=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,n=this._transport,r=(d=(c=(u=e.params)==null?void 0:u._meta)==null?void 0:c[_n])==null?void 0:d.taskId;if(i===void 0){const h={jsonrpc:"2.0",id:e.id,error:{code:he.MethodNotFound,message:"Method not found"}};r&&this._taskMessageQueue?this._enqueueTaskMessage(r,{type:"error",message:h,timestamp:Date.now()},n==null?void 0:n.sessionId).catch(g=>this._onerror(new Error(`Failed to enqueue error response: ${g}`))):n==null||n.send(h).catch(g=>this._onerror(new Error(`Failed to send an error response: ${g}`)));return}const s=new AbortController;this._requestHandlerAbortControllers.set(e.id,s);const o=_E(e.params)?e.params.task:void 0,a=this._taskStore?this.requestTaskStore(e,n==null?void 0:n.sessionId):void 0,l={signal:s.signal,sessionId:n==null?void 0:n.sessionId,_meta:(f=e.params)==null?void 0:f._meta,sendNotification:async h=>{if(s.signal.aborted)return;const g={relatedRequestId:e.id};r&&(g.relatedTask={taskId:r}),await this.notification(h,g)},sendRequest:async(h,g,m)=>{var b;if(s.signal.aborted)throw new oe(he.ConnectionClosed,"Request was cancelled");const p={...m,relatedRequestId:e.id};r&&!p.relatedTask&&(p.relatedTask={taskId:r});const B=((b=p.relatedTask)==null?void 0:b.taskId)??r;return B&&a&&await a.updateTaskStatus(B,"input_required"),await this.request(h,g,p)},authInfo:A==null?void 0:A.authInfo,requestId:e.id,requestInfo:A==null?void 0:A.requestInfo,taskId:r,taskStore:a,taskRequestedTtl:o==null?void 0:o.ttl,closeSSEStream:A==null?void 0:A.closeSSEStream,closeStandaloneSSEStream:A==null?void 0:A.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>i(e,l)).then(async h=>{if(s.signal.aborted)return;const g={result:h,jsonrpc:"2.0",id:e.id};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"response",message:g,timestamp:Date.now()},n==null?void 0:n.sessionId):await(n==null?void 0:n.send(g))},async h=>{if(s.signal.aborted)return;const g={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(h.code)?h.code:he.InternalError,message:h.message??"Internal error",...h.data!==void 0&&{data:h.data}}};r&&this._taskMessageQueue?await this._enqueueTaskMessage(r,{type:"error",message:g,timestamp:Date.now()},n==null?void 0:n.sessionId):await(n==null?void 0:n.send(g))}).catch(h=>this._onerror(new Error(`Failed to send response: ${h}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:A,...i}=e.params,n=Number(A),r=this._progressHandlers.get(n);if(!r){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}const s=this._responseHandlers.get(n),o=this._timeoutInfo.get(n);if(o&&s&&o.resetTimeoutOnProgress)try{this._resetTimeout(n)}catch(a){this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),s(a);return}r(i)}_onresponse(e){const A=Number(e.id),i=this._requestResolvers.get(A);if(i){if(this._requestResolvers.delete(A),Ws(e))i(e);else{const s=new oe(e.error.code,e.error.message,e.error.data);i(s)}return}const n=this._responseHandlers.get(A);if(n===void 0){this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(A),this._cleanupTimeout(A);let r=!1;if(Ws(e)&&e.result&&typeof e.result=="object"){const s=e.result;if(s.task&&typeof s.task=="object"){const o=s.task;typeof o.taskId=="string"&&(r=!0,this._taskProgressTokens.set(o.taskId,A))}}if(r||this._progressHandlers.delete(A),Ws(e))n(e);else{const s=oe.fromError(e.error.code,e.error.message,e.error.data);n(s)}}get transport(){return this._transport}async close(){var e;await((e=this._transport)==null?void 0:e.close())}async*requestStream(e,A,i){var s,o;const{task:n}=i??{};if(!n){try{yield{type:"result",result:await this.request(e,A,i)}}catch(a){yield{type:"error",error:a instanceof oe?a:new oe(he.InternalError,String(a))}}return}let r;try{const a=await this.request(e,vd,i);if(a.task)r=a.task.taskId,yield{type:"taskCreated",task:a.task};else throw new oe(he.InternalError,"Task creation did not return a task");for(;;){const l=await this.getTask({taskId:r},i);if(yield{type:"taskStatus",task:l},mn(l.status)){l.status==="completed"?yield{type:"result",result:await this.getTaskResult({taskId:r},A,i)}:l.status==="failed"?yield{type:"error",error:new oe(he.InternalError,`Task ${r} failed`)}:l.status==="cancelled"&&(yield{type:"error",error:new oe(he.InternalError,`Task ${r} was cancelled`)});return}if(l.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId:r},A,i)};return}const u=l.pollInterval??((s=this._options)==null?void 0:s.defaultTaskPollInterval)??1e3;await new Promise(c=>setTimeout(c,u)),(o=i==null?void 0:i.signal)==null||o.throwIfAborted()}}catch(a){yield{type:"error",error:a instanceof oe?a:new oe(he.InternalError,String(a))}}}request(e,A,i){const{relatedRequestId:n,resumptionToken:r,onresumptiontoken:s,task:o,relatedTask:a}=i??{};return new Promise((l,u)=>{var B,b,_,y,w;const c=U=>{u(U)};if(!this._transport){c(new Error("Not connected"));return}if(((B=this._options)==null?void 0:B.enforceStrictCapabilities)===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(U){c(U);return}(b=i==null?void 0:i.signal)==null||b.throwIfAborted();const d=this._requestMessageId++,f={...e,jsonrpc:"2.0",id:d};i!=null&&i.onprogress&&(this._progressHandlers.set(d,i.onprogress),f.params={...e.params,_meta:{...((_=e.params)==null?void 0:_._meta)||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),a&&(f.params={...f.params,_meta:{...((y=f.params)==null?void 0:y._meta)||{},[_n]:a}});const h=U=>{var x;this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),(x=this._transport)==null||x.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:d,reason:String(U)}},{relatedRequestId:n,resumptionToken:r,onresumptiontoken:s}).catch($=>this._onerror(new Error(`Failed to send cancellation: ${$}`)));const F=U instanceof oe?U:new oe(he.RequestTimeout,String(U));u(F)};this._responseHandlers.set(d,U=>{var F;if(!((F=i==null?void 0:i.signal)!=null&&F.aborted)){if(U instanceof Error)return u(U);try{const x=vB(A,U.result);x.success?l(x.data):u(x.error)}catch(x){u(x)}}}),(w=i==null?void 0:i.signal)==null||w.addEventListener("abort",()=>{var U;h((U=i==null?void 0:i.signal)==null?void 0:U.reason)});const g=(i==null?void 0:i.timeout)??d1,m=()=>h(oe.fromError(he.RequestTimeout,"Request timed out",{timeout:g}));this._setupTimeout(d,g,i==null?void 0:i.maxTotalTimeout,m,(i==null?void 0:i.resetTimeoutOnProgress)??!1);const p=a==null?void 0:a.taskId;if(p){const U=F=>{const x=this._responseHandlers.get(d);x?x(F):this._onerror(new Error(`Response handler missing for side-channeled request ${d}`))};this._requestResolvers.set(d,U),this._enqueueTaskMessage(p,{type:"request",message:f,timestamp:Date.now()}).catch(F=>{this._cleanupTimeout(d),u(F)})}else this._transport.send(f,{relatedRequestId:n,resumptionToken:r,onresumptiontoken:s}).catch(U=>{this._cleanupTimeout(d),u(U)})})}async getTask(e,A){return this.request({method:"tasks/get",params:e},wd,A)}async getTaskResult(e,A,i){return this.request({method:"tasks/result",params:e},A,i)}async listTasks(e,A){return this.request({method:"tasks/list",params:e},_d,A)}async cancelTask(e,A){return this.request({method:"tasks/cancel",params:e},KE,A)}async notification(e,A){var o,a,l,u;if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const i=(o=A==null?void 0:A.relatedTask)==null?void 0:o.taskId;if(i){const c={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...((a=e.params)==null?void 0:a._meta)||{},[_n]:A.relatedTask}}};await this._enqueueTaskMessage(i,{type:"notification",message:c,timestamp:Date.now()});return}if((((l=this._options)==null?void 0:l.debouncedNotificationMethods)??[]).includes(e.method)&&!e.params&&!(A!=null&&A.relatedRequestId)&&!(A!=null&&A.relatedTask)){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{var d,f;if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let c={...e,jsonrpc:"2.0"};A!=null&&A.relatedTask&&(c={...c,params:{...c.params,_meta:{...((d=c.params)==null?void 0:d._meta)||{},[_n]:A.relatedTask}}}),(f=this._transport)==null||f.send(c,A).catch(h=>this._onerror(h))});return}let s={...e,jsonrpc:"2.0"};A!=null&&A.relatedTask&&(s={...s,params:{...s.params,_meta:{...((u=s.params)==null?void 0:u._meta)||{},[_n]:A.relatedTask}}}),await this._transport.send(s,A)}setRequestHandler(e,A){const i=Qg(e);this.assertRequestHandlerCapability(i),this._requestHandlers.set(i,(n,r)=>{const s=xg(e,n);return Promise.resolve(A(s,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,A){const i=Qg(e);this._notificationHandlers.set(i,n=>{const r=xg(e,n);return Promise.resolve(A(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const A=this._taskProgressTokens.get(e);A!==void 0&&(this._progressHandlers.delete(A),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,A,i){var r;if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const n=(r=this._options)==null?void 0:r.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,A,i,n)}async _clearTaskQueue(e,A){if(this._taskMessageQueue){const i=await this._taskMessageQueue.dequeueAll(e,A);for(const n of i)if(n.type==="request"&&Ug(n.message)){const r=n.message.id,s=this._requestResolvers.get(r);s?(s(new oe(he.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(r)):this._onerror(new Error(`Resolver missing for request ${r} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,A){var n,r;let i=((n=this._options)==null?void 0:n.defaultTaskPollInterval)??1e3;try{const s=await((r=this._taskStore)==null?void 0:r.getTask(e));s!=null&&s.pollInterval&&(i=s.pollInterval)}catch{}return new Promise((s,o)=>{if(A.aborted){o(new oe(he.InvalidRequest,"Request cancelled"));return}const a=setTimeout(s,i);A.addEventListener("abort",()=>{clearTimeout(a),o(new oe(he.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,A){const i=this._taskStore;if(!i)throw new Error("No task store configured");return{createTask:async n=>{if(!e)throw new Error("No request provided");return await i.createTask(n,e.id,{method:e.method,params:e.params},A)},getTask:async n=>{const r=await i.getTask(n,A);if(!r)throw new oe(he.InvalidParams,"Failed to retrieve task: Task not found");return r},storeTaskResult:async(n,r,s)=>{await i.storeTaskResult(n,r,s,A);const o=await i.getTask(n,A);if(o){const a=ia.parse({method:"notifications/tasks/status",params:o});await this.notification(a),mn(o.status)&&this._cleanupTaskProgressHandler(n)}},getTaskResult:n=>i.getTaskResult(n,A),updateTaskStatus:async(n,r,s)=>{const o=await i.getTask(n,A);if(!o)throw new oe(he.InvalidParams,`Task "${n}" not found - it may have been cleaned up`);if(mn(o.status))throw new oe(he.InvalidParams,`Cannot update task "${n}" from terminal status "${o.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await i.updateTaskStatus(n,r,s,A);const a=await i.getTask(n,A);if(a){const l=ia.parse({method:"notifications/tasks/status",params:a});await this.notification(l),mn(a.status)&&this._cleanupTaskProgressHandler(n)}},listTasks:n=>i.listTasks(n,A)}}}var h1=Object.defineProperty,OA=(t,e)=>{for(var A in e)h1(t,A,{get:e[A],enumerable:!0,configurable:!0,set:i=>e[A]=()=>i})};class g1{constructor(e=window.parent,A){k(this,"eventTarget");k(this,"eventSource");k(this,"messageListener");k(this,"onclose");k(this,"onerror");k(this,"onmessage");k(this,"sessionId");k(this,"setProtocolVersion");this.eventTarget=e,this.eventSource=A,this.messageListener=i=>{var r,s;if(A&&i.source!==this.eventSource){console.debug("Ignoring message from unknown source",i);return}let n=QE.safeParse(i.data);n.success?(console.debug("Parsed message",n.data),(r=this.onmessage)==null||r.call(this,n.data)):(console.error("Failed to parse message",n.error.message,i),(s=this.onerror)==null||s.call(this,Error("Invalid JSON-RPC message received: "+n.error.message)))}}async start(){window.addEventListener("message",this.messageListener)}async send(e,A){console.debug("Sending message",e),this.eventTarget.postMessage(e,"*")}async close(){var e;window.removeEventListener("message",this.messageListener),(e=this.onclose)==null||e.call(this)}}var m1="2026-01-26",v={};OA(v,{xor:()=>iC,xid:()=>x_,void:()=>Y_,uuidv7:()=>B_,uuidv6:()=>v_,uuidv4:()=>p_,uuid:()=>m_,util:()=>Ae,url:()=>w_,uppercase:()=>Al,unknown:()=>Mn,union:()=>El,undefined:()=>J_,ulid:()=>Q_,uint64:()=>G_,uint32:()=>Z_,tuple:()=>qf,trim:()=>al,treeifyError:()=>Aw,transform:()=>Tl,toUpperCase:()=>ul,toLowerCase:()=>ll,toJSONSchema:()=>G0,templateLiteral:()=>pC,symbol:()=>W_,superRefine:()=>Qh,success:()=>hC,stringbool:()=>CC,stringFormat:()=>L_,string:()=>da,strictObject:()=>AC,startsWith:()=>il,slugify:()=>cl,size:()=>ys,setErrorMap:()=>DO,set:()=>lC,safeParseAsync:()=>r_,safeParse:()=>i_,safeEncodeAsync:()=>d_,safeEncode:()=>u_,safeDecodeAsync:()=>f_,safeDecode:()=>c_,registry:()=>Af,regexes:()=>Vn,regex:()=>el,refine:()=>Uh,record:()=>eh,readonly:()=>Bh,property:()=>Ff,promise:()=>vC,prettifyError:()=>iw,preprocess:()=>QC,prefault:()=>dh,positive:()=>Cf,pipe:()=>Pr,partialRecord:()=>sC,parseAsync:()=>n_,parse:()=>A_,overwrite:()=>DA,optional:()=>Nr,object:()=>tC,number:()=>Df,nullish:()=>fC,nullable:()=>zr,null:()=>Pf,normalize:()=>ol,nonpositive:()=>Qf,nonoptional:()=>fh,nonnegative:()=>xf,never:()=>Sl,negative:()=>Uf,nativeEnum:()=>uC,nanoid:()=>__,nan:()=>gC,multipleOf:()=>Ii,minSize:()=>un,minLength:()=>Ln,mime:()=>sl,meta:()=>bC,maxSize:()=>zi,maxLength:()=>bs,map:()=>aC,mac:()=>S_,lte:()=>Gt,lt:()=>an,lowercase:()=>tl,looseRecord:()=>oC,looseObject:()=>nC,locales:()=>tf,literal:()=>cC,length:()=>_s,lazy:()=>bh,ksuid:()=>F_,keyof:()=>eC,jwt:()=>D_,json:()=>UC,iso:()=>kf,ipv6:()=>k_,ipv4:()=>I_,intersection:()=>Xf,int64:()=>j_,int32:()=>K_,int:()=>fa,instanceof:()=>_C,includes:()=>nl,httpUrl:()=>y_,hostname:()=>M_,hex:()=>N_,hash:()=>z_,guid:()=>g_,gte:()=>Ct,gt:()=>ln,globalRegistry:()=>Rt,getErrorMap:()=>LO,function:()=>ha,fromJSONSchema:()=>PO,formatError:()=>Od,float64:()=>R_,float32:()=>P_,flattenError:()=>Td,file:()=>dC,exactOptional:()=>oh,enum:()=>$l,endsWith:()=>rl,encodeAsync:()=>a_,encode:()=>s_,emoji:()=>b_,email:()=>h_,e164:()=>H_,discriminatedUnion:()=>rC,describe:()=>yC,decodeAsync:()=>l_,decode:()=>o_,date:()=>q_,custom:()=>wC,cuid2:()=>U_,cuid:()=>C_,core:()=>PB,config:()=>lt,coerce:()=>FC,codec:()=>mC,clone:()=>qt,cidrv6:()=>$_,cidrv4:()=>E_,check:()=>BC,catch:()=>mh,boolean:()=>Lf,bigint:()=>V_,base64url:()=>O_,base64:()=>T_,array:()=>Ss,any:()=>X_,_function:()=>ha,_default:()=>uh,_ZodString:()=>dl,ZodXor:()=>Gf,ZodXID:()=>Bl,ZodVoid:()=>Vf,ZodUnknown:()=>Kf,ZodUnion:()=>Es,ZodUndefined:()=>Nf,ZodUUID:()=>fA,ZodURL:()=>Qs,ZodULID:()=>vl,ZodType:()=>q,ZodTuple:()=>Yf,ZodTransform:()=>rh,ZodTemplateLiteral:()=>wh,ZodSymbol:()=>Mf,ZodSuccess:()=>hh,ZodStringFormat:()=>_e,ZodString:()=>Us,ZodSet:()=>Ah,ZodRecord:()=>$s,ZodRealError:()=>Dt,ZodReadonly:()=>vh,ZodPromise:()=>_h,ZodPrefault:()=>ch,ZodPipe:()=>Dl,ZodOptional:()=>Ol,ZodObject:()=>ks,ZodNumberFormat:()=>jn,ZodNumber:()=>xs,ZodNullable:()=>ah,ZodNull:()=>zf,ZodNonOptional:()=>Hl,ZodNever:()=>Zf,ZodNanoID:()=>gl,ZodNaN:()=>ph,ZodMap:()=>th,ZodMAC:()=>Hf,ZodLiteral:()=>nh,ZodLazy:()=>yh,ZodKSUID:()=>wl,ZodJWT:()=>Fl,ZodIssueCode:()=>HO,ZodIntersection:()=>Jf,ZodISOTime:()=>Tf,ZodISODuration:()=>Of,ZodISODateTime:()=>Ef,ZodISODate:()=>$f,ZodIPv6:()=>bl,ZodIPv4:()=>yl,ZodGUID:()=>Mr,ZodFunction:()=>Ch,ZodFirstPartyTypeKind:()=>lc,ZodFile:()=>ih,ZodExactOptional:()=>sh,ZodError:()=>OO,ZodEnum:()=>$i,ZodEmoji:()=>hl,ZodEmail:()=>fl,ZodE164:()=>xl,ZodDiscriminatedUnion:()=>Wf,ZodDefault:()=>lh,ZodDate:()=>kl,ZodCustomStringFormat:()=>Pi,ZodCustom:()=>Ts,ZodCodec:()=>Ll,ZodCatch:()=>gh,ZodCUID2:()=>pl,ZodCUID:()=>ml,ZodCIDRv6:()=>Cl,ZodCIDRv4:()=>_l,ZodBoolean:()=>Fs,ZodBigIntFormat:()=>Il,ZodBigInt:()=>Is,ZodBase64URL:()=>Ql,ZodBase64:()=>Ul,ZodArray:()=>jf,ZodAny:()=>Rf,TimePrecision:()=>xb,NEVER:()=>RB,$output:()=>yb,$input:()=>bb,$brand:()=>KB});var PB={};OA(PB,{version:()=>iy,util:()=>Ae,treeifyError:()=>Aw,toJSONSchema:()=>G0,toDotPath:()=>nw,safeParseAsync:()=>sw,safeParse:()=>rw,safeEncodeAsync:()=>W1,safeEncode:()=>j1,safeDecodeAsync:()=>J1,safeDecode:()=>G1,registry:()=>Af,regexes:()=>Vn,process:()=>Be,prettifyError:()=>iw,parseAsync:()=>sc,parse:()=>rc,meta:()=>a0,locales:()=>tf,isValidJWT:()=>Iy,isValidBase64URL:()=>Qy,isValidBase64:()=>Gd,initializeContext:()=>Si,globalRegistry:()=>Rt,globalConfig:()=>sa,formatError:()=>Od,flattenError:()=>Td,finalize:()=>Ei,extractDefs:()=>ki,encodeAsync:()=>Z1,encode:()=>R1,describe:()=>o0,decodeAsync:()=>V1,decode:()=>K1,createToJSONSchemaMethod:()=>u0,createStandardJSONSchemaMethod:()=>Lr,config:()=>lt,clone:()=>qt,_xor:()=>uO,_xid:()=>hf,_void:()=>Xb,_uuidv7:()=>af,_uuidv6:()=>of,_uuidv4:()=>sf,_uuid:()=>rf,_url:()=>qa,_uppercase:()=>Al,_unknown:()=>Wb,_union:()=>lO,_undefined:()=>Vb,_ulid:()=>ff,_uint64:()=>Kb,_uint32:()=>Lb,_tuple:()=>fO,_trim:()=>al,_transform:()=>wO,_toUpperCase:()=>ul,_toLowerCase:()=>ll,_templateLiteral:()=>IO,_symbol:()=>Zb,_superRefine:()=>r0,_success:()=>UO,_stringbool:()=>l0,_stringFormat:()=>Cs,_string:()=>Cb,_startsWith:()=>il,_slugify:()=>cl,_size:()=>ys,_set:()=>mO,_safeParseAsync:()=>ms,_safeParse:()=>gs,_safeEncodeAsync:()=>Pd,_safeEncode:()=>Nd,_safeDecodeAsync:()=>Rd,_safeDecode:()=>zd,_regex:()=>el,_refine:()=>i0,_record:()=>hO,_readonly:()=>FO,_property:()=>Ff,_promise:()=>kO,_positive:()=>Cf,_pipe:()=>xO,_parseAsync:()=>hs,_parse:()=>fs,_overwrite:()=>DA,_optional:()=>yO,_number:()=>Eb,_nullable:()=>bO,_null:()=>jb,_normalize:()=>ol,_nonpositive:()=>Qf,_nonoptional:()=>CO,_nonnegative:()=>xf,_never:()=>Jb,_negative:()=>Uf,_nativeEnum:()=>vO,_nanoid:()=>uf,_nan:()=>e0,_multipleOf:()=>Ii,_minSize:()=>un,_minLength:()=>Ln,_min:()=>Ct,_mime:()=>sl,_maxSize:()=>zi,_maxLength:()=>bs,_max:()=>Gt,_map:()=>gO,_mac:()=>Qb,_lte:()=>Gt,_lt:()=>an,_lowercase:()=>tl,_literal:()=>BO,_length:()=>_s,_lazy:()=>SO,_ksuid:()=>gf,_jwt:()=>_f,_isoTime:()=>Sb,_isoDuration:()=>kb,_isoDateTime:()=>Fb,_isoDate:()=>Ib,_ipv6:()=>pf,_ipv4:()=>mf,_intersection:()=>dO,_int64:()=>Rb,_int32:()=>Db,_int:()=>Tb,_includes:()=>nl,_guid:()=>ca,_gte:()=>Ct,_gt:()=>ln,_float64:()=>Hb,_float32:()=>Ob,_file:()=>A0,_enum:()=>pO,_endsWith:()=>rl,_encodeAsync:()=>Ld,_encode:()=>Hd,_emoji:()=>lf,_email:()=>nf,_e164:()=>bf,_discriminatedUnion:()=>cO,_default:()=>_O,_decodeAsync:()=>Md,_decode:()=>Dd,_date:()=>Yb,_custom:()=>n0,_cuid2:()=>df,_cuid:()=>cf,_coercedString:()=>Ub,_coercedNumber:()=>$b,_coercedDate:()=>qb,_coercedBoolean:()=>Nb,_coercedBigint:()=>Pb,_cidrv6:()=>Bf,_cidrv4:()=>vf,_check:()=>s0,_catch:()=>QO,_boolean:()=>Mb,_bigint:()=>zb,_base64url:()=>yf,_base64:()=>wf,_array:()=>t0,_any:()=>Gb,TimePrecision:()=>xb,NEVER:()=>RB,JSONSchemaGenerator:()=>$O,JSONSchema:()=>TO,Doc:()=>ny,$output:()=>yb,$input:()=>bb,$constructor:()=>C,$brand:()=>KB,$ZodXor:()=>jy,$ZodXID:()=>hy,$ZodVoid:()=>Ny,$ZodUnknown:()=>Ly,$ZodUnion:()=>Ya,$ZodUndefined:()=>Oy,$ZodUUID:()=>sy,$ZodURL:()=>ay,$ZodULID:()=>fy,$ZodType:()=>X,$ZodTuple:()=>Yd,$ZodTransform:()=>Ab,$ZodTemplateLiteral:()=>fb,$ZodSymbol:()=>Ty,$ZodSuccess:()=>ab,$ZodStringFormat:()=>be,$ZodString:()=>ws,$ZodSet:()=>Yy,$ZodRegistry:()=>_b,$ZodRecord:()=>Jy,$ZodRealError:()=>Ht,$ZodReadonly:()=>db,$ZodPromise:()=>gb,$ZodPrefault:()=>sb,$ZodPipe:()=>cb,$ZodOptional:()=>qd,$ZodObjectJIT:()=>Vy,$ZodObject:()=>Zy,$ZodNumberFormat:()=>Ey,$ZodNumber:()=>Wd,$ZodNullable:()=>ib,$ZodNull:()=>Hy,$ZodNonOptional:()=>ob,$ZodNever:()=>My,$ZodNanoID:()=>uy,$ZodNaN:()=>ub,$ZodMap:()=>Xy,$ZodMAC:()=>by,$ZodLiteral:()=>eb,$ZodLazy:()=>mb,$ZodKSUID:()=>gy,$ZodJWT:()=>Sy,$ZodIntersection:()=>Wy,$ZodISOTime:()=>vy,$ZodISODuration:()=>By,$ZodISODateTime:()=>my,$ZodISODate:()=>py,$ZodIPv6:()=>yy,$ZodIPv4:()=>wy,$ZodGUID:()=>ry,$ZodFunction:()=>hb,$ZodFile:()=>tb,$ZodExactOptional:()=>nb,$ZodError:()=>$d,$ZodEnum:()=>qy,$ZodEncodeError:()=>Ga,$ZodEmoji:()=>ly,$ZodEmail:()=>oy,$ZodE164:()=>Fy,$ZodDiscriminatedUnion:()=>Gy,$ZodDefault:()=>rb,$ZodDate:()=>zy,$ZodCustomStringFormat:()=>ky,$ZodCustom:()=>pb,$ZodCodec:()=>ef,$ZodCheckUpperCase:()=>Jw,$ZodCheckStringFormat:()=>Bs,$ZodCheckStartsWith:()=>Yw,$ZodCheckSizeEquals:()=>Kw,$ZodCheckRegex:()=>Gw,$ZodCheckProperty:()=>ey,$ZodCheckOverwrite:()=>Ay,$ZodCheckNumberFormat:()=>Nw,$ZodCheckMultipleOf:()=>Mw,$ZodCheckMinSize:()=>Rw,$ZodCheckMinLength:()=>Vw,$ZodCheckMimeType:()=>ty,$ZodCheckMaxSize:()=>Pw,$ZodCheckMaxLength:()=>Zw,$ZodCheckLowerCase:()=>Ww,$ZodCheckLessThan:()=>Vd,$ZodCheckLengthEquals:()=>jw,$ZodCheckIncludes:()=>Xw,$ZodCheckGreaterThan:()=>jd,$ZodCheckEndsWith:()=>qw,$ZodCheckBigIntFormat:()=>zw,$ZodCheck:()=>ke,$ZodCatch:()=>lb,$ZodCUID2:()=>dy,$ZodCUID:()=>cy,$ZodCIDRv6:()=>Cy,$ZodCIDRv4:()=>_y,$ZodBoolean:()=>Jd,$ZodBigIntFormat:()=>$y,$ZodBigInt:()=>Xd,$ZodBase64URL:()=>xy,$ZodBase64:()=>Uy,$ZodAsyncError:()=>En,$ZodArray:()=>Py,$ZodAny:()=>Dy});var RB=Object.freeze({status:"aborted"});function C(t,e,A){function i(o,a){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:a,constr:s,traits:new Set},enumerable:!1}),o._zod.traits.has(t))return;o._zod.traits.add(t),e(o,a);let l=s.prototype,u=Object.keys(l);for(let c=0;c<u.length;c++){let d=u[c];d in o||(o[d]=l[d].bind(o))}}let n=(A==null?void 0:A.Parent)??Object;class r extends n{}Object.defineProperty(r,"name",{value:t});function s(o){var a;let l=A!=null&&A.Parent?new r:this;i(l,o),(a=l._zod).deferred??(a.deferred=[]);for(let u of l._zod.deferred)u();return l}return Object.defineProperty(s,"init",{value:i}),Object.defineProperty(s,Symbol.hasInstance,{value:o=>{var a,l;return A!=null&&A.Parent&&o instanceof A.Parent?!0:(l=(a=o==null?void 0:o._zod)==null?void 0:a.traits)==null?void 0:l.has(t)}}),Object.defineProperty(s,"name",{value:t}),s}var KB=Symbol("zod_brand");let En=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}};class Ga extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}}var sa={};function lt(t){return t&&Object.assign(sa,t),sa}var Ae={};OA(Ae,{unwrapMessage:()=>cr,uint8ArrayToHex:()=>z1,uint8ArrayToBase64url:()=>M1,uint8ArrayToBase64:()=>ew,stringifyPrimitive:()=>V,slugify:()=>VB,shallowClone:()=>GB,safeExtend:()=>$1,required:()=>H1,randomString:()=>Q1,propertyKeyTypes:()=>aa,promiseAllObject:()=>U1,primitiveTypes:()=>WB,prefixIssues:()=>nA,pick:()=>S1,partial:()=>O1,parsedType:()=>j,optionalKeys:()=>JB,omit:()=>k1,objectClone:()=>b1,numKeys:()=>x1,nullish:()=>Zn,normalizeParams:()=>E,mergeDefs:()=>HA,merge:()=>T1,jsonStringifyReplacer:()=>oa,joinValues:()=>S,issue:()=>la,isPlainObject:()=>Dn,isObject:()=>xi,hexToUint8Array:()=>N1,getSizableOrigin:()=>Ja,getParsedType:()=>F1,getLengthableOrigin:()=>Xa,getEnumValues:()=>kd,getElementAtPath:()=>C1,floatSafeRemainder:()=>ZB,finalizeIssue:()=>Wt,extend:()=>E1,escapeRegex:()=>EA,esc:()=>ic,defineLazy:()=>ee,createTransparentProxy:()=>I1,cloneDef:()=>_1,clone:()=>qt,cleanRegex:()=>Wa,cleanEnum:()=>D1,captureStackTrace:()=>Ed,cached:()=>ds,base64urlToUint8Array:()=>L1,base64ToUint8Array:()=>qB,assignProp:()=>gn,assertNotEqual:()=>v1,assertNever:()=>w1,assertIs:()=>B1,assertEqual:()=>p1,assert:()=>y1,allowsEval:()=>jB,aborted:()=>xn,NUMBER_FORMAT_RANGES:()=>XB,Class:()=>P1,BIGINT_FORMAT_RANGES:()=>YB});function p1(t){return t}function v1(t){return t}function B1(t){}function w1(t){throw Error("Unexpected value in exhaustive check")}function y1(t){}function kd(t){let e=Object.values(t).filter(A=>typeof A=="number");return Object.entries(t).filter(([A,i])=>e.indexOf(+A)===-1).map(([A,i])=>i)}function S(t,e="|"){return t.map(A=>V(A)).join(e)}function oa(t,e){return typeof e=="bigint"?e.toString():e}function ds(t){return{get value(){{let e=t();return Object.defineProperty(this,"value",{value:e}),e}}}}function Zn(t){return t==null}function Wa(t){let e=t.startsWith("^")?1:0,A=t.endsWith("$")?t.length-1:t.length;return t.slice(e,A)}function ZB(t,e){let A=(t.toString().split(".")[1]||"").length,i=e.toString(),n=(i.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(i)){let a=i.match(/\d?e-(\d?)/);a!=null&&a[1]&&(n=Number.parseInt(a[1]))}let r=A>n?A:n,s=Number.parseInt(t.toFixed(r).replace(".","")),o=Number.parseInt(e.toFixed(r).replace(".",""));return s%o/10**r}var Fg=Symbol("evaluating");function ee(t,e,A){let i;Object.defineProperty(t,e,{get(){if(i!==Fg)return i===void 0&&(i=Fg,i=A()),i},set(n){Object.defineProperty(t,e,{value:n})},configurable:!0})}function b1(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function gn(t,e,A){Object.defineProperty(t,e,{value:A,writable:!0,enumerable:!0,configurable:!0})}function HA(...t){let e={};for(let A of t){let i=Object.getOwnPropertyDescriptors(A);Object.assign(e,i)}return Object.defineProperties({},e)}function _1(t){return HA(t._zod.def)}function C1(t,e){return e?e.reduce((A,i)=>A==null?void 0:A[i],t):t}function U1(t){let e=Object.keys(t),A=e.map(i=>t[i]);return Promise.all(A).then(i=>{let n={};for(let r=0;r<e.length;r++)n[e[r]]=i[r];return n})}function Q1(t=10){let e="";for(let A=0;A<t;A++)e+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return e}function ic(t){return JSON.stringify(t)}function VB(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Ed="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function xi(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var jB=ds(()=>{var t;if(typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)!=null&&t.includes("Cloudflare")))return!1;try{return new Function(""),!0}catch{return!1}});function Dn(t){if(xi(t)===!1)return!1;let e=t.constructor;if(e===void 0||typeof e!="function")return!0;let A=e.prototype;return!(xi(A)===!1||Object.prototype.hasOwnProperty.call(A,"isPrototypeOf")===!1)}function GB(t){return Dn(t)?{...t}:Array.isArray(t)?[...t]:t}function x1(t){let e=0;for(let A in t)Object.prototype.hasOwnProperty.call(t,A)&&e++;return e}var F1=t=>{let e=typeof t;switch(e){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw Error(`Unknown data type: ${e}`)}},aa=new Set(["string","number","symbol"]),WB=new Set(["string","number","bigint","boolean","symbol","undefined"]);function EA(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function qt(t,e,A){let i=new t._zod.constr(e??t._zod.def);return(!e||A!=null&&A.parent)&&(i._zod.parent=t),i}function E(t){let e=t;if(!e)return{};if(typeof e=="string")return{error:()=>e};if((e==null?void 0:e.message)!==void 0){if((e==null?void 0:e.error)!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function I1(t){let e;return new Proxy({},{get(A,i,n){return e??(e=t()),Reflect.get(e,i,n)},set(A,i,n,r){return e??(e=t()),Reflect.set(e,i,n,r)},has(A,i){return e??(e=t()),Reflect.has(e,i)},deleteProperty(A,i){return e??(e=t()),Reflect.deleteProperty(e,i)},ownKeys(A){return e??(e=t()),Reflect.ownKeys(e)},getOwnPropertyDescriptor(A,i){return e??(e=t()),Reflect.getOwnPropertyDescriptor(e,i)},defineProperty(A,i,n){return e??(e=t()),Reflect.defineProperty(e,i,n)}})}function V(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function JB(t){return Object.keys(t).filter(e=>t[e]._zod.optin==="optional"&&t[e]._zod.optout==="optional")}var XB={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},YB={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function S1(t,e){let A=t._zod.def,i=A.checks;if(i&&i.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let n=HA(t._zod.def,{get shape(){let r={};for(let s in e){if(!(s in A.shape))throw Error(`Unrecognized key: "${s}"`);e[s]&&(r[s]=A.shape[s])}return gn(this,"shape",r),r},checks:[]});return qt(t,n)}function k1(t,e){let A=t._zod.def,i=A.checks;if(i&&i.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let n=HA(t._zod.def,{get shape(){let r={...t._zod.def.shape};for(let s in e){if(!(s in A.shape))throw Error(`Unrecognized key: "${s}"`);e[s]&&delete r[s]}return gn(this,"shape",r),r},checks:[]});return qt(t,n)}function E1(t,e){if(!Dn(e))throw Error("Invalid input to extend: expected a plain object");let A=t._zod.def.checks;if(A&&A.length>0){let n=t._zod.def.shape;for(let r in e)if(Object.getOwnPropertyDescriptor(n,r)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=HA(t._zod.def,{get shape(){let n={...t._zod.def.shape,...e};return gn(this,"shape",n),n}});return qt(t,i)}function $1(t,e){if(!Dn(e))throw Error("Invalid input to safeExtend: expected a plain object");let A=HA(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e};return gn(this,"shape",i),i}});return qt(t,A)}function T1(t,e){let A=HA(t._zod.def,{get shape(){let i={...t._zod.def.shape,...e._zod.def.shape};return gn(this,"shape",i),i},get catchall(){return e._zod.def.catchall},checks:[]});return qt(t,A)}function O1(t,e,A){let i=e._zod.def.checks;if(i&&i.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let n=HA(e._zod.def,{get shape(){let r=e._zod.def.shape,s={...r};if(A)for(let o in A){if(!(o in r))throw Error(`Unrecognized key: "${o}"`);A[o]&&(s[o]=t?new t({type:"optional",innerType:r[o]}):r[o])}else for(let o in r)s[o]=t?new t({type:"optional",innerType:r[o]}):r[o];return gn(this,"shape",s),s},checks:[]});return qt(e,n)}function H1(t,e,A){let i=HA(e._zod.def,{get shape(){let n=e._zod.def.shape,r={...n};if(A)for(let s in A){if(!(s in r))throw Error(`Unrecognized key: "${s}"`);A[s]&&(r[s]=new t({type:"nonoptional",innerType:n[s]}))}else for(let s in n)r[s]=new t({type:"nonoptional",innerType:n[s]});return gn(this,"shape",r),r}});return qt(e,i)}function xn(t,e=0){var A;if(t.aborted===!0)return!0;for(let i=e;i<t.issues.length;i++)if(((A=t.issues[i])==null?void 0:A.continue)!==!0)return!0;return!1}function nA(t,e){return e.map(A=>{var i;return(i=A).path??(i.path=[]),A.path.unshift(t),A})}function cr(t){return typeof t=="string"?t:t==null?void 0:t.message}function Wt(t,e,A){var n,r,s,o,a,l;let i={...t,path:t.path??[]};if(!t.message){let u=cr((s=(r=(n=t.inst)==null?void 0:n._zod.def)==null?void 0:r.error)==null?void 0:s.call(r,t))??cr((o=e==null?void 0:e.error)==null?void 0:o.call(e,t))??cr((a=A.customError)==null?void 0:a.call(A,t))??cr((l=A.localeError)==null?void 0:l.call(A,t))??"Invalid input";i.message=u}return delete i.inst,delete i.continue,!(e!=null&&e.reportInput)&&delete i.input,i}function Ja(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function Xa(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function j(t){let e=typeof t;switch(e){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let A=t;if(A&&Object.getPrototypeOf(A)!==Object.prototype&&"constructor"in A&&A.constructor)return A.constructor.name}}return e}function la(...t){let[e,A,i]=t;return typeof e=="string"?{message:e,code:"custom",input:A,inst:i}:{...e}}function D1(t){return Object.entries(t).filter(([e,A])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function qB(t){let e=atob(t),A=new Uint8Array(e.length);for(let i=0;i<e.length;i++)A[i]=e.charCodeAt(i);return A}function ew(t){let e="";for(let A=0;A<t.length;A++)e+=String.fromCharCode(t[A]);return btoa(e)}function L1(t){let e=t.replace(/-/g,"+").replace(/_/g,"/"),A="=".repeat((4-e.length%4)%4);return qB(e+A)}function M1(t){return ew(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function N1(t){let e=t.replace(/^0x/,"");if(e.length%2!==0)throw Error("Invalid hex string length");let A=new Uint8Array(e.length/2);for(let i=0;i<e.length;i+=2)A[i/2]=Number.parseInt(e.slice(i,i+2),16);return A}function z1(t){return Array.from(t).map(e=>e.toString(16).padStart(2,"0")).join("")}class P1{constructor(...e){}}var tw=(t,e)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:e,enumerable:!1}),t.message=JSON.stringify(e,oa,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},$d=C("$ZodError",tw),Ht=C("$ZodError",tw,{Parent:Error});function Td(t,e=A=>A.message){let A={},i=[];for(let n of t.issues)n.path.length>0?(A[n.path[0]]=A[n.path[0]]||[],A[n.path[0]].push(e(n))):i.push(e(n));return{formErrors:i,fieldErrors:A}}function Od(t,e=A=>A.message){let A={_errors:[]},i=n=>{for(let r of n.issues)if(r.code==="invalid_union"&&r.errors.length)r.errors.map(s=>i({issues:s}));else if(r.code==="invalid_key")i({issues:r.issues});else if(r.code==="invalid_element")i({issues:r.issues});else if(r.path.length===0)A._errors.push(e(r));else{let s=A,o=0;for(;o<r.path.length;){let a=r.path[o];o!==r.path.length-1?s[a]=s[a]||{_errors:[]}:(s[a]=s[a]||{_errors:[]},s[a]._errors.push(e(r))),s=s[a],o++}}};return i(t),A}function Aw(t,e=A=>A.message){let A={errors:[]},i=(n,r=[])=>{var s,o;for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(l=>i({issues:l},a.path));else if(a.code==="invalid_key")i({issues:a.issues},a.path);else if(a.code==="invalid_element")i({issues:a.issues},a.path);else{let l=[...r,...a.path];if(l.length===0){A.errors.push(e(a));continue}let u=A,c=0;for(;c<l.length;){let d=l[c],f=c===l.length-1;typeof d=="string"?(u.properties??(u.properties={}),(s=u.properties)[d]??(s[d]={errors:[]}),u=u.properties[d]):(u.items??(u.items=[]),(o=u.items)[d]??(o[d]={errors:[]}),u=u.items[d]),f&&u.errors.push(e(a)),c++}}};return i(t),A}function nw(t){let e=[],A=t.map(i=>typeof i=="object"?i.key:i);for(let i of A)typeof i=="number"?e.push(`[${i}]`):typeof i=="symbol"?e.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?e.push(`[${JSON.stringify(i)}]`):(e.length&&e.push("."),e.push(i));return e.join("")}function iw(t){var i;let e=[],A=[...t.issues].sort((n,r)=>(n.path??[]).length-(r.path??[]).length);for(let n of A)e.push(`✖ ${n.message}`),(i=n.path)!=null&&i.length&&e.push(` → at ${nw(n.path)}`);return e.join(`
|
|
46
|
+
`)}var fs=t=>(e,A,i,n)=>{let r=i?Object.assign(i,{async:!1}):{async:!1},s=e._zod.run({value:A,issues:[]},r);if(s instanceof Promise)throw new En;if(s.issues.length){let o=new((n==null?void 0:n.Err)??t)(s.issues.map(a=>Wt(a,r,lt())));throw Ed(o,n==null?void 0:n.callee),o}return s.value},rc=fs(Ht),hs=t=>async(e,A,i,n)=>{let r=i?Object.assign(i,{async:!0}):{async:!0},s=e._zod.run({value:A,issues:[]},r);if(s instanceof Promise&&(s=await s),s.issues.length){let o=new((n==null?void 0:n.Err)??t)(s.issues.map(a=>Wt(a,r,lt())));throw Ed(o,n==null?void 0:n.callee),o}return s.value},sc=hs(Ht),gs=t=>(e,A,i)=>{let n=i?{...i,async:!1}:{async:!1},r=e._zod.run({value:A,issues:[]},n);if(r instanceof Promise)throw new En;return r.issues.length?{success:!1,error:new(t??$d)(r.issues.map(s=>Wt(s,n,lt())))}:{success:!0,data:r.value}},rw=gs(Ht),ms=t=>async(e,A,i)=>{let n=i?Object.assign(i,{async:!0}):{async:!0},r=e._zod.run({value:A,issues:[]},n);return r instanceof Promise&&(r=await r),r.issues.length?{success:!1,error:new t(r.issues.map(s=>Wt(s,n,lt())))}:{success:!0,data:r.value}},sw=ms(Ht),Hd=t=>(e,A,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return fs(t)(e,A,n)},R1=Hd(Ht),Dd=t=>(e,A,i)=>fs(t)(e,A,i),K1=Dd(Ht),Ld=t=>async(e,A,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return hs(t)(e,A,n)},Z1=Ld(Ht),Md=t=>async(e,A,i)=>hs(t)(e,A,i),V1=Md(Ht),Nd=t=>(e,A,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return gs(t)(e,A,n)},j1=Nd(Ht),zd=t=>(e,A,i)=>gs(t)(e,A,i),G1=zd(Ht),Pd=t=>async(e,A,i)=>{let n=i?Object.assign(i,{direction:"backward"}):{direction:"backward"};return ms(t)(e,A,n)},W1=Pd(Ht),Rd=t=>async(e,A,i)=>ms(t)(e,A,i),J1=Rd(Ht),Vn={};OA(Vn,{xid:()=>uw,uuid7:()=>e4,uuid6:()=>q1,uuid4:()=>Y1,uuid:()=>Fi,uppercase:()=>Dw,unicodeEmail:()=>mw,undefined:()=>Ow,ulid:()=>lw,time:()=>Fw,string:()=>Sw,sha512_hex:()=>y4,sha512_base64url:()=>_4,sha512_base64:()=>b4,sha384_hex:()=>v4,sha384_base64url:()=>w4,sha384_base64:()=>B4,sha256_hex:()=>g4,sha256_base64url:()=>p4,sha256_base64:()=>m4,sha1_hex:()=>d4,sha1_base64url:()=>h4,sha1_base64:()=>f4,rfc5322Email:()=>A4,number:()=>Zd,null:()=>Tw,nanoid:()=>dw,md5_hex:()=>l4,md5_base64url:()=>c4,md5_base64:()=>u4,mac:()=>ww,lowercase:()=>Hw,ksuid:()=>cw,ipv6:()=>Bw,ipv4:()=>vw,integer:()=>Ew,idnEmail:()=>n4,html5Email:()=>t4,hostname:()=>s4,hex:()=>a4,guid:()=>hw,extendedDuration:()=>X1,emoji:()=>pw,email:()=>gw,e164:()=>Cw,duration:()=>fw,domain:()=>o4,datetime:()=>Iw,date:()=>Qw,cuid2:()=>aw,cuid:()=>ow,cidrv6:()=>bw,cidrv4:()=>yw,browserEmail:()=>i4,boolean:()=>$w,bigint:()=>kw,base64url:()=>Kd,base64:()=>_w});var ow=/^[cC][^\s-]{8,}$/,aw=/^[0-9a-z]+$/,lw=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,uw=/^[0-9a-vA-V]{20}$/,cw=/^[A-Za-z0-9]{27}$/,dw=/^[a-zA-Z0-9_-]{21}$/,fw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,X1=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,hw=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Fi=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Y1=Fi(4),q1=Fi(6),e4=Fi(7),gw=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,t4=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,A4=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,mw=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,n4=mw,i4=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,r4="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function pw(){return new RegExp(r4,"u")}var vw=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Bw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,ww=t=>{let e=EA(t??":");return new RegExp(`^(?:[0-9A-F]{2}${e}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${e}){5}[0-9a-f]{2}$`)},yw=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,bw=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,_w=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Kd=/^[A-Za-z0-9_-]*$/,s4=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,o4=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Cw=/^\+[1-9]\d{6,14}$/,Uw="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Qw=new RegExp(`^${Uw}$`);function xw(t){return typeof t.precision=="number"?t.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":t.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${t.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function Fw(t){return new RegExp(`^${xw(t)}$`)}function Iw(t){let e=xw({precision:t.precision}),A=["Z"];t.local&&A.push(""),t.offset&&A.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${e}(?:${A.join("|")})`;return new RegExp(`^${Uw}T(?:${i})$`)}var Sw=t=>{let e=t?`[\\s\\S]{${(t==null?void 0:t.minimum)??0},${(t==null?void 0:t.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${e}$`)},kw=/^-?\d+n?$/,Ew=/^-?\d+$/,Zd=/^-?\d+(?:\.\d+)?$/,$w=/^(?:true|false)$/i,Tw=/^null$/i,Ow=/^undefined$/i,Hw=/^[^A-Z]*$/,Dw=/^[^a-z]*$/,a4=/^[0-9a-fA-F]*$/;function ps(t,e){return new RegExp(`^[A-Za-z0-9+/]{${t}}${e}$`)}function vs(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var l4=/^[0-9a-fA-F]{32}$/,u4=ps(22,"=="),c4=vs(22),d4=/^[0-9a-fA-F]{40}$/,f4=ps(27,"="),h4=vs(27),g4=/^[0-9a-fA-F]{64}$/,m4=ps(43,"="),p4=vs(43),v4=/^[0-9a-fA-F]{96}$/,B4=ps(64,""),w4=vs(64),y4=/^[0-9a-fA-F]{128}$/,b4=ps(86,"=="),_4=vs(86),ke=C("$ZodCheck",(t,e)=>{var A;t._zod??(t._zod={}),t._zod.def=e,(A=t._zod).onattach??(A.onattach=[])}),Lw={number:"number",bigint:"bigint",object:"date"},Vd=C("$ZodCheckLessThan",(t,e)=>{ke.init(t,e);let A=Lw[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,r=(e.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value<r&&(e.inclusive?n.maximum=e.value:n.exclusiveMaximum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value<=e.value:i.value<e.value)||i.issues.push({origin:A,code:"too_big",maximum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),jd=C("$ZodCheckGreaterThan",(t,e)=>{ke.init(t,e);let A=Lw[typeof e.value];t._zod.onattach.push(i=>{let n=i._zod.bag,r=(e.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>r&&(e.inclusive?n.minimum=e.value:n.exclusiveMinimum=e.value)}),t._zod.check=i=>{(e.inclusive?i.value>=e.value:i.value>e.value)||i.issues.push({origin:A,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:i.value,inclusive:e.inclusive,inst:t,continue:!e.abort})}}),Mw=C("$ZodCheckMultipleOf",(t,e)=>{ke.init(t,e),t._zod.onattach.push(A=>{var i;(i=A._zod.bag).multipleOf??(i.multipleOf=e.value)}),t._zod.check=A=>{if(typeof A.value!=typeof e.value)throw Error("Cannot mix number and bigint in multiple_of check.");(typeof A.value=="bigint"?A.value%e.value===BigInt(0):ZB(A.value,e.value)===0)||A.issues.push({origin:typeof A.value,code:"not_multiple_of",divisor:e.value,input:A.value,inst:t,continue:!e.abort})}}),Nw=C("$ZodCheckNumberFormat",(t,e)=>{var s;ke.init(t,e),e.format=e.format||"float64";let A=(s=e.format)==null?void 0:s.includes("int"),i=A?"int":"number",[n,r]=XB[e.format];t._zod.onattach.push(o=>{let a=o._zod.bag;a.format=e.format,a.minimum=n,a.maximum=r,A&&(a.pattern=Ew)}),t._zod.check=o=>{let a=o.value;if(A){if(!Number.isInteger(a)){o.issues.push({expected:i,format:e.format,code:"invalid_type",continue:!1,input:a,inst:t});return}if(!Number.isSafeInteger(a)){a>0?o.issues.push({input:a,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort}):o.issues.push({input:a,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:i,inclusive:!0,continue:!e.abort});return}}a<n&&o.issues.push({origin:"number",input:a,code:"too_small",minimum:n,inclusive:!0,inst:t,continue:!e.abort}),a>r&&o.issues.push({origin:"number",input:a,code:"too_big",maximum:r,inclusive:!0,inst:t,continue:!e.abort})}}),zw=C("$ZodCheckBigIntFormat",(t,e)=>{ke.init(t,e);let[A,i]=YB[e.format];t._zod.onattach.push(n=>{let r=n._zod.bag;r.format=e.format,r.minimum=A,r.maximum=i}),t._zod.check=n=>{let r=n.value;r<A&&n.issues.push({origin:"bigint",input:r,code:"too_small",minimum:A,inclusive:!0,inst:t,continue:!e.abort}),r>i&&n.issues.push({origin:"bigint",input:r,code:"too_big",maximum:i,inclusive:!0,inst:t,continue:!e.abort})}}),Pw=C("$ZodCheckMaxSize",(t,e)=>{var A;ke.init(t,e),(A=t._zod.def).when??(A.when=i=>{let n=i.value;return!Zn(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;n.size<=e.maximum||i.issues.push({origin:Ja(n),code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Rw=C("$ZodCheckMinSize",(t,e)=>{var A;ke.init(t,e),(A=t._zod.def).when??(A.when=i=>{let n=i.value;return!Zn(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;n.size>=e.minimum||i.issues.push({origin:Ja(n),code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Kw=C("$ZodCheckSizeEquals",(t,e)=>{var A;ke.init(t,e),(A=t._zod.def).when??(A.when=i=>{let n=i.value;return!Zn(n)&&n.size!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.size,n.maximum=e.size,n.size=e.size}),t._zod.check=i=>{let n=i.value,r=n.size;if(r===e.size)return;let s=r>e.size;i.issues.push({origin:Ja(n),...s?{code:"too_big",maximum:e.size}:{code:"too_small",minimum:e.size},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),Zw=C("$ZodCheckMaxLength",(t,e)=>{var A;ke.init(t,e),(A=t._zod.def).when??(A.when=i=>{let n=i.value;return!Zn(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum<n&&(i._zod.bag.maximum=e.maximum)}),t._zod.check=i=>{let n=i.value;if(n.length<=e.maximum)return;let r=Xa(n);i.issues.push({origin:r,code:"too_big",maximum:e.maximum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),Vw=C("$ZodCheckMinLength",(t,e)=>{var A;ke.init(t,e),(A=t._zod.def).when??(A.when=i=>{let n=i.value;return!Zn(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>n&&(i._zod.bag.minimum=e.minimum)}),t._zod.check=i=>{let n=i.value;if(n.length>=e.minimum)return;let r=Xa(n);i.issues.push({origin:r,code:"too_small",minimum:e.minimum,inclusive:!0,input:n,inst:t,continue:!e.abort})}}),jw=C("$ZodCheckLengthEquals",(t,e)=>{var A;ke.init(t,e),(A=t._zod.def).when??(A.when=i=>{let n=i.value;return!Zn(n)&&n.length!==void 0}),t._zod.onattach.push(i=>{let n=i._zod.bag;n.minimum=e.length,n.maximum=e.length,n.length=e.length}),t._zod.check=i=>{let n=i.value,r=n.length;if(r===e.length)return;let s=Xa(n),o=r>e.length;i.issues.push({origin:s,...o?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:i.value,inst:t,continue:!e.abort})}}),Bs=C("$ZodCheckStringFormat",(t,e)=>{var A,i;ke.init(t,e),t._zod.onattach.push(n=>{let r=n._zod.bag;r.format=e.format,e.pattern&&(r.patterns??(r.patterns=new Set),r.patterns.add(e.pattern))}),e.pattern?(A=t._zod).check??(A.check=n=>{e.pattern.lastIndex=0,!e.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:e.format,input:n.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:t,continue:!e.abort})}):(i=t._zod).check??(i.check=()=>{})}),Gw=C("$ZodCheckRegex",(t,e)=>{Bs.init(t,e),t._zod.check=A=>{e.pattern.lastIndex=0,!e.pattern.test(A.value)&&A.issues.push({origin:"string",code:"invalid_format",format:"regex",input:A.value,pattern:e.pattern.toString(),inst:t,continue:!e.abort})}}),Ww=C("$ZodCheckLowerCase",(t,e)=>{e.pattern??(e.pattern=Hw),Bs.init(t,e)}),Jw=C("$ZodCheckUpperCase",(t,e)=>{e.pattern??(e.pattern=Dw),Bs.init(t,e)}),Xw=C("$ZodCheckIncludes",(t,e)=>{ke.init(t,e);let A=EA(e.includes),i=new RegExp(typeof e.position=="number"?`^.{${e.position}}${A}`:A);e.pattern=i,t._zod.onattach.push(n=>{let r=n._zod.bag;r.patterns??(r.patterns=new Set),r.patterns.add(i)}),t._zod.check=n=>{n.value.includes(e.includes,e.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:n.value,inst:t,continue:!e.abort})}}),Yw=C("$ZodCheckStartsWith",(t,e)=>{ke.init(t,e);let A=new RegExp(`^${EA(e.prefix)}.*`);e.pattern??(e.pattern=A),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(A)}),t._zod.check=i=>{i.value.startsWith(e.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:i.value,inst:t,continue:!e.abort})}}),qw=C("$ZodCheckEndsWith",(t,e)=>{ke.init(t,e);let A=new RegExp(`.*${EA(e.suffix)}$`);e.pattern??(e.pattern=A),t._zod.onattach.push(i=>{let n=i._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(A)}),t._zod.check=i=>{i.value.endsWith(e.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:i.value,inst:t,continue:!e.abort})}});function Ig(t,e,A){t.issues.length&&e.issues.push(...nA(A,t.issues))}var ey=C("$ZodCheckProperty",(t,e)=>{ke.init(t,e),t._zod.check=A=>{let i=e.schema._zod.run({value:A.value[e.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Ig(n,A,e.property));Ig(i,A,e.property)}}),ty=C("$ZodCheckMimeType",(t,e)=>{ke.init(t,e);let A=new Set(e.mime);t._zod.onattach.push(i=>{i._zod.bag.mime=e.mime}),t._zod.check=i=>{A.has(i.value.type)||i.issues.push({code:"invalid_value",values:e.mime,input:i.value.type,inst:t,continue:!e.abort})}}),Ay=C("$ZodCheckOverwrite",(t,e)=>{ke.init(t,e),t._zod.check=A=>{A.value=e.tx(A.value)}});class ny{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let A=e.split(`
|
|
47
|
+
`).filter(r=>r),i=Math.min(...A.map(r=>r.length-r.trimStart().length)),n=A.map(r=>r.slice(i)).map(r=>" ".repeat(this.indent*2)+r);for(let r of n)this.content.push(r)}compile(){let e=Function,A=this==null?void 0:this.args,i=[...((this==null?void 0:this.content)??[""]).map(n=>` ${n}`)];return new e(...A,i.join(`
|
|
48
|
+
`))}}var iy={major:4,minor:3,patch:5},X=C("$ZodType",(t,e)=>{var n;var A;t??(t={}),t._zod.def=e,t._zod.bag=t._zod.bag||{},t._zod.version=iy;let i=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&i.unshift(t);for(let r of i)for(let s of r._zod.onattach)s(t);if(i.length===0)(A=t._zod).deferred??(A.deferred=[]),(n=t._zod.deferred)==null||n.push(()=>{t._zod.run=t._zod.parse});else{let r=(o,a,l)=>{let u=xn(o),c;for(let d of a){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(u)continue;let f=o.issues.length,h=d._zod.check(o);if(h instanceof Promise&&(l==null?void 0:l.async)===!1)throw new En;if(c||h instanceof Promise)c=(c??Promise.resolve()).then(async()=>{await h,o.issues.length!==f&&(u||(u=xn(o,f)))});else{if(o.issues.length===f)continue;u||(u=xn(o,f))}}return c?c.then(()=>o):o},s=(o,a,l)=>{if(xn(o))return o.aborted=!0,o;let u=r(a,i,l);if(u instanceof Promise){if(l.async===!1)throw new En;return u.then(c=>t._zod.parse(c,l))}return t._zod.parse(u,l)};t._zod.run=(o,a)=>{if(a.skipChecks)return t._zod.parse(o,a);if(a.direction==="backward"){let u=t._zod.parse({value:o.value,issues:[]},{...a,skipChecks:!0});return u instanceof Promise?u.then(c=>s(c,o,a)):s(u,o,a)}let l=t._zod.parse(o,a);if(l instanceof Promise){if(a.async===!1)throw new En;return l.then(u=>r(u,i,a))}return r(l,i,a)}}ee(t,"~standard",()=>({validate:r=>{var s;try{let o=rw(t,r);return o.success?{value:o.data}:{issues:(s=o.error)==null?void 0:s.issues}}catch{return sw(t,r).then(a=>{var l;return a.success?{value:a.data}:{issues:(l=a.error)==null?void 0:l.issues}})}},vendor:"zod",version:1}))}),ws=C("$ZodString",(t,e)=>{var A;X.init(t,e),t._zod.pattern=[...((A=t==null?void 0:t._zod.bag)==null?void 0:A.patterns)??[]].pop()??Sw(t._zod.bag),t._zod.parse=(i,n)=>{if(e.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:t}),i}}),be=C("$ZodStringFormat",(t,e)=>{Bs.init(t,e),ws.init(t,e)}),ry=C("$ZodGUID",(t,e)=>{e.pattern??(e.pattern=hw),be.init(t,e)}),sy=C("$ZodUUID",(t,e)=>{if(e.version){let A={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(A===void 0)throw Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=Fi(A))}else e.pattern??(e.pattern=Fi());be.init(t,e)}),oy=C("$ZodEmail",(t,e)=>{e.pattern??(e.pattern=gw),be.init(t,e)}),ay=C("$ZodURL",(t,e)=>{be.init(t,e),t._zod.check=A=>{try{let i=A.value.trim(),n=new URL(i);e.hostname&&(e.hostname.lastIndex=0,!e.hostname.test(n.hostname)&&A.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:A.value,inst:t,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,!e.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol)&&A.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:A.value,inst:t,continue:!e.abort})),e.normalize?A.value=n.href:A.value=i;return}catch{A.issues.push({code:"invalid_format",format:"url",input:A.value,inst:t,continue:!e.abort})}}}),ly=C("$ZodEmoji",(t,e)=>{e.pattern??(e.pattern=pw()),be.init(t,e)}),uy=C("$ZodNanoID",(t,e)=>{e.pattern??(e.pattern=dw),be.init(t,e)}),cy=C("$ZodCUID",(t,e)=>{e.pattern??(e.pattern=ow),be.init(t,e)}),dy=C("$ZodCUID2",(t,e)=>{e.pattern??(e.pattern=aw),be.init(t,e)}),fy=C("$ZodULID",(t,e)=>{e.pattern??(e.pattern=lw),be.init(t,e)}),hy=C("$ZodXID",(t,e)=>{e.pattern??(e.pattern=uw),be.init(t,e)}),gy=C("$ZodKSUID",(t,e)=>{e.pattern??(e.pattern=cw),be.init(t,e)}),my=C("$ZodISODateTime",(t,e)=>{e.pattern??(e.pattern=Iw(e)),be.init(t,e)}),py=C("$ZodISODate",(t,e)=>{e.pattern??(e.pattern=Qw),be.init(t,e)}),vy=C("$ZodISOTime",(t,e)=>{e.pattern??(e.pattern=Fw(e)),be.init(t,e)}),By=C("$ZodISODuration",(t,e)=>{e.pattern??(e.pattern=fw),be.init(t,e)}),wy=C("$ZodIPv4",(t,e)=>{e.pattern??(e.pattern=vw),be.init(t,e),t._zod.bag.format="ipv4"}),yy=C("$ZodIPv6",(t,e)=>{e.pattern??(e.pattern=Bw),be.init(t,e),t._zod.bag.format="ipv6",t._zod.check=A=>{try{new URL(`http://[${A.value}]`)}catch{A.issues.push({code:"invalid_format",format:"ipv6",input:A.value,inst:t,continue:!e.abort})}}}),by=C("$ZodMAC",(t,e)=>{e.pattern??(e.pattern=ww(e.delimiter)),be.init(t,e),t._zod.bag.format="mac"}),_y=C("$ZodCIDRv4",(t,e)=>{e.pattern??(e.pattern=yw),be.init(t,e)}),Cy=C("$ZodCIDRv6",(t,e)=>{e.pattern??(e.pattern=bw),be.init(t,e),t._zod.check=A=>{let i=A.value.split("/");try{if(i.length!==2)throw Error();let[n,r]=i;if(!r)throw Error();let s=Number(r);if(`${s}`!==r||s<0||s>128)throw Error();new URL(`http://[${n}]`)}catch{A.issues.push({code:"invalid_format",format:"cidrv6",input:A.value,inst:t,continue:!e.abort})}}});function Gd(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var Uy=C("$ZodBase64",(t,e)=>{e.pattern??(e.pattern=_w),be.init(t,e),t._zod.bag.contentEncoding="base64",t._zod.check=A=>{Gd(A.value)||A.issues.push({code:"invalid_format",format:"base64",input:A.value,inst:t,continue:!e.abort})}});function Qy(t){if(!Kd.test(t))return!1;let e=t.replace(/[-_]/g,i=>i==="-"?"+":"/"),A=e.padEnd(Math.ceil(e.length/4)*4,"=");return Gd(A)}var xy=C("$ZodBase64URL",(t,e)=>{e.pattern??(e.pattern=Kd),be.init(t,e),t._zod.bag.contentEncoding="base64url",t._zod.check=A=>{Qy(A.value)||A.issues.push({code:"invalid_format",format:"base64url",input:A.value,inst:t,continue:!e.abort})}}),Fy=C("$ZodE164",(t,e)=>{e.pattern??(e.pattern=Cw),be.init(t,e)});function Iy(t,e=null){try{let A=t.split(".");if(A.length!==3)return!1;let[i]=A;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&(n==null?void 0:n.typ)!=="JWT"||!n.alg||e&&(!("alg"in n)||n.alg!==e))}catch{return!1}}var Sy=C("$ZodJWT",(t,e)=>{be.init(t,e),t._zod.check=A=>{Iy(A.value,e.alg)||A.issues.push({code:"invalid_format",format:"jwt",input:A.value,inst:t,continue:!e.abort})}}),ky=C("$ZodCustomStringFormat",(t,e)=>{be.init(t,e),t._zod.check=A=>{e.fn(A.value)||A.issues.push({code:"invalid_format",format:e.format,input:A.value,inst:t,continue:!e.abort})}}),Wd=C("$ZodNumber",(t,e)=>{X.init(t,e),t._zod.pattern=t._zod.bag.pattern??Zd,t._zod.parse=(A,i)=>{if(e.coerce)try{A.value=Number(A.value)}catch{}let n=A.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return A;let r=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:"Infinity":void 0;return A.issues.push({expected:"number",code:"invalid_type",input:n,inst:t,...r?{received:r}:{}}),A}}),Ey=C("$ZodNumberFormat",(t,e)=>{Nw.init(t,e),Wd.init(t,e)}),Jd=C("$ZodBoolean",(t,e)=>{X.init(t,e),t._zod.pattern=$w,t._zod.parse=(A,i)=>{if(e.coerce)try{A.value=!!A.value}catch{}let n=A.value;return typeof n=="boolean"||A.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:t}),A}}),Xd=C("$ZodBigInt",(t,e)=>{X.init(t,e),t._zod.pattern=kw,t._zod.parse=(A,i)=>{if(e.coerce)try{A.value=BigInt(A.value)}catch{}return typeof A.value=="bigint"||A.issues.push({expected:"bigint",code:"invalid_type",input:A.value,inst:t}),A}}),$y=C("$ZodBigIntFormat",(t,e)=>{zw.init(t,e),Xd.init(t,e)}),Ty=C("$ZodSymbol",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>{let n=A.value;return typeof n=="symbol"||A.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:t}),A}}),Oy=C("$ZodUndefined",(t,e)=>{X.init(t,e),t._zod.pattern=Ow,t._zod.values=new Set([void 0]),t._zod.optin="optional",t._zod.optout="optional",t._zod.parse=(A,i)=>{let n=A.value;return typeof n>"u"||A.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:t}),A}}),Hy=C("$ZodNull",(t,e)=>{X.init(t,e),t._zod.pattern=Tw,t._zod.values=new Set([null]),t._zod.parse=(A,i)=>{let n=A.value;return n===null||A.issues.push({expected:"null",code:"invalid_type",input:n,inst:t}),A}}),Dy=C("$ZodAny",(t,e)=>{X.init(t,e),t._zod.parse=A=>A}),Ly=C("$ZodUnknown",(t,e)=>{X.init(t,e),t._zod.parse=A=>A}),My=C("$ZodNever",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>(A.issues.push({expected:"never",code:"invalid_type",input:A.value,inst:t}),A)}),Ny=C("$ZodVoid",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>{let n=A.value;return typeof n>"u"||A.issues.push({expected:"void",code:"invalid_type",input:n,inst:t}),A}}),zy=C("$ZodDate",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>{if(e.coerce)try{A.value=new Date(A.value)}catch{}let n=A.value,r=n instanceof Date;return r&&!Number.isNaN(n.getTime())||A.issues.push({expected:"date",code:"invalid_type",input:n,...r?{received:"Invalid Date"}:{},inst:t}),A}});function Sg(t,e,A){t.issues.length&&e.issues.push(...nA(A,t.issues)),e.value[A]=t.value}var Py=C("$ZodArray",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>{let n=A.value;if(!Array.isArray(n))return A.issues.push({expected:"array",code:"invalid_type",input:n,inst:t}),A;A.value=Array(n.length);let r=[];for(let s=0;s<n.length;s++){let o=n[s],a=e.element._zod.run({value:o,issues:[]},i);a instanceof Promise?r.push(a.then(l=>Sg(l,A,s))):Sg(a,A,s)}return r.length?Promise.all(r).then(()=>A):A}});function ua(t,e,A,i,n){if(t.issues.length){if(n&&!(A in i))return;e.issues.push(...nA(A,t.issues))}t.value===void 0?A in i&&(e.value[A]=void 0):e.value[A]=t.value}function Ry(t){var i,n,r,s;let e=Object.keys(t.shape);for(let o of e)if(!((s=(r=(n=(i=t.shape)==null?void 0:i[o])==null?void 0:n._zod)==null?void 0:r.traits)!=null&&s.has("$ZodType")))throw Error(`Invalid element at key "${o}": expected a Zod schema`);let A=JB(t.shape);return{...t,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(A)}}function Ky(t,e,A,i,n,r){let s=[],o=n.keySet,a=n.catchall._zod,l=a.def.type,u=a.optout==="optional";for(let c in e){if(o.has(c))continue;if(l==="never"){s.push(c);continue}let d=a.run({value:e[c],issues:[]},i);d instanceof Promise?t.push(d.then(f=>ua(f,A,c,e,u))):ua(d,A,c,e,u)}return s.length&&A.issues.push({code:"unrecognized_keys",keys:s,input:e,inst:r}),t.length?Promise.all(t).then(()=>A):A}var Zy=C("$ZodObject",(t,e)=>{var s;if(X.init(t,e),!((s=Object.getOwnPropertyDescriptor(e,"shape"))!=null&&s.get)){let o=e.shape;Object.defineProperty(e,"shape",{get:()=>{let a={...o};return Object.defineProperty(e,"shape",{value:a}),a}})}let A=ds(()=>Ry(e));ee(t._zod,"propValues",()=>{let o=e.shape,a={};for(let l in o){let u=o[l]._zod;if(u.values){a[l]??(a[l]=new Set);for(let c of u.values)a[l].add(c)}}return a});let i=xi,n=e.catchall,r;t._zod.parse=(o,a)=>{r??(r=A.value);let l=o.value;if(!i(l))return o.issues.push({expected:"object",code:"invalid_type",input:l,inst:t}),o;o.value={};let u=[],c=r.shape;for(let d of r.keys){let f=c[d],h=f._zod.optout==="optional",g=f._zod.run({value:l[d],issues:[]},a);g instanceof Promise?u.push(g.then(m=>ua(m,o,d,l,h))):ua(g,o,d,l,h)}return n?Ky(u,l,o,a,A.value,t):u.length?Promise.all(u).then(()=>o):o}}),Vy=C("$ZodObjectJIT",(t,e)=>{Zy.init(t,e);let A=t._zod.parse,i=ds(()=>Ry(e)),n=c=>{var B,b;let d=new ny(["shape","payload","ctx"]),f=i.value,h=_=>{let y=ic(_);return`shape[${y}]._zod.run({ value: input[${y}], issues: [] }, ctx)`};d.write("const input = payload.value;");let g=Object.create(null),m=0;for(let _ of f.keys)g[_]=`key_${m++}`;d.write("const newResult = {};");for(let _ of f.keys){let y=g[_],w=ic(_),U=((b=(B=c[_])==null?void 0:B._zod)==null?void 0:b.optout)==="optional";d.write(`const ${y} = ${h(_)};`),U?d.write(`
|
|
49
|
+
if (${y}.issues.length) {
|
|
50
|
+
if (${w} in input) {
|
|
51
|
+
payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
|
|
52
52
|
...iss,
|
|
53
|
-
path: iss.path ? [${
|
|
53
|
+
path: iss.path ? [${w}, ...iss.path] : [${w}]
|
|
54
54
|
})));
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
if (${
|
|
59
|
-
if (${
|
|
60
|
-
newResult[${
|
|
58
|
+
if (${y}.value === undefined) {
|
|
59
|
+
if (${w} in input) {
|
|
60
|
+
newResult[${w}] = undefined;
|
|
61
61
|
}
|
|
62
62
|
} else {
|
|
63
|
-
newResult[${
|
|
63
|
+
newResult[${w}] = ${y}.value;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
`):
|
|
67
|
-
if (${
|
|
68
|
-
payload.issues = payload.issues.concat(${
|
|
66
|
+
`):d.write(`
|
|
67
|
+
if (${y}.issues.length) {
|
|
68
|
+
payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
|
|
69
69
|
...iss,
|
|
70
|
-
path: iss.path ? [${
|
|
70
|
+
path: iss.path ? [${w}, ...iss.path] : [${w}]
|
|
71
71
|
})));
|
|
72
72
|
}
|
|
73
73
|
|
|
74
|
-
if (${
|
|
75
|
-
if (${
|
|
76
|
-
newResult[${
|
|
74
|
+
if (${y}.value === undefined) {
|
|
75
|
+
if (${w} in input) {
|
|
76
|
+
newResult[${w}] = undefined;
|
|
77
77
|
}
|
|
78
78
|
} else {
|
|
79
|
-
newResult[${
|
|
79
|
+
newResult[${w}] = ${y}.value;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
`)}f.write("payload.value = newResult;"),f.write("return payload;");let b=f.compile();return(w,_)=>b(d,w,_)},s,o=vi,a=!eo.jitless,l=a&&wp.value,u=e.catchall,c;t._zod.parse=(d,f)=>{c??(c=r.value);let h=d.value;return o(h)?a&&l&&(f==null?void 0:f.async)===!1&&f.jitless!==!0?(s||(s=i(e.shape)),d=s(d,f),u?kv([],h,d,f,c,t):d):n(d,f):(d.issues.push({expected:"object",code:"invalid_type",input:h,inst:t}),d)}});function af(t,e,n,r){for(let s of t)if(s.issues.length===0)return e.value=s.value,e;let i=t.filter(s=>!Tn(s));return i.length===1?(e.value=i[0].value,i[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(s=>s.issues.map(o=>vt(o,r,Be())))}),e)}var Zo=y("$ZodUnion",(t,e)=>{H.init(t,e),Y(t._zod,"optin",()=>e.options.some(i=>i._zod.optin==="optional")?"optional":void 0),Y(t._zod,"optout",()=>e.options.some(i=>i._zod.optout==="optional")?"optional":void 0),Y(t._zod,"values",()=>{if(e.options.every(i=>i._zod.values))return new Set(e.options.flatMap(i=>Array.from(i._zod.values)))}),Y(t._zod,"pattern",()=>{if(e.options.every(i=>i._zod.pattern)){let i=e.options.map(s=>s._zod.pattern);return new RegExp(`^(${i.map(s=>Co(s.source)).join("|")})$`)}});let n=e.options.length===1,r=e.options[0]._zod.run;t._zod.parse=(i,s)=>{if(n)return r(i,s);let o=!1,a=[];for(let l of e.options){let u=l._zod.run({value:i.value,issues:[]},s);if(u instanceof Promise)a.push(u),o=!0;else{if(u.issues.length===0)return u;a.push(u)}}return o?Promise.all(a).then(l=>af(l,i,t,s)):af(a,i,t,s)}});function lf(t,e,n,r){let i=t.filter(s=>s.issues.length===0);return i.length===1?(e.value=i[0].value,e):(i.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:t.map(s=>s.issues.map(o=>vt(o,r,Be())))}):e.issues.push({code:"invalid_union",input:e.value,inst:n,errors:[],inclusive:!1}),e)}var wv=y("$ZodXor",(t,e)=>{Zo.init(t,e),e.inclusive=!1;let n=e.options.length===1,r=e.options[0]._zod.run;t._zod.parse=(i,s)=>{if(n)return r(i,s);let o=!1,a=[];for(let l of e.options){let u=l._zod.run({value:i.value,issues:[]},s);u instanceof Promise?(a.push(u),o=!0):a.push(u)}return o?Promise.all(a).then(l=>lf(l,i,t,s)):lf(a,i,t,s)}}),Sv=y("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,Zo.init(t,e);let n=t._zod.parse;Y(t._zod,"propValues",()=>{let i={};for(let s of e.options){let o=s._zod.propValues;if(!o||Object.keys(o).length===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(s)}"`);for(let[a,l]of Object.entries(o)){i[a]||(i[a]=new Set);for(let u of l)i[a].add(u)}}return i});let r=Rr(()=>{var o;let i=e.options,s=new Map;for(let a of i){let l=(o=a._zod.propValues)==null?void 0:o[e.discriminator];if(!l||l.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(a)}"`);for(let u of l){if(s.has(u))throw Error(`Duplicate discriminator value "${String(u)}"`);s.set(u,a)}}return s});t._zod.parse=(i,s)=>{let o=i.value;if(!vi(o))return i.issues.push({code:"invalid_type",expected:"object",input:o,inst:t}),i;let a=r.value.get(o==null?void 0:o[e.discriminator]);return a?a._zod.run(i,s):e.unionFallback?n(i,s):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:o,path:[e.discriminator],inst:t}),i)}}),Iv=y("$ZodIntersection",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>{let i=n.value,s=e.left._zod.run({value:i,issues:[]},r),o=e.right._zod.run({value:i,issues:[]},r);return s instanceof Promise||o instanceof Promise?Promise.all([s,o]).then(([a,l])=>uf(n,a,l)):uf(n,s,o)}});function gl(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(An(t)&&An(e)){let n=Object.keys(e),r=Object.keys(t).filter(s=>n.indexOf(s)!==-1),i={...t,...e};for(let s of r){let o=gl(t[s],e[s]);if(!o.valid)return{valid:!1,mergeErrorPath:[s,...o.mergeErrorPath]};i[s]=o.data}return{valid:!0,data:i}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<t.length;r++){let i=t[r],s=e[r],o=gl(i,s);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function uf(t,e,n){let r=new Map,i;for(let a of e.issues)if(a.code==="unrecognized_keys"){i??(i=a);for(let l of a.keys)r.has(l)||r.set(l,{}),r.get(l).l=!0}else t.issues.push(a);for(let a of n.issues)if(a.code==="unrecognized_keys")for(let l of a.keys)r.has(l)||r.set(l,{}),r.get(l).r=!0;else t.issues.push(a);let s=[...r].filter(([,a])=>a.l&&a.r).map(([a])=>a);if(s.length&&i&&t.issues.push({...i,keys:s}),Tn(t))return t;let o=gl(e.value,n.value);if(!o.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return t.value=o.data,t}var Ru=y("$ZodTuple",(t,e)=>{H.init(t,e);let n=e.items;t._zod.parse=(r,i)=>{let s=r.value;if(!Array.isArray(s))return r.issues.push({input:s,inst:t,expected:"tuple",code:"invalid_type"}),r;r.value=[];let o=[],a=[...n].reverse().findIndex(c=>c._zod.optin!=="optional"),l=a===-1?0:n.length-a;if(!e.rest){let c=s.length>n.length,d=s.length<l-1;if(c||d)return r.issues.push({...c?{code:"too_big",maximum:n.length,inclusive:!0}:{code:"too_small",minimum:n.length},input:s,inst:t,origin:"array"}),r}let u=-1;for(let c of n){if(u++,u>=s.length&&u>=l)continue;let d=c._zod.run({value:s[u],issues:[]},i);d instanceof Promise?o.push(d.then(f=>_s(f,r,u))):_s(d,r,u)}if(e.rest){let c=s.slice(n.length);for(let d of c){u++;let f=e.rest._zod.run({value:d,issues:[]},i);f instanceof Promise?o.push(f.then(h=>_s(h,r,u))):_s(f,r,u)}}return o.length?Promise.all(o).then(()=>r):r}});function _s(t,e,n){t.issues.length&&e.issues.push(...St(n,t.issues)),e.value[n]=t.value}var zv=y("$ZodRecord",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>{let i=n.value;if(!An(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:t}),n;let s=[],o=e.keyType._zod.values;if(o){n.value={};let a=new Set;for(let u of o)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){a.add(typeof u=="number"?u.toString():u);let c=e.valueType._zod.run({value:i[u],issues:[]},r);c instanceof Promise?s.push(c.then(d=>{d.issues.length&&n.issues.push(...St(u,d.issues)),n.value[u]=d.value})):(c.issues.length&&n.issues.push(...St(u,c.issues)),n.value[u]=c.value)}let l;for(let u in i)a.has(u)||(l=l??[],l.push(u));l&&l.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:t,keys:l})}else{n.value={};for(let a of Reflect.ownKeys(i)){if(a==="__proto__")continue;let l=e.keyType._zod.run({value:a,issues:[]},r);if(l instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof a=="string"&&Du.test(a)&&l.issues.length&&l.issues.some(c=>c.code==="invalid_type"&&c.expected==="number")){let c=e.keyType._zod.run({value:Number(a),issues:[]},r);if(c instanceof Promise)throw Error("Async schemas not supported in object keys currently");c.issues.length===0&&(l=c)}if(l.issues.length){e.mode==="loose"?n.value[a]=i[a]:n.issues.push({code:"invalid_key",origin:"record",issues:l.issues.map(c=>vt(c,r,Be())),input:a,path:[a],inst:t});continue}let u=e.valueType._zod.run({value:i[a],issues:[]},r);u instanceof Promise?s.push(u.then(c=>{c.issues.length&&n.issues.push(...St(a,c.issues)),n.value[l.value]=c.value})):(u.issues.length&&n.issues.push(...St(a,u.issues)),n.value[l.value]=u.value)}}return s.length?Promise.all(s).then(()=>n):n}}),Ov=y("$ZodMap",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:t}),n;let s=[];n.value=new Map;for(let[o,a]of i){let l=e.keyType._zod.run({value:o,issues:[]},r),u=e.valueType._zod.run({value:a,issues:[]},r);l instanceof Promise||u instanceof Promise?s.push(Promise.all([l,u]).then(([c,d])=>{cf(c,d,n,o,i,t,r)})):cf(l,u,n,o,i,t,r)}return s.length?Promise.all(s).then(()=>n):n}});function cf(t,e,n,r,i,s,o){t.issues.length&&(no.has(typeof r)?n.issues.push(...St(r,t.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:s,issues:t.issues.map(a=>vt(a,o,Be()))})),e.issues.length&&(no.has(typeof r)?n.issues.push(...St(r,e.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:s,key:r,issues:e.issues.map(a=>vt(a,o,Be()))})),n.value.set(t.value,e.value)}var Tv=y("$ZodSet",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:t,expected:"set",code:"invalid_type"}),n;let s=[];n.value=new Set;for(let o of i){let a=e.valueType._zod.run({value:o,issues:[]},r);a instanceof Promise?s.push(a.then(l=>df(l,n))):df(a,n)}return s.length?Promise.all(s).then(()=>n):n}});function df(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var Dv=y("$ZodEnum",(t,e)=>{H.init(t,e);let n=gu(e.entries),r=new Set(n);t._zod.values=r,t._zod.pattern=new RegExp(`^(${n.filter(i=>no.has(typeof i)).map(i=>typeof i=="string"?Ht(i):i.toString()).join("|")})$`),t._zod.parse=(i,s)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:n,input:o,inst:t}),i}}),Pv=y("$ZodLiteral",(t,e)=>{if(H.init(t,e),e.values.length===0)throw Error("Cannot create literal schema with no valid values");let n=new Set(e.values);t._zod.values=n,t._zod.pattern=new RegExp(`^(${e.values.map(r=>typeof r=="string"?Ht(r):r?Ht(r.toString()):String(r)).join("|")})$`),t._zod.parse=(r,i)=>{let s=r.value;return n.has(s)||r.issues.push({code:"invalid_value",values:e.values,input:s,inst:t}),r}}),Ev=y("$ZodFile",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>{let i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:t}),n}}),Mv=y("$ZodTransform",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new No(t.constructor.name);let i=e.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(s=>(n.value=s,n));if(i instanceof Promise)throw new Mn;return n.value=i,n}});function ff(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}var Zu=y("$ZodOptional",(t,e)=>{H.init(t,e),t._zod.optin="optional",t._zod.optout="optional",Y(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),Y(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${Co(n.source)})?$`):void 0}),t._zod.parse=(n,r)=>{if(e.innerType._zod.optin==="optional"){let i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>ff(s,n.value)):ff(i,n.value)}return n.value===void 0?n:e.innerType._zod.run(n,r)}}),Nv=y("$ZodExactOptional",(t,e)=>{Zu.init(t,e),Y(t._zod,"values",()=>e.innerType._zod.values),Y(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(n,r)=>e.innerType._zod.run(n,r)}),Cv=y("$ZodNullable",(t,e)=>{H.init(t,e),Y(t._zod,"optin",()=>e.innerType._zod.optin),Y(t._zod,"optout",()=>e.innerType._zod.optout),Y(t._zod,"pattern",()=>{let n=e.innerType._zod.pattern;return n?new RegExp(`^(${Co(n.source)}|null)$`):void 0}),Y(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(n,r)=>n.value===null?n:e.innerType._zod.run(n,r)}),Av=y("$ZodDefault",(t,e)=>{H.init(t,e),t._zod.optin="optional",Y(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);if(n.value===void 0)return n.value=e.defaultValue,n;let i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>hf(s,e)):hf(i,e)}});function hf(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var Rv=y("$ZodPrefault",(t,e)=>{H.init(t,e),t._zod.optin="optional",Y(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=e.defaultValue),e.innerType._zod.run(n,r))}),Zv=y("$ZodNonOptional",(t,e)=>{H.init(t,e),Y(t._zod,"values",()=>{let n=e.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),t._zod.parse=(n,r)=>{let i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>mf(s,t)):mf(i,t)}});function mf(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var jv=y("$ZodSuccess",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new No("ZodSuccess");let i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>(n.value=s.issues.length===0,n)):(n.value=i.issues.length===0,n)}}),Uv=y("$ZodCatch",(t,e)=>{H.init(t,e),Y(t._zod,"optin",()=>e.innerType._zod.optin),Y(t._zod,"optout",()=>e.innerType._zod.optout),Y(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);let i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(s=>(n.value=s.value,s.issues.length&&(n.value=e.catchValue({...n,error:{issues:s.issues.map(o=>vt(o,r,Be()))},input:n.value}),n.issues=[]),n)):(n.value=i.value,i.issues.length&&(n.value=e.catchValue({...n,error:{issues:i.issues.map(s=>vt(s,r,Be()))},input:n.value}),n.issues=[]),n)}}),Lv=y("$ZodNaN",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:t,expected:"nan",code:"invalid_type"}),n)}),Fv=y("$ZodPipe",(t,e)=>{H.init(t,e),Y(t._zod,"values",()=>e.in._zod.values),Y(t._zod,"optin",()=>e.in._zod.optin),Y(t._zod,"optout",()=>e.out._zod.optout),Y(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,r)=>{if(r.direction==="backward"){let s=e.out._zod.run(n,r);return s instanceof Promise?s.then(o=>ks(o,e.in,r)):ks(s,e.in,r)}let i=e.in._zod.run(n,r);return i instanceof Promise?i.then(s=>ks(s,e.out,r)):ks(i,e.out,r)}});function ks(t,e,n){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},n)}var ju=y("$ZodCodec",(t,e)=>{H.init(t,e),Y(t._zod,"values",()=>e.in._zod.values),Y(t._zod,"optin",()=>e.in._zod.optin),Y(t._zod,"optout",()=>e.out._zod.optout),Y(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){let i=e.in._zod.run(n,r);return i instanceof Promise?i.then(s=>$s(s,e,r)):$s(i,e,r)}else{let i=e.out._zod.run(n,r);return i instanceof Promise?i.then(s=>$s(s,e,r)):$s(i,e,r)}}});function $s(t,e,n){if(t.issues.length)return t.aborted=!0,t;if((n.direction||"forward")==="forward"){let r=e.transform(t.value,t);return r instanceof Promise?r.then(i=>xs(t,i,e.out,n)):xs(t,r,e.out,n)}else{let r=e.reverseTransform(t.value,t);return r instanceof Promise?r.then(i=>xs(t,i,e.in,n)):xs(t,r,e.in,n)}}function xs(t,e,n,r){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:e,issues:t.issues},r)}var Vv=y("$ZodReadonly",(t,e)=>{H.init(t,e),Y(t._zod,"propValues",()=>e.innerType._zod.propValues),Y(t._zod,"values",()=>e.innerType._zod.values),Y(t._zod,"optin",()=>{var n,r;return(r=(n=e.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),Y(t._zod,"optout",()=>{var n,r;return(r=(n=e.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),t._zod.parse=(n,r)=>{if(r.direction==="backward")return e.innerType._zod.run(n,r);let i=e.innerType._zod.run(n,r);return i instanceof Promise?i.then(pf):pf(i)}});function pf(t){return t.value=Object.freeze(t.value),t}var Wv=y("$ZodTemplateLiteral",(t,e)=>{H.init(t,e);let n=[];for(let r of e.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);let i=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!i)throw Error(`Invalid template literal part: ${r._zod.traits}`);let s=i.startsWith("^")?1:0,o=i.endsWith("$")?i.length-1:i.length;n.push(i.slice(s,o))}else if(r===null||Ip.has(typeof r))n.push(Ht(`${r}`));else throw Error(`Invalid template literal part: ${r}`);t._zod.pattern=new RegExp(`^${n.join("")}$`),t._zod.parse=(r,i)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:t,expected:"string",code:"invalid_type"}),r):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),r)}),Hv=y("$ZodFunction",(t,e)=>(H.init(t,e),t._def=e,t._zod.def=e,t.implement=n=>{if(typeof n!="function")throw Error("implement() must be called with a function");return function(...r){let i=t._def.input?ml(t._def.input,r):r,s=Reflect.apply(n,this,i);return t._def.output?ml(t._def.output,s):s}},t.implementAsync=n=>{if(typeof n!="function")throw Error("implementAsync() must be called with a function");return async function(...r){let i=t._def.input?await pl(t._def.input,r):r,s=await Reflect.apply(n,this,i);return t._def.output?await pl(t._def.output,s):s}},t._zod.parse=(n,r)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:t}),n):(t._def.output&&t._def.output._zod.def.type==="promise"?n.value=t.implementAsync(n.value):n.value=t.implement(n.value),n),t.input=(...n)=>{let r=t.constructor;return Array.isArray(n[0])?new r({type:"function",input:new Ru({type:"tuple",items:n[0],rest:n[1]}),output:t._def.output}):new r({type:"function",input:n[0],output:t._def.output})},t.output=n=>new t.constructor({type:"function",input:t._def.input,output:n}),t)),Bv=y("$ZodPromise",(t,e)=>{H.init(t,e),t._zod.parse=(n,r)=>Promise.resolve(n.value).then(i=>e.innerType._zod.run({value:i,issues:[]},r))}),qv=y("$ZodLazy",(t,e)=>{H.init(t,e),Y(t._zod,"innerType",()=>e.getter()),Y(t._zod,"pattern",()=>{var n,r;return(r=(n=t._zod.innerType)==null?void 0:n._zod)==null?void 0:r.pattern}),Y(t._zod,"propValues",()=>{var n,r;return(r=(n=t._zod.innerType)==null?void 0:n._zod)==null?void 0:r.propValues}),Y(t._zod,"optin",()=>{var n,r;return((r=(n=t._zod.innerType)==null?void 0:n._zod)==null?void 0:r.optin)??void 0}),Y(t._zod,"optout",()=>{var n,r;return((r=(n=t._zod.innerType)==null?void 0:n._zod)==null?void 0:r.optout)??void 0}),t._zod.parse=(n,r)=>t._zod.innerType._zod.run(n,r)}),Jv=y("$ZodCustom",(t,e)=>{ke.init(t,e),H.init(t,e),t._zod.parse=(n,r)=>n,t._zod.check=n=>{let r=n.value,i=e.fn(r);if(i instanceof Promise)return i.then(s=>gf(s,n,r,t));gf(i,n,r,t)}});function gf(t,e,n,r){if(!t){let i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),e.issues.push(io(i))}}var Uu={};qt(Uu,{zhTW:()=>MD,zhCN:()=>PD,yo:()=>CD,vi:()=>TD,uz:()=>zD,ur:()=>SD,uk:()=>Kv,ua:()=>xD,tr:()=>kD,th:()=>yD,ta:()=>vD,sv:()=>pD,sl:()=>hD,ru:()=>dD,pt:()=>uD,ps:()=>sD,pl:()=>aD,ota:()=>iD,no:()=>tD,nl:()=>QT,ms:()=>KT,mk:()=>YT,lt:()=>qT,ko:()=>HT,km:()=>Gv,kh:()=>VT,ka:()=>LT,ja:()=>jT,it:()=>RT,is:()=>CT,id:()=>MT,hy:()=>PT,hu:()=>TT,he:()=>zT,frCA:()=>ST,fr:()=>xT,fi:()=>kT,fa:()=>yT,es:()=>vT,eo:()=>pT,en:()=>Yv,de:()=>fT,da:()=>cT,cs:()=>lT,ca:()=>oT,bg:()=>rT,be:()=>nT,az:()=>eT,ar:()=>X1});var K1=()=>{let t={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function e(i){return t[i]??null}let n={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${i.expected}، ولكن تم إدخال ${a}`:`مدخلات غير مقبولة: يفترض إدخال ${s}، ولكن تم إدخال ${a}`}case"invalid_value":return i.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${F(i.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?` أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${s} ${i.maximum.toString()} ${o.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${i.origin??"القيمة"} ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${s} ${i.minimum.toString()} ${o.unit}`:`أصغر من اللازم: يفترض لـ ${i.origin} أن يكون ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${i.prefix}"`:s.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${s.suffix}"`:s.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${s.includes}"`:s.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${s.pattern}`:`${n[s.format]??i.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${i.divisor}`;case"unrecognized_keys":return`معرف${i.keys.length>1?"ات":""} غريب${i.keys.length>1?"ة":""}: ${T(i.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${i.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${i.origin}`;default:return"مدخل غير مقبول"}}};function X1(){return{localeError:K1()}}var Q1=()=>{let t={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function e(i){return t[i]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Yanlış dəyər: gözlənilən instanceof ${i.expected}, daxil olan ${a}`:`Yanlış dəyər: gözlənilən ${s}, daxil olan ${a}`}case"invalid_value":return i.values.length===1?`Yanlış dəyər: gözlənilən ${F(i.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${s}${i.maximum.toString()} ${o.unit??"element"}`:`Çox böyük: gözlənilən ${i.origin??"dəyər"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Çox kiçik: gözlənilən ${i.origin} ${s}${i.minimum.toString()} ${o.unit}`:`Çox kiçik: gözlənilən ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Yanlış mətn: "${s.prefix}" ilə başlamalıdır`:s.format==="ends_with"?`Yanlış mətn: "${s.suffix}" ilə bitməlidir`:s.format==="includes"?`Yanlış mətn: "${s.includes}" daxil olmalıdır`:s.format==="regex"?`Yanlış mətn: ${s.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[s.format]??i.format}`}case"not_multiple_of":return`Yanlış ədəd: ${i.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${i.keys.length>1?"lar":""}: ${T(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${i.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function eT(){return{localeError:Q1()}}function vf(t,e,n,r){let i=Math.abs(t),s=i%10,o=i%100;return o>=11&&o<=19?r:s===1?e:s>=2&&s<=4?n:r}var tT=()=>{let t={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function e(i){return t[i]??null}let n={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},r={nan:"NaN",number:"лік",array:"масіў"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Няправільны ўвод: чакаўся instanceof ${i.expected}, атрымана ${a}`:`Няправільны ўвод: чакаўся ${s}, атрымана ${a}`}case"invalid_value":return i.values.length===1?`Няправільны ўвод: чакалася ${F(i.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);if(o){let a=Number(i.maximum),l=vf(a,o.unit.one,o.unit.few,o.unit.many);return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна ${o.verb} ${s}${i.maximum.toString()} ${l}`}return`Занадта вялікі: чакалася, што ${i.origin??"значэнне"} павінна быць ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);if(o){let a=Number(i.minimum),l=vf(a,o.unit.one,o.unit.few,o.unit.many);return`Занадта малы: чакалася, што ${i.origin} павінна ${o.verb} ${s}${i.minimum.toString()} ${l}`}return`Занадта малы: чакалася, што ${i.origin} павінна быць ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${s.prefix}"`:s.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${s.suffix}"`:s.format==="includes"?`Няправільны радок: павінен змяшчаць "${s.includes}"`:s.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${s.pattern}`:`Няправільны ${n[s.format]??i.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${i.keys.length>1?"ключы":"ключ"}: ${T(i.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${i.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${i.origin}`;default:return"Няправільны ўвод"}}};function nT(){return{localeError:tT()}}var iT=()=>{let t={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function e(i){return t[i]??null}let n={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},r={nan:"NaN",number:"число",array:"масив"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Невалиден вход: очакван instanceof ${i.expected}, получен ${a}`:`Невалиден вход: очакван ${s}, получен ${a}`}case"invalid_value":return i.values.length===1?`Невалиден вход: очакван ${F(i.values[0])}`:`Невалидна опция: очаквано едно от ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Твърде голямо: очаква се ${i.origin??"стойност"} да съдържа ${s}${i.maximum.toString()} ${o.unit??"елемента"}`:`Твърде голямо: очаква се ${i.origin??"стойност"} да бъде ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Твърде малко: очаква се ${i.origin} да съдържа ${s}${i.minimum.toString()} ${o.unit}`:`Твърде малко: очаква се ${i.origin} да бъде ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;if(s.format==="starts_with")return`Невалиден низ: трябва да започва с "${s.prefix}"`;if(s.format==="ends_with")return`Невалиден низ: трябва да завършва с "${s.suffix}"`;if(s.format==="includes")return`Невалиден низ: трябва да включва "${s.includes}"`;if(s.format==="regex")return`Невалиден низ: трябва да съвпада с ${s.pattern}`;let o="Невалиден";return s.format==="emoji"&&(o="Невалидно"),s.format==="datetime"&&(o="Невалидно"),s.format==="date"&&(o="Невалидна"),s.format==="time"&&(o="Невалидно"),s.format==="duration"&&(o="Невалидна"),`${o} ${n[s.format]??i.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${i.divisor}`;case"unrecognized_keys":return`Неразпознат${i.keys.length>1?"и":""} ключ${i.keys.length>1?"ове":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${i.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${i.origin}`;default:return"Невалиден вход"}}};function rT(){return{localeError:iT()}}var sT=()=>{let t={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(i){return t[i]??null}let n={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Tipus invàlid: s'esperava instanceof ${i.expected}, s'ha rebut ${a}`:`Tipus invàlid: s'esperava ${s}, s'ha rebut ${a}`}case"invalid_value":return i.values.length===1?`Valor invàlid: s'esperava ${F(i.values[0])}`:`Opció invàlida: s'esperava una de ${T(i.values," o ")}`;case"too_big":{let s=i.inclusive?"com a màxim":"menys de",o=e(i.origin);return o?`Massa gran: s'esperava que ${i.origin??"el valor"} contingués ${s} ${i.maximum.toString()} ${o.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?"com a mínim":"més de",o=e(i.origin);return o?`Massa petit: s'esperava que ${i.origin} contingués ${s} ${i.minimum.toString()} ${o.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Format invàlid: ha de començar amb "${s.prefix}"`:s.format==="ends_with"?`Format invàlid: ha d'acabar amb "${s.suffix}"`:s.format==="includes"?`Format invàlid: ha d'incloure "${s.includes}"`:s.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${s.pattern}`:`Format invàlid per a ${n[s.format]??i.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${i.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${i.origin}`;default:return"Entrada invàlida"}}};function oT(){return{localeError:sT()}}var aT=()=>{let t={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function e(i){return t[i]??null}let n={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},r={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Neplatný vstup: očekáváno instanceof ${i.expected}, obdrženo ${a}`:`Neplatný vstup: očekáváno ${s}, obdrženo ${a}`}case"invalid_value":return i.values.length===1?`Neplatný vstup: očekáváno ${F(i.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Hodnota je příliš velká: ${i.origin??"hodnota"} musí mít ${s}${i.maximum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš velká: ${i.origin??"hodnota"} musí být ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Hodnota je příliš malá: ${i.origin??"hodnota"} musí mít ${s}${i.minimum.toString()} ${o.unit??"prvků"}`:`Hodnota je příliš malá: ${i.origin??"hodnota"} musí být ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Neplatný řetězec: musí začínat na "${s.prefix}"`:s.format==="ends_with"?`Neplatný řetězec: musí končit na "${s.suffix}"`:s.format==="includes"?`Neplatný řetězec: musí obsahovat "${s.includes}"`:s.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${s.pattern}`:`Neplatný formát ${n[s.format]??i.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${i.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${T(i.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${i.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${i.origin}`;default:return"Neplatný vstup"}}};function lT(){return{localeError:aT()}}var uT=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(i){return t[i]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${a}`:`Ugyldigt input: forventede ${s}, fik ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig værdi: forventede ${F(i.values[0])}`:`Ugyldigt valg: forventede en af følgende ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin),a=r[i.origin]??i.origin;return o?`For stor: forventede ${a??"value"} ${o.verb} ${s} ${i.maximum.toString()} ${o.unit??"elementer"}`:`For stor: forventede ${a??"value"} havde ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin),a=r[i.origin]??i.origin;return o?`For lille: forventede ${a} ${o.verb} ${s} ${i.minimum.toString()} ${o.unit}`:`For lille: forventede ${a} havde ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ugyldig streng: skal starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: skal ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: skal indeholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: skal matche mønsteret ${s.pattern}`:`Ugyldig ${n[s.format]??i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${T(i.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${i.origin}`;default:return"Ugyldigt input"}}};function cT(){return{localeError:uT()}}var dT=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(i){return t[i]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},r={nan:"NaN",number:"Zahl",array:"Array"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Ungültige Eingabe: erwartet instanceof ${i.expected}, erhalten ${a}`:`Ungültige Eingabe: erwartet ${s}, erhalten ${a}`}case"invalid_value":return i.values.length===1?`Ungültige Eingabe: erwartet ${F(i.values[0])}`:`Ungültige Option: erwartet eine von ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Zu groß: erwartet, dass ${i.origin??"Wert"} ${s}${i.maximum.toString()} ${o.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${i.origin??"Wert"} ${s}${i.maximum.toString()} ist`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Zu klein: erwartet, dass ${i.origin} ${s}${i.minimum.toString()} ${o.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${s}${i.minimum.toString()} ist`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ungültiger String: muss mit "${s.prefix}" beginnen`:s.format==="ends_with"?`Ungültiger String: muss mit "${s.suffix}" enden`:s.format==="includes"?`Ungültiger String: muss "${s.includes}" enthalten`:s.format==="regex"?`Ungültiger String: muss dem Muster ${s.pattern} entsprechen`:`Ungültig: ${n[s.format]??i.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${T(i.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${i.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${i.origin}`;default:return"Ungültige Eingabe"}}};function fT(){return{localeError:dT()}}var hT=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(i){return t[i]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return`Invalid input: expected ${s}, received ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${F(i.values[0])}`:`Invalid option: expected one of ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Too big: expected ${i.origin??"value"} to have ${s}${i.maximum.toString()} ${o.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${o.unit}`:`Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Invalid string: must start with "${s.prefix}"`:s.format==="ends_with"?`Invalid string: must end with "${s.suffix}"`:s.format==="includes"?`Invalid string: must include "${s.includes}"`:s.format==="regex"?`Invalid string: must match pattern ${s.pattern}`:`Invalid ${n[s.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Yv(){return{localeError:hT()}}var mT=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(i){return t[i]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},r={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendiĝis instanceof ${i.expected}, riceviĝis ${a}`:`Nevalida enigo: atendiĝis ${s}, riceviĝis ${a}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${F(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${s}${i.maximum.toString()} ${o.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Tro malgranda: atendiĝis ke ${i.origin} havu ${s}${i.minimum.toString()} ${o.unit}`:`Tro malgranda: atendiĝis ke ${i.origin} estu ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${s.prefix}"`:s.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${s.suffix}"`:s.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${s.includes}"`:s.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${s.pattern}`:`Nevalida ${n[s.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} ŝlosilo${i.keys.length>1?"j":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function pT(){return{localeError:mT()}}var gT=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(i){return t[i]??null}let n={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Entrada inválida: se esperaba instanceof ${i.expected}, recibido ${a}`:`Entrada inválida: se esperaba ${s}, recibido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inválida: se esperaba ${F(i.values[0])}`:`Opción inválida: se esperaba una de ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin),a=r[i.origin]??i.origin;return o?`Demasiado grande: se esperaba que ${a??"valor"} tuviera ${s}${i.maximum.toString()} ${o.unit??"elementos"}`:`Demasiado grande: se esperaba que ${a??"valor"} fuera ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin),a=r[i.origin]??i.origin;return o?`Demasiado pequeño: se esperaba que ${a} tuviera ${s}${i.minimum.toString()} ${o.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Cadena inválida: debe comenzar con "${s.prefix}"`:s.format==="ends_with"?`Cadena inválida: debe terminar en "${s.suffix}"`:s.format==="includes"?`Cadena inválida: debe incluir "${s.includes}"`:s.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${s.pattern}`:`Inválido ${n[s.format]??i.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Llave inválida en ${r[i.origin]??i.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${r[i.origin]??i.origin}`;default:return"Entrada inválida"}}};function vT(){return{localeError:gT()}}var bT=()=>{let t={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function e(i){return t[i]??null}let n={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},r={nan:"NaN",number:"عدد",array:"آرایه"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`ورودی نامعتبر: میبایست instanceof ${i.expected} میبود، ${a} دریافت شد`:`ورودی نامعتبر: میبایست ${s} میبود، ${a} دریافت شد`}case"invalid_value":return i.values.length===1?`ورودی نامعتبر: میبایست ${F(i.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${T(i.values,"|")} میبود`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`خیلی بزرگ: ${i.origin??"مقدار"} باید ${s}${i.maximum.toString()} ${o.unit??"عنصر"} باشد`:`خیلی بزرگ: ${i.origin??"مقدار"} باید ${s}${i.maximum.toString()} باشد`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`خیلی کوچک: ${i.origin} باید ${s}${i.minimum.toString()} ${o.unit} باشد`:`خیلی کوچک: ${i.origin} باید ${s}${i.minimum.toString()} باشد`}case"invalid_format":{let s=i;return s.format==="starts_with"?`رشته نامعتبر: باید با "${s.prefix}" شروع شود`:s.format==="ends_with"?`رشته نامعتبر: باید با "${s.suffix}" تمام شود`:s.format==="includes"?`رشته نامعتبر: باید شامل "${s.includes}" باشد`:s.format==="regex"?`رشته نامعتبر: باید با الگوی ${s.pattern} مطابقت داشته باشد`:`${n[s.format]??i.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${i.divisor} باشد`;case"unrecognized_keys":return`کلید${i.keys.length>1?"های":""} ناشناس: ${T(i.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${i.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${i.origin}`;default:return"ورودی نامعتبر"}}};function yT(){return{localeError:bT()}}var _T=()=>{let t={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function e(i){return t[i]??null}let n={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${a}`:`Virheellinen tyyppi: odotettiin ${s}, oli ${a}`}case"invalid_value":return i.values.length===1?`Virheellinen syöte: täytyy olla ${F(i.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Liian suuri: ${o.subject} täytyy olla ${s}${i.maximum.toString()} ${o.unit}`.trim():`Liian suuri: arvon täytyy olla ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Liian pieni: ${o.subject} täytyy olla ${s}${i.minimum.toString()} ${o.unit}`.trim():`Liian pieni: arvon täytyy olla ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${s.prefix}"`:s.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${s.suffix}"`:s.format==="includes"?`Virheellinen syöte: täytyy sisältää "${s.includes}"`:s.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${s.pattern}`:`Virheellinen ${n[s.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${T(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function kT(){return{localeError:_T()}}var $T=()=>{let t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function e(i){return t[i]??null}let n={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},r={nan:"NaN",number:"nombre",array:"tableau"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Entrée invalide : instanceof ${i.expected} attendu, ${a} reçu`:`Entrée invalide : ${s} attendu, ${a} reçu`}case"invalid_value":return i.values.length===1?`Entrée invalide : ${F(i.values[0])} attendu`:`Option invalide : une valeur parmi ${T(i.values,"|")} attendue`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Trop grand : ${i.origin??"valeur"} doit ${o.verb} ${s}${i.maximum.toString()} ${o.unit??"élément(s)"}`:`Trop grand : ${i.origin??"valeur"} doit être ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Trop petit : ${i.origin} doit ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`Trop petit : ${i.origin} doit être ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Chaîne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Chaîne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Chaîne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${s.pattern}`:`${n[s.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${T(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function xT(){return{localeError:$T()}}var wT=()=>{let t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function e(i){return t[i]??null}let n={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Entrée invalide : attendu instanceof ${i.expected}, reçu ${a}`:`Entrée invalide : attendu ${s}, reçu ${a}`}case"invalid_value":return i.values.length===1?`Entrée invalide : attendu ${F(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"≤":"<",o=e(i.origin);return o?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${s}${i.maximum.toString()} ${o.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?"≥":">",o=e(i.origin);return o?`Trop petit : attendu que ${i.origin} ait ${s}${i.minimum.toString()} ${o.unit}`:`Trop petit : attendu que ${i.origin} soit ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Chaîne invalide : doit commencer par "${s.prefix}"`:s.format==="ends_with"?`Chaîne invalide : doit se terminer par "${s.suffix}"`:s.format==="includes"?`Chaîne invalide : doit inclure "${s.includes}"`:s.format==="regex"?`Chaîne invalide : doit correspondre au motif ${s.pattern}`:`${n[s.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${i.divisor}`;case"unrecognized_keys":return`Clé${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${T(i.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${i.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entrée invalide"}}};function ST(){return{localeError:wT()}}var IT=()=>{let t={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},e={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},n=u=>u?t[u]:void 0,r=u=>{let c=n(u);return c?c.label:u??t.unknown.label},i=u=>`ה${r(u)}`,s=u=>{var c;return(((c=n(u))==null?void 0:c.gender)??"m")==="f"?"צריכה להיות":"צריך להיות"},o=u=>u?e[u]??null:null,a={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},l={nan:"NaN"};return u=>{var c;switch(u.code){case"invalid_type":{let d=u.expected,f=l[d??""]??r(d),h=V(u.input),m=l[h]??((c=t[h])==null?void 0:c.label)??h;return/^[A-Z]/.test(u.expected)?`קלט לא תקין: צריך להיות instanceof ${u.expected}, התקבל ${m}`:`קלט לא תקין: צריך להיות ${f}, התקבל ${m}`}case"invalid_value":{if(u.values.length===1)return`ערך לא תקין: הערך חייב להיות ${F(u.values[0])}`;let d=u.values.map(h=>F(h));if(u.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${d[0]} או ${d[1]}`;let f=d[d.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${d.slice(0,-1).join(", ")} או ${f}`}case"too_big":{let d=o(u.origin),f=i(u.origin??"value");if(u.origin==="string")return`${(d==null?void 0:d.longLabel)??"ארוך"} מדי: ${f} צריכה להכיל ${u.maximum.toString()} ${(d==null?void 0:d.unit)??""} ${u.inclusive?"או פחות":"לכל היותר"}`.trim();if(u.origin==="number"){let p=u.inclusive?`קטן או שווה ל-${u.maximum}`:`קטן מ-${u.maximum}`;return`גדול מדי: ${f} צריך להיות ${p}`}if(u.origin==="array"||u.origin==="set"){let p=u.origin==="set"?"צריכה":"צריך",g=u.inclusive?`${u.maximum} ${(d==null?void 0:d.unit)??""} או פחות`:`פחות מ-${u.maximum} ${(d==null?void 0:d.unit)??""}`;return`גדול מדי: ${f} ${p} להכיל ${g}`.trim()}let h=u.inclusive?"<=":"<",m=s(u.origin??"value");return d!=null&&d.unit?`${d.longLabel} מדי: ${f} ${m} ${h}${u.maximum.toString()} ${d.unit}`:`${(d==null?void 0:d.longLabel)??"גדול"} מדי: ${f} ${m} ${h}${u.maximum.toString()}`}case"too_small":{let d=o(u.origin),f=i(u.origin??"value");if(u.origin==="string")return`${(d==null?void 0:d.shortLabel)??"קצר"} מדי: ${f} צריכה להכיל ${u.minimum.toString()} ${(d==null?void 0:d.unit)??""} ${u.inclusive?"או יותר":"לפחות"}`.trim();if(u.origin==="number"){let p=u.inclusive?`גדול או שווה ל-${u.minimum}`:`גדול מ-${u.minimum}`;return`קטן מדי: ${f} צריך להיות ${p}`}if(u.origin==="array"||u.origin==="set"){let p=u.origin==="set"?"צריכה":"צריך";if(u.minimum===1&&u.inclusive){let b=(u.origin==="set","לפחות פריט אחד");return`קטן מדי: ${f} ${p} להכיל ${b}`}let g=u.inclusive?`${u.minimum} ${(d==null?void 0:d.unit)??""} או יותר`:`יותר מ-${u.minimum} ${(d==null?void 0:d.unit)??""}`;return`קטן מדי: ${f} ${p} להכיל ${g}`.trim()}let h=u.inclusive?">=":">",m=s(u.origin??"value");return d!=null&&d.unit?`${d.shortLabel} מדי: ${f} ${m} ${h}${u.minimum.toString()} ${d.unit}`:`${(d==null?void 0:d.shortLabel)??"קטן"} מדי: ${f} ${m} ${h}${u.minimum.toString()}`}case"invalid_format":{let d=u;if(d.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${d.prefix}"`;if(d.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${d.suffix}"`;if(d.format==="includes")return`המחרוזת חייבת לכלול "${d.includes}"`;if(d.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${d.pattern}`;let f=a[d.format],h=(f==null?void 0:f.label)??d.format,m=((f==null?void 0:f.gender)??"m")==="f"?"תקינה":"תקין";return`${h} לא ${m}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${u.divisor}`;case"unrecognized_keys":return`מפתח${u.keys.length>1?"ות":""} לא מזוה${u.keys.length>1?"ים":"ה"}: ${T(u.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${i(u.origin??"array")}`;default:return"קלט לא תקין"}}};function zT(){return{localeError:IT()}}var OT=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(i){return t[i]??null}let n={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},r={nan:"NaN",number:"szám",array:"tömb"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Érvénytelen bemenet: a várt érték instanceof ${i.expected}, a kapott érték ${a}`:`Érvénytelen bemenet: a várt érték ${s}, a kapott érték ${a}`}case"invalid_value":return i.values.length===1?`Érvénytelen bemenet: a várt érték ${F(i.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Túl nagy: ${i.origin??"érték"} mérete túl nagy ${s}${i.maximum.toString()} ${o.unit??"elem"}`:`Túl nagy: a bemeneti érték ${i.origin??"érték"} túl nagy: ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Túl kicsi: a bemeneti érték ${i.origin} mérete túl kicsi ${s}${i.minimum.toString()} ${o.unit}`:`Túl kicsi: a bemeneti érték ${i.origin} túl kicsi ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Érvénytelen string: "${s.prefix}" értékkel kell kezdődnie`:s.format==="ends_with"?`Érvénytelen string: "${s.suffix}" értékkel kell végződnie`:s.format==="includes"?`Érvénytelen string: "${s.includes}" értéket kell tartalmaznia`:s.format==="regex"?`Érvénytelen string: ${s.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[s.format]??i.format}`}case"not_multiple_of":return`Érvénytelen szám: ${i.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${i.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${i.origin}`;default:return"Érvénytelen bemenet"}}};function TT(){return{localeError:OT()}}function bf(t,e,n){return Math.abs(t)===1?e:n}function Gn(t){if(!t)return"";let e=["ա","ե","ը","ի","ո","ու","օ"],n=t[t.length-1];return t+(e.includes(n)?"ն":"ը")}var DT=()=>{let t={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function e(i){return t[i]??null}let n={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},r={nan:"NaN",number:"թիվ",array:"զանգված"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${i.expected}, ստացվել է ${a}`:`Սխալ մուտքագրում․ սպասվում էր ${s}, ստացվել է ${a}`}case"invalid_value":return i.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${F(i.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);if(o){let a=Number(i.maximum),l=bf(a,o.unit.one,o.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Gn(i.origin??"արժեք")} կունենա ${s}${i.maximum.toString()} ${l}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Gn(i.origin??"արժեք")} լինի ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);if(o){let a=Number(i.minimum),l=bf(a,o.unit.one,o.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Gn(i.origin)} կունենա ${s}${i.minimum.toString()} ${l}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Gn(i.origin)} լինի ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Սխալ տող․ պետք է սկսվի "${s.prefix}"-ով`:s.format==="ends_with"?`Սխալ տող․ պետք է ավարտվի "${s.suffix}"-ով`:s.format==="includes"?`Սխալ տող․ պետք է պարունակի "${s.includes}"`:s.format==="regex"?`Սխալ տող․ պետք է համապատասխանի ${s.pattern} ձևաչափին`:`Սխալ ${n[s.format]??i.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${i.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${i.keys.length>1?"ներ":""}. ${T(i.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${Gn(i.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${Gn(i.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function PT(){return{localeError:DT()}}var ET=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(i){return t[i]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${a}`:`Input tidak valid: diharapkan ${s}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${F(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${s}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Terlalu kecil: diharapkan ${i.origin} memiliki ${s}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`String tidak valid: harus dimulai dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak valid: harus berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak valid: harus menyertakan "${s.includes}"`:s.format==="regex"?`String tidak valid: harus sesuai pola ${s.pattern}`:`${n[s.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function MT(){return{localeError:ET()}}var NT=()=>{let t={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function e(i){return t[i]??null}let n={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},r={nan:"NaN",number:"númer",array:"fylki"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Rangt gildi: Þú slóst inn ${a} þar sem á að vera instanceof ${i.expected}`:`Rangt gildi: Þú slóst inn ${a} þar sem á að vera ${s}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert ráð fyrir ${F(i.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} hafi ${s}${i.maximum.toString()} ${o.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} sé ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Of lítið: gert er ráð fyrir að ${i.origin} hafi ${s}${i.minimum.toString()} ${o.unit}`:`Of lítið: gert er ráð fyrir að ${i.origin} sé ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ógildur strengur: verður að byrja á "${s.prefix}"`:s.format==="ends_with"?`Ógildur strengur: verður að enda á "${s.suffix}"`:s.format==="includes"?`Ógildur strengur: verður að innihalda "${s.includes}"`:s.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${s.pattern}`:`Rangt ${n[s.format]??i.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`Óþekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${T(i.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${i.origin}`;default:return"Rangt gildi"}}};function CT(){return{localeError:NT()}}var AT=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(i){return t[i]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"numero",array:"vettore"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${a}`:`Input non valido: atteso ${s}, ricevuto ${a}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${F(i.values[0])}`:`Opzione non valida: atteso uno tra ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Troppo grande: ${i.origin??"valore"} deve avere ${s}${i.maximum.toString()} ${o.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Troppo piccolo: ${i.origin} deve avere ${s}${i.minimum.toString()} ${o.unit}`:`Troppo piccolo: ${i.origin} deve essere ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Stringa non valida: deve iniziare con "${s.prefix}"`:s.format==="ends_with"?`Stringa non valida: deve terminare con "${s.suffix}"`:s.format==="includes"?`Stringa non valida: deve includere "${s.includes}"`:s.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${s.pattern}`:`Invalid ${n[s.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${T(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function RT(){return{localeError:AT()}}var ZT=()=>{let t={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function e(i){return t[i]??null}let n={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},r={nan:"NaN",number:"数値",array:"配列"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`無効な入力: instanceof ${i.expected}が期待されましたが、${a}が入力されました`:`無効な入力: ${s}が期待されましたが、${a}が入力されました`}case"invalid_value":return i.values.length===1?`無効な入力: ${F(i.values[0])}が期待されました`:`無効な選択: ${T(i.values,"、")}のいずれかである必要があります`;case"too_big":{let s=i.inclusive?"以下である":"より小さい",o=e(i.origin);return o?`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${o.unit??"要素"}${s}必要があります`:`大きすぎる値: ${i.origin??"値"}は${i.maximum.toString()}${s}必要があります`}case"too_small":{let s=i.inclusive?"以上である":"より大きい",o=e(i.origin);return o?`小さすぎる値: ${i.origin}は${i.minimum.toString()}${o.unit}${s}必要があります`:`小さすぎる値: ${i.origin}は${i.minimum.toString()}${s}必要があります`}case"invalid_format":{let s=i;return s.format==="starts_with"?`無効な文字列: "${s.prefix}"で始まる必要があります`:s.format==="ends_with"?`無効な文字列: "${s.suffix}"で終わる必要があります`:s.format==="includes"?`無効な文字列: "${s.includes}"を含む必要があります`:s.format==="regex"?`無効な文字列: パターン${s.pattern}に一致する必要があります`:`無効な${n[s.format]??i.format}`}case"not_multiple_of":return`無効な数値: ${i.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${i.keys.length>1?"群":""}: ${T(i.keys,"、")}`;case"invalid_key":return`${i.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${i.origin}内の無効な値`;default:return"無効な入力"}}};function jT(){return{localeError:ZT()}}var UT=()=>{let t={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function e(i){return t[i]??null}let n={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},r={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${i.expected}, მიღებული ${a}`:`არასწორი შეყვანა: მოსალოდნელი ${s}, მიღებული ${a}`}case"invalid_value":return i.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${F(i.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${T(i.values,"|")}-დან`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} ${o.verb} ${s}${i.maximum.toString()} ${o.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} იყოს ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`ზედმეტად პატარა: მოსალოდნელი ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${i.origin} იყოს ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${s.prefix}"-ით`:s.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${s.suffix}"-ით`:s.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${s.includes}"-ს`:s.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${s.pattern}`:`არასწორი ${n[s.format]??i.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${i.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${i.keys.length>1?"ები":"ი"}: ${T(i.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${i.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${i.origin}-ში`;default:return"არასწორი შეყვანა"}}};function LT(){return{localeError:UT()}}var FT=()=>{let t={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function e(i){return t[i]??null}let n={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},r={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${i.expected} ប៉ុន្តែទទួលបាន ${a}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${s} ប៉ុន្តែទទួលបាន ${a}`}case"invalid_value":return i.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${F(i.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${s} ${i.maximum.toString()} ${o.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${i.origin??"តម្លៃ"} ${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`តូចពេក៖ ត្រូវការ ${i.origin} ${s} ${i.minimum.toString()} ${o.unit}`:`តូចពេក៖ ត្រូវការ ${i.origin} ${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${s.prefix}"`:s.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${s.suffix}"`:s.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${s.includes}"`:s.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${s.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[s.format]??i.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${i.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${T(i.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${i.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Gv(){return{localeError:FT()}}function VT(){return Gv()}var WT=()=>{let t={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function e(i){return t[i]??null}let n={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`잘못된 입력: 예상 타입은 instanceof ${i.expected}, 받은 타입은 ${a}입니다`:`잘못된 입력: 예상 타입은 ${s}, 받은 타입은 ${a}입니다`}case"invalid_value":return i.values.length===1?`잘못된 입력: 값은 ${F(i.values[0])} 이어야 합니다`:`잘못된 옵션: ${T(i.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let s=i.inclusive?"이하":"미만",o=s==="미만"?"이어야 합니다":"여야 합니다",a=e(i.origin),l=(a==null?void 0:a.unit)??"요소";return a?`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()}${l} ${s}${o}`:`${i.origin??"값"}이 너무 큽니다: ${i.maximum.toString()} ${s}${o}`}case"too_small":{let s=i.inclusive?"이상":"초과",o=s==="이상"?"이어야 합니다":"여야 합니다",a=e(i.origin),l=(a==null?void 0:a.unit)??"요소";return a?`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()}${l} ${s}${o}`:`${i.origin??"값"}이 너무 작습니다: ${i.minimum.toString()} ${s}${o}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`잘못된 문자열: "${s.prefix}"(으)로 시작해야 합니다`:s.format==="ends_with"?`잘못된 문자열: "${s.suffix}"(으)로 끝나야 합니다`:s.format==="includes"?`잘못된 문자열: "${s.includes}"을(를) 포함해야 합니다`:s.format==="regex"?`잘못된 문자열: 정규식 ${s.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[s.format]??i.format}`}case"not_multiple_of":return`잘못된 숫자: ${i.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${T(i.keys,", ")}`;case"invalid_key":return`잘못된 키: ${i.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${i.origin}`;default:return"잘못된 입력"}}};function HT(){return{localeError:WT()}}var Vi=t=>t.charAt(0).toUpperCase()+t.slice(1);function yf(t){let e=Math.abs(t),n=e%10,r=e%100;return r>=11&&r<=19||n===0?"many":n===1?"one":"few"}var BT=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function e(i,s,o,a){let l=t[i]??null;return l===null?l:{unit:l.unit[s],verb:l.verb[a][o?"inclusive":"notInclusive"]}}let n={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},r={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${a}, o tikėtasi - instanceof ${i.expected}`:`Gautas tipas ${a}, o tikėtasi - ${s}`}case"invalid_value":return i.values.length===1?`Privalo būti ${F(i.values[0])}`:`Privalo būti vienas iš ${T(i.values,"|")} pasirinkimų`;case"too_big":{let s=r[i.origin]??i.origin,o=e(i.origin,yf(Number(i.maximum)),i.inclusive??!1,"smaller");if(o!=null&&o.verb)return`${Vi(s??i.origin??"reikšmė")} ${o.verb} ${i.maximum.toString()} ${o.unit??"elementų"}`;let a=i.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${Vi(s??i.origin??"reikšmė")} turi būti ${a} ${i.maximum.toString()} ${o==null?void 0:o.unit}`}case"too_small":{let s=r[i.origin]??i.origin,o=e(i.origin,yf(Number(i.minimum)),i.inclusive??!1,"bigger");if(o!=null&&o.verb)return`${Vi(s??i.origin??"reikšmė")} ${o.verb} ${i.minimum.toString()} ${o.unit??"elementų"}`;let a=i.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${Vi(s??i.origin??"reikšmė")} turi būti ${a} ${i.minimum.toString()} ${o==null?void 0:o.unit}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Eilutė privalo prasidėti "${s.prefix}"`:s.format==="ends_with"?`Eilutė privalo pasibaigti "${s.suffix}"`:s.format==="includes"?`Eilutė privalo įtraukti "${s.includes}"`:s.format==="regex"?`Eilutė privalo atitikti ${s.pattern}`:`Neteisingas ${n[s.format]??i.format}`}case"not_multiple_of":return`Skaičius privalo būti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${T(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let s=r[i.origin]??i.origin;return`${Vi(s??i.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function qT(){return{localeError:BT()}}var JT=()=>{let t={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function e(i){return t[i]??null}let n={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},r={nan:"NaN",number:"број",array:"низа"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Грешен внес: се очекува instanceof ${i.expected}, примено ${a}`:`Грешен внес: се очекува ${s}, примено ${a}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${F(i.values[0])}`:`Грешана опција: се очекува една ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Премногу голем: се очекува ${i.origin??"вредноста"} да има ${s}${i.maximum.toString()} ${o.unit??"елементи"}`:`Премногу голем: се очекува ${i.origin??"вредноста"} да биде ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Премногу мал: се очекува ${i.origin} да има ${s}${i.minimum.toString()} ${o.unit}`:`Премногу мал: се очекува ${i.origin} да биде ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Неважечка низа: мора да започнува со "${s.prefix}"`:s.format==="ends_with"?`Неважечка низа: мора да завршува со "${s.suffix}"`:s.format==="includes"?`Неважечка низа: мора да вклучува "${s.includes}"`:s.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${s.pattern}`:`Invalid ${n[s.format]??i.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${T(i.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${i.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${i.origin}`;default:return"Грешен внес"}}};function YT(){return{localeError:JT()}}var GT=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(i){return t[i]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"nombor"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${a}`:`Input tidak sah: dijangka ${s}, diterima ${a}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${F(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Terlalu besar: dijangka ${i.origin??"nilai"} ${o.verb} ${s}${i.maximum.toString()} ${o.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Terlalu kecil: dijangka ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`String tidak sah: mesti bermula dengan "${s.prefix}"`:s.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${s.suffix}"`:s.format==="includes"?`String tidak sah: mesti mengandungi "${s.includes}"`:s.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${s.pattern}`:`${n[s.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${T(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function KT(){return{localeError:GT()}}var XT=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(i){return t[i]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},r={nan:"NaN",number:"getal"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${a}`:`Ongeldige invoer: verwacht ${s}, ontving ${a}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${F(i.values[0])}`:`Ongeldige optie: verwacht één van ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin),a=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return o?`Te ${a}: verwacht dat ${i.origin??"waarde"} ${s}${i.maximum.toString()} ${o.unit??"elementen"} ${o.verb}`:`Te ${a}: verwacht dat ${i.origin??"waarde"} ${s}${i.maximum.toString()} is`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin),a=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return o?`Te ${a}: verwacht dat ${i.origin} ${s}${i.minimum.toString()} ${o.unit} ${o.verb}`:`Te ${a}: verwacht dat ${i.origin} ${s}${i.minimum.toString()} is`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ongeldige tekst: moet met "${s.prefix}" beginnen`:s.format==="ends_with"?`Ongeldige tekst: moet op "${s.suffix}" eindigen`:s.format==="includes"?`Ongeldige tekst: moet "${s.includes}" bevatten`:s.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${s.pattern}`:`Ongeldig: ${n[s.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function QT(){return{localeError:XT()}}var eD=()=>{let t={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function e(i){return t[i]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"tall",array:"liste"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${a}`:`Ugyldig input: forventet ${s}, fikk ${a}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${F(i.values[0])}`:`Ugyldig valg: forventet en av ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`For stor(t): forventet ${i.origin??"value"} til å ha ${s}${i.maximum.toString()} ${o.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til å ha ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`For lite(n): forventet ${i.origin} til å ha ${s}${i.minimum.toString()} ${o.unit}`:`For lite(n): forventet ${i.origin} til å ha ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ugyldig streng: må starte med "${s.prefix}"`:s.format==="ends_with"?`Ugyldig streng: må ende med "${s.suffix}"`:s.format==="includes"?`Ugyldig streng: må inneholde "${s.includes}"`:s.format==="regex"?`Ugyldig streng: må matche mønsteret ${s.pattern}`:`Ugyldig ${n[s.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${T(i.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function tD(){return{localeError:eD()}}var nD=()=>{let t={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function e(i){return t[i]??null}let n={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},r={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Fâsit giren: umulan instanceof ${i.expected}, alınan ${a}`:`Fâsit giren: umulan ${s}, alınan ${a}`}case"invalid_value":return i.values.length===1?`Fâsit giren: umulan ${F(i.values[0])}`:`Fâsit tercih: mûteberler ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Fazla büyük: ${i.origin??"value"}, ${s}${i.maximum.toString()} ${o.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${i.origin??"value"}, ${s}${i.maximum.toString()} olmalıydı.`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Fazla küçük: ${i.origin}, ${s}${i.minimum.toString()} ${o.unit} sahip olmalıydı.`:`Fazla küçük: ${i.origin}, ${s}${i.minimum.toString()} olmalıydı.`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Fâsit metin: "${s.prefix}" ile başlamalı.`:s.format==="ends_with"?`Fâsit metin: "${s.suffix}" ile bitmeli.`:s.format==="includes"?`Fâsit metin: "${s.includes}" ihtivâ etmeli.`:s.format==="regex"?`Fâsit metin: ${s.pattern} nakşına uymalı.`:`Fâsit ${n[s.format]??i.format}`}case"not_multiple_of":return`Fâsit sayı: ${i.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${i.keys.length>1?"s":""}: ${T(i.keys,", ")}`;case"invalid_key":return`${i.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${i.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function iD(){return{localeError:nD()}}var rD=()=>{let t={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function e(i){return t[i]??null}let n={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},r={nan:"NaN",number:"عدد",array:"ارې"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`ناسم ورودي: باید instanceof ${i.expected} وای, مګر ${a} ترلاسه شو`:`ناسم ورودي: باید ${s} وای, مګر ${a} ترلاسه شو`}case"invalid_value":return i.values.length===1?`ناسم ورودي: باید ${F(i.values[0])} وای`:`ناسم انتخاب: باید یو له ${T(i.values,"|")} څخه وای`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`ډیر لوی: ${i.origin??"ارزښت"} باید ${s}${i.maximum.toString()} ${o.unit??"عنصرونه"} ولري`:`ډیر لوی: ${i.origin??"ارزښت"} باید ${s}${i.maximum.toString()} وي`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`ډیر کوچنی: ${i.origin} باید ${s}${i.minimum.toString()} ${o.unit} ولري`:`ډیر کوچنی: ${i.origin} باید ${s}${i.minimum.toString()} وي`}case"invalid_format":{let s=i;return s.format==="starts_with"?`ناسم متن: باید د "${s.prefix}" سره پیل شي`:s.format==="ends_with"?`ناسم متن: باید د "${s.suffix}" سره پای ته ورسيږي`:s.format==="includes"?`ناسم متن: باید "${s.includes}" ولري`:s.format==="regex"?`ناسم متن: باید د ${s.pattern} سره مطابقت ولري`:`${n[s.format]??i.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${i.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${i.keys.length>1?"کلیډونه":"کلیډ"}: ${T(i.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${i.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${i.origin} کې`;default:return"ناسمه ورودي"}}};function sD(){return{localeError:rD()}}var oD=()=>{let t={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function e(i){return t[i]??null}let n={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},r={nan:"NaN",number:"liczba",array:"tablica"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${i.expected}, otrzymano ${a}`:`Nieprawidłowe dane wejściowe: oczekiwano ${s}, otrzymano ${a}`}case"invalid_value":return i.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${F(i.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Za duża wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${s}${i.maximum.toString()} ${o.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Za mała wartość: oczekiwano, że ${i.origin??"wartość"} będzie mieć ${s}${i.minimum.toString()} ${o.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${i.origin??"wartość"} będzie wynosić ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${s.prefix}"`:s.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${s.suffix}"`:s.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${s.includes}"`:s.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${s.pattern}`:`Nieprawidłow(y/a/e) ${n[s.format]??i.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${i.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${i.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function aD(){return{localeError:oD()}}var lD=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(i){return t[i]??null}let n={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",number:"número",null:"nulo"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Tipo inválido: esperado instanceof ${i.expected}, recebido ${a}`:`Tipo inválido: esperado ${s}, recebido ${a}`}case"invalid_value":return i.values.length===1?`Entrada inválida: esperado ${F(i.values[0])}`:`Opção inválida: esperada uma das ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${s}${i.maximum.toString()} ${o.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Muito pequeno: esperado que ${i.origin} tivesse ${s}${i.minimum.toString()} ${o.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Texto inválido: deve começar com "${s.prefix}"`:s.format==="ends_with"?`Texto inválido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inválido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inválido: deve corresponder ao padrão ${s.pattern}`:`${n[s.format]??i.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Chave inválida em ${i.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${i.origin}`;default:return"Campo inválido"}}};function uD(){return{localeError:lD()}}function _f(t,e,n,r){let i=Math.abs(t),s=i%10,o=i%100;return o>=11&&o<=19?r:s===1?e:s>=2&&s<=4?n:r}var cD=()=>{let t={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function e(i){return t[i]??null}let n={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},r={nan:"NaN",number:"число",array:"массив"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Неверный ввод: ожидалось instanceof ${i.expected}, получено ${a}`:`Неверный ввод: ожидалось ${s}, получено ${a}`}case"invalid_value":return i.values.length===1?`Неверный ввод: ожидалось ${F(i.values[0])}`:`Неверный вариант: ожидалось одно из ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);if(o){let a=Number(i.maximum),l=_f(a,o.unit.one,o.unit.few,o.unit.many);return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет иметь ${s}${i.maximum.toString()} ${l}`}return`Слишком большое значение: ожидалось, что ${i.origin??"значение"} будет ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);if(o){let a=Number(i.minimum),l=_f(a,o.unit.one,o.unit.few,o.unit.many);return`Слишком маленькое значение: ожидалось, что ${i.origin} будет иметь ${s}${i.minimum.toString()} ${l}`}return`Слишком маленькое значение: ожидалось, что ${i.origin} будет ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Неверная строка: должна начинаться с "${s.prefix}"`:s.format==="ends_with"?`Неверная строка: должна заканчиваться на "${s.suffix}"`:s.format==="includes"?`Неверная строка: должна содержать "${s.includes}"`:s.format==="regex"?`Неверная строка: должна соответствовать шаблону ${s.pattern}`:`Неверный ${n[s.format]??i.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${i.divisor}`;case"unrecognized_keys":return`Нераспознанн${i.keys.length>1?"ые":"ый"} ключ${i.keys.length>1?"и":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${i.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${i.origin}`;default:return"Неверные входные данные"}}};function dD(){return{localeError:cD()}}var fD=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(i){return t[i]??null}let n={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},r={nan:"NaN",number:"število",array:"tabela"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pričakovano instanceof ${i.expected}, prejeto ${a}`:`Neveljaven vnos: pričakovano ${s}, prejeto ${a}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pričakovano ${F(i.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} imelo ${s}${i.maximum.toString()} ${o.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${i.origin??"vrednost"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Premajhno: pričakovano, da bo ${i.origin} imelo ${s}${i.minimum.toString()} ${o.unit}`:`Premajhno: pričakovano, da bo ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Neveljaven niz: mora se začeti z "${s.prefix}"`:s.format==="ends_with"?`Neveljaven niz: mora se končati z "${s.suffix}"`:s.format==="includes"?`Neveljaven niz: mora vsebovati "${s.includes}"`:s.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${s.pattern}`:`Neveljaven ${n[s.format]??i.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i ključi":" ključ"}: ${T(i.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function hD(){return{localeError:fD()}}var mD=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function e(i){return t[i]??null}let n={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},r={nan:"NaN",number:"antal",array:"lista"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: förväntat instanceof ${i.expected}, fick ${a}`:`Ogiltig inmatning: förväntat ${s}, fick ${a}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: förväntat ${F(i.values[0])}`:`Ogiltigt val: förväntade en av ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`För stor(t): förväntade ${i.origin??"värdet"} att ha ${s}${i.maximum.toString()} ${o.unit??"element"}`:`För stor(t): förväntat ${i.origin??"värdet"} att ha ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`För lite(t): förväntade ${i.origin??"värdet"} att ha ${s}${i.minimum.toString()} ${o.unit}`:`För lite(t): förväntade ${i.origin??"värdet"} att ha ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ogiltig sträng: måste börja med "${s.prefix}"`:s.format==="ends_with"?`Ogiltig sträng: måste sluta med "${s.suffix}"`:s.format==="includes"?`Ogiltig sträng: måste innehålla "${s.includes}"`:s.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${s.pattern}"`:`Ogiltig(t) ${n[s.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${T(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${i.origin??"värdet"}`;default:return"Ogiltig input"}}};function pD(){return{localeError:mD()}}var gD=()=>{let t={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function e(i){return t[i]??null}let n={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${i.expected}, பெறப்பட்டது ${a}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${s}, பெறப்பட்டது ${a}`}case"invalid_value":return i.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${F(i.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${T(i.values,"|")} இல் ஒன்று`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${s}${i.maximum.toString()} ${o.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${i.origin??"மதிப்பு"} ${s}${i.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${s}${i.minimum.toString()} ${o.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${i.origin} ${s}${i.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let s=i;return s.format==="starts_with"?`தவறான சரம்: "${s.prefix}" இல் தொடங்க வேண்டும்`:s.format==="ends_with"?`தவறான சரம்: "${s.suffix}" இல் முடிவடைய வேண்டும்`:s.format==="includes"?`தவறான சரம்: "${s.includes}" ஐ உள்ளடக்க வேண்டும்`:s.format==="regex"?`தவறான சரம்: ${s.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[s.format]??i.format}`}case"not_multiple_of":return`தவறான எண்: ${i.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${i.keys.length>1?"கள்":""}: ${T(i.keys,", ")}`;case"invalid_key":return`${i.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${i.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function vD(){return{localeError:gD()}}var bD=()=>{let t={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function e(i){return t[i]??null}let n={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},r={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${i.expected} แต่ได้รับ ${a}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${s} แต่ได้รับ ${a}`}case"invalid_value":return i.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${F(i.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"ไม่เกิน":"น้อยกว่า",o=e(i.origin);return o?`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${s} ${i.maximum.toString()} ${o.unit??"รายการ"}`:`เกินกำหนด: ${i.origin??"ค่า"} ควรมี${s} ${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?"อย่างน้อย":"มากกว่า",o=e(i.origin);return o?`น้อยกว่ากำหนด: ${i.origin} ควรมี${s} ${i.minimum.toString()} ${o.unit}`:`น้อยกว่ากำหนด: ${i.origin} ควรมี${s} ${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${s.prefix}"`:s.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${s.suffix}"`:s.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${s.includes}" อยู่ในข้อความ`:s.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${s.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[s.format]??i.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${i.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${T(i.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${i.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${i.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function yD(){return{localeError:bD()}}var _D=()=>{let t={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function e(i){return t[i]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Geçersiz değer: beklenen instanceof ${i.expected}, alınan ${a}`:`Geçersiz değer: beklenen ${s}, alınan ${a}`}case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${F(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Çok büyük: beklenen ${i.origin??"değer"} ${s}${i.maximum.toString()} ${o.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Çok küçük: beklenen ${i.origin} ${s}${i.minimum.toString()} ${o.unit}`:`Çok küçük: beklenen ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Geçersiz metin: "${s.prefix}" ile başlamalı`:s.format==="ends_with"?`Geçersiz metin: "${s.suffix}" ile bitmeli`:s.format==="includes"?`Geçersiz metin: "${s.includes}" içermeli`:s.format==="regex"?`Geçersiz metin: ${s.pattern} desenine uymalı`:`Geçersiz ${n[s.format]??i.format}`}case"not_multiple_of":return`Geçersiz sayı: ${i.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${i.keys.length>1?"lar":""}: ${T(i.keys,", ")}`;case"invalid_key":return`${i.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${i.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function kD(){return{localeError:_D()}}var $D=()=>{let t={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function e(i){return t[i]??null}let n={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},r={nan:"NaN",number:"число",array:"масив"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Неправильні вхідні дані: очікується instanceof ${i.expected}, отримано ${a}`:`Неправильні вхідні дані: очікується ${s}, отримано ${a}`}case"invalid_value":return i.values.length===1?`Неправильні вхідні дані: очікується ${F(i.values[0])}`:`Неправильна опція: очікується одне з ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Занадто велике: очікується, що ${i.origin??"значення"} ${o.verb} ${s}${i.maximum.toString()} ${o.unit??"елементів"}`:`Занадто велике: очікується, що ${i.origin??"значення"} буде ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Занадто мале: очікується, що ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`Занадто мале: очікується, що ${i.origin} буде ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Неправильний рядок: повинен починатися з "${s.prefix}"`:s.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${s.suffix}"`:s.format==="includes"?`Неправильний рядок: повинен містити "${s.includes}"`:s.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${s.pattern}`:`Неправильний ${n[s.format]??i.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${i.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${i.keys.length>1?"і":""}: ${T(i.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${i.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${i.origin}`;default:return"Неправильні вхідні дані"}}};function Kv(){return{localeError:$D()}}function xD(){return Kv()}var wD=()=>{let t={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function e(i){return t[i]??null}let n={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},r={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`غلط ان پٹ: instanceof ${i.expected} متوقع تھا، ${a} موصول ہوا`:`غلط ان پٹ: ${s} متوقع تھا، ${a} موصول ہوا`}case"invalid_value":return i.values.length===1?`غلط ان پٹ: ${F(i.values[0])} متوقع تھا`:`غلط آپشن: ${T(i.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`بہت بڑا: ${i.origin??"ویلیو"} کے ${s}${i.maximum.toString()} ${o.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${i.origin??"ویلیو"} کا ${s}${i.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`بہت چھوٹا: ${i.origin} کے ${s}${i.minimum.toString()} ${o.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${i.origin} کا ${s}${i.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let s=i;return s.format==="starts_with"?`غلط سٹرنگ: "${s.prefix}" سے شروع ہونا چاہیے`:s.format==="ends_with"?`غلط سٹرنگ: "${s.suffix}" پر ختم ہونا چاہیے`:s.format==="includes"?`غلط سٹرنگ: "${s.includes}" شامل ہونا چاہیے`:s.format==="regex"?`غلط سٹرنگ: پیٹرن ${s.pattern} سے میچ ہونا چاہیے`:`غلط ${n[s.format]??i.format}`}case"not_multiple_of":return`غلط نمبر: ${i.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${i.keys.length>1?"ز":""}: ${T(i.keys,"، ")}`;case"invalid_key":return`${i.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${i.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function SD(){return{localeError:wD()}}var ID=()=>{let t={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function e(i){return t[i]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},r={nan:"NaN",number:"raqam",array:"massiv"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${a}`:`Noto‘g‘ri kirish: kutilgan ${s}, qabul qilingan ${a}`}case"invalid_value":return i.values.length===1?`Noto‘g‘ri kirish: kutilgan ${F(i.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Juda katta: kutilgan ${i.origin??"qiymat"} ${s}${i.maximum.toString()} ${o.unit} ${o.verb}`:`Juda katta: kutilgan ${i.origin??"qiymat"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Juda kichik: kutilgan ${i.origin} ${s}${i.minimum.toString()} ${o.unit} ${o.verb}`:`Juda kichik: kutilgan ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Noto‘g‘ri satr: "${s.prefix}" bilan boshlanishi kerak`:s.format==="ends_with"?`Noto‘g‘ri satr: "${s.suffix}" bilan tugashi kerak`:s.format==="includes"?`Noto‘g‘ri satr: "${s.includes}" ni o‘z ichiga olishi kerak`:s.format==="regex"?`Noto‘g‘ri satr: ${s.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[s.format]??i.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${i.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${i.keys.length>1?"lar":""}: ${T(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${i.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function zD(){return{localeError:ID()}}var OD=()=>{let t={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function e(i){return t[i]??null}let n={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},r={nan:"NaN",number:"số",array:"mảng"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${i.expected}, nhận được ${a}`:`Đầu vào không hợp lệ: mong đợi ${s}, nhận được ${a}`}case"invalid_value":return i.values.length===1?`Đầu vào không hợp lệ: mong đợi ${F(i.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Quá lớn: mong đợi ${i.origin??"giá trị"} ${o.verb} ${s}${i.maximum.toString()} ${o.unit??"phần tử"}`:`Quá lớn: mong đợi ${i.origin??"giá trị"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Quá nhỏ: mong đợi ${i.origin} ${o.verb} ${s}${i.minimum.toString()} ${o.unit}`:`Quá nhỏ: mong đợi ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${s.prefix}"`:s.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${s.suffix}"`:s.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${s.includes}"`:s.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${s.pattern}`:`${n[s.format]??i.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${i.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${T(i.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${i.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${i.origin}`;default:return"Đầu vào không hợp lệ"}}};function TD(){return{localeError:OD()}}var DD=()=>{let t={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function e(i){return t[i]??null}let n={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},r={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`无效输入:期望 instanceof ${i.expected},实际接收 ${a}`:`无效输入:期望 ${s},实际接收 ${a}`}case"invalid_value":return i.values.length===1?`无效输入:期望 ${F(i.values[0])}`:`无效选项:期望以下之一 ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`数值过大:期望 ${i.origin??"值"} ${s}${i.maximum.toString()} ${o.unit??"个元素"}`:`数值过大:期望 ${i.origin??"值"} ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`数值过小:期望 ${i.origin} ${s}${i.minimum.toString()} ${o.unit}`:`数值过小:期望 ${i.origin} ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`无效字符串:必须以 "${s.prefix}" 开头`:s.format==="ends_with"?`无效字符串:必须以 "${s.suffix}" 结尾`:s.format==="includes"?`无效字符串:必须包含 "${s.includes}"`:s.format==="regex"?`无效字符串:必须满足正则表达式 ${s.pattern}`:`无效${n[s.format]??i.format}`}case"not_multiple_of":return`无效数字:必须是 ${i.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${T(i.keys,", ")}`;case"invalid_key":return`${i.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${i.origin} 中包含无效值(value)`;default:return"无效输入"}}};function PD(){return{localeError:DD()}}var ED=()=>{let t={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function e(i){return t[i]??null}let n={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`無效的輸入值:預期為 instanceof ${i.expected},但收到 ${a}`:`無效的輸入值:預期為 ${s},但收到 ${a}`}case"invalid_value":return i.values.length===1?`無效的輸入值:預期為 ${F(i.values[0])}`:`無效的選項:預期為以下其中之一 ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`數值過大:預期 ${i.origin??"值"} 應為 ${s}${i.maximum.toString()} ${o.unit??"個元素"}`:`數值過大:預期 ${i.origin??"值"} 應為 ${s}${i.maximum.toString()}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`數值過小:預期 ${i.origin} 應為 ${s}${i.minimum.toString()} ${o.unit}`:`數值過小:預期 ${i.origin} 應為 ${s}${i.minimum.toString()}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`無效的字串:必須以 "${s.prefix}" 開頭`:s.format==="ends_with"?`無效的字串:必須以 "${s.suffix}" 結尾`:s.format==="includes"?`無效的字串:必須包含 "${s.includes}"`:s.format==="regex"?`無效的字串:必須符合格式 ${s.pattern}`:`無效的 ${n[s.format]??i.format}`}case"not_multiple_of":return`無效的數字:必須為 ${i.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${i.keys.length>1?"們":""}:${T(i.keys,"、")}`;case"invalid_key":return`${i.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${i.origin} 中有無效的值`;default:return"無效的輸入值"}}};function MD(){return{localeError:ED()}}var ND=()=>{let t={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function e(i){return t[i]??null}let n={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},r={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return i=>{switch(i.code){case"invalid_type":{let s=r[i.expected]??i.expected,o=V(i.input),a=r[o]??o;return/^[A-Z]/.test(i.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${i.expected}, àmọ̀ a rí ${a}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${s}, àmọ̀ a rí ${a}`}case"invalid_value":return i.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${F(i.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${T(i.values,"|")}`;case"too_big":{let s=i.inclusive?"<=":"<",o=e(i.origin);return o?`Tó pọ̀ jù: a ní láti jẹ́ pé ${i.origin??"iye"} ${o.verb} ${s}${i.maximum} ${o.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${s}${i.maximum}`}case"too_small":{let s=i.inclusive?">=":">",o=e(i.origin);return o?`Kéré ju: a ní láti jẹ́ pé ${i.origin} ${o.verb} ${s}${i.minimum} ${o.unit}`:`Kéré ju: a ní láti jẹ́ ${s}${i.minimum}`}case"invalid_format":{let s=i;return s.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${s.prefix}"`:s.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${s.suffix}"`:s.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${s.includes}"`:s.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${s.pattern}`:`Aṣìṣe: ${n[s.format]??i.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${i.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${T(i.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${i.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${i.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function CD(){return{localeError:ND()}}var kf,Xv=Symbol("ZodOutput"),Qv=Symbol("ZodInput");class eb{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...n){let r=n[0];return this._map.set(e,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let n=this._map.get(e);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(e),this}get(e){let n=e._zod.parent;if(n){let r={...this.get(n)??{}};delete r.id;let i={...r,...this._map.get(e)};return Object.keys(i).length?i:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Lu(){return new eb}(kf=globalThis).__zod_globalRegistry??(kf.__zod_globalRegistry=Lu());var ht=globalThis.__zod_globalRegistry;function tb(t,e){return new t({type:"string",...P(e)})}function nb(t,e){return new t({type:"string",coerce:!0,...P(e)})}function Fu(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...P(e)})}function so(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...P(e)})}function Vu(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...P(e)})}function Wu(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...P(e)})}function Hu(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...P(e)})}function Bu(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...P(e)})}function jo(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...P(e)})}function qu(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...P(e)})}function Ju(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...P(e)})}function Yu(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...P(e)})}function Gu(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...P(e)})}function Ku(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...P(e)})}function Xu(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...P(e)})}function Qu(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...P(e)})}function ec(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...P(e)})}function tc(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...P(e)})}function ib(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...P(e)})}function nc(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...P(e)})}function ic(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...P(e)})}function rc(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...P(e)})}function sc(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...P(e)})}function oc(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...P(e)})}function ac(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...P(e)})}var rb={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function sb(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...P(e)})}function ob(t,e){return new t({type:"string",format:"date",check:"string_format",...P(e)})}function ab(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...P(e)})}function lb(t,e){return new t({type:"string",format:"duration",check:"string_format",...P(e)})}function ub(t,e){return new t({type:"number",checks:[],...P(e)})}function cb(t,e){return new t({type:"number",coerce:!0,checks:[],...P(e)})}function db(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...P(e)})}function fb(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...P(e)})}function hb(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...P(e)})}function mb(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...P(e)})}function pb(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...P(e)})}function gb(t,e){return new t({type:"boolean",...P(e)})}function vb(t,e){return new t({type:"boolean",coerce:!0,...P(e)})}function bb(t,e){return new t({type:"bigint",...P(e)})}function yb(t,e){return new t({type:"bigint",coerce:!0,...P(e)})}function _b(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...P(e)})}function kb(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...P(e)})}function $b(t,e){return new t({type:"symbol",...P(e)})}function xb(t,e){return new t({type:"undefined",...P(e)})}function wb(t,e){return new t({type:"null",...P(e)})}function Sb(t){return new t({type:"any"})}function Ib(t){return new t({type:"unknown"})}function zb(t,e){return new t({type:"never",...P(e)})}function Ob(t,e){return new t({type:"void",...P(e)})}function Tb(t,e){return new t({type:"date",...P(e)})}function Db(t,e){return new t({type:"date",coerce:!0,...P(e)})}function Pb(t,e){return new t({type:"nan",...P(e)})}function dn(t,e){return new Pu({check:"less_than",...P(e),value:t,inclusive:!1})}function gt(t,e){return new Pu({check:"less_than",...P(e),value:t,inclusive:!0})}function fn(t,e){return new Eu({check:"greater_than",...P(e),value:t,inclusive:!1})}function Xe(t,e){return new Eu({check:"greater_than",...P(e),value:t,inclusive:!0})}function lc(t){return fn(0,t)}function uc(t){return dn(0,t)}function cc(t){return gt(0,t)}function dc(t){return Xe(0,t)}function yi(t,e){return new gg({check:"multiple_of",...P(e),value:t})}function Di(t,e){return new yg({check:"max_size",...P(e),maximum:t})}function hn(t,e){return new _g({check:"min_size",...P(e),minimum:t})}function Br(t,e){return new kg({check:"size_equals",...P(e),size:t})}function qr(t,e){return new $g({check:"max_length",...P(e),maximum:t})}function Rn(t,e){return new xg({check:"min_length",...P(e),minimum:t})}function Jr(t,e){return new wg({check:"length_equals",...P(e),length:t})}function Uo(t,e){return new Sg({check:"string_format",format:"regex",...P(e),pattern:t})}function Lo(t){return new Ig({check:"string_format",format:"lowercase",...P(t)})}function Fo(t){return new zg({check:"string_format",format:"uppercase",...P(t)})}function Vo(t,e){return new Og({check:"string_format",format:"includes",...P(e),includes:t})}function Wo(t,e){return new Tg({check:"string_format",format:"starts_with",...P(e),prefix:t})}function Ho(t,e){return new Dg({check:"string_format",format:"ends_with",...P(e),suffix:t})}function fc(t,e,n){return new Pg({check:"property",property:t,schema:e,...P(n)})}function Bo(t,e){return new Eg({check:"mime_type",mime:t,...P(e)})}function Yt(t){return new Mg({check:"overwrite",tx:t})}function qo(t){return Yt(e=>e.normalize(t))}function Jo(){return Yt(t=>t.trim())}function Yo(){return Yt(t=>t.toLowerCase())}function Go(){return Yt(t=>t.toUpperCase())}function Ko(){return Yt(t=>xp(t))}function Eb(t,e,n){return new t({type:"array",element:e,...P(n)})}function AD(t,e,n){return new t({type:"union",options:e,...P(n)})}function RD(t,e,n){return new t({type:"union",options:e,inclusive:!1,...P(n)})}function ZD(t,e,n,r){return new t({type:"union",options:n,discriminator:e,...P(r)})}function jD(t,e,n){return new t({type:"intersection",left:e,right:n})}function UD(t,e,n,r){let i=n instanceof H;return new t({type:"tuple",items:e,rest:i?n:null,...P(i?r:n)})}function LD(t,e,n,r){return new t({type:"record",keyType:e,valueType:n,...P(r)})}function FD(t,e,n,r){return new t({type:"map",keyType:e,valueType:n,...P(r)})}function VD(t,e,n){return new t({type:"set",valueType:e,...P(n)})}function WD(t,e,n){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new t({type:"enum",entries:r,...P(n)})}function HD(t,e,n){return new t({type:"enum",entries:e,...P(n)})}function BD(t,e,n){return new t({type:"literal",values:Array.isArray(e)?e:[e],...P(n)})}function Mb(t,e){return new t({type:"file",...P(e)})}function qD(t,e){return new t({type:"transform",transform:e})}function JD(t,e){return new t({type:"optional",innerType:e})}function YD(t,e){return new t({type:"nullable",innerType:e})}function GD(t,e,n){return new t({type:"default",innerType:e,get defaultValue(){return typeof n=="function"?n():Sp(n)}})}function KD(t,e,n){return new t({type:"nonoptional",innerType:e,...P(n)})}function XD(t,e){return new t({type:"success",innerType:e})}function QD(t,e,n){return new t({type:"catch",innerType:e,catchValue:typeof n=="function"?n:()=>n})}function eP(t,e,n){return new t({type:"pipe",in:e,out:n})}function tP(t,e){return new t({type:"readonly",innerType:e})}function nP(t,e,n){return new t({type:"template_literal",parts:e,...P(n)})}function iP(t,e){return new t({type:"lazy",getter:e})}function rP(t,e){return new t({type:"promise",innerType:e})}function Nb(t,e,n){let r=P(n);return r.abort??(r.abort=!0),new t({type:"custom",check:"custom",fn:e,...r})}function Cb(t,e,n){return new t({type:"custom",check:"custom",fn:e,...P(n)})}function Ab(t){let e=Rb(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(io(r,n.value,e._zod.def));else{let i=r;i.fatal&&(i.continue=!1),i.code??(i.code="custom"),i.input??(i.input=n.value),i.inst??(i.inst=e),i.continue??(i.continue=!e._zod.def.abort),n.issues.push(io(i))}},t(n.value,n)));return e}function Rb(t,e){let n=new ke({check:"custom",...P(e)});return n._zod.check=t,n}function Zb(t){let e=new ke({check:"describe"});return e._zod.onattach=[n=>{let r=ht.get(n)??{};ht.add(n,{...r,description:t})}],e._zod.check=()=>{},e}function jb(t){let e=new ke({check:"meta"});return e._zod.onattach=[n=>{let r=ht.get(n)??{};ht.add(n,{...r,...t})}],e._zod.check=()=>{},e}function Ub(t,e){let n=P(e),r=n.truthy??["true","1","yes","on","y","enabled"],i=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(r=r.map(f=>typeof f=="string"?f.toLowerCase():f),i=i.map(f=>typeof f=="string"?f.toLowerCase():f));let s=new Set(r),o=new Set(i),a=t.Codec??ju,l=t.Boolean??Cu,u=new(t.String??Hr)({type:"string",error:n.error}),c=new l({type:"boolean",error:n.error}),d=new a({type:"pipe",in:u,out:c,transform:(f,h)=>{let m=f;return n.case!=="sensitive"&&(m=m.toLowerCase()),s.has(m)?!0:o.has(m)?!1:(h.issues.push({code:"invalid_value",expected:"stringbool",values:[...s,...o],input:h.value,inst:d,continue:!1}),{})},reverseTransform:(f,h)=>f===!0?r[0]||"true":i[0]||"false",error:n.error});return d}function Yr(t,e,n,r={}){let i=P(r),s={...P(r),check:"string_format",type:"string",format:e,fn:typeof n=="function"?n:o=>n.test(o),...i};return n instanceof RegExp&&(s.pattern=n),new t(s)}function _i(t){let e=(t==null?void 0:t.target)??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:(t==null?void 0:t.metadata)??ht,target:e,unrepresentable:(t==null?void 0:t.unrepresentable)??"throw",override:(t==null?void 0:t.override)??(()=>{}),io:(t==null?void 0:t.io)??"output",counter:0,seen:new Map,cycles:(t==null?void 0:t.cycles)??"ref",reused:(t==null?void 0:t.reused)??"inline",external:(t==null?void 0:t.external)??void 0}}function ce(t,e,n={path:[],schemaPath:[]}){var u,c;var r;let i=t._zod.def,s=e.seen.get(t);if(s)return s.count++,n.schemaPath.includes(t)&&(s.cycle=n.path),s.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};e.seen.set(t,o);let a=(c=(u=t._zod).toJSONSchema)==null?void 0:c.call(u);if(a)o.schema=a;else{let d={...n,schemaPath:[...n.schemaPath,t],path:n.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,o.schema,d);else{let h=o.schema,m=e.processors[i.type];if(!m)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);m(t,e,h,d)}let f=t._zod.parent;f&&(o.ref||(o.ref=f),ce(f,e,d),e.seen.get(f).isParent=!0)}let l=e.metadataRegistry.get(t);return l&&Object.assign(o.schema,l),e.io==="input"&&Ye(t)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(t).schema}function ki(t,e){var o,a,l,u;let n=t.seen.get(e);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let c of t.seen.entries()){let d=(o=t.metadataRegistry.get(c[0]))==null?void 0:o.id;if(d){let f=r.get(d);if(f&&f!==c[0])throw Error(`Duplicate schema id "${d}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(d,c[0])}}let i=c=>{var m;let d=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let p=(m=t.external.registry.get(c[0]))==null?void 0:m.id,g=t.external.uri??(k=>k);if(p)return{ref:g(p)};let b=c[1].defId??c[1].schema.id??`schema${t.counter++}`;return c[1].defId=b,{defId:b,ref:`${g("__shared")}#/${d}/${b}`}}if(c[1]===n)return{ref:"#"};let f=`#/${d}/`,h=c[1].schema.id??`__schema${t.counter++}`;return{defId:h,ref:f+h}},s=c=>{if(c[1].schema.$ref)return;let d=c[1],{ref:f,defId:h}=i(c);d.def={...d.schema},h&&(d.defId=h);let m=d.schema;for(let p in m)delete m[p];m.$ref=f};if(t.cycles==="throw")for(let c of t.seen.entries()){let d=c[1];if(d.cycle)throw Error(`Cycle detected: #/${(a=d.cycle)==null?void 0:a.join("/")}/<root>
|
|
82
|
+
`)}d.write("payload.value = newResult;"),d.write("return payload;");let p=d.compile();return(_,y)=>p(c,_,y)},r,s=xi,o=!sa.jitless,a=o&&jB.value,l=e.catchall,u;t._zod.parse=(c,d)=>{u??(u=i.value);let f=c.value;return s(f)?o&&a&&(d==null?void 0:d.async)===!1&&d.jitless!==!0?(r||(r=n(e.shape)),c=r(c,d),l?Ky([],f,c,d,u,t):c):A(c,d):(c.issues.push({expected:"object",code:"invalid_type",input:f,inst:t}),c)}});function kg(t,e,A,i){for(let r of t)if(r.issues.length===0)return e.value=r.value,e;let n=t.filter(r=>!xn(r));return n.length===1?(e.value=n[0].value,n[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:A,errors:t.map(r=>r.issues.map(s=>Wt(s,i,lt())))}),e)}var Ya=C("$ZodUnion",(t,e)=>{X.init(t,e),ee(t._zod,"optin",()=>e.options.some(n=>n._zod.optin==="optional")?"optional":void 0),ee(t._zod,"optout",()=>e.options.some(n=>n._zod.optout==="optional")?"optional":void 0),ee(t._zod,"values",()=>{if(e.options.every(n=>n._zod.values))return new Set(e.options.flatMap(n=>Array.from(n._zod.values)))}),ee(t._zod,"pattern",()=>{if(e.options.every(n=>n._zod.pattern)){let n=e.options.map(r=>r._zod.pattern);return new RegExp(`^(${n.map(r=>Wa(r.source)).join("|")})$`)}});let A=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,r)=>{if(A)return i(n,r);let s=!1,o=[];for(let a of e.options){let l=a._zod.run({value:n.value,issues:[]},r);if(l instanceof Promise)o.push(l),s=!0;else{if(l.issues.length===0)return l;o.push(l)}}return s?Promise.all(o).then(a=>kg(a,n,t,r)):kg(o,n,t,r)}});function Eg(t,e,A,i){let n=t.filter(r=>r.issues.length===0);return n.length===1?(e.value=n[0].value,e):(n.length===0?e.issues.push({code:"invalid_union",input:e.value,inst:A,errors:t.map(r=>r.issues.map(s=>Wt(s,i,lt())))}):e.issues.push({code:"invalid_union",input:e.value,inst:A,errors:[],inclusive:!1}),e)}var jy=C("$ZodXor",(t,e)=>{Ya.init(t,e),e.inclusive=!1;let A=e.options.length===1,i=e.options[0]._zod.run;t._zod.parse=(n,r)=>{if(A)return i(n,r);let s=!1,o=[];for(let a of e.options){let l=a._zod.run({value:n.value,issues:[]},r);l instanceof Promise?(o.push(l),s=!0):o.push(l)}return s?Promise.all(o).then(a=>Eg(a,n,t,r)):Eg(o,n,t,r)}}),Gy=C("$ZodDiscriminatedUnion",(t,e)=>{e.inclusive=!1,Ya.init(t,e);let A=t._zod.parse;ee(t._zod,"propValues",()=>{let n={};for(let r of e.options){let s=r._zod.propValues;if(!s||Object.keys(s).length===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let[o,a]of Object.entries(s)){n[o]||(n[o]=new Set);for(let l of a)n[o].add(l)}}return n});let i=ds(()=>{var s;let n=e.options,r=new Map;for(let o of n){let a=(s=o._zod.propValues)==null?void 0:s[e.discriminator];if(!a||a.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(o)}"`);for(let l of a){if(r.has(l))throw Error(`Duplicate discriminator value "${String(l)}"`);r.set(l,o)}}return r});t._zod.parse=(n,r)=>{let s=n.value;if(!xi(s))return n.issues.push({code:"invalid_type",expected:"object",input:s,inst:t}),n;let o=i.value.get(s==null?void 0:s[e.discriminator]);return o?o._zod.run(n,r):e.unionFallback?A(n,r):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:e.discriminator,input:s,path:[e.discriminator],inst:t}),n)}}),Wy=C("$ZodIntersection",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>{let n=A.value,r=e.left._zod.run({value:n,issues:[]},i),s=e.right._zod.run({value:n,issues:[]},i);return r instanceof Promise||s instanceof Promise?Promise.all([r,s]).then(([o,a])=>$g(A,o,a)):$g(A,r,s)}});function oc(t,e){if(t===e)return{valid:!0,data:t};if(t instanceof Date&&e instanceof Date&&+t==+e)return{valid:!0,data:t};if(Dn(t)&&Dn(e)){let A=Object.keys(e),i=Object.keys(t).filter(r=>A.indexOf(r)!==-1),n={...t,...e};for(let r of i){let s=oc(t[r],e[r]);if(!s.valid)return{valid:!1,mergeErrorPath:[r,...s.mergeErrorPath]};n[r]=s.data}return{valid:!0,data:n}}if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return{valid:!1,mergeErrorPath:[]};let A=[];for(let i=0;i<t.length;i++){let n=t[i],r=e[i],s=oc(n,r);if(!s.valid)return{valid:!1,mergeErrorPath:[i,...s.mergeErrorPath]};A.push(s.data)}return{valid:!0,data:A}}return{valid:!1,mergeErrorPath:[]}}function $g(t,e,A){let i=new Map,n;for(let o of e.issues)if(o.code==="unrecognized_keys"){n??(n=o);for(let a of o.keys)i.has(a)||i.set(a,{}),i.get(a).l=!0}else t.issues.push(o);for(let o of A.issues)if(o.code==="unrecognized_keys")for(let a of o.keys)i.has(a)||i.set(a,{}),i.get(a).r=!0;else t.issues.push(o);let r=[...i].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(r.length&&n&&t.issues.push({...n,keys:r}),xn(t))return t;let s=oc(e.value,A.value);if(!s.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);return t.value=s.data,t}var Yd=C("$ZodTuple",(t,e)=>{X.init(t,e);let A=e.items;t._zod.parse=(i,n)=>{let r=i.value;if(!Array.isArray(r))return i.issues.push({input:r,inst:t,expected:"tuple",code:"invalid_type"}),i;i.value=[];let s=[],o=[...A].reverse().findIndex(u=>u._zod.optin!=="optional"),a=o===-1?0:A.length-o;if(!e.rest){let u=r.length>A.length,c=r.length<a-1;if(u||c)return i.issues.push({...u?{code:"too_big",maximum:A.length,inclusive:!0}:{code:"too_small",minimum:A.length},input:r,inst:t,origin:"array"}),i}let l=-1;for(let u of A){if(l++,l>=r.length&&l>=a)continue;let c=u._zod.run({value:r[l],issues:[]},n);c instanceof Promise?s.push(c.then(d=>Js(d,i,l))):Js(c,i,l)}if(e.rest){let u=r.slice(A.length);for(let c of u){l++;let d=e.rest._zod.run({value:c,issues:[]},n);d instanceof Promise?s.push(d.then(f=>Js(f,i,l))):Js(d,i,l)}}return s.length?Promise.all(s).then(()=>i):i}});function Js(t,e,A){t.issues.length&&e.issues.push(...nA(A,t.issues)),e.value[A]=t.value}var Jy=C("$ZodRecord",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>{let n=A.value;if(!Dn(n))return A.issues.push({expected:"record",code:"invalid_type",input:n,inst:t}),A;let r=[],s=e.keyType._zod.values;if(s){A.value={};let o=new Set;for(let l of s)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){o.add(typeof l=="number"?l.toString():l);let u=e.valueType._zod.run({value:n[l],issues:[]},i);u instanceof Promise?r.push(u.then(c=>{c.issues.length&&A.issues.push(...nA(l,c.issues)),A.value[l]=c.value})):(u.issues.length&&A.issues.push(...nA(l,u.issues)),A.value[l]=u.value)}let a;for(let l in n)o.has(l)||(a=a??[],a.push(l));a&&a.length>0&&A.issues.push({code:"unrecognized_keys",input:n,inst:t,keys:a})}else{A.value={};for(let o of Reflect.ownKeys(n)){if(o==="__proto__")continue;let a=e.keyType._zod.run({value:o,issues:[]},i);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof o=="string"&&Zd.test(o)&&a.issues.length&&a.issues.some(u=>u.code==="invalid_type"&&u.expected==="number")){let u=e.keyType._zod.run({value:Number(o),issues:[]},i);if(u instanceof Promise)throw Error("Async schemas not supported in object keys currently");u.issues.length===0&&(a=u)}if(a.issues.length){e.mode==="loose"?A.value[o]=n[o]:A.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map(u=>Wt(u,i,lt())),input:o,path:[o],inst:t});continue}let l=e.valueType._zod.run({value:n[o],issues:[]},i);l instanceof Promise?r.push(l.then(u=>{u.issues.length&&A.issues.push(...nA(o,u.issues)),A.value[a.value]=u.value})):(l.issues.length&&A.issues.push(...nA(o,l.issues)),A.value[a.value]=l.value)}}return r.length?Promise.all(r).then(()=>A):A}}),Xy=C("$ZodMap",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>{let n=A.value;if(!(n instanceof Map))return A.issues.push({expected:"map",code:"invalid_type",input:n,inst:t}),A;let r=[];A.value=new Map;for(let[s,o]of n){let a=e.keyType._zod.run({value:s,issues:[]},i),l=e.valueType._zod.run({value:o,issues:[]},i);a instanceof Promise||l instanceof Promise?r.push(Promise.all([a,l]).then(([u,c])=>{Tg(u,c,A,s,n,t,i)})):Tg(a,l,A,s,n,t,i)}return r.length?Promise.all(r).then(()=>A):A}});function Tg(t,e,A,i,n,r,s){t.issues.length&&(aa.has(typeof i)?A.issues.push(...nA(i,t.issues)):A.issues.push({code:"invalid_key",origin:"map",input:n,inst:r,issues:t.issues.map(o=>Wt(o,s,lt()))})),e.issues.length&&(aa.has(typeof i)?A.issues.push(...nA(i,e.issues)):A.issues.push({origin:"map",code:"invalid_element",input:n,inst:r,key:i,issues:e.issues.map(o=>Wt(o,s,lt()))})),A.value.set(t.value,e.value)}var Yy=C("$ZodSet",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>{let n=A.value;if(!(n instanceof Set))return A.issues.push({input:n,inst:t,expected:"set",code:"invalid_type"}),A;let r=[];A.value=new Set;for(let s of n){let o=e.valueType._zod.run({value:s,issues:[]},i);o instanceof Promise?r.push(o.then(a=>Og(a,A))):Og(o,A)}return r.length?Promise.all(r).then(()=>A):A}});function Og(t,e){t.issues.length&&e.issues.push(...t.issues),e.value.add(t.value)}var qy=C("$ZodEnum",(t,e)=>{X.init(t,e);let A=kd(e.entries),i=new Set(A);t._zod.values=i,t._zod.pattern=new RegExp(`^(${A.filter(n=>aa.has(typeof n)).map(n=>typeof n=="string"?EA(n):n.toString()).join("|")})$`),t._zod.parse=(n,r)=>{let s=n.value;return i.has(s)||n.issues.push({code:"invalid_value",values:A,input:s,inst:t}),n}}),eb=C("$ZodLiteral",(t,e)=>{if(X.init(t,e),e.values.length===0)throw Error("Cannot create literal schema with no valid values");let A=new Set(e.values);t._zod.values=A,t._zod.pattern=new RegExp(`^(${e.values.map(i=>typeof i=="string"?EA(i):i?EA(i.toString()):String(i)).join("|")})$`),t._zod.parse=(i,n)=>{let r=i.value;return A.has(r)||i.issues.push({code:"invalid_value",values:e.values,input:r,inst:t}),i}}),tb=C("$ZodFile",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>{let n=A.value;return n instanceof File||A.issues.push({expected:"file",code:"invalid_type",input:n,inst:t}),A}}),Ab=C("$ZodTransform",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>{if(i.direction==="backward")throw new Ga(t.constructor.name);let n=e.transform(A.value,A);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(r=>(A.value=r,A));if(n instanceof Promise)throw new En;return A.value=n,A}});function Hg(t,e){return t.issues.length&&e===void 0?{issues:[],value:void 0}:t}var qd=C("$ZodOptional",(t,e)=>{X.init(t,e),t._zod.optin="optional",t._zod.optout="optional",ee(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),ee(t._zod,"pattern",()=>{let A=e.innerType._zod.pattern;return A?new RegExp(`^(${Wa(A.source)})?$`):void 0}),t._zod.parse=(A,i)=>{if(e.innerType._zod.optin==="optional"){let n=e.innerType._zod.run(A,i);return n instanceof Promise?n.then(r=>Hg(r,A.value)):Hg(n,A.value)}return A.value===void 0?A:e.innerType._zod.run(A,i)}}),nb=C("$ZodExactOptional",(t,e)=>{qd.init(t,e),ee(t._zod,"values",()=>e.innerType._zod.values),ee(t._zod,"pattern",()=>e.innerType._zod.pattern),t._zod.parse=(A,i)=>e.innerType._zod.run(A,i)}),ib=C("$ZodNullable",(t,e)=>{X.init(t,e),ee(t._zod,"optin",()=>e.innerType._zod.optin),ee(t._zod,"optout",()=>e.innerType._zod.optout),ee(t._zod,"pattern",()=>{let A=e.innerType._zod.pattern;return A?new RegExp(`^(${Wa(A.source)}|null)$`):void 0}),ee(t._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),t._zod.parse=(A,i)=>A.value===null?A:e.innerType._zod.run(A,i)}),rb=C("$ZodDefault",(t,e)=>{X.init(t,e),t._zod.optin="optional",ee(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(A,i)=>{if(i.direction==="backward")return e.innerType._zod.run(A,i);if(A.value===void 0)return A.value=e.defaultValue,A;let n=e.innerType._zod.run(A,i);return n instanceof Promise?n.then(r=>Dg(r,e)):Dg(n,e)}});function Dg(t,e){return t.value===void 0&&(t.value=e.defaultValue),t}var sb=C("$ZodPrefault",(t,e)=>{X.init(t,e),t._zod.optin="optional",ee(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(A,i)=>(i.direction==="backward"||A.value===void 0&&(A.value=e.defaultValue),e.innerType._zod.run(A,i))}),ob=C("$ZodNonOptional",(t,e)=>{X.init(t,e),ee(t._zod,"values",()=>{let A=e.innerType._zod.values;return A?new Set([...A].filter(i=>i!==void 0)):void 0}),t._zod.parse=(A,i)=>{let n=e.innerType._zod.run(A,i);return n instanceof Promise?n.then(r=>Lg(r,t)):Lg(n,t)}});function Lg(t,e){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:e}),t}var ab=C("$ZodSuccess",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>{if(i.direction==="backward")throw new Ga("ZodSuccess");let n=e.innerType._zod.run(A,i);return n instanceof Promise?n.then(r=>(A.value=r.issues.length===0,A)):(A.value=n.issues.length===0,A)}}),lb=C("$ZodCatch",(t,e)=>{X.init(t,e),ee(t._zod,"optin",()=>e.innerType._zod.optin),ee(t._zod,"optout",()=>e.innerType._zod.optout),ee(t._zod,"values",()=>e.innerType._zod.values),t._zod.parse=(A,i)=>{if(i.direction==="backward")return e.innerType._zod.run(A,i);let n=e.innerType._zod.run(A,i);return n instanceof Promise?n.then(r=>(A.value=r.value,r.issues.length&&(A.value=e.catchValue({...A,error:{issues:r.issues.map(s=>Wt(s,i,lt()))},input:A.value}),A.issues=[]),A)):(A.value=n.value,n.issues.length&&(A.value=e.catchValue({...A,error:{issues:n.issues.map(r=>Wt(r,i,lt()))},input:A.value}),A.issues=[]),A)}}),ub=C("$ZodNaN",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>((typeof A.value!="number"||!Number.isNaN(A.value))&&A.issues.push({input:A.value,inst:t,expected:"nan",code:"invalid_type"}),A)}),cb=C("$ZodPipe",(t,e)=>{X.init(t,e),ee(t._zod,"values",()=>e.in._zod.values),ee(t._zod,"optin",()=>e.in._zod.optin),ee(t._zod,"optout",()=>e.out._zod.optout),ee(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(A,i)=>{if(i.direction==="backward"){let r=e.out._zod.run(A,i);return r instanceof Promise?r.then(s=>Xs(s,e.in,i)):Xs(r,e.in,i)}let n=e.in._zod.run(A,i);return n instanceof Promise?n.then(r=>Xs(r,e.out,i)):Xs(n,e.out,i)}});function Xs(t,e,A){return t.issues.length?(t.aborted=!0,t):e._zod.run({value:t.value,issues:t.issues},A)}var ef=C("$ZodCodec",(t,e)=>{X.init(t,e),ee(t._zod,"values",()=>e.in._zod.values),ee(t._zod,"optin",()=>e.in._zod.optin),ee(t._zod,"optout",()=>e.out._zod.optout),ee(t._zod,"propValues",()=>e.in._zod.propValues),t._zod.parse=(A,i)=>{if((i.direction||"forward")==="forward"){let n=e.in._zod.run(A,i);return n instanceof Promise?n.then(r=>Ys(r,e,i)):Ys(n,e,i)}else{let n=e.out._zod.run(A,i);return n instanceof Promise?n.then(r=>Ys(r,e,i)):Ys(n,e,i)}}});function Ys(t,e,A){if(t.issues.length)return t.aborted=!0,t;if((A.direction||"forward")==="forward"){let i=e.transform(t.value,t);return i instanceof Promise?i.then(n=>qs(t,n,e.out,A)):qs(t,i,e.out,A)}else{let i=e.reverseTransform(t.value,t);return i instanceof Promise?i.then(n=>qs(t,n,e.in,A)):qs(t,i,e.in,A)}}function qs(t,e,A,i){return t.issues.length?(t.aborted=!0,t):A._zod.run({value:e,issues:t.issues},i)}var db=C("$ZodReadonly",(t,e)=>{X.init(t,e),ee(t._zod,"propValues",()=>e.innerType._zod.propValues),ee(t._zod,"values",()=>e.innerType._zod.values),ee(t._zod,"optin",()=>{var A,i;return(i=(A=e.innerType)==null?void 0:A._zod)==null?void 0:i.optin}),ee(t._zod,"optout",()=>{var A,i;return(i=(A=e.innerType)==null?void 0:A._zod)==null?void 0:i.optout}),t._zod.parse=(A,i)=>{if(i.direction==="backward")return e.innerType._zod.run(A,i);let n=e.innerType._zod.run(A,i);return n instanceof Promise?n.then(Mg):Mg(n)}});function Mg(t){return t.value=Object.freeze(t.value),t}var fb=C("$ZodTemplateLiteral",(t,e)=>{X.init(t,e);let A=[];for(let i of e.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let n=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!n)throw Error(`Invalid template literal part: ${i._zod.traits}`);let r=n.startsWith("^")?1:0,s=n.endsWith("$")?n.length-1:n.length;A.push(n.slice(r,s))}else if(i===null||WB.has(typeof i))A.push(EA(`${i}`));else throw Error(`Invalid template literal part: ${i}`);t._zod.pattern=new RegExp(`^${A.join("")}$`),t._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:t,expected:"string",code:"invalid_type"}),i):(t._zod.pattern.lastIndex=0,t._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:t,code:"invalid_format",format:e.format??"template_literal",pattern:t._zod.pattern.source}),i)}),hb=C("$ZodFunction",(t,e)=>(X.init(t,e),t._def=e,t._zod.def=e,t.implement=A=>{if(typeof A!="function")throw Error("implement() must be called with a function");return function(...i){let n=t._def.input?rc(t._def.input,i):i,r=Reflect.apply(A,this,n);return t._def.output?rc(t._def.output,r):r}},t.implementAsync=A=>{if(typeof A!="function")throw Error("implementAsync() must be called with a function");return async function(...i){let n=t._def.input?await sc(t._def.input,i):i,r=await Reflect.apply(A,this,n);return t._def.output?await sc(t._def.output,r):r}},t._zod.parse=(A,i)=>typeof A.value!="function"?(A.issues.push({code:"invalid_type",expected:"function",input:A.value,inst:t}),A):(t._def.output&&t._def.output._zod.def.type==="promise"?A.value=t.implementAsync(A.value):A.value=t.implement(A.value),A),t.input=(...A)=>{let i=t.constructor;return Array.isArray(A[0])?new i({type:"function",input:new Yd({type:"tuple",items:A[0],rest:A[1]}),output:t._def.output}):new i({type:"function",input:A[0],output:t._def.output})},t.output=A=>new t.constructor({type:"function",input:t._def.input,output:A}),t)),gb=C("$ZodPromise",(t,e)=>{X.init(t,e),t._zod.parse=(A,i)=>Promise.resolve(A.value).then(n=>e.innerType._zod.run({value:n,issues:[]},i))}),mb=C("$ZodLazy",(t,e)=>{X.init(t,e),ee(t._zod,"innerType",()=>e.getter()),ee(t._zod,"pattern",()=>{var A,i;return(i=(A=t._zod.innerType)==null?void 0:A._zod)==null?void 0:i.pattern}),ee(t._zod,"propValues",()=>{var A,i;return(i=(A=t._zod.innerType)==null?void 0:A._zod)==null?void 0:i.propValues}),ee(t._zod,"optin",()=>{var A,i;return((i=(A=t._zod.innerType)==null?void 0:A._zod)==null?void 0:i.optin)??void 0}),ee(t._zod,"optout",()=>{var A,i;return((i=(A=t._zod.innerType)==null?void 0:A._zod)==null?void 0:i.optout)??void 0}),t._zod.parse=(A,i)=>t._zod.innerType._zod.run(A,i)}),pb=C("$ZodCustom",(t,e)=>{ke.init(t,e),X.init(t,e),t._zod.parse=(A,i)=>A,t._zod.check=A=>{let i=A.value,n=e.fn(i);if(n instanceof Promise)return n.then(r=>Ng(r,A,i,t));Ng(n,A,i,t)}});function Ng(t,e,A,i){if(!t){let n={code:"custom",input:A,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),e.issues.push(la(n))}}var tf={};OA(tf,{zhTW:()=>sO,zhCN:()=>iO,yo:()=>aO,vi:()=>AO,uz:()=>eO,ur:()=>YT,uk:()=>wb,ua:()=>JT,tr:()=>GT,th:()=>VT,ta:()=>KT,sv:()=>PT,sl:()=>NT,ru:()=>LT,pt:()=>HT,ps:()=>ET,pl:()=>TT,ota:()=>ST,no:()=>FT,nl:()=>QT,ms:()=>CT,mk:()=>bT,lt:()=>wT,ko:()=>vT,km:()=>Bb,kh:()=>mT,ka:()=>hT,ja:()=>dT,it:()=>uT,is:()=>aT,id:()=>sT,hy:()=>iT,hu:()=>AT,he:()=>eT,frCA:()=>Y4,fr:()=>J4,fi:()=>G4,fa:()=>V4,es:()=>K4,eo:()=>P4,en:()=>vb,de:()=>M4,da:()=>D4,cs:()=>O4,ca:()=>$4,bg:()=>k4,be:()=>I4,az:()=>x4,ar:()=>U4});var C4=()=>{let t={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function e(n){return t[n]??null}let A={regex:"مدخل",email:"بريد إلكتروني",url:"رابط",emoji:"إيموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاريخ ووقت بمعيار ISO",date:"تاريخ بمعيار ISO",time:"وقت بمعيار ISO",duration:"مدة بمعيار ISO",ipv4:"عنوان IPv4",ipv6:"عنوان IPv6",cidrv4:"مدى عناوين بصيغة IPv4",cidrv6:"مدى عناوين بصيغة IPv6",base64:"نَص بترميز base64-encoded",base64url:"نَص بترميز base64url-encoded",json_string:"نَص على هيئة JSON",e164:"رقم هاتف بمعيار E.164",jwt:"JWT",template_literal:"مدخل"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${n.expected}، ولكن تم إدخال ${o}`:`مدخلات غير مقبولة: يفترض إدخال ${r}، ولكن تم إدخال ${o}`}case"invalid_value":return n.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${V(n.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?` أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${r} ${n.maximum.toString()} ${s.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${n.origin??"القيمة"} ${r} ${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${r} ${n.minimum.toString()} ${s.unit}`:`أصغر من اللازم: يفترض لـ ${n.origin} أن يكون ${r} ${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${n.prefix}"`:r.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${r.suffix}"`:r.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${r.includes}"`:r.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${r.pattern}`:`${A[r.format]??n.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${n.divisor}`;case"unrecognized_keys":return`معرف${n.keys.length>1?"ات":""} غريب${n.keys.length>1?"ة":""}: ${S(n.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${n.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${n.origin}`;default:return"مدخل غير مقبول"}}};function U4(){return{localeError:C4()}}var Q4=()=>{let t={string:{unit:"simvol",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"element",verb:"olmalıdır"},set:{unit:"element",verb:"olmalıdır"}};function e(n){return t[n]??null}let A={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Yanlış dəyər: gözlənilən instanceof ${n.expected}, daxil olan ${o}`:`Yanlış dəyər: gözlənilən ${r}, daxil olan ${o}`}case"invalid_value":return n.values.length===1?`Yanlış dəyər: gözlənilən ${V(n.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${r}${n.maximum.toString()} ${s.unit??"element"}`:`Çox böyük: gözlənilən ${n.origin??"dəyər"} ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Çox kiçik: gözlənilən ${n.origin} ${r}${n.minimum.toString()} ${s.unit}`:`Çox kiçik: gözlənilən ${n.origin} ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Yanlış mətn: "${r.prefix}" ilə başlamalıdır`:r.format==="ends_with"?`Yanlış mətn: "${r.suffix}" ilə bitməlidir`:r.format==="includes"?`Yanlış mətn: "${r.includes}" daxil olmalıdır`:r.format==="regex"?`Yanlış mətn: ${r.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${A[r.format]??n.format}`}case"not_multiple_of":return`Yanlış ədəd: ${n.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${n.keys.length>1?"lar":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${n.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function x4(){return{localeError:Q4()}}function zg(t,e,A,i){let n=Math.abs(t),r=n%10,s=n%100;return s>=11&&s<=19?i:r===1?e:r>=2&&r<=4?A:i}var F4=()=>{let t={string:{unit:{one:"сімвал",few:"сімвалы",many:"сімвалаў"},verb:"мець"},array:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},set:{unit:{one:"элемент",few:"элементы",many:"элементаў"},verb:"мець"},file:{unit:{one:"байт",few:"байты",many:"байтаў"},verb:"мець"}};function e(n){return t[n]??null}let A={regex:"увод",email:"email адрас",url:"URL",emoji:"эмодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата і час",date:"ISO дата",time:"ISO час",duration:"ISO працягласць",ipv4:"IPv4 адрас",ipv6:"IPv6 адрас",cidrv4:"IPv4 дыяпазон",cidrv6:"IPv6 дыяпазон",base64:"радок у фармаце base64",base64url:"радок у фармаце base64url",json_string:"JSON радок",e164:"нумар E.164",jwt:"JWT",template_literal:"увод"},i={nan:"NaN",number:"лік",array:"масіў"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Няправільны ўвод: чакаўся instanceof ${n.expected}, атрымана ${o}`:`Няправільны ўвод: чакаўся ${r}, атрымана ${o}`}case"invalid_value":return n.values.length===1?`Няправільны ўвод: чакалася ${V(n.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);if(s){let o=Number(n.maximum),a=zg(o,s.unit.one,s.unit.few,s.unit.many);return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна ${s.verb} ${r}${n.maximum.toString()} ${a}`}return`Занадта вялікі: чакалася, што ${n.origin??"значэнне"} павінна быць ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);if(s){let o=Number(n.minimum),a=zg(o,s.unit.one,s.unit.few,s.unit.many);return`Занадта малы: чакалася, што ${n.origin} павінна ${s.verb} ${r}${n.minimum.toString()} ${a}`}return`Занадта малы: чакалася, што ${n.origin} павінна быць ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${r.prefix}"`:r.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${r.suffix}"`:r.format==="includes"?`Няправільны радок: павінен змяшчаць "${r.includes}"`:r.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${r.pattern}`:`Няправільны ${A[r.format]??n.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${n.keys.length>1?"ключы":"ключ"}: ${S(n.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${n.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${n.origin}`;default:return"Няправільны ўвод"}}};function I4(){return{localeError:F4()}}var S4=()=>{let t={string:{unit:"символа",verb:"да съдържа"},file:{unit:"байта",verb:"да съдържа"},array:{unit:"елемента",verb:"да съдържа"},set:{unit:"елемента",verb:"да съдържа"}};function e(n){return t[n]??null}let A={regex:"вход",email:"имейл адрес",url:"URL",emoji:"емоджи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO време",date:"ISO дата",time:"ISO време",duration:"ISO продължителност",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"base64-кодиран низ",base64url:"base64url-кодиран низ",json_string:"JSON низ",e164:"E.164 номер",jwt:"JWT",template_literal:"вход"},i={nan:"NaN",number:"число",array:"масив"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Невалиден вход: очакван instanceof ${n.expected}, получен ${o}`:`Невалиден вход: очакван ${r}, получен ${o}`}case"invalid_value":return n.values.length===1?`Невалиден вход: очакван ${V(n.values[0])}`:`Невалидна опция: очаквано едно от ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Твърде голямо: очаква се ${n.origin??"стойност"} да съдържа ${r}${n.maximum.toString()} ${s.unit??"елемента"}`:`Твърде голямо: очаква се ${n.origin??"стойност"} да бъде ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Твърде малко: очаква се ${n.origin} да съдържа ${r}${n.minimum.toString()} ${s.unit}`:`Твърде малко: очаква се ${n.origin} да бъде ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;if(r.format==="starts_with")return`Невалиден низ: трябва да започва с "${r.prefix}"`;if(r.format==="ends_with")return`Невалиден низ: трябва да завършва с "${r.suffix}"`;if(r.format==="includes")return`Невалиден низ: трябва да включва "${r.includes}"`;if(r.format==="regex")return`Невалиден низ: трябва да съвпада с ${r.pattern}`;let s="Невалиден";return r.format==="emoji"&&(s="Невалидно"),r.format==="datetime"&&(s="Невалидно"),r.format==="date"&&(s="Невалидна"),r.format==="time"&&(s="Невалидно"),r.format==="duration"&&(s="Невалидна"),`${s} ${A[r.format]??n.format}`}case"not_multiple_of":return`Невалидно число: трябва да бъде кратно на ${n.divisor}`;case"unrecognized_keys":return`Неразпознат${n.keys.length>1?"и":""} ключ${n.keys.length>1?"ове":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Невалиден ключ в ${n.origin}`;case"invalid_union":return"Невалиден вход";case"invalid_element":return`Невалидна стойност в ${n.origin}`;default:return"Невалиден вход"}}};function k4(){return{localeError:S4()}}var E4=()=>{let t={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function e(n){return t[n]??null}let A={regex:"entrada",email:"adreça electrònica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adreça IPv4",ipv6:"adreça IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipus invàlid: s'esperava instanceof ${n.expected}, s'ha rebut ${o}`:`Tipus invàlid: s'esperava ${r}, s'ha rebut ${o}`}case"invalid_value":return n.values.length===1?`Valor invàlid: s'esperava ${V(n.values[0])}`:`Opció invàlida: s'esperava una de ${S(n.values," o ")}`;case"too_big":{let r=n.inclusive?"com a màxim":"menys de",s=e(n.origin);return s?`Massa gran: s'esperava que ${n.origin??"el valor"} contingués ${r} ${n.maximum.toString()} ${s.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${r} ${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?"com a mínim":"més de",s=e(n.origin);return s?`Massa petit: s'esperava que ${n.origin} contingués ${r} ${n.minimum.toString()} ${s.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${r} ${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Format invàlid: ha de començar amb "${r.prefix}"`:r.format==="ends_with"?`Format invàlid: ha d'acabar amb "${r.suffix}"`:r.format==="includes"?`Format invàlid: ha d'incloure "${r.includes}"`:r.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${r.pattern}`:`Format invàlid per a ${A[r.format]??n.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${n.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${n.origin}`;default:return"Entrada invàlida"}}};function $4(){return{localeError:E4()}}var T4=()=>{let t={string:{unit:"znaků",verb:"mít"},file:{unit:"bajtů",verb:"mít"},array:{unit:"prvků",verb:"mít"},set:{unit:"prvků",verb:"mít"}};function e(n){return t[n]??null}let A={regex:"regulární výraz",email:"e-mailová adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a čas ve formátu ISO",date:"datum ve formátu ISO",time:"čas ve formátu ISO",duration:"doba trvání ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"řetězec zakódovaný ve formátu base64",base64url:"řetězec zakódovaný ve formátu base64url",json_string:"řetězec ve formátu JSON",e164:"číslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"číslo",string:"řetězec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neplatný vstup: očekáváno instanceof ${n.expected}, obdrženo ${o}`:`Neplatný vstup: očekáváno ${r}, obdrženo ${o}`}case"invalid_value":return n.values.length===1?`Neplatný vstup: očekáváno ${V(n.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Hodnota je příliš velká: ${n.origin??"hodnota"} musí mít ${r}${n.maximum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš velká: ${n.origin??"hodnota"} musí být ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Hodnota je příliš malá: ${n.origin??"hodnota"} musí mít ${r}${n.minimum.toString()} ${s.unit??"prvků"}`:`Hodnota je příliš malá: ${n.origin??"hodnota"} musí být ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Neplatný řetězec: musí začínat na "${r.prefix}"`:r.format==="ends_with"?`Neplatný řetězec: musí končit na "${r.suffix}"`:r.format==="includes"?`Neplatný řetězec: musí obsahovat "${r.includes}"`:r.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${r.pattern}`:`Neplatný formát ${A[r.format]??n.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${n.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${S(n.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${n.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${n.origin}`;default:return"Neplatný vstup"}}};function O4(){return{localeError:T4()}}var H4=()=>{let t={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function e(n){return t[n]??null}let A={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslæt",date:"ISO-dato",time:"ISO-klokkeslæt",duration:"ISO-varighed",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${o}`:`Ugyldigt input: forventede ${r}, fik ${o}`}case"invalid_value":return n.values.length===1?`Ugyldig værdi: forventede ${V(n.values[0])}`:`Ugyldigt valg: forventede en af følgende ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin),o=i[n.origin]??n.origin;return s?`For stor: forventede ${o??"value"} ${s.verb} ${r} ${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor: forventede ${o??"value"} havde ${r} ${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin),o=i[n.origin]??n.origin;return s?`For lille: forventede ${o} ${s.verb} ${r} ${n.minimum.toString()} ${s.unit}`:`For lille: forventede ${o} havde ${r} ${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Ugyldig streng: skal starte med "${r.prefix}"`:r.format==="ends_with"?`Ugyldig streng: skal ende med "${r.suffix}"`:r.format==="includes"?`Ugyldig streng: skal indeholde "${r.includes}"`:r.format==="regex"?`Ugyldig streng: skal matche mønsteret ${r.pattern}`:`Ugyldig ${A[r.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${n.origin}`;default:return"Ugyldigt input"}}};function D4(){return{localeError:H4()}}var L4=()=>{let t={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function e(n){return t[n]??null}let A={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ungültige Eingabe: erwartet instanceof ${n.expected}, erhalten ${o}`:`Ungültige Eingabe: erwartet ${r}, erhalten ${o}`}case"invalid_value":return n.values.length===1?`Ungültige Eingabe: erwartet ${V(n.values[0])}`:`Ungültige Option: erwartet eine von ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Zu groß: erwartet, dass ${n.origin??"Wert"} ${r}${n.maximum.toString()} ${s.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${n.origin??"Wert"} ${r}${n.maximum.toString()} ist`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Zu klein: erwartet, dass ${n.origin} ${r}${n.minimum.toString()} ${s.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${r}${n.minimum.toString()} ist`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Ungültiger String: muss mit "${r.prefix}" beginnen`:r.format==="ends_with"?`Ungültiger String: muss mit "${r.suffix}" enden`:r.format==="includes"?`Ungültiger String: muss "${r.includes}" enthalten`:r.format==="regex"?`Ungültiger String: muss dem Muster ${r.pattern} entsprechen`:`Ungültig: ${A[r.format]??n.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${n.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${n.origin}`;default:return"Ungültige Eingabe"}}};function M4(){return{localeError:L4()}}var N4=()=>{let t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function e(n){return t[n]??null}let A={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return`Invalid input: expected ${r}, received ${o}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${V(n.values[0])}`:`Invalid option: expected one of ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Too big: expected ${n.origin??"value"} to have ${r}${n.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${n.origin??"value"} to be ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Too small: expected ${n.origin} to have ${r}${n.minimum.toString()} ${s.unit}`:`Too small: expected ${n.origin} to be ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Invalid string: must start with "${r.prefix}"`:r.format==="ends_with"?`Invalid string: must end with "${r.suffix}"`:r.format==="includes"?`Invalid string: must include "${r.includes}"`:r.format==="regex"?`Invalid string: must match pattern ${r.pattern}`:`Invalid ${A[r.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function vb(){return{localeError:N4()}}var z4=()=>{let t={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function e(n){return t[n]??null}let A={regex:"enigo",email:"retadreso",url:"URL",emoji:"emoĝio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-daŭro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendiĝis instanceof ${n.expected}, riceviĝis ${o}`:`Nevalida enigo: atendiĝis ${r}, riceviĝis ${o}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendiĝis ${V(n.values[0])}`:`Nevalida opcio: atendiĝis unu el ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${r}${n.maximum.toString()} ${s.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${n.origin??"valoro"} havu ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Tro malgranda: atendiĝis ke ${n.origin} havu ${r}${n.minimum.toString()} ${s.unit}`:`Tro malgranda: atendiĝis ke ${n.origin} estu ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${r.prefix}"`:r.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${r.suffix}"`:r.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${r.includes}"`:r.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${r.pattern}`:`Nevalida ${A[r.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} ŝlosilo${n.keys.length>1?"j":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Nevalida ŝlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function P4(){return{localeError:z4()}}var R4=()=>{let t={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function e(n){return t[n]??null}let A={regex:"entrada",email:"dirección de correo electrónico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duración ISO",ipv4:"dirección IPv4",ipv6:"dirección IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"número",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"número grande",symbol:"símbolo",undefined:"indefinido",null:"nulo",function:"función",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeración",union:"unión",literal:"literal",promise:"promesa",void:"vacío",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entrada inválida: se esperaba instanceof ${n.expected}, recibido ${o}`:`Entrada inválida: se esperaba ${r}, recibido ${o}`}case"invalid_value":return n.values.length===1?`Entrada inválida: se esperaba ${V(n.values[0])}`:`Opción inválida: se esperaba una de ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin),o=i[n.origin]??n.origin;return s?`Demasiado grande: se esperaba que ${o??"valor"} tuviera ${r}${n.maximum.toString()} ${s.unit??"elementos"}`:`Demasiado grande: se esperaba que ${o??"valor"} fuera ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin),o=i[n.origin]??n.origin;return s?`Demasiado pequeño: se esperaba que ${o} tuviera ${r}${n.minimum.toString()} ${s.unit}`:`Demasiado pequeño: se esperaba que ${o} fuera ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Cadena inválida: debe comenzar con "${r.prefix}"`:r.format==="ends_with"?`Cadena inválida: debe terminar en "${r.suffix}"`:r.format==="includes"?`Cadena inválida: debe incluir "${r.includes}"`:r.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${r.pattern}`:`Inválido ${A[r.format]??n.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i[n.origin]??n.origin}`;default:return"Entrada inválida"}}};function K4(){return{localeError:R4()}}var Z4=()=>{let t={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function e(n){return t[n]??null}let A={regex:"ورودی",email:"آدرس ایمیل",url:"URL",emoji:"ایموجی",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"تاریخ و زمان ایزو",date:"تاریخ ایزو",time:"زمان ایزو",duration:"مدت زمان ایزو",ipv4:"IPv4 آدرس",ipv6:"IPv6 آدرس",cidrv4:"IPv4 دامنه",cidrv6:"IPv6 دامنه",base64:"base64-encoded رشته",base64url:"base64url-encoded رشته",json_string:"JSON رشته",e164:"E.164 عدد",jwt:"JWT",template_literal:"ورودی"},i={nan:"NaN",number:"عدد",array:"آرایه"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`ورودی نامعتبر: میبایست instanceof ${n.expected} میبود، ${o} دریافت شد`:`ورودی نامعتبر: میبایست ${r} میبود، ${o} دریافت شد`}case"invalid_value":return n.values.length===1?`ورودی نامعتبر: میبایست ${V(n.values[0])} میبود`:`گزینه نامعتبر: میبایست یکی از ${S(n.values,"|")} میبود`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`خیلی بزرگ: ${n.origin??"مقدار"} باید ${r}${n.maximum.toString()} ${s.unit??"عنصر"} باشد`:`خیلی بزرگ: ${n.origin??"مقدار"} باید ${r}${n.maximum.toString()} باشد`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`خیلی کوچک: ${n.origin} باید ${r}${n.minimum.toString()} ${s.unit} باشد`:`خیلی کوچک: ${n.origin} باید ${r}${n.minimum.toString()} باشد`}case"invalid_format":{let r=n;return r.format==="starts_with"?`رشته نامعتبر: باید با "${r.prefix}" شروع شود`:r.format==="ends_with"?`رشته نامعتبر: باید با "${r.suffix}" تمام شود`:r.format==="includes"?`رشته نامعتبر: باید شامل "${r.includes}" باشد`:r.format==="regex"?`رشته نامعتبر: باید با الگوی ${r.pattern} مطابقت داشته باشد`:`${A[r.format]??n.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${n.divisor} باشد`;case"unrecognized_keys":return`کلید${n.keys.length>1?"های":""} ناشناس: ${S(n.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${n.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${n.origin}`;default:return"ورودی نامعتبر"}}};function V4(){return{localeError:Z4()}}var j4=()=>{let t={string:{unit:"merkkiä",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"päivämäärän"}};function e(n){return t[n]??null}let A={regex:"säännöllinen lauseke",email:"sähköpostiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-päivämäärä",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${o}`:`Virheellinen tyyppi: odotettiin ${r}, oli ${o}`}case"invalid_value":return n.values.length===1?`Virheellinen syöte: täytyy olla ${V(n.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Liian suuri: ${s.subject} täytyy olla ${r}${n.maximum.toString()} ${s.unit}`.trim():`Liian suuri: arvon täytyy olla ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Liian pieni: ${s.subject} täytyy olla ${r}${n.minimum.toString()} ${s.unit}`.trim():`Liian pieni: arvon täytyy olla ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${r.prefix}"`:r.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${r.suffix}"`:r.format==="includes"?`Virheellinen syöte: täytyy sisältää "${r.includes}"`:r.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${r.pattern}`:`Virheellinen ${A[r.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${S(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen syöte"}}};function G4(){return{localeError:j4()}}var W4=()=>{let t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function e(n){return t[n]??null}let A={regex:"entrée",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN",number:"nombre",array:"tableau"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entrée invalide : instanceof ${n.expected} attendu, ${o} reçu`:`Entrée invalide : ${r} attendu, ${o} reçu`}case"invalid_value":return n.values.length===1?`Entrée invalide : ${V(n.values[0])} attendu`:`Option invalide : une valeur parmi ${S(n.values,"|")} attendue`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Trop grand : ${n.origin??"valeur"} doit ${s.verb} ${r}${n.maximum.toString()} ${s.unit??"élément(s)"}`:`Trop grand : ${n.origin??"valeur"} doit être ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Trop petit : ${n.origin} doit ${s.verb} ${r}${n.minimum.toString()} ${s.unit}`:`Trop petit : ${n.origin} doit être ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Chaîne invalide : doit commencer par "${r.prefix}"`:r.format==="ends_with"?`Chaîne invalide : doit se terminer par "${r.suffix}"`:r.format==="includes"?`Chaîne invalide : doit inclure "${r.includes}"`:r.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${r.pattern}`:`${A[r.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${S(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function J4(){return{localeError:W4()}}var X4=()=>{let t={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function e(n){return t[n]??null}let A={regex:"entrée",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"durée ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"chaîne encodée en base64",base64url:"chaîne encodée en base64url",json_string:"chaîne JSON",e164:"numéro E.164",jwt:"JWT",template_literal:"entrée"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Entrée invalide : attendu instanceof ${n.expected}, reçu ${o}`:`Entrée invalide : attendu ${r}, reçu ${o}`}case"invalid_value":return n.values.length===1?`Entrée invalide : attendu ${V(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"≤":"<",s=e(n.origin);return s?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${r}${n.maximum.toString()} ${s.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?"≥":">",s=e(n.origin);return s?`Trop petit : attendu que ${n.origin} ait ${r}${n.minimum.toString()} ${s.unit}`:`Trop petit : attendu que ${n.origin} soit ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Chaîne invalide : doit commencer par "${r.prefix}"`:r.format==="ends_with"?`Chaîne invalide : doit se terminer par "${r.suffix}"`:r.format==="includes"?`Chaîne invalide : doit inclure "${r.includes}"`:r.format==="regex"?`Chaîne invalide : doit correspondre au motif ${r.pattern}`:`${A[r.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${n.divisor}`;case"unrecognized_keys":return`Clé${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${S(n.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${n.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entrée invalide"}}};function Y4(){return{localeError:X4()}}var q4=()=>{let t={string:{label:"מחרוזת",gender:"f"},number:{label:"מספר",gender:"m"},boolean:{label:"ערך בוליאני",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"תאריך",gender:"m"},array:{label:"מערך",gender:"m"},object:{label:"אובייקט",gender:"m"},null:{label:"ערך ריק (null)",gender:"m"},undefined:{label:"ערך לא מוגדר (undefined)",gender:"m"},symbol:{label:"סימבול (Symbol)",gender:"m"},function:{label:"פונקציה",gender:"f"},map:{label:"מפה (Map)",gender:"f"},set:{label:"קבוצה (Set)",gender:"f"},file:{label:"קובץ",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"ערך לא ידוע",gender:"m"},value:{label:"ערך",gender:"m"}},e={string:{unit:"תווים",shortLabel:"קצר",longLabel:"ארוך"},file:{unit:"בייטים",shortLabel:"קטן",longLabel:"גדול"},array:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},set:{unit:"פריטים",shortLabel:"קטן",longLabel:"גדול"},number:{unit:"",shortLabel:"קטן",longLabel:"גדול"}},A=l=>l?t[l]:void 0,i=l=>{let u=A(l);return u?u.label:l??t.unknown.label},n=l=>`ה${i(l)}`,r=l=>{var u;return(((u=A(l))==null?void 0:u.gender)??"m")==="f"?"צריכה להיות":"צריך להיות"},s=l=>l?e[l]??null:null,o={regex:{label:"קלט",gender:"m"},email:{label:"כתובת אימייל",gender:"f"},url:{label:"כתובת רשת",gender:"f"},emoji:{label:"אימוג'י",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"תאריך וזמן ISO",gender:"m"},date:{label:"תאריך ISO",gender:"m"},time:{label:"זמן ISO",gender:"m"},duration:{label:"משך זמן ISO",gender:"m"},ipv4:{label:"כתובת IPv4",gender:"f"},ipv6:{label:"כתובת IPv6",gender:"f"},cidrv4:{label:"טווח IPv4",gender:"m"},cidrv6:{label:"טווח IPv6",gender:"m"},base64:{label:"מחרוזת בבסיס 64",gender:"f"},base64url:{label:"מחרוזת בבסיס 64 לכתובות רשת",gender:"f"},json_string:{label:"מחרוזת JSON",gender:"f"},e164:{label:"מספר E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"קלט",gender:"m"},includes:{label:"קלט",gender:"m"},lowercase:{label:"קלט",gender:"m"},starts_with:{label:"קלט",gender:"m"},uppercase:{label:"קלט",gender:"m"}},a={nan:"NaN"};return l=>{var u;switch(l.code){case"invalid_type":{let c=l.expected,d=a[c??""]??i(c),f=j(l.input),h=a[f]??((u=t[f])==null?void 0:u.label)??f;return/^[A-Z]/.test(l.expected)?`קלט לא תקין: צריך להיות instanceof ${l.expected}, התקבל ${h}`:`קלט לא תקין: צריך להיות ${d}, התקבל ${h}`}case"invalid_value":{if(l.values.length===1)return`ערך לא תקין: הערך חייב להיות ${V(l.values[0])}`;let c=l.values.map(f=>V(f));if(l.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${c[0]} או ${c[1]}`;let d=c[c.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${c.slice(0,-1).join(", ")} או ${d}`}case"too_big":{let c=s(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${(c==null?void 0:c.longLabel)??"ארוך"} מדי: ${d} צריכה להכיל ${l.maximum.toString()} ${(c==null?void 0:c.unit)??""} ${l.inclusive?"או פחות":"לכל היותר"}`.trim();if(l.origin==="number"){let g=l.inclusive?`קטן או שווה ל-${l.maximum}`:`קטן מ-${l.maximum}`;return`גדול מדי: ${d} צריך להיות ${g}`}if(l.origin==="array"||l.origin==="set"){let g=l.origin==="set"?"צריכה":"צריך",m=l.inclusive?`${l.maximum} ${(c==null?void 0:c.unit)??""} או פחות`:`פחות מ-${l.maximum} ${(c==null?void 0:c.unit)??""}`;return`גדול מדי: ${d} ${g} להכיל ${m}`.trim()}let f=l.inclusive?"<=":"<",h=r(l.origin??"value");return c!=null&&c.unit?`${c.longLabel} מדי: ${d} ${h} ${f}${l.maximum.toString()} ${c.unit}`:`${(c==null?void 0:c.longLabel)??"גדול"} מדי: ${d} ${h} ${f}${l.maximum.toString()}`}case"too_small":{let c=s(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${(c==null?void 0:c.shortLabel)??"קצר"} מדי: ${d} צריכה להכיל ${l.minimum.toString()} ${(c==null?void 0:c.unit)??""} ${l.inclusive?"או יותר":"לפחות"}`.trim();if(l.origin==="number"){let g=l.inclusive?`גדול או שווה ל-${l.minimum}`:`גדול מ-${l.minimum}`;return`קטן מדי: ${d} צריך להיות ${g}`}if(l.origin==="array"||l.origin==="set"){let g=l.origin==="set"?"צריכה":"צריך";if(l.minimum===1&&l.inclusive){let p=(l.origin==="set","לפחות פריט אחד");return`קטן מדי: ${d} ${g} להכיל ${p}`}let m=l.inclusive?`${l.minimum} ${(c==null?void 0:c.unit)??""} או יותר`:`יותר מ-${l.minimum} ${(c==null?void 0:c.unit)??""}`;return`קטן מדי: ${d} ${g} להכיל ${m}`.trim()}let f=l.inclusive?">=":">",h=r(l.origin??"value");return c!=null&&c.unit?`${c.shortLabel} מדי: ${d} ${h} ${f}${l.minimum.toString()} ${c.unit}`:`${(c==null?void 0:c.shortLabel)??"קטן"} מדי: ${d} ${h} ${f}${l.minimum.toString()}`}case"invalid_format":{let c=l;if(c.format==="starts_with")return`המחרוזת חייבת להתחיל ב "${c.prefix}"`;if(c.format==="ends_with")return`המחרוזת חייבת להסתיים ב "${c.suffix}"`;if(c.format==="includes")return`המחרוזת חייבת לכלול "${c.includes}"`;if(c.format==="regex")return`המחרוזת חייבת להתאים לתבנית ${c.pattern}`;let d=o[c.format],f=(d==null?void 0:d.label)??c.format,h=((d==null?void 0:d.gender)??"m")==="f"?"תקינה":"תקין";return`${f} לא ${h}`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${l.divisor}`;case"unrecognized_keys":return`מפתח${l.keys.length>1?"ות":""} לא מזוה${l.keys.length>1?"ים":"ה"}: ${S(l.keys,", ")}`;case"invalid_key":return"שדה לא תקין באובייקט";case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${n(l.origin??"array")}`;default:return"קלט לא תקין"}}};function eT(){return{localeError:q4()}}var tT=()=>{let t={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function e(n){return t[n]??null}let A={regex:"bemenet",email:"email cím",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO időbélyeg",date:"ISO dátum",time:"ISO idő",duration:"ISO időintervallum",ipv4:"IPv4 cím",ipv6:"IPv6 cím",cidrv4:"IPv4 tartomány",cidrv6:"IPv6 tartomány",base64:"base64-kódolt string",base64url:"base64url-kódolt string",json_string:"JSON string",e164:"E.164 szám",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"szám",array:"tömb"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Érvénytelen bemenet: a várt érték instanceof ${n.expected}, a kapott érték ${o}`:`Érvénytelen bemenet: a várt érték ${r}, a kapott érték ${o}`}case"invalid_value":return n.values.length===1?`Érvénytelen bemenet: a várt érték ${V(n.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Túl nagy: ${n.origin??"érték"} mérete túl nagy ${r}${n.maximum.toString()} ${s.unit??"elem"}`:`Túl nagy: a bemeneti érték ${n.origin??"érték"} túl nagy: ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Túl kicsi: a bemeneti érték ${n.origin} mérete túl kicsi ${r}${n.minimum.toString()} ${s.unit}`:`Túl kicsi: a bemeneti érték ${n.origin} túl kicsi ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Érvénytelen string: "${r.prefix}" értékkel kell kezdődnie`:r.format==="ends_with"?`Érvénytelen string: "${r.suffix}" értékkel kell végződnie`:r.format==="includes"?`Érvénytelen string: "${r.includes}" értéket kell tartalmaznia`:r.format==="regex"?`Érvénytelen string: ${r.pattern} mintának kell megfelelnie`:`Érvénytelen ${A[r.format]??n.format}`}case"not_multiple_of":return`Érvénytelen szám: ${n.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${n.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${n.origin}`;default:return"Érvénytelen bemenet"}}};function AT(){return{localeError:tT()}}function Pg(t,e,A){return Math.abs(t)===1?e:A}function Jn(t){if(!t)return"";let e=["ա","ե","ը","ի","ո","ու","օ"],A=t[t.length-1];return t+(e.includes(A)?"ն":"ը")}var nT=()=>{let t={string:{unit:{one:"նշան",many:"նշաններ"},verb:"ունենալ"},file:{unit:{one:"բայթ",many:"բայթեր"},verb:"ունենալ"},array:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"},set:{unit:{one:"տարր",many:"տարրեր"},verb:"ունենալ"}};function e(n){return t[n]??null}let A={regex:"մուտք",email:"էլ. հասցե",url:"URL",emoji:"էմոջի",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO ամսաթիվ և ժամ",date:"ISO ամսաթիվ",time:"ISO ժամ",duration:"ISO տևողություն",ipv4:"IPv4 հասցե",ipv6:"IPv6 հասցե",cidrv4:"IPv4 միջակայք",cidrv6:"IPv6 միջակայք",base64:"base64 ձևաչափով տող",base64url:"base64url ձևաչափով տող",json_string:"JSON տող",e164:"E.164 համար",jwt:"JWT",template_literal:"մուտք"},i={nan:"NaN",number:"թիվ",array:"զանգված"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${n.expected}, ստացվել է ${o}`:`Սխալ մուտքագրում․ սպասվում էր ${r}, ստացվել է ${o}`}case"invalid_value":return n.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${V(n.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);if(s){let o=Number(n.maximum),a=Pg(o,s.unit.one,s.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Jn(n.origin??"արժեք")} կունենա ${r}${n.maximum.toString()} ${a}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${Jn(n.origin??"արժեք")} լինի ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);if(s){let o=Number(n.minimum),a=Pg(o,s.unit.one,s.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Jn(n.origin)} կունենա ${r}${n.minimum.toString()} ${a}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${Jn(n.origin)} լինի ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Սխալ տող․ պետք է սկսվի "${r.prefix}"-ով`:r.format==="ends_with"?`Սխալ տող․ պետք է ավարտվի "${r.suffix}"-ով`:r.format==="includes"?`Սխալ տող․ պետք է պարունակի "${r.includes}"`:r.format==="regex"?`Սխալ տող․ պետք է համապատասխանի ${r.pattern} ձևաչափին`:`Սխալ ${A[r.format]??n.format}`}case"not_multiple_of":return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${n.divisor}-ի`;case"unrecognized_keys":return`Չճանաչված բանալի${n.keys.length>1?"ներ":""}. ${S(n.keys,", ")}`;case"invalid_key":return`Սխալ բանալի ${Jn(n.origin)}-ում`;case"invalid_union":return"Սխալ մուտքագրում";case"invalid_element":return`Սխալ արժեք ${Jn(n.origin)}-ում`;default:return"Սխալ մուտքագրում"}}};function iT(){return{localeError:nT()}}var rT=()=>{let t={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function e(n){return t[n]??null}let A={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${o}`:`Input tidak valid: diharapkan ${r}, diterima ${o}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${V(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${r}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: diharapkan ${n.origin} memiliki ${r}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`String tidak valid: harus dimulai dengan "${r.prefix}"`:r.format==="ends_with"?`String tidak valid: harus berakhir dengan "${r.suffix}"`:r.format==="includes"?`String tidak valid: harus menyertakan "${r.includes}"`:r.format==="regex"?`String tidak valid: harus sesuai pola ${r.pattern}`:`${A[r.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function sT(){return{localeError:rT()}}var oT=()=>{let t={string:{unit:"stafi",verb:"að hafa"},file:{unit:"bæti",verb:"að hafa"},array:{unit:"hluti",verb:"að hafa"},set:{unit:"hluti",verb:"að hafa"}};function e(n){return t[n]??null}let A={regex:"gildi",email:"netfang",url:"vefslóð",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og tími",date:"ISO dagsetning",time:"ISO tími",duration:"ISO tímalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 tölugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"númer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Rangt gildi: Þú slóst inn ${o} þar sem á að vera instanceof ${n.expected}`:`Rangt gildi: Þú slóst inn ${o} þar sem á að vera ${r}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert ráð fyrir ${V(n.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} hafi ${r}${n.maximum.toString()} ${s.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${n.origin??"gildi"} sé ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Of lítið: gert er ráð fyrir að ${n.origin} hafi ${r}${n.minimum.toString()} ${s.unit}`:`Of lítið: gert er ráð fyrir að ${n.origin} sé ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Ógildur strengur: verður að byrja á "${r.prefix}"`:r.format==="ends_with"?`Ógildur strengur: verður að enda á "${r.suffix}"`:r.format==="includes"?`Ógildur strengur: verður að innihalda "${r.includes}"`:r.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${r.pattern}`:`Rangt ${A[r.format]??n.format}`}case"not_multiple_of":return`Röng tala: verður að vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`Óþekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${S(n.keys,", ")}`;case"invalid_key":return`Rangur lykill í ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi í ${n.origin}`;default:return"Rangt gildi"}}};function aT(){return{localeError:oT()}}var lT=()=>{let t={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function e(n){return t[n]??null}let A={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${o}`:`Input non valido: atteso ${r}, ricevuto ${o}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${V(n.values[0])}`:`Opzione non valida: atteso uno tra ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Troppo grande: ${n.origin??"valore"} deve avere ${r}${n.maximum.toString()} ${s.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Troppo piccolo: ${n.origin} deve avere ${r}${n.minimum.toString()} ${s.unit}`:`Troppo piccolo: ${n.origin} deve essere ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Stringa non valida: deve iniziare con "${r.prefix}"`:r.format==="ends_with"?`Stringa non valida: deve terminare con "${r.suffix}"`:r.format==="includes"?`Stringa non valida: deve includere "${r.includes}"`:r.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${r.pattern}`:`Invalid ${A[r.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${S(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function uT(){return{localeError:lT()}}var cT=()=>{let t={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function e(n){return t[n]??null}let A={regex:"入力値",email:"メールアドレス",url:"URL",emoji:"絵文字",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日時",date:"ISO日付",time:"ISO時刻",duration:"ISO期間",ipv4:"IPv4アドレス",ipv6:"IPv6アドレス",cidrv4:"IPv4範囲",cidrv6:"IPv6範囲",base64:"base64エンコード文字列",base64url:"base64urlエンコード文字列",json_string:"JSON文字列",e164:"E.164番号",jwt:"JWT",template_literal:"入力値"},i={nan:"NaN",number:"数値",array:"配列"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`無効な入力: instanceof ${n.expected}が期待されましたが、${o}が入力されました`:`無効な入力: ${r}が期待されましたが、${o}が入力されました`}case"invalid_value":return n.values.length===1?`無効な入力: ${V(n.values[0])}が期待されました`:`無効な選択: ${S(n.values,"、")}のいずれかである必要があります`;case"too_big":{let r=n.inclusive?"以下である":"より小さい",s=e(n.origin);return s?`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${s.unit??"要素"}${r}必要があります`:`大きすぎる値: ${n.origin??"値"}は${n.maximum.toString()}${r}必要があります`}case"too_small":{let r=n.inclusive?"以上である":"より大きい",s=e(n.origin);return s?`小さすぎる値: ${n.origin}は${n.minimum.toString()}${s.unit}${r}必要があります`:`小さすぎる値: ${n.origin}は${n.minimum.toString()}${r}必要があります`}case"invalid_format":{let r=n;return r.format==="starts_with"?`無効な文字列: "${r.prefix}"で始まる必要があります`:r.format==="ends_with"?`無効な文字列: "${r.suffix}"で終わる必要があります`:r.format==="includes"?`無効な文字列: "${r.includes}"を含む必要があります`:r.format==="regex"?`無効な文字列: パターン${r.pattern}に一致する必要があります`:`無効な${A[r.format]??n.format}`}case"not_multiple_of":return`無効な数値: ${n.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${n.keys.length>1?"群":""}: ${S(n.keys,"、")}`;case"invalid_key":return`${n.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${n.origin}内の無効な値`;default:return"無効な入力"}}};function dT(){return{localeError:cT()}}var fT=()=>{let t={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function e(n){return t[n]??null}let A={regex:"შეყვანა",email:"ელ-ფოსტის მისამართი",url:"URL",emoji:"ემოჯი",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"თარიღი-დრო",date:"თარიღი",time:"დრო",duration:"ხანგრძლივობა",ipv4:"IPv4 მისამართი",ipv6:"IPv6 მისამართი",cidrv4:"IPv4 დიაპაზონი",cidrv6:"IPv6 დიაპაზონი",base64:"base64-კოდირებული სტრინგი",base64url:"base64url-კოდირებული სტრინგი",json_string:"JSON სტრინგი",e164:"E.164 ნომერი",jwt:"JWT",template_literal:"შეყვანა"},i={nan:"NaN",number:"რიცხვი",string:"სტრინგი",boolean:"ბულეანი",function:"ფუნქცია",array:"მასივი"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${n.expected}, მიღებული ${o}`:`არასწორი შეყვანა: მოსალოდნელი ${r}, მიღებული ${o}`}case"invalid_value":return n.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${V(n.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${S(n.values,"|")}-დან`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} ${s.verb} ${r}${n.maximum.toString()} ${s.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${n.origin??"მნიშვნელობა"} იყოს ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`ზედმეტად პატარა: მოსალოდნელი ${n.origin} ${s.verb} ${r}${n.minimum.toString()} ${s.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${n.origin} იყოს ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${r.prefix}"-ით`:r.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${r.suffix}"-ით`:r.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${r.includes}"-ს`:r.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${r.pattern}`:`არასწორი ${A[r.format]??n.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${n.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${n.keys.length>1?"ები":"ი"}: ${S(n.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${n.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${n.origin}-ში`;default:return"არასწორი შეყვანა"}}};function hT(){return{localeError:fT()}}var gT=()=>{let t={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function e(n){return t[n]??null}let A={regex:"ទិន្នន័យបញ្ចូល",email:"អាសយដ្ឋានអ៊ីមែល",url:"URL",emoji:"សញ្ញាអារម្មណ៍",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"កាលបរិច្ឆេទ និងម៉ោង ISO",date:"កាលបរិច្ឆេទ ISO",time:"ម៉ោង ISO",duration:"រយៈពេល ISO",ipv4:"អាសយដ្ឋាន IPv4",ipv6:"អាសយដ្ឋាន IPv6",cidrv4:"ដែនអាសយដ្ឋាន IPv4",cidrv6:"ដែនអាសយដ្ឋាន IPv6",base64:"ខ្សែអក្សរអ៊ិកូដ base64",base64url:"ខ្សែអក្សរអ៊ិកូដ base64url",json_string:"ខ្សែអក្សរ JSON",e164:"លេខ E.164",jwt:"JWT",template_literal:"ទិន្នន័យបញ្ចូល"},i={nan:"NaN",number:"លេខ",array:"អារេ (Array)",null:"គ្មានតម្លៃ (null)"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${n.expected} ប៉ុន្តែទទួលបាន ${o}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${r} ប៉ុន្តែទទួលបាន ${o}`}case"invalid_value":return n.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${V(n.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${r} ${n.maximum.toString()} ${s.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${n.origin??"តម្លៃ"} ${r} ${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`តូចពេក៖ ត្រូវការ ${n.origin} ${r} ${n.minimum.toString()} ${s.unit}`:`តូចពេក៖ ត្រូវការ ${n.origin} ${r} ${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${r.prefix}"`:r.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${r.suffix}"`:r.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${r.includes}"`:r.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${r.pattern}`:`មិនត្រឹមត្រូវ៖ ${A[r.format]??n.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${n.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${S(n.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${n.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Bb(){return{localeError:gT()}}function mT(){return Bb()}var pT=()=>{let t={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function e(n){return t[n]??null}let A={regex:"입력",email:"이메일 주소",url:"URL",emoji:"이모지",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 날짜시간",date:"ISO 날짜",time:"ISO 시간",duration:"ISO 기간",ipv4:"IPv4 주소",ipv6:"IPv6 주소",cidrv4:"IPv4 범위",cidrv6:"IPv6 범위",base64:"base64 인코딩 문자열",base64url:"base64url 인코딩 문자열",json_string:"JSON 문자열",e164:"E.164 번호",jwt:"JWT",template_literal:"입력"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`잘못된 입력: 예상 타입은 instanceof ${n.expected}, 받은 타입은 ${o}입니다`:`잘못된 입력: 예상 타입은 ${r}, 받은 타입은 ${o}입니다`}case"invalid_value":return n.values.length===1?`잘못된 입력: 값은 ${V(n.values[0])} 이어야 합니다`:`잘못된 옵션: ${S(n.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{let r=n.inclusive?"이하":"미만",s=r==="미만"?"이어야 합니다":"여야 합니다",o=e(n.origin),a=(o==null?void 0:o.unit)??"요소";return o?`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()}${a} ${r}${s}`:`${n.origin??"값"}이 너무 큽니다: ${n.maximum.toString()} ${r}${s}`}case"too_small":{let r=n.inclusive?"이상":"초과",s=r==="이상"?"이어야 합니다":"여야 합니다",o=e(n.origin),a=(o==null?void 0:o.unit)??"요소";return o?`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()}${a} ${r}${s}`:`${n.origin??"값"}이 너무 작습니다: ${n.minimum.toString()} ${r}${s}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`잘못된 문자열: "${r.prefix}"(으)로 시작해야 합니다`:r.format==="ends_with"?`잘못된 문자열: "${r.suffix}"(으)로 끝나야 합니다`:r.format==="includes"?`잘못된 문자열: "${r.includes}"을(를) 포함해야 합니다`:r.format==="regex"?`잘못된 문자열: 정규식 ${r.pattern} 패턴과 일치해야 합니다`:`잘못된 ${A[r.format]??n.format}`}case"not_multiple_of":return`잘못된 숫자: ${n.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${S(n.keys,", ")}`;case"invalid_key":return`잘못된 키: ${n.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${n.origin}`;default:return"잘못된 입력"}}};function vT(){return{localeError:pT()}}var qi=t=>t.charAt(0).toUpperCase()+t.slice(1);function Rg(t){let e=Math.abs(t),A=e%10,i=e%100;return i>=11&&i<=19||A===0?"many":A===1?"one":"few"}var BT=()=>{let t={string:{unit:{one:"simbolis",few:"simboliai",many:"simbolių"},verb:{smaller:{inclusive:"turi būti ne ilgesnė kaip",notInclusive:"turi būti trumpesnė kaip"},bigger:{inclusive:"turi būti ne trumpesnė kaip",notInclusive:"turi būti ilgesnė kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"baitų"},verb:{smaller:{inclusive:"turi būti ne didesnis kaip",notInclusive:"turi būti mažesnis kaip"},bigger:{inclusive:"turi būti ne mažesnis kaip",notInclusive:"turi būti didesnis kaip"}}},array:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}},set:{unit:{one:"elementą",few:"elementus",many:"elementų"},verb:{smaller:{inclusive:"turi turėti ne daugiau kaip",notInclusive:"turi turėti mažiau kaip"},bigger:{inclusive:"turi turėti ne mažiau kaip",notInclusive:"turi turėti daugiau kaip"}}}};function e(n,r,s,o){let a=t[n]??null;return a===null?a:{unit:a.unit[r],verb:a.verb[o][s?"inclusive":"notInclusive"]}}let A={regex:"įvestis",email:"el. pašto adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukmė",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 užkoduota eilutė",base64url:"base64url užkoduota eilutė",json_string:"JSON eilutė",e164:"E.164 numeris",jwt:"JWT",template_literal:"įvestis"},i={nan:"NaN",number:"skaičius",bigint:"sveikasis skaičius",string:"eilutė",boolean:"loginė reikšmė",undefined:"neapibrėžta reikšmė",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulinė reikšmė"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${o}, o tikėtasi - instanceof ${n.expected}`:`Gautas tipas ${o}, o tikėtasi - ${r}`}case"invalid_value":return n.values.length===1?`Privalo būti ${V(n.values[0])}`:`Privalo būti vienas iš ${S(n.values,"|")} pasirinkimų`;case"too_big":{let r=i[n.origin]??n.origin,s=e(n.origin,Rg(Number(n.maximum)),n.inclusive??!1,"smaller");if(s!=null&&s.verb)return`${qi(r??n.origin??"reikšmė")} ${s.verb} ${n.maximum.toString()} ${s.unit??"elementų"}`;let o=n.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${qi(r??n.origin??"reikšmė")} turi būti ${o} ${n.maximum.toString()} ${s==null?void 0:s.unit}`}case"too_small":{let r=i[n.origin]??n.origin,s=e(n.origin,Rg(Number(n.minimum)),n.inclusive??!1,"bigger");if(s!=null&&s.verb)return`${qi(r??n.origin??"reikšmė")} ${s.verb} ${n.minimum.toString()} ${s.unit??"elementų"}`;let o=n.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${qi(r??n.origin??"reikšmė")} turi būti ${o} ${n.minimum.toString()} ${s==null?void 0:s.unit}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Eilutė privalo prasidėti "${r.prefix}"`:r.format==="ends_with"?`Eilutė privalo pasibaigti "${r.suffix}"`:r.format==="includes"?`Eilutė privalo įtraukti "${r.includes}"`:r.format==="regex"?`Eilutė privalo atitikti ${r.pattern}`:`Neteisingas ${A[r.format]??n.format}`}case"not_multiple_of":return`Skaičius privalo būti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpažint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${S(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{let r=i[n.origin]??n.origin;return`${qi(r??n.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function wT(){return{localeError:BT()}}var yT=()=>{let t={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function e(n){return t[n]??null}let A={regex:"внес",email:"адреса на е-пошта",url:"URL",emoji:"емоџи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO датум и време",date:"ISO датум",time:"ISO време",duration:"ISO времетраење",ipv4:"IPv4 адреса",ipv6:"IPv6 адреса",cidrv4:"IPv4 опсег",cidrv6:"IPv6 опсег",base64:"base64-енкодирана низа",base64url:"base64url-енкодирана низа",json_string:"JSON низа",e164:"E.164 број",jwt:"JWT",template_literal:"внес"},i={nan:"NaN",number:"број",array:"низа"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Грешен внес: се очекува instanceof ${n.expected}, примено ${o}`:`Грешен внес: се очекува ${r}, примено ${o}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${V(n.values[0])}`:`Грешана опција: се очекува една ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Премногу голем: се очекува ${n.origin??"вредноста"} да има ${r}${n.maximum.toString()} ${s.unit??"елементи"}`:`Премногу голем: се очекува ${n.origin??"вредноста"} да биде ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Премногу мал: се очекува ${n.origin} да има ${r}${n.minimum.toString()} ${s.unit}`:`Премногу мал: се очекува ${n.origin} да биде ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Неважечка низа: мора да започнува со "${r.prefix}"`:r.format==="ends_with"?`Неважечка низа: мора да завршува со "${r.suffix}"`:r.format==="includes"?`Неважечка низа: мора да вклучува "${r.includes}"`:r.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${r.pattern}`:`Invalid ${A[r.format]??n.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${S(n.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${n.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${n.origin}`;default:return"Грешен внес"}}};function bT(){return{localeError:yT()}}var _T=()=>{let t={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function e(n){return t[n]??null}let A={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${o}`:`Input tidak sah: dijangka ${r}, diterima ${o}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${V(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Terlalu besar: dijangka ${n.origin??"nilai"} ${s.verb} ${r}${n.maximum.toString()} ${s.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Terlalu kecil: dijangka ${n.origin} ${s.verb} ${r}${n.minimum.toString()} ${s.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`String tidak sah: mesti bermula dengan "${r.prefix}"`:r.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${r.suffix}"`:r.format==="includes"?`String tidak sah: mesti mengandungi "${r.includes}"`:r.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${r.pattern}`:`${A[r.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${S(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function CT(){return{localeError:_T()}}var UT=()=>{let t={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function e(n){return t[n]??null}let A={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${o}`:`Ongeldige invoer: verwacht ${r}, ontving ${o}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${V(n.values[0])}`:`Ongeldige optie: verwacht één van ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin),o=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return s?`Te ${o}: verwacht dat ${n.origin??"waarde"} ${r}${n.maximum.toString()} ${s.unit??"elementen"} ${s.verb}`:`Te ${o}: verwacht dat ${n.origin??"waarde"} ${r}${n.maximum.toString()} is`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin),o=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return s?`Te ${o}: verwacht dat ${n.origin} ${r}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Te ${o}: verwacht dat ${n.origin} ${r}${n.minimum.toString()} is`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Ongeldige tekst: moet met "${r.prefix}" beginnen`:r.format==="ends_with"?`Ongeldige tekst: moet op "${r.suffix}" eindigen`:r.format==="includes"?`Ongeldige tekst: moet "${r.includes}" bevatten`:r.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${r.pattern}`:`Ongeldig: ${A[r.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function QT(){return{localeError:UT()}}var xT=()=>{let t={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function e(n){return t[n]??null}let A={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-område",ipv6:"IPv6-område",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${o}`:`Ugyldig input: forventet ${r}, fikk ${o}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${V(n.values[0])}`:`Ugyldig valg: forventet en av ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`For stor(t): forventet ${n.origin??"value"} til å ha ${r}${n.maximum.toString()} ${s.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til å ha ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`For lite(n): forventet ${n.origin} til å ha ${r}${n.minimum.toString()} ${s.unit}`:`For lite(n): forventet ${n.origin} til å ha ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Ugyldig streng: må starte med "${r.prefix}"`:r.format==="ends_with"?`Ugyldig streng: må ende med "${r.suffix}"`:r.format==="includes"?`Ugyldig streng: må inneholde "${r.includes}"`:r.format==="regex"?`Ugyldig streng: må matche mønsteret ${r.pattern}`:`Ugyldig ${A[r.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function FT(){return{localeError:xT()}}var IT=()=>{let t={string:{unit:"harf",verb:"olmalıdır"},file:{unit:"bayt",verb:"olmalıdır"},array:{unit:"unsur",verb:"olmalıdır"},set:{unit:"unsur",verb:"olmalıdır"}};function e(n){return t[n]??null}let A={regex:"giren",email:"epostagâh",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO hengâmı",date:"ISO tarihi",time:"ISO zamanı",duration:"ISO müddeti",ipv4:"IPv4 nişânı",ipv6:"IPv6 nişânı",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-şifreli metin",base64url:"base64url-şifreli metin",json_string:"JSON metin",e164:"E.164 sayısı",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Fâsit giren: umulan instanceof ${n.expected}, alınan ${o}`:`Fâsit giren: umulan ${r}, alınan ${o}`}case"invalid_value":return n.values.length===1?`Fâsit giren: umulan ${V(n.values[0])}`:`Fâsit tercih: mûteberler ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Fazla büyük: ${n.origin??"value"}, ${r}${n.maximum.toString()} ${s.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${n.origin??"value"}, ${r}${n.maximum.toString()} olmalıydı.`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Fazla küçük: ${n.origin}, ${r}${n.minimum.toString()} ${s.unit} sahip olmalıydı.`:`Fazla küçük: ${n.origin}, ${r}${n.minimum.toString()} olmalıydı.`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Fâsit metin: "${r.prefix}" ile başlamalı.`:r.format==="ends_with"?`Fâsit metin: "${r.suffix}" ile bitmeli.`:r.format==="includes"?`Fâsit metin: "${r.includes}" ihtivâ etmeli.`:r.format==="regex"?`Fâsit metin: ${r.pattern} nakşına uymalı.`:`Fâsit ${A[r.format]??n.format}`}case"not_multiple_of":return`Fâsit sayı: ${n.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${n.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function ST(){return{localeError:IT()}}var kT=()=>{let t={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function e(n){return t[n]??null}let A={regex:"ورودي",email:"بریښنالیک",url:"یو آر ال",emoji:"ایموجي",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"نیټه او وخت",date:"نېټه",time:"وخت",duration:"موده",ipv4:"د IPv4 پته",ipv6:"د IPv6 پته",cidrv4:"د IPv4 ساحه",cidrv6:"د IPv6 ساحه",base64:"base64-encoded متن",base64url:"base64url-encoded متن",json_string:"JSON متن",e164:"د E.164 شمېره",jwt:"JWT",template_literal:"ورودي"},i={nan:"NaN",number:"عدد",array:"ارې"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`ناسم ورودي: باید instanceof ${n.expected} وای, مګر ${o} ترلاسه شو`:`ناسم ورودي: باید ${r} وای, مګر ${o} ترلاسه شو`}case"invalid_value":return n.values.length===1?`ناسم ورودي: باید ${V(n.values[0])} وای`:`ناسم انتخاب: باید یو له ${S(n.values,"|")} څخه وای`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`ډیر لوی: ${n.origin??"ارزښت"} باید ${r}${n.maximum.toString()} ${s.unit??"عنصرونه"} ولري`:`ډیر لوی: ${n.origin??"ارزښت"} باید ${r}${n.maximum.toString()} وي`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`ډیر کوچنی: ${n.origin} باید ${r}${n.minimum.toString()} ${s.unit} ولري`:`ډیر کوچنی: ${n.origin} باید ${r}${n.minimum.toString()} وي`}case"invalid_format":{let r=n;return r.format==="starts_with"?`ناسم متن: باید د "${r.prefix}" سره پیل شي`:r.format==="ends_with"?`ناسم متن: باید د "${r.suffix}" سره پای ته ورسيږي`:r.format==="includes"?`ناسم متن: باید "${r.includes}" ولري`:r.format==="regex"?`ناسم متن: باید د ${r.pattern} سره مطابقت ولري`:`${A[r.format]??n.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${n.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${n.keys.length>1?"کلیډونه":"کلیډ"}: ${S(n.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${n.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${n.origin} کې`;default:return"ناسمه ورودي"}}};function ET(){return{localeError:kT()}}var $T=()=>{let t={string:{unit:"znaków",verb:"mieć"},file:{unit:"bajtów",verb:"mieć"},array:{unit:"elementów",verb:"mieć"},set:{unit:"elementów",verb:"mieć"}};function e(n){return t[n]??null}let A={regex:"wyrażenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ciąg znaków zakodowany w formacie base64",base64url:"ciąg znaków zakodowany w formacie base64url",json_string:"ciąg znaków w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wejście"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${n.expected}, otrzymano ${o}`:`Nieprawidłowe dane wejściowe: oczekiwano ${r}, otrzymano ${o}`}case"invalid_value":return n.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${V(n.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Za duża wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${r}${n.maximum.toString()} ${s.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Za mała wartość: oczekiwano, że ${n.origin??"wartość"} będzie mieć ${r}${n.minimum.toString()} ${s.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${n.origin??"wartość"} będzie wynosić ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${r.prefix}"`:r.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${r.suffix}"`:r.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${r.includes}"`:r.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${r.pattern}`:`Nieprawidłow(y/a/e) ${A[r.format]??n.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${n.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${n.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function TT(){return{localeError:$T()}}var OT=()=>{let t={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function e(n){return t[n]??null}let A={regex:"padrão",email:"endereço de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"duração ISO",ipv4:"endereço IPv4",ipv6:"endereço IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"número E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"número",null:"nulo"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Tipo inválido: esperado instanceof ${n.expected}, recebido ${o}`:`Tipo inválido: esperado ${r}, recebido ${o}`}case"invalid_value":return n.values.length===1?`Entrada inválida: esperado ${V(n.values[0])}`:`Opção inválida: esperada uma das ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Muito grande: esperado que ${n.origin??"valor"} tivesse ${r}${n.maximum.toString()} ${s.unit??"elementos"}`:`Muito grande: esperado que ${n.origin??"valor"} fosse ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Muito pequeno: esperado que ${n.origin} tivesse ${r}${n.minimum.toString()} ${s.unit}`:`Muito pequeno: esperado que ${n.origin} fosse ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Texto inválido: deve começar com "${r.prefix}"`:r.format==="ends_with"?`Texto inválido: deve terminar com "${r.suffix}"`:r.format==="includes"?`Texto inválido: deve incluir "${r.includes}"`:r.format==="regex"?`Texto inválido: deve corresponder ao padrão ${r.pattern}`:`${A[r.format]??n.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${n.divisor}`;case"unrecognized_keys":return`Chave${n.keys.length>1?"s":""} desconhecida${n.keys.length>1?"s":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Chave inválida em ${n.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${n.origin}`;default:return"Campo inválido"}}};function HT(){return{localeError:OT()}}function Kg(t,e,A,i){let n=Math.abs(t),r=n%10,s=n%100;return s>=11&&s<=19?i:r===1?e:r>=2&&r<=4?A:i}var DT=()=>{let t={string:{unit:{one:"символ",few:"символа",many:"символов"},verb:"иметь"},file:{unit:{one:"байт",few:"байта",many:"байт"},verb:"иметь"},array:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"},set:{unit:{one:"элемент",few:"элемента",many:"элементов"},verb:"иметь"}};function e(n){return t[n]??null}let A={regex:"ввод",email:"email адрес",url:"URL",emoji:"эмодзи",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO дата и время",date:"ISO дата",time:"ISO время",duration:"ISO длительность",ipv4:"IPv4 адрес",ipv6:"IPv6 адрес",cidrv4:"IPv4 диапазон",cidrv6:"IPv6 диапазон",base64:"строка в формате base64",base64url:"строка в формате base64url",json_string:"JSON строка",e164:"номер E.164",jwt:"JWT",template_literal:"ввод"},i={nan:"NaN",number:"число",array:"массив"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Неверный ввод: ожидалось instanceof ${n.expected}, получено ${o}`:`Неверный ввод: ожидалось ${r}, получено ${o}`}case"invalid_value":return n.values.length===1?`Неверный ввод: ожидалось ${V(n.values[0])}`:`Неверный вариант: ожидалось одно из ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);if(s){let o=Number(n.maximum),a=Kg(o,s.unit.one,s.unit.few,s.unit.many);return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет иметь ${r}${n.maximum.toString()} ${a}`}return`Слишком большое значение: ожидалось, что ${n.origin??"значение"} будет ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);if(s){let o=Number(n.minimum),a=Kg(o,s.unit.one,s.unit.few,s.unit.many);return`Слишком маленькое значение: ожидалось, что ${n.origin} будет иметь ${r}${n.minimum.toString()} ${a}`}return`Слишком маленькое значение: ожидалось, что ${n.origin} будет ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Неверная строка: должна начинаться с "${r.prefix}"`:r.format==="ends_with"?`Неверная строка: должна заканчиваться на "${r.suffix}"`:r.format==="includes"?`Неверная строка: должна содержать "${r.includes}"`:r.format==="regex"?`Неверная строка: должна соответствовать шаблону ${r.pattern}`:`Неверный ${A[r.format]??n.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${n.divisor}`;case"unrecognized_keys":return`Нераспознанн${n.keys.length>1?"ые":"ый"} ключ${n.keys.length>1?"и":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${n.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${n.origin}`;default:return"Неверные входные данные"}}};function LT(){return{localeError:DT()}}var MT=()=>{let t={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function e(n){return t[n]??null}let A={regex:"vnos",email:"e-poštni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in čas",date:"ISO datum",time:"ISO čas",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 številka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"število",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pričakovano instanceof ${n.expected}, prejeto ${o}`:`Neveljaven vnos: pričakovano ${r}, prejeto ${o}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pričakovano ${V(n.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} imelo ${r}${n.maximum.toString()} ${s.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${n.origin??"vrednost"} ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Premajhno: pričakovano, da bo ${n.origin} imelo ${r}${n.minimum.toString()} ${s.unit}`:`Premajhno: pričakovano, da bo ${n.origin} ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Neveljaven niz: mora se začeti z "${r.prefix}"`:r.format==="ends_with"?`Neveljaven niz: mora se končati z "${r.suffix}"`:r.format==="includes"?`Neveljaven niz: mora vsebovati "${r.includes}"`:r.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${r.pattern}`:`Neveljaven ${A[r.format]??n.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i ključi":" ključ"}: ${S(n.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function NT(){return{localeError:MT()}}var zT=()=>{let t={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att innehålla"},set:{unit:"objekt",verb:"att innehålla"}};function e(n){return t[n]??null}let A={regex:"reguljärt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad sträng",base64url:"base64url-kodad sträng",json_string:"JSON-sträng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: förväntat instanceof ${n.expected}, fick ${o}`:`Ogiltig inmatning: förväntat ${r}, fick ${o}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: förväntat ${V(n.values[0])}`:`Ogiltigt val: förväntade en av ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`För stor(t): förväntade ${n.origin??"värdet"} att ha ${r}${n.maximum.toString()} ${s.unit??"element"}`:`För stor(t): förväntat ${n.origin??"värdet"} att ha ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`För lite(t): förväntade ${n.origin??"värdet"} att ha ${r}${n.minimum.toString()} ${s.unit}`:`För lite(t): förväntade ${n.origin??"värdet"} att ha ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Ogiltig sträng: måste börja med "${r.prefix}"`:r.format==="ends_with"?`Ogiltig sträng: måste sluta med "${r.suffix}"`:r.format==="includes"?`Ogiltig sträng: måste innehålla "${r.includes}"`:r.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${r.pattern}"`:`Ogiltig(t) ${A[r.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${S(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${n.origin??"värdet"}`;default:return"Ogiltig input"}}};function PT(){return{localeError:zT()}}var RT=()=>{let t={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function e(n){return t[n]??null}let A={regex:"உள்ளீடு",email:"மின்னஞ்சல் முகவரி",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO தேதி நேரம்",date:"ISO தேதி",time:"ISO நேரம்",duration:"ISO கால அளவு",ipv4:"IPv4 முகவரி",ipv6:"IPv6 முகவரி",cidrv4:"IPv4 வரம்பு",cidrv6:"IPv6 வரம்பு",base64:"base64-encoded சரம்",base64url:"base64url-encoded சரம்",json_string:"JSON சரம்",e164:"E.164 எண்",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"எண்",array:"அணி",null:"வெறுமை"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${n.expected}, பெறப்பட்டது ${o}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${r}, பெறப்பட்டது ${o}`}case"invalid_value":return n.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${V(n.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${S(n.values,"|")} இல் ஒன்று`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${r}${n.maximum.toString()} ${s.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${n.origin??"மதிப்பு"} ${r}${n.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${r}${n.minimum.toString()} ${s.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${n.origin} ${r}${n.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{let r=n;return r.format==="starts_with"?`தவறான சரம்: "${r.prefix}" இல் தொடங்க வேண்டும்`:r.format==="ends_with"?`தவறான சரம்: "${r.suffix}" இல் முடிவடைய வேண்டும்`:r.format==="includes"?`தவறான சரம்: "${r.includes}" ஐ உள்ளடக்க வேண்டும்`:r.format==="regex"?`தவறான சரம்: ${r.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${A[r.format]??n.format}`}case"not_multiple_of":return`தவறான எண்: ${n.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${n.keys.length>1?"கள்":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${n.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function KT(){return{localeError:RT()}}var ZT=()=>{let t={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function e(n){return t[n]??null}let A={regex:"ข้อมูลที่ป้อน",email:"ที่อยู่อีเมล",url:"URL",emoji:"อิโมจิ",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"วันที่เวลาแบบ ISO",date:"วันที่แบบ ISO",time:"เวลาแบบ ISO",duration:"ช่วงเวลาแบบ ISO",ipv4:"ที่อยู่ IPv4",ipv6:"ที่อยู่ IPv6",cidrv4:"ช่วง IP แบบ IPv4",cidrv6:"ช่วง IP แบบ IPv6",base64:"ข้อความแบบ Base64",base64url:"ข้อความแบบ Base64 สำหรับ URL",json_string:"ข้อความแบบ JSON",e164:"เบอร์โทรศัพท์ระหว่างประเทศ (E.164)",jwt:"โทเคน JWT",template_literal:"ข้อมูลที่ป้อน"},i={nan:"NaN",number:"ตัวเลข",array:"อาร์เรย์ (Array)",null:"ไม่มีค่า (null)"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${n.expected} แต่ได้รับ ${o}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${r} แต่ได้รับ ${o}`}case"invalid_value":return n.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${V(n.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"ไม่เกิน":"น้อยกว่า",s=e(n.origin);return s?`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${r} ${n.maximum.toString()} ${s.unit??"รายการ"}`:`เกินกำหนด: ${n.origin??"ค่า"} ควรมี${r} ${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?"อย่างน้อย":"มากกว่า",s=e(n.origin);return s?`น้อยกว่ากำหนด: ${n.origin} ควรมี${r} ${n.minimum.toString()} ${s.unit}`:`น้อยกว่ากำหนด: ${n.origin} ควรมี${r} ${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${r.prefix}"`:r.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${r.suffix}"`:r.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${r.includes}" อยู่ในข้อความ`:r.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${r.pattern}`:`รูปแบบไม่ถูกต้อง: ${A[r.format]??n.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${n.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${S(n.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${n.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${n.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function VT(){return{localeError:ZT()}}var jT=()=>{let t={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function e(n){return t[n]??null}let A={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO süre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aralığı",cidrv6:"IPv6 aralığı",base64:"base64 ile şifrelenmiş metin",base64url:"base64url ile şifrelenmiş metin",json_string:"JSON dizesi",e164:"E.164 sayısı",jwt:"JWT",template_literal:"Şablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Geçersiz değer: beklenen instanceof ${n.expected}, alınan ${o}`:`Geçersiz değer: beklenen ${r}, alınan ${o}`}case"invalid_value":return n.values.length===1?`Geçersiz değer: beklenen ${V(n.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Çok büyük: beklenen ${n.origin??"değer"} ${r}${n.maximum.toString()} ${s.unit??"öğe"}`:`Çok büyük: beklenen ${n.origin??"değer"} ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Çok küçük: beklenen ${n.origin} ${r}${n.minimum.toString()} ${s.unit}`:`Çok küçük: beklenen ${n.origin} ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Geçersiz metin: "${r.prefix}" ile başlamalı`:r.format==="ends_with"?`Geçersiz metin: "${r.suffix}" ile bitmeli`:r.format==="includes"?`Geçersiz metin: "${r.includes}" içermeli`:r.format==="regex"?`Geçersiz metin: ${r.pattern} desenine uymalı`:`Geçersiz ${A[r.format]??n.format}`}case"not_multiple_of":return`Geçersiz sayı: ${n.divisor} ile tam bölünebilmeli`;case"unrecognized_keys":return`Tanınmayan anahtar${n.keys.length>1?"lar":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} içinde geçersiz anahtar`;case"invalid_union":return"Geçersiz değer";case"invalid_element":return`${n.origin} içinde geçersiz değer`;default:return"Geçersiz değer"}}};function GT(){return{localeError:jT()}}var WT=()=>{let t={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function e(n){return t[n]??null}let A={regex:"вхідні дані",email:"адреса електронної пошти",url:"URL",emoji:"емодзі",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"дата та час ISO",date:"дата ISO",time:"час ISO",duration:"тривалість ISO",ipv4:"адреса IPv4",ipv6:"адреса IPv6",cidrv4:"діапазон IPv4",cidrv6:"діапазон IPv6",base64:"рядок у кодуванні base64",base64url:"рядок у кодуванні base64url",json_string:"рядок JSON",e164:"номер E.164",jwt:"JWT",template_literal:"вхідні дані"},i={nan:"NaN",number:"число",array:"масив"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Неправильні вхідні дані: очікується instanceof ${n.expected}, отримано ${o}`:`Неправильні вхідні дані: очікується ${r}, отримано ${o}`}case"invalid_value":return n.values.length===1?`Неправильні вхідні дані: очікується ${V(n.values[0])}`:`Неправильна опція: очікується одне з ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Занадто велике: очікується, що ${n.origin??"значення"} ${s.verb} ${r}${n.maximum.toString()} ${s.unit??"елементів"}`:`Занадто велике: очікується, що ${n.origin??"значення"} буде ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Занадто мале: очікується, що ${n.origin} ${s.verb} ${r}${n.minimum.toString()} ${s.unit}`:`Занадто мале: очікується, що ${n.origin} буде ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Неправильний рядок: повинен починатися з "${r.prefix}"`:r.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${r.suffix}"`:r.format==="includes"?`Неправильний рядок: повинен містити "${r.includes}"`:r.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${r.pattern}`:`Неправильний ${A[r.format]??n.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${n.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${n.keys.length>1?"і":""}: ${S(n.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${n.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${n.origin}`;default:return"Неправильні вхідні дані"}}};function wb(){return{localeError:WT()}}function JT(){return wb()}var XT=()=>{let t={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function e(n){return t[n]??null}let A={regex:"ان پٹ",email:"ای میل ایڈریس",url:"یو آر ایل",emoji:"ایموجی",uuid:"یو یو آئی ڈی",uuidv4:"یو یو آئی ڈی وی 4",uuidv6:"یو یو آئی ڈی وی 6",nanoid:"نینو آئی ڈی",guid:"جی یو آئی ڈی",cuid:"سی یو آئی ڈی",cuid2:"سی یو آئی ڈی 2",ulid:"یو ایل آئی ڈی",xid:"ایکس آئی ڈی",ksuid:"کے ایس یو آئی ڈی",datetime:"آئی ایس او ڈیٹ ٹائم",date:"آئی ایس او تاریخ",time:"آئی ایس او وقت",duration:"آئی ایس او مدت",ipv4:"آئی پی وی 4 ایڈریس",ipv6:"آئی پی وی 6 ایڈریس",cidrv4:"آئی پی وی 4 رینج",cidrv6:"آئی پی وی 6 رینج",base64:"بیس 64 ان کوڈڈ سٹرنگ",base64url:"بیس 64 یو آر ایل ان کوڈڈ سٹرنگ",json_string:"جے ایس او این سٹرنگ",e164:"ای 164 نمبر",jwt:"جے ڈبلیو ٹی",template_literal:"ان پٹ"},i={nan:"NaN",number:"نمبر",array:"آرے",null:"نل"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`غلط ان پٹ: instanceof ${n.expected} متوقع تھا، ${o} موصول ہوا`:`غلط ان پٹ: ${r} متوقع تھا، ${o} موصول ہوا`}case"invalid_value":return n.values.length===1?`غلط ان پٹ: ${V(n.values[0])} متوقع تھا`:`غلط آپشن: ${S(n.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`بہت بڑا: ${n.origin??"ویلیو"} کے ${r}${n.maximum.toString()} ${s.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${n.origin??"ویلیو"} کا ${r}${n.maximum.toString()} ہونا متوقع تھا`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`بہت چھوٹا: ${n.origin} کے ${r}${n.minimum.toString()} ${s.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${n.origin} کا ${r}${n.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{let r=n;return r.format==="starts_with"?`غلط سٹرنگ: "${r.prefix}" سے شروع ہونا چاہیے`:r.format==="ends_with"?`غلط سٹرنگ: "${r.suffix}" پر ختم ہونا چاہیے`:r.format==="includes"?`غلط سٹرنگ: "${r.includes}" شامل ہونا چاہیے`:r.format==="regex"?`غلط سٹرنگ: پیٹرن ${r.pattern} سے میچ ہونا چاہیے`:`غلط ${A[r.format]??n.format}`}case"not_multiple_of":return`غلط نمبر: ${n.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${n.keys.length>1?"ز":""}: ${S(n.keys,"، ")}`;case"invalid_key":return`${n.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${n.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function YT(){return{localeError:XT()}}var qT=()=>{let t={string:{unit:"belgi",verb:"bo‘lishi kerak"},file:{unit:"bayt",verb:"bo‘lishi kerak"},array:{unit:"element",verb:"bo‘lishi kerak"},set:{unit:"element",verb:"bo‘lishi kerak"}};function e(n){return t[n]??null}let A={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${o}`:`Noto‘g‘ri kirish: kutilgan ${r}, qabul qilingan ${o}`}case"invalid_value":return n.values.length===1?`Noto‘g‘ri kirish: kutilgan ${V(n.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Juda katta: kutilgan ${n.origin??"qiymat"} ${r}${n.maximum.toString()} ${s.unit} ${s.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Juda kichik: kutilgan ${n.origin} ${r}${n.minimum.toString()} ${s.unit} ${s.verb}`:`Juda kichik: kutilgan ${n.origin} ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Noto‘g‘ri satr: "${r.prefix}" bilan boshlanishi kerak`:r.format==="ends_with"?`Noto‘g‘ri satr: "${r.suffix}" bilan tugashi kerak`:r.format==="includes"?`Noto‘g‘ri satr: "${r.includes}" ni o‘z ichiga olishi kerak`:r.format==="regex"?`Noto‘g‘ri satr: ${r.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${A[r.format]??n.format}`}case"not_multiple_of":return`Noto‘g‘ri raqam: ${n.divisor} ning karralisi bo‘lishi kerak`;case"unrecognized_keys":return`Noma’lum kalit${n.keys.length>1?"lar":""}: ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto‘g‘ri`;case"invalid_union":return"Noto‘g‘ri kirish";case"invalid_element":return`${n.origin} da noto‘g‘ri qiymat`;default:return"Noto‘g‘ri kirish"}}};function eO(){return{localeError:qT()}}var tO=()=>{let t={string:{unit:"ký tự",verb:"có"},file:{unit:"byte",verb:"có"},array:{unit:"phần tử",verb:"có"},set:{unit:"phần tử",verb:"có"}};function e(n){return t[n]??null}let A={regex:"đầu vào",email:"địa chỉ email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ngày giờ ISO",date:"ngày ISO",time:"giờ ISO",duration:"khoảng thời gian ISO",ipv4:"địa chỉ IPv4",ipv6:"địa chỉ IPv6",cidrv4:"dải IPv4",cidrv6:"dải IPv6",base64:"chuỗi mã hóa base64",base64url:"chuỗi mã hóa base64url",json_string:"chuỗi JSON",e164:"số E.164",jwt:"JWT",template_literal:"đầu vào"},i={nan:"NaN",number:"số",array:"mảng"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${n.expected}, nhận được ${o}`:`Đầu vào không hợp lệ: mong đợi ${r}, nhận được ${o}`}case"invalid_value":return n.values.length===1?`Đầu vào không hợp lệ: mong đợi ${V(n.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Quá lớn: mong đợi ${n.origin??"giá trị"} ${s.verb} ${r}${n.maximum.toString()} ${s.unit??"phần tử"}`:`Quá lớn: mong đợi ${n.origin??"giá trị"} ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Quá nhỏ: mong đợi ${n.origin} ${s.verb} ${r}${n.minimum.toString()} ${s.unit}`:`Quá nhỏ: mong đợi ${n.origin} ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${r.prefix}"`:r.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${r.suffix}"`:r.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${r.includes}"`:r.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${r.pattern}`:`${A[r.format]??n.format} không hợp lệ`}case"not_multiple_of":return`Số không hợp lệ: phải là bội số của ${n.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${S(n.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${n.origin}`;case"invalid_union":return"Đầu vào không hợp lệ";case"invalid_element":return`Giá trị không hợp lệ trong ${n.origin}`;default:return"Đầu vào không hợp lệ"}}};function AO(){return{localeError:tO()}}var nO=()=>{let t={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function e(n){return t[n]??null}let A={regex:"输入",email:"电子邮件",url:"URL",emoji:"表情符号",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO日期时间",date:"ISO日期",time:"ISO时间",duration:"ISO时长",ipv4:"IPv4地址",ipv6:"IPv6地址",cidrv4:"IPv4网段",cidrv6:"IPv6网段",base64:"base64编码字符串",base64url:"base64url编码字符串",json_string:"JSON字符串",e164:"E.164号码",jwt:"JWT",template_literal:"输入"},i={nan:"NaN",number:"数字",array:"数组",null:"空值(null)"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`无效输入:期望 instanceof ${n.expected},实际接收 ${o}`:`无效输入:期望 ${r},实际接收 ${o}`}case"invalid_value":return n.values.length===1?`无效输入:期望 ${V(n.values[0])}`:`无效选项:期望以下之一 ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`数值过大:期望 ${n.origin??"值"} ${r}${n.maximum.toString()} ${s.unit??"个元素"}`:`数值过大:期望 ${n.origin??"值"} ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`数值过小:期望 ${n.origin} ${r}${n.minimum.toString()} ${s.unit}`:`数值过小:期望 ${n.origin} ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`无效字符串:必须以 "${r.prefix}" 开头`:r.format==="ends_with"?`无效字符串:必须以 "${r.suffix}" 结尾`:r.format==="includes"?`无效字符串:必须包含 "${r.includes}"`:r.format==="regex"?`无效字符串:必须满足正则表达式 ${r.pattern}`:`无效${A[r.format]??n.format}`}case"not_multiple_of":return`无效数字:必须是 ${n.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${S(n.keys,", ")}`;case"invalid_key":return`${n.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${n.origin} 中包含无效值(value)`;default:return"无效输入"}}};function iO(){return{localeError:nO()}}var rO=()=>{let t={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function e(n){return t[n]??null}let A={regex:"輸入",email:"郵件地址",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO 日期時間",date:"ISO 日期",time:"ISO 時間",duration:"ISO 期間",ipv4:"IPv4 位址",ipv6:"IPv6 位址",cidrv4:"IPv4 範圍",cidrv6:"IPv6 範圍",base64:"base64 編碼字串",base64url:"base64url 編碼字串",json_string:"JSON 字串",e164:"E.164 數值",jwt:"JWT",template_literal:"輸入"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`無效的輸入值:預期為 instanceof ${n.expected},但收到 ${o}`:`無效的輸入值:預期為 ${r},但收到 ${o}`}case"invalid_value":return n.values.length===1?`無效的輸入值:預期為 ${V(n.values[0])}`:`無效的選項:預期為以下其中之一 ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`數值過大:預期 ${n.origin??"值"} 應為 ${r}${n.maximum.toString()} ${s.unit??"個元素"}`:`數值過大:預期 ${n.origin??"值"} 應為 ${r}${n.maximum.toString()}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`數值過小:預期 ${n.origin} 應為 ${r}${n.minimum.toString()} ${s.unit}`:`數值過小:預期 ${n.origin} 應為 ${r}${n.minimum.toString()}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`無效的字串:必須以 "${r.prefix}" 開頭`:r.format==="ends_with"?`無效的字串:必須以 "${r.suffix}" 結尾`:r.format==="includes"?`無效的字串:必須包含 "${r.includes}"`:r.format==="regex"?`無效的字串:必須符合格式 ${r.pattern}`:`無效的 ${A[r.format]??n.format}`}case"not_multiple_of":return`無效的數字:必須為 ${n.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${n.keys.length>1?"們":""}:${S(n.keys,"、")}`;case"invalid_key":return`${n.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${n.origin} 中有無效的值`;default:return"無效的輸入值"}}};function sO(){return{localeError:rO()}}var oO=()=>{let t={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function e(n){return t[n]??null}let A={regex:"ẹ̀rọ ìbáwọlé",email:"àdírẹ́sì ìmẹ́lì",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"àkókò ISO",date:"ọjọ́ ISO",time:"àkókò ISO",duration:"àkókò tó pé ISO",ipv4:"àdírẹ́sì IPv4",ipv6:"àdírẹ́sì IPv6",cidrv4:"àgbègbè IPv4",cidrv6:"àgbègbè IPv6",base64:"ọ̀rọ̀ tí a kọ́ ní base64",base64url:"ọ̀rọ̀ base64url",json_string:"ọ̀rọ̀ JSON",e164:"nọ́mbà E.164",jwt:"JWT",template_literal:"ẹ̀rọ ìbáwọlé"},i={nan:"NaN",number:"nọ́mbà",array:"akopọ"};return n=>{switch(n.code){case"invalid_type":{let r=i[n.expected]??n.expected,s=j(n.input),o=i[s]??s;return/^[A-Z]/.test(n.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${n.expected}, àmọ̀ a rí ${o}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${r}, àmọ̀ a rí ${o}`}case"invalid_value":return n.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${V(n.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${S(n.values,"|")}`;case"too_big":{let r=n.inclusive?"<=":"<",s=e(n.origin);return s?`Tó pọ̀ jù: a ní láti jẹ́ pé ${n.origin??"iye"} ${s.verb} ${r}${n.maximum} ${s.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${r}${n.maximum}`}case"too_small":{let r=n.inclusive?">=":">",s=e(n.origin);return s?`Kéré ju: a ní láti jẹ́ pé ${n.origin} ${s.verb} ${r}${n.minimum} ${s.unit}`:`Kéré ju: a ní láti jẹ́ ${r}${n.minimum}`}case"invalid_format":{let r=n;return r.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${r.prefix}"`:r.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${r.suffix}"`:r.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${r.includes}"`:r.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${r.pattern}`:`Aṣìṣe: ${A[r.format]??n.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${n.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${S(n.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${n.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${n.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function aO(){return{localeError:oO()}}var Zg,yb=Symbol("ZodOutput"),bb=Symbol("ZodInput");class _b{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...A){let i=A[0];return this._map.set(e,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let A=this._map.get(e);return A&&typeof A=="object"&&"id"in A&&this._idmap.delete(A.id),this._map.delete(e),this}get(e){let A=e._zod.parent;if(A){let i={...this.get(A)??{}};delete i.id;let n={...i,...this._map.get(e)};return Object.keys(n).length?n:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function Af(){return new _b}(Zg=globalThis).__zod_globalRegistry??(Zg.__zod_globalRegistry=Af());var Rt=globalThis.__zod_globalRegistry;function Cb(t,e){return new t({type:"string",...E(e)})}function Ub(t,e){return new t({type:"string",coerce:!0,...E(e)})}function nf(t,e){return new t({type:"string",format:"email",check:"string_format",abort:!1,...E(e)})}function ca(t,e){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...E(e)})}function rf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...E(e)})}function sf(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...E(e)})}function of(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...E(e)})}function af(t,e){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...E(e)})}function qa(t,e){return new t({type:"string",format:"url",check:"string_format",abort:!1,...E(e)})}function lf(t,e){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...E(e)})}function uf(t,e){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...E(e)})}function cf(t,e){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...E(e)})}function df(t,e){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...E(e)})}function ff(t,e){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...E(e)})}function hf(t,e){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...E(e)})}function gf(t,e){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...E(e)})}function mf(t,e){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...E(e)})}function pf(t,e){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...E(e)})}function Qb(t,e){return new t({type:"string",format:"mac",check:"string_format",abort:!1,...E(e)})}function vf(t,e){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...E(e)})}function Bf(t,e){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...E(e)})}function wf(t,e){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...E(e)})}function yf(t,e){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...E(e)})}function bf(t,e){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...E(e)})}function _f(t,e){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...E(e)})}var xb={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Fb(t,e){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...E(e)})}function Ib(t,e){return new t({type:"string",format:"date",check:"string_format",...E(e)})}function Sb(t,e){return new t({type:"string",format:"time",check:"string_format",precision:null,...E(e)})}function kb(t,e){return new t({type:"string",format:"duration",check:"string_format",...E(e)})}function Eb(t,e){return new t({type:"number",checks:[],...E(e)})}function $b(t,e){return new t({type:"number",coerce:!0,checks:[],...E(e)})}function Tb(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...E(e)})}function Ob(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float32",...E(e)})}function Hb(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"float64",...E(e)})}function Db(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"int32",...E(e)})}function Lb(t,e){return new t({type:"number",check:"number_format",abort:!1,format:"uint32",...E(e)})}function Mb(t,e){return new t({type:"boolean",...E(e)})}function Nb(t,e){return new t({type:"boolean",coerce:!0,...E(e)})}function zb(t,e){return new t({type:"bigint",...E(e)})}function Pb(t,e){return new t({type:"bigint",coerce:!0,...E(e)})}function Rb(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...E(e)})}function Kb(t,e){return new t({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...E(e)})}function Zb(t,e){return new t({type:"symbol",...E(e)})}function Vb(t,e){return new t({type:"undefined",...E(e)})}function jb(t,e){return new t({type:"null",...E(e)})}function Gb(t){return new t({type:"any"})}function Wb(t){return new t({type:"unknown"})}function Jb(t,e){return new t({type:"never",...E(e)})}function Xb(t,e){return new t({type:"void",...E(e)})}function Yb(t,e){return new t({type:"date",...E(e)})}function qb(t,e){return new t({type:"date",coerce:!0,...E(e)})}function e0(t,e){return new t({type:"nan",...E(e)})}function an(t,e){return new Vd({check:"less_than",...E(e),value:t,inclusive:!1})}function Gt(t,e){return new Vd({check:"less_than",...E(e),value:t,inclusive:!0})}function ln(t,e){return new jd({check:"greater_than",...E(e),value:t,inclusive:!1})}function Ct(t,e){return new jd({check:"greater_than",...E(e),value:t,inclusive:!0})}function Cf(t){return ln(0,t)}function Uf(t){return an(0,t)}function Qf(t){return Gt(0,t)}function xf(t){return Ct(0,t)}function Ii(t,e){return new Mw({check:"multiple_of",...E(e),value:t})}function zi(t,e){return new Pw({check:"max_size",...E(e),maximum:t})}function un(t,e){return new Rw({check:"min_size",...E(e),minimum:t})}function ys(t,e){return new Kw({check:"size_equals",...E(e),size:t})}function bs(t,e){return new Zw({check:"max_length",...E(e),maximum:t})}function Ln(t,e){return new Vw({check:"min_length",...E(e),minimum:t})}function _s(t,e){return new jw({check:"length_equals",...E(e),length:t})}function el(t,e){return new Gw({check:"string_format",format:"regex",...E(e),pattern:t})}function tl(t){return new Ww({check:"string_format",format:"lowercase",...E(t)})}function Al(t){return new Jw({check:"string_format",format:"uppercase",...E(t)})}function nl(t,e){return new Xw({check:"string_format",format:"includes",...E(e),includes:t})}function il(t,e){return new Yw({check:"string_format",format:"starts_with",...E(e),prefix:t})}function rl(t,e){return new qw({check:"string_format",format:"ends_with",...E(e),suffix:t})}function Ff(t,e,A){return new ey({check:"property",property:t,schema:e,...E(A)})}function sl(t,e){return new ty({check:"mime_type",mime:t,...E(e)})}function DA(t){return new Ay({check:"overwrite",tx:t})}function ol(t){return DA(e=>e.normalize(t))}function al(){return DA(t=>t.trim())}function ll(){return DA(t=>t.toLowerCase())}function ul(){return DA(t=>t.toUpperCase())}function cl(){return DA(t=>VB(t))}function t0(t,e,A){return new t({type:"array",element:e,...E(A)})}function lO(t,e,A){return new t({type:"union",options:e,...E(A)})}function uO(t,e,A){return new t({type:"union",options:e,inclusive:!1,...E(A)})}function cO(t,e,A,i){return new t({type:"union",options:A,discriminator:e,...E(i)})}function dO(t,e,A){return new t({type:"intersection",left:e,right:A})}function fO(t,e,A,i){let n=A instanceof X;return new t({type:"tuple",items:e,rest:n?A:null,...E(n?i:A)})}function hO(t,e,A,i){return new t({type:"record",keyType:e,valueType:A,...E(i)})}function gO(t,e,A,i){return new t({type:"map",keyType:e,valueType:A,...E(i)})}function mO(t,e,A){return new t({type:"set",valueType:e,...E(A)})}function pO(t,e,A){let i=Array.isArray(e)?Object.fromEntries(e.map(n=>[n,n])):e;return new t({type:"enum",entries:i,...E(A)})}function vO(t,e,A){return new t({type:"enum",entries:e,...E(A)})}function BO(t,e,A){return new t({type:"literal",values:Array.isArray(e)?e:[e],...E(A)})}function A0(t,e){return new t({type:"file",...E(e)})}function wO(t,e){return new t({type:"transform",transform:e})}function yO(t,e){return new t({type:"optional",innerType:e})}function bO(t,e){return new t({type:"nullable",innerType:e})}function _O(t,e,A){return new t({type:"default",innerType:e,get defaultValue(){return typeof A=="function"?A():GB(A)}})}function CO(t,e,A){return new t({type:"nonoptional",innerType:e,...E(A)})}function UO(t,e){return new t({type:"success",innerType:e})}function QO(t,e,A){return new t({type:"catch",innerType:e,catchValue:typeof A=="function"?A:()=>A})}function xO(t,e,A){return new t({type:"pipe",in:e,out:A})}function FO(t,e){return new t({type:"readonly",innerType:e})}function IO(t,e,A){return new t({type:"template_literal",parts:e,...E(A)})}function SO(t,e){return new t({type:"lazy",getter:e})}function kO(t,e){return new t({type:"promise",innerType:e})}function n0(t,e,A){let i=E(A);return i.abort??(i.abort=!0),new t({type:"custom",check:"custom",fn:e,...i})}function i0(t,e,A){return new t({type:"custom",check:"custom",fn:e,...E(A)})}function r0(t){let e=s0(A=>(A.addIssue=i=>{if(typeof i=="string")A.issues.push(la(i,A.value,e._zod.def));else{let n=i;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=A.value),n.inst??(n.inst=e),n.continue??(n.continue=!e._zod.def.abort),A.issues.push(la(n))}},t(A.value,A)));return e}function s0(t,e){let A=new ke({check:"custom",...E(e)});return A._zod.check=t,A}function o0(t){let e=new ke({check:"describe"});return e._zod.onattach=[A=>{let i=Rt.get(A)??{};Rt.add(A,{...i,description:t})}],e._zod.check=()=>{},e}function a0(t){let e=new ke({check:"meta"});return e._zod.onattach=[A=>{let i=Rt.get(A)??{};Rt.add(A,{...i,...t})}],e._zod.check=()=>{},e}function l0(t,e){let A=E(e),i=A.truthy??["true","1","yes","on","y","enabled"],n=A.falsy??["false","0","no","off","n","disabled"];A.case!=="sensitive"&&(i=i.map(d=>typeof d=="string"?d.toLowerCase():d),n=n.map(d=>typeof d=="string"?d.toLowerCase():d));let r=new Set(i),s=new Set(n),o=t.Codec??ef,a=t.Boolean??Jd,l=new(t.String??ws)({type:"string",error:A.error}),u=new a({type:"boolean",error:A.error}),c=new o({type:"pipe",in:l,out:u,transform:(d,f)=>{let h=d;return A.case!=="sensitive"&&(h=h.toLowerCase()),r.has(h)?!0:s.has(h)?!1:(f.issues.push({code:"invalid_value",expected:"stringbool",values:[...r,...s],input:f.value,inst:c,continue:!1}),{})},reverseTransform:(d,f)=>d===!0?i[0]||"true":n[0]||"false",error:A.error});return c}function Cs(t,e,A,i={}){let n=E(i),r={...E(i),check:"string_format",type:"string",format:e,fn:typeof A=="function"?A:s=>A.test(s),...n};return A instanceof RegExp&&(r.pattern=A),new t(r)}function Si(t){let e=(t==null?void 0:t.target)??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:t.processors??{},metadataRegistry:(t==null?void 0:t.metadata)??Rt,target:e,unrepresentable:(t==null?void 0:t.unrepresentable)??"throw",override:(t==null?void 0:t.override)??(()=>{}),io:(t==null?void 0:t.io)??"output",counter:0,seen:new Map,cycles:(t==null?void 0:t.cycles)??"ref",reused:(t==null?void 0:t.reused)??"inline",external:(t==null?void 0:t.external)??void 0}}function Be(t,e,A={path:[],schemaPath:[]}){var l,u;var i;let n=t._zod.def,r=e.seen.get(t);if(r)return r.count++,A.schemaPath.includes(t)&&(r.cycle=A.path),r.schema;let s={schema:{},count:1,cycle:void 0,path:A.path};e.seen.set(t,s);let o=(u=(l=t._zod).toJSONSchema)==null?void 0:u.call(l);if(o)s.schema=o;else{let c={...A,schemaPath:[...A.schemaPath,t],path:A.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(e,s.schema,c);else{let f=s.schema,h=e.processors[n.type];if(!h)throw Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(t,e,f,c)}let d=t._zod.parent;d&&(s.ref||(s.ref=d),Be(d,e,c),e.seen.get(d).isParent=!0)}let a=e.metadataRegistry.get(t);return a&&Object.assign(s.schema,a),e.io==="input"&&mt(t)&&(delete s.schema.examples,delete s.schema.default),e.io==="input"&&s.schema._prefault&&((i=s.schema).default??(i.default=s.schema._prefault)),delete s.schema._prefault,e.seen.get(t).schema}function ki(t,e){var s,o,a,l;let A=t.seen.get(e);if(!A)throw Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let u of t.seen.entries()){let c=(s=t.metadataRegistry.get(u[0]))==null?void 0:s.id;if(c){let d=i.get(c);if(d&&d!==u[0])throw Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(c,u[0])}}let n=u=>{var h;let c=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){let g=(h=t.external.registry.get(u[0]))==null?void 0:h.id,m=t.external.uri??(B=>B);if(g)return{ref:m(g)};let p=u[1].defId??u[1].schema.id??`schema${t.counter++}`;return u[1].defId=p,{defId:p,ref:`${m("__shared")}#/${c}/${p}`}}if(u[1]===A)return{ref:"#"};let d=`#/${c}/`,f=u[1].schema.id??`__schema${t.counter++}`;return{defId:f,ref:d+f}},r=u=>{if(u[1].schema.$ref)return;let c=u[1],{ref:d,defId:f}=n(u);c.def={...c.schema},f&&(c.defId=f);let h=c.schema;for(let g in h)delete h[g];h.$ref=d};if(t.cycles==="throw")for(let u of t.seen.entries()){let c=u[1];if(c.cycle)throw Error(`Cycle detected: #/${(o=c.cycle)==null?void 0:o.join("/")}/<root>
|
|
83
83
|
|
|
84
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let c of t.seen.entries()){let d=c[1];if(e===c[0]){s(c);continue}if(t.external){let f=(l=t.external.registry.get(c[0]))==null?void 0:l.id;if(e!==c[0]&&f){s(c);continue}}if((u=t.metadataRegistry.get(c[0]))!=null&&u.id){s(c);continue}if(d.cycle){s(c);continue}if(d.count>1&&t.reused==="ref"){s(c);continue}}}function $i(t,e){var o,a,l;let n=t.seen.get(e);if(!n)throw Error("Unprocessed schema. This is a bug in Zod.");let r=u=>{let c=t.seen.get(u);if(c.ref===null)return;let d=c.def??c.schema,f={...d},h=c.ref;if(c.ref=null,h){r(h);let p=t.seen.get(h),g=p.schema;if(g.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(d.allOf=d.allOf??[],d.allOf.push(g)):Object.assign(d,g),Object.assign(d,f),u._zod.parent===h)for(let b in d)b==="$ref"||b==="allOf"||b in f||delete d[b];if(g.$ref)for(let b in d)b==="$ref"||b==="allOf"||b in p.def&&JSON.stringify(d[b])===JSON.stringify(p.def[b])&&delete d[b]}let m=u._zod.parent;if(m&&m!==h){r(m);let p=t.seen.get(m);if(p!=null&&p.schema.$ref&&(d.$ref=p.schema.$ref,p.def))for(let g in d)g==="$ref"||g==="allOf"||g in p.def&&JSON.stringify(d[g])===JSON.stringify(p.def[g])&&delete d[g]}t.override({zodSchema:u,jsonSchema:d,path:c.path??[]})};for(let u of[...t.seen.entries()].reverse())r(u[0]);let i={};if(t.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":t.target,(o=t.external)!=null&&o.uri){let u=(a=t.external.registry.get(e))==null?void 0:a.id;if(!u)throw Error("Schema is missing an `id` property");i.$id=t.external.uri(u)}Object.assign(i,n.def??n.schema);let s=((l=t.external)==null?void 0:l.defs)??{};for(let u of t.seen.entries()){let c=u[1];c.def&&c.defId&&(s[c.defId]=c.def)}t.external||Object.keys(s).length>0&&(t.target==="draft-2020-12"?i.$defs=s:i.definitions=s);try{let u=JSON.parse(JSON.stringify(i));return Object.defineProperty(u,"~standard",{value:{...e["~standard"],jsonSchema:{input:fr(e,"input",t.processors),output:fr(e,"output",t.processors)}},enumerable:!1,writable:!1}),u}catch{throw Error("Error converting schema to JSON.")}}function Ye(t,e){let n=e??{seen:new Set};if(n.seen.has(t))return!1;n.seen.add(t);let r=t._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return Ye(r.element,n);if(r.type==="set")return Ye(r.valueType,n);if(r.type==="lazy")return Ye(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return Ye(r.innerType,n);if(r.type==="intersection")return Ye(r.left,n)||Ye(r.right,n);if(r.type==="record"||r.type==="map")return Ye(r.keyType,n)||Ye(r.valueType,n);if(r.type==="pipe")return Ye(r.in,n)||Ye(r.out,n);if(r.type==="object"){for(let i in r.shape)if(Ye(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(let i of r.options)if(Ye(i,n))return!0;return!1}if(r.type==="tuple"){for(let i of r.items)if(Ye(i,n))return!0;return!!(r.rest&&Ye(r.rest,n))}return!1}var Lb=(t,e={})=>n=>{let r=_i({...n,processors:e});return ce(t,r),ki(r,t),$i(r,t)},fr=(t,e,n={})=>r=>{let{libraryOptions:i,target:s}=r??{},o=_i({...i??{},target:s,io:e,processors:n});return ce(t,o),ki(o,t),$i(o,t)},sP={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Fb=(t,e,n,r)=>{let i=n;i.type="string";let{minimum:s,maximum:o,format:a,patterns:l,contentEncoding:u}=t._zod.bag;if(typeof s=="number"&&(i.minLength=s),typeof o=="number"&&(i.maxLength=o),a&&(i.format=sP[a]??a,i.format===""&&delete i.format,a==="time"&&delete i.format),u&&(i.contentEncoding=u),l&&l.size>0){let c=[...l];c.length===1?i.pattern=c[0].source:c.length>1&&(i.allOf=[...c.map(d=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Vb=(t,e,n,r)=>{let i=n,{minimum:s,maximum:o,format:a,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:c}=t._zod.bag;typeof a=="string"&&a.includes("int")?i.type="integer":i.type="number",typeof c=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.minimum=c,i.exclusiveMinimum=!0):i.exclusiveMinimum=c),typeof s=="number"&&(i.minimum=s,typeof c=="number"&&e.target!=="draft-04"&&(c>=s?delete i.minimum:delete i.exclusiveMinimum)),typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u),typeof o=="number"&&(i.maximum=o,typeof u=="number"&&e.target!=="draft-04"&&(u<=o?delete i.maximum:delete i.exclusiveMaximum)),typeof l=="number"&&(i.multipleOf=l)},Wb=(t,e,n,r)=>{n.type="boolean"},Hb=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},Bb=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},qb=(t,e,n,r)=>{e.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Jb=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},Yb=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},Gb=(t,e,n,r)=>{n.not={}},Kb=(t,e,n,r)=>{},Xb=(t,e,n,r)=>{},Qb=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},ey=(t,e,n,r)=>{let i=t._zod.def,s=gu(i.entries);s.every(o=>typeof o=="number")&&(n.type="number"),s.every(o=>typeof o=="string")&&(n.type="string"),n.enum=s},ty=(t,e,n,r)=>{let i=t._zod.def,s=[];for(let o of i.values)if(o===void 0){if(e.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof o=="bigint"){if(e.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");s.push(Number(o))}else s.push(o);if(s.length!==0)if(s.length===1){let o=s[0];n.type=o===null?"null":typeof o,e.target==="draft-04"||e.target==="openapi-3.0"?n.enum=[o]:n.const=o}else s.every(o=>typeof o=="number")&&(n.type="number"),s.every(o=>typeof o=="string")&&(n.type="string"),s.every(o=>typeof o=="boolean")&&(n.type="boolean"),s.every(o=>o===null)&&(n.type="null"),n.enum=s},ny=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},iy=(t,e,n,r)=>{let i=n,s=t._zod.pattern;if(!s)throw Error("Pattern not found in template literal");i.type="string",i.pattern=s.source},ry=(t,e,n,r)=>{let i=n,s={type:"string",format:"binary",contentEncoding:"binary"},{minimum:o,maximum:a,mime:l}=t._zod.bag;o!==void 0&&(s.minLength=o),a!==void 0&&(s.maxLength=a),l?l.length===1?(s.contentMediaType=l[0],Object.assign(i,s)):(Object.assign(i,s),i.anyOf=l.map(u=>({contentMediaType:u}))):Object.assign(i,s)},sy=(t,e,n,r)=>{n.type="boolean"},oy=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},ay=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},ly=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},uy=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},cy=(t,e,n,r)=>{if(e.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},dy=(t,e,n,r)=>{let i=n,s=t._zod.def,{minimum:o,maximum:a}=t._zod.bag;typeof o=="number"&&(i.minItems=o),typeof a=="number"&&(i.maxItems=a),i.type="array",i.items=ce(s.element,e,{...r,path:[...r.path,"items"]})},fy=(t,e,n,r)=>{var u;let i=n,s=t._zod.def;i.type="object",i.properties={};let o=s.shape;for(let c in o)i.properties[c]=ce(o[c],e,{...r,path:[...r.path,"properties",c]});let a=new Set(Object.keys(o)),l=new Set([...a].filter(c=>{let d=s.shape[c]._zod;return e.io==="input"?d.optin===void 0:d.optout===void 0}));l.size>0&&(i.required=Array.from(l)),((u=s.catchall)==null?void 0:u._zod.def.type)==="never"?i.additionalProperties=!1:s.catchall?s.catchall&&(i.additionalProperties=ce(s.catchall,e,{...r,path:[...r.path,"additionalProperties"]})):e.io==="output"&&(i.additionalProperties=!1)},hc=(t,e,n,r)=>{let i=t._zod.def,s=i.inclusive===!1,o=i.options.map((a,l)=>ce(a,e,{...r,path:[...r.path,s?"oneOf":"anyOf",l]}));s?n.oneOf=o:n.anyOf=o},hy=(t,e,n,r)=>{let i=t._zod.def,s=ce(i.left,e,{...r,path:[...r.path,"allOf",0]}),o=ce(i.right,e,{...r,path:[...r.path,"allOf",1]}),a=u=>"allOf"in u&&Object.keys(u).length===1,l=[...a(s)?s.allOf:[s],...a(o)?o.allOf:[o]];n.allOf=l},my=(t,e,n,r)=>{let i=n,s=t._zod.def;i.type="array";let o=e.target==="draft-2020-12"?"prefixItems":"items",a=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",l=s.items.map((f,h)=>ce(f,e,{...r,path:[...r.path,o,h]})),u=s.rest?ce(s.rest,e,{...r,path:[...r.path,a,...e.target==="openapi-3.0"?[s.items.length]:[]]}):null;e.target==="draft-2020-12"?(i.prefixItems=l,u&&(i.items=u)):e.target==="openapi-3.0"?(i.items={anyOf:l},u&&i.items.anyOf.push(u),i.minItems=l.length,!u&&(i.maxItems=l.length)):(i.items=l,u&&(i.additionalItems=u));let{minimum:c,maximum:d}=t._zod.bag;typeof c=="number"&&(i.minItems=c),typeof d=="number"&&(i.maxItems=d)},py=(t,e,n,r)=>{var u;let i=n,s=t._zod.def;i.type="object";let o=s.keyType,a=(u=o._zod.bag)==null?void 0:u.patterns;if(s.mode==="loose"&&a&&a.size>0){let c=ce(s.valueType,e,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(let d of a)i.patternProperties[d.source]=c}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(i.propertyNames=ce(s.keyType,e,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=ce(s.valueType,e,{...r,path:[...r.path,"additionalProperties"]});let l=o._zod.values;if(l){let c=[...l].filter(d=>typeof d=="string"||typeof d=="number");c.length>0&&(i.required=c)}},gy=(t,e,n,r)=>{let i=t._zod.def,s=ce(i.innerType,e,r),o=e.seen.get(t);e.target==="openapi-3.0"?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[s,{type:"null"}]},vy=(t,e,n,r)=>{let i=t._zod.def;ce(i.innerType,e,r);let s=e.seen.get(t);s.ref=i.innerType},by=(t,e,n,r)=>{let i=t._zod.def;ce(i.innerType,e,r);let s=e.seen.get(t);s.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},yy=(t,e,n,r)=>{let i=t._zod.def;ce(i.innerType,e,r);let s=e.seen.get(t);s.ref=i.innerType,e.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},_y=(t,e,n,r)=>{let i=t._zod.def;ce(i.innerType,e,r);let s=e.seen.get(t);s.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}n.default=o},ky=(t,e,n,r)=>{let i=t._zod.def,s=e.io==="input"?i.in._zod.def.type==="transform"?i.out:i.in:i.out;ce(s,e,r);let o=e.seen.get(t);o.ref=s},$y=(t,e,n,r)=>{let i=t._zod.def;ce(i.innerType,e,r);let s=e.seen.get(t);s.ref=i.innerType,n.readOnly=!0},xy=(t,e,n,r)=>{let i=t._zod.def;ce(i.innerType,e,r);let s=e.seen.get(t);s.ref=i.innerType},mc=(t,e,n,r)=>{let i=t._zod.def;ce(i.innerType,e,r);let s=e.seen.get(t);s.ref=i.innerType},wy=(t,e,n,r)=>{let i=t._zod.innerType;ce(i,e,r);let s=e.seen.get(t);s.ref=i},vl={string:Fb,number:Vb,boolean:Wb,bigint:Hb,symbol:Bb,null:qb,undefined:Jb,void:Yb,never:Gb,any:Kb,unknown:Xb,date:Qb,enum:ey,literal:ty,nan:ny,template_literal:iy,file:ry,success:sy,custom:oy,function:ay,transform:ly,map:uy,set:cy,array:dy,object:fy,union:hc,intersection:hy,tuple:my,record:py,nullable:gy,nonoptional:vy,default:by,prefault:yy,catch:_y,pipe:ky,readonly:$y,promise:xy,optional:mc,lazy:wy};function Sy(t,e){if("_idmap"in t){let r=t,i=_i({...e,processors:vl}),s={};for(let l of r._idmap.entries()){let[u,c]=l;ce(c,i)}let o={},a={registry:r,uri:e==null?void 0:e.uri,defs:s};i.external=a;for(let l of r._idmap.entries()){let[u,c]=l;ki(i,c),o[u]=$i(i,c)}if(Object.keys(s).length>0){let l=i.target==="draft-2020-12"?"$defs":"definitions";o.__shared={[l]:s}}return{schemas:o}}let n=_i({...e,processors:vl});return ce(t,n),ki(n,t),$i(n,t)}class oP{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let n=(e==null?void 0:e.target)??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=_i({processors:vl,target:n,...(e==null?void 0:e.metadata)&&{metadata:e.metadata},...(e==null?void 0:e.unrepresentable)&&{unrepresentable:e.unrepresentable},...(e==null?void 0:e.override)&&{override:e.override},...(e==null?void 0:e.io)&&{io:e.io}})}process(e,n={path:[],schemaPath:[]}){return ce(e,this.ctx,n)}emit(e,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),ki(this.ctx,e);let r=$i(this.ctx,e),{"~standard":i,...s}=r;return s}}var aP={},Iy={};qt(Iy,{xor:()=>C_,xid:()=>r_,void:()=>T_,uuidv7:()=>Gy,uuidv6:()=>Yy,uuidv4:()=>Jy,uuid:()=>qy,url:()=>Ky,unknown:()=>Zn,union:()=>ba,undefined:()=>z_,ulid:()=>i_,uint64:()=>S_,uint32:()=>$_,tuple:()=>Rc,transform:()=>_a,templateLiteral:()=>J_,symbol:()=>I_,superRefine:()=>cd,success:()=>H_,stringbool:()=>tk,stringFormat:()=>p_,string:()=>oo,strictObject:()=>M_,set:()=>U_,refine:()=>ud,record:()=>Zc,readonly:()=>id,promise:()=>Y_,preprocess:()=>ik,prefault:()=>Gc,pipe:()=>gr,partialRecord:()=>R_,optional:()=>mr,object:()=>E_,number:()=>kc,nullish:()=>W_,nullable:()=>pr,null:()=>Ic,nonoptional:()=>Kc,never:()=>ga,nativeEnum:()=>L_,nanoid:()=>e_,nan:()=>B_,meta:()=>Q_,map:()=>j_,mac:()=>a_,looseRecord:()=>Z_,looseObject:()=>N_,literal:()=>F_,lazy:()=>od,ksuid:()=>s_,keyof:()=>P_,jwt:()=>m_,json:()=>nk,ipv6:()=>l_,ipv4:()=>o_,intersection:()=>Cc,int64:()=>w_,int32:()=>k_,int:()=>ao,instanceof:()=>ek,httpUrl:()=>Xy,hostname:()=>g_,hex:()=>v_,hash:()=>b_,guid:()=>By,function:()=>lo,float64:()=>__,float32:()=>y_,file:()=>V_,exactOptional:()=>Hc,enum:()=>ya,emoji:()=>Qy,email:()=>Hy,e164:()=>h_,discriminatedUnion:()=>A_,describe:()=>X_,date:()=>D_,custom:()=>K_,cuid2:()=>n_,cuid:()=>t_,codec:()=>q_,cidrv6:()=>c_,cidrv4:()=>u_,check:()=>G_,catch:()=>ed,boolean:()=>$c,bigint:()=>x_,base64url:()=>f_,base64:()=>d_,array:()=>ts,any:()=>O_,_function:()=>lo,_default:()=>Jc,_ZodString:()=>Xo,ZodXor:()=>Ec,ZodXID:()=>sa,ZodVoid:()=>Dc,ZodUnknown:()=>Oc,ZodUnion:()=>is,ZodUndefined:()=>wc,ZodUUID:()=>Mt,ZodURL:()=>Kr,ZodULID:()=>ra,ZodType:()=>J,ZodTuple:()=>Ac,ZodTransform:()=>Vc,ZodTemplateLiteral:()=>rd,ZodSymbol:()=>xc,ZodSuccess:()=>Xc,ZodStringFormat:()=>he,ZodString:()=>Gr,ZodSet:()=>Uc,ZodRecord:()=>rs,ZodReadonly:()=>nd,ZodPromise:()=>ad,ZodPrefault:()=>Yc,ZodPipe:()=>xa,ZodOptional:()=>ka,ZodObject:()=>ns,ZodNumberFormat:()=>Hn,ZodNumber:()=>Xr,ZodNullable:()=>Bc,ZodNull:()=>Sc,ZodNonOptional:()=>$a,ZodNever:()=>Tc,ZodNanoID:()=>ta,ZodNaN:()=>td,ZodMap:()=>jc,ZodMAC:()=>_c,ZodLiteral:()=>Lc,ZodLazy:()=>sd,ZodKSUID:()=>oa,ZodJWT:()=>ma,ZodIntersection:()=>Nc,ZodIPv6:()=>la,ZodIPv4:()=>aa,ZodGUID:()=>hr,ZodFunction:()=>ld,ZodFile:()=>Fc,ZodExactOptional:()=>Wc,ZodEnum:()=>xi,ZodEmoji:()=>ea,ZodEmail:()=>Qo,ZodE164:()=>ha,ZodDiscriminatedUnion:()=>Mc,ZodDefault:()=>qc,ZodDate:()=>va,ZodCustomStringFormat:()=>Pi,ZodCustom:()=>ss,ZodCodec:()=>wa,ZodCatch:()=>Qc,ZodCUID2:()=>ia,ZodCUID:()=>na,ZodCIDRv6:()=>ca,ZodCIDRv4:()=>ua,ZodBoolean:()=>Qr,ZodBigIntFormat:()=>pa,ZodBigInt:()=>es,ZodBase64URL:()=>fa,ZodBase64:()=>da,ZodArray:()=>Pc,ZodAny:()=>zc});var zy={};qt(zy,{uppercase:()=>Fo,trim:()=>Jo,toUpperCase:()=>Go,toLowerCase:()=>Yo,startsWith:()=>Wo,slugify:()=>Ko,size:()=>Br,regex:()=>Uo,property:()=>fc,positive:()=>lc,overwrite:()=>Yt,normalize:()=>qo,nonpositive:()=>cc,nonnegative:()=>dc,negative:()=>uc,multipleOf:()=>yi,minSize:()=>hn,minLength:()=>Rn,mime:()=>Bo,maxSize:()=>Di,maxLength:()=>qr,lte:()=>gt,lt:()=>dn,lowercase:()=>Lo,length:()=>Jr,includes:()=>Vo,gte:()=>Xe,gt:()=>fn,endsWith:()=>Ho});var pc={};qt(pc,{time:()=>Dy,duration:()=>Py,datetime:()=>Oy,date:()=>Ty,ZodISOTime:()=>bc,ZodISODuration:()=>yc,ZodISODateTime:()=>gc,ZodISODate:()=>vc});var gc=y("ZodISODateTime",(t,e)=>{qg.init(t,e),he.init(t,e)});function Oy(t){return sb(gc,t)}var vc=y("ZodISODate",(t,e)=>{Jg.init(t,e),he.init(t,e)});function Ty(t){return ob(vc,t)}var bc=y("ZodISOTime",(t,e)=>{Yg.init(t,e),he.init(t,e)});function Dy(t){return ab(bc,t)}var yc=y("ZodISODuration",(t,e)=>{Gg.init(t,e),he.init(t,e)});function Py(t){return lb(yc,t)}var Ey=(t,e)=>{bu.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:n=>_u(t,n)},flatten:{value:n=>yu(t,n)},addIssue:{value:n=>{t.issues.push(n),t.message=JSON.stringify(t.issues,to,2)}},addIssues:{value:n=>{t.issues.push(...n),t.message=JSON.stringify(t.issues,to,2)}},isEmpty:{get(){return t.issues.length===0}}})},lP=y("ZodError",Ey),ct=y("ZodError",Ey,{Parent:Error}),My=Zr(ct),Ny=jr(ct),Cy=Ur(ct),Ay=Lr(ct),Ry=ku(ct),Zy=$u(ct),jy=xu(ct),Uy=wu(ct),Ly=Su(ct),Fy=Iu(ct),Vy=zu(ct),Wy=Ou(ct),J=y("ZodType",(t,e)=>(H.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:fr(t,"input"),output:fr(t,"output")}}),t.toJSONSchema=Lb(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...n)=>t.clone(G.mergeDefs(e,{checks:[...e.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),t.with=t.check,t.clone=(n,r)=>kt(t,n,r),t.brand=()=>t,t.register=(n,r)=>(n.add(t,r),t),t.parse=(n,r)=>My(t,n,r,{callee:t.parse}),t.safeParse=(n,r)=>Cy(t,n,r),t.parseAsync=async(n,r)=>Ny(t,n,r,{callee:t.parseAsync}),t.safeParseAsync=async(n,r)=>Ay(t,n,r),t.spa=t.safeParseAsync,t.encode=(n,r)=>Ry(t,n,r),t.decode=(n,r)=>Zy(t,n,r),t.encodeAsync=async(n,r)=>jy(t,n,r),t.decodeAsync=async(n,r)=>Uy(t,n,r),t.safeEncode=(n,r)=>Ly(t,n,r),t.safeDecode=(n,r)=>Fy(t,n,r),t.safeEncodeAsync=async(n,r)=>Vy(t,n,r),t.safeDecodeAsync=async(n,r)=>Wy(t,n,r),t.refine=(n,r)=>t.check(ud(n,r)),t.superRefine=n=>t.check(cd(n)),t.overwrite=n=>t.check(Yt(n)),t.optional=()=>mr(t),t.exactOptional=()=>Hc(t),t.nullable=()=>pr(t),t.nullish=()=>mr(pr(t)),t.nonoptional=n=>Kc(t,n),t.array=()=>ts(t),t.or=n=>ba([t,n]),t.and=n=>Cc(t,n),t.transform=n=>gr(t,_a(n)),t.default=n=>Jc(t,n),t.prefault=n=>Gc(t,n),t.catch=n=>ed(t,n),t.pipe=n=>gr(t,n),t.readonly=()=>id(t),t.describe=n=>{let r=t.clone();return ht.add(r,{description:n}),r},Object.defineProperty(t,"description",{get(){var n;return(n=ht.get(t))==null?void 0:n.description},configurable:!0}),t.meta=(...n)=>{if(n.length===0)return ht.get(t);let r=t.clone();return ht.add(r,n[0]),r},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=n=>n(t),t)),Xo=y("_ZodString",(t,e)=>{Hr.init(t,e),J.init(t,e),t._zod.processJSONSchema=(r,i,s)=>Fb(t,r,i);let n=t._zod.bag;t.format=n.format??null,t.minLength=n.minimum??null,t.maxLength=n.maximum??null,t.regex=(...r)=>t.check(Uo(...r)),t.includes=(...r)=>t.check(Vo(...r)),t.startsWith=(...r)=>t.check(Wo(...r)),t.endsWith=(...r)=>t.check(Ho(...r)),t.min=(...r)=>t.check(Rn(...r)),t.max=(...r)=>t.check(qr(...r)),t.length=(...r)=>t.check(Jr(...r)),t.nonempty=(...r)=>t.check(Rn(1,...r)),t.lowercase=r=>t.check(Lo(r)),t.uppercase=r=>t.check(Fo(r)),t.trim=()=>t.check(Jo()),t.normalize=(...r)=>t.check(qo(...r)),t.toLowerCase=()=>t.check(Yo()),t.toUpperCase=()=>t.check(Go()),t.slugify=()=>t.check(Ko())}),Gr=y("ZodString",(t,e)=>{Hr.init(t,e),Xo.init(t,e),t.email=n=>t.check(Fu(Qo,n)),t.url=n=>t.check(jo(Kr,n)),t.jwt=n=>t.check(ac(ma,n)),t.emoji=n=>t.check(qu(ea,n)),t.guid=n=>t.check(so(hr,n)),t.uuid=n=>t.check(Vu(Mt,n)),t.uuidv4=n=>t.check(Wu(Mt,n)),t.uuidv6=n=>t.check(Hu(Mt,n)),t.uuidv7=n=>t.check(Bu(Mt,n)),t.nanoid=n=>t.check(Ju(ta,n)),t.guid=n=>t.check(so(hr,n)),t.cuid=n=>t.check(Yu(na,n)),t.cuid2=n=>t.check(Gu(ia,n)),t.ulid=n=>t.check(Ku(ra,n)),t.base64=n=>t.check(rc(da,n)),t.base64url=n=>t.check(sc(fa,n)),t.xid=n=>t.check(Xu(sa,n)),t.ksuid=n=>t.check(Qu(oa,n)),t.ipv4=n=>t.check(ec(aa,n)),t.ipv6=n=>t.check(tc(la,n)),t.cidrv4=n=>t.check(nc(ua,n)),t.cidrv6=n=>t.check(ic(ca,n)),t.e164=n=>t.check(oc(ha,n)),t.datetime=n=>t.check(Oy(n)),t.date=n=>t.check(Ty(n)),t.time=n=>t.check(Dy(n)),t.duration=n=>t.check(Py(n))});function oo(t){return tb(Gr,t)}var he=y("ZodStringFormat",(t,e)=>{fe.init(t,e),Xo.init(t,e)}),Qo=y("ZodEmail",(t,e)=>{Zg.init(t,e),he.init(t,e)});function Hy(t){return Fu(Qo,t)}var hr=y("ZodGUID",(t,e)=>{Ag.init(t,e),he.init(t,e)});function By(t){return so(hr,t)}var Mt=y("ZodUUID",(t,e)=>{Rg.init(t,e),he.init(t,e)});function qy(t){return Vu(Mt,t)}function Jy(t){return Wu(Mt,t)}function Yy(t){return Hu(Mt,t)}function Gy(t){return Bu(Mt,t)}var Kr=y("ZodURL",(t,e)=>{jg.init(t,e),he.init(t,e)});function Ky(t){return jo(Kr,t)}function Xy(t){return jo(Kr,{protocol:/^https?$/,hostname:Wn.domain,...G.normalizeParams(t)})}var ea=y("ZodEmoji",(t,e)=>{Ug.init(t,e),he.init(t,e)});function Qy(t){return qu(ea,t)}var ta=y("ZodNanoID",(t,e)=>{Lg.init(t,e),he.init(t,e)});function e_(t){return Ju(ta,t)}var na=y("ZodCUID",(t,e)=>{Fg.init(t,e),he.init(t,e)});function t_(t){return Yu(na,t)}var ia=y("ZodCUID2",(t,e)=>{Vg.init(t,e),he.init(t,e)});function n_(t){return Gu(ia,t)}var ra=y("ZodULID",(t,e)=>{Wg.init(t,e),he.init(t,e)});function i_(t){return Ku(ra,t)}var sa=y("ZodXID",(t,e)=>{Hg.init(t,e),he.init(t,e)});function r_(t){return Xu(sa,t)}var oa=y("ZodKSUID",(t,e)=>{Bg.init(t,e),he.init(t,e)});function s_(t){return Qu(oa,t)}var aa=y("ZodIPv4",(t,e)=>{Kg.init(t,e),he.init(t,e)});function o_(t){return ec(aa,t)}var _c=y("ZodMAC",(t,e)=>{Qg.init(t,e),he.init(t,e)});function a_(t){return ib(_c,t)}var la=y("ZodIPv6",(t,e)=>{Xg.init(t,e),he.init(t,e)});function l_(t){return tc(la,t)}var ua=y("ZodCIDRv4",(t,e)=>{ev.init(t,e),he.init(t,e)});function u_(t){return nc(ua,t)}var ca=y("ZodCIDRv6",(t,e)=>{tv.init(t,e),he.init(t,e)});function c_(t){return ic(ca,t)}var da=y("ZodBase64",(t,e)=>{nv.init(t,e),he.init(t,e)});function d_(t){return rc(da,t)}var fa=y("ZodBase64URL",(t,e)=>{rv.init(t,e),he.init(t,e)});function f_(t){return sc(fa,t)}var ha=y("ZodE164",(t,e)=>{sv.init(t,e),he.init(t,e)});function h_(t){return oc(ha,t)}var ma=y("ZodJWT",(t,e)=>{av.init(t,e),he.init(t,e)});function m_(t){return ac(ma,t)}var Pi=y("ZodCustomStringFormat",(t,e)=>{lv.init(t,e),he.init(t,e)});function p_(t,e,n={}){return Yr(Pi,t,e,n)}function g_(t){return Yr(Pi,"hostname",Wn.hostname,t)}function v_(t){return Yr(Pi,"hex",Wn.hex,t)}function b_(t,e){let n=(e==null?void 0:e.enc)??"hex",r=`${t}_${n}`,i=Wn[r];if(!i)throw Error(`Unrecognized hash format: ${r}`);return Yr(Pi,r,i,e)}var Xr=y("ZodNumber",(t,e)=>{Nu.init(t,e),J.init(t,e),t._zod.processJSONSchema=(r,i,s)=>Vb(t,r,i),t.gt=(r,i)=>t.check(fn(r,i)),t.gte=(r,i)=>t.check(Xe(r,i)),t.min=(r,i)=>t.check(Xe(r,i)),t.lt=(r,i)=>t.check(dn(r,i)),t.lte=(r,i)=>t.check(gt(r,i)),t.max=(r,i)=>t.check(gt(r,i)),t.int=r=>t.check(ao(r)),t.safe=r=>t.check(ao(r)),t.positive=r=>t.check(fn(0,r)),t.nonnegative=r=>t.check(Xe(0,r)),t.negative=r=>t.check(dn(0,r)),t.nonpositive=r=>t.check(gt(0,r)),t.multipleOf=(r,i)=>t.check(yi(r,i)),t.step=(r,i)=>t.check(yi(r,i)),t.finite=()=>t;let n=t._zod.bag;t.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),t.isFinite=!0,t.format=n.format??null});function kc(t){return ub(Xr,t)}var Hn=y("ZodNumberFormat",(t,e)=>{uv.init(t,e),Xr.init(t,e)});function ao(t){return db(Hn,t)}function y_(t){return fb(Hn,t)}function __(t){return hb(Hn,t)}function k_(t){return mb(Hn,t)}function $_(t){return pb(Hn,t)}var Qr=y("ZodBoolean",(t,e)=>{Cu.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>Wb(t,n,r)});function $c(t){return gb(Qr,t)}var es=y("ZodBigInt",(t,e)=>{Au.init(t,e),J.init(t,e),t._zod.processJSONSchema=(r,i,s)=>Hb(t,r),t.gte=(r,i)=>t.check(Xe(r,i)),t.min=(r,i)=>t.check(Xe(r,i)),t.gt=(r,i)=>t.check(fn(r,i)),t.gte=(r,i)=>t.check(Xe(r,i)),t.min=(r,i)=>t.check(Xe(r,i)),t.lt=(r,i)=>t.check(dn(r,i)),t.lte=(r,i)=>t.check(gt(r,i)),t.max=(r,i)=>t.check(gt(r,i)),t.positive=r=>t.check(fn(BigInt(0),r)),t.negative=r=>t.check(dn(BigInt(0),r)),t.nonpositive=r=>t.check(gt(BigInt(0),r)),t.nonnegative=r=>t.check(Xe(BigInt(0),r)),t.multipleOf=(r,i)=>t.check(yi(r,i));let n=t._zod.bag;t.minValue=n.minimum??null,t.maxValue=n.maximum??null,t.format=n.format??null});function x_(t){return bb(es,t)}var pa=y("ZodBigIntFormat",(t,e)=>{cv.init(t,e),es.init(t,e)});function w_(t){return _b(pa,t)}function S_(t){return kb(pa,t)}var xc=y("ZodSymbol",(t,e)=>{dv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>Bb(t,n)});function I_(t){return $b(xc,t)}var wc=y("ZodUndefined",(t,e)=>{fv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>Jb(t,n)});function z_(t){return xb(wc,t)}var Sc=y("ZodNull",(t,e)=>{hv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>qb(t,n,r)});function Ic(t){return wb(Sc,t)}var zc=y("ZodAny",(t,e)=>{mv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>Kb()});function O_(){return Sb(zc)}var Oc=y("ZodUnknown",(t,e)=>{pv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>Xb()});function Zn(){return Ib(Oc)}var Tc=y("ZodNever",(t,e)=>{gv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>Gb(t,n,r)});function ga(t){return zb(Tc,t)}var Dc=y("ZodVoid",(t,e)=>{vv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>Yb(t,n)});function T_(t){return Ob(Dc,t)}var va=y("ZodDate",(t,e)=>{bv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(r,i,s)=>Qb(t,r),t.min=(r,i)=>t.check(Xe(r,i)),t.max=(r,i)=>t.check(gt(r,i));let n=t._zod.bag;t.minDate=n.minimum?new Date(n.minimum):null,t.maxDate=n.maximum?new Date(n.maximum):null});function D_(t){return Tb(va,t)}var Pc=y("ZodArray",(t,e)=>{yv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>dy(t,n,r,i),t.element=e.element,t.min=(n,r)=>t.check(Rn(n,r)),t.nonempty=n=>t.check(Rn(1,n)),t.max=(n,r)=>t.check(qr(n,r)),t.length=(n,r)=>t.check(Jr(n,r)),t.unwrap=()=>t.element});function ts(t,e){return Eb(Pc,t,e)}function P_(t){let e=t._zod.def.shape;return ya(Object.keys(e))}var ns=y("ZodObject",(t,e)=>{xv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>fy(t,n,r,i),G.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>ya(Object.keys(t._zod.def.shape)),t.catchall=n=>t.clone({...t._zod.def,catchall:n}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Zn()}),t.loose=()=>t.clone({...t._zod.def,catchall:Zn()}),t.strict=()=>t.clone({...t._zod.def,catchall:ga()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=n=>G.extend(t,n),t.safeExtend=n=>G.safeExtend(t,n),t.merge=n=>G.merge(t,n),t.pick=n=>G.pick(t,n),t.omit=n=>G.omit(t,n),t.partial=(...n)=>G.partial(ka,t,n[0]),t.required=(...n)=>G.required($a,t,n[0])});function E_(t,e){let n={type:"object",shape:t??{},...G.normalizeParams(e)};return new ns(n)}function M_(t,e){return new ns({type:"object",shape:t,catchall:ga(),...G.normalizeParams(e)})}function N_(t,e){return new ns({type:"object",shape:t,catchall:Zn(),...G.normalizeParams(e)})}var is=y("ZodUnion",(t,e)=>{Zo.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>hc(t,n,r,i),t.options=e.options});function ba(t,e){return new is({type:"union",options:t,...G.normalizeParams(e)})}var Ec=y("ZodXor",(t,e)=>{is.init(t,e),wv.init(t,e),t._zod.processJSONSchema=(n,r,i)=>hc(t,n,r,i),t.options=e.options});function C_(t,e){return new Ec({type:"union",options:t,inclusive:!1,...G.normalizeParams(e)})}var Mc=y("ZodDiscriminatedUnion",(t,e)=>{is.init(t,e),Sv.init(t,e)});function A_(t,e,n){return new Mc({type:"union",options:e,discriminator:t,...G.normalizeParams(n)})}var Nc=y("ZodIntersection",(t,e)=>{Iv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>hy(t,n,r,i)});function Cc(t,e){return new Nc({type:"intersection",left:t,right:e})}var Ac=y("ZodTuple",(t,e)=>{Ru.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>my(t,n,r,i),t.rest=n=>t.clone({...t._zod.def,rest:n})});function Rc(t,e,n){let r=e instanceof H,i=r?n:e;return new Ac({type:"tuple",items:t,rest:r?e:null,...G.normalizeParams(i)})}var rs=y("ZodRecord",(t,e)=>{zv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>py(t,n,r,i),t.keyType=e.keyType,t.valueType=e.valueType});function Zc(t,e,n){return new rs({type:"record",keyType:t,valueType:e,...G.normalizeParams(n)})}function R_(t,e,n){let r=kt(t);return r._zod.values=void 0,new rs({type:"record",keyType:r,valueType:e,...G.normalizeParams(n)})}function Z_(t,e,n){return new rs({type:"record",keyType:t,valueType:e,mode:"loose",...G.normalizeParams(n)})}var jc=y("ZodMap",(t,e)=>{Ov.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>uy(t,n),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...n)=>t.check(hn(...n)),t.nonempty=n=>t.check(hn(1,n)),t.max=(...n)=>t.check(Di(...n)),t.size=(...n)=>t.check(Br(...n))});function j_(t,e,n){return new jc({type:"map",keyType:t,valueType:e,...G.normalizeParams(n)})}var Uc=y("ZodSet",(t,e)=>{Tv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>cy(t,n),t.min=(...n)=>t.check(hn(...n)),t.nonempty=n=>t.check(hn(1,n)),t.max=(...n)=>t.check(Di(...n)),t.size=(...n)=>t.check(Br(...n))});function U_(t,e){return new Uc({type:"set",valueType:t,...G.normalizeParams(e)})}var xi=y("ZodEnum",(t,e)=>{Dv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(r,i,s)=>ey(t,r,i),t.enum=e.entries,t.options=Object.values(e.entries);let n=new Set(Object.keys(e.entries));t.extract=(r,i)=>{let s={};for(let o of r)if(n.has(o))s[o]=e.entries[o];else throw Error(`Key ${o} not found in enum`);return new xi({...e,checks:[],...G.normalizeParams(i),entries:s})},t.exclude=(r,i)=>{let s={...e.entries};for(let o of r)if(n.has(o))delete s[o];else throw Error(`Key ${o} not found in enum`);return new xi({...e,checks:[],...G.normalizeParams(i),entries:s})}});function ya(t,e){let n=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new xi({type:"enum",entries:n,...G.normalizeParams(e)})}function L_(t,e){return new xi({type:"enum",entries:t,...G.normalizeParams(e)})}var Lc=y("ZodLiteral",(t,e)=>{Pv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>ty(t,n,r),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function F_(t,e){return new Lc({type:"literal",values:Array.isArray(t)?t:[t],...G.normalizeParams(e)})}var Fc=y("ZodFile",(t,e)=>{Ev.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>ry(t,n,r),t.min=(n,r)=>t.check(hn(n,r)),t.max=(n,r)=>t.check(Di(n,r)),t.mime=(n,r)=>t.check(Bo(Array.isArray(n)?n:[n],r))});function V_(t){return Mb(Fc,t)}var Vc=y("ZodTransform",(t,e)=>{Mv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>ly(t,n),t._zod.parse=(n,r)=>{if(r.direction==="backward")throw new No(t.constructor.name);n.addIssue=s=>{if(typeof s=="string")n.issues.push(G.issue(s,n.value,e));else{let o=s;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=n.value),o.inst??(o.inst=t),n.issues.push(G.issue(o))}};let i=e.transform(n.value,n);return i instanceof Promise?i.then(s=>(n.value=s,n)):(n.value=i,n)}});function _a(t){return new Vc({type:"transform",transform:t})}var ka=y("ZodOptional",(t,e)=>{Zu.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>mc(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function mr(t){return new ka({type:"optional",innerType:t})}var Wc=y("ZodExactOptional",(t,e)=>{Nv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>mc(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function Hc(t){return new Wc({type:"optional",innerType:t})}var Bc=y("ZodNullable",(t,e)=>{Cv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>gy(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function pr(t){return new Bc({type:"nullable",innerType:t})}function W_(t){return mr(pr(t))}var qc=y("ZodDefault",(t,e)=>{Av.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>by(t,n,r,i),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function Jc(t,e){return new qc({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():G.shallowClone(e)}})}var Yc=y("ZodPrefault",(t,e)=>{Rv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>yy(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function Gc(t,e){return new Yc({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():G.shallowClone(e)}})}var $a=y("ZodNonOptional",(t,e)=>{Zv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>vy(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function Kc(t,e){return new $a({type:"nonoptional",innerType:t,...G.normalizeParams(e)})}var Xc=y("ZodSuccess",(t,e)=>{jv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>sy(t,n,r),t.unwrap=()=>t._zod.def.innerType});function H_(t){return new Xc({type:"success",innerType:t})}var Qc=y("ZodCatch",(t,e)=>{Uv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>_y(t,n,r,i),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function ed(t,e){return new Qc({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var td=y("ZodNaN",(t,e)=>{Lv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>ny(t,n)});function B_(t){return Pb(td,t)}var xa=y("ZodPipe",(t,e)=>{Fv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>ky(t,n,r,i),t.in=e.in,t.out=e.out});function gr(t,e){return new xa({type:"pipe",in:t,out:e})}var wa=y("ZodCodec",(t,e)=>{xa.init(t,e),ju.init(t,e)});function q_(t,e,n){return new wa({type:"pipe",in:t,out:e,transform:n.decode,reverseTransform:n.encode})}var nd=y("ZodReadonly",(t,e)=>{Vv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>$y(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function id(t){return new nd({type:"readonly",innerType:t})}var rd=y("ZodTemplateLiteral",(t,e)=>{Wv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>iy(t,n,r)});function J_(t,e){return new rd({type:"template_literal",parts:t,...G.normalizeParams(e)})}var sd=y("ZodLazy",(t,e)=>{qv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>wy(t,n,r,i),t.unwrap=()=>t._zod.def.getter()});function od(t){return new sd({type:"lazy",getter:t})}var ad=y("ZodPromise",(t,e)=>{Bv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>xy(t,n,r,i),t.unwrap=()=>t._zod.def.innerType});function Y_(t){return new ad({type:"promise",innerType:t})}var ld=y("ZodFunction",(t,e)=>{Hv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>ay(t,n)});function lo(t){return new ld({type:"function",input:Array.isArray(t==null?void 0:t.input)?Rc(t==null?void 0:t.input):(t==null?void 0:t.input)??ts(Zn()),output:(t==null?void 0:t.output)??Zn()})}var ss=y("ZodCustom",(t,e)=>{Jv.init(t,e),J.init(t,e),t._zod.processJSONSchema=(n,r,i)=>oy(t,n)});function G_(t){let e=new ke({check:"custom"});return e._zod.check=t,e}function K_(t,e){return Nb(ss,t??(()=>!0),e)}function ud(t,e={}){return Cb(ss,t,e)}function cd(t){return Ab(t)}var X_=Zb,Q_=jb;function ek(t,e={}){let n=new ss({type:"custom",check:"custom",fn:r=>r instanceof t,abort:!0,...G.normalizeParams(e)});return n._zod.bag.Class=t,n._zod.check=r=>{r.value instanceof t||r.issues.push({code:"invalid_type",expected:t.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}var tk=(...t)=>Ub({Codec:wa,Boolean:Qr,String:Gr},...t);function nk(t){let e=od(()=>ba([oo(t),kc(),$c(),Ic(),ts(e),Zc(oo(),e)]));return e}function ik(t,e){return gr(_a(t),e)}var uP={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function cP(t){Be({customError:t})}function dP(){return Be().customError}var bl;bl||(bl={});var M={...Iy,...zy,iso:pc},fP=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function hP(t,e){let n=t.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function mP(t,e){if(!t.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let n=t.slice(1).split("/").filter(Boolean);if(n.length===0)return e.rootSchema;let r=e.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let i=n[1];if(!i||!e.defs[i])throw Error(`Reference not found: ${t}`);return e.defs[i]}throw Error(`Reference not found: ${t}`)}function rk(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return M.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let i=t.$ref;if(e.refs.has(i))return e.refs.get(i);if(e.processing.has(i))return M.lazy(()=>{if(!e.refs.has(i))throw Error(`Circular reference not resolved: ${i}`);return e.refs.get(i)});e.processing.add(i);let s=mP(i,e),o=Le(s,e);return e.refs.set(i,o),e.processing.delete(i),o}if(t.enum!==void 0){let i=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&i.length===1&&i[0]===null)return M.null();if(i.length===0)return M.never();if(i.length===1)return M.literal(i[0]);if(i.every(o=>typeof o=="string"))return M.enum(i);let s=i.map(o=>M.literal(o));return s.length<2?s[0]:M.union([s[0],s[1],...s.slice(2)])}if(t.const!==void 0)return M.literal(t.const);let n=t.type;if(Array.isArray(n)){let i=n.map(s=>{let o={...t,type:s};return rk(o,e)});return i.length===0?M.never():i.length===1?i[0]:M.union(i)}if(!n)return M.any();let r;switch(n){case"string":{let i=M.string();if(t.format){let s=t.format;s==="email"?i=i.check(M.email()):s==="uri"||s==="uri-reference"?i=i.check(M.url()):s==="uuid"||s==="guid"?i=i.check(M.uuid()):s==="date-time"?i=i.check(M.iso.datetime()):s==="date"?i=i.check(M.iso.date()):s==="time"?i=i.check(M.iso.time()):s==="duration"?i=i.check(M.iso.duration()):s==="ipv4"?i=i.check(M.ipv4()):s==="ipv6"?i=i.check(M.ipv6()):s==="mac"?i=i.check(M.mac()):s==="cidr"?i=i.check(M.cidrv4()):s==="cidr-v6"?i=i.check(M.cidrv6()):s==="base64"?i=i.check(M.base64()):s==="base64url"?i=i.check(M.base64url()):s==="e164"?i=i.check(M.e164()):s==="jwt"?i=i.check(M.jwt()):s==="emoji"?i=i.check(M.emoji()):s==="nanoid"?i=i.check(M.nanoid()):s==="cuid"?i=i.check(M.cuid()):s==="cuid2"?i=i.check(M.cuid2()):s==="ulid"?i=i.check(M.ulid()):s==="xid"?i=i.check(M.xid()):s==="ksuid"&&(i=i.check(M.ksuid()))}typeof t.minLength=="number"&&(i=i.min(t.minLength)),typeof t.maxLength=="number"&&(i=i.max(t.maxLength)),t.pattern&&(i=i.regex(new RegExp(t.pattern))),r=i;break}case"number":case"integer":{let i=n==="integer"?M.number().int():M.number();typeof t.minimum=="number"&&(i=i.min(t.minimum)),typeof t.maximum=="number"&&(i=i.max(t.maximum)),typeof t.exclusiveMinimum=="number"?i=i.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(i=i.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?i=i.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(i=i.lt(t.maximum)),typeof t.multipleOf=="number"&&(i=i.multipleOf(t.multipleOf)),r=i;break}case"boolean":{r=M.boolean();break}case"null":{r=M.null();break}case"object":{let i={},s=t.properties||{},o=new Set(t.required||[]);for(let[l,u]of Object.entries(s)){let c=Le(u,e);i[l]=o.has(l)?c:c.optional()}if(t.propertyNames){let l=Le(t.propertyNames,e),u=t.additionalProperties&&typeof t.additionalProperties=="object"?Le(t.additionalProperties,e):M.any();if(Object.keys(i).length===0){r=M.record(l,u);break}let c=M.object(i).passthrough(),d=M.looseRecord(l,u);r=M.intersection(c,d);break}if(t.patternProperties){let l=t.patternProperties,u=Object.keys(l),c=[];for(let f of u){let h=Le(l[f],e),m=M.string().regex(new RegExp(f));c.push(M.looseRecord(m,h))}let d=[];if(Object.keys(i).length>0&&d.push(M.object(i).passthrough()),d.push(...c),d.length===0)r=M.object({}).passthrough();else if(d.length===1)r=d[0];else{let f=M.intersection(d[0],d[1]);for(let h=2;h<d.length;h++)f=M.intersection(f,d[h]);r=f}break}let a=M.object(i);t.additionalProperties===!1?r=a.strict():typeof t.additionalProperties=="object"?r=a.catchall(Le(t.additionalProperties,e)):r=a.passthrough();break}case"array":{let{prefixItems:i,items:s}=t;if(i&&Array.isArray(i)){let o=i.map(l=>Le(l,e)),a=s&&typeof s=="object"&&!Array.isArray(s)?Le(s,e):void 0;a?r=M.tuple(o).rest(a):r=M.tuple(o),typeof t.minItems=="number"&&(r=r.check(M.minLength(t.minItems))),typeof t.maxItems=="number"&&(r=r.check(M.maxLength(t.maxItems)))}else if(Array.isArray(s)){let o=s.map(l=>Le(l,e)),a=t.additionalItems&&typeof t.additionalItems=="object"?Le(t.additionalItems,e):void 0;a?r=M.tuple(o).rest(a):r=M.tuple(o),typeof t.minItems=="number"&&(r=r.check(M.minLength(t.minItems))),typeof t.maxItems=="number"&&(r=r.check(M.maxLength(t.maxItems)))}else if(s!==void 0){let o=Le(s,e),a=M.array(o);typeof t.minItems=="number"&&(a=a.min(t.minItems)),typeof t.maxItems=="number"&&(a=a.max(t.maxItems)),r=a}else r=M.array(M.any());break}default:throw Error(`Unsupported type: ${n}`)}return t.description&&(r=r.describe(t.description)),t.default!==void 0&&(r=r.default(t.default)),r}function Le(t,e){if(typeof t=="boolean")return t?M.any():M.never();let n=rk(t,e),r=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let a=t.anyOf.map(u=>Le(u,e)),l=M.union(a);n=r?M.intersection(n,l):l}if(t.oneOf&&Array.isArray(t.oneOf)){let a=t.oneOf.map(u=>Le(u,e)),l=M.xor(a);n=r?M.intersection(n,l):l}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)n=r?n:M.any();else{let a=r?n:Le(t.allOf[0],e),l=r?0:1;for(let u=l;u<t.allOf.length;u++)a=M.intersection(a,Le(t.allOf[u],e));n=a}t.nullable===!0&&e.version==="openapi-3.0"&&(n=M.nullable(n)),t.readOnly===!0&&(n=M.readonly(n));let i={},s=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let a of s)a in t&&(i[a]=t[a]);let o=["contentEncoding","contentMediaType","contentSchema"];for(let a of o)a in t&&(i[a]=t[a]);for(let a of Object.keys(t))fP.has(a)||(i[a]=t[a]);return Object.keys(i).length>0&&e.registry.add(n,i),n}function pP(t,e){if(typeof t=="boolean")return t?M.any():M.never();let n=hP(t,e==null?void 0:e.defaultTarget),r=t.$defs||t.definitions||{},i={version:n,defs:r,refs:new Map,processing:new Set,rootSchema:t,registry:(e==null?void 0:e.registry)??ht};return Le(t,i)}var sk={};qt(sk,{string:()=>gP,number:()=>vP,date:()=>_P,boolean:()=>bP,bigint:()=>yP});function gP(t){return nb(Gr,t)}function vP(t){return cb(Xr,t)}function bP(t){return vb(Qr,t)}function yP(t){return yb(es,t)}function _P(t){return Db(va,t)}Be(Yv());var kP=v.union([v.literal("light"),v.literal("dark")]).describe("Color theme preference for the host environment."),vr=v.union([v.literal("inline"),v.literal("fullscreen"),v.literal("pip")]).describe("Display mode for UI presentation."),$P=v.union([v.literal("--color-background-primary"),v.literal("--color-background-secondary"),v.literal("--color-background-tertiary"),v.literal("--color-background-inverse"),v.literal("--color-background-ghost"),v.literal("--color-background-info"),v.literal("--color-background-danger"),v.literal("--color-background-success"),v.literal("--color-background-warning"),v.literal("--color-background-disabled"),v.literal("--color-text-primary"),v.literal("--color-text-secondary"),v.literal("--color-text-tertiary"),v.literal("--color-text-inverse"),v.literal("--color-text-ghost"),v.literal("--color-text-info"),v.literal("--color-text-danger"),v.literal("--color-text-success"),v.literal("--color-text-warning"),v.literal("--color-text-disabled"),v.literal("--color-text-ghost"),v.literal("--color-border-primary"),v.literal("--color-border-secondary"),v.literal("--color-border-tertiary"),v.literal("--color-border-inverse"),v.literal("--color-border-ghost"),v.literal("--color-border-info"),v.literal("--color-border-danger"),v.literal("--color-border-success"),v.literal("--color-border-warning"),v.literal("--color-border-disabled"),v.literal("--color-ring-primary"),v.literal("--color-ring-secondary"),v.literal("--color-ring-inverse"),v.literal("--color-ring-info"),v.literal("--color-ring-danger"),v.literal("--color-ring-success"),v.literal("--color-ring-warning"),v.literal("--font-sans"),v.literal("--font-mono"),v.literal("--font-weight-normal"),v.literal("--font-weight-medium"),v.literal("--font-weight-semibold"),v.literal("--font-weight-bold"),v.literal("--font-text-xs-size"),v.literal("--font-text-sm-size"),v.literal("--font-text-md-size"),v.literal("--font-text-lg-size"),v.literal("--font-heading-xs-size"),v.literal("--font-heading-sm-size"),v.literal("--font-heading-md-size"),v.literal("--font-heading-lg-size"),v.literal("--font-heading-xl-size"),v.literal("--font-heading-2xl-size"),v.literal("--font-heading-3xl-size"),v.literal("--font-text-xs-line-height"),v.literal("--font-text-sm-line-height"),v.literal("--font-text-md-line-height"),v.literal("--font-text-lg-line-height"),v.literal("--font-heading-xs-line-height"),v.literal("--font-heading-sm-line-height"),v.literal("--font-heading-md-line-height"),v.literal("--font-heading-lg-line-height"),v.literal("--font-heading-xl-line-height"),v.literal("--font-heading-2xl-line-height"),v.literal("--font-heading-3xl-line-height"),v.literal("--border-radius-xs"),v.literal("--border-radius-sm"),v.literal("--border-radius-md"),v.literal("--border-radius-lg"),v.literal("--border-radius-xl"),v.literal("--border-radius-full"),v.literal("--border-width-regular"),v.literal("--shadow-hairline"),v.literal("--shadow-sm"),v.literal("--shadow-md"),v.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),xP=v.record($P.describe(`Style variables for theming MCP apps.
|
|
84
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let u of t.seen.entries()){let c=u[1];if(e===u[0]){r(u);continue}if(t.external){let d=(a=t.external.registry.get(u[0]))==null?void 0:a.id;if(e!==u[0]&&d){r(u);continue}}if((l=t.metadataRegistry.get(u[0]))!=null&&l.id){r(u);continue}if(c.cycle){r(u);continue}if(c.count>1&&t.reused==="ref"){r(u);continue}}}function Ei(t,e){var s,o,a;let A=t.seen.get(e);if(!A)throw Error("Unprocessed schema. This is a bug in Zod.");let i=l=>{let u=t.seen.get(l);if(u.ref===null)return;let c=u.def??u.schema,d={...c},f=u.ref;if(u.ref=null,f){i(f);let g=t.seen.get(f),m=g.schema;if(m.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(c.allOf=c.allOf??[],c.allOf.push(m)):Object.assign(c,m),Object.assign(c,d),l._zod.parent===f)for(let p in c)p==="$ref"||p==="allOf"||p in d||delete c[p];if(m.$ref)for(let p in c)p==="$ref"||p==="allOf"||p in g.def&&JSON.stringify(c[p])===JSON.stringify(g.def[p])&&delete c[p]}let h=l._zod.parent;if(h&&h!==f){i(h);let g=t.seen.get(h);if(g!=null&&g.schema.$ref&&(c.$ref=g.schema.$ref,g.def))for(let m in c)m==="$ref"||m==="allOf"||m in g.def&&JSON.stringify(c[m])===JSON.stringify(g.def[m])&&delete c[m]}t.override({zodSchema:l,jsonSchema:c,path:u.path??[]})};for(let l of[...t.seen.entries()].reverse())i(l[0]);let n={};if(t.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":t.target,(s=t.external)!=null&&s.uri){let l=(o=t.external.registry.get(e))==null?void 0:o.id;if(!l)throw Error("Schema is missing an `id` property");n.$id=t.external.uri(l)}Object.assign(n,A.def??A.schema);let r=((a=t.external)==null?void 0:a.defs)??{};for(let l of t.seen.entries()){let u=l[1];u.def&&u.defId&&(r[u.defId]=u.def)}t.external||Object.keys(r).length>0&&(t.target==="draft-2020-12"?n.$defs=r:n.definitions=r);try{let l=JSON.parse(JSON.stringify(n));return Object.defineProperty(l,"~standard",{value:{...e["~standard"],jsonSchema:{input:Lr(e,"input",t.processors),output:Lr(e,"output",t.processors)}},enumerable:!1,writable:!1}),l}catch{throw Error("Error converting schema to JSON.")}}function mt(t,e){let A=e??{seen:new Set};if(A.seen.has(t))return!1;A.seen.add(t);let i=t._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return mt(i.element,A);if(i.type==="set")return mt(i.valueType,A);if(i.type==="lazy")return mt(i.getter(),A);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return mt(i.innerType,A);if(i.type==="intersection")return mt(i.left,A)||mt(i.right,A);if(i.type==="record"||i.type==="map")return mt(i.keyType,A)||mt(i.valueType,A);if(i.type==="pipe")return mt(i.in,A)||mt(i.out,A);if(i.type==="object"){for(let n in i.shape)if(mt(i.shape[n],A))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(mt(n,A))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(mt(n,A))return!0;return!!(i.rest&&mt(i.rest,A))}return!1}var u0=(t,e={})=>A=>{let i=Si({...A,processors:e});return Be(t,i),ki(i,t),Ei(i,t)},Lr=(t,e,A={})=>i=>{let{libraryOptions:n,target:r}=i??{},s=Si({...n??{},target:r,io:e,processors:A});return Be(t,s),ki(s,t),Ei(s,t)},EO={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},c0=(t,e,A,i)=>{let n=A;n.type="string";let{minimum:r,maximum:s,format:o,patterns:a,contentEncoding:l}=t._zod.bag;if(typeof r=="number"&&(n.minLength=r),typeof s=="number"&&(n.maxLength=s),o&&(n.format=EO[o]??o,n.format===""&&delete n.format,o==="time"&&delete n.format),l&&(n.contentEncoding=l),a&&a.size>0){let u=[...a];u.length===1?n.pattern=u[0].source:u.length>1&&(n.allOf=[...u.map(c=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:c.source}))])}},d0=(t,e,A,i)=>{let n=A,{minimum:r,maximum:s,format:o,multipleOf:a,exclusiveMaximum:l,exclusiveMinimum:u}=t._zod.bag;typeof o=="string"&&o.includes("int")?n.type="integer":n.type="number",typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.minimum=u,n.exclusiveMinimum=!0):n.exclusiveMinimum=u),typeof r=="number"&&(n.minimum=r,typeof u=="number"&&e.target!=="draft-04"&&(u>=r?delete n.minimum:delete n.exclusiveMinimum)),typeof l=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(n.maximum=l,n.exclusiveMaximum=!0):n.exclusiveMaximum=l),typeof s=="number"&&(n.maximum=s,typeof l=="number"&&e.target!=="draft-04"&&(l<=s?delete n.maximum:delete n.exclusiveMaximum)),typeof a=="number"&&(n.multipleOf=a)},f0=(t,e,A,i)=>{A.type="boolean"},h0=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},g0=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},m0=(t,e,A,i)=>{e.target==="openapi-3.0"?(A.type="string",A.nullable=!0,A.enum=[null]):A.type="null"},p0=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},v0=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},B0=(t,e,A,i)=>{A.not={}},w0=(t,e,A,i)=>{},y0=(t,e,A,i)=>{},b0=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},_0=(t,e,A,i)=>{let n=t._zod.def,r=kd(n.entries);r.every(s=>typeof s=="number")&&(A.type="number"),r.every(s=>typeof s=="string")&&(A.type="string"),A.enum=r},C0=(t,e,A,i)=>{let n=t._zod.def,r=[];for(let s of n.values)if(s===void 0){if(e.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof s=="bigint"){if(e.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");r.push(Number(s))}else r.push(s);if(r.length!==0)if(r.length===1){let s=r[0];A.type=s===null?"null":typeof s,e.target==="draft-04"||e.target==="openapi-3.0"?A.enum=[s]:A.const=s}else r.every(s=>typeof s=="number")&&(A.type="number"),r.every(s=>typeof s=="string")&&(A.type="string"),r.every(s=>typeof s=="boolean")&&(A.type="boolean"),r.every(s=>s===null)&&(A.type="null"),A.enum=r},U0=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},Q0=(t,e,A,i)=>{let n=A,r=t._zod.pattern;if(!r)throw Error("Pattern not found in template literal");n.type="string",n.pattern=r.source},x0=(t,e,A,i)=>{let n=A,r={type:"string",format:"binary",contentEncoding:"binary"},{minimum:s,maximum:o,mime:a}=t._zod.bag;s!==void 0&&(r.minLength=s),o!==void 0&&(r.maxLength=o),a?a.length===1?(r.contentMediaType=a[0],Object.assign(n,r)):(Object.assign(n,r),n.anyOf=a.map(l=>({contentMediaType:l}))):Object.assign(n,r)},F0=(t,e,A,i)=>{A.type="boolean"},I0=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},S0=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},k0=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},E0=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},$0=(t,e,A,i)=>{if(e.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},T0=(t,e,A,i)=>{let n=A,r=t._zod.def,{minimum:s,maximum:o}=t._zod.bag;typeof s=="number"&&(n.minItems=s),typeof o=="number"&&(n.maxItems=o),n.type="array",n.items=Be(r.element,e,{...i,path:[...i.path,"items"]})},O0=(t,e,A,i)=>{var l;let n=A,r=t._zod.def;n.type="object",n.properties={};let s=r.shape;for(let u in s)n.properties[u]=Be(s[u],e,{...i,path:[...i.path,"properties",u]});let o=new Set(Object.keys(s)),a=new Set([...o].filter(u=>{let c=r.shape[u]._zod;return e.io==="input"?c.optin===void 0:c.optout===void 0}));a.size>0&&(n.required=Array.from(a)),((l=r.catchall)==null?void 0:l._zod.def.type)==="never"?n.additionalProperties=!1:r.catchall?r.catchall&&(n.additionalProperties=Be(r.catchall,e,{...i,path:[...i.path,"additionalProperties"]})):e.io==="output"&&(n.additionalProperties=!1)},If=(t,e,A,i)=>{let n=t._zod.def,r=n.inclusive===!1,s=n.options.map((o,a)=>Be(o,e,{...i,path:[...i.path,r?"oneOf":"anyOf",a]}));r?A.oneOf=s:A.anyOf=s},H0=(t,e,A,i)=>{let n=t._zod.def,r=Be(n.left,e,{...i,path:[...i.path,"allOf",0]}),s=Be(n.right,e,{...i,path:[...i.path,"allOf",1]}),o=l=>"allOf"in l&&Object.keys(l).length===1,a=[...o(r)?r.allOf:[r],...o(s)?s.allOf:[s]];A.allOf=a},D0=(t,e,A,i)=>{let n=A,r=t._zod.def;n.type="array";let s=e.target==="draft-2020-12"?"prefixItems":"items",o=e.target==="draft-2020-12"||e.target==="openapi-3.0"?"items":"additionalItems",a=r.items.map((d,f)=>Be(d,e,{...i,path:[...i.path,s,f]})),l=r.rest?Be(r.rest,e,{...i,path:[...i.path,o,...e.target==="openapi-3.0"?[r.items.length]:[]]}):null;e.target==="draft-2020-12"?(n.prefixItems=a,l&&(n.items=l)):e.target==="openapi-3.0"?(n.items={anyOf:a},l&&n.items.anyOf.push(l),n.minItems=a.length,!l&&(n.maxItems=a.length)):(n.items=a,l&&(n.additionalItems=l));let{minimum:u,maximum:c}=t._zod.bag;typeof u=="number"&&(n.minItems=u),typeof c=="number"&&(n.maxItems=c)},L0=(t,e,A,i)=>{var l;let n=A,r=t._zod.def;n.type="object";let s=r.keyType,o=(l=s._zod.bag)==null?void 0:l.patterns;if(r.mode==="loose"&&o&&o.size>0){let u=Be(r.valueType,e,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let c of o)n.patternProperties[c.source]=u}else(e.target==="draft-07"||e.target==="draft-2020-12")&&(n.propertyNames=Be(r.keyType,e,{...i,path:[...i.path,"propertyNames"]})),n.additionalProperties=Be(r.valueType,e,{...i,path:[...i.path,"additionalProperties"]});let a=s._zod.values;if(a){let u=[...a].filter(c=>typeof c=="string"||typeof c=="number");u.length>0&&(n.required=u)}},M0=(t,e,A,i)=>{let n=t._zod.def,r=Be(n.innerType,e,i),s=e.seen.get(t);e.target==="openapi-3.0"?(s.ref=n.innerType,A.nullable=!0):A.anyOf=[r,{type:"null"}]},N0=(t,e,A,i)=>{let n=t._zod.def;Be(n.innerType,e,i);let r=e.seen.get(t);r.ref=n.innerType},z0=(t,e,A,i)=>{let n=t._zod.def;Be(n.innerType,e,i);let r=e.seen.get(t);r.ref=n.innerType,A.default=JSON.parse(JSON.stringify(n.defaultValue))},P0=(t,e,A,i)=>{let n=t._zod.def;Be(n.innerType,e,i);let r=e.seen.get(t);r.ref=n.innerType,e.io==="input"&&(A._prefault=JSON.parse(JSON.stringify(n.defaultValue)))},R0=(t,e,A,i)=>{let n=t._zod.def;Be(n.innerType,e,i);let r=e.seen.get(t);r.ref=n.innerType;let s;try{s=n.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}A.default=s},K0=(t,e,A,i)=>{let n=t._zod.def,r=e.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;Be(r,e,i);let s=e.seen.get(t);s.ref=r},Z0=(t,e,A,i)=>{let n=t._zod.def;Be(n.innerType,e,i);let r=e.seen.get(t);r.ref=n.innerType,A.readOnly=!0},V0=(t,e,A,i)=>{let n=t._zod.def;Be(n.innerType,e,i);let r=e.seen.get(t);r.ref=n.innerType},Sf=(t,e,A,i)=>{let n=t._zod.def;Be(n.innerType,e,i);let r=e.seen.get(t);r.ref=n.innerType},j0=(t,e,A,i)=>{let n=t._zod.innerType;Be(n,e,i);let r=e.seen.get(t);r.ref=n},ac={string:c0,number:d0,boolean:f0,bigint:h0,symbol:g0,null:m0,undefined:p0,void:v0,never:B0,any:w0,unknown:y0,date:b0,enum:_0,literal:C0,nan:U0,template_literal:Q0,file:x0,success:F0,custom:I0,function:S0,transform:k0,map:E0,set:$0,array:T0,object:O0,union:If,intersection:H0,tuple:D0,record:L0,nullable:M0,nonoptional:N0,default:z0,prefault:P0,catch:R0,pipe:K0,readonly:Z0,promise:V0,optional:Sf,lazy:j0};function G0(t,e){if("_idmap"in t){let i=t,n=Si({...e,processors:ac}),r={};for(let a of i._idmap.entries()){let[l,u]=a;Be(u,n)}let s={},o={registry:i,uri:e==null?void 0:e.uri,defs:r};n.external=o;for(let a of i._idmap.entries()){let[l,u]=a;ki(n,u),s[l]=Ei(n,u)}if(Object.keys(r).length>0){let a=n.target==="draft-2020-12"?"$defs":"definitions";s.__shared={[a]:r}}return{schemas:s}}let A=Si({...e,processors:ac});return Be(t,A),ki(A,t),Ei(A,t)}class $O{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let A=(e==null?void 0:e.target)??"draft-2020-12";A==="draft-4"&&(A="draft-04"),A==="draft-7"&&(A="draft-07"),this.ctx=Si({processors:ac,target:A,...(e==null?void 0:e.metadata)&&{metadata:e.metadata},...(e==null?void 0:e.unrepresentable)&&{unrepresentable:e.unrepresentable},...(e==null?void 0:e.override)&&{override:e.override},...(e==null?void 0:e.io)&&{io:e.io}})}process(e,A={path:[],schemaPath:[]}){return Be(e,this.ctx,A)}emit(e,A){A&&(A.cycles&&(this.ctx.cycles=A.cycles),A.reused&&(this.ctx.reused=A.reused),A.external&&(this.ctx.external=A.external)),ki(this.ctx,e);let i=Ei(this.ctx,e),{"~standard":n,...r}=i;return r}}var TO={},W0={};OA(W0,{xor:()=>iC,xid:()=>x_,void:()=>Y_,uuidv7:()=>B_,uuidv6:()=>v_,uuidv4:()=>p_,uuid:()=>m_,url:()=>w_,unknown:()=>Mn,union:()=>El,undefined:()=>J_,ulid:()=>Q_,uint64:()=>G_,uint32:()=>Z_,tuple:()=>qf,transform:()=>Tl,templateLiteral:()=>pC,symbol:()=>W_,superRefine:()=>Qh,success:()=>hC,stringbool:()=>CC,stringFormat:()=>L_,string:()=>da,strictObject:()=>AC,set:()=>lC,refine:()=>Uh,record:()=>eh,readonly:()=>Bh,promise:()=>vC,preprocess:()=>QC,prefault:()=>dh,pipe:()=>Pr,partialRecord:()=>sC,optional:()=>Nr,object:()=>tC,number:()=>Df,nullish:()=>fC,nullable:()=>zr,null:()=>Pf,nonoptional:()=>fh,never:()=>Sl,nativeEnum:()=>uC,nanoid:()=>__,nan:()=>gC,meta:()=>bC,map:()=>aC,mac:()=>S_,looseRecord:()=>oC,looseObject:()=>nC,literal:()=>cC,lazy:()=>bh,ksuid:()=>F_,keyof:()=>eC,jwt:()=>D_,json:()=>UC,ipv6:()=>k_,ipv4:()=>I_,intersection:()=>Xf,int64:()=>j_,int32:()=>K_,int:()=>fa,instanceof:()=>_C,httpUrl:()=>y_,hostname:()=>M_,hex:()=>N_,hash:()=>z_,guid:()=>g_,function:()=>ha,float64:()=>R_,float32:()=>P_,file:()=>dC,exactOptional:()=>oh,enum:()=>$l,emoji:()=>b_,email:()=>h_,e164:()=>H_,discriminatedUnion:()=>rC,describe:()=>yC,date:()=>q_,custom:()=>wC,cuid2:()=>U_,cuid:()=>C_,codec:()=>mC,cidrv6:()=>$_,cidrv4:()=>E_,check:()=>BC,catch:()=>mh,boolean:()=>Lf,bigint:()=>V_,base64url:()=>O_,base64:()=>T_,array:()=>Ss,any:()=>X_,_function:()=>ha,_default:()=>uh,_ZodString:()=>dl,ZodXor:()=>Gf,ZodXID:()=>Bl,ZodVoid:()=>Vf,ZodUnknown:()=>Kf,ZodUnion:()=>Es,ZodUndefined:()=>Nf,ZodUUID:()=>fA,ZodURL:()=>Qs,ZodULID:()=>vl,ZodType:()=>q,ZodTuple:()=>Yf,ZodTransform:()=>rh,ZodTemplateLiteral:()=>wh,ZodSymbol:()=>Mf,ZodSuccess:()=>hh,ZodStringFormat:()=>_e,ZodString:()=>Us,ZodSet:()=>Ah,ZodRecord:()=>$s,ZodReadonly:()=>vh,ZodPromise:()=>_h,ZodPrefault:()=>ch,ZodPipe:()=>Dl,ZodOptional:()=>Ol,ZodObject:()=>ks,ZodNumberFormat:()=>jn,ZodNumber:()=>xs,ZodNullable:()=>ah,ZodNull:()=>zf,ZodNonOptional:()=>Hl,ZodNever:()=>Zf,ZodNanoID:()=>gl,ZodNaN:()=>ph,ZodMap:()=>th,ZodMAC:()=>Hf,ZodLiteral:()=>nh,ZodLazy:()=>yh,ZodKSUID:()=>wl,ZodJWT:()=>Fl,ZodIntersection:()=>Jf,ZodIPv6:()=>bl,ZodIPv4:()=>yl,ZodGUID:()=>Mr,ZodFunction:()=>Ch,ZodFile:()=>ih,ZodExactOptional:()=>sh,ZodEnum:()=>$i,ZodEmoji:()=>hl,ZodEmail:()=>fl,ZodE164:()=>xl,ZodDiscriminatedUnion:()=>Wf,ZodDefault:()=>lh,ZodDate:()=>kl,ZodCustomStringFormat:()=>Pi,ZodCustom:()=>Ts,ZodCodec:()=>Ll,ZodCatch:()=>gh,ZodCUID2:()=>pl,ZodCUID:()=>ml,ZodCIDRv6:()=>Cl,ZodCIDRv4:()=>_l,ZodBoolean:()=>Fs,ZodBigIntFormat:()=>Il,ZodBigInt:()=>Is,ZodBase64URL:()=>Ql,ZodBase64:()=>Ul,ZodArray:()=>jf,ZodAny:()=>Rf});var J0={};OA(J0,{uppercase:()=>Al,trim:()=>al,toUpperCase:()=>ul,toLowerCase:()=>ll,startsWith:()=>il,slugify:()=>cl,size:()=>ys,regex:()=>el,property:()=>Ff,positive:()=>Cf,overwrite:()=>DA,normalize:()=>ol,nonpositive:()=>Qf,nonnegative:()=>xf,negative:()=>Uf,multipleOf:()=>Ii,minSize:()=>un,minLength:()=>Ln,mime:()=>sl,maxSize:()=>zi,maxLength:()=>bs,lte:()=>Gt,lt:()=>an,lowercase:()=>tl,length:()=>_s,includes:()=>nl,gte:()=>Ct,gt:()=>ln,endsWith:()=>rl});var kf={};OA(kf,{time:()=>q0,duration:()=>e_,datetime:()=>X0,date:()=>Y0,ZodISOTime:()=>Tf,ZodISODuration:()=>Of,ZodISODateTime:()=>Ef,ZodISODate:()=>$f});var Ef=C("ZodISODateTime",(t,e)=>{my.init(t,e),_e.init(t,e)});function X0(t){return Fb(Ef,t)}var $f=C("ZodISODate",(t,e)=>{py.init(t,e),_e.init(t,e)});function Y0(t){return Ib($f,t)}var Tf=C("ZodISOTime",(t,e)=>{vy.init(t,e),_e.init(t,e)});function q0(t){return Sb(Tf,t)}var Of=C("ZodISODuration",(t,e)=>{By.init(t,e),_e.init(t,e)});function e_(t){return kb(Of,t)}var t_=(t,e)=>{$d.init(t,e),t.name="ZodError",Object.defineProperties(t,{format:{value:A=>Od(t,A)},flatten:{value:A=>Td(t,A)},addIssue:{value:A=>{t.issues.push(A),t.message=JSON.stringify(t.issues,oa,2)}},addIssues:{value:A=>{t.issues.push(...A),t.message=JSON.stringify(t.issues,oa,2)}},isEmpty:{get(){return t.issues.length===0}}})},OO=C("ZodError",t_),Dt=C("ZodError",t_,{Parent:Error}),A_=fs(Dt),n_=hs(Dt),i_=gs(Dt),r_=ms(Dt),s_=Hd(Dt),o_=Dd(Dt),a_=Ld(Dt),l_=Md(Dt),u_=Nd(Dt),c_=zd(Dt),d_=Pd(Dt),f_=Rd(Dt),q=C("ZodType",(t,e)=>(X.init(t,e),Object.assign(t["~standard"],{jsonSchema:{input:Lr(t,"input"),output:Lr(t,"output")}}),t.toJSONSchema=u0(t,{}),t.def=e,t.type=e.type,Object.defineProperty(t,"_def",{value:e}),t.check=(...A)=>t.clone(Ae.mergeDefs(e,{checks:[...e.checks??[],...A.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0}),t.with=t.check,t.clone=(A,i)=>qt(t,A,i),t.brand=()=>t,t.register=(A,i)=>(A.add(t,i),t),t.parse=(A,i)=>A_(t,A,i,{callee:t.parse}),t.safeParse=(A,i)=>i_(t,A,i),t.parseAsync=async(A,i)=>n_(t,A,i,{callee:t.parseAsync}),t.safeParseAsync=async(A,i)=>r_(t,A,i),t.spa=t.safeParseAsync,t.encode=(A,i)=>s_(t,A,i),t.decode=(A,i)=>o_(t,A,i),t.encodeAsync=async(A,i)=>a_(t,A,i),t.decodeAsync=async(A,i)=>l_(t,A,i),t.safeEncode=(A,i)=>u_(t,A,i),t.safeDecode=(A,i)=>c_(t,A,i),t.safeEncodeAsync=async(A,i)=>d_(t,A,i),t.safeDecodeAsync=async(A,i)=>f_(t,A,i),t.refine=(A,i)=>t.check(Uh(A,i)),t.superRefine=A=>t.check(Qh(A)),t.overwrite=A=>t.check(DA(A)),t.optional=()=>Nr(t),t.exactOptional=()=>oh(t),t.nullable=()=>zr(t),t.nullish=()=>Nr(zr(t)),t.nonoptional=A=>fh(t,A),t.array=()=>Ss(t),t.or=A=>El([t,A]),t.and=A=>Xf(t,A),t.transform=A=>Pr(t,Tl(A)),t.default=A=>uh(t,A),t.prefault=A=>dh(t,A),t.catch=A=>mh(t,A),t.pipe=A=>Pr(t,A),t.readonly=()=>Bh(t),t.describe=A=>{let i=t.clone();return Rt.add(i,{description:A}),i},Object.defineProperty(t,"description",{get(){var A;return(A=Rt.get(t))==null?void 0:A.description},configurable:!0}),t.meta=(...A)=>{if(A.length===0)return Rt.get(t);let i=t.clone();return Rt.add(i,A[0]),i},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=A=>A(t),t)),dl=C("_ZodString",(t,e)=>{ws.init(t,e),q.init(t,e),t._zod.processJSONSchema=(i,n,r)=>c0(t,i,n);let A=t._zod.bag;t.format=A.format??null,t.minLength=A.minimum??null,t.maxLength=A.maximum??null,t.regex=(...i)=>t.check(el(...i)),t.includes=(...i)=>t.check(nl(...i)),t.startsWith=(...i)=>t.check(il(...i)),t.endsWith=(...i)=>t.check(rl(...i)),t.min=(...i)=>t.check(Ln(...i)),t.max=(...i)=>t.check(bs(...i)),t.length=(...i)=>t.check(_s(...i)),t.nonempty=(...i)=>t.check(Ln(1,...i)),t.lowercase=i=>t.check(tl(i)),t.uppercase=i=>t.check(Al(i)),t.trim=()=>t.check(al()),t.normalize=(...i)=>t.check(ol(...i)),t.toLowerCase=()=>t.check(ll()),t.toUpperCase=()=>t.check(ul()),t.slugify=()=>t.check(cl())}),Us=C("ZodString",(t,e)=>{ws.init(t,e),dl.init(t,e),t.email=A=>t.check(nf(fl,A)),t.url=A=>t.check(qa(Qs,A)),t.jwt=A=>t.check(_f(Fl,A)),t.emoji=A=>t.check(lf(hl,A)),t.guid=A=>t.check(ca(Mr,A)),t.uuid=A=>t.check(rf(fA,A)),t.uuidv4=A=>t.check(sf(fA,A)),t.uuidv6=A=>t.check(of(fA,A)),t.uuidv7=A=>t.check(af(fA,A)),t.nanoid=A=>t.check(uf(gl,A)),t.guid=A=>t.check(ca(Mr,A)),t.cuid=A=>t.check(cf(ml,A)),t.cuid2=A=>t.check(df(pl,A)),t.ulid=A=>t.check(ff(vl,A)),t.base64=A=>t.check(wf(Ul,A)),t.base64url=A=>t.check(yf(Ql,A)),t.xid=A=>t.check(hf(Bl,A)),t.ksuid=A=>t.check(gf(wl,A)),t.ipv4=A=>t.check(mf(yl,A)),t.ipv6=A=>t.check(pf(bl,A)),t.cidrv4=A=>t.check(vf(_l,A)),t.cidrv6=A=>t.check(Bf(Cl,A)),t.e164=A=>t.check(bf(xl,A)),t.datetime=A=>t.check(X0(A)),t.date=A=>t.check(Y0(A)),t.time=A=>t.check(q0(A)),t.duration=A=>t.check(e_(A))});function da(t){return Cb(Us,t)}var _e=C("ZodStringFormat",(t,e)=>{be.init(t,e),dl.init(t,e)}),fl=C("ZodEmail",(t,e)=>{oy.init(t,e),_e.init(t,e)});function h_(t){return nf(fl,t)}var Mr=C("ZodGUID",(t,e)=>{ry.init(t,e),_e.init(t,e)});function g_(t){return ca(Mr,t)}var fA=C("ZodUUID",(t,e)=>{sy.init(t,e),_e.init(t,e)});function m_(t){return rf(fA,t)}function p_(t){return sf(fA,t)}function v_(t){return of(fA,t)}function B_(t){return af(fA,t)}var Qs=C("ZodURL",(t,e)=>{ay.init(t,e),_e.init(t,e)});function w_(t){return qa(Qs,t)}function y_(t){return qa(Qs,{protocol:/^https?$/,hostname:Vn.domain,...Ae.normalizeParams(t)})}var hl=C("ZodEmoji",(t,e)=>{ly.init(t,e),_e.init(t,e)});function b_(t){return lf(hl,t)}var gl=C("ZodNanoID",(t,e)=>{uy.init(t,e),_e.init(t,e)});function __(t){return uf(gl,t)}var ml=C("ZodCUID",(t,e)=>{cy.init(t,e),_e.init(t,e)});function C_(t){return cf(ml,t)}var pl=C("ZodCUID2",(t,e)=>{dy.init(t,e),_e.init(t,e)});function U_(t){return df(pl,t)}var vl=C("ZodULID",(t,e)=>{fy.init(t,e),_e.init(t,e)});function Q_(t){return ff(vl,t)}var Bl=C("ZodXID",(t,e)=>{hy.init(t,e),_e.init(t,e)});function x_(t){return hf(Bl,t)}var wl=C("ZodKSUID",(t,e)=>{gy.init(t,e),_e.init(t,e)});function F_(t){return gf(wl,t)}var yl=C("ZodIPv4",(t,e)=>{wy.init(t,e),_e.init(t,e)});function I_(t){return mf(yl,t)}var Hf=C("ZodMAC",(t,e)=>{by.init(t,e),_e.init(t,e)});function S_(t){return Qb(Hf,t)}var bl=C("ZodIPv6",(t,e)=>{yy.init(t,e),_e.init(t,e)});function k_(t){return pf(bl,t)}var _l=C("ZodCIDRv4",(t,e)=>{_y.init(t,e),_e.init(t,e)});function E_(t){return vf(_l,t)}var Cl=C("ZodCIDRv6",(t,e)=>{Cy.init(t,e),_e.init(t,e)});function $_(t){return Bf(Cl,t)}var Ul=C("ZodBase64",(t,e)=>{Uy.init(t,e),_e.init(t,e)});function T_(t){return wf(Ul,t)}var Ql=C("ZodBase64URL",(t,e)=>{xy.init(t,e),_e.init(t,e)});function O_(t){return yf(Ql,t)}var xl=C("ZodE164",(t,e)=>{Fy.init(t,e),_e.init(t,e)});function H_(t){return bf(xl,t)}var Fl=C("ZodJWT",(t,e)=>{Sy.init(t,e),_e.init(t,e)});function D_(t){return _f(Fl,t)}var Pi=C("ZodCustomStringFormat",(t,e)=>{ky.init(t,e),_e.init(t,e)});function L_(t,e,A={}){return Cs(Pi,t,e,A)}function M_(t){return Cs(Pi,"hostname",Vn.hostname,t)}function N_(t){return Cs(Pi,"hex",Vn.hex,t)}function z_(t,e){let A=(e==null?void 0:e.enc)??"hex",i=`${t}_${A}`,n=Vn[i];if(!n)throw Error(`Unrecognized hash format: ${i}`);return Cs(Pi,i,n,e)}var xs=C("ZodNumber",(t,e)=>{Wd.init(t,e),q.init(t,e),t._zod.processJSONSchema=(i,n,r)=>d0(t,i,n),t.gt=(i,n)=>t.check(ln(i,n)),t.gte=(i,n)=>t.check(Ct(i,n)),t.min=(i,n)=>t.check(Ct(i,n)),t.lt=(i,n)=>t.check(an(i,n)),t.lte=(i,n)=>t.check(Gt(i,n)),t.max=(i,n)=>t.check(Gt(i,n)),t.int=i=>t.check(fa(i)),t.safe=i=>t.check(fa(i)),t.positive=i=>t.check(ln(0,i)),t.nonnegative=i=>t.check(Ct(0,i)),t.negative=i=>t.check(an(0,i)),t.nonpositive=i=>t.check(Gt(0,i)),t.multipleOf=(i,n)=>t.check(Ii(i,n)),t.step=(i,n)=>t.check(Ii(i,n)),t.finite=()=>t;let A=t._zod.bag;t.minValue=Math.max(A.minimum??Number.NEGATIVE_INFINITY,A.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(A.maximum??Number.POSITIVE_INFINITY,A.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(A.format??"").includes("int")||Number.isSafeInteger(A.multipleOf??.5),t.isFinite=!0,t.format=A.format??null});function Df(t){return Eb(xs,t)}var jn=C("ZodNumberFormat",(t,e)=>{Ey.init(t,e),xs.init(t,e)});function fa(t){return Tb(jn,t)}function P_(t){return Ob(jn,t)}function R_(t){return Hb(jn,t)}function K_(t){return Db(jn,t)}function Z_(t){return Lb(jn,t)}var Fs=C("ZodBoolean",(t,e)=>{Jd.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>f0(t,A,i)});function Lf(t){return Mb(Fs,t)}var Is=C("ZodBigInt",(t,e)=>{Xd.init(t,e),q.init(t,e),t._zod.processJSONSchema=(i,n,r)=>h0(t,i),t.gte=(i,n)=>t.check(Ct(i,n)),t.min=(i,n)=>t.check(Ct(i,n)),t.gt=(i,n)=>t.check(ln(i,n)),t.gte=(i,n)=>t.check(Ct(i,n)),t.min=(i,n)=>t.check(Ct(i,n)),t.lt=(i,n)=>t.check(an(i,n)),t.lte=(i,n)=>t.check(Gt(i,n)),t.max=(i,n)=>t.check(Gt(i,n)),t.positive=i=>t.check(ln(BigInt(0),i)),t.negative=i=>t.check(an(BigInt(0),i)),t.nonpositive=i=>t.check(Gt(BigInt(0),i)),t.nonnegative=i=>t.check(Ct(BigInt(0),i)),t.multipleOf=(i,n)=>t.check(Ii(i,n));let A=t._zod.bag;t.minValue=A.minimum??null,t.maxValue=A.maximum??null,t.format=A.format??null});function V_(t){return zb(Is,t)}var Il=C("ZodBigIntFormat",(t,e)=>{$y.init(t,e),Is.init(t,e)});function j_(t){return Rb(Il,t)}function G_(t){return Kb(Il,t)}var Mf=C("ZodSymbol",(t,e)=>{Ty.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>g0(t,A)});function W_(t){return Zb(Mf,t)}var Nf=C("ZodUndefined",(t,e)=>{Oy.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>p0(t,A)});function J_(t){return Vb(Nf,t)}var zf=C("ZodNull",(t,e)=>{Hy.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>m0(t,A,i)});function Pf(t){return jb(zf,t)}var Rf=C("ZodAny",(t,e)=>{Dy.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>w0()});function X_(){return Gb(Rf)}var Kf=C("ZodUnknown",(t,e)=>{Ly.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>y0()});function Mn(){return Wb(Kf)}var Zf=C("ZodNever",(t,e)=>{My.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>B0(t,A,i)});function Sl(t){return Jb(Zf,t)}var Vf=C("ZodVoid",(t,e)=>{Ny.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>v0(t,A)});function Y_(t){return Xb(Vf,t)}var kl=C("ZodDate",(t,e)=>{zy.init(t,e),q.init(t,e),t._zod.processJSONSchema=(i,n,r)=>b0(t,i),t.min=(i,n)=>t.check(Ct(i,n)),t.max=(i,n)=>t.check(Gt(i,n));let A=t._zod.bag;t.minDate=A.minimum?new Date(A.minimum):null,t.maxDate=A.maximum?new Date(A.maximum):null});function q_(t){return Yb(kl,t)}var jf=C("ZodArray",(t,e)=>{Py.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>T0(t,A,i,n),t.element=e.element,t.min=(A,i)=>t.check(Ln(A,i)),t.nonempty=A=>t.check(Ln(1,A)),t.max=(A,i)=>t.check(bs(A,i)),t.length=(A,i)=>t.check(_s(A,i)),t.unwrap=()=>t.element});function Ss(t,e){return t0(jf,t,e)}function eC(t){let e=t._zod.def.shape;return $l(Object.keys(e))}var ks=C("ZodObject",(t,e)=>{Vy.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>O0(t,A,i,n),Ae.defineLazy(t,"shape",()=>e.shape),t.keyof=()=>$l(Object.keys(t._zod.def.shape)),t.catchall=A=>t.clone({...t._zod.def,catchall:A}),t.passthrough=()=>t.clone({...t._zod.def,catchall:Mn()}),t.loose=()=>t.clone({...t._zod.def,catchall:Mn()}),t.strict=()=>t.clone({...t._zod.def,catchall:Sl()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=A=>Ae.extend(t,A),t.safeExtend=A=>Ae.safeExtend(t,A),t.merge=A=>Ae.merge(t,A),t.pick=A=>Ae.pick(t,A),t.omit=A=>Ae.omit(t,A),t.partial=(...A)=>Ae.partial(Ol,t,A[0]),t.required=(...A)=>Ae.required(Hl,t,A[0])});function tC(t,e){let A={type:"object",shape:t??{},...Ae.normalizeParams(e)};return new ks(A)}function AC(t,e){return new ks({type:"object",shape:t,catchall:Sl(),...Ae.normalizeParams(e)})}function nC(t,e){return new ks({type:"object",shape:t,catchall:Mn(),...Ae.normalizeParams(e)})}var Es=C("ZodUnion",(t,e)=>{Ya.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>If(t,A,i,n),t.options=e.options});function El(t,e){return new Es({type:"union",options:t,...Ae.normalizeParams(e)})}var Gf=C("ZodXor",(t,e)=>{Es.init(t,e),jy.init(t,e),t._zod.processJSONSchema=(A,i,n)=>If(t,A,i,n),t.options=e.options});function iC(t,e){return new Gf({type:"union",options:t,inclusive:!1,...Ae.normalizeParams(e)})}var Wf=C("ZodDiscriminatedUnion",(t,e)=>{Es.init(t,e),Gy.init(t,e)});function rC(t,e,A){return new Wf({type:"union",options:e,discriminator:t,...Ae.normalizeParams(A)})}var Jf=C("ZodIntersection",(t,e)=>{Wy.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>H0(t,A,i,n)});function Xf(t,e){return new Jf({type:"intersection",left:t,right:e})}var Yf=C("ZodTuple",(t,e)=>{Yd.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>D0(t,A,i,n),t.rest=A=>t.clone({...t._zod.def,rest:A})});function qf(t,e,A){let i=e instanceof X,n=i?A:e;return new Yf({type:"tuple",items:t,rest:i?e:null,...Ae.normalizeParams(n)})}var $s=C("ZodRecord",(t,e)=>{Jy.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>L0(t,A,i,n),t.keyType=e.keyType,t.valueType=e.valueType});function eh(t,e,A){return new $s({type:"record",keyType:t,valueType:e,...Ae.normalizeParams(A)})}function sC(t,e,A){let i=qt(t);return i._zod.values=void 0,new $s({type:"record",keyType:i,valueType:e,...Ae.normalizeParams(A)})}function oC(t,e,A){return new $s({type:"record",keyType:t,valueType:e,mode:"loose",...Ae.normalizeParams(A)})}var th=C("ZodMap",(t,e)=>{Xy.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>E0(t,A),t.keyType=e.keyType,t.valueType=e.valueType,t.min=(...A)=>t.check(un(...A)),t.nonempty=A=>t.check(un(1,A)),t.max=(...A)=>t.check(zi(...A)),t.size=(...A)=>t.check(ys(...A))});function aC(t,e,A){return new th({type:"map",keyType:t,valueType:e,...Ae.normalizeParams(A)})}var Ah=C("ZodSet",(t,e)=>{Yy.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>$0(t,A),t.min=(...A)=>t.check(un(...A)),t.nonempty=A=>t.check(un(1,A)),t.max=(...A)=>t.check(zi(...A)),t.size=(...A)=>t.check(ys(...A))});function lC(t,e){return new Ah({type:"set",valueType:t,...Ae.normalizeParams(e)})}var $i=C("ZodEnum",(t,e)=>{qy.init(t,e),q.init(t,e),t._zod.processJSONSchema=(i,n,r)=>_0(t,i,n),t.enum=e.entries,t.options=Object.values(e.entries);let A=new Set(Object.keys(e.entries));t.extract=(i,n)=>{let r={};for(let s of i)if(A.has(s))r[s]=e.entries[s];else throw Error(`Key ${s} not found in enum`);return new $i({...e,checks:[],...Ae.normalizeParams(n),entries:r})},t.exclude=(i,n)=>{let r={...e.entries};for(let s of i)if(A.has(s))delete r[s];else throw Error(`Key ${s} not found in enum`);return new $i({...e,checks:[],...Ae.normalizeParams(n),entries:r})}});function $l(t,e){let A=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new $i({type:"enum",entries:A,...Ae.normalizeParams(e)})}function uC(t,e){return new $i({type:"enum",entries:t,...Ae.normalizeParams(e)})}var nh=C("ZodLiteral",(t,e)=>{eb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>C0(t,A,i),t.values=new Set(e.values),Object.defineProperty(t,"value",{get(){if(e.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return e.values[0]}})});function cC(t,e){return new nh({type:"literal",values:Array.isArray(t)?t:[t],...Ae.normalizeParams(e)})}var ih=C("ZodFile",(t,e)=>{tb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>x0(t,A,i),t.min=(A,i)=>t.check(un(A,i)),t.max=(A,i)=>t.check(zi(A,i)),t.mime=(A,i)=>t.check(sl(Array.isArray(A)?A:[A],i))});function dC(t){return A0(ih,t)}var rh=C("ZodTransform",(t,e)=>{Ab.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>k0(t,A),t._zod.parse=(A,i)=>{if(i.direction==="backward")throw new Ga(t.constructor.name);A.addIssue=r=>{if(typeof r=="string")A.issues.push(Ae.issue(r,A.value,e));else{let s=r;s.fatal&&(s.continue=!1),s.code??(s.code="custom"),s.input??(s.input=A.value),s.inst??(s.inst=t),A.issues.push(Ae.issue(s))}};let n=e.transform(A.value,A);return n instanceof Promise?n.then(r=>(A.value=r,A)):(A.value=n,A)}});function Tl(t){return new rh({type:"transform",transform:t})}var Ol=C("ZodOptional",(t,e)=>{qd.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>Sf(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function Nr(t){return new Ol({type:"optional",innerType:t})}var sh=C("ZodExactOptional",(t,e)=>{nb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>Sf(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function oh(t){return new sh({type:"optional",innerType:t})}var ah=C("ZodNullable",(t,e)=>{ib.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>M0(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function zr(t){return new ah({type:"nullable",innerType:t})}function fC(t){return Nr(zr(t))}var lh=C("ZodDefault",(t,e)=>{rb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>z0(t,A,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function uh(t,e){return new lh({type:"default",innerType:t,get defaultValue(){return typeof e=="function"?e():Ae.shallowClone(e)}})}var ch=C("ZodPrefault",(t,e)=>{sb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>P0(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function dh(t,e){return new ch({type:"prefault",innerType:t,get defaultValue(){return typeof e=="function"?e():Ae.shallowClone(e)}})}var Hl=C("ZodNonOptional",(t,e)=>{ob.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>N0(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function fh(t,e){return new Hl({type:"nonoptional",innerType:t,...Ae.normalizeParams(e)})}var hh=C("ZodSuccess",(t,e)=>{ab.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>F0(t,A,i),t.unwrap=()=>t._zod.def.innerType});function hC(t){return new hh({type:"success",innerType:t})}var gh=C("ZodCatch",(t,e)=>{lb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>R0(t,A,i,n),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function mh(t,e){return new gh({type:"catch",innerType:t,catchValue:typeof e=="function"?e:()=>e})}var ph=C("ZodNaN",(t,e)=>{ub.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>U0(t,A)});function gC(t){return e0(ph,t)}var Dl=C("ZodPipe",(t,e)=>{cb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>K0(t,A,i,n),t.in=e.in,t.out=e.out});function Pr(t,e){return new Dl({type:"pipe",in:t,out:e})}var Ll=C("ZodCodec",(t,e)=>{Dl.init(t,e),ef.init(t,e)});function mC(t,e,A){return new Ll({type:"pipe",in:t,out:e,transform:A.decode,reverseTransform:A.encode})}var vh=C("ZodReadonly",(t,e)=>{db.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>Z0(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function Bh(t){return new vh({type:"readonly",innerType:t})}var wh=C("ZodTemplateLiteral",(t,e)=>{fb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>Q0(t,A,i)});function pC(t,e){return new wh({type:"template_literal",parts:t,...Ae.normalizeParams(e)})}var yh=C("ZodLazy",(t,e)=>{mb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>j0(t,A,i,n),t.unwrap=()=>t._zod.def.getter()});function bh(t){return new yh({type:"lazy",getter:t})}var _h=C("ZodPromise",(t,e)=>{gb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>V0(t,A,i,n),t.unwrap=()=>t._zod.def.innerType});function vC(t){return new _h({type:"promise",innerType:t})}var Ch=C("ZodFunction",(t,e)=>{hb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>S0(t,A)});function ha(t){return new Ch({type:"function",input:Array.isArray(t==null?void 0:t.input)?qf(t==null?void 0:t.input):(t==null?void 0:t.input)??Ss(Mn()),output:(t==null?void 0:t.output)??Mn()})}var Ts=C("ZodCustom",(t,e)=>{pb.init(t,e),q.init(t,e),t._zod.processJSONSchema=(A,i,n)=>I0(t,A)});function BC(t){let e=new ke({check:"custom"});return e._zod.check=t,e}function wC(t,e){return n0(Ts,t??(()=>!0),e)}function Uh(t,e={}){return i0(Ts,t,e)}function Qh(t){return r0(t)}var yC=o0,bC=a0;function _C(t,e={}){let A=new Ts({type:"custom",check:"custom",fn:i=>i instanceof t,abort:!0,...Ae.normalizeParams(e)});return A._zod.bag.Class=t,A._zod.check=i=>{i.value instanceof t||i.issues.push({code:"invalid_type",expected:t.name,input:i.value,inst:A,path:[...A._zod.def.path??[]]})},A}var CC=(...t)=>l0({Codec:Ll,Boolean:Fs,String:Us},...t);function UC(t){let e=bh(()=>El([da(t),Df(),Lf(),Pf(),Ss(e),eh(da(),e)]));return e}function QC(t,e){return Pr(Tl(t),e)}var HO={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function DO(t){lt({customError:t})}function LO(){return lt().customError}var lc;lc||(lc={});var T={...W0,...J0,iso:kf},MO=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function NO(t,e){let A=t.$schema;return A==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":A==="http://json-schema.org/draft-07/schema#"?"draft-7":A==="http://json-schema.org/draft-04/schema#"?"draft-4":e??"draft-2020-12"}function zO(t,e){if(!t.startsWith("#"))throw Error("External $ref is not supported, only local refs (#/...) are allowed");let A=t.slice(1).split("/").filter(Boolean);if(A.length===0)return e.rootSchema;let i=e.version==="draft-2020-12"?"$defs":"definitions";if(A[0]===i){let n=A[1];if(!n||!e.defs[n])throw Error(`Reference not found: ${t}`);return e.defs[n]}throw Error(`Reference not found: ${t}`)}function xC(t,e){if(t.not!==void 0){if(typeof t.not=="object"&&Object.keys(t.not).length===0)return T.never();throw Error("not is not supported in Zod (except { not: {} } for never)")}if(t.unevaluatedItems!==void 0)throw Error("unevaluatedItems is not supported");if(t.unevaluatedProperties!==void 0)throw Error("unevaluatedProperties is not supported");if(t.if!==void 0||t.then!==void 0||t.else!==void 0)throw Error("Conditional schemas (if/then/else) are not supported");if(t.dependentSchemas!==void 0||t.dependentRequired!==void 0)throw Error("dependentSchemas and dependentRequired are not supported");if(t.$ref){let n=t.$ref;if(e.refs.has(n))return e.refs.get(n);if(e.processing.has(n))return T.lazy(()=>{if(!e.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return e.refs.get(n)});e.processing.add(n);let r=zO(n,e),s=it(r,e);return e.refs.set(n,s),e.processing.delete(n),s}if(t.enum!==void 0){let n=t.enum;if(e.version==="openapi-3.0"&&t.nullable===!0&&n.length===1&&n[0]===null)return T.null();if(n.length===0)return T.never();if(n.length===1)return T.literal(n[0]);if(n.every(s=>typeof s=="string"))return T.enum(n);let r=n.map(s=>T.literal(s));return r.length<2?r[0]:T.union([r[0],r[1],...r.slice(2)])}if(t.const!==void 0)return T.literal(t.const);let A=t.type;if(Array.isArray(A)){let n=A.map(r=>{let s={...t,type:r};return xC(s,e)});return n.length===0?T.never():n.length===1?n[0]:T.union(n)}if(!A)return T.any();let i;switch(A){case"string":{let n=T.string();if(t.format){let r=t.format;r==="email"?n=n.check(T.email()):r==="uri"||r==="uri-reference"?n=n.check(T.url()):r==="uuid"||r==="guid"?n=n.check(T.uuid()):r==="date-time"?n=n.check(T.iso.datetime()):r==="date"?n=n.check(T.iso.date()):r==="time"?n=n.check(T.iso.time()):r==="duration"?n=n.check(T.iso.duration()):r==="ipv4"?n=n.check(T.ipv4()):r==="ipv6"?n=n.check(T.ipv6()):r==="mac"?n=n.check(T.mac()):r==="cidr"?n=n.check(T.cidrv4()):r==="cidr-v6"?n=n.check(T.cidrv6()):r==="base64"?n=n.check(T.base64()):r==="base64url"?n=n.check(T.base64url()):r==="e164"?n=n.check(T.e164()):r==="jwt"?n=n.check(T.jwt()):r==="emoji"?n=n.check(T.emoji()):r==="nanoid"?n=n.check(T.nanoid()):r==="cuid"?n=n.check(T.cuid()):r==="cuid2"?n=n.check(T.cuid2()):r==="ulid"?n=n.check(T.ulid()):r==="xid"?n=n.check(T.xid()):r==="ksuid"&&(n=n.check(T.ksuid()))}typeof t.minLength=="number"&&(n=n.min(t.minLength)),typeof t.maxLength=="number"&&(n=n.max(t.maxLength)),t.pattern&&(n=n.regex(new RegExp(t.pattern))),i=n;break}case"number":case"integer":{let n=A==="integer"?T.number().int():T.number();typeof t.minimum=="number"&&(n=n.min(t.minimum)),typeof t.maximum=="number"&&(n=n.max(t.maximum)),typeof t.exclusiveMinimum=="number"?n=n.gt(t.exclusiveMinimum):t.exclusiveMinimum===!0&&typeof t.minimum=="number"&&(n=n.gt(t.minimum)),typeof t.exclusiveMaximum=="number"?n=n.lt(t.exclusiveMaximum):t.exclusiveMaximum===!0&&typeof t.maximum=="number"&&(n=n.lt(t.maximum)),typeof t.multipleOf=="number"&&(n=n.multipleOf(t.multipleOf)),i=n;break}case"boolean":{i=T.boolean();break}case"null":{i=T.null();break}case"object":{let n={},r=t.properties||{},s=new Set(t.required||[]);for(let[a,l]of Object.entries(r)){let u=it(l,e);n[a]=s.has(a)?u:u.optional()}if(t.propertyNames){let a=it(t.propertyNames,e),l=t.additionalProperties&&typeof t.additionalProperties=="object"?it(t.additionalProperties,e):T.any();if(Object.keys(n).length===0){i=T.record(a,l);break}let u=T.object(n).passthrough(),c=T.looseRecord(a,l);i=T.intersection(u,c);break}if(t.patternProperties){let a=t.patternProperties,l=Object.keys(a),u=[];for(let d of l){let f=it(a[d],e),h=T.string().regex(new RegExp(d));u.push(T.looseRecord(h,f))}let c=[];if(Object.keys(n).length>0&&c.push(T.object(n).passthrough()),c.push(...u),c.length===0)i=T.object({}).passthrough();else if(c.length===1)i=c[0];else{let d=T.intersection(c[0],c[1]);for(let f=2;f<c.length;f++)d=T.intersection(d,c[f]);i=d}break}let o=T.object(n);t.additionalProperties===!1?i=o.strict():typeof t.additionalProperties=="object"?i=o.catchall(it(t.additionalProperties,e)):i=o.passthrough();break}case"array":{let{prefixItems:n,items:r}=t;if(n&&Array.isArray(n)){let s=n.map(a=>it(a,e)),o=r&&typeof r=="object"&&!Array.isArray(r)?it(r,e):void 0;o?i=T.tuple(s).rest(o):i=T.tuple(s),typeof t.minItems=="number"&&(i=i.check(T.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(T.maxLength(t.maxItems)))}else if(Array.isArray(r)){let s=r.map(a=>it(a,e)),o=t.additionalItems&&typeof t.additionalItems=="object"?it(t.additionalItems,e):void 0;o?i=T.tuple(s).rest(o):i=T.tuple(s),typeof t.minItems=="number"&&(i=i.check(T.minLength(t.minItems))),typeof t.maxItems=="number"&&(i=i.check(T.maxLength(t.maxItems)))}else if(r!==void 0){let s=it(r,e),o=T.array(s);typeof t.minItems=="number"&&(o=o.min(t.minItems)),typeof t.maxItems=="number"&&(o=o.max(t.maxItems)),i=o}else i=T.array(T.any());break}default:throw Error(`Unsupported type: ${A}`)}return t.description&&(i=i.describe(t.description)),t.default!==void 0&&(i=i.default(t.default)),i}function it(t,e){if(typeof t=="boolean")return t?T.any():T.never();let A=xC(t,e),i=t.type||t.enum!==void 0||t.const!==void 0;if(t.anyOf&&Array.isArray(t.anyOf)){let o=t.anyOf.map(l=>it(l,e)),a=T.union(o);A=i?T.intersection(A,a):a}if(t.oneOf&&Array.isArray(t.oneOf)){let o=t.oneOf.map(l=>it(l,e)),a=T.xor(o);A=i?T.intersection(A,a):a}if(t.allOf&&Array.isArray(t.allOf))if(t.allOf.length===0)A=i?A:T.any();else{let o=i?A:it(t.allOf[0],e),a=i?0:1;for(let l=a;l<t.allOf.length;l++)o=T.intersection(o,it(t.allOf[l],e));A=o}t.nullable===!0&&e.version==="openapi-3.0"&&(A=T.nullable(A)),t.readOnly===!0&&(A=T.readonly(A));let n={},r=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let o of r)o in t&&(n[o]=t[o]);let s=["contentEncoding","contentMediaType","contentSchema"];for(let o of s)o in t&&(n[o]=t[o]);for(let o of Object.keys(t))MO.has(o)||(n[o]=t[o]);return Object.keys(n).length>0&&e.registry.add(A,n),A}function PO(t,e){if(typeof t=="boolean")return t?T.any():T.never();let A=NO(t,e==null?void 0:e.defaultTarget),i=t.$defs||t.definitions||{},n={version:A,defs:i,refs:new Map,processing:new Set,rootSchema:t,registry:(e==null?void 0:e.registry)??Rt};return it(t,n)}var FC={};OA(FC,{string:()=>RO,number:()=>KO,date:()=>jO,boolean:()=>ZO,bigint:()=>VO});function RO(t){return Ub(Us,t)}function KO(t){return $b(xs,t)}function ZO(t){return Nb(Fs,t)}function VO(t){return Pb(Is,t)}function jO(t){return qb(kl,t)}lt(vb());var GO=v.union([v.literal("light"),v.literal("dark")]).describe("Color theme preference for the host environment."),Rr=v.union([v.literal("inline"),v.literal("fullscreen"),v.literal("pip")]).describe("Display mode for UI presentation."),WO=v.union([v.literal("--color-background-primary"),v.literal("--color-background-secondary"),v.literal("--color-background-tertiary"),v.literal("--color-background-inverse"),v.literal("--color-background-ghost"),v.literal("--color-background-info"),v.literal("--color-background-danger"),v.literal("--color-background-success"),v.literal("--color-background-warning"),v.literal("--color-background-disabled"),v.literal("--color-text-primary"),v.literal("--color-text-secondary"),v.literal("--color-text-tertiary"),v.literal("--color-text-inverse"),v.literal("--color-text-ghost"),v.literal("--color-text-info"),v.literal("--color-text-danger"),v.literal("--color-text-success"),v.literal("--color-text-warning"),v.literal("--color-text-disabled"),v.literal("--color-text-ghost"),v.literal("--color-border-primary"),v.literal("--color-border-secondary"),v.literal("--color-border-tertiary"),v.literal("--color-border-inverse"),v.literal("--color-border-ghost"),v.literal("--color-border-info"),v.literal("--color-border-danger"),v.literal("--color-border-success"),v.literal("--color-border-warning"),v.literal("--color-border-disabled"),v.literal("--color-ring-primary"),v.literal("--color-ring-secondary"),v.literal("--color-ring-inverse"),v.literal("--color-ring-info"),v.literal("--color-ring-danger"),v.literal("--color-ring-success"),v.literal("--color-ring-warning"),v.literal("--font-sans"),v.literal("--font-mono"),v.literal("--font-weight-normal"),v.literal("--font-weight-medium"),v.literal("--font-weight-semibold"),v.literal("--font-weight-bold"),v.literal("--font-text-xs-size"),v.literal("--font-text-sm-size"),v.literal("--font-text-md-size"),v.literal("--font-text-lg-size"),v.literal("--font-heading-xs-size"),v.literal("--font-heading-sm-size"),v.literal("--font-heading-md-size"),v.literal("--font-heading-lg-size"),v.literal("--font-heading-xl-size"),v.literal("--font-heading-2xl-size"),v.literal("--font-heading-3xl-size"),v.literal("--font-text-xs-line-height"),v.literal("--font-text-sm-line-height"),v.literal("--font-text-md-line-height"),v.literal("--font-text-lg-line-height"),v.literal("--font-heading-xs-line-height"),v.literal("--font-heading-sm-line-height"),v.literal("--font-heading-md-line-height"),v.literal("--font-heading-lg-line-height"),v.literal("--font-heading-xl-line-height"),v.literal("--font-heading-2xl-line-height"),v.literal("--font-heading-3xl-line-height"),v.literal("--border-radius-xs"),v.literal("--border-radius-sm"),v.literal("--border-radius-md"),v.literal("--border-radius-lg"),v.literal("--border-radius-xl"),v.literal("--border-radius-full"),v.literal("--border-width-regular"),v.literal("--shadow-hairline"),v.literal("--shadow-sm"),v.literal("--shadow-md"),v.literal("--shadow-lg")]).describe("CSS variable keys available to MCP apps for theming."),JO=v.record(WO.describe(`Style variables for theming MCP apps.
|
|
85
85
|
|
|
86
86
|
Individual style keys are optional - hosts may provide any subset of these values.
|
|
87
87
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
@@ -99,33 +99,49 @@ Individual style keys are optional - hosts may provide any subset of these value
|
|
|
99
99
|
Values are strings containing CSS values (colors, sizes, font stacks, etc.).
|
|
100
100
|
|
|
101
101
|
Note: This type uses \`Record<K, string | undefined>\` rather than \`Partial<Record<K, string>>\`
|
|
102
|
-
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);v.object({method:v.literal("ui/open-link"),params:v.object({url:v.string().describe("URL to open in the host's browser")})});var
|
|
102
|
+
for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);v.object({method:v.literal("ui/open-link"),params:v.object({url:v.string().describe("URL to open in the host's browser")})});var XO=v.object({isError:v.boolean().optional().describe("True if the host failed to open the URL (e.g., due to security policy).")}).passthrough(),YO=v.object({isError:v.boolean().optional().describe("True if the host rejected or failed to deliver the message.")}).passthrough();v.object({method:v.literal("ui/notifications/sandbox-proxy-ready"),params:v.object({})});var xh=v.object({connectDomains:v.array(v.string()).optional().describe("Origins for network requests (fetch/XHR/WebSocket)."),resourceDomains:v.array(v.string()).optional().describe("Origins for static resources (scripts, images, styles, fonts)."),frameDomains:v.array(v.string()).optional().describe("Origins for nested iframes (frame-src directive)."),baseUriDomains:v.array(v.string()).optional().describe("Allowed base URIs for the document (base-uri directive).")}),Fh=v.object({camera:v.object({}).optional().describe("Request camera access (Permission Policy `camera` feature)."),microphone:v.object({}).optional().describe("Request microphone access (Permission Policy `microphone` feature)."),geolocation:v.object({}).optional().describe("Request geolocation access (Permission Policy `geolocation` feature)."),clipboardWrite:v.object({}).optional().describe("Request clipboard write access (Permission Policy `clipboard-write` feature).")});v.object({method:v.literal("ui/notifications/size-changed"),params:v.object({width:v.number().optional().describe("New width in pixels."),height:v.number().optional().describe("New height in pixels.")})});var qO=v.object({method:v.literal("ui/notifications/tool-input"),params:v.object({arguments:v.record(v.string(),v.unknown().describe("Complete tool call arguments as key-value pairs.")).optional().describe("Complete tool call arguments as key-value pairs.")})}),eH=v.object({method:v.literal("ui/notifications/tool-input-partial"),params:v.object({arguments:v.record(v.string(),v.unknown().describe("Partial tool call arguments (incomplete, may change).")).optional().describe("Partial tool call arguments (incomplete, may change).")})}),tH=v.object({method:v.literal("ui/notifications/tool-cancelled"),params:v.object({reason:v.string().optional().describe('Optional reason for the cancellation (e.g., "user action", "timeout").')})}),AH=v.object({fonts:v.string().optional()}),nH=v.object({variables:JO.optional().describe("CSS variables for theming the app."),css:AH.optional().describe("CSS blocks that apps can inject.")}),iH=v.object({method:v.literal("ui/resource-teardown"),params:v.object({})});v.record(v.string(),v.unknown());var Vg=v.object({text:v.object({}).optional().describe("Host supports text content blocks."),image:v.object({}).optional().describe("Host supports image content blocks."),audio:v.object({}).optional().describe("Host supports audio content blocks."),resource:v.object({}).optional().describe("Host supports resource content blocks."),resourceLink:v.object({}).optional().describe("Host supports resource link content blocks."),structuredContent:v.object({}).optional().describe("Host supports structured content.")}),rH=v.object({experimental:v.object({}).optional().describe("Experimental features (structure TBD)."),openLinks:v.object({}).optional().describe("Host supports opening external URLs."),serverTools:v.object({listChanged:v.boolean().optional().describe("Host supports tools/list_changed notifications.")}).optional().describe("Host can proxy tool calls to the MCP server."),serverResources:v.object({listChanged:v.boolean().optional().describe("Host supports resources/list_changed notifications.")}).optional().describe("Host can proxy resource reads to the MCP server."),logging:v.object({}).optional().describe("Host accepts log messages."),sandbox:v.object({permissions:Fh.optional().describe("Permissions granted by the host (camera, microphone, geolocation)."),csp:xh.optional().describe("CSP domains approved by the host.")}).optional().describe("Sandbox configuration applied by the host."),updateModelContext:Vg.optional().describe("Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns."),message:Vg.optional().describe("Host supports receiving content messages (ui/message) from the view.")}),sH=v.object({experimental:v.object({}).optional().describe("Experimental features (structure TBD)."),tools:v.object({listChanged:v.boolean().optional().describe("App supports tools/list_changed notifications.")}).optional().describe("App exposes MCP-style tools that the host can call."),availableDisplayModes:v.array(Rr).optional().describe("Display modes the app supports.")});v.object({method:v.literal("ui/notifications/initialized"),params:v.object({}).optional()});v.object({csp:xh.optional().describe("Content Security Policy configuration."),permissions:Fh.optional().describe("Sandbox permissions requested by the UI."),domain:v.string().optional().describe("Dedicated origin for view sandbox."),prefersBorder:v.boolean().optional().describe("Visual boundary preference - true if UI prefers a visible border.")});v.object({method:v.literal("ui/request-display-mode"),params:v.object({mode:Rr.describe("The display mode being requested.")})});var oH=v.object({mode:Rr.describe("The display mode that was actually set. May differ from requested if not supported.")}).passthrough(),aH=v.union([v.literal("model"),v.literal("app")]).describe("Tool visibility scope - who can access the tool.");v.object({resourceUri:v.string().optional(),visibility:v.array(aH).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
103
103
|
- "model": Tool visible to and callable by the agent
|
|
104
|
-
- "app": Tool callable by the app from this server only`)});v.object({mimeTypes:v.array(v.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});v.object({method:v.literal("ui/message"),params:v.object({role:v.literal("user").describe('Message role, currently only "user" is supported.'),content:v.array(
|
|
105
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:v.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:v.string().optional().describe("User's timezone in IANA format."),userAgent:v.string().optional().describe("Host application identifier."),platform:v.union([v.literal("web"),v.literal("desktop"),v.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:v.object({touch:v.boolean().optional().describe("Whether the device supports touch input."),hover:v.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:v.object({top:v.number().describe("Top safe area inset in pixels."),right:v.number().describe("Right safe area inset in pixels."),bottom:v.number().describe("Bottom safe area inset in pixels."),left:v.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),
|
|
104
|
+
- "app": Tool callable by the app from this server only`)});v.object({mimeTypes:v.array(v.string()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')});v.object({method:v.literal("ui/message"),params:v.object({role:v.literal("user").describe('Message role, currently only "user" is supported.'),content:v.array(cs).describe("Message content blocks (text, image, etc.).")})});v.object({method:v.literal("ui/notifications/sandbox-resource-ready"),params:v.object({html:v.string().describe("HTML content to load into the inner iframe."),sandbox:v.string().optional().describe("Optional override for the inner iframe's sandbox attribute."),csp:xh.optional().describe("CSP configuration from resource metadata."),permissions:Fh.optional().describe("Sandbox permissions from resource metadata.")})});var lH=v.object({method:v.literal("ui/notifications/tool-result"),params:ja.describe("Standard MCP tool execution result.")}),IC=v.object({toolInfo:v.object({id:rs.optional().describe("JSON-RPC id of the tools/call request."),tool:Sd.describe("Tool definition including name, inputSchema, etc.")}).optional().describe("Metadata of the tool call that instantiated this App."),theme:GO.optional().describe("Current color theme preference."),styles:nH.optional().describe("Style configuration for theming the app."),displayMode:Rr.optional().describe("How the UI is currently displayed."),availableDisplayModes:v.array(Rr).optional().describe("Display modes the host supports."),containerDimensions:v.union([v.object({height:v.number().describe("Fixed container height in pixels.")}),v.object({maxHeight:v.union([v.number(),v.undefined()]).optional().describe("Maximum container height in pixels.")})]).and(v.union([v.object({width:v.number().describe("Fixed container width in pixels.")}),v.object({maxWidth:v.union([v.number(),v.undefined()]).optional().describe("Maximum container width in pixels.")})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
105
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:v.string().optional().describe("User's language and region preference in BCP 47 format."),timeZone:v.string().optional().describe("User's timezone in IANA format."),userAgent:v.string().optional().describe("Host application identifier."),platform:v.union([v.literal("web"),v.literal("desktop"),v.literal("mobile")]).optional().describe("Platform type for responsive design decisions."),deviceCapabilities:v.object({touch:v.boolean().optional().describe("Whether the device supports touch input."),hover:v.boolean().optional().describe("Whether the device supports hover interactions.")}).optional().describe("Device input capabilities."),safeAreaInsets:v.object({top:v.number().describe("Top safe area inset in pixels."),right:v.number().describe("Right safe area inset in pixels."),bottom:v.number().describe("Bottom safe area inset in pixels."),left:v.number().describe("Left safe area inset in pixels.")}).optional().describe("Mobile safe area boundaries in pixels.")}).passthrough(),uH=v.object({method:v.literal("ui/notifications/host-context-changed"),params:IC.describe("Partial context update containing only changed fields.")});v.object({method:v.literal("ui/update-model-context"),params:v.object({content:v.array(cs).optional().describe("Context content blocks (text, image, etc.)."),structuredContent:v.record(v.string(),v.unknown().describe("Structured content for machine-readable context data.")).optional().describe("Structured content for machine-readable context data.")})});v.object({method:v.literal("ui/initialize"),params:v.object({appInfo:Za.describe("App identification (name and version)."),appCapabilities:sH.describe("Features and capabilities this app provides."),protocolVersion:v.string().describe("Protocol version this app supports.")})});var cH=v.object({protocolVersion:v.string().describe('Negotiated protocol version string (e.g., "2025-11-21").'),hostInfo:Za.describe("Host application identification and version."),hostCapabilities:rH.describe("Features and capabilities provided by the host."),hostContext:IC.describe("Rich context about the host environment.")}).passthrough();class dH extends f1{constructor(A,i={},n={autoResize:!0}){super(n);k(this,"_appInfo");k(this,"_capabilities");k(this,"options");k(this,"_hostCapabilities");k(this,"_hostInfo");k(this,"_hostContext");k(this,"sendOpenLink",this.openLink);this._appInfo=A,this._capabilities=i,this.options=n,this.setRequestHandler(Va,r=>(console.log("Received ping:",r.params),{})),this.onhostcontextchanged=()=>{}}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}set ontoolinput(A){this.setNotificationHandler(qO,i=>A(i.params))}set ontoolinputpartial(A){this.setNotificationHandler(eH,i=>A(i.params))}set ontoolresult(A){this.setNotificationHandler(lH,i=>A(i.params))}set ontoolcancelled(A){this.setNotificationHandler(tH,i=>A(i.params))}set onhostcontextchanged(A){this.setNotificationHandler(uH,i=>{this._hostContext={...this._hostContext,...i.params},A(i.params)})}set onteardown(A){this.setRequestHandler(iH,(i,n)=>A(i.params,n))}set oncalltool(A){this.setRequestHandler(NB,(i,n)=>A(i.params,n))}set onlisttools(A){this.setRequestHandler(MB,(i,n)=>A(i.params,n))}assertCapabilityForMethod(A){}assertRequestHandlerCapability(A){switch(A){case"tools/call":case"tools/list":if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${A})`);return;case"ping":case"ui/resource-teardown":return;default:throw Error(`No handler for method ${A} registered`)}}assertNotificationCapability(A){}assertTaskCapability(A){throw Error("Tasks are not supported in MCP Apps")}assertTaskHandlerCapability(A){throw Error("Task handlers are not supported in MCP Apps")}async callServerTool(A,i){return await this.request({method:"tools/call",params:A},ja,i)}sendMessage(A,i){return this.request({method:"ui/message",params:A},YO,i)}sendLog(A){return this.notification({method:"notifications/message",params:A})}updateModelContext(A,i){return this.request({method:"ui/update-model-context",params:A},gd,i)}openLink(A,i){return this.request({method:"ui/open-link",params:A},XO,i)}requestDisplayMode(A,i){return this.request({method:"ui/request-display-mode",params:A},oH,i)}sendSizeChanged(A){return this.notification({method:"ui/notifications/size-changed",params:A})}setupSizeChangedNotifications(){let A=!1,i=0,n=0,r=()=>{A||(A=!0,requestAnimationFrame(()=>{A=!1;let o=document.documentElement,a=o.style.width,l=o.style.height;o.style.width="fit-content",o.style.height="fit-content";let u=o.getBoundingClientRect();o.style.width=a,o.style.height=l;let c=window.innerWidth-o.clientWidth,d=Math.ceil(u.width+c),f=Math.ceil(u.height);(d!==i||f!==n)&&(i=d,n=f,this.sendSizeChanged({width:d,height:f}))}))};r();let s=new ResizeObserver(r);return s.observe(document.documentElement),s.observe(document.body),()=>s.disconnect()}async connect(A=new g1(window.parent,window.parent),i){var n;await super.connect(A);try{let r=await this.request({method:"ui/initialize",params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:m1}},cH,i);if(r===void 0)throw Error(`Server sent invalid initialize result: ${r}`);this._hostCapabilities=r.hostCapabilities,this._hostInfo=r.hostInfo,this._hostContext=r.hostContext,await this.notification({method:"ui/notifications/initialized"}),(n=this.options)!=null&&n.autoResize&&this.setupSizeChangedNotifications()}catch(r){throw this.close(),r}}}/*!
|
|
106
106
|
* @kurkle/color v0.3.4
|
|
107
107
|
* https://github.com/kurkle/color#readme
|
|
108
108
|
* (c) 2024 Jukka Kurkela
|
|
109
109
|
* Released under the MIT License
|
|
110
|
-
*/function
|
|
110
|
+
*/function Os(t){return t+.5|0}const KA=(t,e,A)=>Math.max(Math.min(t,A),e);function dr(t){return KA(Os(t*2.55),0,255)}function XA(t){return KA(Os(t*255),0,255)}function xA(t){return KA(Os(t/2.55)/100,0,1)}function jg(t){return KA(Os(t*100),0,100)}const Mt={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},uc=[..."0123456789ABCDEF"],fH=t=>uc[t&15],hH=t=>uc[(t&240)>>4]+uc[t&15],eo=t=>(t&240)>>4===(t&15),gH=t=>eo(t.r)&&eo(t.g)&&eo(t.b)&&eo(t.a);function mH(t){var e=t.length,A;return t[0]==="#"&&(e===4||e===5?A={r:255&Mt[t[1]]*17,g:255&Mt[t[2]]*17,b:255&Mt[t[3]]*17,a:e===5?Mt[t[4]]*17:255}:(e===7||e===9)&&(A={r:Mt[t[1]]<<4|Mt[t[2]],g:Mt[t[3]]<<4|Mt[t[4]],b:Mt[t[5]]<<4|Mt[t[6]],a:e===9?Mt[t[7]]<<4|Mt[t[8]]:255})),A}const pH=(t,e)=>t<255?e(t):"";function vH(t){var e=gH(t)?fH:hH;return t?"#"+e(t.r)+e(t.g)+e(t.b)+pH(t.a,e):void 0}const BH=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function SC(t,e,A){const i=e*Math.min(A,1-A),n=(r,s=(r+t/30)%12)=>A-i*Math.max(Math.min(s-3,9-s,1),-1);return[n(0),n(8),n(4)]}function wH(t,e,A){const i=(n,r=(n+t/60)%6)=>A-A*e*Math.max(Math.min(r,4-r,1),0);return[i(5),i(3),i(1)]}function yH(t,e,A){const i=SC(t,1,.5);let n;for(e+A>1&&(n=1/(e+A),e*=n,A*=n),n=0;n<3;n++)i[n]*=1-e-A,i[n]+=e;return i}function bH(t,e,A,i,n){return t===n?(e-A)/i+(e<A?6:0):e===n?(A-t)/i+2:(t-e)/i+4}function Ih(t){const A=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(A,i,n),s=Math.min(A,i,n),o=(r+s)/2;let a,l,u;return r!==s&&(u=r-s,l=o>.5?u/(2-r-s):u/(r+s),a=bH(A,i,n,u,r),a=a*60+.5),[a|0,l||0,o]}function Sh(t,e,A,i){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,A,i)).map(XA)}function kh(t,e,A){return Sh(SC,t,e,A)}function _H(t,e,A){return Sh(yH,t,e,A)}function CH(t,e,A){return Sh(wH,t,e,A)}function kC(t){return(t%360+360)%360}function UH(t){const e=BH.exec(t);let A=255,i;if(!e)return;e[5]!==i&&(A=e[6]?dr(+e[5]):XA(+e[5]));const n=kC(+e[2]),r=+e[3]/100,s=+e[4]/100;return e[1]==="hwb"?i=_H(n,r,s):e[1]==="hsv"?i=CH(n,r,s):i=kh(n,r,s),{r:i[0],g:i[1],b:i[2],a:A}}function QH(t,e){var A=Ih(t);A[0]=kC(A[0]+e),A=kh(A),t.r=A[0],t.g=A[1],t.b=A[2]}function xH(t){if(!t)return;const e=Ih(t),A=e[0],i=jg(e[1]),n=jg(e[2]);return t.a<255?`hsla(${A}, ${i}%, ${n}%, ${xA(t.a)})`:`hsl(${A}, ${i}%, ${n}%)`}const Gg={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},Wg={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function FH(){const t={},e=Object.keys(Wg),A=Object.keys(Gg);let i,n,r,s,o;for(i=0;i<e.length;i++){for(s=o=e[i],n=0;n<A.length;n++)r=A[n],o=o.replace(r,Gg[r]);r=parseInt(Wg[s],16),t[o]=[r>>16&255,r>>8&255,r&255]}return t}let to;function IH(t){to||(to=FH(),to.transparent=[0,0,0,0]);const e=to[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:e.length===4?e[3]:255}}const SH=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function kH(t){const e=SH.exec(t);let A=255,i,n,r;if(e){if(e[7]!==i){const s=+e[7];A=e[8]?dr(s):KA(s*255,0,255)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?dr(i):KA(i,0,255)),n=255&(e[4]?dr(n):KA(n,0,255)),r=255&(e[6]?dr(r):KA(r,0,255)),{r:i,g:n,b:r,a:A}}}function EH(t){return t&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${xA(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`)}const au=t=>t<=.0031308?t*12.92:Math.pow(t,1/2.4)*1.055-.055,Xn=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function $H(t,e,A){const i=Xn(xA(t.r)),n=Xn(xA(t.g)),r=Xn(xA(t.b));return{r:XA(au(i+A*(Xn(xA(e.r))-i))),g:XA(au(n+A*(Xn(xA(e.g))-n))),b:XA(au(r+A*(Xn(xA(e.b))-r))),a:t.a+A*(e.a-t.a)}}function Ao(t,e,A){if(t){let i=Ih(t);i[e]=Math.max(0,Math.min(i[e]+i[e]*A,e===0?360:1)),i=kh(i),t.r=i[0],t.g=i[1],t.b=i[2]}}function EC(t,e){return t&&Object.assign(e||{},t)}function Jg(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=XA(t[3]))):(e=EC(t,{r:0,g:0,b:0,a:1}),e.a=XA(e.a)),e}function TH(t){return t.charAt(0)==="r"?kH(t):UH(t)}class Kr{constructor(e){if(e instanceof Kr)return e;const A=typeof e;let i;A==="object"?i=Jg(e):A==="string"&&(i=mH(e)||IH(e)||TH(e)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var e=EC(this._rgb);return e&&(e.a=xA(e.a)),e}set rgb(e){this._rgb=Jg(e)}rgbString(){return this._valid?EH(this._rgb):void 0}hexString(){return this._valid?vH(this._rgb):void 0}hslString(){return this._valid?xH(this._rgb):void 0}mix(e,A){if(e){const i=this.rgb,n=e.rgb;let r;const s=A===r?.5:A,o=2*s-1,a=i.a-n.a,l=((o*a===-1?o:(o+a)/(1+o*a))+1)/2;r=1-l,i.r=255&l*i.r+r*n.r+.5,i.g=255&l*i.g+r*n.g+.5,i.b=255&l*i.b+r*n.b+.5,i.a=s*i.a+(1-s)*n.a,this.rgb=i}return this}interpolate(e,A){return e&&(this._rgb=$H(this._rgb,e._rgb,A)),this}clone(){return new Kr(this.rgb)}alpha(e){return this._rgb.a=XA(e),this}clearer(e){const A=this._rgb;return A.a*=1-e,this}greyscale(){const e=this._rgb,A=Os(e.r*.3+e.g*.59+e.b*.11);return e.r=e.g=e.b=A,this}opaquer(e){const A=this._rgb;return A.a*=1+e,this}negate(){const e=this._rgb;return e.r=255-e.r,e.g=255-e.g,e.b=255-e.b,this}lighten(e){return Ao(this._rgb,2,e),this}darken(e){return Ao(this._rgb,2,-e),this}saturate(e){return Ao(this._rgb,1,e),this}desaturate(e){return Ao(this._rgb,1,-e),this}rotate(e){return QH(this._rgb,e),this}}/*!
|
|
111
111
|
* Chart.js v4.5.1
|
|
112
112
|
* https://www.chartjs.org
|
|
113
113
|
* (c) 2025 Chart.js Contributors
|
|
114
114
|
* Released under the MIT License
|
|
115
|
-
*/function At(){}const lE=(()=>{let t=0;return()=>t++})();function ne(t){return t==null}function Ne(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function K(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function qe(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function Dt(t,e){return qe(t)?t:e}function U(t,e){return typeof t>"u"?e:t}const uE=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,ck=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function me(t,e,n){if(t&&typeof t.call=="function")return t.apply(n,e)}function ae(t,e,n,r){let i,s,o;if(Ne(t))for(s=t.length,i=0;i<s;i++)e.call(n,t[i],i);else if(K(t))for(o=Object.keys(t),s=o.length,i=0;i<s;i++)e.call(n,t[o[i]],o[i])}function uo(t,e){let n,r,i,s;if(!t||!e||t.length!==e.length)return!1;for(n=0,r=t.length;n<r;++n)if(i=t[n],s=e[n],i.datasetIndex!==s.datasetIndex||i.index!==s.index)return!1;return!0}function co(t){if(Ne(t))return t.map(co);if(K(t)){const e=Object.create(null),n=Object.keys(t),r=n.length;let i=0;for(;i<r;++i)e[n[i]]=co(t[n[i]]);return e}return t}function dk(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function cE(t,e,n,r){if(!dk(t))return;const i=e[t],s=n[t];K(i)&&K(s)?yr(i,s,r):e[t]=co(s)}function yr(t,e,n){const r=Ne(e)?e:[e],i=r.length;if(!K(t))return t;n=n||{};const s=n.merger||cE;let o;for(let a=0;a<i;++a){if(o=r[a],!K(o))continue;const l=Object.keys(o);for(let u=0,c=l.length;u<c;++u)s(l[u],t,o,n)}return t}function rr(t,e){return yr(t,e,{merger:dE})}function dE(t,e,n){if(!dk(t))return;const r=e[t],i=n[t];K(r)&&K(i)?rr(r,i):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=co(i))}const zf={"":t=>t,x:t=>t.x,y:t=>t.y};function fE(t){const e=t.split("."),n=[];let r="";for(const i of e)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function hE(t){const e=fE(t);return n=>{for(const r of e){if(r==="")break;n=n&&n[r]}return n}}function jn(t,e){return(zf[e]||(zf[e]=hE(e)))(t)}function gd(t){return t.charAt(0).toUpperCase()+t.slice(1)}const _r=t=>typeof t<"u",mn=t=>typeof t=="function",Of=(t,e)=>{if(t.size!==e.size)return!1;for(const n of t)if(!e.has(n))return!1;return!0};function mE(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const de=Math.PI,$e=2*de,pE=$e+de,fo=Number.POSITIVE_INFINITY,gE=de/180,Ce=de/2,kn=de/4,Tf=de*2/3,fk=Math.log10,Nt=Math.sign;function sr(t,e,n){return Math.abs(t-e)<n}function Df(t){const e=Math.round(t);t=sr(t,e,t/1e3)?e:t;const n=Math.pow(10,Math.floor(fk(t))),r=t/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function vE(t){const e=[],n=Math.sqrt(t);let r;for(r=1;r<n;r++)t%r===0&&(e.push(r),e.push(t/r));return n===(n|0)&&e.push(n),e.sort((i,s)=>i-s).pop(),e}function bE(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function wi(t){return!bE(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function yE(t,e){const n=Math.round(t);return n-e<=t&&n+e>=t}function _E(t,e,n){let r,i,s;for(r=0,i=t.length;r<i;r++)s=t[r][n],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}function Ft(t){return t*(de/180)}function kE(t){return t*(180/de)}function Pf(t){if(!qe(t))return;let e=1,n=0;for(;Math.round(t*e)/e!==t;)e*=10,n++;return n}function hk(t,e){const n=e.x-t.x,r=e.y-t.y,i=Math.sqrt(n*n+r*r);let s=Math.atan2(r,n);return s<-.5*de&&(s+=$e),{angle:s,distance:i}}function _l(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function $E(t,e){return(t-e+pE)%$e-de}function st(t){return(t%$e+$e)%$e}function kr(t,e,n,r){const i=st(t),s=st(e),o=st(n),a=st(s-i),l=st(o-i),u=st(i-s),c=st(i-o);return i===s||i===o||r&&s===o||a>l&&u<c}function He(t,e,n){return Math.max(e,Math.min(n,t))}function xE(t){return He(t,-32768,32767)}function Vt(t,e,n,r=1e-6){return t>=Math.min(e,n)-r&&t<=Math.max(e,n)+r}function vd(t,e,n){n=n||(o=>t[o]<e);let r=t.length-1,i=0,s;for(;r-i>1;)s=i+r>>1,n(s)?i=s:r=s;return{lo:i,hi:r}}const Dn=(t,e,n,r)=>vd(t,n,r?i=>{const s=t[i][e];return s<n||s===n&&t[i+1][e]===n}:i=>t[i][e]<n),wE=(t,e,n)=>vd(t,n,r=>t[r][e]>=n);function SE(t,e,n){let r=0,i=t.length;for(;r<i&&t[r]<e;)r++;for(;i>r&&t[i-1]>n;)i--;return r>0||i<t.length?t.slice(r,i):t}const mk=["push","pop","shift","splice","unshift"];function IE(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),mk.forEach(n=>{const r="_onData"+gd(n),i=t[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!1,value(...s){const o=i.apply(this,s);return t._chartjs.listeners.forEach(a=>{typeof a[r]=="function"&&a[r](...s)}),o}})})}function Ef(t,e){const n=t._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(e);i!==-1&&r.splice(i,1),!(r.length>0)&&(mk.forEach(s=>{delete t[s]}),delete t._chartjs)}function pk(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const gk=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function vk(t,e){let n=[],r=!1;return function(...i){n=i,r||(r=!0,gk.call(window,()=>{r=!1,t.apply(e,n)}))}}function zE(t,e){let n;return function(...r){return e?(clearTimeout(n),n=setTimeout(t,e,r)):t.apply(this,r),e}}const bk=t=>t==="start"?"left":t==="end"?"right":"center",it=(t,e,n)=>t==="start"?e:t==="end"?n:(e+n)/2,OE=(t,e,n,r)=>t===(r?"left":"right")?n:t==="center"?(e+n)/2:e;function yk(t,e,n){const r=e.length;let i=0,s=r;if(t._sorted){const{iScale:o,vScale:a,_parsed:l}=t,u=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,c=o.axis,{min:d,max:f,minDefined:h,maxDefined:m}=o.getUserBounds();if(h){if(i=Math.min(Dn(l,c,d).lo,n?r:Dn(e,c,o.getPixelForValue(d)).lo),u){const p=l.slice(0,i+1).reverse().findIndex(g=>!ne(g[a.axis]));i-=Math.max(0,p)}i=He(i,0,r-1)}if(m){let p=Math.max(Dn(l,o.axis,f,!0).hi+1,n?0:Dn(e,c,o.getPixelForValue(f),!0).hi+1);if(u){const g=l.slice(p-1).findIndex(b=>!ne(b[a.axis]));p+=Math.max(0,g)}s=He(p,i,r)-i}else s=r-i}return{start:i,count:s}}function _k(t){const{xScale:e,yScale:n,_scaleRanges:r}=t,i={xmin:e.min,xmax:e.max,ymin:n.min,ymax:n.max};if(!r)return t._scaleRanges=i,!0;const s=r.xmin!==e.min||r.xmax!==e.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),s}const zs=t=>t===0||t===1,Mf=(t,e,n)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*$e/n)),Nf=(t,e,n)=>Math.pow(2,-10*t)*Math.sin((t-e)*$e/n)+1,or={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Ce)+1,easeOutSine:t=>Math.sin(t*Ce),easeInOutSine:t=>-.5*(Math.cos(de*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>zs(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>zs(t)?t:Mf(t,.075,.3),easeOutElastic:t=>zs(t)?t:Nf(t,.075,.3),easeInOutElastic(t){return zs(t)?t:t<.5?.5*Mf(t*2,.1125,.45):.5+.5*Nf(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-or.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?or.easeInBounce(t*2)*.5:or.easeOutBounce(t*2-1)*.5+.5};function bd(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function Cf(t){return bd(t)?t:new br(t)}function Ua(t){return bd(t)?t:new br(t).saturate(.5).darken(.1).hexString()}const TE=["x","y","borderWidth","radius","tension"],DE=["color","borderColor","backgroundColor"];function PE(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:DE},numbers:{type:"number",properties:TE}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function EE(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const Af=new Map;function ME(t,e){e=e||{};const n=t+JSON.stringify(e);let r=Af.get(n);return r||(r=new Intl.NumberFormat(t,e),Af.set(n,r)),r}function yd(t,e,n){return ME(e,n).format(t)}const NE={values(t){return Ne(t)?t:""+t},numeric(t,e,n){if(t===0)return"0";const r=this.chart.options.locale;let i,s=t;if(n.length>1){const u=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(u<1e-4||u>1e15)&&(i="scientific"),s=CE(t,n)}const o=fk(Math.abs(s)),a=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:a,maximumFractionDigits:a};return Object.assign(l,this.options.ticks.format),yd(t,r,l)}};function CE(t,e){let n=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(n)>=1&&t!==Math.floor(t)&&(n=t-Math.floor(t)),n}var kk={formatters:NE};function AE(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,n)=>n.lineWidth,tickColor:(e,n)=>n.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:kk.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const Un=Object.create(null),kl=Object.create(null);function ar(t,e){if(!e)return t;const n=e.split(".");for(let r=0,i=n.length;r<i;++r){const s=n[r];t=t[s]||(t[s]=Object.create(null))}return t}function La(t,e,n){return typeof e=="string"?yr(ar(t,e),n):yr(ar(t,""),e)}class RE{constructor(e,n){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=r=>r.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(r,i)=>Ua(i.backgroundColor),this.hoverBorderColor=(r,i)=>Ua(i.borderColor),this.hoverColor=(r,i)=>Ua(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(n)}set(e,n){return La(this,e,n)}get(e){return ar(this,e)}describe(e,n){return La(kl,e,n)}override(e,n){return La(Un,e,n)}route(e,n,r,i){const s=ar(this,e),o=ar(this,r),a="_"+n;Object.defineProperties(s,{[a]:{value:s[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[a],u=o[i];return K(l)?Object.assign({},u,l):U(l,u)},set(l){this[a]=l}}})}apply(e){e.forEach(n=>n(this))}}var le=new RE({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[PE,EE,AE]);function ZE(t){return!t||ne(t.size)||ne(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function Rf(t,e,n,r,i){let s=e[i];return s||(s=e[i]=t.measureText(i).width,n.push(i)),s>r&&(r=s),r}function $n(t,e,n){const r=t.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((e-i)*r)/r+i}function Zf(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function $l(t,e,n,r){$k(t,e,n,r,null)}function $k(t,e,n,r,i){let s,o,a,l,u,c,d,f;const h=e.pointStyle,m=e.rotation,p=e.radius;let g=(m||0)*gE;if(h&&typeof h=="object"&&(s=h.toString(),s==="[object HTMLImageElement]"||s==="[object HTMLCanvasElement]")){t.save(),t.translate(n,r),t.rotate(g),t.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),t.restore();return}if(!(isNaN(p)||p<=0)){switch(t.beginPath(),h){default:i?t.ellipse(n,r,i/2,p,0,0,$e):t.arc(n,r,p,0,$e),t.closePath();break;case"triangle":c=i?i/2:p,t.moveTo(n+Math.sin(g)*c,r-Math.cos(g)*p),g+=Tf,t.lineTo(n+Math.sin(g)*c,r-Math.cos(g)*p),g+=Tf,t.lineTo(n+Math.sin(g)*c,r-Math.cos(g)*p),t.closePath();break;case"rectRounded":u=p*.516,l=p-u,o=Math.cos(g+kn)*l,d=Math.cos(g+kn)*(i?i/2-u:l),a=Math.sin(g+kn)*l,f=Math.sin(g+kn)*(i?i/2-u:l),t.arc(n-d,r-a,u,g-de,g-Ce),t.arc(n+f,r-o,u,g-Ce,g),t.arc(n+d,r+a,u,g,g+Ce),t.arc(n-f,r+o,u,g+Ce,g+de),t.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*p,c=i?i/2:l,t.rect(n-c,r-l,2*c,2*l);break}g+=kn;case"rectRot":d=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,f=Math.sin(g)*(i?i/2:p),t.moveTo(n-d,r-a),t.lineTo(n+f,r-o),t.lineTo(n+d,r+a),t.lineTo(n-f,r+o),t.closePath();break;case"crossRot":g+=kn;case"cross":d=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,f=Math.sin(g)*(i?i/2:p),t.moveTo(n-d,r-a),t.lineTo(n+d,r+a),t.moveTo(n+f,r-o),t.lineTo(n-f,r+o);break;case"star":d=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,f=Math.sin(g)*(i?i/2:p),t.moveTo(n-d,r-a),t.lineTo(n+d,r+a),t.moveTo(n+f,r-o),t.lineTo(n-f,r+o),g+=kn,d=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,a=Math.sin(g)*p,f=Math.sin(g)*(i?i/2:p),t.moveTo(n-d,r-a),t.lineTo(n+d,r+a),t.moveTo(n+f,r-o),t.lineTo(n-f,r+o);break;case"line":o=i?i/2:Math.cos(g)*p,a=Math.sin(g)*p,t.moveTo(n-o,r-a),t.lineTo(n+o,r+a);break;case"dash":t.moveTo(n,r),t.lineTo(n+Math.cos(g)*(i?i/2:p),r+Math.sin(g)*p);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function $r(t,e,n){return n=n||.5,!e||t&&t.x>e.left-n&&t.x<e.right+n&&t.y>e.top-n&&t.y<e.bottom+n}function as(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function ls(t){t.restore()}function jE(t,e,n,r,i){if(!e)return t.lineTo(n.x,n.y);if(i==="middle"){const s=(e.x+n.x)/2;t.lineTo(s,e.y),t.lineTo(s,n.y)}else i==="after"!=!!r?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y);t.lineTo(n.x,n.y)}function UE(t,e,n,r){if(!e)return t.lineTo(n.x,n.y);t.bezierCurveTo(r?e.cp1x:e.cp2x,r?e.cp1y:e.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function LE(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),ne(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function FE(t,e,n,r,i){if(i.strikethrough||i.underline){const s=t.measureText(r),o=e-s.actualBoundingBoxLeft,a=e+s.actualBoundingBoxRight,l=n-s.actualBoundingBoxAscent,u=n+s.actualBoundingBoxDescent,c=i.strikethrough?(l+u)/2:u;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=i.decorationWidth||2,t.moveTo(o,c),t.lineTo(a,c),t.stroke()}}function VE(t,e){const n=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=n}function ho(t,e,n,r,i,s={}){const o=Ne(e)?e:[e],a=s.strokeWidth>0&&s.strokeColor!=="";let l,u;for(t.save(),t.font=i.string,LE(t,s),l=0;l<o.length;++l)u=o[l],s.backdrop&&VE(t,s.backdrop),a&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),ne(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(u,n,r,s.maxWidth)),t.fillText(u,n,r,s.maxWidth),FE(t,n,r,u,s),r+=Number(i.lineHeight);t.restore()}function mo(t,e){const{x:n,y:r,w:i,h:s,radius:o}=e;t.arc(n+o.topLeft,r+o.topLeft,o.topLeft,1.5*de,de,!0),t.lineTo(n,r+s-o.bottomLeft),t.arc(n+o.bottomLeft,r+s-o.bottomLeft,o.bottomLeft,de,Ce,!0),t.lineTo(n+i-o.bottomRight,r+s),t.arc(n+i-o.bottomRight,r+s-o.bottomRight,o.bottomRight,Ce,0,!0),t.lineTo(n+i,r+o.topRight),t.arc(n+i-o.topRight,r+o.topRight,o.topRight,0,-Ce,!0),t.lineTo(n+o.topLeft,r)}const WE=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,HE=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function BE(t,e){const n=(""+t).match(WE);if(!n||n[1]==="normal")return e*1.2;switch(t=+n[2],n[3]){case"px":return t;case"%":t/=100;break}return e*t}const qE=t=>+t||0;function _d(t,e){const n={},r=K(e),i=r?Object.keys(e):e,s=K(t)?r?o=>U(t[o],t[e[o]]):o=>t[o]:()=>t;for(const o of i)n[o]=qE(s(o));return n}function xk(t){return _d(t,{top:"y",right:"x",bottom:"y",left:"x"})}function li(t){return _d(t,["topLeft","topRight","bottomLeft","bottomRight"])}function Ot(t){const e=xk(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function tt(t,e){t=t||{},e=e||le.font;let n=U(t.size,e.size);typeof n=="string"&&(n=parseInt(n,10));let r=U(t.style,e.style);r&&!(""+r).match(HE)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:U(t.family,e.family),lineHeight:BE(U(t.lineHeight,e.lineHeight),n),size:n,style:r,weight:U(t.weight,e.weight),string:""};return i.string=ZE(i),i}function Os(t,e,n,r){let i,s,o;for(i=0,s=t.length;i<s;++i)if(o=t[i],o!==void 0&&o!==void 0)return o}function JE(t,e,n){const{min:r,max:i}=t,s=ck(e,(i-r)/2),o=(a,l)=>n&&a===0?0:a+l;return{min:o(r,-Math.abs(s)),max:o(i,s)}}function Bn(t,e){return Object.assign(Object.create(t),e)}function kd(t,e=[""],n,r,i=()=>t[0]){const s=n||t;typeof r>"u"&&(r=zk("_fallback",t));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:r,_getTarget:i,override:a=>kd([a,...t],e,s,r)};return new Proxy(o,{deleteProperty(a,l){return delete a[l],delete a._keys,delete t[0][l],!0},get(a,l){return Sk(a,l,()=>nM(l,e,t,a))},getOwnPropertyDescriptor(a,l){return Reflect.getOwnPropertyDescriptor(a._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(a,l){return Uf(a).includes(l)},ownKeys(a){return Uf(a)},set(a,l,u){const c=a._storage||(a._storage=i());return a[l]=c[l]=u,delete a._keys,!0}})}function Si(t,e,n,r){const i={_cacheable:!1,_proxy:t,_context:e,_subProxy:n,_stack:new Set,_descriptors:wk(t,r),setContext:s=>Si(t,s,n,r),override:s=>Si(t.override(s),e,n,r)};return new Proxy(i,{deleteProperty(s,o){return delete s[o],delete t[o],!0},get(s,o,a){return Sk(s,o,()=>GE(s,o,a))},getOwnPropertyDescriptor(s,o){return s._descriptors.allKeys?Reflect.has(t,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,o)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(s,o){return Reflect.has(t,o)},ownKeys(){return Reflect.ownKeys(t)},set(s,o,a){return t[o]=a,delete s[o],!0}})}function wk(t,e={scriptable:!0,indexable:!0}){const{_scriptable:n=e.scriptable,_indexable:r=e.indexable,_allKeys:i=e.allKeys}=t;return{allKeys:i,scriptable:n,indexable:r,isScriptable:mn(n)?n:()=>n,isIndexable:mn(r)?r:()=>r}}const YE=(t,e)=>t?t+gd(e):e,$d=(t,e)=>K(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function Sk(t,e,n){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const r=n();return t[e]=r,r}function GE(t,e,n){const{_proxy:r,_context:i,_subProxy:s,_descriptors:o}=t;let a=r[e];return mn(a)&&o.isScriptable(e)&&(a=KE(e,a,t,n)),Ne(a)&&a.length&&(a=XE(e,a,t,o.isIndexable)),$d(e,a)&&(a=Si(a,i,s&&s[e],o)),a}function KE(t,e,n,r){const{_proxy:i,_context:s,_subProxy:o,_stack:a}=n;if(a.has(t))throw new Error("Recursion detected: "+Array.from(a).join("->")+"->"+t);a.add(t);let l=e(s,o||r);return a.delete(t),$d(t,l)&&(l=xd(i._scopes,i,t,l)),l}function XE(t,e,n,r){const{_proxy:i,_context:s,_subProxy:o,_descriptors:a}=n;if(typeof s.index<"u"&&r(t))return e[s.index%e.length];if(K(e[0])){const l=e,u=i._scopes.filter(c=>c!==l);e=[];for(const c of l){const d=xd(u,i,t,c);e.push(Si(d,s,o&&o[t],a))}}return e}function Ik(t,e,n){return mn(t)?t(e,n):t}const QE=(t,e)=>t===!0?e:typeof t=="string"?jn(e,t):void 0;function eM(t,e,n,r,i){for(const s of e){const o=QE(n,s);if(o){t.add(o);const a=Ik(o._fallback,n,i);if(typeof a<"u"&&a!==n&&a!==r)return a}else if(o===!1&&typeof r<"u"&&n!==r)return null}return!1}function xd(t,e,n,r){const i=e._rootScopes,s=Ik(e._fallback,n,r),o=[...t,...i],a=new Set;a.add(r);let l=jf(a,o,n,s||n,r);return l===null||typeof s<"u"&&s!==n&&(l=jf(a,o,s,l,r),l===null)?!1:kd(Array.from(a),[""],i,s,()=>tM(e,n,r))}function jf(t,e,n,r,i){for(;n;)n=eM(t,e,n,r,i);return n}function tM(t,e,n){const r=t._getTarget();e in r||(r[e]={});const i=r[e];return Ne(i)&&K(n)?n:i||{}}function nM(t,e,n,r){let i;for(const s of e)if(i=zk(YE(s,t),n),typeof i<"u")return $d(t,i)?xd(n,r,t,i):i}function zk(t,e){for(const n of e){if(!n)continue;const r=n[t];if(typeof r<"u")return r}}function Uf(t){let e=t._keys;return e||(e=t._keys=iM(t._scopes)),e}function iM(t){const e=new Set;for(const n of t)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))e.add(r);return Array.from(e)}const rM=Number.EPSILON||1e-14,Ii=(t,e)=>e<t.length&&!t[e].skip&&t[e],Ok=t=>t==="x"?"y":"x";function sM(t,e,n,r){const i=t.skip?e:t,s=e,o=n.skip?e:n,a=_l(s,i),l=_l(o,s);let u=a/(a+l),c=l/(a+l);u=isNaN(u)?0:u,c=isNaN(c)?0:c;const d=r*u,f=r*c;return{previous:{x:s.x-d*(o.x-i.x),y:s.y-d*(o.y-i.y)},next:{x:s.x+f*(o.x-i.x),y:s.y+f*(o.y-i.y)}}}function oM(t,e,n){const r=t.length;let i,s,o,a,l,u=Ii(t,0);for(let c=0;c<r-1;++c)if(l=u,u=Ii(t,c+1),!(!l||!u)){if(sr(e[c],0,rM)){n[c]=n[c+1]=0;continue}i=n[c]/e[c],s=n[c+1]/e[c],a=Math.pow(i,2)+Math.pow(s,2),!(a<=9)&&(o=3/Math.sqrt(a),n[c]=i*o*e[c],n[c+1]=s*o*e[c])}}function aM(t,e,n="x"){const r=Ok(n),i=t.length;let s,o,a,l=Ii(t,0);for(let u=0;u<i;++u){if(o=a,a=l,l=Ii(t,u+1),!a)continue;const c=a[n],d=a[r];o&&(s=(c-o[n])/3,a[`cp1${n}`]=c-s,a[`cp1${r}`]=d-s*e[u]),l&&(s=(l[n]-c)/3,a[`cp2${n}`]=c+s,a[`cp2${r}`]=d+s*e[u])}}function lM(t,e="x"){const n=Ok(e),r=t.length,i=Array(r).fill(0),s=Array(r);let o,a,l,u=Ii(t,0);for(o=0;o<r;++o)if(a=l,l=u,u=Ii(t,o+1),!!l){if(u){const c=u[e]-l[e];i[o]=c!==0?(u[n]-l[n])/c:0}s[o]=a?u?Nt(i[o-1])!==Nt(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}oM(t,i,s),aM(t,s,e)}function Ts(t,e,n){return Math.max(Math.min(t,n),e)}function uM(t,e){let n,r,i,s,o,a=$r(t[0],e);for(n=0,r=t.length;n<r;++n)o=s,s=a,a=n<r-1&&$r(t[n+1],e),s&&(i=t[n],o&&(i.cp1x=Ts(i.cp1x,e.left,e.right),i.cp1y=Ts(i.cp1y,e.top,e.bottom)),a&&(i.cp2x=Ts(i.cp2x,e.left,e.right),i.cp2y=Ts(i.cp2y,e.top,e.bottom)))}function cM(t,e,n,r,i){let s,o,a,l;if(e.spanGaps&&(t=t.filter(u=>!u.skip)),e.cubicInterpolationMode==="monotone")lM(t,i);else{let u=r?t[t.length-1]:t[0];for(s=0,o=t.length;s<o;++s)a=t[s],l=sM(u,a,t[Math.min(s+1,o-(r?0:1))%o],e.tension),a.cp1x=l.previous.x,a.cp1y=l.previous.y,a.cp2x=l.next.x,a.cp2y=l.next.y,u=a}e.capBezierPoints&&uM(t,n)}function wd(){return typeof window<"u"&&typeof document<"u"}function Sd(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function po(t,e,n){let r;return typeof t=="string"?(r=parseInt(t,10),t.indexOf("%")!==-1&&(r=r/100*e.parentNode[n])):r=t,r}const Sa=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function dM(t,e){return Sa(t).getPropertyValue(e)}const fM=["top","right","bottom","left"];function Nn(t,e,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const s=fM[i];r[s]=parseFloat(t[e+"-"+s+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const hM=(t,e,n)=>(t>0||e>0)&&(!n||!n.shadowRoot);function mM(t,e){const n=t.touches,r=n&&n.length?n[0]:t,{offsetX:i,offsetY:s}=r;let o=!1,a,l;if(hM(i,s,t.target))a=i,l=s;else{const u=e.getBoundingClientRect();a=r.clientX-u.left,l=r.clientY-u.top,o=!0}return{x:a,y:l,box:o}}function zn(t,e){if("native"in t)return t;const{canvas:n,currentDevicePixelRatio:r}=e,i=Sa(n),s=i.boxSizing==="border-box",o=Nn(i,"padding"),a=Nn(i,"border","width"),{x:l,y:u,box:c}=mM(t,n),d=o.left+(c&&a.left),f=o.top+(c&&a.top);let{width:h,height:m}=e;return s&&(h-=o.width+a.width,m-=o.height+a.height),{x:Math.round((l-d)/h*n.width/r),y:Math.round((u-f)/m*n.height/r)}}function pM(t,e,n){let r,i;if(e===void 0||n===void 0){const s=t&&Sd(t);if(!s)e=t.clientWidth,n=t.clientHeight;else{const o=s.getBoundingClientRect(),a=Sa(s),l=Nn(a,"border","width"),u=Nn(a,"padding");e=o.width-u.width-l.width,n=o.height-u.height-l.height,r=po(a.maxWidth,s,"clientWidth"),i=po(a.maxHeight,s,"clientHeight")}}return{width:e,height:n,maxWidth:r||fo,maxHeight:i||fo}}const en=t=>Math.round(t*10)/10;function gM(t,e,n,r){const i=Sa(t),s=Nn(i,"margin"),o=po(i.maxWidth,t,"clientWidth")||fo,a=po(i.maxHeight,t,"clientHeight")||fo,l=pM(t,e,n);let{width:u,height:c}=l;if(i.boxSizing==="content-box"){const f=Nn(i,"border","width"),h=Nn(i,"padding");u-=h.width+f.width,c-=h.height+f.height}return u=Math.max(0,u-s.width),c=Math.max(0,r?u/r:c-s.height),u=en(Math.min(u,o,l.maxWidth)),c=en(Math.min(c,a,l.maxHeight)),u&&!c&&(c=en(u/2)),(e!==void 0||n!==void 0)&&r&&l.height&&c>l.height&&(c=l.height,u=en(Math.floor(c*r))),{width:u,height:c}}function Lf(t,e,n){const r=e||1,i=en(t.height*r),s=en(t.width*r);t.height=en(t.height),t.width=en(t.width);const o=t.canvas;return o.style&&(n||!o.style.height&&!o.style.width)&&(o.style.height=`${t.height}px`,o.style.width=`${t.width}px`),t.currentDevicePixelRatio!==r||o.height!==i||o.width!==s?(t.currentDevicePixelRatio=r,o.height=i,o.width=s,t.ctx.setTransform(r,0,0,r,0,0),!0):!1}const vM=(function(){let t=!1;try{const e={get passive(){return t=!0,!1}};wd()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t})();function Ff(t,e){const n=dM(t,e),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function On(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:t.y+n*(e.y-t.y)}}function bM(t,e,n,r){return{x:t.x+n*(e.x-t.x),y:r==="middle"?n<.5?t.y:e.y:r==="after"?n<1?t.y:e.y:n>0?e.y:t.y}}function yM(t,e,n,r){const i={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},o=On(t,i,n),a=On(i,s,n),l=On(s,e,n),u=On(o,a,n),c=On(a,l,n);return On(u,c,n)}const _M=function(t,e){return{x(n){return t+t+e-n},setWidth(n){e=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},kM=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function ui(t,e,n){return t?_M(e,n):kM()}function Tk(t,e){let n,r;(e==="ltr"||e==="rtl")&&(n=t.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",e,"important"),t.prevTextDirection=r)}function Dk(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Pk(t){return t==="angle"?{between:kr,compare:$E,normalize:st}:{between:Vt,compare:(e,n)=>e-n,normalize:e=>e}}function Vf({start:t,end:e,count:n,loop:r,style:i}){return{start:t%n,end:e%n,loop:r&&(e-t+1)%n===0,style:i}}function $M(t,e,n){const{property:r,start:i,end:s}=n,{between:o,normalize:a}=Pk(r),l=e.length;let{start:u,end:c,loop:d}=t,f,h;if(d){for(u+=l,c+=l,f=0,h=l;f<h&&o(a(e[u%l][r]),i,s);++f)u--,c--;u%=l,c%=l}return c<u&&(c+=l),{start:u,end:c,loop:d,style:t.style}}function Ek(t,e,n){if(!n)return[t];const{property:r,start:i,end:s}=n,o=e.length,{compare:a,between:l,normalize:u}=Pk(r),{start:c,end:d,loop:f,style:h}=$M(t,e,n),m=[];let p=!1,g=null,b,k,$;const w=()=>l(i,$,b)&&a(i,$)!==0,_=()=>a(s,b)===0||l(s,$,b),I=()=>p||w(),z=()=>!p||_();for(let O=c,E=c;O<=d;++O)k=e[O%o],!k.skip&&(b=u(k[r]),b!==$&&(p=l(b,i,s),g===null&&I()&&(g=a(b,i)===0?O:E),g!==null&&z()&&(m.push(Vf({start:g,end:O,loop:f,count:o,style:h})),g=null),E=O,$=b));return g!==null&&m.push(Vf({start:g,end:d,loop:f,count:o,style:h})),m}function Mk(t,e){const n=[],r=t.segments;for(let i=0;i<r.length;i++){const s=Ek(r[i],t.points,e);s.length&&n.push(...s)}return n}function xM(t,e,n,r){let i=0,s=e-1;if(n&&!r)for(;i<e&&!t[i].skip;)i++;for(;i<e&&t[i].skip;)i++;for(i%=e,n&&(s+=i);s>i&&t[s%e].skip;)s--;return s%=e,{start:i,end:s}}function wM(t,e,n,r){const i=t.length,s=[];let o=e,a=t[e],l;for(l=e+1;l<=n;++l){const u=t[l%i];u.skip||u.stop?a.skip||(r=!1,s.push({start:e%i,end:(l-1)%i,loop:r}),e=o=u.stop?l:null):(o=l,a.skip&&(e=l)),a=u}return o!==null&&s.push({start:e%i,end:o%i,loop:r}),s}function SM(t,e){const n=t.points,r=t.options.spanGaps,i=n.length;if(!i)return[];const s=!!t._loop,{start:o,end:a}=xM(n,i,s,r);if(r===!0)return Wf(t,[{start:o,end:a,loop:s}],n,e);const l=a<o?a+i:a,u=!!t._fullLoop&&o===0&&a===i-1;return Wf(t,wM(n,o,l,u),n,e)}function Wf(t,e,n,r){return!r||!r.setContext||!n?e:IM(t,e,n,r)}function IM(t,e,n,r){const i=t._chart.getContext(),s=Hf(t.options),{_datasetIndex:o,options:{spanGaps:a}}=t,l=n.length,u=[];let c=s,d=e[0].start,f=d;function h(m,p,g,b){const k=a?-1:1;if(m!==p){for(m+=l;n[m%l].skip;)m-=k;for(;n[p%l].skip;)p+=k;m%l!==p%l&&(u.push({start:m%l,end:p%l,loop:g,style:b}),c=b,d=p%l)}}for(const m of e){d=a?d:m.start;let p=n[d%l],g;for(f=d+1;f<=m.end;f++){const b=n[f%l];g=Hf(r.setContext(Bn(i,{type:"segment",p0:p,p1:b,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:o}))),zM(g,c)&&h(d,f-1,m.loop,c),p=b,c=g}d<f-1&&h(d,f-1,m.loop,c)}return u}function Hf(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function zM(t,e){if(!e)return!1;const n=[],r=function(i,s){return bd(s)?(n.includes(s)||n.push(s),n.indexOf(s)):s};return JSON.stringify(t,r)!==JSON.stringify(e,r)}function Ds(t,e,n){return t.options.clip?t[n]:e[n]}function OM(t,e){const{xScale:n,yScale:r}=t;return n&&r?{left:Ds(n,e,"left"),right:Ds(n,e,"right"),top:Ds(r,e,"top"),bottom:Ds(r,e,"bottom")}:e}function Nk(t,e){const n=e._clip;if(n.disabled)return!1;const r=OM(e,t.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?t.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?t.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
|
|
115
|
+
*/function wA(){}const OH=(()=>{let t=0;return()=>t++})();function le(t){return t==null}function je(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return e.slice(0,7)==="[object"&&e.slice(-6)==="Array]"}function re(t){return t!==null&&Object.prototype.toString.call(t)==="[object Object]"}function ut(t){return(typeof t=="number"||t instanceof Number)&&isFinite(+t)}function lA(t,e){return ut(t)?t:e}function Z(t,e){return typeof t>"u"?e:t}const HH=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100:+t/e,$C=(t,e)=>typeof t=="string"&&t.endsWith("%")?parseFloat(t)/100*e:+t;function Ue(t,e,A){if(t&&typeof t.call=="function")return t.apply(A,e)}function ge(t,e,A,i){let n,r,s;if(je(t))for(r=t.length,n=0;n<r;n++)e.call(A,t[n],n);else if(re(t))for(s=Object.keys(t),r=s.length,n=0;n<r;n++)e.call(A,t[s[n]],s[n])}function ga(t,e){let A,i,n,r;if(!t||!e||t.length!==e.length)return!1;for(A=0,i=t.length;A<i;++A)if(n=t[A],r=e[A],n.datasetIndex!==r.datasetIndex||n.index!==r.index)return!1;return!0}function ma(t){if(je(t))return t.map(ma);if(re(t)){const e=Object.create(null),A=Object.keys(t),i=A.length;let n=0;for(;n<i;++n)e[A[n]]=ma(t[A[n]]);return e}return t}function TC(t){return["__proto__","prototype","constructor"].indexOf(t)===-1}function DH(t,e,A,i){if(!TC(t))return;const n=e[t],r=A[t];re(n)&&re(r)?Zr(n,r,i):e[t]=ma(r)}function Zr(t,e,A){const i=je(e)?e:[e],n=i.length;if(!re(t))return t;A=A||{};const r=A.merger||DH;let s;for(let o=0;o<n;++o){if(s=i[o],!re(s))continue;const a=Object.keys(s);for(let l=0,u=a.length;l<u;++l)r(a[l],t,s,A)}return t}function Ur(t,e){return Zr(t,e,{merger:LH})}function LH(t,e,A){if(!TC(t))return;const i=e[t],n=A[t];re(i)&&re(n)?Ur(i,n):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=ma(n))}const Xg={"":t=>t,x:t=>t.x,y:t=>t.y};function MH(t){const e=t.split("."),A=[];let i="";for(const n of e)i+=n,i.endsWith("\\")?i=i.slice(0,-1)+".":(A.push(i),i="");return A}function NH(t){const e=MH(t);return A=>{for(const i of e){if(i==="")break;A=A&&A[i]}return A}}function Nn(t,e){return(Xg[e]||(Xg[e]=NH(e)))(t)}function Eh(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Vr=t=>typeof t<"u",cn=t=>typeof t=="function",Yg=(t,e)=>{if(t.size!==e.size)return!1;for(const A of t)if(!e.has(A))return!1;return!0};function zH(t){return t.type==="mouseup"||t.type==="click"||t.type==="contextmenu"}const ye=Math.PI,Ee=2*ye,PH=Ee+ye,pa=Number.POSITIVE_INFINITY,RH=ye/180,Ge=ye/2,pn=ye/4,qg=ye*2/3,OC=Math.log10,gA=Math.sign;function Qr(t,e,A){return Math.abs(t-e)<A}function em(t){const e=Math.round(t);t=Qr(t,e,t/1e3)?e:t;const A=Math.pow(10,Math.floor(OC(t))),i=t/A;return(i<=1?1:i<=2?2:i<=5?5:10)*A}function KH(t){const e=[],A=Math.sqrt(t);let i;for(i=1;i<A;i++)t%i===0&&(e.push(i),e.push(t/i));return A===(A|0)&&e.push(A),e.sort((n,r)=>n-r).pop(),e}function ZH(t){return typeof t=="symbol"||typeof t=="object"&&t!==null&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}function Ti(t){return!ZH(t)&&!isNaN(parseFloat(t))&&isFinite(t)}function VH(t,e){const A=Math.round(t);return A-e<=t&&A+e>=t}function jH(t,e,A){let i,n,r;for(i=0,n=t.length;i<n;i++)r=t[i][A],isNaN(r)||(e.min=Math.min(e.min,r),e.max=Math.max(e.max,r))}function FA(t){return t*(ye/180)}function GH(t){return t*(180/ye)}function tm(t){if(!ut(t))return;let e=1,A=0;for(;Math.round(t*e)/e!==t;)e*=10,A++;return A}function HC(t,e){const A=e.x-t.x,i=e.y-t.y,n=Math.sqrt(A*A+i*i);let r=Math.atan2(i,A);return r<-.5*ye&&(r+=Ee),{angle:r,distance:n}}function cc(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function WH(t,e){return(t-e+PH)%Ee-ye}function Et(t){return(t%Ee+Ee)%Ee}function jr(t,e,A,i){const n=Et(t),r=Et(e),s=Et(A),o=Et(r-n),a=Et(s-n),l=Et(n-r),u=Et(n-s);return n===r||n===s||i&&r===s||o>a&&l<u}function at(t,e,A){return Math.max(e,Math.min(A,t))}function JH(t){return at(t,-32768,32767)}function IA(t,e,A,i=1e-6){return t>=Math.min(e,A)-i&&t<=Math.max(e,A)+i}function $h(t,e,A){A=A||(s=>t[s]<e);let i=t.length-1,n=0,r;for(;i-n>1;)r=n+i>>1,A(r)?n=r:i=r;return{lo:n,hi:i}}const Fn=(t,e,A,i)=>$h(t,A,i?n=>{const r=t[n][e];return r<A||r===A&&t[n+1][e]===A}:n=>t[n][e]<A),XH=(t,e,A)=>$h(t,A,i=>t[i][e]>=A);function YH(t,e,A){let i=0,n=t.length;for(;i<n&&t[i]<e;)i++;for(;n>i&&t[n-1]>A;)n--;return i>0||n<t.length?t.slice(i,n):t}const DC=["push","pop","shift","splice","unshift"];function qH(t,e){if(t._chartjs){t._chartjs.listeners.push(e);return}Object.defineProperty(t,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),DC.forEach(A=>{const i="_onData"+Eh(A),n=t[A];Object.defineProperty(t,A,{configurable:!0,enumerable:!1,value(...r){const s=n.apply(this,r);return t._chartjs.listeners.forEach(o=>{typeof o[i]=="function"&&o[i](...r)}),s}})})}function Am(t,e){const A=t._chartjs;if(!A)return;const i=A.listeners,n=i.indexOf(e);n!==-1&&i.splice(n,1),!(i.length>0)&&(DC.forEach(r=>{delete t[r]}),delete t._chartjs)}function LC(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}const MC=(function(){return typeof window>"u"?function(t){return t()}:window.requestAnimationFrame})();function NC(t,e){let A=[],i=!1;return function(...n){A=n,i||(i=!0,MC.call(window,()=>{i=!1,t.apply(e,A)}))}}function eD(t,e){let A;return function(...i){return e?(clearTimeout(A),A=setTimeout(t,e,i)):t.apply(this,i),e}}const zC=t=>t==="start"?"left":t==="end"?"right":"center",St=(t,e,A)=>t==="start"?e:t==="end"?A:(e+A)/2,tD=(t,e,A,i)=>t===(i?"left":"right")?A:t==="center"?(e+A)/2:e;function PC(t,e,A){const i=e.length;let n=0,r=i;if(t._sorted){const{iScale:s,vScale:o,_parsed:a}=t,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,u=s.axis,{min:c,max:d,minDefined:f,maxDefined:h}=s.getUserBounds();if(f){if(n=Math.min(Fn(a,u,c).lo,A?i:Fn(e,u,s.getPixelForValue(c)).lo),l){const g=a.slice(0,n+1).reverse().findIndex(m=>!le(m[o.axis]));n-=Math.max(0,g)}n=at(n,0,i-1)}if(h){let g=Math.max(Fn(a,s.axis,d,!0).hi+1,A?0:Fn(e,u,s.getPixelForValue(d),!0).hi+1);if(l){const m=a.slice(g-1).findIndex(p=>!le(p[o.axis]));g+=Math.max(0,m)}r=at(g,n,i)-n}else r=i-n}return{start:n,count:r}}function RC(t){const{xScale:e,yScale:A,_scaleRanges:i}=t,n={xmin:e.min,xmax:e.max,ymin:A.min,ymax:A.max};if(!i)return t._scaleRanges=n,!0;const r=i.xmin!==e.min||i.xmax!==e.max||i.ymin!==A.min||i.ymax!==A.max;return Object.assign(i,n),r}const no=t=>t===0||t===1,nm=(t,e,A)=>-(Math.pow(2,10*(t-=1))*Math.sin((t-e)*Ee/A)),im=(t,e,A)=>Math.pow(2,-10*t)*Math.sin((t-e)*Ee/A)+1,xr={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>-Math.cos(t*Ge)+1,easeOutSine:t=>Math.sin(t*Ge),easeInOutSine:t=>-.5*(Math.cos(ye*t)-1),easeInExpo:t=>t===0?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>t===1?1:-Math.pow(2,-10*t)+1,easeInOutExpo:t=>no(t)?t:t<.5?.5*Math.pow(2,10*(t*2-1)):.5*(-Math.pow(2,-10*(t*2-1))+2),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>no(t)?t:nm(t,.075,.3),easeOutElastic:t=>no(t)?t:im(t,.075,.3),easeInOutElastic(t){return no(t)?t:t<.5?.5*nm(t*2,.1125,.45):.5+.5*im(t*2-1,.1125,.45)},easeInBack(t){return t*t*((1.70158+1)*t-1.70158)},easeOutBack(t){return(t-=1)*t*((1.70158+1)*t+1.70158)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?.5*(t*t*(((e*=1.525)+1)*t-e)):.5*((t-=2)*t*(((e*=1.525)+1)*t+e)+2)},easeInBounce:t=>1-xr.easeOutBounce(1-t),easeOutBounce(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},easeInOutBounce:t=>t<.5?xr.easeInBounce(t*2)*.5:xr.easeOutBounce(t*2-1)*.5+.5};function Th(t){if(t&&typeof t=="object"){const e=t.toString();return e==="[object CanvasPattern]"||e==="[object CanvasGradient]"}return!1}function rm(t){return Th(t)?t:new Kr(t)}function lu(t){return Th(t)?t:new Kr(t).saturate(.5).darken(.1).hexString()}const AD=["x","y","borderWidth","radius","tension"],nD=["color","borderColor","backgroundColor"];function iD(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:e=>e!=="onProgress"&&e!=="onComplete"&&e!=="fn"}),t.set("animations",{colors:{type:"color",properties:nD},numbers:{type:"number",properties:AD}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:e=>e|0}}}})}function rD(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const sm=new Map;function sD(t,e){e=e||{};const A=t+JSON.stringify(e);let i=sm.get(A);return i||(i=new Intl.NumberFormat(t,e),sm.set(A,i)),i}function Oh(t,e,A){return sD(e,A).format(t)}const oD={values(t){return je(t)?t:""+t},numeric(t,e,A){if(t===0)return"0";const i=this.chart.options.locale;let n,r=t;if(A.length>1){const l=Math.max(Math.abs(A[0].value),Math.abs(A[A.length-1].value));(l<1e-4||l>1e15)&&(n="scientific"),r=aD(t,A)}const s=OC(Math.abs(r)),o=isNaN(s)?1:Math.max(Math.min(-1*Math.floor(s),20),0),a={notation:n,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(a,this.options.ticks.format),Oh(t,i,a)}};function aD(t,e){let A=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(A)>=1&&t!==Math.floor(t)&&(A=t-Math.floor(t)),A}var KC={formatters:oD};function lD(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(e,A)=>A.lineWidth,tickColor:(e,A)=>A.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:KC.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:e=>!e.startsWith("before")&&!e.startsWith("after")&&e!=="callback"&&e!=="parser",_indexable:e=>e!=="borderDash"&&e!=="tickBorderDash"&&e!=="dash"}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:e=>e!=="backdropPadding"&&e!=="callback",_indexable:e=>e!=="backdropPadding"})}const zn=Object.create(null),dc=Object.create(null);function Fr(t,e){if(!e)return t;const A=e.split(".");for(let i=0,n=A.length;i<n;++i){const r=A[i];t=t[r]||(t[r]=Object.create(null))}return t}function uu(t,e,A){return typeof e=="string"?Zr(Fr(t,e),A):Zr(Fr(t,""),e)}class uD{constructor(e,A){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=i=>i.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(i,n)=>lu(n.backgroundColor),this.hoverBorderColor=(i,n)=>lu(n.borderColor),this.hoverColor=(i,n)=>lu(n.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(e),this.apply(A)}set(e,A){return uu(this,e,A)}get(e){return Fr(this,e)}describe(e,A){return uu(dc,e,A)}override(e,A){return uu(zn,e,A)}route(e,A,i,n){const r=Fr(this,e),s=Fr(this,i),o="_"+A;Object.defineProperties(r,{[o]:{value:r[A],writable:!0},[A]:{enumerable:!0,get(){const a=this[o],l=s[n];return re(a)?Object.assign({},l,a):Z(a,l)},set(a){this[o]=a}}})}apply(e){e.forEach(A=>A(this))}}var me=new uD({_scriptable:t=>!t.startsWith("on"),_indexable:t=>t!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[iD,rD,lD]);function cD(t){return!t||le(t.size)||le(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}function om(t,e,A,i,n){let r=e[n];return r||(r=e[n]=t.measureText(n).width,A.push(n)),r>i&&(i=r),i}function vn(t,e,A){const i=t.currentDevicePixelRatio,n=A!==0?Math.max(A/2,.5):0;return Math.round((e-n)*i)/i+n}function am(t,e){!e&&!t||(e=e||t.getContext("2d"),e.save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function fc(t,e,A,i){ZC(t,e,A,i,null)}function ZC(t,e,A,i,n){let r,s,o,a,l,u,c,d;const f=e.pointStyle,h=e.rotation,g=e.radius;let m=(h||0)*RH;if(f&&typeof f=="object"&&(r=f.toString(),r==="[object HTMLImageElement]"||r==="[object HTMLCanvasElement]")){t.save(),t.translate(A,i),t.rotate(m),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),t.restore();return}if(!(isNaN(g)||g<=0)){switch(t.beginPath(),f){default:n?t.ellipse(A,i,n/2,g,0,0,Ee):t.arc(A,i,g,0,Ee),t.closePath();break;case"triangle":u=n?n/2:g,t.moveTo(A+Math.sin(m)*u,i-Math.cos(m)*g),m+=qg,t.lineTo(A+Math.sin(m)*u,i-Math.cos(m)*g),m+=qg,t.lineTo(A+Math.sin(m)*u,i-Math.cos(m)*g),t.closePath();break;case"rectRounded":l=g*.516,a=g-l,s=Math.cos(m+pn)*a,c=Math.cos(m+pn)*(n?n/2-l:a),o=Math.sin(m+pn)*a,d=Math.sin(m+pn)*(n?n/2-l:a),t.arc(A-c,i-o,l,m-ye,m-Ge),t.arc(A+d,i-s,l,m-Ge,m),t.arc(A+c,i+o,l,m,m+Ge),t.arc(A-d,i+s,l,m+Ge,m+ye),t.closePath();break;case"rect":if(!h){a=Math.SQRT1_2*g,u=n?n/2:a,t.rect(A-u,i-a,2*u,2*a);break}m+=pn;case"rectRot":c=Math.cos(m)*(n?n/2:g),s=Math.cos(m)*g,o=Math.sin(m)*g,d=Math.sin(m)*(n?n/2:g),t.moveTo(A-c,i-o),t.lineTo(A+d,i-s),t.lineTo(A+c,i+o),t.lineTo(A-d,i+s),t.closePath();break;case"crossRot":m+=pn;case"cross":c=Math.cos(m)*(n?n/2:g),s=Math.cos(m)*g,o=Math.sin(m)*g,d=Math.sin(m)*(n?n/2:g),t.moveTo(A-c,i-o),t.lineTo(A+c,i+o),t.moveTo(A+d,i-s),t.lineTo(A-d,i+s);break;case"star":c=Math.cos(m)*(n?n/2:g),s=Math.cos(m)*g,o=Math.sin(m)*g,d=Math.sin(m)*(n?n/2:g),t.moveTo(A-c,i-o),t.lineTo(A+c,i+o),t.moveTo(A+d,i-s),t.lineTo(A-d,i+s),m+=pn,c=Math.cos(m)*(n?n/2:g),s=Math.cos(m)*g,o=Math.sin(m)*g,d=Math.sin(m)*(n?n/2:g),t.moveTo(A-c,i-o),t.lineTo(A+c,i+o),t.moveTo(A+d,i-s),t.lineTo(A-d,i+s);break;case"line":s=n?n/2:Math.cos(m)*g,o=Math.sin(m)*g,t.moveTo(A-s,i-o),t.lineTo(A+s,i+o);break;case"dash":t.moveTo(A,i),t.lineTo(A+Math.cos(m)*(n?n/2:g),i+Math.sin(m)*g);break;case!1:t.closePath();break}t.fill(),e.borderWidth>0&&t.stroke()}}function Gr(t,e,A){return A=A||.5,!e||t&&t.x>e.left-A&&t.x<e.right+A&&t.y>e.top-A&&t.y<e.bottom+A}function Hs(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Ds(t){t.restore()}function dD(t,e,A,i,n){if(!e)return t.lineTo(A.x,A.y);if(n==="middle"){const r=(e.x+A.x)/2;t.lineTo(r,e.y),t.lineTo(r,A.y)}else n==="after"!=!!i?t.lineTo(e.x,A.y):t.lineTo(A.x,e.y);t.lineTo(A.x,A.y)}function fD(t,e,A,i){if(!e)return t.lineTo(A.x,A.y);t.bezierCurveTo(i?e.cp1x:e.cp2x,i?e.cp1y:e.cp2y,i?A.cp2x:A.cp1x,i?A.cp2y:A.cp1y,A.x,A.y)}function hD(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),le(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}function gD(t,e,A,i,n){if(n.strikethrough||n.underline){const r=t.measureText(i),s=e-r.actualBoundingBoxLeft,o=e+r.actualBoundingBoxRight,a=A-r.actualBoundingBoxAscent,l=A+r.actualBoundingBoxDescent,u=n.strikethrough?(a+l)/2:l;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=n.decorationWidth||2,t.moveTo(s,u),t.lineTo(o,u),t.stroke()}}function mD(t,e){const A=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=A}function va(t,e,A,i,n,r={}){const s=je(e)?e:[e],o=r.strokeWidth>0&&r.strokeColor!=="";let a,l;for(t.save(),t.font=n.string,hD(t,r),a=0;a<s.length;++a)l=s[a],r.backdrop&&mD(t,r.backdrop),o&&(r.strokeColor&&(t.strokeStyle=r.strokeColor),le(r.strokeWidth)||(t.lineWidth=r.strokeWidth),t.strokeText(l,A,i,r.maxWidth)),t.fillText(l,A,i,r.maxWidth),gD(t,A,i,l,r),i+=Number(n.lineHeight);t.restore()}function Ba(t,e){const{x:A,y:i,w:n,h:r,radius:s}=e;t.arc(A+s.topLeft,i+s.topLeft,s.topLeft,1.5*ye,ye,!0),t.lineTo(A,i+r-s.bottomLeft),t.arc(A+s.bottomLeft,i+r-s.bottomLeft,s.bottomLeft,ye,Ge,!0),t.lineTo(A+n-s.bottomRight,i+r),t.arc(A+n-s.bottomRight,i+r-s.bottomRight,s.bottomRight,Ge,0,!0),t.lineTo(A+n,i+s.topRight),t.arc(A+n-s.topRight,i+s.topRight,s.topRight,0,-Ge,!0),t.lineTo(A+s.topLeft,i)}const pD=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,vD=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function BD(t,e){const A=(""+t).match(pD);if(!A||A[1]==="normal")return e*1.2;switch(t=+A[2],A[3]){case"px":return t;case"%":t/=100;break}return e*t}const wD=t=>+t||0;function Hh(t,e){const A={},i=re(e),n=i?Object.keys(e):e,r=re(t)?i?s=>Z(t[s],t[e[s]]):s=>t[s]:()=>t;for(const s of n)A[s]=wD(r(s));return A}function VC(t){return Hh(t,{top:"y",right:"x",bottom:"y",left:"x"})}function pi(t){return Hh(t,["topLeft","topRight","bottomLeft","bottomRight"])}function sA(t){const e=VC(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function xt(t,e){t=t||{},e=e||me.font;let A=Z(t.size,e.size);typeof A=="string"&&(A=parseInt(A,10));let i=Z(t.style,e.style);i&&!(""+i).match(vD)&&(console.warn('Invalid font style specified: "'+i+'"'),i=void 0);const n={family:Z(t.family,e.family),lineHeight:BD(Z(t.lineHeight,e.lineHeight),A),size:A,style:i,weight:Z(t.weight,e.weight),string:""};return n.string=cD(n),n}function io(t,e,A,i){let n,r,s;for(n=0,r=t.length;n<r;++n)if(s=t[n],s!==void 0&&s!==void 0)return s}function yD(t,e,A){const{min:i,max:n}=t,r=$C(e,(n-i)/2),s=(o,a)=>A&&o===0?0:o+a;return{min:s(i,-Math.abs(r)),max:s(n,r)}}function Gn(t,e){return Object.assign(Object.create(t),e)}function Dh(t,e=[""],A,i,n=()=>t[0]){const r=A||t;typeof i>"u"&&(i=JC("_fallback",t));const s={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:r,_fallback:i,_getTarget:n,override:o=>Dh([o,...t],e,r,i)};return new Proxy(s,{deleteProperty(o,a){return delete o[a],delete o._keys,delete t[0][a],!0},get(o,a){return GC(o,a,()=>ID(a,e,t,o))},getOwnPropertyDescriptor(o,a){return Reflect.getOwnPropertyDescriptor(o._scopes[0],a)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(o,a){return um(o).includes(a)},ownKeys(o){return um(o)},set(o,a,l){const u=o._storage||(o._storage=n());return o[a]=u[a]=l,delete o._keys,!0}})}function Oi(t,e,A,i){const n={_cacheable:!1,_proxy:t,_context:e,_subProxy:A,_stack:new Set,_descriptors:jC(t,i),setContext:r=>Oi(t,r,A,i),override:r=>Oi(t.override(r),e,A,i)};return new Proxy(n,{deleteProperty(r,s){return delete r[s],delete t[s],!0},get(r,s,o){return GC(r,s,()=>_D(r,s,o))},getOwnPropertyDescriptor(r,s){return r._descriptors.allKeys?Reflect.has(t,s)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,s)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(r,s){return Reflect.has(t,s)},ownKeys(){return Reflect.ownKeys(t)},set(r,s,o){return t[s]=o,delete r[s],!0}})}function jC(t,e={scriptable:!0,indexable:!0}){const{_scriptable:A=e.scriptable,_indexable:i=e.indexable,_allKeys:n=e.allKeys}=t;return{allKeys:n,scriptable:A,indexable:i,isScriptable:cn(A)?A:()=>A,isIndexable:cn(i)?i:()=>i}}const bD=(t,e)=>t?t+Eh(e):e,Lh=(t,e)=>re(e)&&t!=="adapters"&&(Object.getPrototypeOf(e)===null||e.constructor===Object);function GC(t,e,A){if(Object.prototype.hasOwnProperty.call(t,e)||e==="constructor")return t[e];const i=A();return t[e]=i,i}function _D(t,e,A){const{_proxy:i,_context:n,_subProxy:r,_descriptors:s}=t;let o=i[e];return cn(o)&&s.isScriptable(e)&&(o=CD(e,o,t,A)),je(o)&&o.length&&(o=UD(e,o,t,s.isIndexable)),Lh(e,o)&&(o=Oi(o,n,r&&r[e],s)),o}function CD(t,e,A,i){const{_proxy:n,_context:r,_subProxy:s,_stack:o}=A;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let a=e(r,s||i);return o.delete(t),Lh(t,a)&&(a=Mh(n._scopes,n,t,a)),a}function UD(t,e,A,i){const{_proxy:n,_context:r,_subProxy:s,_descriptors:o}=A;if(typeof r.index<"u"&&i(t))return e[r.index%e.length];if(re(e[0])){const a=e,l=n._scopes.filter(u=>u!==a);e=[];for(const u of a){const c=Mh(l,n,t,u);e.push(Oi(c,r,s&&s[t],o))}}return e}function WC(t,e,A){return cn(t)?t(e,A):t}const QD=(t,e)=>t===!0?e:typeof t=="string"?Nn(e,t):void 0;function xD(t,e,A,i,n){for(const r of e){const s=QD(A,r);if(s){t.add(s);const o=WC(s._fallback,A,n);if(typeof o<"u"&&o!==A&&o!==i)return o}else if(s===!1&&typeof i<"u"&&A!==i)return null}return!1}function Mh(t,e,A,i){const n=e._rootScopes,r=WC(e._fallback,A,i),s=[...t,...n],o=new Set;o.add(i);let a=lm(o,s,A,r||A,i);return a===null||typeof r<"u"&&r!==A&&(a=lm(o,s,r,a,i),a===null)?!1:Dh(Array.from(o),[""],n,r,()=>FD(e,A,i))}function lm(t,e,A,i,n){for(;A;)A=xD(t,e,A,i,n);return A}function FD(t,e,A){const i=t._getTarget();e in i||(i[e]={});const n=i[e];return je(n)&&re(A)?A:n||{}}function ID(t,e,A,i){let n;for(const r of e)if(n=JC(bD(r,t),A),typeof n<"u")return Lh(t,n)?Mh(A,i,t,n):n}function JC(t,e){for(const A of e){if(!A)continue;const i=A[t];if(typeof i<"u")return i}}function um(t){let e=t._keys;return e||(e=t._keys=SD(t._scopes)),e}function SD(t){const e=new Set;for(const A of t)for(const i of Object.keys(A).filter(n=>!n.startsWith("_")))e.add(i);return Array.from(e)}const kD=Number.EPSILON||1e-14,Hi=(t,e)=>e<t.length&&!t[e].skip&&t[e],XC=t=>t==="x"?"y":"x";function ED(t,e,A,i){const n=t.skip?e:t,r=e,s=A.skip?e:A,o=cc(r,n),a=cc(s,r);let l=o/(o+a),u=a/(o+a);l=isNaN(l)?0:l,u=isNaN(u)?0:u;const c=i*l,d=i*u;return{previous:{x:r.x-c*(s.x-n.x),y:r.y-c*(s.y-n.y)},next:{x:r.x+d*(s.x-n.x),y:r.y+d*(s.y-n.y)}}}function $D(t,e,A){const i=t.length;let n,r,s,o,a,l=Hi(t,0);for(let u=0;u<i-1;++u)if(a=l,l=Hi(t,u+1),!(!a||!l)){if(Qr(e[u],0,kD)){A[u]=A[u+1]=0;continue}n=A[u]/e[u],r=A[u+1]/e[u],o=Math.pow(n,2)+Math.pow(r,2),!(o<=9)&&(s=3/Math.sqrt(o),A[u]=n*s*e[u],A[u+1]=r*s*e[u])}}function TD(t,e,A="x"){const i=XC(A),n=t.length;let r,s,o,a=Hi(t,0);for(let l=0;l<n;++l){if(s=o,o=a,a=Hi(t,l+1),!o)continue;const u=o[A],c=o[i];s&&(r=(u-s[A])/3,o[`cp1${A}`]=u-r,o[`cp1${i}`]=c-r*e[l]),a&&(r=(a[A]-u)/3,o[`cp2${A}`]=u+r,o[`cp2${i}`]=c+r*e[l])}}function OD(t,e="x"){const A=XC(e),i=t.length,n=Array(i).fill(0),r=Array(i);let s,o,a,l=Hi(t,0);for(s=0;s<i;++s)if(o=a,a=l,l=Hi(t,s+1),!!a){if(l){const u=l[e]-a[e];n[s]=u!==0?(l[A]-a[A])/u:0}r[s]=o?l?gA(n[s-1])!==gA(n[s])?0:(n[s-1]+n[s])/2:n[s-1]:n[s]}$D(t,n,r),TD(t,r,e)}function ro(t,e,A){return Math.max(Math.min(t,A),e)}function HD(t,e){let A,i,n,r,s,o=Gr(t[0],e);for(A=0,i=t.length;A<i;++A)s=r,r=o,o=A<i-1&&Gr(t[A+1],e),r&&(n=t[A],s&&(n.cp1x=ro(n.cp1x,e.left,e.right),n.cp1y=ro(n.cp1y,e.top,e.bottom)),o&&(n.cp2x=ro(n.cp2x,e.left,e.right),n.cp2y=ro(n.cp2y,e.top,e.bottom)))}function DD(t,e,A,i,n){let r,s,o,a;if(e.spanGaps&&(t=t.filter(l=>!l.skip)),e.cubicInterpolationMode==="monotone")OD(t,n);else{let l=i?t[t.length-1]:t[0];for(r=0,s=t.length;r<s;++r)o=t[r],a=ED(l,o,t[Math.min(r+1,s-(i?0:1))%s],e.tension),o.cp1x=a.previous.x,o.cp1y=a.previous.y,o.cp2x=a.next.x,o.cp2y=a.next.y,l=o}e.capBezierPoints&&HD(t,A)}function Nh(){return typeof window<"u"&&typeof document<"u"}function zh(t){let e=t.parentNode;return e&&e.toString()==="[object ShadowRoot]"&&(e=e.host),e}function wa(t,e,A){let i;return typeof t=="string"?(i=parseInt(t,10),t.indexOf("%")!==-1&&(i=i/100*e.parentNode[A])):i=t,i}const Ml=t=>t.ownerDocument.defaultView.getComputedStyle(t,null);function LD(t,e){return Ml(t).getPropertyValue(e)}const MD=["top","right","bottom","left"];function $n(t,e,A){const i={};A=A?"-"+A:"";for(let n=0;n<4;n++){const r=MD[n];i[r]=parseFloat(t[e+"-"+r+A])||0}return i.width=i.left+i.right,i.height=i.top+i.bottom,i}const ND=(t,e,A)=>(t>0||e>0)&&(!A||!A.shadowRoot);function zD(t,e){const A=t.touches,i=A&&A.length?A[0]:t,{offsetX:n,offsetY:r}=i;let s=!1,o,a;if(ND(n,r,t.target))o=n,a=r;else{const l=e.getBoundingClientRect();o=i.clientX-l.left,a=i.clientY-l.top,s=!0}return{x:o,y:a,box:s}}function Cn(t,e){if("native"in t)return t;const{canvas:A,currentDevicePixelRatio:i}=e,n=Ml(A),r=n.boxSizing==="border-box",s=$n(n,"padding"),o=$n(n,"border","width"),{x:a,y:l,box:u}=zD(t,A),c=s.left+(u&&o.left),d=s.top+(u&&o.top);let{width:f,height:h}=e;return r&&(f-=s.width+o.width,h-=s.height+o.height),{x:Math.round((a-c)/f*A.width/i),y:Math.round((l-d)/h*A.height/i)}}function PD(t,e,A){let i,n;if(e===void 0||A===void 0){const r=t&&zh(t);if(!r)e=t.clientWidth,A=t.clientHeight;else{const s=r.getBoundingClientRect(),o=Ml(r),a=$n(o,"border","width"),l=$n(o,"padding");e=s.width-l.width-a.width,A=s.height-l.height-a.height,i=wa(o.maxWidth,r,"clientWidth"),n=wa(o.maxHeight,r,"clientHeight")}}return{width:e,height:A,maxWidth:i||pa,maxHeight:n||pa}}const ZA=t=>Math.round(t*10)/10;function RD(t,e,A,i){const n=Ml(t),r=$n(n,"margin"),s=wa(n.maxWidth,t,"clientWidth")||pa,o=wa(n.maxHeight,t,"clientHeight")||pa,a=PD(t,e,A);let{width:l,height:u}=a;if(n.boxSizing==="content-box"){const d=$n(n,"border","width"),f=$n(n,"padding");l-=f.width+d.width,u-=f.height+d.height}return l=Math.max(0,l-r.width),u=Math.max(0,i?l/i:u-r.height),l=ZA(Math.min(l,s,a.maxWidth)),u=ZA(Math.min(u,o,a.maxHeight)),l&&!u&&(u=ZA(l/2)),(e!==void 0||A!==void 0)&&i&&a.height&&u>a.height&&(u=a.height,l=ZA(Math.floor(u*i))),{width:l,height:u}}function cm(t,e,A){const i=e||1,n=ZA(t.height*i),r=ZA(t.width*i);t.height=ZA(t.height),t.width=ZA(t.width);const s=t.canvas;return s.style&&(A||!s.style.height&&!s.style.width)&&(s.style.height=`${t.height}px`,s.style.width=`${t.width}px`),t.currentDevicePixelRatio!==i||s.height!==n||s.width!==r?(t.currentDevicePixelRatio=i,s.height=n,s.width=r,t.ctx.setTransform(i,0,0,i,0,0),!0):!1}const KD=(function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Nh()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch{}return t})();function dm(t,e){const A=LD(t,e),i=A&&A.match(/^(\d+)(\.\d+)?px$/);return i?+i[1]:void 0}function Un(t,e,A,i){return{x:t.x+A*(e.x-t.x),y:t.y+A*(e.y-t.y)}}function ZD(t,e,A,i){return{x:t.x+A*(e.x-t.x),y:i==="middle"?A<.5?t.y:e.y:i==="after"?A<1?t.y:e.y:A>0?e.y:t.y}}function VD(t,e,A,i){const n={x:t.cp2x,y:t.cp2y},r={x:e.cp1x,y:e.cp1y},s=Un(t,n,A),o=Un(n,r,A),a=Un(r,e,A),l=Un(s,o,A),u=Un(o,a,A);return Un(l,u,A)}const jD=function(t,e){return{x(A){return t+t+e-A},setWidth(A){e=A},textAlign(A){return A==="center"?A:A==="right"?"left":"right"},xPlus(A,i){return A-i},leftForLtr(A,i){return A-i}}},GD=function(){return{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}};function vi(t,e,A){return t?jD(e,A):GD()}function YC(t,e){let A,i;(e==="ltr"||e==="rtl")&&(A=t.canvas.style,i=[A.getPropertyValue("direction"),A.getPropertyPriority("direction")],A.setProperty("direction",e,"important"),t.prevTextDirection=i)}function qC(t,e){e!==void 0&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function eU(t){return t==="angle"?{between:jr,compare:WH,normalize:Et}:{between:IA,compare:(e,A)=>e-A,normalize:e=>e}}function fm({start:t,end:e,count:A,loop:i,style:n}){return{start:t%A,end:e%A,loop:i&&(e-t+1)%A===0,style:n}}function WD(t,e,A){const{property:i,start:n,end:r}=A,{between:s,normalize:o}=eU(i),a=e.length;let{start:l,end:u,loop:c}=t,d,f;if(c){for(l+=a,u+=a,d=0,f=a;d<f&&s(o(e[l%a][i]),n,r);++d)l--,u--;l%=a,u%=a}return u<l&&(u+=a),{start:l,end:u,loop:c,style:t.style}}function tU(t,e,A){if(!A)return[t];const{property:i,start:n,end:r}=A,s=e.length,{compare:o,between:a,normalize:l}=eU(i),{start:u,end:c,loop:d,style:f}=WD(t,e,A),h=[];let g=!1,m=null,p,B,b;const _=()=>a(n,b,p)&&o(n,b)!==0,y=()=>o(r,p)===0||a(r,b,p),w=()=>g||_(),U=()=>!g||y();for(let F=u,x=u;F<=c;++F)B=e[F%s],!B.skip&&(p=l(B[i]),p!==b&&(g=a(p,n,r),m===null&&w()&&(m=o(p,n)===0?F:x),m!==null&&U()&&(h.push(fm({start:m,end:F,loop:d,count:s,style:f})),m=null),x=F,b=p));return m!==null&&h.push(fm({start:m,end:c,loop:d,count:s,style:f})),h}function AU(t,e){const A=[],i=t.segments;for(let n=0;n<i.length;n++){const r=tU(i[n],t.points,e);r.length&&A.push(...r)}return A}function JD(t,e,A,i){let n=0,r=e-1;if(A&&!i)for(;n<e&&!t[n].skip;)n++;for(;n<e&&t[n].skip;)n++;for(n%=e,A&&(r+=n);r>n&&t[r%e].skip;)r--;return r%=e,{start:n,end:r}}function XD(t,e,A,i){const n=t.length,r=[];let s=e,o=t[e],a;for(a=e+1;a<=A;++a){const l=t[a%n];l.skip||l.stop?o.skip||(i=!1,r.push({start:e%n,end:(a-1)%n,loop:i}),e=s=l.stop?a:null):(s=a,o.skip&&(e=a)),o=l}return s!==null&&r.push({start:e%n,end:s%n,loop:i}),r}function YD(t,e){const A=t.points,i=t.options.spanGaps,n=A.length;if(!n)return[];const r=!!t._loop,{start:s,end:o}=JD(A,n,r,i);if(i===!0)return hm(t,[{start:s,end:o,loop:r}],A,e);const a=o<s?o+n:o,l=!!t._fullLoop&&s===0&&o===n-1;return hm(t,XD(A,s,a,l),A,e)}function hm(t,e,A,i){return!i||!i.setContext||!A?e:qD(t,e,A,i)}function qD(t,e,A,i){const n=t._chart.getContext(),r=gm(t.options),{_datasetIndex:s,options:{spanGaps:o}}=t,a=A.length,l=[];let u=r,c=e[0].start,d=c;function f(h,g,m,p){const B=o?-1:1;if(h!==g){for(h+=a;A[h%a].skip;)h-=B;for(;A[g%a].skip;)g+=B;h%a!==g%a&&(l.push({start:h%a,end:g%a,loop:m,style:p}),u=p,c=g%a)}}for(const h of e){c=o?c:h.start;let g=A[c%a],m;for(d=c+1;d<=h.end;d++){const p=A[d%a];m=gm(i.setContext(Gn(n,{type:"segment",p0:g,p1:p,p0DataIndex:(d-1)%a,p1DataIndex:d%a,datasetIndex:s}))),eL(m,u)&&f(c,d-1,h.loop,u),g=p,u=m}c<d-1&&f(c,d-1,h.loop,u)}return l}function gm(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function eL(t,e){if(!e)return!1;const A=[],i=function(n,r){return Th(r)?(A.includes(r)||A.push(r),A.indexOf(r)):r};return JSON.stringify(t,i)!==JSON.stringify(e,i)}function so(t,e,A){return t.options.clip?t[A]:e[A]}function tL(t,e){const{xScale:A,yScale:i}=t;return A&&i?{left:so(A,e,"left"),right:so(A,e,"right"),top:so(i,e,"top"),bottom:so(i,e,"bottom")}:e}function nU(t,e){const A=e._clip;if(A.disabled)return!1;const i=tL(e,t.chartArea);return{left:A.left===!1?0:i.left-(A.left===!0?0:A.left),right:A.right===!1?t.width:i.right+(A.right===!0?0:A.right),top:A.top===!1?0:i.top-(A.top===!0?0:A.top),bottom:A.bottom===!1?t.height:i.bottom+(A.bottom===!0?0:A.bottom)}}/*!
|
|
116
116
|
* Chart.js v4.5.1
|
|
117
117
|
* https://www.chartjs.org
|
|
118
118
|
* (c) 2025 Chart.js Contributors
|
|
119
119
|
* Released under the MIT License
|
|
120
|
-
*/class TM{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,n,r,i){const s=n.listeners[i],o=n.duration;s.forEach(a=>a({chart:e,initial:n.initial,numSteps:o,currentStep:Math.min(r-n.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=gk.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const s=r.items;let o=s.length-1,a=!1,l;for(;o>=0;--o)l=s[o],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(e),a=!0):(s[o]=s[s.length-1],s.pop());a&&(i.draw(),this._notify(i,r,e,"progress")),s.length||(r.running=!1,this._notify(i,r,e,"complete"),r.initial=!1),n+=s.length}),this._lastDate=e,n===0&&(this._running=!1)}_getAnims(e){const n=this._charts;let r=n.get(e);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(e,r)),r}listen(e,n,r){this._getAnims(e).listeners[n].push(r)}add(e,n){!n||!n.length||this._getAnims(e).items.push(...n)}has(e){return this._getAnims(e).items.length>0}start(e){const n=this._charts.get(e);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(e){if(!this._running)return!1;const n=this._charts.get(e);return!(!n||!n.running||!n.items.length)}stop(e){const n=this._charts.get(e);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(e,n,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var Zt=new TM;const Bf="transparent",DM={boolean(t,e,n){return n>.5?e:t},color(t,e,n){const r=Cf(t||Bf),i=r.valid&&Cf(e||Bf);return i&&i.valid?i.mix(r,n).hexString():e},number(t,e,n){return t+(e-t)*n}};class PM{constructor(e,n,r,i){const s=n[r];i=Os([e.to,i,s,e.from]);const o=Os([e.from,s,i]);this._active=!0,this._fn=e.fn||DM[e.type||typeof o],this._easing=or[e.easing]||or.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=n,this._prop=r,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(e,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],s=r-this._start,o=this._duration-s;this._start=r,this._duration=Math.floor(Math.max(o,e.duration)),this._total+=s,this._loop=!!e.loop,this._to=Os([e.to,n,i,e.from]),this._from=Os([e.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const n=e-this._start,r=this._duration,i=this._prop,s=this._from,o=this._loop,a=this._to;let l;if(this._active=s!==a&&(o||n<r),!this._active){this._target[i]=a,this._notify(!0);return}if(n<0){this._target[i]=s;return}l=n/r%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(s,a,l)}wait(){const e=this._promises||(this._promises=[]);return new Promise((n,r)=>{e.push({res:n,rej:r})})}_notify(e){const n=e?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class Ck{constructor(e,n){this._chart=e,this._properties=new Map,this.configure(n)}configure(e){if(!K(e))return;const n=Object.keys(le.animation),r=this._properties;Object.getOwnPropertyNames(e).forEach(i=>{const s=e[i];if(!K(s))return;const o={};for(const a of n)o[a]=s[a];(Ne(s.properties)&&s.properties||[i]).forEach(a=>{(a===i||!r.has(a))&&r.set(a,o)})})}_animateOptions(e,n){const r=n.options,i=MM(e,r);if(!i)return[];const s=this._createAnimations(i,r);return r.$shared&&EM(e.options.$animations,r).then(()=>{e.options=r},()=>{}),s}_createAnimations(e,n){const r=this._properties,i=[],s=e.$animations||(e.$animations={}),o=Object.keys(n),a=Date.now();let l;for(l=o.length-1;l>=0;--l){const u=o[l];if(u.charAt(0)==="$")continue;if(u==="options"){i.push(...this._animateOptions(e,n));continue}const c=n[u];let d=s[u];const f=r.get(u);if(d)if(f&&d.active()){d.update(f,c,a);continue}else d.cancel();if(!f||!f.duration){e[u]=c;continue}s[u]=d=new PM(f,e,u,c),i.push(d)}return i}update(e,n){if(this._properties.size===0){Object.assign(e,n);return}const r=this._createAnimations(e,n);if(r.length)return Zt.add(this._chart,r),!0}}function EM(t,e){const n=[],r=Object.keys(e);for(let i=0;i<r.length;i++){const s=t[r[i]];s&&s.active()&&n.push(s.wait())}return Promise.all(n)}function MM(t,e){if(!e)return;let n=t.options;if(!n){t.options=e;return}return n.$shared&&(t.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function qf(t,e){const n=t&&t.options||{},r=n.reverse,i=n.min===void 0?e:0,s=n.max===void 0?e:0;return{start:r?s:i,end:r?i:s}}function NM(t,e,n){if(n===!1)return!1;const r=qf(t,n),i=qf(e,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function CM(t){let e,n,r,i;return K(t)?(e=t.top,n=t.right,r=t.bottom,i=t.left):e=n=r=i=t,{top:e,right:n,bottom:r,left:i,disabled:t===!1}}function Ak(t,e){const n=[],r=t._getSortedDatasetMetas(e);let i,s;for(i=0,s=r.length;i<s;++i)n.push(r[i].index);return n}function Jf(t,e,n,r={}){const i=t.keys,s=r.mode==="single";let o,a,l,u;if(e===null)return;let c=!1;for(o=0,a=i.length;o<a;++o){if(l=+i[o],l===n){if(c=!0,r.all)continue;break}u=t.values[l],qe(u)&&(s||e===0||Nt(e)===Nt(u))&&(e+=u)}return!c&&!r.all?0:e}function AM(t,e){const{iScale:n,vScale:r}=e,i=n.axis==="x"?"x":"y",s=r.axis==="x"?"x":"y",o=Object.keys(t),a=new Array(o.length);let l,u,c;for(l=0,u=o.length;l<u;++l)c=o[l],a[l]={[i]:c,[s]:t[c]};return a}function Fa(t,e){const n=t&&t.options.stacked;return n||n===void 0&&e.stack!==void 0}function RM(t,e,n){return`${t.id}.${e.id}.${n.stack||n.type}`}function ZM(t){const{min:e,max:n,minDefined:r,maxDefined:i}=t.getUserBounds();return{min:r?e:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function jM(t,e,n){const r=t[e]||(t[e]={});return r[n]||(r[n]={})}function Yf(t,e,n,r){for(const i of e.getMatchingVisibleMetas(r).reverse()){const s=t[i.index];if(n&&s>0||!n&&s<0)return i.index}return null}function Gf(t,e){const{chart:n,_cachedMeta:r}=t,i=n._stacks||(n._stacks={}),{iScale:s,vScale:o,index:a}=r,l=s.axis,u=o.axis,c=RM(s,o,r),d=e.length;let f;for(let h=0;h<d;++h){const m=e[h],{[l]:p,[u]:g}=m,b=m._stacks||(m._stacks={});f=b[u]=jM(i,c,p),f[a]=g,f._top=Yf(f,o,!0,r.type),f._bottom=Yf(f,o,!1,r.type);const k=f._visualValues||(f._visualValues={});k[a]=g}}function Va(t,e){const n=t.scales;return Object.keys(n).filter(r=>n[r].axis===e).shift()}function UM(t,e){return Bn(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function LM(t,e,n){return Bn(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:n,index:e,mode:"default",type:"data"})}function Wi(t,e){const n=t.controller.index,r=t.vScale&&t.vScale.axis;if(r){e=e||t._parsed;for(const i of e){const s=i._stacks;if(!s||s[r]===void 0||s[r][n]===void 0)return;delete s[r][n],s[r]._visualValues!==void 0&&s[r]._visualValues[n]!==void 0&&delete s[r]._visualValues[n]}}}const Wa=t=>t==="reset"||t==="none",Kf=(t,e)=>e?t:Object.assign({},t),FM=(t,e,n)=>t&&!e.hidden&&e._stacked&&{keys:Ak(n,!0),values:null};class sn{constructor(e,n){this.chart=e,this._ctx=e.ctx,this.index=n,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=Fa(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&Wi(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,h,m)=>d==="x"?f:d==="r"?m:h,s=n.xAxisID=U(r.xAxisID,Va(e,"x")),o=n.yAxisID=U(r.yAxisID,Va(e,"y")),a=n.rAxisID=U(r.rAxisID,Va(e,"r")),l=n.indexAxis,u=n.iAxisID=i(l,s,o,a),c=n.vAxisID=i(l,o,s,a);n.xScale=this.getScaleForId(s),n.yScale=this.getScaleForId(o),n.rScale=this.getScaleForId(a),n.iScale=this.getScaleForId(u),n.vScale=this.getScaleForId(c)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const n=this._cachedMeta;return e===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Ef(this._data,this),e._stacked&&Wi(e)}_dataCheck(){const e=this.getDataset(),n=e.data||(e.data=[]),r=this._data;if(K(n)){const i=this._cachedMeta;this._data=AM(n,i)}else if(r!==n){if(r){Ef(r,this);const i=this._cachedMeta;Wi(i),i._parsed=[]}n&&Object.isExtensible(n)&&IE(n,this),this._syncList=[],this._data=n}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const s=n._stacked;n._stacked=Fa(n.vScale,n),n.stack!==r.stack&&(i=!0,Wi(n),n.stack=r.stack),this._resyncElements(e),(i||s!==n._stacked)&&(Gf(this,n._parsed),n._stacked=Fa(n.vScale,n))}configure(){const e=this.chart.config,n=e.datasetScopeKeys(this._type),r=e.getOptionScopes(this.getDataset(),n,!0);this.options=e.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,n){const{_cachedMeta:r,_data:i}=this,{iScale:s,_stacked:o}=r,a=s.axis;let l=e===0&&n===i.length?!0:r._sorted,u=e>0&&r._parsed[e-1],c,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{Ne(i[e])?f=this.parseArrayData(r,i,e,n):K(i[e])?f=this.parseObjectData(r,i,e,n):f=this.parsePrimitiveData(r,i,e,n);const h=()=>d[a]===null||u&&d[a]<u[a];for(c=0;c<n;++c)r._parsed[c+e]=d=f[c],l&&(h()&&(l=!1),u=d);r._sorted=l}o&&Gf(this,f)}parsePrimitiveData(e,n,r,i){const{iScale:s,vScale:o}=e,a=s.axis,l=o.axis,u=s.getLabels(),c=s===o,d=new Array(i);let f,h,m;for(f=0,h=i;f<h;++f)m=f+r,d[f]={[a]:c||s.parse(u[m],m),[l]:o.parse(n[m],m)};return d}parseArrayData(e,n,r,i){const{xScale:s,yScale:o}=e,a=new Array(i);let l,u,c,d;for(l=0,u=i;l<u;++l)c=l+r,d=n[c],a[l]={x:s.parse(d[0],c),y:o.parse(d[1],c)};return a}parseObjectData(e,n,r,i){const{xScale:s,yScale:o}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=new Array(i);let c,d,f,h;for(c=0,d=i;c<d;++c)f=c+r,h=n[f],u[c]={x:s.parse(jn(h,a),f),y:o.parse(jn(h,l),f)};return u}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,n,r){const i=this.chart,s=this._cachedMeta,o=n[e.axis],a={keys:Ak(i,!0),values:n._stacks[e.axis]._visualValues};return Jf(a,o,s.index,{mode:r})}updateRangeFromParsed(e,n,r,i){const s=r[n.axis];let o=s===null?NaN:s;const a=i&&r._stacks[n.axis];i&&a&&(i.values=a,o=Jf(i,s,this._cachedMeta.index)),e.min=Math.min(e.min,o),e.max=Math.max(e.max,o)}getMinMax(e,n){const r=this._cachedMeta,i=r._parsed,s=r._sorted&&e===r.iScale,o=i.length,a=this._getOtherScale(e),l=FM(n,r,this.chart),u={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:c,max:d}=ZM(a);let f,h;function m(){h=i[f];const p=h[a.axis];return!qe(h[e.axis])||c>p||d<p}for(f=0;f<o&&!(!m()&&(this.updateRangeFromParsed(u,e,h,l),s));++f);if(s){for(f=o-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(u,e,h,l);break}}return u}getAllParsedValues(e){const n=this._cachedMeta._parsed,r=[];let i,s,o;for(i=0,s=n.length;i<s;++i)o=n[i][e.axis],qe(o)&&r.push(o);return r}getMaxOverflow(){return!1}getLabelAndValue(e){const n=this._cachedMeta,r=n.iScale,i=n.vScale,s=this.getParsed(e);return{label:r?""+r.getLabelForValue(s[r.axis]):"",value:i?""+i.getLabelForValue(s[i.axis]):""}}_update(e){const n=this._cachedMeta;this.update(e||"default"),n._clip=CM(U(this.options.clip,NM(n.xScale,n.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],s=n.chartArea,o=[],a=this._drawStart||0,l=this._drawCount||i.length-a,u=this.options.drawActiveElementsOnTop;let c;for(r.dataset&&r.dataset.draw(e,s,a,l),c=a;c<a+l;++c){const d=i[c];d.hidden||(d.active&&u?o.push(d):d.draw(e,s))}for(c=0;c<o.length;++c)o[c].draw(e,s)}getStyle(e,n){const r=n?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(e||0,r)}getContext(e,n,r){const i=this.getDataset();let s;if(e>=0&&e<this._cachedMeta.data.length){const o=this._cachedMeta.data[e];s=o.$context||(o.$context=LM(this.getContext(),e,o)),s.parsed=this.getParsed(e),s.raw=i.data[e],s.index=s.dataIndex=e}else s=this.$context||(this.$context=UM(this.chart.getContext(),this.index)),s.dataset=i,s.index=s.datasetIndex=this.index;return s.active=!!n,s.mode=r,s}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,n){return this._resolveElementOptions(this.dataElementType.id,n,e)}_resolveElementOptions(e,n="default",r){const i=n==="active",s=this._cachedDataOpts,o=e+"-"+n,a=s[o],l=this.enableOptionSharing&&_r(r);if(a)return Kf(a,l);const u=this.chart.config,c=u.datasetElementScopeKeys(this._type,e),d=i?[`${e}Hover`,"hover",e,""]:[e,""],f=u.getOptionScopes(this.getDataset(),c),h=Object.keys(le.elements[e]),m=()=>this.getContext(r,i,n),p=u.resolveNamedOptions(f,h,m,d);return p.$shared&&(p.$shared=l,s[o]=Object.freeze(Kf(p,l))),p}_resolveAnimations(e,n,r){const i=this.chart,s=this._cachedDataOpts,o=`animation-${n}`,a=s[o];if(a)return a;let l;if(i.options.animation!==!1){const c=this.chart.config,d=c.datasetAnimationScopeKeys(this._type,n),f=c.getOptionScopes(this.getDataset(),d);l=c.createResolver(f,this.getContext(e,r,n))}const u=new Ck(i,l&&l.animations);return l&&l._cacheable&&(s[o]=Object.freeze(u)),u}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,n){return!n||Wa(e)||this.chart._animationsDisabled}_getSharedOptions(e,n){const r=this.resolveDataElementOptions(e,n),i=this._sharedOptions,s=this.getSharedOptions(r),o=this.includeOptions(n,s)||s!==i;return this.updateSharedOptions(s,n,r),{sharedOptions:s,includeOptions:o}}updateElement(e,n,r,i){Wa(i)?Object.assign(e,r):this._resolveAnimations(n,i).update(e,r)}updateSharedOptions(e,n,r){e&&!Wa(n)&&this._resolveAnimations(void 0,n).update(e,r)}_setStyle(e,n,r,i){e.active=i;const s=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(e,{options:!i&&this.getSharedOptions(s)||s})}removeHoverStyle(e,n,r){this._setStyle(e,r,"active",!1)}setHoverStyle(e,n,r){this._setStyle(e,r,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const n=this._data,r=this._cachedMeta.data;for(const[a,l,u]of this._syncList)this[a](l,u);this._syncList=[];const i=r.length,s=n.length,o=Math.min(s,i);o&&this.parse(0,o),s>i?this._insertElements(i,s-i,e):s<i&&this._removeElements(s,i-s)}_insertElements(e,n,r=!0){const i=this._cachedMeta,s=i.data,o=e+n;let a;const l=u=>{for(u.length+=n,a=u.length-1;a>=o;a--)u[a]=u[a-n]};for(l(s),a=e;a<o;++a)s[a]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(e,n),r&&this.updateElements(s,e,n,"reset")}updateElements(e,n,r,i){}_removeElements(e,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(e,n);r._stacked&&Wi(r,i)}r.data.splice(e,n)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[n,r,i]=e;this[n](r,i)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,n){n&&this._sync(["_removeElements",e,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",e,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}D(sn,"defaults",{}),D(sn,"datasetElementType",null),D(sn,"dataElementType",null);function VM(t,e){if(!t._cache.$bar){const n=t.getMatchingVisibleMetas(e);let r=[];for(let i=0,s=n.length;i<s;i++)r=r.concat(n[i].controller.getAllParsedValues(t));t._cache.$bar=pk(r.sort((i,s)=>i-s))}return t._cache.$bar}function WM(t){const e=t.iScale,n=VM(e,t.type);let r=e._length,i,s,o,a;const l=()=>{o===32767||o===-32768||(_r(a)&&(r=Math.min(r,Math.abs(o-a)||r)),a=o)};for(i=0,s=n.length;i<s;++i)o=e.getPixelForValue(n[i]),l();for(a=void 0,i=0,s=e.ticks.length;i<s;++i)o=e.getPixelForTick(i),l();return r}function HM(t,e,n,r){const i=n.barThickness;let s,o;return ne(i)?(s=e.min*n.categoryPercentage,o=n.barPercentage):(s=i*r,o=1),{chunk:s/r,ratio:o,start:e.pixels[t]-s/2}}function BM(t,e,n,r){const i=e.pixels,s=i[t];let o=t>0?i[t-1]:null,a=t<i.length-1?i[t+1]:null;const l=n.categoryPercentage;o===null&&(o=s-(a===null?e.end-e.start:a-s)),a===null&&(a=s+s-o);const u=s-(s-Math.min(o,a))/2*l;return{chunk:Math.abs(a-o)/2*l/r,ratio:n.barPercentage,start:u}}function qM(t,e,n,r){const i=n.parse(t[0],r),s=n.parse(t[1],r),o=Math.min(i,s),a=Math.max(i,s);let l=o,u=a;Math.abs(o)>Math.abs(a)&&(l=a,u=o),e[n.axis]=u,e._custom={barStart:l,barEnd:u,start:i,end:s,min:o,max:a}}function Rk(t,e,n,r){return Ne(t)?qM(t,e,n,r):e[n.axis]=n.parse(t,r),e}function Xf(t,e,n,r){const i=t.iScale,s=t.vScale,o=i.getLabels(),a=i===s,l=[];let u,c,d,f;for(u=n,c=n+r;u<c;++u)f=e[u],d={},d[i.axis]=a||i.parse(o[u],u),l.push(Rk(f,d,s,u));return l}function Ha(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function JM(t,e,n){return t!==0?Nt(t):(e.isHorizontal()?1:-1)*(e.min>=n?1:-1)}function YM(t){let e,n,r,i,s;return t.horizontal?(e=t.base>t.x,n="left",r="right"):(e=t.base<t.y,n="bottom",r="top"),e?(i="end",s="start"):(i="start",s="end"),{start:n,end:r,reverse:e,top:i,bottom:s}}function GM(t,e,n,r){let i=e.borderSkipped;const s={};if(!i){t.borderSkipped=s;return}if(i===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:a,reverse:l,top:u,bottom:c}=YM(t);i==="middle"&&n&&(t.enableBorderRadius=!0,(n._top||0)===r?i=u:(n._bottom||0)===r?i=c:(s[Qf(c,o,a,l)]=!0,i=u)),s[Qf(i,o,a,l)]=!0,t.borderSkipped=s}function Qf(t,e,n,r){return r?(t=KM(t,e,n),t=eh(t,n,e)):t=eh(t,e,n),t}function KM(t,e,n){return t===e?n:t===n?e:t}function eh(t,e,n){return t==="start"?e:t==="end"?n:t}function XM(t,{inflateAmount:e},n){t.inflateAmount=e==="auto"?n===1?.33:0:e}class Cn extends sn{parsePrimitiveData(e,n,r,i){return Xf(e,n,r,i)}parseArrayData(e,n,r,i){return Xf(e,n,r,i)}parseObjectData(e,n,r,i){const{iScale:s,vScale:o}=e,{xAxisKey:a="x",yAxisKey:l="y"}=this._parsing,u=s.axis==="x"?a:l,c=o.axis==="x"?a:l,d=[];let f,h,m,p;for(f=r,h=r+i;f<h;++f)p=n[f],m={},m[s.axis]=s.parse(jn(p,u),f),d.push(Rk(jn(p,c),m,o,f));return d}updateRangeFromParsed(e,n,r,i){super.updateRangeFromParsed(e,n,r,i);const s=r._custom;s&&n===this._cachedMeta.vScale&&(e.min=Math.min(e.min,s.min),e.max=Math.max(e.max,s.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const n=this._cachedMeta,{iScale:r,vScale:i}=n,s=this.getParsed(e),o=s._custom,a=Ha(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(s[i.axis]);return{label:""+r.getLabelForValue(s[r.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,e)}updateElements(e,n,r,i){const s=i==="reset",{index:o,_cachedMeta:{vScale:a}}=this,l=a.getBasePixel(),u=a.isHorizontal(),c=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let h=n;h<n+r;h++){const m=this.getParsed(h),p=s||ne(m[a.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),g=this._calculateBarIndexPixels(h,c),b=(m._stacks||{})[a.axis],k={horizontal:u,base:p.base,enableBorderRadius:!b||Ha(m._custom)||o===b._top||o===b._bottom,x:u?p.head:g.center,y:u?g.center:p.head,height:u?g.size:Math.abs(p.size),width:u?Math.abs(p.size):g.size};f&&(k.options=d||this.resolveDataElementOptions(h,e[h].active?"active":i));const $=k.options||e[h].options;GM(k,$,b,o),XM(k,$,c.ratio),this.updateElement(e[h],h,k,i)}}_getStacks(e,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(c=>c.controller.options.grouped),s=r.options.stacked,o=[],a=this._cachedMeta.controller.getParsed(n),l=a&&a[r.axis],u=c=>{const d=c._parsed.find(h=>h[r.axis]===l),f=d&&d[c.vScale.axis];if(ne(f)||isNaN(f))return!0};for(const c of i)if(!(n!==void 0&&u(c))&&((s===!1||o.indexOf(c.stack)===-1||s===void 0&&c.stack===void 0)&&o.push(c.stack),c.index===e))break;return o.length||o.push(void 0),o}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(e).filter(r=>e[r].axis===n).shift()}_getAxis(){const e={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)e[U(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(e)}_getStackIndex(e,n,r){const i=this._getStacks(e,r),s=n!==void 0?i.indexOf(n):-1;return s===-1?i.length-1:s}_getRuler(){const e=this.options,n=this._cachedMeta,r=n.iScale,i=[];let s,o;for(s=0,o=n.data.length;s<o;++s)i.push(r.getPixelForValue(this.getParsed(s)[r.axis],s));const a=e.barThickness;return{min:a||WM(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:e.grouped,ratio:a?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:s,minBarLength:o}}=this,a=s||0,l=this.getParsed(e),u=l._custom,c=Ha(u);let d=l[n.axis],f=0,h=r?this.applyStack(n,l,r):d,m,p;h!==d&&(f=h-d,h=d),c&&(d=u.barStart,h=u.barEnd-u.barStart,d!==0&&Nt(d)!==Nt(u.barEnd)&&(f=0),f+=d);const g=!ne(s)&&!c?s:f;let b=n.getPixelForValue(g);if(this.chart.getDataVisibility(e)?m=n.getPixelForValue(f+h):m=b,p=m-b,Math.abs(p)<o){p=JM(p,n,a)*o,d===a&&(b-=p/2);const k=n.getPixelForDecimal(0),$=n.getPixelForDecimal(1),w=Math.min(k,$),_=Math.max(k,$);b=Math.max(Math.min(b,_),w),m=b+p,r&&!c&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(b))}if(b===n.getPixelForValue(a)){const k=Nt(p)*n.getLineWidthForValue(a)/2;b+=k,p-=k}return{size:p,base:b,head:m,center:m+p/2}}_calculateBarIndexPixels(e,n){const r=n.scale,i=this.options,s=i.skipNull,o=U(i.maxBarThickness,1/0);let a,l;const u=this._getAxisCount();if(n.grouped){const c=s?this._getStackCount(e):n.stackCount,d=i.barThickness==="flex"?BM(e,n,i,c*u):HM(e,n,i,c*u),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(U(f,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,s?e:void 0)+h;a=d.start+d.chunk*m+d.chunk/2,l=Math.min(o,d.chunk*d.ratio)}else a=r.getPixelForValue(this.getParsed(e)[r.axis],e),l=Math.min(o,n.min*n.ratio);return{base:a-l/2,head:a+l/2,center:a,size:l}}draw(){const e=this._cachedMeta,n=e.vScale,r=e.data,i=r.length;let s=0;for(;s<i;++s)this.getParsed(s)[n.axis]!==null&&!r[s].hidden&&r[s].draw(this._ctx)}}D(Cn,"id","bar"),D(Cn,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),D(Cn,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function QM(t,e,n){let r=1,i=1,s=0,o=0;if(e<$e){const a=t,l=a+e,u=Math.cos(a),c=Math.sin(a),d=Math.cos(l),f=Math.sin(l),h=($,w,_)=>kr($,a,l,!0)?1:Math.max(w,w*n,_,_*n),m=($,w,_)=>kr($,a,l,!0)?-1:Math.min(w,w*n,_,_*n),p=h(0,u,d),g=h(Ce,c,f),b=m(de,u,d),k=m(de+Ce,c,f);r=(p-b)/2,i=(g-k)/2,s=-(p+b)/2,o=-(g+k)/2}return{ratioX:r,ratioY:i,offsetX:s,offsetY:o}}class Pn extends sn{constructor(e,n){super(e,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let s=l=>+r[l];if(K(r[e])){const{key:l="value"}=this._parsing;s=u=>+jn(r[u],l)}let o,a;for(o=e,a=e+n;o<a;++o)i._parsed[o]=s(o)}}_getRotation(){return Ft(this.options.rotation-90)}_getCircumference(){return Ft(this.options.circumference)}_getRotationExtents(){let e=$e,n=-$e;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,s=i._getRotation(),o=i._getCircumference();e=Math.min(e,s),n=Math.max(n,s+o)}return{rotation:e,circumference:n-e}}update(e){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,s=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(s)+this.options.spacing,a=Math.max((Math.min(r.width,r.height)-o)/2,0),l=Math.min(uE(this.options.cutout,a),1),u=this._getRingWeight(this.index),{circumference:c,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:h,offsetX:m,offsetY:p}=QM(d,c,l),g=(r.width-o)/f,b=(r.height-o)/h,k=Math.max(Math.min(g,b)/2,0),$=ck(this.options.radius,k),w=Math.max($*l,0),_=($-w)/this._getVisibleDatasetWeightTotal();this.offsetX=m*$,this.offsetY=p*$,i.total=this.calculateTotal(),this.outerRadius=$-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*u,0),this.updateElements(s,0,s.length,e)}_circumference(e,n){const r=this.options,i=this._cachedMeta,s=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(e)||i._parsed[e]===null||i.data[e].hidden?0:this.calculateCircumference(i._parsed[e]*s/$e)}updateElements(e,n,r,i){const s=i==="reset",o=this.chart,a=o.chartArea,u=o.options.animation,c=(a.left+a.right)/2,d=(a.top+a.bottom)/2,f=s&&u.animateScale,h=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(n,i);let b=this._getRotation(),k;for(k=0;k<n;++k)b+=this._circumference(k,s);for(k=n;k<n+r;++k){const $=this._circumference(k,s),w=e[k],_={x:c+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+$,circumference:$,outerRadius:m,innerRadius:h};g&&(_.options=p||this.resolveDataElementOptions(k,w.active?"active":i)),b+=$,this.updateElement(w,k,_,i)}}calculateTotal(){const e=this._cachedMeta,n=e.data;let r=0,i;for(i=0;i<n.length;i++){const s=e._parsed[i];s!==null&&!isNaN(s)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(s))}return r}calculateCircumference(e){const n=this._cachedMeta.total;return n>0&&!isNaN(e)?$e*(Math.abs(e)/n):0}getLabelAndValue(e){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],s=yd(n._parsed[e],r.options.locale);return{label:i[e]||"",value:s}}getMaxBorderWidth(e){let n=0;const r=this.chart;let i,s,o,a,l;if(!e){for(i=0,s=r.data.datasets.length;i<s;++i)if(r.isDatasetVisible(i)){o=r.getDatasetMeta(i),e=o.data,a=o.controller;break}}if(!e)return 0;for(i=0,s=e.length;i<s;++i)l=a.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(e){let n=0;for(let r=0,i=e.length;r<i;++r){const s=this.resolveDataElementOptions(r);n=Math.max(n,s.offset||0,s.hoverOffset||0)}return n}_getRingWeightOffset(e){let n=0;for(let r=0;r<e;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(e){return Math.max(U(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}D(Pn,"id","doughnut"),D(Pn,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),D(Pn,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),D(Pn,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const n=e.data,{labels:{pointStyle:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=e.legend.options;return n.labels.length&&n.datasets.length?n.labels.map((l,u)=>{const d=e.getDatasetMeta(0).controller.getStyle(u);return{text:l,fillStyle:d.backgroundColor,fontColor:s,hidden:!e.getDataVisibility(u),lineDash:d.borderDash,lineDashOffset:d.borderDashOffset,lineJoin:d.borderJoinStyle,lineWidth:d.borderWidth,strokeStyle:d.borderColor,textAlign:i,pointStyle:r,borderRadius:o&&(a||d.borderRadius),index:u}}):[]}},onClick(e,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}});class lr extends sn{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const n=this._cachedMeta,{dataset:r,data:i=[],_dataset:s}=n,o=this.chart._animationsDisabled;let{start:a,count:l}=yk(n,i,o);this._drawStart=a,this._drawCount=l,_k(n)&&(a=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!s._decimated,r.points=i;const u=this.resolveDatasetElementOptions(e);this.options.showLine||(u.borderWidth=0),u.segment=this.options.segment,this.updateElement(r,void 0,{animated:!o,options:u},e),this.updateElements(i,a,l,e)}updateElements(e,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,{sharedOptions:c,includeOptions:d}=this._getSharedOptions(n,i),f=o.axis,h=a.axis,{spanGaps:m,segment:p}=this.options,g=wi(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||s||i==="none",k=n+r,$=e.length;let w=n>0&&this.getParsed(n-1);for(let _=0;_<$;++_){const I=e[_],z=b?I:{};if(_<n||_>=k){z.skip=!0;continue}const O=this.getParsed(_),E=ne(O[h]),Z=z[f]=o.getPixelForValue(O[f],_),L=z[h]=s||E?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,O,l):O[h],_);z.skip=isNaN(Z)||isNaN(L)||E,z.stop=_>0&&Math.abs(O[f]-w[f])>g,p&&(z.parsed=O,z.raw=u.data[_]),d&&(z.options=c||this.resolveDataElementOptions(_,I.active?"active":i)),b||this.updateElement(I,_,z,i),w=O}}getMaxOverflow(){const e=this._cachedMeta,n=e.dataset,r=n.options&&n.options.borderWidth||0,i=e.data||[];if(!i.length)return r;const s=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,s,o)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}D(lr,"id","line"),D(lr,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),D(lr,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class go extends Pn{}D(go,"id","pie"),D(go,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Fs extends sn{getLabelAndValue(e){const n=this._cachedMeta,r=this.chart.data.labels||[],{xScale:i,yScale:s}=n,o=this.getParsed(e),a=i.getLabelForValue(o.x),l=s.getLabelForValue(o.y);return{label:r[e]||"",value:"("+a+", "+l+")"}}update(e){const n=this._cachedMeta,{data:r=[]}=n,i=this.chart._animationsDisabled;let{start:s,count:o}=yk(n,r,i);if(this._drawStart=s,this._drawCount=o,_k(n)&&(s=0,o=r.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:a,_dataset:l}=n;a._chart=this.chart,a._datasetIndex=this.index,a._decimated=!!l._decimated,a.points=r;const u=this.resolveDatasetElementOptions(e);u.segment=this.options.segment,this.updateElement(a,void 0,{animated:!i,options:u},e)}else this.datasetElementType&&(delete n.dataset,this.datasetElementType=!1);this.updateElements(r,s,o,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,n,r,i){const s=i==="reset",{iScale:o,vScale:a,_stacked:l,_dataset:u}=this._cachedMeta,c=this.resolveDataElementOptions(n,i),d=this.getSharedOptions(c),f=this.includeOptions(i,d),h=o.axis,m=a.axis,{spanGaps:p,segment:g}=this.options,b=wi(p)?p:Number.POSITIVE_INFINITY,k=this.chart._animationsDisabled||s||i==="none";let $=n>0&&this.getParsed(n-1);for(let w=n;w<n+r;++w){const _=e[w],I=this.getParsed(w),z=k?_:{},O=ne(I[m]),E=z[h]=o.getPixelForValue(I[h],w),Z=z[m]=s||O?a.getBasePixel():a.getPixelForValue(l?this.applyStack(a,I,l):I[m],w);z.skip=isNaN(E)||isNaN(Z)||O,z.stop=w>0&&Math.abs(I[h]-$[h])>b,g&&(z.parsed=I,z.raw=u.data[w]),f&&(z.options=d||this.resolveDataElementOptions(w,_.active?"active":i)),k||this.updateElement(_,w,z,i),$=I}this.updateSharedOptions(d,i,c)}getMaxOverflow(){const e=this._cachedMeta,n=e.data||[];if(!this.options.showLine){let a=0;for(let l=n.length-1;l>=0;--l)a=Math.max(a,n[l].size(this.resolveDataElementOptions(l))/2);return a>0&&a}const r=e.dataset,i=r.options&&r.options.borderWidth||0;if(!n.length)return i;const s=n[0].size(this.resolveDataElementOptions(0)),o=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,s,o)/2}}D(Fs,"id","scatter"),D(Fs,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),D(Fs,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function xn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Id{constructor(e){D(this,"options");this.options=e||{}}static override(e){Object.assign(Id.prototype,e)}init(){}formats(){return xn()}parse(){return xn()}format(){return xn()}add(){return xn()}diff(){return xn()}startOf(){return xn()}endOf(){return xn()}}var Zk={_date:Id};function eN(t,e,n,r){const{controller:i,data:s,_sorted:o}=t,a=i._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(a&&e===a.axis&&e!=="r"&&o&&s.length){const u=a._reversePixels?wE:Dn;if(r){if(i._sharedOptions){const c=s[0],d=typeof c.getRange=="function"&&c.getRange(e);if(d){const f=u(s,e,n-d),h=u(s,e,n+d);return{lo:f.lo,hi:h.hi}}}}else{const c=u(s,e,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=t,h=f.slice(0,c.lo+1).reverse().findIndex(p=>!ne(p[d.axis]));c.lo-=Math.max(0,h);const m=f.slice(c.hi).findIndex(p=>!ne(p[d.axis]));c.hi+=Math.max(0,m)}return c}}return{lo:0,hi:s.length-1}}function Ia(t,e,n,r,i){const s=t.getSortedVisibleDatasetMetas(),o=n[e];for(let a=0,l=s.length;a<l;++a){const{index:u,data:c}=s[a],{lo:d,hi:f}=eN(s[a],e,o,i);for(let h=d;h<=f;++h){const m=c[h];m.skip||r(m,u,h)}}}function tN(t){const e=t.indexOf("x")!==-1,n=t.indexOf("y")!==-1;return function(r,i){const s=e?Math.abs(r.x-i.x):0,o=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(s,2)+Math.pow(o,2))}}function Ba(t,e,n,r,i){const s=[];return!i&&!t.isPointInArea(e)||Ia(t,n,e,function(a,l,u){!i&&!$r(a,t.chartArea,0)||a.inRange(e.x,e.y,r)&&s.push({element:a,datasetIndex:l,index:u})},!0),s}function nN(t,e,n,r){let i=[];function s(o,a,l){const{startAngle:u,endAngle:c}=o.getProps(["startAngle","endAngle"],r),{angle:d}=hk(o,{x:e.x,y:e.y});kr(d,u,c)&&i.push({element:o,datasetIndex:a,index:l})}return Ia(t,n,e,s),i}function iN(t,e,n,r,i,s){let o=[];const a=tN(n);let l=Number.POSITIVE_INFINITY;function u(c,d,f){const h=c.inRange(e.x,e.y,i);if(r&&!h)return;const m=c.getCenterPoint(i);if(!(!!s||t.isPointInArea(m))&&!h)return;const g=a(e,m);g<l?(o=[{element:c,datasetIndex:d,index:f}],l=g):g===l&&o.push({element:c,datasetIndex:d,index:f})}return Ia(t,n,e,u),o}function qa(t,e,n,r,i,s){return!s&&!t.isPointInArea(e)?[]:n==="r"&&!r?nN(t,e,n,i):iN(t,e,n,r,i,s)}function th(t,e,n,r,i){const s=[],o=n==="x"?"inXRange":"inYRange";let a=!1;return Ia(t,n,e,(l,u,c)=>{l[o]&&l[o](e[n],i)&&(s.push({element:l,datasetIndex:u,index:c}),a=a||l.inRange(e.x,e.y,i))}),r&&!a?[]:s}var rN={modes:{index(t,e,n,r){const i=zn(e,t),s=n.axis||"x",o=n.includeInvisible||!1,a=n.intersect?Ba(t,i,s,r,o):qa(t,i,s,!1,r,o),l=[];return a.length?(t.getSortedVisibleDatasetMetas().forEach(u=>{const c=a[0].index,d=u.data[c];d&&!d.skip&&l.push({element:d,datasetIndex:u.index,index:c})}),l):[]},dataset(t,e,n,r){const i=zn(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;let a=n.intersect?Ba(t,i,s,r,o):qa(t,i,s,!1,r,o);if(a.length>0){const l=a[0].datasetIndex,u=t.getDatasetMeta(l).data;a=[];for(let c=0;c<u.length;++c)a.push({element:u[c],datasetIndex:l,index:c})}return a},point(t,e,n,r){const i=zn(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;return Ba(t,i,s,r,o)},nearest(t,e,n,r){const i=zn(e,t),s=n.axis||"xy",o=n.includeInvisible||!1;return qa(t,i,s,n.intersect,r,o)},x(t,e,n,r){const i=zn(e,t);return th(t,i,"x",n.intersect,r)},y(t,e,n,r){const i=zn(e,t);return th(t,i,"y",n.intersect,r)}}};const jk=["left","top","right","bottom"];function Hi(t,e){return t.filter(n=>n.pos===e)}function nh(t,e){return t.filter(n=>jk.indexOf(n.pos)===-1&&n.box.axis===e)}function Bi(t,e){return t.sort((n,r)=>{const i=e?r:n,s=e?n:r;return i.weight===s.weight?i.index-s.index:i.weight-s.weight})}function sN(t){const e=[];let n,r,i,s,o,a;for(n=0,r=(t||[]).length;n<r;++n)i=t[n],{position:s,options:{stack:o,stackWeight:a=1}}=i,e.push({index:n,box:i,pos:s,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&s+o,stackWeight:a});return e}function oN(t){const e={};for(const n of t){const{stack:r,pos:i,stackWeight:s}=n;if(!r||!jk.includes(i))continue;const o=e[r]||(e[r]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=s}return e}function aN(t,e){const n=oN(t),{vBoxMaxWidth:r,hBoxMaxHeight:i}=e;let s,o,a;for(s=0,o=t.length;s<o;++s){a=t[s];const{fullSize:l}=a.box,u=n[a.stack],c=u&&a.stackWeight/u.weight;a.horizontal?(a.width=c?c*r:l&&e.availableWidth,a.height=i):(a.width=r,a.height=c?c*i:l&&e.availableHeight)}return n}function lN(t){const e=sN(t),n=Bi(e.filter(u=>u.box.fullSize),!0),r=Bi(Hi(e,"left"),!0),i=Bi(Hi(e,"right")),s=Bi(Hi(e,"top"),!0),o=Bi(Hi(e,"bottom")),a=nh(e,"x"),l=nh(e,"y");return{fullSize:n,leftAndTop:r.concat(s),rightAndBottom:i.concat(l).concat(o).concat(a),chartArea:Hi(e,"chartArea"),vertical:r.concat(i).concat(l),horizontal:s.concat(o).concat(a)}}function ih(t,e,n,r){return Math.max(t[n],e[n])+Math.max(t[r],e[r])}function Uk(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function uN(t,e,n,r){const{pos:i,box:s}=n,o=t.maxPadding;if(!K(i)){n.size&&(t[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?s.height:s.width),n.size=d.size/d.count,t[i]+=n.size}s.getPadding&&Uk(o,s.getPadding());const a=Math.max(0,e.outerWidth-ih(o,t,"left","right")),l=Math.max(0,e.outerHeight-ih(o,t,"top","bottom")),u=a!==t.w,c=l!==t.h;return t.w=a,t.h=l,n.horizontal?{same:u,other:c}:{same:c,other:u}}function cN(t){const e=t.maxPadding;function n(r){const i=Math.max(e[r]-t[r],0);return t[r]+=i,i}t.y+=n("top"),t.x+=n("left"),n("right"),n("bottom")}function dN(t,e){const n=e.maxPadding;function r(i){const s={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{s[o]=Math.max(e[o],n[o])}),s}return r(t?["left","right"]:["top","bottom"])}function Qi(t,e,n,r){const i=[];let s,o,a,l,u,c;for(s=0,o=t.length,u=0;s<o;++s){a=t[s],l=a.box,l.update(a.width||e.w,a.height||e.h,dN(a.horizontal,e));const{same:d,other:f}=uN(e,n,a,r);u|=d&&i.length,c=c||f,l.fullSize||i.push(a)}return u&&Qi(i,e,n,r)||c}function Ps(t,e,n,r,i){t.top=n,t.left=e,t.right=e+r,t.bottom=n+i,t.width=r,t.height=i}function rh(t,e,n,r){const i=n.padding;let{x:s,y:o}=e;for(const a of t){const l=a.box,u=r[a.stack]||{placed:0,weight:1},c=a.stackWeight/u.weight||1;if(a.horizontal){const d=e.w*c,f=u.size||l.height;_r(u.start)&&(o=u.start),l.fullSize?Ps(l,i.left,o,n.outerWidth-i.right-i.left,f):Ps(l,e.left+u.placed,o,d,f),u.start=o,u.placed+=d,o=l.bottom}else{const d=e.h*c,f=u.size||l.width;_r(u.start)&&(s=u.start),l.fullSize?Ps(l,s,i.top,f,n.outerHeight-i.bottom-i.top):Ps(l,s,e.top+u.placed,f,d),u.start=s,u.placed+=d,s=l.right}}e.x=s,e.y=o}var tn={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(n){e.draw(n)}}]},t.boxes.push(e)},removeBox(t,e){const n=t.boxes?t.boxes.indexOf(e):-1;n!==-1&&t.boxes.splice(n,1)},configure(t,e,n){e.fullSize=n.fullSize,e.position=n.position,e.weight=n.weight},update(t,e,n,r){if(!t)return;const i=Ot(t.options.layout.padding),s=Math.max(e-i.width,0),o=Math.max(n-i.height,0),a=lN(t.boxes),l=a.vertical,u=a.horizontal;ae(t.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const c=l.reduce((p,g)=>g.box.options&&g.box.options.display===!1?p:p+1,0)||1,d=Object.freeze({outerWidth:e,outerHeight:n,padding:i,availableWidth:s,availableHeight:o,vBoxMaxWidth:s/2/c,hBoxMaxHeight:o/2}),f=Object.assign({},i);Uk(f,Ot(r));const h=Object.assign({maxPadding:f,w:s,h:o,x:i.left,y:i.top},i),m=aN(l.concat(u),d);Qi(a.fullSize,h,d,m),Qi(l,h,d,m),Qi(u,h,d,m)&&Qi(l,h,d,m),cN(h),rh(a.leftAndTop,h,d,m),h.x+=h.w,h.y+=h.h,rh(a.rightAndBottom,h,d,m),t.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},ae(a.chartArea,p=>{const g=p.box;Object.assign(g,t.chartArea),g.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class Lk{acquireContext(e,n){}releaseContext(e){return!1}addEventListener(e,n,r){}removeEventListener(e,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(e,n,r,i){return n=Math.max(0,n||e.width),r=r||e.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(e){return!0}updateConfig(e){}}class fN extends Lk{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Vs="$chartjs",hN={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},sh=t=>t===null||t==="";function mN(t,e){const n=t.style,r=t.getAttribute("height"),i=t.getAttribute("width");if(t[Vs]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",sh(i)){const s=Ff(t,"width");s!==void 0&&(t.width=s)}if(sh(r))if(t.style.height==="")t.height=t.width/(e||2);else{const s=Ff(t,"height");s!==void 0&&(t.height=s)}return t}const Fk=vM?{passive:!0}:!1;function pN(t,e,n){t&&t.addEventListener(e,n,Fk)}function gN(t,e,n){t&&t.canvas&&t.canvas.removeEventListener(e,n,Fk)}function vN(t,e){const n=hN[t.type]||t.type,{x:r,y:i}=zn(t,e);return{type:n,chart:e,native:t,x:r!==void 0?r:null,y:i!==void 0?i:null}}function vo(t,e){for(const n of t)if(n===e||n.contains(e))return!0}function bN(t,e,n){const r=t.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||vo(a.addedNodes,r),o=o&&!vo(a.removedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function yN(t,e,n){const r=t.canvas,i=new MutationObserver(s=>{let o=!1;for(const a of s)o=o||vo(a.removedNodes,r),o=o&&!vo(a.addedNodes,r);o&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const xr=new Map;let oh=0;function Vk(){const t=window.devicePixelRatio;t!==oh&&(oh=t,xr.forEach((e,n)=>{n.currentDevicePixelRatio!==t&&e()}))}function _N(t,e){xr.size||window.addEventListener("resize",Vk),xr.set(t,e)}function kN(t){xr.delete(t),xr.size||window.removeEventListener("resize",Vk)}function $N(t,e,n){const r=t.canvas,i=r&&Sd(r);if(!i)return;const s=vk((a,l)=>{const u=i.clientWidth;n(a,l),u<i.clientWidth&&n()},window),o=new ResizeObserver(a=>{const l=a[0],u=l.contentRect.width,c=l.contentRect.height;u===0&&c===0||s(u,c)});return o.observe(i),_N(t,s),o}function Ja(t,e,n){n&&n.disconnect(),e==="resize"&&kN(t)}function xN(t,e,n){const r=t.canvas,i=vk(s=>{t.ctx!==null&&n(vN(s,t))},t);return pN(r,e,i),i}class wN extends Lk{acquireContext(e,n){const r=e&&e.getContext&&e.getContext("2d");return r&&r.canvas===e?(mN(e,n),r):null}releaseContext(e){const n=e.canvas;if(!n[Vs])return!1;const r=n[Vs].initial;["height","width"].forEach(s=>{const o=r[s];ne(o)?n.removeAttribute(s):n.setAttribute(s,o)});const i=r.style||{};return Object.keys(i).forEach(s=>{n.style[s]=i[s]}),n.width=n.width,delete n[Vs],!0}addEventListener(e,n,r){this.removeEventListener(e,n);const i=e.$proxies||(e.$proxies={}),o={attach:bN,detach:yN,resize:$N}[n]||xN;i[n]=o(e,n,r)}removeEventListener(e,n){const r=e.$proxies||(e.$proxies={}),i=r[n];if(!i)return;({attach:Ja,detach:Ja,resize:Ja}[n]||gN)(e,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,n,r,i){return gM(e,n,r,i)}isAttached(e){const n=e&&Sd(e);return!!(n&&n.isConnected)}}function SN(t){return!wd()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?fN:wN}class Ct{constructor(){D(this,"x");D(this,"y");D(this,"active",!1);D(this,"options");D(this,"$animations")}tooltipPosition(e){const{x:n,y:r}=this.getProps(["x","y"],e);return{x:n,y:r}}hasValue(){return wi(this.x)&&wi(this.y)}getProps(e,n){const r=this.$animations;if(!n||!r)return this;const i={};return e.forEach(s=>{i[s]=r[s]&&r[s].active()?r[s]._to:this[s]}),i}}D(Ct,"defaults",{}),D(Ct,"defaultRoutes");function IN(t,e){const n=t.options.ticks,r=zN(t),i=Math.min(n.maxTicksLimit||r,r),s=n.major.enabled?TN(e):[],o=s.length,a=s[0],l=s[o-1],u=[];if(o>i)return DN(e,u,s,o/i),u;const c=ON(s,e,i);if(o>0){let d,f;const h=o>1?Math.round((l-a)/(o-1)):null;for(Es(e,u,c,ne(h)?0:a-h,a),d=0,f=o-1;d<f;d++)Es(e,u,c,s[d],s[d+1]);return Es(e,u,c,l,ne(h)?e.length:l+h),u}return Es(e,u,c),u}function zN(t){const e=t.options.offset,n=t._tickSize(),r=t._length/n+(e?0:1),i=t._maxLength/n;return Math.floor(Math.min(r,i))}function ON(t,e,n){const r=PN(t),i=e.length/n;if(!r)return Math.max(i,1);const s=vE(r);for(let o=0,a=s.length-1;o<a;o++){const l=s[o];if(l>i)return l}return Math.max(i,1)}function TN(t){const e=[];let n,r;for(n=0,r=t.length;n<r;n++)t[n].major&&e.push(n);return e}function DN(t,e,n,r){let i=0,s=n[0],o;for(r=Math.ceil(r),o=0;o<t.length;o++)o===s&&(e.push(t[o]),i++,s=n[i*r])}function Es(t,e,n,r,i){const s=U(r,0),o=Math.min(U(i,t.length),t.length);let a=0,l,u,c;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),c=s;c<0;)a++,c=Math.round(s+a*n);for(u=Math.max(s,0);u<o;u++)u===c&&(e.push(t[u]),a++,c=Math.round(s+a*n))}function PN(t){const e=t.length;let n,r;if(e<2)return!1;for(r=t[0],n=1;n<e;++n)if(t[n]-t[n-1]!==r)return!1;return r}const EN=t=>t==="left"?"right":t==="right"?"left":t,ah=(t,e,n)=>e==="top"||e==="left"?t[e]+n:t[e]-n,lh=(t,e)=>Math.min(e||t,t);function uh(t,e){const n=[],r=t.length/e,i=t.length;let s=0;for(;s<i;s+=r)n.push(t[Math.floor(s)]);return n}function MN(t,e,n){const r=t.ticks.length,i=Math.min(e,r-1),s=t._startPixel,o=t._endPixel,a=1e-6;let l=t.getPixelForTick(i),u;if(!(n&&(r===1?u=Math.max(l-s,o-l):e===0?u=(t.getPixelForTick(1)-l)/2:u=(l-t.getPixelForTick(i-1))/2,l+=i<e?u:-u,l<s-a||l>o+a)))return l}function NN(t,e){ae(t,n=>{const r=n.gc,i=r.length/2;let s;if(i>e){for(s=0;s<i;++s)delete n.data[r[s]];r.splice(0,i)}})}function qi(t){return t.drawTicks?t.tickLength:0}function ch(t,e){if(!t.display)return 0;const n=tt(t.font,e),r=Ot(t.padding);return(Ne(t.text)?t.text.length:1)*n.lineHeight+r.height}function CN(t,e){return Bn(t,{scale:e,type:"scale"})}function AN(t,e,n){return Bn(t,{tick:n,index:e,type:"tick"})}function RN(t,e,n){let r=bk(t);return(n&&e!=="right"||!n&&e==="right")&&(r=EN(r)),r}function ZN(t,e,n,r){const{top:i,left:s,bottom:o,right:a,chart:l}=t,{chartArea:u,scales:c}=l;let d=0,f,h,m;const p=o-i,g=a-s;if(t.isHorizontal()){if(h=it(r,s,a),K(n)){const b=Object.keys(n)[0],k=n[b];m=c[b].getPixelForValue(k)+p-e}else n==="center"?m=(u.bottom+u.top)/2+p-e:m=ah(t,n,e);f=a-s}else{if(K(n)){const b=Object.keys(n)[0],k=n[b];h=c[b].getPixelForValue(k)-g+e}else n==="center"?h=(u.left+u.right)/2-g+e:h=ah(t,n,e);m=it(r,o,i),d=n==="left"?-Ce:Ce}return{titleX:h,titleY:m,maxWidth:f,rotation:d}}class Ei extends Ct{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,n){return e}getUserBounds(){let{_userMin:e,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return e=Dt(e,Number.POSITIVE_INFINITY),n=Dt(n,Number.NEGATIVE_INFINITY),r=Dt(r,Number.POSITIVE_INFINITY),i=Dt(i,Number.NEGATIVE_INFINITY),{min:Dt(e,r),max:Dt(n,i),minDefined:qe(e),maxDefined:qe(n)}}getMinMax(e){let{min:n,max:r,minDefined:i,maxDefined:s}=this.getUserBounds(),o;if(i&&s)return{min:n,max:r};const a=this.getMatchingVisibleMetas();for(let l=0,u=a.length;l<u;++l)o=a[l].controller.getMinMax(this,e),i||(n=Math.min(n,o.min)),s||(r=Math.max(r,o.max));return n=s&&n>r?r:n,r=i&&n>r?n:r,{min:Dt(n,Dt(r,n)),max:Dt(r,Dt(n,r))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){me(this.options.beforeUpdate,[this])}update(e,n,r){const{beginAtZero:i,grace:s,ticks:o}=this.options,a=o.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=JE(this,s,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=a<this.ticks.length;this._convertTicksToLabels(l?uh(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=IN(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,e=!e),this._startPixel=n,this._endPixel=r,this._reversePixels=e,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){me(this.options.afterUpdate,[this])}beforeSetDimensions(){me(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){me(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),me(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){me(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const n=this.options.ticks;let r,i,s;for(r=0,i=e.length;r<i;r++)s=e[r],s.label=me(n.callback,[s.value,r,e],this)}afterTickToLabelConversion(){me(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){me(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,n=e.ticks,r=lh(this.ticks.length,e.ticks.maxTicksLimit),i=n.minRotation||0,s=n.maxRotation;let o=i,a,l,u;if(!this._isVisible()||!n.display||i>=s||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const c=this._getLabelSizes(),d=c.widest.width,f=c.highest.height,h=He(this.chart.width-d,0,this.maxWidth);a=e.offset?this.maxWidth/r:h/(r-1),d+6>a&&(a=h/(r-(e.offset?.5:1)),l=this.maxHeight-qi(e.grid)-n.padding-ch(e.title,this.chart.options.font),u=Math.sqrt(d*d+f*f),o=kE(Math.min(Math.asin(He((c.highest.height+6)/a,-1,1)),Math.asin(He(l/u,-1,1))-Math.asin(He(f/u,-1,1)))),o=Math.max(i,Math.min(s,o))),this.labelRotation=o}afterCalculateLabelRotation(){me(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){me(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:s}}=this,o=this._isVisible(),a=this.isHorizontal();if(o){const l=ch(i,n.options.font);if(a?(e.width=this.maxWidth,e.height=qi(s)+l):(e.height=this.maxHeight,e.width=qi(s)+l),r.display&&this.ticks.length){const{first:u,last:c,widest:d,highest:f}=this._getLabelSizes(),h=r.padding*2,m=Ft(this.labelRotation),p=Math.cos(m),g=Math.sin(m);if(a){const b=r.mirror?0:g*d.width+p*f.height;e.height=Math.min(this.maxHeight,e.height+b+h)}else{const b=r.mirror?0:p*d.width+g*f.height;e.width=Math.min(this.maxWidth,e.width+b+h)}this._calculatePadding(u,c,g,p)}}this._handleMargins(),a?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,n,r,i){const{ticks:{align:s,padding:o},position:a}=this.options,l=this.labelRotation!==0,u=a!=="top"&&this.axis==="x";if(this.isHorizontal()){const c=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,h=0;l?u?(f=i*e.width,h=r*n.height):(f=r*e.height,h=i*n.width):s==="start"?h=n.width:s==="end"?f=e.width:s!=="inner"&&(f=e.width/2,h=n.width/2),this.paddingLeft=Math.max((f-c+o)*this.width/(this.width-c),0),this.paddingRight=Math.max((h-d+o)*this.width/(this.width-d),0)}else{let c=n.height/2,d=e.height/2;s==="start"?(c=0,d=e.height):s==="end"&&(c=n.height,d=0),this.paddingTop=c+o,this.paddingBottom=d+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){me(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:n}=this.options;return n==="top"||n==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let n,r;for(n=0,r=e.length;n<r;n++)ne(e[n].label)&&(e.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=uh(r,n)),this._labelSizes=e=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,n,r){const{ctx:i,_longestTextCache:s}=this,o=[],a=[],l=Math.floor(n/lh(n,r));let u=0,c=0,d,f,h,m,p,g,b,k,$,w,_;for(d=0;d<n;d+=l){if(m=e[d].label,p=this._resolveTickFontOptions(d),i.font=g=p.string,b=s[g]=s[g]||{data:{},gc:[]},k=p.lineHeight,$=w=0,!ne(m)&&!Ne(m))$=Rf(i,b.data,b.gc,$,m),w=k;else if(Ne(m))for(f=0,h=m.length;f<h;++f)_=m[f],!ne(_)&&!Ne(_)&&($=Rf(i,b.data,b.gc,$,_),w+=k);o.push($),a.push(w),u=Math.max($,u),c=Math.max(w,c)}NN(s,n);const I=o.indexOf(u),z=a.indexOf(c),O=E=>({width:o[E]||0,height:a[E]||0});return{first:O(0),last:O(n-1),widest:O(I),highest:O(z),widths:o,heights:a}}getLabelForValue(e){return e}getPixelForValue(e,n){return NaN}getValueForPixel(e){}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const n=this._startPixel+e*this._length;return xE(this._alignToPixels?$n(this.chart,n,0):n)}getDecimalForPixel(e){const n=(e-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:n}=this;return e<0&&n<0?n:e>0&&n>0?e:0}getContext(e){const n=this.ticks||[];if(e>=0&&e<n.length){const r=n[e];return r.$context||(r.$context=AN(this.getContext(),e,r))}return this.$context||(this.$context=CN(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,n=Ft(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),s=this._getLabelSizes(),o=e.autoSkipPadding||0,a=s?s.widest.width+o:0,l=s?s.highest.height+o:0;return this.isHorizontal()?l*r>a*i?a/r:l/i:l*i<a*r?l/r:a/i}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const n=this.axis,r=this.chart,i=this.options,{grid:s,position:o,border:a}=i,l=s.offset,u=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=qi(s),h=[],m=a.setContext(this.getContext()),p=m.display?m.width:0,g=p/2,b=function(ve){return $n(r,ve,p)};let k,$,w,_,I,z,O,E,Z,L,B,ge;if(o==="top")k=b(this.bottom),z=this.bottom-f,E=k-g,L=b(e.top)+g,ge=e.bottom;else if(o==="bottom")k=b(this.top),L=e.top,ge=b(e.bottom)-g,z=k+g,E=this.top+f;else if(o==="left")k=b(this.right),I=this.right-f,O=k-g,Z=b(e.left)+g,B=e.right;else if(o==="right")k=b(this.left),Z=e.left,B=b(e.right)-g,I=k+g,O=this.left+f;else if(n==="x"){if(o==="center")k=b((e.top+e.bottom)/2+.5);else if(K(o)){const ve=Object.keys(o)[0],De=o[ve];k=b(this.chart.scales[ve].getPixelForValue(De))}L=e.top,ge=e.bottom,z=k+g,E=z+f}else if(n==="y"){if(o==="center")k=b((e.left+e.right)/2);else if(K(o)){const ve=Object.keys(o)[0],De=o[ve];k=b(this.chart.scales[ve].getPixelForValue(De))}I=k-g,O=I-f,Z=e.left,B=e.right}const Me=U(i.ticks.maxTicksLimit,d),X=Math.max(1,Math.ceil(d/Me));for($=0;$<d;$+=X){const ve=this.getContext($),De=s.setContext(ve),$t=a.setContext(ve),Ue=De.lineWidth,Jn=De.color,ps=$t.dash||[],Yn=$t.dashOffset,Li=De.tickWidth,bn=De.tickColor,Fi=De.tickBorderDash||[],yn=De.tickBorderDashOffset;w=MN(this,$,l),w!==void 0&&(_=$n(r,w,Ue),u?I=O=Z=B=_:z=E=L=ge=_,h.push({tx1:I,ty1:z,tx2:O,ty2:E,x1:Z,y1:L,x2:B,y2:ge,width:Ue,color:Jn,borderDash:ps,borderDashOffset:Yn,tickWidth:Li,tickColor:bn,tickBorderDash:Fi,tickBorderDashOffset:yn}))}return this._ticksLength=d,this._borderValue=k,h}_computeLabelItems(e){const n=this.axis,r=this.options,{position:i,ticks:s}=r,o=this.isHorizontal(),a=this.ticks,{align:l,crossAlign:u,padding:c,mirror:d}=s,f=qi(r.grid),h=f+c,m=d?-c:h,p=-Ft(this.labelRotation),g=[];let b,k,$,w,_,I,z,O,E,Z,L,B,ge="middle";if(i==="top")I=this.bottom-m,z=this._getXAxisLabelAlignment();else if(i==="bottom")I=this.top+m,z=this._getXAxisLabelAlignment();else if(i==="left"){const X=this._getYAxisLabelAlignment(f);z=X.textAlign,_=X.x}else if(i==="right"){const X=this._getYAxisLabelAlignment(f);z=X.textAlign,_=X.x}else if(n==="x"){if(i==="center")I=(e.top+e.bottom)/2+h;else if(K(i)){const X=Object.keys(i)[0],ve=i[X];I=this.chart.scales[X].getPixelForValue(ve)+h}z=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")_=(e.left+e.right)/2-h;else if(K(i)){const X=Object.keys(i)[0],ve=i[X];_=this.chart.scales[X].getPixelForValue(ve)}z=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?ge="top":l==="end"&&(ge="bottom"));const Me=this._getLabelSizes();for(b=0,k=a.length;b<k;++b){$=a[b],w=$.label;const X=s.setContext(this.getContext(b));O=this.getPixelForTick(b)+s.labelOffset,E=this._resolveTickFontOptions(b),Z=E.lineHeight,L=Ne(w)?w.length:1;const ve=L/2,De=X.color,$t=X.textStrokeColor,Ue=X.textStrokeWidth;let Jn=z;o?(_=O,z==="inner"&&(b===k-1?Jn=this.options.reverse?"left":"right":b===0?Jn=this.options.reverse?"right":"left":Jn="center"),i==="top"?u==="near"||p!==0?B=-L*Z+Z/2:u==="center"?B=-Me.highest.height/2-ve*Z+Z:B=-Me.highest.height+Z/2:u==="near"||p!==0?B=Z/2:u==="center"?B=Me.highest.height/2-ve*Z:B=Me.highest.height-L*Z,d&&(B*=-1),p!==0&&!X.showLabelBackdrop&&(_+=Z/2*Math.sin(p))):(I=O,B=(1-L)*Z/2);let ps;if(X.showLabelBackdrop){const Yn=Ot(X.backdropPadding),Li=Me.heights[b],bn=Me.widths[b];let Fi=B-Yn.top,yn=0-Yn.left;switch(ge){case"middle":Fi-=Li/2;break;case"bottom":Fi-=Li;break}switch(z){case"center":yn-=bn/2;break;case"right":yn-=bn;break;case"inner":b===k-1?yn-=bn:b>0&&(yn-=bn/2);break}ps={left:yn,top:Fi,width:bn+Yn.width,height:Li+Yn.height,color:X.backdropColor}}g.push({label:w,font:E,textOffset:B,options:{rotation:p,color:De,strokeColor:$t,strokeWidth:Ue,textAlign:Jn,textBaseline:ge,translation:[_,I],backdrop:ps}})}return g}_getXAxisLabelAlignment(){const{position:e,ticks:n}=this.options;if(-Ft(this.labelRotation))return e==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(e){const{position:n,ticks:{crossAlign:r,mirror:i,padding:s}}=this.options,o=this._getLabelSizes(),a=e+s,l=o.widest.width;let u,c;return n==="left"?i?(c=this.right+s,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c+=l)):(c=this.right-a,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c=this.left)):n==="right"?i?(c=this.left+s,r==="near"?u="right":r==="center"?(u="center",c-=l/2):(u="left",c-=l)):(c=this.left+a,r==="near"?u="left":r==="center"?(u="center",c+=l/2):(u="right",c=this.right)):u="right",{textAlign:u,x:c}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:n},left:r,top:i,width:s,height:o}=this;n&&(e.save(),e.fillStyle=n,e.fillRect(r,i,s,o),e.restore())}getLineWidthForValue(e){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(s=>s.value===e);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(e){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let s,o;const a=(l,u,c)=>{!c.width||!c.color||(r.save(),r.lineWidth=c.width,r.strokeStyle=c.color,r.setLineDash(c.borderDash||[]),r.lineDashOffset=c.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(u.x,u.y),r.stroke(),r.restore())};if(n.display)for(s=0,o=i.length;s<o;++s){const l=i[s];n.drawOnChartArea&&a({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.drawTicks&&a({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:n,options:{border:r,grid:i}}=this,s=r.setContext(this.getContext()),o=r.display?s.width:0;if(!o)return;const a=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let u,c,d,f;this.isHorizontal()?(u=$n(e,this.left,o)-o/2,c=$n(e,this.right,a)+a/2,d=f=l):(d=$n(e,this.top,o)-o/2,f=$n(e,this.bottom,a)+a/2,u=c=l),n.save(),n.lineWidth=s.width,n.strokeStyle=s.color,n.beginPath(),n.moveTo(u,d),n.lineTo(c,f),n.stroke(),n.restore()}drawLabels(e){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&as(r,i);const s=this.getLabelItems(e);for(const o of s){const a=o.options,l=o.font,u=o.label,c=o.textOffset;ho(r,u,0,c,l,a)}i&&ls(r)}drawTitle(){const{ctx:e,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const s=tt(r.font),o=Ot(r.padding),a=r.align;let l=s.lineHeight/2;n==="bottom"||n==="center"||K(n)?(l+=o.bottom,Ne(r.text)&&(l+=s.lineHeight*(r.text.length-1))):l+=o.top;const{titleX:u,titleY:c,maxWidth:d,rotation:f}=ZN(this,l,n,a);ho(e,r.text,0,0,s,{color:r.color,maxWidth:d,rotation:f,textAlign:RN(a,n,i),textBaseline:"middle",translation:[u,c]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,n=e.ticks&&e.ticks.z||0,r=U(e.grid&&e.grid.z,-1),i=U(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Ei.prototype.draw?[{z:n,draw:s=>{this.draw(s)}}]:[{z:r,draw:s=>{this.drawBackground(),this.drawGrid(s),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:s=>{this.drawLabels(s)}}]}getMatchingVisibleMetas(e){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let s,o;for(s=0,o=n.length;s<o;++s){const a=n[s];a[r]===this.id&&(!e||a.type===e)&&i.push(a)}return i}_resolveTickFontOptions(e){const n=this.options.ticks.setContext(this.getContext(e));return tt(n.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class Ms{constructor(e,n,r){this.type=e,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const n=Object.getPrototypeOf(e);let r;LN(n)&&(r=this.register(n));const i=this.items,s=e.id,o=this.scope+"."+s;if(!s)throw new Error("class does not have id: "+e);return s in i||(i[s]=e,jN(e,o,r),this.override&&le.override(e.id,e.overrides)),o}get(e){return this.items[e]}unregister(e){const n=this.items,r=e.id,i=this.scope;r in n&&delete n[r],i&&r in le[i]&&(delete le[i][r],this.override&&delete Un[r])}}function jN(t,e,n){const r=yr(Object.create(null),[n?le.get(n):{},le.get(e),t.defaults]);le.set(e,r),t.defaultRoutes&&UN(e,t.defaultRoutes),t.descriptors&&le.describe(e,t.descriptors)}function UN(t,e){Object.keys(e).forEach(n=>{const r=n.split("."),i=r.pop(),s=[t].concat(r).join("."),o=e[n].split("."),a=o.pop(),l=o.join(".");le.route(s,i,l,a)})}function LN(t){return"id"in t&&"defaults"in t}class FN{constructor(){this.controllers=new Ms(sn,"datasets",!0),this.elements=new Ms(Ct,"elements"),this.plugins=new Ms(Object,"plugins"),this.scales=new Ms(Ei,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,n,r){[...n].forEach(i=>{const s=r||this._getRegistryForType(i);r||s.isForType(i)||s===this.plugins&&i.id?this._exec(e,s,i):ae(i,o=>{const a=r||this._getRegistryForType(o);this._exec(e,a,o)})})}_exec(e,n,r){const i=gd(e);me(r["before"+i],[],r),n[e](r),me(r["after"+i],[],r)}_getRegistryForType(e){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(e))return r}return this.plugins}_get(e,n,r){const i=n.get(e);if(i===void 0)throw new Error('"'+e+'" is not a registered '+r+".");return i}}var Et=new FN;class VN{constructor(){this._init=void 0}notify(e,n,r,i){if(n==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const s=i?this._descriptors(e).filter(i):this._descriptors(e),o=this._notify(s,e,n,r);return n==="afterDestroy"&&(this._notify(s,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),o}_notify(e,n,r,i){i=i||{};for(const s of e){const o=s.plugin,a=o[r],l=[n,i,s.options];if(me(a,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){ne(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),n}_createDescriptors(e,n){const r=e&&e.config,i=U(r.options&&r.options.plugins,{}),s=WN(r);return i===!1&&!n?[]:BN(e,s,i,n)}_notifyStateChanges(e){const n=this._oldCache||[],r=this._cache,i=(s,o)=>s.filter(a=>!o.some(l=>a.plugin.id===l.plugin.id));this._notify(i(n,r),e,"stop"),this._notify(i(r,n),e,"start")}}function WN(t){const e={},n=[],r=Object.keys(Et.plugins.items);for(let s=0;s<r.length;s++)n.push(Et.getPlugin(r[s]));const i=t.plugins||[];for(let s=0;s<i.length;s++){const o=i[s];n.indexOf(o)===-1&&(n.push(o),e[o.id]=!0)}return{plugins:n,localIds:e}}function HN(t,e){return!e&&t===!1?null:t===!0?{}:t}function BN(t,{plugins:e,localIds:n},r,i){const s=[],o=t.getContext();for(const a of e){const l=a.id,u=HN(r[l],i);u!==null&&s.push({plugin:a,options:qN(t.config,{plugin:a,local:n[l]},u,o)})}return s}function qN(t,{plugin:e,local:n},r,i){const s=t.pluginScopeKeys(e),o=t.getOptionScopes(r,s);return n&&e.defaults&&o.push(e.defaults),t.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function xl(t,e){const n=le.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||n.indexAxis||"x"}function JN(t,e){let n=t;return t==="_index_"?n=e:t==="_value_"&&(n=e==="x"?"y":"x"),n}function YN(t,e){return t===e?"_index_":"_value_"}function dh(t){if(t==="x"||t==="y"||t==="r")return t}function GN(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function wl(t,...e){if(dh(t))return t;for(const n of e){const r=n.axis||GN(n.position)||t.length>1&&dh(t[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function fh(t,e,n){if(n[e+"AxisID"]===t)return{axis:e}}function KN(t,e){if(e.data&&e.data.datasets){const n=e.data.datasets.filter(r=>r.xAxisID===t||r.yAxisID===t);if(n.length)return fh(t,"x",n[0])||fh(t,"y",n[0])}return{}}function XN(t,e){const n=Un[t.type]||{scales:{}},r=e.scales||{},i=xl(t.type,e),s=Object.create(null);return Object.keys(r).forEach(o=>{const a=r[o];if(!K(a))return console.error(`Invalid scale configuration for scale: ${o}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=wl(o,a,KN(o,t),le.scales[a.type]),u=YN(l,i),c=n.scales||{};s[o]=rr(Object.create(null),[{axis:l},a,c[l],c[u]])}),t.data.datasets.forEach(o=>{const a=o.type||t.type,l=o.indexAxis||xl(a,e),c=(Un[a]||{}).scales||{};Object.keys(c).forEach(d=>{const f=JN(d,l),h=o[f+"AxisID"]||f;s[h]=s[h]||Object.create(null),rr(s[h],[{axis:f},r[h],c[d]])})}),Object.keys(s).forEach(o=>{const a=s[o];rr(a,[le.scales[a.type],le.scale])}),s}function Wk(t){const e=t.options||(t.options={});e.plugins=U(e.plugins,{}),e.scales=XN(t,e)}function Hk(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function QN(t){return t=t||{},t.data=Hk(t.data),Wk(t),t}const hh=new Map,Bk=new Set;function Ns(t,e){let n=hh.get(t);return n||(n=e(),hh.set(t,n),Bk.add(n)),n}const Ji=(t,e,n)=>{const r=jn(e,n);r!==void 0&&t.add(r)};class e4{constructor(e){this._config=QN(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=Hk(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),Wk(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return Ns(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,n){return Ns(`${e}.transition.${n}`,()=>[[`datasets.${e}.transitions.${n}`,`transitions.${n}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,n){return Ns(`${e}-${n}`,()=>[[`datasets.${e}.elements.${n}`,`datasets.${e}`,`elements.${n}`,""]])}pluginScopeKeys(e){const n=e.id,r=this.type;return Ns(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,n){const r=this._scopeCache;let i=r.get(e);return(!i||n)&&(i=new Map,r.set(e,i)),i}getOptionScopes(e,n,r){const{options:i,type:s}=this,o=this._cachedScopes(e,r),a=o.get(n);if(a)return a;const l=new Set;n.forEach(c=>{e&&(l.add(e),c.forEach(d=>Ji(l,e,d))),c.forEach(d=>Ji(l,i,d)),c.forEach(d=>Ji(l,Un[s]||{},d)),c.forEach(d=>Ji(l,le,d)),c.forEach(d=>Ji(l,kl,d))});const u=Array.from(l);return u.length===0&&u.push(Object.create(null)),Bk.has(n)&&o.set(n,u),u}chartOptionScopes(){const{options:e,type:n}=this;return[e,Un[n]||{},le.datasets[n]||{},{type:n},le,kl]}resolveNamedOptions(e,n,r,i=[""]){const s={$shared:!0},{resolver:o,subPrefixes:a}=mh(this._resolverCache,e,i);let l=o;if(n4(o,n)){s.$shared=!1,r=mn(r)?r():r;const u=this.createResolver(e,r,a);l=Si(o,r,u)}for(const u of n)s[u]=l[u];return s}createResolver(e,n,r=[""],i){const{resolver:s}=mh(this._resolverCache,e,r);return K(n)?Si(s,n,void 0,i):s}}function mh(t,e,n){let r=t.get(e);r||(r=new Map,t.set(e,r));const i=n.join();let s=r.get(i);return s||(s={resolver:kd(e,n),subPrefixes:n.filter(a=>!a.toLowerCase().includes("hover"))},r.set(i,s)),s}const t4=t=>K(t)&&Object.getOwnPropertyNames(t).some(e=>mn(t[e]));function n4(t,e){const{isScriptable:n,isIndexable:r}=wk(t);for(const i of e){const s=n(i),o=r(i),a=(o||s)&&t[i];if(s&&(mn(a)||t4(a))||o&&Ne(a))return!0}return!1}var i4="4.5.1";const r4=["top","bottom","left","right","chartArea"];function ph(t,e){return t==="top"||t==="bottom"||r4.indexOf(t)===-1&&e==="x"}function gh(t,e){return function(n,r){return n[t]===r[t]?n[e]-r[e]:n[t]-r[t]}}function vh(t){const e=t.chart,n=e.options.animation;e.notifyPlugins("afterRender"),me(n&&n.onComplete,[t],e)}function s4(t){const e=t.chart,n=e.options.animation;me(n&&n.onProgress,[t],e)}function qk(t){return wd()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Ws={},bh=t=>{const e=qk(t);return Object.values(Ws).filter(n=>n.canvas===e).pop()};function o4(t,e,n){const r=Object.keys(t);for(const i of r){const s=+i;if(s>=e){const o=t[i];delete t[i],(n>0||s>e)&&(t[s+n]=o)}}}function a4(t,e,n,r){return!n||t.type==="mouseout"?null:r?e:t}class Oe{static register(...e){Et.add(...e),yh()}static unregister(...e){Et.remove(...e),yh()}constructor(e,n){const r=this.config=new e4(n),i=qk(e),s=bh(i);if(s)throw new Error("Canvas is already in use. Chart with ID '"+s.id+"' must be destroyed before the canvas with ID '"+s.canvas.id+"' can be reused.");const o=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||SN(i)),this.platform.updateConfig(r);const a=this.platform.acquireContext(i,o.aspectRatio),l=a&&a.canvas,u=l&&l.height,c=l&&l.width;if(this.id=lE(),this.ctx=a,this.canvas=l,this.width=c,this.height=u,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new VN,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=zE(d=>this.update(d),o.resizeDelay||0),this._dataChanges=[],Ws[this.id]=this,!a||!l){console.error("Failed to create chart: can't acquire context from the given item");return}Zt.listen(this,"complete",vh),Zt.listen(this,"progress",s4),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:n},width:r,height:i,_aspectRatio:s}=this;return ne(e)?n&&s?s:i?r/i:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return Et}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Lf(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Zf(this.canvas,this.ctx),this}stop(){return Zt.stop(this),this}resize(e,n){Zt.running(this)?this._resizeBeforeDraw={width:e,height:n}:this._resize(e,n)}_resize(e,n){const r=this.options,i=this.canvas,s=r.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,e,n,s),a=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,Lf(this,a,!0)&&(this.notifyPlugins("resize",{size:o}),me(r.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};ae(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const e=this.options,n=e.scales,r=this.scales,i=Object.keys(r).reduce((o,a)=>(o[a]=!1,o),{});let s=[];n&&(s=s.concat(Object.keys(n).map(o=>{const a=n[o],l=wl(o,a),u=l==="r",c=l==="x";return{options:a,dposition:u?"chartArea":c?"bottom":"left",dtype:u?"radialLinear":c?"category":"linear"}}))),ae(s,o=>{const a=o.options,l=a.id,u=wl(l,a),c=U(a.type,o.dtype);(a.position===void 0||ph(a.position,u)!==ph(o.dposition))&&(a.position=o.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===c)d=r[l];else{const f=Et.getScale(c);d=new f({id:l,type:c,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(a,e)}),ae(i,(o,a)=>{o||delete r[a]}),ae(r,o=>{tn.configure(this,o,o.options),tn.addBox(this,o)})}_updateMetasets(){const e=this._metasets,n=this.data.datasets.length,r=e.length;if(e.sort((i,s)=>i.index-s.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);e.splice(n,r-n)}this._sortedMetasets=e.slice(0).sort(gh("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:n}}=this;e.length>n.length&&delete this._stacks,e.forEach((r,i)=>{n.filter(s=>s===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const e=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const s=n[r];let o=this.getDatasetMeta(r);const a=s.type||this.config.type;if(o.type&&o.type!==a&&(this._destroyDatasetMeta(r),o=this.getDatasetMeta(r)),o.type=a,o.indexAxis=s.indexAxis||xl(a,this.options),o.order=s.order||0,o.index=r,o.label=""+s.label,o.visible=this.isDatasetVisible(r),o.controller)o.controller.updateIndex(r),o.controller.linkScales();else{const l=Et.getController(a),{datasetElementType:u,dataElementType:c}=le.datasets[a];Object.assign(l,{dataElementType:Et.getElement(c),datasetElementType:u&&Et.getElement(u)}),o.controller=new l(this,r),e.push(o.controller)}}return this._updateMetasets(),e}_resetElements(){ae(this.data.datasets,(e,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const s=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let u=0,c=this.data.datasets.length;u<c;u++){const{controller:d}=this.getDatasetMeta(u),f=!i&&s.indexOf(d)===-1;d.buildOrUpdateElements(f),o=Math.max(+d.getMaxOverflow(),o)}o=this._minPadding=r.layout.autoPadding?o:0,this._updateLayout(o),i||ae(s,u=>{u.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(gh("z","_idx"));const{_active:a,_lastEvent:l}=this;l?this._eventHandler(l,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){ae(this.scales,e=>{tn.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(e.events);(!Of(n,r)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:s}of n){const o=r==="_removeElements"?-s:s;o4(e,i,o)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=s=>new Set(e.filter(o=>o[0]===s).map((o,a)=>a+","+o.splice(1).join(","))),i=r(0);for(let s=1;s<n;s++)if(!Of(i,r(s)))return;return Array.from(i).map(s=>s.split(",")).map(s=>({method:s[1],start:+s[2],count:+s[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;tn.update(this,this.width,this.height,e);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],ae(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,s)=>{i._idx=s}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,mn(e)?e({datasetIndex:n}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,n){const r=this.getDatasetMeta(e),i={meta:r,index:e,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(Zt.has(this)?this.attached&&!Zt.running(this)&&Zt.start(this):(this.draw(),vh({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(e=0;e<n.length&&n[e].z<=0;++e)n[e].draw(this.chartArea);for(this._drawDatasets();e<n.length;++e)n[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const n=this._sortedMetasets,r=[];let i,s;for(i=0,s=n.length;i<s;++i){const o=n[i];(!e||o.visible)&&r.push(o)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let n=e.length-1;n>=0;--n)this._drawDataset(e[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const n=this.ctx,r={meta:e,index:e.index,cancelable:!0},i=Nk(this,e);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&as(n,i),e.controller.draw(),i&&ls(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(e){return $r(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,n,r,i){const s=rN.modes[n];return typeof s=="function"?s(this,e,r,i):[]}getDatasetMeta(e){const n=this.data.datasets[e],r=this._metasets;let i=r.filter(s=>s&&s._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:e,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=Bn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const n=this.data.datasets[e];if(!n)return!1;const r=this.getDatasetMeta(e);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(e,n){const r=this.getDatasetMeta(e);r.hidden=!n}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,n,r){const i=r?"show":"hide",s=this.getDatasetMeta(e),o=s.controller._resolveAnimations(void 0,i);_r(n)?(s.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(e,r),o.update(s,{visible:r}),this.update(a=>a.datasetIndex===e?i:void 0))}hide(e,n){this._updateVisibility(e,n,!1)}show(e,n){this._updateVisibility(e,n,!0)}_destroyDatasetMeta(e){const n=this._metasets[e];n&&n.controller&&n.controller._destroy(),delete this._metasets[e]}_stop(){let e,n;for(this.stop(),Zt.remove(this),e=0,n=this.data.datasets.length;e<n;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:n}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),Zf(e,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete Ws[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,n=this.platform,r=(s,o)=>{n.addEventListener(this,s,o),e[s]=o},i=(s,o,a)=>{s.offsetX=o,s.offsetY=a,this._eventHandler(s)};ae(this.options.events,s=>r(s,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,n=this.platform,r=(l,u)=>{n.addEventListener(this,l,u),e[l]=u},i=(l,u)=>{e[l]&&(n.removeEventListener(this,l,u),delete e[l])},s=(l,u)=>{this.canvas&&this.resize(l,u)};let o;const a=()=>{i("attach",a),this.attached=!0,this.resize(),r("resize",s),r("detach",o)};o=()=>{this.attached=!1,i("resize",s),this._stop(),this._resize(0,0),r("attach",a)},n.isAttached(this.canvas)?a():o()}unbindEvents(){ae(this._listeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._listeners={},ae(this._responsiveListeners,(e,n)=>{this.platform.removeEventListener(this,n,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,n,r){const i=r?"set":"remove";let s,o,a,l;for(n==="dataset"&&(s=this.getDatasetMeta(e[0].datasetIndex),s.controller["_"+i+"DatasetHoverStyle"]()),a=0,l=e.length;a<l;++a){o=e[a];const u=o&&this.getDatasetMeta(o.datasetIndex).controller;u&&u[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const n=this._active||[],r=e.map(({datasetIndex:s,index:o})=>{const a=this.getDatasetMeta(s);if(!a)throw new Error("No dataset found at index "+s);return{datasetIndex:s,element:a.data[o],index:o}});!uo(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(e,n,r){return this._plugins.notify(this,e,n,r)}isPluginEnabled(e){return this._plugins._cache.filter(n=>n.plugin.id===e).length===1}_updateHoverStyles(e,n,r){const i=this.options.hover,s=(l,u)=>l.filter(c=>!u.some(d=>c.datasetIndex===d.datasetIndex&&c.index===d.index)),o=s(n,e),a=r?e:s(e,n);o.length&&this.updateHoverStyle(o,i.mode,!1),a.length&&i.mode&&this.updateHoverStyle(a,i.mode,!0)}_eventHandler(e,n){const r={event:e,replay:n,cancelable:!0,inChartArea:this.isPointInArea(e)},i=o=>(o.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const s=this._handleEvent(e,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(s||r.changed)&&this.render(),this}_handleEvent(e,n,r){const{_active:i=[],options:s}=this,o=n,a=this._getActiveElements(e,i,r,o),l=mE(e),u=a4(e,this._lastEvent,r,l);r&&(this._lastEvent=null,me(s.onHover,[e,a,this],this),l&&me(s.onClick,[e,a,this],this));const c=!uo(a,i);return(c||n)&&(this._active=a,this._updateHoverStyles(a,i,n)),this._lastEvent=u,c}_getActiveElements(e,n,r,i){if(e.type==="mouseout")return[];if(!r)return n;const s=this.options.hover;return this.getElementsAtEventForMode(e,s.mode,s,i)}}D(Oe,"defaults",le),D(Oe,"instances",Ws),D(Oe,"overrides",Un),D(Oe,"registry",Et),D(Oe,"version",i4),D(Oe,"getChart",bh);function yh(){return ae(Oe.instances,t=>t._plugins.invalidate())}function l4(t,e,n){const{startAngle:r,x:i,y:s,outerRadius:o,innerRadius:a,options:l}=e,{borderWidth:u,borderJoinStyle:c}=l,d=Math.min(u/o,st(r-n));if(t.beginPath(),t.arc(i,s,o-u/2,r+d/2,n-d/2),a>0){const f=Math.min(u/a,st(r-n));t.arc(i,s,a+u/2,n-f/2,r+f/2,!0)}else{const f=Math.min(u/2,o*st(r-n));if(c==="round")t.arc(i,s,f,n-de/2,r+de/2,!0);else if(c==="bevel"){const h=2*f*f,m=-h*Math.cos(n+de/2)+i,p=-h*Math.sin(n+de/2)+s,g=h*Math.cos(r+de/2)+i,b=h*Math.sin(r+de/2)+s;t.lineTo(m,p),t.lineTo(g,b)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function u4(t,e,n){const{startAngle:r,pixelMargin:i,x:s,y:o,outerRadius:a,innerRadius:l}=e;let u=i/a;t.beginPath(),t.arc(s,o,a,r-u,n+u),l>i?(u=i/l,t.arc(s,o,l,n+u,r-u,!0)):t.arc(s,o,i,n+Ce,r-Ce),t.closePath(),t.clip()}function c4(t){return _d(t,["outerStart","outerEnd","innerStart","innerEnd"])}function d4(t,e,n,r){const i=c4(t.options.borderRadius),s=(n-e)/2,o=Math.min(s,r*e/2),a=l=>{const u=(n-Math.min(s,l))*r/2;return He(l,0,Math.min(s,u))};return{outerStart:a(i.outerStart),outerEnd:a(i.outerEnd),innerStart:He(i.innerStart,0,o),innerEnd:He(i.innerEnd,0,o)}}function Xn(t,e,n,r){return{x:n+t*Math.cos(e),y:r+t*Math.sin(e)}}function bo(t,e,n,r,i,s){const{x:o,y:a,startAngle:l,pixelMargin:u,innerRadius:c}=e,d=Math.max(e.outerRadius+r+n-u,0),f=c>0?c+r+n+u:0;let h=0;const m=i-l;if(r){const X=c>0?c-r:0,ve=d>0?d-r:0,De=(X+ve)/2,$t=De!==0?m*De/(De+r):m;h=(m-$t)/2}const p=Math.max(.001,m*d-n/de)/d,g=(m-p)/2,b=l+g+h,k=i-g-h,{outerStart:$,outerEnd:w,innerStart:_,innerEnd:I}=d4(e,f,d,k-b),z=d-$,O=d-w,E=b+$/z,Z=k-w/O,L=f+_,B=f+I,ge=b+_/L,Me=k-I/B;if(t.beginPath(),s){const X=(E+Z)/2;if(t.arc(o,a,d,E,X),t.arc(o,a,d,X,Z),w>0){const Ue=Xn(O,Z,o,a);t.arc(Ue.x,Ue.y,w,Z,k+Ce)}const ve=Xn(B,k,o,a);if(t.lineTo(ve.x,ve.y),I>0){const Ue=Xn(B,Me,o,a);t.arc(Ue.x,Ue.y,I,k+Ce,Me+Math.PI)}const De=(k-I/f+(b+_/f))/2;if(t.arc(o,a,f,k-I/f,De,!0),t.arc(o,a,f,De,b+_/f,!0),_>0){const Ue=Xn(L,ge,o,a);t.arc(Ue.x,Ue.y,_,ge+Math.PI,b-Ce)}const $t=Xn(z,b,o,a);if(t.lineTo($t.x,$t.y),$>0){const Ue=Xn(z,E,o,a);t.arc(Ue.x,Ue.y,$,b-Ce,E)}}else{t.moveTo(o,a);const X=Math.cos(E)*d+o,ve=Math.sin(E)*d+a;t.lineTo(X,ve);const De=Math.cos(Z)*d+o,$t=Math.sin(Z)*d+a;t.lineTo(De,$t)}t.closePath()}function f4(t,e,n,r,i){const{fullCircles:s,startAngle:o,circumference:a}=e;let l=e.endAngle;if(s){bo(t,e,n,r,l,i);for(let u=0;u<s;++u)t.fill();isNaN(a)||(l=o+(a%$e||$e))}return bo(t,e,n,r,l,i),t.fill(),l}function h4(t,e,n,r,i){const{fullCircles:s,startAngle:o,circumference:a,options:l}=e,{borderWidth:u,borderJoinStyle:c,borderDash:d,borderDashOffset:f,borderRadius:h}=l,m=l.borderAlign==="inner";if(!u)return;t.setLineDash(d||[]),t.lineDashOffset=f,m?(t.lineWidth=u*2,t.lineJoin=c||"round"):(t.lineWidth=u,t.lineJoin=c||"bevel");let p=e.endAngle;if(s){bo(t,e,n,r,p,i);for(let g=0;g<s;++g)t.stroke();isNaN(a)||(p=o+(a%$e||$e))}m&&u4(t,e,p),l.selfJoin&&p-o>=de&&h===0&&c!=="miter"&&l4(t,e,p),s||(bo(t,e,n,r,p,i),t.stroke())}class si extends Ct{constructor(n){super();D(this,"circumference");D(this,"endAngle");D(this,"fullCircles");D(this,"innerRadius");D(this,"outerRadius");D(this,"pixelMargin");D(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.getProps(["x","y"],i),{angle:o,distance:a}=hk(s,{x:n,y:r}),{startAngle:l,endAngle:u,innerRadius:c,outerRadius:d,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],i),h=(this.options.spacing+this.options.borderWidth)/2,m=U(f,u-l),p=kr(o,l,u)&&l!==u,g=m>=$e||p,b=Vt(a,c+h,d+h);return g&&b}getCenterPoint(n){const{x:r,y:i,startAngle:s,endAngle:o,innerRadius:a,outerRadius:l}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],n),{offset:u,spacing:c}=this.options,d=(s+o)/2,f=(a+l+c+u)/2;return{x:r+Math.cos(d)*f,y:i+Math.sin(d)*f}}tooltipPosition(n){return this.getCenterPoint(n)}draw(n){const{options:r,circumference:i}=this,s=(r.offset||0)/4,o=(r.spacing||0)/2,a=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=i>$e?Math.floor(i/$e):0,i===0||this.innerRadius<0||this.outerRadius<0)return;n.save();const l=(this.startAngle+this.endAngle)/2;n.translate(Math.cos(l)*s,Math.sin(l)*s);const u=1-Math.sin(Math.min(de,i||0)),c=s*u;n.fillStyle=r.backgroundColor,n.strokeStyle=r.borderColor,f4(n,this,c,o,a),h4(n,this,c,o,a),n.restore()}}D(si,"id","arc"),D(si,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),D(si,"defaultRoutes",{backgroundColor:"backgroundColor"}),D(si,"descriptors",{_scriptable:!0,_indexable:n=>n!=="borderDash"});function Jk(t,e,n=e){t.lineCap=U(n.borderCapStyle,e.borderCapStyle),t.setLineDash(U(n.borderDash,e.borderDash)),t.lineDashOffset=U(n.borderDashOffset,e.borderDashOffset),t.lineJoin=U(n.borderJoinStyle,e.borderJoinStyle),t.lineWidth=U(n.borderWidth,e.borderWidth),t.strokeStyle=U(n.borderColor,e.borderColor)}function m4(t,e,n){t.lineTo(n.x,n.y)}function p4(t){return t.stepped?jE:t.tension||t.cubicInterpolationMode==="monotone"?UE:m4}function Yk(t,e,n={}){const r=t.length,{start:i=0,end:s=r-1}=n,{start:o,end:a}=e,l=Math.max(i,o),u=Math.min(s,a),c=i<o&&s<o||i>a&&s>a;return{count:r,start:l,loop:e.loop,ilen:u<l&&!c?r+u-l:u-l}}function g4(t,e,n,r){const{points:i,options:s}=e,{count:o,start:a,loop:l,ilen:u}=Yk(i,n,r),c=p4(s);let{move:d=!0,reverse:f}=r||{},h,m,p;for(h=0;h<=u;++h)m=i[(a+(f?u-h:h))%o],!m.skip&&(d?(t.moveTo(m.x,m.y),d=!1):c(t,p,m,f,s.stepped),p=m);return l&&(m=i[(a+(f?u:0))%o],c(t,p,m,f,s.stepped)),!!l}function v4(t,e,n,r){const i=e.points,{count:s,start:o,ilen:a}=Yk(i,n,r),{move:l=!0,reverse:u}=r||{};let c=0,d=0,f,h,m,p,g,b;const k=w=>(o+(u?a-w:w))%s,$=()=>{p!==g&&(t.lineTo(c,g),t.lineTo(c,p),t.lineTo(c,b))};for(l&&(h=i[k(0)],t.moveTo(h.x,h.y)),f=0;f<=a;++f){if(h=i[k(f)],h.skip)continue;const w=h.x,_=h.y,I=w|0;I===m?(_<p?p=_:_>g&&(g=_),c=(d*c+w)/++d):($(),t.lineTo(w,_),m=I,d=0,p=g=_),b=_}$()}function Sl(t){const e=t.options,n=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!n?v4:g4}function b4(t){return t.stepped?bM:t.tension||t.cubicInterpolationMode==="monotone"?yM:On}function y4(t,e,n,r){let i=e._path;i||(i=e._path=new Path2D,e.path(i,n,r)&&i.closePath()),Jk(t,e.options),t.stroke(i)}function _4(t,e,n,r){const{segments:i,options:s}=e,o=Sl(e);for(const a of i)Jk(t,s,a.style),t.beginPath(),o(t,e,a,{start:n,end:n+r-1})&&t.closePath(),t.stroke()}const k4=typeof Path2D=="function";function $4(t,e,n,r){k4&&!e.options.segment?y4(t,e,n,r):_4(t,e,n,r)}class Wt extends Ct{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;cM(this._points,r,e,i,n),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=SM(this,this.options.segment))}first(){const e=this.segments,n=this.points;return e.length&&n[e[0].start]}last(){const e=this.segments,n=this.points,r=e.length;return r&&n[e[r-1].end]}interpolate(e,n){const r=this.options,i=e[n],s=this.points,o=Mk(this,{property:n,start:i,end:i});if(!o.length)return;const a=[],l=b4(r);let u,c;for(u=0,c=o.length;u<c;++u){const{start:d,end:f}=o[u],h=s[d],m=s[f];if(h===m){a.push(h);continue}const p=Math.abs((i-h[n])/(m[n]-h[n])),g=l(h,m,p,r.stepped);g[n]=e[n],a.push(g)}return a.length===1?a[0]:a}pathSegment(e,n,r){return Sl(this)(e,this,n,r)}path(e,n,r){const i=this.segments,s=Sl(this);let o=this._loop;n=n||0,r=r||this.points.length-n;for(const a of i)o&=s(e,this,a,{start:n,end:n+r-1});return!!o}draw(e,n,r,i){const s=this.options||{};(this.points||[]).length&&s.borderWidth&&(e.save(),$4(e,this,r,i),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}D(Wt,"id","line"),D(Wt,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),D(Wt,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),D(Wt,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function _h(t,e,n,r){const i=t.options,{[n]:s}=t.getProps([n],r);return Math.abs(e-s)<i.radius+i.hitRadius}class ci extends Ct{constructor(n){super();D(this,"parsed");D(this,"skip");D(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,n&&Object.assign(this,n)}inRange(n,r,i){const s=this.options,{x:o,y:a}=this.getProps(["x","y"],i);return Math.pow(n-o,2)+Math.pow(r-a,2)<Math.pow(s.hitRadius+s.radius,2)}inXRange(n,r){return _h(this,n,"x",r)}inYRange(n,r){return _h(this,n,"y",r)}getCenterPoint(n){const{x:r,y:i}=this.getProps(["x","y"],n);return{x:r,y:i}}size(n){n=n||this.options||{};let r=n.radius||0;r=Math.max(r,r&&n.hoverRadius||0);const i=r&&n.borderWidth||0;return(r+i)*2}draw(n,r){const i=this.options;this.skip||i.radius<.1||!$r(this,r,this.size(i)/2)||(n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.fillStyle=i.backgroundColor,$l(n,i,this.x,this.y))}getRange(){const n=this.options||{};return n.radius+n.hitRadius}}D(ci,"id","point"),D(ci,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),D(ci,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function Gk(t,e){const{x:n,y:r,base:i,width:s,height:o}=t.getProps(["x","y","base","width","height"],e);let a,l,u,c,d;return t.horizontal?(d=o/2,a=Math.min(n,i),l=Math.max(n,i),u=r-d,c=r+d):(d=s/2,a=n-d,l=n+d,u=Math.min(r,i),c=Math.max(r,i)),{left:a,top:u,right:l,bottom:c}}function nn(t,e,n,r){return t?0:He(e,n,r)}function x4(t,e,n){const r=t.options.borderWidth,i=t.borderSkipped,s=xk(r);return{t:nn(i.top,s.top,0,n),r:nn(i.right,s.right,0,e),b:nn(i.bottom,s.bottom,0,n),l:nn(i.left,s.left,0,e)}}function w4(t,e,n){const{enableBorderRadius:r}=t.getProps(["enableBorderRadius"]),i=t.options.borderRadius,s=li(i),o=Math.min(e,n),a=t.borderSkipped,l=r||K(i);return{topLeft:nn(!l||a.top||a.left,s.topLeft,0,o),topRight:nn(!l||a.top||a.right,s.topRight,0,o),bottomLeft:nn(!l||a.bottom||a.left,s.bottomLeft,0,o),bottomRight:nn(!l||a.bottom||a.right,s.bottomRight,0,o)}}function S4(t){const e=Gk(t),n=e.right-e.left,r=e.bottom-e.top,i=x4(t,n/2,r/2),s=w4(t,n/2,r/2);return{outer:{x:e.left,y:e.top,w:n,h:r,radius:s},inner:{x:e.left+i.l,y:e.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,s.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(i.b,i.r))}}}}function Ya(t,e,n,r){const i=e===null,s=n===null,a=t&&!(i&&s)&&Gk(t,r);return a&&(i||Vt(e,a.left,a.right))&&(s||Vt(n,a.top,a.bottom))}function I4(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function z4(t,e){t.rect(e.x,e.y,e.w,e.h)}function Ga(t,e,n={}){const r=t.x!==n.x?-e:0,i=t.y!==n.y?-e:0,s=(t.x+t.w!==n.x+n.w?e:0)-r,o=(t.y+t.h!==n.y+n.h?e:0)-i;return{x:t.x+r,y:t.y+i,w:t.w+s,h:t.h+o,radius:t.radius}}class di extends Ct{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:s,outer:o}=S4(this),a=I4(o.radius)?mo:z4;e.save(),(o.w!==s.w||o.h!==s.h)&&(e.beginPath(),a(e,Ga(o,n,s)),e.clip(),a(e,Ga(s,-n,o)),e.fillStyle=r,e.fill("evenodd")),e.beginPath(),a(e,Ga(s,n)),e.fillStyle=i,e.fill(),e.restore()}inRange(e,n,r){return Ya(this,e,n,r)}inXRange(e,n){return Ya(this,e,null,n)}inYRange(e,n){return Ya(this,null,e,n)}getCenterPoint(e){const{x:n,y:r,base:i,horizontal:s}=this.getProps(["x","y","base","horizontal"],e);return{x:s?(n+i)/2:n,y:s?r:(r+i)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}D(di,"id","bar"),D(di,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),D(di,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function O4(t,e,n){const r=t.segments,i=t.points,s=e.points,o=[];for(const a of r){let{start:l,end:u}=a;u=za(l,u,i);const c=Il(n,i[l],i[u],a.loop);if(!e.segments){o.push({source:a,target:c,start:i[l],end:i[u]});continue}const d=Mk(e,c);for(const f of d){const h=Il(n,s[f.start],s[f.end],f.loop),m=Ek(a,i,h);for(const p of m)o.push({source:p,target:f,start:{[n]:kh(c,h,"start",Math.max)},end:{[n]:kh(c,h,"end",Math.min)}})}}return o}function Il(t,e,n,r){if(r)return;let i=e[t],s=n[t];return t==="angle"&&(i=st(i),s=st(s)),{property:t,start:i,end:s}}function T4(t,e){const{x:n=null,y:r=null}=t||{},i=e.points,s=[];return e.segments.forEach(({start:o,end:a})=>{a=za(o,a,i);const l=i[o],u=i[a];r!==null?(s.push({x:l.x,y:r}),s.push({x:u.x,y:r})):n!==null&&(s.push({x:n,y:l.y}),s.push({x:n,y:u.y}))}),s}function za(t,e,n){for(;e>t;e--){const r=n[e];if(!isNaN(r.x)&&!isNaN(r.y))break}return e}function kh(t,e,n,r){return t&&e?r(t[n],e[n]):t?t[n]:e?e[n]:0}function Kk(t,e){let n=[],r=!1;return Ne(t)?(r=!0,n=t):n=T4(t,e),n.length?new Wt({points:n,options:{tension:0},_loop:r,_fullLoop:r}):null}function $h(t){return t&&t.fill!==!1}function D4(t,e,n){let i=t[e].fill;const s=[e];let o;if(!n)return i;for(;i!==!1&&s.indexOf(i)===-1;){if(!qe(i))return i;if(o=t[i],!o)return!1;if(o.visible)return i;s.push(i),i=o.fill}return!1}function P4(t,e,n){const r=C4(t);if(K(r))return isNaN(r.value)?!1:r;let i=parseFloat(r);return qe(i)&&Math.floor(i)===i?E4(r[0],e,i,n):["origin","start","end","stack","shape"].indexOf(r)>=0&&r}function E4(t,e,n,r){return(t==="-"||t==="+")&&(n=e+n),n===e||n<0||n>=r?!1:n}function M4(t,e){let n=null;return t==="start"?n=e.bottom:t==="end"?n=e.top:K(t)?n=e.getPixelForValue(t.value):e.getBasePixel&&(n=e.getBasePixel()),n}function N4(t,e,n){let r;return t==="start"?r=n:t==="end"?r=e.options.reverse?e.min:e.max:K(t)?r=t.value:r=e.getBaseValue(),r}function C4(t){const e=t.options,n=e.fill;let r=U(n&&n.target,n);return r===void 0&&(r=!!e.backgroundColor),r===!1||r===null?!1:r===!0?"origin":r}function A4(t){const{scale:e,index:n,line:r}=t,i=[],s=r.segments,o=r.points,a=R4(e,n);a.push(Kk({x:null,y:e.bottom},r));for(let l=0;l<s.length;l++){const u=s[l];for(let c=u.start;c<=u.end;c++)Z4(i,o[c],a)}return new Wt({points:i,options:{}})}function R4(t,e){const n=[],r=t.getMatchingVisibleMetas("line");for(let i=0;i<r.length;i++){const s=r[i];if(s.index===e)break;s.hidden||n.unshift(s.dataset)}return n}function Z4(t,e,n){const r=[];for(let i=0;i<n.length;i++){const s=n[i],{first:o,last:a,point:l}=j4(s,e,"x");if(!(!l||o&&a)){if(o)r.unshift(l);else if(t.push(l),!a)break}}t.push(...r)}function j4(t,e,n){const r=t.interpolate(e,n);if(!r)return{};const i=r[n],s=t.segments,o=t.points;let a=!1,l=!1;for(let u=0;u<s.length;u++){const c=s[u],d=o[c.start][n],f=o[c.end][n];if(Vt(i,d,f)){a=i===d,l=i===f;break}}return{first:a,last:l,point:r}}class Xk{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,n,r){const{x:i,y:s,radius:o}=this;return n=n||{start:0,end:$e},e.arc(i,s,o,n.end,n.start,!0),!r.bounds}interpolate(e){const{x:n,y:r,radius:i}=this,s=e.angle;return{x:n+Math.cos(s)*i,y:r+Math.sin(s)*i,angle:s}}}function U4(t){const{chart:e,fill:n,line:r}=t;if(qe(n))return L4(e,n);if(n==="stack")return A4(t);if(n==="shape")return!0;const i=F4(t);return i instanceof Xk?i:Kk(i,r)}function L4(t,e){const n=t.getDatasetMeta(e);return n&&t.isDatasetVisible(e)?n.dataset:null}function F4(t){return(t.scale||{}).getPointPositionForValue?W4(t):V4(t)}function V4(t){const{scale:e={},fill:n}=t,r=M4(n,e);if(qe(r)){const i=e.isHorizontal();return{x:i?r:null,y:i?null:r}}return null}function W4(t){const{scale:e,fill:n}=t,r=e.options,i=e.getLabels().length,s=r.reverse?e.max:e.min,o=N4(n,e,s),a=[];if(r.grid.circular){const l=e.getPointPositionForValue(0,s);return new Xk({x:l.x,y:l.y,radius:e.getDistanceFromCenterForValue(o)})}for(let l=0;l<i;++l)a.push(e.getPointPositionForValue(l,o));return a}function Ka(t,e,n){const r=U4(e),{chart:i,index:s,line:o,scale:a,axis:l}=e,u=o.options,c=u.fill,d=u.backgroundColor,{above:f=d,below:h=d}=c||{},m=i.getDatasetMeta(s),p=Nk(i,m);r&&o.points.length&&(as(t,n),H4(t,{line:o,target:r,above:f,below:h,area:n,scale:a,axis:l,clip:p}),ls(t))}function H4(t,e){const{line:n,target:r,above:i,below:s,area:o,scale:a,clip:l}=e,u=n._loop?"angle":e.axis;t.save();let c=s;s!==i&&(u==="x"?(xh(t,r,o.top),Xa(t,{line:n,target:r,color:i,scale:a,property:u,clip:l}),t.restore(),t.save(),xh(t,r,o.bottom)):u==="y"&&(wh(t,r,o.left),Xa(t,{line:n,target:r,color:s,scale:a,property:u,clip:l}),t.restore(),t.save(),wh(t,r,o.right),c=i)),Xa(t,{line:n,target:r,color:c,scale:a,property:u,clip:l}),t.restore()}function xh(t,e,n){const{segments:r,points:i}=e;let s=!0,o=!1;t.beginPath();for(const a of r){const{start:l,end:u}=a,c=i[l],d=i[za(l,u,i)];s?(t.moveTo(c.x,c.y),s=!1):(t.lineTo(c.x,n),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(d.x,n)}t.lineTo(e.first().x,n),t.closePath(),t.clip()}function wh(t,e,n){const{segments:r,points:i}=e;let s=!0,o=!1;t.beginPath();for(const a of r){const{start:l,end:u}=a,c=i[l],d=i[za(l,u,i)];s?(t.moveTo(c.x,c.y),s=!1):(t.lineTo(n,c.y),t.lineTo(c.x,c.y)),o=!!e.pathSegment(t,a,{move:o}),o?t.closePath():t.lineTo(n,d.y)}t.lineTo(n,e.first().y),t.closePath(),t.clip()}function Xa(t,e){const{line:n,target:r,property:i,color:s,scale:o,clip:a}=e,l=O4(n,r,i);for(const{source:u,target:c,start:d,end:f}of l){const{style:{backgroundColor:h=s}={}}=u,m=r!==!0;t.save(),t.fillStyle=h,B4(t,o,a,m&&Il(i,d,f)),t.beginPath();const p=!!n.pathSegment(t,u);let g;if(m){p?t.closePath():Sh(t,r,f,i);const b=!!r.pathSegment(t,c,{move:p,reverse:!0});g=p&&b,g||Sh(t,r,d,i)}t.closePath(),t.fill(g?"evenodd":"nonzero"),t.restore()}}function B4(t,e,n,r){const i=e.chart.chartArea,{property:s,start:o,end:a}=r||{};if(s==="x"||s==="y"){let l,u,c,d;s==="x"?(l=o,u=i.top,c=a,d=i.bottom):(l=i.left,u=o,c=i.right,d=a),t.beginPath(),n&&(l=Math.max(l,n.left),c=Math.min(c,n.right),u=Math.max(u,n.top),d=Math.min(d,n.bottom)),t.rect(l,u,c-l,d-u),t.clip()}}function Sh(t,e,n,r){const i=e.interpolate(n,r);i&&t.lineTo(i.x,i.y)}var Qk={id:"filler",afterDatasetsUpdate(t,e,n){const r=(t.data.datasets||[]).length,i=[];let s,o,a,l;for(o=0;o<r;++o)s=t.getDatasetMeta(o),a=s.dataset,l=null,a&&a.options&&a instanceof Wt&&(l={visible:t.isDatasetVisible(o),index:o,fill:P4(a,o,r),chart:t,axis:s.controller.options.indexAxis,scale:s.vScale,line:a}),s.$filler=l,i.push(l);for(o=0;o<r;++o)l=i[o],!(!l||l.fill===!1)&&(l.fill=D4(i,o,n.propagate))},beforeDraw(t,e,n){const r=n.drawTime==="beforeDraw",i=t.getSortedVisibleDatasetMetas(),s=t.chartArea;for(let o=i.length-1;o>=0;--o){const a=i[o].$filler;a&&(a.line.updateControlPoints(s,a.axis),r&&a.fill&&Ka(t.ctx,a,s))}},beforeDatasetsDraw(t,e,n){if(n.drawTime!=="beforeDatasetsDraw")return;const r=t.getSortedVisibleDatasetMetas();for(let i=r.length-1;i>=0;--i){const s=r[i].$filler;$h(s)&&Ka(t.ctx,s,t.chartArea)}},beforeDatasetDraw(t,e,n){const r=e.meta.$filler;!$h(r)||n.drawTime!=="beforeDatasetDraw"||Ka(t.ctx,r,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Ih=(t,e)=>{let{boxHeight:n=e,boxWidth:r=e}=t;return t.usePointStyle&&(n=Math.min(n,e),r=t.pointStyleWidth||Math.min(r,e)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(e,n)}},q4=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class zh extends Ct{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,n,r){this.maxWidth=e,this.maxHeight=n,this._margins=r,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let n=me(e.generateLabels,[this.chart],this)||[];e.filter&&(n=n.filter(r=>e.filter(r,this.chart.data))),e.sort&&(n=n.sort((r,i)=>e.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:e,ctx:n}=this;if(!e.display){this.width=this.height=0;return}const r=e.labels,i=tt(r.font),s=i.size,o=this._computeTitleHeight(),{boxWidth:a,itemHeight:l}=Ih(r,s);let u,c;n.font=i.string,this.isHorizontal()?(u=this.maxWidth,c=this._fitRows(o,s,a,l)+10):(c=this.maxHeight,u=this._fitCols(o,i,a,l)+10),this.width=Math.min(u,e.maxWidth||this.maxWidth),this.height=Math.min(c,e.maxHeight||this.maxHeight)}_fitRows(e,n,r,i){const{ctx:s,maxWidth:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.lineWidths=[0],c=i+a;let d=e;s.textAlign="left",s.textBaseline="middle";let f=-1,h=-c;return this.legendItems.forEach((m,p)=>{const g=r+n/2+s.measureText(m.text).width;(p===0||u[u.length-1]+g+2*a>o)&&(d+=c,u[u.length-(p>0?0:1)]=0,h+=c,f++),l[p]={left:0,top:h,row:f,width:g,height:i},u[u.length-1]+=g+a}),d}_fitCols(e,n,r,i){const{ctx:s,maxHeight:o,options:{labels:{padding:a}}}=this,l=this.legendHitBoxes=[],u=this.columnSizes=[],c=o-e;let d=a,f=0,h=0,m=0,p=0;return this.legendItems.forEach((g,b)=>{const{itemWidth:k,itemHeight:$}=J4(r,n,s,g,i);b>0&&h+$+2*a>c&&(d+=f+a,u.push({width:f,height:h}),m+=f+a,p++,f=h=0),l[b]={left:m,top:h,col:p,width:k,height:$},f=Math.max(f,k),h+=$+a}),d+=f,u.push({width:f,height:h}),d}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:s}}=this,o=ui(s,this.left,this.width);if(this.isHorizontal()){let a=0,l=it(r,this.left+i,this.right-this.lineWidths[a]);for(const u of n)a!==u.row&&(a=u.row,l=it(r,this.left+i,this.right-this.lineWidths[a])),u.top+=this.top+e+i,u.left=o.leftForLtr(o.x(l),u.width),l+=u.width+i}else{let a=0,l=it(r,this.top+e+i,this.bottom-this.columnSizes[a].height);for(const u of n)u.col!==a&&(a=u.col,l=it(r,this.top+e+i,this.bottom-this.columnSizes[a].height)),u.top=l,u.left+=this.left+i,u.left=o.leftForLtr(o.x(u.left),u.width),l+=u.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;as(e,this),this._draw(),ls(e)}}_draw(){const{options:e,columnSizes:n,lineWidths:r,ctx:i}=this,{align:s,labels:o}=e,a=le.color,l=ui(e.rtl,this.left,this.width),u=tt(o.font),{padding:c}=o,d=u.size,f=d/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=u.string;const{boxWidth:m,boxHeight:p,itemHeight:g}=Ih(o,d),b=function(I,z,O){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;i.save();const E=U(O.lineWidth,1);if(i.fillStyle=U(O.fillStyle,a),i.lineCap=U(O.lineCap,"butt"),i.lineDashOffset=U(O.lineDashOffset,0),i.lineJoin=U(O.lineJoin,"miter"),i.lineWidth=E,i.strokeStyle=U(O.strokeStyle,a),i.setLineDash(U(O.lineDash,[])),o.usePointStyle){const Z={radius:p*Math.SQRT2/2,pointStyle:O.pointStyle,rotation:O.rotation,borderWidth:E},L=l.xPlus(I,m/2),B=z+f;$k(i,Z,L,B,o.pointStyleWidth&&m)}else{const Z=z+Math.max((d-p)/2,0),L=l.leftForLtr(I,m),B=li(O.borderRadius);i.beginPath(),Object.values(B).some(ge=>ge!==0)?mo(i,{x:L,y:Z,w:m,h:p,radius:B}):i.rect(L,Z,m,p),i.fill(),E!==0&&i.stroke()}i.restore()},k=function(I,z,O){ho(i,O.text,I,z+g/2,u,{strikethrough:O.hidden,textAlign:l.textAlign(O.textAlign)})},$=this.isHorizontal(),w=this._computeTitleHeight();$?h={x:it(s,this.left+c,this.right-r[0]),y:this.top+c+w,line:0}:h={x:this.left+c,y:it(s,this.top+w+c,this.bottom-n[0].height),line:0},Tk(this.ctx,e.textDirection);const _=g+c;this.legendItems.forEach((I,z)=>{i.strokeStyle=I.fontColor,i.fillStyle=I.fontColor;const O=i.measureText(I.text).width,E=l.textAlign(I.textAlign||(I.textAlign=o.textAlign)),Z=m+f+O;let L=h.x,B=h.y;l.setWidth(this.width),$?z>0&&L+Z+c>this.right&&(B=h.y+=_,h.line++,L=h.x=it(s,this.left+c,this.right-r[h.line])):z>0&&B+_>this.bottom&&(L=h.x=L+n[h.line].width+c,h.line++,B=h.y=it(s,this.top+w+c,this.bottom-n[h.line].height));const ge=l.x(L);if(b(ge,B,I),L=OE(E,L+m+f,$?L+Z:this.right,e.rtl),k(l.x(L),B,I),$)h.x+=Z+c;else if(typeof I.text!="string"){const Me=u.lineHeight;h.y+=e$(I,Me)+c}else h.y+=_}),Dk(this.ctx,e.textDirection)}drawTitle(){const e=this.options,n=e.title,r=tt(n.font),i=Ot(n.padding);if(!n.display)return;const s=ui(e.rtl,this.left,this.width),o=this.ctx,a=n.position,l=r.size/2,u=i.top+l;let c,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),c=this.top+u,d=it(e.align,d,this.right-f);else{const m=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);c=u+it(e.align,this.top,this.bottom-m-e.labels.padding-this._computeTitleHeight())}const h=it(a,d,d+f);o.textAlign=s.textAlign(bk(a)),o.textBaseline="middle",o.strokeStyle=n.color,o.fillStyle=n.color,o.font=r.string,ho(o,n.text,h,c,r)}_computeTitleHeight(){const e=this.options.title,n=tt(e.font),r=Ot(e.padding);return e.display?n.lineHeight+r.height:0}_getLegendItemAt(e,n){let r,i,s;if(Vt(e,this.left,this.right)&&Vt(n,this.top,this.bottom)){for(s=this.legendHitBoxes,r=0;r<s.length;++r)if(i=s[r],Vt(e,i.left,i.left+i.width)&&Vt(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(e){const n=this.options;if(!K4(e.type,n))return;const r=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const i=this._hoveredItem,s=q4(i,r);i&&!s&&me(n.onLeave,[e,i,this],this),this._hoveredItem=r,r&&!s&&me(n.onHover,[e,r,this],this)}else r&&me(n.onClick,[e,r,this],this)}}function J4(t,e,n,r,i){const s=Y4(r,t,e,n),o=G4(i,r,e.lineHeight);return{itemWidth:s,itemHeight:o}}function Y4(t,e,n,r){let i=t.text;return i&&typeof i!="string"&&(i=i.reduce((s,o)=>s.length>o.length?s:o)),e+n.size/2+r.measureText(i).width}function G4(t,e,n){let r=t;return typeof e.text!="string"&&(r=e$(e,n)),r}function e$(t,e){const n=t.text?t.text.length:0;return e*n}function K4(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var Mi={id:"legend",_element:zh,start(t,e,n){const r=t.legend=new zh({ctx:t.ctx,options:n,chart:t});tn.configure(t,r,n),tn.addBox(t,r)},stop(t){tn.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,n){const r=t.legend;tn.configure(t,r,n),r.options=n},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,n){const r=e.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),e.hidden=!0):(i.show(r),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:n,pointStyle:r,textAlign:i,color:s,useBorderRadius:o,borderRadius:a}}=t.legend.options;return t._getSortedDatasetMetas().map(l=>{const u=l.controller.getStyle(n?0:void 0),c=Ot(u.borderWidth);return{text:e[l.index].label,fillStyle:u.backgroundColor,fontColor:s,hidden:!l.visible,lineCap:u.borderCapStyle,lineDash:u.borderDash,lineDashOffset:u.borderDashOffset,lineJoin:u.borderJoinStyle,lineWidth:(c.width+c.height)/4,strokeStyle:u.borderColor,pointStyle:r||u.pointStyle,rotation:u.rotation,textAlign:i||u.textAlign,borderRadius:o&&(a||u.borderRadius),datasetIndex:l.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};const er={average(t){if(!t.length)return!1;let e,n,r=new Set,i=0,s=0;for(e=0,n=t.length;e<n;++e){const a=t[e].element;if(a&&a.hasValue()){const l=a.tooltipPosition();r.add(l.x),i+=l.y,++s}}return s===0||r.size===0?!1:{x:[...r].reduce((a,l)=>a+l)/r.size,y:i/s}},nearest(t,e){if(!t.length)return!1;let n=e.x,r=e.y,i=Number.POSITIVE_INFINITY,s,o,a;for(s=0,o=t.length;s<o;++s){const l=t[s].element;if(l&&l.hasValue()){const u=l.getCenterPoint(),c=_l(e,u);c<i&&(i=c,a=l)}}if(a){const l=a.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function Pt(t,e){return e&&(Ne(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function jt(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
120
|
+
*/class AL{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(e,A,i,n){const r=A.listeners[n],s=A.duration;r.forEach(o=>o({chart:e,initial:A.initial,numSteps:s,currentStep:Math.min(i-A.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=MC.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(e=Date.now()){let A=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let s=r.length-1,o=!1,a;for(;s>=0;--s)a=r[s],a._active?(a._total>i.duration&&(i.duration=a._total),a.tick(e),o=!0):(r[s]=r[r.length-1],r.pop());o&&(n.draw(),this._notify(n,i,e,"progress")),r.length||(i.running=!1,this._notify(n,i,e,"complete"),i.initial=!1),A+=r.length}),this._lastDate=e,A===0&&(this._running=!1)}_getAnims(e){const A=this._charts;let i=A.get(e);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},A.set(e,i)),i}listen(e,A,i){this._getAnims(e).listeners[A].push(i)}add(e,A){!A||!A.length||this._getAnims(e).items.push(...A)}has(e){return this._getAnims(e).items.length>0}start(e){const A=this._charts.get(e);A&&(A.running=!0,A.start=Date.now(),A.duration=A.items.reduce((i,n)=>Math.max(i,n._duration),0),this._refresh())}running(e){if(!this._running)return!1;const A=this._charts.get(e);return!(!A||!A.running||!A.items.length)}stop(e){const A=this._charts.get(e);if(!A||!A.items.length)return;const i=A.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();A.items=[],this._notify(e,A,Date.now(),"complete")}remove(e){return this._charts.delete(e)}}var CA=new AL;const mm="transparent",nL={boolean(t,e,A){return A>.5?e:t},color(t,e,A){const i=rm(t||mm),n=i.valid&&rm(e||mm);return n&&n.valid?n.mix(i,A).hexString():e},number(t,e,A){return t+(e-t)*A}};class iL{constructor(e,A,i,n){const r=A[i];n=io([e.to,n,r,e.from]);const s=io([e.from,r,n]);this._active=!0,this._fn=e.fn||nL[e.type||typeof s],this._easing=xr[e.easing]||xr.linear,this._start=Math.floor(Date.now()+(e.delay||0)),this._duration=this._total=Math.floor(e.duration),this._loop=!!e.loop,this._target=A,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(e,A,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,s=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(s,e.duration)),this._total+=r,this._loop=!!e.loop,this._to=io([e.to,A,n,e.from]),this._from=io([e.from,n,A])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(e){const A=e-this._start,i=this._duration,n=this._prop,r=this._from,s=this._loop,o=this._to;let a;if(this._active=r!==o&&(s||A<i),!this._active){this._target[n]=o,this._notify(!0);return}if(A<0){this._target[n]=r;return}a=A/i%2,a=s&&a>1?2-a:a,a=this._easing(Math.min(1,Math.max(0,a))),this._target[n]=this._fn(r,o,a)}wait(){const e=this._promises||(this._promises=[]);return new Promise((A,i)=>{e.push({res:A,rej:i})})}_notify(e){const A=e?"res":"rej",i=this._promises||[];for(let n=0;n<i.length;n++)i[n][A]()}}class iU{constructor(e,A){this._chart=e,this._properties=new Map,this.configure(A)}configure(e){if(!re(e))return;const A=Object.keys(me.animation),i=this._properties;Object.getOwnPropertyNames(e).forEach(n=>{const r=e[n];if(!re(r))return;const s={};for(const o of A)s[o]=r[o];(je(r.properties)&&r.properties||[n]).forEach(o=>{(o===n||!i.has(o))&&i.set(o,s)})})}_animateOptions(e,A){const i=A.options,n=sL(e,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&rL(e.options.$animations,i).then(()=>{e.options=i},()=>{}),r}_createAnimations(e,A){const i=this._properties,n=[],r=e.$animations||(e.$animations={}),s=Object.keys(A),o=Date.now();let a;for(a=s.length-1;a>=0;--a){const l=s[a];if(l.charAt(0)==="$")continue;if(l==="options"){n.push(...this._animateOptions(e,A));continue}const u=A[l];let c=r[l];const d=i.get(l);if(c)if(d&&c.active()){c.update(d,u,o);continue}else c.cancel();if(!d||!d.duration){e[l]=u;continue}r[l]=c=new iL(d,e,l,u),n.push(c)}return n}update(e,A){if(this._properties.size===0){Object.assign(e,A);return}const i=this._createAnimations(e,A);if(i.length)return CA.add(this._chart,i),!0}}function rL(t,e){const A=[],i=Object.keys(e);for(let n=0;n<i.length;n++){const r=t[i[n]];r&&r.active()&&A.push(r.wait())}return Promise.all(A)}function sL(t,e){if(!e)return;let A=t.options;if(!A){t.options=e;return}return A.$shared&&(t.options=A=Object.assign({},A,{$shared:!1,$animations:{}})),A}function pm(t,e){const A=t&&t.options||{},i=A.reverse,n=A.min===void 0?e:0,r=A.max===void 0?e:0;return{start:i?r:n,end:i?n:r}}function oL(t,e,A){if(A===!1)return!1;const i=pm(t,A),n=pm(e,A);return{top:n.end,right:i.end,bottom:n.start,left:i.start}}function aL(t){let e,A,i,n;return re(t)?(e=t.top,A=t.right,i=t.bottom,n=t.left):e=A=i=n=t,{top:e,right:A,bottom:i,left:n,disabled:t===!1}}function rU(t,e){const A=[],i=t._getSortedDatasetMetas(e);let n,r;for(n=0,r=i.length;n<r;++n)A.push(i[n].index);return A}function vm(t,e,A,i={}){const n=t.keys,r=i.mode==="single";let s,o,a,l;if(e===null)return;let u=!1;for(s=0,o=n.length;s<o;++s){if(a=+n[s],a===A){if(u=!0,i.all)continue;break}l=t.values[a],ut(l)&&(r||e===0||gA(e)===gA(l))&&(e+=l)}return!u&&!i.all?0:e}function lL(t,e){const{iScale:A,vScale:i}=e,n=A.axis==="x"?"x":"y",r=i.axis==="x"?"x":"y",s=Object.keys(t),o=new Array(s.length);let a,l,u;for(a=0,l=s.length;a<l;++a)u=s[a],o[a]={[n]:u,[r]:t[u]};return o}function cu(t,e){const A=t&&t.options.stacked;return A||A===void 0&&e.stack!==void 0}function uL(t,e,A){return`${t.id}.${e.id}.${A.stack||A.type}`}function cL(t){const{min:e,max:A,minDefined:i,maxDefined:n}=t.getUserBounds();return{min:i?e:Number.NEGATIVE_INFINITY,max:n?A:Number.POSITIVE_INFINITY}}function dL(t,e,A){const i=t[e]||(t[e]={});return i[A]||(i[A]={})}function Bm(t,e,A,i){for(const n of e.getMatchingVisibleMetas(i).reverse()){const r=t[n.index];if(A&&r>0||!A&&r<0)return n.index}return null}function wm(t,e){const{chart:A,_cachedMeta:i}=t,n=A._stacks||(A._stacks={}),{iScale:r,vScale:s,index:o}=i,a=r.axis,l=s.axis,u=uL(r,s,i),c=e.length;let d;for(let f=0;f<c;++f){const h=e[f],{[a]:g,[l]:m}=h,p=h._stacks||(h._stacks={});d=p[l]=dL(n,u,g),d[o]=m,d._top=Bm(d,s,!0,i.type),d._bottom=Bm(d,s,!1,i.type);const B=d._visualValues||(d._visualValues={});B[o]=m}}function du(t,e){const A=t.scales;return Object.keys(A).filter(i=>A[i].axis===e).shift()}function fL(t,e){return Gn(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}function hL(t,e,A){return Gn(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:A,index:e,mode:"default",type:"data"})}function er(t,e){const A=t.controller.index,i=t.vScale&&t.vScale.axis;if(i){e=e||t._parsed;for(const n of e){const r=n._stacks;if(!r||r[i]===void 0||r[i][A]===void 0)return;delete r[i][A],r[i]._visualValues!==void 0&&r[i]._visualValues[A]!==void 0&&delete r[i]._visualValues[A]}}}const fu=t=>t==="reset"||t==="none",ym=(t,e)=>e?t:Object.assign({},t),gL=(t,e,A)=>t&&!e.hidden&&e._stacked&&{keys:rU(A,!0),values:null};class YA{constructor(e,A){this.chart=e,this._ctx=e.ctx,this.index=A,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const e=this._cachedMeta;this.configure(),this.linkScales(),e._stacked=cu(e.vScale,e),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(e){this.index!==e&&er(this._cachedMeta),this.index=e}linkScales(){const e=this.chart,A=this._cachedMeta,i=this.getDataset(),n=(c,d,f,h)=>c==="x"?d:c==="r"?h:f,r=A.xAxisID=Z(i.xAxisID,du(e,"x")),s=A.yAxisID=Z(i.yAxisID,du(e,"y")),o=A.rAxisID=Z(i.rAxisID,du(e,"r")),a=A.indexAxis,l=A.iAxisID=n(a,r,s,o),u=A.vAxisID=n(a,s,r,o);A.xScale=this.getScaleForId(r),A.yScale=this.getScaleForId(s),A.rScale=this.getScaleForId(o),A.iScale=this.getScaleForId(l),A.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(e){return this.chart.scales[e]}_getOtherScale(e){const A=this._cachedMeta;return e===A.iScale?A.vScale:A.iScale}reset(){this._update("reset")}_destroy(){const e=this._cachedMeta;this._data&&Am(this._data,this),e._stacked&&er(e)}_dataCheck(){const e=this.getDataset(),A=e.data||(e.data=[]),i=this._data;if(re(A)){const n=this._cachedMeta;this._data=lL(A,n)}else if(i!==A){if(i){Am(i,this);const n=this._cachedMeta;er(n),n._parsed=[]}A&&Object.isExtensible(A)&&qH(A,this),this._syncList=[],this._data=A}}addElements(){const e=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(e.dataset=new this.datasetElementType)}buildOrUpdateElements(e){const A=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=A._stacked;A._stacked=cu(A.vScale,A),A.stack!==i.stack&&(n=!0,er(A),A.stack=i.stack),this._resyncElements(e),(n||r!==A._stacked)&&(wm(this,A._parsed),A._stacked=cu(A.vScale,A))}configure(){const e=this.chart.config,A=e.datasetScopeKeys(this._type),i=e.getOptionScopes(this.getDataset(),A,!0);this.options=e.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(e,A){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:s}=i,o=r.axis;let a=e===0&&A===n.length?!0:i._sorted,l=e>0&&i._parsed[e-1],u,c,d;if(this._parsing===!1)i._parsed=n,i._sorted=!0,d=n;else{je(n[e])?d=this.parseArrayData(i,n,e,A):re(n[e])?d=this.parseObjectData(i,n,e,A):d=this.parsePrimitiveData(i,n,e,A);const f=()=>c[o]===null||l&&c[o]<l[o];for(u=0;u<A;++u)i._parsed[u+e]=c=d[u],a&&(f()&&(a=!1),l=c);i._sorted=a}s&&wm(this,d)}parsePrimitiveData(e,A,i,n){const{iScale:r,vScale:s}=e,o=r.axis,a=s.axis,l=r.getLabels(),u=r===s,c=new Array(n);let d,f,h;for(d=0,f=n;d<f;++d)h=d+i,c[d]={[o]:u||r.parse(l[h],h),[a]:s.parse(A[h],h)};return c}parseArrayData(e,A,i,n){const{xScale:r,yScale:s}=e,o=new Array(n);let a,l,u,c;for(a=0,l=n;a<l;++a)u=a+i,c=A[u],o[a]={x:r.parse(c[0],u),y:s.parse(c[1],u)};return o}parseObjectData(e,A,i,n){const{xScale:r,yScale:s}=e,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,l=new Array(n);let u,c,d,f;for(u=0,c=n;u<c;++u)d=u+i,f=A[d],l[u]={x:r.parse(Nn(f,o),d),y:s.parse(Nn(f,a),d)};return l}getParsed(e){return this._cachedMeta._parsed[e]}getDataElement(e){return this._cachedMeta.data[e]}applyStack(e,A,i){const n=this.chart,r=this._cachedMeta,s=A[e.axis],o={keys:rU(n,!0),values:A._stacks[e.axis]._visualValues};return vm(o,s,r.index,{mode:i})}updateRangeFromParsed(e,A,i,n){const r=i[A.axis];let s=r===null?NaN:r;const o=n&&i._stacks[A.axis];n&&o&&(n.values=o,s=vm(n,r,this._cachedMeta.index)),e.min=Math.min(e.min,s),e.max=Math.max(e.max,s)}getMinMax(e,A){const i=this._cachedMeta,n=i._parsed,r=i._sorted&&e===i.iScale,s=n.length,o=this._getOtherScale(e),a=gL(A,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:c}=cL(o);let d,f;function h(){f=n[d];const g=f[o.axis];return!ut(f[e.axis])||u>g||c<g}for(d=0;d<s&&!(!h()&&(this.updateRangeFromParsed(l,e,f,a),r));++d);if(r){for(d=s-1;d>=0;--d)if(!h()){this.updateRangeFromParsed(l,e,f,a);break}}return l}getAllParsedValues(e){const A=this._cachedMeta._parsed,i=[];let n,r,s;for(n=0,r=A.length;n<r;++n)s=A[n][e.axis],ut(s)&&i.push(s);return i}getMaxOverflow(){return!1}getLabelAndValue(e){const A=this._cachedMeta,i=A.iScale,n=A.vScale,r=this.getParsed(e);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:n?""+n.getLabelForValue(r[n.axis]):""}}_update(e){const A=this._cachedMeta;this.update(e||"default"),A._clip=aL(Z(this.options.clip,oL(A.xScale,A.yScale,this.getMaxOverflow())))}update(e){}draw(){const e=this._ctx,A=this.chart,i=this._cachedMeta,n=i.data||[],r=A.chartArea,s=[],o=this._drawStart||0,a=this._drawCount||n.length-o,l=this.options.drawActiveElementsOnTop;let u;for(i.dataset&&i.dataset.draw(e,r,o,a),u=o;u<o+a;++u){const c=n[u];c.hidden||(c.active&&l?s.push(c):c.draw(e,r))}for(u=0;u<s.length;++u)s[u].draw(e,r)}getStyle(e,A){const i=A?"active":"default";return e===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(e||0,i)}getContext(e,A,i){const n=this.getDataset();let r;if(e>=0&&e<this._cachedMeta.data.length){const s=this._cachedMeta.data[e];r=s.$context||(s.$context=hL(this.getContext(),e,s)),r.parsed=this.getParsed(e),r.raw=n.data[e],r.index=r.dataIndex=e}else r=this.$context||(this.$context=fL(this.chart.getContext(),this.index)),r.dataset=n,r.index=r.datasetIndex=this.index;return r.active=!!A,r.mode=i,r}resolveDatasetElementOptions(e){return this._resolveElementOptions(this.datasetElementType.id,e)}resolveDataElementOptions(e,A){return this._resolveElementOptions(this.dataElementType.id,A,e)}_resolveElementOptions(e,A="default",i){const n=A==="active",r=this._cachedDataOpts,s=e+"-"+A,o=r[s],a=this.enableOptionSharing&&Vr(i);if(o)return ym(o,a);const l=this.chart.config,u=l.datasetElementScopeKeys(this._type,e),c=n?[`${e}Hover`,"hover",e,""]:[e,""],d=l.getOptionScopes(this.getDataset(),u),f=Object.keys(me.elements[e]),h=()=>this.getContext(i,n,A),g=l.resolveNamedOptions(d,f,h,c);return g.$shared&&(g.$shared=a,r[s]=Object.freeze(ym(g,a))),g}_resolveAnimations(e,A,i){const n=this.chart,r=this._cachedDataOpts,s=`animation-${A}`,o=r[s];if(o)return o;let a;if(n.options.animation!==!1){const u=this.chart.config,c=u.datasetAnimationScopeKeys(this._type,A),d=u.getOptionScopes(this.getDataset(),c);a=u.createResolver(d,this.getContext(e,i,A))}const l=new iU(n,a&&a.animations);return a&&a._cacheable&&(r[s]=Object.freeze(l)),l}getSharedOptions(e){if(e.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},e))}includeOptions(e,A){return!A||fu(e)||this.chart._animationsDisabled}_getSharedOptions(e,A){const i=this.resolveDataElementOptions(e,A),n=this._sharedOptions,r=this.getSharedOptions(i),s=this.includeOptions(A,r)||r!==n;return this.updateSharedOptions(r,A,i),{sharedOptions:r,includeOptions:s}}updateElement(e,A,i,n){fu(n)?Object.assign(e,i):this._resolveAnimations(A,n).update(e,i)}updateSharedOptions(e,A,i){e&&!fu(A)&&this._resolveAnimations(void 0,A).update(e,i)}_setStyle(e,A,i,n){e.active=n;const r=this.getStyle(A,n);this._resolveAnimations(A,i,n).update(e,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(e,A,i){this._setStyle(e,i,"active",!1)}setHoverStyle(e,A,i){this._setStyle(e,i,"active",!0)}_removeDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!1)}_setDatasetHoverStyle(){const e=this._cachedMeta.dataset;e&&this._setStyle(e,void 0,"active",!0)}_resyncElements(e){const A=this._data,i=this._cachedMeta.data;for(const[o,a,l]of this._syncList)this[o](a,l);this._syncList=[];const n=i.length,r=A.length,s=Math.min(r,n);s&&this.parse(0,s),r>n?this._insertElements(n,r-n,e):r<n&&this._removeElements(r,n-r)}_insertElements(e,A,i=!0){const n=this._cachedMeta,r=n.data,s=e+A;let o;const a=l=>{for(l.length+=A,o=l.length-1;o>=s;o--)l[o]=l[o-A]};for(a(r),o=e;o<s;++o)r[o]=new this.dataElementType;this._parsing&&a(n._parsed),this.parse(e,A),i&&this.updateElements(r,e,A,"reset")}updateElements(e,A,i,n){}_removeElements(e,A){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(e,A);i._stacked&&er(i,n)}i.data.splice(e,A)}_sync(e){if(this._parsing)this._syncList.push(e);else{const[A,i,n]=e;this[A](i,n)}this.chart._dataChanges.push([this.index,...e])}_onDataPush(){const e=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-e,e])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(e,A){A&&this._sync(["_removeElements",e,A]);const i=arguments.length-2;i&&this._sync(["_insertElements",e,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}k(YA,"defaults",{}),k(YA,"datasetElementType",null),k(YA,"dataElementType",null);function mL(t,e){if(!t._cache.$bar){const A=t.getMatchingVisibleMetas(e);let i=[];for(let n=0,r=A.length;n<r;n++)i=i.concat(A[n].controller.getAllParsedValues(t));t._cache.$bar=LC(i.sort((n,r)=>n-r))}return t._cache.$bar}function pL(t){const e=t.iScale,A=mL(e,t.type);let i=e._length,n,r,s,o;const a=()=>{s===32767||s===-32768||(Vr(o)&&(i=Math.min(i,Math.abs(s-o)||i)),o=s)};for(n=0,r=A.length;n<r;++n)s=e.getPixelForValue(A[n]),a();for(o=void 0,n=0,r=e.ticks.length;n<r;++n)s=e.getPixelForTick(n),a();return i}function vL(t,e,A,i){const n=A.barThickness;let r,s;return le(n)?(r=e.min*A.categoryPercentage,s=A.barPercentage):(r=n*i,s=1),{chunk:r/i,ratio:s,start:e.pixels[t]-r/2}}function BL(t,e,A,i){const n=e.pixels,r=n[t];let s=t>0?n[t-1]:null,o=t<n.length-1?n[t+1]:null;const a=A.categoryPercentage;s===null&&(s=r-(o===null?e.end-e.start:o-r)),o===null&&(o=r+r-s);const l=r-(r-Math.min(s,o))/2*a;return{chunk:Math.abs(o-s)/2*a/i,ratio:A.barPercentage,start:l}}function wL(t,e,A,i){const n=A.parse(t[0],i),r=A.parse(t[1],i),s=Math.min(n,r),o=Math.max(n,r);let a=s,l=o;Math.abs(s)>Math.abs(o)&&(a=o,l=s),e[A.axis]=l,e._custom={barStart:a,barEnd:l,start:n,end:r,min:s,max:o}}function sU(t,e,A,i){return je(t)?wL(t,e,A,i):e[A.axis]=A.parse(t,i),e}function bm(t,e,A,i){const n=t.iScale,r=t.vScale,s=n.getLabels(),o=n===r,a=[];let l,u,c,d;for(l=A,u=A+i;l<u;++l)d=e[l],c={},c[n.axis]=o||n.parse(s[l],l),a.push(sU(d,c,r,l));return a}function hu(t){return t&&t.barStart!==void 0&&t.barEnd!==void 0}function yL(t,e,A){return t!==0?gA(t):(e.isHorizontal()?1:-1)*(e.min>=A?1:-1)}function bL(t){let e,A,i,n,r;return t.horizontal?(e=t.base>t.x,A="left",i="right"):(e=t.base<t.y,A="bottom",i="top"),e?(n="end",r="start"):(n="start",r="end"),{start:A,end:i,reverse:e,top:n,bottom:r}}function _L(t,e,A,i){let n=e.borderSkipped;const r={};if(!n){t.borderSkipped=r;return}if(n===!0){t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:s,end:o,reverse:a,top:l,bottom:u}=bL(t);n==="middle"&&A&&(t.enableBorderRadius=!0,(A._top||0)===i?n=l:(A._bottom||0)===i?n=u:(r[_m(u,s,o,a)]=!0,n=l)),r[_m(n,s,o,a)]=!0,t.borderSkipped=r}function _m(t,e,A,i){return i?(t=CL(t,e,A),t=Cm(t,A,e)):t=Cm(t,e,A),t}function CL(t,e,A){return t===e?A:t===A?e:t}function Cm(t,e,A){return t==="start"?e:t==="end"?A:t}function UL(t,{inflateAmount:e},A){t.inflateAmount=e==="auto"?A===1?.33:0:e}class Tn extends YA{parsePrimitiveData(e,A,i,n){return bm(e,A,i,n)}parseArrayData(e,A,i,n){return bm(e,A,i,n)}parseObjectData(e,A,i,n){const{iScale:r,vScale:s}=e,{xAxisKey:o="x",yAxisKey:a="y"}=this._parsing,l=r.axis==="x"?o:a,u=s.axis==="x"?o:a,c=[];let d,f,h,g;for(d=i,f=i+n;d<f;++d)g=A[d],h={},h[r.axis]=r.parse(Nn(g,l),d),c.push(sU(Nn(g,u),h,s,d));return c}updateRangeFromParsed(e,A,i,n){super.updateRangeFromParsed(e,A,i,n);const r=i._custom;r&&A===this._cachedMeta.vScale&&(e.min=Math.min(e.min,r.min),e.max=Math.max(e.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(e){const A=this._cachedMeta,{iScale:i,vScale:n}=A,r=this.getParsed(e),s=r._custom,o=hu(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(r[n.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:o}}initialize(){this.enableOptionSharing=!0,super.initialize();const e=this._cachedMeta;e.stack=this.getDataset().stack}update(e){const A=this._cachedMeta;this.updateElements(A.data,0,A.data.length,e)}updateElements(e,A,i,n){const r=n==="reset",{index:s,_cachedMeta:{vScale:o}}=this,a=o.getBasePixel(),l=o.isHorizontal(),u=this._getRuler(),{sharedOptions:c,includeOptions:d}=this._getSharedOptions(A,n);for(let f=A;f<A+i;f++){const h=this.getParsed(f),g=r||le(h[o.axis])?{base:a,head:a}:this._calculateBarValuePixels(f),m=this._calculateBarIndexPixels(f,u),p=(h._stacks||{})[o.axis],B={horizontal:l,base:g.base,enableBorderRadius:!p||hu(h._custom)||s===p._top||s===p._bottom,x:l?g.head:m.center,y:l?m.center:g.head,height:l?m.size:Math.abs(g.size),width:l?Math.abs(g.size):m.size};d&&(B.options=c||this.resolveDataElementOptions(f,e[f].active?"active":n));const b=B.options||e[f].options;_L(B,b,p,s),UL(B,b,u.ratio),this.updateElement(e[f],f,B,n)}}_getStacks(e,A){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),r=i.options.stacked,s=[],o=this._cachedMeta.controller.getParsed(A),a=o&&o[i.axis],l=u=>{const c=u._parsed.find(f=>f[i.axis]===a),d=c&&c[u.vScale.axis];if(le(d)||isNaN(d))return!0};for(const u of n)if(!(A!==void 0&&l(u))&&((r===!1||s.indexOf(u.stack)===-1||r===void 0&&u.stack===void 0)&&s.push(u.stack),u.index===e))break;return s.length||s.push(void 0),s}_getStackCount(e){return this._getStacks(void 0,e).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const e=this.chart.scales,A=this.chart.options.indexAxis;return Object.keys(e).filter(i=>e[i].axis===A).shift()}_getAxis(){const e={},A=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)e[Z(this.chart.options.indexAxis==="x"?i.xAxisID:i.yAxisID,A)]=!0;return Object.keys(e)}_getStackIndex(e,A,i){const n=this._getStacks(e,i),r=A!==void 0?n.indexOf(A):-1;return r===-1?n.length-1:r}_getRuler(){const e=this.options,A=this._cachedMeta,i=A.iScale,n=[];let r,s;for(r=0,s=A.data.length;r<s;++r)n.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const o=e.barThickness;return{min:o||pL(A),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:e.grouped,ratio:o?1:e.categoryPercentage*e.barPercentage}}_calculateBarValuePixels(e){const{_cachedMeta:{vScale:A,_stacked:i,index:n},options:{base:r,minBarLength:s}}=this,o=r||0,a=this.getParsed(e),l=a._custom,u=hu(l);let c=a[A.axis],d=0,f=i?this.applyStack(A,a,i):c,h,g;f!==c&&(d=f-c,f=c),u&&(c=l.barStart,f=l.barEnd-l.barStart,c!==0&&gA(c)!==gA(l.barEnd)&&(d=0),d+=c);const m=!le(r)&&!u?r:d;let p=A.getPixelForValue(m);if(this.chart.getDataVisibility(e)?h=A.getPixelForValue(d+f):h=p,g=h-p,Math.abs(g)<s){g=yL(g,A,o)*s,c===o&&(p-=g/2);const B=A.getPixelForDecimal(0),b=A.getPixelForDecimal(1),_=Math.min(B,b),y=Math.max(B,b);p=Math.max(Math.min(p,y),_),h=p+g,i&&!u&&(a._stacks[A.axis]._visualValues[n]=A.getValueForPixel(h)-A.getValueForPixel(p))}if(p===A.getPixelForValue(o)){const B=gA(g)*A.getLineWidthForValue(o)/2;p+=B,g-=B}return{size:g,base:p,head:h,center:h+g/2}}_calculateBarIndexPixels(e,A){const i=A.scale,n=this.options,r=n.skipNull,s=Z(n.maxBarThickness,1/0);let o,a;const l=this._getAxisCount();if(A.grouped){const u=r?this._getStackCount(e):A.stackCount,c=n.barThickness==="flex"?BL(e,A,n,u*l):vL(e,A,n,u*l),d=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,f=this._getAxis().indexOf(Z(d,this.getFirstScaleIdForIndexAxis())),h=this._getStackIndex(this.index,this._cachedMeta.stack,r?e:void 0)+f;o=c.start+c.chunk*h+c.chunk/2,a=Math.min(s,c.chunk*c.ratio)}else o=i.getPixelForValue(this.getParsed(e)[i.axis],e),a=Math.min(s,A.min*A.ratio);return{base:o-a/2,head:o+a/2,center:o,size:a}}draw(){const e=this._cachedMeta,A=e.vScale,i=e.data,n=i.length;let r=0;for(;r<n;++r)this.getParsed(r)[A.axis]!==null&&!i[r].hidden&&i[r].draw(this._ctx)}}k(Tn,"id","bar"),k(Tn,"defaults",{datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}}),k(Tn,"overrides",{scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}});function QL(t,e,A){let i=1,n=1,r=0,s=0;if(e<Ee){const o=t,a=o+e,l=Math.cos(o),u=Math.sin(o),c=Math.cos(a),d=Math.sin(a),f=(b,_,y)=>jr(b,o,a,!0)?1:Math.max(_,_*A,y,y*A),h=(b,_,y)=>jr(b,o,a,!0)?-1:Math.min(_,_*A,y,y*A),g=f(0,l,c),m=f(Ge,u,d),p=h(ye,l,c),B=h(ye+Ge,u,d);i=(g-p)/2,n=(m-B)/2,r=-(g+p)/2,s=-(m+B)/2}return{ratioX:i,ratioY:n,offsetX:r,offsetY:s}}class In extends YA{constructor(e,A){super(e,A),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(e,A){const i=this.getDataset().data,n=this._cachedMeta;if(this._parsing===!1)n._parsed=i;else{let r=a=>+i[a];if(re(i[e])){const{key:a="value"}=this._parsing;r=l=>+Nn(i[l],a)}let s,o;for(s=e,o=e+A;s<o;++s)n._parsed[s]=r(s)}}_getRotation(){return FA(this.options.rotation-90)}_getCircumference(){return FA(this.options.circumference)}_getRotationExtents(){let e=Ee,A=-Ee;for(let i=0;i<this.chart.data.datasets.length;++i)if(this.chart.isDatasetVisible(i)&&this.chart.getDatasetMeta(i).type===this._type){const n=this.chart.getDatasetMeta(i).controller,r=n._getRotation(),s=n._getCircumference();e=Math.min(e,r),A=Math.max(A,r+s)}return{rotation:e,circumference:A-e}}update(e){const A=this.chart,{chartArea:i}=A,n=this._cachedMeta,r=n.data,s=this.getMaxBorderWidth()+this.getMaxOffset(r)+this.options.spacing,o=Math.max((Math.min(i.width,i.height)-s)/2,0),a=Math.min(HH(this.options.cutout,o),1),l=this._getRingWeight(this.index),{circumference:u,rotation:c}=this._getRotationExtents(),{ratioX:d,ratioY:f,offsetX:h,offsetY:g}=QL(c,u,a),m=(i.width-s)/d,p=(i.height-s)/f,B=Math.max(Math.min(m,p)/2,0),b=$C(this.options.radius,B),_=Math.max(b*a,0),y=(b-_)/this._getVisibleDatasetWeightTotal();this.offsetX=h*b,this.offsetY=g*b,n.total=this.calculateTotal(),this.outerRadius=b-y*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-y*l,0),this.updateElements(r,0,r.length,e)}_circumference(e,A){const i=this.options,n=this._cachedMeta,r=this._getCircumference();return A&&i.animation.animateRotate||!this.chart.getDataVisibility(e)||n._parsed[e]===null||n.data[e].hidden?0:this.calculateCircumference(n._parsed[e]*r/Ee)}updateElements(e,A,i,n){const r=n==="reset",s=this.chart,o=s.chartArea,l=s.options.animation,u=(o.left+o.right)/2,c=(o.top+o.bottom)/2,d=r&&l.animateScale,f=d?0:this.innerRadius,h=d?0:this.outerRadius,{sharedOptions:g,includeOptions:m}=this._getSharedOptions(A,n);let p=this._getRotation(),B;for(B=0;B<A;++B)p+=this._circumference(B,r);for(B=A;B<A+i;++B){const b=this._circumference(B,r),_=e[B],y={x:u+this.offsetX,y:c+this.offsetY,startAngle:p,endAngle:p+b,circumference:b,outerRadius:h,innerRadius:f};m&&(y.options=g||this.resolveDataElementOptions(B,_.active?"active":n)),p+=b,this.updateElement(_,B,y,n)}}calculateTotal(){const e=this._cachedMeta,A=e.data;let i=0,n;for(n=0;n<A.length;n++){const r=e._parsed[n];r!==null&&!isNaN(r)&&this.chart.getDataVisibility(n)&&!A[n].hidden&&(i+=Math.abs(r))}return i}calculateCircumference(e){const A=this._cachedMeta.total;return A>0&&!isNaN(e)?Ee*(Math.abs(e)/A):0}getLabelAndValue(e){const A=this._cachedMeta,i=this.chart,n=i.data.labels||[],r=Oh(A._parsed[e],i.options.locale);return{label:n[e]||"",value:r}}getMaxBorderWidth(e){let A=0;const i=this.chart;let n,r,s,o,a;if(!e){for(n=0,r=i.data.datasets.length;n<r;++n)if(i.isDatasetVisible(n)){s=i.getDatasetMeta(n),e=s.data,o=s.controller;break}}if(!e)return 0;for(n=0,r=e.length;n<r;++n)a=o.resolveDataElementOptions(n),a.borderAlign!=="inner"&&(A=Math.max(A,a.borderWidth||0,a.hoverBorderWidth||0));return A}getMaxOffset(e){let A=0;for(let i=0,n=e.length;i<n;++i){const r=this.resolveDataElementOptions(i);A=Math.max(A,r.offset||0,r.hoverOffset||0)}return A}_getRingWeightOffset(e){let A=0;for(let i=0;i<e;++i)this.chart.isDatasetVisible(i)&&(A+=this._getRingWeight(i));return A}_getRingWeight(e){return Math.max(Z(this.chart.data.datasets[e].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}k(In,"id","doughnut"),k(In,"defaults",{datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"}),k(In,"descriptors",{_scriptable:e=>e!=="spacing",_indexable:e=>e!=="spacing"&&!e.startsWith("borderDash")&&!e.startsWith("hoverBorderDash")}),k(In,"overrides",{aspectRatio:1,plugins:{legend:{labels:{generateLabels(e){const A=e.data,{labels:{pointStyle:i,textAlign:n,color:r,useBorderRadius:s,borderRadius:o}}=e.legend.options;return A.labels.length&&A.datasets.length?A.labels.map((a,l)=>{const c=e.getDatasetMeta(0).controller.getStyle(l);return{text:a,fillStyle:c.backgroundColor,fontColor:r,hidden:!e.getDataVisibility(l),lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:c.borderWidth,strokeStyle:c.borderColor,textAlign:n,pointStyle:i,borderRadius:s&&(o||c.borderRadius),index:l}}):[]}},onClick(e,A,i){i.chart.toggleDataVisibility(A.index),i.chart.update()}}}});class Ir extends YA{initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(e){const A=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=A,s=this.chart._animationsDisabled;let{start:o,count:a}=PC(A,n,s);this._drawStart=o,this._drawCount=a,RC(A)&&(o=0,a=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(e);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:l},e),this.updateElements(n,o,a,e)}updateElements(e,A,i,n){const r=n==="reset",{iScale:s,vScale:o,_stacked:a,_dataset:l}=this._cachedMeta,{sharedOptions:u,includeOptions:c}=this._getSharedOptions(A,n),d=s.axis,f=o.axis,{spanGaps:h,segment:g}=this.options,m=Ti(h)?h:Number.POSITIVE_INFINITY,p=this.chart._animationsDisabled||r||n==="none",B=A+i,b=e.length;let _=A>0&&this.getParsed(A-1);for(let y=0;y<b;++y){const w=e[y],U=p?w:{};if(y<A||y>=B){U.skip=!0;continue}const F=this.getParsed(y),x=le(F[f]),$=U[d]=s.getPixelForValue(F[d],y),M=U[f]=r||x?o.getBasePixel():o.getPixelForValue(a?this.applyStack(o,F,a):F[f],y);U.skip=isNaN($)||isNaN(M)||x,U.stop=y>0&&Math.abs(F[d]-_[d])>m,g&&(U.parsed=F,U.raw=l.data[y]),c&&(U.options=u||this.resolveDataElementOptions(y,w.active?"active":n)),p||this.updateElement(w,y,U,n),_=F}}getMaxOverflow(){const e=this._cachedMeta,A=e.dataset,i=A.options&&A.options.borderWidth||0,n=e.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,s)/2}draw(){const e=this._cachedMeta;e.dataset.updateControlPoints(this.chart.chartArea,e.iScale.axis),super.draw()}}k(Ir,"id","line"),k(Ir,"defaults",{datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1}),k(Ir,"overrides",{scales:{_index_:{type:"category"},_value_:{type:"linear"}}});class ya extends In{}k(ya,"id","pie"),k(ya,"defaults",{cutout:0,rotation:0,circumference:360,radius:"100%"});class Ro extends YA{getLabelAndValue(e){const A=this._cachedMeta,i=this.chart.data.labels||[],{xScale:n,yScale:r}=A,s=this.getParsed(e),o=n.getLabelForValue(s.x),a=r.getLabelForValue(s.y);return{label:i[e]||"",value:"("+o+", "+a+")"}}update(e){const A=this._cachedMeta,{data:i=[]}=A,n=this.chart._animationsDisabled;let{start:r,count:s}=PC(A,i,n);if(this._drawStart=r,this._drawCount=s,RC(A)&&(r=0,s=i.length),this.options.showLine){this.datasetElementType||this.addElements();const{dataset:o,_dataset:a}=A;o._chart=this.chart,o._datasetIndex=this.index,o._decimated=!!a._decimated,o.points=i;const l=this.resolveDatasetElementOptions(e);l.segment=this.options.segment,this.updateElement(o,void 0,{animated:!n,options:l},e)}else this.datasetElementType&&(delete A.dataset,this.datasetElementType=!1);this.updateElements(i,r,s,e)}addElements(){const{showLine:e}=this.options;!this.datasetElementType&&e&&(this.datasetElementType=this.chart.registry.getElement("line")),super.addElements()}updateElements(e,A,i,n){const r=n==="reset",{iScale:s,vScale:o,_stacked:a,_dataset:l}=this._cachedMeta,u=this.resolveDataElementOptions(A,n),c=this.getSharedOptions(u),d=this.includeOptions(n,c),f=s.axis,h=o.axis,{spanGaps:g,segment:m}=this.options,p=Ti(g)?g:Number.POSITIVE_INFINITY,B=this.chart._animationsDisabled||r||n==="none";let b=A>0&&this.getParsed(A-1);for(let _=A;_<A+i;++_){const y=e[_],w=this.getParsed(_),U=B?y:{},F=le(w[h]),x=U[f]=s.getPixelForValue(w[f],_),$=U[h]=r||F?o.getBasePixel():o.getPixelForValue(a?this.applyStack(o,w,a):w[h],_);U.skip=isNaN(x)||isNaN($)||F,U.stop=_>0&&Math.abs(w[f]-b[f])>p,m&&(U.parsed=w,U.raw=l.data[_]),d&&(U.options=c||this.resolveDataElementOptions(_,y.active?"active":n)),B||this.updateElement(y,_,U,n),b=w}this.updateSharedOptions(c,n,u)}getMaxOverflow(){const e=this._cachedMeta,A=e.data||[];if(!this.options.showLine){let o=0;for(let a=A.length-1;a>=0;--a)o=Math.max(o,A[a].size(this.resolveDataElementOptions(a))/2);return o>0&&o}const i=e.dataset,n=i.options&&i.options.borderWidth||0;if(!A.length)return n;const r=A[0].size(this.resolveDataElementOptions(0)),s=A[A.length-1].size(this.resolveDataElementOptions(A.length-1));return Math.max(n,r,s)/2}}k(Ro,"id","scatter"),k(Ro,"defaults",{datasetElementType:!1,dataElementType:"point",showLine:!1,fill:!1}),k(Ro,"overrides",{interaction:{mode:"point"},scales:{x:{type:"linear"},y:{type:"linear"}}});function Bn(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Ph{constructor(e){k(this,"options");this.options=e||{}}static override(e){Object.assign(Ph.prototype,e)}init(){}formats(){return Bn()}parse(){return Bn()}format(){return Bn()}add(){return Bn()}diff(){return Bn()}startOf(){return Bn()}endOf(){return Bn()}}var oU={_date:Ph};function xL(t,e,A,i){const{controller:n,data:r,_sorted:s}=t,o=n._cachedMeta.iScale,a=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(o&&e===o.axis&&e!=="r"&&s&&r.length){const l=o._reversePixels?XH:Fn;if(i){if(n._sharedOptions){const u=r[0],c=typeof u.getRange=="function"&&u.getRange(e);if(c){const d=l(r,e,A-c),f=l(r,e,A+c);return{lo:d.lo,hi:f.hi}}}}else{const u=l(r,e,A);if(a){const{vScale:c}=n._cachedMeta,{_parsed:d}=t,f=d.slice(0,u.lo+1).reverse().findIndex(g=>!le(g[c.axis]));u.lo-=Math.max(0,f);const h=d.slice(u.hi).findIndex(g=>!le(g[c.axis]));u.hi+=Math.max(0,h)}return u}}return{lo:0,hi:r.length-1}}function Nl(t,e,A,i,n){const r=t.getSortedVisibleDatasetMetas(),s=A[e];for(let o=0,a=r.length;o<a;++o){const{index:l,data:u}=r[o],{lo:c,hi:d}=xL(r[o],e,s,n);for(let f=c;f<=d;++f){const h=u[f];h.skip||i(h,l,f)}}}function FL(t){const e=t.indexOf("x")!==-1,A=t.indexOf("y")!==-1;return function(i,n){const r=e?Math.abs(i.x-n.x):0,s=A?Math.abs(i.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(s,2))}}function gu(t,e,A,i,n){const r=[];return!n&&!t.isPointInArea(e)||Nl(t,A,e,function(o,a,l){!n&&!Gr(o,t.chartArea,0)||o.inRange(e.x,e.y,i)&&r.push({element:o,datasetIndex:a,index:l})},!0),r}function IL(t,e,A,i){let n=[];function r(s,o,a){const{startAngle:l,endAngle:u}=s.getProps(["startAngle","endAngle"],i),{angle:c}=HC(s,{x:e.x,y:e.y});jr(c,l,u)&&n.push({element:s,datasetIndex:o,index:a})}return Nl(t,A,e,r),n}function SL(t,e,A,i,n,r){let s=[];const o=FL(A);let a=Number.POSITIVE_INFINITY;function l(u,c,d){const f=u.inRange(e.x,e.y,n);if(i&&!f)return;const h=u.getCenterPoint(n);if(!(!!r||t.isPointInArea(h))&&!f)return;const m=o(e,h);m<a?(s=[{element:u,datasetIndex:c,index:d}],a=m):m===a&&s.push({element:u,datasetIndex:c,index:d})}return Nl(t,A,e,l),s}function mu(t,e,A,i,n,r){return!r&&!t.isPointInArea(e)?[]:A==="r"&&!i?IL(t,e,A,n):SL(t,e,A,i,n,r)}function Um(t,e,A,i,n){const r=[],s=A==="x"?"inXRange":"inYRange";let o=!1;return Nl(t,A,e,(a,l,u)=>{a[s]&&a[s](e[A],n)&&(r.push({element:a,datasetIndex:l,index:u}),o=o||a.inRange(e.x,e.y,n))}),i&&!o?[]:r}var kL={modes:{index(t,e,A,i){const n=Cn(e,t),r=A.axis||"x",s=A.includeInvisible||!1,o=A.intersect?gu(t,n,r,i,s):mu(t,n,r,!1,i,s),a=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(l=>{const u=o[0].index,c=l.data[u];c&&!c.skip&&a.push({element:c,datasetIndex:l.index,index:u})}),a):[]},dataset(t,e,A,i){const n=Cn(e,t),r=A.axis||"xy",s=A.includeInvisible||!1;let o=A.intersect?gu(t,n,r,i,s):mu(t,n,r,!1,i,s);if(o.length>0){const a=o[0].datasetIndex,l=t.getDatasetMeta(a).data;o=[];for(let u=0;u<l.length;++u)o.push({element:l[u],datasetIndex:a,index:u})}return o},point(t,e,A,i){const n=Cn(e,t),r=A.axis||"xy",s=A.includeInvisible||!1;return gu(t,n,r,i,s)},nearest(t,e,A,i){const n=Cn(e,t),r=A.axis||"xy",s=A.includeInvisible||!1;return mu(t,n,r,A.intersect,i,s)},x(t,e,A,i){const n=Cn(e,t);return Um(t,n,"x",A.intersect,i)},y(t,e,A,i){const n=Cn(e,t);return Um(t,n,"y",A.intersect,i)}}};const aU=["left","top","right","bottom"];function tr(t,e){return t.filter(A=>A.pos===e)}function Qm(t,e){return t.filter(A=>aU.indexOf(A.pos)===-1&&A.box.axis===e)}function Ar(t,e){return t.sort((A,i)=>{const n=e?i:A,r=e?A:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function EL(t){const e=[];let A,i,n,r,s,o;for(A=0,i=(t||[]).length;A<i;++A)n=t[A],{position:r,options:{stack:s,stackWeight:o=1}}=n,e.push({index:A,box:n,pos:r,horizontal:n.isHorizontal(),weight:n.weight,stack:s&&r+s,stackWeight:o});return e}function $L(t){const e={};for(const A of t){const{stack:i,pos:n,stackWeight:r}=A;if(!i||!aU.includes(n))continue;const s=e[i]||(e[i]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=r}return e}function TL(t,e){const A=$L(t),{vBoxMaxWidth:i,hBoxMaxHeight:n}=e;let r,s,o;for(r=0,s=t.length;r<s;++r){o=t[r];const{fullSize:a}=o.box,l=A[o.stack],u=l&&o.stackWeight/l.weight;o.horizontal?(o.width=u?u*i:a&&e.availableWidth,o.height=n):(o.width=i,o.height=u?u*n:a&&e.availableHeight)}return A}function OL(t){const e=EL(t),A=Ar(e.filter(l=>l.box.fullSize),!0),i=Ar(tr(e,"left"),!0),n=Ar(tr(e,"right")),r=Ar(tr(e,"top"),!0),s=Ar(tr(e,"bottom")),o=Qm(e,"x"),a=Qm(e,"y");return{fullSize:A,leftAndTop:i.concat(r),rightAndBottom:n.concat(a).concat(s).concat(o),chartArea:tr(e,"chartArea"),vertical:i.concat(n).concat(a),horizontal:r.concat(s).concat(o)}}function xm(t,e,A,i){return Math.max(t[A],e[A])+Math.max(t[i],e[i])}function lU(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function HL(t,e,A,i){const{pos:n,box:r}=A,s=t.maxPadding;if(!re(n)){A.size&&(t[n]-=A.size);const c=i[A.stack]||{size:0,count:1};c.size=Math.max(c.size,A.horizontal?r.height:r.width),A.size=c.size/c.count,t[n]+=A.size}r.getPadding&&lU(s,r.getPadding());const o=Math.max(0,e.outerWidth-xm(s,t,"left","right")),a=Math.max(0,e.outerHeight-xm(s,t,"top","bottom")),l=o!==t.w,u=a!==t.h;return t.w=o,t.h=a,A.horizontal?{same:l,other:u}:{same:u,other:l}}function DL(t){const e=t.maxPadding;function A(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=A("top"),t.x+=A("left"),A("right"),A("bottom")}function LL(t,e){const A=e.maxPadding;function i(n){const r={left:0,top:0,right:0,bottom:0};return n.forEach(s=>{r[s]=Math.max(e[s],A[s])}),r}return i(t?["left","right"]:["top","bottom"])}function fr(t,e,A,i){const n=[];let r,s,o,a,l,u;for(r=0,s=t.length,l=0;r<s;++r){o=t[r],a=o.box,a.update(o.width||e.w,o.height||e.h,LL(o.horizontal,e));const{same:c,other:d}=HL(e,A,o,i);l|=c&&n.length,u=u||d,a.fullSize||n.push(o)}return l&&fr(n,e,A,i)||u}function oo(t,e,A,i,n){t.top=A,t.left=e,t.right=e+i,t.bottom=A+n,t.width=i,t.height=n}function Fm(t,e,A,i){const n=A.padding;let{x:r,y:s}=e;for(const o of t){const a=o.box,l=i[o.stack]||{placed:0,weight:1},u=o.stackWeight/l.weight||1;if(o.horizontal){const c=e.w*u,d=l.size||a.height;Vr(l.start)&&(s=l.start),a.fullSize?oo(a,n.left,s,A.outerWidth-n.right-n.left,d):oo(a,e.left+l.placed,s,c,d),l.start=s,l.placed+=c,s=a.bottom}else{const c=e.h*u,d=l.size||a.width;Vr(l.start)&&(r=l.start),a.fullSize?oo(a,r,n.top,d,A.outerHeight-n.bottom-n.top):oo(a,r,e.top+l.placed,d,c),l.start=r,l.placed+=c,r=a.right}}e.x=r,e.y=s}var VA={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(A){e.draw(A)}}]},t.boxes.push(e)},removeBox(t,e){const A=t.boxes?t.boxes.indexOf(e):-1;A!==-1&&t.boxes.splice(A,1)},configure(t,e,A){e.fullSize=A.fullSize,e.position=A.position,e.weight=A.weight},update(t,e,A,i){if(!t)return;const n=sA(t.options.layout.padding),r=Math.max(e-n.width,0),s=Math.max(A-n.height,0),o=OL(t.boxes),a=o.vertical,l=o.horizontal;ge(t.boxes,g=>{typeof g.beforeLayout=="function"&&g.beforeLayout()});const u=a.reduce((g,m)=>m.box.options&&m.box.options.display===!1?g:g+1,0)||1,c=Object.freeze({outerWidth:e,outerHeight:A,padding:n,availableWidth:r,availableHeight:s,vBoxMaxWidth:r/2/u,hBoxMaxHeight:s/2}),d=Object.assign({},n);lU(d,sA(i));const f=Object.assign({maxPadding:d,w:r,h:s,x:n.left,y:n.top},n),h=TL(a.concat(l),c);fr(o.fullSize,f,c,h),fr(a,f,c,h),fr(l,f,c,h)&&fr(a,f,c,h),DL(f),Fm(o.leftAndTop,f,c,h),f.x+=f.w,f.y+=f.h,Fm(o.rightAndBottom,f,c,h),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},ge(o.chartArea,g=>{const m=g.box;Object.assign(m,t.chartArea),m.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class uU{acquireContext(e,A){}releaseContext(e){return!1}addEventListener(e,A,i){}removeEventListener(e,A,i){}getDevicePixelRatio(){return 1}getMaximumSize(e,A,i,n){return A=Math.max(0,A||e.width),i=i||e.height,{width:A,height:Math.max(0,n?Math.floor(A/n):i)}}isAttached(e){return!0}updateConfig(e){}}class ML extends uU{acquireContext(e){return e&&e.getContext&&e.getContext("2d")||null}updateConfig(e){e.options.animation=!1}}const Ko="$chartjs",NL={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Im=t=>t===null||t==="";function zL(t,e){const A=t.style,i=t.getAttribute("height"),n=t.getAttribute("width");if(t[Ko]={initial:{height:i,width:n,style:{display:A.display,height:A.height,width:A.width}}},A.display=A.display||"block",A.boxSizing=A.boxSizing||"border-box",Im(n)){const r=dm(t,"width");r!==void 0&&(t.width=r)}if(Im(i))if(t.style.height==="")t.height=t.width/(e||2);else{const r=dm(t,"height");r!==void 0&&(t.height=r)}return t}const cU=KD?{passive:!0}:!1;function PL(t,e,A){t&&t.addEventListener(e,A,cU)}function RL(t,e,A){t&&t.canvas&&t.canvas.removeEventListener(e,A,cU)}function KL(t,e){const A=NL[t.type]||t.type,{x:i,y:n}=Cn(t,e);return{type:A,chart:e,native:t,x:i!==void 0?i:null,y:n!==void 0?n:null}}function ba(t,e){for(const A of t)if(A===e||A.contains(e))return!0}function ZL(t,e,A){const i=t.canvas,n=new MutationObserver(r=>{let s=!1;for(const o of r)s=s||ba(o.addedNodes,i),s=s&&!ba(o.removedNodes,i);s&&A()});return n.observe(document,{childList:!0,subtree:!0}),n}function VL(t,e,A){const i=t.canvas,n=new MutationObserver(r=>{let s=!1;for(const o of r)s=s||ba(o.removedNodes,i),s=s&&!ba(o.addedNodes,i);s&&A()});return n.observe(document,{childList:!0,subtree:!0}),n}const Wr=new Map;let Sm=0;function dU(){const t=window.devicePixelRatio;t!==Sm&&(Sm=t,Wr.forEach((e,A)=>{A.currentDevicePixelRatio!==t&&e()}))}function jL(t,e){Wr.size||window.addEventListener("resize",dU),Wr.set(t,e)}function GL(t){Wr.delete(t),Wr.size||window.removeEventListener("resize",dU)}function WL(t,e,A){const i=t.canvas,n=i&&zh(i);if(!n)return;const r=NC((o,a)=>{const l=n.clientWidth;A(o,a),l<n.clientWidth&&A()},window),s=new ResizeObserver(o=>{const a=o[0],l=a.contentRect.width,u=a.contentRect.height;l===0&&u===0||r(l,u)});return s.observe(n),jL(t,r),s}function pu(t,e,A){A&&A.disconnect(),e==="resize"&&GL(t)}function JL(t,e,A){const i=t.canvas,n=NC(r=>{t.ctx!==null&&A(KL(r,t))},t);return PL(i,e,n),n}class XL extends uU{acquireContext(e,A){const i=e&&e.getContext&&e.getContext("2d");return i&&i.canvas===e?(zL(e,A),i):null}releaseContext(e){const A=e.canvas;if(!A[Ko])return!1;const i=A[Ko].initial;["height","width"].forEach(r=>{const s=i[r];le(s)?A.removeAttribute(r):A.setAttribute(r,s)});const n=i.style||{};return Object.keys(n).forEach(r=>{A.style[r]=n[r]}),A.width=A.width,delete A[Ko],!0}addEventListener(e,A,i){this.removeEventListener(e,A);const n=e.$proxies||(e.$proxies={}),s={attach:ZL,detach:VL,resize:WL}[A]||JL;n[A]=s(e,A,i)}removeEventListener(e,A){const i=e.$proxies||(e.$proxies={}),n=i[A];if(!n)return;({attach:pu,detach:pu,resize:pu}[A]||RL)(e,A,n),i[A]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(e,A,i,n){return RD(e,A,i,n)}isAttached(e){const A=e&&zh(e);return!!(A&&A.isConnected)}}function YL(t){return!Nh()||typeof OffscreenCanvas<"u"&&t instanceof OffscreenCanvas?ML:XL}class pA{constructor(){k(this,"x");k(this,"y");k(this,"active",!1);k(this,"options");k(this,"$animations")}tooltipPosition(e){const{x:A,y:i}=this.getProps(["x","y"],e);return{x:A,y:i}}hasValue(){return Ti(this.x)&&Ti(this.y)}getProps(e,A){const i=this.$animations;if(!A||!i)return this;const n={};return e.forEach(r=>{n[r]=i[r]&&i[r].active()?i[r]._to:this[r]}),n}}k(pA,"defaults",{}),k(pA,"defaultRoutes");function qL(t,e){const A=t.options.ticks,i=eM(t),n=Math.min(A.maxTicksLimit||i,i),r=A.major.enabled?AM(e):[],s=r.length,o=r[0],a=r[s-1],l=[];if(s>n)return nM(e,l,r,s/n),l;const u=tM(r,e,n);if(s>0){let c,d;const f=s>1?Math.round((a-o)/(s-1)):null;for(ao(e,l,u,le(f)?0:o-f,o),c=0,d=s-1;c<d;c++)ao(e,l,u,r[c],r[c+1]);return ao(e,l,u,a,le(f)?e.length:a+f),l}return ao(e,l,u),l}function eM(t){const e=t.options.offset,A=t._tickSize(),i=t._length/A+(e?0:1),n=t._maxLength/A;return Math.floor(Math.min(i,n))}function tM(t,e,A){const i=iM(t),n=e.length/A;if(!i)return Math.max(n,1);const r=KH(i);for(let s=0,o=r.length-1;s<o;s++){const a=r[s];if(a>n)return a}return Math.max(n,1)}function AM(t){const e=[];let A,i;for(A=0,i=t.length;A<i;A++)t[A].major&&e.push(A);return e}function nM(t,e,A,i){let n=0,r=A[0],s;for(i=Math.ceil(i),s=0;s<t.length;s++)s===r&&(e.push(t[s]),n++,r=A[n*i])}function ao(t,e,A,i,n){const r=Z(i,0),s=Math.min(Z(n,t.length),t.length);let o=0,a,l,u;for(A=Math.ceil(A),n&&(a=n-i,A=a/Math.floor(a/A)),u=r;u<0;)o++,u=Math.round(r+o*A);for(l=Math.max(r,0);l<s;l++)l===u&&(e.push(t[l]),o++,u=Math.round(r+o*A))}function iM(t){const e=t.length;let A,i;if(e<2)return!1;for(i=t[0],A=1;A<e;++A)if(t[A]-t[A-1]!==i)return!1;return i}const rM=t=>t==="left"?"right":t==="right"?"left":t,km=(t,e,A)=>e==="top"||e==="left"?t[e]+A:t[e]-A,Em=(t,e)=>Math.min(e||t,t);function $m(t,e){const A=[],i=t.length/e,n=t.length;let r=0;for(;r<n;r+=i)A.push(t[Math.floor(r)]);return A}function sM(t,e,A){const i=t.ticks.length,n=Math.min(e,i-1),r=t._startPixel,s=t._endPixel,o=1e-6;let a=t.getPixelForTick(n),l;if(!(A&&(i===1?l=Math.max(a-r,s-a):e===0?l=(t.getPixelForTick(1)-a)/2:l=(a-t.getPixelForTick(n-1))/2,a+=n<e?l:-l,a<r-o||a>s+o)))return a}function oM(t,e){ge(t,A=>{const i=A.gc,n=i.length/2;let r;if(n>e){for(r=0;r<n;++r)delete A.data[i[r]];i.splice(0,n)}})}function nr(t){return t.drawTicks?t.tickLength:0}function Tm(t,e){if(!t.display)return 0;const A=xt(t.font,e),i=sA(t.padding);return(je(t.text)?t.text.length:1)*A.lineHeight+i.height}function aM(t,e){return Gn(t,{scale:e,type:"scale"})}function lM(t,e,A){return Gn(t,{tick:A,index:e,type:"tick"})}function uM(t,e,A){let i=zC(t);return(A&&e!=="right"||!A&&e==="right")&&(i=rM(i)),i}function cM(t,e,A,i){const{top:n,left:r,bottom:s,right:o,chart:a}=t,{chartArea:l,scales:u}=a;let c=0,d,f,h;const g=s-n,m=o-r;if(t.isHorizontal()){if(f=St(i,r,o),re(A)){const p=Object.keys(A)[0],B=A[p];h=u[p].getPixelForValue(B)+g-e}else A==="center"?h=(l.bottom+l.top)/2+g-e:h=km(t,A,e);d=o-r}else{if(re(A)){const p=Object.keys(A)[0],B=A[p];f=u[p].getPixelForValue(B)-m+e}else A==="center"?f=(l.left+l.right)/2-m+e:f=km(t,A,e);h=St(i,s,n),c=A==="left"?-Ge:Ge}return{titleX:f,titleY:h,maxWidth:d,rotation:c}}class Ri extends pA{constructor(e){super(),this.id=e.id,this.type=e.type,this.options=void 0,this.ctx=e.ctx,this.chart=e.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(e){this.options=e.setContext(this.getContext()),this.axis=e.axis,this._userMin=this.parse(e.min),this._userMax=this.parse(e.max),this._suggestedMin=this.parse(e.suggestedMin),this._suggestedMax=this.parse(e.suggestedMax)}parse(e,A){return e}getUserBounds(){let{_userMin:e,_userMax:A,_suggestedMin:i,_suggestedMax:n}=this;return e=lA(e,Number.POSITIVE_INFINITY),A=lA(A,Number.NEGATIVE_INFINITY),i=lA(i,Number.POSITIVE_INFINITY),n=lA(n,Number.NEGATIVE_INFINITY),{min:lA(e,i),max:lA(A,n),minDefined:ut(e),maxDefined:ut(A)}}getMinMax(e){let{min:A,max:i,minDefined:n,maxDefined:r}=this.getUserBounds(),s;if(n&&r)return{min:A,max:i};const o=this.getMatchingVisibleMetas();for(let a=0,l=o.length;a<l;++a)s=o[a].controller.getMinMax(this,e),n||(A=Math.min(A,s.min)),r||(i=Math.max(i,s.max));return A=r&&A>i?i:A,i=n&&A>i?A:i,{min:lA(A,lA(i,A)),max:lA(i,lA(A,i))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]}getLabelItems(e=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(e))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Ue(this.options.beforeUpdate,[this])}update(e,A,i){const{beginAtZero:n,grace:r,ticks:s}=this.options,o=s.sampleSize;this.beforeUpdate(),this.maxWidth=e,this.maxHeight=A,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=yD(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const a=o<this.ticks.length;this._convertTicksToLabels(a?$m(this.ticks,o):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||s.source==="auto")&&(this.ticks=qL(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),a&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let e=this.options.reverse,A,i;this.isHorizontal()?(A=this.left,i=this.right):(A=this.top,i=this.bottom,e=!e),this._startPixel=A,this._endPixel=i,this._reversePixels=e,this._length=i-A,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Ue(this.options.afterUpdate,[this])}beforeSetDimensions(){Ue(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Ue(this.options.afterSetDimensions,[this])}_callHooks(e){this.chart.notifyPlugins(e,this.getContext()),Ue(this.options[e],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Ue(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(e){const A=this.options.ticks;let i,n,r;for(i=0,n=e.length;i<n;i++)r=e[i],r.label=Ue(A.callback,[r.value,i,e],this)}afterTickToLabelConversion(){Ue(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Ue(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const e=this.options,A=e.ticks,i=Em(this.ticks.length,e.ticks.maxTicksLimit),n=A.minRotation||0,r=A.maxRotation;let s=n,o,a,l;if(!this._isVisible()||!A.display||n>=r||i<=1||!this.isHorizontal()){this.labelRotation=n;return}const u=this._getLabelSizes(),c=u.widest.width,d=u.highest.height,f=at(this.chart.width-c,0,this.maxWidth);o=e.offset?this.maxWidth/i:f/(i-1),c+6>o&&(o=f/(i-(e.offset?.5:1)),a=this.maxHeight-nr(e.grid)-A.padding-Tm(e.title,this.chart.options.font),l=Math.sqrt(c*c+d*d),s=GH(Math.min(Math.asin(at((u.highest.height+6)/o,-1,1)),Math.asin(at(a/l,-1,1))-Math.asin(at(d/l,-1,1)))),s=Math.max(n,Math.min(r,s))),this.labelRotation=s}afterCalculateLabelRotation(){Ue(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Ue(this.options.beforeFit,[this])}fit(){const e={width:0,height:0},{chart:A,options:{ticks:i,title:n,grid:r}}=this,s=this._isVisible(),o=this.isHorizontal();if(s){const a=Tm(n,A.options.font);if(o?(e.width=this.maxWidth,e.height=nr(r)+a):(e.height=this.maxHeight,e.width=nr(r)+a),i.display&&this.ticks.length){const{first:l,last:u,widest:c,highest:d}=this._getLabelSizes(),f=i.padding*2,h=FA(this.labelRotation),g=Math.cos(h),m=Math.sin(h);if(o){const p=i.mirror?0:m*c.width+g*d.height;e.height=Math.min(this.maxHeight,e.height+p+f)}else{const p=i.mirror?0:g*c.width+m*d.height;e.width=Math.min(this.maxWidth,e.width+p+f)}this._calculatePadding(l,u,m,g)}}this._handleMargins(),o?(this.width=this._length=A.width-this._margins.left-this._margins.right,this.height=e.height):(this.width=e.width,this.height=this._length=A.height-this._margins.top-this._margins.bottom)}_calculatePadding(e,A,i,n){const{ticks:{align:r,padding:s},position:o}=this.options,a=this.labelRotation!==0,l=o!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,c=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,f=0;a?l?(d=n*e.width,f=i*A.height):(d=i*e.height,f=n*A.width):r==="start"?f=A.width:r==="end"?d=e.width:r!=="inner"&&(d=e.width/2,f=A.width/2),this.paddingLeft=Math.max((d-u+s)*this.width/(this.width-u),0),this.paddingRight=Math.max((f-c+s)*this.width/(this.width-c),0)}else{let u=A.height/2,c=e.height/2;r==="start"?(u=0,c=e.height):r==="end"&&(u=A.height,c=0),this.paddingTop=u+s,this.paddingBottom=c+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Ue(this.options.afterFit,[this])}isHorizontal(){const{axis:e,position:A}=this.options;return A==="top"||A==="bottom"||e==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(e){this.beforeTickToLabelConversion(),this.generateTickLabels(e);let A,i;for(A=0,i=e.length;A<i;A++)le(e[A].label)&&(e.splice(A,1),i--,A--);this.afterTickToLabelConversion()}_getLabelSizes(){let e=this._labelSizes;if(!e){const A=this.options.ticks.sampleSize;let i=this.ticks;A<i.length&&(i=$m(i,A)),this._labelSizes=e=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return e}_computeLabelSizes(e,A,i){const{ctx:n,_longestTextCache:r}=this,s=[],o=[],a=Math.floor(A/Em(A,i));let l=0,u=0,c,d,f,h,g,m,p,B,b,_,y;for(c=0;c<A;c+=a){if(h=e[c].label,g=this._resolveTickFontOptions(c),n.font=m=g.string,p=r[m]=r[m]||{data:{},gc:[]},B=g.lineHeight,b=_=0,!le(h)&&!je(h))b=om(n,p.data,p.gc,b,h),_=B;else if(je(h))for(d=0,f=h.length;d<f;++d)y=h[d],!le(y)&&!je(y)&&(b=om(n,p.data,p.gc,b,y),_+=B);s.push(b),o.push(_),l=Math.max(b,l),u=Math.max(_,u)}oM(r,A);const w=s.indexOf(l),U=o.indexOf(u),F=x=>({width:s[x]||0,height:o[x]||0});return{first:F(0),last:F(A-1),widest:F(w),highest:F(U),widths:s,heights:o}}getLabelForValue(e){return e}getPixelForValue(e,A){return NaN}getValueForPixel(e){}getPixelForTick(e){const A=this.ticks;return e<0||e>A.length-1?null:this.getPixelForValue(A[e].value)}getPixelForDecimal(e){this._reversePixels&&(e=1-e);const A=this._startPixel+e*this._length;return JH(this._alignToPixels?vn(this.chart,A,0):A)}getDecimalForPixel(e){const A=(e-this._startPixel)/this._length;return this._reversePixels?1-A:A}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:e,max:A}=this;return e<0&&A<0?A:e>0&&A>0?e:0}getContext(e){const A=this.ticks||[];if(e>=0&&e<A.length){const i=A[e];return i.$context||(i.$context=lM(this.getContext(),e,i))}return this.$context||(this.$context=aM(this.chart.getContext(),this))}_tickSize(){const e=this.options.ticks,A=FA(this.labelRotation),i=Math.abs(Math.cos(A)),n=Math.abs(Math.sin(A)),r=this._getLabelSizes(),s=e.autoSkipPadding||0,o=r?r.widest.width+s:0,a=r?r.highest.height+s:0;return this.isHorizontal()?a*i>o*n?o/i:a/n:a*n<o*i?a/i:o/n}_isVisible(){const e=this.options.display;return e!=="auto"?!!e:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(e){const A=this.axis,i=this.chart,n=this.options,{grid:r,position:s,border:o}=n,a=r.offset,l=this.isHorizontal(),c=this.ticks.length+(a?1:0),d=nr(r),f=[],h=o.setContext(this.getContext()),g=h.display?h.width:0,m=g/2,p=function(W){return vn(i,W,g)};let B,b,_,y,w,U,F,x,$,M,z,R;if(s==="top")B=p(this.bottom),U=this.bottom-d,x=B-m,M=p(e.top)+m,R=e.bottom;else if(s==="bottom")B=p(this.top),M=e.top,R=p(e.bottom)-m,U=B+m,x=this.top+d;else if(s==="left")B=p(this.right),w=this.right-d,F=B-m,$=p(e.left)+m,z=e.right;else if(s==="right")B=p(this.left),$=e.left,z=p(e.right)-m,w=B+m,F=this.left+d;else if(A==="x"){if(s==="center")B=p((e.top+e.bottom)/2+.5);else if(re(s)){const W=Object.keys(s)[0],ne=s[W];B=p(this.chart.scales[W].getPixelForValue(ne))}M=e.top,R=e.bottom,U=B+m,x=U+d}else if(A==="y"){if(s==="center")B=p((e.left+e.right)/2);else if(re(s)){const W=Object.keys(s)[0],ne=s[W];B=p(this.chart.scales[W].getPixelForValue(ne))}w=B-m,F=w-d,$=e.left,z=e.right}const te=Z(n.ticks.maxTicksLimit,c),Y=Math.max(1,Math.ceil(c/te));for(b=0;b<c;b+=Y){const W=this.getContext(b),ne=r.setContext(W),Ze=o.setContext(W),we=ne.lineWidth,ct=ne.color,Lt=Ze.dash||[],Bt=Ze.dashOffset,dt=ne.tickWidth,ft=ne.tickColor,ht=ne.tickBorderDash||[],wt=ne.tickBorderDashOffset;_=sM(this,b,a),_!==void 0&&(y=vn(i,_,we),l?w=F=$=z=y:U=x=M=R=y,f.push({tx1:w,ty1:U,tx2:F,ty2:x,x1:$,y1:M,x2:z,y2:R,width:we,color:ct,borderDash:Lt,borderDashOffset:Bt,tickWidth:dt,tickColor:ft,tickBorderDash:ht,tickBorderDashOffset:wt}))}return this._ticksLength=c,this._borderValue=B,f}_computeLabelItems(e){const A=this.axis,i=this.options,{position:n,ticks:r}=i,s=this.isHorizontal(),o=this.ticks,{align:a,crossAlign:l,padding:u,mirror:c}=r,d=nr(i.grid),f=d+u,h=c?-u:f,g=-FA(this.labelRotation),m=[];let p,B,b,_,y,w,U,F,x,$,M,z,R="middle";if(n==="top")w=this.bottom-h,U=this._getXAxisLabelAlignment();else if(n==="bottom")w=this.top+h,U=this._getXAxisLabelAlignment();else if(n==="left"){const Y=this._getYAxisLabelAlignment(d);U=Y.textAlign,y=Y.x}else if(n==="right"){const Y=this._getYAxisLabelAlignment(d);U=Y.textAlign,y=Y.x}else if(A==="x"){if(n==="center")w=(e.top+e.bottom)/2+f;else if(re(n)){const Y=Object.keys(n)[0],W=n[Y];w=this.chart.scales[Y].getPixelForValue(W)+f}U=this._getXAxisLabelAlignment()}else if(A==="y"){if(n==="center")y=(e.left+e.right)/2-f;else if(re(n)){const Y=Object.keys(n)[0],W=n[Y];y=this.chart.scales[Y].getPixelForValue(W)}U=this._getYAxisLabelAlignment(d).textAlign}A==="y"&&(a==="start"?R="top":a==="end"&&(R="bottom"));const te=this._getLabelSizes();for(p=0,B=o.length;p<B;++p){b=o[p],_=b.label;const Y=r.setContext(this.getContext(p));F=this.getPixelForTick(p)+r.labelOffset,x=this._resolveTickFontOptions(p),$=x.lineHeight,M=je(_)?_.length:1;const W=M/2,ne=Y.color,Ze=Y.textStrokeColor,we=Y.textStrokeWidth;let ct=U;s?(y=F,U==="inner"&&(p===B-1?ct=this.options.reverse?"left":"right":p===0?ct=this.options.reverse?"right":"left":ct="center"),n==="top"?l==="near"||g!==0?z=-M*$+$/2:l==="center"?z=-te.highest.height/2-W*$+$:z=-te.highest.height+$/2:l==="near"||g!==0?z=$/2:l==="center"?z=te.highest.height/2-W*$:z=te.highest.height-M*$,c&&(z*=-1),g!==0&&!Y.showLabelBackdrop&&(y+=$/2*Math.sin(g))):(w=F,z=(1-M)*$/2);let Lt;if(Y.showLabelBackdrop){const Bt=sA(Y.backdropPadding),dt=te.heights[p],ft=te.widths[p];let ht=z-Bt.top,wt=0-Bt.left;switch(R){case"middle":ht-=dt/2;break;case"bottom":ht-=dt;break}switch(U){case"center":wt-=ft/2;break;case"right":wt-=ft;break;case"inner":p===B-1?wt-=ft:p>0&&(wt-=ft/2);break}Lt={left:wt,top:ht,width:ft+Bt.width,height:dt+Bt.height,color:Y.backdropColor}}m.push({label:_,font:x,textOffset:z,options:{rotation:g,color:ne,strokeColor:Ze,strokeWidth:we,textAlign:ct,textBaseline:R,translation:[y,w],backdrop:Lt}})}return m}_getXAxisLabelAlignment(){const{position:e,ticks:A}=this.options;if(-FA(this.labelRotation))return e==="top"?"left":"right";let n="center";return A.align==="start"?n="left":A.align==="end"?n="right":A.align==="inner"&&(n="inner"),n}_getYAxisLabelAlignment(e){const{position:A,ticks:{crossAlign:i,mirror:n,padding:r}}=this.options,s=this._getLabelSizes(),o=e+r,a=s.widest.width;let l,u;return A==="left"?n?(u=this.right+r,i==="near"?l="left":i==="center"?(l="center",u+=a/2):(l="right",u+=a)):(u=this.right-o,i==="near"?l="right":i==="center"?(l="center",u-=a/2):(l="left",u=this.left)):A==="right"?n?(u=this.left+r,i==="near"?l="right":i==="center"?(l="center",u-=a/2):(l="left",u-=a)):(u=this.left+o,i==="near"?l="left":i==="center"?(l="center",u+=a/2):(l="right",u=this.right)):l="right",{textAlign:l,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const e=this.chart,A=this.options.position;if(A==="left"||A==="right")return{top:0,left:this.left,bottom:e.height,right:this.right};if(A==="top"||A==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:e.width}}drawBackground(){const{ctx:e,options:{backgroundColor:A},left:i,top:n,width:r,height:s}=this;A&&(e.save(),e.fillStyle=A,e.fillRect(i,n,r,s),e.restore())}getLineWidthForValue(e){const A=this.options.grid;if(!this._isVisible()||!A.display)return 0;const n=this.ticks.findIndex(r=>r.value===e);return n>=0?A.setContext(this.getContext(n)).lineWidth:0}drawGrid(e){const A=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(e));let r,s;const o=(a,l,u)=>{!u.width||!u.color||(i.save(),i.lineWidth=u.width,i.strokeStyle=u.color,i.setLineDash(u.borderDash||[]),i.lineDashOffset=u.borderDashOffset,i.beginPath(),i.moveTo(a.x,a.y),i.lineTo(l.x,l.y),i.stroke(),i.restore())};if(A.display)for(r=0,s=n.length;r<s;++r){const a=n[r];A.drawOnChartArea&&o({x:a.x1,y:a.y1},{x:a.x2,y:a.y2},a),A.drawTicks&&o({x:a.tx1,y:a.ty1},{x:a.tx2,y:a.ty2},{color:a.tickColor,width:a.tickWidth,borderDash:a.tickBorderDash,borderDashOffset:a.tickBorderDashOffset})}}drawBorder(){const{chart:e,ctx:A,options:{border:i,grid:n}}=this,r=i.setContext(this.getContext()),s=i.display?r.width:0;if(!s)return;const o=n.setContext(this.getContext(0)).lineWidth,a=this._borderValue;let l,u,c,d;this.isHorizontal()?(l=vn(e,this.left,s)-s/2,u=vn(e,this.right,o)+o/2,c=d=a):(c=vn(e,this.top,s)-s/2,d=vn(e,this.bottom,o)+o/2,l=u=a),A.save(),A.lineWidth=r.width,A.strokeStyle=r.color,A.beginPath(),A.moveTo(l,c),A.lineTo(u,d),A.stroke(),A.restore()}drawLabels(e){if(!this.options.ticks.display)return;const i=this.ctx,n=this._computeLabelArea();n&&Hs(i,n);const r=this.getLabelItems(e);for(const s of r){const o=s.options,a=s.font,l=s.label,u=s.textOffset;va(i,l,0,u,a,o)}n&&Ds(i)}drawTitle(){const{ctx:e,options:{position:A,title:i,reverse:n}}=this;if(!i.display)return;const r=xt(i.font),s=sA(i.padding),o=i.align;let a=r.lineHeight/2;A==="bottom"||A==="center"||re(A)?(a+=s.bottom,je(i.text)&&(a+=r.lineHeight*(i.text.length-1))):a+=s.top;const{titleX:l,titleY:u,maxWidth:c,rotation:d}=cM(this,a,A,o);va(e,i.text,0,0,r,{color:i.color,maxWidth:c,rotation:d,textAlign:uM(o,A,n),textBaseline:"middle",translation:[l,u]})}draw(e){this._isVisible()&&(this.drawBackground(),this.drawGrid(e),this.drawBorder(),this.drawTitle(),this.drawLabels(e))}_layers(){const e=this.options,A=e.ticks&&e.ticks.z||0,i=Z(e.grid&&e.grid.z,-1),n=Z(e.border&&e.border.z,0);return!this._isVisible()||this.draw!==Ri.prototype.draw?[{z:A,draw:r=>{this.draw(r)}}]:[{z:i,draw:r=>{this.drawBackground(),this.drawGrid(r),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:A,draw:r=>{this.drawLabels(r)}}]}getMatchingVisibleMetas(e){const A=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,s;for(r=0,s=A.length;r<s;++r){const o=A[r];o[i]===this.id&&(!e||o.type===e)&&n.push(o)}return n}_resolveTickFontOptions(e){const A=this.options.ticks.setContext(this.getContext(e));return xt(A.font)}_maxDigits(){const e=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/e}}class lo{constructor(e,A,i){this.type=e,this.scope=A,this.override=i,this.items=Object.create(null)}isForType(e){return Object.prototype.isPrototypeOf.call(this.type.prototype,e.prototype)}register(e){const A=Object.getPrototypeOf(e);let i;hM(A)&&(i=this.register(A));const n=this.items,r=e.id,s=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+e);return r in n||(n[r]=e,dM(e,s,i),this.override&&me.override(e.id,e.overrides)),s}get(e){return this.items[e]}unregister(e){const A=this.items,i=e.id,n=this.scope;i in A&&delete A[i],n&&i in me[n]&&(delete me[n][i],this.override&&delete zn[i])}}function dM(t,e,A){const i=Zr(Object.create(null),[A?me.get(A):{},me.get(e),t.defaults]);me.set(e,i),t.defaultRoutes&&fM(e,t.defaultRoutes),t.descriptors&&me.describe(e,t.descriptors)}function fM(t,e){Object.keys(e).forEach(A=>{const i=A.split("."),n=i.pop(),r=[t].concat(i).join("."),s=e[A].split("."),o=s.pop(),a=s.join(".");me.route(r,n,a,o)})}function hM(t){return"id"in t&&"defaults"in t}class gM{constructor(){this.controllers=new lo(YA,"datasets",!0),this.elements=new lo(pA,"elements"),this.plugins=new lo(Object,"plugins"),this.scales=new lo(Ri,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...e){this._each("register",e)}remove(...e){this._each("unregister",e)}addControllers(...e){this._each("register",e,this.controllers)}addElements(...e){this._each("register",e,this.elements)}addPlugins(...e){this._each("register",e,this.plugins)}addScales(...e){this._each("register",e,this.scales)}getController(e){return this._get(e,this.controllers,"controller")}getElement(e){return this._get(e,this.elements,"element")}getPlugin(e){return this._get(e,this.plugins,"plugin")}getScale(e){return this._get(e,this.scales,"scale")}removeControllers(...e){this._each("unregister",e,this.controllers)}removeElements(...e){this._each("unregister",e,this.elements)}removePlugins(...e){this._each("unregister",e,this.plugins)}removeScales(...e){this._each("unregister",e,this.scales)}_each(e,A,i){[...A].forEach(n=>{const r=i||this._getRegistryForType(n);i||r.isForType(n)||r===this.plugins&&n.id?this._exec(e,r,n):ge(n,s=>{const o=i||this._getRegistryForType(s);this._exec(e,o,s)})})}_exec(e,A,i){const n=Eh(e);Ue(i["before"+n],[],i),A[e](i),Ue(i["after"+n],[],i)}_getRegistryForType(e){for(let A=0;A<this._typedRegistries.length;A++){const i=this._typedRegistries[A];if(i.isForType(e))return i}return this.plugins}_get(e,A,i){const n=A.get(e);if(n===void 0)throw new Error('"'+e+'" is not a registered '+i+".");return n}}var dA=new gM;class mM{constructor(){this._init=void 0}notify(e,A,i,n){if(A==="beforeInit"&&(this._init=this._createDescriptors(e,!0),this._notify(this._init,e,"install")),this._init===void 0)return;const r=n?this._descriptors(e).filter(n):this._descriptors(e),s=this._notify(r,e,A,i);return A==="afterDestroy"&&(this._notify(r,e,"stop"),this._notify(this._init,e,"uninstall"),this._init=void 0),s}_notify(e,A,i,n){n=n||{};for(const r of e){const s=r.plugin,o=s[i],a=[A,n,r.options];if(Ue(o,a,s)===!1&&n.cancelable)return!1}return!0}invalidate(){le(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(e){if(this._cache)return this._cache;const A=this._cache=this._createDescriptors(e);return this._notifyStateChanges(e),A}_createDescriptors(e,A){const i=e&&e.config,n=Z(i.options&&i.options.plugins,{}),r=pM(i);return n===!1&&!A?[]:BM(e,r,n,A)}_notifyStateChanges(e){const A=this._oldCache||[],i=this._cache,n=(r,s)=>r.filter(o=>!s.some(a=>o.plugin.id===a.plugin.id));this._notify(n(A,i),e,"stop"),this._notify(n(i,A),e,"start")}}function pM(t){const e={},A=[],i=Object.keys(dA.plugins.items);for(let r=0;r<i.length;r++)A.push(dA.getPlugin(i[r]));const n=t.plugins||[];for(let r=0;r<n.length;r++){const s=n[r];A.indexOf(s)===-1&&(A.push(s),e[s.id]=!0)}return{plugins:A,localIds:e}}function vM(t,e){return!e&&t===!1?null:t===!0?{}:t}function BM(t,{plugins:e,localIds:A},i,n){const r=[],s=t.getContext();for(const o of e){const a=o.id,l=vM(i[a],n);l!==null&&r.push({plugin:o,options:wM(t.config,{plugin:o,local:A[a]},l,s)})}return r}function wM(t,{plugin:e,local:A},i,n){const r=t.pluginScopeKeys(e),s=t.getOptionScopes(i,r);return A&&e.defaults&&s.push(e.defaults),t.createResolver(s,n,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function hc(t,e){const A=me.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||A.indexAxis||"x"}function yM(t,e){let A=t;return t==="_index_"?A=e:t==="_value_"&&(A=e==="x"?"y":"x"),A}function bM(t,e){return t===e?"_index_":"_value_"}function Om(t){if(t==="x"||t==="y"||t==="r")return t}function _M(t){if(t==="top"||t==="bottom")return"x";if(t==="left"||t==="right")return"y"}function gc(t,...e){if(Om(t))return t;for(const A of e){const i=A.axis||_M(A.position)||t.length>1&&Om(t[0].toLowerCase());if(i)return i}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function Hm(t,e,A){if(A[e+"AxisID"]===t)return{axis:e}}function CM(t,e){if(e.data&&e.data.datasets){const A=e.data.datasets.filter(i=>i.xAxisID===t||i.yAxisID===t);if(A.length)return Hm(t,"x",A[0])||Hm(t,"y",A[0])}return{}}function UM(t,e){const A=zn[t.type]||{scales:{}},i=e.scales||{},n=hc(t.type,e),r=Object.create(null);return Object.keys(i).forEach(s=>{const o=i[s];if(!re(o))return console.error(`Invalid scale configuration for scale: ${s}`);if(o._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${s}`);const a=gc(s,o,CM(s,t),me.scales[o.type]),l=bM(a,n),u=A.scales||{};r[s]=Ur(Object.create(null),[{axis:a},o,u[a],u[l]])}),t.data.datasets.forEach(s=>{const o=s.type||t.type,a=s.indexAxis||hc(o,e),u=(zn[o]||{}).scales||{};Object.keys(u).forEach(c=>{const d=yM(c,a),f=s[d+"AxisID"]||d;r[f]=r[f]||Object.create(null),Ur(r[f],[{axis:d},i[f],u[c]])})}),Object.keys(r).forEach(s=>{const o=r[s];Ur(o,[me.scales[o.type],me.scale])}),r}function fU(t){const e=t.options||(t.options={});e.plugins=Z(e.plugins,{}),e.scales=UM(t,e)}function hU(t){return t=t||{},t.datasets=t.datasets||[],t.labels=t.labels||[],t}function QM(t){return t=t||{},t.data=hU(t.data),fU(t),t}const Dm=new Map,gU=new Set;function uo(t,e){let A=Dm.get(t);return A||(A=e(),Dm.set(t,A),gU.add(A)),A}const ir=(t,e,A)=>{const i=Nn(e,A);i!==void 0&&t.add(i)};class xM{constructor(e){this._config=QM(e),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(e){this._config.type=e}get data(){return this._config.data}set data(e){this._config.data=hU(e)}get options(){return this._config.options}set options(e){this._config.options=e}get plugins(){return this._config.plugins}update(){const e=this._config;this.clearCache(),fU(e)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(e){return uo(e,()=>[[`datasets.${e}`,""]])}datasetAnimationScopeKeys(e,A){return uo(`${e}.transition.${A}`,()=>[[`datasets.${e}.transitions.${A}`,`transitions.${A}`],[`datasets.${e}`,""]])}datasetElementScopeKeys(e,A){return uo(`${e}-${A}`,()=>[[`datasets.${e}.elements.${A}`,`datasets.${e}`,`elements.${A}`,""]])}pluginScopeKeys(e){const A=e.id,i=this.type;return uo(`${i}-plugin-${A}`,()=>[[`plugins.${A}`,...e.additionalOptionScopes||[]]])}_cachedScopes(e,A){const i=this._scopeCache;let n=i.get(e);return(!n||A)&&(n=new Map,i.set(e,n)),n}getOptionScopes(e,A,i){const{options:n,type:r}=this,s=this._cachedScopes(e,i),o=s.get(A);if(o)return o;const a=new Set;A.forEach(u=>{e&&(a.add(e),u.forEach(c=>ir(a,e,c))),u.forEach(c=>ir(a,n,c)),u.forEach(c=>ir(a,zn[r]||{},c)),u.forEach(c=>ir(a,me,c)),u.forEach(c=>ir(a,dc,c))});const l=Array.from(a);return l.length===0&&l.push(Object.create(null)),gU.has(A)&&s.set(A,l),l}chartOptionScopes(){const{options:e,type:A}=this;return[e,zn[A]||{},me.datasets[A]||{},{type:A},me,dc]}resolveNamedOptions(e,A,i,n=[""]){const r={$shared:!0},{resolver:s,subPrefixes:o}=Lm(this._resolverCache,e,n);let a=s;if(IM(s,A)){r.$shared=!1,i=cn(i)?i():i;const l=this.createResolver(e,i,o);a=Oi(s,i,l)}for(const l of A)r[l]=a[l];return r}createResolver(e,A,i=[""],n){const{resolver:r}=Lm(this._resolverCache,e,i);return re(A)?Oi(r,A,void 0,n):r}}function Lm(t,e,A){let i=t.get(e);i||(i=new Map,t.set(e,i));const n=A.join();let r=i.get(n);return r||(r={resolver:Dh(e,A),subPrefixes:A.filter(o=>!o.toLowerCase().includes("hover"))},i.set(n,r)),r}const FM=t=>re(t)&&Object.getOwnPropertyNames(t).some(e=>cn(t[e]));function IM(t,e){const{isScriptable:A,isIndexable:i}=jC(t);for(const n of e){const r=A(n),s=i(n),o=(s||r)&&t[n];if(r&&(cn(o)||FM(o))||s&&je(o))return!0}return!1}var SM="4.5.1";const kM=["top","bottom","left","right","chartArea"];function Mm(t,e){return t==="top"||t==="bottom"||kM.indexOf(t)===-1&&e==="x"}function Nm(t,e){return function(A,i){return A[t]===i[t]?A[e]-i[e]:A[t]-i[t]}}function zm(t){const e=t.chart,A=e.options.animation;e.notifyPlugins("afterRender"),Ue(A&&A.onComplete,[t],e)}function EM(t){const e=t.chart,A=e.options.animation;Ue(A&&A.onProgress,[t],e)}function mU(t){return Nh()&&typeof t=="string"?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Zo={},Pm=t=>{const e=mU(t);return Object.values(Zo).filter(A=>A.canvas===e).pop()};function $M(t,e,A){const i=Object.keys(t);for(const n of i){const r=+n;if(r>=e){const s=t[n];delete t[n],(A>0||r>e)&&(t[r+A]=s)}}}function TM(t,e,A,i){return!A||t.type==="mouseout"?null:i?e:t}class Le{static register(...e){dA.add(...e),Rm()}static unregister(...e){dA.remove(...e),Rm()}constructor(e,A){const i=this.config=new xM(A),n=mU(e),r=Pm(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||YL(n)),this.platform.updateConfig(i);const o=this.platform.acquireContext(n,s.aspectRatio),a=o&&o.canvas,l=a&&a.height,u=a&&a.width;if(this.id=OH(),this.ctx=o,this.canvas=a,this.width=u,this.height=l,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new mM,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=eD(c=>this.update(c),s.resizeDelay||0),this._dataChanges=[],Zo[this.id]=this,!o||!a){console.error("Failed to create chart: can't acquire context from the given item");return}CA.listen(this,"complete",zm),CA.listen(this,"progress",EM),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:e,maintainAspectRatio:A},width:i,height:n,_aspectRatio:r}=this;return le(e)?A&&r?r:n?i/n:null:e}get data(){return this.config.data}set data(e){this.config.data=e}get options(){return this._options}set options(e){this.config.options=e}get registry(){return dA}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cm(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return am(this.canvas,this.ctx),this}stop(){return CA.stop(this),this}resize(e,A){CA.running(this)?this._resizeBeforeDraw={width:e,height:A}:this._resize(e,A)}_resize(e,A){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(n,e,A,r),o=i.devicePixelRatio||this.platform.getDevicePixelRatio(),a=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,cm(this,o,!0)&&(this.notifyPlugins("resize",{size:s}),Ue(i.onResize,[this,s],this),this.attached&&this._doResize(a)&&this.render())}ensureScalesHaveIDs(){const A=this.options.scales||{};ge(A,(i,n)=>{i.id=n})}buildOrUpdateScales(){const e=this.options,A=e.scales,i=this.scales,n=Object.keys(i).reduce((s,o)=>(s[o]=!1,s),{});let r=[];A&&(r=r.concat(Object.keys(A).map(s=>{const o=A[s],a=gc(s,o),l=a==="r",u=a==="x";return{options:o,dposition:l?"chartArea":u?"bottom":"left",dtype:l?"radialLinear":u?"category":"linear"}}))),ge(r,s=>{const o=s.options,a=o.id,l=gc(a,o),u=Z(o.type,s.dtype);(o.position===void 0||Mm(o.position,l)!==Mm(s.dposition))&&(o.position=s.dposition),n[a]=!0;let c=null;if(a in i&&i[a].type===u)c=i[a];else{const d=dA.getScale(u);c=new d({id:a,type:u,ctx:this.ctx,chart:this}),i[c.id]=c}c.init(o,e)}),ge(n,(s,o)=>{s||delete i[o]}),ge(i,s=>{VA.configure(this,s,s.options),VA.addBox(this,s)})}_updateMetasets(){const e=this._metasets,A=this.data.datasets.length,i=e.length;if(e.sort((n,r)=>n.index-r.index),i>A){for(let n=A;n<i;++n)this._destroyDatasetMeta(n);e.splice(A,i-A)}this._sortedMetasets=e.slice(0).sort(Nm("order","index"))}_removeUnreferencedMetasets(){const{_metasets:e,data:{datasets:A}}=this;e.length>A.length&&delete this._stacks,e.forEach((i,n)=>{A.filter(r=>r===i._dataset).length===0&&this._destroyDatasetMeta(n)})}buildOrUpdateControllers(){const e=[],A=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=A.length;i<n;i++){const r=A[i];let s=this.getDatasetMeta(i);const o=r.type||this.config.type;if(s.type&&s.type!==o&&(this._destroyDatasetMeta(i),s=this.getDatasetMeta(i)),s.type=o,s.indexAxis=r.indexAxis||hc(o,this.options),s.order=r.order||0,s.index=i,s.label=""+r.label,s.visible=this.isDatasetVisible(i),s.controller)s.controller.updateIndex(i),s.controller.linkScales();else{const a=dA.getController(o),{datasetElementType:l,dataElementType:u}=me.datasets[o];Object.assign(a,{dataElementType:dA.getElement(u),datasetElementType:l&&dA.getElement(l)}),s.controller=new a(this,i),e.push(s.controller)}}return this._updateMetasets(),e}_resetElements(){ge(this.data.datasets,(e,A)=>{this.getDatasetMeta(A).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(e){const A=this.config;A.update();const i=this._options=A.createResolver(A.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:e,cancelable:!0})===!1)return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let l=0,u=this.data.datasets.length;l<u;l++){const{controller:c}=this.getDatasetMeta(l),d=!n&&r.indexOf(c)===-1;c.buildOrUpdateElements(d),s=Math.max(+c.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),n||ge(r,l=>{l.reset()}),this._updateDatasets(e),this.notifyPlugins("afterUpdate",{mode:e}),this._layers.sort(Nm("z","_idx"));const{_active:o,_lastEvent:a}=this;a?this._eventHandler(a,!0):o.length&&this._updateHoverStyles(o,o,!0),this.render()}_updateScales(){ge(this.scales,e=>{VA.removeBox(this,e)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const e=this.options,A=new Set(Object.keys(this._listeners)),i=new Set(e.events);(!Yg(A,i)||!!this._responsiveListeners!==e.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:e}=this,A=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:r}of A){const s=i==="_removeElements"?-r:r;$M(e,n,s)}}_getUniformDataChanges(){const e=this._dataChanges;if(!e||!e.length)return;this._dataChanges=[];const A=this.data.datasets.length,i=r=>new Set(e.filter(s=>s[0]===r).map((s,o)=>o+","+s.splice(1).join(","))),n=i(0);for(let r=1;r<A;r++)if(!Yg(n,i(r)))return;return Array.from(n).map(r=>r.split(",")).map(r=>({method:r[1],start:+r[2],count:+r[3]}))}_updateLayout(e){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;VA.update(this,this.width,this.height,e);const A=this.chartArea,i=A.width<=0||A.height<=0;this._layers=[],ge(this.boxes,n=>{i&&n.position==="chartArea"||(n.configure&&n.configure(),this._layers.push(...n._layers()))},this),this._layers.forEach((n,r)=>{n._idx=r}),this.notifyPlugins("afterLayout")}_updateDatasets(e){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:e,cancelable:!0})!==!1){for(let A=0,i=this.data.datasets.length;A<i;++A)this.getDatasetMeta(A).controller.configure();for(let A=0,i=this.data.datasets.length;A<i;++A)this._updateDataset(A,cn(e)?e({datasetIndex:A}):e);this.notifyPlugins("afterDatasetsUpdate",{mode:e})}}_updateDataset(e,A){const i=this.getDatasetMeta(e),n={meta:i,index:e,mode:A,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",n)!==!1&&(i.controller._update(A),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(CA.has(this)?this.attached&&!CA.running(this)&&CA.start(this):(this.draw(),zm({chart:this})))}draw(){let e;if(this._resizeBeforeDraw){const{width:i,height:n}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(i,n)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const A=this._layers;for(e=0;e<A.length&&A[e].z<=0;++e)A[e].draw(this.chartArea);for(this._drawDatasets();e<A.length;++e)A[e].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(e){const A=this._sortedMetasets,i=[];let n,r;for(n=0,r=A.length;n<r;++n){const s=A[n];(!e||s.visible)&&i.push(s)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const e=this.getSortedVisibleDatasetMetas();for(let A=e.length-1;A>=0;--A)this._drawDataset(e[A]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(e){const A=this.ctx,i={meta:e,index:e.index,cancelable:!0},n=nU(this,e);this.notifyPlugins("beforeDatasetDraw",i)!==!1&&(n&&Hs(A,n),e.controller.draw(),n&&Ds(A),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(e){return Gr(e,this.chartArea,this._minPadding)}getElementsAtEventForMode(e,A,i,n){const r=kL.modes[A];return typeof r=="function"?r(this,e,i,n):[]}getDatasetMeta(e){const A=this.data.datasets[e],i=this._metasets;let n=i.filter(r=>r&&r._dataset===A).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:A&&A.order||0,index:e,_dataset:A,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=Gn(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(e){const A=this.data.datasets[e];if(!A)return!1;const i=this.getDatasetMeta(e);return typeof i.hidden=="boolean"?!i.hidden:!A.hidden}setDatasetVisibility(e,A){const i=this.getDatasetMeta(e);i.hidden=!A}toggleDataVisibility(e){this._hiddenIndices[e]=!this._hiddenIndices[e]}getDataVisibility(e){return!this._hiddenIndices[e]}_updateVisibility(e,A,i){const n=i?"show":"hide",r=this.getDatasetMeta(e),s=r.controller._resolveAnimations(void 0,n);Vr(A)?(r.data[A].hidden=!i,this.update()):(this.setDatasetVisibility(e,i),s.update(r,{visible:i}),this.update(o=>o.datasetIndex===e?n:void 0))}hide(e,A){this._updateVisibility(e,A,!1)}show(e,A){this._updateVisibility(e,A,!0)}_destroyDatasetMeta(e){const A=this._metasets[e];A&&A.controller&&A.controller._destroy(),delete this._metasets[e]}_stop(){let e,A;for(this.stop(),CA.remove(this),e=0,A=this.data.datasets.length;e<A;++e)this._destroyDatasetMeta(e)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:e,ctx:A}=this;this._stop(),this.config.clearCache(),e&&(this.unbindEvents(),am(e,A),this.platform.releaseContext(A),this.canvas=null,this.ctx=null),delete Zo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...e){return this.canvas.toDataURL(...e)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const e=this._listeners,A=this.platform,i=(r,s)=>{A.addEventListener(this,r,s),e[r]=s},n=(r,s,o)=>{r.offsetX=s,r.offsetY=o,this._eventHandler(r)};ge(this.options.events,r=>i(r,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const e=this._responsiveListeners,A=this.platform,i=(a,l)=>{A.addEventListener(this,a,l),e[a]=l},n=(a,l)=>{e[a]&&(A.removeEventListener(this,a,l),delete e[a])},r=(a,l)=>{this.canvas&&this.resize(a,l)};let s;const o=()=>{n("attach",o),this.attached=!0,this.resize(),i("resize",r),i("detach",s)};s=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",o)},A.isAttached(this.canvas)?o():s()}unbindEvents(){ge(this._listeners,(e,A)=>{this.platform.removeEventListener(this,A,e)}),this._listeners={},ge(this._responsiveListeners,(e,A)=>{this.platform.removeEventListener(this,A,e)}),this._responsiveListeners=void 0}updateHoverStyle(e,A,i){const n=i?"set":"remove";let r,s,o,a;for(A==="dataset"&&(r=this.getDatasetMeta(e[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),o=0,a=e.length;o<a;++o){s=e[o];const l=s&&this.getDatasetMeta(s.datasetIndex).controller;l&&l[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(e){const A=this._active||[],i=e.map(({datasetIndex:r,index:s})=>{const o=this.getDatasetMeta(r);if(!o)throw new Error("No dataset found at index "+r);return{datasetIndex:r,element:o.data[s],index:s}});!ga(i,A)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,A))}notifyPlugins(e,A,i){return this._plugins.notify(this,e,A,i)}isPluginEnabled(e){return this._plugins._cache.filter(A=>A.plugin.id===e).length===1}_updateHoverStyles(e,A,i){const n=this.options.hover,r=(a,l)=>a.filter(u=>!l.some(c=>u.datasetIndex===c.datasetIndex&&u.index===c.index)),s=r(A,e),o=i?e:r(e,A);s.length&&this.updateHoverStyle(s,n.mode,!1),o.length&&n.mode&&this.updateHoverStyle(o,n.mode,!0)}_eventHandler(e,A){const i={event:e,replay:A,cancelable:!0,inChartArea:this.isPointInArea(e)},n=s=>(s.options.events||this.options.events).includes(e.native.type);if(this.notifyPlugins("beforeEvent",i,n)===!1)return;const r=this._handleEvent(e,A,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(e,A,i){const{_active:n=[],options:r}=this,s=A,o=this._getActiveElements(e,n,i,s),a=zH(e),l=TM(e,this._lastEvent,i,a);i&&(this._lastEvent=null,Ue(r.onHover,[e,o,this],this),a&&Ue(r.onClick,[e,o,this],this));const u=!ga(o,n);return(u||A)&&(this._active=o,this._updateHoverStyles(o,n,A)),this._lastEvent=l,u}_getActiveElements(e,A,i,n){if(e.type==="mouseout")return[];if(!i)return A;const r=this.options.hover;return this.getElementsAtEventForMode(e,r.mode,r,n)}}k(Le,"defaults",me),k(Le,"instances",Zo),k(Le,"overrides",zn),k(Le,"registry",dA),k(Le,"version",SM),k(Le,"getChart",Pm);function Rm(){return ge(Le.instances,t=>t._plugins.invalidate())}function OM(t,e,A){const{startAngle:i,x:n,y:r,outerRadius:s,innerRadius:o,options:a}=e,{borderWidth:l,borderJoinStyle:u}=a,c=Math.min(l/s,Et(i-A));if(t.beginPath(),t.arc(n,r,s-l/2,i+c/2,A-c/2),o>0){const d=Math.min(l/o,Et(i-A));t.arc(n,r,o+l/2,A-d/2,i+d/2,!0)}else{const d=Math.min(l/2,s*Et(i-A));if(u==="round")t.arc(n,r,d,A-ye/2,i+ye/2,!0);else if(u==="bevel"){const f=2*d*d,h=-f*Math.cos(A+ye/2)+n,g=-f*Math.sin(A+ye/2)+r,m=f*Math.cos(i+ye/2)+n,p=f*Math.sin(i+ye/2)+r;t.lineTo(h,g),t.lineTo(m,p)}}t.closePath(),t.moveTo(0,0),t.rect(0,0,t.canvas.width,t.canvas.height),t.clip("evenodd")}function HM(t,e,A){const{startAngle:i,pixelMargin:n,x:r,y:s,outerRadius:o,innerRadius:a}=e;let l=n/o;t.beginPath(),t.arc(r,s,o,i-l,A+l),a>n?(l=n/a,t.arc(r,s,a,A+l,i-l,!0)):t.arc(r,s,n,A+Ge,i-Ge),t.closePath(),t.clip()}function DM(t){return Hh(t,["outerStart","outerEnd","innerStart","innerEnd"])}function LM(t,e,A,i){const n=DM(t.options.borderRadius),r=(A-e)/2,s=Math.min(r,i*e/2),o=a=>{const l=(A-Math.min(r,a))*i/2;return at(a,0,Math.min(r,l))};return{outerStart:o(n.outerStart),outerEnd:o(n.outerEnd),innerStart:at(n.innerStart,0,s),innerEnd:at(n.innerEnd,0,s)}}function Yn(t,e,A,i){return{x:A+t*Math.cos(e),y:i+t*Math.sin(e)}}function _a(t,e,A,i,n,r){const{x:s,y:o,startAngle:a,pixelMargin:l,innerRadius:u}=e,c=Math.max(e.outerRadius+i+A-l,0),d=u>0?u+i+A+l:0;let f=0;const h=n-a;if(i){const Y=u>0?u-i:0,W=c>0?c-i:0,ne=(Y+W)/2,Ze=ne!==0?h*ne/(ne+i):h;f=(h-Ze)/2}const g=Math.max(.001,h*c-A/ye)/c,m=(h-g)/2,p=a+m+f,B=n-m-f,{outerStart:b,outerEnd:_,innerStart:y,innerEnd:w}=LM(e,d,c,B-p),U=c-b,F=c-_,x=p+b/U,$=B-_/F,M=d+y,z=d+w,R=p+y/M,te=B-w/z;if(t.beginPath(),r){const Y=(x+$)/2;if(t.arc(s,o,c,x,Y),t.arc(s,o,c,Y,$),_>0){const we=Yn(F,$,s,o);t.arc(we.x,we.y,_,$,B+Ge)}const W=Yn(z,B,s,o);if(t.lineTo(W.x,W.y),w>0){const we=Yn(z,te,s,o);t.arc(we.x,we.y,w,B+Ge,te+Math.PI)}const ne=(B-w/d+(p+y/d))/2;if(t.arc(s,o,d,B-w/d,ne,!0),t.arc(s,o,d,ne,p+y/d,!0),y>0){const we=Yn(M,R,s,o);t.arc(we.x,we.y,y,R+Math.PI,p-Ge)}const Ze=Yn(U,p,s,o);if(t.lineTo(Ze.x,Ze.y),b>0){const we=Yn(U,x,s,o);t.arc(we.x,we.y,b,p-Ge,x)}}else{t.moveTo(s,o);const Y=Math.cos(x)*c+s,W=Math.sin(x)*c+o;t.lineTo(Y,W);const ne=Math.cos($)*c+s,Ze=Math.sin($)*c+o;t.lineTo(ne,Ze)}t.closePath()}function MM(t,e,A,i,n){const{fullCircles:r,startAngle:s,circumference:o}=e;let a=e.endAngle;if(r){_a(t,e,A,i,a,n);for(let l=0;l<r;++l)t.fill();isNaN(o)||(a=s+(o%Ee||Ee))}return _a(t,e,A,i,a,n),t.fill(),a}function NM(t,e,A,i,n){const{fullCircles:r,startAngle:s,circumference:o,options:a}=e,{borderWidth:l,borderJoinStyle:u,borderDash:c,borderDashOffset:d,borderRadius:f}=a,h=a.borderAlign==="inner";if(!l)return;t.setLineDash(c||[]),t.lineDashOffset=d,h?(t.lineWidth=l*2,t.lineJoin=u||"round"):(t.lineWidth=l,t.lineJoin=u||"bevel");let g=e.endAngle;if(r){_a(t,e,A,i,g,n);for(let m=0;m<r;++m)t.stroke();isNaN(o)||(g=s+(o%Ee||Ee))}h&&HM(t,e,g),a.selfJoin&&g-s>=ye&&f===0&&u!=="miter"&&OM(t,e,g),r||(_a(t,e,A,i,g,n),t.stroke())}class fi extends pA{constructor(A){super();k(this,"circumference");k(this,"endAngle");k(this,"fullCircles");k(this,"innerRadius");k(this,"outerRadius");k(this,"pixelMargin");k(this,"startAngle");this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,A&&Object.assign(this,A)}inRange(A,i,n){const r=this.getProps(["x","y"],n),{angle:s,distance:o}=HC(r,{x:A,y:i}),{startAngle:a,endAngle:l,innerRadius:u,outerRadius:c,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),f=(this.options.spacing+this.options.borderWidth)/2,h=Z(d,l-a),g=jr(s,a,l)&&a!==l,m=h>=Ee||g,p=IA(o,u+f,c+f);return m&&p}getCenterPoint(A){const{x:i,y:n,startAngle:r,endAngle:s,innerRadius:o,outerRadius:a}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],A),{offset:l,spacing:u}=this.options,c=(r+s)/2,d=(o+a+u+l)/2;return{x:i+Math.cos(c)*d,y:n+Math.sin(c)*d}}tooltipPosition(A){return this.getCenterPoint(A)}draw(A){const{options:i,circumference:n}=this,r=(i.offset||0)/4,s=(i.spacing||0)/2,o=i.circular;if(this.pixelMargin=i.borderAlign==="inner"?.33:0,this.fullCircles=n>Ee?Math.floor(n/Ee):0,n===0||this.innerRadius<0||this.outerRadius<0)return;A.save();const a=(this.startAngle+this.endAngle)/2;A.translate(Math.cos(a)*r,Math.sin(a)*r);const l=1-Math.sin(Math.min(ye,n||0)),u=r*l;A.fillStyle=i.backgroundColor,A.strokeStyle=i.borderColor,MM(A,this,u,s,o),NM(A,this,u,s,o),A.restore()}}k(fi,"id","arc"),k(fi,"defaults",{borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1}),k(fi,"defaultRoutes",{backgroundColor:"backgroundColor"}),k(fi,"descriptors",{_scriptable:!0,_indexable:A=>A!=="borderDash"});function pU(t,e,A=e){t.lineCap=Z(A.borderCapStyle,e.borderCapStyle),t.setLineDash(Z(A.borderDash,e.borderDash)),t.lineDashOffset=Z(A.borderDashOffset,e.borderDashOffset),t.lineJoin=Z(A.borderJoinStyle,e.borderJoinStyle),t.lineWidth=Z(A.borderWidth,e.borderWidth),t.strokeStyle=Z(A.borderColor,e.borderColor)}function zM(t,e,A){t.lineTo(A.x,A.y)}function PM(t){return t.stepped?dD:t.tension||t.cubicInterpolationMode==="monotone"?fD:zM}function vU(t,e,A={}){const i=t.length,{start:n=0,end:r=i-1}=A,{start:s,end:o}=e,a=Math.max(n,s),l=Math.min(r,o),u=n<s&&r<s||n>o&&r>o;return{count:i,start:a,loop:e.loop,ilen:l<a&&!u?i+l-a:l-a}}function RM(t,e,A,i){const{points:n,options:r}=e,{count:s,start:o,loop:a,ilen:l}=vU(n,A,i),u=PM(r);let{move:c=!0,reverse:d}=i||{},f,h,g;for(f=0;f<=l;++f)h=n[(o+(d?l-f:f))%s],!h.skip&&(c?(t.moveTo(h.x,h.y),c=!1):u(t,g,h,d,r.stepped),g=h);return a&&(h=n[(o+(d?l:0))%s],u(t,g,h,d,r.stepped)),!!a}function KM(t,e,A,i){const n=e.points,{count:r,start:s,ilen:o}=vU(n,A,i),{move:a=!0,reverse:l}=i||{};let u=0,c=0,d,f,h,g,m,p;const B=_=>(s+(l?o-_:_))%r,b=()=>{g!==m&&(t.lineTo(u,m),t.lineTo(u,g),t.lineTo(u,p))};for(a&&(f=n[B(0)],t.moveTo(f.x,f.y)),d=0;d<=o;++d){if(f=n[B(d)],f.skip)continue;const _=f.x,y=f.y,w=_|0;w===h?(y<g?g=y:y>m&&(m=y),u=(c*u+_)/++c):(b(),t.lineTo(_,y),h=w,c=0,g=m=y),p=y}b()}function mc(t){const e=t.options,A=e.borderDash&&e.borderDash.length;return!t._decimated&&!t._loop&&!e.tension&&e.cubicInterpolationMode!=="monotone"&&!e.stepped&&!A?KM:RM}function ZM(t){return t.stepped?ZD:t.tension||t.cubicInterpolationMode==="monotone"?VD:Un}function VM(t,e,A,i){let n=e._path;n||(n=e._path=new Path2D,e.path(n,A,i)&&n.closePath()),pU(t,e.options),t.stroke(n)}function jM(t,e,A,i){const{segments:n,options:r}=e,s=mc(e);for(const o of n)pU(t,r,o.style),t.beginPath(),s(t,e,o,{start:A,end:A+i-1})&&t.closePath(),t.stroke()}const GM=typeof Path2D=="function";function WM(t,e,A,i){GM&&!e.options.segment?VM(t,e,A,i):jM(t,e,A,i)}class SA extends pA{constructor(e){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,e&&Object.assign(this,e)}updateControlPoints(e,A){const i=this.options;if((i.tension||i.cubicInterpolationMode==="monotone")&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;DD(this._points,i,e,n,A),this._pointsUpdated=!0}}set points(e){this._points=e,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=YD(this,this.options.segment))}first(){const e=this.segments,A=this.points;return e.length&&A[e[0].start]}last(){const e=this.segments,A=this.points,i=e.length;return i&&A[e[i-1].end]}interpolate(e,A){const i=this.options,n=e[A],r=this.points,s=AU(this,{property:A,start:n,end:n});if(!s.length)return;const o=[],a=ZM(i);let l,u;for(l=0,u=s.length;l<u;++l){const{start:c,end:d}=s[l],f=r[c],h=r[d];if(f===h){o.push(f);continue}const g=Math.abs((n-f[A])/(h[A]-f[A])),m=a(f,h,g,i.stepped);m[A]=e[A],o.push(m)}return o.length===1?o[0]:o}pathSegment(e,A,i){return mc(this)(e,this,A,i)}path(e,A,i){const n=this.segments,r=mc(this);let s=this._loop;A=A||0,i=i||this.points.length-A;for(const o of n)s&=r(e,this,o,{start:A,end:A+i-1});return!!s}draw(e,A,i,n){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(e.save(),WM(e,this,i,n),e.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}k(SA,"id","line"),k(SA,"defaults",{borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0}),k(SA,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"}),k(SA,"descriptors",{_scriptable:!0,_indexable:e=>e!=="borderDash"&&e!=="fill"});function Km(t,e,A,i){const n=t.options,{[A]:r}=t.getProps([A],i);return Math.abs(e-r)<n.radius+n.hitRadius}class Bi extends pA{constructor(A){super();k(this,"parsed");k(this,"skip");k(this,"stop");this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,A&&Object.assign(this,A)}inRange(A,i,n){const r=this.options,{x:s,y:o}=this.getProps(["x","y"],n);return Math.pow(A-s,2)+Math.pow(i-o,2)<Math.pow(r.hitRadius+r.radius,2)}inXRange(A,i){return Km(this,A,"x",i)}inYRange(A,i){return Km(this,A,"y",i)}getCenterPoint(A){const{x:i,y:n}=this.getProps(["x","y"],A);return{x:i,y:n}}size(A){A=A||this.options||{};let i=A.radius||0;i=Math.max(i,i&&A.hoverRadius||0);const n=i&&A.borderWidth||0;return(i+n)*2}draw(A,i){const n=this.options;this.skip||n.radius<.1||!Gr(this,i,this.size(n)/2)||(A.strokeStyle=n.borderColor,A.lineWidth=n.borderWidth,A.fillStyle=n.backgroundColor,fc(A,n,this.x,this.y))}getRange(){const A=this.options||{};return A.radius+A.hitRadius}}k(Bi,"id","point"),k(Bi,"defaults",{borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0}),k(Bi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function BU(t,e){const{x:A,y:i,base:n,width:r,height:s}=t.getProps(["x","y","base","width","height"],e);let o,a,l,u,c;return t.horizontal?(c=s/2,o=Math.min(A,n),a=Math.max(A,n),l=i-c,u=i+c):(c=r/2,o=A-c,a=A+c,l=Math.min(i,n),u=Math.max(i,n)),{left:o,top:l,right:a,bottom:u}}function jA(t,e,A,i){return t?0:at(e,A,i)}function JM(t,e,A){const i=t.options.borderWidth,n=t.borderSkipped,r=VC(i);return{t:jA(n.top,r.top,0,A),r:jA(n.right,r.right,0,e),b:jA(n.bottom,r.bottom,0,A),l:jA(n.left,r.left,0,e)}}function XM(t,e,A){const{enableBorderRadius:i}=t.getProps(["enableBorderRadius"]),n=t.options.borderRadius,r=pi(n),s=Math.min(e,A),o=t.borderSkipped,a=i||re(n);return{topLeft:jA(!a||o.top||o.left,r.topLeft,0,s),topRight:jA(!a||o.top||o.right,r.topRight,0,s),bottomLeft:jA(!a||o.bottom||o.left,r.bottomLeft,0,s),bottomRight:jA(!a||o.bottom||o.right,r.bottomRight,0,s)}}function YM(t){const e=BU(t),A=e.right-e.left,i=e.bottom-e.top,n=JM(t,A/2,i/2),r=XM(t,A/2,i/2);return{outer:{x:e.left,y:e.top,w:A,h:i,radius:r},inner:{x:e.left+n.l,y:e.top+n.t,w:A-n.l-n.r,h:i-n.t-n.b,radius:{topLeft:Math.max(0,r.topLeft-Math.max(n.t,n.l)),topRight:Math.max(0,r.topRight-Math.max(n.t,n.r)),bottomLeft:Math.max(0,r.bottomLeft-Math.max(n.b,n.l)),bottomRight:Math.max(0,r.bottomRight-Math.max(n.b,n.r))}}}}function vu(t,e,A,i){const n=e===null,r=A===null,o=t&&!(n&&r)&&BU(t,i);return o&&(n||IA(e,o.left,o.right))&&(r||IA(A,o.top,o.bottom))}function qM(t){return t.topLeft||t.topRight||t.bottomLeft||t.bottomRight}function e2(t,e){t.rect(e.x,e.y,e.w,e.h)}function Bu(t,e,A={}){const i=t.x!==A.x?-e:0,n=t.y!==A.y?-e:0,r=(t.x+t.w!==A.x+A.w?e:0)-i,s=(t.y+t.h!==A.y+A.h?e:0)-n;return{x:t.x+i,y:t.y+n,w:t.w+r,h:t.h+s,radius:t.radius}}class wi extends pA{constructor(e){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,e&&Object.assign(this,e)}draw(e){const{inflateAmount:A,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:s}=YM(this),o=qM(s.radius)?Ba:e2;e.save(),(s.w!==r.w||s.h!==r.h)&&(e.beginPath(),o(e,Bu(s,A,r)),e.clip(),o(e,Bu(r,-A,s)),e.fillStyle=i,e.fill("evenodd")),e.beginPath(),o(e,Bu(r,A)),e.fillStyle=n,e.fill(),e.restore()}inRange(e,A,i){return vu(this,e,A,i)}inXRange(e,A){return vu(this,e,null,A)}inYRange(e,A){return vu(this,null,e,A)}getCenterPoint(e){const{x:A,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],e);return{x:r?(A+n)/2:A,y:r?i:(i+n)/2}}getRange(e){return e==="x"?this.width/2:this.height/2}}k(wi,"id","bar"),k(wi,"defaults",{borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0}),k(wi,"defaultRoutes",{backgroundColor:"backgroundColor",borderColor:"borderColor"});function t2(t,e,A){const i=t.segments,n=t.points,r=e.points,s=[];for(const o of i){let{start:a,end:l}=o;l=zl(a,l,n);const u=pc(A,n[a],n[l],o.loop);if(!e.segments){s.push({source:o,target:u,start:n[a],end:n[l]});continue}const c=AU(e,u);for(const d of c){const f=pc(A,r[d.start],r[d.end],d.loop),h=tU(o,n,f);for(const g of h)s.push({source:g,target:d,start:{[A]:Zm(u,f,"start",Math.max)},end:{[A]:Zm(u,f,"end",Math.min)}})}}return s}function pc(t,e,A,i){if(i)return;let n=e[t],r=A[t];return t==="angle"&&(n=Et(n),r=Et(r)),{property:t,start:n,end:r}}function A2(t,e){const{x:A=null,y:i=null}=t||{},n=e.points,r=[];return e.segments.forEach(({start:s,end:o})=>{o=zl(s,o,n);const a=n[s],l=n[o];i!==null?(r.push({x:a.x,y:i}),r.push({x:l.x,y:i})):A!==null&&(r.push({x:A,y:a.y}),r.push({x:A,y:l.y}))}),r}function zl(t,e,A){for(;e>t;e--){const i=A[e];if(!isNaN(i.x)&&!isNaN(i.y))break}return e}function Zm(t,e,A,i){return t&&e?i(t[A],e[A]):t?t[A]:e?e[A]:0}function wU(t,e){let A=[],i=!1;return je(t)?(i=!0,A=t):A=A2(t,e),A.length?new SA({points:A,options:{tension:0},_loop:i,_fullLoop:i}):null}function Vm(t){return t&&t.fill!==!1}function n2(t,e,A){let n=t[e].fill;const r=[e];let s;if(!A)return n;for(;n!==!1&&r.indexOf(n)===-1;){if(!ut(n))return n;if(s=t[n],!s)return!1;if(s.visible)return n;r.push(n),n=s.fill}return!1}function i2(t,e,A){const i=a2(t);if(re(i))return isNaN(i.value)?!1:i;let n=parseFloat(i);return ut(n)&&Math.floor(n)===n?r2(i[0],e,n,A):["origin","start","end","stack","shape"].indexOf(i)>=0&&i}function r2(t,e,A,i){return(t==="-"||t==="+")&&(A=e+A),A===e||A<0||A>=i?!1:A}function s2(t,e){let A=null;return t==="start"?A=e.bottom:t==="end"?A=e.top:re(t)?A=e.getPixelForValue(t.value):e.getBasePixel&&(A=e.getBasePixel()),A}function o2(t,e,A){let i;return t==="start"?i=A:t==="end"?i=e.options.reverse?e.min:e.max:re(t)?i=t.value:i=e.getBaseValue(),i}function a2(t){const e=t.options,A=e.fill;let i=Z(A&&A.target,A);return i===void 0&&(i=!!e.backgroundColor),i===!1||i===null?!1:i===!0?"origin":i}function l2(t){const{scale:e,index:A,line:i}=t,n=[],r=i.segments,s=i.points,o=u2(e,A);o.push(wU({x:null,y:e.bottom},i));for(let a=0;a<r.length;a++){const l=r[a];for(let u=l.start;u<=l.end;u++)c2(n,s[u],o)}return new SA({points:n,options:{}})}function u2(t,e){const A=[],i=t.getMatchingVisibleMetas("line");for(let n=0;n<i.length;n++){const r=i[n];if(r.index===e)break;r.hidden||A.unshift(r.dataset)}return A}function c2(t,e,A){const i=[];for(let n=0;n<A.length;n++){const r=A[n],{first:s,last:o,point:a}=d2(r,e,"x");if(!(!a||s&&o)){if(s)i.unshift(a);else if(t.push(a),!o)break}}t.push(...i)}function d2(t,e,A){const i=t.interpolate(e,A);if(!i)return{};const n=i[A],r=t.segments,s=t.points;let o=!1,a=!1;for(let l=0;l<r.length;l++){const u=r[l],c=s[u.start][A],d=s[u.end][A];if(IA(n,c,d)){o=n===c,a=n===d;break}}return{first:o,last:a,point:i}}class yU{constructor(e){this.x=e.x,this.y=e.y,this.radius=e.radius}pathSegment(e,A,i){const{x:n,y:r,radius:s}=this;return A=A||{start:0,end:Ee},e.arc(n,r,s,A.end,A.start,!0),!i.bounds}interpolate(e){const{x:A,y:i,radius:n}=this,r=e.angle;return{x:A+Math.cos(r)*n,y:i+Math.sin(r)*n,angle:r}}}function f2(t){const{chart:e,fill:A,line:i}=t;if(ut(A))return h2(e,A);if(A==="stack")return l2(t);if(A==="shape")return!0;const n=g2(t);return n instanceof yU?n:wU(n,i)}function h2(t,e){const A=t.getDatasetMeta(e);return A&&t.isDatasetVisible(e)?A.dataset:null}function g2(t){return(t.scale||{}).getPointPositionForValue?p2(t):m2(t)}function m2(t){const{scale:e={},fill:A}=t,i=s2(A,e);if(ut(i)){const n=e.isHorizontal();return{x:n?i:null,y:n?null:i}}return null}function p2(t){const{scale:e,fill:A}=t,i=e.options,n=e.getLabels().length,r=i.reverse?e.max:e.min,s=o2(A,e,r),o=[];if(i.grid.circular){const a=e.getPointPositionForValue(0,r);return new yU({x:a.x,y:a.y,radius:e.getDistanceFromCenterForValue(s)})}for(let a=0;a<n;++a)o.push(e.getPointPositionForValue(a,s));return o}function wu(t,e,A){const i=f2(e),{chart:n,index:r,line:s,scale:o,axis:a}=e,l=s.options,u=l.fill,c=l.backgroundColor,{above:d=c,below:f=c}=u||{},h=n.getDatasetMeta(r),g=nU(n,h);i&&s.points.length&&(Hs(t,A),v2(t,{line:s,target:i,above:d,below:f,area:A,scale:o,axis:a,clip:g}),Ds(t))}function v2(t,e){const{line:A,target:i,above:n,below:r,area:s,scale:o,clip:a}=e,l=A._loop?"angle":e.axis;t.save();let u=r;r!==n&&(l==="x"?(jm(t,i,s.top),yu(t,{line:A,target:i,color:n,scale:o,property:l,clip:a}),t.restore(),t.save(),jm(t,i,s.bottom)):l==="y"&&(Gm(t,i,s.left),yu(t,{line:A,target:i,color:r,scale:o,property:l,clip:a}),t.restore(),t.save(),Gm(t,i,s.right),u=n)),yu(t,{line:A,target:i,color:u,scale:o,property:l,clip:a}),t.restore()}function jm(t,e,A){const{segments:i,points:n}=e;let r=!0,s=!1;t.beginPath();for(const o of i){const{start:a,end:l}=o,u=n[a],c=n[zl(a,l,n)];r?(t.moveTo(u.x,u.y),r=!1):(t.lineTo(u.x,A),t.lineTo(u.x,u.y)),s=!!e.pathSegment(t,o,{move:s}),s?t.closePath():t.lineTo(c.x,A)}t.lineTo(e.first().x,A),t.closePath(),t.clip()}function Gm(t,e,A){const{segments:i,points:n}=e;let r=!0,s=!1;t.beginPath();for(const o of i){const{start:a,end:l}=o,u=n[a],c=n[zl(a,l,n)];r?(t.moveTo(u.x,u.y),r=!1):(t.lineTo(A,u.y),t.lineTo(u.x,u.y)),s=!!e.pathSegment(t,o,{move:s}),s?t.closePath():t.lineTo(A,c.y)}t.lineTo(A,e.first().y),t.closePath(),t.clip()}function yu(t,e){const{line:A,target:i,property:n,color:r,scale:s,clip:o}=e,a=t2(A,i,n);for(const{source:l,target:u,start:c,end:d}of a){const{style:{backgroundColor:f=r}={}}=l,h=i!==!0;t.save(),t.fillStyle=f,B2(t,s,o,h&&pc(n,c,d)),t.beginPath();const g=!!A.pathSegment(t,l);let m;if(h){g?t.closePath():Wm(t,i,d,n);const p=!!i.pathSegment(t,u,{move:g,reverse:!0});m=g&&p,m||Wm(t,i,c,n)}t.closePath(),t.fill(m?"evenodd":"nonzero"),t.restore()}}function B2(t,e,A,i){const n=e.chart.chartArea,{property:r,start:s,end:o}=i||{};if(r==="x"||r==="y"){let a,l,u,c;r==="x"?(a=s,l=n.top,u=o,c=n.bottom):(a=n.left,l=s,u=n.right,c=o),t.beginPath(),A&&(a=Math.max(a,A.left),u=Math.min(u,A.right),l=Math.max(l,A.top),c=Math.min(c,A.bottom)),t.rect(a,l,u-a,c-l),t.clip()}}function Wm(t,e,A,i){const n=e.interpolate(A,i);n&&t.lineTo(n.x,n.y)}var bU={id:"filler",afterDatasetsUpdate(t,e,A){const i=(t.data.datasets||[]).length,n=[];let r,s,o,a;for(s=0;s<i;++s)r=t.getDatasetMeta(s),o=r.dataset,a=null,o&&o.options&&o instanceof SA&&(a={visible:t.isDatasetVisible(s),index:s,fill:i2(o,s,i),chart:t,axis:r.controller.options.indexAxis,scale:r.vScale,line:o}),r.$filler=a,n.push(a);for(s=0;s<i;++s)a=n[s],!(!a||a.fill===!1)&&(a.fill=n2(n,s,A.propagate))},beforeDraw(t,e,A){const i=A.drawTime==="beforeDraw",n=t.getSortedVisibleDatasetMetas(),r=t.chartArea;for(let s=n.length-1;s>=0;--s){const o=n[s].$filler;o&&(o.line.updateControlPoints(r,o.axis),i&&o.fill&&wu(t.ctx,o,r))}},beforeDatasetsDraw(t,e,A){if(A.drawTime!=="beforeDatasetsDraw")return;const i=t.getSortedVisibleDatasetMetas();for(let n=i.length-1;n>=0;--n){const r=i[n].$filler;Vm(r)&&wu(t.ctx,r,t.chartArea)}},beforeDatasetDraw(t,e,A){const i=e.meta.$filler;!Vm(i)||A.drawTime!=="beforeDatasetDraw"||wu(t.ctx,i,t.chartArea)},defaults:{propagate:!0,drawTime:"beforeDatasetDraw"}};const Jm=(t,e)=>{let{boxHeight:A=e,boxWidth:i=e}=t;return t.usePointStyle&&(A=Math.min(A,e),i=t.pointStyleWidth||Math.min(i,e)),{boxWidth:i,boxHeight:A,itemHeight:Math.max(e,A)}},w2=(t,e)=>t!==null&&e!==null&&t.datasetIndex===e.datasetIndex&&t.index===e.index;class Xm extends pA{constructor(e){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=e.chart,this.options=e.options,this.ctx=e.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(e,A,i){this.maxWidth=e,this.maxHeight=A,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const e=this.options.labels||{};let A=Ue(e.generateLabels,[this.chart],this)||[];e.filter&&(A=A.filter(i=>e.filter(i,this.chart.data))),e.sort&&(A=A.sort((i,n)=>e.sort(i,n,this.chart.data))),this.options.reverse&&A.reverse(),this.legendItems=A}fit(){const{options:e,ctx:A}=this;if(!e.display){this.width=this.height=0;return}const i=e.labels,n=xt(i.font),r=n.size,s=this._computeTitleHeight(),{boxWidth:o,itemHeight:a}=Jm(i,r);let l,u;A.font=n.string,this.isHorizontal()?(l=this.maxWidth,u=this._fitRows(s,r,o,a)+10):(u=this.maxHeight,l=this._fitCols(s,n,o,a)+10),this.width=Math.min(l,e.maxWidth||this.maxWidth),this.height=Math.min(u,e.maxHeight||this.maxHeight)}_fitRows(e,A,i,n){const{ctx:r,maxWidth:s,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.lineWidths=[0],u=n+o;let c=e;r.textAlign="left",r.textBaseline="middle";let d=-1,f=-u;return this.legendItems.forEach((h,g)=>{const m=i+A/2+r.measureText(h.text).width;(g===0||l[l.length-1]+m+2*o>s)&&(c+=u,l[l.length-(g>0?0:1)]=0,f+=u,d++),a[g]={left:0,top:f,row:d,width:m,height:n},l[l.length-1]+=m+o}),c}_fitCols(e,A,i,n){const{ctx:r,maxHeight:s,options:{labels:{padding:o}}}=this,a=this.legendHitBoxes=[],l=this.columnSizes=[],u=s-e;let c=o,d=0,f=0,h=0,g=0;return this.legendItems.forEach((m,p)=>{const{itemWidth:B,itemHeight:b}=y2(i,A,r,m,n);p>0&&f+b+2*o>u&&(c+=d+o,l.push({width:d,height:f}),h+=d+o,g++,d=f=0),a[p]={left:h,top:f,col:g,width:B,height:b},d=Math.max(d,B),f+=b+o}),c+=d,l.push({width:d,height:f}),c}adjustHitBoxes(){if(!this.options.display)return;const e=this._computeTitleHeight(),{legendHitBoxes:A,options:{align:i,labels:{padding:n},rtl:r}}=this,s=vi(r,this.left,this.width);if(this.isHorizontal()){let o=0,a=St(i,this.left+n,this.right-this.lineWidths[o]);for(const l of A)o!==l.row&&(o=l.row,a=St(i,this.left+n,this.right-this.lineWidths[o])),l.top+=this.top+e+n,l.left=s.leftForLtr(s.x(a),l.width),a+=l.width+n}else{let o=0,a=St(i,this.top+e+n,this.bottom-this.columnSizes[o].height);for(const l of A)l.col!==o&&(o=l.col,a=St(i,this.top+e+n,this.bottom-this.columnSizes[o].height)),l.top=a,l.left+=this.left+n,l.left=s.leftForLtr(s.x(l.left),l.width),a+=l.height+n}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const e=this.ctx;Hs(e,this),this._draw(),Ds(e)}}_draw(){const{options:e,columnSizes:A,lineWidths:i,ctx:n}=this,{align:r,labels:s}=e,o=me.color,a=vi(e.rtl,this.left,this.width),l=xt(s.font),{padding:u}=s,c=l.size,d=c/2;let f;this.drawTitle(),n.textAlign=a.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:h,boxHeight:g,itemHeight:m}=Jm(s,c),p=function(w,U,F){if(isNaN(h)||h<=0||isNaN(g)||g<0)return;n.save();const x=Z(F.lineWidth,1);if(n.fillStyle=Z(F.fillStyle,o),n.lineCap=Z(F.lineCap,"butt"),n.lineDashOffset=Z(F.lineDashOffset,0),n.lineJoin=Z(F.lineJoin,"miter"),n.lineWidth=x,n.strokeStyle=Z(F.strokeStyle,o),n.setLineDash(Z(F.lineDash,[])),s.usePointStyle){const $={radius:g*Math.SQRT2/2,pointStyle:F.pointStyle,rotation:F.rotation,borderWidth:x},M=a.xPlus(w,h/2),z=U+d;ZC(n,$,M,z,s.pointStyleWidth&&h)}else{const $=U+Math.max((c-g)/2,0),M=a.leftForLtr(w,h),z=pi(F.borderRadius);n.beginPath(),Object.values(z).some(R=>R!==0)?Ba(n,{x:M,y:$,w:h,h:g,radius:z}):n.rect(M,$,h,g),n.fill(),x!==0&&n.stroke()}n.restore()},B=function(w,U,F){va(n,F.text,w,U+m/2,l,{strikethrough:F.hidden,textAlign:a.textAlign(F.textAlign)})},b=this.isHorizontal(),_=this._computeTitleHeight();b?f={x:St(r,this.left+u,this.right-i[0]),y:this.top+u+_,line:0}:f={x:this.left+u,y:St(r,this.top+_+u,this.bottom-A[0].height),line:0},YC(this.ctx,e.textDirection);const y=m+u;this.legendItems.forEach((w,U)=>{n.strokeStyle=w.fontColor,n.fillStyle=w.fontColor;const F=n.measureText(w.text).width,x=a.textAlign(w.textAlign||(w.textAlign=s.textAlign)),$=h+d+F;let M=f.x,z=f.y;a.setWidth(this.width),b?U>0&&M+$+u>this.right&&(z=f.y+=y,f.line++,M=f.x=St(r,this.left+u,this.right-i[f.line])):U>0&&z+y>this.bottom&&(M=f.x=M+A[f.line].width+u,f.line++,z=f.y=St(r,this.top+_+u,this.bottom-A[f.line].height));const R=a.x(M);if(p(R,z,w),M=tD(x,M+h+d,b?M+$:this.right,e.rtl),B(a.x(M),z,w),b)f.x+=$+u;else if(typeof w.text!="string"){const te=l.lineHeight;f.y+=_U(w,te)+u}else f.y+=y}),qC(this.ctx,e.textDirection)}drawTitle(){const e=this.options,A=e.title,i=xt(A.font),n=sA(A.padding);if(!A.display)return;const r=vi(e.rtl,this.left,this.width),s=this.ctx,o=A.position,a=i.size/2,l=n.top+a;let u,c=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+l,c=St(e.align,c,this.right-d);else{const h=this.columnSizes.reduce((g,m)=>Math.max(g,m.height),0);u=l+St(e.align,this.top,this.bottom-h-e.labels.padding-this._computeTitleHeight())}const f=St(o,c,c+d);s.textAlign=r.textAlign(zC(o)),s.textBaseline="middle",s.strokeStyle=A.color,s.fillStyle=A.color,s.font=i.string,va(s,A.text,f,u,i)}_computeTitleHeight(){const e=this.options.title,A=xt(e.font),i=sA(e.padding);return e.display?A.lineHeight+i.height:0}_getLegendItemAt(e,A){let i,n,r;if(IA(e,this.left,this.right)&&IA(A,this.top,this.bottom)){for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(n=r[i],IA(e,n.left,n.left+n.width)&&IA(A,n.top,n.top+n.height))return this.legendItems[i]}return null}handleEvent(e){const A=this.options;if(!C2(e.type,A))return;const i=this._getLegendItemAt(e.x,e.y);if(e.type==="mousemove"||e.type==="mouseout"){const n=this._hoveredItem,r=w2(n,i);n&&!r&&Ue(A.onLeave,[e,n,this],this),this._hoveredItem=i,i&&!r&&Ue(A.onHover,[e,i,this],this)}else i&&Ue(A.onClick,[e,i,this],this)}}function y2(t,e,A,i,n){const r=b2(i,t,e,A),s=_2(n,i,e.lineHeight);return{itemWidth:r,itemHeight:s}}function b2(t,e,A,i){let n=t.text;return n&&typeof n!="string"&&(n=n.reduce((r,s)=>r.length>s.length?r:s)),e+A.size/2+i.measureText(n).width}function _2(t,e,A){let i=t;return typeof e.text!="string"&&(i=_U(e,A)),i}function _U(t,e){const A=t.text?t.text.length:0;return e*A}function C2(t,e){return!!((t==="mousemove"||t==="mouseout")&&(e.onHover||e.onLeave)||e.onClick&&(t==="click"||t==="mouseup"))}var Ki={id:"legend",_element:Xm,start(t,e,A){const i=t.legend=new Xm({ctx:t.ctx,options:A,chart:t});VA.configure(t,i,A),VA.addBox(t,i)},stop(t){VA.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,A){const i=t.legend;VA.configure(t,i,A),i.options=A},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,A){const i=e.datasetIndex,n=A.chart;n.isDatasetVisible(i)?(n.hide(i),e.hidden=!0):(n.show(i),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:A,pointStyle:i,textAlign:n,color:r,useBorderRadius:s,borderRadius:o}}=t.legend.options;return t._getSortedDatasetMetas().map(a=>{const l=a.controller.getStyle(A?0:void 0),u=sA(l.borderWidth);return{text:e[a.index].label,fillStyle:l.backgroundColor,fontColor:r,hidden:!a.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:l.borderColor,pointStyle:i||l.pointStyle,rotation:l.rotation,textAlign:n||l.textAlign,borderRadius:s&&(o||l.borderRadius),datasetIndex:a.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};const hr={average(t){if(!t.length)return!1;let e,A,i=new Set,n=0,r=0;for(e=0,A=t.length;e<A;++e){const o=t[e].element;if(o&&o.hasValue()){const a=o.tooltipPosition();i.add(a.x),n+=a.y,++r}}return r===0||i.size===0?!1:{x:[...i].reduce((o,a)=>o+a)/i.size,y:n/r}},nearest(t,e){if(!t.length)return!1;let A=e.x,i=e.y,n=Number.POSITIVE_INFINITY,r,s,o;for(r=0,s=t.length;r<s;++r){const a=t[r].element;if(a&&a.hasValue()){const l=a.getCenterPoint(),u=cc(e,l);u<n&&(n=u,o=a)}}if(o){const a=o.tooltipPosition();A=a.x,i=a.y}return{x:A,y:i}}};function cA(t,e){return e&&(je(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function UA(t){return(typeof t=="string"||t instanceof String)&&t.indexOf(`
|
|
121
121
|
`)>-1?t.split(`
|
|
122
|
-
`):t}function X4(t,e){const{element:n,datasetIndex:r,index:i}=e,s=t.getDatasetMeta(r).controller,{label:o,value:a}=s.getLabelAndValue(i);return{chart:t,label:o,parsed:s.getParsed(i),raw:t.data.datasets[r].data[i],formattedValue:a,dataset:s.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function Oh(t,e){const n=t.chart.ctx,{body:r,footer:i,title:s}=t,{boxWidth:o,boxHeight:a}=e,l=tt(e.bodyFont),u=tt(e.titleFont),c=tt(e.footerFont),d=s.length,f=i.length,h=r.length,m=Ot(e.padding);let p=m.height,g=0,b=r.reduce((w,_)=>w+_.before.length+_.lines.length+_.after.length,0);if(b+=t.beforeBody.length+t.afterBody.length,d&&(p+=d*u.lineHeight+(d-1)*e.titleSpacing+e.titleMarginBottom),b){const w=e.displayColors?Math.max(a,l.lineHeight):l.lineHeight;p+=h*w+(b-h)*l.lineHeight+(b-1)*e.bodySpacing}f&&(p+=e.footerMarginTop+f*c.lineHeight+(f-1)*e.footerSpacing);let k=0;const $=function(w){g=Math.max(g,n.measureText(w).width+k)};return n.save(),n.font=u.string,ae(t.title,$),n.font=l.string,ae(t.beforeBody.concat(t.afterBody),$),k=e.displayColors?o+2+e.boxPadding:0,ae(r,w=>{ae(w.before,$),ae(w.lines,$),ae(w.after,$)}),k=0,n.font=c.string,ae(t.footer,$),n.restore(),g+=m.width,{width:g,height:p}}function Q4(t,e){const{y:n,height:r}=e;return n<r/2?"top":n>t.height-r/2?"bottom":"center"}function eC(t,e,n,r){const{x:i,width:s}=r,o=n.caretSize+n.caretPadding;if(t==="left"&&i+s+o>e.width||t==="right"&&i-s-o<0)return!0}function tC(t,e,n,r){const{x:i,width:s}=n,{width:o,chartArea:{left:a,right:l}}=t;let u="center";return r==="center"?u=i<=(a+l)/2?"left":"right":i<=s/2?u="left":i>=o-s/2&&(u="right"),eC(u,t,e,n)&&(u="center"),u}function Th(t,e,n){const r=n.yAlign||e.yAlign||Q4(t,n);return{xAlign:n.xAlign||e.xAlign||tC(t,e,n,r),yAlign:r}}function nC(t,e){let{x:n,width:r}=t;return e==="right"?n-=r:e==="center"&&(n-=r/2),n}function iC(t,e,n){let{y:r,height:i}=t;return e==="top"?r+=n:e==="bottom"?r-=i+n:r-=i/2,r}function Dh(t,e,n,r){const{caretSize:i,caretPadding:s,cornerRadius:o}=t,{xAlign:a,yAlign:l}=n,u=i+s,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=li(o);let m=nC(e,a);const p=iC(e,l,u);return l==="center"?a==="left"?m+=u:a==="right"&&(m-=u):a==="left"?m-=Math.max(c,f)+i:a==="right"&&(m+=Math.max(d,h)+i),{x:He(m,0,r.width-e.width),y:He(p,0,r.height-e.height)}}function Cs(t,e,n){const r=Ot(n.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-r.right:t.x+r.left}function Ph(t){return Pt([],jt(t))}function rC(t,e,n){return Bn(t,{tooltip:e,tooltipItems:n,type:"tooltip"})}function Eh(t,e){const n=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return n?t.override(n):t}const t$={beforeTitle:At,title(t){if(t.length>0){const e=t[0],n=e.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(r>0&&e.dataIndex<r)return n[e.dataIndex]}return""},afterTitle:At,beforeBody:At,beforeLabel:At,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const n=t.formattedValue;return ne(n)||(e+=n),e},labelColor(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const n=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:At,afterBody:At,beforeFooter:At,footer:At,afterFooter:At};function Ke(t,e,n,r){const i=t[e].call(n,r);return typeof i>"u"?t$[e].call(n,r):i}class zl extends Ct{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,s=new Ck(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(s)),s}getContext(){return this.$context||(this.$context=rC(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,n){const{callbacks:r}=n,i=Ke(r,"beforeTitle",this,e),s=Ke(r,"title",this,e),o=Ke(r,"afterTitle",this,e);let a=[];return a=Pt(a,jt(i)),a=Pt(a,jt(s)),a=Pt(a,jt(o)),a}getBeforeBody(e,n){return Ph(Ke(n.callbacks,"beforeBody",this,e))}getBody(e,n){const{callbacks:r}=n,i=[];return ae(e,s=>{const o={before:[],lines:[],after:[]},a=Eh(r,s);Pt(o.before,jt(Ke(a,"beforeLabel",this,s))),Pt(o.lines,Ke(a,"label",this,s)),Pt(o.after,jt(Ke(a,"afterLabel",this,s))),i.push(o)}),i}getAfterBody(e,n){return Ph(Ke(n.callbacks,"afterBody",this,e))}getFooter(e,n){const{callbacks:r}=n,i=Ke(r,"beforeFooter",this,e),s=Ke(r,"footer",this,e),o=Ke(r,"afterFooter",this,e);let a=[];return a=Pt(a,jt(i)),a=Pt(a,jt(s)),a=Pt(a,jt(o)),a}_createItems(e){const n=this._active,r=this.chart.data,i=[],s=[],o=[];let a=[],l,u;for(l=0,u=n.length;l<u;++l)a.push(X4(this.chart,n[l]));return e.filter&&(a=a.filter((c,d,f)=>e.filter(c,d,f,r))),e.itemSort&&(a=a.sort((c,d)=>e.itemSort(c,d,r))),ae(a,c=>{const d=Eh(e.callbacks,c);i.push(Ke(d,"labelColor",this,c)),s.push(Ke(d,"labelPointStyle",this,c)),o.push(Ke(d,"labelTextColor",this,c))}),this.labelColors=i,this.labelPointStyles=s,this.labelTextColors=o,this.dataPoints=a,a}update(e,n){const r=this.options.setContext(this.getContext()),i=this._active;let s,o=[];if(!i.length)this.opacity!==0&&(s={opacity:0});else{const a=er[r.position].call(this,i,this._eventPosition);o=this._createItems(r),this.title=this.getTitle(o,r),this.beforeBody=this.getBeforeBody(o,r),this.body=this.getBody(o,r),this.afterBody=this.getAfterBody(o,r),this.footer=this.getFooter(o,r);const l=this._size=Oh(this,r),u=Object.assign({},a,l),c=Th(this.chart,r,u),d=Dh(r,u,c,this.chart);this.xAlign=c.xAlign,this.yAlign=c.yAlign,s={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:a.x,caretY:a.y}}this._tooltipItems=o,this.$context=void 0,s&&this._resolveAnimations().update(this,s),e&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(e,n,r,i){const s=this.getCaretPosition(e,r,i);n.lineTo(s.x1,s.y1),n.lineTo(s.x2,s.y2),n.lineTo(s.x3,s.y3)}getCaretPosition(e,n,r){const{xAlign:i,yAlign:s}=this,{caretSize:o,cornerRadius:a}=r,{topLeft:l,topRight:u,bottomLeft:c,bottomRight:d}=li(a),{x:f,y:h}=e,{width:m,height:p}=n;let g,b,k,$,w,_;return s==="center"?(w=h+p/2,i==="left"?(g=f,b=g-o,$=w+o,_=w-o):(g=f+m,b=g+o,$=w-o,_=w+o),k=g):(i==="left"?b=f+Math.max(l,c)+o:i==="right"?b=f+m-Math.max(u,d)-o:b=this.caretX,s==="top"?($=h,w=$-o,g=b-o,k=b+o):($=h+p,w=$+o,g=b+o,k=b-o),_=$),{x1:g,x2:b,x3:k,y1:$,y2:w,y3:_}}drawTitle(e,n,r){const i=this.title,s=i.length;let o,a,l;if(s){const u=ui(r.rtl,this.x,this.width);for(e.x=Cs(this,r.titleAlign,r),n.textAlign=u.textAlign(r.titleAlign),n.textBaseline="middle",o=tt(r.titleFont),a=r.titleSpacing,n.fillStyle=r.titleColor,n.font=o.string,l=0;l<s;++l)n.fillText(i[l],u.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+a,l+1===s&&(e.y+=r.titleMarginBottom-a)}}_drawColorBox(e,n,r,i,s){const o=this.labelColors[r],a=this.labelPointStyles[r],{boxHeight:l,boxWidth:u}=s,c=tt(s.bodyFont),d=Cs(this,"left",s),f=i.x(d),h=l<c.lineHeight?(c.lineHeight-l)/2:0,m=n.y+h;if(s.usePointStyle){const p={radius:Math.min(u,l)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},g=i.leftForLtr(f,u)+u/2,b=m+l/2;e.strokeStyle=s.multiKeyBackground,e.fillStyle=s.multiKeyBackground,$l(e,p,g,b),e.strokeStyle=o.borderColor,e.fillStyle=o.backgroundColor,$l(e,p,g,b)}else{e.lineWidth=K(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,e.strokeStyle=o.borderColor,e.setLineDash(o.borderDash||[]),e.lineDashOffset=o.borderDashOffset||0;const p=i.leftForLtr(f,u),g=i.leftForLtr(i.xPlus(f,1),u-2),b=li(o.borderRadius);Object.values(b).some(k=>k!==0)?(e.beginPath(),e.fillStyle=s.multiKeyBackground,mo(e,{x:p,y:m,w:u,h:l,radius:b}),e.fill(),e.stroke(),e.fillStyle=o.backgroundColor,e.beginPath(),mo(e,{x:g,y:m+1,w:u-2,h:l-2,radius:b}),e.fill()):(e.fillStyle=s.multiKeyBackground,e.fillRect(p,m,u,l),e.strokeRect(p,m,u,l),e.fillStyle=o.backgroundColor,e.fillRect(g,m+1,u-2,l-2))}e.fillStyle=this.labelTextColors[r]}drawBody(e,n,r){const{body:i}=this,{bodySpacing:s,bodyAlign:o,displayColors:a,boxHeight:l,boxWidth:u,boxPadding:c}=r,d=tt(r.bodyFont);let f=d.lineHeight,h=0;const m=ui(r.rtl,this.x,this.width),p=function(O){n.fillText(O,m.x(e.x+h),e.y+f/2),e.y+=f+s},g=m.textAlign(o);let b,k,$,w,_,I,z;for(n.textAlign=o,n.textBaseline="middle",n.font=d.string,e.x=Cs(this,g,r),n.fillStyle=r.bodyColor,ae(this.beforeBody,p),h=a&&g!=="right"?o==="center"?u/2+c:u+2+c:0,w=0,I=i.length;w<I;++w){for(b=i[w],k=this.labelTextColors[w],n.fillStyle=k,ae(b.before,p),$=b.lines,a&&$.length&&(this._drawColorBox(n,e,w,m,r),f=Math.max(d.lineHeight,l)),_=0,z=$.length;_<z;++_)p($[_]),f=d.lineHeight;ae(b.after,p)}h=0,f=d.lineHeight,ae(this.afterBody,p),e.y-=s}drawFooter(e,n,r){const i=this.footer,s=i.length;let o,a;if(s){const l=ui(r.rtl,this.x,this.width);for(e.x=Cs(this,r.footerAlign,r),e.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",o=tt(r.footerFont),n.fillStyle=r.footerColor,n.font=o.string,a=0;a<s;++a)n.fillText(i[a],l.x(e.x),e.y+o.lineHeight/2),e.y+=o.lineHeight+r.footerSpacing}}drawBackground(e,n,r,i){const{xAlign:s,yAlign:o}=this,{x:a,y:l}=e,{width:u,height:c}=r,{topLeft:d,topRight:f,bottomLeft:h,bottomRight:m}=li(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(a+d,l),o==="top"&&this.drawCaret(e,n,r,i),n.lineTo(a+u-f,l),n.quadraticCurveTo(a+u,l,a+u,l+f),o==="center"&&s==="right"&&this.drawCaret(e,n,r,i),n.lineTo(a+u,l+c-m),n.quadraticCurveTo(a+u,l+c,a+u-m,l+c),o==="bottom"&&this.drawCaret(e,n,r,i),n.lineTo(a+h,l+c),n.quadraticCurveTo(a,l+c,a,l+c-h),o==="center"&&s==="left"&&this.drawCaret(e,n,r,i),n.lineTo(a,l+d),n.quadraticCurveTo(a,l,a+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(e){const n=this.chart,r=this.$animations,i=r&&r.x,s=r&&r.y;if(i||s){const o=er[e.position].call(this,this._active,this._eventPosition);if(!o)return;const a=this._size=Oh(this,e),l=Object.assign({},o,this._size),u=Th(n,e,l),c=Dh(e,l,u,n);(i._to!==c.x||s._to!==c.y)&&(this.xAlign=u.xAlign,this.yAlign=u.yAlign,this.width=a.width,this.height=a.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,c))}}_willRender(){return!!this.opacity}draw(e){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},s={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const o=Ot(n.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&a&&(e.save(),e.globalAlpha=r,this.drawBackground(s,e,i,n),Tk(e,n.textDirection),s.y+=o.top,this.drawTitle(s,e,n),this.drawBody(s,e,n),this.drawFooter(s,e,n),Dk(e,n.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,n){const r=this._active,i=e.map(({datasetIndex:a,index:l})=>{const u=this.chart.getDatasetMeta(a);if(!u)throw new Error("Cannot find a dataset at index "+a);return{datasetIndex:a,element:u.data[l],index:l}}),s=!uo(r,i),o=this._positionChanged(i,n);(s||o)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,s=this._active||[],o=this._getActiveElements(e,s,n,r),a=this._positionChanged(o,e),l=n||!uo(o,s)||a;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,n))),l}_getActiveElements(e,n,r,i){const s=this.options;if(e.type==="mouseout")return[];if(!i)return n.filter(a=>this.chart.data.datasets[a.datasetIndex]&&this.chart.getDatasetMeta(a.datasetIndex).controller.getParsed(a.index)!==void 0);const o=this.chart.getElementsAtEventForMode(e,s.mode,s,r);return s.reverse&&o.reverse(),o}_positionChanged(e,n){const{caretX:r,caretY:i,options:s}=this,o=er[s.position].call(this,e,n);return o!==!1&&(r!==o.x||i!==o.y)}}D(zl,"positioners",er);var Ni={id:"tooltip",_element:zl,positioners:er,afterInit(t,e,n){n&&(t.tooltip=new zl({chart:t,options:n}))},beforeUpdate(t,e,n){t.tooltip&&t.tooltip.initialize(n)},reset(t,e,n){t.tooltip&&t.tooltip.initialize(n)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const n={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",n)}},afterEvent(t,e){if(t.tooltip){const n=e.replay;t.tooltip.handleEvent(e.event,n,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:t$},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const sC=(t,e,n,r)=>(typeof e=="string"?(n=t.push(e)-1,r.unshift({index:n,label:e})):isNaN(e)&&(n=null),n);function oC(t,e,n,r){const i=t.indexOf(e);if(i===-1)return sC(t,e,n,r);const s=t.lastIndexOf(e);return i!==s?n:i}const aC=(t,e)=>t===null?null:He(Math.round(t),0,e);function Mh(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class wr extends Ei{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:s}of n)r[i]===s&&r.splice(i,1);this._addedLabels=[]}super.init(e)}parse(e,n){if(ne(e))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===e?n:oC(r,e,U(n,e),this._addedLabels),aC(n,r.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const e=this.min,n=this.max,r=this.options.offset,i=[];let s=this.getLabels();s=e===0&&n===s.length-1?s:s.slice(e,n+1),this._valueRange=Math.max(s.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let o=e;o<=n;o++)i.push({value:o});return i}getLabelForValue(e){return Mh.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const n=this.ticks;return e<0||e>n.length-1?null:this.getPixelForValue(n[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}D(wr,"id","category"),D(wr,"defaults",{ticks:{callback:Mh}});function lC(t,e){const n=[],{bounds:i,step:s,min:o,max:a,precision:l,count:u,maxTicks:c,maxDigits:d,includeBounds:f}=t,h=s||1,m=c-1,{min:p,max:g}=e,b=!ne(o),k=!ne(a),$=!ne(u),w=(g-p)/(d+1);let _=Df((g-p)/m/h)*h,I,z,O,E;if(_<1e-14&&!b&&!k)return[{value:p},{value:g}];E=Math.ceil(g/_)-Math.floor(p/_),E>m&&(_=Df(E*_/m/h)*h),ne(l)||(I=Math.pow(10,l),_=Math.ceil(_*I)/I),i==="ticks"?(z=Math.floor(p/_)*_,O=Math.ceil(g/_)*_):(z=p,O=g),b&&k&&s&&yE((a-o)/s,_/1e3)?(E=Math.round(Math.min((a-o)/_,c)),_=(a-o)/E,z=o,O=a):$?(z=b?o:z,O=k?a:O,E=u-1,_=(O-z)/E):(E=(O-z)/_,sr(E,Math.round(E),_/1e3)?E=Math.round(E):E=Math.ceil(E));const Z=Math.max(Pf(_),Pf(z));I=Math.pow(10,ne(l)?Z:l),z=Math.round(z*I)/I,O=Math.round(O*I)/I;let L=0;for(b&&(f&&z!==o?(n.push({value:o}),z<o&&L++,sr(Math.round((z+L*_)*I)/I,o,Nh(o,w,t))&&L++):z<o&&L++);L<E;++L){const B=Math.round((z+L*_)*I)/I;if(k&&B>a)break;n.push({value:B})}return k&&f&&O!==a?n.length&&sr(n[n.length-1].value,a,Nh(a,w,t))?n[n.length-1].value=a:n.push({value:a}):(!k||O===a)&&n.push({value:O}),n}function Nh(t,e,{horizontal:n,minRotation:r}){const i=Ft(r),s=(n?Math.sin(i):Math.cos(i))||.001,o=.75*e*(""+t).length;return Math.min(e/s,o)}class uC extends Ei{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,n){return ne(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:s}=this;const o=l=>i=n?i:l,a=l=>s=r?s:l;if(e){const l=Nt(i),u=Nt(s);l<0&&u<0?a(0):l>0&&u>0&&o(0)}if(i===s){let l=s===0?1:Math.abs(s*.05);a(s+l),e||o(i-l)}this.min=i,this.max=s}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=e,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,n=e.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:e.bounds,min:e.min,max:e.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},s=this._range||this,o=lC(i,s);return e.bounds==="ticks"&&_E(o,this,"value"),e.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const e=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&e.length){const i=(r-n)/Math.max(e.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(e){return yd(e,this.chart.options.locale,this.options.ticks.format)}}class Ln extends uC{determineDataLimits(){const{min:e,max:n}=this.getMinMax(!0);this.min=qe(e)?e:0,this.max=qe(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),n=e?this.width:this.height,r=Ft(this.options.ticks.minRotation),i=(e?Math.sin(r):Math.cos(r))||.001,s=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,s.lineHeight/i))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}D(Ln,"id","linear"),D(Ln,"defaults",{ticks:{callback:kk.formatters.numeric}});const Oa={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Qe=Object.keys(Oa);function Ch(t,e){return t-e}function Ah(t,e){if(ne(e))return null;const n=t._adapter,{parser:r,round:i,isoWeekday:s}=t._parseOpts;let o=e;return typeof r=="function"&&(o=r(o)),qe(o)||(o=typeof r=="string"?n.parse(o,r):n.parse(o)),o===null?null:(i&&(o=i==="week"&&(wi(s)||s===!0)?n.startOf(o,"isoWeek",s):n.startOf(o,i)),+o)}function Rh(t,e,n,r){const i=Qe.length;for(let s=Qe.indexOf(t);s<i-1;++s){const o=Oa[Qe[s]],a=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((n-e)/(a*o.size))<=r)return Qe[s]}return Qe[i-1]}function cC(t,e,n,r,i){for(let s=Qe.length-1;s>=Qe.indexOf(n);s--){const o=Qe[s];if(Oa[o].common&&t._adapter.diff(i,r,o)>=e-1)return o}return Qe[n?Qe.indexOf(n):0]}function dC(t){for(let e=Qe.indexOf(t)+1,n=Qe.length;e<n;++e)if(Oa[Qe[e]].common)return Qe[e]}function Zh(t,e,n){if(!n)t[e]=!0;else if(n.length){const{lo:r,hi:i}=vd(n,e),s=n[r]>=e?n[r]:n[i];t[s]=!0}}function fC(t,e,n,r){const i=t._adapter,s=+i.startOf(e[0].value,r),o=e[e.length-1].value;let a,l;for(a=s;a<=o;a=+i.add(a,1,r))l=n[a],l>=0&&(e[l].major=!0);return e}function jh(t,e,n){const r=[],i={},s=e.length;let o,a;for(o=0;o<s;++o)a=e[o],i[a]=o,r.push({value:a,major:!1});return s===0||!n?r:fC(t,r,i,n)}class Sr extends Ei{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,n={}){const r=e.time||(e.time={}),i=this._adapter=new Zk._date(e.adapters.date);i.init(n),rr(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(e),this._normalized=n.normalized}parse(e,n){return e===void 0?null:Ah(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,n=this._adapter,r=e.time.unit||"day";let{min:i,max:s,minDefined:o,maxDefined:a}=this.getUserBounds();function l(u){!o&&!isNaN(u.min)&&(i=Math.min(i,u.min)),!a&&!isNaN(u.max)&&(s=Math.max(s,u.max))}(!o||!a)&&(l(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=qe(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),s=qe(s)&&!isNaN(s)?s:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,s-1),this.max=Math.max(i+1,s)}_getLabelBounds(){const e=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return e.length&&(n=e[0],r=e[e.length-1]),{min:n,max:r}}buildTicks(){const e=this.options,n=e.time,r=e.ticks,i=r.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const s=this.min,o=this.max,a=SE(i,s,o);return this._unit=n.unit||(r.autoSkip?Rh(n.minUnit,this.min,this.max,this._getLabelCapacity(s)):cC(this,a.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:dC(this._unit),this.initOffsets(i),e.reverse&&a.reverse(),jh(this,a,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let n=0,r=0,i,s;this.options.offset&&e.length&&(i=this.getDecimalForValue(e[0]),e.length===1?n=1-i:n=(this.getDecimalForValue(e[1])-i)/2,s=this.getDecimalForValue(e[e.length-1]),e.length===1?r=s:r=(s-this.getDecimalForValue(e[e.length-2]))/2);const o=e.length<3?.5:.25;n=He(n,0,o),r=He(r,0,o),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const e=this._adapter,n=this.min,r=this.max,i=this.options,s=i.time,o=s.unit||Rh(s.minUnit,n,r,this._getLabelCapacity(n)),a=U(i.ticks.stepSize,1),l=o==="week"?s.isoWeekday:!1,u=wi(l)||l===!0,c={};let d=n,f,h;if(u&&(d=+e.startOf(d,"isoWeek",l)),d=+e.startOf(d,u?"day":o),e.diff(r,n,o)>1e5*a)throw new Error(n+" and "+r+" are too far apart with stepSize of "+a+" "+o);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,h=0;f<r;f=+e.add(f,a,o),h++)Zh(c,f,m);return(f===r||i.bounds==="ticks"||h===1)&&Zh(c,f,m),Object.keys(c).sort(Ch).map(p=>+p)}getLabelForValue(e){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(e,r.tooltipFormat):n.format(e,r.displayFormats.datetime)}format(e,n){const i=this.options.time.displayFormats,s=this._unit,o=n||i[s];return this._adapter.format(e,o)}_tickFormatFunction(e,n,r,i){const s=this.options,o=s.ticks.callback;if(o)return me(o,[e,n,r],this);const a=s.time.displayFormats,l=this._unit,u=this._majorUnit,c=l&&a[l],d=u&&a[u],f=r[n],h=u&&d&&f&&f.major;return this._adapter.format(e,i||(h?d:c))}generateTickLabels(e){let n,r,i;for(n=0,r=e.length;n<r;++n)i=e[n],i.label=this._tickFormatFunction(i.value,n,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const n=this._offsets,r=this.getDecimalForValue(e);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(e){const n=this.options.ticks,r=this.ctx.measureText(e).width,i=Ft(this.isHorizontal()?n.maxRotation:n.minRotation),s=Math.cos(i),o=Math.sin(i),a=this._resolveTickFontOptions(0).size;return{w:r*s+a*o,h:r*o+a*s}}_getLabelCapacity(e){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,s=this._tickFormatFunction(e,0,jh(this,[e],this._majorUnit),i),o=this._getLabelSize(s),a=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return a>0?a:1}getDataTimestamps(){let e=this._cache.data||[],n,r;if(e.length)return e;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)e=e.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let n,r;if(e.length)return e;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)e.push(Ah(this,i[n]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return pk(e.sort(Ch))}}D(Sr,"id","time"),D(Sr,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function As(t,e,n){let r=0,i=t.length-1,s,o,a,l;n?(e>=t[r].pos&&e<=t[i].pos&&({lo:r,hi:i}=Dn(t,"pos",e)),{pos:s,time:a}=t[r],{pos:o,time:l}=t[i]):(e>=t[r].time&&e<=t[i].time&&({lo:r,hi:i}=Dn(t,"time",e)),{time:s,pos:a}=t[r],{time:o,pos:l}=t[i]);const u=o-s;return u?a+(l-a)*(e-s)/u:a}class Uh extends Sr{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(e);this._minPos=As(n,this.min),this._tableRange=As(n,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:n,max:r}=this,i=[],s=[];let o,a,l,u,c;for(o=0,a=e.length;o<a;++o)u=e[o],u>=n&&u<=r&&i.push(u);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(o=0,a=i.length;o<a;++o)c=i[o+1],l=i[o-1],u=i[o],Math.round((c+l)/2)!==u&&s.push({time:u,pos:o/(a-1)});return s}_generate(){const e=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(e)||!r.length)&&r.splice(0,0,e),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,s)=>i-s)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?e=this.normalize(n.concat(r)):e=n.length?n:r,e=this._cache.all=e,e}getDecimalForValue(e){return(As(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const n=this._offsets,r=this.getDecimalForPixel(e)/n.factor-n.end;return As(this._table,r*this._tableRange+this._minPos,!0)}}D(Uh,"id","timeseries"),D(Uh,"defaults",Sr.defaults);let yo=null;function hC(t){yo=t}function mC(){return yo}async function Ci(t){if(yo)try{await yo.sendMessage({role:"user",content:[{type:"text",text:t}]})}catch(e){console.warn("Failed to send click message:",e)}}let Ol=null,Tl=null;function pC(t,e){Ol=t,Tl=e}function gC(){return!Ol||!Tl?null:{name:Ol,args:Tl}}const Ut=["#3B82F6","#10B981","#F59E0B","#8B5CF6","#F43F5E","#06B6D4","#84CC16"];function q(t){return getComputedStyle(document.documentElement).getPropertyValue(t).trim()}function on(){return{backgroundColor:q("--bg-card-2")||"#1C2333",titleColor:q("--text-primary")||"#F1F5F9",bodyColor:q("--text-secondary")||"#94A3B8",borderColor:q("--border-md")||"rgba(255,255,255,0.14)",borderWidth:1,padding:10,cornerRadius:8,displayColors:!0,boxWidth:8,boxHeight:8,titleFont:{size:12,weight:"600"},bodyFont:{size:11}}}function Ve(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function Ta(t,e){return t&&t.length>0?t:Ut}function an(t){for(const e of[300,600,1500,3e3])setTimeout(()=>{try{t.resize()}catch{}},e)}function us(t,e,n){const r=t.querySelector(".chart-card__header");if(!r)return;const i=document.createElement("button");i.className="export-btn",i.title="Download as PNG",i.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>',i.addEventListener("click",()=>{const s=document.createElement("a");s.download=`${n}.png`,s.href=e.toBase64Image(),s.click()}),r.appendChild(i)}function cs(t,e){const n=t.querySelector(".chart-card__header");if(!n)return;const r=document.createElement("button");r.className="export-btn",r.title="Refresh data",r.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></svg>',r.addEventListener("click",()=>{r.style.animation="spin 0.6s linear",r.addEventListener("animationend",()=>{r.style.animation=""},{once:!0}),e()}),n.appendChild(r)}Oe.register(si,Ni,Mi,go,Pn);function n$(t,e){const{title:n,data:r,options:i}=e,s=i.showLegend!==!1,o=i.donut===!0;t.innerHTML=`
|
|
122
|
+
`):t}function U2(t,e){const{element:A,datasetIndex:i,index:n}=e,r=t.getDatasetMeta(i).controller,{label:s,value:o}=r.getLabelAndValue(n);return{chart:t,label:s,parsed:r.getParsed(n),raw:t.data.datasets[i].data[n],formattedValue:o,dataset:r.getDataset(),dataIndex:n,datasetIndex:i,element:A}}function Ym(t,e){const A=t.chart.ctx,{body:i,footer:n,title:r}=t,{boxWidth:s,boxHeight:o}=e,a=xt(e.bodyFont),l=xt(e.titleFont),u=xt(e.footerFont),c=r.length,d=n.length,f=i.length,h=sA(e.padding);let g=h.height,m=0,p=i.reduce((_,y)=>_+y.before.length+y.lines.length+y.after.length,0);if(p+=t.beforeBody.length+t.afterBody.length,c&&(g+=c*l.lineHeight+(c-1)*e.titleSpacing+e.titleMarginBottom),p){const _=e.displayColors?Math.max(o,a.lineHeight):a.lineHeight;g+=f*_+(p-f)*a.lineHeight+(p-1)*e.bodySpacing}d&&(g+=e.footerMarginTop+d*u.lineHeight+(d-1)*e.footerSpacing);let B=0;const b=function(_){m=Math.max(m,A.measureText(_).width+B)};return A.save(),A.font=l.string,ge(t.title,b),A.font=a.string,ge(t.beforeBody.concat(t.afterBody),b),B=e.displayColors?s+2+e.boxPadding:0,ge(i,_=>{ge(_.before,b),ge(_.lines,b),ge(_.after,b)}),B=0,A.font=u.string,ge(t.footer,b),A.restore(),m+=h.width,{width:m,height:g}}function Q2(t,e){const{y:A,height:i}=e;return A<i/2?"top":A>t.height-i/2?"bottom":"center"}function x2(t,e,A,i){const{x:n,width:r}=i,s=A.caretSize+A.caretPadding;if(t==="left"&&n+r+s>e.width||t==="right"&&n-r-s<0)return!0}function F2(t,e,A,i){const{x:n,width:r}=A,{width:s,chartArea:{left:o,right:a}}=t;let l="center";return i==="center"?l=n<=(o+a)/2?"left":"right":n<=r/2?l="left":n>=s-r/2&&(l="right"),x2(l,t,e,A)&&(l="center"),l}function qm(t,e,A){const i=A.yAlign||e.yAlign||Q2(t,A);return{xAlign:A.xAlign||e.xAlign||F2(t,e,A,i),yAlign:i}}function I2(t,e){let{x:A,width:i}=t;return e==="right"?A-=i:e==="center"&&(A-=i/2),A}function S2(t,e,A){let{y:i,height:n}=t;return e==="top"?i+=A:e==="bottom"?i-=n+A:i-=n/2,i}function ep(t,e,A,i){const{caretSize:n,caretPadding:r,cornerRadius:s}=t,{xAlign:o,yAlign:a}=A,l=n+r,{topLeft:u,topRight:c,bottomLeft:d,bottomRight:f}=pi(s);let h=I2(e,o);const g=S2(e,a,l);return a==="center"?o==="left"?h+=l:o==="right"&&(h-=l):o==="left"?h-=Math.max(u,d)+n:o==="right"&&(h+=Math.max(c,f)+n),{x:at(h,0,i.width-e.width),y:at(g,0,i.height-e.height)}}function co(t,e,A){const i=sA(A.padding);return e==="center"?t.x+t.width/2:e==="right"?t.x+t.width-i.right:t.x+i.left}function tp(t){return cA([],UA(t))}function k2(t,e,A){return Gn(t,{tooltip:e,tooltipItems:A,type:"tooltip"})}function Ap(t,e){const A=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return A?t.override(A):t}const CU={beforeTitle:wA,title(t){if(t.length>0){const e=t[0],A=e.chart.data.labels,i=A?A.length:0;if(this&&this.options&&this.options.mode==="dataset")return e.dataset.label||"";if(e.label)return e.label;if(i>0&&e.dataIndex<i)return A[e.dataIndex]}return""},afterTitle:wA,beforeBody:wA,beforeLabel:wA,label(t){if(this&&this.options&&this.options.mode==="dataset")return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const A=t.formattedValue;return le(A)||(e+=A),e},labelColor(t){const A=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:A.borderColor,backgroundColor:A.backgroundColor,borderWidth:A.borderWidth,borderDash:A.borderDash,borderDashOffset:A.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const A=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:A.pointStyle,rotation:A.rotation}},afterLabel:wA,afterBody:wA,beforeFooter:wA,footer:wA,afterFooter:wA};function yt(t,e,A,i){const n=t[e].call(A,i);return typeof n>"u"?CU[e].call(A,i):n}class vc extends pA{constructor(e){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=e.chart,this.options=e.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(e){this.options=e,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const e=this._cachedAnimations;if(e)return e;const A=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&A.options.animation&&i.animations,r=new iU(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=k2(this.chart.getContext(),this,this._tooltipItems))}getTitle(e,A){const{callbacks:i}=A,n=yt(i,"beforeTitle",this,e),r=yt(i,"title",this,e),s=yt(i,"afterTitle",this,e);let o=[];return o=cA(o,UA(n)),o=cA(o,UA(r)),o=cA(o,UA(s)),o}getBeforeBody(e,A){return tp(yt(A.callbacks,"beforeBody",this,e))}getBody(e,A){const{callbacks:i}=A,n=[];return ge(e,r=>{const s={before:[],lines:[],after:[]},o=Ap(i,r);cA(s.before,UA(yt(o,"beforeLabel",this,r))),cA(s.lines,yt(o,"label",this,r)),cA(s.after,UA(yt(o,"afterLabel",this,r))),n.push(s)}),n}getAfterBody(e,A){return tp(yt(A.callbacks,"afterBody",this,e))}getFooter(e,A){const{callbacks:i}=A,n=yt(i,"beforeFooter",this,e),r=yt(i,"footer",this,e),s=yt(i,"afterFooter",this,e);let o=[];return o=cA(o,UA(n)),o=cA(o,UA(r)),o=cA(o,UA(s)),o}_createItems(e){const A=this._active,i=this.chart.data,n=[],r=[],s=[];let o=[],a,l;for(a=0,l=A.length;a<l;++a)o.push(U2(this.chart,A[a]));return e.filter&&(o=o.filter((u,c,d)=>e.filter(u,c,d,i))),e.itemSort&&(o=o.sort((u,c)=>e.itemSort(u,c,i))),ge(o,u=>{const c=Ap(e.callbacks,u);n.push(yt(c,"labelColor",this,u)),r.push(yt(c,"labelPointStyle",this,u)),s.push(yt(c,"labelTextColor",this,u))}),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=s,this.dataPoints=o,o}update(e,A){const i=this.options.setContext(this.getContext()),n=this._active;let r,s=[];if(!n.length)this.opacity!==0&&(r={opacity:0});else{const o=hr[i.position].call(this,n,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const a=this._size=Ym(this,i),l=Object.assign({},o,a),u=qm(this.chart,i,l),c=ep(i,l,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,r={opacity:1,x:c.x,y:c.y,width:a.width,height:a.height,caretX:o.x,caretY:o.y}}this._tooltipItems=s,this.$context=void 0,r&&this._resolveAnimations().update(this,r),e&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:A})}drawCaret(e,A,i,n){const r=this.getCaretPosition(e,i,n);A.lineTo(r.x1,r.y1),A.lineTo(r.x2,r.y2),A.lineTo(r.x3,r.y3)}getCaretPosition(e,A,i){const{xAlign:n,yAlign:r}=this,{caretSize:s,cornerRadius:o}=i,{topLeft:a,topRight:l,bottomLeft:u,bottomRight:c}=pi(o),{x:d,y:f}=e,{width:h,height:g}=A;let m,p,B,b,_,y;return r==="center"?(_=f+g/2,n==="left"?(m=d,p=m-s,b=_+s,y=_-s):(m=d+h,p=m+s,b=_-s,y=_+s),B=m):(n==="left"?p=d+Math.max(a,u)+s:n==="right"?p=d+h-Math.max(l,c)-s:p=this.caretX,r==="top"?(b=f,_=b-s,m=p-s,B=p+s):(b=f+g,_=b+s,m=p+s,B=p-s),y=b),{x1:m,x2:p,x3:B,y1:b,y2:_,y3:y}}drawTitle(e,A,i){const n=this.title,r=n.length;let s,o,a;if(r){const l=vi(i.rtl,this.x,this.width);for(e.x=co(this,i.titleAlign,i),A.textAlign=l.textAlign(i.titleAlign),A.textBaseline="middle",s=xt(i.titleFont),o=i.titleSpacing,A.fillStyle=i.titleColor,A.font=s.string,a=0;a<r;++a)A.fillText(n[a],l.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+o,a+1===r&&(e.y+=i.titleMarginBottom-o)}}_drawColorBox(e,A,i,n,r){const s=this.labelColors[i],o=this.labelPointStyles[i],{boxHeight:a,boxWidth:l}=r,u=xt(r.bodyFont),c=co(this,"left",r),d=n.x(c),f=a<u.lineHeight?(u.lineHeight-a)/2:0,h=A.y+f;if(r.usePointStyle){const g={radius:Math.min(l,a)/2,pointStyle:o.pointStyle,rotation:o.rotation,borderWidth:1},m=n.leftForLtr(d,l)+l/2,p=h+a/2;e.strokeStyle=r.multiKeyBackground,e.fillStyle=r.multiKeyBackground,fc(e,g,m,p),e.strokeStyle=s.borderColor,e.fillStyle=s.backgroundColor,fc(e,g,m,p)}else{e.lineWidth=re(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,e.strokeStyle=s.borderColor,e.setLineDash(s.borderDash||[]),e.lineDashOffset=s.borderDashOffset||0;const g=n.leftForLtr(d,l),m=n.leftForLtr(n.xPlus(d,1),l-2),p=pi(s.borderRadius);Object.values(p).some(B=>B!==0)?(e.beginPath(),e.fillStyle=r.multiKeyBackground,Ba(e,{x:g,y:h,w:l,h:a,radius:p}),e.fill(),e.stroke(),e.fillStyle=s.backgroundColor,e.beginPath(),Ba(e,{x:m,y:h+1,w:l-2,h:a-2,radius:p}),e.fill()):(e.fillStyle=r.multiKeyBackground,e.fillRect(g,h,l,a),e.strokeRect(g,h,l,a),e.fillStyle=s.backgroundColor,e.fillRect(m,h+1,l-2,a-2))}e.fillStyle=this.labelTextColors[i]}drawBody(e,A,i){const{body:n}=this,{bodySpacing:r,bodyAlign:s,displayColors:o,boxHeight:a,boxWidth:l,boxPadding:u}=i,c=xt(i.bodyFont);let d=c.lineHeight,f=0;const h=vi(i.rtl,this.x,this.width),g=function(F){A.fillText(F,h.x(e.x+f),e.y+d/2),e.y+=d+r},m=h.textAlign(s);let p,B,b,_,y,w,U;for(A.textAlign=s,A.textBaseline="middle",A.font=c.string,e.x=co(this,m,i),A.fillStyle=i.bodyColor,ge(this.beforeBody,g),f=o&&m!=="right"?s==="center"?l/2+u:l+2+u:0,_=0,w=n.length;_<w;++_){for(p=n[_],B=this.labelTextColors[_],A.fillStyle=B,ge(p.before,g),b=p.lines,o&&b.length&&(this._drawColorBox(A,e,_,h,i),d=Math.max(c.lineHeight,a)),y=0,U=b.length;y<U;++y)g(b[y]),d=c.lineHeight;ge(p.after,g)}f=0,d=c.lineHeight,ge(this.afterBody,g),e.y-=r}drawFooter(e,A,i){const n=this.footer,r=n.length;let s,o;if(r){const a=vi(i.rtl,this.x,this.width);for(e.x=co(this,i.footerAlign,i),e.y+=i.footerMarginTop,A.textAlign=a.textAlign(i.footerAlign),A.textBaseline="middle",s=xt(i.footerFont),A.fillStyle=i.footerColor,A.font=s.string,o=0;o<r;++o)A.fillText(n[o],a.x(e.x),e.y+s.lineHeight/2),e.y+=s.lineHeight+i.footerSpacing}}drawBackground(e,A,i,n){const{xAlign:r,yAlign:s}=this,{x:o,y:a}=e,{width:l,height:u}=i,{topLeft:c,topRight:d,bottomLeft:f,bottomRight:h}=pi(n.cornerRadius);A.fillStyle=n.backgroundColor,A.strokeStyle=n.borderColor,A.lineWidth=n.borderWidth,A.beginPath(),A.moveTo(o+c,a),s==="top"&&this.drawCaret(e,A,i,n),A.lineTo(o+l-d,a),A.quadraticCurveTo(o+l,a,o+l,a+d),s==="center"&&r==="right"&&this.drawCaret(e,A,i,n),A.lineTo(o+l,a+u-h),A.quadraticCurveTo(o+l,a+u,o+l-h,a+u),s==="bottom"&&this.drawCaret(e,A,i,n),A.lineTo(o+f,a+u),A.quadraticCurveTo(o,a+u,o,a+u-f),s==="center"&&r==="left"&&this.drawCaret(e,A,i,n),A.lineTo(o,a+c),A.quadraticCurveTo(o,a,o+c,a),A.closePath(),A.fill(),n.borderWidth>0&&A.stroke()}_updateAnimationTarget(e){const A=this.chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const s=hr[e.position].call(this,this._active,this._eventPosition);if(!s)return;const o=this._size=Ym(this,e),a=Object.assign({},s,this._size),l=qm(A,e,a),u=ep(e,a,l,A);(n._to!==u.x||r._to!==u.y)&&(this.xAlign=l.xAlign,this.yAlign=l.yAlign,this.width=o.width,this.height=o.height,this.caretX=s.x,this.caretY=s.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(e){const A=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(A);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=sA(A.padding),o=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;A.enabled&&o&&(e.save(),e.globalAlpha=i,this.drawBackground(r,e,n,A),YC(e,A.textDirection),r.y+=s.top,this.drawTitle(r,e,A),this.drawBody(r,e,A),this.drawFooter(r,e,A),qC(e,A.textDirection),e.restore())}getActiveElements(){return this._active||[]}setActiveElements(e,A){const i=this._active,n=e.map(({datasetIndex:o,index:a})=>{const l=this.chart.getDatasetMeta(o);if(!l)throw new Error("Cannot find a dataset at index "+o);return{datasetIndex:o,element:l.data[a],index:a}}),r=!ga(i,n),s=this._positionChanged(n,A);(r||s)&&(this._active=n,this._eventPosition=A,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(e,A,i=!0){if(A&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,r=this._active||[],s=this._getActiveElements(e,r,A,i),o=this._positionChanged(s,e),a=A||!ga(s,r)||o;return a&&(this._active=s,(n.enabled||n.external)&&(this._eventPosition={x:e.x,y:e.y},this.update(!0,A))),a}_getActiveElements(e,A,i,n){const r=this.options;if(e.type==="mouseout")return[];if(!n)return A.filter(o=>this.chart.data.datasets[o.datasetIndex]&&this.chart.getDatasetMeta(o.datasetIndex).controller.getParsed(o.index)!==void 0);const s=this.chart.getElementsAtEventForMode(e,r.mode,r,i);return r.reverse&&s.reverse(),s}_positionChanged(e,A){const{caretX:i,caretY:n,options:r}=this,s=hr[r.position].call(this,e,A);return s!==!1&&(i!==s.x||n!==s.y)}}k(vc,"positioners",hr);var Zi={id:"tooltip",_element:vc,positioners:hr,afterInit(t,e,A){A&&(t.tooltip=new vc({chart:t,options:A}))},beforeUpdate(t,e,A){t.tooltip&&t.tooltip.initialize(A)},reset(t,e,A){t.tooltip&&t.tooltip.initialize(A)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const A={tooltip:e};if(t.notifyPlugins("beforeTooltipDraw",{...A,cancelable:!0})===!1)return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",A)}},afterEvent(t,e){if(t.tooltip){const A=e.replay;t.tooltip.handleEvent(e.event,A,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:CU},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>t!=="filter"&&t!=="itemSort"&&t!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const E2=(t,e,A,i)=>(typeof e=="string"?(A=t.push(e)-1,i.unshift({index:A,label:e})):isNaN(e)&&(A=null),A);function $2(t,e,A,i){const n=t.indexOf(e);if(n===-1)return E2(t,e,A,i);const r=t.lastIndexOf(e);return n!==r?A:n}const T2=(t,e)=>t===null?null:at(Math.round(t),0,e);function np(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class Jr extends Ri{constructor(e){super(e),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(e){const A=this._addedLabels;if(A.length){const i=this.getLabels();for(const{index:n,label:r}of A)i[n]===r&&i.splice(n,1);this._addedLabels=[]}super.init(e)}parse(e,A){if(le(e))return null;const i=this.getLabels();return A=isFinite(A)&&i[A]===e?A:$2(i,e,Z(A,e),this._addedLabels),T2(A,i.length-1)}determineDataLimits(){const{minDefined:e,maxDefined:A}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);this.options.bounds==="ticks"&&(e||(i=0),A||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const e=this.min,A=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=e===0&&A===r.length-1?r:r.slice(e,A+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let s=e;s<=A;s++)n.push({value:s});return n}getLabelForValue(e){return np.call(this,e)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(e){return typeof e!="number"&&(e=this.parse(e)),e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getPixelForTick(e){const A=this.ticks;return e<0||e>A.length-1?null:this.getPixelForValue(A[e].value)}getValueForPixel(e){return Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange)}getBasePixel(){return this.bottom}}k(Jr,"id","category"),k(Jr,"defaults",{ticks:{callback:np}});function O2(t,e){const A=[],{bounds:n,step:r,min:s,max:o,precision:a,count:l,maxTicks:u,maxDigits:c,includeBounds:d}=t,f=r||1,h=u-1,{min:g,max:m}=e,p=!le(s),B=!le(o),b=!le(l),_=(m-g)/(c+1);let y=em((m-g)/h/f)*f,w,U,F,x;if(y<1e-14&&!p&&!B)return[{value:g},{value:m}];x=Math.ceil(m/y)-Math.floor(g/y),x>h&&(y=em(x*y/h/f)*f),le(a)||(w=Math.pow(10,a),y=Math.ceil(y*w)/w),n==="ticks"?(U=Math.floor(g/y)*y,F=Math.ceil(m/y)*y):(U=g,F=m),p&&B&&r&&VH((o-s)/r,y/1e3)?(x=Math.round(Math.min((o-s)/y,u)),y=(o-s)/x,U=s,F=o):b?(U=p?s:U,F=B?o:F,x=l-1,y=(F-U)/x):(x=(F-U)/y,Qr(x,Math.round(x),y/1e3)?x=Math.round(x):x=Math.ceil(x));const $=Math.max(tm(y),tm(U));w=Math.pow(10,le(a)?$:a),U=Math.round(U*w)/w,F=Math.round(F*w)/w;let M=0;for(p&&(d&&U!==s?(A.push({value:s}),U<s&&M++,Qr(Math.round((U+M*y)*w)/w,s,ip(s,_,t))&&M++):U<s&&M++);M<x;++M){const z=Math.round((U+M*y)*w)/w;if(B&&z>o)break;A.push({value:z})}return B&&d&&F!==o?A.length&&Qr(A[A.length-1].value,o,ip(o,_,t))?A[A.length-1].value=o:A.push({value:o}):(!B||F===o)&&A.push({value:F}),A}function ip(t,e,{horizontal:A,minRotation:i}){const n=FA(i),r=(A?Math.sin(n):Math.cos(n))||.001,s=.75*e*(""+t).length;return Math.min(e/r,s)}class H2 extends Ri{constructor(e){super(e),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(e,A){return le(e)||(typeof e=="number"||e instanceof Number)&&!isFinite(+e)?null:+e}handleTickRangeOptions(){const{beginAtZero:e}=this.options,{minDefined:A,maxDefined:i}=this.getUserBounds();let{min:n,max:r}=this;const s=a=>n=A?n:a,o=a=>r=i?r:a;if(e){const a=gA(n),l=gA(r);a<0&&l<0?o(0):a>0&&l>0&&s(0)}if(n===r){let a=r===0?1:Math.abs(r*.05);o(r+a),e||s(n-a)}this.min=n,this.max=r}getTickLimit(){const e=this.options.ticks;let{maxTicksLimit:A,stepSize:i}=e,n;return i?(n=Math.ceil(this.max/i)-Math.floor(this.min/i)+1,n>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${i} would result generating up to ${n} ticks. Limiting to 1000.`),n=1e3)):(n=this.computeTickLimit(),A=A||11),A&&(n=Math.min(A,n)),n}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const e=this.options,A=e.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n={maxTicks:i,bounds:e.bounds,min:e.min,max:e.max,precision:A.precision,step:A.stepSize,count:A.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:A.minRotation||0,includeBounds:A.includeBounds!==!1},r=this._range||this,s=O2(n,r);return e.bounds==="ticks"&&jH(s,this,"value"),e.reverse?(s.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),s}configure(){const e=this.ticks;let A=this.min,i=this.max;if(super.configure(),this.options.offset&&e.length){const n=(i-A)/Math.max(e.length-1,1)/2;A-=n,i+=n}this._startValue=A,this._endValue=i,this._valueRange=i-A}getLabelForValue(e){return Oh(e,this.chart.options.locale,this.options.ticks.format)}}class Pn extends H2{determineDataLimits(){const{min:e,max:A}=this.getMinMax(!0);this.min=ut(e)?e:0,this.max=ut(A)?A:1,this.handleTickRangeOptions()}computeTickLimit(){const e=this.isHorizontal(),A=e?this.width:this.height,i=FA(this.options.ticks.minRotation),n=(e?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(A/Math.min(40,r.lineHeight/n))}getPixelForValue(e){return e===null?NaN:this.getPixelForDecimal((e-this._startValue)/this._valueRange)}getValueForPixel(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange}}k(Pn,"id","linear"),k(Pn,"defaults",{ticks:{callback:KC.formatters.numeric}});const Pl={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Ut=Object.keys(Pl);function rp(t,e){return t-e}function sp(t,e){if(le(e))return null;const A=t._adapter,{parser:i,round:n,isoWeekday:r}=t._parseOpts;let s=e;return typeof i=="function"&&(s=i(s)),ut(s)||(s=typeof i=="string"?A.parse(s,i):A.parse(s)),s===null?null:(n&&(s=n==="week"&&(Ti(r)||r===!0)?A.startOf(s,"isoWeek",r):A.startOf(s,n)),+s)}function op(t,e,A,i){const n=Ut.length;for(let r=Ut.indexOf(t);r<n-1;++r){const s=Pl[Ut[r]],o=s.steps?s.steps:Number.MAX_SAFE_INTEGER;if(s.common&&Math.ceil((A-e)/(o*s.size))<=i)return Ut[r]}return Ut[n-1]}function D2(t,e,A,i,n){for(let r=Ut.length-1;r>=Ut.indexOf(A);r--){const s=Ut[r];if(Pl[s].common&&t._adapter.diff(n,i,s)>=e-1)return s}return Ut[A?Ut.indexOf(A):0]}function L2(t){for(let e=Ut.indexOf(t)+1,A=Ut.length;e<A;++e)if(Pl[Ut[e]].common)return Ut[e]}function ap(t,e,A){if(!A)t[e]=!0;else if(A.length){const{lo:i,hi:n}=$h(A,e),r=A[i]>=e?A[i]:A[n];t[r]=!0}}function M2(t,e,A,i){const n=t._adapter,r=+n.startOf(e[0].value,i),s=e[e.length-1].value;let o,a;for(o=r;o<=s;o=+n.add(o,1,i))a=A[o],a>=0&&(e[a].major=!0);return e}function lp(t,e,A){const i=[],n={},r=e.length;let s,o;for(s=0;s<r;++s)o=e[s],n[o]=s,i.push({value:o,major:!1});return r===0||!A?i:M2(t,i,n,A)}class Xr extends Ri{constructor(e){super(e),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(e,A={}){const i=e.time||(e.time={}),n=this._adapter=new oU._date(e.adapters.date);n.init(A),Ur(i.displayFormats,n.formats()),this._parseOpts={parser:i.parser,round:i.round,isoWeekday:i.isoWeekday},super.init(e),this._normalized=A.normalized}parse(e,A){return e===void 0?null:sp(this,e)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const e=this.options,A=this._adapter,i=e.time.unit||"day";let{min:n,max:r,minDefined:s,maxDefined:o}=this.getUserBounds();function a(l){!s&&!isNaN(l.min)&&(n=Math.min(n,l.min)),!o&&!isNaN(l.max)&&(r=Math.max(r,l.max))}(!s||!o)&&(a(this._getLabelBounds()),(e.bounds!=="ticks"||e.ticks.source!=="labels")&&a(this.getMinMax(!1))),n=ut(n)&&!isNaN(n)?n:+A.startOf(Date.now(),i),r=ut(r)&&!isNaN(r)?r:+A.endOf(Date.now(),i)+1,this.min=Math.min(n,r-1),this.max=Math.max(n+1,r)}_getLabelBounds(){const e=this.getLabelTimestamps();let A=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY;return e.length&&(A=e[0],i=e[e.length-1]),{min:A,max:i}}buildTicks(){const e=this.options,A=e.time,i=e.ticks,n=i.source==="labels"?this.getLabelTimestamps():this._generate();e.bounds==="ticks"&&n.length&&(this.min=this._userMin||n[0],this.max=this._userMax||n[n.length-1]);const r=this.min,s=this.max,o=YH(n,r,s);return this._unit=A.unit||(i.autoSkip?op(A.minUnit,this.min,this.max,this._getLabelCapacity(r)):D2(this,o.length,A.minUnit,this.min,this.max)),this._majorUnit=!i.major.enabled||this._unit==="year"?void 0:L2(this._unit),this.initOffsets(n),e.reverse&&o.reverse(),lp(this,o,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(e=>+e.value))}initOffsets(e=[]){let A=0,i=0,n,r;this.options.offset&&e.length&&(n=this.getDecimalForValue(e[0]),e.length===1?A=1-n:A=(this.getDecimalForValue(e[1])-n)/2,r=this.getDecimalForValue(e[e.length-1]),e.length===1?i=r:i=(r-this.getDecimalForValue(e[e.length-2]))/2);const s=e.length<3?.5:.25;A=at(A,0,s),i=at(i,0,s),this._offsets={start:A,end:i,factor:1/(A+1+i)}}_generate(){const e=this._adapter,A=this.min,i=this.max,n=this.options,r=n.time,s=r.unit||op(r.minUnit,A,i,this._getLabelCapacity(A)),o=Z(n.ticks.stepSize,1),a=s==="week"?r.isoWeekday:!1,l=Ti(a)||a===!0,u={};let c=A,d,f;if(l&&(c=+e.startOf(c,"isoWeek",a)),c=+e.startOf(c,l?"day":s),e.diff(i,A,s)>1e5*o)throw new Error(A+" and "+i+" are too far apart with stepSize of "+o+" "+s);const h=n.ticks.source==="data"&&this.getDataTimestamps();for(d=c,f=0;d<i;d=+e.add(d,o,s),f++)ap(u,d,h);return(d===i||n.bounds==="ticks"||f===1)&&ap(u,d,h),Object.keys(u).sort(rp).map(g=>+g)}getLabelForValue(e){const A=this._adapter,i=this.options.time;return i.tooltipFormat?A.format(e,i.tooltipFormat):A.format(e,i.displayFormats.datetime)}format(e,A){const n=this.options.time.displayFormats,r=this._unit,s=A||n[r];return this._adapter.format(e,s)}_tickFormatFunction(e,A,i,n){const r=this.options,s=r.ticks.callback;if(s)return Ue(s,[e,A,i],this);const o=r.time.displayFormats,a=this._unit,l=this._majorUnit,u=a&&o[a],c=l&&o[l],d=i[A],f=l&&c&&d&&d.major;return this._adapter.format(e,n||(f?c:u))}generateTickLabels(e){let A,i,n;for(A=0,i=e.length;A<i;++A)n=e[A],n.label=this._tickFormatFunction(n.value,A,e)}getDecimalForValue(e){return e===null?NaN:(e-this.min)/(this.max-this.min)}getPixelForValue(e){const A=this._offsets,i=this.getDecimalForValue(e);return this.getPixelForDecimal((A.start+i)*A.factor)}getValueForPixel(e){const A=this._offsets,i=this.getDecimalForPixel(e)/A.factor-A.end;return this.min+i*(this.max-this.min)}_getLabelSize(e){const A=this.options.ticks,i=this.ctx.measureText(e).width,n=FA(this.isHorizontal()?A.maxRotation:A.minRotation),r=Math.cos(n),s=Math.sin(n),o=this._resolveTickFontOptions(0).size;return{w:i*r+o*s,h:i*s+o*r}}_getLabelCapacity(e){const A=this.options.time,i=A.displayFormats,n=i[A.unit]||i.millisecond,r=this._tickFormatFunction(e,0,lp(this,[e],this._majorUnit),n),s=this._getLabelSize(r),o=Math.floor(this.isHorizontal()?this.width/s.w:this.height/s.h)-1;return o>0?o:1}getDataTimestamps(){let e=this._cache.data||[],A,i;if(e.length)return e;const n=this.getMatchingVisibleMetas();if(this._normalized&&n.length)return this._cache.data=n[0].controller.getAllParsedValues(this);for(A=0,i=n.length;A<i;++A)e=e.concat(n[A].controller.getAllParsedValues(this));return this._cache.data=this.normalize(e)}getLabelTimestamps(){const e=this._cache.labels||[];let A,i;if(e.length)return e;const n=this.getLabels();for(A=0,i=n.length;A<i;++A)e.push(sp(this,n[A]));return this._cache.labels=this._normalized?e:this.normalize(e)}normalize(e){return LC(e.sort(rp))}}k(Xr,"id","time"),k(Xr,"defaults",{bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}});function fo(t,e,A){let i=0,n=t.length-1,r,s,o,a;A?(e>=t[i].pos&&e<=t[n].pos&&({lo:i,hi:n}=Fn(t,"pos",e)),{pos:r,time:o}=t[i],{pos:s,time:a}=t[n]):(e>=t[i].time&&e<=t[n].time&&({lo:i,hi:n}=Fn(t,"time",e)),{time:r,pos:o}=t[i],{time:s,pos:a}=t[n]);const l=s-r;return l?o+(a-o)*(e-r)/l:o}class up extends Xr{constructor(e){super(e),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const e=this._getTimestampsForTable(),A=this._table=this.buildLookupTable(e);this._minPos=fo(A,this.min),this._tableRange=fo(A,this.max)-this._minPos,super.initOffsets(e)}buildLookupTable(e){const{min:A,max:i}=this,n=[],r=[];let s,o,a,l,u;for(s=0,o=e.length;s<o;++s)l=e[s],l>=A&&l<=i&&n.push(l);if(n.length<2)return[{time:A,pos:0},{time:i,pos:1}];for(s=0,o=n.length;s<o;++s)u=n[s+1],a=n[s-1],l=n[s],Math.round((u+a)/2)!==l&&r.push({time:l,pos:s/(o-1)});return r}_generate(){const e=this.min,A=this.max;let i=super.getDataTimestamps();return(!i.includes(e)||!i.length)&&i.splice(0,0,e),(!i.includes(A)||i.length===1)&&i.push(A),i.sort((n,r)=>n-r)}_getTimestampsForTable(){let e=this._cache.all||[];if(e.length)return e;const A=this.getDataTimestamps(),i=this.getLabelTimestamps();return A.length&&i.length?e=this.normalize(A.concat(i)):e=A.length?A:i,e=this._cache.all=e,e}getDecimalForValue(e){return(fo(this._table,e)-this._minPos)/this._tableRange}getValueForPixel(e){const A=this._offsets,i=this.getDecimalForPixel(e)/A.factor-A.end;return fo(this._table,i*this._tableRange+this._minPos,!0)}}k(up,"id","timeseries"),k(up,"defaults",Xr.defaults);let Rn=null;function N2(t){Rn=t}function z2(){return Rn}const hA=[];let kt=null;function P2(){return kt&&document.body.contains(kt)||(kt=document.createElement("div"),kt.className="selection-tray",kt.innerHTML=`
|
|
123
|
+
<div class="selection-tray__chips"></div>
|
|
124
|
+
<div class="selection-tray__actions">
|
|
125
|
+
<button class="selection-tray__ask" title="Ask about selected items">Ask</button>
|
|
126
|
+
<button class="selection-tray__clear" title="Clear selection">×</button>
|
|
127
|
+
</div>
|
|
128
|
+
`,kt.querySelector(".selection-tray__ask").addEventListener("click",()=>{if(!Rn||hA.length===0)return;const t=hA.length===1?`Tell me more about: ${hA[0]}`:`Tell me about these:
|
|
129
|
+
${hA.map(e=>`- ${e}`).join(`
|
|
130
|
+
`)}`;Rn.sendMessage({role:"user",content:[{type:"text",text:t}]}).catch(e=>console.warn("Failed to send:",e)),Bc()}),kt.querySelector(".selection-tray__clear").addEventListener("click",Bc),document.body.appendChild(kt)),kt}function Bc(){if(hA.length=0,kt){kt.classList.remove("selection-tray--visible");const t=kt.querySelector(".selection-tray__chips");t&&(t.innerHTML="")}}function UU(){const t=P2(),e=t.querySelector(".selection-tray__chips");e.innerHTML=hA.map((A,i)=>`<span class="selection-chip">${Xe(A)}<button data-idx="${i}" class="selection-chip__remove">×</button></span>`).join(""),e.querySelectorAll(".selection-chip__remove").forEach(A=>{A.addEventListener("click",i=>{i.stopPropagation();const n=parseInt(A.dataset.idx??"0",10);hA.splice(n,1),hA.length===0?Bc():UU()})}),t.classList.toggle("selection-tray--visible",hA.length>0)}function mA(t){Rn&&(hA.push(t),UU())}let wc=null,yc=null;function R2(t,e){wc=t,yc=e}function K2(){return!wc||!yc?null:{name:wc,args:yc}}const QA=["#3B82F6","#10B981","#F59E0B","#8B5CF6","#F43F5E","#06B6D4","#84CC16"];function J(t){return getComputedStyle(document.documentElement).getPropertyValue(t).trim()}function qA(){return{backgroundColor:J("--bg-card-2")||"#1C2333",titleColor:J("--text-primary")||"#F1F5F9",bodyColor:J("--text-secondary")||"#94A3B8",borderColor:J("--border-md")||"rgba(255,255,255,0.14)",borderWidth:1,padding:10,cornerRadius:8,displayColors:!0,boxWidth:8,boxHeight:8,titleFont:{size:12,weight:"bold"},bodyFont:{size:11}}}function Xe(t){const e=document.createElement("div");return e.textContent=t,e.innerHTML}function Rl(t,e){return t&&t.length>0?t:QA}function en(t){for(const e of[300,600,1500,3e3])setTimeout(()=>{try{t.resize()}catch{}},e)}function Rh(t){let e=t.querySelector(".chart-card__actions");return e||(e=document.createElement("div"),e.className="chart-card__actions",t.appendChild(e)),e}function ho(t,e=!1){const A=document.querySelector(".header, .chart-card__header"),i=A?A.getBoundingClientRect().bottom+8:12,n=document.createElement("div");n.style.cssText=`
|
|
131
|
+
position:fixed;top:${i}px;right:12px;
|
|
132
|
+
padding:8px 16px;border-radius:8px;font-size:12px;font-weight:500;
|
|
133
|
+
color:#fff;z-index:999;opacity:0;transform:translateY(-8px);
|
|
134
|
+
transition:opacity 0.25s ease,transform 0.25s ease;
|
|
135
|
+
background:${e?"var(--negative,#DC2626)":"var(--positive,#16A34A)"};
|
|
136
|
+
`,n.textContent=t,document.body.appendChild(n),requestAnimationFrame(()=>{n.style.opacity="1",n.style.transform="translateY(0)"}),setTimeout(()=>{n.style.opacity="0",n.style.transform="translateY(-8px)",n.addEventListener("transitionend",()=>n.remove(),{once:!0})},2500)}async function Kh(t,e,A){var i,n;if(!Rn){ho("Not connected",!0);return}try{const r=await Rn.callServerTool({name:"save_file",arguments:{filename:t,data:e,encoding:A}}),s=((n=(i=r==null?void 0:r.content)==null?void 0:i[0])==null?void 0:n.text)??"";r!=null&&r.isError?ho(s||"Save failed",!0):ho(s||`Saved ${t}`)}catch(r){ho(`Save failed: ${r.message}`,!0)}}function tn(t,e,A){const i=t.querySelector(".chart-card__header");if(!i)return;const n=document.createElement("button");n.className="export-btn",n.title="Download as PNG",n.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>',n.addEventListener("click",()=>{const s=e.toBase64Image().replace(/^data:image\/png;base64,/,"");Kh(`${A}.png`,s,"base64")}),Rh(i).appendChild(n)}function Z2(t,e,A,i){const n=t.querySelector(".chart-card__header");if(!n)return;const r=document.createElement("button");r.className="export-btn",r.title="Download as CSV",r.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>',r.addEventListener("click",()=>{const s=[e.join(",")];for(const o of A)s.push(e.map(a=>{const l=String(o[a]??"");return l.includes(",")||l.includes('"')||l.includes(`
|
|
137
|
+
`)?`"${l.replace(/"/g,'""')}"`:l}).join(","));Kh(`${i}.csv`,s.join(`
|
|
138
|
+
`),"utf-8")}),Rh(n).appendChild(r)}async function V2(t,e){const i=t.toDataURL("image/png").replace(/^data:image\/png;base64,/,""),n=e.endsWith(".png")?e:`${e}.png`;await Kh(n,i,"base64")}function Ls(t,e){const A=t.querySelector(".chart-card__header");if(!A)return;const i=document.createElement("button");i.className="export-btn",i.title="Refresh data",i.innerHTML='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></svg>',i.addEventListener("click",()=>{i.style.animation="spin 0.6s linear",i.addEventListener("animationend",()=>{i.style.animation=""},{once:!0}),e()}),Rh(A).appendChild(i)}Le.register(fi,Zi,Ki,ya,In);function QU(t,e){const{title:A,data:i,options:n}=e,r=n.showLegend!==!1,s=n.donut===!0;t.innerHTML=`
|
|
123
139
|
<div class="chart-view">
|
|
124
140
|
<div class="card chart-card">
|
|
125
141
|
<div class="chart-card__header">
|
|
126
142
|
<div>
|
|
127
|
-
<div class="chart-card__title">${
|
|
128
|
-
<div class="chart-card__subtitle">${
|
|
143
|
+
<div class="chart-card__title">${Xe(A)}</div>
|
|
144
|
+
<div class="chart-card__subtitle">${i.length} segments</div>
|
|
129
145
|
</div>
|
|
130
146
|
</div>
|
|
131
147
|
<div class="chart-card__body">
|
|
@@ -133,13 +149,13 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
133
149
|
</div>
|
|
134
150
|
</div>
|
|
135
151
|
</div>
|
|
136
|
-
`;const
|
|
152
|
+
`;const o=t.querySelector("#chart-canvas"),a=i.reduce((d,f)=>d+f.value,0),l=Rl(n.colors),u=i.map((d,f)=>l[f%l.length]),c=new Le(o,{type:s?"doughnut":"pie",data:{labels:i.map(d=>d.label),datasets:[{data:i.map(d=>d.value),backgroundColor:u,borderColor:J("--bg-card"),borderWidth:2,hoverOffset:8}]},options:{responsive:!0,maintainAspectRatio:!1,cutout:s?"55%":0,onClick:(d,f)=>{if(f.length===0)return;const h=f[0].index,g=i[h],m=(g.value/a*100).toFixed(1);mA(`${g.label}: ${g.value.toLocaleString()} (${m}%) in "${A}"`)},plugins:{legend:{display:r,position:"bottom",labels:{color:J("--text-secondary"),padding:12,boxWidth:12,boxHeight:12,borderRadius:3,useBorderRadius:!0,font:{size:11}}},tooltip:{...qA(),callbacks:{label:d=>{const f=d.parsed,h=(f/a*100).toFixed(1);return` ${d.label}: ${f.toLocaleString()} (${h}%)`}}}}}});en(c),tn(t,c,A),Ls(t,()=>{var d;return(d=window.__mcpRefresh)==null?void 0:d.call(window)})}Le.register(Tn,wi,Jr,Pn,Zi,Ki);function xU(t,e){const{title:A,labels:i,datasets:n,options:r}=e,s=r.horizontal===!0,o=r.stacked===!0;t.innerHTML=`
|
|
137
153
|
<div class="chart-view">
|
|
138
154
|
<div class="card chart-card">
|
|
139
155
|
<div class="chart-card__header">
|
|
140
156
|
<div>
|
|
141
|
-
<div class="chart-card__title">${
|
|
142
|
-
<div class="chart-card__subtitle">${
|
|
157
|
+
<div class="chart-card__title">${Xe(A)}</div>
|
|
158
|
+
<div class="chart-card__subtitle">${n.length} series - ${i.length} categories</div>
|
|
143
159
|
</div>
|
|
144
160
|
</div>
|
|
145
161
|
<div class="chart-card__body">
|
|
@@ -147,13 +163,13 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
147
163
|
</div>
|
|
148
164
|
</div>
|
|
149
165
|
</div>
|
|
150
|
-
`;const
|
|
166
|
+
`;const a=t.querySelector("#chart-canvas"),l=Rl(r.colors),u=new Le(a,{type:"bar",data:{labels:i,datasets:n.map((c,d)=>({label:c.label,data:c.data,backgroundColor:l[d%l.length]+"CC",borderColor:l[d%l.length],borderWidth:1,borderRadius:4,borderSkipped:!1}))},options:{indexAxis:s?"y":"x",responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},onClick:(c,d)=>{if(d.length===0)return;const f=d[0],h=i[f.index],g=n.map(m=>{var p;return`${m.label}: ${(p=m.data[f.index])==null?void 0:p.toLocaleString()}`}).join(", ");mA(`${h} (${g}) in "${A}"`)},scales:{x:{stacked:o,border:{display:!1},grid:{display:s,color:J("--border")},ticks:{color:J("--text-secondary"),font:{size:11}}},y:{stacked:o,border:{display:!1},grid:{display:!s,color:J("--border")},ticks:{color:J("--text-secondary"),font:{size:11},padding:8}}},plugins:{legend:{display:n.length>1,position:"top",align:"end",labels:{color:J("--text-secondary"),boxWidth:10,padding:12,font:{size:11}}},tooltip:qA()}}});en(u),tn(t,u,A),Ls(t,()=>{var c;return(c=window.__mcpRefresh)==null?void 0:c.call(window)})}Le.register(Ir,SA,Bi,Jr,Pn,bU,Zi,Ki);function FU(t,e){const{title:A,labels:i,datasets:n,options:r}=e,s=r.fill!==!1,o=r.smooth!==!1,a=r.showPoints===!0;t.innerHTML=`
|
|
151
167
|
<div class="chart-view">
|
|
152
168
|
<div class="card chart-card">
|
|
153
169
|
<div class="chart-card__header">
|
|
154
170
|
<div>
|
|
155
|
-
<div class="chart-card__title">${
|
|
156
|
-
<div class="chart-card__subtitle">${
|
|
171
|
+
<div class="chart-card__title">${Xe(A)}</div>
|
|
172
|
+
<div class="chart-card__subtitle">${n.length} series - ${i.length} points</div>
|
|
157
173
|
</div>
|
|
158
174
|
</div>
|
|
159
175
|
<div class="chart-card__body">
|
|
@@ -161,58 +177,83 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
161
177
|
</div>
|
|
162
178
|
</div>
|
|
163
179
|
</div>
|
|
164
|
-
`;const
|
|
165
|
-
|
|
180
|
+
`;const l=t.querySelector("#chart-canvas"),u=Rl(r.colors),c=new Le(l,{type:"line",data:{labels:i,datasets:n.map((d,f)=>{const h=u[f%u.length];return{label:d.label,data:d.data,borderColor:h,borderWidth:2,tension:o?.4:0,fill:s,backgroundColor:g=>{if(!s)return"transparent";const m=g.chart.ctx.createLinearGradient(0,0,0,g.chart.height);return m.addColorStop(0,h+"40"),m.addColorStop(1,h+"00"),m},pointRadius:a?4:0,pointHoverRadius:6,pointBackgroundColor:h,pointBorderColor:J("--bg-card"),pointBorderWidth:2,pointHoverBorderWidth:2}})},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},onClick:(d,f)=>{if(f.length===0)return;const h=f[0].index,g=i[h],m=n.map(p=>{var B;return`${p.label}: ${(B=p.data[h])==null?void 0:B.toLocaleString()}`}).join(", ");mA(`${g} (${m}) in "${A}"`)},scales:{x:{border:{display:!1},grid:{display:!1},ticks:{color:J("--text-secondary"),font:{size:11}}},y:{border:{display:!1},grid:{color:J("--border"),drawTicks:!1},ticks:{color:J("--text-secondary"),font:{size:11},padding:8}}},plugins:{legend:{display:n.length>1,position:"top",align:"end",labels:{color:J("--text-secondary"),boxWidth:10,padding:12,font:{size:11}}},tooltip:qA()}}});en(c),tn(t,c,A),Ls(t,()=>{var d;return(d=window.__mcpRefresh)==null?void 0:d.call(window)})}/*!
|
|
181
|
+
* html2canvas 1.4.1 <https://html2canvas.hertzen.com>
|
|
182
|
+
* Copyright (c) 2022 Niklas von Hertzen <https://hertzen.com>
|
|
183
|
+
* Released under MIT License
|
|
184
|
+
*//*! *****************************************************************************
|
|
185
|
+
Copyright (c) Microsoft Corporation.
|
|
186
|
+
|
|
187
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
188
|
+
purpose with or without fee is hereby granted.
|
|
189
|
+
|
|
190
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
191
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
192
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
193
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
194
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
195
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
196
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
197
|
+
***************************************************************************** */var bc=function(t,e){return bc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(A,i){A.__proto__=i}||function(A,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(A[n]=i[n])},bc(t,e)};function aA(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");bc(t,e);function A(){this.constructor=t}t.prototype=e===null?Object.create(e):(A.prototype=e.prototype,new A)}var _c=function(){return _c=Object.assign||function(e){for(var A,i=1,n=arguments.length;i<n;i++){A=arguments[i];for(var r in A)Object.prototype.hasOwnProperty.call(A,r)&&(e[r]=A[r])}return e},_c.apply(this,arguments)};function pt(t,e,A,i){function n(r){return r instanceof A?r:new A(function(s){s(r)})}return new(A||(A=Promise))(function(r,s){function o(u){try{l(i.next(u))}catch(c){s(c)}}function a(u){try{l(i.throw(u))}catch(c){s(c)}}function l(u){u.done?r(u.value):n(u.value).then(o,a)}l((i=i.apply(t,[])).next())})}function nt(t,e){var A={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},i,n,r,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(l){return function(u){return a([l,u])}}function a(l){if(i)throw new TypeError("Generator is already executing.");for(;A;)try{if(i=1,n&&(r=l[0]&2?n.return:l[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,l[1])).done)return r;switch(n=0,r&&(l=[l[0]&2,r.value]),l[0]){case 0:case 1:r=l;break;case 4:return A.label++,{value:l[1],done:!1};case 5:A.label++,n=l[1],l=[0];continue;case 7:l=A.ops.pop(),A.trys.pop();continue;default:if(r=A.trys,!(r=r.length>0&&r[r.length-1])&&(l[0]===6||l[0]===2)){A=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){A.label=l[1];break}if(l[0]===6&&A.label<r[1]){A.label=r[1],r=l;break}if(r&&A.label<r[2]){A.label=r[2],A.ops.push(l);break}r[2]&&A.ops.pop(),A.trys.pop();continue}l=e.call(t,A)}catch(u){l=[6,u],n=0}finally{i=r=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}}function go(t,e,A){if(arguments.length===2)for(var i=0,n=e.length,r;i<n;i++)(r||!(i in e))&&(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||e)}var $A=(function(){function t(e,A,i,n){this.left=e,this.top=A,this.width=i,this.height=n}return t.prototype.add=function(e,A,i,n){return new t(this.left+e,this.top+A,this.width+i,this.height+n)},t.fromClientRect=function(e,A){return new t(A.left+e.windowBounds.left,A.top+e.windowBounds.top,A.width,A.height)},t.fromDOMRectList=function(e,A){var i=Array.from(A).find(function(n){return n.width!==0});return i?new t(i.left+e.windowBounds.left,i.top+e.windowBounds.top,i.width,i.height):t.EMPTY},t.EMPTY=new t(0,0,0,0),t})(),Kl=function(t,e){return $A.fromClientRect(t,e.getBoundingClientRect())},j2=function(t){var e=t.body,A=t.documentElement;if(!e||!A)throw new Error("Unable to get document size");var i=Math.max(Math.max(e.scrollWidth,A.scrollWidth),Math.max(e.offsetWidth,A.offsetWidth),Math.max(e.clientWidth,A.clientWidth)),n=Math.max(Math.max(e.scrollHeight,A.scrollHeight),Math.max(e.offsetHeight,A.offsetHeight),Math.max(e.clientHeight,A.clientHeight));return new $A(0,0,i,n)},Zl=function(t){for(var e=[],A=0,i=t.length;A<i;){var n=t.charCodeAt(A++);if(n>=55296&&n<=56319&&A<i){var r=t.charCodeAt(A++);(r&64512)===56320?e.push(((n&1023)<<10)+(r&1023)+65536):(e.push(n),A--)}else e.push(n)}return e},ze=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var A=t.length;if(!A)return"";for(var i=[],n=-1,r="";++n<A;){var s=t[n];s<=65535?i.push(s):(s-=65536,i.push((s>>10)+55296,s%1024+56320)),(n+1===A||i.length>16384)&&(r+=String.fromCharCode.apply(String,i),i.length=0)}return r},cp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",G2=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var mo=0;mo<cp.length;mo++)G2[cp.charCodeAt(mo)]=mo;var dp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",gr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var po=0;po<dp.length;po++)gr[dp.charCodeAt(po)]=po;var W2=function(t){var e=t.length*.75,A=t.length,i,n=0,r,s,o,a;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),u=Array.isArray(l)?l:new Uint8Array(l);for(i=0;i<A;i+=4)r=gr[t.charCodeAt(i)],s=gr[t.charCodeAt(i+1)],o=gr[t.charCodeAt(i+2)],a=gr[t.charCodeAt(i+3)],u[n++]=r<<2|s>>4,u[n++]=(s&15)<<4|o>>2,u[n++]=(o&3)<<6|a&63;return l},J2=function(t){for(var e=t.length,A=[],i=0;i<e;i+=2)A.push(t[i+1]<<8|t[i]);return A},X2=function(t){for(var e=t.length,A=[],i=0;i<e;i+=4)A.push(t[i+3]<<24|t[i+2]<<16|t[i+1]<<8|t[i]);return A},On=5,Zh=11,bu=2,Y2=Zh-On,IU=65536>>On,q2=1<<On,_u=q2-1,eN=1024>>On,tN=IU+eN,AN=tN,nN=32,iN=AN+nN,rN=65536>>Zh,sN=1<<Y2,oN=sN-1,fp=function(t,e,A){return t.slice?t.slice(e,A):new Uint16Array(Array.prototype.slice.call(t,e,A))},aN=function(t,e,A){return t.slice?t.slice(e,A):new Uint32Array(Array.prototype.slice.call(t,e,A))},lN=function(t,e){var A=W2(t),i=Array.isArray(A)?X2(A):new Uint32Array(A),n=Array.isArray(A)?J2(A):new Uint16Array(A),r=24,s=fp(n,r/2,i[4]/2),o=i[5]===2?fp(n,(r+i[4])/2):aN(i,Math.ceil((r+i[4])/4));return new uN(i[0],i[1],i[2],i[3],s,o)},uN=(function(){function t(e,A,i,n,r,s){this.initialValue=e,this.errorValue=A,this.highStart=i,this.highValueIndex=n,this.index=r,this.data=s}return t.prototype.get=function(e){var A;if(e>=0){if(e<55296||e>56319&&e<=65535)return A=this.index[e>>On],A=(A<<bu)+(e&_u),this.data[A];if(e<=65535)return A=this.index[IU+(e-55296>>On)],A=(A<<bu)+(e&_u),this.data[A];if(e<this.highStart)return A=iN-rN+(e>>Zh),A=this.index[A],A+=e>>On&oN,A=this.index[A],A=(A<<bu)+(e&_u),this.data[A];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t})(),hp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cN=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var vo=0;vo<hp.length;vo++)cN[hp.charCodeAt(vo)]=vo;var dN="KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==",gp=50,fN=1,SU=2,kU=3,hN=4,gN=5,mp=7,EU=8,pp=9,GA=10,Cc=11,vp=12,Uc=13,mN=14,mr=15,Qc=16,Bo=17,rr=18,pN=19,Bp=20,xc=21,sr=22,Cu=23,qn=24,It=25,pr=26,vr=27,ei=28,vN=29,Qn=30,BN=31,wo=32,yo=33,Fc=34,Ic=35,Sc=36,Yr=37,kc=38,Vo=39,jo=40,Uu=41,$U=42,wN=43,yN=[9001,65288],TU="!",ie="×",bo="÷",Ec=lN(dN),yA=[Qn,Sc],$c=[fN,SU,kU,gN],OU=[GA,EU],wp=[vr,pr],bN=$c.concat(OU),yp=[kc,Vo,jo,Fc,Ic],_N=[mr,Uc],CN=function(t,e){e===void 0&&(e="strict");var A=[],i=[],n=[];return t.forEach(function(r,s){var o=Ec.get(r);if(o>gp?(n.push(!0),o-=gp):n.push(!1),["normal","auto","loose"].indexOf(e)!==-1&&[8208,8211,12316,12448].indexOf(r)!==-1)return i.push(s),A.push(Qc);if(o===hN||o===Cc){if(s===0)return i.push(s),A.push(Qn);var a=A[s-1];return bN.indexOf(a)===-1?(i.push(i[s-1]),A.push(a)):(i.push(s),A.push(Qn))}if(i.push(s),o===BN)return A.push(e==="strict"?xc:Yr);if(o===$U||o===vN)return A.push(Qn);if(o===wN)return r>=131072&&r<=196605||r>=196608&&r<=262141?A.push(Yr):A.push(Qn);A.push(o)}),[i,A,n]},Qu=function(t,e,A,i){var n=i[A];if(Array.isArray(t)?t.indexOf(n)!==-1:t===n)for(var r=A;r<=i.length;){r++;var s=i[r];if(s===e)return!0;if(s!==GA)break}if(n===GA)for(var r=A;r>0;){r--;var o=i[r];if(Array.isArray(t)?t.indexOf(o)!==-1:t===o)for(var a=A;a<=i.length;){a++;var s=i[a];if(s===e)return!0;if(s!==GA)break}if(o!==GA)break}return!1},bp=function(t,e){for(var A=t;A>=0;){var i=e[A];if(i===GA)A--;else return i}return 0},UN=function(t,e,A,i,n){if(A[i]===0)return ie;var r=i-1;if(Array.isArray(n)&&n[r]===!0)return ie;var s=r-1,o=r+1,a=e[r],l=s>=0?e[s]:0,u=e[o];if(a===SU&&u===kU)return ie;if($c.indexOf(a)!==-1)return TU;if($c.indexOf(u)!==-1||OU.indexOf(u)!==-1)return ie;if(bp(r,e)===EU)return bo;if(Ec.get(t[r])===Cc||(a===wo||a===yo)&&Ec.get(t[o])===Cc||a===mp||u===mp||a===pp||[GA,Uc,mr].indexOf(a)===-1&&u===pp||[Bo,rr,pN,qn,ei].indexOf(u)!==-1||bp(r,e)===sr||Qu(Cu,sr,r,e)||Qu([Bo,rr],xc,r,e)||Qu(vp,vp,r,e))return ie;if(a===GA)return bo;if(a===Cu||u===Cu)return ie;if(u===Qc||a===Qc)return bo;if([Uc,mr,xc].indexOf(u)!==-1||a===mN||l===Sc&&_N.indexOf(a)!==-1||a===ei&&u===Sc||u===Bp||yA.indexOf(u)!==-1&&a===It||yA.indexOf(a)!==-1&&u===It||a===vr&&[Yr,wo,yo].indexOf(u)!==-1||[Yr,wo,yo].indexOf(a)!==-1&&u===pr||yA.indexOf(a)!==-1&&wp.indexOf(u)!==-1||wp.indexOf(a)!==-1&&yA.indexOf(u)!==-1||[vr,pr].indexOf(a)!==-1&&(u===It||[sr,mr].indexOf(u)!==-1&&e[o+1]===It)||[sr,mr].indexOf(a)!==-1&&u===It||a===It&&[It,ei,qn].indexOf(u)!==-1)return ie;if([It,ei,qn,Bo,rr].indexOf(u)!==-1)for(var c=r;c>=0;){var d=e[c];if(d===It)return ie;if([ei,qn].indexOf(d)!==-1)c--;else break}if([vr,pr].indexOf(u)!==-1)for(var c=[Bo,rr].indexOf(a)!==-1?s:r;c>=0;){var d=e[c];if(d===It)return ie;if([ei,qn].indexOf(d)!==-1)c--;else break}if(kc===a&&[kc,Vo,Fc,Ic].indexOf(u)!==-1||[Vo,Fc].indexOf(a)!==-1&&[Vo,jo].indexOf(u)!==-1||[jo,Ic].indexOf(a)!==-1&&u===jo||yp.indexOf(a)!==-1&&[Bp,pr].indexOf(u)!==-1||yp.indexOf(u)!==-1&&a===vr||yA.indexOf(a)!==-1&&yA.indexOf(u)!==-1||a===qn&&yA.indexOf(u)!==-1||yA.concat(It).indexOf(a)!==-1&&u===sr&&yN.indexOf(t[o])===-1||yA.concat(It).indexOf(u)!==-1&&a===rr)return ie;if(a===Uu&&u===Uu){for(var f=A[r],h=1;f>0&&(f--,e[f]===Uu);)h++;if(h%2!==0)return ie}return a===wo&&u===yo?ie:bo},QN=function(t,e){e||(e={lineBreak:"normal",wordBreak:"normal"});var A=CN(t,e.lineBreak),i=A[0],n=A[1],r=A[2];(e.wordBreak==="break-all"||e.wordBreak==="break-word")&&(n=n.map(function(o){return[It,Qn,$U].indexOf(o)!==-1?Yr:o}));var s=e.wordBreak==="keep-all"?r.map(function(o,a){return o&&t[a]>=19968&&t[a]<=40959}):void 0;return[i,n,s]},xN=(function(){function t(e,A,i,n){this.codePoints=e,this.required=A===TU,this.start=i,this.end=n}return t.prototype.slice=function(){return ze.apply(void 0,this.codePoints.slice(this.start,this.end))},t})(),FN=function(t,e){var A=Zl(t),i=QN(A,e),n=i[0],r=i[1],s=i[2],o=A.length,a=0,l=0;return{next:function(){if(l>=o)return{done:!0,value:null};for(var u=ie;l<o&&(u=UN(A,r,n,++l,s))===ie;);if(u!==ie||l===o){var c=new xN(A,u,a,l);return a=l,{value:c,done:!1}}return{done:!0,value:null}}}},IN=1,SN=2,Ms=4,_p=8,Ca=10,Cp=47,Sr=92,kN=9,EN=32,_o=34,or=61,$N=35,TN=36,ON=37,Co=39,Uo=40,ar=41,HN=95,_t=45,DN=33,LN=60,MN=62,NN=64,zN=91,PN=93,RN=61,KN=123,Qo=63,ZN=125,Up=124,VN=126,jN=128,Qp=65533,xu=42,Sn=43,GN=44,WN=58,JN=59,qr=46,XN=0,YN=8,qN=11,ez=14,tz=31,Az=127,uA=-1,HU=48,DU=97,LU=101,nz=102,iz=117,rz=122,MU=65,NU=69,zU=70,sz=85,oz=90,st=function(t){return t>=HU&&t<=57},az=function(t){return t>=55296&&t<=57343},ti=function(t){return st(t)||t>=MU&&t<=zU||t>=DU&&t<=nz},lz=function(t){return t>=DU&&t<=rz},uz=function(t){return t>=MU&&t<=oz},cz=function(t){return lz(t)||uz(t)},dz=function(t){return t>=jN},xo=function(t){return t===Ca||t===kN||t===EN},Ua=function(t){return cz(t)||dz(t)||t===HN},xp=function(t){return Ua(t)||st(t)||t===_t},fz=function(t){return t>=XN&&t<=YN||t===qN||t>=ez&&t<=tz||t===Az},zA=function(t,e){return t!==Sr?!1:e!==Ca},Fo=function(t,e,A){return t===_t?Ua(e)||zA(e,A):Ua(t)?!0:!!(t===Sr&&zA(t,e))},Fu=function(t,e,A){return t===Sn||t===_t?st(e)?!0:e===qr&&st(A):st(t===qr?e:t)},hz=function(t){var e=0,A=1;(t[e]===Sn||t[e]===_t)&&(t[e]===_t&&(A=-1),e++);for(var i=[];st(t[e]);)i.push(t[e++]);var n=i.length?parseInt(ze.apply(void 0,i),10):0;t[e]===qr&&e++;for(var r=[];st(t[e]);)r.push(t[e++]);var s=r.length,o=s?parseInt(ze.apply(void 0,r),10):0;(t[e]===NU||t[e]===LU)&&e++;var a=1;(t[e]===Sn||t[e]===_t)&&(t[e]===_t&&(a=-1),e++);for(var l=[];st(t[e]);)l.push(t[e++]);var u=l.length?parseInt(ze.apply(void 0,l),10):0;return A*(n+o*Math.pow(10,-s))*Math.pow(10,a*u)},gz={type:2},mz={type:3},pz={type:4},vz={type:13},Bz={type:8},wz={type:21},yz={type:9},bz={type:10},_z={type:11},Cz={type:12},Uz={type:14},Io={type:23},Qz={type:1},xz={type:25},Fz={type:24},Iz={type:26},Sz={type:27},kz={type:28},Ez={type:29},$z={type:31},Tc={type:32},PU=(function(){function t(){this._value=[]}return t.prototype.write=function(e){this._value=this._value.concat(Zl(e))},t.prototype.read=function(){for(var e=[],A=this.consumeToken();A!==Tc;)e.push(A),A=this.consumeToken();return e},t.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case _o:return this.consumeStringToken(_o);case $N:var A=this.peekCodePoint(0),i=this.peekCodePoint(1),n=this.peekCodePoint(2);if(xp(A)||zA(i,n)){var r=Fo(A,i,n)?SN:IN,s=this.consumeName();return{type:5,value:s,flags:r}}break;case TN:if(this.peekCodePoint(0)===or)return this.consumeCodePoint(),vz;break;case Co:return this.consumeStringToken(Co);case Uo:return gz;case ar:return mz;case xu:if(this.peekCodePoint(0)===or)return this.consumeCodePoint(),Uz;break;case Sn:if(Fu(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case GN:return pz;case _t:var o=e,a=this.peekCodePoint(0),l=this.peekCodePoint(1);if(Fu(o,a,l))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(Fo(o,a,l))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(a===_t&&l===MN)return this.consumeCodePoint(),this.consumeCodePoint(),Fz;break;case qr:if(Fu(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case Cp:if(this.peekCodePoint(0)===xu)for(this.consumeCodePoint();;){var u=this.consumeCodePoint();if(u===xu&&(u=this.consumeCodePoint(),u===Cp))return this.consumeToken();if(u===uA)return this.consumeToken()}break;case WN:return Iz;case JN:return Sz;case LN:if(this.peekCodePoint(0)===DN&&this.peekCodePoint(1)===_t&&this.peekCodePoint(2)===_t)return this.consumeCodePoint(),this.consumeCodePoint(),xz;break;case NN:var c=this.peekCodePoint(0),d=this.peekCodePoint(1),f=this.peekCodePoint(2);if(Fo(c,d,f)){var s=this.consumeName();return{type:7,value:s}}break;case zN:return kz;case Sr:if(zA(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case PN:return Ez;case RN:if(this.peekCodePoint(0)===or)return this.consumeCodePoint(),Bz;break;case KN:return _z;case ZN:return Cz;case iz:case sz:var h=this.peekCodePoint(0),g=this.peekCodePoint(1);return h===Sn&&(ti(g)||g===Qo)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case Up:if(this.peekCodePoint(0)===or)return this.consumeCodePoint(),yz;if(this.peekCodePoint(0)===Up)return this.consumeCodePoint(),wz;break;case VN:if(this.peekCodePoint(0)===or)return this.consumeCodePoint(),bz;break;case uA:return Tc}return xo(e)?(this.consumeWhiteSpace(),$z):st(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):Ua(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:ze(e)}},t.prototype.consumeCodePoint=function(){var e=this._value.shift();return typeof e>"u"?-1:e},t.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},t.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},t.prototype.consumeUnicodeRangeToken=function(){for(var e=[],A=this.consumeCodePoint();ti(A)&&e.length<6;)e.push(A),A=this.consumeCodePoint();for(var i=!1;A===Qo&&e.length<6;)e.push(A),A=this.consumeCodePoint(),i=!0;if(i){var n=parseInt(ze.apply(void 0,e.map(function(a){return a===Qo?HU:a})),16),r=parseInt(ze.apply(void 0,e.map(function(a){return a===Qo?zU:a})),16);return{type:30,start:n,end:r}}var s=parseInt(ze.apply(void 0,e),16);if(this.peekCodePoint(0)===_t&&ti(this.peekCodePoint(1))){this.consumeCodePoint(),A=this.consumeCodePoint();for(var o=[];ti(A)&&o.length<6;)o.push(A),A=this.consumeCodePoint();var r=parseInt(ze.apply(void 0,o),16);return{type:30,start:s,end:r}}else return{type:30,start:s,end:s}},t.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()==="url"&&this.peekCodePoint(0)===Uo?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===Uo?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},t.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===uA)return{type:22,value:""};var A=this.peekCodePoint(0);if(A===Co||A===_o){var i=this.consumeStringToken(this.consumeCodePoint());return i.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===uA||this.peekCodePoint(0)===ar)?(this.consumeCodePoint(),{type:22,value:i.value}):(this.consumeBadUrlRemnants(),Io)}for(;;){var n=this.consumeCodePoint();if(n===uA||n===ar)return{type:22,value:ze.apply(void 0,e)};if(xo(n))return this.consumeWhiteSpace(),this.peekCodePoint(0)===uA||this.peekCodePoint(0)===ar?(this.consumeCodePoint(),{type:22,value:ze.apply(void 0,e)}):(this.consumeBadUrlRemnants(),Io);if(n===_o||n===Co||n===Uo||fz(n))return this.consumeBadUrlRemnants(),Io;if(n===Sr)if(zA(n,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),Io;else e.push(n)}},t.prototype.consumeWhiteSpace=function(){for(;xo(this.peekCodePoint(0));)this.consumeCodePoint()},t.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===ar||e===uA)return;zA(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},t.prototype.consumeStringSlice=function(e){for(var A=5e4,i="";e>0;){var n=Math.min(A,e);i+=ze.apply(void 0,this._value.splice(0,n)),e-=n}return this._value.shift(),i},t.prototype.consumeStringToken=function(e){var A="",i=0;do{var n=this._value[i];if(n===uA||n===void 0||n===e)return A+=this.consumeStringSlice(i),{type:0,value:A};if(n===Ca)return this._value.splice(0,i),Qz;if(n===Sr){var r=this._value[i+1];r!==uA&&r!==void 0&&(r===Ca?(A+=this.consumeStringSlice(i),i=-1,this._value.shift()):zA(n,r)&&(A+=this.consumeStringSlice(i),A+=ze(this.consumeEscapedCodePoint()),i=-1))}i++}while(!0)},t.prototype.consumeNumber=function(){var e=[],A=Ms,i=this.peekCodePoint(0);for((i===Sn||i===_t)&&e.push(this.consumeCodePoint());st(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0);var n=this.peekCodePoint(1);if(i===qr&&st(n))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),A=_p;st(this.peekCodePoint(0));)e.push(this.consumeCodePoint());i=this.peekCodePoint(0),n=this.peekCodePoint(1);var r=this.peekCodePoint(2);if((i===NU||i===LU)&&((n===Sn||n===_t)&&st(r)||st(n)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),A=_p;st(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[hz(e),A]},t.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),A=e[0],i=e[1],n=this.peekCodePoint(0),r=this.peekCodePoint(1),s=this.peekCodePoint(2);if(Fo(n,r,s)){var o=this.consumeName();return{type:15,number:A,flags:i,unit:o}}return n===ON?(this.consumeCodePoint(),{type:16,number:A,flags:i}):{type:17,number:A,flags:i}},t.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(ti(e)){for(var A=ze(e);ti(this.peekCodePoint(0))&&A.length<6;)A+=ze(this.consumeCodePoint());xo(this.peekCodePoint(0))&&this.consumeCodePoint();var i=parseInt(A,16);return i===0||az(i)||i>1114111?Qp:i}return e===uA?Qp:e},t.prototype.consumeName=function(){for(var e="";;){var A=this.consumeCodePoint();if(xp(A))e+=ze(A);else if(zA(A,this.peekCodePoint(0)))e+=ze(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(A),e}},t})(),RU=(function(){function t(e){this._tokens=e}return t.create=function(e){var A=new PU;return A.write(e),new t(A.read())},t.parseValue=function(e){return t.create(e).parseComponentValue()},t.parseValues=function(e){return t.create(e).parseComponentValues()},t.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var A=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return A;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},t.prototype.parseComponentValues=function(){for(var e=[];;){var A=this.consumeComponentValue();if(A.type===32)return e;e.push(A),e.push()}},t.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},t.prototype.consumeSimpleBlock=function(e){for(var A={type:e,values:[]},i=this.consumeToken();;){if(i.type===32||Oz(i,e))return A;this.reconsumeToken(i),A.values.push(this.consumeComponentValue()),i=this.consumeToken()}},t.prototype.consumeFunction=function(e){for(var A={name:e.value,values:[],type:18};;){var i=this.consumeToken();if(i.type===32||i.type===3)return A;this.reconsumeToken(i),A.values.push(this.consumeComponentValue())}},t.prototype.consumeToken=function(){var e=this._tokens.shift();return typeof e>"u"?Tc:e},t.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},t})(),Ns=function(t){return t.type===15},Vi=function(t){return t.type===17},pe=function(t){return t.type===20},Tz=function(t){return t.type===0},Oc=function(t,e){return pe(t)&&t.value===e},KU=function(t){return t.type!==31},Di=function(t){return t.type!==31&&t.type!==4},vA=function(t){var e=[],A=[];return t.forEach(function(i){if(i.type===4){if(A.length===0)throw new Error("Error parsing function args, zero tokens for arg");e.push(A),A=[];return}i.type!==31&&A.push(i)}),A.length&&e.push(A),e},Oz=function(t,e){return e===11&&t.type===12||e===28&&t.type===29?!0:e===2&&t.type===3},dn=function(t){return t.type===17||t.type===15},Re=function(t){return t.type===16||dn(t)},ZU=function(t){return t.length>1?[t[0],t[1]]:[t[0]]},et={type:17,number:0,flags:Ms},Vh={type:16,number:50,flags:Ms},WA={type:16,number:100,flags:Ms},Br=function(t,e,A){var i=t[0],n=t[1];return[Ce(i,e),Ce(typeof n<"u"?n:i,A)]},Ce=function(t,e){if(t.type===16)return t.number/100*e;if(Ns(t))switch(t.unit){case"rem":case"em":return 16*t.number;case"px":default:return t.number}return t.number},VU="deg",jU="grad",GU="rad",WU="turn",Vl={name:"angle",parse:function(t,e){if(e.type===15)switch(e.unit){case VU:return Math.PI*e.number/180;case jU:return Math.PI/200*e.number;case GU:return e.number;case WU:return Math.PI*2*e.number}throw new Error("Unsupported angle type")}},JU=function(t){return t.type===15&&(t.unit===VU||t.unit===jU||t.unit===GU||t.unit===WU)},XU=function(t){var e=t.filter(pe).map(function(A){return A.value}).join(" ");switch(e){case"to bottom right":case"to right bottom":case"left top":case"top left":return[et,et];case"to top":case"bottom":return Kt(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[et,WA];case"to right":case"left":return Kt(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[WA,WA];case"to bottom":case"top":return Kt(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[WA,et];case"to left":case"right":return Kt(270)}return 0},Kt=function(t){return Math.PI*t/180},An={name:"color",parse:function(t,e){if(e.type===18){var A=Hz[e.name];if(typeof A>"u")throw new Error('Attempting to parse an unsupported color function "'+e.name+'"');return A(t,e.values)}if(e.type===5){if(e.value.length===3){var i=e.value.substring(0,1),n=e.value.substring(1,2),r=e.value.substring(2,3);return JA(parseInt(i+i,16),parseInt(n+n,16),parseInt(r+r,16),1)}if(e.value.length===4){var i=e.value.substring(0,1),n=e.value.substring(1,2),r=e.value.substring(2,3),s=e.value.substring(3,4);return JA(parseInt(i+i,16),parseInt(n+n,16),parseInt(r+r,16),parseInt(s+s,16)/255)}if(e.value.length===6){var i=e.value.substring(0,2),n=e.value.substring(2,4),r=e.value.substring(4,6);return JA(parseInt(i,16),parseInt(n,16),parseInt(r,16),1)}if(e.value.length===8){var i=e.value.substring(0,2),n=e.value.substring(2,4),r=e.value.substring(4,6),s=e.value.substring(6,8);return JA(parseInt(i,16),parseInt(n,16),parseInt(r,16),parseInt(s,16)/255)}}if(e.type===20){var o=kA[e.value.toUpperCase()];if(typeof o<"u")return o}return kA.TRANSPARENT}},nn=function(t){return(255&t)===0},We=function(t){var e=255&t,A=255&t>>8,i=255&t>>16,n=255&t>>24;return e<255?"rgba("+n+","+i+","+A+","+e/255+")":"rgb("+n+","+i+","+A+")"},JA=function(t,e,A,i){return(t<<24|e<<16|A<<8|Math.round(i*255)<<0)>>>0},Fp=function(t,e){if(t.type===17)return t.number;if(t.type===16){var A=e===3?1:255;return e===3?t.number/100*A:Math.round(t.number/100*A)}return 0},Ip=function(t,e){var A=e.filter(Di);if(A.length===3){var i=A.map(Fp),n=i[0],r=i[1],s=i[2];return JA(n,r,s,1)}if(A.length===4){var o=A.map(Fp),n=o[0],r=o[1],s=o[2],a=o[3];return JA(n,r,s,a)}return 0};function Iu(t,e,A){return A<0&&(A+=1),A>=1&&(A-=1),A<1/6?(e-t)*A*6+t:A<1/2?e:A<2/3?(e-t)*6*(2/3-A)+t:t}var Sp=function(t,e){var A=e.filter(Di),i=A[0],n=A[1],r=A[2],s=A[3],o=(i.type===17?Kt(i.number):Vl.parse(t,i))/(Math.PI*2),a=Re(n)?n.number/100:0,l=Re(r)?r.number/100:0,u=typeof s<"u"&&Re(s)?Ce(s,1):1;if(a===0)return JA(l*255,l*255,l*255,1);var c=l<=.5?l*(a+1):l+a-l*a,d=l*2-c,f=Iu(d,c,o+1/3),h=Iu(d,c,o),g=Iu(d,c,o-1/3);return JA(f*255,h*255,g*255,u)},Hz={hsl:Sp,hsla:Sp,rgb:Ip,rgba:Ip},kr=function(t,e){return An.parse(t,RU.create(e).parseComponentValue())},kA={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Dz={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map(function(A){if(pe(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Lz={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},jl=function(t,e){var A=An.parse(t,e[0]),i=e[1];return i&&Re(i)?{color:A,stop:i}:{color:A,stop:null}},kp=function(t,e){var A=t[0],i=t[t.length-1];A.stop===null&&(A.stop=et),i.stop===null&&(i.stop=WA);for(var n=[],r=0,s=0;s<t.length;s++){var o=t[s].stop;if(o!==null){var a=Ce(o,e);a>r?n.push(a):n.push(r),r=a}else n.push(null)}for(var l=null,s=0;s<n.length;s++){var u=n[s];if(u===null)l===null&&(l=s);else if(l!==null){for(var c=s-l,d=n[l-1],f=(u-d)/(c+1),h=1;h<=c;h++)n[l+h-1]=f*h;l=null}}return t.map(function(g,m){var p=g.color;return{color:p,stop:Math.max(Math.min(1,n[m]/e),0)}})},Mz=function(t,e,A){var i=e/2,n=A/2,r=Ce(t[0],e)-i,s=n-Ce(t[1],A);return(Math.atan2(s,r)+Math.PI*2)%(Math.PI*2)},Nz=function(t,e,A){var i=typeof t=="number"?t:Mz(t,e,A),n=Math.abs(e*Math.sin(i))+Math.abs(A*Math.cos(i)),r=e/2,s=A/2,o=n/2,a=Math.sin(i-Math.PI/2)*o,l=Math.cos(i-Math.PI/2)*o;return[n,r-l,r+l,s-a,s+a]},AA=function(t,e){return Math.sqrt(t*t+e*e)},Ep=function(t,e,A,i,n){var r=[[0,0],[0,e],[t,0],[t,e]];return r.reduce(function(s,o){var a=o[0],l=o[1],u=AA(A-a,i-l);return(n?u<s.optimumDistance:u>s.optimumDistance)?{optimumCorner:o,optimumDistance:u}:s},{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},zz=function(t,e,A,i,n){var r=0,s=0;switch(t.size){case 0:t.shape===0?r=s=Math.min(Math.abs(e),Math.abs(e-i),Math.abs(A),Math.abs(A-n)):t.shape===1&&(r=Math.min(Math.abs(e),Math.abs(e-i)),s=Math.min(Math.abs(A),Math.abs(A-n)));break;case 2:if(t.shape===0)r=s=Math.min(AA(e,A),AA(e,A-n),AA(e-i,A),AA(e-i,A-n));else if(t.shape===1){var o=Math.min(Math.abs(A),Math.abs(A-n))/Math.min(Math.abs(e),Math.abs(e-i)),a=Ep(i,n,e,A,!0),l=a[0],u=a[1];r=AA(l-e,(u-A)/o),s=o*r}break;case 1:t.shape===0?r=s=Math.max(Math.abs(e),Math.abs(e-i),Math.abs(A),Math.abs(A-n)):t.shape===1&&(r=Math.max(Math.abs(e),Math.abs(e-i)),s=Math.max(Math.abs(A),Math.abs(A-n)));break;case 3:if(t.shape===0)r=s=Math.max(AA(e,A),AA(e,A-n),AA(e-i,A),AA(e-i,A-n));else if(t.shape===1){var o=Math.max(Math.abs(A),Math.abs(A-n))/Math.max(Math.abs(e),Math.abs(e-i)),c=Ep(i,n,e,A,!1),l=c[0],u=c[1];r=AA(l-e,(u-A)/o),s=o*r}break}return Array.isArray(t.size)&&(r=Ce(t.size[0],i),s=t.size.length===2?Ce(t.size[1],n):r),[r,s]},Pz=function(t,e){var A=Kt(180),i=[];return vA(e).forEach(function(n,r){if(r===0){var s=n[0];if(s.type===20&&s.value==="to"){A=XU(n);return}else if(JU(s)){A=Vl.parse(t,s);return}}var o=jl(t,n);i.push(o)}),{angle:A,stops:i,type:1}},So=function(t,e){var A=Kt(180),i=[];return vA(e).forEach(function(n,r){if(r===0){var s=n[0];if(s.type===20&&["top","left","right","bottom"].indexOf(s.value)!==-1){A=XU(n);return}else if(JU(s)){A=(Vl.parse(t,s)+Kt(270))%Kt(360);return}}var o=jl(t,n);i.push(o)}),{angle:A,stops:i,type:1}},Rz=function(t,e){var A=Kt(180),i=[],n=1,r=0,s=3,o=[];return vA(e).forEach(function(a,l){var u=a[0];if(l===0){if(pe(u)&&u.value==="linear"){n=1;return}else if(pe(u)&&u.value==="radial"){n=2;return}}if(u.type===18){if(u.name==="from"){var c=An.parse(t,u.values[0]);i.push({stop:et,color:c})}else if(u.name==="to"){var c=An.parse(t,u.values[0]);i.push({stop:WA,color:c})}else if(u.name==="color-stop"){var d=u.values.filter(Di);if(d.length===2){var c=An.parse(t,d[1]),f=d[0];Vi(f)&&i.push({stop:{type:16,number:f.number*100,flags:f.flags},color:c})}}}}),n===1?{angle:(A+Kt(180))%Kt(360),stops:i,type:n}:{size:s,shape:r,stops:i,position:o,type:n}},YU="closest-side",qU="farthest-side",eQ="closest-corner",tQ="farthest-corner",AQ="circle",nQ="ellipse",iQ="cover",rQ="contain",Kz=function(t,e){var A=0,i=3,n=[],r=[];return vA(e).forEach(function(s,o){var a=!0;if(o===0){var l=!1;a=s.reduce(function(c,d){if(l)if(pe(d))switch(d.value){case"center":return r.push(Vh),c;case"top":case"left":return r.push(et),c;case"right":case"bottom":return r.push(WA),c}else(Re(d)||dn(d))&&r.push(d);else if(pe(d))switch(d.value){case AQ:return A=0,!1;case nQ:return A=1,!1;case"at":return l=!0,!1;case YU:return i=0,!1;case iQ:case qU:return i=1,!1;case rQ:case eQ:return i=2,!1;case tQ:return i=3,!1}else if(dn(d)||Re(d))return Array.isArray(i)||(i=[]),i.push(d),!1;return c},a)}if(a){var u=jl(t,s);n.push(u)}}),{size:i,shape:A,stops:n,position:r,type:2}},ko=function(t,e){var A=0,i=3,n=[],r=[];return vA(e).forEach(function(s,o){var a=!0;if(o===0?a=s.reduce(function(u,c){if(pe(c))switch(c.value){case"center":return r.push(Vh),!1;case"top":case"left":return r.push(et),!1;case"right":case"bottom":return r.push(WA),!1}else if(Re(c)||dn(c))return r.push(c),!1;return u},a):o===1&&(a=s.reduce(function(u,c){if(pe(c))switch(c.value){case AQ:return A=0,!1;case nQ:return A=1,!1;case rQ:case YU:return i=0,!1;case qU:return i=1,!1;case eQ:return i=2,!1;case iQ:case tQ:return i=3,!1}else if(dn(c)||Re(c))return Array.isArray(i)||(i=[]),i.push(c),!1;return u},a)),a){var l=jl(t,s);n.push(l)}}),{size:i,shape:A,stops:n,position:r,type:2}},Zz=function(t){return t.type===1},Vz=function(t){return t.type===2},jh={name:"image",parse:function(t,e){if(e.type===22){var A={url:e.value,type:0};return t.cache.addImage(e.value),A}if(e.type===18){var i=sQ[e.name];if(typeof i>"u")throw new Error('Attempting to parse an unsupported image function "'+e.name+'"');return i(t,e.values)}throw new Error("Unsupported image type "+e.type)}};function jz(t){return!(t.type===20&&t.value==="none")&&(t.type!==18||!!sQ[t.name])}var sQ={"linear-gradient":Pz,"-moz-linear-gradient":So,"-ms-linear-gradient":So,"-o-linear-gradient":So,"-webkit-linear-gradient":So,"radial-gradient":Kz,"-moz-radial-gradient":ko,"-ms-radial-gradient":ko,"-o-radial-gradient":ko,"-webkit-radial-gradient":ko,"-webkit-gradient":Rz},Gz={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(t,e){if(e.length===0)return[];var A=e[0];return A.type===20&&A.value==="none"?[]:e.filter(function(i){return Di(i)&&jz(i)}).map(function(i){return jh.parse(t,i)})}},Wz={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(t,e){return e.map(function(A){if(pe(A))switch(A.value){case"padding-box":return 1;case"content-box":return 2}return 0})}},Jz={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(t,e){return vA(e).map(function(A){return A.filter(Re)}).map(ZU)}},Xz={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(t,e){return vA(e).map(function(A){return A.filter(pe).map(function(i){return i.value}).join(" ")}).map(Yz)}},Yz=function(t){switch(t){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;case"repeat":default:return 0}},yi;(function(t){t.AUTO="auto",t.CONTAIN="contain",t.COVER="cover"})(yi||(yi={}));var qz={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(t,e){return vA(e).map(function(A){return A.filter(eP)})}},eP=function(t){return pe(t)||Re(t)},Gl=function(t){return{name:"border-"+t+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},tP=Gl("top"),AP=Gl("right"),nP=Gl("bottom"),iP=Gl("left"),Wl=function(t){return{name:"border-radius-"+t,initialValue:"0 0",prefix:!1,type:1,parse:function(e,A){return ZU(A.filter(Re))}}},rP=Wl("top-left"),sP=Wl("top-right"),oP=Wl("bottom-right"),aP=Wl("bottom-left"),Jl=function(t){return{name:"border-"+t+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,A){switch(A){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},lP=Jl("top"),uP=Jl("right"),cP=Jl("bottom"),dP=Jl("left"),Xl=function(t){return{name:"border-"+t+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,A){return Ns(A)?A.number:0}}},fP=Xl("top"),hP=Xl("right"),gP=Xl("bottom"),mP=Xl("left"),pP={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},vP={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(t,e){switch(e){case"rtl":return 1;case"ltr":default:return 0}}},BP={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(t,e){return e.filter(pe).reduce(function(A,i){return A|wP(i.value)},0)}},wP=function(t){switch(t){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},yP={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},bP={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(t,e){return e.type===20&&e.value==="normal"?0:e.type===17||e.type===15?e.number:0}},Qa;(function(t){t.NORMAL="normal",t.STRICT="strict"})(Qa||(Qa={}));var _P={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){switch(e){case"strict":return Qa.STRICT;case"normal":default:return Qa.NORMAL}}},CP={name:"line-height",initialValue:"normal",prefix:!1,type:4},$p=function(t,e){return pe(t)&&t.value==="normal"?1.2*e:t.type===17?e*t.number:Re(t)?Ce(t,e):e},UP={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(t,e){return e.type===20&&e.value==="none"?null:jh.parse(t,e)}},QP={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(t,e){switch(e){case"inside":return 0;case"outside":default:return 1}}},Hc={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":return 22;case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;case"none":default:return-1}}},Yl=function(t){return{name:"margin-"+t,initialValue:"0",prefix:!1,type:4}},xP=Yl("top"),FP=Yl("right"),IP=Yl("bottom"),SP=Yl("left"),kP={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(t,e){return e.filter(pe).map(function(A){switch(A.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;case"visible":default:return 0}})}},EP={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){switch(e){case"break-word":return"break-word";case"normal":default:return"normal"}}},ql=function(t){return{name:"padding-"+t,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},$P=ql("top"),TP=ql("right"),OP=ql("bottom"),HP=ql("left"),DP={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(t,e){switch(e){case"right":return 2;case"center":case"justify":return 1;case"left":default:return 0}}},LP={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(t,e){switch(e){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},MP={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return e.length===1&&Oc(e[0],"none")?[]:vA(e).map(function(A){for(var i={color:kA.TRANSPARENT,offsetX:et,offsetY:et,blur:et},n=0,r=0;r<A.length;r++){var s=A[r];dn(s)?(n===0?i.offsetX=s:n===1?i.offsetY=s:i.blur=s,n++):i.color=An.parse(t,s)}return i})}},NP={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},zP={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(t,e){if(e.type===20&&e.value==="none")return null;if(e.type===18){var A=KP[e.name];if(typeof A>"u")throw new Error('Attempting to parse an unsupported transform function "'+e.name+'"');return A(e.values)}return null}},PP=function(t){var e=t.filter(function(A){return A.type===17}).map(function(A){return A.number});return e.length===6?e:null},RP=function(t){var e=t.filter(function(a){return a.type===17}).map(function(a){return a.number}),A=e[0],i=e[1];e[2],e[3];var n=e[4],r=e[5];e[6],e[7],e[8],e[9],e[10],e[11];var s=e[12],o=e[13];return e[14],e[15],e.length===16?[A,i,n,r,s,o]:null},KP={matrix:PP,matrix3d:RP},Tp={type:16,number:50,flags:Ms},ZP=[Tp,Tp],VP={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(t,e){var A=e.filter(Re);return A.length!==2?ZP:[A[0],A[1]]}},jP={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(t,e){switch(e){case"hidden":return 1;case"collapse":return 2;case"visible":default:return 0}}},Er;(function(t){t.NORMAL="normal",t.BREAK_ALL="break-all",t.KEEP_ALL="keep-all"})(Er||(Er={}));var GP={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){switch(e){case"break-all":return Er.BREAK_ALL;case"keep-all":return Er.KEEP_ALL;case"normal":default:return Er.NORMAL}}},WP={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(t,e){if(e.type===20)return{auto:!0,order:0};if(Vi(e))return{auto:!1,order:e.number};throw new Error("Invalid z-index number parsed")}},oQ={name:"time",parse:function(t,e){if(e.type===15)switch(e.unit.toLowerCase()){case"s":return 1e3*e.number;case"ms":return e.number}throw new Error("Unsupported time type")}},JP={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(t,e){return Vi(e)?e.number:1}},XP={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},YP={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(t,e){return e.filter(pe).map(function(A){switch(A.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0}).filter(function(A){return A!==0})}},qP={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(t,e){var A=[],i=[];return e.forEach(function(n){switch(n.type){case 20:case 0:A.push(n.value);break;case 17:A.push(n.number.toString());break;case 4:i.push(A.join(" ")),A.length=0;break}}),A.length&&i.push(A.join(" ")),i.map(function(n){return n.indexOf(" ")===-1?n:"'"+n+"'"})}},eR={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},tR={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(t,e){if(Vi(e))return e.number;if(pe(e))switch(e.value){case"bold":return 700;case"normal":default:return 400}return 400}},AR={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return e.filter(pe).map(function(A){return A.value})}},nR={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(t,e){switch(e){case"oblique":return"oblique";case"italic":return"italic";case"normal":default:return"normal"}}},Ve=function(t,e){return(t&e)!==0},iR={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(t,e){if(e.length===0)return[];var A=e[0];return A.type===20&&A.value==="none"?[]:e}},rR={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(e.length===0)return null;var A=e[0];if(A.type===20&&A.value==="none")return null;for(var i=[],n=e.filter(KU),r=0;r<n.length;r++){var s=n[r],o=n[r+1];if(s.type===20){var a=o&&Vi(o)?o.number:1;i.push({counter:s.value,increment:a})}}return i}},sR={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(e.length===0)return[];for(var A=[],i=e.filter(KU),n=0;n<i.length;n++){var r=i[n],s=i[n+1];if(pe(r)&&r.value!=="none"){var o=s&&Vi(s)?s.number:0;A.push({counter:r.value,reset:o})}}return A}},oR={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(t,e){return e.filter(Ns).map(function(A){return oQ.parse(t,A)})}},aR={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(t,e){if(e.length===0)return null;var A=e[0];if(A.type===20&&A.value==="none")return null;var i=[],n=e.filter(Tz);if(n.length%2!==0)return null;for(var r=0;r<n.length;r+=2){var s=n[r].value,o=n[r+1].value;i.push({open:s,close:o})}return i}},Op=function(t,e,A){if(!t)return"";var i=t[Math.min(e,t.length-1)];return i?A?i.open:i.close:""},lR={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(t,e){return e.length===1&&Oc(e[0],"none")?[]:vA(e).map(function(A){for(var i={color:255,offsetX:et,offsetY:et,blur:et,spread:et,inset:!1},n=0,r=0;r<A.length;r++){var s=A[r];Oc(s,"inset")?i.inset=!0:dn(s)?(n===0?i.offsetX=s:n===1?i.offsetY=s:n===2?i.blur=s:i.spread=s,n++):i.color=An.parse(t,s)}return i})}},uR={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(t,e){var A=[0,1,2],i=[];return e.filter(pe).forEach(function(n){switch(n.value){case"stroke":i.push(1);break;case"fill":i.push(0);break;case"markers":i.push(2);break}}),A.forEach(function(n){i.indexOf(n)===-1&&i.push(n)}),i}},cR={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},dR={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(t,e){return Ns(e)?e.number:0}},fR=(function(){function t(e,A){var i,n;this.animationDuration=D(e,oR,A.animationDuration),this.backgroundClip=D(e,Dz,A.backgroundClip),this.backgroundColor=D(e,Lz,A.backgroundColor),this.backgroundImage=D(e,Gz,A.backgroundImage),this.backgroundOrigin=D(e,Wz,A.backgroundOrigin),this.backgroundPosition=D(e,Jz,A.backgroundPosition),this.backgroundRepeat=D(e,Xz,A.backgroundRepeat),this.backgroundSize=D(e,qz,A.backgroundSize),this.borderTopColor=D(e,tP,A.borderTopColor),this.borderRightColor=D(e,AP,A.borderRightColor),this.borderBottomColor=D(e,nP,A.borderBottomColor),this.borderLeftColor=D(e,iP,A.borderLeftColor),this.borderTopLeftRadius=D(e,rP,A.borderTopLeftRadius),this.borderTopRightRadius=D(e,sP,A.borderTopRightRadius),this.borderBottomRightRadius=D(e,oP,A.borderBottomRightRadius),this.borderBottomLeftRadius=D(e,aP,A.borderBottomLeftRadius),this.borderTopStyle=D(e,lP,A.borderTopStyle),this.borderRightStyle=D(e,uP,A.borderRightStyle),this.borderBottomStyle=D(e,cP,A.borderBottomStyle),this.borderLeftStyle=D(e,dP,A.borderLeftStyle),this.borderTopWidth=D(e,fP,A.borderTopWidth),this.borderRightWidth=D(e,hP,A.borderRightWidth),this.borderBottomWidth=D(e,gP,A.borderBottomWidth),this.borderLeftWidth=D(e,mP,A.borderLeftWidth),this.boxShadow=D(e,lR,A.boxShadow),this.color=D(e,pP,A.color),this.direction=D(e,vP,A.direction),this.display=D(e,BP,A.display),this.float=D(e,yP,A.cssFloat),this.fontFamily=D(e,qP,A.fontFamily),this.fontSize=D(e,eR,A.fontSize),this.fontStyle=D(e,nR,A.fontStyle),this.fontVariant=D(e,AR,A.fontVariant),this.fontWeight=D(e,tR,A.fontWeight),this.letterSpacing=D(e,bP,A.letterSpacing),this.lineBreak=D(e,_P,A.lineBreak),this.lineHeight=D(e,CP,A.lineHeight),this.listStyleImage=D(e,UP,A.listStyleImage),this.listStylePosition=D(e,QP,A.listStylePosition),this.listStyleType=D(e,Hc,A.listStyleType),this.marginTop=D(e,xP,A.marginTop),this.marginRight=D(e,FP,A.marginRight),this.marginBottom=D(e,IP,A.marginBottom),this.marginLeft=D(e,SP,A.marginLeft),this.opacity=D(e,JP,A.opacity);var r=D(e,kP,A.overflow);this.overflowX=r[0],this.overflowY=r[r.length>1?1:0],this.overflowWrap=D(e,EP,A.overflowWrap),this.paddingTop=D(e,$P,A.paddingTop),this.paddingRight=D(e,TP,A.paddingRight),this.paddingBottom=D(e,OP,A.paddingBottom),this.paddingLeft=D(e,HP,A.paddingLeft),this.paintOrder=D(e,uR,A.paintOrder),this.position=D(e,LP,A.position),this.textAlign=D(e,DP,A.textAlign),this.textDecorationColor=D(e,XP,(i=A.textDecorationColor)!==null&&i!==void 0?i:A.color),this.textDecorationLine=D(e,YP,(n=A.textDecorationLine)!==null&&n!==void 0?n:A.textDecoration),this.textShadow=D(e,MP,A.textShadow),this.textTransform=D(e,NP,A.textTransform),this.transform=D(e,zP,A.transform),this.transformOrigin=D(e,VP,A.transformOrigin),this.visibility=D(e,jP,A.visibility),this.webkitTextStrokeColor=D(e,cR,A.webkitTextStrokeColor),this.webkitTextStrokeWidth=D(e,dR,A.webkitTextStrokeWidth),this.wordBreak=D(e,GP,A.wordBreak),this.zIndex=D(e,WP,A.zIndex)}return t.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},t.prototype.isTransparent=function(){return nn(this.backgroundColor)},t.prototype.isTransformed=function(){return this.transform!==null},t.prototype.isPositioned=function(){return this.position!==0},t.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},t.prototype.isFloating=function(){return this.float!==0},t.prototype.isInlineLevel=function(){return Ve(this.display,4)||Ve(this.display,33554432)||Ve(this.display,268435456)||Ve(this.display,536870912)||Ve(this.display,67108864)||Ve(this.display,134217728)},t})(),hR=(function(){function t(e,A){this.content=D(e,iR,A.content),this.quotes=D(e,aR,A.quotes)}return t})(),Hp=(function(){function t(e,A){this.counterIncrement=D(e,rR,A.counterIncrement),this.counterReset=D(e,sR,A.counterReset)}return t})(),D=function(t,e,A){var i=new PU,n=A!==null&&typeof A<"u"?A.toString():e.initialValue;i.write(n);var r=new RU(i.read());switch(e.type){case 2:var s=r.parseComponentValue();return e.parse(t,pe(s)?s.value:e.initialValue);case 0:return e.parse(t,r.parseComponentValue());case 1:return e.parse(t,r.parseComponentValues());case 4:return r.parseComponentValue();case 3:switch(e.format){case"angle":return Vl.parse(t,r.parseComponentValue());case"color":return An.parse(t,r.parseComponentValue());case"image":return jh.parse(t,r.parseComponentValue());case"length":var o=r.parseComponentValue();return dn(o)?o:et;case"length-percentage":var a=r.parseComponentValue();return Re(a)?a:et;case"time":return oQ.parse(t,r.parseComponentValue())}break}},gR="data-html2canvas-debug",mR=function(t){var e=t.getAttribute(gR);switch(e){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}},Dc=function(t,e){var A=mR(t);return A===1||e===A},BA=(function(){function t(e,A){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Dc(A,3))debugger;this.styles=new fR(e,window.getComputedStyle(A,null)),Nc(A)&&(this.styles.animationDuration.some(function(i){return i>0})&&(A.style.animationDuration="0s"),this.styles.transform!==null&&(A.style.transform="none")),this.bounds=Kl(this.context,A),Dc(A,4)&&(this.flags|=16)}return t})(),pR="AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=",Dp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",wr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Eo=0;Eo<Dp.length;Eo++)wr[Dp.charCodeAt(Eo)]=Eo;var vR=function(t){var e=t.length*.75,A=t.length,i,n=0,r,s,o,a;t[t.length-1]==="="&&(e--,t[t.length-2]==="="&&e--);var l=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u"&&typeof Uint8Array.prototype.slice<"u"?new ArrayBuffer(e):new Array(e),u=Array.isArray(l)?l:new Uint8Array(l);for(i=0;i<A;i+=4)r=wr[t.charCodeAt(i)],s=wr[t.charCodeAt(i+1)],o=wr[t.charCodeAt(i+2)],a=wr[t.charCodeAt(i+3)],u[n++]=r<<2|s>>4,u[n++]=(s&15)<<4|o>>2,u[n++]=(o&3)<<6|a&63;return l},BR=function(t){for(var e=t.length,A=[],i=0;i<e;i+=2)A.push(t[i+1]<<8|t[i]);return A},wR=function(t){for(var e=t.length,A=[],i=0;i<e;i+=4)A.push(t[i+3]<<24|t[i+2]<<16|t[i+1]<<8|t[i]);return A},Hn=5,Gh=11,Su=2,yR=Gh-Hn,aQ=65536>>Hn,bR=1<<Hn,ku=bR-1,_R=1024>>Hn,CR=aQ+_R,UR=CR,QR=32,xR=UR+QR,FR=65536>>Gh,IR=1<<yR,SR=IR-1,Lp=function(t,e,A){return t.slice?t.slice(e,A):new Uint16Array(Array.prototype.slice.call(t,e,A))},kR=function(t,e,A){return t.slice?t.slice(e,A):new Uint32Array(Array.prototype.slice.call(t,e,A))},ER=function(t,e){var A=vR(t),i=Array.isArray(A)?wR(A):new Uint32Array(A),n=Array.isArray(A)?BR(A):new Uint16Array(A),r=24,s=Lp(n,r/2,i[4]/2),o=i[5]===2?Lp(n,(r+i[4])/2):kR(i,Math.ceil((r+i[4])/4));return new $R(i[0],i[1],i[2],i[3],s,o)},$R=(function(){function t(e,A,i,n,r,s){this.initialValue=e,this.errorValue=A,this.highStart=i,this.highValueIndex=n,this.index=r,this.data=s}return t.prototype.get=function(e){var A;if(e>=0){if(e<55296||e>56319&&e<=65535)return A=this.index[e>>Hn],A=(A<<Su)+(e&ku),this.data[A];if(e<=65535)return A=this.index[aQ+(e-55296>>Hn)],A=(A<<Su)+(e&ku),this.data[A];if(e<this.highStart)return A=xR-FR+(e>>Gh),A=this.index[A],A+=e>>Hn&SR,A=this.index[A],A=(A<<Su)+(e&ku),this.data[A];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},t})(),Mp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",TR=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var $o=0;$o<Mp.length;$o++)TR[Mp.charCodeAt($o)]=$o;var OR=1,Eu=2,$u=3,Np=4,zp=5,HR=7,Pp=8,Tu=9,Ou=10,Rp=11,Kp=12,Zp=13,Vp=14,Hu=15,DR=function(t){for(var e=[],A=0,i=t.length;A<i;){var n=t.charCodeAt(A++);if(n>=55296&&n<=56319&&A<i){var r=t.charCodeAt(A++);(r&64512)===56320?e.push(((n&1023)<<10)+(r&1023)+65536):(e.push(n),A--)}else e.push(n)}return e},LR=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(String.fromCodePoint)return String.fromCodePoint.apply(String,t);var A=t.length;if(!A)return"";for(var i=[],n=-1,r="";++n<A;){var s=t[n];s<=65535?i.push(s):(s-=65536,i.push((s>>10)+55296,s%1024+56320)),(n+1===A||i.length>16384)&&(r+=String.fromCharCode.apply(String,i),i.length=0)}return r},MR=ER(pR),zt="×",Du="÷",NR=function(t){return MR.get(t)},zR=function(t,e,A){var i=A-2,n=e[i],r=e[A-1],s=e[A];if(r===Eu&&s===$u)return zt;if(r===Eu||r===$u||r===Np||s===Eu||s===$u||s===Np)return Du;if(r===Pp&&[Pp,Tu,Rp,Kp].indexOf(s)!==-1||(r===Rp||r===Tu)&&(s===Tu||s===Ou)||(r===Kp||r===Ou)&&s===Ou||s===Zp||s===zp||s===HR||r===OR)return zt;if(r===Zp&&s===Vp){for(;n===zp;)n=e[--i];if(n===Vp)return zt}if(r===Hu&&s===Hu){for(var o=0;n===Hu;)o++,n=e[--i];if(o%2===0)return zt}return Du},PR=function(t){var e=DR(t),A=e.length,i=0,n=0,r=e.map(NR);return{next:function(){if(i>=A)return{done:!0,value:null};for(var s=zt;i<A&&(s=zR(e,r,++i))===zt;);if(s!==zt||i===A){var o=LR.apply(null,e.slice(n,i));return n=i,{value:o,done:!1}}return{done:!0,value:null}}}},RR=function(t){for(var e=PR(t),A=[],i;!(i=e.next()).done;)i.value&&A.push(i.value.slice());return A},KR=function(t){var e=123;if(t.createRange){var A=t.createRange();if(A.getBoundingClientRect){var i=t.createElement("boundtest");i.style.height=e+"px",i.style.display="block",t.body.appendChild(i),A.selectNode(i);var n=A.getBoundingClientRect(),r=Math.round(n.height);if(t.body.removeChild(i),r===e)return!0}}return!1},ZR=function(t){var e=t.createElement("boundtest");e.style.width="50px",e.style.display="block",e.style.fontSize="12px",e.style.letterSpacing="0px",e.style.wordSpacing="0px",t.body.appendChild(e);var A=t.createRange();e.innerHTML=typeof"".repeat=="function"?"👨".repeat(10):"";var i=e.firstChild,n=Zl(i.data).map(function(a){return ze(a)}),r=0,s={},o=n.every(function(a,l){A.setStart(i,r),A.setEnd(i,r+a.length);var u=A.getBoundingClientRect();r+=a.length;var c=u.x>s.x||u.y>s.y;return s=u,l===0?!0:c});return t.body.removeChild(e),o},VR=function(){return typeof new Image().crossOrigin<"u"},jR=function(){return typeof new XMLHttpRequest().responseType=="string"},GR=function(t){var e=new Image,A=t.createElement("canvas"),i=A.getContext("2d");if(!i)return!1;e.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(e,0,0),A.toDataURL()}catch{return!1}return!0},jp=function(t){return t[0]===0&&t[1]===255&&t[2]===0&&t[3]===255},WR=function(t){var e=t.createElement("canvas"),A=100;e.width=A,e.height=A;var i=e.getContext("2d");if(!i)return Promise.reject(!1);i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,A,A);var n=new Image,r=e.toDataURL();n.src=r;var s=Lc(A,A,0,0,n);return i.fillStyle="red",i.fillRect(0,0,A,A),Gp(s).then(function(o){i.drawImage(o,0,0);var a=i.getImageData(0,0,A,A).data;i.fillStyle="red",i.fillRect(0,0,A,A);var l=t.createElement("div");return l.style.backgroundImage="url("+r+")",l.style.height=A+"px",jp(a)?Gp(Lc(A,A,0,0,l)):Promise.reject(!1)}).then(function(o){return i.drawImage(o,0,0),jp(i.getImageData(0,0,A,A).data)}).catch(function(){return!1})},Lc=function(t,e,A,i,n){var r="http://www.w3.org/2000/svg",s=document.createElementNS(r,"svg"),o=document.createElementNS(r,"foreignObject");return s.setAttributeNS(null,"width",t.toString()),s.setAttributeNS(null,"height",e.toString()),o.setAttributeNS(null,"width","100%"),o.setAttributeNS(null,"height","100%"),o.setAttributeNS(null,"x",A.toString()),o.setAttributeNS(null,"y",i.toString()),o.setAttributeNS(null,"externalResourcesRequired","true"),s.appendChild(o),o.appendChild(n),s},Gp=function(t){return new Promise(function(e,A){var i=new Image;i.onload=function(){return e(i)},i.onerror=A,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},Je={get SUPPORT_RANGE_BOUNDS(){var t=KR(document);return Object.defineProperty(Je,"SUPPORT_RANGE_BOUNDS",{value:t}),t},get SUPPORT_WORD_BREAKING(){var t=Je.SUPPORT_RANGE_BOUNDS&&ZR(document);return Object.defineProperty(Je,"SUPPORT_WORD_BREAKING",{value:t}),t},get SUPPORT_SVG_DRAWING(){var t=GR(document);return Object.defineProperty(Je,"SUPPORT_SVG_DRAWING",{value:t}),t},get SUPPORT_FOREIGNOBJECT_DRAWING(){var t=typeof Array.from=="function"&&typeof window.fetch=="function"?WR(document):Promise.resolve(!1);return Object.defineProperty(Je,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:t}),t},get SUPPORT_CORS_IMAGES(){var t=VR();return Object.defineProperty(Je,"SUPPORT_CORS_IMAGES",{value:t}),t},get SUPPORT_RESPONSE_TYPE(){var t=jR();return Object.defineProperty(Je,"SUPPORT_RESPONSE_TYPE",{value:t}),t},get SUPPORT_CORS_XHR(){var t="withCredentials"in new XMLHttpRequest;return Object.defineProperty(Je,"SUPPORT_CORS_XHR",{value:t}),t},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var t=!!(typeof Intl<"u"&&Intl.Segmenter);return Object.defineProperty(Je,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:t}),t}},$r=(function(){function t(e,A){this.text=e,this.bounds=A}return t})(),JR=function(t,e,A,i){var n=qR(e,A),r=[],s=0;return n.forEach(function(o){if(A.textDecorationLine.length||o.trim().length>0)if(Je.SUPPORT_RANGE_BOUNDS){var a=Wp(i,s,o.length).getClientRects();if(a.length>1){var l=Wh(o),u=0;l.forEach(function(d){r.push(new $r(d,$A.fromDOMRectList(t,Wp(i,u+s,d.length).getClientRects()))),u+=d.length})}else r.push(new $r(o,$A.fromDOMRectList(t,a)))}else{var c=i.splitText(o.length);r.push(new $r(o,XR(t,i))),i=c}else Je.SUPPORT_RANGE_BOUNDS||(i=i.splitText(o.length));s+=o.length}),r},XR=function(t,e){var A=e.ownerDocument;if(A){var i=A.createElement("html2canvaswrapper");i.appendChild(e.cloneNode(!0));var n=e.parentNode;if(n){n.replaceChild(i,e);var r=Kl(t,i);return i.firstChild&&n.replaceChild(i.firstChild,i),r}}return $A.EMPTY},Wp=function(t,e,A){var i=t.ownerDocument;if(!i)throw new Error("Node has no owner document");var n=i.createRange();return n.setStart(t,e),n.setEnd(t,e+A),n},Wh=function(t){if(Je.SUPPORT_NATIVE_TEXT_SEGMENTATION){var e=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(e.segment(t)).map(function(A){return A.segment})}return RR(t)},YR=function(t,e){if(Je.SUPPORT_NATIVE_TEXT_SEGMENTATION){var A=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(A.segment(t)).map(function(i){return i.segment})}return tK(t,e)},qR=function(t,e){return e.letterSpacing!==0?Wh(t):YR(t,e)},eK=[32,160,4961,65792,65793,4153,4241],tK=function(t,e){for(var A=FN(t,{lineBreak:e.lineBreak,wordBreak:e.overflowWrap==="break-word"?"break-word":e.wordBreak}),i=[],n,r=function(){if(n.value){var s=n.value.slice(),o=Zl(s),a="";o.forEach(function(l){eK.indexOf(l)===-1?a+=ze(l):(a.length&&i.push(a),i.push(ze(l)),a="")}),a.length&&i.push(a)}};!(n=A.next()).done;)r();return i},AK=(function(){function t(e,A,i){this.text=nK(A.data,i.textTransform),this.textBounds=JR(e,this.text,i,A)}return t})(),nK=function(t,e){switch(e){case 1:return t.toLowerCase();case 3:return t.replace(iK,rK);case 2:return t.toUpperCase();default:return t}},iK=/(^|\s|:|-|\(|\))([a-z])/g,rK=function(t,e,A){return t.length>0?e+A.toUpperCase():t},lQ=(function(t){aA(e,t);function e(A,i){var n=t.call(this,A,i)||this;return n.src=i.currentSrc||i.src,n.intrinsicWidth=i.naturalWidth,n.intrinsicHeight=i.naturalHeight,n.context.cache.addImage(n.src),n}return e})(BA),uQ=(function(t){aA(e,t);function e(A,i){var n=t.call(this,A,i)||this;return n.canvas=i,n.intrinsicWidth=i.width,n.intrinsicHeight=i.height,n}return e})(BA),cQ=(function(t){aA(e,t);function e(A,i){var n=t.call(this,A,i)||this,r=new XMLSerializer,s=Kl(A,i);return i.setAttribute("width",s.width+"px"),i.setAttribute("height",s.height+"px"),n.svg="data:image/svg+xml,"+encodeURIComponent(r.serializeToString(i)),n.intrinsicWidth=i.width.baseVal.value,n.intrinsicHeight=i.height.baseVal.value,n.context.cache.addImage(n.svg),n}return e})(BA),dQ=(function(t){aA(e,t);function e(A,i){var n=t.call(this,A,i)||this;return n.value=i.value,n}return e})(BA),Mc=(function(t){aA(e,t);function e(A,i){var n=t.call(this,A,i)||this;return n.start=i.start,n.reversed=typeof i.reversed=="boolean"&&i.reversed===!0,n}return e})(BA),sK=[{type:15,flags:0,unit:"px",number:3}],oK=[{type:16,flags:0,number:50}],aK=function(t){return t.width>t.height?new $A(t.left+(t.width-t.height)/2,t.top,t.height,t.height):t.width<t.height?new $A(t.left,t.top+(t.height-t.width)/2,t.width,t.width):t},lK=function(t){var e=t.type===uK?new Array(t.value.length+1).join("•"):t.value;return e.length===0?t.placeholder||"":e},xa="checkbox",Fa="radio",uK="password",Jp=707406591,Jh=(function(t){aA(e,t);function e(A,i){var n=t.call(this,A,i)||this;switch(n.type=i.type.toLowerCase(),n.checked=i.checked,n.value=lK(i),(n.type===xa||n.type===Fa)&&(n.styles.backgroundColor=3739148031,n.styles.borderTopColor=n.styles.borderRightColor=n.styles.borderBottomColor=n.styles.borderLeftColor=2779096575,n.styles.borderTopWidth=n.styles.borderRightWidth=n.styles.borderBottomWidth=n.styles.borderLeftWidth=1,n.styles.borderTopStyle=n.styles.borderRightStyle=n.styles.borderBottomStyle=n.styles.borderLeftStyle=1,n.styles.backgroundClip=[0],n.styles.backgroundOrigin=[0],n.bounds=aK(n.bounds)),n.type){case xa:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=sK;break;case Fa:n.styles.borderTopRightRadius=n.styles.borderTopLeftRadius=n.styles.borderBottomRightRadius=n.styles.borderBottomLeftRadius=oK;break}return n}return e})(BA),fQ=(function(t){aA(e,t);function e(A,i){var n=t.call(this,A,i)||this,r=i.options[i.selectedIndex||0];return n.value=r&&r.text||"",n}return e})(BA),hQ=(function(t){aA(e,t);function e(A,i){var n=t.call(this,A,i)||this;return n.value=i.value,n}return e})(BA),gQ=(function(t){aA(e,t);function e(A,i){var n=t.call(this,A,i)||this;n.src=i.src,n.width=parseInt(i.width,10)||0,n.height=parseInt(i.height,10)||0,n.backgroundColor=n.styles.backgroundColor;try{if(i.contentWindow&&i.contentWindow.document&&i.contentWindow.document.documentElement){n.tree=pQ(A,i.contentWindow.document.documentElement);var r=i.contentWindow.document.documentElement?kr(A,getComputedStyle(i.contentWindow.document.documentElement).backgroundColor):kA.TRANSPARENT,s=i.contentWindow.document.body?kr(A,getComputedStyle(i.contentWindow.document.body).backgroundColor):kA.TRANSPARENT;n.backgroundColor=nn(r)?nn(s)?n.styles.backgroundColor:s:r}}catch{}return n}return e})(BA),cK=["OL","UL","MENU"],Go=function(t,e,A,i){for(var n=e.firstChild,r=void 0;n;n=r)if(r=n.nextSibling,vQ(n)&&n.data.trim().length>0)A.textNodes.push(new AK(t,n,A.styles));else if(hi(n))if(bQ(n)&&n.assignedNodes)n.assignedNodes().forEach(function(o){return Go(t,o,A,i)});else{var s=mQ(t,n);s.styles.isVisible()&&(dK(n,s,i)?s.flags|=4:fK(s.styles)&&(s.flags|=2),cK.indexOf(n.tagName)!==-1&&(s.flags|=8),A.elements.push(s),n.slot,n.shadowRoot?Go(t,n.shadowRoot,s,i):!Ia(n)&&!BQ(n)&&!Sa(n)&&Go(t,n,s,i))}},mQ=function(t,e){return zc(e)?new lQ(t,e):wQ(e)?new uQ(t,e):BQ(e)?new cQ(t,e):hK(e)?new dQ(t,e):gK(e)?new Mc(t,e):mK(e)?new Jh(t,e):Sa(e)?new fQ(t,e):Ia(e)?new hQ(t,e):yQ(e)?new gQ(t,e):new BA(t,e)},pQ=function(t,e){var A=mQ(t,e);return A.flags|=4,Go(t,e,A,A),A},dK=function(t,e,A){return e.styles.isPositionedWithZIndex()||e.styles.opacity<1||e.styles.isTransformed()||Xh(t)&&A.styles.isTransparent()},fK=function(t){return t.isPositioned()||t.isFloating()},vQ=function(t){return t.nodeType===Node.TEXT_NODE},hi=function(t){return t.nodeType===Node.ELEMENT_NODE},Nc=function(t){return hi(t)&&typeof t.style<"u"&&!Wo(t)},Wo=function(t){return typeof t.className=="object"},hK=function(t){return t.tagName==="LI"},gK=function(t){return t.tagName==="OL"},mK=function(t){return t.tagName==="INPUT"},pK=function(t){return t.tagName==="HTML"},BQ=function(t){return t.tagName==="svg"},Xh=function(t){return t.tagName==="BODY"},wQ=function(t){return t.tagName==="CANVAS"},Xp=function(t){return t.tagName==="VIDEO"},zc=function(t){return t.tagName==="IMG"},yQ=function(t){return t.tagName==="IFRAME"},Yp=function(t){return t.tagName==="STYLE"},vK=function(t){return t.tagName==="SCRIPT"},Ia=function(t){return t.tagName==="TEXTAREA"},Sa=function(t){return t.tagName==="SELECT"},bQ=function(t){return t.tagName==="SLOT"},qp=function(t){return t.tagName.indexOf("-")>0},BK=(function(){function t(){this.counters={}}return t.prototype.getCounterValue=function(e){var A=this.counters[e];return A&&A.length?A[A.length-1]:1},t.prototype.getCounterValues=function(e){var A=this.counters[e];return A||[]},t.prototype.pop=function(e){var A=this;e.forEach(function(i){return A.counters[i].pop()})},t.prototype.parse=function(e){var A=this,i=e.counterIncrement,n=e.counterReset,r=!0;i!==null&&i.forEach(function(o){var a=A.counters[o.counter];a&&o.increment!==0&&(r=!1,a.length||a.push(1),a[Math.max(0,a.length-1)]+=o.increment)});var s=[];return r&&n.forEach(function(o){var a=A.counters[o.counter];s.push(o.counter),a||(a=A.counters[o.counter]=[]),a.push(o.reset)}),s},t})(),ev={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},tv={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},wK={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},yK={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Ai=function(t,e,A,i,n,r){return t<e||t>A?es(t,n,r.length>0):i.integers.reduce(function(s,o,a){for(;t>=o;)t-=o,s+=i.values[a];return s},"")+r},_Q=function(t,e,A,i){var n="";do A||t--,n=i(t)+n,t/=e;while(t*e>=e);return n},Ne=function(t,e,A,i,n){var r=A-e+1;return(t<0?"-":"")+(_Q(Math.abs(t),r,i,function(s){return ze(Math.floor(s%r)+e)})+n)},wn=function(t,e,A){A===void 0&&(A=". ");var i=e.length;return _Q(Math.abs(t),i,!1,function(n){return e[Math.floor(n%i)]})+A},li=1,MA=2,NA=4,yr=8,bA=function(t,e,A,i,n,r){if(t<-9999||t>9999)return es(t,4,n.length>0);var s=Math.abs(t),o=n;if(s===0)return e[0]+o;for(var a=0;s>0&&a<=4;a++){var l=s%10;l===0&&Ve(r,li)&&o!==""?o=e[l]+o:l>1||l===1&&a===0||l===1&&a===1&&Ve(r,MA)||l===1&&a===1&&Ve(r,NA)&&t>100||l===1&&a>1&&Ve(r,yr)?o=e[l]+(a>0?A[a-1]:"")+o:l===1&&a>0&&(o=A[a-1]+o),s=Math.floor(s/10)}return(t<0?i:"")+o},Av="十百千萬",nv="拾佰仟萬",iv="マイナス",Lu="마이너스",es=function(t,e,A){var i=A?". ":"",n=A?"、":"",r=A?", ":"",s=A?" ":"";switch(e){case 0:return"•"+s;case 1:return"◦"+s;case 2:return"◾"+s;case 5:var o=Ne(t,48,57,!0,i);return o.length<4?"0"+o:o;case 4:return wn(t,"〇一二三四五六七八九",n);case 6:return Ai(t,1,3999,ev,3,i).toLowerCase();case 7:return Ai(t,1,3999,ev,3,i);case 8:return Ne(t,945,969,!1,i);case 9:return Ne(t,97,122,!1,i);case 10:return Ne(t,65,90,!1,i);case 11:return Ne(t,1632,1641,!0,i);case 12:case 49:return Ai(t,1,9999,tv,3,i);case 35:return Ai(t,1,9999,tv,3,i).toLowerCase();case 13:return Ne(t,2534,2543,!0,i);case 14:case 30:return Ne(t,6112,6121,!0,i);case 15:return wn(t,"子丑寅卯辰巳午未申酉戌亥",n);case 16:return wn(t,"甲乙丙丁戊己庚辛壬癸",n);case 17:case 48:return bA(t,"零一二三四五六七八九",Av,"負",n,MA|NA|yr);case 47:return bA(t,"零壹貳參肆伍陸柒捌玖",nv,"負",n,li|MA|NA|yr);case 42:return bA(t,"零一二三四五六七八九",Av,"负",n,MA|NA|yr);case 41:return bA(t,"零壹贰叁肆伍陆柒捌玖",nv,"负",n,li|MA|NA|yr);case 26:return bA(t,"〇一二三四五六七八九","十百千万",iv,n,0);case 25:return bA(t,"零壱弐参四伍六七八九","拾百千万",iv,n,li|MA|NA);case 31:return bA(t,"영일이삼사오육칠팔구","십백천만",Lu,r,li|MA|NA);case 33:return bA(t,"零一二三四五六七八九","十百千萬",Lu,r,0);case 32:return bA(t,"零壹貳參四五六七八九","拾百千",Lu,r,li|MA|NA);case 18:return Ne(t,2406,2415,!0,i);case 20:return Ai(t,1,19999,yK,3,i);case 21:return Ne(t,2790,2799,!0,i);case 22:return Ne(t,2662,2671,!0,i);case 22:return Ai(t,1,10999,wK,3,i);case 23:return wn(t,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return wn(t,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return Ne(t,3302,3311,!0,i);case 28:return wn(t,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case 29:return wn(t,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case 34:return Ne(t,3792,3801,!0,i);case 37:return Ne(t,6160,6169,!0,i);case 38:return Ne(t,4160,4169,!0,i);case 39:return Ne(t,2918,2927,!0,i);case 40:return Ne(t,1776,1785,!0,i);case 43:return Ne(t,3046,3055,!0,i);case 44:return Ne(t,3174,3183,!0,i);case 45:return Ne(t,3664,3673,!0,i);case 46:return Ne(t,3872,3881,!0,i);case 3:default:return Ne(t,48,57,!0,i)}},CQ="data-html2canvas-ignore",rv=(function(){function t(e,A,i){if(this.context=e,this.options=i,this.scrolledElements=[],this.referenceElement=A,this.counters=new BK,this.quoteDepth=0,!A.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(A.ownerDocument.documentElement,!1)}return t.prototype.toIFrame=function(e,A){var i=this,n=bK(e,A);if(!n.contentWindow)return Promise.reject("Unable to find iframe window");var r=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,o=n.contentWindow,a=o.document,l=UK(n).then(function(){return pt(i,void 0,void 0,function(){var u,c;return nt(this,function(d){switch(d.label){case 0:return this.scrolledElements.forEach(IK),o&&(o.scrollTo(A.left,A.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(o.scrollY!==A.top||o.scrollX!==A.left)&&(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-A.left,o.scrollY-A.top,0,0))),u=this.options.onclone,c=this.clonedReferenceElement,typeof c>"u"?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:a.fonts&&a.fonts.ready?[4,a.fonts.ready]:[3,2];case 1:d.sent(),d.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,CK(a)]:[3,4];case 3:d.sent(),d.label=4;case 4:return typeof u=="function"?[2,Promise.resolve().then(function(){return u(a,c)}).then(function(){return n})]:[2,n]}})})});return a.open(),a.write(xK(document.doctype)+"<html></html>"),FK(this.referenceElement.ownerDocument,r,s),a.replaceChild(a.adoptNode(this.documentElement),a.documentElement),a.close(),l},t.prototype.createElementClone=function(e){if(Dc(e,2))debugger;if(wQ(e))return this.createCanvasClone(e);if(Xp(e))return this.createVideoClone(e);if(Yp(e))return this.createStyleClone(e);var A=e.cloneNode(!1);return zc(A)&&(zc(e)&&e.currentSrc&&e.currentSrc!==e.src&&(A.src=e.currentSrc,A.srcset=""),A.loading==="lazy"&&(A.loading="eager")),qp(A)?this.createCustomElementClone(A):A},t.prototype.createCustomElementClone=function(e){var A=document.createElement("html2canvascustomelement");return Mu(e.style,A),A},t.prototype.createStyleClone=function(e){try{var A=e.sheet;if(A&&A.cssRules){var i=[].slice.call(A.cssRules,0).reduce(function(r,s){return s&&typeof s.cssText=="string"?r+s.cssText:r},""),n=e.cloneNode(!1);return n.textContent=i,n}}catch(r){if(this.context.logger.error("Unable to access cssRules property",r),r.name!=="SecurityError")throw r}return e.cloneNode(!1)},t.prototype.createCanvasClone=function(e){var A;if(this.options.inlineImages&&e.ownerDocument){var i=e.ownerDocument.createElement("img");try{return i.src=e.toDataURL(),i}catch{this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var n=e.cloneNode(!1);try{n.width=e.width,n.height=e.height;var r=e.getContext("2d"),s=n.getContext("2d");if(s)if(!this.options.allowTaint&&r)s.putImageData(r.getImageData(0,0,e.width,e.height),0,0);else{var o=(A=e.getContext("webgl2"))!==null&&A!==void 0?A:e.getContext("webgl");if(o){var a=o.getContextAttributes();(a==null?void 0:a.preserveDrawingBuffer)===!1&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}s.drawImage(e,0,0)}return n}catch{this.context.logger.info("Unable to clone canvas as it is tainted",e)}return n},t.prototype.createVideoClone=function(e){var A=e.ownerDocument.createElement("canvas");A.width=e.offsetWidth,A.height=e.offsetHeight;var i=A.getContext("2d");try{return i&&(i.drawImage(e,0,0,A.width,A.height),this.options.allowTaint||i.getImageData(0,0,A.width,A.height)),A}catch{this.context.logger.info("Unable to clone video as it is tainted",e)}var n=e.ownerDocument.createElement("canvas");return n.width=e.offsetWidth,n.height=e.offsetHeight,n},t.prototype.appendChildNode=function(e,A,i){(!hi(A)||!vK(A)&&!A.hasAttribute(CQ)&&(typeof this.options.ignoreElements!="function"||!this.options.ignoreElements(A)))&&(!this.options.copyStyles||!hi(A)||!Yp(A))&&e.appendChild(this.cloneNode(A,i))},t.prototype.cloneChildNodes=function(e,A,i){for(var n=this,r=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;r;r=r.nextSibling)if(hi(r)&&bQ(r)&&typeof r.assignedNodes=="function"){var s=r.assignedNodes();s.length&&s.forEach(function(o){return n.appendChildNode(A,o,i)})}else this.appendChildNode(A,r,i)},t.prototype.cloneNode=function(e,A){if(vQ(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var i=e.ownerDocument.defaultView;if(i&&hi(e)&&(Nc(e)||Wo(e))){var n=this.createElementClone(e);n.style.transitionProperty="none";var r=i.getComputedStyle(e),s=i.getComputedStyle(e,":before"),o=i.getComputedStyle(e,":after");this.referenceElement===e&&Nc(n)&&(this.clonedReferenceElement=n),Xh(n)&&EK(n);var a=this.counters.parse(new Hp(this.context,r)),l=this.resolvePseudoContent(e,n,s,Tr.BEFORE);qp(e)&&(A=!0),Xp(e)||this.cloneChildNodes(e,n,A),l&&n.insertBefore(l,n.firstChild);var u=this.resolvePseudoContent(e,n,o,Tr.AFTER);return u&&n.appendChild(u),this.counters.pop(a),(r&&(this.options.copyStyles||Wo(e))&&!yQ(e)||A)&&Mu(r,n),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([n,e.scrollLeft,e.scrollTop]),(Ia(e)||Sa(e))&&(Ia(n)||Sa(n))&&(n.value=e.value),n}return e.cloneNode(!1)},t.prototype.resolvePseudoContent=function(e,A,i,n){var r=this;if(i){var s=i.content,o=A.ownerDocument;if(!(!o||!s||s==="none"||s==="-moz-alt-content"||i.display==="none")){this.counters.parse(new Hp(this.context,i));var a=new hR(this.context,i),l=o.createElement("html2canvaspseudoelement");Mu(i,l),a.content.forEach(function(c){if(c.type===0)l.appendChild(o.createTextNode(c.value));else if(c.type===22){var d=o.createElement("img");d.src=c.value,d.style.opacity="1",l.appendChild(d)}else if(c.type===18){if(c.name==="attr"){var f=c.values.filter(pe);f.length&&l.appendChild(o.createTextNode(e.getAttribute(f[0].value)||""))}else if(c.name==="counter"){var h=c.values.filter(Di),g=h[0],m=h[1];if(g&&pe(g)){var p=r.counters.getCounterValue(g.value),B=m&&pe(m)?Hc.parse(r.context,m.value):3;l.appendChild(o.createTextNode(es(p,B,!1)))}}else if(c.name==="counters"){var b=c.values.filter(Di),g=b[0],_=b[1],m=b[2];if(g&&pe(g)){var y=r.counters.getCounterValues(g.value),w=m&&pe(m)?Hc.parse(r.context,m.value):3,U=_&&_.type===0?_.value:"",F=y.map(function(M){return es(M,w,!1)}).join(U);l.appendChild(o.createTextNode(F))}}}else if(c.type===20)switch(c.value){case"open-quote":l.appendChild(o.createTextNode(Op(a.quotes,r.quoteDepth++,!0)));break;case"close-quote":l.appendChild(o.createTextNode(Op(a.quotes,--r.quoteDepth,!1)));break;default:l.appendChild(o.createTextNode(c.value))}}),l.className=Pc+" "+Rc;var u=n===Tr.BEFORE?" "+Pc:" "+Rc;return Wo(A)?A.className.baseValue+=u:A.className+=u,l}}},t.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},t})(),Tr;(function(t){t[t.BEFORE=0]="BEFORE",t[t.AFTER=1]="AFTER"})(Tr||(Tr={}));var bK=function(t,e){var A=t.createElement("iframe");return A.className="html2canvas-container",A.style.visibility="hidden",A.style.position="fixed",A.style.left="-10000px",A.style.top="0px",A.style.border="0",A.width=e.width.toString(),A.height=e.height.toString(),A.scrolling="no",A.setAttribute(CQ,"true"),t.body.appendChild(A),A},_K=function(t){return new Promise(function(e){if(t.complete){e();return}if(!t.src){e();return}t.onload=e,t.onerror=e})},CK=function(t){return Promise.all([].slice.call(t.images,0).map(_K))},UK=function(t){return new Promise(function(e,A){var i=t.contentWindow;if(!i)return A("No window assigned for iframe");var n=i.document;i.onload=t.onload=function(){i.onload=t.onload=null;var r=setInterval(function(){n.body.childNodes.length>0&&n.readyState==="complete"&&(clearInterval(r),e(t))},50)}})},QK=["all","d","content"],Mu=function(t,e){for(var A=t.length-1;A>=0;A--){var i=t.item(A);QK.indexOf(i)===-1&&e.style.setProperty(i,t.getPropertyValue(i))}return e},xK=function(t){var e="";return t&&(e+="<!DOCTYPE ",t.name&&(e+=t.name),t.internalSubset&&(e+=t.internalSubset),t.publicId&&(e+='"'+t.publicId+'"'),t.systemId&&(e+='"'+t.systemId+'"'),e+=">"),e},FK=function(t,e,A){t&&t.defaultView&&(e!==t.defaultView.pageXOffset||A!==t.defaultView.pageYOffset)&&t.defaultView.scrollTo(e,A)},IK=function(t){var e=t[0],A=t[1],i=t[2];e.scrollLeft=A,e.scrollTop=i},SK=":before",kK=":after",Pc="___html2canvas___pseudoelement_before",Rc="___html2canvas___pseudoelement_after",sv=`{
|
|
198
|
+
content: "" !important;
|
|
199
|
+
display: none !important;
|
|
200
|
+
}`,EK=function(t){$K(t,"."+Pc+SK+sv+`
|
|
201
|
+
.`+Rc+kK+sv)},$K=function(t,e){var A=t.ownerDocument;if(A){var i=A.createElement("style");i.textContent=e,t.appendChild(i)}},UQ=(function(){function t(){}return t.getOrigin=function(e){var A=t._link;return A?(A.href=e,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},t.isSameOrigin=function(e){return t.getOrigin(e)===t._origin},t.setContext=function(e){t._link=e.document.createElement("a"),t._origin=t.getOrigin(e.location.href)},t._origin="about:blank",t})(),TK=(function(){function t(e,A){this.context=e,this._options=A,this._cache={}}return t.prototype.addImage=function(e){var A=Promise.resolve();return this.has(e)||(zu(e)||LK(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),A},t.prototype.match=function(e){return this._cache[e]},t.prototype.loadImage=function(e){return pt(this,void 0,void 0,function(){var A,i,n,r,s=this;return nt(this,function(o){switch(o.label){case 0:return A=UQ.isSameOrigin(e),i=!Nu(e)&&this._options.useCORS===!0&&Je.SUPPORT_CORS_IMAGES&&!A,n=!Nu(e)&&!A&&!zu(e)&&typeof this._options.proxy=="string"&&Je.SUPPORT_CORS_XHR&&!i,!A&&this._options.allowTaint===!1&&!Nu(e)&&!zu(e)&&!n&&!i?[2]:(r=e,n?[4,this.proxy(r)]:[3,2]);case 1:r=o.sent(),o.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise(function(a,l){var u=new Image;u.onload=function(){return a(u)},u.onerror=l,(MK(r)||i)&&(u.crossOrigin="anonymous"),u.src=r,u.complete===!0&&setTimeout(function(){return a(u)},500),s._options.imageTimeout>0&&setTimeout(function(){return l("Timed out ("+s._options.imageTimeout+"ms) loading image")},s._options.imageTimeout)})];case 3:return[2,o.sent()]}})})},t.prototype.has=function(e){return typeof this._cache[e]<"u"},t.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},t.prototype.proxy=function(e){var A=this,i=this._options.proxy;if(!i)throw new Error("No proxy defined");var n=e.substring(0,256);return new Promise(function(r,s){var o=Je.SUPPORT_RESPONSE_TYPE?"blob":"text",a=new XMLHttpRequest;a.onload=function(){if(a.status===200)if(o==="text")r(a.response);else{var c=new FileReader;c.addEventListener("load",function(){return r(c.result)},!1),c.addEventListener("error",function(d){return s(d)},!1),c.readAsDataURL(a.response)}else s("Failed to proxy resource "+n+" with status code "+a.status)},a.onerror=s;var l=i.indexOf("?")>-1?"&":"?";if(a.open("GET",""+i+l+"url="+encodeURIComponent(e)+"&responseType="+o),o!=="text"&&a instanceof XMLHttpRequest&&(a.responseType=o),A._options.imageTimeout){var u=A._options.imageTimeout;a.timeout=u,a.ontimeout=function(){return s("Timed out ("+u+"ms) proxying "+n)}}a.send()})},t})(),OK=/^data:image\/svg\+xml/i,HK=/^data:image\/.*;base64,/i,DK=/^data:image\/.*/i,LK=function(t){return Je.SUPPORT_SVG_DRAWING||!NK(t)},Nu=function(t){return DK.test(t)},MK=function(t){return HK.test(t)},zu=function(t){return t.substr(0,4)==="blob"},NK=function(t){return t.substr(-3).toLowerCase()==="svg"||OK.test(t)},H=(function(){function t(e,A){this.type=0,this.x=e,this.y=A}return t.prototype.add=function(e,A){return new t(this.x+e,this.y+A)},t})(),ni=function(t,e,A){return new H(t.x+(e.x-t.x)*A,t.y+(e.y-t.y)*A)},To=(function(){function t(e,A,i,n){this.type=1,this.start=e,this.startControl=A,this.endControl=i,this.end=n}return t.prototype.subdivide=function(e,A){var i=ni(this.start,this.startControl,e),n=ni(this.startControl,this.endControl,e),r=ni(this.endControl,this.end,e),s=ni(i,n,e),o=ni(n,r,e),a=ni(s,o,e);return A?new t(this.start,i,s,a):new t(a,o,r,this.end)},t.prototype.add=function(e,A){return new t(this.start.add(e,A),this.startControl.add(e,A),this.endControl.add(e,A),this.end.add(e,A))},t.prototype.reverse=function(){return new t(this.end,this.endControl,this.startControl,this.start)},t})(),Pt=function(t){return t.type===1},zK=(function(){function t(e){var A=e.styles,i=e.bounds,n=Br(A.borderTopLeftRadius,i.width,i.height),r=n[0],s=n[1],o=Br(A.borderTopRightRadius,i.width,i.height),a=o[0],l=o[1],u=Br(A.borderBottomRightRadius,i.width,i.height),c=u[0],d=u[1],f=Br(A.borderBottomLeftRadius,i.width,i.height),h=f[0],g=f[1],m=[];m.push((r+a)/i.width),m.push((h+c)/i.width),m.push((s+g)/i.height),m.push((l+d)/i.height);var p=Math.max.apply(Math,m);p>1&&(r/=p,s/=p,a/=p,l/=p,c/=p,d/=p,h/=p,g/=p);var B=i.width-a,b=i.height-d,_=i.width-c,y=i.height-g,w=A.borderTopWidth,U=A.borderRightWidth,F=A.borderBottomWidth,x=A.borderLeftWidth,$=Ce(A.paddingTop,e.bounds.width),M=Ce(A.paddingRight,e.bounds.width),z=Ce(A.paddingBottom,e.bounds.width),R=Ce(A.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=r>0||s>0?xe(i.left+x/3,i.top+w/3,r-x/3,s-w/3,ce.TOP_LEFT):new H(i.left+x/3,i.top+w/3),this.topRightBorderDoubleOuterBox=r>0||s>0?xe(i.left+B,i.top+w/3,a-U/3,l-w/3,ce.TOP_RIGHT):new H(i.left+i.width-U/3,i.top+w/3),this.bottomRightBorderDoubleOuterBox=c>0||d>0?xe(i.left+_,i.top+b,c-U/3,d-F/3,ce.BOTTOM_RIGHT):new H(i.left+i.width-U/3,i.top+i.height-F/3),this.bottomLeftBorderDoubleOuterBox=h>0||g>0?xe(i.left+x/3,i.top+y,h-x/3,g-F/3,ce.BOTTOM_LEFT):new H(i.left+x/3,i.top+i.height-F/3),this.topLeftBorderDoubleInnerBox=r>0||s>0?xe(i.left+x*2/3,i.top+w*2/3,r-x*2/3,s-w*2/3,ce.TOP_LEFT):new H(i.left+x*2/3,i.top+w*2/3),this.topRightBorderDoubleInnerBox=r>0||s>0?xe(i.left+B,i.top+w*2/3,a-U*2/3,l-w*2/3,ce.TOP_RIGHT):new H(i.left+i.width-U*2/3,i.top+w*2/3),this.bottomRightBorderDoubleInnerBox=c>0||d>0?xe(i.left+_,i.top+b,c-U*2/3,d-F*2/3,ce.BOTTOM_RIGHT):new H(i.left+i.width-U*2/3,i.top+i.height-F*2/3),this.bottomLeftBorderDoubleInnerBox=h>0||g>0?xe(i.left+x*2/3,i.top+y,h-x*2/3,g-F*2/3,ce.BOTTOM_LEFT):new H(i.left+x*2/3,i.top+i.height-F*2/3),this.topLeftBorderStroke=r>0||s>0?xe(i.left+x/2,i.top+w/2,r-x/2,s-w/2,ce.TOP_LEFT):new H(i.left+x/2,i.top+w/2),this.topRightBorderStroke=r>0||s>0?xe(i.left+B,i.top+w/2,a-U/2,l-w/2,ce.TOP_RIGHT):new H(i.left+i.width-U/2,i.top+w/2),this.bottomRightBorderStroke=c>0||d>0?xe(i.left+_,i.top+b,c-U/2,d-F/2,ce.BOTTOM_RIGHT):new H(i.left+i.width-U/2,i.top+i.height-F/2),this.bottomLeftBorderStroke=h>0||g>0?xe(i.left+x/2,i.top+y,h-x/2,g-F/2,ce.BOTTOM_LEFT):new H(i.left+x/2,i.top+i.height-F/2),this.topLeftBorderBox=r>0||s>0?xe(i.left,i.top,r,s,ce.TOP_LEFT):new H(i.left,i.top),this.topRightBorderBox=a>0||l>0?xe(i.left+B,i.top,a,l,ce.TOP_RIGHT):new H(i.left+i.width,i.top),this.bottomRightBorderBox=c>0||d>0?xe(i.left+_,i.top+b,c,d,ce.BOTTOM_RIGHT):new H(i.left+i.width,i.top+i.height),this.bottomLeftBorderBox=h>0||g>0?xe(i.left,i.top+y,h,g,ce.BOTTOM_LEFT):new H(i.left,i.top+i.height),this.topLeftPaddingBox=r>0||s>0?xe(i.left+x,i.top+w,Math.max(0,r-x),Math.max(0,s-w),ce.TOP_LEFT):new H(i.left+x,i.top+w),this.topRightPaddingBox=a>0||l>0?xe(i.left+Math.min(B,i.width-U),i.top+w,B>i.width+U?0:Math.max(0,a-U),Math.max(0,l-w),ce.TOP_RIGHT):new H(i.left+i.width-U,i.top+w),this.bottomRightPaddingBox=c>0||d>0?xe(i.left+Math.min(_,i.width-x),i.top+Math.min(b,i.height-F),Math.max(0,c-U),Math.max(0,d-F),ce.BOTTOM_RIGHT):new H(i.left+i.width-U,i.top+i.height-F),this.bottomLeftPaddingBox=h>0||g>0?xe(i.left+x,i.top+Math.min(y,i.height-F),Math.max(0,h-x),Math.max(0,g-F),ce.BOTTOM_LEFT):new H(i.left+x,i.top+i.height-F),this.topLeftContentBox=r>0||s>0?xe(i.left+x+R,i.top+w+$,Math.max(0,r-(x+R)),Math.max(0,s-(w+$)),ce.TOP_LEFT):new H(i.left+x+R,i.top+w+$),this.topRightContentBox=a>0||l>0?xe(i.left+Math.min(B,i.width+x+R),i.top+w+$,B>i.width+x+R?0:a-x+R,l-(w+$),ce.TOP_RIGHT):new H(i.left+i.width-(U+M),i.top+w+$),this.bottomRightContentBox=c>0||d>0?xe(i.left+Math.min(_,i.width-(x+R)),i.top+Math.min(b,i.height+w+$),Math.max(0,c-(U+M)),d-(F+z),ce.BOTTOM_RIGHT):new H(i.left+i.width-(U+M),i.top+i.height-(F+z)),this.bottomLeftContentBox=h>0||g>0?xe(i.left+x+R,i.top+y,Math.max(0,h-(x+R)),g-(F+z),ce.BOTTOM_LEFT):new H(i.left+x+R,i.top+i.height-(F+z))}return t})(),ce;(function(t){t[t.TOP_LEFT=0]="TOP_LEFT",t[t.TOP_RIGHT=1]="TOP_RIGHT",t[t.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",t[t.BOTTOM_LEFT=3]="BOTTOM_LEFT"})(ce||(ce={}));var xe=function(t,e,A,i,n){var r=4*((Math.sqrt(2)-1)/3),s=A*r,o=i*r,a=t+A,l=e+i;switch(n){case ce.TOP_LEFT:return new To(new H(t,l),new H(t,l-o),new H(a-s,e),new H(a,e));case ce.TOP_RIGHT:return new To(new H(t,e),new H(t+s,e),new H(a,l-o),new H(a,l));case ce.BOTTOM_RIGHT:return new To(new H(a,e),new H(a,e+o),new H(t+s,l),new H(t,l));case ce.BOTTOM_LEFT:default:return new To(new H(a,l),new H(a-s,l),new H(t,e+o),new H(t,e))}},ka=function(t){return[t.topLeftBorderBox,t.topRightBorderBox,t.bottomRightBorderBox,t.bottomLeftBorderBox]},PK=function(t){return[t.topLeftContentBox,t.topRightContentBox,t.bottomRightContentBox,t.bottomLeftContentBox]},Ea=function(t){return[t.topLeftPaddingBox,t.topRightPaddingBox,t.bottomRightPaddingBox,t.bottomLeftPaddingBox]},RK=(function(){function t(e,A,i){this.offsetX=e,this.offsetY=A,this.matrix=i,this.type=0,this.target=6}return t})(),Oo=(function(){function t(e,A){this.path=e,this.target=A,this.type=1}return t})(),KK=(function(){function t(e){this.opacity=e,this.type=2,this.target=6}return t})(),ZK=function(t){return t.type===0},QQ=function(t){return t.type===1},VK=function(t){return t.type===2},ov=function(t,e){return t.length===e.length?t.some(function(A,i){return A===e[i]}):!1},jK=function(t,e,A,i,n){return t.map(function(r,s){switch(s){case 0:return r.add(e,A);case 1:return r.add(e+i,A);case 2:return r.add(e+i,A+n);case 3:return r.add(e,A+n)}return r})},xQ=(function(){function t(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return t})(),FQ=(function(){function t(e,A){if(this.container=e,this.parent=A,this.effects=[],this.curves=new zK(this.container),this.container.styles.opacity<1&&this.effects.push(new KK(this.container.styles.opacity)),this.container.styles.transform!==null){var i=this.container.bounds.left+this.container.styles.transformOrigin[0].number,n=this.container.bounds.top+this.container.styles.transformOrigin[1].number,r=this.container.styles.transform;this.effects.push(new RK(i,n,r))}if(this.container.styles.overflowX!==0){var s=ka(this.curves),o=Ea(this.curves);ov(s,o)?this.effects.push(new Oo(s,6)):(this.effects.push(new Oo(s,2)),this.effects.push(new Oo(o,4)))}}return t.prototype.getEffects=function(e){for(var A=[2,3].indexOf(this.container.styles.position)===-1,i=this.parent,n=this.effects.slice(0);i;){var r=i.effects.filter(function(a){return!QQ(a)});if(A||i.container.styles.position!==0||!i.parent){if(n.unshift.apply(n,r),A=[2,3].indexOf(i.container.styles.position)===-1,i.container.styles.overflowX!==0){var s=ka(i.curves),o=Ea(i.curves);ov(s,o)||n.unshift(new Oo(o,6))}}else n.unshift.apply(n,r);i=i.parent}return n.filter(function(a){return Ve(a.target,e)})},t})(),Kc=function(t,e,A,i){t.container.elements.forEach(function(n){var r=Ve(n.flags,4),s=Ve(n.flags,2),o=new FQ(n,t);Ve(n.styles.display,2048)&&i.push(o);var a=Ve(n.flags,8)?[]:i;if(r||s){var l=r||n.styles.isPositioned()?A:e,u=new xQ(o);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var c=n.styles.zIndex.order;if(c<0){var d=0;l.negativeZIndex.some(function(h,g){return c>h.element.container.styles.zIndex.order?(d=g,!1):d>0}),l.negativeZIndex.splice(d,0,u)}else if(c>0){var f=0;l.positiveZIndex.some(function(h,g){return c>=h.element.container.styles.zIndex.order?(f=g+1,!1):f>0}),l.positiveZIndex.splice(f,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else n.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);Kc(o,u,r?u:A,a)}else n.styles.isInlineLevel()?e.inlineLevel.push(o):e.nonInlineLevel.push(o),Kc(o,e,A,a);Ve(n.flags,8)&&IQ(n,a)})},IQ=function(t,e){for(var A=t instanceof Mc?t.start:1,i=t instanceof Mc?t.reversed:!1,n=0;n<e.length;n++){var r=e[n];r.container instanceof dQ&&typeof r.container.value=="number"&&r.container.value!==0&&(A=r.container.value),r.listValue=es(A,r.container.styles.listStyleType,!0),A+=i?-1:1}},GK=function(t){var e=new FQ(t,null),A=new xQ(e),i=[];return Kc(e,A,A,i),IQ(e.container,i),A},av=function(t,e){switch(e){case 0:return Zt(t.topLeftBorderBox,t.topLeftPaddingBox,t.topRightBorderBox,t.topRightPaddingBox);case 1:return Zt(t.topRightBorderBox,t.topRightPaddingBox,t.bottomRightBorderBox,t.bottomRightPaddingBox);case 2:return Zt(t.bottomRightBorderBox,t.bottomRightPaddingBox,t.bottomLeftBorderBox,t.bottomLeftPaddingBox);case 3:default:return Zt(t.bottomLeftBorderBox,t.bottomLeftPaddingBox,t.topLeftBorderBox,t.topLeftPaddingBox)}},WK=function(t,e){switch(e){case 0:return Zt(t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox,t.topRightBorderBox,t.topRightBorderDoubleOuterBox);case 1:return Zt(t.topRightBorderBox,t.topRightBorderDoubleOuterBox,t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox);case 2:return Zt(t.bottomRightBorderBox,t.bottomRightBorderDoubleOuterBox,t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox);case 3:default:return Zt(t.bottomLeftBorderBox,t.bottomLeftBorderDoubleOuterBox,t.topLeftBorderBox,t.topLeftBorderDoubleOuterBox)}},JK=function(t,e){switch(e){case 0:return Zt(t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox,t.topRightBorderDoubleInnerBox,t.topRightPaddingBox);case 1:return Zt(t.topRightBorderDoubleInnerBox,t.topRightPaddingBox,t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox);case 2:return Zt(t.bottomRightBorderDoubleInnerBox,t.bottomRightPaddingBox,t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox);case 3:default:return Zt(t.bottomLeftBorderDoubleInnerBox,t.bottomLeftPaddingBox,t.topLeftBorderDoubleInnerBox,t.topLeftPaddingBox)}},XK=function(t,e){switch(e){case 0:return Ho(t.topLeftBorderStroke,t.topRightBorderStroke);case 1:return Ho(t.topRightBorderStroke,t.bottomRightBorderStroke);case 2:return Ho(t.bottomRightBorderStroke,t.bottomLeftBorderStroke);case 3:default:return Ho(t.bottomLeftBorderStroke,t.topLeftBorderStroke)}},Ho=function(t,e){var A=[];return Pt(t)?A.push(t.subdivide(.5,!1)):A.push(t),Pt(e)?A.push(e.subdivide(.5,!0)):A.push(e),A},Zt=function(t,e,A,i){var n=[];return Pt(t)?n.push(t.subdivide(.5,!1)):n.push(t),Pt(A)?n.push(A.subdivide(.5,!0)):n.push(A),Pt(i)?n.push(i.subdivide(.5,!0).reverse()):n.push(i),Pt(e)?n.push(e.subdivide(.5,!1).reverse()):n.push(e),n},SQ=function(t){var e=t.bounds,A=t.styles;return e.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},$a=function(t){var e=t.styles,A=t.bounds,i=Ce(e.paddingLeft,A.width),n=Ce(e.paddingRight,A.width),r=Ce(e.paddingTop,A.width),s=Ce(e.paddingBottom,A.width);return A.add(i+e.borderLeftWidth,r+e.borderTopWidth,-(e.borderRightWidth+e.borderLeftWidth+i+n),-(e.borderTopWidth+e.borderBottomWidth+r+s))},YK=function(t,e){return t===0?e.bounds:t===2?$a(e):SQ(e)},qK=function(t,e){return t===0?e.bounds:t===2?$a(e):SQ(e)},Pu=function(t,e,A){var i=YK(ui(t.styles.backgroundOrigin,e),t),n=qK(ui(t.styles.backgroundClip,e),t),r=e6(ui(t.styles.backgroundSize,e),A,i),s=r[0],o=r[1],a=Br(ui(t.styles.backgroundPosition,e),i.width-s,i.height-o),l=t6(ui(t.styles.backgroundRepeat,e),a,r,i,n),u=Math.round(i.left+a[0]),c=Math.round(i.top+a[1]);return[l,u,c,s,o]},ii=function(t){return pe(t)&&t.value===yi.AUTO},Do=function(t){return typeof t=="number"},e6=function(t,e,A){var i=e[0],n=e[1],r=e[2],s=t[0],o=t[1];if(!s)return[0,0];if(Re(s)&&o&&Re(o))return[Ce(s,A.width),Ce(o,A.height)];var a=Do(r);if(pe(s)&&(s.value===yi.CONTAIN||s.value===yi.COVER)){if(Do(r)){var l=A.width/A.height;return l<r!=(s.value===yi.COVER)?[A.width,A.width/r]:[A.height*r,A.height]}return[A.width,A.height]}var u=Do(i),c=Do(n),d=u||c;if(ii(s)&&(!o||ii(o))){if(u&&c)return[i,n];if(!a&&!d)return[A.width,A.height];if(d&&a){var f=u?i:n*r,h=c?n:i/r;return[f,h]}var g=u?i:A.width,m=c?n:A.height;return[g,m]}if(a){var p=0,B=0;return Re(s)?p=Ce(s,A.width):Re(o)&&(B=Ce(o,A.height)),ii(s)?p=B*r:(!o||ii(o))&&(B=p/r),[p,B]}var b=null,_=null;if(Re(s)?b=Ce(s,A.width):o&&Re(o)&&(_=Ce(o,A.height)),b!==null&&(!o||ii(o))&&(_=u&&c?b/i*n:A.height),_!==null&&ii(s)&&(b=u&&c?_/n*i:A.width),b!==null&&_!==null)return[b,_];throw new Error("Unable to calculate background-size for element")},ui=function(t,e){var A=t[e];return typeof A>"u"?t[0]:A},t6=function(t,e,A,i,n){var r=e[0],s=e[1],o=A[0],a=A[1];switch(t){case 2:return[new H(Math.round(i.left),Math.round(i.top+s)),new H(Math.round(i.left+i.width),Math.round(i.top+s)),new H(Math.round(i.left+i.width),Math.round(a+i.top+s)),new H(Math.round(i.left),Math.round(a+i.top+s))];case 3:return[new H(Math.round(i.left+r),Math.round(i.top)),new H(Math.round(i.left+r+o),Math.round(i.top)),new H(Math.round(i.left+r+o),Math.round(i.height+i.top)),new H(Math.round(i.left+r),Math.round(i.height+i.top))];case 1:return[new H(Math.round(i.left+r),Math.round(i.top+s)),new H(Math.round(i.left+r+o),Math.round(i.top+s)),new H(Math.round(i.left+r+o),Math.round(i.top+s+a)),new H(Math.round(i.left+r),Math.round(i.top+s+a))];default:return[new H(Math.round(n.left),Math.round(n.top)),new H(Math.round(n.left+n.width),Math.round(n.top)),new H(Math.round(n.left+n.width),Math.round(n.height+n.top)),new H(Math.round(n.left),Math.round(n.height+n.top))]}},A6="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",lv="Hidden Text",n6=(function(){function t(e){this._data={},this._document=e}return t.prototype.parseMetrics=function(e,A){var i=this._document.createElement("div"),n=this._document.createElement("img"),r=this._document.createElement("span"),s=this._document.body;i.style.visibility="hidden",i.style.fontFamily=e,i.style.fontSize=A,i.style.margin="0",i.style.padding="0",i.style.whiteSpace="nowrap",s.appendChild(i),n.src=A6,n.width=1,n.height=1,n.style.margin="0",n.style.padding="0",n.style.verticalAlign="baseline",r.style.fontFamily=e,r.style.fontSize=A,r.style.margin="0",r.style.padding="0",r.appendChild(this._document.createTextNode(lv)),i.appendChild(r),i.appendChild(n);var o=n.offsetTop-r.offsetTop+2;i.removeChild(r),i.appendChild(this._document.createTextNode(lv)),i.style.lineHeight="normal",n.style.verticalAlign="super";var a=n.offsetTop-i.offsetTop+2;return s.removeChild(i),{baseline:o,middle:a}},t.prototype.getMetrics=function(e,A){var i=e+" "+A;return typeof this._data[i]>"u"&&(this._data[i]=this.parseMetrics(e,A)),this._data[i]},t})(),kQ=(function(){function t(e,A){this.context=e,this.options=A}return t})(),i6=1e4,r6=(function(t){aA(e,t);function e(A,i){var n=t.call(this,A,i)||this;return n._activeEffects=[],n.canvas=i.canvas?i.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),i.canvas||(n.canvas.width=Math.floor(i.width*i.scale),n.canvas.height=Math.floor(i.height*i.scale),n.canvas.style.width=i.width+"px",n.canvas.style.height=i.height+"px"),n.fontMetrics=new n6(document),n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-i.x,-i.y),n.ctx.textBaseline="bottom",n._activeEffects=[],n.context.logger.debug("Canvas renderer initialized ("+i.width+"x"+i.height+") with scale "+i.scale),n}return e.prototype.applyEffects=function(A){for(var i=this;this._activeEffects.length;)this.popEffect();A.forEach(function(n){return i.applyEffect(n)})},e.prototype.applyEffect=function(A){this.ctx.save(),VK(A)&&(this.ctx.globalAlpha=A.opacity),ZK(A)&&(this.ctx.translate(A.offsetX,A.offsetY),this.ctx.transform(A.matrix[0],A.matrix[1],A.matrix[2],A.matrix[3],A.matrix[4],A.matrix[5]),this.ctx.translate(-A.offsetX,-A.offsetY)),QQ(A)&&(this.path(A.path),this.ctx.clip()),this._activeEffects.push(A)},e.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},e.prototype.renderStack=function(A){return pt(this,void 0,void 0,function(){var i;return nt(this,function(n){switch(n.label){case 0:return i=A.element.container.styles,i.isVisible()?[4,this.renderStackContent(A)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},e.prototype.renderNode=function(A){return pt(this,void 0,void 0,function(){return nt(this,function(i){switch(i.label){case 0:if(Ve(A.container.flags,16))debugger;return A.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(A)]:[3,3];case 1:return i.sent(),[4,this.renderNodeContent(A)];case 2:i.sent(),i.label=3;case 3:return[2]}})})},e.prototype.renderTextWithLetterSpacing=function(A,i,n){var r=this;if(i===0)this.ctx.fillText(A.text,A.bounds.left,A.bounds.top+n);else{var s=Wh(A.text);s.reduce(function(o,a){return r.ctx.fillText(a,o,A.bounds.top+n),o+r.ctx.measureText(a).width},A.bounds.left)}},e.prototype.createFontStyle=function(A){var i=A.fontVariant.filter(function(s){return s==="normal"||s==="small-caps"}).join(""),n=u6(A.fontFamily).join(", "),r=Ns(A.fontSize)?""+A.fontSize.number+A.fontSize.unit:A.fontSize.number+"px";return[[A.fontStyle,i,A.fontWeight,r,n].join(" "),n,r]},e.prototype.renderTextNode=function(A,i){return pt(this,void 0,void 0,function(){var n,r,s,o,a,l,u,c,d=this;return nt(this,function(f){return n=this.createFontStyle(i),r=n[0],s=n[1],o=n[2],this.ctx.font=r,this.ctx.direction=i.direction===1?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",a=this.fontMetrics.getMetrics(s,o),l=a.baseline,u=a.middle,c=i.paintOrder,A.textBounds.forEach(function(h){c.forEach(function(g){switch(g){case 0:d.ctx.fillStyle=We(i.color),d.renderTextWithLetterSpacing(h,i.letterSpacing,l);var m=i.textShadow;m.length&&h.text.trim().length&&(m.slice(0).reverse().forEach(function(p){d.ctx.shadowColor=We(p.color),d.ctx.shadowOffsetX=p.offsetX.number*d.options.scale,d.ctx.shadowOffsetY=p.offsetY.number*d.options.scale,d.ctx.shadowBlur=p.blur.number,d.renderTextWithLetterSpacing(h,i.letterSpacing,l)}),d.ctx.shadowColor="",d.ctx.shadowOffsetX=0,d.ctx.shadowOffsetY=0,d.ctx.shadowBlur=0),i.textDecorationLine.length&&(d.ctx.fillStyle=We(i.textDecorationColor||i.color),i.textDecorationLine.forEach(function(p){switch(p){case 1:d.ctx.fillRect(h.bounds.left,Math.round(h.bounds.top+l),h.bounds.width,1);break;case 2:d.ctx.fillRect(h.bounds.left,Math.round(h.bounds.top),h.bounds.width,1);break;case 3:d.ctx.fillRect(h.bounds.left,Math.ceil(h.bounds.top+u),h.bounds.width,1);break}}));break;case 1:i.webkitTextStrokeWidth&&h.text.trim().length&&(d.ctx.strokeStyle=We(i.webkitTextStrokeColor),d.ctx.lineWidth=i.webkitTextStrokeWidth,d.ctx.lineJoin=window.chrome?"miter":"round",d.ctx.strokeText(h.text,h.bounds.left,h.bounds.top+l)),d.ctx.strokeStyle="",d.ctx.lineWidth=0,d.ctx.lineJoin="miter";break}})}),[2]})})},e.prototype.renderReplacedElement=function(A,i,n){if(n&&A.intrinsicWidth>0&&A.intrinsicHeight>0){var r=$a(A),s=Ea(i);this.path(s),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,A.intrinsicWidth,A.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},e.prototype.renderNodeContent=function(A){return pt(this,void 0,void 0,function(){var i,n,r,s,o,a,B,B,l,u,c,d,_,f,h,y,g,m,p,B,b,_,y;return nt(this,function(w){switch(w.label){case 0:this.applyEffects(A.getEffects(4)),i=A.container,n=A.curves,r=i.styles,s=0,o=i.textNodes,w.label=1;case 1:return s<o.length?(a=o[s],[4,this.renderTextNode(a,r)]):[3,4];case 2:w.sent(),w.label=3;case 3:return s++,[3,1];case 4:if(!(i instanceof lQ))return[3,8];w.label=5;case 5:return w.trys.push([5,7,,8]),[4,this.context.cache.match(i.src)];case 6:return B=w.sent(),this.renderReplacedElement(i,n,B),[3,8];case 7:return w.sent(),this.context.logger.error("Error loading image "+i.src),[3,8];case 8:if(i instanceof uQ&&this.renderReplacedElement(i,n,i.canvas),!(i instanceof cQ))return[3,12];w.label=9;case 9:return w.trys.push([9,11,,12]),[4,this.context.cache.match(i.svg)];case 10:return B=w.sent(),this.renderReplacedElement(i,n,B),[3,12];case 11:return w.sent(),this.context.logger.error("Error loading svg "+i.svg.substring(0,255)),[3,12];case 12:return i instanceof gQ&&i.tree?(l=new e(this.context,{scale:this.options.scale,backgroundColor:i.backgroundColor,x:0,y:0,width:i.width,height:i.height}),[4,l.render(i.tree)]):[3,14];case 13:u=w.sent(),i.width&&i.height&&this.ctx.drawImage(u,0,0,i.width,i.height,i.bounds.left,i.bounds.top,i.bounds.width,i.bounds.height),w.label=14;case 14:if(i instanceof Jh&&(c=Math.min(i.bounds.width,i.bounds.height),i.type===xa?i.checked&&(this.ctx.save(),this.path([new H(i.bounds.left+c*.39363,i.bounds.top+c*.79),new H(i.bounds.left+c*.16,i.bounds.top+c*.5549),new H(i.bounds.left+c*.27347,i.bounds.top+c*.44071),new H(i.bounds.left+c*.39694,i.bounds.top+c*.5649),new H(i.bounds.left+c*.72983,i.bounds.top+c*.23),new H(i.bounds.left+c*.84,i.bounds.top+c*.34085),new H(i.bounds.left+c*.39363,i.bounds.top+c*.79)]),this.ctx.fillStyle=We(Jp),this.ctx.fill(),this.ctx.restore()):i.type===Fa&&i.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(i.bounds.left+c/2,i.bounds.top+c/2,c/4,0,Math.PI*2,!0),this.ctx.fillStyle=We(Jp),this.ctx.fill(),this.ctx.restore())),s6(i)&&i.value.length){switch(d=this.createFontStyle(r),_=d[0],f=d[1],h=this.fontMetrics.getMetrics(_,f).baseline,this.ctx.font=_,this.ctx.fillStyle=We(r.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=a6(i.styles.textAlign),y=$a(i),g=0,i.styles.textAlign){case 1:g+=y.width/2;break;case 2:g+=y.width;break}m=y.add(g,0,0,-y.height/2+1),this.ctx.save(),this.path([new H(y.left,y.top),new H(y.left+y.width,y.top),new H(y.left+y.width,y.top+y.height),new H(y.left,y.top+y.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new $r(i.value,m),r.letterSpacing,h),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!Ve(i.styles.display,2048))return[3,20];if(i.styles.listStyleImage===null)return[3,19];if(p=i.styles.listStyleImage,p.type!==0)return[3,18];B=void 0,b=p.url,w.label=15;case 15:return w.trys.push([15,17,,18]),[4,this.context.cache.match(b)];case 16:return B=w.sent(),this.ctx.drawImage(B,i.bounds.left-(B.width+10),i.bounds.top),[3,18];case 17:return w.sent(),this.context.logger.error("Error loading list-style-image "+b),[3,18];case 18:return[3,20];case 19:A.listValue&&i.styles.listStyleType!==-1&&(_=this.createFontStyle(r)[0],this.ctx.font=_,this.ctx.fillStyle=We(r.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",y=new $A(i.bounds.left,i.bounds.top+Ce(i.styles.paddingTop,i.bounds.width),i.bounds.width,$p(r.lineHeight,r.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new $r(A.listValue,y),r.letterSpacing,$p(r.lineHeight,r.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),w.label=20;case 20:return[2]}})})},e.prototype.renderStackContent=function(A){return pt(this,void 0,void 0,function(){var i,n,p,r,s,p,o,a,p,l,u,p,c,d,p,f,h,p,g,m,p;return nt(this,function(B){switch(B.label){case 0:if(Ve(A.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(A.element)];case 1:B.sent(),i=0,n=A.negativeZIndex,B.label=2;case 2:return i<n.length?(p=n[i],[4,this.renderStack(p)]):[3,5];case 3:B.sent(),B.label=4;case 4:return i++,[3,2];case 5:return[4,this.renderNodeContent(A.element)];case 6:B.sent(),r=0,s=A.nonInlineLevel,B.label=7;case 7:return r<s.length?(p=s[r],[4,this.renderNode(p)]):[3,10];case 8:B.sent(),B.label=9;case 9:return r++,[3,7];case 10:o=0,a=A.nonPositionedFloats,B.label=11;case 11:return o<a.length?(p=a[o],[4,this.renderStack(p)]):[3,14];case 12:B.sent(),B.label=13;case 13:return o++,[3,11];case 14:l=0,u=A.nonPositionedInlineLevel,B.label=15;case 15:return l<u.length?(p=u[l],[4,this.renderStack(p)]):[3,18];case 16:B.sent(),B.label=17;case 17:return l++,[3,15];case 18:c=0,d=A.inlineLevel,B.label=19;case 19:return c<d.length?(p=d[c],[4,this.renderNode(p)]):[3,22];case 20:B.sent(),B.label=21;case 21:return c++,[3,19];case 22:f=0,h=A.zeroOrAutoZIndexOrTransformedOrOpacity,B.label=23;case 23:return f<h.length?(p=h[f],[4,this.renderStack(p)]):[3,26];case 24:B.sent(),B.label=25;case 25:return f++,[3,23];case 26:g=0,m=A.positiveZIndex,B.label=27;case 27:return g<m.length?(p=m[g],[4,this.renderStack(p)]):[3,30];case 28:B.sent(),B.label=29;case 29:return g++,[3,27];case 30:return[2]}})})},e.prototype.mask=function(A){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(A.slice(0).reverse()),this.ctx.closePath()},e.prototype.path=function(A){this.ctx.beginPath(),this.formatPath(A),this.ctx.closePath()},e.prototype.formatPath=function(A){var i=this;A.forEach(function(n,r){var s=Pt(n)?n.start:n;r===0?i.ctx.moveTo(s.x,s.y):i.ctx.lineTo(s.x,s.y),Pt(n)&&i.ctx.bezierCurveTo(n.startControl.x,n.startControl.y,n.endControl.x,n.endControl.y,n.end.x,n.end.y)})},e.prototype.renderRepeat=function(A,i,n,r){this.path(A),this.ctx.fillStyle=i,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)},e.prototype.resizeImage=function(A,i,n){var r;if(A.width===i&&A.height===n)return A;var s=(r=this.canvas.ownerDocument)!==null&&r!==void 0?r:document,o=s.createElement("canvas");o.width=Math.max(1,i),o.height=Math.max(1,n);var a=o.getContext("2d");return a.drawImage(A,0,0,A.width,A.height,0,0,i,n),o},e.prototype.renderBackgroundImage=function(A){return pt(this,void 0,void 0,function(){var i,n,r,s,o,a;return nt(this,function(l){switch(l.label){case 0:i=A.styles.backgroundImage.length-1,n=function(u){var c,d,f,$,W,ne,R,te,F,h,$,W,ne,R,te,g,m,p,B,b,_,y,w,U,F,x,$,M,z,R,te,Y,W,ne,Ze,we,ct,Lt,Bt,dt,ft,ht;return nt(this,function(wt){switch(wt.label){case 0:if(u.type!==0)return[3,5];c=void 0,d=u.url,wt.label=1;case 1:return wt.trys.push([1,3,,4]),[4,r.context.cache.match(d)];case 2:return c=wt.sent(),[3,4];case 3:return wt.sent(),r.context.logger.error("Error loading background-image "+d),[3,4];case 4:return c&&(f=Pu(A,i,[c.width,c.height,c.width/c.height]),$=f[0],W=f[1],ne=f[2],R=f[3],te=f[4],F=r.ctx.createPattern(r.resizeImage(c,R,te),"repeat"),r.renderRepeat($,F,W,ne)),[3,6];case 5:Zz(u)?(h=Pu(A,i,[null,null,null]),$=h[0],W=h[1],ne=h[2],R=h[3],te=h[4],g=Nz(u.angle,R,te),m=g[0],p=g[1],B=g[2],b=g[3],_=g[4],y=document.createElement("canvas"),y.width=R,y.height=te,w=y.getContext("2d"),U=w.createLinearGradient(p,b,B,_),kp(u.stops,m).forEach(function(Yi){return U.addColorStop(Yi.stop,We(Yi.color))}),w.fillStyle=U,w.fillRect(0,0,R,te),R>0&&te>0&&(F=r.ctx.createPattern(y,"repeat"),r.renderRepeat($,F,W,ne))):Vz(u)&&(x=Pu(A,i,[null,null,null]),$=x[0],M=x[1],z=x[2],R=x[3],te=x[4],Y=u.position.length===0?[Vh]:u.position,W=Ce(Y[0],R),ne=Ce(Y[Y.length-1],te),Ze=zz(u,W,ne,R,te),we=Ze[0],ct=Ze[1],we>0&&ct>0&&(Lt=r.ctx.createRadialGradient(M+W,z+ne,0,M+W,z+ne,we),kp(u.stops,we*2).forEach(function(Yi){return Lt.addColorStop(Yi.stop,We(Yi.color))}),r.path($),r.ctx.fillStyle=Lt,we!==ct?(Bt=A.bounds.left+.5*A.bounds.width,dt=A.bounds.top+.5*A.bounds.height,ft=ct/we,ht=1/ft,r.ctx.save(),r.ctx.translate(Bt,dt),r.ctx.transform(1,0,0,ft,0,0),r.ctx.translate(-Bt,-dt),r.ctx.fillRect(M,ht*(z-dt)+dt,R,te*ht),r.ctx.restore()):r.ctx.fill())),wt.label=6;case 6:return i--,[2]}})},r=this,s=0,o=A.styles.backgroundImage.slice(0).reverse(),l.label=1;case 1:return s<o.length?(a=o[s],[5,n(a)]):[3,4];case 2:l.sent(),l.label=3;case 3:return s++,[3,1];case 4:return[2]}})})},e.prototype.renderSolidBorder=function(A,i,n){return pt(this,void 0,void 0,function(){return nt(this,function(r){return this.path(av(n,i)),this.ctx.fillStyle=We(A),this.ctx.fill(),[2]})})},e.prototype.renderDoubleBorder=function(A,i,n,r){return pt(this,void 0,void 0,function(){var s,o;return nt(this,function(a){switch(a.label){case 0:return i<3?[4,this.renderSolidBorder(A,n,r)]:[3,2];case 1:return a.sent(),[2];case 2:return s=WK(r,n),this.path(s),this.ctx.fillStyle=We(A),this.ctx.fill(),o=JK(r,n),this.path(o),this.ctx.fill(),[2]}})})},e.prototype.renderNodeBackgroundAndBorders=function(A){return pt(this,void 0,void 0,function(){var i,n,r,s,o,a,l,u,c=this;return nt(this,function(d){switch(d.label){case 0:return this.applyEffects(A.getEffects(2)),i=A.container.styles,n=!nn(i.backgroundColor)||i.backgroundImage.length,r=[{style:i.borderTopStyle,color:i.borderTopColor,width:i.borderTopWidth},{style:i.borderRightStyle,color:i.borderRightColor,width:i.borderRightWidth},{style:i.borderBottomStyle,color:i.borderBottomColor,width:i.borderBottomWidth},{style:i.borderLeftStyle,color:i.borderLeftColor,width:i.borderLeftWidth}],s=o6(ui(i.backgroundClip,0),A.curves),n||i.boxShadow.length?(this.ctx.save(),this.path(s),this.ctx.clip(),nn(i.backgroundColor)||(this.ctx.fillStyle=We(i.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(A.container)]):[3,2];case 1:d.sent(),this.ctx.restore(),i.boxShadow.slice(0).reverse().forEach(function(f){c.ctx.save();var h=ka(A.curves),g=f.inset?0:i6,m=jK(h,-g+(f.inset?1:-1)*f.spread.number,(f.inset?1:-1)*f.spread.number,f.spread.number*(f.inset?-2:2),f.spread.number*(f.inset?-2:2));f.inset?(c.path(h),c.ctx.clip(),c.mask(m)):(c.mask(h),c.ctx.clip(),c.path(m)),c.ctx.shadowOffsetX=f.offsetX.number+g,c.ctx.shadowOffsetY=f.offsetY.number,c.ctx.shadowColor=We(f.color),c.ctx.shadowBlur=f.blur.number,c.ctx.fillStyle=f.inset?We(f.color):"rgba(0,0,0,1)",c.ctx.fill(),c.ctx.restore()}),d.label=2;case 2:o=0,a=0,l=r,d.label=3;case 3:return a<l.length?(u=l[a],u.style!==0&&!nn(u.color)&&u.width>0?u.style!==2?[3,5]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,2)]:[3,11]):[3,13];case 4:return d.sent(),[3,11];case 5:return u.style!==3?[3,7]:[4,this.renderDashedDottedBorder(u.color,u.width,o,A.curves,3)];case 6:return d.sent(),[3,11];case 7:return u.style!==4?[3,9]:[4,this.renderDoubleBorder(u.color,u.width,o,A.curves)];case 8:return d.sent(),[3,11];case 9:return[4,this.renderSolidBorder(u.color,o,A.curves)];case 10:d.sent(),d.label=11;case 11:o++,d.label=12;case 12:return a++,[3,3];case 13:return[2]}})})},e.prototype.renderDashedDottedBorder=function(A,i,n,r,s){return pt(this,void 0,void 0,function(){var o,a,l,u,c,d,f,h,g,m,p,B,b,_,y,w,y,w;return nt(this,function(U){return this.ctx.save(),o=XK(r,n),a=av(r,n),s===2&&(this.path(a),this.ctx.clip()),Pt(a[0])?(l=a[0].start.x,u=a[0].start.y):(l=a[0].x,u=a[0].y),Pt(a[1])?(c=a[1].end.x,d=a[1].end.y):(c=a[1].x,d=a[1].y),n===0||n===2?f=Math.abs(l-c):f=Math.abs(u-d),this.ctx.beginPath(),s===3?this.formatPath(o):this.formatPath(a.slice(0,2)),h=i<3?i*3:i*2,g=i<3?i*2:i,s===3&&(h=i,g=i),m=!0,f<=h*2?m=!1:f<=h*2+g?(p=f/(2*h+g),h*=p,g*=p):(B=Math.floor((f+g)/(h+g)),b=(f-B*h)/(B-1),_=(f-(B+1)*h)/B,g=_<=0||Math.abs(g-b)<Math.abs(g-_)?b:_),m&&(s===3?this.ctx.setLineDash([0,h+g]):this.ctx.setLineDash([h,g])),s===3?(this.ctx.lineCap="round",this.ctx.lineWidth=i):this.ctx.lineWidth=i*2+1.1,this.ctx.strokeStyle=We(A),this.ctx.stroke(),this.ctx.setLineDash([]),s===2&&(Pt(a[0])&&(y=a[3],w=a[0],this.ctx.beginPath(),this.formatPath([new H(y.end.x,y.end.y),new H(w.start.x,w.start.y)]),this.ctx.stroke()),Pt(a[1])&&(y=a[1],w=a[2],this.ctx.beginPath(),this.formatPath([new H(y.end.x,y.end.y),new H(w.start.x,w.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]})})},e.prototype.render=function(A){return pt(this,void 0,void 0,function(){var i;return nt(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=We(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),i=GK(A),[4,this.renderStack(i)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},e})(kQ),s6=function(t){return t instanceof hQ||t instanceof fQ?!0:t instanceof Jh&&t.type!==Fa&&t.type!==xa},o6=function(t,e){switch(t){case 0:return ka(e);case 2:return PK(e);case 1:default:return Ea(e)}},a6=function(t){switch(t){case 1:return"center";case 2:return"right";case 0:default:return"left"}},l6=["-apple-system","system-ui"],u6=function(t){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?t.filter(function(e){return l6.indexOf(e)===-1}):t},c6=(function(t){aA(e,t);function e(A,i){var n=t.call(this,A,i)||this;return n.canvas=i.canvas?i.canvas:document.createElement("canvas"),n.ctx=n.canvas.getContext("2d"),n.options=i,n.canvas.width=Math.floor(i.width*i.scale),n.canvas.height=Math.floor(i.height*i.scale),n.canvas.style.width=i.width+"px",n.canvas.style.height=i.height+"px",n.ctx.scale(n.options.scale,n.options.scale),n.ctx.translate(-i.x,-i.y),n.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+i.width+"x"+i.height+" at "+i.x+","+i.y+") with scale "+i.scale),n}return e.prototype.render=function(A){return pt(this,void 0,void 0,function(){var i,n;return nt(this,function(r){switch(r.label){case 0:return i=Lc(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,A),[4,d6(i)];case 1:return n=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=We(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},e})(kQ),d6=function(t){return new Promise(function(e,A){var i=new Image;i.onload=function(){e(i)},i.onerror=A,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(new XMLSerializer().serializeToString(t))})},f6=(function(){function t(e){var A=e.id,i=e.enabled;this.id=A,this.enabled=i,this.start=Date.now()}return t.prototype.debug=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.debug=="function"?console.debug.apply(console,go([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.getTime=function(){return Date.now()-this.start},t.prototype.info=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&typeof window<"u"&&window.console&&typeof console.info=="function"&&console.info.apply(console,go([this.id,this.getTime()+"ms"],e))},t.prototype.warn=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.warn=="function"?console.warn.apply(console,go([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.prototype.error=function(){for(var e=[],A=0;A<arguments.length;A++)e[A]=arguments[A];this.enabled&&(typeof window<"u"&&window.console&&typeof console.error=="function"?console.error.apply(console,go([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},t.instances={},t})(),h6=(function(){function t(e,A){var i;this.windowBounds=A,this.instanceName="#"+t.instanceCount++,this.logger=new f6({id:this.instanceName,enabled:e.logging}),this.cache=(i=e.cache)!==null&&i!==void 0?i:new TK(this,e)}return t.instanceCount=1,t})(),g6=function(t,e){return e===void 0&&(e={}),m6(t,e)};typeof window<"u"&&UQ.setContext(window);var m6=function(t,e){return pt(void 0,void 0,void 0,function(){var A,i,n,r,s,o,a,l,u,c,d,f,h,g,m,p,B,b,_,y,U,w,U,F,x,$,M,z,R,te,Y,W,ne,Ze,we,ct,Lt,Bt,dt,ft;return nt(this,function(ht){switch(ht.label){case 0:if(!t||typeof t!="object")return[2,Promise.reject("Invalid element provided as first argument")];if(A=t.ownerDocument,!A)throw new Error("Element is not attached to a Document");if(i=A.defaultView,!i)throw new Error("Document is not attached to a Window");return n={allowTaint:(F=e.allowTaint)!==null&&F!==void 0?F:!1,imageTimeout:(x=e.imageTimeout)!==null&&x!==void 0?x:15e3,proxy:e.proxy,useCORS:($=e.useCORS)!==null&&$!==void 0?$:!1},r=_c({logging:(M=e.logging)!==null&&M!==void 0?M:!0,cache:e.cache},n),s={windowWidth:(z=e.windowWidth)!==null&&z!==void 0?z:i.innerWidth,windowHeight:(R=e.windowHeight)!==null&&R!==void 0?R:i.innerHeight,scrollX:(te=e.scrollX)!==null&&te!==void 0?te:i.pageXOffset,scrollY:(Y=e.scrollY)!==null&&Y!==void 0?Y:i.pageYOffset},o=new $A(s.scrollX,s.scrollY,s.windowWidth,s.windowHeight),a=new h6(r,o),l=(W=e.foreignObjectRendering)!==null&&W!==void 0?W:!1,u={allowTaint:(ne=e.allowTaint)!==null&&ne!==void 0?ne:!1,onclone:e.onclone,ignoreElements:e.ignoreElements,inlineImages:l,copyStyles:l},a.logger.debug("Starting document clone with size "+o.width+"x"+o.height+" scrolled to "+-o.left+","+-o.top),c=new rv(a,t,u),d=c.clonedReferenceElement,d?[4,c.toIFrame(A,o)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return f=ht.sent(),h=Xh(d)||pK(d)?j2(d.ownerDocument):Kl(a,d),g=h.width,m=h.height,p=h.left,B=h.top,b=p6(a,d,e.backgroundColor),_={canvas:e.canvas,backgroundColor:b,scale:(we=(Ze=e.scale)!==null&&Ze!==void 0?Ze:i.devicePixelRatio)!==null&&we!==void 0?we:1,x:((ct=e.x)!==null&&ct!==void 0?ct:0)+p,y:((Lt=e.y)!==null&&Lt!==void 0?Lt:0)+B,width:(Bt=e.width)!==null&&Bt!==void 0?Bt:Math.ceil(g),height:(dt=e.height)!==null&&dt!==void 0?dt:Math.ceil(m)},l?(a.logger.debug("Document cloned, using foreign object rendering"),U=new c6(a,_),[4,U.render(d)]):[3,3];case 2:return y=ht.sent(),[3,5];case 3:return a.logger.debug("Document cloned, element located at "+p+","+B+" with size "+g+"x"+m+" using computed rendering"),a.logger.debug("Starting DOM parsing"),w=pQ(a,d),b===w.styles.backgroundColor&&(w.styles.backgroundColor=kA.TRANSPARENT),a.logger.debug("Starting renderer for element at "+_.x+","+_.y+" with size "+_.width+"x"+_.height),U=new r6(a,_),[4,U.render(w)];case 4:y=ht.sent(),ht.label=5;case 5:return(!((ft=e.removeContainer)!==null&&ft!==void 0)||ft)&&(rv.destroy(f)||a.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),a.logger.debug("Finished rendering"),[2,y]}})})},p6=function(t,e,A){var i=e.ownerDocument,n=i.documentElement?kr(t,getComputedStyle(i.documentElement).backgroundColor):kA.TRANSPARENT,r=i.body?kr(t,getComputedStyle(i.body).backgroundColor):kA.TRANSPARENT,s=typeof A=="string"?kr(t,A):A===null?kA.TRANSPARENT:4294967295;return e===i.documentElement?nn(n)?nn(r)?s:r:n:s};Le.register(fi,Tn,wi,Ir,SA,Bi,ya,In,Jr,Pn,bU,Zi,Ki);function v6(t,e){var u;const{title:A,kpis:i,charts:n}=e,r=i.length>0?`<div class="kpi-row">${i.map((c,d)=>B6(c,d)).join("")}</div>`:"",s=n.map((c,d)=>`
|
|
202
|
+
<div class="card chart-card" style="animation-delay: ${(i.length+d)*.08+.05}s">
|
|
166
203
|
<div class="chart-card__header">
|
|
167
204
|
<div>
|
|
168
|
-
<div class="chart-card__title">${
|
|
205
|
+
<div class="chart-card__title">${Xe(c.title??`Chart ${d+1}`)}</div>
|
|
169
206
|
</div>
|
|
170
207
|
</div>
|
|
171
208
|
<div class="chart-card__body">
|
|
172
|
-
<canvas id="dash-chart-${
|
|
209
|
+
<canvas id="dash-chart-${d}"></canvas>
|
|
173
210
|
</div>
|
|
174
211
|
</div>
|
|
175
|
-
`).join("");t.innerHTML=`
|
|
212
|
+
`).join(""),o='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7 10 12 15 17 10"/><line x1="12" y1="15" x2="12" y2="3"/></svg>',a='<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="23 4 23 10 17 10"/><polyline points="1 20 1 14 7 14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/></svg>';t.innerHTML=`
|
|
176
213
|
<div class="dashboard">
|
|
177
214
|
<div class="header">
|
|
178
215
|
<div class="header__brand">
|
|
179
216
|
<span class="header__dot"></span>
|
|
180
|
-
${
|
|
217
|
+
${Xe(A)}
|
|
218
|
+
</div>
|
|
219
|
+
<div class="header__right">
|
|
220
|
+
<span class="header__meta">${new Date().toLocaleDateString(void 0,{dateStyle:"medium"})}</span>
|
|
221
|
+
<button class="export-btn" id="dash-download" title="Download all charts as PNG">${o}</button>
|
|
222
|
+
<button class="export-btn" id="dash-refresh" title="Refresh data">${a}</button>
|
|
181
223
|
</div>
|
|
182
|
-
<div class="header__meta">${new Date().toLocaleDateString(void 0,{dateStyle:"medium"})}</div>
|
|
183
224
|
</div>
|
|
184
225
|
<div class="dashboard-main">
|
|
185
|
-
${
|
|
226
|
+
${r}
|
|
186
227
|
<div class="chart-grid">
|
|
187
|
-
${
|
|
228
|
+
${s}
|
|
188
229
|
</div>
|
|
189
230
|
</div>
|
|
190
231
|
</div>
|
|
191
|
-
`,
|
|
232
|
+
`,(u=t.querySelector("#dash-download"))==null||u.addEventListener("click",async()=>{const c=t.querySelector(".dashboard");if(!c)return;const d=c.cloneNode(!0),f=c.getBoundingClientRect();d.style.cssText=`position:fixed;left:-9999px;top:0;width:${f.width}px;pointer-events:none;`,document.body.appendChild(d);const h=c.querySelectorAll(".chart-card__body canvas");d.querySelectorAll(".chart-card__body canvas").forEach((p,B)=>{const b=document.createElement("img");b.src=h[B].toDataURL(),b.style.cssText="position:absolute;inset:0;width:100%;height:100%;",p.parentElement.appendChild(b),p.style.display="none"});const m=document.createElement("style");m.textContent="[data-mcp-clone] *,[data-mcp-clone] *::before,[data-mcp-clone] *::after{animation:none!important;opacity:1!important;transform:none!important;}",d.setAttribute("data-mcp-clone",""),document.head.appendChild(m),d.querySelectorAll(".header__right .export-btn, .chart-card__actions").forEach(p=>{p.style.display="none"});try{const p=await g6(d,{backgroundColor:J("--bg-base")||"#0D1117",scale:window.devicePixelRatio||2,useCORS:!0,logging:!1});await V2(p,A)}catch(p){console.error("Screenshot failed:",p)}finally{d.remove(),m.remove()}});const l=t.querySelector("#dash-refresh");l==null||l.addEventListener("click",()=>{var c;l.style.animation="spin 0.6s linear",l.addEventListener("animationend",()=>{l.style.animation=""},{once:!0}),(c=window.__mcpRefresh)==null||c.call(window)}),t.querySelectorAll("[data-kpi-index]").forEach(c=>{c.style.cursor="pointer",c.addEventListener("click",()=>{const d=parseInt(c.dataset.kpiIndex??"0",10),f=i[d];if(!f)return;const h=`${f.prefix??""}${f.value}${f.suffix??""}`,g=f.change!==void 0?` (${f.change>0?"+":""}${f.change.toFixed(1)}%)`:"";mA(`${f.label}: ${h}${g}`)})}),requestAnimationFrame(()=>{n.forEach((c,d)=>{const f=t.querySelector(`#dash-chart-${d}`);f&&w6(f,c)})})}function B6(t,e){const A=`${t.prefix??""}${typeof t.value=="number"?t.value.toLocaleString():t.value}${t.suffix??""}`;let i="";if(t.change!==void 0){const n=t.change>0?"up":t.change<0?"down":"flat",r=t.change>0?"▲":t.change<0?"▼":"●",s=t.change>0?"card--positive":t.change<0?"card--negative":"card--neutral";return i=`
|
|
192
233
|
<div class="kpi__trend">
|
|
193
|
-
<span class="kpi__delta kpi__delta--${
|
|
194
|
-
<span class="kpi__delta-arrow">${
|
|
234
|
+
<span class="kpi__delta kpi__delta--${n}">
|
|
235
|
+
<span class="kpi__delta-arrow">${r}</span>
|
|
195
236
|
${Math.abs(t.change).toFixed(1)}%
|
|
196
237
|
</span>
|
|
197
238
|
</div>
|
|
198
239
|
`,`
|
|
199
|
-
<div class="card kpi ${
|
|
200
|
-
<span class="kpi__label">${
|
|
201
|
-
<span class="kpi__value">${
|
|
202
|
-
${
|
|
240
|
+
<div class="card kpi ${s}" data-kpi-index="${e}" style="animation-delay: ${e*.08+.05}s">
|
|
241
|
+
<span class="kpi__label">${Xe(t.label)}</span>
|
|
242
|
+
<span class="kpi__value">${A}</span>
|
|
243
|
+
${i}
|
|
203
244
|
</div>
|
|
204
245
|
`}return`
|
|
205
|
-
<div class="card kpi card--accent" style="animation-delay: ${e*.08+.05}s">
|
|
206
|
-
<span class="kpi__label">${
|
|
207
|
-
<span class="kpi__value">${
|
|
246
|
+
<div class="card kpi card--accent" data-kpi-index="${e}" style="animation-delay: ${e*.08+.05}s">
|
|
247
|
+
<span class="kpi__label">${Xe(t.label)}</span>
|
|
248
|
+
<span class="kpi__value">${A}</span>
|
|
208
249
|
</div>
|
|
209
|
-
`}function
|
|
250
|
+
`}function w6(t,e){var A,i,n,r,s;if(e.type==="pie"){const o=e.data??[],a=o.reduce((h,g)=>h+g.value,0),l=o.map((h,g)=>QA[g%QA.length]),u=((A=e.options)==null?void 0:A.donut)===!0,c=e.title??"chart",d=new Le(t,{type:u?"doughnut":"pie",data:{labels:o.map(h=>h.label),datasets:[{data:o.map(h=>h.value),backgroundColor:l,borderColor:J("--bg-card"),borderWidth:2,hoverOffset:6}]},options:{responsive:!0,maintainAspectRatio:!1,cutout:u?"55%":0,onClick:(h,g)=>{if(g.length===0)return;const m=g[0],p=o[m.index],B=(p.value/a*100).toFixed(1);mA(`${p.label}: ${p.value.toLocaleString()} (${B}%) in "${c}"`)},plugins:{legend:{position:"bottom",labels:{color:J("--text-secondary"),boxWidth:10,font:{size:10}}},tooltip:{...qA(),callbacks:{label:h=>{const g=(h.parsed/a*100).toFixed(1);return` ${h.label}: ${h.parsed.toLocaleString()} (${g}%)`}}}}}});en(d);const f=t.closest(".chart-card");f&&tn(f,d,c);return}if(e.type==="bar"){const o=e.labels??[],a=e.datasets??[],l=((i=e.options)==null?void 0:i.stacked)===!0,u=((n=e.options)==null?void 0:n.horizontal)===!0,c=e.title??"chart",d=new Le(t,{type:"bar",data:{labels:o,datasets:a.map((h,g)=>({label:h.label,data:h.data,backgroundColor:QA[g%QA.length]+"CC",borderColor:QA[g%QA.length],borderWidth:1,borderRadius:4,borderSkipped:!1}))},options:{indexAxis:u?"y":"x",responsive:!0,maintainAspectRatio:!1,onClick:(h,g)=>{if(g.length===0)return;const m=g[0],p=o[m.index],B=a.map(b=>{var _;return`${b.label}: ${(_=b.data[m.index])==null?void 0:_.toLocaleString()}`}).join(", ");mA(`${p} (${B}) in "${c}"`)},scales:{x:{stacked:l,border:{display:!1},grid:{display:u,color:J("--border")},ticks:{color:J("--text-secondary"),font:{size:10}}},y:{stacked:l,border:{display:!1},grid:{display:!u,color:J("--border")},ticks:{color:J("--text-secondary"),font:{size:10}}}},plugins:{legend:{display:a.length>1,position:"top",align:"end",labels:{color:J("--text-secondary"),boxWidth:8,font:{size:10}}},tooltip:qA()}}});en(d);const f=t.closest(".chart-card");f&&tn(f,d,c);return}if(e.type==="line"){const o=e.labels??[],a=e.datasets??[],l=((r=e.options)==null?void 0:r.fill)!==!1,u=((s=e.options)==null?void 0:s.smooth)!==!1,c=e.title??"chart",d=new Le(t,{type:"line",data:{labels:o,datasets:a.map((h,g)=>{const m=QA[g%QA.length];return{label:h.label,data:h.data,borderColor:m,borderWidth:2,tension:u?.4:0,fill:l,backgroundColor:p=>{if(!l)return"transparent";const B=p.chart.ctx.createLinearGradient(0,0,0,p.chart.height);return B.addColorStop(0,m+"40"),B.addColorStop(1,m+"00"),B},pointRadius:0,pointHoverRadius:5,pointBackgroundColor:m,pointBorderColor:J("--bg-card"),pointBorderWidth:2}})},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},onClick:(h,g)=>{if(g.length===0)return;const m=g[0],p=o[m.index],B=a.map(b=>{var _;return`${b.label}: ${(_=b.data[m.index])==null?void 0:_.toLocaleString()}`}).join(", ");mA(`${p} (${B}) in "${c}"`)},scales:{x:{border:{display:!1},grid:{display:!1},ticks:{color:J("--text-secondary"),font:{size:10}}},y:{border:{display:!1},grid:{color:J("--border"),drawTicks:!1},ticks:{color:J("--text-secondary"),font:{size:10},padding:8}}},plugins:{legend:{display:a.length>1,position:"top",align:"end",labels:{color:J("--text-secondary"),boxWidth:8,font:{size:10}}},tooltip:qA()}}});en(d);const f=t.closest(".chart-card");f&&tn(f,d,c)}}Le.register(Ro,Bi,Pn,Zi,Ki);function y6(t,e){const{title:A,datasets:i,options:n}=e,r=i.reduce((b,_)=>b+_.data.length,0);t.innerHTML=`
|
|
210
251
|
<div class="chart-view">
|
|
211
252
|
<div class="card chart-card">
|
|
212
253
|
<div class="chart-card__header">
|
|
213
254
|
<div>
|
|
214
|
-
<div class="chart-card__title">${
|
|
215
|
-
<div class="chart-card__subtitle">${
|
|
255
|
+
<div class="chart-card__title">${Xe(A)}</div>
|
|
256
|
+
<div class="chart-card__subtitle">${i.length} series - ${r} points</div>
|
|
216
257
|
</div>
|
|
217
258
|
</div>
|
|
218
259
|
<div class="chart-card__body">
|
|
@@ -220,12 +261,12 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
220
261
|
</div>
|
|
221
262
|
</div>
|
|
222
263
|
</div>
|
|
223
|
-
`;const o=t.querySelector("#chart-canvas"),a=Ta(i.colors),l=i.showLine===!0,u=r.flatMap($=>$.data),c=u.map($=>$.x),d=u.map($=>$.y),f=Math.min(...c),h=Math.max(...c),m=Math.min(...d),p=Math.max(...d),g=(h-f)*.1||1,b=(p-m)*.15||1,k=new Oe(o,{type:"scatter",data:{datasets:r.map(($,w)=>{const _=a[w%a.length];return{label:$.label,data:$.data,backgroundColor:_+"AA",borderColor:_,borderWidth:1,pointRadius:5,pointHoverRadius:7,pointHoverBorderWidth:2,pointHoverBorderColor:q("--bg-card"),showLine:l,tension:l?.3:0,fill:!1}})},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"nearest",intersect:!0},onClick:($,w)=>{if(w.length===0)return;const _=w[0],I=r[_.datasetIndex],z=I.data[_.index];Ci(`I clicked point (${z.x}, ${z.y}) in "${I.label}" series of the "${n}" chart. Analyze this data point.`)},scales:{x:{type:"linear",min:f-g,max:h+g,border:{display:!1},grid:{color:q("--border")},ticks:{color:q("--text-secondary"),font:{size:11}},title:{display:!!i.xLabel,text:i.xLabel??"",color:q("--text-secondary"),font:{size:11,weight:"600"}}},y:{type:"linear",min:m-b,max:p+b,border:{display:!1},grid:{color:q("--border"),drawTicks:!1},ticks:{color:q("--text-secondary"),font:{size:11},padding:8},title:{display:!!i.yLabel,text:i.yLabel??"",color:q("--text-secondary"),font:{size:11,weight:"600"}}}},plugins:{legend:{display:r.length>1,position:"top",align:"end",labels:{color:q("--text-secondary"),boxWidth:10,padding:12,font:{size:11}}},tooltip:{...on(),callbacks:{label:$=>{const w=$.parsed;return` ${$.dataset.label}: (${w.x}, ${w.y})`}}}}}});an(k),us(t,k,n),cs(t,()=>{var $;return($=window.__mcpRefresh)==null?void 0:$.call(window)})}class qn extends Error{}class kC extends qn{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class $C extends qn{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class xC extends qn{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class oi extends qn{}class s$ extends qn{constructor(e){super(`Invalid unit ${e}`)}}class Fe extends qn{}class Gt extends qn{constructor(){super("Zone is an abstract class")}}const N="numeric",Tt="short",ot="long",_o={year:N,month:N,day:N},o$={year:N,month:Tt,day:N},wC={year:N,month:Tt,day:N,weekday:Tt},a$={year:N,month:ot,day:N},l$={year:N,month:ot,day:N,weekday:ot},u$={hour:N,minute:N},c$={hour:N,minute:N,second:N},d$={hour:N,minute:N,second:N,timeZoneName:Tt},f$={hour:N,minute:N,second:N,timeZoneName:ot},h$={hour:N,minute:N,hourCycle:"h23"},m$={hour:N,minute:N,second:N,hourCycle:"h23"},p$={hour:N,minute:N,second:N,hourCycle:"h23",timeZoneName:Tt},g$={hour:N,minute:N,second:N,hourCycle:"h23",timeZoneName:ot},v$={year:N,month:N,day:N,hour:N,minute:N},b$={year:N,month:N,day:N,hour:N,minute:N,second:N},y$={year:N,month:Tt,day:N,hour:N,minute:N},_$={year:N,month:Tt,day:N,hour:N,minute:N,second:N},SC={year:N,month:Tt,day:N,weekday:Tt,hour:N,minute:N},k$={year:N,month:ot,day:N,hour:N,minute:N,timeZoneName:Tt},$$={year:N,month:ot,day:N,hour:N,minute:N,second:N,timeZoneName:Tt},x$={year:N,month:ot,day:N,weekday:ot,hour:N,minute:N,timeZoneName:ot},w$={year:N,month:ot,day:N,weekday:ot,hour:N,minute:N,second:N,timeZoneName:ot};class ds{get type(){throw new Gt}get name(){throw new Gt}get ianaName(){return this.name}get isUniversal(){throw new Gt}offsetName(e,n){throw new Gt}formatOffset(e,n){throw new Gt}offset(e){throw new Gt}equals(e){throw new Gt}get isValid(){throw new Gt}}let Qa=null;class Da extends ds{static get instance(){return Qa===null&&(Qa=new Da),Qa}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return C$(e,n,r)}formatOffset(e,n){return ur(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Dl=new Map;function IC(t){let e=Dl.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Dl.set(t,e)),e}const zC={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function OC(t,e){const n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,s,o,a,l,u,c]=r;return[o,i,s,a,l,u,c]}function TC(t,e){const n=t.formatToParts(e),r=[];for(let i=0;i<n.length;i++){const{type:s,value:o}=n[i],a=zC[s];s==="era"?r[a]=o:W(a)||(r[a]=parseInt(o,10))}return r}const el=new Map;class Bt extends ds{static create(e){let n=el.get(e);return n===void 0&&el.set(e,n=new Bt(e)),n}static resetCache(){el.clear(),Dl.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=Bt.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return C$(e,n,r,this.name)}formatOffset(e,n){return ur(this.offset(e),n)}offset(e){if(!this.valid)return NaN;const n=new Date(e);if(isNaN(n))return NaN;const r=IC(this.name);let[i,s,o,a,l,u,c]=r.formatToParts?TC(r,n):OC(r,n);a==="BC"&&(i=-Math.abs(i)+1);const f=Ea({year:i,month:s,day:o,hour:l===24?0:l,minute:u,second:c,millisecond:0});let h=+n;const m=h%1e3;return h-=m>=0?m:1e3+m,(f-h)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Lh={};function DC(t,e={}){const n=JSON.stringify([t,e]);let r=Lh[n];return r||(r=new Intl.ListFormat(t,e),Lh[n]=r),r}const Pl=new Map;function El(t,e={}){const n=JSON.stringify([t,e]);let r=Pl.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(t,e),Pl.set(n,r)),r}const Ml=new Map;function PC(t,e={}){const n=JSON.stringify([t,e]);let r=Ml.get(n);return r===void 0&&(r=new Intl.NumberFormat(t,e),Ml.set(n,r)),r}const Nl=new Map;function EC(t,e={}){const{base:n,...r}=e,i=JSON.stringify([t,r]);let s=Nl.get(i);return s===void 0&&(s=new Intl.RelativeTimeFormat(t,e),Nl.set(i,s)),s}let tr=null;function MC(){return tr||(tr=new Intl.DateTimeFormat().resolvedOptions().locale,tr)}const Cl=new Map;function S$(t){let e=Cl.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),Cl.set(t,e)),e}const Al=new Map;function NC(t){let e=Al.get(t);if(!e){const n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in e||(e={...I$,...e}),Al.set(t,e)}return e}function CC(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const n=t.indexOf("-u-");if(n===-1)return[t];{let r,i;try{r=El(t).resolvedOptions(),i=t}catch{const l=t.substring(0,n);r=El(l).resolvedOptions(),i=l}const{numberingSystem:s,calendar:o}=r;return[i,s,o]}}function AC(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function RC(t){const e=[];for(let n=1;n<=12;n++){const r=j.utc(2009,n,1);e.push(t(r))}return e}function ZC(t){const e=[];for(let n=1;n<=7;n++){const r=j.utc(2016,11,13+n);e.push(t(r))}return e}function Rs(t,e,n,r){const i=t.listingMode();return i==="error"?null:i==="en"?n(e):r(e)}function jC(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||S$(t.locale).numberingSystem==="latn"}class UC{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:i,floor:s,...o}=r;if(!n||Object.keys(o).length>0){const a={useGrouping:!1,...r};r.padTo>0&&(a.minimumIntegerDigits=r.padTo),this.inf=PC(e,a)}}format(e){if(this.inf){const n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{const n=this.floor?Math.floor(e):Pd(e,3);return Pe(n,this.padTo)}}}class LC{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&Bt.create(a).valid?(i=a,this.dt=e):(i="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=El(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class FC{constructor(e,n,r){this.opts={style:"long",...r},!n&&M$()&&(this.rtf=EC(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):c2(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}}const I$={firstDay:1,minimalDays:4,weekend:[6,7]};class re{static fromOpts(e){return re.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,i,s=!1){const o=e||ze.defaultLocale,a=o||(s?"en-US":MC()),l=n||ze.defaultNumberingSystem,u=r||ze.defaultOutputCalendar,c=Zl(i)||ze.defaultWeekSettings;return new re(a,l,u,c,o)}static resetCache(){tr=null,Pl.clear(),Ml.clear(),Nl.clear(),Cl.clear(),Al.clear()}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return re.create(e,n,r,i)}constructor(e,n,r,i,s){const[o,a,l]=CC(e);this.locale=o,this.numberingSystem=n||a||null,this.outputCalendar=r||l||null,this.weekSettings=i,this.intl=AC(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=jC(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:re.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Zl(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,n=!1){return Rs(this,e,Z$,()=>{const r=this.intl==="ja"||this.intl.startsWith("ja-");n&=!r;const i=n?{month:e,day:"numeric"}:{month:e},s=n?"format":"standalone";if(!this.monthsCache[s][e]){const o=r?a=>this.dtFormatter(a,i).format():a=>this.extract(a,i,"month");this.monthsCache[s][e]=RC(o)}return this.monthsCache[s][e]})}weekdays(e,n=!1){return Rs(this,e,L$,()=>{const r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=n?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=ZC(s=>this.extract(s,r,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return Rs(this,void 0,()=>F$,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[j.utc(2016,11,13,9),j.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Rs(this,e,V$,()=>{const n={era:e};return this.eraCache[e]||(this.eraCache[e]=[j.utc(-40,1,1),j.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){const i=this.dtFormatter(e,n),s=i.formatToParts(),o=s.find(a=>a.type.toLowerCase()===r);return o?o.value:null}numberFormatter(e={}){return new UC(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new LC(e,this.intl,n)}relFormatter(e={}){return new FC(this.intl,this.isEnglish(),e)}listFormatter(e={}){return DC(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||S$(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:N$()?NC(this.locale):I$}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let tl=null;class Ge extends ds{static get utcInstance(){return tl===null&&(tl=new Ge(0)),tl}static instance(e){return e===0?Ge.utcInstance:new Ge(e)}static parseSpecifier(e){if(e){const n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new Ge(Ma(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ur(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ur(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return ur(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class VC extends ds{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function Xt(t,e){if(W(t)||t===null)return e;if(t instanceof ds)return t;if(YC(t)){const n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?Da.instance:n==="utc"||n==="gmt"?Ge.utcInstance:Ge.parseSpecifier(n)||Bt.create(t)}else return ln(t)?Ge.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new VC(t)}const zd={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Fh={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},WC=zd.hanidec.replace(/[\[|\]]/g,"").split("");function HC(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){const r=t.charCodeAt(n);if(t[n].search(zd.hanidec)!==-1)e+=WC.indexOf(t[n]);else for(const i in Fh){const[s,o]=Fh[i];r>=s&&r<=o&&(e+=r-s)}}return parseInt(e,10)}else return e}const Rl=new Map;function BC(){Rl.clear()}function xt({numberingSystem:t},e=""){const n=t||"latn";let r=Rl.get(n);r===void 0&&(r=new Map,Rl.set(n,r));let i=r.get(e);return i===void 0&&(i=new RegExp(`${zd[n]}${e}`),r.set(e,i)),i}let Vh=()=>Date.now(),Wh="system",Hh=null,Bh=null,qh=null,Jh=60,Yh,Gh=null;class ze{static get now(){return Vh}static set now(e){Vh=e}static set defaultZone(e){Wh=e}static get defaultZone(){return Xt(Wh,Da.instance)}static get defaultLocale(){return Hh}static set defaultLocale(e){Hh=e}static get defaultNumberingSystem(){return Bh}static set defaultNumberingSystem(e){Bh=e}static get defaultOutputCalendar(){return qh}static set defaultOutputCalendar(e){qh=e}static get defaultWeekSettings(){return Gh}static set defaultWeekSettings(e){Gh=Zl(e)}static get twoDigitCutoffYear(){return Jh}static set twoDigitCutoffYear(e){Jh=e%100}static get throwOnInvalid(){return Yh}static set throwOnInvalid(e){Yh=e}static resetCaches(){re.resetCache(),Bt.resetCache(),j.resetCache(),BC()}}class It{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const z$=[0,31,59,90,120,151,181,212,243,273,304,334],O$=[0,31,60,91,121,152,182,213,244,274,305,335];function mt(t,e){return new It("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function Od(t,e,n){const r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const i=r.getUTCDay();return i===0?7:i}function T$(t,e,n){return n+(fs(t)?O$:z$)[e-1]}function D$(t,e){const n=fs(t)?O$:z$,r=n.findIndex(s=>s<e),i=e-n[r];return{month:r+1,day:i}}function Td(t,e){return(t-e+7)%7+1}function ko(t,e=4,n=1){const{year:r,month:i,day:s}=t,o=T$(r,i,s),a=Td(Od(r,i,s),n);let l=Math.floor((o-a+14-e)/7),u;return l<1?(u=r-1,l=Ir(u,e,n)):l>Ir(r,e,n)?(u=r+1,l=1):u=r,{weekYear:u,weekNumber:l,weekday:a,...Na(t)}}function Kh(t,e=4,n=1){const{weekYear:r,weekNumber:i,weekday:s}=t,o=Td(Od(r,1,e),n),a=fi(r);let l=i*7+s-o-7+e,u;l<1?(u=r-1,l+=fi(u)):l>a?(u=r+1,l-=fi(r)):u=r;const{month:c,day:d}=D$(u,l);return{year:u,month:c,day:d,...Na(t)}}function nl(t){const{year:e,month:n,day:r}=t,i=T$(e,n,r);return{year:e,ordinal:i,...Na(t)}}function Xh(t){const{year:e,ordinal:n}=t,{month:r,day:i}=D$(e,n);return{year:e,month:r,day:i,...Na(t)}}function Qh(t,e){if(!W(t.localWeekday)||!W(t.localWeekNumber)||!W(t.localWeekYear)){if(!W(t.weekday)||!W(t.weekNumber)||!W(t.weekYear))throw new oi("Cannot mix locale-based week fields with ISO-based week fields");return W(t.localWeekday)||(t.weekday=t.localWeekday),W(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),W(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function qC(t,e=4,n=1){const r=Pa(t.weekYear),i=pt(t.weekNumber,1,Ir(t.weekYear,e,n)),s=pt(t.weekday,1,7);return r?i?s?!1:mt("weekday",t.weekday):mt("week",t.weekNumber):mt("weekYear",t.weekYear)}function JC(t){const e=Pa(t.year),n=pt(t.ordinal,1,fi(t.year));return e?n?!1:mt("ordinal",t.ordinal):mt("year",t.year)}function P$(t){const e=Pa(t.year),n=pt(t.month,1,12),r=pt(t.day,1,$o(t.year,t.month));return e?n?r?!1:mt("day",t.day):mt("month",t.month):mt("year",t.year)}function E$(t){const{hour:e,minute:n,second:r,millisecond:i}=t,s=pt(e,0,23)||e===24&&n===0&&r===0&&i===0,o=pt(n,0,59),a=pt(r,0,59),l=pt(i,0,999);return s?o?a?l?!1:mt("millisecond",i):mt("second",r):mt("minute",n):mt("hour",e)}function W(t){return typeof t>"u"}function ln(t){return typeof t=="number"}function Pa(t){return typeof t=="number"&&t%1===0}function YC(t){return typeof t=="string"}function GC(t){return Object.prototype.toString.call(t)==="[object Date]"}function M$(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function N$(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function KC(t){return Array.isArray(t)?t:[t]}function em(t,e,n){if(t.length!==0)return t.reduce((r,i)=>{const s=[e(i),i];return r&&n(r[0],s[0])===r[0]?r:s},null)[1]}function XC(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function zi(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Zl(t){if(t==null)return null;if(typeof t!="object")throw new Fe("Week settings must be an object");if(!pt(t.firstDay,1,7)||!pt(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!pt(e,1,7)))throw new Fe("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function pt(t,e,n){return Pa(t)&&t>=e&&t<=n}function QC(t,e){return t-e*Math.floor(t/e)}function Pe(t,e=2){const n=t<0;let r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function Kt(t){if(!(W(t)||t===null||t===""))return parseInt(t,10)}function wn(t){if(!(W(t)||t===null||t===""))return parseFloat(t)}function Dd(t){if(!(W(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Pd(t,e,n="round"){const r=10**e;switch(n){case"expand":return t>0?Math.ceil(t*r)/r:Math.floor(t*r)/r;case"trunc":return Math.trunc(t*r)/r;case"round":return Math.round(t*r)/r;case"floor":return Math.floor(t*r)/r;case"ceil":return Math.ceil(t*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function fs(t){return t%4===0&&(t%100!==0||t%400===0)}function fi(t){return fs(t)?366:365}function $o(t,e){const n=QC(e-1,12)+1,r=t+(e-n)/12;return n===2?fs(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ea(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function tm(t,e,n){return-Td(Od(t,1,e),n)+e-1}function Ir(t,e=4,n=1){const r=tm(t,e,n),i=tm(t+1,e,n);return(fi(t)-r+i)/7}function jl(t){return t>99?t:t>ze.twoDigitCutoffYear?1900+t:2e3+t}function C$(t,e,n,r=null){const i=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);const o={timeZoneName:e,...s},a=new Intl.DateTimeFormat(n,o).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function Ma(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);const r=parseInt(e,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function A$(t){const e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new Fe(`Invalid unit value ${t}`);return e}function xo(t,e){const n={};for(const r in t)if(zi(t,r)){const i=t[r];if(i==null)continue;n[e(r)]=A$(i)}return n}function ur(t,e){const n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${Pe(n,2)}:${Pe(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${Pe(n,2)}${Pe(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Na(t){return XC(t,["hour","minute","second","millisecond"])}const e2=["January","February","March","April","May","June","July","August","September","October","November","December"],R$=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t2=["J","F","M","A","M","J","J","A","S","O","N","D"];function Z$(t){switch(t){case"narrow":return[...t2];case"short":return[...R$];case"long":return[...e2];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const j$=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],U$=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],n2=["M","T","W","T","F","S","S"];function L$(t){switch(t){case"narrow":return[...n2];case"short":return[...U$];case"long":return[...j$];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const F$=["AM","PM"],i2=["Before Christ","Anno Domini"],r2=["BC","AD"],s2=["B","A"];function V$(t){switch(t){case"narrow":return[...s2];case"short":return[...r2];case"long":return[...i2];default:return null}}function o2(t){return F$[t.hour<12?0:1]}function a2(t,e){return L$(e)[t.weekday-1]}function l2(t,e){return Z$(e)[t.month-1]}function u2(t,e){return V$(e)[t.year<0?0:1]}function c2(t,e,n="always",r=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},s=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&s){const d=t==="days";switch(e){case 1:return d?"tomorrow":`next ${i[t][0]}`;case-1:return d?"yesterday":`last ${i[t][0]}`;case 0:return d?"today":`this ${i[t][0]}`}}const o=Object.is(e,-0)||e<0,a=Math.abs(e),l=a===1,u=i[t],c=r?l?u[1]:u[2]||u[1]:l?i[t][0]:t;return o?`${a} ${c} ago`:`in ${a} ${c}`}function nm(t,e){let n="";for(const r of t)r.literal?n+=r.val:n+=e(r.val);return n}const d2={D:_o,DD:o$,DDD:a$,DDDD:l$,t:u$,tt:c$,ttt:d$,tttt:f$,T:h$,TT:m$,TTT:p$,TTTT:g$,f:v$,ff:y$,fff:k$,ffff:x$,F:b$,FF:_$,FFF:$$,FFFF:w$};class We{static create(e,n={}){return new We(e,n)}static parseFormat(e){let n=null,r="",i=!1;const s=[];for(let o=0;o<e.length;o++){const a=e.charAt(o);a==="'"?((r.length>0||i)&&s.push({literal:i||/^\s+$/.test(r),val:r===""?"'":r}),n=null,r="",i=!i):i||a===n?r+=a:(r.length>0&&s.push({literal:/^\s+$/.test(r),val:r}),r=a,n=a)}return r.length>0&&s.push({literal:i||/^\s+$/.test(r),val:r}),s}static macroTokenToFormatOpts(e){return d2[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0,r=void 0){if(this.opts.forceSimple)return Pe(e,n);const i={...this.opts};return n>0&&(i.padTo=n),r&&(i.signDisplay=r),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,n){const r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(h,m)=>this.loc.extract(e,h,m),o=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",a=()=>r?o2(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(h,m)=>r?l2(e,h):s(m?{month:h}:{month:h,day:"numeric"},"month"),u=(h,m)=>r?a2(e,h):s(m?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),c=h=>{const m=We.macroTokenToFormatOpts(h);return m?this.formatWithSystemDefault(e,m):h},d=h=>r?u2(e,h):s({era:h},"era"),f=h=>{switch(h){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return i?s({day:"numeric"},"day"):this.num(e.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(e.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(e.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return c(h)}};return nm(We.parseFormat(n),f)}formatDurationFromString(e,n){const r=this.opts.signMode==="negativeLargestOnly"?-1:1,i=c=>{switch(c[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=(c,d)=>f=>{const h=i(f);if(h){const m=d.isNegativeDuration&&h!==d.largestUnit?r:1;let p;return this.opts.signMode==="negativeLargestOnly"&&h!==d.largestUnit?p="never":this.opts.signMode==="all"?p="always":p="auto",this.num(c.get(h)*m,f.length,p)}else return f},o=We.parseFormat(n),a=o.reduce((c,{literal:d,val:f})=>d?c:c.concat(f),[]),l=e.shiftTo(...a.map(i).filter(c=>c)),u={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return nm(o,s(l,u))}}const W$=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Ai(...t){const e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function Ri(...t){return e=>t.reduce(([n,r,i],s)=>{const[o,a,l]=s(e,i);return[{...n,...o},a||r,l]},[{},null,1]).slice(0,2)}function Zi(t,...e){if(t==null)return[null,null];for(const[n,r]of e){const i=n.exec(t);if(i)return r(i)}return[null,null]}function H$(...t){return(e,n)=>{const r={};let i;for(i=0;i<t.length;i++)r[t[i]]=Kt(e[n+i]);return[r,null,n+i]}}const B$=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,f2=`(?:${B$.source}?(?:\\[(${W$.source})\\])?)?`,Ed=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,q$=RegExp(`${Ed.source}${f2}`),Md=RegExp(`(?:[Tt]${q$.source})?`),h2=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,m2=/(\d{4})-?W(\d\d)(?:-?(\d))?/,p2=/(\d{4})-?(\d{3})/,g2=H$("weekYear","weekNumber","weekDay"),v2=H$("year","ordinal"),b2=/(\d{4})-(\d\d)-(\d\d)/,J$=RegExp(`${Ed.source} ?(?:${B$.source}|(${W$.source}))?`),y2=RegExp(`(?: ${J$.source})?`);function hi(t,e,n){const r=t[e];return W(r)?n:Kt(r)}function _2(t,e){return[{year:hi(t,e),month:hi(t,e+1,1),day:hi(t,e+2,1)},null,e+3]}function ji(t,e){return[{hours:hi(t,e,0),minutes:hi(t,e+1,0),seconds:hi(t,e+2,0),milliseconds:Dd(t[e+3])},null,e+4]}function hs(t,e){const n=!t[e]&&!t[e+1],r=Ma(t[e+1],t[e+2]),i=n?null:Ge.instance(r);return[{},i,e+3]}function ms(t,e){const n=t[e]?Bt.create(t[e]):null;return[{},n,e+1]}const k2=RegExp(`^T?${Ed.source}$`),$2=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function x2(t){const[e,n,r,i,s,o,a,l,u]=t,c=e[0]==="-",d=l&&l[0]==="-",f=(h,m=!1)=>h!==void 0&&(m||h&&c)?-h:h;return[{years:f(wn(n)),months:f(wn(r)),weeks:f(wn(i)),days:f(wn(s)),hours:f(wn(o)),minutes:f(wn(a)),seconds:f(wn(l),l==="-0"),milliseconds:f(Dd(u),d)}]}const w2={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nd(t,e,n,r,i,s,o){const a={year:e.length===2?jl(Kt(e)):Kt(e),month:R$.indexOf(n)+1,day:Kt(r),hour:Kt(i),minute:Kt(s)};return o&&(a.second=Kt(o)),t&&(a.weekday=t.length>3?j$.indexOf(t)+1:U$.indexOf(t)+1),a}const S2=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function I2(t){const[,e,n,r,i,s,o,a,l,u,c,d]=t,f=Nd(e,i,r,n,s,o,a);let h;return l?h=w2[l]:u?h=0:h=Ma(c,d),[f,new Ge(h)]}function z2(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const O2=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,T2=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,D2=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function im(t){const[,e,n,r,i,s,o,a]=t;return[Nd(e,i,r,n,s,o,a),Ge.utcInstance]}function P2(t){const[,e,n,r,i,s,o,a]=t;return[Nd(e,a,n,r,i,s,o),Ge.utcInstance]}const E2=Ai(h2,Md),M2=Ai(m2,Md),N2=Ai(p2,Md),C2=Ai(q$),Y$=Ri(_2,ji,hs,ms),A2=Ri(g2,ji,hs,ms),R2=Ri(v2,ji,hs,ms),Z2=Ri(ji,hs,ms);function j2(t){return Zi(t,[E2,Y$],[M2,A2],[N2,R2],[C2,Z2])}function U2(t){return Zi(z2(t),[S2,I2])}function L2(t){return Zi(t,[O2,im],[T2,im],[D2,P2])}function F2(t){return Zi(t,[$2,x2])}const V2=Ri(ji);function W2(t){return Zi(t,[k2,V2])}const H2=Ai(b2,y2),B2=Ai(J$),q2=Ri(ji,hs,ms);function J2(t){return Zi(t,[H2,Y$],[B2,q2])}const rm="Invalid Duration",G$={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Y2={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...G$},ft=146097/400,Qn=146097/4800,G2={years:{quarters:4,months:12,weeks:ft/7,days:ft,hours:ft*24,minutes:ft*24*60,seconds:ft*24*60*60,milliseconds:ft*24*60*60*1e3},quarters:{months:3,weeks:ft/28,days:ft/4,hours:ft*24/4,minutes:ft*24*60/4,seconds:ft*24*60*60/4,milliseconds:ft*24*60*60*1e3/4},months:{weeks:Qn/7,days:Qn,hours:Qn*24,minutes:Qn*24*60,seconds:Qn*24*60*60,milliseconds:Qn*24*60*60*1e3},...G$},En=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],K2=En.slice(0).reverse();function Rt(t,e,n=!1){const r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new te(r)}function K$(t,e){let n=e.milliseconds??0;for(const r of K2.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function sm(t,e){const n=K$(t,e)<0?-1:1;En.reduceRight((r,i)=>{if(W(e[i]))return r;if(r){const s=e[r]*n,o=t[i][r],a=Math.floor(s/o);e[i]+=a*n,e[r]-=a*o*n}return i},null),En.reduce((r,i)=>{if(W(e[i]))return r;if(r){const s=e[r]%1;e[r]-=s,e[i]+=s*t[r][i]}return i},null)}function om(t){const e={};for(const[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}class te{constructor(e){const n=e.conversionAccuracy==="longterm"||!1;let r=n?G2:Y2;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||re.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return te.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new Fe(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new te({values:xo(e,te.normalizeUnit),loc:re.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(ln(e))return te.fromMillis(e);if(te.isDuration(e))return e;if(typeof e=="object")return te.fromObject(e);throw new Fe(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){const[r]=F2(e);return r?te.fromObject(r,n):te.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){const[r]=W2(e);return r?te.fromObject(r,n):te.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new Fe("need to specify a reason the Duration is invalid");const r=e instanceof It?e:new It(e,n);if(ze.throwOnInvalid)throw new xC(r);return new te({invalid:r})}static normalizeUnit(e){const n={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!n)throw new s$(e);return n}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,n={}){const r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?We.create(this.loc,r).formatDurationFromString(this,e):rm}toHuman(e={}){if(!this.isValid)return rm;const n=e.showZeros!==!1,r=En.map(i=>{const s=this.values[i];return W(s)||s===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Pd(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},j.fromMillis(n,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?K$(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e),r={};for(const i of En)(zi(n.values,i)||zi(this.values,i))&&(r[i]=n.get(i)+this.get(i));return Rt(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;const n={};for(const r of Object.keys(this.values))n[r]=A$(e(this.values[r],r));return Rt(this,{values:n},!0)}get(e){return this[te.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const n={...this.values,...xo(e,te.normalizeUnit)};return Rt(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:i}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:i,conversionAccuracy:r};return Rt(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return sm(this.matrix,e),Rt(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=om(this.normalize().shiftToAll().toObject());return Rt(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>te.normalizeUnit(o));const n={},r={},i=this.toObject();let s;for(const o of En)if(e.indexOf(o)>=0){s=o;let a=0;for(const u in r)a+=this.matrix[u][o]*r[u],r[u]=0;ln(i[o])&&(a+=i[o]);const l=Math.trunc(a);n[o]=l,r[o]=(a*1e3-l*1e3)/1e3}else ln(i[o])&&(r[o]=i[o]);for(const o in r)r[o]!==0&&(n[s]+=o===s?r[o]:r[o]/this.matrix[s][o]);return sm(this.matrix,n),Rt(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return Rt(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=om(this.values);return Rt(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function n(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(const r of En)if(!n(this.values[r],e.values[r]))return!1;return!0}}const ei="Invalid Interval";function X2(t,e){return!t||!t.isValid?Ie.invalid("missing or invalid start"):!e||!e.isValid?Ie.invalid("missing or invalid end"):e<t?Ie.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class Ie{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new Fe("need to specify a reason the Interval is invalid");const r=e instanceof It?e:new It(e,n);if(ze.throwOnInvalid)throw new $C(r);return new Ie({invalid:r})}static fromDateTimes(e,n){const r=Yi(e),i=Yi(n),s=X2(r,i);return s??new Ie({start:r,end:i})}static after(e,n){const r=te.fromDurationLike(n),i=Yi(e);return Ie.fromDateTimes(i,i.plus(r))}static before(e,n){const r=te.fromDurationLike(n),i=Yi(e);return Ie.fromDateTimes(i.minus(r),i)}static fromISO(e,n){const[r,i]=(e||"").split("/",2);if(r&&i){let s,o;try{s=j.fromISO(r,n),o=s.isValid}catch{o=!1}let a,l;try{a=j.fromISO(i,n),l=a.isValid}catch{l=!1}if(o&&l)return Ie.fromDateTimes(s,a);if(o){const u=te.fromISO(i,n);if(u.isValid)return Ie.after(s,u)}else if(l){const u=te.fromISO(r,n);if(u.isValid)return Ie.before(a,u)}}return Ie.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",n){if(!this.isValid)return NaN;const r=this.start.startOf(e,n);let i;return n!=null&&n.useLocaleWeeks?i=this.end.reconfigure({locale:r.locale}):i=this.end,i=i.startOf(e,n),Math.floor(i.diff(r,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:n}={}){return this.isValid?Ie.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];const n=e.map(Yi).filter(o=>this.contains(o)).sort((o,a)=>o.toMillis()-a.toMillis()),r=[];let{s:i}=this,s=0;for(;i<this.e;){const o=n[s]||this.e,a=+o>+this.e?this.e:o;r.push(Ie.fromDateTimes(i,a)),i=a,s+=1}return r}splitBy(e){const n=te.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,i=1,s;const o=[];for(;r<this.e;){const a=this.start.plus(n.mapUnits(l=>l*i));s=+a>+this.e?this.e:a,o.push(Ie.fromDateTimes(r,s)),r=s,i+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:Ie.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;const n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return Ie.fromDateTimes(n,r)}static merge(e){const[n,r]=e.sort((i,s)=>i.s-s.s).reduce(([i,s],o)=>s?s.overlaps(o)||s.abutsStart(o)?[i,s.union(o)]:[i.concat([s]),o]:[i,o],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0;const i=[],s=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...s),a=o.sort((l,u)=>l.time-u.time);for(const l of a)r+=l.type==="s"?1:-1,r===1?n=l.time:(n&&+n!=+l.time&&i.push(Ie.fromDateTimes(n,l.time)),n=null);return Ie.merge(i)}difference(...e){return Ie.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:ei}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=_o,n={}){return this.isValid?We.create(this.s.loc.clone(n),e).formatInterval(this):ei}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:ei}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:ei}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:ei}toFormat(e,{separator:n=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:ei}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):te.invalid(this.invalidReason)}mapEndpoints(e){return Ie.fromDateTimes(e(this.s),e(this.e))}}class Zs{static hasDST(e=ze.defaultZone){const n=j.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return Bt.isValidZone(e)}static normalizeZone(e){return Xt(e,ze.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||re.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||re.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||re.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||re.create(n,r,s)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||re.create(n,r,s)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||re.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||re.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return re.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return re.create(n,null,"gregory").eras(e)}static features(){return{relative:M$(),localeWeek:N$()}}}function am(t,e){const n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(te.fromMillis(r).as("days"))}function Q2(t,e,n){const r=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{const c=am(l,u);return(c-c%7)/7}],["days",am]],i={},s=t;let o,a;for(const[l,u]of r)n.indexOf(l)>=0&&(o=l,i[l]=u(t,e),a=s.plus(i),a>e?(i[l]--,t=s.plus(i),t>e&&(a=t,i[l]--,t=s.plus(i))):t=a);return[t,i,a,o]}function e6(t,e,n,r){let[i,s,o,a]=Q2(t,e,n);const l=e-i,u=n.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);u.length===0&&(o<e&&(o=i.plus({[a]:1})),o!==i&&(s[a]=(s[a]||0)+l/(o-i)));const c=te.fromObject(s,r);return u.length>0?te.fromMillis(l,r).shiftTo(...u).plus(c):c}const t6="missing Intl.DateTimeFormat.formatToParts support";function ie(t,e=n=>n){return{regex:t,deser:([n])=>e(HC(n))}}const n6=" ",X$=`[ ${n6}]`,Q$=new RegExp(X$,"g");function i6(t){return t.replace(/\./g,"\\.?").replace(Q$,X$)}function lm(t){return t.replace(/\./g,"").replace(Q$," ").toLowerCase()}function wt(t,e){return t===null?null:{regex:RegExp(t.map(i6).join("|")),deser:([n])=>t.findIndex(r=>lm(n)===lm(r))+e}}function um(t,e){return{regex:t,deser:([,n,r])=>Ma(n,r),groups:e}}function js(t){return{regex:t,deser:([e])=>e}}function r6(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function s6(t,e){const n=xt(e),r=xt(e,"{2}"),i=xt(e,"{3}"),s=xt(e,"{4}"),o=xt(e,"{6}"),a=xt(e,"{1,2}"),l=xt(e,"{1,3}"),u=xt(e,"{1,6}"),c=xt(e,"{1,9}"),d=xt(e,"{2,4}"),f=xt(e,"{4,6}"),h=g=>({regex:RegExp(r6(g.val)),deser:([b])=>b,literal:!0}),p=(g=>{if(t.literal)return h(g);switch(g.val){case"G":return wt(e.eras("short"),0);case"GG":return wt(e.eras("long"),0);case"y":return ie(u);case"yy":return ie(d,jl);case"yyyy":return ie(s);case"yyyyy":return ie(f);case"yyyyyy":return ie(o);case"M":return ie(a);case"MM":return ie(r);case"MMM":return wt(e.months("short",!0),1);case"MMMM":return wt(e.months("long",!0),1);case"L":return ie(a);case"LL":return ie(r);case"LLL":return wt(e.months("short",!1),1);case"LLLL":return wt(e.months("long",!1),1);case"d":return ie(a);case"dd":return ie(r);case"o":return ie(l);case"ooo":return ie(i);case"HH":return ie(r);case"H":return ie(a);case"hh":return ie(r);case"h":return ie(a);case"mm":return ie(r);case"m":return ie(a);case"q":return ie(a);case"qq":return ie(r);case"s":return ie(a);case"ss":return ie(r);case"S":return ie(l);case"SSS":return ie(i);case"u":return js(c);case"uu":return js(a);case"uuu":return ie(n);case"a":return wt(e.meridiems(),0);case"kkkk":return ie(s);case"kk":return ie(d,jl);case"W":return ie(a);case"WW":return ie(r);case"E":case"c":return ie(n);case"EEE":return wt(e.weekdays("short",!1),1);case"EEEE":return wt(e.weekdays("long",!1),1);case"ccc":return wt(e.weekdays("short",!0),1);case"cccc":return wt(e.weekdays("long",!0),1);case"Z":case"ZZ":return um(new RegExp(`([+-]${a.source})(?::(${r.source}))?`),2);case"ZZZ":return um(new RegExp(`([+-]${a.source})(${r.source})?`),2);case"z":return js(/[a-z_+-/]{1,256}?/i);case" ":return js(/[^\S\n\r]/);default:return h(g)}})(t)||{invalidReason:t6};return p.token=t,p}const o6={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function a6(t,e,n){const{type:r,value:i}=t;if(r==="literal"){const l=/^\s+$/.test(i);return{literal:!l,val:l?" ":i}}const s=e[r];let o=r;r==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let a=o6[o];if(typeof a=="object"&&(a=a[s]),a)return{literal:!1,val:a}}function l6(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function u6(t,e,n){const r=t.match(e);if(r){const i={};let s=1;for(const o in n)if(zi(n,o)){const a=n[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(i[a.token.val[0]]=a.deser(r.slice(s,s+l))),s+=l}return[r,i]}else return[r,{}]}function c6(t){const e=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let n=null,r;return W(t.z)||(n=Bt.create(t.z)),W(t.Z)||(n||(n=new Ge(t.Z)),r=t.Z),W(t.q)||(t.M=(t.q-1)*3+1),W(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),W(t.u)||(t.S=Dd(t.u)),[Object.keys(t).reduce((s,o)=>{const a=e(o);return a&&(s[a]=t[o]),s},{}),n,r]}let il=null;function d6(){return il||(il=j.fromMillis(1555555555555)),il}function f6(t,e){if(t.literal)return t;const n=We.macroTokenToFormatOpts(t.val),r=ix(n,e);return r==null||r.includes(void 0)?t:r}function ex(t,e){return Array.prototype.concat(...t.map(n=>f6(n,e)))}class tx{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=ex(We.parseFormat(n),e),this.units=this.tokens.map(r=>s6(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,i]=l6(this.units);this.regex=RegExp(r,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){const[n,r]=u6(e,this.regex,this.handlers),[i,s,o]=r?c6(r):[null,null,void 0];if(zi(r,"a")&&zi(r,"H"))throw new oi("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:i,zone:s,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function nx(t,e,n){return new tx(t,n).explainFromTokens(e)}function h6(t,e,n){const{result:r,zone:i,specificOffset:s,invalidReason:o}=nx(t,e,n);return[r,i,s,o]}function ix(t,e){if(!t)return null;const r=We.create(e,t).dtFormatter(d6()),i=r.formatToParts(),s=r.resolvedOptions();return i.map(o=>a6(o,t,s))}const rl="Invalid DateTime",cm=864e13;function nr(t){return new It("unsupported zone",`the zone "${t.name}" is not supported`)}function sl(t){return t.weekData===null&&(t.weekData=ko(t.c)),t.weekData}function ol(t){return t.localWeekData===null&&(t.localWeekData=ko(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function Sn(t,e){const n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new j({...n,...e,old:n})}function rx(t,e,n){let r=t-e*60*1e3;const i=n.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;const s=n.offset(r);return i===s?[r,i]:[t-Math.min(i,s)*60*1e3,Math.max(i,s)]}function Us(t,e){t+=e*60*1e3;const n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Hs(t,e,n){return rx(Ea(t),e,n)}function dm(t,e){const n=t.o,r=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s={...t.c,year:r,month:i,day:Math.min(t.c.day,$o(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=te.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=Ea(s);let[l,u]=rx(a,n,t.zone);return o!==0&&(l+=o,u=t.zone.offset(l)),{ts:l,o:u}}function ti(t,e,n,r,i,s){const{setZone:o,zone:a}=n;if(t&&Object.keys(t).length!==0||e){const l=e||a,u=j.fromObject(t,{...n,zone:l,specificOffset:s});return o?u:u.setZone(a)}else return j.invalid(new It("unparsable",`the input "${i}" can't be parsed as ${r}`))}function Ls(t,e,n=!0){return t.isValid?We.create(re.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function al(t,e,n){const r=t.c.year>9999||t.c.year<0;let i="";if(r&&t.c.year>=0&&(i+="+"),i+=Pe(t.c.year,r?6:4),n==="year")return i;if(e){if(i+="-",i+=Pe(t.c.month),n==="month")return i;i+="-"}else if(i+=Pe(t.c.month),n==="month")return i;return i+=Pe(t.c.day),i}function fm(t,e,n,r,i,s,o){let a=!n||t.c.millisecond!==0||t.c.second!==0,l="";switch(o){case"day":case"month":case"year":break;default:if(l+=Pe(t.c.hour),o==="hour")break;if(e){if(l+=":",l+=Pe(t.c.minute),o==="minute")break;a&&(l+=":",l+=Pe(t.c.second))}else{if(l+=Pe(t.c.minute),o==="minute")break;a&&(l+=Pe(t.c.second))}if(o==="second")break;a&&(!r||t.c.millisecond!==0)&&(l+=".",l+=Pe(t.c.millisecond,3))}return i&&(t.isOffsetFixed&&t.offset===0&&!s?l+="Z":t.o<0?(l+="-",l+=Pe(Math.trunc(-t.o/60)),l+=":",l+=Pe(Math.trunc(-t.o%60))):(l+="+",l+=Pe(Math.trunc(t.o/60)),l+=":",l+=Pe(Math.trunc(t.o%60)))),s&&(l+="["+t.zone.ianaName+"]"),l}const sx={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},m6={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},p6={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Bs=["year","month","day","hour","minute","second","millisecond"],g6=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],v6=["year","ordinal","hour","minute","second","millisecond"];function qs(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new s$(t);return e}function hm(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return qs(t)}}function b6(t){if(ir===void 0&&(ir=ze.now()),t.type!=="iana")return t.offset(ir);const e=t.name;let n=Ul.get(e);return n===void 0&&(n=t.offset(ir),Ul.set(e,n)),n}function mm(t,e){const n=Xt(e.zone,ze.defaultZone);if(!n.isValid)return j.invalid(nr(n));const r=re.fromObject(e);let i,s;if(W(t.year))i=ze.now();else{for(const l of Bs)W(t[l])&&(t[l]=sx[l]);const o=P$(t)||E$(t);if(o)return j.invalid(o);const a=b6(n);[i,s]=Hs(t,a,n)}return new j({ts:i,zone:n,loc:r,o:s})}function pm(t,e,n){const r=W(n.round)?!0:n.round,i=W(n.rounding)?"trunc":n.rounding,s=(a,l)=>(a=Pd(a,r||n.calendary?0:2,n.calendary?"round":i),e.loc.clone(n).relFormatter(n).format(a,l)),o=a=>n.calendary?e.hasSame(t,a)?0:e.startOf(a).diff(t.startOf(a),a).get(a):e.diff(t,a).get(a);if(n.unit)return s(o(n.unit),n.unit);for(const a of n.units){const l=o(a);if(Math.abs(l)>=1)return s(l,a)}return s(t>e?-0:0,n.units[n.units.length-1])}function gm(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}let ir;const Ul=new Map;class j{constructor(e){const n=e.zone||ze.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new It("invalid input"):null)||(n.isValid?null:nr(n));this.ts=W(e.ts)?ze.now():e.ts;let i=null,s=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[i,s]=[e.old.c,e.old.o];else{const a=ln(e.o)&&!e.old?e.o:n.offset(this.ts);i=Us(this.ts,a),r=Number.isNaN(i.year)?new It("invalid input"):null,i=r?null:i,s=r?null:a}this._zone=n,this.loc=e.loc||re.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new j({})}static local(){const[e,n]=gm(arguments),[r,i,s,o,a,l,u]=n;return mm({year:r,month:i,day:s,hour:o,minute:a,second:l,millisecond:u},e)}static utc(){const[e,n]=gm(arguments),[r,i,s,o,a,l,u]=n;return e.zone=Ge.utcInstance,mm({year:r,month:i,day:s,hour:o,minute:a,second:l,millisecond:u},e)}static fromJSDate(e,n={}){const r=GC(e)?e.valueOf():NaN;if(Number.isNaN(r))return j.invalid("invalid input");const i=Xt(n.zone,ze.defaultZone);return i.isValid?new j({ts:r,zone:i,loc:re.fromObject(n)}):j.invalid(nr(i))}static fromMillis(e,n={}){if(ln(e))return e<-cm||e>cm?j.invalid("Timestamp out of range"):new j({ts:e,zone:Xt(n.zone,ze.defaultZone),loc:re.fromObject(n)});throw new Fe(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(ln(e))return new j({ts:e*1e3,zone:Xt(n.zone,ze.defaultZone),loc:re.fromObject(n)});throw new Fe("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};const r=Xt(n.zone,ze.defaultZone);if(!r.isValid)return j.invalid(nr(r));const i=re.fromObject(n),s=xo(e,hm),{minDaysInFirstWeek:o,startOfWeek:a}=Qh(s,i),l=ze.now(),u=W(n.specificOffset)?r.offset(l):n.specificOffset,c=!W(s.ordinal),d=!W(s.year),f=!W(s.month)||!W(s.day),h=d||f,m=s.weekYear||s.weekNumber;if((h||c)&&m)throw new oi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&c)throw new oi("Can't mix ordinal dates with month/day");const p=m||s.weekday&&!h;let g,b,k=Us(l,u);p?(g=g6,b=m6,k=ko(k,o,a)):c?(g=v6,b=p6,k=nl(k)):(g=Bs,b=sx);let $=!1;for(const Z of g){const L=s[Z];W(L)?$?s[Z]=b[Z]:s[Z]=k[Z]:$=!0}const w=p?qC(s,o,a):c?JC(s):P$(s),_=w||E$(s);if(_)return j.invalid(_);const I=p?Kh(s,o,a):c?Xh(s):s,[z,O]=Hs(I,u,r),E=new j({ts:z,zone:r,o:O,loc:i});return s.weekday&&h&&e.weekday!==E.weekday?j.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${E.toISO()}`):E.isValid?E:j.invalid(E.invalid)}static fromISO(e,n={}){const[r,i]=j2(e);return ti(r,i,n,"ISO 8601",e)}static fromRFC2822(e,n={}){const[r,i]=U2(e);return ti(r,i,n,"RFC 2822",e)}static fromHTTP(e,n={}){const[r,i]=L2(e);return ti(r,i,n,"HTTP",n)}static fromFormat(e,n,r={}){if(W(e)||W(n))throw new Fe("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:s=null}=r,o=re.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[a,l,u,c]=h6(o,e,n);return c?j.invalid(c):ti(a,l,r,`format ${n}`,e,u)}static fromString(e,n,r={}){return j.fromFormat(e,n,r)}static fromSQL(e,n={}){const[r,i]=J2(e);return ti(r,i,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new Fe("need to specify a reason the DateTime is invalid");const r=e instanceof It?e:new It(e,n);if(ze.throwOnInvalid)throw new kC(r);return new j({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){const r=ix(e,re.fromObject(n));return r?r.map(i=>i?i.val:null).join(""):null}static expandFormat(e,n={}){return ex(We.parseFormat(e),re.fromObject(n)).map(i=>i.val).join("")}static resetCache(){ir=void 0,Ul.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?sl(this).weekYear:NaN}get weekNumber(){return this.isValid?sl(this).weekNumber:NaN}get weekday(){return this.isValid?sl(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ol(this).weekday:NaN}get localWeekNumber(){return this.isValid?ol(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ol(this).weekYear:NaN}get ordinal(){return this.isValid?nl(this.c).ordinal:NaN}get monthShort(){return this.isValid?Zs.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Zs.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Zs.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Zs.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,n=6e4,r=Ea(this.c),i=this.zone.offset(r-e),s=this.zone.offset(r+e),o=this.zone.offset(r-i*n),a=this.zone.offset(r-s*n);if(o===a)return[this];const l=r-o*n,u=r-a*n,c=Us(l,o),d=Us(u,a);return c.hour===d.hour&&c.minute===d.minute&&c.second===d.second&&c.millisecond===d.millisecond?[Sn(this,{ts:l}),Sn(this,{ts:u})]:[this]}get isInLeapYear(){return fs(this.year)}get daysInMonth(){return $o(this.year,this.month)}get daysInYear(){return this.isValid?fi(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ir(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ir(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:n,numberingSystem:r,calendar:i}=We.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:i}}toUTC(e=0,n={}){return this.setZone(Ge.instance(e),n)}toLocal(){return this.setZone(ze.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=Xt(e,ze.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(n||r){const s=e.offset(this.ts),o=this.toObject();[i]=Hs(o,s,e)}return Sn(this,{ts:i,zone:e})}else return j.invalid(nr(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){const i=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return Sn(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const n=xo(e,hm),{minDaysInFirstWeek:r,startOfWeek:i}=Qh(n,this.loc),s=!W(n.weekYear)||!W(n.weekNumber)||!W(n.weekday),o=!W(n.ordinal),a=!W(n.year),l=!W(n.month)||!W(n.day),u=a||l,c=n.weekYear||n.weekNumber;if((u||o)&&c)throw new oi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new oi("Can't mix ordinal dates with month/day");let d;s?d=Kh({...ko(this.c,r,i),...n},r,i):W(n.ordinal)?(d={...this.toObject(),...n},W(n.day)&&(d.day=Math.min($o(d.year,d.month),d.day))):d=Xh({...nl(this.c),...n});const[f,h]=Hs(d,this.o,this.zone);return Sn(this,{ts:f,o:h})}plus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e);return Sn(this,dm(this,n))}minus(e){if(!this.isValid)return this;const n=te.fromDurationLike(e).negate();return Sn(this,dm(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;const r={},i=te.normalizeUnit(e);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks")if(n){const s=this.loc.getStartOfWeek(),{weekday:o}=this;o<s&&(r.weekNumber=this.weekNumber-1),r.weekday=s}else r.weekday=1;if(i==="quarters"){const s=Math.ceil(this.month/3);r.month=(s-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?We.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):rl}toLocaleString(e=_o,n={}){return this.isValid?We.create(this.loc.clone(n),e).formatDateTime(this):rl}toLocaleParts(e={}){return this.isValid?We.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:s=!1,precision:o="milliseconds"}={}){if(!this.isValid)return null;o=qs(o);const a=e==="extended";let l=al(this,a,o);return Bs.indexOf(o)>=3&&(l+="T"),l+=fm(this,a,n,r,i,s,o),l}toISODate({format:e="extended",precision:n="day"}={}){return this.isValid?al(this,e==="extended",qs(n)):null}toISOWeekDate(){return Ls(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:s=!1,format:o="extended",precision:a="milliseconds"}={}){return this.isValid?(a=qs(a),(i&&Bs.indexOf(a)>=3?"T":"")+fm(this,o==="extended",n,e,r,s,a)):null}toRFC2822(){return Ls(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Ls(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?al(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(n||e)&&(r&&(i+=" "),n?i+="z":e&&(i+="ZZ")),Ls(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():rl}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return te.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...r},s=KC(n).map(te.normalizeUnit),o=e.valueOf()>this.valueOf(),a=o?this:e,l=o?e:this,u=e6(a,l,s,i);return o?u.negate():u}diffNow(e="milliseconds",n={}){return this.diff(j.now(),e,n)}until(e){return this.isValid?Ie.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;const i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(n,r)<=i&&i<=s.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const n=e.base||j.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(i=e.unit,s=void 0),pm(n,this.plus(r),{...e,numeric:"always",units:i,unit:s})}toRelativeCalendar(e={}){return this.isValid?pm(e.base||j.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(j.isDateTime))throw new Fe("min requires all arguments be DateTimes");return em(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(j.isDateTime))throw new Fe("max requires all arguments be DateTimes");return em(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){const{locale:i=null,numberingSystem:s=null}=r,o=re.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return nx(o,e,n)}static fromStringExplain(e,n,r={}){return j.fromFormatExplain(e,n,r)}static buildFormatParser(e,n={}){const{locale:r=null,numberingSystem:i=null}=n,s=re.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return new tx(s,e)}static fromFormatParser(e,n,r={}){if(W(e)||W(n))throw new Fe("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:s=null}=r,o=re.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});if(!o.equals(n.locale))throw new Fe(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);const{result:a,zone:l,specificOffset:u,invalidReason:c}=n.explainFromTokens(e);return c?j.invalid(c):ti(a,l,r,`format ${n.format}`,e,u)}static get DATE_SHORT(){return _o}static get DATE_MED(){return o$}static get DATE_MED_WITH_WEEKDAY(){return wC}static get DATE_FULL(){return a$}static get DATE_HUGE(){return l$}static get TIME_SIMPLE(){return u$}static get TIME_WITH_SECONDS(){return c$}static get TIME_WITH_SHORT_OFFSET(){return d$}static get TIME_WITH_LONG_OFFSET(){return f$}static get TIME_24_SIMPLE(){return h$}static get TIME_24_WITH_SECONDS(){return m$}static get TIME_24_WITH_SHORT_OFFSET(){return p$}static get TIME_24_WITH_LONG_OFFSET(){return g$}static get DATETIME_SHORT(){return v$}static get DATETIME_SHORT_WITH_SECONDS(){return b$}static get DATETIME_MED(){return y$}static get DATETIME_MED_WITH_SECONDS(){return _$}static get DATETIME_MED_WITH_WEEKDAY(){return SC}static get DATETIME_FULL(){return k$}static get DATETIME_FULL_WITH_SECONDS(){return $$}static get DATETIME_HUGE(){return x$}static get DATETIME_HUGE_WITH_SECONDS(){return w$}}function Yi(t){if(j.isDateTime(t))return t;if(t&&t.valueOf&&ln(t.valueOf()))return j.fromJSDate(t);if(t&&typeof t=="object")return j.fromObject(t);throw new Fe(`Unknown datetime argument: ${t}, of type ${typeof t}`)}/*!
|
|
264
|
+
`;const s=t.querySelector("#chart-canvas"),o=Rl(n.colors),a=n.showLine===!0,l=i.flatMap(b=>b.data),u=l.map(b=>b.x),c=l.map(b=>b.y),d=Math.min(...u),f=Math.max(...u),h=Math.min(...c),g=Math.max(...c),m=(f-d)*.1||1,p=(g-h)*.15||1,B=new Le(s,{type:"scatter",data:{datasets:i.map((b,_)=>{const y=o[_%o.length];return{label:b.label,data:b.data,backgroundColor:y+"AA",borderColor:y,borderWidth:1,pointRadius:5,pointHoverRadius:7,pointHoverBorderWidth:2,pointHoverBorderColor:J("--bg-card"),showLine:a,tension:a?.3:0,fill:!1}})},options:{responsive:!0,maintainAspectRatio:!1,interaction:{mode:"nearest",intersect:!0},onClick:(b,_)=>{if(_.length===0)return;const y=_[0],w=i[y.datasetIndex],U=w.data[y.index];mA(`${w.label}: (${U.x}, ${U.y}) in "${A}"`)},scales:{x:{type:"linear",min:d-m,max:f+m,border:{display:!1},grid:{color:J("--border")},ticks:{color:J("--text-secondary"),font:{size:11}},title:{display:!!n.xLabel,text:n.xLabel??"",color:J("--text-secondary"),font:{size:11,weight:"600"}}},y:{type:"linear",min:h-p,max:g+p,border:{display:!1},grid:{color:J("--border"),drawTicks:!1},ticks:{color:J("--text-secondary"),font:{size:11},padding:8},title:{display:!!n.yLabel,text:n.yLabel??"",color:J("--text-secondary"),font:{size:11,weight:"600"}}}},plugins:{legend:{display:i.length>1,position:"top",align:"end",labels:{color:J("--text-secondary"),boxWidth:10,padding:12,font:{size:11}}},tooltip:{...qA(),callbacks:{label:b=>{const _=b.parsed;return` ${b.dataset.label}: (${_.x}, ${_.y})`}}}}}});en(B),tn(t,B,A),Ls(t,()=>{var b;return(b=window.__mcpRefresh)==null?void 0:b.call(window)})}class Wn extends Error{}class b6 extends Wn{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class _6 extends Wn{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class C6 extends Wn{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class gi extends Wn{}class EQ extends Wn{constructor(e){super(`Invalid unit ${e}`)}}class rt extends Wn{}class LA extends Wn{constructor(){super("Zone is an abstract class")}}const O="numeric",oA="short",$t="long",Ta={year:O,month:O,day:O},$Q={year:O,month:oA,day:O},U6={year:O,month:oA,day:O,weekday:oA},TQ={year:O,month:$t,day:O},OQ={year:O,month:$t,day:O,weekday:$t},HQ={hour:O,minute:O},DQ={hour:O,minute:O,second:O},LQ={hour:O,minute:O,second:O,timeZoneName:oA},MQ={hour:O,minute:O,second:O,timeZoneName:$t},NQ={hour:O,minute:O,hourCycle:"h23"},zQ={hour:O,minute:O,second:O,hourCycle:"h23"},PQ={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:oA},RQ={hour:O,minute:O,second:O,hourCycle:"h23",timeZoneName:$t},KQ={year:O,month:O,day:O,hour:O,minute:O},ZQ={year:O,month:O,day:O,hour:O,minute:O,second:O},VQ={year:O,month:oA,day:O,hour:O,minute:O},jQ={year:O,month:oA,day:O,hour:O,minute:O,second:O},Q6={year:O,month:oA,day:O,weekday:oA,hour:O,minute:O},GQ={year:O,month:$t,day:O,hour:O,minute:O,timeZoneName:oA},WQ={year:O,month:$t,day:O,hour:O,minute:O,second:O,timeZoneName:oA},JQ={year:O,month:$t,day:O,weekday:$t,hour:O,minute:O,timeZoneName:$t},XQ={year:O,month:$t,day:O,weekday:$t,hour:O,minute:O,second:O,timeZoneName:$t};class zs{get type(){throw new LA}get name(){throw new LA}get ianaName(){return this.name}get isUniversal(){throw new LA}offsetName(e,A){throw new LA}formatOffset(e,A){throw new LA}offset(e){throw new LA}equals(e){throw new LA}get isValid(){throw new LA}}let Ru=null;class eu extends zs{static get instance(){return Ru===null&&(Ru=new eu),Ru}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:A,locale:i}){return ax(e,A,i)}formatOffset(e,A){return Or(this.offset(e),A)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Zc=new Map;function x6(t){let e=Zc.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Zc.set(t,e)),e}const F6={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function I6(t,e){const A=t.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(A),[,n,r,s,o,a,l,u]=i;return[s,n,r,o,a,l,u]}function S6(t,e){const A=t.formatToParts(e),i=[];for(let n=0;n<A.length;n++){const{type:r,value:s}=A[n],o=F6[r];r==="era"?i[o]=s:G(o)||(i[o]=parseInt(s,10))}return i}const Ku=new Map;class TA extends zs{static create(e){let A=Ku.get(e);return A===void 0&&Ku.set(e,A=new TA(e)),A}static resetCache(){Ku.clear(),Zc.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=TA.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:A,locale:i}){return ax(e,A,i,this.name)}formatOffset(e,A){return Or(this.offset(e),A)}offset(e){if(!this.valid)return NaN;const A=new Date(e);if(isNaN(A))return NaN;const i=x6(this.name);let[n,r,s,o,a,l,u]=i.formatToParts?S6(i,A):I6(i,A);o==="BC"&&(n=-Math.abs(n)+1);const d=Au({year:n,month:r,day:s,hour:a===24?0:a,minute:l,second:u,millisecond:0});let f=+A;const h=f%1e3;return f-=h>=0?h:1e3+h,(d-f)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let uv={};function k6(t,e={}){const A=JSON.stringify([t,e]);let i=uv[A];return i||(i=new Intl.ListFormat(t,e),uv[A]=i),i}const Vc=new Map;function jc(t,e={}){const A=JSON.stringify([t,e]);let i=Vc.get(A);return i===void 0&&(i=new Intl.DateTimeFormat(t,e),Vc.set(A,i)),i}const Gc=new Map;function E6(t,e={}){const A=JSON.stringify([t,e]);let i=Gc.get(A);return i===void 0&&(i=new Intl.NumberFormat(t,e),Gc.set(A,i)),i}const Wc=new Map;function $6(t,e={}){const{base:A,...i}=e,n=JSON.stringify([t,i]);let r=Wc.get(n);return r===void 0&&(r=new Intl.RelativeTimeFormat(t,e),Wc.set(n,r)),r}let br=null;function T6(){return br||(br=new Intl.DateTimeFormat().resolvedOptions().locale,br)}const Jc=new Map;function YQ(t){let e=Jc.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),Jc.set(t,e)),e}const Xc=new Map;function O6(t){let e=Xc.get(t);if(!e){const A=new Intl.Locale(t);e="getWeekInfo"in A?A.getWeekInfo():A.weekInfo,"minimalDays"in e||(e={...qQ,...e}),Xc.set(t,e)}return e}function H6(t){const e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));const A=t.indexOf("-u-");if(A===-1)return[t];{let i,n;try{i=jc(t).resolvedOptions(),n=t}catch{const a=t.substring(0,A);i=jc(a).resolvedOptions(),n=a}const{numberingSystem:r,calendar:s}=i;return[n,r,s]}}function D6(t,e,A){return(A||e)&&(t.includes("-u-")||(t+="-u"),A&&(t+=`-ca-${A}`),e&&(t+=`-nu-${e}`)),t}function L6(t){const e=[];for(let A=1;A<=12;A++){const i=K.utc(2009,A,1);e.push(t(i))}return e}function M6(t){const e=[];for(let A=1;A<=7;A++){const i=K.utc(2016,11,13+A);e.push(t(i))}return e}function Lo(t,e,A,i){const n=t.listingMode();return n==="error"?null:n==="en"?A(e):i(e)}function N6(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||YQ(t.locale).numberingSystem==="latn"}class z6{constructor(e,A,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;const{padTo:n,floor:r,...s}=i;if(!A||Object.keys(s).length>0){const o={useGrouping:!1,...i};i.padTo>0&&(o.minimumIntegerDigits=i.padTo),this.inf=E6(e,o)}}format(e){if(this.inf){const A=this.floor?Math.floor(e):e;return this.inf.format(A)}else{const A=this.floor?Math.floor(e):Ag(e,3);return Pe(A,this.padTo)}}}class P6{constructor(e,A,i){this.opts=i,this.originalZone=void 0;let n;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const s=-1*(e.offset/60),o=s>=0?`Etc/GMT+${s}`:`Etc/GMT${s}`;e.offset!==0&&TA.create(o).valid?(n=o,this.dt=e):(n="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,n=e.zone.name):(n="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const r={...this.opts};r.timeZone=r.timeZone||n,this.dtf=jc(A,r)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(A=>{if(A.type==="timeZoneName"){const i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...A,value:i}}else return A}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class R6{constructor(e,A,i){this.opts={style:"long",...i},!A&&sx()&&(this.rtf=$6(e,i))}format(e,A){return this.rtf?this.rtf.format(e,A):cZ(A,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,A){return this.rtf?this.rtf.formatToParts(e,A):[]}}const qQ={firstDay:1,minimalDays:4,weekend:[6,7]};class de{static fromOpts(e){return de.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,A,i,n,r=!1){const s=e||De.defaultLocale,o=s||(r?"en-US":T6()),a=A||De.defaultNumberingSystem,l=i||De.defaultOutputCalendar,u=qc(n)||De.defaultWeekSettings;return new de(o,a,l,u,s)}static resetCache(){br=null,Vc.clear(),Gc.clear(),Wc.clear(),Jc.clear(),Xc.clear()}static fromObject({locale:e,numberingSystem:A,outputCalendar:i,weekSettings:n}={}){return de.create(e,A,i,n)}constructor(e,A,i,n,r){const[s,o,a]=H6(e);this.locale=s,this.numberingSystem=A||o||null,this.outputCalendar=i||a||null,this.weekSettings=n,this.intl=D6(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=r,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=N6(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),A=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&A?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:de.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,qc(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,A=!1){return Lo(this,e,cx,()=>{const i=this.intl==="ja"||this.intl.startsWith("ja-");A&=!i;const n=A?{month:e,day:"numeric"}:{month:e},r=A?"format":"standalone";if(!this.monthsCache[r][e]){const s=i?o=>this.dtFormatter(o,n).format():o=>this.extract(o,n,"month");this.monthsCache[r][e]=L6(s)}return this.monthsCache[r][e]})}weekdays(e,A=!1){return Lo(this,e,hx,()=>{const i=A?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=A?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=M6(r=>this.extract(r,i,"weekday"))),this.weekdaysCache[n][e]})}meridiems(){return Lo(this,void 0,()=>gx,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[K.utc(2016,11,13,9),K.utc(2016,11,13,19)].map(A=>this.extract(A,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Lo(this,e,mx,()=>{const A={era:e};return this.eraCache[e]||(this.eraCache[e]=[K.utc(-40,1,1),K.utc(2017,1,1)].map(i=>this.extract(i,A,"era"))),this.eraCache[e]})}extract(e,A,i){const n=this.dtFormatter(e,A),r=n.formatToParts(),s=r.find(o=>o.type.toLowerCase()===i);return s?s.value:null}numberFormatter(e={}){return new z6(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,A={}){return new P6(e,this.intl,A)}relFormatter(e={}){return new R6(this.intl,this.isEnglish(),e)}listFormatter(e={}){return k6(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||YQ(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:ox()?O6(this.locale):qQ}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Zu=null;class vt extends zs{static get utcInstance(){return Zu===null&&(Zu=new vt(0)),Zu}static instance(e){return e===0?vt.utcInstance:new vt(e)}static parseSpecifier(e){if(e){const A=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(A)return new vt(nu(A[1],A[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${Or(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${Or(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,A){return Or(this.fixed,A)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class K6 extends zs{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function RA(t,e){if(G(t)||t===null)return e;if(t instanceof zs)return t;if(J6(t)){const A=t.toLowerCase();return A==="default"?e:A==="local"||A==="system"?eu.instance:A==="utc"||A==="gmt"?vt.utcInstance:vt.parseSpecifier(A)||TA.create(t)}else return rn(t)?vt.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new K6(t)}const Yh={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},cv={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Z6=Yh.hanidec.replace(/[\[|\]]/g,"").split("");function V6(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let A=0;A<t.length;A++){const i=t.charCodeAt(A);if(t[A].search(Yh.hanidec)!==-1)e+=Z6.indexOf(t[A]);else for(const n in cv){const[r,s]=cv[n];i>=r&&i<=s&&(e+=i-r)}}return parseInt(e,10)}else return e}const Yc=new Map;function j6(){Yc.clear()}function eA({numberingSystem:t},e=""){const A=t||"latn";let i=Yc.get(A);i===void 0&&(i=new Map,Yc.set(A,i));let n=i.get(e);return n===void 0&&(n=new RegExp(`${Yh[A]}${e}`),i.set(e,n)),n}let dv=()=>Date.now(),fv="system",hv=null,gv=null,mv=null,pv=60,vv,Bv=null;class De{static get now(){return dv}static set now(e){dv=e}static set defaultZone(e){fv=e}static get defaultZone(){return RA(fv,eu.instance)}static get defaultLocale(){return hv}static set defaultLocale(e){hv=e}static get defaultNumberingSystem(){return gv}static set defaultNumberingSystem(e){gv=e}static get defaultOutputCalendar(){return mv}static set defaultOutputCalendar(e){mv=e}static get defaultWeekSettings(){return Bv}static set defaultWeekSettings(e){Bv=qc(e)}static get twoDigitCutoffYear(){return pv}static set twoDigitCutoffYear(e){pv=e%100}static get throwOnInvalid(){return vv}static set throwOnInvalid(e){vv=e}static resetCaches(){de.resetCache(),TA.resetCache(),K.resetCache(),j6()}}class iA{constructor(e,A){this.reason=e,this.explanation=A}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const ex=[0,31,59,90,120,151,181,212,243,273,304,334],tx=[0,31,60,91,121,152,182,213,244,274,305,335];function Vt(t,e){return new iA("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function qh(t,e,A){const i=new Date(Date.UTC(t,e-1,A));t<100&&t>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);const n=i.getUTCDay();return n===0?7:n}function Ax(t,e,A){return A+(Ps(t)?tx:ex)[e-1]}function nx(t,e){const A=Ps(t)?tx:ex,i=A.findIndex(r=>r<e),n=e-A[i];return{month:i+1,day:n}}function eg(t,e){return(t-e+7)%7+1}function Oa(t,e=4,A=1){const{year:i,month:n,day:r}=t,s=Ax(i,n,r),o=eg(qh(i,n,r),A);let a=Math.floor((s-o+14-e)/7),l;return a<1?(l=i-1,a=ts(l,e,A)):a>ts(i,e,A)?(l=i+1,a=1):l=i,{weekYear:l,weekNumber:a,weekday:o,...iu(t)}}function wv(t,e=4,A=1){const{weekYear:i,weekNumber:n,weekday:r}=t,s=eg(qh(i,1,e),A),o=bi(i);let a=n*7+r-s-7+e,l;a<1?(l=i-1,a+=bi(l)):a>o?(l=i+1,a-=bi(i)):l=i;const{month:u,day:c}=nx(l,a);return{year:l,month:u,day:c,...iu(t)}}function Vu(t){const{year:e,month:A,day:i}=t,n=Ax(e,A,i);return{year:e,ordinal:n,...iu(t)}}function yv(t){const{year:e,ordinal:A}=t,{month:i,day:n}=nx(e,A);return{year:e,month:i,day:n,...iu(t)}}function bv(t,e){if(!G(t.localWeekday)||!G(t.localWeekNumber)||!G(t.localWeekYear)){if(!G(t.weekday)||!G(t.weekNumber)||!G(t.weekYear))throw new gi("Cannot mix locale-based week fields with ISO-based week fields");return G(t.localWeekday)||(t.weekday=t.localWeekday),G(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),G(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function G6(t,e=4,A=1){const i=tu(t.weekYear),n=jt(t.weekNumber,1,ts(t.weekYear,e,A)),r=jt(t.weekday,1,7);return i?n?r?!1:Vt("weekday",t.weekday):Vt("week",t.weekNumber):Vt("weekYear",t.weekYear)}function W6(t){const e=tu(t.year),A=jt(t.ordinal,1,bi(t.year));return e?A?!1:Vt("ordinal",t.ordinal):Vt("year",t.year)}function ix(t){const e=tu(t.year),A=jt(t.month,1,12),i=jt(t.day,1,Ha(t.year,t.month));return e?A?i?!1:Vt("day",t.day):Vt("month",t.month):Vt("year",t.year)}function rx(t){const{hour:e,minute:A,second:i,millisecond:n}=t,r=jt(e,0,23)||e===24&&A===0&&i===0&&n===0,s=jt(A,0,59),o=jt(i,0,59),a=jt(n,0,999);return r?s?o?a?!1:Vt("millisecond",n):Vt("second",i):Vt("minute",A):Vt("hour",e)}function G(t){return typeof t>"u"}function rn(t){return typeof t=="number"}function tu(t){return typeof t=="number"&&t%1===0}function J6(t){return typeof t=="string"}function X6(t){return Object.prototype.toString.call(t)==="[object Date]"}function sx(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function ox(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Y6(t){return Array.isArray(t)?t:[t]}function _v(t,e,A){if(t.length!==0)return t.reduce((i,n)=>{const r=[e(n),n];return i&&A(i[0],r[0])===i[0]?i:r},null)[1]}function q6(t,e){return e.reduce((A,i)=>(A[i]=t[i],A),{})}function Li(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function qc(t){if(t==null)return null;if(typeof t!="object")throw new rt("Week settings must be an object");if(!jt(t.firstDay,1,7)||!jt(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!jt(e,1,7)))throw new rt("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function jt(t,e,A){return tu(t)&&t>=e&&t<=A}function eZ(t,e){return t-e*Math.floor(t/e)}function Pe(t,e=2){const A=t<0;let i;return A?i="-"+(""+-t).padStart(e,"0"):i=(""+t).padStart(e,"0"),i}function PA(t){if(!(G(t)||t===null||t===""))return parseInt(t,10)}function yn(t){if(!(G(t)||t===null||t===""))return parseFloat(t)}function tg(t){if(!(G(t)||t===null||t==="")){const e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Ag(t,e,A="round"){const i=10**e;switch(A){case"expand":return t>0?Math.ceil(t*i)/i:Math.floor(t*i)/i;case"trunc":return Math.trunc(t*i)/i;case"round":return Math.round(t*i)/i;case"floor":return Math.floor(t*i)/i;case"ceil":return Math.ceil(t*i)/i;default:throw new RangeError(`Value rounding ${A} is out of range`)}}function Ps(t){return t%4===0&&(t%100!==0||t%400===0)}function bi(t){return Ps(t)?366:365}function Ha(t,e){const A=eZ(e-1,12)+1,i=t+(e-A)/12;return A===2?Ps(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][A-1]}function Au(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function Cv(t,e,A){return-eg(qh(t,1,e),A)+e-1}function ts(t,e=4,A=1){const i=Cv(t,e,A),n=Cv(t+1,e,A);return(bi(t)-i+n)/7}function ed(t){return t>99?t:t>De.twoDigitCutoffYear?1900+t:2e3+t}function ax(t,e,A,i=null){const n=new Date(t),r={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(r.timeZone=i);const s={timeZoneName:e,...r},o=new Intl.DateTimeFormat(A,s).formatToParts(n).find(a=>a.type.toLowerCase()==="timezonename");return o?o.value:null}function nu(t,e){let A=parseInt(t,10);Number.isNaN(A)&&(A=0);const i=parseInt(e,10)||0,n=A<0||Object.is(A,-0)?-i:i;return A*60+n}function lx(t){const e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new rt(`Invalid unit value ${t}`);return e}function Da(t,e){const A={};for(const i in t)if(Li(t,i)){const n=t[i];if(n==null)continue;A[e(i)]=lx(n)}return A}function Or(t,e){const A=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),n=t>=0?"+":"-";switch(e){case"short":return`${n}${Pe(A,2)}:${Pe(i,2)}`;case"narrow":return`${n}${A}${i>0?`:${i}`:""}`;case"techie":return`${n}${Pe(A,2)}${Pe(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function iu(t){return q6(t,["hour","minute","second","millisecond"])}const tZ=["January","February","March","April","May","June","July","August","September","October","November","December"],ux=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],AZ=["J","F","M","A","M","J","J","A","S","O","N","D"];function cx(t){switch(t){case"narrow":return[...AZ];case"short":return[...ux];case"long":return[...tZ];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const dx=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],fx=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],nZ=["M","T","W","T","F","S","S"];function hx(t){switch(t){case"narrow":return[...nZ];case"short":return[...fx];case"long":return[...dx];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const gx=["AM","PM"],iZ=["Before Christ","Anno Domini"],rZ=["BC","AD"],sZ=["B","A"];function mx(t){switch(t){case"narrow":return[...sZ];case"short":return[...rZ];case"long":return[...iZ];default:return null}}function oZ(t){return gx[t.hour<12?0:1]}function aZ(t,e){return hx(e)[t.weekday-1]}function lZ(t,e){return cx(e)[t.month-1]}function uZ(t,e){return mx(e)[t.year<0?0:1]}function cZ(t,e,A="always",i=!1){const n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},r=["hours","minutes","seconds"].indexOf(t)===-1;if(A==="auto"&&r){const c=t==="days";switch(e){case 1:return c?"tomorrow":`next ${n[t][0]}`;case-1:return c?"yesterday":`last ${n[t][0]}`;case 0:return c?"today":`this ${n[t][0]}`}}const s=Object.is(e,-0)||e<0,o=Math.abs(e),a=o===1,l=n[t],u=i?a?l[1]:l[2]||l[1]:a?n[t][0]:t;return s?`${o} ${u} ago`:`in ${o} ${u}`}function Uv(t,e){let A="";for(const i of t)i.literal?A+=i.val:A+=e(i.val);return A}const dZ={D:Ta,DD:$Q,DDD:TQ,DDDD:OQ,t:HQ,tt:DQ,ttt:LQ,tttt:MQ,T:NQ,TT:zQ,TTT:PQ,TTTT:RQ,f:KQ,ff:VQ,fff:GQ,ffff:JQ,F:ZQ,FF:jQ,FFF:WQ,FFFF:XQ};class ot{static create(e,A={}){return new ot(e,A)}static parseFormat(e){let A=null,i="",n=!1;const r=[];for(let s=0;s<e.length;s++){const o=e.charAt(s);o==="'"?((i.length>0||n)&&r.push({literal:n||/^\s+$/.test(i),val:i===""?"'":i}),A=null,i="",n=!n):n||o===A?i+=o:(i.length>0&&r.push({literal:/^\s+$/.test(i),val:i}),i=o,A=o)}return i.length>0&&r.push({literal:n||/^\s+$/.test(i),val:i}),r}static macroTokenToFormatOpts(e){return dZ[e]}constructor(e,A){this.opts=A,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,A){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...A}).format()}dtFormatter(e,A={}){return this.loc.dtFormatter(e,{...this.opts,...A})}formatDateTime(e,A){return this.dtFormatter(e,A).format()}formatDateTimeParts(e,A){return this.dtFormatter(e,A).formatToParts()}formatInterval(e,A){return this.dtFormatter(e.start,A).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,A){return this.dtFormatter(e,A).resolvedOptions()}num(e,A=0,i=void 0){if(this.opts.forceSimple)return Pe(e,A);const n={...this.opts};return A>0&&(n.padTo=A),i&&(n.signDisplay=i),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,A){const i=this.loc.listingMode()==="en",n=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",r=(f,h)=>this.loc.extract(e,f,h),s=f=>e.isOffsetFixed&&e.offset===0&&f.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,f.format):"",o=()=>i?oZ(e):r({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(f,h)=>i?lZ(e,f):r(h?{month:f}:{month:f,day:"numeric"},"month"),l=(f,h)=>i?aZ(e,f):r(h?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),u=f=>{const h=ot.macroTokenToFormatOpts(f);return h?this.formatWithSystemDefault(e,h):f},c=f=>i?uZ(e,f):r({era:f},"era"),d=f=>{switch(f){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return s({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return n?r({day:"numeric"},"day"):this.num(e.day);case"dd":return n?r({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return n?r({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?r({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return n?r({month:"numeric"},"month"):this.num(e.month);case"MM":return n?r({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return n?r({year:"numeric"},"year"):this.num(e.year);case"yy":return n?r({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?r({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?r({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(f)}};return Uv(ot.parseFormat(A),d)}formatDurationFromString(e,A){const i=this.opts.signMode==="negativeLargestOnly"?-1:1,n=u=>{switch(u[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},r=(u,c)=>d=>{const f=n(d);if(f){const h=c.isNegativeDuration&&f!==c.largestUnit?i:1;let g;return this.opts.signMode==="negativeLargestOnly"&&f!==c.largestUnit?g="never":this.opts.signMode==="all"?g="always":g="auto",this.num(u.get(f)*h,d.length,g)}else return d},s=ot.parseFormat(A),o=s.reduce((u,{literal:c,val:d})=>c?u:u.concat(d),[]),a=e.shiftTo(...o.map(n).filter(u=>u)),l={isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]};return Uv(s,r(a,l))}}const px=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function ji(...t){const e=t.reduce((A,i)=>A+i.source,"");return RegExp(`^${e}$`)}function Gi(...t){return e=>t.reduce(([A,i,n],r)=>{const[s,o,a]=r(e,n);return[{...A,...s},o||i,a]},[{},null,1]).slice(0,2)}function Wi(t,...e){if(t==null)return[null,null];for(const[A,i]of e){const n=A.exec(t);if(n)return i(n)}return[null,null]}function vx(...t){return(e,A)=>{const i={};let n;for(n=0;n<t.length;n++)i[t[n]]=PA(e[A+n]);return[i,null,A+n]}}const Bx=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,fZ=`(?:${Bx.source}?(?:\\[(${px.source})\\])?)?`,ng=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,wx=RegExp(`${ng.source}${fZ}`),ig=RegExp(`(?:[Tt]${wx.source})?`),hZ=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,gZ=/(\d{4})-?W(\d\d)(?:-?(\d))?/,mZ=/(\d{4})-?(\d{3})/,pZ=vx("weekYear","weekNumber","weekDay"),vZ=vx("year","ordinal"),BZ=/(\d{4})-(\d\d)-(\d\d)/,yx=RegExp(`${ng.source} ?(?:${Bx.source}|(${px.source}))?`),wZ=RegExp(`(?: ${yx.source})?`);function _i(t,e,A){const i=t[e];return G(i)?A:PA(i)}function yZ(t,e){return[{year:_i(t,e),month:_i(t,e+1,1),day:_i(t,e+2,1)},null,e+3]}function Ji(t,e){return[{hours:_i(t,e,0),minutes:_i(t,e+1,0),seconds:_i(t,e+2,0),milliseconds:tg(t[e+3])},null,e+4]}function Rs(t,e){const A=!t[e]&&!t[e+1],i=nu(t[e+1],t[e+2]),n=A?null:vt.instance(i);return[{},n,e+3]}function Ks(t,e){const A=t[e]?TA.create(t[e]):null;return[{},A,e+1]}const bZ=RegExp(`^T?${ng.source}$`),_Z=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function CZ(t){const[e,A,i,n,r,s,o,a,l]=t,u=e[0]==="-",c=a&&a[0]==="-",d=(f,h=!1)=>f!==void 0&&(h||f&&u)?-f:f;return[{years:d(yn(A)),months:d(yn(i)),weeks:d(yn(n)),days:d(yn(r)),hours:d(yn(s)),minutes:d(yn(o)),seconds:d(yn(a),a==="-0"),milliseconds:d(tg(l),c)}]}const UZ={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function rg(t,e,A,i,n,r,s){const o={year:e.length===2?ed(PA(e)):PA(e),month:ux.indexOf(A)+1,day:PA(i),hour:PA(n),minute:PA(r)};return s&&(o.second=PA(s)),t&&(o.weekday=t.length>3?dx.indexOf(t)+1:fx.indexOf(t)+1),o}const QZ=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function xZ(t){const[,e,A,i,n,r,s,o,a,l,u,c]=t,d=rg(e,n,i,A,r,s,o);let f;return a?f=UZ[a]:l?f=0:f=nu(u,c),[d,new vt(f)]}function FZ(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const IZ=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,SZ=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,kZ=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Qv(t){const[,e,A,i,n,r,s,o]=t;return[rg(e,n,i,A,r,s,o),vt.utcInstance]}function EZ(t){const[,e,A,i,n,r,s,o]=t;return[rg(e,o,A,i,n,r,s),vt.utcInstance]}const $Z=ji(hZ,ig),TZ=ji(gZ,ig),OZ=ji(mZ,ig),HZ=ji(wx),bx=Gi(yZ,Ji,Rs,Ks),DZ=Gi(pZ,Ji,Rs,Ks),LZ=Gi(vZ,Ji,Rs,Ks),MZ=Gi(Ji,Rs,Ks);function NZ(t){return Wi(t,[$Z,bx],[TZ,DZ],[OZ,LZ],[HZ,MZ])}function zZ(t){return Wi(FZ(t),[QZ,xZ])}function PZ(t){return Wi(t,[IZ,Qv],[SZ,Qv],[kZ,EZ])}function RZ(t){return Wi(t,[_Z,CZ])}const KZ=Gi(Ji);function ZZ(t){return Wi(t,[bZ,KZ])}const VZ=ji(BZ,wZ),jZ=ji(yx),GZ=Gi(Ji,Rs,Ks);function WZ(t){return Wi(t,[VZ,bx],[jZ,GZ])}const xv="Invalid Duration",_x={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},JZ={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},..._x},Nt=146097/400,ri=146097/4800,XZ={years:{quarters:4,months:12,weeks:Nt/7,days:Nt,hours:Nt*24,minutes:Nt*24*60,seconds:Nt*24*60*60,milliseconds:Nt*24*60*60*1e3},quarters:{months:3,weeks:Nt/28,days:Nt/4,hours:Nt*24/4,minutes:Nt*24*60/4,seconds:Nt*24*60*60/4,milliseconds:Nt*24*60*60*1e3/4},months:{weeks:ri/7,days:ri,hours:ri*24,minutes:ri*24*60,seconds:ri*24*60*60,milliseconds:ri*24*60*60*1e3},..._x},kn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],YZ=kn.slice(0).reverse();function _A(t,e,A=!1){const i={values:A?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new ae(i)}function Cx(t,e){let A=e.milliseconds??0;for(const i of YZ.slice(1))e[i]&&(A+=e[i]*t[i].milliseconds);return A}function Fv(t,e){const A=Cx(t,e)<0?-1:1;kn.reduceRight((i,n)=>{if(G(e[n]))return i;if(i){const r=e[i]*A,s=t[n][i],o=Math.floor(r/s);e[n]+=o*A,e[i]-=o*s*A}return n},null),kn.reduce((i,n)=>{if(G(e[n]))return i;if(i){const r=e[i]%1;e[i]-=r,e[n]+=r*t[i][n]}return n},null)}function Iv(t){const e={};for(const[A,i]of Object.entries(t))i!==0&&(e[A]=i);return e}class ae{constructor(e){const A=e.conversionAccuracy==="longterm"||!1;let i=A?XZ:JZ;e.matrix&&(i=e.matrix),this.values=e.values,this.loc=e.loc||de.create(),this.conversionAccuracy=A?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(e,A){return ae.fromObject({milliseconds:e},A)}static fromObject(e,A={}){if(e==null||typeof e!="object")throw new rt(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new ae({values:Da(e,ae.normalizeUnit),loc:de.fromObject(A),conversionAccuracy:A.conversionAccuracy,matrix:A.matrix})}static fromDurationLike(e){if(rn(e))return ae.fromMillis(e);if(ae.isDuration(e))return e;if(typeof e=="object")return ae.fromObject(e);throw new rt(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,A){const[i]=RZ(e);return i?ae.fromObject(i,A):ae.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,A){const[i]=ZZ(e);return i?ae.fromObject(i,A):ae.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,A=null){if(!e)throw new rt("need to specify a reason the Duration is invalid");const i=e instanceof iA?e:new iA(e,A);if(De.throwOnInvalid)throw new C6(i);return new ae({invalid:i})}static normalizeUnit(e){const A={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!A)throw new EQ(e);return A}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,A={}){const i={...A,floor:A.round!==!1&&A.floor!==!1};return this.isValid?ot.create(this.loc,i).formatDurationFromString(this,e):xv}toHuman(e={}){if(!this.isValid)return xv;const A=e.showZeros!==!1,i=kn.map(n=>{const r=this.values[n];return G(r)||r===0&&!A?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(i)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Ag(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const A=this.toMillis();return A<0||A>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},K.fromMillis(A,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?Cx(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const A=ae.fromDurationLike(e),i={};for(const n of kn)(Li(A.values,n)||Li(this.values,n))&&(i[n]=A.get(n)+this.get(n));return _A(this,{values:i},!0)}minus(e){if(!this.isValid)return this;const A=ae.fromDurationLike(e);return this.plus(A.negate())}mapUnits(e){if(!this.isValid)return this;const A={};for(const i of Object.keys(this.values))A[i]=lx(e(this.values[i],i));return _A(this,{values:A},!0)}get(e){return this[ae.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const A={...this.values,...Da(e,ae.normalizeUnit)};return _A(this,{values:A})}reconfigure({locale:e,numberingSystem:A,conversionAccuracy:i,matrix:n}={}){const s={loc:this.loc.clone({locale:e,numberingSystem:A}),matrix:n,conversionAccuracy:i};return _A(this,s)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Fv(this.matrix,e),_A(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=Iv(this.normalize().shiftToAll().toObject());return _A(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(s=>ae.normalizeUnit(s));const A={},i={},n=this.toObject();let r;for(const s of kn)if(e.indexOf(s)>=0){r=s;let o=0;for(const l in i)o+=this.matrix[l][s]*i[l],i[l]=0;rn(n[s])&&(o+=n[s]);const a=Math.trunc(o);A[s]=a,i[s]=(o*1e3-a*1e3)/1e3}else rn(n[s])&&(i[s]=n[s]);for(const s in i)i[s]!==0&&(A[r]+=s===r?i[s]:i[s]/this.matrix[r][s]);return Fv(this.matrix,A),_A(this,{values:A},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const A of Object.keys(this.values))e[A]=this.values[A]===0?0:-this.values[A];return _A(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=Iv(this.values);return _A(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function A(i,n){return i===void 0||i===0?n===void 0||n===0:i===n}for(const i of kn)if(!A(this.values[i],e.values[i]))return!1;return!0}}const si="Invalid Interval";function qZ(t,e){return!t||!t.isValid?He.invalid("missing or invalid start"):!e||!e.isValid?He.invalid("missing or invalid end"):e<t?He.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}class He{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,A=null){if(!e)throw new rt("need to specify a reason the Interval is invalid");const i=e instanceof iA?e:new iA(e,A);if(De.throwOnInvalid)throw new _6(i);return new He({invalid:i})}static fromDateTimes(e,A){const i=lr(e),n=lr(A),r=qZ(i,n);return r??new He({start:i,end:n})}static after(e,A){const i=ae.fromDurationLike(A),n=lr(e);return He.fromDateTimes(n,n.plus(i))}static before(e,A){const i=ae.fromDurationLike(A),n=lr(e);return He.fromDateTimes(n.minus(i),n)}static fromISO(e,A){const[i,n]=(e||"").split("/",2);if(i&&n){let r,s;try{r=K.fromISO(i,A),s=r.isValid}catch{s=!1}let o,a;try{o=K.fromISO(n,A),a=o.isValid}catch{a=!1}if(s&&a)return He.fromDateTimes(r,o);if(s){const l=ae.fromISO(n,A);if(l.isValid)return He.after(r,l)}else if(a){const l=ae.fromISO(i,A);if(l.isValid)return He.before(o,l)}}return He.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",A){if(!this.isValid)return NaN;const i=this.start.startOf(e,A);let n;return A!=null&&A.useLocaleWeeks?n=this.end.reconfigure({locale:i.locale}):n=this.end,n=n.startOf(e,A),Math.floor(n.diff(i,e).get(e))+(n.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:A}={}){return this.isValid?He.fromDateTimes(e||this.s,A||this.e):this}splitAt(...e){if(!this.isValid)return[];const A=e.map(lr).filter(s=>this.contains(s)).sort((s,o)=>s.toMillis()-o.toMillis()),i=[];let{s:n}=this,r=0;for(;n<this.e;){const s=A[r]||this.e,o=+s>+this.e?this.e:s;i.push(He.fromDateTimes(n,o)),n=o,r+=1}return i}splitBy(e){const A=ae.fromDurationLike(e);if(!this.isValid||!A.isValid||A.as("milliseconds")===0)return[];let{s:i}=this,n=1,r;const s=[];for(;i<this.e;){const o=this.start.plus(A.mapUnits(a=>a*n));r=+o>+this.e?this.e:o,s.push(He.fromDateTimes(i,r)),i=r,n+=1}return s}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const A=this.s>e.s?this.s:e.s,i=this.e<e.e?this.e:e.e;return A>=i?null:He.fromDateTimes(A,i)}union(e){if(!this.isValid)return this;const A=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return He.fromDateTimes(A,i)}static merge(e){const[A,i]=e.sort((n,r)=>n.s-r.s).reduce(([n,r],s)=>r?r.overlaps(s)||r.abutsStart(s)?[n,r.union(s)]:[n.concat([r]),s]:[n,s],[[],null]);return i&&A.push(i),A}static xor(e){let A=null,i=0;const n=[],r=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),s=Array.prototype.concat(...r),o=s.sort((a,l)=>a.time-l.time);for(const a of o)i+=a.type==="s"?1:-1,i===1?A=a.time:(A&&+A!=+a.time&&n.push(He.fromDateTimes(A,a.time)),A=null);return He.merge(n)}difference(...e){return He.xor([this].concat(e)).map(A=>this.intersection(A)).filter(A=>A&&!A.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:si}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Ta,A={}){return this.isValid?ot.create(this.s.loc.clone(A),e).formatInterval(this):si}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:si}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:si}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:si}toFormat(e,{separator:A=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${A}${this.e.toFormat(e)}`:si}toDuration(e,A){return this.isValid?this.e.diff(this.s,e,A):ae.invalid(this.invalidReason)}mapEndpoints(e){return He.fromDateTimes(e(this.s),e(this.e))}}class Mo{static hasDST(e=De.defaultZone){const A=K.now().setZone(e).set({month:12});return!e.isUniversal&&A.offset!==A.set({month:6}).offset}static isValidIANAZone(e){return TA.isValidZone(e)}static normalizeZone(e){return RA(e,De.defaultZone)}static getStartOfWeek({locale:e=null,locObj:A=null}={}){return(A||de.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:A=null}={}){return(A||de.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:A=null}={}){return(A||de.create(e)).getWeekendDays().slice()}static months(e="long",{locale:A=null,numberingSystem:i=null,locObj:n=null,outputCalendar:r="gregory"}={}){return(n||de.create(A,i,r)).months(e)}static monthsFormat(e="long",{locale:A=null,numberingSystem:i=null,locObj:n=null,outputCalendar:r="gregory"}={}){return(n||de.create(A,i,r)).months(e,!0)}static weekdays(e="long",{locale:A=null,numberingSystem:i=null,locObj:n=null}={}){return(n||de.create(A,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:A=null,numberingSystem:i=null,locObj:n=null}={}){return(n||de.create(A,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return de.create(e).meridiems()}static eras(e="short",{locale:A=null}={}){return de.create(A,null,"gregory").eras(e)}static features(){return{relative:sx(),localeWeek:ox()}}}function Sv(t,e){const A=n=>n.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=A(e)-A(t);return Math.floor(ae.fromMillis(i).as("days"))}function eV(t,e,A){const i=[["years",(a,l)=>l.year-a.year],["quarters",(a,l)=>l.quarter-a.quarter+(l.year-a.year)*4],["months",(a,l)=>l.month-a.month+(l.year-a.year)*12],["weeks",(a,l)=>{const u=Sv(a,l);return(u-u%7)/7}],["days",Sv]],n={},r=t;let s,o;for(const[a,l]of i)A.indexOf(a)>=0&&(s=a,n[a]=l(t,e),o=r.plus(n),o>e?(n[a]--,t=r.plus(n),t>e&&(o=t,n[a]--,t=r.plus(n))):t=o);return[t,n,o,s]}function tV(t,e,A,i){let[n,r,s,o]=eV(t,e,A);const a=e-n,l=A.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);l.length===0&&(s<e&&(s=n.plus({[o]:1})),s!==n&&(r[o]=(r[o]||0)+a/(s-n)));const u=ae.fromObject(r,i);return l.length>0?ae.fromMillis(a,i).shiftTo(...l).plus(u):u}const AV="missing Intl.DateTimeFormat.formatToParts support";function ue(t,e=A=>A){return{regex:t,deser:([A])=>e(V6(A))}}const nV=" ",Ux=`[ ${nV}]`,Qx=new RegExp(Ux,"g");function iV(t){return t.replace(/\./g,"\\.?").replace(Qx,Ux)}function kv(t){return t.replace(/\./g,"").replace(Qx," ").toLowerCase()}function tA(t,e){return t===null?null:{regex:RegExp(t.map(iV).join("|")),deser:([A])=>t.findIndex(i=>kv(A)===kv(i))+e}}function Ev(t,e){return{regex:t,deser:([,A,i])=>nu(A,i),groups:e}}function No(t){return{regex:t,deser:([e])=>e}}function rV(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function sV(t,e){const A=eA(e),i=eA(e,"{2}"),n=eA(e,"{3}"),r=eA(e,"{4}"),s=eA(e,"{6}"),o=eA(e,"{1,2}"),a=eA(e,"{1,3}"),l=eA(e,"{1,6}"),u=eA(e,"{1,9}"),c=eA(e,"{2,4}"),d=eA(e,"{4,6}"),f=m=>({regex:RegExp(rV(m.val)),deser:([p])=>p,literal:!0}),g=(m=>{if(t.literal)return f(m);switch(m.val){case"G":return tA(e.eras("short"),0);case"GG":return tA(e.eras("long"),0);case"y":return ue(l);case"yy":return ue(c,ed);case"yyyy":return ue(r);case"yyyyy":return ue(d);case"yyyyyy":return ue(s);case"M":return ue(o);case"MM":return ue(i);case"MMM":return tA(e.months("short",!0),1);case"MMMM":return tA(e.months("long",!0),1);case"L":return ue(o);case"LL":return ue(i);case"LLL":return tA(e.months("short",!1),1);case"LLLL":return tA(e.months("long",!1),1);case"d":return ue(o);case"dd":return ue(i);case"o":return ue(a);case"ooo":return ue(n);case"HH":return ue(i);case"H":return ue(o);case"hh":return ue(i);case"h":return ue(o);case"mm":return ue(i);case"m":return ue(o);case"q":return ue(o);case"qq":return ue(i);case"s":return ue(o);case"ss":return ue(i);case"S":return ue(a);case"SSS":return ue(n);case"u":return No(u);case"uu":return No(o);case"uuu":return ue(A);case"a":return tA(e.meridiems(),0);case"kkkk":return ue(r);case"kk":return ue(c,ed);case"W":return ue(o);case"WW":return ue(i);case"E":case"c":return ue(A);case"EEE":return tA(e.weekdays("short",!1),1);case"EEEE":return tA(e.weekdays("long",!1),1);case"ccc":return tA(e.weekdays("short",!0),1);case"cccc":return tA(e.weekdays("long",!0),1);case"Z":case"ZZ":return Ev(new RegExp(`([+-]${o.source})(?::(${i.source}))?`),2);case"ZZZ":return Ev(new RegExp(`([+-]${o.source})(${i.source})?`),2);case"z":return No(/[a-z_+-/]{1,256}?/i);case" ":return No(/[^\S\n\r]/);default:return f(m)}})(t)||{invalidReason:AV};return g.token=t,g}const oV={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function aV(t,e,A){const{type:i,value:n}=t;if(i==="literal"){const a=/^\s+$/.test(n);return{literal:!a,val:a?" ":n}}const r=e[i];let s=i;i==="hour"&&(e.hour12!=null?s=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?s="hour12":s="hour24":s=A.hour12?"hour12":"hour24");let o=oV[s];if(typeof o=="object"&&(o=o[r]),o)return{literal:!1,val:o}}function lV(t){return[`^${t.map(A=>A.regex).reduce((A,i)=>`${A}(${i.source})`,"")}$`,t]}function uV(t,e,A){const i=t.match(e);if(i){const n={};let r=1;for(const s in A)if(Li(A,s)){const o=A[s],a=o.groups?o.groups+1:1;!o.literal&&o.token&&(n[o.token.val[0]]=o.deser(i.slice(r,r+a))),r+=a}return[i,n]}else return[i,{}]}function cV(t){const e=r=>{switch(r){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let A=null,i;return G(t.z)||(A=TA.create(t.z)),G(t.Z)||(A||(A=new vt(t.Z)),i=t.Z),G(t.q)||(t.M=(t.q-1)*3+1),G(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),G(t.u)||(t.S=tg(t.u)),[Object.keys(t).reduce((r,s)=>{const o=e(s);return o&&(r[o]=t[s]),r},{}),A,i]}let ju=null;function dV(){return ju||(ju=K.fromMillis(1555555555555)),ju}function fV(t,e){if(t.literal)return t;const A=ot.macroTokenToFormatOpts(t.val),i=Sx(A,e);return i==null||i.includes(void 0)?t:i}function xx(t,e){return Array.prototype.concat(...t.map(A=>fV(A,e)))}class Fx{constructor(e,A){if(this.locale=e,this.format=A,this.tokens=xx(ot.parseFormat(A),e),this.units=this.tokens.map(i=>sV(i,e)),this.disqualifyingUnit=this.units.find(i=>i.invalidReason),!this.disqualifyingUnit){const[i,n]=lV(this.units);this.regex=RegExp(i,"i"),this.handlers=n}}explainFromTokens(e){if(this.isValid){const[A,i]=uV(e,this.regex,this.handlers),[n,r,s]=i?cV(i):[null,null,void 0];if(Li(i,"a")&&Li(i,"H"))throw new gi("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:A,matches:i,result:n,zone:r,specificOffset:s}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Ix(t,e,A){return new Fx(t,A).explainFromTokens(e)}function hV(t,e,A){const{result:i,zone:n,specificOffset:r,invalidReason:s}=Ix(t,e,A);return[i,n,r,s]}function Sx(t,e){if(!t)return null;const i=ot.create(e,t).dtFormatter(dV()),n=i.formatToParts(),r=i.resolvedOptions();return n.map(s=>aV(s,t,r))}const Gu="Invalid DateTime",$v=864e13;function _r(t){return new iA("unsupported zone",`the zone "${t.name}" is not supported`)}function Wu(t){return t.weekData===null&&(t.weekData=Oa(t.c)),t.weekData}function Ju(t){return t.localWeekData===null&&(t.localWeekData=Oa(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function bn(t,e){const A={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new K({...A,...e,old:A})}function kx(t,e,A){let i=t-e*60*1e3;const n=A.offset(i);if(e===n)return[i,e];i-=(n-e)*60*1e3;const r=A.offset(i);return n===r?[i,n]:[t-Math.min(n,r)*60*1e3,Math.max(n,r)]}function zo(t,e){t+=e*60*1e3;const A=new Date(t);return{year:A.getUTCFullYear(),month:A.getUTCMonth()+1,day:A.getUTCDate(),hour:A.getUTCHours(),minute:A.getUTCMinutes(),second:A.getUTCSeconds(),millisecond:A.getUTCMilliseconds()}}function Jo(t,e,A){return kx(Au(t),e,A)}function Tv(t,e){const A=t.o,i=t.c.year+Math.trunc(e.years),n=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,r={...t.c,year:i,month:n,day:Math.min(t.c.day,Ha(i,n))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},s=ae.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=Au(r);let[a,l]=kx(o,A,t.zone);return s!==0&&(a+=s,l=t.zone.offset(a)),{ts:a,o:l}}function oi(t,e,A,i,n,r){const{setZone:s,zone:o}=A;if(t&&Object.keys(t).length!==0||e){const a=e||o,l=K.fromObject(t,{...A,zone:a,specificOffset:r});return s?l:l.setZone(o)}else return K.invalid(new iA("unparsable",`the input "${n}" can't be parsed as ${i}`))}function Po(t,e,A=!0){return t.isValid?ot.create(de.create("en-US"),{allowZ:A,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Xu(t,e,A){const i=t.c.year>9999||t.c.year<0;let n="";if(i&&t.c.year>=0&&(n+="+"),n+=Pe(t.c.year,i?6:4),A==="year")return n;if(e){if(n+="-",n+=Pe(t.c.month),A==="month")return n;n+="-"}else if(n+=Pe(t.c.month),A==="month")return n;return n+=Pe(t.c.day),n}function Ov(t,e,A,i,n,r,s){let o=!A||t.c.millisecond!==0||t.c.second!==0,a="";switch(s){case"day":case"month":case"year":break;default:if(a+=Pe(t.c.hour),s==="hour")break;if(e){if(a+=":",a+=Pe(t.c.minute),s==="minute")break;o&&(a+=":",a+=Pe(t.c.second))}else{if(a+=Pe(t.c.minute),s==="minute")break;o&&(a+=Pe(t.c.second))}if(s==="second")break;o&&(!i||t.c.millisecond!==0)&&(a+=".",a+=Pe(t.c.millisecond,3))}return n&&(t.isOffsetFixed&&t.offset===0&&!r?a+="Z":t.o<0?(a+="-",a+=Pe(Math.trunc(-t.o/60)),a+=":",a+=Pe(Math.trunc(-t.o%60))):(a+="+",a+=Pe(Math.trunc(t.o/60)),a+=":",a+=Pe(Math.trunc(t.o%60)))),r&&(a+="["+t.zone.ianaName+"]"),a}const Ex={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},gV={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},mV={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Xo=["year","month","day","hour","minute","second","millisecond"],pV=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],vV=["year","ordinal","hour","minute","second","millisecond"];function Yo(t){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new EQ(t);return e}function Hv(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Yo(t)}}function BV(t){if(Cr===void 0&&(Cr=De.now()),t.type!=="iana")return t.offset(Cr);const e=t.name;let A=td.get(e);return A===void 0&&(A=t.offset(Cr),td.set(e,A)),A}function Dv(t,e){const A=RA(e.zone,De.defaultZone);if(!A.isValid)return K.invalid(_r(A));const i=de.fromObject(e);let n,r;if(G(t.year))n=De.now();else{for(const a of Xo)G(t[a])&&(t[a]=Ex[a]);const s=ix(t)||rx(t);if(s)return K.invalid(s);const o=BV(A);[n,r]=Jo(t,o,A)}return new K({ts:n,zone:A,loc:i,o:r})}function Lv(t,e,A){const i=G(A.round)?!0:A.round,n=G(A.rounding)?"trunc":A.rounding,r=(o,a)=>(o=Ag(o,i||A.calendary?0:2,A.calendary?"round":n),e.loc.clone(A).relFormatter(A).format(o,a)),s=o=>A.calendary?e.hasSame(t,o)?0:e.startOf(o).diff(t.startOf(o),o).get(o):e.diff(t,o).get(o);if(A.unit)return r(s(A.unit),A.unit);for(const o of A.units){const a=s(o);if(Math.abs(a)>=1)return r(a,o)}return r(t>e?-0:0,A.units[A.units.length-1])}function Mv(t){let e={},A;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],A=Array.from(t).slice(0,t.length-1)):A=Array.from(t),[e,A]}let Cr;const td=new Map;class K{constructor(e){const A=e.zone||De.defaultZone;let i=e.invalid||(Number.isNaN(e.ts)?new iA("invalid input"):null)||(A.isValid?null:_r(A));this.ts=G(e.ts)?De.now():e.ts;let n=null,r=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(A))[n,r]=[e.old.c,e.old.o];else{const o=rn(e.o)&&!e.old?e.o:A.offset(this.ts);n=zo(this.ts,o),i=Number.isNaN(n.year)?new iA("invalid input"):null,n=i?null:n,r=i?null:o}this._zone=A,this.loc=e.loc||de.create(),this.invalid=i,this.weekData=null,this.localWeekData=null,this.c=n,this.o=r,this.isLuxonDateTime=!0}static now(){return new K({})}static local(){const[e,A]=Mv(arguments),[i,n,r,s,o,a,l]=A;return Dv({year:i,month:n,day:r,hour:s,minute:o,second:a,millisecond:l},e)}static utc(){const[e,A]=Mv(arguments),[i,n,r,s,o,a,l]=A;return e.zone=vt.utcInstance,Dv({year:i,month:n,day:r,hour:s,minute:o,second:a,millisecond:l},e)}static fromJSDate(e,A={}){const i=X6(e)?e.valueOf():NaN;if(Number.isNaN(i))return K.invalid("invalid input");const n=RA(A.zone,De.defaultZone);return n.isValid?new K({ts:i,zone:n,loc:de.fromObject(A)}):K.invalid(_r(n))}static fromMillis(e,A={}){if(rn(e))return e<-$v||e>$v?K.invalid("Timestamp out of range"):new K({ts:e,zone:RA(A.zone,De.defaultZone),loc:de.fromObject(A)});throw new rt(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,A={}){if(rn(e))return new K({ts:e*1e3,zone:RA(A.zone,De.defaultZone),loc:de.fromObject(A)});throw new rt("fromSeconds requires a numerical input")}static fromObject(e,A={}){e=e||{};const i=RA(A.zone,De.defaultZone);if(!i.isValid)return K.invalid(_r(i));const n=de.fromObject(A),r=Da(e,Hv),{minDaysInFirstWeek:s,startOfWeek:o}=bv(r,n),a=De.now(),l=G(A.specificOffset)?i.offset(a):A.specificOffset,u=!G(r.ordinal),c=!G(r.year),d=!G(r.month)||!G(r.day),f=c||d,h=r.weekYear||r.weekNumber;if((f||u)&&h)throw new gi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&u)throw new gi("Can't mix ordinal dates with month/day");const g=h||r.weekday&&!f;let m,p,B=zo(a,l);g?(m=pV,p=gV,B=Oa(B,s,o)):u?(m=vV,p=mV,B=Vu(B)):(m=Xo,p=Ex);let b=!1;for(const $ of m){const M=r[$];G(M)?b?r[$]=p[$]:r[$]=B[$]:b=!0}const _=g?G6(r,s,o):u?W6(r):ix(r),y=_||rx(r);if(y)return K.invalid(y);const w=g?wv(r,s,o):u?yv(r):r,[U,F]=Jo(w,l,i),x=new K({ts:U,zone:i,o:F,loc:n});return r.weekday&&f&&e.weekday!==x.weekday?K.invalid("mismatched weekday",`you can't specify both a weekday of ${r.weekday} and a date of ${x.toISO()}`):x.isValid?x:K.invalid(x.invalid)}static fromISO(e,A={}){const[i,n]=NZ(e);return oi(i,n,A,"ISO 8601",e)}static fromRFC2822(e,A={}){const[i,n]=zZ(e);return oi(i,n,A,"RFC 2822",e)}static fromHTTP(e,A={}){const[i,n]=PZ(e);return oi(i,n,A,"HTTP",A)}static fromFormat(e,A,i={}){if(G(e)||G(A))throw new rt("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:r=null}=i,s=de.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0}),[o,a,l,u]=hV(s,e,A);return u?K.invalid(u):oi(o,a,i,`format ${A}`,e,l)}static fromString(e,A,i={}){return K.fromFormat(e,A,i)}static fromSQL(e,A={}){const[i,n]=WZ(e);return oi(i,n,A,"SQL",e)}static invalid(e,A=null){if(!e)throw new rt("need to specify a reason the DateTime is invalid");const i=e instanceof iA?e:new iA(e,A);if(De.throwOnInvalid)throw new b6(i);return new K({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,A={}){const i=Sx(e,de.fromObject(A));return i?i.map(n=>n?n.val:null).join(""):null}static expandFormat(e,A={}){return xx(ot.parseFormat(e),de.fromObject(A)).map(n=>n.val).join("")}static resetCache(){Cr=void 0,td.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Wu(this).weekYear:NaN}get weekNumber(){return this.isValid?Wu(this).weekNumber:NaN}get weekday(){return this.isValid?Wu(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Ju(this).weekday:NaN}get localWeekNumber(){return this.isValid?Ju(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Ju(this).weekYear:NaN}get ordinal(){return this.isValid?Vu(this.c).ordinal:NaN}get monthShort(){return this.isValid?Mo.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Mo.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Mo.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Mo.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,A=6e4,i=Au(this.c),n=this.zone.offset(i-e),r=this.zone.offset(i+e),s=this.zone.offset(i-n*A),o=this.zone.offset(i-r*A);if(s===o)return[this];const a=i-s*A,l=i-o*A,u=zo(a,s),c=zo(l,o);return u.hour===c.hour&&u.minute===c.minute&&u.second===c.second&&u.millisecond===c.millisecond?[bn(this,{ts:a}),bn(this,{ts:l})]:[this]}get isInLeapYear(){return Ps(this.year)}get daysInMonth(){return Ha(this.year,this.month)}get daysInYear(){return this.isValid?bi(this.year):NaN}get weeksInWeekYear(){return this.isValid?ts(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ts(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:A,numberingSystem:i,calendar:n}=ot.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:A,numberingSystem:i,outputCalendar:n}}toUTC(e=0,A={}){return this.setZone(vt.instance(e),A)}toLocal(){return this.setZone(De.defaultZone)}setZone(e,{keepLocalTime:A=!1,keepCalendarTime:i=!1}={}){if(e=RA(e,De.defaultZone),e.equals(this.zone))return this;if(e.isValid){let n=this.ts;if(A||i){const r=e.offset(this.ts),s=this.toObject();[n]=Jo(s,r,e)}return bn(this,{ts:n,zone:e})}else return K.invalid(_r(e))}reconfigure({locale:e,numberingSystem:A,outputCalendar:i}={}){const n=this.loc.clone({locale:e,numberingSystem:A,outputCalendar:i});return bn(this,{loc:n})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const A=Da(e,Hv),{minDaysInFirstWeek:i,startOfWeek:n}=bv(A,this.loc),r=!G(A.weekYear)||!G(A.weekNumber)||!G(A.weekday),s=!G(A.ordinal),o=!G(A.year),a=!G(A.month)||!G(A.day),l=o||a,u=A.weekYear||A.weekNumber;if((l||s)&&u)throw new gi("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&s)throw new gi("Can't mix ordinal dates with month/day");let c;r?c=wv({...Oa(this.c,i,n),...A},i,n):G(A.ordinal)?(c={...this.toObject(),...A},G(A.day)&&(c.day=Math.min(Ha(c.year,c.month),c.day))):c=yv({...Vu(this.c),...A});const[d,f]=Jo(c,this.o,this.zone);return bn(this,{ts:d,o:f})}plus(e){if(!this.isValid)return this;const A=ae.fromDurationLike(e);return bn(this,Tv(this,A))}minus(e){if(!this.isValid)return this;const A=ae.fromDurationLike(e).negate();return bn(this,Tv(this,A))}startOf(e,{useLocaleWeeks:A=!1}={}){if(!this.isValid)return this;const i={},n=ae.normalizeUnit(e);switch(n){case"years":i.month=1;case"quarters":case"months":i.day=1;case"weeks":case"days":i.hour=0;case"hours":i.minute=0;case"minutes":i.second=0;case"seconds":i.millisecond=0;break}if(n==="weeks")if(A){const r=this.loc.getStartOfWeek(),{weekday:s}=this;s<r&&(i.weekNumber=this.weekNumber-1),i.weekday=r}else i.weekday=1;if(n==="quarters"){const r=Math.ceil(this.month/3);i.month=(r-1)*3+1}return this.set(i)}endOf(e,A){return this.isValid?this.plus({[e]:1}).startOf(e,A).minus(1):this}toFormat(e,A={}){return this.isValid?ot.create(this.loc.redefaultToEN(A)).formatDateTimeFromString(this,e):Gu}toLocaleString(e=Ta,A={}){return this.isValid?ot.create(this.loc.clone(A),e).formatDateTime(this):Gu}toLocaleParts(e={}){return this.isValid?ot.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:A=!1,suppressMilliseconds:i=!1,includeOffset:n=!0,extendedZone:r=!1,precision:s="milliseconds"}={}){if(!this.isValid)return null;s=Yo(s);const o=e==="extended";let a=Xu(this,o,s);return Xo.indexOf(s)>=3&&(a+="T"),a+=Ov(this,o,A,i,n,r,s),a}toISODate({format:e="extended",precision:A="day"}={}){return this.isValid?Xu(this,e==="extended",Yo(A)):null}toISOWeekDate(){return Po(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:A=!1,includeOffset:i=!0,includePrefix:n=!1,extendedZone:r=!1,format:s="extended",precision:o="milliseconds"}={}){return this.isValid?(o=Yo(o),(n&&Xo.indexOf(o)>=3?"T":"")+Ov(this,s==="extended",A,e,i,r,o)):null}toRFC2822(){return Po(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Po(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Xu(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:A=!1,includeOffsetSpace:i=!0}={}){let n="HH:mm:ss.SSS";return(A||e)&&(i&&(n+=" "),A?n+="z":e&&(n+="ZZ")),Po(this,n,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Gu}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const A={...this.c};return e.includeConfig&&(A.outputCalendar=this.outputCalendar,A.numberingSystem=this.loc.numberingSystem,A.locale=this.loc.locale),A}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,A="milliseconds",i={}){if(!this.isValid||!e.isValid)return ae.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...i},r=Y6(A).map(ae.normalizeUnit),s=e.valueOf()>this.valueOf(),o=s?this:e,a=s?e:this,l=tV(o,a,r,n);return s?l.negate():l}diffNow(e="milliseconds",A={}){return this.diff(K.now(),e,A)}until(e){return this.isValid?He.fromDateTimes(this,e):this}hasSame(e,A,i){if(!this.isValid)return!1;const n=e.valueOf(),r=this.setZone(e.zone,{keepLocalTime:!0});return r.startOf(A,i)<=n&&n<=r.endOf(A,i)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const A=e.base||K.fromObject({},{zone:this.zone}),i=e.padding?this<A?-e.padding:e.padding:0;let n=["years","months","days","hours","minutes","seconds"],r=e.unit;return Array.isArray(e.unit)&&(n=e.unit,r=void 0),Lv(A,this.plus(i),{...e,numeric:"always",units:n,unit:r})}toRelativeCalendar(e={}){return this.isValid?Lv(e.base||K.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(K.isDateTime))throw new rt("min requires all arguments be DateTimes");return _v(e,A=>A.valueOf(),Math.min)}static max(...e){if(!e.every(K.isDateTime))throw new rt("max requires all arguments be DateTimes");return _v(e,A=>A.valueOf(),Math.max)}static fromFormatExplain(e,A,i={}){const{locale:n=null,numberingSystem:r=null}=i,s=de.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return Ix(s,e,A)}static fromStringExplain(e,A,i={}){return K.fromFormatExplain(e,A,i)}static buildFormatParser(e,A={}){const{locale:i=null,numberingSystem:n=null}=A,r=de.fromOpts({locale:i,numberingSystem:n,defaultToEN:!0});return new Fx(r,e)}static fromFormatParser(e,A,i={}){if(G(e)||G(A))throw new rt("fromFormatParser requires an input string and a format parser");const{locale:n=null,numberingSystem:r=null}=i,s=de.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});if(!s.equals(A.locale))throw new rt(`fromFormatParser called with a locale of ${s}, but the format parser was created for ${A.locale}`);const{result:o,zone:a,specificOffset:l,invalidReason:u}=A.explainFromTokens(e);return u?K.invalid(u):oi(o,a,i,`format ${A.format}`,e,l)}static get DATE_SHORT(){return Ta}static get DATE_MED(){return $Q}static get DATE_MED_WITH_WEEKDAY(){return U6}static get DATE_FULL(){return TQ}static get DATE_HUGE(){return OQ}static get TIME_SIMPLE(){return HQ}static get TIME_WITH_SECONDS(){return DQ}static get TIME_WITH_SHORT_OFFSET(){return LQ}static get TIME_WITH_LONG_OFFSET(){return MQ}static get TIME_24_SIMPLE(){return NQ}static get TIME_24_WITH_SECONDS(){return zQ}static get TIME_24_WITH_SHORT_OFFSET(){return PQ}static get TIME_24_WITH_LONG_OFFSET(){return RQ}static get DATETIME_SHORT(){return KQ}static get DATETIME_SHORT_WITH_SECONDS(){return ZQ}static get DATETIME_MED(){return VQ}static get DATETIME_MED_WITH_SECONDS(){return jQ}static get DATETIME_MED_WITH_WEEKDAY(){return Q6}static get DATETIME_FULL(){return GQ}static get DATETIME_FULL_WITH_SECONDS(){return WQ}static get DATETIME_HUGE(){return JQ}static get DATETIME_HUGE_WITH_SECONDS(){return XQ}}function lr(t){if(K.isDateTime(t))return t;if(t&&t.valueOf&&rn(t.valueOf()))return K.fromJSDate(t);if(t&&typeof t=="object")return K.fromObject(t);throw new rt(`Unknown datetime argument: ${t}, of type ${typeof t}`)}/*!
|
|
224
265
|
* chartjs-adapter-luxon v1.3.1
|
|
225
266
|
* https://www.chartjs.org
|
|
226
267
|
* (c) 2023 chartjs-adapter-luxon Contributors
|
|
227
268
|
* Released under the MIT license
|
|
228
|
-
*/const
|
|
269
|
+
*/const wV={datetime:K.DATETIME_MED_WITH_SECONDS,millisecond:"h:mm:ss.SSS a",second:K.TIME_WITH_SECONDS,minute:K.TIME_SIMPLE,hour:{hour:"numeric"},day:{day:"numeric",month:"short"},week:"DD",month:{month:"short",year:"numeric"},quarter:"'Q'q - yyyy",year:{year:"numeric"}};oU._date.override({_id:"luxon",_create:function(t){return K.fromMillis(t,this.options)},init(t){this.options.locale||(this.options.locale=t.locale)},formats:function(){return wV},parse:function(t,e){const A=this.options,i=typeof t;return t===null||i==="undefined"?null:(i==="number"?t=this._create(t):i==="string"?typeof e=="string"?t=K.fromFormat(t,e,A):t=K.fromISO(t,A):t instanceof Date?t=K.fromJSDate(t,A):i==="object"&&!(t instanceof K)&&(t=K.fromObject(t,A)),t.isValid?t.valueOf():null)},format:function(t,e){const A=this._create(t);return typeof e=="string"?A.toFormat(e):A.toLocaleString(e)},add:function(t,e,A){const i={};return i[A]=e,this._create(t).plus(i).valueOf()},diff:function(t,e,A){return this._create(t).diff(this._create(e)).as(A).valueOf()},startOf:function(t,e,A){if(e==="isoWeek"){A=Math.trunc(Math.min(Math.max(0,A),6));const i=this._create(t);return i.minus({days:(i.weekday-A+7)%7}).startOf("day").valueOf()}return e?this._create(t).startOf(e).valueOf():t},endOf:function(t,e){return this._create(t).endOf(e).valueOf()}});/*!
|
|
229
270
|
* @license
|
|
230
271
|
* chartjs-chart-financial
|
|
231
272
|
* http://chartjs.org/
|
|
@@ -234,13 +275,13 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
234
275
|
* Copyright 2024 Chart.js Contributors
|
|
235
276
|
* Released under the MIT license
|
|
236
277
|
* https://github.com/chartjs/chartjs-chart-financial/blob/master/LICENSE.md
|
|
237
|
-
*/function
|
|
278
|
+
*/function yV(t,e){const{x:A,y:i,base:n,width:r,height:s}=t.getProps(["x","low","high","width","height"],e);let o,a,l,u,c;return t.horizontal?(c=s/2,o=Math.min(A,n),a=Math.max(A,n),l=i-c,u=i+c):(c=r/2,o=A-c,a=A+c,l=Math.min(i,n),u=Math.max(i,n)),{left:o,top:l,right:a,bottom:u}}function Yu(t,e,A,i){const n=e===null,r=A===null,s=!t||n&&r?!1:yV(t,i);return s&&(n||e>=s.left&&e<=s.right)&&(r||A>=s.top&&A<=s.bottom)}class As extends wi{height(){return this.base-this.y}inRange(e,A,i){return Yu(this,e,A,i)}inXRange(e,A){return Yu(this,e,null,A)}inYRange(e,A){return Yu(this,null,e,A)}getRange(e){return e==="x"?this.width/2:this.height/2}getCenterPoint(e){const{x:A,low:i,high:n}=this.getProps(["x","low","high"],e);return{x:A,y:(n+i)/2}}tooltipPosition(e){const{x:A,open:i,close:n}=this.getProps(["x","open","close"],e);return{x:A,y:(i+n)/2}}}k(As,"defaults",{backgroundColors:{up:"rgba(75, 192, 192, 0.5)",down:"rgba(255, 99, 132, 0.5)",unchanged:"rgba(201, 203, 207, 0.5)"},borderColors:{up:"rgb(75, 192, 192)",down:"rgb(255, 99, 132)",unchanged:"rgb(201, 203, 207)"}});const ai=Le.defaults;class La extends As{draw(e){const A=this,{x:i,open:n,high:r,low:s,close:o}=A,a=Z(A.armLengthRatio,ai.elements.ohlc.armLengthRatio);let l=Z(A.armLength,ai.elements.ohlc.armLength);l===null&&(l=A.width*a*.5),o<n?e.strokeStyle=Z(A.options.borderColors?A.options.borderColors.up:void 0,ai.elements.ohlc.borderColors.up):o>n?e.strokeStyle=Z(A.options.borderColors?A.options.borderColors.down:void 0,ai.elements.ohlc.borderColors.down):e.strokeStyle=Z(A.options.borderColors?A.options.borderColors.unchanged:void 0,ai.elements.ohlc.borderColors.unchanged),e.lineWidth=Z(A.lineWidth,ai.elements.ohlc.lineWidth),e.beginPath(),e.moveTo(i,r),e.lineTo(i,s),e.moveTo(i-l,n),e.lineTo(i,n),e.moveTo(i+l,o),e.lineTo(i,o),e.stroke()}}k(La,"id","ohlc"),k(La,"defaults",{...As.defaults,lineWidth:2,armLength:null,armLengthRatio:.8});class ns extends Tn{getLabelAndValue(e){const A=this,i=A.getParsed(e),n=A._cachedMeta.iScale.axis,{o:r,h:s,l:o,c:a}=i,l=`O: ${r} H: ${s} L: ${o} C: ${a}`;return{label:`${A._cachedMeta.iScale.getLabelForValue(i[n])}`,value:l}}getUserBounds(e){const{min:A,max:i,minDefined:n,maxDefined:r}=e.getUserBounds();return{min:n?A:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}getMinMax(e){const A=this._cachedMeta,i=A._parsed,n=A.iScale.axis,r=this._getOtherScale(e),{min:s,max:o}=this.getUserBounds(r);if(i.length<2)return{min:0,max:1};if(e===A.iScale)return{min:i[0][n],max:i[i.length-1][n]};const a=i.filter(({x:c})=>c>=s&&c<o);let l=Number.POSITIVE_INFINITY,u=Number.NEGATIVE_INFINITY;for(let c=0;c<a.length;c++){const d=a[c];l=Math.min(l,d.l),u=Math.max(u,d.h)}return{min:l,max:u}}calculateElementProperties(e,A,i,n){const r=this,s=r._cachedMeta.vScale,o=s.getBasePixel(),a=r._calculateBarIndexPixels(e,A,n),l=r.chart.data.datasets[r.index].data[e],u=s.getPixelForValue(l.o),c=s.getPixelForValue(l.h),d=s.getPixelForValue(l.l),f=s.getPixelForValue(l.c);return{base:i?o:d,x:a.center,y:(d+c)/2,width:a.size,open:u,high:c,low:d,close:f}}draw(){const e=this,A=e.chart,i=e._cachedMeta.data;Hs(A.ctx,A.chartArea);for(let n=0;n<i.length;++n)i[n].draw(e._ctx);Ds(A.ctx)}}k(ns,"overrides",{label:"",parsing:!1,hover:{mode:"label"},animations:{numbers:{type:"number",properties:["x","y","base","width","open","high","low","close"]}},scales:{x:{type:"timeseries",offset:!0,ticks:{major:{enabled:!0},source:"data",maxRotation:0,autoSkip:!0,autoSkipPadding:75,sampleSize:100}},y:{type:"linear"}},plugins:{tooltip:{intersect:!1,mode:"index",callbacks:{label(e){const A=e.parsed;if(!le(A.y))return me.plugins.tooltip.callbacks.label(e);const{o:i,h:n,l:r,c:s}=A;return`O: ${i} H: ${n} L: ${r} C: ${s}`}}}}});class Ad extends ns{updateElements(e,A,i,n){const r=n==="reset",s=this._getRuler(),{sharedOptions:o,includeOptions:a}=this._getSharedOptions(A,n);for(let l=A;l<A+i;l++){const u=o||this.resolveDataElementOptions(l,n),c=this.calculateElementProperties(l,s,r,u);a&&(c.options=u),this.updateElement(e[l],l,c,n)}}}k(Ad,"id","ohlc"),k(Ad,"defaults",{...ns.defaults,dataElementType:La.id,datasets:{barPercentage:1,categoryPercentage:1}});class Ma extends As{draw(e){const A=this,{x:i,open:n,high:r,low:s,close:o}=A;let a=A.options.borderColors;typeof a=="string"&&(a={up:a,down:a,unchanged:a});let l;o<n?(l=Z(a?a.up:void 0,me.elements.candlestick.borderColors.up),e.fillStyle=Z(A.options.backgroundColors?A.options.backgroundColors.up:void 0,me.elements.candlestick.backgroundColors.up)):o>n?(l=Z(a?a.down:void 0,me.elements.candlestick.borderColors.down),e.fillStyle=Z(A.options.backgroundColors?A.options.backgroundColors.down:void 0,me.elements.candlestick.backgroundColors.down)):(l=Z(a?a.unchanged:void 0,me.elements.candlestick.borderColors.unchanged),e.fillStyle=Z(A.backgroundColors?A.backgroundColors.unchanged:void 0,me.elements.candlestick.backgroundColors.unchanged)),e.lineWidth=Z(A.options.borderWidth,me.elements.candlestick.borderWidth),e.strokeStyle=l,e.beginPath(),e.moveTo(i,r),e.lineTo(i,Math.min(n,o)),e.moveTo(i,s),e.lineTo(i,Math.max(n,o)),e.stroke(),e.fillRect(i-A.width/2,o,A.width,n-o),e.strokeRect(i-A.width/2,o,A.width,n-o),e.closePath()}}k(Ma,"id","candlestick"),k(Ma,"defaults",{...As.defaults,borderWidth:1});class qo extends ns{updateElements(e,A,i,n){const r=n==="reset",s=this._getRuler(),{sharedOptions:o,includeOptions:a}=this._getSharedOptions(A,n);for(let l=A;l<A+i;l++){const u=o||this.resolveDataElementOptions(l,n),c=this.calculateElementProperties(l,s,r,u);a&&(c.options=u),this.updateElement(e[l],l,c,n)}}}k(qo,"id","candlestick"),k(qo,"defaults",{...ns.defaults,dataElementType:Ma.id}),k(qo,"defaultRoutes",Tn.defaultRoutes);Le.register(Pn,Xr,Zi,Ki,qo,Ma,Ad,La);function bV(t,e){const{title:A,data:i,options:n}=e,r=n.type??"candlestick";n.showVolume===!0&&i.some(m=>m.v!==void 0);const s=J("--positive")||"#22C55E",o=J("--negative")||"#EF4444";t.innerHTML=`
|
|
238
279
|
<div class="chart-view">
|
|
239
280
|
<div class="card chart-card">
|
|
240
281
|
<div class="chart-card__header">
|
|
241
282
|
<div>
|
|
242
|
-
<div class="chart-card__title">${
|
|
243
|
-
<div class="chart-card__subtitle">${
|
|
283
|
+
<div class="chart-card__title">${Xe(A)}</div>
|
|
284
|
+
<div class="chart-card__subtitle">${i.length} ${r==="ohlc"?"OHLC":"candlestick"} bars</div>
|
|
244
285
|
</div>
|
|
245
286
|
</div>
|
|
246
287
|
<div class="chart-card__body">
|
|
@@ -248,7 +289,7 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
248
289
|
</div>
|
|
249
290
|
</div>
|
|
250
291
|
</div>
|
|
251
|
-
`;const
|
|
292
|
+
`;const a=t.querySelector("#chart-canvas"),l=i.map(m=>({x:new Date(m.date).getTime(),o:m.o,h:m.h,l:m.l,c:m.c})),u=i.flatMap(m=>[m.o,m.h,m.l,m.c]),c=Math.min(...u),d=Math.max(...u),f=(d-c)*.15||1,h=[{label:A,data:l,color:{up:s,down:o,unchanged:J("--text-muted")||"#94A3B8"},borderColor:{up:s,down:o,unchanged:J("--text-muted")||"#94A3B8"}}],g=new Le(a,{type:r,data:{datasets:h},options:{responsive:!0,maintainAspectRatio:!1,onClick:(m,p)=>{if(p.length===0)return;const B=p[0].index,b=i[B];mA(`${b.date}: O${b.o} H${b.h} L${b.l} C${b.c}${b.v!==void 0?` Vol:${b.v.toLocaleString()}`:""} in "${A}"`)},scales:{x:{type:"time",border:{display:!1},grid:{display:!1},ticks:{color:J("--text-secondary"),font:{size:11},maxRotation:0},time:{displayFormats:{day:"MMM d",week:"MMM d",month:"MMM yyyy"}}},y:{type:"linear",beginAtZero:!1,min:c-f,max:d+f,border:{display:!1},grid:{color:J("--border"),drawTicks:!1},ticks:{color:J("--text-secondary"),font:{size:11},padding:8}}},plugins:{legend:{display:!1},tooltip:{...qA(),callbacks:{title:m=>{if(m.length===0)return"";const p=m[0].raw;return new Date(p.x).toLocaleDateString(void 0,{dateStyle:"medium"})},label:m=>{const p=m.raw,B=p.c-p.o,b=(B/p.o*100).toFixed(2),_=B>=0?"+":"";return[` O: ${p.o.toLocaleString()} H: ${p.h.toLocaleString()}`,` L: ${p.l.toLocaleString()} C: ${p.c.toLocaleString()}`,` Change: ${_}${B.toLocaleString()} (${_}${b}%)`]}}}}}});en(g),tn(t,g,A),Ls(t,()=>{var m;return(m=window.__mcpRefresh)==null?void 0:m.call(window)})}const Nv="mcp-table-styles";function zv(t){if(t.querySelector(`#${Nv}`))return;const e=document.createElement("style");e.id=Nv,e.textContent=`
|
|
252
293
|
.tbl-wrap {
|
|
253
294
|
flex: 1;
|
|
254
295
|
min-height: 0;
|
|
@@ -361,50 +402,50 @@ container holding the app. Specify either width or maxWidth, and either height o
|
|
|
361
402
|
color: var(--text-muted);
|
|
362
403
|
font-size: 12px;
|
|
363
404
|
}
|
|
364
|
-
`,t.appendChild(e)}function
|
|
405
|
+
`,t.appendChild(e)}function _V(t){return typeof t=="number"?!0:typeof t=="string"&&t.trim()===""?!1:!isNaN(Number(t))}function CV(t,e){const A=new Set;if(e.length===0)return A;for(const i of t)e.every(r=>{const s=r[i];return s==null||_V(s)})&&A.add(i);return A}function Pv(t){return t==null?"":String(t)}function $x(t,e){const{title:A,columns:i,rows:n,options:r={}}=e,s=r.sortable!==!1,o=r.striped===!0;zv(t);const a=n.length,l=i.length,u=`${a} row${a!==1?"s":""} · ${l} column${l!==1?"s":""}`,c=CV(i,n),d=i.map((w,U)=>{const F=c.has(w)?"right":"left",x=s?" tbl-sortable":"",$=s?`<span class="tbl-sort-icon" data-icon="${U}">▴▾</span>`:"";return`<th class="tbl-th${x}" data-col="${U}" style="text-align:${F}" title="${Xe(w)}">${Xe(w)}${$}</th>`}).join("");let f="";if(n.length===0)f=`<tr><td class="tbl-empty" colspan="${i.length}">No data</td></tr>`;else for(let w=0;w<n.length;w++){const U=n[w],F=i.map(x=>{const $=U[x],M=c.has(x)?"tbl-num":"tbl-str",z=Xe(Pv($));return`<td class="${M}">${z}</td>`}).join("");f+=`<tr data-row-idx="${w}">${F}</tr>`}const h=o?" tbl--striped":"";t.innerHTML=`
|
|
365
406
|
<div class="chart-view">
|
|
366
407
|
<div class="card chart-card">
|
|
367
408
|
<div class="chart-card__header">
|
|
368
409
|
<div>
|
|
369
|
-
<div class="chart-card__title">${
|
|
370
|
-
<div class="chart-card__subtitle tbl-meta">${
|
|
410
|
+
<div class="chart-card__title">${Xe(A)}</div>
|
|
411
|
+
<div class="chart-card__subtitle tbl-meta">${u}</div>
|
|
371
412
|
</div>
|
|
372
413
|
</div>
|
|
373
414
|
<div class="chart-card__body" style="display:flex;flex-direction:column;">
|
|
374
415
|
<div class="tbl-wrap">
|
|
375
|
-
<table class="tbl${
|
|
416
|
+
<table class="tbl${h}">
|
|
376
417
|
<thead>
|
|
377
|
-
<tr>${
|
|
418
|
+
<tr>${d}</tr>
|
|
378
419
|
</thead>
|
|
379
420
|
<tbody id="tbl-body">
|
|
380
|
-
${
|
|
421
|
+
${f}
|
|
381
422
|
</tbody>
|
|
382
423
|
</table>
|
|
383
424
|
</div>
|
|
384
425
|
</div>
|
|
385
426
|
</div>
|
|
386
427
|
</div>
|
|
387
|
-
`,
|
|
428
|
+
`,zv(t);const g=t.querySelector(".chart-card");g&&Z2(g,i,n,A);const m=t.querySelector("#tbl-body");if(m.addEventListener("click",w=>{const U=w.target.closest("tr[data-row-idx]");if(!U)return;const F=parseInt(U.dataset.rowIdx??"0",10),x=n[F];if(!x)return;const $=i.map(M=>`${M}: ${x[M]??""}`).join(", ");mA(`Row ${F+1} in "${A}": ${$}`)}),!s||n.length===0)return;let p=null,B=!0,b=n.map((w,U)=>U);const _=t.querySelectorAll(".tbl-th.tbl-sortable");function y(){const w=p!==null?i[p]:null,U=w!==null&&c.has(w);b=[...b].sort(($,M)=>{if(w===null)return 0;const z=n[$][w],R=n[M][w];let te=0;if(U){const Y=z===void 0||z===""?-1/0:Number(z),W=R===void 0||R===""?-1/0:Number(R);te=Y-W}else{const Y=z===void 0?"":String(z),W=R===void 0?"":String(R);te=Y.localeCompare(W,void 0,{numeric:!0,sensitivity:"base"})}return B?te:-te});let x="";for(const $ of b){const M=n[$],z=i.map(R=>{const te=M[R],Y=c.has(R)?"tbl-num":"tbl-str",W=Xe(Pv(te));return`<td class="${Y}">${W}</td>`}).join("");x+=`<tr data-row-idx="${$}">${z}</tr>`}m.innerHTML=x}_.forEach(w=>{w.addEventListener("click",()=>{const U=parseInt(w.dataset.col??"0",10);p===U?B=!B:(p=U,B=!0),_.forEach(x=>{x.classList.remove("tbl-sorted");const $=x.querySelector(".tbl-sort-icon");$&&($.innerHTML="▴▾")}),w.classList.add("tbl-sorted");const F=w.querySelector(".tbl-sort-icon");F&&(F.innerHTML=B?"▴":"▾"),y()})})}function UV(t){if(typeof t!="string")return!1;if(/^\d{4}-\d{2}-\d{2}(T[\d:.Z+-]*)?$/.test(t)||/^\d{1,2}\/\d{1,2}\/\d{2,4}$/.test(t)||/^(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*[\s-]\d{2,4}$/i.test(t)||/^Q[1-4][\s-]\d{4}$/.test(t))return!0;if(/^\d{4}$/.test(t)){const e=parseInt(t,10);if(e>=1900&&e<=2100)return!0}return!!/^\d{4}-W\d{2}$/.test(t)}function rA(t){return typeof t=="number"?isFinite(t):typeof t=="string"&&t.trim()!==""?isFinite(Number(t.trim())):!1}function ru(t){if(!Array.isArray(t)||t.length===0)return{stringKeys:[],numberKeys:[],dateKeys:[]};const e=t[0];if(typeof e!="object"||e===null||Array.isArray(e))return{stringKeys:[],numberKeys:[],dateKeys:[]};const A=Object.keys(e),i=[],n=[],r=[];for(const s of A){let o=0,a=0,l=0;for(const c of t){const d=c[s];rA(d)?o++:typeof d=="string"&&(UV(d)?a++:l++)}const u=t.length;a/u>=.6?r.push(s):o/u>=.6?n.push(s):l+a>0&&i.push(s)}return{stringKeys:i,numberKeys:n,dateKeys:r}}function nd(t,e=""){const A={};for(const[i,n]of Object.entries(t)){const r=e?`${e}.${i}`:i;n!==null&&typeof n=="object"&&!Array.isArray(n)?Object.assign(A,nd(n,r)):A[r]=n}return A}function Xi(t){return Array.isArray(t)?t.map(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)?nd(e):e):typeof t=="object"&&t!==null?nd(t):t}function QV(t){if(Array.isArray(t)&&t.length>0&&t.every(e=>rA(e)))return"bar";if(!Array.isArray(t)&&typeof t=="object"&&t!==null){const e=Object.values(t);if(e.length>0&&e.every(n=>rA(n)))return"pie";const A=Xi(t);return Object.values(A).every(n=>rA(n))?"pie":"raw"}if(Array.isArray(t)&&t.length>0){const e=t[0];if(typeof e!="object"||e===null)return"bar";const{stringKeys:A,numberKeys:i,dateKeys:n}=ru(t),r=A.length+i.length+n.length;return n.length>=1&&i.length>=1?"line":A.length===1&&i.length===1&&r===2?"pie":A.length===1&&i.length>1?"bar":(r>=3,"table")}return"raw"}function xV(t,e){if(!Array.isArray(e)&&typeof e=="object"&&e!==null){const s=Xi(e),o=Object.entries(s).filter(([,a])=>rA(a));return{title:t,data:o.map(([a,l])=>({label:a,value:Number(l)})),options:{donut:!1,showLegend:!0}}}if(Array.isArray(e)&&e.every(s=>rA(s)))return{title:t,data:e.map((s,o)=>({label:String(o),value:Number(s)})),options:{donut:!1,showLegend:!0}};const{stringKeys:A,numberKeys:i}=ru(e),n=A[0]??Object.keys(e[0])[0],r=i[0]??Object.keys(e[0]).find(s=>s!==n)??"";return{title:t,data:e.map(s=>({label:String(s[n]??""),value:Number(s[r]??0)})),options:{donut:!1,showLegend:!0}}}function FV(t,e){if(Array.isArray(e)&&e.every(o=>rA(o)))return{title:t,labels:e.map((o,a)=>String(a+1)),datasets:[{label:t,data:e.map(Number)}],options:{}};if(!Array.isArray(e)&&typeof e=="object"&&e!==null){const o=Xi(e),a=Object.entries(o).filter(([,l])=>rA(l));return{title:t,labels:a.map(([l])=>l),datasets:[{label:t,data:a.map(([,l])=>Number(l))}],options:{}}}const{stringKeys:A,numberKeys:i,dateKeys:n}=ru(e),r=A[0]??n[0]??Object.keys(e[0])[0],s=i.length>0?i:Object.keys(e[0]).filter(o=>o!==r&&rA(e[0][o]));return{title:t,labels:e.map(o=>String(o[r]??"")),datasets:s.map(o=>({label:o,data:e.map(a=>Number(a[o]??0))})),options:{}}}function IV(t,e){if(!Array.isArray(e)&&typeof e=="object"&&e!==null){const o=Xi(e),a=Object.entries(o).filter(([,l])=>rA(l));return{title:t,labels:a.map(([l])=>l),datasets:[{label:t,data:a.map(([,l])=>Number(l))}],options:{}}}const{dateKeys:A,numberKeys:i,stringKeys:n}=ru(e),r=A[0]??n[0]??Object.keys(e[0])[0],s=i.length>0?i:Object.keys(e[0]).filter(o=>o!==r&&rA(e[0][o]));return{title:t,labels:e.map(o=>String(o[r]??"")),datasets:s.map(o=>({label:o,data:e.map(a=>Number(a[o]??0))})),options:{}}}function SV(t,e){if(Array.isArray(e)&&e.length>0&&typeof e[0]=="object"&&e[0]!==null){const A=Object.keys(e[0]);return{title:t,columns:A,rows:e}}if(!Array.isArray(e)&&typeof e=="object"&&e!==null){const A=Xi(e);return{title:t,columns:["Key","Value"],rows:Object.entries(A).map(([i,n])=>({Key:i,Value:String(n)}))}}return{title:t,columns:["Value"],rows:e.map(A=>({Value:String(A)}))}}function Rv(t,e,A){const i=JSON.stringify(A,null,2);t.innerHTML=`
|
|
388
429
|
<div class="chart-view">
|
|
389
430
|
<div class="card chart-card">
|
|
390
431
|
<div class="chart-card__header">
|
|
391
432
|
<div>
|
|
392
|
-
<div class="chart-card__title">${
|
|
433
|
+
<div class="chart-card__title">${Xe(e)}</div>
|
|
393
434
|
<div class="chart-card__subtitle">Raw JSON - could not determine chart type</div>
|
|
394
435
|
</div>
|
|
395
436
|
</div>
|
|
396
437
|
<div class="chart-card__body" style="overflow:auto;padding:16px">
|
|
397
|
-
<pre style="margin:0;font-size:12px;color:var(--text-secondary,#94A3B8);white-space:pre-wrap;word-break:break-all">${
|
|
438
|
+
<pre style="margin:0;font-size:12px;color:var(--text-secondary,#94A3B8);white-space:pre-wrap;word-break:break-all">${Xe(i)}</pre>
|
|
398
439
|
</div>
|
|
399
440
|
</div>
|
|
400
441
|
</div>
|
|
401
|
-
`}function
|
|
442
|
+
`}function kV(t){if(Array.isArray(t)){const e=t.find(A=>typeof A=="object"&&A!==null&&!Array.isArray(A));return e?Object.values(e).some(A=>typeof A=="object"&&A!==null&&!Array.isArray(A)):!1}return typeof t=="object"&&t!==null?Object.values(t).some(e=>typeof e=="object"&&e!==null&&!Array.isArray(e)):!1}function EV(t,e){const{title:A,options:i}=e;let{data:n}=e;const r=i==null?void 0:i.preferredType;let s=n;kV(n)&&(s=Xi(n),!Array.isArray(s)&&typeof s=="object"&&s!==null&&Object.values(s).some(l=>typeof l=="object"&&l!==null)&&(s=Object.entries(s).map(([l,u])=>({key:l,value:typeof u=="object"?JSON.stringify(u):u}))));const o=r??QV(s);try{switch(o){case"pie":QU(t,xV(A,s));break;case"bar":xU(t,FV(A,s));break;case"line":FU(t,IV(A,s));break;case"table":$x(t,SV(A,s));break;default:Rv(t,A,n)}}catch{Rv(t,A,n)}}const bt=document.getElementById("app");bt.innerHTML=`
|
|
402
443
|
<div class="loading">
|
|
403
444
|
<div class="loading__spinner"></div>
|
|
404
445
|
Waiting for data...
|
|
405
446
|
</div>
|
|
406
|
-
`;const
|
|
407
|
-
<style rel="stylesheet" crossorigin>*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}
|
|
447
|
+
`;const Zs=new dH({name:"MCP Dashboard",version:"1.0.0"},{},{autoResize:!1});N2(Zs);function qu(){const t=()=>{const e=bt.getBoundingClientRect();Zs.sendSizeChanged({width:Math.ceil(e.width),height:Math.ceil(e.height)})};requestAnimationFrame(t),setTimeout(t,200),setTimeout(t,600),setTimeout(t,1500)}function Tx(t){if(!(t!=null&&t.type)){bt.innerHTML='<div class="loading">No chart data received.</div>',qu();return}try{switch(t.type){case"pie":QU(bt,t);break;case"bar":xU(bt,t);break;case"line":FU(bt,t);break;case"scatter":y6(bt,t);break;case"candlestick":bV(bt,t);break;case"dashboard":v6(bt,t);break;case"table":$x(bt,t);break;case"auto":EV(bt,t);break;default:bt.innerHTML=`<div class="loading">Unknown chart type: ${t.type}</div>`}qu()}catch(e){console.error("Render error:",e),bt.innerHTML='<div class="loading">Error rendering chart. Check console.</div>',qu()}}const $V={pie:"render_pie_chart",bar:"render_bar_chart",line:"render_line_chart",scatter:"render_scatter_chart",candlestick:"render_candlestick_chart",dashboard:"render_dashboard",table:"render_table",auto:"render_from_json"};let ea=null;Zs.ontoolinput=t=>{ea=t.arguments??null};Zs.ontoolresult=t=>{var A;let e=t.structuredContent;if(!(e!=null&&e.type)){const i=((A=t.content)==null?void 0:A.filter(n=>n.type==="text"))??[];for(const n of i)try{const r=JSON.parse(n.text);if(r!=null&&r.type){e=r;break}}catch{}}if(e!=null&&e.type&&ea){const i=$V[e.type];i&&R2(i,ea)}ea=null,Tx(e)};window.__mcpRefresh=async()=>{var A;const t=K2(),e=z2();if(!(!t||!e))try{const i=await e.callServerTool({name:t.name,arguments:t.args});let n=i.structuredContent;if(!(n!=null&&n.type)){const r=((A=i.content)==null?void 0:A.filter(s=>s.type==="text"))??[];for(const s of r)try{const o=JSON.parse(s.text);if(o!=null&&o.type){n=o;break}}catch{}}Tx(n)}catch(i){console.warn("Refresh failed:",i)}};Zs.connect().catch(t=>{console.error("Failed to connect to host:",t),bt.innerHTML='<div class="loading">Connection failed. Please retry.</div>'});</script>
|
|
448
|
+
<style rel="stylesheet" crossorigin>*,*:before,*:after{box-sizing:border-box;margin:0;padding:0}body{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,system-ui,Helvetica Neue,Arial,sans-serif;font-size:13px;line-height:1.5;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-variant-numeric:tabular-nums}:root{--bg-base: #F0F4F8;--bg-card: #FFFFFF;--bg-card-2: #F8FAFC;--bg-header: #FFFFFF;--border: rgba(0,0,0,.08);--border-md: rgba(0,0,0,.14);--text-primary: #0F172A;--text-secondary: #475569;--text-muted: #94A3B8;--accent: #2563EB;--accent-muted: #EFF6FF;--positive: #16A34A;--positive-bg: #F0FDF4;--negative: #DC2626;--negative-bg: #FEF2F2;--neutral: #D97706;--neutral-bg: #FFFBEB;--c1: #3B82F6;--c2: #10B981;--c3: #F59E0B;--c4: #8B5CF6;--c5: #F43F5E;--c6: #06B6D4;--c7: #84CC16;--shadow-card: 0 1px 3px rgba(0,0,0,.07), 0 4px 12px rgba(0,0,0,.05);--shadow-hover: 0 4px 16px rgba(0,0,0,.1);--gap: 12px;--card-radius: 12px;--header-h: 48px}@media(prefers-color-scheme:dark){:root{--bg-base: #0D1117;--bg-card: #161B22;--bg-card-2: #1C2333;--bg-header: #13171F;--border: rgba(255,255,255,.08);--border-md: rgba(255,255,255,.14);--text-primary: #F1F5F9;--text-secondary: #94A3B8;--text-muted: #4B5563;--accent: #3B82F6;--accent-muted: #1E3A5F;--positive: #22C55E;--positive-bg: #052E16;--negative: #EF4444;--negative-bg: #2D0A0A;--neutral: #F59E0B;--neutral-bg: #2D1B00;--shadow-card: 0 1px 3px rgba(0,0,0,.3), 0 4px 12px rgba(0,0,0,.2);--shadow-hover: 0 4px 16px rgba(0,0,0,.4)}}body{background:var(--bg-base);color:var(--text-primary)}.dashboard{display:grid;grid-template-rows:var(--header-h) auto;grid-template-areas:"header" "main"}.dashboard-main{grid-area:main;display:grid;grid-template-rows:auto auto;gap:var(--gap);padding:var(--gap);padding-bottom:4px;overflow-x:hidden}.chart-view{padding:var(--gap)}.header{grid-area:header;display:flex;align-items:center;justify-content:space-between;padding:0 16px;background:var(--bg-header);border-bottom:1px solid var(--border);height:var(--header-h);position:sticky;top:0;z-index:100}.header__brand{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:700;color:var(--text-primary)}.header__dot{width:8px;height:8px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 3px var(--accent-muted);animation:pulse 2s ease infinite}.header__right{display:flex;align-items:center;gap:8px}.header__meta{font-size:11px;color:var(--text-muted)}@keyframes pulse{0%,to{box-shadow:0 0 0 0 var(--accent-muted)}50%{box-shadow:0 0 0 5px transparent}}.card{background:var(--bg-card);border:1px solid var(--border);border-radius:var(--card-radius);box-shadow:var(--shadow-card);padding:16px;transition:box-shadow .25s ease,transform .25s cubic-bezier(.34,1.56,.64,1);position:relative;overflow:hidden;opacity:0;animation:fadeInUp .4s cubic-bezier(.16,1,.3,1) forwards}.card:hover{box-shadow:var(--shadow-hover);transform:translateY(-2px)}.card--accent{border-top:3px solid var(--accent)}.card--positive{border-top:3px solid var(--positive)}.card--negative{border-top:3px solid var(--negative)}.card--neutral{border-top:3px solid var(--neutral)}.kpi-row{display:grid;grid-template-columns:repeat(auto-fill,minmax(160px,1fr));gap:var(--gap)}.kpi{display:flex;flex-direction:column;gap:4px;padding:14px 16px}.kpi__label{font-size:12px;font-weight:500;color:var(--text-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.kpi__value{font-size:28px;font-weight:700;line-height:1;color:var(--text-primary);letter-spacing:-.02em;display:inline-block;animation:fadeInScale .5s cubic-bezier(.16,1,.3,1) .3s both}.kpi__trend{display:flex;align-items:center;gap:4px;margin-top:2px}.kpi__delta{font-size:12px;font-weight:600;display:inline-flex;align-items:center;gap:2px;padding:2px 6px;border-radius:20px}.kpi__delta--up{color:var(--positive);background:var(--positive-bg)}.kpi__delta--down{color:var(--negative);background:var(--negative-bg)}.kpi__delta--flat{color:var(--neutral);background:var(--neutral-bg)}.kpi__delta-arrow{font-size:10px;line-height:1}.chart-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:var(--gap);align-content:start}.chart-full{grid-column:1 / -1}.chart-card{display:flex;flex-direction:column;min-width:0;min-height:0}.chart-card__header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:12px}.chart-card__title{font-size:13px;font-weight:600;color:var(--text-primary)}.chart-card__subtitle{font-size:11px;color:var(--text-secondary);margin-top:1px}.chart-card__actions{display:flex;gap:4px;flex-shrink:0}.chart-card__body{position:relative;height:220px;overflow:hidden}.dashboard .chart-card__body{height:180px}.chart-card__body canvas{position:absolute;top:0;right:0;bottom:0;left:0}.section-title{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-muted);margin-bottom:4px}@keyframes fadeInUp{0%{opacity:0;transform:translateY(16px)}to{opacity:1;transform:translateY(0)}}@keyframes fadeInScale{0%{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}.card:nth-child(1){animation-delay:.05s}.card:nth-child(2){animation-delay:.13s}.card:nth-child(3){animation-delay:.21s}.card:nth-child(4){animation-delay:.29s}.card:nth-child(5){animation-delay:.37s}.card:nth-child(6){animation-delay:.45s}.card:nth-child(7){animation-delay:.53s}.card:nth-child(8){animation-delay:.61s}.chart-wrapper{opacity:0;animation:fadeInScale .5s ease forwards;animation-delay:.4s}.export-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border:1px solid var(--border);border-radius:6px;background:var(--bg-card-2);color:var(--text-secondary);cursor:pointer;transition:all .15s ease;flex-shrink:0}.export-btn:hover{background:var(--accent-muted);color:var(--accent);border-color:var(--accent)}.export-btn:active{transform:scale(.92)}.loading{display:flex;align-items:center;justify-content:center;min-height:120px;color:var(--text-muted);font-size:14px;gap:8px}.loading__spinner{width:16px;height:16px;border:2px solid var(--border-md);border-top-color:var(--accent);border-radius:50%;animation:spin .6s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.selection-tray{position:fixed;bottom:-60px;left:0;right:0;display:flex;align-items:center;gap:8px;padding:8px 12px;background:var(--bg-card);border-top:1px solid var(--border);box-shadow:0 -2px 12px #00000026;z-index:200;transition:bottom .25s cubic-bezier(.16,1,.3,1)}.selection-tray--visible{bottom:0}.selection-tray__chips{display:flex;flex-wrap:wrap;gap:4px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}.selection-tray__chips::-webkit-scrollbar{display:none}.selection-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;background:var(--accent-muted);color:var(--accent);border:1px solid var(--accent);border-radius:20px;font-size:11px;font-weight:500;white-space:nowrap;animation:fadeInScale .2s ease forwards}.selection-chip__remove{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;border:none;background:none;color:var(--accent);font-size:13px;cursor:pointer;border-radius:50%;line-height:1;padding:0;opacity:.6}.selection-chip__remove:hover{opacity:1;background:var(--accent);color:var(--bg-card)}.selection-tray__actions{display:flex;gap:4px;flex-shrink:0}.selection-tray__ask{padding:4px 14px;background:var(--accent);color:#fff;border:none;border-radius:6px;font-size:12px;font-weight:600;cursor:pointer;transition:opacity .15s}.selection-tray__ask:hover{opacity:.85}.selection-tray__ask:active{transform:scale(.96)}.selection-tray__clear{width:28px;height:28px;display:flex;align-items:center;justify-content:center;border:1px solid var(--border);border-radius:6px;background:var(--bg-card-2);color:var(--text-secondary);font-size:16px;cursor:pointer;transition:all .15s}.selection-tray__clear:hover{background:var(--negative-bg);color:var(--negative);border-color:var(--negative)}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}</style>
|
|
408
449
|
</head>
|
|
409
450
|
<body>
|
|
410
451
|
<div id="app"></div>
|