scordi-extension 1.14.3 → 1.14.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/sdk/index.d.ts +1 -0
  2. package/dist/sdk/index.d.ts.map +1 -1
  3. package/dist/sdk/index.js +605 -587
  4. package/package.json +13 -4
  5. package/dist/.vite/manifest.json +0 -67
  6. package/dist/assets/DataExtractBlock-B7AuVonx.js +0 -6
  7. package/dist/assets/index-B9PKMhAi.js +0 -6
  8. package/dist/assets/index-CMlx_xZE.css +0 -1
  9. package/dist/assets/index-CZjAbH8z.js +0 -1
  10. package/dist/assets/index-DkFIvNAm.css +0 -1
  11. package/dist/assets/index-r5QRyJ4m.js +0 -1
  12. package/dist/assets/index.html-BIbPySIb.js +0 -74
  13. package/dist/assets/index.html-cr-_Qdxq.js +0 -49
  14. package/dist/assets/index.ts-BqxJYCmp.js +0 -160
  15. package/dist/assets/internal-messages-Drf0Gb9U.js +0 -1
  16. package/dist/assets/loading-page-1924caaa.js +0 -51
  17. package/dist/assets/main.tsx-BEyI95mZ.js +0 -2
  18. package/dist/assets/main.tsx-BKzdlur-.js +0 -2
  19. package/dist/assets/main.tsx-loader-BYP9L25W.js +0 -13
  20. package/dist/assets/main.tsx-loader-FYb0LhDu.js +0 -13
  21. package/dist/assets/schemas-C8r0jYHO.js +0 -21
  22. package/dist/logo.png +0 -0
  23. package/dist/manifest.json +0 -55
  24. package/dist/public/logo.png +0 -0
  25. package/dist/service-worker-loader.js +0 -3
  26. package/dist/src/blocks/AiParseDataBlock.ts.js +0 -101
  27. package/dist/src/blocks/ClearValueFormBlock.ts.js +0 -55
  28. package/dist/src/blocks/DataExtractBlock.ts.js +0 -28
  29. package/dist/src/blocks/ElementExistsBlock.ts.js +0 -26
  30. package/dist/src/blocks/EventClickBlock.ts.js +0 -143
  31. package/dist/src/blocks/FetchApiBlock.ts.js +0 -50
  32. package/dist/src/blocks/GetAttributeValueBlock.ts.js +0 -33
  33. package/dist/src/blocks/GetElementDataBlock.ts.js +0 -114
  34. package/dist/src/blocks/GetTextBlock.ts.js +0 -152
  35. package/dist/src/blocks/GetValueFormBlock.ts.js +0 -52
  36. package/dist/src/blocks/KeypressBlock.ts.js +0 -89
  37. package/dist/src/blocks/SaveAssetsBlock.ts.js +0 -35
  38. package/dist/src/blocks/ScrollBlock.ts.js +0 -111
  39. package/dist/src/blocks/SetValueFormBlock.ts.js +0 -56
  40. package/dist/src/blocks/WaitBlock.ts.js +0 -24
  41. package/dist/src/blocks/index.ts.js +0 -163
  42. package/dist/src/blocks/types.ts.js +0 -11
  43. package/dist/src/content/elements/finders/CssSelector.ts.js +0 -51
  44. package/dist/src/content/elements/finders/ElementSelector.ts.js +0 -20
  45. package/dist/src/content/elements/finders/IframeSelector.ts.js +0 -32
  46. package/dist/src/content/elements/finders/ShadowDOMSelector.ts.js +0 -38
  47. package/dist/src/content/elements/finders/XPathFinder.ts.js +0 -32
  48. package/dist/src/content/elements/index.ts.js +0 -26
  49. package/dist/src/content/elements/utils/CSSSelectorGenerator.ts.js +0 -72
  50. package/dist/src/content/elements/utils/XPathGenerator.ts.js +0 -62
  51. package/dist/src/content/handler/ExternalMessageHandler.ts.js +0 -78
  52. package/dist/src/content/handler/InternalMessageHandler.ts.js +0 -18
  53. package/dist/src/content/kernel/MessageKernel.ts.js +0 -83
  54. package/dist/src/content/main.tsx-loader.js +0 -22
  55. package/dist/src/content/main.tsx.js +0 -13
  56. package/dist/src/content/utils/index.ts.js +0 -1
  57. package/dist/src/content/utils/synchronizedLock.ts.js +0 -35
  58. package/dist/src/popup/index.html +0 -12
  59. package/dist/src/types/internal-messages.ts.js +0 -15
  60. package/dist/vendor/.vite-deps-chunk-PR4QN5HX.js__v--57e88532.js +0 -42
  61. package/dist/vendor/.vite-deps-chunk-PR4QN5HX.js__v--ba9031c0.js +0 -42
  62. package/dist/vendor/.vite-deps-chunk-VBBIEGWT.js__v--57e88532.js +0 -4156
  63. package/dist/vendor/.vite-deps-jsonata.js__v--5da6ca24.js +0 -5761
  64. package/dist/vendor/.vite-deps-jsonata.js__v--ba9031c0.js +0 -5761
  65. package/dist/vendor/.vite-deps-zod.js__v--13965f26.js +0 -219
  66. package/dist/vendor/.vite-deps-zod.js__v--ba9031c0.js +0 -12651
  67. package/dist/vendor/crx-client-port.js +0 -66
  68. package/dist/vendor/crx-client-preamble.js +0 -4
  69. package/dist/vendor/react-refresh.js +0 -670
  70. package/dist/vendor/vite-client.js +0 -1098
  71. package/dist/vendor/vite-dist-client-env.mjs.js +0 -19
  72. package/dist/vendor/webcomponents-custom-elements.js +0 -47
@@ -1,6 +0,0 @@
1
- import{j as A,d as ne,e as zt,f as tn,$ as qt,h as rn,i as nn,k as an,m as on,p as sn,q as un,r as cn,t as ln,v as dn,w as fn,x as mn,y as vn,z as gn,A as pn,B as hn,C as yn,D as bn,E as $n,F as kn,G as wn,H as _n,I as Sn,J as In,K as xn,L as jn,M as On,N as Un,O as Dn,P as En,Q as Nn,R as Tn,S as An,T as Pn,U as zn,V as Cn,W as Ln,X as Zn,Y as Fn,Z as Mn,a0 as Rn,a1 as Jn,a2 as Bn,a3 as Wn,a4 as Gn,a5 as qn,a6 as Kn,a7 as Vn,a8 as Xn,a9 as Hn,aa as Yn,ab as Qn,ac as ei,ad as ti,ae as ri,af as ni,ag as ii,ah as ai,ai as oi,aj as si,ak as ui,al as ci,am as li,an as di,ao as fi,ap as mi,aq as vi,ar as gi,as as pi,at as hi,au as yi,av as bi,aw as $i,ax as ki,ay as wi,az as _i,aA as Si,aB as Ii,aC as xi,aD as ji,aE as Oi,aF as Ui,aG as Di,aH as Ei,aI as Ni,aJ as Ti,aK as Ai,aL as Pi,aM as zi,aN as Ci,aO as Li,aP as Zi,aQ as Fi,aR as Mi,aS as Ri,aT as Ji,aU as Bi,aV as Kt,aW as Wi,aX as Vt,aY as Xt,aZ as Gi,a_ as Ht,a$ as Yt,b0 as qi,b1 as Ki,b2 as Vi,b3 as Xi,b4 as Hi,b5 as Yi,b6 as Qi,b7 as ea,b8 as ta,b9 as ra,ba as Qt,bb as er,bc as tr,bd as rr,be as nr,bf as na,bg as ia,bh as aa,bi as oa,bj as sa,bk as ua,bl as ca,bm as la,bn as da,bo as fa,bp as ma,bq as va,br as ga,bs as ir,bt as pa,bu as ha,bv as ya,bw as ba,bx as ar,by as Ut,bz as $a,bA as or,bB as ka,bC as wa,bD as _a,bE as Sa,bF as Ia,bG as xa,bH as ja,bI as Oa,bJ as Ua,bK as Da,bL as Ea,bM as Na,bN as Ta,bO as sr,bP as Aa,bQ as ur,bR as cr,bS as Dt,bT as Pa,bU as lr,bV as dr,bW as fr,bX as mr,bY as vr,bZ as gr,b_ as za,b$ as Ca,c0 as La,c1 as pr,c2 as Za,c3 as hr,c4 as Fa,c5 as yr,c6 as br,c7 as Ma,c8 as Ra,c9 as Ja,ca as Ba,cb as $r,cc as Wa,cd as Ga,ce as qa,cf as kr,cg as Ka,ch as wr,ci as Va,cj as Xa,ck as Ha,cl as _r,cm as Ya,cn as Qa,co as eo,cp as to,cq as ro,cr as no,cs as io,ct as Sr,cu as Ir,cv as ao,cw as oo,cx as so,cy as uo,cz as co,cA as lo,cB as fo,cC as xr,cD as jr,cE as mo,cF as Or,cG as vo,cH as go,cI as po,cJ as ho,cK as yo,cL as bo,cM as $o,cN as Ur,cO as ko,cP as wo,cQ as _o,cR as So,cS as Io,cT as xo,cU as jo,cV as Dr,cW as yt,cX as Oo,cY as Uo,cZ as Do,c_ as Eo,c$ as Er,d0 as Nr,d1 as No,d2 as To,d3 as Ao,d4 as Po,d5 as zo,d6 as Co,d7 as Tr,d8 as Ar,d9 as Pr,da as Lo,db as Zo,dc as Fo,dd as Mo,de as Ro,df as Jo,dg as Bo,dh as zr,di as Cr,dj as Wo,dk as Lr,dl as Zr,dm as Fr,dn as Mr,dp as Rr,dq as Go,dr as qo,ds as Ko,dt as Vo,du as Xo,dv as Ho,dw as Yo,dx as Qo,dy as es,dz as ts,dA as rs,dB as ns,dC as is,dD as as,dE as os,dF as ss,dG as us,dH as cs,dI as ls,dJ as ds,dK as fs,dL as ms,dM as vs,dN as gs,dO as ps,dP as hs,dQ as ys,dR as bs,dS as $s,dT as ks,dU as ws,dV as _s,dW as Ss,dX as Is,dY as xs,dZ as js,d_ as Os,d$ as Us,e0 as Ds,e1 as Es,e2 as Ns,e3 as Ts,e4 as As,e5 as Ps,e6 as zs,e7 as Cs,e8 as Ls,e9 as Zs,ea as Fs,eb as Ms,ec as Rs,ed as Js,ee as Bs,ef as Ws,eg as Gs,eh as qs,ei as Ks,ej as Vs,ek as Xs,el as Hs,em as Ys,en as Qs,eo as eu,ep as tu,eq as ru,er as nu,es as iu,et as au,eu as Ft,b as ou,a as su,ev as uu,ew as cu,ex as lu,c as Et,ey as du,ez as fu,eA as mu,eB as vu,eC as gu,eD as pu,eE as hu,eF as yu,eG as bu,eH as $u,eI as ku,eJ as wu,eK as _u,eL as Su,eM as Iu,eN as xu,eO as ju,_ as Jr,eP as Ou,eQ as Uu,eR as Du,eS as Eu,eT as Nu,eU as Tu,eV as Au,eW as Pu,eX as zu,eY as Cu,eZ as Lu,e_ as Zu,e$ as Fu,f0 as Mu,f1 as Ru,f2 as Ju,f3 as Bu,f4 as Wu,f5 as Gu,f6 as qu,f7 as Ku,l as Vu,f8 as Xu,f9 as Hu,fa as Yu,fb as Qu,fc as ec,fd as tc,fe as rc,ff as nc,fg as ic,fh as ac,n as Br,o as Nt,fi as oc,fj as sc,fk as uc,fl as cc,fm as lc,fn as dc,fo as fc,fp as mc,fq as vc,fr as gc,fs as pc,ft as hc,fu as yc,fv as bc,fw as $c,fx as kc,fy as wc,fz as _c,fA as Sc,s as Tt,fB as Ic,fC as xc,fD as jc,fE as Oc,fF as Uc,fG as Dc,fH as Ec,fI as Nc,fJ as Tc,fK as Ac,fL as Pc,fM as zc,u as Cc,fN as Lc,fO as Zc,fP as Fc,fQ as Mc,fR as Rc,fS as Jc,fT as Bc,fU as Wc,fV as Mt,g as Gc}from"./schemas-C8r0jYHO.js";const qc=()=>{const s={string:{unit:"حرف",verb:"أن يحوي"},file:{unit:"بايت",verb:"أن يحوي"},array:{unit:"عنصر",verb:"أن يحوي"},set:{unit:"عنصر",verb:"أن يحوي"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"مدخل"};return e=>{switch(e.code){case"invalid_type":return`مدخلات غير مقبولة: يفترض إدخال ${e.expected}، ولكن تم إدخال ${l(e.input)}`;case"invalid_value":return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${ne(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${t} ${e.maximum.toString()} ${r.unit??"عنصر"}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??"القيمة"} ${t} ${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${t} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${t} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format==="ends_with"?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format==="includes"?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format==="regex"?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${i[t.format]??e.format} غير مقبول`}case"not_multiple_of":return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case"unrecognized_keys":return`معرف${e.keys.length>1?"ات":""} غريب${e.keys.length>1?"ة":""}: ${A(e.keys,"، ")}`;case"invalid_key":return`معرف غير مقبول في ${e.origin}`;case"invalid_union":return"مدخل غير مقبول";case"invalid_element":return`مدخل غير مقبول في ${e.origin}`;default:return"مدخل غير مقبول"}}};function Kc(){return{localeError:qc()}}const Vc=()=>{const s={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 a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Yanlış dəyər: gözlənilən ${e.expected}, daxil olan ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Yanlış dəyər: gözlənilən ${ne(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${t}${e.maximum.toString()} ${r.unit??"element"}`:`Çox böyük: gözlənilən ${e.origin??"dəyər"} ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${t}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format==="ends_with"?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format==="includes"?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format==="regex"?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${i[t.format]??e.format}`}case"not_multiple_of":return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case"unrecognized_keys":return`Tanınmayan açar${e.keys.length>1?"lar":""}: ${A(e.keys,", ")}`;case"invalid_key":return`${e.origin} daxilində yanlış açar`;case"invalid_union":return"Yanlış dəyər";case"invalid_element":return`${e.origin} daxilində yanlış dəyər`;default:return"Yanlış dəyər"}}};function Xc(){return{localeError:Vc()}}function Rt(s,a,l,i){const e=Math.abs(s),t=e%10,r=e%100;return r>=11&&r<=19?i:t===1?a:t>=2&&t<=4?l:i}const Hc=()=>{const s={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 a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"лік";case"object":{if(Array.isArray(e))return"масіў";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"увод"};return e=>{switch(e.code){case"invalid_type":return`Няправільны ўвод: чакаўся ${e.expected}, атрымана ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Няправільны ўвод: чакалася ${ne(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);if(r){const p=Number(e.maximum),U=Rt(p,r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна ${r.verb} ${t}${e.maximum.toString()} ${U}`}return`Занадта вялікі: чакалася, што ${e.origin??"значэнне"} павінна быць ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);if(r){const p=Number(e.minimum),U=Rt(p,r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${t}${e.minimum.toString()} ${U}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format==="ends_with"?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format==="includes"?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format==="regex"?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${i[t.format]??e.format}`}case"not_multiple_of":return`Няправільны лік: павінен быць кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспазнаны ${e.keys.length>1?"ключы":"ключ"}: ${A(e.keys,", ")}`;case"invalid_key":return`Няправільны ключ у ${e.origin}`;case"invalid_union":return"Няправільны ўвод";case"invalid_element":return`Няправільнае значэнне ў ${e.origin}`;default:return"Няправільны ўвод"}}};function Yc(){return{localeError:Hc()}}const Qc=()=>{const s={string:{unit:"caràcters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Tipus invàlid: s'esperava ${e.expected}, s'ha rebut ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Valor invàlid: s'esperava ${ne(e.values[0])}`:`Opció invàlida: s'esperava una de ${A(e.values," o ")}`;case"too_big":{const t=e.inclusive?"com a màxim":"menys de",r=a(e.origin);return r?`Massa gran: s'esperava que ${e.origin??"el valor"} contingués ${t} ${e.maximum.toString()} ${r.unit??"elements"}`:`Massa gran: s'esperava que ${e.origin??"el valor"} fos ${t} ${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?"com a mínim":"més de",r=a(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${t} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${t} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format==="ends_with"?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format==="includes"?`Format invàlid: ha d'incloure "${t.includes}"`:t.format==="regex"?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${i[t.format]??e.format}`}case"not_multiple_of":return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case"unrecognized_keys":return`Clau${e.keys.length>1?"s":""} no reconeguda${e.keys.length>1?"s":""}: ${A(e.keys,", ")}`;case"invalid_key":return`Clau invàlida a ${e.origin}`;case"invalid_union":return"Entrada invàlida";case"invalid_element":return`Element invàlid a ${e.origin}`;default:return"Entrada invàlida"}}};function el(){return{localeError:Qc()}}const tl=()=>{const s={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 a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"číslo";case"string":return"řetězec";case"boolean":return"boolean";case"bigint":return"bigint";case"function":return"funkce";case"symbol":return"symbol";case"undefined":return"undefined";case"object":{if(Array.isArray(e))return"pole";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Neplatný vstup: očekáváno ${e.expected}, obdrženo ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Neplatný vstup: očekáváno ${ne(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Hodnota je příliš velká: ${e.origin??"hodnota"} musí mít ${t}${e.maximum.toString()} ${r.unit??"prvků"}`:`Hodnota je příliš velká: ${e.origin??"hodnota"} musí být ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Hodnota je příliš malá: ${e.origin??"hodnota"} musí mít ${t}${e.minimum.toString()} ${r.unit??"prvků"}`:`Hodnota je příliš malá: ${e.origin??"hodnota"} musí být ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format==="ends_with"?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format==="includes"?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format==="regex"?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${i[t.format]??e.format}`}case"not_multiple_of":return`Neplatné číslo: musí být násobkem ${e.divisor}`;case"unrecognized_keys":return`Neznámé klíče: ${A(e.keys,", ")}`;case"invalid_key":return`Neplatný klíč v ${e.origin}`;case"invalid_union":return"Neplatný vstup";case"invalid_element":return`Neplatná hodnota v ${e.origin}`;default:return"Neplatný vstup"}}};function rl(){return{localeError:tl()}}const nl=()=>{const s={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}},a={string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"sæt",file:"fil"};function l(r){return s[r]??null}function i(r){return a[r]??r}const e=r=>{const p=typeof r;switch(p){case"number":return Number.isNaN(r)?"NaN":"tal";case"object":return Array.isArray(r)?"liste":r===null?"null":Object.getPrototypeOf(r)!==Object.prototype&&r.constructor?r.constructor.name:"objekt"}return p},t={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"};return r=>{switch(r.code){case"invalid_type":return`Ugyldigt input: forventede ${i(r.expected)}, fik ${i(e(r.input))}`;case"invalid_value":return r.values.length===1?`Ugyldig værdi: forventede ${ne(r.values[0])}`:`Ugyldigt valg: forventede en af følgende ${A(r.values,"|")}`;case"too_big":{const p=r.inclusive?"<=":"<",U=l(r.origin),z=i(r.origin);return U?`For stor: forventede ${z??"value"} ${U.verb} ${p} ${r.maximum.toString()} ${U.unit??"elementer"}`:`For stor: forventede ${z??"value"} havde ${p} ${r.maximum.toString()}`}case"too_small":{const p=r.inclusive?">=":">",U=l(r.origin),z=i(r.origin);return U?`For lille: forventede ${z} ${U.verb} ${p} ${r.minimum.toString()} ${U.unit}`:`For lille: forventede ${z} havde ${p} ${r.minimum.toString()}`}case"invalid_format":{const p=r;return p.format==="starts_with"?`Ugyldig streng: skal starte med "${p.prefix}"`:p.format==="ends_with"?`Ugyldig streng: skal ende med "${p.suffix}"`:p.format==="includes"?`Ugyldig streng: skal indeholde "${p.includes}"`:p.format==="regex"?`Ugyldig streng: skal matche mønsteret ${p.pattern}`:`Ugyldig ${t[p.format]??r.format}`}case"not_multiple_of":return`Ugyldigt tal: skal være deleligt med ${r.divisor}`;case"unrecognized_keys":return`${r.keys.length>1?"Ukendte nøgler":"Ukendt nøgle"}: ${A(r.keys,", ")}`;case"invalid_key":return`Ugyldig nøgle i ${r.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig værdi i ${r.origin}`;default:return"Ugyldigt input"}}};function il(){return{localeError:nl()}}const al=()=>{const s={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 a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"Zahl";case"object":{if(Array.isArray(e))return"Array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Ungültige Eingabe: erwartet ${e.expected}, erhalten ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Ungültige Eingabe: erwartet ${ne(e.values[0])}`:`Ungültige Option: erwartet eine von ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??"Wert"} ${t}${e.maximum.toString()} ${r.unit??"Elemente"} hat`:`Zu groß: erwartet, dass ${e.origin??"Wert"} ${t}${e.maximum.toString()} ist`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${t}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${t}${e.minimum.toString()} ist`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format==="ends_with"?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format==="includes"?`Ungültiger String: muss "${t.includes}" enthalten`:t.format==="regex"?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${i[t.format]??e.format}`}case"not_multiple_of":return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case"unrecognized_keys":return`${e.keys.length>1?"Unbekannte Schlüssel":"Unbekannter Schlüssel"}: ${A(e.keys,", ")}`;case"invalid_key":return`Ungültiger Schlüssel in ${e.origin}`;case"invalid_union":return"Ungültige Eingabe";case"invalid_element":return`Ungültiger Wert in ${e.origin}`;default:return"Ungültige Eingabe"}}};function ol(){return{localeError:al()}}const sl=s=>{const a=typeof s;switch(a){case"number":return Number.isNaN(s)?"NaN":"number";case"object":{if(Array.isArray(s))return"array";if(s===null)return"null";if(Object.getPrototypeOf(s)!==Object.prototype&&s.constructor)return s.constructor.name}}return a},ul=()=>{const s={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"}};function a(i){return s[i]??null}const l={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"};return i=>{switch(i.code){case"invalid_type":return`Invalid input: expected ${i.expected}, received ${sl(i.input)}`;case"invalid_value":return i.values.length===1?`Invalid input: expected ${ne(i.values[0])}`:`Invalid option: expected one of ${A(i.values,"|")}`;case"too_big":{const e=i.inclusive?"<=":"<",t=a(i.origin);return t?`Too big: expected ${i.origin??"value"} to have ${e}${i.maximum.toString()} ${t.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${e}${i.maximum.toString()}`}case"too_small":{const e=i.inclusive?">=":">",t=a(i.origin);return t?`Too small: expected ${i.origin} to have ${e}${i.minimum.toString()} ${t.unit}`:`Too small: expected ${i.origin} to be ${e}${i.minimum.toString()}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`Invalid string: must start with "${e.prefix}"`:e.format==="ends_with"?`Invalid string: must end with "${e.suffix}"`:e.format==="includes"?`Invalid string: must include "${e.includes}"`:e.format==="regex"?`Invalid string: must match pattern ${e.pattern}`:`Invalid ${l[e.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":""}: ${A(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 Wr(){return{localeError:ul()}}const cl=s=>{const a=typeof s;switch(a){case"number":return Number.isNaN(s)?"NaN":"nombro";case"object":{if(Array.isArray(s))return"tabelo";if(s===null)return"senvalora";if(Object.getPrototypeOf(s)!==Object.prototype&&s.constructor)return s.constructor.name}}return a},ll=()=>{const s={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function a(i){return s[i]??null}const l={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"};return i=>{switch(i.code){case"invalid_type":return`Nevalida enigo: atendiĝis ${i.expected}, riceviĝis ${cl(i.input)}`;case"invalid_value":return i.values.length===1?`Nevalida enigo: atendiĝis ${ne(i.values[0])}`:`Nevalida opcio: atendiĝis unu el ${A(i.values,"|")}`;case"too_big":{const e=i.inclusive?"<=":"<",t=a(i.origin);return t?`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${e}${i.maximum.toString()} ${t.unit??"elementojn"}`:`Tro granda: atendiĝis ke ${i.origin??"valoro"} havu ${e}${i.maximum.toString()}`}case"too_small":{const e=i.inclusive?">=":">",t=a(i.origin);return t?`Tro malgranda: atendiĝis ke ${i.origin} havu ${e}${i.minimum.toString()} ${t.unit}`:`Tro malgranda: atendiĝis ke ${i.origin} estu ${e}${i.minimum.toString()}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`Nevalida karaktraro: devas komenciĝi per "${e.prefix}"`:e.format==="ends_with"?`Nevalida karaktraro: devas finiĝi per "${e.suffix}"`:e.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${e.includes}"`:e.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${e.pattern}`:`Nevalida ${l[e.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":""}: ${A(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 dl(){return{localeError:ll()}}const fl=()=>{const s={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}},a={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"};function l(r){return s[r]??null}function i(r){return a[r]??r}const e=r=>{const p=typeof r;switch(p){case"number":return Number.isNaN(r)?"NaN":"number";case"object":return Array.isArray(r)?"array":r===null?"null":Object.getPrototypeOf(r)!==Object.prototype?r.constructor.name:"object"}return p},t={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"};return r=>{switch(r.code){case"invalid_type":return`Entrada inválida: se esperaba ${i(r.expected)}, recibido ${i(e(r.input))}`;case"invalid_value":return r.values.length===1?`Entrada inválida: se esperaba ${ne(r.values[0])}`:`Opción inválida: se esperaba una de ${A(r.values,"|")}`;case"too_big":{const p=r.inclusive?"<=":"<",U=l(r.origin),z=i(r.origin);return U?`Demasiado grande: se esperaba que ${z??"valor"} tuviera ${p}${r.maximum.toString()} ${U.unit??"elementos"}`:`Demasiado grande: se esperaba que ${z??"valor"} fuera ${p}${r.maximum.toString()}`}case"too_small":{const p=r.inclusive?">=":">",U=l(r.origin),z=i(r.origin);return U?`Demasiado pequeño: se esperaba que ${z} tuviera ${p}${r.minimum.toString()} ${U.unit}`:`Demasiado pequeño: se esperaba que ${z} fuera ${p}${r.minimum.toString()}`}case"invalid_format":{const p=r;return p.format==="starts_with"?`Cadena inválida: debe comenzar con "${p.prefix}"`:p.format==="ends_with"?`Cadena inválida: debe terminar en "${p.suffix}"`:p.format==="includes"?`Cadena inválida: debe incluir "${p.includes}"`:p.format==="regex"?`Cadena inválida: debe coincidir con el patrón ${p.pattern}`:`Inválido ${t[p.format]??r.format}`}case"not_multiple_of":return`Número inválido: debe ser múltiplo de ${r.divisor}`;case"unrecognized_keys":return`Llave${r.keys.length>1?"s":""} desconocida${r.keys.length>1?"s":""}: ${A(r.keys,", ")}`;case"invalid_key":return`Llave inválida en ${i(r.origin)}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido en ${i(r.origin)}`;default:return"Entrada inválida"}}};function ml(){return{localeError:fl()}}const vl=()=>{const s={string:{unit:"کاراکتر",verb:"داشته باشد"},file:{unit:"بایت",verb:"داشته باشد"},array:{unit:"آیتم",verb:"داشته باشد"},set:{unit:"آیتم",verb:"داشته باشد"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":{if(Array.isArray(e))return"آرایه";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"ورودی"};return e=>{switch(e.code){case"invalid_type":return`ورودی نامعتبر: می‌بایست ${e.expected} می‌بود، ${l(e.input)} دریافت شد`;case"invalid_value":return e.values.length===1?`ورودی نامعتبر: می‌بایست ${ne(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${A(e.values,"|")} می‌بود`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`خیلی بزرگ: ${e.origin??"مقدار"} باید ${t}${e.maximum.toString()} ${r.unit??"عنصر"} باشد`:`خیلی بزرگ: ${e.origin??"مقدار"} باید ${t}${e.maximum.toString()} باشد`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${t}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${t}${e.minimum.toString()} باشد`}case"invalid_format":{const t=e;return t.format==="starts_with"?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format==="ends_with"?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format==="includes"?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format==="regex"?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${i[t.format]??e.format} نامعتبر`}case"not_multiple_of":return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case"unrecognized_keys":return`کلید${e.keys.length>1?"های":""} ناشناس: ${A(e.keys,", ")}`;case"invalid_key":return`کلید ناشناس در ${e.origin}`;case"invalid_union":return"ورودی نامعتبر";case"invalid_element":return`مقدار نامعتبر در ${e.origin}`;default:return"ورودی نامعتبر"}}};function gl(){return{localeError:vl()}}const pl=()=>{const s={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 a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Virheellinen tyyppi: odotettiin ${e.expected}, oli ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Virheellinen syöte: täytyy olla ${ne(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${t}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${t}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format==="ends_with"?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format==="includes"?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format==="regex"?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${i[t.format]??e.format}`}case"not_multiple_of":return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case"unrecognized_keys":return`${e.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${A(e.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 hl(){return{localeError:pl()}}const yl=()=>{const s={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombre";case"object":{if(Array.isArray(e))return"tableau";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Entrée invalide : ${e.expected} attendu, ${l(e.input)} reçu`;case"invalid_value":return e.values.length===1?`Entrée invalide : ${ne(e.values[0])} attendu`:`Option invalide : une valeur parmi ${A(e.values,"|")} attendue`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Trop grand : ${e.origin??"valeur"} doit ${r.verb} ${t}${e.maximum.toString()} ${r.unit??"élément(s)"}`:`Trop grand : ${e.origin??"valeur"} doit être ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Trop petit : ${e.origin} doit ${r.verb} ${t}${e.minimum.toString()} ${r.unit}`:`Trop petit : ${e.origin} doit être ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format==="ends_with"?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format==="includes"?`Chaîne invalide : doit inclure "${t.includes}"`:t.format==="regex"?`Chaîne invalide : doit correspondre au modèle ${t.pattern}`:`${i[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${A(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`;default:return"Entrée invalide"}}};function bl(){return{localeError:yl()}}const $l=()=>{const s={string:{unit:"caractères",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"éléments",verb:"avoir"},set:{unit:"éléments",verb:"avoir"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Entrée invalide : attendu ${e.expected}, reçu ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Entrée invalide : attendu ${ne(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"≤":"<",r=a(e.origin);return r?`Trop grand : attendu que ${e.origin??"la valeur"} ait ${t}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??"la valeur"} soit ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?"≥":">",r=a(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${t}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format==="ends_with"?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format==="includes"?`Chaîne invalide : doit inclure "${t.includes}"`:t.format==="regex"?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${i[t.format]??e.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit être un multiple de ${e.divisor}`;case"unrecognized_keys":return`Clé${e.keys.length>1?"s":""} non reconnue${e.keys.length>1?"s":""} : ${A(e.keys,", ")}`;case"invalid_key":return`Clé invalide dans ${e.origin}`;case"invalid_union":return"Entrée invalide";case"invalid_element":return`Valeur invalide dans ${e.origin}`;default:return"Entrée invalide"}}};function kl(){return{localeError:$l()}}const wl=()=>{const s={string:{unit:"אותיות",verb:"לכלול"},file:{unit:"בייטים",verb:"לכלול"},array:{unit:"פריטים",verb:"לכלול"},set:{unit:"פריטים",verb:"לכלול"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"מחרוזת בבסיס 64",base64url:"מחרוזת בבסיס 64 לכתובות רשת",json_string:"מחרוזת JSON",e164:"מספר E.164",jwt:"JWT",template_literal:"קלט"};return e=>{switch(e.code){case"invalid_type":return`קלט לא תקין: צריך ${e.expected}, התקבל ${l(e.input)}`;case"invalid_value":return e.values.length===1?`קלט לא תקין: צריך ${ne(e.values[0])}`:`קלט לא תקין: צריך אחת מהאפשרויות ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`גדול מדי: ${e.origin??"value"} צריך להיות ${t}${e.maximum.toString()} ${r.unit??"elements"}`:`גדול מדי: ${e.origin??"value"} צריך להיות ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`קטן מדי: ${e.origin} צריך להיות ${t}${e.minimum.toString()} ${r.unit}`:`קטן מדי: ${e.origin} צריך להיות ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`מחרוזת לא תקינה: חייבת להתחיל ב"${t.prefix}"`:t.format==="ends_with"?`מחרוזת לא תקינה: חייבת להסתיים ב "${t.suffix}"`:t.format==="includes"?`מחרוזת לא תקינה: חייבת לכלול "${t.includes}"`:t.format==="regex"?`מחרוזת לא תקינה: חייבת להתאים לתבנית ${t.pattern}`:`${i[t.format]??e.format} לא תקין`}case"not_multiple_of":return`מספר לא תקין: חייב להיות מכפלה של ${e.divisor}`;case"unrecognized_keys":return`מפתח${e.keys.length>1?"ות":""} לא מזוה${e.keys.length>1?"ים":"ה"}: ${A(e.keys,", ")}`;case"invalid_key":return`מפתח לא תקין ב${e.origin}`;case"invalid_union":return"קלט לא תקין";case"invalid_element":return`ערך לא תקין ב${e.origin}`;default:return"קלט לא תקין"}}};function _l(){return{localeError:wl()}}const Sl=()=>{const s={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"szám";case"object":{if(Array.isArray(e))return"tömb";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Érvénytelen bemenet: a várt érték ${e.expected}, a kapott érték ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Érvénytelen bemenet: a várt érték ${ne(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Túl nagy: ${e.origin??"érték"} mérete túl nagy ${t}${e.maximum.toString()} ${r.unit??"elem"}`:`Túl nagy: a bemeneti érték ${e.origin??"érték"} túl nagy: ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${t}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format==="ends_with"?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format==="includes"?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format==="regex"?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${i[t.format]??e.format}`}case"not_multiple_of":return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${e.keys.length>1?"s":""}: ${A(e.keys,", ")}`;case"invalid_key":return`Érvénytelen kulcs ${e.origin}`;case"invalid_union":return"Érvénytelen bemenet";case"invalid_element":return`Érvénytelen érték: ${e.origin}`;default:return"Érvénytelen bemenet"}}};function Il(){return{localeError:Sl()}}const xl=()=>{const s={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Input tidak valid: diharapkan ${e.expected}, diterima ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Input tidak valid: diharapkan ${ne(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??"value"} memiliki ${t}${e.maximum.toString()} ${r.unit??"elemen"}`:`Terlalu besar: diharapkan ${e.origin??"value"} menjadi ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${t}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format==="ends_with"?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format==="includes"?`String tidak valid: harus menyertakan "${t.includes}"`:t.format==="regex"?`String tidak valid: harus sesuai pola ${t.pattern}`:`${i[t.format]??e.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${e.keys.length>1?"s":""}: ${A(e.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${e.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${e.origin}`;default:return"Input tidak valid"}}};function jl(){return{localeError:xl()}}const Ol=s=>{const a=typeof s;switch(a){case"number":return Number.isNaN(s)?"NaN":"númer";case"object":{if(Array.isArray(s))return"fylki";if(s===null)return"null";if(Object.getPrototypeOf(s)!==Object.prototype&&s.constructor)return s.constructor.name}}return a},Ul=()=>{const s={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 a(i){return s[i]??null}const l={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"};return i=>{switch(i.code){case"invalid_type":return`Rangt gildi: Þú slóst inn ${Ol(i.input)} þar sem á að vera ${i.expected}`;case"invalid_value":return i.values.length===1?`Rangt gildi: gert ráð fyrir ${ne(i.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${A(i.values,"|")}`;case"too_big":{const e=i.inclusive?"<=":"<",t=a(i.origin);return t?`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} hafi ${e}${i.maximum.toString()} ${t.unit??"hluti"}`:`Of stórt: gert er ráð fyrir að ${i.origin??"gildi"} sé ${e}${i.maximum.toString()}`}case"too_small":{const e=i.inclusive?">=":">",t=a(i.origin);return t?`Of lítið: gert er ráð fyrir að ${i.origin} hafi ${e}${i.minimum.toString()} ${t.unit}`:`Of lítið: gert er ráð fyrir að ${i.origin} sé ${e}${i.minimum.toString()}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`Ógildur strengur: verður að byrja á "${e.prefix}"`:e.format==="ends_with"?`Ógildur strengur: verður að enda á "${e.suffix}"`:e.format==="includes"?`Ógildur strengur: verður að innihalda "${e.includes}"`:e.format==="regex"?`Ógildur strengur: verður að fylgja mynstri ${e.pattern}`:`Rangt ${l[e.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"}: ${A(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 Dl(){return{localeError:Ul()}}const El=()=>{const s={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numero";case"object":{if(Array.isArray(e))return"vettore";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Input non valido: atteso ${e.expected}, ricevuto ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Input non valido: atteso ${ne(e.values[0])}`:`Opzione non valida: atteso uno tra ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Troppo grande: ${e.origin??"valore"} deve avere ${t}${e.maximum.toString()} ${r.unit??"elementi"}`:`Troppo grande: ${e.origin??"valore"} deve essere ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${t}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format==="ends_with"?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format==="includes"?`Stringa non valida: deve includere "${t.includes}"`:t.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Invalid ${i[t.format]??e.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case"unrecognized_keys":return`Chiav${e.keys.length>1?"i":"e"} non riconosciut${e.keys.length>1?"e":"a"}: ${A(e.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${e.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${e.origin}`;default:return"Input non valido"}}};function Nl(){return{localeError:El()}}const Tl=()=>{const s={string:{unit:"文字",verb:"である"},file:{unit:"バイト",verb:"である"},array:{unit:"要素",verb:"である"},set:{unit:"要素",verb:"である"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"数値";case"object":{if(Array.isArray(e))return"配列";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"入力値"};return e=>{switch(e.code){case"invalid_type":return`無効な入力: ${e.expected}が期待されましたが、${l(e.input)}が入力されました`;case"invalid_value":return e.values.length===1?`無効な入力: ${ne(e.values[0])}が期待されました`:`無効な選択: ${A(e.values,"、")}のいずれかである必要があります`;case"too_big":{const t=e.inclusive?"以下である":"より小さい",r=a(e.origin);return r?`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${r.unit??"要素"}${t}必要があります`:`大きすぎる値: ${e.origin??"値"}は${e.maximum.toString()}${t}必要があります`}case"too_small":{const t=e.inclusive?"以上である":"より大きい",r=a(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${t}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${t}必要があります`}case"invalid_format":{const t=e;return t.format==="starts_with"?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format==="ends_with"?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format==="includes"?`無効な文字列: "${t.includes}"を含む必要があります`:t.format==="regex"?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${i[t.format]??e.format}`}case"not_multiple_of":return`無効な数値: ${e.divisor}の倍数である必要があります`;case"unrecognized_keys":return`認識されていないキー${e.keys.length>1?"群":""}: ${A(e.keys,"、")}`;case"invalid_key":return`${e.origin}内の無効なキー`;case"invalid_union":return"無効な入力";case"invalid_element":return`${e.origin}内の無効な値`;default:return"無効な入力"}}};function Al(){return{localeError:Tl()}}const Pl=s=>{const a=typeof s;switch(a){case"number":return Number.isNaN(s)?"NaN":"რიცხვი";case"object":{if(Array.isArray(s))return"მასივი";if(s===null)return"null";if(Object.getPrototypeOf(s)!==Object.prototype&&s.constructor)return s.constructor.name}}return{string:"სტრინგი",boolean:"ბულეანი",undefined:"undefined",bigint:"bigint",symbol:"symbol",function:"ფუნქცია"}[a]??a},zl=()=>{const s={string:{unit:"სიმბოლო",verb:"უნდა შეიცავდეს"},file:{unit:"ბაიტი",verb:"უნდა შეიცავდეს"},array:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"},set:{unit:"ელემენტი",verb:"უნდა შეიცავდეს"}};function a(i){return s[i]??null}const l={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:"შეყვანა"};return i=>{switch(i.code){case"invalid_type":return`არასწორი შეყვანა: მოსალოდნელი ${i.expected}, მიღებული ${Pl(i.input)}`;case"invalid_value":return i.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${ne(i.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${A(i.values,"|")}-დან`;case"too_big":{const e=i.inclusive?"<=":"<",t=a(i.origin);return t?`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} ${t.verb} ${e}${i.maximum.toString()} ${t.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${i.origin??"მნიშვნელობა"} იყოს ${e}${i.maximum.toString()}`}case"too_small":{const e=i.inclusive?">=":">",t=a(i.origin);return t?`ზედმეტად პატარა: მოსალოდნელი ${i.origin} ${t.verb} ${e}${i.minimum.toString()} ${t.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${i.origin} იყოს ${e}${i.minimum.toString()}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`არასწორი სტრინგი: უნდა იწყებოდეს "${e.prefix}"-ით`:e.format==="ends_with"?`არასწორი სტრინგი: უნდა მთავრდებოდეს "${e.suffix}"-ით`:e.format==="includes"?`არასწორი სტრინგი: უნდა შეიცავდეს "${e.includes}"-ს`:e.format==="regex"?`არასწორი სტრინგი: უნდა შეესაბამებოდეს შაბლონს ${e.pattern}`:`არასწორი ${l[e.format]??i.format}`}case"not_multiple_of":return`არასწორი რიცხვი: უნდა იყოს ${i.divisor}-ის ჯერადი`;case"unrecognized_keys":return`უცნობი გასაღებ${i.keys.length>1?"ები":"ი"}: ${A(i.keys,", ")}`;case"invalid_key":return`არასწორი გასაღები ${i.origin}-ში`;case"invalid_union":return"არასწორი შეყვანა";case"invalid_element":return`არასწორი მნიშვნელობა ${i.origin}-ში`;default:return"არასწორი შეყვანა"}}};function Cl(){return{localeError:zl()}}const Ll=()=>{const s={string:{unit:"តួអក្សរ",verb:"គួរមាន"},file:{unit:"បៃ",verb:"គួរមាន"},array:{unit:"ធាតុ",verb:"គួរមាន"},set:{unit:"ធាតុ",verb:"គួរមាន"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"មិនមែនជាលេខ (NaN)":"លេខ";case"object":{if(Array.isArray(e))return"អារេ (Array)";if(e===null)return"គ្មានតម្លៃ (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"ទិន្នន័យបញ្ចូល"};return e=>{switch(e.code){case"invalid_type":return`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${e.expected} ប៉ុន្តែទទួលបាន ${l(e.input)}`;case"invalid_value":return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${ne(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${t} ${e.maximum.toString()} ${r.unit??"ធាតុ"}`:`ធំពេក៖ ត្រូវការ ${e.origin??"តម្លៃ"} ${t} ${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${t} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${t} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format==="ends_with"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format==="includes"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format==="regex"?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${i[t.format]??e.format}`}case"not_multiple_of":return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case"unrecognized_keys":return`រកឃើញសោមិនស្គាល់៖ ${A(e.keys,", ")}`;case"invalid_key":return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case"invalid_union":return"ទិន្នន័យមិនត្រឹមត្រូវ";case"invalid_element":return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return"ទិន្នន័យមិនត្រឹមត្រូវ"}}};function Gr(){return{localeError:Ll()}}function Zl(){return Gr()}const Fl=()=>{const s={string:{unit:"문자",verb:"to have"},file:{unit:"바이트",verb:"to have"},array:{unit:"개",verb:"to have"},set:{unit:"개",verb:"to have"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"입력"};return e=>{switch(e.code){case"invalid_type":return`잘못된 입력: 예상 타입은 ${e.expected}, 받은 타입은 ${l(e.input)}입니다`;case"invalid_value":return e.values.length===1?`잘못된 입력: 값은 ${ne(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${A(e.values,"또는 ")} 중 하나여야 합니다`;case"too_big":{const t=e.inclusive?"이하":"미만",r=t==="미만"?"이어야 합니다":"여야 합니다",p=a(e.origin),U=p?.unit??"요소";return p?`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()}${U} ${t}${r}`:`${e.origin??"값"}이 너무 큽니다: ${e.maximum.toString()} ${t}${r}`}case"too_small":{const t=e.inclusive?"이상":"초과",r=t==="이상"?"이어야 합니다":"여야 합니다",p=a(e.origin),U=p?.unit??"요소";return p?`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()}${U} ${t}${r}`:`${e.origin??"값"}이 너무 작습니다: ${e.minimum.toString()} ${t}${r}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format==="ends_with"?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format==="includes"?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format==="regex"?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${i[t.format]??e.format}`}case"not_multiple_of":return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case"unrecognized_keys":return`인식할 수 없는 키: ${A(e.keys,", ")}`;case"invalid_key":return`잘못된 키: ${e.origin}`;case"invalid_union":return"잘못된 입력";case"invalid_element":return`잘못된 값: ${e.origin}`;default:return"잘못된 입력"}}};function Ml(){return{localeError:Fl()}}const Rl=s=>ht(typeof s,s),ht=(s,a=void 0)=>{switch(s){case"number":return Number.isNaN(a)?"NaN":"skaičius";case"bigint":return"sveikasis skaičius";case"string":return"eilutė";case"boolean":return"loginė reikšmė";case"undefined":case"void":return"neapibrėžta reikšmė";case"function":return"funkcija";case"symbol":return"simbolis";case"object":return a===void 0?"nežinomas objektas":a===null?"nulinė reikšmė":Array.isArray(a)?"masyvas":Object.getPrototypeOf(a)!==Object.prototype&&a.constructor?a.constructor.name:"objektas";case"null":return"nulinė reikšmė"}return s},pt=s=>s.charAt(0).toUpperCase()+s.slice(1);function Jt(s){const a=Math.abs(s),l=a%10,i=a%100;return i>=11&&i<=19||l===0?"many":l===1?"one":"few"}const Jl=()=>{const s={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 a(i,e,t,r){const p=s[i]??null;return p===null?p:{unit:p.unit[e],verb:p.verb[r][t?"inclusive":"notInclusive"]}}const l={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"};return i=>{switch(i.code){case"invalid_type":return`Gautas tipas ${Rl(i.input)}, o tikėtasi - ${ht(i.expected)}`;case"invalid_value":return i.values.length===1?`Privalo būti ${ne(i.values[0])}`:`Privalo būti vienas iš ${A(i.values,"|")} pasirinkimų`;case"too_big":{const e=ht(i.origin),t=a(i.origin,Jt(Number(i.maximum)),i.inclusive??!1,"smaller");if(t?.verb)return`${pt(e??i.origin??"reikšmė")} ${t.verb} ${i.maximum.toString()} ${t.unit??"elementų"}`;const r=i.inclusive?"ne didesnis kaip":"mažesnis kaip";return`${pt(e??i.origin??"reikšmė")} turi būti ${r} ${i.maximum.toString()} ${t?.unit}`}case"too_small":{const e=ht(i.origin),t=a(i.origin,Jt(Number(i.minimum)),i.inclusive??!1,"bigger");if(t?.verb)return`${pt(e??i.origin??"reikšmė")} ${t.verb} ${i.minimum.toString()} ${t.unit??"elementų"}`;const r=i.inclusive?"ne mažesnis kaip":"didesnis kaip";return`${pt(e??i.origin??"reikšmė")} turi būti ${r} ${i.minimum.toString()} ${t?.unit}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`Eilutė privalo prasidėti "${e.prefix}"`:e.format==="ends_with"?`Eilutė privalo pasibaigti "${e.suffix}"`:e.format==="includes"?`Eilutė privalo įtraukti "${e.includes}"`:e.format==="regex"?`Eilutė privalo atitikti ${e.pattern}`:`Neteisingas ${l[e.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"}: ${A(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga įvestis";case"invalid_element":{const e=ht(i.origin);return`${pt(e??i.origin??"reikšmė")} turi klaidingą įvestį`}default:return"Klaidinga įvestis"}}};function Bl(){return{localeError:Jl()}}const Wl=()=>{const s={string:{unit:"знаци",verb:"да имаат"},file:{unit:"бајти",verb:"да имаат"},array:{unit:"ставки",verb:"да имаат"},set:{unit:"ставки",verb:"да имаат"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"број";case"object":{if(Array.isArray(e))return"низа";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"внес"};return e=>{switch(e.code){case"invalid_type":return`Грешен внес: се очекува ${e.expected}, примено ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Invalid input: expected ${ne(e.values[0])}`:`Грешана опција: се очекува една ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Премногу голем: се очекува ${e.origin??"вредноста"} да има ${t}${e.maximum.toString()} ${r.unit??"елементи"}`:`Премногу голем: се очекува ${e.origin??"вредноста"} да биде ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${t}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format==="ends_with"?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format==="includes"?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format==="regex"?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${i[t.format]??e.format}`}case"not_multiple_of":return`Грешен број: мора да биде делив со ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Непрепознаени клучеви":"Непрепознаен клуч"}: ${A(e.keys,", ")}`;case"invalid_key":return`Грешен клуч во ${e.origin}`;case"invalid_union":return"Грешен внес";case"invalid_element":return`Грешна вредност во ${e.origin}`;default:return"Грешен внес"}}};function Gl(){return{localeError:Wl()}}const ql=()=>{const s={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nombor";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Input tidak sah: dijangka ${e.expected}, diterima ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Input tidak sah: dijangka ${ne(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Terlalu besar: dijangka ${e.origin??"nilai"} ${r.verb} ${t}${e.maximum.toString()} ${r.unit??"elemen"}`:`Terlalu besar: dijangka ${e.origin??"nilai"} adalah ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${t}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format==="includes"?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${i[t.format]??e.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${A(e.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${e.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${e.origin}`;default:return"Input tidak sah"}}};function Kl(){return{localeError:ql()}}const Vl=()=>{const s={string:{unit:"tekens"},file:{unit:"bytes"},array:{unit:"elementen"},set:{unit:"elementen"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"getal";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Ongeldige invoer: verwacht ${e.expected}, ontving ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Ongeldige invoer: verwacht ${ne(e.values[0])}`:`Ongeldige optie: verwacht één van ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Te lang: verwacht dat ${e.origin??"waarde"} ${t}${e.maximum.toString()} ${r.unit??"elementen"} bevat`:`Te lang: verwacht dat ${e.origin??"waarde"} ${t}${e.maximum.toString()} is`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Te kort: verwacht dat ${e.origin} ${t}${e.minimum.toString()} ${r.unit} bevat`:`Te kort: verwacht dat ${e.origin} ${t}${e.minimum.toString()} is`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format==="ends_with"?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format==="includes"?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${i[t.format]??e.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${e.keys.length>1?"s":""}: ${A(e.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${e.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${e.origin}`;default:return"Ongeldige invoer"}}};function Xl(){return{localeError:Vl()}}const Hl=()=>{const s={string:{unit:"tegn",verb:"å ha"},file:{unit:"bytes",verb:"å ha"},array:{unit:"elementer",verb:"å inneholde"},set:{unit:"elementer",verb:"å inneholde"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"tall";case"object":{if(Array.isArray(e))return"liste";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Ugyldig input: forventet ${e.expected}, fikk ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Ugyldig verdi: forventet ${ne(e.values[0])}`:`Ugyldig valg: forventet en av ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`For stor(t): forventet ${e.origin??"value"} til å ha ${t}${e.maximum.toString()} ${r.unit??"elementer"}`:`For stor(t): forventet ${e.origin??"value"} til å ha ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${t}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Ugyldig streng: må starte med "${t.prefix}"`:t.format==="ends_with"?`Ugyldig streng: må ende med "${t.suffix}"`:t.format==="includes"?`Ugyldig streng: må inneholde "${t.includes}"`:t.format==="regex"?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${i[t.format]??e.format}`}case"not_multiple_of":return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Ukjente nøkler":"Ukjent nøkkel"}: ${A(e.keys,", ")}`;case"invalid_key":return`Ugyldig nøkkel i ${e.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${e.origin}`;default:return"Ugyldig input"}}};function Yl(){return{localeError:Hl()}}const Ql=()=>{const s={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 a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"numara";case"object":{if(Array.isArray(e))return"saf";if(e===null)return"gayb";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Fâsit giren: umulan ${e.expected}, alınan ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Fâsit giren: umulan ${ne(e.values[0])}`:`Fâsit tercih: mûteberler ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Fazla büyük: ${e.origin??"value"}, ${t}${e.maximum.toString()} ${r.unit??"elements"} sahip olmalıydı.`:`Fazla büyük: ${e.origin??"value"}, ${t}${e.maximum.toString()} olmalıydı.`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Fazla küçük: ${e.origin}, ${t}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${t}${e.minimum.toString()} olmalıydı.`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format==="ends_with"?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format==="includes"?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format==="regex"?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${i[t.format]??e.format}`}case"not_multiple_of":return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case"unrecognized_keys":return`Tanınmayan anahtar ${e.keys.length>1?"s":""}: ${A(e.keys,", ")}`;case"invalid_key":return`${e.origin} için tanınmayan anahtar var.`;case"invalid_union":return"Giren tanınamadı.";case"invalid_element":return`${e.origin} için tanınmayan kıymet var.`;default:return"Kıymet tanınamadı."}}};function ed(){return{localeError:Ql()}}const td=()=>{const s={string:{unit:"توکي",verb:"ولري"},file:{unit:"بایټس",verb:"ولري"},array:{unit:"توکي",verb:"ولري"},set:{unit:"توکي",verb:"ولري"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"عدد";case"object":{if(Array.isArray(e))return"ارې";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"ورودي"};return e=>{switch(e.code){case"invalid_type":return`ناسم ورودي: باید ${e.expected} وای, مګر ${l(e.input)} ترلاسه شو`;case"invalid_value":return e.values.length===1?`ناسم ورودي: باید ${ne(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${A(e.values,"|")} څخه وای`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`ډیر لوی: ${e.origin??"ارزښت"} باید ${t}${e.maximum.toString()} ${r.unit??"عنصرونه"} ولري`:`ډیر لوی: ${e.origin??"ارزښت"} باید ${t}${e.maximum.toString()} وي`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${t}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${t}${e.minimum.toString()} وي`}case"invalid_format":{const t=e;return t.format==="starts_with"?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format==="ends_with"?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format==="includes"?`ناسم متن: باید "${t.includes}" ولري`:t.format==="regex"?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${i[t.format]??e.format} ناسم دی`}case"not_multiple_of":return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case"unrecognized_keys":return`ناسم ${e.keys.length>1?"کلیډونه":"کلیډ"}: ${A(e.keys,", ")}`;case"invalid_key":return`ناسم کلیډ په ${e.origin} کې`;case"invalid_union":return"ناسمه ورودي";case"invalid_element":return`ناسم عنصر په ${e.origin} کې`;default:return"ناسمه ورودي"}}};function rd(){return{localeError:td()}}const nd=()=>{const s={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 a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"liczba";case"object":{if(Array.isArray(e))return"tablica";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Nieprawidłowe dane wejściowe: oczekiwano ${e.expected}, otrzymano ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${ne(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${t}${e.maximum.toString()} ${r.unit??"elementów"}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??"wartość"} będzie mieć ${t}${e.minimum.toString()} ${r.unit??"elementów"}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??"wartość"} będzie wynosić ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format==="ends_with"?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format==="includes"?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format==="regex"?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${i[t.format]??e.format}`}case"not_multiple_of":return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${e.keys.length>1?"s":""}: ${A(e.keys,", ")}`;case"invalid_key":return`Nieprawidłowy klucz w ${e.origin}`;case"invalid_union":return"Nieprawidłowe dane wejściowe";case"invalid_element":return`Nieprawidłowa wartość w ${e.origin}`;default:return"Nieprawidłowe dane wejściowe"}}};function id(){return{localeError:nd()}}const ad=()=>{const s={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"número";case"object":{if(Array.isArray(e))return"array";if(e===null)return"nulo";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Tipo inválido: esperado ${e.expected}, recebido ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Entrada inválida: esperado ${ne(e.values[0])}`:`Opção inválida: esperada uma das ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Muito grande: esperado que ${e.origin??"valor"} tivesse ${t}${e.maximum.toString()} ${r.unit??"elementos"}`:`Muito grande: esperado que ${e.origin??"valor"} fosse ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Muito pequeno: esperado que ${e.origin} tivesse ${t}${e.minimum.toString()} ${r.unit}`:`Muito pequeno: esperado que ${e.origin} fosse ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Texto inválido: deve começar com "${t.prefix}"`:t.format==="ends_with"?`Texto inválido: deve terminar com "${t.suffix}"`:t.format==="includes"?`Texto inválido: deve incluir "${t.includes}"`:t.format==="regex"?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`${i[t.format]??e.format} inválido`}case"not_multiple_of":return`Número inválido: deve ser múltiplo de ${e.divisor}`;case"unrecognized_keys":return`Chave${e.keys.length>1?"s":""} desconhecida${e.keys.length>1?"s":""}: ${A(e.keys,", ")}`;case"invalid_key":return`Chave inválida em ${e.origin}`;case"invalid_union":return"Entrada inválida";case"invalid_element":return`Valor inválido em ${e.origin}`;default:return"Campo inválido"}}};function od(){return{localeError:ad()}}function Bt(s,a,l,i){const e=Math.abs(s),t=e%10,r=e%100;return r>=11&&r<=19?i:t===1?a:t>=2&&t<=4?l:i}const sd=()=>{const s={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 a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":{if(Array.isArray(e))return"массив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"ввод"};return e=>{switch(e.code){case"invalid_type":return`Неверный ввод: ожидалось ${e.expected}, получено ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Неверный ввод: ожидалось ${ne(e.values[0])}`:`Неверный вариант: ожидалось одно из ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);if(r){const p=Number(e.maximum),U=Bt(p,r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет иметь ${t}${e.maximum.toString()} ${U}`}return`Слишком большое значение: ожидалось, что ${e.origin??"значение"} будет ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);if(r){const p=Number(e.minimum),U=Bt(p,r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${t}${e.minimum.toString()} ${U}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format==="ends_with"?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format==="includes"?`Неверная строка: должна содержать "${t.includes}"`:t.format==="regex"?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${i[t.format]??e.format}`}case"not_multiple_of":return`Неверное число: должно быть кратным ${e.divisor}`;case"unrecognized_keys":return`Нераспознанн${e.keys.length>1?"ые":"ый"} ключ${e.keys.length>1?"и":""}: ${A(e.keys,", ")}`;case"invalid_key":return`Неверный ключ в ${e.origin}`;case"invalid_union":return"Неверные входные данные";case"invalid_element":return`Неверное значение в ${e.origin}`;default:return"Неверные входные данные"}}};function ud(){return{localeError:sd()}}const cd=()=>{const s={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"število";case"object":{if(Array.isArray(e))return"tabela";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Neveljaven vnos: pričakovano ${e.expected}, prejeto ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Neveljaven vnos: pričakovano ${ne(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} imelo ${t}${e.maximum.toString()} ${r.unit??"elementov"}`:`Preveliko: pričakovano, da bo ${e.origin??"vrednost"} ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${t}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format==="ends_with"?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format==="includes"?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${i[t.format]??e.format}`}case"not_multiple_of":return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case"unrecognized_keys":return`Neprepoznan${e.keys.length>1?"i ključi":" ključ"}: ${A(e.keys,", ")}`;case"invalid_key":return`Neveljaven ključ v ${e.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${e.origin}`;default:return"Neveljaven vnos"}}};function ld(){return{localeError:cd()}}const dd=()=>{const s={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 a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"antal";case"object":{if(Array.isArray(e))return"lista";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Ogiltig inmatning: förväntat ${e.expected}, fick ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Ogiltig inmatning: förväntat ${ne(e.values[0])}`:`Ogiltigt val: förväntade en av ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`För stor(t): förväntade ${e.origin??"värdet"} att ha ${t}${e.maximum.toString()} ${r.unit??"element"}`:`För stor(t): förväntat ${e.origin??"värdet"} att ha ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`För lite(t): förväntade ${e.origin??"värdet"} att ha ${t}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??"värdet"} att ha ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format==="ends_with"?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format==="includes"?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format==="regex"?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${i[t.format]??e.format}`}case"not_multiple_of":return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case"unrecognized_keys":return`${e.keys.length>1?"Okända nycklar":"Okänd nyckel"}: ${A(e.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${e.origin??"värdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt värde i ${e.origin??"värdet"}`;default:return"Ogiltig input"}}};function fd(){return{localeError:dd()}}const md=()=>{const s={string:{unit:"எழுத்துக்கள்",verb:"கொண்டிருக்க வேண்டும்"},file:{unit:"பைட்டுகள்",verb:"கொண்டிருக்க வேண்டும்"},array:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"},set:{unit:"உறுப்புகள்",verb:"கொண்டிருக்க வேண்டும்"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"எண் அல்லாதது":"எண்";case"object":{if(Array.isArray(e))return"அணி";if(e===null)return"வெறுமை";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${e.expected}, பெறப்பட்டது ${l(e.input)}`;case"invalid_value":return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${ne(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${A(e.values,"|")} இல் ஒன்று`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${t}${e.maximum.toString()} ${r.unit??"உறுப்புகள்"} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??"மதிப்பு"} ${t}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${t}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${t}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case"invalid_format":{const t=e;return t.format==="starts_with"?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format==="ends_with"?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format==="includes"?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format==="regex"?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${i[t.format]??e.format}`}case"not_multiple_of":return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case"unrecognized_keys":return`அடையாளம் தெரியாத விசை${e.keys.length>1?"கள்":""}: ${A(e.keys,", ")}`;case"invalid_key":return`${e.origin} இல் தவறான விசை`;case"invalid_union":return"தவறான உள்ளீடு";case"invalid_element":return`${e.origin} இல் தவறான மதிப்பு`;default:return"தவறான உள்ளீடு"}}};function vd(){return{localeError:md()}}const gd=()=>{const s={string:{unit:"ตัวอักษร",verb:"ควรมี"},file:{unit:"ไบต์",verb:"ควรมี"},array:{unit:"รายการ",verb:"ควรมี"},set:{unit:"รายการ",verb:"ควรมี"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"ไม่ใช่ตัวเลข (NaN)":"ตัวเลข";case"object":{if(Array.isArray(e))return"อาร์เรย์ (Array)";if(e===null)return"ไม่มีค่า (null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"ข้อมูลที่ป้อน"};return e=>{switch(e.code){case"invalid_type":return`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${e.expected} แต่ได้รับ ${l(e.input)}`;case"invalid_value":return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${ne(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"ไม่เกิน":"น้อยกว่า",r=a(e.origin);return r?`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${t} ${e.maximum.toString()} ${r.unit??"รายการ"}`:`เกินกำหนด: ${e.origin??"ค่า"} ควรมี${t} ${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?"อย่างน้อย":"มากกว่า",r=a(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${t} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${t} ${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format==="ends_with"?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format==="includes"?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format==="regex"?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${i[t.format]??e.format}`}case"not_multiple_of":return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case"unrecognized_keys":return`พบคีย์ที่ไม่รู้จัก: ${A(e.keys,", ")}`;case"invalid_key":return`คีย์ไม่ถูกต้องใน ${e.origin}`;case"invalid_union":return"ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้";case"invalid_element":return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return"ข้อมูลไม่ถูกต้อง"}}};function pd(){return{localeError:gd()}}const hd=s=>{const a=typeof s;switch(a){case"number":return Number.isNaN(s)?"NaN":"number";case"object":{if(Array.isArray(s))return"array";if(s===null)return"null";if(Object.getPrototypeOf(s)!==Object.prototype&&s.constructor)return s.constructor.name}}return a},yd=()=>{const s={string:{unit:"karakter",verb:"olmalı"},file:{unit:"bayt",verb:"olmalı"},array:{unit:"öğe",verb:"olmalı"},set:{unit:"öğe",verb:"olmalı"}};function a(i){return s[i]??null}const l={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"};return i=>{switch(i.code){case"invalid_type":return`Geçersiz değer: beklenen ${i.expected}, alınan ${hd(i.input)}`;case"invalid_value":return i.values.length===1?`Geçersiz değer: beklenen ${ne(i.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${A(i.values,"|")}`;case"too_big":{const e=i.inclusive?"<=":"<",t=a(i.origin);return t?`Çok büyük: beklenen ${i.origin??"değer"} ${e}${i.maximum.toString()} ${t.unit??"öğe"}`:`Çok büyük: beklenen ${i.origin??"değer"} ${e}${i.maximum.toString()}`}case"too_small":{const e=i.inclusive?">=":">",t=a(i.origin);return t?`Çok küçük: beklenen ${i.origin} ${e}${i.minimum.toString()} ${t.unit}`:`Çok küçük: beklenen ${i.origin} ${e}${i.minimum.toString()}`}case"invalid_format":{const e=i;return e.format==="starts_with"?`Geçersiz metin: "${e.prefix}" ile başlamalı`:e.format==="ends_with"?`Geçersiz metin: "${e.suffix}" ile bitmeli`:e.format==="includes"?`Geçersiz metin: "${e.includes}" içermeli`:e.format==="regex"?`Geçersiz metin: ${e.pattern} desenine uymalı`:`Geçersiz ${l[e.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":""}: ${A(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 bd(){return{localeError:yd()}}const $d=()=>{const s={string:{unit:"символів",verb:"матиме"},file:{unit:"байтів",verb:"матиме"},array:{unit:"елементів",verb:"матиме"},set:{unit:"елементів",verb:"матиме"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"число";case"object":{if(Array.isArray(e))return"масив";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"вхідні дані"};return e=>{switch(e.code){case"invalid_type":return`Неправильні вхідні дані: очікується ${e.expected}, отримано ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Неправильні вхідні дані: очікується ${ne(e.values[0])}`:`Неправильна опція: очікується одне з ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Занадто велике: очікується, що ${e.origin??"значення"} ${r.verb} ${t}${e.maximum.toString()} ${r.unit??"елементів"}`:`Занадто велике: очікується, що ${e.origin??"значення"} буде ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${t}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format==="ends_with"?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format==="includes"?`Неправильний рядок: повинен містити "${t.includes}"`:t.format==="regex"?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${i[t.format]??e.format}`}case"not_multiple_of":return`Неправильне число: повинно бути кратним ${e.divisor}`;case"unrecognized_keys":return`Нерозпізнаний ключ${e.keys.length>1?"і":""}: ${A(e.keys,", ")}`;case"invalid_key":return`Неправильний ключ у ${e.origin}`;case"invalid_union":return"Неправильні вхідні дані";case"invalid_element":return`Неправильне значення у ${e.origin}`;default:return"Неправильні вхідні дані"}}};function qr(){return{localeError:$d()}}function kd(){return qr()}const wd=()=>{const s={string:{unit:"حروف",verb:"ہونا"},file:{unit:"بائٹس",verb:"ہونا"},array:{unit:"آئٹمز",verb:"ہونا"},set:{unit:"آئٹمز",verb:"ہونا"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"نمبر";case"object":{if(Array.isArray(e))return"آرے";if(e===null)return"نل";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"ان پٹ"};return e=>{switch(e.code){case"invalid_type":return`غلط ان پٹ: ${e.expected} متوقع تھا، ${l(e.input)} موصول ہوا`;case"invalid_value":return e.values.length===1?`غلط ان پٹ: ${ne(e.values[0])} متوقع تھا`:`غلط آپشن: ${A(e.values,"|")} میں سے ایک متوقع تھا`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`بہت بڑا: ${e.origin??"ویلیو"} کے ${t}${e.maximum.toString()} ${r.unit??"عناصر"} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??"ویلیو"} کا ${t}${e.maximum.toString()} ہونا متوقع تھا`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${t}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${t}${e.minimum.toString()} ہونا متوقع تھا`}case"invalid_format":{const t=e;return t.format==="starts_with"?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format==="ends_with"?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format==="includes"?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format==="regex"?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${i[t.format]??e.format}`}case"not_multiple_of":return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case"unrecognized_keys":return`غیر تسلیم شدہ کی${e.keys.length>1?"ز":""}: ${A(e.keys,"، ")}`;case"invalid_key":return`${e.origin} میں غلط کی`;case"invalid_union":return"غلط ان پٹ";case"invalid_element":return`${e.origin} میں غلط ویلیو`;default:return"غلط ان پٹ"}}};function _d(){return{localeError:wd()}}const Sd=()=>{const s={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 a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"số";case"object":{if(Array.isArray(e))return"mảng";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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"};return e=>{switch(e.code){case"invalid_type":return`Đầu vào không hợp lệ: mong đợi ${e.expected}, nhận được ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${ne(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Quá lớn: mong đợi ${e.origin??"giá trị"} ${r.verb} ${t}${e.maximum.toString()} ${r.unit??"phần tử"}`:`Quá lớn: mong đợi ${e.origin??"giá trị"} ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${t}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format==="ends_with"?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format==="includes"?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format==="regex"?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${i[t.format]??e.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 ${e.divisor}`;case"unrecognized_keys":return`Khóa không được nhận dạng: ${A(e.keys,", ")}`;case"invalid_key":return`Khóa không hợp lệ trong ${e.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 ${e.origin}`;default:return"Đầu vào không hợp lệ"}}};function Id(){return{localeError:Sd()}}const xd=()=>{const s={string:{unit:"字符",verb:"包含"},file:{unit:"字节",verb:"包含"},array:{unit:"项",verb:"包含"},set:{unit:"项",verb:"包含"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"非数字(NaN)":"数字";case"object":{if(Array.isArray(e))return"数组";if(e===null)return"空值(null)";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"输入"};return e=>{switch(e.code){case"invalid_type":return`无效输入:期望 ${e.expected},实际接收 ${l(e.input)}`;case"invalid_value":return e.values.length===1?`无效输入:期望 ${ne(e.values[0])}`:`无效选项:期望以下之一 ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`数值过大:期望 ${e.origin??"值"} ${t}${e.maximum.toString()} ${r.unit??"个元素"}`:`数值过大:期望 ${e.origin??"值"} ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`数值过小:期望 ${e.origin} ${t}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`无效字符串:必须以 "${t.prefix}" 开头`:t.format==="ends_with"?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format==="includes"?`无效字符串:必须包含 "${t.includes}"`:t.format==="regex"?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${i[t.format]??e.format}`}case"not_multiple_of":return`无效数字:必须是 ${e.divisor} 的倍数`;case"unrecognized_keys":return`出现未知的键(key): ${A(e.keys,", ")}`;case"invalid_key":return`${e.origin} 中的键(key)无效`;case"invalid_union":return"无效输入";case"invalid_element":return`${e.origin} 中包含无效值(value)`;default:return"无效输入"}}};function jd(){return{localeError:xd()}}const Od=()=>{const s={string:{unit:"字元",verb:"擁有"},file:{unit:"位元組",verb:"擁有"},array:{unit:"項目",verb:"擁有"},set:{unit:"項目",verb:"擁有"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"number";case"object":{if(Array.isArray(e))return"array";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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:"輸入"};return e=>{switch(e.code){case"invalid_type":return`無效的輸入值:預期為 ${e.expected},但收到 ${l(e.input)}`;case"invalid_value":return e.values.length===1?`無效的輸入值:預期為 ${ne(e.values[0])}`:`無效的選項:預期為以下其中之一 ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`數值過大:預期 ${e.origin??"值"} 應為 ${t}${e.maximum.toString()} ${r.unit??"個元素"}`:`數值過大:預期 ${e.origin??"值"} 應為 ${t}${e.maximum.toString()}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${t}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${t}${e.minimum.toString()}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format==="ends_with"?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format==="includes"?`無效的字串:必須包含 "${t.includes}"`:t.format==="regex"?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${i[t.format]??e.format}`}case"not_multiple_of":return`無效的數字:必須為 ${e.divisor} 的倍數`;case"unrecognized_keys":return`無法識別的鍵值${e.keys.length>1?"們":""}:${A(e.keys,"、")}`;case"invalid_key":return`${e.origin} 中有無效的鍵值`;case"invalid_union":return"無效的輸入值";case"invalid_element":return`${e.origin} 中有無效的值`;default:return"無效的輸入值"}}};function Ud(){return{localeError:Od()}}const Dd=()=>{const s={string:{unit:"àmi",verb:"ní"},file:{unit:"bytes",verb:"ní"},array:{unit:"nkan",verb:"ní"},set:{unit:"nkan",verb:"ní"}};function a(e){return s[e]??null}const l=e=>{const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":"nọ́mbà";case"object":{if(Array.isArray(e))return"akopọ";if(e===null)return"null";if(Object.getPrototypeOf(e)!==Object.prototype&&e.constructor)return e.constructor.name}}return t},i={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é"};return e=>{switch(e.code){case"invalid_type":return`Ìbáwọlé aṣìṣe: a ní láti fi ${e.expected}, àmọ̀ a rí ${l(e.input)}`;case"invalid_value":return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${ne(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${A(e.values,"|")}`;case"too_big":{const t=e.inclusive?"<=":"<",r=a(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??"iye"} ${r.verb} ${t}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${t}${e.maximum}`}case"too_small":{const t=e.inclusive?">=":">",r=a(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${t}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${t}${e.minimum}`}case"invalid_format":{const t=e;return t.format==="starts_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format==="ends_with"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format==="includes"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format==="regex"?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${i[t.format]??e.format}`}case"not_multiple_of":return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case"unrecognized_keys":return`Bọtìnì àìmọ̀: ${A(e.keys,", ")}`;case"invalid_key":return`Bọtìnì aṣìṣe nínú ${e.origin}`;case"invalid_union":return"Ìbáwọlé aṣìṣe";case"invalid_element":return`Iye aṣìṣe nínú ${e.origin}`;default:return"Ìbáwọlé aṣìṣe"}}};function Ed(){return{localeError:Dd()}}const Kr=Object.freeze(Object.defineProperty({__proto__:null,ar:Kc,az:Xc,be:Yc,ca:el,cs:rl,da:il,de:ol,en:Wr,eo:dl,es:ml,fa:gl,fi:hl,fr:bl,frCA:kl,he:_l,hu:Il,id:jl,is:Dl,it:Nl,ja:Al,ka:Cl,kh:Zl,km:Gr,ko:Ml,lt:Bl,mk:Gl,ms:Kl,nl:Xl,no:Yl,ota:ed,pl:id,ps:rd,pt:od,ru:ud,sl:ld,sv:fd,ta:vd,th:pd,tr:bd,ua:kd,uk:qr,ur:_d,vi:Id,yo:Ed,zhCN:jd,zhTW:Ud},Symbol.toStringTag,{value:"Module"}));class At{constructor(a){this.counter=0,this.metadataRegistry=a?.metadata??zt,this.target=a?.target??"draft-2020-12",this.unrepresentable=a?.unrepresentable??"throw",this.override=a?.override??(()=>{}),this.io=a?.io??"output",this.seen=new Map}process(a,l={path:[],schemaPath:[]}){var i;const e=a._zod.def,t={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},r=this.seen.get(a);if(r)return r.count++,l.schemaPath.includes(a)&&(r.cycle=l.path),r.schema;const p={schema:{},count:1,cycle:void 0,path:l.path};this.seen.set(a,p);const U=a._zod.toJSONSchema?.();if(U)p.schema=U;else{const k={...l,schemaPath:[...l.schemaPath,a],path:l.path},_=a._zod.parent;if(_)p.ref=_,this.process(_,k),this.seen.get(_).isParent=!0;else{const $=p.schema;switch(e.type){case"string":{const y=$;y.type="string";const{minimum:D,maximum:C,format:X,patterns:N,contentEncoding:O}=a._zod.bag;if(typeof D=="number"&&(y.minLength=D),typeof C=="number"&&(y.maxLength=C),X&&(y.format=t[X]??X,y.format===""&&delete y.format),O&&(y.contentEncoding=O),N&&N.size>0){const K=[...N];K.length===1?y.pattern=K[0].source:K.length>1&&(p.schema.allOf=[...K.map(R=>({...this.target==="draft-7"||this.target==="draft-4"||this.target==="openapi-3.0"?{type:"string"}:{},pattern:R.source}))])}break}case"number":{const y=$,{minimum:D,maximum:C,format:X,multipleOf:N,exclusiveMaximum:O,exclusiveMinimum:K}=a._zod.bag;typeof X=="string"&&X.includes("int")?y.type="integer":y.type="number",typeof K=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(y.minimum=K,y.exclusiveMinimum=!0):y.exclusiveMinimum=K),typeof D=="number"&&(y.minimum=D,typeof K=="number"&&this.target!=="draft-4"&&(K>=D?delete y.minimum:delete y.exclusiveMinimum)),typeof O=="number"&&(this.target==="draft-4"||this.target==="openapi-3.0"?(y.maximum=O,y.exclusiveMaximum=!0):y.exclusiveMaximum=O),typeof C=="number"&&(y.maximum=C,typeof O=="number"&&this.target!=="draft-4"&&(O<=C?delete y.maximum:delete y.exclusiveMaximum)),typeof N=="number"&&(y.multipleOf=N);break}case"boolean":{const y=$;y.type="boolean";break}case"bigint":{if(this.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema");break}case"symbol":{if(this.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema");break}case"null":{this.target==="openapi-3.0"?($.type="string",$.nullable=!0,$.enum=[null]):$.type="null";break}case"any":break;case"unknown":break;case"undefined":{if(this.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema");break}case"void":{if(this.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema");break}case"never":{$.not={};break}case"date":{if(this.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema");break}case"array":{const y=$,{minimum:D,maximum:C}=a._zod.bag;typeof D=="number"&&(y.minItems=D),typeof C=="number"&&(y.maxItems=C),y.type="array",y.items=this.process(e.element,{...k,path:[...k.path,"items"]});break}case"object":{const y=$;y.type="object",y.properties={};const D=e.shape;for(const N in D)y.properties[N]=this.process(D[N],{...k,path:[...k.path,"properties",N]});const C=new Set(Object.keys(D)),X=new Set([...C].filter(N=>{const O=e.shape[N]._zod;return this.io==="input"?O.optin===void 0:O.optout===void 0}));X.size>0&&(y.required=Array.from(X)),e.catchall?._zod.def.type==="never"?y.additionalProperties=!1:e.catchall?e.catchall&&(y.additionalProperties=this.process(e.catchall,{...k,path:[...k.path,"additionalProperties"]})):this.io==="output"&&(y.additionalProperties=!1);break}case"union":{const y=$,D=e.options.map((C,X)=>this.process(C,{...k,path:[...k.path,"anyOf",X]}));y.anyOf=D;break}case"intersection":{const y=$,D=this.process(e.left,{...k,path:[...k.path,"allOf",0]}),C=this.process(e.right,{...k,path:[...k.path,"allOf",1]}),X=O=>"allOf"in O&&Object.keys(O).length===1,N=[...X(D)?D.allOf:[D],...X(C)?C.allOf:[C]];y.allOf=N;break}case"tuple":{const y=$;y.type="array";const D=this.target==="draft-2020-12"?"prefixItems":"items",C=this.target==="draft-2020-12"||this.target==="openapi-3.0"?"items":"additionalItems",X=e.items.map((R,I)=>this.process(R,{...k,path:[...k.path,D,I]})),N=e.rest?this.process(e.rest,{...k,path:[...k.path,C,...this.target==="openapi-3.0"?[e.items.length]:[]]}):null;this.target==="draft-2020-12"?(y.prefixItems=X,N&&(y.items=N)):this.target==="openapi-3.0"?(y.items={anyOf:X},N&&y.items.anyOf.push(N),y.minItems=X.length,N||(y.maxItems=X.length)):(y.items=X,N&&(y.additionalItems=N));const{minimum:O,maximum:K}=a._zod.bag;typeof O=="number"&&(y.minItems=O),typeof K=="number"&&(y.maxItems=K);break}case"record":{const y=$;y.type="object",(this.target==="draft-7"||this.target==="draft-2020-12")&&(y.propertyNames=this.process(e.keyType,{...k,path:[...k.path,"propertyNames"]})),y.additionalProperties=this.process(e.valueType,{...k,path:[...k.path,"additionalProperties"]});break}case"map":{if(this.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema");break}case"set":{if(this.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema");break}case"enum":{const y=$,D=tn(e.entries);D.every(C=>typeof C=="number")&&(y.type="number"),D.every(C=>typeof C=="string")&&(y.type="string"),y.enum=D;break}case"literal":{const y=$,D=[];for(const C of e.values)if(C===void 0){if(this.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof C=="bigint"){if(this.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");D.push(Number(C))}else D.push(C);if(D.length!==0)if(D.length===1){const C=D[0];y.type=C===null?"null":typeof C,this.target==="draft-4"||this.target==="openapi-3.0"?y.enum=[C]:y.const=C}else D.every(C=>typeof C=="number")&&(y.type="number"),D.every(C=>typeof C=="string")&&(y.type="string"),D.every(C=>typeof C=="boolean")&&(y.type="string"),D.every(C=>C===null)&&(y.type="null"),y.enum=D;break}case"file":{const y=$,D={type:"string",format:"binary",contentEncoding:"binary"},{minimum:C,maximum:X,mime:N}=a._zod.bag;C!==void 0&&(D.minLength=C),X!==void 0&&(D.maxLength=X),N?N.length===1?(D.contentMediaType=N[0],Object.assign(y,D)):y.anyOf=N.map(O=>({...D,contentMediaType:O})):Object.assign(y,D);break}case"transform":{if(this.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema");break}case"nullable":{const y=this.process(e.innerType,k);this.target==="openapi-3.0"?(p.ref=e.innerType,$.nullable=!0):$.anyOf=[y,{type:"null"}];break}case"nonoptional":{this.process(e.innerType,k),p.ref=e.innerType;break}case"success":{const y=$;y.type="boolean";break}case"default":{this.process(e.innerType,k),p.ref=e.innerType,$.default=JSON.parse(JSON.stringify(e.defaultValue));break}case"prefault":{this.process(e.innerType,k),p.ref=e.innerType,this.io==="input"&&($._prefault=JSON.parse(JSON.stringify(e.defaultValue)));break}case"catch":{this.process(e.innerType,k),p.ref=e.innerType;let y;try{y=e.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}$.default=y;break}case"nan":{if(this.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema");break}case"template_literal":{const y=$,D=a._zod.pattern;if(!D)throw new Error("Pattern not found in template literal");y.type="string",y.pattern=D.source;break}case"pipe":{const y=this.io==="input"?e.in._zod.def.type==="transform"?e.out:e.in:e.out;this.process(y,k),p.ref=y;break}case"readonly":{this.process(e.innerType,k),p.ref=e.innerType,$.readOnly=!0;break}case"promise":{this.process(e.innerType,k),p.ref=e.innerType;break}case"optional":{this.process(e.innerType,k),p.ref=e.innerType;break}case"lazy":{const y=a._zod.innerType;this.process(y,k),p.ref=y;break}case"custom":{if(this.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema");break}case"function":{if(this.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema");break}}}}const z=this.metadataRegistry.get(a);return z&&Object.assign(p.schema,z),this.io==="input"&&Ne(a)&&(delete p.schema.examples,delete p.schema.default),this.io==="input"&&p.schema._prefault&&((i=p.schema).default??(i.default=p.schema._prefault)),delete p.schema._prefault,this.seen.get(a).schema}emit(a,l){const i={cycles:l?.cycles??"ref",reused:l?.reused??"inline",external:l?.external??void 0},e=this.seen.get(a);if(!e)throw new Error("Unprocessed schema. This is a bug in Zod.");const t=Z=>{const k=this.target==="draft-2020-12"?"$defs":"definitions";if(i.external){const D=i.external.registry.get(Z[0])?.id,C=i.external.uri??(N=>N);if(D)return{ref:C(D)};const X=Z[1].defId??Z[1].schema.id??`schema${this.counter++}`;return Z[1].defId=X,{defId:X,ref:`${C("__shared")}#/${k}/${X}`}}if(Z[1]===e)return{ref:"#"};const $=`#/${k}/`,y=Z[1].schema.id??`__schema${this.counter++}`;return{defId:y,ref:$+y}},r=Z=>{if(Z[1].schema.$ref)return;const k=Z[1],{ref:_,defId:$}=t(Z);k.def={...k.schema},$&&(k.defId=$);const y=k.schema;for(const D in y)delete y[D];y.$ref=_};if(i.cycles==="throw")for(const Z of this.seen.entries()){const k=Z[1];if(k.cycle)throw new Error(`Cycle detected: #/${k.cycle?.join("/")}/<root>
2
-
3
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const Z of this.seen.entries()){const k=Z[1];if(a===Z[0]){r(Z);continue}if(i.external){const $=i.external.registry.get(Z[0])?.id;if(a!==Z[0]&&$){r(Z);continue}}if(this.metadataRegistry.get(Z[0])?.id){r(Z);continue}if(k.cycle){r(Z);continue}if(k.count>1&&i.reused==="ref"){r(Z);continue}}const p=(Z,k)=>{const _=this.seen.get(Z),$=_.def??_.schema,y={...$};if(_.ref===null)return;const D=_.ref;if(_.ref=null,D){p(D,k);const C=this.seen.get(D).schema;C.$ref&&(k.target==="draft-7"||k.target==="draft-4"||k.target==="openapi-3.0")?($.allOf=$.allOf??[],$.allOf.push(C)):(Object.assign($,C),Object.assign($,y))}_.isParent||this.override({zodSchema:Z,jsonSchema:$,path:_.path??[]})};for(const Z of[...this.seen.entries()].reverse())p(Z[0],{target:this.target});const U={};if(this.target==="draft-2020-12"?U.$schema="https://json-schema.org/draft/2020-12/schema":this.target==="draft-7"?U.$schema="http://json-schema.org/draft-07/schema#":this.target==="draft-4"?U.$schema="http://json-schema.org/draft-04/schema#":this.target==="openapi-3.0"||console.warn(`Invalid target: ${this.target}`),i.external?.uri){const Z=i.external.registry.get(a)?.id;if(!Z)throw new Error("Schema is missing an `id` property");U.$id=i.external.uri(Z)}Object.assign(U,e.def);const z=i.external?.defs??{};for(const Z of this.seen.entries()){const k=Z[1];k.def&&k.defId&&(z[k.defId]=k.def)}i.external||Object.keys(z).length>0&&(this.target==="draft-2020-12"?U.$defs=z:U.definitions=z);try{return JSON.parse(JSON.stringify(U))}catch{throw new Error("Error converting schema to JSON.")}}}function Vr(s,a){if(s instanceof qt){const i=new At(a),e={};for(const p of s._idmap.entries()){const[U,z]=p;i.process(z)}const t={},r={registry:s,uri:a?.uri,defs:e};for(const p of s._idmap.entries()){const[U,z]=p;t[U]=i.emit(z,{...a,external:r})}if(Object.keys(e).length>0){const p=i.target==="draft-2020-12"?"$defs":"definitions";t.__shared={[p]:e}}return{schemas:t}}const l=new At(a);return l.process(s),l.emit(s,a)}function Ne(s,a){const l=a??{seen:new Set};if(l.seen.has(s))return!1;l.seen.add(s);const e=s._zod.def;switch(e.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":return!1;case"array":return Ne(e.element,l);case"object":{for(const t in e.shape)if(Ne(e.shape[t],l))return!0;return!1}case"union":{for(const t of e.options)if(Ne(t,l))return!0;return!1}case"intersection":return Ne(e.left,l)||Ne(e.right,l);case"tuple":{for(const t of e.items)if(Ne(t,l))return!0;return!!(e.rest&&Ne(e.rest,l))}case"record":return Ne(e.keyType,l)||Ne(e.valueType,l);case"map":return Ne(e.keyType,l)||Ne(e.valueType,l);case"set":return Ne(e.valueType,l);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":return Ne(e.innerType,l);case"lazy":return Ne(e.getter(),l);case"default":return Ne(e.innerType,l);case"prefault":return Ne(e.innerType,l);case"custom":return!1;case"transform":return!0;case"pipe":return Ne(e.in,l)||Ne(e.out,l);case"success":return!1;case"catch":return!1;case"function":return!1}throw new Error(`Unknown schema type: ${e.type}`)}const Nd=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"})),Td=Object.freeze(Object.defineProperty({__proto__:null,$ZodAny:rn,$ZodArray:nn,$ZodAsyncError:an,$ZodBase64:on,$ZodBase64URL:sn,$ZodBigInt:un,$ZodBigIntFormat:cn,$ZodBoolean:ln,$ZodCIDRv4:dn,$ZodCIDRv6:fn,$ZodCUID:mn,$ZodCUID2:vn,$ZodCatch:gn,$ZodCheck:pn,$ZodCheckBigIntFormat:hn,$ZodCheckEndsWith:yn,$ZodCheckGreaterThan:bn,$ZodCheckIncludes:$n,$ZodCheckLengthEquals:kn,$ZodCheckLessThan:wn,$ZodCheckLowerCase:_n,$ZodCheckMaxLength:Sn,$ZodCheckMaxSize:In,$ZodCheckMimeType:xn,$ZodCheckMinLength:jn,$ZodCheckMinSize:On,$ZodCheckMultipleOf:Un,$ZodCheckNumberFormat:Dn,$ZodCheckOverwrite:En,$ZodCheckProperty:Nn,$ZodCheckRegex:Tn,$ZodCheckSizeEquals:An,$ZodCheckStartsWith:Pn,$ZodCheckStringFormat:zn,$ZodCheckUpperCase:Cn,$ZodCodec:Ln,$ZodCustom:Zn,$ZodCustomStringFormat:Fn,$ZodDate:Mn,$ZodDefault:Rn,$ZodDiscriminatedUnion:Jn,$ZodE164:Bn,$ZodEmail:Wn,$ZodEmoji:Gn,$ZodEncodeError:qn,$ZodEnum:Kn,$ZodError:Vn,$ZodFile:Xn,$ZodFunction:Hn,$ZodGUID:Yn,$ZodIPv4:Qn,$ZodIPv6:ei,$ZodISODate:ti,$ZodISODateTime:ri,$ZodISODuration:ni,$ZodISOTime:ii,$ZodIntersection:ai,$ZodJWT:oi,$ZodKSUID:si,$ZodLazy:ui,$ZodLiteral:ci,$ZodMap:li,$ZodNaN:di,$ZodNanoID:fi,$ZodNever:mi,$ZodNonOptional:vi,$ZodNull:gi,$ZodNullable:pi,$ZodNumber:hi,$ZodNumberFormat:yi,$ZodObject:bi,$ZodObjectJIT:$i,$ZodOptional:ki,$ZodPipe:wi,$ZodPrefault:_i,$ZodPromise:Si,$ZodReadonly:Ii,$ZodRealError:xi,$ZodRecord:ji,$ZodRegistry:qt,$ZodSet:Oi,$ZodString:Ui,$ZodStringFormat:Di,$ZodSuccess:Ei,$ZodSymbol:Ni,$ZodTemplateLiteral:Ti,$ZodTransform:Ai,$ZodTuple:Pi,$ZodType:zi,$ZodULID:Ci,$ZodURL:Li,$ZodUUID:Zi,$ZodUndefined:Fi,$ZodUnion:Mi,$ZodUnknown:Ri,$ZodVoid:Ji,$ZodXID:Bi,$brand:Kt,$constructor:Wi,$input:Vt,$output:Xt,Doc:Gi,JSONSchema:Nd,JSONSchemaGenerator:At,NEVER:Ht,TimePrecision:Yt,_any:qi,_array:Ki,_base64:Vi,_base64url:Xi,_bigint:Hi,_boolean:Yi,_catch:Qi,_check:ea,_cidrv4:ta,_cidrv6:ra,_coercedBigint:Qt,_coercedBoolean:er,_coercedDate:tr,_coercedNumber:rr,_coercedString:nr,_cuid:na,_cuid2:ia,_custom:aa,_date:oa,_decode:sa,_decodeAsync:ua,_default:ca,_discriminatedUnion:la,_e164:da,_email:fa,_emoji:ma,_encode:va,_encodeAsync:ga,_endsWith:ir,_enum:pa,_file:ha,_float32:ya,_float64:ba,_gt:ar,_gte:Ut,_guid:$a,_includes:or,_int:ka,_int32:wa,_int64:_a,_intersection:Sa,_ipv4:Ia,_ipv6:xa,_isoDate:ja,_isoDateTime:Oa,_isoDuration:Ua,_isoTime:Da,_jwt:Ea,_ksuid:Na,_lazy:Ta,_length:sr,_literal:Aa,_lowercase:ur,_lt:cr,_lte:Dt,_map:Pa,_max:Dt,_maxLength:lr,_maxSize:dr,_mime:fr,_min:Ut,_minLength:mr,_minSize:vr,_multipleOf:gr,_nan:za,_nanoid:Ca,_nativeEnum:La,_negative:pr,_never:Za,_nonnegative:hr,_nonoptional:Fa,_nonpositive:yr,_normalize:br,_null:Ma,_nullable:Ra,_number:Ja,_optional:Ba,_overwrite:$r,_parse:Wa,_parseAsync:Ga,_pipe:qa,_positive:kr,_promise:Ka,_property:wr,_readonly:Va,_record:Xa,_refine:Ha,_regex:_r,_safeDecode:Ya,_safeDecodeAsync:Qa,_safeEncode:eo,_safeEncodeAsync:to,_safeParse:ro,_safeParseAsync:no,_set:io,_size:Sr,_startsWith:Ir,_string:ao,_stringFormat:oo,_stringbool:so,_success:uo,_superRefine:co,_symbol:lo,_templateLiteral:fo,_toLowerCase:xr,_toUpperCase:jr,_transform:mo,_trim:Or,_tuple:vo,_uint32:go,_uint64:po,_ulid:ho,_undefined:yo,_union:bo,_unknown:$o,_uppercase:Ur,_url:ko,_uuid:wo,_uuidv4:_o,_uuidv6:So,_uuidv7:Io,_void:xo,_xid:jo,clone:Dr,config:yt,decode:Oo,decodeAsync:Uo,encode:Do,encodeAsync:Eo,flattenError:Er,formatError:Nr,globalConfig:No,globalRegistry:zt,isValidBase64:To,isValidBase64URL:Ao,isValidJWT:Po,locales:Kr,parse:zo,parseAsync:Co,prettifyError:Tr,regexes:Ar,registry:Pr,safeDecode:Lo,safeDecodeAsync:Zo,safeEncode:Fo,safeEncodeAsync:Mo,safeParse:Ro,safeParseAsync:Jo,toDotPath:Bo,toJSONSchema:Vr,treeifyError:zr,util:Cr,version:Wo},Symbol.toStringTag,{value:"Module"})),Ad={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 Pd(s){yt({customError:s})}function zd(){return yt().customError}var Pt;Pt||(Pt={});function Cd(s){return nr(Lr,s)}function Ld(s){return rr(Zr,s)}function Zd(s){return er(Fr,s)}function Fd(s){return Qt(Mr,s)}function Md(s){return tr(Rr,s)}const Rd=Object.freeze(Object.defineProperty({__proto__:null,bigint:Fd,boolean:Zd,date:Md,number:Ld,string:Cd},Symbol.toStringTag,{value:"Module"}));yt(Wr());const T=Object.freeze(Object.defineProperty({__proto__:null,$brand:Kt,$input:Vt,$output:Xt,NEVER:Ht,TimePrecision:Yt,ZodAny:Go,ZodArray:qo,ZodBase64:Ko,ZodBase64URL:Vo,ZodBigInt:Mr,ZodBigIntFormat:Xo,ZodBoolean:Fr,ZodCIDRv4:Ho,ZodCIDRv6:Yo,ZodCUID:Qo,ZodCUID2:es,ZodCatch:ts,ZodCodec:rs,ZodCustom:ns,ZodCustomStringFormat:is,ZodDate:Rr,ZodDefault:as,ZodDiscriminatedUnion:os,ZodE164:ss,ZodEmail:us,ZodEmoji:cs,ZodEnum:ls,ZodError:ds,ZodFile:fs,get ZodFirstPartyTypeKind(){return Pt},ZodFunction:ms,ZodGUID:vs,ZodIPv4:gs,ZodIPv6:ps,ZodISODate:hs,ZodISODateTime:ys,ZodISODuration:bs,ZodISOTime:$s,ZodIntersection:ks,ZodIssueCode:Ad,ZodJWT:ws,ZodKSUID:_s,ZodLazy:Ss,ZodLiteral:Is,ZodMap:xs,ZodNaN:js,ZodNanoID:Os,ZodNever:Us,ZodNonOptional:Ds,ZodNull:Es,ZodNullable:Ns,ZodNumber:Zr,ZodNumberFormat:Ts,ZodObject:As,ZodOptional:Ps,ZodPipe:zs,ZodPrefault:Cs,ZodPromise:Ls,ZodReadonly:Zs,ZodRealError:Fs,ZodRecord:Ms,ZodSet:Rs,ZodString:Lr,ZodStringFormat:Js,ZodSuccess:Bs,ZodSymbol:Ws,ZodTemplateLiteral:Gs,ZodTransform:qs,ZodTuple:Ks,ZodType:Vs,ZodULID:Xs,ZodURL:Hs,ZodUUID:Ys,ZodUndefined:Qs,ZodUnion:eu,ZodUnknown:tu,ZodVoid:ru,ZodXID:nu,_ZodString:iu,_default:au,_function:Ft,any:ou,array:su,base64:uu,base64url:cu,bigint:lu,boolean:Et,catch:du,check:fu,cidrv4:mu,cidrv6:vu,clone:Dr,codec:gu,coerce:Rd,config:yt,core:Td,cuid:pu,cuid2:hu,custom:yu,date:bu,decode:$u,decodeAsync:ku,discriminatedUnion:wu,e164:_u,email:Su,emoji:Iu,encode:xu,encodeAsync:ju,endsWith:ir,enum:Jr,file:Ou,flattenError:Er,float32:Uu,float64:Du,formatError:Nr,function:Ft,getErrorMap:zd,globalRegistry:zt,gt:ar,gte:Ut,guid:Eu,hash:Nu,hex:Tu,hostname:Au,httpUrl:Pu,includes:or,instanceof:zu,int:Cu,int32:Lu,int64:Zu,intersection:Fu,ipv4:Mu,ipv6:Ru,iso:Ju,json:Bu,jwt:Wu,keyof:Gu,ksuid:qu,lazy:Ku,length:sr,literal:Vu,locales:Kr,looseObject:Xu,lowercase:ur,lt:cr,lte:Dt,map:Hu,maxLength:lr,maxSize:dr,mime:fr,minLength:mr,minSize:vr,multipleOf:gr,nan:Yu,nanoid:Qu,nativeEnum:ec,negative:pr,never:tc,nonnegative:hr,nonoptional:rc,nonpositive:yr,normalize:br,null:nc,nullable:ic,nullish:ac,number:Br,object:Nt,optional:oc,overwrite:$r,parse:sc,parseAsync:uc,partialRecord:cc,pipe:lc,positive:kr,prefault:dc,preprocess:fc,prettifyError:Tr,promise:mc,property:wr,readonly:vc,record:gc,refine:pc,regex:_r,regexes:Ar,registry:Pr,safeDecode:hc,safeDecodeAsync:yc,safeEncode:bc,safeEncodeAsync:$c,safeParse:kc,safeParseAsync:wc,set:_c,setErrorMap:Pd,size:Sr,startsWith:Ir,strictObject:Sc,string:Tt,stringFormat:Ic,stringbool:xc,success:jc,superRefine:Oc,symbol:Uc,templateLiteral:Dc,toJSONSchema:Vr,toLowerCase:xr,toUpperCase:jr,transform:Ec,treeifyError:zr,trim:Or,tuple:Nc,uint32:Tc,uint64:Ac,ulid:Pc,undefined:zc,union:Cc,unknown:Lc,uppercase:Ur,url:Zc,util:Cr,uuid:Fc,uuidv4:Mc,uuidv6:Rc,uuidv7:Jc,void:Bc,xid:Wc},Symbol.toStringTag,{value:"Module"})),et=Nt({name:Tt(),selector:Tt(),findBy:Jr(["cssSelector","xpath"]),option:Nt({waitForSelector:Et().optional(),waitSelectorTimeout:Br().optional(),multiple:Et().optional()})}),Jd=T.object({type:T.literal("object"),shape:T.record(T.string(),T.any())}),Bd=T.object({type:T.literal("array"),items:T.any()}),Wd=T.discriminatedUnion("type",[Jd,Bd]),Gd=T.object({name:T.literal("ai-parse-data"),sourceData:T.any().optional(),schemaDefinition:Wd,prompt:T.string().optional(),model:T.string().optional(),apiKey:T.string().min(1,"OpenAI API key is required")});function qd(s){return Gd.parse(s)}async function Kd(s){try{const{sourceData:a,schemaDefinition:l,prompt:i,model:e="gpt-4o-mini",apiKey:t}=s;if(a==null)throw new Error("sourceData is required for ai-parse-data block");if(!t||t.trim()==="")throw new Error("apiKey is required for ai-parse-data block");const r=await chrome.runtime.sendMessage({type:"AI_PARSE_DATA",data:{sourceData:a,schemaDefinition:l,prompt:i,model:e,apiKey:t}});if(r.$isError)throw new Error(r.message||"AI parsing failed");return{data:r.data}}catch(a){return{hasError:!0,message:a instanceof Error?a.message:"Unknown error in ai-parse-data handler",data:null}}}class xt{async waitForElement(a,l,i){return new Promise(e=>{const t=Date.now(),r=async()=>{const p=await this.find(a,l);if(p&&(!Array.isArray(p)||p.length>0)){e(p);return}if(Date.now()-t>=i){e(null);return}setTimeout(r,100)};r()})}}class Vd extends xt{async find(a,l=document){const{selector:i,option:e}=a,{multiple:t=!1}=e||{};try{const r=this.processCustomPseudoSelectors(i,l);return t?Array.from(l.querySelectorAll(r)):l.querySelector(r)}catch(r){return console.error("CSS Selector error:",r),null}}processCustomPseudoSelectors(a,l){return/:contains\(['"]([^'"]*)['"]\)/g.test(a)?(this.markElementsWithText(l),a.replace(/:contains\(['"]([^'"]*)['"]\)/g,(t,r)=>`[data-contains="${r}"]`)):/:equal\(['"]([^'"]*)['"]\)/g.test(a)?(this.markElementsWithText(l),a.replace(/:equal\(['"]([^'"]*)['"]\)/g,(t,r)=>`[data-equal="${r}"]`)):a}markElementsWithText(a){a.querySelectorAll("*").forEach(i=>{const e=i.textContent?.trim()||"";if(e){i.setAttribute("data-contains",e);const r=Array.from(i.childNodes).filter(p=>p.nodeType===Node.TEXT_NODE).map(p=>p.textContent?.trim()||"").join(" ").trim();(r&&r===e||i.children.length===0&&e)&&i.setAttribute("data-equal",e)}})}}class Xd extends xt{async find(a,l=document){const{selector:i,option:e}=a,{multiple:t=!1}=e||{};if(!i||i.trim()==="")return null;const r=i.split("|>").map(z=>z.trim());if(r.length!==2)return null;const p=r[0],U=r[1];if(!p||!U)return null;try{const z=l.querySelector(p);if(!z||!z.contentDocument)return null;const Z=z.contentDocument;return t?Array.from(Z.querySelectorAll(U)):Z.querySelector(U)}catch(z){return console.error("Iframe Selector error:",z),null}}}class Hd extends xt{async find(a,l=document){const{selector:i,option:e}=a,{multiple:t=!1}=e||{};if(!i||i.trim()==="")return null;const r=i.split(">>").map(U=>U.trim());let p=l;try{for(let U=0;U<r.length;U++){const z=r[U],Z=U===r.length-1;if(!z)return null;if(Z&&t)return Array.from(p.querySelectorAll(z));const k=p.querySelector(z);if(!k)return null;if(Z)return k;if(k.shadowRoot)p=k.shadowRoot;else return null}}catch(U){return console.error("Shadow DOM Selector error:",U),null}return null}}class Yd extends xt{async find(a,l=document){const{selector:i,option:e}=a,{multiple:t=!1}=e||{};try{const r=l.evaluate(i,l,null,t?XPathResult.ORDERED_NODE_SNAPSHOT_TYPE:XPathResult.FIRST_ORDERED_NODE_TYPE,null);if(t){const p=[];for(let U=0;U<r.snapshotLength;U++){const z=r.snapshotItem(U);z&&z.nodeType===Node.ELEMENT_NODE&&p.push(z)}return Promise.resolve(p.length>0?p:null)}else{const p=r.singleNodeValue;return p&&p.nodeType===Node.ELEMENT_NODE?p:null}}catch(r){return console.error("XPath error:",r),null}}}class Qd{static generate(a){const l=["data-testid","aria-label","title","alt","role"];for(const t of l){const r=a.getAttribute(t);if(r&&!this.isDynamicValue(r))return`[${t}="${CSS.escape(r)}"]`}const i=a.tagName.toLowerCase(),e=a.parentElement;if(e){const t=Array.from(e.children),r=t.indexOf(a)+1;if(t.length>1)return`${i}:nth-child(${r})`}if(e){const t=this.generateParentSelector(e);if(t)return`${t} > ${i}:nth-child(${Array.from(e.children).indexOf(a)+1})`}return i}static generateParentSelector(a){const l=a.tagName.toLowerCase(),i=["data-testid","aria-label","title","alt","role"];for(const t of i){const r=a.getAttribute(t);if(r&&!this.isDynamicValue(r))return`[${t}="${CSS.escape(r)}"]`}const e=a.parentElement;if(e){const t=Array.from(e.children),r=t.indexOf(a)+1;if(t.length>1)return`${l}:nth-child(${r})`}return l}static isDynamicValue(a){return[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,/^\d{13}$/,/^[a-zA-Z0-9]{16,}$/,/^[a-zA-Z0-9]+-\d+$/].some(i=>i.test(a))}}async function Ye(s,a=document){const{selector:l,findBy:i="cssSelector",option:e}=s,{waitForSelector:t=!1,waitSelectorTimeout:r=5e3}=e||{},p=ef(l,i);return t?p.waitForElement(s,a,r):p.find(s,a)}function ef(s,a){return a==="xpath"?new Yd:s.includes(">>")?new Hd:s.includes("|>")?new Xd:new Vd}const tf=et.extend({name:T.literal("get-text"),includeTags:T.boolean().optional(),useTextContent:T.boolean().optional(),regex:T.string().optional(),prefixText:T.string().optional(),suffixText:T.string().optional(),filterEmpty:T.boolean().optional(),scrollToCollect:T.boolean().optional(),scrollDistance:T.number().optional(),scrollWaitMs:T.number().optional(),maxScrollAttempts:T.number().optional()});function rf(s){return tf.parse(s)}async function nf(s){try{const{selector:a="",includeTags:l=!1,useTextContent:i=!1,regex:e,prefixText:t="",suffixText:r="",findBy:p="cssSelector",option:U,filterEmpty:z=!0,scrollToCollect:Z=!1,scrollDistance:k=500,scrollWaitMs:_=300,maxScrollAttempts:$=100}=s;if(!a)throw new Error("Selector is required for get-text block");if(Z&&U?.multiple)return await af({selector:a,findBy:p,option:U,includeTags:l,useTextContent:i,regex:e,prefixText:t,suffixText:r,filterEmpty:z,scrollDistance:k,scrollWaitMs:_,maxScrollAttempts:$});const y=await Ye({selector:a,findBy:p,option:U});if(!y)return{data:""};const D=Xr(l,i,e,t,r);if(Array.isArray(y)){const C=y.map(D);return{data:z?C.filter(N=>N.trim()!==""):C}}else return{data:D(y)}}catch(a){return{hasError:!0,message:a instanceof Error?a.message:"Unknown error in get-text handler",data:""}}}async function af(s){const{selector:a,findBy:l,option:i,includeTags:e,useTextContent:t,regex:r,prefixText:p,suffixText:U,filterEmpty:z,scrollDistance:Z,scrollWaitMs:k,maxScrollAttempts:_}=s,$=Xr(e,t,r,p,U),y=new Set;let D=0,C=0;const X=5;for(;D<_;){const N=await Ye({selector:a,findBy:l,option:i});if(N&&Array.isArray(N)){const R=y.size;if(N.forEach(J=>{const W=$(J);(!z||W.trim()!=="")&&y.add(W)}),y.size===R){if(C++,C>=X)break}else C=0}const O=window.pageYOffset||document.documentElement.scrollTop;if(window.scrollBy({top:Z,behavior:"auto"}),await new Promise(R=>setTimeout(R,k)),(window.pageYOffset||document.documentElement.scrollTop)===O)break;D++}return{data:Array.from(y)}}function Xr(s,a,l,i="",e=""){return t=>{let r="";if(s?r=t.innerHTML:r=a?t.textContent||"":t.innerText||"",l){const p=new RegExp(l,"g"),U=r.match(p);r=U?U.join(" "):""}return r.trim()&&(r=i+r.trim()+e),r}}const of=et.extend({name:T.literal("attribute-value"),attributeName:T.string()});function sf(s){return of.parse(s)}async function uf(s){try{const{selector:a="",attributeName:l,findBy:i="cssSelector",option:e}=s;if(!a)throw new Error("Selector is required for attribute-value block");if(!l)throw new Error("Attribute name is required for attribute-value block");const t=await Ye({selector:a,findBy:i,option:e});return t?{data:Array.isArray(t)?t.map(p=>p.getAttribute(l)).filter(p=>p!==null):t.getAttribute(l)}:{data:null}}catch(a){return{hasError:!0,message:a instanceof Error?a.message:"Unknown error in attribute-value handler",data:null}}}const cf=et.extend({name:T.literal("get-value-form"),type:T.enum(["text-field","select","checkbox"]).optional()});function lf(s){return cf.parse(s)}async function df(s){try{const{selector:a="",type:l="text-field",findBy:i="cssSelector"}=s;if(!a)throw new Error("Selector is required for get-value-form block");const e=await Ye({selector:a,findBy:i,option:s.option});if(!e)throw new Error("Form element not found");return{data:ff(e,l)}}catch(a){return{hasError:!0,message:a instanceof Error?a.message:"Unknown error in get-value-form handler",data:null}}}function ff(s,a){switch(a){case"text-field":if(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)return s.value;break;case"select":if(s instanceof HTMLSelectElement)return s.value;break;case"checkbox":if(s instanceof HTMLInputElement&&s.type==="checkbox")return s.checked;break;default:throw new Error(`Unsupported form element type: ${a}`)}throw new Error(`Invalid element type for ${a}`)}const mf=et.extend({name:T.literal("set-value-form"),setValue:T.string(),type:T.enum(["text-field","select","checkbox"]).optional()});function vf(s){return mf.parse(s)}async function gf(s){try{const{selector:a="",setValue:l,type:i="text-field",findBy:e="cssSelector"}=s;if(!a)throw new Error("Selector is required for set-value-form block");const t=await Ye({selector:a,findBy:e,option:s.option});if(!t)throw new Error("Form element not found");return pf(t,l,i),{data:"Form element updated successfully"}}catch(a){return{hasError:!0,message:a instanceof Error?a.message:"Unknown error in set-value-form handler",data:null}}}function pf(s,a,l){switch(l){case"text-field":(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&(s.value=a,s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})));break;case"select":s instanceof HTMLSelectElement&&(s.value=a,s.dispatchEvent(new Event("change",{bubbles:!0})));break;case"checkbox":s instanceof HTMLInputElement&&s.type==="checkbox"&&(s.checked=a==="true"||a==="checked",s.dispatchEvent(new Event("change",{bubbles:!0})));break;default:throw new Error(`Unsupported form element type: ${l}`)}}const hf=et.extend({name:T.literal("clear-value-form"),type:T.enum(["text-field","select","checkbox"]).optional()});function yf(s){return hf.parse(s)}async function bf(s){try{const{selector:a="",type:l="text-field",findBy:i="cssSelector"}=s;if(!a)throw new Error("Selector is required for clear-value-form block");const e=await Ye({selector:a,findBy:i,option:s.option});if(!e)throw new Error("Form element not found");return $f(e,l),{data:"Form element cleared successfully"}}catch(a){return{hasError:!0,message:a instanceof Error?a.message:"Unknown error in clear-value-form handler",data:null}}}function $f(s,a){switch(a){case"text-field":(s instanceof HTMLInputElement||s instanceof HTMLTextAreaElement)&&(s.value="",s.dispatchEvent(new Event("input",{bubbles:!0})),s.dispatchEvent(new Event("change",{bubbles:!0})));break;case"select":s instanceof HTMLSelectElement&&(s.selectedIndex=0,s.dispatchEvent(new Event("change",{bubbles:!0})));break;case"checkbox":s instanceof HTMLInputElement&&s.type==="checkbox"&&(s.checked=!1,s.dispatchEvent(new Event("change",{bubbles:!0})));break;default:throw new Error(`Unsupported form element type: ${a}`)}}const kf=et.extend({name:T.literal("element-exists")});function wf(s){return kf.parse(s)}async function _f(s){try{const{selector:a="",findBy:l="cssSelector",option:i}=s;if(!a)throw new Error("Selector is required for element-exists block");return{data:await Ye({selector:a,findBy:l,option:i})!==null}}catch(a){return{hasError:!0,message:a instanceof Error?a.message:"Unknown error in element-exists handler",data:null}}}const Sf=et.extend({name:T.literal("event-click"),textFilter:T.object({text:T.union([T.string(),T.array(T.string())]),mode:T.enum(["exact","contains","startsWith","endsWith","regex"])}).optional()});function If(s){return Sf.parse(s)}async function xf(s){try{const{selector:a="",findBy:l="cssSelector",option:i,textFilter:e}=s;if(!a)throw new Error("Selector is required for event-click block");const t=await Ye({selector:a,findBy:l,option:i});if(!t)throw new Error("Element not found for clicking");let r;if(Array.isArray(t))if(e){const p=jf(t,e.text,e.mode);if(!p){const U=Array.isArray(e.text)?e.text.join(", "):e.text;throw new Error(`No element found with text filter: "${U}" (mode: ${e.mode})`)}r=p}else r=t[0];else r=t;return await Uf(r),{data:!0}}catch(a){return console.log(a),{hasError:!0,message:a instanceof Error?a.message:"Unknown error in event-click handler",data:!1}}}function jf(s,a,l){for(const i of s){const e=Of(i),t=Array.isArray(a)?a:[a];for(const r of t){let p=!1;switch(l){case"exact":p=e===r;break;case"contains":p=e.includes(r);break;case"startsWith":p=e.startsWith(r);break;case"endsWith":p=e.endsWith(r);break;case"regex":try{p=new RegExp(r).test(e)}catch{console.warn("Invalid regex pattern:",r);continue}break}if(p)return i}}return null}function Of(s){if(s.innerText)return s.innerText.trim();if(s.textContent)return s.textContent.trim();if(s instanceof HTMLInputElement&&s.value)return s.value.trim();const a=s.getAttribute("placeholder");if(a)return a.trim();const l=s.getAttribute("title");if(l)return l.trim();const i=s.getAttribute("aria-label");return i?i.trim():""}async function Uf(s){s.scrollIntoView({behavior:"instant",block:"center",inline:"center"}),await new Promise(e=>setTimeout(e,50)),s.focus&&s.focus();const a=s.getBoundingClientRect(),l=a.left+a.width/2,i=a.top+a.height/2;try{const e=await chrome.runtime.sendMessage({type:"CDP_CLICK",data:{x:l,y:i}});if(e&&!e.$isError)console.log("[EventClick] CDP click successful:",e);else throw new Error(e?.message||"CDP click failed")}catch(e){console.error("[EventClick] CDP click failed, falling back to native click:",e),s.click&&s.click()}await new Promise(e=>setTimeout(e,50))}const Df=T.object({name:T.literal("keypress"),key:T.string(),code:T.string().optional(),keyCode:T.number().optional(),modifiers:T.array(T.enum(["Alt","Control","Meta","Shift"])).optional()});function Ef(s){return Df.parse(s)}async function Nf(s){try{const{key:a,code:l,keyCode:i,modifiers:e=[]}=s;return await Tf(a,l,i,e),{data:!0}}catch(a){return console.log(a),{hasError:!0,message:a instanceof Error?a.message:"Unknown error in keypress handler",data:!1}}}async function Tf(s,a,l,i=[]){try{const e=await chrome.runtime.sendMessage({type:"CDP_KEYPRESS",data:{key:s,code:a||s,keyCode:l||jt(s),modifiers:i}});if(e&&!e.$isError)console.log("[Keypress] CDP keypress successful:",e);else throw new Error(e?.message||"CDP keypress failed")}catch(e){console.error("[Keypress] CDP keypress failed, falling back to native dispatch:",e);const t=new KeyboardEvent("keydown",{key:s,code:a||s,keyCode:l||jt(s),bubbles:!0,cancelable:!0,...Wt(i)}),r=new KeyboardEvent("keyup",{key:s,code:a||s,keyCode:l||jt(s),bubbles:!0,cancelable:!0,...Wt(i)});document.dispatchEvent(t),await new Promise(p=>setTimeout(p,10)),document.dispatchEvent(r)}await new Promise(e=>setTimeout(e,50))}function jt(s){return{Escape:27,Enter:13,Tab:9,Backspace:8,Delete:46,ArrowUp:38,ArrowDown:40,ArrowLeft:37,ArrowRight:39,Space:32," ":32}[s]||0}function Wt(s){return{altKey:s.includes("Alt"),ctrlKey:s.includes("Control"),metaKey:s.includes("Meta"),shiftKey:s.includes("Shift")}}const Af=T.object({name:T.literal("wait"),duration:T.number().min(0)});function Pf(s){return Af.parse(s)}async function zf(s){try{const{duration:a}=s;return console.log(`[Wait] Waiting for ${a}ms...`),await new Promise(l=>setTimeout(l,a)),console.log(`[Wait] Wait completed after ${a}ms`),{data:!0}}catch(a){return console.log(a),{hasError:!0,message:a instanceof Error?a.message:"Unknown error in wait handler",data:!1}}}const Cf=et.extend({name:T.literal("save-assets")});function Lf(s){return Cf.parse(s)}async function Zf(s){try{const{selector:a="img, audio, video, source",findBy:l="cssSelector",option:i}=s,e=await Ye({selector:a,findBy:l,option:i});if(!e||!Array.isArray(e))return{data:[]};const t=[];return e.forEach(r=>{let p="";(r instanceof HTMLImageElement||r instanceof HTMLAudioElement||r instanceof HTMLVideoElement||r instanceof HTMLSourceElement)&&(p=r.src),p&&!t.includes(p)&&t.push(p)}),{data:t}}catch(a){return{hasError:!0,message:a instanceof Error?a.message:"Unknown error in save-assets handler",data:null}}}class Ff{static generate(a){const l=[];let i=a;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.tagName.toLowerCase();const t=Array.from(i.parentElement?.children||[]).filter(p=>p.tagName===i.tagName);if(t.length>1){const p=t.indexOf(i)+1;e+=`[${p}]`}const r=this.getStableAttributes(i);r.length>0&&(e+=`[@${r.join(" and @")}]`),l.unshift(e),i=i.parentElement}return"/"+l.join("/")}static getStableAttributes(a){const l=[],i=["data-testid","aria-label","title","alt","role"];for(const e of i){const t=a.getAttribute(e);t&&!this.isDynamicValue(t)&&l.push(`${e}="${t}"`)}return l}static isDynamicValue(a){return[/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,/^\d{13}$/,/^[a-zA-Z0-9]{16,}$/,/^[a-zA-Z0-9]+-\d+$/,/^[a-zA-Z0-9]+_[a-zA-Z0-9]+$/].some(i=>i.test(a))}}const Mf=et.extend({name:T.literal("get-element-data"),includeText:T.boolean().optional(),includeTags:T.boolean().optional(),useTextContent:T.boolean().optional(),regex:T.string().optional(),prefixText:T.string().optional(),suffixText:T.string().optional(),attributes:T.array(T.string()).optional(),includeSelector:T.boolean().optional(),includeXPath:T.boolean().optional()});function Rf(s){return Mf.parse(s)}async function Jf(s){try{const{selector:a="",includeText:l=!0,includeTags:i=!1,useTextContent:e=!1,regex:t,prefixText:r="",suffixText:p="",attributes:U=[],includeSelector:z=!1,includeXPath:Z=!1,findBy:k="cssSelector",option:_}=s;if(!a)throw new Error("Selector is required for get-element-data block");if(!l&&U.length===0)throw new Error("Either includeText must be true or attributes must be provided");const $=await Ye({selector:a,findBy:k,option:_});if(!$)return{data:Array.isArray($)?[]:{}};const y=Bf(l,i,e,t,r,p,U,z,Z);return Array.isArray($)?{data:$.map(y)}:{data:y($)}}catch(a){return{hasError:!0,message:a instanceof Error?a.message:"Unknown error in get-element-data handler",data:{}}}}function Bf(s,a,l,i,e="",t="",r=[],p=!1,U=!1){return z=>{const Z={};if(s){let k="";if(a?k=z.innerHTML:k=l?z.textContent||"":z.innerText||"",i){const _=new RegExp(i,"g"),$=k.match(_);k=$?$.join(" "):""}k.trim()&&(k=e+k.trim()+t),Z.text=k}return r.length>0&&(Z.attributes={},r.forEach(k=>{let _=z.getAttribute(k);if(_===null){const $=z.querySelector(`[${k}]`);$&&(_=$.getAttribute(k))}Z.attributes[k]=_})),p&&(Z.selector=Qd.generate(z)),U&&(Z.xpath=Ff.generate(z)),Z}}const Wf=et.extend({name:T.literal("scroll"),scrollType:T.enum(["toElement","toBottom","byDistance","untilLoaded"]).optional(),distance:T.number().optional(),behavior:T.enum(["auto","smooth"]).optional(),maxScrolls:T.number().optional(),waitAfterScroll:T.number().optional()});function Gf(s){return Wf.parse(s)}async function qf(s){try{const{selector:a="",scrollType:l="toBottom",distance:i=500,behavior:e="smooth",maxScrolls:t=50,waitAfterScroll:r=300,findBy:p="cssSelector",option:U}=s;switch(l){case"toElement":if(!a)throw new Error("Selector is required for toElement scroll type");return await Kf(a,p,U,e);case"toBottom":return await Vf(e,r);case"byDistance":return await Xf(i,e);case"untilLoaded":return await Hf(t,i,e,r);default:throw new Error(`Unknown scroll type: ${l}`)}}catch(a){return{hasError:!0,message:a instanceof Error?a.message:"Unknown error in scroll handler",data:!1}}}async function Kf(s,a,l,i){const e=await Ye({selector:s,findBy:a,option:l});return e?((Array.isArray(e)?e[0]:e).scrollIntoView({behavior:i,block:"center"}),{data:!0}):{hasError:!0,message:"Element not found for scrolling",data:!1}}async function Vf(s,a){let l=document.body.scrollHeight,i=0;const e=50;for(;i<e;){window.scrollTo({top:document.body.scrollHeight,behavior:s}),await new Promise(r=>setTimeout(r,a));const t=document.body.scrollHeight;if(t===l)break;l=t,i++}return{data:!0}}async function Xf(s,a){return window.scrollBy({top:s,behavior:a}),{data:!0}}async function Hf(s,a,l,i){let e=0,t=document.body.scrollHeight;for(;e<s;){window.scrollBy({top:a,behavior:l}),await new Promise(z=>setTimeout(z,i));const r=document.body.scrollHeight,p=window.pageYOffset||document.documentElement.scrollTop,U=window.innerHeight;if(p+U>=r-10&&r===t)break;t=r,e++}return{data:!0}}const Yf=T.object({name:T.literal("fetch-api"),url:T.string(),method:T.enum(["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"]).optional(),headers:T.record(T.string(),T.string()).optional(),body:T.record(T.string(),T.any()).optional(),timeout:T.number().min(0).optional(),parseJson:T.boolean().optional(),returnHeaders:T.boolean().optional()});function Qf(s){return Yf.parse(s)}async function em(s){try{console.log("[FetchApiBlock] Sending API request to background:",s.url);const a=await chrome.runtime.sendMessage({type:"FETCH_API",data:{url:s.url,method:s.method||"GET",headers:s.headers||{},body:s.body,timeout:s.timeout||3e4,parseJson:s.parseJson??!0,returnHeaders:s.returnHeaders??!1}});return a.$isError?{hasError:!0,message:a.message||"API request failed",data:void 0}:(console.log("[FetchApiBlock] API request successful"),{data:a.data})}catch(a){return console.error("[FetchApiBlock] API request error:",a),{hasError:!0,message:a instanceof Error?a.message:"Unknown error in API request",data:void 0}}}function It(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ot={exports:{}},Gt;function tm(){return Gt||(Gt=1,(function(s,a){(function(l){s.exports=l()})(function(){return(function(){function l(i,e,t){function r(z,Z){if(!e[z]){if(!i[z]){var k=typeof It=="function"&&It;if(!Z&&k)return k(z,!0);if(p)return p(z,!0);var _=new Error("Cannot find module '"+z+"'");throw _.code="MODULE_NOT_FOUND",_}var $=e[z]={exports:{}};i[z][0].call($.exports,function(y){var D=i[z][1][y];return r(D||y)},$,$.exports,l,i,e,t)}return e[z].exports}for(var p=typeof It=="function"&&It,U=0;U<t.length;U++)r(t[U]);return r}return l})()({1:[function(l,i,e){const t=l("./utils"),r=(function(){const p=t.stringToArray,U=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],z=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],Z=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],k=["Thousand","Million","Billion","Trillion"];function _(b,x){var w=function(M,L,j){var F="";if(M<=19)F=(L?" and ":"")+(j?z[M]:U[M]);else if(M<100){const le=Math.floor(M/10),fe=M%10;F=(L?" and ":"")+Z[le-2],fe>0?F+="-"+w(fe,!1,j):j&&(F=F.substring(0,F.length-1)+"ieth")}else if(M<1e3){const le=Math.floor(M/100),fe=M%100;F=(L?", ":"")+U[le]+" Hundred",fe>0?F+=w(fe,!0,j):j&&(F+="th")}else{var Y=Math.floor(Math.log10(M)/3);Y>k.length&&(Y=k.length);const le=Math.pow(10,Y*3),fe=Math.floor(M/le),H=M-fe*le;F=(L?", ":"")+w(fe,!1,!1)+" "+k[Y-1],H>0?F+=w(H,!0,j):j&&(F+="th")}return F},E=w(b,!1,x);return E}const $={};U.forEach(function(b,x){$[b.toLowerCase()]=x}),z.forEach(function(b,x){$[b.toLowerCase()]=x}),Z.forEach(function(b,x){const w=b.toLowerCase();$[w]=(x+2)*10,$[w.substring(0,b.length-1)+"ieth"]=$[w]}),$.hundredth=100,k.forEach(function(b,x){const w=b.toLowerCase(),E=Math.pow(10,(x+1)*3);$[w]=E,$[w+"th"]=E});function y(b){const w=b.split(/,\s|\sand\s|[\s\\-]/).map(L=>$[L]);let E=[0];return w.forEach(L=>{if(L<100){let j=E.pop();j>=1e3&&(E.push(j),j=0),E.push(j+L)}else E.push(E.pop()*L)}),E.reduce((L,j)=>L+j,0)}const D=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],C={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function X(b){for(var x=0;x<D.length;x++){const w=D[x];if(b>=w[0])return w[1]+X(b-w[0])}return""}function N(b){for(var x=0,w=1,E=b.length-1;E>=0;E--){const M=b[E],L=C[M];L<w?x-=L:(w=L,x+=L)}return x}function O(b,x){for(var w=[],E=x.charCodeAt(0);b>0;)w.unshift(String.fromCharCode((b-1)%26+E)),b=Math.floor((b-1)/26);return w.join("")}function K(b,x){for(var w=x.charCodeAt(0),E=0,M=0;M<b.length;M++)E+=(b.charCodeAt(b.length-M-1)-w+1)*Math.pow(26,M);return E}function R(b,x){if(typeof b>"u")return;b=Math.floor(b);const w=ve(x);return W(b,w)}const I={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},J={UPPER:"upper",LOWER:"lower",TITLE:"title"};function W(b,x){let w;const E=b<0;switch(b=Math.abs(b),x.primary){case I.LETTERS:w=O(b,x.case===J.UPPER?"A":"a");break;case I.ROMAN:w=X(b),x.case===J.UPPER&&(w=w.toUpperCase());break;case I.WORDS:w=_(b,x.ordinal),x.case===J.UPPER?w=w.toUpperCase():x.case===J.LOWER&&(w=w.toLowerCase());break;case I.DECIMAL:w=""+b;var M=x.mandatoryDigits-w.length;if(M>0){var L=new Array(M+1).join("0");w=L+w}if(x.zeroCode!==48&&(w=p(w).map(le=>String.fromCodePoint(le.codePointAt(0)+x.zeroCode-48)).join("")),x.regular){const le=Math.floor((w.length-1)/x.groupingSeparators.position);for(let fe=le;fe>0;fe--){const H=w.length-fe*x.groupingSeparators.position;w=w.substr(0,H)+x.groupingSeparators.character+w.substr(H)}}else x.groupingSeparators.reverse().forEach(le=>{const fe=w.length-le.position;w=w.substr(0,fe)+le.character+w.substr(fe)});if(x.ordinal){var j={1:"st",2:"nd",3:"rd"},F=w[w.length-1],Y=j[F];(!Y||w.length>1&&w[w.length-2]==="1")&&(Y="th"),w=w+Y}break;case I.SEQUENCE:throw{code:"D3130",value:x.token}}return E&&(w="-"+w),w}const se=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function ve(b){const x={type:"integer",primary:I.DECIMAL,case:J.LOWER,ordinal:!1};let w,E;const M=b.lastIndexOf(";");switch(M===-1?w=b:(w=b.substring(0,M),E=b.substring(M+1),E[0]==="o"&&(x.ordinal=!0)),w){case"A":x.case=J.UPPER;case"a":x.primary=I.LETTERS;break;case"I":x.case=J.UPPER;case"i":x.primary=I.ROMAN;break;case"W":x.case=J.UPPER,x.primary=I.WORDS;break;case"Ww":x.case=J.TITLE,x.primary=I.WORDS;break;case"w":x.primary=I.WORDS;break;default:{let L=null,j=0,F=0,Y=[],le=0;if(p(w).map(H=>H.codePointAt(0)).reverse().forEach(H=>{let ee=!1;for(let ue=0;ue<se.length;ue++){const V=se[ue];if(H>=V&&H<=V+9){if(ee=!0,j++,le++,L===null)L=V;else if(V!==L)throw{code:"D3131"};break}}ee||(H===35?(le++,F++):Y.push({position:le,character:String.fromCodePoint(H)}))}),j>0){x.primary=I.DECIMAL,x.zeroCode=L,x.mandatoryDigits=j,x.optionalDigits=F;const ee=function(ue){if(ue.length===0)return 0;const V=ue[0].character;for(let De=1;De<ue.length;De++)if(ue[De].character!==V)return 0;const Te=ue.map(De=>De.position),Ke=function(De,Le){return Le===0?De:Ke(Le,De%Le)},Ce=Te.reduce(Ke);for(let De=1;De<=Te.length;De++)if(Te.indexOf(De*Ce)===-1)return 0;return Ce}(Y);ee>0?(x.regular=!0,x.groupingSeparators={position:ee,character:Y[0].character}):(x.regular=!1,x.groupingSeparators=Y)}else x.primary=I.SEQUENCE,x.token=w}}return x}const he={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function ye(b){var x=[];const w={type:"datetime",parts:x},E=function(ee,ue){if(ue>ee){let V=b.substring(ee,ue);V=V.split("]]").join("]"),x.push({type:"literal",value:V})}};for(var M=0,L=0;L<b.length;){if(b.charAt(L)==="["){if(b.charAt(L+1)==="["){E(M,L),x.push({type:"literal",value:"["}),L+=2,M=L;continue}if(E(M,L),M=L,L=b.indexOf("]",M),L===-1)throw{code:"D3135"};let ee=b.substring(M+1,L);ee=ee.split(/\s+/).join("");var j={type:"marker",component:ee.charAt(0)},F=ee.lastIndexOf(","),Y;if(F!==-1){const ue=ee.substring(F+1),V=ue.indexOf("-");let Te,Ke;const Ce=function(Le){if(!(typeof Le>"u"||Le==="*"))return parseInt(Le)};V===-1?Te=ue:(Te=ue.substring(0,V),Ke=ue.substring(V+1));const De={min:Ce(Te),max:Ce(Ke)};j.width=De,Y=ee.substring(1,F)}else Y=ee.substring(1);if(Y.length===1)j.presentation1=Y;else if(Y.length>1){var le=Y.charAt(Y.length-1);"atco".indexOf(le)!==-1?(j.presentation2=le,le==="o"&&(j.ordinal=!0),j.presentation1=Y.substring(0,Y.length-1)):j.presentation1=Y}else j.presentation1=he[j.component];if(typeof j.presentation1>"u")throw{code:"D3132",value:j.component};if(j.presentation1[0]==="n")j.names=J.LOWER;else if(j.presentation1[0]==="N")j.presentation1[1]==="n"?j.names=J.TITLE:j.names=J.UPPER;else if("YMDdFWwXxHhmsf".indexOf(j.component)!==-1){var fe=j.presentation1;if(j.presentation2&&(fe+=";"+j.presentation2),j.integerFormat=ve(fe),j.width&&j.width.min!==void 0&&j.integerFormat.mandatoryDigits<j.width.min&&(j.integerFormat.mandatoryDigits=j.width.min),j.component==="Y")if(j.n=-1,j.width&&j.width.max!==void 0)j.n=j.width.max,j.integerFormat.mandatoryDigits=j.n;else{var H=j.integerFormat.mandatoryDigits+j.integerFormat.optionalDigits;H>=2&&(j.n=H)}const ue=x[x.length-1];ue&&ue.integerFormat&&(ue.integerFormat.parseWidth=ue.integerFormat.mandatoryDigits)}(j.component==="Z"||j.component==="z")&&(j.integerFormat=ve(j.presentation1)),x.push(j),M=L+1}L++}return E(M,L),w}const de=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ie=["January","February","March","April","May","June","July","August","September","October","November","December"],Je=1e3*60*60*24,ge=function(b){const x=Date.UTC(b.year,b.month);var w=new Date(x).getUTCDay();return w===0&&(w=7),w>4?x+(8-w)*Je:x-(w-1)*Je},ae=function(b,x){return{year:b,month:x,nextMonth:function(){return x===11?ae(b+1,0):ae(b,x+1)},previousMonth:function(){return x===0?ae(b-1,11):ae(b,x-1)},nextYear:function(){return ae(b+1,x)},previousYear:function(){return ae(b-1,x)}}},Be=function(b,x){return(x-b)/(Je*7)+1},re=(b,x)=>{let w;switch(x){case"Y":w=b.getUTCFullYear();break;case"M":w=b.getUTCMonth()+1;break;case"D":w=b.getUTCDate();break;case"d":{const E=Date.UTC(b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()),M=Date.UTC(b.getUTCFullYear(),0);w=(E-M)/Je+1;break}case"F":w=b.getUTCDay(),w===0&&(w=7);break;case"W":{const E=ae(b.getUTCFullYear(),0),M=ge(E),L=Date.UTC(E.year,b.getUTCMonth(),b.getUTCDate());let j=Be(M,L);if(j>52){const F=ge(E.nextYear());L>=F&&(j=1)}else if(j<1){const F=ge(E.previousYear());j=Be(F,L)}w=Math.floor(j);break}case"w":{const E=ae(b.getUTCFullYear(),b.getUTCMonth()),M=ge(E),L=Date.UTC(E.year,E.month,b.getUTCDate());let j=Be(M,L);if(j>4){const F=ge(E.nextMonth());L>=F&&(j=1)}else if(j<1){const F=ge(E.previousMonth());j=Be(F,L)}w=Math.floor(j);break}case"X":{const E=ae(b.getUTCFullYear(),0),M=ge(E),L=ge(E.nextYear()),j=b.getTime();j<M?w=E.year-1:j>=L?w=E.year+1:w=E.year;break}case"x":{const E=ae(b.getUTCFullYear(),b.getUTCMonth()),M=ge(E),L=E.nextMonth(),j=ge(L),F=b.getTime();F<M?w=E.previousMonth().month+1:F>=j?w=L.month+1:w=E.month+1;break}case"H":w=b.getUTCHours();break;case"h":w=b.getUTCHours(),w=w%12,w===0&&(w=12);break;case"P":w=b.getUTCHours()>=12?"pm":"am";break;case"m":w=b.getUTCMinutes();break;case"s":w=b.getUTCSeconds();break;case"f":w=b.getUTCMilliseconds();break;case"Z":case"z":break;case"C":w="ISO";break;case"E":w="ISO";break}return w};let Oe=null;function qe(b,x,w){var E=0,M=0;if(typeof w<"u"){const fe=parseInt(w);E=Math.floor(fe/100),M=fe%100}var L=function(fe,H){var ee=re(fe,H.component);if("YMDdFWwXxHhms".indexOf(H.component)!==-1)if(H.component==="Y"&&H.n!==-1&&(ee=ee%Math.pow(10,H.n)),H.names){if(H.component==="M"||H.component==="x")ee=Ie[ee-1];else if(H.component==="F")ee=de[ee];else throw{code:"D3133",value:H.component};H.names===J.UPPER?ee=ee.toUpperCase():H.names===J.LOWER&&(ee=ee.toLowerCase()),H.width&&ee.length>H.width.max&&(ee=ee.substring(0,H.width.max))}else ee=W(ee,H.integerFormat);else if(H.component==="f")ee=W(ee,H.integerFormat);else if(H.component==="Z"||H.component==="z"){const ue=E*100+M;if(H.integerFormat.regular)ee=W(ue,H.integerFormat);else{const V=H.integerFormat.mandatoryDigits;if(V===1||V===2)ee=W(E,H.integerFormat),M!==0&&(ee+=":"+R(M,"00"));else if(V===3||V===4)ee=W(ue,H.integerFormat);else throw{code:"D3134",value:V}}ue>=0&&(ee="+"+ee),H.component==="z"&&(ee="GMT"+ee),ue===0&&H.presentation2==="t"&&(ee="Z")}else H.component==="P"&&H.names===J.UPPER&&(ee=ee.toUpperCase());return ee};let j;typeof x>"u"?(Oe===null&&(Oe=ye("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),j=Oe):j=ye(x);const F=(60*E+M)*60*1e3,Y=new Date(b+F);let le="";return j.parts.forEach(function(fe){fe.type==="literal"?le+=fe.value:le+=L(Y,fe)}),le}function d(b){var x={};if(b.type==="datetime")x.type="datetime",x.parts=b.parts.map(function(w){var E={};if(w.type==="literal")E.regex=w.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(w.component==="Z"||w.component==="z"){let L;Array.isArray(w.integerFormat.groupingSeparators)||(L=w.integerFormat.groupingSeparators),E.regex="",w.component==="z"&&(E.regex="GMT"),E.regex+="[-+][0-9]+",L&&(E.regex+=L.character+"[0-9]+"),E.parse=function(j){w.component==="z"&&(j=j.substring(3));let F=0,Y=0;return L?(F=Number.parseInt(j.substring(0,j.indexOf(L.character))),Y=Number.parseInt(j.substring(j.indexOf(L.character)+1))):j.length-1<=2?F=Number.parseInt(j):(F=Number.parseInt(j.substring(0,3)),Y=Number.parseInt(j.substring(3))),F*60+Y}}else if(w.integerFormat)E=d(w.integerFormat);else{E.regex="[a-zA-Z]+";var M={};if(w.component==="M"||w.component==="x")Ie.forEach(function(L,j){w.width&&w.width.max?M[L.substring(0,w.width.max)]=j+1:M[L]=j+1});else if(w.component==="F")de.forEach(function(L,j){j>0&&(w.width&&w.width.max?M[L.substring(0,w.width.max)]=j:M[L]=j)});else if(w.component==="P")M={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:w.component};E.parse=function(L){return M[L]}}return E.component=w.component,E});else{x.type="integer";const w=b.case===J.UPPER;switch(b.primary){case I.LETTERS:x.regex=w?"[A-Z]+":"[a-z]+",x.parse=function(E){return K(E,w?"A":"a")};break;case I.ROMAN:x.regex=w?"[MDCLXVI]+":"[mdclxvi]+",x.parse=function(E){return N(w?E:E.toUpperCase())};break;case I.WORDS:x.regex="(?:"+Object.keys($).concat("and","[\\-, ]").join("|")+")+",x.parse=function(E){return y(E.toLowerCase())};break;case I.DECIMAL:x.regex="[0-9]",b.parseWidth?x.regex+=`{${b.parseWidth}}`:x.regex+="+",b.ordinal&&(x.regex+="(?:th|st|nd|rd)"),x.parse=function(E){let M=E;return b.ordinal&&(M=E.substring(0,E.length-2)),b.regular?M=M.split(",").join(""):b.groupingSeparators.forEach(L=>{M=M.split(L.character).join("")}),b.zeroCode!==48&&(M=M.split("").map(L=>String.fromCodePoint(L.codePointAt(0)-b.zeroCode+48)).join("")),parseInt(M)};break;case I.SEQUENCE:throw{code:"D3130",value:b.token}}}return x}function v(b,x){if(typeof b>"u")return;const w=ve(x);return d(w).parse(b)}function G(b,x){const w=ye(x),E=d(w),M="^"+E.parts.map(Y=>"("+Y.regex+")").join("")+"$";var j=new RegExp(M,"i").exec(b);if(j!==null){const V={};for(let $e=1;$e<j.length;$e++){const u=E.parts[$e-1];u.parse&&(V[u.component]=u.parse(j[$e]))}if(Object.getOwnPropertyNames(V).length===0)return;let Te=0;const Ke=$e=>{Te<<=1,Te+=$e?1:0},Ce=$e=>!(~$e&Te)&&!!($e&Te);"YXMxWwdD".split("").forEach($e=>Ke(V[$e]));const Le=!Ce(161)&&Ce(130),tt=Ce(84),nt=!tt&&Ce(72);Te=0,"PHhmsf".split("").forEach($e=>Ke(V[$e]));const it=!Ce(23)&&Ce(47),ft=(Le?"YD":tt?"XxwF":nt?"XWF":"YMD")+(it?"Phmsf":"Hmsf"),Xe=this.environment.timestamp;let ut=!1,Qe=!1;if(ft.split("").forEach($e=>{if(typeof V[$e]>"u")ut?(V[$e]="MDd".indexOf($e)!==-1?1:0,Qe=!0):V[$e]=re(Xe,$e);else if(ut=!0,Qe)throw{code:"D3136"}}),V.M>0?V.M-=1:V.M=0,Le){const $e=Date.UTC(V.Y,0),u=(V.d-1)*1e3*60*60*24,f=new Date($e+u);V.M=f.getUTCMonth(),V.D=f.getUTCDate()}if(tt)throw{code:"D3136"};if(nt)throw{code:"D3136"};it&&(V.H=V.h===12?0:V.h,V.P===1&&(V.H+=12));var F=Date.UTC(V.Y,V.M,V.D,V.H,V.m,V.s,V.f);return(V.Z||V.z)&&(F-=(V.Z||V.z)*60*1e3),F}}var oe=new RegExp("^\\d{4}(-[01]\\d)*(-[0-3]\\d)*(T[0-2]\\d:[0-5]\\d:[0-5]\\d)*(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function we(b,x){if(!(typeof b>"u"))if(typeof x>"u"){if(!oe.test(b))throw{stack:new Error().stack,code:"D3110",value:b};return Date.parse(b)}else return G.call(this,b,x)}function pe(b,x,w){if(!(typeof b>"u"))return qe.call(this,b,x,w)}return{formatInteger:R,parseInteger:v,fromMillis:pe,toMillis:we}})();i.exports=r},{"./utils":6}],2:[function(l,i,e){(function(t){(function(){var r=l("./utils");const p=(()=>{var U=r.isNumeric,z=r.isArrayOfStrings,Z=r.isArrayOfNumbers,k=r.createSequence,_=r.isSequence,$=r.isFunction,y=r.isLambda,D=r.isPromise,C=r.getFunctionArity,X=r.isDeepEqual,N=r.stringToArray;function O(n){if(!(typeof n>"u")){var o=0;return n.forEach(function(c){o+=c}),o}}function K(n){return typeof n>"u"?0:n.length}function R(n){if(!(typeof n>"u"||n.length===0))return Math.max.apply(Math,n)}function I(n){if(!(typeof n>"u"||n.length===0))return Math.min.apply(Math,n)}function J(n){if(!(typeof n>"u"||n.length===0)){var o=0;return n.forEach(function(c){o+=c}),o/n.length}}function W(n,o=!1){if(!(typeof n>"u")){var c;if(typeof n=="string")c=n;else if($(n))c="";else{if(typeof n=="number"&&!isFinite(n))throw{code:"D3001",value:n,stack:new Error().stack};var h=o?2:0;Array.isArray(n)&&n.outerWrapper&&(n=n[0]),c=JSON.stringify(n,function(m,S){return typeof S<"u"&&S!==null&&S.toPrecision&&U(S)?Number(S.toPrecision(15)):S&&$(S)?"":S},h)}return c}}function se(n,o,c){if(!(typeof n>"u")){var h=N(n),m=h.length;if(m+o<0&&(o=0),typeof c<"u"){if(c<=0)return"";var S=o>=0?o+c:m+o+c;return h.slice(o,S).join("")}return h.slice(o).join("")}}function ve(n,o){if(!(typeof n>"u")){var c=n.indexOf(o);return c>-1?n.substr(0,c):n}}function he(n,o){if(!(typeof n>"u")){var c=n.indexOf(o);return c>-1?n.substr(c+o.length):n}}function ye(n){if(!(typeof n>"u"))return n.toLowerCase()}function de(n){if(!(typeof n>"u"))return n.toUpperCase()}function Ie(n){if(!(typeof n>"u"))return N(n).length}function Je(n){if(!(typeof n>"u")){var o=n.replace(/[ \t\n\r]+/gm," ");return o.charAt(0)===" "&&(o=o.substring(1)),o.charAt(o.length-1)===" "&&(o=o.substring(0,o.length-1)),o}}function ge(n,o,c){if(!(typeof n>"u")){(typeof c>"u"||c.length===0)&&(c=" ");var h;o=Math.trunc(o);var m=Math.abs(o)-Ie(n);if(m>0){var S=new Array(m+1).join(c);c.length>1&&(S=se(S,0,m)),o>0?h=n+S:h=S+n}else h=n;return h}}async function ae(n,o){var c=n.apply(this,[o]);if(D(c)&&(c=await c),c&&!(typeof c.start=="number"||c.end==="number"||Array.isArray(c.groups)||$(c.next)))throw{code:"T1010",stack:new Error().stack};return c}async function Be(n,o){if(!(typeof n>"u")){var c;if(typeof o=="string")c=n.indexOf(o)!==-1;else{var h=await ae(o,n);c=typeof h<"u"}return c}}async function re(n,o,c){if(!(typeof n>"u")){if(c<0)throw{stack:new Error().stack,value:c,code:"D3040",index:3};var h=k();if(typeof c>"u"||c>0){var m=0,S=await ae(o,n);if(typeof S<"u")for(;typeof S<"u"&&(typeof c>"u"||m<c);)h.push({match:S.match,index:S.start,groups:S.groups}),S=await ae(S.next),m++}return h}}async function Oe(n,o,c,h){if(!(typeof n>"u")){var m=this;if(o==="")throw{code:"D3010",stack:new Error().stack,value:o,index:2};if(h<0)throw{code:"D3011",stack:new Error().stack,value:h,index:4};var S;typeof c=="string"?S=function(be){for(var Ae="",me=0,je=c.indexOf("$",me);je!==-1&&me<c.length;){Ae+=c.substring(me,je),me=je+1;var Ve=c.charAt(me);if(Ve==="$")Ae+="$",me++;else if(Ve==="0")Ae+=be.match,me++;else{var Pe;if(be.groups.length===0?Pe=1:Pe=Math.floor(Math.log(be.groups.length)*Math.LOG10E)+1,je=parseInt(c.substring(me,me+Pe),10),Pe>1&&je>be.groups.length&&(je=parseInt(c.substring(me,me+Pe-1),10)),isNaN(je))Ae+="$";else{if(be.groups.length>0){var ct=be.groups[je-1];typeof ct<"u"&&(Ae+=ct)}me+=je.toString().length}}je=c.indexOf("$",me)}return Ae+=c.substring(me),Ae}:S=c;var P="",q=0;if(typeof h>"u"||h>0){var Q=0;if(typeof o=="string"){for(var ke=n.indexOf(o,q);ke!==-1&&(typeof h>"u"||Q<h);)P+=n.substring(q,ke),P+=c,q=ke+o.length,Q++,ke=n.indexOf(o,q);P+=n.substring(q)}else{var ce=await ae(o,n);if(typeof ce<"u"){for(;typeof ce<"u"&&(typeof h>"u"||Q<h);){P+=n.substring(q,ce.start);var _e=S.apply(m,[ce]);if(D(_e)&&(_e=await _e),typeof _e=="string")P+=_e;else throw{code:"D3012",stack:new Error().stack,value:_e};q=ce.start+ce.match.length,Q++,ce=await ae(ce.next)}P+=n.substring(q)}else P=n}}else P=n;return P}}function qe(n){if(!(typeof n>"u")){var o=typeof window<"u"?window.btoa:function(c){return new t.Buffer.from(c,"binary").toString("base64")};return o(n)}}function d(n){if(!(typeof n>"u")){var o=typeof window<"u"?window.atob:function(c){return new t.Buffer.from(c,"base64").toString("binary")};return o(n)}}function v(n){if(!(typeof n>"u")){var o;try{o=encodeURIComponent(n)}catch{throw{code:"D3140",stack:new Error().stack,value:n,functionName:"encodeUrlComponent"}}return o}}function G(n){if(!(typeof n>"u")){var o;try{o=encodeURI(n)}catch{throw{code:"D3140",stack:new Error().stack,value:n,functionName:"encodeUrl"}}return o}}function oe(n){if(!(typeof n>"u")){var o;try{o=decodeURIComponent(n)}catch{throw{code:"D3140",stack:new Error().stack,value:n,functionName:"decodeUrlComponent"}}return o}}function we(n){if(!(typeof n>"u")){var o;try{o=decodeURI(n)}catch{throw{code:"D3140",stack:new Error().stack,value:n,functionName:"decodeUrl"}}return o}}async function pe(n,o,c){if(!(typeof n>"u")){if(c<0)throw{code:"D3020",stack:new Error().stack,value:c,index:3};var h=[];if(typeof c>"u"||c>0)if(typeof o=="string")h=n.split(o,c);else{var m=0,S=await ae(o,n);if(typeof S<"u"){for(var P=0;typeof S<"u"&&(typeof c>"u"||m<c);)h.push(n.substring(P,S.start)),P=S.end,S=await ae(S.next),m++;(typeof c>"u"||m<c)&&h.push(n.substring(P))}else h.push(n)}return h}}function b(n,o){if(!(typeof n>"u"))return typeof o>"u"&&(o=""),n.join(o)}function x(n,o,c){if(!(typeof n>"u")){var h={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},m=h;typeof c<"u"&&Object.keys(c).forEach(function(te){m[te]=c[te]});for(var S=[],P=m["zero-digit"].charCodeAt(0),q=P;q<P+10;q++)S.push(String.fromCharCode(q));var Q=S.concat([m["decimal-separator"],m["exponent-separator"],m["grouping-separator"],m.digit,m["pattern-separator"]]),ke=o.split(m["pattern-separator"]);if(ke.length>2)throw{code:"D3080",stack:new Error().stack};var ce=function(te){var xe=(function(){for(var Ee,Ge=0;Ge<te.length;Ge++)if(Ee=te.charAt(Ge),Q.indexOf(Ee)!==-1&&Ee!==m["exponent-separator"])return te.substring(0,Ge)})(),Fe=(function(){for(var Ee,Ge=te.length-1;Ge>=0;Ge--)if(Ee=te.charAt(Ge),Q.indexOf(Ee)!==-1&&Ee!==m["exponent-separator"])return te.substring(Ge+1)})(),Se=te.substring(xe.length,te.length-Fe.length),Me,at,Re,st,We=te.indexOf(m["exponent-separator"],xe.length);We===-1||We>te.length-Fe.length?(Me=Se,at=void 0):(Me=Se.substring(0,We),at=Se.substring(We+1));var He=Me.indexOf(m["decimal-separator"]);return He===-1?(Re=Me,st=Fe):(Re=Me.substring(0,He),st=Me.substring(He+1)),{prefix:xe,suffix:Fe,activePart:Se,mantissaPart:Me,exponentPart:at,integerPart:Re,fractionalPart:st,subpicture:te}},_e=function(te){var xe,Fe,Se=te.subpicture,Me=Se.indexOf(m["decimal-separator"]);Me!==Se.lastIndexOf(m["decimal-separator"])&&(xe="D3081"),Se.indexOf(m.percent)!==Se.lastIndexOf(m.percent)&&(xe="D3082"),Se.indexOf(m["per-mille"])!==Se.lastIndexOf(m["per-mille"])&&(xe="D3083"),Se.indexOf(m.percent)!==-1&&Se.indexOf(m["per-mille"])!==-1&&(xe="D3084");var at=!1;for(Fe=0;Fe<te.mantissaPart.length;Fe++){var Re=te.mantissaPart.charAt(Fe);if(S.indexOf(Re)!==-1||Re===m.digit){at=!0;break}}at||(xe="D3085");var st=te.activePart.split("").map(function(Ee){return Q.indexOf(Ee)===-1?"p":"a"}).join("");st.indexOf("p")!==-1&&(xe="D3086"),Me!==-1?(Se.charAt(Me-1)===m["grouping-separator"]||Se.charAt(Me+1)===m["grouping-separator"])&&(xe="D3087"):te.integerPart.charAt(te.integerPart.length-1)===m["grouping-separator"]&&(xe="D3088"),Se.indexOf(m["grouping-separator"]+m["grouping-separator"])!==-1&&(xe="D3089");var We=te.integerPart.indexOf(m.digit);We!==-1&&te.integerPart.substring(0,We).split("").filter(function(Ee){return S.indexOf(Ee)>-1}).length>0&&(xe="D3090"),We=te.fractionalPart.lastIndexOf(m.digit),We!==-1&&te.fractionalPart.substring(We).split("").filter(function(Ee){return S.indexOf(Ee)>-1}).length>0&&(xe="D3091");var He=typeof te.exponentPart=="string";if(He&&te.exponentPart.length>0&&(Se.indexOf(m.percent)!==-1||Se.indexOf(m["per-mille"])!==-1)&&(xe="D3092"),He&&(te.exponentPart.length===0||te.exponentPart.split("").filter(function(Ee){return S.indexOf(Ee)===-1}).length>0)&&(xe="D3093"),xe)throw{code:xe,stack:new Error().stack}},be=function(te){var xe=function(ze,_t){for(var gt=[],rt=ze.indexOf(m["grouping-separator"]);rt!==-1;){var St=(_t?ze.substring(0,rt):ze.substring(rt)).split("").filter(function(dt){return S.indexOf(dt)!==-1||dt===m.digit}).length;gt.push(St),rt=te.integerPart.indexOf(m["grouping-separator"],rt+1)}return gt},Fe=xe(te.integerPart),Se=function(ze){if(ze.length===0)return 0;for(var _t=function(St,dt){return dt===0?St:_t(dt,St%dt)},gt=ze.reduce(_t),rt=1;rt<=ze.length;rt++)if(ze.indexOf(rt*gt)===-1)return 0;return gt},Me=Se(Fe),at=xe(te.fractionalPart,!0),Re=te.integerPart.split("").filter(function(ze){return S.indexOf(ze)!==-1}).length,st=Re,We=te.fractionalPart.split(""),He=We.filter(function(ze){return S.indexOf(ze)!==-1}).length,Ee=We.filter(function(ze){return S.indexOf(ze)!==-1||ze===m.digit}).length,Ge=typeof te.exponentPart=="string";Re===0&&Ee===0&&(Ge?(He=1,Ee=1):Re=1),Ge&&Re===0&&te.integerPart.indexOf(m.digit)!==-1&&(Re=1),Re===0&&He===0&&(He=1);var Zt=0;return Ge&&(Zt=te.exponentPart.split("").filter(function(ze){return S.indexOf(ze)!==-1}).length),{integerPartGroupingPositions:Fe,regularGrouping:Me,minimumIntegerPartSize:Re,scalingFactor:st,prefix:te.prefix,fractionalPartGroupingPositions:at,minimumFactionalPartSize:He,maximumFactionalPartSize:Ee,minimumExponentSize:Zt,suffix:te.suffix,picture:te.subpicture}},Ae=ke.map(ce);Ae.forEach(_e);var me=Ae.map(be),je=m["minus-sign"],Ve=m["zero-digit"],Pe=m["decimal-separator"],ct=m["grouping-separator"];me.length===1&&(me.push(JSON.parse(JSON.stringify(me[0]))),me[1].prefix=je+me[1].prefix);var Ue;n>=0?Ue=me[0]:Ue=me[1];var mt;Ue.picture.indexOf(m.percent)!==-1?mt=n*100:Ue.picture.indexOf(m["per-mille"])!==-1?mt=n*1e3:mt=n;var ot,lt;if(Ue.minimumExponentSize===0)ot=mt;else{var Hr=Math.pow(10,Ue.scalingFactor),Yr=Math.pow(10,Ue.scalingFactor-1);for(ot=mt,lt=0;ot<Yr;)ot*=10,lt-=1;for(;ot>Hr;)ot/=10,lt+=1}var Qr=F(ot,Ue.maximumFactionalPartSize),Ct=function(te,xe){var Fe=Math.abs(te).toFixed(xe);return Ve!=="0"&&(Fe=Fe.split("").map(function(Se){return Se>="0"&&Se<="9"?S[Se.charCodeAt(0)-48]:Se}).join("")),Fe},ie=Ct(Qr,Ue.maximumFactionalPartSize),Ze=ie.indexOf(".");for(Ze===-1?ie=ie+Pe:ie=ie.replace(".",Pe);ie.charAt(0)===Ve;)ie=ie.substring(1);for(;ie.charAt(ie.length-1)===Ve;)ie=ie.substring(0,ie.length-1);Ze=ie.indexOf(Pe);var vt=Ue.minimumIntegerPartSize-Ze,Lt=Ue.minimumFactionalPartSize-(ie.length-Ze-1);if(ie=(vt>0?new Array(vt+1).join(Ve):"")+ie,ie=ie+(Lt>0?new Array(Lt+1).join(Ve):""),Ze=ie.indexOf(Pe),Ue.regularGrouping>0)for(var en=Math.floor((Ze-1)/Ue.regularGrouping),kt=1;kt<=en;kt++)ie=[ie.slice(0,Ze-kt*Ue.regularGrouping),ct,ie.slice(Ze-kt*Ue.regularGrouping)].join("");else Ue.integerPartGroupingPositions.forEach(function(te){ie=[ie.slice(0,Ze-te),ct,ie.slice(Ze-te)].join(""),Ze++});if(Ze=ie.indexOf(Pe),Ue.fractionalPartGroupingPositions.forEach(function(te){ie=[ie.slice(0,te+Ze+1),ct,ie.slice(te+Ze+1)].join("")}),Ze=ie.indexOf(Pe),(Ue.picture.indexOf(Pe)===-1||Ze===ie.length-1)&&(ie=ie.substring(0,ie.length-1)),typeof lt<"u"){var wt=Ct(lt,0);vt=Ue.minimumExponentSize-wt.length,vt>0&&(wt=new Array(vt+1).join(Ve)+wt),ie=ie+m["exponent-separator"]+(lt<0?je:"")+wt}return ie=Ue.prefix+ie+Ue.suffix,ie}}function w(n,o){if(!(typeof n>"u")){if(n=F(n),typeof o>"u"?o=10:o=F(o),o<2||o>36)throw{code:"D3100",stack:new Error().stack,value:o};var c=n.toString(o);return c}}function E(n){var o;if(!(typeof n>"u")){if(typeof n=="number")o=n;else if(typeof n=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(n)&&!isNaN(parseFloat(n))&&isFinite(n))o=parseFloat(n);else if(typeof n=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(n))o=Number(n);else if(n===!0)o=1;else if(n===!1)o=0;else throw{code:"D3030",value:n,stack:new Error().stack,index:1};return o}}function M(n){var o;if(!(typeof n>"u"))return o=Math.abs(n),o}function L(n){var o;if(!(typeof n>"u"))return o=Math.floor(n),o}function j(n){var o;if(!(typeof n>"u"))return o=Math.ceil(n),o}function F(n,o){var c;if(!(typeof n>"u")){if(o){var h=n.toString().split("e");n=+(h[0]+"e"+(h[1]?+h[1]+o:o))}c=Math.round(n);var m=c-n;return Math.abs(m)===.5&&Math.abs(c%2)===1&&(c=c-1),o&&(h=c.toString().split("e"),c=+(h[0]+"e"+(h[1]?+h[1]-o:-o))),Object.is(c,-0)&&(c=0),c}}function Y(n){var o;if(!(typeof n>"u")){if(n<0)throw{stack:new Error().stack,code:"D3060",index:1,value:n};return o=Math.sqrt(n),o}}function le(n,o){var c;if(!(typeof n>"u")){if(c=Math.pow(n,o),!isFinite(c))throw{stack:new Error().stack,code:"D3061",index:1,value:n,exp:o};return c}}function fe(){return Math.random()}function H(n){if(!(typeof n>"u")){var o=!1;if(Array.isArray(n)){if(n.length===1)o=H(n[0]);else if(n.length>1){var c=n.filter(function(h){return H(h)});o=c.length>0}}else typeof n=="string"?n.length>0&&(o=!0):U(n)?n!==0&&(o=!0):n!==null&&typeof n=="object"&&!$(n)?Object.keys(n).length>0&&(o=!0):typeof n=="boolean"&&n===!0&&(o=!0);return o}}function ee(n){if(!(typeof n>"u"))return!H(n)}function ue(n,o,c,h){var m=[o],S=C(n);return S>=2&&m.push(c),S>=3&&m.push(h),m}async function V(n,o){if(!(typeof n>"u")){for(var c=k(),h=0;h<n.length;h++){var m=ue(o,n[h],h,n),S=await o.apply(this,m);typeof S<"u"&&c.push(S)}return c}}async function Te(n,o){if(!(typeof n>"u")){for(var c=k(),h=0;h<n.length;h++){var m=n[h],S=ue(o,m,h,n),P=await o.apply(this,S);H(P)&&c.push(m)}return c}}async function Ke(n,o){if(!(typeof n>"u")){for(var c=!1,h,m=0;m<n.length;m++){var S=n[m],P=!0;if(typeof o<"u"){var q=ue(o,S,m,n),Q=await o.apply(this,q);P=H(Q)}if(P)if(!c)h=S,c=!0;else throw{stack:new Error().stack,code:"D3138",index:m}}if(!c)throw{stack:new Error().stack,code:"D3139"};return h}}function Ce(){for(var n=[],o=Array.prototype.slice.call(arguments),c=Math.min.apply(Math,o.map(function(S){return Array.isArray(S)?S.length:0})),h=0;h<c;h++){var m=o.map(S=>S[h]);n.push(m)}return n}async function De(n,o,c){if(!(typeof n>"u")){var h,m=C(o);if(m<2)throw{stack:new Error().stack,code:"D3050",index:1};var S;for(typeof c>"u"&&n.length>0?(h=n[0],S=1):(h=c,S=0);S<n.length;){var P=[h,n[S]];m>=3&&P.push(S),m>=4&&P.push(n),h=await o.apply(this,P),S++}return h}}function Le(n){var o=k();if(Array.isArray(n)){var c={};n.forEach(function(h){var m=Le(h);m.forEach(function(S){c[S]=!0})}),o=Le(c)}else n!==null&&typeof n=="object"&&!$(n)&&Object.keys(n).forEach(h=>o.push(h));return o}function tt(n,o){var c;if(Array.isArray(n)){c=k();for(var h=0;h<n.length;h++){var m=tt(n[h],o);typeof m<"u"&&(Array.isArray(m)?m.forEach(S=>c.push(S)):c.push(m))}}else n!==null&&typeof n=="object"&&!$(n)&&(c=n[o]);return c}function nt(n,o){return typeof n>"u"?o:typeof o>"u"?n:(Array.isArray(n)||(n=k(n)),Array.isArray(o)||(o=[o]),n.concat(o))}function bt(n){return!(typeof n>"u")}function it(n){var o=k();if(Array.isArray(n))n.forEach(function(m){o=nt(o,it(m))});else if(n!==null&&typeof n=="object"&&!y(n))for(var c in n){var h={};h[c]=n[c],o.push(h)}else o=n;return o}function B(n){if(!(typeof n>"u")){var o={};return n.forEach(function(c){for(var h in c)o[h]=c[h]}),o}}function $t(n){if(!(typeof n>"u")){if(n.length<=1)return n;for(var o=n.length,c=new Array(o),h=0;h<o;h++)c[o-h-1]=n[h];return c}}async function ft(n,o){var c=k();for(var h in n){var m=ue(o,n[h],h,n),S=await o.apply(this,m);typeof S<"u"&&c.push(S)}return c}function Xe(n){throw{code:"D3137",stack:new Error().stack,message:n||"$error() function evaluated"}}function ut(n,o){if(!n)throw{code:"D3141",stack:new Error().stack,message:o||"$assert() statement failed"}}function Qe(n){if(n!==void 0)return n===null?"null":U(n)?"number":typeof n=="string"?"string":typeof n=="boolean"?"boolean":Array.isArray(n)?"array":$(n)?"function":"object"}async function $e(n,o){if(!(typeof n>"u")){if(n.length<=1)return n;var c;if(typeof o>"u"){if(!Z(n)&&!z(n))throw{stack:new Error().stack,code:"D3070",index:1};c=async function(P,q){return P>q}}else c=o;var h=async function(P,q){var Q=async function(ce,_e,be){_e.length===0?Array.prototype.push.apply(ce,be):be.length===0?Array.prototype.push.apply(ce,_e):await c(_e[0],be[0])?(ce.push(be[0]),await Q(ce,_e,be.slice(1))):(ce.push(_e[0]),await Q(ce,_e.slice(1),be))},ke=[];return await Q(ke,P,q),ke},m=async function(P){if(!Array.isArray(P)||P.length<=1)return P;var q=Math.floor(P.length/2),Q=P.slice(0,q),ke=P.slice(q);return Q=await m(Q),ke=await m(ke),await h(Q,ke)},S=await m(n);return S}}function u(n){if(!(typeof n>"u")){if(n.length<=1)return n;for(var o=new Array(n.length),c=0;c<n.length;c++){var h=Math.floor(Math.random()*(c+1));c!==h&&(o[c]=o[h]),o[h]=n[c]}return o}}function f(n){if(!(typeof n>"u")){if(!Array.isArray(n)||n.length<=1)return n;for(var o=_(n)?k():[],c=0;c<n.length;c++){for(var h=n[c],m=!1,S=0;S<o.length;S++)if(X(h,o[S])){m=!0;break}m||o.push(h)}return o}}async function g(n,o){var c={};for(var h in n){var m=n[h],S=ue(o,m,h,n),P=await o.apply(this,S);H(P)&&(c[h]=m)}return Object.keys(c).length===0&&(c=void 0),c}return{sum:O,count:K,max:R,min:I,average:J,string:W,substring:se,substringBefore:ve,substringAfter:he,lowercase:ye,uppercase:de,length:Ie,trim:Je,pad:ge,match:re,contains:Be,replace:Oe,split:pe,join:b,formatNumber:x,formatBase:w,number:E,floor:L,ceil:j,round:F,abs:M,sqrt:Y,power:le,random:fe,boolean:H,not:ee,map:V,zip:Ce,filter:Te,single:Ke,foldLeft:De,sift:g,keys:Le,lookup:tt,append:nt,exists:bt,spread:it,merge:B,reverse:$t,each:ft,error:Xe,assert:ut,type:Qe,sort:$e,shuffle:u,distinct:f,base64encode:qe,base64decode:d,encodeUrlComponent:v,encodeUrl:G,decodeUrlComponent:oe,decodeUrl:we}})();i.exports=p}).call(this)}).call(this,typeof Mt<"u"?Mt:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(l,i,e){var t=l("./datetime"),r=l("./functions"),p=l("./utils"),U=l("./parser"),z=l("./signature"),Z=(function(){var k=p.isNumeric,_=p.isArrayOfStrings,$=p.isArrayOfNumbers,y=p.createSequence,D=p.isSequence,C=p.isFunction,X=p.isLambda,N=p.isIterable,O=p.isPromise,K=p.getFunctionArity,R=p.isDeepEqual,I=Xe(null);async function J(u,f,g){var n,o=g.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(o&&await o(u,f,g),u.type){case"path":n=await W(u,f,g);break;case"binary":n=await Ie(u,f,g);break;case"unary":n=await Je(u,f,g);break;case"name":n=ge(u,f);break;case"string":case"number":case"value":n=ae(u);break;case"wildcard":n=Be(u,f);break;case"descendant":n=Oe(u,f);break;case"parent":n=g.lookup(u.slot.label);break;case"condition":n=await L(u,f,g);break;case"block":n=await j(u,f,g);break;case"bind":n=await M(u,f,g);break;case"regex":n=F(u);break;case"function":n=await ue(u,f,g);break;case"variable":n=Y(u,f,g);break;case"lambda":n=Ke(u,f,g);break;case"partial":n=await Ce(u,f,g);break;case"apply":n=await ee(u,f,g);break;case"transform":n=fe(u,f,g);break}if(Object.prototype.hasOwnProperty.call(u,"predicate"))for(var c=0;c<u.predicate.length;c++)n=await de(u.predicate[c].expr,n,g);u.type!=="path"&&Object.prototype.hasOwnProperty.call(u,"group")&&(n=await x(u.group,n,g));var h=g.lookup(Symbol.for("jsonata.__evaluate_exit"));return h&&await h(u,f,g,n),n&&D(n)&&!n.tupleStream&&(u.keepArray&&(n.keepSingleton=!0),n.length===0?n=void 0:n.length===1&&(n=n.keepSingleton?n:n[0])),n}async function W(u,f,g){var n;Array.isArray(f)&&u.steps[0].type!=="variable"?n=f:n=y(f);for(var o,c=!1,h=void 0,m=0;m<u.steps.length;m++){var S=u.steps[m];if(S.tuple&&(c=!0),m===0&&S.consarray?o=await J(S,n,g):c?h=await ye(S,n,h,g):o=await ve(S,n,g,m===u.steps.length-1),!c&&(typeof o>"u"||o.length===0))break;typeof S.focus>"u"&&(n=o)}if(c)if(u.tuple)o=h;else for(o=y(),m=0;m<h.length;m++)o.push(h[m]["@"]);return u.keepSingletonArray&&(Array.isArray(o)&&o.cons&&!o.sequence&&(o=y(o)),o.keepSingleton=!0),u.hasOwnProperty("group")&&(o=await x(u.group,c?h:o,g)),o}function se(u,f){var g=Xe(u);for(const n in f)g.bind(n,f[n]);return g}async function ve(u,f,g,n){var o;if(u.type==="sort")return o=await le(u,f,g),u.stages&&(o=await he(u.stages,o,g)),o;o=y();for(var c=0;c<f.length;c++){var h=await J(u,f[c],g);if(u.stages)for(var m=0;m<u.stages.length;m++)h=await de(u.stages[m].expr,h,g);typeof h<"u"&&o.push(h)}var S=y();return n&&o.length===1&&Array.isArray(o[0])&&!D(o[0])?S=o[0]:o.forEach(function(P){!Array.isArray(P)||P.cons?S.push(P):P.forEach(q=>S.push(q))}),S}async function he(u,f,g){for(var n=f,o=0;o<u.length;o++){var c=u[o];switch(c.type){case"filter":n=await de(c.expr,n,g);break;case"index":for(var h=0;h<n.length;h++){var m=n[h];m[c.value]=h}break}}return n}async function ye(u,f,g,n){var o;if(u.type==="sort"){if(g)o=await le(u,g,n);else{var c=await le(u,f,n);o=y(),o.tupleStream=!0;for(var h=0;h<c.length;h++){var m={"@":c[h]};m[u.index]=h,o.push(m)}}return u.stages&&(o=await he(u.stages,o,n)),o}o=y(),o.tupleStream=!0;var S=n;g===void 0&&(g=f.map(ke=>({"@":ke})));for(var P=0;P<g.length;P++){S=se(n,g[P]);var q=await J(u,g[P]["@"],S);if(typeof q<"u"){Array.isArray(q)||(q=[q]);for(var Q=0;Q<q.length;Q++)m={},Object.assign(m,g[P]),q.tupleStream?Object.assign(m,q[Q]):(u.focus?(m[u.focus]=q[Q],m["@"]=g[P]["@"]):m["@"]=q[Q],u.index&&(m[u.index]=Q),u.ancestor&&(m[u.ancestor.label]=g[P]["@"])),o.push(m)}}return u.stages&&(o=await he(u.stages,o,n)),o}async function de(u,f,g){var n=y();if(f&&f.tupleStream&&(n.tupleStream=!0),Array.isArray(f)||(f=y(f)),u.type==="number"){var o=Math.floor(u.value);o<0&&(o=f.length+o);var c=await f[o];typeof c<"u"&&(Array.isArray(c)?n=c:n.push(c))}else for(o=0;o<f.length;o++){var c=f[o],h=c,m=g;f.tupleStream&&(h=c["@"],m=se(g,c));var S=await J(u,h,m);k(S)&&(S=[S]),$(S)?S.forEach(function(q){var Q=Math.floor(q);Q<0&&(Q=f.length+Q),Q===o&&n.push(c)}):r.boolean(S)&&n.push(c)}return n}async function Ie(u,f,g){var n,o=await J(u.lhs,f,g),c=u.value,h=async()=>await J(u.rhs,f,g);if(c==="and"||c==="or")try{return await we(o,h,c)}catch(S){throw S.position=u.position,S.token=c,S}var m=await h();try{switch(c){case"+":case"-":case"*":case"/":case"%":n=d(o,m,c);break;case"=":case"!=":n=v(o,m,c);break;case"<":case"<=":case">":case">=":n=G(o,m,c);break;case"&":n=b(o,m);break;case"..":n=E(o,m);break;case"in":n=oe(o,m);break}}catch(S){throw S.position=u.position,S.token=c,S}return n}async function Je(u,f,g){var n;switch(u.value){case"-":if(n=await J(u.expression,f,g),typeof n>"u")n=void 0;else if(k(n))n=-n;else throw{code:"D1002",stack:new Error().stack,position:u.position,token:u.value,value:n};break;case"[":n=[];let h=await Promise.all(u.expressions.map(async(m,S)=>(g.isParallelCall=S>0,[m,await J(m,f,g)])));for(let m of h){var[o,c]=m;typeof c<"u"&&(o.value==="["?n.push(c):n=r.append(n,c))}u.consarray&&Object.defineProperty(n,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":n=await x(u,f,g);break}return n}function ge(u,f,g){return r.lookup(f,u.value)}function ae(u){return u.value}function Be(u,f){var g=y();return Array.isArray(f)&&f.outerWrapper&&f.length>0&&(f=f[0]),f!==null&&typeof f=="object"&&Object.keys(f).forEach(function(n){var o=f[n];Array.isArray(o)?(o=re(o),g=r.append(g,o)):g.push(o)}),g}function re(u,f){return typeof f>"u"&&(f=[]),Array.isArray(u)?u.forEach(function(g){re(g,f)}):f.push(u),f}function Oe(u,f){var g,n=y();return typeof f<"u"&&(qe(f,n),n.length===1?g=n[0]:g=n),g}function qe(u,f){Array.isArray(u)||f.push(u),Array.isArray(u)?u.forEach(function(g){qe(g,f)}):u!==null&&typeof u=="object"&&Object.keys(u).forEach(function(g){qe(u[g],f)})}function d(u,f,g){var n;if(typeof u<"u"&&!k(u))throw{code:"T2001",stack:new Error().stack,value:u};if(typeof f<"u"&&!k(f))throw{code:"T2002",stack:new Error().stack,value:f};if(typeof u>"u"||typeof f>"u")return n;switch(g){case"+":n=u+f;break;case"-":n=u-f;break;case"*":n=u*f;break;case"/":n=u/f;break;case"%":n=u%f;break}return n}function v(u,f,g){var n,o=typeof u,c=typeof f;if(o==="undefined"||c==="undefined")return!1;switch(g){case"=":n=R(u,f);break;case"!=":n=!R(u,f);break}return n}function G(u,f,g){var n,o=typeof u,c=typeof f,h=o==="undefined"||o==="string"||o==="number",m=c==="undefined"||c==="string"||c==="number";if(!h||!m)throw{code:"T2010",stack:new Error().stack,value:o==="string"||o==="number"?f:u};if(!(o==="undefined"||c==="undefined")){if(o!==c)throw{code:"T2009",stack:new Error().stack,value:u,value2:f};switch(g){case"<":n=u<f;break;case"<=":n=u<=f;break;case">":n=u>f;break;case">=":n=u>=f;break}return n}}function oe(u,f){var g=!1;if(typeof u>"u"||typeof f>"u")return!1;Array.isArray(f)||(f=[f]);for(var n=0;n<f.length;n++)if(f[n]===u){g=!0;break}return g}async function we(u,f,g){var n,o=pe(u);switch(g){case"and":n=o&&pe(await f());break;case"or":n=o||pe(await f());break}return n}function pe(u){var f=r.boolean(u);return typeof f>"u"?!1:f}function b(u,f){var g,n="",o="";return typeof u<"u"&&(n=r.string(u)),typeof f<"u"&&(o=r.string(f)),g=n.concat(o),g}async function x(u,f,g){var n={},o={},c=!!(f&&f.tupleStream);Array.isArray(f)||(f=y(f)),f.length===0&&f.push(void 0);for(var h=0;h<f.length;h++)for(var m=f[h],S=c?se(g,m):g,P=0;P<u.lhs.length;P++){var q=u.lhs[P],Q=await J(q[0],c?m["@"]:m,S);if(typeof Q!="string"&&Q!==void 0)throw{code:"T1003",stack:new Error().stack,position:u.position,value:Q};if(Q!==void 0){var ke={data:m,exprIndex:P};if(o.hasOwnProperty(Q)){if(o[Q].exprIndex!==P)throw{code:"D1009",stack:new Error().stack,position:u.position,value:Q};o[Q].data=r.append(o[Q].data,m)}else o[Q]=ke}}let ce=await Promise.all(Object.keys(o).map(async(be,Ae)=>{let me=o[be];var je=me.data,Ve=g;if(c){var Pe=w(me.data);je=Pe["@"],delete Pe["@"],Ve=se(g,Pe)}return g.isParallelCall=Ae>0,[be,await J(u.lhs[me.exprIndex][1],je,Ve)]}));for(let be of ce){var[Q,_e]=await be;typeof _e<"u"&&(n[Q]=_e)}return n}function w(u){if(!Array.isArray(u))return u;var f={};Object.assign(f,u[0]);for(var g=1;g<u.length;g++)for(const n in u[g])f[n]=r.append(f[n],u[g][n]);return f}function E(u,f){var g;if(typeof u<"u"&&!Number.isInteger(u))throw{code:"T2003",stack:new Error().stack,value:u};if(typeof f<"u"&&!Number.isInteger(f))throw{code:"T2004",stack:new Error().stack,value:f};if(typeof u>"u"||typeof f>"u"||u>f)return g;var n=f-u+1;if(n>1e7)throw{code:"D2014",stack:new Error().stack,value:n};g=new Array(n);for(var o=u,c=0;o<=f;o++,c++)g[c]=o;return g.sequence=!0,g}async function M(u,f,g){var n=await J(u.rhs,f,g);return g.bind(u.lhs.value,n),n}async function L(u,f,g){var n,o=await J(u.condition,f,g);return r.boolean(o)?n=await J(u.then,f,g):typeof u.else<"u"&&(n=await J(u.else,f,g)),n}async function j(u,f,g){for(var n,o=Xe(g),c=0;c<u.expressions.length;c++)n=await J(u.expressions[c],f,o);return n}function F(u){var f=new $e.RegexEngine(u.value),g=function(n,o){var c;f.lastIndex=o||0;var h=f.exec(n);if(h!==null){if(c={match:h[0],start:h.index,end:h.index+h[0].length,groups:[]},h.length>1)for(var m=1;m<h.length;m++)c.groups.push(h[m]);c.next=function(){if(!(f.lastIndex>=n.length)){var S=g(n,f.lastIndex);if(S&&S.match==="")throw{code:"D1004",stack:new Error().stack,position:u.position,value:u.value.source};return S}}}return c};return g}function Y(u,f,g){var n;return u.value===""?n=f&&f.outerWrapper?f[0]:f:n=g.lookup(u.value),n}async function le(u,f,g){var n,o=f,c=!!f.tupleStream,h=async function(S,P){for(var q=0,Q=0;q===0&&Q<u.terms.length;Q++){var ke=u.terms[Q],ce=S,_e=g;c&&(ce=S["@"],_e=se(g,S));var be=await J(ke.expression,ce,_e);ce=P,_e=g,c&&(ce=P["@"],_e=se(g,P));var Ae=await J(ke.expression,ce,_e),me=typeof be,je=typeof Ae;if(me==="undefined"){q=je==="undefined"?0:1;continue}if(je==="undefined"){q=-1;continue}if(!(me==="string"||me==="number")||!(je==="string"||je==="number"))throw{code:"T2008",stack:new Error().stack,position:u.position,value:me==="string"||me==="number"?Ae:be};if(me!==je)throw{code:"T2007",stack:new Error().stack,position:u.position,value:be,value2:Ae};be!==Ae&&(be<Ae?q=-1:q=1,ke.descending===!0&&(q=-q))}return q===1},m={environment:g,input:f};return n=await r.sort.apply(m,[o,h]),n}function fe(u,f,g){var n=async function(o){if(!(typeof o>"u")){var c=g.lookup("clone");if(!C(c))throw{code:"T2013",stack:new Error().stack,position:u.position};var h=await V(c,[o],null,g),m=await J(u.pattern,h,g);if(typeof m<"u"){Array.isArray(m)||(m=[m]);for(var S=0;S<m.length;S++){var P=m[S];if(P&&(P.isPrototypeOf(h)||P instanceof Object.constructor))throw{code:"D1010",stack:new Error().stack,position:u.position};var q=await J(u.update,P,g),Q=typeof q;if(Q!=="undefined"){if(Q!=="object"||q===null||Array.isArray(q))throw{code:"T2011",stack:new Error().stack,position:u.update.position,value:q};for(var ke in q)P[ke]=q[ke]}if(typeof u.delete<"u"){var ce=await J(u.delete,P,g);if(typeof ce<"u"){var _e=ce;if(Array.isArray(ce)||(ce=[ce]),!_(ce))throw{code:"T2012",stack:new Error().stack,position:u.delete.position,value:_e};for(var be=0;be<ce.length;be++)typeof P=="object"&&P!==null&&delete P[ce[be]]}}}}return h}};return B(n,"<(oa):o>")}var H=U("function($f, $g) { function($x){ $g($f($x)) } }");async function ee(u,f,g){var n,o=await J(u.lhs,f,g);if(u.rhs.type==="function")n=await ue(u.rhs,f,g,{context:o});else{var c=await J(u.rhs,f,g);if(!C(c))throw{code:"T2006",stack:new Error().stack,position:u.position,value:c};if(C(o)){var h=await J(H,null,g);n=await V(h,[o,c],null,g)}else n=await V(c,[o],null,g)}return n}async function ue(u,f,g,n){var o,c=await J(u.procedure,f,g);if(typeof c>"u"&&u.procedure.type==="path"&&g.lookup(u.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:u.position,token:u.procedure.steps[0].value};var h=[];typeof n<"u"&&h.push(n.context);for(var m=0;m<u.arguments.length;m++){const P=await J(u.arguments[m],f,g);if(C(P)){const q=async function(...Q){return await V(P,Q,null,g)};q.arity=K(P),h.push(q)}else h.push(P)}var S=u.procedure.type==="path"?u.procedure.steps[0].value:u.procedure.value;try{typeof c=="object"&&(c.token=S,c.position=u.position),o=await V(c,h,f,g)}catch(P){throw P.position||(P.position=u.position),P.token||(P.token=S),P}return o}async function V(u,f,g,n){var o;for(o=await Te(u,f,g,n);X(o)&&o.thunk===!0;){var c=await J(o.body.procedure,o.input,o.environment);o.body.procedure.type==="variable"&&(c.token=o.body.procedure.value),c.position=o.body.procedure.position;for(var h=[],m=0;m<o.body.arguments.length;m++)h.push(await J(o.body.arguments[m],o.input,o.environment));o=await Te(c,h,g,n)}return o}async function Te(u,f,g,n){var o;try{var c=f;if(u&&(c=De(u.signature,f,g)),X(u))o=await Le(u,c);else if(u&&u._jsonata_function===!0){var h={environment:n,input:g};o=u.implementation.apply(h,c),N(o)&&(o=o.next().value),O(o)&&(o=await o)}else if(typeof u=="function")o=u.apply(g,c),O(o)&&(o=await o);else throw{code:"T1006",stack:new Error().stack}}catch(m){throw u&&(typeof m.token>"u"&&typeof u.token<"u"&&(m.token=u.token),m.position=u.position||m.position),m}return o}function Ke(u,f,g){var n={_jsonata_lambda:!0,input:f,environment:g,arguments:u.arguments,signature:u.signature,body:u.body};return u.thunk===!0&&(n.thunk=!0),n.apply=async function(o,c){return await V(n,c,f,o?o.environment:g)},n}async function Ce(u,f,g){for(var n,o=[],c=0;c<u.arguments.length;c++){var h=u.arguments[c];h.type==="operator"&&h.value==="?"?o.push(h):o.push(await J(h,f,g))}var m=await J(u.procedure,f,g);if(typeof m>"u"&&u.procedure.type==="path"&&g.lookup(u.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:u.position,token:u.procedure.steps[0].value};if(X(m))n=tt(m,o);else if(m&&m._jsonata_function===!0)n=nt(m.implementation,o);else if(typeof m=="function")n=nt(m,o);else throw{code:"T1008",stack:new Error().stack,position:u.position,token:u.procedure.type==="path"?u.procedure.steps[0].value:u.procedure.value};return n}function De(u,f,g){if(typeof u>"u")return f;var n=u.validate(f,g);return n}async function Le(u,f){var g,n=Xe(u.environment);return u.arguments.forEach(function(o,c){n.bind(o.value,f[c])}),typeof u.body=="function"?g=await bt(u.body,n):g=await J(u.body,u.input,n),g}function tt(u,f){var g=Xe(u.environment),n=[];u.arguments.forEach(function(c,h){var m=f[h];m&&m.type==="operator"&&m.value==="?"?n.push(c):g.bind(c.value,m)});var o={_jsonata_lambda:!0,input:u.input,environment:g,arguments:n,body:u.body};return o}function nt(u,f){var g=it(u);g=g.map(function(h){return"$"+h.trim()});var n="function("+g.join(", ")+"){ _ }",o=U(n);o.body=u;var c=tt(o,f);return c}async function bt(u,f){var g=it(u),n=g.map(function(h){return f.lookup(h.trim())}),o={environment:f},c=u.apply(o,n);return O(c)&&(c=await c),c}function it(u){var f=u.toString(),g=/\(([^)]*)\)/.exec(f)[1],n=g.split(",");return n}function B(u,f){var g={_jsonata_function:!0,implementation:u};return typeof f<"u"&&(g.signature=z(f)),g}async function $t(u,f){if(!(typeof u>"u")){var g=this.input;typeof f<"u"&&(g=f,Array.isArray(g)&&!D(g)&&(g=y(g),g.outerWrapper=!0));try{var n=U(u,!1)}catch(c){throw Qe(c),{stack:new Error().stack,code:"D3120",value:c.message,error:c}}try{var o=await J(n,g,this.environment)}catch(c){throw Qe(c),{stack:new Error().stack,code:"D3121",value:c.message,error:c}}return o}}function ft(u){if(!(typeof u>"u"))return JSON.parse(r.string(u))}function Xe(u){var f={};const g={bind:function(o,c){f[o]=c},lookup:function(o){var c;return f.hasOwnProperty(o)?c=f[o]:u&&(c=u.lookup(o)),c},timestamp:u?u.timestamp:null,async:u?u.async:!1,isParallelCall:u?u.isParallelCall:!1,global:u?u.global:{ancestry:[null]}};if(u){var n=u.lookup(Symbol.for("jsonata.__createFrame_push"));n&&n(u,g)}return g}I.bind("sum",B(r.sum,"<a<n>:n>")),I.bind("count",B(r.count,"<a:n>")),I.bind("max",B(r.max,"<a<n>:n>")),I.bind("min",B(r.min,"<a<n>:n>")),I.bind("average",B(r.average,"<a<n>:n>")),I.bind("string",B(r.string,"<x-b?:s>")),I.bind("substring",B(r.substring,"<s-nn?:s>")),I.bind("substringBefore",B(r.substringBefore,"<s-s:s>")),I.bind("substringAfter",B(r.substringAfter,"<s-s:s>")),I.bind("lowercase",B(r.lowercase,"<s-:s>")),I.bind("uppercase",B(r.uppercase,"<s-:s>")),I.bind("length",B(r.length,"<s-:n>")),I.bind("trim",B(r.trim,"<s-:s>")),I.bind("pad",B(r.pad,"<s-ns?:s>")),I.bind("match",B(r.match,"<s-f<s:o>n?:a<o>>")),I.bind("contains",B(r.contains,"<s-(sf):b>")),I.bind("replace",B(r.replace,"<s-(sf)(sf)n?:s>")),I.bind("split",B(r.split,"<s-(sf)n?:a<s>>")),I.bind("join",B(r.join,"<a<s>s?:s>")),I.bind("formatNumber",B(r.formatNumber,"<n-so?:s>")),I.bind("formatBase",B(r.formatBase,"<n-n?:s>")),I.bind("formatInteger",B(t.formatInteger,"<n-s:s>")),I.bind("parseInteger",B(t.parseInteger,"<s-s:n>")),I.bind("number",B(r.number,"<(nsb)-:n>")),I.bind("floor",B(r.floor,"<n-:n>")),I.bind("ceil",B(r.ceil,"<n-:n>")),I.bind("round",B(r.round,"<n-n?:n>")),I.bind("abs",B(r.abs,"<n-:n>")),I.bind("sqrt",B(r.sqrt,"<n-:n>")),I.bind("power",B(r.power,"<n-n:n>")),I.bind("random",B(r.random,"<:n>")),I.bind("boolean",B(r.boolean,"<x-:b>")),I.bind("not",B(r.not,"<x-:b>")),I.bind("map",B(r.map,"<af>")),I.bind("zip",B(r.zip,"<a+>")),I.bind("filter",B(r.filter,"<af>")),I.bind("single",B(r.single,"<af?>")),I.bind("reduce",B(r.foldLeft,"<afj?:j>")),I.bind("sift",B(r.sift,"<o-f?:o>")),I.bind("keys",B(r.keys,"<x-:a<s>>")),I.bind("lookup",B(r.lookup,"<x-s:x>")),I.bind("append",B(r.append,"<xx:a>")),I.bind("exists",B(r.exists,"<x:b>")),I.bind("spread",B(r.spread,"<x-:a<o>>")),I.bind("merge",B(r.merge,"<a<o>:o>")),I.bind("reverse",B(r.reverse,"<a:a>")),I.bind("each",B(r.each,"<o-f:a>")),I.bind("error",B(r.error,"<s?:x>")),I.bind("assert",B(r.assert,"<bs?:x>")),I.bind("type",B(r.type,"<x:s>")),I.bind("sort",B(r.sort,"<af?:a>")),I.bind("shuffle",B(r.shuffle,"<a:a>")),I.bind("distinct",B(r.distinct,"<x:x>")),I.bind("base64encode",B(r.base64encode,"<s-:s>")),I.bind("base64decode",B(r.base64decode,"<s-:s>")),I.bind("encodeUrlComponent",B(r.encodeUrlComponent,"<s-:s>")),I.bind("encodeUrl",B(r.encodeUrl,"<s-:s>")),I.bind("decodeUrlComponent",B(r.decodeUrlComponent,"<s-:s>")),I.bind("decodeUrl",B(r.decodeUrl,"<s-:s>")),I.bind("eval",B($t,"<sx?:x>")),I.bind("toMillis",B(t.toMillis,"<s-s?:n>")),I.bind("fromMillis",B(t.fromMillis,"<n-s?s?:s>")),I.bind("clone",B(ft,"<(oa)-:o>"));var ut={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",D1010:"Attempted to access the Javascript object prototype",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e6. Attempted to allocate {{value}}.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function Qe(u){var f=ut[u.code];if(typeof f<"u"){var g=f.replace(/\{\{\{([^}]+)}}}/g,function(){return u[arguments[1]]});g=g.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(u[arguments[1]])}),u.message=g}}function $e(u,f){var g,n;try{g=U(u,f&&f.recover),n=g.errors,delete g.errors}catch(h){throw Qe(h),h}var o=Xe(I),c=new Date;return o.bind("now",B(function(h,m){return t.fromMillis(c.getTime(),h,m)},"<s?s?:s>")),o.bind("millis",B(function(){return c.getTime()},"<:n>")),f&&f.RegexEngine?$e.RegexEngine=f.RegexEngine:$e.RegexEngine=RegExp,{evaluate:async function(h,m,S){if(typeof n<"u"){var P={code:"S0500",position:0};throw Qe(P),P}if(typeof m<"u"){var q;q=Xe(o);for(var Q in m)q.bind(Q,m[Q])}else q=o;q.bind("$",h),c=new Date,q.timestamp=c,Array.isArray(h)&&!D(h)&&(h=y(h),h.outerWrapper=!0);var ke;try{return ke=await J(g,h,q),typeof S=="function"&&S(null,ke),ke}catch(ce){throw Qe(ce),ce}},assign:function(h,m){o.bind(h,m)},registerFunction:function(h,m,S){var P=B(m,S);o.bind(h,P)},ast:function(){return g},errors:function(){return n}}}return $e.parser=U,$e})();i.exports=Z},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(l,i,e){var t=l("./signature");const r=(()=>{var p={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},U={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
4
- `,r:"\r",t:" "},z=function(k){var _=0,$=k.length,y=function(X,N){var O={type:X,value:N,position:_};return O},D=function(){for(var X=_,N=0,O,K,R=function(J){if(k.charAt(J)==="/"&&N===0){for(var W=0;k.charAt(J-(W+1))==="\\";)W++;if(W%2===0)return!0}return!1};_<$;){var I=k.charAt(_);if(R(_)){if(O=k.substring(X,_),O==="")throw{code:"S0301",stack:new Error().stack,position:_};for(_++,I=k.charAt(_),X=_;I==="i"||I==="m";)_++,I=k.charAt(_);return K=k.substring(X,_)+"g",new RegExp(O,K)}(I==="("||I==="["||I==="{")&&k.charAt(_-1)!=="\\"&&N++,(I===")"||I==="]"||I==="}")&&k.charAt(_-1)!=="\\"&&N--,_++}throw{code:"S0302",stack:new Error().stack,position:_}},C=function(X){if(_>=$)return null;for(var N=k.charAt(_);_<$&&`
5
- \r\v`.indexOf(N)>-1;)_++,N=k.charAt(_);if(N==="/"&&k.charAt(_+1)==="*"){var O=_;for(_+=2,N=k.charAt(_);!(N==="*"&&k.charAt(_+1)==="/");)if(N=k.charAt(++_),_>=$)throw{code:"S0106",stack:new Error().stack,position:O};return _+=2,N=k.charAt(_),C(X)}if(X!==!0&&N==="/")return _++,y("regex",D());if(N==="."&&k.charAt(_+1)===".")return _+=2,y("operator","..");if(N===":"&&k.charAt(_+1)==="=")return _+=2,y("operator",":=");if(N==="!"&&k.charAt(_+1)==="=")return _+=2,y("operator","!=");if(N===">"&&k.charAt(_+1)==="=")return _+=2,y("operator",">=");if(N==="<"&&k.charAt(_+1)==="=")return _+=2,y("operator","<=");if(N==="*"&&k.charAt(_+1)==="*")return _+=2,y("operator","**");if(N==="~"&&k.charAt(_+1)===">")return _+=2,y("operator","~>");if(N==="?"&&k.charAt(_+1)===":")return _+=2,y("operator","?:");if(N==="?"&&k.charAt(_+1)==="?")return _+=2,y("operator","??");if(Object.prototype.hasOwnProperty.call(p,N))return _++,y("operator",N);if(N==='"'||N==="'"){var K=N;_++;for(var R="";_<$;){if(N=k.charAt(_),N==="\\")if(_++,N=k.charAt(_),Object.prototype.hasOwnProperty.call(U,N))R+=U[N];else if(N==="u"){var I=k.substr(_+1,4);if(/^[0-9a-fA-F]+$/.test(I)){var J=parseInt(I,16);R+=String.fromCharCode(J),_+=4}else throw{code:"S0104",stack:new Error().stack,position:_}}else throw{code:"S0103",stack:new Error().stack,position:_,token:N};else{if(N===K)return _++,y("string",R);R+=N}_++}throw{code:"S0101",stack:new Error().stack,position:_}}var W=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,se=W.exec(k.substring(_));if(se!==null){var ve=parseFloat(se[0]);if(!isNaN(ve)&&isFinite(ve))return _+=se[0].length,y("number",ve);throw{code:"S0102",stack:new Error().stack,position:_,token:se[0]}}var he;if(N==="`"){_++;var ye=k.indexOf("`",_);if(ye!==-1)return he=k.substring(_,ye),_=ye+1,y("name",he);throw _=$,{code:"S0105",stack:new Error().stack,position:_}}for(var de=_,Ie;;)if(Ie=k.charAt(de),de===$||`
6
- \r\v`.indexOf(Ie)>-1||Object.prototype.hasOwnProperty.call(p,Ie)){if(k.charAt(_)==="$")return he=k.substring(_+1,de),_=de,y("variable",he);switch(he=k.substring(_,de),_=de,he){case"or":case"in":case"and":return y("operator",he);case"true":return y("value",!0);case"false":return y("value",!1);case"null":return y("value",null);default:return _===$&&he===""?null:y("name",he)}}else de++};return C},Z=function(k,_){var $,y,D={},C=[],X=function(){var d=[];$.id!=="(end)"&&d.push({type:$.type,value:$.value,position:$.position});for(var v=y();v!==null;)d.push(v),v=y();return d},N={nud:function(){var d={code:"S0211",token:this.value,position:this.position};if(_)return d.remaining=X(),d.type="error",C.push(d),d;throw d.stack=new Error().stack,d}},O=function(d,v){var G=D[d];return v=v||0,G?v>=G.lbp&&(G.lbp=v):(G=Object.create(N),G.id=G.value=d,G.lbp=v,D[d]=G),G},K=function(d){if(_){d.remaining=X(),C.push(d);var v=D["(error)"];return $=Object.create(v),$.error=d,$.type="(error)",$}else throw d.stack=new Error().stack,d},R=function(d,v){if(d&&$.id!==d){var G;$.id==="(end)"?G="S0203":G="S0202";var oe={code:G,position:$.position,token:$.value,value:d};return K(oe)}var we=y(v);if(we===null)return $=D["(end)"],$.position=k.length,$;var pe=we.value,b=we.type,x;switch(b){case"name":case"variable":x=D["(name)"];break;case"operator":if(x=D[pe],!x)return K({code:"S0204",stack:new Error().stack,position:we.position,token:pe});break;case"string":case"number":case"value":x=D["(literal)"];break;case"regex":b="regex",x=D["(regex)"];break;default:return K({code:"S0205",stack:new Error().stack,position:we.position,token:pe})}return $=Object.create(x),$.value=pe,$.type=b,$.position=we.position,$},I=function(d){var v,G=$;for(R(null,!0),v=G.nud();d<$.lbp;)G=$,R(),v=G.led(v);return v},J=function(d){var v=O(d,0);v.nud=function(){return this}},W=function(d,v,G){var oe=v||p[d],we=O(d,oe);return we.led=G||function(pe){return this.lhs=pe,this.rhs=I(oe),this.type="binary",this},we},se=function(d,v,G){var oe=O(d,v);return oe.led=G,oe},ve=function(d,v){var G=O(d);return G.nud=v||function(){return this.expression=I(70),this.type="unary",this},G};J("(end)"),J("(name)"),J("(literal)"),J("(regex)"),O(":"),O(";"),O(","),O(")"),O("]"),O("}"),O(".."),W("."),W("+"),W("-"),W("*"),W("/"),W("%"),W("="),W("<"),W(">"),W("!="),W("<="),W(">="),W("&"),W("and"),W("or"),W("in"),J("and"),J("or"),J("in"),ve("-"),W("~>"),W("??",p["??"],function(d){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[d]},this.then=d,this.else=I(0),this}),se("(error)",10,function(d){return this.lhs=d,this.error=$.error,this.remaining=X(),this.type="error",this}),ve("*",function(){return this.type="wildcard",this}),ve("**",function(){return this.type="descendant",this}),ve("%",function(){return this.type="parent",this}),W("(",p["("],function(d){if(this.procedure=d,this.type="function",this.arguments=[],$.id!==")")for(;$.type==="operator"&&$.id==="?"?(this.type="partial",this.arguments.push($),R("?")):this.arguments.push(I(0)),$.id===",";)R(",");if(R(")",!0),d.type==="name"&&(d.value==="function"||d.value==="λ")){if(this.arguments.forEach(function(pe,b){if(pe.type!=="variable")return K({code:"S0208",stack:new Error().stack,position:pe.position,token:pe.value,value:b+1})}),this.type="lambda",$.id==="<"){for(var v=$.position,G=1,oe="<";G>0&&$.id!=="{"&&$.id!=="(end)";){var we=R();we.id===">"?G--:we.id==="<"&&G++,oe+=we.value}R(">");try{this.signature=t(oe)}catch(pe){return pe.position=v+pe.offset,K(pe)}}R("{"),this.body=I(0),R("}")}return this}),ve("(",function(){for(var d=[];$.id!==")"&&(d.push(I(0)),$.id===";");)R(";");return R(")",!0),this.type="block",this.expressions=d,this}),ve("[",function(){var d=[];if($.id!=="]")for(;;){var v=I(0);if($.id===".."){var G={type:"binary",value:"..",position:$.position,lhs:v};R(".."),G.rhs=I(0),v=G}if(d.push(v),$.id!==",")break;R(",")}return R("]",!0),this.expressions=d,this.type="unary",this}),W("[",p["["],function(d){if($.id==="]"){for(var v=d;v&&v.type==="binary"&&v.value==="[";)v=v.lhs;return v.keepArray=!0,R("]"),d}else return this.lhs=d,this.rhs=I(p["]"]),this.type="binary",R("]",!0),this}),W("^",p["^"],function(d){R("(");for(var v=[];;){var G={descending:!1};if($.id==="<"?R("<"):$.id===">"&&(G.descending=!0,R(">")),G.expression=I(0),v.push(G),$.id!==",")break;R(",")}return R(")"),this.lhs=d,this.rhs=v,this.type="binary",this});var he=function(d){var v=[];if($.id!=="}")for(;;){var G=I(0);R(":");var oe=I(0);if(v.push([G,oe]),$.id!==",")break;R(",")}return R("}",!0),typeof d>"u"?(this.lhs=v,this.type="unary"):(this.lhs=d,this.rhs=v,this.type="binary"),this};ve("{",he),W("{",p["{"],he),se(":=",p[":="],function(d){return d.type!=="variable"?K({code:"S0212",stack:new Error().stack,position:d.position,token:d.value}):(this.lhs=d,this.rhs=I(p[":="]-1),this.type="binary",this)}),W("@",p["@"],function(d){return this.lhs=d,this.rhs=I(p["@"]),this.rhs.type!=="variable"?K({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),W("#",p["#"],function(d){return this.lhs=d,this.rhs=I(p["#"]),this.rhs.type!=="variable"?K({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),W("?",p["?"],function(d){return this.type="condition",this.condition=d,this.then=I(0),$.id===":"&&(R(":"),this.else=I(0)),this}),W("?:",p["?:"],function(d){return this.type="condition",this.condition=d,this.then=d,this.else=I(0),this}),ve("|",function(){return this.type="transform",this.pattern=I(0),R("|"),this.update=I(0),$.id===","&&(R(","),this.delete=I(0)),R("|"),this});var ye=function(d){var v;if(d.type==="function"&&!d.predicate){var G={type:"lambda",thunk:!0,arguments:[],position:d.position};G.body=d,v=G}else if(d.type==="condition")d.then=ye(d.then),typeof d.else<"u"&&(d.else=ye(d.else)),v=d;else if(d.type==="block"){var oe=d.expressions.length;oe>0&&(d.expressions[oe-1]=ye(d.expressions[oe-1])),v=d}else v=d;return v},de=0,Ie=0,Je=[],ge=function(d,v){switch(d.type){case"name":case"wildcard":v.level--,v.level===0&&(typeof d.ancestor>"u"||(Je[v.index].slot.label=d.ancestor.label),d.ancestor=v,d.tuple=!0);break;case"parent":v.level++;break;case"block":d.expressions.length>0&&(d.tuple=!0,v=ge(d.expressions[d.expressions.length-1],v));break;case"path":d.tuple=!0;var G=d.steps.length-1;for(v=ge(d.steps[G--],v);v.level>0&&G>=0;)v=ge(d.steps[G--],v);break;default:throw{code:"S0217",token:d.type,position:d.position}}return v},ae=function(d,v){if(typeof v.seekingParent<"u"||v.type==="parent"){var G=typeof v.seekingParent<"u"?v.seekingParent:[];v.type==="parent"&&G.push(v.slot),typeof d.seekingParent>"u"?d.seekingParent=G:Array.prototype.push.apply(d.seekingParent,G)}},Be=function(d){var v=d.steps.length-1,G=d.steps[v],oe=typeof G.seekingParent<"u"?G.seekingParent:[];G.type==="parent"&&oe.push(G.slot);for(var we=0;we<oe.length;we++){var pe=oe[we];for(v=d.steps.length-2;pe.level>0;){if(v<0){typeof d.seekingParent>"u"?d.seekingParent=[pe]:d.seekingParent.push(pe);break}for(var b=d.steps[v--];v>=0&&b.focus&&d.steps[v].focus;)b=d.steps[v--];pe=ge(b,pe)}}},re=function(d){var v;switch(d.type){case"binary":switch(d.value){case".":var G=re(d.lhs);G.type==="path"?v=G:v={type:"path",steps:[G]},G.type==="parent"&&(v.seekingParent=[G.slot]);var oe=re(d.rhs);oe.type==="function"&&oe.procedure.type==="path"&&oe.procedure.steps.length===1&&oe.procedure.steps[0].type==="name"&&v.steps[v.steps.length-1].type==="function"&&(v.steps[v.steps.length-1].nextFunction=oe.procedure.steps[0].value),oe.type==="path"?Array.prototype.push.apply(v.steps,oe.steps):(typeof oe.predicate<"u"&&(oe.stages=oe.predicate,delete oe.predicate),v.steps.push(oe)),v.steps.filter(function(F){if(F.type==="number"||F.type==="value")throw{code:"S0213",stack:new Error().stack,position:F.position,value:F.value};return F.type==="string"}).forEach(function(F){F.type="name"}),v.steps.filter(function(F){return F.keepArray===!0}).length>0&&(v.keepSingletonArray=!0);var we=v.steps[0];we.type==="unary"&&we.value==="["&&(we.consarray=!0);var pe=v.steps[v.steps.length-1];pe.type==="unary"&&pe.value==="["&&(pe.consarray=!0),Be(v);break;case"[":v=re(d.lhs);var b=v,x="predicate";if(v.type==="path"&&(b=v.steps[v.steps.length-1],x="stages"),typeof b.group<"u")throw{code:"S0209",stack:new Error().stack,position:d.position};typeof b[x]>"u"&&(b[x]=[]);var w=re(d.rhs);typeof w.seekingParent<"u"&&(w.seekingParent.forEach(F=>{F.level===1?ge(b,F):F.level--}),ae(b,w)),b[x].push({type:"filter",expr:w,position:d.position});break;case"{":if(v=re(d.lhs),typeof v.group<"u")throw{code:"S0210",stack:new Error().stack,position:d.position};v.group={lhs:d.rhs.map(function(F){return[re(F[0]),re(F[1])]}),position:d.position};break;case"^":v=re(d.lhs),v.type!=="path"&&(v={type:"path",steps:[v]});var E={type:"sort",position:d.position};E.terms=d.rhs.map(function(F){var Y=re(F.expression);return ae(E,Y),{descending:F.descending,expression:Y}}),v.steps.push(E),Be(v);break;case":=":v={type:"bind",value:d.value,position:d.position},v.lhs=re(d.lhs),v.rhs=re(d.rhs),ae(v,v.rhs);break;case"@":if(v=re(d.lhs),b=v,v.type==="path"&&(b=v.steps[v.steps.length-1]),typeof b.stages<"u"||typeof b.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:d.position};if(b.type==="sort")throw{code:"S0216",stack:new Error().stack,position:d.position};d.keepArray&&(b.keepArray=!0),b.focus=d.rhs.value,b.tuple=!0;break;case"#":v=re(d.lhs),b=v,v.type==="path"?b=v.steps[v.steps.length-1]:(v={type:"path",steps:[v]},typeof b.predicate<"u"&&(b.stages=b.predicate,delete b.predicate)),typeof b.stages>"u"?b.index=d.rhs.value:b.stages.push({type:"index",value:d.rhs.value,position:d.position}),b.tuple=!0;break;case"~>":v={type:"apply",value:d.value,position:d.position},v.lhs=re(d.lhs),v.rhs=re(d.rhs),v.keepArray=v.lhs.keepArray||v.rhs.keepArray;break;default:v={type:d.type,value:d.value,position:d.position},v.lhs=re(d.lhs),v.rhs=re(d.rhs),ae(v,v.lhs),ae(v,v.rhs)}break;case"unary":v={type:d.type,value:d.value,position:d.position},d.value==="["?v.expressions=d.expressions.map(function(F){var Y=re(F);return ae(v,Y),Y}):d.value==="{"?v.lhs=d.lhs.map(function(F){var Y=re(F[0]);ae(v,Y);var le=re(F[1]);return ae(v,le),[Y,le]}):(v.expression=re(d.expression),d.value==="-"&&v.expression.type==="number"?(v=v.expression,v.value=-v.value):ae(v,v.expression));break;case"function":case"partial":v={type:d.type,name:d.name,value:d.value,position:d.position},v.arguments=d.arguments.map(function(F){var Y=re(F);return ae(v,Y),Y}),v.procedure=re(d.procedure);break;case"lambda":v={type:d.type,arguments:d.arguments,signature:d.signature,position:d.position};var M=re(d.body);v.body=ye(M);break;case"condition":v={type:d.type,position:d.position},v.condition=re(d.condition),ae(v,v.condition),v.then=re(d.then),ae(v,v.then),typeof d.else<"u"&&(v.else=re(d.else),ae(v,v.else));break;case"transform":v={type:d.type,position:d.position},v.pattern=re(d.pattern),v.update=re(d.update),typeof d.delete<"u"&&(v.delete=re(d.delete));break;case"block":v={type:d.type,position:d.position},v.expressions=d.expressions.map(function(F){var Y=re(F);return ae(v,Y),(Y.consarray||Y.type==="path"&&Y.steps[0].consarray)&&(v.consarray=!0),Y});break;case"name":v={type:"path",steps:[d]},d.keepArray&&(v.keepSingletonArray=!0);break;case"parent":v={type:"parent",slot:{label:"!"+de++,level:1,index:Ie++}},Je.push(v);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":v=d;break;case"operator":if(d.value==="and"||d.value==="or"||d.value==="in")d.type="name",v=re(d);else if(d.value==="?")v=d;else throw{code:"S0201",stack:new Error().stack,position:d.position,token:d.value};break;case"error":v=d,d.lhs&&(v=re(d.lhs));break;default:var L="S0206";d.id==="(end)"&&(L="S0207");var j={code:L,position:d.position,token:d.value};if(_)return C.push(j),{type:"error",error:j};throw j.stack=new Error().stack,j}return d.keepArray&&(v.keepArray=!0),v};y=z(k),R();var Oe=I(0);if($.id!=="(end)"){var qe={code:"S0201",position:$.position,token:$.value};K(qe)}if(Oe=re(Oe),Oe.type==="parent"||typeof Oe.seekingParent<"u")throw{code:"S0217",token:Oe.type,position:Oe.position};return C.length>0&&(Oe.errors=C),Oe};return Z})();i.exports=r},{"./signature":5}],5:[function(l,i,e){var t=l("./utils");const r=(()=>{var p={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function U(z){for(var Z=1,k=[],_={},$=_;Z<z.length;){var y=z.charAt(Z);if(y===":")break;var D=function(){k.push(_),$=_,_={}},C=function(W,se,ve,he){for(var ye=1,de=se;de<W.length;)if(de++,y=W.charAt(de),y===he){if(ye--,ye===0)break}else y===ve&&ye++;return de};switch(y){case"s":case"n":case"b":case"l":case"o":_.regex="["+y+"m]",_.type=y,D();break;case"a":_.regex="[asnblfom]",_.type=y,_.array=!0,D();break;case"f":_.regex="f",_.type=y,D();break;case"j":_.regex="[asnblom]",_.type=y,D();break;case"x":_.regex="[asnblfom]",_.type=y,D();break;case"-":$.context=!0,$.contextRegex=new RegExp($.regex),$.regex+="?";break;case"?":case"+":$.regex+=y;break;case"(":var X=C(z,Z,"(",")"),N=z.substring(Z+1,X);if(N.indexOf("<")===-1)_.regex="["+N+"m]";else throw{code:"S0402",stack:new Error().stack,value:N,offset:Z};_.type="("+N+")",Z=X,D();break;case"<":if($.type==="a"||$.type==="f"){var O=C(z,Z,"<",">");$.subtype=z.substring(Z+1,O),Z=O}else throw{code:"S0401",stack:new Error().stack,value:$.type,offset:Z};break}Z++}var K="^"+k.map(function(W){return"("+W.regex+")"}).join("")+"$",R=new RegExp(K),I=function(W){var se;if(t.isFunction(W))se="f";else{var ve=typeof W;switch(ve){case"string":se="s";break;case"number":se="n";break;case"boolean":se="b";break;case"object":W===null?se="l":Array.isArray(W)?se="a":se="o";break;case"undefined":default:se="m"}}return se},J=function(W,se){for(var ve="^",he=0,ye=0;ye<k.length;ye++){ve+=k[ye].regex;var de=se.match(ve);if(de===null)throw{code:"T0410",stack:new Error().stack,value:W[he],index:he+1};he=de[0].length}throw{code:"T0410",stack:new Error().stack,value:W[he],index:he+1}};return{definition:z,validate:function(W,se){var ve="";W.forEach(function(Ie){ve+=I(Ie)});var he=R.exec(ve);if(he){var ye=[],de=0;return k.forEach(function(Ie,Je){var ge=W[de],ae=he[Je+1];if(ae==="")if(Ie.context&&Ie.contextRegex){var Be=I(se);if(Ie.contextRegex.test(Be))ye.push(se);else throw{code:"T0411",stack:new Error().stack,value:se,index:de+1}}else ye.push(ge),de++;else ae.split("").forEach(function(re){if(Ie.type==="a"){if(re==="m")ge=void 0;else{ge=W[de];var Oe=!0;if(typeof Ie.subtype<"u"){if(re!=="a"&&ae!==Ie.subtype)Oe=!1;else if(re==="a"&&ge.length>0){var qe=I(ge[0]);if(qe!==Ie.subtype.charAt(0))Oe=!1;else{var d=ge.filter(function(v){return I(v)!==qe});Oe=d.length===0}}}if(!Oe)throw{code:"T0412",stack:new Error().stack,value:ge,index:de+1,type:p[Ie.subtype]};re!=="a"&&(ge=[ge])}ye.push(ge),de++}else ye.push(ge),de++})}),ye}J(W,ve)}}}return U})();i.exports=r},{"./utils":6}],6:[function(l,i,e){const t=(()=>{function r(O){var K=!1;if(typeof O=="number"&&(K=!isNaN(O),K&&!isFinite(O)))throw{code:"D1001",value:O,stack:new Error().stack};return K}function p(O){var K=!1;return Array.isArray(O)&&(K=O.filter(function(R){return typeof R!="string"}).length===0),K}function U(O){var K=!1;return Array.isArray(O)&&(K=O.filter(function(R){return!r(R)}).length===0),K}function z(){var O=[];return O.sequence=!0,arguments.length===1&&O.push(arguments[0]),O}function Z(O){return O.sequence===!0&&Array.isArray(O)}function k(O){return O&&(O._jsonata_function===!0||O._jsonata_lambda===!0)||typeof O=="function"}function _(O){var K=typeof O.arity=="number"?O.arity:typeof O.implementation=="function"?O.implementation.length:typeof O.length=="number"?O.length:O.arguments.length;return K}function $(O){return O&&O._jsonata_lambda===!0}var y=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function D(O){return typeof O=="object"&&O!==null&&y in O&&"next"in O&&typeof O.next=="function"}function C(O,K){if(O===K)return!0;if(typeof O=="object"&&typeof K=="object"&&O!==null&&K!==null){if(Array.isArray(O)&&Array.isArray(K)){if(O.length!==K.length)return!1;for(var R=0;R<O.length;R++)if(!C(O[R],K[R]))return!1;return!0}var I=Object.getOwnPropertyNames(O),J=Object.getOwnPropertyNames(K);if(I.length!==J.length)return!1;for(I=I.sort(),J=J.sort(),R=0;R<I.length;R++)if(I[R]!==J[R])return!1;for(R=0;R<I.length;R++){var W=I[R];if(!C(O[W],K[W]))return!1}return!0}return!1}function X(O){return typeof O=="object"&&O!==null&&"then"in O&&typeof O.then=="function"}function N(O){var K=[];for(let R of O)K.push(R);return K}return{isNumeric:r,isArrayOfStrings:p,isArrayOfNumbers:U,createSequence:z,isSequence:Z,isFunction:k,isLambda:$,isIterable:D,getFunctionArity:_,isDeepEqual:C,stringToArray:N,isPromise:X}})();i.exports=t},{}]},{},[3])(3)})})(Ot)),Ot.exports}var rm=tm();const nm=Gc(rm),im=T.object({name:T.literal("data-extract"),code:T.string(),inputData:T.any().optional()});function am(s){return im.parse(s)}async function om(s){try{console.log("[DataExtractBlock] Executing JSONata query:",s.code);const l=await nm(s.code).evaluate(s.inputData);return console.log("[DataExtractBlock] Data extraction successful"),{data:l}}catch(a){return console.error("[DataExtractBlock] Data extraction error:",a),{hasError:!0,message:a instanceof Error?a.message:"Unknown error in data extraction",data:void 0}}}class um{static async executeBlock(a){try{switch(a.name){case"get-text":{const l=rf(a);return await nf(l)}case"attribute-value":{const l=sf(a);return await uf(l)}case"get-value-form":{const l=lf(a);return await df(l)}case"set-value-form":{const l=vf(a);return await gf(l)}case"clear-value-form":{const l=yf(a);return await bf(l)}case"element-exists":{const l=wf(a);return await _f(l)}case"event-click":{const l=If(a);return await xf(l)}case"keypress":{const l=Ef(a);return await Nf(l)}case"wait":{const l=Pf(a);return await zf(l)}case"save-assets":{const l=Lf(a);return await Zf(l)}case"get-element-data":{const l=Rf(a);return await Jf(l)}case"scroll":{const l=Gf(a);return await qf(l)}case"ai-parse-data":{const l=qd(a);return await Kd(l)}case"fetch-api":{const l=Qf(a);return await em(l)}case"data-extract":{const l=am(a);return await om(l)}default:return{hasError:!0,message:`Unknown block type: ${a.name}`,data:null}}}catch(l){return{hasError:!0,message:l instanceof Error?l.message:"Unknown error in block execution",data:null}}}}export{Gd as AiParseDataBlockSchema,et as BaseBlockSchema,um as BlockHandler,hf as ClearValueFormsBlockSchema,im as DataExtractBlockSchema,kf as ElementExistsBlockSchema,Sf as EventClickBlockSchema,Yf as FetchApiBlockSchema,of as GetAttributeValueBlockSchema,Mf as GetElementDataBlockSchema,tf as GetTextBlockSchema,cf as GetValueFormsBlockSchema,Df as KeypressBlockSchema,Cf as SaveAssetsBlockSchema,Wf as ScrollBlockSchema,mf as SetValueFormsBlockSchema,Af as WaitBlockSchema};