@liip/liipgpt 3.0.5 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/button/liipgpt-button.iife.js +93 -5
- package/chat/liipgpt-chat.iife.js +159 -121
- package/config/index.cjs +34 -3
- package/config/index.d.ts +254 -11
- package/config/index.js +34 -3
- package/configurator/_app/env.js +1 -1
- package/configurator/_app/immutable/chunks/B0YFyw9m.js +1 -0
- package/configurator/_app/immutable/chunks/{BnkvG7IB.js → B0sgJJDB.js} +2 -2
- package/configurator/_app/immutable/chunks/B0tfJ4bw.js +15 -0
- package/configurator/_app/immutable/chunks/{BXxSlBOI.js → BRavZ9ND.js} +1 -1
- package/configurator/_app/immutable/chunks/CBLxj_NM.js +1 -0
- package/configurator/_app/immutable/chunks/CDW8Ir6T.js +1 -0
- package/configurator/_app/immutable/chunks/CM-bA1kG.js +143 -0
- package/configurator/_app/immutable/chunks/Cx_YT9bD.js +1 -0
- package/configurator/_app/immutable/chunks/D54U55sL.js +1 -0
- package/configurator/_app/immutable/chunks/DaodQ0aw.js +108 -0
- package/configurator/_app/immutable/chunks/DePuinxN.js +1 -0
- package/configurator/_app/immutable/chunks/{CUzNvOh0.js → DqdGvHNe.js} +1 -1
- package/configurator/_app/immutable/chunks/PRp3cksF.js +3 -0
- package/configurator/_app/immutable/chunks/PtcaWgCK.js +1 -0
- package/configurator/_app/immutable/entry/app.Dr4hHnS-.js +2 -0
- package/configurator/_app/immutable/entry/start.gWhxZZVU.js +1 -0
- package/configurator/_app/immutable/nodes/{0.6Nyp5YF7.js → 0.CA8UGTeg.js} +20 -2
- package/configurator/_app/immutable/nodes/1.D6sPv5-I.js +1 -0
- package/configurator/_app/immutable/nodes/2.7Va_fsEv.js +30 -0
- package/configurator/_app/immutable/nodes/3.BlJceQgE.js +897 -0
- package/configurator/_app/version.json +1 -1
- package/configurator/index.html +10 -10
- package/configurator/sidebar.html +10 -10
- package/index.cjs +99 -7
- package/index.d.ts +579 -28
- package/index.js +99 -7
- package/package.json +1 -1
- package/configurator/_app/immutable/chunks/BPqAw_M_.js +0 -1
- package/configurator/_app/immutable/chunks/BkMkT2yX.js +0 -1
- package/configurator/_app/immutable/chunks/BrRo6Gg5.js +0 -15
- package/configurator/_app/immutable/chunks/CIVexZRw.js +0 -1
- package/configurator/_app/immutable/chunks/Cp1S0mah.js +0 -3
- package/configurator/_app/immutable/chunks/DDyGsrRo.js +0 -1
- package/configurator/_app/immutable/chunks/DP_7kP9j.js +0 -1
- package/configurator/_app/immutable/chunks/HNsM71V8.js +0 -212
- package/configurator/_app/immutable/chunks/TjkIfco8.js +0 -1
- package/configurator/_app/immutable/chunks/w-7tIaYZ.js +0 -1
- package/configurator/_app/immutable/entry/app.WFBs3H0o.js +0 -2
- package/configurator/_app/immutable/entry/start.BSXxI4bC.js +0 -1
- package/configurator/_app/immutable/nodes/1.DQmrEIHy.js +0 -1
- package/configurator/_app/immutable/nodes/2.QtKjmXTG.js +0 -30
- package/configurator/_app/immutable/nodes/3.Cza37V1o.js +0 -897
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const Wr="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Fr="3.0.5";function Xe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var se,we;function Qe(){if(we)return se;we=1;var t=function(k){return e(k)&&!r(k)};function e(v){return!!v&&typeof v=="object"}function r(v){var k=Object.prototype.toString.call(v);return k==="[object RegExp]"||k==="[object Date]"||o(v)}var a=typeof Symbol=="function"&&Symbol.for,n=a?Symbol.for("react.element"):60103;function o(v){return v.$$typeof===n}function s(v){return Array.isArray(v)?[]:{}}function i(v,k){return k.clone!==!1&&k.isMergeableObject(v)?D(s(v),v,k):v}function f(v,k,w){return v.concat(k).map(function(M){return i(M,w)})}function p(v,k){if(!k.customMerge)return D;var w=k.customMerge(v);return typeof w=="function"?w:D}function _(v){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(v).filter(function(k){return Object.propertyIsEnumerable.call(v,k)}):[]}function E(v){return Object.keys(v).concat(_(v))}function J(v,k){try{return k in v}catch{return!1}}function Ge(v,k){return J(v,k)&&!(Object.hasOwnProperty.call(v,k)&&Object.propertyIsEnumerable.call(v,k))}function qe(v,k,w){var M={};return w.isMergeableObject(v)&&E(v).forEach(function(j){M[j]=i(v[j],w)}),E(k).forEach(function(j){Ge(v,j)||(J(v,j)&&w.isMergeableObject(k[j])?M[j]=p(j,w)(v[j],k[j],w):M[j]=i(k[j],w))}),M}function D(v,k,w){w=w||{},w.arrayMerge=w.arrayMerge||f,w.isMergeableObject=w.isMergeableObject||t,w.cloneUnlessOtherwiseSpecified=i;var M=Array.isArray(k),j=Array.isArray(v),Je=M===j;return Je?M?w.arrayMerge(v,k,w):qe(v,k,w):i(k,w)}D.all=function(k,w){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(M,j){return D(M,j,w)},{})};var Ye=D;return se=Ye,se}var Ke=Qe();const er=Xe(Ke),rr=t=>t===null||typeof t!="object",ce=t=>{if(rr(t))return t;if(Array.isArray(t))return t.map(ce);const e=Object.entries(t).filter(([r,a])=>a!==void 0).map(([r,a])=>[r,ce(a)]);return Object.fromEntries(e)},tr=(t,e)=>{const r=ce(e);return er(t,r)},$e={tokens:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},highlight:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}},base:{fontSizeXs:{minRem:.75,maxRem:.875},fontSizeSm:{minRem:1,maxRem:1},fontSizeBody:{minRem:1,maxRem:1.25},fontSizeH3:{minRem:1.125,maxRem:1.5},fontSizeH2:{minRem:1.25,maxRem:1.75},fontSizeH1:{minRem:1.5,maxRem:2},fontWeightNormal:"400",fontWeightBold:"700",fontWeightTitle:"700",lineHeightDefault:"1.5",lineHeightSnug:"1.375",lineHeightTight:"1.25",borderRadius:{minRem:.5,maxRem:.75},lineColor:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)",boxShadow:"0px 0px 2px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"},components:{body:{background:"var(--color-grey-0)",color:"var(--color-grey-900)",focus:{color:"var(--color-highlight-500)"},custom:{selectionColor:"var(--color-grey-0)",selectionBackground:"var(--color-brand-700)",focusWidth:"var(--spacer-3)",focusOffset:"var(--spacer-2)",focusStyle:"solid"}},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},anchor:{color:"var(--color-brand-600)",hover:{color:"var(--color-brand-950)"}},btnPrimary:{color:"var(--color-grey-0)",background:"var(--color-brand-700)",borderRadius:"var(--base-border-radius)",hover:{background:"var(--color-brand-900)"}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-100)",borderRadius:"var(--base-border-radius)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},btnTertiary:{color:"var(--anchor-color)",background:"transparent",borderRadius:"var(--base-border-radius)",hover:{color:"var(--anchor-hover-color)"}},card:{color:"var(--color-grey-900)",background:"var(--color-grey-100)",borderRadius:"var(--base-border-radius)",boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:"var(--base-border-radius)",custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)",placeholderOpacity:"1"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--base-line-color)"},checkbox:{color:"transparent",background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:"0.2em",custom:{checkedColor:"var(--btn-primary-color)",checkedBorderColor:"var(--color-brand-700)",checkedBackground:"var(--color-brand-700)"}},radio:{color:"transparent",background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",custom:{checkedColor:"var(--btn-primary-color)",checkedBorderColor:"var(--color-brand-700)",checkedBackground:"var(--color-brand-700)"}},contextBox:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",boxShadow:"var(--base-box-shadow)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-1000)",titleFontWeight:"var(--base-font-weight-bold)",separatorColor:"var(--base-line-color)",errorColor:"var(--message-error-color)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:"var(--base-border-radius)",boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:"var(--base-border-radius)",borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:"calc(var(--base-border-radius) / 1.25)",hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:"calc(var(--base-border-radius) / 2)"},dialog:{background:"var(--card-background)",color:"var(--body-color)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",boxShadow:"var(--base-box-shadow)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--base-line-color)"}},aside:{background:"var(--card-background)",custom:{width:"400px",containerWidthForMobileLayout:768,backgroundOverlay:"rgba(0, 0, 0, 0.4)",headerColor:"var(--card-color)",headerBorderColor:"var(--base-line-color)",headerBorderWidth:"1px"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--base-line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--body-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:"var(--card-border-radius)"},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesToggle:{color:"var(--anchor-color)",hover:{color:"var(--anchor-hover-color)"}},referenceNumberTrigger:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{padding:"0.25em"}},referenceDomain:{color:"var(--anchor-color)",hover:{color:"var(--anchor-hover-color)"},custom:{padding:"0px"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"},boxShadow:"var(--base-box-shadow)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},reference:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",hover:{color:"var(--card-hover-color)",background:"var(--body-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"}},referenceDescription:{color:"var(--reference-color)",hover:{color:"var(--reference-hover-color)"}},referenceNumber:{color:"var(--reference-number-trigger-color)",background:"var(--body-background)",borderColor:"var(--reference-number-trigger-border-color)",borderWidth:"var(--reference-number-trigger-border-width)",borderRadius:"var(--reference-number-trigger-border-radius)",hover:{color:"var(--reference-number-trigger-color)",background:"var(--reference-number-trigger-background)",borderColor:"var(--reference-number-trigger-border-color)",borderWidth:"var(--reference-number-trigger-border-width)"},custom:{padding:"var(--reference-number-trigger-padding)"}},toast:{background:"var(--card-background)",color:"var(--body-color)",boxShadow:"var(--base-box-shadow)",borderRadius:"var(--card-border-radius)",custom:{iconSuccessColor:"#22c55e",iconErrorColor:"#ef4444",iconWarningColor:"#f97316",iconInfoColor:"#3b82f6"}},tooltip:{background:"var(--color-grey-200)",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)"}},svgs:{predefinedQuestion:`
|
|
1
|
+
const Wr="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Fr="3.1.0";function Xe(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var se,we;function Qe(){if(we)return se;we=1;var t=function(k){return e(k)&&!r(k)};function e(v){return!!v&&typeof v=="object"}function r(v){var k=Object.prototype.toString.call(v);return k==="[object RegExp]"||k==="[object Date]"||o(v)}var a=typeof Symbol=="function"&&Symbol.for,n=a?Symbol.for("react.element"):60103;function o(v){return v.$$typeof===n}function s(v){return Array.isArray(v)?[]:{}}function i(v,k){return k.clone!==!1&&k.isMergeableObject(v)?D(s(v),v,k):v}function f(v,k,w){return v.concat(k).map(function(M){return i(M,w)})}function p(v,k){if(!k.customMerge)return D;var w=k.customMerge(v);return typeof w=="function"?w:D}function _(v){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(v).filter(function(k){return Object.propertyIsEnumerable.call(v,k)}):[]}function E(v){return Object.keys(v).concat(_(v))}function J(v,k){try{return k in v}catch{return!1}}function Ge(v,k){return J(v,k)&&!(Object.hasOwnProperty.call(v,k)&&Object.propertyIsEnumerable.call(v,k))}function qe(v,k,w){var M={};return w.isMergeableObject(v)&&E(v).forEach(function(j){M[j]=i(v[j],w)}),E(k).forEach(function(j){Ge(v,j)||(J(v,j)&&w.isMergeableObject(k[j])?M[j]=p(j,w)(v[j],k[j],w):M[j]=i(k[j],w))}),M}function D(v,k,w){w=w||{},w.arrayMerge=w.arrayMerge||f,w.isMergeableObject=w.isMergeableObject||t,w.cloneUnlessOtherwiseSpecified=i;var M=Array.isArray(k),j=Array.isArray(v),Je=M===j;return Je?M?w.arrayMerge(v,k,w):qe(v,k,w):i(k,w)}D.all=function(k,w){if(!Array.isArray(k))throw new Error("first argument should be an array");return k.reduce(function(M,j){return D(M,j,w)},{})};var Ye=D;return se=Ye,se}var Ke=Qe();const er=Xe(Ke),rr=t=>t===null||typeof t!="object",ce=t=>{if(rr(t))return t;if(Array.isArray(t))return t.map(ce);const e=Object.entries(t).filter(([r,a])=>a!==void 0).map(([r,a])=>[r,ce(a)]);return Object.fromEntries(e)},tr=(t,e)=>{const r=ce(e);return er(t,r)},$e={tokens:{font:{family:"-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif"},colors:{brand:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},highlight:{50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}},base:{fontSizeXs:{minRem:.75,maxRem:.875},fontSizeSm:{minRem:1,maxRem:1},fontSizeBody:{minRem:1,maxRem:1.25},fontSizeH3:{minRem:1.125,maxRem:1.5},fontSizeH2:{minRem:1.25,maxRem:1.75},fontSizeH1:{minRem:1.5,maxRem:2},fontWeightNormal:"400",fontWeightBold:"700",fontWeightTitle:"700",lineHeightDefault:"1.5",lineHeightSnug:"1.375",lineHeightTight:"1.25",borderRadius:{minRem:.5,maxRem:.75},lineColor:"color-mix(in srgb, var(--color-brand-950) 20%, transparent)",boxShadow:"0px 0px 2px rgba(0, 0, 0, 0.15), 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1)"},components:{body:{background:"var(--color-grey-0)",color:"var(--color-grey-900)",focus:{color:"var(--color-highlight-500)"},custom:{selectionColor:"var(--color-grey-0)",selectionBackground:"var(--color-brand-700)",focusWidth:"var(--spacer-3)",focusOffset:"var(--spacer-2)",focusStyle:"solid"}},container:{custom:{maxWidth:"1024px"}},avatar:{color:"var(--color-brand-400)",background:"var(--color-grey-100)"},anchor:{color:"var(--color-brand-600)",hover:{color:"var(--color-brand-950)"}},btnPrimary:{color:"var(--color-grey-0)",background:"var(--color-brand-700)",borderRadius:"var(--base-border-radius)",hover:{background:"var(--color-brand-900)"}},btnSecondary:{color:"var(--color-brand-700)",background:"var(--color-brand-100)",borderRadius:"var(--base-border-radius)",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-200)"}},btnTertiary:{color:"var(--anchor-color)",background:"transparent",borderRadius:"var(--base-border-radius)",hover:{color:"var(--anchor-hover-color)"}},card:{color:"var(--color-grey-900)",background:"var(--color-grey-100)",borderRadius:"var(--base-border-radius)",boxShadow:"none",hover:{color:"var(--color-grey-1000)",background:"var(--color-brand-100)"},custom:{iconColor:"var(--anchor-color)",iconHoverColor:"var(--anchor-hover-color)"}},input:{background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:"var(--base-border-radius)",custom:{padding:"var(--spacer-r-16) var(--spacer-r-20)",placeholderColor:"var(--color-grey-500)",placeholderOpacity:"1"}},label:{color:"var(--color-grey-600)"},hr:{color:"var(--base-line-color)"},checkbox:{color:"transparent",background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",borderRadius:"0.2em",custom:{checkedColor:"var(--btn-primary-color)",checkedBorderColor:"var(--color-brand-700)",checkedBackground:"var(--color-brand-700)"}},radio:{color:"transparent",background:"var(--color-grey-0)",borderColor:"var(--color-grey-300)",borderWidth:"1px",custom:{checkedColor:"var(--btn-primary-color)",checkedBorderColor:"var(--color-brand-700)",checkedBackground:"var(--color-brand-700)"}},contextBox:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",boxShadow:"var(--base-box-shadow)",custom:{transitionDuration:200,transitionDelay:200,transitionY:8,titleColor:"var(--color-grey-1000)",titleFontWeight:"var(--base-font-weight-bold)",separatorColor:"var(--base-line-color)",errorColor:"var(--message-error-color)"}},contextBoxMenuItem:{background:"transparent",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{activeColor:"var(--btn-secondary-hover-color)",activeBackground:"var(--btn-secondary-hover-background)"}},chatFooter:{color:"var(--color-grey-400)",background:"var(--body-background)",borderRadius:"var(--base-border-radius)",boxShadow:"0px -10px 20px 5px color-mix(in srgb, var(--body-background) 90%, transparent)"},chatInput:{color:"var(--color-grey-700)",background:"var(--card-background)",borderRadius:"var(--base-border-radius)",borderColor:"transparent",borderWidth:"3px",hover:{background:"var(--card-hover-background)"},focus:{borderColor:"var(--body-focus-color)"}},chatInputSubmit:{color:"var(--btn-primary-color)",background:"var(--btn-primary-background)",borderRadius:"calc(var(--base-border-radius) / 1.25)",hover:{color:"var(--btn-primary-hover-color)",background:"var(--btn-primary-hover-background)"},custom:{strokeWidth:"2",deactivatedBackground:"var(--color-grey-500)",deactivatedOpacity:"0.25",deactivatedScale:"0.8",deactivatedBorderColor:"var(--color-grey-500)"}},chatInputNotification:{background:"#dd1313",color:"var(--color-grey-0)",borderColor:"#dd1313",borderWidth:"1px",borderRadius:"calc(var(--base-border-radius) / 2)"},dialog:{background:"var(--card-background)",color:"var(--body-color)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",boxShadow:"var(--base-box-shadow)",custom:{transitionDuration:200,transitionDelay:0,transitionY:30,backgroundOverlay:"rgba(0, 0, 0, 0.25)",headerBorderBottomColor:"var(--base-line-color)"}},aside:{background:"var(--card-background)",custom:{width:"400px",containerWidthForMobileLayout:1024,backgroundOverlay:"rgba(0, 0, 0, 0.4)",headerColor:"var(--card-color)",headerBorderColor:"var(--base-line-color)",headerBorderWidth:"1px"}},message:{color:"var(--body-color)",custom:{errorColor:"#C91658",transitionDuration:300,transitionDelay:0,transitionY:30,transitionBotLoadingDelay:300}},messageOptions:{borderColor:"var(--base-line-color)",borderWidth:"1px",custom:{transitionDuration:300,transitionDelay:0,transitionY:30}},messageUser:{color:"var(--body-color)",background:"var(--card-background)",boxShadow:"var(--card-box-shadow)",borderRadius:"var(--card-border-radius)"},openButton:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-background)",borderWidth:"0",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)"}},referencesToggle:{color:"var(--color-brand-700)",hover:{color:"var(--anchor-hover-color)"}},referenceNumberTrigger:{color:"var(--btn-secondary-color)",background:"var(--btn-secondary-background)",borderRadius:"calc(var(--base-border-radius) / 2)",hover:{color:"var(--btn-secondary-hover-color)",background:"var(--btn-secondary-hover-background)"},custom:{padding:"0.25em"}},referenceDomain:{color:"var(--color-brand-700)",hover:{color:"var(--color-brand-800)"},custom:{padding:"0px"}},referenceNumberContent:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",hover:{color:"var(--card-hover-color)",background:"var(--card-hover-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"},boxShadow:"var(--base-box-shadow)",custom:{width:"95cqi",maxWidth:"450px",transitionDuration:200,transitionDelay:200,transitionY:8}},reference:{color:"var(--card-color)",background:"var(--card-background)",borderColor:"var(--card-border-color)",borderWidth:"var(--card-border-width)",borderRadius:"var(--card-border-radius)",hover:{color:"var(--card-hover-color)",background:"var(--body-background)",borderColor:"var(--card-hover-border-color)",borderWidth:"var(--card-hover-border-width)"}},referenceDescription:{color:"var(--reference-color)",hover:{color:"var(--reference-hover-color)"}},referenceNumber:{color:"var(--reference-number-trigger-color)",background:"var(--body-background)",borderColor:"var(--reference-number-trigger-border-color)",borderWidth:"var(--reference-number-trigger-border-width)",borderRadius:"var(--reference-number-trigger-border-radius)",hover:{color:"var(--reference-number-trigger-color)",background:"var(--reference-number-trigger-background)",borderColor:"var(--reference-number-trigger-border-color)",borderWidth:"var(--reference-number-trigger-border-width)"},custom:{padding:"var(--reference-number-trigger-padding)"}},toast:{background:"var(--card-background)",color:"var(--body-color)",boxShadow:"var(--base-box-shadow)",borderRadius:"var(--card-border-radius)",custom:{iconSuccessColor:"#22c55e",iconErrorColor:"#ef4444",iconWarningColor:"#f97316",iconInfoColor:"#3b82f6"}},tooltip:{background:"var(--color-grey-200)",color:"var(--body-color)",borderRadius:"calc(var(--base-border-radius) / 2)"}},svgs:{predefinedQuestion:`
|
|
2
2
|
<svg viewBox="0 0 24 24" >
|
|
3
3
|
<path d="M11 3.5A10.5 10.5 0 0 0 0.5 14v1.5" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
|
|
4
4
|
<path d="M0.5 15.498a5 5 0 1 0 10 0 5 5 0 1 0 -10 0" fill="currentColor" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"></path>
|
|
@@ -266,4 +266,4 @@ const Wr="https://liipgpt.api.dev.genai.liip.ch/liipgpt",Fr="3.0.5";function Xe(
|
|
|
266
266
|
<svg viewBox="0 0 24 24" fill="none">
|
|
267
267
|
<path d="M18 6L10 16L5 11" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
268
268
|
</svg>
|
|
269
|
-
`}}},ar=tr($e,{tokens:{base:{lineColor:"color-mix(in srgb, var(--color-brand-100) 20%, transparent)"},components:{body:{background:"var(--color-grey-900)",color:"var(--color-grey-100)",focus:{color:"var(--color-highlight-400)"},custom:{selectionColor:"var(--color-grey-1000)",selectionBackground:"var(--color-brand-400)"}},avatar:{color:"var(--color-brand-200)",background:"var(--color-grey-800)"},anchor:{color:"var(--color-brand-300)",hover:{color:"var(--color-brand-50)"}},btnPrimary:{color:"var(--color-grey-1000)",background:"var(--color-brand-300)",hover:{background:"var(--color-brand-100)"}},btnSecondary:{color:"var(--color-brand-100)",background:"var(--color-brand-900)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},btnTertiary:{color:"var(--anchor-color)",background:"transparent",borderRadius:"var(--base-border-radius)",hover:{color:"var(--anchor-hover-color)"}},card:{color:"var(--body-color)",background:"var(--color-grey-800)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-900)"}},input:{background:"var(--color-grey-900)",borderColor:"var(--color-grey-700)",custom:{placeholderColor:"var(--color-grey-400)"}},label:{color:"var(--color-grey-50)"},contextBox:{custom:{titleColor:"var(--color-grey-50)"}},referenceDescription:{color:"var(--color-grey-300)",hover:{color:"var(--color-grey-300)"}},chatFooter:{color:"var(--color-grey-500)"},chatInput:{color:"var(--color-grey-100)"},chatInputSubmit:{custom:{deactivatedBackground:"var(--color-grey-400)",deactivatedBorderColor:"var(--color-grey-400)"}},dialog:{custom:{backgroundOverlay:"rgba(0, 0, 0, 0.5)"}},tooltip:{background:"var(--color-grey-1000)"}}}}),oe={fineGrained:{light:$e,dark:ar}},nr=Object.freeze(Object.defineProperty({__proto__:null,theme:oe},Symbol.toStringTag,{value:"Module"})),ye=structuredClone(oe.fineGrained.light);ye.tokens.colors={brand:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#0284c7",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},highlight:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}};const De=structuredClone(oe.fineGrained.dark);De.tokens.colors=ye.tokens.colors;const or={fineGrained:{light:ye,dark:De}},sr=Object.freeze(Object.defineProperty({__proto__:null,theme:or},Symbol.toStringTag,{value:"Module"}));var x;(function(t){t.assertEqual=n=>{};function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{const o={};for(const s of n)o[s]=s;return o},t.getValidEnumValues=n=>{const o=t.objectKeys(n).filter(i=>typeof n[n[i]]!="number"),s={};for(const i of o)s[i]=n[i];return t.objectValues(s)},t.objectValues=n=>t.objectKeys(n).map(function(o){return n[o]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const o=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.push(s);return o},t.find=(n,o)=>{for(const s of n)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,o=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=a,t.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o})(x||(x={}));var Ce;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Ce||(Ce={}));const l=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),B=t=>{switch(typeof t){case"undefined":return l.undefined;case"string":return l.string;case"number":return Number.isNaN(t)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(t)?l.array:t===null?l.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?l.promise:typeof Map<"u"&&t instanceof Map?l.map:typeof Set<"u"&&t instanceof Set?l.set:typeof Date<"u"&&t instanceof Date?l.date:l.object;default:return l.unknown}},d=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(o){return o.message},a={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)a._errors.push(r(s));else{let i=a,f=0;for(;f<s.path.length;){const p=s.path[f];f===s.path.length-1?(i[p]=i[p]||{_errors:[]},i[p]._errors.push(r(s))):i[p]=i[p]||{_errors:[]},i=i[p],f++}}};return n(this),a}static assert(e){if(!(e instanceof I))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},a=[];for(const n of this.issues)if(n.path.length>0){const o=n.path[0];r[o]=r[o]||[],r[o].push(e(n))}else a.push(e(n));return{formErrors:a,fieldErrors:r}}get formErrors(){return this.flatten()}}I.create=t=>new I(t);const le=(t,e)=>{let r;switch(t.code){case d.invalid_type:t.received===l.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:r=`Unrecognized key(s) in object: ${x.joinValues(t.keys,", ")}`;break;case d.invalid_union:r="Invalid input";break;case d.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${x.joinValues(t.options)}`;break;case d.invalid_enum_value:r=`Invalid enum value. Expected ${x.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:r="Invalid function arguments";break;case d.invalid_return_type:r="Invalid function return type";break;case d.invalid_date:r="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:x.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case d.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case d.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case d.custom:r="Invalid input";break;case d.invalid_intersection_types:r="Intersection results could not be merged";break;case d.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:r="Number must be finite";break;default:r=e.defaultError,x.assertNever(t)}return{message:r}};let ir=le;function dr(){return ir}const cr=t=>{const{data:e,path:r,errorMaps:a,issueData:n}=t,o=[...r,...n.path||[]],s={...n,path:o};if(n.message!==void 0)return{...n,path:o,message:n.message};let i="";const f=a.filter(p=>!!p).slice().reverse();for(const p of f)i=p(s,{data:e,defaultError:i}).message;return{...n,path:o,message:i}};function c(t,e){const r=dr(),a=cr({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===le?void 0:le].filter(n=>!!n)});t.common.issues.push(a)}class O{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const a=[];for(const n of r){if(n.status==="aborted")return g;n.status==="dirty"&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,r){const a=[];for(const n of r){const o=await n.key,s=await n.value;a.push({key:o,value:s})}return O.mergeObjectSync(e,a)}static mergeObjectSync(e,r){const a={};for(const n of r){const{key:o,value:s}=n;if(o.status==="aborted"||s.status==="aborted")return g;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(a[o.value]=s.value)}return{status:e.value,value:a}}}const g=Object.freeze({status:"aborted"}),G=t=>({status:"dirty",value:t}),R=t=>({status:"valid",value:t}),Se=t=>t.status==="aborted",je=t=>t.status==="dirty",V=t=>t.status==="valid",Q=t=>typeof Promise<"u"&&t instanceof Promise;var u;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(u||(u={}));class N{constructor(e,r,a,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=a,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Te=(t,e)=>{if(V(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new I(t.common.issues);return this._error=r,this._error}}};function y(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:a,description:n}=t;if(e&&(r||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,i)=>{const{message:f}=t;return s.code==="invalid_enum_value"?{message:f??i.defaultError}:typeof i.data>"u"?{message:f??a??i.defaultError}:s.code!=="invalid_type"?{message:i.defaultError}:{message:f??r??i.defaultError}},description:n}}class b{get description(){return this._def.description}_getType(e){return B(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new O,ctx:{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Q(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const a=this.safeParse(e,r);if(a.success)return a.data;throw a.error}safeParse(e,r){const a={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},n=this._parseSync({data:e,path:a.path,parent:a});return Te(a,n)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:r});return V(a)?{value:a.value}:{issues:r.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(a=>V(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(e,r){const a=await this.safeParseAsync(e,r);if(a.success)return a.data;throw a.error}async safeParseAsync(e,r){const a={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},n=this._parse({data:e,path:a.path,parent:a}),o=await(Q(n)?n:Promise.resolve(n));return Te(a,o)}refine(e,r){const a=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,o)=>{const s=e(n),i=()=>o.addIssue({code:d.custom,...a(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(f=>f?!0:(i(),!1)):s?!0:(i(),!1)})}refinement(e,r){return this._refinement((a,n)=>e(a)?!0:(n.addIssue(typeof r=="function"?r(a,n):r),!1))}_refinement(e){return new F({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return z.create(this,this._def)}nullable(){return H.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return A.create(this)}promise(){return ae.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return re.create(this,e,this._def)}transform(e){return new F({...y(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new pe({...y(this._def),innerType:this,defaultValue:r,typeName:m.ZodDefault})}brand(){return new Nr({typeName:m.ZodBranded,type:this,...y(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new me({...y(this._def),innerType:this,catchValue:r,typeName:m.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ke.create(this,e)}readonly(){return ge.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const lr=/^c[^\s-]{8,}$/i,ur=/^[0-9a-z]+$/,hr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fr=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,pr=/^[a-z0-9_-]{21}$/i,mr=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gr=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,vr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,yr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ie;const kr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,br=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_r=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,xr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Cr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Pe="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Sr=new RegExp(`^${Pe}$`);function Ve(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function jr(t){return new RegExp(`^${Ve(t)}$`)}function Tr(t){let e=`${Pe}T${Ve(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Or(t,e){return!!((e==="v4"||!e)&&kr.test(t)||(e==="v6"||!e)&&_r.test(t))}function Rr(t,e){if(!mr.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const a=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Mr(t,e){return!!((e==="v4"||!e)&&br.test(t)||(e==="v6"||!e)&&xr.test(t))}class Z extends b{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.string,received:o.parsedType}),g}const a=new O;let n;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="max")e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,i=e.data.length<o.value;(s||i)&&(n=this._getOrReturnCtx(e,n),s?c(n,{code:d.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&c(n,{code:d.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if(o.kind==="email")vr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"email",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="emoji")ie||(ie=new RegExp(yr,"u")),ie.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"emoji",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="uuid")fr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"uuid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="nanoid")pr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"nanoid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid")lr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cuid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid2")ur.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cuid2",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="ulid")hr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"ulid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),c(n,{validation:"url",code:d.invalid_string,message:o.message}),a.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"regex",code:d.invalid_string,message:o.message}),a.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):o.kind==="datetime"?Tr(o).test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"datetime",message:o.message}),a.dirty()):o.kind==="date"?Sr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"date",message:o.message}),a.dirty()):o.kind==="time"?jr(o).test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"time",message:o.message}),a.dirty()):o.kind==="duration"?gr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"duration",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="ip"?Or(e.data,o.version)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"ip",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="jwt"?Rr(e.data,o.alg)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"jwt",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="cidr"?Mr(e.data,o.version)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cidr",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="base64"?wr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"base64",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="base64url"?Cr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"base64url",code:d.invalid_string,message:o.message}),a.dirty()):x.assertNever(o);return{status:a.value,value:e.data}}_regex(e,r,a){return this.refinement(n=>e.test(n),{validation:r,code:d.invalid_string,...u.errToObj(a)})}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...u.errToObj(e)})}url(e){return this._addCheck({kind:"url",...u.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...u.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...u.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...u.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...u.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...u.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...u.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...u.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...u.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...u.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...u.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...u.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...u.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...u.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...u.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...u.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...u.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...u.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...u.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...u.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...u.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...u.errToObj(r)})}nonempty(e){return this.min(1,u.errToObj(e))}trim(){return new Z({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Z.create=t=>new Z({checks:[],typeName:m.ZodString,coerce:t?.coerce??!1,...y(t)});function Ar(t,e){const r=(t.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,n=r>a?r:a,o=Number.parseInt(t.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return o%s/10**n}class U extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==l.number){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.number,received:o.parsedType}),g}let a;const n=new O;for(const o of this._def.checks)o.kind==="int"?x.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="multipleOf"?Ar(e.data,o.value)!==0&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_finite,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,u.toString(r))}gt(e,r){return this.setLimit("min",e,!1,u.toString(r))}lte(e,r){return this.setLimit("max",e,!0,u.toString(r))}lt(e,r){return this.setLimit("max",e,!1,u.toString(r))}setLimit(e,r,a,n){return new U({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:a,message:u.toString(n)}]})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:u.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:u.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:u.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:u.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:u.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(r===null||a.value>r)&&(r=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(r)&&Number.isFinite(e)}}U.create=t=>new U({checks:[],typeName:m.ZodNumber,coerce:t?.coerce||!1,...y(t)});class q extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==l.bigint)return this._getInvalidInput(e);let a;const n=new O;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.bigint,received:r.parsedType}),g}gte(e,r){return this.setLimit("min",e,!0,u.toString(r))}gt(e,r){return this.setLimit("min",e,!1,u.toString(r))}lte(e,r){return this.setLimit("max",e,!0,u.toString(r))}lt(e,r){return this.setLimit("max",e,!1,u.toString(r))}setLimit(e,r,a,n){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:a,message:u.toString(n)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:u.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}q.create=t=>new q({checks:[],typeName:m.ZodBigInt,coerce:t?.coerce??!1,...y(t)});class ue extends b{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==l.boolean){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.boolean,received:a.parsedType}),g}return R(e.data)}}ue.create=t=>new ue({typeName:m.ZodBoolean,coerce:t?.coerce||!1,...y(t)});class K extends b{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==l.date){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.date,received:o.parsedType}),g}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_date}),g}const a=new O;let n;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),a.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),a.dirty()):x.assertNever(o);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:u.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:u.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}K.create=t=>new K({checks:[],coerce:t?.coerce||!1,typeName:m.ZodDate,...y(t)});class Oe extends b{_parse(e){if(this._getType(e)!==l.symbol){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.symbol,received:a.parsedType}),g}return R(e.data)}}Oe.create=t=>new Oe({typeName:m.ZodSymbol,...y(t)});class Re extends b{_parse(e){if(this._getType(e)!==l.undefined){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.undefined,received:a.parsedType}),g}return R(e.data)}}Re.create=t=>new Re({typeName:m.ZodUndefined,...y(t)});class Me extends b{_parse(e){if(this._getType(e)!==l.null){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.null,received:a.parsedType}),g}return R(e.data)}}Me.create=t=>new Me({typeName:m.ZodNull,...y(t)});class Ae extends b{constructor(){super(...arguments),this._any=!0}_parse(e){return R(e.data)}}Ae.create=t=>new Ae({typeName:m.ZodAny,...y(t)});class Ne extends b{constructor(){super(...arguments),this._unknown=!0}_parse(e){return R(e.data)}}Ne.create=t=>new Ne({typeName:m.ZodUnknown,...y(t)});class L extends b{_parse(e){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.never,received:r.parsedType}),g}}L.create=t=>new L({typeName:m.ZodNever,...y(t)});class Ze extends b{_parse(e){if(this._getType(e)!==l.undefined){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.void,received:a.parsedType}),g}return R(e.data)}}Ze.create=t=>new Ze({typeName:m.ZodVoid,...y(t)});class A extends b{_parse(e){const{ctx:r,status:a}=this._processInputParams(e),n=this._def;if(r.parsedType!==l.array)return c(r,{code:d.invalid_type,expected:l.array,received:r.parsedType}),g;if(n.exactLength!==null){const s=r.data.length>n.exactLength.value,i=r.data.length<n.exactLength.value;(s||i)&&(c(r,{code:s?d.too_big:d.too_small,minimum:i?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(c(r,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(c(r,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),r.common.async)return Promise.all([...r.data].map((s,i)=>n.type._parseAsync(new N(r,s,r.path,i)))).then(s=>O.mergeArray(a,s));const o=[...r.data].map((s,i)=>n.type._parseSync(new N(r,s,r.path,i)));return O.mergeArray(a,o)}get element(){return this._def.type}min(e,r){return new A({...this._def,minLength:{value:e,message:u.toString(r)}})}max(e,r){return new A({...this._def,maxLength:{value:e,message:u.toString(r)}})}length(e,r){return new A({...this._def,exactLength:{value:e,message:u.toString(r)}})}nonempty(e){return this.min(1,e)}}A.create=(t,e)=>new A({type:t,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...y(e)});function P(t){if(t instanceof C){const e={};for(const r in t.shape){const a=t.shape[r];e[r]=z.create(P(a))}return new C({...t._def,shape:()=>e})}else return t instanceof A?new A({...t._def,type:P(t.element)}):t instanceof z?z.create(P(t.unwrap())):t instanceof H?H.create(P(t.unwrap())):t instanceof $?$.create(t.items.map(e=>P(e))):t}class C extends b{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=x.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==l.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:l.object,received:p.parsedType}),g}const{status:a,ctx:n}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),i=[];if(!(this._def.catchall instanceof L&&this._def.unknownKeys==="strip"))for(const p in n.data)s.includes(p)||i.push(p);const f=[];for(const p of s){const _=o[p],E=n.data[p];f.push({key:{status:"valid",value:p},value:_._parse(new N(n,E,n.path,p)),alwaysSet:p in n.data})}if(this._def.catchall instanceof L){const p=this._def.unknownKeys;if(p==="passthrough")for(const _ of i)f.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(p==="strict")i.length>0&&(c(n,{code:d.unrecognized_keys,keys:i}),a.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const _ of i){const E=n.data[_];f.push({key:{status:"valid",value:_},value:p._parse(new N(n,E,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const _ of f){const E=await _.key,J=await _.value;p.push({key:E,value:J,alwaysSet:_.alwaysSet})}return p}).then(p=>O.mergeObjectSync(a,p)):O.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(e){return u.errToObj,new C({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,a)=>{const n=this._def.errorMap?.(r,a).message??a.defaultError;return r.code==="unrecognized_keys"?{message:u.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new C({...this._def,unknownKeys:"strip"})}passthrough(){return new C({...this._def,unknownKeys:"passthrough"})}extend(e){return new C({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new C({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new C({...this._def,catchall:e})}pick(e){const r={};for(const a of x.objectKeys(e))e[a]&&this.shape[a]&&(r[a]=this.shape[a]);return new C({...this._def,shape:()=>r})}omit(e){const r={};for(const a of x.objectKeys(this.shape))e[a]||(r[a]=this.shape[a]);return new C({...this._def,shape:()=>r})}deepPartial(){return P(this)}partial(e){const r={};for(const a of x.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?r[a]=n:r[a]=n.optional()}return new C({...this._def,shape:()=>r})}required(e){const r={};for(const a of x.objectKeys(this.shape))if(e&&!e[a])r[a]=this.shape[a];else{let o=this.shape[a];for(;o instanceof z;)o=o._def.innerType;r[a]=o}return new C({...this._def,shape:()=>r})}keyof(){return Ue(x.objectKeys(this.shape))}}C.create=(t,e)=>new C({shape:()=>t,unknownKeys:"strip",catchall:L.create(),typeName:m.ZodObject,...y(e)});C.strictCreate=(t,e)=>new C({shape:()=>t,unknownKeys:"strict",catchall:L.create(),typeName:m.ZodObject,...y(e)});C.lazycreate=(t,e)=>new C({shape:t,unknownKeys:"strip",catchall:L.create(),typeName:m.ZodObject,...y(e)});class ee extends b{_parse(e){const{ctx:r}=this._processInputParams(e),a=this._def.options;function n(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return r.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(i=>new I(i.ctx.common.issues));return c(r,{code:d.invalid_union,unionErrors:s}),g}if(r.common.async)return Promise.all(a.map(async o=>{const s={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let o;const s=[];for(const f of a){const p={...r,common:{...r.common,issues:[]},parent:null},_=f._parseSync({data:r.data,path:r.path,parent:p});if(_.status==="valid")return _;_.status==="dirty"&&!o&&(o={result:_,ctx:p}),p.common.issues.length&&s.push(p.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const i=s.map(f=>new I(f));return c(r,{code:d.invalid_union,unionErrors:i}),g}}get options(){return this._def.options}}ee.create=(t,e)=>new ee({options:t,typeName:m.ZodUnion,...y(e)});function he(t,e){const r=B(t),a=B(e);if(t===e)return{valid:!0,data:t};if(r===l.object&&a===l.object){const n=x.objectKeys(e),o=x.objectKeys(t).filter(i=>n.indexOf(i)!==-1),s={...t,...e};for(const i of o){const f=he(t[i],e[i]);if(!f.valid)return{valid:!1};s[i]=f.data}return{valid:!0,data:s}}else if(r===l.array&&a===l.array){if(t.length!==e.length)return{valid:!1};const n=[];for(let o=0;o<t.length;o++){const s=t[o],i=e[o],f=he(s,i);if(!f.valid)return{valid:!1};n.push(f.data)}return{valid:!0,data:n}}else return r===l.date&&a===l.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class re extends b{_parse(e){const{status:r,ctx:a}=this._processInputParams(e),n=(o,s)=>{if(Se(o)||Se(s))return g;const i=he(o.value,s.value);return i.valid?((je(o)||je(s))&&r.dirty(),{status:r.value,value:i.data}):(c(a,{code:d.invalid_intersection_types}),g)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([o,s])=>n(o,s)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}re.create=(t,e,r)=>new re({left:t,right:e,typeName:m.ZodIntersection,...y(r)});class $ extends b{_parse(e){const{status:r,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.array)return c(a,{code:d.invalid_type,expected:l.array,received:a.parsedType}),g;if(a.data.length<this._def.items.length)return c(a,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;!this._def.rest&&a.data.length>this._def.items.length&&(c(a,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...a.data].map((s,i)=>{const f=this._def.items[i]||this._def.rest;return f?f._parse(new N(a,s,a.path,i)):null}).filter(s=>!!s);return a.common.async?Promise.all(o).then(s=>O.mergeArray(r,s)):O.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new $({...this._def,rest:e})}}$.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $({items:t,typeName:m.ZodTuple,rest:null,...y(e)})};class te extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.object)return c(a,{code:d.invalid_type,expected:l.object,received:a.parsedType}),g;const n=[],o=this._def.keyType,s=this._def.valueType;for(const i in a.data)n.push({key:o._parse(new N(a,i,a.path,i)),value:s._parse(new N(a,a.data[i],a.path,i)),alwaysSet:i in a.data});return a.common.async?O.mergeObjectAsync(r,n):O.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,a){return r instanceof b?new te({keyType:e,valueType:r,typeName:m.ZodRecord,...y(a)}):new te({keyType:Z.create(),valueType:e,typeName:m.ZodRecord,...y(r)})}}class Ie extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.map)return c(a,{code:d.invalid_type,expected:l.map,received:a.parsedType}),g;const n=this._def.keyType,o=this._def.valueType,s=[...a.data.entries()].map(([i,f],p)=>({key:n._parse(new N(a,i,a.path,[p,"key"])),value:o._parse(new N(a,f,a.path,[p,"value"]))}));if(a.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const f of s){const p=await f.key,_=await f.value;if(p.status==="aborted"||_.status==="aborted")return g;(p.status==="dirty"||_.status==="dirty")&&r.dirty(),i.set(p.value,_.value)}return{status:r.value,value:i}})}else{const i=new Map;for(const f of s){const p=f.key,_=f.value;if(p.status==="aborted"||_.status==="aborted")return g;(p.status==="dirty"||_.status==="dirty")&&r.dirty(),i.set(p.value,_.value)}return{status:r.value,value:i}}}}Ie.create=(t,e,r)=>new Ie({valueType:e,keyType:t,typeName:m.ZodMap,...y(r)});class Y extends b{_parse(e){const{status:r,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.set)return c(a,{code:d.invalid_type,expected:l.set,received:a.parsedType}),g;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(c(a,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(c(a,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());const o=this._def.valueType;function s(f){const p=new Set;for(const _ of f){if(_.status==="aborted")return g;_.status==="dirty"&&r.dirty(),p.add(_.value)}return{status:r.value,value:p}}const i=[...a.data.values()].map((f,p)=>o._parse(new N(a,f,a.path,p)));return a.common.async?Promise.all(i).then(f=>s(f)):s(i)}min(e,r){return new Y({...this._def,minSize:{value:e,message:u.toString(r)}})}max(e,r){return new Y({...this._def,maxSize:{value:e,message:u.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Y.create=(t,e)=>new Y({valueType:t,minSize:null,maxSize:null,typeName:m.ZodSet,...y(e)});class Ee extends b{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Ee.create=(t,e)=>new Ee({getter:t,typeName:m.ZodLazy,...y(e)});class fe extends b{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return c(r,{received:r.data,code:d.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}fe.create=(t,e)=>new fe({value:t,typeName:m.ZodLiteral,...y(e)});function Ue(t,e){return new W({values:t,typeName:m.ZodEnum,...y(e)})}class W extends b{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),a=this._def.values;return c(r,{expected:x.joinValues(a),received:r.parsedType,code:d.invalid_type}),g}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),a=this._def.values;return c(r,{received:r.data,code:d.invalid_enum_value,options:a}),g}return R(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return W.create(e,{...this._def,...r})}exclude(e,r=this._def){return W.create(this.options.filter(a=>!e.includes(a)),{...this._def,...r})}}W.create=Ue;class Be extends b{_parse(e){const r=x.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==l.string&&a.parsedType!==l.number){const n=x.objectValues(r);return c(a,{expected:x.joinValues(n),received:a.parsedType,code:d.invalid_type}),g}if(this._cache||(this._cache=new Set(x.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=x.objectValues(r);return c(a,{received:a.data,code:d.invalid_enum_value,options:n}),g}return R(e.data)}get enum(){return this._def.values}}Be.create=(t,e)=>new Be({values:t,typeName:m.ZodNativeEnum,...y(e)});class ae extends b{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==l.promise&&r.common.async===!1)return c(r,{code:d.invalid_type,expected:l.promise,received:r.parsedType}),g;const a=r.parsedType===l.promise?r.data:Promise.resolve(r.data);return R(a.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ae.create=(t,e)=>new ae({type:t,typeName:m.ZodPromise,...y(e)});class F extends b{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:a}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:s=>{c(a,s),s.fatal?r.abort():r.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){const s=n.transform(a.data,o);if(a.common.async)return Promise.resolve(s).then(async i=>{if(r.value==="aborted")return g;const f=await this._def.schema._parseAsync({data:i,path:a.path,parent:a});return f.status==="aborted"?g:f.status==="dirty"||r.value==="dirty"?G(f.value):f});{if(r.value==="aborted")return g;const i=this._def.schema._parseSync({data:s,path:a.path,parent:a});return i.status==="aborted"?g:i.status==="dirty"||r.value==="dirty"?G(i.value):i}}if(n.type==="refinement"){const s=i=>{const f=n.refinement(i,o);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(a.common.async===!1){const i=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?g:(i.status==="dirty"&&r.dirty(),s(i.value),{status:r.value,value:i.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(i=>i.status==="aborted"?g:(i.status==="dirty"&&r.dirty(),s(i.value).then(()=>({status:r.value,value:i.value}))))}if(n.type==="transform")if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!V(s))return g;const i=n.transform(s.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:i}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>V(s)?Promise.resolve(n.transform(s.value,o)).then(i=>({status:r.value,value:i})):g);x.assertNever(n)}}F.create=(t,e,r)=>new F({schema:t,typeName:m.ZodEffects,effect:e,...y(r)});F.createWithPreprocess=(t,e,r)=>new F({schema:e,effect:{type:"preprocess",transform:t},typeName:m.ZodEffects,...y(r)});class z extends b{_parse(e){return this._getType(e)===l.undefined?R(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}z.create=(t,e)=>new z({innerType:t,typeName:m.ZodOptional,...y(e)});class H extends b{_parse(e){return this._getType(e)===l.null?R(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}H.create=(t,e)=>new H({innerType:t,typeName:m.ZodNullable,...y(e)});class pe extends b{_parse(e){const{ctx:r}=this._processInputParams(e);let a=r.data;return r.parsedType===l.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}pe.create=(t,e)=>new pe({innerType:t,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class me extends b{_parse(e){const{ctx:r}=this._processInputParams(e),a={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Q(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new I(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}me.create=(t,e)=>new me({innerType:t,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class ze extends b{_parse(e){if(this._getType(e)!==l.nan){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.nan,received:a.parsedType}),g}return{status:"valid",value:e.data}}}ze.create=t=>new ze({typeName:m.ZodNaN,...y(t)});class Nr extends b{_parse(e){const{ctx:r}=this._processInputParams(e),a=r.data;return this._def.type._parse({data:a,path:r.path,parent:r})}unwrap(){return this._def.type}}class ke extends b{_parse(e){const{status:r,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?g:o.status==="dirty"?(r.dirty(),G(o.value)):this._def.out._parseAsync({data:o.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?g:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(e,r){return new ke({in:e,out:r,typeName:m.ZodPipeline})}}class ge extends b{_parse(e){const r=this._def.innerType._parse(e),a=n=>(V(n)&&(n.value=Object.freeze(n.value)),n);return Q(r)?r.then(n=>a(n)):a(r)}unwrap(){return this._def.innerType}}ge.create=(t,e)=>new ge({innerType:t,typeName:m.ZodReadonly,...y(e)});var m;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(m||(m={}));const h=Z.create,ve=U.create,Hr=ue.create;L.create;const Zr=A.create,S=C.create,be=ee.create;re.create;$.create;const _e=te.create,Gr=fe.create,We=W.create;ae.create;z.create;H.create;const Ir=S({minRem:ve(),maxRem:ve()}),T=Ir.or(h()),X=S({0:h().optional(),50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h(),1e3:h().optional()}),de=S({color:h().optional(),background:h().optional(),borderWidth:h().optional(),borderColor:h().optional(),boxShadow:h().optional()}),Er=S({borderRadius:T.optional(),custom:_e(h(),be([h(),ve()])).optional(),hover:de.optional(),focus:de.optional()}).and(de),Br=S({family:h().optional()}),zr=_e(We(["predefinedQuestion","edit","newConversation","voteUp","voteDown","retry","message","messageLoading","thread","submit","abort","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","info","menuClose","chevronDown","chevronUp","chevronTopDown","chevronDownSmall","internalLink","externalLink","liip","avatar","avatarLarge","openChat","speechInput","listUnordered","lightMode","darkMode","avatarLarge","settings","settingsClose","sources","model","checkbox"]),h()),Lr=S({font:Br.optional(),colors:S({brand:X,accent:X.optional(),highlight:X,grey:X}),base:S({fontSizeXs:T.optional(),fontSizeSm:T.optional(),fontSizeBody:T.optional(),fontSizeH3:T.optional(),fontSizeH2:T.optional(),fontSizeH1:T.optional(),fontWeightNormal:h().optional(),fontWeightBold:h().optional(),fontWeightTitle:h().optional(),lineHeightDefault:h().optional(),lineHeightSnug:h().optional(),lineHeightTight:h().optional(),borderRadius:T.optional(),lineColor:h().optional(),boxShadow:h().optional()}),components:_e(h(),Er),svgs:zr}),ne=S({customCSS:h().optional(),fontCSS:h().optional(),fontURLs:h().array().optional(),tokens:Lr});S({light:ne,dark:ne});const $r=S({light:ne,dark:ne}).deepPartial(),Fe=S({50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h()}),He=We(["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]),Le=be([Fe,He]),Dr=be([Fe.and(S({0:h(),1e3:h()})),He]),Pr=S({avatarImageUrl:h().optional(),colors:S({brand:Le.optional(),highlight:Le.optional(),grey:Dr.optional(),background:h().optional(),text:h().optional(),anchor:S({default:h().optional(),hover:h().optional()}).optional()}).optional(),font:S({family:h().optional(),urls:Zr(h()).optional(),sizeXs:T.optional(),sizeSm:T.optional(),sizeBody:T.optional(),sizeH3:T.optional(),sizeH2:T.optional(),sizeH1:T.optional(),weightNormal:h().optional(),weightBold:h().optional(),weightTitle:h().optional()}).optional(),borderRadius:T.optional(),fineGrained:$r.optional()}),Vr=t=>t.split("/").pop().split(".")[0],Ur=Object.assign({"./default/fallback-dev.theme.ts":sr,"./default/fallback.theme.ts":nr}),xe=new Map;Object.entries(Ur).forEach(([t,e])=>{const{error:r,data:a}=Pr.safeParse(e?.theme);if(r){console.error(`Invalid theme in ${t}:`,r);return}xe.set(Vr(t),a)});const qr=t=>{const e=xe.get(t);return e||(console.error(`Theme ${t} not found`),oe)};Array.from(xe.keys());export{Wr as P,Zr as a,Hr as b,Pr as c,er as d,We as e,Vr as f,Xe as g,qr as h,Fr as i,Gr as l,tr as m,ve as n,S as o,_e as r,h as s,oe as t,be as u};
|
|
269
|
+
`}}},ar=tr($e,{tokens:{base:{lineColor:"color-mix(in srgb, var(--color-brand-100) 20%, transparent)"},components:{body:{background:"var(--color-grey-900)",color:"var(--color-grey-100)",focus:{color:"var(--color-highlight-400)"},custom:{selectionColor:"var(--color-grey-1000)",selectionBackground:"var(--color-brand-400)"}},avatar:{color:"var(--color-brand-200)",background:"var(--color-grey-800)"},anchor:{color:"var(--color-brand-300)",hover:{color:"var(--color-brand-50)"}},btnPrimary:{color:"var(--color-grey-1000)",background:"var(--color-brand-300)",hover:{background:"var(--color-brand-100)"}},btnSecondary:{color:"var(--color-brand-100)",background:"var(--color-brand-900)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-800)"}},btnTertiary:{color:"var(--anchor-color)",background:"transparent",borderRadius:"var(--base-border-radius)",hover:{color:"var(--anchor-hover-color)"}},card:{color:"var(--body-color)",background:"var(--color-grey-800)",hover:{color:"var(--color-grey-0)",background:"var(--color-brand-900)"}},input:{background:"var(--color-grey-900)",borderColor:"var(--color-grey-700)",custom:{placeholderColor:"var(--color-grey-400)"}},label:{color:"var(--color-grey-50)"},contextBox:{custom:{titleColor:"var(--color-grey-50)"}},referenceDescription:{color:"var(--color-grey-300)",hover:{color:"var(--color-grey-300)"}},chatFooter:{color:"var(--color-grey-500)"},chatInput:{color:"var(--color-grey-100)"},chatInputSubmit:{custom:{deactivatedBackground:"var(--color-grey-400)",deactivatedBorderColor:"var(--color-grey-400)"}},dialog:{custom:{backgroundOverlay:"rgba(0, 0, 0, 0.5)"}},tooltip:{background:"var(--color-grey-1000)"}}}}),oe={fineGrained:{light:$e,dark:ar}},nr=Object.freeze(Object.defineProperty({__proto__:null,theme:oe},Symbol.toStringTag,{value:"Module"})),ye=structuredClone(oe.fineGrained.light);ye.tokens.colors={brand:{50:"#f0f9ff",100:"#e0f2fe",200:"#bae6fd",300:"#7dd3fc",400:"#38bdf8",500:"#0ea5e9",600:"#037ABA",700:"#0369a1",800:"#075985",900:"#0c4a6e",950:"#082f49"},highlight:{50:"#f5f3ff",100:"#ede9fe",200:"#ddd6fe",300:"#c4b5fd",400:"#a78bfa",500:"#8b5cf6",600:"#7c3aed",700:"#6d28d9",800:"#5b21b6",900:"#4c1d95",950:"#2e1065"},grey:{0:"#ffffff",50:"#f9fafb",100:"#f3f4f6",200:"#e5e7eb",300:"#d1d5db",400:"#9ca3af",500:"#6b7280",600:"#4b5563",700:"#374151",800:"#2d3748",900:"#1a202c",950:"#171923",1e3:"#000000"}};const De=structuredClone(oe.fineGrained.dark);De.tokens.colors=ye.tokens.colors;const or={fineGrained:{light:ye,dark:De}},sr=Object.freeze(Object.defineProperty({__proto__:null,theme:or},Symbol.toStringTag,{value:"Module"}));var x;(function(t){t.assertEqual=n=>{};function e(n){}t.assertIs=e;function r(n){throw new Error}t.assertNever=r,t.arrayToEnum=n=>{const o={};for(const s of n)o[s]=s;return o},t.getValidEnumValues=n=>{const o=t.objectKeys(n).filter(i=>typeof n[n[i]]!="number"),s={};for(const i of o)s[i]=n[i];return t.objectValues(s)},t.objectValues=n=>t.objectKeys(n).map(function(o){return n[o]}),t.objectKeys=typeof Object.keys=="function"?n=>Object.keys(n):n=>{const o=[];for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&o.push(s);return o},t.find=(n,o)=>{for(const s of n)if(o(s))return s},t.isInteger=typeof Number.isInteger=="function"?n=>Number.isInteger(n):n=>typeof n=="number"&&Number.isFinite(n)&&Math.floor(n)===n;function a(n,o=" | "){return n.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}t.joinValues=a,t.jsonStringifyReplacer=(n,o)=>typeof o=="bigint"?o.toString():o})(x||(x={}));var Ce;(function(t){t.mergeShapes=(e,r)=>({...e,...r})})(Ce||(Ce={}));const l=x.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),B=t=>{switch(typeof t){case"undefined":return l.undefined;case"string":return l.string;case"number":return Number.isNaN(t)?l.nan:l.number;case"boolean":return l.boolean;case"function":return l.function;case"bigint":return l.bigint;case"symbol":return l.symbol;case"object":return Array.isArray(t)?l.array:t===null?l.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?l.promise:typeof Map<"u"&&t instanceof Map?l.map:typeof Set<"u"&&t instanceof Set?l.set:typeof Date<"u"&&t instanceof Date?l.date:l.object;default:return l.unknown}},d=x.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class I extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=a=>{this.issues=[...this.issues,a]},this.addIssues=(a=[])=>{this.issues=[...this.issues,...a]};const r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e}format(e){const r=e||function(o){return o.message},a={_errors:[]},n=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(n);else if(s.code==="invalid_return_type")n(s.returnTypeError);else if(s.code==="invalid_arguments")n(s.argumentsError);else if(s.path.length===0)a._errors.push(r(s));else{let i=a,f=0;for(;f<s.path.length;){const p=s.path[f];f===s.path.length-1?(i[p]=i[p]||{_errors:[]},i[p]._errors.push(r(s))):i[p]=i[p]||{_errors:[]},i=i[p],f++}}};return n(this),a}static assert(e){if(!(e instanceof I))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,x.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){const r={},a=[];for(const n of this.issues)if(n.path.length>0){const o=n.path[0];r[o]=r[o]||[],r[o].push(e(n))}else a.push(e(n));return{formErrors:a,fieldErrors:r}}get formErrors(){return this.flatten()}}I.create=t=>new I(t);const le=(t,e)=>{let r;switch(t.code){case d.invalid_type:t.received===l.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case d.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,x.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:r=`Unrecognized key(s) in object: ${x.joinValues(t.keys,", ")}`;break;case d.invalid_union:r="Invalid input";break;case d.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${x.joinValues(t.options)}`;break;case d.invalid_enum_value:r=`Invalid enum value. Expected ${x.joinValues(t.options)}, received '${t.received}'`;break;case d.invalid_arguments:r="Invalid function arguments";break;case d.invalid_return_type:r="Invalid function return type";break;case d.invalid_date:r="Invalid date";break;case d.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:x.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case d.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="bigint"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case d.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case d.custom:r="Invalid input";break;case d.invalid_intersection_types:r="Intersection results could not be merged";break;case d.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case d.not_finite:r="Number must be finite";break;default:r=e.defaultError,x.assertNever(t)}return{message:r}};let ir=le;function dr(){return ir}const cr=t=>{const{data:e,path:r,errorMaps:a,issueData:n}=t,o=[...r,...n.path||[]],s={...n,path:o};if(n.message!==void 0)return{...n,path:o,message:n.message};let i="";const f=a.filter(p=>!!p).slice().reverse();for(const p of f)i=p(s,{data:e,defaultError:i}).message;return{...n,path:o,message:i}};function c(t,e){const r=dr(),a=cr({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,r,r===le?void 0:le].filter(n=>!!n)});t.common.issues.push(a)}class O{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,r){const a=[];for(const n of r){if(n.status==="aborted")return g;n.status==="dirty"&&e.dirty(),a.push(n.value)}return{status:e.value,value:a}}static async mergeObjectAsync(e,r){const a=[];for(const n of r){const o=await n.key,s=await n.value;a.push({key:o,value:s})}return O.mergeObjectSync(e,a)}static mergeObjectSync(e,r){const a={};for(const n of r){const{key:o,value:s}=n;if(o.status==="aborted"||s.status==="aborted")return g;o.status==="dirty"&&e.dirty(),s.status==="dirty"&&e.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||n.alwaysSet)&&(a[o.value]=s.value)}return{status:e.value,value:a}}}const g=Object.freeze({status:"aborted"}),G=t=>({status:"dirty",value:t}),R=t=>({status:"valid",value:t}),Se=t=>t.status==="aborted",je=t=>t.status==="dirty",V=t=>t.status==="valid",Q=t=>typeof Promise<"u"&&t instanceof Promise;var u;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e?.message})(u||(u={}));class N{constructor(e,r,a,n){this._cachedPath=[],this.parent=e,this.data=r,this._path=a,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const Te=(t,e)=>{if(V(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const r=new I(t.common.issues);return this._error=r,this._error}}};function y(t){if(!t)return{};const{errorMap:e,invalid_type_error:r,required_error:a,description:n}=t;if(e&&(r||a))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:n}:{errorMap:(s,i)=>{const{message:f}=t;return s.code==="invalid_enum_value"?{message:f??i.defaultError}:typeof i.data>"u"?{message:f??a??i.defaultError}:s.code!=="invalid_type"?{message:i.defaultError}:{message:f??r??i.defaultError}},description:n}}class b{get description(){return this._def.description}_getType(e){return B(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new O,ctx:{common:e.parent.common,data:e.data,parsedType:B(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const r=this._parse(e);if(Q(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){const r=this._parse(e);return Promise.resolve(r)}parse(e,r){const a=this.safeParse(e,r);if(a.success)return a.data;throw a.error}safeParse(e,r){const a={common:{issues:[],async:r?.async??!1,contextualErrorMap:r?.errorMap},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},n=this._parseSync({data:e,path:a.path,parent:a});return Te(a,n)}"~validate"(e){const r={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)};if(!this["~standard"].async)try{const a=this._parseSync({data:e,path:[],parent:r});return V(a)?{value:a.value}:{issues:r.common.issues}}catch(a){a?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),r.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:r}).then(a=>V(a)?{value:a.value}:{issues:r.common.issues})}async parseAsync(e,r){const a=await this.safeParseAsync(e,r);if(a.success)return a.data;throw a.error}async safeParseAsync(e,r){const a={common:{issues:[],contextualErrorMap:r?.errorMap,async:!0},path:r?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:B(e)},n=this._parse({data:e,path:a.path,parent:a}),o=await(Q(n)?n:Promise.resolve(n));return Te(a,o)}refine(e,r){const a=n=>typeof r=="string"||typeof r>"u"?{message:r}:typeof r=="function"?r(n):r;return this._refinement((n,o)=>{const s=e(n),i=()=>o.addIssue({code:d.custom,...a(n)});return typeof Promise<"u"&&s instanceof Promise?s.then(f=>f?!0:(i(),!1)):s?!0:(i(),!1)})}refinement(e,r){return this._refinement((a,n)=>e(a)?!0:(n.addIssue(typeof r=="function"?r(a,n):r),!1))}_refinement(e){return new F({schema:this,typeName:m.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:r=>this["~validate"](r)}}optional(){return z.create(this,this._def)}nullable(){return H.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return A.create(this)}promise(){return ae.create(this,this._def)}or(e){return ee.create([this,e],this._def)}and(e){return re.create(this,e,this._def)}transform(e){return new F({...y(this._def),schema:this,typeName:m.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const r=typeof e=="function"?e:()=>e;return new pe({...y(this._def),innerType:this,defaultValue:r,typeName:m.ZodDefault})}brand(){return new Nr({typeName:m.ZodBranded,type:this,...y(this._def)})}catch(e){const r=typeof e=="function"?e:()=>e;return new me({...y(this._def),innerType:this,catchValue:r,typeName:m.ZodCatch})}describe(e){const r=this.constructor;return new r({...this._def,description:e})}pipe(e){return ke.create(this,e)}readonly(){return ge.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const lr=/^c[^\s-]{8,}$/i,ur=/^[0-9a-z]+$/,hr=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fr=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,pr=/^[a-z0-9_-]{21}$/i,mr=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,gr=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,vr=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,yr="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let ie;const kr=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,br=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,_r=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,xr=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wr=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Cr=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Pe="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Sr=new RegExp(`^${Pe}$`);function Ve(t){let e="[0-5]\\d";t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`);const r=t.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${r}`}function jr(t){return new RegExp(`^${Ve(t)}$`)}function Tr(t){let e=`${Pe}T${Ve(t)}`;const r=[];return r.push(t.local?"Z?":"Z"),t.offset&&r.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${r.join("|")})`,new RegExp(`^${e}$`)}function Or(t,e){return!!((e==="v4"||!e)&&kr.test(t)||(e==="v6"||!e)&&_r.test(t))}function Rr(t,e){if(!mr.test(t))return!1;try{const[r]=t.split(".");if(!r)return!1;const a=r.replace(/-/g,"+").replace(/_/g,"/").padEnd(r.length+(4-r.length%4)%4,"="),n=JSON.parse(atob(a));return!(typeof n!="object"||n===null||"typ"in n&&n?.typ!=="JWT"||!n.alg||e&&n.alg!==e)}catch{return!1}}function Mr(t,e){return!!((e==="v4"||!e)&&br.test(t)||(e==="v6"||!e)&&xr.test(t))}class Z extends b{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==l.string){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.string,received:o.parsedType}),g}const a=new O;let n;for(const o of this._def.checks)if(o.kind==="min")e.data.length<o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="max")e.data.length>o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),a.dirty());else if(o.kind==="length"){const s=e.data.length>o.value,i=e.data.length<o.value;(s||i)&&(n=this._getOrReturnCtx(e,n),s?c(n,{code:d.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):i&&c(n,{code:d.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),a.dirty())}else if(o.kind==="email")vr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"email",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="emoji")ie||(ie=new RegExp(yr,"u")),ie.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"emoji",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="uuid")fr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"uuid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="nanoid")pr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"nanoid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid")lr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cuid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="cuid2")ur.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cuid2",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="ulid")hr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"ulid",code:d.invalid_string,message:o.message}),a.dirty());else if(o.kind==="url")try{new URL(e.data)}catch{n=this._getOrReturnCtx(e,n),c(n,{validation:"url",code:d.invalid_string,message:o.message}),a.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"regex",code:d.invalid_string,message:o.message}),a.dirty())):o.kind==="trim"?e.data=e.data.trim():o.kind==="includes"?e.data.includes(o.value,o.position)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),a.dirty()):o.kind==="toLowerCase"?e.data=e.data.toLowerCase():o.kind==="toUpperCase"?e.data=e.data.toUpperCase():o.kind==="startsWith"?e.data.startsWith(o.value)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{startsWith:o.value},message:o.message}),a.dirty()):o.kind==="endsWith"?e.data.endsWith(o.value)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:{endsWith:o.value},message:o.message}),a.dirty()):o.kind==="datetime"?Tr(o).test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"datetime",message:o.message}),a.dirty()):o.kind==="date"?Sr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"date",message:o.message}),a.dirty()):o.kind==="time"?jr(o).test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{code:d.invalid_string,validation:"time",message:o.message}),a.dirty()):o.kind==="duration"?gr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"duration",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="ip"?Or(e.data,o.version)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"ip",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="jwt"?Rr(e.data,o.alg)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"jwt",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="cidr"?Mr(e.data,o.version)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"cidr",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="base64"?wr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"base64",code:d.invalid_string,message:o.message}),a.dirty()):o.kind==="base64url"?Cr.test(e.data)||(n=this._getOrReturnCtx(e,n),c(n,{validation:"base64url",code:d.invalid_string,message:o.message}),a.dirty()):x.assertNever(o);return{status:a.value,value:e.data}}_regex(e,r,a){return this.refinement(n=>e.test(n),{validation:r,code:d.invalid_string,...u.errToObj(a)})}_addCheck(e){return new Z({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...u.errToObj(e)})}url(e){return this._addCheck({kind:"url",...u.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...u.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...u.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...u.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...u.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...u.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...u.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...u.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...u.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...u.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...u.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...u.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...u.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...u.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...u.errToObj(e)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...u.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r?.position,...u.errToObj(r?.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...u.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...u.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...u.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...u.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...u.errToObj(r)})}nonempty(e){return this.min(1,u.errToObj(e))}trim(){return new Z({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Z({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}Z.create=t=>new Z({checks:[],typeName:m.ZodString,coerce:t?.coerce??!1,...y(t)});function Ar(t,e){const r=(t.toString().split(".")[1]||"").length,a=(e.toString().split(".")[1]||"").length,n=r>a?r:a,o=Number.parseInt(t.toFixed(n).replace(".","")),s=Number.parseInt(e.toFixed(n).replace(".",""));return o%s/10**n}class U extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==l.number){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.number,received:o.parsedType}),g}let a;const n=new O;for(const o of this._def.checks)o.kind==="int"?x.isInteger(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.invalid_type,expected:"integer",received:"float",message:o.message}),n.dirty()):o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),n.dirty()):o.kind==="multipleOf"?Ar(e.data,o.value)!==0&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):o.kind==="finite"?Number.isFinite(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_finite,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,u.toString(r))}gt(e,r){return this.setLimit("min",e,!1,u.toString(r))}lte(e,r){return this.setLimit("max",e,!0,u.toString(r))}lt(e,r){return this.setLimit("max",e,!1,u.toString(r))}setLimit(e,r,a,n){return new U({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:a,message:u.toString(n)}]})}_addCheck(e){return new U({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:u.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:u.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:u.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:u.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:u.toString(e)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&x.isInteger(e.value))}get isFinite(){let e=null,r=null;for(const a of this._def.checks){if(a.kind==="finite"||a.kind==="int"||a.kind==="multipleOf")return!0;a.kind==="min"?(r===null||a.value>r)&&(r=a.value):a.kind==="max"&&(e===null||a.value<e)&&(e=a.value)}return Number.isFinite(r)&&Number.isFinite(e)}}U.create=t=>new U({checks:[],typeName:m.ZodNumber,coerce:t?.coerce||!1,...y(t)});class q extends b{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==l.bigint)return this._getInvalidInput(e);let a;const n=new O;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?e.data<o.value:e.data<=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="max"?(o.inclusive?e.data>o.value:e.data>=o.value)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),n.dirty()):o.kind==="multipleOf"?e.data%o.value!==BigInt(0)&&(a=this._getOrReturnCtx(e,a),c(a,{code:d.not_multiple_of,multipleOf:o.value,message:o.message}),n.dirty()):x.assertNever(o);return{status:n.value,value:e.data}}_getInvalidInput(e){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.bigint,received:r.parsedType}),g}gte(e,r){return this.setLimit("min",e,!0,u.toString(r))}gt(e,r){return this.setLimit("min",e,!1,u.toString(r))}lte(e,r){return this.setLimit("max",e,!0,u.toString(r))}lt(e,r){return this.setLimit("max",e,!1,u.toString(r))}setLimit(e,r,a,n){return new q({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:a,message:u.toString(n)}]})}_addCheck(e){return new q({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:u.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:u.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:u.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:u.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:u.toString(r)})}get minValue(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}}q.create=t=>new q({checks:[],typeName:m.ZodBigInt,coerce:t?.coerce??!1,...y(t)});class ue extends b{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==l.boolean){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.boolean,received:a.parsedType}),g}return R(e.data)}}ue.create=t=>new ue({typeName:m.ZodBoolean,coerce:t?.coerce||!1,...y(t)});class K extends b{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==l.date){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_type,expected:l.date,received:o.parsedType}),g}if(Number.isNaN(e.data.getTime())){const o=this._getOrReturnCtx(e);return c(o,{code:d.invalid_date}),g}const a=new O;let n;for(const o of this._def.checks)o.kind==="min"?e.data.getTime()<o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),a.dirty()):o.kind==="max"?e.data.getTime()>o.value&&(n=this._getOrReturnCtx(e,n),c(n,{code:d.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),a.dirty()):x.assertNever(o);return{status:a.value,value:new Date(e.data.getTime())}}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:u.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:u.toString(r)})}get minDate(){let e=null;for(const r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}}K.create=t=>new K({checks:[],coerce:t?.coerce||!1,typeName:m.ZodDate,...y(t)});class Oe extends b{_parse(e){if(this._getType(e)!==l.symbol){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.symbol,received:a.parsedType}),g}return R(e.data)}}Oe.create=t=>new Oe({typeName:m.ZodSymbol,...y(t)});class Re extends b{_parse(e){if(this._getType(e)!==l.undefined){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.undefined,received:a.parsedType}),g}return R(e.data)}}Re.create=t=>new Re({typeName:m.ZodUndefined,...y(t)});class Me extends b{_parse(e){if(this._getType(e)!==l.null){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.null,received:a.parsedType}),g}return R(e.data)}}Me.create=t=>new Me({typeName:m.ZodNull,...y(t)});class Ae extends b{constructor(){super(...arguments),this._any=!0}_parse(e){return R(e.data)}}Ae.create=t=>new Ae({typeName:m.ZodAny,...y(t)});class Ne extends b{constructor(){super(...arguments),this._unknown=!0}_parse(e){return R(e.data)}}Ne.create=t=>new Ne({typeName:m.ZodUnknown,...y(t)});class L extends b{_parse(e){const r=this._getOrReturnCtx(e);return c(r,{code:d.invalid_type,expected:l.never,received:r.parsedType}),g}}L.create=t=>new L({typeName:m.ZodNever,...y(t)});class Ze extends b{_parse(e){if(this._getType(e)!==l.undefined){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.void,received:a.parsedType}),g}return R(e.data)}}Ze.create=t=>new Ze({typeName:m.ZodVoid,...y(t)});class A extends b{_parse(e){const{ctx:r,status:a}=this._processInputParams(e),n=this._def;if(r.parsedType!==l.array)return c(r,{code:d.invalid_type,expected:l.array,received:r.parsedType}),g;if(n.exactLength!==null){const s=r.data.length>n.exactLength.value,i=r.data.length<n.exactLength.value;(s||i)&&(c(r,{code:s?d.too_big:d.too_small,minimum:i?n.exactLength.value:void 0,maximum:s?n.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:n.exactLength.message}),a.dirty())}if(n.minLength!==null&&r.data.length<n.minLength.value&&(c(r,{code:d.too_small,minimum:n.minLength.value,type:"array",inclusive:!0,exact:!1,message:n.minLength.message}),a.dirty()),n.maxLength!==null&&r.data.length>n.maxLength.value&&(c(r,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),a.dirty()),r.common.async)return Promise.all([...r.data].map((s,i)=>n.type._parseAsync(new N(r,s,r.path,i)))).then(s=>O.mergeArray(a,s));const o=[...r.data].map((s,i)=>n.type._parseSync(new N(r,s,r.path,i)));return O.mergeArray(a,o)}get element(){return this._def.type}min(e,r){return new A({...this._def,minLength:{value:e,message:u.toString(r)}})}max(e,r){return new A({...this._def,maxLength:{value:e,message:u.toString(r)}})}length(e,r){return new A({...this._def,exactLength:{value:e,message:u.toString(r)}})}nonempty(e){return this.min(1,e)}}A.create=(t,e)=>new A({type:t,minLength:null,maxLength:null,exactLength:null,typeName:m.ZodArray,...y(e)});function P(t){if(t instanceof C){const e={};for(const r in t.shape){const a=t.shape[r];e[r]=z.create(P(a))}return new C({...t._def,shape:()=>e})}else return t instanceof A?new A({...t._def,type:P(t.element)}):t instanceof z?z.create(P(t.unwrap())):t instanceof H?H.create(P(t.unwrap())):t instanceof $?$.create(t.items.map(e=>P(e))):t}class C extends b{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),r=x.objectKeys(e);return this._cached={shape:e,keys:r},this._cached}_parse(e){if(this._getType(e)!==l.object){const p=this._getOrReturnCtx(e);return c(p,{code:d.invalid_type,expected:l.object,received:p.parsedType}),g}const{status:a,ctx:n}=this._processInputParams(e),{shape:o,keys:s}=this._getCached(),i=[];if(!(this._def.catchall instanceof L&&this._def.unknownKeys==="strip"))for(const p in n.data)s.includes(p)||i.push(p);const f=[];for(const p of s){const _=o[p],E=n.data[p];f.push({key:{status:"valid",value:p},value:_._parse(new N(n,E,n.path,p)),alwaysSet:p in n.data})}if(this._def.catchall instanceof L){const p=this._def.unknownKeys;if(p==="passthrough")for(const _ of i)f.push({key:{status:"valid",value:_},value:{status:"valid",value:n.data[_]}});else if(p==="strict")i.length>0&&(c(n,{code:d.unrecognized_keys,keys:i}),a.dirty());else if(p!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const p=this._def.catchall;for(const _ of i){const E=n.data[_];f.push({key:{status:"valid",value:_},value:p._parse(new N(n,E,n.path,_)),alwaysSet:_ in n.data})}}return n.common.async?Promise.resolve().then(async()=>{const p=[];for(const _ of f){const E=await _.key,J=await _.value;p.push({key:E,value:J,alwaysSet:_.alwaysSet})}return p}).then(p=>O.mergeObjectSync(a,p)):O.mergeObjectSync(a,f)}get shape(){return this._def.shape()}strict(e){return u.errToObj,new C({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,a)=>{const n=this._def.errorMap?.(r,a).message??a.defaultError;return r.code==="unrecognized_keys"?{message:u.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new C({...this._def,unknownKeys:"strip"})}passthrough(){return new C({...this._def,unknownKeys:"passthrough"})}extend(e){return new C({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new C({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:m.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new C({...this._def,catchall:e})}pick(e){const r={};for(const a of x.objectKeys(e))e[a]&&this.shape[a]&&(r[a]=this.shape[a]);return new C({...this._def,shape:()=>r})}omit(e){const r={};for(const a of x.objectKeys(this.shape))e[a]||(r[a]=this.shape[a]);return new C({...this._def,shape:()=>r})}deepPartial(){return P(this)}partial(e){const r={};for(const a of x.objectKeys(this.shape)){const n=this.shape[a];e&&!e[a]?r[a]=n:r[a]=n.optional()}return new C({...this._def,shape:()=>r})}required(e){const r={};for(const a of x.objectKeys(this.shape))if(e&&!e[a])r[a]=this.shape[a];else{let o=this.shape[a];for(;o instanceof z;)o=o._def.innerType;r[a]=o}return new C({...this._def,shape:()=>r})}keyof(){return Ue(x.objectKeys(this.shape))}}C.create=(t,e)=>new C({shape:()=>t,unknownKeys:"strip",catchall:L.create(),typeName:m.ZodObject,...y(e)});C.strictCreate=(t,e)=>new C({shape:()=>t,unknownKeys:"strict",catchall:L.create(),typeName:m.ZodObject,...y(e)});C.lazycreate=(t,e)=>new C({shape:t,unknownKeys:"strip",catchall:L.create(),typeName:m.ZodObject,...y(e)});class ee extends b{_parse(e){const{ctx:r}=this._processInputParams(e),a=this._def.options;function n(o){for(const i of o)if(i.result.status==="valid")return i.result;for(const i of o)if(i.result.status==="dirty")return r.common.issues.push(...i.ctx.common.issues),i.result;const s=o.map(i=>new I(i.ctx.common.issues));return c(r,{code:d.invalid_union,unionErrors:s}),g}if(r.common.async)return Promise.all(a.map(async o=>{const s={...r,common:{...r.common,issues:[]},parent:null};return{result:await o._parseAsync({data:r.data,path:r.path,parent:s}),ctx:s}})).then(n);{let o;const s=[];for(const f of a){const p={...r,common:{...r.common,issues:[]},parent:null},_=f._parseSync({data:r.data,path:r.path,parent:p});if(_.status==="valid")return _;_.status==="dirty"&&!o&&(o={result:_,ctx:p}),p.common.issues.length&&s.push(p.common.issues)}if(o)return r.common.issues.push(...o.ctx.common.issues),o.result;const i=s.map(f=>new I(f));return c(r,{code:d.invalid_union,unionErrors:i}),g}}get options(){return this._def.options}}ee.create=(t,e)=>new ee({options:t,typeName:m.ZodUnion,...y(e)});function he(t,e){const r=B(t),a=B(e);if(t===e)return{valid:!0,data:t};if(r===l.object&&a===l.object){const n=x.objectKeys(e),o=x.objectKeys(t).filter(i=>n.indexOf(i)!==-1),s={...t,...e};for(const i of o){const f=he(t[i],e[i]);if(!f.valid)return{valid:!1};s[i]=f.data}return{valid:!0,data:s}}else if(r===l.array&&a===l.array){if(t.length!==e.length)return{valid:!1};const n=[];for(let o=0;o<t.length;o++){const s=t[o],i=e[o],f=he(s,i);if(!f.valid)return{valid:!1};n.push(f.data)}return{valid:!0,data:n}}else return r===l.date&&a===l.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class re extends b{_parse(e){const{status:r,ctx:a}=this._processInputParams(e),n=(o,s)=>{if(Se(o)||Se(s))return g;const i=he(o.value,s.value);return i.valid?((je(o)||je(s))&&r.dirty(),{status:r.value,value:i.data}):(c(a,{code:d.invalid_intersection_types}),g)};return a.common.async?Promise.all([this._def.left._parseAsync({data:a.data,path:a.path,parent:a}),this._def.right._parseAsync({data:a.data,path:a.path,parent:a})]).then(([o,s])=>n(o,s)):n(this._def.left._parseSync({data:a.data,path:a.path,parent:a}),this._def.right._parseSync({data:a.data,path:a.path,parent:a}))}}re.create=(t,e,r)=>new re({left:t,right:e,typeName:m.ZodIntersection,...y(r)});class $ extends b{_parse(e){const{status:r,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.array)return c(a,{code:d.invalid_type,expected:l.array,received:a.parsedType}),g;if(a.data.length<this._def.items.length)return c(a,{code:d.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),g;!this._def.rest&&a.data.length>this._def.items.length&&(c(a,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());const o=[...a.data].map((s,i)=>{const f=this._def.items[i]||this._def.rest;return f?f._parse(new N(a,s,a.path,i)):null}).filter(s=>!!s);return a.common.async?Promise.all(o).then(s=>O.mergeArray(r,s)):O.mergeArray(r,o)}get items(){return this._def.items}rest(e){return new $({...this._def,rest:e})}}$.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new $({items:t,typeName:m.ZodTuple,rest:null,...y(e)})};class te extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.object)return c(a,{code:d.invalid_type,expected:l.object,received:a.parsedType}),g;const n=[],o=this._def.keyType,s=this._def.valueType;for(const i in a.data)n.push({key:o._parse(new N(a,i,a.path,i)),value:s._parse(new N(a,a.data[i],a.path,i)),alwaysSet:i in a.data});return a.common.async?O.mergeObjectAsync(r,n):O.mergeObjectSync(r,n)}get element(){return this._def.valueType}static create(e,r,a){return r instanceof b?new te({keyType:e,valueType:r,typeName:m.ZodRecord,...y(a)}):new te({keyType:Z.create(),valueType:e,typeName:m.ZodRecord,...y(r)})}}class Ie extends b{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:r,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.map)return c(a,{code:d.invalid_type,expected:l.map,received:a.parsedType}),g;const n=this._def.keyType,o=this._def.valueType,s=[...a.data.entries()].map(([i,f],p)=>({key:n._parse(new N(a,i,a.path,[p,"key"])),value:o._parse(new N(a,f,a.path,[p,"value"]))}));if(a.common.async){const i=new Map;return Promise.resolve().then(async()=>{for(const f of s){const p=await f.key,_=await f.value;if(p.status==="aborted"||_.status==="aborted")return g;(p.status==="dirty"||_.status==="dirty")&&r.dirty(),i.set(p.value,_.value)}return{status:r.value,value:i}})}else{const i=new Map;for(const f of s){const p=f.key,_=f.value;if(p.status==="aborted"||_.status==="aborted")return g;(p.status==="dirty"||_.status==="dirty")&&r.dirty(),i.set(p.value,_.value)}return{status:r.value,value:i}}}}Ie.create=(t,e,r)=>new Ie({valueType:e,keyType:t,typeName:m.ZodMap,...y(r)});class Y extends b{_parse(e){const{status:r,ctx:a}=this._processInputParams(e);if(a.parsedType!==l.set)return c(a,{code:d.invalid_type,expected:l.set,received:a.parsedType}),g;const n=this._def;n.minSize!==null&&a.data.size<n.minSize.value&&(c(a,{code:d.too_small,minimum:n.minSize.value,type:"set",inclusive:!0,exact:!1,message:n.minSize.message}),r.dirty()),n.maxSize!==null&&a.data.size>n.maxSize.value&&(c(a,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),r.dirty());const o=this._def.valueType;function s(f){const p=new Set;for(const _ of f){if(_.status==="aborted")return g;_.status==="dirty"&&r.dirty(),p.add(_.value)}return{status:r.value,value:p}}const i=[...a.data.values()].map((f,p)=>o._parse(new N(a,f,a.path,p)));return a.common.async?Promise.all(i).then(f=>s(f)):s(i)}min(e,r){return new Y({...this._def,minSize:{value:e,message:u.toString(r)}})}max(e,r){return new Y({...this._def,maxSize:{value:e,message:u.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}}Y.create=(t,e)=>new Y({valueType:t,minSize:null,maxSize:null,typeName:m.ZodSet,...y(e)});class Ee extends b{get schema(){return this._def.getter()}_parse(e){const{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}}Ee.create=(t,e)=>new Ee({getter:t,typeName:m.ZodLazy,...y(e)});class fe extends b{_parse(e){if(e.data!==this._def.value){const r=this._getOrReturnCtx(e);return c(r,{received:r.data,code:d.invalid_literal,expected:this._def.value}),g}return{status:"valid",value:e.data}}get value(){return this._def.value}}fe.create=(t,e)=>new fe({value:t,typeName:m.ZodLiteral,...y(e)});function Ue(t,e){return new W({values:t,typeName:m.ZodEnum,...y(e)})}class W extends b{_parse(e){if(typeof e.data!="string"){const r=this._getOrReturnCtx(e),a=this._def.values;return c(r,{expected:x.joinValues(a),received:r.parsedType,code:d.invalid_type}),g}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const r=this._getOrReturnCtx(e),a=this._def.values;return c(r,{received:r.data,code:d.invalid_enum_value,options:a}),g}return R(e.data)}get options(){return this._def.values}get enum(){const e={};for(const r of this._def.values)e[r]=r;return e}get Values(){const e={};for(const r of this._def.values)e[r]=r;return e}get Enum(){const e={};for(const r of this._def.values)e[r]=r;return e}extract(e,r=this._def){return W.create(e,{...this._def,...r})}exclude(e,r=this._def){return W.create(this.options.filter(a=>!e.includes(a)),{...this._def,...r})}}W.create=Ue;class Be extends b{_parse(e){const r=x.getValidEnumValues(this._def.values),a=this._getOrReturnCtx(e);if(a.parsedType!==l.string&&a.parsedType!==l.number){const n=x.objectValues(r);return c(a,{expected:x.joinValues(n),received:a.parsedType,code:d.invalid_type}),g}if(this._cache||(this._cache=new Set(x.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const n=x.objectValues(r);return c(a,{received:a.data,code:d.invalid_enum_value,options:n}),g}return R(e.data)}get enum(){return this._def.values}}Be.create=(t,e)=>new Be({values:t,typeName:m.ZodNativeEnum,...y(e)});class ae extends b{unwrap(){return this._def.type}_parse(e){const{ctx:r}=this._processInputParams(e);if(r.parsedType!==l.promise&&r.common.async===!1)return c(r,{code:d.invalid_type,expected:l.promise,received:r.parsedType}),g;const a=r.parsedType===l.promise?r.data:Promise.resolve(r.data);return R(a.then(n=>this._def.type.parseAsync(n,{path:r.path,errorMap:r.common.contextualErrorMap})))}}ae.create=(t,e)=>new ae({type:t,typeName:m.ZodPromise,...y(e)});class F extends b{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===m.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:r,ctx:a}=this._processInputParams(e),n=this._def.effect||null,o={addIssue:s=>{c(a,s),s.fatal?r.abort():r.dirty()},get path(){return a.path}};if(o.addIssue=o.addIssue.bind(o),n.type==="preprocess"){const s=n.transform(a.data,o);if(a.common.async)return Promise.resolve(s).then(async i=>{if(r.value==="aborted")return g;const f=await this._def.schema._parseAsync({data:i,path:a.path,parent:a});return f.status==="aborted"?g:f.status==="dirty"||r.value==="dirty"?G(f.value):f});{if(r.value==="aborted")return g;const i=this._def.schema._parseSync({data:s,path:a.path,parent:a});return i.status==="aborted"?g:i.status==="dirty"||r.value==="dirty"?G(i.value):i}}if(n.type==="refinement"){const s=i=>{const f=n.refinement(i,o);if(a.common.async)return Promise.resolve(f);if(f instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return i};if(a.common.async===!1){const i=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});return i.status==="aborted"?g:(i.status==="dirty"&&r.dirty(),s(i.value),{status:r.value,value:i.value})}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(i=>i.status==="aborted"?g:(i.status==="dirty"&&r.dirty(),s(i.value).then(()=>({status:r.value,value:i.value}))))}if(n.type==="transform")if(a.common.async===!1){const s=this._def.schema._parseSync({data:a.data,path:a.path,parent:a});if(!V(s))return g;const i=n.transform(s.value,o);if(i instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:r.value,value:i}}else return this._def.schema._parseAsync({data:a.data,path:a.path,parent:a}).then(s=>V(s)?Promise.resolve(n.transform(s.value,o)).then(i=>({status:r.value,value:i})):g);x.assertNever(n)}}F.create=(t,e,r)=>new F({schema:t,typeName:m.ZodEffects,effect:e,...y(r)});F.createWithPreprocess=(t,e,r)=>new F({schema:e,effect:{type:"preprocess",transform:t},typeName:m.ZodEffects,...y(r)});class z extends b{_parse(e){return this._getType(e)===l.undefined?R(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}z.create=(t,e)=>new z({innerType:t,typeName:m.ZodOptional,...y(e)});class H extends b{_parse(e){return this._getType(e)===l.null?R(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}H.create=(t,e)=>new H({innerType:t,typeName:m.ZodNullable,...y(e)});class pe extends b{_parse(e){const{ctx:r}=this._processInputParams(e);let a=r.data;return r.parsedType===l.undefined&&(a=this._def.defaultValue()),this._def.innerType._parse({data:a,path:r.path,parent:r})}removeDefault(){return this._def.innerType}}pe.create=(t,e)=>new pe({innerType:t,typeName:m.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...y(e)});class me extends b{_parse(e){const{ctx:r}=this._processInputParams(e),a={...r,common:{...r.common,issues:[]}},n=this._def.innerType._parse({data:a.data,path:a.path,parent:{...a}});return Q(n)?n.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new I(a.common.issues)},input:a.data})})):{status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new I(a.common.issues)},input:a.data})}}removeCatch(){return this._def.innerType}}me.create=(t,e)=>new me({innerType:t,typeName:m.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...y(e)});class ze extends b{_parse(e){if(this._getType(e)!==l.nan){const a=this._getOrReturnCtx(e);return c(a,{code:d.invalid_type,expected:l.nan,received:a.parsedType}),g}return{status:"valid",value:e.data}}}ze.create=t=>new ze({typeName:m.ZodNaN,...y(t)});class Nr extends b{_parse(e){const{ctx:r}=this._processInputParams(e),a=r.data;return this._def.type._parse({data:a,path:r.path,parent:r})}unwrap(){return this._def.type}}class ke extends b{_parse(e){const{status:r,ctx:a}=this._processInputParams(e);if(a.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:a.data,path:a.path,parent:a});return o.status==="aborted"?g:o.status==="dirty"?(r.dirty(),G(o.value)):this._def.out._parseAsync({data:o.value,path:a.path,parent:a})})();{const n=this._def.in._parseSync({data:a.data,path:a.path,parent:a});return n.status==="aborted"?g:n.status==="dirty"?(r.dirty(),{status:"dirty",value:n.value}):this._def.out._parseSync({data:n.value,path:a.path,parent:a})}}static create(e,r){return new ke({in:e,out:r,typeName:m.ZodPipeline})}}class ge extends b{_parse(e){const r=this._def.innerType._parse(e),a=n=>(V(n)&&(n.value=Object.freeze(n.value)),n);return Q(r)?r.then(n=>a(n)):a(r)}unwrap(){return this._def.innerType}}ge.create=(t,e)=>new ge({innerType:t,typeName:m.ZodReadonly,...y(e)});var m;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(m||(m={}));const h=Z.create,ve=U.create,Hr=ue.create;L.create;const Zr=A.create,S=C.create,be=ee.create;re.create;$.create;const _e=te.create,Gr=fe.create,We=W.create;ae.create;z.create;H.create;const Ir=S({minRem:ve(),maxRem:ve()}),T=Ir.or(h()),X=S({0:h().optional(),50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h(),1e3:h().optional()}),de=S({color:h().optional(),background:h().optional(),borderWidth:h().optional(),borderColor:h().optional(),boxShadow:h().optional()}),Er=S({borderRadius:T.optional(),custom:_e(h(),be([h(),ve()])).optional(),hover:de.optional(),focus:de.optional()}).and(de),Br=S({family:h().optional()}),zr=_e(We(["predefinedQuestion","edit","newConversation","voteUp","voteDown","retry","message","messageLoading","thread","submit","abort","expand","help","attach","record","reward","share","audio","copy","dismiss","menu","info","menuClose","chevronDown","chevronUp","chevronTopDown","chevronDownSmall","internalLink","externalLink","liip","avatar","avatarLarge","openChat","speechInput","listUnordered","lightMode","darkMode","avatarLarge","settings","settingsClose","sources","model","checkbox"]),h()),Lr=S({font:Br.optional(),colors:S({brand:X,accent:X.optional(),highlight:X,grey:X}),base:S({fontSizeXs:T.optional(),fontSizeSm:T.optional(),fontSizeBody:T.optional(),fontSizeH3:T.optional(),fontSizeH2:T.optional(),fontSizeH1:T.optional(),fontWeightNormal:h().optional(),fontWeightBold:h().optional(),fontWeightTitle:h().optional(),lineHeightDefault:h().optional(),lineHeightSnug:h().optional(),lineHeightTight:h().optional(),borderRadius:T.optional(),lineColor:h().optional(),boxShadow:h().optional()}),components:_e(h(),Er),svgs:zr}),ne=S({customCSS:h().optional(),fontCSS:h().optional(),fontURLs:h().array().optional(),tokens:Lr});S({light:ne,dark:ne});const $r=S({light:ne,dark:ne}).deepPartial(),Fe=S({50:h(),100:h(),200:h(),300:h(),400:h(),500:h(),600:h(),700:h(),800:h(),900:h(),950:h()}),He=We(["slate","gray","zinc","neutral","stone","red","orange","amber","yellow","lime","green","emerald","teal","cyan","sky","blue","indigo","violet","purple","fuchsia","pink","rose"]),Le=be([Fe,He]),Dr=be([Fe.and(S({0:h(),1e3:h()})),He]),Pr=S({avatarImageUrl:h().optional(),colors:S({brand:Le.optional(),highlight:Le.optional(),grey:Dr.optional(),background:h().optional(),text:h().optional(),anchor:S({default:h().optional(),hover:h().optional()}).optional()}).optional(),font:S({family:h().optional(),urls:Zr(h()).optional(),sizeXs:T.optional(),sizeSm:T.optional(),sizeBody:T.optional(),sizeH3:T.optional(),sizeH2:T.optional(),sizeH1:T.optional(),weightNormal:h().optional(),weightBold:h().optional(),weightTitle:h().optional()}).optional(),borderRadius:T.optional(),fineGrained:$r.optional()}),Vr=t=>t.split("/").pop().split(".")[0],Ur=Object.assign({"./default/fallback-dev.theme.ts":sr,"./default/fallback.theme.ts":nr}),xe=new Map;Object.entries(Ur).forEach(([t,e])=>{const{error:r,data:a}=Pr.safeParse(e?.theme);if(r){console.error(`Invalid theme in ${t}:`,r);return}xe.set(Vr(t),a)});const qr=t=>{const e=xe.get(t);return e||(console.error(`Theme ${t} not found`),oe)};Array.from(xe.keys());export{Wr as P,Zr as a,Hr as b,Pr as c,er as d,We as e,Vr as f,Xe as g,qr as h,Fr as i,Gr as l,tr as m,ve as n,S as o,_e as r,h as s,oe as t,be as u};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import"./NZTpNUN0.js";import{p as G,N as b,a as d,O as M,b as n,d as N,v as k,G as x,P as O,F as q,Q,R as U,c as j,S as A,f as R,s as E,t as D,g as H,T as S,e as w,r as z}from"./Cx_YT9bD.js";import{i as F}from"./B0YFyw9m.js";import{a as I}from"./DaodQ0aw.js";import{p as P}from"./DePuinxN.js";var J=(u,a)=>a()(),K=R('<div class="chat-app__container"><div class="error-message svelte-4thrqu">Server is unreachable, please try later... <button class="error-message__retry-button svelte-4thrqu">Retry</button></div></div>'),L=R(" <!>",1);const V={hash:"svelte-4thrqu",code:`
|
|
2
|
+
/* These styles are inline, because at this point theme loading has failed. */.error-message.svelte-4thrqu {display:table;z-index:1000;width:auto;margin:2rem auto;padding:2rem;border-radius:2px;background:white;color:oklch(27.8% 0.033 256.848);font-family:-apple-system,
|
|
3
|
+
BlinkMacSystemFont,
|
|
4
|
+
avenir next,
|
|
5
|
+
avenir,
|
|
6
|
+
segoe ui,
|
|
7
|
+
helvetica neue,
|
|
8
|
+
helvetica,
|
|
9
|
+
Cantarell,
|
|
10
|
+
Ubuntu,
|
|
11
|
+
roboto,
|
|
12
|
+
noto,
|
|
13
|
+
arial,
|
|
14
|
+
sans-serif;}.error-message__retry-button.svelte-4thrqu {border:none;outline:none;background:none;font-size:1rem;text-decoration:underline;&:active {outline:none;}}`};function W(u,a){G(a,!0),I(u,V);const h=(e,o=q,f=q)=>{A();var i=L(),l=d(i),r=E(l);{var c=t=>{},_=t=>{var p=K(),y=w(p),C=E(w(y));C.__click=[J,f],z(y),z(p),n(t,p)};F(r,t=>{m()?t(c):t(_,!1)})}D(t=>H(l,`${t??""} `),[()=>console.error(`Panic, uncaught error:
|
|
15
|
+
`,o())??""]),n(e,i)};let v=P(a,"body",7),m=P(a,"silent",7),s=O(void 0);const T=e=>{S(s,{error:e},!0)};var g=b(),B=d(g);return M(B,{get failed(){return h}},e=>{var o=b(),f=d(o);{var i=r=>{h(r,()=>x(s).error,()=>()=>{S(s,void 0)})},l=r=>{var c=b(),_=d(c);Q(_,v,()=>T),n(r,c)};F(f,r=>{x(s)?r(i):r(l,!1)})}n(e,o)}),n(u,g),N({get body(){return v()},set body(e){v(e),k()},get silent(){return m()},set silent(e){m(e),k()}})}U(["click"]);j(W,{body:{},silent:{}},[],[],!0);export{W as E};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./NZTpNUN0.js";import{p as m,F as y,d as f,v as r,G as S,H as d,c as h}from"./
|
|
1
|
+
import"./NZTpNUN0.js";import{p as m,F as y,d as f,v as r,G as S,H as d,c as h}from"./Cx_YT9bD.js";import{p as n,s as _}from"./DePuinxN.js";import{E as T}from"./B0tfJ4bw.js";import{O as k}from"./CBLxj_NM.js";function C(c,e){m(e,!0);let o=n(e,"onclick",7),u=n(e,"buttonClass",7),l=n(e,"buttonStyle",7),s=n(e,"apiUrl",7),a=n(e,"forceTheme",7),i=n(e,"lang",7),b=d(()=>({onclick:o(),buttonClass:u(),buttonStyle:l(),apiUrl:s(),forceTheme:a(),lang:i()}));return T(c,{silent:!0,body:(g,p=y)=>{k(g,_({host:e.$$host,get onError(){return p()}},()=>S(b)))},$$slots:{body:!0}}),f({get onclick(){return o()},set onclick(t){o(t),r()},get buttonClass(){return u()},set buttonClass(t){u(t),r()},get buttonStyle(){return l()},set buttonStyle(t){l(t),r()},get apiUrl(){return s()},set apiUrl(t){s(t),r()},get forceTheme(){return a()},set forceTheme(t){a(t),r()},get lang(){return i()},set lang(t){i(t),r()}})}customElements.define("liipgpt-button",h(C,{forceTheme:{attribute:"force-theme",type:"String"},buttonClass:{attribute:"button-class",type:"String"},buttonStyle:{attribute:"button-style",type:"String"},apiUrl:{attribute:"api-url",type:"String"},lang:{attribute:"lang",type:"String"},onclick:{}},[],[],!0));export{C as LiipGPTButton};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./NZTpNUN0.js";import{au as Re,aa as We,av as me,af as ge,aw as se,ax as we,ay as ye,at as Fe,az as _e,aA as xe,aB as ke,j as Ye,ah as ze,ad as ce,ai as pe,v as J,aj as $,am as Ge,an as Ue,ao as Ve,ap as Ie,ak as Ze,aq as Je,p as Ke,N as ee,aC as Qe,a as S,G as e,H as n,b as c,d as Xe,f as x,s as R,P as te,e as j,r as L,c as $e,t as Ce,T as le,g as et}from"./Cx_YT9bD.js";import{i as Z,b as Ee}from"./B0YFyw9m.js";import{e as tt,i as at,I as ae,c as rt,B as ot,h as de,b as nt,d as it,g as st,f as ct,l as Te,j as pt,s as lt}from"./DaodQ0aw.js";import{p as re,r as dt}from"./DePuinxN.js";import"./B0sgJJDB.js";const he=0,oe=1,ue=2;function qe(ne,l,k,z,F){$&&Ze();var d=ne,H=Re(),Y=Ye,h=ge,b,g,I,G=H?we(void 0):ye(void 0,!1,!1),u=H?we(void 0):ye(void 0,!1,!1),f=!1;function N(i,w){f=!0,w&&(_e(K),xe(K),ke(Y));try{i===he&&k&&(b?ze(b):b=ce(()=>k(d))),i===oe&&z&&(g?ze(g):g=ce(()=>z(d,G))),i!==he&&b&&pe(b,()=>b=null),i!==oe&&g&&pe(g,()=>g=null),i!==ue&&I&&pe(I,()=>I=null)}finally{w&&(ke(null),xe(null),_e(null),J())}}var K=We(()=>{if(h===(h=l()))return;let i=$&&me(h)===(d.data===Ge);if(i&&(d=Ue(),Ve(d),Ie(!1),i=!0),me(h)){var w=h;f=!1,w.then(A=>{w===h&&(se(G,A),N(oe,!0))},A=>{if(w===h)throw se(u,A),N(ue,!0),u.v}),$?k&&(b=ce(()=>k(d))):Fe(()=>{f||N(he,!0)})}else se(G,h),N(oe,!1);return i&&Ie(!0),()=>h=ge});$&&(d=Je)}const ht='@layer base,utilities,components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{*,:after,:before,::backdrop,::file-selector-button{box-sizing:border-box;margin:0;padding:0;border:0 solid}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea,::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;border-radius:0;background-color:transparent;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::-moz-placeholder{opacity:1}::placeholder{opacity:1}@supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px){::-moz-placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}::placeholder{color:currentcolor}@supports (color: color-mix(in lab,red,red)){{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{padding-block:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]),::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer base{.chat-app{--spacer-1: .0625rem;--spacer-2: .125rem;--spacer-3: .1875rem;--spacer-4: .25rem;--spacer-5: .3125rem;--spacer-6: .375rem;--spacer-8: .5rem;--spacer-10: .625rem;--spacer-12: .75rem;--spacer-16: 1rem;--spacer-20: 1.25rem;--spacer-24: 1.5rem;--spacer-28: 1.75rem;--spacer-32: 2rem;--spacer-40: 2.5rem;--spacer-48: 3rem;--spacer-56: 3.5rem;--spacer-64: 4rem;--spacer-72: 4.5rem;--spacer-80: 5rem;--spacer-120: 7.5rem;--spacer-r-8: clamp(.375rem, .3182rem + .2841cqw, .5rem);--spacer-r-12: clamp(.625rem, .5682rem + .2841cqw, .75rem);--spacer-r-16: clamp(.75rem, .6364rem + .5682cqw, 1rem);--spacer-r-20: clamp(.875rem, .7045rem + .8523cqw, 1.25rem);--spacer-r-24: clamp(1rem, .7727rem + 1.1364cqw, 1.5rem);--spacer-r-28: clamp(1.125rem, .8409rem + 1.4205cqw, 1.75rem);--spacer-r-32: clamp(1.25rem, .9091rem + 1.7045cqw, 2rem);--spacer-r-40: clamp(1.5rem, 1.0455rem + 2.2727cqw, 2.5rem);--spacer-r-48: clamp(1.625rem, 1rem + 3.125cqw, 3rem);--spacer-r-56: clamp(1.75rem, .9545rem + 3.9773cqw, 3.5rem);--spacer-r-64: clamp(2rem, 1.0909rem + 4.5455cqw, 4rem);--spacer-r-80: clamp(3rem, 2.0909rem + 4.5455cqw, 5rem);--spacer-r-96: clamp(3.5rem, 2.3636rem + 5.6818cqw, 6rem);--spacer-r-120: clamp(4rem, 2.4091rem + 7.9545cqw, 7.5rem);--default-transition-duration: .2s;--default-transition-timing-function: ease-in-out;--z-index-flyout: 10000;--z-index-dialog: 600;--z-index-loader: 500;--z-index-reference-number: 400;--z-index-footer: 300;--z-index-header: 200;--z-index-tooltip: 100;--z-index-tooltip-hover: 101;--z-index-local-overlay: 10;--ease-out-quart: cubic-bezier(.165, .84, .44, 1);--ease-in-quart: cubic-bezier(.895, .03, .685, .22);--ease-in-out-quart: cubic-bezier(.77, 0, .175, 1);--fly-in-id: 0;--btn-padding-x: var(--spacer-r-20);--btn-padding-y: var(--spacer-r-8);--btn-icon-size: var(--spacer-24);--btn-submit-size: 2.5em;--last-bot-message-min-height: 0}}@value container-xs,container-sm,container-md,container-lg,container-inner-xs,container-inner-sm,container-inner-md,container-inner-lg from "./viewports.css";@layer base{.chat-app :where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){font-weight:var(--base-font-weight-title);line-height:var(--base-line-height-tight)}.chat-app :where(b,strong){font-weight:var(--base-font-weight-bold)}.chat-app :where(button){cursor:pointer}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea){width:100%;padding:var(--input-padding);border-width:var(--input-border-width);border-radius:var(--input-border-radius);border-color:var(--input-border-color);background:var(--input-background);box-shadow:var(--input-box-shadow, none);color:var(--input-color)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::-moz-placeholder{color:var(--input-placeholder-color);opacity:var(--input-placeholder-opacity)}.chat-app :where(input[type=text],input[type=email],input[type=search],input[type=password],textarea)::placeholder{color:var(--input-placeholder-color);opacity:var(--input-placeholder-opacity)}.chat-app :where(input[type=radio],input[type=checkbox]){margin:0}.chat-app :where(*:focus-visible){border-radius:var(--btn-primary-border-radius);outline-color:var(--body-focus-color);outline-style:var(--body-focus-style);outline-width:var(--body-focus-width);outline-offset:var(--body-focus-offset)}.chat-app *::-moz-selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app *::selection{background:var(--body-selection-background);color:var(--body-selection-color)}.chat-app ::-webkit-scrollbar{width:8px;height:8px}.chat-app ::-webkit-scrollbar-track{background:transparent}.chat-app ::-webkit-scrollbar-thumb{border-radius:4px;background-color:#0000004d;-webkit-transition:background-color .2s;transition:background-color .2s}.chat-app ::-webkit-scrollbar-thumb:hover{background-color:#00000080}.chat-app *{scrollbar-color:rgba(0,0,0,.3) transparent;scrollbar-width:thin}.chat-app ::-webkit-scrollbar-thumb{visibility:hidden}.chat-app *:hover::-webkit-scrollbar-thumb,.chat-app *:active::-webkit-scrollbar-thumb,.chat-app *:focus::-webkit-scrollbar-thumb{visibility:visible}}@layer utilities{.chat-app :where(.expand-interaction){position:relative}.chat-app :where(.expand-interaction):after{position:absolute;inset:0;background-color:transparent;content:""}.chat-app :where(.sr-only){position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border-width:0;white-space:nowrap}.chat-app :where(.transition-colors){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,box-shadow;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.transition){transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.skip-link){position:absolute;width:0px;height:0px;overflow:hidden;color:var(--anchor-color);font-weight:700;font-size:var(--base-font-size-xs)}.chat-app :where(.skip-link):focus-visible{position:static;width:auto;height:auto}.chat-app :where(.fly-in){--fly-in-id: 0;--fly-in-duration: .4s;--fly-out-duration: .2s;--fly-in-delay: .3s;--fly-in-delay-additional: .1s;--fly-in-y: var(--spacer-r-64);transform:translateY(var(--fly-in-y));opacity:0;transition-delay:0s,1s;transition-duration:var(--fly-out-duration);transition-property:opacity,transform;transition-timing-function:ease,var(--ease-out-quart)}.chat-app :where(.mounted .fly-in){transform:translateY(0);opacity:1;transition-delay:calc(var(--fly-in-delay) + var(--fly-in-id) * var(--fly-in-delay-additional));transition-duration:var(--fly-in-duration)}.chat-app :where(.truncate){display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.chat-app :where(.line-clamp){display:-webkit-box;overflow:hidden;-webkit-box-orient:vertical;-webkit-line-clamp:1}.chat-app :where(.line-clamp--2){-webkit-line-clamp:2}.chat-app :where(.line-clamp--6){-webkit-line-clamp:6}.chat-app :where(.container){width:100%;max-width:var(--container-max-width, 1024px);margin:0 auto;padding-right:var(--spacer-16);padding-left:var(--spacer-16)}@container chat-container (min-width: 640px){.chat-app :where(.container){padding-right:var(--spacer-32);padding-left:var(--spacer-32)}}@container chat-container (min-width: 768px){.chat-app :where(.container){padding-right:var(--spacer-48);padding-left:var(--spacer-48)}}.chat-app :where(h1){font-size:var(--base-font-size-h1)}.chat-app :where(h2){font-size:var(--base-font-size-h2)}.chat-app :where(h3){font-size:var(--base-font-size-h3)}.chat-app :where(h4,h5,h6){font-size:var(--body-font-size)}.chat-app :where(.h1){font-size:var(--base-font-size-h1)}.chat-app :where(.h2){font-size:var(--base-font-size-h2)}.chat-app :where(.h3){font-size:var(--base-font-size-h3)}.chat-app :where(.h4,.h5,.h6){font-size:var(--body-font-size)}.chat-app :where(.text-container)>:where(p,ul,ol,img,table){display:block;margin-bottom:var(--spacer-r-24)}.chat-app :where(.text-container)>:where(div){margin:var(--spacer-r-40) 0}.chat-app :where(.text-container)>:where(h1,.h1){margin-bottom:var(--spacer-r-28)}.chat-app :where(.text-container)>:where(h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-bottom:var(--spacer-r-20)}.chat-app :where(.text-container)>:where(h1,.h1,h2,.h2,h3,.h3,h4,.h4,h5,.h5,h6,.h6){margin-top:var(--spacer-r-40)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li){margin-bottom:var(--spacer-12)}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling),ol:not(.no-list-styling))>:where(li):last-child{margin-bottom:0}.chat-app :where(.text-container)>:where(ol){padding-left:1.5em;list-style-position:outside;list-style-type:decimal}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li){position:relative;padding-left:1em}.chat-app :where(.text-container)>:where(ul:not(.no-list-styling))>:where(li):before{position:absolute;top:0;left:0;content:"•";font-size:.9em}.chat-app :where(.text-container)>:where(hr){height:1px;margin:var(--spacer-r-40) 0;border:none;background-color:var(--color-grey-700);background-color:var(--hr-color)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)){color:var(--anchor-color);font-weight:var(--anchor-font-weight, var(--base-font-weight-normal));-webkit-text-decoration:var(--anchor-text-decoration, underline);text-decoration:var(--anchor-text-decoration, underline);text-underline-offset:var(--anchor-text-underline-offset, .15em);transition-duration:var(--default-transition-duration);transition-property:color,background-color,border-color;transition-timing-function:var(--default-transition-timing-function)}.chat-app :where(.text-container) :where(a:not(.button,.no-link-styling,.reference)):hover{color:var(--anchor-hover-color)}.chat-app :where(.text-container) :where(table){display:block;width:100%;overflow-x:auto;border-collapse:collapse;border-spacing:0;-webkit-overflow-scrolling:touch}.chat-app :where(.text-container) :where(th){width:1000px;padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);line-height:var(--base-line-height-tight);text-align:left;vertical-align:bottom}.chat-app :where(.text-container) :where(td){padding:var(--spacer-12) var(--spacer-16) var(--spacer-12) 0;border-bottom:1px solid var(--color-grey-300);vertical-align:top}.chat-app :where(.text-container) :where(tr:last-child td){border-bottom:none}.chat-app :where(.text-container) :where(*:first-child){margin-top:0}.chat-app :where(.text-container) :where(*:last-child){margin-bottom:0}.chat-app :where(.animated-height){transition:height .5s var(--ease-in-out-quart)}.chat-app :where(.display-contents){display:contents}}@layer base{.svg{width:var(--spacer-r-24);height:auto}.svg svg{display:block;width:100%;height:auto;overflow:visible}}@layer components{.chat-app{display:contents}.chat-app__container{container-name:chat-container;container-type:inline-size;display:flex;align-items:flex-start;height:100%;overflow:hidden;transform:translateZ(0)}.chat-app__container>:where(*){color:var(--body-color);font-style:normal;font-weight:var(--base-font-weight-normal);font-size:var(--base-font-size-body);line-height:var(--base-line-height-default);font-family:var(--font-family);font-optical-sizing:auto}.chat-app__container.chat-app__container--inline-layout{height:100vh}.chat-app__main{container-name:chat-inner-container;container-type:inline-size;display:flex;flex-direction:column;width:100%;height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior-x:none;overscroll-behavior-y:contain;background:var(--body-background);scrollbar-gutter:stable;touch-action:pan-y}.chat-app__container--inline-layout .chat-app__main{overscroll-behavior-y:auto}.chat-app__loader-container{display:flex;z-index:var(--z-index-loader);position:relative;align-items:center;justify-content:center;width:100%;height:100%}.chat-app__portals{display:contents}.chat-app__header{z-index:var(--z-index-header);position:sticky;top:0;background:var(--body-background)}.chat-app__header--unsticked{position:relative}.chat-app__header-content{--btn-padding-x: var(--btn-padding-y);display:flex;position:relative;-moz-column-gap:var(--spacer-r-12);column-gap:var(--spacer-r-12);flex-wrap:wrap;align-items:flex-end;justify-content:flex-end;margin-right:calc(var(--btn-padding-x) * -1);margin-left:calc(var(--btn-padding-x) * -1);padding-top:var(--spacer-10);padding-bottom:var(--spacer-10)}.chat-app__header-content>:where(*){z-index:0;position:relative;pointer-events:auto}.chat-app__header-content:after{position:absolute;right:var(--btn-padding-x);bottom:0;left:var(--btn-padding-x);border-bottom:1px solid transparent;content:"";transition:border-color .1s ease-in-out}.chat-app__header-content.has-border:after{border-color:var(--base-line-color)}.chat-app__body{display:flex;position:relative;flex-grow:1;flex-direction:column;width:100%}.chat-app__page-transition{display:flex;flex-grow:1;flex-direction:column;width:100%;height:100%}.chat-app__aside{--duration-in: .65s;--duration-out: .5s;visibility:hidden;flex-grow:1;width:0;height:100%;transition-delay:0s,var(--duration-out);transition-duration:var(--duration-out),0s;transition-property:width,visibility;transition-timing-function:var(--ease-in-out-quart),linear}.chat-app__aside.open{visibility:visible;width:var(--aside-width);transition-delay:0s;transition-duration:var(--duration-in),0s;transition-timing-function:var(--ease-out-quart),linear}.chat-app__aside .tooltip{--background-color: var(--btn-secondary-hover-background)}.chat-app__aside-container{position:relative;width:var(--aside-width);height:100%;overflow-y:auto;overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable}.chat-app__container--inline-layout .chat-app__aside-container{overscroll-behavior-y:auto}.chat-app__aside-header,.chat-app__sheet-header{display:flex;z-index:var(--z-index-header);position:sticky;top:0;flex-wrap:no-wrap;align-items:center;justify-content:space-between;padding:var(--spacer-12) var(--spacer-12) var(--spacer-12) var(--spacer-24);gap:var(--spacer-24);border-bottom-width:var(--aside-header-border-width);border-color:var(--aside-header-border-color);background:var(--aside-background);color:var(--aside-header-color)}.chat-app__sheet-close{position:relative}.chat-app__sheet-overlay{z-index:var(--z-index-dialog);position:fixed;inset:0;background:var(--aside-background-overlay)}.chat-app__sheet-content{z-index:var(--z-index-flyout);position:fixed;top:0;right:0;width:100%;max-width:var(--aside-width);height:100%;overflow-y:auto;overscroll-behavior:contain;border-left-width:var(--aside-border-width);border-color:var(--aside-border-color);background:var(--aside-background);scrollbar-gutter:stable}.chat-app__container--inline-layout .chat-app__sheet-content{overscroll-behavior-y:auto}:is(.chat-app__aside-close,.chat-app__sheet-close) :where(.btn){background-color:transparent}.chat-app__aside-title,.chat-app__sheet-title{font-size:var(--base-font-size-sm)}.chat-app__close-button{z-index:var(--z-index-flyout)}}@layer components{.open-button{--open-button-avatar-height: var(--spacer-r-80);--open-button-avatar-width: var(--spacer-r-80);--open-button-duration: .4s;--open-button-delay: .3s;--open-button-ease: ease-in-out;display:flex;flex-direction:row;align-items:flex-end;cursor:pointer;transition:opacity .15s ease-out}.open-button--expanded{opacity:0;pointer-events:none}.open-button__text{display:flex;position:absolute;right:100%;bottom:50%;flex-direction:column;align-items:flex-start;justify-content:center;margin-right:calc(var(--open-button-avatar-width) * -.5);padding-top:var(--spacer-r-12);padding-right:0;padding-bottom:var(--spacer-r-12);padding-left:0;overflow:hidden;transform:translateY(50%);border-width:var(--open-button-border-width);border-radius:var(--open-button-border-radius);border-color:var(--open-button-border-color);background:var(--open-button-background);box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;color:var(--open-button-color);text-align:left;transition:transform var(--open-button-duration) var(--open-button-ease),padding-right var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button:hover .open-button__text{transform:translateY(0);background:var(--open-button-hover-background, var(--open-button-background));color:var(--open-button-hover-color, var(--open-button-color));opacity:1;transition:transform var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__title{max-width:240px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);font-weight:700;white-space:pre}.open-button__mask{width:0;height:0;overflow:hidden;transition:width var(--open-button-duration) var(--open-button-delay) var(--open-button-ease),height var(--open-button-duration) var(--open-button-ease)}.open-button:hover .open-button__mask{transition:width var(--open-button-duration) var(--open-button-ease),height var(--open-button-duration) var(--open-button-delay) var(--open-button-ease)}.open-button__description{position:relative;width:50cqw;max-width:260px;padding:0 calc(var(--open-button-avatar-width) * .5 + var(--spacer-r-12)) 0 var(--spacer-r-12);text-wrap:balance}.open-button__avatar{z-index:var(--z-index-local-overlay);position:relative;width:var(--open-button-avatar-width);height:var(--open-button-avatar-height);overflow:clip;border-radius:var(--spacer-r-80);filter:drop-shadow(0 0 8px rgba(0,0,0,.2));transition:transform .2s var(--open-button-ease)}.open-button:hover .open-button__avatar{transform:scale(1.05)}.open-button__link-icon{display:none;position:absolute;right:0;width:var(--spacer-r-80);height:var(--spacer-r-80);padding:var(--spacer-r-20);color:var(--open-button-color)}:where(.open-button--standalone){position:fixed;right:var(--spacer-r-16);bottom:var(--spacer-r-16)}@media (prefers-reduced-motion: reduce){.open-button__text,.open-button__mask,.open-button:hover .open-button__text,.open-button:hover .open-button__mask{transition:none!important}.open-button__avatar,.open-button:hover .open-button__avatar{filter:none!important;transition:none!important}}}';var p=typeof window<"u"?window:{screen:{},navigator:{}},W=(p.matchMedia||function(){return{matches:!1}}).bind(p),ut={get passive(){return!0}},je=function(){};p.addEventListener&&p.addEventListener("p",je,ut);p.removeEventListener&&p.removeEventListener("p",je,!1);var ve="ontouchstart"in p,vt="TouchEvent"in p,bt=ve||vt&&W("(any-pointer: coarse)").matches,Oe=(p.navigator.maxTouchPoints||0)>0||bt,Le=p.navigator.userAgent||"",ft=W("(pointer: coarse)").matches&&/iPad|Macintosh/.test(Le)&&Math.min(p.screen.width||0,p.screen.height||0)>=768,He=(W("(pointer: coarse)").matches||!W("(pointer: fine)").matches&&ve)&&!/Windows.*Firefox/.test(Le),mt=W("(any-pointer: fine)").matches||W("(any-hover: hover)").matches||ft||!ve,Se=Oe&&(mt||!He)?"hybrid":Oe?"touchOnly":"mouseOnly",gt=Se==="mouseOnly"?"mouse":Se==="touchOnly"||He?"touch":"mouse",wt=x('<div class="open-button__title"><!></div>'),yt=x('<div class="open-button__mask"><div class="open-button__description"><!></div></div>'),_t=x('<div class="open-button__text"><!> <!></div>'),xt=x('<div class="sr-only"> </div>'),kt=x('<!> <div class="svg svg--avatar open-button__avatar" aria-hidden="true"><!></div>',1),zt=x('<link rel="stylesheet"/>'),It=x("<!> <!>",1),Ct=x('<!> <!> <!> <main class="chat-app"><!></main>',1);function Et(ne,l){Ke(l,!0);const k=(t,o)=>{let r=()=>o?.().chatConfig,y=()=>o?.().language;const a=n(()=>{const{openButtonTitle:m,openButtonDescription:s}=r().translations[y()];return{openButtonTitle:m,openButtonDescription:s}}),v=n(()=>r().fullTheme[e(z)].tokens.svgs);{let m=n(()=>r().buttonHref?void 0:Y()?"true":"false"),s=n(()=>r().buttonHref?void 0:"true"),B=n(()=>r().buttonHref?void 0:H()),C=n(()=>["open-button",l.buttonClass,Te.data.flyoutIsOpen?"open-button--expanded":void 0]);ot(t,{get href(){return r().buttonHref},get onclick(){return l.onclick},onmouseenter:i,onmouseleave:w,get"aria-expanded"(){return e(m)},get"aria-haspopup"(){return e(s)},get"aria-controls"(){return e(B)},get style(){return l.buttonStyle},get className(){return e(C)},get isStandalone(){return e(I)},children:(E,M)=>{var T=kt(),D=S(T);{var U=P=>{var q=_t(),X=j(q);{var Be=O=>{var _=wt(),V=j(_);de(V,()=>e(a).openButtonTitle),L(_),c(O,_)};Z(X,O=>{e(a).openButtonTitle&&O(Be)})}var Me=R(X,2);{var De=O=>{var _=yt(),V=j(_),Pe=j(V);de(Pe,()=>e(a).openButtonDescription),L(V),Ee(V,ie=>le(f,ie),()=>e(f)),L(_),Ee(_,ie=>le(u,ie),()=>e(u)),c(O,_)};Z(Me,O=>{e(a).openButtonDescription&>==="mouse"&&O(De)})}L(q),c(P,q)},Q=P=>{var q=xt(),X=j(q,!0);L(q),Ce(()=>et(X,Te.t.ariaOpenChat)),c(P,q)};Z(D,P=>{e(a).openButtonTitle||e(a).openButtonDescription?P(U):P(Q,!1)})}var fe=R(D,2),Ae=j(fe);de(Ae,()=>e(v).avatar),L(fe),c(E,T)},$$slots:{default:!0}})}};let z=te("light"),F=re(l,"host",7),d=re(l,"onError",7),H=re(l,"flyoutId",7),Y=re(l,"flyoutIsOpen",7),h=dt(l,["$$slots","$$events","$$legacy","$$host","host","onError","flyoutId","flyoutIsOpen"]);const b=async t=>{const r=await(await fetch(`${t}/chatconfig`)).json();return pt.parse(r)},g=async({forceTheme:t,lang:o,apiUrl:r})=>{const y=window.CHAT_CONFIG_OVERRIDE?window.CHAT_CONFIG_OVERRIDE:await b(r),a=nt(y);let v;o?v=it(o,a.supportedLanguages):v=st(a.supportedLanguages);const m=Object.keys(a.fullTheme);return le(z,ct(m),!0),{chatConfig:a,language:v}};let I=n(()=>!!F()),G=te(!1),u=te(void 0),f=te(void 0),N=n(()=>e(f)?.offsetWidth??0),K=n(()=>e(f)?.offsetHeight??0);function i(){!e(f)||!e(u)||(e(u).style.width=`${e(N)}px`,e(u).style.height=`${e(K)}px`)}function w(){!e(G)&&e(u)&&(e(u).style.width="0",e(u).style.height="0")}let A=n(()=>g(h).catch(t=>d()(t)));var be=ee();Qe(t=>{var o=ee(),r=S(o);{var y=a=>{var v=ee(),m=S(v);qe(m,()=>e(A),null,(s,B)=>{var C=It();const E=n(()=>e(B).chatConfig.fullTheme[e(z)]);var M=S(C);tt(M,17,()=>e(E).fontURLs??[],at,(D,U)=>{var Q=zt();Ce(()=>lt(Q,"href",e(U))),c(D,Q)});var T=R(M,2);ae(T,{id:"font-css",get css(){return e(E).fontCSS}}),c(s,C)}),c(a,v)};Z(r,a=>{e(I)&&a(y)})}c(t,o)});var Ne=S(be);return qe(Ne,()=>e(A),t=>{},(t,o)=>{var r=ee();const y=n(()=>e(o).chatConfig.fullTheme[e(z)]);var a=S(r);{var v=s=>{var B=Ct(),C=S(B);{let U=n(()=>rt(e(y).tokens));ae(C,{id:"theme-css",get css(){return e(U)}})}var E=R(C,2);ae(E,{id:"app-css",get css(){return ht}});var M=R(E,2);ae(M,{id:"custom-css",get css(){return e(y).customCSS}});var T=R(M,2),D=j(T);k(D,()=>e(o)),L(T),c(s,B)},m=s=>{k(s,()=>e(o))};Z(a,s=>{e(I)?s(v):s(m,!1)})}c(t,r)}),c(ne,be),Xe({get host(){return F()},set host(t){F(t),J()},get onError(){return d()},set onError(t){d(t),J()},get flyoutId(){return H()},set flyoutId(t){H(t),J()},get flyoutIsOpen(){return Y()},set flyoutIsOpen(t){Y(t),J()}})}$e(Et,{host:{},onError:{},flyoutId:{},flyoutIsOpen:{}},[],[],!0);export{Et as O};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as d,I as g,u as i,o as m,J as l,K as b,G as p,L as v,M as h}from"./Cx_YT9bD.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let r=()=>v(s.s);if(n){let o=0,t={};const _=h(()=>{let c=!1;const a=s.s;for(const f in a)a[f]!==t[f]&&(t[f]=a[f],c=!0);return c&&o++,o});r=()=>p(_)}e.b.length&&g(()=>{u(s,r),l(e.b)}),i(()=>{const o=m(()=>e.m.map(b));return()=>{for(const t of o)typeof t=="function"&&t()}}),e.a.length&&i(()=>{u(s,r),l(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}export{x as i};
|