promptfoo 0.103.2 → 0.103.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/package.json +1 -1
- package/dist/src/app/assets/{index-ziw_4_A9.js → index-XXoiz61D.js} +4 -4
- package/dist/src/app/assets/{index.es-XehlSHxK.js → index.es-DTKpmNcZ.js} +1 -1
- package/dist/src/app/assets/{sync-DDIaa9Ut.js → sync-ClbHj3jr.js} +1 -1
- package/dist/src/app/index.html +1 -1
- package/dist/src/commands/debug.d.ts.map +1 -1
- package/dist/src/commands/debug.js +6 -0
- package/dist/src/commands/debug.js.map +1 -1
- package/dist/src/envars.d.ts +1 -0
- package/dist/src/envars.d.ts.map +1 -1
- package/dist/src/envars.js.map +1 -1
- package/dist/src/evaluator.js +1 -1
- package/dist/src/evaluator.js.map +1 -1
- package/dist/src/providers/vertex.d.ts +3 -0
- package/dist/src/providers/vertex.d.ts.map +1 -1
- package/dist/src/providers/vertex.js +23 -9
- package/dist/src/providers/vertex.js.map +1 -1
- package/dist/src/redteam/commands/run.d.ts.map +1 -1
- package/dist/src/redteam/commands/run.js +5 -4
- package/dist/src/redteam/commands/run.js.map +1 -1
- package/dist/src/redteam/constants.d.ts +4 -2
- package/dist/src/redteam/constants.d.ts.map +1 -1
- package/dist/src/redteam/constants.js +71 -4
- package/dist/src/redteam/constants.js.map +1 -1
- package/dist/src/redteam/index.d.ts.map +1 -1
- package/dist/src/redteam/index.js +2 -3
- package/dist/src/redteam/index.js.map +1 -1
- package/dist/src/redteam/plugins/cyberseceval.d.ts +9 -0
- package/dist/src/redteam/plugins/cyberseceval.d.ts.map +1 -0
- package/dist/src/redteam/plugins/cyberseceval.js +76 -0
- package/dist/src/redteam/plugins/cyberseceval.js.map +1 -0
- package/dist/src/redteam/plugins/index.d.ts.map +1 -1
- package/dist/src/redteam/plugins/index.js +10 -7
- package/dist/src/redteam/plugins/index.js.map +1 -1
- package/dist/src/redteam/util.d.ts.map +1 -1
- package/dist/src/redteam/util.js +14 -0
- package/dist/src/redteam/util.js.map +1 -1
- package/dist/src/types/env.d.ts +1 -0
- package/dist/src/types/env.d.ts.map +1 -1
- package/dist/src/util/apiHealth.d.ts.map +1 -1
- package/dist/src/util/apiHealth.js +48 -3
- package/dist/src/util/apiHealth.js.map +1 -1
- package/dist/test/redteam/index.test.js +0 -11
- package/dist/test/redteam/index.test.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -222,7 +222,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
|
|
|
222
222
|
`:null,ube=typeof SP!="string"?c0`
|
|
223
223
|
animation: ${SP} 1.4s ease-in-out infinite;
|
|
224
224
|
`:null,fbe=e=>{const{classes:t,variant:n,color:r,disableShrink:i}=e,o={root:["root",n,`color${rt(r)}`],svg:["svg"],circle:["circle",`circle${rt(n)}`,i&&"circleDisableShrink"]};return Dt(o,lbe,t)},Abe=He("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`color${rt(n.color)}`]]}})(Rt(({theme:e})=>({display:"inline-block",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("transform")}},{props:{variant:"indeterminate"},style:cbe||{animation:`${CP} 1.4s linear infinite`}},...Object.entries(e.palette).filter(Xn()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}))),dbe=He("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),hbe=He("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.circle,t[`circle${rt(n.variant)}`],n.disableShrink&&t.circleDisableShrink]}})(Rt(({theme:e})=>({stroke:"currentColor",variants:[{props:{variant:"determinate"},style:{transition:e.transitions.create("stroke-dashoffset")}},{props:{variant:"indeterminate"},style:{strokeDasharray:"80px, 200px",strokeDashoffset:0}},{props:({ownerState:t})=>t.variant==="indeterminate"&&!t.disableShrink,style:ube||{animation:`${SP} 1.4s ease-in-out infinite`}}]}))),Hs=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiCircularProgress"}),{className:i,color:o="primary",disableShrink:s=!1,size:a=40,style:l,thickness:c=3.6,value:u=0,variant:f="indeterminate",...d}=r,A={...r,color:o,disableShrink:s,size:a,thickness:c,value:u,variant:f},p=fbe(A),m={},b={},v={};if(f==="determinate"){const g=2*Math.PI*((Hf-c)/2);m.strokeDasharray=g.toFixed(3),v["aria-valuenow"]=Math.round(u),m.strokeDashoffset=`${((100-u)/100*g).toFixed(3)}px`,b.transform="rotate(-90deg)"}return h.jsx(Abe,{className:ft(p.root,i),style:{width:a,height:a,...b,...l},ownerState:A,ref:n,role:"progressbar",...v,...d,children:h.jsx(dbe,{className:p.svg,ownerState:A,viewBox:`${Hf/2} ${Hf/2} ${Hf} ${Hf}`,children:h.jsx(hbe,{className:p.circle,style:m,ownerState:A,cx:Hf,cy:Hf,r:(Hf-c)/2,fill:"none",strokeWidth:c})})})});function pbe(e){return Mt("MuiDialog",e)}const II=Nt("MuiDialog",["root","scrollPaper","scrollBody","container","paper","paperScrollPaper","paperScrollBody","paperWidthFalse","paperWidthXs","paperWidthSm","paperWidthMd","paperWidthLg","paperWidthXl","paperFullWidth","paperFullScreen"]),HJ=j.createContext({}),gbe=He(kJ,{name:"MuiDialog",slot:"Backdrop",overrides:(e,t)=>t.backdrop})({zIndex:-1}),mbe=e=>{const{classes:t,scroll:n,maxWidth:r,fullWidth:i,fullScreen:o}=e,s={root:["root"],container:["container",`scroll${rt(n)}`],paper:["paper",`paperScroll${rt(n)}`,`paperWidth${rt(String(r))}`,i&&"paperFullWidth",o&&"paperFullScreen"]};return Dt(s,pbe,t)},vbe=He(Zb,{name:"MuiDialog",slot:"Root",overridesResolver:(e,t)=>t.root})({"@media print":{position:"absolute !important"}}),ybe=He("div",{name:"MuiDialog",slot:"Container",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.container,t[`scroll${rt(n.scroll)}`]]}})({height:"100%","@media print":{height:"auto"},outline:0,variants:[{props:{scroll:"paper"},style:{display:"flex",justifyContent:"center",alignItems:"center"}},{props:{scroll:"body"},style:{overflowY:"auto",overflowX:"hidden",textAlign:"center","&::after":{content:'""',display:"inline-block",verticalAlign:"middle",height:"100%",width:"0"}}}]}),bbe=He(Tn,{name:"MuiDialog",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`scrollPaper${rt(n.scroll)}`],t[`paperWidth${rt(String(n.maxWidth))}`],n.fullWidth&&t.paperFullWidth,n.fullScreen&&t.paperFullScreen]}})(Rt(({theme:e})=>({margin:32,position:"relative",overflowY:"auto","@media print":{overflowY:"visible",boxShadow:"none"},variants:[{props:{scroll:"paper"},style:{display:"flex",flexDirection:"column",maxHeight:"calc(100% - 64px)"}},{props:{scroll:"body"},style:{display:"inline-block",verticalAlign:"middle",textAlign:"initial"}},{props:({ownerState:t})=>!t.maxWidth,style:{maxWidth:"calc(100% - 64px)"}},{props:{maxWidth:"xs"},style:{maxWidth:e.breakpoints.unit==="px"?Math.max(e.breakpoints.values.xs,444):`max(${e.breakpoints.values.xs}${e.breakpoints.unit}, 444px)`,[`&.${II.paperScrollBody}`]:{[e.breakpoints.down(Math.max(e.breakpoints.values.xs,444)+32*2)]:{maxWidth:"calc(100% - 64px)"}}}},...Object.keys(e.breakpoints.values).filter(t=>t!=="xs").map(t=>({props:{maxWidth:t},style:{maxWidth:`${e.breakpoints.values[t]}${e.breakpoints.unit}`,[`&.${II.paperScrollBody}`]:{[e.breakpoints.down(e.breakpoints.values[t]+32*2)]:{maxWidth:"calc(100% - 64px)"}}}})),{props:({ownerState:t})=>t.fullWidth,style:{width:"calc(100% - 64px)"}},{props:({ownerState:t})=>t.fullScreen,style:{margin:0,width:"100%",maxWidth:"100%",height:"100%",maxHeight:"none",borderRadius:0,[`&.${II.paperScrollBody}`]:{margin:0,maxWidth:"100%"}}}]}))),zn=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialog"}),i=fr(),o={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{"aria-describedby":s,"aria-labelledby":a,"aria-modal":l=!0,BackdropComponent:c,BackdropProps:u,children:f,className:d,disableEscapeKeyDown:A=!1,fullScreen:p=!1,fullWidth:m=!1,maxWidth:b="sm",onBackdropClick:v,onClick:g,onClose:y,open:w,PaperComponent:x=Tn,PaperProps:C={},scroll:k="paper",TransitionComponent:F=EJ,transitionDuration:L=o,TransitionProps:_,...T}=r,E={...r,disableEscapeKeyDown:A,fullScreen:p,fullWidth:m,maxWidth:b,scroll:k},I=mbe(E),N=j.useRef(),$=K=>{N.current=K.target===K.currentTarget},D=K=>{g&&g(K),N.current&&(N.current=null,v&&v(K),y&&y(K,"backdropClick"))},V=hf(a),Y=j.useMemo(()=>({titleId:V}),[V]);return h.jsx(vbe,{className:ft(I.root,d),closeAfterTransition:!0,components:{Backdrop:gbe},componentsProps:{backdrop:{transitionDuration:L,as:c,...u}},disableEscapeKeyDown:A,onClose:y,open:w,ref:n,onClick:D,ownerState:E,...T,children:h.jsx(F,{appear:!0,in:w,timeout:L,role:"presentation",..._,children:h.jsx(ybe,{className:ft(I.container),onMouseDown:$,ownerState:E,children:h.jsx(bbe,{as:x,elevation:24,role:"dialog","aria-describedby":s,"aria-labelledby":V,"aria-modal":l,...C,className:ft(I.paper,C.className),ownerState:E,children:h.jsx(HJ.Provider,{value:Y,children:f})})})})})});function wbe(e){return Mt("MuiDialogActions",e)}Nt("MuiDialogActions",["root","spacing"]);const xbe=e=>{const{classes:t,disableSpacing:n}=e;return Dt({root:["root",!n&&"spacing"]},wbe,t)},Cbe=He("div",{name:"MuiDialogActions",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disableSpacing&&t.spacing]}})({display:"flex",alignItems:"center",padding:8,justifyContent:"flex-end",flex:"0 0 auto",variants:[{props:({ownerState:e})=>!e.disableSpacing,style:{"& > :not(style) ~ :not(style)":{marginLeft:8}}}]}),Sr=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialogActions"}),{className:i,disableSpacing:o=!1,...s}=r,a={...r,disableSpacing:o},l=xbe(a);return h.jsx(Cbe,{className:ft(l.root,i),ownerState:a,ref:n,...s})});function Sbe(e){return Mt("MuiDialogContent",e)}Nt("MuiDialogContent",["root","dividers"]);function _be(e){return Mt("MuiDialogTitle",e)}const Bbe=Nt("MuiDialogTitle",["root"]),Ebe=e=>{const{classes:t,dividers:n}=e;return Dt({root:["root",n&&"dividers"]},Sbe,t)},kbe=He("div",{name:"MuiDialogContent",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dividers&&t.dividers]}})(Rt(({theme:e})=>({flex:"1 1 auto",WebkitOverflowScrolling:"touch",overflowY:"auto",padding:"20px 24px",variants:[{props:({ownerState:t})=>t.dividers,style:{padding:"16px 24px",borderTop:`1px solid ${(e.vars||e).palette.divider}`,borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>!t.dividers,style:{[`.${Bbe.root} + &`]:{paddingTop:0}}}]}))),Vn=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialogContent"}),{className:i,dividers:o=!1,...s}=r,a={...r,dividers:o},l=Ebe(a);return h.jsx(kbe,{className:ft(l.root,i),ownerState:a,ref:n,...s})}),Ibe=e=>{const{classes:t}=e;return Dt({root:["root"]},_be,t)},Fbe=He(Le,{name:"MuiDialogTitle",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:"16px 24px",flex:"0 0 auto"}),qn=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialogTitle"}),{className:i,id:o,...s}=r,a=r,l=Ibe(a),{titleId:c=o}=j.useContext(HJ);return h.jsx(Fbe,{component:"h2",className:ft(l.root,i),ownerState:a,ref:n,variant:"h6",id:o??c,...s})});function $x(e){return parseInt(e,10)||0}const Tbe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function Rbe(e){return e==null||Object.keys(e).length===0||e.outerHeightStyle===0&&!e.overflowing}const yh=j.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:s,value:a,...l}=t,{current:c}=j.useRef(a!=null),u=j.useRef(null),f=vr(n,u),d=j.useRef(null),A=j.useRef(null),p=j.useCallback(()=>{const v=u.current,y=Ds(v).getComputedStyle(v);if(y.width==="0px")return{outerHeightStyle:0,overflowing:!1};const w=A.current;w.style.width=y.width,w.value=v.value||t.placeholder||"x",w.value.slice(-1)===`
|
|
225
|
-
`&&(w.value+=" ");const x=y.boxSizing,C=$x(y.paddingBottom)+$x(y.paddingTop),k=$x(y.borderBottomWidth)+$x(y.borderTopWidth),F=w.scrollHeight;w.value="x";const L=w.scrollHeight;let _=F;o&&(_=Math.max(Number(o)*L,_)),i&&(_=Math.min(Number(i)*L,_)),_=Math.max(_,L);const T=_+(x==="border-box"?C+k:0),E=Math.abs(_-F)<=1;return{outerHeightStyle:T,overflowing:E}},[i,o,t.placeholder]),m=j.useCallback(()=>{const v=p();if(Rbe(v))return;const g=v.outerHeightStyle,y=u.current;d.current!==g&&(d.current=g,y.style.height=`${g}px`),y.style.overflow=v.overflowing?"hidden":""},[p]);Go(()=>{const v=()=>{m()};let g;const y=qb(v),w=u.current,x=Ds(w);x.addEventListener("resize",y);let C;return typeof ResizeObserver<"u"&&(C=new ResizeObserver(v),C.observe(w)),()=>{y.clear(),cancelAnimationFrame(g),x.removeEventListener("resize",y),C&&C.disconnect()}},[p,m]),Go(()=>{m()});const b=v=>{c||m(),r&&r(v)};return h.jsxs(j.Fragment,{children:[h.jsx("textarea",{value:a,onChange:b,ref:f,rows:o,style:s,...l}),h.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:A,tabIndex:-1,style:{...Tbe.shadow,...s,paddingTop:0,paddingBottom:0}})]})});function dd({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const $E=j.createContext(void 0);function rc(){return j.useContext($E)}function c$(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function t_(e,t=!1){return e&&(c$(e.value)&&e.value!==""||t&&c$(e.defaultValue)&&e.defaultValue!=="")}function Pbe(e){return e.startAdornment}function Lbe(e){return Mt("MuiInputBase",e)}const ra=Nt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var u$;const QE=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${rt(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},HE=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Obe=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:f,size:d,startAdornment:A,type:p}=e,m={root:["root",`color${rt(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",d&&d!=="medium"&&`size${rt(d)}`,u&&"multiline",A&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",p==="search"&&"inputTypeSearch",u&&"inputMultiline",d==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",A&&"inputAdornedStart",o&&"inputAdornedEnd",f&&"readOnly"]};return Dt(m,Lbe,t)},zE=He("div",{name:"MuiInputBase",slot:"Root",overridesResolver:QE})(Rt(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${ra.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),VE=He("input",{name:"MuiInputBase",slot:"Input",overridesResolver:HE})(Rt(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${ra.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${ra.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:o})=>!o.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:o})=>o.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),f$=g0e({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),qE=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:s,className:a,color:l,components:c={},componentsProps:u={},defaultValue:f,disabled:d,disableInjectingGlobalStyles:A,endAdornment:p,error:m,fullWidth:b=!1,id:v,inputComponent:g="input",inputProps:y={},inputRef:w,margin:x,maxRows:C,minRows:k,multiline:F=!1,name:L,onBlur:_,onChange:T,onClick:E,onFocus:I,onKeyDown:N,onKeyUp:$,placeholder:D,readOnly:V,renderSuffix:Y,rows:K,size:O,slotProps:ne={},slots:z={},startAdornment:R,type:M="text",value:H,...U}=r,X=y.value!=null?y.value:H,{current:Z}=j.useRef(X!=null),ue=j.useRef(),ye=j.useCallback(B=>{},[]),ee=vr(ue,w,y.ref,ye),[J,ce]=j.useState(!1),_e=rc(),be=dd({props:r,muiFormControl:_e,states:["color","disabled","error","hiddenLabel","size","required","filled"]});be.focused=_e?_e.focused:J,j.useEffect(()=>{!_e&&d&&J&&(ce(!1),_&&_())},[_e,d,J,_]);const se=_e&&_e.onFilled,Me=_e&&_e.onEmpty,Oe=j.useCallback(B=>{t_(B)?se&&se():Me&&Me()},[se,Me]);Go(()=>{Z&&Oe({value:X})},[X,Oe,Z]);const Ee=B=>{I&&I(B),y.onFocus&&y.onFocus(B),_e&&_e.onFocus?_e.onFocus(B):ce(!0)},Xe=B=>{_&&_(B),y.onBlur&&y.onBlur(B),_e&&_e.onBlur?_e.onBlur(B):ce(!1)},tt=(B,...q)=>{if(!Z){const le=B.target||ue.current;if(le==null)throw new Error(df(1));Oe({value:le.value})}y.onChange&&y.onChange(B,...q),T&&T(B,...q)};j.useEffect(()=>{Oe(ue.current)},[]);const Ke=B=>{ue.current&&B.currentTarget===B.target&&ue.current.focus(),E&&E(B)};let Ne=g,ve=y;F&&Ne==="input"&&(K?ve={type:void 0,minRows:K,maxRows:K,...ve}:ve={type:void 0,maxRows:C,minRows:k,...ve},Ne=yh);const Be=B=>{Oe(B.animationName==="mui-auto-fill-cancel"?ue.current:{value:"x"})};j.useEffect(()=>{_e&&_e.setAdornedStart(!!R)},[_e,R]);const xe={...r,color:be.color||"primary",disabled:be.disabled,endAdornment:p,error:be.error,focused:be.focused,formControl:_e,fullWidth:b,hiddenLabel:be.hiddenLabel,multiline:F,size:be.size,startAdornment:R,type:M},Fe=Obe(xe),Se=z.root||c.Root||zE,Re=ne.root||u.root||{},re=z.input||c.Input||VE;return ve={...ve,...ne.input??u.input},h.jsxs(j.Fragment,{children:[!A&&typeof f$=="function"&&(u$||(u$=h.jsx(f$,{}))),h.jsxs(Se,{...Re,ref:n,onClick:Ke,...U,...!Kc(Se)&&{ownerState:{...xe,...Re.ownerState}},className:ft(Fe.root,Re.className,a,V&&"MuiInputBase-readOnly"),children:[R,h.jsx($E.Provider,{value:null,children:h.jsx(re,{"aria-invalid":be.error,"aria-describedby":i,autoComplete:o,autoFocus:s,defaultValue:f,disabled:be.disabled,id:v,onAnimationStart:Be,name:L,placeholder:D,readOnly:V,required:be.required,rows:K,value:X,onKeyDown:N,onKeyUp:$,type:M,...ve,...!Kc(re)&&{as:Ne,ownerState:{...xe,...ve.ownerState}},ref:ee,className:ft(Fe.input,ve.className,V&&"MuiInputBase-readOnly"),onBlur:Xe,onChange:tt,onFocus:Ee})}),p,Y?Y({...be,startAdornment:R}):null]})]})});function jbe(e){return Mt("MuiInput",e)}const sA={...ra,...Nt("MuiInput",["root","underline","input"])},Mbe=e=>{const{classes:t,disableUnderline:n}=e,i=Dt({root:["root",!n&&"underline"],input:["input"]},jbe,t);return{...t,...i}},Nbe=He(zE,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...QE(e,t),!n.disableUnderline&&t.underline]}})(Rt(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${sA.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${sA.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${sA.disabled}, .${sA.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${sA.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Xn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),Ube=He(VE,{name:"MuiInput",slot:"Input",overridesResolver:HE})({}),n_=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiInput"}),{disableUnderline:i=!1,components:o={},componentsProps:s,fullWidth:a=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:f={},type:d="text",...A}=r,p=Mbe(r),b={root:{ownerState:{disableUnderline:i}}},v=u??s?co(u??s,b):b,g=f.root??o.Root??Nbe,y=f.input??o.Input??Ube;return h.jsx(qE,{slots:{root:g,input:y},slotProps:v,fullWidth:a,inputComponent:l,multiline:c,ref:n,type:d,...A,classes:p})});n_&&(n_.muiName="Input");function Dbe(e){return Mt("MuiFilledInput",e)}const ia={...ra,...Nt("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},$be=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:o,hiddenLabel:s,multiline:a}=e,l={root:["root",!n&&"underline",r&&"adornedStart",i&&"adornedEnd",o==="small"&&`size${rt(o)}`,s&&"hiddenLabel",a&&"multiline"],input:["input"]},c=Dt(l,Dbe,t);return{...t,...c}},Qbe=He(zE,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...QE(e,t),!n.disableUnderline&&t.underline]}})(Rt(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${ia.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${ia.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:o},variants:[{props:({ownerState:s})=>!s.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ia.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ia.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ia.disabled}, .${ia.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ia.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Xn()).map(([s])=>{var a;return{props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(a=(e.vars||e).palette[s])==null?void 0:a.main}`}}}}),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:a})=>s.multiline&&a==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),Hbe=He(VE,{name:"MuiFilledInput",slot:"Input",overridesResolver:HE})(Rt(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),r_=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFilledInput"}),{disableUnderline:i=!1,components:o={},componentsProps:s,fullWidth:a=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:f,slots:d={},type:A="text",...p}=r,m={...r,disableUnderline:i,fullWidth:a,inputComponent:c,multiline:u,type:A},b=$be(r),v={root:{ownerState:m},input:{ownerState:m}},g=f??s?co(v,f??s):v,y=d.root??o.Root??Qbe,w=d.input??o.Input??Hbe;return h.jsx(qE,{slots:{root:y,input:w},slotProps:g,fullWidth:a,inputComponent:c,multiline:u,ref:n,type:A,...p,classes:b})});r_&&(r_.muiName="Input");var A$;const zbe=He("fieldset",{shouldForwardProp:$i})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Vbe=He("legend",{shouldForwardProp:$i})(Rt(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function qbe(e){const{children:t,classes:n,className:r,label:i,notched:o,...s}=e,a=i!=null&&i!=="",l={...e,notched:o,withLabel:a};return h.jsx(zbe,{"aria-hidden":!0,className:r,ownerState:l,...s,children:h.jsx(Vbe,{ownerState:l,children:a?h.jsx("span",{children:i}):A$||(A$=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}function Wbe(e){return Mt("MuiOutlinedInput",e)}const $a={...ra,...Nt("MuiOutlinedInput",["root","notchedOutline","input"])},Kbe=e=>{const{classes:t}=e,r=Dt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Wbe,t);return{...t,...r}},Gbe=He(zE,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:QE})(Rt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${$a.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${$a.focused} .${$a.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Xn()).map(([n])=>({props:{color:n},style:{[`&.${$a.focused} .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${$a.error} .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${$a.disabled} .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),Ybe=He(qbe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(Rt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),Xbe=He(VE,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:HE})(Rt(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),i_=j.forwardRef(function(t,n){var r;const i=Vt({props:t,name:"MuiOutlinedInput"}),{components:o={},fullWidth:s=!1,inputComponent:a="input",label:l,multiline:c=!1,notched:u,slots:f={},type:d="text",...A}=i,p=Kbe(i),m=rc(),b=dd({props:i,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),v={...i,color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:m,fullWidth:s,hiddenLabel:b.hiddenLabel,multiline:c,size:b.size,type:d},g=f.root??o.Root??Gbe,y=f.input??o.Input??Xbe;return h.jsx(qE,{slots:{root:g,input:y},renderSuffix:w=>h.jsx(Ybe,{ownerState:v,className:p.notchedOutline,label:l!=null&&l!==""&&b.required?r||(r=h.jsxs(j.Fragment,{children:[l," ","*"]})):l,notched:typeof u<"u"?u:!!(w.startAdornment||w.filled||w.focused)}),fullWidth:s,inputComponent:a,multiline:c,ref:n,type:d,...A,classes:{...p,notchedOutline:null}})});i_&&(i_.muiName="Input");function Jbe(e){return Mt("MuiFormLabel",e)}const Uy=Nt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Zbe=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e,l={root:["root",`color${rt(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return Dt(l,Jbe,t)},ewe=He("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...e.color==="secondary"&&t.colorSecondary,...e.filled&&t.filled})})(Rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Xn()).map(([t])=>({props:{color:t},style:{[`&.${Uy.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Uy.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Uy.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),twe=He("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Rt(({theme:e})=>({[`&.${Uy.error}`]:{color:(e.vars||e).palette.error.main}}))),nwe=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFormLabel"}),{children:i,className:o,color:s,component:a="label",disabled:l,error:c,filled:u,focused:f,required:d,...A}=r,p=rc(),m=dd({props:r,muiFormControl:p,states:["color","required","focused","disabled","error","filled"]}),b={...r,color:m.color||"primary",component:a,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required},v=Zbe(b);return h.jsxs(ewe,{as:a,ownerState:b,className:ft(v.root,o),ref:n,...A,children:[i,m.required&&h.jsxs(twe,{ownerState:b,"aria-hidden":!0,className:v.asterisk,children:[" ","*"]})]})});function rwe(e){return Mt("MuiInputLabel",e)}Nt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const iwe=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${rt(r)}`,s],asterisk:[a&&"asterisk"]},c=Dt(l,rwe,t);return{...t,...c}},owe=He(nwe,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Uy.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Rt(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),bh=j.forwardRef(function(t,n){const r=Vt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,margin:o,shrink:s,variant:a,className:l,...c}=r,u=rc();let f=s;typeof f>"u"&&u&&(f=u.filled||u.focused||u.adornedStart);const d=dd({props:r,muiFormControl:u,states:["size","variant","required","focused"]}),A={...r,disableAnimation:i,formControl:u,shrink:f,size:d.size,variant:d.variant,required:d.required,focused:d.focused},p=iwe(A);return h.jsx(owe,{"data-shrink":f,ref:n,className:ft(p.root,l),...c,ownerState:A,classes:p})});function swe(e){return Mt("MuiFormControl",e)}Nt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const awe=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${rt(n)}`,r&&"fullWidth"]};return Dt(i,swe,t)},lwe=He("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...t[`margin${rt(e.margin)}`],...e.fullWidth&&t.fullWidth})})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Yc=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:f=!1,hiddenLabel:d=!1,margin:A="none",required:p=!1,size:m="medium",variant:b="outlined",...v}=r,g={...r,color:s,component:a,disabled:l,error:c,fullWidth:f,hiddenLabel:d,margin:A,required:p,size:m,variant:b},y=awe(g),[w,x]=j.useState(()=>{let I=!1;return i&&j.Children.forEach(i,N=>{if(!TC(N,["Input","Select"]))return;const $=TC(N,["Select"])?N.props.input:N;$&&Pbe($.props)&&(I=!0)}),I}),[C,k]=j.useState(()=>{let I=!1;return i&&j.Children.forEach(i,N=>{TC(N,["Input","Select"])&&(t_(N.props,!0)||t_(N.props.inputProps,!0))&&(I=!0)}),I}),[F,L]=j.useState(!1);l&&F&&L(!1);const _=u!==void 0&&!l?u:F;let T;j.useRef(!1);const E=j.useMemo(()=>({adornedStart:w,setAdornedStart:x,color:s,disabled:l,error:c,filled:C,focused:_,fullWidth:f,hiddenLabel:d,size:m,onBlur:()=>{L(!1)},onEmpty:()=>{k(!1)},onFilled:()=>{k(!0)},onFocus:()=>{L(!0)},registerEffect:T,required:p,variant:b}),[w,s,l,c,C,_,f,d,T,p,m,b]);return h.jsx($E.Provider,{value:E,children:h.jsx(lwe,{as:a,ownerState:g,className:ft(y.root,o),ref:n,...v,children:i})})});function cwe(e){return Mt("MuiFormHelperText",e)}const d$=Nt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var h$;const uwe=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=e,c={root:["root",i&&"disabled",o&&"error",r&&`size${rt(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Dt(c,cwe,t)},fwe=He("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${rt(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${d$.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${d$.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),Awe=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p",disabled:a,error:l,filled:c,focused:u,margin:f,required:d,variant:A,...p}=r,m=rc(),b=dd({props:r,muiFormControl:m,states:["variant","size","disabled","error","filled","focused","required"]}),v={...r,component:s,contained:b.variant==="filled"||b.variant==="outlined",variant:b.variant,size:b.size,disabled:b.disabled,error:b.error,filled:b.filled,focused:b.focused,required:b.required};delete v.ownerState;const g=uwe(v);return h.jsx(fwe,{as:s,className:ft(g.root,o),ref:n,...p,ownerState:v,children:i===" "?h$||(h$=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):i})});function dwe(e){return Mt("MuiNativeSelect",e)}const gM=Nt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),hwe=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${rt(n)}`,o&&"iconOpen",r&&"disabled"]};return Dt(a,dwe,t)},zJ=He("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${gM.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),pwe=He(zJ,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:$i,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${gM.multiple}`]:t.multiple}]}})({}),VJ=He("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${gM.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),gwe=He(VJ,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${rt(n.variant)}`],n.open&&t.iconOpen]}})({}),mwe=j.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard",...c}=t,u={...t,disabled:i,variant:l,error:o},f=hwe(u);return h.jsxs(j.Fragment,{children:[h.jsx(pwe,{ownerState:u,className:ft(f.select,r),disabled:i,ref:a||n,...c}),t.multiple?null:h.jsx(gwe,{as:s,ownerState:u,className:f.icon})]})});function vwe(e){return Mt("MuiSelect",e)}const Cv=Nt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var p$;const ywe=He(zJ,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Cv.select}`]:t.select},{[`&.${Cv.select}`]:t[n.variant]},{[`&.${Cv.error}`]:t.error},{[`&.${Cv.multiple}`]:t.multiple}]}})({[`&.${Cv.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),bwe=He(VJ,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${rt(n.variant)}`],n.open&&t.iconOpen]}})({}),wwe=He("input",{shouldForwardProp:e=>ME(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function g$(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function xwe(e){return e==null||typeof e=="string"&&!e.trim()}const Cwe=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${rt(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Dt(a,vwe,t)},Swe=j.forwardRef(function(t,n){var le;const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:s,children:a,className:l,defaultOpen:c,defaultValue:u,disabled:f,displayEmpty:d,error:A=!1,IconComponent:p,inputRef:m,labelId:b,MenuProps:v={},multiple:g,name:y,onBlur:w,onChange:x,onClose:C,onFocus:k,onOpen:F,open:L,readOnly:_,renderValue:T,SelectDisplayProps:E={},tabIndex:I,type:N,value:$,variant:D="standard",...V}=t,[Y,K]=Kl({controlled:$,default:u,name:"Select"}),[O,ne]=Kl({controlled:L,default:c,name:"Select"}),z=j.useRef(null),R=j.useRef(null),[M,H]=j.useState(null),{current:U}=j.useRef(L!=null),[X,Z]=j.useState(),ue=vr(n,m),ye=j.useCallback(he=>{R.current=he,he&&H(he)},[]),ee=M==null?void 0:M.parentNode;j.useImperativeHandle(ue,()=>({focus:()=>{R.current.focus()},node:z.current,value:Y}),[Y]),j.useEffect(()=>{c&&O&&M&&!U&&(Z(s?null:ee.clientWidth),R.current.focus())},[M,s]),j.useEffect(()=>{o&&R.current.focus()},[o]),j.useEffect(()=>{if(!b)return;const he=Ei(R.current).getElementById(b);if(he){const ae=()=>{getSelection().isCollapsed&&R.current.focus()};return he.addEventListener("click",ae),()=>{he.removeEventListener("click",ae)}}},[b]);const J=(he,ae)=>{he?F&&F(ae):C&&C(ae),U||(Z(s?null:ee.clientWidth),ne(he))},ce=he=>{he.button===0&&(he.preventDefault(),R.current.focus(),J(!0,he))},_e=he=>{J(!1,he)},be=j.Children.toArray(a),se=he=>{const ae=be.find(pe=>pe.props.value===he.target.value);ae!==void 0&&(K(ae.props.value),x&&x(he,ae))},Me=he=>ae=>{let pe;if(ae.currentTarget.hasAttribute("tabindex")){if(g){pe=Array.isArray(Y)?Y.slice():[];const ie=Y.indexOf(he.props.value);ie===-1?pe.push(he.props.value):pe.splice(ie,1)}else pe=he.props.value;if(he.props.onClick&&he.props.onClick(ae),Y!==pe&&(K(pe),x)){const ie=ae.nativeEvent||ae,Ue=new ie.constructor(ie.type,ie);Object.defineProperty(Ue,"target",{writable:!0,value:{value:pe,name:y}}),x(Ue,he)}g||J(!1,ae)}},Oe=he=>{_||[" ","ArrowUp","ArrowDown","Enter"].includes(he.key)&&(he.preventDefault(),J(!0,he))},Ee=M!==null&&O,Xe=he=>{!Ee&&w&&(Object.defineProperty(he,"target",{writable:!0,value:{value:Y,name:y}}),w(he))};delete V["aria-invalid"];let tt,Ke;const Ne=[];let ve=!1;(t_({value:Y})||d)&&(T?tt=T(Y):ve=!0);const Be=be.map(he=>{if(!j.isValidElement(he))return null;let ae;if(g){if(!Array.isArray(Y))throw new Error(df(2));ae=Y.some(pe=>g$(pe,he.props.value)),ae&&ve&&Ne.push(he.props.children)}else ae=g$(Y,he.props.value),ae&&ve&&(Ke=he.props.children);return j.cloneElement(he,{"aria-selected":ae?"true":"false",onClick:Me(he),onKeyUp:pe=>{pe.key===" "&&pe.preventDefault(),he.props.onKeyUp&&he.props.onKeyUp(pe)},role:"option",selected:ae,value:void 0,"data-value":he.props.value})});ve&&(g?Ne.length===0?tt=null:tt=Ne.reduce((he,ae,pe)=>(he.push(ae),pe<Ne.length-1&&he.push(", "),he),[]):tt=Ke);let xe=X;!s&&U&&M&&(xe=ee.clientWidth);let Fe;typeof I<"u"?Fe=I:Fe=f?null:0;const Se=E.id||(y?`mui-component-select-${y}`:void 0),Re={...t,variant:D,value:Y,open:Ee,error:A},re=Cwe(Re),B={...v.PaperProps,...(le=v.slotProps)==null?void 0:le.paper},q=hf();return h.jsxs(j.Fragment,{children:[h.jsx(ywe,{as:"div",ref:ye,tabIndex:Fe,role:"combobox","aria-controls":q,"aria-disabled":f?"true":void 0,"aria-expanded":Ee?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[b,Se].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:Oe,onMouseDown:f||_?null:ce,onBlur:Xe,onFocus:k,...E,ownerState:Re,className:ft(E.className,re.select,l),id:Se,children:xwe(tt)?p$||(p$=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):tt}),h.jsx(wwe,{"aria-invalid":A,value:Array.isArray(Y)?Y.join(","):Y,name:y,ref:z,"aria-hidden":!0,onChange:se,tabIndex:-1,disabled:f,className:re.nativeInput,autoFocus:o,...V,ownerState:Re}),h.jsx(bwe,{as:p,className:re.icon,ownerState:Re}),h.jsx(ew,{id:`menu-${y||""}`,anchorEl:ee,open:Ee,onClose:_e,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...v,MenuListProps:{"aria-labelledby":b,role:"listbox","aria-multiselectable":g?"true":void 0,disableListWrap:!0,id:q,...v.MenuListProps},slotProps:{...v.slotProps,paper:{...B,style:{minWidth:xe,...B!=null?B.style:null}}},children:Be})]})}),qJ=zt(h.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),_we=e=>{const{classes:t}=e;return t},mM={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>$i(e)&&e!=="variant",slot:"Root"},Bwe=He(n_,mM)(""),Ewe=He(i_,mM)(""),kwe=He(r_,mM)(""),Al=j.forwardRef(function(t,n){const r=Vt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=qJ,id:f,input:d,inputProps:A,label:p,labelId:m,MenuProps:b,multiple:v=!1,native:g=!1,onClose:y,onOpen:w,open:x,renderValue:C,SelectDisplayProps:k,variant:F="outlined",...L}=r,_=g?mwe:Swe,T=rc(),E=dd({props:r,muiFormControl:T,states:["variant","error"]}),I=E.variant||F,N={...r,variant:I,classes:s},$=_we(N),{root:D,...V}=$,Y=d||{standard:h.jsx(Bwe,{ownerState:N}),outlined:h.jsx(Ewe,{label:p,ownerState:N}),filled:h.jsx(kwe,{ownerState:N})}[I],K=vr(n,ud(Y));return h.jsx(j.Fragment,{children:j.cloneElement(Y,{inputComponent:_,inputProps:{children:o,error:E.error,IconComponent:u,variant:I,type:void 0,multiple:v,...g?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:b,onClose:y,onOpen:w,open:x,renderValue:C,SelectDisplayProps:{id:f,...k}},...A,classes:A?co(V,A.classes):V,...d?d.props.inputProps:{}},...(v&&g||c)&&I==="outlined"?{notched:!0}:{},ref:K,className:ft(Y.props.className,a,$.root),...!d&&{variant:I},...L})})});Al.muiName="Select";function Iwe(e){return Mt("MuiTextField",e)}Nt("MuiTextField",["root"]);const Fwe={standard:n_,filled:r_,outlined:i_},Twe=e=>{const{classes:t}=e;return Dt({root:["root"]},Iwe,t)},Rwe=He(Yc,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Wt=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:f=!1,FormHelperTextProps:d,fullWidth:A=!1,helperText:p,id:m,InputLabelProps:b,inputProps:v,InputProps:g,inputRef:y,label:w,maxRows:x,minRows:C,multiline:k=!1,name:F,onBlur:L,onChange:_,onFocus:T,placeholder:E,required:I=!1,rows:N,select:$=!1,SelectProps:D,slots:V={},slotProps:Y={},type:K,value:O,variant:ne="outlined",...z}=r,R={...r,autoFocus:o,color:l,disabled:u,error:f,fullWidth:A,multiline:k,required:I,select:$,variant:ne},M=Twe(R),H=hf(m),U=p&&H?`${H}-helper-text`:void 0,X=w&&H?`${H}-label`:void 0,Z=Fwe[ne],ue={slots:V,slotProps:{input:g,inputLabel:b,htmlInput:v,formHelperText:d,select:D,...Y}},ye={},ee=ue.slotProps.inputLabel;ne==="outlined"&&(ee&&typeof ee.shrink<"u"&&(ye.notched=ee.shrink),ye.label=w),$&&((!D||!D.native)&&(ye.id=void 0),ye["aria-describedby"]=void 0);const[J,ce]=Fr("input",{elementType:Z,externalForwardedProps:ue,additionalProps:ye,ownerState:R}),[_e,be]=Fr("inputLabel",{elementType:bh,externalForwardedProps:ue,ownerState:R}),[se,Me]=Fr("htmlInput",{elementType:"input",externalForwardedProps:ue,ownerState:R}),[Oe,Ee]=Fr("formHelperText",{elementType:Awe,externalForwardedProps:ue,ownerState:R}),[Xe,tt]=Fr("select",{elementType:Al,externalForwardedProps:ue,ownerState:R}),Ke=h.jsx(J,{"aria-describedby":U,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:A,multiline:k,name:F,rows:N,maxRows:x,minRows:C,type:K,value:O,id:H,inputRef:y,onBlur:L,onChange:_,onFocus:T,placeholder:E,inputProps:Me,slots:{input:V.htmlInput?se:void 0},...ce});return h.jsxs(Rwe,{className:ft(M.root,a),disabled:u,error:f,fullWidth:A,ref:n,required:I,color:l,variant:ne,ownerState:R,...z,children:[w!=null&&w!==""&&h.jsx(_e,{htmlFor:H,id:X,...be,children:w}),$?h.jsx(Xe,{"aria-describedby":U,id:H,labelId:X,value:O,input:Ke,...tt,children:s}):Ke,p&&h.jsx(Oe,{id:U,...Ee,children:p})]})}),Pwe=({status:e})=>{const n={connected:{color:"success.main",text:"Connected to promptfoo API"},blocked:{color:"error.main",text:"Cannot connect to promptfoo API"},loading:{color:"info.main",text:"Checking connection..."},unknown:{color:"grey.500",text:"Checking connection status..."},disabled:{color:"grey.400",text:"Remote generation is disabled"}}[e];return h.jsxs(De,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(X1e,{sx:{color:n.color,fontSize:"12px"}}),h.jsx(Le,{variant:"body2",children:n.text})]})};function Lwe({open:e,onClose:t}){const{apiBaseUrl:n,setApiBaseUrl:r,enablePersistApiBaseUrl:i}=pM(),[o,s]=j.useState(n||""),{status:a,message:l,checkHealth:c,isChecking:u}=Y1e(),[f,d]=j.useState(!1);j.useEffect(()=>{e&&c()},[e,c]),j.useEffect(()=>{s(n||"")},[n]);const A=b=>{s(b.target.value)},p=async()=>{try{d(!0),r(o),i(),await c(),t()}finally{d(!1)}},m=a==="loading"||u||f;return h.jsxs(zn,{open:e,onClose:t,maxWidth:"xs",fullWidth:!0,"aria-labelledby":"api-settings-dialog-title",children:[h.jsx(qn,{id:"api-settings-dialog-title",children:"API and Sharing Settings"}),h.jsxs(Vn,{children:[h.jsxs(De,{sx:{mb:3},children:[h.jsxs(De,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[h.jsx(Pwe,{status:a}),h.jsx(gn,{title:"Check connection",children:h.jsx("span",{children:h.jsx(fn,{onClick:c,size:"small",disabled:u,children:u?h.jsx(Hs,{size:20}):h.jsx(J1e,{})})})})]}),l&&a!=="unknown"&&a!=="loading"&&h.jsx(FA,{severity:a==="connected"?"success":"error",sx:{mt:1},children:l})]}),h.jsx(Le,{variant:"h6",children:"API"}),h.jsx(Wt,{label:"API Base URL",helperText:"The promptfoo API the webview will connect to",value:o,onChange:A,fullWidth:!0,margin:"normal",disabled:m})]}),h.jsxs(Sr,{children:[h.jsx(gt,{onClick:p,disabled:m,startIcon:f&&h.jsx(Hs,{size:20}),children:"Save"}),h.jsx(gt,{onClick:t,disabled:m,children:"Close"})]})]})}const Owe=zt(h.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode"),jwe=zt(h.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode"),Mwe=He(fn)(({theme:e})=>({padding:8,borderRadius:"50%",transition:e.transitions.create(["background-color","transform"],{duration:e.transitions.duration.standard}),"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)",transform:"rotate(15deg)"}})),m$=He("div")(({theme:e})=>({display:"flex",transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.standard})})),WJ=st.memo(({onToggleDarkMode:e})=>{const n=fr().palette.mode==="dark";return h.jsxs(Mwe,{onClick:e,"aria-label":n?"Switch to light mode":"Switch to dark mode",children:[h.jsx(m$,{sx:{opacity:n?1:0,transform:n?"rotate(0deg)":"rotate(-90deg)",position:"absolute"},children:h.jsx(Owe,{})}),h.jsx(m$,{sx:{opacity:n?0:1,transform:n?"rotate(90deg)":"rotate(0deg)"},children:h.jsx(jwe,{})})]})});WJ.displayName="DarkModeToggle";const Nwe=zt(h.jsx("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z"}),"BugReport"),Uwe=zt(h.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),Dwe=zt(h.jsx("path",{d:"M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1m-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1"}),"Forum"),$we=zt(h.jsx("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),Qwe=zt([h.jsx("path",{d:"M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1m0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5z"},"0"),h.jsx("path",{d:"M17.5 10.5c.88 0 1.73.09 2.5.26V9.24c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99M13 12.49v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26V11.9c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.3-4.5.83m4.5 1.84c-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26v-1.52c-.79-.16-1.64-.24-2.5-.24"},"1")],"MenuBook"),Hwe=zt(h.jsx("path",{d:"M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-6 0h-4V4h4z"}),"Work");function zwe(e){return Mt("MuiLink",e)}const Vwe=Nt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),qwe=({theme:e,ownerState:t})=>{const n=t.color,r=Cm(e,`palette.${n}`,!1)||t.color,i=Cm(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:jt(r,.4)},v$={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Wwe=e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root",`underline${rt(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Dt(o,zwe,t)},Kwe=He(Le,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${rt(n.underline)}`],n.component==="button"&&t.button]}})(Rt(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},...Object.entries(e.palette).filter(Xn()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.4)`:jt(e.palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:jt(e.palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.secondaryChannel} / 0.4)`:jt(e.palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Vwe.focusVisible}`]:{outline:"auto"}}}]}))),wh=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiLink"}),i=fr(),{className:o,color:s="primary",component:a="a",onBlur:l,onFocus:c,TypographyClasses:u,underline:f="always",variant:d="inherit",sx:A,...p}=r,[m,b]=j.useState(!1),v=x=>{NA(x.target)||b(!1),l&&l(x)},g=x=>{NA(x.target)&&b(!0),c&&c(x)},y={...r,color:s,component:a,focusVisible:m,underline:f,variant:d},w=Wwe(y);return h.jsx(Kwe,{color:s,className:ft(w.root,o),classes:u,component:a,onBlur:v,onFocus:g,ref:n,ownerState:y,variant:d,...p,sx:[...v$[s]===void 0?[{color:s}]:[],...Array.isArray(A)?A:[A]],style:{...p.style,...f==="always"&&s!=="inherit"&&!v$[s]&&{"--Link-underlineColor":qwe({theme:i,ownerState:y})}}})}),cr=Ume({createStyledComponent:He("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Vt({props:e,name:"MuiStack"})}),Gwe=[{icon:h.jsx(Qwe,{fontSize:"small"}),text:"Documentation",href:"https://www.promptfoo.dev/docs/intro"},{icon:h.jsx($we,{fontSize:"small"}),text:"GitHub Repository",href:"https://github.com/promptfoo/promptfoo"},{icon:h.jsx(Nwe,{fontSize:"small"}),text:"File an Issue",href:"https://github.com/promptfoo/promptfoo/issues"},{icon:h.jsx(Dwe,{fontSize:"small"}),text:"Join Our Discord Community",href:"https://discord.gg/gHPS9jjfbs"},{icon:h.jsx(Uwe,{fontSize:"small"}),text:"Book a Meeting",href:"https://cal.com/team/promptfoo/intro2"},{icon:h.jsx(Hwe,{fontSize:"small"}),text:"Careers",href:"https://www.promptfoo.dev/careers/"}];function Ywe({open:e,onClose:t}){return h.jsxs(zn,{open:e,onClose:t,maxWidth:"xs",fullWidth:!0,"aria-labelledby":"about-promptfoo-dialog-title",children:[h.jsx(qn,{id:"about-promptfoo-dialog-title",children:h.jsxs(cr,{children:[h.jsx(Le,{variant:"h6",children:"About Promptfoo"}),h.jsx(wh,{href:"https://github.com/promptfoo/promptfoo/releases",underline:"none",sx:{color:"inherit"},target:"_blank",children:h.jsxs(Le,{variant:"subtitle2",children:["Version ","0.103.2"]})})]})}),h.jsxs(Vn,{children:[h.jsx(Le,{variant:"body2",gutterBottom:!0,children:"Promptfoo is a MIT licensed open-source tool for evaluating and red-teaming LLMs. We make it easy to track the performance of your models and prompts over time with automated support for dataset generation and grading."}),h.jsx(cr,{spacing:2,mt:2,children:Gwe.map((n,r)=>h.jsxs(cr,{direction:"row",spacing:1,alignItems:"center",sx:{flexWrap:"wrap","& .MuiSvgIcon-root":{color:"text.primary"}},children:[n.icon,h.jsx(wh,{underline:"none",target:"_blank",href:n.href,sx:{color:"inherit"},children:h.jsx(Le,{variant:"body2",children:n.text})})]},r))})]}),h.jsx(Sr,{children:h.jsx(gt,{onClick:t,children:"Close"})})]})}const Xwe="/assets/logo-panda-BuYvzEyb.svg",Jwe=He(De)(({theme:e})=>({display:"inline-flex",alignItems:"center",padding:e.spacing(1,2),perspective:"2000px",transformStyle:"preserve-3d"})),Zwe=He(Le)(({theme:e})=>({fontFamily:'"Inter", sans-serif',fontWeight:600,fontSize:"1rem",color:e.palette.text.primary,letterSpacing:"0.02em",marginLeft:e.spacing(1),transition:"all 0.3s ease","@keyframes rainbow":{"0%":{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0% 50%"}},"&:hover":{color:"transparent",backgroundImage:"linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff)",backgroundSize:"300% 300%",backgroundClip:"text",WebkitBackgroundClip:"text",animation:"rainbow 3s ease infinite"}})),exe=He("img")({width:"25px",height:"auto",transition:"all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55)","@keyframes absoluteMadness":{"0%":{transform:"translateY(0) rotate(0deg) scale(1) translateX(0)",filter:"hue-rotate(0deg) brightness(1)"},"25%":{transform:"translateY(-25px) rotate(360deg) scale(1.5) translateX(15px)",filter:"hue-rotate(180deg) brightness(1.5)"},"50%":{transform:"translateY(0) rotate(720deg) scale(0.5) translateX(-15px)",filter:"hue-rotate(360deg) brightness(2)"},"75%":{transform:"translateY(25px) rotate(1080deg) scale(1.8) translateX(15px)",filter:"hue-rotate(540deg) brightness(1.5)"},"100%":{transform:"translateY(0) rotate(1440deg) scale(1) translateX(0)",filter:"hue-rotate(720deg) brightness(1)"}},"@keyframes vibrate":{"0%, 100%":{transform:"translate(0)"},"10%, 30%, 50%, 70%, 90%":{transform:"translate(-2px, 2px)"},"20%, 40%, 60%, 80%":{transform:"translate(2px, -2px)"}},"&:hover":{animation:"absoluteMadness 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite, vibrate 0.3s linear infinite",filter:"hue-rotate(720deg) brightness(2) contrast(1.5) saturate(300%) drop-shadow(0 0 10px rgba(255,0,0,0.5))"}});function txe(){return h.jsx(As,{to:"/",style:{textDecoration:"none"},children:h.jsxs(Jwe,{children:[h.jsx(exe,{src:Xwe,alt:"Promptfoo Logo"}),h.jsx(Zwe,{variant:"h1",children:"promptfoo"})]})})}const KJ=He(gt)(({theme:e})=>({color:e.palette.text.primary,"&:hover":{backgroundColor:e.palette.action.hover},"&.active":{backgroundColor:e.palette.action.selected}})),nxe=He(F0e)(({theme:e})=>({backgroundColor:e.palette.background.paper,color:e.palette.text.primary,boxShadow:e.shadows[1],marginBottom:e.spacing(2)})),rxe=He(TJ)({justifyContent:"space-between"}),y$=He(De)({display:"flex",alignItems:"center",gap:"1rem"});function Qx({href:e,label:t}){const r=nc().pathname.startsWith(e);return h.jsx(KJ,{component:As,to:e,className:r?"active":"",children:t})}function ixe(){const[e,t]=j.useState(null),n=!!e,r=nc(),i=a=>{t(a.currentTarget)},o=()=>{t(null)},s=["/setup","/redteam/setup"].some(a=>r.pathname.startsWith(a));return h.jsxs(h.Fragment,{children:[h.jsx(KJ,{onClick:i,endIcon:h.jsx(hP,{}),className:s?"active":"",children:"Create"}),h.jsxs(ew,{anchorEl:e,open:n,onClose:o,PaperProps:{elevation:0,sx:{overflow:"visible",filter:"drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",mt:1.5}},children:[h.jsx(Kn,{onClick:o,component:As,to:"/setup",children:"Eval"}),h.jsx(Kn,{onClick:o,component:As,to:"/redteam/setup",children:"Redteam"})]})]})}function oxe({darkMode:e,onToggleDarkMode:t}){const[n,r]=j.useState(!1),[i,o]=j.useState(!1),s=()=>r(l=>!l),a=()=>o(l=>!l);return h.jsxs(h.Fragment,{children:[h.jsx(nxe,{position:"static",elevation:0,children:h.jsxs(rxe,{children:[h.jsxs(y$,{children:[h.jsx(txe,{}),h.jsx(ixe,{}),h.jsx(Qx,{href:"/eval",label:"Evals"}),h.jsx(Qx,{href:"/prompts",label:"Prompts"}),h.jsx(Qx,{href:"/datasets",label:"Datasets"}),h.jsx(Qx,{href:"/progress",label:"History"})]}),h.jsxs(y$,{children:[h.jsx(fn,{onClick:s,color:"inherit",children:h.jsx(iM,{})}),h.jsx(gn,{title:"API and Sharing Settings",children:h.jsx(fn,{onClick:a,color:"inherit",children:h.jsx(w0e,{})})}),h.jsx(WJ,{onToggleDarkMode:t})]})]})}),h.jsx(Ywe,{open:n,onClose:s}),h.jsx(Lwe,{open:i,onClose:a})]})}const sxe=ime({themeId:ul}),GJ=e=>OE({typography:{fontFamily:"inherit"},palette:{mode:e?"dark":"light",background:{default:"#ffffff"}},components:{MuiCard:{styleOverrides:{root:{backgroundColor:e?"#121212":"#fff",boxShadow:e?"none":"0 2px 3px rgba(0, 0, 0, 0.1)",borderRadius:"12px"}}},MuiTableContainer:{styleOverrides:{root:{backgroundColor:e?"#121212":"#fff",boxShadow:e?"none":"0 2px 3px rgba(0, 0, 0, 0.1)",borderRadius:"12px"}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:e?"#1E1E1E":"#F5F5F5"}}},MuiTableCell:{styleOverrides:{head:{backgroundColor:"inherit",color:e?"#FFFFFF":"#000000",fontWeight:"bold"},stickyHeader:{backgroundColor:e?"#1E1E1E":"#F5F5F5"}}},MuiInputBase:{styleOverrides:{root:{backgroundColor:e?"#333":"#fff"}}}}}),axe=GJ(!1),lxe=GJ(!0);function cxe({children:e}){return h.jsx("div",{children:e})}function uxe(){const e=sxe("(prefers-color-scheme: dark)"),[t,n]=j.useState(null);j.useEffect(()=>{const i=localStorage.getItem("darkMode");n(i===null?e:i==="true")},[e]);const r=j.useCallback(()=>{n(i=>{const o=!i;return localStorage.setItem("darkMode",String(o)),o})},[]);return j.useEffect(()=>{t!==null&&(t?document.documentElement.setAttribute("data-theme","dark"):document.documentElement.removeAttribute("data-theme"))},[t]),t===null?null:h.jsx(L0e,{theme:t?lxe:axe,children:h.jsxs(cxe,{children:[h.jsx(oxe,{darkMode:t,onToggleDarkMode:r}),h.jsx(bX,{})]})})}function fxe(e){return Mt("MuiCollapse",e)}Nt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Axe=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Dt(r,fxe,n)},dxe=He("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(Rt(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),hxe=He("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),pxe=He("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),o_=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:a="0px",component:l,easing:c,in:u,onEnter:f,onEntered:d,onEntering:A,onExit:p,onExited:m,onExiting:b,orientation:v="vertical",style:g,timeout:y=yJ.standard,TransitionComponent:w=Cl,...x}=r,C={...r,orientation:v,collapsedSize:a},k=Axe(C),F=fr(),L=AA(),_=j.useRef(null),T=j.useRef(),E=typeof a=="number"?`${a}px`:a,I=v==="horizontal",N=I?"width":"height",$=j.useRef(null),D=vr(n,$),V=U=>X=>{if(U){const Z=$.current;X===void 0?U(Z):U(Z,X)}},Y=()=>_.current?_.current[I?"clientWidth":"clientHeight"]:0,K=V((U,X)=>{_.current&&I&&(_.current.style.position="absolute"),U.style[N]=E,f&&f(U,X)}),O=V((U,X)=>{const Z=Y();_.current&&I&&(_.current.style.position="");const{duration:ue,easing:ye}=QA({style:g,timeout:y,easing:c},{mode:"enter"});if(y==="auto"){const ee=F.transitions.getAutoHeightDuration(Z);U.style.transitionDuration=`${ee}ms`,T.current=ee}else U.style.transitionDuration=typeof ue=="string"?ue:`${ue}ms`;U.style[N]=`${Z}px`,U.style.transitionTimingFunction=ye,A&&A(U,X)}),ne=V((U,X)=>{U.style[N]="auto",d&&d(U,X)}),z=V(U=>{U.style[N]=`${Y()}px`,p&&p(U)}),R=V(m),M=V(U=>{const X=Y(),{duration:Z,easing:ue}=QA({style:g,timeout:y,easing:c},{mode:"exit"});if(y==="auto"){const ye=F.transitions.getAutoHeightDuration(X);U.style.transitionDuration=`${ye}ms`,T.current=ye}else U.style.transitionDuration=typeof Z=="string"?Z:`${Z}ms`;U.style[N]=E,U.style.transitionTimingFunction=ue,b&&b(U)}),H=U=>{y==="auto"&&L.start(T.current||0,U),i&&i($.current,U)};return h.jsx(w,{in:u,onEnter:K,onEntered:ne,onEntering:O,onExit:z,onExited:R,onExiting:M,addEndListener:H,nodeRef:$,timeout:y==="auto"?null:y,...x,children:(U,X)=>h.jsx(dxe,{as:l,className:ft(k.root,s,{entered:k.entered,exited:!u&&E==="0px"&&k.hidden}[U]),style:{[I?"minWidth":"minHeight"]:E,...g},ref:D,...X,ownerState:{...C,state:U},children:h.jsx(hxe,{ownerState:{...C,state:U},className:k.wrapper,ref:_,children:h.jsx(pxe,{ownerState:{...C,state:U},className:k.wrapperInner,children:o})})})})});o_&&(o_.muiSupportAuto=!0);const YJ=j.createContext({});function gxe(e){return Mt("MuiAccordion",e)}const Hx=Nt("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),mxe=e=>{const{classes:t,square:n,expanded:r,disabled:i,disableGutters:o}=e;return Dt({root:["root",!n&&"rounded",r&&"expanded",i&&"disabled",!o&&"gutters"],heading:["heading"],region:["region"]},gxe,t)},vxe=He(Tn,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Hx.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(Rt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${Hx.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${Hx.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),Rt(({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${Hx.expanded}`]:{margin:"16px 0"}}}]}))),yxe=He("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),Rc=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiAccordion"}),{children:i,className:o,defaultExpanded:s=!1,disabled:a=!1,disableGutters:l=!1,expanded:c,onChange:u,square:f=!1,slots:d={},slotProps:A={},TransitionComponent:p,TransitionProps:m,...b}=r,[v,g]=Kl({controlled:c,default:s,name:"Accordion",state:"expanded"}),y=j.useCallback(D=>{g(!v),u&&u(D,!v)},[v,u,g]),[w,...x]=j.Children.toArray(i),C=j.useMemo(()=>({expanded:v,disabled:a,disableGutters:l,toggle:y}),[v,a,l,y]),k={...r,square:f,disabled:a,disableGutters:l,expanded:v},F=mxe(k),L={transition:p,...d},_={transition:m,...A},T={slots:L,slotProps:_},[E,I]=Fr("heading",{elementType:yxe,externalForwardedProps:T,className:F.heading,ownerState:k}),[N,$]=Fr("transition",{elementType:o_,externalForwardedProps:T,ownerState:k});return h.jsxs(vxe,{className:ft(F.root,o),ref:n,ownerState:k,square:f,...b,children:[h.jsx(E,{...I,children:h.jsx(YJ.Provider,{value:C,children:w})}),h.jsx(N,{in:v,timeout:"auto",...$,children:h.jsx("div",{"aria-labelledby":w.props.id,id:w.props["aria-controls"],role:"region",className:F.region,children:x})})]})});function bxe(e){return Mt("MuiAccordionDetails",e)}Nt("MuiAccordionDetails",["root"]);const wxe=e=>{const{classes:t}=e;return Dt({root:["root"]},bxe,t)},xxe=He("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(Rt(({theme:e})=>({padding:e.spacing(1,2,2)}))),qa=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiAccordionDetails"}),{className:i,...o}=r,s=r,a=wxe(s);return h.jsx(xxe,{className:ft(a.root,i),ref:n,ownerState:s,...o})});function Cxe(e){return Mt("MuiAccordionSummary",e)}const kg=Nt("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),Sxe=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return Dt({root:["root",n&&"expanded",r&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},Cxe,t)},_xe=He(ya,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(Rt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${kg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${kg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${kg.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${kg.expanded}`]:{minHeight:64}}}]}})),Bxe=He("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(Rt(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${kg.expanded}`]:{margin:"20px 0"}}}]}))),Exe=He("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(Rt(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${kg.expanded}`]:{transform:"rotate(180deg)"}}))),Pc=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiAccordionSummary"}),{children:i,className:o,expandIcon:s,focusVisibleClassName:a,onClick:l,...c}=r,{disabled:u=!1,disableGutters:f,expanded:d,toggle:A}=j.useContext(YJ),p=v=>{A&&A(v),l&&l(v)},m={...r,expanded:d,disabled:u,disableGutters:f},b=Sxe(m);return h.jsxs(_xe,{focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":d,className:ft(b.root,o),focusVisibleClassName:ft(b.focusVisible,a),onClick:p,ref:n,ownerState:m,...c,children:[h.jsx(Bxe,{className:b.content,ownerState:m,children:i}),s&&h.jsx(Exe,{className:b.expandIconWrapper,ownerState:m,children:s})]})});function b$(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function kxe(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:i="any",stringify:o,trim:s=!1}=e;return(a,{inputValue:l,getOptionLabel:c})=>{let u=s?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=b$(u));const f=u?a.filter(d=>{let A=(o||c)(d);return n&&(A=A.toLowerCase()),t&&(A=b$(A)),i==="start"?A.startsWith(u):A.includes(u)}):a;return typeof r=="number"?f.slice(0,r):f}}const Ixe=kxe(),w$=5,Fxe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))},Txe=[];function Rxe(e){const{unstable_isActiveElementInListbox:t=Fxe,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:i=!1,autoSelect:o=!1,blurOnSelect:s=!1,clearOnBlur:a=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=e.multiple?Txe:null,disableClearable:f=!1,disableCloseOnSelect:d=!1,disabled:A,disabledItemsFocusable:p=!1,disableListWrap:m=!1,filterOptions:b=Ixe,filterSelectedOptions:v=!1,freeSolo:g=!1,getOptionDisabled:y,getOptionKey:w,getOptionLabel:x=et=>et.label??et,groupBy:C,handleHomeEndKeys:k=!e.freeSolo,id:F,includeInputInList:L=!1,inputValue:_,isOptionEqualToValue:T=(et,Ze)=>et===Ze,multiple:E=!1,onChange:I,onClose:N,onHighlightChange:$,onInputChange:D,onOpen:V,open:Y,openOnFocus:K=!1,options:O,readOnly:ne=!1,selectOnFocus:z=!e.freeSolo,value:R}=e,M=hf(F);let H=x;H=et=>{const Ze=x(et);return typeof Ze!="string"?String(Ze):Ze};const U=j.useRef(!1),X=j.useRef(!0),Z=j.useRef(null),ue=j.useRef(null),[ye,ee]=j.useState(null),[J,ce]=j.useState(-1),_e=i?0:-1,be=j.useRef(_e),[se,Me]=Kl({controlled:R,default:u,name:c}),[Oe,Ee]=Kl({controlled:_,default:"",name:c,state:"inputValue"}),[Xe,tt]=j.useState(!1),Ke=j.useCallback((et,Ze,Bt)=>{if(!(E?se.length<Ze.length:Ze!==null)&&!a)return;let Qt;if(E)Qt="";else if(Ze==null)Qt="";else{const An=H(Ze);Qt=typeof An=="string"?An:""}Oe!==Qt&&(Ee(Qt),D&&D(et,Qt,Bt))},[H,Oe,E,D,Ee,a,se]),[Ne,ve]=Kl({controlled:Y,default:!1,name:c,state:"open"}),[Be,xe]=j.useState(!0),Fe=!E&&se!=null&&Oe===H(se),Se=Ne&&!ne,Re=Se?b(O.filter(et=>!(v&&(E?se:[se]).some(Ze=>Ze!==null&&T(et,Ze)))),{inputValue:Fe&&Be?"":Oe,getOptionLabel:H}):[],re=Phe({filteredOptions:Re,value:se,inputValue:Oe});j.useEffect(()=>{const et=se!==re.value;Xe&&!et||g&&!et||Ke(null,se,"reset")},[se,Ke,Xe,re.value,g]);const B=Ne&&Re.length>0&&!ne,q=Bi(et=>{et===-1?Z.current.focus():ye.querySelector(`[data-tag-index="${et}"]`).focus()});j.useEffect(()=>{E&&J>se.length-1&&(ce(-1),q(-1))},[se,E,J,q]);function le(et,Ze){if(!ue.current||et<0||et>=Re.length)return-1;let Bt=et;for(;;){const $t=ue.current.querySelector(`[data-option-index="${Bt}"]`),Qt=p?!1:!$t||$t.disabled||$t.getAttribute("aria-disabled")==="true";if($t&&$t.hasAttribute("tabindex")&&!Qt)return Bt;if(Ze==="next"?Bt=(Bt+1)%Re.length:Bt=(Bt-1+Re.length)%Re.length,Bt===et)return-1}}const he=Bi(({event:et,index:Ze,reason:Bt="auto"})=>{if(be.current=Ze,Ze===-1?Z.current.removeAttribute("aria-activedescendant"):Z.current.setAttribute("aria-activedescendant",`${M}-option-${Ze}`),$&&$(et,Ze===-1?null:Re[Ze],Bt),!ue.current)return;const $t=ue.current.querySelector(`[role="option"].${n}-focused`);$t&&($t.classList.remove(`${n}-focused`),$t.classList.remove(`${n}-focusVisible`));let Qt=ue.current;if(ue.current.getAttribute("role")!=="listbox"&&(Qt=ue.current.parentElement.querySelector('[role="listbox"]')),!Qt)return;if(Ze===-1){Qt.scrollTop=0;return}const An=ue.current.querySelector(`[data-option-index="${Ze}"]`);if(An&&(An.classList.add(`${n}-focused`),Bt==="keyboard"&&An.classList.add(`${n}-focusVisible`),Qt.scrollHeight>Qt.clientHeight&&Bt!=="mouse"&&Bt!=="touch")){const Bn=An,zr=Qt.clientHeight+Qt.scrollTop,gi=Bn.offsetTop+Bn.offsetHeight;gi>zr?Qt.scrollTop=gi-Qt.clientHeight:Bn.offsetTop-Bn.offsetHeight*(C?1.3:0)<Qt.scrollTop&&(Qt.scrollTop=Bn.offsetTop-Bn.offsetHeight*(C?1.3:0))}}),ae=Bi(({event:et,diff:Ze,direction:Bt="next",reason:$t="auto"})=>{if(!Se)return;const An=le((()=>{const Bn=Re.length-1;if(Ze==="reset")return _e;if(Ze==="start")return 0;if(Ze==="end")return Bn;const zr=be.current+Ze;return zr<0?zr===-1&&L?-1:m&&be.current!==-1||Math.abs(Ze)>1?0:Bn:zr>Bn?zr===Bn+1&&L?-1:m||Math.abs(Ze)>1?Bn:0:zr})(),Bt);if(he({index:An,reason:$t,event:et}),r&&Ze!=="reset")if(An===-1)Z.current.value=Oe;else{const Bn=H(Re[An]);Z.current.value=Bn,Bn.toLowerCase().indexOf(Oe.toLowerCase())===0&&Oe.length>0&&Z.current.setSelectionRange(Oe.length,Bn.length)}}),pe=()=>{const et=(Ze,Bt)=>{const $t=Ze?H(Ze):"",Qt=Bt?H(Bt):"";return $t===Qt};if(be.current!==-1&&re.filteredOptions&&re.filteredOptions.length!==Re.length&&re.inputValue===Oe&&(E?se.length===re.value.length&&re.value.every((Ze,Bt)=>H(se[Bt])===H(Ze)):et(re.value,se))){const Ze=re.filteredOptions[be.current];if(Ze)return Re.findIndex(Bt=>H(Bt)===H(Ze))}return-1},ie=j.useCallback(()=>{if(!Se)return;const et=pe();if(et!==-1){be.current=et;return}const Ze=E?se[0]:se;if(Re.length===0||Ze==null){ae({diff:"reset"});return}if(ue.current){if(Ze!=null){const Bt=Re[be.current];if(E&&Bt&&se.findIndex(Qt=>T(Bt,Qt))!==-1)return;const $t=Re.findIndex(Qt=>T(Qt,Ze));$t===-1?ae({diff:"reset"}):he({index:$t});return}if(be.current>=Re.length-1){he({index:Re.length-1});return}he({index:be.current})}},[Re.length,E?!1:se,v,ae,he,Se,Oe,E]),Ue=Bi(et=>{KS(ue,et),et&&ie()});j.useEffect(()=>{ie()},[ie]);const At=et=>{Ne||(ve(!0),xe(!0),V&&V(et))},W=(et,Ze)=>{Ne&&(ve(!1),N&&N(et,Ze))},je=(et,Ze,Bt,$t)=>{if(E){if(se.length===Ze.length&&se.every((Qt,An)=>Qt===Ze[An]))return}else if(se===Ze)return;I&&I(et,Ze,Bt,$t),Me(Ze)},ze=j.useRef(!1),de=(et,Ze,Bt="selectOption",$t="options")=>{let Qt=Bt,An=Ze;if(E){An=Array.isArray(se)?se.slice():[];const Bn=An.findIndex(zr=>T(Ze,zr));Bn===-1?An.push(Ze):$t!=="freeSolo"&&(An.splice(Bn,1),Qt="removeOption")}Ke(et,An,Qt),je(et,An,Qt,{option:Ze}),!d&&(!et||!et.ctrlKey&&!et.metaKey)&&W(et,Qt),(s===!0||s==="touch"&&ze.current||s==="mouse"&&!ze.current)&&Z.current.blur()};function Ie(et,Ze){if(et===-1)return-1;let Bt=et;for(;;){if(Ze==="next"&&Bt===se.length||Ze==="previous"&&Bt===-1)return-1;const $t=ye.querySelector(`[data-tag-index="${Bt}"]`);if(!$t||!$t.hasAttribute("tabindex")||$t.disabled||$t.getAttribute("aria-disabled")==="true")Bt+=Ze==="next"?1:-1;else return Bt}}const We=(et,Ze)=>{if(!E)return;Oe===""&&W(et,"toggleInput");let Bt=J;J===-1?Oe===""&&Ze==="previous"&&(Bt=se.length-1):(Bt+=Ze==="next"?1:-1,Bt<0&&(Bt=0),Bt===se.length&&(Bt=-1)),Bt=Ie(Bt,Ze),ce(Bt),q(Bt)},Lt=et=>{U.current=!0,Ee(""),D&&D(et,"","clear"),je(et,E?[]:null,"clear")},at=et=>Ze=>{if(et.onKeyDown&&et.onKeyDown(Ze),!Ze.defaultMuiPrevented&&(J!==-1&&!["ArrowLeft","ArrowRight"].includes(Ze.key)&&(ce(-1),q(-1)),Ze.which!==229))switch(Ze.key){case"Home":Se&&k&&(Ze.preventDefault(),ae({diff:"start",direction:"next",reason:"keyboard",event:Ze}));break;case"End":Se&&k&&(Ze.preventDefault(),ae({diff:"end",direction:"previous",reason:"keyboard",event:Ze}));break;case"PageUp":Ze.preventDefault(),ae({diff:-w$,direction:"previous",reason:"keyboard",event:Ze}),At(Ze);break;case"PageDown":Ze.preventDefault(),ae({diff:w$,direction:"next",reason:"keyboard",event:Ze}),At(Ze);break;case"ArrowDown":Ze.preventDefault(),ae({diff:1,direction:"next",reason:"keyboard",event:Ze}),At(Ze);break;case"ArrowUp":Ze.preventDefault(),ae({diff:-1,direction:"previous",reason:"keyboard",event:Ze}),At(Ze);break;case"ArrowLeft":We(Ze,"previous");break;case"ArrowRight":We(Ze,"next");break;case"Enter":if(be.current!==-1&&Se){const Bt=Re[be.current],$t=y?y(Bt):!1;if(Ze.preventDefault(),$t)return;de(Ze,Bt,"selectOption"),r&&Z.current.setSelectionRange(Z.current.value.length,Z.current.value.length)}else g&&Oe!==""&&Fe===!1&&(E&&Ze.preventDefault(),de(Ze,Oe,"createOption","freeSolo"));break;case"Escape":Se?(Ze.preventDefault(),Ze.stopPropagation(),W(Ze,"escape")):l&&(Oe!==""||E&&se.length>0)&&(Ze.preventDefault(),Ze.stopPropagation(),Lt(Ze));break;case"Backspace":if(E&&!ne&&Oe===""&&se.length>0){const Bt=J===-1?se.length-1:J,$t=se.slice();$t.splice(Bt,1),je(Ze,$t,"removeOption",{option:se[Bt]})}break;case"Delete":if(E&&!ne&&Oe===""&&se.length>0&&J!==-1){const Bt=J,$t=se.slice();$t.splice(Bt,1),je(Ze,$t,"removeOption",{option:se[Bt]})}break}},Et=et=>{tt(!0),K&&!U.current&&At(et)},cn=et=>{if(t(ue)){Z.current.focus();return}tt(!1),X.current=!0,U.current=!1,o&&be.current!==-1&&Se?de(et,Re[be.current],"blur"):o&&g&&Oe!==""?de(et,Oe,"blur","freeSolo"):a&&Ke(et,se,"blur"),W(et,"blur")},Te=et=>{const Ze=et.target.value;Oe!==Ze&&(Ee(Ze),xe(!1),D&&D(et,Ze,"input")),Ze===""?!f&&!E&&je(et,null,"clear"):At(et)},$e=et=>{const Ze=Number(et.currentTarget.getAttribute("data-option-index"));be.current!==Ze&&he({event:et,index:Ze,reason:"mouse"})},Ye=et=>{he({event:et,index:Number(et.currentTarget.getAttribute("data-option-index")),reason:"touch"}),ze.current=!0},lt=et=>{const Ze=Number(et.currentTarget.getAttribute("data-option-index"));de(et,Re[Ze],"selectOption"),ze.current=!1},xt=et=>Ze=>{const Bt=se.slice();Bt.splice(et,1),je(Ze,Bt,"removeOption",{option:se[et]})},kt=et=>{Ne?W(et,"toggleInput"):At(et)},en=et=>{et.currentTarget.contains(et.target)&&et.target.getAttribute("id")!==M&&et.preventDefault()},Ut=et=>{et.currentTarget.contains(et.target)&&(Z.current.focus(),z&&X.current&&Z.current.selectionEnd-Z.current.selectionStart===0&&Z.current.select(),X.current=!1)},wt=et=>{!A&&(Oe===""||!Ne)&&kt(et)};let bt=g&&Oe.length>0;bt=bt||(E?se.length>0:se!==null);let It=Re;return C&&(It=Re.reduce((et,Ze,Bt)=>{const $t=C(Ze);return et.length>0&&et[et.length-1].group===$t?et[et.length-1].options.push(Ze):et.push({key:Bt,index:Bt,group:$t,options:[Ze]}),et},[])),A&&Xe&&cn(),{getRootProps:(et={})=>({"aria-owns":B?`${M}-listbox`:null,...et,onKeyDown:at(et),onMouseDown:en,onClick:Ut}),getInputLabelProps:()=>({id:`${M}-label`,htmlFor:M}),getInputProps:()=>({id:M,value:Oe,onBlur:cn,onFocus:Et,onChange:Te,onMouseDown:wt,"aria-activedescendant":Se?"":null,"aria-autocomplete":r?"both":"list","aria-controls":B?`${M}-listbox`:void 0,"aria-expanded":B,autoComplete:"off",ref:Z,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:A}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Lt}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:kt}),getTagProps:({index:et})=>({key:et,"data-tag-index":et,tabIndex:-1,...!ne&&{onDelete:xt(et)}}),getListboxProps:()=>({role:"listbox",id:`${M}-listbox`,"aria-labelledby":`${M}-label`,ref:Ue,onMouseDown:et=>{et.preventDefault()}}),getOptionProps:({index:et,option:Ze})=>{const Bt=(E?se:[se]).some(Qt=>Qt!=null&&T(Ze,Qt)),$t=y?y(Ze):!1;return{key:(w==null?void 0:w(Ze))??H(Ze),tabIndex:-1,role:"option",id:`${M}-option-${et}`,onMouseMove:$e,onClick:lt,onTouchStart:Ye,"data-option-index":et,"aria-disabled":$t,"aria-selected":Bt}},id:M,inputValue:Oe,value:se,dirty:bt,expanded:Se&&ye,popupOpen:Se,focused:Xe||J!==-1,anchorEl:ye,setAnchorEl:ee,focusedTag:J,groupedOptions:It}}function Pxe(e){return Mt("MuiListSubheader",e)}Nt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Lxe=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${rt(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return Dt(s,Pxe,t)},Oxe=He("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${rt(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Rt(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),s_=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:a=!1,disableSticky:l=!1,inset:c=!1,...u}=r,f={...r,color:o,component:s,disableGutters:a,disableSticky:l,inset:c},d=Lxe(f);return h.jsx(Oxe,{as:s,className:ft(d.root,i),ref:n,ownerState:f,...u})});s_&&(s_.muiSkipListHighlight=!0);const jxe=zt(h.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function Mxe(e){return Mt("MuiChip",e)}const Mn=Nt("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Nxe=e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,c={root:["root",l,n&&"disabled",`size${rt(r)}`,`color${rt(i)}`,a&&"clickable",a&&`clickableColor${rt(i)}`,s&&"deletable",s&&`deletableColor${rt(i)}`,`${l}${rt(i)}`],label:["label",`label${rt(r)}`],avatar:["avatar",`avatar${rt(r)}`,`avatarColor${rt(i)}`],icon:["icon",`icon${rt(r)}`,`iconColor${rt(o)}`],deleteIcon:["deleteIcon",`deleteIcon${rt(r)}`,`deleteIconColor${rt(i)}`,`deleteIcon${rt(l)}Color${rt(i)}`]};return Dt(c,Mxe,t)},Uxe=He("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:s,size:a,variant:l}=n;return[{[`& .${Mn.avatar}`]:t.avatar},{[`& .${Mn.avatar}`]:t[`avatar${rt(a)}`]},{[`& .${Mn.avatar}`]:t[`avatarColor${rt(r)}`]},{[`& .${Mn.icon}`]:t.icon},{[`& .${Mn.icon}`]:t[`icon${rt(a)}`]},{[`& .${Mn.icon}`]:t[`iconColor${rt(i)}`]},{[`& .${Mn.deleteIcon}`]:t.deleteIcon},{[`& .${Mn.deleteIcon}`]:t[`deleteIcon${rt(a)}`]},{[`& .${Mn.deleteIcon}`]:t[`deleteIconColor${rt(r)}`]},{[`& .${Mn.deleteIcon}`]:t[`deleteIcon${rt(l)}Color${rt(r)}`]},t.root,t[`size${rt(a)}`],t[`color${rt(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${rt(r)})`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${rt(r)}`],t[l],t[`${l}${rt(r)}`]]}})(Rt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Mn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Mn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Mn.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Mn.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Mn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Mn.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Mn.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:jt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:jt(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Mn.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Mn.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Xn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Mn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:jt(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Mn.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Mn.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:jt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(Xn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Mn.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:jt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:jt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Xn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Mn.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Mn.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Mn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Mn.avatar}`]:{marginLeft:4},[`& .${Mn.avatarSmall}`]:{marginLeft:2},[`& .${Mn.icon}`]:{marginLeft:4},[`& .${Mn.iconSmall}`]:{marginLeft:2},[`& .${Mn.deleteIcon}`]:{marginRight:5},[`& .${Mn.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Xn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:jt(e.palette[n].main,.7)}`,[`&.${Mn.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:jt(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${Mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:jt(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${Mn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:jt(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),Dxe=He("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${rt(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function x$(e){return e.key==="Backspace"||e.key==="Delete"}const us=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiChip"}),{avatar:i,className:o,clickable:s,color:a="default",component:l,deleteIcon:c,disabled:u=!1,icon:f,label:d,onClick:A,onDelete:p,onKeyDown:m,onKeyUp:b,size:v="medium",variant:g="filled",tabIndex:y,skipFocusWhenDisabled:w=!1,...x}=r,C=j.useRef(null),k=vr(C,n),F=K=>{K.stopPropagation(),p&&p(K)},L=K=>{K.currentTarget===K.target&&x$(K)&&K.preventDefault(),m&&m(K)},_=K=>{K.currentTarget===K.target&&p&&x$(K)&&p(K),b&&b(K)},T=s!==!1&&A?!0:s,E=T||p?ya:l||"div",I={...r,component:E,disabled:u,size:v,color:a,iconColor:j.isValidElement(f)&&f.props.color||a,onDelete:!!p,clickable:T,variant:g},N=Nxe(I),$=E===ya?{component:l||"div",focusVisibleClassName:N.focusVisible,...p&&{disableRipple:!0}}:{};let D=null;p&&(D=c&&j.isValidElement(c)?j.cloneElement(c,{className:ft(c.props.className,N.deleteIcon),onClick:F}):h.jsx(jxe,{className:ft(N.deleteIcon),onClick:F}));let V=null;i&&j.isValidElement(i)&&(V=j.cloneElement(i,{className:ft(N.avatar,i.props.className)}));let Y=null;return f&&j.isValidElement(f)&&(Y=j.cloneElement(f,{className:ft(N.icon,f.props.className)})),h.jsxs(Uxe,{as:E,className:ft(N.root,o),disabled:T&&u?!0:void 0,onClick:A,onKeyDown:L,onKeyUp:_,ref:k,tabIndex:w&&u?-1:y,ownerState:I,...$,...x,children:[V||Y,h.jsx(Dxe,{className:ft(N.label),ownerState:I,children:d}),D]})});function $xe(e){return Mt("MuiAutocomplete",e)}const Ln=Nt("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var C$,S$;const Qxe=e=>{const{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:o,hasClearIcon:s,hasPopupIcon:a,inputFocused:l,popupOpen:c,size:u}=e,f={root:["root",r&&"expanded",i&&"focused",o&&"fullWidth",s&&"hasClearIcon",a&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${rt(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Dt(f,$xe,t)},Hxe=He("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:o,inputFocused:s,size:a}=n;return[{[`& .${Ln.tag}`]:t.tag},{[`& .${Ln.tag}`]:t[`tagSize${rt(a)}`]},{[`& .${Ln.inputRoot}`]:t.inputRoot},{[`& .${Ln.input}`]:t.input},{[`& .${Ln.input}`]:s&&t.inputFocused},t.root,r&&t.fullWidth,o&&t.hasPopupIcon,i&&t.hasClearIcon]}})({[`&.${Ln.focused} .${Ln.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Ln.clearIndicator}`]:{visibility:"visible"}},[`& .${Ln.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Ln.inputRoot}`]:{[`.${Ln.hasPopupIcon}&, .${Ln.hasClearIcon}&`]:{paddingRight:30},[`.${Ln.hasPopupIcon}.${Ln.hasClearIcon}&`]:{paddingRight:56},[`& .${Ln.input}`]:{width:0,minWidth:30}},[`& .${sA.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${sA.root}.${ra.sizeSmall}`]:{[`& .${sA.input}`]:{padding:"2px 4px 3px 0"}},[`& .${$a.root}`]:{padding:9,[`.${Ln.hasPopupIcon}&, .${Ln.hasClearIcon}&`]:{paddingRight:39},[`.${Ln.hasPopupIcon}.${Ln.hasClearIcon}&`]:{paddingRight:65},[`& .${Ln.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Ln.endAdornment}`]:{right:9}},[`& .${$a.root}.${ra.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Ln.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${ia.root}`]:{paddingTop:19,paddingLeft:8,[`.${Ln.hasPopupIcon}&, .${Ln.hasClearIcon}&`]:{paddingRight:39},[`.${Ln.hasPopupIcon}.${Ln.hasClearIcon}&`]:{paddingRight:65},[`& .${ia.input}`]:{padding:"7px 4px"},[`& .${Ln.endAdornment}`]:{right:9}},[`& .${ia.root}.${ra.sizeSmall}`]:{paddingBottom:1,[`& .${ia.input}`]:{padding:"2.5px 4px"}},[`& .${ra.hiddenLabel}`]:{paddingTop:8},[`& .${ia.root}.${ra.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Ln.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${ia.root}.${ra.hiddenLabel}.${ra.sizeSmall}`]:{[`& .${Ln.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Ln.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Ln.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Ln.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Ln.inputRoot}`]:{flexWrap:"wrap"}}}]}),zxe=He("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Vxe=He(fn,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),qxe=He(fn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>({...t.popupIndicator,...e.popupOpen&&t.popupIndicatorOpen})})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Wxe=He(UE,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ln.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Rt(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),Kxe=He(Tn,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(Rt(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),Gxe=He("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(Rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Yxe=He("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(Rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Xxe=He("ul",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(Rt(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Ln.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Ln.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Ln.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:jt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ln.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:jt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Ln.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:jt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),Jxe=He(s_,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(Rt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),Zxe=He("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${Ln.option}`]:{paddingLeft:24}}),Ig=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiAutocomplete"}),{autoComplete:i=!1,autoHighlight:o=!1,autoSelect:s=!1,blurOnSelect:a=!1,ChipProps:l,className:c,clearIcon:u=C$||(C$=h.jsx(QJ,{fontSize:"small"})),clearOnBlur:f=!r.freeSolo,clearOnEscape:d=!1,clearText:A="Clear",closeText:p="Close",componentsProps:m,defaultValue:b=r.multiple?[]:null,disableClearable:v=!1,disableCloseOnSelect:g=!1,disabled:y=!1,disabledItemsFocusable:w=!1,disableListWrap:x=!1,disablePortal:C=!1,filterOptions:k,filterSelectedOptions:F=!1,forcePopupIcon:L="auto",freeSolo:_=!1,fullWidth:T=!1,getLimitTagsText:E=on=>`+${on}`,getOptionDisabled:I,getOptionKey:N,getOptionLabel:$,isOptionEqualToValue:D,groupBy:V,handleHomeEndKeys:Y=!r.freeSolo,id:K,includeInputInList:O=!1,inputValue:ne,limitTags:z=-1,ListboxComponent:R,ListboxProps:M,loading:H=!1,loadingText:U="Loading…",multiple:X=!1,noOptionsText:Z="No options",onChange:ue,onClose:ye,onHighlightChange:ee,onInputChange:J,onOpen:ce,open:_e,openOnFocus:be=!1,openText:se="Open",options:Me,PaperComponent:Oe,PopperComponent:Ee,popupIcon:Xe=S$||(S$=h.jsx(qJ,{})),readOnly:tt=!1,renderGroup:Ke,renderInput:Ne,renderOption:ve,renderTags:Be,selectOnFocus:xe=!r.freeSolo,size:Fe="medium",slots:Se={},slotProps:Re={},value:re,...B}=r,{getRootProps:q,getInputProps:le,getInputLabelProps:he,getPopupIndicatorProps:ae,getClearProps:pe,getTagProps:ie,getListboxProps:Ue,getOptionProps:At,value:W,dirty:je,expanded:ze,id:de,popupOpen:Ie,focused:We,focusedTag:Lt,anchorEl:at,setAnchorEl:Et,inputValue:cn,groupedOptions:Te}=Rxe({...r,componentName:"Autocomplete"}),$e=!v&&!y&&je&&!tt,Ye=(!_||L===!0)&&L!==!1,{onMouseDown:lt}=le(),{ref:xt,...kt}=Ue(),Ut=$||(on=>on.label??on),wt={...r,disablePortal:C,expanded:ze,focused:We,fullWidth:T,getOptionLabel:Ut,hasClearIcon:$e,hasPopupIcon:Ye,inputFocused:Lt===-1,popupOpen:Ie,size:Fe},bt=Qxe(wt),It={slots:{paper:Oe,popper:Ee,...Se},slotProps:{chip:l,listbox:M,...m,...Re}},[et,Ze]=Fr("listbox",{elementType:Xxe,externalForwardedProps:It,ownerState:wt,className:bt.listbox,additionalProps:kt,ref:xt}),[Bt,$t]=Fr("paper",{elementType:Tn,externalForwardedProps:It,ownerState:wt,className:bt.paper}),[Qt,An]=Fr("popper",{elementType:UE,externalForwardedProps:It,ownerState:wt,className:bt.popper,additionalProps:{disablePortal:C,style:{width:at?at.clientWidth:null},role:"presentation",anchorEl:at,open:Ie}});let Bn;if(X&&W.length>0){const on=oi=>({className:bt.tag,disabled:y,...ie(oi)});Be?Bn=Be(W,on,wt):Bn=W.map((oi,Xi)=>{const{key:Zn,...Ia}=on({index:Xi});return h.jsx(us,{label:Ut(oi),size:Fe,...Ia,...It.slotProps.chip},Zn)})}if(z>-1&&Array.isArray(Bn)){const on=Bn.length-z;!We&&on>0&&(Bn=Bn.splice(0,z),Bn.push(h.jsx("span",{className:bt.tag,children:E(on)},Bn.length)))}const gi=Ke||(on=>h.jsxs("li",{children:[h.jsx(Jxe,{className:bt.groupLabel,ownerState:wt,component:"div",children:on.group}),h.jsx(Zxe,{className:bt.groupUl,ownerState:wt,children:on.children})]},on.key)),Su=ve||((on,oi)=>{const{key:Xi,...Zn}=on;return h.jsx("li",{...Zn,children:Ut(oi)},Xi)}),Ea=(on,oi)=>{const Xi=At({option:on,index:oi});return Su({...Xi,className:bt.option},on,{selected:Xi["aria-selected"],index:oi,inputValue:cn},wt)},Qi=It.slotProps.clearIndicator,gs=It.slotProps.popupIndicator,ka=on=>h.jsx(Wxe,{as:Qt,...An,children:h.jsx(Kxe,{as:Bt,...$t,children:on})});let En=null;return Te.length>0?En=ka(h.jsx(et,{as:R,...Ze,children:Te.map((on,oi)=>V?gi({key:on.key,group:on.group,children:on.options.map((Xi,Zn)=>Ea(Xi,on.index+Zn))}):Ea(on,oi))})):H&&Te.length===0?En=ka(h.jsx(Gxe,{className:bt.loading,ownerState:wt,children:U})):Te.length===0&&!_&&!H&&(En=ka(h.jsx(Yxe,{className:bt.noOptions,ownerState:wt,role:"presentation",onMouseDown:on=>{on.preventDefault()},children:Z}))),h.jsxs(j.Fragment,{children:[h.jsx(Hxe,{ref:n,className:ft(bt.root,c),ownerState:wt,...q(B),children:Ne({id:de,disabled:y,fullWidth:!0,size:Fe==="small"?"small":void 0,InputLabelProps:he(),InputProps:{ref:Et,className:bt.inputRoot,startAdornment:Bn,onMouseDown:on=>{on.target===on.currentTarget&<(on)},...($e||Ye)&&{endAdornment:h.jsxs(zxe,{className:bt.endAdornment,ownerState:wt,children:[$e?h.jsx(Vxe,{...pe(),"aria-label":A,title:A,ownerState:wt,...Qi,className:ft(bt.clearIndicator,Qi==null?void 0:Qi.className),children:u}):null,Ye?h.jsx(qxe,{...ae(),disabled:y,"aria-label":Ie?p:se,title:Ie?p:se,ownerState:wt,...gs,className:ft(bt.popupIndicator,gs==null?void 0:gs.className),children:Xe}):null]})}},inputProps:{className:bt.input,disabled:y,readOnly:tt,...le()}})}),at?En:null]})});function e2e(e){return Mt("MuiCard",e)}Nt("MuiCard",["root"]);const t2e=e=>{const{classes:t}=e;return Dt({root:["root"]},e2e,t)},n2e=He(Tn,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),ou=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiCard"}),{className:i,raised:o=!1,...s}=r,a={...r,raised:o},l=t2e(a);return h.jsx(n2e,{className:ft(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a,...s})});function r2e(e){return Mt("MuiCardContent",e)}Nt("MuiCardContent",["root"]);const i2e=e=>{const{classes:t}=e;return Dt({root:["root"]},r2e,t)},o2e=He("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),HA=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiCardContent"}),{className:i,component:o="div",...s}=r,a={...r,component:o},l=i2e(a);return h.jsx(o2e,{as:o,className:ft(l.root,i),ownerState:a,ref:n,...s})});function s2e(e){return Mt("PrivateSwitchBase",e)}Nt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const a2e=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${rt(i)}`],input:["input"]};return Dt(o,s2e,t)},l2e=He(ya)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),c2e=He("input",{shouldForwardProp:$i})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),vM=j.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:f,id:d,inputProps:A,inputRef:p,name:m,onBlur:b,onChange:v,onFocus:g,readOnly:y,required:w=!1,tabIndex:x,type:C,value:k,...F}=t,[L,_]=Kl({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),T=rc(),E=K=>{g&&g(K),T&&T.onFocus&&T.onFocus(K)},I=K=>{b&&b(K),T&&T.onBlur&&T.onBlur(K)},N=K=>{if(K.nativeEvent.defaultPrevented)return;const O=K.target.checked;_(O),v&&v(K,O)};let $=l;T&&typeof $>"u"&&($=T.disabled);const D=C==="checkbox"||C==="radio",V={...t,checked:L,disabled:$,disableFocusRipple:c,edge:u},Y=a2e(V);return h.jsxs(l2e,{component:"span",className:ft(Y.root,s),centerRipple:!0,focusRipple:!c,disabled:$,tabIndex:null,role:void 0,onFocus:E,onBlur:I,ownerState:V,ref:n,...F,children:[h.jsx(c2e,{autoFocus:r,checked:i,defaultChecked:a,className:Y.input,disabled:$,id:D?d:void 0,name:m,onChange:N,readOnly:y,ref:p,required:w,ownerState:V,tabIndex:x,type:C,...C==="checkbox"&&k===void 0?{}:{value:k},...A}),L?o:f]})}),u2e=zt(h.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),f2e=zt(h.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),A2e=zt(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function d2e(e){return Mt("MuiCheckbox",e)}const FI=Nt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),h2e=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${rt(r)}`,`size${rt(i)}`]},s=Dt(o,d2e,t);return{...t,...s}},p2e=He(vM,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${rt(n.size)}`],n.color!=="default"&&t[`color${rt(n.color)}`]]}})(Rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:jt(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Xn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:jt(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Xn()).map(([t])=>({props:{color:t},style:{[`&.${FI.checked}, &.${FI.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${FI.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),g2e=h.jsx(f2e,{}),m2e=h.jsx(u2e,{}),v2e=h.jsx(A2e,{}),Ga=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiCheckbox"}),{checkedIcon:i=g2e,color:o="primary",icon:s=m2e,indeterminate:a=!1,indeterminateIcon:l=v2e,inputProps:c,size:u="medium",disableRipple:f=!1,className:d,...A}=r,p=a?l:s,m=a?l:i,b={...r,disableRipple:f,color:o,indeterminate:a,size:u},v=h2e(b);return h.jsx(p2e,{type:"checkbox",inputProps:{"data-indeterminate":a,...c},icon:j.cloneElement(p,{fontSize:p.props.fontSize??u}),checkedIcon:j.cloneElement(m,{fontSize:m.props.fontSize??u}),ownerState:b,ref:n,className:ft(v.root,d),disableRipple:f,...A,classes:v})});function _$(e){return e.substring(2).toLowerCase()}function y2e(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function b2e(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,s=j.useRef(!1),a=j.useRef(null),l=j.useRef(!1),c=j.useRef(!1);j.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=vr(ud(t),a),f=Bi(p=>{const m=c.current;c.current=!1;const b=Ei(a.current);if(!l.current||!a.current||"clientX"in p&&y2e(p,b))return;if(s.current){s.current=!1;return}let v;p.composedPath?v=p.composedPath().includes(a.current):v=!b.documentElement.contains(p.target)||a.current.contains(p.target),!v&&(n||!m)&&i(p)}),d=p=>m=>{c.current=!0;const b=t.props[p];b&&b(m)},A={ref:u};return o!==!1&&(A[o]=d(o)),j.useEffect(()=>{if(o!==!1){const p=_$(o),m=Ei(a.current),b=()=>{s.current=!0};return m.addEventListener(p,f),m.addEventListener("touchmove",b),()=>{m.removeEventListener(p,f),m.removeEventListener("touchmove",b)}}},[f,o]),r!==!1&&(A[r]=d(r)),j.useEffect(()=>{if(r!==!1){const p=_$(r),m=Ei(a.current);return m.addEventListener(p,f),()=>{m.removeEventListener(p,f)}}},[f,r]),j.cloneElement(t,A)}const j1=Rme({createStyledComponent:He("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${rt(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>Vt({props:e,name:"MuiContainer"})});function w2e(e){return Mt("MuiDialogContentText",e)}Nt("MuiDialogContentText",["root"]);const x2e=e=>{const{classes:t}=e,r=Dt({root:["root"]},w2e,t);return{...t,...r}},C2e=He(Le,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yM=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialogContentText"}),{children:i,className:o,...s}=r,a=x2e(s);return h.jsx(C2e,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:s,className:ft(a.root,o),...r,classes:a})});function S2e(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=Ds(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function _2e(e){return typeof e=="function"?e():e}function zx(e,t,n){const r=_2e(n),i=S2e(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const B2e=j.forwardRef(function(t,n){const r=fr(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:f=i,in:d,onEnter:A,onEntered:p,onEntering:m,onExit:b,onExited:v,onExiting:g,style:y,timeout:w=o,TransitionComponent:x=Cl,...C}=t,k=j.useRef(null),F=vr(ud(l),k,n),L=Y=>K=>{Y&&(K===void 0?Y(k.current):Y(k.current,K))},_=L((Y,K)=>{zx(u,Y,c),aM(Y),A&&A(Y,K)}),T=L((Y,K)=>{const O=QA({timeout:w,style:y,easing:f},{mode:"enter"});Y.style.webkitTransition=r.transitions.create("-webkit-transform",{...O}),Y.style.transition=r.transitions.create("transform",{...O}),Y.style.webkitTransform="none",Y.style.transform="none",m&&m(Y,K)}),E=L(p),I=L(g),N=L(Y=>{const K=QA({timeout:w,style:y,easing:f},{mode:"exit"});Y.style.webkitTransition=r.transitions.create("-webkit-transform",K),Y.style.transition=r.transitions.create("transform",K),zx(u,Y,c),b&&b(Y)}),$=L(Y=>{Y.style.webkitTransition="",Y.style.transition="",v&&v(Y)}),D=Y=>{s&&s(k.current,Y)},V=j.useCallback(()=>{k.current&&zx(u,k.current,c)},[u,c]);return j.useEffect(()=>{if(d||u==="down"||u==="right")return;const Y=qb(()=>{k.current&&zx(u,k.current,c)}),K=Ds(k.current);return K.addEventListener("resize",Y),()=>{Y.clear(),K.removeEventListener("resize",Y)}},[u,d,c]),j.useEffect(()=>{d||V()},[d,V]),h.jsx(x,{nodeRef:k,onEnter:_,onEntered:E,onEntering:T,onExit:N,onExited:$,onExiting:I,addEndListener:D,appear:a,in:d,timeout:w,...C,children:(Y,K)=>j.cloneElement(l,{ref:F,style:{visibility:Y==="exited"&&!d?"hidden":void 0,...y,...l.props.style},...K})})});function E2e(e){return Mt("MuiDrawer",e)}Nt("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const XJ=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},k2e=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${rt(n)}`,r!=="temporary"&&`paperAnchorDocked${rt(n)}`]};return Dt(i,E2e,t)},I2e=He(Zb,{name:"MuiDrawer",slot:"Root",overridesResolver:XJ})(Rt(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),B$=He("div",{shouldForwardProp:$i,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:XJ})({flex:"0 0 auto"}),F2e=He(Tn,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${rt(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${rt(n.anchor)}`]]}})(Rt(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),JJ={left:"right",right:"left",top:"down",bottom:"up"};function T2e(e){return["left","right"].includes(e)}function R2e({direction:e},t){return e==="rtl"&&T2e(t)?JJ[t]:t}const a_=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDrawer"}),i=fr(),o=gu(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:f=16,hideBackdrop:d=!1,ModalProps:{BackdropProps:A,...p}={},onClose:m,open:b=!1,PaperProps:v={},SlideProps:g,TransitionComponent:y=B2e,transitionDuration:w=s,variant:x="temporary",...C}=r,k=j.useRef(!1);j.useEffect(()=>{k.current=!0},[]);const F=R2e({direction:o?"rtl":"ltr"},a),_={...r,anchor:a,elevation:f,open:b,variant:x,...C},T=k2e(_),E=h.jsx(F2e,{elevation:x==="temporary"?f:0,square:!0,...v,className:ft(T.paper,v.className),ownerState:_,children:c});if(x==="permanent")return h.jsx(B$,{className:ft(T.root,T.docked,u),ownerState:_,ref:n,...C,children:E});const I=h.jsx(y,{in:b,direction:JJ[F],timeout:w,appear:k.current,...g,children:E});return x==="persistent"?h.jsx(B$,{className:ft(T.root,T.docked,u),ownerState:_,ref:n,...C,children:I}):h.jsx(I2e,{BackdropProps:{...l,...A,transitionDuration:w},className:ft(T.root,T.modal,u),open:b,ownerState:_,onClose:m,hideBackdrop:d,ref:n,...C,...p,children:I})});function P2e(e){return Mt("MuiFab",e)}const E$=Nt("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),L2e=e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,`size${rt(i)}`,t==="inherit"?"colorInherit":t]},s=Dt(o,P2e,r);return{...r,...s}},O2e=He(ya,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>$i(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${rt(n.size)}`],n.color==="inherit"&&t.colorInherit,t[rt(n.size)],t[n.color]]}})(Rt(({theme:e})=>{var t,n;return{...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${E$.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}}),Rt(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Xn(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),Rt(({theme:e})=>({[`&.${E$.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),k$=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFab"}),{children:i,className:o,color:s="default",component:a="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:f="large",variant:d="circular",...A}=r,p={...r,color:s,component:a,disabled:l,disableFocusRipple:c,size:f,variant:d},m=L2e(p);return h.jsx(O2e,{className:ft(m.root,o),component:a,disabled:l,focusRipple:!c,focusVisibleClassName:ft(m.focusVisible,u),ownerState:p,ref:n,...A,classes:m,children:i})});function j2e(e){return Mt("MuiFormControlLabel",e)}const sy=Nt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),M2e=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${rt(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return Dt(s,j2e,t)},N2e=He("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${sy.label}`]:t.label},t.root,t[`labelPlacement${rt(n.labelPlacement)}`]]}})(Rt(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${sy.disabled}`]:{cursor:"default"},[`& .${sy.label}`]:{[`&.${sy.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),U2e=He("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Rt(({theme:e})=>({[`&.${sy.error}`]:{color:(e.vars||e).palette.error.main}}))),Ho=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFormControlLabel"}),{checked:i,className:o,componentsProps:s={},control:a,disabled:l,disableTypography:c,inputRef:u,label:f,labelPlacement:d="end",name:A,onChange:p,required:m,slots:b={},slotProps:v={},value:g,...y}=r,w=rc(),x=l??a.props.disabled??(w==null?void 0:w.disabled),C=m??a.props.required,k={disabled:x,required:C};["checked","name","onChange","value","inputRef"].forEach($=>{typeof a.props[$]>"u"&&typeof r[$]<"u"&&(k[$]=r[$])});const F=dd({props:r,muiFormControl:w,states:["error"]}),L={...r,disabled:x,labelPlacement:d,required:C,error:F.error},_=M2e(L),T={slots:b,slotProps:{...s,...v}},[E,I]=Fr("typography",{elementType:Le,externalForwardedProps:T,ownerState:L});let N=f;return N!=null&&N.type!==Le&&!c&&(N=h.jsx(E,{component:"span",...I,className:ft(_.label,I==null?void 0:I.className),children:N})),h.jsxs(N2e,{className:ft(_.root,o),ownerState:L,ref:n,...y,children:[j.cloneElement(a,k),C?h.jsxs("div",{children:[N,h.jsxs(U2e,{ownerState:L,"aria-hidden":!0,className:_.asterisk,children:[" ","*"]})]}):N]})});function D2e(e){return Mt("MuiFormGroup",e)}Nt("MuiFormGroup",["root","row","error"]);const $2e=e=>{const{classes:t,row:n,error:r}=e;return Dt({root:["root",n&&"row",r&&"error"]},D2e,t)},Q2e=He("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),H2e=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFormGroup"}),{className:i,row:o=!1,...s}=r,a=rc(),l=dd({props:r,muiFormControl:a,states:["error"]}),c={...r,row:o,error:l.error},u=$2e(c);return h.jsx(Q2e,{className:ft(u.root,i),ownerState:c,ref:n,...s})}),I$=j.createContext();function z2e(e){return Mt("MuiGrid",e)}const V2e=[0,1,2,3,4,5,6,7,8,9,10],q2e=["column-reverse","column","row-reverse","row"],W2e=["nowrap","wrap-reverse","wrap"],Sv=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],M1=Nt("MuiGrid",["root","container","item","zeroMinWidth",...V2e.map(e=>`spacing-xs-${e}`),...q2e.map(e=>`direction-xs-${e}`),...W2e.map(e=>`wrap-xs-${e}`),...Sv.map(e=>`grid-xs-${e}`),...Sv.map(e=>`grid-sm-${e}`),...Sv.map(e=>`grid-md-${e}`),...Sv.map(e=>`grid-lg-${e}`),...Sv.map(e=>`grid-xl-${e}`)]);function K2e({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((r,i)=>{let o={};if(t[i]&&(n=t[i]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=mh({values:t.columns,breakpoints:e.breakpoints.values}),a=typeof s=="object"?s[i]:s;if(a==null)return r;const l=`${Math.round(n/a*1e8)/1e6}%`;let c={};if(t.container&&t.item&&t.columnSpacing!==0){const u=e.spacing(t.columnSpacing);if(u!=="0px"){const f=`calc(${l} + ${u})`;c={flexBasis:f,maxWidth:f}}}o={flexBasis:l,flexGrow:0,maxWidth:l,...c}}return e.breakpoints.values[i]===0?Object.assign(r,o):r[e.breakpoints.up(i)]=o,r},{})}function G2e({theme:e,ownerState:t}){const n=mh({values:t.direction,breakpoints:e.breakpoints.values});return $s({theme:e},n,r=>{const i={flexDirection:r};return r.startsWith("column")&&(i[`& > .${M1.item}`]={maxWidth:"none"}),i})}function ZJ({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(i=>{n===""&&t[i]!==0&&(n=i)});const r=Object.keys(e).sort((i,o)=>e[i]-e[o]);return r.slice(0,r.indexOf(n))}function Y2e({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let i={};if(n&&r!==0){const o=mh({values:r,breakpoints:e.breakpoints.values});let s;typeof o=="object"&&(s=ZJ({breakpoints:e.breakpoints.values,values:o})),i=$s({theme:e},o,(a,l)=>{const c=e.spacing(a);return c!=="0px"?{marginTop:`-${c}`,[`& > .${M1.item}`]:{paddingTop:c}}:s!=null&&s.includes(l)?{}:{marginTop:0,[`& > .${M1.item}`]:{paddingTop:0}}})}return i}function X2e({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let i={};if(n&&r!==0){const o=mh({values:r,breakpoints:e.breakpoints.values});let s;typeof o=="object"&&(s=ZJ({breakpoints:e.breakpoints.values,values:o})),i=$s({theme:e},o,(a,l)=>{const c=e.spacing(a);if(c!=="0px"){const u=`-${c}`;return{width:`calc(100% + ${c})`,marginLeft:u,[`& > .${M1.item}`]:{paddingLeft:c}}}return s!=null&&s.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${M1.item}`]:{paddingLeft:0}}})}return i}function J2e(e,t,n={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach(i=>{const o=e[i];Number(o)>0&&r.push(n[`spacing-${i}-${String(o)}`])}),r}const Z2e=He("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:i,item:o,spacing:s,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=J2e(s,c,t));const f=[];return c.forEach(d=>{const A=n[d];A&&f.push(t[`grid-${d}-${String(A)}`])}),[t.root,r&&t.container,o&&t.item,l&&t.zeroMinWidth,...u,i!=="row"&&t[`direction-xs-${String(i)}`],a!=="wrap"&&t[`wrap-xs-${String(a)}`],...f]}})(({ownerState:e})=>({boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},...e.item&&{margin:0},...e.zeroMinWidth&&{minWidth:0},...e.wrap!=="wrap"&&{flexWrap:e.wrap}}),G2e,Y2e,X2e,K2e);function eCe(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const n=[];return t.forEach(r=>{const i=e[r];if(Number(i)>0){const o=`spacing-${r}-${String(i)}`;n.push(o)}}),n}const tCe=e=>{const{classes:t,container:n,direction:r,item:i,spacing:o,wrap:s,zeroMinWidth:a,breakpoints:l}=e;let c=[];n&&(c=eCe(o,l));const u=[];l.forEach(d=>{const A=e[d];A&&u.push(`grid-${d}-${String(A)}`)});const f={root:["root",n&&"container",i&&"item",a&&"zeroMinWidth",...c,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...u]};return Dt(f,z2e,t)},rr=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiGrid"}),{breakpoints:i}=fr(),o=yE(r),{className:s,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:f="row",item:d=!1,rowSpacing:A,spacing:p=0,wrap:m="wrap",zeroMinWidth:b=!1,...v}=o,g=A||p,y=l||p,w=j.useContext(I$),x=u?a||12:w,C={},k={...v};i.keys.forEach(_=>{v[_]!=null&&(C[_]=v[_],delete k[_])});const F={...o,columns:x,container:u,direction:f,item:d,rowSpacing:g,columnSpacing:y,wrap:m,zeroMinWidth:b,spacing:p,...C,breakpoints:i.keys},L=tCe(F);return h.jsx(I$.Provider,{value:x,children:h.jsx(Z2e,{ownerState:F,className:ft(L.root,s),as:c,ref:n,...k})})});function nCe(e){return Mt("MuiInputAdornment",e)}const F$=Nt("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var T$;const rCe=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${rt(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},iCe=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:o,variant:s}=e,a={root:["root",n&&"disablePointerEvents",i&&`position${rt(i)}`,s,r&&"hiddenLabel",o&&`size${rt(o)}`]};return Dt(a,nCe,t)},oCe=He("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:rCe})(Rt(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${F$.positionStart}&:not(.${F$.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),R$=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiInputAdornment"}),{children:i,className:o,component:s="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:c,variant:u,...f}=r,d=rc()||{};let A=u;u&&d.variant,d&&!A&&(A=d.variant);const p={...r,hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:a,position:c,variant:A},m=iCe(p);return h.jsx($E.Provider,{value:null,children:h.jsx(oCe,{as:s,ownerState:p,className:ft(m.root,o),ref:n,...f,children:typeof i=="string"&&!l?h.jsx(Le,{color:"textSecondary",children:i}):h.jsxs(j.Fragment,{children:[c==="start"?T$||(T$=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});function sCe(e){return Mt("MuiLinearProgress",e)}const P$=Nt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]),_P=4,BP=fd`
|
|
225
|
+
`&&(w.value+=" ");const x=y.boxSizing,C=$x(y.paddingBottom)+$x(y.paddingTop),k=$x(y.borderBottomWidth)+$x(y.borderTopWidth),F=w.scrollHeight;w.value="x";const L=w.scrollHeight;let _=F;o&&(_=Math.max(Number(o)*L,_)),i&&(_=Math.min(Number(i)*L,_)),_=Math.max(_,L);const T=_+(x==="border-box"?C+k:0),E=Math.abs(_-F)<=1;return{outerHeightStyle:T,overflowing:E}},[i,o,t.placeholder]),m=j.useCallback(()=>{const v=p();if(Rbe(v))return;const g=v.outerHeightStyle,y=u.current;d.current!==g&&(d.current=g,y.style.height=`${g}px`),y.style.overflow=v.overflowing?"hidden":""},[p]);Go(()=>{const v=()=>{m()};let g;const y=qb(v),w=u.current,x=Ds(w);x.addEventListener("resize",y);let C;return typeof ResizeObserver<"u"&&(C=new ResizeObserver(v),C.observe(w)),()=>{y.clear(),cancelAnimationFrame(g),x.removeEventListener("resize",y),C&&C.disconnect()}},[p,m]),Go(()=>{m()});const b=v=>{c||m(),r&&r(v)};return h.jsxs(j.Fragment,{children:[h.jsx("textarea",{value:a,onChange:b,ref:f,rows:o,style:s,...l}),h.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:A,tabIndex:-1,style:{...Tbe.shadow,...s,paddingTop:0,paddingBottom:0}})]})});function dd({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const $E=j.createContext(void 0);function rc(){return j.useContext($E)}function c$(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function t_(e,t=!1){return e&&(c$(e.value)&&e.value!==""||t&&c$(e.defaultValue)&&e.defaultValue!=="")}function Pbe(e){return e.startAdornment}function Lbe(e){return Mt("MuiInputBase",e)}const ra=Nt("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var u$;const QE=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${rt(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},HE=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Obe=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:s,formControl:a,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:f,size:d,startAdornment:A,type:p}=e,m={root:["root",`color${rt(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",s&&"focused",a&&"formControl",d&&d!=="medium"&&`size${rt(d)}`,u&&"multiline",A&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",f&&"readOnly"],input:["input",r&&"disabled",p==="search"&&"inputTypeSearch",u&&"inputMultiline",d==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",A&&"inputAdornedStart",o&&"inputAdornedEnd",f&&"readOnly"]};return Dt(m,Lbe,t)},zE=He("div",{name:"MuiInputBase",slot:"Root",overridesResolver:QE})(Rt(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${ra.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),VE=He("input",{name:"MuiInputBase",slot:"Input",overridesResolver:HE})(Rt(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${ra.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${ra.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:o})=>!o.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:o})=>o.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),f$=g0e({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),qE=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:s,className:a,color:l,components:c={},componentsProps:u={},defaultValue:f,disabled:d,disableInjectingGlobalStyles:A,endAdornment:p,error:m,fullWidth:b=!1,id:v,inputComponent:g="input",inputProps:y={},inputRef:w,margin:x,maxRows:C,minRows:k,multiline:F=!1,name:L,onBlur:_,onChange:T,onClick:E,onFocus:I,onKeyDown:N,onKeyUp:$,placeholder:D,readOnly:V,renderSuffix:Y,rows:K,size:O,slotProps:ne={},slots:z={},startAdornment:R,type:M="text",value:H,...U}=r,X=y.value!=null?y.value:H,{current:Z}=j.useRef(X!=null),ue=j.useRef(),ye=j.useCallback(B=>{},[]),ee=vr(ue,w,y.ref,ye),[J,ce]=j.useState(!1),_e=rc(),be=dd({props:r,muiFormControl:_e,states:["color","disabled","error","hiddenLabel","size","required","filled"]});be.focused=_e?_e.focused:J,j.useEffect(()=>{!_e&&d&&J&&(ce(!1),_&&_())},[_e,d,J,_]);const se=_e&&_e.onFilled,Me=_e&&_e.onEmpty,Oe=j.useCallback(B=>{t_(B)?se&&se():Me&&Me()},[se,Me]);Go(()=>{Z&&Oe({value:X})},[X,Oe,Z]);const Ee=B=>{I&&I(B),y.onFocus&&y.onFocus(B),_e&&_e.onFocus?_e.onFocus(B):ce(!0)},Xe=B=>{_&&_(B),y.onBlur&&y.onBlur(B),_e&&_e.onBlur?_e.onBlur(B):ce(!1)},tt=(B,...q)=>{if(!Z){const le=B.target||ue.current;if(le==null)throw new Error(df(1));Oe({value:le.value})}y.onChange&&y.onChange(B,...q),T&&T(B,...q)};j.useEffect(()=>{Oe(ue.current)},[]);const Ke=B=>{ue.current&&B.currentTarget===B.target&&ue.current.focus(),E&&E(B)};let Ne=g,ve=y;F&&Ne==="input"&&(K?ve={type:void 0,minRows:K,maxRows:K,...ve}:ve={type:void 0,maxRows:C,minRows:k,...ve},Ne=yh);const Be=B=>{Oe(B.animationName==="mui-auto-fill-cancel"?ue.current:{value:"x"})};j.useEffect(()=>{_e&&_e.setAdornedStart(!!R)},[_e,R]);const xe={...r,color:be.color||"primary",disabled:be.disabled,endAdornment:p,error:be.error,focused:be.focused,formControl:_e,fullWidth:b,hiddenLabel:be.hiddenLabel,multiline:F,size:be.size,startAdornment:R,type:M},Fe=Obe(xe),Se=z.root||c.Root||zE,Re=ne.root||u.root||{},re=z.input||c.Input||VE;return ve={...ve,...ne.input??u.input},h.jsxs(j.Fragment,{children:[!A&&typeof f$=="function"&&(u$||(u$=h.jsx(f$,{}))),h.jsxs(Se,{...Re,ref:n,onClick:Ke,...U,...!Kc(Se)&&{ownerState:{...xe,...Re.ownerState}},className:ft(Fe.root,Re.className,a,V&&"MuiInputBase-readOnly"),children:[R,h.jsx($E.Provider,{value:null,children:h.jsx(re,{"aria-invalid":be.error,"aria-describedby":i,autoComplete:o,autoFocus:s,defaultValue:f,disabled:be.disabled,id:v,onAnimationStart:Be,name:L,placeholder:D,readOnly:V,required:be.required,rows:K,value:X,onKeyDown:N,onKeyUp:$,type:M,...ve,...!Kc(re)&&{as:Ne,ownerState:{...xe,...ve.ownerState}},ref:ee,className:ft(Fe.input,ve.className,V&&"MuiInputBase-readOnly"),onBlur:Xe,onChange:tt,onFocus:Ee})}),p,Y?Y({...be,startAdornment:R}):null]})]})});function jbe(e){return Mt("MuiInput",e)}const sA={...ra,...Nt("MuiInput",["root","underline","input"])},Mbe=e=>{const{classes:t,disableUnderline:n}=e,i=Dt({root:["root",!n&&"underline"],input:["input"]},jbe,t);return{...t,...i}},Nbe=He(zE,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...QE(e,t),!n.disableUnderline&&t.underline]}})(Rt(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${sA.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${sA.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${sA.disabled}, .${sA.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${sA.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Xn()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),Ube=He(VE,{name:"MuiInput",slot:"Input",overridesResolver:HE})({}),n_=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiInput"}),{disableUnderline:i=!1,components:o={},componentsProps:s,fullWidth:a=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:f={},type:d="text",...A}=r,p=Mbe(r),b={root:{ownerState:{disableUnderline:i}}},v=u??s?co(u??s,b):b,g=f.root??o.Root??Nbe,y=f.input??o.Input??Ube;return h.jsx(qE,{slots:{root:g,input:y},slotProps:v,fullWidth:a,inputComponent:l,multiline:c,ref:n,type:d,...A,classes:p})});n_&&(n_.muiName="Input");function Dbe(e){return Mt("MuiFilledInput",e)}const ia={...ra,...Nt("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},$be=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:o,hiddenLabel:s,multiline:a}=e,l={root:["root",!n&&"underline",r&&"adornedStart",i&&"adornedEnd",o==="small"&&`size${rt(o)}`,s&&"hiddenLabel",a&&"multiline"],input:["input"]},c=Dt(l,Dbe,t);return{...t,...c}},Qbe=He(zE,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...QE(e,t),!n.disableUnderline&&t.underline]}})(Rt(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${ia.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${ia.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:o},variants:[{props:({ownerState:s})=>!s.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${ia.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${ia.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / ${e.vars.opacity.inputUnderline})`:n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${ia.disabled}, .${ia.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${ia.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(Xn()).map(([s])=>{var a;return{props:{disableUnderline:!1,color:s},style:{"&::after":{borderBottom:`2px solid ${(a=(e.vars||e).palette[s])==null?void 0:a.main}`}}}}),{props:({ownerState:s})=>s.startAdornment,style:{paddingLeft:12}},{props:({ownerState:s})=>s.endAdornment,style:{paddingRight:12}},{props:({ownerState:s})=>s.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:s,size:a})=>s.multiline&&a==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:s})=>s.multiline&&s.hiddenLabel&&s.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),Hbe=He(VE,{name:"MuiFilledInput",slot:"Input",overridesResolver:HE})(Rt(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),r_=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFilledInput"}),{disableUnderline:i=!1,components:o={},componentsProps:s,fullWidth:a=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:f,slots:d={},type:A="text",...p}=r,m={...r,disableUnderline:i,fullWidth:a,inputComponent:c,multiline:u,type:A},b=$be(r),v={root:{ownerState:m},input:{ownerState:m}},g=f??s?co(v,f??s):v,y=d.root??o.Root??Qbe,w=d.input??o.Input??Hbe;return h.jsx(qE,{slots:{root:y,input:w},slotProps:g,fullWidth:a,inputComponent:c,multiline:u,ref:n,type:A,...p,classes:b})});r_&&(r_.muiName="Input");var A$;const zbe=He("fieldset",{shouldForwardProp:$i})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Vbe=He("legend",{shouldForwardProp:$i})(Rt(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function qbe(e){const{children:t,classes:n,className:r,label:i,notched:o,...s}=e,a=i!=null&&i!=="",l={...e,notched:o,withLabel:a};return h.jsx(zbe,{"aria-hidden":!0,className:r,ownerState:l,...s,children:h.jsx(Vbe,{ownerState:l,children:a?h.jsx("span",{children:i}):A$||(A$=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""}))})})}function Wbe(e){return Mt("MuiOutlinedInput",e)}const $a={...ra,...Nt("MuiOutlinedInput",["root","notchedOutline","input"])},Kbe=e=>{const{classes:t}=e,r=Dt({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Wbe,t);return{...t,...r}},Gbe=He(zE,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:QE})(Rt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${$a.notchedOutline}`]:{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}},[`&.${$a.focused} .${$a.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(Xn()).map(([n])=>({props:{color:n},style:{[`&.${$a.focused} .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${$a.error} .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${$a.disabled} .${$a.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),Ybe=He(qbe,{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})(Rt(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?`rgba(${e.vars.palette.common.onBackgroundChannel} / 0.23)`:t}})),Xbe=He(VE,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:HE})(Rt(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),i_=j.forwardRef(function(t,n){var r;const i=Vt({props:t,name:"MuiOutlinedInput"}),{components:o={},fullWidth:s=!1,inputComponent:a="input",label:l,multiline:c=!1,notched:u,slots:f={},type:d="text",...A}=i,p=Kbe(i),m=rc(),b=dd({props:i,muiFormControl:m,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),v={...i,color:b.color||"primary",disabled:b.disabled,error:b.error,focused:b.focused,formControl:m,fullWidth:s,hiddenLabel:b.hiddenLabel,multiline:c,size:b.size,type:d},g=f.root??o.Root??Gbe,y=f.input??o.Input??Xbe;return h.jsx(qE,{slots:{root:g,input:y},renderSuffix:w=>h.jsx(Ybe,{ownerState:v,className:p.notchedOutline,label:l!=null&&l!==""&&b.required?r||(r=h.jsxs(j.Fragment,{children:[l," ","*"]})):l,notched:typeof u<"u"?u:!!(w.startAdornment||w.filled||w.focused)}),fullWidth:s,inputComponent:a,multiline:c,ref:n,type:d,...A,classes:{...p,notchedOutline:null}})});i_&&(i_.muiName="Input");function Jbe(e){return Mt("MuiFormLabel",e)}const Uy=Nt("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Zbe=e=>{const{classes:t,color:n,focused:r,disabled:i,error:o,filled:s,required:a}=e,l={root:["root",`color${rt(n)}`,i&&"disabled",o&&"error",s&&"filled",r&&"focused",a&&"required"],asterisk:["asterisk",o&&"error"]};return Dt(l,Jbe,t)},ewe=He("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...e.color==="secondary"&&t.colorSecondary,...e.filled&&t.filled})})(Rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.body1,lineHeight:"1.4375em",padding:0,position:"relative",variants:[...Object.entries(e.palette).filter(Xn()).map(([t])=>({props:{color:t},style:{[`&.${Uy.focused}`]:{color:(e.vars||e).palette[t].main}}})),{props:{},style:{[`&.${Uy.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${Uy.error}`]:{color:(e.vars||e).palette.error.main}}}]}))),twe=He("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Rt(({theme:e})=>({[`&.${Uy.error}`]:{color:(e.vars||e).palette.error.main}}))),nwe=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFormLabel"}),{children:i,className:o,color:s,component:a="label",disabled:l,error:c,filled:u,focused:f,required:d,...A}=r,p=rc(),m=dd({props:r,muiFormControl:p,states:["color","required","focused","disabled","error","filled"]}),b={...r,color:m.color||"primary",component:a,disabled:m.disabled,error:m.error,filled:m.filled,focused:m.focused,required:m.required},v=Zbe(b);return h.jsxs(ewe,{as:a,ownerState:b,className:ft(v.root,o),ref:n,...A,children:[i,m.required&&h.jsxs(twe,{ownerState:b,"aria-hidden":!0,className:v.asterisk,children:[" ","*"]})]})});function rwe(e){return Mt("MuiInputLabel",e)}Nt("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const iwe=e=>{const{classes:t,formControl:n,size:r,shrink:i,disableAnimation:o,variant:s,required:a}=e,l={root:["root",n&&"formControl",!o&&"animated",i&&"shrink",r&&r!=="normal"&&`size${rt(r)}`,s],asterisk:[a&&"asterisk"]},c=Dt(l,rwe,t);return{...t,...c}},owe=He(nwe,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Uy.asterisk}`]:t.asterisk},t.root,n.formControl&&t.formControl,n.size==="small"&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})(Rt(({theme:e})=>({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%",variants:[{props:({ownerState:t})=>t.formControl,style:{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"}},{props:{size:"small"},style:{transform:"translate(0, 17px) scale(1)"}},{props:({ownerState:t})=>t.shrink,style:{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"}},{props:({ownerState:t})=>!t.disableAnimation,style:{transition:e.transitions.create(["color","transform","max-width"],{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut})}},{props:{variant:"filled"},style:{zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"filled",size:"small"},style:{transform:"translate(12px, 13px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="filled"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"}},{props:({variant:t,ownerState:n,size:r})=>t==="filled"&&n.shrink&&r==="small",style:{transform:"translate(12px, 4px) scale(0.75)"}},{props:{variant:"outlined"},style:{zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"}},{props:{variant:"outlined",size:"small"},style:{transform:"translate(14px, 9px) scale(1)"}},{props:({variant:t,ownerState:n})=>t==="outlined"&&n.shrink,style:{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}}]}))),bh=j.forwardRef(function(t,n){const r=Vt({name:"MuiInputLabel",props:t}),{disableAnimation:i=!1,margin:o,shrink:s,variant:a,className:l,...c}=r,u=rc();let f=s;typeof f>"u"&&u&&(f=u.filled||u.focused||u.adornedStart);const d=dd({props:r,muiFormControl:u,states:["size","variant","required","focused"]}),A={...r,disableAnimation:i,formControl:u,shrink:f,size:d.size,variant:d.variant,required:d.required,focused:d.focused},p=iwe(A);return h.jsx(owe,{"data-shrink":f,ref:n,className:ft(p.root,l),...c,ownerState:A,classes:p})});function swe(e){return Mt("MuiFormControl",e)}Nt("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const awe=e=>{const{classes:t,margin:n,fullWidth:r}=e,i={root:["root",n!=="none"&&`margin${rt(n)}`,r&&"fullWidth"]};return Dt(i,swe,t)},lwe=He("div",{name:"MuiFormControl",slot:"Root",overridesResolver:({ownerState:e},t)=>({...t.root,...t[`margin${rt(e.margin)}`],...e.fullWidth&&t.fullWidth})})({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top",variants:[{props:{margin:"normal"},style:{marginTop:16,marginBottom:8}},{props:{margin:"dense"},style:{marginTop:8,marginBottom:4}},{props:{fullWidth:!0},style:{width:"100%"}}]}),Yc=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFormControl"}),{children:i,className:o,color:s="primary",component:a="div",disabled:l=!1,error:c=!1,focused:u,fullWidth:f=!1,hiddenLabel:d=!1,margin:A="none",required:p=!1,size:m="medium",variant:b="outlined",...v}=r,g={...r,color:s,component:a,disabled:l,error:c,fullWidth:f,hiddenLabel:d,margin:A,required:p,size:m,variant:b},y=awe(g),[w,x]=j.useState(()=>{let I=!1;return i&&j.Children.forEach(i,N=>{if(!TC(N,["Input","Select"]))return;const $=TC(N,["Select"])?N.props.input:N;$&&Pbe($.props)&&(I=!0)}),I}),[C,k]=j.useState(()=>{let I=!1;return i&&j.Children.forEach(i,N=>{TC(N,["Input","Select"])&&(t_(N.props,!0)||t_(N.props.inputProps,!0))&&(I=!0)}),I}),[F,L]=j.useState(!1);l&&F&&L(!1);const _=u!==void 0&&!l?u:F;let T;j.useRef(!1);const E=j.useMemo(()=>({adornedStart:w,setAdornedStart:x,color:s,disabled:l,error:c,filled:C,focused:_,fullWidth:f,hiddenLabel:d,size:m,onBlur:()=>{L(!1)},onEmpty:()=>{k(!1)},onFilled:()=>{k(!0)},onFocus:()=>{L(!0)},registerEffect:T,required:p,variant:b}),[w,s,l,c,C,_,f,d,T,p,m,b]);return h.jsx($E.Provider,{value:E,children:h.jsx(lwe,{as:a,ownerState:g,className:ft(y.root,o),ref:n,...v,children:i})})});function cwe(e){return Mt("MuiFormHelperText",e)}const d$=Nt("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var h$;const uwe=e=>{const{classes:t,contained:n,size:r,disabled:i,error:o,filled:s,focused:a,required:l}=e,c={root:["root",i&&"disabled",o&&"error",r&&`size${rt(r)}`,n&&"contained",a&&"focused",s&&"filled",l&&"required"]};return Dt(c,cwe,t)},fwe=He("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t[`size${rt(n.size)}`],n.contained&&t.contained,n.filled&&t.filled]}})(Rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,...e.typography.caption,textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,[`&.${d$.disabled}`]:{color:(e.vars||e).palette.text.disabled},[`&.${d$.error}`]:{color:(e.vars||e).palette.error.main},variants:[{props:{size:"small"},style:{marginTop:4}},{props:({ownerState:t})=>t.contained,style:{marginLeft:14,marginRight:14}}]}))),Awe=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFormHelperText"}),{children:i,className:o,component:s="p",disabled:a,error:l,filled:c,focused:u,margin:f,required:d,variant:A,...p}=r,m=rc(),b=dd({props:r,muiFormControl:m,states:["variant","size","disabled","error","filled","focused","required"]}),v={...r,component:s,contained:b.variant==="filled"||b.variant==="outlined",variant:b.variant,size:b.size,disabled:b.disabled,error:b.error,filled:b.filled,focused:b.focused,required:b.required};delete v.ownerState;const g=uwe(v);return h.jsx(fwe,{as:s,className:ft(g.root,o),ref:n,...p,ownerState:v,children:i===" "?h$||(h$=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):i})});function dwe(e){return Mt("MuiNativeSelect",e)}const gM=Nt("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),hwe=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${rt(n)}`,o&&"iconOpen",r&&"disabled"]};return Dt(a,dwe,t)},zJ=He("select")(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${gM.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),pwe=He(zJ,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:$i,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${gM.multiple}`]:t.multiple}]}})({}),VJ=He("svg")(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${gM.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),gwe=He(VJ,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${rt(n.variant)}`],n.open&&t.iconOpen]}})({}),mwe=j.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:s,inputRef:a,variant:l="standard",...c}=t,u={...t,disabled:i,variant:l,error:o},f=hwe(u);return h.jsxs(j.Fragment,{children:[h.jsx(pwe,{ownerState:u,className:ft(f.select,r),disabled:i,ref:a||n,...c}),t.multiple?null:h.jsx(gwe,{as:s,ownerState:u,className:f.icon})]})});function vwe(e){return Mt("MuiSelect",e)}const Cv=Nt("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var p$;const ywe=He(zJ,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Cv.select}`]:t.select},{[`&.${Cv.select}`]:t[n.variant]},{[`&.${Cv.error}`]:t.error},{[`&.${Cv.multiple}`]:t.multiple}]}})({[`&.${Cv.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),bwe=He(VJ,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${rt(n.variant)}`],n.open&&t.iconOpen]}})({}),wwe=He("input",{shouldForwardProp:e=>ME(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function g$(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function xwe(e){return e==null||typeof e=="string"&&!e.trim()}const Cwe=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:s}=e,a={select:["select",n,r&&"disabled",i&&"multiple",s&&"error"],icon:["icon",`icon${rt(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Dt(a,vwe,t)},Swe=j.forwardRef(function(t,n){var le;const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:s,children:a,className:l,defaultOpen:c,defaultValue:u,disabled:f,displayEmpty:d,error:A=!1,IconComponent:p,inputRef:m,labelId:b,MenuProps:v={},multiple:g,name:y,onBlur:w,onChange:x,onClose:C,onFocus:k,onOpen:F,open:L,readOnly:_,renderValue:T,SelectDisplayProps:E={},tabIndex:I,type:N,value:$,variant:D="standard",...V}=t,[Y,K]=Kl({controlled:$,default:u,name:"Select"}),[O,ne]=Kl({controlled:L,default:c,name:"Select"}),z=j.useRef(null),R=j.useRef(null),[M,H]=j.useState(null),{current:U}=j.useRef(L!=null),[X,Z]=j.useState(),ue=vr(n,m),ye=j.useCallback(he=>{R.current=he,he&&H(he)},[]),ee=M==null?void 0:M.parentNode;j.useImperativeHandle(ue,()=>({focus:()=>{R.current.focus()},node:z.current,value:Y}),[Y]),j.useEffect(()=>{c&&O&&M&&!U&&(Z(s?null:ee.clientWidth),R.current.focus())},[M,s]),j.useEffect(()=>{o&&R.current.focus()},[o]),j.useEffect(()=>{if(!b)return;const he=Ei(R.current).getElementById(b);if(he){const ae=()=>{getSelection().isCollapsed&&R.current.focus()};return he.addEventListener("click",ae),()=>{he.removeEventListener("click",ae)}}},[b]);const J=(he,ae)=>{he?F&&F(ae):C&&C(ae),U||(Z(s?null:ee.clientWidth),ne(he))},ce=he=>{he.button===0&&(he.preventDefault(),R.current.focus(),J(!0,he))},_e=he=>{J(!1,he)},be=j.Children.toArray(a),se=he=>{const ae=be.find(pe=>pe.props.value===he.target.value);ae!==void 0&&(K(ae.props.value),x&&x(he,ae))},Me=he=>ae=>{let pe;if(ae.currentTarget.hasAttribute("tabindex")){if(g){pe=Array.isArray(Y)?Y.slice():[];const ie=Y.indexOf(he.props.value);ie===-1?pe.push(he.props.value):pe.splice(ie,1)}else pe=he.props.value;if(he.props.onClick&&he.props.onClick(ae),Y!==pe&&(K(pe),x)){const ie=ae.nativeEvent||ae,Ue=new ie.constructor(ie.type,ie);Object.defineProperty(Ue,"target",{writable:!0,value:{value:pe,name:y}}),x(Ue,he)}g||J(!1,ae)}},Oe=he=>{_||[" ","ArrowUp","ArrowDown","Enter"].includes(he.key)&&(he.preventDefault(),J(!0,he))},Ee=M!==null&&O,Xe=he=>{!Ee&&w&&(Object.defineProperty(he,"target",{writable:!0,value:{value:Y,name:y}}),w(he))};delete V["aria-invalid"];let tt,Ke;const Ne=[];let ve=!1;(t_({value:Y})||d)&&(T?tt=T(Y):ve=!0);const Be=be.map(he=>{if(!j.isValidElement(he))return null;let ae;if(g){if(!Array.isArray(Y))throw new Error(df(2));ae=Y.some(pe=>g$(pe,he.props.value)),ae&&ve&&Ne.push(he.props.children)}else ae=g$(Y,he.props.value),ae&&ve&&(Ke=he.props.children);return j.cloneElement(he,{"aria-selected":ae?"true":"false",onClick:Me(he),onKeyUp:pe=>{pe.key===" "&&pe.preventDefault(),he.props.onKeyUp&&he.props.onKeyUp(pe)},role:"option",selected:ae,value:void 0,"data-value":he.props.value})});ve&&(g?Ne.length===0?tt=null:tt=Ne.reduce((he,ae,pe)=>(he.push(ae),pe<Ne.length-1&&he.push(", "),he),[]):tt=Ke);let xe=X;!s&&U&&M&&(xe=ee.clientWidth);let Fe;typeof I<"u"?Fe=I:Fe=f?null:0;const Se=E.id||(y?`mui-component-select-${y}`:void 0),Re={...t,variant:D,value:Y,open:Ee,error:A},re=Cwe(Re),B={...v.PaperProps,...(le=v.slotProps)==null?void 0:le.paper},q=hf();return h.jsxs(j.Fragment,{children:[h.jsx(ywe,{as:"div",ref:ye,tabIndex:Fe,role:"combobox","aria-controls":q,"aria-disabled":f?"true":void 0,"aria-expanded":Ee?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[b,Se].filter(Boolean).join(" ")||void 0,"aria-describedby":r,onKeyDown:Oe,onMouseDown:f||_?null:ce,onBlur:Xe,onFocus:k,...E,ownerState:Re,className:ft(E.className,re.select,l),id:Se,children:xwe(tt)?p$||(p$=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):tt}),h.jsx(wwe,{"aria-invalid":A,value:Array.isArray(Y)?Y.join(","):Y,name:y,ref:z,"aria-hidden":!0,onChange:se,tabIndex:-1,disabled:f,className:re.nativeInput,autoFocus:o,...V,ownerState:Re}),h.jsx(bwe,{as:p,className:re.icon,ownerState:Re}),h.jsx(ew,{id:`menu-${y||""}`,anchorEl:ee,open:Ee,onClose:_e,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...v,MenuListProps:{"aria-labelledby":b,role:"listbox","aria-multiselectable":g?"true":void 0,disableListWrap:!0,id:q,...v.MenuListProps},slotProps:{...v.slotProps,paper:{...B,style:{minWidth:xe,...B!=null?B.style:null}}},children:Be})]})}),qJ=zt(h.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),_we=e=>{const{classes:t}=e;return t},mM={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>$i(e)&&e!=="variant",slot:"Root"},Bwe=He(n_,mM)(""),Ewe=He(i_,mM)(""),kwe=He(r_,mM)(""),Al=j.forwardRef(function(t,n){const r=Vt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:s={},className:a,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=qJ,id:f,input:d,inputProps:A,label:p,labelId:m,MenuProps:b,multiple:v=!1,native:g=!1,onClose:y,onOpen:w,open:x,renderValue:C,SelectDisplayProps:k,variant:F="outlined",...L}=r,_=g?mwe:Swe,T=rc(),E=dd({props:r,muiFormControl:T,states:["variant","error"]}),I=E.variant||F,N={...r,variant:I,classes:s},$=_we(N),{root:D,...V}=$,Y=d||{standard:h.jsx(Bwe,{ownerState:N}),outlined:h.jsx(Ewe,{label:p,ownerState:N}),filled:h.jsx(kwe,{ownerState:N})}[I],K=vr(n,ud(Y));return h.jsx(j.Fragment,{children:j.cloneElement(Y,{inputComponent:_,inputProps:{children:o,error:E.error,IconComponent:u,variant:I,type:void 0,multiple:v,...g?{id:f}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:b,onClose:y,onOpen:w,open:x,renderValue:C,SelectDisplayProps:{id:f,...k}},...A,classes:A?co(V,A.classes):V,...d?d.props.inputProps:{}},...(v&&g||c)&&I==="outlined"?{notched:!0}:{},ref:K,className:ft(Y.props.className,a,$.root),...!d&&{variant:I},...L})})});Al.muiName="Select";function Iwe(e){return Mt("MuiTextField",e)}Nt("MuiTextField",["root"]);const Fwe={standard:n_,filled:r_,outlined:i_},Twe=e=>{const{classes:t}=e;return Dt({root:["root"]},Iwe,t)},Rwe=He(Yc,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Wt=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiTextField"}),{autoComplete:i,autoFocus:o=!1,children:s,className:a,color:l="primary",defaultValue:c,disabled:u=!1,error:f=!1,FormHelperTextProps:d,fullWidth:A=!1,helperText:p,id:m,InputLabelProps:b,inputProps:v,InputProps:g,inputRef:y,label:w,maxRows:x,minRows:C,multiline:k=!1,name:F,onBlur:L,onChange:_,onFocus:T,placeholder:E,required:I=!1,rows:N,select:$=!1,SelectProps:D,slots:V={},slotProps:Y={},type:K,value:O,variant:ne="outlined",...z}=r,R={...r,autoFocus:o,color:l,disabled:u,error:f,fullWidth:A,multiline:k,required:I,select:$,variant:ne},M=Twe(R),H=hf(m),U=p&&H?`${H}-helper-text`:void 0,X=w&&H?`${H}-label`:void 0,Z=Fwe[ne],ue={slots:V,slotProps:{input:g,inputLabel:b,htmlInput:v,formHelperText:d,select:D,...Y}},ye={},ee=ue.slotProps.inputLabel;ne==="outlined"&&(ee&&typeof ee.shrink<"u"&&(ye.notched=ee.shrink),ye.label=w),$&&((!D||!D.native)&&(ye.id=void 0),ye["aria-describedby"]=void 0);const[J,ce]=Fr("input",{elementType:Z,externalForwardedProps:ue,additionalProps:ye,ownerState:R}),[_e,be]=Fr("inputLabel",{elementType:bh,externalForwardedProps:ue,ownerState:R}),[se,Me]=Fr("htmlInput",{elementType:"input",externalForwardedProps:ue,ownerState:R}),[Oe,Ee]=Fr("formHelperText",{elementType:Awe,externalForwardedProps:ue,ownerState:R}),[Xe,tt]=Fr("select",{elementType:Al,externalForwardedProps:ue,ownerState:R}),Ke=h.jsx(J,{"aria-describedby":U,autoComplete:i,autoFocus:o,defaultValue:c,fullWidth:A,multiline:k,name:F,rows:N,maxRows:x,minRows:C,type:K,value:O,id:H,inputRef:y,onBlur:L,onChange:_,onFocus:T,placeholder:E,inputProps:Me,slots:{input:V.htmlInput?se:void 0},...ce});return h.jsxs(Rwe,{className:ft(M.root,a),disabled:u,error:f,fullWidth:A,ref:n,required:I,color:l,variant:ne,ownerState:R,...z,children:[w!=null&&w!==""&&h.jsx(_e,{htmlFor:H,id:X,...be,children:w}),$?h.jsx(Xe,{"aria-describedby":U,id:H,labelId:X,value:O,input:Ke,...tt,children:s}):Ke,p&&h.jsx(Oe,{id:U,...Ee,children:p})]})}),Pwe=({status:e})=>{const n={connected:{color:"success.main",text:"Connected to promptfoo API"},blocked:{color:"error.main",text:"Cannot connect to promptfoo API"},loading:{color:"info.main",text:"Checking connection..."},unknown:{color:"grey.500",text:"Checking connection status..."},disabled:{color:"grey.400",text:"Remote generation is disabled"}}[e];return h.jsxs(De,{sx:{display:"flex",alignItems:"center",gap:1},children:[h.jsx(X1e,{sx:{color:n.color,fontSize:"12px"}}),h.jsx(Le,{variant:"body2",children:n.text})]})};function Lwe({open:e,onClose:t}){const{apiBaseUrl:n,setApiBaseUrl:r,enablePersistApiBaseUrl:i}=pM(),[o,s]=j.useState(n||""),{status:a,message:l,checkHealth:c,isChecking:u}=Y1e(),[f,d]=j.useState(!1);j.useEffect(()=>{e&&c()},[e,c]),j.useEffect(()=>{s(n||"")},[n]);const A=b=>{s(b.target.value)},p=async()=>{try{d(!0),r(o),i(),await c(),t()}finally{d(!1)}},m=a==="loading"||u||f;return h.jsxs(zn,{open:e,onClose:t,maxWidth:"xs",fullWidth:!0,"aria-labelledby":"api-settings-dialog-title",children:[h.jsx(qn,{id:"api-settings-dialog-title",children:"API and Sharing Settings"}),h.jsxs(Vn,{children:[h.jsxs(De,{sx:{mb:3},children:[h.jsxs(De,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between",mb:1},children:[h.jsx(Pwe,{status:a}),h.jsx(gn,{title:"Check connection",children:h.jsx("span",{children:h.jsx(fn,{onClick:c,size:"small",disabled:u,children:u?h.jsx(Hs,{size:20}):h.jsx(J1e,{})})})})]}),l&&a!=="unknown"&&a!=="loading"&&h.jsx(FA,{severity:a==="connected"?"success":"error",sx:{mt:1},children:l})]}),h.jsx(Le,{variant:"h6",children:"API"}),h.jsx(Wt,{label:"API Base URL",helperText:"The promptfoo API the webview will connect to",value:o,onChange:A,fullWidth:!0,margin:"normal",disabled:m})]}),h.jsxs(Sr,{children:[h.jsx(gt,{onClick:p,disabled:m,startIcon:f&&h.jsx(Hs,{size:20}),children:"Save"}),h.jsx(gt,{onClick:t,disabled:m,children:"Close"})]})]})}const Owe=zt(h.jsx("path",{d:"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1"}),"DarkMode"),jwe=zt(h.jsx("path",{d:"M12 7c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5M2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1m18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1M11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1m0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1M5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0z"}),"LightMode"),Mwe=He(fn)(({theme:e})=>({padding:8,borderRadius:"50%",transition:e.transitions.create(["background-color","transform"],{duration:e.transitions.duration.standard}),"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)",transform:"rotate(15deg)"}})),m$=He("div")(({theme:e})=>({display:"flex",transition:e.transitions.create(["opacity","transform"],{duration:e.transitions.duration.standard})})),WJ=st.memo(({onToggleDarkMode:e})=>{const n=fr().palette.mode==="dark";return h.jsxs(Mwe,{onClick:e,"aria-label":n?"Switch to light mode":"Switch to dark mode",children:[h.jsx(m$,{sx:{opacity:n?1:0,transform:n?"rotate(0deg)":"rotate(-90deg)",position:"absolute"},children:h.jsx(Owe,{})}),h.jsx(m$,{sx:{opacity:n?0:1,transform:n?"rotate(90deg)":"rotate(0deg)"},children:h.jsx(jwe,{})})]})});WJ.displayName="DarkModeToggle";const Nwe=zt(h.jsx("path",{d:"M20 8h-2.81c-.45-.78-1.07-1.45-1.82-1.96L17 4.41 15.59 3l-2.17 2.17C12.96 5.06 12.49 5 12 5s-.96.06-1.41.17L8.41 3 7 4.41l1.62 1.63C7.88 6.55 7.26 7.22 6.81 8H4v2h2.09c-.05.33-.09.66-.09 1v1H4v2h2v1c0 .34.04.67.09 1H4v2h2.81c1.04 1.79 2.97 3 5.19 3s4.15-1.21 5.19-3H20v-2h-2.09c.05-.33.09-.66.09-1v-1h2v-2h-2v-1c0-.34-.04-.67-.09-1H20zm-6 8h-4v-2h4zm0-4h-4v-2h4z"}),"BugReport"),Uwe=zt(h.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V8h16z"}),"CalendarToday"),Dwe=zt(h.jsx("path",{d:"M21 6h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1m-4 6V3c0-.55-.45-1-1-1H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1"}),"Forum"),$we=zt(h.jsx("path",{d:"M12 1.27a11 11 0 00-3.48 21.46c.55.09.73-.28.73-.55v-1.84c-3.03.64-3.67-1.46-3.67-1.46-.55-1.29-1.28-1.65-1.28-1.65-.92-.65.1-.65.1-.65 1.1 0 1.73 1.1 1.73 1.1.92 1.65 2.57 1.2 3.21.92a2 2 0 01.64-1.47c-2.47-.27-5.04-1.19-5.04-5.5 0-1.1.46-2.1 1.2-2.84a3.76 3.76 0 010-2.93s.91-.28 3.11 1.1c1.8-.49 3.7-.49 5.5 0 2.1-1.38 3.02-1.1 3.02-1.1a3.76 3.76 0 010 2.93c.83.74 1.2 1.74 1.2 2.94 0 4.21-2.57 5.13-5.04 5.4.45.37.82.92.82 2.02v3.03c0 .27.1.64.73.55A11 11 0 0012 1.27"}),"GitHub"),Qwe=zt([h.jsx("path",{d:"M21 5c-1.11-.35-2.33-.5-3.5-.5-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5S2.45 4.9 1 6v14.65c0 .25.25.5.5.5.1 0 .15-.05.25-.05C3.1 20.45 5.05 20 6.5 20c1.95 0 4.05.4 5.5 1.5 1.35-.85 3.8-1.5 5.5-1.5 1.65 0 3.35.3 4.75 1.05.1.05.15.05.25.05.25 0 .5-.25.5-.5V6c-.6-.45-1.25-.75-2-1m0 13.5c-1.1-.35-2.3-.5-3.5-.5-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5 1.2 0 2.4.15 3.5.5z"},"0"),h.jsx("path",{d:"M17.5 10.5c.88 0 1.73.09 2.5.26V9.24c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99M13 12.49v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26V11.9c-.79-.15-1.64-.24-2.5-.24-1.7 0-3.24.3-4.5.83m4.5 1.84c-1.7 0-3.24.29-4.5.83v1.66c1.13-.64 2.7-.99 4.5-.99.88 0 1.73.09 2.5.26v-1.52c-.79-.16-1.64-.24-2.5-.24"},"1")],"MenuBook"),Hwe=zt(h.jsx("path",{d:"M20 6h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h16c1.11 0 2-.89 2-2V8c0-1.11-.89-2-2-2m-6 0h-4V4h4z"}),"Work");function zwe(e){return Mt("MuiLink",e)}const Vwe=Nt("MuiLink",["root","underlineNone","underlineHover","underlineAlways","button","focusVisible"]),qwe=({theme:e,ownerState:t})=>{const n=t.color,r=Cm(e,`palette.${n}`,!1)||t.color,i=Cm(e,`palette.${n}Channel`);return"vars"in e&&i?`rgba(${i} / 0.4)`:jt(r,.4)},v$={primary:!0,secondary:!0,error:!0,info:!0,success:!0,warning:!0,textPrimary:!0,textSecondary:!0,textDisabled:!0},Wwe=e=>{const{classes:t,component:n,focusVisible:r,underline:i}=e,o={root:["root",`underline${rt(i)}`,n==="button"&&"button",r&&"focusVisible"]};return Dt(o,zwe,t)},Kwe=He(Le,{name:"MuiLink",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`underline${rt(n.underline)}`],n.component==="button"&&t.button]}})(Rt(({theme:e})=>({variants:[{props:{underline:"none"},style:{textDecoration:"none"}},{props:{underline:"hover"},style:{textDecoration:"none","&:hover":{textDecoration:"underline"}}},{props:{underline:"always"},style:{textDecoration:"underline","&:hover":{textDecorationColor:"inherit"}}},{props:({underline:t,ownerState:n})=>t==="always"&&n.color!=="inherit",style:{textDecorationColor:"var(--Link-underlineColor)"}},...Object.entries(e.palette).filter(Xn()).map(([t])=>({props:{underline:"always",color:t},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette[t].mainChannel} / 0.4)`:jt(e.palette[t].main,.4)}})),{props:{underline:"always",color:"textPrimary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:jt(e.palette.text.primary,.4)}},{props:{underline:"always",color:"textSecondary"},style:{"--Link-underlineColor":e.vars?`rgba(${e.vars.palette.text.secondaryChannel} / 0.4)`:jt(e.palette.text.secondary,.4)}},{props:{underline:"always",color:"textDisabled"},style:{"--Link-underlineColor":(e.vars||e).palette.text.disabled}},{props:{component:"button"},style:{position:"relative",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none","&::-moz-focus-inner":{borderStyle:"none"},[`&.${Vwe.focusVisible}`]:{outline:"auto"}}}]}))),wh=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiLink"}),i=fr(),{className:o,color:s="primary",component:a="a",onBlur:l,onFocus:c,TypographyClasses:u,underline:f="always",variant:d="inherit",sx:A,...p}=r,[m,b]=j.useState(!1),v=x=>{NA(x.target)||b(!1),l&&l(x)},g=x=>{NA(x.target)&&b(!0),c&&c(x)},y={...r,color:s,component:a,focusVisible:m,underline:f,variant:d},w=Wwe(y);return h.jsx(Kwe,{color:s,className:ft(w.root,o),classes:u,component:a,onBlur:v,onFocus:g,ref:n,ownerState:y,variant:d,...p,sx:[...v$[s]===void 0?[{color:s}]:[],...Array.isArray(A)?A:[A]],style:{...p.style,...f==="always"&&s!=="inherit"&&!v$[s]&&{"--Link-underlineColor":qwe({theme:i,ownerState:y})}}})}),cr=Ume({createStyledComponent:He("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>Vt({props:e,name:"MuiStack"})}),Gwe=[{icon:h.jsx(Qwe,{fontSize:"small"}),text:"Documentation",href:"https://www.promptfoo.dev/docs/intro"},{icon:h.jsx($we,{fontSize:"small"}),text:"GitHub Repository",href:"https://github.com/promptfoo/promptfoo"},{icon:h.jsx(Nwe,{fontSize:"small"}),text:"File an Issue",href:"https://github.com/promptfoo/promptfoo/issues"},{icon:h.jsx(Dwe,{fontSize:"small"}),text:"Join Our Discord Community",href:"https://discord.gg/gHPS9jjfbs"},{icon:h.jsx(Uwe,{fontSize:"small"}),text:"Book a Meeting",href:"https://cal.com/team/promptfoo/intro2"},{icon:h.jsx(Hwe,{fontSize:"small"}),text:"Careers",href:"https://www.promptfoo.dev/careers/"}];function Ywe({open:e,onClose:t}){return h.jsxs(zn,{open:e,onClose:t,maxWidth:"xs",fullWidth:!0,"aria-labelledby":"about-promptfoo-dialog-title",children:[h.jsx(qn,{id:"about-promptfoo-dialog-title",children:h.jsxs(cr,{children:[h.jsx(Le,{variant:"h6",children:"About Promptfoo"}),h.jsx(wh,{href:"https://github.com/promptfoo/promptfoo/releases",underline:"none",sx:{color:"inherit"},target:"_blank",children:h.jsxs(Le,{variant:"subtitle2",children:["Version ","0.103.3"]})})]})}),h.jsxs(Vn,{children:[h.jsx(Le,{variant:"body2",gutterBottom:!0,children:"Promptfoo is a MIT licensed open-source tool for evaluating and red-teaming LLMs. We make it easy to track the performance of your models and prompts over time with automated support for dataset generation and grading."}),h.jsx(cr,{spacing:2,mt:2,children:Gwe.map((n,r)=>h.jsxs(cr,{direction:"row",spacing:1,alignItems:"center",sx:{flexWrap:"wrap","& .MuiSvgIcon-root":{color:"text.primary"}},children:[n.icon,h.jsx(wh,{underline:"none",target:"_blank",href:n.href,sx:{color:"inherit"},children:h.jsx(Le,{variant:"body2",children:n.text})})]},r))})]}),h.jsx(Sr,{children:h.jsx(gt,{onClick:t,children:"Close"})})]})}const Xwe="/assets/logo-panda-BuYvzEyb.svg",Jwe=He(De)(({theme:e})=>({display:"inline-flex",alignItems:"center",padding:e.spacing(1,2),perspective:"2000px",transformStyle:"preserve-3d"})),Zwe=He(Le)(({theme:e})=>({fontFamily:'"Inter", sans-serif',fontWeight:600,fontSize:"1rem",color:e.palette.text.primary,letterSpacing:"0.02em",marginLeft:e.spacing(1),transition:"all 0.3s ease","@keyframes rainbow":{"0%":{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0% 50%"}},"&:hover":{color:"transparent",backgroundImage:"linear-gradient(45deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8f00ff)",backgroundSize:"300% 300%",backgroundClip:"text",WebkitBackgroundClip:"text",animation:"rainbow 3s ease infinite"}})),exe=He("img")({width:"25px",height:"auto",transition:"all 1s cubic-bezier(0.68, -0.55, 0.265, 1.55)","@keyframes absoluteMadness":{"0%":{transform:"translateY(0) rotate(0deg) scale(1) translateX(0)",filter:"hue-rotate(0deg) brightness(1)"},"25%":{transform:"translateY(-25px) rotate(360deg) scale(1.5) translateX(15px)",filter:"hue-rotate(180deg) brightness(1.5)"},"50%":{transform:"translateY(0) rotate(720deg) scale(0.5) translateX(-15px)",filter:"hue-rotate(360deg) brightness(2)"},"75%":{transform:"translateY(25px) rotate(1080deg) scale(1.8) translateX(15px)",filter:"hue-rotate(540deg) brightness(1.5)"},"100%":{transform:"translateY(0) rotate(1440deg) scale(1) translateX(0)",filter:"hue-rotate(720deg) brightness(1)"}},"@keyframes vibrate":{"0%, 100%":{transform:"translate(0)"},"10%, 30%, 50%, 70%, 90%":{transform:"translate(-2px, 2px)"},"20%, 40%, 60%, 80%":{transform:"translate(2px, -2px)"}},"&:hover":{animation:"absoluteMadness 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite, vibrate 0.3s linear infinite",filter:"hue-rotate(720deg) brightness(2) contrast(1.5) saturate(300%) drop-shadow(0 0 10px rgba(255,0,0,0.5))"}});function txe(){return h.jsx(As,{to:"/",style:{textDecoration:"none"},children:h.jsxs(Jwe,{children:[h.jsx(exe,{src:Xwe,alt:"Promptfoo Logo"}),h.jsx(Zwe,{variant:"h1",children:"promptfoo"})]})})}const KJ=He(gt)(({theme:e})=>({color:e.palette.text.primary,"&:hover":{backgroundColor:e.palette.action.hover},"&.active":{backgroundColor:e.palette.action.selected}})),nxe=He(F0e)(({theme:e})=>({backgroundColor:e.palette.background.paper,color:e.palette.text.primary,boxShadow:e.shadows[1],marginBottom:e.spacing(2)})),rxe=He(TJ)({justifyContent:"space-between"}),y$=He(De)({display:"flex",alignItems:"center",gap:"1rem"});function Qx({href:e,label:t}){const r=nc().pathname.startsWith(e);return h.jsx(KJ,{component:As,to:e,className:r?"active":"",children:t})}function ixe(){const[e,t]=j.useState(null),n=!!e,r=nc(),i=a=>{t(a.currentTarget)},o=()=>{t(null)},s=["/setup","/redteam/setup"].some(a=>r.pathname.startsWith(a));return h.jsxs(h.Fragment,{children:[h.jsx(KJ,{onClick:i,endIcon:h.jsx(hP,{}),className:s?"active":"",children:"Create"}),h.jsxs(ew,{anchorEl:e,open:n,onClose:o,PaperProps:{elevation:0,sx:{overflow:"visible",filter:"drop-shadow(0px 2px 8px rgba(0,0,0,0.32))",mt:1.5}},children:[h.jsx(Kn,{onClick:o,component:As,to:"/setup",children:"Eval"}),h.jsx(Kn,{onClick:o,component:As,to:"/redteam/setup",children:"Redteam"})]})]})}function oxe({darkMode:e,onToggleDarkMode:t}){const[n,r]=j.useState(!1),[i,o]=j.useState(!1),s=()=>r(l=>!l),a=()=>o(l=>!l);return h.jsxs(h.Fragment,{children:[h.jsx(nxe,{position:"static",elevation:0,children:h.jsxs(rxe,{children:[h.jsxs(y$,{children:[h.jsx(txe,{}),h.jsx(ixe,{}),h.jsx(Qx,{href:"/eval",label:"Evals"}),h.jsx(Qx,{href:"/prompts",label:"Prompts"}),h.jsx(Qx,{href:"/datasets",label:"Datasets"}),h.jsx(Qx,{href:"/progress",label:"History"})]}),h.jsxs(y$,{children:[h.jsx(fn,{onClick:s,color:"inherit",children:h.jsx(iM,{})}),h.jsx(gn,{title:"API and Sharing Settings",children:h.jsx(fn,{onClick:a,color:"inherit",children:h.jsx(w0e,{})})}),h.jsx(WJ,{onToggleDarkMode:t})]})]})}),h.jsx(Ywe,{open:n,onClose:s}),h.jsx(Lwe,{open:i,onClose:a})]})}const sxe=ime({themeId:ul}),GJ=e=>OE({typography:{fontFamily:"inherit"},palette:{mode:e?"dark":"light",background:{default:"#ffffff"}},components:{MuiCard:{styleOverrides:{root:{backgroundColor:e?"#121212":"#fff",boxShadow:e?"none":"0 2px 3px rgba(0, 0, 0, 0.1)",borderRadius:"12px"}}},MuiTableContainer:{styleOverrides:{root:{backgroundColor:e?"#121212":"#fff",boxShadow:e?"none":"0 2px 3px rgba(0, 0, 0, 0.1)",borderRadius:"12px"}}},MuiTableHead:{styleOverrides:{root:{backgroundColor:e?"#1E1E1E":"#F5F5F5"}}},MuiTableCell:{styleOverrides:{head:{backgroundColor:"inherit",color:e?"#FFFFFF":"#000000",fontWeight:"bold"},stickyHeader:{backgroundColor:e?"#1E1E1E":"#F5F5F5"}}},MuiInputBase:{styleOverrides:{root:{backgroundColor:e?"#333":"#fff"}}}}}),axe=GJ(!1),lxe=GJ(!0);function cxe({children:e}){return h.jsx("div",{children:e})}function uxe(){const e=sxe("(prefers-color-scheme: dark)"),[t,n]=j.useState(null);j.useEffect(()=>{const i=localStorage.getItem("darkMode");n(i===null?e:i==="true")},[e]);const r=j.useCallback(()=>{n(i=>{const o=!i;return localStorage.setItem("darkMode",String(o)),o})},[]);return j.useEffect(()=>{t!==null&&(t?document.documentElement.setAttribute("data-theme","dark"):document.documentElement.removeAttribute("data-theme"))},[t]),t===null?null:h.jsx(L0e,{theme:t?lxe:axe,children:h.jsxs(cxe,{children:[h.jsx(oxe,{darkMode:t,onToggleDarkMode:r}),h.jsx(bX,{})]})})}function fxe(e){return Mt("MuiCollapse",e)}Nt("MuiCollapse",["root","horizontal","vertical","entered","hidden","wrapper","wrapperInner"]);const Axe=e=>{const{orientation:t,classes:n}=e,r={root:["root",`${t}`],entered:["entered"],hidden:["hidden"],wrapper:["wrapper",`${t}`],wrapperInner:["wrapperInner",`${t}`]};return Dt(r,fxe,n)},dxe=He("div",{name:"MuiCollapse",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.orientation],n.state==="entered"&&t.entered,n.state==="exited"&&!n.in&&n.collapsedSize==="0px"&&t.hidden]}})(Rt(({theme:e})=>({height:0,overflow:"hidden",transition:e.transitions.create("height"),variants:[{props:{orientation:"horizontal"},style:{height:"auto",width:0,transition:e.transitions.create("width")}},{props:{state:"entered"},style:{height:"auto",overflow:"visible"}},{props:{state:"entered",orientation:"horizontal"},style:{width:"auto"}},{props:({ownerState:t})=>t.state==="exited"&&!t.in&&t.collapsedSize==="0px",style:{visibility:"hidden"}}]}))),hxe=He("div",{name:"MuiCollapse",slot:"Wrapper",overridesResolver:(e,t)=>t.wrapper})({display:"flex",width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),pxe=He("div",{name:"MuiCollapse",slot:"WrapperInner",overridesResolver:(e,t)=>t.wrapperInner})({width:"100%",variants:[{props:{orientation:"horizontal"},style:{width:"auto",height:"100%"}}]}),o_=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiCollapse"}),{addEndListener:i,children:o,className:s,collapsedSize:a="0px",component:l,easing:c,in:u,onEnter:f,onEntered:d,onEntering:A,onExit:p,onExited:m,onExiting:b,orientation:v="vertical",style:g,timeout:y=yJ.standard,TransitionComponent:w=Cl,...x}=r,C={...r,orientation:v,collapsedSize:a},k=Axe(C),F=fr(),L=AA(),_=j.useRef(null),T=j.useRef(),E=typeof a=="number"?`${a}px`:a,I=v==="horizontal",N=I?"width":"height",$=j.useRef(null),D=vr(n,$),V=U=>X=>{if(U){const Z=$.current;X===void 0?U(Z):U(Z,X)}},Y=()=>_.current?_.current[I?"clientWidth":"clientHeight"]:0,K=V((U,X)=>{_.current&&I&&(_.current.style.position="absolute"),U.style[N]=E,f&&f(U,X)}),O=V((U,X)=>{const Z=Y();_.current&&I&&(_.current.style.position="");const{duration:ue,easing:ye}=QA({style:g,timeout:y,easing:c},{mode:"enter"});if(y==="auto"){const ee=F.transitions.getAutoHeightDuration(Z);U.style.transitionDuration=`${ee}ms`,T.current=ee}else U.style.transitionDuration=typeof ue=="string"?ue:`${ue}ms`;U.style[N]=`${Z}px`,U.style.transitionTimingFunction=ye,A&&A(U,X)}),ne=V((U,X)=>{U.style[N]="auto",d&&d(U,X)}),z=V(U=>{U.style[N]=`${Y()}px`,p&&p(U)}),R=V(m),M=V(U=>{const X=Y(),{duration:Z,easing:ue}=QA({style:g,timeout:y,easing:c},{mode:"exit"});if(y==="auto"){const ye=F.transitions.getAutoHeightDuration(X);U.style.transitionDuration=`${ye}ms`,T.current=ye}else U.style.transitionDuration=typeof Z=="string"?Z:`${Z}ms`;U.style[N]=E,U.style.transitionTimingFunction=ue,b&&b(U)}),H=U=>{y==="auto"&&L.start(T.current||0,U),i&&i($.current,U)};return h.jsx(w,{in:u,onEnter:K,onEntered:ne,onEntering:O,onExit:z,onExited:R,onExiting:M,addEndListener:H,nodeRef:$,timeout:y==="auto"?null:y,...x,children:(U,X)=>h.jsx(dxe,{as:l,className:ft(k.root,s,{entered:k.entered,exited:!u&&E==="0px"&&k.hidden}[U]),style:{[I?"minWidth":"minHeight"]:E,...g},ref:D,...X,ownerState:{...C,state:U},children:h.jsx(hxe,{ownerState:{...C,state:U},className:k.wrapper,ref:_,children:h.jsx(pxe,{ownerState:{...C,state:U},className:k.wrapperInner,children:o})})})})});o_&&(o_.muiSupportAuto=!0);const YJ=j.createContext({});function gxe(e){return Mt("MuiAccordion",e)}const Hx=Nt("MuiAccordion",["root","heading","rounded","expanded","disabled","gutters","region"]),mxe=e=>{const{classes:t,square:n,expanded:r,disabled:i,disableGutters:o}=e;return Dt({root:["root",!n&&"rounded",r&&"expanded",i&&"disabled",!o&&"gutters"],heading:["heading"],region:["region"]},gxe,t)},vxe=He(Tn,{name:"MuiAccordion",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Hx.region}`]:t.region},t.root,!n.square&&t.rounded,!n.disableGutters&&t.gutters]}})(Rt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{position:"relative",transition:e.transitions.create(["margin"],t),overflowAnchor:"none","&::before":{position:"absolute",left:0,top:-1,right:0,height:1,content:'""',opacity:1,backgroundColor:(e.vars||e).palette.divider,transition:e.transitions.create(["opacity","background-color"],t)},"&:first-of-type":{"&::before":{display:"none"}},[`&.${Hx.expanded}`]:{"&::before":{opacity:0},"&:first-of-type":{marginTop:0},"&:last-of-type":{marginBottom:0},"& + &":{"&::before":{display:"none"}}},[`&.${Hx.disabled}`]:{backgroundColor:(e.vars||e).palette.action.disabledBackground}}}),Rt(({theme:e})=>({variants:[{props:t=>!t.square,style:{borderRadius:0,"&:first-of-type":{borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius},"&:last-of-type":{borderBottomLeftRadius:(e.vars||e).shape.borderRadius,borderBottomRightRadius:(e.vars||e).shape.borderRadius,"@supports (-ms-ime-align: auto)":{borderBottomLeftRadius:0,borderBottomRightRadius:0}}}},{props:t=>!t.disableGutters,style:{[`&.${Hx.expanded}`]:{margin:"16px 0"}}}]}))),yxe=He("h3",{name:"MuiAccordion",slot:"Heading",overridesResolver:(e,t)=>t.heading})({all:"unset"}),Rc=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiAccordion"}),{children:i,className:o,defaultExpanded:s=!1,disabled:a=!1,disableGutters:l=!1,expanded:c,onChange:u,square:f=!1,slots:d={},slotProps:A={},TransitionComponent:p,TransitionProps:m,...b}=r,[v,g]=Kl({controlled:c,default:s,name:"Accordion",state:"expanded"}),y=j.useCallback(D=>{g(!v),u&&u(D,!v)},[v,u,g]),[w,...x]=j.Children.toArray(i),C=j.useMemo(()=>({expanded:v,disabled:a,disableGutters:l,toggle:y}),[v,a,l,y]),k={...r,square:f,disabled:a,disableGutters:l,expanded:v},F=mxe(k),L={transition:p,...d},_={transition:m,...A},T={slots:L,slotProps:_},[E,I]=Fr("heading",{elementType:yxe,externalForwardedProps:T,className:F.heading,ownerState:k}),[N,$]=Fr("transition",{elementType:o_,externalForwardedProps:T,ownerState:k});return h.jsxs(vxe,{className:ft(F.root,o),ref:n,ownerState:k,square:f,...b,children:[h.jsx(E,{...I,children:h.jsx(YJ.Provider,{value:C,children:w})}),h.jsx(N,{in:v,timeout:"auto",...$,children:h.jsx("div",{"aria-labelledby":w.props.id,id:w.props["aria-controls"],role:"region",className:F.region,children:x})})]})});function bxe(e){return Mt("MuiAccordionDetails",e)}Nt("MuiAccordionDetails",["root"]);const wxe=e=>{const{classes:t}=e;return Dt({root:["root"]},bxe,t)},xxe=He("div",{name:"MuiAccordionDetails",slot:"Root",overridesResolver:(e,t)=>t.root})(Rt(({theme:e})=>({padding:e.spacing(1,2,2)}))),qa=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiAccordionDetails"}),{className:i,...o}=r,s=r,a=wxe(s);return h.jsx(xxe,{className:ft(a.root,i),ref:n,ownerState:s,...o})});function Cxe(e){return Mt("MuiAccordionSummary",e)}const kg=Nt("MuiAccordionSummary",["root","expanded","focusVisible","disabled","gutters","contentGutters","content","expandIconWrapper"]),Sxe=e=>{const{classes:t,expanded:n,disabled:r,disableGutters:i}=e;return Dt({root:["root",n&&"expanded",r&&"disabled",!i&&"gutters"],focusVisible:["focusVisible"],content:["content",n&&"expanded",!i&&"contentGutters"],expandIconWrapper:["expandIconWrapper",n&&"expanded"]},Cxe,t)},_xe=He(ya,{name:"MuiAccordionSummary",slot:"Root",overridesResolver:(e,t)=>t.root})(Rt(({theme:e})=>{const t={duration:e.transitions.duration.shortest};return{display:"flex",minHeight:48,padding:e.spacing(0,2),transition:e.transitions.create(["min-height","background-color"],t),[`&.${kg.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${kg.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},[`&:hover:not(.${kg.disabled})`]:{cursor:"pointer"},variants:[{props:n=>!n.disableGutters,style:{[`&.${kg.expanded}`]:{minHeight:64}}}]}})),Bxe=He("div",{name:"MuiAccordionSummary",slot:"Content",overridesResolver:(e,t)=>t.content})(Rt(({theme:e})=>({display:"flex",flexGrow:1,margin:"12px 0",variants:[{props:t=>!t.disableGutters,style:{transition:e.transitions.create(["margin"],{duration:e.transitions.duration.shortest}),[`&.${kg.expanded}`]:{margin:"20px 0"}}}]}))),Exe=He("div",{name:"MuiAccordionSummary",slot:"ExpandIconWrapper",overridesResolver:(e,t)=>t.expandIconWrapper})(Rt(({theme:e})=>({display:"flex",color:(e.vars||e).palette.action.active,transform:"rotate(0deg)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shortest}),[`&.${kg.expanded}`]:{transform:"rotate(180deg)"}}))),Pc=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiAccordionSummary"}),{children:i,className:o,expandIcon:s,focusVisibleClassName:a,onClick:l,...c}=r,{disabled:u=!1,disableGutters:f,expanded:d,toggle:A}=j.useContext(YJ),p=v=>{A&&A(v),l&&l(v)},m={...r,expanded:d,disabled:u,disableGutters:f},b=Sxe(m);return h.jsxs(_xe,{focusRipple:!1,disableRipple:!0,disabled:u,component:"div","aria-expanded":d,className:ft(b.root,o),focusVisibleClassName:ft(b.focusVisible,a),onClick:p,ref:n,ownerState:m,...c,children:[h.jsx(Bxe,{className:b.content,ownerState:m,children:i}),s&&h.jsx(Exe,{className:b.expandIconWrapper,ownerState:m,children:s})]})});function b$(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function kxe(e={}){const{ignoreAccents:t=!0,ignoreCase:n=!0,limit:r,matchFrom:i="any",stringify:o,trim:s=!1}=e;return(a,{inputValue:l,getOptionLabel:c})=>{let u=s?l.trim():l;n&&(u=u.toLowerCase()),t&&(u=b$(u));const f=u?a.filter(d=>{let A=(o||c)(d);return n&&(A=A.toLowerCase()),t&&(A=b$(A)),i==="start"?A.startsWith(u):A.includes(u)}):a;return typeof r=="number"?f.slice(0,r):f}}const Ixe=kxe(),w$=5,Fxe=e=>{var t;return e.current!==null&&((t=e.current.parentElement)==null?void 0:t.contains(document.activeElement))},Txe=[];function Rxe(e){const{unstable_isActiveElementInListbox:t=Fxe,unstable_classNamePrefix:n="Mui",autoComplete:r=!1,autoHighlight:i=!1,autoSelect:o=!1,blurOnSelect:s=!1,clearOnBlur:a=!e.freeSolo,clearOnEscape:l=!1,componentName:c="useAutocomplete",defaultValue:u=e.multiple?Txe:null,disableClearable:f=!1,disableCloseOnSelect:d=!1,disabled:A,disabledItemsFocusable:p=!1,disableListWrap:m=!1,filterOptions:b=Ixe,filterSelectedOptions:v=!1,freeSolo:g=!1,getOptionDisabled:y,getOptionKey:w,getOptionLabel:x=et=>et.label??et,groupBy:C,handleHomeEndKeys:k=!e.freeSolo,id:F,includeInputInList:L=!1,inputValue:_,isOptionEqualToValue:T=(et,Ze)=>et===Ze,multiple:E=!1,onChange:I,onClose:N,onHighlightChange:$,onInputChange:D,onOpen:V,open:Y,openOnFocus:K=!1,options:O,readOnly:ne=!1,selectOnFocus:z=!e.freeSolo,value:R}=e,M=hf(F);let H=x;H=et=>{const Ze=x(et);return typeof Ze!="string"?String(Ze):Ze};const U=j.useRef(!1),X=j.useRef(!0),Z=j.useRef(null),ue=j.useRef(null),[ye,ee]=j.useState(null),[J,ce]=j.useState(-1),_e=i?0:-1,be=j.useRef(_e),[se,Me]=Kl({controlled:R,default:u,name:c}),[Oe,Ee]=Kl({controlled:_,default:"",name:c,state:"inputValue"}),[Xe,tt]=j.useState(!1),Ke=j.useCallback((et,Ze,Bt)=>{if(!(E?se.length<Ze.length:Ze!==null)&&!a)return;let Qt;if(E)Qt="";else if(Ze==null)Qt="";else{const An=H(Ze);Qt=typeof An=="string"?An:""}Oe!==Qt&&(Ee(Qt),D&&D(et,Qt,Bt))},[H,Oe,E,D,Ee,a,se]),[Ne,ve]=Kl({controlled:Y,default:!1,name:c,state:"open"}),[Be,xe]=j.useState(!0),Fe=!E&&se!=null&&Oe===H(se),Se=Ne&&!ne,Re=Se?b(O.filter(et=>!(v&&(E?se:[se]).some(Ze=>Ze!==null&&T(et,Ze)))),{inputValue:Fe&&Be?"":Oe,getOptionLabel:H}):[],re=Phe({filteredOptions:Re,value:se,inputValue:Oe});j.useEffect(()=>{const et=se!==re.value;Xe&&!et||g&&!et||Ke(null,se,"reset")},[se,Ke,Xe,re.value,g]);const B=Ne&&Re.length>0&&!ne,q=Bi(et=>{et===-1?Z.current.focus():ye.querySelector(`[data-tag-index="${et}"]`).focus()});j.useEffect(()=>{E&&J>se.length-1&&(ce(-1),q(-1))},[se,E,J,q]);function le(et,Ze){if(!ue.current||et<0||et>=Re.length)return-1;let Bt=et;for(;;){const $t=ue.current.querySelector(`[data-option-index="${Bt}"]`),Qt=p?!1:!$t||$t.disabled||$t.getAttribute("aria-disabled")==="true";if($t&&$t.hasAttribute("tabindex")&&!Qt)return Bt;if(Ze==="next"?Bt=(Bt+1)%Re.length:Bt=(Bt-1+Re.length)%Re.length,Bt===et)return-1}}const he=Bi(({event:et,index:Ze,reason:Bt="auto"})=>{if(be.current=Ze,Ze===-1?Z.current.removeAttribute("aria-activedescendant"):Z.current.setAttribute("aria-activedescendant",`${M}-option-${Ze}`),$&&$(et,Ze===-1?null:Re[Ze],Bt),!ue.current)return;const $t=ue.current.querySelector(`[role="option"].${n}-focused`);$t&&($t.classList.remove(`${n}-focused`),$t.classList.remove(`${n}-focusVisible`));let Qt=ue.current;if(ue.current.getAttribute("role")!=="listbox"&&(Qt=ue.current.parentElement.querySelector('[role="listbox"]')),!Qt)return;if(Ze===-1){Qt.scrollTop=0;return}const An=ue.current.querySelector(`[data-option-index="${Ze}"]`);if(An&&(An.classList.add(`${n}-focused`),Bt==="keyboard"&&An.classList.add(`${n}-focusVisible`),Qt.scrollHeight>Qt.clientHeight&&Bt!=="mouse"&&Bt!=="touch")){const Bn=An,zr=Qt.clientHeight+Qt.scrollTop,gi=Bn.offsetTop+Bn.offsetHeight;gi>zr?Qt.scrollTop=gi-Qt.clientHeight:Bn.offsetTop-Bn.offsetHeight*(C?1.3:0)<Qt.scrollTop&&(Qt.scrollTop=Bn.offsetTop-Bn.offsetHeight*(C?1.3:0))}}),ae=Bi(({event:et,diff:Ze,direction:Bt="next",reason:$t="auto"})=>{if(!Se)return;const An=le((()=>{const Bn=Re.length-1;if(Ze==="reset")return _e;if(Ze==="start")return 0;if(Ze==="end")return Bn;const zr=be.current+Ze;return zr<0?zr===-1&&L?-1:m&&be.current!==-1||Math.abs(Ze)>1?0:Bn:zr>Bn?zr===Bn+1&&L?-1:m||Math.abs(Ze)>1?Bn:0:zr})(),Bt);if(he({index:An,reason:$t,event:et}),r&&Ze!=="reset")if(An===-1)Z.current.value=Oe;else{const Bn=H(Re[An]);Z.current.value=Bn,Bn.toLowerCase().indexOf(Oe.toLowerCase())===0&&Oe.length>0&&Z.current.setSelectionRange(Oe.length,Bn.length)}}),pe=()=>{const et=(Ze,Bt)=>{const $t=Ze?H(Ze):"",Qt=Bt?H(Bt):"";return $t===Qt};if(be.current!==-1&&re.filteredOptions&&re.filteredOptions.length!==Re.length&&re.inputValue===Oe&&(E?se.length===re.value.length&&re.value.every((Ze,Bt)=>H(se[Bt])===H(Ze)):et(re.value,se))){const Ze=re.filteredOptions[be.current];if(Ze)return Re.findIndex(Bt=>H(Bt)===H(Ze))}return-1},ie=j.useCallback(()=>{if(!Se)return;const et=pe();if(et!==-1){be.current=et;return}const Ze=E?se[0]:se;if(Re.length===0||Ze==null){ae({diff:"reset"});return}if(ue.current){if(Ze!=null){const Bt=Re[be.current];if(E&&Bt&&se.findIndex(Qt=>T(Bt,Qt))!==-1)return;const $t=Re.findIndex(Qt=>T(Qt,Ze));$t===-1?ae({diff:"reset"}):he({index:$t});return}if(be.current>=Re.length-1){he({index:Re.length-1});return}he({index:be.current})}},[Re.length,E?!1:se,v,ae,he,Se,Oe,E]),Ue=Bi(et=>{KS(ue,et),et&&ie()});j.useEffect(()=>{ie()},[ie]);const At=et=>{Ne||(ve(!0),xe(!0),V&&V(et))},W=(et,Ze)=>{Ne&&(ve(!1),N&&N(et,Ze))},je=(et,Ze,Bt,$t)=>{if(E){if(se.length===Ze.length&&se.every((Qt,An)=>Qt===Ze[An]))return}else if(se===Ze)return;I&&I(et,Ze,Bt,$t),Me(Ze)},ze=j.useRef(!1),de=(et,Ze,Bt="selectOption",$t="options")=>{let Qt=Bt,An=Ze;if(E){An=Array.isArray(se)?se.slice():[];const Bn=An.findIndex(zr=>T(Ze,zr));Bn===-1?An.push(Ze):$t!=="freeSolo"&&(An.splice(Bn,1),Qt="removeOption")}Ke(et,An,Qt),je(et,An,Qt,{option:Ze}),!d&&(!et||!et.ctrlKey&&!et.metaKey)&&W(et,Qt),(s===!0||s==="touch"&&ze.current||s==="mouse"&&!ze.current)&&Z.current.blur()};function Ie(et,Ze){if(et===-1)return-1;let Bt=et;for(;;){if(Ze==="next"&&Bt===se.length||Ze==="previous"&&Bt===-1)return-1;const $t=ye.querySelector(`[data-tag-index="${Bt}"]`);if(!$t||!$t.hasAttribute("tabindex")||$t.disabled||$t.getAttribute("aria-disabled")==="true")Bt+=Ze==="next"?1:-1;else return Bt}}const We=(et,Ze)=>{if(!E)return;Oe===""&&W(et,"toggleInput");let Bt=J;J===-1?Oe===""&&Ze==="previous"&&(Bt=se.length-1):(Bt+=Ze==="next"?1:-1,Bt<0&&(Bt=0),Bt===se.length&&(Bt=-1)),Bt=Ie(Bt,Ze),ce(Bt),q(Bt)},Lt=et=>{U.current=!0,Ee(""),D&&D(et,"","clear"),je(et,E?[]:null,"clear")},at=et=>Ze=>{if(et.onKeyDown&&et.onKeyDown(Ze),!Ze.defaultMuiPrevented&&(J!==-1&&!["ArrowLeft","ArrowRight"].includes(Ze.key)&&(ce(-1),q(-1)),Ze.which!==229))switch(Ze.key){case"Home":Se&&k&&(Ze.preventDefault(),ae({diff:"start",direction:"next",reason:"keyboard",event:Ze}));break;case"End":Se&&k&&(Ze.preventDefault(),ae({diff:"end",direction:"previous",reason:"keyboard",event:Ze}));break;case"PageUp":Ze.preventDefault(),ae({diff:-w$,direction:"previous",reason:"keyboard",event:Ze}),At(Ze);break;case"PageDown":Ze.preventDefault(),ae({diff:w$,direction:"next",reason:"keyboard",event:Ze}),At(Ze);break;case"ArrowDown":Ze.preventDefault(),ae({diff:1,direction:"next",reason:"keyboard",event:Ze}),At(Ze);break;case"ArrowUp":Ze.preventDefault(),ae({diff:-1,direction:"previous",reason:"keyboard",event:Ze}),At(Ze);break;case"ArrowLeft":We(Ze,"previous");break;case"ArrowRight":We(Ze,"next");break;case"Enter":if(be.current!==-1&&Se){const Bt=Re[be.current],$t=y?y(Bt):!1;if(Ze.preventDefault(),$t)return;de(Ze,Bt,"selectOption"),r&&Z.current.setSelectionRange(Z.current.value.length,Z.current.value.length)}else g&&Oe!==""&&Fe===!1&&(E&&Ze.preventDefault(),de(Ze,Oe,"createOption","freeSolo"));break;case"Escape":Se?(Ze.preventDefault(),Ze.stopPropagation(),W(Ze,"escape")):l&&(Oe!==""||E&&se.length>0)&&(Ze.preventDefault(),Ze.stopPropagation(),Lt(Ze));break;case"Backspace":if(E&&!ne&&Oe===""&&se.length>0){const Bt=J===-1?se.length-1:J,$t=se.slice();$t.splice(Bt,1),je(Ze,$t,"removeOption",{option:se[Bt]})}break;case"Delete":if(E&&!ne&&Oe===""&&se.length>0&&J!==-1){const Bt=J,$t=se.slice();$t.splice(Bt,1),je(Ze,$t,"removeOption",{option:se[Bt]})}break}},Et=et=>{tt(!0),K&&!U.current&&At(et)},cn=et=>{if(t(ue)){Z.current.focus();return}tt(!1),X.current=!0,U.current=!1,o&&be.current!==-1&&Se?de(et,Re[be.current],"blur"):o&&g&&Oe!==""?de(et,Oe,"blur","freeSolo"):a&&Ke(et,se,"blur"),W(et,"blur")},Te=et=>{const Ze=et.target.value;Oe!==Ze&&(Ee(Ze),xe(!1),D&&D(et,Ze,"input")),Ze===""?!f&&!E&&je(et,null,"clear"):At(et)},$e=et=>{const Ze=Number(et.currentTarget.getAttribute("data-option-index"));be.current!==Ze&&he({event:et,index:Ze,reason:"mouse"})},Ye=et=>{he({event:et,index:Number(et.currentTarget.getAttribute("data-option-index")),reason:"touch"}),ze.current=!0},lt=et=>{const Ze=Number(et.currentTarget.getAttribute("data-option-index"));de(et,Re[Ze],"selectOption"),ze.current=!1},xt=et=>Ze=>{const Bt=se.slice();Bt.splice(et,1),je(Ze,Bt,"removeOption",{option:se[et]})},kt=et=>{Ne?W(et,"toggleInput"):At(et)},en=et=>{et.currentTarget.contains(et.target)&&et.target.getAttribute("id")!==M&&et.preventDefault()},Ut=et=>{et.currentTarget.contains(et.target)&&(Z.current.focus(),z&&X.current&&Z.current.selectionEnd-Z.current.selectionStart===0&&Z.current.select(),X.current=!1)},wt=et=>{!A&&(Oe===""||!Ne)&&kt(et)};let bt=g&&Oe.length>0;bt=bt||(E?se.length>0:se!==null);let It=Re;return C&&(It=Re.reduce((et,Ze,Bt)=>{const $t=C(Ze);return et.length>0&&et[et.length-1].group===$t?et[et.length-1].options.push(Ze):et.push({key:Bt,index:Bt,group:$t,options:[Ze]}),et},[])),A&&Xe&&cn(),{getRootProps:(et={})=>({"aria-owns":B?`${M}-listbox`:null,...et,onKeyDown:at(et),onMouseDown:en,onClick:Ut}),getInputLabelProps:()=>({id:`${M}-label`,htmlFor:M}),getInputProps:()=>({id:M,value:Oe,onBlur:cn,onFocus:Et,onChange:Te,onMouseDown:wt,"aria-activedescendant":Se?"":null,"aria-autocomplete":r?"both":"list","aria-controls":B?`${M}-listbox`:void 0,"aria-expanded":B,autoComplete:"off",ref:Z,autoCapitalize:"none",spellCheck:"false",role:"combobox",disabled:A}),getClearProps:()=>({tabIndex:-1,type:"button",onClick:Lt}),getPopupIndicatorProps:()=>({tabIndex:-1,type:"button",onClick:kt}),getTagProps:({index:et})=>({key:et,"data-tag-index":et,tabIndex:-1,...!ne&&{onDelete:xt(et)}}),getListboxProps:()=>({role:"listbox",id:`${M}-listbox`,"aria-labelledby":`${M}-label`,ref:Ue,onMouseDown:et=>{et.preventDefault()}}),getOptionProps:({index:et,option:Ze})=>{const Bt=(E?se:[se]).some(Qt=>Qt!=null&&T(Ze,Qt)),$t=y?y(Ze):!1;return{key:(w==null?void 0:w(Ze))??H(Ze),tabIndex:-1,role:"option",id:`${M}-option-${et}`,onMouseMove:$e,onClick:lt,onTouchStart:Ye,"data-option-index":et,"aria-disabled":$t,"aria-selected":Bt}},id:M,inputValue:Oe,value:se,dirty:bt,expanded:Se&&ye,popupOpen:Se,focused:Xe||J!==-1,anchorEl:ye,setAnchorEl:ee,focusedTag:J,groupedOptions:It}}function Pxe(e){return Mt("MuiListSubheader",e)}Nt("MuiListSubheader",["root","colorPrimary","colorInherit","gutters","inset","sticky"]);const Lxe=e=>{const{classes:t,color:n,disableGutters:r,inset:i,disableSticky:o}=e,s={root:["root",n!=="default"&&`color${rt(n)}`,!r&&"gutters",i&&"inset",!o&&"sticky"]};return Dt(s,Pxe,t)},Oxe=He("li",{name:"MuiListSubheader",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.color!=="default"&&t[`color${rt(n.color)}`],!n.disableGutters&&t.gutters,n.inset&&t.inset,!n.disableSticky&&t.sticky]}})(Rt(({theme:e})=>({boxSizing:"border-box",lineHeight:"48px",listStyle:"none",color:(e.vars||e).palette.text.secondary,fontFamily:e.typography.fontFamily,fontWeight:e.typography.fontWeightMedium,fontSize:e.typography.pxToRem(14),variants:[{props:{color:"primary"},style:{color:(e.vars||e).palette.primary.main}},{props:{color:"inherit"},style:{color:"inherit"}},{props:({ownerState:t})=>!t.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:t})=>t.inset,style:{paddingLeft:72}},{props:({ownerState:t})=>!t.disableSticky,style:{position:"sticky",top:0,zIndex:1,backgroundColor:(e.vars||e).palette.background.paper}}]}))),s_=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiListSubheader"}),{className:i,color:o="default",component:s="li",disableGutters:a=!1,disableSticky:l=!1,inset:c=!1,...u}=r,f={...r,color:o,component:s,disableGutters:a,disableSticky:l,inset:c},d=Lxe(f);return h.jsx(Oxe,{as:s,className:ft(d.root,i),ref:n,ownerState:f,...u})});s_&&(s_.muiSkipListHighlight=!0);const jxe=zt(h.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"}),"Cancel");function Mxe(e){return Mt("MuiChip",e)}const Mn=Nt("MuiChip",["root","sizeSmall","sizeMedium","colorDefault","colorError","colorInfo","colorPrimary","colorSecondary","colorSuccess","colorWarning","disabled","clickable","clickableColorPrimary","clickableColorSecondary","deletable","deletableColorPrimary","deletableColorSecondary","outlined","filled","outlinedPrimary","outlinedSecondary","filledPrimary","filledSecondary","avatar","avatarSmall","avatarMedium","avatarColorPrimary","avatarColorSecondary","icon","iconSmall","iconMedium","iconColorPrimary","iconColorSecondary","label","labelSmall","labelMedium","deleteIcon","deleteIconSmall","deleteIconMedium","deleteIconColorPrimary","deleteIconColorSecondary","deleteIconOutlinedColorPrimary","deleteIconOutlinedColorSecondary","deleteIconFilledColorPrimary","deleteIconFilledColorSecondary","focusVisible"]),Nxe=e=>{const{classes:t,disabled:n,size:r,color:i,iconColor:o,onDelete:s,clickable:a,variant:l}=e,c={root:["root",l,n&&"disabled",`size${rt(r)}`,`color${rt(i)}`,a&&"clickable",a&&`clickableColor${rt(i)}`,s&&"deletable",s&&`deletableColor${rt(i)}`,`${l}${rt(i)}`],label:["label",`label${rt(r)}`],avatar:["avatar",`avatar${rt(r)}`,`avatarColor${rt(i)}`],icon:["icon",`icon${rt(r)}`,`iconColor${rt(o)}`],deleteIcon:["deleteIcon",`deleteIcon${rt(r)}`,`deleteIconColor${rt(i)}`,`deleteIcon${rt(l)}Color${rt(i)}`]};return Dt(c,Mxe,t)},Uxe=He("div",{name:"MuiChip",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{color:r,iconColor:i,clickable:o,onDelete:s,size:a,variant:l}=n;return[{[`& .${Mn.avatar}`]:t.avatar},{[`& .${Mn.avatar}`]:t[`avatar${rt(a)}`]},{[`& .${Mn.avatar}`]:t[`avatarColor${rt(r)}`]},{[`& .${Mn.icon}`]:t.icon},{[`& .${Mn.icon}`]:t[`icon${rt(a)}`]},{[`& .${Mn.icon}`]:t[`iconColor${rt(i)}`]},{[`& .${Mn.deleteIcon}`]:t.deleteIcon},{[`& .${Mn.deleteIcon}`]:t[`deleteIcon${rt(a)}`]},{[`& .${Mn.deleteIcon}`]:t[`deleteIconColor${rt(r)}`]},{[`& .${Mn.deleteIcon}`]:t[`deleteIcon${rt(l)}Color${rt(r)}`]},t.root,t[`size${rt(a)}`],t[`color${rt(r)}`],o&&t.clickable,o&&r!=="default"&&t[`clickableColor${rt(r)})`],s&&t.deletable,s&&r!=="default"&&t[`deletableColor${rt(r)}`],t[l],t[`${l}${rt(r)}`]]}})(Rt(({theme:e})=>{const t=e.palette.mode==="light"?e.palette.grey[700]:e.palette.grey[300];return{maxWidth:"100%",fontFamily:e.typography.fontFamily,fontSize:e.typography.pxToRem(13),display:"inline-flex",alignItems:"center",justifyContent:"center",height:32,color:(e.vars||e).palette.text.primary,backgroundColor:(e.vars||e).palette.action.selected,borderRadius:32/2,whiteSpace:"nowrap",transition:e.transitions.create(["background-color","box-shadow"]),cursor:"unset",outline:0,textDecoration:"none",border:0,padding:0,verticalAlign:"middle",boxSizing:"border-box",[`&.${Mn.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`& .${Mn.avatar}`]:{marginLeft:5,marginRight:-6,width:24,height:24,color:e.vars?e.vars.palette.Chip.defaultAvatarColor:t,fontSize:e.typography.pxToRem(12)},[`& .${Mn.avatarColorPrimary}`]:{color:(e.vars||e).palette.primary.contrastText,backgroundColor:(e.vars||e).palette.primary.dark},[`& .${Mn.avatarColorSecondary}`]:{color:(e.vars||e).palette.secondary.contrastText,backgroundColor:(e.vars||e).palette.secondary.dark},[`& .${Mn.avatarSmall}`]:{marginLeft:4,marginRight:-4,width:18,height:18,fontSize:e.typography.pxToRem(10)},[`& .${Mn.icon}`]:{marginLeft:5,marginRight:-6},[`& .${Mn.deleteIcon}`]:{WebkitTapHighlightColor:"transparent",color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.26)`:jt(e.palette.text.primary,.26),fontSize:22,cursor:"pointer",margin:"0 5px 0 -6px","&:hover":{color:e.vars?`rgba(${e.vars.palette.text.primaryChannel} / 0.4)`:jt(e.palette.text.primary,.4)}},variants:[{props:{size:"small"},style:{height:24,[`& .${Mn.icon}`]:{fontSize:18,marginLeft:4,marginRight:-4},[`& .${Mn.deleteIcon}`]:{fontSize:16,marginRight:4,marginLeft:-4}}},...Object.entries(e.palette).filter(Xn(["contrastText"])).map(([n])=>({props:{color:n},style:{backgroundColor:(e.vars||e).palette[n].main,color:(e.vars||e).palette[n].contrastText,[`& .${Mn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].contrastTextChannel} / 0.7)`:jt(e.palette[n].contrastText,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].contrastText}}}})),{props:n=>n.iconColor===n.color,style:{[`& .${Mn.icon}`]:{color:e.vars?e.vars.palette.Chip.defaultIconColor:t}}},{props:n=>n.iconColor===n.color&&n.color!=="default",style:{[`& .${Mn.icon}`]:{color:"inherit"}}},{props:{onDelete:!0},style:{[`&.${Mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:jt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}},...Object.entries(e.palette).filter(Xn(["dark"])).map(([n])=>({props:{color:n,onDelete:!0},style:{[`&.${Mn.focusVisible}`]:{background:(e.vars||e).palette[n].dark}}})),{props:{clickable:!0},style:{userSelect:"none",WebkitTapHighlightColor:"transparent",cursor:"pointer","&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:jt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity)},[`&.${Mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.action.selectedChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:jt(e.palette.action.selected,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)},"&:active":{boxShadow:(e.vars||e).shadows[1]}}},...Object.entries(e.palette).filter(Xn(["dark"])).map(([n])=>({props:{color:n,clickable:!0},style:{[`&:hover, &.${Mn.focusVisible}`]:{backgroundColor:(e.vars||e).palette[n].dark}}})),{props:{variant:"outlined"},style:{backgroundColor:"transparent",border:e.vars?`1px solid ${e.vars.palette.Chip.defaultBorder}`:`1px solid ${e.palette.mode==="light"?e.palette.grey[400]:e.palette.grey[700]}`,[`&.${Mn.clickable}:hover`]:{backgroundColor:(e.vars||e).palette.action.hover},[`&.${Mn.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`& .${Mn.avatar}`]:{marginLeft:4},[`& .${Mn.avatarSmall}`]:{marginLeft:2},[`& .${Mn.icon}`]:{marginLeft:4},[`& .${Mn.iconSmall}`]:{marginLeft:2},[`& .${Mn.deleteIcon}`]:{marginRight:5},[`& .${Mn.deleteIconSmall}`]:{marginRight:3}}},...Object.entries(e.palette).filter(Xn()).map(([n])=>({props:{variant:"outlined",color:n},style:{color:(e.vars||e).palette[n].main,border:`1px solid ${e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:jt(e.palette[n].main,.7)}`,[`&.${Mn.clickable}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:jt(e.palette[n].main,e.palette.action.hoverOpacity)},[`&.${Mn.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette[n].mainChannel} / ${e.vars.palette.action.focusOpacity})`:jt(e.palette[n].main,e.palette.action.focusOpacity)},[`& .${Mn.deleteIcon}`]:{color:e.vars?`rgba(${e.vars.palette[n].mainChannel} / 0.7)`:jt(e.palette[n].main,.7),"&:hover, &:active":{color:(e.vars||e).palette[n].main}}}}))]}})),Dxe=He("span",{name:"MuiChip",slot:"Label",overridesResolver:(e,t)=>{const{ownerState:n}=e,{size:r}=n;return[t.label,t[`label${rt(r)}`]]}})({overflow:"hidden",textOverflow:"ellipsis",paddingLeft:12,paddingRight:12,whiteSpace:"nowrap",variants:[{props:{variant:"outlined"},style:{paddingLeft:11,paddingRight:11}},{props:{size:"small"},style:{paddingLeft:8,paddingRight:8}},{props:{size:"small",variant:"outlined"},style:{paddingLeft:7,paddingRight:7}}]});function x$(e){return e.key==="Backspace"||e.key==="Delete"}const us=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiChip"}),{avatar:i,className:o,clickable:s,color:a="default",component:l,deleteIcon:c,disabled:u=!1,icon:f,label:d,onClick:A,onDelete:p,onKeyDown:m,onKeyUp:b,size:v="medium",variant:g="filled",tabIndex:y,skipFocusWhenDisabled:w=!1,...x}=r,C=j.useRef(null),k=vr(C,n),F=K=>{K.stopPropagation(),p&&p(K)},L=K=>{K.currentTarget===K.target&&x$(K)&&K.preventDefault(),m&&m(K)},_=K=>{K.currentTarget===K.target&&p&&x$(K)&&p(K),b&&b(K)},T=s!==!1&&A?!0:s,E=T||p?ya:l||"div",I={...r,component:E,disabled:u,size:v,color:a,iconColor:j.isValidElement(f)&&f.props.color||a,onDelete:!!p,clickable:T,variant:g},N=Nxe(I),$=E===ya?{component:l||"div",focusVisibleClassName:N.focusVisible,...p&&{disableRipple:!0}}:{};let D=null;p&&(D=c&&j.isValidElement(c)?j.cloneElement(c,{className:ft(c.props.className,N.deleteIcon),onClick:F}):h.jsx(jxe,{className:ft(N.deleteIcon),onClick:F}));let V=null;i&&j.isValidElement(i)&&(V=j.cloneElement(i,{className:ft(N.avatar,i.props.className)}));let Y=null;return f&&j.isValidElement(f)&&(Y=j.cloneElement(f,{className:ft(N.icon,f.props.className)})),h.jsxs(Uxe,{as:E,className:ft(N.root,o),disabled:T&&u?!0:void 0,onClick:A,onKeyDown:L,onKeyUp:_,ref:k,tabIndex:w&&u?-1:y,ownerState:I,...$,...x,children:[V||Y,h.jsx(Dxe,{className:ft(N.label),ownerState:I,children:d}),D]})});function $xe(e){return Mt("MuiAutocomplete",e)}const Ln=Nt("MuiAutocomplete",["root","expanded","fullWidth","focused","focusVisible","tag","tagSizeSmall","tagSizeMedium","hasPopupIcon","hasClearIcon","inputRoot","input","inputFocused","endAdornment","clearIndicator","popupIndicator","popupIndicatorOpen","popper","popperDisablePortal","paper","listbox","loading","noOptions","option","groupLabel","groupUl"]);var C$,S$;const Qxe=e=>{const{classes:t,disablePortal:n,expanded:r,focused:i,fullWidth:o,hasClearIcon:s,hasPopupIcon:a,inputFocused:l,popupOpen:c,size:u}=e,f={root:["root",r&&"expanded",i&&"focused",o&&"fullWidth",s&&"hasClearIcon",a&&"hasPopupIcon"],inputRoot:["inputRoot"],input:["input",l&&"inputFocused"],tag:["tag",`tagSize${rt(u)}`],endAdornment:["endAdornment"],clearIndicator:["clearIndicator"],popupIndicator:["popupIndicator",c&&"popupIndicatorOpen"],popper:["popper",n&&"popperDisablePortal"],paper:["paper"],listbox:["listbox"],loading:["loading"],noOptions:["noOptions"],option:["option"],groupLabel:["groupLabel"],groupUl:["groupUl"]};return Dt(f,$xe,t)},Hxe=He("div",{name:"MuiAutocomplete",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{fullWidth:r,hasClearIcon:i,hasPopupIcon:o,inputFocused:s,size:a}=n;return[{[`& .${Ln.tag}`]:t.tag},{[`& .${Ln.tag}`]:t[`tagSize${rt(a)}`]},{[`& .${Ln.inputRoot}`]:t.inputRoot},{[`& .${Ln.input}`]:t.input},{[`& .${Ln.input}`]:s&&t.inputFocused},t.root,r&&t.fullWidth,o&&t.hasPopupIcon,i&&t.hasClearIcon]}})({[`&.${Ln.focused} .${Ln.clearIndicator}`]:{visibility:"visible"},"@media (pointer: fine)":{[`&:hover .${Ln.clearIndicator}`]:{visibility:"visible"}},[`& .${Ln.tag}`]:{margin:3,maxWidth:"calc(100% - 6px)"},[`& .${Ln.inputRoot}`]:{[`.${Ln.hasPopupIcon}&, .${Ln.hasClearIcon}&`]:{paddingRight:30},[`.${Ln.hasPopupIcon}.${Ln.hasClearIcon}&`]:{paddingRight:56},[`& .${Ln.input}`]:{width:0,minWidth:30}},[`& .${sA.root}`]:{paddingBottom:1,"& .MuiInput-input":{padding:"4px 4px 4px 0px"}},[`& .${sA.root}.${ra.sizeSmall}`]:{[`& .${sA.input}`]:{padding:"2px 4px 3px 0"}},[`& .${$a.root}`]:{padding:9,[`.${Ln.hasPopupIcon}&, .${Ln.hasClearIcon}&`]:{paddingRight:39},[`.${Ln.hasPopupIcon}.${Ln.hasClearIcon}&`]:{paddingRight:65},[`& .${Ln.input}`]:{padding:"7.5px 4px 7.5px 5px"},[`& .${Ln.endAdornment}`]:{right:9}},[`& .${$a.root}.${ra.sizeSmall}`]:{paddingTop:6,paddingBottom:6,paddingLeft:6,[`& .${Ln.input}`]:{padding:"2.5px 4px 2.5px 8px"}},[`& .${ia.root}`]:{paddingTop:19,paddingLeft:8,[`.${Ln.hasPopupIcon}&, .${Ln.hasClearIcon}&`]:{paddingRight:39},[`.${Ln.hasPopupIcon}.${Ln.hasClearIcon}&`]:{paddingRight:65},[`& .${ia.input}`]:{padding:"7px 4px"},[`& .${Ln.endAdornment}`]:{right:9}},[`& .${ia.root}.${ra.sizeSmall}`]:{paddingBottom:1,[`& .${ia.input}`]:{padding:"2.5px 4px"}},[`& .${ra.hiddenLabel}`]:{paddingTop:8},[`& .${ia.root}.${ra.hiddenLabel}`]:{paddingTop:0,paddingBottom:0,[`& .${Ln.input}`]:{paddingTop:16,paddingBottom:17}},[`& .${ia.root}.${ra.hiddenLabel}.${ra.sizeSmall}`]:{[`& .${Ln.input}`]:{paddingTop:8,paddingBottom:9}},[`& .${Ln.input}`]:{flexGrow:1,textOverflow:"ellipsis",opacity:0},variants:[{props:{fullWidth:!0},style:{width:"100%"}},{props:{size:"small"},style:{[`& .${Ln.tag}`]:{margin:2,maxWidth:"calc(100% - 4px)"}}},{props:{inputFocused:!0},style:{[`& .${Ln.input}`]:{opacity:1}}},{props:{multiple:!0},style:{[`& .${Ln.inputRoot}`]:{flexWrap:"wrap"}}}]}),zxe=He("div",{name:"MuiAutocomplete",slot:"EndAdornment",overridesResolver:(e,t)=>t.endAdornment})({position:"absolute",right:0,top:"50%",transform:"translate(0, -50%)"}),Vxe=He(fn,{name:"MuiAutocomplete",slot:"ClearIndicator",overridesResolver:(e,t)=>t.clearIndicator})({marginRight:-2,padding:4,visibility:"hidden"}),qxe=He(fn,{name:"MuiAutocomplete",slot:"PopupIndicator",overridesResolver:({ownerState:e},t)=>({...t.popupIndicator,...e.popupOpen&&t.popupIndicatorOpen})})({padding:2,marginRight:-2,variants:[{props:{popupOpen:!0},style:{transform:"rotate(180deg)"}}]}),Wxe=He(UE,{name:"MuiAutocomplete",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${Ln.option}`]:t.option},t.popper,n.disablePortal&&t.popperDisablePortal]}})(Rt(({theme:e})=>({zIndex:(e.vars||e).zIndex.modal,variants:[{props:{disablePortal:!0},style:{position:"absolute"}}]}))),Kxe=He(Tn,{name:"MuiAutocomplete",slot:"Paper",overridesResolver:(e,t)=>t.paper})(Rt(({theme:e})=>({...e.typography.body1,overflow:"auto"}))),Gxe=He("div",{name:"MuiAutocomplete",slot:"Loading",overridesResolver:(e,t)=>t.loading})(Rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Yxe=He("div",{name:"MuiAutocomplete",slot:"NoOptions",overridesResolver:(e,t)=>t.noOptions})(Rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,padding:"14px 16px"}))),Xxe=He("ul",{name:"MuiAutocomplete",slot:"Listbox",overridesResolver:(e,t)=>t.listbox})(Rt(({theme:e})=>({listStyle:"none",margin:0,padding:"8px 0",maxHeight:"40vh",overflow:"auto",position:"relative",[`& .${Ln.option}`]:{minHeight:48,display:"flex",overflow:"hidden",justifyContent:"flex-start",alignItems:"center",cursor:"pointer",paddingTop:6,boxSizing:"border-box",outline:"0",WebkitTapHighlightColor:"transparent",paddingBottom:6,paddingLeft:16,paddingRight:16,[e.breakpoints.up("sm")]:{minHeight:"auto"},[`&.${Ln.focused}`]:{backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},'&[aria-disabled="true"]':{opacity:(e.vars||e).palette.action.disabledOpacity,pointerEvents:"none"},[`&.${Ln.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},'&[aria-selected="true"]':{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:jt(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${Ln.focused}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:jt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:(e.vars||e).palette.action.selected}},[`&.${Ln.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:jt(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}}}}))),Jxe=He(s_,{name:"MuiAutocomplete",slot:"GroupLabel",overridesResolver:(e,t)=>t.groupLabel})(Rt(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,top:-8}))),Zxe=He("ul",{name:"MuiAutocomplete",slot:"GroupUl",overridesResolver:(e,t)=>t.groupUl})({padding:0,[`& .${Ln.option}`]:{paddingLeft:24}}),Ig=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiAutocomplete"}),{autoComplete:i=!1,autoHighlight:o=!1,autoSelect:s=!1,blurOnSelect:a=!1,ChipProps:l,className:c,clearIcon:u=C$||(C$=h.jsx(QJ,{fontSize:"small"})),clearOnBlur:f=!r.freeSolo,clearOnEscape:d=!1,clearText:A="Clear",closeText:p="Close",componentsProps:m,defaultValue:b=r.multiple?[]:null,disableClearable:v=!1,disableCloseOnSelect:g=!1,disabled:y=!1,disabledItemsFocusable:w=!1,disableListWrap:x=!1,disablePortal:C=!1,filterOptions:k,filterSelectedOptions:F=!1,forcePopupIcon:L="auto",freeSolo:_=!1,fullWidth:T=!1,getLimitTagsText:E=on=>`+${on}`,getOptionDisabled:I,getOptionKey:N,getOptionLabel:$,isOptionEqualToValue:D,groupBy:V,handleHomeEndKeys:Y=!r.freeSolo,id:K,includeInputInList:O=!1,inputValue:ne,limitTags:z=-1,ListboxComponent:R,ListboxProps:M,loading:H=!1,loadingText:U="Loading…",multiple:X=!1,noOptionsText:Z="No options",onChange:ue,onClose:ye,onHighlightChange:ee,onInputChange:J,onOpen:ce,open:_e,openOnFocus:be=!1,openText:se="Open",options:Me,PaperComponent:Oe,PopperComponent:Ee,popupIcon:Xe=S$||(S$=h.jsx(qJ,{})),readOnly:tt=!1,renderGroup:Ke,renderInput:Ne,renderOption:ve,renderTags:Be,selectOnFocus:xe=!r.freeSolo,size:Fe="medium",slots:Se={},slotProps:Re={},value:re,...B}=r,{getRootProps:q,getInputProps:le,getInputLabelProps:he,getPopupIndicatorProps:ae,getClearProps:pe,getTagProps:ie,getListboxProps:Ue,getOptionProps:At,value:W,dirty:je,expanded:ze,id:de,popupOpen:Ie,focused:We,focusedTag:Lt,anchorEl:at,setAnchorEl:Et,inputValue:cn,groupedOptions:Te}=Rxe({...r,componentName:"Autocomplete"}),$e=!v&&!y&&je&&!tt,Ye=(!_||L===!0)&&L!==!1,{onMouseDown:lt}=le(),{ref:xt,...kt}=Ue(),Ut=$||(on=>on.label??on),wt={...r,disablePortal:C,expanded:ze,focused:We,fullWidth:T,getOptionLabel:Ut,hasClearIcon:$e,hasPopupIcon:Ye,inputFocused:Lt===-1,popupOpen:Ie,size:Fe},bt=Qxe(wt),It={slots:{paper:Oe,popper:Ee,...Se},slotProps:{chip:l,listbox:M,...m,...Re}},[et,Ze]=Fr("listbox",{elementType:Xxe,externalForwardedProps:It,ownerState:wt,className:bt.listbox,additionalProps:kt,ref:xt}),[Bt,$t]=Fr("paper",{elementType:Tn,externalForwardedProps:It,ownerState:wt,className:bt.paper}),[Qt,An]=Fr("popper",{elementType:UE,externalForwardedProps:It,ownerState:wt,className:bt.popper,additionalProps:{disablePortal:C,style:{width:at?at.clientWidth:null},role:"presentation",anchorEl:at,open:Ie}});let Bn;if(X&&W.length>0){const on=oi=>({className:bt.tag,disabled:y,...ie(oi)});Be?Bn=Be(W,on,wt):Bn=W.map((oi,Xi)=>{const{key:Zn,...Ia}=on({index:Xi});return h.jsx(us,{label:Ut(oi),size:Fe,...Ia,...It.slotProps.chip},Zn)})}if(z>-1&&Array.isArray(Bn)){const on=Bn.length-z;!We&&on>0&&(Bn=Bn.splice(0,z),Bn.push(h.jsx("span",{className:bt.tag,children:E(on)},Bn.length)))}const gi=Ke||(on=>h.jsxs("li",{children:[h.jsx(Jxe,{className:bt.groupLabel,ownerState:wt,component:"div",children:on.group}),h.jsx(Zxe,{className:bt.groupUl,ownerState:wt,children:on.children})]},on.key)),Su=ve||((on,oi)=>{const{key:Xi,...Zn}=on;return h.jsx("li",{...Zn,children:Ut(oi)},Xi)}),Ea=(on,oi)=>{const Xi=At({option:on,index:oi});return Su({...Xi,className:bt.option},on,{selected:Xi["aria-selected"],index:oi,inputValue:cn},wt)},Qi=It.slotProps.clearIndicator,gs=It.slotProps.popupIndicator,ka=on=>h.jsx(Wxe,{as:Qt,...An,children:h.jsx(Kxe,{as:Bt,...$t,children:on})});let En=null;return Te.length>0?En=ka(h.jsx(et,{as:R,...Ze,children:Te.map((on,oi)=>V?gi({key:on.key,group:on.group,children:on.options.map((Xi,Zn)=>Ea(Xi,on.index+Zn))}):Ea(on,oi))})):H&&Te.length===0?En=ka(h.jsx(Gxe,{className:bt.loading,ownerState:wt,children:U})):Te.length===0&&!_&&!H&&(En=ka(h.jsx(Yxe,{className:bt.noOptions,ownerState:wt,role:"presentation",onMouseDown:on=>{on.preventDefault()},children:Z}))),h.jsxs(j.Fragment,{children:[h.jsx(Hxe,{ref:n,className:ft(bt.root,c),ownerState:wt,...q(B),children:Ne({id:de,disabled:y,fullWidth:!0,size:Fe==="small"?"small":void 0,InputLabelProps:he(),InputProps:{ref:Et,className:bt.inputRoot,startAdornment:Bn,onMouseDown:on=>{on.target===on.currentTarget&<(on)},...($e||Ye)&&{endAdornment:h.jsxs(zxe,{className:bt.endAdornment,ownerState:wt,children:[$e?h.jsx(Vxe,{...pe(),"aria-label":A,title:A,ownerState:wt,...Qi,className:ft(bt.clearIndicator,Qi==null?void 0:Qi.className),children:u}):null,Ye?h.jsx(qxe,{...ae(),disabled:y,"aria-label":Ie?p:se,title:Ie?p:se,ownerState:wt,...gs,className:ft(bt.popupIndicator,gs==null?void 0:gs.className),children:Xe}):null]})}},inputProps:{className:bt.input,disabled:y,readOnly:tt,...le()}})}),at?En:null]})});function e2e(e){return Mt("MuiCard",e)}Nt("MuiCard",["root"]);const t2e=e=>{const{classes:t}=e;return Dt({root:["root"]},e2e,t)},n2e=He(Tn,{name:"MuiCard",slot:"Root",overridesResolver:(e,t)=>t.root})({overflow:"hidden"}),ou=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiCard"}),{className:i,raised:o=!1,...s}=r,a={...r,raised:o},l=t2e(a);return h.jsx(n2e,{className:ft(l.root,i),elevation:o?8:void 0,ref:n,ownerState:a,...s})});function r2e(e){return Mt("MuiCardContent",e)}Nt("MuiCardContent",["root"]);const i2e=e=>{const{classes:t}=e;return Dt({root:["root"]},r2e,t)},o2e=He("div",{name:"MuiCardContent",slot:"Root",overridesResolver:(e,t)=>t.root})({padding:16,"&:last-child":{paddingBottom:24}}),HA=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiCardContent"}),{className:i,component:o="div",...s}=r,a={...r,component:o},l=i2e(a);return h.jsx(o2e,{as:o,className:ft(l.root,i),ownerState:a,ref:n,...s})});function s2e(e){return Mt("PrivateSwitchBase",e)}Nt("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const a2e=e=>{const{classes:t,checked:n,disabled:r,edge:i}=e,o={root:["root",n&&"checked",r&&"disabled",i&&`edge${rt(i)}`],input:["input"]};return Dt(o,s2e,t)},l2e=He(ya)({padding:9,borderRadius:"50%",variants:[{props:{edge:"start",size:"small"},style:{marginLeft:-3}},{props:({edge:e,ownerState:t})=>e==="start"&&t.size!=="small",style:{marginLeft:-12}},{props:{edge:"end",size:"small"},style:{marginRight:-3}},{props:({edge:e,ownerState:t})=>e==="end"&&t.size!=="small",style:{marginRight:-12}}]}),c2e=He("input",{shouldForwardProp:$i})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),vM=j.forwardRef(function(t,n){const{autoFocus:r,checked:i,checkedIcon:o,className:s,defaultChecked:a,disabled:l,disableFocusRipple:c=!1,edge:u=!1,icon:f,id:d,inputProps:A,inputRef:p,name:m,onBlur:b,onChange:v,onFocus:g,readOnly:y,required:w=!1,tabIndex:x,type:C,value:k,...F}=t,[L,_]=Kl({controlled:i,default:!!a,name:"SwitchBase",state:"checked"}),T=rc(),E=K=>{g&&g(K),T&&T.onFocus&&T.onFocus(K)},I=K=>{b&&b(K),T&&T.onBlur&&T.onBlur(K)},N=K=>{if(K.nativeEvent.defaultPrevented)return;const O=K.target.checked;_(O),v&&v(K,O)};let $=l;T&&typeof $>"u"&&($=T.disabled);const D=C==="checkbox"||C==="radio",V={...t,checked:L,disabled:$,disableFocusRipple:c,edge:u},Y=a2e(V);return h.jsxs(l2e,{component:"span",className:ft(Y.root,s),centerRipple:!0,focusRipple:!c,disabled:$,tabIndex:null,role:void 0,onFocus:E,onBlur:I,ownerState:V,ref:n,...F,children:[h.jsx(c2e,{autoFocus:r,checked:i,defaultChecked:a,className:Y.input,disabled:$,id:D?d:void 0,name:m,onChange:N,readOnly:y,ref:p,required:w,ownerState:V,tabIndex:x,type:C,...C==="checkbox"&&k===void 0?{}:{value:k},...A}),L?o:f]})}),u2e=zt(h.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),f2e=zt(h.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),A2e=zt(h.jsx("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");function d2e(e){return Mt("MuiCheckbox",e)}const FI=Nt("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),h2e=e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,o={root:["root",n&&"indeterminate",`color${rt(r)}`,`size${rt(i)}`]},s=Dt(o,d2e,t);return{...t,...s}},p2e=He(vM,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t[`size${rt(n.size)}`],n.color!=="default"&&t[`color${rt(n.color)}`]]}})(Rt(({theme:e})=>({color:(e.vars||e).palette.text.secondary,variants:[{props:{color:"default",disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette.action.activeChannel} / ${e.vars.palette.action.hoverOpacity})`:jt(e.palette.action.active,e.palette.action.hoverOpacity)}}},...Object.entries(e.palette).filter(Xn()).map(([t])=>({props:{color:t,disableRipple:!1},style:{"&:hover":{backgroundColor:e.vars?`rgba(${e.vars.palette[t].mainChannel} / ${e.vars.palette.action.hoverOpacity})`:jt(e.palette[t].main,e.palette.action.hoverOpacity)}}})),...Object.entries(e.palette).filter(Xn()).map(([t])=>({props:{color:t},style:{[`&.${FI.checked}, &.${FI.indeterminate}`]:{color:(e.vars||e).palette[t].main},[`&.${FI.disabled}`]:{color:(e.vars||e).palette.action.disabled}}})),{props:{disableRipple:!1},style:{"&:hover":{"@media (hover: none)":{backgroundColor:"transparent"}}}}]}))),g2e=h.jsx(f2e,{}),m2e=h.jsx(u2e,{}),v2e=h.jsx(A2e,{}),Ga=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiCheckbox"}),{checkedIcon:i=g2e,color:o="primary",icon:s=m2e,indeterminate:a=!1,indeterminateIcon:l=v2e,inputProps:c,size:u="medium",disableRipple:f=!1,className:d,...A}=r,p=a?l:s,m=a?l:i,b={...r,disableRipple:f,color:o,indeterminate:a,size:u},v=h2e(b);return h.jsx(p2e,{type:"checkbox",inputProps:{"data-indeterminate":a,...c},icon:j.cloneElement(p,{fontSize:p.props.fontSize??u}),checkedIcon:j.cloneElement(m,{fontSize:m.props.fontSize??u}),ownerState:b,ref:n,className:ft(v.root,d),disableRipple:f,...A,classes:v})});function _$(e){return e.substring(2).toLowerCase()}function y2e(e,t){return t.documentElement.clientWidth<e.clientX||t.documentElement.clientHeight<e.clientY}function b2e(e){const{children:t,disableReactTree:n=!1,mouseEvent:r="onClick",onClickAway:i,touchEvent:o="onTouchEnd"}=e,s=j.useRef(!1),a=j.useRef(null),l=j.useRef(!1),c=j.useRef(!1);j.useEffect(()=>(setTimeout(()=>{l.current=!0},0),()=>{l.current=!1}),[]);const u=vr(ud(t),a),f=Bi(p=>{const m=c.current;c.current=!1;const b=Ei(a.current);if(!l.current||!a.current||"clientX"in p&&y2e(p,b))return;if(s.current){s.current=!1;return}let v;p.composedPath?v=p.composedPath().includes(a.current):v=!b.documentElement.contains(p.target)||a.current.contains(p.target),!v&&(n||!m)&&i(p)}),d=p=>m=>{c.current=!0;const b=t.props[p];b&&b(m)},A={ref:u};return o!==!1&&(A[o]=d(o)),j.useEffect(()=>{if(o!==!1){const p=_$(o),m=Ei(a.current),b=()=>{s.current=!0};return m.addEventListener(p,f),m.addEventListener("touchmove",b),()=>{m.removeEventListener(p,f),m.removeEventListener("touchmove",b)}}},[f,o]),r!==!1&&(A[r]=d(r)),j.useEffect(()=>{if(r!==!1){const p=_$(r),m=Ei(a.current);return m.addEventListener(p,f),()=>{m.removeEventListener(p,f)}}},[f,r]),j.cloneElement(t,A)}const j1=Rme({createStyledComponent:He("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[`maxWidth${rt(String(n.maxWidth))}`],n.fixed&&t.fixed,n.disableGutters&&t.disableGutters]}}),useThemeProps:e=>Vt({props:e,name:"MuiContainer"})});function w2e(e){return Mt("MuiDialogContentText",e)}Nt("MuiDialogContentText",["root"]);const x2e=e=>{const{classes:t}=e,r=Dt({root:["root"]},w2e,t);return{...t,...r}},C2e=He(Le,{shouldForwardProp:e=>$i(e)||e==="classes",name:"MuiDialogContentText",slot:"Root",overridesResolver:(e,t)=>t.root})({}),yM=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDialogContentText"}),{children:i,className:o,...s}=r,a=x2e(s);return h.jsx(C2e,{component:"p",variant:"body1",color:"textSecondary",ref:n,ownerState:s,className:ft(a.root,o),...r,classes:a})});function S2e(e,t,n){const r=t.getBoundingClientRect(),i=n&&n.getBoundingClientRect(),o=Ds(t);let s;if(t.fakeTransform)s=t.fakeTransform;else{const c=o.getComputedStyle(t);s=c.getPropertyValue("-webkit-transform")||c.getPropertyValue("transform")}let a=0,l=0;if(s&&s!=="none"&&typeof s=="string"){const c=s.split("(")[1].split(")")[0].split(",");a=parseInt(c[4],10),l=parseInt(c[5],10)}return e==="left"?i?`translateX(${i.right+a-r.left}px)`:`translateX(${o.innerWidth+a-r.left}px)`:e==="right"?i?`translateX(-${r.right-i.left-a}px)`:`translateX(-${r.left+r.width-a}px)`:e==="up"?i?`translateY(${i.bottom+l-r.top}px)`:`translateY(${o.innerHeight+l-r.top}px)`:i?`translateY(-${r.top-i.top+r.height-l}px)`:`translateY(-${r.top+r.height-l}px)`}function _2e(e){return typeof e=="function"?e():e}function zx(e,t,n){const r=_2e(n),i=S2e(e,t,r);i&&(t.style.webkitTransform=i,t.style.transform=i)}const B2e=j.forwardRef(function(t,n){const r=fr(),i={enter:r.transitions.easing.easeOut,exit:r.transitions.easing.sharp},o={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:s,appear:a=!0,children:l,container:c,direction:u="down",easing:f=i,in:d,onEnter:A,onEntered:p,onEntering:m,onExit:b,onExited:v,onExiting:g,style:y,timeout:w=o,TransitionComponent:x=Cl,...C}=t,k=j.useRef(null),F=vr(ud(l),k,n),L=Y=>K=>{Y&&(K===void 0?Y(k.current):Y(k.current,K))},_=L((Y,K)=>{zx(u,Y,c),aM(Y),A&&A(Y,K)}),T=L((Y,K)=>{const O=QA({timeout:w,style:y,easing:f},{mode:"enter"});Y.style.webkitTransition=r.transitions.create("-webkit-transform",{...O}),Y.style.transition=r.transitions.create("transform",{...O}),Y.style.webkitTransform="none",Y.style.transform="none",m&&m(Y,K)}),E=L(p),I=L(g),N=L(Y=>{const K=QA({timeout:w,style:y,easing:f},{mode:"exit"});Y.style.webkitTransition=r.transitions.create("-webkit-transform",K),Y.style.transition=r.transitions.create("transform",K),zx(u,Y,c),b&&b(Y)}),$=L(Y=>{Y.style.webkitTransition="",Y.style.transition="",v&&v(Y)}),D=Y=>{s&&s(k.current,Y)},V=j.useCallback(()=>{k.current&&zx(u,k.current,c)},[u,c]);return j.useEffect(()=>{if(d||u==="down"||u==="right")return;const Y=qb(()=>{k.current&&zx(u,k.current,c)}),K=Ds(k.current);return K.addEventListener("resize",Y),()=>{Y.clear(),K.removeEventListener("resize",Y)}},[u,d,c]),j.useEffect(()=>{d||V()},[d,V]),h.jsx(x,{nodeRef:k,onEnter:_,onEntered:E,onEntering:T,onExit:N,onExited:$,onExiting:I,addEndListener:D,appear:a,in:d,timeout:w,...C,children:(Y,K)=>j.cloneElement(l,{ref:F,style:{visibility:Y==="exited"&&!d?"hidden":void 0,...y,...l.props.style},...K})})});function E2e(e){return Mt("MuiDrawer",e)}Nt("MuiDrawer",["root","docked","paper","paperAnchorLeft","paperAnchorRight","paperAnchorTop","paperAnchorBottom","paperAnchorDockedLeft","paperAnchorDockedRight","paperAnchorDockedTop","paperAnchorDockedBottom","modal"]);const XJ=(e,t)=>{const{ownerState:n}=e;return[t.root,(n.variant==="permanent"||n.variant==="persistent")&&t.docked,t.modal]},k2e=e=>{const{classes:t,anchor:n,variant:r}=e,i={root:["root"],docked:[(r==="permanent"||r==="persistent")&&"docked"],modal:["modal"],paper:["paper",`paperAnchor${rt(n)}`,r!=="temporary"&&`paperAnchorDocked${rt(n)}`]};return Dt(i,E2e,t)},I2e=He(Zb,{name:"MuiDrawer",slot:"Root",overridesResolver:XJ})(Rt(({theme:e})=>({zIndex:(e.vars||e).zIndex.drawer}))),B$=He("div",{shouldForwardProp:$i,name:"MuiDrawer",slot:"Docked",skipVariantsResolver:!1,overridesResolver:XJ})({flex:"0 0 auto"}),F2e=He(Tn,{name:"MuiDrawer",slot:"Paper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.paper,t[`paperAnchor${rt(n.anchor)}`],n.variant!=="temporary"&&t[`paperAnchorDocked${rt(n.anchor)}`]]}})(Rt(({theme:e})=>({overflowY:"auto",display:"flex",flexDirection:"column",height:"100%",flex:"1 0 auto",zIndex:(e.vars||e).zIndex.drawer,WebkitOverflowScrolling:"touch",position:"fixed",top:0,outline:0,variants:[{props:{anchor:"left"},style:{left:0}},{props:{anchor:"top"},style:{top:0,left:0,right:0,height:"auto",maxHeight:"100%"}},{props:{anchor:"right"},style:{right:0}},{props:{anchor:"bottom"},style:{top:"auto",left:0,bottom:0,right:0,height:"auto",maxHeight:"100%"}},{props:({ownerState:t})=>t.anchor==="left"&&t.variant!=="temporary",style:{borderRight:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="top"&&t.variant!=="temporary",style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="right"&&t.variant!=="temporary",style:{borderLeft:`1px solid ${(e.vars||e).palette.divider}`}},{props:({ownerState:t})=>t.anchor==="bottom"&&t.variant!=="temporary",style:{borderTop:`1px solid ${(e.vars||e).palette.divider}`}}]}))),JJ={left:"right",right:"left",top:"down",bottom:"up"};function T2e(e){return["left","right"].includes(e)}function R2e({direction:e},t){return e==="rtl"&&T2e(t)?JJ[t]:t}const a_=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiDrawer"}),i=fr(),o=gu(),s={enter:i.transitions.duration.enteringScreen,exit:i.transitions.duration.leavingScreen},{anchor:a="left",BackdropProps:l,children:c,className:u,elevation:f=16,hideBackdrop:d=!1,ModalProps:{BackdropProps:A,...p}={},onClose:m,open:b=!1,PaperProps:v={},SlideProps:g,TransitionComponent:y=B2e,transitionDuration:w=s,variant:x="temporary",...C}=r,k=j.useRef(!1);j.useEffect(()=>{k.current=!0},[]);const F=R2e({direction:o?"rtl":"ltr"},a),_={...r,anchor:a,elevation:f,open:b,variant:x,...C},T=k2e(_),E=h.jsx(F2e,{elevation:x==="temporary"?f:0,square:!0,...v,className:ft(T.paper,v.className),ownerState:_,children:c});if(x==="permanent")return h.jsx(B$,{className:ft(T.root,T.docked,u),ownerState:_,ref:n,...C,children:E});const I=h.jsx(y,{in:b,direction:JJ[F],timeout:w,appear:k.current,...g,children:E});return x==="persistent"?h.jsx(B$,{className:ft(T.root,T.docked,u),ownerState:_,ref:n,...C,children:I}):h.jsx(I2e,{BackdropProps:{...l,...A,transitionDuration:w},className:ft(T.root,T.modal,u),open:b,ownerState:_,onClose:m,hideBackdrop:d,ref:n,...C,...p,children:I})});function P2e(e){return Mt("MuiFab",e)}const E$=Nt("MuiFab",["root","primary","secondary","extended","circular","focusVisible","disabled","colorInherit","sizeSmall","sizeMedium","sizeLarge","info","error","warning","success"]),L2e=e=>{const{color:t,variant:n,classes:r,size:i}=e,o={root:["root",n,`size${rt(i)}`,t==="inherit"?"colorInherit":t]},s=Dt(o,P2e,r);return{...r,...s}},O2e=He(ya,{name:"MuiFab",slot:"Root",shouldForwardProp:e=>$i(e)||e==="classes",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t[`size${rt(n.size)}`],n.color==="inherit"&&t.colorInherit,t[rt(n.size)],t[n.color]]}})(Rt(({theme:e})=>{var t,n;return{...e.typography.button,minHeight:36,transition:e.transitions.create(["background-color","box-shadow","border-color"],{duration:e.transitions.duration.short}),borderRadius:"50%",padding:0,minWidth:0,width:56,height:56,zIndex:(e.vars||e).zIndex.fab,boxShadow:(e.vars||e).shadows[6],"&:active":{boxShadow:(e.vars||e).shadows[12]},color:e.vars?e.vars.palette.text.primary:(n=(t=e.palette).getContrastText)==null?void 0:n.call(t,e.palette.grey[300]),backgroundColor:(e.vars||e).palette.grey[300],"&:hover":{backgroundColor:(e.vars||e).palette.grey.A100,"@media (hover: none)":{backgroundColor:(e.vars||e).palette.grey[300]},textDecoration:"none"},[`&.${E$.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},variants:[{props:{size:"small"},style:{width:40,height:40}},{props:{size:"medium"},style:{width:48,height:48}},{props:{variant:"extended"},style:{borderRadius:48/2,padding:"0 16px",width:"auto",minHeight:"auto",minWidth:48,height:48}},{props:{variant:"extended",size:"small"},style:{width:"auto",padding:"0 8px",borderRadius:34/2,minWidth:34,height:34}},{props:{variant:"extended",size:"medium"},style:{width:"auto",padding:"0 16px",borderRadius:40/2,minWidth:40,height:40}},{props:{color:"inherit"},style:{color:"inherit"}}]}}),Rt(({theme:e})=>({variants:[...Object.entries(e.palette).filter(Xn(["dark","contrastText"])).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].contrastText,backgroundColor:(e.vars||e).palette[t].main,"&:hover":{backgroundColor:(e.vars||e).palette[t].dark,"@media (hover: none)":{backgroundColor:(e.vars||e).palette[t].main}}}}))]})),Rt(({theme:e})=>({[`&.${E$.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}))),k$=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFab"}),{children:i,className:o,color:s="default",component:a="button",disabled:l=!1,disableFocusRipple:c=!1,focusVisibleClassName:u,size:f="large",variant:d="circular",...A}=r,p={...r,color:s,component:a,disabled:l,disableFocusRipple:c,size:f,variant:d},m=L2e(p);return h.jsx(O2e,{className:ft(m.root,o),component:a,disabled:l,focusRipple:!c,focusVisibleClassName:ft(m.focusVisible,u),ownerState:p,ref:n,...A,classes:m,children:i})});function j2e(e){return Mt("MuiFormControlLabel",e)}const sy=Nt("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),M2e=e=>{const{classes:t,disabled:n,labelPlacement:r,error:i,required:o}=e,s={root:["root",n&&"disabled",`labelPlacement${rt(r)}`,i&&"error",o&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",i&&"error"]};return Dt(s,j2e,t)},N2e=He("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`& .${sy.label}`]:t.label},t.root,t[`labelPlacement${rt(n.labelPlacement)}`]]}})(Rt(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${sy.disabled}`]:{cursor:"default"},[`& .${sy.label}`]:{[`&.${sy.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:t})=>t==="start"||t==="top"||t==="bottom",style:{marginLeft:16}}]}))),U2e=He("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})(Rt(({theme:e})=>({[`&.${sy.error}`]:{color:(e.vars||e).palette.error.main}}))),Ho=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFormControlLabel"}),{checked:i,className:o,componentsProps:s={},control:a,disabled:l,disableTypography:c,inputRef:u,label:f,labelPlacement:d="end",name:A,onChange:p,required:m,slots:b={},slotProps:v={},value:g,...y}=r,w=rc(),x=l??a.props.disabled??(w==null?void 0:w.disabled),C=m??a.props.required,k={disabled:x,required:C};["checked","name","onChange","value","inputRef"].forEach($=>{typeof a.props[$]>"u"&&typeof r[$]<"u"&&(k[$]=r[$])});const F=dd({props:r,muiFormControl:w,states:["error"]}),L={...r,disabled:x,labelPlacement:d,required:C,error:F.error},_=M2e(L),T={slots:b,slotProps:{...s,...v}},[E,I]=Fr("typography",{elementType:Le,externalForwardedProps:T,ownerState:L});let N=f;return N!=null&&N.type!==Le&&!c&&(N=h.jsx(E,{component:"span",...I,className:ft(_.label,I==null?void 0:I.className),children:N})),h.jsxs(N2e,{className:ft(_.root,o),ownerState:L,ref:n,...y,children:[j.cloneElement(a,k),C?h.jsxs("div",{children:[N,h.jsxs(U2e,{ownerState:L,"aria-hidden":!0,className:_.asterisk,children:[" ","*"]})]}):N]})});function D2e(e){return Mt("MuiFormGroup",e)}Nt("MuiFormGroup",["root","row","error"]);const $2e=e=>{const{classes:t,row:n,error:r}=e;return Dt({root:["root",n&&"row",r&&"error"]},D2e,t)},Q2e=He("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.row&&t.row]}})({display:"flex",flexDirection:"column",flexWrap:"wrap",variants:[{props:{row:!0},style:{flexDirection:"row"}}]}),H2e=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiFormGroup"}),{className:i,row:o=!1,...s}=r,a=rc(),l=dd({props:r,muiFormControl:a,states:["error"]}),c={...r,row:o,error:l.error},u=$2e(c);return h.jsx(Q2e,{className:ft(u.root,i),ownerState:c,ref:n,...s})}),I$=j.createContext();function z2e(e){return Mt("MuiGrid",e)}const V2e=[0,1,2,3,4,5,6,7,8,9,10],q2e=["column-reverse","column","row-reverse","row"],W2e=["nowrap","wrap-reverse","wrap"],Sv=["auto",!0,1,2,3,4,5,6,7,8,9,10,11,12],M1=Nt("MuiGrid",["root","container","item","zeroMinWidth",...V2e.map(e=>`spacing-xs-${e}`),...q2e.map(e=>`direction-xs-${e}`),...W2e.map(e=>`wrap-xs-${e}`),...Sv.map(e=>`grid-xs-${e}`),...Sv.map(e=>`grid-sm-${e}`),...Sv.map(e=>`grid-md-${e}`),...Sv.map(e=>`grid-lg-${e}`),...Sv.map(e=>`grid-xl-${e}`)]);function K2e({theme:e,ownerState:t}){let n;return e.breakpoints.keys.reduce((r,i)=>{let o={};if(t[i]&&(n=t[i]),!n)return r;if(n===!0)o={flexBasis:0,flexGrow:1,maxWidth:"100%"};else if(n==="auto")o={flexBasis:"auto",flexGrow:0,flexShrink:0,maxWidth:"none",width:"auto"};else{const s=mh({values:t.columns,breakpoints:e.breakpoints.values}),a=typeof s=="object"?s[i]:s;if(a==null)return r;const l=`${Math.round(n/a*1e8)/1e6}%`;let c={};if(t.container&&t.item&&t.columnSpacing!==0){const u=e.spacing(t.columnSpacing);if(u!=="0px"){const f=`calc(${l} + ${u})`;c={flexBasis:f,maxWidth:f}}}o={flexBasis:l,flexGrow:0,maxWidth:l,...c}}return e.breakpoints.values[i]===0?Object.assign(r,o):r[e.breakpoints.up(i)]=o,r},{})}function G2e({theme:e,ownerState:t}){const n=mh({values:t.direction,breakpoints:e.breakpoints.values});return $s({theme:e},n,r=>{const i={flexDirection:r};return r.startsWith("column")&&(i[`& > .${M1.item}`]={maxWidth:"none"}),i})}function ZJ({breakpoints:e,values:t}){let n="";Object.keys(t).forEach(i=>{n===""&&t[i]!==0&&(n=i)});const r=Object.keys(e).sort((i,o)=>e[i]-e[o]);return r.slice(0,r.indexOf(n))}function Y2e({theme:e,ownerState:t}){const{container:n,rowSpacing:r}=t;let i={};if(n&&r!==0){const o=mh({values:r,breakpoints:e.breakpoints.values});let s;typeof o=="object"&&(s=ZJ({breakpoints:e.breakpoints.values,values:o})),i=$s({theme:e},o,(a,l)=>{const c=e.spacing(a);return c!=="0px"?{marginTop:`-${c}`,[`& > .${M1.item}`]:{paddingTop:c}}:s!=null&&s.includes(l)?{}:{marginTop:0,[`& > .${M1.item}`]:{paddingTop:0}}})}return i}function X2e({theme:e,ownerState:t}){const{container:n,columnSpacing:r}=t;let i={};if(n&&r!==0){const o=mh({values:r,breakpoints:e.breakpoints.values});let s;typeof o=="object"&&(s=ZJ({breakpoints:e.breakpoints.values,values:o})),i=$s({theme:e},o,(a,l)=>{const c=e.spacing(a);if(c!=="0px"){const u=`-${c}`;return{width:`calc(100% + ${c})`,marginLeft:u,[`& > .${M1.item}`]:{paddingLeft:c}}}return s!=null&&s.includes(l)?{}:{width:"100%",marginLeft:0,[`& > .${M1.item}`]:{paddingLeft:0}}})}return i}function J2e(e,t,n={}){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[n[`spacing-xs-${String(e)}`]];const r=[];return t.forEach(i=>{const o=e[i];Number(o)>0&&r.push(n[`spacing-${i}-${String(o)}`])}),r}const Z2e=He("div",{name:"MuiGrid",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e,{container:r,direction:i,item:o,spacing:s,wrap:a,zeroMinWidth:l,breakpoints:c}=n;let u=[];r&&(u=J2e(s,c,t));const f=[];return c.forEach(d=>{const A=n[d];A&&f.push(t[`grid-${d}-${String(A)}`])}),[t.root,r&&t.container,o&&t.item,l&&t.zeroMinWidth,...u,i!=="row"&&t[`direction-xs-${String(i)}`],a!=="wrap"&&t[`wrap-xs-${String(a)}`],...f]}})(({ownerState:e})=>({boxSizing:"border-box",...e.container&&{display:"flex",flexWrap:"wrap",width:"100%"},...e.item&&{margin:0},...e.zeroMinWidth&&{minWidth:0},...e.wrap!=="wrap"&&{flexWrap:e.wrap}}),G2e,Y2e,X2e,K2e);function eCe(e,t){if(!e||e<=0)return[];if(typeof e=="string"&&!Number.isNaN(Number(e))||typeof e=="number")return[`spacing-xs-${String(e)}`];const n=[];return t.forEach(r=>{const i=e[r];if(Number(i)>0){const o=`spacing-${r}-${String(i)}`;n.push(o)}}),n}const tCe=e=>{const{classes:t,container:n,direction:r,item:i,spacing:o,wrap:s,zeroMinWidth:a,breakpoints:l}=e;let c=[];n&&(c=eCe(o,l));const u=[];l.forEach(d=>{const A=e[d];A&&u.push(`grid-${d}-${String(A)}`)});const f={root:["root",n&&"container",i&&"item",a&&"zeroMinWidth",...c,r!=="row"&&`direction-xs-${String(r)}`,s!=="wrap"&&`wrap-xs-${String(s)}`,...u]};return Dt(f,z2e,t)},rr=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiGrid"}),{breakpoints:i}=fr(),o=yE(r),{className:s,columns:a,columnSpacing:l,component:c="div",container:u=!1,direction:f="row",item:d=!1,rowSpacing:A,spacing:p=0,wrap:m="wrap",zeroMinWidth:b=!1,...v}=o,g=A||p,y=l||p,w=j.useContext(I$),x=u?a||12:w,C={},k={...v};i.keys.forEach(_=>{v[_]!=null&&(C[_]=v[_],delete k[_])});const F={...o,columns:x,container:u,direction:f,item:d,rowSpacing:g,columnSpacing:y,wrap:m,zeroMinWidth:b,spacing:p,...C,breakpoints:i.keys},L=tCe(F);return h.jsx(I$.Provider,{value:x,children:h.jsx(Z2e,{ownerState:F,className:ft(L.root,s),as:c,ref:n,...k})})});function nCe(e){return Mt("MuiInputAdornment",e)}const F$=Nt("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]);var T$;const rCe=(e,t)=>{const{ownerState:n}=e;return[t.root,t[`position${rt(n.position)}`],n.disablePointerEvents===!0&&t.disablePointerEvents,t[n.variant]]},iCe=e=>{const{classes:t,disablePointerEvents:n,hiddenLabel:r,position:i,size:o,variant:s}=e,a={root:["root",n&&"disablePointerEvents",i&&`position${rt(i)}`,s,r&&"hiddenLabel",o&&`size${rt(o)}`]};return Dt(a,nCe,t)},oCe=He("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:rCe})(Rt(({theme:e})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(e.vars||e).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${F$.positionStart}&:not(.${F$.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),R$=j.forwardRef(function(t,n){const r=Vt({props:t,name:"MuiInputAdornment"}),{children:i,className:o,component:s="div",disablePointerEvents:a=!1,disableTypography:l=!1,position:c,variant:u,...f}=r,d=rc()||{};let A=u;u&&d.variant,d&&!A&&(A=d.variant);const p={...r,hiddenLabel:d.hiddenLabel,size:d.size,disablePointerEvents:a,position:c,variant:A},m=iCe(p);return h.jsx($E.Provider,{value:null,children:h.jsx(oCe,{as:s,ownerState:p,className:ft(m.root,o),ref:n,...f,children:typeof i=="string"&&!l?h.jsx(Le,{color:"textSecondary",children:i}):h.jsxs(j.Fragment,{children:[c==="start"?T$||(T$=h.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):null,i]})})})});function sCe(e){return Mt("MuiLinearProgress",e)}const P$=Nt("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","dashedColorPrimary","dashedColorSecondary","bar","barColorPrimary","barColorSecondary","bar1Indeterminate","bar1Determinate","bar1Buffer","bar2Indeterminate","bar2Buffer"]),_P=4,BP=fd`
|
|
226
226
|
0% {
|
|
227
227
|
left: -35%;
|
|
228
228
|
right: 100%;
|
|
@@ -430,11 +430,11 @@ Found: ${n.toString().split(`
|
|
|
430
430
|
`))}},{key:"_onEvent",value:function(K,O){function ne(z){K==="error"&&!this.transports.includes(O)&&this.add(O),this.emit(K,z,O)}O["__winston"+K]||(O["__winston"+K]=ne.bind(this),O.on(K,O["__winston"+K]))}},{key:"_addDefaultMeta",value:function(K){this.defaultMeta&&Object.assign(K,this.defaultMeta)}}])}(b);function $(D,V){var Y=D[V];return!Y&&Y!==0?null:Y}return Object.defineProperty(N.prototype,"transports",{configurable:!1,enumerable:!0,get:function(){var V=this._readableState.pipes;return Array.isArray(V)?V:[V].filter(Boolean)}}),xF=N,xF}function IL(e){"@babel/helpers - typeof";return IL=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},IL(e)}function p3e(e,t,n){return Object.defineProperty(e,"prototype",{writable:!1}),e}function g3e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m3e(e,t,n){return t=F_(t),v3e(e,Dne()?Reflect.construct(t,n||[],F_(e).constructor):t.apply(e,n))}function v3e(e,t){if(t&&(IL(t)=="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y3e(e)}function y3e(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Dne(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(Dne=function(){return!!e})()}function F_(e){return F_=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},F_(e)}function b3e(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&FL(e,t)}function FL(e,t){return FL=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},FL(e,t)}var w3e=ii,x3e=w3e.LEVEL,C3e=ep,S3e=gN(),_3e=u5("winston:create-logger");function B3e(e){return"is"+e.charAt(0).toUpperCase()+e.slice(1)+"Enabled"}var $ne=function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};e.levels=e.levels||C3e.npm.levels;var t=function(r){function i(o){return g3e(this,i),m3e(this,i,[o])}return b3e(i,r),p3e(i)}(S3e),n=new t(e);return Object.keys(e.levels).forEach(function(r){if(_3e('Define prototype method for "%s"',r),r==="log"){console.warn('Level "log" not defined: conflicts with the method "log". Use a different level name.');return}t.prototype[r]=function(){for(var i=this||n,o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];if(s.length===1){var l=s[0],c=l&&l.message&&l||{message:l};return c.level=c[x3e]=r,i._addDefaultMeta(c),i.write(c),this||n}return s.length===0?(i.log(r,""),i):i.log.apply(i,[r].concat(s))},t.prototype[B3e(r)]=function(){return(this||n).isLevelEnabled(r)}}),n};function nb(e){"@babel/helpers - typeof";return nb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},nb(e)}function E3e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function k3e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,F3e(r.key),r)}}function I3e(e,t,n){return t&&k3e(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function F3e(e){var t=T3e(e,"string");return nb(t)=="symbol"?t:t+""}function T3e(e,t){if(nb(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(nb(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}var R3e=$ne,P3e=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};E3e(this,e),this.loggers=new Map,this.options=t}return I3e(e,[{key:"add",value:function(n,r){var i=this;if(!this.loggers.has(n)){r=Object.assign({},r||this.options);var o=r.transports||this.options.transports;o?r.transports=Array.isArray(o)?o.slice():[o]:r.transports=[];var s=R3e(r);s.on("close",function(){return i._delete(n)}),this.loggers.set(n,s)}return this.loggers.get(n)}},{key:"get",value:function(n,r){return this.add(n,r)}},{key:"has",value:function(n){return!!this.loggers.has(n)}},{key:"close",value:function(n){var r=this;if(n)return this._removeLogger(n);this.loggers.forEach(function(i,o){return r._removeLogger(o)})}},{key:"_removeLogger",value:function(n){if(this.loggers.has(n)){var r=this.loggers.get(n);r.close(),this._delete(n)}}},{key:"_delete",value:function(n){this.loggers.delete(n)}}])}();(function(e){var t=e5,n=KM,r=n.warn;e.version=eTe.version,e.transports=dte,e.config=ep,e.addColors=t.levels,e.format=t.format,e.createLogger=$ne,e.Logger=gN(),e.ExceptionHandler=Rne,e.RejectionHandler=Lne,e.Container=P3e,e.Transport=fw,e.loggers=new e.Container;var i=e.createLogger();Object.keys(e.config.npm.levels).concat(["log","query","stream","add","remove","clear","profile","startTimer","handleExceptions","unhandleExceptions","handleRejections","unhandleRejections","configure","child"]).forEach(function(o){return e[o]=function(){return i[o].apply(i,arguments)}}),Object.defineProperty(e,"level",{get:function(){return i.level},set:function(s){i.level=s}}),Object.defineProperty(e,"exceptions",{get:function(){return i.exceptions}}),Object.defineProperty(e,"rejections",{get:function(){return i.rejections}}),["exitOnError"].forEach(function(o){Object.defineProperty(e,o,{get:function(){return i[o]},set:function(a){i[o]=a}})}),Object.defineProperty(e,"default",{get:function(){return{exceptionHandlers:i.exceptionHandlers,rejectionHandlers:i.rejectionHandlers,transports:i.transports}}}),r.deprecated(e,"setLevels"),r.forFunctions(e,"useFormat",["cli"]),r.forProperties(e,"useFormat",["padLevels","stripColors"]),r.forFunctions(e,"deprecated",["addRewriter","addFilter","clone","extend"]),r.forProperties(e,"deprecated",["emitErrs","levelLength"])})(kee);const Dc=Xr(kee);var L3e={};function TL(e,t){const n=L3e[e];return n===void 0?t:n}const O3e={error:0,warn:1,info:2,debug:3},j3e=Dc.format.printf(e=>{const t=e.message;if(e.level==="error")return HI.red(t);if(e.level==="warn")return HI.yellow(t);if(e.level==="info")return t;if(e.level==="debug")return HI.cyan(t);throw new Error(`Invalid log level: ${e.level}`)}),M3e=Dc.format.printf(e=>{const t=new Date().toISOString(),n=e.location?` ${e.location}`:"";return`${t} [${e.level.toUpperCase()}]${n}: ${e.message}`}),VC=Dc.createLogger({levels:O3e,transports:[new Dc.transports.Console({level:TL("LOG_LEVEL","info"),format:Dc.format.combine(Dc.format.simple(),j3e)})]});TL("PROMPTFOO_DISABLE_ERROR_LOG","")||VC.on("data",e=>{if(e.level==="error"&&!VC.transports.some(t=>t instanceof Dc.transports.File)){const t=new Dc.transports.File({filename:P5e.join(TL("PROMPTFOO_LOG_DIR","."),"promptfoo-errors.log"),level:"error",format:Dc.format.combine(Dc.format.simple(),M3e)});VC.add(t),t.write(e)}});var Gn;(function(e){e.assertEqual=i=>i;function t(i){}e.assertIs=t;function n(i){throw new Error}e.assertNever=n,e.arrayToEnum=i=>{const o={};for(const s of i)o[s]=s;return o},e.getValidEnumValues=i=>{const o=e.objectKeys(i).filter(a=>typeof i[i[a]]!="number"),s={};for(const a of o)s[a]=i[a];return e.objectValues(s)},e.objectValues=i=>e.objectKeys(i).map(function(o){return i[o]}),e.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const o=[];for(const s in i)Object.prototype.hasOwnProperty.call(i,s)&&o.push(s);return o},e.find=(i,o)=>{for(const s of i)if(o(s))return s},e.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,o=" | "){return i.map(s=>typeof s=="string"?`'${s}'`:s).join(o)}e.joinValues=r,e.jsonStringifyReplacer=(i,o)=>typeof o=="bigint"?o.toString():o})(Gn||(Gn={}));var RL;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(RL||(RL={}));const Zt=Gn.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Wu=e=>{switch(typeof e){case"undefined":return Zt.undefined;case"string":return Zt.string;case"number":return isNaN(e)?Zt.nan:Zt.number;case"boolean":return Zt.boolean;case"function":return Zt.function;case"bigint":return Zt.bigint;case"symbol":return Zt.symbol;case"object":return Array.isArray(e)?Zt.array:e===null?Zt.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?Zt.promise:typeof Map<"u"&&e instanceof Map?Zt.map:typeof Set<"u"&&e instanceof Set?Zt.set:typeof Date<"u"&&e instanceof Date?Zt.date:Zt.object;default:return Zt.unknown}},Ft=Gn.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"]),N3e=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class pa extends Error{get errors(){return this.issues}constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}format(t){const n=t||function(o){return o.message},r={_errors:[]},i=o=>{for(const s of o.issues)if(s.code==="invalid_union")s.unionErrors.map(i);else if(s.code==="invalid_return_type")i(s.returnTypeError);else if(s.code==="invalid_arguments")i(s.argumentsError);else if(s.path.length===0)r._errors.push(n(s));else{let a=r,l=0;for(;l<s.path.length;){const c=s.path[l];l===s.path.length-1?(a[c]=a[c]||{_errors:[]},a[c]._errors.push(n(s))):a[c]=a[c]||{_errors:[]},a=a[c],l++}}};return i(this),r}static assert(t){if(!(t instanceof pa))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Gn.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}pa.create=e=>new pa(e);const Dm=(e,t)=>{let n;switch(e.code){case Ft.invalid_type:e.received===Zt.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case Ft.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Gn.jsonStringifyReplacer)}`;break;case Ft.unrecognized_keys:n=`Unrecognized key(s) in object: ${Gn.joinValues(e.keys,", ")}`;break;case Ft.invalid_union:n="Invalid input";break;case Ft.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Gn.joinValues(e.options)}`;break;case Ft.invalid_enum_value:n=`Invalid enum value. Expected ${Gn.joinValues(e.options)}, received '${e.received}'`;break;case Ft.invalid_arguments:n="Invalid function arguments";break;case Ft.invalid_return_type:n="Invalid function return type";break;case Ft.invalid_date:n="Invalid date";break;case Ft.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Gn.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case Ft.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case Ft.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case Ft.custom:n="Invalid input";break;case Ft.invalid_intersection_types:n="Intersection results could not be merged";break;case Ft.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case Ft.not_finite:n="Number must be finite";break;default:n=t.defaultError,Gn.assertNever(e)}return{message:n}};let Qne=Dm;function U3e(e){Qne=e}function T_(){return Qne}const R_=e=>{const{data:t,path:n,errorMaps:r,issueData:i}=e,o=[...n,...i.path||[]],s={...i,path:o};if(i.message!==void 0)return{...i,path:o,message:i.message};let a="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)a=c(s,{data:t,defaultError:a}).message;return{...i,path:o,message:a}},D3e=[];function Kt(e,t){const n=T_(),r=R_({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Dm?void 0:Dm].filter(i=>!!i)});e.common.issues.push(r)}class Xo{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const i of n){if(i.status==="aborted")return xn;i.status==="dirty"&&t.dirty(),r.push(i.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const i of n){const o=await i.key,s=await i.value;r.push({key:o,value:s})}return Xo.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const i of n){const{key:o,value:s}=i;if(o.status==="aborted"||s.status==="aborted")return xn;o.status==="dirty"&&t.dirty(),s.status==="dirty"&&t.dirty(),o.value!=="__proto__"&&(typeof s.value<"u"||i.alwaysSet)&&(r[o.value]=s.value)}return{status:t.value,value:r}}}const xn=Object.freeze({status:"aborted"}),Lg=e=>({status:"dirty",value:e}),ds=e=>({status:"valid",value:e}),PL=e=>e.status==="aborted",LL=e=>e.status==="dirty",$h=e=>e.status==="valid",rb=e=>typeof Promise<"u"&&e instanceof Promise;function P_(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function Hne(e,t,n,r,i){if(typeof t=="function"?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var an;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(an||(an={}));var cy,uy;class lu{constructor(t,n,r,i){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const j7=(e,t)=>{if($h(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new pa(e.common.issues);return this._error=n,this._error}}};function Rn(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(s,a)=>{var l,c;const{message:u}=e;return s.code==="invalid_enum_value"?{message:u??a.defaultError}:typeof a.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:a.defaultError}:s.code!=="invalid_type"?{message:a.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:a.defaultError}},description:i}}class jn{get description(){return this._def.description}_getType(t){return Wu(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Wu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Xo,ctx:{common:t.parent.common,data:t.data,parsedType:Wu(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(rb(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Wu(t)},o=this._parseSync({data:t,path:i.path,parent:i});return j7(i,o)}"~validate"(t){var n,r;const i={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Wu(t)};if(!this["~standard"].async)try{const o=this._parseSync({data:t,path:[],parent:i});return $h(o)?{value:o.value}:{issues:i.common.issues}}catch(o){!((r=(n=o==null?void 0:o.message)===null||n===void 0?void 0:n.toLowerCase())===null||r===void 0)&&r.includes("encountered")&&(this["~standard"].async=!0),i.common={issues:[],async:!0}}return this._parseAsync({data:t,path:[],parent:i}).then(o=>$h(o)?{value:o.value}:{issues:i.common.issues})}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Wu(t)},i=this._parse({data:t,path:r.path,parent:r}),o=await(rb(i)?i:Promise.resolve(i));return j7(r,o)}refine(t,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,o)=>{const s=t(i),a=()=>o.addIssue({code:Ft.custom,...r(i)});return typeof Promise<"u"&&s instanceof Promise?s.then(l=>l?!0:(a(),!1)):s?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,i)=>t(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(t){return new tc({schema:this,typeName:yn.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}constructor(t){this.spa=this.safeParseAsync,this._def=t,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:n=>this["~validate"](n)}}optional(){return Zc.create(this,this._def)}nullable(){return XA.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Yl.create(this)}promise(){return Qm.create(this,this._def)}or(t){return ab.create([this,t],this._def)}and(t){return lb.create(this,t,this._def)}transform(t){return new tc({...Rn(this._def),schema:this,typeName:yn.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new db({...Rn(this._def),innerType:this,defaultValue:n,typeName:yn.ZodDefault})}brand(){return new mN({typeName:yn.ZodBranded,type:this,...Rn(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new hb({...Rn(this._def),innerType:this,catchValue:n,typeName:yn.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return gw.create(this,t)}readonly(){return pb.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const $3e=/^c[^\s-]{8,}$/i,Q3e=/^[0-9a-z]+$/,H3e=/^[0-9A-HJKMNP-TV-Z]{26}$/i,z3e=/^[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,V3e=/^[a-z0-9_-]{21}$/i,q3e=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,W3e=/^[-+]?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)?)??$/,K3e=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,G3e="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let CF;const Y3e=/^(?:(?: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])$/,X3e=/^(?:(?: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])$/,J3e=/^(([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]))$/,Z3e=/^(([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])$/,eje=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,tje=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,zne="((\\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])))",nje=new RegExp(`^${zne}$`);function Vne(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function rje(e){return new RegExp(`^${Vne(e)}$`)}function qne(e){let t=`${zne}T${Vne(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function ije(e,t){return!!((t==="v4"||!t)&&Y3e.test(e)||(t==="v6"||!t)&&J3e.test(e))}function oje(e,t){if(!q3e.test(e))return!1;try{const[n]=e.split("."),r=n.replace(/-/g,"+").replace(/_/g,"/").padEnd(n.length+(4-n.length%4)%4,"="),i=JSON.parse(atob(r));return!(typeof i!="object"||i===null||!i.typ||!i.alg||t&&i.alg!==t)}catch{return!1}}function sje(e,t){return!!((t==="v4"||!t)&&X3e.test(e)||(t==="v6"||!t)&&Z3e.test(e))}class Vl extends jn{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==Zt.string){const o=this._getOrReturnCtx(t);return Kt(o,{code:Ft.invalid_type,expected:Zt.string,received:o.parsedType}),xn}const r=new Xo;let i;for(const o of this._def.checks)if(o.kind==="min")t.data.length<o.value&&(i=this._getOrReturnCtx(t,i),Kt(i,{code:Ft.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="max")t.data.length>o.value&&(i=this._getOrReturnCtx(t,i),Kt(i,{code:Ft.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!1,message:o.message}),r.dirty());else if(o.kind==="length"){const s=t.data.length>o.value,a=t.data.length<o.value;(s||a)&&(i=this._getOrReturnCtx(t,i),s?Kt(i,{code:Ft.too_big,maximum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}):a&&Kt(i,{code:Ft.too_small,minimum:o.value,type:"string",inclusive:!0,exact:!0,message:o.message}),r.dirty())}else if(o.kind==="email")K3e.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"email",code:Ft.invalid_string,message:o.message}),r.dirty());else if(o.kind==="emoji")CF||(CF=new RegExp(G3e,"u")),CF.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"emoji",code:Ft.invalid_string,message:o.message}),r.dirty());else if(o.kind==="uuid")z3e.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"uuid",code:Ft.invalid_string,message:o.message}),r.dirty());else if(o.kind==="nanoid")V3e.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"nanoid",code:Ft.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid")$3e.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"cuid",code:Ft.invalid_string,message:o.message}),r.dirty());else if(o.kind==="cuid2")Q3e.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"cuid2",code:Ft.invalid_string,message:o.message}),r.dirty());else if(o.kind==="ulid")H3e.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"ulid",code:Ft.invalid_string,message:o.message}),r.dirty());else if(o.kind==="url")try{new URL(t.data)}catch{i=this._getOrReturnCtx(t,i),Kt(i,{validation:"url",code:Ft.invalid_string,message:o.message}),r.dirty()}else o.kind==="regex"?(o.regex.lastIndex=0,o.regex.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"regex",code:Ft.invalid_string,message:o.message}),r.dirty())):o.kind==="trim"?t.data=t.data.trim():o.kind==="includes"?t.data.includes(o.value,o.position)||(i=this._getOrReturnCtx(t,i),Kt(i,{code:Ft.invalid_string,validation:{includes:o.value,position:o.position},message:o.message}),r.dirty()):o.kind==="toLowerCase"?t.data=t.data.toLowerCase():o.kind==="toUpperCase"?t.data=t.data.toUpperCase():o.kind==="startsWith"?t.data.startsWith(o.value)||(i=this._getOrReturnCtx(t,i),Kt(i,{code:Ft.invalid_string,validation:{startsWith:o.value},message:o.message}),r.dirty()):o.kind==="endsWith"?t.data.endsWith(o.value)||(i=this._getOrReturnCtx(t,i),Kt(i,{code:Ft.invalid_string,validation:{endsWith:o.value},message:o.message}),r.dirty()):o.kind==="datetime"?qne(o).test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{code:Ft.invalid_string,validation:"datetime",message:o.message}),r.dirty()):o.kind==="date"?nje.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{code:Ft.invalid_string,validation:"date",message:o.message}),r.dirty()):o.kind==="time"?rje(o).test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{code:Ft.invalid_string,validation:"time",message:o.message}),r.dirty()):o.kind==="duration"?W3e.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"duration",code:Ft.invalid_string,message:o.message}),r.dirty()):o.kind==="ip"?ije(t.data,o.version)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"ip",code:Ft.invalid_string,message:o.message}),r.dirty()):o.kind==="jwt"?oje(t.data,o.alg)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"jwt",code:Ft.invalid_string,message:o.message}),r.dirty()):o.kind==="cidr"?sje(t.data,o.version)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"cidr",code:Ft.invalid_string,message:o.message}),r.dirty()):o.kind==="base64"?eje.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"base64",code:Ft.invalid_string,message:o.message}),r.dirty()):o.kind==="base64url"?tje.test(t.data)||(i=this._getOrReturnCtx(t,i),Kt(i,{validation:"base64url",code:Ft.invalid_string,message:o.message}),r.dirty()):Gn.assertNever(o);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(i=>t.test(i),{validation:n,code:Ft.invalid_string,...an.errToObj(r)})}_addCheck(t){return new Vl({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...an.errToObj(t)})}url(t){return this._addCheck({kind:"url",...an.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...an.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...an.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...an.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...an.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...an.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...an.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...an.errToObj(t)})}base64url(t){return this._addCheck({kind:"base64url",...an.errToObj(t)})}jwt(t){return this._addCheck({kind:"jwt",...an.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...an.errToObj(t)})}cidr(t){return this._addCheck({kind:"cidr",...an.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...an.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...an.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...an.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...an.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...an.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...an.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...an.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...an.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...an.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...an.errToObj(n)})}nonempty(t){return this.min(1,an.errToObj(t))}trim(){return new Vl({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Vl({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Vl({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isCIDR(){return!!this._def.checks.find(t=>t.kind==="cidr")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get isBase64url(){return!!this._def.checks.find(t=>t.kind==="base64url")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}Vl.create=e=>{var t;return new Vl({checks:[],typeName:yn.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Rn(e)})};function aje(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,i=n>r?n:r,o=parseInt(e.toFixed(i).replace(".","")),s=parseInt(t.toFixed(i).replace(".",""));return o%s/Math.pow(10,i)}class KA extends jn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==Zt.number){const o=this._getOrReturnCtx(t);return Kt(o,{code:Ft.invalid_type,expected:Zt.number,received:o.parsedType}),xn}let r;const i=new Xo;for(const o of this._def.checks)o.kind==="int"?Gn.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),Kt(r,{code:Ft.invalid_type,expected:"integer",received:"float",message:o.message}),i.dirty()):o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Kt(r,{code:Ft.too_small,minimum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Kt(r,{code:Ft.too_big,maximum:o.value,type:"number",inclusive:o.inclusive,exact:!1,message:o.message}),i.dirty()):o.kind==="multipleOf"?aje(t.data,o.value)!==0&&(r=this._getOrReturnCtx(t,r),Kt(r,{code:Ft.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):o.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),Kt(r,{code:Ft.not_finite,message:o.message}),i.dirty()):Gn.assertNever(o);return{status:i.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,an.toString(n))}gt(t,n){return this.setLimit("min",t,!1,an.toString(n))}lte(t,n){return this.setLimit("max",t,!0,an.toString(n))}lt(t,n){return this.setLimit("max",t,!1,an.toString(n))}setLimit(t,n,r,i){return new KA({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:an.toString(i)}]})}_addCheck(t){return new KA({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:an.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:an.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:an.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:an.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:an.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:an.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:an.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:an.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:an.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&Gn.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}KA.create=e=>new KA({checks:[],typeName:yn.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...Rn(e)});class GA extends jn{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce)try{t.data=BigInt(t.data)}catch{return this._getInvalidInput(t)}if(this._getType(t)!==Zt.bigint)return this._getInvalidInput(t);let r;const i=new Xo;for(const o of this._def.checks)o.kind==="min"?(o.inclusive?t.data<o.value:t.data<=o.value)&&(r=this._getOrReturnCtx(t,r),Kt(r,{code:Ft.too_small,type:"bigint",minimum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="max"?(o.inclusive?t.data>o.value:t.data>=o.value)&&(r=this._getOrReturnCtx(t,r),Kt(r,{code:Ft.too_big,type:"bigint",maximum:o.value,inclusive:o.inclusive,message:o.message}),i.dirty()):o.kind==="multipleOf"?t.data%o.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),Kt(r,{code:Ft.not_multiple_of,multipleOf:o.value,message:o.message}),i.dirty()):Gn.assertNever(o);return{status:i.value,value:t.data}}_getInvalidInput(t){const n=this._getOrReturnCtx(t);return Kt(n,{code:Ft.invalid_type,expected:Zt.bigint,received:n.parsedType}),xn}gte(t,n){return this.setLimit("min",t,!0,an.toString(n))}gt(t,n){return this.setLimit("min",t,!1,an.toString(n))}lte(t,n){return this.setLimit("max",t,!0,an.toString(n))}lt(t,n){return this.setLimit("max",t,!1,an.toString(n))}setLimit(t,n,r,i){return new GA({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:an.toString(i)}]})}_addCheck(t){return new GA({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:an.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:an.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:an.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:an.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:an.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}GA.create=e=>{var t;return new GA({checks:[],typeName:yn.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...Rn(e)})};class ib extends jn{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==Zt.boolean){const r=this._getOrReturnCtx(t);return Kt(r,{code:Ft.invalid_type,expected:Zt.boolean,received:r.parsedType}),xn}return ds(t.data)}}ib.create=e=>new ib({typeName:yn.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...Rn(e)});class Qh extends jn{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==Zt.date){const o=this._getOrReturnCtx(t);return Kt(o,{code:Ft.invalid_type,expected:Zt.date,received:o.parsedType}),xn}if(isNaN(t.data.getTime())){const o=this._getOrReturnCtx(t);return Kt(o,{code:Ft.invalid_date}),xn}const r=new Xo;let i;for(const o of this._def.checks)o.kind==="min"?t.data.getTime()<o.value&&(i=this._getOrReturnCtx(t,i),Kt(i,{code:Ft.too_small,message:o.message,inclusive:!0,exact:!1,minimum:o.value,type:"date"}),r.dirty()):o.kind==="max"?t.data.getTime()>o.value&&(i=this._getOrReturnCtx(t,i),Kt(i,{code:Ft.too_big,message:o.message,inclusive:!0,exact:!1,maximum:o.value,type:"date"}),r.dirty()):Gn.assertNever(o);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Qh({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:an.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:an.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Qh.create=e=>new Qh({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:yn.ZodDate,...Rn(e)});class L_ extends jn{_parse(t){if(this._getType(t)!==Zt.symbol){const r=this._getOrReturnCtx(t);return Kt(r,{code:Ft.invalid_type,expected:Zt.symbol,received:r.parsedType}),xn}return ds(t.data)}}L_.create=e=>new L_({typeName:yn.ZodSymbol,...Rn(e)});class ob extends jn{_parse(t){if(this._getType(t)!==Zt.undefined){const r=this._getOrReturnCtx(t);return Kt(r,{code:Ft.invalid_type,expected:Zt.undefined,received:r.parsedType}),xn}return ds(t.data)}}ob.create=e=>new ob({typeName:yn.ZodUndefined,...Rn(e)});class sb extends jn{_parse(t){if(this._getType(t)!==Zt.null){const r=this._getOrReturnCtx(t);return Kt(r,{code:Ft.invalid_type,expected:Zt.null,received:r.parsedType}),xn}return ds(t.data)}}sb.create=e=>new sb({typeName:yn.ZodNull,...Rn(e)});class $m extends jn{constructor(){super(...arguments),this._any=!0}_parse(t){return ds(t.data)}}$m.create=e=>new $m({typeName:yn.ZodAny,...Rn(e)});class _h extends jn{constructor(){super(...arguments),this._unknown=!0}_parse(t){return ds(t.data)}}_h.create=e=>new _h({typeName:yn.ZodUnknown,...Rn(e)});class yf extends jn{_parse(t){const n=this._getOrReturnCtx(t);return Kt(n,{code:Ft.invalid_type,expected:Zt.never,received:n.parsedType}),xn}}yf.create=e=>new yf({typeName:yn.ZodNever,...Rn(e)});class O_ extends jn{_parse(t){if(this._getType(t)!==Zt.undefined){const r=this._getOrReturnCtx(t);return Kt(r,{code:Ft.invalid_type,expected:Zt.void,received:r.parsedType}),xn}return ds(t.data)}}O_.create=e=>new O_({typeName:yn.ZodVoid,...Rn(e)});class Yl extends jn{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),i=this._def;if(n.parsedType!==Zt.array)return Kt(n,{code:Ft.invalid_type,expected:Zt.array,received:n.parsedType}),xn;if(i.exactLength!==null){const s=n.data.length>i.exactLength.value,a=n.data.length<i.exactLength.value;(s||a)&&(Kt(n,{code:s?Ft.too_big:Ft.too_small,minimum:a?i.exactLength.value:void 0,maximum:s?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(Kt(n,{code:Ft.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(Kt(n,{code:Ft.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((s,a)=>i.type._parseAsync(new lu(n,s,n.path,a)))).then(s=>Xo.mergeArray(r,s));const o=[...n.data].map((s,a)=>i.type._parseSync(new lu(n,s,n.path,a)));return Xo.mergeArray(r,o)}get element(){return this._def.type}min(t,n){return new Yl({...this._def,minLength:{value:t,message:an.toString(n)}})}max(t,n){return new Yl({...this._def,maxLength:{value:t,message:an.toString(n)}})}length(t,n){return new Yl({...this._def,exactLength:{value:t,message:an.toString(n)}})}nonempty(t){return this.min(1,t)}}Yl.create=(e,t)=>new Yl({type:e,minLength:null,maxLength:null,exactLength:null,typeName:yn.ZodArray,...Rn(t)});function lg(e){if(e instanceof Zr){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Zc.create(lg(r))}return new Zr({...e._def,shape:()=>t})}else return e instanceof Yl?new Yl({...e._def,type:lg(e.element)}):e instanceof Zc?Zc.create(lg(e.unwrap())):e instanceof XA?XA.create(lg(e.unwrap())):e instanceof cu?cu.create(e.items.map(t=>lg(t))):e}class Zr extends jn{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=Gn.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==Zt.object){const c=this._getOrReturnCtx(t);return Kt(c,{code:Ft.invalid_type,expected:Zt.object,received:c.parsedType}),xn}const{status:r,ctx:i}=this._processInputParams(t),{shape:o,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof yf&&this._def.unknownKeys==="strip"))for(const c in i.data)s.includes(c)||a.push(c);const l=[];for(const c of s){const u=o[c],f=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new lu(i,f,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof yf){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of a)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")a.length>0&&(Kt(i,{code:Ft.unrecognized_keys,keys:a}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of a){const f=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new lu(i,f,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const f=await u.key,d=await u.value;c.push({key:f,value:d,alwaysSet:u.alwaysSet})}return c}).then(c=>Xo.mergeObjectSync(r,c)):Xo.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return an.errToObj,new Zr({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var i,o,s,a;const l=(s=(o=(i=this._def).errorMap)===null||o===void 0?void 0:o.call(i,n,r).message)!==null&&s!==void 0?s:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=an.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new Zr({...this._def,unknownKeys:"strip"})}passthrough(){return new Zr({...this._def,unknownKeys:"passthrough"})}extend(t){return new Zr({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new Zr({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:yn.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new Zr({...this._def,catchall:t})}pick(t){const n={};return Gn.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Zr({...this._def,shape:()=>n})}omit(t){const n={};return Gn.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new Zr({...this._def,shape:()=>n})}deepPartial(){return lg(this)}partial(t){const n={};return Gn.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];t&&!t[r]?n[r]=i:n[r]=i.optional()}),new Zr({...this._def,shape:()=>n})}required(t){const n={};return Gn.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let o=this.shape[r];for(;o instanceof Zc;)o=o._def.innerType;n[r]=o}}),new Zr({...this._def,shape:()=>n})}keyof(){return Wne(Gn.objectKeys(this.shape))}}Zr.create=(e,t)=>new Zr({shape:()=>e,unknownKeys:"strip",catchall:yf.create(),typeName:yn.ZodObject,...Rn(t)});Zr.strictCreate=(e,t)=>new Zr({shape:()=>e,unknownKeys:"strict",catchall:yf.create(),typeName:yn.ZodObject,...Rn(t)});Zr.lazycreate=(e,t)=>new Zr({shape:e,unknownKeys:"strip",catchall:yf.create(),typeName:yn.ZodObject,...Rn(t)});class ab extends jn{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function i(o){for(const a of o)if(a.result.status==="valid")return a.result;for(const a of o)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const s=o.map(a=>new pa(a.ctx.common.issues));return Kt(n,{code:Ft.invalid_union,unionErrors:s}),xn}if(n.common.async)return Promise.all(r.map(async o=>{const s={...n,common:{...n.common,issues:[]},parent:null};return{result:await o._parseAsync({data:n.data,path:n.path,parent:s}),ctx:s}})).then(i);{let o;const s=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!o&&(o={result:u,ctx:c}),c.common.issues.length&&s.push(c.common.issues)}if(o)return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(l=>new pa(l));return Kt(n,{code:Ft.invalid_union,unionErrors:a}),xn}}get options(){return this._def.options}}ab.create=(e,t)=>new ab({options:e,typeName:yn.ZodUnion,...Rn(t)});const Du=e=>e instanceof ub?Du(e.schema):e instanceof tc?Du(e.innerType()):e instanceof fb?[e.value]:e instanceof YA?e.options:e instanceof Ab?Gn.objectValues(e.enum):e instanceof db?Du(e._def.innerType):e instanceof ob?[void 0]:e instanceof sb?[null]:e instanceof Zc?[void 0,...Du(e.unwrap())]:e instanceof XA?[null,...Du(e.unwrap())]:e instanceof mN||e instanceof pb?Du(e.unwrap()):e instanceof hb?Du(e._def.innerType):[];class A5 extends jn{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Zt.object)return Kt(n,{code:Ft.invalid_type,expected:Zt.object,received:n.parsedType}),xn;const r=this.discriminator,i=n.data[r],o=this.optionsMap.get(i);return o?n.common.async?o._parseAsync({data:n.data,path:n.path,parent:n}):o._parseSync({data:n.data,path:n.path,parent:n}):(Kt(n,{code:Ft.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),xn)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const i=new Map;for(const o of n){const s=Du(o.shape[t]);if(!s.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of s){if(i.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);i.set(a,o)}}return new A5({typeName:yn.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Rn(r)})}}function OL(e,t){const n=Wu(e),r=Wu(t);if(e===t)return{valid:!0,data:e};if(n===Zt.object&&r===Zt.object){const i=Gn.objectKeys(t),o=Gn.objectKeys(e).filter(a=>i.indexOf(a)!==-1),s={...e,...t};for(const a of o){const l=OL(e[a],t[a]);if(!l.valid)return{valid:!1};s[a]=l.data}return{valid:!0,data:s}}else if(n===Zt.array&&r===Zt.array){if(e.length!==t.length)return{valid:!1};const i=[];for(let o=0;o<e.length;o++){const s=e[o],a=t[o],l=OL(s,a);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Zt.date&&r===Zt.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class lb extends jn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=(o,s)=>{if(PL(o)||PL(s))return xn;const a=OL(o.value,s.value);return a.valid?((LL(o)||LL(s))&&n.dirty(),{status:n.value,value:a.data}):(Kt(r,{code:Ft.invalid_intersection_types}),xn)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([o,s])=>i(o,s)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}lb.create=(e,t,n)=>new lb({left:e,right:t,typeName:yn.ZodIntersection,...Rn(n)});class cu extends jn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Zt.array)return Kt(r,{code:Ft.invalid_type,expected:Zt.array,received:r.parsedType}),xn;if(r.data.length<this._def.items.length)return Kt(r,{code:Ft.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),xn;!this._def.rest&&r.data.length>this._def.items.length&&(Kt(r,{code:Ft.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const o=[...r.data].map((s,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new lu(r,s,r.path,a)):null}).filter(s=>!!s);return r.common.async?Promise.all(o).then(s=>Xo.mergeArray(n,s)):Xo.mergeArray(n,o)}get items(){return this._def.items}rest(t){return new cu({...this._def,rest:t})}}cu.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new cu({items:e,typeName:yn.ZodTuple,rest:null,...Rn(t)})};class cb extends jn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Zt.object)return Kt(r,{code:Ft.invalid_type,expected:Zt.object,received:r.parsedType}),xn;const i=[],o=this._def.keyType,s=this._def.valueType;for(const a in r.data)i.push({key:o._parse(new lu(r,a,r.path,a)),value:s._parse(new lu(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Xo.mergeObjectAsync(n,i):Xo.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof jn?new cb({keyType:t,valueType:n,typeName:yn.ZodRecord,...Rn(r)}):new cb({keyType:Vl.create(),valueType:t,typeName:yn.ZodRecord,...Rn(n)})}}class j_ extends jn{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Zt.map)return Kt(r,{code:Ft.invalid_type,expected:Zt.map,received:r.parsedType}),xn;const i=this._def.keyType,o=this._def.valueType,s=[...r.data.entries()].map(([a,l],c)=>({key:i._parse(new lu(r,a,r.path,[c,"key"])),value:o._parse(new lu(r,l,r.path,[c,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of s){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return xn;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of s){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return xn;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),a.set(c.value,u.value)}return{status:n.value,value:a}}}}j_.create=(e,t,n)=>new j_({valueType:t,keyType:e,typeName:yn.ZodMap,...Rn(n)});class Hh extends jn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==Zt.set)return Kt(r,{code:Ft.invalid_type,expected:Zt.set,received:r.parsedType}),xn;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(Kt(r,{code:Ft.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(Kt(r,{code:Ft.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const o=this._def.valueType;function s(l){const c=new Set;for(const u of l){if(u.status==="aborted")return xn;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const a=[...r.data.values()].map((l,c)=>o._parse(new lu(r,l,r.path,c)));return r.common.async?Promise.all(a).then(l=>s(l)):s(a)}min(t,n){return new Hh({...this._def,minSize:{value:t,message:an.toString(n)}})}max(t,n){return new Hh({...this._def,maxSize:{value:t,message:an.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Hh.create=(e,t)=>new Hh({valueType:e,minSize:null,maxSize:null,typeName:yn.ZodSet,...Rn(t)});class im extends jn{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Zt.function)return Kt(n,{code:Ft.invalid_type,expected:Zt.function,received:n.parsedType}),xn;function r(a,l){return R_({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,T_(),Dm].filter(c=>!!c),issueData:{code:Ft.invalid_arguments,argumentsError:l}})}function i(a,l){return R_({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,T_(),Dm].filter(c=>!!c),issueData:{code:Ft.invalid_return_type,returnTypeError:l}})}const o={errorMap:n.common.contextualErrorMap},s=n.data;if(this._def.returns instanceof Qm){const a=this;return ds(async function(...l){const c=new pa([]),u=await a._def.args.parseAsync(l,o).catch(A=>{throw c.addIssue(r(l,A)),c}),f=await Reflect.apply(s,this,u);return await a._def.returns._def.type.parseAsync(f,o).catch(A=>{throw c.addIssue(i(f,A)),c})})}else{const a=this;return ds(function(...l){const c=a._def.args.safeParse(l,o);if(!c.success)throw new pa([r(l,c.error)]);const u=Reflect.apply(s,this,c.data),f=a._def.returns.safeParse(u,o);if(!f.success)throw new pa([i(u,f.error)]);return f.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new im({...this._def,args:cu.create(t).rest(_h.create())})}returns(t){return new im({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new im({args:t||cu.create([]).rest(_h.create()),returns:n||_h.create(),typeName:yn.ZodFunction,...Rn(r)})}}class ub extends jn{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}ub.create=(e,t)=>new ub({getter:e,typeName:yn.ZodLazy,...Rn(t)});class fb extends jn{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return Kt(n,{received:n.data,code:Ft.invalid_literal,expected:this._def.value}),xn}return{status:"valid",value:t.data}}get value(){return this._def.value}}fb.create=(e,t)=>new fb({value:e,typeName:yn.ZodLiteral,...Rn(t)});function Wne(e,t){return new YA({values:e,typeName:yn.ZodEnum,...Rn(t)})}class YA extends jn{constructor(){super(...arguments),cy.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return Kt(n,{expected:Gn.joinValues(r),received:n.parsedType,code:Ft.invalid_type}),xn}if(P_(this,cy)||Hne(this,cy,new Set(this._def.values)),!P_(this,cy).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return Kt(n,{received:n.data,code:Ft.invalid_enum_value,options:r}),xn}return ds(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return YA.create(t,{...this._def,...n})}exclude(t,n=this._def){return YA.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}cy=new WeakMap;YA.create=Wne;class Ab extends jn{constructor(){super(...arguments),uy.set(this,void 0)}_parse(t){const n=Gn.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==Zt.string&&r.parsedType!==Zt.number){const i=Gn.objectValues(n);return Kt(r,{expected:Gn.joinValues(i),received:r.parsedType,code:Ft.invalid_type}),xn}if(P_(this,uy)||Hne(this,uy,new Set(Gn.getValidEnumValues(this._def.values))),!P_(this,uy).has(t.data)){const i=Gn.objectValues(n);return Kt(r,{received:r.data,code:Ft.invalid_enum_value,options:i}),xn}return ds(t.data)}get enum(){return this._def.values}}uy=new WeakMap;Ab.create=(e,t)=>new Ab({values:e,typeName:yn.ZodNativeEnum,...Rn(t)});class Qm extends jn{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==Zt.promise&&n.common.async===!1)return Kt(n,{code:Ft.invalid_type,expected:Zt.promise,received:n.parsedType}),xn;const r=n.parsedType===Zt.promise?n.data:Promise.resolve(n.data);return ds(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Qm.create=(e,t)=>new Qm({type:e,typeName:yn.ZodPromise,...Rn(t)});class tc extends jn{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===yn.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),i=this._def.effect||null,o={addIssue:s=>{Kt(r,s),s.fatal?n.abort():n.dirty()},get path(){return r.path}};if(o.addIssue=o.addIssue.bind(o),i.type==="preprocess"){const s=i.transform(r.data,o);if(r.common.async)return Promise.resolve(s).then(async a=>{if(n.value==="aborted")return xn;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?xn:l.status==="dirty"||n.value==="dirty"?Lg(l.value):l});{if(n.value==="aborted")return xn;const a=this._def.schema._parseSync({data:s,path:r.path,parent:r});return a.status==="aborted"?xn:a.status==="dirty"||n.value==="dirty"?Lg(a.value):a}}if(i.type==="refinement"){const s=a=>{const l=i.refinement(a,o);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?xn:(a.status==="dirty"&&n.dirty(),s(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?xn:(a.status==="dirty"&&n.dirty(),s(a.value).then(()=>({status:n.value,value:a.value}))))}if(i.type==="transform")if(r.common.async===!1){const s=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!$h(s))return s;const a=i.transform(s.value,o);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(s=>$h(s)?Promise.resolve(i.transform(s.value,o)).then(a=>({status:n.value,value:a})):s);Gn.assertNever(i)}}tc.create=(e,t,n)=>new tc({schema:e,typeName:yn.ZodEffects,effect:t,...Rn(n)});tc.createWithPreprocess=(e,t,n)=>new tc({schema:t,effect:{type:"preprocess",transform:e},typeName:yn.ZodEffects,...Rn(n)});class Zc extends jn{_parse(t){return this._getType(t)===Zt.undefined?ds(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Zc.create=(e,t)=>new Zc({innerType:e,typeName:yn.ZodOptional,...Rn(t)});class XA extends jn{_parse(t){return this._getType(t)===Zt.null?ds(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}XA.create=(e,t)=>new XA({innerType:e,typeName:yn.ZodNullable,...Rn(t)});class db extends jn{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===Zt.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}db.create=(e,t)=>new db({innerType:e,typeName:yn.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...Rn(t)});class hb extends jn{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return rb(i)?i.then(o=>({status:"valid",value:o.status==="valid"?o.value:this._def.catchValue({get error(){return new pa(r.common.issues)},input:r.data})})):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new pa(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}hb.create=(e,t)=>new hb({innerType:e,typeName:yn.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...Rn(t)});class M_ extends jn{_parse(t){if(this._getType(t)!==Zt.nan){const r=this._getOrReturnCtx(t);return Kt(r,{code:Ft.invalid_type,expected:Zt.nan,received:r.parsedType}),xn}return{status:"valid",value:t.data}}}M_.create=e=>new M_({typeName:yn.ZodNaN,...Rn(e)});const lje=Symbol("zod_brand");class mN extends jn{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class gw extends jn{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const o=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?xn:o.status==="dirty"?(n.dirty(),Lg(o.value)):this._def.out._parseAsync({data:o.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?xn:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(t,n){return new gw({in:t,out:n,typeName:yn.ZodPipeline})}}class pb extends jn{_parse(t){const n=this._def.innerType._parse(t),r=i=>($h(i)&&(i.value=Object.freeze(i.value)),i);return rb(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}pb.create=(e,t)=>new pb({innerType:e,typeName:yn.ZodReadonly,...Rn(t)});function Kne(e,t={},n){return e?$m.create().superRefine((r,i)=>{var o,s;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(s=(o=a.fatal)!==null&&o!==void 0?o:n)!==null&&s!==void 0?s:!0,c=typeof a=="string"?{message:a}:a;i.addIssue({code:"custom",...c,fatal:l})}}):$m.create()}const cje={object:Zr.lazycreate};var yn;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(yn||(yn={}));const uje=(e,t={message:`Input not instance of ${e.name}`})=>Kne(n=>n instanceof e,t),Gne=Vl.create,Yne=KA.create,fje=M_.create,Aje=GA.create,Xne=ib.create,dje=Qh.create,hje=L_.create,pje=ob.create,gje=sb.create,mje=$m.create,vje=_h.create,yje=yf.create,bje=O_.create,wje=Yl.create,xje=Zr.create,Cje=Zr.strictCreate,Sje=ab.create,_je=A5.create,Bje=lb.create,Eje=cu.create,kje=cb.create,Ije=j_.create,Fje=Hh.create,Tje=im.create,Rje=ub.create,Pje=fb.create,Lje=YA.create,Oje=Ab.create,jje=Qm.create,M7=tc.create,Mje=Zc.create,Nje=XA.create,Uje=tc.createWithPreprocess,Dje=gw.create,$je=()=>Gne().optional(),Qje=()=>Yne().optional(),Hje=()=>Xne().optional(),zje={string:e=>Vl.create({...e,coerce:!0}),number:e=>KA.create({...e,coerce:!0}),boolean:e=>ib.create({...e,coerce:!0}),bigint:e=>GA.create({...e,coerce:!0}),date:e=>Qh.create({...e,coerce:!0})},Vje=xn;var oe=Object.freeze({__proto__:null,defaultErrorMap:Dm,setErrorMap:U3e,getErrorMap:T_,makeIssue:R_,EMPTY_PATH:D3e,addIssueToContext:Kt,ParseStatus:Xo,INVALID:xn,DIRTY:Lg,OK:ds,isAborted:PL,isDirty:LL,isValid:$h,isAsync:rb,get util(){return Gn},get objectUtil(){return RL},ZodParsedType:Zt,getParsedType:Wu,ZodType:jn,datetimeRegex:qne,ZodString:Vl,ZodNumber:KA,ZodBigInt:GA,ZodBoolean:ib,ZodDate:Qh,ZodSymbol:L_,ZodUndefined:ob,ZodNull:sb,ZodAny:$m,ZodUnknown:_h,ZodNever:yf,ZodVoid:O_,ZodArray:Yl,ZodObject:Zr,ZodUnion:ab,ZodDiscriminatedUnion:A5,ZodIntersection:lb,ZodTuple:cu,ZodRecord:cb,ZodMap:j_,ZodSet:Hh,ZodFunction:im,ZodLazy:ub,ZodLiteral:fb,ZodEnum:YA,ZodNativeEnum:Ab,ZodPromise:Qm,ZodEffects:tc,ZodTransformer:tc,ZodOptional:Zc,ZodNullable:XA,ZodDefault:db,ZodCatch:hb,ZodNaN:M_,BRAND:lje,ZodBranded:mN,ZodPipeline:gw,ZodReadonly:pb,custom:Kne,Schema:jn,ZodSchema:jn,late:cje,get ZodFirstPartyTypeKind(){return yn},coerce:zje,any:mje,array:wje,bigint:Aje,boolean:Xne,date:dje,discriminatedUnion:_je,effect:M7,enum:Lje,function:Tje,instanceof:uje,intersection:Bje,lazy:Rje,literal:Pje,map:Ije,nan:fje,nativeEnum:Oje,never:yje,null:gje,nullable:Nje,number:Yne,object:xje,oboolean:Hje,onumber:Qje,optional:Mje,ostring:$je,pipeline:Dje,preprocess:Uje,promise:jje,record:kje,set:Fje,strictObject:Cje,string:Gne,symbol:hje,transformer:M7,tuple:Eje,undefined:pje,union:Sje,unknown:vje,void:bje,NEVER:Vje,ZodIssueCode:Ft,quotelessJson:N3e,ZodError:pa});const qje=oe.object({prefix:oe.string().optional(),suffix:oe.string().optional()}),Wje=oe.function().args(oe.object({vars:oe.record(oe.union([oe.string(),oe.any()])),provider:oe.custom().optional()})).returns(oe.promise(oe.union([oe.string(),oe.any()]))),d5=oe.object({id:oe.string().optional(),raw:oe.string(),display:oe.string().optional(),label:oe.string(),function:Wje.optional(),config:oe.any().optional()}),h5=oe.object({cached:oe.number().optional(),completion:oe.number().optional(),prompt:oe.number().optional(),total:oe.number().optional(),numRequests:oe.number().optional()}),Jne=oe.record(oe.string(),oe.function(oe.tuple([oe.any()]).rest(oe.any()),oe.string())),vN=oe.object({AI21_API_BASE_URL:oe.string().optional(),AI21_API_KEY:oe.string().optional(),ANTHROPIC_API_KEY:oe.string().optional(),AWS_BEDROCK_REGION:oe.string().optional(),AZURE_OPENAI_API_BASE_URL:oe.string().optional(),AZURE_OPENAI_API_HOST:oe.string().optional(),AZURE_OPENAI_API_KEY:oe.string().optional(),AZURE_API_BASE_URL:oe.string().optional(),AZURE_API_HOST:oe.string().optional(),AZURE_API_KEY:oe.string().optional(),AZURE_DEPLOYMENT_NAME:oe.string().optional(),AZURE_EMBEDDING_DEPLOYMENT_NAME:oe.string().optional(),AZURE_OPENAI_BASE_URL:oe.string().optional(),AZURE_OPENAI_DEPLOYMENT_NAME:oe.string().optional(),AZURE_OPENAI_EMBEDDING_DEPLOYMENT_NAME:oe.string().optional(),AZURE_CLIENT_SECRET:oe.string().optional(),AZURE_CLIENT_ID:oe.string().optional(),AZURE_TENANT_ID:oe.string().optional(),AZURE_AUTHORITY_HOST:oe.string().optional(),AZURE_TOKEN_SCOPE:oe.string().optional(),BAM_API_HOST:oe.string().optional(),BAM_API_KEY:oe.string().optional(),CLOUDFLARE_ACCOUNT_ID:oe.string().optional(),CLOUDFLARE_API_KEY:oe.string().optional(),PROMPTFOO_REMOTE_GENERATION_URL:oe.string().optional(),COHERE_API_KEY:oe.string().optional(),FAL_KEY:oe.string().optional(),GOOGLE_API_HOST:oe.string().optional(),GOOGLE_API_KEY:oe.string().optional(),GROQ_API_KEY:oe.string().optional(),LOCALAI_BASE_URL:oe.string().optional(),MISTRAL_API_BASE_URL:oe.string().optional(),MISTRAL_API_HOST:oe.string().optional(),MISTRAL_API_KEY:oe.string().optional(),OPENAI_API_BASE_URL:oe.string().optional(),OPENAI_API_HOST:oe.string().optional(),OPENAI_API_KEY:oe.string().optional(),OPENAI_BASE_URL:oe.string().optional(),OPENAI_ORGANIZATION:oe.string().optional(),PALM_API_HOST:oe.string().optional(),PALM_API_KEY:oe.string().optional(),REPLICATE_API_KEY:oe.string().optional(),REPLICATE_API_TOKEN:oe.string().optional(),VERTEX_API_HOST:oe.string().optional(),VERTEX_API_KEY:oe.string().optional(),VERTEX_PROJECT_ID:oe.string().optional(),VERTEX_PUBLISHER:oe.string().optional(),VERTEX_REGION:oe.string().optional(),WATSONX_AI_APIKEY:oe.string().optional(),WATSONX_AI_PROJECT_ID:oe.string().optional(),WATSONX_AI_BEARER_TOKEN:oe.string().optional()}),N_=oe.object({id:oe.custom().optional(),label:oe.custom().optional(),config:oe.any().optional(),prompts:oe.array(oe.string()).optional(),transform:oe.string().optional(),delay:oe.number().optional(),env:vN.optional()}).strict(),Kje=oe.object({fetchWithCache:oe.optional(oe.any()),filters:Jne.optional(),getCache:oe.optional(oe.any()),logger:oe.optional(oe.any()),originalProvider:oe.optional(oe.any()),prompt:d5,vars:oe.record(oe.union([oe.string(),oe.object({})]))}),Gje=oe.object({includeLogProbs:oe.optional(oe.boolean())}),N7=oe.function().args(oe.string().describe("prompt"),Kje.optional(),Gje.optional()).returns(oe.promise(oe.custom())).and(oe.object({label:oe.string().optional()})),yN=oe.object({id:oe.function().returns(oe.string()),callApi:oe.custom(),callEmbeddingApi:oe.function().args(oe.string()).returns(oe.promise(oe.custom())).optional(),callClassificationApi:oe.function().args(oe.string()).returns(oe.promise(oe.custom())).optional(),label:oe.custom().optional(),transform:oe.string().optional(),delay:oe.number().optional(),config:oe.any().optional()});oe.object({cached:oe.boolean().optional(),cost:oe.number().optional(),error:oe.string().optional(),logProbs:oe.array(oe.number()).optional(),metadata:oe.object({redteamFinalPrompt:oe.string().optional()}).catchall(oe.any()).optional(),output:oe.union([oe.string(),oe.any()]).optional(),tokenUsage:h5.optional()});oe.object({error:oe.string().optional(),embedding:oe.array(oe.number()).optional(),tokenUsage:h5.partial().optional()});oe.object({error:oe.string().optional(),similarity:oe.number().optional(),tokenUsage:h5.partial().optional()});oe.object({error:oe.string().optional(),classification:oe.record(oe.number()).optional()});const jL=oe.union([oe.string(),N7,oe.array(oe.union([oe.string(),oe.record(oe.string(),N_),N_,N7]))]),Yje=oe.union([oe.string(),N_,yN]);function U7(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function D7(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?U7(Object(n),!0).forEach(function(r){Xje(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):U7(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xje(e,t,n){return t=Jje(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jje(e){var t=Zje(e,"string");return typeof t=="symbol"?t:String(t)}function Zje(e,t){if(typeof e!="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}const ML=Zne({});function Zne(e){return t.withOptions=n=>Zne(D7(D7({},e),n)),t;function t(n,...r){const i=typeof n=="string"?[n]:n.raw,{escapeSpecialCharacters:o=Array.isArray(n)}=e;let s="";for(let c=0;c<i.length;c++){let u=i[c];o&&(u=u.replace(/\\\n[ \t]*/g,"").replace(/\\`/g,"`").replace(/\\\$/g,"$").replace(/\\\{/g,"{")),s+=u,c<r.length&&(s+=r[c])}const a=s.split(`
|
|
431
431
|
`);let l=null;for(const c of a){const u=c.match(/^(\s+)\S+/);if(u){const f=u[1].length;l?l=Math.min(l,f):l=f}}if(l!==null){const c=l;s=a.map(u=>u[0]===" "||u[0]===" "?u.slice(c):u).join(`
|
|
432
432
|
`)}return s=s.trim(),o&&(s=s.replace(/\\n/g,`
|
|
433
|
-
`)),s}}const eMe=5,fy=["default","harmful","pii"],tMe={"harmful:child-exploitation":"Child Exploitation","harmful:hate":"Hate","harmful:indiscriminate-weapons":"Indiscriminate Weapons","harmful:non-violent-crime":"Non-Violent Crimes","harmful:self-harm":"Self-Harm","harmful:sex-crime":"Sex Crimes","harmful:sexual-content":"Sexual Content","harmful:violent-crime":"Violent Crimes","harmful:chemical-biological-weapons":"Chemical & Biological Weapons","harmful:copyright-violations":"Copyright Violations - Copyrighted text","harmful:cybercrime":"Cybercrime & Unauthorized Intrusion - Hacking and Malware","harmful:graphic-content":"Graphic & age-restricted content","harmful:harassment-bullying":"Harassment & Bullying","harmful:illegal-activities":"Illegal Activities - Fraud & scams","harmful:illegal-drugs":"Illegal Drugs","harmful:unsafe-practices":"Promotion of unsafe practices","harmful:insults":"Insults and personal attacks","harmful:profanity":"Requests containing profanity","harmful:radicalization":"Radicalization","harmful:illegal-drugs:meth":"Methamphetamine","harmful:weapons:ied":"Improvised Explosive Devices","harmful:cybercrime:malicious-code":"Malicious Code"},nMe={"harmful:intellectual-property":"Intellectual Property violation","harmful:privacy":"Privacy violations"},bN={"harmful:misinformation-disinformation":"Misinformation & Disinformation - Harmful lies and propaganda","harmful:specialized-advice":"Specialized Advice - Financial",...tMe,...nMe},ere=["pii:api-db","pii:direct","pii:session","pii:social"],rMe=["contracts","excessive-agency","hallucination","hijacking","politics"],tre=["ascii-smuggling","beavertails","bfla","bola","competitors","cross-session-leak","debug-access","divergent-repetition","imitation","indirect-prompt-injection","overreliance","prompt-extraction","pliny","rbac","religion","shell-injection","sql-injection","ssrf"],iMe=["intent","policy"],p5=new Set([...rMe,...Object.keys(bN),...ere]),NL=[...new Set([...p5,...tre,...iMe])].sort(),oMe={"mitre:atlas":"MITRE ATLAS","nist:ai:measure":"NIST AI RMF","owasp:api":"OWASP API Top 10","owasp:llm":"OWASP LLM Top 10"},wN={"owasp:llm:01":{plugins:["ascii-smuggling","indirect-prompt-injection","prompt-extraction","harmful"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:02":{plugins:["pii:api-db","pii:direct","pii:session","pii:social","harmful:privacy","cross-session-leak","prompt-extraction"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:03":{plugins:[],strategies:[]},"owasp:llm:04":{plugins:["harmful:misinformation-disinformation","harmful:hate","harmful:radicalization","harmful:specialized-advice"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:05":{plugins:["shell-injection","sql-injection","ssrf","debug-access"],strategies:["jailbreak","prompt-injection"]},"owasp:llm:06":{plugins:["excessive-agency","rbac","bfla","bola","shell-injection","sql-injection","ssrf"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:07":{plugins:["prompt-extraction","rbac","harmful:privacy","pii:api-db","pii:direct","pii:session","pii:social"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:08":{plugins:["cross-session-leak","harmful:privacy","pii:api-db","pii:direct","pii:session","pii:social"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:09":{plugins:["hallucination","overreliance","harmful:misinformation-disinformation","harmful:specialized-advice"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:10":{plugins:["excessive-agency","overreliance"],strategies:[]}},xN={"owasp:api:01":{plugins:["bola","rbac"],strategies:[]},"owasp:api:02":{plugins:["bfla","rbac"],strategies:[]},"owasp:api:03":{plugins:["excessive-agency","overreliance"],strategies:[]},"owasp:api:04":{plugins:["harmful:privacy","pii:api-db","pii:session"],strategies:[]},"owasp:api:05":{plugins:["bfla","bola","rbac"],strategies:[]},"owasp:api:06":{plugins:["harmful:misinformation-disinformation","overreliance"],strategies:[]},"owasp:api:07":{plugins:["shell-injection","sql-injection"],strategies:[]},"owasp:api:08":{plugins:["harmful:privacy","pii:api-db","pii:session"],strategies:[]},"owasp:api:09":{plugins:["harmful:specialized-advice","overreliance"],strategies:[]},"owasp:api:10":{plugins:["debug-access","harmful:privacy"],strategies:[]}},CN={"nist:ai:measure:1.1":{plugins:["excessive-agency","harmful:misinformation-disinformation"],strategies:["jailbreak","prompt-injection"]},"nist:ai:measure:1.2":{plugins:["excessive-agency","harmful:misinformation-disinformation"],strategies:["jailbreak","prompt-injection"]},"nist:ai:measure:2.1":{plugins:["harmful:privacy","pii:api-db","pii:direct","pii:session","pii:social"],strategies:[]},"nist:ai:measure:2.2":{plugins:["harmful:privacy","pii:api-db","pii:direct","pii:session","pii:social"],strategies:[]},"nist:ai:measure:2.3":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:2.4":{plugins:["excessive-agency","harmful:misinformation-disinformation"],strategies:["jailbreak","prompt-injection"]},"nist:ai:measure:2.5":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:2.6":{plugins:["harmful:chemical-biological-weapons","harmful:indiscriminate-weapons","harmful:unsafe-practices"],strategies:[]},"nist:ai:measure:2.7":{plugins:["harmful:cybercrime","shell-injection","sql-injection"],strategies:["jailbreak","prompt-injection"]},"nist:ai:measure:2.8":{plugins:["bfla","bola","rbac"],strategies:[]},"nist:ai:measure:2.9":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:2.10":{plugins:["harmful:privacy","pii:api-db","pii:direct","pii:session","pii:social"],strategies:[]},"nist:ai:measure:2.11":{plugins:["harmful:harassment-bullying","harmful:hate","harmful:insults"],strategies:[]},"nist:ai:measure:2.12":{plugins:[],strategies:[]},"nist:ai:measure:2.13":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:3.1":{plugins:["excessive-agency","harmful:misinformation-disinformation"],strategies:["jailbreak","prompt-injection"]},"nist:ai:measure:3.2":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:3.3":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:4.1":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:4.2":{plugins:["excessive-agency","harmful:misinformation-disinformation"],strategies:[]},"nist:ai:measure:4.3":{plugins:["excessive-agency"],strategies:[]}},SN={"mitre:atlas:exfiltration":{plugins:["ascii-smuggling","harmful:privacy","indirect-prompt-injection","pii:api-db","pii:direct","pii:session","pii:social","prompt-extraction"],strategies:[]},"mitre:atlas:impact":{plugins:["excessive-agency","harmful","hijacking","imitation"],strategies:["crescendo"]},"mitre:atlas:initial-access":{plugins:["debug-access","harmful:cybercrime","shell-injection","sql-injection","ssrf"],strategies:["base64","jailbreak","leetspeak","prompt-injection","rot13"]},"mitre:atlas:ml-attack-staging":{plugins:["ascii-smuggling","excessive-agency","hallucination","indirect-prompt-injection"],strategies:["jailbreak","jailbreak:tree"]},"mitre:atlas:reconnaissance":{plugins:["competitors","policy","prompt-extraction","rbac"],strategies:["multilingual"]},"mitre:atlas:resource-development":{plugins:["harmful:cybercrime","harmful:illegal-drugs","harmful:indiscriminate-weapons"],strategies:[]}},sMe=["mitre:atlas","nist:ai","nist:ai:measure","owasp:api","owasp:llm",...Object.keys(SN),...Object.keys(CN),...Object.keys(xN),...Object.keys(wN)],om={"mitre:atlas":SN,"nist:ai:measure":CN,"owasp:api":xN,"owasp:llm":wN},gb=["jailbreak","jailbreak:composite"],nre=["crescendo","goat"],$7=["jailbreak","jailbreak:tree","crescendo","goat"],rre=["prompt-injection","ascii-smuggling","base64","citation","crescendo","goat","jailbreak:tree","leetspeak","math-prompt","multilingual","rot13","best-of-n"],Xd=["basic","default",...gb,...rre],zh={default:"Standard security testing plugins","ascii-smuggling":"Tests vulnerability to Unicode tag-based instruction smuggling attacks",base64:"Tests handling of Base64-encoded malicious payloads",basic:"Single-shot baseline security tests without optimization",beavertails:"Tests handling of malicious prompts from the BeaverTails dataset","best-of-n":"Jailbreak technique published by Anthropic and Stanford",bfla:"Tests for broken function-level authorization vulnerabilities (OWASP API 5)",bola:"Tests for broken object-level authorization vulnerabilities (OWASP API 1)",citation:"Exploits academic authority bias to bypass content filters",competitors:"Tests for unauthorized competitor mentions and endorsements",contracts:"Tests for unauthorized contractual commitments and legal exposure",crescendo:"Multi-turn attack strategy that gradually escalates malicious intent","cross-session-leak":"Tests for information leakage between user sessions","debug-access":"Tests for exposed debugging interfaces and commands","divergent-repetition":"Tests for training data leaks through repetitive pattern exploitation that causes model divergence","excessive-agency":"Tests for unauthorized actions beyond defined system boundaries",goat:"Dynamic multi-turn attack generation using adversarial techniques",hallucination:"Tests for fabrication of false or misleading information",harmful:"Tests handling of malicious content across multiple categories","harmful:chemical-biological-weapons":"Tests handling of WMD-related content","harmful:child-exploitation":"Tests handling of child exploitation content","harmful:copyright-violations":"Tests handling of intellectual property violations","harmful:cybercrime":"Tests handling of cybercrime-related content","harmful:graphic-content":"Tests handling of graphic or violent content","harmful:harassment-bullying":"Tests handling of harassment and bullying content","harmful:hate":"Tests handling of hate speech and discriminatory content","harmful:illegal-activities":"Tests handling of general illegal activities","harmful:illegal-drugs":"Tests handling of illegal drug-related content","harmful:indiscriminate-weapons":"Tests handling of weapons-related content","harmful:insults":"Tests handling of personal attacks and insults","harmful:intellectual-property":"Tests handling of IP theft and violations","harmful:misinformation-disinformation":"Tests handling of false information campaigns","harmful:non-violent-crime":"Tests handling of non-violent criminal content","harmful:privacy":"Tests handling of privacy violation attempts","harmful:profanity":"Tests handling of profane or inappropriate language","harmful:radicalization":"Tests handling of extremist content and recruitment","harmful:self-harm":"Tests handling of self-harm and suicide content","harmful:sex-crime":"Tests handling of sexual crime content","harmful:sexual-content":"Tests handling of explicit sexual content","harmful:specialized-advice":"Tests handling of unauthorized professional advice","harmful:unsafe-practices":"Tests handling of dangerous activity instructions","harmful:violent-crime":"Tests handling of violent crime content","harmful:illegal-drugs:meth":"Tests handling of methamphetamine-related content","harmful:cybercrime:malicious-code":"Tests creation of malicious code","harmful:weapons:ied":"Tests handling of Improvised Explosive Devices",hijacking:"Tests for unauthorized resource usage and purpose deviation",imitation:"Tests for unauthorized impersonation of entities","indirect-prompt-injection":"Tests for injection vulnerabilities via untrusted variables",intent:"Tests for manipulation of system behavior via specific prompts",jailbreak:"Single-shot optimization of safety bypass techniques","jailbreak:composite":"Combines multiple jailbreak techniques for enhanced effectiveness","jailbreak:tree":"Tree-based search for optimal safety bypass vectors",leetspeak:"Tests handling of leetspeak-encoded malicious content","math-prompt":"Tests handling of mathematical notation-based attacks",multilingual:"Tests handling of attacks across multiple languages",overreliance:"Tests for overreliance on system assumptions",pii:"Tests handling of personal identifiable information","pii:api-db":"Tests for PII exposure via API/database access","pii:direct":"Tests for direct PII exposure vulnerabilities","pii:session":"Tests for PII exposure in session data","pii:social":"Tests for PII exposure via social engineering",pliny:"Tests handling of common prompt injections",policy:"Tests compliance with custom security policies",politics:"Tests handling of political content and bias","prompt-extraction":"Tests for system prompt disclosure vulnerabilities","prompt-injection":"Tests for direct prompt injection vulnerabilities",rbac:"Tests role-based access control implementation",religion:"Tests handling of religious content and bias",rot13:"Tests handling of ROT13-encoded malicious content","shell-injection":"Tests for command injection vulnerabilities","sql-injection":"Tests for SQL injection vulnerabilities",ssrf:"Tests for server-side request forgery vulnerabilities"},Xl={"ascii-smuggling":"ASCII Smuggling",base64:"Base64 Payload Encoding",basic:"Baseline Testing",beavertails:"BeaverTails Dataset","best-of-n":"Best-of-N",bfla:"Function-Level Authorization Bypass",bola:"Object-Level Authorization Bypass",competitors:"Competitors",contracts:"Unauthorized Commitments",citation:"Authority Bias Exploitation",crescendo:"Multi-Turn Crescendo","cross-session-leak":"Cross-Session Data Leakage","debug-access":"Debug Interface Exposure",default:"Standard Security Suite","excessive-agency":"Excessive Agency",goat:"Generative Offensive Agent Tester",hallucination:"False Information (Hallucination)",harmful:"Malicious Content Suite","harmful:chemical-biological-weapons":"WMD Content","harmful:child-exploitation":"Child Exploitation","harmful:copyright-violations":"IP Violations","harmful:cybercrime":"Cybercrime","harmful:graphic-content":"Graphic Content","harmful:harassment-bullying":"Harassment","harmful:hate":"Hate Speech","harmful:illegal-activities":"Illegal Activity","harmful:illegal-drugs":"Drug-Related Content","harmful:indiscriminate-weapons":"Weapons Content","harmful:insults":"Personal Attacks","harmful:intellectual-property":"IP Theft","harmful:misinformation-disinformation":"Disinformation Campaigns","harmful:non-violent-crime":"Non-Violent Crime","harmful:privacy":"Privacy Violation","harmful:profanity":"Profanity","harmful:radicalization":"Extremist Content","harmful:self-harm":"Self-Harm","harmful:sex-crime":"Sexual Crime Content","harmful:sexual-content":"Explicit Content","harmful:specialized-advice":"Unauthorized Advice","harmful:unsafe-practices":"Dangerous Activity Content","harmful:violent-crime":"Violent Crime Content","harmful:illegal-drugs:meth":"Methamphetamine Content","harmful:cybercrime:malicious-code":"Malicious Code","harmful:weapons:ied":"Improvised Explosive Devices",hijacking:"Resource Hijacking",imitation:"Entity Impersonation","indirect-prompt-injection":"Indirect Prompt Injection",intent:"Intent",jailbreak:"Single-shot Optimization","jailbreak:composite":"Multi-Vector Safety Bypass","jailbreak:tree":"Tree-Based Attack Search",leetspeak:"Leetspeak Payload Encoding","math-prompt":"Mathematical Notation Attack",multilingual:"Cross-Language Attack",overreliance:"Overreliance",pii:"PII Protection Suite","pii:api-db":"PII via API/Database","pii:direct":"PII via Direct Exposure","pii:session":"PII via Session Data","pii:social":"PII via Social Engineering",pliny:"Common Prompt Injections",policy:"Policy Compliance",politics:"Political Bias","prompt-extraction":"System Prompt Disclosure","prompt-injection":"Direct Prompt Injection",rbac:"RBAC Implementation",religion:"Religious Bias",rot13:"ROT13 Payload Encoding","shell-injection":"Command Injection","sql-injection":"SQL Injection",ssrf:"SSRF Vulnerability","divergent-repetition":"Divergent Repetition"};var Nl=(e=>(e.Critical="critical",e.High="high",e.Medium="medium",e.Low="low",e))(Nl||{});const aMe={critical:"Critical",high:"High",medium:"Medium",low:"Low"},lMe={"ascii-smuggling":"low",beavertails:"low",bfla:"high",bola:"high",competitors:"low",contracts:"medium","cross-session-leak":"medium","debug-access":"high",default:"low","excessive-agency":"medium",hallucination:"medium",harmful:"medium","harmful:chemical-biological-weapons":"high","harmful:child-exploitation":"critical","harmful:copyright-violations":"low","harmful:cybercrime":"low","harmful:graphic-content":"medium","harmful:harassment-bullying":"low","harmful:hate":"critical","harmful:illegal-activities":"medium","harmful:illegal-drugs":"medium","harmful:indiscriminate-weapons":"medium","harmful:insults":"low","harmful:intellectual-property":"medium","harmful:misinformation-disinformation":"medium","harmful:non-violent-crime":"medium","harmful:privacy":"high","harmful:profanity":"low","harmful:radicalization":"low","harmful:self-harm":"critical","harmful:sex-crime":"high","harmful:sexual-content":"medium","harmful:specialized-advice":"medium","harmful:unsafe-practices":"low","harmful:violent-crime":"high","harmful:illegal-drugs:meth":"low","harmful:cybercrime:malicious-code":"low","harmful:weapons:ied":"low",hijacking:"high",imitation:"low","indirect-prompt-injection":"high",intent:"high",overreliance:"low",pii:"high","pii:api-db":"high","pii:direct":"high","pii:session":"high","pii:social":"high",pliny:"medium",policy:"high",politics:"low","prompt-extraction":"medium",rbac:"high",religion:"low","shell-injection":"high","sql-injection":"high",ssrf:"high","divergent-repetition":"medium"},sm={"Security & Access Control":["bola","bfla","rbac","debug-access","shell-injection","sql-injection","ssrf","indirect-prompt-injection","ascii-smuggling","hijacking","pii","pii:api-db","pii:direct","pii:session","pii:social","cross-session-leak","harmful:privacy","prompt-extraction","divergent-repetition"],"Compliance & Legal":["harmful:intellectual-property","harmful:copyright-violations","contracts","harmful:specialized-advice","harmful:violent-crime","harmful:non-violent-crime","harmful:sex-crime","harmful:cybercrime","harmful:cybercrime:malicious-code","harmful:illegal-activities","harmful:illegal-drugs","harmful:illegal-drugs:meth","harmful:chemical-biological-weapons","harmful:indiscriminate-weapons","harmful:weapons:ied","harmful:unsafe-practices"],"Trust & Safety":["hijacking","harmful:child-exploitation","harmful:graphic-content","harmful:hate","harmful:sexual-content","harmful:self-harm","harmful:profanity","harmful:harassment-bullying","harmful:insults","harmful:radicalization","politics","religion","pliny","beavertails"],Brand:["policy","intent","competitors","harmful:misinformation-disinformation","hallucination","overreliance","excessive-agency","imitation"]},cMe={"Security & Access Control":"Data protection, access control, and system security risks.","Content Safety & Moderation":"Harmful, inappropriate, or offensive content generation risks.","Compliance & Legal":"Regulatory compliance, legal, and policy violation risks.","Output Quality & Trust":"Output reliability, accuracy, and brand reputation risks."};Object.entries(sm).reduce((e,[t,n])=>(n.forEach(r=>{e[r]=t}),e),{});const Vh={"ascii-smuggling":"AsciiSmuggling",beavertails:"BeaverTails",bfla:"BFLAEnforcement",bola:"BOLAEnforcement",competitors:"CompetitorEndorsement",contracts:"ContractualCommitment","cross-session-leak":"CrossSessionLeak","debug-access":"DebugAccess",default:"Default","divergent-repetition":"DivergentRepetition","excessive-agency":"ExcessiveAgency",hallucination:"Hallucination",harmful:"Harmful","harmful:child-exploitation":"Child Exploitation","harmful:chemical-biological-weapons":"Chemical & Biological Weapons","harmful:copyright-violations":"Copyright Violations - Copyrighted text","harmful:cybercrime":"Cybercrime & Unauthorized Intrusion - Hacking and Malware","harmful:graphic-content":"Graphic & age-restricted content","harmful:harassment-bullying":"Harassment & Bullying","harmful:hate":"Hate","harmful:illegal-activities":"Illegal Activities - Fraud & scams","harmful:illegal-drugs":"Illegal Drugs","harmful:indiscriminate-weapons":"Indiscriminate Weapons","harmful:insults":"Insults and personal attacks","harmful:intellectual-property":"Intellectual Property violation","harmful:misinformation-disinformation":"Misinformation & Disinformation - Harmful lies and propaganda","harmful:non-violent-crime":"Non-Violent Crimes","harmful:privacy":"Privacy violations","harmful:profanity":"Requests containing profanity","harmful:radicalization":"Radicalization","harmful:self-harm":"Self-Harm","harmful:sex-crime":"Sex Crimes","harmful:sexual-content":"Sexual Content","harmful:specialized-advice":"Specialized Advice - Financial","harmful:unsafe-practices":"Promotion of unsafe practices","harmful:violent-crime":"Violent Crimes","harmful:illegal-drugs:meth":"Methamphetamine","harmful:cybercrime:malicious-code":"Malicious Code","harmful:weapons:ied":"Improvised Explosive Devices",hijacking:"Hijacking",imitation:"Imitation","indirect-prompt-injection":"IndirectPromptInjection",intent:"Intent",overreliance:"Overreliance",pii:"PIILeak","pii:api-db":"PIILeak","pii:direct":"PIILeak","pii:session":"PIILeak","pii:social":"PIILeak",pliny:"Pliny",policy:"PolicyViolation",politics:"PoliticalStatement","prompt-extraction":"PromptExtraction",rbac:"RbacEnforcement",religion:"Religion","shell-injection":"ShellInjection","sql-injection":"SqlInjection",ssrf:"SSRFEnforcement"},UL=Object.entries(Vh).reduce((e,[t,n])=>(e[n]=t,e),{}),ire={"ascii-smuggling":"Evaluates system resilience against Unicode tag-based instruction smuggling",base64:"Tests detection and handling of Base64-encoded malicious payloads",basic:"Establishes baseline security posture through fundamental test cases","best-of-n":"Jailbreak technique published by Anthropic and Stanford",citation:"Exploits academic authority bias to circumvent content filtering mechanisms",crescendo:"Executes progressive multi-turn attacks with escalating malicious intent",default:"Applies standard security testing methodology",goat:"Deploys dynamic attack generation using advanced adversarial techniques",jailbreak:"Optimizes single-turn attacks to bypass security controls","jailbreak:composite":"Chains multiple attack vectors for enhanced effectiveness","jailbreak:tree":"Implements tree-based search for optimal attack paths",leetspeak:"Assesses handling of leetspeak-encoded malicious content","math-prompt":"Tests resilience against mathematical notation-based attacks",multilingual:"Evaluates cross-language attack vector handling","prompt-injection":"Tests direct prompt injection vulnerability detection",rot13:"Assesses handling of ROT13-encoded malicious payloads"},ore={"ascii-smuggling":"ASCII Smuggling",base64:"Base64 Encoding",basic:"Basic","best-of-n":"Best-of-N",citation:"Authority Bias",crescendo:"Multi-turn Crescendo",default:"Basic",goat:"Generative Offensive Agent Tester","jailbreak:composite":"Composite Jailbreaks","jailbreak:tree":"Tree-based Optimization",jailbreak:"Single-shot Optimization",leetspeak:"Leetspeak Encoding","math-prompt":"Mathematical Encoding",multilingual:"Multilingual Encoding","prompt-injection":"Prompt Injection",rot13:"ROT13 Encoding"},uMe={Default:"Promptfoo recommended",NIST:"NIST AI Risk Management Framework","OWASP LLM":"OWASP LLM Top 10","OWASP API":"OWASP API Top 10",MITRE:"MITRE ATLAS framework",Custom:"Choose your own plugins"},hA=[...fy,...NL,...sMe].sort(),sre=oe.object({id:oe.union([oe.enum(hA).superRefine((e,t)=>{hA.includes(e)||t.addIssue({code:oe.ZodIssueCode.invalid_enum_value,options:hA,received:e,message:`Invalid plugin name. Must be one of: ${hA.join(", ")} (or a path starting with file://)`})}),oe.string().startsWith("file://",{message:"Custom plugins must start with file:// (or use one of the built-in plugins)"})]).describe("Name of the plugin"),numTests:oe.number().int().positive().default(eMe).describe("Number of tests to generate for this plugin"),config:oe.record(oe.unknown()).optional().describe("Plugin-specific configuration")}),fMe=oe.union([oe.union([oe.enum(hA).superRefine((e,t)=>{hA.includes(e)||t.addIssue({code:oe.ZodIssueCode.invalid_enum_value,options:hA,received:e,message:`Invalid plugin name. Must be one of: ${hA.join(", ")} (or a path starting with file://)`})}),oe.string().startsWith("file://",{message:"Custom plugins must start with file:// (or use one of the built-in plugins)"})]).describe("Name of the plugin or path to custom plugin"),sre]),Q7=oe.union([oe.enum(Xd).superRefine((e,t)=>{Xd.includes(e)||t.addIssue({code:oe.ZodIssueCode.invalid_enum_value,options:[...Xd],received:e,message:`Invalid strategy name. Must be one of: ${[...Xd].join(", ")} (or a path starting with file://)`})}),oe.string().refine(e=>e.startsWith("file://")&&kM(e),{message:`Custom strategies must start with file:// and end with .js or .ts, or use one of the built-in strategies: ${[...Xd].join(", ")}`})]).describe("Name of the strategy"),are=oe.union([Q7,oe.object({id:Q7,config:oe.record(oe.unknown()).optional().describe("Strategy-specific configuration")})]);oe.object({addPlugins:oe.array(oe.enum(tre)).optional().describe("Additional plugins to include"),addStrategies:oe.array(oe.enum(rre)).optional().describe("Additional strategies to include"),cache:oe.boolean().describe("Whether to use caching"),config:oe.string().optional().describe("Path to the configuration file"),defaultConfig:oe.record(oe.unknown()).describe("Default configuration object"),defaultConfigPath:oe.string().optional().describe("Path to the default configuration file"),delay:oe.number().int().nonnegative().optional().describe("Delay in milliseconds between plugin API calls"),envFile:oe.string().optional().describe("Path to the environment file"),force:oe.boolean().describe("Whether to force generation").default(!1),injectVar:oe.string().optional().describe("Variable to inject"),language:oe.string().optional().describe("Language of tests to generate"),maxConcurrency:oe.number().int().positive().optional().describe("Maximum number of concurrent API calls"),numTests:oe.number().int().positive().optional().describe("Number of tests to generate"),output:oe.string().optional().describe("Output file path"),plugins:oe.array(sre).optional().describe("Plugins to use"),provider:oe.string().optional().describe("Provider to use"),purpose:oe.string().optional().describe("Purpose of the redteam generation"),strategies:oe.array(are).optional().describe("Strategies to use"),write:oe.boolean().describe("Whether to write the output")});const AMe=oe.object({injectVar:oe.string().optional().describe("Variable to inject. Can be a string or array of strings. If string, it's transformed to an array. Inferred from the prompts by default."),purpose:oe.string().optional().describe("Purpose override string - describes the prompt templates"),provider:Yje.optional().describe("Provider used for generating adversarial inputs"),numTests:oe.number().int().positive().optional().describe("Number of tests to generate"),language:oe.string().optional().describe("Language of tests ot generate for this plugin"),entities:oe.array(oe.string()).optional().describe("Names of people, brands, or organizations related to your LLM application"),plugins:oe.array(fMe).describe("Plugins to use for redteam generation").default(["default"]),strategies:oe.array(are).describe(ML`Strategies to use for redteam generation.
|
|
433
|
+
`)),s}}const eMe=5,fy=["default","harmful","pii"],tMe={"harmful:child-exploitation":"Child Exploitation","harmful:hate":"Hate","harmful:indiscriminate-weapons":"Indiscriminate Weapons","harmful:non-violent-crime":"Non-Violent Crimes","harmful:self-harm":"Self-Harm","harmful:sex-crime":"Sex Crimes","harmful:sexual-content":"Sexual Content","harmful:violent-crime":"Violent Crimes","harmful:chemical-biological-weapons":"Chemical & Biological Weapons","harmful:copyright-violations":"Copyright Violations - Copyrighted text","harmful:cybercrime":"Cybercrime & Unauthorized Intrusion - Hacking and Malware","harmful:graphic-content":"Graphic & age-restricted content","harmful:harassment-bullying":"Harassment & Bullying","harmful:illegal-activities":"Illegal Activities - Fraud & scams","harmful:illegal-drugs":"Illegal Drugs","harmful:unsafe-practices":"Promotion of unsafe practices","harmful:insults":"Insults and personal attacks","harmful:profanity":"Requests containing profanity","harmful:radicalization":"Radicalization","harmful:illegal-drugs:meth":"Methamphetamine","harmful:weapons:ied":"Improvised Explosive Devices","harmful:cybercrime:malicious-code":"Malicious Code"},nMe={"harmful:intellectual-property":"Intellectual Property violation","harmful:privacy":"Privacy violations"},bN={"harmful:misinformation-disinformation":"Misinformation & Disinformation - Harmful lies and propaganda","harmful:specialized-advice":"Specialized Advice - Financial",...tMe,...nMe},ere=["pii:api-db","pii:direct","pii:session","pii:social"],rMe=["contracts","excessive-agency","hallucination","hijacking","politics"],tre=["ascii-smuggling","beavertails","bfla","bola","competitors","cross-session-leak","cyberseceval","debug-access","divergent-repetition","imitation","indirect-prompt-injection","overreliance","prompt-extraction","pliny","rbac","religion","shell-injection","sql-injection","ssrf","system-prompt-override"],iMe=["intent","policy"],p5=new Set([...rMe,...Object.keys(bN),...ere]),NL=[...new Set([...p5,...tre,...iMe])].sort(),oMe={"mitre:atlas":"MITRE ATLAS","nist:ai:measure":"NIST AI RMF","owasp:api":"OWASP API Top 10","owasp:llm":"OWASP LLM Top 10"},wN={"owasp:llm:01":{plugins:["ascii-smuggling","indirect-prompt-injection","prompt-extraction","harmful"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:02":{plugins:["pii:api-db","pii:direct","pii:session","pii:social","harmful:privacy","cross-session-leak","prompt-extraction"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:03":{plugins:[],strategies:[]},"owasp:llm:04":{plugins:["harmful:misinformation-disinformation","harmful:hate","harmful:radicalization","harmful:specialized-advice"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:05":{plugins:["shell-injection","sql-injection","ssrf","debug-access"],strategies:["jailbreak","prompt-injection"]},"owasp:llm:06":{plugins:["excessive-agency","rbac","bfla","bola","shell-injection","sql-injection","ssrf"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:07":{plugins:["prompt-extraction","rbac","harmful:privacy","pii:api-db","pii:direct","pii:session","pii:social"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:08":{plugins:["cross-session-leak","harmful:privacy","pii:api-db","pii:direct","pii:session","pii:social"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:09":{plugins:["hallucination","overreliance","harmful:misinformation-disinformation","harmful:specialized-advice"],strategies:["jailbreak","prompt-injection","jailbreak:composite"]},"owasp:llm:10":{plugins:["excessive-agency","overreliance"],strategies:[]}},xN={"owasp:api:01":{plugins:["bola","rbac"],strategies:[]},"owasp:api:02":{plugins:["bfla","rbac"],strategies:[]},"owasp:api:03":{plugins:["excessive-agency","overreliance"],strategies:[]},"owasp:api:04":{plugins:["harmful:privacy","pii:api-db","pii:session"],strategies:[]},"owasp:api:05":{plugins:["bfla","bola","rbac"],strategies:[]},"owasp:api:06":{plugins:["harmful:misinformation-disinformation","overreliance"],strategies:[]},"owasp:api:07":{plugins:["shell-injection","sql-injection"],strategies:[]},"owasp:api:08":{plugins:["harmful:privacy","pii:api-db","pii:session"],strategies:[]},"owasp:api:09":{plugins:["harmful:specialized-advice","overreliance"],strategies:[]},"owasp:api:10":{plugins:["debug-access","harmful:privacy"],strategies:[]}},CN={"nist:ai:measure:1.1":{plugins:["excessive-agency","harmful:misinformation-disinformation"],strategies:["jailbreak","prompt-injection"]},"nist:ai:measure:1.2":{plugins:["excessive-agency","harmful:misinformation-disinformation"],strategies:["jailbreak","prompt-injection"]},"nist:ai:measure:2.1":{plugins:["harmful:privacy","pii:api-db","pii:direct","pii:session","pii:social"],strategies:[]},"nist:ai:measure:2.2":{plugins:["harmful:privacy","pii:api-db","pii:direct","pii:session","pii:social"],strategies:[]},"nist:ai:measure:2.3":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:2.4":{plugins:["excessive-agency","harmful:misinformation-disinformation"],strategies:["jailbreak","prompt-injection"]},"nist:ai:measure:2.5":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:2.6":{plugins:["harmful:chemical-biological-weapons","harmful:indiscriminate-weapons","harmful:unsafe-practices"],strategies:[]},"nist:ai:measure:2.7":{plugins:["harmful:cybercrime","shell-injection","sql-injection"],strategies:["jailbreak","prompt-injection"]},"nist:ai:measure:2.8":{plugins:["bfla","bola","rbac"],strategies:[]},"nist:ai:measure:2.9":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:2.10":{plugins:["harmful:privacy","pii:api-db","pii:direct","pii:session","pii:social"],strategies:[]},"nist:ai:measure:2.11":{plugins:["harmful:harassment-bullying","harmful:hate","harmful:insults"],strategies:[]},"nist:ai:measure:2.12":{plugins:[],strategies:[]},"nist:ai:measure:2.13":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:3.1":{plugins:["excessive-agency","harmful:misinformation-disinformation"],strategies:["jailbreak","prompt-injection"]},"nist:ai:measure:3.2":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:3.3":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:4.1":{plugins:["excessive-agency"],strategies:[]},"nist:ai:measure:4.2":{plugins:["excessive-agency","harmful:misinformation-disinformation"],strategies:[]},"nist:ai:measure:4.3":{plugins:["excessive-agency"],strategies:[]}},SN={"mitre:atlas:exfiltration":{plugins:["ascii-smuggling","harmful:privacy","indirect-prompt-injection","pii:api-db","pii:direct","pii:session","pii:social","prompt-extraction"],strategies:[]},"mitre:atlas:impact":{plugins:["excessive-agency","harmful","hijacking","imitation"],strategies:["crescendo"]},"mitre:atlas:initial-access":{plugins:["debug-access","harmful:cybercrime","shell-injection","sql-injection","ssrf"],strategies:["base64","jailbreak","leetspeak","prompt-injection","rot13"]},"mitre:atlas:ml-attack-staging":{plugins:["ascii-smuggling","excessive-agency","hallucination","indirect-prompt-injection"],strategies:["jailbreak","jailbreak:tree"]},"mitre:atlas:reconnaissance":{plugins:["competitors","policy","prompt-extraction","rbac"],strategies:["multilingual"]},"mitre:atlas:resource-development":{plugins:["harmful:cybercrime","harmful:illegal-drugs","harmful:indiscriminate-weapons"],strategies:[]}},sMe=["mitre:atlas","nist:ai","nist:ai:measure","owasp:api","owasp:llm","toxicity","bias","misinformation","illegal-activity","personal-safety",...Object.keys(SN),...Object.keys(CN),...Object.keys(xN),...Object.keys(wN)],om={"mitre:atlas":SN,"nist:ai:measure":CN,"owasp:api":xN,"owasp:llm":wN,toxicity:{toxicity:{plugins:["harmful:hate","harmful:harassment-bullying","harmful:insults","harmful:profanity","harmful:graphic-content","harmful:sexual-content"],strategies:[]}},bias:{bias:{plugins:["politics","religion"],strategies:[]}},misinformation:{misinformation:{plugins:["harmful:misinformation-disinformation","hallucination","harmful:radicalization","imitation"],strategies:[]}},"illegal-activity":{"illegal-activity":{plugins:["harmful:violent-crime","harmful:non-violent-crime","harmful:sex-crime","harmful:cybercrime","harmful:illegal-activities","harmful:illegal-drugs","harmful:illegal-drugs:meth","harmful:chemical-biological-weapons","harmful:indiscriminate-weapons","harmful:weapons:ied"],strategies:[]}}},gb=["jailbreak","jailbreak:composite"],nre=["crescendo","goat"],$7=["jailbreak","jailbreak:tree","crescendo","goat"],rre=["prompt-injection","ascii-smuggling","base64","citation","crescendo","goat","jailbreak:tree","leetspeak","math-prompt","multilingual","rot13","best-of-n"],Xd=["basic","default",...gb,...rre],zh={default:"Standard security testing plugins","ascii-smuggling":"Tests vulnerability to Unicode tag-based instruction smuggling attacks",base64:"Tests handling of Base64-encoded malicious payloads",basic:"Single-shot baseline security tests without optimization",beavertails:"Tests handling of malicious prompts from the BeaverTails dataset","best-of-n":"Jailbreak technique published by Anthropic and Stanford",bfla:"Tests for broken function-level authorization vulnerabilities (OWASP API 5)",bola:"Tests for broken object-level authorization vulnerabilities (OWASP API 1)",citation:"Exploits academic authority bias to bypass content filters",competitors:"Tests for unauthorized competitor mentions and endorsements",contracts:"Tests for unauthorized contractual commitments and legal exposure",crescendo:"Multi-turn attack strategy that gradually escalates malicious intent","cross-session-leak":"Tests for information leakage between user sessions",cyberseceval:"Tests prompt injection attacks from Meta's CyberSecEval dataset","debug-access":"Tests for exposed debugging interfaces and commands","divergent-repetition":"Tests for training data leaks through repetitive pattern exploitation that causes model divergence","excessive-agency":"Tests for unauthorized actions beyond defined system boundaries",goat:"Dynamic multi-turn attack generation using adversarial techniques",hallucination:"Tests for fabrication of false or misleading information",harmful:"Tests handling of malicious content across multiple categories","harmful:chemical-biological-weapons":"Tests handling of WMD-related content","harmful:child-exploitation":"Tests handling of child exploitation content","harmful:copyright-violations":"Tests handling of intellectual property violations","harmful:cybercrime":"Tests handling of cybercrime-related content","harmful:graphic-content":"Tests handling of graphic or violent content","harmful:harassment-bullying":"Tests handling of harassment and bullying content","harmful:hate":"Tests handling of hate speech and discriminatory content","harmful:illegal-activities":"Tests handling of general illegal activities","harmful:illegal-drugs":"Tests handling of illegal drug-related content","harmful:indiscriminate-weapons":"Tests handling of weapons-related content","harmful:insults":"Tests handling of personal attacks and insults","harmful:intellectual-property":"Tests handling of IP theft and violations","harmful:misinformation-disinformation":"Tests handling of false information campaigns","harmful:non-violent-crime":"Tests handling of non-violent criminal content","harmful:privacy":"Tests handling of privacy violation attempts","harmful:profanity":"Tests handling of profane or inappropriate language","harmful:radicalization":"Tests handling of extremist content and recruitment","harmful:self-harm":"Tests handling of self-harm and suicide content","harmful:sex-crime":"Tests handling of sexual crime content","harmful:sexual-content":"Tests handling of explicit sexual content","harmful:specialized-advice":"Tests handling of unauthorized professional advice","harmful:unsafe-practices":"Tests handling of dangerous activity instructions","harmful:violent-crime":"Tests handling of violent crime content","harmful:illegal-drugs:meth":"Tests handling of methamphetamine-related content","harmful:cybercrime:malicious-code":"Tests creation of malicious code","harmful:weapons:ied":"Tests handling of Improvised Explosive Devices",hijacking:"Tests for unauthorized resource usage and purpose deviation",imitation:"Tests for unauthorized impersonation of entities","indirect-prompt-injection":"Tests for injection vulnerabilities via untrusted variables",intent:"Tests for manipulation of system behavior via specific prompts",jailbreak:"Single-shot optimization of safety bypass techniques","jailbreak:composite":"Combines multiple jailbreak techniques for enhanced effectiveness","jailbreak:tree":"Tree-based search for optimal safety bypass vectors",leetspeak:"Tests handling of leetspeak-encoded malicious content","math-prompt":"Tests handling of mathematical notation-based attacks",multilingual:"Tests handling of attacks across multiple languages",overreliance:"Tests for overreliance on system assumptions",pii:"Tests handling of personal identifiable information","pii:api-db":"Tests for PII exposure via API/database access","pii:direct":"Tests for direct PII exposure vulnerabilities","pii:session":"Tests for PII exposure in session data","pii:social":"Tests for PII exposure via social engineering",pliny:"Tests handling of common prompt injections",policy:"Tests compliance with custom security policies",politics:"Tests handling of political content and bias","prompt-extraction":"Tests for system prompt disclosure vulnerabilities","prompt-injection":"Tests for direct prompt injection vulnerabilities",rbac:"Tests role-based access control implementation",religion:"Tests handling of religious content and bias",rot13:"Tests handling of ROT13-encoded malicious content","shell-injection":"Tests for command injection vulnerabilities","sql-injection":"Tests for SQL injection vulnerabilities",ssrf:"Tests for server-side request forgery vulnerabilities","system-prompt-override":"Tests for system prompt override vulnerabilities"},Xl={"ascii-smuggling":"ASCII Smuggling",base64:"Base64 Payload Encoding",basic:"Baseline Testing",beavertails:"BeaverTails Dataset","best-of-n":"Best-of-N",bfla:"Function-Level Authorization Bypass",bola:"Object-Level Authorization Bypass",competitors:"Competitors",contracts:"Unauthorized Commitments",citation:"Authority Bias Exploitation",crescendo:"Multi-Turn Crescendo","cross-session-leak":"Cross-Session Data Leakage",cyberseceval:"CyberSecEval Dataset","debug-access":"Debug Interface Exposure",default:"Standard Security Suite","divergent-repetition":"Divergent Repetition","excessive-agency":"Excessive Agency",goat:"Generative Offensive Agent Tester",hallucination:"False Information (Hallucination)",harmful:"Malicious Content Suite","harmful:chemical-biological-weapons":"WMD Content","harmful:child-exploitation":"Child Exploitation","harmful:copyright-violations":"IP Violations","harmful:cybercrime":"Cybercrime","harmful:graphic-content":"Graphic Content","harmful:harassment-bullying":"Harassment","harmful:hate":"Hate Speech","harmful:illegal-activities":"Illegal Activity","harmful:illegal-drugs":"Drug-Related Content","harmful:indiscriminate-weapons":"Weapons Content","harmful:insults":"Personal Attacks","harmful:intellectual-property":"IP Theft","harmful:misinformation-disinformation":"Disinformation Campaigns","harmful:non-violent-crime":"Non-Violent Crime","harmful:privacy":"Privacy Violation","harmful:profanity":"Profanity","harmful:radicalization":"Extremist Content","harmful:self-harm":"Self-Harm","harmful:sex-crime":"Sexual Crime Content","harmful:sexual-content":"Explicit Content","harmful:specialized-advice":"Unauthorized Advice","harmful:unsafe-practices":"Dangerous Activity Content","harmful:violent-crime":"Violent Crime Content","harmful:illegal-drugs:meth":"Methamphetamine Content","harmful:cybercrime:malicious-code":"Malicious Code","harmful:weapons:ied":"Improvised Explosive Devices",hijacking:"Resource Hijacking",imitation:"Entity Impersonation","indirect-prompt-injection":"Indirect Prompt Injection",intent:"Intent",jailbreak:"Single-shot Optimization","jailbreak:composite":"Multi-Vector Safety Bypass","jailbreak:tree":"Tree-Based Attack Search",leetspeak:"Leetspeak Payload Encoding","math-prompt":"Mathematical Notation Attack",multilingual:"Cross-Language Attack",overreliance:"Overreliance",pii:"PII Protection Suite","pii:api-db":"PII via API/Database","pii:direct":"PII via Direct Exposure","pii:session":"PII via Session Data","pii:social":"PII via Social Engineering",pliny:"Common Prompt Injections",policy:"Policy Compliance",politics:"Political Bias","prompt-extraction":"System Prompt Disclosure","prompt-injection":"Direct Prompt Injection",rbac:"RBAC Implementation",religion:"Religious Bias",rot13:"ROT13 Payload Encoding","shell-injection":"Command Injection","sql-injection":"SQL Injection",ssrf:"SSRF Vulnerability","system-prompt-override":"System Prompt Override"};var Nl=(e=>(e.Critical="critical",e.High="high",e.Medium="medium",e.Low="low",e))(Nl||{});const aMe={critical:"Critical",high:"High",medium:"Medium",low:"Low"},lMe={"ascii-smuggling":"low",beavertails:"low",bfla:"high",bola:"high",competitors:"low",contracts:"medium","cross-session-leak":"medium",cyberseceval:"medium","debug-access":"high",default:"low","divergent-repetition":"medium","excessive-agency":"medium",hallucination:"medium",harmful:"medium","harmful:chemical-biological-weapons":"high","harmful:child-exploitation":"critical","harmful:copyright-violations":"low","harmful:cybercrime":"low","harmful:graphic-content":"medium","harmful:harassment-bullying":"low","harmful:hate":"critical","harmful:illegal-activities":"medium","harmful:illegal-drugs":"medium","harmful:indiscriminate-weapons":"medium","harmful:insults":"low","harmful:intellectual-property":"medium","harmful:misinformation-disinformation":"medium","harmful:non-violent-crime":"medium","harmful:privacy":"high","harmful:profanity":"low","harmful:radicalization":"low","harmful:self-harm":"critical","harmful:sex-crime":"high","harmful:sexual-content":"medium","harmful:specialized-advice":"medium","harmful:unsafe-practices":"low","harmful:violent-crime":"high","harmful:illegal-drugs:meth":"low","harmful:cybercrime:malicious-code":"low","harmful:weapons:ied":"low",hijacking:"high",imitation:"low","indirect-prompt-injection":"high",intent:"high",overreliance:"low",pii:"high","pii:api-db":"high","pii:direct":"high","pii:session":"high","pii:social":"high",pliny:"medium",policy:"high",politics:"low","prompt-extraction":"medium",rbac:"high",religion:"low","shell-injection":"high","sql-injection":"high",ssrf:"high","system-prompt-override":"high"},sm={"Security & Access Control":["bola","bfla","rbac","debug-access","shell-injection","sql-injection","ssrf","indirect-prompt-injection","ascii-smuggling","hijacking","pii","pii:api-db","pii:direct","pii:session","pii:social","cross-session-leak","harmful:privacy","prompt-extraction","divergent-repetition"],"Compliance & Legal":["harmful:intellectual-property","harmful:copyright-violations","contracts","harmful:specialized-advice","harmful:violent-crime","harmful:non-violent-crime","harmful:sex-crime","harmful:cybercrime","harmful:cybercrime:malicious-code","harmful:illegal-activities","harmful:illegal-drugs","harmful:illegal-drugs:meth","harmful:chemical-biological-weapons","harmful:indiscriminate-weapons","harmful:weapons:ied","harmful:unsafe-practices"],"Trust & Safety":["hijacking","harmful:child-exploitation","harmful:graphic-content","harmful:hate","harmful:sexual-content","harmful:self-harm","harmful:profanity","harmful:harassment-bullying","harmful:insults","harmful:radicalization","politics","religion","pliny","beavertails","cyberseceval"],Brand:["policy","intent","competitors","harmful:misinformation-disinformation","hallucination","overreliance","excessive-agency","imitation"]},cMe={"Security & Access Control":"Data protection, access control, and system security risks.","Content Safety & Moderation":"Harmful, inappropriate, or offensive content generation risks.","Compliance & Legal":"Regulatory compliance, legal, and policy violation risks.","Output Quality & Trust":"Output reliability, accuracy, and brand reputation risks."};Object.entries(sm).reduce((e,[t,n])=>(n.forEach(r=>{e[r]=t}),e),{});const Vh={"ascii-smuggling":"AsciiSmuggling",beavertails:"BeaverTails",bfla:"BFLAEnforcement",bola:"BOLAEnforcement",competitors:"CompetitorEndorsement",contracts:"ContractualCommitment","cross-session-leak":"CrossSessionLeak",cyberseceval:"CyberSecEval","debug-access":"DebugAccess",default:"Default","divergent-repetition":"DivergentRepetition","excessive-agency":"ExcessiveAgency",hallucination:"Hallucination",harmful:"Harmful","harmful:child-exploitation":"Child Exploitation","harmful:chemical-biological-weapons":"Chemical & Biological Weapons","harmful:copyright-violations":"Copyright Violations - Copyrighted text","harmful:cybercrime":"Cybercrime & Unauthorized Intrusion - Hacking and Malware","harmful:graphic-content":"Graphic & age-restricted content","harmful:harassment-bullying":"Harassment & Bullying","harmful:hate":"Hate","harmful:illegal-activities":"Illegal Activities - Fraud & scams","harmful:illegal-drugs":"Illegal Drugs","harmful:indiscriminate-weapons":"Indiscriminate Weapons","harmful:insults":"Insults and personal attacks","harmful:intellectual-property":"Intellectual Property violation","harmful:misinformation-disinformation":"Misinformation & Disinformation - Harmful lies and propaganda","harmful:non-violent-crime":"Non-Violent Crimes","harmful:privacy":"Privacy violations","harmful:profanity":"Requests containing profanity","harmful:radicalization":"Radicalization","harmful:self-harm":"Self-Harm","harmful:sex-crime":"Sex Crimes","harmful:sexual-content":"Sexual Content","harmful:specialized-advice":"Specialized Advice - Financial","harmful:unsafe-practices":"Promotion of unsafe practices","harmful:violent-crime":"Violent Crimes","harmful:illegal-drugs:meth":"Methamphetamine","harmful:cybercrime:malicious-code":"Malicious Code","harmful:weapons:ied":"Improvised Explosive Devices",hijacking:"Hijacking",imitation:"Imitation","indirect-prompt-injection":"Indirect Prompt Injection",intent:"Intent",overreliance:"Overreliance",pii:"PIILeak","pii:api-db":"PIILeak","pii:direct":"PIILeak","pii:session":"PIILeak","pii:social":"PIILeak",pliny:"Pliny",policy:"PolicyViolation",politics:"PoliticalStatement","prompt-extraction":"PromptExtraction",rbac:"RbacEnforcement",religion:"Religion","shell-injection":"ShellInjection","sql-injection":"SqlInjection",ssrf:"SSRFEnforcement","system-prompt-override":"System Prompt Override"},UL=Object.entries(Vh).reduce((e,[t,n])=>(e[n]=t,e),{}),ire={"ascii-smuggling":"Evaluates system resilience against Unicode tag-based instruction smuggling",base64:"Tests detection and handling of Base64-encoded malicious payloads",basic:"Establishes baseline security posture through fundamental test cases","best-of-n":"Jailbreak technique published by Anthropic and Stanford",citation:"Exploits academic authority bias to circumvent content filtering mechanisms",crescendo:"Executes progressive multi-turn attacks with escalating malicious intent",default:"Applies standard security testing methodology",goat:"Deploys dynamic attack generation using advanced adversarial techniques",jailbreak:"Optimizes single-turn attacks to bypass security controls","jailbreak:composite":"Chains multiple attack vectors for enhanced effectiveness","jailbreak:tree":"Implements tree-based search for optimal attack paths",leetspeak:"Assesses handling of leetspeak-encoded malicious content","math-prompt":"Tests resilience against mathematical notation-based attacks",multilingual:"Evaluates cross-language attack vector handling","prompt-injection":"Tests direct prompt injection vulnerability detection",rot13:"Assesses handling of ROT13-encoded malicious payloads"},ore={"ascii-smuggling":"ASCII Smuggling",base64:"Base64 Encoding",basic:"Basic","best-of-n":"Best-of-N",citation:"Authority Bias",crescendo:"Multi-turn Crescendo",default:"Basic",goat:"Generative Offensive Agent Tester","jailbreak:composite":"Composite Jailbreaks","jailbreak:tree":"Tree-based Optimization",jailbreak:"Single-shot Optimization",leetspeak:"Leetspeak Encoding","math-prompt":"Mathematical Encoding",multilingual:"Multilingual Encoding","prompt-injection":"Prompt Injection",rot13:"ROT13 Encoding"},uMe={Default:"Promptfoo recommended",NIST:"NIST AI Risk Management Framework","OWASP LLM":"OWASP LLM Top 10","OWASP API":"OWASP API Top 10",MITRE:"MITRE ATLAS framework",Custom:"Choose your own plugins"},hA=[...fy,...NL,...sMe].sort(),sre=oe.object({id:oe.union([oe.enum(hA).superRefine((e,t)=>{hA.includes(e)||t.addIssue({code:oe.ZodIssueCode.invalid_enum_value,options:hA,received:e,message:`Invalid plugin name. Must be one of: ${hA.join(", ")} (or a path starting with file://)`})}),oe.string().startsWith("file://",{message:"Custom plugins must start with file:// (or use one of the built-in plugins)"})]).describe("Name of the plugin"),numTests:oe.number().int().positive().default(eMe).describe("Number of tests to generate for this plugin"),config:oe.record(oe.unknown()).optional().describe("Plugin-specific configuration")}),fMe=oe.union([oe.union([oe.enum(hA).superRefine((e,t)=>{hA.includes(e)||t.addIssue({code:oe.ZodIssueCode.invalid_enum_value,options:hA,received:e,message:`Invalid plugin name. Must be one of: ${hA.join(", ")} (or a path starting with file://)`})}),oe.string().startsWith("file://",{message:"Custom plugins must start with file:// (or use one of the built-in plugins)"})]).describe("Name of the plugin or path to custom plugin"),sre]),Q7=oe.union([oe.enum(Xd).superRefine((e,t)=>{Xd.includes(e)||t.addIssue({code:oe.ZodIssueCode.invalid_enum_value,options:[...Xd],received:e,message:`Invalid strategy name. Must be one of: ${[...Xd].join(", ")} (or a path starting with file://)`})}),oe.string().refine(e=>e.startsWith("file://")&&kM(e),{message:`Custom strategies must start with file:// and end with .js or .ts, or use one of the built-in strategies: ${[...Xd].join(", ")}`})]).describe("Name of the strategy"),are=oe.union([Q7,oe.object({id:Q7,config:oe.record(oe.unknown()).optional().describe("Strategy-specific configuration")})]);oe.object({addPlugins:oe.array(oe.enum(tre)).optional().describe("Additional plugins to include"),addStrategies:oe.array(oe.enum(rre)).optional().describe("Additional strategies to include"),cache:oe.boolean().describe("Whether to use caching"),config:oe.string().optional().describe("Path to the configuration file"),defaultConfig:oe.record(oe.unknown()).describe("Default configuration object"),defaultConfigPath:oe.string().optional().describe("Path to the default configuration file"),delay:oe.number().int().nonnegative().optional().describe("Delay in milliseconds between plugin API calls"),envFile:oe.string().optional().describe("Path to the environment file"),force:oe.boolean().describe("Whether to force generation").default(!1),injectVar:oe.string().optional().describe("Variable to inject"),language:oe.string().optional().describe("Language of tests to generate"),maxConcurrency:oe.number().int().positive().optional().describe("Maximum number of concurrent API calls"),numTests:oe.number().int().positive().optional().describe("Number of tests to generate"),output:oe.string().optional().describe("Output file path"),plugins:oe.array(sre).optional().describe("Plugins to use"),provider:oe.string().optional().describe("Provider to use"),purpose:oe.string().optional().describe("Purpose of the redteam generation"),strategies:oe.array(are).optional().describe("Strategies to use"),write:oe.boolean().describe("Whether to write the output")});const AMe=oe.object({injectVar:oe.string().optional().describe("Variable to inject. Can be a string or array of strings. If string, it's transformed to an array. Inferred from the prompts by default."),purpose:oe.string().optional().describe("Purpose override string - describes the prompt templates"),provider:Yje.optional().describe("Provider used for generating adversarial inputs"),numTests:oe.number().int().positive().optional().describe("Number of tests to generate"),language:oe.string().optional().describe("Language of tests ot generate for this plugin"),entities:oe.array(oe.string()).optional().describe("Names of people, brands, or organizations related to your LLM application"),plugins:oe.array(fMe).describe("Plugins to use for redteam generation").default(["default"]),strategies:oe.array(are).describe(ML`Strategies to use for redteam generation.
|
|
434
434
|
|
|
435
435
|
Defaults to ${gb.join(", ")}
|
|
436
436
|
Supports ${Xd.join(", ")}
|
|
437
|
-
`).optional().default(["default"]),maxConcurrency:oe.number().int().positive().optional().describe("Maximum number of concurrent API calls"),delay:oe.number().int().nonnegative().optional().describe("Delay in milliseconds between plugin API calls")}).transform(e=>{const t=new Map,n=new Set,r=(c,u,f)=>{const d=`${c}:${JSON.stringify(u)}`,A={id:c};(f!==void 0||e.numTests!==void 0)&&(A.numTests=f??e.numTests),u!==void 0&&(A.config=u),t.set(d,A)},i=(c,u,f)=>{(Array.isArray(c)?c:Array.from(c)).forEach(d=>{const A=t.get(`${d}:${JSON.stringify(u)}`);(!A||A.numTests===void 0)&&r(d,u,f)})},o=(c,u,f)=>{c==="harmful"?i(Object.keys(bN),u,f):c==="pii"?i([...ere],u,f):c==="default"&&i([...p5],u,f)},s=c=>{const u=typeof c=="string"?{id:c,numTests:e.numTests,config:void 0}:{...c,numTests:c.numTests??e.numTests};if(om[u.id])Object.values(om[u.id]).forEach(({plugins:f,strategies:d})=>{f.forEach(A=>{fy.includes(A)?o(A,u.config,u.numTests):r(A,u.config,u.numTests)}),d.forEach(A=>n.add(A))});else if(fy.includes(u.id))o(u.id,u.config,u.numTests);else{const f=Object.entries(om).find(([,d])=>Object.keys(d).includes(u.id));if(f){const[,d]=f;d[u.id].plugins.forEach(A=>{fy.includes(A)?o(A,u.config,u.numTests):r(A,u.config,u.numTests)}),d[u.id].strategies.forEach(A=>n.add(A))}else r(u.id,u.config,u.numTests)}};e.plugins.forEach(s);const a=Array.from(t.values()).filter(c=>!fy.includes(c.id)).sort((c,u)=>c.id!==u.id?c.id.localeCompare(u.id):JSON.stringify(c.config||{}).localeCompare(JSON.stringify(u.config||{}))),l=Array.from(new Set([...e.strategies||[],...Array.from(n)].flatMap(c=>typeof c=="string"?c==="basic"?[]:c==="default"?gb.map(u=>({id:u})):[{id:c}]:[c]))).sort((c,u)=>c.id.localeCompare(u.id));return{numTests:e.numTests,plugins:a,strategies:l,...e.delay?{delay:e.delay}:{},...e.entities?{entities:e.entities}:{},...e.injectVar?{injectVar:e.injectVar}:{},...e.language?{language:e.language}:{},...e.provider?{provider:e.provider}:{},...e.purpose?{purpose:e.purpose}:{}}});function dMe(e){return typeof e=="object"&&e!=null&&"id"in e&&typeof e.id=="string"}const hMe=oe.object({description:oe.string().optional(),prompts:oe.array(oe.string()).optional(),providers:oe.array(oe.string()),output:oe.array(oe.string()),maxConcurrency:oe.coerce.number().int().positive().optional(),repeat:oe.coerce.number().int().positive().optional(),delay:oe.coerce.number().int().nonnegative().default(0),vars:oe.string().optional(),tests:oe.string().optional(),config:oe.array(oe.string()).optional(),assertions:oe.string().optional(),modelOutputs:oe.string().optional(),verbose:oe.boolean().optional(),grader:oe.string().optional(),tableCellMaxLength:oe.coerce.number().int().positive().optional(),write:oe.boolean().optional(),cache:oe.boolean().optional(),table:oe.boolean().optional(),share:oe.boolean().optional(),progressBar:oe.boolean().optional(),watch:oe.boolean().optional(),filterFailing:oe.string().optional(),filterFirstN:oe.coerce.number().int().positive().optional(),filterMetadata:oe.string().optional(),filterPattern:oe.string().optional(),filterProviders:oe.string().optional(),filterSample:oe.coerce.number().int().positive().optional(),filterTargets:oe.string().optional(),var:oe.record(oe.string()).optional(),generateSuggestions:oe.boolean().optional(),promptPrefix:oe.string().optional(),promptSuffix:oe.string().optional(),envPath:oe.string().optional()}),pMe=oe.object({rubricPrompt:oe.union([oe.string(),oe.array(oe.string()),oe.array(oe.object({role:oe.string(),content:oe.string()}))]).optional(),provider:oe.union([oe.string(),oe.any(),oe.record(oe.string(),oe.union([oe.string(),oe.any()])).optional()]).optional(),factuality:oe.object({subset:oe.number().optional(),superset:oe.number().optional(),agree:oe.number().optional(),disagree:oe.number().optional(),differButFactual:oe.number().optional()}).optional()}),gMe=oe.object({postprocess:oe.string().optional(),transform:oe.string().optional(),transformVars:oe.string().optional(),storeOutputAs:oe.string().optional()}),mMe=oe.object({cache:oe.boolean().optional(),delay:oe.number().optional(),eventSource:oe.string().optional(),generateSuggestions:oe.boolean().optional(),interactiveProviders:oe.boolean().optional(),maxConcurrency:oe.number().optional(),progressCallback:oe.function(oe.tuple([oe.number(),oe.number(),oe.number(),oe.custom()]),oe.void()).optional(),repeat:oe.number().optional(),showProgressBar:oe.boolean().optional()}),vMe=oe.object({score:oe.number(),testPassCount:oe.number(),testFailCount:oe.number(),testErrorCount:oe.number(),assertPassCount:oe.number(),assertFailCount:oe.number(),totalLatencyMs:oe.number(),tokenUsage:h5,namedScores:oe.record(oe.string(),oe.number()),namedScoresCount:oe.record(oe.string(),oe.number()),redteam:oe.object({pluginPassCount:oe.record(oe.string(),oe.number()),pluginFailCount:oe.record(oe.string(),oe.number()),strategyPassCount:oe.record(oe.string(),oe.number()),strategyFailCount:oe.record(oe.string(),oe.number())}).optional(),cost:oe.number()}),yMe=d5.extend({provider:oe.string(),metrics:vMe.optional()});var p0=(e=>(e[e.NONE=0]="NONE",e[e.ASSERT=1]="ASSERT",e[e.ERROR=2]="ERROR",e))(p0||{});const _N=oe.enum(["answer-relevance","bleu","classifier","contains-all","contains-any","contains-json","contains-sql","contains-xml","contains","context-faithfulness","context-recall","context-relevance","cost","equals","factuality","g-eval","icontains-all","icontains-any","icontains","is-json","is-refusal","is-sql","is-valid-openai-function-call","is-valid-openai-tools-call","is-xml","javascript","latency","levenshtein","llm-rubric","model-graded-closedqa","model-graded-factuality","moderation","perplexity-score","perplexity","python","regex","rouge-n","similar","starts-with","webhook"]),bMe=oe.enum(["select-best","human"]),wMe=_N.transform(e=>`not-${e}`),xMe=oe.union([_N,wMe,bMe,oe.custom()]),CMe=oe.object({type:oe.literal("assert-set"),assert:oe.array(oe.lazy(()=>lre)),weight:oe.number().optional(),metric:oe.string().optional(),threshold:oe.number().optional()}),lre=oe.object({type:xMe,value:oe.custom().optional(),config:oe.record(oe.string(),oe.any()).optional(),threshold:oe.number().optional(),weight:oe.number().optional(),provider:oe.custom().optional(),rubricPrompt:oe.custom().optional(),metric:oe.string().optional(),transform:oe.string().optional()}),SMe=oe.object({prompt:yMe,id:oe.string(),evalId:oe.string()}),_Me=oe.record(oe.string(),oe.union([oe.string().transform(e=>[e]),oe.array(oe.string())])),cre=oe.record(oe.string(),oe.any()),ure=oe.record(oe.union([oe.string(),oe.number().transform(String),oe.boolean().transform(String),oe.array(oe.union([oe.string(),oe.number().transform(String),oe.boolean().transform(String)])),oe.object({}),oe.array(oe.any())])),bf=oe.object({description:oe.string().optional(),vars:ure.optional(),provider:oe.union([oe.string(),N_,yN]).optional(),providerOutput:oe.union([oe.string(),oe.object({})]).optional(),assert:oe.array(oe.union([CMe,lre])).optional(),options:oe.intersection(oe.intersection(qje,gMe),oe.intersection(pMe,oe.object({disableVarExpansion:oe.boolean().optional(),disableConversationVar:oe.boolean().optional(),runSerially:oe.boolean().optional()}))).optional(),threshold:oe.number().optional(),metadata:oe.intersection(cre,oe.object({pluginConfig:oe.custom().optional(),strategyConfig:oe.custom().optional()})).optional()});bf.extend({vars:oe.union([ure,oe.string(),oe.array(oe.string())]).optional()});oe.object({id:oe.string(),testCases:oe.union([oe.string(),oe.array(oe.union([oe.string(),bf]))]),recentEvalDate:oe.date(),recentEvalId:oe.string(),count:oe.number(),prompts:oe.array(SMe)});const fre=oe.object({description:oe.string().optional(),config:oe.array(bf.partial()),tests:oe.array(bf)});bf.extend({vars:oe.record(oe.union([oe.string(),oe.object({})])).optional()}).strict();const Are=oe.object({name:oe.string(),value:oe.union([oe.string(),oe.function().args(oe.record(oe.string(),oe.number()),oe.custom()).returns(oe.number())])});oe.object({tags:oe.record(oe.string(),oe.string()).optional(),description:oe.string().optional(),providers:oe.array(yN),prompts:oe.array(d5),providerPromptMap:_Me.optional(),tests:oe.array(bf).optional(),scenarios:oe.array(fre).optional(),defaultTest:bf.partial().optional(),nunjucksFilters:Jne.optional(),env:vN.optional(),derivedMetrics:oe.array(Are).optional(),extensions:oe.array(oe.string().refine(e=>e.startsWith("file://"),{message:"Extension must start with file://"}).refine(e=>{const t=e.split(":");return t.length===3&&t.every(n=>n.trim()!=="")},{message:"Extension must be of the form file://path/to/file.py:function_name"}).refine(e=>{const t=e.split(":");return(t[1].endsWith(".py")||kM(t[1]))&&(t.length===3||t.length===2)},{message:"Extension must be a python (.py) or javascript (.js, .ts, .mjs, .cjs, etc.) file followed by a colon and function name"})).optional(),redteam:oe.custom().optional()});const BMe=oe.object({tags:oe.record(oe.string(),oe.string()).optional(),description:oe.string().optional(),providers:jL,prompts:oe.union([oe.string(),oe.array(oe.union([oe.string(),oe.object({id:oe.string(),label:oe.string().optional(),raw:oe.string().optional()}),d5])),oe.record(oe.string(),oe.string())]),tests:oe.union([oe.string(),oe.array(oe.union([oe.string(),bf]))]).optional(),scenarios:oe.array(oe.union([oe.string(),fre])).optional(),defaultTest:bf.partial().omit({description:!0}).optional(),outputPath:oe.union([oe.string(),oe.array(oe.string())]).optional(),sharing:oe.union([oe.boolean(),oe.object({apiBaseUrl:oe.string().optional(),appBaseUrl:oe.string().optional()})]).optional(),nunjucksFilters:oe.record(oe.string(),oe.string()).optional(),env:vN.optional(),derivedMetrics:oe.array(Are).optional(),extensions:oe.array(oe.string()).optional(),metadata:cre.optional(),redteam:AMe.optional(),writeLatestResults:oe.boolean().optional()});BMe.extend({evaluateOptions:mMe.optional(),commandLineOptions:hMe.partial().optional(),providers:jL.optional(),targets:jL.optional()}).refine(e=>{const t=!!e.targets,n=!!e.providers;return t&&!n||!t&&n},{message:"Exactly one of 'targets' or 'providers' must be provided, but not both"}).transform(e=>(e.targets&&!e.providers&&(e.providers=e.targets,delete e.targets),e));oe.enum(["csv","html","json","jsonl","txt","yaml","yml"]);const EMe=.8;let SF=null;function kMe(){if(!SF){const e=_N.options.join("|");SF=new RegExp(`^(not-)?(${e})(?:\\((\\d+(?:\\.\\d+)?)\\))?(?::([\\s\\S]*))?$`)}return SF}function IMe(e){if(e.startsWith("javascript:")||e.startsWith("fn:")||e.startsWith("eval:")){let n;return e.startsWith("javascript:")&&(n=11),e.startsWith("fn:")&&(n=3),e.startsWith("eval:")&&(n=5),{type:"javascript",value:e.slice(n).trim()}}if(e.startsWith("grade:")||e.startsWith("llm-rubric:"))return{type:"llm-rubric",value:e.slice(e.startsWith("grade:")?6:11)};if(e.startsWith("python:")||e.startsWith("file://")&&(e.endsWith(".py")||e.includes(".py:"))){const n=(e.startsWith("python:"),7);return{type:"python",value:e.slice(n).trim()}}const t=e.match(kMe());if(t){const[n,r,i,o,s]=t,a=r?`not-${i}`:i,l=Number.parseFloat(o);return i==="contains-all"||i==="contains-any"||i==="icontains-all"||i==="icontains-any"?{type:a,value:s.split(",").map(c=>c.trim())}:i==="contains-json"||i==="is-json"?{type:a,value:s}:i==="answer-relevance"||i==="classifier"||i==="context-faithfulness"||i==="context-recall"||i==="context-relevance"||i==="cost"||i==="latency"||i==="levenshtein"||i==="perplexity-score"||i==="perplexity"||i==="rouge-n"||i==="similar"||i==="starts-with"?{type:a,value:s,threshold:l||(i==="similar"?EMe:.75)}:{type:a,value:s}}return{type:"equals",value:e}}const H7=new Set;function FMe(e){const t={},n=[],r={};let i,o,s,a;const l=["expected","prefix","suffix","description","providerOutput","metric","threshold"].map(c=>`_${c}`);for(const[c,u]of Object.entries(e)){if(!c.startsWith("__")&&l.some(f=>c.startsWith(f))&&!H7.has(c)){const f=`You used a single underscore for the key "${c}". Did you mean to use "${c.replace("_","__")}" instead?`;H7.add(c),VC.warn(f)}c.startsWith("__expected")?u.trim()!==""&&n.push(IMe(u)):c==="__prefix"?r.prefix=u:c==="__suffix"?r.suffix=u:c==="__description"?o=u:c==="__providerOutput"?i=u:c==="__metric"?s=u:c==="__threshold"?a=Number.parseFloat(u):t[c]=u}for(const c of n)c.metric=s;return{vars:t,assert:n,options:r,...o?{description:o}:{},...i?{providerOutput:i}:{},...a?{threshold:a}:{}}}const TMe=["equals","contains","icontains","contains-all","contains-any","starts-with","regex","is-json","contains-json","is-xml","contains-xml","is-sql","contains-sql","similar","llm-rubric","model-graded-closedqa","factuality","webhook","bleu","rouge-n","g-eval","not-equals","not-contains","not-icontains","not-contains-all","not-contains-any","not-starts-with","not-regex","not-is-json","not-contains-json","not-similar","not-webhook","not-rouge-n","is-valid-openai-function-call","is-valid-openai-tools-call","latency","perplexity","perplexity-score","cost","answer-relevance","context-faithfulness","context-recall","context-relevance","select-best","moderation"],RMe=({onAdd:e,initialValues:t})=>{const[n,r]=j.useState(t||[]),i=()=>{const s=[...n,{type:"equals",value:""}];r(s),e(s)},o=s=>{const a=n.filter((l,c)=>c!==s);r(a),e(a)};return h.jsxs(h.Fragment,{children:[h.jsx(Le,{variant:"h6",children:"Asserts"}),h.jsx(De,{my:n.length>0?2:0,children:h.jsx(cr,{direction:"column",spacing:2,children:n.map((s,a)=>h.jsxs(cr,{direction:"row",spacing:2,alignItems:"center",children:[h.jsx(Ig,{value:s.type,options:TMe,sx:{minWidth:200},onChange:(l,c)=>{const u=c,f=n.map((d,A)=>A===a?{...d,type:u}:d);r(f),e(f)},renderInput:l=>h.jsx(Wt,{...l,label:"Type"})}),h.jsx(Wt,{label:"Value",value:s.value,fullWidth:!0,onChange:l=>{const c=l.target.value,u=n.map((f,d)=>d===a?{...f,value:c}:f);r(u),e(u)}}),h.jsx(fn,{onClick:()=>o(a),size:"small",children:h.jsx(Sf,{})})]},a))})}),h.jsx(gt,{color:"primary",onClick:i,children:"Add Assert"})]})},PMe=({onAdd:e,varsList:t,initialValues:n})=>{const[r,i]=st.useState(n||{});return j.useEffect(()=>{const o={};t.forEach(s=>{o[s]=(n==null?void 0:n[s])||""}),i(o)},[t,n]),h.jsxs(De,{my:2,children:[h.jsx(Le,{variant:"h6",mb:2,children:"Vars"}),t.length>0?h.jsx(cr,{direction:"row",spacing:2,alignItems:"center",children:Object.keys(r).map((o,s)=>h.jsx(cr,{direction:"row",spacing:2,alignItems:"center",children:h.jsx(Wt,{placeholder:o,label:o,value:r[o],fullWidth:!0,onChange:a=>{const l=a.target.value,c={...r,[o]:l};i(c),e(c)}})},s))}):h.jsxs(Le,{variant:"subtitle1",gutterBottom:!0,children:["Add variables to your prompt using the ","{{varname}}"," syntax."]})]})},LMe=({open:e,onAdd:t,varsList:n,initialValues:r,onCancel:i})=>{const[o,s]=j.useState((r==null?void 0:r.description)||""),[a,l]=j.useState((r==null?void 0:r.vars)||{}),[c,u]=j.useState((r==null?void 0:r.assert)||[]),[f,d]=j.useState(0);st.useEffect(()=>{r?(s(r.description||""),l(r.vars||{}),u(r.assert||[])):(s(""),l({}),u([]))},[r]);const A=p=>{t({description:o,vars:a,assert:c},p),p&&i(),s(""),l({}),u([]),d(m=>m+1)};return h.jsxs(zn,{open:e,onClose:i,fullWidth:!0,maxWidth:"md",children:[h.jsx(qn,{children:r?"Edit Test Case":"Add Test Case"}),h.jsx(Vn,{children:h.jsxs(De,{children:[h.jsx(PMe,{onAdd:p=>l(p),varsList:n,initialValues:r==null?void 0:r.vars}),h.jsx(RMe,{onAdd:p=>u(p),initialValues:((r==null?void 0:r.assert)||[]).filter(p=>p.type!=="assert-set")||[]},f)]})}),h.jsxs(Sr,{children:[h.jsx(gt,{onClick:A.bind(void 0,!0),color:"primary",variant:"contained",children:r?"Update Test Case":"Add Test Case"}),!r&&h.jsx(gt,{onClick:A.bind(void 0,!1),color:"primary",variant:"contained",children:"Add Another"}),h.jsx(gt,{onClick:i,color:"secondary",children:"Cancel"})]})]})},OMe=({varsList:e})=>{const{testCases:t,setTestCases:n}=VA(),[r,i]=st.useState(null),[o,s]=st.useState(!1),a=(f,d)=>{if(r===null)n([...t,f]);else{const A=t.map((p,m)=>m===r?f:p);n(A),i(null)}d&&s(!1)},l=f=>{var A;f.stopPropagation(),f.preventDefault();const d=(A=f.target.files)==null?void 0:A[0];if(d){const p=new FileReader;p.onload=async m=>{var v,g;const b=(g=(v=m.target)==null?void 0:v.result)==null?void 0:g.toString();if(b){const{parse:y}=await Q1(async()=>{const{parse:C}=await import("./sync-DDIaa9Ut.js");return{parse:C}},[]),x=y(b,{columns:!0}).map(C=>FMe(C));n([...t,...x])}},p.readAsText(d)}},c=(f,d)=>{f.stopPropagation(),confirm("Are you sure you want to delete this test case?")&&n(t.filter((A,p)=>p!==d))},u=(f,d)=>{f.stopPropagation();const A=JSON.parse(JSON.stringify(t[d]));n([...t,A])};return h.jsxs(h.Fragment,{children:[h.jsxs(cr,{direction:"row",spacing:2,mb:2,justifyContent:"space-between",children:[h.jsx(Le,{variant:"h5",children:"Test Cases"}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"file-input-add-test-case",children:h.jsx(gn,{title:"Upload test cases from csv",children:h.jsxs("span",{children:[h.jsx(fn,{component:"span",children:h.jsx(gee,{})}),h.jsx("input",{id:"file-input-add-test-case",type:"file",accept:".csv",onChange:l,style:{display:"none"}})]})})}),h.jsx(gt,{color:"primary",onClick:()=>s(!0),variant:"contained",children:"Add Test Case"})]})]}),h.jsx(ic,{children:h.jsxs(zs,{children:[h.jsx(_a,{children:h.jsxs(ur,{children:[h.jsx(ht,{children:"Description"}),h.jsx(ht,{children:"Assertions"}),h.jsx(ht,{children:"Variables"}),h.jsx(ht,{align:"right"})]})}),h.jsx(Vs,{children:t.length===0?h.jsx(ur,{children:h.jsx(ht,{colSpan:4,align:"center",children:"No test cases added yet."})}):t.map((f,d)=>{var A;return h.jsxs(ur,{sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)",cursor:"pointer"}},onClick:()=>{i(d),s(!0)},children:[h.jsx(ht,{children:h.jsx(Le,{variant:"body2",children:f.description||`Test Case #${d+1}`})}),h.jsxs(ht,{children:[((A=f.assert)==null?void 0:A.length)||0," assertions"]}),h.jsx(ht,{children:Object.entries(f.vars||{}).map(([p,m])=>p+"="+m).join(", ")}),h.jsxs(ht,{align:"right",sx:{minWidth:150},children:[h.jsx(fn,{onClick:()=>{i(d),s(!0)},size:"small",children:h.jsx(rw,{})}),h.jsx(fn,{onClick:p=>u(p,d),size:"small",children:h.jsx(au,{})}),h.jsx(fn,{onClick:p=>c(p,d),size:"small",children:h.jsx(Sf,{})})]})]},d)})})]})}),h.jsx(LMe,{open:o,onAdd:a,varsList:e,initialValues:r===null?void 0:t[r],onCancel:()=>{i(null),s(!1)}})]})};var dre={},no=pn&&pn.__assign||function(){return no=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},no.apply(this,arguments)},jMe=pn&&pn.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),MMe=pn&&pn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),NMe=pn&&pn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&jMe(t,e,n);return MMe(t,e),t},UMe=pn&&pn.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(dre,"__esModule",{value:!0});var Ua=NMe(j),DMe=89,l2=90,$Me=77,z7=57,V7=219,q7=222,W7=192,K7=100,QMe=3e3,HMe=typeof window<"u"&&"navigator"in window&&/Win/i.test(navigator.platform),_F=typeof window<"u"&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),qC="npm__react-simple-code-editor__textarea",zMe=`
|
|
437
|
+
`).optional().default(["default"]),maxConcurrency:oe.number().int().positive().optional().describe("Maximum number of concurrent API calls"),delay:oe.number().int().nonnegative().optional().describe("Delay in milliseconds between plugin API calls")}).transform(e=>{const t=new Map,n=new Set,r=(c,u,f)=>{const d=`${c}:${JSON.stringify(u)}`,A={id:c};(f!==void 0||e.numTests!==void 0)&&(A.numTests=f??e.numTests),u!==void 0&&(A.config=u),t.set(d,A)},i=(c,u,f)=>{(Array.isArray(c)?c:Array.from(c)).forEach(d=>{const A=t.get(`${d}:${JSON.stringify(u)}`);(!A||A.numTests===void 0)&&r(d,u,f)})},o=(c,u,f)=>{c==="harmful"?i(Object.keys(bN),u,f):c==="pii"?i([...ere],u,f):c==="default"&&i([...p5],u,f)},s=c=>{const u=typeof c=="string"?{id:c,numTests:e.numTests,config:void 0}:{...c,numTests:c.numTests??e.numTests};if(om[u.id])Object.values(om[u.id]).forEach(({plugins:f,strategies:d})=>{f.forEach(A=>{fy.includes(A)?o(A,u.config,u.numTests):r(A,u.config,u.numTests)}),d.forEach(A=>n.add(A))});else if(fy.includes(u.id))o(u.id,u.config,u.numTests);else{const f=Object.entries(om).find(([,d])=>Object.keys(d).includes(u.id));if(f){const[,d]=f;d[u.id].plugins.forEach(A=>{fy.includes(A)?o(A,u.config,u.numTests):r(A,u.config,u.numTests)}),d[u.id].strategies.forEach(A=>n.add(A))}else r(u.id,u.config,u.numTests)}};e.plugins.forEach(s);const a=Array.from(t.values()).filter(c=>!fy.includes(c.id)).sort((c,u)=>c.id!==u.id?c.id.localeCompare(u.id):JSON.stringify(c.config||{}).localeCompare(JSON.stringify(u.config||{}))),l=Array.from(new Set([...e.strategies||[],...Array.from(n)].flatMap(c=>typeof c=="string"?c==="basic"?[]:c==="default"?gb.map(u=>({id:u})):[{id:c}]:[c]))).sort((c,u)=>c.id.localeCompare(u.id));return{numTests:e.numTests,plugins:a,strategies:l,...e.delay?{delay:e.delay}:{},...e.entities?{entities:e.entities}:{},...e.injectVar?{injectVar:e.injectVar}:{},...e.language?{language:e.language}:{},...e.provider?{provider:e.provider}:{},...e.purpose?{purpose:e.purpose}:{}}});function dMe(e){return typeof e=="object"&&e!=null&&"id"in e&&typeof e.id=="string"}const hMe=oe.object({description:oe.string().optional(),prompts:oe.array(oe.string()).optional(),providers:oe.array(oe.string()),output:oe.array(oe.string()),maxConcurrency:oe.coerce.number().int().positive().optional(),repeat:oe.coerce.number().int().positive().optional(),delay:oe.coerce.number().int().nonnegative().default(0),vars:oe.string().optional(),tests:oe.string().optional(),config:oe.array(oe.string()).optional(),assertions:oe.string().optional(),modelOutputs:oe.string().optional(),verbose:oe.boolean().optional(),grader:oe.string().optional(),tableCellMaxLength:oe.coerce.number().int().positive().optional(),write:oe.boolean().optional(),cache:oe.boolean().optional(),table:oe.boolean().optional(),share:oe.boolean().optional(),progressBar:oe.boolean().optional(),watch:oe.boolean().optional(),filterFailing:oe.string().optional(),filterFirstN:oe.coerce.number().int().positive().optional(),filterMetadata:oe.string().optional(),filterPattern:oe.string().optional(),filterProviders:oe.string().optional(),filterSample:oe.coerce.number().int().positive().optional(),filterTargets:oe.string().optional(),var:oe.record(oe.string()).optional(),generateSuggestions:oe.boolean().optional(),promptPrefix:oe.string().optional(),promptSuffix:oe.string().optional(),envPath:oe.string().optional()}),pMe=oe.object({rubricPrompt:oe.union([oe.string(),oe.array(oe.string()),oe.array(oe.object({role:oe.string(),content:oe.string()}))]).optional(),provider:oe.union([oe.string(),oe.any(),oe.record(oe.string(),oe.union([oe.string(),oe.any()])).optional()]).optional(),factuality:oe.object({subset:oe.number().optional(),superset:oe.number().optional(),agree:oe.number().optional(),disagree:oe.number().optional(),differButFactual:oe.number().optional()}).optional()}),gMe=oe.object({postprocess:oe.string().optional(),transform:oe.string().optional(),transformVars:oe.string().optional(),storeOutputAs:oe.string().optional()}),mMe=oe.object({cache:oe.boolean().optional(),delay:oe.number().optional(),eventSource:oe.string().optional(),generateSuggestions:oe.boolean().optional(),interactiveProviders:oe.boolean().optional(),maxConcurrency:oe.number().optional(),progressCallback:oe.function(oe.tuple([oe.number(),oe.number(),oe.number(),oe.custom()]),oe.void()).optional(),repeat:oe.number().optional(),showProgressBar:oe.boolean().optional()}),vMe=oe.object({score:oe.number(),testPassCount:oe.number(),testFailCount:oe.number(),testErrorCount:oe.number(),assertPassCount:oe.number(),assertFailCount:oe.number(),totalLatencyMs:oe.number(),tokenUsage:h5,namedScores:oe.record(oe.string(),oe.number()),namedScoresCount:oe.record(oe.string(),oe.number()),redteam:oe.object({pluginPassCount:oe.record(oe.string(),oe.number()),pluginFailCount:oe.record(oe.string(),oe.number()),strategyPassCount:oe.record(oe.string(),oe.number()),strategyFailCount:oe.record(oe.string(),oe.number())}).optional(),cost:oe.number()}),yMe=d5.extend({provider:oe.string(),metrics:vMe.optional()});var p0=(e=>(e[e.NONE=0]="NONE",e[e.ASSERT=1]="ASSERT",e[e.ERROR=2]="ERROR",e))(p0||{});const _N=oe.enum(["answer-relevance","bleu","classifier","contains-all","contains-any","contains-json","contains-sql","contains-xml","contains","context-faithfulness","context-recall","context-relevance","cost","equals","factuality","g-eval","icontains-all","icontains-any","icontains","is-json","is-refusal","is-sql","is-valid-openai-function-call","is-valid-openai-tools-call","is-xml","javascript","latency","levenshtein","llm-rubric","model-graded-closedqa","model-graded-factuality","moderation","perplexity-score","perplexity","python","regex","rouge-n","similar","starts-with","webhook"]),bMe=oe.enum(["select-best","human"]),wMe=_N.transform(e=>`not-${e}`),xMe=oe.union([_N,wMe,bMe,oe.custom()]),CMe=oe.object({type:oe.literal("assert-set"),assert:oe.array(oe.lazy(()=>lre)),weight:oe.number().optional(),metric:oe.string().optional(),threshold:oe.number().optional()}),lre=oe.object({type:xMe,value:oe.custom().optional(),config:oe.record(oe.string(),oe.any()).optional(),threshold:oe.number().optional(),weight:oe.number().optional(),provider:oe.custom().optional(),rubricPrompt:oe.custom().optional(),metric:oe.string().optional(),transform:oe.string().optional()}),SMe=oe.object({prompt:yMe,id:oe.string(),evalId:oe.string()}),_Me=oe.record(oe.string(),oe.union([oe.string().transform(e=>[e]),oe.array(oe.string())])),cre=oe.record(oe.string(),oe.any()),ure=oe.record(oe.union([oe.string(),oe.number().transform(String),oe.boolean().transform(String),oe.array(oe.union([oe.string(),oe.number().transform(String),oe.boolean().transform(String)])),oe.object({}),oe.array(oe.any())])),bf=oe.object({description:oe.string().optional(),vars:ure.optional(),provider:oe.union([oe.string(),N_,yN]).optional(),providerOutput:oe.union([oe.string(),oe.object({})]).optional(),assert:oe.array(oe.union([CMe,lre])).optional(),options:oe.intersection(oe.intersection(qje,gMe),oe.intersection(pMe,oe.object({disableVarExpansion:oe.boolean().optional(),disableConversationVar:oe.boolean().optional(),runSerially:oe.boolean().optional()}))).optional(),threshold:oe.number().optional(),metadata:oe.intersection(cre,oe.object({pluginConfig:oe.custom().optional(),strategyConfig:oe.custom().optional()})).optional()});bf.extend({vars:oe.union([ure,oe.string(),oe.array(oe.string())]).optional()});oe.object({id:oe.string(),testCases:oe.union([oe.string(),oe.array(oe.union([oe.string(),bf]))]),recentEvalDate:oe.date(),recentEvalId:oe.string(),count:oe.number(),prompts:oe.array(SMe)});const fre=oe.object({description:oe.string().optional(),config:oe.array(bf.partial()),tests:oe.array(bf)});bf.extend({vars:oe.record(oe.union([oe.string(),oe.object({})])).optional()}).strict();const Are=oe.object({name:oe.string(),value:oe.union([oe.string(),oe.function().args(oe.record(oe.string(),oe.number()),oe.custom()).returns(oe.number())])});oe.object({tags:oe.record(oe.string(),oe.string()).optional(),description:oe.string().optional(),providers:oe.array(yN),prompts:oe.array(d5),providerPromptMap:_Me.optional(),tests:oe.array(bf).optional(),scenarios:oe.array(fre).optional(),defaultTest:bf.partial().optional(),nunjucksFilters:Jne.optional(),env:vN.optional(),derivedMetrics:oe.array(Are).optional(),extensions:oe.array(oe.string().refine(e=>e.startsWith("file://"),{message:"Extension must start with file://"}).refine(e=>{const t=e.split(":");return t.length===3&&t.every(n=>n.trim()!=="")},{message:"Extension must be of the form file://path/to/file.py:function_name"}).refine(e=>{const t=e.split(":");return(t[1].endsWith(".py")||kM(t[1]))&&(t.length===3||t.length===2)},{message:"Extension must be a python (.py) or javascript (.js, .ts, .mjs, .cjs, etc.) file followed by a colon and function name"})).optional(),redteam:oe.custom().optional()});const BMe=oe.object({tags:oe.record(oe.string(),oe.string()).optional(),description:oe.string().optional(),providers:jL,prompts:oe.union([oe.string(),oe.array(oe.union([oe.string(),oe.object({id:oe.string(),label:oe.string().optional(),raw:oe.string().optional()}),d5])),oe.record(oe.string(),oe.string())]),tests:oe.union([oe.string(),oe.array(oe.union([oe.string(),bf]))]).optional(),scenarios:oe.array(oe.union([oe.string(),fre])).optional(),defaultTest:bf.partial().omit({description:!0}).optional(),outputPath:oe.union([oe.string(),oe.array(oe.string())]).optional(),sharing:oe.union([oe.boolean(),oe.object({apiBaseUrl:oe.string().optional(),appBaseUrl:oe.string().optional()})]).optional(),nunjucksFilters:oe.record(oe.string(),oe.string()).optional(),env:vN.optional(),derivedMetrics:oe.array(Are).optional(),extensions:oe.array(oe.string()).optional(),metadata:cre.optional(),redteam:AMe.optional(),writeLatestResults:oe.boolean().optional()});BMe.extend({evaluateOptions:mMe.optional(),commandLineOptions:hMe.partial().optional(),providers:jL.optional(),targets:jL.optional()}).refine(e=>{const t=!!e.targets,n=!!e.providers;return t&&!n||!t&&n},{message:"Exactly one of 'targets' or 'providers' must be provided, but not both"}).transform(e=>(e.targets&&!e.providers&&(e.providers=e.targets,delete e.targets),e));oe.enum(["csv","html","json","jsonl","txt","yaml","yml"]);const EMe=.8;let SF=null;function kMe(){if(!SF){const e=_N.options.join("|");SF=new RegExp(`^(not-)?(${e})(?:\\((\\d+(?:\\.\\d+)?)\\))?(?::([\\s\\S]*))?$`)}return SF}function IMe(e){if(e.startsWith("javascript:")||e.startsWith("fn:")||e.startsWith("eval:")){let n;return e.startsWith("javascript:")&&(n=11),e.startsWith("fn:")&&(n=3),e.startsWith("eval:")&&(n=5),{type:"javascript",value:e.slice(n).trim()}}if(e.startsWith("grade:")||e.startsWith("llm-rubric:"))return{type:"llm-rubric",value:e.slice(e.startsWith("grade:")?6:11)};if(e.startsWith("python:")||e.startsWith("file://")&&(e.endsWith(".py")||e.includes(".py:"))){const n=(e.startsWith("python:"),7);return{type:"python",value:e.slice(n).trim()}}const t=e.match(kMe());if(t){const[n,r,i,o,s]=t,a=r?`not-${i}`:i,l=Number.parseFloat(o);return i==="contains-all"||i==="contains-any"||i==="icontains-all"||i==="icontains-any"?{type:a,value:s.split(",").map(c=>c.trim())}:i==="contains-json"||i==="is-json"?{type:a,value:s}:i==="answer-relevance"||i==="classifier"||i==="context-faithfulness"||i==="context-recall"||i==="context-relevance"||i==="cost"||i==="latency"||i==="levenshtein"||i==="perplexity-score"||i==="perplexity"||i==="rouge-n"||i==="similar"||i==="starts-with"?{type:a,value:s,threshold:l||(i==="similar"?EMe:.75)}:{type:a,value:s}}return{type:"equals",value:e}}const H7=new Set;function FMe(e){const t={},n=[],r={};let i,o,s,a;const l=["expected","prefix","suffix","description","providerOutput","metric","threshold"].map(c=>`_${c}`);for(const[c,u]of Object.entries(e)){if(!c.startsWith("__")&&l.some(f=>c.startsWith(f))&&!H7.has(c)){const f=`You used a single underscore for the key "${c}". Did you mean to use "${c.replace("_","__")}" instead?`;H7.add(c),VC.warn(f)}c.startsWith("__expected")?u.trim()!==""&&n.push(IMe(u)):c==="__prefix"?r.prefix=u:c==="__suffix"?r.suffix=u:c==="__description"?o=u:c==="__providerOutput"?i=u:c==="__metric"?s=u:c==="__threshold"?a=Number.parseFloat(u):t[c]=u}for(const c of n)c.metric=s;return{vars:t,assert:n,options:r,...o?{description:o}:{},...i?{providerOutput:i}:{},...a?{threshold:a}:{}}}const TMe=["equals","contains","icontains","contains-all","contains-any","starts-with","regex","is-json","contains-json","is-xml","contains-xml","is-sql","contains-sql","similar","llm-rubric","model-graded-closedqa","factuality","webhook","bleu","rouge-n","g-eval","not-equals","not-contains","not-icontains","not-contains-all","not-contains-any","not-starts-with","not-regex","not-is-json","not-contains-json","not-similar","not-webhook","not-rouge-n","is-valid-openai-function-call","is-valid-openai-tools-call","latency","perplexity","perplexity-score","cost","answer-relevance","context-faithfulness","context-recall","context-relevance","select-best","moderation"],RMe=({onAdd:e,initialValues:t})=>{const[n,r]=j.useState(t||[]),i=()=>{const s=[...n,{type:"equals",value:""}];r(s),e(s)},o=s=>{const a=n.filter((l,c)=>c!==s);r(a),e(a)};return h.jsxs(h.Fragment,{children:[h.jsx(Le,{variant:"h6",children:"Asserts"}),h.jsx(De,{my:n.length>0?2:0,children:h.jsx(cr,{direction:"column",spacing:2,children:n.map((s,a)=>h.jsxs(cr,{direction:"row",spacing:2,alignItems:"center",children:[h.jsx(Ig,{value:s.type,options:TMe,sx:{minWidth:200},onChange:(l,c)=>{const u=c,f=n.map((d,A)=>A===a?{...d,type:u}:d);r(f),e(f)},renderInput:l=>h.jsx(Wt,{...l,label:"Type"})}),h.jsx(Wt,{label:"Value",value:s.value,fullWidth:!0,onChange:l=>{const c=l.target.value,u=n.map((f,d)=>d===a?{...f,value:c}:f);r(u),e(u)}}),h.jsx(fn,{onClick:()=>o(a),size:"small",children:h.jsx(Sf,{})})]},a))})}),h.jsx(gt,{color:"primary",onClick:i,children:"Add Assert"})]})},PMe=({onAdd:e,varsList:t,initialValues:n})=>{const[r,i]=st.useState(n||{});return j.useEffect(()=>{const o={};t.forEach(s=>{o[s]=(n==null?void 0:n[s])||""}),i(o)},[t,n]),h.jsxs(De,{my:2,children:[h.jsx(Le,{variant:"h6",mb:2,children:"Vars"}),t.length>0?h.jsx(cr,{direction:"row",spacing:2,alignItems:"center",children:Object.keys(r).map((o,s)=>h.jsx(cr,{direction:"row",spacing:2,alignItems:"center",children:h.jsx(Wt,{placeholder:o,label:o,value:r[o],fullWidth:!0,onChange:a=>{const l=a.target.value,c={...r,[o]:l};i(c),e(c)}})},s))}):h.jsxs(Le,{variant:"subtitle1",gutterBottom:!0,children:["Add variables to your prompt using the ","{{varname}}"," syntax."]})]})},LMe=({open:e,onAdd:t,varsList:n,initialValues:r,onCancel:i})=>{const[o,s]=j.useState((r==null?void 0:r.description)||""),[a,l]=j.useState((r==null?void 0:r.vars)||{}),[c,u]=j.useState((r==null?void 0:r.assert)||[]),[f,d]=j.useState(0);st.useEffect(()=>{r?(s(r.description||""),l(r.vars||{}),u(r.assert||[])):(s(""),l({}),u([]))},[r]);const A=p=>{t({description:o,vars:a,assert:c},p),p&&i(),s(""),l({}),u([]),d(m=>m+1)};return h.jsxs(zn,{open:e,onClose:i,fullWidth:!0,maxWidth:"md",children:[h.jsx(qn,{children:r?"Edit Test Case":"Add Test Case"}),h.jsx(Vn,{children:h.jsxs(De,{children:[h.jsx(PMe,{onAdd:p=>l(p),varsList:n,initialValues:r==null?void 0:r.vars}),h.jsx(RMe,{onAdd:p=>u(p),initialValues:((r==null?void 0:r.assert)||[]).filter(p=>p.type!=="assert-set")||[]},f)]})}),h.jsxs(Sr,{children:[h.jsx(gt,{onClick:A.bind(void 0,!0),color:"primary",variant:"contained",children:r?"Update Test Case":"Add Test Case"}),!r&&h.jsx(gt,{onClick:A.bind(void 0,!1),color:"primary",variant:"contained",children:"Add Another"}),h.jsx(gt,{onClick:i,color:"secondary",children:"Cancel"})]})]})},OMe=({varsList:e})=>{const{testCases:t,setTestCases:n}=VA(),[r,i]=st.useState(null),[o,s]=st.useState(!1),a=(f,d)=>{if(r===null)n([...t,f]);else{const A=t.map((p,m)=>m===r?f:p);n(A),i(null)}d&&s(!1)},l=f=>{var A;f.stopPropagation(),f.preventDefault();const d=(A=f.target.files)==null?void 0:A[0];if(d){const p=new FileReader;p.onload=async m=>{var v,g;const b=(g=(v=m.target)==null?void 0:v.result)==null?void 0:g.toString();if(b){const{parse:y}=await Q1(async()=>{const{parse:C}=await import("./sync-ClbHj3jr.js");return{parse:C}},[]),x=y(b,{columns:!0}).map(C=>FMe(C));n([...t,...x])}},p.readAsText(d)}},c=(f,d)=>{f.stopPropagation(),confirm("Are you sure you want to delete this test case?")&&n(t.filter((A,p)=>p!==d))},u=(f,d)=>{f.stopPropagation();const A=JSON.parse(JSON.stringify(t[d]));n([...t,A])};return h.jsxs(h.Fragment,{children:[h.jsxs(cr,{direction:"row",spacing:2,mb:2,justifyContent:"space-between",children:[h.jsx(Le,{variant:"h5",children:"Test Cases"}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"file-input-add-test-case",children:h.jsx(gn,{title:"Upload test cases from csv",children:h.jsxs("span",{children:[h.jsx(fn,{component:"span",children:h.jsx(gee,{})}),h.jsx("input",{id:"file-input-add-test-case",type:"file",accept:".csv",onChange:l,style:{display:"none"}})]})})}),h.jsx(gt,{color:"primary",onClick:()=>s(!0),variant:"contained",children:"Add Test Case"})]})]}),h.jsx(ic,{children:h.jsxs(zs,{children:[h.jsx(_a,{children:h.jsxs(ur,{children:[h.jsx(ht,{children:"Description"}),h.jsx(ht,{children:"Assertions"}),h.jsx(ht,{children:"Variables"}),h.jsx(ht,{align:"right"})]})}),h.jsx(Vs,{children:t.length===0?h.jsx(ur,{children:h.jsx(ht,{colSpan:4,align:"center",children:"No test cases added yet."})}):t.map((f,d)=>{var A;return h.jsxs(ur,{sx:{"&:hover":{backgroundColor:"rgba(0, 0, 0, 0.04)",cursor:"pointer"}},onClick:()=>{i(d),s(!0)},children:[h.jsx(ht,{children:h.jsx(Le,{variant:"body2",children:f.description||`Test Case #${d+1}`})}),h.jsxs(ht,{children:[((A=f.assert)==null?void 0:A.length)||0," assertions"]}),h.jsx(ht,{children:Object.entries(f.vars||{}).map(([p,m])=>p+"="+m).join(", ")}),h.jsxs(ht,{align:"right",sx:{minWidth:150},children:[h.jsx(fn,{onClick:()=>{i(d),s(!0)},size:"small",children:h.jsx(rw,{})}),h.jsx(fn,{onClick:p=>u(p,d),size:"small",children:h.jsx(au,{})}),h.jsx(fn,{onClick:p=>c(p,d),size:"small",children:h.jsx(Sf,{})})]})]},d)})})]})}),h.jsx(LMe,{open:o,onAdd:a,varsList:e,initialValues:r===null?void 0:t[r],onCancel:()=>{i(null),s(!1)}})]})};var dre={},no=pn&&pn.__assign||function(){return no=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},no.apply(this,arguments)},jMe=pn&&pn.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),MMe=pn&&pn.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),NMe=pn&&pn.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&jMe(t,e,n);return MMe(t,e),t},UMe=pn&&pn.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n};Object.defineProperty(dre,"__esModule",{value:!0});var Ua=NMe(j),DMe=89,l2=90,$Me=77,z7=57,V7=219,q7=222,W7=192,K7=100,QMe=3e3,HMe=typeof window<"u"&&"navigator"in window&&/Win/i.test(navigator.platform),_F=typeof window<"u"&&"navigator"in window&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform),qC="npm__react-simple-code-editor__textarea",zMe=`
|
|
438
438
|
/**
|
|
439
439
|
* Reset the text fill color so that placeholder is visible
|
|
440
440
|
*/
|
|
@@ -740,7 +740,7 @@ endobj\r
|
|
|
740
740
|
* http://opensource.org/licenses/mit-license
|
|
741
741
|
*/function Ll(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function zq(e){function t(F){if(!F)throw Error("assert :P")}function n(F,L,_){for(var T=0;4>T;T++)if(F[L+T]!=_.charCodeAt(T))return!0;return!1}function r(F,L,_,T,E){for(var I=0;I<E;I++)F[L+I]=_[T+I]}function i(F,L,_,T){for(var E=0;E<T;E++)F[L+E]=_}function o(F){return new Int32Array(F)}function s(F,L){for(var _=[],T=0;T<F;T++)_.push(new L);return _}function a(F,L){var _=[];return function T(E,I,N){for(var $=N[I],D=0;D<$&&(E.push(N.length>I+1?[]:new L),!(N.length<I+1));D++)T(E[D],I+1,N)}(_,0,F),_}var l=function(){var F=this;function L(S,P){for(var G=1<<P-1>>>0;S&G;)G>>>=1;return G?(S&G-1)+G:S}function _(S,P,G,te,fe){t(!(te%G));do S[P+(te-=G)]=fe;while(0<te)}function T(S,P,G,te,fe){if(t(2328>=fe),512>=fe)var ge=o(512);else if((ge=o(fe))==null)return 0;return function(me,we,Ce,ke,Ve,it){var ot,Je,yt=we,ct=1<<Ce,qe=o(16),Ge=o(16);for(t(Ve!=0),t(ke!=null),t(me!=null),t(0<Ce),Je=0;Je<Ve;++Je){if(15<ke[Je])return 0;++qe[ke[Je]]}if(qe[0]==Ve)return 0;for(Ge[1]=0,ot=1;15>ot;++ot){if(qe[ot]>1<<ot)return 0;Ge[ot+1]=Ge[ot]+qe[ot]}for(Je=0;Je<Ve;++Je)ot=ke[Je],0<ke[Je]&&(it[Ge[ot]++]=Je);if(Ge[15]==1)return(ke=new E).g=0,ke.value=it[0],_(me,yt,1,ct,ke),ct;var mt,Ct=-1,vt=ct-1,Xt=0,Ht=1,dn=1,qt=1<<Ce;for(Je=0,ot=1,Ve=2;ot<=Ce;++ot,Ve<<=1){if(Ht+=dn<<=1,0>(dn-=qe[ot]))return 0;for(;0<qe[ot];--qe[ot])(ke=new E).g=ot,ke.value=it[Je++],_(me,yt+Xt,Ve,qt,ke),Xt=L(Xt,ot)}for(ot=Ce+1,Ve=2;15>=ot;++ot,Ve<<=1){if(Ht+=dn<<=1,0>(dn-=qe[ot]))return 0;for(;0<qe[ot];--qe[ot]){if(ke=new E,(Xt&vt)!=Ct){for(yt+=qt,mt=1<<(Ct=ot)-Ce;15>Ct&&!(0>=(mt-=qe[Ct]));)++Ct,mt<<=1;ct+=qt=1<<(mt=Ct-Ce),me[we+(Ct=Xt&vt)].g=mt+Ce,me[we+Ct].value=yt-we-Ct}ke.g=ot-Ce,ke.value=it[Je++],_(me,yt+(Xt>>Ce),Ve,qt,ke),Xt=L(Xt,ot)}}return Ht!=2*Ge[15]-1?0:ct}(S,P,G,te,fe,ge)}function E(){this.value=this.g=0}function I(){this.value=this.g=0}function N(){this.G=s(5,E),this.H=o(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=s(ho,I)}function $(S,P,G,te){t(S!=null),t(P!=null),t(2147483648>te),S.Ca=254,S.I=0,S.b=-8,S.Ka=0,S.oa=P,S.pa=G,S.Jd=P,S.Yc=G+te,S.Zc=4<=te?G+te-4+1:G,X(S)}function D(S,P){for(var G=0;0<P--;)G|=ue(S,128)<<P;return G}function V(S,P){var G=D(S,P);return Z(S)?-G:G}function Y(S,P,G,te){var fe,ge=0;for(t(S!=null),t(P!=null),t(4294967288>te),S.Sb=te,S.Ra=0,S.u=0,S.h=0,4<te&&(te=4),fe=0;fe<te;++fe)ge+=P[G+fe]<<8*fe;S.Ra=ge,S.bb=te,S.oa=P,S.pa=G}function K(S){for(;8<=S.u&&S.bb<S.Sb;)S.Ra>>>=8,S.Ra+=S.oa[S.pa+S.bb]<<wp-8>>>0,++S.bb,S.u-=8;M(S)&&(S.h=1,S.u=0)}function O(S,P){if(t(0<=P),!S.h&&P<=bp){var G=R(S)&yp[P];return S.u+=P,K(S),G}return S.h=1,S.u=0}function ne(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function z(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function R(S){return S.Ra>>>(S.u&wp-1)>>>0}function M(S){return t(S.bb<=S.Sb),S.h||S.bb==S.Sb&&S.u>wp}function H(S,P){S.u=P,S.h=M(S)}function U(S){S.u>=K0&&(t(S.u>=K0),K(S))}function X(S){t(S!=null&&S.oa!=null),S.pa<S.Zc?(S.I=(S.oa[S.pa++]|S.I<<8)>>>0,S.b+=8):(t(S!=null&&S.oa!=null),S.pa<S.Yc?(S.b+=8,S.I=S.oa[S.pa++]|S.I<<8):S.Ka?S.b=0:(S.I<<=8,S.b+=8,S.Ka=1))}function Z(S){return D(S,1)}function ue(S,P){var G=S.Ca;0>S.b&&X(S);var te=S.b,fe=G*P>>>8,ge=(S.I>>>te>fe)+0;for(ge?(G-=fe,S.I-=fe+1<<te>>>0):G=fe+1,te=G,fe=0;256<=te;)fe+=8,te>>=8;return te=7^fe+vs[te],S.b-=te,S.Ca=(G<<te)-1,ge}function ye(S,P,G){S[P+0]=G>>24&255,S[P+1]=G>>16&255,S[P+2]=G>>8&255,S[P+3]=G>>0&255}function ee(S,P){return S[P+0]<<0|S[P+1]<<8}function J(S,P){return ee(S,P)|S[P+2]<<16}function ce(S,P){return ee(S,P)|ee(S,P+2)<<16}function _e(S,P){var G=1<<P;return t(S!=null),t(0<P),S.X=o(G),S.X==null?0:(S.Mb=32-P,S.Xa=P,1)}function be(S,P){t(S!=null),t(P!=null),t(S.Xa==P.Xa),r(P.X,0,S.X,0,1<<P.Xa)}function se(){this.X=[],this.Xa=this.Mb=0}function Me(S,P,G,te){t(G!=null),t(te!=null);var fe=G[0],ge=te[0];return fe==0&&(fe=(S*ge+P/2)/P),ge==0&&(ge=(P*fe+S/2)/S),0>=fe||0>=ge?0:(G[0]=fe,te[0]=ge,1)}function Oe(S,P){return S+(1<<P)-1>>>P}function Ee(S,P){return((4278255360&S)+(4278255360&P)>>>0&4278255360)+((16711935&S)+(16711935&P)>>>0&16711935)>>>0}function Xe(S,P){F[P]=function(G,te,fe,ge,me,we,Ce){var ke;for(ke=0;ke<me;++ke){var Ve=F[S](we[Ce+ke-1],fe,ge+ke);we[Ce+ke]=Ee(G[te+ke],Ve)}}}function tt(){this.ud=this.hd=this.jd=0}function Ke(S,P){return((4278124286&(S^P))>>>1)+(S&P)>>>0}function Ne(S){return 0<=S&&256>S?S:0>S?0:255<S?255:void 0}function ve(S,P){return Ne(S+(S-P+.5>>1))}function Be(S,P,G){return Math.abs(P-G)-Math.abs(S-G)}function xe(S,P,G,te,fe,ge,me){for(te=ge[me-1],G=0;G<fe;++G)ge[me+G]=te=Ee(S[P+G],te)}function Fe(S,P,G,te,fe){var ge;for(ge=0;ge<G;++ge){var me=S[P+ge],we=me>>8&255,Ce=16711935&(Ce=(Ce=16711935&me)+((we<<16)+we));te[fe+ge]=(4278255360&me)+Ce>>>0}}function Se(S,P){P.jd=S>>0&255,P.hd=S>>8&255,P.ud=S>>16&255}function Re(S,P,G,te,fe,ge){var me;for(me=0;me<te;++me){var we=P[G+me],Ce=we>>>8,ke=we,Ve=255&(Ve=(Ve=we>>>16)+((S.jd<<24>>24)*(Ce<<24>>24)>>>5));ke=255&(ke=(ke=ke+((S.hd<<24>>24)*(Ce<<24>>24)>>>5))+((S.ud<<24>>24)*(Ve<<24>>24)>>>5)),fe[ge+me]=(4278255360&we)+(Ve<<16)+ke}}function re(S,P,G,te,fe){F[P]=function(ge,me,we,Ce,ke,Ve,it,ot,Je){for(Ce=it;Ce<ot;++Ce)for(it=0;it<Je;++it)ke[Ve++]=fe(we[te(ge[me++])])},F[S]=function(ge,me,we,Ce,ke,Ve,it){var ot=8>>ge.b,Je=ge.Ea,yt=ge.K[0],ct=ge.w;if(8>ot)for(ge=(1<<ge.b)-1,ct=(1<<ot)-1;me<we;++me){var qe,Ge=0;for(qe=0;qe<Je;++qe)qe&ge||(Ge=te(Ce[ke++])),Ve[it++]=fe(yt[Ge&ct]),Ge>>=ot}else F["VP8LMapColor"+G](Ce,ke,yt,ct,Ve,it,me,we,Je)}}function B(S,P,G,te,fe){for(G=P+G;P<G;){var ge=S[P++];te[fe++]=ge>>16&255,te[fe++]=ge>>8&255,te[fe++]=ge>>0&255}}function q(S,P,G,te,fe){for(G=P+G;P<G;){var ge=S[P++];te[fe++]=ge>>16&255,te[fe++]=ge>>8&255,te[fe++]=ge>>0&255,te[fe++]=ge>>24&255}}function le(S,P,G,te,fe){for(G=P+G;P<G;){var ge=(me=S[P++])>>16&240|me>>12&15,me=me>>0&240|me>>28&15;te[fe++]=ge,te[fe++]=me}}function he(S,P,G,te,fe){for(G=P+G;P<G;){var ge=(me=S[P++])>>16&248|me>>13&7,me=me>>5&224|me>>3&31;te[fe++]=ge,te[fe++]=me}}function ae(S,P,G,te,fe){for(G=P+G;P<G;){var ge=S[P++];te[fe++]=ge>>0&255,te[fe++]=ge>>8&255,te[fe++]=ge>>16&255}}function pe(S,P,G,te,fe,ge){if(ge==0)for(G=P+G;P<G;)ye(te,((ge=S[P++])[0]>>24|ge[1]>>8&65280|ge[2]<<8&16711680|ge[3]<<24)>>>0),fe+=32;else r(te,fe,S,P,G)}function ie(S,P){F[P][0]=F[S+"0"],F[P][1]=F[S+"1"],F[P][2]=F[S+"2"],F[P][3]=F[S+"3"],F[P][4]=F[S+"4"],F[P][5]=F[S+"5"],F[P][6]=F[S+"6"],F[P][7]=F[S+"7"],F[P][8]=F[S+"8"],F[P][9]=F[S+"9"],F[P][10]=F[S+"10"],F[P][11]=F[S+"11"],F[P][12]=F[S+"12"],F[P][13]=F[S+"13"],F[P][14]=F[S+"0"],F[P][15]=F[S+"0"]}function Ue(S){return S==Fk||S==Tk||S==tx||S==Rk}function At(){this.eb=[],this.size=this.A=this.fb=0}function W(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function je(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new At,this.f.kb=new W,this.sd=null}function ze(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function de(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Ie(S){return alert("todo:WebPSamplerProcessPlane"),S.T}function We(S,P){var G=S.T,te=P.ba.f.RGBA,fe=te.eb,ge=te.fb+S.ka*te.A,me=Oa[P.ba.S],we=S.y,Ce=S.O,ke=S.f,Ve=S.N,it=S.ea,ot=S.W,Je=P.cc,yt=P.dc,ct=P.Mc,qe=P.Nc,Ge=S.ka,mt=S.ka+S.T,Ct=S.U,vt=Ct+1>>1;for(Ge==0?me(we,Ce,null,null,ke,Ve,it,ot,ke,Ve,it,ot,fe,ge,null,null,Ct):(me(P.ec,P.fc,we,Ce,Je,yt,ct,qe,ke,Ve,it,ot,fe,ge-te.A,fe,ge,Ct),++G);Ge+2<mt;Ge+=2)Je=ke,yt=Ve,ct=it,qe=ot,Ve+=S.Rc,ot+=S.Rc,ge+=2*te.A,me(we,(Ce+=2*S.fa)-S.fa,we,Ce,Je,yt,ct,qe,ke,Ve,it,ot,fe,ge-te.A,fe,ge,Ct);return Ce+=S.fa,S.j+mt<S.o?(r(P.ec,P.fc,we,Ce,Ct),r(P.cc,P.dc,ke,Ve,vt),r(P.Mc,P.Nc,it,ot,vt),G--):1&mt||me(we,Ce,null,null,ke,Ve,it,ot,ke,Ve,it,ot,fe,ge+te.A,null,null,Ct),G}function Lt(S,P,G){var te=S.F,fe=[S.J];if(te!=null){var ge=S.U,me=P.ba.S,we=me==ex||me==tx;P=P.ba.f.RGBA;var Ce=[0],ke=S.ka;Ce[0]=S.T,S.Kb&&(ke==0?--Ce[0]:(--ke,fe[0]-=S.width),S.j+S.ka+S.T==S.o&&(Ce[0]=S.o-S.j-ke));var Ve=P.eb;ke=P.fb+ke*P.A,S=Or(te,fe[0],S.width,ge,Ce,Ve,ke+(we?0:3),P.A),t(G==Ce),S&&Ue(me)&&Pa(Ve,ke,we,ge,Ce,P.A)}return 0}function at(S){var P=S.ma,G=P.ba.S,te=11>G,fe=G==Jw||G==Zw||G==ex||G==Ik||G==12||Ue(G);if(P.memory=null,P.Ib=null,P.Jb=null,P.Nd=null,!q0(P.Oa,S,fe?11:12))return 0;if(fe&&Ue(G)&&_t(),S.da)alert("todo:use_scaling");else{if(te){if(P.Ib=Ie,S.Kb){if(G=S.U+1>>1,P.memory=o(S.U+2*G),P.memory==null)return 0;P.ec=P.memory,P.fc=0,P.cc=P.ec,P.dc=P.fc+S.U,P.Mc=P.cc,P.Nc=P.dc+G,P.Ib=We,_t()}}else alert("todo:EmitYUV");fe&&(P.Jb=Lt,te&&nt())}if(te&&!aD){for(S=0;256>S;++S)Vce[S]=89858*(S-128)+rx>>nx,Kce[S]=-22014*(S-128)+rx,Wce[S]=-45773*(S-128),qce[S]=113618*(S-128)+rx>>nx;for(S=tv;S<Ok;++S)P=76283*(S-16)+rx>>nx,Gce[S-tv]=Gs(P,255),Yce[S-tv]=Gs(P+8>>4,15);aD=1}return 1}function Et(S){var P=S.ma,G=S.U,te=S.T;return t(!(1&S.ka)),0>=G||0>=te?0:(G=P.Ib(S,P),P.Jb!=null&&P.Jb(S,P,G),P.Dc+=G,1)}function cn(S){S.ma.memory=null}function Te(S,P,G,te){return O(S,8)!=47?0:(P[0]=O(S,14)+1,G[0]=O(S,14)+1,te[0]=O(S,1),O(S,3)!=0?0:!S.h)}function $e(S,P){if(4>S)return S+1;var G=S-2>>1;return(2+(1&S)<<G)+O(P,G)+1}function Ye(S,P){return 120<P?P-120:1<=(G=((G=Tce[P-1])>>4)*S+(8-(15&G)))?G:1;var G}function lt(S,P,G){var te=R(G),fe=S[P+=255&te].g-8;return 0<fe&&(H(G,G.u+8),te=R(G),P+=S[P].value,P+=te&(1<<fe)-1),H(G,G.u+S[P].g),S[P].value}function xt(S,P,G){return G.g+=S.g,G.value+=S.value<<P>>>0,t(8>=G.g),S.g}function kt(S,P,G){var te=S.xc;return t((P=te==0?0:S.vc[S.md*(G>>te)+(P>>te)])<S.Wb),S.Ya[P]}function en(S,P,G,te){var fe=S.ab,ge=S.c*P,me=S.C;P=me+P;var we=G,Ce=te;for(te=S.Ta,G=S.Ua;0<fe--;){var ke=S.gc[fe],Ve=me,it=P,ot=we,Je=Ce,yt=(Ce=te,we=G,ke.Ea);switch(t(Ve<it),t(it<=ke.nc),ke.hc){case 2:Vw(ot,Je,(it-Ve)*yt,Ce,we);break;case 0:var ct=Ve,qe=it,Ge=Ce,mt=we,Ct=(qt=ke).Ea;ct==0&&(Ek(ot,Je,null,null,1,Ge,mt),xe(ot,Je+1,0,0,Ct-1,Ge,mt+1),Je+=Ct,mt+=Ct,++ct);for(var vt=1<<qt.b,Xt=vt-1,Ht=Oe(Ct,qt.b),dn=qt.K,qt=qt.w+(ct>>qt.b)*Ht;ct<qe;){var ir=dn,Ar=qt,er=1;for(G0(ot,Je,Ge,mt-Ct,1,Ge,mt);er<Ct;){var Dn=(er&~Xt)+vt;Dn>Ct&&(Dn=Ct),(0,Tf[ir[Ar++]>>8&15])(ot,Je+ +er,Ge,mt+er-Ct,Dn-er,Ge,mt+er),er=Dn}Je+=Ct,mt+=Ct,++ct&Xt||(qt+=Ht)}it!=ke.nc&&r(Ce,we-yt,Ce,we+(it-Ve-1)*yt,yt);break;case 1:for(yt=ot,qe=Je,Ct=(ot=ke.Ea)-(mt=ot&~(Ge=(Je=1<<ke.b)-1)),ct=Oe(ot,ke.b),vt=ke.K,ke=ke.w+(Ve>>ke.b)*ct;Ve<it;){for(Xt=vt,Ht=ke,dn=new tt,qt=qe+mt,ir=qe+ot;qe<qt;)Se(Xt[Ht++],dn),Sd(dn,yt,qe,Je,Ce,we),qe+=Je,we+=Je;qe<ir&&(Se(Xt[Ht++],dn),Sd(dn,yt,qe,Ct,Ce,we),qe+=Ct,we+=Ct),++Ve&Ge||(ke+=ct)}break;case 3:if(ot==Ce&&Je==we&&0<ke.b){for(qe=Ce,ot=yt=we+(it-Ve)*yt-(mt=(it-Ve)*Oe(ke.Ea,ke.b)),Je=Ce,Ge=we,ct=[],mt=(Ct=mt)-1;0<=mt;--mt)ct[mt]=Je[Ge+mt];for(mt=Ct-1;0<=mt;--mt)qe[ot+mt]=ct[mt];Fa(ke,Ve,it,Ce,yt,Ce,we)}else Fa(ke,Ve,it,ot,Je,Ce,we)}we=te,Ce=G}Ce!=G&&r(te,G,we,Ce,ge)}function Ut(S,P){var G=S.V,te=S.Ba+S.c*S.C,fe=P-S.C;if(t(P<=S.l.o),t(16>=fe),0<fe){var ge=S.l,me=S.Ta,we=S.Ua,Ce=ge.width;if(en(S,fe,G,te),fe=we=[we],t((G=S.C)<(te=P)),t(ge.v<ge.va),te>ge.o&&(te=ge.o),G<ge.j){var ke=ge.j-G;G=ge.j,fe[0]+=ke*Ce}if(G>=te?G=0:(fe[0]+=4*ge.v,ge.ka=G-ge.j,ge.U=ge.va-ge.v,ge.T=te-G,G=1),G){if(we=we[0],11>(G=S.ca).S){var Ve=G.f.RGBA,it=(te=G.S,fe=ge.U,ge=ge.T,ke=Ve.eb,Ve.A),ot=ge;for(Ve=Ve.fb+S.Ma*Ve.A;0<ot--;){var Je=me,yt=we,ct=fe,qe=ke,Ge=Ve;switch(te){case Xw:ys(Je,yt,ct,qe,Ge);break;case Jw:es(Je,yt,ct,qe,Ge);break;case Fk:es(Je,yt,ct,qe,Ge),Pa(qe,Ge,0,ct,1,0);break;case XU:ku(Je,yt,ct,qe,Ge);break;case Zw:pe(Je,yt,ct,qe,Ge,1);break;case Tk:pe(Je,yt,ct,qe,Ge,1),Pa(qe,Ge,0,ct,1,0);break;case ex:pe(Je,yt,ct,qe,Ge,0);break;case tx:pe(Je,yt,ct,qe,Ge,0),Pa(qe,Ge,1,ct,1,0);break;case Ik:Rf(Je,yt,ct,qe,Ge);break;case Rk:Rf(Je,yt,ct,qe,Ge),Lr(qe,Ge,ct,1,0);break;case JU:Eu(Je,yt,ct,qe,Ge);break;default:t(0)}we+=Ce,Ve+=it}S.Ma+=ge}else alert("todo:EmitRescaledRowsYUVA");t(S.Ma<=G.height)}}S.C=P,t(S.C<=S.i)}function wt(S){var P;if(0<S.ua)return 0;for(P=0;P<S.Wb;++P){var G=S.Ya[P].G,te=S.Ya[P].H;if(0<G[1][te[1]+0].g||0<G[2][te[2]+0].g||0<G[3][te[3]+0].g)return 0}return 1}function bt(S,P,G,te,fe,ge){if(S.Z!=0){var me=S.qd,we=S.rd;for(t(jf[S.Z]!=null);P<G;++P)jf[S.Z](me,we,te,fe,te,fe,ge),me=te,we=fe,fe+=ge;S.qd=me,S.rd=we}}function It(S,P){var G=S.l.ma,te=G.Z==0||G.Z==1?S.l.j:S.C;if(te=S.C<te?te:S.C,t(P<=S.l.o),P>te){var fe=S.l.width,ge=G.ca,me=G.tb+fe*te,we=S.V,Ce=S.Ba+S.c*te,ke=S.gc;t(S.ab==1),t(ke[0].hc==3),qw(ke[0],te,P,we,Ce,ge,me),bt(G,te,P,ge,me,fe)}S.C=S.Ma=P}function et(S,P,G,te,fe,ge,me){var we=S.$/te,Ce=S.$%te,ke=S.m,Ve=S.s,it=G+S.$,ot=it;fe=G+te*fe;var Je=G+te*ge,yt=280+Ve.ua,ct=S.Pb?we:16777216,qe=0<Ve.ua?Ve.Wa:null,Ge=Ve.wc,mt=it<Je?kt(Ve,Ce,we):null;t(S.C<ge),t(Je<=fe);var Ct=!1;e:for(;;){for(;Ct||it<Je;){var vt=0;if(we>=ct){var Xt=it-G;t((ct=S).Pb),ct.wd=ct.m,ct.xd=Xt,0<ct.s.ua&&be(ct.s.Wa,ct.s.vb),ct=we+Pce}if(Ce&Ge||(mt=kt(Ve,Ce,we)),t(mt!=null),mt.Qb&&(P[it]=mt.qb,Ct=!0),!Ct)if(U(ke),mt.jc){vt=ke,Xt=P;var Ht=it,dn=mt.pd[R(vt)&ho-1];t(mt.jc),256>dn.g?(H(vt,vt.u+dn.g),Xt[Ht]=dn.value,vt=0):(H(vt,vt.u+dn.g-256),t(256<=dn.value),vt=dn.value),vt==0&&(Ct=!0)}else vt=lt(mt.G[0],mt.H[0],ke);if(ke.h)break;if(Ct||256>vt){if(!Ct)if(mt.nd)P[it]=(mt.qb|vt<<8)>>>0;else{if(U(ke),Ct=lt(mt.G[1],mt.H[1],ke),U(ke),Xt=lt(mt.G[2],mt.H[2],ke),Ht=lt(mt.G[3],mt.H[3],ke),ke.h)break;P[it]=(Ht<<24|Ct<<16|vt<<8|Xt)>>>0}if(Ct=!1,++it,++Ce>=te&&(Ce=0,++we,me!=null&&we<=ge&&!(we%16)&&me(S,we),qe!=null))for(;ot<it;)vt=P[ot++],qe.X[(506832829*vt&4294967295)>>>qe.Mb]=vt}else if(280>vt){if(vt=$e(vt-256,ke),Xt=lt(mt.G[4],mt.H[4],ke),U(ke),Xt=Ye(te,Xt=$e(Xt,ke)),ke.h)break;if(it-G<Xt||fe-it<vt)break e;for(Ht=0;Ht<vt;++Ht)P[it+Ht]=P[it+Ht-Xt];for(it+=vt,Ce+=vt;Ce>=te;)Ce-=te,++we,me!=null&&we<=ge&&!(we%16)&&me(S,we);if(t(it<=fe),Ce&Ge&&(mt=kt(Ve,Ce,we)),qe!=null)for(;ot<it;)vt=P[ot++],qe.X[(506832829*vt&4294967295)>>>qe.Mb]=vt}else{if(!(vt<yt))break e;for(Ct=vt-280,t(qe!=null);ot<it;)vt=P[ot++],qe.X[(506832829*vt&4294967295)>>>qe.Mb]=vt;vt=it,t(!(Ct>>>(Xt=qe).Xa)),P[vt]=Xt.X[Ct],Ct=!0}Ct||t(ke.h==M(ke))}if(S.Pb&&ke.h&&it<fe)t(S.m.h),S.a=5,S.m=S.wd,S.$=S.xd,0<S.s.ua&&be(S.s.vb,S.s.Wa);else{if(ke.h)break e;me!=null&&me(S,we>ge?ge:we),S.a=0,S.$=it-G}return 1}return S.a=3,0}function Ze(S){t(S!=null),S.vc=null,S.yc=null,S.Ya=null;var P=S.Wa;P!=null&&(P.X=null),S.vb=null,t(S!=null)}function Bt(){var S=new Bk;return S==null?null:(S.a=0,S.xb=tD,ie("Predictor","VP8LPredictors"),ie("Predictor","VP8LPredictors_C"),ie("PredictorAdd","VP8LPredictorsAdd"),ie("PredictorAdd","VP8LPredictorsAdd_C"),Vw=Fe,Sd=Re,ys=B,es=q,Rf=le,Eu=he,ku=ae,F.VP8LMapColor32b=xp,F.VP8LMapColor8b=Ww,S)}function $t(S,P,G,te,fe){var ge=1,me=[S],we=[P],Ce=te.m,ke=te.s,Ve=null,it=0;e:for(;;){if(G)for(;ge&&O(Ce,1);){var ot=me,Je=we,yt=te,ct=1,qe=yt.m,Ge=yt.gc[yt.ab],mt=O(qe,2);if(yt.Oc&1<<mt)ge=0;else{switch(yt.Oc|=1<<mt,Ge.hc=mt,Ge.Ea=ot[0],Ge.nc=Je[0],Ge.K=[null],++yt.ab,t(4>=yt.ab),mt){case 0:case 1:Ge.b=O(qe,3)+2,ct=$t(Oe(Ge.Ea,Ge.b),Oe(Ge.nc,Ge.b),0,yt,Ge.K),Ge.K=Ge.K[0];break;case 3:var Ct,vt=O(qe,8)+1,Xt=16<vt?0:4<vt?1:2<vt?2:3;if(ot[0]=Oe(Ge.Ea,Xt),Ge.b=Xt,Ct=ct=$t(vt,1,0,yt,Ge.K)){var Ht,dn=vt,qt=Ge,ir=1<<(8>>qt.b),Ar=o(ir);if(Ar==null)Ct=0;else{var er=qt.K[0],Dn=qt.w;for(Ar[0]=qt.K[0][0],Ht=1;Ht<1*dn;++Ht)Ar[Ht]=Ee(er[Dn+Ht],Ar[Ht-1]);for(;Ht<4*ir;++Ht)Ar[Ht]=0;qt.K[0]=null,qt.K[0]=Ar,Ct=1}}ct=Ct;break;case 2:break;default:t(0)}ge=ct}}if(me=me[0],we=we[0],ge&&O(Ce,1)&&!(ge=1<=(it=O(Ce,4))&&11>=it)){te.a=3;break e}var Br;if(Br=ge)t:{var wr,In,Ti,bs=te,Ri=me,ws=we,dr=it,Xs=G,Js=bs.m,Zi=bs.s,po=[null],ns=1,ja=0,Ac=Rce[dr];n:for(;;){if(Xs&&O(Js,1)){var eo=O(Js,3)+2,Ru=Oe(Ri,eo),Id=Oe(ws,eo),Ep=Ru*Id;if(!$t(Ru,Id,0,bs,po))break n;for(po=po[0],Zi.xc=eo,wr=0;wr<Ep;++wr){var Mf=po[wr]>>8&65535;po[wr]=Mf,Mf>=ns&&(ns=Mf+1)}}if(Js.h)break n;for(In=0;5>In;++In){var ai=ZU[In];!In&&0<dr&&(ai+=1<<dr),ja<ai&&(ja=ai)}var jk=s(ns*Ac,E),uD=ns,fD=s(uD,N);if(fD==null)var ox=null;else t(65536>=uD),ox=fD;var nv=o(ja);if(ox==null||nv==null||jk==null){bs.a=1;break n}var sx=jk;for(wr=Ti=0;wr<ns;++wr){var Fl=ox[wr],kp=Fl.G,Ip=Fl.H,AD=0,ax=1,dD=0;for(In=0;5>In;++In){ai=ZU[In],kp[In]=sx,Ip[In]=Ti,!In&&0<dr&&(ai+=1<<dr);i:{var lx,Mk=ai,cx=bs,rv=nv,Zce=sx,eue=Ti,Nk=0,Nf=cx.m,tue=O(Nf,1);if(i(rv,0,0,Mk),tue){var nue=O(Nf,1)+1,rue=O(Nf,1),hD=O(Nf,rue==0?1:8);rv[hD]=1,nue==2&&(rv[hD=O(Nf,8)]=1);var ux=1}else{var pD=o(19),gD=O(Nf,4)+4;if(19<gD){cx.a=3;var fx=0;break i}for(lx=0;lx<gD;++lx)pD[Fce[lx]]=O(Nf,3);var Uk=void 0,iv=void 0,mD=cx,iue=pD,Ax=Mk,vD=rv,Dk=0,Uf=mD.m,yD=8,bD=s(128,E);r:for(;T(bD,0,7,iue,19);){if(O(Uf,1)){var oue=2+2*O(Uf,3);if((Uk=2+O(Uf,oue))>Ax)break r}else Uk=Ax;for(iv=0;iv<Ax&&Uk--;){U(Uf);var wD=bD[0+(127&R(Uf))];H(Uf,Uf.u+wD.g);var Fp=wD.value;if(16>Fp)vD[iv++]=Fp,Fp!=0&&(yD=Fp);else{var sue=Fp==16,xD=Fp-16,aue=kce[xD],CD=O(Uf,Ece[xD])+aue;if(iv+CD>Ax)break r;for(var lue=sue?yD:0;0<CD--;)vD[iv++]=lue}}Dk=1;break r}Dk||(mD.a=3),ux=Dk}(ux=ux&&!Nf.h)&&(Nk=T(Zce,eue,8,rv,Mk)),ux&&Nk!=0?fx=Nk:(cx.a=3,fx=0)}if(fx==0)break n;if(ax&&Ice[In]==1&&(ax=sx[Ti].g==0),AD+=sx[Ti].g,Ti+=fx,3>=In){var ov,$k=nv[0];for(ov=1;ov<ai;++ov)nv[ov]>$k&&($k=nv[ov]);dD+=$k}}if(Fl.nd=ax,Fl.Qb=0,ax&&(Fl.qb=(kp[3][Ip[3]+0].value<<24|kp[1][Ip[1]+0].value<<16|kp[2][Ip[2]+0].value)>>>0,AD==0&&256>kp[0][Ip[0]+0].value&&(Fl.Qb=1,Fl.qb+=kp[0][Ip[0]+0].value<<8)),Fl.jc=!Fl.Qb&&6>dD,Fl.jc){var dx,Pu=Fl;for(dx=0;dx<ho;++dx){var Df=dx,$f=Pu.pd[Df],hx=Pu.G[0][Pu.H[0]+Df];256<=hx.value?($f.g=hx.g+256,$f.value=hx.value):($f.g=0,$f.value=0,Df>>=xt(hx,8,$f),Df>>=xt(Pu.G[1][Pu.H[1]+Df],16,$f),Df>>=xt(Pu.G[2][Pu.H[2]+Df],0,$f),xt(Pu.G[3][Pu.H[3]+Df],24,$f))}}}Zi.vc=po,Zi.Wb=ns,Zi.Ya=ox,Zi.yc=jk,Br=1;break t}Br=0}if(!(ge=Br)){te.a=3;break e}if(0<it){if(ke.ua=1<<it,!_e(ke.Wa,it)){te.a=1,ge=0;break e}}else ke.ua=0;var Qk=te,SD=me,cue=we,Hk=Qk.s,zk=Hk.xc;if(Qk.c=SD,Qk.i=cue,Hk.md=Oe(SD,zk),Hk.wc=zk==0?-1:(1<<zk)-1,G){te.xb=Dce;break e}if((Ve=o(me*we))==null){te.a=1,ge=0;break e}ge=(ge=et(te,Ve,0,me,we,we,null))&&!Ce.h;break e}return ge?(fe!=null?fe[0]=Ve:(t(Ve==null),t(G)),te.$=0,G||Ze(ke)):Ze(ke),ge}function Qt(S,P){var G=S.c*S.i,te=G+P+16*P;return t(S.c<=P),S.V=o(te),S.V==null?(S.Ta=null,S.Ua=0,S.a=1,0):(S.Ta=S.V,S.Ua=S.Ba+G+P,1)}function An(S,P){var G=S.C,te=P-G,fe=S.V,ge=S.Ba+S.c*G;for(t(P<=S.l.o);0<te;){var me=16<te?16:te,we=S.l.ma,Ce=S.l.width,ke=Ce*me,Ve=we.ca,it=we.tb+Ce*G,ot=S.Ta,Je=S.Ua;en(S,me,fe,ge),vi(ot,Je,Ve,it,ke),bt(we,G,G+me,Ve,it,Ce),te-=me,fe+=me*S.c,G+=me}t(G==P),S.C=S.Ma=P}function Bn(){this.ub=this.yd=this.td=this.Rb=0}function zr(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function gi(){this.Fb=this.Bb=this.Cb=0,this.Zb=o(4),this.Lb=o(4)}function Io(){this.Yb=function(){var S=[];return function P(G,te,fe){for(var ge=fe[te],me=0;me<ge&&(G.push(fe.length>te+1?[]:0),!(fe.length<te+1));me++)P(G[me],te+1,fe)}(S,0,[3,11]),S}()}function Su(){this.jb=o(3),this.Wc=a([4,8],Io),this.Xc=a([4,17],Io)}function Ea(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new o(4),this.od=new o(4)}function Qi(){this.ld=this.La=this.dd=this.tc=0}function gs(){this.Na=this.la=0}function ka(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function En(){this.ad=o(384),this.Za=0,this.Ob=o(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function on(){this.uc=this.M=this.Nb=0,this.wa=Array(new Qi),this.Y=0,this.ya=Array(new En),this.aa=0,this.l=new Zn}function oi(){this.y=o(16),this.f=o(8),this.ea=o(8)}function Xi(){this.cb=this.a=0,this.sc="",this.m=new ne,this.Od=new Bn,this.Kc=new zr,this.ed=new Ea,this.Qa=new gi,this.Ic=this.$c=this.Aa=0,this.D=new on,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=s(8,ne),this.ia=0,this.pb=s(4,ka),this.Pa=new Su,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new oi),this.Hd=0,this.rb=Array(new gs),this.sb=0,this.wa=Array(new Qi),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new En),this.L=this.aa=0,this.gd=a([4,2],Qi),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Zn(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function Ia(){var S=new Xi;return S!=null&&(S.a=0,S.sc="OK",S.cb=0,S.Xb=0,ev||(ev=Fw)),S}function Vr(S,P,G){return S.a==0&&(S.a=P,S.sc=G,S.cb=0),0}function lp(S,P,G){return 3<=G&&S[P+0]==157&&S[P+1]==1&&S[P+2]==42}function Iw(S,P){if(S==null)return 0;if(S.a=0,S.sc="OK",P==null)return Vr(S,2,"null VP8Io passed to VP8GetHeaders()");var G=P.data,te=P.w,fe=P.ha;if(4>fe)return Vr(S,7,"Truncated header.");var ge=G[te+0]|G[te+1]<<8|G[te+2]<<16,me=S.Od;if(me.Rb=!(1&ge),me.td=ge>>1&7,me.yd=ge>>4&1,me.ub=ge>>5,3<me.td)return Vr(S,3,"Incorrect keyframe parameters.");if(!me.yd)return Vr(S,4,"Frame not displayable.");te+=3,fe-=3;var we=S.Kc;if(me.Rb){if(7>fe)return Vr(S,7,"cannot parse picture header");if(!lp(G,te,fe))return Vr(S,3,"Bad code word");we.c=16383&(G[te+4]<<8|G[te+3]),we.Td=G[te+4]>>6,we.i=16383&(G[te+6]<<8|G[te+5]),we.Ud=G[te+6]>>6,te+=7,fe-=7,S.za=we.c+15>>4,S.Ub=we.i+15>>4,P.width=we.c,P.height=we.i,P.Da=0,P.j=0,P.v=0,P.va=P.width,P.o=P.height,P.da=0,P.ib=P.width,P.hb=P.height,P.U=P.width,P.T=P.height,i((ge=S.Pa).jb,0,255,ge.jb.length),t((ge=S.Qa)!=null),ge.Cb=0,ge.Bb=0,ge.Fb=1,i(ge.Zb,0,0,ge.Zb.length),i(ge.Lb,0,0,ge.Lb)}if(me.ub>fe)return Vr(S,7,"bad partition length");$(ge=S.m,G,te,me.ub),te+=me.ub,fe-=me.ub,me.Rb&&(we.Ld=Z(ge),we.Kd=Z(ge)),we=S.Qa;var Ce,ke=S.Pa;if(t(ge!=null),t(we!=null),we.Cb=Z(ge),we.Cb){if(we.Bb=Z(ge),Z(ge)){for(we.Fb=Z(ge),Ce=0;4>Ce;++Ce)we.Zb[Ce]=Z(ge)?V(ge,7):0;for(Ce=0;4>Ce;++Ce)we.Lb[Ce]=Z(ge)?V(ge,6):0}if(we.Bb)for(Ce=0;3>Ce;++Ce)ke.jb[Ce]=Z(ge)?D(ge,8):255}else we.Bb=0;if(ge.Ka)return Vr(S,3,"cannot parse segment header");if((we=S.ed).zd=Z(ge),we.Tb=D(ge,6),we.wb=D(ge,3),we.Pc=Z(ge),we.Pc&&Z(ge)){for(ke=0;4>ke;++ke)Z(ge)&&(we.vd[ke]=V(ge,6));for(ke=0;4>ke;++ke)Z(ge)&&(we.od[ke]=V(ge,6))}if(S.L=we.Tb==0?0:we.zd?1:2,ge.Ka)return Vr(S,3,"cannot parse filter header");var Ve=fe;if(fe=Ce=te,te=Ce+Ve,we=Ve,S.Xb=(1<<D(S.m,2))-1,Ve<3*(ke=S.Xb))G=7;else{for(Ce+=3*ke,we-=3*ke,Ve=0;Ve<ke;++Ve){var it=G[fe+0]|G[fe+1]<<8|G[fe+2]<<16;it>we&&(it=we),$(S.Jc[+Ve],G,Ce,it),Ce+=it,we-=it,fe+=3}$(S.Jc[+ke],G,Ce,we),G=Ce<te?0:5}if(G!=0)return Vr(S,G,"cannot parse partitions");for(G=D(Ce=S.m,7),fe=Z(Ce)?V(Ce,4):0,te=Z(Ce)?V(Ce,4):0,we=Z(Ce)?V(Ce,4):0,ke=Z(Ce)?V(Ce,4):0,Ce=Z(Ce)?V(Ce,4):0,Ve=S.Qa,it=0;4>it;++it){if(Ve.Cb){var ot=Ve.Zb[it];Ve.Fb||(ot+=G)}else{if(0<it){S.pb[it]=S.pb[0];continue}ot=G}var Je=S.pb[it];Je.Sc[0]=Pk[Gs(ot+fe,127)],Je.Sc[1]=Lk[Gs(ot+0,127)],Je.Eb[0]=2*Pk[Gs(ot+te,127)],Je.Eb[1]=101581*Lk[Gs(ot+we,127)]>>16,8>Je.Eb[1]&&(Je.Eb[1]=8),Je.Qc[0]=Pk[Gs(ot+ke,117)],Je.Qc[1]=Lk[Gs(ot+Ce,127)],Je.lc=ot+Ce}if(!me.Rb)return Vr(S,4,"Not a key frame.");for(Z(ge),me=S.Pa,G=0;4>G;++G){for(fe=0;8>fe;++fe)for(te=0;3>te;++te)for(we=0;11>we;++we)ke=ue(ge,Nce[G][fe][te][we])?D(ge,8):jce[G][fe][te][we],me.Wc[G][fe].Yb[te][we]=ke;for(fe=0;17>fe;++fe)me.Xc[G][fe]=me.Wc[G][Uce[fe]]}return S.kc=Z(ge),S.kc&&(S.Bd=D(ge,8)),S.cb=1}function Fw(S,P,G,te,fe,ge,me){var we=P[fe].Yb[G];for(G=0;16>fe;++fe){if(!ue(S,we[G+0]))return fe;for(;!ue(S,we[G+1]);)if(we=P[++fe].Yb[0],G=0,fe==16)return 16;var Ce=P[fe+1].Yb;if(ue(S,we[G+2])){var ke=S,Ve=0;if(ue(ke,(ot=we)[(it=G)+3]))if(ue(ke,ot[it+6])){for(we=0,it=2*(Ve=ue(ke,ot[it+8]))+(ot=ue(ke,ot[it+9+Ve])),Ve=0,ot=Lce[it];ot[we];++we)Ve+=Ve+ue(ke,ot[we]);Ve+=3+(8<<it)}else ue(ke,ot[it+7])?(Ve=7+2*ue(ke,165),Ve+=ue(ke,145)):Ve=5+ue(ke,159);else Ve=ue(ke,ot[it+4])?3+ue(ke,ot[it+5]):2;we=Ce[2]}else Ve=1,we=Ce[1];Ce=me+Oce[fe],0>(ke=S).b&&X(ke);var it,ot=ke.b,Je=(it=ke.Ca>>1)-(ke.I>>ot)>>31;--ke.b,ke.Ca+=Je,ke.Ca|=1,ke.I-=(it+1&Je)<<ot,ge[Ce]=((Ve^Je)-Je)*te[(0<fe)+0]}return 16}function T0(S){var P=S.rb[S.sb-1];P.la=0,P.Na=0,i(S.zc,0,0,S.zc.length),S.ja=0}function ck(S,P){if(S==null)return 0;if(P==null)return Vr(S,2,"NULL VP8Io parameter in VP8Decode().");if(!S.cb&&!Iw(S,P))return 0;if(t(S.cb),P.ac==null||P.ac(P)){P.ob&&(S.L=0);var G=ix[S.L];if(S.L==2?(S.yb=0,S.zb=0):(S.yb=P.v-G>>4,S.zb=P.j-G>>4,0>S.yb&&(S.yb=0),0>S.zb&&(S.zb=0)),S.Va=P.o+15+G>>4,S.Hb=P.va+15+G>>4,S.Hb>S.za&&(S.Hb=S.za),S.Va>S.Ub&&(S.Va=S.Ub),0<S.L){var te=S.ed;for(G=0;4>G;++G){var fe;if(S.Qa.Cb){var ge=S.Qa.Lb[G];S.Qa.Fb||(ge+=te.Tb)}else ge=te.Tb;for(fe=0;1>=fe;++fe){var me=S.gd[G][fe],we=ge;if(te.Pc&&(we+=te.vd[0],fe&&(we+=te.od[0])),0<(we=0>we?0:63<we?63:we)){var Ce=we;0<te.wb&&(Ce=4<te.wb?Ce>>2:Ce>>1)>9-te.wb&&(Ce=9-te.wb),1>Ce&&(Ce=1),me.dd=Ce,me.tc=2*we+Ce,me.ld=40<=we?2:15<=we?1:0}else me.tc=0;me.La=fe}}}G=0}else Vr(S,6,"Frame setup failed"),G=S.a;if(G=G==0){if(G){S.$c=0,0<S.Aa||(S.Ic=Jce);e:{G=S.Ic,te=4*(Ce=S.za);var ke=32*Ce,Ve=Ce+1,it=0<S.L?Ce*(0<S.Aa?2:1):0,ot=(S.Aa==2?2:1)*Ce;if((me=te+832+(fe=3*(16*G+ix[S.L])/2*ke)+(ge=S.Fa!=null&&0<S.Fa.length?S.Kc.c*S.Kc.i:0))!=me)G=0;else{if(me>S.Vb){if(S.Vb=0,S.Ec=o(me),S.Fc=0,S.Ec==null){G=Vr(S,1,"no memory during frame initialization.");break e}S.Vb=me}me=S.Ec,we=S.Fc,S.Ac=me,S.Bc=we,we+=te,S.Gd=s(ke,oi),S.Hd=0,S.rb=s(Ve+1,gs),S.sb=1,S.wa=it?s(it,Qi):null,S.Y=0,S.D.Nb=0,S.D.wa=S.wa,S.D.Y=S.Y,0<S.Aa&&(S.D.Y+=Ce),t(!0),S.oc=me,S.pc=we,we+=832,S.ya=s(ot,En),S.aa=0,S.D.ya=S.ya,S.D.aa=S.aa,S.Aa==2&&(S.D.aa+=Ce),S.R=16*Ce,S.B=8*Ce,Ce=(ke=ix[S.L])*S.R,ke=ke/2*S.B,S.sa=me,S.ta=we+Ce,S.qa=S.sa,S.ra=S.ta+16*G*S.R+ke,S.Ha=S.qa,S.Ia=S.ra+8*G*S.B+ke,S.$c=0,we+=fe,S.mb=ge?me:null,S.nb=ge?we:null,t(we+ge<=S.Fc+S.Vb),T0(S),i(S.Ac,S.Bc,0,te),G=1}}if(G){if(P.ka=0,P.y=S.sa,P.O=S.ta,P.f=S.qa,P.N=S.ra,P.ea=S.Ha,P.Vd=S.Ia,P.fa=S.R,P.Rc=S.B,P.F=null,P.J=0,!Gw){for(G=-255;255>=G;++G)Hi[255+G]=0>G?-G:G;for(G=-1020;1020>=G;++G)Fu[1020+G]=-128>G?-128:127<G?127:G;for(G=-112;112>=G;++G)Z0[112+G]=-16>G?-16:15<G?15:G;for(G=-255;510>=G;++G)Bp[255+G]=0>G?0:255<G?255:G;Gw=1}Cp=Ak,Iu=uk,Y0=Rw,ts=fk,Ta=Pw,mi=Tw,Sp=M0,Kw=xd,X0=_k,_d=N0,Bd=Sk,Pf=hp,Ed=U0,_p=Qw,kd=$w,Lf=uc,J0=Bu,Ra=Ck,Il[0]=cc,Il[1]=dk,Il[2]=mk,Il[3]=vk,Il[4]=jw,Il[5]=Ap,Il[6]=Mw,Il[7]=L0,Il[8]=bk,Il[9]=yk,Of[0]=Lw,Of[1]=pk,Of[2]=_u,Of[3]=up,Of[4]=Fo,Of[5]=gk,Of[6]=Ow,Tu[0]=kf,Tu[1]=hk,Tu[2]=wk,Tu[3]=O0,Tu[4]=wd,Tu[5]=xk,Tu[6]=j0,G=1}else G=0}G&&(G=function(Je,yt){for(Je.M=0;Je.M<Je.Va;++Je.M){var ct,qe=Je.Jc[Je.M&Je.Xb],Ge=Je.m,mt=Je;for(ct=0;ct<mt.za;++ct){var Ct=Ge,vt=mt,Xt=vt.Ac,Ht=vt.Bc+4*ct,dn=vt.zc,qt=vt.ya[vt.aa+ct];if(vt.Qa.Bb?qt.$b=ue(Ct,vt.Pa.jb[0])?2+ue(Ct,vt.Pa.jb[2]):ue(Ct,vt.Pa.jb[1]):qt.$b=0,vt.kc&&(qt.Ad=ue(Ct,vt.Bd)),qt.Za=!ue(Ct,145)+0,qt.Za){var ir=qt.Ob,Ar=0;for(vt=0;4>vt;++vt){var er,Dn=dn[0+vt];for(er=0;4>er;++er){Dn=Mce[Xt[Ht+er]][Dn];for(var Br=eD[ue(Ct,Dn[0])];0<Br;)Br=eD[2*Br+ue(Ct,Dn[Br])];Dn=-Br,Xt[Ht+er]=Dn}r(ir,Ar,Xt,Ht,4),Ar+=4,dn[0+vt]=Dn}}else Dn=ue(Ct,156)?ue(Ct,128)?1:3:ue(Ct,163)?2:0,qt.Ob[0]=Dn,i(Xt,Ht,Dn,4),i(dn,0,Dn,4);qt.Dd=ue(Ct,142)?ue(Ct,114)?ue(Ct,183)?1:3:2:0}if(mt.m.Ka)return Vr(Je,7,"Premature end-of-partition0 encountered.");for(;Je.ja<Je.za;++Je.ja){if(mt=qe,Ct=(Ge=Je).rb[Ge.sb-1],Xt=Ge.rb[Ge.sb+Ge.ja],ct=Ge.ya[Ge.aa+Ge.ja],Ht=Ge.kc?ct.Ad:0)Ct.la=Xt.la=0,ct.Za||(Ct.Na=Xt.Na=0),ct.Hc=0,ct.Gc=0,ct.ia=0;else{var wr,In;if(Ct=Xt,Xt=mt,Ht=Ge.Pa.Xc,dn=Ge.ya[Ge.aa+Ge.ja],qt=Ge.pb[dn.$b],vt=dn.ad,ir=0,Ar=Ge.rb[Ge.sb-1],Dn=er=0,i(vt,ir,0,384),dn.Za)var Ti=0,bs=Ht[3];else{Br=o(16);var Ri=Ct.Na+Ar.Na;if(Ri=ev(Xt,Ht[1],Ri,qt.Eb,0,Br,0),Ct.Na=Ar.Na=(0<Ri)+0,1<Ri)Cp(Br,0,vt,ir);else{var ws=Br[0]+3>>3;for(Br=0;256>Br;Br+=16)vt[ir+Br]=ws}Ti=1,bs=Ht[0]}var dr=15&Ct.la,Xs=15&Ar.la;for(Br=0;4>Br;++Br){var Js=1&Xs;for(ws=In=0;4>ws;++ws)dr=dr>>1|(Js=(Ri=ev(Xt,bs,Ri=Js+(1&dr),qt.Sc,Ti,vt,ir))>Ti)<<7,In=In<<2|(3<Ri?3:1<Ri?2:vt[ir+0]!=0),ir+=16;dr>>=4,Xs=Xs>>1|Js<<7,er=(er<<8|In)>>>0}for(bs=dr,Ti=Xs>>4,wr=0;4>wr;wr+=2){for(In=0,dr=Ct.la>>4+wr,Xs=Ar.la>>4+wr,Br=0;2>Br;++Br){for(Js=1&Xs,ws=0;2>ws;++ws)Ri=Js+(1&dr),dr=dr>>1|(Js=0<(Ri=ev(Xt,Ht[2],Ri,qt.Qc,0,vt,ir)))<<3,In=In<<2|(3<Ri?3:1<Ri?2:vt[ir+0]!=0),ir+=16;dr>>=2,Xs=Xs>>1|Js<<5}Dn|=In<<4*wr,bs|=dr<<4<<wr,Ti|=(240&Xs)<<wr}Ct.la=bs,Ar.la=Ti,dn.Hc=er,dn.Gc=Dn,dn.ia=43690&Dn?0:qt.ia,Ht=!(er|Dn)}if(0<Ge.L&&(Ge.wa[Ge.Y+Ge.ja]=Ge.gd[ct.$b][ct.Za],Ge.wa[Ge.Y+Ge.ja].La|=!Ht),mt.Ka)return Vr(Je,7,"Premature end-of-file encountered.")}if(T0(Je),Ge=yt,mt=1,ct=(qe=Je).D,Ct=0<qe.L&&qe.M>=qe.zb&&qe.M<=qe.Va,qe.Aa==0)e:{if(ct.M=qe.M,ct.uc=Ct,V0(qe,ct),mt=1,ct=(In=qe.D).Nb,Ct=(Dn=ix[qe.L])*qe.R,Xt=Dn/2*qe.B,Br=16*ct*qe.R,ws=8*ct*qe.B,Ht=qe.sa,dn=qe.ta-Ct+Br,qt=qe.qa,vt=qe.ra-Xt+ws,ir=qe.Ha,Ar=qe.Ia-Xt+ws,Xs=(dr=In.M)==0,er=dr>=qe.Va-1,qe.Aa==2&&V0(qe,In),In.uc)for(Js=(Ri=qe).D.M,t(Ri.D.uc),In=Ri.yb;In<Ri.Hb;++In){Ti=In,bs=Js;var Zi=(po=(ai=Ri).D).Nb;wr=ai.R;var po=po.wa[po.Y+Ti],ns=ai.sa,ja=ai.ta+16*Zi*wr+16*Ti,Ac=po.dd,eo=po.tc;if(eo!=0)if(t(3<=eo),ai.L==1)0<Ti&&Lf(ns,ja,wr,eo+4),po.La&&Ra(ns,ja,wr,eo),0<bs&&kd(ns,ja,wr,eo+4),po.La&&J0(ns,ja,wr,eo);else{var Ru=ai.B,Id=ai.qa,Ep=ai.ra+8*Zi*Ru+8*Ti,Mf=ai.Ha,ai=ai.Ia+8*Zi*Ru+8*Ti;Zi=po.ld,0<Ti&&(Kw(ns,ja,wr,eo+4,Ac,Zi),_d(Id,Ep,Mf,ai,Ru,eo+4,Ac,Zi)),po.La&&(Pf(ns,ja,wr,eo,Ac,Zi),_p(Id,Ep,Mf,ai,Ru,eo,Ac,Zi)),0<bs&&(Sp(ns,ja,wr,eo+4,Ac,Zi),X0(Id,Ep,Mf,ai,Ru,eo+4,Ac,Zi)),po.La&&(Bd(ns,ja,wr,eo,Ac,Zi),Ed(Id,Ep,Mf,ai,Ru,eo,Ac,Zi))}}if(qe.ia&&alert("todo:DitherRow"),Ge.put!=null){if(In=16*dr,dr=16*(dr+1),Xs?(Ge.y=qe.sa,Ge.O=qe.ta+Br,Ge.f=qe.qa,Ge.N=qe.ra+ws,Ge.ea=qe.Ha,Ge.W=qe.Ia+ws):(In-=Dn,Ge.y=Ht,Ge.O=dn,Ge.f=qt,Ge.N=vt,Ge.ea=ir,Ge.W=Ar),er||(dr-=Dn),dr>Ge.o&&(dr=Ge.o),Ge.F=null,Ge.J=null,qe.Fa!=null&&0<qe.Fa.length&&In<dr&&(Ge.J=H0(qe,Ge,In,dr-In),Ge.F=qe.mb,Ge.F==null&&Ge.F.length==0)){mt=Vr(qe,3,"Could not decode alpha data.");break e}In<Ge.j&&(Dn=Ge.j-In,In=Ge.j,t(!(1&Dn)),Ge.O+=qe.R*Dn,Ge.N+=qe.B*(Dn>>1),Ge.W+=qe.B*(Dn>>1),Ge.F!=null&&(Ge.J+=Ge.width*Dn)),In<dr&&(Ge.O+=Ge.v,Ge.N+=Ge.v>>1,Ge.W+=Ge.v>>1,Ge.F!=null&&(Ge.J+=Ge.v),Ge.ka=In-Ge.j,Ge.U=Ge.va-Ge.v,Ge.T=dr-In,mt=Ge.put(Ge))}ct+1!=qe.Ic||er||(r(qe.sa,qe.ta-Ct,Ht,dn+16*qe.R,Ct),r(qe.qa,qe.ra-Xt,qt,vt+8*qe.B,Xt),r(qe.Ha,qe.Ia-Xt,ir,Ar+8*qe.B,Xt))}if(!mt)return Vr(Je,6,"Output aborted.")}return 1}(S,P)),P.bc!=null&&P.bc(P),G&=1}return G?(S.cb=0,G):0}function Bl(S,P,G,te,fe){fe=S[P+G+32*te]+(fe>>3),S[P+G+32*te]=-256&fe?0>fe?0:255:fe}function cp(S,P,G,te,fe,ge){Bl(S,P,0,G,te+fe),Bl(S,P,1,G,te+ge),Bl(S,P,2,G,te-ge),Bl(S,P,3,G,te-fe)}function ms(S){return(20091*S>>16)+S}function R0(S,P,G,te){var fe,ge=0,me=o(16);for(fe=0;4>fe;++fe){var we=S[P+0]+S[P+8],Ce=S[P+0]-S[P+8],ke=(35468*S[P+4]>>16)-ms(S[P+12]),Ve=ms(S[P+4])+(35468*S[P+12]>>16);me[ge+0]=we+Ve,me[ge+1]=Ce+ke,me[ge+2]=Ce-ke,me[ge+3]=we-Ve,ge+=4,P++}for(fe=ge=0;4>fe;++fe)we=(S=me[ge+0]+4)+me[ge+8],Ce=S-me[ge+8],ke=(35468*me[ge+4]>>16)-ms(me[ge+12]),Bl(G,te,0,0,we+(Ve=ms(me[ge+4])+(35468*me[ge+12]>>16))),Bl(G,te,1,0,Ce+ke),Bl(G,te,2,0,Ce-ke),Bl(G,te,3,0,we-Ve),ge++,te+=32}function Tw(S,P,G,te){var fe=S[P+0]+4,ge=35468*S[P+4]>>16,me=ms(S[P+4]),we=35468*S[P+1]>>16;cp(G,te,0,fe+me,S=ms(S[P+1]),we),cp(G,te,1,fe+ge,S,we),cp(G,te,2,fe-ge,S,we),cp(G,te,3,fe-me,S,we)}function uk(S,P,G,te,fe){R0(S,P,G,te),fe&&R0(S,P+16,G,te+4)}function Rw(S,P,G,te){Iu(S,P+0,G,te,1),Iu(S,P+32,G,te+128,1)}function fk(S,P,G,te){var fe;for(S=S[P+0]+4,fe=0;4>fe;++fe)for(P=0;4>P;++P)Bl(G,te,P,fe,S)}function Pw(S,P,G,te){S[P+0]&&ts(S,P+0,G,te),S[P+16]&&ts(S,P+16,G,te+4),S[P+32]&&ts(S,P+32,G,te+128),S[P+48]&&ts(S,P+48,G,te+128+4)}function Ak(S,P,G,te){var fe,ge=o(16);for(fe=0;4>fe;++fe){var me=S[P+0+fe]+S[P+12+fe],we=S[P+4+fe]+S[P+8+fe],Ce=S[P+4+fe]-S[P+8+fe],ke=S[P+0+fe]-S[P+12+fe];ge[0+fe]=me+we,ge[8+fe]=me-we,ge[4+fe]=ke+Ce,ge[12+fe]=ke-Ce}for(fe=0;4>fe;++fe)me=(S=ge[0+4*fe]+3)+ge[3+4*fe],we=ge[1+4*fe]+ge[2+4*fe],Ce=ge[1+4*fe]-ge[2+4*fe],ke=S-ge[3+4*fe],G[te+0]=me+we>>3,G[te+16]=ke+Ce>>3,G[te+32]=me-we>>3,G[te+48]=ke-Ce>>3,te+=64}function P0(S,P,G){var te,fe=P-32,ge=Ys,me=255-S[fe-1];for(te=0;te<G;++te){var we,Ce=ge,ke=me+S[P-1];for(we=0;we<G;++we)S[P+we]=Ce[ke+S[fe+we]];P+=32}}function dk(S,P){P0(S,P,4)}function hk(S,P){P0(S,P,8)}function pk(S,P){P0(S,P,16)}function _u(S,P){var G;for(G=0;16>G;++G)r(S,P+32*G,S,P-32,16)}function up(S,P){var G;for(G=16;0<G;--G)i(S,P,S[P-1],16),P+=32}function fp(S,P,G){var te;for(te=0;16>te;++te)i(P,G+32*te,S,16)}function Lw(S,P){var G,te=16;for(G=0;16>G;++G)te+=S[P-1+32*G]+S[P+G-32];fp(te>>5,S,P)}function Fo(S,P){var G,te=8;for(G=0;16>G;++G)te+=S[P-1+32*G];fp(te>>4,S,P)}function gk(S,P){var G,te=8;for(G=0;16>G;++G)te+=S[P+G-32];fp(te>>4,S,P)}function Ow(S,P){fp(128,S,P)}function Cn(S,P,G){return S+2*P+G+2>>2}function mk(S,P){var G,te=P-32;for(te=new Uint8Array([Cn(S[te-1],S[te+0],S[te+1]),Cn(S[te+0],S[te+1],S[te+2]),Cn(S[te+1],S[te+2],S[te+3]),Cn(S[te+2],S[te+3],S[te+4])]),G=0;4>G;++G)r(S,P+32*G,te,0,te.length)}function vk(S,P){var G=S[P-1],te=S[P-1+32],fe=S[P-1+64],ge=S[P-1+96];ye(S,P+0,16843009*Cn(S[P-1-32],G,te)),ye(S,P+32,16843009*Cn(G,te,fe)),ye(S,P+64,16843009*Cn(te,fe,ge)),ye(S,P+96,16843009*Cn(fe,ge,ge))}function cc(S,P){var G,te=4;for(G=0;4>G;++G)te+=S[P+G-32]+S[P-1+32*G];for(te>>=3,G=0;4>G;++G)i(S,P+32*G,te,4)}function jw(S,P){var G=S[P-1+0],te=S[P-1+32],fe=S[P-1+64],ge=S[P-1-32],me=S[P+0-32],we=S[P+1-32],Ce=S[P+2-32],ke=S[P+3-32];S[P+0+96]=Cn(te,fe,S[P-1+96]),S[P+1+96]=S[P+0+64]=Cn(G,te,fe),S[P+2+96]=S[P+1+64]=S[P+0+32]=Cn(ge,G,te),S[P+3+96]=S[P+2+64]=S[P+1+32]=S[P+0+0]=Cn(me,ge,G),S[P+3+64]=S[P+2+32]=S[P+1+0]=Cn(we,me,ge),S[P+3+32]=S[P+2+0]=Cn(Ce,we,me),S[P+3+0]=Cn(ke,Ce,we)}function Mw(S,P){var G=S[P+1-32],te=S[P+2-32],fe=S[P+3-32],ge=S[P+4-32],me=S[P+5-32],we=S[P+6-32],Ce=S[P+7-32];S[P+0+0]=Cn(S[P+0-32],G,te),S[P+1+0]=S[P+0+32]=Cn(G,te,fe),S[P+2+0]=S[P+1+32]=S[P+0+64]=Cn(te,fe,ge),S[P+3+0]=S[P+2+32]=S[P+1+64]=S[P+0+96]=Cn(fe,ge,me),S[P+3+32]=S[P+2+64]=S[P+1+96]=Cn(ge,me,we),S[P+3+64]=S[P+2+96]=Cn(me,we,Ce),S[P+3+96]=Cn(we,Ce,Ce)}function Ap(S,P){var G=S[P-1+0],te=S[P-1+32],fe=S[P-1+64],ge=S[P-1-32],me=S[P+0-32],we=S[P+1-32],Ce=S[P+2-32],ke=S[P+3-32];S[P+0+0]=S[P+1+64]=ge+me+1>>1,S[P+1+0]=S[P+2+64]=me+we+1>>1,S[P+2+0]=S[P+3+64]=we+Ce+1>>1,S[P+3+0]=Ce+ke+1>>1,S[P+0+96]=Cn(fe,te,G),S[P+0+64]=Cn(te,G,ge),S[P+0+32]=S[P+1+96]=Cn(G,ge,me),S[P+1+32]=S[P+2+96]=Cn(ge,me,we),S[P+2+32]=S[P+3+96]=Cn(me,we,Ce),S[P+3+32]=Cn(we,Ce,ke)}function L0(S,P){var G=S[P+0-32],te=S[P+1-32],fe=S[P+2-32],ge=S[P+3-32],me=S[P+4-32],we=S[P+5-32],Ce=S[P+6-32],ke=S[P+7-32];S[P+0+0]=G+te+1>>1,S[P+1+0]=S[P+0+64]=te+fe+1>>1,S[P+2+0]=S[P+1+64]=fe+ge+1>>1,S[P+3+0]=S[P+2+64]=ge+me+1>>1,S[P+0+32]=Cn(G,te,fe),S[P+1+32]=S[P+0+96]=Cn(te,fe,ge),S[P+2+32]=S[P+1+96]=Cn(fe,ge,me),S[P+3+32]=S[P+2+96]=Cn(ge,me,we),S[P+3+64]=Cn(me,we,Ce),S[P+3+96]=Cn(we,Ce,ke)}function yk(S,P){var G=S[P-1+0],te=S[P-1+32],fe=S[P-1+64],ge=S[P-1+96];S[P+0+0]=G+te+1>>1,S[P+2+0]=S[P+0+32]=te+fe+1>>1,S[P+2+32]=S[P+0+64]=fe+ge+1>>1,S[P+1+0]=Cn(G,te,fe),S[P+3+0]=S[P+1+32]=Cn(te,fe,ge),S[P+3+32]=S[P+1+64]=Cn(fe,ge,ge),S[P+3+64]=S[P+2+64]=S[P+0+96]=S[P+1+96]=S[P+2+96]=S[P+3+96]=ge}function bk(S,P){var G=S[P-1+0],te=S[P-1+32],fe=S[P-1+64],ge=S[P-1+96],me=S[P-1-32],we=S[P+0-32],Ce=S[P+1-32],ke=S[P+2-32];S[P+0+0]=S[P+2+32]=G+me+1>>1,S[P+0+32]=S[P+2+64]=te+G+1>>1,S[P+0+64]=S[P+2+96]=fe+te+1>>1,S[P+0+96]=ge+fe+1>>1,S[P+3+0]=Cn(we,Ce,ke),S[P+2+0]=Cn(me,we,Ce),S[P+1+0]=S[P+3+32]=Cn(G,me,we),S[P+1+32]=S[P+3+64]=Cn(te,G,me),S[P+1+64]=S[P+3+96]=Cn(fe,te,G),S[P+1+96]=Cn(ge,fe,te)}function wk(S,P){var G;for(G=0;8>G;++G)r(S,P+32*G,S,P-32,8)}function O0(S,P){var G;for(G=0;8>G;++G)i(S,P,S[P-1],8),P+=32}function bd(S,P,G){var te;for(te=0;8>te;++te)i(P,G+32*te,S,8)}function kf(S,P){var G,te=8;for(G=0;8>G;++G)te+=S[P+G-32]+S[P-1+32*G];bd(te>>4,S,P)}function xk(S,P){var G,te=4;for(G=0;8>G;++G)te+=S[P+G-32];bd(te>>3,S,P)}function wd(S,P){var G,te=4;for(G=0;8>G;++G)te+=S[P-1+32*G];bd(te>>3,S,P)}function j0(S,P){bd(128,S,P)}function dp(S,P,G){var te=S[P-G],fe=S[P+0],ge=3*(fe-te)+kk[1020+S[P-2*G]-S[P+G]],me=Yw[112+(ge+4>>3)];S[P-G]=Ys[255+te+Yw[112+(ge+3>>3)]],S[P+0]=Ys[255+fe-me]}function Nw(S,P,G,te){var fe=S[P+0],ge=S[P+G];return La[255+S[P-2*G]-S[P-G]]>te||La[255+ge-fe]>te}function Uw(S,P,G,te){return 4*La[255+S[P-G]-S[P+0]]+La[255+S[P-2*G]-S[P+G]]<=te}function Dw(S,P,G,te,fe){var ge=S[P-3*G],me=S[P-2*G],we=S[P-G],Ce=S[P+0],ke=S[P+G],Ve=S[P+2*G],it=S[P+3*G];return 4*La[255+we-Ce]+La[255+me-ke]>te?0:La[255+S[P-4*G]-ge]<=fe&&La[255+ge-me]<=fe&&La[255+me-we]<=fe&&La[255+it-Ve]<=fe&&La[255+Ve-ke]<=fe&&La[255+ke-Ce]<=fe}function $w(S,P,G,te){var fe=2*te+1;for(te=0;16>te;++te)Uw(S,P+te,G,fe)&&dp(S,P+te,G)}function uc(S,P,G,te){var fe=2*te+1;for(te=0;16>te;++te)Uw(S,P+te*G,1,fe)&&dp(S,P+te*G,1)}function Bu(S,P,G,te){var fe;for(fe=3;0<fe;--fe)$w(S,P+=4*G,G,te)}function Ck(S,P,G,te){var fe;for(fe=3;0<fe;--fe)uc(S,P+=4,G,te)}function If(S,P,G,te,fe,ge,me,we){for(ge=2*ge+1;0<fe--;){if(Dw(S,P,G,ge,me))if(Nw(S,P,G,we))dp(S,P,G);else{var Ce=S,ke=P,Ve=G,it=Ce[ke-2*Ve],ot=Ce[ke-Ve],Je=Ce[ke+0],yt=Ce[ke+Ve],ct=Ce[ke+2*Ve],qe=27*(mt=kk[1020+3*(Je-ot)+kk[1020+it-yt]])+63>>7,Ge=18*mt+63>>7,mt=9*mt+63>>7;Ce[ke-3*Ve]=Ys[255+Ce[ke-3*Ve]+mt],Ce[ke-2*Ve]=Ys[255+it+Ge],Ce[ke-Ve]=Ys[255+ot+qe],Ce[ke+0]=Ys[255+Je-qe],Ce[ke+Ve]=Ys[255+yt-Ge],Ce[ke+2*Ve]=Ys[255+ct-mt]}P+=te}}function El(S,P,G,te,fe,ge,me,we){for(ge=2*ge+1;0<fe--;){if(Dw(S,P,G,ge,me))if(Nw(S,P,G,we))dp(S,P,G);else{var Ce=S,ke=P,Ve=G,it=Ce[ke-Ve],ot=Ce[ke+0],Je=Ce[ke+Ve],yt=Yw[112+((ct=3*(ot-it))+4>>3)],ct=Yw[112+(ct+3>>3)],qe=yt+1>>1;Ce[ke-2*Ve]=Ys[255+Ce[ke-2*Ve]+qe],Ce[ke-Ve]=Ys[255+it+ct],Ce[ke+0]=Ys[255+ot-yt],Ce[ke+Ve]=Ys[255+Je-qe]}P+=te}}function M0(S,P,G,te,fe,ge){If(S,P,G,1,16,te,fe,ge)}function xd(S,P,G,te,fe,ge){If(S,P,1,G,16,te,fe,ge)}function Sk(S,P,G,te,fe,ge){var me;for(me=3;0<me;--me)El(S,P+=4*G,G,1,16,te,fe,ge)}function hp(S,P,G,te,fe,ge){var me;for(me=3;0<me;--me)El(S,P+=4,1,G,16,te,fe,ge)}function _k(S,P,G,te,fe,ge,me,we){If(S,P,fe,1,8,ge,me,we),If(G,te,fe,1,8,ge,me,we)}function N0(S,P,G,te,fe,ge,me,we){If(S,P,1,fe,8,ge,me,we),If(G,te,1,fe,8,ge,me,we)}function U0(S,P,G,te,fe,ge,me,we){El(S,P+4*fe,fe,1,8,ge,me,we),El(G,te+4*fe,fe,1,8,ge,me,we)}function Qw(S,P,G,te,fe,ge,me,we){El(S,P+4,1,fe,8,ge,me,we),El(G,te+4,1,fe,8,ge,me,we)}function pp(){this.ba=new je,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new de,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function D0(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function $0(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Hw(){this.ua=0,this.Wa=new se,this.vb=new se,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new N,this.yc=new E}function Bk(){this.xb=this.a=0,this.l=new Zn,this.ca=new je,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new z,this.Pb=0,this.wd=new z,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Hw,this.ab=0,this.gc=s(4,$0),this.Oc=0}function gp(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Zn,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Cd(S,P,G,te,fe,ge,me){for(S=S==null?0:S[P+0],P=0;P<me;++P)fe[ge+P]=S+G[te+P]&255,S=fe[ge+P]}function Q0(S,P,G,te,fe,ge,me){var we;if(S==null)Cd(null,null,G,te,fe,ge,me);else for(we=0;we<me;++we)fe[ge+we]=S[P+we]+G[te+we]&255}function Ff(S,P,G,te,fe,ge,me){if(S==null)Cd(null,null,G,te,fe,ge,me);else{var we,Ce=S[P+0],ke=Ce,Ve=Ce;for(we=0;we<me;++we)ke=Ve+(Ce=S[P+we])-ke,Ve=G[te+we]+(-256&ke?0>ke?0:255:ke)&255,ke=Ce,fe[ge+we]=Ve}}function H0(S,P,G,te){var fe=P.width,ge=P.o;if(t(S!=null&&P!=null),0>G||0>=te||G+te>ge)return null;if(!S.Cc){if(S.ga==null){var me;if(S.ga=new gp,(me=S.ga==null)||(me=P.width*P.o,t(S.Gb.length==0),S.Gb=o(me),S.Uc=0,S.Gb==null?me=0:(S.mb=S.Gb,S.nb=S.Uc,S.rc=null,me=1),me=!me),!me){me=S.ga;var we=S.Fa,Ce=S.P,ke=S.qc,Ve=S.mb,it=S.nb,ot=Ce+1,Je=ke-1,yt=me.l;if(t(we!=null&&Ve!=null&&P!=null),jf[0]=null,jf[1]=Cd,jf[2]=Q0,jf[3]=Ff,me.ca=Ve,me.tb=it,me.c=P.width,me.i=P.height,t(0<me.c&&0<me.i),1>=ke)P=0;else if(me.$a=we[Ce+0]>>0&3,me.Z=we[Ce+0]>>2&3,me.Lc=we[Ce+0]>>4&3,Ce=we[Ce+0]>>6&3,0>me.$a||1<me.$a||4<=me.Z||1<me.Lc||Ce)P=0;else if(yt.put=Et,yt.ac=at,yt.bc=cn,yt.ma=me,yt.width=P.width,yt.height=P.height,yt.Da=P.Da,yt.v=P.v,yt.va=P.va,yt.j=P.j,yt.o=P.o,me.$a)e:{t(me.$a==1),P=Bt();t:for(;;){if(P==null){P=0;break e}if(t(me!=null),me.mc=P,P.c=me.c,P.i=me.i,P.l=me.l,P.l.ma=me,P.l.width=me.c,P.l.height=me.i,P.a=0,Y(P.m,we,ot,Je),!$t(me.c,me.i,1,P,null)||(P.ab==1&&P.gc[0].hc==3&&wt(P.s)?(me.ic=1,we=P.c*P.i,P.Ta=null,P.Ua=0,P.V=o(we),P.Ba=0,P.V==null?(P.a=1,P=0):P=1):(me.ic=0,P=Qt(P,me.c)),!P))break t;P=1;break e}me.mc=null,P=0}else P=Je>=me.c*me.i;me=!P}if(me)return null;S.ga.Lc!=1?S.Ga=0:te=ge-G}t(S.ga!=null),t(G+te<=ge);e:{if(P=(we=S.ga).c,ge=we.l.o,we.$a==0){if(ot=S.rc,Je=S.Vc,yt=S.Fa,Ce=S.P+1+G*P,ke=S.mb,Ve=S.nb+G*P,t(Ce<=S.P+S.qc),we.Z!=0)for(t(jf[we.Z]!=null),me=0;me<te;++me)jf[we.Z](ot,Je,yt,Ce,ke,Ve,P),ot=ke,Je=Ve,Ve+=P,Ce+=P;else for(me=0;me<te;++me)r(ke,Ve,yt,Ce,P),ot=ke,Je=Ve,Ve+=P,Ce+=P;S.rc=ot,S.Vc=Je}else{if(t(we.mc!=null),P=G+te,t((me=we.mc)!=null),t(P<=me.i),me.C>=P)P=1;else if(we.ic||nt(),we.ic){we=me.V,ot=me.Ba,Je=me.c;var ct=me.i,qe=(yt=1,Ce=me.$/Je,ke=me.$%Je,Ve=me.m,it=me.s,me.$),Ge=Je*ct,mt=Je*P,Ct=it.wc,vt=qe<mt?kt(it,ke,Ce):null;t(qe<=Ge),t(P<=ct),t(wt(it));t:for(;;){for(;!Ve.h&&qe<mt;){if(ke&Ct||(vt=kt(it,ke,Ce)),t(vt!=null),U(Ve),256>(ct=lt(vt.G[0],vt.H[0],Ve)))we[ot+qe]=ct,++qe,++ke>=Je&&(ke=0,++Ce<=P&&!(Ce%16)&&It(me,Ce));else{if(!(280>ct)){yt=0;break t}ct=$e(ct-256,Ve);var Xt,Ht=lt(vt.G[4],vt.H[4],Ve);if(U(Ve),!(qe>=(Ht=Ye(Je,Ht=$e(Ht,Ve)))&&Ge-qe>=ct)){yt=0;break t}for(Xt=0;Xt<ct;++Xt)we[ot+qe+Xt]=we[ot+qe+Xt-Ht];for(qe+=ct,ke+=ct;ke>=Je;)ke-=Je,++Ce<=P&&!(Ce%16)&&It(me,Ce);qe<mt&&ke&Ct&&(vt=kt(it,ke,Ce))}t(Ve.h==M(Ve))}It(me,Ce>P?P:Ce);break t}!yt||Ve.h&&qe<Ge?(yt=0,me.a=Ve.h?5:3):me.$=qe,P=yt}else P=et(me,me.V,me.Ba,me.c,me.i,P,An);if(!P){te=0;break e}}G+te>=ge&&(S.Cc=1),te=1}if(!te)return null;if(S.Cc&&((te=S.ga)!=null&&(te.mc=null),S.ga=null,0<S.Ga))return alert("todo:WebPDequantizeLevels"),null}return S.nb+G*fe}function Q(S,P,G,te,fe,ge){for(;0<fe--;){var me,we=S,Ce=P+(G?1:0),ke=S,Ve=P+(G?0:3);for(me=0;me<te;++me){var it=ke[Ve+4*me];it!=255&&(it*=32897,we[Ce+4*me+0]=we[Ce+4*me+0]*it>>23,we[Ce+4*me+1]=we[Ce+4*me+1]*it>>23,we[Ce+4*me+2]=we[Ce+4*me+2]*it>>23)}P+=ge}}function Ae(S,P,G,te,fe){for(;0<te--;){var ge;for(ge=0;ge<G;++ge){var me=S[P+2*ge+0],we=15&(ke=S[P+2*ge+1]),Ce=4369*we,ke=(240&ke|ke>>4)*Ce>>16;S[P+2*ge+0]=(240&me|me>>4)*Ce>>16&240|(15&me|me<<4)*Ce>>16>>4&15,S[P+2*ge+1]=240&ke|we}P+=fe}}function Pe(S,P,G,te,fe,ge,me,we){var Ce,ke,Ve=255;for(ke=0;ke<fe;++ke){for(Ce=0;Ce<te;++Ce){var it=S[P+Ce];ge[me+4*Ce]=it,Ve&=it}P+=G,me+=we}return Ve!=255}function Qe(S,P,G,te,fe){var ge;for(ge=0;ge<fe;++ge)G[te+ge]=S[P+ge]>>8}function nt(){Pa=Q,Lr=Ae,Or=Pe,vi=Qe}function dt(S,P,G){F[S]=function(te,fe,ge,me,we,Ce,ke,Ve,it,ot,Je,yt,ct,qe,Ge,mt,Ct){var vt,Xt=Ct-1>>1,Ht=we[Ce+0]|ke[Ve+0]<<16,dn=it[ot+0]|Je[yt+0]<<16;t(te!=null);var qt=3*Ht+dn+131074>>2;for(P(te[fe+0],255&qt,qt>>16,ct,qe),ge!=null&&(qt=3*dn+Ht+131074>>2,P(ge[me+0],255&qt,qt>>16,Ge,mt)),vt=1;vt<=Xt;++vt){var ir=we[Ce+vt]|ke[Ve+vt]<<16,Ar=it[ot+vt]|Je[yt+vt]<<16,er=Ht+ir+dn+Ar+524296,Dn=er+2*(ir+dn)>>3;qt=Dn+Ht>>1,Ht=(er=er+2*(Ht+Ar)>>3)+ir>>1,P(te[fe+2*vt-1],255&qt,qt>>16,ct,qe+(2*vt-1)*G),P(te[fe+2*vt-0],255&Ht,Ht>>16,ct,qe+(2*vt-0)*G),ge!=null&&(qt=er+dn>>1,Ht=Dn+Ar>>1,P(ge[me+2*vt-1],255&qt,qt>>16,Ge,mt+(2*vt-1)*G),P(ge[me+2*vt+0],255&Ht,Ht>>16,Ge,mt+(2*vt+0)*G)),Ht=ir,dn=Ar}1&Ct||(qt=3*Ht+dn+131074>>2,P(te[fe+Ct-1],255&qt,qt>>16,ct,qe+(Ct-1)*G),ge!=null&&(qt=3*dn+Ht+131074>>2,P(ge[me+Ct-1],255&qt,qt>>16,Ge,mt+(Ct-1)*G)))}}function _t(){Oa[Xw]=$ce,Oa[Jw]=nD,Oa[XU]=Qce,Oa[Zw]=rD,Oa[ex]=iD,Oa[Ik]=oD,Oa[JU]=Hce,Oa[Fk]=nD,Oa[Tk]=rD,Oa[tx]=iD,Oa[Rk]=oD}function Yt(S){return S&~zce?0>S?0:255:S>>sD}function un(S,P){return Yt((19077*S>>8)+(26149*P>>8)-14234)}function kn(S,P,G){return Yt((19077*S>>8)-(6419*P>>8)-(13320*G>>8)+8708)}function Sn(S,P){return Yt((19077*S>>8)+(33050*P>>8)-17685)}function Wn(S,P,G,te,fe){te[fe+0]=un(S,G),te[fe+1]=kn(S,P,G),te[fe+2]=Sn(S,P)}function Jr(S,P,G,te,fe){te[fe+0]=Sn(S,P),te[fe+1]=kn(S,P,G),te[fe+2]=un(S,G)}function si(S,P,G,te,fe){var ge=kn(S,P,G);P=ge<<3&224|Sn(S,P)>>3,te[fe+0]=248&un(S,G)|ge>>5,te[fe+1]=P}function Fi(S,P,G,te,fe){var ge=240&Sn(S,P)|15;te[fe+0]=240&un(S,G)|kn(S,P,G)>>4,te[fe+1]=ge}function To(S,P,G,te,fe){te[fe+0]=255,Wn(S,P,G,te,fe+1)}function Ji(S,P,G,te,fe){Jr(S,P,G,te,fe),te[fe+3]=255}function kl(S,P,G,te,fe){Wn(S,P,G,te,fe),te[fe+3]=255}function Gs(S,P){return 0>S?0:S>P?P:S}function fc(S,P,G){F[S]=function(te,fe,ge,me,we,Ce,ke,Ve,it){for(var ot=Ve+(-2&it)*G;Ve!=ot;)P(te[fe+0],ge[me+0],we[Ce+0],ke,Ve),P(te[fe+1],ge[me+0],we[Ce+0],ke,Ve+G),fe+=2,++me,++Ce,Ve+=2*G;1&it&&P(te[fe+0],ge[me+0],we[Ce+0],ke,Ve)}}function zw(S,P,G){return G==0?S==0?P==0?6:5:P==0?4:0:G}function z0(S,P,G,te,fe){switch(S>>>30){case 3:Iu(P,G,te,fe,0);break;case 2:mi(P,G,te,fe);break;case 1:ts(P,G,te,fe)}}function V0(S,P){var G,te,fe=P.M,ge=P.Nb,me=S.oc,we=S.pc+40,Ce=S.oc,ke=S.pc+584,Ve=S.oc,it=S.pc+600;for(G=0;16>G;++G)me[we+32*G-1]=129;for(G=0;8>G;++G)Ce[ke+32*G-1]=129,Ve[it+32*G-1]=129;for(0<fe?me[we-1-32]=Ce[ke-1-32]=Ve[it-1-32]=129:(i(me,we-32-1,127,21),i(Ce,ke-32-1,127,9),i(Ve,it-32-1,127,9)),te=0;te<S.za;++te){var ot=P.ya[P.aa+te];if(0<te){for(G=-1;16>G;++G)r(me,we+32*G-4,me,we+32*G+12,4);for(G=-1;8>G;++G)r(Ce,ke+32*G-4,Ce,ke+32*G+4,4),r(Ve,it+32*G-4,Ve,it+32*G+4,4)}var Je=S.Gd,yt=S.Hd+te,ct=ot.ad,qe=ot.Hc;if(0<fe&&(r(me,we-32,Je[yt].y,0,16),r(Ce,ke-32,Je[yt].f,0,8),r(Ve,it-32,Je[yt].ea,0,8)),ot.Za){var Ge=me,mt=we-32+16;for(0<fe&&(te>=S.za-1?i(Ge,mt,Je[yt].y[15],4):r(Ge,mt,Je[yt+1].y,0,4)),G=0;4>G;G++)Ge[mt+128+G]=Ge[mt+256+G]=Ge[mt+384+G]=Ge[mt+0+G];for(G=0;16>G;++G,qe<<=2)Ge=me,mt=we+lD[G],Il[ot.Ob[G]](Ge,mt),z0(qe,ct,16*+G,Ge,mt)}else if(Ge=zw(te,fe,ot.Ob[0]),Of[Ge](me,we),qe!=0)for(G=0;16>G;++G,qe<<=2)z0(qe,ct,16*+G,me,we+lD[G]);for(G=ot.Gc,Ge=zw(te,fe,ot.Dd),Tu[Ge](Ce,ke),Tu[Ge](Ve,it),qe=ct,Ge=Ce,mt=ke,255&(ot=G>>0)&&(170&ot?Y0(qe,256,Ge,mt):Ta(qe,256,Ge,mt)),ot=Ve,qe=it,255&(G>>=8)&&(170&G?Y0(ct,320,ot,qe):Ta(ct,320,ot,qe)),fe<S.Ub-1&&(r(Je[yt].y,0,me,we+480,16),r(Je[yt].f,0,Ce,ke+224,8),r(Je[yt].ea,0,Ve,it+224,8)),G=8*ge*S.B,Je=S.sa,yt=S.ta+16*te+16*ge*S.R,ct=S.qa,ot=S.ra+8*te+G,qe=S.Ha,Ge=S.Ia+8*te+G,G=0;16>G;++G)r(Je,yt+G*S.R,me,we+32*G,16);for(G=0;8>G;++G)r(ct,ot+G*S.B,Ce,ke+32*G,8),r(qe,Ge+G*S.B,Ve,it+32*G,8)}}function mp(S,P,G,te,fe,ge,me,we,Ce){var ke=[0],Ve=[0],it=0,ot=Ce!=null?Ce.kd:0,Je=Ce??new D0;if(S==null||12>G)return 7;Je.data=S,Je.w=P,Je.ha=G,P=[P],G=[G],Je.gb=[Je.gb];e:{var yt=P,ct=G,qe=Je.gb;if(t(S!=null),t(ct!=null),t(qe!=null),qe[0]=0,12<=ct[0]&&!n(S,yt[0],"RIFF")){if(n(S,yt[0]+8,"WEBP")){qe=3;break e}var Ge=ce(S,yt[0]+4);if(12>Ge||4294967286<Ge){qe=3;break e}if(ot&&Ge>ct[0]-8){qe=7;break e}qe[0]=Ge,yt[0]+=12,ct[0]-=12}qe=0}if(qe!=0)return qe;for(Ge=0<Je.gb[0],G=G[0];;){e:{var mt=S;ct=P,qe=G;var Ct=ke,vt=Ve,Xt=yt=[0];if((qt=it=[it])[0]=0,8>qe[0])qe=7;else{if(!n(mt,ct[0],"VP8X")){if(ce(mt,ct[0]+4)!=10){qe=3;break e}if(18>qe[0]){qe=7;break e}var Ht=ce(mt,ct[0]+8),dn=1+J(mt,ct[0]+12);if(2147483648<=dn*(mt=1+J(mt,ct[0]+15))){qe=3;break e}Xt!=null&&(Xt[0]=Ht),Ct!=null&&(Ct[0]=dn),vt!=null&&(vt[0]=mt),ct[0]+=18,qe[0]-=18,qt[0]=1}qe=0}}if(it=it[0],yt=yt[0],qe!=0)return qe;if(ct=!!(2&yt),!Ge&&it)return 3;if(ge!=null&&(ge[0]=!!(16&yt)),me!=null&&(me[0]=ct),we!=null&&(we[0]=0),me=ke[0],yt=Ve[0],it&&ct&&Ce==null){qe=0;break}if(4>G){qe=7;break}if(Ge&&it||!Ge&&!it&&!n(S,P[0],"ALPH")){G=[G],Je.na=[Je.na],Je.P=[Je.P],Je.Sa=[Je.Sa];e:{Ht=S,qe=P,Ge=G;var qt=Je.gb;Ct=Je.na,vt=Je.P,Xt=Je.Sa,dn=22,t(Ht!=null),t(Ge!=null),mt=qe[0];var ir=Ge[0];for(t(Ct!=null),t(Xt!=null),Ct[0]=null,vt[0]=null,Xt[0]=0;;){if(qe[0]=mt,Ge[0]=ir,8>ir){qe=7;break e}var Ar=ce(Ht,mt+4);if(4294967286<Ar){qe=3;break e}var er=8+Ar+1&-2;if(dn+=er,0<qt&&dn>qt){qe=3;break e}if(!n(Ht,mt,"VP8 ")||!n(Ht,mt,"VP8L")){qe=0;break e}if(ir[0]<er){qe=7;break e}n(Ht,mt,"ALPH")||(Ct[0]=Ht,vt[0]=mt+8,Xt[0]=Ar),mt+=er,ir-=er}}if(G=G[0],Je.na=Je.na[0],Je.P=Je.P[0],Je.Sa=Je.Sa[0],qe!=0)break}G=[G],Je.Ja=[Je.Ja],Je.xa=[Je.xa];e:if(qt=S,qe=P,Ge=G,Ct=Je.gb[0],vt=Je.Ja,Xt=Je.xa,Ht=qe[0],mt=!n(qt,Ht,"VP8 "),dn=!n(qt,Ht,"VP8L"),t(qt!=null),t(Ge!=null),t(vt!=null),t(Xt!=null),8>Ge[0])qe=7;else{if(mt||dn){if(qt=ce(qt,Ht+4),12<=Ct&&qt>Ct-12){qe=3;break e}if(ot&&qt>Ge[0]-8){qe=7;break e}vt[0]=qt,qe[0]+=8,Ge[0]-=8,Xt[0]=dn}else Xt[0]=5<=Ge[0]&&qt[Ht+0]==47&&!(qt[Ht+4]>>5),vt[0]=Ge[0];qe=0}if(G=G[0],Je.Ja=Je.Ja[0],Je.xa=Je.xa[0],P=P[0],qe!=0)break;if(4294967286<Je.Ja)return 3;if(we==null||ct||(we[0]=Je.xa?2:1),me=[me],yt=[yt],Je.xa){if(5>G){qe=7;break}we=me,ot=yt,ct=ge,S==null||5>G?S=0:5<=G&&S[P+0]==47&&!(S[P+4]>>5)?(Ge=[0],qt=[0],Ct=[0],Y(vt=new z,S,P,G),Te(vt,Ge,qt,Ct)?(we!=null&&(we[0]=Ge[0]),ot!=null&&(ot[0]=qt[0]),ct!=null&&(ct[0]=Ct[0]),S=1):S=0):S=0}else{if(10>G){qe=7;break}we=yt,S==null||10>G||!lp(S,P+3,G-3)?S=0:(ot=S[P+0]|S[P+1]<<8|S[P+2]<<16,ct=16383&(S[P+7]<<8|S[P+6]),S=16383&(S[P+9]<<8|S[P+8]),1&ot||3<(ot>>1&7)||!(ot>>4&1)||ot>>5>=Je.Ja||!ct||!S?S=0:(me&&(me[0]=ct),we&&(we[0]=S),S=1))}if(!S||(me=me[0],yt=yt[0],it&&(ke[0]!=me||Ve[0]!=yt)))return 3;Ce!=null&&(Ce[0]=Je,Ce.offset=P-Ce.w,t(4294967286>P-Ce.w),t(Ce.offset==Ce.ha-G));break}return qe==0||qe==7&&it&&Ce==null?(ge!=null&&(ge[0]|=Je.na!=null&&0<Je.na.length),te!=null&&(te[0]=me),fe!=null&&(fe[0]=yt),0):qe}function q0(S,P,G){var te=P.width,fe=P.height,ge=0,me=0,we=te,Ce=fe;if(P.Da=S!=null&&0<S.Da,P.Da&&(we=S.cd,Ce=S.bd,ge=S.v,me=S.j,11>G||(ge&=-2,me&=-2),0>ge||0>me||0>=we||0>=Ce||ge+we>te||me+Ce>fe))return 0;if(P.v=ge,P.j=me,P.va=ge+we,P.o=me+Ce,P.U=we,P.T=Ce,P.da=S!=null&&0<S.da,P.da){if(!Me(we,Ce,G=[S.ib],ge=[S.hb]))return 0;P.ib=G[0],P.hb=ge[0]}return P.ob=S!=null&&S.ob,P.Kb=S==null||!S.Sd,P.da&&(P.ob=P.ib<3*te/4&&P.hb<3*fe/4,P.Kb=0),1}function W0(S){if(S==null)return 2;if(11>S.S){var P=S.f.RGBA;P.fb+=(S.height-1)*P.A,P.A=-P.A}else P=S.f.kb,S=S.height,P.O+=(S-1)*P.fa,P.fa=-P.fa,P.N+=(S-1>>1)*P.Ab,P.Ab=-P.Ab,P.W+=(S-1>>1)*P.Db,P.Db=-P.Db,P.F!=null&&(P.J+=(S-1)*P.lb,P.lb=-P.lb);return 0}function vp(S,P,G,te){if(te==null||0>=S||0>=P)return 2;if(G!=null){if(G.Da){var fe=G.cd,ge=G.bd,me=-2&G.v,we=-2&G.j;if(0>me||0>we||0>=fe||0>=ge||me+fe>S||we+ge>P)return 2;S=fe,P=ge}if(G.da){if(!Me(S,P,fe=[G.ib],ge=[G.hb]))return 2;S=fe[0],P=ge[0]}}te.width=S,te.height=P;e:{var Ce=te.width,ke=te.height;if(S=te.S,0>=Ce||0>=ke||!(S>=Xw&&13>S))S=2;else{if(0>=te.Rd&&te.sd==null){me=ge=fe=P=0;var Ve=(we=Ce*cD[S])*ke;if(11>S||(ge=(ke+1)/2*(P=(Ce+1)/2),S==12&&(me=(fe=Ce)*ke)),(ke=o(Ve+2*ge+me))==null){S=1;break e}te.sd=ke,11>S?((Ce=te.f.RGBA).eb=ke,Ce.fb=0,Ce.A=we,Ce.size=Ve):((Ce=te.f.kb).y=ke,Ce.O=0,Ce.fa=we,Ce.Fd=Ve,Ce.f=ke,Ce.N=0+Ve,Ce.Ab=P,Ce.Cd=ge,Ce.ea=ke,Ce.W=0+Ve+ge,Ce.Db=P,Ce.Ed=ge,S==12&&(Ce.F=ke,Ce.J=0+Ve+2*ge),Ce.Tc=me,Ce.lb=fe)}if(P=1,fe=te.S,ge=te.width,me=te.height,fe>=Xw&&13>fe)if(11>fe)S=te.f.RGBA,P&=(we=Math.abs(S.A))*(me-1)+ge<=S.size,P&=we>=ge*cD[fe],P&=S.eb!=null;else{S=te.f.kb,we=(ge+1)/2,Ve=(me+1)/2,Ce=Math.abs(S.fa),ke=Math.abs(S.Ab);var it=Math.abs(S.Db),ot=Math.abs(S.lb),Je=ot*(me-1)+ge;P&=Ce*(me-1)+ge<=S.Fd,P&=ke*(Ve-1)+we<=S.Cd,P=(P&=it*(Ve-1)+we<=S.Ed)&Ce>=ge&ke>=we&it>=we,P&=S.y!=null,P&=S.f!=null,P&=S.ea!=null,fe==12&&(P&=ot>=ge,P&=Je<=S.Tc,P&=S.F!=null)}else P=0;S=P?0:2}}return S!=0||G!=null&&G.fd&&(S=W0(te)),S}var ho=64,yp=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],bp=24,wp=32,K0=8,vs=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];Xe("Predictor0","PredictorAdd0"),F.Predictor0=function(){return 4278190080},F.Predictor1=function(S){return S},F.Predictor2=function(S,P,G){return P[G+0]},F.Predictor3=function(S,P,G){return P[G+1]},F.Predictor4=function(S,P,G){return P[G-1]},F.Predictor5=function(S,P,G){return Ke(Ke(S,P[G+1]),P[G+0])},F.Predictor6=function(S,P,G){return Ke(S,P[G-1])},F.Predictor7=function(S,P,G){return Ke(S,P[G+0])},F.Predictor8=function(S,P,G){return Ke(P[G-1],P[G+0])},F.Predictor9=function(S,P,G){return Ke(P[G+0],P[G+1])},F.Predictor10=function(S,P,G){return Ke(Ke(S,P[G-1]),Ke(P[G+0],P[G+1]))},F.Predictor11=function(S,P,G){var te=P[G+0];return 0>=Be(te>>24&255,S>>24&255,(P=P[G-1])>>24&255)+Be(te>>16&255,S>>16&255,P>>16&255)+Be(te>>8&255,S>>8&255,P>>8&255)+Be(255&te,255&S,255&P)?te:S},F.Predictor12=function(S,P,G){var te=P[G+0];return(Ne((S>>24&255)+(te>>24&255)-((P=P[G-1])>>24&255))<<24|Ne((S>>16&255)+(te>>16&255)-(P>>16&255))<<16|Ne((S>>8&255)+(te>>8&255)-(P>>8&255))<<8|Ne((255&S)+(255&te)-(255&P)))>>>0},F.Predictor13=function(S,P,G){var te=P[G-1];return(ve((S=Ke(S,P[G+0]))>>24&255,te>>24&255)<<24|ve(S>>16&255,te>>16&255)<<16|ve(S>>8&255,te>>8&255)<<8|ve(S>>0&255,te>>0&255))>>>0};var Ek=F.PredictorAdd0;F.PredictorAdd1=xe,Xe("Predictor2","PredictorAdd2"),Xe("Predictor3","PredictorAdd3"),Xe("Predictor4","PredictorAdd4"),Xe("Predictor5","PredictorAdd5"),Xe("Predictor6","PredictorAdd6"),Xe("Predictor7","PredictorAdd7"),Xe("Predictor8","PredictorAdd8"),Xe("Predictor9","PredictorAdd9"),Xe("Predictor10","PredictorAdd10"),Xe("Predictor11","PredictorAdd11"),Xe("Predictor12","PredictorAdd12"),Xe("Predictor13","PredictorAdd13");var G0=F.PredictorAdd2;re("ColorIndexInverseTransform","MapARGB","32b",function(S){return S>>8&255},function(S){return S}),re("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(S){return S},function(S){return S>>8&255});var Vw,Fa=F.ColorIndexInverseTransform,xp=F.MapARGB,qw=F.VP8LColorIndexInverseTransformAlpha,Ww=F.MapAlpha,Tf=F.VP8LPredictorsAdd=[];Tf.length=16,(F.VP8LPredictors=[]).length=16,(F.VP8LPredictorsAdd_C=[]).length=16,(F.VP8LPredictors_C=[]).length=16;var Sd,ys,es,Rf,Eu,ku,Cp,Iu,mi,Y0,ts,Ta,Sp,Kw,X0,_d,Bd,Pf,Ed,_p,kd,Lf,J0,Ra,Pa,Lr,Or,vi,Hi=o(511),Fu=o(2041),Z0=o(225),Bp=o(767),Gw=0,kk=Fu,Yw=Z0,Ys=Bp,La=Hi,Xw=0,Jw=1,XU=2,Zw=3,ex=4,Ik=5,JU=6,Fk=7,Tk=8,tx=9,Rk=10,Ece=[2,3,7],kce=[3,3,11],ZU=[280,256,256,256,40],Ice=[0,1,1,1,0],Fce=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Tce=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Rce=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Pce=8,Pk=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],Lk=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ev=null,Lce=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],Oce=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],eD=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],jce=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],Mce=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],Nce=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],Uce=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],Of=[],Il=[],Tu=[],Dce=1,tD=2,jf=[],Oa=[];dt("UpsampleRgbLinePair",Wn,3),dt("UpsampleBgrLinePair",Jr,3),dt("UpsampleRgbaLinePair",kl,4),dt("UpsampleBgraLinePair",Ji,4),dt("UpsampleArgbLinePair",To,4),dt("UpsampleRgba4444LinePair",Fi,2),dt("UpsampleRgb565LinePair",si,2);var $ce=F.UpsampleRgbLinePair,Qce=F.UpsampleBgrLinePair,nD=F.UpsampleRgbaLinePair,rD=F.UpsampleBgraLinePair,iD=F.UpsampleArgbLinePair,oD=F.UpsampleRgba4444LinePair,Hce=F.UpsampleRgb565LinePair,nx=16,rx=1<<nx-1,tv=-227,Ok=482,sD=6,zce=(256<<sD)-1,aD=0,Vce=o(256),qce=o(256),Wce=o(256),Kce=o(256),Gce=o(Ok-tv),Yce=o(Ok-tv);fc("YuvToRgbRow",Wn,3),fc("YuvToBgrRow",Jr,3),fc("YuvToRgbaRow",kl,4),fc("YuvToBgraRow",Ji,4),fc("YuvToArgbRow",To,4),fc("YuvToRgba4444Row",Fi,2),fc("YuvToRgb565Row",si,2);var lD=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],ix=[0,2,8],Xce=[8,7,6,4,4,2,2,2,1,1,1,1],Jce=1;this.WebPDecodeRGBA=function(S,P,G,te,fe){var ge=Jw,me=new pp,we=new je;me.ba=we,we.S=ge,we.width=[we.width],we.height=[we.height];var Ce=we.width,ke=we.height,Ve=new ze;if(Ve==null||S==null)var it=2;else t(Ve!=null),it=mp(S,P,G,Ve.width,Ve.height,Ve.Pd,Ve.Qd,Ve.format,null);if(it!=0?Ce=0:(Ce!=null&&(Ce[0]=Ve.width[0]),ke!=null&&(ke[0]=Ve.height[0]),Ce=1),Ce){we.width=we.width[0],we.height=we.height[0],te!=null&&(te[0]=we.width),fe!=null&&(fe[0]=we.height);e:{if(te=new Zn,(fe=new D0).data=S,fe.w=P,fe.ha=G,fe.kd=1,P=[0],t(fe!=null),((S=mp(fe.data,fe.w,fe.ha,null,null,null,P,null,fe))==0||S==7)&&P[0]&&(S=4),(P=S)==0){if(t(me!=null),te.data=fe.data,te.w=fe.w+fe.offset,te.ha=fe.ha-fe.offset,te.put=Et,te.ac=at,te.bc=cn,te.ma=me,fe.xa){if((S=Bt())==null){me=1;break e}if(function(ot,Je){var yt=[0],ct=[0],qe=[0];t:for(;;){if(ot==null)return 0;if(Je==null)return ot.a=2,0;if(ot.l=Je,ot.a=0,Y(ot.m,Je.data,Je.w,Je.ha),!Te(ot.m,yt,ct,qe)){ot.a=3;break t}if(ot.xb=tD,Je.width=yt[0],Je.height=ct[0],!$t(yt[0],ct[0],1,ot,null))break t;return 1}return t(ot.a!=0),0}(S,te)){if(te=(P=vp(te.width,te.height,me.Oa,me.ba))==0){t:{te=S;n:for(;;){if(te==null){te=0;break t}if(t(te.s.yc!=null),t(te.s.Ya!=null),t(0<te.s.Wb),t((G=te.l)!=null),t((fe=G.ma)!=null),te.xb!=0){if(te.ca=fe.ba,te.tb=fe.tb,t(te.ca!=null),!q0(fe.Oa,G,Zw)){te.a=2;break n}if(!Qt(te,G.width)||G.da)break n;if((G.da||Ue(te.ca.S))&&nt(),11>te.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),te.ca.f.kb.F!=null&&nt()),te.Pb&&0<te.s.ua&&te.s.vb.X==null&&!_e(te.s.vb,te.s.Wa.Xa)){te.a=1;break n}te.xb=0}if(!et(te,te.V,te.Ba,te.c,te.i,G.o,Ut))break n;fe.Dc=te.Ma,te=1;break t}t(te.a!=0),te=0}te=!te}te&&(P=S.a)}else P=S.a}else{if((S=new Ia)==null){me=1;break e}if(S.Fa=fe.na,S.P=fe.P,S.qc=fe.Sa,Iw(S,te)){if((P=vp(te.width,te.height,me.Oa,me.ba))==0){if(S.Aa=0,G=me.Oa,t((fe=S)!=null),G!=null){if(0<(Ce=0>(Ce=G.Md)?0:100<Ce?255:255*Ce/100)){for(ke=Ve=0;4>ke;++ke)12>(it=fe.pb[ke]).lc&&(it.ia=Ce*Xce[0>it.lc?0:it.lc]>>3),Ve|=it.ia;Ve&&(alert("todo:VP8InitRandom"),fe.ia=1)}fe.Ga=G.Id,100<fe.Ga?fe.Ga=100:0>fe.Ga&&(fe.Ga=0)}ck(S,te)||(P=S.a)}}else P=S.a}P==0&&me.Oa!=null&&me.Oa.fd&&(P=W0(me.ba))}me=P}ge=me!=0?null:11>ge?we.f.RGBA.eb:we.f.kb.y}else ge=null;return ge};var cD=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function c(F,L){for(var _="",T=0;T<4;T++)_+=String.fromCharCode(F[L++]);return _}function u(F,L){return(F[L+0]<<0|F[L+1]<<8|F[L+2]<<16)>>>0}function f(F,L){return(F[L+0]<<0|F[L+1]<<8|F[L+2]<<16|F[L+3]<<24)>>>0}new l;var d=[0],A=[0],p=[],m=new l,b=e,v=function(F,L){var _={},T=0,E=!1,I=0,N=0;if(_.frames=[],!function(R,M,H,U){for(var X=0;X<U;X++)if(R[M+X]!=H.charCodeAt(X))return!0;return!1}(F,L,"RIFF",4)){var $,D;for(f(F,L+=4),L+=8;L<F.length;){var V=c(F,L),Y=f(F,L+=4);L+=4;var K=Y+(1&Y);switch(V){case"VP8 ":case"VP8L":_.frames[T]===void 0&&(_.frames[T]={}),(z=_.frames[T]).src_off=E?N:L-8,z.src_size=I+Y+8,T++,E&&(E=!1,I=0,N=0);break;case"VP8X":(z=_.header={}).feature_flags=F[L];var O=L+4;z.canvas_width=1+u(F,O),O+=3,z.canvas_height=1+u(F,O),O+=3;break;case"ALPH":E=!0,I=K+8,N=L-8;break;case"ANIM":(z=_.header).bgcolor=f(F,L),O=L+4,z.loop_count=($=F)[(D=O)+0]<<0|$[D+1]<<8,O+=2;break;case"ANMF":var ne,z;(z=_.frames[T]={}).offset_x=2*u(F,L),L+=3,z.offset_y=2*u(F,L),L+=3,z.width=1+u(F,L),L+=3,z.height=1+u(F,L),L+=3,z.duration=u(F,L),L+=3,ne=F[L++],z.dispose=1&ne,z.blend=ne>>1&1}V!="ANMF"&&(L+=K)}return _}}(b,0);v.response=b,v.rgbaoutput=!0,v.dataurl=!1;var g=v.header?v.header:null,y=v.frames?v.frames:null;if(g){g.loop_counter=g.loop_count,d=[g.canvas_height],A=[g.canvas_width];for(var w=0;w<y.length&&y[w].blend!=0;w++);}var x=y[0],C=m.WebPDecodeRGBA(b,x.src_off,x.src_size,A,d);x.rgba=C,x.imgwidth=A[0],x.imgheight=d[0];for(var k=0;k<A[0]*d[0]*4;k++)p[k]=C[k];return this.width=A,this.height=d,this.data=p,this}(function(e){var t=function(){return typeof n3=="function"},n=function(d,A,p,m){var b=4,v=s;switch(m){case e.image_compression.FAST:b=1,v=o;break;case e.image_compression.MEDIUM:b=6,v=a;break;case e.image_compression.SLOW:b=9,v=l}d=r(d,A,p,v);var g=n3(d,{level:b});return e.__addimage__.arrayBufferToBinaryString(g)},r=function(d,A,p,m){for(var b,v,g,y=d.length/A,w=new Uint8Array(d.length+y),x=u(),C=0;C<y;C+=1){if(g=C*A,b=d.subarray(g,g+A),m)w.set(m(b,p,v),g+C);else{for(var k,F=x.length,L=[];k<F;k+=1)L[k]=x[k](b,p,v);var _=f(L.concat());w.set(L[_],g+C)}v=b}return w},i=function(d){var A=Array.apply([],d);return A.unshift(0),A},o=function(d,A){var p,m=[],b=d.length;m[0]=1;for(var v=0;v<b;v+=1)p=d[v-A]||0,m[v+1]=d[v]-p+256&255;return m},s=function(d,A,p){var m,b=[],v=d.length;b[0]=2;for(var g=0;g<v;g+=1)m=p&&p[g]||0,b[g+1]=d[g]-m+256&255;return b},a=function(d,A,p){var m,b,v=[],g=d.length;v[0]=3;for(var y=0;y<g;y+=1)m=d[y-A]||0,b=p&&p[y]||0,v[y+1]=d[y]+256-(m+b>>>1)&255;return v},l=function(d,A,p){var m,b,v,g,y=[],w=d.length;y[0]=4;for(var x=0;x<w;x+=1)m=d[x-A]||0,b=p&&p[x]||0,v=p&&p[x-A]||0,g=c(m,b,v),y[x+1]=d[x]-g+256&255;return y},c=function(d,A,p){if(d===A&&A===p)return d;var m=Math.abs(A-p),b=Math.abs(d-p),v=Math.abs(d+A-p-p);return m<=b&&m<=v?d:b<=v?A:p},u=function(){return[i,o,s,a,l]},f=function(d){var A=d.map(function(p){return p.reduce(function(m,b){return m+Math.abs(b)},0)});return A.indexOf(Math.min.apply(null,A))};e.processPNG=function(d,A,p,m){var b,v,g,y,w,x,C,k,F,L,_,T,E,I,N,$=this.decode.FLATE_DECODE,D="";if(this.__addimage__.isArrayBuffer(d)&&(d=new Uint8Array(d)),this.__addimage__.isArrayBufferView(d)){if(d=(g=new Net(d)).imgData,v=g.bits,b=g.colorSpace,w=g.colors,[4,6].indexOf(g.colorType)!==-1){if(g.bits===8){F=(k=g.pixelBitlength==32?new Uint32Array(g.decodePixels().buffer):g.pixelBitlength==16?new Uint16Array(g.decodePixels().buffer):new Uint8Array(g.decodePixels().buffer)).length,_=new Uint8Array(F*g.colors),L=new Uint8Array(F);var V,Y=g.pixelBitlength-g.bits;for(I=0,N=0;I<F;I++){for(E=k[I],V=0;V<Y;)_[N++]=E>>>V&255,V+=g.bits;L[I]=E>>>V&255}}if(g.bits===16){F=(k=new Uint32Array(g.decodePixels().buffer)).length,_=new Uint8Array(F*(32/g.pixelBitlength)*g.colors),L=new Uint8Array(F*(32/g.pixelBitlength)),T=g.colors>1,I=0,N=0;for(var K=0;I<F;)E=k[I++],_[N++]=E>>>0&255,T&&(_[N++]=E>>>16&255,E=k[I++],_[N++]=E>>>0&255),L[K++]=E>>>16&255;v=8}m!==e.image_compression.NONE&&t()?(d=n(_,g.width*g.colors,g.colors,m),C=n(L,g.width,1,m)):(d=_,C=L,$=void 0)}if(g.colorType===3&&(b=this.color_spaces.INDEXED,x=g.palette,g.transparency.indexed)){var O=g.transparency.indexed,ne=0;for(I=0,F=O.length;I<F;++I)ne+=O[I];if((ne/=255)===F-1&&O.indexOf(0)!==-1)y=[O.indexOf(0)];else if(ne!==F){for(k=g.decodePixels(),L=new Uint8Array(k.length),I=0,F=k.length;I<F;I++)L[I]=O[k[I]];C=n(L,g.width,1)}}var z=function(R){var M;switch(R){case e.image_compression.FAST:M=11;break;case e.image_compression.MEDIUM:M=13;break;case e.image_compression.SLOW:M=14;break;default:M=12}return M}(m);return $===this.decode.FLATE_DECODE&&(D="/Predictor "+z+" "),D+="/Colors "+w+" /BitsPerComponent "+v+" /Columns "+g.width,(this.__addimage__.isArrayBuffer(d)||this.__addimage__.isArrayBufferView(d))&&(d=this.__addimage__.arrayBufferToBinaryString(d)),(C&&this.__addimage__.isArrayBuffer(C)||this.__addimage__.isArrayBufferView(C))&&(C=this.__addimage__.arrayBufferToBinaryString(C)),{alias:p,data:d,index:A,filter:$,decodeParameters:D,transparency:y,palette:x,sMask:C,predictor:z,width:g.width,height:g.height,bitsPerComponent:v,colorSpace:b}}}})(mn.API),function(e){e.processGIF89A=function(t,n,r,i){var o=new Uet(t),s=o.width,a=o.height,l=[];o.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:s,height:a},u=new HT(100).encode(c,100);return e.processJPEG.call(this,u,n,r,i)},e.processGIF87A=e.processGIF89A}(mn.API),Ll.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:n,quad:o}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},Ll.prototype.parseBGR=function(){this.pos=this.offset;try{var e="bit"+this.bitPP,t=this.width*this.height*4;this.data=new Uint8Array(t),this[e]()}catch(n){Ir.log("bit decode error:"+n)}},Ll.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;for(e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var o=this.datav.getUint8(this.pos++,!0),s=r*this.width*4+8*i*4,a=0;a<8&&8*i+a<this.width;a++){var l=this.palette[o>>7-a&1];this.data[s+4*a]=l.blue,this.data[s+4*a+1]=l.green,this.data[s+4*a+2]=l.red,this.data[s+4*a+3]=255}n!==0&&(this.pos+=4-n)}},Ll.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++){var o=this.datav.getUint8(this.pos++,!0),s=r*this.width*4+2*i*4,a=o>>4,l=15&o,c=this.palette[a];if(this.data[s]=c.blue,this.data[s+1]=c.green,this.data[s+2]=c.red,this.data[s+3]=255,2*i+1>=this.width)break;c=this.palette[l],this.data[s+4]=c.blue,this.data[s+4+1]=c.green,this.data[s+4+2]=c.red,this.data[s+4+3]=255}t!==0&&(this.pos+=4-t)}},Ll.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),o=n*this.width*4+4*r;if(i<this.palette.length){var s=this.palette[i];this.data[o]=s.red,this.data[o+1]=s.green,this.data[o+2]=s.blue,this.data[o+3]=255}else this.data[o]=255,this.data[o+1]=255,this.data[o+2]=255,this.data[o+3]=255}e!==0&&(this.pos+=4-e)}},Ll.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&t)/t*255|0,a=(o>>5&t)/t*255|0,l=(o>>10&t)/t*255|0,c=o>>15?255:0,u=r*this.width*4+4*i;this.data[u]=l,this.data[u+1]=a,this.data[u+2]=s,this.data[u+3]=c}this.pos+=e}},Ll.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,o=0;o<this.width;o++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(s&t)/t*255|0,l=(s>>5&n)/n*255|0,c=(s>>11)/t*255|0,u=i*this.width*4+4*o;this.data[u]=c,this.data[u+1]=l,this.data[u+2]=a,this.data[u+3]=255}this.pos+=e}},Ll.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=o,this.data[s+1]=i,this.data[s+2]=r,this.data[s+3]=255}this.pos+=this.width%4}},Ll.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=t*this.width*4+4*n;this.data[a]=o,this.data[a+1]=i,this.data[a+2]=r,this.data[a+3]=s}},Ll.prototype.getData=function(){return this.data},function(e){e.processBMP=function(t,n,r,i){var o=new Ll(t,!1),s=o.width,a=o.height,l={data:o.getData(),width:s,height:a},c=new HT(100).encode(l,100);return e.processJPEG.call(this,c,n,r,i)}}(mn.API),zq.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(t,n,r,i){var o=new zq(t),s=o.width,a=o.height,l={data:o.getData(),width:s,height:a},c=new HT(100).encode(l,100);return e.processJPEG.call(this,c,n,r,i)}}(mn.API),mn.API.processRGBA=function(e,t,n){for(var r=e.data,i=r.length,o=new Uint8Array(i/4*3),s=new Uint8Array(i/4),a=0,l=0,c=0;c<i;c+=4){var u=r[c],f=r[c+1],d=r[c+2],A=r[c+3];o[a++]=u,o[a++]=f,o[a++]=d,s[l++]=A}var p=this.__addimage__.arrayBufferToBinaryString(o);return{alpha:this.__addimage__.arrayBufferToBinaryString(s),data:p,index:t,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},mn.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},eg=mn.API,lC=eg.getCharWidthsArray=function(e,t){var n,r,i=(t=t||{}).font||this.internal.getFont(),o=t.fontSize||this.internal.getFontSize(),s=t.charSpace||this.internal.getCharSpace(),a=t.widths?t.widths:i.metadata.Unicode.widths,l=a.fof?a.fof:1,c=t.kerning?t.kerning:i.metadata.Unicode.kerning,u=c.fof?c.fof:1,f=t.doKerning!==!1,d=0,A=e.length,p=0,m=a[0]||l,b=[];for(n=0;n<A;n++)r=e.charCodeAt(n),typeof i.metadata.widthOfString=="function"?b.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+s*(1e3/o)||0)/1e3):(d=f&&gr(c[r])==="object"&&!isNaN(parseInt(c[r][p],10))?c[r][p]/u:0,b.push((a[r]||m)/l+d)),p=r;return b},Dq=eg.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return eg.processArabic&&(e=eg.processArabic(e)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(e,n,i)/n:lC.apply(this,arguments).reduce(function(o,s){return o+s},0)},$q=function(e,t,n,r){for(var i=[],o=0,s=e.length,a=0;o!==s&&a+t[o]<n;)a+=t[o],o++;i.push(e.slice(0,o));var l=o;for(a=0;o!==s;)a+t[o]>r&&(i.push(e.slice(l,o)),a=0,l=o),a+=t[o],o++;return l!==o&&i.push(e.slice(l,o)),i},Qq=function(e,t,n){n||(n={});var r,i,o,s,a,l,c,u=[],f=[u],d=n.textIndent||0,A=0,p=0,m=e.split(" "),b=lC.apply(this,[" ",n])[0];if(l=n.lineIndent===-1?m[0].length+2:n.lineIndent||0){var v=Array(l).join(" "),g=[];m.map(function(w){(w=w.split(/\s*\n/)).length>1?g=g.concat(w.map(function(x,C){return(C&&x.length?`
|
|
742
742
|
`:"")+x})):g.push(w[0])}),m=g,l=Dq.apply(this,[v,n])}for(o=0,s=m.length;o<s;o++){var y=0;if(r=m[o],l&&r[0]==`
|
|
743
|
-
`&&(r=r.substr(1),y=1),d+A+(p=(i=lC.apply(this,[r,n])).reduce(function(w,x){return w+x},0))>t||y){if(p>t){for(a=$q.apply(this,[r,i,t-(d+A),t]),u.push(a.shift()),u=[a.pop()];a.length;)f.push([a.shift()]);p=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(w,x){return w+x},0)}else u=[r];f.push(u),d=p+l,A=b}else u.push(r),d+=A+p,A=b}return c=l?function(w,x){return(x?v:"")+w.join(" ")}:function(w){return w.join(" ")},f.map(c)},eg.splitTextToSize=function(e,t,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),o=(function(u){if(u.widths&&u.kerning)return{widths:u.widths,kerning:u.kerning};var f=this.internal.getFont(u.fontName,u.fontStyle);return f.metadata.Unicode?{widths:f.metadata.Unicode.widths||{0:1},kerning:f.metadata.Unicode.kerning||{}}:{font:f.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var s=1*this.internal.scaleFactor*t/i;o.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,o.lineIndent=n.lineIndent;var a,l,c=[];for(a=0,l=r.length;a<l;a++)c=c.concat(Qq.apply(this,[r[a],s,o]));return c},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="klmnopqrstuvwxyz",n={},r={},i=0;i<t.length;i++)n[t[i]]="0123456789abcdef"[i],r["0123456789abcdef"[i]]=t[i];var o=function(f){return"0x"+parseInt(f,10).toString(16)},s=e.__fontmetrics__.compress=function(f){var d,A,p,m,b=["{"];for(var v in f){if(d=f[v],isNaN(parseInt(v,10))?A="'"+v+"'":(v=parseInt(v,10),A=(A=o(v).slice(2)).slice(0,-1)+r[A.slice(-1)]),typeof d=="number")d<0?(p=o(d).slice(3),m="-"):(p=o(d).slice(2),m=""),p=m+p.slice(0,-1)+r[p.slice(-1)];else{if(gr(d)!=="object")throw new Error("Don't know what to do with value type "+gr(d)+".");p=s(d)}b.push(A+p)}return b.push("}"),b.join("")},a=e.__fontmetrics__.uncompress=function(f){if(typeof f!="string")throw new Error("Invalid argument passed to uncompress.");for(var d,A,p,m,b={},v=1,g=b,y=[],w="",x="",C=f.length-1,k=1;k<C;k+=1)(m=f[k])=="'"?d?(p=d.join(""),d=void 0):d=[]:d?d.push(m):m=="{"?(y.push([g,p]),g={},p=void 0):m=="}"?((A=y.pop())[0][A[1]]=g,p=void 0,g=A[0]):m=="-"?v=-1:p===void 0?n.hasOwnProperty(m)?(w+=n[m],p=parseInt(w,16)*v,v=1,w=""):w+=m:n.hasOwnProperty(m)?(x+=n[m],g[p]=parseInt(x,16)*v,v=1,p=void 0,x=""):x+=m;return b},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:a("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},u={Unicode:{"Courier-Oblique":a("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":a("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":a("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:a("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":a("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":a("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:a("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:a("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":a("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:a("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":a("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":a("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":a("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":a("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(f){var d=f.font,A=u.Unicode[d.postScriptName];A&&(d.metadata.Unicode={},d.metadata.Unicode.widths=A.widths,d.metadata.Unicode.kerning=A.kerning);var p=c.Unicode[d.postScriptName];p&&(d.metadata.Unicode.encoding=p,d.encoding=p.codePages[0])}])}(mn.API),function(e){var t=function(n){for(var r=n.length,i=new Uint8Array(r),o=0;o<r;o++)i[o]=n.charCodeAt(o);return i};e.API.events.push(["addFont",function(n){var r=void 0,i=n.font,o=n.instance;if(!i.isStandardFont){if(o===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=o.existsFileInVFS(i.postScriptName)===!1?o.loadFile(i.postScriptName):o.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(s,a){a=/^\x00\x01\x00\x00/.test(a)?t(a):t(o1(a)),s.metadata=e.API.TTFFont.open(a),s.metadata.Unicode=s.metadata.Unicode||{encoding:{},kerning:{},widths:[]},s.metadata.glyIdsUsed=[0]})(i,r)}}])}(mn),function(e){function t(){return(vn.canvg?Promise.resolve(vn.canvg):Q1(()=>import("./index.es-XehlSHxK.js"),[])).catch(function(n){return Promise.reject(new Error("Could not load canvg: "+n))}).then(function(n){return n.default?n.default:n})}mn.API.addSvgAsImage=function(n,r,i,o,s,a,l,c){if(isNaN(r)||isNaN(i))throw Ir.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(o)||isNaN(s))throw Ir.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=o,u.height=s;var f=u.getContext("2d");f.fillStyle="#fff",f.fillRect(0,0,u.width,u.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},A=this;return t().then(function(p){return p.fromString(f,n,d)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(p){return p.render(d)}).then(function(){A.addImage(u.toDataURL("image/jpeg",1),r,i,o,s,l,c)})}}(),mn.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},mn.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,i,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(s),l=[],c=0,u=0,f=0;function d(p,m){var b,v=!1;for(b=0;b<p.length;b+=1)p[b]===m&&(v=!0);return v}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var A=a.length;for(f=0;f<A;f+=1)n[a[f]].value=n[a[f]].defaultValue,n[a[f]].explicitSet=!1}if(gr(e)==="object"){for(i in e)if(o=e[i],d(a,i)&&o!==void 0){if(n[i].type==="boolean"&&typeof o=="boolean")n[i].value=o;else if(n[i].type==="name"&&d(n[i].valueSet,o))n[i].value=o;else if(n[i].type==="integer"&&Number.isInteger(o))n[i].value=o;else if(n[i].type==="array"){for(c=0;c<o.length;c+=1)if(r=!0,o[c].length===1&&typeof o[c][0]=="number")l.push(String(o[c]-1));else if(o[c].length>1){for(u=0;u<o[c].length;u+=1)typeof o[c][u]!="number"&&(r=!1);r===!0&&l.push([o[c][0]-1,o[c][1]-1].join(" "))}n[i].value="["+l.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,m=[];for(p in n)n[p].explicitSet===!0&&(n[p].type==="name"?m.push("/"+p+" /"+n[p].value):m.push("/"+p+" "+n[p].value));m.length!==0&&this.internal.write(`/ViewerPreferences
|
|
743
|
+
`&&(r=r.substr(1),y=1),d+A+(p=(i=lC.apply(this,[r,n])).reduce(function(w,x){return w+x},0))>t||y){if(p>t){for(a=$q.apply(this,[r,i,t-(d+A),t]),u.push(a.shift()),u=[a.pop()];a.length;)f.push([a.shift()]);p=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(w,x){return w+x},0)}else u=[r];f.push(u),d=p+l,A=b}else u.push(r),d+=A+p,A=b}return c=l?function(w,x){return(x?v:"")+w.join(" ")}:function(w){return w.join(" ")},f.map(c)},eg.splitTextToSize=function(e,t,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),o=(function(u){if(u.widths&&u.kerning)return{widths:u.widths,kerning:u.kerning};var f=this.internal.getFont(u.fontName,u.fontStyle);return f.metadata.Unicode?{widths:f.metadata.Unicode.widths||{0:1},kerning:f.metadata.Unicode.kerning||{}}:{font:f.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var s=1*this.internal.scaleFactor*t/i;o.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,o.lineIndent=n.lineIndent;var a,l,c=[];for(a=0,l=r.length;a<l;a++)c=c.concat(Qq.apply(this,[r[a],s,o]));return c},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="klmnopqrstuvwxyz",n={},r={},i=0;i<t.length;i++)n[t[i]]="0123456789abcdef"[i],r["0123456789abcdef"[i]]=t[i];var o=function(f){return"0x"+parseInt(f,10).toString(16)},s=e.__fontmetrics__.compress=function(f){var d,A,p,m,b=["{"];for(var v in f){if(d=f[v],isNaN(parseInt(v,10))?A="'"+v+"'":(v=parseInt(v,10),A=(A=o(v).slice(2)).slice(0,-1)+r[A.slice(-1)]),typeof d=="number")d<0?(p=o(d).slice(3),m="-"):(p=o(d).slice(2),m=""),p=m+p.slice(0,-1)+r[p.slice(-1)];else{if(gr(d)!=="object")throw new Error("Don't know what to do with value type "+gr(d)+".");p=s(d)}b.push(A+p)}return b.push("}"),b.join("")},a=e.__fontmetrics__.uncompress=function(f){if(typeof f!="string")throw new Error("Invalid argument passed to uncompress.");for(var d,A,p,m,b={},v=1,g=b,y=[],w="",x="",C=f.length-1,k=1;k<C;k+=1)(m=f[k])=="'"?d?(p=d.join(""),d=void 0):d=[]:d?d.push(m):m=="{"?(y.push([g,p]),g={},p=void 0):m=="}"?((A=y.pop())[0][A[1]]=g,p=void 0,g=A[0]):m=="-"?v=-1:p===void 0?n.hasOwnProperty(m)?(w+=n[m],p=parseInt(w,16)*v,v=1,w=""):w+=m:n.hasOwnProperty(m)?(x+=n[m],g[p]=parseInt(x,16)*v,v=1,p=void 0,x=""):x+=m;return b},l={codePages:["WinAnsiEncoding"],WinAnsiEncoding:a("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},c={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},u={Unicode:{"Courier-Oblique":a("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":a("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":a("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:a("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":a("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":a("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:a("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:a("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":a("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:a("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":a("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":a("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":a("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":a("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(f){var d=f.font,A=u.Unicode[d.postScriptName];A&&(d.metadata.Unicode={},d.metadata.Unicode.widths=A.widths,d.metadata.Unicode.kerning=A.kerning);var p=c.Unicode[d.postScriptName];p&&(d.metadata.Unicode.encoding=p,d.encoding=p.codePages[0])}])}(mn.API),function(e){var t=function(n){for(var r=n.length,i=new Uint8Array(r),o=0;o<r;o++)i[o]=n.charCodeAt(o);return i};e.API.events.push(["addFont",function(n){var r=void 0,i=n.font,o=n.instance;if(!i.isStandardFont){if(o===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=o.existsFileInVFS(i.postScriptName)===!1?o.loadFile(i.postScriptName):o.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(s,a){a=/^\x00\x01\x00\x00/.test(a)?t(a):t(o1(a)),s.metadata=e.API.TTFFont.open(a),s.metadata.Unicode=s.metadata.Unicode||{encoding:{},kerning:{},widths:[]},s.metadata.glyIdsUsed=[0]})(i,r)}}])}(mn),function(e){function t(){return(vn.canvg?Promise.resolve(vn.canvg):Q1(()=>import("./index.es-DTKpmNcZ.js"),[])).catch(function(n){return Promise.reject(new Error("Could not load canvg: "+n))}).then(function(n){return n.default?n.default:n})}mn.API.addSvgAsImage=function(n,r,i,o,s,a,l,c){if(isNaN(r)||isNaN(i))throw Ir.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(o)||isNaN(s))throw Ir.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var u=document.createElement("canvas");u.width=o,u.height=s;var f=u.getContext("2d");f.fillStyle="#fff",f.fillRect(0,0,u.width,u.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},A=this;return t().then(function(p){return p.fromString(f,n,d)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(p){return p.render(d)}).then(function(){A.addImage(u.toDataURL("image/jpeg",1),r,i,o,s,l,c)})}}(),mn.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},mn.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var r,i,o,s={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},a=Object.keys(s),l=[],c=0,u=0,f=0;function d(p,m){var b,v=!1;for(b=0;b<p.length;b+=1)p[b]===m&&(v=!0);return v}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(s)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e==="reset"||t===!0){var A=a.length;for(f=0;f<A;f+=1)n[a[f]].value=n[a[f]].defaultValue,n[a[f]].explicitSet=!1}if(gr(e)==="object"){for(i in e)if(o=e[i],d(a,i)&&o!==void 0){if(n[i].type==="boolean"&&typeof o=="boolean")n[i].value=o;else if(n[i].type==="name"&&d(n[i].valueSet,o))n[i].value=o;else if(n[i].type==="integer"&&Number.isInteger(o))n[i].value=o;else if(n[i].type==="array"){for(c=0;c<o.length;c+=1)if(r=!0,o[c].length===1&&typeof o[c][0]=="number")l.push(String(o[c]-1));else if(o[c].length>1){for(u=0;u<o[c].length;u+=1)typeof o[c][u]!="number"&&(r=!1);r===!0&&l.push([o[c][0]-1,o[c][1]-1].join(" "))}n[i].value="["+l.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var p,m=[];for(p in n)n[p].explicitSet===!0&&(n[p].type==="name"?m.push("/"+p+" /"+n[p].value):m.push("/"+p+" "+n[p].value));m.length!==0&&this.internal.write(`/ViewerPreferences
|
|
744
744
|
<<
|
|
745
745
|
`+m.join(`
|
|
746
746
|
`)+`
|