vendor: 4,156 bytes, lines 1-17
1(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const m of r)if(m.type==="childList")for(const p of m.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&s(p)}).observe(document,{childList:!0,subtree:!0});function a(r){const m={};return r.integrity&&(m.integrity=r.integrity),r.referrerPolicy&&(m.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?m.credentials="include":r.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function s(r){if(r.ep)return;r.ep=!0;const m=a(r);fetch(r.href,m)}})();function Gy(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Pu={exports:{}},Yl={};/** 2 * @license React 3 * react-jsx-runtime.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var pm;function Hy(){if(pm)return Yl;pm=1;var l=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(s,r,m){var p=null;if(m!==void 0&&(p=""+m),r.key!==void 0&&(p=""+r.key),"key"in r){m={};for(var g in r)g!=="key"&&(m[g]=r[g])}else m=r;return r=m.ref,{$$typeof:l,type:s,key:p,ref:r!==void 0?r:null,props:m}}return Yl.Fragment=n,Yl.jsx=a,Yl.jsxs=a,Yl}var hm;function Vy(){return hm||(hm=1,Pu.exports=Hy()),Pu.exports}var B=Vy(),Bu={exports:{}},ue={};/** 10 * @license React 11 * react.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var gm;function zy(){if(gm)return ue;gm=1;var l=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),p=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),S=Symbol.for("react.activity"),_=Symbol.iterator;function M(R){return R===null||typeof R!="object"?null:(R=_&&R[_]||R["@@iterator"],typeof R=="function"?R:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},H=Object.assign,k={};function J(R,G,Y){this.props=R,this.context=G,this.refs=k,this.updater=Y||w}J.prototype.isReactComponent={},J.prototype.setState=function(R,G){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,G,"setState")},J.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function K(){}K.prototype=J.prototype;function V(R,G,Y){this.props=R,this.context=G,this.refs=k,this.updater=Y||w}var j=V.prototype=new K;j.constructor=V,H(j,J.prototype),j.isPureReactComponent=!0;var ne=Array.isArray;function te(){}var F={H:null,A:null,T:null,S:null},ye=Object.prototype.hasOwnProperty;function P(R,G,Y){var $=Y.ref;return{$$typeof:l,type:R,key:G,ref:$!==void 0?$:null,props:Y}}function X(R,G){return P(R.type,G,R.props)}function oe(R){return typeof R=="object"&&R!==null&&R.$$typeof===l}function ie(R){var G={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(Y){return G[Y]})}var Ue=/\/+/g;function dt(R,G){return typeof R=="object"&&R!==null&&R.key!=null?ie(""+R.key):G.toString(36)}function Oe(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(te,te):(R.status="pending",R.then(function(G){R.status==="pending"&&(R.status="fulfilled",R.value=G)},function(G){R.status==="pending"&&(R.status="rejected",R.reason=G)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function x(R,G,Y,$,se){var fe=typeof R;(fe==="undefined"||fe==="boolean")&&(R=null);var Ce=!1;
vendor: 17,271 bytes, lines 17-41
17if(R===null)Ce=!0;else switch(fe){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(R.$$typeof){case l:case n:Ce=!0;break;case v:return Ce=R._init,x(Ce(R._payload),G,Y,$,se)}}if(Ce)return se=se(R),Ce=$===""?"."+dt(R,0):$,ne(se)?(Y="",Ce!=null&&(Y=Ce.replace(Ue,"$&/")+"/"),x(se,G,Y,"",function(Zi){return Zi})):se!=null&&(oe(se)&&(se=X(se,Y+(se.key==null||R&&R.key===se.key?"":(""+se.key).replace(Ue,"$&/")+"/")+Ce)),G.push(se)),1;Ce=0;var it=$===""?".":$+":";if(ne(R))for(var Ve=0;Ve<R.length;Ve++)$=R[Ve],fe=it+dt($,Ve),Ce+=x($,G,Y,fe,se);else if(Ve=M(R),typeof Ve=="function")for(R=Ve.call(R),Ve=0;!($=R.next()).done;)$=$.value,fe=it+dt($,Ve++),Ce+=x($,G,Y,fe,se);else if(fe==="object"){if(typeof R.then=="function")return x(Oe(R),G,Y,$,se);throw G=String(R),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function z(R,G,Y){if(R==null)return R;var $=[],se=0;return x(R,$,"","",function(fe){return G.call(Y,fe,se++)}),$}function ae(R){if(R._status===-1){var G=R._result;G=G(),G.then(function(Y){(R._status===0||R._status===-1)&&(R._status=1,R._result=Y)},function(Y){(R._status===0||R._status===-1)&&(R._status=2,R._result=Y)}),R._status===-1&&(R._status=0,R._result=G)}if(R._status===1)return R._result.default;throw R._result}var _e=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var G=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(G))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},Ae={map:z,forEach:function(R,G,Y){z(R,function(){G.apply(this,arguments)},Y)},count:function(R){var G=0;return z(R,function(){G++}),G},toArray:function(R){return z(R,function(G){return G})||[]},only:function(R){if(!oe(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return ue.Activity=S,ue.Children=Ae,ue.Component=J,ue.Fragment=a,ue.Profiler=r,ue.PureComponent=V,ue.StrictMode=s,ue.Suspense=y,ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,ue.__COMPILER_RUNTIME={__proto__:null,c:function(R){return F.H.useMemoCache(R)}},ue.cache=function(R){return function(){return R.apply(null,arguments)}},ue.cacheSignal=function(){return null},ue.cloneElement=function(R,G,Y){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var $=H({},R.props),se=R.key;if(G!=null)for(fe in G.key!==void 0&&(se=""+G.key),G)!ye.call(G,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&G.ref===void 0||($[fe]=G[fe]);var fe=arguments.length-2;if(fe===1)$.children=Y;else if(1<fe){for(var Ce=Array(fe),it=0;it<fe;it++)Ce[it]=arguments[it+2];$.children=Ce}return P(R.type,se,$)},ue.createContext=function(R){return R={$$typeof:p,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:m,_context:R},R},ue.createElement=function(R,G,Y){var $,se={},fe=null;if(G!=null)for($ in G.key!==void 0&&(fe=""+G.key),G)ye.call(G,$)&&$!=="key"&&$!=="__self"&&$!=="__source"&&(se[$]=G[$]);var Ce=arguments.length-2;if(Ce===1)se.children=Y;else if(1<Ce){for(var it=Array(Ce),Ve=0;Ve<Ce;Ve++)it[Ve]=arguments[Ve+2];se.children=it}if(R&&R.defaultProps)for($ in Ce=R.defaultProps,Ce)se[$]===void 0&&(se[$]=Ce[$]);return P(R,fe,se)},ue.createRef=function(){return{current:null}},ue.forwardRef=function(R){return{$$typeof:g,render:R}},ue.isValidElement=oe,ue.lazy=function(R){return{$$typeof:v,_payload:{_status:-1,_result:R},_init:ae}},ue.memo=function(R,G){return{$$typeof:h,type:R,compare:G===void 0?null:G}},ue.startTransition=function(R){var G=F.T,Y={};F.T=Y;try{var $=R(),se=F.S;se!==null&&se(Y,$),typeof $=="object"&&$!==null&&typeof $.then=="function"&&$.then(te,_e)}catch(fe){_e(fe)}finally{G!==null&&Y.types!==null&&(G.types=Y.types),F.T=G}},ue.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},ue.use=function(R){return F.H.use(R)},ue.useActionState=function(R,G,Y){return F.H.useActionState(R,G,Y)},ue.useCallback=function(R,G){return F.H.useCallback(R,G)},ue.useContext=function(R){return F.H.useContext(R)},ue.useDebugValue=function(){},ue.useDeferredValue=function(R,G){return F.H.useDeferredValue(R,G)},ue.useEffect=function(R,G){return F.H.useEffect(R,G)},ue.useEffectEvent=function(R){return F.H.useEffectEvent(R)},ue.useId=function(){return F.H.useId()},ue.useImperativeHandle=function(R,G,Y){return F.H.useImperativeHandle(R,G,Y)},ue.useInsertionEffect=function(R,G){return F.H.useInsertionEffect(R,G)},ue.useLayoutEffect=function(R,G){return F.H.useLayoutEffect(R,G)},ue.useMemo=function(R,G){return F.H.useMemo(R,G)},ue.useOptimistic=function(R,G){return F.H.useOptimistic(R,G)},ue.useReducer=function(R,G,Y){return F.H.useReducer(R,G,Y)},ue.useRef=function(R){return F.H.useRef(R)},ue.useState=function(R){return F.H.useState(R)},ue.useSyncExternalStore=function(R,G,Y){return F.H.useSyncExternalStore(R,G,Y)},ue.useTransition=function(){return F.H.useTransition()},ue.version="19.2.0",ue}var ym;function lr(){return ym||(ym=1,Bu.exports=zy()),Bu.exports}var Qe=lr(),Yu={exports:{}},Jl={},Ju={exports:{}},ku={};/** 18 * @license React 19 * scheduler.production.js 20 * 21 * Copyright (c) Meta Platforms, Inc. and affiliates. 22 * 23 * This source code is licensed under the MIT license found in the 24 * LICENSE file in the root directory of this source tree. 25 */var Tm;function Py(){return Tm||(Tm=1,(function(l){function n(x,z){var ae=x.length;x.push(z);e:for(;0<ae;){var _e=ae-1>>>1,Ae=x[_e];if(0<r(Ae,z))x[_e]=z,x[ae]=Ae,ae=_e;else break e}}function a(x){return x.length===0?null:x[0]}function s(x){if(x.length===0)return null;var z=x[0],ae=x.pop();if(ae!==z){x[0]=ae;e:for(var _e=0,Ae=x.length,R=Ae>>>1;_e<R;){var G=2*(_e+1)-1,Y=x[G],$=G+1,se=x[$];if(0>r(Y,ae))$<Ae&&0>r(se,Y)?(x[_e]=se,x[$]=ae,_e=$):(x[_e]=Y,x[G]=ae,_e=G);else if($<Ae&&0>r(se,ae))x[_e]=se,x[$]=ae,_e=$;else break e}}return z}function r(x,z){var ae=x.sortIndex-z.sortIndex;return ae!==0?ae:x.id-z.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;l.unstable_now=function(){return m.now()}}else{var p=Date,g=p.now();l.unstable_now=function(){return p.now()-g}}var y=[],h=[],v=1,S=null,_=3,M=!1,w=!1,H=!1,k=!1,J=typeof setTimeout=="function"?setTimeout:null,K=typeof clearTimeout=="function"?clearTimeout:null,V=typeof setImmediate<"u"?setImmediate:null;function j(x){for(var z=a(h);z!==null;){if(z.callback===null)s(h);else if(z.startTime<=x)s(h),z.sortIndex=z.expirationTime,n(y,z);else break;z=a(h)}}function ne(x){if(H=!1,j(x),!w)if(a(y)!==null)w=!0,te||(te=!0,ie());else{var z=a(h);z!==null&&Oe(ne,z.startTime-x)}}var te=!1,F=-1,ye=5,P=-1;function X(){return k?!0:!(l.unstable_now()-P<ye)}function oe(){if(k=!1,te){var x=l.unstable_now();P=x;var z=!0;try{e:{w=!1,H&&(H=!1,K(F),F=-1),M=!0;var ae=_;try{t:{for(j(x),S=a(y);S!==null&&!(S.expirationTime>x&&X());){var _e=S.callback;if(typeof _e=="function"){S.callback=null,_=S.priorityLevel;var Ae=_e(S.expirationTime<=x);if(x=l.unstable_now(),typeof Ae=="function"){S.callback=Ae,j(x),z=!0;break t}S===a(y)&&s(y),j(x)}else s(y);S=a(y)}if(S!==null)z=!0;else{var R=a(h);R!==null&&Oe(ne,R.startTime-x),z=!1}}break e}finally{S=null,_=ae,M=!1}z=void 0}}finally{z?ie():te=!1}}}var ie;if(typeof V=="function")ie=function(){V(oe)};else if(typeof MessageChannel<"u"){var Ue=new MessageChannel,dt=Ue.port2;Ue.port1.onmessage=oe,ie=function(){dt.postMessage(null)}}else ie=function(){J(oe,0)};function Oe(x,z){F=J(function(){x(l.unstable_now())},z)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(x){x.callback=null},l.unstable_forceFrameRate=function(x){0>x||125<x?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ye=0<x?Math.floor(1e3/x):5},l.unstable_getCurrentPriorityLevel=function(){return _},l.unstable_next=function(x){switch(_){case 1:case 2:case 3:var z=3;break;default:z=_}var ae=_;_=z;try{return x()}finally{_=ae}},l.unstable_requestPaint=function(){k=!0},l.unstable_runWithPriority=function(x,z){switch(x){case 1:case 2:case 3:case 4:case 5:break;default:x=3}var ae=_;_=x;try{return z()}finally{_=ae}},l.unstable_scheduleCallback=function(x,z,ae){var _e=l.unstable_now();switch(typeof ae=="object"&&ae!==null?(ae=ae.delay,ae=typeof ae=="number"&&0<ae?_e+ae:_e):ae=_e,x){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=ae+Ae,x={id:v++,callback:z,priorityLevel:x,startTime:ae,expirationTime:Ae,sortIndex:-1},ae>_e?(x.sortIndex=ae,n(h,x),a(y)===null&&x===a(h)&&(H?(K(F),F=-1):H=!0,Oe(ne,ae-_e))):(x.sortIndex=Ae,n(y,x),w||M||(w=!0,te||(te=!0,ie()))),x},l.unstable_shouldYield=X,l.unstable_wrapCallback=function(x){var z=_;return function(){var ae=_;_=z;try{return x.apply(this,arguments)}finally{_=ae}}}})(ku)),ku}var vm;function By(){return vm||(vm=1,Ju.exports=Py()),Ju.exports}var Fu={exports:{}},tt={};/** 26 * @license React 27 * react-dom.production.js 28 * 29 * Copyright (c) Meta Platforms, Inc. and affiliates. 30 * 31 * This source code is licensed under the MIT license found in the 32 * LICENSE file in the root directory of this source tree. 33 */var Sm;function Yy(){if(Sm)return tt;Sm=1;var l=lr();function n(y){var h="https://react.dev/errors/"+y;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)h+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+y+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var s={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},r=Symbol.for("react.portal");function m(y,h,v){var S=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:S==null?null:""+S,children:y,containerInfo:h,implementation:v}}var p=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function g(y,h){if(y==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return tt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,tt.createPortal=function(y,h){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return m(y,h,null,v)},tt.flushSync=function(y){var h=p.T,v=s.p;try{if(p.T=null,s.p=2,y)return y()}finally{p.T=h,s.p=v,s.d.f()}},tt.preconnect=function(y,h){typeof y=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,s.d.C(y,h))},tt.prefetchDNS=function(y){typeof y=="string"&&s.d.D(y)},tt.preinit=function(y,h){if(typeof y=="string"&&h&&typeof h.as=="string"){var v=h.as,S=g(v,h.crossOrigin),_=typeof h.integrity=="string"?h.integrity:void 0,M=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;v==="style"?s.d.S(y,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:S,integrity:_,fetchPriority:M}):v==="script"&&s.d.X(y,{crossOrigin:S,integrity:_,fetchPriority:M,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},tt.preinitModule=function(y,h){if(typeof y=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var v=g(h.as,h.crossOrigin);s.d.M(y,{crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&s.d.M(y)},tt.preload=function(y,h){if(typeof y=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var v=h.as,S=g(v,h.crossOrigin);s.d.L(y,v,{crossOrigin:S,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},tt.preloadModule=function(y,h){if(typeof y=="string")if(h){var v=g(h.as,h.crossOrigin);s.d.m(y,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:v,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else s.d.m(y)},tt.requestFormReset=function(y){s.d.r(y)},tt.unstable_batchedUpdates=function(y,h){return y(h)},tt.useFormState=function(y,h,v){return p.H.useFormState(y,h,v)},tt.useFormStatus=function(){return p.H.useHostTransitionStatus()},tt.version="19.2.0",tt}var Em;function Jy(){if(Em)return Fu.exports;Em=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(n){console.error(n)}}return l(),Fu.exports=Yy(),Fu.exports}/** 34 * @license React 35 * react-dom-client.production.js 36 * 37 * Copyright (c) Meta Platforms, Inc. and affiliates. 38 * 39 * This source code is licensed under the MIT license found in the 40 * LICENSE file in the root directory of this source tree. 41 */var _m;function ky(){if(_m)return Jl;_m=1;var l=By(),n=lr(),a=Jy();function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function p(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(m(e)!==e)throw Error(s(188))}function h(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(s(188));return t!==e?null:e}for(var i=e,o=t;;){var c=i.return;if(c===null)break;var d=c.alternate;if(d===null){if(o=c.return,o!==null){i=o;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===i)return y(c),e;if(d===o)return y(c),t;d=d.sibling}throw Error(s(188))}if(i.return!==o.return)i=c,o=d;else{for(var T=!1,E=c.child;E;){if(E===i){T=!0,i=c,o=d;break}if(E===o){T=!0,o=c,i=d;break}E=E.sibling}if(!T){for(E=d.child;E;){if(E===i){T=!0,i=d,o=c;break}if(E===o){T=!0,o=d,i=c;break}E=E.sibling}if(!T)throw Error(s(189))}}if(i.alternate!==o)throw Error(s(190))}if(i.tag!==3)throw Error(s(188));return i.stateNode.current===i?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var S=Object.assign,_=Symbol.for("react.element"),M=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),J=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),V=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),ye=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),X=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function ie(e){return e===null||typeof e!="object"?null:(e=oe&&e[oe]||e["@@iterator"],typeof e=="function"?e:null)}var Ue=Symbol.for("react.client.reference");function dt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case H:return"Fragment";case J:return"Profiler";case k:return"StrictMode";case ne:return"Suspense";case te:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case V:return e.displayName||"Context";case K:return(e._context.displayName||"Context")+".Consumer";case j:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case F:return t=e.displayName||null,t!==null?t:dt(e.type)||"Memo";case ye:t=e._payload,e=e._init;try{return dt(e(t))}catch{}}return null}var Oe=Array.isArray,x=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,z=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae={pending:!1,data:null,method:null,action:null},_e=[],Ae=-1;function R(e){return{current:e}}function G(e){0>Ae||(e.current=_e[Ae],_e[Ae]=null,Ae--)}function Y(e,t){Ae++,_e[Ae]=e.current,e.current=t}var $=R(null),se=R(null),fe=R(null),Ce=R(null);function it(e,t){switch(Y(fe,t),Y(se,e),Y($,null),t.nodeType){case 9:case 11:e=(e
vendor: 12,037 bytes, lines 41-48
41=t.documentElement)&&(e=e.namespaceURI)?Gd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Gd(t),e=Hd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}G($),Y($,e)}function Ve(){G($),G(se),G(fe)}function Zi(e){e.memoizedState!==null&&Y(Ce,e);var t=$.current,i=Hd(t,e.type);t!==i&&(Y(se,e),Y($,i))}function Zl(e){se.current===e&&(G($),G(se)),Ce.current===e&&(G(Ce),Vl._currentValue=ae)}var Ca,dr;function Gn(e){if(Ca===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);Ca=t&&t[1]||"",dr=-1<i.stack.indexOf(` 42 at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return` 43`+Ca+e+dr}var Aa=!1;function Ra(e,t){if(!e||Aa)return"";Aa=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(t){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(b){var U=b}Reflect.construct(e,[],O)}else{try{O.call()}catch(b){U=b}e.call(O.prototype)}}else{try{throw Error()}catch(b){U=b}(O=e())&&typeof O.catch=="function"&&O.catch(function(){})}}catch(b){if(b&&U&&typeof b.stack=="string")return[b.stack,U.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),T=d[0],E=d[1];if(T&&E){var C=T.split(` 44`),D=E.split(` 45`);for(c=o=0;o<C.length&&!C[o].includes("DetermineComponentFrameRoot");)o++;for(;c<D.length&&!D[c].includes("DetermineComponentFrameRoot");)c++;if(o===C.length||c===D.length)for(o=C.length-1,c=D.length-1;1<=o&&0<=c&&C[o]!==D[c];)c--;for(;1<=o&&0<=c;o--,c--)if(C[o]!==D[c]){if(o!==1||c!==1)do if(o--,c--,0>c||C[o]!==D[c]){var L=` 46`+C[o].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),L}while(1<=o&&0<=c);break}}}finally{Aa=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Gn(i):""}function ph(e,t){switch(e.tag){case 26:case 27:case 5:return Gn(e.type);case 16:return Gn("Lazy");case 13:return e.child!==t&&t!==null?Gn("Suspense Fallback"):Gn("Suspense");case 19:return Gn("SuspenseList");case 0:case 15:return Ra(e.type,!1);case 11:return Ra(e.type.render,!1);case 1:return Ra(e.type,!0);case 31:return Gn("Activity");default:return""}}function mr(e){try{var t="",i=null;do t+=ph(e,i),i=e,e=e.return;while(e);return t}catch(o){return` 47Error generating stack: `+o.message+` 48`+o.stack}}var Na=Object.prototype.hasOwnProperty,Ma=l.unstable_scheduleCallback,Ia=l.unstable_cancelCallback,hh=l.unstable_shouldYield,gh=l.unstable_requestPaint,mt=l.unstable_now,yh=l.unstable_getCurrentPriorityLevel,pr=l.unstable_ImmediatePriority,hr=l.unstable_UserBlockingPriority,$l=l.unstable_NormalPriority,Th=l.unstable_LowPriority,gr=l.unstable_IdlePriority,vh=l.log,Sh=l.unstable_setDisableYieldValue,$i=null,pt=null;function fn(e){if(typeof vh=="function"&&Sh(e),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode($i,e)}catch{}}var ht=Math.clz32?Math.clz32:Ch,Eh=Math.log,_h=Math.LN2;function Ch(e){return e>>>=0,e===0?32:31-(Eh(e)/_h|0)|0}var Wl=256,jl=262144,eo=4194304;function Hn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function to(e,t,i){var o=e.pendingLanes;if(o===0)return 0;var c=0,d=e.suspendedLanes,T=e.pingedLanes;e=e.warmLanes;var E=o&134217727;return E!==0?(o=E&~d,o!==0?c=Hn(o):(T&=E,T!==0?c=Hn(T):i||(i=E&~e,i!==0&&(c=Hn(i))))):(E=o&~d,E!==0?c=Hn(E):T!==0?c=Hn(T):i||(i=o&~e,i!==0&&(c=Hn(i)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,i=t&-t,d>=i||d===32&&(i&4194048)!==0)?t:c}function Wi(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ah(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function yr(){var e=eo;return eo<<=1,(eo&62914560)===0&&(eo=4194304),e}function Da(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function ji(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Rh(e,t,i,o,c,d){var T=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var E=e.entanglements,C=e.expirationTimes,D=e.hiddenUpdates;for(i=T&~i;0<i;){var L=31-ht(i),O=1<<L;E[L]=0,C[L]=-1;var U=D[L];if(U!==null)for(D[L]=null,L=0;L<U.length;L++){var b=U[L];b!==null&&(b.lane&=-536870913)}i&=~O}o!==0&&Tr(e,o,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(T&~t))}function Tr(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var o=31-ht(t);e.entangledLanes|=t,e.entanglements[o]=e.entanglements[o]|1073741824|i&261930}function vr(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var o=31-ht(i),c=1<<o;c&t|e[o]&t&&(e[o]|=t),i&=~c}}function Sr(e,t){var i=t&-t;return i=(i&42)!==0?1:Ua(i),(i&(e.suspendedLanes|t))!==0?0:i}function Ua(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function xa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Er(){var e=z.p;return e!==0?e:(e=window.event,e===void 0?32:sm(e.type))}function _r(e,t){var i=z.p;try{return z.p=e,t()}finally{z.p=i}}var dn=Math.random().toString(36).slice(2),Ze="__reactFiber$"+dn,ot="__reactProps$"+dn,oi="__reactContainer$"+dn,ba="__reactEvents$"+dn,Nh="__reactListeners$"+dn,Mh="__reactHandles$"+dn,Cr="__reactResources$"+dn,el="__reactMarker$"+dn;function La(e){delete e[Ze],delete e[ot],delete e[ba],delete e[Nh],delete e[Mh]}function ai(e){var t=e[Ze];if(t)return t;for(var i=e.parentNode;i;){if(t=i[oi]||i[Ze]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=kd(e);e!==null;){if(i=e[Ze])return i;e=kd(e)}return t}e=i,i=e.parentNode}return null}function si(e){if(e=e[Ze]||e[oi]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function tl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function ui(e){var t=e[Cr];return t||(t=e[Cr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ke(e){e[el]=!0}var Ar=new Set,Rr={};function Vn(e,t){ri(e,t),ri(e+"Capture",t)}function ri(e,t){for(Rr[e]=t,e=0;e<t.length;e++)Ar.add(t[e])}var Ih=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Nr={},Mr={};function Dh(e){return Na.call(Mr,e)?!0:Na.call(Nr,e)?!1:Ih.test(e)?Mr[e]=!0:(Nr[e]=!0,!1)}function no(e,t,i){if(Dh(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var o=t.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function io(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function kt(e,t,i,o){if(o===null)e.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+o)}}function Ct(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ir(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Uh(e,t,i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,d=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(T){i=""+T,d.call(this,T)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(T){i=""+T},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wa(e){if(!e._valueTracker){var t=Ir(e)?"checked":"value";e._valueTracker=Uh(e,t,""+e[t])}}function Dr(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),o="";return e&&(o=Ir(e)?e.checked?"true":"false":e.value),e=o,e!==i?(t.setValue(e),!0):!1}function lo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var xh=/[\n"\\]/g;function At(e){return e.replace(xh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function qa(e,t,i,o,c,d,T,E){e.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.type=T:e.removeAttribute("type"),t!=null?T==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ct(t)):e.value!==""+Ct(t)&&(e.value=""+Ct(t)):T!=="submit"&&T!=="reset"||e.removeAttribute("value"),t!=null?Oa(e,T,Ct(t)):i!=null?Oa(e,T,Ct(i)):o!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Ct(E):e.removeAttribute("name")}function Ur(e,t,i,o,c,d,T,E){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||i!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){wa(e);return}i=i!=null?""+Ct(i):"",t=t!=null?""+Ct(t):i,E||t===e.value||(e.value=t),e.defaultValue=t}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=E?e.checked:!!o,e.defaultChecked=!!o,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(e.name=T),wa(e)}function Oa(e,t,i){t==="number"&&lo(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ci(e,t,i,o){if(e=e.options,t){t={};for(var c=0;c<i.length;c++)t["$"+i[c]]=!0;for(i=0;i<e.length;i++)c=t.hasOwnProperty("$"+e[i].value),e[i].selected!==c&&(e[i].selected=c),c&&o&&(e[i].defaultSelected=!0)}else{for(i=""+Ct(i),t=null,c=0;c<e.length;c++){if(e[c].value===i){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function xr(e,t,i){if(t!=null&&(t=""+Ct(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+Ct(i):""}function br(e,t,i,o){if(t==null){if(o!=null){if(i!=null)throw Error(s(92));if(Oe(o)){if(1<o.length)throw Error(s(93));o=o[0]}i=o}i==null&&(i=""),t=i}i=Ct(t),e.defaultValue=i,o=e.textContent,o===i&&o!==""&&o!==null&&(e.value=o),wa(e)}function fi(e,t){if(t){var i=e.firstChild;
vendor: 4,140 bytes, line 48
48if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var bh=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Lr(e,t,i){var o=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":o?e.setProperty(t,i):typeof i!="number"||i===0||bh.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function wr(e,t,i){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||t!=null&&t.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var c in t)o=t[c],t.hasOwnProperty(c)&&i[c]!==o&&Lr(e,c,o)}else for(var d in t)t.hasOwnProperty(d)&&Lr(e,d,t[d])}function Ga(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Lh=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
48-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),wh=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function oo(e){return wh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ft(){}var Ha=null;function Va(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var di=null,mi=null;function qr(e){var t=si(e);if(t&&(e=t.stateNode)){var i=e[ot]||null;e:switch(e=t.stateNode,t.type){case"input":if(qa(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+At(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var o=i[t];if(o!==e&&o.form===e.form){var c=o[ot]||null;if(!c)throw Error(s(90));qa(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<i.length;t++)o=i[t],o.form===e.form&&Dr(o)}break e;case"textarea":xr(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ci(e,!!i.multiple,t,!1)}}}var za=!1;function Or(e,t,i){if(za)return e(t,i);za=!0;try{var o=e(t);return o}finally{if(za=!1,(di!==null||mi!==null)&&(Ko(),di&&(t=di,e=mi,mi=di=null,qr(t),e)))for(t=0;t<e.length;t++)qr(e[t])}}function nl(e,t){var i=e.stateNode;if(i===null)return null;var o=i[ot]||null;if(o===null)return null;i=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(s(231,t,typeof i));return i}var Kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Pa=!1;if(Kt)try{var il={};Object.defineProperty(il,"passive",{get:function(){Pa=!0}}),window.addEventListener("test",il,il),window.removeEventListener("test",il,il)}catch{Pa=!1}var mn=null,Ba=null,ao=null;function Gr(){if(ao)return ao;var e,t=Ba,i=t.length,o,c="value"in mn?mn.value:mn.textContent,d=c.length;for(e=0;e<i&&t[e]===c[e];e++);var T=i-e;for(o=1;o<=T&&t[i-o]===c[d-o];o++);return ao=c.slice(e,1<o?1-o:void 0)}function so(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function uo(){return!0}function Hr(){return!1}function at(e){function t(i,o,c,d,T){this._reactName=i,this._targetInst=c,this.type=o,this.nativeEvent=d,this.target=T,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(i=e[E],this[E]=i?i(d):d[E]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?uo:Hr,this.isPropagationStopped=Hr,this}return S(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=uo)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=uo)},persist:function(){},isPersistent:uo}),t}var zn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ro=at(zn),ll=S({},zn,{view:0,detail:0}),qh=at(ll),Ya,Ja,ol,co=S({},ll,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fa,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ol&&(ol&&e.type==="mousemove"?(Ya=e.screenX-ol.screenX,Ja=e.screenY-ol.screenY):Ja=Ya=0,ol=e),Ya)},movementY:function(e){return"movementY"in e?e.movementY:Ja}}),Vr=at(co),Oh=S({},co,{dataTransfer:0}),Gh=at(Oh),Hh=S({},ll,{relatedTarget:0}),ka=at(Hh),Vh=S({},zn,{animationName:0,elapsedTime:0,pseudoElement:0}),zh=at(Vh),Ph=S({},zn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bh=at(Ph),Yh=S({},zn,{data:0}),zr=at(Yh),Jh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kh={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Fh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Kh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fh[e])?!!t[e]:!1}function Fa(){return Kh}var Xh=S({},ll,{key:function(e){if(e.key){var t=Jh[e.key]||e.key;if(t!=="Unidentified")return t}
vendor: 5,186 bytes, line 48
48return e.type==="keypress"?(e=so(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?kh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fa,charCode:function(e){return e.type==="keypress"?so(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?so(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qh=at(Xh),Zh=S({},co,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pr=at(Zh),$h=S({},ll,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fa}),Wh=at($h),jh=S({},zn,{propertyName:0,elapsedTime:0,pseudoElement:0}),eg=at(jh),tg=S({},co,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),ng=at(tg),ig=S({},zn,{newState:0,oldState:0}),lg=at(ig),og=[9,13,27,32],Ka=Kt&&"CompositionEvent"in window,al=null;Kt&&"documentMode"in document&&(al=document.documentMode);var ag=Kt&&"TextEvent"in window&&!al,Br=Kt&&(!Ka||al&&8<al&&11>=al),Yr=" ",Jr=!1;function kr(e,t){switch(e){case"keyup":return og.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fr(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pi=!1;function sg(e,t){switch(e){case"compositionend":return Fr(t);case"keypress":return t.which!==32?null:(Jr=!0,Yr);case"textInput":return e=t.data,e===Yr&&Jr?null:e;default:return null}}function ug(e,t){if(pi)return e==="compositionend"||!Ka&&kr(e,t)?(e=Gr(),ao=Ba=mn=null,pi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Br&&t.locale!=="ko"?null:t.data;default:return null}}var rg={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Kr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!rg[e.type]:t==="textarea"}function Xr(e,t,i,o){di?mi?mi.push(o):mi=[o]:di=o,t=ea(t,"onChange"),0<t.length&&(i=new ro("onChange","change",null,i,o),e.push({event:i,listeners:t}))}var sl=null,ul=null;function cg(e){xd(e,0)}function fo(e){var t=tl(e);if(Dr(t))return e}function Qr(e,t){if(e==="change")return t}var Zr=!1;if(Kt){var Xa;if(Kt){var Qa="oninput"in document;if(!Qa){var $r=document.createElement("div");$r.setAttribute("oninput","return;"),Qa=typeof $r.oninput=="function"}Xa=Qa}else Xa=!1;Zr=Xa&&(!document.documentMode||9<document.documentMode)}function Wr(){sl&&(sl.detachEvent("onpropertychange",jr),ul=sl=null)}function jr(e){if(e.propertyName==="value"&&fo(ul)){var t=[];Xr(t,ul,e,Va(e)),Or(cg,t)}}function fg(e,t,i){e==="focusin"?(Wr(),sl=t,ul=i,sl.attachEvent("onpropertychange",jr)):e==="focusout"&&Wr()}function dg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fo(ul)}function mg(e,t){if(e==="click")return fo(t)}function pg(e,t){if(e==="input"||e==="change")return fo(t)}function hg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var gt=typeof Object.is=="function"?Object.is:hg;function rl(e,t){if(gt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var c=i[o];if(!Na.call(t,c)||!gt(e[c],t[c]))return!1}return!0}function ec(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function tc(e,t){var i=ec(e);e=0;for(var o;i;){if(i.nodeType===3){if(o=e+i.textContent.length,e<=t&&o>=t)return{node:i,offset:t-e};e=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ec(i)}}function nc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?nc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ic(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=lo(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=lo(e.document)}return t}function Za(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var gg=Kt&&"documentMode"in document&&11>=document.documentMode,hi=null,$a=null,cl=null,Wa=!1;function lc(e,t,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Wa||hi==null||hi!==lo(o)||(o=hi,"selectionStart"in o&&Za(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focu
vendor: 22,130 bytes, line 48
48sNode:o.focusNode,focusOffset:o.focusOffset}),cl&&rl(cl,o)||(cl=o,o=ea($a,"onSelect"),0<o.length&&(t=new ro("onSelect","select",null,t,i),e.push({event:t,listeners:o}),t.target=hi)))}function Pn(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var gi={animationend:Pn("Animation","AnimationEnd"),animationiteration:Pn("Animation","AnimationIteration"),animationstart:Pn("Animation","AnimationStart"),transitionrun:Pn("Transition","TransitionRun"),transitionstart:Pn("Transition","TransitionStart"),transitioncancel:Pn("Transition","TransitionCancel"),transitionend:Pn("Transition","TransitionEnd")},ja={},oc={};Kt&&(oc=document.createElement("div").style,"AnimationEvent"in window||(delete gi.animationend.animation,delete gi.animationiteration.animation,delete gi.animationstart.animation),"TransitionEvent"in window||delete gi.transitionend.transition);function Bn(e){if(ja[e])return ja[e];if(!gi[e])return e;var t=gi[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in oc)return ja[e]=t[i];return e}var ac=Bn("animationend"),sc=Bn("animationiteration"),uc=Bn("animationstart"),yg=Bn("transitionrun"),Tg=Bn("transitionstart"),vg=Bn("transitioncancel"),rc=Bn("transitionend"),cc=new Map,es="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");es.push("scrollEnd");function qt(e,t){cc.set(e,t),Vn(t,[e])}var mo=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Rt=[],yi=0,ts=0;function po(){for(var e=yi,t=ts=yi=0;t<e;){var i=Rt[t];Rt[t++]=null;var o=Rt[t];Rt[t++]=null;var c=Rt[t];Rt[t++]=null;var d=Rt[t];if(Rt[t++]=null,o!==null&&c!==null){var T=o.pending;T===null?c.next=c:(c.next=T.next,T.next=c),o.pending=c}d!==0&&fc(i,c,d)}}function ho(e,t,i,o){Rt[yi++]=e,Rt[yi++]=t,Rt[yi++]=i,Rt[yi++]=o,ts|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function ns(e,t,i,o){return ho(e,t,i,o),go(e)}function Yn(e,t){return ho(e,null,null,t),go(e)}function fc(e,t,i){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i);for(var c=!1,d=e.return;d!==null;)d.childLanes|=i,o=d.alternate,o!==null&&(o.childLanes|=i),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-ht(i),e=d.hiddenUpdates,o=e[c],o===null?e[c]=[t]:o.push(t),t.lane=i|536870912),d):null}function go(e){if(50<bl)throw bl=0,fu=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ti={};function Sg(e,t,i,o){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yt(e,t,i,o){return new Sg(e,t,i,o)}function is(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Xt(e,t){var i=e.alternate;return i===null?(i=yt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function dc(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yo(e,t,i,o,c,d){var T=0;if(o=e,typeof e=="function")is(e)&&(T=1);else if(typeof e=="string")T=Ry(e,i,$.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=yt(31,i,t,c),e.elementType=P,e.lanes=d,e;case H:return Jn(i.children,c,d,t);case k:T=8,c|=24;break;case J:return e=yt(12,i,t,c|2),e.elementType=J,e.lanes=d,e;case ne:return e=yt(13,i,t,c),e.elementType=ne,e.lanes=d,e;case te:return e=yt(19,i,t,c),e.elementType=te,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case V:T=10;break e;case K:T=9;break e;case j:T=11;break e;case F:T=14;break e;case ye:T=16,o=null;break e}T=29,i=Error(s(130,e===null?"null":typeof e,"")),o=null}return t=yt(T,i,t,c),t.elementType=e,t.type=o,t.lanes=d,t}function Jn(e,t,i,o){return e=yt(7,e,o,t),e.lanes=i,e}function ls(e,t,i){return e=yt(6,e,null,t),e.lanes=i,e}function mc(e){var t=yt(18,null,null,0);return t.stateNode=e,t}function os(e,t,i){return t=yt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var pc=new WeakMap;function Nt(e,t){if(typeof e=="object"&&e!==null){var i=pc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:mr(t)},pc.set(e,t),t)}return{value:e,source:t,stack:mr(t)}}var vi=[],Si=0,To=null,fl=0,Mt=[],It=0,pn=null,zt=1,Pt="";function Qt(e,t){vi[Si++]=fl,vi[Si++]=To,To=e,fl=t}function hc(e,t,i){Mt[It++]=zt,Mt[It++]=Pt,Mt[It++]=pn,pn=e;var o=zt;e=Pt;var c=32-ht(o)-1;o&=~(1<<c),i+=1;var d=32-ht(t)+c;if(30<d){var T=c-c%5;d=(o&(1<<T)-1).toString(32),o>>=T,c-=T,zt=1<<32-ht(t)+c|i<<c|o,Pt=d+e}else zt=1<<d|i<<c|o,Pt=e}function as(e){e.return!==null&&(Qt(e,1),hc(e,1,0))}function ss(e){for(;e===To;)To=vi[--Si],vi[Si]=null,fl=vi[--Si],vi[Si]=null;for(;e===pn;)pn=Mt[--It],Mt[It]=null,Pt=Mt[--It],Mt[It]=null,zt=Mt[--It],Mt[It]=null}function gc(e,t){Mt[It++]=zt,Mt[It++]=Pt,Mt[It++]=pn,zt=t.id,Pt=t.overflow,pn=e}var $e=null,be=null,ge=!1,hn=null,Dt=!1,us=Error(s(519));function gn(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw dl(Nt(t,e)),us}function yc(e){var t=e.stateNode,i=e.type,o=e.memoizedProps;switch(t[Ze]=e,t[ot]=o,i){case"dialog":me("cancel",t),me("close",t);break;case"iframe":case"object":case"embed":me("load",t);break;case"video":case"audio":for(i=0;i<wl.length;i++)me(wl[i],t);break;case"source":me("error",t);break;case"img":case"image":case"link":me("error",t),me("load",t);break;case"details":me("toggle",t);break;case"input":me("invalid",t),Ur(t,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":me("invalid",t);break;case"textarea":me("invalid",t),br(t,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||o.suppressHydrationWarning===!0||qd(t.textContent,i)?(o.popover!=null&&(me("beforetoggle",t),me("toggle",t)),o.onScroll!=null&&me("scroll",t),o.onScrollEnd!=null&&me("scrollend",t),o.onClick!=null&&(t.onclick=Ft),t=!0):t=!1,t||gn(e,!0)}function Tc(e){for($e=e.return;$e;)switch($e.tag){case 5:case 31:case 13:Dt=!1;return;case 27:case 3:Dt=!0;return;default:$e=$e.return}}function Ei(e){if(e!==$e)return!1;if(!ge)return Tc(e),ge=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Nu(e.type,e.memoizedProps)),i=!i),i&&be&&gn(e),Tc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));be=Jd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));be=Jd(e)}else t===27?(t=be,Un(e.type)?(e=xu,xu=null,be=e):be=t):be=$e?xt(e.stateNode.nextSibling):null;return!0}function kn(){be=$e=null,ge=!1}function rs(){var e=hn;return e!==null&&(ct===null?ct=e:ct.push.apply(ct,e),hn=null),e}function dl(e){hn===null?hn=[e]:hn.push(e)}var cs=R(null),Fn=null,Zt=null;function yn(e,t,i){Y(cs,t._currentValue),t._currentValue=i}function $t(e){e._currentValue=cs.current,G(cs)}function fs(e,t,i){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===i)break;e=e.return}}function ds(e,t,i,o){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var T=c.child;d=d.firstContext;e:for(;d!==null;){var E=d;d=c;for(var C=0;C<t.length;C++)if(E.context===t[C]){d.lanes|=i,E=d.alternate,E!==null&&(E.lanes|=i),fs(d.return,i,e),o||(T=null);break e}d=E.next}}else if(c.tag===18){if(T=c.return,T===null)throw Error(s(341));T.lanes|=i,d=T.alternate,d!==null&&(d.lanes|=i),fs(T,i,e),T=null}else T=c.child;if(T!==null)T.return=c;else for(T=c;T!==null;){if(T===e){T=null;break}if(c=T.sibling,c!==null){c.return=T.return,T=c;break}T=T.return}c=T}}function _i(e,t,i,o){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var T=c.alternate;if(T===null)throw Error(s(387));if(T=T.memoizedProps,T!==null){var E=c.type;gt(c.pendingProps.value,T.value)||(e!==null?e.push(E):e=[E])}}else if(c===Ce.current){if(T=c.alternate,T===null)throw Error(s(387));T.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Vl):e=[Vl])}c=c.return}e!==null&&ds(t,e,i,o),t.flags|=262144}function vo(e){for(e=e.firstContext;e!==null;){if(!gt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Kn(e){Fn=e,Zt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function We(e){return vc(Fn,e)}function So(e,t){return Fn===null&&Kn(e),vc(e,t)}function vc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Zt===null){if(e===null)throw Error(s(308));Zt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zt=Zt.next=t;return i}var Eg=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,o){e.push(o)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},_g=l.unstable_scheduleCallback,Cg=l.unstable_NormalPriority,Be={$$typeof:V,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ms(){return{controller:new Eg,data:new Map,refCount:0}}function ml(e){e.refCount--,e.refCount===0&&_g(Cg,function(){e.controller.abort()})}var pl=null,ps=0,Ci=0,Ai=null;function Ag(e,t){if(pl===null){var i=pl=[];ps=0,Ci=yu(),Ai={status:"pending",value:void 0,then:function(o){i.push(o)}}}return ps++,t.then(Sc,Sc),t}function Sc(){if(--ps===0&&pl!==null){Ai!==null&&(Ai.status="fulfilled");var e=pl;pl=null,Ci=0,Ai=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Rg(e,t){var i=[],o={status:"pending",value:null,reason:null,then:function(c){i.push(c)}};return e.then(function(){o.status="fulfilled",o.value=t;for(var c=0;c<i.length;c++)(0,i[c])(t)},function(c){for(o.status="rejected",o.reason=c,c=0;c<i.length;c++)(0,i[c])(void 0)}),o}var Ec=x.S;x.S=function(e,t){od=mt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ag(e,t),Ec!==null&&Ec(e,t)};var Xn=R(null);function hs(){var e=Xn.current;return e!==null?e:xe.pooledCache}function Eo(e,t){t===null?Y(Xn,Xn.current):Y(Xn,t.pool)}function _c(){var e=hs();return e===null?null:{parent:Be._currentValue,pool:e}}var Ri=Error(s(460)),gs=Error(s(474)),_o=Error(s(542)),Co={then:function(){}};function Cc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ac(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Ft,Ft),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Nc(e),e;default:if(typeof t.status=="string")t.then(Ft,Ft);else{if(e=xe,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(o){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=o}},function(o){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=o}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Nc(e),e}throw Zn=t,Ri}}function Qn(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Zn=i,Ri):i}}var Zn=null;function Rc(){if(Zn===null)throw Error(s(459));var e=Zn;return Zn=null,e}function Nc(e){if(e===Ri||e===_o)throw Error(s(483))}var Ni=null,hl=0;function Ao(e){var t=hl;return hl+=1,Ni===null&&(Ni=[]),Ac(Ni,e,t)}function gl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ro(e,t){throw t.$$typeof===_?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Mc(e){function t(N,A){if(e){var I=N.deletions;I===null?(N.deletions=[A],N.flags|=16):I.push(A)}}function i(N,A){if(!e)return null;for(;A!==null;)t(N,A),A=A.sibling;return null}function o(N){for(var A=new Map;N!==null;)N.key!==null?A.set(N.key,N):A.set(N.index,N),N=N.sibling;return A}function c(N,A){return N=Xt(N,A),N.index=0,N.sibling=null,N}function d(N,A,I){return N.index=I,e?(I=N.alternate,I!==null?(I=I.index,I<A?(N.flags|=67108866,A):I):(N.flags|=67108866,A)):(N.flags|=1048576,A)}function T(N){return e&&N.alternate===null&&(N.flags|=67108866),N}function E(N,A,I,q){return A===null||A.tag!==6?(A=ls(I,N.mode,q),A.return=N,A):(A=c(A,I),A.return=N,A)}function C(N,A,I,q){var ee=I.type;return ee===H?L(N,A,I.props.children,q,I.key):A!==null&&(A.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ye&&Qn(ee)===A.type)?(A=c(A,I.props),gl(A,I),A.return=N,A):(A=yo(I.type,I.key,I.props,null,N.mode,q),gl(A,I),A.return=N,A)}function D(N,A,I,q){return A===null||A.tag!==4||A.stateNode.containerInfo!==I.containerInfo||A.stateNode.implementation!==I.implementation?(A=os(I,N.mode,q),A.return=N,A):(A=c(A,I.children||[]),A.return=N,A)}function L(N,A,I,q,ee){return A===null||A.tag!==7?(A=Jn(I,N.mode,q,ee),A.return=N,A):(A=c(A,I),A.return=N,A)}function O(N,A,I){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=ls(""+A,N.mode,I),A.return=N,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case M:return I=yo(A.type,A.key,A.props,null,N.mode,I),gl(I,A),I.return=N,I;case w:return A=os(A,N.mode,I),A.return=N,A;case ye:return A=Qn(A),O(N,A,I)}if(Oe(A)||ie(A))return A=Jn(A,N.mode,I,null),A.return=N,A;if(typeof A.then=="function")return O(N,Ao(A),I);if(A.$$typeof===V)return O(N,So(N,A),I);Ro(N,A)}return null}function U(N,A,I,q){var ee=A!==null?A.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return ee!==null?null:E(N,A,""+I,q);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case M:return I.key===ee?C(N,A,I,q):null;case w:return I.key===ee?D(N,A,I,q):null;case ye:return I=Qn(I),U(N,A,I,q)}if(Oe(I)||ie(I))return ee!==null?null:L(N,A,I,q,null);if(typeof I.then=="function")return U(N,A,Ao(I),q);if(I.$$typeof===V)return U(N,A,So(N,I),q);Ro(N,I)}return null}function b(N,A,I,q,ee){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return N=N.get(I)||null,E(A,N,""+q,ee);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case M:return N=N.get(q.key===null?I:q.key)||null,C(A,N,q,ee);case w:return N=N.get(q.key===null?I:q.key)||null,D(A,N,q,ee);case ye:return q=Qn(q),b(N,A,I,q,ee)}if(Oe(q)||ie(q))return N=N.get(I)||null,L(A,N,q,ee,null);if(typeof q.then=="function")return b(N,A,I,Ao(q),ee);if(q.$$typeof===V)return b(N,A,I,So(A,q),ee);Ro(A,q)}return null}function Q(N,A,I,q){for(var ee=null,Te=null,W=A,ce=A=0,he=null;W!==null&&ce<I.length;ce++){W.index>ce?(he=W,W=null):he=W.sibling;var ve=U(N,W,I[ce],q);if(ve===null){W===null&&(W=he);break}e&&W&&ve.alternate===null&&t(N,W),A=d(ve,A,ce),Te===null?ee=ve:Te.sibling=ve,Te=ve,W=he}if(ce===I.length)return i(N,W),ge&&Qt(N,ce),ee;if(W===null){for(;ce<I.length;ce++)W=O(N,I[ce],q),W!==null&&(A=d(W,A,ce),Te===null?ee=W:Te.sibling=W,Te=W);return ge&&Qt(N,ce),ee}for(W=o(W);ce<I.length;ce++)he=b(W,N,ce,I[ce],q),he!==null&&(e&&he.alternate!==null&&W.delete(he.key===null?ce:he.key),A=d(he,A,ce),Te===null?ee=he:Te.sibling=he,Te=he);return e&&W.forEach(function(qn){return t(N,qn)}),ge&&Qt(N,ce),ee}function le(N,A,I,q){if(I==null)throw Error(s(151));for(var ee=null,Te=null,W=A,ce=A=0,he=null,ve=I.next();W!==null&&!ve.done;ce++,ve=I.next()){W.index>ce?(he=W,W=null):he=W.sibling;var qn=U(N,W,ve.value,q);if(qn===null){W===null&&(W=he);break}e&&W&&qn.alternate===null&&t(N,W),A=d(qn,A,ce),Te===null?ee=qn:Te.sibling=qn,Te=qn,W=he}if(ve.done)return i(N,W),ge&&Qt(N,ce),ee;if(W===null){for(;!ve.done;ce++,ve=I.next())ve=O(N,ve.value,q),ve!==null&&(A=d(ve,A,ce),Te===null?ee=ve:Te.sibling=ve,Te=ve);return ge&&Qt(N,ce),ee}for(W=o(W);!ve.done;ce++,ve=I.next())ve=b(W,N,ce,ve.value,q),ve!==null&&(e&&ve.alternate!==null&&W.delete(ve.key===null?ce:ve.key),A=d(ve,A,ce),Te===null?ee=ve:Te.sibling=ve,Te=ve);return e&&W.forEach(function(Oy){return t(N,Oy)}),ge&&Qt(N,ce),ee}function De(N,A,I,q){if(typeof I=="object"&&I!==null&&I.type===H&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case M:e:{for(var ee=I.key;A!==null;){if(A.key===ee){if(ee=I.type,ee===H){if(A.tag===7){i(N,A.sibling),q=c(A,I.props.children),q.return=N,N=q;break e}}else if(A.elementType===ee||typeof ee=="object"&&ee!==null&&ee.$$typeof===ye&&Qn(ee)===A.type){i(N,A.sibling),q=c(A,I.props),gl(q,I),q.return=N,N=q;break e}i(N,A);break}else t(N,A);A=A.sibling}I.type===H?(q=Jn(I.props.children,N.mode,q,I.key),q.return=N,N=q):(q=yo(I.type,I.key,I.props,null,N.mode,q),gl(q,I),q.return=N,N=q)}return T(N);case w:e:{for(ee=I.key;A!==null;){if(A.key===ee)if(A.tag===4&&A.stateNode.containerInfo===I.containerInfo&&A.stateNode.implementation===I.implementation){i(N,A.sibling),q=c(A,I.children||[]),q.return=N,N=q;break e}else{i(N,A);break}else t(N,A);A=A.sibling}q=os(I,N.mode,q),q.return=N,N=q}return T(N);case ye:return I=Qn(I),De(N,A,I,q)}if(Oe(I))return Q(N,A,I,q);if(ie(I)){if(ee=ie(I),typeof ee!="function")throw Error(s(150));return I=ee.call(I),le(N,A,I,q)}if(typeof I.then=="function")return De(N,A,Ao(I),q);if(I.$$typeof===V)return De(N,A,So(N,I),q);Ro(N,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,A!==null&&A.tag===6?(i(N,A.sibling),q=c(A,I),q.return=N,N=q):(i(N,A),q=ls(I,N.mode,q),q.return=N,N=q),T(N)):i(N,A)}return function(N,A,I,q){try{hl=0;var ee=De(N,A,I,q);return Ni=null,ee}catch(W){if(W===Ri||W===_o)throw W;var Te=yt(29,W,null,N.mode);return Te.lanes=q,Te.return=N,Te}finally{}}}var $n=Mc(!0),Ic=Mc(!1),Tn=!1;function ys(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ts(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function vn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Sn(e,t,i){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ee&2)!==0){var c=o.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),o.pending=t,t=go(e),fc(e,null,i),t}return ho(e,o,t,i),go(e)}function yl(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,vr(e,i)}}function vs(e,t){var i=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var c=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var T={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};d===null?c=d=T:d=d.next=T,i=i.next}while(i!==null);d===null?c=d=t:d=d.next=t}else c=d=t;i={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Ss=!1;function Tl(){if(Ss){var e=Ai;if(e!==null)throw e}}function vl(e,t,i,o){Ss=!1;var c=e.updateQueue;Tn=!1;var d=c.firstBaseUpdate,T=c.lastBaseUpdate,E=c.shared.pending;if(E!==null){c.shared.pending=null;var C=E,D=C.next;C.next=null,T===null?d=D:T.next=D,T=C;var L=e.alternate;L!==null&&(L=L.updateQueue,E=L.lastBaseUpdate,E!==T&&(E===null?L.firstBaseUpdate=D:E.next=D,L.lastBaseUpdate=C))}if(d!==null){var O=c.baseState;T=0,L=D=C=null,E=d;do{var U=E.lane&-536870913,b=U!==E.lane;if(b?(pe&U)===U:(o&U)===U){U!==0&&U===Ci&&(Ss=!0),L!==null&&(L=L.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var Q=e,le=E;U=t;var De=i;switch(le.tag){case 1:if(Q=le.payload,typeof Q=="function"){O=Q.call(De,O,U);break e}O=Q;break e;case 3:Q.flags=Q.flags&-65537|128;case 0:if(Q=le.payload,U=typeof Q=="function"?Q.call(De,O,U):Q,U==null)break e;O=S({},O,U);break e;case 2:Tn=!0}}U=E.callback,U!==null&&(e.flags|=64,b&&(e.flags|=8192),b=c.callbacks,b===null?c.callbacks=[U]:b.push(U))}else b={lane:U,tag:E.tag,payload:E.payload,callback:E.callback,next:null},L===null?(D=L=b,C=O):L=L.next=b,T|=U;if(E=E.next,E===null){if(E=c.shared.pending,E===null)break;b=E,E=b.next,b.next=null,c.lastBaseUpdate=b,c.shared.pending=null}}while(!0);L===null&&(C=O),c.baseState=C,c.firstBaseUpdate=D,c.lastBaseUpdate=L,d===null&&(c.shared.lanes=0),Rn|=T,e.lanes=T,e.memoizedState=O}}function Dc(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function Uc(e,t){var i=e.callbacks;
vendor: 7,422 bytes, line 48
48if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Dc(i[e],t)}var Mi=R(null),No=R(0);function xc(e,t){e=sn,Y(No,e),Y(Mi,t),sn=e|t.baseLanes}function Es(){Y(No,sn),Y(Mi,Mi.current)}function _s(){sn=No.current,G(Mi),G(No)}var Tt=R(null),Ut=null;function En(e){var t=e.alternate;Y(ze,ze.current&1),Y(Tt,e),Ut===null&&(t===null||Mi.current!==null||t.memoizedState!==null)&&(Ut=e)}function Cs(e){Y(ze,ze.current),Y(Tt,e),Ut===null&&(Ut=e)}function bc(e){e.tag===22?(Y(ze,ze.current),Y(Tt,e),Ut===null&&(Ut=e)):_n()}function _n(){Y(ze,ze.current),Y(Tt,Tt.current)}function vt(e){G(Tt),Ut===e&&(Ut=null),G(ze)}var ze=R(0);function Mo(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Du(i)||Uu(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Wt=0,re=null,Me=null,Ye=null,Io=!1,Ii=!1,Wn=!1,Do=0,Sl=0,Di=null,Ng=0;function Ge(){throw Error(s(321))}function As(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!gt(e[i],t[i]))return!1;return!0}function Rs(e,t,i,o,c,d){return Wt=d,re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,x.H=e===null||e.memoizedState===null?gf:zs,Wn=!1,d=i(o,c),Wn=!1,Ii&&(d=wc(t,i,o,c)),Lc(e),d}function Lc(e){x.H=Cl;var t=Me!==null&&Me.next!==null;if(Wt=0,Ye=Me=re=null,Io=!1,Sl=0,Di=null,t)throw Error(s(300));e===null||Je||(e=e.dependencies,e!==null&&vo(e)&&(Je=!0))}function wc(e,t,i,o){re=e;var c=0;do{if(Ii&&(Di=null),Sl=0,Ii=!1,25<=c)throw Error(s(301));if(c+=1,Ye=Me=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}x.H=yf,d=t(i,o)}while(Ii);return d}function Mg(){var e=x.H,t=e.useState()[0];return t=typeof t.then=="function"?El(t):t,e=e.useState()[0],(Me!==null?Me.memoizedState:null)!==e&&(re.flags|=1024),t}function Ns(){var e=Do!==0;return Do=0,e}function Ms(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function Is(e){if(Io){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Io=!1}Wt=0,Ye=Me=re=null,Ii=!1,Sl=Do=0,Di=null}function lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ye===null?re.memoizedState=Ye=e:Ye=Ye.next=e,Ye}function Pe(){if(Me===null){var e=re.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=Ye===null?re.memoizedState:Ye.next;if(t!==null)Ye=t,Me=e;else{if(e===null)throw re.alternate===null?Error(s(467)):Error(s(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Ye===null?re.memoizedState=Ye=e:Ye=Ye.next=e}return Ye}function Uo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function El(e){var t=Sl;return Sl+=1,Di===null&&(Di=[]),e=Ac(Di,e,t),t=re,(Ye===null?t.memoizedState:Ye.next)===null&&(t=t.alternate,x.H=t===null||t.memoizedState===null?gf:zs),e}function xo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return El(e);if(e.$$typeof===V)return We(e)}throw Error(s(438,String(e)))}function Ds(e){var t=null,i=re.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var o=re.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(t={data:o.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Uo(),re.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),o=0;o<e;o++)i[o]=X;return t.index++,i}function jt(e,t){return typeof t=="function"?t(e):t}function bo(e){var t=Pe();return Us(t,Me,e)}function Us(e,t,i){var o=e.queue;if(o===null)throw Error(s(311));o.lastRenderedReducer=i;var c=e.baseQueue,d=o.pending;if(d!==null){if(c!==null){var T=c.next;c.next=d.next,d.next=T}t.baseQueue=c=d,o.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var E=T=null,C=null,D=t,L=!1;do{var O=D.lane&-536870913;if(O!==D.lane?(pe&O)===O:(Wt&O)===O){var U=D.revertLane;if(U===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),O===Ci&&(L=!0);else if((Wt&U)===U){D=D.next,U===Ci&&(L=!0);continue}else O={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},C===null?(E=C=O,T=d):C=C.next=O,re.lanes|=U,Rn|=U;O=D.action,Wn&&i(d,O),d=D.hasEagerState?D.eagerState:i(d,O)}else U={lane:O,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},C===null?(E=C=U,T=d):C=C.next=U,re.lanes|=O,Rn|=O;D=D.next}while(D!==null&&D!==t);if(C===null?T=d:C.next=E,!gt(d,e.memoizedState)&&(Je=!0,L&&(i=Ai,i!==null)))throw i;e.memoizedState=d,e.baseState=T,e.baseQueue=C,o.lastRenderedState=d}return c===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function xs(e){var t=Pe(),i=t.queue;if(i===null)throw Error(s(311));i.lastRenderedReducer=e;var o=i.dispatch,c=i.pending,d=t.memoizedState;if(c!==null){i.pending=null;var T=c=c.next;do d=e(d,T.action),T=T.next;while(T!==c);gt(d,t.memoizedState)||(Je=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),i.lastRenderedState=d}return[d,o]}function qc(e,t,i){var o=re,c=Pe(),d=ge;if(d){if(i===void 0)throw Error(s(407));i=i()}else i=t();var T=!gt((Me||c).memoizedState,i);if(T&&(c.memoizedState=i,Je=!0),c=c.queue,ws(Hc.bind(null,o,c,e),[e]),c.getSnapshot!==t||T||Ye!==null&&Ye.memoizedState.tag&1){if(o.flags|=2048,Ui(9,{destroy:void 0},Gc.bind(null,o,c,i,t),null),xe===null)throw Error(s(349));d||(Wt&127)!==0||Oc(o,t,i)}return i}function Oc(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=re.updateQueue,t===null?(t=Uo(),re.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Gc(e,t,i,o){t.value=i,t.getSnapshot=o,Vc(t)&&zc(e)}function Hc(e,t,i){return i(function(){Vc(t)&&zc(e)})}function Vc(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!gt(e,i)}catch{return!0}}function zc(e){var t=Yn(e,2);t!==null&&ft(t,e,2)}function bs(e){var t=lt();if(typeof e=="function"){var i=e;if(e=i(),Wn){fn(!0);try{i()}finally{fn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jt,lastRenderedState:e},t}function Pc(e,t,i,o){return e.baseState=i,Us(e,Me,typeof o=="function"?o:jt)}function Ig(e,t,i,o,c){if(qo(e))throw Error(s(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){d.listeners.push(T)}};x.T!==null?i(!0):d.isTransition=!1,o(d),i=t.pending,i===null?(d.next=t.pending=d,Bc(t,d)):(d.next=i.next,t.pending=i.next=d)}}function Bc(e,t){var i=t.action,o=t.payload,c=e.state;if(t.isTransition){var d=x.T,T={};x.T=T;try{var E=i(c,o),C=x.S;C!==null&&C(T,E),Yc(e,t,E)}catch(D){Ls(e,t,D)}finally{d!==null&&T.types!==null&&(d.types=T.types),x.T=d}}else try{d=i(c,o),Yc(e,t,d)}catch(D){Ls(e,t,D)}}function Yc(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){Jc(e,t,o)},function(o){return Ls(e,t,o)}):Jc(e,t,i)}
vendor: 9,671 bytes, line 48
48function Jc(e,t,i){t.status="fulfilled",t.value=i,kc(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Bc(e,i)))}function Ls(e,t,i){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do t.status="rejected",t.reason=i,kc(t),t=t.next;while(t!==o)}e.action=null}function kc(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Fc(e,t){return t}function Kc(e,t){if(ge){var i=xe.formState;if(i!==null){e:{var o=re;if(ge){if(be){t:{for(var c=be,d=Dt;c.nodeType!==8;){if(!d){c=null;break t}if(c=xt(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){be=xt(c.nextSibling),o=c.data==="F!";break e}}gn(o)}o=!1}o&&(t=i[0])}}return i=lt(),i.memoizedState=i.baseState=t,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fc,lastRenderedState:t},i.queue=o,i=mf.bind(null,re,o),o.dispatch=i,o=bs(!1),d=Vs.bind(null,re,!1,o.queue),o=lt(),c={state:t,dispatch:null,action:e,pending:null},o.queue=c,i=Ig.bind(null,re,c,d,i),c.dispatch=i,o.memoizedState=e,[t,i,!1]}function Xc(e){var t=Pe();return Qc(t,Me,e)}function Qc(e,t,i){if(t=Us(e,t,Fc)[0],e=bo(jt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var o=El(t)}catch(T){throw T===Ri?_o:T}else o=t;t=Pe();var c=t.queue,d=c.dispatch;return i!==t.memoizedState&&(re.flags|=2048,Ui(9,{destroy:void 0},Dg.bind(null,c,i),null)),[o,d,e]}function Dg(e,t){e.action=t}function Zc(e){var t=Pe(),i=Me;if(i!==null)return Qc(t,i,e);Pe(),t=t.memoizedState,i=Pe();var o=i.queue.dispatch;return i.memoizedState=e,[t,o,!1]}function Ui(e,t,i,o){return e={tag:e,create:i,deps:o,inst:t,next:null},t=re.updateQueue,t===null&&(t=Uo(),re.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(o=i.next,i.next=e,e.next=o,t.lastEffect=e),e}function $c(){return Pe().memoizedState}function Lo(e,t,i,o){var c=lt();re.flags|=e,c.memoizedState=Ui(1|t,{destroy:void 0},i,o===void 0?null:o)}function wo(e,t,i,o){var c=Pe();o=o===void 0?null:o;var d=c.memoizedState.inst;Me!==null&&o!==null&&As(o,Me.memoizedState.deps)?c.memoizedState=Ui(t,d,i,o):(re.flags|=e,c.memoizedState=Ui(1|t,d,i,o))}function Wc(e,t){Lo(8390656,8,e,t)}function ws(e,t){wo(2048,8,e,t)}function Ug(e){re.flags|=4;var t=re.updateQueue;if(t===null)t=Uo(),re.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function jc(e){var t=Pe().memoizedState;return Ug({ref:t,nextImpl:e}),function(){if((Ee&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function ef(e,t){return wo(4,2,e,t)}function tf(e,t){return wo(4,4,e,t)}function nf(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function lf(e,t,i){i=i!=null?i.concat([e]):null,wo(4,4,nf.bind(null,t,e),i)}function qs(){}function of(e,t){var i=Pe();t=t===void 0?null:t;var o=i.memoizedState;return t!==null&&As(t,o[1])?o[0]:(i.memoizedState=[e,t],e)}function af(e,t){var i=Pe();t=t===void 0?null:t;var o=i.memoizedState;if(t!==null&&As(t,o[1]))return o[0];if(o=e(),Wn){fn(!0);try{e()}finally{fn(!1)}}return i.memoizedState=[o,t],o}function Os(e,t,i){return i===void 0||(Wt&1073741824)!==0&&(pe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=sd(),re.lanes|=e,Rn|=e,i)}function sf(e,t,i,o){return gt(i,t)?i:Mi.current!==null?(e=Os(e,i,o),gt(e,t)||(Je=!0),e):(Wt&42)===0||(Wt&1073741824)!==0&&(pe&261930)===0?(Je=!0,e.memoizedState=i):(e=sd(),re.lanes|=e,Rn|=e,t)}function uf(e,t,i,o,c){var d=z.p;z.p=d!==0&&8>d?d:8;var T=x.T,E={};x.T=E,Vs(e,!1,t,i);try{var C=c(),D=x.S;if(D!==null&&D(E,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var L=Rg(C,o);_l(e,t,L,_t(e))}else _l(e,t,o,_t(e))}catch(O){_l(e,t,{then:function(){},status:"rejected",reason:O},_t())}finally{z.p=d,T!==null&&E.types!==null&&(T.types=E.types),x.T=T}}function xg(){}function Gs(e,t,i,o){if(e.tag!==5)throw Error(s(476));var c=rf(e).queue;uf(e,c,t,ae,i===null?xg:function(){return cf(e),i(o)})}function rf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jt,lastRenderedState:ae},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:jt,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function cf(e){var t=rf(e);t.next===null&&(t=e.alternate.memoizedState),_l(e,t.next.queue,{},_t())}function Hs(){return We(Vl)}function ff(){return Pe().memoizedState}function df(){return Pe().memoizedState}function bg(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=_t();e=vn(i);var o=Sn(t,e,i);o!==null&&(ft(o,t,i),yl(o,t,i)),t={cache:ms()},e.payload=t;return}t=t.return}}function Lg(e,t,i){var o=_t();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},qo(e)?pf(t,i):(i=ns(e,t,i,o),i!==null&&(ft(i,e,o),hf(i,t,o)))}function mf(e,t,i){var o=_t();_l(e,t,i,o)}function _l(e,t,i,o){var c={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(qo(e))pf(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var T=t.lastRenderedState,E=d(T,i);if(c.hasEagerState=!0,c.eagerState=E,gt(E,T))return ho(e,t,c,0),xe===null&&po(),!1}catch{}finally{}if(i=ns(e,t,c,o),i!==null)return ft(i,e,o),hf(i,t,o),!0}return!1}function Vs(e,t,i,o){if(o={lane:2,revertLane:yu(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},qo(e)){if(t)throw Error(s(479))}else t=ns(e,i,o,2),t!==null&&ft(t,e,2)}function qo(e){var t=e.alternate;return e===re||t!==null&&t===re}function pf(e,t){Ii=Io=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function hf(e,t,i){if((i&4194048)!==0){var o=t.lanes;o&=e.pendingLanes,i|=o,t.lanes=i,vr(e,i)}}var Cl={readContext:We,use:xo,useCallback:Ge,useContext:Ge,useEffect:Ge,useImperativeHandle:Ge,useLayoutEffect:Ge,useInsertionEffect:Ge,useMemo:Ge,useReducer:Ge,useRef:Ge,useState:Ge,useDebugValue:Ge,useDeferredValue:Ge,useTransition:Ge,useSyncExternalStore:Ge,useId:Ge,useHostTransitionStatus:Ge,useFormState:Ge,useActionState:Ge,useOptimistic:Ge,useMemoCache:Ge,useCacheRefresh:Ge};Cl.useEffectEvent=Ge;var gf={readContext:We,use:xo,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:We,useEffect:Wc,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Lo(4194308,4,nf.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Lo(4194308,4,e,t)},useInsertionEffect:function(e,t){Lo(4,2,e,t)},useMemo:function(e,t){var i=lt();t=t===void 0?null:t;var o=e();if(Wn){fn(!0);try{e()}finally{fn(!1)}}return i.memoizedState=[o,t],o},useReducer:function(e,t,i){var o=lt();if(i!==void 0){var c=i(t);if(Wn){fn(!0);try{i(t)}finally{fn(!1)}}}else c=t;return o.memoizedState=o.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},o.queue=e,e=e.dispatch=Lg.bind(null,re,e),[o.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:function(e){e=bs(e);var t=e.queue,i=mf.bind(null,re,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:qs,useDeferredValue:function(e,t){var i=lt();return Os(i,e,t)},useTransition:function(){var e=bs(!1);return e=uf.bind(null,re,e.queue,!0,!1),lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var o=re,c=lt();if(ge){if(i===void 0)throw Error(s(407));i=i()}else{if(i=t(),xe===null)throw Error(s(349));(pe&127)!==0||Oc(o,t,i)}c.memoizedState=i;var d={value:i,getSnapshot:t};return c.queue=d,Wc(Hc.bind(null,o,d,e),[e]),o.flags|=2048,Ui(9,{destroy:void 0},Gc.bind(null,o,d,i,t),null),i},useId:function(){var e=lt(),t=xe.identifierPrefix;if(ge){var i=Pt,o=zt;i=(o&~(1<<32-ht(o)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Do++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Ng++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Hs,useFormState:Kc,useActionState:Kc,useOptimistic:function(e){var t=lt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Vs.bind(null,re,!0,i),i.dispatch=t,[e,t]},useMemoCache:Ds,useCacheRefresh:function(){return lt().memoizedState=bg.bind(null,re)},useEffectEvent:function(e){var t=lt(),i={impl:e};return t.memoizedState=i,function(){if((Ee&2)!==0)throw Error(s(440));return i.impl.apply(void 0,arguments)}}},zs={readContext:We,use:xo,useCallback:of,useContext:We,useEffect:ws,useImperativeHandle:lf,useInsertionEffect:ef,useLayoutEffect:tf,useMemo:af,useReducer:bo,useRef:$c,useState:function(){return bo(jt)},useDebugValue:qs,useDeferredValue:function(e,t){var i=Pe();return sf(i,Me.memoizedState,e,t)},useTransition:function(){var e=bo(jt)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:El(e),t]},useSyncExternalStore:qc,useId:ff,useHostTransitionStatus:Hs,useFormState:Xc,useActionState:Xc,useOptimistic:function(e,t){var i=Pe();return Pc(i,Me,e,t)},useMemoCache:Ds,useCacheRefresh:df};zs.useEffectEvent=jc;var yf={readContext:We,use:xo,useCallback:of,useContext:We,useEffect:ws,useImperativeHandle:lf,useInsertionEffect:ef,useLayoutEffect:tf,useMemo:af,useReducer:xs,useRef:$c,useState:function(){return xs(jt)},useDebugValue:qs,useDeferredValue:function(e,t){var i=Pe();return Me===null?Os(i,e,t):sf(i,Me.memoizedState,e,t)},useTransition:function(){var e=xs(jt)[0],t=Pe().memoizedState;return[typeof e=="boolean"?e:El(e),t]},useSyncExternalStore:qc,useId:ff,useHostTransitionStatus:Hs,useFormState:Zc,useActionState:Zc,useOptimistic:function(e,t){var i=Pe();
vendor: 6,415 bytes, line 48
48return Me!==null?Pc(i,Me,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Ds,useCacheRefresh:df};yf.useEffectEvent=jc;function Ps(e,t,i,o){t=e.memoizedState,i=i(o,t),i=i==null?t:S({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Bs={enqueueSetState:function(e,t,i){e=e._reactInternals;var o=_t(),c=vn(o);c.payload=t,i!=null&&(c.callback=i),t=Sn(e,c,o),t!==null&&(ft(t,e,o),yl(t,e,o))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var o=_t(),c=vn(o);c.tag=1,c.payload=t,i!=null&&(c.callback=i),t=Sn(e,c,o),t!==null&&(ft(t,e,o),yl(t,e,o))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=_t(),o=vn(i);o.tag=2,t!=null&&(o.callback=t),t=Sn(e,o,i),t!==null&&(ft(t,e,i),yl(t,e,i))}};function Tf(e,t,i,o,c,d,T){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,T):t.prototype&&t.prototype.isPureReactComponent?!rl(i,o)||!rl(c,d):!0}function vf(e,t,i,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,o),t.state!==e&&Bs.enqueueReplaceState(t,t.state,null)}function jn(e,t){var i=t;if("ref"in t){i={};for(var o in t)o!=="ref"&&(i[o]=t[o])}if(e=e.defaultProps){i===t&&(i=S({},i));for(var c in e)i[c]===void 0&&(i[c]=e[c])}return i}function Sf(e){mo(e)}function Ef(e){console.error(e)}function _f(e){mo(e)}function Oo(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(o){setTimeout(function(){throw o})}}function Cf(e,t,i){try{var o=e.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Ys(e,t,i){return i=vn(i),i.tag=3,i.payload={element:null},i.callback=function(){Oo(e,t)},i}function Af(e){return e=vn(e),e.tag=3,e}function Rf(e,t,i,o){var c=i.type.getDerivedStateFromError;if(typeof c=="function"){var d=o.value;e.payload=function(){return c(d)},e.callback=function(){Cf(t,i,o)}}var T=i.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(e.callback=function(){Cf(t,i,o),typeof c!="function"&&(Nn===null?Nn=new Set([this]):Nn.add(this));var E=o.stack;this.componentDidCatch(o.value,{componentStack:E!==null?E:""})})}function wg(e,t,i,o,c){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(t=i.alternate,t!==null&&_i(t,i,c,!0),i=Tt.current,i!==null){switch(i.tag){case 31:case 13:return Ut===null?Xo():i.alternate===null&&He===0&&(He=3),i.flags&=-257,i.flags|=65536,i.lanes=c,o===Co?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([o]):t.add(o),pu(e,o,c)),!1;case 22:return i.flags|=65536,o===Co?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([o]):i.add(o)),pu(e,o,c)),!1}throw Error(s(435,i.tag))}return pu(e,o,c),Xo(),!1}if(ge)return t=Tt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,o!==us&&(e=Error(s(422),{cause:o}),dl(Nt(e,i)))):(o!==us&&(t=Error(s(423),{cause:o}),dl(Nt(t,i))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,o=Nt(o,i),c=Ys(e.stateNode,o,c),vs(e,c),He!==4&&(He=2)),!1;var d=Error(s(520),{cause:o});if(d=Nt(d,i),xl===null?xl=[d]:xl.push(d),He!==4&&(He=2),t===null)return!0;o=Nt(o,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=c&-c,i.lanes|=e,e=Ys(i.stateNode,o,e),vs(i,e),!1;case 1:if(t=i.type,d=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Nn===null||!Nn.has(d))))return i.flags|=65536,c&=-c,i.lanes|=c,c=Af(c),Rf(c,e,i,o),vs(i,c),!1}i=i.return}while(i!==null);return!1}var Js=Error(s(461)),Je=!1;function je(e,t,i,o){t.child=e===null?Ic(t,null,i,o):$n(t,e.child,i,o)}function Nf(e,t,i,o,c){i=i.render;var d=t.ref;if("ref"in o){var T={};for(var E in o)E!=="ref"&&(T[E]=o[E])}else T=o;return Kn(t),o=Rs(e,t,i,T,d,c),E=Ns(),e!==null&&!Je?(Ms(e,t,c),en(e,t,c)):(ge&&E&&as(t),t.flags|=1,je(e,t,o,c),t.child)}function Mf(e,t,i,o,c){if(e===null){var d=i.type;return typeof d=="function"&&!is(d)&&d.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=d,If(e,t,d,o,c)):(e=yo(i.type,null,o,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Ws(e,c)){var T=d.memoizedProps;if(i=i.compare,i=i!==null?i:rl,i(T,o)&&e.ref===t.ref)return en(e,t,c)}return t.flags|=1,e=Xt(d,o),e.ref=t.ref,e.return=t,t.child=e}function If(e,t,i,o,c){if(e!==null){var d=e.memoizedProps;if(rl(d,o)&&e.ref===t.ref)if(Je=!1,t.pendingProps=o=d,Ws(e,c))(e.flags&131072)!==0&&(Je=!0);else return t.lanes=e.lanes,en(e,t,c)}return ks(e,t,i,o,c)}function Df(e,t,i,o){var c=o.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|i:i,e!==null){for(o=t.child=e.child,c=0;o!==null;)c=c|o.lanes|o.childLanes,o=o.sibling;o=c&~d}else o=0,t.child=null;return Uf(e,t,d,i,o)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Eo(t,d!==null?d.cachePool:null),d!==null?xc(t,d):Es(),bc(t);else return o=t.lanes=536870912,Uf(e,t,d!==null?d.baseLanes|i:i,i,o)}else d!==null?(Eo(t,d.cachePool),xc(t,d),_n(),t.memoizedState=null):(e!==null&&Eo(t,null),Es(),_n());return je(e,t,c,i),t.child}function Al(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Uf(e,t,i,o,c){var d=hs();return d=d===null?null:{parent:Be._currentValue,pool:d},t.memoizedState={baseLanes:i,cachePool:d},e!==null&&Eo(t,null),Es(),bc(t),e!==null&&_i(e,t,o,!0),t.childLanes=c,null}function Go(e,t){return t=Vo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function xf(e,t,i){return $n(t,e.child,null,i),e=Go(t,t.pendingProps),e.flags|=2,vt(t),t.memoizedState=null,e}function qg(e,t,i){var o=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ge){if(o.mode==="hidden")return e=Go(t,o),t.lanes=536870912,Al(null,e);if(Cs(t),(e=be)?(e=Yd(e,Dt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pn!==null?{id:zt,overflow:Pt}:null,retryLane:536870912,hydrationErrors:null},i=mc(e),i.return=t,t.child=i,$e=t,be=null)):e=null,e===null)throw g
vendor: 5,279 bytes, line 48
48n(t);return t.lanes=536870912,null}return Go(t,o)}var d=e.memoizedState;if(d!==null){var T=d.dehydrated;if(Cs(t),c)if(t.flags&256)t.flags&=-257,t=xf(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(Je||_i(e,t,i,!1),c=(i&e.childLanes)!==0,Je||c){if(o=xe,o!==null&&(T=Sr(o,i),T!==0&&T!==d.retryLane))throw d.retryLane=T,Yn(e,T),ft(o,e,T),Js;Xo(),t=xf(e,t,i)}else e=d.treeContext,be=xt(T.nextSibling),$e=t,ge=!0,hn=null,Dt=!1,e!==null&&gc(t,e),t=Go(t,o),t.flags|=4096;return t}return e=Xt(e.child,{mode:o.mode,children:o.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ho(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(s(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function ks(e,t,i,o,c){return Kn(t),i=Rs(e,t,i,o,void 0,c),o=Ns(),e!==null&&!Je?(Ms(e,t,c),en(e,t,c)):(ge&&o&&as(t),t.flags|=1,je(e,t,i,c),t.child)}function bf(e,t,i,o,c,d){return Kn(t),t.updateQueue=null,i=wc(t,o,i,c),Lc(e),o=Ns(),e!==null&&!Je?(Ms(e,t,d),en(e,t,d)):(ge&&o&&as(t),t.flags|=1,je(e,t,i,d),t.child)}function Lf(e,t,i,o,c){if(Kn(t),t.stateNode===null){var d=Ti,T=i.contextType;typeof T=="object"&&T!==null&&(d=We(T)),d=new i(o,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Bs,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=o,d.state=t.memoizedState,d.refs={},ys(t),T=i.contextType,d.context=typeof T=="object"&&T!==null?We(T):Ti,d.state=t.memoizedState,T=i.getDerivedStateFromProps,typeof T=="function"&&(Ps(t,i,T,o),d.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(T=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),T!==d.state&&Bs.enqueueReplaceState(d,d.state,null),vl(t,o,d,c),Tl(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!0}else if(e===null){d=t.stateNode;var E=t.memoizedProps,C=jn(i,E);d.props=C;var D=d.context,L=i.contextType;T=Ti,typeof L=="object"&&L!==null&&(T=We(L));var O=i.getDerivedStateFromProps;L=typeof O=="function"||typeof d.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,L||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E||D!==T)&&vf(t,d,o,T),Tn=!1;var U=t.memoizedState;d.state=U,vl(t,o,d,c),Tl(),D=t.memoizedState,E||U!==D||Tn?(typeof O=="function"&&(Ps(t,i,O,o),D=t.memoizedState),(C=Tn||Tf(t,i,C,o,U,D,T))?(L||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=D),d.props=o,d.state=D,d.context=T,o=C):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{d=t.stateNode,Ts(e,t),T=t.memoizedProps,L=jn(i,T),d.props=L,O=t.pendingProps,U=d.context,D=i.contextType,C=Ti,typeof D=="object"&&D!==null&&(C=We(D)),E=i.getDerivedStateFromProps,(D=typeof E=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(T!==O||U!==C)&&vf(t,d,o,C),Tn=!1,U=t.memoizedState,d.state=U,vl(t,o,d,c),Tl();var b=t.memoizedState;T!==O||U!==b||Tn||e!==null&&e.dependencies!==null&&vo(e.dependencies)?(typeof E=="function"&&(Ps(t,i,E,o),b=t.memoizedState),(L=Tn||Tf(t,i,L,o,U,b,C)||e!==null&&e.dependencies!==null&&vo(e.dependencies))?(D||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,b,C),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,b,C)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||T===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=b),d.props=o,d.state=b,d.context=C,o=L):(typeof d.componentDidUpdate!="function"||T===e.memoizedProps&&U===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||T===e.memoizedProps&&U===e.memoizedState||(t.flags|=1024),o=!1)}return d=o,Ho(e,t),o=(t.flags&128)!==0,d||o?(d=t.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&o?(t.child=$n(t,e.child,null,c),t.child=$n(t,null,i,c)):je(e,t,i,c),t.memoizedState=d.state,e=t.child):e=en(e,t,c),e}function wf(e,t,i,o){return kn(),t.flags|=256,je(e,t,i,o),t.child}var Fs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ks(e){return{baseLanes:e,cachePool:_c()}}function Xs(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Et),e}function qf(e,t,i){var o=t.pendingProps,c=!1,d=(t.flags&128)!==0,T;
vendor: 11,826 bytes, line 48
48if((T=d)||(T=e!==null&&e.memoizedState===null?!1:(ze.current&2)!==0),T&&(c=!0,t.flags&=-129),T=(t.flags&32)!==0,t.flags&=-33,e===null){if(ge){if(c?En(t):_n(),(e=be)?(e=Yd(e,Dt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:pn!==null?{id:zt,overflow:Pt}:null,retryLane:536870912,hydrationErrors:null},i=mc(e),i.return=t,t.child=i,$e=t,be=null)):e=null,e===null)throw gn(t);return Uu(e)?t.lanes=32:t.lanes=536870912,null}var E=o.children;return o=o.fallback,c?(_n(),c=t.mode,E=Vo({mode:"hidden",children:E},c),o=Jn(o,c,i,null),E.return=t,o.return=t,E.sibling=o,t.child=E,o=t.child,o.memoizedState=Ks(i),o.childLanes=Xs(e,T,i),t.memoizedState=Fs,Al(null,o)):(En(t),Qs(t,E))}var C=e.memoizedState;if(C!==null&&(E=C.dehydrated,E!==null)){if(d)t.flags&256?(En(t),t.flags&=-257,t=Zs(e,t,i)):t.memoizedState!==null?(_n(),t.child=e.child,t.flags|=128,t=null):(_n(),E=o.fallback,c=t.mode,o=Vo({mode:"visible",children:o.children},c),E=Jn(E,c,i,null),E.flags|=2,o.return=t,E.return=t,o.sibling=E,t.child=o,$n(t,e.child,null,i),o=t.child,o.memoizedState=Ks(i),o.childLanes=Xs(e,T,i),t.memoizedState=Fs,t=Al(null,o));else if(En(t),Uu(E)){if(T=E.nextSibling&&E.nextSibling.dataset,T)var D=T.dgst;T=D,o=Error(s(419)),o.stack="",o.digest=T,dl({value:o,source:null,stack:null}),t=Zs(e,t,i)}else if(Je||_i(e,t,i,!1),T=(i&e.childLanes)!==0,Je||T){if(T=xe,T!==null&&(o=Sr(T,i),o!==0&&o!==C.retryLane))throw C.retryLane=o,Yn(e,o),ft(T,e,o),Js;Du(E)||Xo(),t=Zs(e,t,i)}else Du(E)?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,be=xt(E.nextSibling),$e=t,ge=!0,hn=null,Dt=!1,e!==null&&gc(t,e),t=Qs(t,o.children),t.flags|=4096);return t}return c?(_n(),E=o.fallback,c=t.mode,C=e.child,D=C.sibling,o=Xt(C,{mode:"hidden",children:o.children}),o.subtreeFlags=C.subtreeFlags&65011712,D!==null?E=Xt(D,E):(E=Jn(E,c,i,null),E.flags|=2),E.return=t,o.return=t,o.sibling=E,t.child=o,Al(null,o),o=t.child,E=e.child.memoizedState,E===null?E=Ks(i):(c=E.cachePool,c!==null?(C=Be._currentValue,c=c.parent!==C?{parent:C,pool:C}:c):c=_c(),E={baseLanes:E.baseLanes|i,cachePool:c}),o.memoizedState=E,o.childLanes=Xs(e,T,i),t.memoizedState=Fs,Al(e.child,o)):(En(t),i=e.child,e=i.sibling,i=Xt(i,{mode:"visible",children:o.children}),i.return=t,i.sibling=null,e!==null&&(T=t.deletions,T===null?(t.deletions=[e],t.flags|=16):T.push(e)),t.child=i,t.memoizedState=null,i)}function Qs(e,t){return t=Vo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Vo(e,t){return e=yt(22,e,null,t),e.lanes=0,e}function Zs(e,t,i){return $n(t,e.child,null,i),e=Qs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Of(e,t,i){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),fs(e.return,t,i)}function $s(e,t,i,o,c,d){var T=e.memoizedState;T===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:c,treeForkCount:d}:(T.isBackwards=t,T.rendering=null,T.renderingStartTime=0,T.last=o,T.tail=i,T.tailMode=c,T.treeForkCount=d)}function Gf(e,t,i){var o=t.pendingProps,c=o.revealOrder,d=o.tail;o=o.children;var T=ze.current,E=(T&2)!==0;if(E?(T=T&1|2,t.flags|=128):T&=1,Y(ze,T),je(e,t,o,i),o=ge?fl:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Of(e,i,t);else if(e.tag===19)Of(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(i=t.child,c=null;i!==null;)e=i.alternate,e!==null&&Mo(e)===null&&(c=i),i=i.sibling;i=c,i===null?(c=t.child,t.child=null):(c=i.sibling,i.sibling=null),$s(t,!1,c,i,d,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&Mo(e)===null){t.child=c;break}e=c.sibling,c.sibling=i,i=c,c=e}$s(t,!0,i,null,d,o);break;case"together":$s(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function en(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Rn|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(_i(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,i=Xt(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Xt(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ws(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&vo(e)))}function Og(e,t,i){switch(t.tag){case 3:it(t,t.stateNode.containerInfo),yn(t,Be,e.memoizedState.cache),kn();break;case 27:case 5:Zi(t);break;case 4:it(t,t.stateNode.containerInfo);break;case 10:yn(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Cs(t),null;break;case 13:var o=t.memoizedState;if(o!==null)return o.dehydrated!==null?(En(t),t.flags|=128,null):(i&t.child.childLanes)!==0?qf(e,t,i):(En(t),e=en(e,t,i),e!==null?e.sibling:null);En(t);break;case 19:var c=(e.flags&128)!==0;if(o=(i&t.childLanes)!==0,o||(_i(e,t,i,!1),o=(i&t.childLanes)!==0),c){if(o)return Gf(e,t,i);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Y(ze,ze.current),o)break;return null;case 22:return t.lanes=0,Df(e,t,i,t.pendingProps);case 24:yn(t,Be,e.memoizedState.cache)}return en(e,t,i)}function Hf(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Je=!0;else{if(!Ws(e,i)&&(t.flags&128)===0)return Je=!1,Og(e,t,i);Je=(e.flags&131072)!==0}else Je=!1,ge&&(t.flags&1048576)!==0&&hc(t,fl,t.index);switch(t.lanes=0,t.tag){case 16:e:{var o=t.pendingProps;if(e=Qn(t.elementType),t.type=e,typeof e=="function")is(e)?(o=jn(e,o),t.tag=1,t=Lf(null,t,e,o,i)):(t.tag=0,t=ks(null,t,e,o,i));else{if(e!=null){var c=e.$$typeof;if(c===j){t.tag=11,t=Nf(null,t,e,o,i);break e}else if(c===F){t.tag=14,t=Mf(null,t,e,o,i);break e}}throw t=dt(e)||e,Error(s(306,t,""))}}return t;case 0:return ks(e,t,t.type,t.pendingProps,i);case 1:return o=t.type,c=jn(o,t.pendingProps),Lf(e,t,o,c,i);case 3:e:{if(it(t,t.stateNode.containerInfo),e===null)throw Error(s(387));o=t.pendingProps;var d=t.memoizedState;c=d.element,Ts(e,t),vl(t,o,null,i);var T=t.memoizedState;if(o=T.cache,yn(t,Be,o),o!==d.cache&&ds(t,[Be],i,!0),Tl(),o=T.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:T.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=wf(e,t,o,i);break e}else if(o!==c){c=Nt(Error(s(424)),t),dl(c),t=wf(e,t,o,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(be=xt(e.firstChild),$e=t,ge=!0,hn=null,Dt=!0,i=Ic(t,null,o,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(kn(),o===c){t=en(e,t,i);break e}je(e,t,o,i)}t=t.child}return t;case 26:return Ho(e,t),e===null?(i=Qd(t.type,null,t.pendingProps,null))?t.memoizedState=i:ge||(i=t.type,e=t.pendingProps,o=ta(fe.current).createElement(i),o[Ze]=t,o[ot]=e,et(o,i,e),Ke(o),t.stateNode=o):t.memoizedState=Qd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Zi(t),e===null&&ge&&(o=t.stateNode=Fd(t.type,t.pendingProps,fe.current),$e=t,Dt=!0,c=be,Un(t.type)?(xu=c,be=xt(o.firstChild)):be=c),je(e,t,t.pendingProps.children,i),Ho(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ge&&((c=o=be)&&(o=dy(o,t.type,t.pendingProps,Dt),o!==null?(t.stateNode=o,$e=t,be=xt(o.firstChild),Dt=!1,c=!0):c=!1),c||gn(t)),Zi(t),c=t.type,d=t.pendingProps,T=e!==null?e.memoizedProps:null,o=d.children,Nu(c,d)?o=null:T!==null&&Nu(c,T)&&(t.flags|=32),t.memoizedState!==null&&(c=Rs(e,t,Mg,null,null,i),Vl._currentValue=c),Ho(e,t),je(e,t,o,i),t.child;case 6:return e===null&&ge&&((e=i=be)&&(i=my(i,t.pendingProps,Dt),i!==null?(t.stateNode=i,$e=t,be=null,e=!0):e=!1),e||gn(t)),null;case 13:return qf(e,t,i);case 4:return it(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=$n(t,null,o,i):je(e,t,o,i),t.child;case 11:return Nf(e,t,t.type,t.pendingProps,i);case 7:return je(e,t,t.pendingProps,i),t.child;case 8:return je(e,t,t.pendingProps.children,i),t.child;case 12:return je(e,t,t.pendingProps.children,i),t.child;case 10:return o=t.pendingProps,yn(t,t.type,o.value),je(e,t,o.children,i),t.child;case 9:return c=t.type._context,o=t.pendingProps.children,Kn(t),c=We(c),o=o(c),t.flags|=1,je(e,t,o,i),t.child;case 14:return Mf(e,t,t.type,t.pendingProps,i);case 15:return If(e,t,t.type,t.pendingProps,i);case 19:return Gf(e,t,i);case 31:return qg(e,t,i);case 22:return Df(e,t,i,t.pendingProps);case 24:return Kn(t),o=We(Be),e===null?(c=hs(),c===null&&(c=xe,d=ms(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=i),c=d),t.memoizedState={parent:o,cache:c},ys(t),yn(t,Be,c)):((e.lanes&i)!==0&&(Ts(e,t),vl(t,null,null,i),Tl()),c=e.memoizedState,d=t.memoizedState,c.parent!==o?(c={parent:o,cache:o},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),yn(t,Be,o)):(o=d.cache,yn(t,Be,o),o!==c.cache&&ds(t,[Be],i,!0))),je(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function tn(e){e.flags|=4}function js(e,t,i,o,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(fd())e.flags|=8192;else throw Zn=Co,gs}else e.flags&=-16777217}function Vf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!em(t))if(fd())e.flags|=8192;else throw Zn=Co,gs}function zo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?yr():536870912,e.lanes|=t,wi|=t)}function Rl(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Le(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,o=0;if(t)for(var c=e.child;c!==null;)i|=c.lanes|c.childLanes,o|=c.subtreeFlags&65011712,o|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)i|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=i,t}function Gg(e,t,i){var o=t.pendingProps;switch(ss(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Le(t),null;case 1:return Le(t),null;case 3:return i=t.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),t.memoizedState.cache!==o&&(t.flags|=2048),$t(Be),Ve(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ei(t)?tn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,rs())),Le(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(tn(t),d!==null?(Le(t),Vf(t,d)):(Le(t),js(t,c,null,o,i))):d?d!==e.memoizedState?(tn(t),Le(t),Vf(t,d)):(Le(t),t.flags&=-16777217):(e=e.memoizedProps,e!==o&&tn(t),Le(t),js(t,c,e,o,i)),null;case 27:if(Zl(t),i=fe.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&tn(t);else{if(!o){if(t.stateNode===null)throw Error(s(166));return Le(t),null}e=$.current,Ei(t)?yc(t):(e=Fd(c,o,i),t.stateNode=e,tn(t))}return Le(t),null;case 5:if(Zl(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==o&&tn(t);else{if(!o){if(t.stateNode===null)throw Error(s(166));return Le(t),null}if(d=$.current,Ei(t))yc(t);else{var T=ta(fe.current);switch(d){case 1:d=T.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=T.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=T.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=T.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=T.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;
vendor: 24,682 bytes, line 48
48case"select":d=typeof o.is=="string"?T.createElement("select",{is:o.is}):T.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?T.createElement(c,{is:o.is}):T.createElement(c)}}d[Ze]=t,d[ot]=o;e:for(T=t.child;T!==null;){if(T.tag===5||T.tag===6)d.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===t)break e;for(;T.sibling===null;){if(T.return===null||T.return===t)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}t.stateNode=d;e:switch(et(d,c,o),c){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&tn(t)}}return Le(t),js(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==o&&tn(t);else{if(typeof o!="string"&&t.stateNode===null)throw Error(s(166));if(e=fe.current,Ei(t)){if(e=t.stateNode,i=t.memoizedProps,o=null,c=$e,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}e[Ze]=t,e=!!(e.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||qd(e.nodeValue,i)),e||gn(t,!0)}else e=ta(e).createTextNode(o),e[Ze]=t,t.stateNode=e}return Le(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(o=Ei(t),i!==null){if(e===null){if(!o)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[Ze]=t}else kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),e=!1}else i=rs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(vt(t),t):(vt(t),null);if((t.flags&128)!==0)throw Error(s(558))}return Le(t),null;case 13:if(o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Ei(t),o!==null&&o.dehydrated!==null){if(e===null){if(!c)throw Error(s(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(s(317));c[Ze]=t}else kn(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Le(t),c=!1}else c=rs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(vt(t),t):(vt(t),null)}return vt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=o!==null,e=e!==null&&e.memoizedState!==null,i&&(o=t.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==c&&(o.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),zo(t,t.updateQueue),Le(t),null);case 4:return Ve(),e===null&&Eu(t.stateNode.containerInfo),Le(t),null;case 10:return $t(t.type),Le(t),null;case 19:if(G(ze),o=t.memoizedState,o===null)return Le(t),null;if(c=(t.flags&128)!==0,d=o.rendering,d===null)if(c)Rl(o,!1);else{if(He!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Mo(e),d!==null){for(t.flags|=128,Rl(o,!1),e=d.updateQueue,t.updateQueue=e,zo(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)dc(i,e),i=i.sibling;return Y(ze,ze.current&1|2),ge&&Qt(t,o.treeForkCount),t.child}e=e.sibling}o.tail!==null&&mt()>ko&&(t.flags|=128,c=!0,Rl(o,!1),t.lanes=4194304)}else{if(!c)if(e=Mo(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,zo(t,e),Rl(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!ge)return Le(t),null}else 2*mt()-o.renderingStartTime>ko&&i!==536870912&&(t.flags|=128,c=!0,Rl(o,!1),t.lanes=4194304);o.isBackwards?(d.sibling=t.child,t.child=d):(e=o.last,e!==null?e.sibling=d:t.child=d,o.last=d)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=mt(),e.sibling=null,i=ze.current,Y(ze,c?i&1|2:i&1),ge&&Qt(t,o.treeForkCount),e):(Le(t),null);case 22:case 23:return vt(t),_s(),o=t.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(t.flags|=8192):o&&(t.flags|=8192),o?(i&536870912)!==0&&(t.flags&128)===0&&(Le(t),t.subtreeFlags&6&&(t.flags|=8192)):Le(t),i=t.updateQueue,i!==null&&zo(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),o=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(o=t.memoizedState.cachePool.pool),o!==i&&(t.flags|=2048),e!==null&&G(Xn),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),$t(Be),Le(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function Hg(e,t){switch(ss(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $t(Be),Ve(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Zl(t),null;case 31:if(t.memoizedState!==null){if(vt(t),t.alternate===null)throw Error(s(340));kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));kn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return G(ze),null;case 4:return Ve(),null;case 10:return $t(t.type),null;case 22:case 23:return vt(t),_s(),e!==null&&G(Xn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $t(Be),null;case 25:return null;default:return null}}function zf(e,t){switch(ss(t),t.tag){case 3:$t(Be),Ve();break;case 26:case 27:case 5:Zl(t);break;case 4:Ve();break;case 31:t.memoizedState!==null&&vt(t);break;case 13:vt(t);break;case 19:G(ze);break;case 10:$t(t.type);break;case 22:case 23:vt(t),_s(),e!==null&&G(Xn);break;case 24:$t(Be)}}function Nl(e,t){try{var i=t.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var c=o.next;i=c;do{if((i.tag&e)===e){o=void 0;var d=i.create,T=i.inst;o=d(),T.destroy=o}i=i.next}while(i!==c)}}catch(E){Ne(t,t.return,E)}}function Cn(e,t,i){try{var o=t.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var d=c.next;o=d;do{if((o.tag&e)===e){var T=o.inst,E=T.destroy;if(E!==void 0){T.destroy=void 0,c=t;var C=i,D=E;try{D()}catch(L){Ne(c,C,L)}}}o=o.next}while(o!==d)}}catch(L){Ne(t,t.return,L)}}function Pf(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Uc(t,i)}catch(o){Ne(e,e.return,o)}}}function Bf(e,t,i){i.props=jn(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(o){Ne(e,t,o)}}function Ml(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof i=="function"?e.refCleanup=i(o):i.current=o}}catch(c){Ne(e,t,c)}}function Bt(e,t){var i=e.ref,o=e.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(c){Ne(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(c){Ne(e,t,c)}else i.current=null}function Yf(e){var t=e.type,i=e.memoizedProps,o=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(c){Ne(e,e.return,c)}}function eu(e,t,i){try{var o=e.stateNode;ay(o,e.type,i,t),o[ot]=t}catch(c){Ne(e,e.return,c)}}function Jf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Un(e.type)||e.tag===4}function tu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Jf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Un(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nu(e,t,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Ft));else if(o!==4&&(o===27&&Un(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(nu(e,t,i),e=e.sibling;e!==null;)nu(e,t,i),e=e.sibling}function Po(e,t,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(o!==4&&(o===27&&Un(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Po(e,t,i),e=e.sibling;e!==null;)Po(e,t,i),e=e.sibling}function kf(e){var t=e.stateNode,i=e.memoizedProps;try{for(var o=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);et(t,o,i),t[Ze]=e,t[ot]=i}catch(d){Ne(e,e.return,d)}}var nn=!1,ke=!1,iu=!1,Ff=typeof WeakSet=="function"?WeakSet:Set,Xe=null;function Vg(e,t){if(e=e.containerInfo,Au=ua,e=ic(e),Za(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var c=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{i.nodeType,d.nodeType}catch{i=null;break e}var T=0,E=-1,C=-1,D=0,L=0,O=e,U=null;t:for(;;){for(var b;O!==i||c!==0&&O.nodeType!==3||(E=T+c),O!==d||o!==0&&O.nodeType!==3||(C=T+o),O.nodeType===3&&(T+=O.nodeValue.length),(b=O.firstChild)!==null;)U=O,O=b;for(;;){if(O===e)break t;if(U===i&&++D===c&&(E=T),U===d&&++L===o&&(C=T),(b=O.nextSibling)!==null)break;O=U,U=O.parentNode}O=b}i=E===-1||C===-1?null:{start:E,end:C}}else i=null}i=i||{start:0,end:0}}else i=null;for(Ru={focusedElem:e,selectionRange:i},ua=!1,Xe=t;Xe!==null;)if(t=Xe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Xe=e;else for(;Xe!==null;){switch(t=Xe,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)c=e[i],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,i=t,c=d.memoizedProps,d=d.memoizedState,o=i.stateNode;try{var Q=jn(i.type,c);e=o.getSnapshotBeforeUpdate(Q,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(le){Ne(i,i.return,le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)Iu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Iu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Xe=e;break}Xe=t.return}}function Kf(e,t,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:on(e,i),o&4&&Nl(5,i);break;case 1:if(on(e,i),o&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(T){Ne(i,i.return,T)}else{var c=jn(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(T){Ne(i,i.return,T)}}o&64&&Pf(i),o&512&&Ml(i,i.return);break;case 3:if(on(e,i),o&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Uc(e,t)}catch(T){Ne(i,i.return,T)}}break;case 27:t===null&&o&4&&kf(i);case 26:case 5:on(e,i),t===null&&o&4&&Yf(i),o&512&&Ml(i,i.return);break;case 12:on(e,i);break;case 31:on(e,i),o&4&&Zf(e,i);break;case 13:on(e,i),o&4&&$f(e,i),o&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Xg.bind(null,i),py(e,i))));break;case 22:if(o=i.memoizedState!==null||nn,!o){t=t!==null&&t.memoizedState!==null||ke,c=nn;var d=ke;nn=o,(ke=t)&&!d?an(e,i,(i.subtreeFlags&8772)!==0):on(e,i),nn=c,ke=d}break;case 30:break;default:on(e,i)}}function Xf(e){var t=e.alternate;t!==null&&(e.alternate=null,Xf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&La(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var qe=null,st=!1;function ln(e,t,i){for(i=i.child;i!==null;)Qf(e,t,i),i=i.sibling}function Qf(e,t,i){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount($i,i)}catch{}switch(i.tag){case 26:ke||Bt(i,t),ln(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ke||Bt(i,t);var o=qe,c=st;Un(i.type)&&(qe=i.stateNode,st=!1),ln(e,t,i),Ol(i.stateNode),qe=o,st=c;break;case 5:ke||Bt(i,t);case 6:if(o=qe,c=st,qe=null,ln(e,t,i),qe=o,st=c,qe!==null)if(st)try{(qe.nodeType===9?qe.body:qe.nodeName==="HTML"?qe.ownerDocument.body:qe).removeChild(i.stateNode)}catch(d){Ne(i,t,d)}else try{qe.removeChild(i.stateNode)}catch(d){Ne(i,t,d)}break;case 18:qe!==null&&(st?(e=qe,Pd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Bi(e)):Pd(qe,i.stateNode));break;case 4:o=qe,c=st,qe=i.stateNode.containerInfo,st=!0,ln(e,t,i),qe=o,st=c;break;case 0:case 11:case 14:case 15:Cn(2,i,t),ke||Cn(4,i,t),ln(e,t,i);break;case 1:ke||(Bt(i,t),o=i.stateNode,typeof o.componentWillUnmount=="function"&&Bf(i,t,o)),ln(e,t,i);break;case 21:ln(e,t,i);break;case 22:ke=(o=ke)||i.memoizedState!==null,ln(e,t,i),ke=o;break;default:ln(e,t,i)}}function Zf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Bi(e)}catch(i){Ne(t,t.return,i)}}}function $f(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Bi(e)}catch(i){Ne(t,t.return,i)}}function zg(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ff),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ff),t;default:throw Error(s(435,e.tag))}}function Bo(e,t){var i=zg(e);t.forEach(function(o){if(!i.has(o)){i.add(o);var c=Qg.bind(null,e,o);o.then(c,c)}})}function ut(e,t){var i=t.deletions;if(i!==null)for(var o=0;o<i.length;o++){var c=i[o],d=e,T=t,E=T;e:for(;E!==null;){switch(E.tag){case 27:if(Un(E.type)){qe=E.stateNode,st=!1;break e}break;case 5:qe=E.stateNode,st=!1;break e;case 3:case 4:qe=E.stateNode.containerInfo,st=!0;break e}E=E.return}if(qe===null)throw Error(s(160));Qf(d,T,c),qe=null,st=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Wf(t,e),t=t.sibling}var Ot=null;function Wf(e,t){var i=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ut(t,e),rt(e),o&4&&(Cn(3,e,e.return),Nl(3,e),Cn(5,e,e.return));break;case 1:ut(t,e),rt(e),o&512&&(ke||i===null||Bt(i,i.return)),o&64&&nn&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var c=Ot;if(ut(t,e),rt(e),o&512&&(ke||i===null||Bt(i,i.return)),o&4){var d=i!==null?i.memoizedState:null;if(o=e.memoizedState,i===null)if(o===null)if(e.stateNode===null){e:{o=e.type,i=e.memoizedProps,c=c.ownerDocument||c;t:switch(o){case"title":d=c.getElementsByTagName("title")[0],(!d||d[el]||d[Ze]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(o),c.head.insertBefore(d,c.querySelector("head > title"))),et(d,o,i),d[Ze]=e,Ke(d),o=d;break e;case"link":var T=Wd("link","href",c).get(o+(i.href||""));if(T){for(var E=0;E<T.length;E++)if(d=T[E],d.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&d.getAttribute("rel")===(i.rel==null?null:i.rel)&&d.getAttribute("title")===(i.title==null?null:i.title)&&d.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){T.splice(E,1);break t}}d=c.createElement(o),et(d,o,i),c.head.appendChild(d);break;case"meta":if(T=Wd("meta","content",c).get(o+(i.content||""))){for(E=0;E<T.length;E++)if(d=T[E],d.getAttribute("content")===(i.content==null?null:""+i.content)&&d.getAttribute("name")===(i.name==null?null:i.name)&&d.getAttribute("property")===(i.property==null?null:i.property)&&d.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&d.getAttribute("charset")===(i.charSet==null?null:i.charSet)){T.splice(E,1);break t}}d=c.createElement(o),et(d,o,i),c.head.appendChild(d);break;default:throw Error(s(468,o))}d[Ze]=e,Ke(d),o=d}e.stateNode=o}else jd(c,e.type,e.stateNode);else e.stateNode=$d(c,o,e.memoizedProps);else d!==o?(d===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):d.count--,o===null?jd(c,e.type,e.stateNode):$d(c,o,e.memoizedProps)):o===null&&e.stateNode!==null&&eu(e,e.memoizedProps,i.memoizedProps)}break;case 27:ut(t,e),rt(e),o&512&&(ke||i===null||Bt(i,i.return)),i!==null&&o&4&&eu(e,e.memoizedProps,i.memoizedProps);break;case 5:if(ut(t,e),rt(e),o&512&&(ke||i===null||Bt(i,i.return)),e.flags&32){c=e.stateNode;try{fi(c,"")}catch(Q){Ne(e,e.return,Q)}}o&4&&e.stateNode!=null&&(c=e.memoizedProps,eu(e,c,i!==null?i.memoizedProps:c)),o&1024&&(iu=!0);break;case 6:if(ut(t,e),rt(e),o&4){if(e.stateNode===null)throw Error(s(162));o=e.memoizedProps,i=e.stateNode;try{i.nodeValue=o}catch(Q){Ne(e,e.return,Q)}}break;case 3:if(la=null,c=Ot,Ot=na(t.containerInfo),ut(t,e),Ot=c,rt(e),o&4&&i!==null&&i.memoizedState.isDehydrated)try{Bi(t.containerInfo)}catch(Q){Ne(e,e.return,Q)}iu&&(iu=!1,jf(e));break;case 4:o=Ot,Ot=na(e.stateNode.containerInfo),ut(t,e),rt(e),Ot=o;break;case 12:ut(t,e),rt(e);break;case 31:ut(t,e),rt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Bo(e,o)));break;case 13:ut(t,e),rt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Jo=mt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Bo(e,o)));break;case 22:c=e.memoizedState!==null;var C=i!==null&&i.memoizedState!==null,D=nn,L=ke;if(nn=D||c,ke=L||C,ut(t,e),ke=L,nn=D,rt(e),o&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(i===null||C||nn||ke||ei(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){C=i=t;try{if(d=C.stateNode,c)T=d.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{E=C.stateNode;var O=C.memoizedProps.style,U=O!=null&&O.hasOwnProperty("display")?O.display:null;E.style.display=U==null||typeof U=="boolean"?"":(""+U).trim()}}catch(Q){Ne(C,C.return,Q)}}}else if(t.tag===6){if(i===null){C=t;try{C.stateNode.nodeValue=c?"":C.memoizedProps}catch(Q){Ne(C,C.return,Q)}}}else if(t.tag===18){if(i===null){C=t;try{var b=C.stateNode;c?Bd(b,!0):Bd(C.stateNode,!1)}catch(Q){Ne(C,C.return,Q)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}o&4&&(o=e.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,Bo(e,i))));break;case 19:ut(t,e),rt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Bo(e,o)));break;case 30:break;case 21:break;default:ut(t,e),rt(e)}}function rt(e){var t=e.flags;if(t&2){try{for(var i,o=e.return;o!==null;){if(Jf(o)){i=o;break}o=o.return}if(i==null)throw Error(s(160));switch(i.tag){case 27:var c=i.stateNode,d=tu(e);Po(e,d,c);break;case 5:var T=i.stateNode;i.flags&32&&(fi(T,""),i.flags&=-33);var E=tu(e);Po(e,E,T);break;case 3:case 4:var C=i.stateNode.containerInfo,D=tu(e);nu(e,D,C);break;default:throw Error(s(161))}}catch(L){Ne(e,e.return,L)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function jf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;jf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function on(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Kf(e,t.alternate,t),t=t.sibling}function ei(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Cn(4,t,t.return),ei(t);break;case 1:Bt(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Bf(t,t.return,i),ei(t);break;case 27:Ol(t.stateNode);case 26:case 5:Bt(t,t.return),ei(t);break;case 22:t.memoizedState===null&&ei(t);break;case 30:ei(t);break;default:ei(t)}e=e.sibling}}function an(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var o=t.alternate,c=e,d=t,T=d.flags;switch(d.tag){case 0:case 11:case 15:an(c,d,i),Nl(4,d);break;case 1:if(an(c,d,i),o=d,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(D){Ne(o,o.return,D)}if(o=d,c=o.updateQueue,c!==null){var E=o.stateNode;try{var C=c.shared.hiddenCallbacks;if(C!==null)for(c.shared.hiddenCallbacks=null,c=0;c<C.length;c++)Dc(C[c],E)}catch(D){Ne(o,o.return,D)}}i&&T&64&&Pf(d),Ml(d,d.return);break;case 27:kf(d);case 26:case 5:an(c,d,i),i&&o===null&&T&4&&Yf(d),Ml(d,d.return);break;case 12:an(c,d,i);break;case 31:an(c,d,i),i&&T&4&&Zf(c,d);break;case 13:an(c,d,i),i&&T&4&&$f(c,d);break;case 22:d.memoizedState===null&&an(c,d,i),Ml(d,d.return);break;case 30:break;default:an(c,d,i)}t=t.sibling}}function lu(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&ml(i))}function ou(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ml(e))}function Gt(e,t,i,o){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ed(e,t,i,o),t=t.sibling}function ed(e,t,i,o){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Gt(e,t,i,o),c&2048&&Nl(9,t);break;case 1:Gt(e,t,i,o);break;case 3:Gt(e,t,i,o),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ml(e)));break;case 12:if(c&2048){Gt(e,t,i,o),e=t.stateNode;try{var d=t.memoizedProps,T=d.id,E=d.onPostCommit;typeof E=="function"&&E(T,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){Ne(t,t.return,C)}}else Gt(e,t,i,o);break;case 31:Gt(e,t,i,o);break;case 13:Gt(e,t,i,o);break;case 23:break;case 22:d=t.stateNode,T=t.alternate,t.memoizedState!==null?d._visibility&2?Gt(e,t,i,o):Il(e,t):d._visibility&2?Gt(e,t,i,o):(d._visibility|=2,xi(e,t,i,o,(t.subtreeFlags&10256)!==0||!1)),c&2048&&lu(T,t);break;case 24:Gt(e,t,i,o),c&2048&&ou(t.alternate,t);break;default:Gt(e,t,i,o)}}function xi(e,t,i,o,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,T=t,E=i,C=o,D=T.flags;switch(T.tag){case 0:case 11:case 15:xi(d,T,E,C,c),Nl(8,T);break;case 23:break;case 22:var L=T.stateNode;T.memoizedState!==null?L._visibility&2?xi(d,T,E,C,c):Il(d,T):(L._visibility|=2,xi(d,T,E,C,c)),c&&D&2048&&lu(T.alternate,T);break;case 24:xi(d,T,E,C,c),c&&D&2048&&ou(T.alternate,T);break;default:xi(d,T,E,C,c)}t=t.sibling}}function Il(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,o=t,c=o.flags;switch(o.tag){case 22:Il(i,o),c&2048&&lu(o.alternate,o);break;case 24:Il(i,o),c&2048&&ou(o.alternate,o);break;default:Il(i,o)}t=t.sibling}}var Dl=8192;function bi(e,t,i){if(e.subtreeFlags&Dl)for(e=e.child;e!==null;)td(e,t,i),e=e.sibling}function td(e,t,i){switch(e.tag){case 26:bi(e,t,i),e.flags&Dl&&e.memoizedState!==null&&Ny(i,Ot,e.memoizedState,e.memoizedProps);break;case 5:bi(e,t,i);break;case 3:case 4:var o=Ot;Ot=na(e.stateNode.containerInfo),bi(e,t,i),Ot=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Dl,Dl=16777216,bi(e,t,i),Dl=o):bi(e,t,i));break;default:bi(e,t,i)}}function nd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ul(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var o=t[i];Xe=o,ld(o,e)}nd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)id(e),e=e.sibling}function id(e){switch(e.tag){case 0:case 11:case 15:Ul(e),e.flags&2048&&Cn(9,e,e.return);break;case 3:Ul(e);break;case 12:Ul(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Yo(e)):Ul(e);break;default:Ul(e)}}function Yo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var o=t[i];Xe=o,ld(o,e)}nd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Cn(8,t,t.return),Yo(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Yo(t));break;default:Yo(t)}e=e.sibling}}function ld(e,t){for(;Xe!==null;){var i=Xe;switch(i.tag){case 0:case 11:case 15:Cn(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:ml(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,Xe=o;else e:for(i=e;Xe!==null;){o=Xe;var c=o.sibling,d=o.return;if(Xf(o),o===i){Xe=null;break e}if(c!==null){c.return=d,Xe=c;break e}Xe=d}}}var Pg={getCacheForType:function(e){var t=We(Be),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return We(Be).controller.signal}},Bg=typeof WeakMap=="function"?WeakMap:Map,Ee=0,xe=null,de=null,pe=0,Re=0,St=null,An=!1,Li=!1,au=!1,sn=0,He=0,Rn=0,ti=0,su=0,Et=0,wi=0,xl=null,ct=null,uu=!1,Jo=0,od=0,ko=1/0,Fo=null,Nn=null,Fe=0,Mn=null,qi=null,un=0,ru=0,cu=null,ad=null,bl=0,fu=null;function _t(){return(Ee&2)!==0&&pe!==0?pe&-pe:x.T!==null?yu():Er()}
vendor: 18,757 bytes, line 48
48function sd(){if(Et===0)if((pe&536870912)===0||ge){var e=jl;jl<<=1,(jl&3932160)===0&&(jl=262144),Et=e}else Et=536870912;return e=Tt.current,e!==null&&(e.flags|=32),Et}function ft(e,t,i){(e===xe&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(Oi(e,0),In(e,pe,Et,!1)),ji(e,i),((Ee&2)===0||e!==xe)&&(e===xe&&((Ee&2)===0&&(ti|=i),He===4&&In(e,pe,Et,!1)),Yt(e))}function ud(e,t,i){if((Ee&6)!==0)throw Error(s(327));var o=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Wi(e,t),c=o?kg(e,t):mu(e,t,!0),d=o;do{if(c===0){Li&&!o&&In(e,t,0,!1);break}else{if(i=e.current.alternate,d&&!Yg(i)){c=mu(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var T=0;else T=e.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){t=T;e:{var E=e;c=xl;var C=E.current.memoizedState.isDehydrated;if(C&&(Oi(E,T).flags|=256),T=mu(E,T,!1),T!==2){if(au&&!C){E.errorRecoveryDisabledLanes|=d,ti|=d,c=4;break e}d=ct,ct=c,d!==null&&(ct===null?ct=d:ct.push.apply(ct,d))}c=T}if(d=!1,c!==2)continue}}if(c===1){Oi(e,0),In(e,t,0,!0);break}e:{switch(o=e,d=c,d){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:In(o,t,Et,!An);break e;case 2:ct=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(c=Jo+300-mt(),10<c)){if(In(o,t,Et,!An),to(o,0,!0)!==0)break e;un=t,o.timeoutHandle=Vd(rd.bind(null,o,i,ct,Fo,uu,t,Et,ti,wi,An,d,"Throttled",-0,0),c);break e}rd(o,i,ct,Fo,uu,t,Et,ti,wi,An,d,null,-0,0)}}break}while(!0);Yt(e)}function rd(e,t,i,o,c,d,T,E,C,D,L,O,U,b){if(e.timeoutHandle=-1,O=t.subtreeFlags,O&8192||(O&16785408)===16785408){O={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ft},td(t,d,O);var Q=(d&62914560)===d?Jo-mt():(d&4194048)===d?od-mt():0;if(Q=My(O,Q),Q!==null){un=d,e.cancelPendingCommit=Q(yd.bind(null,e,t,d,i,o,c,T,E,C,L,O,null,U,b)),In(e,d,T,!D);return}}yd(e,t,d,i,o,c,T,E,C)}function Yg(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var o=0;o<i.length;o++){var c=i[o],d=c.getSnapshot;c=c.value;try{if(!gt(d(),c))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function In(e,t,i,o){t&=~su,t&=~ti,e.suspendedLanes|=t,e.pingedLanes&=~t,o&&(e.warmLanes|=t),o=e.expirationTimes;for(var c=t;0<c;){var d=31-ht(c),T=1<<d;o[d]=-1,c&=~T}i!==0&&Tr(e,i,t)}function Ko(){return(Ee&6)===0?(Ll(0),!1):!0}function du(){if(de!==null){if(Re===0)var e=de.return;else e=de,Zt=Fn=null,Is(e),Ni=null,hl=0,e=de;for(;e!==null;)zf(e.alternate,e),e=e.return;de=null}}function Oi(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,ry(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),un=0,du(),xe=e,de=i=Xt(e.current,null),pe=t,Re=0,St=null,An=!1,Li=Wi(e,t),au=!1,wi=Et=su=ti=Rn=He=0,ct=xl=null,uu=!1,(t&8)!==0&&(t|=t&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=t;0<o;){var c=31-ht(o),d=1<<c;t|=e[c],o&=~d}return sn=t,po(),i}function cd(e,t){re=null,x.H=Cl,t===Ri||t===_o?(t=Rc(),Re=3):t===gs?(t=Rc(),Re=4):Re=t===Js?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,St=t,de===null&&(He=1,Oo(e,Nt(t,e.current)))}function fd(){var e=Tt.current;return e===null?!0:(pe&4194048)===pe?Ut===null:(pe&62914560)===pe||(pe&536870912)!==0?e===Ut:!1}function dd(){var e=x.H;return x.H=Cl,e===null?Cl:e}function md(){var e=x.A;return x.A=Pg,e}function Xo(){He=4,An||(pe&4194048)!==pe&&Tt.current!==null||(Li=!0),(Rn&134217727)===0&&(ti&134217727)===0||xe===null||In(xe,pe,Et,!1)}function mu(e,t,i){var o=Ee;Ee|=2;var c=dd(),d=md();(xe!==e||pe!==t)&&(Fo=null,Oi(e,t)),t=!1;var T=He;e:do try{if(Re!==0&&de!==null){var E=de,C=St;switch(Re){case 8:du(),T=6;break e;case 3:case 2:case 9:case 6:Tt.current===null&&(t=!0);var D=Re;if(Re=0,St=null,Gi(e,E,C,D),i&&Li){T=0;break e}break;default:D=Re,Re=0,St=null,Gi(e,E,C,D)}}Jg(),T=He;break}catch(L){cd(e,L)}while(!0);return t&&e.shellSuspendCounter++,Zt=Fn=null,Ee=o,x.H=c,x.A=d,de===null&&(xe=null,pe=0,po()),T}function Jg(){for(;de!==null;)pd(de)}function kg(e,t){var i=Ee;Ee|=2;var o=dd(),c=md();xe!==e||pe!==t?(Fo=null,ko=mt()+500,Oi(e,t)):Li=Wi(e,t);e:do try{if(Re!==0&&de!==null){t=de;var d=St;t:switch(Re){case 1:Re=0,St=null,Gi(e,t,d,1);break;case 2:case 9:if(Cc(d)){Re=0,St=null,hd(t);break}t=function(){Re!==2&&Re!==9||xe!==e||(Re=7),Yt(e)},d.then(t,t);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:Cc(d)?(Re=0,St=null,hd(t)):(Re=0,St=null,Gi(e,t,d,7));break;case 5:var T=null;switch(de.tag){case 26:T=de.memoizedState;case 5:case 27:var E=de;if(T?em(T):E.stateNode.complete){Re=0,St=null;var C=E.sibling;if(C!==null)de=C;else{var D=E.return;D!==null?(de=D,Qo(D)):de=null}break t}}Re=0,St=null,Gi(e,t,d,5);break;case 6:Re=0,St=null,Gi(e,t,d,6);break;case 8:du(),He=6;break e;default:throw Error(s(462))}}Fg();break}catch(L){cd(e,L)}while(!0);return Zt=Fn=null,x.H=o,x.A=c,Ee=i,de!==null?0:(xe=null,pe=0,po(),He)}function Fg(){for(;de!==null&&!hh();)pd(de)}function pd(e){var t=Hf(e.alternate,e,sn);e.memoizedProps=e.pendingProps,t===null?Qo(e):de=t}function hd(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=bf(i,t,t.pendingProps,t.type,void 0,pe);break;case 11:t=bf(i,t,t.pendingProps,t.type.render,t.ref,pe);break;case 5:Is(t);default:zf(i,t),t=de=dc(t,sn),t=Hf(i,t,sn)}e.memoizedProps=e.pendingProps,t===null?Qo(e):de=t}function Gi(e,t,i,o){Zt=Fn=null,Is(t),Ni=null,hl=0;var c=t.return;try{if(wg(e,c,t,i,pe)){He=1,Oo(e,Nt(i,e.current)),de=null;return}}catch(d){if(c!==null)throw de=c,d;He=1,Oo(e,Nt(i,e.current)),de=null;return}t.flags&32768?(ge||o===1?e=!0:Li||(pe&536870912)!==0?e=!1:(An=e=!0,(o===2||o===9||o===3||o===6)&&(o=Tt.current,o!==null&&o.tag===13&&(o.flags|=16384))),gd(t,e)):Qo(t)}function Qo(e){var t=e;do{if((t.flags&32768)!==0){gd(t,An);return}e=t.return;var i=Gg(t.alternate,t,sn);if(i!==null){de=i;return}if(t=t.sibling,t!==null){de=t;return}de=t=e}while(t!==null);He===0&&(He=5)}function gd(e,t){do{var i=Hg(e.alternate,e);if(i!==null){i.flags&=32767,de=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){de=e;return}de=e=i}while(e!==null);He=6,de=null}function yd(e,t,i,o,c,d,T,E,C){e.cancelPendingCommit=null;do Zo();while(Fe!==0);if((Ee&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(d=t.lanes|t.childLanes,d|=ts,Rh(e,i,d,T,E,C),e===xe&&(de=xe=null,pe=0),qi=t,Mn=e,un=i,ru=d,cu=c,ad=o,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Zg($l,function(){return _d(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||o){o=x.T,x.T=null,c=z.p,z.p=2,T=Ee,Ee|=4;try{Vg(e,t,i)}finally{Ee=T,z.p=c,x.T=o}}Fe=1,Td(),vd(),Sd()}}function Td(){if(Fe===1){Fe=0;var e=Mn,t=qi,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=x.T,x.T=null;var o=z.p;z.p=2;var c=Ee;Ee|=4;try{Wf(t,e);var d=Ru,T=ic(e.containerInfo),E=d.focusedElem,C=d.selectionRange;if(T!==E&&E&&E.ownerDocument&&nc(E.ownerDocument.documentElement,E)){if(C!==null&&Za(E)){var D=C.start,L=C.end;if(L===void 0&&(L=D),"selectionStart"in E)E.selectionStart=D,E.selectionEnd=Math.min(L,E.value.length);else{var O=E.ownerDocument||document,U=O&&O.defaultView||window;if(U.getSelection){var b=U.getSelection(),Q=E.textContent.length,le=Math.min(C.start,Q),De=C.end===void 0?le:Math.min(C.end,Q);!b.extend&&le>De&&(T=De,De=le,le=T);var N=tc(E,le),A=tc(E,De);if(N&&A&&(b.rangeCount!==1||b.anchorNode!==N.node||b.anchorOffset!==N.offset||b.focusNode!==A.node||b.focusOffset!==A.offset)){var I=O.createRange();I.setStart(N.node,N.offset),b.removeAllRanges(),le>De?(b.addRange(I),b.extend(A.node,A.offset)):(I.setEnd(A.node,A.offset),b.addRange(I))}}}}for(O=[],b=E;b=b.parentNode;)b.nodeType===1&&O.push({element:b,left:b.scrollLeft,top:b.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<O.length;E++){var q=O[E];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}ua=!!Au,Ru=Au=null}finally{Ee=c,z.p=o,x.T=i}}e.current=t,Fe=2}}function vd(){if(Fe===2){Fe=0;var e=Mn,t=qi,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=x.T,x.T=null;var o=z.p;z.p=2;var c=Ee;Ee|=4;try{Kf(e,t.alternate,t)}finally{Ee=c,z.p=o,x.T=i}}Fe=3}}function Sd(){if(Fe===4||Fe===3){Fe=0,gh();var e=Mn,t=qi,i=un,o=ad;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Fe=5:(Fe=0,qi=Mn=null,Ed(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Nn=null),xa(i),t=t.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot($i,t,void 0,(t.current.flags&128)===128)}catch{}if(o!==null){t=x.T,c=z.p,z.p=2,x.T=null;try{for(var d=e.onRecoverableError,T=0;T<o.length;T++){var E=o[T];d(E.value,{componentStack:E.stack})}}finally{x.T=t,z.p=c}}(un&3)!==0&&Zo(),Yt(e),c=e.pendingLanes,(i&261930)!==0&&(c&42)!==0?e===fu?bl++:(bl=0,fu=e):bl=0,Ll(0)}}function Ed(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ml(t)))}function Zo(){return Td(),vd(),Sd(),_d()}function _d(){if(Fe!==5)return!1;var e=Mn,t=ru;ru=0;var i=xa(un),o=x.T,c=z.p;try{z.p=32>i?32:i,x.T=null,i=cu,cu=null;var d=Mn,T=un;if(Fe=0,qi=Mn=null,un=0,(Ee&6)!==0)throw Error(s(331));var E=Ee;if(Ee|=4,id(d.current),ed(d,d.current,T,i),Ee=E,Ll(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot($i,d)}catch{}return!0}finally{z.p=c,x.T=o,Ed(e,t)}}function Cd(e,t,i){t=Nt(i,t),t=Ys(e.stateNode,t,2),e=Sn(e,t,2),e!==null&&(ji(e,2),Yt(e))}function Ne(e,t,i){if(e.tag===3)Cd(e,e,i);else for(;t!==null;){if(t.tag===3){Cd(t,e,i);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Nn===null||!Nn.has(o))){e=Nt(i,e),i=Af(2),o=Sn(t,i,2),o!==null&&(Rf(i,o,t,e),ji(o,2),Yt(o));break}}t=t.return}}function pu(e,t,i){var o=e.pingCache;if(o===null){o=e.pingCache=new Bg;var c=new Set;o.set(t,c)}else c=o.get(t),c===void 0&&(c=new Set,o.set(t,c));c.has(i)||(au=!0,c.add(i),e=Kg.bind(null,e,t,i),t.then(e,e))}function Kg(e,t,i){var o=e.pingCache;o!==null&&o.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,xe===e&&(pe&i)===i&&(He===4||He===3&&(pe&62914560)===pe&&300>mt()-Jo?(Ee&2)===0&&Oi(e,0):su|=i,wi===pe&&(wi=0)),Yt(e)}function Ad(e,t){t===0&&(t=yr()),e=Yn(e,t),e!==null&&(ji(e,t),Yt(e))}function Xg(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Ad(e,i)}function Qg(e,t){var i=0;switch(e.tag){case 31:case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(i=c.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(s(314))}o!==null&&o.delete(t),Ad(e,i)}function Zg(e,t){return Ma(e,t)}var $o=null,Hi=null,hu=!1,Wo=!1,gu=!1,Dn=0;function Yt(e){e!==Hi&&e.next===null&&(Hi===null?$o=Hi=e:Hi=Hi.next=e),Wo=!0,hu||(hu=!0,Wg())}function Ll(e,t){if(!gu&&Wo){gu=!0;do for(var i=!1,o=$o;o!==null;){if(e!==0){var c=o.pendingLanes;if(c===0)var d=0;else{var T=o.suspendedLanes,E=o.pingedLanes;d=(1<<31-ht(42|e)+1)-1,d&=c&~(T&~E),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(i=!0,Id(o,d))}else d=pe,d=to(o,o===xe?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||Wi(o,d)||(i=!0,Id(o,d));o=o.next}while(i);gu=!1}}function $g(){Rd()}function Rd(){Wo=hu=!1;var e=0;Dn!==0&&uy()&&(e=Dn);for(var t=mt(),i=null,o=$o;o!==null;){var c=o.next,d=Nd(o,t);d===0?(o.next=null,i===null?$o=c:i.next=c,c===null&&(Hi=i)):(i=o,(e!==0||(d&3)!==0)&&(Wo=!0)),o=c}Fe!==0&&Fe!==5||Ll(e),Dn!==0&&(Dn=0)}function Nd(e,t){for(var i=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var T=31-ht(d),E=1<<T,C=c[T];C===-1?((E&i)===0||(E&o)!==0)&&(c[T]=Ah(E,t)):C<=t&&(e.expiredLanes|=E),d&=~E}if(t=xe,i=pe,i=to(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,i===0||e===t&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Ia(o),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Wi(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(o!==null&&Ia(o),xa(i)){case 2:case 8:i=hr;break;case 32:i=$l;break;case 268435456:i=gr;break;default:i=$l}return o=Md.bind(null,e),i=Ma(i,o),e.callbackPriority=t,e.callbackNode=i,t}return o!==null&&o!==null&&Ia(o),e.callbackPriority=2,e.callbackNode=null,2}function Md(e,t){if(Fe!==0&&Fe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Zo()&&e.callbackNode!==i)return null;var o=pe;return o=to(e,e===xe?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(ud(e,o,t),Nd(e,mt()),e.callbackNode!=null&&e.callbackNode===i?Md.bind(null,e):null)}function Id(e,t){if(Zo())return null;ud(e,t,!0)}function Wg(){cy(function(){(Ee&6)!==0?Ma(pr,$g):Rd()})}function yu(){if(Dn===0){var e=Ci;e===0&&(e=Wl,Wl<<=1,(Wl&261888)===0&&(Wl=256)),Dn=e}return Dn}function Dd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:oo(""+e)}function Ud(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function jg(e,t,i,o,c){if(t==="submit"&&i&&i.stateNode===c){var d=Dd((c[ot]||null).action),T=o.submitter;T&&(t=(t=T[ot]||null)?Dd(t.formAction):T.getAttribute("formAction"),t!==null&&(d=t,T=null));var E=new ro("action","action",null,o,c);e.push({event:E,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(Dn!==0){var C=T?Ud(c,T):new FormData(c);Gs(i,{pending:!0,data:C,method:c.method,action:d},null,C)}}else typeof d=="function"&&(E.preventDefault(),C=T?Ud(c,T):new FormData(c),Gs(i,{pending:!0,data:C,method:c.method,action:d},d,C))},currentTarget:c}]})}}for(var Tu=0;Tu<es.length;Tu++){var vu=es[Tu],ey=vu.toLowerCase(),ty=vu[0].toUpperCase()+vu.slice(1);qt(ey,"on"+ty)}qt(ac,"onAnimationEnd"),qt(sc,"onAnimationIteration"),qt(uc,"onAnimationStart"),qt("dblclick","onDoubleClick"),qt("focusin","onFocus"),qt("focusout","onBlur"),qt(yg,"onTransitionRun"),qt(Tg,"onTransitionStart"),qt(vg,"onTransitionCancel"),qt(rc,"onTransitionEnd"),ri("onMouseEnter",["mouseout","mouseover"]),ri("onMouseLeave",["mouseout","mouseover"]),ri("onPointerEnter",["pointerout","pointerover"]),ri("onPointerLeave",["pointerout","pointerover"]),Vn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Vn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Vn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Vn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Vn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),ny=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wl));function xd(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var o=e[i],c=o.event;o=o.listeners;e:{var d=void 0;if(t)for(var T=o.length-1;0<=T;T--){var E=o[T],C=E.instance,D=E.currentTarget;if(E=E.listener,C!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=D;try{d(c)}catch(L){mo(L)}c.currentTarget=null,d=C}else for(T=0;T<o.length;T++){if(E=o[T],C=E.instance,D=E.currentTarget,E=E.listener,C!==d&&c.isPropagationStopped())break e;d=E,c.currentTarget=D;try{d(c)}catch(L){mo(L)}c.currentTarget=null,d=C}}}}function me(e,t){var i=t[ba];i===void 0&&(i=t[ba]=new Set);var o=e+"__bubble";i.has(o)||(bd(t,e,2,!1),i.add(o))}function Su(e,t,i){var o=0;t&&(o|=4),bd(i,e,o,t)}var jo="_reactListening"+Math.random().toString(36).slice(2);function Eu(e){if(!e[jo]){e[jo]=!0,Ar.forEach(function(i){i!=="selectionchange"&&(ny.has(i)||Su(i,!1,e),Su(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[jo]||(t[jo]=!0,Su("selectionchange",!1,t))}}function bd(e,t,i,o){switch(sm(t)){case 2:var c=Uy;break;case 8:c=xy;break;default:c=Ou}i=c.bind(null,t,i,e),c=void 0,!Pa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(t,i,{capture:!0,passive:c}):e.addEventListener(t,i,!0):c!==void 0?e.addEventListener(t,i,{passive:c}):e.addEventListener(t,i,!1)}function _u(e,t,i,o,c){var d=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var T=o.tag;if(T===3||T===4){var E=o.stateNode.containerInfo;if(E===c)break;if(T===4)for(T=o.return;T!==null;){var C=T.tag;if((C===3||C===4)&&T.stateNode.containerInfo===c)return;T=T.return}for(;E!==null;){if(T=ai(E),T===null)return;if(C=T.tag,C===5||C===6||C===26||C===27){o=d=T;continue e}E=E.parentNode}}o=o.return}Or(function(){var D=d,L=Va(i),O=[];e:{var U=cc.get(e);if(U!==void 0){var b=ro,Q=e;switch(e){case"keypress":if(so(i)===0)break e;case"keydown":case"keyup":b=Qh;break;case"focusin":Q="focus",b=ka;break;case"focusout":Q="blur",b=ka;break;case"beforeblur":case"afterblur":b=ka;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":b=Vr;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":b=Gh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":b=Wh;break;case ac:case sc:case uc:b=zh;break;case rc:b=eg;break;case"scroll":case"scrollend":b=qh;break;case"wheel":b=ng;break;case"copy":case"cut":case"paste":b=Bh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":b=Pr;break;case"toggle":case"beforetoggle":b=lg}var le=(t&4)!==0,De=!le&&(e==="scroll"||e==="scrollend"),N=le?U!==null?U+"Capture":null:U;le=[];for(var A=D,I;A!==null;){var q=A;if(I=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||I===null||N===null||(q=nl(A,N),q!=null&&le.push(ql(A,q,I))),De)break;A=A.return}0<le.length&&(U=new b(U,Q,null,i,L),O.push({event:U,listeners:le}))}}if((t&7)===0){e:{if(U=e==="mouseover"||e==="pointerover",b=e==="mouseout"||e==="pointerout",U&&i!==Ha&&(Q=i.relatedTarget||i.fromElement)&&(ai(Q)||Q[oi]))break e;if((b||U)&&(U=L.window===L?L:(U=L.ownerDocument)?U.defaultView||U.parentWindow:window,b?(Q=i.relatedTarget||i.toElement,b=D,Q=Q?ai(Q):null,Q!==null&&(De=m(Q),le=Q.tag,Q!==De||le!==5&&le!==27&&le!==6)&&(Q=null)):(b=null,Q=D),b!==Q)){if(le=Vr,q="onMouseLeave",N="onMouseEnter",A="mou
48se",(e==="pointerout"||e==="pointerover")&&(le=Pr,q="onPointerLeave",N="onPointerEnter",A="pointer"),De=b==null?U:tl(b),I=Q==null?U:tl(Q),U=new le(q,A+"leave",b,i,L),U.target=De,U.relatedTarget=I,q=null,ai(L)===D&&(le=new le(N,A+"enter",Q,i,L),le.target=I,le.relatedTarget=De,q=le),De=q,b&&Q)t:{for(le=iy,N=b,A=Q,I=0,q=N;q;q=le(q))I++;q=0;for(var ee=A;ee;ee=le(ee))q++;for(;0<I-q;)N=le(N),I--;for(;0<q-I;)A=le(A),q--;for(;I--;){if(N===A||A!==null&&N===A.alternate){le=N;break t}N=le(N),A=le(A)}le=null}else le=null;b!==null&&Ld(O,U,b,le,!1),Q!==null&&De!==null&&Ld(O,De,Q,le,!0)}}e:{if(U=D?tl(D):window,b=U.nodeName&&U.nodeName.toLowerCase(),b==="select"||b==="input"&&U.type==="file")var Te=Qr;else if(Kr(U))if(Zr)Te=pg;else{Te=dg;var W=fg}else b=U.nodeName,!b||b.toLowerCase()!=="input"||U.type!=="checkbox"&&U.type!=="radio"?D&&Ga(D.elementType)&&(Te=Qr):Te=mg;if(Te&&(Te=Te(e,D))){Xr(O,Te,i,L);break e}W&&W(e,U,D),e==="focusout"&&D&&U.type==="number"&&D.memoizedProps.value!=null&&Oa(U,"number",U.value)}switch(W=D?tl(D):window,e){case"focusin":(Kr(W)||W.contentEditable==="true")&&(hi=W,$a=D,cl=null);break;case"focusout":cl=$a=hi=null;break;case"mousedown":Wa=!0;break;case"contextmenu":case"mouseup":case"dragend":Wa=!1,lc(O,i,L);break;case"selectionchange":if(gg)break;case"keydown":case"keyup":lc(O,i,L)}var ce;if(Ka)e:{switch(e){case"compositionstart":var he="onCompositionStart";break e;case"compositionend":he="onCompositionEnd";break e;case"compositionupdate":he="onCompositionUpdate";break e}he=void 0}else pi?kr(e,i)&&(he="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(he="onCompositionStart");he&&(Br&&i.locale!=="ko"&&(pi||he!=="onCompositionStart"?he==="onCompositionEnd"&&pi&&(ce=Gr()):(mn=L,Ba="value"in mn?mn.value:mn.textContent,pi=!0)),W=ea(D,he),0<W.length&&(he=new zr(he,e,null,i,L),O.push({event:he,listeners:W}),ce?he.data=ce:(ce=Fr(i),ce!==null&&(he.data=ce)))),(ce=ag?sg(e,i):ug(e,i))&&(he=ea(D,"onBeforeInput"),0<he.length&&(W=new zr("onBeforeInput","beforeinput",null,i,L),O.push({event:W,listeners:he}),W.data=ce)),jg(O,e,D,i,L)}xd(O,t)})}function ql(e,t,i){return{instance:e,listener:t,currentTarget:i}}function ea(e,t){for(var i=t+"Capture",o=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=nl(e,i),c!=null&&o.unshift(ql(e,c,d)),c=nl(e,t),c!=null&&o.push(ql(e,c,d))),e.tag===3)return o;e=e.return}return[]}function iy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ld(e,t,i,o,c){for(var d=t._reactName,T=[];i!==null&&i!==o;){var E=i,C=E.alternate,D=E.stateNode;if(E=E.tag,C!==null&&C===o)break;E!==5&&E!==26&&E!==27||D===null||(C=D,c?(D=nl(i,d),D!=null&&T.unshift(ql(i,D,C))):c||(D=nl(i,d),D!=null&&T.push(ql(i,D,C)))),i=i.return}T.length!==0&&e.push({event:t,listeners:T})}var ly=/\r\n?/g,oy=/\u0000|\uFFFD/g;function wd(e){return(typeof e=="string"?e:""+e).replace(ly,` 49`).replace(oy,"")}function qd(e,t){return t=wd(t),wd(e)===t}function Ie(e,t,i,o,c,d){switch(i){case"children":typeof o=="string"?t==="body"||t==="textarea"&&o===""||fi(e,o):(typeof o=="number"||typeof o=="bigint")&&t!=="body"&&fi(e,""+o);break;case"className":io(e,"class",o);break;case"tabIndex":io(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":io(e,i,o);break;case"style":wr(e,o,d);break;case"data":if(t!=="object"){io(e,"data",o);break}case"src":case"href":if(o===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=oo(""+o),e.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(i==="formAction"?(t!=="input"&&Ie(e,t,"name",c.name,c,null),Ie(e,t,"formEncType",c.formEncType,c,null),Ie(e,t,"formMethod",c.formMethod,c,null),Ie(e,t,"formTarget",c.formTarget,c,null)):(Ie(e,t,"encType",c.encType,c,null),Ie(e,t,"method",c.method,c,null),Ie(e,t,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=oo(""+o),e.setAttribute(i,o);break;case"onClick":o!=null&&(e.onclick=Ft);break;case"onScroll":o!=null&&me("scroll",e);break;case"onScrollEnd":o!=null&&me("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(i=o.__html,i!=null){if(c.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}i=oo(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""+o):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
49ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":o===!0?e.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,o):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(i,o):e.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(i):e.setAttribute(i,o);break;case"popover":me("beforetoggle",e),me("toggle",e),no(e,"popover",o);break;case"xlinkActuate":kt(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":kt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":kt(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":kt(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":kt(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":kt(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":kt(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":kt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":kt(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":no(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Lh.get(i)||i,no(e,i,o))}}function Cu(e,t,i,o,c,d){switch(i){case"style":wr(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(s(61));if(i=o.__html,i!=null){if(c.children!=null)throw Error(s(60));e.innerHTML=i}}break;case"children":typeof o=="string"?fi(e,o):(typeof o=="number"||typeof o=="bigint")&&fi(e,""+o);break;case"onScroll":o!=null&&me("scroll",e);break;case"onScrollEnd":o!=null&&me("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Ft);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rr.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(c=i.endsWith("Capture"),t=i.slice(2,c?i.length-7:void 0),d=e[ot]||null,d=d!=null?d[i]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof o=="function")){typeof d!="function"&&d!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,o,c);break e}i in e?e[i]=o:o===!0?e.setAttribute(i,""):no(e,i,o)}}}function et(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":me("error",e),me("load",e);var o=!1,c=!1,d;for(d in i)if(i.hasOwnProperty(d)){var T=i[d];if(T!=null)switch(d){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ie(e,t,d,T,i,null)}}c&&Ie(e,t,"srcSet",i.srcSet,i,null),o&&Ie(e,t,"src",i.src,i,null);return;case"input":me("invalid",e);var E=d=T=c=null,C=null,D=null;for(o in i)if(i.hasOwnProperty(o)){var L=i[o];if(L!=null)switch(o){case"name":c=L;break;case"type":T=L;break;case"checked":C=L;break;case"defaultChecked":D=L;break;case"value":d=L;break;case"defaultValue":E=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(s(137,t));break;default:Ie(e,t,o,L,i,null)}}Ur(e,d,E,C,D,T,c,!1);return;case"select":me("invalid",e),o=T=d=null;for(c in i)if(i.hasOwnProperty(c)&&(E=i[c],E!=null))switch(c){case"value":d=E;break;case"defaultValue":T=E;break;case"multiple":o=E;default:Ie(e,t,c,E,i,null)}t=d,i=T,e.multiple=!!o,t!=null?ci(e,!!o,t,!1):i!=null&&ci(e,!!o,i,!0);return;case"textarea":me("invalid",e),d=c=o=null;for(T in i)if(i.hasOwnProperty(T)&&(E=i[T],E!=null))switch(T){case"value":o=E;break;case"defaultValue":c=E;break;case"children":d=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(s(91));break;default:Ie(e,t,T,E,i,null)}br(e,o,c,d);return;case"option":for(C in i)if(i.hasOwnProperty(C)&&(o=i[C],o!=null))switch(C){case"selected":e.selected=o&&typeof o!="function"&&typeof o!="symbol";break;default:Ie(e,t,C,o,i,null)}return;case"dialog":me("beforetoggle",e),me("toggle",e),me("cancel",e),me("close",e);break;case"iframe":case"object":me("load",e);break;case"video":case"audio":for(o=0;o<wl.length;o++)me(wl[o],e);break;case"image":me("error",e),me("load",e);break;case"details":me("toggle",e);break;case"embed":case"source":case"link":me("error",e),me("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in i)if(i.hasOwnProperty(D)&&(o=i[D],o!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:Ie(e,t,D,o,i,null)}return;default:if(Ga(t)){for(L in i)i.hasOwnProperty(L)&&(o=i[L],o!==void 0&&Cu(e,t,L,o,i,void 0));return}}for(E in i)i.hasOwnProperty(E)&&(o=i[E],o!=null&&Ie(e,t,E,o,i,null))}function ay(e,t,i,o){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,T=null,E=null,C=null,D=null,L=null;for(b in i){var O=i[b];if(i.hasOwnProperty(b)&&O!=null)switch(b){case"checked":break;case"value":break;case"defaultValue":C=O;default:o.hasOwnProperty(b)||Ie(e,t,b,null,o,O)}}for(var U in o){var b=o[U];if(O=i[U],o.hasOwnProperty(U)&&(b!=null||O!=null))switch(U){case"type":d=b;break;case"name":c=b;break;case"checked":D=b;break;case"defaultChecked":L=b;break;case"value":T=b;break;case"defaultValue":E=b;break;case"children":case"dangerouslySetInnerHTML":if(b!=null)throw Error(s(137,t));break;default:b!==O&&Ie(e,t,U,b,o,O)}}qa(e,T,E,C,D,L,d,c);return;case"select":b=T=E=U=null;for(d in i)if(C=i[d],i.hasOwnProperty(d)&&C!=null)switch(d){case"value":break;case"multiple":b=C;default:o.hasOwnProperty(d)||Ie(e,t,d,null,o,C)}for(c in o)if(d=o[c],C=i[c],o.hasOwnProperty(c)&&(d!=null||C!=null))switch(c){case"value":U=d;break;case"defaultValue":E=d;break;case"multiple":T=d;default:d!==C&&Ie(e,t,c,d,o,C)}t=E,i=T,o=b,U!=null?ci(e,!!i,U,!1):!!o!=!!i&&(t!=null?ci(e,!!i,t,!0):ci(e,!!i,i?[]:"",!1));return;case"textarea":b=U=null;for(E in i)if(c=i[E],i.hasOwnProperty(E)&&c!=null&&!o.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Ie(e,t,E,null,o,c)}for(T in o)if(c=o[T],d=i[T],o.hasOwnProperty(T)&&(c!=null||d!=null))switch(T){case"value":U=c;break;case"defaultValue":b=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(s(91));break;default:c!==d&&Ie(e,t,T,c,o,d)}xr(e,U,b);return;case"option":for(var Q in i)if(U=i[Q],i.hasOwnProperty(Q)&&U!=null&&!o.hasOwnProperty(Q))switch(Q){case"selected":e.selected=!1;break;default:Ie(e,t,Q,null,o,U)}for(C in o)if(U=o[C],b=i[C],o.hasOwnProperty(C)&&U!==b&&(U!=null||b!=null))switch(C){case"selected":e.selected=U&&typeof U!="function"&&typeof U!="symbol";break;default:Ie(e,t,C,U,o,b)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var le in i)U=i[le],i.hasOwnProperty(le)&&U!=null&&!o.hasOwnProperty(le)&&Ie(e,t,le,null,o,U);for(D in o)if(U=o[D],b=i[D],o.hasOwnProperty(D)&&U!==b&&(U!=null||b!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(s(137,t));break;default:Ie(e,t,D,U,o,b)}return;default:if(Ga(t)){for(var De in i)U=i[De],i.hasOwnProperty(De)&&U!==void 0&&!o.hasOwnProperty(De)&&Cu(e,t,De,void 0,o,U);for(L in o)U=o[L],b=i[L],!o.hasOwnProperty(L)||U===b||U===void 0&&b===void 0||Cu(e,t,L,U,o,b);return}}for(var N in i)U=i[N],i.hasOwnProperty(N)&&U!=null&&!o.hasOwnProperty(N)&&Ie(e,t,N,null,o,U);for(O in o)U=o[O],b=i[O],!o.hasOwnProperty(O)||U===b||U==null&&b==null||Ie(e,t,O,U,o,b)}function Od(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var c=i[o],d=c.transferSize,T=c.initiatorType,E=c.duration;if(d&&E&&Od(T)){for(T=0,E=c.responseEnd,o+=1;o<i.length;o++){var C=i[o],D=C.startTime;if(D>E)break;var L=C.transferSize,O=C.initiatorType;L&&Od(O)&&(C=C.responseEnd,T+=L*(C<E?1:(E-D)/(C-D)))}if(--o,t+=8*(d+T)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Au=null,Ru=null;
vendor: 9,411 bytes, line 49
49function ta(e){return e.nodeType===9?e:e.ownerDocument}function Gd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hd(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Nu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Mu=null;function uy(){var e=window.event;return e&&e.type==="popstate"?e===Mu?!1:(Mu=e,!0):(Mu=null,!1)}var Vd=typeof setTimeout=="function"?setTimeout:void 0,ry=typeof clearTimeout=="function"?clearTimeout:void 0,zd=typeof Promise=="function"?Promise:void 0,cy=typeof queueMicrotask=="function"?queueMicrotask:typeof zd<"u"?function(e){return zd.resolve(null).then(e).catch(fy)}:Vd;function fy(e){setTimeout(function(){throw e})}function Un(e){return e==="head"}function Pd(e,t){var i=t,o=0;do{var c=i.nextSibling;if(e.removeChild(i),c&&c.nodeType===8)if(i=c.data,i==="/$"||i==="/&"){if(o===0){e.removeChild(c),Bi(t);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")Ol(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Ol(i);for(var d=i.firstChild;d;){var T=d.nextSibling,E=d.nodeName;d[el]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&d.rel.toLowerCase()==="stylesheet"||i.removeChild(d),d=T}}else i==="body"&&Ol(e.ownerDocument.body);i=c}while(i);Bi(t)}function Bd(e,t){var i=e;e=0;do{var o=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=o}while(i)}function Iu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Iu(i),La(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function dy(e,t,i,o){for(;e.nodeType===1;){var c=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[el])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=xt(e.nextSibling),e===null)break}return null}function my(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=xt(e.nextSibling),e===null))return null;return e}function Yd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=xt(e.nextSibling),e===null))return null;return e}function Du(e){return e.data==="$?"||e.data==="$~"}function Uu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function py(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var o=function(){t(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function xt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var xu=null;function Jd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return xt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function kd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function Fd(e,t,i){switch(t=ta(i),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Ol(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);La(e)}var bt=new Map,Kd=new Set;function na(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rn=z.d;z.d={f:hy,r:gy,D:yy,C:Ty,L:vy,m:Sy,X:_y,S:Ey,M:Cy};function hy(){var e=rn.f(),t=Ko();return e||t}function gy(e){var t=si(e);t!==null&&t.tag===5&&t.type==="form"?cf(t):rn.r(e)}var Vi=typeof document>"u"?null:document;function Xd(e,t,i){var o=Vi;if(o&&typeof t=="string"&&t){var c=At(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof i=="string"&&(c+='[crossorigin="'+i+'"]'),Kd.has(c)||(Kd.add(c),e={rel:e,crossOrigin:i,href:t},o.querySelector(c)===null&&(t=o.createElement("link"),et(t,"link",e),Ke(t),o.head.appendChild(t)))}}function yy(e){rn.D(e),Xd("dns-prefetch",e,null)}function Ty(e,t){rn.C(e,t),Xd("preconnect",e,t)}function vy(e,t,i){rn.L(e,t,i);var o=Vi;if(o&&e&&t){var c='link[rel="preload"][as="'+At(t)+'"]';t==="image"&&i&&i.imageSrcSet?(c+='[imagesrcset="'+At(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(c+='[imagesizes="'+At(i.imageSizes)+'"]')):c+='[href="'+At(e)+'"]';var d=c;switch(t){case"style":d=zi(e);break;case"script":d=Pi(e)}bt.has(d)||(e=S({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),bt.set(d,e),o.querySelector(c)!==null||t==="style"&&o.querySelector(Gl(d))||t==="script"&&o.querySelector(Hl(d))||(t=o.createElement("link"),et(t,"link",e),Ke(t),o.head.appendChild(t)))}}function Sy(e,t){rn.m(e,t);var i=Vi;if(i&&e){var o=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+At(o)+'"][href="'+At(e)+'"]',d=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Pi(e)}if(!bt.has(d)&&(e=S({rel:"modulepreload",href:e},t),bt.set(d,e),i.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Hl(d)))return}o=i.createElement("link"),et(o,"link",e),Ke(o),i.head.appendChild(o)}}}function Ey(e,t,i){rn.S(e,t,i);var o=Vi;if(o&&e){var c=ui(o).hoistableStyles,d=zi(e);t=t||"default";var T=c.get(d);if(!T){var E={loading:0,preload:null};if(T=o.querySelector(Gl(d)))E.loading=5;else{e=S({rel:"stylesheet",href:e,"data-precedence":t},i),(i=bt.get(d))&&bu(e,i);var C=T=o.createElement("link");Ke(C),et(C,"link",e),C._p=new Promise(function(D,L){C.onload=D,C.onerror=L}),C.addEventListener("load",function(){E.loading|=1}),C.addEventListener("error",function(){E.loading|=2}),E.loading|=4,ia(T,t,o)}T={type:"stylesheet",instance:T,count:1,state:E},c.set(d,T)}}}function _y(e,t){rn.X(e,t);var i=Vi;if(i&&e){var o=ui(i).hoistableScripts,c=Pi(e),d=o.get(c);d||(d=i.querySelector(Hl(c)),d||(e=S({src:e,async:!0},t),(t=bt.get(c))&&Lu(e,t),d=i.createElement("script"),Ke(d),et(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function Cy(e,t){rn.M(e,t);var i=Vi;if(i&&e){var o=ui(i).hoistableScripts,c=Pi(e),d=o.get(c);d||(d=i.querySelector(Hl(c)),d||(e=S({src:e,async:!0,type:"module"},t),(t=bt.get(c))&&Lu(e,t),d=i.createElement("script"),Ke(d),et(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function Qd(e,t,i,o){var c=(c=fe.current)?na(c):null;if(!c)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=zi(i.href),i=ui(c).hoistableStyles,o=i.get(t),o||(o={type:"style",instance:null,count:0,state:null},i.set(t,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=zi(i.href);var d=ui(c).hoistableStyles,T=d.get(e);if(T||(c=c.ownerDocument||c,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,T),(d=c.querySelector(Gl(e)))&&!d._p&&(T.instance=d,T.state.loading=5),bt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},bt.set(e,i),d||Ay(c,e,i,T.state))),t&&o===null)throw Error(s(528,""));return T}if(t&&o!==null)throw Error(s(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?
vendor: 1,543 bytes, line 49
49(t=Pi(i),i=ui(c).hoistableScripts,o=i.get(t),o||(o={type:"script",instance:null,count:0,state:null},i.set(t,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function zi(e){return'href="'+At(e)+'"'}function Gl(e){return'link[rel="stylesheet"]['+e+"]"}function Zd(e){return S({},e,{"data-precedence":e.precedence,precedence:null})}function Ay(e,t,i,o){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?o.loading=1:(t=e.createElement("link"),o.preload=t,t.addEventListener("load",function(){return o.loading|=1}),t.addEventListener("error",function(){return o.loading|=2}),et(t,"link",i),Ke(t),e.head.appendChild(t))}function Pi(e){return'[src="'+At(e)+'"]'}function Hl(e){return"script[async]"+e}function $d(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var o=e.querySelector('style[data-href~="'+At(i.href)+'"]');if(o)return t.instance=o,Ke(o),o;var c=S({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),Ke(o),et(o,"style",c),ia(o,i.precedence,e),t.instance=o;case"stylesheet":c=zi(i.href);var d=e.querySelector(Gl(c));if(d)return t.state.loading|=4,t.instance=d,Ke(d),d;o=Zd(i),(c=bt.get(c))&&bu(o,c),d=(e.ownerDocument||e).createElement("link"),Ke(d);var T=d;return T._p=new Promise(function(E,C){T.onload=E,T.onerror=C}),et(d,"link",o),t.state.loading|=4,ia(d,i.precedence,e),t.instance=d;case"script":return d=Pi(i.src),(c=e.querySelector(Hl(d)))?(t.instance=c,Ke(c),c):(o=i,(c=bt.get(d))&&
vendor: 5,534 bytes, line 49
49(o=S({},i),Lu(o,c)),e=e.ownerDocument||e,c=e.createElement("script"),Ke(c),et(c,"link",o),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(o=t.instance,t.state.loading|=4,ia(o,i.precedence,e));return t.instance}function ia(e,t,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,d=c,T=0;T<o.length;T++){var E=o[T];if(E.dataset.precedence===t)d=E;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function bu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Lu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var la=null;function Wd(e,t,i){if(la===null){var o=new Map,c=la=new Map;c.set(i,o)}else c=la,o=c.get(i),o||(o=new Map,c.set(i,o));if(o.has(e))return o;for(o.set(e,null),i=i.getElementsByTagName(e),c=0;c<i.length;c++){var d=i[c];if(!(d[el]||d[Ze]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var T=d.getAttribute(t)||"";T=e+T;var E=o.get(T);E?E.push(d):o.set(T,[d])}}return o}function jd(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Ry(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function em(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ny(e,t,i,o){if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var c=zi(o.href),d=t.querySelector(Gl(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=oa.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=d,Ke(d);return}d=t.ownerDocument||t,o=Zd(o),(c=bt.get(c))&&bu(o,c),d=d.createElement("link"),Ke(d);var T=d;T._p=new Promise(function(E,C){T.onload=E,T.onerror=C}),et(d,"link",o),i.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=oa.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var wu=0;function My(e,t){return e.stylesheets&&e.count===0&&sa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var o=setTimeout(function(){if(e.stylesheets&&sa(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&wu===0&&(wu=62500*sy());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sa(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>wu?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(c)}}:null}function oa(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var aa=null;function sa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,aa=new Map,t.forEach(Iy,e),aa=null,oa.call(e))}function Iy(e,t){if(!(t.state.loading&4)){var i=aa.get(e);if(i)var o=i.get(null);else{i=new Map,aa.set(e,i);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var T=c[d];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(i.set(T.dataset.precedence,T),o=T)}o&&i.set(null,o)}c=t.instance,T=c.getAttribute("data-precedence"),d=i.get(T)||o,d===o&&i.set(null,c),i.set(T,c),this.count++,o=oa.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Vl={$$typeof:V,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function Dy(e,t,i,o,c,d,T,E,C){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Da(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Da(0),this.hiddenUpdates=Da(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function tm(e,t,i,o,c,d,T,E,C,D,L,O){return e=new Dy(e,t,i,T,C,D,L,O,E),t=1,d===!0&&(t|=24),d=yt(3,null,null,t),e.current=d,d.stateNode=e,t=ms(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:o,isDehydrated:i,cache:t},ys(d),e}function nm(e){return e?(e=Ti,e):Ti}function im(e,t,i,o,c,d){c=nm(c),o.context===null?o.context=c:o.pe
vendor: 7,361 bytes, line 49
49ndingContext=c,o=vn(t),o.payload={element:i},d=d===void 0?null:d,d!==null&&(o.callback=d),i=Sn(e,o,t),i!==null&&(ft(i,e,t),yl(i,e,t))}function lm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function qu(e,t){lm(e,t),(e=e.alternate)&&lm(e,t)}function om(e){if(e.tag===13||e.tag===31){var t=Yn(e,67108864);t!==null&&ft(t,e,67108864),qu(e,67108864)}}function am(e){if(e.tag===13||e.tag===31){var t=_t();t=Ua(t);var i=Yn(e,t);i!==null&&ft(i,e,t),qu(e,t)}}var ua=!0;function Uy(e,t,i,o){var c=x.T;x.T=null;var d=z.p;try{z.p=2,Ou(e,t,i,o)}finally{z.p=d,x.T=c}}function xy(e,t,i,o){var c=x.T;x.T=null;var d=z.p;try{z.p=8,Ou(e,t,i,o)}finally{z.p=d,x.T=c}}function Ou(e,t,i,o){if(ua){var c=Gu(o);if(c===null)_u(e,t,o,ra,i),um(e,o);else if(Ly(c,e,t,i,o))o.stopPropagation();else if(um(e,o),t&4&&-1<by.indexOf(e)){for(;c!==null;){var d=si(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var T=Hn(d.pendingLanes);if(T!==0){var E=d;for(E.pendingLanes|=2,E.entangledLanes|=2;T;){var C=1<<31-ht(T);E.entanglements[1]|=C,T&=~C}Yt(d),(Ee&6)===0&&(ko=mt()+500,Ll(0))}}break;case 31:case 13:E=Yn(d,2),E!==null&&ft(E,d,2),Ko(),qu(d,2)}if(d=Gu(o),d===null&&_u(e,t,o,ra,i),d===c)break;c=d}c!==null&&o.stopPropagation()}else _u(e,t,o,null,i)}}function Gu(e){return e=Va(e),Hu(e)}var ra=null;function Hu(e){if(ra=null,e=ai(e),e!==null){var t=m(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=p(t),e!==null)return e;e=null}else if(i===31){if(e=g(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ra=e,null}function sm(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(yh()){case pr:return 2;case hr:return 8;case $l:case Th:return 32;case gr:return 268435456;default:return 32}default:return 32}}var Vu=!1,xn=null,bn=null,Ln=null,zl=new Map,Pl=new Map,wn=[],by="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function um(e,t){switch(e){case"focusin":case"focusout":xn=null;break;case"dragenter":case"dragleave":bn=null;break;case"mouseover":case"mouseout":Ln=null;break;case"pointerover":case"pointerout":zl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pl.delete(t.pointerId)}}function Bl(e,t,i,o,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:i,eventSystemFlags:o,nativeEvent:d,targetContainers:[c]},t!==null&&(t=si(t),t!==null&&om(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function Ly(e,t,i,o,c){switch(t){case"focusin":return xn=Bl(xn,e,t,i,o,c),!0;case"dragenter":return bn=Bl(bn,e,t,i,o,c),!0;case"mouseover":return Ln=Bl(Ln,e,t,i,o,c),!0;case"pointerover":var d=c.pointerId;return zl.set(d,Bl(zl.get(d)||null,e,t,i,o,c)),!0;case"gotpointercapture":return d=c.pointerId,Pl.set(d,Bl(Pl.get(d)||null,e,t,i,o,c)),!0}return!1}function rm(e){var t=ai(e.target);if(t!==null){var i=m(t);if(i!==null){if(t=i.tag,t===13){if(t=p(i),t!==null){e.blockedOn=t,_r(e.priority,function(){am(i)});return}}else if(t===31){if(t=g(i),t!==null){e.blockedOn=t,_r(e.priority,function(){am(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ca(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Gu(e.nativeEvent);if(i===null){i=e.nativeEvent;var o=new i.constructor(i.type,i);Ha=o,i.target.dispatchEvent(o),Ha=null}else return t=si(i),t!==null&&om(t),e.blockedOn=i,!1;t.shift()}return!0}function cm(e,t,i){ca(e)&&i.delete(t)}function wy(){Vu=!1,xn!==null&&ca(xn)&&(xn=null),bn!==null&&ca(bn)&&(bn=null),Ln!==null&&ca(Ln)&&(Ln=null),zl.forEach(cm),Pl.forEach(cm)}function fa(e,t){e.blockedOn===t&&(e.blockedOn=null,Vu||(Vu=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,wy)))}var da=null;function fm(e){da!==e&&(da=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){da===e&&(da=null);for(var t=0;t<e.length;t+=3){var i=e[t],o=e[t+1],c=e[t+2];if(typeof o!="function"){if(Hu(o||i)===null)continue;break}var d=si(i);d!==null&&(e.splice(t,3),t-=3,Gs(d,{pending:!0,data:c,method:i.method,action:o},o,c))}}))}function Bi(e){function t(C){return fa(C,e)}xn!==null&&fa(xn,e),bn!==null&&fa(bn,e),Ln!==null&&fa(Ln,e),zl.forEach(t),Pl.forEach(t);for(var i=0;i<wn.length;i++){var o=wn[i];o.blockedOn===e&&(o.blockedOn=null)}for(;0<wn.length&&(i=wn[0],i.blockedOn===null);)rm(i),i.blockedOn===null&&wn.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var c=i[o],d=i[o+1],T=c[ot]||null;if(typeof d=="function")T||fm(i);else if(T){var E=null;if(d&&d.hasAttribute("formAction")){if(c=d,T=d[ot]||null)E=T.formAction;else if(Hu(c)!==null)continue}else E=T.action;typeof E=="function"?i[o+1]=E:(i.splice(o,3),o-=3),fm(i)}}}function dm(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(T){return c=T})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function zu(e){this._internalRoot=e}ma.prototype.render=zu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var i=t.current,o=_t();im(i,o,e,t,null,null)},ma.prototype.unmount=zu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;
49im(e.current,2,null,e,null,null),Ko(),t[oi]=null}};function ma(e){this._internalRoot=e}ma.prototype.unstable_scheduleHydration=function(e){if(e){var t=Er();e={blockedOn:null,target:e,priority:t};for(var i=0;i<wn.length&&t!==0&&t<wn[i].priority;i++);wn.splice(i,0,e),i===0&&rm(e)}};var mm=n.version;if(mm!=="19.2.0")throw Error(s(527,mm,"19.2.0"));z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=h(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var qy={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:x,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var pa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!pa.isDisabled&&pa.supportsFiber)try{$i=pa.inject(qy),pt=pa}catch{}}return Jl.createRoot=function(e,t){if(!r(e))throw Error(s(299));var i=!1,o="",c=Sf,d=Ef,T=_f;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(T=t.onRecoverableError)),t=tm(e,1,!1,null,null,i,o,null,c,d,T,dm),e[oi]=t.current,Eu(e),new zu(t)},Jl.hydrateRoot=function(e,t,i){if(!r(e))throw Error(s(299));var o=!1,c="",d=Sf,T=Ef,E=_f,C=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(c=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(T=i.onCaughtError),i.onRecoverableError!==void 0&&(E=i.onRecoverableError),i.formState!==void 0&&(C=i.formState)),t=tm(e,1,!0,t,i??null,o,c,C,d,T,E,dm),t.context=nm(null),i=t.current,o=_t(),o=Ua(o),c=vn(o),c.callback=null,Sn(i,c,o),i=o,t.current.lanes=i,ji(t,i),Yt(t),e[oi]=t.current,Eu(e),new ma(t)},Jl.version="19.2.0",Jl}var Cm;function Fy(){if(Cm)return Yu.exports;Cm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(n){console.error(n)}}return l(),Yu.exports=ky(),Yu.exports}var Ky=Fy();const Xy=Gy(Ky);/** 50 * @license 51 * Copyright 2025 Google LLC 52 * SPDX-License-Identifier: Apache-2.0 53 */let Qy,Zy;function $y(){return{geminiUrl:Qy,vertexUrl:Zy}}function Wy(l,n,a,s){var r,m;if(!(l!=null&&l.baseUrl)){const p=$y();return n?(r=p.vertexUrl)!==null&&r!==void 0?r:a:(m=p.geminiUrl)!==null&&m!==void 0?m:s}return l.baseUrl}/** 54 * @license 55 * Copyright 2025 Google LLC 56 * SPDX-License-Identifier: Apache-2.0 57 */class li{}function Z(l,n){const a=/\{([^}]+)\}/g;return l.replace(a,(s,r)=>{if(Object.prototype.hasOwnProperty.call(n,r)){const m=n[r];return m!=null?String(m):""}else throw new Error(`Key '${r}' not found in valueMap.`)})}function f(l,n,a){for(let m=0;m<n.length-1;m++){const p=n[m];if(p.endsWith("[]")){const g=p.slice(0,-2);if(!(g in l))if(Array.isArray(a))l[g]=Array.from({length:a.length},()=>({}));else throw new Error(`Value must be a list given an array path ${p}`);if(Array.isArray(l[g])){const y=l[g];if(Array.isArray(a))for(let h=0;h<y.length;h++){const v=y[h];f(v,n.slice(m+1),a[h])}else for(const h of y)f(h,n.slice(m+1),a)}return}else if(p.endsWith("[0]")){const g=p.slice(0,-3);g in l||(l[g]=[{}]);const y=l[g];f(y[0],n.slice(m+1),a);return}(!l[p]||typeof l[p]!="object")&&(l[p]={}),l=l[p]}const s=n[n.length-1],r=l[s];if(r!==void 0){if(!a||typeof a=="object"&&Object.keys(a).length===0||a===r)return;if(typeof r=="object"&&typeof a=="object"&&r!==null&&a!==null)Object.assign(r,a);else throw new Error(`Cannot set value for an existing key. Key: ${s}`)}else s==="_self"&&typeof a=="object"&&a!==null&&!Array.isArray(a)?Object.assign(l,a):l[s]=a}function u(l,n,a=void 0){try{if(n.length===1&&n[0]==="_self")return l;for(let s=0;s<n.length;s++){if(typeof l!="object"||l===null)return a;const r=n[s];if(r.endsWith("[]")){const m=r.slice(0,-2);if(m in l){const p=l[m];return Array.isArray(p)?p.map(g=>u(g,n.slice(s+1),a)):a}else return a}else l=l[r]}return l}catch(s){if(s instanceof TypeError)return a;throw s}}/** 58 * @license 59 * Copyright 2025 Google LLC 60 * SPDX-License-Identifier: Apache-2.0 61 */function or(l){if(typeof l!="string")throw new Error("fromImageBytes must be a string");return l}/** 62 * @license 63 * Copyright 2025 Google LLC 64 * SPDX-License-Identifier: Apache-2.0 65 */function jy(l){const n={},a=u(l,["operationName"]);
65a!=null&&f(n,["operationName"],a);const s=u(l,["resourceName"]);return s!=null&&f(n,["_url","resourceName"],s),n}function eT(l){const n={},a=u(l,["name"]);a!=null&&f(n,["name"],a);const s=u(l,["metadata"]);s!=null&&f(n,["metadata"],s);const r=u(l,["done"]);r!=null&&f(n,["done"],r);const m=u(l,["error"]);m!=null&&f(n,["error"],m);const p=u(l,["response","generateVideoResponse"]);return p!=null&&f(n,["response"],nT(p)),n}function tT(l){const n={},a=u(l,["name"]);a!=null&&f(n,["name"],a);const s=u(l,["metadata"]);s!=null&&f(n,["metadata"],s);const r=u(l,["done"]);r!=null&&f(n,["done"],r);const m=u(l,["error"]);m!=null&&f(n,["error"],m);const p=u(l,["response"]);return p!=null&&f(n,["response"],iT(p)),n}function nT(l){const n={},a=u(l,["generatedSamples"]);if(a!=null){let m=a;Array.isArray(m)&&(m=m.map(p=>lT(p))),f(n,["generatedVideos"],m)}const s=u(l,["raiMediaFilteredCount"]);s!=null&&f(n,["raiMediaFilteredCount"],s);const r=u(l,["raiMediaFilteredReasons"]);return r!=null&&f(n,["raiMediaFilteredReasons"],r),n}function iT(l){const n={},a=u(l,["videos"]);if(a!=null){let m=a;Array.isArray(m)&&(m=m.map(p=>oT(p))),f(n,["generatedVideos"],m)}const s=u(l,["raiMediaFilteredCount"]);s!=null&&f(n,["raiMediaFilteredCount"],s);const r=u(l,["raiMediaFilteredReasons"]);return r!=null&&f(n,["raiMediaFilteredReasons"],r),n}function lT(l){const n={},a=u(l,["_self"]);return a!=null&&f(n,["video"],uT(a)),n}function oT(l){const n={},a=u(l,["_self"]);return a!=null&&f(n,["video"],rT(a)),n}function aT(l){const n={},a=u(l,["operationName"]);return a!=null&&f(n,["_url","operationName"],a),n}function sT(l){const n={},a=u(l,["operationName"]);return a!=null&&f(n,["_url","operationName"],a),n}function uT(l){const n={},a=u(l,["video","uri"]);a!=null&&f(n,["uri"],a);const s=u(l,["video","encodedVideo"]);s!=null&&f(n,["videoBytes"],or(s));const r=u(l,["encoding"]);return r!=null&&f(n,["mimeType"],r),n}function rT(l){const n={},a=u(l,["gcsUri"]);a!=null&&f(n,["uri"],a);const s=u(l,["bytesBase64Encoded"]);s!=null&&f(n,["videoBytes"],or(s));const r=u(l,["mimeType"]);return r!=null&&f(n,["mimeType"],r),n}/** 66 * @license 67 * Copyright 2025 Google LLC 68 * SPDX-License-Identifier: Apache-2.0 69 */var Am;(function(l){l.OUTCOME_UNSPECIFIED="OUTCOME_UNSPECIFIED",l.OUTCOME_OK="OUTCOME_OK",l.OUTCOME_FAILED="OUTCOME_FAILED",l.OUTCOME_DEADLINE_EXCEEDED="OUTCOME_DEADLINE_EXCEEDED"})(Am||(Am={}));var Rm;(function(l){l.LANGUAGE_UNSPECIFIED="LANGUAGE_UNSPECIFIED",l.PYTHON="PYTHON"})(Rm||(Rm={}));var Jt;(function(l){l.TYPE_UNSPECIFIED="TYPE_UNSPECIFIED",l.STRING="STRING",l.NUMBER="NUMBER",l.INTEGER="INTEGER",l.BOOLEAN="BOOLEAN",l.ARRAY="ARRAY",l.OBJECT="OBJECT",l.NULL="NULL"})(Jt||(Jt={}));var Nm;(function(l){l.HARM_CATEGORY_UNSPECIFIED="HARM_CATEGORY_UNSPECIFIED",l.HARM_CATEGORY_HATE_SPEECH="HARM_CATEGORY_HATE_SPEECH",l.HARM_CATEGORY_DANGEROUS_CONTENT="HARM_CATEGORY_DANGEROUS_CONTENT",l.HARM_CATEGORY_HARASSMENT="HARM_CATEGORY_HARASSMENT",l.HARM_CATEGORY_SEXUALLY_EXPLICIT="HARM_CATEGORY_SEXUALLY_EXPLICIT",l.HARM_CATEGORY_CIVIC_INTEGRITY="HARM_CATEGORY_CIVIC_INTEGRITY",l.HARM_CATEGORY_IMAGE_HATE="HARM_CATEGORY_IMAGE_HATE",l.HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT="HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT",l.HARM_CATEGORY_IMAGE_HARASSMENT="HARM_CATEGORY_IMAGE_HARASSMENT",l.HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT="HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"})(Nm||(Nm={}));var Mm;(function(l){l.HARM_BLOCK_METHOD_UNSPECIFIED="HARM_BLOCK_METHOD_UNSPECIFIED",l.SEVERITY="SEVERITY",l.PROBABILITY="PROBABILITY"})(Mm||(Mm={}));var Im;(function(l){l.HARM_BLOCK_THRESHOLD_UNSPECIFIED="HARM_BLOCK_THRESHOLD_UNSPECIFIED",l.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",l.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",l.BLOCK_ONLY_HIGH="BLOCK_ONLY_HIGH",l.BLOCK_NONE="BLOCK_NONE",l.OFF="OFF"})(Im||(Im={}));var Dm;(function(l){l.MODE_UNSPECIFIED="MODE_UNSPECIFIED",l.MODE_DYNAMIC="MODE_DYNAMIC"})(Dm||(Dm={}));var Um;(function(l){l.AUTH_TYPE_UNSPECIFIED="AUTH_TYPE_UNSPECIFIED",l.NO_AUTH="NO_AUTH",l.API_KEY_AUTH="API_KEY_AUTH",l.HTTP_BASIC_AUTH="HTTP_BASIC_AUTH",l.GOOGLE_SERVICE_ACCOUNT_AUTH="GOOGLE_SERVICE_ACCOUNT_AUTH",l.OAUTH="OAUTH",l.OIDC_AUTH="OIDC_AUTH"})(Um||(Um={}));var xm;(function(l){l.API_SPEC_UNSPECIFIED="API_SPEC_UNSPECIFIED",l.SIMPLE_SEARCH="SIMPLE_SEARCH",l.ELASTIC_SEARCH="ELASTIC_SEARCH"})(xm||(xm={}));var bm;(function(l){l.URL_RETRIEVAL_STATUS_UNSPECIFIED="URL_RETRIEVAL_STATUS_UNSPECIFIED",l.URL_RETRIEVAL_STATUS_SUCCESS="URL_RETRIEVAL_STATUS_SUCCESS",l.URL_RETRIEVAL_STATUS_ERROR="URL_RETRIEVAL_STATUS_ERROR",l.URL_RETRIEVAL_STATUS_PAYWALL="URL_RETRIEVAL_STATUS_PAYWALL",l.URL_RETRIEVAL_STATUS_UNSAFE="URL_RETRIEVAL_STATUS_UNSAFE"})(bm||(bm={}));var Lm;(function(l){l.FINISH_REASON_UNSPECIFIED="FINISH_REASON_UNSPECIFIED",l.STOP="STOP",l.MAX_TOKENS="MAX_TOKENS",l.SAFETY="SAFETY",l.RECITATION="RECITATION",l.LANGUAGE="LANGUAGE",l.OTHER="OTHER",l.BLOCKLIST="BLOCKLIST",l.PROHIBITED_CONTENT="PROHIBITED_CONTENT",l.SPII="SPII",l.MALFORMED_FUNCTION_CALL="MALFORMED_FUNCTION_CALL",l.IMAGE_SAFETY="IMAGE_SAFETY",l.UNEXPECTED_TOOL_CALL="UNEXPECTED_TOOL_CALL",l.IMAGE_PROHIBITED_CONTENT="IMAGE_PROHIBITED_CONTENT",l.NO_IMAGE="NO_IMAGE"})(Lm||(Lm={}));var wm;(function(l){l.HARM_PROBABILITY_UNSPECIFIED="HARM_PROBABILITY_UNSPECIFIED",l.NEGLIGIBLE="NEGLIGIBLE",l.LOW="LOW",l.MEDIUM="MEDIUM",l.HIGH="HIGH"})(wm||(wm={}));var qm;(function(l){l.HARM_SEVERITY_UNSPECIFIED="HARM_SEVERITY_UNSPECIFIED",l.HARM_SEVERITY_NEGLIGIBLE="HARM_SEVERITY_NEGLIGIBLE",l.HARM_SEVERITY_LOW="HARM_SEVERITY_LOW",l.HARM_SEVERITY_MEDIUM="HARM_SEVERITY_MEDIUM",l.HARM_SEVERITY_HIGH="HARM_SEVERITY_HIGH"})(qm||(qm={}));var Om;(function(l){l.BLOCKED_REASON_UNSPECIFIED="BLOCKED_REASON_UNSPECIFIED",l.SAFETY="SAFETY",l.OTHER="OTHER",l.BLOCKLIST="BLOCKLIST",l.PROHIBITED_CONTENT="PROHIBITED_CONTENT",l.IMAGE_SAFETY="IMAGE_SAFETY"})(Om||(Om={}));var Gm;(function(l){l.TRAFFIC_TYPE_UNSPECIFIED="TRAFFIC_TYPE_UNSPECIFIED",l.ON_DEMAND="ON_DEMAND",l.PROVISIONED_THROUGHPUT="PROVISIONED_THROUGHPUT"})(Gm||(Gm={}));var ga;(function(l){l.MODALITY_UNSPECIFIED="MODALITY_UNSPECIFIED",l.TEXT="TEXT",l.IMAGE="IMAGE",l.AUDIO="AUDIO"})(ga||(ga={}));var Hm;(function(l){l.MEDIA_RESOLUTION_UNSPECIFIED="MEDIA_RESOLUTION_UNSPECIFIED",l.MEDIA_RESOLUTION_LOW="MEDIA_RESOLUTION_LOW",l.MEDIA_RESOLUTION_MEDIUM="MEDIA_RESOLUTION_MEDIUM",l.MEDIA_RESOLUTION_HIGH="MEDIA_RESOLUTION_HIGH"})(Hm||(Hm={}));var Zu;(function(l){l.JOB_STATE_UNSPECIFIED="JOB_STATE_UNSPECIFIED",l.JOB_STATE_QUEUED="JOB_STATE_QUEUED",l.JOB_STATE_PENDING="JOB_STATE_PENDING",l.JOB_STATE_RUNNING="JOB_STATE_RUNNING",l.JOB_STATE_SUCCEEDED="JOB_STATE_SUCCEEDED",l.JOB_STATE_FAILED="JOB_STATE_FAILED",l.JOB_STATE_CANCELLING="JOB_STATE_CANCELLING",l.JOB_STATE_CANCELLED="JOB_STATE_CANCELLED",l.JOB_STATE_PAUSED="JOB_STATE_PAUSED",l.JOB_STATE_EXPIRED="JOB_STATE_EXPIRED",l.JOB_STATE_UPDATING="JOB_STATE_UPDATING",l.JOB_STATE_PARTIALLY_SUCCEEDED="JOB_STATE_PARTIALLY_SUCCEEDED"})(Zu||(Zu={}));var Vm;(function(l){l.TUNING_MODE_UNSPECIFIED="TUNING_MODE_UNSPECIFIED",l.TUNING_MODE_FULL="TUNING_MODE_FULL",l.TUNING_MODE_PEFT_ADAPTER="TUNING_MODE_PEFT_ADAPTER"})(Vm||(Vm={}));var zm;(function(l){l.ADAPTER_SIZE_UNSPECIFIED="ADAPTER_SIZE_UNSPECIFIED",l.ADAPTER_SIZE_ONE="ADAPTER_SIZE_ONE",l.ADAPTER_SIZE_TWO="ADAPTER_SIZE_TWO",l.ADAPTER_SIZE_FOUR="ADAPTER_SIZE_FOUR",l.ADAPTER_SIZE_EIGHT="ADAPTER_SIZE_EIGHT",l.ADAPTER_SIZE_SIXTEEN="ADAPTER_SIZE_SIXTEEN",l.ADAPTER_SIZE_THIRTY_TWO="ADAPTER_SIZE_THIRTY_TWO"})(zm||(zm={}));var Pm;(function(l){l.TUNING_TASK_UNSPECIFIED="TUNING_TASK_UNSPECIFIED",l.TUNING_TASK_I2V="TUNING_TASK_I2V",l.TUNING_TASK_T2V="TUNING_TASK_T2V"})(Pm||(Pm={}));var Bm;(function(l){l.FEATURE_SELECTION_PREFERENCE_UNSPECIFIED="FEATURE_SELECTION_PREFERENCE_UNSPECIFIED",l.PRIORITIZE_QUALITY="PRIORITIZE_QUALITY",l.BALANCED="BALANCED",l.PRIORITIZE_COST="PRIORITIZE_COST"})(Bm||(Bm={}));var Ym;(function(l){l.UNSPECIFIED="UNSPECIFIED",l.BLOCKING="BLOCKING",l.NON_BLOCKING="NON_BLOCKING"})(Ym||(Ym={}));var Jm;(function(l){l.MODE_UNSPECIFIED="MODE_UNSPECIFIED",l.MODE_DYNAMIC="MODE_DYNAMIC"})(Jm||(Jm={}));var km;(function(l){l.ENVIRONMENT_UNSPECIFIED="ENVIRONMENT_UNSPECIFIED",l.ENVIRONMENT_BROWSER="ENVIRONMENT_BROWSER"})(km||(km={}));var Fm;(function(l){l.MODE_UNSPECIFIED="MODE_UNSPECIFIED",l.AUTO="AUTO",l.ANY="ANY",l.NONE="NONE",l.VALIDATED="VALIDATED"})(Fm||(Fm={}));var Km;(function(l){l.BLOCK_LOW_AND_ABOVE="BLOCK_LOW_AND_ABOVE",l.BLOCK_MEDIUM_AND_ABOVE="BLOCK_MEDIUM_AND_ABOVE",l.BLOCK_ONLY_HIGH="BLOCK_ONLY_HIGH",l.BLOCK_NONE="BLOCK_NONE"})(Km||(Km={}));var Xm;(function(l){l.DONT_ALLOW="DONT_ALLOW",l.ALLOW_ADULT="ALLOW_ADULT",l.ALLOW_ALL="ALLOW_ALL"})(Xm||(Xm={}));var Qm;(function(l){l.auto="auto",l.en="en",l.ja="ja",l.ko="ko",l.hi="hi",l.zh="zh",l.pt="pt",l.es="es"})(Qm||(Qm={}));var Zm;(function(l){l.MASK_MODE_DEFAULT="MASK_MODE_DEFAULT",l.MASK_MODE_USER_PROVIDED="MASK_MODE_USER_PROVIDED",l.MASK_MODE_BACKGROUND="MASK_MODE_BACKGROUND",l.MASK_MODE_FOREGROUND="MASK_MODE_FOREGROUND",l.MASK_MODE_SEMANTIC="MASK_MODE_SEMANTIC"})(Zm||(Zm={}));var $m;(function(l){l.CONTROL_TYPE_DEFAULT="CONTROL_TYPE_DEFAULT",l.CONTROL_TYPE_CANNY="CONTROL_TYPE_CANNY",l.CONTROL_TYPE_SCRIBBLE="CONTROL_TYPE_SCRIBBLE",l.CONTROL_TYPE_FACE_MESH="CONTROL_TYPE_FACE_MESH"})($m||($m={}));var Wm;(function(l){l.SUBJECT_TYPE_DEFAULT="SUBJECT_TYPE_DEFAULT",l.SUBJECT_TYPE_PERSON="SUBJECT_TYPE_PERSON",l.SUBJECT_TYPE_ANIMAL="SUBJECT_TYPE_ANIMAL",l.SUBJECT_TYPE_PRODUCT="SUBJECT_TYPE_PRODUCT"})(Wm||(Wm={}));var jm;(function(l){l.EDIT_MODE_DEFAULT="EDIT_MODE_DEFAULT",l.EDIT_MODE_INPAINT_REMOVAL="EDIT_MODE_INPAINT_REMOVAL",l.EDIT_MODE_INPAINT_INSERTION="EDIT_MODE_INPAINT_INSERTION",l.EDIT_MODE_OUTPAINT="EDIT_MODE_OUTPAINT",l.EDIT_MODE_CONTROLLED_EDITING="EDIT_MODE_CONTROLLED_EDITING",l.EDIT_MODE_STYLE="EDIT_MODE_STYLE",l.EDIT_MODE_BGSWAP="EDIT_MODE_BGSWAP",l.EDIT_MODE_PRODUCT_IMAGE="EDIT_MODE_PRODUCT_IMAGE"}
69)(jm||(jm={}));var ep;(function(l){l.FOREGROUND="FOREGROUND",l.BACKGROUND="BACKGROUND",l.PROMPT="PROMPT",l.SEMANTIC="SEMANTIC",l.INTERACTIVE="INTERACTIVE"})(ep||(ep={}));var tp;(function(l){l.ASSET="ASSET",l.STYLE="STYLE"})(tp||(tp={}));var np;(function(l){l.INSERT="INSERT",l.REMOVE="REMOVE",l.REMOVE_STATIC="REMOVE_STATIC",l.OUTPAINT="OUTPAINT"})(np||(np={}));var ip;(function(l){l.OPTIMIZED="OPTIMIZED",l.LOSSLESS="LOSSLESS"})(ip||(ip={}));var lp;(function(l){l.STATE_UNSPECIFIED="STATE_UNSPECIFIED",l.PROCESSING="PROCESSING",l.ACTIVE="ACTIVE",l.FAILED="FAILED"})(lp||(lp={}));var op;(function(l){l.SOURCE_UNSPECIFIED="SOURCE_UNSPECIFIED",l.UPLOADED="UPLOADED",l.GENERATED="GENERATED"})(op||(op={}));var ap;(function(l){l.TURN_COMPLETE_REASON_UNSPECIFIED="TURN_COMPLETE_REASON_UNSPECIFIED",l.MALFORMED_FUNCTION_CALL="MALFORMED_FUNCTION_CALL",l.RESPONSE_REJECTED="RESPONSE_REJECTED",l.NEED_MORE_INPUT="NEED_MORE_INPUT"})(ap||(ap={}));var sp;(function(l){l.MODALITY_UNSPECIFIED="MODALITY_UNSPECIFIED",l.TEXT="TEXT",l.IMAGE="IMAGE",l.VIDEO="VIDEO",l.AUDIO="AUDIO",l.DOCUMENT="DOCUMENT"})(sp||(sp={}));var up;(function(l){l.START_SENSITIVITY_UNSPECIFIED="START_SENSITIVITY_UNSPECIFIED",l.START_SENSITIVITY_HIGH="START_SENSITIVITY_HIGH",l.START_SENSITIVITY_LOW="START_SENSITIVITY_LOW"})(up||(up={}));var rp;(function(l){l.END_SENSITIVITY_UNSPECIFIED="END_SENSITIVITY_UNSPECIFIED",l.END_SENSITIVITY_HIGH="END_SENSITIVITY_HIGH",l.END_SENSITIVITY_LOW="END_SENSITIVITY_LOW"})(rp||(rp={}));var cp;(function(l){l.ACTIVITY_HANDLING_UNSPECIFIED="ACTIVITY_HANDLING_UNSPECIFIED",l.START_OF_ACTIVITY_INTERRUPTS="START_OF_ACTIVITY_INTERRUPTS",l.NO_INTERRUPTION="NO_INTERRUPTION"})(cp||(cp={}));var fp;(function(l){l.TURN_COVERAGE_UNSPECIFIED="TURN_COVERAGE_UNSPECIFIED",l.TURN_INCLUDES_ONLY_ACTIVITY="TURN_INCLUDES_ONLY_ACTIVITY",l.TURN_INCLUDES_ALL_INPUT="TURN_INCLUDES_ALL_INPUT"})(fp||(fp={}));var dp;(function(l){l.SCHEDULING_UNSPECIFIED="SCHEDULING_UNSPECIFIED",l.SILENT="SILENT",l.WHEN_IDLE="WHEN_IDLE",l.INTERRUPT="INTERRUPT"})(dp||(dp={}));var mp;(function(l){l.SCALE_UNSPECIFIED="SCALE_UNSPECIFIED",l.C_MAJOR_A_MINOR="C_MAJOR_A_MINOR",l.D_FLAT_MAJOR_B_FLAT_MINOR="D_FLAT_MAJOR_B_FLAT_MINOR",l.D_MAJOR_B_MINOR="D_MAJOR_B_MINOR",l.E_FLAT_MAJOR_C_MINOR="E_FLAT_MAJOR_C_MINOR",l.E_MAJOR_D_FLAT_MINOR="E_MAJOR_D_FLAT_MINOR",l.F_MAJOR_D_MINOR="F_MAJOR_D_MINOR",l.G_FLAT_MAJOR_E_FLAT_MINOR="G_FLAT_MAJOR_E_FLAT_MINOR",l.G_MAJOR_E_MINOR="G_MAJOR_E_MINOR",l.A_FLAT_MAJOR_F_MINOR="A_FLAT_MAJOR_F_MINOR",l.A_MAJOR_G_FLAT_MINOR="A_MAJOR_G_FLAT_MINOR",l.B_FLAT_MAJOR_G_MINOR="B_FLAT_MAJOR_G_MINOR",l.B_MAJOR_A_FLAT_MINOR="B_MAJOR_A_FLAT_MINOR"})(mp||(mp={}));var pp;(function(l){l.MUSIC_GENERATION_MODE_UNSPECIFIED="MUSIC_GENERATION_MODE_UNSPECIFIED",l.QUALITY="QUALITY",l.DIVERSITY="DIVERSITY",l.VOCALIZATION="VOCALIZATION"})(pp||(pp={}));var Yi;(function(l){l.PLAYBACK_CONTROL_UNSPECIFIED="PLAYBACK_CONTROL_UNSPECIFIED",l.PLAY="PLAY",l.PAUSE="PAUSE",l.STOP="STOP",l.RESET_CONTEXT="RESET_CONTEXT"})(Yi||(Yi={}));class $u{constructor(n){const a={};for(const s of n.headers.entries())a[s[0]]=s[1];this.headers=a,this.responseInternal=n}json(){return this.responseInternal.json()}}class kl{get text(){var n,a,s,r,m,p,g,y;if(((r=(s=(a=(n=this.candidates)===null||n===void 0?void 0:n[0])===null||a===void 0?void 0:a.content)===null||s===void 0?void 0:s.parts)===null||r===void 0?void 0:r.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning text from the first one.");let h="",v=!1;const S=[];for(const _ of(y=(g=(p=(m=this.candidates)===null||m===void 0?void 0:m[0])===null||p===void 0?void 0:p.content)===null||g===void 0?void 0:g.parts)!==null&&y!==void 0?y:[]){for(const[M,w]of Object.entries(_))M!=="text"&&M!=="thought"&&(w!==null||w!==void 0)&&S.push(M);if(typeof _.text=="string"){if(typeof _.thought=="boolean"&&_.thought)continue;v=!0,h+=_.text}}return S.length>0&&console.warn(`there are non-text parts ${S} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`),v?h:void 0}get data(){var n,a,s,r,m,p,g,y;if(((r=(s=(a=(n=this.candidates)===null||n===void 0?void 0:n[0])===null||a===void 0?void 0:a.content)===null||s===void 0?void 0:s.parts)===null||r===void 0?void 0:r.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning data from the first one.");let h="";const v=[];for(const S of(y=(g=(p=(m=this.candidates)===null||m===void 0?void 0:m[0])===null||p===void 0?void 0:p.content)===null||g===void 0?void 0:g.parts)!==null&&y!==void 0?y:[]){for(const[_,M]of Object.entries(S))_!=="inlineData"&&(M!==null||M!==void 0)&&v.push(_);
69S.inlineData&&typeof S.inlineData.data=="string"&&(h+=atob(S.inlineData.data))}return v.length>0&&console.warn(`there are non-data parts ${v} in the response, returning concatenation of all data parts. Please refer to the non data parts for a full response from model.`),h.length>0?btoa(h):void 0}get functionCalls(){var n,a,s,r,m,p,g,y;if(((r=(s=(a=(n=this.candidates)===null||n===void 0?void 0:n[0])===null||a===void 0?void 0:a.content)===null||s===void 0?void 0:s.parts)===null||r===void 0?void 0:r.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning function calls from the first one.");const h=(y=(g=(p=(m=this.candidates)===null||m===void 0?void 0:m[0])===null||p===void 0?void 0:p.content)===null||g===void 0?void 0:g.parts)===null||y===void 0?void 0:y.filter(v=>v.functionCall).map(v=>v.functionCall).filter(v=>v!==void 0);if((h==null?void 0:h.length)!==0)return h}get executableCode(){var n,a,s,r,m,p,g,y,h;if(((r=(s=(a=(n=this.candidates)===null||n===void 0?void 0:n[0])===null||a===void 0?void 0:a.content)===null||s===void 0?void 0:s.parts)===null||r===void 0?void 0:r.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning executable code from the first one.");const v=(y=(g=(p=(m=this.candidates)===null||m===void 0?void 0:m[0])===null||p===void 0?void 0:p.content)===null||g===void 0?void 0:g.parts)===null||y===void 0?void 0:y.filter(S=>S.executableCode).map(S=>S.executableCode).filter(S=>S!==void 0);if((v==null?void 0:v.length)!==0)return(h=v==null?void 0:v[0])===null||h===void 0?void 0:h.code}get codeExecutionResult(){var n,a,s,r,m,p,g,y,h;if(((r=(s=(a=(n=this.candidates)===null||n===void 0?void 0:n[0])===null||a===void 0?void 0:a.content)===null||s===void 0?void 0:s.parts)===null||r===void 0?void 0:r.length)===0)return;this.candidates&&this.candidates.length>1&&console.warn("there are multiple candidates in the response, returning code execution result from the first one.");const v=(y=(g=(p=(m=this.candidates)===null||m===void 0?void 0:m[0])===null||p===void 0?void 0:p.content)===null||g===void 0?void 0:g.parts)===null||y===void 0?void 0:y.filter(S=>S.codeExecutionResult).map(S=>S.codeExecutionResult).filter(S=>S!==void 0);if((v==null?void 0:v.length)!==0)return(h=v==null?void 0:v[0])===null||h===void 0?void 0:h.output}}class hp{}class gp{}class cT{}class fT{}class dT{}class mT{}class yp{}class Tp{}class vp{}class pT{}class ya{_fromAPIResponse({apiResponse:n,isVertexAI:a}){const s=new ya;let r;const m=n;return a?r=tT(m):r=eT(m),Object.assign(s,r),s}}class Sp{}class Ep{}class _p{}class hT{}class gT{}class yT{}class Cp{}class TT{get text(){var n,a,s;let r="",m=!1;const p=[];for(const g of(s=(a=(n=this.serverContent)===null||n===void 0?void 0:n.modelTurn)===null||a===void 0?void 0:a.parts)!==null&&s!==void 0?s:[]){for(const[y,h]of Object.entries(g))y!=="text"&&y!=="thought"&&h!==null&&p.push(y);if(typeof g.text=="string"){if(typeof g.thought=="boolean"&&g.thought)continue;m=!0,r+=g.text}}return p.length>0&&console.warn(`there are non-text parts ${p} in the response, returning concatenation of all text parts. Please refer to the non text parts for a full response from model.`),m?r:void 0}get data(){var n,a,s;let r="";const m=[];for(const p of(s=(a=(n=this.serverContent)===null||n===void 0?void 0:n.modelTurn)===null||a===void 0?void 0:a.parts)!==null&&s!==void 0?s:[]){for(const[g,y]of Object.entries(p))g!=="inlineData"&&y!==null&&m.push(g);p.inlineData&&typeof p.inlineData.data=="string"&&(r+=atob(p.inlineData.data))}return m.length>0&&console.warn(`there are non-data parts ${m} in the response, returning concatenation of all data parts. Please refer to the non data parts for a full response from model.`),r.length>0?btoa(r):void 0}}class vT{get audioChunk(){if(this.serverContent&&this.serverContent.audioChunks&&this.serverContent.audioChunks.length>0)return this.serverContent.audioChunks[0]}}/** 70 * @license 71 * Copyright 2025 Google LLC 72 * SPDX-License-Identifier: Apache-2.0
73 */function Se(l,n){if(!n||typeof n!="string")throw new Error("model is required and must be a string");if(l.isVertexAI()){if(n.startsWith("publishers/")||n.startsWith("projects/")||n.startsWith("models/"))return n;if(n.indexOf("/")>=0){const a=n.split("/",2);return`publishers/${a[0]}/models/${a[1]}`}else return`publishers/google/models/${n}`}else return n.startsWith("models/")||n.startsWith("tunedModels/")?n:`models/${n}`}function Yp(l,n){const a=Se(l,n);return a?a.startsWith("publishers/")&&l.isVertexAI()?`projects/${l.getProject()}/locations/${l.getLocation()}/${a}`:a.startsWith("models/")&&l.isVertexAI()?`projects/${l.getProject()}/locations/${l.getLocation()}/publishers/google/${a}`:a:""}function Jp(l){return Array.isArray(l)?l.map(n=>Ta(n)):[Ta(l)]}function Ta(l){if(typeof l=="object"&&l!==null)return l;throw new Error(`Could not parse input as Blob. Unsupported blob type: ${typeof l}`)}function kp(l){const n=Ta(l);if(n.mimeType&&n.mimeType.startsWith("image/"))return n;throw new Error(`Unsupported mime type: ${n.mimeType}`)}function Fp(l){const n=Ta(l);if(n.mimeType&&n.mimeType.startsWith("audio/"))return n;throw new Error(`Unsupported mime type: ${n.mimeType}`)}function Ap(l){if(l==null)throw new Error("PartUnion is required");if(typeof l=="object")return l;if(typeof l=="string")return{text:l};throw new Error(`Unsupported part type: ${typeof l}`)}function Kp(l){if(l==null||Array.isArray(l)&&l.length===0)throw new Error("PartListUnion is required");return Array.isArray(l)?l.map(n=>Ap(n)):[Ap(l)]}function Wu(l){return l!=null&&typeof l=="object"&&"parts"in l&&Array.isArray(l.parts)}function Rp(l){return l!=null&&typeof l=="object"&&"functionCall"in l}function Np(l){return l!=null&&typeof l=="object"&&"functionResponse"in l}function nt(l){if(l==null)throw new Error("ContentUnion is required");return Wu(l)?l:{role:"user",parts:Kp(l)}}function ar(l,n){if(!n)return[];if(l.isVertexAI()&&Array.isArray(n))return n.flatMap(a=>{const s=nt(a);return s.parts&&s.parts.length>0&&s.parts[0].text!==void 0?[s.parts[0].text]:[]});if(l.isVertexAI()){const a=nt(n);return a.parts&&a.parts.length>0&&a.parts[0].text!==void 0?[a.parts[0].text]:[]}return Array.isArray(n)?n.map(a=>nt(a)):[nt(n)]}function wt(l){if(l==null||Array.isArray(l)&&l.length===0)throw new Error("contents are required");if(!Array.isArray(l)){if(Rp(l)||Np(l))throw new Error("To specify functionCall or functionResponse parts, please wrap them in a Content object, specifying the role for them");return[nt(l)]}const n=[],a=[],s=Wu(l[0]);for(const r of l){const m=Wu(r);if(m!=s)throw new Error("Mixing Content and Parts is not supported, please group the parts into a the appropriate Content objects and specify the roles for them");if(m)n.push(r);else{if(Rp(r)||Np(r))throw new Error("To specify functionCall or functionResponse parts, please wrap them, and any other parts, in Content objects as appropriate, specifying the role for them");a.push(r)}}return s||n.push({role:"user",parts:Kp(a)}),n}function ST(l,n){l.includes("null")&&(n.nullable=!0);const a=l.filter(s=>s!=="null");if(a.length===1)n.type=Object.values(Jt).includes(a[0].toUpperCase())?a[0].toUpperCase():Jt.TYPE_UNSPECIFIED;else{n.anyOf=[];for(const s of a)n.anyOf.push({type:Object.values(Jt).includes(s.toUpperCase())?s.toUpperCase():Jt.TYPE_UNSPECIFIED})}}function Ji(l){const n={},a=["items"],s=["anyOf"],r=["properties"];if(l.type&&l.anyOf)throw new Error("type and anyOf cannot be both populated.");const m=l.anyOf;m!=null&&m.length==2&&(m[0].type==="null"?(n.nullable=!0,l=m[1]):m[1].type==="null"&&(n.nullable=!0,l=m[0])),l.type instanceof Array&&ST(l.type,n);for(const[p,g]of Object.entries(l))if(g!=null)if(p=="type"){if(g==="null")throw new Error("type: null can not be the only possible type for the field.");if(g instanceof Array)continue;n.type=Object.values(Jt).includes(g.toUpperCase())?g.toUpperCase():Jt.TYPE_UNSPECIFIED}else if(a.includes(p))n[p]=Ji(g);else if(s.includes(p)){const y=[];for(const h of g){if(h.type=="null"){n.nullable=!0;continue}y.push(Ji(h))}n[p]=y}else if(r.includes(p)){const y={};for(const[h,v]of Object.entries(g))y[h]=Ji(v);n[p]=y}else{if(p==="additionalProperties")continue;n[p]=g}return n}function sr(l){return Ji(l)}function ur(l){if(typeof l=="object")return l;if(typeof l=="string")return{voiceConfig:{prebuiltVoiceConfig:{voiceName:l}}};throw new Error(`Unsupported speechConfig type: ${typeof l}`)}function rr(l){if("multiSpeakerVoiceConfig"in l)throw new Error("multiSpeakerVoiceConfig is not supported in the live API.");return l}function Ki(l){if(l.functionDeclarations)for(const n of l.functionDeclarations)n.parameters&&(Object.keys(n.parameters).includes("$schema")?n.parametersJsonSchema||(n.parametersJsonSchema=n.parameters,delete n.parameters):n.parameters=Ji(n.parameters)),n.response&&(Object.keys(n.response).includes("$schema")?n.responseJsonSchema||(n.responseJsonSchema=n.response,delete n.response):n.response=Ji(n.response));return l}function Xi(l){if(l==null)throw new Error("tools is required");if(!Array.isArray(l))throw new Error("tools is required and must be an array of Tools");const n=[];for(const a of l)n.push(a);return n}function ET(l,n,a,s=1){const r=!n.startsWith(`${a}/`)&&n.split("/").length===s;return l.isVertexAI()?n.startsWith("projects/")?n:n.startsWith("locations/")?`projects/${l.getProject()}/${n}`:n.startsWith(`${a}/`)?`projects/${l.getProject()}/locations/${l.getLocation()}/${n}`:r?`projects/${l.getProject()}/locations/${l.getLocation()}/${a}/${n}`:n:r?`${a}/${n}`:n}
73function cn(l,n){if(typeof n!="string")throw new Error("name must be a string");return ET(l,n,"cachedContents")}function Xp(l){switch(l){case"STATE_UNSPECIFIED":return"JOB_STATE_UNSPECIFIED";case"CREATING":return"JOB_STATE_RUNNING";case"ACTIVE":return"JOB_STATE_SUCCEEDED";case"FAILED":return"JOB_STATE_FAILED";default:return l}}function On(l){return or(l)}function _T(l){return l!=null&&typeof l=="object"&&"name"in l}function CT(l){return l!=null&&typeof l=="object"&&"video"in l}function AT(l){return l!=null&&typeof l=="object"&&"uri"in l}function Qp(l){var n;let a;if(_T(l)&&(a=l.name),!(AT(l)&&(a=l.uri,a===void 0))&&!(CT(l)&&(a=(n=l.video)===null||n===void 0?void 0:n.uri,a===void 0))){if(typeof l=="string"&&(a=l),a===void 0)throw new Error("Could not extract file name from the provided input.");if(a.startsWith("https://")){const r=a.split("files/")[1].match(/[a-z0-9]+/);if(r===null)throw new Error(`Could not extract file name from URI ${a}`);a=r[0]}else a.startsWith("files/")&&(a=a.split("files/")[1]);return a}}function Zp(l,n){let a;return l.isVertexAI()?a=n?"publishers/google/models":"models":a=n?"models":"tunedModels",a}function $p(l){for(const n of["models","tunedModels","publisherModels"])if(RT(l,n))return l[n];return[]}function RT(l,n){return l!==null&&typeof l=="object"&&n in l}function NT(l,n={}){const a=l,s={name:a.name,description:a.description,parametersJsonSchema:a.inputSchema};
73return a.outputSchema&&(s.responseJsonSchema=a.outputSchema),n.behavior&&(s.behavior=n.behavior),{functionDeclarations:[s]}}function MT(l,n={}){const a=[],s=new Set;for(const r of l){const m=r.name;if(s.has(m))throw new Error(`Duplicate function name ${m} found in MCP tools. Please ensure function names are unique.`);s.add(m);const p=NT(r,n);p.functionDeclarations&&a.push(...p.functionDeclarations)}return{functionDeclarations:a}}function Wp(l,n){let a;if(typeof n=="string")if(l.isVertexAI())if(n.startsWith("gs://"))a={format:"jsonl",gcsUri:[n]};else if(n.startsWith("bq://"))a={format:"bigquery",bigqueryUri:n};else throw new Error(`Unsupported string source for Vertex AI: ${n}`);else if(n.startsWith("files/"))a={fileName:n};else throw new Error(`Unsupported string source for Gemini API: ${n}`);else if(Array.isArray(n)){if(l.isVertexAI())throw new Error("InlinedRequest[] is not supported in Vertex AI.");a={inlinedRequests:n}}else a=n;const s=[a.gcsUri,a.bigqueryUri].filter(Boolean).length,r=[a.inlinedRequests,a.fileName].filter(Boolean).length;if(l.isVertexAI()){if(r>0||s!==1)throw new Error("Exactly one of `gcsUri` or `bigqueryUri` must be set for Vertex AI.")}else if(s>0||r!==1)throw new Error("Exactly one of `inlinedRequests`, `fileName`, must be set for Gemini API.");return a}function IT(l){if(typeof l!="string")return l;const n=l;if(n.startsWith("gs://"))return{format:"jsonl",gcsUri:n};if(n.startsWith("bq://"))return{format:"bigquery",bigqueryUri:n};throw new Error(`Unsupported destination: ${n}`)}function jp(l){if(typeof l!="object"||l===null)return{};const n=l,a=n.inlinedResponses;if(typeof a!="object"||a===null)return l;const r=a.inlinedResponses;if(!Array.isArray(r)||r.length===0)return l;let m=!1;for(const p of r){if(typeof p!="object"||p===null)continue;const y=p.response;if(typeof y!="object"||y===null)continue;if(y.embedding!==void 0){m=!0;break}}return m&&(n.inlinedEmbedContentResponses=n.inlinedResponses,delete n.inlinedResponses),l}function Qi(l,n){const a=n;if(!l.isVertexAI()){if(/batches\/[^/]+$/.test(a))return a.split("/").pop();throw new Error(`Invalid batch job name: ${a}.`)}if(/^projects\/[^/]+\/locations\/[^/]+\/batchPredictionJobs\/[^/]+$/.test(a))return a.split("/").pop();if(/^\d+$/.test(a))return a;throw new Error(`Invalid batch job name: ${a}.`)}function eh(l){const n=l;return n==="BATCH_STATE_UNSPECIFIED"?"JOB_STATE_UNSPECIFIED":n==="BATCH_STATE_PENDING"?"JOB_STATE_PENDING":n==="BATCH_STATE_RUNNING"?"JOB_STATE_RUNNING":n==="BATCH_STATE_SUCCEEDED"?"JOB_STATE_SUCCEEDED":n==="BATCH_STATE_FAILED"?"JOB_STATE_FAILED":n==="BATCH_STATE_CANCELLED"?"JOB_STATE_CANCELLED":n==="BATCH_STATE_EXPIRED"?"JOB_STATE_EXPIRED":n}/** 74 * @license 75 * Copyright 2025 Google LLC 76 * SPDX-License-Identifier: Apache-2.0 77 */function DT(l){const n={},a=u(l,["responsesFile"]);a!=null&&f(n,["fileName"],a);const s=u(l,["inlinedResponses","inlinedResponses"]);if(s!=null){let m=s;Array.isArray(m)&&(m=m.map(p=>lv(p))),f(n,["inlinedResponses"],m)}const r=u(l,["inlinedEmbedContentResponses","inlinedResponses"]);if(r!=null){let m=r;Array.isArray(m)&&(m=m.map(p=>p)),f(n,["inlinedEmbedContentResponses"],m)}return n}function UT(l){const n={},a=u(l,["predictionsFormat"]);a!=null&&f(n,["format"],a);const s=u(l,["gcsDestination","outputUriPrefix"]);s!=null&&f(n,["gcsUri"],s);const r=u(l,["bigqueryDestination","outputUri"]);return r!=null&&f(n,["bigqueryUri"],r),n}function xT(l){const n={},a=u(l,["format"]);a!=null&&f(n,["predictionsFormat"],a);const s=u(l,["gcsUri"]);s!=null&&f(n,["gcsDestination","outputUriPrefix"],s);const r=u(l,["bigqueryUri"]);if(r!=null&&f(n,["bigqueryDestination","outputUri"],r),u(l,["fileName"])!==void 0)throw new Error("fileName parameter is not supported in Vertex AI.");if(u(l,["inlinedResponses"])!==void 0)throw new Error("inlinedResponses parameter is not supported in Vertex AI.");if(u(l,["inlinedEmbedContentResponses"])!==void 0)throw new Error("inlinedEmbedContentResponses parameter is not supported in Vertex AI.");return n}function Kl(l){const n={},a=u(l,["name"]);a!=null&&f(n,["name"],a);const s=u(l,["metadata","displayName"]);s!=null&&f(n,["displayName"],s);
77const r=u(l,["metadata","state"]);r!=null&&f(n,["state"],eh(r));const m=u(l,["metadata","createTime"]);m!=null&&f(n,["createTime"],m);const p=u(l,["metadata","endTime"]);p!=null&&f(n,["endTime"],p);const g=u(l,["metadata","updateTime"]);g!=null&&f(n,["updateTime"],g);const y=u(l,["metadata","model"]);y!=null&&f(n,["model"],y);const h=u(l,["metadata","output"]);return h!=null&&f(n,["dest"],DT(jp(h))),n}function ju(l){const n={},a=u(l,["name"]);a!=null&&f(n,["name"],a);const s=u(l,["displayName"]);s!=null&&f(n,["displayName"],s);const r=u(l,["state"]);r!=null&&f(n,["state"],eh(r));const m=u(l,["error"]);m!=null&&f(n,["error"],m);const p=u(l,["createTime"]);p!=null&&f(n,["createTime"],p);const g=u(l,["startTime"]);g!=null&&f(n,["startTime"],g);const y=u(l,["endTime"]);y!=null&&f(n,["endTime"],y);const h=u(l,["updateTime"]);h!=null&&f(n,["updateTime"],h);const v=u(l,["model"]);v!=null&&f(n,["model"],v);const S=u(l,["inputConfig"]);S!=null&&f(n,["src"],bT(S));const _=u(l,["outputConfig"]);return _!=null&&f(n,["dest"],UT(jp(_))),n}function bT(l){const n={},a=u(l,["instancesFormat"]);a!=null&&f(n,["format"],a);const s=u(l,["gcsSource","uris"]);s!=null&&f(n,["gcsUri"],s);const r=u(l,["bigquerySource","inputUri"]);return r!=null&&f(n,["bigqueryUri"],r),n}function LT(l,n){const a={};if(u(n,["format"])!==void 0)throw new Error("format parameter is not supported in Gemini API.");if(u(n,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");if(u(n,["bigqueryUri"])!==void 0)throw new Error("bigqueryUri parameter is not supported in Gemini API.");const s=u(n,["fileName"]);s!=null&&f(a,["fileName"],s);const r=u(n,["inlinedRequests"]);if(r!=null){let m=r;Array.isArray(m)&&(m=m.map(p=>iv(l,p))),f(a,["requests","requests"],m)}return a}function wT(l){const n={},a=u(l,["format"]);a!=null&&f(n,["instancesFormat"],a);const s=u(l,["gcsUri"]);s!=null&&f(n,["gcsSource","uris"],s);const r=u(l,["bigqueryUri"]);if(r!=null&&f(n,["bigquerySource","inputUri"],r),u(l,["fileName"])!==void 0)throw new Error("fileName parameter is not supported in Vertex AI.");if(u(l,["inlinedRequests"])!==void 0)throw new Error("inlinedRequests parameter is not supported in Vertex AI.");return n}function qT(l){const n={};if(u(l,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(l,["data"]);a!=null&&f(n,["data"],a);const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function OT(l,n){const a={},s=u(n,["name"]);return s!=null&&f(a,["_url","name"],Qi(l,s)),a}function GT(l,n){const a={},s=u(n,["name"]);return s!=null&&f(a,["_url","name"],Qi(l,s)),a}function HT(l){const n={},a=u(l,["content"]);a!=null&&f(n,["content"],a);const s=u(l,["citationMetadata"]);s!=null&&f(n,["citationMetadata"],VT(s));const r=u(l,["tokenCount"]);r!=null&&f(n,["tokenCount"],r);const m=u(l,["finishReason"]);m!=null&&f(n,["finishReason"],m);const p=u(l,["urlContextMetadata"]);p!=null&&f(n,["urlContextMetadata"],p);const g=u(l,["avgLogprobs"]);g!=null&&f(n,["avgLogprobs"],g);const y=u(l,["groundingMetadata"]);y!=null&&f(n,["groundingMetadata"],y);const h=u(l,["index"]);h!=null&&f(n,["index"],h);const v=u(l,["logprobsResult"]);v!=null&&f(n,["logprobsResult"],v);const S=u(l,["safetyRatings"]);if(S!=null){let _=S;Array.isArray(_)&&(_=_.map(M=>M)),f(n,["safetyRatings"],_)}return n}function VT(l){const n={},a=u(l,["citationSources"]);if(a!=null){let s=a;Array.isArray(s)&&(s=s.map(r=>r)),f(n,["citations"],s)}return n}function th(l){const n={},a=u(l,["parts"]);if(a!=null){let r=a;Array.isArray(r)&&(r=r.map(m=>fv(m))),f(n,["parts"],r)}const s=u(l,["role"]);return s!=null&&f(n,["role"],s),n}function zT(l,n){const a={},s=u(l,["displayName"]);if(n!==void 0&&s!=null&&f(n,["batch","displayName"],s),u(l,["dest"])!==void 0)throw new Error("dest parameter is not supported in Gemini API.");return a}function PT(l,n){const a={},s=u(l,["displayName"]);n!==void 0&&s!=null&&f(n,["displayName"],s);const r=u(l,["dest"]);return n!==void 0&&r!=null&&f(n,["outputConfig"],xT(IT(r))),a}function Mp(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["src"]);r!=null&&f(a,["batch","inputConfig"],LT(l,Wp(l,r)));const m=u(n,["config"]);return m!=null&&zT(m,a),a}function BT(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["model"],Se(l,s));const r=u(n,["src"]);r!=null&&f(a,["inputConfig"],wT(Wp(l,r)));const m=u(n,["config"]);return m!=null&&PT(m,a),a}function YT(l,n){const a={},s=u(l,["displayName"]);return n!==void 0&&s!=null&&f(n,["batch","displayName"],s),a}function Ku(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["src"]);r!=null&&f(a,["batch","inputConfig"],ZT(l,r));const m=u(n,["config"]);return m!=null&&YT(m,a),a}function JT(l,n){const a={},s=u(n,["name"]);return s!=null&&f(a,["_url","name"],Qi(l,s)),a}function kT(l,n){const a={},s=u(n,["name"]);return s!=null&&f(a,["_url","name"],Qi(l,s)),a}function FT(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["name"]);s!=null&&f(n,["name"],s);const r=u(l,["done"]);r!=null&&f(n,["done"],r);const m=u(l,["error"]);return m!=null&&f(n,["error"],m),n}function KT(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["name"]);s!=null&&f(n,["name"],s);const r=u(l,["done"]);r!=null&&f(n,["done"],r);const m=u(l,["error"]);return m!=null&&f(n,["error"],m),n}function XT(l,n){const a={},s=u(n,["contents"]);if(s!=null){let m=ar(l,s);Array.isArray(m)&&(m=m.map(p=>p)),f(a,["requests[]","request","content"],m)}const r=u(n,["config"]);return r!=null&&f(a,["_self"],QT(r,a)),a}function QT(l,n){const a={},s=u(l,["taskType"]);n!==void 0&&s!=null&&f(n,["requests[]","taskType"],s);const r=u(l,["title"]);n!==void 0&&r!=null&&f(n,["requests[]","title"],r);const m=u(l,["outputDimensionality"]);if(n!==void 0&&m!=null&&f(n,["requests[]","outputDimensionality"],m),u(l,["mimeType"])!==void 0)throw new Error("mimeType parameter is not supported in Gemini API.");if(u(l,["autoTruncate"])!==void 0)throw new Error("autoTruncate parameter is not supported in Gemini API.");return a}function ZT(l,n){const a={},s=u(n,["fileName"]);s!=null&&f(a,["file_name"],s);const r=u(n,["inlinedRequests"]);return r!=null&&f(a,["requests"],XT(l,r)),a}function $T(l){const n={};if(u(l,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(l,["fileUri"]);a!=null&&f(n,["fileUri"],a);const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function WT(l,n,a){const s={},r=u(n,["systemInstruction"]);a!==void 0&&r!=null&&f(a,["systemInstruction"],th(nt(r)));const m=u(n,["temperature"]);m!=null&&f(s,["temperature"],m);const p=u(n,["topP"]);p!=null&&f(s,["topP"],p);const g=u(n,["topK"]);g!=null&&f(s,["topK"],g);const y=u(n,["candidateCount"]);y!=null&&f(s,["candidateCount"],y);const h=u(n,["maxOutputTokens"]);h!=null&&f(s,["maxOutputTokens"],h);const v=u(n,["stopSequences"]);v!=null&&f(s,["stopSequences"],v);const S=u(n,["responseLogprobs"]);S!=null&&f(s,["responseLogprobs"],S);const _=u(n,["logprobs"]);_!=null&&f(s,["logprobs"],_);const M=u(n,["presencePenalty"]);M!=null&&f(s,["presencePenalty"],M);const w=u(n,["frequencyPenalty"]);w!=null&&f(s,["frequencyPenalty"],w);const H=u(n,["seed"]);H!=null&&f(s,["seed"],H);const k=u(n,["responseMimeType"]);k!=null&&f(s,["responseMimeType"],k);const J=u(n,["responseSchema"]);J!=null&&f(s,["responseSchema"],sr(J));const K=u(n,["responseJsonSchema"]);
77if(K!=null&&f(s,["responseJsonSchema"],K),u(n,["routingConfig"])!==void 0)throw new Error("routingConfig parameter is not supported in Gemini API.");if(u(n,["modelSelectionConfig"])!==void 0)throw new Error("modelSelectionConfig parameter is not supported in Gemini API.");const V=u(n,["safetySettings"]);if(a!==void 0&&V!=null){let ie=V;Array.isArray(ie)&&(ie=ie.map(Ue=>dv(Ue))),f(a,["safetySettings"],ie)}const j=u(n,["tools"]);if(a!==void 0&&j!=null){let ie=Xi(j);Array.isArray(ie)&&(ie=ie.map(Ue=>mv(Ki(Ue)))),f(a,["tools"],ie)}const ne=u(n,["toolConfig"]);if(a!==void 0&&ne!=null&&f(a,["toolConfig"],ne),u(n,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const te=u(n,["cachedContent"]);a!==void 0&&te!=null&&f(a,["cachedContent"],cn(l,te));const F=u(n,["responseModalities"]);F!=null&&f(s,["responseModalities"],F);const ye=u(n,["mediaResolution"]);ye!=null&&f(s,["mediaResolution"],ye);const P=u(n,["speechConfig"]);if(P!=null&&f(s,["speechConfig"],ur(P)),u(n,["audioTimestamp"])!==void 0)throw new Error("audioTimestamp parameter is not supported in Gemini API.");const X=u(n,["thinkingConfig"]);X!=null&&f(s,["thinkingConfig"],X);const oe=u(n,["imageConfig"]);return oe!=null&&f(s,["imageConfig"],oe),s}function jT(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["candidates"]);if(s!=null){let y=s;Array.isArray(y)&&(y=y.map(h=>HT(h))),f(n,["candidates"],y)}const r=u(l,["modelVersion"]);r!=null&&f(n,["modelVersion"],r);const m=u(l,["promptFeedback"]);m!=null&&f(n,["promptFeedback"],m);const p=u(l,["responseId"]);p!=null&&f(n,["responseId"],p);const g=u(l,["usageMetadata"]);return g!=null&&f(n,["usageMetadata"],g),n}function ev(l,n){const a={},s=u(n,["name"]);return s!=null&&f(a,["_url","name"],Qi(l,s)),a}function tv(l,n){const a={},s=u(n,["name"]);return s!=null&&f(a,["_url","name"],Qi(l,s)),a}function nv(l){const n={},a=u(l,["timeRangeFilter"]);if(a!=null&&f(n,["timeRangeFilter"],a),u(l,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");return n}function iv(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["request","model"],Se(l,s));const r=u(n,["contents"]);if(r!=null){let p=wt(r);Array.isArray(p)&&(p=p.map(g=>th(g))),f(a,["request","contents"],p)}const m=u(n,["config"]);return m!=null&&f(a,["request","generationConfig"],WT(l,m,u(a,["request"],{}))),a}function lv(l){const n={},a=u(l,["response"]);a!=null&&f(n,["response"],jT(a));const s=u(l,["error"]);return s!=null&&f(n,["error"],s),n}function ov(l,n){const a={},s=u(l,["pageSize"]);n!==void 0&&s!=null&&f(n,["_query","pageSize"],s);const r=u(l,["pageToken"]);if(n!==void 0&&r!=null&&f(n,["_query","pageToken"],r),u(l,["filter"])!==void 0)throw new Error("filter parameter is not supported in Gemini API.");return a}function av(l,n){const a={},s=u(l,["pageSize"]);n!==void 0&&s!=null&&f(n,["_query","pageSize"],s);const r=u(l,["pageToken"]);n!==void 0&&r!=null&&f(n,["_query","pageToken"],r);const m=u(l,["filter"]);return n!==void 0&&m!=null&&f(n,["_query","filter"],m),a}function sv(l){const n={},a=u(l,["config"]);return a!=null&&ov(a,n),n}function uv(l){const n={},a=u(l,["config"]);return a!=null&&av(a,n),n}function rv(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["nextPageToken"]);s!=null&&f(n,["nextPageToken"],s);const r=u(l,["operations"]);if(r!=null){let m=r;Array.isArray(m)&&(m=m.map(p=>Kl(p))),f(n,["batchJobs"],m)}return n}function cv(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["nextPageToken"]);s!=null&&f(n,["nextPageToken"],s);const r=u(l,["batchPredictionJobs"]);if(r!=null){let m=r;Array.isArray(m)&&(m=m.map(p=>ju(p))),f(n,["batchJobs"],m)}return n}function fv(l){const n={},a=u(l,["videoMetadata"]);a!=null&&f(n,["videoMetadata"],a);const s=u(l,["thought"]);s!=null&&f(n,["thought"],s);const r=u(l,["inlineData"]);r!=null&&f(n,["inlineData"],qT(r));const m=u(l,["fileData"]);m!=null&&f(n,["fileData"],$T(m));const p=u(l,["thoughtSignature"]);p!=null&&f(n,["thoughtSignature"],p);const g=u(l,["functionCall"]);g!=null&&f(n,["functionCall"],g);const y=u(l,["codeExecutionResult"]);y!=null&&f(n,["codeExecutionResult"],y);const h=u(l,["executableCode"]);h!=null&&f(n,["executableCode"],h);const v=u(l,["functionResponse"]);v!=null&&f(n,["functionResponse"],v);const S=u(l,["text"]);return S!=null&&f(n,["text"],S),n}function dv(l){const n={};if(u(l,["method"])!==void 0)throw new Error("method parameter is not supported in Gemini API.");const a=u(l,["category"]);a!=null&&f(n,["category"],a);const s=u(l,["threshold"]);return s!=null&&f(n,["threshold"],s),n}function mv(l){const n={},a=u(l,["functionDeclarations"]);if(a!=null){let y=a;Array.isArray(y)&&(y=y.map(h=>h)),f(n,["functionDeclarations"],y)}if(u(l,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const s=u(l,["googleSearch"]);s!=null&&f(n,["googleSearch"],nv(s));const r=u(l,["googleSearchRetrieval"]);if(r!=null&&f(n,["googleSearchRetrieval"],r),u(l,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");if(u(l,["googleMaps"])!==void 0)throw new Error("googleMaps parameter is not supported in Gemini API.");
77const m=u(l,["urlContext"]);m!=null&&f(n,["urlContext"],m);const p=u(l,["computerUse"]);p!=null&&f(n,["computerUse"],p);const g=u(l,["codeExecution"]);return g!=null&&f(n,["codeExecution"],g),n}/** 78 * @license 79 * Copyright 2025 Google LLC 80 * SPDX-License-Identifier: Apache-2.0 81 */var ii;(function(l){l.PAGED_ITEM_BATCH_JOBS="batchJobs",l.PAGED_ITEM_MODELS="models",l.PAGED_ITEM_TUNING_JOBS="tuningJobs",l.PAGED_ITEM_FILES="files",l.PAGED_ITEM_CACHED_CONTENTS="cachedContents"})(ii||(ii={}));class Ql{constructor(n,a,s,r){this.pageInternal=[],this.paramsInternal={},this.requestInternal=a,this.init(n,s,r)}init(n,a,s){var r,m;this.nameInternal=n,this.pageInternal=a[this.nameInternal]||[],this.sdkHttpResponseInternal=a==null?void 0:a.sdkHttpResponse,this.idxInternal=0;let p={config:{}};!s||Object.keys(s).length===0?p={config:{}}:typeof s=="object"?p=Object.assign({},s):p=s,p.config&&(p.config.pageToken=a.nextPageToken),this.paramsInternal=p,this.pageInternalSize=(m=(r=p.config)===null||r===void 0?void 0:r.pageSize)!==null&&m!==void 0?m:this.pageInternal.length}initNextPage(n){this.init(this.nameInternal,n,this.paramsInternal)}get page(){return this.pageInternal}get name(){return this.nameInternal}get pageSize(){return this.pageInternalSize}get sdkHttpResponse(){return this.sdkHttpResponseInternal}get params(){return this.paramsInternal}get pageLength(){return this.pageInternal.length}getItem(n){return this.pageInternal[n]}[Symbol.asyncIterator](){return{next:async()=>{if(this.idxInternal>=this.pageLength)if(this.hasNextPage())await this.nextPage();else return{value:void 0,done:!0};const n=this.getItem(this.idxInternal);return this.idxInternal+=1,{value:n,done:!1}},return:async()=>({value:void 0,done:!0})}}async nextPage(){if(!this.hasNextPage())throw new Error("No more pages to fetch.");const n=await this.requestInternal(this.params);return this.initNextPage(n),this.page}hasNextPage(){var n;return((n=this.params.config)===null||n===void 0?void 0:n.pageToken)!==void 0}}/** 82 * @license 83 * Copyright 2025 Google LLC 84 * SPDX-License-Identifier: Apache-2.0 85 */class pv extends li{constructor(n){super(),this.apiClient=n,this.create=async a=>(this.apiClient.isVertexAI()&&(a.config=this.formatDestination(a.src,a.config)),this.createInternal(a)),this.createEmbeddings=async a=>{var s,r;if(console.warn("batches.createEmbeddings() is experimental and may change without notice."),this.apiClient.isVertexAI())throw new Error("Vertex AI does not support batches.createEmbeddings.");if(!(a.src.inlinedRequests!==void 0))return this.createEmbeddingsInternal(a);const g=this.createInlinedEmbedContentRequest(a),y=g.path,h=g.body,v=Ku(this.apiClient,a)._query||{};return this.apiClient.request({path:y,queryParams:v,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(s=a.config)===null||s===void 0?void 0:s.httpOptions,abortSignal:(r=a.config)===null||r===void 0?void 0:r.abortSignal}).then(_=>_.json()).then(_=>Kl(_))},this.list=async(a={})=>new Ql(ii.PAGED_ITEM_BATCH_JOBS,s=>this.listInternal(s),await this.listInternal(a),a)}createInlinedGenerateContentRequest(n){const a=Mp(this.apiClient,n),s=a._url,r=Z("{model}:batchGenerateContent",s),g=a.batch.inputConfig.requests,y=g.requests,h=[];for(const v of y){const S=Object.assign({},v);if(S.systemInstruction){const _=S.systemInstruction;delete S.systemInstruction;const M=S.request;M.systemInstruction=_,S.request=M}h.push(S)}return g.requests=h,delete a.config,delete a._url,delete a._query,{path:r,body:a}}createInlinedEmbedContentRequest(n){const a=Ku(this.apiClient,n),s=a._url,r=Z("{model}:asyncBatchEmbedContent",s),g=a.batch.inputConfig.requests,y=g.requests,h=[];delete g.config;for(const v of y){const S=Object.assign({},v),_=S.request;for(const M in S)M!=="request"&&(_[M]=S[M],delete S[M]);h.push(S)}return g.requests=h,delete a.config,delete a._url,delete a._query,{path:r,body:a}}getGcsUri(n){if(typeof n=="string")return n.startsWith("gs://")?n:void 0;if(!Array.isArray(n)&&n.gcsUri&&n.gcsUri.length>0)return n.gcsUri[0]}getBigqueryUri(n){if(typeof n=="string")return n.startsWith("bq://")?n:void 0;if(!Array.isArray(n))return n.bigqueryUri}formatDestination(n,a){const s=a?Object.assign({},a):{},r=Date.now().toString();if(s.displayName||(s.displayName=`genaiBatchJob_${r}`),s.dest===void 0){const m=this.getGcsUri(n),p=this.getBigqueryUri(n);if(m)m.endsWith(".jsonl")?s.dest=`${m.slice(0,-6)}/dest`:s.dest=`${m}_dest_${r}`;else if(p)s.dest=`${p}_dest_${r}`;else throw new Error("Unsupported source for Vertex AI: No GCS or BigQuery URI found.")}return s}async createInternal(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=BT(this.apiClient,n);return g=Z("batchPredictionJobs",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abort
85Signal}).then(v=>v.json()),p.then(v=>ju(v))}else{const h=Mp(this.apiClient,n);return g=Z("{model}:batchGenerateContent",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json()),p.then(v=>Kl(v))}}async createEmbeddingsInternal(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=Ku(this.apiClient,n);return m=Z("{model}:asyncBatchEmbedContent",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(y=>y.json()),r.then(y=>Kl(y))}}async get(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=tv(this.apiClient,n);return g=Z("batchPredictionJobs/{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json()),p.then(v=>ju(v))}else{const h=ev(this.apiClient,n);return g=Z("batches/{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json()),p.then(v=>Kl(v))}}async cancel(n){var a,s,r,m;let p="",g={};if(this.apiClient.isVertexAI()){const y=GT(this.apiClient,n);p=Z("batchPredictionJobs/{name}:cancel",y._url),g=y._query,delete y._url,delete y._query,await this.apiClient.request({path:p,queryParams:g,body:JSON.stringify(y),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal})}else{const y=OT(this.apiClient,n);p=Z("batches/{name}:cancel",y._url),g=y._query,delete y._url,delete y._query,await this.apiClient.request({path:p,queryParams:g,body:JSON.stringify(y),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal})}}async listInternal(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=uv(n);return g=Z("batchPredictionJobs",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=cv(v),_=new Cp;return Object.assign(_,S),_})}else{const h=sv(n);return g=Z("batches",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=rv(v),_=new Cp;return Object.assign(_,S),_})}}async delete(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=kT(this.apiClient,n);return g=Z("batchPredictionJobs/{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>KT(v))}else{const h=JT(this.apiClient,n);return g=Z("batches/{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>FT(v))}}}/** 86 * @license 87 * Copyright 2025 Google LLC 88 * SPDX-License-Identifier: Apache-2.0 89 */function hv(l){const n={};if(u(l,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(l,["data"]);a!=null&&f(n,["data"],a);const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function Ip(l){const n={},a=u(l,["parts"]);if(a!=null){let r=a;Array.isArray(r)&&(r=r.map(m=>qv(m))),f(n,["parts"],r)}const s=u(l,["role"]);return s!=null&&f(n,["role"],s),n}
89function gv(l,n){const a={},s=u(l,["ttl"]);n!==void 0&&s!=null&&f(n,["ttl"],s);const r=u(l,["expireTime"]);n!==void 0&&r!=null&&f(n,["expireTime"],r);const m=u(l,["displayName"]);n!==void 0&&m!=null&&f(n,["displayName"],m);const p=u(l,["contents"]);if(n!==void 0&&p!=null){let v=wt(p);Array.isArray(v)&&(v=v.map(S=>Ip(S))),f(n,["contents"],v)}const g=u(l,["systemInstruction"]);n!==void 0&&g!=null&&f(n,["systemInstruction"],Ip(nt(g)));const y=u(l,["tools"]);if(n!==void 0&&y!=null){let v=y;Array.isArray(v)&&(v=v.map(S=>Ov(S))),f(n,["tools"],v)}const h=u(l,["toolConfig"]);if(n!==void 0&&h!=null&&f(n,["toolConfig"],h),u(l,["kmsKeyName"])!==void 0)throw new Error("kmsKeyName parameter is not supported in Gemini API.");return a}function yv(l,n){const a={},s=u(l,["ttl"]);n!==void 0&&s!=null&&f(n,["ttl"],s);const r=u(l,["expireTime"]);n!==void 0&&r!=null&&f(n,["expireTime"],r);const m=u(l,["displayName"]);n!==void 0&&m!=null&&f(n,["displayName"],m);const p=u(l,["contents"]);if(n!==void 0&&p!=null){let S=wt(p);Array.isArray(S)&&(S=S.map(_=>_)),f(n,["contents"],S)}const g=u(l,["systemInstruction"]);n!==void 0&&g!=null&&f(n,["systemInstruction"],nt(g));const y=u(l,["tools"]);if(n!==void 0&&y!=null){let S=y;Array.isArray(S)&&(S=S.map(_=>Gv(_))),f(n,["tools"],S)}const h=u(l,["toolConfig"]);n!==void 0&&h!=null&&f(n,["toolConfig"],h);const v=u(l,["kmsKeyName"]);return n!==void 0&&v!=null&&f(n,["encryption_spec","kmsKeyName"],v),a}function Tv(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["model"],Yp(l,s));const r=u(n,["config"]);return r!=null&&gv(r,a),a}function vv(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["model"],Yp(l,s));const r=u(n,["config"]);return r!=null&&yv(r,a),a}function Sv(l,n){const a={},s=u(n,["name"]);return s!=null&&f(a,["_url","name"],cn(l,s)),a}function Ev(l,n){const a={},s=u(n,["name"]);return s!=null&&f(a,["_url","name"],cn(l,s)),a}function _v(l){const n={},a=u(l,["sdkHttpResponse"]);return a!=null&&f(n,["sdkHttpResponse"],a),n}function Cv(l){const n={},a=u(l,["sdkHttpResponse"]);return a!=null&&f(n,["sdkHttpResponse"],a),n}function Av(l){const n={};if(u(l,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(l,["fileUri"]);a!=null&&f(n,["fileUri"],a);const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function Rv(l){const n={};if(u(l,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");const a=u(l,["description"]);a!=null&&f(n,["description"],a);const s=u(l,["name"]);s!=null&&f(n,["name"],s);const r=u(l,["parameters"]);r!=null&&f(n,["parameters"],r);const m=u(l,["parametersJsonSchema"]);m!=null&&f(n,["parametersJsonSchema"],m);const p=u(l,["response"]);p!=null&&f(n,["response"],p);const g=u(l,["responseJsonSchema"]);return g!=null&&f(n,["responseJsonSchema"],g),n}function Nv(l,n){const a={},s=u(n,["name"]);return s!=null&&f(a,["_url","name"],cn(l,s)),a}function Mv(l,n){const a={},s=u(n,["name"]);return s!=null&&f(a,["_url","name"],cn(l,s)),a}function Iv(l){const n={},a=u(l,["timeRangeFilter"]);if(a!=null&&f(n,["timeRangeFilter"],a),u(l,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");return n}function Dv(l,n){const a={},s=u(l,["pageSize"]);n!==void 0&&s!=null&&f(n,["_query","pageSize"],s);const r=u(l,["pageToken"]);return n!==void 0&&r!=null&&f(n,["_query","pageToken"],r),a}function Uv(l,n){const a={},s=u(l,["pageSize"]);n!==void 0&&s!=null&&f(n,["_query","pageSize"],s);const r=u(l,["pageToken"]);return n!==void 0&&r!=null&&f(n,["_query","pageToken"],r),a}function xv(l){const n={},a=u(l,["config"]);return a!=null&&Dv(a,n),n}function bv(l){const n={},a=u(l,["config"]);return a!=null&&Uv(a,n),n}function Lv(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["nextPageToken"]);s!=null&&f(n,["nextPageToken"],s);const r=u(l,["cachedContents"]);if(r!=null){let m=r;Array.isArray(m)&&(m=m.map(p=>p)),f(n,["cachedContents"],m)}return n}function wv(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["nextPageToken"]);s!=null&&f(n,["nextPageToken"],s);const r=u(l,["cachedContents"]);if(r!=null){let m=r;Array.isArray(m)&&(m=m.map(p=>p)),f(n,["cachedContents"],m)}return n}function qv(l){const n={},a=u(l,["videoMetadata"]);a!=null&&f(n,["videoMetadata"],a);const s=u(l,["thought"]);s!=null&&f(n,["thought"],s);const r=u(l,["inlineData"]);r!=null&&f(n,["inlineData"],hv(r));const m=u(l,["fileData"]);m!=null&&f(n,["fileData"],Av(m));const p=u(l,["thoughtSignature"]);p!=null&&f(n,["thoughtSignature"],p);const g=u(l,["functionCall"]);g!=null&&f(n,["functionCall"],g);const y=u(l,["codeExecutionResult"]);y!=null&&f(n,["codeExecutionResult"],y);const h=u(l,["executableCode"]);h!=null&&f(n,["executableCode"],h);const v=u(l,["functionResponse"]);v!=null&&f(n,["functionResponse"],v);const S=u(l,["text"]);return S!=null&&f(n,["text"],S),n}function Ov(l){const n={},a=u(l,["functionDeclarations"]);if(a!=null){let y=a;Array.isArray(y)&&(y=y.map(h=>h)),f(n,["functionDeclarations"],y)}if(u(l,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const s=u(l,["googleSearch"]);s!=null&&f(n,["googleSearch"],Iv(s));const r=u(l,["googleSearchRetrieval"]);if(r!=null&&f(n,["googleSearchRetrieval"],r),u(l,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");if(u(l,["googleMaps"])!==void 0)throw new Error("googleMaps parameter is not supported in Gemini API.");
89const m=u(l,["urlContext"]);m!=null&&f(n,["urlContext"],m);const p=u(l,["computerUse"]);p!=null&&f(n,["computerUse"],p);const g=u(l,["codeExecution"]);return g!=null&&f(n,["codeExecution"],g),n}function Gv(l){const n={},a=u(l,["functionDeclarations"]);if(a!=null){let S=a;Array.isArray(S)&&(S=S.map(_=>Rv(_))),f(n,["functionDeclarations"],S)}const s=u(l,["retrieval"]);s!=null&&f(n,["retrieval"],s);const r=u(l,["googleSearch"]);r!=null&&f(n,["googleSearch"],r);const m=u(l,["googleSearchRetrieval"]);m!=null&&f(n,["googleSearchRetrieval"],m);const p=u(l,["enterpriseWebSearch"]);p!=null&&f(n,["enterpriseWebSearch"],p);const g=u(l,["googleMaps"]);g!=null&&f(n,["googleMaps"],g);const y=u(l,["urlContext"]);y!=null&&f(n,["urlContext"],y);const h=u(l,["computerUse"]);h!=null&&f(n,["computerUse"],h);const v=u(l,["codeExecution"]);return v!=null&&f(n,["codeExecution"],v),n}function Hv(l,n){const a={},s=u(l,["ttl"]);n!==void 0&&s!=null&&f(n,["ttl"],s);const r=u(l,["expireTime"]);return n!==void 0&&r!=null&&f(n,["expireTime"],r),a}function Vv(l,n){const a={},s=u(l,["ttl"]);n!==void 0&&s!=null&&f(n,["ttl"],s);const r=u(l,["expireTime"]);return n!==void 0&&r!=null&&f(n,["expireTime"],r),a}function zv(l,n){const a={},s=u(n,["name"]);s!=null&&f(a,["_url","name"],cn(l,s));const r=u(n,["config"]);return r!=null&&Hv(r,a),a}function Pv(l,n){const a={},s=u(n,["name"]);s!=null&&f(a,["_url","name"],cn(l,s));const r=u(n,["config"]);return r!=null&&Vv(r,a),a}/** 90 * @license 91 * Copyright 2025 Google LLC 92 * SPDX-License-Identifier: Apache-2.0 93 */class Bv extends li{constructor(n){super(),this.apiClient=n,this.list=async(a={})=>new Ql(ii.PAGED_ITEM_CACHED_CONTENTS,s=>this.listInternal(s),await this.listInternal(a),a)}async create(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=vv(this.apiClient,n);return g=Z("cachedContents",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json()),p.then(v=>v)}else{const h=Tv(this.apiClient,n);return g=Z("cachedContents",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json()),p.then(v=>v)}}async get(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=Mv(this.apiClient,n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json()),p.then(v=>v)}else{const h=Nv(this.apiClient,n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json()),p.then(v=>v)}}async delete(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=Ev(this.apiClient,n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=Cv(v),_=new Ep;return Object.assign(_,S),_})}else{const h=Sv(this.apiClient,n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=_v(v),_=new Ep;return Object.assign(_,S),_})}}async update(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=Pv(this.apiClient,n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"PATCH",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abort
93Signal}).then(v=>v.json()),p.then(v=>v)}else{const h=zv(this.apiClient,n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"PATCH",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json()),p.then(v=>v)}}async listInternal(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=bv(n);return g=Z("cachedContents",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=wv(v),_=new _p;return Object.assign(_,S),_})}else{const h=xv(n);return g=Z("cachedContents",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=Lv(v),_=new _p;return Object.assign(_,S),_})}}}function Dp(l){var n=typeof Symbol=="function"&&Symbol.iterator,a=n&&l[n],s=0;if(a)return a.call(l);if(l&&typeof l.length=="number")return{next:function(){return l&&s>=l.length&&(l=void 0),{value:l&&l[s++],done:!l}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function we(l){return this instanceof we?(this.v=l,this):new we(l)}function ki(l,n,a){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=a.apply(l,n||[]),r,m=[];return r=Object.create((typeof AsyncIterator=="function"?AsyncIterator:Object).prototype),g("next"),g("throw"),g("return",p),r[Symbol.asyncIterator]=function(){return this},r;function p(M){return function(w){return Promise.resolve(w).then(M,S)}}function g(M,w){s[M]&&(r[M]=function(H){return new Promise(function(k,J){m.push([M,H,k,J])>1||y(M,H)})},w&&(r[M]=w(r[M])))}function y(M,w){try{h(s[M](w))}catch(H){_(m[0][3],H)}}function h(M){M.value instanceof we?Promise.resolve(M.value.v).then(v,S):_(m[0][2],M)}function v(M){y("next",M)}function S(M){y("throw",M)}function _(M,w){M(w),m.shift(),m.length&&y(m[0][0],m[0][1])}}function Xl(l){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=l[Symbol.asyncIterator],a;return n?n.call(l):(l=typeof Dp=="function"?Dp(l):l[Symbol.iterator](),a={},s("next"),s("throw"),s("return"),a[Symbol.asyncIterator]=function(){return this},a);function s(m){a[m]=l[m]&&function(p){return new Promise(function(g,y){p=l[m](p),r(g,y,p.done,p.value)})}}function r(m,p,g,y){Promise.resolve(y).then(function(h){m({value:h,done:g})},p)}}/** 94 * @license 95 * Copyright 2025 Google LLC 96 * SPDX-License-Identifier: Apache-2.0 97 */function Yv(l){var n;if(l.candidates==null||l.candidates.length===0)return!1;const a=(n=l.candidates[0])===null||n===void 0?void 0:n.content;return a===void 0?!1:nh(a)}function nh(l){if(l.parts===void 0||l.parts.length===0)return!1;for(const n of l.parts)if(n===void 0||Object.keys(n).length===0)return!1;return!0}function Jv(l){if(l.length!==0){for(const n of l)if(n.role!=="user"&&n.role!=="model")throw new Error(`Role must be user or model, but got ${n.role}.`)}}function Up(l){if(l===void 0||l.length===0)return[];const n=[],a=l.length;let s=0;for(;s<a;)if(l[s].role==="user")n.push(l[s]),s++;else{const r=[];let m=!0;for(;s<a&&l[s].role==="model";)r.push(l[s]),m&&!nh(l[s])&&(m=!1),s++;m?n.push(...r):n.pop()}return n}class kv{constructor(n,a){this.modelsModule=n,this.apiClient=a}create(n){return new Fv(this.apiClient,this.modelsModule,n.model,n.config,structuredClone(n.history))}}class Fv{constructor(n,a,s,r={},m=[]){this.apiClient=n,this.modelsModule=a,this.model=s,this.config=r,this.history=m,this.sendPromise=Promise.resolve(),Jv(m)}async sendMessage(n){var a;await this.sendPromise;const s=nt(n.message),r=this.modelsModule.generateContent({model:this.model,contents:this.getHistory(!0).concat(s),config:(a=n.config)!==null&&a!==void 0?a:this.config});return this.sendPromise=(async()=>{var m,p,g;const y=await r,h=(p=(m=y.candidates)===null||m===void 0?void 0:m[0])===null||p===void 0?void 0:p.content,v=y.automaticFunctionCallingHistory,S=this.getHistory(!0).length;let _=[];v!=null&&(_=(g=v.slice(S))!==null&&g!==void 0?g:[]);const M=h?[h]:[];this.recordHistory(s,M,_)})(),await this.sendPromise.catch(()=>{this.sendPromise=Promise.resolve()}),r}async sendMessageStream(n){var a;await this.sendPromise;const s=nt(n.message),r=this.modelsModule.generateContentStream({model:this.model,contents:this.getHistory(!0).concat(s),config:(a=n.config)!==null&&a!==void 0?a:this.config});this.sendPromise=r.then(()=>{}).catch(()=>{});const m=await r;return this.processStreamResponse(m,s)}getHistory(n=!1){const a=n?Up(this.history):this.history;return structuredClone(a)}processStreamResponse(n,a){var s,r;return ki(this,arguments,function*(){var p,g,y,h;const v=[];try{for(var S=!0,_=Xl(n),M;M=yield we(_.next()),p=M.done,!p;S=!0){h=M.value,S=!1;const w=h;if(Yv(w)){const H=(r=(s=w.candidates)===null||s===void 0?void 0:s[0])===null||r===void 0?void 0:r.content;H!==void 0&&v.push(H)}yield yield we(w)}}catch(w){g={error:w}}finally{try{!S&&!p&&(y=_.return)&&(yield we(y.call(_)))}finally{if(g)throw g.error}}this.recordHistory(a,v)})}recordHistory(n,a,s){let r=[];a.length>0&&a.every(m=>m.role!==void 0)?r=a:r.push({role:"model",parts:[]}),s&&s.length>0?this.history.push(...Up(s)):this.history.push(n),this.history.push(...r)}}/** 98 * @license 99 * Copyright 2025 Google LLC 100 * SPDX-License-Identifier: Apache-2.0
101 */class va extends Error{constructor(n){super(n.message),this.name="ApiError",this.status=n.status,Object.setPrototypeOf(this,va.prototype)}}/** 102 * @license 103 * Copyright 2025 Google LLC 104 * SPDX-License-Identifier: Apache-2.0 105 */function Kv(l){const n={},a=u(l,["file"]);return a!=null&&f(n,["file"],a),n}function Xv(l){const n={},a=u(l,["sdkHttpResponse"]);return a!=null&&f(n,["sdkHttpResponse"],a),n}function Qv(l){const n={},a=u(l,["name"]);return a!=null&&f(n,["_url","file"],Qp(a)),n}function Zv(l){const n={},a=u(l,["sdkHttpResponse"]);return a!=null&&f(n,["sdkHttpResponse"],a),n}function $v(l){const n={},a=u(l,["name"]);return a!=null&&f(n,["_url","file"],Qp(a)),n}function Wv(l,n){const a={},s=u(l,["pageSize"]);n!==void 0&&s!=null&&f(n,["_query","pageSize"],s);const r=u(l,["pageToken"]);return n!==void 0&&r!=null&&f(n,["_query","pageToken"],r),a}function jv(l){const n={},a=u(l,["config"]);return a!=null&&Wv(a,n),n}function eS(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["nextPageToken"]);s!=null&&f(n,["nextPageToken"],s);const r=u(l,["files"]);if(r!=null){let m=r;Array.isArray(m)&&(m=m.map(p=>p)),f(n,["files"],m)}return n}/** 106 * @license 107 * Copyright 2025 Google LLC 108 * SPDX-License-Identifier: Apache-2.0 109 */class tS extends li{constructor(n){super(),this.apiClient=n,this.list=async(a={})=>new Ql(ii.PAGED_ITEM_FILES,s=>this.listInternal(s),await this.listInternal(a),a)}async upload(n){if(this.apiClient.isVertexAI())throw new Error("Vertex AI does not support uploading files. You can share files through a GCS bucket.");return this.apiClient.uploadFile(n.file,n.config).then(a=>a)}async download(n){await this.apiClient.downloadFile(n)}async listInternal(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=jv(n);return m=Z("files",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"GET",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>{const h=eS(y),v=new hT;return Object.assign(v,h),v})}}async createInternal(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=Kv(n);return m=Z("upload/v1beta/files",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(y=>y.json()),r.then(y=>{const h=Xv(y),v=new gT;return Object.assign(v,h),v})}}async get(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=$v(n);return m=Z("files/{file}",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"GET",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(y=>y.json()),r.then(y=>y)}}async delete(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=Qv(n);return m=Z("files/{file}",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"DELETE",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>{const h=Zv(y),v=new yT;return Object.assign(v,h),v})}}}/** 110 * @license 111 * Copyright 2025 Google LLC 112 * SPDX-License-Identifier: Apache-2.0 113 */function ha(l){const n={};if(u(l,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(l,["data"]);a!=null&&f(n,["data"],a);const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function nS(l){const n={},a=u(l,["parts"]);if(a!=null){let r=a;Array.isArray(r)&&(r=r.map(m=>gS(m))),f(n,["parts"],r)}const s=u(l,["role"]);return s!=null&&f(n,["role"],s),n}function iS(l){const n={};if(u(l,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(l,["fileUri"]);a!=null&&f(n,["fileUri"],a);const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function lS(l){const n={};if(u(l,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");const a=u(l,["description"]);a!=null&&f(n,["description"],a);const s=u(l,["name"]);s!=null&&f(n,["name"],s);const r=u(l,["parameters"]);r!=null&&f(n,["parameters"],r);const m=u(l,["parametersJsonSchema"]);m!=null&&f(n,["parametersJsonSchema"],m);const p=u(l,["response"]);p!=null&&f(n,["response"],p);const g=u(l,["responseJsonSchema"]);return g!=null&&f(n,["responseJsonSchema"],g),n}function oS(l){const n={},a=u(l,["modelSelectionConfig"]);a!=null&&f(n,["modelConfig"],a);const s=u(l,["audioTimestamp"]);s!=null&&f(n,["audioTimestamp"],s);const r=u(l,["candidateCount"]);r!=null&&f(n,["candidateCount"],r);const m=u(l,["enableAffectiveDialog"]);m!=null&&f(n,["enableAffectiveDialog"],m);const p=u(l,["frequencyPenalty"]);p!=null&&f(n,["frequencyPenalty"],p);const g=u(l,["logprobs"]);g!=null&&f(n,["logprobs"],g);const y=u(l,["maxOutputTokens"]);y!=null&&f(n,["maxOutputTokens"],y);const h=u(l,["mediaResolution"]);h!=null&&f(n,["mediaResolution"],h);const v=u(l,["presencePenalty"]);v!=null&&f(n,["presencePenalty"],v);const S=u(l,["responseJsonSchema"]);S!=null&&f(n,["responseJsonSchema"],S);const _=u(l,["responseLogprobs"]);_!=null&&f(n,["responseLogprobs"],_);const M=u(l,["responseMimeType"]);M!=null&&f(n,["responseMimeType"],M);const w=u(l,["responseModalities"]);w!=null&&f(n,["responseModalities"],w);const H=u(l,["responseSchema"]);H!=null&&f(n,["responseSchema"],H);const k=u(l,["routingConfig"]);
113k!=null&&f(n,["routingConfig"],k);const J=u(l,["seed"]);J!=null&&f(n,["seed"],J);const K=u(l,["speechConfig"]);K!=null&&f(n,["speechConfig"],ih(K));const V=u(l,["stopSequences"]);V!=null&&f(n,["stopSequences"],V);const j=u(l,["temperature"]);j!=null&&f(n,["temperature"],j);const ne=u(l,["thinkingConfig"]);ne!=null&&f(n,["thinkingConfig"],ne);const te=u(l,["topK"]);te!=null&&f(n,["topK"],te);const F=u(l,["topP"]);return F!=null&&f(n,["topP"],F),n}function aS(l){const n={},a=u(l,["timeRangeFilter"]);if(a!=null&&f(n,["timeRangeFilter"],a),u(l,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");return n}function sS(l,n){const a={},s=u(l,["generationConfig"]);n!==void 0&&s!=null&&f(n,["setup","generationConfig"],s);const r=u(l,["responseModalities"]);n!==void 0&&r!=null&&f(n,["setup","generationConfig","responseModalities"],r);const m=u(l,["temperature"]);n!==void 0&&m!=null&&f(n,["setup","generationConfig","temperature"],m);const p=u(l,["topP"]);n!==void 0&&p!=null&&f(n,["setup","generationConfig","topP"],p);const g=u(l,["topK"]);n!==void 0&&g!=null&&f(n,["setup","generationConfig","topK"],g);const y=u(l,["maxOutputTokens"]);n!==void 0&&y!=null&&f(n,["setup","generationConfig","maxOutputTokens"],y);const h=u(l,["mediaResolution"]);n!==void 0&&h!=null&&f(n,["setup","generationConfig","mediaResolution"],h);const v=u(l,["seed"]);n!==void 0&&v!=null&&f(n,["setup","generationConfig","seed"],v);const S=u(l,["speechConfig"]);n!==void 0&&S!=null&&f(n,["setup","generationConfig","speechConfig"],rr(S));const _=u(l,["thinkingConfig"]);n!==void 0&&_!=null&&f(n,["setup","generationConfig","thinkingConfig"],_);const M=u(l,["enableAffectiveDialog"]);n!==void 0&&M!=null&&f(n,["setup","generationConfig","enableAffectiveDialog"],M);const w=u(l,["systemInstruction"]);n!==void 0&&w!=null&&f(n,["setup","systemInstruction"],nS(nt(w)));const H=u(l,["tools"]);if(n!==void 0&&H!=null){let te=Xi(H);Array.isArray(te)&&(te=te.map(F=>TS(Ki(F)))),f(n,["setup","tools"],te)}const k=u(l,["sessionResumption"]);n!==void 0&&k!=null&&f(n,["setup","sessionResumption"],yS(k));const J=u(l,["inputAudioTranscription"]);n!==void 0&&J!=null&&f(n,["setup","inputAudioTranscription"],J);const K=u(l,["outputAudioTranscription"]);n!==void 0&&K!=null&&f(n,["setup","outputAudioTranscription"],K);const V=u(l,["realtimeInputConfig"]);n!==void 0&&V!=null&&f(n,["setup","realtimeInputConfig"],V);const j=u(l,["contextWindowCompression"]);n!==void 0&&j!=null&&f(n,["setup","contextWindowCompression"],j);const ne=u(l,["proactivity"]);return n!==void 0&&ne!=null&&f(n,["setup","proactivity"],ne),a}function uS(l,n){const a={},s=u(l,["generationConfig"]);n!==void 0&&s!=null&&f(n,["setup","generationConfig"],oS(s));const r=u(l,["responseModalities"]);n!==void 0&&r!=null&&f(n,["setup","generationConfig","responseModalities"],r);const m=u(l,["temperature"]);n!==void 0&&m!=null&&f(n,["setup","generationConfig","temperature"],m);const p=u(l,["topP"]);n!==void 0&&p!=null&&f(n,["setup","generationConfig","topP"],p);const g=u(l,["topK"]);n!==void 0&&g!=null&&f(n,["setup","generationConfig","topK"],g);const y=u(l,["maxOutputTokens"]);n!==void 0&&y!=null&&f(n,["setup","generationConfig","maxOutputTokens"],y);const h=u(l,["mediaResolution"]);n!==void 0&&h!=null&&f(n,["setup","generationConfig","mediaResolution"],h);const v=u(l,["seed"]);n!==void 0&&v!=null&&f(n,["setup","generationConfig","seed"],v);const S=u(l,["speechConfig"]);n!==void 0&&S!=null&&f(n,["setup","generationConfig","speechConfig"],ih(rr(S)));const _=u(l,["thinkingConfig"]);n!==void 0&&_!=null&&f(n,["setup","generationConfig","thinkingConfig"],_);const M=u(l,["enableAffectiveDialog"]);n!==void 0&&M!=null&&f(n,["setup","generationConfig","enableAffectiveDialog"],M);const w=u(l,["systemInstruction"]);n!==void 0&&w!=null&&f(n,["setup","systemInstruction"],nt(w));const H=u(l,["tools"]);if(n!==void 0&&H!=null){let te=Xi(H);Array.isArray(te)&&(te=te.map(F=>vS(Ki(F)))),f(n,["setup","tools"],te)}const k=u(l,["sessionResumption"]);n!==void 0&&k!=null&&f(n,["setup","sessionResumption"],k);const J=u(l,["inputAudioTranscription"]);n!==void 0&&J!=null&&f(n,["setup","inputAudioTranscription"],J);const K=u(l,["outputAudioTranscription"]);n!==void 0&&K!=null&&f(n,["setup","outputAudioTranscription"],K);const V=u(l,["realtimeInputConfig"]);n!==void 0&&V!=null&&f(n,["setup","realtimeInputConfig"],V);const j=u(l,["contextWindowCompression"]);n!==void 0&&j!=null&&f(n,["setup","contextWindowCompression"],j);const ne=u(l,["proactivity"]);return n!==void 0&&ne!=null&&f(n,["setup","proactivity"],ne),a}function rS(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["setup","model"],Se(l,s));const r=u(n,["config"]);return r!=null&&f(a,["config"],sS(r,a)),a}function cS(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["setup","model"],Se(l,s));const r=u(n,["config"]);return r!=null&&f(a,["config"],uS(r,a)),a}function fS(l){const n={},a=u(l,["musicGenerationConfig"]);return a!=null&&f(n,["musicGenerationConfig"],a),n}function dS(l){const n={},a=u(l,["weightedPrompts"]);if(a!=null){let s=a;Array.isArray(s)&&(s=s.map(r=>r)),f(n,["weightedPrompts"],s)}return n}function mS(l){const n={},a=u(l,["media"]);if(a!=null){let h=Jp(a);Array.isArray(h)&&(h=h.map(v=>ha(v))),f(n,["mediaChunks"],h)}const s=u(l,["audio"]);s!=null&&f(n,["audio"],ha(Fp(s)));const r=u(l,["audioStreamEnd"]);r!=null&&f(n,["audioStreamEnd"],r);const m=u(l,["video"]);m!=null&&f(n,["video"],ha(kp(m)));const p=u(l,["text"]);p!=null&&f(n,["text"],p);const g=u(l,["activityStart"]);g!=null&&f(n,["activityStart"],g);const y=u(l,["activityEnd"]);return y!=null&&f(n,["activityEnd"],y),n}function pS(l){const n={},a=u(l,["media"]);if(a!=null){let h=Jp(a);Array.isArray(h)&&(h=h.map(v=>v)),f(n,["mediaChunks"],h)}const s=u(l,["audio"]);
113s!=null&&f(n,["audio"],Fp(s));const r=u(l,["audioStreamEnd"]);r!=null&&f(n,["audioStreamEnd"],r);const m=u(l,["video"]);m!=null&&f(n,["video"],kp(m));const p=u(l,["text"]);p!=null&&f(n,["text"],p);const g=u(l,["activityStart"]);g!=null&&f(n,["activityStart"],g);const y=u(l,["activityEnd"]);return y!=null&&f(n,["activityEnd"],y),n}function hS(l){const n={},a=u(l,["setupComplete"]);a!=null&&f(n,["setupComplete"],a);const s=u(l,["serverContent"]);s!=null&&f(n,["serverContent"],s);const r=u(l,["toolCall"]);r!=null&&f(n,["toolCall"],r);const m=u(l,["toolCallCancellation"]);m!=null&&f(n,["toolCallCancellation"],m);const p=u(l,["usageMetadata"]);p!=null&&f(n,["usageMetadata"],SS(p));const g=u(l,["goAway"]);g!=null&&f(n,["goAway"],g);const y=u(l,["sessionResumptionUpdate"]);return y!=null&&f(n,["sessionResumptionUpdate"],y),n}function gS(l){const n={},a=u(l,["videoMetadata"]);a!=null&&f(n,["videoMetadata"],a);const s=u(l,["thought"]);s!=null&&f(n,["thought"],s);const r=u(l,["inlineData"]);r!=null&&f(n,["inlineData"],ha(r));const m=u(l,["fileData"]);m!=null&&f(n,["fileData"],iS(m));const p=u(l,["thoughtSignature"]);p!=null&&f(n,["thoughtSignature"],p);const g=u(l,["functionCall"]);g!=null&&f(n,["functionCall"],g);const y=u(l,["codeExecutionResult"]);y!=null&&f(n,["codeExecutionResult"],y);const h=u(l,["executableCode"]);h!=null&&f(n,["executableCode"],h);const v=u(l,["functionResponse"]);v!=null&&f(n,["functionResponse"],v);const S=u(l,["text"]);return S!=null&&f(n,["text"],S),n}function yS(l){const n={},a=u(l,["handle"]);if(a!=null&&f(n,["handle"],a),u(l,["transparent"])!==void 0)throw new Error("transparent parameter is not supported in Gemini API.");return n}function ih(l){const n={},a=u(l,["voiceConfig"]);if(a!=null&&f(n,["voiceConfig"],a),u(l,["multiSpeakerVoiceConfig"])!==void 0)throw new Error("multiSpeakerVoiceConfig parameter is not supported in Vertex AI.");const s=u(l,["languageCode"]);return s!=null&&f(n,["languageCode"],s),n}function TS(l){const n={},a=u(l,["functionDeclarations"]);if(a!=null){let y=a;Array.isArray(y)&&(y=y.map(h=>h)),f(n,["functionDeclarations"],y)}if(u(l,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const s=u(l,["googleSearch"]);s!=null&&f(n,["googleSearch"],aS(s));const r=u(l,["googleSearchRetrieval"]);if(r!=null&&f(n,["googleSearchRetrieval"],r),u(l,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");if(u(l,["googleMaps"])!==void 0)throw new Error("googleMaps parameter is not supported in Gemini API.");const m=u(l,["urlContext"]);m!=null&&f(n,["urlContext"],m);const p=u(l,["computerUse"]);p!=null&&f(n,["computerUse"],p);const g=u(l,["codeExecution"]);return g!=null&&f(n,["codeExecution"],g),n}function vS(l){const n={},a=u(l,["functionDeclarations"]);if(a!=null){let S=a;Array.isArray(S)&&(S=S.map(_=>lS(_))),f(n,["functionDeclarations"],S)}const s=u(l,["retrieval"]);s!=null&&f(n,["retrieval"],s);const r=u(l,["googleSearch"]);r!=null&&f(n,["googleSearch"],r);const m=u(l,["googleSearchRetrieval"]);m!=null&&f(n,["googleSearchRetrieval"],m);const p=u(l,["enterpriseWebSearch"]);p!=null&&f(n,["enterpriseWebSearch"],p);const g=u(l,["googleMaps"]);g!=null&&f(n,["googleMaps"],g);const y=u(l,["urlContext"]);y!=null&&f(n,["urlContext"],y);const h=u(l,["computerUse"]);h!=null&&f(n,["computerUse"],h);const v=u(l,["codeExecution"]);return v!=null&&f(n,["codeExecution"],v),n}function SS(l){const n={},a=u(l,["promptTokenCount"]);a!=null&&f(n,["promptTokenCount"],a);const s=u(l,["cachedContentTokenCount"]);s!=null&&f(n,["cachedContentTokenCount"],s);const r=u(l,["candidatesTokenCount"]);r!=null&&f(n,["responseTokenCount"],r);const m=u(l,["toolUsePromptTokenCount"]);m!=null&&f(n,["toolUsePromptTokenCount"],m);const p=u(l,["thoughtsTokenCount"]);p!=null&&f(n,["thoughtsTokenCount"],p);const g=u(l,["totalTokenCount"]);g!=null&&f(n,["totalTokenCount"],g);const y=u(l,["promptTokensDetails"]);if(y!=null){let M=y;Array.isArray(M)&&(M=M.map(w=>w)),f(n,["promptTokensDetails"],M)}const h=u(l,["cacheTokensDetails"]);if(h!=null){let M=h;Array.isArray(M)&&(M=M.map(w=>
113w)),f(n,["cacheTokensDetails"],M)}const v=u(l,["candidatesTokensDetails"]);if(v!=null){let M=v;Array.isArray(M)&&(M=M.map(w=>w)),f(n,["responseTokensDetails"],M)}const S=u(l,["toolUsePromptTokensDetails"]);if(S!=null){let M=S;Array.isArray(M)&&(M=M.map(w=>w)),f(n,["toolUsePromptTokensDetails"],M)}const _=u(l,["trafficType"]);return _!=null&&f(n,["trafficType"],_),n}/** 114 * @license 115 * Copyright 2025 Google LLC 116 * SPDX-License-Identifier: Apache-2.0 117 */function ES(l){const n={};if(u(l,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(l,["data"]);a!=null&&f(n,["data"],a);const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function _S(l){const n={},a=u(l,["content"]);a!=null&&f(n,["content"],a);const s=u(l,["citationMetadata"]);s!=null&&f(n,["citationMetadata"],CS(s));const r=u(l,["tokenCount"]);r!=null&&f(n,["tokenCount"],r);const m=u(l,["finishReason"]);m!=null&&f(n,["finishReason"],m);const p=u(l,["urlContextMetadata"]);p!=null&&f(n,["urlContextMetadata"],p);const g=u(l,["avgLogprobs"]);g!=null&&f(n,["avgLogprobs"],g);const y=u(l,["groundingMetadata"]);y!=null&&f(n,["groundingMetadata"],y);const h=u(l,["index"]);h!=null&&f(n,["index"],h);const v=u(l,["logprobsResult"]);v!=null&&f(n,["logprobsResult"],v);const S=u(l,["safetyRatings"]);if(S!=null){let _=S;Array.isArray(_)&&(_=_.map(M=>M)),f(n,["safetyRatings"],_)}return n}function CS(l){const n={},a=u(l,["citationSources"]);if(a!=null){let s=a;Array.isArray(s)&&(s=s.map(r=>r)),f(n,["citations"],s)}return n}function AS(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["contents"]);if(r!=null){let m=wt(r);Array.isArray(m)&&(m=m.map(p=>p)),f(a,["contents"],m)}return a}function RS(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["tokensInfo"]);if(s!=null){let r=s;Array.isArray(r)&&(r=r.map(m=>m)),f(n,["tokensInfo"],r)}return n}function NS(l){const n={},a=u(l,["values"]);a!=null&&f(n,["values"],a);const s=u(l,["statistics"]);return s!=null&&f(n,["statistics"],MS(s)),n}function MS(l){const n={},a=u(l,["truncated"]);a!=null&&f(n,["truncated"],a);const s=u(l,["token_count"]);return s!=null&&f(n,["tokenCount"],s),n}function Sa(l){const n={},a=u(l,["parts"]);if(a!=null){let r=a;Array.isArray(r)&&(r=r.map(m=>xE(m))),f(n,["parts"],r)}const s=u(l,["role"]);return s!=null&&f(n,["role"],s),n}function IS(l){const n={},a=u(l,["controlType"]);a!=null&&f(n,["controlType"],a);const s=u(l,["enableControlImageComputation"]);return s!=null&&f(n,["computeControl"],s),n}function DS(l){const n={};if(u(l,["systemInstruction"])!==void 0)throw new Error("systemInstruction parameter is not supported in Gemini API.");if(u(l,["tools"])!==void 0)throw new Error("tools parameter is not supported in Gemini API.");if(u(l,["generationConfig"])!==void 0)throw new Error("generationConfig parameter is not supported in Gemini API.");return n}function US(l,n){const a={},s=u(l,["systemInstruction"]);n!==void 0&&s!=null&&f(n,["systemInstruction"],nt(s));const r=u(l,["tools"]);if(n!==void 0&&r!=null){let p=r;Array.isArray(p)&&(p=p.map(g=>uh(g))),f(n,["tools"],p)}const m=u(l,["generationConfig"]);return n!==void 0&&m!=null&&f(n,["generationConfig"],vE(m)),a}function xS(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["contents"]);if(r!=null){let p=wt(r);Array.isArray(p)&&(p=p.map(g=>Sa(g))),f(a,["contents"],p)}const m=u(n,["config"]);return m!=null&&DS(m),a}function bS(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["contents"]);if(r!=null){let p=wt(r);Array.isArray(p)&&(p=p.map(g=>g)),f(a,["contents"],p)}const m=u(n,["config"]);return m!=null&&US(m,a),a}function LS(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["totalTokens"]);s!=null&&f(n,["totalTokens"],s);const r=u(l,["cachedContentTokenCount"]);return r!=null&&f(n,["cachedContentTokenCount"],r),n}function wS(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["totalTokens"]);return s!=null&&f(n,["totalTokens"],s),n}
117function qS(l,n){const a={},s=u(n,["model"]);return s!=null&&f(a,["_url","name"],Se(l,s)),a}function OS(l,n){const a={},s=u(n,["model"]);return s!=null&&f(a,["_url","name"],Se(l,s)),a}function GS(l){const n={},a=u(l,["sdkHttpResponse"]);return a!=null&&f(n,["sdkHttpResponse"],a),n}function HS(l){const n={},a=u(l,["sdkHttpResponse"]);return a!=null&&f(n,["sdkHttpResponse"],a),n}function VS(l,n){const a={},s=u(l,["outputGcsUri"]);n!==void 0&&s!=null&&f(n,["parameters","storageUri"],s);const r=u(l,["negativePrompt"]);n!==void 0&&r!=null&&f(n,["parameters","negativePrompt"],r);const m=u(l,["numberOfImages"]);n!==void 0&&m!=null&&f(n,["parameters","sampleCount"],m);const p=u(l,["aspectRatio"]);n!==void 0&&p!=null&&f(n,["parameters","aspectRatio"],p);const g=u(l,["guidanceScale"]);n!==void 0&&g!=null&&f(n,["parameters","guidanceScale"],g);const y=u(l,["seed"]);n!==void 0&&y!=null&&f(n,["parameters","seed"],y);const h=u(l,["safetyFilterLevel"]);n!==void 0&&h!=null&&f(n,["parameters","safetySetting"],h);const v=u(l,["personGeneration"]);n!==void 0&&v!=null&&f(n,["parameters","personGeneration"],v);const S=u(l,["includeSafetyAttributes"]);n!==void 0&&S!=null&&f(n,["parameters","includeSafetyAttributes"],S);const _=u(l,["includeRaiReason"]);n!==void 0&&_!=null&&f(n,["parameters","includeRaiReason"],_);const M=u(l,["language"]);n!==void 0&&M!=null&&f(n,["parameters","language"],M);const w=u(l,["outputMimeType"]);n!==void 0&&w!=null&&f(n,["parameters","outputOptions","mimeType"],w);const H=u(l,["outputCompressionQuality"]);n!==void 0&&H!=null&&f(n,["parameters","outputOptions","compressionQuality"],H);const k=u(l,["addWatermark"]);n!==void 0&&k!=null&&f(n,["parameters","addWatermark"],k);const J=u(l,["labels"]);n!==void 0&&J!=null&&f(n,["labels"],J);const K=u(l,["editMode"]);n!==void 0&&K!=null&&f(n,["parameters","editMode"],K);const V=u(l,["baseSteps"]);return n!==void 0&&V!=null&&f(n,["parameters","editConfig","baseSteps"],V),a}function zS(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["prompt"]);r!=null&&f(a,["instances[0]","prompt"],r);const m=u(n,["referenceImages"]);if(m!=null){let g=m;Array.isArray(g)&&(g=g.map(y=>GE(y))),f(a,["instances[0]","referenceImages"],g)}const p=u(n,["config"]);return p!=null&&VS(p,a),a}function PS(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["predictions"]);if(s!=null){let r=s;Array.isArray(r)&&(r=r.map(m=>Ea(m))),f(n,["generatedImages"],r)}return n}function BS(l,n){const a={},s=u(l,["taskType"]);n!==void 0&&s!=null&&f(n,["requests[]","taskType"],s);const r=u(l,["title"]);n!==void 0&&r!=null&&f(n,["requests[]","title"],r);const m=u(l,["outputDimensionality"]);if(n!==void 0&&m!=null&&f(n,["requests[]","outputDimensionality"],m),u(l,["mimeType"])!==void 0)throw new Error("mimeType parameter is not supported in Gemini API.");if(u(l,["autoTruncate"])!==void 0)throw new Error("autoTruncate parameter is not supported in Gemini API.");return a}function YS(l,n){const a={},s=u(l,["taskType"]);n!==void 0&&s!=null&&f(n,["instances[]","task_type"],s);const r=u(l,["title"]);n!==void 0&&r!=null&&f(n,["instances[]","title"],r);const m=u(l,["outputDimensionality"]);n!==void 0&&m!=null&&f(n,["parameters","outputDimensionality"],m);const p=u(l,["mimeType"]);n!==void 0&&p!=null&&f(n,["instances[]","mimeType"],p);const g=u(l,["autoTruncate"]);return n!==void 0&&g!=null&&f(n,["parameters","autoTruncate"],g),a}function JS(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["contents"]);if(r!=null){let g=ar(l,r);Array.isArray(g)&&(g=g.map(y=>y)),f(a,["requests[]","content"],g)}const m=u(n,["config"]);m!=null&&BS(m,a);const p=u(n,["model"]);return p!==void 0&&f(a,["requests[]","model"],Se(l,p)),a}function kS(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["contents"]);if(r!=null){let p=ar(l,r);Array.isArray(p)&&(p=p.map(g=>g)),f(a,["instances[]","content"],p)}const m=u(n,["config"]);return m!=null&&YS(m,a),a}function FS(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["embeddings"]);if(s!=null){let m=s;Array.isArray(m)&&(m=m.map(p=>p)),f(n,["embeddings"],m)}const r=u(l,["metadata"]);return r!=null&&f(n,["metadata"],r),n}function KS(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["predictions[]","embeddings"]);if(s!=null){let m=s;Array.isArray(m)&&(m=m.map(p=>NS(p))),f(n,["embeddings"],m)}const r=u(l,["metadata"]);return r!=null&&f(n,["metadata"],r),n}function XS(l){const n={},a=u(l,["endpoint"]);a!=null&&f(n,["name"],a);const s=u(l,["deployedModelId"]);return s!=null&&f(n,["deployedModelId"],s),n}function QS(l){const n={};if(u(l,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(l,["fileUri"]);a!=null&&f(n,["fileUri"],a);const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function ZS(l){const n={};if(u(l,["behavior"])!==void 0)throw new Error("behavior parameter is not supported in Vertex AI.");const a=u(l,["description"]);a!=null&&f(n,["description"],a);const s=u(l,["name"]);s!=null&&f(n,["name"],s);const r=u(l,["parameters"]);r!=null&&f(n,["parameters"],r);const m=u(l,["parametersJsonSchema"]);m!=null&&f(n,["parametersJsonSchema"],m);const p=u(l,["response"]);p!=null&&f(n,["response"],p);const g=u(l,["responseJsonSchema"]);return g!=null&&f(n,["responseJsonSchema"],g),n}function $S(l,n,a){const s={},r=u(n,["systemInstruction"]);a!==void 0&&r!=null&&f(a,["systemInstruction"],Sa(nt(r)));const m=u(n,["temperature"]);m!=null&&f(s,["temperature"],m);const p=u(n,["topP"]);p!=null&&f(s,["topP"],p);const g=u(n,["topK"]);g!=null&&f(s,["topK"],g);const y=u(n,["candidateCount"]);y!=null&&f(s,["candidateCount"],y);const h=u(n,["maxOutputTokens"]);h!=null&&f(s,["maxOutputTokens"],h);const v=u(n,["stopSequences"]);v!=null&&f(s,["stopSequences"],v);const S=u(n,["responseLogprobs"]);S!=null&&f(s,["responseLogprobs"],S);const _=u(n,["logprobs"]);_!=null&&f(s,["logprobs"],_);const M=u(n,["presencePenalty"]);M!=null&&f(s,["presencePenalty"],M);const w=u(n,["frequencyPenalty"]);w!=null&&f(s,["frequencyPenalty"],w);const H=u(n,["seed"]);H!=null&&f(s,["seed"],H);const k=u(n,["responseMimeType"]);k!=null&&f(s,["responseMimeType"],k);const J=u(n,["responseSchema"]);J!=null&&f(s,["responseSchema"],sr(J));const K=u(n,["responseJsonSchema"]);
117if(K!=null&&f(s,["responseJsonSchema"],K),u(n,["routingConfig"])!==void 0)throw new Error("routingConfig parameter is not supported in Gemini API.");if(u(n,["modelSelectionConfig"])!==void 0)throw new Error("modelSelectionConfig parameter is not supported in Gemini API.");const V=u(n,["safetySettings"]);if(a!==void 0&&V!=null){let ie=V;Array.isArray(ie)&&(ie=ie.map(Ue=>HE(Ue))),f(a,["safetySettings"],ie)}const j=u(n,["tools"]);if(a!==void 0&&j!=null){let ie=Xi(j);Array.isArray(ie)&&(ie=ie.map(Ue=>JE(Ki(Ue)))),f(a,["tools"],ie)}const ne=u(n,["toolConfig"]);if(a!==void 0&&ne!=null&&f(a,["toolConfig"],ne),u(n,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const te=u(n,["cachedContent"]);a!==void 0&&te!=null&&f(a,["cachedContent"],cn(l,te));const F=u(n,["responseModalities"]);F!=null&&f(s,["responseModalities"],F);const ye=u(n,["mediaResolution"]);ye!=null&&f(s,["mediaResolution"],ye);const P=u(n,["speechConfig"]);if(P!=null&&f(s,["speechConfig"],ur(P)),u(n,["audioTimestamp"])!==void 0)throw new Error("audioTimestamp parameter is not supported in Gemini API.");const X=u(n,["thinkingConfig"]);X!=null&&f(s,["thinkingConfig"],X);const oe=u(n,["imageConfig"]);return oe!=null&&f(s,["imageConfig"],oe),s}function WS(l,n,a){const s={},r=u(n,["systemInstruction"]);a!==void 0&&r!=null&&f(a,["systemInstruction"],nt(r));const m=u(n,["temperature"]);m!=null&&f(s,["temperature"],m);const p=u(n,["topP"]);p!=null&&f(s,["topP"],p);const g=u(n,["topK"]);g!=null&&f(s,["topK"],g);const y=u(n,["candidateCount"]);y!=null&&f(s,["candidateCount"],y);const h=u(n,["maxOutputTokens"]);h!=null&&f(s,["maxOutputTokens"],h);const v=u(n,["stopSequences"]);v!=null&&f(s,["stopSequences"],v);const S=u(n,["responseLogprobs"]);S!=null&&f(s,["responseLogprobs"],S);const _=u(n,["logprobs"]);_!=null&&f(s,["logprobs"],_);const M=u(n,["presencePenalty"]);M!=null&&f(s,["presencePenalty"],M);const w=u(n,["frequencyPenalty"]);w!=null&&f(s,["frequencyPenalty"],w);const H=u(n,["seed"]);H!=null&&f(s,["seed"],H);const k=u(n,["responseMimeType"]);k!=null&&f(s,["responseMimeType"],k);const J=u(n,["responseSchema"]);J!=null&&f(s,["responseSchema"],sr(J));const K=u(n,["responseJsonSchema"]);K!=null&&f(s,["responseJsonSchema"],K);const V=u(n,["routingConfig"]);V!=null&&f(s,["routingConfig"],V);const j=u(n,["modelSelectionConfig"]);j!=null&&f(s,["modelConfig"],j);const ne=u(n,["safetySettings"]);if(a!==void 0&&ne!=null){let x=ne;Array.isArray(x)&&(x=x.map(z=>z)),f(a,["safetySettings"],x)}const te=u(n,["tools"]);if(a!==void 0&&te!=null){let x=Xi(te);Array.isArray(x)&&(x=x.map(z=>uh(Ki(z)))),f(a,["tools"],x)}const F=u(n,["toolConfig"]);a!==void 0&&F!=null&&f(a,["toolConfig"],F);const ye=u(n,["labels"]);a!==void 0&&ye!=null&&f(a,["labels"],ye);const P=u(n,["cachedContent"]);a!==void 0&&P!=null&&f(a,["cachedContent"],cn(l,P));const X=u(n,["responseModalities"]);X!=null&&f(s,["responseModalities"],X);const oe=u(n,["mediaResolution"]);oe!=null&&f(s,["mediaResolution"],oe);const ie=u(n,["speechConfig"]);ie!=null&&f(s,["speechConfig"],sh(ur(ie)));const Ue=u(n,["audioTimestamp"]);Ue!=null&&f(s,["audioTimestamp"],Ue);const dt=u(n,["thinkingConfig"]);dt!=null&&f(s,["thinkingConfig"],dt);const Oe=u(n,["imageConfig"]);return Oe!=null&&f(s,["imageConfig"],Oe),s}function xp(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["contents"]);if(r!=null){let p=wt(r);Array.isArray(p)&&(p=p.map(g=>Sa(g))),f(a,["contents"],p)}const m=u(n,["config"]);return m!=null&&f(a,["generationConfig"],$S(l,m,a)),a}function bp(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["contents"]);if(r!=null){let p=wt(r);Array.isArray(p)&&(p=p.map(g=>g)),f(a,["contents"],p)}const m=u(n,["config"]);return m!=null&&f(a,["generationConfig"],WS(l,m,a)),a}function Lp(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["candidates"]);if(s!=null){let y=s;Array.isArray(y)&&(y=y.map(h=>_S(h))),f(n,["candidates"],y)}const r=u(l,["modelVersion"]);r!=null&&f(n,["modelVersion"],r);const m=u(l,["promptFeedback"]);m!=null&&f(n,["promptFeedback"],m);const p=u(l,["responseId"]);p!=null&&f(n,["responseId"],p);const g=u(l,["usageMetadata"]);return g!=null&&f(n,["usageMetadata"],g),n}function wp(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["candidates"]);if(s!=null){let h=s;Array.isArray(h)&&(h=h.map(v=>v)),f(n,["candidates"],h)}const r=u(l,["createTime"]);r!=null&&f(n,["createTime"],r);const m=u(l,["modelVersion"]);m!=null&&f(n,["modelVersion"],m);const p=u(l,["promptFeedback"]);p!=null&&f(n,["promptFeedback"],p);const g=u(l,["responseId"]);g!=null&&f(n,["responseId"],g);const y=u(l,["usageMetadata"]);return y!=null&&f(n,["usageMetadata"],y),n}function jS(l,n){const a={};if(u(l,["outputGcsUri"])!==void 0)throw new Error("outputGcsUri parameter is not supported in Gemini API.");if(u(l,["negativePrompt"])!==void 0)throw new Error("negativePrompt parameter is not supported in Gemini API.");const s=u(l,["numberOfImages"]);
117n!==void 0&&s!=null&&f(n,["parameters","sampleCount"],s);const r=u(l,["aspectRatio"]);n!==void 0&&r!=null&&f(n,["parameters","aspectRatio"],r);const m=u(l,["guidanceScale"]);if(n!==void 0&&m!=null&&f(n,["parameters","guidanceScale"],m),u(l,["seed"])!==void 0)throw new Error("seed parameter is not supported in Gemini API.");const p=u(l,["safetyFilterLevel"]);n!==void 0&&p!=null&&f(n,["parameters","safetySetting"],p);const g=u(l,["personGeneration"]);n!==void 0&&g!=null&&f(n,["parameters","personGeneration"],g);const y=u(l,["includeSafetyAttributes"]);n!==void 0&&y!=null&&f(n,["parameters","includeSafetyAttributes"],y);const h=u(l,["includeRaiReason"]);n!==void 0&&h!=null&&f(n,["parameters","includeRaiReason"],h);const v=u(l,["language"]);n!==void 0&&v!=null&&f(n,["parameters","language"],v);const S=u(l,["outputMimeType"]);n!==void 0&&S!=null&&f(n,["parameters","outputOptions","mimeType"],S);const _=u(l,["outputCompressionQuality"]);if(n!==void 0&&_!=null&&f(n,["parameters","outputOptions","compressionQuality"],_),u(l,["addWatermark"])!==void 0)throw new Error("addWatermark parameter is not supported in Gemini API.");if(u(l,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");const M=u(l,["imageSize"]);if(n!==void 0&&M!=null&&f(n,["parameters","sampleImageSize"],M),u(l,["enhancePrompt"])!==void 0)throw new Error("enhancePrompt parameter is not supported in Gemini API.");return a}function eE(l,n){const a={},s=u(l,["outputGcsUri"]);n!==void 0&&s!=null&&f(n,["parameters","storageUri"],s);const r=u(l,["negativePrompt"]);n!==void 0&&r!=null&&f(n,["parameters","negativePrompt"],r);const m=u(l,["numberOfImages"]);n!==void 0&&m!=null&&f(n,["parameters","sampleCount"],m);const p=u(l,["aspectRatio"]);n!==void 0&&p!=null&&f(n,["parameters","aspectRatio"],p);const g=u(l,["guidanceScale"]);n!==void 0&&g!=null&&f(n,["parameters","guidanceScale"],g);const y=u(l,["seed"]);n!==void 0&&y!=null&&f(n,["parameters","seed"],y);const h=u(l,["safetyFilterLevel"]);n!==void 0&&h!=null&&f(n,["parameters","safetySetting"],h);const v=u(l,["personGeneration"]);n!==void 0&&v!=null&&f(n,["parameters","personGeneration"],v);const S=u(l,["includeSafetyAttributes"]);n!==void 0&&S!=null&&f(n,["parameters","includeSafetyAttributes"],S);const _=u(l,["includeRaiReason"]);n!==void 0&&_!=null&&f(n,["parameters","includeRaiReason"],_);const M=u(l,["language"]);n!==void 0&&M!=null&&f(n,["parameters","language"],M);const w=u(l,["outputMimeType"]);n!==void 0&&w!=null&&f(n,["parameters","outputOptions","mimeType"],w);const H=u(l,["outputCompressionQuality"]);n!==void 0&&H!=null&&f(n,["parameters","outputOptions","compressionQuality"],H);const k=u(l,["addWatermark"]);n!==void 0&&k!=null&&f(n,["parameters","addWatermark"],k);const J=u(l,["labels"]);n!==void 0&&J!=null&&f(n,["labels"],J);const K=u(l,["imageSize"]);n!==void 0&&K!=null&&f(n,["parameters","sampleImageSize"],K);const V=u(l,["enhancePrompt"]);return n!==void 0&&V!=null&&f(n,["parameters","enhancePrompt"],V),a}function tE(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["prompt"]);r!=null&&f(a,["instances[0]","prompt"],r);const m=u(n,["config"]);return m!=null&&jS(m,a),a}function nE(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["prompt"]);r!=null&&f(a,["instances[0]","prompt"],r);const m=u(n,["config"]);return m!=null&&eE(m,a),a}function iE(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["predictions"]);if(s!=null){let m=s;Array.isArray(m)&&(m=m.map(p=>hE(p))),f(n,["generatedImages"],m)}const r=u(l,["positivePromptSafetyAttributes"]);return r!=null&&f(n,["positivePromptSafetyAttributes"],oh(r)),n}function lE(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["predictions"]);if(s!=null){let m=s;Array.isArray(m)&&(m=m.map(p=>Ea(p))),f(n,["generatedImages"],m)}const r=u(l,["positivePromptSafetyAttributes"]);return r!=null&&f(n,["positivePromptSafetyAttributes"],ah(r)),n}function oE(l,n){const a={},s=u(l,["numberOfVideos"]);
117if(n!==void 0&&s!=null&&f(n,["parameters","sampleCount"],s),u(l,["outputGcsUri"])!==void 0)throw new Error("outputGcsUri parameter is not supported in Gemini API.");if(u(l,["fps"])!==void 0)throw new Error("fps parameter is not supported in Gemini API.");const r=u(l,["durationSeconds"]);if(n!==void 0&&r!=null&&f(n,["parameters","durationSeconds"],r),u(l,["seed"])!==void 0)throw new Error("seed parameter is not supported in Gemini API.");const m=u(l,["aspectRatio"]);n!==void 0&&m!=null&&f(n,["parameters","aspectRatio"],m);const p=u(l,["resolution"]);n!==void 0&&p!=null&&f(n,["parameters","resolution"],p);const g=u(l,["personGeneration"]);if(n!==void 0&&g!=null&&f(n,["parameters","personGeneration"],g),u(l,["pubsubTopic"])!==void 0)throw new Error("pubsubTopic parameter is not supported in Gemini API.");const y=u(l,["negativePrompt"]);n!==void 0&&y!=null&&f(n,["parameters","negativePrompt"],y);const h=u(l,["enhancePrompt"]);if(n!==void 0&&h!=null&&f(n,["parameters","enhancePrompt"],h),u(l,["generateAudio"])!==void 0)throw new Error("generateAudio parameter is not supported in Gemini API.");const v=u(l,["lastFrame"]);n!==void 0&&v!=null&&f(n,["instances[0]","lastFrame"],_a(v));const S=u(l,["referenceImages"]);if(n!==void 0&&S!=null){let _=S;Array.isArray(_)&&(_=_.map(M=>i_(M))),f(n,["instances[0]","referenceImages"],_)}if(u(l,["mask"])!==void 0)throw new Error("mask parameter is not supported in Gemini API.");if(u(l,["compressionQuality"])!==void 0)throw new Error("compressionQuality parameter is not supported in Gemini API.");return a}function aE(l,n){const a={},s=u(l,["numberOfVideos"]);n!==void 0&&s!=null&&f(n,["parameters","sampleCount"],s);const r=u(l,["outputGcsUri"]);n!==void 0&&r!=null&&f(n,["parameters","storageUri"],r);const m=u(l,["fps"]);n!==void 0&&m!=null&&f(n,["parameters","fps"],m);const p=u(l,["durationSeconds"]);n!==void 0&&p!=null&&f(n,["parameters","durationSeconds"],p);const g=u(l,["seed"]);n!==void 0&&g!=null&&f(n,["parameters","seed"],g);const y=u(l,["aspectRatio"]);n!==void 0&&y!=null&&f(n,["parameters","aspectRatio"],y);const h=u(l,["resolution"]);n!==void 0&&h!=null&&f(n,["parameters","resolution"],h);const v=u(l,["personGeneration"]);n!==void 0&&v!=null&&f(n,["parameters","personGeneration"],v);const S=u(l,["pubsubTopic"]);n!==void 0&&S!=null&&f(n,["parameters","pubsubTopic"],S);const _=u(l,["negativePrompt"]);n!==void 0&&_!=null&&f(n,["parameters","negativePrompt"],_);const M=u(l,["enhancePrompt"]);n!==void 0&&M!=null&&f(n,["parameters","enhancePrompt"],M);const w=u(l,["generateAudio"]);n!==void 0&&w!=null&&f(n,["parameters","generateAudio"],w);const H=u(l,["lastFrame"]);n!==void 0&&H!=null&&f(n,["instances[0]","lastFrame"],Vt(H));const k=u(l,["referenceImages"]);if(n!==void 0&&k!=null){let V=k;Array.isArray(V)&&(V=V.map(j=>l_(j))),f(n,["instances[0]","referenceImages"],V)}const J=u(l,["mask"]);n!==void 0&&J!=null&&f(n,["instances[0]","mask"],n_(J));const K=u(l,["compressionQuality"]);return n!==void 0&&K!=null&&f(n,["parameters","compressionQuality"],K),a}function sE(l){const n={},a=u(l,["name"]);a!=null&&f(n,["name"],a);const s=u(l,["metadata"]);s!=null&&f(n,["metadata"],s);const r=u(l,["done"]);r!=null&&f(n,["done"],r);const m=u(l,["error"]);m!=null&&f(n,["error"],m);const p=u(l,["response","generateVideoResponse"]);return p!=null&&f(n,["response"],fE(p)),n}function uE(l){const n={},a=u(l,["name"]);a!=null&&f(n,["name"],a);const s=u(l,["metadata"]);s!=null&&f(n,["metadata"],s);const r=u(l,["done"]);r!=null&&f(n,["done"],r);const m=u(l,["error"]);m!=null&&f(n,["error"],m);const p=u(l,["response"]);return p!=null&&f(n,["response"],dE(p)),n}function rE(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["prompt"]);r!=null&&f(a,["instances[0]","prompt"],r);const m=u(n,["image"]);m!=null&&f(a,["instances[0]","image"],_a(m));const p=u(n,["video"]);p!=null&&f(a,["instances[0]","video"],rh(p));const g=u(n,["source"]);g!=null&&mE(g,a);const y=u(n,["config"]);return y!=null&&oE(y,a),a}function cE(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["prompt"]);r!=null&&f(a,["instances[0]","prompt"],r);const m=u(n,["image"]);m!=null&&f(a,["instances[0]","image"],Vt(m));const p=u(n,["video"]);p!=null&&f(a,["instances[0]","video"],ch(p));const g=u(n,["source"]);g!=null&&pE(g,a);const y=u(n,["config"]);return y!=null&&aE(y,a),a}function fE(l){const n={},a=u(l,["generatedSamples"]);if(a!=null){let m=a;Array.isArray(m)&&(m=m.map(p=>yE(p))),f(n,["generatedVideos"],m)}const s=u(l,["raiMediaFilteredCount"]);s!=null&&f(n,["raiMediaFilteredCount"],s);const r=u(l,["raiMediaFilteredReasons"]);return r!=null&&f(n,["raiMediaFilteredReasons"],r),n}function dE(l){const n={},a=u(l,["videos"]);if(a!=null){let m=a;Array.isArray(m)&&(m=m.map(p=>TE(p))),f(n,["generatedVideos"],m)}const s=u(l,["raiMediaFilteredCount"]);s!=null&&f(n,["raiMediaFilteredCount"],s);const r=u(l,["raiMediaFilteredReasons"]);return r!=null&&f(n,["raiMediaFilteredReasons"],r),n}
117function mE(l,n){const a={},s=u(l,["prompt"]);n!==void 0&&s!=null&&f(n,["instances[0]","prompt"],s);const r=u(l,["image"]);n!==void 0&&r!=null&&f(n,["instances[0]","image"],_a(r));const m=u(l,["video"]);return n!==void 0&&m!=null&&f(n,["instances[0]","video"],rh(m)),a}function pE(l,n){const a={},s=u(l,["prompt"]);n!==void 0&&s!=null&&f(n,["instances[0]","prompt"],s);const r=u(l,["image"]);n!==void 0&&r!=null&&f(n,["instances[0]","image"],Vt(r));const m=u(l,["video"]);return n!==void 0&&m!=null&&f(n,["instances[0]","video"],ch(m)),a}function hE(l){const n={},a=u(l,["_self"]);a!=null&&f(n,["image"],CE(a));const s=u(l,["raiFilteredReason"]);s!=null&&f(n,["raiFilteredReason"],s);const r=u(l,["_self"]);return r!=null&&f(n,["safetyAttributes"],oh(r)),n}function Ea(l){const n={},a=u(l,["_self"]);a!=null&&f(n,["image"],lh(a));const s=u(l,["raiFilteredReason"]);s!=null&&f(n,["raiFilteredReason"],s);const r=u(l,["_self"]);r!=null&&f(n,["safetyAttributes"],ah(r));const m=u(l,["prompt"]);return m!=null&&f(n,["enhancedPrompt"],m),n}function gE(l){const n={},a=u(l,["_self"]);a!=null&&f(n,["mask"],lh(a));const s=u(l,["labels"]);if(s!=null){let r=s;Array.isArray(r)&&(r=r.map(m=>m)),f(n,["labels"],r)}return n}function yE(l){const n={},a=u(l,["_self"]);return a!=null&&f(n,["video"],e_(a)),n}function TE(l){const n={},a=u(l,["_self"]);return a!=null&&f(n,["video"],t_(a)),n}function vE(l){const n={},a=u(l,["modelSelectionConfig"]);a!=null&&f(n,["modelConfig"],a);const s=u(l,["audioTimestamp"]);s!=null&&f(n,["audioTimestamp"],s);const r=u(l,["candidateCount"]);r!=null&&f(n,["candidateCount"],r);const m=u(l,["enableAffectiveDialog"]);m!=null&&f(n,["enableAffectiveDialog"],m);const p=u(l,["frequencyPenalty"]);p!=null&&f(n,["frequencyPenalty"],p);const g=u(l,["logprobs"]);g!=null&&f(n,["logprobs"],g);const y=u(l,["maxOutputTokens"]);y!=null&&f(n,["maxOutputTokens"],y);const h=u(l,["mediaResolution"]);h!=null&&f(n,["mediaResolution"],h);const v=u(l,["presencePenalty"]);v!=null&&f(n,["presencePenalty"],v);const S=u(l,["responseJsonSchema"]);S!=null&&f(n,["responseJsonSchema"],S);const _=u(l,["responseLogprobs"]);_!=null&&f(n,["responseLogprobs"],_);const M=u(l,["responseMimeType"]);M!=null&&f(n,["responseMimeType"],M);const w=u(l,["responseModalities"]);w!=null&&f(n,["responseModalities"],w);const H=u(l,["responseSchema"]);H!=null&&f(n,["responseSchema"],H);const k=u(l,["routingConfig"]);k!=null&&f(n,["routingConfig"],k);const J=u(l,["seed"]);J!=null&&f(n,["seed"],J);const K=u(l,["speechConfig"]);K!=null&&f(n,["speechConfig"],sh(K));const V=u(l,["stopSequences"]);V!=null&&f(n,["stopSequences"],V);const j=u(l,["temperature"]);j!=null&&f(n,["temperature"],j);const ne=u(l,["thinkingConfig"]);ne!=null&&f(n,["thinkingConfig"],ne);const te=u(l,["topK"]);te!=null&&f(n,["topK"],te);const F=u(l,["topP"]);return F!=null&&f(n,["topP"],F),n}function SE(l,n){const a={},s=u(n,["model"]);return s!=null&&f(a,["_url","name"],Se(l,s)),a}function EE(l,n){const a={},s=u(n,["model"]);return s!=null&&f(a,["_url","name"],Se(l,s)),a}function _E(l){const n={},a=u(l,["timeRangeFilter"]);if(a!=null&&f(n,["timeRangeFilter"],a),u(l,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");return n}function CE(l){const n={},a=u(l,["bytesBase64Encoded"]);a!=null&&f(n,["imageBytes"],On(a));const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function lh(l){const n={},a=u(l,["gcsUri"]);a!=null&&f(n,["gcsUri"],a);const s=u(l,["bytesBase64Encoded"]);s!=null&&f(n,["imageBytes"],On(s));const r=u(l,["mimeType"]);return r!=null&&f(n,["mimeType"],r),n}function _a(l){const n={};if(u(l,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");const a=u(l,["imageBytes"]);a!=null&&f(n,["bytesBase64Encoded"],On(a));const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function Vt(l){const n={},a=u(l,["gcsUri"]);a!=null&&f(n,["gcsUri"],a);const s=u(l,["imageBytes"]);s!=null&&f(n,["bytesBase64Encoded"],On(s));const r=u(l,["mimeType"]);return r!=null&&f(n,["mimeType"],r),n}function AE(l,n,a){const s={},r=u(n,["pageSize"]);a!==void 0&&r!=null&&f(a,["_query","pageSize"],r);const m=u(n,["pageToken"]);a!==void 0&&m!=null&&f(a,["_query","pageToken"],m);const p=u(n,["filter"]);a!==void 0&&p!=null&&f(a,["_query","filter"],p);const g=u(n,["queryBase"]);return a!==void 0&&g!=null&&f(a,["_url","models_url"],Zp(l,g)),s}function RE(l,n,a){const s={},r=u(n,["pageSize"]);a!==void 0&&r!=null&&f(a,["_query","pageSize"],r);const m=u(n,["pageToken"]);a!==void 0&&m!=null&&f(a,["_query","pageToken"],m);const p=u(n,["filter"]);a!==void 0&&p!=null&&f(a,["_query","filter"],p);const g=u(n,["queryBase"]);return a!==void 0&&g!=null&&f(a,["_url","models_url"],Zp(l,g)),s}function NE(l,n){const a={},s=u(n,["config"]);return s!=null&&AE(l,s,a),a}function ME(l,n){const a={},s=u(n,["config"]);return s!=null&&RE(l,s,a),a}function IE(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["nextPageToken"]);s!=null&&f(n,["nextPageToken"],s);const r=u(l,["_self"]);if(r!=null){let m=$p(r);Array.isArray(m)&&(m=m.map(p=>er(p))),f(n,["models"],m)}return n}function DE(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["nextPageToken"]);s!=null&&f(n,["nextPageToken"],s);const r=u(l,["_self"]);if(r!=null){let m=$p(r);Array.isArray(m)&&(m=m.map(p=>tr(p))),f(n,["models"],m)}return n}function UE(l){const n={},a=u(l,["maskMode"]);a!=null&&f(n,["maskMode"],a);const s=u(l,["segmentationClasses"]);s!=null&&f(n,["maskClasses"],s);const r=u(l,["maskDilation"]);return r!=null&&f(n,["dilation"],r),n}function er(l){const n={},a=u(l,["name"]);a!=null&&f(n,["name"],a);const s=u(l,["displayName"]);s!=null&&f(n,["displayName"],s);const r=u(l,["description"]);r!=null&&f(n,["description"],r);const m=u(l,["version"]);
117m!=null&&f(n,["version"],m);const p=u(l,["_self"]);p!=null&&f(n,["tunedModelInfo"],kE(p));const g=u(l,["inputTokenLimit"]);g!=null&&f(n,["inputTokenLimit"],g);const y=u(l,["outputTokenLimit"]);y!=null&&f(n,["outputTokenLimit"],y);const h=u(l,["supportedGenerationMethods"]);return h!=null&&f(n,["supportedActions"],h),n}function tr(l){const n={},a=u(l,["name"]);a!=null&&f(n,["name"],a);const s=u(l,["displayName"]);s!=null&&f(n,["displayName"],s);const r=u(l,["description"]);r!=null&&f(n,["description"],r);const m=u(l,["versionId"]);m!=null&&f(n,["version"],m);const p=u(l,["deployedModels"]);if(p!=null){let S=p;Array.isArray(S)&&(S=S.map(_=>XS(_))),f(n,["endpoints"],S)}const g=u(l,["labels"]);g!=null&&f(n,["labels"],g);const y=u(l,["_self"]);y!=null&&f(n,["tunedModelInfo"],FE(y));const h=u(l,["defaultCheckpointId"]);h!=null&&f(n,["defaultCheckpointId"],h);const v=u(l,["checkpoints"]);if(v!=null){let S=v;Array.isArray(S)&&(S=S.map(_=>_)),f(n,["checkpoints"],S)}return n}function xE(l){const n={},a=u(l,["videoMetadata"]);a!=null&&f(n,["videoMetadata"],a);const s=u(l,["thought"]);s!=null&&f(n,["thought"],s);const r=u(l,["inlineData"]);r!=null&&f(n,["inlineData"],ES(r));const m=u(l,["fileData"]);m!=null&&f(n,["fileData"],QS(m));const p=u(l,["thoughtSignature"]);p!=null&&f(n,["thoughtSignature"],p);const g=u(l,["functionCall"]);g!=null&&f(n,["functionCall"],g);const y=u(l,["codeExecutionResult"]);y!=null&&f(n,["codeExecutionResult"],y);const h=u(l,["executableCode"]);h!=null&&f(n,["executableCode"],h);const v=u(l,["functionResponse"]);v!=null&&f(n,["functionResponse"],v);const S=u(l,["text"]);return S!=null&&f(n,["text"],S),n}function bE(l){const n={},a=u(l,["productImage"]);return a!=null&&f(n,["image"],Vt(a)),n}function LE(l,n){const a={},s=u(l,["numberOfImages"]);n!==void 0&&s!=null&&f(n,["parameters","sampleCount"],s);const r=u(l,["baseSteps"]);n!==void 0&&r!=null&&f(n,["parameters","editConfig","baseSteps"],r);const m=u(l,["outputGcsUri"]);n!==void 0&&m!=null&&f(n,["parameters","storageUri"],m);const p=u(l,["seed"]);n!==void 0&&p!=null&&f(n,["parameters","seed"],p);const g=u(l,["safetyFilterLevel"]);n!==void 0&&g!=null&&f(n,["parameters","safetySetting"],g);const y=u(l,["personGeneration"]);n!==void 0&&y!=null&&f(n,["parameters","personGeneration"],y);const h=u(l,["addWatermark"]);n!==void 0&&h!=null&&f(n,["parameters","addWatermark"],h);const v=u(l,["outputMimeType"]);n!==void 0&&v!=null&&f(n,["parameters","outputOptions","mimeType"],v);const S=u(l,["outputCompressionQuality"]);n!==void 0&&S!=null&&f(n,["parameters","outputOptions","compressionQuality"],S);const _=u(l,["enhancePrompt"]);n!==void 0&&_!=null&&f(n,["parameters","enhancePrompt"],_);const M=u(l,["labels"]);return n!==void 0&&M!=null&&f(n,["labels"],M),a}function wE(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["source"]);r!=null&&OE(r,a);const m=u(n,["config"]);return m!=null&&LE(m,a),a}function qE(l){const n={},a=u(l,["predictions"]);if(a!=null){let s=a;Array.isArray(s)&&(s=s.map(r=>Ea(r))),f(n,["generatedImages"],s)}return n}function OE(l,n){const a={},s=u(l,["prompt"]);n!==void 0&&s!=null&&f(n,["instances[0]","prompt"],s);const r=u(l,["personImage"]);n!==void 0&&r!=null&&f(n,["instances[0]","personImage","image"],Vt(r));const m=u(l,["productImages"]);if(n!==void 0&&m!=null){let p=m;Array.isArray(p)&&(p=p.map(g=>bE(g))),f(n,["instances[0]","productImages"],p)}return a}function GE(l){const n={},a=u(l,["referenceImage"]);a!=null&&f(n,["referenceImage"],Vt(a));const s=u(l,["referenceId"]);s!=null&&f(n,["referenceId"],s);const r=u(l,["referenceType"]);r!=null&&f(n,["referenceType"],r);const m=u(l,["maskImageConfig"]);m!=null&&f(n,["maskImageConfig"],UE(m));const p=u(l,["controlImageConfig"]);p!=null&&f(n,["controlImageConfig"],IS(p));const g=u(l,["styleImageConfig"]);g!=null&&f(n,["styleImageConfig"],g);const y=u(l,["subjectImageConfig"]);return y!=null&&f(n,["subjectImageConfig"],y),n}function oh(l){const n={},a=u(l,["safetyAttributes","categories"]);a!=null&&f(n,["categories"],a);const s=u(l,["safetyAttributes","scores"]);s!=null&&f(n,["scores"],s);const r=u(l,["contentType"]);return r!=null&&f(n,["contentType"],r),n}function ah(l){const n={},a=u(l,["safetyAttributes","categories"]);a!=null&&f(n,["categories"],a);const s=u(l,["safetyAttributes","scores"]);s!=null&&f(n,["scores"],s);const r=u(l,["contentType"]);return r!=null&&f(n,["contentType"],r),n}function HE(l){const n={};if(u(l,["method"])!==void 0)throw new Error("method parameter is not supported in Gemini API.");const a=u(l,["category"]);a!=null&&f(n,["category"],a);const s=u(l,["threshold"]);return s!=null&&f(n,["threshold"],s),n}function VE(l){const n={},a=u(l,["image"]);return a!=null&&f(n,["image"],Vt(a)),n}function zE(l,n){const a={},s=u(l,["mode"]);n!==void 0&&s!=null&&f(n,["parameters","mode"],s);const r=u(l,["maxPredictions"]);n!==void 0&&r!=null&&f(n,["parameters","maxPredictions"],r);const m=u(l,["confidenceThreshold"]);n!==void 0&&m!=null&&f(n,["parameters","confidenceThreshold"],m);const p=u(l,["maskDilation"]);n!==void 0&&p!=null&&f(n,["parameters","maskDilation"],p);const g=u(l,["binaryColorThreshold"]);n!==void 0&&g!=null&&f(n,["parameters","binaryColorThreshold"],g);const y=u(l,["labels"]);return n!==void 0&&y!=null&&f(n,["labels"],y),a}function PE(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["source"]);r!=null&&YE(r,a);const m=u(n,["config"]);return m!=null&&zE(m,a),a}function BE(l){const n={},a=u(l,["predictions"]);if(a!=null){let s=a;Array.isArray(s)&&(s=s.map(r=>gE(r))),f(n,["generatedMasks"],s)}return n}function YE(l,n){const a={},s=u(l,["prompt"]);n!==void 0&&s!=null&&f(n,["instances[0]","prompt"],s);const r=u(l,["image"]);n!==void 0&&r!=null&&f(n,["instances[0]","image"],Vt(r));const m=u(l,["scribbleImage"]);return n!==void 0&&m!=null&&f(n,["instances[0]","scribble"],VE(m)),a}function sh(l){const n={},a=u(l,["voiceConfig"]);if(a!=null&&f(n,["voiceConfig"],a),u(l,["multiSpeakerVoiceConfig"])!==void 0)throw new Error("multiSpeakerVoiceConfig parameter is not supported in Vertex AI.");const s=u(l,["languageCode"]);return s!=null&&f(n,["languageCode"],s),n}function JE(l){const n={},a=u(l,["functionDeclarations"]);if(a!=null){let y=a;Array.isArray(y)&&(y=y.map(h=>h)),f(n,["functionDeclarations"],y)}if(u(l,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const s=u(l,["googleSearch"]);s!=null&&f(n,["googleSearch"],_E(s));const r=u(l,["googleSearchRetrieval"]);if(r!=null&&f(n,["googleSearchRetrieval"],r),u(l,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");if(u(l,["googleMaps"])!==void 0)throw new Error("googleMaps parameter is not supported in Gemini API.");
117const m=u(l,["urlContext"]);m!=null&&f(n,["urlContext"],m);const p=u(l,["computerUse"]);p!=null&&f(n,["computerUse"],p);const g=u(l,["codeExecution"]);return g!=null&&f(n,["codeExecution"],g),n}function uh(l){const n={},a=u(l,["functionDeclarations"]);if(a!=null){let S=a;Array.isArray(S)&&(S=S.map(_=>ZS(_))),f(n,["functionDeclarations"],S)}const s=u(l,["retrieval"]);s!=null&&f(n,["retrieval"],s);const r=u(l,["googleSearch"]);r!=null&&f(n,["googleSearch"],r);const m=u(l,["googleSearchRetrieval"]);m!=null&&f(n,["googleSearchRetrieval"],m);const p=u(l,["enterpriseWebSearch"]);p!=null&&f(n,["enterpriseWebSearch"],p);const g=u(l,["googleMaps"]);g!=null&&f(n,["googleMaps"],g);const y=u(l,["urlContext"]);y!=null&&f(n,["urlContext"],y);const h=u(l,["computerUse"]);h!=null&&f(n,["computerUse"],h);const v=u(l,["codeExecution"]);return v!=null&&f(n,["codeExecution"],v),n}function kE(l){const n={},a=u(l,["baseModel"]);a!=null&&f(n,["baseModel"],a);const s=u(l,["createTime"]);s!=null&&f(n,["createTime"],s);const r=u(l,["updateTime"]);return r!=null&&f(n,["updateTime"],r),n}function FE(l){const n={},a=u(l,["labels","google-vertex-llm-tuning-base-model-id"]);a!=null&&f(n,["baseModel"],a);const s=u(l,["createTime"]);s!=null&&f(n,["createTime"],s);const r=u(l,["updateTime"]);return r!=null&&f(n,["updateTime"],r),n}function KE(l,n){const a={},s=u(l,["displayName"]);n!==void 0&&s!=null&&f(n,["displayName"],s);const r=u(l,["description"]);n!==void 0&&r!=null&&f(n,["description"],r);const m=u(l,["defaultCheckpointId"]);return n!==void 0&&m!=null&&f(n,["defaultCheckpointId"],m),a}function XE(l,n){const a={},s=u(l,["displayName"]);n!==void 0&&s!=null&&f(n,["displayName"],s);const r=u(l,["description"]);n!==void 0&&r!=null&&f(n,["description"],r);const m=u(l,["defaultCheckpointId"]);return n!==void 0&&m!=null&&f(n,["defaultCheckpointId"],m),a}function QE(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","name"],Se(l,s));const r=u(n,["config"]);return r!=null&&KE(r,a),a}function ZE(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["config"]);return r!=null&&XE(r,a),a}function $E(l,n){const a={},s=u(l,["outputGcsUri"]);n!==void 0&&s!=null&&f(n,["parameters","storageUri"],s);const r=u(l,["includeRaiReason"]);n!==void 0&&r!=null&&f(n,["parameters","includeRaiReason"],r);const m=u(l,["outputMimeType"]);n!==void 0&&m!=null&&f(n,["parameters","outputOptions","mimeType"],m);const p=u(l,["outputCompressionQuality"]);n!==void 0&&p!=null&&f(n,["parameters","outputOptions","compressionQuality"],p);const g=u(l,["enhanceInputImage"]);n!==void 0&&g!=null&&f(n,["parameters","upscaleConfig","enhanceInputImage"],g);const y=u(l,["imagePreservationFactor"]);n!==void 0&&y!=null&&f(n,["parameters","upscaleConfig","imagePreservationFactor"],y);const h=u(l,["labels"]);n!==void 0&&h!=null&&f(n,["labels"],h);const v=u(l,["numberOfImages"]);n!==void 0&&v!=null&&f(n,["parameters","sampleCount"],v);const S=u(l,["mode"]);return n!==void 0&&S!=null&&f(n,["parameters","mode"],S),a}function WE(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["_url","model"],Se(l,s));const r=u(n,["image"]);r!=null&&f(a,["instances[0]","image"],Vt(r));const m=u(n,["upscaleFactor"]);m!=null&&f(a,["parameters","upscaleConfig","upscaleFactor"],m);const p=u(n,["config"]);return p!=null&&$E(p,a),a}function jE(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["predictions"]);if(s!=null){let r=s;Array.isArray(r)&&(r=r.map(m=>Ea(m))),f(n,["generatedImages"],r)}return n}function e_(l){const n={},a=u(l,["video","uri"]);a!=null&&f(n,["uri"],a);const s=u(l,["video","encodedVideo"]);s!=null&&f(n,["videoBytes"],On(s));const r=u(l,["encoding"]);return r!=null&&f(n,["mimeType"],r),n}function t_(l){const n={},a=u(l,["gcsUri"]);a!=null&&f(n,["uri"],a);const s=u(l,["bytesBase64Encoded"]);s!=null&&f(n,["videoBytes"],On(s));const r=u(l,["mimeType"]);return r!=null&&f(n,["mimeType"],r),n}function n_(l){const n={},a=u(l,["image"]);a!=null&&f(n,["_self"],Vt(a));const s=u(l,["maskMode"]);return s!=null&&f(n,["maskMode"],s),n}function i_(l){const n={},a=u(l,["image"]);a!=null&&f(n,["image"],_a(a));const s=u(l,["referenceType"]);return s!=null&&f(n,["referenceType"],s),n}function l_(l){const n={},a=u(l,["image"]);a!=null&&f(n,["image"],Vt(a));const s=u(l,["referenceType"]);return s!=null&&f(n,["referenceType"],s),n}function rh(l){const n={},a=u(l,["uri"]);a!=null&&f(n,["video","uri"],a);const s=u(l,["videoBytes"]);s!=null&&f(n,["video","encodedVideo"],On(s));const r=u(l,["mimeType"]);return r!=null&&f(n,["encoding"],r),n}function ch(l){const n={},a=u(l,["uri"]);a!=null&&f(n,["gcsUri"],a);const s=u(l,["videoBytes"]);s!=null&&f(n,["bytesBase64Encoded"],On(s));const r=u(l,["mimeType"]);return r!=null&&f(n,["mimeType"],r),n}/** 118 * @license 119 * Copyright 2025 Google LLC 120 * SPDX-License-Identifier: Apache-2.0 121 */const o_="Content-Type",a_="X-Server-Timeout",s_="User-Agent",nr="x-goog-api-client",u_="1.23.0",r_=`google-genai-sdk/${u_}`,c_="v1beta1",f_="v1beta",qp=/^\s*data: (.*)(?:\n\n|\r\r|\r\n\r\n)/;class d_{constructor(n){var a,s;this.clientOptions=Object.assign(Object.assign({},n),{project:n.project,location:n.location,apiKey:n.apiKey,vertexai:n.vertexai});const r={};this.clientOptions.vertexai?(r.apiVersion=(a=this.clientOptions.apiVersion)!==null&&a!==void 0?a:c_,r.baseUrl=this.baseUrlFromProjectLocation(),this.normalizeAuthParameters()):(r.apiVersion=(s=this.clientOptions.apiVersion)!==null&&s!==void 0?s:f_,r.baseUrl="https://generativelanguage.googleapis.com/"),r.headers=this.getDefaultHeaders(),this.clientOptions.httpOptions=r,n.httpOptions&&(this.clientOptions.httpOptions=this.patchHttpOptions(r,n.httpOptions))}baseUrlFromProjectLocation(){return this.clientOptions.project&&this.clientOptions.location&&this.clientOptions.location!=="global"?`https://${this.clientOptions.location}-aiplatform.googleapis.com/`:"https://aiplatform.googleapis.com/"}normalizeAuthParameters(){if(this.clientOptions.project&&this.clientOptions.location){this.clientOptions.apiKey=void 0;return}this.clientOptions.project=void 0,this.clientOptions.location=void 0}isVertexAI(){var n;return(n=this.clientOptions.vertexai)!==null&&n!==void 0?n:!1}getProject(){return this.clientOptions.project}getLocation(){return this.clientOptions.location}getApiVersion(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.apiVersion!==void 0)return this.clientOptions.httpOptions.apiVersion;throw new Error("API version is not set.")}getBaseUrl(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.baseUrl!==void 0)return this.clientOptions.httpOptions.baseUrl;throw new Error("Base URL is not set.")}getRequestUrl(){return this.getRequestUrlInternal(this.clientOptions.httpOptions)}getHeaders(){if(this.clientOptions.httpOptions&&this.clientOptions.httpOptions.headers!==void 0)return this.clientOptions.httpOptions.headers;throw new Error("Headers are not set.")}getRequestUrlInternal(n){if(!n||n.baseUrl===void 0||n.apiVersion===void 0)throw new Error("HTTP options are not correctly set.");const s=[n.baseUrl.endsWith("/")?n.baseUrl.slice(0,-1):n.baseUrl];return n.apiVersion&&n.apiVersion!==""&&s.push(n.apiVersion),s.join("/")}getBaseResourcePath(){return`projects/${this.clientOptions.project}/locations/${this.clientOptions.location}`}getApiKey(){return this.clientOptions.apiKey}getWebsocketBaseUrl(){const n=this.getBaseUrl(),a=new URL(n);return a.protocol=a.protocol=="http:"?"ws":"wss",a.toString()}setBaseUrl(n){if(this.clientOptions.httpOptions)this.clientOptions.httpOptions.baseUrl=n;else throw new Error("HTTP options are not correctly set.")}constructUrl(n,a,s){const r=[this.getRequestUrlInternal(a)];return s&&r.push(this.getBaseResourcePath()),n!==""&&r.push(n),new URL(`${r.join("/")}`)}shouldPrependVertexProjectPath(n){return!(this.clientOptions.apiKey||!this.clientOptions.vertexai||n.path.startsWith("projects/")||n.httpMethod==="GET"&&n.path.startsWith("publishers/google/models"))}async request(n){let a=this.clientOptions.httpOptions;n.httpOptions&&(a=this.patchHttpOptions(this.clientOptions.httpOptions,n.httpOptions));const s=this.shouldPrependVertexProjectPath(n),r=this.constructUrl(n.path,a,s);if(n.queryParams)for(const[p,g]of Object.entries(n.queryParams))r.searchParams.append(p,String(g));let m={};if(n.httpMethod==="GET"){if(n.body&&n.body!=="{}")throw new Error("Request body should be empty for GET request, but got non empty request body")}else m.body=n.body;return m=await this.includeExtraHttpOptionsToRequestInit(m,a,n.abortSignal),this.unaryApiCall(r,m,n.httpMethod)}patchHttpOptions(n,a){const s=JSON.parse(JSON.stringify(n));for(const[r,m]of Object.entries(a))typeof m=="object"?s[r]=Object.assign(Object.assign({},s[r]),m):m!==void 0&&(s[r]=m);return s}async requestStream(n){let a=this.clientOptions.httpOptions;n.httpOptions&&(a=this.patchHttpOptions(this.clientOptions.httpOptions,n.httpOptions));const s=this.shouldPrependVertexProjectPath(n),r=this.constructUrl(n.path,a,s);(!r.searchParams.has("alt")||r.searchParams.get("alt")!=="sse")&&r.searchParams.set("alt","sse");let m={};return m.body=n.body,m=await this.includeExtraHttpOptionsToRequestInit(m,a,n.abortSignal),this.streamApiCall(r,m,n.httpMethod)}
121async includeExtraHttpOptionsToRequestInit(n,a,s){if(a&&a.timeout||s){const r=new AbortController,m=r.signal;if(a.timeout&&(a==null?void 0:a.timeout)>0){const p=setTimeout(()=>r.abort(),a.timeout);p&&typeof p.unref=="function"&&p.unref()}s&&s.addEventListener("abort",()=>{r.abort()}),n.signal=m}return a&&a.extraBody!==null&&m_(n,a.extraBody),n.headers=await this.getHeadersInternal(a),n}async unaryApiCall(n,a,s){return this.apiCall(n.toString(),Object.assign(Object.assign({},a),{method:s})).then(async r=>(await Op(r),new $u(r))).catch(r=>{throw r instanceof Error?r:new Error(JSON.stringify(r))})}async streamApiCall(n,a,s){return this.apiCall(n.toString(),Object.assign(Object.assign({},a),{method:s})).then(async r=>(await Op(r),this.processStreamResponse(r))).catch(r=>{throw r instanceof Error?r:new Error(JSON.stringify(r))})}processStreamResponse(n){var a;return ki(this,arguments,function*(){const r=(a=n==null?void 0:n.body)===null||a===void 0?void 0:a.getReader(),m=new TextDecoder("utf-8");if(!r)throw new Error("Response body is empty");try{let p="";for(;;){const{done:g,value:y}=yield we(r.read());if(g){if(p.trim().length>0)throw new Error("Incomplete JSON segment at the end");break}const h=m.decode(y,{stream:!0});try{const S=JSON.parse(h);if("error"in S){const _=JSON.parse(JSON.stringify(S.error)),M=_.status,w=_.code,H=`got status: ${M}. ${JSON.stringify(S)}`;if(w>=400&&w<600)throw new va({message:H,status:w})}}catch(S){if(S.name==="ApiError")throw S}p+=h;let v=p.match(qp);for(;v;){const S=v[1];try{const _=new Response(S,{headers:n==null?void 0:n.headers,status:n==null?void 0:n.status,statusText:n==null?void 0:n.statusText});yield yield we(new $u(_)),p=p.slice(v[0].length),v=p.match(qp)}catch(_){throw new Error(`exception parsing stream chunk ${S}. ${_}`)}}}}finally{r.releaseLock()}})}async apiCall(n,a){return fetch(n,a).catch(s=>{throw new Error(`exception ${s} sending request`)})}getDefaultHeaders(){const n={},a=r_+" "+this.clientOptions.userAgentExtra;return n[s_]=a,n[nr]=a,n[o_]="application/json",n}async getHeadersInternal(n){const a=new Headers;if(n&&n.headers){for(const[s,r]of Object.entries(n.headers))a.append(s,r);n.timeout&&n.timeout>0&&a.append(a_,String(Math.ceil(n.timeout/1e3)))}return await this.clientOptions.auth.addAuthHeaders(a),a}async uploadFile(n,a){var s;const r={};a!=null&&(r.mimeType=a.mimeType,r.name=a.name,r.displayName=a.displayName),r.name&&!r.name.startsWith("files/")&&(r.name=`files/${r.name}`);const m=this.clientOptions.uploader,p=await m.stat(n);r.sizeBytes=String(p.size);const g=(s=a==null?void 0:a.mimeType)!==null&&s!==void 0?s:p.type;if(g===void 0||g==="")throw new Error("Can not determine mimeType. Please provide mimeType in the config.");r.mimeType=g;const y=await this.fetchUploadUrl(r,a);return m.upload(n,y,this)}async downloadFile(n){await this.clientOptions.downloader.download(n,this)}async fetchUploadUrl(n,a){var s;let r={};a!=null&&a.httpOptions?r=a.httpOptions:r={apiVersion:"",headers:{"Content-Type":"application/json","X-Goog-Upload-Protocol":"resumable","X-Goog-Upload-Command":"start","X-Goog-Upload-Header-Content-Length":`${n.sizeBytes}`,"X-Goog-Upload-Header-Content-Type":`${n.mimeType}`}};const m={file:n},p=await this.request({path:Z("upload/v1beta/files",m._url),body:JSON.stringify(m),httpMethod:"POST",httpOptions:r});if(!p||!(p!=null&&p.headers))throw new Error("Server did not return an HttpResponse or the returned HttpResponse did not have headers.");const g=(s=p==null?void 0:p.headers)===null||s===void 0?void 0:s["x-goog-upload-url"];if(g===void 0)throw new Error("Failed to get upload url. Server did not return the x-google-upload-url in the headers");return g}}async function Op(l){var n;if(l===void 0)throw new Error("response is undefined");if(!l.ok){const a=l.status;let s;!((n=l.headers.get("content-type"))===null||n===void 0)&&n.includes("application/json")?s=await l.json():s={error:{message:await l.text(),code:l.status,status:l.statusText}};const r=JSON.stringify(s);throw a>=400&&a<600?new va({message:r,status:a}):new Error(r)}}function m_(l,n){if(!n||Object.keys(n).length===0)return;if(l.body instanceof Blob){console.warn("includeExtraBodyToRequestInit: extraBody provided but current request body is a Blob. extraBody will be ignored as merging is not supported for Blob bodies.");return}let a={};
121if(typeof l.body=="string"&&l.body.length>0)try{const m=JSON.parse(l.body);if(typeof m=="object"&&m!==null&&!Array.isArray(m))a=m;else{console.warn("includeExtraBodyToRequestInit: Original request body is valid JSON but not a non-array object. Skip applying extraBody to the request body.");return}}catch{console.warn("includeExtraBodyToRequestInit: Original request body is not valid JSON. Skip applying extraBody to the request body.");return}function s(m,p){const g=Object.assign({},m);for(const y in p)if(Object.prototype.hasOwnProperty.call(p,y)){const h=p[y],v=g[y];h&&typeof h=="object"&&!Array.isArray(h)&&v&&typeof v=="object"&&!Array.isArray(v)?g[y]=s(v,h):(v&&h&&typeof v!=typeof h&&console.warn(`includeExtraBodyToRequestInit:deepMerge: Type mismatch for key "${y}". Original type: ${typeof v}, New type: ${typeof h}. Overwriting.`),g[y]=h)}return g}const r=s(a,n);l.body=JSON.stringify(r)}/** 122 * @license 123 * Copyright 2025 Google LLC 124 * SPDX-License-Identifier: Apache-2.0 125 */const p_="mcp_used/unknown";let h_=!1;function fh(l){for(const n of l)if(g_(n)||typeof n=="object"&&"inputSchema"in n)return!0;return h_}function dh(l){var n;const a=(n=l[nr])!==null&&n!==void 0?n:"";l[nr]=(a+` ${p_}`).trimStart()}function g_(l){return l!==null&&typeof l=="object"&&l instanceof cr}function y_(l,n=100){return ki(this,arguments,function*(){let s,r=0;for(;r<n;){const m=yield we(l.listTools({cursor:s}));for(const p of m.tools)yield yield we(p),r++;if(!m.nextCursor)break;s=m.nextCursor}})}class cr{constructor(n=[],a){this.mcpTools=[],this.functionNameToMcpClient={},this.mcpClients=n,this.config=a}static create(n,a){return new cr(n,a)}async initialize(){var n,a,s,r;if(this.mcpTools.length>0)return;const m={},p=[];for(const v of this.mcpClients)try{for(var g=!0,y=(a=void 0,Xl(y_(v))),h;h=await y.next(),n=h.done,!n;g=!0){r=h.value,g=!1;const S=r;p.push(S);const _=S.name;if(m[_])throw new Error(`Duplicate function name ${_} found in MCP tools. Please ensure function names are unique.`);m[_]=v}}catch(S){a={error:S}}finally{try{!g&&!n&&(s=y.return)&&await s.call(y)}finally{if(a)throw a.error}}this.mcpTools=p,this.functionNameToMcpClient=m}async tool(){return await this.initialize(),MT(this.mcpTools,this.config)}async callTool(n){await this.initialize();const a=[];for(const s of n)if(s.name in this.functionNameToMcpClient){const r=this.functionNameToMcpClient[s.name];let m;this.config.timeout&&(m={timeout:this.config.timeout});const p=await r.callTool({name:s.name,arguments:s.args},void 0,m);a.push({functionResponse:{name:s.name,response:p.isError?{error:p}:p}})}return a}}/** 126 * @license 127 * Copyright 2025 Google LLC 128 * SPDX-License-Identifier: Apache-2.0 129 */async function T_(l,n,a){const s=new vT;let r;a.data instanceof Blob?r=JSON.parse(await a.data.text()):r=JSON.parse(a.data),Object.assign(s,r),n(s)}class v_{constructor(n,a,s){this.apiClient=n,this.auth=a,this.webSocketFactory=s}async connect(n){var a,s;if(this.apiClient.isVertexAI())throw new Error("Live music is not supported for Vertex AI.");console.warn("Live music generation is experimental and may change in future versions.");const r=this.apiClient.getWebsocketBaseUrl(),m=this.apiClient.getApiVersion(),p=__(this.apiClient.getDefaultHeaders()),g=this.apiClient.getApiKey(),y=`${r}/ws/google.ai.generativelanguage.${m}.GenerativeService.BidiGenerateMusic?key=${g}`;let h=()=>{};const v=new Promise(V=>{h=V}),S=n.callbacks,_=function(){h({})},M=this.apiClient,w={onopen:_,onmessage:V=>{T_(M,S.onmessage,V)},onerror:(a=S==null?void 0:S.onerror)!==null&&a!==void 0?a:function(V){},onclose:(s=S==null?void 0:S.onclose)!==null&&s!==void 0?s:function(V){}},H=this.webSocketFactory.create(y,E_(p),w);H.connect(),await v;const K={setup:{model:Se(this.apiClient,n.model)}};return H.send(JSON.stringify(K)),new S_(H,this.apiClient)}}class S_{constructor(n,a){this.conn=n,this.apiClient=a}async setWeightedPrompts(n){if(!n.weightedPrompts||Object.keys(n.weightedPrompts).length===0)throw new Error("Weighted prompts must be set and contain at least one entry.");const a=dS(n);this.conn.send(JSON.stringify({clientContent:a}))}async setMusicGenerationConfig(n){n.musicGenerationConfig||(n.musicGenerationConfig={});const a=fS(n);this.conn.send(JSON.stringify(a))}sendPlaybackControl(n){const a={playbackControl:n};this.conn.send(JSON.stringify(a))}play(){this.sendPlaybackControl(Yi.PLAY)}pause(){this.sendPlaybackControl(Yi.PAUSE)}stop(){this.sendPlaybackControl(Yi.STOP)}resetContext(){this.sendPlaybackControl(Yi.RESET_CONTEXT)}
129close(){this.conn.close()}}function E_(l){const n={};return l.forEach((a,s)=>{n[s]=a}),n}function __(l){const n=new Headers;for(const[a,s]of Object.entries(l))n.append(a,s);return n}/** 130 * @license 131 * Copyright 2025 Google LLC 132 * SPDX-License-Identifier: Apache-2.0 133 */const C_="FunctionResponse request must have an `id` field from the response of a ToolCall.FunctionalCalls in Google AI.";async function A_(l,n,a){const s=new TT;let r;a.data instanceof Blob?r=await a.data.text():a.data instanceof ArrayBuffer?r=new TextDecoder().decode(a.data):r=a.data;const m=JSON.parse(r);if(l.isVertexAI()){const p=hS(m);Object.assign(s,p)}else Object.assign(s,m);n(s)}class R_{constructor(n,a,s){this.apiClient=n,this.auth=a,this.webSocketFactory=s,this.music=new v_(this.apiClient,this.auth,this.webSocketFactory)}async connect(n){var a,s,r,m,p,g;if(n.config&&n.config.httpOptions)throw new Error("The Live module does not support httpOptions at request-level in LiveConnectConfig yet. Please use the client-level httpOptions configuration instead.");const y=this.apiClient.getWebsocketBaseUrl(),h=this.apiClient.getApiVersion();let v;const S=this.apiClient.getHeaders();n.config&&n.config.tools&&fh(n.config.tools)&&dh(S);const _=D_(S);if(this.apiClient.isVertexAI())v=`${y}/ws/google.cloud.aiplatform.${h}.LlmBidiService/BidiGenerateContent`,await this.auth.addAuthHeaders(_);else{const P=this.apiClient.getApiKey();let X="BidiGenerateContent",oe="key";P!=null&&P.startsWith("auth_tokens/")&&(console.warn("Warning: Ephemeral token support is experimental and may change in future versions."),h!=="v1alpha"&&console.warn("Warning: The SDK's ephemeral token support is in v1alpha only. Please use const ai = new GoogleGenAI({apiKey: token.name, httpOptions: { apiVersion: 'v1alpha' }}); before session connection."),X="BidiGenerateContentConstrained",oe="access_token"),v=`${y}/ws/google.ai.generativelanguage.${h}.GenerativeService.${X}?${oe}=${P}`}let M=()=>{};const w=new Promise(P=>{M=P}),H=n.callbacks,k=function(){var P;(P=H==null?void 0:H.onopen)===null||P===void 0||P.call(H),M({})},J=this.apiClient,K={onopen:k,onmessage:P=>{A_(J,H.onmessage,P)},onerror:(a=H==null?void 0:H.onerror)!==null&&a!==void 0?a:function(P){},onclose:(s=H==null?void 0:H.onclose)!==null&&s!==void 0?s:function(P){}},V=this.webSocketFactory.create(v,I_(_),K);V.connect(),await w;let j=Se(this.apiClient,n.model);if(this.apiClient.isVertexAI()&&j.startsWith("publishers/")){const P=this.apiClient.getProject(),X=this.apiClient.getLocation();j=`projects/${P}/locations/${X}/`+j}let ne={};this.apiClient.isVertexAI()&&((r=n.config)===null||r===void 0?void 0:r.responseModalities)===void 0&&(n.config===void 0?n.config={responseModalities:[ga.AUDIO]}:n.config.responseModalities=[ga.AUDIO]),!((m=n.config)===null||m===void 0)&&m.generationConfig&&console.warn("Setting `LiveConnectConfig.generation_config` is deprecated, please set the fields on `LiveConnectConfig` directly. This will become an error in a future version (not before Q3 2025).");const te=(g=(p=n.config)===null||p===void 0?void 0:p.tools)!==null&&g!==void 0?g:[],F=[];for(const P of te)if(this.isCallableTool(P)){const X=P;F.push(await X.tool())}else F.push(P);F.length>0&&(n.config.tools=F);const ye={model:j,config:n.config,callbacks:n.callbacks};return this.apiClient.isVertexAI()?ne=cS(this.apiClient,ye):ne=rS(this.apiClient,ye),delete ne.config,V.send(JSON.stringify(ne)),new M_(V,this.apiClient)}isCallableTool(n){return"callTool"in n&&typeof n.callTool=="function"}}const N_={turnComplete:!0};class M_{constructor(n,a){this.conn=n,this.apiClient=a}tLiveClientContent(n,a){if(a.turns!==null&&a.turns!==void 0){let s=[];try{s=wt(a.turns),n.isVertexAI()||(s=s.map(r=>Sa(r)))}catch{throw new Error(`Failed to parse client content "turns", type: '${typeof a.turns}'`)}return{clientContent:{turns:s,turnComplete:a.turnComplete}}}return{clientContent:{turnComplete:a.turnComplete}}}tLiveClienttToolResponse(n,a){let s=[];if(a.functionResponses==null)throw new Error("functionResponses is required.");if(Array.isArray(a.functionResponses)?s=a.functionResponses:s=[a.functionResponses],s.length===0)throw new Error("functionResponses is required.");for(const m of s){if(typeof m!="object"||m===null||!("name"in m)||!("response"in m))throw new Error(`Could not parse function response, type '${typeof m}'.`);if(!n.isVertexAI()&&!("id"in m))throw new Error(C_)}return{toolResponse:{functionResponses:s}}}sendClientContent(n){n=Object.assign(Object.assign({},N_),n);const a=this.tLiveClientContent(this.apiClient,n);this.conn.send(JSON.stringify(a))}sendRealtimeInput(n){let a={};this.apiClient.isVertexAI()?a={realtimeInput:pS(n)}:a={realtimeInput:mS(n)},this.conn.send(JSON.stringify(a))}sendToolResponse(n){if(n.functionResponses==null)throw new Error("Tool response parameters are required.");const a=this.tLiveClienttToolResponse(this.apiClient,n);this.conn.send(JSON.stringify(a))}
133close(){this.conn.close()}}function I_(l){const n={};return l.forEach((a,s)=>{n[s]=a}),n}function D_(l){const n=new Headers;for(const[a,s]of Object.entries(l))n.append(a,s);return n}/** 134 * @license 135 * Copyright 2025 Google LLC 136 * SPDX-License-Identifier: Apache-2.0 137 */const Gp=10;function Hp(l){var n,a,s;if(!((n=l==null?void 0:l.automaticFunctionCalling)===null||n===void 0)&&n.disable)return!0;let r=!1;for(const p of(a=l==null?void 0:l.tools)!==null&&a!==void 0?a:[])if(Fi(p)){r=!0;break}if(!r)return!0;const m=(s=l==null?void 0:l.automaticFunctionCalling)===null||s===void 0?void 0:s.maximumRemoteCalls;return m&&(m<0||!Number.isInteger(m))||m==0?(console.warn("Invalid maximumRemoteCalls value provided for automatic function calling. Disabled automatic function calling. Please provide a valid integer value greater than 0. maximumRemoteCalls provided:",m),!0):!1}function Fi(l){return"callTool"in l&&typeof l.callTool=="function"}function U_(l){var n,a,s;return(s=(a=(n=l.config)===null||n===void 0?void 0:n.tools)===null||a===void 0?void 0:a.some(r=>Fi(r)))!==null&&s!==void 0?s:!1}function x_(l){var n,a,s;return(s=(a=(n=l.config)===null||n===void 0?void 0:n.tools)===null||a===void 0?void 0:a.some(r=>!Fi(r)))!==null&&s!==void 0?s:!1}function Vp(l){var n;return!(!((n=l==null?void 0:l.automaticFunctionCalling)===null||n===void 0)&&n.ignoreCallHistory)}/** 138 * @license 139 * Copyright 2025 Google LLC 140 * SPDX-License-Identifier: Apache-2.0 141 */class b_ extends li{constructor(n){super(),this.apiClient=n,this.generateContent=async a=>{var s,r,m,p,g;const y=await this.processParamsMaybeAddMcpUsage(a);if(this.maybeMoveToResponseJsonSchem(a),!U_(a)||Hp(a.config))return await this.generateContentInternal(y);if(x_(a))throw new Error("Automatic function calling with CallableTools and Tools is not yet supported.");let h,v;const S=wt(y.contents),_=(m=(r=(s=y.config)===null||s===void 0?void 0:s.automaticFunctionCalling)===null||r===void 0?void 0:r.maximumRemoteCalls)!==null&&m!==void 0?m:Gp;let M=0;for(;M<_&&(h=await this.generateContentInternal(y),!(!h.functionCalls||h.functionCalls.length===0));){const w=h.candidates[0].content,H=[];for(const k of(g=(p=a.config)===null||p===void 0?void 0:p.tools)!==null&&g!==void 0?g:[])if(Fi(k)){const K=await k.callTool(h.functionCalls);H.push(...K)}M++,v={role:"user",parts:H},y.contents=wt(y.contents),y.contents.push(w),y.contents.push(v),Vp(y.config)&&(S.push(w),S.push(v))}return Vp(y.config)&&(h.automaticFunctionCallingHistory=S),h},this.generateContentStream=async a=>{if(this.maybeMoveToResponseJsonSchem(a),Hp(a.config)){const s=await this.processParamsMaybeAddMcpUsage(a);return await this.generateContentStreamInternal(s)}else return await this.processAfcStream(a)},this.generateImages=async a=>await this.generateImagesInternal(a).then(s=>{var r;let m;const p=[];if(s!=null&&s.generatedImages)for(const y of s.generatedImages)y&&(y!=null&&y.safetyAttributes)&&((r=y==null?void 0:y.safetyAttributes)===null||r===void 0?void 0:r.contentType)==="Positive Prompt"?m=y==null?void 0:y.safetyAttributes:p.push(y);let g;return m?g={generatedImages:p,positivePromptSafetyAttributes:m,sdkHttpResponse:s.sdkHttpResponse}:g={generatedImages:p,sdkHttpResponse:s.sdkHttpResponse},g}),this.list=async a=>{var s;const p={config:Object.assign(Object.assign({},{queryBase:!0}),a==null?void 0:a.config)};if(this.apiClient.isVertexAI()&&!p.config.queryBase){if(!((s=p.config)===null||s===void 0)&&s.filter)throw new Error("Filtering tuned models list for Vertex AI is not currently supported");p.config.filter="labels.tune-type:*"}return new Ql(ii.PAGED_ITEM_MODELS,g=>this.listInternal(g),await this.listInternal(p),p)},this.editImage=async a=>{const s={model:a.model,prompt:a.prompt,referenceImages:[],config:a.config};return a.referenceImages&&a.referenceImages&&(s.referenceImages=a.referenceImages.map(r=>r.toReferenceImageAPI())),await this.editImageInternal(s)},this.upscaleImage=async a=>{let s={numberOfImages:1,mode:"upscale"};a.config&&(s=Object.assign(Object.assign({},s),a.config));const r={model:a.model,image:a.image,upscaleFactor:a.upscaleFactor,config:s};return await this.upscaleImageInternal(r)},this.generateVideos=async a=>{if((a.prompt||a.image||a.video)&&a.source)throw new Error("Source and prompt/image/video are mutually exclusive. Please only use source.");return await this.generateVideosInternal(a)}}maybeMoveToResponseJsonSchem(n){n.config&&n.config.responseSchema&&(n.config.responseJsonSchema||Object.keys(n.config.responseSchema).includes("$schema")&&(n.config.responseJsonSchema=n.config.responseSchema,delete n.config.responseSchema))}async processParamsMaybeAddMcpUsage(n){var a,s,r;const m=(a=n.config)===null||a===void 0?void 0:a.tools;if(!m)return n;const p=await Promise.all(m.map(async y=>Fi(y)?await y.tool():y)),g={model:n.model,contents:n.contents,config:Object.assign(Object.assign({},n.config),{tools:p})};if(g.config.tools=p,n.config&&n.config.tools&&fh(n.config.tools)){const y=(r=(s=n.config.httpOptions)===null||s===void 0?void 0:s.headers)!==null&&r!==void 0?r:{};let h=Object.assign({},y);Object.keys(h).length===0&&(h=this.apiClient.getDefaultHeaders()),dh(h),g.config.httpOptions=Object.assign(Object.assign({},n.config.httpOptions),{headers:h})}return g}async initAfcToolsMap(n){var a,s,r;const m=new Map;for(const p of(s=(a=n.config)===null||a===void 0?void 0:a.tools)!==null&&s!==void 0?s:[])if(Fi(p)){const g=p,y=await g.tool();for(const h of(r=y.functionDeclarations)!==null&&r!==void 0?r:[]){if(!
141h.name)throw new Error("Function declaration name is required.");if(m.has(h.name))throw new Error(`Duplicate tool declaration name: ${h.name}`);m.set(h.name,g)}}return m}async processAfcStream(n){var a,s,r;const m=(r=(s=(a=n.config)===null||a===void 0?void 0:a.automaticFunctionCalling)===null||s===void 0?void 0:s.maximumRemoteCalls)!==null&&r!==void 0?r:Gp;let p=!1,g=0;const y=await this.initAfcToolsMap(n);return(function(h,v,S){var _,M;return ki(this,arguments,function*(){for(var w,H,k,J;g<m;){p&&(g++,p=!1);const ne=yield we(h.processParamsMaybeAddMcpUsage(S)),te=yield we(h.generateContentStreamInternal(ne)),F=[],ye=[];try{for(var K=!0,V=(H=void 0,Xl(te)),j;j=yield we(V.next()),w=j.done,!w;K=!0){J=j.value,K=!1;const P=J;if(yield yield we(P),P.candidates&&(!((_=P.candidates[0])===null||_===void 0)&&_.content)){ye.push(P.candidates[0].content);for(const X of(M=P.candidates[0].content.parts)!==null&&M!==void 0?M:[])if(g<m&&X.functionCall){if(!X.functionCall.name)throw new Error("Function call name was not returned by the model.");if(v.has(X.functionCall.name)){const oe=yield we(v.get(X.functionCall.name).callTool([X.functionCall]));F.push(...oe)}else throw new Error(`Automatic function calling was requested, but not all the tools the model used implement the CallableTool interface. Available tools: ${v.keys()}, mising tool: ${X.functionCall.name}`)}}}}catch(P){H={error:P}}finally{try{!K&&!w&&(k=V.return)&&(yield we(k.call(V)))}finally{if(H)throw H.error}}if(F.length>0){p=!0;const P=new kl;P.candidates=[{content:{role:"user",parts:F}}],yield yield we(P);const X=[];X.push(...ye),X.push({role:"user",parts:F});const oe=wt(S.contents).concat(X);S.contents=oe}else break}})})(this,y,n)}async generateContentInternal(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=bp(this.apiClient,n);return g=Z("{model}:generateContent",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=wp(v),_=new kl;return Object.assign(_,S),_})}else{const h=xp(this.apiClient,n);return g=Z("{model}:generateContent",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=Lp(v),_=new kl;return Object.assign(_,S),_})}}async generateContentStreamInternal(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=bp(this.apiClient,n);return g=Z("{model}:streamGenerateContent?alt=sse",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.requestStream({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}),p.then(function(S){return ki(this,arguments,function*(){var _,M,w,H;try{for(var k=!0,J=Xl(S),K;K=yield we(J.next()),_=K.done,!_;k=!0){H=K.value,k=!1;const V=H,j=wp(yield we(V.json()));j.sdkHttpResponse={headers:V.headers};const ne=new kl;Object.assign(ne,j),yield yield we(ne)}}catch(V){M={error:V}}finally{try{!k&&!_&&(w=J.return)&&(yield we(w.call(J)))}finally{if(M)throw M.error}}})})}else{const h=xp(this.apiClient,n);return g=Z("{model}:streamGenerateContent?alt=sse",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.requestStream({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}),p.then(function(S){return ki(this,arguments,function*(){var _,M,w,H;try{for(var k=!0,J=Xl(S),K;K=yield we(J.next()),_=K.done,!_;k=!0){H=K.value,k=!1;const V=H,j=Lp(yield we(V.json()));j.sdkHttpResponse={headers:V.headers};const ne=new kl;Object.assign(ne,j),yield yield we(ne)}}catch(V){M={error:V}}finally{try{!k&&!_&&(w=J.return)&&(yield we(w.call(J)))}
141finally{if(M)throw M.error}}})})}}async embedContent(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=kS(this.apiClient,n);return g=Z("{model}:predict",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=KS(v),_=new hp;return Object.assign(_,S),_})}else{const h=JS(this.apiClient,n);return g=Z("{model}:batchEmbedContents",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=FS(v),_=new hp;return Object.assign(_,S),_})}}async generateImagesInternal(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=nE(this.apiClient,n);return g=Z("{model}:predict",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=lE(v),_=new gp;return Object.assign(_,S),_})}else{const h=tE(this.apiClient,n);return g=Z("{model}:predict",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=iE(v),_=new gp;return Object.assign(_,S),_})}}async editImageInternal(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI()){const g=zS(this.apiClient,n);return m=Z("{model}:predict",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>{const h=PS(y),v=new cT;return Object.assign(v,h),v})}else throw new Error("This method is only supported by the Vertex AI.")}async upscaleImageInternal(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI()){const g=WE(this.apiClient,n);return m=Z("{model}:predict",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>{const h=jE(y),v=new fT;return Object.assign(v,h),v})}else throw new Error("This method is only supported by the Vertex AI.")}async recontextImage(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI()){const g=wE(this.apiClient,n);return m=Z("{model}:predict",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(y=>y.json()),r.then(y=>{const h=qE(y),v=new dT;return Object.assign(v,h),v})}else throw new Error("This method is only supported by the Vertex AI.")}async segmentImage(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI()){const g=PE(this.apiClient,n);return m=Z("{model}:predict",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abort
141Signal}).then(y=>y.json()),r.then(y=>{const h=BE(y),v=new mT;return Object.assign(v,h),v})}else throw new Error("This method is only supported by the Vertex AI.")}async get(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=EE(this.apiClient,n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json()),p.then(v=>tr(v))}else{const h=SE(this.apiClient,n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json()),p.then(v=>er(v))}}async listInternal(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=ME(this.apiClient,n);return g=Z("{models_url}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=DE(v),_=new yp;return Object.assign(_,S),_})}else{const h=NE(this.apiClient,n);return g=Z("{models_url}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=IE(v),_=new yp;return Object.assign(_,S),_})}}async update(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=ZE(this.apiClient,n);return g=Z("{model}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"PATCH",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json()),p.then(v=>tr(v))}else{const h=QE(this.apiClient,n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"PATCH",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json()),p.then(v=>er(v))}}async delete(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=OS(this.apiClient,n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=HS(v),_=new Tp;return Object.assign(_,S),_})}else{const h=qS(this.apiClient,n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"DELETE",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=GS(v),_=new Tp;return Object.assign(_,S),_})}}async countTokens(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=bS(this.apiClient,n);return g=Z("{model}:countTokens",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abort
141Signal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=wS(v),_=new vp;return Object.assign(_,S),_})}else{const h=xS(this.apiClient,n);return g=Z("{model}:countTokens",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=LS(v),_=new vp;return Object.assign(_,S),_})}}async computeTokens(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI()){const g=AS(this.apiClient,n);return m=Z("{model}:computeTokens",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>{const h=RS(y),v=new pT;return Object.assign(v,h),v})}else throw new Error("This method is only supported by the Vertex AI.")}async generateVideosInternal(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=cE(this.apiClient,n);return g=Z("{model}:predictLongRunning",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json()),p.then(v=>{const S=uE(v),_=new ya;return Object.assign(_,S),_})}else{const h=rE(this.apiClient,n);return g=Z("{model}:predictLongRunning",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json()),p.then(v=>{const S=sE(v),_=new ya;return Object.assign(_,S),_})}}}/** 142 * @license 143 * Copyright 2025 Google LLC 144 * SPDX-License-Identifier: Apache-2.0 145 */class L_ extends li{constructor(n){super(),this.apiClient=n}async getVideosOperation(n){const a=n.operation,s=n.config;if(a.name===void 0||a.name==="")throw new Error("Operation name is required.");if(this.apiClient.isVertexAI()){const r=a.name.split("/operations/")[0];let m;s&&"httpOptions"in s&&(m=s.httpOptions);const p=await this.fetchPredictVideosOperationInternal({operationName:a.name,resourceName:r,config:{httpOptions:m}});return a._fromAPIResponse({apiResponse:p,isVertexAI:!0})}else{const r=await this.getVideosOperationInternal({operationName:a.name,config:s});return a._fromAPIResponse({apiResponse:r,isVertexAI:!1})}}async get(n){const a=n.operation,s=n.config;if(a.name===void 0||a.name==="")throw new Error("Operation name is required.");if(this.apiClient.isVertexAI()){const r=a.name.split("/operations/")[0];let m;s&&"httpOptions"in s&&(m=s.httpOptions);const p=await this.fetchPredictVideosOperationInternal({operationName:a.name,resourceName:r,config:{httpOptions:m}});return a._fromAPIResponse({apiResponse:p,isVertexAI:!0})}else{const r=await this.getVideosOperationInternal({operationName:a.name,config:s});return a._fromAPIResponse({apiResponse:r,isVertexAI:!1})}}async getVideosOperationInternal(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=sT(n);return g=Z("{operationName}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json()),p}else{const h=aT(n);return g=Z("{operationName}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json()),p}}async fetchPredictVideosOperationInternal(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI()){const g=jy(n);return m=Z("{resourceName}:fetchPredictOperation",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abort
145Signal}).then(y=>y.json()),r}else throw new Error("This method is only supported by the Vertex AI.")}}/** 146 * @license 147 * Copyright 2025 Google LLC 148 * SPDX-License-Identifier: Apache-2.0 149 */function w_(l){const n={};if(u(l,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(l,["data"]);a!=null&&f(n,["data"],a);const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function q_(l){const n={},a=u(l,["parts"]);if(a!=null){let r=a;Array.isArray(r)&&(r=r.map(m=>B_(m))),f(n,["parts"],r)}const s=u(l,["role"]);return s!=null&&f(n,["role"],s),n}function O_(l,n,a){const s={},r=u(n,["expireTime"]);a!==void 0&&r!=null&&f(a,["expireTime"],r);const m=u(n,["newSessionExpireTime"]);a!==void 0&&m!=null&&f(a,["newSessionExpireTime"],m);const p=u(n,["uses"]);a!==void 0&&p!=null&&f(a,["uses"],p);const g=u(n,["liveConnectConstraints"]);a!==void 0&&g!=null&&f(a,["bidiGenerateContentSetup"],P_(l,g));const y=u(n,["lockAdditionalFields"]);return a!==void 0&&y!=null&&f(a,["fieldMask"],y),s}function G_(l,n){const a={},s=u(n,["config"]);return s!=null&&f(a,["config"],O_(l,s,a)),a}function H_(l){const n={};if(u(l,["displayName"])!==void 0)throw new Error("displayName parameter is not supported in Gemini API.");const a=u(l,["fileUri"]);a!=null&&f(n,["fileUri"],a);const s=u(l,["mimeType"]);return s!=null&&f(n,["mimeType"],s),n}function V_(l){const n={},a=u(l,["timeRangeFilter"]);if(a!=null&&f(n,["timeRangeFilter"],a),u(l,["excludeDomains"])!==void 0)throw new Error("excludeDomains parameter is not supported in Gemini API.");return n}function z_(l,n){const a={},s=u(l,["generationConfig"]);n!==void 0&&s!=null&&f(n,["setup","generationConfig"],s);const r=u(l,["responseModalities"]);n!==void 0&&r!=null&&f(n,["setup","generationConfig","responseModalities"],r);const m=u(l,["temperature"]);n!==void 0&&m!=null&&f(n,["setup","generationConfig","temperature"],m);const p=u(l,["topP"]);n!==void 0&&p!=null&&f(n,["setup","generationConfig","topP"],p);const g=u(l,["topK"]);n!==void 0&&g!=null&&f(n,["setup","generationConfig","topK"],g);const y=u(l,["maxOutputTokens"]);n!==void 0&&y!=null&&f(n,["setup","generationConfig","maxOutputTokens"],y);const h=u(l,["mediaResolution"]);n!==void 0&&h!=null&&f(n,["setup","generationConfig","mediaResolution"],h);const v=u(l,["seed"]);n!==void 0&&v!=null&&f(n,["setup","generationConfig","seed"],v);const S=u(l,["speechConfig"]);n!==void 0&&S!=null&&f(n,["setup","generationConfig","speechConfig"],rr(S));const _=u(l,["thinkingConfig"]);n!==void 0&&_!=null&&f(n,["setup","generationConfig","thinkingConfig"],_);const M=u(l,["enableAffectiveDialog"]);n!==void 0&&M!=null&&f(n,["setup","generationConfig","enableAffectiveDialog"],M);const w=u(l,["systemInstruction"]);n!==void 0&&w!=null&&f(n,["setup","systemInstruction"],q_(nt(w)));const H=u(l,["tools"]);if(n!==void 0&&H!=null){let te=Xi(H);Array.isArray(te)&&(te=te.map(F=>J_(Ki(F)))),f(n,["setup","tools"],te)}const k=u(l,["sessionResumption"]);n!==void 0&&k!=null&&f(n,["setup","sessionResumption"],Y_(k));const J=u(l,["inputAudioTranscription"]);n!==void 0&&J!=null&&f(n,["setup","inputAudioTranscription"],J);const K=u(l,["outputAudioTranscription"]);n!==void 0&&K!=null&&f(n,["setup","outputAudioTranscription"],K);const V=u(l,["realtimeInputConfig"]);n!==void 0&&V!=null&&f(n,["setup","realtimeInputConfig"],V);const j=u(l,["contextWindowCompression"]);n!==void 0&&j!=null&&f(n,["setup","contextWindowCompression"],j);const ne=u(l,["proactivity"]);return n!==void 0&&ne!=null&&f(n,["setup","proactivity"],ne),a}function P_(l,n){const a={},s=u(n,["model"]);s!=null&&f(a,["setup","model"],Se(l,s));const r=u(n,["config"]);return r!=null&&f(a,["config"],z_(r,a)),a}function B_(l){const n={},a=u(l,["videoMetadata"]);a!=null&&f(n,["videoMetadata"],a);const s=u(l,["thought"]);s!=null&&f(n,["thought"],s);const r=u(l,["inlineData"]);r!=null&&f(n,["inlineData"],w_(r));const m=u(l,["fileData"]);m!=null&&f(n,["fileData"],H_(m));const p=u(l,["thoughtSignature"]);p!=null&&f(n,["thoughtSignature"],p);const g=u(l,["functionCall"]);g!=null&&f(n,["functionCall"],g);const y=u(l,["codeExecutionResult"]);y!=null&&f(n,["codeExecutionResult"],y);const h=u(l,["executableCode"]);h!=null&&f(n,["executableCode"],h);const v=u(l,["functionResponse"]);v!=null&&f(n,["functionResponse"],v);const S=u(l,["text"]);return S!=null&&f(n,["text"],S),n}function Y_(l){const n={},a=u(l,["handle"]);if(a!=null&&f(n,["handle"],a),u(l,["transparent"])!==void 0)throw new Error("transparent parameter is not supported in Gemini API.");return n}function J_(l){const n={},a=u(l,["functionDeclarations"]);if(a!=null){let y=a;Array.isArray(y)&&(y=y.map(h=>h)),f(n,["functionDeclarations"],y)}if(u(l,["retrieval"])!==void 0)throw new Error("retrieval parameter is not supported in Gemini API.");const s=u(l,["googleSearch"]);s!=null&&f(n,["googleSearch"],V_(s));const r=u(l,["googleSearchRetrieval"]);if(r!=null&&f(n,["googleSearchRetrieval"],r),u(l,["enterpriseWebSearch"])!==void 0)throw new Error("enterpriseWebSearch parameter is not supported in Gemini API.");if(u(l,["googleMaps"])!==void 0)throw new Error("googleMaps parameter is not supported in Gemini API.");
149const m=u(l,["urlContext"]);m!=null&&f(n,["urlContext"],m);const p=u(l,["computerUse"]);p!=null&&f(n,["computerUse"],p);const g=u(l,["codeExecution"]);return g!=null&&f(n,["codeExecution"],g),n}/** 150 * @license 151 * Copyright 2025 Google LLC 152 * SPDX-License-Identifier: Apache-2.0 153 */function k_(l){const n=[];for(const a in l)if(Object.prototype.hasOwnProperty.call(l,a)){const s=l[a];if(typeof s=="object"&&s!=null&&Object.keys(s).length>0){const r=Object.keys(s).map(m=>`${a}.${m}`);n.push(...r)}else n.push(a)}return n.join(",")}function F_(l,n){let a=null;const s=l.bidiGenerateContentSetup;if(typeof s=="object"&&s!==null&&"setup"in s){const m=s.setup;typeof m=="object"&&m!==null?(l.bidiGenerateContentSetup=m,a=m):delete l.bidiGenerateContentSetup}else s!==void 0&&delete l.bidiGenerateContentSetup;const r=l.fieldMask;if(a){const m=k_(a);if(Array.isArray(n==null?void 0:n.lockAdditionalFields)&&(n==null?void 0:n.lockAdditionalFields.length)===0)m?l.fieldMask=m:delete l.fieldMask;else if(n!=null&&n.lockAdditionalFields&&n.lockAdditionalFields.length>0&&r!==null&&Array.isArray(r)&&r.length>0){const p=["temperature","topK","topP","maxOutputTokens","responseModalities","seed","speechConfig"];let g=[];r.length>0&&(g=r.map(h=>p.includes(h)?`generationConfig.${h}`:h));const y=[];m&&y.push(m),g.length>0&&y.push(...g),y.length>0?l.fieldMask=y.join(","):delete l.fieldMask}else delete l.fieldMask}else r!==null&&Array.isArray(r)&&r.length>0?l.fieldMask=r.join(","):delete l.fieldMask;return l}class K_ extends li{constructor(n){super(),this.apiClient=n}async create(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI())throw new Error("The client.tokens.create method is only supported by the Gemini Developer API.");{const g=G_(this.apiClient,n);m=Z("auth_tokens",g._url),p=g._query,delete g.config,delete g._url,delete g._query;const y=F_(g,n.config);return r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(y),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(h=>h.json()),r.then(h=>h)}}}/** 154 * @license 155 * Copyright 2025 Google LLC 156 * SPDX-License-Identifier: Apache-2.0 157 */function X_(l){const n={},a=u(l,["name"]);return a!=null&&f(n,["_url","name"],a),n}function Q_(l){const n={},a=u(l,["name"]);return a!=null&&f(n,["_url","name"],a),n}function Z_(l,n){const a={};if(u(l,["validationDataset"])!==void 0)throw new Error("validationDataset parameter is not supported in Gemini API.");const s=u(l,["tunedModelDisplayName"]);if(n!==void 0&&s!=null&&f(n,["displayName"],s),u(l,["description"])!==void 0)throw new Error("description parameter is not supported in Gemini API.");const r=u(l,["epochCount"]);n!==void 0&&r!=null&&f(n,["tuningTask","hyperparameters","epochCount"],r);const m=u(l,["learningRateMultiplier"]);if(m!=null&&f(a,["tuningTask","hyperparameters","learningRateMultiplier"],m),u(l,["exportLastCheckpointOnly"])!==void 0)throw new Error("exportLastCheckpointOnly parameter is not supported in Gemini API.");if(u(l,["preTunedModelCheckpointId"])!==void 0)throw new Error("preTunedModelCheckpointId parameter is not supported in Gemini API.");if(u(l,["adapterSize"])!==void 0)throw new Error("adapterSize parameter is not supported in Gemini API.");const p=u(l,["batchSize"]);n!==void 0&&p!=null&&f(n,["tuningTask","hyperparameters","batchSize"],p);const g=u(l,["learningRate"]);if(n!==void 0&&g!=null&&f(n,["tuningTask","hyperparameters","learningRate"],g),u(l,["labels"])!==void 0)throw new Error("labels parameter is not supported in Gemini API.");return a}function $_(l,n){const a={},s=u(l,["validationDataset"]);n!==void 0&&s!=null&&f(n,["supervisedTuningSpec"],dC(s,a));const r=u(l,["tunedModelDisplayName"]);n!==void 0&&r!=null&&f(n,["tunedModelDisplayName"],r);const m=u(l,["description"]);n!==void 0&&m!=null&&f(n,["description"],m);const p=u(l,["epochCount"]);n!==void 0&&p!=null&&f(n,["supervisedTuningSpec","hyperParameters","epochCount"],p);const g=u(l,["learningRateMultiplier"]);n!==void 0&&g!=null&&f(n,["supervisedTuningSpec","hyperParameters","learningRateMultiplier"],g);const y=u(l,["exportLastCheckpointOnly"]);n!==void 0&&y!=null&&f(n,["supervisedTuningSpec","exportLastCheckpointOnly"],y);const h=u(l,["adapterSize"]);if(n!==void 0&&h!=null&&f(n,["supervisedTuningSpec","hyperParameters","adapterSize"],h),u(l,["batchSize"])!==void 0)throw new Error("batchSize parameter is not supported in Vertex AI.");
157if(u(l,["learningRate"])!==void 0)throw new Error("learningRate parameter is not supported in Vertex AI.");const v=u(l,["labels"]);return n!==void 0&&v!=null&&f(n,["labels"],v),a}function W_(l){const n={},a=u(l,["baseModel"]);a!=null&&f(n,["baseModel"],a);const s=u(l,["preTunedModel"]);s!=null&&f(n,["preTunedModel"],s);const r=u(l,["trainingDataset"]);r!=null&&f(n,["tuningTask","trainingData"],rC(r));const m=u(l,["config"]);return m!=null&&Z_(m,n),n}function j_(l){const n={},a=u(l,["baseModel"]);a!=null&&f(n,["baseModel"],a);const s=u(l,["preTunedModel"]);s!=null&&f(n,["preTunedModel"],s);const r=u(l,["trainingDataset"]);r!=null&&f(n,["supervisedTuningSpec","trainingDatasetUri"],cC(r,n));const m=u(l,["config"]);return m!=null&&$_(m,n),n}function eC(l){const n={},a=u(l,["name"]);return a!=null&&f(n,["_url","name"],a),n}function tC(l){const n={},a=u(l,["name"]);return a!=null&&f(n,["_url","name"],a),n}function nC(l,n){const a={},s=u(l,["pageSize"]);n!==void 0&&s!=null&&f(n,["_query","pageSize"],s);const r=u(l,["pageToken"]);n!==void 0&&r!=null&&f(n,["_query","pageToken"],r);const m=u(l,["filter"]);return n!==void 0&&m!=null&&f(n,["_query","filter"],m),a}function iC(l,n){const a={},s=u(l,["pageSize"]);n!==void 0&&s!=null&&f(n,["_query","pageSize"],s);const r=u(l,["pageToken"]);n!==void 0&&r!=null&&f(n,["_query","pageToken"],r);const m=u(l,["filter"]);return n!==void 0&&m!=null&&f(n,["_query","filter"],m),a}function lC(l){const n={},a=u(l,["config"]);return a!=null&&nC(a,n),n}function oC(l){const n={},a=u(l,["config"]);return a!=null&&iC(a,n),n}function aC(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["nextPageToken"]);s!=null&&f(n,["nextPageToken"],s);const r=u(l,["tunedModels"]);if(r!=null){let m=r;Array.isArray(m)&&(m=m.map(p=>mh(p))),f(n,["tuningJobs"],m)}return n}function sC(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["nextPageToken"]);s!=null&&f(n,["nextPageToken"],s);const r=u(l,["tuningJobs"]);if(r!=null){let m=r;Array.isArray(m)&&(m=m.map(p=>ir(p))),f(n,["tuningJobs"],m)}return n}function uC(l){const n={},a=u(l,["name"]);a!=null&&f(n,["model"],a);const s=u(l,["name"]);return s!=null&&f(n,["endpoint"],s),n}function rC(l){const n={};if(u(l,["gcsUri"])!==void 0)throw new Error("gcsUri parameter is not supported in Gemini API.");if(u(l,["vertexDatasetResource"])!==void 0)throw new Error("vertexDatasetResource parameter is not supported in Gemini API.");const a=u(l,["examples"]);if(a!=null){let s=a;Array.isArray(s)&&(s=s.map(r=>r)),f(n,["examples","examples"],s)}return n}function cC(l,n){const a={},s=u(l,["gcsUri"]);n!==void 0&&s!=null&&f(n,["supervisedTuningSpec","trainingDatasetUri"],s);const r=u(l,["vertexDatasetResource"]);if(n!==void 0&&r!=null&&f(n,["supervisedTuningSpec","trainingDatasetUri"],r),u(l,["examples"])!==void 0)throw new Error("examples parameter is not supported in Vertex AI.");return a}function mh(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["name"]);s!=null&&f(n,["name"],s);const r=u(l,["state"]);r!=null&&f(n,["state"],Xp(r));const m=u(l,["createTime"]);m!=null&&f(n,["createTime"],m);const p=u(l,["tuningTask","startTime"]);p!=null&&f(n,["startTime"],p);const g=u(l,["tuningTask","completeTime"]);g!=null&&f(n,["endTime"],g);const y=u(l,["updateTime"]);y!=null&&f(n,["updateTime"],y);const h=u(l,["description"]);h!=null&&f(n,["description"],h);const v=u(l,["baseModel"]);v!=null&&f(n,["baseModel"],v);const S=u(l,["_self"]);S!=null&&f(n,["tunedModel"],uC(S));const _=u(l,["customBaseModel"]);_!=null&&f(n,["customBaseModel"],_);const M=u(l,["experiment"]);M!=null&&f(n,["experiment"],M);const w=u(l,["labels"]);w!=null&&f(n,["labels"],w);const H=u(l,["outputUri"]);H!=null&&f(n,["outputUri"],H);const k=u(l,["pipelineJob"]);k!=null&&f(n,["pipelineJob"],k);const J=u(l,["serviceAccount"]);J!=null&&f(n,["serviceAccount"],J);const K=u(l,["tunedModelDisplayName"]);K!=null&&f(n,["tunedModelDisplayName"],K);const V=u(l,["veoTuningSpec"]);return V!=null&&f(n,["veoTuningSpec"],V),n}function ir(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["name"]);s!=null&&f(n,["name"],s);const r=u(l,["state"]);r!=null&&f(n,["state"],Xp(r));const m=u(l,["createTime"]);m!=null&&f(n,["createTime"],m);const p=u(l,["startTime"]);p!=null&&f(n,["startTime"],p);const g=u(l,["endTime"]);g!=null&&f(n,["endTime"],g);const y=u(l,["updateTime"]);y!=null&&f(n,["updateTime"],y);const h=u(l,["error"]);h!=null&&f(n,["error"],h);const v=u(l,["description"]);v!=null&&f(n,["description"],v);const S=u(l,["baseModel"]);S!=null&&f(n,["baseModel"],S);const _=u(l,["tunedModel"]);_!=null&&f(n,["tunedModel"],_);const M=u(l,["preTunedModel"]);M!=null&&f(n,["preTunedModel"],M);const w=u(l,["supervisedTuningSpec"]);w!=null&&f(n,["supervisedTuningSpec"],w);const H=u(l,["tuningDataStats"]);H!=null&&f(n,["tuningDataStats"],H);const k=u(l,["encryptionSpec"]);k!=null&&f(n,["encryptionSpec"],k);const J=u(l,["partnerModelTuningSpec"]);
157J!=null&&f(n,["partnerModelTuningSpec"],J);const K=u(l,["customBaseModel"]);K!=null&&f(n,["customBaseModel"],K);const V=u(l,["experiment"]);V!=null&&f(n,["experiment"],V);const j=u(l,["labels"]);j!=null&&f(n,["labels"],j);const ne=u(l,["outputUri"]);ne!=null&&f(n,["outputUri"],ne);const te=u(l,["pipelineJob"]);te!=null&&f(n,["pipelineJob"],te);const F=u(l,["serviceAccount"]);F!=null&&f(n,["serviceAccount"],F);const ye=u(l,["tunedModelDisplayName"]);ye!=null&&f(n,["tunedModelDisplayName"],ye);const P=u(l,["veoTuningSpec"]);return P!=null&&f(n,["veoTuningSpec"],P),n}function fC(l){const n={},a=u(l,["sdkHttpResponse"]);a!=null&&f(n,["sdkHttpResponse"],a);const s=u(l,["name"]);s!=null&&f(n,["name"],s);const r=u(l,["metadata"]);r!=null&&f(n,["metadata"],r);const m=u(l,["done"]);m!=null&&f(n,["done"],m);const p=u(l,["error"]);return p!=null&&f(n,["error"],p),n}function dC(l,n){const a={},s=u(l,["gcsUri"]);s!=null&&f(a,["validationDatasetUri"],s);const r=u(l,["vertexDatasetResource"]);return n!==void 0&&r!=null&&f(n,["supervisedTuningSpec","trainingDatasetUri"],r),a}/** 158 * @license 159 * Copyright 2025 Google LLC 160 * SPDX-License-Identifier: Apache-2.0 161 */class mC extends li{constructor(n){super(),this.apiClient=n,this.get=async a=>await this.getInternal(a),this.list=async(a={})=>new Ql(ii.PAGED_ITEM_TUNING_JOBS,s=>this.listInternal(s),await this.listInternal(a),a),this.tune=async a=>{var s;if(this.apiClient.isVertexAI())if(a.baseModel.startsWith("projects/")){const r={tunedModelName:a.baseModel};!((s=a.config)===null||s===void 0)&&s.preTunedModelCheckpointId&&(r.checkpointId=a.config.preTunedModelCheckpointId);const m=Object.assign(Object.assign({},a),{preTunedModel:r});return m.baseModel=void 0,await this.tuneInternal(m)}else{const r=Object.assign({},a);return await this.tuneInternal(r)}else{const r=Object.assign({},a),m=await this.tuneMldevInternal(r);let p="";return m.metadata!==void 0&&m.metadata.tunedModel!==void 0?p=m.metadata.tunedModel:m.name!==void 0&&m.name.includes("/operations/")&&(p=m.name.split("/operations/")[0]),{name:p,state:Zu.JOB_STATE_QUEUED}}}}async getInternal(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=tC(n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>ir(v))}else{const h=eC(n);return g=Z("{name}",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>mh(v))}}async listInternal(n){var a,s,r,m;let p,g="",y={};if(this.apiClient.isVertexAI()){const h=oC(n);return g=Z("tuningJobs",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=sC(v),_=new Sp;return Object.assign(_,S),_})}else{const h=lC(n);return g=Z("tunedModels",h._url),y=h._query,delete h._url,delete h._query,p=this.apiClient.request({path:g,queryParams:y,body:JSON.stringify(h),httpMethod:"GET",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal}).then(v=>v.json().then(S=>{const _=S;return _.sdkHttpResponse={headers:v.headers},_})),p.then(v=>{const S=aC(v),_=new Sp;return Object.assign(_,S),_})}}async cancel(n){var a,s,r,m;let p="",g={};if(this.apiClient.isVertexAI()){const y=Q_(n);p=Z("{name}:cancel",y._url),g=y._query,delete y._url,delete y._query,await this.apiClient.request({path:p,queryParams:g,body:JSON.stringify(y),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abort
161Signal})}else{const y=X_(n);p=Z("{name}:cancel",y._url),g=y._query,delete y._url,delete y._query,await this.apiClient.request({path:p,queryParams:g,body:JSON.stringify(y),httpMethod:"POST",httpOptions:(r=n.config)===null||r===void 0?void 0:r.httpOptions,abortSignal:(m=n.config)===null||m===void 0?void 0:m.abortSignal})}}async tuneInternal(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI()){const g=j_(n);return m=Z("tuningJobs",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>ir(y))}else throw new Error("This method is only supported by the Vertex AI.")}async tuneMldevInternal(n){var a,s;let r,m="",p={};if(this.apiClient.isVertexAI())throw new Error("This method is only supported by the Gemini Developer API.");{const g=W_(n);return m=Z("tunedModels",g._url),p=g._query,delete g._url,delete g._query,r=this.apiClient.request({path:m,queryParams:p,body:JSON.stringify(g),httpMethod:"POST",httpOptions:(a=n.config)===null||a===void 0?void 0:a.httpOptions,abortSignal:(s=n.config)===null||s===void 0?void 0:s.abortSignal}).then(y=>y.json().then(h=>{const v=h;return v.sdkHttpResponse={headers:y.headers},v})),r.then(y=>fC(y))}}}/** 162 * @license 163 * Copyright 2025 Google LLC 164 * SPDX-License-Identifier: Apache-2.0 165 */class pC{async download(n,a){throw new Error("Download to file is not supported in the browser, please use a browser compliant download like an <a> tag.")}}const hC=1024*1024*8,gC=3,yC=1e3,TC=2,Xu="x-goog-upload-status";async function vC(l,n,a){var s,r,m;let p=0,g=0,y=new $u(new Response),h="upload";for(p=l.size;g<p;){const S=Math.min(hC,p-g),_=l.slice(g,g+S);g+S>=p&&(h+=", finalize");let M=0,w=yC;for(;M<gC&&(y=await a.request({path:"",body:_,httpMethod:"POST",httpOptions:{apiVersion:"",baseUrl:n,headers:{"X-Goog-Upload-Command":h,"X-Goog-Upload-Offset":String(g),"Content-Length":String(S)}}}),!(!((s=y==null?void 0:y.headers)===null||s===void 0)&&s[Xu]));)M++,await EC(w),w=w*TC;if(g+=S,((r=y==null?void 0:y.headers)===null||r===void 0?void 0:r[Xu])!=="active")break;if(p<=g)throw new Error("All content has been uploaded, but the upload status is not finalized.")}const v=await(y==null?void 0:y.json());if(((m=y==null?void 0:y.headers)===null||m===void 0?void 0:m[Xu])!=="final")throw new Error("Failed to upload file: Upload status is not finalized.");return v.file}async function SC(l){return{size:l.size,type:l.type}}function EC(l){return new Promise(n=>setTimeout(n,l))}class _C{async upload(n,a,s){if(typeof n=="string")throw new Error("File path is not supported in browser uploader.");return await vC(n,a,s)}async stat(n){if(typeof n=="string")throw new Error("File path is not supported in browser uploader.");return await SC(n)}}/** 166 * @license 167 * Copyright 2025 Google LLC 168 * SPDX-License-Identifier: Apache-2.0 169 */class CC{create(n,a,s){return new AC(n,a,s)}}class AC{constructor(n,a,s){this.url=n,this.headers=a,this.callbacks=s}connect(){this.ws=new WebSocket(this.url),this.ws.onopen=this.callbacks.onopen,this.ws.onerror=this.callbacks.onerror,this.ws.onclose=this.callbacks.onclose,this.ws.onmessage=this.callbacks.onmessage}send(n){if(this.ws===void 0)throw new Error("WebSocket is not connected");this.ws.send(n)}close(){if(this.ws===void 0)throw new Error("WebSocket is not connected");this.ws.close()}}/** 170 * @license 171 * Copyright 2025 Google LLC 172 * SPDX-License-Identifier: Apache-2.0 173 */const zp="x-goog-api-key";class RC{constructor(n){this.apiKey=n}async addAuthHeaders(n){if(n.get(zp)===null){if(this.apiKey.startsWith("auth_tokens/"))throw new Error("Ephemeral tokens are only supported by the live API.");if(!this.apiKey)throw new Error("API key is missing. Please provide a valid API key.");n.append(zp,this.apiKey)}}}/** 174 * @license 175 * Copyright 2025 Google LLC 176 * SPDX-License-Identifier: Apache-2.0 177 */const NC="gl-node/";class MC{constructor(n){var a;if(n.apiKey==null)throw new Error("An API Key must be set when running in a browser");if(n.project||n.location)throw new Error("Vertex AI project based authentication is not supported on browser runtimes. Please do not provide a project or location.");this.vertexai=(a=n.vertexai)!==null&&a!==void 0?a:!1,this.apiKey=n.apiKey;const s=Wy(n.httpOptions,n.vertexai,void 0,void 0);s&&(n.httpOptions?n.httpOptions.baseUrl=s:n.httpOptions={baseUrl:s}),this.apiVersion=n.apiVersion;const r=new RC(this.apiKey);this.apiClient=new d_({auth:r,apiVersion:this.apiVersion,apiKey:this.apiKey,vertexai:this.vertexai,httpOptions:n.httpOptions,userAgentExtra:NC+"web",uploader:new _C,downloader:new pC}),this.models=new b_(this.apiClient),this.live=new R_(this.apiClient,r,new CC),this.batches=new pv(this.apiClient),this.chats=new kv(this.models,this.apiClient),this.caches=new Bv(this.apiClient),this.files=new tS(this.apiClient),this.operations=new L_(this.apiClient),this.authTokens=new K_(this.apiClient),this.tunings=new mC(this.apiClient)}}const Fl="gemini-2.5-flash",Pp={problemStatement:"",customer:"",opportunity:"",chosenSolution:"",advantage:"",team:"",keyResources:[],targetImpact:"",gamePathSummary:[]},Bp={COMMUNITY_MOBILIZATION:"Mobilizing community support is crucial. Great start!",ROOT_CAUSE_ANALYSIS:"Understanding the root cause is key. Smart move!",AWARENESS_IMPACT:"Raising awareness builds momentum. Important!",CREATIVE_SOLUTION:"Thinking outside the box leads to innovation!",ITERATIVE_DESIGN:"Prototyping and testing refines solutions.",RESOURCEFULNESS:"Entrepreneurs find creative ways to gather resources.",IMPACT_FOCUS:"Defining measurable impact ensures meaningful change.",SYSTEMIC_THINKING:"Considering the broader system helps design holistic solutions.",SUSTAINABLE_MODEL:"Developing a sustainable model ensures long-term viability.",COLLABORATION_KEY:"Collaboration amplifies reach and effectiveness.",EDUCATION_GAP:"Bridging the knowledge gap empowers communities.",ACCESSIBILITY_ISSUE:"Making sustainable choices easy drives adoption.",INFRASTRUCTURE_GAP:"Addressing infrastru
177cture gaps is crucial for systemic change.",BEHAVIORAL_CHALLENGE:"Influencing behavior is key to lasting impact.",INNOVATION_FOCUS:"Focusing on innovation can lead to breakthroughs.",HOLISTIC_APPROACH:"A holistic approach addresses interconnected challenges.",USER_INITIATIVE:"Defining your own path shows true entrepreneurial spirit!",CUSTOMER_CENTRIC:"Understanding your customer deeply is fundamental to success.",OPPORTUNITY_SPOTTING:"Identifying a clear opportunity is the bedrock of a strong venture.",TEAM_BUILDING:"A capable and passionate team is essential for execution.",COMPETITIVE_EDGE:"A clear advantage helps your solution stand out and succeed."},ni={START:{id:"START",phase:"INTRODUCTION",text:"Welcome, Eco-Innovator! How would you like to begin your CO-STAR journey today?",options:[{id:"start-custom",text:"I have a specific climate issue or area in mind.",nextScenarioId:"CUSTOM_START_INPUT",insightKey:"USER_INITIATIVE"},{id:"start-predefined",text:"Show me some broad climate challenge areas to explore.",nextScenarioId:"CHOOSE_BROAD_AREA",insightKey:"SYSTEMIC_THINKING"}]},CUSTOM_START_INPUT:{id:"CUSTOM_START_INPUT",phase:"INTRODUCTION",text:"Great! Please briefly describe the climate issue or area you'd like to focus on for your eco-innovation project. This will form the basis of your **Problem Statement**.",options:[],allowDynamicOptions:!1},DEFINE_CUSTOMER:{id:"DEFINE_CUSTOMER",phase:"PROBLEM_IDENTIFICATION",text:`Regarding the problem: '{problemStatement}'. 178 179Who is the primary **Customer** (individual, group, or community) you are creating value for or aiming to help with your eco-innovation?`,allowDynamicOptions:!0,options:[{id:"dc-1",text:"Local residents in a specific neighborhood.",nextScenarioId:"DEFINE_OPPORTUNITY",insightKey:"CUSTOMER_CENTRIC",contributesTo:"customer"},{id:"dc-2",text:"Small businesses in a particular sector.",nextScenarioId:"DEFINE_OPPORTUNITY",insightKey:"CUSTOMER_CENTRIC",contributesTo:"customer"},{id:"dc-3",text:"Students and educational institutions.",nextScenarioId:"DEFINE_OPPORTUNITY",insightKey:"CUSTOMER_CENTRIC",contributesTo:"customer"}],contributesTo:"customer"},DEFINE_OPPORTUNITY:{id:"DEFINE_OPPORTUNITY",phase:"PROBLEM_IDENTIFICATION",text:`For your **Customer** '{customer}' and the problem '{problemStatement}'. 180 181What is the core unmet need or specific **Opportunity** your venture will address? This is about the gap your solution will fill.`,allowDynamicOptions:!0,options:[{id:"do-1",text:"Lack of accessible information or resources.",nextScenarioId:"SOLUTION_IDEATION_INTRO",insightKey:"OPPORTUNITY_SPOTTING",contributesTo:"opportunity"},{id:"do-2",text:"High cost of existing sustainable alternatives.",nextScenarioId:"SOLUTION_IDEATION_INTRO",insightKey:"OPPORTUNITY_SPOTTING",contributesTo:"opportunity"},{id:"do-3",text:"Inefficient current processes or systems.",nextScenarioId:"SOLUTION_IDEATION_INTRO",insightKey:"OPPORTUNITY_SPOTTING",contributesTo:"opportunity"}],contributesTo:"opportunity"},DEFINE_ADVANTAGE:{id:"DEFINE_ADVANTAGE",phase:"SOLUTION_IDEATION",text:`Your proposed **Solution** is: '{chosenSolution}'. 182 183What is its key **Advantage**? Why is this solution significantly better, unique, or more effective for the **Opportunity** '{opportunity}' than existing alternatives or doing nothing?`,allowDynamicOptions:!0,options:[{id:"da-1",text:"It's more cost-effective or accessible.",nextScenarioId:"DEFINE_TEAM",insightKey:"COMPETITIVE_EDGE",contributesTo:"advantage"},{id:"da-2",text:"It offers superior performance or user experience.",nextScenarioId:"DEFINE_TEAM",insightKey:"COMPETITIVE_EDGE",contributesTo:"advantage"},{id:"da-3",text:"It leverages a unique technology or partnership.",nextScenarioId:"DEFINE_TEAM",insightKey:"COMPETITIVE_EDGE",contributesTo:"advantage"}],contributesTo:"advantage"},DEFINE_TEAM:{id:"DEFINE_TEAM",phase:"RESOURCE_PLANNING",text:`To bring your **Solution** '{chosenSolution}' (with its **Advantage** '{advantage}') to reality... 184 185Describe the core **Team** composition, or the essential skills and roles needed. Who is turning this idea into reality? (e.g., 'A mix of community organizers and tech developers', 'Founder with expertise in X, seeking partner for Y').`,allowDynamicOptions:!0,options:[{id:"dt-1",text:"Focus on technical expertise and product development.",nextScenarioId:"RESOURCE_PLANNING_INTRO",insightKey:"TEAM_BUILDING",contributesTo:"team"},{id:"dt-2",text:"Prioritize community engagement and partnership skills.",nextScenarioId:"RESOURCE_PLANNING_INTRO",insightKey:"TEAM_BUILDING",contributesTo:"team"}],contributesTo:"team"},PROBLEM_DEFINITION_CUSTOM:{id:"PROBLEM_DEFINITION_CUSTOM",phase:"PROBLEM_IDENTIFICATION",text:`You've stated y
185our initial **Problem Statement** as: '{problemStatement}'. 186Now, let's refine this if needed, or confirm it. What specific aspect of this problem will be the focus?`,allowDynamicOptions:!0,options:[],onEnter:(l,n)=>({...l,problemStatement:n})},CHOOSE_BROAD_AREA:{id:"CHOOSE_BROAD_AREA",phase:"INTRODUCTION",text:"The world faces numerous climate challenges. Which broad area of climate entrepreneurship sparks your interest to explore first? This will help frame your initial **Problem Statement**.",options:[{id:"start-plastic",text:"Tackle plastic pollution and waste management.",nextScenarioId:"INTRO_PLASTIC_POLLUTION",insightKey:"SYSTEMIC_THINKING"},{id:"start-energy",text:"Explore sustainable energy solutions.",nextScenarioId:"INTRO_SUSTAINABLE_ENERGY",insightKey:"INNOVATION_FOCUS"},{id:"start-food",text:"Address food systems and sustainable agriculture.",nextScenarioId:"INTRO_FOOD_SYSTEMS",insightKey:"HOLISTIC_APPROACH"},{id:"start-arts",text:"Leverage Arts & Creative Entrepreneurship for climate action.",nextScenarioId:"INTRO_ARTS_CREATIVE",insightKey:"CREATIVE_SOLUTION"},{id:"start-supply",text:"Innovate in Sustainable Supply Chains.",nextScenarioId:"INTRO_SUPPLY_CHAINS",insightKey:"SYSTEMIC_THINKING"},{id:"start-community",text:"Focus on Community Capacity Building for climate resilience.",nextScenarioId:"INTRO_COMMUNITY_BUILDING",insightKey:"COMMUNITY_MOBILIZATION"}]},INTRO_PLASTIC_POLLUTION:{id:"INTRO_PLASTIC_POLLUTION",phase:"INTRODUCTION",text:"You've chosen plastic pollution. A local park is choked by plastic. This forms your initial **Problem Statement** context. What's your first instinct to address this within the park scenario?",options:[{id:"intro-plastic-1",text:"Problem: Mobilize volunteers for clean-ups.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"COMMUNITY_MOBILIZATION",contributesTo:"problemStatement"},{id:"intro-plastic-2",text:"Problem: Investigate sources of plastic.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"ROOT_CAUSE_ANALYSIS",contributesTo:"problemStatement"},{id:"intro-plastic-3",text:"Problem: Launch awareness campaign.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"AWARENESS_IMPACT",contributesTo:"problemStatement"}],onEnter:l=>({...l,problemStatement:"Plastic waste in the local park (initial context)."})},INTRO_SUSTAINABLE_ENERGY:{id:"INTRO_SUSTAINABLE_ENERGY",phase:"INTRODUCTION",text:"You're focusing on sustainable energy. Initial **Problem Statement** context: communities lack access to affordable renewables or struggle with inefficiency. What initial problem focus?",options:[{id:"intro-energy-1",text:"Problem: Community solar project access.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"COMMUNITY_MOBILIZATION",contributesTo:"problemStatement"},{id:"intro-energy-2",text:"Problem: Energy efficiency for businesses.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"RESOURCEFULNESS",contributesTo:"problemStatement"},{id:"intro-energy-3",text:"Problem: Innovation in energy storage.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"CREATIVE_SOLUTION",contributesTo:"problemStatement"}],onEnter:l=>({...l,problemStatement:"Challenges in sustainable energy access and efficiency (initial context)."})},INTRO_FOOD_SYSTEMS:{id:"INTRO_FOOD_SYSTEMS",phase:"INTRODUCTION",text:"You've chosen food systems. Initial **Problem Statement** context: issues like food waste, unsustainable farming. Where to begin for the problem?",options:[{id:"intro-food-1",text:"Problem: Rescuing surplus food to reduce waste.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"SYSTEMIC_THINKING",contributesTo:"problemStatement"},{id:"intro-food-2",text:"Problem: Promoting northern/rural farming for local access.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"COMMUNITY_MOBILIZATION",contributesTo:"problemStatement"},{id:"intro-food-3",text:"Problem: Connecting consumers with local sustainable farms.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"COLLABORATION_KEY",contributesTo:"problemStatement"}],onEnter:l=>({...l,problemStatement:"Food system issues like waste and unsustainable practices (initial context)."})},INTRO_ARTS_CREATIVE:{id:"INTRO_ARTS_CREATIVE",phase:"INTRODUCTION",text:"You're using Arts & Creative Entrepreneurship. Initial **Problem Statement** context: leveraging arts for climate action. What's the problem focus?",options:[{id:"intro-arts-1",text:"Problem: Using public art for climate awareness.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"AWARENESS_IMPACT",contributesTo:"problemStatement"},{id:"intro-arts-2",text:"Problem: Designing sustainable/ethical products.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"SUSTAINABLE_MODEL",contributesTo:"problemStatement"},{id:"intro-arts-3",text:"Problem: Creative campaigns for eco-behaviors.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"BEHAVIORAL_CHALLENGE",contributesTo:"problemStatement"}],onEnter:l=>({...l,problemStatement:"Leveraging arts and creativity for climate action (initial context)."})},INTRO_SUPPLY_CHAINS:{id:"INTRO_SUPPLY_CHAINS",phase:"INTRODUCTION",text:"You've chosen Supply Chains. Initial **Problem Statement** context: reducing environmental impact from sourcing to delivery. What's the problem focus?",options:[{id:"intro-supply-1",text:"Problem: Carbon emissions in logistics.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"IMPACT_FOCUS",contributesTo:"problemStatement"},{id:"intro-supply-2",text:"Problem: Ethical/sustainable sourcing of materials.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"COLLABORATION_KEY",contributesTo:"problemStatement"},{id:"intro-supply-3",text:"Problem: Waste minimization and circularity.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"HOLISTIC_APPROACH",contributesTo:"problemStatement"}],onEnter:l=>({...l,problemStatement:"Addressing unsustainability in supply chains (initial context)."})}
186,INTRO_COMMUNITY_BUILDING:{id:"INTRO_COMMUNITY_BUILDING",phase:"INTRODUCTION",text:"You're focused on Community Capacity Building. Initial **Problem Statement** context: empowering communities for local climate action. What's the problem focus?",options:[{id:"intro-comm-1",text:"Problem: Climate literacy/education programs.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"EDUCATION_GAP",contributesTo:"problemStatement"},{id:"intro-comm-2",text:"Problem: Facilitating local sustainability networks.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"RESOURCEFULNESS",contributesTo:"problemStatement"},{id:"intro-comm-3",text:"Problem: Supporting community-led projects.",nextScenarioId:"DEFINE_CUSTOMER",insightKey:"COMMUNITY_MOBILIZATION",contributesTo:"problemStatement"}],onEnter:l=>({...l,problemStatement:"Strengthening community climate action capabilities (initial context)."})},SOLUTION_IDEATION_INTRO:{id:"SOLUTION_IDEATION_INTRO",phase:"SOLUTION_IDEATION",text:`You've identified an **Opportunity**: '{opportunity}' for your **Customer** '{customer}'. 187 188Now, let's brainstorm an innovative **Solution**! What kind of approach will you take?`,allowDynamicOptions:!0,options:[{id:"si-1",text:"Develop a tech-based solution (e.g., an app, smart device, online platform).",nextScenarioId:"DEFINE_ADVANTAGE",insightKey:"CREATIVE_SOLUTION",contributesTo:"chosenSolution"},{id:"si-2",text:"Create a community-driven initiative or program (e.g., workshops, local networks).",nextScenarioId:"DEFINE_ADVANTAGE",insightKey:"COMMUNITY_MOBILIZATION",contributesTo:"chosenSolution"},{id:"si-3",text:"Design an educational product or service (e.g., training, awareness campaigns).",nextScenarioId:"DEFINE_ADVANTAGE",insightKey:"AWARENESS_IMPACT",contributesTo:"chosenSolution"}],contributesTo:"chosenSolution"},RESOURCE_PLANNING_INTRO:{id:"RESOURCE_PLANNING_INTRO",phase:"RESOURCE_PLANNING",text:`Your **Solution** is '{chosenSolution}', your **Team** is described as '{team}'. 189 190Beyond your team, what other key **Resources** (e.g., funding, partnerships, technology) will you need to bring this to life? Choose one to start, or suggest your own.`,allowDynamicOptions:!0,options:[{id:"rp-1",text:"Seed funding or grants to cover initial costs.",nextScenarioId:"IMPACT_DEFINITION_INTRO",insightKey:"RESOURCEFULNESS",addsResource:!0},{id:"rp-2",text:"Partnerships with local businesses, schools, or government bodies.",nextScenarioId:"IMPACT_DEFINITION_INTRO",insightKey:"COLLABORATION_KEY",addsResource:!0},{id:"rp-3",text:"Specific technology or equipment.",nextScenarioId:"IMPACT_DEFINITION_INTRO",insightKey:"INNOVATION_FOCUS",addsResource:!0}],addsResource:!0},IMPACT_DEFINITION_INTRO:{id:"IMPACT_DEFINITION_INTRO",phase:"IMPACT_DEFINITION",text:`With your **Solution** '{chosenSolution}', supported by your **Team** '{team}' and **Resources** like '{keyResources}'. 191 192What specific, measurable **Results** do you aim to achieve for your **Customer** '{customer}' concerning the **Opportunity** '{opportunity}'?`,allowDynamicOptions:!0,options:[{id:"id-1",text:"A measurable reduction in environmental harm (e.g., X% less plastic).",nextScenarioId:"FINAL_CANVAS_PREP",insightKey:"IMPACT_FOCUS",contributesTo:"targetImpact"},{id:"id-2",text:"Increased community engagement (e.g., Y number of participants).",nextScenarioId:"FINAL_CANVAS_PREP",insightKey:"IMPACT_FOCUS",contributesTo:"targetImpact"},{id:"id-3",text:"A scalable model adopted by Z other communities/contexts.",nextScenarioId:"FINAL_CANVAS_PREP",insightKey:"SUSTAINABLE_MODEL",contributesTo:"targetImpact"}],contributesTo:"targetImpact"},FINAL_CANVAS_PREP:{id:"FINAL_CANVAS_PREP",phase:"FINAL_CANVAS",text:"Amazing! You've navigated the Eco-Innovators CO-STAR Journey. Let's review your Project Canvas.",isTerminal:!0,options:[]}},Qu=l=>{switch(l){case"PROBLEM_DEFINITION_CUSTOM":return"DEFINE_CUSTOMER";case"DEFINE_CUSTOMER":return"DEFINE_OPPORTUNITY";case"DEFINE_OPPORTUNITY":return"SOLUTION_IDEATION_INTRO";case"SOLUTION_IDEATION_INTRO":return"DEFINE_ADVANTAGE";case"DEFINE_ADVANTAGE":return"DEFINE_TEAM";case"DEFINE_TEAM":return"RESOURCE_PLANNING_INTRO";
192case"RESOURCE_PLANNING_INTRO":return"IMPACT_DEFINITION_INTRO";case"IMPACT_DEFINITION_INTRO":return"FINAL_CANVAS_PREP";default:return console.warn(`Getting next dynamic scenario ID for unmapped scenario: ${l}. Defaulting to START.`),"START"}};let Ht=null;async function IC(){try{return Ht=new MC({apiKey:"AIzaSyA-pti0_FiCPMbuNsi6n5GEOA4mUnGCwQM"}),{success:!0,message:"AI Service Initialized."}}catch(l){return console.error("Error initializing GeminiService:",l),{success:!1,error:l.message}}}const DC=l=>{let n=l.trim();const a=n.match(/^```(?:json)?\s*\n?(.*?)\n?\s*```$/s);a!=null&&a[1]&&(n=a[1].trim());try{return JSON.parse(n)}catch{throw console.error("Failed to parse JSON string:",n),new Error("AI returned a response that was not valid JSON.")}},Lt={async generateNewOptions(l,n,a){if(!Ht)throw new Error("AI not initialized.");const s=`You are a creative guide in a text adventure game about eco-entrepreneurship following the CO-STAR framework. The player is in a scenario: "${l}". The game phase is '${a.toLowerCase().replace(/_/g," ")}'. Existing options: [${n.map(p=>`"${p}"`).join(", ")}]. Generate 2 distinct, actionable, and creative choices for the player, fitting this context and phase. Each choice should be a concise phrase, ideally under 15 words. Return ONLY a JSON array of strings, like ["New choice 1", "New choice 2"]. Do not add any other text or explanations.`,r=await Ht.models.generateContent({model:Fl,contents:s,config:{responseMimeType:"application/json",responseSchema:{type:Jt.ARRAY,items:{type:Jt.STRING}},thinkingConfig:{thinkingBudget:0}}}),m=DC(r.text);if(Array.isArray(m)&&m.every(p=>typeof p=="string"))return m.slice(0,2);throw new Error("Received invalid format for new options from AI.")},async generateInsightForChoice(l,n){if(!Ht)throw new Error("AI not initialized.");const a=`In an eco-entrepreneurship game, a player chose: "${l}" in the context of: "${n}". Provide a brief, encouraging entrepreneurial insight (max 25 words). Example: "Focusing on customer needs is crucial, well done!" Output only the insight text.`;return(await Ht.models.generateContent({model:Fl,contents:a,config:{thinkingConfig:{thinkingBudget:0}}})).text.trim()},async generateFinalCanvasSummary(l){if(!Ht)throw new Error("AI not initialized.");const n=`Write an inspiring summary for an eco-innovation project based on the CO-STAR framework, using Markdown. Project Details: Problem: "${l.problemStatement}", Customer: "${l.customer}", Opportunity: "${l.opportunity}", Solution: "${l.chosenSolution}", Advantage: "${l.advantage}", Team: "${l.team}", Resources: "${l.keyResources.join(", ")}", Results: "${l.targetImpact}". Structure as: "**Overall Summary:** 193[Paragraph] 194 195**Inspiring Narrative:** 196[Paragraph]". Output only the Markdown content.`;return(await Ht.models.generateContent({model:Fl,contents:n})).text.trim()},async generateEnhancedCanvasSection(l,n){if(!Ht)throw new Error("AI not initialized.");const a=`As an expert advisor for eco-entrepreneurs using CO-STAR, provide 2-3 detailed guidance points for the '${l}' section, which is currently: '${n||"Not specified"}'. For each point, start with "* " on a new line and write a single, comprehensive paragraph (40-70 words) covering what the advice is, why it's important, and how to implement it. Do not use labels like "What:", "Why:", "How:". The tone should be encouraging and practical. Return only the guidance points.`;return(await Ht.models.generateContent({model:Fl,contents:a})).text.trim()},async generateEntrepreneurialEncouragement(l){if(!Ht)throw new Error("AI not initialized.");const n=`As an inspiring mentor, write an uplifting 2-3 paragraph message (120-180 words) for an eco-entrepreneur who just outlined their project: Problem: "${l.problemStatement}", Solution: "${l.chosenSolution}". Acknowledge their effort, emphasize the significance of their idea, instill an entrepreneurial mindset (resilience, creativity, iteration), and inspire them to take the next steps. Maintain a positive, empowering tone. Use Markdown for paragraphs.`;return(await Ht.models.generateContent({model:Fl,contents:n})).text.trim()}},UC=()=>B.jsxs("header",{className:"text-center my-8 w-full max-w-3xl",children:[B.jsx("a",{href:"/",className:"block",children:B.jsxs("svg",{className:"mx-auto mb-4 h-16",viewBox:"0 0 300 60",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[B.jsx("path",{d:"M21.2 55.6c-4.4 0-8.2-1.6-11.4-4.8s-4.8-7-4.8-11.4V21.8h8.6v17.6c0 2.8 1 5.2 3 7.2s4.4 3 7.2 3c2.8 0 5.2-1 7.2-3s3
196-4.4 3-7.2V21.8h8.6v17.6c0 4.4-1.6 8.2-4.8 11.4s-7 4.8-11.4 4.8zM60.6 55.6c-4.4 0-8.2-1.6-11.4-4.8s-4.8-7-4.8-11.4V21.8h8.6v17.6c0 2.8 1 5.2 3 7.2s4.4 3 7.2 3c2.8 0 5.2-1 7.2-3s3-4.4 3-7.2V21.8h8.6v17.6c0 4.4-1.6 8.2-4.8 11.4s-7 4.8-11.4 4.8zM120.2 55.6c-4.4 0-8.2-1.6-11.4-4.8s-4.8-7-4.8-11.4V21.8h8.6v17.6c0 2.8 1 5.2 3 7.2s4.4 3 7.2 3c2.8 0 5.2-1 7.2-3s3-4.4 3-7.2V21.8h8.6v17.6c0 4.4-1.6 8.2-4.8 11.4s-7 4.8-11.4 4.8z",fill:"#0F766E"}),B.jsx("path",{d:"M152.4 4.4h8.6v51.2h-8.6zM170.8 4.4h8.6v51.2h-8.6zM202.4 4.4h8.6v51.2h-8.6zM224.4 4.4h8.6v51.2h-8.6z",fill:"#0D9488"}),B.jsx("path",{d:"M255.4 4.4h8.6v51.2h-8.6z",fill:"#14B8A6"}),B.jsx("text",{x:"5",y:"15",fontFamily:"'Playfair Display', serif",fontSize:"12",fill:"#334155",children:"The Arts Incubator"})]})}),B.jsx("h1",{className:"header-font text-4xl md:text-5xl font-bold text-teal-800",children:"The Eco-Innovators Journey"}),B.jsx("p",{className:"text-teal-600 text-md md:text-lg mt-2",children:"Chart your CO-STAR path to a greener future."})]}),xC=({apiKeyStatus:l})=>B.jsxs("footer",{className:"text-center mt-12 pt-8 pb-4 text-sm text-teal-700/80 w-full max-w-3xl border-t border-slate-200",children:[B.jsx("p",{children:"Powered by Google Gemini. Explore creative entrepreneurship for a sustainable world."}),l.type==="error"&&B.jsxs("p",{className:"api-status-message api-status-error mt-4",children:["Warning: ",l.message,". AI features are limited or unavailable."]})]}),fr=({message:l})=>B.jsxs("div",{className:"loading-spinner-container",children:[B.jsxs("svg",{className:"loading-spinner",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[B.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),B.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),B.jsx("span",{className:"text-lg",children:l})]}),bC=()=>{const[l,n]=Qe.useState("INITIALIZING"),[a,s]=Qe.useState({message:"Initializing AI Service...",type:"loading"}),[r,m]=Qe.useState(null),[p,g]=Qe.useState(JSON.parse(JSON.stringify(Pp))),[y,h]=Qe.useState([]),[v,S]=Qe.useState(!0),[_,M]=Qe.useState(null),[w,H]=Qe.useState(""),[k,J]=Qe.useState(null);Qe.useEffect(()=>{(async()=>{const X=await IC();X.success?(s({message:X.message,type:"success"}),m(ni.START),n("SCENARIO")):(s({message:`AI initialization failed: ${X.error}`,type:"error"}),m(ni.START),n("SCENARIO")),S(!1)})()},[]);const K=Qe.useCallback(()=>{S(!0),n("INITIALIZING"),g(JSON.parse(JSON.stringify(Pp))),h([]),M(null),H(""),J(null),m(ni.START),n("SCENARIO"),S(!1)},[]),V=P=>{let X=P;return X=X.replace(/{problemStatement}/g,`"${p.problemStatement||"the defined problem"}"`),X=X.replace(/{customer}/g,`"${p.customer||"the target customer"}"`),X=X.replace(/{opportunity}/g,`"${p.opportunity||"the identified opportunity"}"`),X=X.replace(/{chosenSolution}/g,`"${p.chosenSolution||"the chosen solution"}"`),X=X.replace(/{advantage}/g,`"${p.advantage||"its unique advantage"}"`),X=X.replace(/{team}/g,`"${p.team||"the required team/skills"}"`),X=X.replace(/{keyResources}/g,`"${p.keyResources.join(", ")||"needed resources"}"`),X=X.replace(/{targetImpact}/g,`"${p.targetImpact||"the desired results"}"`),{__html:X.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>")}},j=Qe.useCallback(async(P,X=null)=>{if(v)return;S(!0),M(null),h(x=>[...x,{scenarioId:r.id,canvas:p}]);let oe={...p};const ie=X??P.text;let Ue=P.insightKey?Bp[P.insightKey]:"Every choice carves your path!";if((P.isDynamic||!P.insightKey&&(r==null?void 0:r.phase)!=="FINAL_CANVAS"&&(r==null?void 0:r.phase)!=="INTRODUCTION")&&a.type==="success")try{Ue=await Lt.generateInsightForChoice(ie,r.text)}catch(x){console.error(x),Ue="AI insight generation failed. Using default."}M(Ue),P.contributesTo&&(oe[P.contributesTo]=ie),P.addsResource&&(oe.keyResources=[...new Set([...oe.keyResources,ie])]),oe.gamePathSummary.push({choice:ie,insight:Ue});const Oe=ni[P.nextScenarioId];if(Oe!=null&&Oe.onEnter){const x=Oe.onEnter(oe,X??void 0);oe={...oe,...x}}if(g(oe),Oe!=null&&Oe.isTerminal){if(n("CANVAS"),a.type==="success")try{const[x,z,ae,_e,Ae,R,G,Y,$,se]=await Promise.all([Lt.generateFinalCanvasSummary(oe),Lt.generateEntrepreneurialEncouragement
196(oe),Lt.generateEnhancedCanvasSection("Problem Statement",oe.problemStatement),Lt.generateEnhancedCanvasSection("Customer",oe.customer),Lt.generateEnhancedCanvasSection("Opportunity",oe.opportunity),Lt.generateEnhancedCanvasSection("Solution",oe.chosenSolution),Lt.generateEnhancedCanvasSection("Advantage",oe.advantage),Lt.generateEnhancedCanvasSection("Team",oe.team),Lt.generateEnhancedCanvasSection("Key Resources",oe.keyResources.join(", ")),Lt.generateEnhancedCanvasSection("Results",oe.targetImpact)]);J({summary:x,encouragement:z,enhancements:{problem:ae,customer:_e,opportunity:Ae,solution:R,advantage:G,team:Y,resources:$,results:se}})}catch(x){console.error("Error generating final canvas details:",x),J({summary:"AI summary failed.",encouragement:"Keep innovating!",enhancements:{}})}}else m(Oe);S(!1)},[v,r,p,a.type]),ne=Qe.useCallback(()=>{if(!(!r||!w.trim())){if(r.id==="CUSTOM_START_INPUT"){S(!0);const P=w.trim();let X={...p};X.gamePathSummary.push({choice:`Initial problem focus: ${P}`,insight:Bp.USER_INITIATIVE});const oe=ni.PROBLEM_DEFINITION_CUSTOM;if(oe.onEnter){const Ue=oe.onEnter(X,P);X={...X,...Ue}}const ie=Qu("PROBLEM_DEFINITION_CUSTOM");m(ni[ie]),g(X),H(""),S(!1)}else if(r.allowDynamicOptions){const P={id:`dynamic-user-${Date.now()}`,text:w,nextScenarioId:Qu(r.id),isDynamic:!0,contributesTo:r.contributesTo,addsResource:r.addsResource};j(P,w),H("")}}},[r,w,p,j]),te=Qe.useCallback(async()=>{if(!(v||a.type!=="success"||!(r!=null&&r.allowDynamicOptions))){S(!0);try{const P=r.options.map(ie=>ie.text),oe=(await Lt.generateNewOptions(r.text,P,r.phase)).map((ie,Ue)=>({id:`dynamic-ai-${Date.now()}-${Ue}`,text:ie,nextScenarioId:Qu(r.id),isDynamic:!0,contributesTo:r.contributesTo,addsResource:r.addsResource}));m(ie=>ie?{...ie,options:oe}:null)}catch(P){console.error(P),M("AI couldn't generate new options this time. Try writing your own!")}S(!1)}},[v,a.type,r]),F=Qe.useCallback(()=>{if(y.length===0)return;const P=y[y.length-1];g(P.canvas),m(ni[P.scenarioId]),h(X=>X.slice(0,-1)),n("SCENARIO"),M(null)},[y]),ye=()=>l==="INITIALIZING"||v&&l==="SCENARIO"&&!r?B.jsx(fr,{message:"Journey is loading..."}):l==="ERROR"?B.jsx("p",{className:"api-status-message api-status-error",children:a.message}):l==="SCENARIO"&&r?B.jsx(LC,{scenario:r,projectCanvas:p,insight:_,isLoading:v,isApiReady:a.type==="success",customOptionText:w,onOptionSelect:j,onGenerateMore:te,onGoBack:F,canGoBack:y.length>0,onCustomOptionTextChange:H,onCustomSubmit:ne,processScenarioText:V}):l==="CANVAS"?B.jsx(wC,{canvasData:p,pdfData:k,isApiReady:a.type==="success",onRestart:K,isLoading:!k&&a.type==="success"}):null;return B.jsxs("div",{className:"app-container",children:[B.jsxs("div",{className:"main-content",children:[B.jsx(UC,{}),a.message&&l!=="INITIALIZING"&&B.jsx("div",{className:`api-status-message api-status-${a.type}`,children:a.message}),ye()]}),B.jsx(xC,{apiKeyStatus:a})]})},LC=({scenario:l,projectCanvas:n,processScenarioText:a,insight:s,isLoading:r,isApiReady:m,onOptionSelect:p,onGenerateMore:g,onGoBack:y,canGoBack:h,customOptionText:v,onCustomOptionTextChange:S,onCustomSubmit:_})=>{const M=l.id==="CUSTOM_START_INPUT";return B.jsxs("div",{className:"content-card w-full",children:[B.jsx("h2",{className:"header-font text-2xl md:text-3xl font-bold text-teal-700 mb-4 text-center",children:l.phase.replace(/_/g," ")}),B.jsx("p",{className:"text-gray-700 text-lg mb-6 leading-relaxed whitespace-pre-line",dangerouslySetInnerHTML:a(l.text)}),s&&B.jsxs("div",{className:"bg-teal-50 border-l-4 border-teal-500 text-teal-800 p-4 mb-6 rounded-r-lg shadow-sm",role:"alert",children:[B.jsx("p",{className:"font-semibold",children:"Eco-Insight:"}),B.jsx("p",{children:s})]}),r&&!s&&B.jsx(fr,{message:"Thinking..."}),!r&&B.jsxs(B.Fragment,{children:[l.options.length>0&&B.jsx("div",{className:"space-y-3 mb-6",children:l.options.map(w=>B.jsx("button",{onClick:()=>p(w),disabled:r,className:"button-base button-option",children:w.text},w.id))}),B.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 mb-6",children:[h&&B.jsx("button",{onClick:y,disabled:r,className:"button-base button-tertiary w-full sm:w-auto",children:"â¬
ï¸ Go Back"}),l.allowDynamicOptions&&B.jsx("button",{onClick:g,disabled:r||!m,className:"button-base button-secondary w-full sm:flex-grow",title:m?"":"API Key not available",children:"⨠Generate More Options"})]}),(M||l.allowDynamicOptions)&&B.jsxs("div",{className:"mt-6 pt-6 border-t border-teal-200",children:[B.jsx("label",{htmlFor:"custom-option-text",className:"block text-sm font-medium text-gray-700 mb-2",children:M?"Describe your climate issue to focus on (Problem Statement):":"Or, suggest your own option:"}
196),B.jsx("textarea",{id:"custom-option-text",value:v,onChange:w=>S(w.target.value),disabled:r||!m,rows:3,className:"shadow-sm focus:ring-teal-500 focus:border-teal-500 block w-full sm:text-sm border-gray-300 rounded-md p-2 mb-3 bg-white disabled:bg-slate-50",placeholder:M?"e.g., Reducing e-waste in my city...":"Type your innovative idea here..."}),B.jsx("button",{onClick:_,disabled:r||!m||!v.trim(),className:"button-base button-primary w-full",children:M?"Proceed with this Problem":"Use My Option"})]})]})]})},wC=({canvasData:l,pdfData:n,isApiReady:a,onRestart:s,isLoading:r})=>{const[m,p]=Qe.useState("Crafting your personalized eco-innovation summary..."),g=["Generating AI-powered guidance for your next steps...","Analyzing your journey to provide inspiring encouragement...","Putting the final touches on your CO-STAR canvas...","Compiling your entrepreneurial blueprint...","Crafting your personalized eco-innovation summary..."];if(Qe.useEffect(()=>{if(r){const h=setInterval(()=>{p(v=>{const _=(g.indexOf(v)+1)%g.length;return g[_]})},2500);return()=>clearInterval(h)}},[r]),r)return B.jsxs("div",{className:"content-card w-full text-center",children:[B.jsx("h2",{className:"header-font text-3xl md:text-4xl font-bold text-teal-700 mb-6",children:"Finalizing Your Journey..."}),B.jsx(fr,{message:m})]});const y=({title:h,value:v,enhancement:S})=>{const _=Array.isArray(v)?v.length>0?B.jsx("ul",{className:"list-disc list-inside",children:v.map((M,w)=>B.jsx("li",{children:M},w))}):null:v?B.jsx("p",{children:v}):null;return B.jsxs("div",{className:`canvas-item ${h.includes("Problem")||h.includes("Solution")?"md:col-span-2":""}`,children:[B.jsx("h3",{className:"text-sm font-semibold text-teal-600 uppercase tracking-wider mb-2",children:h}),B.jsx("div",{className:"text-gray-800 font-medium",children:_||B.jsx("p",{className:"italic text-gray-500",children:"Not specified."})}),a&&S&&B.jsxs("div",{className:"mt-3 pt-3 border-t border-teal-200",children:[B.jsx("h4",{className:"text-xs font-semibold text-teal-500 uppercase tracking-wider mb-1",children:"AI Guidance:"}),B.jsx("ul",{className:"ai-guidance-list list-outside text-gray-600 text-sm space-y-1",dangerouslySetInnerHTML:{__html:S.split(` 197`).filter(M=>M.trim().startsWith("* ")).map(M=>`<li>${M.substring(M.indexOf("* ")+2).replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>")}</li>`).join("")}})]})]})};return B.jsxs("div",{className:"content-card w-full",children:[B.jsx("h2",{className:"header-font text-3xl md:text-4xl font-bold text-teal-700 mb-6 text-center",children:"Your Eco-Innovator's CO-STAR Canvas"}),a&&n&&B.jsx("div",{className:"mb-8 p-6 bg-green-50/50 border-l-4 border-green-500 rounded-r-lg",children:B.jsx("div",{className:"prose prose-teal max-w-none",dangerouslySetInnerHTML:{__html:n.summary.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").split(` 198 199`).map(h=>`<p>${h}</p>`).join("")}})}),B.jsxs("div",{className:"grid md:grid-cols-2 gap-4",children:[B.jsx(y,{title:"Problem Statement",value:l.problemStatement,enhancement:n==null?void 0:n.enhancements.problem}),B.jsx(y,{title:"Customer",value:l.customer,enhancement:n==null?void 0:n.enhancements.customer}),B.jsx(y,{title:"Opportunity",value:l.opportunity,enhancement:n==null?void 0:n.enhancements.opportunity}),B.jsx(y,{title:"Solution",value:l.chosenSolution,enhancement:n==null?void 0:n.enhancements.solution}),B.jsx(y,{title:"Advantage",value:l.advantage,enhancement:n==null?void 0:n.enhancements.advantage}),B.jsx(y,{title:"Team",value:l.team,enhancement:n==null?void 0:n.enhancements.team}),B.jsx(y,{title:"Results",value:l.targetImpact,enhancement:n==null?void 0:n.enhancements.results}),B.jsx(y,{title:"Key Resources",value:l.keyResources,enhancement:n==null?void 0:n.enhancements.resources})]}),a&&(n==null?void 0:n.encouragement)&&B.jsxs("div",{className:"mt-8 pt-6 border-t border-teal-200",children:[B.jsx("h3",{className:"header-font text-2xl font-bold text-teal-700 mb-3 text-center",children:"A Final Word of Encouragement"}),B.jsx("div",{className:"prose prose-lg text-gray-700 max-w-none",dangerouslySetInnerHTML:{__html:n.encouragement.replace(/\*\*(.*?)\*\*/g,"<strong>$1</strong>").split(` 200 201`).map(h=>`<p>${h}</p>`).join("")}})]}),B.jsx("div",{className:"mt-10 pt-6 border-t border-teal-200 space-y-4",children:B.jsx("button",{onClick:s,className:"button-base button-primary w-full",children:"Start a New Journey"})})]})},qC=Xy.createRoot(document.getElementById("root"));qC.render(B.jsx(Qe.StrictMode,{children:B.jsx(bC,{})}));
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.