vendor: 4,737 bytes, lines 1-9
1var PO=Object.defineProperty;var y_=t=>{throw TypeError(t)};var TO=(t,e,n)=>e in t?PO(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var nn=(t,e,n)=>TO(t,typeof e!="symbol"?e+"":e,n),U1=(t,e,n)=>e.has(t)||y_("Cannot "+n);var Se=(t,e,n)=>(U1(t,e,"read from private field"),n?n.call(t):e.get(t)),Qt=(t,e,n)=>e.has(t)?y_("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),jt=(t,e,n,r)=>(U1(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),Cr=(t,e,n)=>(U1(t,e,"access private method"),n);var xm=(t,e,n,r)=>({set _(i){jt(t,e,i,n)},get _(){return Se(t,e,r)}});function RO(t,e){for(var n=0;n<e.length;n++){const r=e[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in t)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(t,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var pne=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ab(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var L4={exports:{}},av={},j4={exports:{}},Mt={};/** 2 * @license React 3 * react.production.min.js 4 * 5 * Copyright (c) Facebook, Inc. and its 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 _p=Symbol.for("react.element"),LO=Symbol.for("react.portal"),jO=Symbol.for("react.fragment"),OO=Symbol.for("react.strict_mode"),IO=Symbol.for("react.profiler"),DO=Symbol.for("react.provider"),MO=Symbol.for("react.context"),FO=Symbol.for("react.forward_ref"),zO=Symbol.for("react.suspense"),$O=Symbol.for("react.memo"),UO=Symbol.for("react.lazy"),w_=Symbol.iterator;function BO(t){return t===null||typeof t!="object"?null:(t=w_&&t[w_]||t["@@iterator"],typeof t=="function"?t:null)}var O4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},I4=Object.assign,D4={};function Cd(t,e,n){this.props=t,this.context=e,this.refs=D4,this.updater=n||O4}Cd.prototype.isReactComponent={};Cd.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,t,e,"setState")};Cd.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function M4(){}M4.prototype=Cd.prototype;function Cb(t,e,n){this.props=t,this.context=e,this.refs=D4,this.updater=n||O4}var Pb=Cb.prototype=new M4;Pb.constructor=Cb;I4(Pb,Cd.prototype);Pb.isPureReactComponent=!0;var b_=Array.isArray,F4=Object.prototype.hasOwnProperty,Tb={current:null},z4={key:!0,ref:!0,__self:!0,__source:!0};function $4(t,e,n){var r,i={},s=null,a=null;if(e!=null)for(r in e.ref!==void 0&&(a=e.ref),e.key!==void 0&&(s=""+e.key),e)F4.call(e,r)&&!z4.hasOwnProperty(r)&&(i[r]=e[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var l=Array(o),c=0;c<o;c++)l[c]=arguments[c+2];i.children=l}if(t&&t.defaultProps)for(r in o=t.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return{$$typeof:_p,type:t,key:s,ref:a,props:i,_owner:Tb.current}}function qO(t,e){return{$$typeof:_p,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function Rb(t){return typeof t=="object"&&t!==null&&t.$$typeof===_p}function HO(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var x_=/\/+/g;function B1(t,e){return typeof t=="object"&&t!==null&&t.key!=null?HO(""+t.key):e.toString(36)}function Sg(t,e,n,r,i){var s=typeof t;(s==="undefined"||s==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(s){case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case _p:case LO:a=!0}}if(a)return a=t,i=i(a),t=r===""?"."+B1(a,0):r,b_(i)?(n="",t!=null&&(n=t.replace(x_,"$&/")+"/"),Sg(i,e,
vendor: 4,473 bytes, lines 9-17
9n,"",function(c){return c})):i!=null&&(Rb(i)&&(i=qO(i,n+(!i.key||a&&a.key===i.key?"":(""+i.key).replace(x_,"$&/")+"/")+t)),e.push(i)),1;if(a=0,r=r===""?".":r+":",b_(t))for(var o=0;o<t.length;o++){s=t[o];var l=r+B1(s,o);a+=Sg(s,e,n,l,i)}else if(l=BO(t),typeof l=="function")for(t=l.call(t),o=0;!(s=t.next()).done;)s=s.value,l=r+B1(s,o++),a+=Sg(s,e,n,l,i);else if(s==="object")throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.");return a}function _m(t,e,n){if(t==null)return t;var r=[],i=0;return Sg(t,r,"","",function(s){return e.call(n,s,i++)}),r}function WO(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var ei={current:null},kg={transition:null},VO={ReactCurrentDispatcher:ei,ReactCurrentBatchConfig:kg,ReactCurrentOwner:Tb};function U4(){throw Error("act(...) is not supported in production builds of React.")}Mt.Children={map:_m,forEach:function(t,e,n){_m(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return _m(t,function(){e++}),e},toArray:function(t){return _m(t,function(e){return e})||[]},only:function(t){if(!Rb(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Mt.Component=Cd;Mt.Fragment=jO;Mt.Profiler=IO;Mt.PureComponent=Cb;Mt.StrictMode=OO;Mt.Suspense=zO;Mt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VO;Mt.act=U4;Mt.cloneElement=function(t,e,n){if(t==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=I4({},t.props),i=t.key,s=t.ref,a=t._owner;if(e!=null){if(e.ref!==void 0&&(s=e.ref,a=Tb.current),e.key!==void 0&&(i=""+e.key),t.type&&t.type.defaultProps)var o=t.type.defaultProps;for(l in e)F4.call(e,l)&&!z4.hasOwnProperty(l)&&(r[l]=e[l]===void 0&&o!==void 0?o[l]:e[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){o=Array(l);for(var c=0;c<l;c++)o[c]=arguments[c+2];r.children=o}return{$$typeof:_p,type:t.type,key:i,ref:s,props:r,_owner:a}};Mt.createContext=function(t){return t={$$typeof:MO,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:DO,_context:t},t.Consumer=t};Mt.createElement=$4;Mt.createFactory=function(t){var e=$4.bind(null,t);return e.type=t,e};Mt.createRef=function(){return{current:null}};Mt.forwardRef=function(t){return{$$typeof:FO,render:t}};Mt.isValidElement=Rb;Mt.lazy=function(t){return{$$typeof:UO,_payload:{_status:-1,_result:t},_init:WO}};Mt.memo=function(t,e){return{$$typeof:$O,type:t,compare:e===void 0?null:e}};Mt.startTransition=function(t){var e=kg.transition;kg.transition={};try{t()}finally{kg.transition=e}};Mt.unstable_act=U4;Mt.useCallback=function(t,e){return ei.current.useCallback(t,e)};Mt.useContext=function(t){return ei.current.useContext(t)};Mt.useDebugValue=function(){};Mt.useDeferredValue=function(t){return ei.current.useDeferredValue(t)};Mt.useEffect=function(t,e){return ei.current.useEffect(t,e)};Mt.useId=function(){return ei.current.useId()};Mt.useImperativeHandle=function(t,e,n){return ei.current.useImperativeHandle(t,e,n)};Mt.useInsertionEffect=function(t,e){return ei.current.useInsertionEffect(t,e)};Mt.useLayoutEffect=function(t,e){return ei.current.useLayoutEffect(t,e)};Mt.useMemo=function(t,e){return ei.current.useMemo(t,e)};Mt.useReducer=function(t,e,n){return ei.current.useReducer(t,e,n)};Mt.useRef=function(t){return ei.current.useRef(t)};Mt.useState=function(t){return ei.current.useState(t)};Mt.useSyncExternalStore=function(t,e,n){return ei.current.useSyncExternalStore(t,e,n)};Mt.useTransition=function(){return ei.current.useTransition()};Mt.version="18.3.1";j4.exports=Mt;var E=j4.exports;const ye=Ab(E),B4=RO({__proto__:null,default:ye},[E]);/** 10 * @license React 11 * react-jsx-runtime.production.min.js 12 * 13 * Copyright (c) Facebook, Inc. and its 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 GO=E,KO=Symbol.for("react.element"),ZO=Symbol.for("react.fragment"),YO=Object.prototype.hasOwnProperty,JO=GO.__SECRET_INT
vendor: 11,473 bytes, lines 17-34
17ERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,XO={key:!0,ref:!0,__self:!0,__source:!0};function q4(t,e,n){var r,i={},s=null,a=null;n!==void 0&&(s=""+n),e.key!==void 0&&(s=""+e.key),e.ref!==void 0&&(a=e.ref);for(r in e)YO.call(e,r)&&!XO.hasOwnProperty(r)&&(i[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&&(i[r]=e[r]);return{$$typeof:KO,type:t,key:s,ref:a,props:i,_owner:JO.current}}av.Fragment=ZO;av.jsx=q4;av.jsxs=q4;L4.exports=av;var m=L4.exports,H4={exports:{}},Ii={},W4={exports:{}},V4={};/** 18 * @license React 19 * scheduler.production.min.js 20 * 21 * Copyright (c) Facebook, Inc. and its 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 */(function(t){function e(U,J){var de=U.length;U.push(J);e:for(;0<de;){var ie=de-1>>>1,C=U[ie];if(0<i(C,J))U[ie]=J,U[de]=C,de=ie;else break e}}function n(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var J=U[0],de=U.pop();if(de!==J){U[0]=de;e:for(var ie=0,C=U.length,q=C>>>1;ie<q;){var X=2*(ie+1)-1,Q=U[X],ee=X+1,le=U[ee];if(0>i(Q,de))ee<C&&0>i(le,Q)?(U[ie]=le,U[ee]=de,ie=ee):(U[ie]=Q,U[X]=de,ie=X);else if(ee<C&&0>i(le,de))U[ie]=le,U[ee]=de,ie=ee;else break e}}return J}function i(U,J){var de=U.sortIndex-J.sortIndex;return de!==0?de:U.id-J.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var l=[],c=[],u=1,d=null,f=3,h=!1,y=!1,v=!1,_=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function k(U){for(var J=n(c);J!==null;){if(J.callback===null)r(c);else if(J.startTime<=U)r(c),J.sortIndex=J.expirationTime,e(l,J);else break;J=n(c)}}function N(U){if(v=!1,k(U),!y)if(n(l)!==null)y=!0,ne(R);else{var J=n(c);J!==null&&oe(N,J.startTime-U)}}function R(U,J){y=!1,v&&(v=!1,w(M),M=-1),h=!0;var de=f;try{for(k(J),d=n(l);d!==null&&(!(d.expirationTime>J)||U&&!L());){var ie=d.callback;if(typeof ie=="function"){d.callback=null,f=d.priorityLevel;var C=ie(d.expirationTime<=J);J=t.unstable_now(),typeof C=="function"?d.callback=C:d===n(l)&&r(l),k(J)}else r(l);d=n(l)}if(d!==null)var q=!0;else{var X=n(c);X!==null&&oe(N,X.startTime-J),q=!1}return q}finally{d=null,f=de,h=!1}}var H=!1,F=null,M=-1,I=5,G=-1;function L(){return!(t.unstable_now()-G<I)}function j(){if(F!==null){var U=t.unstable_now();G=U;var J=!0;try{J=F(!0,U)}finally{J?W():(H=!1,F=null)}}else H=!1}var W;if(typeof x=="function")W=function(){x(j)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,re=z.port2;z.port1.onmessage=j,W=function(){re.postMessage(null)}}else W=function(){_(j,0)};function ne(U){F=U,H||(H=!0,W())}function oe(U,J){M=_(function(){U(t.unstable_now())},J)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_continueExecution=function(){y||h||(y=!0,ne(R))},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):I=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return n(l)},t.unstable_next=function(U){switch(f){case 1:case 2:case 3:var J=3;break;default:J=f}var de=f;f=J;try{return U()}finally{f=de}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(U,J){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var de=f;f=U;try{return J()}finally{f=de}},t.unstable_scheduleCallback=function(U,J,de){var ie=t.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?ie+de:ie):de=ie,U){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=de+C,U={id:u++,callback:J,priorityLevel:U,startTime:de,expirationTime:C,sortIndex:-1},de>ie?(U.sortIndex=de,e(c,U),n(l)===null&&U===n(c)&&(v?(w(M),M=-1):v=!0,oe(N,de-ie))):(U.sortIndex=C,e(l,U),y||h||(y=!0,ne(R))),U},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(U){var J=f;return function(){var de=f;f=J;try{return U.apply(this,arguments)}finally{f=de}}}})(V4);W4.exports=V4;var QO=W4.exports;/** 26 * @license React 27 * react-dom.production.min.js 28 * 29 * Copyright (c) Facebook, Inc. and its 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 e8=E,Oi=QO;function Ce(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=1;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var G4=new Set,wf={};function Cc(t,e){ud(t,e),ud(t+"Capture",e)}function ud(t,e){for(wf[t]=e,t=0;t<e.length;t++)G4.add(e[t])}var to=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),k2=Object.prototype.hasOwnProperty,t8=/^[: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]*$/,__={},S_={};function n8(t){return k2.call(S_,t)?!0:k2.call(__,t)?!1:t8.test(t)?S_[t]=!0:(__[t]=!0,!1)}function r8(t,e,n,r){if(n!==null&&n.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!=="data-"&&t!=="aria-");default:return!1}}function i8(t,e,n,r){if(e===null||typeof e>"u"||r8(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function ti(t,e,n,r,i,s,a){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=a}var kr={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(t){kr[t]=new ti(t,0,!1,t,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(t){var e=t[0];kr[e]=new ti(e,1,!1,t[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(t){kr[t]=new ti(t,2,!1,t.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(t){kr[t]=new ti(t,2,!1,t,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(t){kr[t]=new ti(t,3,!1,t.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(t){kr[t]=new ti(t,3,!0,t,null,!1,!1)});["capture","download"].forEach(function(t){kr[t]=new ti(t,4,!1,t,null,!1,!1)});["cols","rows","size","span"].forEach(function(t){kr[t]=new ti(t,6,!1,t,null,!1,!1)});["rowSpan","start"].forEach(function(t){kr[t]=new ti(t,5,!1,t.toLowerCase(),null,!1,!1)});var Lb=/[\-:]([a-z])/g;function jb(t){return t[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(t){var e=t.replace(Lb,jb);kr[e]=new ti(e,1,!1,t,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(t){var e=t.replace(Lb,jb);kr[e]=new ti(e,1,!1,t,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(t){var e=t.replace(Lb,jb);kr[e]=new ti(e,1,!1,t,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(t){kr[t]=new ti(t,1,!1,t.toLowerCase(),null,!1,!1)});kr.xlinkHref=new ti("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(t){kr[t]=new ti(t,1,!1,t.toLowerCase(),null,!0,!0)});function Ob(t,e,n,r){var i=kr.hasOwnProperty(e)?kr[e]:null;(i!==null?i.type!==0:r||!(2<e.length)||e[0]!=="o"&&e[0]!=="O"||e[1]!=="n"&&e[1]!=="N")&&(i8(e,n,i,r)&&(n=null),r||i===null?n8(e)&&(n===null?t.removeAttribute(e):t.setAttribute(e,""+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:"":n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&&n===!0?"":""+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var co=e8.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Sm=Symbol.for("react.element"),bu=Symbol.for("react.portal"),xu=Symbol.for("react.fragment"),Ib=Symbol.for("react.strict_mode"),E2=Symbol.for("react.profiler"),K4=Symbol.for("react.provider"),Z4=Symbol.for("react.context"),Db=Symbol.for("react.forward_ref"),N2=Symbol.for("react.suspense"),A2=Symbol.for("react.suspense_list"),Mb=Symbol.for("react.memo"),Do=Symbol.for("react.lazy"),Y4=Symbol.for("react.offscreen"),k_=Symbol.iterator;function vh(t){return t===null||typeof t!="object"?null:(t=k_&&t[k_]||t["@@iterator"],typeof t=="function"?t:null)}var An=Object.assign,q1;function Oh(t){if(q1===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);q1=e&&e[1]||""}return` 34`+q1+t}var H1=!1;function W1(t,e){if(!t||H1)return"";H1=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(e,[])}catch(c){var r=c}Reflect.construct(t,[],e)}else{try{e.call()}catch(c){r=c}t.call(e.prototype)}else{try{throw Error()}catch(c){r=c}t()}}
vendor: 18,193 bytes, lines 34-37
34catch(c){if(c&&r&&typeof c.stack=="string"){for(var i=c.stack.split(` 35`),s=r.stack.split(` 36`),a=i.length-1,o=s.length-1;1<=a&&0<=o&&i[a]!==s[o];)o--;for(;1<=a&&0<=o;a--,o--)if(i[a]!==s[o]){if(a!==1||o!==1)do if(a--,o--,0>o||i[a]!==s[o]){var l=` 37`+i[a].replace(" at new "," at ");return t.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",t.displayName)),l}while(1<=a&&0<=o);break}}}finally{H1=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:"")?Oh(t):""}function s8(t){switch(t.tag){case 5:return Oh(t.type);case 16:return Oh("Lazy");case 13:return Oh("Suspense");case 19:return Oh("SuspenseList");case 0:case 2:case 15:return t=W1(t.type,!1),t;case 11:return t=W1(t.type.render,!1),t;case 1:return t=W1(t.type,!0),t;default:return""}}function C2(t){if(t==null)return null;if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case xu:return"Fragment";case bu:return"Portal";case E2:return"Profiler";case Ib:return"StrictMode";case N2:return"Suspense";case A2:return"SuspenseList"}if(typeof t=="object")switch(t.$$typeof){case Z4:return(t.displayName||"Context")+".Consumer";case K4:return(t._context.displayName||"Context")+".Provider";case Db:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Mb:return e=t.displayName||null,e!==null?e:C2(t.type)||"Memo";case Do:e=t._payload,t=t._init;try{return C2(t(e))}catch{}}return null}function a8(t){var e=t.type;switch(t.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return t=e.render,t=t.displayName||t.name||"",e.displayName||(t!==""?"ForwardRef("+t+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return C2(e);case 8:return e===Ib?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function dl(t){switch(typeof t){case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function J4(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function o8(t){var e=J4(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){r=""+a,s.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(a){r=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function km(t){t._valueTracker||(t._valueTracker=o8(t))}function X4(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r="";return t&&(r=J4(t)?t.checked?"true":"false":t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Yg(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function P2(t,e){var n=e.checked;return An({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function E_(t,e){var n=e.defaultValue==null?"":e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=dl(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Q4(t,e){e=e.checked,e!=null&&Ob(t,"checked",e,!1)}function T2(t,e){Q4(t,e);var n=dl(e.value),r=e.type;if(n!=null)r==="number"?(n===0&&t.value===""||t.value!=n)&&(t.value=""+n):t.value!==""+n&&(t.value=""+n);else if(r==="submit"||r==="reset"){t.removeAttribute("value");return}e.hasOwnProperty("value")?R2(t,e.type,n):e.hasOwnProperty("defaultValue")&&R2(t,e.type,dl(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(t.defaultChecked=!!e.defaultChecked)}function N_(t,e,n){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var r=e.type;if(!(r!=="submit"&&r!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==""&&(t.name=""),t.defaultChecked=!!t._wrapperState.initialChecked,n!==""&&(t.name=n)}function R2(t,e,n){(e!=="number"||Yg(t.ownerDocument)!==t)&&(n==null?t.defaultValue=""+t._wrapperState.initialValue:t.defaultValue!==""+n&&(t.defaultValue=""+n))}var Ih=Array.isArray;function Iu(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&r&&(t[n].defaultSelected=!0)}else{for(n=""+dl(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,r&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function L2(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(Ce(91));return An({},e,{value:void 0,defaultValue:void 0,children:""+t._wrapperState.initialValue})}function A_(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(Ce(92));if(Ih(n)){if(1<n.length)throw Error(Ce(93));n=n[0]}e=n}e==null&&(e=""),n=e}t._wrapperState={initialValue:dl(n)}}function eA(t,e){var n=dl(e.value),r=dl(e.defaultValue);n!=null&&(n=""+n,n!==t.value&&(t.value=n),e.defaultValue==null&&t.defaultValue!==n&&(t.defaultValue=n)),r!=null&&(t.defaultValue=""+r)}function C_(t){var e=t.textContent;e===t._wrapperState.initialValue&&e!==""&&e!==null&&(t.value=e)}function tA(t){switch(t){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function j2(t,e){return t==null||t==="http://www.w3.org/1999/xhtml"?tA(e):t==="http://www.w3.org/2000/svg"&&e==="foreignObject"?"http://www.w3.org/1999/xhtml":t}var Em,nA=function(t){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in t)t.innerHTML=e;else{for(Em=Em||document.createElement("div"),Em.innerHTML="<svg>"+e.valueOf().toString()+"</svg>",e=Em.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function bf(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Vh={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},l8=["Webkit","ms","Moz","O"];Object.keys(Vh).forEach(function(t){l8.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),Vh[e]=Vh[t]})});function rA(t,e,n){return e==null||typeof e=="boolean"||e===""?"":n||typeof e!="number"||e===0||Vh.hasOwnProperty(t)&&Vh[t]?(""+e).trim():e+"px"}function iA(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=rA(n,e[n],r);n==="float"&&(n="cssFloat"),r?t.setProperty(n,i):t[n]=i}}var c8=An({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function O2(t,e){if(e){if(c8[t]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Ce(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Ce(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Ce(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Ce(62))}}function I2(t,e){if(t.indexOf("-")===-1)return typeof e.is=="string";switch(t){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 D2=null;function Fb(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var M2=null,Du=null,Mu=null;function P_(t){if(t=Ep(t)){if(typeof M2!="function")throw Error(Ce(280));var e=t.stateNode;e&&(e=dv(e),M2(t.stateNode,t.type,e))}}function sA(t){Du?Mu?Mu.push(t):Mu=[t]:Du=t}function aA(){if(Du){var t=Du,e=Mu;if(Mu=Du=null,P_(t),e)for(t=0;t<e.length;t++)P_(e[t])}}function oA(t,e){return t(e)}function lA(){}var V1=!1;function cA(t,e,n){if(V1)return t(e,n);V1=!0;try{return oA(t,e,n)}finally{V1=!1,(Du!==null||Mu!==null)&&(lA(),aA())}}function xf(t,e){var n=t.stateNode;if(n===null)return null;var r=dv(n);if(r===null)return null;n=r[e];e:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(Ce(231,e,typeof n));return n}var F2=!1;if(to)try{var yh={};Object.defineProperty(yh,"passive",{get:function(){F2=!0}}),window.addEventListener("test",yh,yh),window.removeEventListener("test",yh,yh)}catch{F2=!1}function u8(t,e,n,r,i,s,a,o,l){var c=Array.prototype.slice.call(arguments,3);try{e.apply(n,c)}catch(u){this.onError(u)}}var Gh=!1,Jg=null,Xg=!1,z2=null,d8={onError:function(t){Gh=!0,Jg=t}};function h8(t,e,n,r,i,s,a,o,l){Gh=!1,Jg=null,u8.apply(d8,arguments)}function f8(t,e,n,r,i,s,a,o,l){if(h8.apply(this,arguments),Gh){if(Gh){var c=Jg;Gh=!1,Jg=null}else throw Error(Ce(198));Xg||(Xg=!0,z2=c)}}function Pc(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function uA(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function T_(t){if(Pc(t)!==t)throw Error(Ce(188))}function p8(t){var e=t.alternate;if(!e){if(e=Pc(t),e===null)throw Error(Ce(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return T_(i),t;if(s===r)return T_(i),e;s=s.sibling}throw Error(Ce(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,o=i.child;o;){if(o===n){a=!0,n=i,r=s;break}if(o===r){a=!0,r=i,n=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===n){a=!0,n=s,r=i;break}if(o===r){a=!0,r=s,n=i;break}o=o.sibling}if(!a)throw Error(Ce(189))}}if(n.alternate!==r)throw Error(Ce(190))}if(n.tag!==3)throw Error(Ce(188));return n.stateNode.current===n?t:e}function dA(t){return t=p8(t),t!==null?hA(t):null}function hA(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=hA(t);if(e!==null)return e;t=t.sibling}return null}var fA=Oi.unstable_scheduleCallback,R_=Oi.unstable_cancelCallback,m8=Oi.unstable_shouldYield,g8=Oi.unstable_requestPaint,$n=Oi.unstable_now,v8=Oi.unstable_getCurrentPriorityLevel,zb=Oi.unstable_ImmediatePriority,pA=Oi.unstable_UserBlockingPriority,Qg=Oi.unstable_NormalPriority,y8=Oi.unstable_LowPriority,mA=Oi.unstable_IdlePriority,ov=null,ia=null;function w8(t){if(ia&&typeof ia.onCommitFiberRoot=="function")try{ia.onCommitFiberRoot(ov,t,void 0,(t.current.flags&128)===128)}catch{}}var ks=Math.clz32?Math.clz32:_8,b8=Math.log,x8=Math.LN2;function _8(t){return t>>>=0,t===0?32:31-(b8(t)/x8|0)|0}var Nm=64,Am=4194304;function Dh(t){switch(t&-t){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: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&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function e0(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,a=n&268435455;if(a!==0){var o=a&~i;o!==0?r=Dh(o):(s&=a,s!==0&&(r=Dh(s)))}else a=n&~i,a!==0?r=Dh(a):s!==0&&(r=Dh(s));if(r===0)return 0;if(e!==0&&e!==r&&!(e&i)&&(i=r&-r,s=e&-e,i>=s||i===16&&(s&4194240)!==0))return e;if(r&4&&(r|=n&16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&=r;0<e;)n=31-ks(e),i=1<<n,r|=t[n],e&=~i;return r}function S8(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64: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 e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function k8(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0<s;){var a=31-ks(s),o=1<<a,l=i[a];l===-1?(!(o&n)||o&r)&&(i[a]=S8(o,e)):l<=e&&(t.expiredLanes|=o),s&=~o}}function $2(t){return t=t.pendingLanes&-1073741825,t!==0?t:t&1073741824?1073741824:0}function gA(){var t=Nm;return Nm<<=1,!(Nm&4194240)&&(Nm=64),t}function G1(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Sp(t,e,n){t.pendingLanes|=e,e!==536870912&&(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-ks(e),t[e]=n}function E8(t,e){var n=t.pendingLanes&~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&=e,t.mutableReadLanes&=e,t.entangledLanes&=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0<n;){var i=31-ks(n),s=1<<i;e[i]=0,r[i]=-1,t[i]=-1,n&=~s}}function $b(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-ks(n),i=1<<r;i&e|t[r]&e&&(t[r]|=e),n&=~i}}var sn=0;function vA(t){return t&=-t,1<t?4<t?t&268435455?16:536870912:4:1}var yA,Ub,wA,bA,xA,U2=!1,Cm=[],el=null,tl=null,nl=null,_f=new Map,Sf=new Map,Fo=[],N8="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 submit".split(" ");function L_(t,e){switch(t){case"focusin":case"focusout":el=null;break;case"dragenter":case"dragleave":tl=null;break;case"mouseover":case"mouseout":nl=null;break;case"pointerover":case"pointerout":_f.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Sf.delete(e.pointerId)}}function wh(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&&(e=Ep(e),e!==null&&Ub(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function A8(t,e,n,r,i){switch(e){case"focusin":return el=wh(el,t,e,n,r,i),!0;case"dragenter":return tl=wh(tl,t,e,n,r,i),!0;case"mouseover":return nl=wh(nl,t,e,n,r,i),!0;case"pointerover":var s=i.pointerId;return _f.set(s,wh(_f.get(s)||null,t,e,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Sf.set(s,wh(Sf.get(s)||null,t,e,n,r,i)),!0}return!1}function _A(t){var e=Xl(t.target);if(e!==null){var n=Pc(e);if(n!==null){if(e=n.tag,e===13){if(e=uA(n),e!==null){t.blockedOn=e,xA(t.priority,function(){wA(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Eg(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=B2(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);D2=r,n.target.dispatchEvent(r),D2=null}else return e=Ep(n),e!==null&&Ub(e),t.blockedOn=n,!1;e.shift()}return!0}function j_(t,e,n){Eg(t)&&n.delete(e)}function C8(){U2=!1,el!==null&&Eg(el)&&(el=null),tl!==null&&Eg(tl)&&(tl=null),nl!==null&&Eg(nl)&&(nl=null),_f.forEach(j_),Sf.forEach(j_)}function bh(t,e){t.blockedOn===e&&(t.blockedOn=null,U2||(U2=!0,Oi.unstable_scheduleCallback(Oi.unstable_NormalPriority,C8)))}function kf(t){function e(i){return bh(i,t)}if(0<Cm.length){bh(Cm[0],t);for(var n=1;n<Cm.length;n++){var r=Cm[n];r.blockedOn===t&&(r.blockedOn=null)}}for(el!==null&&bh(el,t),tl!==null&&bh(tl,t),nl!==null&&bh(nl,t),_f.forEach(e),Sf.forEach(e),n=0;n<Fo.length;n++)r=Fo[n],r.blockedOn===t&&(r.blockedOn=null);for(;0<Fo.length&&(n=Fo[0],n.blockedOn===null);)_A(n),n.blockedOn===null&&Fo.shift()}var Fu=co.ReactCurrentBatchConfig,t0=!0;function P8(t,e,n,r){var i=sn,s=Fu.transition;Fu.transition=null;try{sn=1,Bb(t,e,n,r)}finally{sn=i,Fu.transition=s}}function T8(t,e,n,r){var i=sn,s=Fu.transition;Fu.transition=null;try{sn=4,Bb(t,e,n,r)}finally{sn=i,Fu.transition=s}}function Bb(t,e,n,r){if(t0){var i=B2(t,e,n,r);if(i===null)ry(t,e,r,n0,n),L_(t,r);else if(A8(i,t,e,n,r))r.stopPropagation();else if(L_(t,r),e&4&&-1<N8.indexOf(t)){for(;i!==null;){var s=Ep(i);if(s!==null&&yA(s),s=B2(t,e,n,r),s===null&&ry(t,e,r,n0,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else ry(t,e,r,null,n)}}var n0=null;function B2(t,e,n,r){if(n0=null,t=Fb(r),t=Xl(t),t!==null)if(e=Pc(t),e===null)t=null;else if(n=e.tag,n===13){if(t=uA(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null);return n0=t,null}
vendor: 10,401 bytes, line 37
37function SA(t){switch(t){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(v8()){case zb:return 1;case pA:return 4;case Qg:case y8:return 16;case mA:return 536870912;default:return 16}default:return 16}}var Zo=null,qb=null,Ng=null;function kA(){if(Ng)return Ng;var t,e=qb,n=e.length,r,i="value"in Zo?Zo.value:Zo.textContent,s=i.length;for(t=0;t<n&&e[t]===i[t];t++);var a=n-t;for(r=1;r<=a&&e[n-r]===i[s-r];r++);return Ng=i.slice(t,1<r?1-r:void 0)}function Ag(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Pm(){return!0}function O_(){return!1}function Di(t){function e(n,r,i,s,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&&(n=t[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Pm:O_,this.isPropagationStopped=O_,this}return An(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Pm)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Pm)},persist:function(){},isPersistent:Pm}),e}var Pd={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hb=Di(Pd),kp=An({},Pd,{view:0,detail:0}),R8=Di(kp),K1,Z1,xh,lv=An({},kp,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wb,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==xh&&(xh&&t.type==="mousemove"?(K1=t.screenX-xh.screenX,Z1=t.screenY-xh.screenY):Z1=K1=0,xh=t),K1)},movementY:function(t){return"movementY"in t?t.movementY:Z1}}),I_=Di(lv),L8=An({},lv,{dataTransfer:0}),j8=Di(L8),O8=An({},kp,{relatedTarget:0}),Y1=Di(O8),I8=An({},Pd,{animationName:0,elapsedTime:0,pseudoElement:0}),D8=Di(I8),M8=An({},Pd,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),F8=Di(M8),z8=An({},Pd,{data:0}),D_=Di(z8),$8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},U8={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"},B8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function q8(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=B8[t])?!!e[t]:!1}function Wb(){return q8}var H8=An({},kp,{key:function(t){if(t.key){var e=$8[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Ag(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?U8[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wb,charCode:function(t){return t.type==="keypress"?Ag(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Ag(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),W8=Di(H8),V8=An({},lv,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),M_=Di(V8),G8=An({},kp,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wb}),K8=Di(G8),Z8=An({},Pd,{propertyName:0,elapsedTime:0,pseudoElement:0}),Y8=Di(Z8),J8=An({},lv,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),X8=Di(J8),Q8=[9,13,27,32],Vb=to&&"CompositionEvent"in window,Kh=null;to&&"documentMode"in document&&(Kh=document.documentMode);var eI=to&&"TextEvent"in window&&!Kh,EA=to&&(!Vb||Kh&&8<Kh&&11>=Kh),F_=" ",z_=!1;function NA(t,e){switch(t){case"keyup":return Q8.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function AA(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var _u=!1;function tI(t,e){switch(t){case"compositionend":return AA(e);case"keypress":return e.which!==32?null:(z_=!0,F_);case"textInput":return t=e.data,t===F_&&z_?null:t;default:return null}}function nI(t,e){if(_u)return t==="compositionend"||!Vb&&NA(t,e)?(t=kA(),Ng=qb=Zo=null,_u=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return EA&&e.locale!=="ko"?null:e.data;default:return null}}var rI={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 $_(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!rI[t.type]:e==="textarea"}function CA(t,e,n,r){sA(r),e=r0(e,"onChange"),0<e.length&&(n=new Hb("onChange","change",null,n,r),t.push({event:n,listeners:e}))}var Zh=null,Ef=null;function iI(t){zA(t,0)}function cv(t){var e=Eu(t);if(X4(e))return t}function sI(t,e){if(t==="change")return e}var PA=!1;if(to){var J1;if(to){var X1="oninput"in document;if(!X1){var U_=document.createElement("div");U_.setAttribute("oninput","return;"),X1=typeof U_.oninput=="function"}J1=X1}else J1=!1;PA=J1&&(!document.documentMode||9<document.documentMode)}function B_(){Zh&&(Zh.detachEvent("onpropertychange",TA),Ef=Zh=null)}function TA(t){if(t.propertyName==="value"&&cv(Ef)){var e=[];CA(e,Ef,t,Fb(t)),cA(iI,e)}}function aI(t,e,n){t==="focusin"?(B_(),Zh=e,Ef=n,Zh.attachEvent("onpropertychange",TA)):t==="focusout"&&B_()}function oI(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return cv(Ef)}function lI(t,e){if(t==="click")return cv(e)}function cI(t,e){if(t==="input"||t==="change")return cv(e)}function uI(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var As=typeof Object.is=="function"?Object.is:uI;function Nf(t,e){if(As(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!k2.call(e,i)||!As(t[i],e[i]))return!1}return!0}function q_(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function H_(t,e){var n=q_(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t<=e&&r>=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=q_(n)}}function RA(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?RA(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function LA(){for(var t=window,e=Yg();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Yg(t.document)}return e}function Gb(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function dI(t){var e=LA(),n=t.focusedElem,r=t.selectionRange;if(e!==n&&n&&n.ownerDocument&&RA(n.ownerDocument.documentElement,n)){if(r!==null&&Gb(n)){if(e=r.start,t=r.end,t===void 0&&(t=e),"selectionStart"in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&&e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&&s>r&&(i=r,r=s,s=i),i=H_(n,s);var a=H_(n,r);i&&a&&(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==a.node||t.focusOffset!==a.offset)&&(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s>r?(t.addRange(e),t.extend(a.node,a.offset)):(e.setEnd(a.node,a.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&&e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var hI=to&&"documentMode"in document&&11>=document.documentMode,Su=null,q2=null,Yh=null,H2=!1;function W_(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;H2||Su==null||Su!==Yg(r)||(r=Su,"selectionStart"in r&&Gb(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focu
vendor: 4,501 bytes, line 37
37sNode:r.focusNode,focusOffset:r.focusOffset}),Yh&&Nf(Yh,r)||(Yh=r,r=r0(q2,"onSelect"),0<r.length&&(e=new Hb("onSelect","select",null,e,n),t.push({event:e,listeners:r}),e.target=Su)))}function Tm(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var ku={animationend:Tm("Animation","AnimationEnd"),animationiteration:Tm("Animation","AnimationIteration"),animationstart:Tm("Animation","AnimationStart"),transitionend:Tm("Transition","TransitionEnd")},Q1={},jA={};to&&(jA=document.createElement("div").style,"AnimationEvent"in window||(delete ku.animationend.animation,delete ku.animationiteration.animation,delete ku.animationstart.animation),"TransitionEvent"in window||delete ku.transitionend.transition);function uv(t){if(Q1[t])return Q1[t];if(!ku[t])return t;var e=ku[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in jA)return Q1[t]=e[n];return t}var OA=uv("animationend"),IA=uv("animationiteration"),DA=uv("animationstart"),MA=uv("transitionend"),FA=new Map,V_="abort auxClick 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(" ");function _l(t,e){FA.set(t,e),Cc(e,[t])}for(var ey=0;ey<V_.length;ey++){var ty=V_[ey],fI=ty.toLowerCase(),pI=ty[0].toUpperCase()+ty.slice(1);_l(fI,"on"+pI)}_l(OA,"onAnimationEnd");_l(IA,"onAnimationIteration");_l(DA,"onAnimationStart");_l("dblclick","onDoubleClick");_l("focusin","onFocus");_l("focusout","onBlur");_l(MA,"onTransitionEnd");ud("onMouseEnter",["mouseout","mouseover"]);ud("onMouseLeave",["mouseout","mouseover"]);ud("onPointerEnter",["pointerout","pointerover"]);ud("onPointerLeave",["pointerout","pointerover"]);Cc("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Cc("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Cc("onBeforeInput",["compositionend","keypress","textInput","paste"]);Cc("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Cc("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Cc("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mh="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(" "),mI=new Set("cancel close invalid load scroll toggle".split(" ").concat(Mh));function G_(t,e,n){var r=t.type||"unknown-event";t.currentTarget=n,f8(r,e,void 0,t),t.currentTarget=null}function zA(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var a=r.length-1;0<=a;a--){var o=r[a],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;G_(i,o,c),s=l}else for(a=0;a<r.length;a++){if(o=r[a],l=o.instance,c=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;G_(i,o,c),s=l}}}if(Xg)throw t=z2,Xg=!1,z2=null,t}function gn(t,e){var n=e[Z2];n===void 0&&(n=e[Z2]=new Set);var r=t+"__bubble";n.has(r)||($A(e,t,2,!1),n.add(r))}function ny(t,e,n){var r=0;e&&(r|=4),$A(n,t,r,e)}var Rm="_reactListening"+Math.random().toString(36).slice(2);function Af(t){if(!t[Rm]){t[Rm]=!0,G4.forEach(function(n){n!=="selectionchange"&&(mI.has(n)||ny(n,!1,t),ny(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Rm]||(e[Rm]=!0,ny("selectionchange",!1,e))}}function $A(t,e,n,r){switch(SA(e)){case 1:var i=P8;break;case 4:i=T8;break;default:i=Bb}n=i.bind(null,e,n,t),i=void 0,!F2||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function ry(t,e,n,r,i){var s=r;if(!(e&1)&&!(e&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;
vendor: 5,317 bytes, lines 37-38
37if(o===i||o.nodeType===8&&o.parentNode===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&(l=a.stateNode.containerInfo,l===i||l.nodeType===8&&l.parentNode===i))return;a=a.return}for(;o!==null;){if(a=Xl(o),a===null)return;if(l=a.tag,l===5||l===6){r=s=a;continue e}o=o.parentNode}}r=r.return}cA(function(){var c=s,u=Fb(n),d=[];e:{var f=FA.get(t);if(f!==void 0){var h=Hb,y=t;switch(t){case"keypress":if(Ag(n)===0)break e;case"keydown":case"keyup":h=W8;break;case"focusin":y="focus",h=Y1;break;case"focusout":y="blur",h=Y1;break;case"beforeblur":case"afterblur":h=Y1;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=I_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=j8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=K8;break;case OA:case IA:case DA:h=D8;break;case MA:h=Y8;break;case"scroll":h=R8;break;case"wheel":h=X8;break;case"copy":case"cut":case"paste":h=F8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=M_}var v=(e&4)!==0,_=!v&&t==="scroll",w=v?f!==null?f+"Capture":null:f;v=[];for(var x=c,k;x!==null;){k=x;var N=k.stateNode;if(k.tag===5&&N!==null&&(k=N,w!==null&&(N=xf(x,w),N!=null&&v.push(Cf(x,N,k)))),_)break;x=x.return}0<v.length&&(f=new h(f,y,null,n,u),d.push({event:f,listeners:v}))}}if(!(e&7)){e:{if(f=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",f&&n!==D2&&(y=n.relatedTarget||n.fromElement)&&(Xl(y)||y[no]))break e;if((h||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=c,y=y?Xl(y):null,y!==null&&(_=Pc(y),y!==_||y.tag!==5&&y.tag!==6)&&(y=null)):(h=null,y=c),h!==y)){if(v=I_,N="onMouseLeave",w="onMouseEnter",x="mouse",(t==="pointerout"||t==="pointerover")&&(v=M_,N="onPointerLeave",w="onPointerEnter",x="pointer"),_=h==null?f:Eu(h),k=y==null?f:Eu(y),f=new v(N,x+"leave",h,n,u),f.target=_,f.relatedTarget=k,N=null,Xl(u)===c&&(v=new v(w,x+"enter",y,n,u),v.target=k,v.relatedTarget=_,N=v),_=N,h&&y)t:{for(v=h,w=y,x=0,k=v;k;k=Xc(k))x++;for(k=0,N=w;N;N=Xc(N))k++;for(;0<x-k;)v=Xc(v),x--;for(;0<k-x;)w=Xc(w),k--;for(;x--;){if(v===w||w!==null&&v===w.alternate)break t;v=Xc(v),w=Xc(w)}v=null}else v=null;h!==null&&K_(d,f,h,v,!1),y!==null&&_!==null&&K_(d,_,y,v,!0)}}e:{if(f=c?Eu(c):window,h=f.nodeName&&f.nodeName.toLowerCase(),h==="select"||h==="input"&&f.type==="file")var R=sI;else if($_(f))if(PA)R=cI;else{R=oI;var H=aI}else(h=f.nodeName)&&h.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(R=lI);if(R&&(R=R(t,c))){CA(d,R,n,u);break e}H&&H(t,f,c),t==="focusout"&&(H=f._wrapperState)&&H.controlled&&f.type==="number"&&R2(f,"number",f.value)}switch(H=c?Eu(c):window,t){case"focusin":($_(H)||H.contentEditable==="true")&&(Su=H,q2=c,Yh=null);break;case"focusout":Yh=q2=Su=null;break;case"mousedown":H2=!0;break;case"contextmenu":case"mouseup":case"dragend":H2=!1,W_(d,n,u);break;case"selectionchange":if(hI)break;case"keydown":case"keyup":W_(d,n,u)}var F;if(Vb)e:{switch(t){case"compositionstart":var M="onCompositionStart";break e;case"compositionend":M="onCompositionEnd";break e;case"compositionupdate":M="onCompositionUpdate";break e}M=void 0}else _u?NA(t,n)&&(M="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(M="onCompositionStart");M&&(EA&&n.locale!=="ko"&&(_u||M!=="onCompositionStart"?M==="onCompositionEnd"&&_u&&(F=kA()):(Zo=u,qb="value"in Zo?Zo.value:Zo.textContent,_u=!0)),H=r0(c,M),0<H.length&&(M=new D_(M,t,null,n,u),d.push({event:M,listeners:H}),F?M.data=F:(F=AA(n),F!==null&&(M.data=F)))),(F=eI?tI(t,n):nI(t,n))&&(c=r0(c,"onBeforeInput"),0<c.length&&(u=new D_("onBeforeInput","beforeinput",null,n,u),d.push({event:u,listeners:c}),u.data=F))}zA(d,e)})}function Cf(t,e,n){return{instance:t,listener:e,currentTarget:n}}function r0(t,e){for(var n=e+"Capture",r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&&s!==null&&(i=s,s=xf(t,n),s!=null&&r.unshift(Cf(t,s,i)),s=xf(t,e),s!=null&&r.push(Cf(t,s,i))),t=t.return}return r}function Xc(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5);return t||null}function K_(t,e,n,r,i){for(var s=e._reactName,a=[];n!==null&&n!==r;){var o=n,l=o.alternate,c=o.stateNode;if(l!==null&&l===r)break;o.tag===5&&c!==null&&(o=c,i?(l=xf(n,s),l!=null&&a.unshift(Cf(n,l,o))):i||(l=xf(n,s),l!=null&&a.push(Cf(n,l,o)))),n=n.return}a.length!==0&&t.push({event:e,listeners:a})}var gI=/\r\n?/g,vI=/\u0000|\uFFFD/g;function Z_(t){return(typeof t=="string"?t:""+t).replace(gI,` 38`).replace(vI,"")}function Lm(t,e,n){if(e=Z_(e),Z_(t)!==e&&n)throw Error(Ce(425))}function i0(){}var W2=null,V2=null;function G2(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var K2=typeof setTimeout=="function"?setTimeout:void 0,yI=typeof clearTimeout=="function"?clearTimeout:void 0,Y_=typeof Promise=="function"?Promise:void 0,wI=typeof queueMicrotask=="function"?queueMicrotask:typeof Y_<"u"?function(t){return Y_.resolve(null).then(t).cat
vendor: 4,832 bytes, line 38
38ch(bI)}:K2;function bI(t){setTimeout(function(){throw t})}function iy(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(r===0){t.removeChild(i),kf(e);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=i}while(n);kf(e)}function rl(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?")break;if(e==="/$")return null}}return t}function J_(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}var Td=Math.random().toString(36).slice(2),ea="__reactFiber$"+Td,Pf="__reactProps$"+Td,no="__reactContainer$"+Td,Z2="__reactEvents$"+Td,xI="__reactListeners$"+Td,_I="__reactHandles$"+Td;function Xl(t){var e=t[ea];if(e)return e;for(var n=t.parentNode;n;){if(e=n[no]||n[ea]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=J_(t);t!==null;){if(n=t[ea])return n;t=J_(t)}return e}t=n,n=t.parentNode}return null}function Ep(t){return t=t[ea]||t[no],!t||t.tag!==5&&t.tag!==6&&t.tag!==13&&t.tag!==3?null:t}function Eu(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(Ce(33))}function dv(t){return t[Pf]||null}var Y2=[],Nu=-1;function Sl(t){return{current:t}}function yn(t){0>Nu||(t.current=Y2[Nu],Y2[Nu]=null,Nu--)}function fn(t,e){Nu++,Y2[Nu]=t.current,t.current=e}var hl={},zr=Sl(hl),ci=Sl(!1),fc=hl;function dd(t,e){var n=t.type.contextTypes;if(!n)return hl;var r=t.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function ui(t){return t=t.childContextTypes,t!=null}function s0(){yn(ci),yn(zr)}function X_(t,e,n){if(zr.current!==hl)throw Error(Ce(168));fn(zr,e),fn(ci,n)}function UA(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(Ce(108,a8(t)||"Unknown",i));return An({},n,r)}function a0(t){return t=(t=t.stateNode)&&t.__reactInternalMemoizedMergedChildContext||hl,fc=zr.current,fn(zr,t),fn(ci,ci.current),!0}function Q_(t,e,n){var r=t.stateNode;if(!r)throw Error(Ce(169));n?(t=UA(t,e,fc),r.__reactInternalMemoizedMergedChildContext=t,yn(ci),yn(zr),fn(zr,t)):yn(ci),fn(ci,n)}var Ga=null,hv=!1,sy=!1;function BA(t){Ga===null?Ga=[t]:Ga.push(t)}function SI(t){hv=!0,BA(t)}function kl(){if(!sy&&Ga!==null){sy=!0;var t=0,e=sn;try{var n=Ga;for(sn=1;t<n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}Ga=null,hv=!1}catch(i){throw Ga!==null&&(Ga=Ga.slice(t+1)),fA(zb,kl),i}finally{sn=e,sy=!1}}return null}var Au=[],Cu=0,o0=null,l0=0,Zi=[],Yi=0,pc=null,Ya=1,Ja="";function Gl(t,e){Au[Cu++]=l0,Au[Cu++]=o0,o0=t,l0=e}function qA(t,e,n){Zi[Yi++]=Ya,Zi[Yi++]=Ja,Zi[Yi++]=pc,pc=t;var r=Ya;t=Ja;var i=32-ks(r)-1;r&=~(1<<i),n+=1;var s=32-ks(e)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Ya=1<<32-ks(e)+i|n<<i|r,Ja=s+t}else Ya=1<<s|n<<i|r,Ja=t}function Kb(t){t.return!==null&&(Gl(t,1),qA(t,1,0))}function Zb(t){for(;t===o0;)o0=Au[--Cu],Au[Cu]=null,l0=Au[--Cu],Au[Cu]=null;for(;t===pc;)pc=Zi[--Yi],Zi[Yi]=null,Ja=Zi[--Yi],Zi[Yi]=null,Ya=Zi[--Yi],Zi[Yi]=null}var Ri=null,Ci=null,xn=!1,xs=null;function HA(t,e){var n=Xi(5,null,null,0);n.elementType="DELETED",n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function eS(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,Ri=t,Ci=rl(e.firstChild),!0):!1;case 6:return e=t.pendingProps===""||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,Ri=t,Ci=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=pc!==null?{id:Ya,overflow:Ja}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Xi(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,Ri=t,Ci=null,!0):!1;default:return!1}}function J2(t){return(t.mode&1)!==0&&(t.flags&128)===0}function X2(t){if(xn){var e=Ci;if(e){var n=e;if(!eS(t,e)){if(J2(t))throw Error(Ce(418));e=rl(n.nextSibling);var r=Ri;e&&eS(t,e)?HA(r,n):(t.flags=t.flags&-4097|2,xn=!1,Ri=t)}}else{if(J2(t))throw Error(Ce(418));t.flags=t.flags&-4097|2,xn=!1,Ri=t}}}function tS(t){for(t=t.return;t!==null&&t.tag!==5&&t.tag!==3&&t.tag!==13;)t=t.return;Ri=t}function jm(t){if(t!==Ri)return!1;if(!xn)return tS(t),xn=!0,!1;var e;if((e=t.tag!==3)&&!(e=t.tag!==5)&&(e=t.type,e=e!=="head"&&e!=="body"&&!G2(t.type,t.memoizedProps)),e&&(e=Ci)){if(J2(t))throw WA(),Error(Ce(418));for(;e;)HA(t,e),e=rl(e.nextSibling)}if(tS(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(Ce(317));e:{for(t=t.nextSibling,e=0;t;
vendor: 25,615 bytes, lines 38-40
38){if(t.nodeType===8){var n=t.data;if(n==="/$"){if(e===0){Ci=rl(t.nextSibling);break e}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++}t=t.nextSibling}Ci=null}}else Ci=Ri?rl(t.stateNode.nextSibling):null;return!0}function WA(){for(var t=Ci;t;)t=rl(t.nextSibling)}function hd(){Ci=Ri=null,xn=!1}function Yb(t){xs===null?xs=[t]:xs.push(t)}var kI=co.ReactCurrentBatchConfig;function _h(t,e,n){if(t=n.ref,t!==null&&typeof t!="function"&&typeof t!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(Ce(309));var r=n.stateNode}if(!r)throw Error(Ce(147,t));var i=r,s=""+t;return e!==null&&e.ref!==null&&typeof e.ref=="function"&&e.ref._stringRef===s?e.ref:(e=function(a){var o=i.refs;a===null?delete o[s]:o[s]=a},e._stringRef=s,e)}if(typeof t!="string")throw Error(Ce(284));if(!n._owner)throw Error(Ce(290,t))}return t}function Om(t,e){throw t=Object.prototype.toString.call(e),Error(Ce(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function nS(t){var e=t._init;return e(t._payload)}function VA(t){function e(w,x){if(t){var k=w.deletions;k===null?(w.deletions=[x],w.flags|=16):k.push(x)}}function n(w,x){if(!t)return null;for(;x!==null;)e(w,x),x=x.sibling;return null}function r(w,x){for(w=new Map;x!==null;)x.key!==null?w.set(x.key,x):w.set(x.index,x),x=x.sibling;return w}function i(w,x){return w=ol(w,x),w.index=0,w.sibling=null,w}function s(w,x,k){return w.index=k,t?(k=w.alternate,k!==null?(k=k.index,k<x?(w.flags|=2,x):k):(w.flags|=2,x)):(w.flags|=1048576,x)}function a(w){return t&&w.alternate===null&&(w.flags|=2),w}function o(w,x,k,N){return x===null||x.tag!==6?(x=hy(k,w.mode,N),x.return=w,x):(x=i(x,k),x.return=w,x)}function l(w,x,k,N){var R=k.type;return R===xu?u(w,x,k.props.children,N,k.key):x!==null&&(x.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Do&&nS(R)===x.type)?(N=i(x,k.props),N.ref=_h(w,x,k),N.return=w,N):(N=Og(k.type,k.key,k.props,null,w.mode,N),N.ref=_h(w,x,k),N.return=w,N)}function c(w,x,k,N){return x===null||x.tag!==4||x.stateNode.containerInfo!==k.containerInfo||x.stateNode.implementation!==k.implementation?(x=fy(k,w.mode,N),x.return=w,x):(x=i(x,k.children||[]),x.return=w,x)}function u(w,x,k,N,R){return x===null||x.tag!==7?(x=uc(k,w.mode,N,R),x.return=w,x):(x=i(x,k),x.return=w,x)}function d(w,x,k){if(typeof x=="string"&&x!==""||typeof x=="number")return x=hy(""+x,w.mode,k),x.return=w,x;if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Sm:return k=Og(x.type,x.key,x.props,null,w.mode,k),k.ref=_h(w,null,x),k.return=w,k;case bu:return x=fy(x,w.mode,k),x.return=w,x;case Do:var N=x._init;return d(w,N(x._payload),k)}if(Ih(x)||vh(x))return x=uc(x,w.mode,k,null),x.return=w,x;Om(w,x)}return null}function f(w,x,k,N){var R=x!==null?x.key:null;if(typeof k=="string"&&k!==""||typeof k=="number")return R!==null?null:o(w,x,""+k,N);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Sm:return k.key===R?l(w,x,k,N):null;case bu:return k.key===R?c(w,x,k,N):null;case Do:return R=k._init,f(w,x,R(k._payload),N)}if(Ih(k)||vh(k))return R!==null?null:u(w,x,k,N,null);Om(w,k)}return null}function h(w,x,k,N,R){if(typeof N=="string"&&N!==""||typeof N=="number")return w=w.get(k)||null,o(x,w,""+N,R);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case Sm:return w=w.get(N.key===null?k:N.key)||null,l(x,w,N,R);case bu:return w=w.get(N.key===null?k:N.key)||null,c(x,w,N,R);case Do:var H=N._init;return h(w,x,k,H(N._payload),R)}if(Ih(N)||vh(N))return w=w.get(k)||null,u(x,w,N,R,null);Om(x,N)}return null}function y(w,x,k,N){for(var R=null,H=null,F=x,M=x=0,I=null;F!==null&&M<k.length;M++){F.index>M?(I=F,F=null):I=F.sibling;var G=f(w,F,k[M],N);if(G===null){F===null&&(F=I);break}t&&F&&G.alternate===null&&e(w,F),x=s(G,x,M),H===null?R=G:H.sibling=G,H=G,F=I}if(M===k.length)return n(w,F),xn&&Gl(w,M),R;if(F===null){for(;M<k.length;M++)F=d(w,k[M],N),F!==null&&(x=s(F,x,M),H===null?R=F:H.sibling=F,H=F);return xn&&Gl(w,M),R}for(F=r(w,F);M<k.length;M++)I=h(F,w,M,k[M],N),I!==null&&(t&&I.alternate!==null&&F.delete(I.key===null?M:I.key),x=s(I,x,M),H===null?R=I:H.sibling=I,H=I);return t&&F.forEach(function(L){return e(w,L)}),xn&&Gl(w,M),R}function v(w,x,k,N){var R=vh(k);if(typeof R!="function")throw Error(Ce(150));if(k=R.call(k),k==null)throw Error(Ce(151));for(var H=R=null,F=x,M=x=0,I=null,G=k.next();F!==null&&!G.done;M++,G=k.next()){F.index>M?(I=F,F=null):I=F.sibling;var L=f(w,F,G.value,N);if(L===null){F===null&&(F=I);break}t&&F&&L.alternate===null&&e(w,F),x=s(L,x,M),H===null?R=L:H.sibling=L,H=L,F=I}if(G.done)return n(w,F),xn&&Gl(w,M),R;if(F===null){for(;!G.done;M++,G=k.next())G=d(w,G.value,N),G!==null&&(x=s(G,x,M),H===null?R=G:H.sibling=G,H=G);return xn&&Gl(w,M),R}for(F=r(w,F);!G.done;M++,G=k.next())G=h(F,w,M,G.value,N),G!==null&&(t&&G.alternate!==null&&F.delete(G.key===null?M:G.key),x=s(G,x,M),H===null?R=G:H.sibling=G,H=G);return t&&F.forEach(function(j){return e(w,j)}),xn&&Gl(w,M),R}function _(w,x,k,N){if(typeof k=="object"&&k!==null&&k.type===xu&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case Sm:e:{for(var R=k.key,H=x;H!==null;){if(H.key===R){if(R=k.type,R===xu){if(H.tag===7){n(w,H.sibling),x=i(H,k.props.children),x.return=w,w=x;break e}}else if(H.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===Do&&nS(R)===H.type){n(w,H.sibling),x=i(H,k.props),x.ref=_h(w,H,k),x.return=w,w=x;break e}n(w,H);break}else e(w,H);H=H.sibling}k.type===xu?(x=uc(k.props.children,w.mode,N,k.key),x.return=w,w=x):(N=Og(k.type,k.key,k.props,null,w.mode,N),N.ref=_h(w,x,k),N.return=w,w=N)}return a(w);case bu:e:{for(H=k.key;x!==null;){if(x.key===H)if(x.tag===4&&x.stateNode.containerInfo===k.containerInfo&&x.stateNode.implementation===k.implementation){n(w,x.sibling),x=i(x,k.children||[]),x.return=w,w=x;break e}else{n(w,x);break}else e(w,x);x=x.sibling}x=fy(k,w.mode,N),x.return=w,w=x}return a(w);case Do:return H=k._init,_(w,x,H(k._payload),N)}if(Ih(k))return y(w,x,k,N);if(vh(k))return v(w,x,k,N);Om(w,k)}return typeof k=="string"&&k!==""||typeof k=="number"?(k=""+k,x!==null&&x.tag===6?(n(w,x.sibling),x=i(x,k),x.return=w,w=x):(n(w,x),x=hy(k,w.mode,N),x.return=w,w=x),a(w)):n(w,x)}return _}var fd=VA(!0),GA=VA(!1),c0=Sl(null),u0=null,Pu=null,Jb=null;function Xb(){Jb=Pu=u0=null}function Qb(t){var e=c0.current;yn(c0),t._currentValue=e}function Q2(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,r!==null&&(r.childLanes|=e)):r!==null&&(r.childLanes&e)!==e&&(r.childLanes|=e),t===n)break;t=t.return}}function zu(t,e){u0=t,Jb=Pu=null,t=t.dependencies,t!==null&&t.firstContext!==null&&(t.lanes&e&&(oi=!0),t.firstContext=null)}function ts(t){var e=t._currentValue;if(Jb!==t)if(t={context:t,memoizedValue:e,next:null},Pu===null){if(u0===null)throw Error(Ce(308));Pu=t,u0.dependencies={lanes:0,firstContext:t}}else Pu=Pu.next=t;return e}var Ql=null;function ex(t){Ql===null?Ql=[t]:Ql.push(t)}function KA(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,ex(e)):(n.next=i.next,i.next=n),e.interleaved=n,ro(t,r)}function ro(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&&(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&&(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Mo=!1;function tx(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ZA(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function Qa(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function il(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,Vt&2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,ro(t,n)}return i=r.interleaved,i===null?(e.next=e,ex(r)):(e.next=i.next,i.next=e),r.interleaved=e,ro(t,n)}function Cg(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194240)!==0)){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,$b(t,n)}}function rS(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function d0(t,e,n,r){var i=t.updateQueue;Mo=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,c=l.next;l.next=null,a===null?s=c:a.next=c,a=l;var u=t.alternate;u!==null&&(u=u.updateQueue,o=u.lastBaseUpdate,o!==a&&(o===null?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l))}if(s!==null){var d=i.baseState;a=0,u=c=l=null,o=s;do{var f=o.lane,h=o.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=t,v=o;switch(f=e,h=n,v.tag){case 1:if(y=v.payload,typeof y=="function"){d=y.call(h,d,f);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=v.payload,f=typeof y=="function"?y.call(h,d,f):y,f==null)break e;d=An({},d,f);break e;case 2:Mo=!0}}o.callback!==null&&o.lane!==0&&(t.flags|=64,f=i.effects,f===null?i.effects=[o]:f.push(o))}else h={eventTime:h,lane:f,tag:o.tag,payload:o.payload,callback:o.callback,next:null},u===null?(c=u=h,l=d):u=u.next=h,a|=f;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;f=o,o=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);if(u===null&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,e=i.shared.interleaved,e!==null){i=e;do a|=i.lane,i=i.next;while(i!==e)}else s===null&&(i.shared.lanes=0);gc|=a,t.lanes=a,t.memoizedState=d}}function iS(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e<t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!="function")throw Error(Ce(191,i));i.call(r)}}}var Np={},sa=Sl(Np),Tf=Sl(Np),Rf=Sl(Np);function ec(t){if(t===Np)throw Error(Ce(174));return t}function nx(t,e){switch(fn(Rf,e),fn(Tf,t),fn(sa,Np),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:j2(null,"");break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=j2(e,t)}yn(sa),fn(sa,e)}function pd(){yn(sa),yn(Tf),yn(Rf)}function YA(t){ec(Rf.current);var e=ec(sa.current),n=j2(e,t.type);e!==n&&(fn(Tf,t),fn(sa,n))}function rx(t){Tf.current===t&&(yn(sa),yn(Tf))}var kn=Sl(0);function h0(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var ay=[];function ix(){for(var t=0;t<ay.length;t++)ay[t]._workInProgressVersionPrimary=null;ay.length=0}var Pg=co.ReactCurrentDispatcher,oy=co.ReactCurrentBatchConfig,mc=0,Nn=null,sr=null,dr=null,f0=!1,Jh=!1,Lf=0,EI=0;function Pr(){throw Error(Ce(321))}function sx(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!As(t[n],e[n]))return!1;return!0}function ax(t,e,n,r,i,s){if(mc=s,Nn=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,Pg.current=t===null||t.memoizedState===null?PI:TI,t=n(r,i),Jh){s=0;do{if(Jh=!1,Lf=0,25<=s)throw Error(Ce(301));s+=1,dr=sr=null,e.updateQueue=null,Pg.current=RI,t=n(r,i)}while(Jh)}if(Pg.current=p0,e=sr!==null&&sr.next!==null,mc=0,dr=sr=Nn=null,f0=!1,e)throw Error(Ce(300));return t}function ox(){var t=Lf!==0;return Lf=0,t}function Gs(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dr===null?Nn.memoizedState=dr=t:dr=dr.next=t,dr}function ns(){if(sr===null){var t=Nn.alternate;t=t!==null?t.memoizedState:null}else t=sr.next;var e=dr===null?Nn.memoizedState:dr.next;if(e!==null)dr=e,sr=t;else{if(t===null)throw Error(Ce(310));sr=t,t={memoizedState:sr.memoizedState,baseState:sr.baseState,baseQueue:sr.baseQueue,queue:sr.queue,next:null},dr===null?Nn.memoizedState=dr=t:dr=dr.next=t}return dr}function jf(t,e){return typeof e=="function"?e(t):e}function ly(t){var e=ns(),n=e.queue;if(n===null)throw Error(Ce(311));n.lastRenderedReducer=t;var r=sr,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var o=a=null,l=null,c=s;do{var u=c.lane;if((mc&u)===u)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:t(r,c.action);else{var d={lane:u,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(o=l=d,a=r):l=l.next=d,Nn.lanes|=u,gc|=u}c=c.next}while(c!==null&&c!==s);l===null?a=r:l.next=o,As(r,e.memoizedState)||(oi=!0),e.memoizedState=r,e.baseState=a,e.baseQueue=l,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,Nn.lanes|=s,gc|=s,i=i.next;while(i!==t)}else i===null&&(n.lanes=0);return[e.memoizedState,n.dispatch]}function cy(t){var e=ns(),n=e.queue;if(n===null)throw Error(Ce(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do s=t(s,a.action),a=a.next;while(a!==i);As(s,e.memoizedState)||(oi=!0),e.memoizedState=s,e.baseQueue===null&&(e.baseState=s),n.lastRenderedState=s}return[s,r]}function JA(){}function XA(t,e){var n=Nn,r=ns(),i=e(),s=!As(r.memoizedState,i);if(s&&(r.memoizedState=i,oi=!0),r=r.queue,lx(t3.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||dr!==null&&dr.memoizedState.tag&1){if(n.flags|=2048,Of(9,e3.bind(null,n,r,i,e),void 0,null),fr===null)throw Error(Ce(349));mc&30||QA(n,e,i)}return i}function QA(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=Nn.updateQueue,e===null?(e={lastEffect:null,stores:null},Nn.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function e3(t,e,n,r){e.value=n,e.getSnapshot=r,n3(e)&&r3(t)}function t3(t,e,n){return n(function(){n3(e)&&r3(t)})}function n3(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!As(t,n)}catch{return!0}}function r3(t){var e=ro(t,1);e!==null&&Es(e,t,1,-1)}function sS(t){var e=Gs();return typeof t=="function"&&(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:jf,lastRenderedState:t},e.queue=t,t=t.dispatch=CI.bind(null,Nn,t),[e.memoizedState,t]}function Of(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=Nn.updateQueue,e===null?(e={lastEffect:null,stores:null},Nn.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function i3(){return ns().memoizedState}function Tg(t,e,n,r){var i=Gs();Nn.flags|=t,i.memoizedState=Of(1|e,n,void 0,r===void 0?null:r)}function fv(t,e,n,r){var i=ns();r=r===void 0?null:r;var s=void 0;if(sr!==null){var a=sr.memoizedState;if(s=a.destroy,r!==null&&sx(r,a.deps)){i.memoizedState=Of(e,n,s,r);return}}Nn.flags|=t,i.memoizedState=Of(1|e,n,s,r)}function aS(t,e){return Tg(8390656,8,t,e)}function lx(t,e){return fv(2048,8,t,e)}function s3(t,e){return fv(4,2,t,e)}function a3(t,e){return fv(4,4,t,e)}function o3(t,e){if(typeof e=="function")return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function l3(t,e,n){return n=n!=null?n.concat([t]):null,fv(4,4,o3.bind(null,e,t),n)}function cx(){}function c3(t,e){var n=ns();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&sx(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function u3(t,e){var n=ns();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&&e!==null&&sx(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function d3(t,e,n){return mc&21?(As(n,e)||(n=gA(),Nn.lanes|=n,gc|=n,t.baseState=!0),e):(t.baseState&&(t.baseState=!1,oi=!0),t.memoizedState=n)}function NI(t,e){var n=sn;sn=n!==0&&4>n?n:4,t(!0);var r=oy.transition;oy.transition={};try{t(!1),e()}finally{sn=n,oy.transition=r}}function h3(){return ns().memoizedState}function AI(t,e,n){var r=al(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},f3(t))p3(e,n);else if(n=KA(t,e,n,r),n!==null){var i=Jr();Es(n,t,r,i),m3(n,e,r)}}function CI(t,e,n){var r=al(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(f3(t))p3(e,i);else{var s=t.alternate;if(t.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var a=e.lastRenderedState,o=s(a,n);if(i.hasEagerState=!0,i.eagerState=o,As(o,a)){var l=e.interleaved;l===null?(i.next=i,ex(e)):(i.next=l.next,l.next=i),e.interleaved=i;return}}catch{}finally{}n=KA(t,e,i,r),n!==null&&(i=Jr(),Es(n,t,r,i),m3(n,e,r))}}function f3(t){var e=t.alternate;return t===Nn||e!==null&&e===Nn}function p3(t,e){Jh=f0=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function m3(t,e,n){if(n&4194240){var r=e.lanes;r&=t.pendingLanes,n|=r,e.lanes=n,$b(t,n)}}var p0={readContext:ts,useCallback:Pr,useContext:Pr,useEffect:Pr,useImperativeHandle:Pr,useInsertionEffect:Pr,useLayoutEffect:Pr,useMemo:Pr,useReducer:Pr,useRef:Pr,useState:Pr,useDebugValue:Pr,useDeferredValue:Pr,useTransition:Pr,useMutableSource:Pr,useSyncExternalStore:Pr,useId:Pr,unstable_isNewReconciler:!1},PI={readContext:ts,useCallback:function(t,e){return Gs().memoizedState=[t,e===void 0?null:e],t},useContext:ts,useEffect:aS,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,Tg(4194308,4,o3.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Tg(4194308,4,t,e)},useInsertionEffect:function(t,e){return Tg(4,2,t,e)},useMemo:function(t,e){var n=Gs();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Gs();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=AI.bind(null,Nn,t),[r.memoizedState,t]},useRef:function(t){var e=Gs();return t={current:t},e.memoizedState=t},useState:sS,useDebugValue:cx,useDeferredValue:function(t){return Gs().memoizedState=t},useTransition:function(){var t=sS(!1),e=t[0];return t=NI.bind(null,t[1]),Gs().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=Nn,i=Gs();if(xn){if(n===void 0)throw Error(Ce(407));n=n()}else{if(n=e(),fr===null)throw Error(Ce(349));mc&30||QA(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,aS(t3.bind(null,r,s,t),[t]),r.flags|=2048,Of(9,e3.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Gs(),e=fr.identifierPrefix;if(xn){var n=Ja,r=Ya;n=(r&~(1<<32-ks(r)-1)).toString(32)+n,e=":"+e+"R"+n,n=Lf++,0<n&&(e+="H"+n.toString(32)),e+=":"}else n=EI++,e=":"+e+"r"+n.toString(32)+":";return t.memoizedState=e},unstable_isNewReconciler:!1},TI={readContext:ts,useCallback:c3,useContext:ts,useEffect:lx,useImperativeHandle:l3,useInsertionEffect:s3,useLayoutEffect:a3,useMemo:u3,useReducer:ly,useRef:i3,useState:function(){return ly(jf)},useDebugValue:cx,useDeferredValue:function(t){var e=ns();return d3(e,sr.memoizedState,t)},useTransition:function(){var t=ly(jf)[0],e=ns().memoizedState;return[t,e]},useMutableSource:JA,useSyncExternalStore:XA,useId:h3,unstable_isNewReconciler:!1},RI={readContext:ts,useCallback:c3,useContext:ts,useEffect:lx,useImperativeHandle:l3,useInsertionEffect:s3,useLayoutEffect:a3,useMemo:u3,useReducer:cy,useRef:i3,useState:function(){return cy(jf)},useDebugValue:cx,useDeferredValue:function(t){var e=ns();return sr===null?e.memoizedState=t:d3(e,sr.memoizedState,t)},useTransition:function(){var t=cy(jf)[0],e=ns().memoizedState;return[t,e]},useMutableSource:JA,useSyncExternalStore:XA,useId:h3,unstable_isNewReconciler:!1};function gs(t,e){if(t&&t.defaultProps){e=An({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&&(e[n]=t[n]);return e}return e}function ew(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:An({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var pv={isMounted:function(t){return(t=t._reactInternals)?Pc(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=Jr(),i=al(t),s=Qa(r,i);s.payload=e,n!=null&&(s.callback=n),e=il(t,s,i),e!==null&&(Es(e,t,i,r),Cg(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=Jr(),i=al(t),s=Qa(r,i);s.tag=1,s.payload=e,n!=null&&(s.callback=n),e=il(t,s,i),e!==null&&(Es(e,t,i,r),Cg(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=Jr(),r=al(t),i=Qa(n,r);i.tag=2,e!=null&&(i.callback=e),e=il(t,i,r),e!==null&&(Es(e,t,r,n),Cg(e,t,r))}};function oS(t,e,n,r,i,s,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,s,a):e.prototype&&e.prototype.isPureReactComponent?!Nf(n,r)||!Nf(i,s):!0}function g3(t,e,n){var r=!1,i=hl,s=e.contextType;return typeof s=="object"&&s!==null?s=ts(s):(i=ui(e)?fc:zr.current,r=e.contextTypes,s=(r=r!=null)?dd(t,i):hl),e=new e(n,s),t.memoizedState=e.state!==null&&e.state!==void 0?e.state:null,e.updater=pv,t.stateNode=e,e._reactInternals=t,r&&(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function lS(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&&pv.enqueueReplaceState(e,e.state,null)}function tw(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},tx(t);var s=e.contextType;typeof s=="object"&&s!==null?i.context=ts(s):(s=ui(e)?fc:zr.current,i.context=dd(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s=="function"&&(ew(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(e=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),e!==i.state&&pv.enqueueReplaceState(i,i.state,null),d0(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308)}function md(t,e){try{var n="",r=e;do n+=s8(r),r=r.return;while(r);var i=n}catch(s){i=` 39Error generating stack: `+s.message+` 40`+s.stack}return{value:t,source:e,stack:i,digest:null}}function uy(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function nw(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var LI=typeof WeakMap=="function"?WeakMap:Map;function v3(t,e,n){n=Qa(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){g0||(g0=!0,hw=r),nw(t,e)},n}function y3(t,e,n){n=Qa(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r=="function"){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){nw(t,e)}}var s=t.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(n.callback=function(){nw(t,e),typeof r!="function"&&(sl===null?sl=new Set([this]):sl.add(this));var a=e.stack;this.componentDidCatch(e.value,{componentStack:a!==null?a:""})}),n}function cS(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new LI;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&&(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=VI.bind(null,t,e,n),e.then(t,t))}function uS(t){do{var e;if((e=t.tag===13)&&(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function dS(t,e,n,r,i){return t.mode&1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(e=Qa(-1,1),e.tag=2,il(n,e,1))),n.lanes|=1),t)}var jI=co.ReactCurrentOwner,oi=!1;function Kr(t,e,n,r){e.child=t===null?GA(e,null,n,r):fd(e,t.child,n,r)}function hS(t,e,n,r,i){n=n.render;var s=e.ref;return zu(e,i),r=ax(t,e,n,r,s,i),n=ox(),t!==null&&!oi?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,io(t,e,i)):(xn&&n&&Kb(e),e.flags|=1,Kr(t,e,r,i),e.child)}function fS(t,e,n,r,i){if(t===null){var s=n.type;return typeof s=="function"&&!vx(s)&&s.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(e.tag=15,e.type=s,w3(t,e,s,r,i)):(t=Og(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:Nf,n(a,r)&&t.ref===e.ref)return io(t,e,i)}return e.flags|=1,t=ol(s,r),t.ref=e.ref,t.return=e,e.child=t}function w3(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(Nf(s,r)&&t.ref===e.ref)if(oi=!1,e.pendingProps=r=s,(t.lanes&i)!==0)t.flags&131072&&(oi=!0);else return e.lanes=t.lanes,io(t,e,i)}return rw(t,e,n,r,i)}function b3(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},fn(Ru,Ei),Ei|=n;else{if(!(n&1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,fn(Ru,Ei),Ei|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,fn(Ru,Ei),Ei|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,fn(Ru,Ei),Ei|=r;return Kr(t,e,i,n),e.child}function x3(t,e){var n=e.ref;(t===null&&n!==null||t!==null&&t.ref!==n)&&(e.flags|=512,e.flags|=2097152)}
vendor: 8,024 bytes, line 40
40function rw(t,e,n,r,i){var s=ui(n)?fc:zr.current;return s=dd(e,s),zu(e,i),n=ax(t,e,n,r,s,i),r=ox(),t!==null&&!oi?(e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~i,io(t,e,i)):(xn&&r&&Kb(e),e.flags|=1,Kr(t,e,n,i),e.child)}function pS(t,e,n,r,i){if(ui(n)){var s=!0;a0(e)}else s=!1;if(zu(e,i),e.stateNode===null)Rg(t,e),g3(e,n,r),tw(e,n,r,i),r=!0;else if(t===null){var a=e.stateNode,o=e.memoizedProps;a.props=o;var l=a.context,c=n.contextType;typeof c=="object"&&c!==null?c=ts(c):(c=ui(n)?fc:zr.current,c=dd(e,c));var u=n.getDerivedStateFromProps,d=typeof u=="function"||typeof a.getSnapshotBeforeUpdate=="function";d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==r||l!==c)&&lS(e,a,r,c),Mo=!1;var f=e.memoizedState;a.state=f,d0(e,r,a,i),l=e.memoizedState,o!==r||f!==l||ci.current||Mo?(typeof u=="function"&&(ew(e,n,u,r),l=e.memoizedState),(o=Mo||oS(e,n,o,r,f,l,c))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(e.flags|=4194308)):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=l),a.props=r,a.state=l,a.context=c,r=o):(typeof a.componentDidMount=="function"&&(e.flags|=4194308),r=!1)}else{a=e.stateNode,ZA(t,e),o=e.memoizedProps,c=e.type===e.elementType?o:gs(e.type,o),a.props=c,d=e.pendingProps,f=a.context,l=n.contextType,typeof l=="object"&&l!==null?l=ts(l):(l=ui(n)?fc:zr.current,l=dd(e,l));var h=n.getDerivedStateFromProps;(u=typeof h=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o!==d||f!==l)&&lS(e,a,r,l),Mo=!1,f=e.memoizedState,a.state=f,d0(e,r,a,i);var y=e.memoizedState;o!==d||f!==y||ci.current||Mo?(typeof h=="function"&&(ew(e,n,h,r),y=e.memoizedState),(c=Mo||oS(e,n,c,r,f,y,l)||!1)?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,y,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,y,l)),typeof a.componentDidUpdate=="function"&&(e.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=y),a.props=r,a.state=y,a.context=l,r=c):(typeof a.componentDidUpdate!="function"||o===t.memoizedProps&&f===t.memoizedState||(e.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||o===t.memoizedProps&&f===t.memoizedState||(e.flags|=1024),r=!1)}return iw(t,e,n,r,s,i)}function iw(t,e,n,r,i,s){x3(t,e);var a=(e.flags&128)!==0;if(!r&&!a)return i&&Q_(e,n,!1),io(t,e,s);r=e.stateNode,jI.current=e;var o=a&&typeof n.getDerivedStateFromError!="function"?null:r.render();return e.flags|=1,t!==null&&a?(e.child=fd(e,t.child,null,s),e.child=fd(e,null,o,s)):Kr(t,e,o,s),e.memoizedState=r.state,i&&Q_(e,n,!0),e.child}function _3(t){var e=t.stateNode;e.pendingContext?X_(t,e.pendingContext,e.pendingContext!==e.context):e.context&&X_(t,e.context,!1),nx(t,e.containerInfo)}function mS(t,e,n,r,i){return hd(),Yb(i),e.flags|=256,Kr(t,e,n,r),e.child}var sw={dehydrated:null,treeContext:null,retryLane:0};function aw(t){return{baseLanes:t,cachePool:null,transitions:null}}function S3(t,e,n){var r=e.pendingProps,i=kn.current,s=!1,a=(e.flags&128)!==0,o;if((o=a)||(o=t!==null&&t.memoizedState===null?!1:(i&2)!==0),o?(s=!0,e.flags&=-129):(t===null||t.memoizedState!==null)&&(i|=1),fn(kn,i&1),t===null)return X2(e),t=e.memoizedState,t!==null&&(t=t.dehydrated,t!==null)?(e.mode&1?t.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(a=r.children,t=r.fallback,s?(r=e.mode,s=e.child,a={mode:"hidden",children:a},!(r&1)&&s!==null?(s.childLanes=0,s.pendingProps=a):s=vv(a,r,0,null),t=uc(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=aw(n),e.memoizedState=sw,t):ux(e,a));if(i=t.memoizedState,i!==null&&(o=i.dehydrated,o!==null))return OI(t,e,a,r,o,i,n);if(s){s=r.fallback,a=e.mode,i=t.child,o=i.sibling;var l={mode:"hidden",children:r.children};return!(a&1)&&e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=l,e.deletions=null):(r=ol(i,l),r.subtreeFlags=i.subtreeFlags&14680064),o!==null?s=ol(o,s):(s=uc(s,a,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,a=t.child.memoizedState,a=a===null?aw(n):{baseLanes:a.baseLanes|n,cachePool:null,transitions:a.transitions},s.memoizedState=a,s.childLanes=t.childLanes&~n,e.memoizedState=sw,r}return s=t.child,t=s.sibling,r=ol(s,{mode:"visible",children:r.children}),!(e.mode&1)&&(r.lanes=n),r.return=e,r.sibling=null,t!==null&&(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function ux(t,e){return e=vv({mode:"visible",children:e},t.mode,0,null),e.return=t,t.child=e}function Im(t,e,n,r){return r!==null&&Yb(r),fd(e,t.child,null,n),t=ux(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function OI(t,e,n,r,i,s,a){if(n)return e.flags&256?(e.flags&=-257,r=uy(Error(Ce(422))),Im(t,e,a,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=vv({mode:"visible",children:r.children},i,0,null),s=uc(s,i,a,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&1&&fd(e,t.child,null,a),e.child.memoizedState=aw(a),e.memoizedState=sw,s);if(!(e.mode&1))return Im(t,e,a,null);if(i.data==="$!"){if(r=i.nextSibling&&i.nextSibling.dataset,r)var o=r.dgst;return r=o,s=Error(Ce(419)),r=uy(s,r,void 0),Im(t,e,a,r)}if(o=(a&t.childLanes)!==0,oi||o){if(r=fr,r!==null){switch(a&-a){case 4:i=2;break;case 16:i=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&(r.suspendedLanes|a)?0:i,i!==0&&i!==s.retryLane&&(s.retryLane=i,ro(t,i),Es(r,t,i,-1))}return gx(),r=uy(Error(Ce(421))),Im(t,e,a,r)}return i.data==="$?"?(e.flags|=128,e.child=t.child,e=GI.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,Ci=rl(i.nextSibling),Ri=e,xn=!0,xs=null,t!==null&&(Zi[Yi++]=Ya,Zi[Yi++]=Ja,Zi[Yi++]=pc,Ya=t.id,Ja=t.overflow,pc=e),e=ux(e,r.children),e.flags|=4096,e)}function gS(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&&(r.lanes|=e),Q2(t.return,e,n)}function dy(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function k3(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Kr(t,e,r.children,n),r=kn.current,r&2)r=r&1|2,e.flags|=128;else{if(t!==null&&t.flags&128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&gS(t,n,e);else if(t.tag===19)gS(t,n,e);else if(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;t=t.return}t.sibling.return=t.return,t=t.sibling}r&=1}if(fn(kn,r),!(e.mode&1))e.memoizedState=null;else switch(i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&h0(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),dy(e,!1,i,n,s);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&h0(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}dy(e,!0,n,null,s);break;case"together":dy(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function Rg(t,e){!(e.mode&1)&&t!==null&&(t.alternate=null,e.alternate=null,e.flags|=2)}
vendor: 4,905 bytes, line 40
40function io(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),gc|=e.lanes,!(n&e.childLanes))return null;if(t!==null&&e.child!==t.child)throw Error(Ce(153));if(e.child!==null){for(t=e.child,n=ol(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=ol(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function II(t,e,n){switch(e.tag){case 3:_3(e),hd();break;case 5:YA(e);break;case 1:ui(e.type)&&a0(e);break;case 4:nx(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;fn(c0,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(fn(kn,kn.current&1),e.flags|=128,null):n&e.child.childLanes?S3(t,e,n):(fn(kn,kn.current&1),t=io(t,e,n),t!==null?t.sibling:null);fn(kn,kn.current&1);break;case 19:if(r=(n&e.childLanes)!==0,t.flags&128){if(r)return k3(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),fn(kn,kn.current),r)break;return null;case 22:case 23:return e.lanes=0,b3(t,e,n)}return io(t,e,n)}var E3,ow,N3,A3;E3=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ow=function(){};N3=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,ec(sa.current);var s=null;switch(n){case"input":i=P2(t,i),r=P2(t,r),s=[];break;case"select":i=An({},i,{value:void 0}),r=An({},r,{value:void 0}),s=[];break;case"textarea":i=L2(t,i),r=L2(t,r),s=[];break;default:typeof i.onClick!="function"&&typeof r.onClick=="function"&&(t.onclick=i0)}O2(n,r);var a;n=null;for(c in i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&i[c]!=null)if(c==="style"){var o=i[c];for(a in o)o.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(wf.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var l=r[c];if(o=i!=null?i[c]:void 0,r.hasOwnProperty(c)&&l!==o&&(l!=null||o!=null))if(c==="style")if(o){for(a in o)!o.hasOwnProperty(a)||l&&l.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in l)l.hasOwnProperty(a)&&o[a]!==l[a]&&(n||(n={}),n[a]=l[a])}else n||(s||(s=[]),s.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,o=o?o.__html:void 0,l!=null&&o!==l&&(s=s||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(s=s||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(wf.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&gn("scroll",t),s||o===l||(s=[])):(s=s||[]).push(c,l))}n&&(s=s||[]).push("style",n);var c=s;(e.updateQueue=c)&&(e.flags|=4)}};A3=function(t,e,n,r){n!==r&&(e.flags|=4)};function Sh(t,e){if(!xn)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Tr(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function DI(t,e,n){var r=e.pendingProps;switch(Zb(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tr(e),null;case 1:return ui(e.type)&&s0(),Tr(e),null;case 3:return r=e.stateNode,pd(),yn(ci),yn(zr),ix(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&&(jm(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,xs!==null&&(mw(xs),xs=null))),ow(t,e),Tr(e),null;case 5:rx(e);var i=ec(Rf.current);if(n=e.type,t!==null&&e.stateNode!=null)N3(t,e,n,r,i),t.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(Ce(166));return Tr(e),null}if(t=ec(sa.current),jm(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[ea]=e,r[Pf]=s,t=(e.mode&1)!==0,n){case"dialog":gn("cancel",r),gn("close",r);break;case"iframe":case"object":case"embed":gn("load",r);break;case"video":case"audio":for(i=0;i<Mh.length;i++)gn(Mh[i],r);break;case"source":gn("error",r);break;case"img":case"image":case"link":gn("error",r),gn("load",r);break;case"details":gn("toggle",r);break;case"input":E_(r,s),gn("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},gn("invalid",r);break;case"textarea":A_(r,s),gn("invalid",r)}O2(n,s),i=null;for(var a in s)if(s.hasOwnProperty(a)){var o=s[a];
vendor: 30,215 bytes, line 40
40a==="children"?typeof o=="string"?r.textContent!==o&&(s.suppressHydrationWarning!==!0&&Lm(r.textContent,o,t),i=["children",o]):typeof o=="number"&&r.textContent!==""+o&&(s.suppressHydrationWarning!==!0&&Lm(r.textContent,o,t),i=["children",""+o]):wf.hasOwnProperty(a)&&o!=null&&a==="onScroll"&&gn("scroll",r)}switch(n){case"input":km(r),N_(r,s,!0);break;case"textarea":km(r),C_(r);break;case"select":case"option":break;default:typeof s.onClick=="function"&&(r.onclick=i0)}r=i,e.updateQueue=r,r!==null&&(e.flags|=4)}else{a=i.nodeType===9?i:i.ownerDocument,t==="http://www.w3.org/1999/xhtml"&&(t=tA(n)),t==="http://www.w3.org/1999/xhtml"?n==="script"?(t=a.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild)):typeof r.is=="string"?t=a.createElement(n,{is:r.is}):(t=a.createElement(n),n==="select"&&(a=t,r.multiple?a.multiple=!0:r.size&&(a.size=r.size))):t=a.createElementNS(t,n),t[ea]=e,t[Pf]=r,E3(t,e,!1,!1),e.stateNode=t;e:{switch(a=I2(n,r),n){case"dialog":gn("cancel",t),gn("close",t),i=r;break;case"iframe":case"object":case"embed":gn("load",t),i=r;break;case"video":case"audio":for(i=0;i<Mh.length;i++)gn(Mh[i],t);i=r;break;case"source":gn("error",t),i=r;break;case"img":case"image":case"link":gn("error",t),gn("load",t),i=r;break;case"details":gn("toggle",t),i=r;break;case"input":E_(t,r),i=P2(t,r),gn("invalid",t);break;case"option":i=r;break;case"select":t._wrapperState={wasMultiple:!!r.multiple},i=An({},r,{value:void 0}),gn("invalid",t);break;case"textarea":A_(t,r),i=L2(t,r),gn("invalid",t);break;default:i=r}O2(n,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var l=o[s];s==="style"?iA(t,l):s==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&nA(t,l)):s==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&bf(t,l):typeof l=="number"&&bf(t,""+l):s!=="suppressContentEditableWarning"&&s!=="suppressHydrationWarning"&&s!=="autoFocus"&&(wf.hasOwnProperty(s)?l!=null&&s==="onScroll"&&gn("scroll",t):l!=null&&Ob(t,s,l,a))}switch(n){case"input":km(t),N_(t,r,!1);break;case"textarea":km(t),C_(t);break;case"option":r.value!=null&&t.setAttribute("value",""+dl(r.value));break;case"select":t.multiple=!!r.multiple,s=r.value,s!=null?Iu(t,!!r.multiple,s,!1):r.defaultValue!=null&&Iu(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick=="function"&&(t.onclick=i0)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(e.flags|=4)}e.ref!==null&&(e.flags|=512,e.flags|=2097152)}return Tr(e),null;case 6:if(t&&e.stateNode!=null)A3(t,e,t.memoizedProps,r);else{if(typeof r!="string"&&e.stateNode===null)throw Error(Ce(166));if(n=ec(Rf.current),ec(sa.current),jm(e)){if(r=e.stateNode,n=e.memoizedProps,r[ea]=e,(s=r.nodeValue!==n)&&(t=Ri,t!==null))switch(t.tag){case 3:Lm(r.nodeValue,n,(t.mode&1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&&Lm(r.nodeValue,n,(t.mode&1)!==0)}s&&(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[ea]=e,e.stateNode=r}return Tr(e),null;case 13:if(yn(kn),r=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(xn&&Ci!==null&&e.mode&1&&!(e.flags&128))WA(),hd(),e.flags|=98560,s=!1;else if(s=jm(e),r!==null&&r.dehydrated!==null){if(t===null){if(!s)throw Error(Ce(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(Ce(317));s[ea]=e}else hd(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;Tr(e),s=!1}else xs!==null&&(mw(xs),xs=null),s=!0;if(!s)return e.flags&65536?e:null}return e.flags&128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&&t.memoizedState!==null)&&r&&(e.child.flags|=8192,e.mode&1&&(t===null||kn.current&1?ar===0&&(ar=3):gx())),e.updateQueue!==null&&(e.flags|=4),Tr(e),null);case 4:return pd(),ow(t,e),t===null&&Af(e.stateNode.containerInfo),Tr(e),null;case 10:return Qb(e.type._context),Tr(e),null;case 17:return ui(e.type)&&s0(),Tr(e),null;case 19:if(yn(kn),s=e.memoizedState,s===null)return Tr(e),null;if(r=(e.flags&128)!==0,a=s.rendering,a===null)if(r)Sh(s,!1);else{if(ar!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(a=h0(t),a!==null){for(e.flags|=128,Sh(s,!1),r=a.updateQueue,r!==null&&(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&=14680066,a=s.alternate,a===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=a.childLanes,s.lanes=a.lanes,s.child=a.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=a.memoizedProps,s.memoizedState=a.memoizedState,s.updateQueue=a.updateQueue,s.type=a.type,t=a.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return fn(kn,kn.current&1|2),e.child}t=t.sibling}s.tail!==null&&$n()>gd&&(e.flags|=128,r=!0,Sh(s,!1),e.lanes=4194304)}else{if(!r)if(t=h0(a),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&&(e.updateQueue=n,e.flags|=4),Sh(s,!0),s.tail===null&&s.tailMode==="hidden"&&!a.alternate&&!xn)return Tr(e),null}else 2*$n()-s.renderingStartTime>gd&&n!==1073741824&&(e.flags|=128,r=!0,Sh(s,!1),e.lanes=4194304);s.isBackwards?(a.sibling=e.child,e.child=a):(n=s.last,n!==null?n.sibling=a:e.child=a,s.last=a)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=$n(),e.sibling=null,n=kn.current,fn(kn,r?n&1|2:n&1),e):(Tr(e),null);case 22:case 23:return mx(),r=e.memoizedState!==null,t!==null&&t.memoizedState!==null!==r&&(e.flags|=8192),r&&e.mode&1?Ei&1073741824&&(Tr(e),e.subtreeFlags&6&&(e.flags|=8192)):Tr(e),null;case 24:return null;case 25:return null}throw Error(Ce(156,e.tag))}function MI(t,e){switch(Zb(e),e.tag){case 1:return ui(e.type)&&s0(),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return pd(),yn(ci),yn(zr),ix(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 5:return rx(e),null;case 13:if(yn(kn),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(Ce(340));hd()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return yn(kn),null;case 4:return pd(),null;case 10:return Qb(e.type._context),null;case 22:case 23:return mx(),null;case 24:return null;default:return null}}var Dm=!1,Mr=!1,FI=typeof WeakSet=="function"?WeakSet:Set,Be=null;function Tu(t,e){var n=t.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){On(t,e,r)}else n.current=null}function lw(t,e,n){try{n()}catch(r){On(t,e,r)}}var vS=!1;function zI(t,e){if(W2=t0,t=LA(),Gb(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,o=-1,l=-1,c=0,u=0,d=t,f=null;t:for(;;){for(var h;d!==n||i!==0&&d.nodeType!==3||(o=a+i),d!==s||r!==0&&d.nodeType!==3||(l=a+r),d.nodeType===3&&(a+=d.nodeValue.length),(h=d.firstChild)!==null;)f=d,d=h;for(;;){if(d===t)break t;if(f===n&&++c===i&&(o=a),f===s&&++u===r&&(l=a),(h=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=h}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(V2={focusedElem:t,selectionRange:n},t0=!1,Be=e;Be!==null;)if(e=Be,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Be=t;else for(;Be!==null;){e=Be;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var v=y.memoizedProps,_=y.memoizedState,w=e.stateNode,x=w.getSnapshotBeforeUpdate(e.elementType===e.type?v:gs(e.type,v),_);w.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var k=e.stateNode.containerInfo;k.nodeType===1?k.textContent="":k.nodeType===9&&k.documentElement&&k.removeChild(k.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ce(163))}}catch(N){On(e,e.return,N)}if(t=e.sibling,t!==null){t.return=e.return,Be=t;break}Be=e.return}return y=vS,vS=!1,y}function Xh(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&&lw(e,n,s)}i=i.next}while(i!==r)}}function mv(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function cw(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e=="function"?e(t):e.current=t}}function C3(t){var e=t.alternate;e!==null&&(t.alternate=null,C3(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&(delete e[ea],delete e[Pf],delete e[Z2],delete e[xI],delete e[_I])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function P3(t){return t.tag===5||t.tag===3||t.tag===4}function yS(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||P3(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function uw(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=i0));else if(r!==4&&(t=t.child,t!==null))for(uw(t,e,n),t=t.sibling;t!==null;)uw(t,e,n),t=t.sibling}function dw(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&&(t=t.child,t!==null))for(dw(t,e,n),t=t.sibling;t!==null;)dw(t,e,n),t=t.sibling}var br=null,bs=!1;function Po(t,e,n){for(n=n.child;n!==null;)T3(t,e,n),n=n.sibling}function T3(t,e,n){if(ia&&typeof ia.onCommitFiberUnmount=="function")try{ia.onCommitFiberUnmount(ov,n)}catch{}switch(n.tag){case 5:Mr||Tu(n,e);case 6:var r=br,i=bs;br=null,Po(t,e,n),br=r,bs=i,br!==null&&(bs?(t=br,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):br.removeChild(n.stateNode));break;case 18:br!==null&&(bs?(t=br,n=n.stateNode,t.nodeType===8?iy(t.parentNode,n):t.nodeType===1&&iy(t,n),kf(t)):iy(br,n.stateNode));break;case 4:r=br,i=bs,br=n.stateNode.containerInfo,bs=!0,Po(t,e,n),br=r,bs=i;break;case 0:case 11:case 14:case 15:if(!Mr&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,a=s.destroy;s=s.tag,a!==void 0&&(s&2||s&4)&&lw(n,e,a),i=i.next}while(i!==r)}Po(t,e,n);break;case 1:if(!Mr&&(Tu(n,e),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){On(n,e,o)}Po(t,e,n);break;case 21:Po(t,e,n);break;case 22:n.mode&1?(Mr=(r=Mr)||n.memoizedState!==null,Po(t,e,n),Mr=r):Po(t,e,n);break;default:Po(t,e,n)}}function wS(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&&(n=t.stateNode=new FI),e.forEach(function(r){var i=KI.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function hs(t,e){var n=e.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];try{var s=t,a=e,o=a;e:for(;o!==null;){switch(o.tag){case 5:br=o.stateNode,bs=!1;break e;case 3:br=o.stateNode.containerInfo,bs=!0;break e;case 4:br=o.stateNode.containerInfo,bs=!0;break e}o=o.return}if(br===null)throw Error(Ce(160));T3(s,a,i),br=null,bs=!1;var l=i.alternate;l!==null&&(l.return=null),i.return=null}catch(c){On(i,e,c)}}if(e.subtreeFlags&12854)for(e=e.child;e!==null;)R3(e,t),e=e.sibling}function R3(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(hs(e,t),Hs(t),r&4){try{Xh(3,t,t.return),mv(3,t)}catch(v){On(t,t.return,v)}try{Xh(5,t,t.return)}catch(v){On(t,t.return,v)}}break;case 1:hs(e,t),Hs(t),r&512&&n!==null&&Tu(n,n.return);break;case 5:if(hs(e,t),Hs(t),r&512&&n!==null&&Tu(n,n.return),t.flags&32){var i=t.stateNode;try{bf(i,"")}catch(v){On(t,t.return,v)}}if(r&4&&(i=t.stateNode,i!=null)){var s=t.memoizedProps,a=n!==null?n.memoizedProps:s,o=t.type,l=t.updateQueue;if(t.updateQueue=null,l!==null)try{o==="input"&&s.type==="radio"&&s.name!=null&&Q4(i,s),I2(o,a);var c=I2(o,s);for(a=0;a<l.length;a+=2){var u=l[a],d=l[a+1];u==="style"?iA(i,d):u==="dangerouslySetInnerHTML"?nA(i,d):u==="children"?bf(i,d):Ob(i,u,d,c)}switch(o){case"input":T2(i,s);break;case"textarea":eA(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?Iu(i,!!s.multiple,h,!1):f!==!!s.multiple&&(s.defaultValue!=null?Iu(i,!!s.multiple,s.defaultValue,!0):Iu(i,!!s.multiple,s.multiple?[]:"",!1))}i[Pf]=s}catch(v){On(t,t.return,v)}}break;case 6:if(hs(e,t),Hs(t),r&4){if(t.stateNode===null)throw Error(Ce(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(v){On(t,t.return,v)}}break;case 3:if(hs(e,t),Hs(t),r&4&&n!==null&&n.memoizedState.isDehydrated)try{kf(e.containerInfo)}catch(v){On(t,t.return,v)}break;case 4:hs(e,t),Hs(t);break;case 13:hs(e,t),Hs(t),i=t.child,i.flags&8192&&(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&&i.alternate.memoizedState!==null||(fx=$n())),r&4&&wS(t);break;case 22:if(u=n!==null&&n.memoizedState!==null,t.mode&1?(Mr=(c=Mr)||u,hs(e,t),Mr=c):hs(e,t),Hs(t),r&8192){if(c=t.memoizedState!==null,(t.stateNode.isHidden=c)&&!u&&t.mode&1)for(Be=t,u=t.child;u!==null;){for(d=Be=u;Be!==null;){switch(f=Be,h=f.child,f.tag){case 0:case 11:case 14:case 15:Xh(4,f,f.return);break;case 1:Tu(f,f.return);var y=f.stateNode;if(typeof y.componentWillUnmount=="function"){r=f,n=f.return;try{e=r,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(v){On(r,n,v)}}break;case 5:Tu(f,f.return);break;case 22:if(f.memoizedState!==null){xS(d);continue}}h!==null?(h.return=f,Be=h):xS(d)}u=u.sibling}e:for(u=null,d=t;;){if(d.tag===5){if(u===null){u=d;try{i=d.stateNode,c?(s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"):(o=d.stateNode,l=d.memoizedProps.style,a=l!=null&&l.hasOwnProperty("display")?l.display:null,o.style.display=rA("display",a))}catch(v){On(t,t.return,v)}}}else if(d.tag===6){if(u===null)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(v){On(t,t.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===t)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;u===d&&(u=null),d=d.return}u===d&&(u=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:hs(e,t),Hs(t),r&4&&wS(t);break;case 21:break;default:hs(e,t),Hs(t)}}function Hs(t){var e=t.flags;if(e&2){try{e:{for(var n=t.return;n!==null;){if(P3(n)){var r=n;break e}n=n.return}throw Error(Ce(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&32&&(bf(i,""),r.flags&=-33);var s=yS(t);dw(t,s,i);break;case 3:case 4:var a=r.stateNode.containerInfo,o=yS(t);uw(t,o,a);break;default:throw Error(Ce(161))}}catch(l){On(t,t.return,l)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function $I(t,e,n){Be=t,L3(t)}function L3(t,e,n){for(var r=(t.mode&1)!==0;Be!==null;){var i=Be,s=i.child;if(i.tag===22&&r){var a=i.memoizedState!==null||Dm;if(!a){var o=i.alternate,l=o!==null&&o.memoizedState!==null||Mr;o=Dm;var c=Mr;if(Dm=a,(Mr=l)&&!c)for(Be=i;Be!==null;)a=Be,l=a.child,a.tag===22&&a.memoizedState!==null?_S(i):l!==null?(l.return=a,Be=l):_S(i);for(;s!==null;)Be=s,L3(s),s=s.sibling;Be=i,Dm=o,Mr=c}bS(t)}else i.subtreeFlags&8772&&s!==null?(s.return=i,Be=s):bS(t)}}function bS(t){for(;Be!==null;){var e=Be;if(e.flags&8772){var n=e.alternate;try{if(e.flags&8772)switch(e.tag){case 0:case 11:case 15:Mr||mv(5,e);break;case 1:var r=e.stateNode;if(e.flags&4&&!Mr)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:gs(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&&iS(e,s,r);break;case 3:var a=e.updateQueue;if(a!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}iS(e,a,n)}break;case 5:var o=e.stateNode;if(n===null&&e.flags&4){n=o;var l=e.memoizedProps;switch(e.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var c=e.alternate;if(c!==null){var u=c.memoizedState;if(u!==null){var d=u.dehydrated;d!==null&&kf(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ce(163))}Mr||e.flags&512&&cw(e)}catch(f){On(e,e.return,f)}}if(e===t){Be=null;break}if(n=e.sibling,n!==null){n.return=e.return,Be=n;break}Be=e.return}}function xS(t){for(;Be!==null;){var e=Be;if(e===t){Be=null;break}var n=e.sibling;if(n!==null){n.return=e.return,Be=n;break}Be=e.return}}function _S(t){for(;Be!==null;){var e=Be;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{mv(4,e)}catch(l){On(e,n,l)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount=="function"){var i=e.return;try{r.componentDidMount()}catch(l){On(e,i,l)}}var s=e.return;try{cw(e)}catch(l){On(e,s,l)}break;case 5:var a=e.return;try{cw(e)}catch(l){On(e,a,l)}}}catch(l){On(e,e.return,l)}if(e===t){Be=null;break}var o=e.sibling;if(o!==null){o.return=e.return,Be=o;break}Be=e.return}}var UI=Math.ceil,m0=co.ReactCurrentDispatcher,dx=co.ReactCurrentOwner,Qi=co.ReactCurrentBatchConfig,Vt=0,fr=null,Yn=null,Sr=0,Ei=0,Ru=Sl(0),ar=0,If=null,gc=0,gv=0,hx=0,Qh=null,ai=null,fx=0,gd=1/0,qa=null,g0=!1,hw=null,sl=null,Mm=!1,Yo=null,v0=0,ef=0,fw=null,Lg=-1,jg=0;function Jr(){return Vt&6?$n():Lg!==-1?Lg:Lg=$n()}function al(t){return t.mode&1?Vt&2&&Sr!==0?Sr&-Sr:kI.transition!==null?(jg===0&&(jg=gA()),jg):(t=sn,t!==0||(t=window.event,t=t===void 0?16:SA(t.type)),t):1}function Es(t,e,n,r){if(50<ef)throw ef=0,fw=null,Error(Ce(185));Sp(t,n,r),(!(Vt&2)||t!==fr)&&(t===fr&&(!(Vt&2)&&(gv|=n),ar===4&&zo(t,Sr)),di(t,r),n===1&&Vt===0&&!(e.mode&1)&&(gd=$n()+500,hv&&kl()))}function di(t,e){var n=t.callbackNode;k8(t,e);var r=e0(t,t===fr?Sr:0);if(r===0)n!==null&&R_(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&-r,t.callbackPriority!==e){if(n!=null&&R_(n),e===1)t.tag===0?SI(SS.bind(null,t)):BA(SS.bind(null,t)),wI(function(){!(Vt&6)&&kl()}),n=null;else{switch(vA(r)){case 1:n=zb;break;case 4:n=pA;break;case 16:n=Qg;break;case 536870912:n=mA;break;default:n=Qg}n=$3(n,j3.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function j3(t,e){if(Lg=-1,jg=0,Vt&6)throw Error(Ce(327));var n=t.callbackNode;if($u()&&t.callbackNode!==n)return null;var r=e0(t,t===fr?Sr:0);if(r===0)return null;if(r&30||r&t.expiredLanes||e)e=y0(t,r);else{e=r;var i=Vt;Vt|=2;var s=I3();(fr!==t||Sr!==e)&&(qa=null,gd=$n()+500,cc(t,e));do try{HI();break}catch(o){O3(t,o)}while(!0);Xb(),m0.current=s,Vt=i,Yn!==null?e=0:(fr=null,Sr=0,e=ar)}if(e!==0){if(e===2&&(i=$2(t),i!==0&&(r=i,e=pw(t,i))),e===1)throw n=If,cc(t,0),zo(t,r),di(t,$n()),n;if(e===6)zo(t,r);else{if(i=t.current.alternate,!(r&30)&&!BI(i)&&(e=y0(t,r),e===2&&(s=$2(t),s!==0&&(r=s,e=pw(t,s))),e===1))throw n=If,cc(t,0),zo(t,r),di(t,$n()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(Ce(345));case 2:Kl(t,ai,qa);break;case 3:if(zo(t,r),(r&130023424)===r&&(e=fx+500-$n(),10<e)){if(e0(t,0)!==0)break;if(i=t.suspendedLanes,(i&r)!==r){Jr(),t.pingedLanes|=t.suspendedLanes&i;break}t.timeoutHandle=K2(Kl.bind(null,t,ai,qa),e);break}Kl(t,ai,qa);break;case 4:if(zo(t,r),(r&4194240)===r)break;for(e=t.eventTimes,i=-1;0<r;){var a=31-ks(r);s=1<<a,a=e[a],a>i&&(i=a),r&=~s}if(r=i,r=$n()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*UI(r/1960))-r,10<r){t.timeoutHandle=K2(Kl.bind(null,t,ai,qa),r);break}Kl(t,ai,qa);break;case 5:Kl(t,ai,qa);break;default:throw Error(Ce(329))}}}return di(t,$n()),t.callbackNode===n?j3.bind(null,t):null}function pw(t,e){var n=Qh;return t.current.memoizedState.isDehydrated&&(cc(t,e).flags|=256),t=y0(t,e),t!==2&&(e=ai,ai=n,e!==null&&mw(e)),t}function mw(t){ai===null?ai=t:ai.push.apply(ai,t)}function BI(t){for(var e=t;;){if(e.flags&16384){var n=e.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!As(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function zo(t,e){for(e&=~hx,e&=~gv,t.suspendedLanes|=e,t.pingedLanes&=~e,t=t.expirationTimes;0<e;){var n=31-ks(e),r=1<<n;t[n]=-1,e&=~r}}function SS(t){if(Vt&6)throw Error(Ce(327));$u();var e=e0(t,0);if(!(e&1))return di(t,$n()),null;var n=y0(t,e);if(t.tag!==0&&n===2){var r=$2(t);r!==0&&(e=r,n=pw(t,r))}if(n===1)throw n=If,cc(t,0),zo(t,e),di(t,$n()),n;if(n===6)throw Error(Ce(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,Kl(t,ai,qa),di(t,$n()),null}function px(t,e){var n=Vt;Vt|=1;try{return t(e)}finally{Vt=n,Vt===0&&(gd=$n()+500,hv&&kl())}}function vc(t){Yo!==null&&Yo.tag===0&&!(Vt&6)&&$u();var e=Vt;Vt|=1;var n=Qi.transition,r=sn;try{if(Qi.transition=null,sn=1,t)return t()}finally{sn=r,Qi.transition=n,Vt=e,!(Vt&6)&&kl()}}function mx(){Ei=Ru.current,yn(Ru)}function cc(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&&(t.timeoutHandle=-1,yI(n)),Yn!==null)for(n=Yn.return;n!==null;){var r=n;switch(Zb(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&s0();break;case 3:pd(),yn(ci),yn(zr),ix();break;case 5:rx(r);break;case 4:pd();break;case 13:yn(kn);break;case 19:yn(kn);break;case 10:Qb(r.type._context);break;case 22:case 23:mx()}n=n.return}if(fr=t,Yn=t=ol(t.current,null),Sr=Ei=e,ar=0,If=null,hx=gv=gc=0,ai=Qh=null,Ql!==null){for(e=0;e<Ql.length;e++)if(n=Ql[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var a=s.next;s.next=i,r.next=a}n.pending=r}Ql=null}return t}function O3(t,e){do{var n=Yn;try{if(Xb(),Pg.current=p0,f0){for(var r=Nn.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}f0=!1}if(mc=0,dr=sr=Nn=null,Jh=!1,Lf=0,dx.current=null,n===null||n.return===null){ar=1,If=e,Yn=null;break}e:{var s=t,a=n.return,o=n,l=e;if(e=Sr,o.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,u=o,d=u.tag;if(!(u.mode&1)&&(d===0||d===11||d===15)){var f=u.alternate;f?(u.updateQueue=f.updateQueue,u.memoizedState=f.memoizedState,u.lanes=f.lanes):(u.updateQueue=null,u.memoizedState=null)}var h=uS(a);if(h!==null){h.flags&=-257,dS(h,a,o,s,e),h.mode&1&&cS(s,c,e),e=h,l=c;var y=e.updateQueue;if(y===null){var v=new Set;v.add(l),e.updateQueue=v}else y.add(l);break e}else{if(!(e&1)){cS(s,c,e),gx();break e}l=Error(Ce(426))}}else if(xn&&o.mode&1){var _=uS(a);if(_!==null){!(_.flags&65536)&&(_.flags|=256),dS(_,a,o,s,e),Yb(md(l,o));break e}}s=l=md(l,o),ar!==4&&(ar=2),Qh===null?Qh=[s]:Qh.push(s),s=a;do{switch(s.tag){case 3:s.flags|=65536,e&=-e,s.lanes|=e;var w=v3(s,l,e);rS(s,w);break e;case 1:o=l;var x=s.type,k=s.stateNode;if(!(s.flags&128)&&(typeof x.getDerivedStateFromError=="function"||k!==null&&typeof k.componentDidCatch=="function"&&(sl===null||!sl.has(k)))){s.flags|=65536,e&=-e,s.lanes|=e;var N=y3(s,o,e);rS(s,N);break e}}s=s.return}while(s!==null)}M3(n)}catch(R){e=R,Yn===n&&n!==null&&(Yn=n=n.return);continue}break}while(!0)}function I3(){var t=m0.current;return m0.current=p0,t===null?p0:t}function gx(){(ar===0||ar===3||ar===2)&&(ar=4),fr===null||!(gc&268435455)&&!(gv&268435455)||zo(fr,Sr)}function y0(t,e){var n=Vt;Vt|=2;var r=I3();(fr!==t||Sr!==e)&&(qa=null,cc(t,e));do try{qI();break}catch(i){O3(t,i)}while(!0);if(Xb(),Vt=n,m0.current=r,Yn!==null)throw Error(Ce(261));return fr=null,Sr=0,ar}function qI(){for(;Yn!==null;)D3(Yn)}function HI(){for(;Yn!==null&&!m8();)D3(Yn)}function D3(t){var e=z3(t.alternate,t,Ei);t.memoizedProps=t.pendingProps,e===null?M3(t):Yn=e,dx.current=null}function M3(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&32768){if(n=MI(n,e),n!==null){n.flags&=32767,Yn=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{ar=6,Yn=null;return}}else if(n=DI(n,e,Ei),n!==null){Yn=n;return}if(e=e.sibling,e!==null){Yn=e;return}Yn=e=t}while(e!==null);ar===0&&(ar=5)}function Kl(t,e,n){var r=sn,i=Qi.transition;try{Qi.transition=null,sn=1,WI(t,e,n,r)}finally{Qi.transition=i,sn=r}return null}function WI(t,e,n,r){do $u();while(Yo!==null);if(Vt&6)throw Error(Ce(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(Ce(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(E8(t,s),t===fr&&(Yn=fr=null,Sr=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||Mm||(Mm=!0,$3(Qg,function(){return $u(),null})),s=(n.flags&15990)!==0,n.subtreeFlags&15990||s){s=Qi.transition,Qi.transition=null;var a=sn;sn=1;var o=Vt;Vt|=4,dx.current=null,zI(t,n),R3(n,t),dI(V2),t0=!!W2,V2=W2=null,t.current=n,$I(n),g8(),Vt=o,sn=a,Qi.transition=s}else t.current=n;if(Mm&&(Mm=!1,Yo=t,v0=i),s=t.pendingLanes,s===0&&(sl=null),w8(n.stateNode),di(t,$n()),e!==null)for(r=t.onRecoverableError,n=0;n<e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(g0)throw g0=!1,t=hw,hw=null,t;return v0&1&&t.tag!==0&&$u(),s=t.pendingLanes,s&1?t===fw?ef++:(ef=0,fw=t):ef=0,kl(),null}function $u(){if(Yo!==null){var t=vA(v0),e=Qi.transition,n=sn;try{if(Qi.transition=null,sn=16>t?16:t,Yo===null)var r=!1;else{if(t=Yo,Yo=null,v0=0,Vt&6)throw Error(Ce(331));var i=Vt;for(Vt|=4,Be=t.current;Be!==null;){var s=Be,a=s.child;if(Be.flags&16){var o=s.deletions;if(o!==null){for(var l=0;l<o.length;l++){var c=o[l];for(Be=c;Be!==null;){var u=Be;switch(u.tag){case 0:case 11:case 15:Xh(8,u,s)}var d=u.child;if(d!==null)d.return=u,Be=d;else for(;Be!==null;){u=Be;var f=u.sibling,h=u.return;if(C3(u),u===c){Be=null;break}if(f!==null){f.return=h,Be=f;break}Be=h}}}var y=s.alternate;if(y!==null){var v=y.child;if(v!==null){y.child=null;do{var _=v.sibling;v.sibling=null,v=_}while(v!==null)}}Be=s}}if(s.subtreeFlags&2064&&a!==null)a.return=s,Be=a;else e:for(;Be!==null;){if(s=Be,s.flags&2048)switch(s.tag){case 0:case 11:case 15:Xh(9,s,s.return)}var w=s.sibling;if(w!==null){w.return=s.return,Be=w;break e}Be=s.return}}var x=t.current;for(Be=x;Be!==null;){a=Be;var k=a.child;if(a.subtreeFlags&2064&&k!==null)k.return=a,Be=k;else e:for(a=x;Be!==null;){if(o=Be,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:mv(9,o)}}catch(R){On(o,o.return,R)}if(o===a){Be=null;break e}var N=o.sibling;if(N!==null){N.return=o.return,Be=N;break e}Be=o.return}}if(Vt=i,kl(),ia&&typeof ia.onPostCommitFiberRoot=="function")try{ia.onPostCommitFiberRoot(ov,t)}catch{}r=!0}return r}finally{sn=n,Qi.transition=e}}return!1}function kS(t,e,n){e=md(n,e),e=v3(t,e,1),t=il(t,e,1),e=Jr(),t!==null&&(Sp(t,1,e),di(t,e))}function On(t,e,n){if(t.tag===3)kS(t,t,n);else for(;e!==null;){if(e.tag===3){kS(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(sl===null||!sl.has(r))){t=md(n,t),t=y3(e,t,1),e=il(e,t,1),t=Jr(),e!==null&&(Sp(e,1,t),di(e,t));break}}e=e.return}}function VI(t,e,n){var r=t.pingCache;r!==null&&r.delete(e),e=Jr(),t.pingedLanes|=t.suspendedLanes&n,fr===t&&(Sr&n)===n&&(ar===4||ar===3&&(Sr&130023424)===Sr&&500>$n()-fx?cc(t,0):hx|=n),di(t,e)}function F3(t,e){e===0&&(t.mode&1?(e=Am,Am<<=1,!(Am&130023424)&&(Am=4194304)):e=1);var n=Jr();t=ro(t,e),t!==null&&(Sp(t,e,n),di(t,n))}function GI(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),F3(t,n)}function KI(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(Ce(314))}r!==null&&r.delete(e),F3(t,n)}var z3;z3=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ci.current)oi=!0;else{if(!(t.lanes&n)&&!(e.flags&128))return oi=!1,II(t,e,n);oi=!!(t.flags&131072)}else oi=!1,xn&&e.flags&1048576&&qA(e,l0,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;Rg(t,e),t=e.pendingProps;var i=dd(e,zr.current);zu(e,n),i=ax(null,e,r,t,i,n);var s=ox();return e.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,ui(r)?(s=!0,a0(e)):s=!1,e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,tx(e),i.updater=pv,e.stateNode=i,i._reactInternals=e,tw(e,r,t,n),e=iw(null,e,r,!0,s,n)):(e.tag=0,xn&&s&&Kb(e),Kr(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(Rg(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=YI(r),t=gs(r,t),i){case 0:e=rw(null,e,r,t,n);break e;case 1:e=pS(null,e,r,t,n);break e;case 11:e=hS(null,e,r,t,n);break e;case 14:e=fS(null,e,r,gs(r.type,t),n);break e}throw Error(Ce(306,r,""))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:gs(r,i),rw(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:gs(r,i),pS(t,e,r,i,n);case 3:e:{if(_3(e),t===null)throw Error(Ce(387));r=e.pendingProps,s=e.memoizedState,i=s.element,ZA(t,e),d0(e,r,null,n);var a=e.memoizedState;if(r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){i=md(Error(Ce(423)),e),e=mS(t,e,r,n,i);break e}else if(r!==i){i=md(Error(Ce(424)),e),e=mS(t,e,r,n,i);break e}else for(Ci=rl(e.stateNode.containerInfo.firstChild),Ri=e,xn=!0,xs=null,n=GA(e,null,r,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(hd(),r===i){e=io(t,e,n);break e}Kr(t,e,r,n)}e=e.child}return e;case 5:return YA(e),t===null&&X2(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,a=i.children,G2(r,i)?a=null:s!==null&&G2(r,s)&&(e.flags|=32),x3(t,e),Kr(t,e,a,n),e.child;case 6:return t===null&&X2(e),null;case 13:return S3(t,e,n);case 4:return nx(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=fd(e,null,r,n):Kr(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:gs(r,i),hS(t,e,r,i,n);case 7:return Kr(t,e,e.pendingProps,n),e.child;case 8:return Kr(t,e,e.pendingProps.children,n),e.child;case 12:return Kr(t,e,e.pendingProps.children,n),e.child;
vendor: 9,147 bytes, line 40
40case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,a=i.value,fn(c0,r._currentValue),r._currentValue=a,s!==null)if(As(s.value,a)){if(s.children===i.children&&!ci.current){e=io(t,e,n);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var o=s.dependencies;if(o!==null){a=s.child;for(var l=o.firstContext;l!==null;){if(l.context===r){if(s.tag===1){l=Qa(-1,n&-n),l.tag=2;var c=s.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}s.lanes|=n,l=s.alternate,l!==null&&(l.lanes|=n),Q2(s.return,n,e),o.lanes|=n;break}l=l.next}}else if(s.tag===10)a=s.type===e.type?null:s.child;else if(s.tag===18){if(a=s.return,a===null)throw Error(Ce(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),Q2(a,n,e),a=s.sibling}else a=s.child;if(a!==null)a.return=s;else for(a=s;a!==null;){if(a===e){a=null;break}if(s=a.sibling,s!==null){s.return=a.return,a=s;break}a=a.return}s=a}Kr(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,zu(e,n),i=ts(i),r=r(i),e.flags|=1,Kr(t,e,r,n),e.child;case 14:return r=e.type,i=gs(r,e.pendingProps),i=gs(r.type,i),fS(t,e,r,i,n);case 15:return w3(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:gs(r,i),Rg(t,e),e.tag=1,ui(r)?(t=!0,a0(e)):t=!1,zu(e,n),g3(e,r,i),tw(e,r,i,n),iw(null,e,r,!0,t,n);case 19:return k3(t,e,n);case 22:return b3(t,e,n)}throw Error(Ce(156,e.tag))};function $3(t,e){return fA(t,e)}function ZI(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Xi(t,e,n,r){return new ZI(t,e,n,r)}function vx(t){return t=t.prototype,!(!t||!t.isReactComponent)}function YI(t){if(typeof t=="function")return vx(t)?1:0;if(t!=null){if(t=t.$$typeof,t===Db)return 11;if(t===Mb)return 14}return 2}function ol(t,e){var n=t.alternate;return n===null?(n=Xi(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function Og(t,e,n,r,i,s){var a=2;if(r=t,typeof t=="function")vx(t)&&(a=1);else if(typeof t=="string")a=5;else e:switch(t){case xu:return uc(n.children,i,s,e);case Ib:a=8,i|=8;break;case E2:return t=Xi(12,n,e,i|2),t.elementType=E2,t.lanes=s,t;case N2:return t=Xi(13,n,e,i),t.elementType=N2,t.lanes=s,t;case A2:return t=Xi(19,n,e,i),t.elementType=A2,t.lanes=s,t;case Y4:return vv(n,i,s,e);default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case K4:a=10;break e;case Z4:a=9;break e;case Db:a=11;break e;case Mb:a=14;break e;case Do:a=16,r=null;break e}throw Error(Ce(130,t==null?t:typeof t,""))}return e=Xi(a,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function uc(t,e,n,r){return t=Xi(7,t,r,e),t.lanes=n,t}function vv(t,e,n,r){return t=Xi(22,t,r,e),t.elementType=Y4,t.lanes=n,t.stateNode={isHidden:!1},t}function hy(t,e,n){return t=Xi(6,t,null,e),t.lanes=n,t}function fy(t,e,n){return e=Xi(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function JI(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=G1(0),this.expirationTimes=G1(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=G1(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function yx(t,e,n,r,i,s,a,o,l){return t=new JI(t,e,n,o,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=Xi(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},tx(s),t}function XI(t,e,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:bu,key:r==null?null:""+r,children:t,containerInfo:e,implementation:n}}function U3(t){if(!t)return hl;t=t._reactInternals;e:{if(Pc(t)!==t||t.tag!==1)throw Error(Ce(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(ui(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(Ce(171))}if(t.tag===1){var n=t.type;if(ui(n))return UA(t,n,e)}return e}function B3(t,e,n,r,i,s,a,o,l){return t=yx(n,r,!0,t,i,s,a,o,l),t.context=U3(null),n=t.current,r=Jr(),i=al(n),s=Qa(r,i),s.callback=e??null,il(n,s,i),t.current.lanes=i,Sp(t,i,r),di(t,r),t}function yv(t,e,n,r){var i=e.current,s=Jr(),a=al(i);return n=U3(n),e.context===null?e.context=n:e.pendingContext=n,e=Qa(s,a),e.payload={element:t},r=r===void 0?null:r,r!==null&&(e.callback=r),t=il(i,e,a),t!==null&&(Es(t,i,a,s),Cg(t,i,a)),a}function w0(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function ES(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function wx(t,e){ES(t,e),(t=t.alternate)&&ES(t,e)}function QI(){return null}var q3=typeof reportError=="function"?reportError:function(t){console.error(t)};function bx(t){this._internalRoot=t}wv.prototype.render=bx.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(Ce(409));yv(t,e,null,null)};wv.prototype.unmount=bx.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;vc(function(){yv(null,t,null,null)}),e[no]=null}};function wv(t){this._internalRoot=t}wv.prototype.unstable_scheduleHydration=function(t){if(t){var e=bA();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Fo.length&&e!==0&&e<Fo[n].priority;n++);Fo.splice(n,0,t),n===0&&_A(t)}};function xx(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function bv(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11&&(t.nodeType!==8||t.nodeValue!==" react-mount-point-unstable "))}function NS(){}function e7(t,e,n,r,i){if(i){if(typeof r=="function"){var s=r;r=function(){var c=w0(a);s.call(c)}}var a=B3(e,r,t,0,null,!1,!1,"",NS);return t._reactRootContainer=a,t[no]=a.current,Af(t.nodeType===8?t.parentNode:t),vc(),a}for(;i=t.lastChild;)t.removeChild(i);if(typeof r=="function"){var o=r;r=function(){var c=w0(l);o.call(c)}}var l=yx(t,0,!1,null,null,!1,!1,"",NS);return t._reactRootContainer=l,t[no]=l.current,Af(t.nodeType===8?t.parentNode:t),vc(function(){yv(e,l,n,r)}),l}function xv(t,e,n,r,i){var s=n._reactRootContainer;if(s){var a=s;if(typeof i=="function"){var o=i;i=function(){var l=w0(a);o.call(l)}}yv(e,a,t,i)}else a=e7(n,e,t,i,r);return w0(a)}yA=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=Dh(e.pendingLanes);n!==0&&($b(e,n|1),di(e,$n()),!(Vt&6)&&(gd=$n()+500,kl()))}break;case 13:vc(function(){var r=ro(t,1);if(r!==null){var i=Jr();Es(r,t,1,i)}}),wx(t,1)}};Ub=function(t){if(t.tag===13){var e=ro(t,134217728);if(e!==null){var n=Jr();Es(e,t,134217728,n)}wx(t,134217728)}};wA=function(t){if(t.tag===13){var e=al(t),n=ro(t,e);if(n!==null){var r=Jr();Es(n,t,e,r)}wx(t,e)}};bA=function(){return sn};xA=function(t,e){var n=sn;try{return sn=t,e()}finally{sn=n}};M2=function(t,e,n){switch(e){case"input":if(T2(t,n),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+e)+'][type="radio"]'),e=0;e<n.length;e++){var r=n[e];if(r!==t&&r.form===t.form){var i=dv(r);if(!i)throw Error(Ce(90));X4(r),T2(r,i)}}}break;case"textarea":eA(t,n);break;case"select":e=n.value,e!=null&&Iu(t,!!n.multiple,e,!1)}};oA=px;lA=vc;var t7={usingClientEntryPoint:!1,Events:[Ep,Eu,dv,sA,aA,px]},kh={findFiberByHostInstance:Xl,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},n7={bundleType:kh.bundleType,version:kh.version,rendererPackageName:kh.rendererPackageName,rendererConfig:kh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:co.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=dA(t),t===null?null:t.stateNode},findFiberByHostInstance:kh.findFiberByHostInstance||QI,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};
vendor: 4,259 bytes, line 40
40if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Fm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Fm.isDisabled&&Fm.supportsFiber)try{ov=Fm.inject(n7),ia=Fm}catch{}}Ii.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=t7;Ii.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!xx(e))throw Error(Ce(200));return XI(t,e,null,n)};Ii.createRoot=function(t,e){if(!xx(t))throw Error(Ce(299));var n=!1,r="",i=q3;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(r=e.identifierPrefix),e.onRecoverableError!==void 0&&(i=e.onRecoverableError)),e=yx(t,1,!1,null,null,n,!1,r,i),t[no]=e.current,Af(t.nodeType===8?t.parentNode:t),new bx(e)};Ii.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(Ce(188)):(t=Object.keys(t).join(","),Error(Ce(268,t)));return t=dA(e),t=t===null?null:t.stateNode,t};Ii.flushSync=function(t){return vc(t)};Ii.hydrate=function(t,e,n){if(!bv(e))throw Error(Ce(200));return xv(null,t,e,!0,n)};Ii.hydrateRoot=function(t,e,n){if(!xx(t))throw Error(Ce(405));var r=n!=null&&n.hydratedSources||null,i=!1,s="",a=q3;if(n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(s=n.identifierPrefix),n.onRecoverableError!==void 0&&(a=n.onRecoverableError)),e=B3(e,null,t,1,n??null,i,!1,s,a),t[no]=e.current,Af(t),r)for(t=0;t<r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new wv(e)};Ii.render=function(t,e,n){if(!bv(e))throw Error(Ce(200));return xv(null,t,e,!1,n)};Ii.unmountComponentAtNode=function(t){if(!bv(t))throw Error(Ce(40));return t._reactRootContainer?(vc(function(){xv(null,null,t,!1,function(){t._reactRootContainer=null,t[no]=null})}),!0):!1};Ii.unstable_batchedUpdates=px;Ii.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!bv(n))throw Error(Ce(200));if(t==null||t._reactInternals===void 0)throw Error(Ce(38));return xv(t,e,n,!1,r)};Ii.version="18.3.1-next-f1338f8080-20240426";function H3(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(H3)}catch(t){console.error(t)}}H3(),H4.exports=Ii;var Rd=H4.exports;const _v=Ab(Rd);var W3,AS=Rd;W3=AS.createRoot,AS.hydrateRoot;function qe(t,e,{checkForDefaultPrevented:n=!0}={}){return function(i){if(t==null||t(i),n===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function r7(t,e){typeof t=="function"?t(e):t!=null&&(t.current=e)}function Sv(...t){return e=>t.forEach(n=>r7(n,e))}function an(...t){return E.useCallback(Sv(...t),t)}function uo(t,e=[]){let n=[];function r(s,a){const o=E.createContext(a),l=n.length;n=[...n,a];function c(d){const{scope:f,children:h,...y}=d,v=(f==null?void 0:f[t][l])||o,_=E.useMemo(()=>y,Object.values(y));return m.jsx(v.Provider,{value:_,children:h})}function u(d,f){const h=(f==null?void 0:f[t][l])||o,y=E.useContext(h);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return c.displayName=s+"Provider",[c,u]}const i=()=>{const s=n.map(a=>E.createContext(a));return function(o){const l=(o==null?void 0:o[t])||s;return E.useMemo(()=>({[`__scope${t}`]:{...o,[t]:l}}),[o,l])}};return i.scopeName=t,[r,i7(i,...e)]}function i7(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...o,...d}},{});return E.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var yc=E.forwardRef((t,e)=>{const{children:n,...r}=t,i=E.Children.toArray(n),s=i.find(s7);if(s){const a=s.props.children,o=i.map(l=>l===s?E.Children.count(a)>1?E.Children.only(null):E.isValidElement(a)?a.props.children:null:l);return m.jsx(gw,{...r,ref:e,children:E.isValidElement(a)?E.cloneElement(a,void 0,o):null})}return m.jsx(gw,{...r,ref:e,children:n})});yc.displayName="Slot";var gw=E.forwardRef((t,e)=>{const{children:n,...r}=t;if(E.isValidElement(n)){const i=o7(n);return E.cloneElement(n,{...a7(r,n.props),ref:e?Sv(e,i):i}
vendor: 4,959 bytes, line 40
40)}return E.Children.count(n)>1?E.Children.only(null):null});gw.displayName="SlotClone";var V3=({children:t})=>m.jsx(m.Fragment,{children:t});function s7(t){return E.isValidElement(t)&&t.type===V3}function a7(t,e){const n={...e};for(const r in e){const i=t[r],s=e[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{s(...o),i(...o)}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...t,...n}}function o7(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function kv(t){const e=t+"CollectionProvider",[n,r]=uo(e),[i,s]=n(e,{collectionRef:{current:null},itemMap:new Map}),a=h=>{const{scope:y,children:v}=h,_=ye.useRef(null),w=ye.useRef(new Map).current;return m.jsx(i,{scope:y,itemMap:w,collectionRef:_,children:v})};a.displayName=e;const o=t+"CollectionSlot",l=ye.forwardRef((h,y)=>{const{scope:v,children:_}=h,w=s(o,v),x=an(y,w.collectionRef);return m.jsx(yc,{ref:x,children:_})});l.displayName=o;const c=t+"CollectionItemSlot",u="data-radix-collection-item",d=ye.forwardRef((h,y)=>{const{scope:v,children:_,...w}=h,x=ye.useRef(null),k=an(y,x),N=s(c,v);return ye.useEffect(()=>(N.itemMap.set(x,{ref:x,...w}),()=>void N.itemMap.delete(x))),m.jsx(yc,{[u]:"",ref:k,children:_})});d.displayName=c;function f(h){const y=s(t+"CollectionConsumer",h);return ye.useCallback(()=>{const _=y.collectionRef.current;if(!_)return[];const w=Array.from(_.querySelectorAll(`[${u}]`));return Array.from(y.itemMap.values()).sort((N,R)=>w.indexOf(N.ref.current)-w.indexOf(R.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:a,Slot:l,ItemSlot:d},f,r]}var l7=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],xt=l7.reduce((t,e)=>{const n=E.forwardRef((r,i)=>{const{asChild:s,...a}=r,o=s?yc:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(o,{...a,ref:i})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function Ap(t,e){t&&Rd.flushSync(()=>t.dispatchEvent(e))}function or(t){const e=E.useRef(t);return E.useEffect(()=>{e.current=t}),E.useMemo(()=>(...n)=>{var r;return(r=e.current)==null?void 0:r.call(e,...n)},[])}function _x(t,e=globalThis==null?void 0:globalThis.document){const n=or(t);E.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return e.addEventListener("keydown",r,{capture:!0}),()=>e.removeEventListener("keydown",r,{capture:!0})},[n,e])}var c7="DismissableLayer",vw="dismissableLayer.update",u7="dismissableLayer.pointerDownOutside",d7="dismissableLayer.focusOutside",CS,G3=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),K3=E.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=t,c=E.useContext(G3),[u,d]=E.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=E.useState({}),y=an(e,F=>d(F)),v=Array.from(c.layers),[_]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(_),x=u?v.indexOf(u):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,N=x>=w,R=f7(F=>{const M=F.target,I=[...c.branches].some(G=>G.contains(M));!N||I||(i==null||i(F),a==null||a(F),F.defaultPrevented||o==null||o())},f),H=p7(F=>{const M=F.target;[...c.branches].some(G=>G.contains(M))||(s==null||s(F),a==null||a(F),F.defaultPrevented||o==null||o())},f);return _x(F=>{x===c.layers.size-1&&(r==null||r(F),!F.defaultPrevented&&o&&(F.preventDefault(),o()))},f),E.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(CS=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),PS(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=CS)}},[u,f,n,c]),E.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),PS())},[u,c]),E.useEffect(()=>{const F=()=>h({});return document.addEventListener(vw,F),()=>document.removeEventListener(vw,F)},[]),m.jsx(xt.div,{...l,ref:y,style:{pointerEvents:k?N?"auto":"none":void 0,...t.style},onFocusCapture:qe(t.onFocusCapture,H.onFocusCapture),onBlurCapture:qe(t.onBlurCapture,H.onBlurCapture),onPointerDownCapture:qe(t.onPointerDownCapture,R.onPointerDownCapture)})});K3.displayName=c7;var h7="DismissableLayerBranch",Z3=E.forwardRef((t,e)=>{const n=E.useContext(G3),r=E.useRef(null),i=an(e,r);return E.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(xt.div,{...t,ref:i})});Z3.displayName=h7;function f7(t,e=globalThis==null?void 0:globalThis.document){const n=or(t),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const s=o=>
40{if(o.target&&!r.current){let l=function(){Y3(u7,n,c,{discrete:!0})};const c={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function p7(t,e=globalThis==null?void 0:globalThis.document){const n=or(t),r=E.useRef(!1);return E.useEffect(()=>{const i=s=>{s.target&&!r.current&&Y3(d7,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function PS(){const t=new CustomEvent(vw);document.dispatchEvent(t)}function Y3(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?Ap(i,s):i.dispatchEvent(s)}var m7=K3,g7=Z3,Xr=globalThis!=null&&globalThis.document?E.useLayoutEffect:()=>{},v7="Portal",J3=E.forwardRef((t,e)=>{var o;const{container:n,...r}=t,[i,s]=E.useState(!1);Xr(()=>s(!0),[]);const a=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?_v.createPortal(m.jsx(xt.div,{...r,ref:e}),a):null});J3.displayName=v7;function y7(t,e){return E.useReducer((n,r)=>e[n][r]??n,t)}var El=t=>{const{present:e,children:n}=t,r=w7(e),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),s=an(r.ref,b7(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:s}):null};El.displayName="Presence";function w7(t){const[e,n]=E.useState(),r=E.useRef({}),i=E.useRef(t),s=E.useRef("none"),a=t?"mounted":"unmounted",[o,l]=y7(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=zm(r.current);s.current=o==="mounted"?c:"none"},[o]),Xr(()=>{const c=r.current,u=i.current;if(u!==t){const f=s.current,h=zm(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Xr(()=>{if(e){const c=d=>{const h=zm(r.current).includes(d.animationName);d.target===e&&h&&Rd.flushSync(()=>l("ANIMATION_END"))},u=d=>{d.target===e&&(s.current=zm(r.current))};return e.addEventListener("animationstart",u),e.addEventListener("animationcancel",c),e.addEventListener("animationend",c),()=>{e.removeEventListener("animationstart",u),e.removeEventListener("animationcancel",c),e.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:E.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function zm(t){return(t==null?void 0:t.animationName)||"none"}function b7(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}function Nl({prop:t,defaultProp:e,onChange:n=()=>{}}){const[r,i]=x7({defaultProp:e,onChange:n}),s=t!==void 0,a=s?t:r,o=or(n),l=E.useCallback(c=>{if(s){const d=typeof c=="function"?c(t):c;d!==t&&o(d)}else i(c)},[s,t,i,o]);return[a,l]}function x7({defaultProp:t,onChange:e}){const n=E.useState(t),[r]=n,i=E.useRef(r),s=or(e);return E.useEffect(()=>{i.current!==r&&(s(r),i.current=r)},[r,i,s]),n}var _7="VisuallyHidden",Ev=E.forwardRef((t,e)=>m.jsx(xt.span,{...t,ref:e,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...t.style}}));Ev.displayName=_7;var S7=Ev,Sx="ToastProvider",[kx,k7,E7]=kv("Toast"),[X3,mne]=uo("Toast",[E7]),[N7,Nv]=X3(Sx),Q3=t=>{const{__scopeToast:e,label:n="Notification",duration:r=5e3,swipeDirection:i="right",swipeThreshold:s=50,children:a}=t,[o,l]=E.useState(null),[c,u]=E.useState(0),d=E.useRef(!1),f=E.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Sx}\`. Expected non-empty \`string\`.`),m.jsx(kx.Provider,{scope:e,children:m.jsx(N7,{scope:e,label:n,duration:r,swipeDirection:i,swipeThreshold:s,toastCount:c,viewport:o,onViewportChange:l,onToastAdd:E.useCallback(()=>u(h=>h+1),[]),onToastRemove:E.useCallback(()=>u(h=>h-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:a})})};Q3.displayName=Sx;var eC="ToastViewport",A7=["F8"],yw="toast.viewportPause",ww="toast.viewportResume",tC=E.forwardRef((t,e)=>{const{__scopeToast:n,hotkey:r=A7,label:i="Notifications ({hotkey})",...s}=t,a=Nv(eC,n),o=k7(n),l=E.useRef(null),c=E.useRef(null),u=E.useRef(null),d=E.useRef(null),f=an(e,d,a.onViewportChange),h=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=a.toastCount>0;E.useEffect(()=>{const _=w=>{var k;r.every(N=>w[N]||w.code===N)&&((k=d.current)==null||k.focus())};return document.addEventListener("keydown",_),()=>document.removeEventListener("keydown",_)},[r]),E.useEffect(()=>{const _=l.current,w=d.current;if(y&&_&&w){const x=()=>
40{if(!a.isClosePausedRef.current){const H=new CustomEvent(yw);w.dispatchEvent(H),a.isClosePausedRef.current=!0}},k=()=>{if(a.isClosePausedRef.current){const H=new CustomEvent(ww);w.dispatchEvent(H),a.isClosePausedRef.current=!1}},N=H=>{!_.contains(H.relatedTarget)&&k()},R=()=>{_.contains(document.activeElement)||k()};return _.addEventListener("focusin",x),_.addEventListener("focusout",N),_.addEventListener("pointermove",x),_.addEventListener("pointerleave",R),window.addEventListener("blur",x),window.addEventListener("focus",k),()=>{_.removeEventListener("focusin",x),_.removeEventListener("focusout",N),_.removeEventListener("pointermove",x),_.removeEventListener("pointerleave",R),window.removeEventListener("blur",x),window.removeEventListener("focus",k)}}},[y,a.isClosePausedRef]);const v=E.useCallback(({tabbingDirection:_})=>{const x=o().map(k=>{const N=k.ref.current,R=[N,...$7(N)];return _==="forwards"?R:R.reverse()});return(_==="forwards"?x.reverse():x).flat()},[o]);return E.useEffect(()=>{const _=d.current;if(_){const w=x=>{var R,H,F;const k=x.altKey||x.ctrlKey||x.metaKey;if(x.key==="Tab"&&!k){const M=document.activeElement,I=x.shiftKey;if(x.target===_&&I){(R=c.current)==null||R.focus();return}const j=v({tabbingDirection:I?"backwards":"forwards"}),W=j.findIndex(z=>z===M);py(j.slice(W+1))?x.preventDefault():I?(H=c.current)==null||H.focus():(F=u.current)==null||F.focus()}};return _.addEventListener("keydown",w),()=>_.removeEventListener("keydown",w)}},[o,v]),m.jsxs(g7,{ref:l,role:"region","aria-label":i.replace("{hotkey}",h),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&m.jsx(bw,{ref:c,onFocusFromOutsideViewport:()=>{const _=v({tabbingDirection:"forwards"});py(_)}}),m.jsx(kx.Slot,{scope:n,children:m.jsx(xt.ol,{tabIndex:-1,...s,ref:f})}),y&&m.jsx(bw,{ref:u,onFocusFromOutsideViewport:()=>{const _=v({tabbingDirection:"backwards"});py(_)}})]})});tC.displayName=eC;var nC="ToastFocusProxy",bw=E.forwardRef((t,e)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=t,s=Nv(nC,n);return m.jsx(Ev,{"aria-hidden":!0,tabIndex:0,...i,ref:e,style:{position:"fixed"},onFocus:a=>{var c;const o=a.relatedTarget;!((c=s.viewport)!=null&&c.contains(o))&&r()}})});bw.displayName=nC;var Av="Toast",C7="toast.swipeStart",P7="toast.swipeMove",T7="toast.swipeCancel",R7="toast.swipeEnd",rC=E.forwardRef((t,e)=>{const{forceMount:n,open:r,defaultOpen:i,onOpenChange:s,...a}=t,[o=!0,l]=Nl({prop:r,defaultProp:i,onChange:s});return m.jsx(El,{present:n||o,children:m.jsx(O7,{open:o,...a,ref:e,onClose:()=>l(!1),onPause:or(t.onPause),onResume:or(t.onResume),onSwipeStart:qe(t.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:qe(t.onSwipeMove,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${d}px`)}),onSwipeCancel:qe(t.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:qe(t.onSwipeEnd,c=>{const{x:u,y:d}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${d}px`),l(!1)})})})});rC.displayName=Av;var[L7,j7]=X3(Av,{onClose(){}}),O7=E.forwardRef((t,e)=>{const{__scopeToast:n,type:r="foreground",duration:i,open:s,onClose:a,onEscapeKeyDown:o,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:h,...y}=t,v=Nv(Av,n),[_,w]=E.useState(null),x=an(e,z=>w(z)),k=E.useRef(null),N=E.useRef(null),R=i||v.duration,H=E.useRef(0),F=E.useRef(R),M=E.useRef(0),{onToastAdd:I,onToastRemove:G}=v,L=or(()=>{var re;(_==null?void 0:_.contains(document.activeElement))&&((re=v.viewport)==null||re.focus()),a()}),j=E.useCallback(z=>
40{!z||z===1/0||(window.clearTimeout(M.current),H.current=new Date().getTime(),M.current=window.setTimeout(L,z))},[L]);E.useEffect(()=>{const z=v.viewport;if(z){const re=()=>{j(F.current),c==null||c()},ne=()=>{const oe=new Date().getTime()-H.current;F.current=F.current-oe,window.clearTimeout(M.current),l==null||l()};return z.addEventListener(yw,ne),z.addEventListener(ww,re),()=>{z.removeEventListener(yw,ne),z.removeEventListener(ww,re)}}},[v.viewport,R,l,c,j]),E.useEffect(()=>{s&&!v.isClosePausedRef.current&&j(R)},[s,R,v.isClosePausedRef,j]),E.useEffect(()=>(I(),()=>G()),[I,G]);const W=E.useMemo(()=>_?uC(_):null,[_]);return v.viewport?m.jsxs(m.Fragment,{children:[W&&m.jsx(I7,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite","aria-atomic":!0,children:W}),m.jsx(L7,{scope:n,onClose:L,children:Rd.createPortal(m.jsx(kx.ItemSlot,{scope:n,children:m.jsx(m7,{asChild:!0,onEscapeKeyDown:qe(o,()=>{v.isFocusedToastEscapeKeyDownRef.current||L(),v.isFocusedToastEscapeKeyDownRef.current=!1}),children:m.jsx(xt.li,{role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":v.swipeDirection,...y,ref:x,style:{userSelect:"none",touchAction:"none",...t.style},onKeyDown:qe(t.onKeyDown,z=>{z.key==="Escape"&&(o==null||o(z.nativeEvent),z.nativeEvent.defaultPrevented||(v.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:qe(t.onPointerDown,z=>{z.button===0&&(k.current={x:z.clientX,y:z.clientY})}),onPointerMove:qe(t.onPointerMove,z=>{if(!k.current)return;const re=z.clientX-k.current.x,ne=z.clientY-k.current.y,oe=!!N.current,U=["left","right"].includes(v.swipeDirection),J=["left","up"].includes(v.swipeDirection)?Math.min:Math.max,de=U?J(0,re):0,ie=U?0:J(0,ne),C=z.pointerType==="touch"?10:2,q={x:de,y:ie},X={originalEvent:z,delta:q};oe?(N.current=q,$m(P7,d,X,{discrete:!1})):TS(q,v.swipeDirection,C)?(N.current=q,$m(C7,u,X,{discrete:!1}),z.target.setPointerCapture(z.pointerId)):(Math.abs(re)>C||Math.abs(ne)>C)&&(k.current=null)}),onPointerUp:qe(t.onPointerUp,z=>{const re=N.current,ne=z.target;if(ne.hasPointerCapture(z.pointerId)&&ne.releasePointerCapture(z.pointerId),N.current=null,k.current=null,re){const oe=z.currentTarget,U={originalEvent:z,delta:re};TS(re,v.swipeDirection,v.swipeThreshold)?$m(R7,h,U,{discrete:!0}):$m(T7,f,U,{discrete:!0}),oe.addEventListener("click",J=>J.preventDefault(),{once:!0})}})})})}),v.viewport)})]}):null}),I7=t=>{const{__scopeToast:e,children:n,...r}=t,i=Nv(Av,e),[s,a]=E.useState(!1),[o,l]=E.useState(!1);return F7(()=>a(!0)),E.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),o?null:m.jsx(J3,{asChild:!0,children:m.jsx(Ev,{...r,children:s&&m.jsxs(m.Fragment,{children:[i.label," ",n]})})})},D7="ToastTitle",iC=E.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return m.jsx(xt.div,{...r,ref:e})});iC.displayName=D7;var M7="ToastDescription",sC=E.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t;return m.jsx(xt.div,{...r,ref:e})});sC.displayName=M7;var aC="ToastAction",oC=E.forwardRef((t,e)=>{const{altText:n,...r}=t;return n.trim()?m.jsx(cC,{altText:n,asChild:!0,children:m.jsx(Ex,{...r,ref:e})}):(console.error(`Invalid prop \`altText\` supplied to \`${aC}\`. Expected non-empty \`string\`.`),null)});oC.displayName=aC;var lC="ToastClose",Ex=E.forwardRef((t,e)=>{const{__scopeToast:n,...r}=t,i=j7(lC,n);return m.jsx(cC,{asChild:!0,children:m.jsx(xt.button,{type:"button",...r,ref:e,onClick:qe(t.onClick,i.onClose)})})});Ex.displayName=lC;var cC=E.forwardRef((t,e)=>{const{__scopeToast:n,altText:r,...i}=t;return m.jsx(xt.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...i,ref:e})});function uC(t){const e=[];return Array.from(t.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&e.push(r.textContent),z7(r)){const i=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!i)if(s){const a=r.dataset.radixToastAnnounceAlt;a&&e.push(a)}else e.push(...uC(r))}}),e}function $m(t,e,n,{discrete:r}){const i=n.originalEvent.currentTarget,s=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?Ap(i,s):i.dispatchEvent(s)}var TS=(t,e,n=0)=>{const r=Math.abs(t.x),i=Math.abs(t.y),s=r>i;return e==="left"||e==="right"?s&&r>n:!s&&i>n};function F7(t=()=>{}){const e=or(t);Xr(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(e)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[e])}function z7(t){return t.nodeType===t.ELEMENT_NODE}function $7(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function py(t){const e=document.activeElement;return t.some(n=>n===e?!0:(n.focus(),document.activeElement!==e))}var U7=Q3,dC=tC,hC=rC,fC=iC,pC=sC,mC=oC,gC=Ex;function vC(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=vC(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function yC(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=vC(t))&&(r&&(r+=" "),r+=e);return r}const RS=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,LS=yC,Ld=(t,e)=>n=>{var r;if((e==null?void 0:e.variants)==null)return LS(t,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=e,a=Object.keys(i).map(c=>{const u=n==null?void 0:n[c],d=s==null?void 0:s[c];if(u===null)return null;const f=RS(u)||RS(d);return i[c][f]}),o=n&&Object.entries(n).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=e==null||(r=e.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(y=>{let[v,_]=y;return Array.isArray(_)?_.includes({...s,...o}[v]):{...s,...o}[v]===_})?[...c,d,f]:c},[]);return LS(t,a,l,n==null?void 0:n.class,n==null?void 0:n.className)};/** 41 * @license lucide-react v0.462.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const B7=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),wC=(...t)=>t.filter((e,n,r)=>!!e&&e.trim()!==""&&r.indexOf(e)===n).join(" ").trim();/** 46 * @license lucide-react v0.462.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */var q7={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 51 * @license lucide-react v0.462.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const H7=E.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...o},l)=>E.createElement("svg",{ref:l,...q7,width:e,height:e,stroke:t,strokeWidth:r?Number(n)*24/Number(e):n,className:wC("lucide",i),...o},[...a.map(([c,u])=>E.createElement(c,u)),...Array.isArray(s)?s:[s]]));/** 56 * @license lucide-react v0.462.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const _t=(t,e)=>{const n=E.forwardRef(({className:r,...i},s)=>E.createElement(H7,{ref:s,iconNode:e,className:wC(`lucide-${B7(t)}`,r),...i}));return n.displayName=`${t}`,n};/** 61 * @license lucide-react v0.462.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const Nx=_t("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/** 66 * @license lucide-react v0.462.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const W7=_t("Award",[["path",{d:"m15.477 12.89 1.515 8.526a.5.5 0 0 1-.81.47l-3.58-2.687a1 1 0 0 0-1.197 0l-3.586 2.686a.5.5 0 0 1-.81-.469l1.514-8.526",key:"1yiouv"}],["circle",{cx:"12",cy:"8",r:"6",key:"1vp47v"}]]);/** 71 * @license lucide-react v0.462.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const bC=_t("BookOpen",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]);/** 76 * @license lucide-react v0.462.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const V7=_t("BrainCircuit",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M9 13a4.5 4.5 0 0 0 3-4",key:"10igwf"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M12 13h4",key:"1ku699"}],["path",{d:"M12 18h6a2 2 0 0 1 2 2v1",key:"105ag5"}],["path",{d:"M12 8h8",key:"1lhi5i"}
80],["path",{d:"M16 8V5a2 2 0 0 1 2-2",key:"u6izg6"}],["circle",{cx:"16",cy:"13",r:".5",key:"ry7gng"}],["circle",{cx:"18",cy:"3",r:".5",key:"1aiba7"}],["circle",{cx:"20",cy:"21",r:".5",key:"yhc1fs"}],["circle",{cx:"20",cy:"8",r:".5",key:"1e43v0"}]]);/** 81 * @license lucide-react v0.462.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const G7=_t("ChartColumnIncreasing",[["path",{d:"M13 17V9",key:"1fwyjl"}],["path",{d:"M18 17V5",key:"sfb6ij"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 86 * @license lucide-react v0.462.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree. 90 */const xC=_t("ChartColumn",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 91 * @license lucide-react v0.462.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const Ax=_t("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** 96 * @license lucide-react v0.462.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const K7=_t("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 101 * @license lucide-react v0.462.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const Z7=_t("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/** 106 * @license lucide-react v0.462.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const b0=_t("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 111 * @license lucide-react v0.462.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const Cv=_t("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** 116 * @license lucide-react v0.462.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const Y7=_t("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 121 * @license lucide-react v0.462.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const J7=_t("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 126 * @license lucide-react v0.462.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const X7=_t("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/** 131 * @license lucide-react v0.462.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const _C=_t("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);/** 136 * @license lucide-react v0.462.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const Q7=_t("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** 141 * @license lucide-react v0.462.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const SC=_t("FileCode",[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",ke
145y:"1mlx9k"}]]);/** 146 * @license lucide-react v0.462.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const Cx=_t("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** 151 * @license lucide-react v0.462.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const Px=_t("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** 156 * @license lucide-react v0.462.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const eD=_t("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 161 * @license lucide-react v0.462.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const kC=_t("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);/** 166 * @license lucide-react v0.462.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const tD=_t("Linkedin",[["path",{d:"M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z",key:"c2jq9f"}],["rect",{width:"4",height:"12",x:"2",y:"9",key:"mk3on5"}],["circle",{cx:"4",cy:"4",r:"2",key:"bt5ra8"}]]);/** 171 * @license lucide-react v0.462.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const Tx=_t("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 176 * @license lucide-react v0.462.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const jS=_t("LogIn",[["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}],["polyline",{points:"10 17 15 12 10 7",key:"1ail0h"}],["line",{x1:"15",x2:"3",y1:"12",y2:"12",key:"v6grx8"}]]);/** 181 * @license lucide-react v0.462.0 - ISC 182 * 183 * This source code is licensed under the ISC license. 184 * See the LICENSE file in the root directory of this source tree. 185 */const OS=_t("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 186 * @license lucide-react v0.462.0 - ISC 187 * 188 * This source code is licensed under the ISC license. 189 * See the LICENSE file in the root directory of this source tree. 190 */const Rx=_t("Mail",[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]]);/** 191 * @license lucide-react v0.462.0 - ISC 192 * 193 * This source code is licensed under the ISC license. 194 * See the LICENSE file in the root directory of this source tree. 195 */const nD=_t("MapPin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]]);/** 196 * @license lucide-react v0.462.0 - ISC 197 * 198 * This source code is licensed under the ISC license. 199 * See the LICENSE file in the root directory of this source tree. 200 */const rD=_t("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 201 * @license lucide-react v0.462.0 - ISC 202 * 203 * This source code is licensed under the ISC license. 204 * See the LICENSE file in the root directory of this source tree. 205 */const iD=_t("MessageCircleQuestion",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 206 * @license lucide-react v0.462.0 - ISC 207 * 208 * This source code is licensed under the ISC license. 209 * See the LICENSE file in the root directory of this source tree. 210 */const EC=_t("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** 211 * @license lucide-react v0.462.0 - ISC 212 * 213 * This source code is licensed under the ISC license. 214 * See the LICENSE file in the root directory of this source tree. 215 */const sD=_t("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** 216 * @license lucide-react v0.462.0 - ISC 217 * 218 * This source code is licensed under the ISC license. 219 * See the LICENSE file in the root directory of this source tree. 220 */const NC=_t("Newspaper",[["path",{d:"M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2",key:"7pis2x"}],["path",{d:"M18 14h-8",key:"sponae"}],["path",{d:"M15 18h-5",key:"95g1m2"}],["path",{d:"M10 6h8v4h-8V6Z",key:"smlsk5"}]]);/** 221 * @license lucide-react v0.462.0 - ISC 222 * 223 * This source code is licensed under the ISC license. 224 * See the LICENSE file in the root directory of this source tree. 225 */const aD=_t("Phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]]);/** 226 * @license lucide-react v0.462.0 - ISC 227 * 228 * This source code is licensed under the ISC license. 229 * See the LICENSE file in the root directory of this source tree. 230 */const oD=_t("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** 231 * @license lucide-react v0.462.0 - ISC 232 * 233 * This source code is licensed under the ISC license. 234 * See the LICENSE file in the root directory of this source tree. 235 */const AC=_t("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 236 * @license lucide-react v0.462.0 - ISC 237 * 238 * This source code is licensed under the ISC license. 239 * See the LICENSE file in the root directory of this source tree. 240 */const lD=_t("Send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);/** 241 * @license lucide-react v0.462.0 - ISC 242 * 243 * This source code is licensed under the ISC license. 244 * See the LICENSE file in the root directory of this source tree. 245 */const cD=_t("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** 246 * @license lucide-react v0.462.0 - ISC 247 * 248 * This source code is licensed under the ISC license. 249 * See the LICENSE file in the root directory of this source tree. 250 */const uD=_t("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** 251 * @license lucide-react v0.462.0 - ISC 252 * 253 * This source code is licensed under the ISC license. 254 * See the LICENSE file in the root directory of this source tree.
vendor: 10,015 bytes, lines 255-280
255 */const CC=_t("Tag",[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]);/** 256 * @license lucide-react v0.462.0 - ISC 257 * 258 * This source code is licensed under the ISC license. 259 * See the LICENSE file in the root directory of this source tree. 260 */const PC=_t("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 261 * @license lucide-react v0.462.0 - ISC 262 * 263 * This source code is licensed under the ISC license. 264 * See the LICENSE file in the root directory of this source tree. 265 */const dD=_t("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 266 * @license lucide-react v0.462.0 - ISC 267 * 268 * This source code is licensed under the ISC license. 269 * See the LICENSE file in the root directory of this source tree. 270 */const hD=_t("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 271 * @license lucide-react v0.462.0 - ISC 272 * 273 * This source code is licensed under the ISC license. 274 * See the LICENSE file in the root directory of this source tree. 275 */const jd=_t("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);/** 276 * @license lucide-react v0.462.0 - ISC 277 * 278 * This source code is licensed under the ISC license. 279 * See the LICENSE file in the root directory of this source tree. 280 */const fD=_t("Zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]),Lx="-",pD=t=>{const e=gD(t),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:a=>{const o=a.split(Lx);return o[0]===""&&o.length!==1&&o.shift(),TC(o,e)||mD(a)},getConflictingClassGroupIds:(a,o)=>{const l=n[a]||[];return o&&r[a]?[...l,...r[a]]:l}}},TC=(t,e)=>{var a;if(t.length===0)return e.classGroupId;const n=t[0],r=e.nextPart.get(n),i=r?TC(t.slice(1),r):void 0;if(i)return i;if(e.validators.length===0)return;const s=t.join(Lx);return(a=e.validators.find(({validator:o})=>o(s)))==null?void 0:a.classGroupId},IS=/^\[(.+)\]$/,mD=t=>{if(IS.test(t)){const e=IS.exec(t)[1],n=e==null?void 0:e.substring(0,e.indexOf(":"));if(n)return"arbitrary.."+n}},gD=t=>{const{theme:e,prefix:n}=t,r={nextPart:new Map,validators:[]};return yD(Object.entries(t.classGroups),n).forEach(([s,a])=>{xw(a,r,s,e)}),r},xw=(t,e,n,r)=>{t.forEach(i=>{if(typeof i=="string"){const s=i===""?e:DS(e,i);s.classGroupId=n;return}if(typeof i=="function"){if(vD(i)){xw(i(r),e,n,r);return}e.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,a])=>{xw(a,DS(e,s),n,r)})})},DS=(t,e)=>{let n=t;return e.split(Lx).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},vD=t=>t.isThemeGetter,yD=(t,e)=>e?t.map(([n,r])=>{const i=r.map(s=>typeof s=="string"?e+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([a,o])=>[e+a,o])):s);return[n,i]}):t,wD=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,n=new Map,r=new Map;const i=(s,a)=>{n.set(s,a),e++,e>t&&(e=0,r=n,n=new Map)};return{get(s){let a=n.get(s);if(a!==void 0)return a;if((a=r.get(s))!==void 0)return i(s,a),a},set(s,a){n.has(s)?n.set(s,a):i(s,a)}}},RC="!",bD=t=>{const{separator:e,experimentalParseClassName:n}=t,r=e.length===1,i=e[0],s=e.length,a=o=>{const l=[];let c=0,u=0,d;for(let _=0;_<o.length;_++){let w=o[_];if(c===0){if(w===i&&(r||o.slice(_,_+s)===e)){l.push(o.slice(u,_)),u=_+s;continue}if(w==="/"){d=_;continue}}w==="["?c++:w==="]"&&c--}const f=l.length===0?o:o.substring(u),h=f.startsWith(RC),y=h?f.substring(1):f,v=d&&d>u?d-u:void 0;return{modifiers:l,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:v}};return n?o=>n({className:o,parseClassName:a}):a},xD=t=>{if(t.length<=1)return t;const e=[];let n=[];return t.forEach(r=>{r[0]==="["?(e.push(...n.sort(),r),n=[]):n.push(r)}),e.push(...n.sort()),e},_D=t=>({cache:wD(t.cacheSize),parseClassName:bD(t),...pD(t)}),SD=/\s+/,kD=(t,e)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i}=e,s=[],a=t.trim().split(SD);let o="";for(let l=a.length-1;l>=0;l-=1){const c=a[l],{modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:h}=n(c);let y=!!h,v=r(y?f.substring(0,h):f);if(!v){if(!y){o=c+(o.length>0?" "+o:o);continue}if(v=r(f),!v){o=c+(o.length>0?" "+o:o);continue}y=!1}const _=xD(u).join(":"),w=d?_+RC:_,x=w+v;if(s.includes(x))continue;s.push(x);const k=i(v,y);for(let N=0;N<k.length;++N){const R=k[N];s.push(w+R)}o=c+(o.length>0?" "+o:o)}return o};function ED(){let t=0,e,n,r="";for(;t<arguments.length;)(e=arguments[t++])&&(n=LC(e))&&(r&&(r+=" "),r+=n);return r}const LC=t=>{if(typeof t=="string")return t;let e,n="";for(let r=0;r<t.length;r++)t[r]&&(e=LC(t[r]))&&(n&&(n+=" "),n+=e);return n};function ND(t,...e){let n,r,i,s=a;function a(l){const c=e.reduce((u,d)=>d(u),t());return n=_D(c),r=n.cache.get,i=n.cache.set,s=o,o(l)}function o(l){const c=r(l);if(c)return c;const u=kD(l,n);return i(l,u),u}return function(){return s(ED.apply(null,arguments))}}const mn=t=>{const e=n=>n[t]||[];return e.isThemeGetter=!0,e},jC=/^\[(?:([a-z-]+):)?(.+)\]$/i,AD=/^\d+\/\d+$/,CD=new Set(["px","full","screen"]),PD=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,TD=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,RD=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,LD=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jD=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Da=t=>Uu(t)||CD.has(t)||AD.test(t),To=t=>Od(t,"length",UD),Uu=t=>!!t&&!Number.isNaN(Number(t)),my=t=>Od(t,"number",Uu),Eh=t=>!!t&&Number.isInteger(Number(t)),OD=t=>t.endsWith("%")&&Uu(t.slice(0,-1)),Lt=t=>jC.test(t),Ro=t=>PD.test(t),ID=new Set(["length","size","percentage"]),DD=t=>Od(t,ID,OC),MD=t=>Od(t,"position",OC),FD=new Set(["image","url"]),zD=t=>Od(t,FD,qD),$D=t=>Od(t,"",BD),Nh=()=>!0,Od=(t,e,n)=>{const r=jC.exec(t);return r?r[1]?typeof e=="string"?r[1]===e:e.has(r[1]):n(r[2]):!1},UD=t=>TD.test(t)&&!RD.test(t),OC=()=>!1,BD=t=>LD.test(t),qD=t=>jD.test(t),HD=()=>{const t=mn("colors"),e=mn("spacing"),n=mn("blur"),r=mn("brightness"),i=mn("borderColor"),s=mn("borderRadius"),a=mn("borderSpacing"),o=mn("borderWidth"),l=mn("contrast"),c=mn("grayscale"),u=mn("hueRotate"),d=mn("invert"),f=mn("gap"),h=mn("gradientColorStops"),y=mn("gradientColorStopPositions"),v=mn("inset"),_=mn("margin"),w=mn("opacity"),x=mn("padding"),k=mn("saturate"),N=mn("scale"),R=mn("sepia"),H=mn("skew"),F=mn("space"),M=mn("translate"),I=()=>["auto","contain","none"],G=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",Lt,e],j=()=>[Lt,e],W=()=>["",Da,To],z=()=>["auto",Uu,Lt],re=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["solid","dashed","dotted","double","none"],oe=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],U=()=>["start","end","center","between","around","evenly","stretch"],J=()=>["","0",Lt],de=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ie=()=>[Uu,Lt];return{cacheSize:500,separator:":",theme:{colors:[Nh],spacing:[Da,To],blur:["none","",Ro,Lt],brightness:ie(),borderColor:[t],borderRadius:["none","","full",Ro,Lt],borderSpacing:j(),borderWidth:W(),contrast:ie(),grayscale:J(),hueRotate:ie(),invert:J(),gap:j(),gradientColorStops:[t],gradientColorStopPositions:[OD,To],inset:L(),margin:L(),opacity:ie(),padding:j(),saturate:ie(),scale:ie(),sepia:J(),skew:ie(),space:j(),translate:j()},classGroups:{aspect:[{aspect:["auto","square","video",Lt]}],container:["container"],columns:[{columns:[Ro]}],"break-after":[{"break-after":de()}],"break-before":[{"break-before":de()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...re(),Lt]}],overflow:[{overflow:G()}],"overflow-x":[{"overflow-x":G()}],"overflow-y":[{"overflow-y":G()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[v]}],"inset-x":[{"inset-x":[v]}],"inset-y":[{"inset-y":[v]}],start:[{start:[v]}],end:[{end:[v]}],top:[{top:[v]}],right:[{right:[v]}],bottom:[{bottom:[v]}],left:[{left:[v]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Eh,Lt]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Lt]}],grow:[{grow:J()}],shrink:[{shrink:J()}],order:[{order:["first","last","none",Eh,Lt]}],"grid-cols":[{"grid-cols":[Nh]}],"col-start-end":[{col:["auto",{span:["full",Eh,Lt]},Lt]}],"col-start":[{"col-start":z()}
vendor: 9,356 bytes, line 280
280],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[Nh]}],"row-start-end":[{row:["auto",{span:[Eh,Lt]},Lt]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Lt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Lt]}],gap:[{gap:[f]}],"gap-x":[{"gap-x":[f]}],"gap-y":[{"gap-y":[f]}],"justify-content":[{justify:["normal",...U()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...U(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...U(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[_]}],mx:[{mx:[_]}],my:[{my:[_]}],ms:[{ms:[_]}],me:[{me:[_]}],mt:[{mt:[_]}],mr:[{mr:[_]}],mb:[{mb:[_]}],ml:[{ml:[_]}],"space-x":[{"space-x":[F]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[F]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Lt,e]}],"min-w":[{"min-w":[Lt,e,"min","max","fit"]}],"max-w":[{"max-w":[Lt,e,"none","full","min","max","fit","prose",{screen:[Ro]},Ro]}],h:[{h:[Lt,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Lt,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Lt,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Lt,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Ro,To]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",my]}],"font-family":[{font:[Nh]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Lt]}],"line-clamp":[{"line-clamp":["none",Uu,my]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Da,Lt]}],"list-image":[{"list-image":["none",Lt]}],"list-style-type":[{list:["none","disc","decimal",Lt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Da,To]}],"underline-offset":[{"underline-offset":["auto",Da,Lt]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:j()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Lt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Lt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...re(),MD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",DD]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},zD]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[o]}],"border-w-x":[{"border-x":[o]}],"border-w-y":[{"border-y":[o]}],"border-w-s":[{"border-s":[o]}],"border-w-e":[{"border-e":[o]}],"border-w-t":[{"border-t":[o]}],"border-w-r":[{"border-r":[o]}],"border-w-b":[{"border-b":[o]}],"border-w-l":[{"border-l":[o]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...ne(),"hidden"]}],"divide-x":[{"divide-x":[o]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[o]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:ne()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[Da,Lt]}],"outline-w":[{outline:[Da,To]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[Da,To]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Ro,$D]}],"shadow-color":[{shadow:[Nh]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...oe(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":oe()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Ro,Lt]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[k]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[k]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Lt]}],duration:[{duration:ie()}],ease:[{ease:["linear","in","out","in-out",Lt]}],delay:[{delay:ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",Lt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[N]}],"scale-x":[{"scale-x":[N]}],"scale-y":[{"scale-y":[N]}],rotate:[{rotate:[Eh,Lt]}],"translate-x":[{"translate-x":[M]}],"translate-y":[{"translate-y":[M]}],"skew-x":[{"skew-x":[H]}],"skew-y":[{"skew-y":[H]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Lt]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Lt]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":j()}],"scroll-mx":[{"scroll-mx":j()}],"scroll-my":[{"scroll-my":j()}],"scroll-ms":[{"scroll-ms":j()}],"scroll-me":[{"scroll-me":j()}],"scroll-mt":[{"scroll-mt":j()}],"scroll-mr":[{"scroll-mr":j()}],"scroll-mb":[{"scroll-mb":j()}],"scroll-ml":[{"scroll-ml":j()}],"scroll-p":[{"scroll-p":j()}],"scroll-px":[{"scroll-px":j()}],"scroll-py":[{"scroll-py":j()}],"scroll-ps":[{"scroll-ps":j()}],"scroll-pe":[{"scroll-pe":j()}],"scroll-pt":[{"scroll-pt":j()}],"scroll-pr":[{"scroll-pr":j()}],"scroll-pb":[{"scroll-pb":j()}],"scroll-pl":[{"scroll-pl":j()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}
vendor: 4,613 bytes, line 280
280],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Lt]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[Da,To,my]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},WD=ND(HD);function St(...t){return WD(yC(t))}const VD=U7,IC=E.forwardRef(({className:t,...e},n)=>m.jsx(dC,{ref:n,className:St("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",t),...e}));IC.displayName=dC.displayName;const GD=Ld("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),DC=E.forwardRef(({className:t,variant:e,...n},r)=>m.jsx(hC,{ref:r,className:St(GD({variant:e}),t),...n}));DC.displayName=hC.displayName;const KD=E.forwardRef(({className:t,...e},n)=>m.jsx(mC,{ref:n,className:St("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",t),...e}));KD.displayName=mC.displayName;const MC=E.forwardRef(({className:t,...e},n)=>m.jsx(gC,{ref:n,className:St("absolute right-2 top-2 rounded-md p-1 text-foreground
280/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",t),"toast-close":"",...e,children:m.jsx(jd,{className:"h-4 w-4"})}));MC.displayName=gC.displayName;const FC=E.forwardRef(({className:t,...e},n)=>m.jsx(fC,{ref:n,className:St("text-sm font-semibold",t),...e}));FC.displayName=fC.displayName;const zC=E.forwardRef(({className:t,...e},n)=>m.jsx(pC,{ref:n,className:St("text-sm opacity-90",t),...e}));zC.displayName=pC.displayName;const ZD=1,YD=1e6;let gy=0;function JD(){return gy=(gy+1)%Number.MAX_SAFE_INTEGER,gy.toString()}const vy=new Map,MS=t=>{if(vy.has(t))return;const e=setTimeout(()=>{vy.delete(t),tf({type:"REMOVE_TOAST",toastId:t})},YD);vy.set(t,e)},XD=(t,e)=>{switch(e.type){case"ADD_TOAST":return{...t,toasts:[e.toast,...t.toasts].slice(0,ZD)};case"UPDATE_TOAST":return{...t,toasts:t.toasts.map(n=>n.id===e.toast.id?{...n,...e.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=e;return n?MS(n):t.toasts.forEach(r=>{MS(r.id)}),{...t,toasts:t.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return e.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(n=>n.id!==e.toastId)}}},Ig=[];let Dg={toasts:[]};function tf(t){Dg=XD(Dg,t),Ig.forEach(e=>{e(Dg)})}function QD({...t}){const e=JD(),n=i=>tf({type:"UPDATE_TOAST",toast:{...i,id:e}}),r=()=>tf({type:"DISMISS_TOAST",toastId:e});return tf({type:"ADD_TOAST",toast:{...t,id:e,open:!0,onOpenChange:i=>{i||r()}}}),{id:e,dismiss:r,update:n}}function Tc(){const[t,e]=E.useState(Dg);return E.useEffect(()=>(Ig.push(e),()=>{const n=Ig.indexOf(e);n>-1&&Ig.splice(n,1)}),[t]),{...t,toast:QD,dismiss:n=>tf({type:"DISMISS_TOAST",toastId:n})}}function eM(){const{toasts:t}=Tc();return m.jsxs(VD,{children:[t.map(function({id:e,title:n,description:r,action:i,...s}){return m.jsxs(DC,{...s,children:[m.jsxs("div",{className:"grid gap-1",children:[n&&m.jsx(FC,{children:n}),r&&m.jsx(zC,{children:r})]}),i,m.jsx(MC,{})]},e)}),m.jsx(IC,{})]})}var FS=["light","dark"],tM="(prefers-color-scheme: dark)",nM=E.createContext(void 0),rM={setTheme:t=>{},themes:[]},iM=()=>{var t;return(t=E.useContext(nM))!=null?t:rM};E.memo(({forcedTheme:t,storageKey:e,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:s,value:a,attrs:o,nonce:l})=>{let c=s==="system",u=n==="class"?`var d=document.documentElement,c=d.classList;${`c.remove(${o.map(y=>`'${y}'`).join(",")})`};`:`var d=document.documentElement,n='${n}',s='setAttribute';`,d=i?FS.includes(s)&&s?`if(e==='light'||e==='dark'||!e)d.style.colorScheme=e||'${s}'`:"if(e==='light'||e==='dark')d.style.colorScheme=e":"",f=(y,v=!1,_=!0)=>{let w=a?a[y]:y,x=v?y+"|| ''":`'${w}'`,k="";return i&&_&&!v&&FS.includes(y)&&(k+=`d.style.colorScheme = '${y}';`),n==="class"?v||w?k+=`c.add(${x})`:k+="null":w&&(k+=`d[s](n,${x})`),k},h=t?`!function(){${u}${f(t)}}()`:r?`!function(){try{${u}var e=localStorage.getItem('${e}');if('system'===e||(!e&&${c})){var t='${tM}',m=window.matchMedia(t);if(m.media!==t||m.matches){${f("dark")}}else{${f("light")}}}else if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}${c?"":"else{"+f(s,!1,!1)+"}"}${d}}catch(e){}}()`:`!function(){try{${u}var e=localStorage.getItem('${e}');if(e){${a?`var x=${JSON.stringify(a)};`:""}${f(a?"x[e]":"e",!0)}}else{${f(s,!1,!1)};}${d}}catch(t){}}();`;return E.createElement("script",{nonce:l,dangerouslySetInnerHTML:{__html:h}})});var sM=t=>{switch(t){case"success":return lM;case"info":return uM;case"warning":return cM;case"error":return dM;default:return null}},aM=Array(12).fill(0),oM=({visible:t})=>ye.createElement("div",{className:"sonner-loading-wrapper","data-visible":t},ye.createElement("div",{className:"sonner-spinner"},aM.map((e,n)=>ye.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),lM=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),cM=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
280currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),uM=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),dM=ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},ye.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),hM=()=>{let[t,e]=ye.useState(document.hidden);return ye.useEffect(()=>{let n=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t},_w=1,fM=class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{let n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;let{message:r,...i}=e,s=typeof(e==null?void 0:e.id)=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:_w++,a=this.toasts.find(l=>l.id===s),o=e.dismissible===void 0?!0:e.dismissible;return a?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...e,id:s,title:r}),{...l,...e,id:s,dismissible:o,title:r}):l):this.addToast({title:r,...i,dismissible:o,id:s}),s},this.dismiss=e=>(e||this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),this.subscribers.forEach(n=>n({id:e,dismiss:!0})),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));let i=e instanceof Promise?e:e(),s=r!==void 0;return i.then(async a=>{if(mM(a)&&!a.ok){s=!1;let o=typeof n.error=="function"?await n.error(`HTTP error! status: ${a.status}`):n.error,l=typeof n.description=="function"?await n.description(`HTTP error! status: ${a.status}`):n.description;this.create({id:r,type:"error",message:o,description:l})}else if(n.success!==void 0){s=!1;let o=typeof n.success=="function"?await n.success(a):n.success,l=typeof n.description=="function"?await n.description(a):n.description;this.create({id:r,type:"success",message:o,description:l})}}).catch(async a=>{if(n.error!==void 0){s=!1;let o=typeof n.error=="function"?await n.error(a):n.error,l=typeof n.description=="function"?await n.description(a):n.description;this.create({id:r,type:"error",message:o,description:l})}}).finally(()=>{var a;s&&(this.dismiss(r),r=void 0),(a=n.finally)==null||a.call(n)}),r},this.custom=(e,n)=>{let r=(n==null?void 0:n.id)||_w++;return this.create({jsx:e(r),id:r,...n}),r},this.subscribers=[],this.toasts=[]}},ki=new fM,pM=(t,e)=>{let n=(e==null?void 0:e.id)||_w++;return ki.addToast({title:t,...e,id:n}),n},mM=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",gM=pM,vM=()=>ki.toasts,Um=Object.assign(gM,{success:ki.success,info:ki.info,warning:ki.warning,error:ki.error,custom:ki.custom,message:ki.message,promise:ki.promise,dismiss:ki.dismiss,loading:ki.loading},{getHistory:vM}
280);function yM(t,{insertAt:e}={}){if(typeof document>"u")return;let n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",e==="top"&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}yM(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999}:where([data-sonner-toaster][data-x-position="right"]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position="left"]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;
280left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;background:var(--gray1);color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}
280:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount, 0px));transition:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{0%{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;--mobile-offset: 16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} 281`);function Bm(t){return t.label!==void 0}var wM=3,bM="32px",xM=4e3,_M=356,SM=14,kM=20,EM=200;function NM(...t){return t.filter(Boolean).join(" ")}var AM=t=>{var e,n,r,i,s,a,o,l,c,u;let{invert:d,toast:f,unstyled:h,interacting:y,setHeights:v,visibleToasts:_,heights:w,index:x,toasts:k,expanded:N,removeToast:R,defaultRichColors:H,closeButton:F,style:M,cancelButtonStyle:I,actionButtonStyle:G,className:L="",descriptionClassName:j="",duration:W,position:z,gap:re,loadingIcon:ne,expandByDefault:oe,classNames:U,icons:J,closeButtonAriaLabel:de="Close toast",pauseWhenPageIsHidden:ie,cn:C}=t,[q,X]=ye.useState(!1),[Q,ee]=ye.useState(!1),[le,me]=ye.useState(!1),[pe,ge]=ye.useState(!1),[Ne,je]=ye.useState(0),[Re,Ke]=ye.useState(0),V=ye.useRef(null),Te=ye.useRef(null),wt=x===0,it=x+1<=_,_e=f.type,et=f.dismissible!==!1,$e=f.className||"",ot=f.descriptionClassName||"",Je=ye.useMemo(()=>w.findIndex(ze=>ze.toastId===f.id)||0,[w,f.id]),Gt=ye.useMemo(()=>{var ze;return(ze=f.closeButton)!=null?ze:F},[f.closeButton,F]),It=ye.useMemo(()=>f.duration||W||xM,[f.duration,W]),ft=ye.useRef(0),Nt=ye.useRef(0),Dt=ye.useRef(0),Ue=ye.useRef(null),[vt,Xe]=z.split("-"),wn=ye.useMemo(()=>w.reduce((ze,Ie,Me)=>Me>=Je?ze:ze+Ie.height,0),[w,Je]),Ft=hM(),Pt=f.invert||d,kt=_e==="loading";Nt.current=ye.useMemo(()=>Je*re+wn,[Je,wn]),ye.useEffect(()=>{X(!0)},[]),ye.useLayoutEffect(()=>{if(!q)return;let ze=Te.current,Ie=ze.style.height;ze.style.height="auto";let Me=ze.getBoundingClientRect().height;ze.style.height=Ie,Ke(Me),v(zt=>zt.find(ut=>ut.toastId===f.id)?zt.map(ut=>
281ut.toastId===f.id?{...ut,height:Me}:ut):[{toastId:f.id,height:Me,position:f.position},...zt])},[q,f.title,f.description,v,f.id]);let qt=ye.useCallback(()=>{ee(!0),je(Nt.current),v(ze=>ze.filter(Ie=>Ie.toastId!==f.id)),setTimeout(()=>{R(f)},EM)},[f,R,v,Nt]);ye.useEffect(()=>{if(f.promise&&_e==="loading"||f.duration===1/0||f.type==="loading")return;let ze,Ie=It;return N||y||ie&&Ft?(()=>{if(Dt.current<ft.current){let Me=new Date().getTime()-ft.current;Ie=Ie-Me}Dt.current=new Date().getTime()})():Ie!==1/0&&(ft.current=new Date().getTime(),ze=setTimeout(()=>{var Me;(Me=f.onAutoClose)==null||Me.call(f,f),qt()},Ie)),()=>clearTimeout(ze)},[N,y,oe,f,It,qt,f.promise,_e,ie,Ft]),ye.useEffect(()=>{let ze=Te.current;if(ze){let Ie=ze.getBoundingClientRect().height;return Ke(Ie),v(Me=>[{toastId:f.id,height:Ie,position:f.position},...Me]),()=>v(Me=>Me.filter(zt=>zt.toastId!==f.id))}},[v,f.id]),ye.useEffect(()=>{f.delete&&qt()},[qt,f.delete]);function st(){return J!=null&&J.loading?ye.createElement("div",{className:"sonner-loader","data-visible":_e==="loading"},J.loading):ne?ye.createElement("div",{className:"sonner-loader","data-visible":_e==="loading"},ne):ye.createElement(oM,{visible:_e==="loading"})}return ye.createElement("li",{"aria-live":f.important?"assertive":"polite","aria-atomic":"true",role:"status",tabIndex:0,ref:Te,className:C(L,$e,U==null?void 0:U.toast,(e=f==null?void 0:f.classNames)==null?void 0:e.toast,U==null?void 0:U.default,U==null?void 0:U[_e],(n=f==null?void 0:f.classNames)==null?void 0:n[_e]),"data-sonner-toast":"","data-rich-colors":(r=f.richColors)!=null?r:H,"data-styled":!(f.jsx||f.unstyled||h),"data-mounted":q,"data-promise":!!f.promise,"data-removed":Q,"data-visible":it,"data-y-position":vt,"data-x-position":Xe,"data-index":x,"data-front":wt,"data-swiping":le,"data-dismissible":et,"data-type":_e,"data-invert":Pt,"data-swipe-out":pe,"data-expanded":!!(N||oe&&q),style:{"--index":x,"--toasts-before":x,"--z-index":k.length-x,"--offset":`${Q?Ne:Nt.current}px`,"--initial-height":oe?"auto":`${Re}px`,...M,...f.style},onPointerDown:ze=>{kt||!et||(V.current=new Date,je(Nt.current),ze.target.setPointerCapture(ze.pointerId),ze.target.tagName!=="BUTTON"&&(me(!0),Ue.current={x:ze.clientX,y:ze.clientY}))},onPointerUp:()=>{var ze,Ie,Me,zt;if(pe||!et)return;Ue.current=null;let ut=Number(((ze=Te.current)==null?void 0:ze.style.getPropertyValue("--swipe-amount").replace("px",""))||0),at=new Date().getTime()-((Ie=V.current)==null?void 0:Ie.getTime()),Kt=Math.abs(ut)/at;if(Math.abs(ut)>=kM||Kt>.11){je(Nt.current),(Me=f.onDismiss)==null||Me.call(f,f),qt(),ge(!0);return}(zt=Te.current)==null||zt.style.setProperty("--swipe-amount","0px"),me(!1)},onPointerMove:ze=>{var Ie;if(!Ue.current||!et)return;let Me=ze.clientY-Ue.current.y,zt=ze.clientX-Ue.current.x,ut=(vt==="top"?Math.min:Math.max)(0,Me),at=ze.pointerType==="touch"?10:2;Math.abs(ut)>at?(Ie=Te.current)==null||Ie.style.setProperty("--swipe-amount",`${Me}px`):Math.abs(zt)>at&&(Ue.current=null)}},Gt&&!f.jsx?ye.createElement("button",{"aria-label":de,"data-disabled":kt,"data-close-button":!0,onClick:kt||!et?()=>{}:()=>{var ze;qt(),(ze=f.onDismiss)==null||ze.call(f,f)},className:C(U==null?void 0:U.closeButton,(i=f==null?void 0:f.classNames)==null?void 0:i.closeButton)},ye.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},ye.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),ye.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}))):null,f.jsx||ye.isValidElement(f.title)?f.jsx||f.title:ye.createElement(ye.Fragment,null,_e||f.icon||f.promise?ye.createElement("div",{"data-icon":"",className:C(U==null?void 0:U.icon,(s=f==null?void 0:f.classNames)==null?void 0:s.icon)},f.promise||f.type==="loading"&&!f.icon?f.icon||st():null,f.type!=="loading"?f.icon||(J==null?void 0:J[_e])||sM(_e):null):null,ye.createElement("div",{"data-content":"",className:C(U==null?void 0:U.content,(a=f==null?void 0:f.classNames)==null?void 0:a.content)},ye.createElement("div",{"data-title":"",className:C(U==null?void 0:U.title,(o=f==null?void 0:f.classNames)==null?void 0:o.title)},f.title),f.description?ye.createElement("div",{"data-description":"",className:C(j,ot,U==null?void 0:U.description,(l=f==null?void 0:f.classNames)==null?void 0:l.description)},f.description):null),ye.isValidElement(f.cancel)?f.cancel:f.cancel&&Bm(f.cancel)?ye.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||I,onClick:ze=>{var Ie,Me;Bm(f.cancel)&&et&&((Me=(Ie=f.cancel).onClick)==null||Me.call(Ie,ze),qt())},className:C(U==null?void 0:U.cancelButton,(c=f==null?void 0:f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,ye.isValidElement(f.action)?f.action:f.action&&Bm(f.action)?ye.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||G,onClick:ze=>{var Ie,Me;Bm(f.action)&&(ze.defaultPrevented||((Me=(Ie=f.action).onClick)==null||Me.call(Ie,ze),qt()))},className:C(U==null?void 0:U.actionButton,(u=f==null?void 0:f.classNames)==null?void 0:u.actionButton)},f.action.label):null))};function zS(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}var CM=t=>{let{invert:e,position:n="bottom-right",hotkey:r=["altKey","KeyT"],expand:i,closeButton:s,className:a,offset:o,theme:l="light",richColors:c,duration:u,style:d,visibleToasts:f=wM,toastOptions:h,dir:y=zS(),gap:v=SM,loadingIcon:_,icons:w,containerAriaLabel:x="Notifications",pauseWhenPageIsHidden:k,cn:N=NM}=t,[R,H]=ye.useState([]),F=ye.useMemo(()=>Array.from(new Set([n].concat(R.filter(ie=>ie.position).map(ie=>ie.position)))),[R,n]),[M,I]=ye.useState([]),[G,L]=ye.useState(!1),[j,W]=ye.useState(!1),[z,re]=ye.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
281k":"light"),ne=ye.useRef(null),oe=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),U=ye.useRef(null),J=ye.useRef(!1),de=ye.useCallback(ie=>{var C;(C=R.find(q=>q.id===ie.id))!=null&&C.delete||ki.dismiss(ie.id),H(q=>q.filter(({id:X})=>X!==ie.id))},[R]);return ye.useEffect(()=>ki.subscribe(ie=>{if(ie.dismiss){H(C=>C.map(q=>q.id===ie.id?{...q,delete:!0}:q));return}setTimeout(()=>{_v.flushSync(()=>{H(C=>{let q=C.findIndex(X=>X.id===ie.id);return q!==-1?[...C.slice(0,q),{...C[q],...ie},...C.slice(q+1)]:[ie,...C]})})})}),[]),ye.useEffect(()=>{if(l!=="system"){re(l);return}l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?re("dark"):re("light")),typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",({matches:ie})=>{re(ie?"dark":"light")})},[l]),ye.useEffect(()=>{R.length<=1&&L(!1)},[R]),ye.useEffect(()=>{let ie=C=>{var q,X;r.every(Q=>C[Q]||C.code===Q)&&(L(!0),(q=ne.current)==null||q.focus()),C.code==="Escape"&&(document.activeElement===ne.current||(X=ne.current)!=null&&X.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",ie),()=>document.removeEventListener("keydown",ie)},[r]),ye.useEffect(()=>{if(ne.current)return()=>{U.current&&(U.current.focus({preventScroll:!0}),U.current=null,J.current=!1)}},[ne.current]),R.length?ye.createElement("section",{"aria-label":`${x} ${oe}`,tabIndex:-1},F.map((ie,C)=>{var q;let[X,Q]=ie.split("-");return ye.createElement("ol",{key:ie,dir:y==="auto"?zS():y,tabIndex:-1,ref:ne,className:a,"data-sonner-toaster":!0,"data-theme":z,"data-y-position":X,"data-x-position":Q,style:{"--front-toast-height":`${((q=M[0])==null?void 0:q.height)||0}px`,"--offset":typeof o=="number"?`${o}px`:o||bM,"--width":`${_M}px`,"--gap":`${v}px`,...d},onBlur:ee=>{J.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(J.current=!1,U.current&&(U.current.focus({preventScroll:!0}),U.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||J.current||(J.current=!0,U.current=ee.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{j||L(!1)},onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||W(!0)},onPointerUp:()=>W(!1)},R.filter(ee=>!ee.position&&C===0||ee.position===ie).map((ee,le)=>{var me,pe;return ye.createElement(AM,{key:ee.id,icons:w,index:le,toast:ee,defaultRichColors:c,duration:(me=h==null?void 0:h.duration)!=null?me:u,className:h==null?void 0:h.className,descriptionClassName:h==null?void 0:h.descriptionClassName,invert:e,visibleToasts:f,closeButton:(pe=h==null?void 0:h.closeButton)!=null?pe:s,interacting:j,position:ie,style:h==null?void 0:h.style,unstyled:h==null?void 0:h.unstyled,classNames:h==null?void 0:h.classNames,cancelButtonStyle:h==null?void 0:h.cancelButtonStyle,actionButtonStyle:h==null?void 0:h.actionButtonStyle,removeToast:de,toasts:R.filter(ge=>ge.position==ee.position),heights:M.filter(ge=>ge.position==ee.position),setHeights:I,expandByDefault:i,gap:v,loadingIcon:_,expanded:G,pauseWhenPageIsHidden:k,cn:N})}))})):null};const PM=({...t})=>{const{theme:e="system"}=iM();return m.jsx(CM,{theme:e,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}},...t})};function TM(t,e=[]){let n=[];function r(s,a){const o=E.createContext(a),l=n.length;n=[...n,a];const c=d=>{var w;const{scope:f,children:h,...y}=d,v=((w=f==null?void 0:f[t])==null?void 0:w[l])||o,_=E.useMemo(()=>y,Object.values(y));return m.jsx(v.Provider,{value:_,children:h})};c.displayName=s+"Provider";function u(d,f){var v;const h=((v=f==null?void 0:f[t])==null?void 0:v[l])||o,y=E.useContext(h);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(a=>E.createContext(a));return function(o){const l=(o==null?void 0:o[t])||s;return E.useMemo(()=>({[`__scope${t}`]:{...o,[t]:l}}),[o,l])}};return i.scopeName=t,[r,RM(i,...e)]}function RM(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:c}
vendor: 15,545 bytes, line 281
281)=>{const d=l(s)[`__scope${c}`];return{...o,...d}},{});return E.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var LM="DismissableLayer",Sw="dismissableLayer.update",jM="dismissableLayer.pointerDownOutside",OM="dismissableLayer.focusOutside",$S,$C=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),jx=E.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=t,c=E.useContext($C),[u,d]=E.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=E.useState({}),y=an(e,F=>d(F)),v=Array.from(c.layers),[_]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(_),x=u?v.indexOf(u):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,N=x>=w,R=MM(F=>{const M=F.target,I=[...c.branches].some(G=>G.contains(M));!N||I||(i==null||i(F),a==null||a(F),F.defaultPrevented||o==null||o())},f),H=FM(F=>{const M=F.target;[...c.branches].some(G=>G.contains(M))||(s==null||s(F),a==null||a(F),F.defaultPrevented||o==null||o())},f);return _x(F=>{x===c.layers.size-1&&(r==null||r(F),!F.defaultPrevented&&o&&(F.preventDefault(),o()))},f),E.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&($S=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),US(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=$S)}},[u,f,n,c]),E.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),US())},[u,c]),E.useEffect(()=>{const F=()=>h({});return document.addEventListener(Sw,F),()=>document.removeEventListener(Sw,F)},[]),m.jsx(xt.div,{...l,ref:y,style:{pointerEvents:k?N?"auto":"none":void 0,...t.style},onFocusCapture:qe(t.onFocusCapture,H.onFocusCapture),onBlurCapture:qe(t.onBlurCapture,H.onBlurCapture),onPointerDownCapture:qe(t.onPointerDownCapture,R.onPointerDownCapture)})});jx.displayName=LM;var IM="DismissableLayerBranch",DM=E.forwardRef((t,e)=>{const n=E.useContext($C),r=E.useRef(null),i=an(e,r);return E.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(xt.div,{...t,ref:i})});DM.displayName=IM;function MM(t,e=globalThis==null?void 0:globalThis.document){const n=or(t),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let l=function(){UC(jM,n,c,{discrete:!0})};const c={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function FM(t,e=globalThis==null?void 0:globalThis.document){const n=or(t),r=E.useRef(!1);return E.useEffect(()=>{const i=s=>{s.target&&!r.current&&UC(OM,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function US(){const t=new CustomEvent(Sw);document.dispatchEvent(t)}function UC(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?Ap(i,s):i.dispatchEvent(s)}var zM=B4.useId||(()=>{}),$M=0;function eo(t){const[e,n]=E.useState(zM());return Xr(()=>{t||n(r=>r??String($M++))},[t]),t||(e?`radix-${e}`:"")}const UM=["top","right","bottom","left"],fl=Math.min,Ni=Math.max,x0=Math.round,qm=Math.floor,pl=t=>({x:t,y:t}),BM={left:"right",right:"left",bottom:"top",top:"bottom"},qM={start:"end",end:"start"};function kw(t,e,n){return Ni(t,fl(e,n))}function so(t,e){return typeof t=="function"?t(e):t}function ao(t){return t.split("-")[0]}function Id(t){return t.split("-")[1]}function Ox(t){return t==="x"?"y":"x"}function Ix(t){return t==="y"?"height":"width"}function ml(t){return["top","bottom"].includes(ao(t))?"y":"x"}function Dx(t){return Ox(ml(t))}function HM(t,e,n){n===void 0&&(n=!1);const r=Id(t),i=Dx(t),s=Ix(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(a=_0(a)),[a,_0(a)]}function WM(t){const e=_0(t);return[Ew(t),e,Ew(e)]}function Ew(t){return t.replace(/start|end/g,e=>qM[e])}function VM(t,e,n){const r=["left","right"],i=["right","left"],s=["top","bottom"],a=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:r:e?r:i;case"left":case"right":return e?s:a;default:return[]}}function GM(t,e,n,r){const i=Id(t);let s=VM(ao(t),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),e&&(s=s.concat(s.map(Ew)))),s}function _0(t){return t.replace(/left|right|bottom|top/g,e=>BM[e])}function KM(t){return{top:0,right:0,bottom:0,left:0,...t}}function BC(t){return typeof t!="number"?KM(t):{top:t,right:t,bottom:t,left:t}}function S0(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}function BS(t,e,n){let{reference:r,floating:i}=t;const s=ml(e),a=Dx(e),o=Ix(a),l=ao(e),c=s==="y",u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[o]/2-i[o]/2;let h;switch(l){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:d};break;case"left":h={x:r.x-i.width,y:d};break;default:h={x:r.x,y:r.y}}switch(Id(e)){case"start":h[a]-=f*(n&&c?-1:1);break;case"end":h[a]+=f*(n&&c?-1:1);break}return h}const ZM=async(t,e,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(e));let c=await a.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:d}=BS(c,r,l),f=r,h={},y=0;for(let v=0;v<o.length;v++){const{name:_,fn:w}=o[v],{x,y:k,data:N,reset:R}=await w({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:h,rects:c,platform:a,elements:{reference:t,floating:e}});u=x??u,d=k??d,h={...h,[_]:{...h[_],...N}},R&&y<=50&&(y++,typeof R=="object"&&(R.placement&&(f=R.placement),R.rects&&(c=R.rects===!0?await a.getElementRects({reference:t,floating:e,strategy:i}):R.rects),{x:u,y:d}=BS(c,f,l)),v=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:h}};async function Df(t,e){var n;e===void 0&&(e={});const{x:r,y:i,platform:s,rects:a,elements:o,strategy:l}=t,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=so(e,t),y=BC(h),_=o[f?d==="floating"?"reference":"floating":d],w=S0(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(_)))==null||n?_:_.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),x=d==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),N=await(s.isElement==null?void 0:s.isElement(k))?await(s.getScale==null?void 0:s.getScale(k))||{x:1,y:1}:{x:1,y:1},R=S0(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:x,offsetParent:k,strategy:l}):x);return{top:(w.top-R.top+y.top)/N.y,bottom:(R.bottom-w.bottom+y.bottom)/N.y,left:(w.left-R.left+y.left)/N.x,right:(R.right-w.right+y.right)/N.x}}const YM=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:r,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=e,{element:c,padding:u=0}=so(t,e)||{};if(c==null)return{};const d=BC(u),f={x:n,y:r},h=Dx(i),y=Ix(h),v=await a.getDimensions(c),_=h==="y",w=_?"top":"left",x=_?"bottom":"right",k=_?"clientHeight":"clientWidth",N=s.reference[y]+s.reference[h]-f[h]-s.floating[y],R=f[h]-s.reference[h],H=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let F=H?H[k]:0;(!F||!await(a.isElement==null?void 0:a.isElement(H)))&&(F=o.floating[k]||s.floating[y]);const M=N/2-R/2,I=F/2-v[y]/2-1,G=fl(d[w],I),L=fl(d[x],I),j=G,W=F-v[y]-L,z=F/2-v[y]/2+M,re=kw(j,z,W),ne=!l.arrow&&Id(i)!=null&&z!==re&&s.reference[y]/2-(z<j?G:L)-v[y]/2<0,oe=ne?z<j?z-j:z-W:0;return{[h]:f[h]+oe,data:{[h]:re,centerOffset:z-re-oe,...ne&&{alignmentOffset:oe}},reset:ne}}}),JM=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:c}=e,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,..._}=so(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=ao(i),x=ml(o),k=ao(o)===o,N=await(l.isRTL==null?void 0:l.isRTL(c.floating)),R=f||(k||!v?[_0(o)]:WM(o)),H=y!=="none";!f&&H&&R.push(...GM(o,v,y,N));const F=[o,...R],M=await Df(e,_),I=[];let G=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&I.push(M[w]),d){const z=HM(i,a,N);I.push(M[z[0]],M[z[1]])}if(G=[...G,{placement:i,overflows:I}],!I.every(z=>z<=0)){var L,j;const z=(((L=s.flip)==null?void 0:L.index)||0)+1,re=F[z];if(re)return{data:{index:z,overflows:G},reset:{placement:re}};let ne=(j=G.filter(oe=>oe.overflows[0]<=0).sort((oe,U)=>oe.overflows[1]-U.overflows[1])[0])==null?void 0:j.placement;if(!ne)switch(h){case"bestFit":{var W;const oe=(W=G.filter(U=>{if(H){const J=ml(U.placement);return J===x||J==="y"}return!0}).map(U=>[U.placement,U.overflows.filter(J=>J>0).reduce((J,de)=>J+de,0)]).sort((U,J)=>U[1]-J[1])[0])==null?void 0:W[0];oe&&(ne=oe);break}case"initialPlacement":ne=o;break}if(i!==ne)return{reset:{placement:ne}}}return{}}}};function qS(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function HS(t){return UM.some(e=>t[e]>=0)}const XM=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:r="referenceHidden",...i}=so(t,e);switch(r){case"referenceHidden":{const s=await Df(e,{...i,elementContext:"reference"}),a=qS(s,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:HS(a)}}}case"escaped":{const s=await Df(e,{...i,altBoundary:!0}),a=qS(s,n.floating);return{data:{escapedOffsets:a,escaped:HS(a)}}}default:return{}}}}};async function QM(t,e){const{placement:n,platform:r,elements:i}=t,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ao(n),o=Id(n),l=ml(n)==="y",c=["left","top"].includes(a)?-1:1,u=s&&l?-1:1,d=so(e,t);let{mainAxis:f,crossAxis:h,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof y=="number"&&(h=o==="end"?y*-1:y),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}const eF=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,r;const{x:i,y:s,placement:a,middlewareData:o}=e,l=await QM(e,t);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},tF=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:r,placement:i}=e,{mainAxis:s=!0,crossAxis:a=!1,limiter:o={fn:_=>{let{x:w,y:x}=_;return{x:w,y:x}}},...l}=so(t,e),c={x:n,y:r},u=await Df(e,l),d=ml(ao(i)),f=Ox(d);let h=c[f],y=c[d];if(s){const _=f==="y"?"top":"left",w=f==="y"?"bottom":"right",x=h+u[_],k=h-u[w];h=kw(x,h,k)}if(a){const _=d==="y"?"top":"left",w=d==="y"?"bottom":"right",x=y+u[_],k=y-u[w];y=kw(x,y,k)}const v=o.fn({...e,[f]:h,[d]:y});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[f]:s,[d]:a}}}}}},nF=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=e,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=so(t,e),u={x:n,y:r},d=ml(i),f=Ox(d);let h=u[f],y=u[d];const v=so(o,e),_=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const k=f==="y"?"height":"width",N=s.reference[f]-s.floating[k]+_.mainAxis,R=s.reference[f]+s.reference[k]-_.mainAxis;h<N?h=N:h>R&&(h=R)}if(c){var w,x;const k=f==="y"?"width":"height",N=["top","left"].includes(ao(i)),R=s.reference[d]-s.floating[k]+(N&&((w=a.offset)==null?void 0:w[d])||0)+(N?0:_.crossAxis),H=s.reference[d]+s.reference[k]+(N?0:((x=a.offset)==null?void 0:x[d])||0)-(N?_.crossAxis:0);y<R?y=R:y>H&&(y=H)}return{[f]:h,[d]:y}}}},rF=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,r;const{placement:i,rects:s,platform:a,elements:o}=e,{apply:l=()=>{},...c}=so(t,e),u=await Df(e,c),d=ao(i),f=Id(i),h=ml(i)==="y",{width:y,height:v}=s.floating;let _,w;d==="top"||d==="bottom"?(_=d,w=f===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(w=d,_=f==="end"?"top":"bottom");const x=v-u.top-u.bottom,k=y-u.left-u.right,N=fl(v-u[_],x),R=fl(y-u[w],k),H=!e.middlewareData.shift;let F=N,M=R;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(M=k),(r=e.middlewareData.shift)!=null&&r.enabled.y&&(F=x),H&&!f){const G=Ni(u.left,0),L=Ni(u.right,0),j=Ni(u.top,0),W=Ni(u.bottom,0);h?M=y-2*(G!==0||L!==0?G+L:Ni(u.left,u.right)):F=v-2*(j!==0||W!==0?j+W:Ni(u.top,u.bottom))}await l({...e,availableWidth:M,availableHeight:F});const I=await a.getDimensions(o.floating);return y!==I.width||v!==I.height?{reset:{rects:!0}}:{}}}};function Pv(){return typeof window<"u"}function Dd(t){return qC(t)?(t.nodeName||"").toLowerCase():"#document"}function Li(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function fa(t){var e;return(e=(qC(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qC(t){return Pv()?t instanceof Node||t instanceof Li(t).Node:!1}function Cs(t){return Pv()?t instanceof Element||t instanceof Li(t).Element:!1}function ua(t){return Pv()?t instanceof HTMLElement||t instanceof Li(t).HTMLElement:!1}function WS(t){return!Pv()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Li(t).ShadowRoot}function Cp(t){const{overflow:e,overflowX:n,overflowY:r,display:i}=Ps(t);return/auto|scroll|overlay|hidden|clip/.test(e+r+n)&&!["inline","contents"].includes(i)}function iF(t){return["table","td","th"].includes(Dd(t))}function Tv(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Mx(t){const e=Fx(),n=Cs(t)?Ps(t):t;return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function sF(t){let e=gl(t);for(;ua(e)&&!vd(e);){if(Mx(e))return e;if(Tv(e))return null;e=gl(e)}return null}function Fx(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function vd(t){return["html","body","#document"].includes(Dd(t))}function Ps(t){return Li(t).getComputedStyle(t)}function Rv(t){return Cs(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function gl(t){if(Dd(t)==="html")return t;const e=t.assignedSlot||t.parentNode||WS(t)&&t.host||fa(t);return WS(e)?e.host:e}function HC(t){const e=gl(t);return vd(e)?t.ownerDocument?t.ownerDocument.body:t.body:ua(e)&&Cp(e)?e:HC(e)}function Mf(t,e,n){var r;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=HC(t),s=i===((r=t.ownerDocument)==null?void 0:r.body),a=Li(i);if(s){const o=Nw(a);
vendor: 7,125 bytes, line 281
281return e.concat(a,a.visualViewport||[],Cp(i)?i:[],o&&n?Mf(o):[])}return e.concat(i,Mf(i,[],n))}function Nw(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function WC(t){const e=Ps(t);let n=parseFloat(e.width)||0,r=parseFloat(e.height)||0;const i=ua(t),s=i?t.offsetWidth:n,a=i?t.offsetHeight:r,o=x0(n)!==s||x0(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function zx(t){return Cs(t)?t:t.contextElement}function Bu(t){const e=zx(t);if(!ua(e))return pl(1);const n=e.getBoundingClientRect(),{width:r,height:i,$:s}=WC(e);let a=(s?x0(n.width):n.width)/r,o=(s?x0(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const aF=pl(0);function VC(t){const e=Li(t);return!Fx()||!e.visualViewport?aF:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function oF(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==Li(t)?!1:e}function wc(t,e,n,r){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=zx(t);let a=pl(1);e&&(r?Cs(r)&&(a=Bu(r)):a=Bu(t));const o=oF(s,n,r)?VC(s):pl(0);let l=(i.left+o.x)/a.x,c=(i.top+o.y)/a.y,u=i.width/a.x,d=i.height/a.y;if(s){const f=Li(s),h=r&&Cs(r)?Li(r):r;let y=f,v=Nw(y);for(;v&&r&&h!==y;){const _=Bu(v),w=v.getBoundingClientRect(),x=Ps(v),k=w.left+(v.clientLeft+parseFloat(x.paddingLeft))*_.x,N=w.top+(v.clientTop+parseFloat(x.paddingTop))*_.y;l*=_.x,c*=_.y,u*=_.x,d*=_.y,l+=k,c+=N,y=Li(v),v=Nw(y)}}return S0({width:u,height:d,x:l,y:c})}function lF(t){let{elements:e,rect:n,offsetParent:r,strategy:i}=t;const s=i==="fixed",a=fa(r),o=e?Tv(e.floating):!1;if(r===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},c=pl(1);const u=pl(0),d=ua(r);if((d||!d&&!s)&&((Dd(r)!=="body"||Cp(a))&&(l=Rv(r)),ua(r))){const f=wc(r);c=Bu(r),u.x=f.x+r.clientLeft,u.y=f.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}}function cF(t){return Array.from(t.getClientRects())}function Aw(t,e){const n=Rv(t).scrollLeft;return e?e.left+n:wc(fa(t)).left+n}function uF(t){const e=fa(t),n=Rv(t),r=t.ownerDocument.body,i=Ni(e.scrollWidth,e.clientWidth,r.scrollWidth,r.clientWidth),s=Ni(e.scrollHeight,e.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Aw(t);const o=-n.scrollTop;return Ps(r).direction==="rtl"&&(a+=Ni(e.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}function dF(t,e){const n=Li(t),r=fa(t),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const c=Fx();(!c||c&&e==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}return{width:s,height:a,x:o,y:l}}function hF(t,e){const n=wc(t,!0,e==="fixed"),r=n.top+t.clientTop,i=n.left+t.clientLeft,s=ua(t)?Bu(t):pl(1),a=t.clientWidth*s.x,o=t.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:a,height:o,x:l,y:c}}function VS(t,e,n){let r;if(e==="viewport")r=dF(t,n);else if(e==="document")r=uF(fa(t));else if(Cs(e))r=hF(e,n);else{const i=VC(t);r={...e,x:e.x-i.x,y:e.y-i.y}}return S0(r)}function GC(t,e){const n=gl(t);return n===e||!Cs(n)||vd(n)?!1:Ps(n).position==="fixed"||GC(n,e)}function fF(t,e){const n=e.get(t);if(n)return n;let r=Mf(t,[],!1).filter(o=>Cs(o)&&Dd(o)!=="body"),i=null;const s=Ps(t).position==="fixed";let a=s?gl(t):t;for(;Cs(a)&&!vd(a);){const o=Ps(a),l=Mx(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||Cp(a)&&!l&&GC(t,a))?r=r.filter(u=>u!==a):i=o,a=gl(a)}return e.set(t,r),r}function pF(t){let{element:e,boundary:n,rootBoundary:r,strategy:i}=t;const a=[...n==="clippingAncestors"?Tv(e)?[]:fF(e,this._c):[].concat(n),r],o=a[0],l=a.reduce((c,u)=>{const d=VS(e,u,i);return c.top=Ni(d.top,c.top),c.right=fl(d.right,c.right),c.bottom=fl(d.bottom,c.bottom),c.left=Ni(d.left,c.left),c},VS(e,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function mF(t){const{width:e,height:n}=WC(t);return{width:e,height:n}}function gF(t,e,n){const r=ua(e),i=fa(e),s=n==="fixed",a=wc(t,!0,s,e);let o={scrollLeft:0,scrollTop:0};const l=pl(0);if(r||!r&&!s)if((Dd(e)!=="body"||Cp(i))&&(o=Rv(e)),r){const h=wc(e,!0,s,e);l.x=h.x+e.clientLeft,l.y=h.y+e.clientTop}else i&&(l.x=Aw(i));let c=0,u=0;if(i&&!r&&!s){const h=i.getBoundingClientRect();u=h.top+o.scrollTop,c=h.left+o.scrollLeft-Aw(i,h)}const d=a.left+o.scrollLeft-l.x-c,f=a.top+o.scrollTop-l.y-u;return{x:d,y:f,width:a.width,height:a.height}}function yy(t){return Ps(t).position==="static"}function GS(t,e){if(!ua(t)||Ps(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return fa(t)===n&&(n=n.ownerDocument.body),n}function KC(t,e){const n=Li(t);if(Tv(t))return n;if(!ua(t)){let i=gl(t);for(;i&&!vd(i);){if(Cs(i)&&!yy(i))return i;i=gl(i)}return n}let r=GS(t,e);for(;r&&iF(r)&&yy(r);)r=GS(r,e);return r&&vd(r)&&yy(r)&&!Mx(r)?n:r||sF(t)||n}const vF=async function(t){const e=this.getOffsetParent||KC,n=this.getDimensions,r=await n(t.floating);return{reference:gF(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function yF(t){return Ps(t).direction==="rtl"}const wF={convertOffsetParentRelativeRectToViewportRelativeRect:lF,getDocumentElement:fa,getClippingRect:pF,getOffsetParent:KC,getElementRects:vF,getClientRects:cF,getDimensions:mF,getScale:Bu,isElement:Cs,isRTL:yF};function bF(t,e){let n=null,r;const i=fa(t);function s(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const{left:c,top:u,width:d,height:f}=t.getBoundingClientRect();if(o||e(),!d||!f)return;const h=qm(u),y=qm(i.clientWidth-(c+d)),v=qm(i.clientHeight-(u+f)),_=qm(c),x={rootMargin:-h+"px "+-y+"px "+-v+"px "+-_+"px",threshold:Ni(0,fl(1,l))||1};let k=!0;function N(R){const H=R[0].intersectionRatio;if(H!==l){if(!k)return a();H?a(!1,H):r=setTimeout(()=>{a(!1,1e-7)},1e3)}k=!1}try{n=new IntersectionObserver(N,{...x,root:i.ownerDocument})}catch{n=new IntersectionObserver(N,x)}n.observe(t)}return a(!0),s}function xF(t,e,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=zx(t),u=i||s?[...c?Mf(c):[],...Mf(e)]:[];u.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const d=c&&o?bF(c,n):null;let f=-1,h=null;a&&(h=new ResizeObserver(w=>{let[x]=w;x&&x.target===c&&h&&(h.unobserve(e),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var k;(k=h)==null||k.observe(e)})),n()}),c&&!l&&h.observe(c),h.observe(e));let y,v=l?wc(t):null;l&&_();function _(){const w=wc(t);v&&(w.x!==v.x||w.y!==v.y||w.width!==v.width||w.height!==v.height)&&n(),v=w,y=requestAnimationFrame(_)}return n(),()=>{var w;u.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),d==null||d(),(w=h)==null||w.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const _F=eF,SF=tF,kF=JM,EF=rF,NF=XM,KS=YM,AF=nF,CF=(t,e,n)=>{const r=new Map,i={platform:wF,...n},s={...i.platform,_c:r};return ZM(t,e,{...i,platform:s})};var Mg=typeof document<"u"?E.useLayoutEffect:E.useEffect;function k0(t,e){if(t===e)return!0;
vendor: 9,967 bytes, line 281
281if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,r,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(r=n;r--!==0;)if(!k0(t[r],e[r]))return!1;return!0}if(i=Object.keys(t),n=i.length,n!==Object.keys(e).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(e,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&t.$$typeof)&&!k0(t[s],e[s]))return!1}return!0}return t!==t&&e!==e}function ZC(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function ZS(t,e){const n=ZC(t);return Math.round(e*n)/n}function wy(t){const e=E.useRef(t);return Mg(()=>{e.current=t}),e}function PF(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:l,open:c}=t,[u,d]=E.useState({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[f,h]=E.useState(r);k0(f,r)||h(r);const[y,v]=E.useState(null),[_,w]=E.useState(null),x=E.useCallback(U=>{U!==H.current&&(H.current=U,v(U))},[]),k=E.useCallback(U=>{U!==F.current&&(F.current=U,w(U))},[]),N=s||y,R=a||_,H=E.useRef(null),F=E.useRef(null),M=E.useRef(u),I=l!=null,G=wy(l),L=wy(i),j=wy(c),W=E.useCallback(()=>{if(!H.current||!F.current)return;const U={placement:e,strategy:n,middleware:f};L.current&&(U.platform=L.current),CF(H.current,F.current,U).then(J=>{const de={...J,isPositioned:j.current!==!1};z.current&&!k0(M.current,de)&&(M.current=de,Rd.flushSync(()=>{d(de)}))})},[f,e,n,L,j]);Mg(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,d(U=>({...U,isPositioned:!1})))},[c]);const z=E.useRef(!1);Mg(()=>(z.current=!0,()=>{z.current=!1}),[]),Mg(()=>{if(N&&(H.current=N),R&&(F.current=R),N&&R){if(G.current)return G.current(N,R,W);W()}},[N,R,W,G,I]);const re=E.useMemo(()=>({reference:H,floating:F,setReference:x,setFloating:k}),[x,k]),ne=E.useMemo(()=>({reference:N,floating:R}),[N,R]),oe=E.useMemo(()=>{const U={position:n,left:0,top:0};if(!ne.floating)return U;const J=ZS(ne.floating,u.x),de=ZS(ne.floating,u.y);return o?{...U,transform:"translate("+J+"px, "+de+"px)",...ZC(ne.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:de}},[n,o,ne.floating,u.x,u.y]);return E.useMemo(()=>({...u,update:W,refs:re,elements:ne,floatingStyles:oe}),[u,W,re,ne,oe])}const TF=t=>{function e(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:t,fn(n){const{element:r,padding:i}=typeof t=="function"?t(n):t;return r&&e(r)?r.current!=null?KS({element:r.current,padding:i}).fn(n):{}:r?KS({element:r,padding:i}).fn(n):{}}}},RF=(t,e)=>({..._F(t),options:[t,e]}),LF=(t,e)=>({...SF(t),options:[t,e]}),jF=(t,e)=>({...AF(t),options:[t,e]}),OF=(t,e)=>({...kF(t),options:[t,e]}),IF=(t,e)=>({...EF(t),options:[t,e]}),DF=(t,e)=>({...NF(t),options:[t,e]}),MF=(t,e)=>({...TF(t),options:[t,e]});var FF="Arrow",YC=E.forwardRef((t,e)=>{const{children:n,width:r=10,height:i=5,...s}=t;return m.jsx(xt.svg,{...s,ref:e,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});YC.displayName=FF;var zF=YC;function $F(t){const[e,n]=E.useState(void 0);return Xr(()=>{if(t){n({width:t.offsetWidth,height:t.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,o=c.blockSize}else a=t.offsetWidth,o=t.offsetHeight;n({width:a,height:o})});return r.observe(t,{box:"border-box"}),()=>r.unobserve(t)}else n(void 0)},[t]),e}var $x="Popper",[JC,Lv]=uo($x),[UF,XC]=JC($x),QC=t=>{const{__scopePopper:e,children:n}=t,[r,i]=E.useState(null);return m.jsx(UF,{scope:e,anchor:r,onAnchorChange:i,children:n})};QC.displayName=$x;var eP="PopperAnchor",tP=E.forwardRef((t,e)=>{const{__scopePopper:n,virtualRef:r,...i}=t,s=XC(eP,n),a=E.useRef(null),o=an(e,a);return E.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||a.current)}),r?null:m.jsx(xt.div,{...i,ref:o})});tP.displayName=eP;var Ux="PopperContent",[BF,qF]=JC(Ux),nP=E.forwardRef((t,e)=>{var le,me,pe,ge,Ne,je;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:f=!1,updatePositionStrategy:h="optimized",onPlaced:y,...v}=t,_=XC(Ux,n),[w,x]=E.useState(null),k=an(e,Re=>x(Re)),[N,R]=E.useState(null),H=$F(N),F=(H==null?void 0:H.width)??0,M=(H==null?void 0:H.height)??0,I=r+(s!=="center"?"-"+s:""),G=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},L=Array.isArray(c)?c:[c],j=L.length>0,W={padding:G,boundary:L.filter(WF),altBoundary:j},{refs:z,floatingStyles:re,placement:ne,isPositioned:oe,middlewareData:U}=PF({strategy:"fixed",placement:I,whileElementsMounted:(...Re)=>xF(...Re,{animationFrame:h==="always"}),elements:{reference:_.anchor},middleware:[RF({mainAxis:i+M,alignmentAxis:a}),l&&LF({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?jF():void 0,...W}),l&&OF({...W}),IF({...W,apply:({elements:Re,rects:Ke,availableWidth:V,availableHeight:Te})=>{const{width:wt,height:it}=Ke.reference,_e=Re.floating.style;_e.setProperty("--radix-popper-available-width",`${V}px`),_e.setProperty("--radix-popper-available-height",`${Te}px`),_e.setProperty("--radix-popper-anchor-width",`${wt}px`),_e.setProperty("--radix-popper-anchor-height",`${it}px`)}}),N&&MF({element:N,padding:o}),VF({arrowWidth:F,arrowHeight:M}),f&&DF({strategy:"referenceHidden",...W})]}),[J,de]=sP(ne),ie=or(y);Xr(()=>{oe&&(ie==null||ie())},[oe,ie]);const C=(le=U.arrow)==null?void 0:le.x,q=(me=U.arrow)==null?void 0:me.y,X=((pe=U.arrow)==null?void 0:pe.centerOffset)!==0,[Q,ee]=E.useState();return Xr(()=>{w&&ee(window.getComputedStyle(w).zIndex)},[w]),m.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...re,transform:oe?re.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Q,"--radix-popper-transform-origin":[(ge=U.transformOrigin)==null?void 0:ge.x,(Ne=U.transformOrigin)==null?void 0:Ne.y].join(" "),...((je=U.hide)==null?void 0:je.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:m.jsx(BF,{scope:n,placedSide:J,onArrowChange:R,arrowX:C,arrowY:q,shouldHideArrow:X,children:m.jsx(xt.div,{"data-side":J,"data-align":de,...v,ref:k,style:{...v.style,animation:oe?void 0:"none"}})})})});nP.displayName=Ux;var rP="PopperArrow",HF={top:"bottom",right:"left",bottom:"top",left:"right"},iP=E.forwardRef(function(e,n){const{__scopePopper:r,...i}=e,s=qF(rP,r),a=HF[s.placedSide];return m.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:m.jsx(zF,{...i,ref:n,style:{...i.style,display:"block"}})})});iP.displayName=rP;function WF(t){return t!==null}var VF=t=>({name:"transformOrigin",options:t,fn(e){var _,w,x;const{placement:n,rects:r,middlewareData:i}=e,a=((_=i.arrow)==null?void 0:_.centerOffset)!==0,o=a?0:t.arrowWidth,l=a?0:t.arrowHeight,[c,u]=sP(n),d={start:"0%",center:"50%",end:"100%"}[u],f=(((w=i.arrow)==null?void 0:w.x)??0)+o/2,h=(((x=i.arrow)==null?void 0:x.y)??0)+l/2;let y="",v="";return c==="bottom"?(y=a?d:`${f}px`,v=`${-l}px`):c==="top"?(y=a?d:`${f}px`,v=`${r.floating.height+l}px`):c==="right"?(y=`${-l}px`,v=a?d:`${h}px`):c==="left"&&(y=`${r.floating.width+l}px`,v=a?d:`${h}px`),{data:{x:y,y:v}}}});function sP(t){const[e,n="center"]=t.split("-");return[e,n]}var GF=QC,aP=tP,oP=nP,lP=iP,KF="Portal",cP=E.forwardRef((t,e)=>{var o;const{container:n,...r}=t,[i,s]=E.useState(!1);Xr(()=>s(!0),[]);const a=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?_v.createPortal(m.jsx(xt.div,{...r,ref:e}),a):null});cP.displayName=KF;function ZF(t,e){return E.useReducer((n,r)=>e[n][r]??n,t)}var uP=t=>{const{present:e,children:n}=t,r=YF(e),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),s=an(r.ref,JF(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:s}):null};uP.displayName="Presence";function YF(t){const[e,n]=E.useState(),r=E.useRef({}),i=E.useRef(t),s=E.useRef("none"),a=t?"mounted":"unmounted",[o,l]=ZF(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=Hm(r.current);s.current=o==="mounted"?c:"none"},[o]),Xr(()=>{const c=r.current,u=i.current;if(u!==t){const f=s.current,h=Hm(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Xr(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,d=h=>{const v=Hm(r.current).includes(h.animationName);if(h.target===e&&v&&(l("ANIMATION_END"),!i.current)){const _=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=_)})}},f=h=>{h.target===e&&(s.current=Hm(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:E.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Hm(t){return(t==null?void 0:t.animationName)||"none"}function JF(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.
vendor: 6,143 bytes, line 281
281isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var[jv,vne]=TM("Tooltip",[Lv]),Bx=Lv(),dP="TooltipProvider",XF=700,YS="tooltip.open",[QF,hP]=jv(dP),fP=t=>{const{__scopeTooltip:e,delayDuration:n=XF,skipDelayDuration:r=300,disableHoverableContent:i=!1,children:s}=t,[a,o]=E.useState(!0),l=E.useRef(!1),c=E.useRef(0);return E.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),m.jsx(QF,{scope:e,isOpenDelayed:a,delayDuration:n,onOpen:E.useCallback(()=>{window.clearTimeout(c.current),o(!1)},[]),onClose:E.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>o(!0),r)},[r]),isPointerInTransitRef:l,onPointerInTransitChange:E.useCallback(u=>{l.current=u},[]),disableHoverableContent:i,children:s})};fP.displayName=dP;var pP="Tooltip",[yne,Ov]=jv(pP),Cw="TooltipTrigger",ez=E.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=Ov(Cw,n),s=hP(Cw,n),a=Bx(n),o=E.useRef(null),l=an(e,o,i.onTriggerChange),c=E.useRef(!1),u=E.useRef(!1),d=E.useCallback(()=>c.current=!1,[]);return E.useEffect(()=>()=>document.removeEventListener("pointerup",d),[d]),m.jsx(aP,{asChild:!0,...a,children:m.jsx(xt.button,{"aria-describedby":i.open?i.contentId:void 0,"data-state":i.stateAttribute,...r,ref:l,onPointerMove:qe(t.onPointerMove,f=>{f.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(i.onTriggerEnter(),u.current=!0)}),onPointerLeave:qe(t.onPointerLeave,()=>{i.onTriggerLeave(),u.current=!1}),onPointerDown:qe(t.onPointerDown,()=>{c.current=!0,document.addEventListener("pointerup",d,{once:!0})}),onFocus:qe(t.onFocus,()=>{c.current||i.onOpen()}),onBlur:qe(t.onBlur,i.onClose),onClick:qe(t.onClick,i.onClose)})})});ez.displayName=Cw;var tz="TooltipPortal",[wne,nz]=jv(tz,{forceMount:void 0}),yd="TooltipContent",mP=E.forwardRef((t,e)=>{const n=nz(yd,t.__scopeTooltip),{forceMount:r=n.forceMount,side:i="top",...s}=t,a=Ov(yd,t.__scopeTooltip);return m.jsx(uP,{present:r||a.open,children:a.disableHoverableContent?m.jsx(gP,{side:i,...s,ref:e}):m.jsx(rz,{side:i,...s,ref:e})})}),rz=E.forwardRef((t,e)=>{const n=Ov(yd,t.__scopeTooltip),r=hP(yd,t.__scopeTooltip),i=E.useRef(null),s=an(e,i),[a,o]=E.useState(null),{trigger:l,onClose:c}=n,u=i.current,{onPointerInTransitChange:d}=r,f=E.useCallback(()=>{o(null),d(!1)},[d]),h=E.useCallback((y,v)=>{const _=y.currentTarget,w={x:y.clientX,y:y.clientY},x=oz(w,_.getBoundingClientRect()),k=lz(w,x),N=cz(v.getBoundingClientRect()),R=dz([...k,...N]);o(R),d(!0)},[d]);return E.useEffect(()=>()=>f(),[f]),E.useEffect(()=>{if(l&&u){const y=_=>h(_,u),v=_=>h(_,l);return l.addEventListener("pointerleave",y),u.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",v)}}},[l,u,h,f]),E.useEffect(()=>{if(a){const y=v=>{const _=v.target,w={x:v.clientX,y:v.clientY},x=(l==null?void 0:l.contains(_))||(u==null?void 0:u.contains(_)),k=!uz(w,a);x?f():k&&(f(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,u,a,c,f]),m.jsx(gP,{...t,ref:s})}),[iz,sz]=jv(pP,{isInside:!1}),gP=E.forwardRef((t,e)=>{const{__scopeTooltip:n,children:r,"aria-label":i,onEscapeKeyDown:s,onPointerDownOutside:a,...o}=t,l=Ov(yd,n),c=Bx(n),{onClose:u}=l;return E.useEffect(()=>(document.addEventListener(YS,u),()=>document.removeEventListener(YS,u)),[u]),E.useEffect(()=>{if(l.trigger){const d=f=>{const h=f.target;h!=null&&h.contains(l.trigger)&&u()};return window.addEventListener("scroll",d,{capture:!0}),()=>window.removeEventListener("scroll",d,{capture:!0})}},[l.trigger,u]),m.jsx(jx,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:d=>d.preventDefault(),onDismiss:u,children:m.jsxs(oP,{"data-state":l.stateAttribute,...c,...o,ref:e,style:{...o.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[m.jsx(V3,{children:r}),m.jsx(iz,{scope:n,isInside:!0,children:m.jsx(S7,{id:l.contentId,role:"tooltip",children:i||r})})]})})});mP.displayName=yd;var vP="TooltipArrow",az=E.forwardRef((t,e)=>{const{__scopeTooltip:n,...r}=t,i=Bx(n);return sz(vP,n).isInside?null:m.jsx(lP,{...i,...r,ref:e})});az.displayName=vP;function oz(t,e){const n=Math.abs(e.top-t.y),r=Math.abs(e.bottom-t.y),i=Math.abs(e.right-t.x),s=Math.abs(e.left-t.x);switch(Math.min(n,r,i,s)){case s:return"left";case i:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function lz(t,e,n=5){const r=[];switch(e){case"top":r.push({x:t.x-n,y:t.y+n},{x:t.x+n,y:t.y+n});break;case"bottom":r.push({x:t.x-n,y:t.y-n},{x:t.x+n,y:t.y-n});break;case"left":r.push({x:t.x+n,y:t.y-n},{x:t.x+n,y:t.y+n});break;case"right":r.push({x:t.x-n,y:t.y-n},{x:t.x-n,y:t.y+n});break}return r}function cz(t){const{top:e,right:n,bottom:r,left:i}=t;return[{x:i,y:e},{x:n,y:e},{x:n,y:r},{x:i,y:r}]}function uz(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const o=e[s].x,l=e[s].y,c=e[a].x,u=e[a].y;l>r!=u>r&&n<(c-o)*(r-l)/(u-l)+o&&(i=!i)}return i}function dz(t){const e=t.slice();return e.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),hz(e)}function hz(t){if(t.length<=1)return t.slice();const e=[];for(let r=0;r<t.length;r++){const i=t[r];for(;e.length>=2;){const s=e[e.length-1],a=e[e.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))e.pop();else break}e.push(i)}e.pop();const n=[];for(let r=t.length-1;r>=0;r--){const i=t[r];for(;n.length>=2;){const s=n[n.length-1],a=n[n.length-2];if((s.x-a.x)*(i.y-a.y)>=(s.y-a.y)*(i.x-a.x))n.pop();else break}n.push(i)}return n.pop(),e.length===1&&n.length===1&&e[0].x===n[0].x&&e[0].y===n[0].y?e:e.concat(n)}var fz=fP,yP=mP;const pz=fz,mz=E.forwardRef(({className:t,sideOffset:e=4,...n},r)=>
vendor: 23,252 bytes, line 281
281m.jsx(yP,{ref:r,sideOffset:e,className:St("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n}));mz.displayName=yP.displayName;var Iv=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Dv=typeof window>"u"||"Deno"in globalThis;function vs(){}function gz(t,e){return typeof t=="function"?t(e):t}function vz(t){return typeof t=="number"&&t>=0&&t!==1/0}function yz(t,e){return Math.max(t+(e||0)-Date.now(),0)}function JS(t,e){return typeof t=="function"?t(e):t}function wz(t,e){return typeof t=="function"?t(e):t}function XS(t,e){const{type:n="all",exact:r,fetchStatus:i,predicate:s,queryKey:a,stale:o}=t;if(a){if(r){if(e.queryHash!==qx(a,e.options))return!1}else if(!zf(e.queryKey,a))return!1}if(n!=="all"){const l=e.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof o=="boolean"&&e.isStale()!==o||i&&i!==e.state.fetchStatus||s&&!s(e))}function QS(t,e){const{exact:n,status:r,predicate:i,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(Ff(e.options.mutationKey)!==Ff(s))return!1}else if(!zf(e.options.mutationKey,s))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function qx(t,e){return((e==null?void 0:e.queryKeyHashFn)||Ff)(t)}function Ff(t){return JSON.stringify(t,(e,n)=>Pw(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function zf(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(n=>!zf(t[n],e[n])):!1}function wP(t,e){if(t===e)return t;const n=ek(t)&&ek(e);if(n||Pw(t)&&Pw(e)){const r=n?t:Object.keys(t),i=r.length,s=n?e:Object.keys(e),a=s.length,o=n?[]:{};let l=0;for(let c=0;c<a;c++){const u=n?c:s[c];(!n&&r.includes(u)||n)&&t[u]===void 0&&e[u]===void 0?(o[u]=void 0,l++):(o[u]=wP(t[u],e[u]),o[u]===t[u]&&t[u]!==void 0&&l++)}return i===a&&l===i?t:o}return e}function ek(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Pw(t){if(!tk(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!tk(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function tk(t){return Object.prototype.toString.call(t)==="[object Object]"}function bz(t){return new Promise(e=>{setTimeout(e,t)})}function xz(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?wP(t,e):e}function _z(t,e,n=0){const r=[...t,e];return n&&r.length>n?r.slice(1):r}function Sz(t,e,n=0){const r=[e,...t];return n&&r.length>n?r.slice(0,-1):r}var bP=Symbol();function xP(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===bP?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var sc,Ho,td,k4,kz=(k4=class extends Iv{constructor(){super();Qt(this,sc);Qt(this,Ho);Qt(this,td);jt(this,td,e=>{if(!Dv&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){Se(this,Ho)||this.setEventListener(Se(this,td))}onUnsubscribe(){var e;this.hasListeners()||((e=Se(this,Ho))==null||e.call(this),jt(this,Ho,void 0))}setEventListener(e){var n;jt(this,td,e),(n=Se(this,Ho))==null||n.call(this),jt(this,Ho,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){Se(this,sc)!==e&&(jt(this,sc,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof Se(this,sc)=="boolean"?Se(this,sc):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},sc=new WeakMap,Ho=new WeakMap,td=new WeakMap,k4),_P=new kz,nd,Wo,rd,E4,Ez=(E4=class extends Iv{constructor(){super();Qt(this,nd,!0);Qt(this,Wo);Qt(this,rd);jt(this,rd,e=>{if(!Dv&&window.addEventListener){const n=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){Se(this,Wo)||this.setEventListener(Se(this,rd))}onUnsubscribe(){var e;this.hasListeners()||((e=Se(this,Wo))==null||e.call(this),jt(this,Wo,void 0))}setEventListener(e){var n;jt(this,rd,e),(n=Se(this,Wo))==null||n.call(this),jt(this,Wo,e(this.setOnline.bind(this)))}setOnline(e){Se(this,nd)!==e&&(jt(this,nd,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return Se(this,nd)}},nd=new WeakMap,Wo=new WeakMap,rd=new WeakMap,E4),E0=new Ez;function Nz(t){return Math.min(1e3*2**t,3e4)}function SP(t){return(t??"online")==="online"?E0.isOnline():!0}var kP=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function by(t){return t instanceof kP}function EP(t){let e=!1,n=0,r=!1,i,s,a;const o=new Promise((w,x)=>{s=w,a=x}),l=w=>{var x;r||(y(new kP(w)),(x=t.abort)==null||x.call(t))},c=()=>{e=!0},u=()=>{e=!1},d=()=>_P.isFocused()&&(t.networkMode==="always"||E0.isOnline())&&t.canRun(),f=()=>SP(t.networkMode)&&t.canRun(),h=w=>{var x;r||(r=!0,(x=t.onSuccess)==null||x.call(t,w),i==null||i(),s(w))},y=w=>{var x;r||(r=!0,(x=t.onError)==null||x.call(t,w),i==null||i(),a(w))},v=()=>new Promise(w=>{var x;i=k=>{(r||d())&&w(k)},(x=t.onPause)==null||x.call(t)}).then(()=>{var w;i=void 0,r||(w=t.onContinue)==null||w.call(t)}),_=()=>{if(r)return;let w;const x=n===0?t.initialPromise:void 0;try{w=x??t.fn()}catch(k){w=Promise.reject(k)}Promise.resolve(w).then(h).catch(k=>{var M;if(r)return;const N=t.retry??(Dv?0:3),R=t.retryDelay??Nz,H=typeof R=="function"?R(n,k):R,F=N===!0||typeof N=="number"&&n<N||typeof N=="function"&&N(n,k);if(e||!F){y(k);return}n++,(M=t.onFail)==null||M.call(t,n,k),bz(H).then(()=>d()?void 0:v()).then(()=>{e?y(k):_()})})};return{promise:o,cancel:l,continue:()=>(i==null||i(),o),cancelRetry:c,continueRetry:u,canStart:f,start:()=>(f()?_():v().then(_),o)}}function Az(){let t=[],e=0,n=o=>{o()},r=o=>{o()},i=o=>setTimeout(o,0);const s=o=>{e?t.push(o):i(()=>{n(o)})},a=()=>{const o=t;t=[],o.length&&i(()=>{r(()=>{o.forEach(l=>{n(l)})})})};return{batch:o=>{let l;e++;try{l=o()}finally{e--,e||a()}return l},batchCalls:o=>(...l)=>{s(()=>{o(...l)})},schedule:s,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{i=o}}}var Zr=Az(),ac,N4,NP=(N4=class{constructor(){Qt(this,ac)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),vz(this.gcTime)&&jt(this,ac,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Dv?1/0:5*60*1e3))}clearGcTimeout(){Se(this,ac)&&(clearTimeout(Se(this,ac)),jt(this,ac,void 0))}},ac=new WeakMap,N4),id,sd,Ki,Dr,bp,oc,ws,Ua,A4,Cz=(A4=class extends NP{constructor(e){super();Qt(this,ws);Qt(this,id);Qt(this,sd);Qt(this,Ki);Qt(this,Dr);Qt(this,bp);Qt(this,oc);jt(this,oc,!1),jt(this,bp,e.defaultOptions),this.setOptions(e.options),this.observers=[],jt(this,Ki,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,jt(this,id,Tz(this.options)),this.state=e.state??Se(this,id),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=Se(this,Dr))==null?void 0:e.promise}setOptions(e){this.options={...Se(this,bp),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&Se(this,Ki).remove(this)}setData(e,n){const r=xz(this.state.data,e,this.options);return Cr(this,ws,Ua).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(e,n){Cr(this,ws,Ua).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var r,i;const n=(r=Se(this,Dr))==null?void 0:r.promise;return(i=Se(this,Dr))==null||i.cancel(e),n?n.then(vs).catch(vs):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(Se(this,id))}isActive(){return this.observers.some(e=>wz(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!yz(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=Se(this,Dr))==null||n.continue()}onOnline(){var n;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=Se(this,Dr))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),Se(this,Ki).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(Se(this,Dr)&&(Se(this,oc)?Se(this,Dr).cancel({revert:!0}):Se(this,Dr).cancelRetry()),this.scheduleGc()),Se(this,Ki).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Cr(this,ws,Ua).call(this,{type:"invalidate"})}fetch(e,n){var l,c,u;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(Se(this,Dr))return Se(this,Dr).continueRetry(),Se(this,Dr).promise}if(e&&this.setOptions(e),!this.options.queryFn){const d=this.observers.find(f=>f.options.queryFn);d&&this.setOptions(d.options)}const r=new AbortController,i=d=>{Object.defineProperty(d,"signal",{enumerable:!0,get:()=>(jt(this,oc,!0),r.signal)})},s=()=>{const d=xP(this.options,n),f={queryKey:this.queryKey,meta:this.meta};return i(f),jt(this,oc,!1),this.options.persister?this.options.persister(d,f,this):d(f)},a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:s};i(a),(l=this.options.behavior)==null||l.onFetch(a,this),jt(this,sd,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=a.fetchOptions)==null?void 0:c.meta))&&Cr(this,ws,Ua).call(this,{type:"fetch",meta:(u=a.fetchOptions)==null?void 0:u.meta});const o=d=>{var f,h,y,v;by(d)&&d.silent||Cr(this,ws,Ua).call(this,{type:"error",error:d}),by(d)||((h=(f=Se(this,Ki).config).onError)==null||h.call(f,d,this),(v=(y=Se(this,Ki).config).onSettled)==null||v.call(y,this.state.data,d,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return jt(this,Dr,EP({initialPromise:n==null?void 0:n.initialPromise,fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:d=>{var f,h,y,v;if(d===void 0){o(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(d)}catch(_){o(_);return}(h=(f=Se(this,Ki).config).onSuccess)==null||h.call(f,d,this),(v=(y=Se(this,Ki).config).onSettled)==null||v.call(y,d,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:o,onFail:(d,f)=>{Cr(this,ws,Ua).call(this,{type:"failed",failureCount:d,error:f})},onPause:()=>{Cr(this,ws,Ua).call(this,{type:"pause"})},onContinue:()=>{Cr(this,ws,Ua).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0})),Se(this,Dr).start()}},id=new WeakMap,sd=new WeakMap,Ki=new WeakMap,Dr=new WeakMap,bp=new WeakMap,oc=new WeakMap,ws=new WeakSet,Ua=function(e){const n=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Pz(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return by(i)&&i.revert&&Se(this,sd)?{...Se(this,sd),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=n(this.state),Zr.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),Se(this,Ki).notify({query:this,type:"updated",action:e})})},A4);function Pz(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:SP(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Tz(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,r=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Ys,C4,Rz=(C4=class extends Iv{constructor(e={}){super();Qt(this,Ys);this.config=e,jt(this,Ys,new Map)}build(e,n,r){const i=n.queryKey,s=n.queryHash??qx(i,n);let a=this.get(s);return a||(a=new Cz({cache:this,queryKey:i,queryHash:s,options:e.defaultQueryOptions(n),state:r,defaultOptions:e.getQueryDefaults(i)}),this.add(a)),a}add(e){Se(this,Ys).has(e.queryHash)||(Se(this,Ys).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=Se(this,Ys).get(e.queryHash);n&&(e.destroy(),n===e&&Se(this,Ys).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Zr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return Se(this,Ys).get(e)}getAll(){return[...Se(this,Ys).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(r=>XS(n,r))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(r=>XS(e,r)):n}notify(e){Zr.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){Zr.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Zr.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ys=new WeakMap,C4),Js,Gr,lc,Xs,Oo,P4,Lz=(P4=class extends NP{constructor(e){super();Qt(this,Xs);Qt(this,Js);Qt(this,Gr);Qt(this,lc);this.mutationId=e.mutationId,jt(this,Gr,e.mutationCache),jt(this,Js,[]),this.state=e.state||jz(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){Se(this,Js).includes(e)||(Se(this,Js).push(e),this.clearGcTimeout(),Se(this,Gr).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){jt(this,Js,Se(this,Js).filter(n=>n!==e)),this.scheduleGc(),Se(this,Gr).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){Se(this,Js).length||(this.state.status==="pending"?this.scheduleGc():Se(this,Gr).remove(this))}continue(){var e;return((e=Se(this,lc))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var i,s,a,o,l,c,u,d,f,h,y,v,_,w,x,k,N,R,H,F;jt(this,lc,EP({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(M,I)=>{Cr(this,Xs,Oo).call(this,{type:"failed",failureCount:M,error:I})},onPause:()=>{Cr(this,Xs,Oo).call(this,{type:"pause"})},onContinue:()=>{Cr(this,Xs,Oo).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>Se(this,Gr).canRun(this)}));const n=this.state.status==="pending",r=!Se(this,lc).canStart();try{if(!n){Cr(this,Xs,Oo).call(this,{type:"pending",variables:e,isPaused:r}),await((s=(i=Se(this,Gr).config).onMutate)==null?void 0:s.call(i,e,this));const I=await((o=(a=this.options).onMutate)==null?void 0:o.call(a,e));I!==this.state.context&&Cr(this,Xs,Oo).call(this,{type:"pending",context:I,variables:e,isPaused:r})}const M=await Se(this,lc).start();return await((c=(l=Se(this,Gr).config).onSuccess)==null?void 0:c.call(l,M,e,this.state.context,this)),await((d=(u=this.options).onSuccess)==null?void 0:d.call(u,M,e,this.state.context)),await((h=(f=Se(this,Gr).config).onSettled)==null?void 0:h.call(f,M,null,this.state.variables,this.state.context,this)),await((v=(y=this.options).onSettled)==null?void 0:v.call(y,M,null,e,this.state.context)),Cr(this,Xs,Oo).call(this,{type:"success",data:M}),M}catch(M){try{throw await((w=(_=Se(this,Gr).config).onError)==null?void 0:w.call(_,M,e,this.state.context,this)),await((k=(x=this.options).onError)==null?void 0:k.call(x,M,e,this.state.context)),await((R=(N=Se(this,Gr).config).onSettled)==null?void 0:R.call(N,void 0,M,this.state.variables,this.state.context,this)),await((F=(H=this.options).onSettled)==null?void 0:F.call(H,void 0,M,e,this.state.context)),M}finally{Cr(this,Xs,Oo).call(this,{type:"error",error:M})}}finally{Se(this,Gr).runNext(this)}}},Js=new WeakMap,Gr=new WeakMap,lc=new WeakMap,Xs=new WeakSet,Oo=function(e){const n=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),Zr.batch(()=>{Se(this,Js).forEach(r=>{r.onMutationUpdate(e)}),Se(this,Gr).notify({mutation:this,type:"updated",action:e})})},P4);function jz(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Si,xp,T4,Oz=(T4=class extends Iv{constructor(e={}){super();Qt(this,Si);Qt(this,xp);this.config=e,jt(this,Si,new Map),jt(this,xp,Date.now())}build(e,n,r){const i=new Lz({mutationCache:this,mutationId:++xm(this,xp)._,options:e.defaultMutationOptions(n),state:r});return this.add(i),i}add(e){const n=Wm(e),r=Se(this,Si).get(n)??[];r.push(e),Se(this,Si).set(n,r),this.notify({type:"added",mutation:e})}remove(e){var r;const n=Wm(e);if(Se(this,Si).has(n)){const i=(r=Se(this,Si).get(n))==null?void 0:r.filter(s=>s!==e);i&&(i.length===0?Se(this,Si).delete(n):Se(this,Si).set(n,i))}this.notify({type:"removed",mutation:e})}canRun(e){var r;const n=(r=Se(this,Si).get(Wm(e)))==null?void 0:r.find(i=>i.state.status==="pending");return!n||n===e}runNext(e){var r;const n=(r=Se(this,Si).get(Wm(e)))==null?void 0:r.find(i=>i!==e&&i.state.isPaused);return(n==null?void 0:n.continue())??Promise.resolve()}clear(){Zr.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...Se(this,Si).values()].flat()}find(e){const n={exact:!0,...e};return this.getAll().find(r=>QS(n,r))}findAll(e={}){return this.getAll().filter(n=>QS(e,n))}notify(e){Zr.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return Zr.batch(()=>Promise.all(e.map(n=>n.continue().catch(vs))))}},Si=new WeakMap,xp=new WeakMap,T4);function Wm(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function nk(t){return{onFetch:(e,n)=>{var u,d,f,h,y;const r=e.options,i=(f=(d=(u=e.fetchOptions)==null?void 0:u.meta)==null?void 0:d.fetchMore)==null?void 0:f.direction,s=((h=e.state.data)==null?void 0:h.pages)||[],a=((y=e.state.data)==null?void 0:y.pageParams)||[];let o={pages:[],pageParams:[]},l=0;const c=async()=>{let v=!1;const _=k=>{Object.defineProperty(k,"signal",{enumerable:!0,get:()=>(e.signal.aborted?v=!0:e.signal.addEventListener("abort",()=>{v=!0}),e.signal)})},w=xP(e.options,e.fetchOptions),x=async(k,N,R)=>{if(v)return Promise.reject();if(N==null&&k.pages.length)return Promise.resolve(k);const H={queryKey:e.queryKey,pageParam:N,direction:R?"backward":"forward",meta:e.options.meta};_(H);const F=await w(H),{maxPages:M}=e.options,I=R?Sz:_z;return{pages:I(k.pages,F,M),pageParams:I(k.pageParams,N,M)}};if(i&&s.length){const k=i==="backward",N=k?Iz:rk,R={pages:s,pageParams:a},H=N(r,R);o=await x(R,H,k)}else{const k=t??s.length;do{const N=l===0?a[0]??r.initialPageParam:rk(r,o);if(l>0&&N==null)break;o=await x(o,N),l++}while(l<k)}return o};e.options.persister?e.fetchFn=()=>{var v,_;return(_=(v=e.options).persister)==null?void 0:_.call(v,c,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=c}}}function rk(t,{pages:e,pageParams:n}){const r=e.length-1;return e.length>0?t.getNextPageParam(e[r],e,n[r],n):void 0}function Iz(t,{pages:e,pageParams:n}){var r;return e.length>0?(r=t.getPreviousPageParam)==null?void 0:r.call(t,e[0],e,n[0],n):void 0}var Rn,Vo,Go,ad,od,Ko,ld,cd,R4,Dz=(R4=class{constructor(t={}){Qt(this,Rn);Qt(this,Vo);Qt(this,Go);Qt(this,ad);Qt(this,od);Qt(this,Ko);Qt(this,ld);Qt(this,cd);jt(this,Rn,t.queryCache||new Rz),jt(this,Vo,t.mutationCache||new Oz),jt(this,Go,t.defaultOptions||{}),jt(this,ad,new Map),jt(this,od,new Map),jt(this,Ko,0)}mount(){xm(this,Ko)._++,Se(this,Ko)===1&&(jt(this,ld,_P.subscribe(async t=>{t&&(await this.resumePausedMutations(),Se(this,Rn).onFocus())})),jt(this,cd,E0.subscribe(async t=>{t&&(await this.resumePausedMutations(),Se(this,Rn).onOnline())})))}unmount(){var t,e;xm(this,Ko)._--,Se(this,Ko)===0&&((t=Se(this,ld))==null||t.call(this),jt(this,ld,void 0),(e=Se(this,cd))==null||e.call(this),jt(this,cd,void 0))}isFetching(t){return Se(this,Rn).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return Se(this,Vo).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=Se(this,Rn).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const n=this.defaultQueryOptions(t),r=Se(this,Rn).build(this,n);return t.revalidateIfStale&&r.isStaleByTime(JS(n.staleTime,r))&&this.prefetchQuery(n),Promise.resolve(e)}}getQueriesData(t){return Se(this,Rn).findAll(t).map(({queryKey:e,state:n})=>{const r=n.data;return[e,r]})}setQueryData(t,e,n){const r=this.defaultQueryOptions({queryKey:t}),i=Se(this,Rn).get(r.queryHash),s=i==null?void 0:i.state.data,a=gz(e,s);if(a!==void 0)return Se(this,Rn).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(t,e,n){return Zr.batch(()=>Se(this,Rn).findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=Se(this,Rn).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=Se(this,Rn);Zr.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=Se(this,Rn),r={type:"active",...t};return Zr.batch(()=>(n.findAll(t).forEach(i=>
281{i.reset()}),this.refetchQueries(r,e)))}cancelQueries(t={},e={}){const n={revert:!0,...e},r=Zr.batch(()=>Se(this,Rn).findAll(t).map(i=>i.cancel(n)));return Promise.all(r).then(vs).catch(vs)}invalidateQueries(t={},e={}){return Zr.batch(()=>{if(Se(this,Rn).findAll(t).forEach(r=>{r.invalidate()}),t.refetchType==="none")return Promise.resolve();const n={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(n,e)})}refetchQueries(t={},e){const n={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},r=Zr.batch(()=>Se(this,Rn).findAll(t).filter(i=>!i.isDisabled()).map(i=>{let s=i.fetch(void 0,n);return n.throwOnError||(s=s.catch(vs)),i.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(r).then(vs)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=Se(this,Rn).build(this,e);return n.isStaleByTime(JS(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(vs).catch(vs)}fetchInfiniteQuery(t){return t.behavior=nk(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(vs).catch(vs)}ensureInfiniteQueryData(t){return t.behavior=nk(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return E0.isOnline()?Se(this,Vo).resumePausedMutations():Promise.resolve()}getQueryCache(){return Se(this,Rn)}getMutationCache(){return Se(this,Vo)}getDefaultOptions(){return Se(this,Go)}setDefaultOptions(t){jt(this,Go,t)}setQueryDefaults(t,e){Se(this,ad).set(Ff(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...Se(this,ad).values()];let n={};return e.forEach(r=>{zf(t,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(t,e){Se(this,od).set(Ff(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...Se(this,od).values()];let n={};return e.forEach(r=>{zf(t,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...Se(this,Go).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=qx(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===bP&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...Se(this,Go).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){Se(this,Rn).clear(),Se(this,Vo).clear()}},Rn=new WeakMap,Vo=new WeakMap,Go=new WeakMap,ad=new WeakMap,od=new WeakMap,Ko=new WeakMap,ld=new WeakMap,cd=new WeakMap,R4),Mz=E.createContext(void 0),Fz=({client:t,children:e})=>(E.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),m.jsx(Mz.Provider,{value:t,children:e}));/** 282 * @remix-run/router v1.19.2 283 * 284 * Copyright (c) Remix Software Inc. 285 * 286 * This source code is licensed under the MIT license found in the 287 * LICENSE.md file in the root directory of this source tree. 288 * 289 * @license MIT 290 */function $f(){return $f=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},$f.apply(this,arguments)}var Jo;(function(t){t.Pop="POP",t.Push="PUSH",t.Replace="REPLACE"})(Jo||(Jo={}));const ik="popstate";function zz(t){t===void 0&&(t={});function e(r,i){let{pathname:s,search:a,hash:o}=r.location;return Tw("",{pathname:s,search:a,hash:o},i.state&&i.state.usr||null,i.state&&i.state.key||"default")}function n(r,i){return typeof i=="string"?i:N0(i)}return Uz(e,n,null,t)}function Jn(t,e){if(t===!1||t===null||typeof t>"u")throw new Error(e)}function AP(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function $z(){return Math.random().toString(36).substr(2,8)}function sk(t,e){return{usr:t.state,key:t.key,idx:e}}function Tw(t,e,n,r){return n===void 0&&(n=null),$f({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Md(e):e,{state:n,key:e&&e.key||r||$z()})}function N0(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Md(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function Uz(t,e,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:s=!1}=r,a=i.history,o=Jo.Pop,l=null,c=u();c==null&&(c=0,a.replaceState($f({},a.state,{idx:c}),""));function u(){return(a.state||{idx:null}).idx}function d(){o=Jo.Pop;let _=u(),w=_==null?null:_-c;c=_,l&&l({action:o,location:v.location,delta:w})}function f(_,w){o=Jo.Push;
vendor: 3,413 bytes, line 290
290let x=Tw(v.location,_,w);c=u()+1;let k=sk(x,c),N=v.createHref(x);try{a.pushState(k,"",N)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;i.location.assign(N)}s&&l&&l({action:o,location:v.location,delta:1})}function h(_,w){o=Jo.Replace;let x=Tw(v.location,_,w);c=u();let k=sk(x,c),N=v.createHref(x);a.replaceState(k,"",N),s&&l&&l({action:o,location:v.location,delta:0})}function y(_){let w=i.location.origin!=="null"?i.location.origin:i.location.href,x=typeof _=="string"?_:N0(_);return x=x.replace(/ $/,"%20"),Jn(w,"No window.location.(origin|href) available to create URL for href: "+x),new URL(x,w)}let v={get action(){return o},get location(){return t(i,a)},listen(_){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener(ik,d),l=_,()=>{i.removeEventListener(ik,d),l=null}},createHref(_){return e(i,_)},createURL:y,encodeLocation(_){let w=y(_);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:f,replace:h,go(_){return a.go(_)}};return v}var ak;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(ak||(ak={}));function Bz(t,e,n){return n===void 0&&(n="/"),qz(t,e,n,!1)}function qz(t,e,n,r){let i=typeof e=="string"?Md(e):e,s=Hx(i.pathname||"/",n);if(s==null)return null;let a=CP(t);Hz(a);let o=null;for(let l=0;o==null&&l<a.length;++l){let c=t$(s);o=Qz(a[l],c,r)}return o}function CP(t,e,n,r){e===void 0&&(e=[]),n===void 0&&(n=[]),r===void 0&&(r="");let i=(s,a,o)=>{let l={relativePath:o===void 0?s.path||"":o,caseSensitive:s.caseSensitive===!0,childrenIndex:a,route:s};l.relativePath.startsWith("/")&&(Jn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=ll([r,l.relativePath]),u=n.concat(l);s.children&&s.children.length>0&&(Jn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),CP(s.children,e,u,c)),!(s.path==null&&!s.index)&&e.push({path:c,score:Jz(c,s.index),routesMeta:u})};return t.forEach((s,a)=>{var o;if(s.path===""||!((o=s.path)!=null&&o.includes("?")))i(s,a);else for(let l of PP(s.path))i(s,a,l)}),e}function PP(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,i=n.endsWith("?"),s=n.replace(/\?$/,"");if(r.length===0)return i?[s,""]:[s];let a=PP(r.join("/")),o=[];return o.push(...a.map(l=>l===""?s:[s,l].join("/"))),i&&o.push(...a),o.map(l=>t.startsWith("/")&&l===""?"/":l)}function Hz(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:Xz(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Wz=/^:[\w-]+$/,Vz=3,Gz=2,Kz=1,Zz=10,Yz=-2,ok=t=>t==="*";function Jz(t,e){let n=t.split("/"),r=n.length;return n.some(ok)&&(r+=Yz),e&&(r+=Gz),n.filter(i=>!ok(i)).reduce((i,s)=>i+(Wz.test(s)?Vz:s===""?Kz:Zz),r)}function Xz(t,e){return t.length===e.length&&t.slice(0,-1).every((r,i)=>r===e[i])?t[t.length-1]-e[e.length-1]:0}function Qz(t,e,n){let{routesMeta:r}=t,i={},s="/",a=[];for(let o=0;o<r.length;++o){let l=r[o],c=o===r.length-1,u=s==="/"?e:e.slice(s.length)||"/",d=lk({path:l.relativePath,caseSensitive:l.caseSensitive,end:c},u),f=l.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=lk({path:l.relativePath,caseSensitive:l.caseSensitive,end:!1},u)),!d)return null;
vendor: 6,834 bytes, lines 290-299
290Object.assign(i,d.params),a.push({params:i,pathname:ll([s,d.pathname]),pathnameBase:s$(ll([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=ll([s,d.pathnameBase]))}return a}function lk(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=e$(t.path,t.caseSensitive,t.end),i=e.match(n);if(!i)return null;let s=i[0],a=s.replace(/(.)\/+$/,"$1"),o=i.slice(1);return{params:r.reduce((c,u,d)=>{let{paramName:f,isOptional:h}=u;if(f==="*"){let v=o[d]||"";a=s.slice(0,s.length-v.length).replace(/(.)\/+$/,"$1")}const y=o[d];return h&&!y?c[f]=void 0:c[f]=(y||"").replace(/%2F/g,"/"),c},{}),pathname:s,pathnameBase:a,pattern:t}}function e$(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),AP(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],i="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(a,o,l)=>(r.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),i+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?i+="\\/*$":t!==""&&t!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,e?void 0:"i"),r]}function t$(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return AP(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Hx(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}function n$(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:i=""}=typeof t=="string"?Md(t):t;return{pathname:n?n.startsWith("/")?n:r$(n,e):e,search:a$(r),hash:o$(i)}}function r$(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(i=>{i===".."?n.length>1&&n.pop():i!=="."&&n.push(i)}),n.length>1?n.join("/"):"/"}function xy(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function i$(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function TP(t,e){let n=i$(t);return e?n.map((r,i)=>i===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function RP(t,e,n,r){r===void 0&&(r=!1);let i;typeof t=="string"?i=Md(t):(i=$f({},t),Jn(!i.pathname||!i.pathname.includes("?"),xy("?","pathname","search",i)),Jn(!i.pathname||!i.pathname.includes("#"),xy("#","pathname","hash",i)),Jn(!i.search||!i.search.includes("#"),xy("#","search","hash",i)));let s=t===""||i.pathname==="",a=s?"/":i.pathname,o;if(a==null)o=n;else{let d=e.length-1;if(!r&&a.startsWith("..")){let f=a.split("/");for(;f[0]==="..";)f.shift(),d-=1;i.pathname=f.join("/")}o=d>=0?e[d]:"/"}let l=n$(i,o),c=a&&a!=="/"&&a.endsWith("/"),u=(s||a===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const ll=t=>t.join("/").replace(/\/\/+/g,"/"),s$=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),a$=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,o$=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;function l$(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const LP=["post","put","patch","delete"];new Set(LP);const c$=["get",...LP];new Set(c$);/** 291 * React Router v6.26.2 292 * 293 * Copyright (c) Remix Software Inc. 294 * 295 * This source code is licensed under the MIT license found in the 296 * LICENSE.md file in the root directory of this source tree. 297 * 298 * @license MIT 299 */function Uf(){return Uf=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Uf.apply(this,arguments)}const Wx=E.createContext(null),u$=E.createContext(null),Rc=E.createContext(null),Mv=E.createContext(null),Lc=E.createContext({outlet:null,matches:[],isDataRoute:!1}),jP=E.createContext(null);function d$(t,e){let{relative:n}=e===void 0?{}:e;Pp()||Jn(!1);let{basename:r,navigator:i}=E.useContext(Rc),{hash:s,pathname:a,search:o}=IP(t,{relative:n}),l=a;return r!=="/"&&(l=a==="/"?r:ll([r,a])),i.createHref({pathname:l,search:o,hash:s})}function Pp(){return E.useContext(Mv)!=null}function jc(){return Pp()||Jn(!1),E.useContext(Mv).location}function OP(t){E.useContext(Rc).static||E.useLayoutEffect(t)}function Oc(){let{isDataRoute:t}=E.useContext(Lc);return t?k$():h$()}function h$(){Pp()||Jn(!1);let t=E.useContext(Wx),{basename:e,future:n,navigator:r}=E.useContext(Rc),{matches:i}=E.useContext(Lc),{pathname:s}=jc(),a=JSON.stringify(TP(i,n.v7_relativeSplatPath)),o=E.useRef(!1);return OP(()=>{o.current=!0}),E.useCallback(function(c,u){if(u===void 0&&(u={}),!o.current)return;if(typeof c=="number"){r.go(c);return}let d=RP(c,JSON.parse(a),s,u.relative==="path");t==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:ll([e,d.pathname])),(u.replace?r.replace:r.push)(d,u.state,u)},[e,r,a,s,t])}function IP(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=E.useContext(Rc),{matches:i}=E.useContext(Lc),{pathname:s}=jc(),a=JSON.stringify(TP(i,r.v7_relativeSplatPath));return E.useMemo(()=>RP(t,JSON.parse(a),s,n==="path"),[t,a,s,n])}function f$(t,e){return p$(t,e)}function p$(t,e,n,r){Pp()||Jn(!1);let{navigator:i}=E.useContext(Rc),{matches:s}=E.useContext(Lc),a=s[s.length-1],o=a?a.params:{};a&&a.pathname;let l=a?a.pathnameBase:"/";a&&a.route;let c=jc(),u;if(e){var d;let _=typeof e=="string"?Md(e):e;l==="/"||(d=_.pathname)!=null&&d.startsWith(l)||Jn(!1),u=_}else u=c;let f=u.pathname||"/",h=f;if(l!=="/"){let _=l.replace(/^\//,"").split("/");h="/"+f.replace(/^\//,"").split("/").slice(_.length).join("/")}let y=Bz(t,{pathname:h}),v=w$(y&&y.map(_=>Object.assign({},_,{params:Object.assign({},o,_.params),pathname:ll([l,i.encodeLocation?i.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?l:ll([l,i.encodeLocation?i.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),s,n,r);return e&&v?E.createElement(Mv.Provider,{value:{location:Uf({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:Jo.Pop}},v):v}function m$(){let t=S$(),e=l$(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application
299Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},e),n?E.createElement("pre",{style:i},n):null,null)}const g$=E.createElement(m$,null);class v$ extends E.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?E.createElement(Lc.Provider,{value:this.props.routeContext},E.createElement(jP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function y$(t){let{routeContext:e,match:n,children:r}=t,i=E.useContext(Wx);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),E.createElement(Lc.Provider,{value:e},r)}function w$(t,e,n,r){var i;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var s;if(!n)return null;if(n.errors)t=n.matches;else if((s=r)!=null&&s.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let a=t,o=(i=n)==null?void 0:i.errors;if(o!=null){let u=a.findIndex(d=>d.route.id&&(o==null?void 0:o[d.route.id])!==void 0);u>=0||Jn(!1),a=a.slice(0,Math.min(a.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u<a.length;u++){let d=a[u];if((d.route.HydrateFallback||d.route.hydrateFallbackElement)&&(c=u),d.route.id){let{loaderData:f,errors:h}=n,y=d.route.loader&&f[d.route.id]===void 0&&(!h||h[d.route.id]===void 0);if(d.route.lazy||y){l=!0,c>=0?a=a.slice(0,c+1):a=[a[0]];break}}}return a.reduceRight((u,d,f)=>{let h,y=!1,v=null,_=null;n&&(h=o&&d.route.id?o[d.route.id]:void 0,v=d.route.errorElement||g$,l&&(c<0&&f===0?(y=!0,_=null):c===f&&(y=!0,_=d.route.hydrateFallbackElement||null)));let w=e.concat(a.slice(0,f+1)),x=()=>{let k;return h?k=v:y?k=_:d.route.Component?k=E.createElement(d.route.Component,null):d.route.element?k=d.route.element:k=u,E.createElement(y$,{match:d,routeContext:{outlet:u,matches:w,isDataRoute:n!=null},children:k})};return n&&(d.route.ErrorBoundary||d.route.errorElement||f===0)?E.createElement(v$,{location:n.location,revalidation:n.revalidation,component:v,error:h,children:x(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):x()},null)}var DP=function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t}(DP||{}),A0=function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t}(A0||{});function b$(t){let e=E.useContext(Wx);return e||Jn(!1),e}function x$(t){let e=E.useContext(u$);return e||Jn(!1),e}function _$(t){let e=E.useContext(Lc);return e||Jn(!1),e}function MP(t){let e=_$(),n=e.matches[e.matches.length-1];return n.route.id||Jn(!1),n.route.id}function S$(){var t;let e=E.useContext(jP),n=x$(A0.UseRouteError),r=MP(A0.UseRouteError);return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function k$(){let{router:t}=b$(DP.UseNavigateStable),e=MP(A0.UseNavigateStable),n=E.useRef(!1);return OP(()=>{n.current=!0}),E.useCallback(function(i,s){s===void 0&&(s={}),n.current&&(typeof i=="number"?t.navigate(i):t.navigate(i,Uf({fromRouteId:e},s)))},[t,e])}function Vi(t){Jn(!1)}function E$(t){let{basename:e="/",children:n=null,location:r,navigationType:i=Jo.Pop,navigator:s,static:a=!1,future:o}=t;Pp()&&Jn(!1);let l=e.replace(/^\/*/,"/"),c=E.useMemo(()=>({basename:l,navigator:s,static:a,future:Uf({v7_relativeSplatPath:!1},o)}),[l,o,s,a]);typeof r=="string"&&(r=Md(r));
299let{pathname:u="/",search:d="",hash:f="",state:h=null,key:y="default"}=r,v=E.useMemo(()=>{let _=Hx(u,l);return _==null?null:{location:{pathname:_,search:d,hash:f,state:h,key:y},navigationType:i}},[l,u,d,f,h,y,i]);return v==null?null:E.createElement(Rc.Provider,{value:c},E.createElement(Mv.Provider,{children:n,value:v}))}function N$(t){let{children:e,location:n}=t;return f$(Rw(e),n)}new Promise(()=>{});function Rw(t,e){e===void 0&&(e=[]);let n=[];return E.Children.forEach(t,(r,i)=>{if(!E.isValidElement(r))return;let s=[...e,i];if(r.type===E.Fragment){n.push.apply(n,Rw(r.props.children,s));return}r.type!==Vi&&Jn(!1),!r.props.index||!r.props.children||Jn(!1);let a={id:r.props.id||s.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(a.children=Rw(r.props.children,s)),n.push(a)}),n}/** 300 * React Router DOM v6.26.2 301 * 302 * Copyright (c) Remix Software Inc. 303 * 304 * This source code is licensed under the MIT license found in the 305 * LICENSE.md file in the root directory of this source tree. 306 * 307 * @license MIT 308 */function Lw(){return Lw=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Lw.apply(this,arguments)}function A$(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function C$(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function P$(t,e){return t.button===0&&(!e||e==="_self")&&!C$(t)}function jw(t){return t===void 0&&(t=""),new URLSearchParams(typeof t=="string"||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce((e,n)=>{let r=t[n];return e.concat(Array.isArray(r)?r.map(i=>[n,i]):[[n,r]])},[]))}function T$(t,e){let n=jw(t);return e&&e.forEach((r,i)=>{n.has(i)||e.getAll(i).forEach(s=>{n.append(i,s)})}),n}const R$=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],L$="6";try{window.__reactRouterVersion=L$}catch{}const j$="startTransition",ck=B4[j$];function O$(t){let{basename:e,children:n,future:r,window:i}=t,s=E.useRef();s.current==null&&(s.current=zz({window:i,v5Compat:!0}));let a=s.current,[o,l]=E.useState({action:a.action,location:a.location}),{v7_startTransition:c}=r||{},u=E.useCallback(d=>{c&&ck?ck(()=>l(d)):l(d)},[l,c]);return E.useLayoutEffect(()=>a.listen(u),[a,u]),E.createElement(E$,{basename:e,children:n,location:o.location,navigationType:o.action,navigator:a,future:r})}const I$=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",D$=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_r=E.forwardRef(function(e,n){let{onClick:r,relative:i,reloadDocument:s,replace:a,state:o,target:l,to:c,preventScrollReset:u,unstable_viewTransition:d}=e,f=A$(e,R$),{basename:h}=E.useContext(Rc),y,v=!1;if(typeof c=="string"&&D$.test(c)&&(y=c,I$))try{let k=new URL(window.location.href),N=c.startsWith("//")?new URL(k.protocol+c):new URL(c),R=Hx(N.pathname,h);N.origin===k.origin&&R!=null?c=R+N.search+N.hash:v=!0}catch{}let _=d$(c,{relative:i}),w=M$(c,{replace:a,state:o,target:l,preventScrollReset:u,relative:i,unstable_viewTransition:d});function x(k){r&&r(k),k.defaultPrevented||w(k)}return E.createElement("a",Lw({},f,{href:y||_,onClick:v||s?r:x,ref:n,target:l}))});var uk;(function(t){t.UseScrollRestoration="useScrollRestoration",t.UseSubmit="useSubmit",t.UseSubmitFetcher="useSubmitFetcher",t.UseFetcher="useFetcher",t.useViewTransitionState="useViewTransitionState"})(uk||(uk={}));var dk;(function(t){t.UseFetcher="useFetcher",t.UseFetchers="useFetchers",t.UseScrollRestoration="useScrollRestoration"})(dk||(dk={}));function M$(t,e){let{target:n,replace:r,state:i,preventScrollReset:s,relative:a,unstable_viewTransition:o}=e===void 0?{}:e,l=Oc(),c=jc(),u=IP(t,{relative:a});return E.useCallback(d=>
vendor: 7,597 bytes, line 308
308{if(P$(d,n)){d.preventDefault();let f=r!==void 0?r:N0(c)===N0(u);l(t,{replace:f,state:i,preventScrollReset:s,relative:a,unstable_viewTransition:o})}},[c,l,u,r,i,n,t,s,a,o])}function F$(t){let e=E.useRef(jw(t)),n=E.useRef(!1),r=jc(),i=E.useMemo(()=>T$(r.search,n.current?null:e.current),[r.search]),s=Oc(),a=E.useCallback((o,l)=>{const c=jw(typeof o=="function"?o(i):o);n.current=!0,s("?"+c,l)},[s,i]);return[i,a]}const mt=t=>typeof t=="string",Ah=()=>{let t,e;const n=new Promise((r,i)=>{t=r,e=i});return n.resolve=t,n.reject=e,n},hk=t=>t==null?"":String(t),z$=(t,e,n)=>{t.forEach(r=>{e[r]&&(n[r]=e[r])})},$$=/###/g,fk=t=>t&&t.includes("###")?t.replace($$,"."):t,pk=t=>!t||mt(t),nf=(t,e,n)=>{const r=mt(e)?e.split("."):e;let i=0;for(;i<r.length-1;){if(pk(t))return{};const s=fk(r[i]);!t[s]&&n&&(t[s]=new n),Object.prototype.hasOwnProperty.call(t,s)?t=t[s]:t={},++i}return pk(t)?{}:{obj:t,k:fk(r[i])}},mk=(t,e,n)=>{const{obj:r,k:i}=nf(t,e,Object);if(r!==void 0||e.length===1){r[i]=n;return}let s=e[e.length-1],a=e.slice(0,e.length-1),o=nf(t,a,Object);for(;o.obj===void 0&&a.length;)s=`${a[a.length-1]}.${s}`,a=a.slice(0,a.length-1),o=nf(t,a,Object),o!=null&&o.obj&&typeof o.obj[`${o.k}.${s}`]<"u"&&(o.obj=void 0);o.obj[`${o.k}.${s}`]=n},U$=(t,e,n,r)=>{const{obj:i,k:s}=nf(t,e,Object);i[s]=i[s]||[],i[s].push(n)},C0=(t,e)=>{const{obj:n,k:r}=nf(t,e);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},B$=(t,e,n)=>{const r=C0(t,n);return r!==void 0?r:C0(e,n)},FP=(t,e,n)=>{for(const r in e)r!=="__proto__"&&r!=="constructor"&&(Object.prototype.hasOwnProperty.call(t,r)?mt(t[r])||t[r]instanceof String||mt(e[r])||e[r]instanceof String?n&&(t[r]=e[r]):FP(t[r],e[r],n):t[r]=e[r]);return t},Ma=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),q$={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},H$=t=>mt(t)?t.replace(/[&<>"'\/]/g,e=>q$[e]):t;class W${constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const n=this.regExpMap.get(e);if(n!==void 0)return n;const r=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,r),this.regExpQueue.push(e),r}}const V$=[" ",",","?","!",";"],G$=new W$(20),K$=(t,e,n)=>{e=e||"",n=n||"";const r=V$.filter(a=>!e.includes(a)&&!n.includes(a));if(r.length===0)return!0;const i=G$.getRegExp(`(${r.map(a=>a==="?"?"\\?":a).join("|")})`);let s=!i.test(t);if(!s){const a=t.indexOf(n);a>0&&!i.test(t.substring(0,a))&&(s=!0)}return s},Ow=(t,e,n=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const r=e.split(n);let i=t;for(let s=0;s<r.length;){if(!i||typeof i!="object")return;let a,o="";for(let l=s;l<r.length;++l)if(l!==s&&(o+=n),o+=r[l],a=i[o],a!==void 0){if(["string","number","boolean"].includes(typeof a)&&l<r.length-1)continue;s+=l-s+1;break}i=a}return i},Bf=t=>t==null?void 0:t.replace(/_/g,"-"),Z$={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var n,r;(r=(n=console==null?void 0:console[t])==null?void 0:n.apply)==null||r.call(n,console,e)}};class P0{constructor(e,n={}){this.init(e,n)}init(e,n={}){this.prefix=n.prefix||"i18next:",this.logger=e||Z$,this.options=n,this.debug=n.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,n,r,i){return i&&!this.debug?null:(e=e.map(s=>mt(s)?s.replace(/[\r\n\x00-\x1F\x7F]/g," "):s),mt(e[0])&&(e[0]=`${r}${this.prefix} ${e[0]}`),this.logger[n](e))}create(e){return new P0(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new P0(this.logger,e)}}var na=new P0;class Fv{constructor(){this.observers={}}on(e,n){return e.split(" ").forEach(r=>{this.observers[r]||(this.observers[r]=new Map);const i=this.observers[r].get(n)||0;this.observers[r].set(n,i+1)}),this}off(e,n){if(this.observers[e]){if(!n){delete this.observers[e];return}this.observers[e].delete(n)}}once(e,n){const r=(...i)=>{n(...i),this.off(e,r)};return this.on(e,r),this}emit(e,...n){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,s])=>{for(let a=0;a<s;a++)i(...n)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([i,s])=>{for(let a=0;a<s;a++)i(e,...n)})}}class gk extends Fv{constructor(e,n={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){const n=this.options.ns.indexOf(e);n>-1&&this.options.ns.splice(n,1)}getResource(e,n,r,i={}){var c,u;const s=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,a=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let o;e.includes(".")?o=e.split("."):(o=[e,n],r&&(Array.isArray(r)?o.push(...r):mt(r)&&s?o.push(...r.split(s)):o.push(r)));const l=C0(this.data,o);return!l&&!n&&!r&&e.includes(".")&&(e=o[0],n=o[1],r=o.slice(2).join(".")),l||!a||!mt(r)?l:Ow((u=(c=this.data)==null?void 0:c[e])==null?void 0:u[n],r,s)}addResource(e,n,r,i,s={silent:!1}){const a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let o=[e,n];r&&(o=o.concat(a?r.split(a):r)),e.includes(".")&&(o=e.split("."),i=n,n=o[1]),this.addNamespaces(n),mk(this.data,o,i),s.silent||this.emit("added",e,n,r,i)}addResources(e,n,r,i={silent:!1}){for(const s in r)(mt(r[s])||Array.isArray(r[s]))&&this.addResource(e,n,s,r[s],{silent:!0});i.silent||this.emit("added",e,n,r)}addResourceBundle(e,n,r,i,s,a={silent:!1,skipCopy:!1}){let o=[e,n];e.includes(".")&&(o=e.split("."),i=r,r=n,n=o[1]),this.addNamespaces(n);let l=C0(this.data,o)||{};a.skipCopy||(r=JSON.parse(JSON.stringify(r))),i?FP(l,r,s):l={...l,...r},mk(this.data,o,l),a.silent||this.emit("added",e,n,r)}removeResourceBundle(e,n){this.hasResourceBundle(e,n)&&delete this.data[e][n],this.removeNamespaces(n),this.emit("removed",e,n)}hasResourceBundle(e,n){return this.getResource(e,n)!==void 0}getResourceBundle(e,n){return n||(n=this.options.defaultNS),this.getResource(e,n)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const n=this.getDataByLanguage(e);return!!(n&&Object.keys(n)||[]).find(i=>n[i]&&Object.keys(n[i]).length>0)}toJSON(){return this.data}}var zP={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,n,r,i){return t.forEach(s=>{var a;e=((a=this.processors[s])==null?void 0:a.process(e,n,r,i))??e}),e}};const $P=Symbol("i18next/PATH_KEY");function Y$(){const t=[],e=Object.create(null);let n;return e.get=(r,i)=>{var s;return(s=n==null?void 0:n.revoke)==null||s.call(n),i===$P?t:(t.push(i),n=Proxy.revocable(r,e),n.proxy)},Proxy.revocable(Object.create(null),e).proxy}function qu(t,e){const{[$P]:n}=t(Y$()),r=(e==null?void 0:e.keySeparator)??".",i=(e==null?void 0:e.nsSeparator)??":",s=(e==null?void 0:e.enableSelector)==="strict";if(n.length>1&&i){const a=e==null?void 0:e.ns,o=s?Array.isArray(a)?a:a?[a]:null:Array.isArray(a)?a:null;if(o&&(s?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}const _y=t=>!mt(t)&&typeof t!="boolean"&&typeof t!="number";class T0 extends Fv{constructor(e,n={}){super(),z$(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","
308i18nFormat","utils"],e,this),this.options=n,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=na.create("translator"),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,n={interpolation:{}}){const r={...n};if(e==null)return!1;const i=this.resolve(e,r);if((i==null?void 0:i.res)===void 0)return!1;const s=_y(i.res);return!(r.returnObjects===!1&&s)}extractFromKey(e,n){let r=n.nsSeparator!==void 0?n.nsSeparator:this.options.nsSeparator;r===void 0&&(r=":");const i=n.keySeparator!==void 0?n.keySeparator:this.options.keySeparator;let s=n.ns||this.options.defaultNS||[];const a=r&&e.includes(r),o=!this.options.userDefinedKeySeparator&&!n.keySeparator&&!this.options.userDefinedNsSeparator&&!n.nsSeparator&&!K$(e,r,i);if(a&&!o){const l=e.match(this.interpolator.nestingRegexp);if(l&&l.length>0)return{key:e,namespaces:mt(s)?[s]:s};const c=e.split(r);(r!==i||r===i&&this.options.ns.includes(c[0]))&&(s=c.shift()),e=c.join(i)}return{key:e,namespaces:mt(s)?[s]:s}}translate(e,n,r){let i=typeof n=="object"?{...n}:n;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=qu(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]),e=e.map(W=>typeof W=="function"?qu(W,{...this.options,...i}):String(W));const s=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:o,namespaces:l}=this.extractFromKey(e[e.length-1],i),c=l[l.length-1];let u=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;u===void 0&&(u=":");const d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((d==null?void 0:d.toLowerCase())==="cimode")return f?s?{res:`${c}${u}${o}`,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(i)}:`${c}${u}${o}`:s?{res:o,usedKey:o,exactUsedKey:o,usedLng:d,usedNS:c,usedParams:this.getUsedParamsDetails(i)}:o;const h=this.resolve(e,i);let y=h==null?void 0:h.res;const v=(h==null?void 0:h.usedKey)||o,_=(h==null?void 0:h.exactUsedKey)||o,w=["[object Number]","[object Function]","[object RegExp]"],x=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,k=!this.i18nFormat||this.i18nFormat.handleAsObject,N=i.count!==void 0&&!mt(i.count),R=T0.hasDefaultValue(i),H=N?this.pluralResolver.getSuffix(d,i.count,i):"",F=i.ordinal&&N?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):"",M=N&&!i.ordinal&&i.count===0,I=M&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${H}`]||i[`defaultValue${F}`]||i.defaultValue;let G=y;k&&!y&&R&&(G=I);const L=_y(G),j=Object.prototype.toString.apply(G);if(k&&G&&L&&!w.includes(j)&&!(mt(x)&&Array.isArray(G))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const W=this.options.returnedObjectHandler?this.options.returnedObjectHandler(v,G,{...i,ns:l}):`key '${o} (${this.language})' returned an object instead of string.`;return s?(h.res=W,h.usedParams=this.getUsedParamsDetails(i),h):W}if(a){const W=Array.isArray(G),z=W?[]:{},re=W?_:v;for(const ne in G)if(Object.prototype.hasOwnProperty.call(G,ne)){const oe=`${re}${a}${ne}`;R&&!y?z[ne]=this.translate(oe,{...i,defaultValue:_y(I)?I[ne]:void 0,joinArrays:!1,ns:l}):z[ne]=this.translate(oe,{...i,joinArrays:!1,ns:l}),z[ne]===oe&&(z[ne]=G[ne])}y=z}}else if(k&&mt(x)&&Array.isArray(y))y=y.join(x),y&&(y=this.extendTranslation(y,e,i,r));else{let W=!1,z=!1;!this.isValidLookup(y)&&R&&(W=!0,y=I),this.isValidLookup(y)||(z=!0,y=o);const ne=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&z?void 0:y,oe=R&&I!==y&&this.options.updateMissing;if(z||W||oe){if(this.logger.log(oe?"updateKey":"missingKey",d,c,N&&!oe?`${o}${this.pluralResolver.getSuffix(d,i.count,i)}`:o,oe?I:y),a){const ie=this.resolve(o,{...i,keySeparator:!1});ie&&ie.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let U=[];const J=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&J&&J[0])for(let ie=0;ie<J.length;ie++)U.push(J[ie]);else this.options.saveMissingTo==="all"?U=this.languageUtils.toResolveHierarchy(i.lng||this.language):U.push(i.lng||this.language);const de=(ie,C,q)=>{var Q;const X=R&&q!==y?q:ne;this.options.missingKeyHandler?this.options.missingKeyHandler(ie,c,C,X,oe,i):(Q=this.backendConnector)!=null&&Q.saveMissing&&this.backendConnector.saveMissing(ie,c,C,X,oe,i),this.emit
vendor: 29,023 bytes, line 308
308("missingKey",ie,c,C,y)};this.options.saveMissing&&(this.options.saveMissingPlurals&&N?U.forEach(ie=>{const C=this.pluralResolver.getSuffixes(ie,i);M&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!C.includes(`${this.options.pluralSeparator}zero`)&&C.push(`${this.options.pluralSeparator}zero`),C.forEach(q=>{de([ie],o+q,i[`defaultValue${q}`]||I)})}):de(U,o,I))}y=this.extendTranslation(y,e,i,h,r),z&&y===o&&this.options.appendNamespaceToMissingKey&&(y=`${c}${u}${o}`),(z||W)&&this.options.parseMissingKeyHandler&&(y=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${c}${u}${o}`:o,W?y:void 0,i))}return s?(h.res=y,h.usedParams=this.getUsedParamsDetails(i),h):y}extendTranslation(e,n,r,i,s){var l,c;if((l=this.i18nFormat)!=null&&l.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...r},r.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!r.skipInterpolation){r.interpolation&&this.interpolator.init({...r,interpolation:{...this.options.interpolation,...r.interpolation}});const u=mt(e)&&(((c=r==null?void 0:r.interpolation)==null?void 0:c.skipOnVariables)!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let d;if(u){const h=e.match(this.interpolator.nestingRegexp);d=h&&h.length}let f=r.replace&&!mt(r.replace)?r.replace:r;if(this.options.interpolation.defaultVariables&&(f={...this.options.interpolation.defaultVariables,...f}),e=this.interpolator.interpolate(e,f,r.lng||this.language||i.usedLng,r),u){const h=e.match(this.interpolator.nestingRegexp),y=h&&h.length;d<y&&(r.nest=!1)}!r.lng&&i&&i.res&&(r.lng=this.language||i.usedLng),r.nest!==!1&&(e=this.interpolator.nest(e,(...h)=>(s==null?void 0:s[0])===h[0]&&!r.context?(this.logger.warn(`It seems you are nesting recursively key: ${h[0]} in key: ${n[0]}`),null):this.translate(...h,n),r)),r.interpolation&&this.interpolator.reset()}const a=r.postProcess||this.options.postProcess,o=mt(a)?[a]:a;return e!=null&&(o!=null&&o.length)&&r.applyPostProcessor!==!1&&(e=zP.handle(o,e,n,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(r)},...r}:r,this)),e}resolve(e,n={}){let r,i,s,a,o;return mt(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(l=>typeof l=="function"?qu(l,{...this.options,...n}):l)),e.forEach(l=>{if(this.isValidLookup(r))return;const c=this.extractFromKey(l,n),u=c.key;i=u;let d=c.namespaces;this.options.fallbackNS&&(d=d.concat(this.options.fallbackNS));const f=n.count!==void 0&&!mt(n.count),h=f&&!n.ordinal&&n.count===0,y=n.context!==void 0&&(mt(n.context)||typeof n.context=="number")&&n.context!=="",v=n.lngs?n.lngs:this.languageUtils.toResolveHierarchy(n.lng||this.language,n.fallbackLng);d.forEach(_=>{var w,x;this.isValidLookup(r)||(o=_,!this.checkedLoadedFor[`${v[0]}-${_}`]&&((w=this.utils)!=null&&w.hasLoadedNamespace)&&!((x=this.utils)!=null&&x.hasLoadedNamespace(o))&&(this.checkedLoadedFor[`${v[0]}-${_}`]=!0,this.logger.warn(`key "${i}" for languages "${v.join(", ")}" won't get resolved as namespace "${o}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),v.forEach(k=>{var H;if(this.isValidLookup(r))return;a=k;const N=[u];if((H=this.i18nFormat)!=null&&H.addLookupKeys)this.i18nFormat.addLookupKeys(N,u,k,_,n);else{let F;f&&(F=this.pluralResolver.getSuffix(k,n.count,n));const M=`${this.options.pluralSeparator}zero`,I=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(f&&(n.ordinal&&F.startsWith(I)&&N.push(u+F.replace(I,this.options.pluralSeparator)),N.push(u+F),h&&N.push(u+M)),y){const G=`${u}${this.options.contextSeparator||"_"}${n.context}`;N.push(G),f&&(n.ordinal&&F.startsWith(I)&&N.push(G+F.replace(I,this.options.pluralSeparator)),N.push(G+F),h&&N.push(G+M))}}let R;for(;R=N.pop();)this.isValidLookup(r)||(s=R,r=this.getResource(k,_,R,n))}))})}),{res:r,usedKey:i,exactUsedKey:s,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,n,r,i={}){var s;return(s=this.i18nFormat)!=null&&s.getResource?this.i18nFormat.getResource(e,n,r,i):this.resourceStore.getResource(e,n,r,i)}getUsedParamsDetails(e={}){const n=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],r=e.replace&&!mt(e.replace);let i=r?e.replace:e;if(r&&typeof e.count<"u"&&(i={...i,count:e.count}),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!r){i={...i};for(const s of n)delete i[s]}return i}static hasDefaultValue(e){const n="defaultValue";for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&r.startsWith(n)&&e[r]!==void 0)return!0;return!1}}class vk{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=na.create("languageUtils")}getScriptPartFromCode(e){if(e=Bf(e),!e||!e.includes("-"))return null;const n=e.split("-");return n.length===2||(n.pop(),n[n.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(n.join("-"))}getLanguagePartFromCode(e){if(e=Bf(e),!e||!e.includes("-"))return e;const n=e.split("-");return this.formatLanguageCode(n[0])}formatLanguageCode(e){if(mt(e)&&e.includes("-")){let n;try{n=Intl.getCanonicalLocales(e)[0]}catch{}return n&&this.options.lowerCaseLng&&(n=n.toLowerCase()),n||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let n;return e.forEach(r=>{if(n)return;const i=this.formatLanguageCode(r);(!this.options.supportedLngs||this.isSupportedCode(i))&&(n=i)}),!n&&this.options.supportedLngs&&e.forEach(r=>{if(n)return;const i=this.getScriptPartFromCode(r);if(this.isSupportedCode(i))return n=i;const s=this.getLanguagePartFromCode(r);if(this.isSupportedCode(s))return n=s;n=this.options.supportedLngs.find(a=>a===s?!0:!a.includes("-")&&!s.includes("-")?!1:!!(a.includes("-")&&!s.includes("-")&&a.slice(0,a.indexOf("-"))===s||a.startsWith(s)&&s.length>1))}),n||(n=this.getFallbackCodes(this.options.fallbackLng)[0]),n}getFallbackCodes(e,n){if(!e)return[];if(typeof e=="function"&&(e=e(n)),mt(e)&&(e=[e]),Array.isArray(e))return e;if(!n)return e.default||[];let r=e[n];return r||(r=e[this.getScriptPartFromCode(n)]),r||(r=e[this.formatLanguageCode(n)]),r||(r=e[this.getLanguagePartFromCode(n)]),r||(r=e.default),r||[]}toResolveHierarchy(e,n){const r=this.getFallbackCodes((n===!1?[]:n)||this.options.fallbackLng||[],e),i=[],s=a=>{a&&(this.isSupportedCode(a)?i.push(a):this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`))};return mt(e)&&(e.includes("-")||e.includes("_"))?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(e))):mt(e)&&s(this.formatLanguageCode(e)),r.forEach(a=>{i.includes(a)||s(this.formatLanguageCode(a))}),i}}const yk={zero:0,one:1,two:2,few:3,many:4,other:5},wk={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class J${constructor(e,n={}){this.languageUtils=e,this.options=n,this.logger=na.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,n={}){const r=Bf(e==="dev"?"en":e),i=n.ordinal?"ordinal":"cardinal",s=JSON.stringify({cleanedCode:r,type:i});if(s in this.pluralRulesCache)return this.pluralRulesCache[s];let a;try{a=new Intl.PluralRules(r,{type:i})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),wk;if(!e.match(/-|_/))return wk;const l=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(l,n)}return this.pluralRulesCache[s]=a,a}needsPlural(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),(r==null?void 0:r.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,n,r={}){return this.getSuffixes(e,r).map(i=>`${n}${i}`)}getSuffixes(e,n={}){let r=this.getRule(e,n);return r||(r=this.getRule("dev",n)),r?r.resolvedOptions().pluralCategories.sort((i,s)=>yk[i]-yk[s]).map(i=>`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,n,r={}){const i=this.getRule(e,r);return i?`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i.select(n)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",n,r))}}const bk=(t,e,n,r=".",i=!0)=>{let s=B$(t,e,n);return!s&&i&&mt(n)&&(s=Ow(t,n,r),s===void 0&&(s=Ow(e,n,r))),s},X$=t=>t.replace(/\$/g,"$$$$");class xk{constructor(e={}){var n;this.logger=na.create("interpolator"),this.options=e,this.format=((n=e==null?void 0:e.interpolation)==null?void 0:n.format)||(r=>r),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:n,escapeValue:r,useRawValueToEscape:i,prefix:s,prefixEscaped:a,suffix:o,suffixEscaped:l,formatSeparator:c,unescapeSuffix:u,unescapePrefix:d,nestingPrefix:f,nestingPrefixEscaped:h,nestingSuffix:y,nestingSuffixEscaped:v,nestingOptionsSeparator:_,maxReplaces:w,alwaysFormat:x}=e.interpolation;this.escape=n!==void 0?n:H$,this.escapeValue=r!==void 0?r:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=s?Ma(s):a||"{{",this.suffix=o?Ma(o):l||"}}",this.formatSeparator=c||",",this.unescapePrefix=u?"":d?Ma(d):"-",this.unescapeSuffix=this.unescapePrefix?"":u?Ma(u):"",this.nestingPrefix=f?Ma(f):h||Ma("$t("),this.nestingSuffix=y?Ma(y):v||Ma(")"),this.nestingOptionsSeparator=_||",",this.maxReplaces=w||1e3,this.alwaysFormat=x!==void 0?x:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(n,r)=>(n==null?void 0:n.source)===r?(n.lastIndex=0,n):new RegExp(r,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,n,r,i){var h;let s,a,o;const l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=y=>{if(!y.includes(this.formatSeparator)){const x=bk(n,l,y,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(x,void 0,r,{...i,...n,interpolationkey:y}):x}const v=y.split(this.formatSeparator),_=v.shift().trim(),w=v.join(this.formatSeparator).trim();return this.format(bk(n,l,_,this.options.keySeparator,this.options.ignoreJSONStructure),w,r,{...i,...n,interpolationkey:_})};this.resetRegExp(),!this.escapeValue&&typeof e=="string"&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn("nesting options string contains interpolated variables with escapeValue: false â if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.");const u=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,d=((h=i==null?void 0:i.interpolation)==null?void 0:h.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:y=>y},{regex:this.regexp,safeValue:y=>this.escapeValue?this.escape(y):y}].forEach(y=>{for(o=0;s=y.regex.exec(e);){const v=s[1].trim();if(a=c(v),a===void 0)if(typeof u=="function"){const w=u(e,s,i);a=mt(w)?w:""}else if(i&&Object.prototype.hasOwnProperty.call(i,v))a="";else if(d){a=s[0];continue}else this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`),a="";else!mt(a)&&!this.useRawValueToEscape&&(a=hk(a));const _=y.safeValue(a);if(e=e.replace(s[0],X$(_)),d?(y.regex.lastIndex+=_.length,y.regex.lastIndex-=s[0].length):y.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,n,r={}){let i,s,a;const o=(l,c)=>{const u=this.nestingOptionsSeparator;if(!l.includes(u))return l;const d=l.split(new RegExp(`${Ma(u)}[ ]*{`));let f=`{${d[1]}`;l=d[0],f=this.interpolate(f,a);const h=f.match(/'/g),y=f.match(/"/g);(((h==null?void 0:h.length)??0)%2===0&&!y||((y==null?void 0:y.length)??0)%2!==0)&&(f=f.replace(/'/g,'"'));try{a=JSON.parse(f),c&&(a={...c,...a})}catch(v){return this.logger.warn(`failed parsing options string in nesting for key ${l}`,v),`${l}${u}${f}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,l};for(;i=this.nestingRegexp.exec(e);){let l=[];a={...r},a=a.replace&&!mt(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;const c=/{.*}/s.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(c!==-1&&(l=i[1].slice(c).split(this.formatSeparator).map(u=>u.trim()).filter(Boolean),i[1]=i[1].slice(0,c)),s=n(o.call(this,i[1].trim(),a),a),s&&i[0]===e&&!mt(s))return s;mt(s)||(s=hk(s)),s||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),s=""),l.length&&(s=l.reduce((u,d)=>this.format(u,d,r.lng,{...r,interpolationkey:i[1].trim()}),s.trim())),e=e.replace(i[0],s),this.regexp.lastIndex=0}return e}}const Q$=t=>{let e=t.toLowerCase().trim();const n={};if(t.includes("(")){const r=t.split("(");e=r[0].toLowerCase().trim();const i=r[1].slice(0,-1);e==="currency"&&!i.includes(":")?n.currency||(n.currency=i.trim()):e==="relativetime"&&!i.includes(":")?n.range||(n.range=i.trim()):i.split(";").forEach(a=>{if(a){const[o,...l]=a.split(":"),c=l.join(":").trim().replace(/^'+|'+$/g,""),u=o.trim();n[u]||(n[u]=c),c==="false"&&(n[u]=!1),c==="true"&&(n[u]=!0),isNaN(c)||(n[u]=parseInt(c,10))}})}return{formatName:e,formatOptions:n}},_k=t=>{const e={};return(n,r,i)=>{let s=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(s={...s,[i.interpolationkey]:void 0});const a=r+JSON.stringify(s);let o=e[a];return o||(o=t(Bf(r),i),e[a]=o),o(n)}},e9=t=>(e,n,r)=>t(Bf(n),r)(e);class t9{constructor(e={}){this.logger=na.create("formatter"),this.options=e,this.init(e)}init(e,n={interpolation:{}}){this.formatSeparator=n.interpolation.formatSeparator||",";const r=n.cacheInBuiltFormats?_k:e9;this.formats={number:r((i,s)=>{const a=new Intl.NumberFormat(i,{...s});return o=>a.format(o)}),currency:r((i,s)=>{const a=new Intl.NumberFormat(i,{...s,style:"currency"});return o=>a.format(o)}),datetime:r((i,s)=>{const a=new Intl.DateTimeFormat(i,{...s});return o=>a.format(o)}),relativetime:r((i,s)=>{const a=new Intl.RelativeTimeFormat(i,{...s});return o=>a.format(o,s.range||"day")}),list:r((i,s)=>{const a=new Intl.ListFormat(i,{...s});return o=>a.format(o)})}}add(e,n){this.formats[e.toLowerCase().trim()]=n}addCached(e,n){this.formats[e.toLowerCase().trim()]=_k(n)}format(e,n,r,i={}){if(!n||e==null)return e;const s=n.split(this.formatSeparator),a=[];for(let l=0;l<s.length;l++){let c=s[l];for(;c.indexOf("(")>-1&&!c.includes(")")&&l+1<s.length;)c=`${c}${this.formatSeparator}${s[++l]}`;a.push(c)}return a.reduce((l,c)=>{var f;const{formatName:u,formatOptions:d}=Q$(c);if(this.formats[u]){let h=l;try{const y=((f=i==null?void 0:i.formatParams)==null?void 0:f[i.interpolationkey])||{},v=y.locale||y.lng||i.locale||i.lng||r;h=this.formats[u](l,v,{...d,...i,...y})}catch(y){this.logger.warn(y)}return h}else this.logger.warn(`there was no format function for ${u}`);return l},e)}}const n9=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class r9 extends Fv{constructor(e,n,r,i={}){var s,a;super(),this.backend=e,this.store=n,this.services=r,this.languageUtils=r.languageUtils,this.options=i,this.logger=na.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(a=(s=this.backend)==null?void 0:s.init)==null||a.call(s,r,i.backend,i)}queueLoad(e,n,r,i){const s={},a={},o={},l={};return e.forEach(c=>{let u=!0;n.forEach(d=>{const f=`${c}|${d}`;!r.reload&&this.store.hasResourceBundle(c,d)?this.state[f]=2:this.state[f]<0||(this.state[f]===1?a[f]===void 0&&(a[f]=!0):(this.state[f]=1,u=!1,a[f]===void 0&&(a[f]=!0),s[f]===void 0&&(s[f]=!0),l[d]===void 0&&(l[d]=!0)))}),u||(o[c]=!0)}),(Object.keys(s).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(s),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(l)}}loaded(e,n,r){const i=e.split("|"),s=i[0],a=i[1];n&&this.emit("failedLoading",s,a,n),!n&&r&&this.store.addResourceBundle(s,a,r,void 0,void 0,{skipCopy:!0}),this.state[e]=n?-1:2,n&&r&&(this.state[e]=0);const o={};this.queue.forEach(l=>{U$(l.loaded,[s],a),n9(l,e),n&&l.errors.push(n),l.pendingCount===0&&!l.done&&(Object.keys(l.loaded).forEach(c=>{o[c]||(o[c]={});const u=l.loaded[c];u.length&&u.forEach(d=>{o[c][d]===void 0&&(o[c][d]=!0)})}),l.done=!0,l.errors.length?l.callback(l.errors):l.callback())}),this.emit("loaded",o),this.queue=this.queue.filter(l=>!l.done)}read(e,n,r,i=0,s=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:n,fcName:r,tried:i,wait:s,callback:a});return}this.readingCalls++;const o=(c,u)=>{if(this.readingCalls--,this.waitingReads.length>0){const d=this.waitingReads.shift();this.read(d.lng,d.ns,d.fcName,d.tried,d.wait,d.callback)}if(c&&u&&i<this.maxRetries){setTimeout(()=>{this.read(e,n,r,i+1,s*2,a)},s);return}a(c,u)},l=this.backend[r].bind(this.backend);if(l.length===2){try{const c=l(e,n);c&&typeof c.then=="function"?c.then(u=>o(null,u)).catch(o):o(null,c)}catch(c){o(c)}return}return l(e,n,o)}prepareLoading(e,n,r={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();mt(e)&&(e=this.languageUtils.toResolveHierarchy(e)),mt(n)&&(n=[n]);const s=this.queueLoad(e,n,r,i);if(!s.toLoad.length)return s.pending.length||i(),null;s.toLoad.forEach(a=>{this.loadOne(a)})}load(e,n,r){this.prepareLoading(e,n,{},r)}reload(e,n,r){this.prepareLoading(e,n,{reload:!0},r)}loadOne(e,n=""){const r=e.split("|"),i=r[0],s=r[1];this.read(i,s,"read",void 0,void 0,(a,o)=>{a&&this.logger.warn(`${n}loading namespace ${s} for language ${i} failed`,a),!a&&o&&this.logger.log(`${n}loaded namespace ${s} for language ${i}`,o),this.loaded(e,a,o)})}saveMissing(e,n,r,i,s,a={},o=()=>{}){var l,c,u,d,f;if((c=(l=this.services)==null?void 0:l.utils)!=null&&c.hasLoadedNamespace&&!((d=(u=this.services)==null?void 0:u.utils)!=null&&d.hasLoadedNamespace(n))){this.logger.warn(`did not save key "${r}" as the namespace "${n}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(r==null||r==="")){if((f=this.backend)!=null&&f.create){const h={...a,isUpdate:s},y=this.backend.create.bind(this.backend);if(y.length<6)try{let v;y.length===5?v=y(e,n,r,i,h):v=y(e,n,r,i),v&&typeof v.then=="function"?v.then(_=>o(null,_)).catch(o):o(null,v)}catch(v){o(v)}else y(e,n,r,i,o,h)}!e||!e[0]||this.store.addResource(e[0],n,r,i)}}}const Sy=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),mt(t[1])&&(e.defaultValue=t[1]),mt(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const n=t[3]||t[2];Object.keys(n).forEach(r=>{e[r]=n[r]})}return e},interpolation:{escapeValue:!0,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Sk=t=>(mt(t.ns)&&(t.ns=[t.ns]),mt(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),mt(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),t.supportedLngs&&!t.supportedLngs.includes("cimode")&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),t),Vm=()=>{},i9=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(n=>{typeof t[n]=="function"&&(t[n]=t[n].bind(t))})};class rf extends Fv{constructor(e={},n){if(super(),this.options=Sk(e),this.services={},this.logger=na,this.modules={external:[]},i9(this),n&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,n),this;setTimeout(()=>{this.init(e,n)},0)}}init(e={},n){this.isInitializing=!0,typeof e=="function"&&(n=e,e={}),e.defaultNS==null&&e.ns&&(mt(e.ns)?e.defaultNS=e.ns:e.ns.includes("translation")||(e.defaultNS=e.ns[0]));const r=Sy();this.options={...r,...this.options,...Sk(e)},this.options.interpolation={...r.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=r.overloadTranslationOptionHandler);const i=c=>c?typeof c=="function"?new c:c:null;if(!this.options.isClone){this.modules.logger?na.init(i(this.modules.logger),this.options):na.init(null,this.options);let c;this.modules.formatter?c=this.modules.formatter:c=t9;const u=new vk(this.options);this.store=new gk(this.options.resources,this.options);const d=this.services;d.logger=na,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new J$(u,{prepend:this.options.pluralSeparator}),c&&(d.formatter=i(c),d.formatter.init&&d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new xk(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new r9(i(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",(f,...h)=>{this.emit(f,...h)}),this.modules.languageDetector&&(d.languageDetector=i(this.modules.languageDetector),d.languageDetector.init&&d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=i(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new T0(this.services,this.options),this.translator.on("*",(f,...h)=>{this.emit(f,...h)}),this.modules.external.forEach(f=>{f.init&&f.init(this)})}if(this.format=this.options.interpolation.format,n||(n=Vm),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const c=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);c.length>0&&c[0]!=="dev"&&(this.options.lng=c[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(c=>{this[c]=(...u)=>this.store[c](...u)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(c=>{this[c]=(...u)=>(this.store[c](...u),this)});const o=Ah(),l=()=>{const c=(u,d)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),o.resolve(d),n(u,d)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return c(null,this.t.bind(this));this.changeLanguage(this.options.lng,c)};return this.options.resources||!this.options.initAsync?l():setTimeout(l,0),o}loadResources(e,n=Vm){var s,a;let r=n;const i=mt(e)?e:this.language;if(typeof e=="function"&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return r();const o=[],l=c=>{if(!c||c==="cimode")return;this.services.languageUtils.toResolveHierarchy(c).forEach(d=>{d!=="cimode"&&(o.includes(d)||o.push(d))})};i?l(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(u=>l(u)),(a=(s=this.options.preload)==null?void 0:s.forEach)==null||a.call(s,c=>l(c)),this.services.backendConnector.load(o,this.options.ns,c=>{!c&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),r(c)})}else r(null)}reloadResources(e,n,r){const i=Ah();return typeof e=="function"&&(r=e,e=void 0),typeof n=="function"&&(r=n,n=void 0),e||(e=this.languages),n||(n=this.options.ns),r||(r=Vm),this.services.backendConnector.reload(e,n,s=>{i.resolve(),r(s)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&zP.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!["cimode","dev"].includes(e)){for(let n=0;n<this.languages.length;n++){const r=this.languages[n];if(!["cimode","dev"].includes(r)&&this.store.hasLanguageSomeTranslations(r)){this.resolvedLanguage=r;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,n){this.isLanguageChangingTo=e;const r=Ah();this.emit("languageChanging",e);const i=o=>{this.language=o,this.languages=this.services.languageUtils.toResolveHierarchy(o),this.resolvedLanguage=void 0,this.setResolvedLanguage(o)},s=(o,l)=>{l?this.isLanguageChangingTo===e&&(i(l),this.translator.changeLanguage(l),this.isLanguageChangingTo=void 0,this.emit("languageChanged",l),this.logger.log("languageChanged",l)):this.isLanguageChangingTo=void 0,r.resolve((...c)=>this.t(...c)),n&&n(o,(...c)=>this.t(...c))},a=o=>{var u,d;!e&&!o&&this.services.languageDetector&&(o=[]);const l=mt(o)?o:o&&o[0],c=this.store.hasLanguageSomeTranslations(l)?l:this.services.languageUtils.getBestMatchFromCodes(mt(o)?[o]:o);c&&(this.language||i(c),this.translator.language||this.translator.changeLanguage(c),(d=(u=this.services.languageDetector)==null?void 0:u.cacheUserLanguage)==null||d.call(u,c)),this.loadResources(c,f=>{s(f,c)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),r}getFixedT(e,n,r,i){const s=i==null?void 0:i.scopeNs,a=(o,l,...c)=>{let u;typeof l!="object"?u=this.options.overloadTranslationOptionHandler([o,l].concat(c)):u={...l},u.lng=u.lng||a.lng,u.lngs=u.lngs||a.lngs;const d=u.ns!==void 0&&u.ns!==null;u.ns=u.ns||a.ns,u.keyPrefix!==""&&(u.keyPrefix=u.keyPrefix||r||a.keyPrefix);const f={...this.options,...u};Array.isArray(s)&&!d&&(f.ns=s),typeof u.keyPrefix=="function"&&(u.keyPrefix=qu(u.keyPrefix,f));const h=this.options.keySeparator||".";let y;return u.keyPrefix&&Array.isArray(o)?y=o.map(v=>(typeof v=="function"&&(v=qu(v,f)),`${u.keyPrefix}${h}${v}`)):(typeof o=="function"&&(o=qu(o,f)),y=u.keyPrefix?`${u.keyPrefix}${h}${o}`:o),this.t(y,u)};return mt(e)?a.lng=e:a.lngs=e,a.ns=n,a.keyPrefix=r,a}t(...e){var n;return(n=this.translator)==null?void 0:n.translate(...e)}exists(...e){var n;return(n=this.translator)==null?void 0:n.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,n={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;
308if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const r=n.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,s=this.languages[this.languages.length-1];if(r.toLowerCase()==="cimode")return!0;const a=(o,l)=>{const c=this.services.backendConnector.state[`${o}|${l}`];return c===-1||c===0||c===2};if(n.precheck){const o=n.precheck(this,a);if(o!==void 0)return o}return!!(this.hasResourceBundle(r,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(r,e)&&(!i||a(s,e)))}loadNamespaces(e,n){const r=Ah();return this.options.ns?(mt(e)&&(e=[e]),e.forEach(i=>{this.options.ns.includes(i)||this.options.ns.push(i)}),this.loadResources(i=>{r.resolve(),n&&n(i)}),r):(n&&n(),Promise.resolve())}loadLanguages(e,n){const r=Ah();mt(e)&&(e=[e]);const i=this.options.preload||[],s=e.filter(a=>!i.includes(a)&&this.services.languageUtils.isSupportedCode(a));return s.length?(this.options.preload=i.concat(s),this.loadResources(a=>{r.resolve(),n&&n(a)}),r):(n&&n(),Promise.resolve())}dir(e){var i,s;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const a=new Intl.Locale(e);if(a&&a.getTextInfo){const o=a.getTextInfo();if(o&&o.direction)return o.direction}}catch{}const n=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],r=((s=this.services)==null?void 0:s.languageUtils)||new vk(Sy());return e.toLowerCase().indexOf("-latn")>1?"ltr":n.includes(r.getLanguagePartFromCode(e))||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},n){const r=new rf(e,n);return r.createInstance=rf.createInstance,r}cloneInstance(e={},n=Vm){const r=e.forkResourceStore;r&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},s=new rf(i);if((e.debug!==void 0||e.prefix!==void 0)&&(s.logger=s.logger.clone(e)),["store","services","language"].forEach(o=>{s[o]=this[o]}),s.services={...this.services},s.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},r){const o=Object.keys(this.store.data).reduce((l,c)=>(l[c]={...this.store.data[c]},l[c]=Object.keys(l[c]).reduce((u,d)=>(u[d]={...l[c][d]},u),l[c]),l),{});s.store=new gk(o,i),s.services.resourceStore=s.store}if(e.interpolation){const l={...Sy().interpolation,...this.options.interpolation,...e.interpolation},c={...i,interpolation:l};s.services.interpolator=new xk(c)}return s.translator=new T0(s.services,i),s.translator.on("*",(o,...l)=>{s.emit(o,...l)}),s.init(i,n),s.translator.options=i,s.translator.backendConnector.services.utils={hasLoadedNamespace:s.hasLoadedNamespace.bind(s)},s}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const Ur=rf.createInstance();Ur.createInstance;Ur.dir;Ur.init;Ur.loadResources;Ur.reloadResources;Ur.use;Ur.changeLanguage;Ur.getFixedT;Ur.t;Ur.exists;Ur.setDefaultNamespace;Ur.hasLoadedNamespace;Ur.loadNamespaces;Ur.loadLanguages;const s9=(t,e,n,r)=>{var s,a,o,l;const i=[n,{code:e,...r||{}}];if((a=(s=t==null?void 0:t.services)==null?void 0:s.logger)!=null&&a.forward)return t.services.logger.forward(i,"warn","react-i18next::",!0);bc(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(l=(o=t==null?void 0:t.services)==null?void 0:o.logger)!=null&&l.warn?t.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},kk={},Fg=(t,e,n,r)=>{bc(n)&&kk[n]||(bc(n)&&(kk[n]=new Date),s9(t,e,n,r))},UP=(t,e)=>()=>{if(t.isInitialized)e();else{const n=()=>{setTimeout(()=>{t.off("initialized",n)},0),e()};t.on("initialized",n)}},Iw=(t,e,n)=>{t.loadNamespaces(e,UP(t,n))},Ek=(t,e,n,r)=>{if(bc(n)&&(n=[n]),t.options.preload&&t.options.preload.indexOf(e)>-1)return Iw(t,n,r);
308n.forEach(i=>{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,UP(t,r))},a9=(t,e,n={})=>!e.languages||!e.languages.length?(Fg(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:n.lng,precheck:(r,i)=>{if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&r.services.backendConnector.backend&&r.isLanguageChangingTo&&!i(r.isLanguageChangingTo,t))return!1}}),bc=t=>typeof t=="string",o9=t=>typeof t=="object"&&t!==null,l9=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,c9={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"â¦","…":"â¦","/":"/","/":"/"},u9=t=>c9[t],d9=t=>t.replace(l9,u9);let Dw={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:d9,transDefaultProps:void 0};const h9=(t={})=>{Dw={...Dw,...t}},f9=()=>Dw;let BP;const p9=t=>{BP=t},m9=()=>BP,g9={type:"3rdParty",init(t){h9(t.options.react),p9(t)}},v9=E.createContext();class y9{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(n=>{this.usedNamespaces[n]||(this.usedNamespaces[n]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var qP={exports:{}},HP={};/** 309 * @license React 310 * use-sync-external-store-shim.production.js 311 * 312 * Copyright (c) Meta Platforms, Inc. and affiliates. 313 * 314 * This source code is licensed under the MIT license found in the 315 * LICENSE file in the root directory of this source tree. 316 */var wd=E;function w9(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var b9=typeof Object.is=="function"?Object.is:w9,x9=wd.useState,_9=wd.useEffect,S9=wd.useLayoutEffect,k9=wd.useDebugValue;function E9(t,e){var n=e(),r=x9({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return S9(function(){i.value=n,i.getSnapshot=e,ky(i)&&s({inst:i})},[t,n,e]),_9(function(){return ky(i)&&s({inst:i}),t(function(){ky(i)&&s({inst:i})})},[t]),k9(n),n}function ky(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!b9(t,n)}catch{return!0}}function N9(t,e){return e()}var A9=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?N9:E9;HP.useSyncExternalStore=wd.useSyncExternalStore!==void 0?wd.useSyncExternalStore:A9;qP.exports=HP;var C9=qP.exports;const P9=(t,e)=>{if(bc(e))return e;if(o9(e)&&bc(e.defaultValue))return e.defaultValue;if(typeof t=="function")return"";if(Array.isArray(t)){const n=t[t.length-1];return typeof n=="function"?"":n}return t},T9={t:P9,ready:!1},R9=()=>()=>{},Er=(t,e={})=>{var I,G,L;const{i18n:n}=e,{i18n:r,defaultNS:i}=E.useContext(v9)||{},s=n||r||m9();s&&!s.reportNamespaces&&(s.reportNamespaces=new y9),s||Fg(s,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.");const a=E.useMemo(()=>{var j;return{...f9(),...(j=s==null?void 0:s.options)==null?void 0:j.react,...e}},[s,e]),{useSuspense:o,keyPrefix:l}=a,c=i||((I=s==null?void 0:s.options)==null?void 0:I.defaultNS),u=bc(c)?[c]:c||["translation"],d=E.useMemo(()=>u,u);(L=(G=s==null?void 0:s.reportNamespaces)==null?void 0:G.addUsedNamespaces)==null||L.call(G,d);const f=E.useRef(0),h=E.useCallback(j=>{if(!s)return R9;const{bindI18n:W,bindI18nStore:z}=a,re=()=>{f.current+=1,j()};return W&&s.on(W,re),z&&s.store.on(z,re),()=>{W&&W.split(" ").forEach(ne=>s.off(ne,re)),z&&z.split(" ").forEach(ne=>s.store.off(ne,re))}},[s,a]),y=E.useRef(),v=E.useCallback(()=>{if(!s)return T9;const j=!!(s.isInitialized||s.initializedStoreOnce)&&d.every(U=>a9(U,s,a)),W=e.lng||s.language,z=f.current,re=y.current;if(re&&re.ready===j&&re.lng===W&&re.keyPrefix===l&&re.revision===z)return re;const oe={t:s.getFixedT(W,a.nsMode==="fallback"?d:d[0],l,{scopeNs:d}),ready:j,lng:W,keyPrefix:l,revision:z};return y.current=oe,oe},[s,d,l,a,e.lng]),[_,w]=E.useState(0),{t:x,ready:k}=C9.useSyncExternalStore(h,v,v);E.useEffect(()=>{if(s&&!k&&!o){const j=()=>w(W=>W+1);e.lng?Ek(s,e.lng,d,j):Iw(s,d,j)}},[s,e.lng,d,k,o,_]);const N=s||{},R=E.useRef(null),H=E.useRef(),F=j=>{const W=Object.getOwnPropertyDescriptors(j);W.__original&&delete W.__original;const z=Object.create(Object.getPrototypeOf(j),W);if(!Object.prototype.hasOwnProperty.call(z,"__original"))try{Object.defineProperty(z,"__original",{value:j,writable:!1,enumerable:!1,
316configurable:!1})}catch{}return z},M=E.useMemo(()=>{const j=N,W=j==null?void 0:j.language;let z=j;j&&(R.current&&R.current.__original===j?H.current!==W?(z=F(j),R.current=z,H.current=W):z=R.current:(z=F(j),R.current=z,H.current=W));const re=!k&&!o?(...oe)=>(Fg(s,"USE_T_BEFORE_READY","useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."),x(...oe)):x,ne=[re,z,k];return ne.t=re,ne.i18n=z,ne.ready=k,ne},[x,N,k,N.resolvedLanguage,N.language,N.languages]);if(s&&o&&!k){let j=!1;try{j=!1}catch{}throw j&&Fg(s,"SUSPENDED_WHILE_LOADING","useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"),new Promise(W=>{const z=()=>W();e.lng?Ek(s,e.lng,d,z):Iw(s,d,z)})}return M},Mw="/assets/logo_aeoanalyzer-C-tmxotW.png",L9=Ld("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),En=E.forwardRef(({className:t,variant:e,size:n,asChild:r=!1,...i},s)=>{const a=r?yc:"button";return m.jsx(a,{className:St(L9({variant:e,size:n,className:t})),ref:s,...i})});En.displayName="Button";function j9(t,e){const n=E.createContext(e),r=s=>{const{children:a,...o}=s,l=E.useMemo(()=>o,Object.values(o));return m.jsx(n.Provider,{value:l,children:a})};r.displayName=t+"Provider";function i(s){const a=E.useContext(n);if(a)return a;if(e!==void 0)return e;throw new Error(`\`${s}\` must be used within \`${t}\``)}return[r,i]}function O9(t,e=[]){let n=[];function r(s,a){const o=E.createContext(a),l=n.length;n=[...n,a];const c=d=>{var w;const{scope:f,children:h,...y}=d,v=((w=f==null?void 0:f[t])==null?void 0:w[l])||o,_=E.useMemo(()=>y,Object.values(y));return m.jsx(v.Provider,{value:_,children:h})};c.displayName=s+"Provider";function u(d,f){var v;const h=((v=f==null?void 0:f[t])==null?void 0:v[l])||o,y=E.useContext(h);if(y)return y;if(a!==void 0)return a;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[c,u]}const i=()=>{const s=n.map(a=>E.createContext(a));return function(o){const l=(o==null?void 0:o[t])||s;return E.useMemo(()=>({[`__scope${t}`]:{...o,[t]:l}}),[o,l])}};return i.scopeName=t,[r,I9(i,...e)]}function I9(...t){const e=t[0];if(t.length===1)return e;const n=()=>{const r=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:c})=>{const d=l(s)[`__scope${c}`];return{...o,...d}},{});return E.useMemo(()=>({[`__scope${e.scopeName}`]:a}),[a])}};return n.scopeName=e.scopeName,n}var Ey="focusScope.autoFocusOnMount",Ny="focusScope.autoFocusOnUnmount",Nk={bubbles:!1,cancelable:!0},D9="FocusScope",Vx=E.forwardRef((t,e)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=t,[o,l]=E.useState(null),c=or(i),u=or(s),d=E.useRef(null),f=an(e,v=>l(v)),h=E.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;E.useEffect(()=>{if(r){let v=function(k){if(h.paused||!o)return;const N=k.target;o.contains(N)?d.current=N:Io(d.current,{select:!0})},_=function(k){if(h.paused||!o)return;const N=k.relatedTarget;N!==null&&(o.contains(N)||Io(d.current,{select:!0}))},w=function(k){if(document.activeElement===document.body)for(const R of k)R.removedNodes.length>0&&Io(o)};document.addEventListener("focusin",v),document.addEventListener("focusout",_);const x=new MutationObserver(w);return o&&x.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",_),x.disconnect()}}},[r,o,h.paused]),E.useEffect(()=>{if(o){Ck.add(h);const v=document.activeElement;if(!o.contains(v)){const w=new CustomEvent(Ey,Nk);o.addEventListener(Ey,c),o.dispatchEvent(w),w.defaultPrevented||(M9(B9(WP(o)),{select:!0}
vendor: 4,326 bytes, line 316
316),document.activeElement===v&&Io(o))}return()=>{o.removeEventListener(Ey,c),setTimeout(()=>{const w=new CustomEvent(Ny,Nk);o.addEventListener(Ny,u),o.dispatchEvent(w),w.defaultPrevented||Io(v??document.body,{select:!0}),o.removeEventListener(Ny,u),Ck.remove(h)},0)}}},[o,c,u,h]);const y=E.useCallback(v=>{if(!n&&!r||h.paused)return;const _=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,w=document.activeElement;if(_&&w){const x=v.currentTarget,[k,N]=F9(x);k&&N?!v.shiftKey&&w===N?(v.preventDefault(),n&&Io(k,{select:!0})):v.shiftKey&&w===k&&(v.preventDefault(),n&&Io(N,{select:!0})):w===x&&v.preventDefault()}},[n,r,h.paused]);return m.jsx(xt.div,{tabIndex:-1,...a,ref:f,onKeyDown:y})});Vx.displayName=D9;function M9(t,{select:e=!1}={}){const n=document.activeElement;for(const r of t)if(Io(r,{select:e}),document.activeElement!==n)return}function F9(t){const e=WP(t),n=Ak(e,t),r=Ak(e.reverse(),t);return[n,r]}function WP(t){const e=[],n=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)e.push(n.currentNode);return e}function Ak(t,e){for(const n of t)if(!z9(n,{upTo:e}))return n}function z9(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function $9(t){return t instanceof HTMLInputElement&&"select"in t}function Io(t,{select:e=!1}={}){if(t&&t.focus){const n=document.activeElement;t.focus({preventScroll:!0}),t!==n&&$9(t)&&e&&t.select()}}var Ck=U9();function U9(){let t=[];return{add(e){const n=t[0];e!==n&&(n==null||n.pause()),t=Pk(t,e),t.unshift(e)},remove(e){var n;t=Pk(t,e),(n=t[0])==null||n.resume()}}}function Pk(t,e){const n=[...t],r=n.indexOf(e);return r!==-1&&n.splice(r,1),n}function B9(t){return t.filter(e=>e.tagName!=="A")}function q9(t,e){return E.useReducer((n,r)=>e[n][r]??n,t)}var zv=t=>{const{present:e,children:n}=t,r=H9(e),i=typeof n=="function"?n({present:r.isPresent}):E.Children.only(n),s=an(r.ref,W9(i));return typeof n=="function"||r.isPresent?E.cloneElement(i,{ref:s}):null};zv.displayName="Presence";function H9(t){const[e,n]=E.useState(),r=E.useRef({}),i=E.useRef(t),s=E.useRef("none"),a=t?"mounted":"unmounted",[o,l]=q9(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return E.useEffect(()=>{const c=Gm(r.current);s.current=o==="mounted"?c:"none"},[o]),Xr(()=>{const c=r.current,u=i.current;if(u!==t){const f=s.current,h=Gm(c);t?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&f!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,l]),Xr(()=>{if(e){let c;const u=e.ownerDocument.defaultView??window,d=h=>{const v=Gm(r.current).includes(h.animationName);if(h.target===e&&v&&(l("ANIMATION_END"),!i.current)){const _=e.style.animationFillMode;e.style.animationFillMode="forwards",c=u.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=_)})}},f=h=>{h.target===e&&(s.current=Gm(r.current))};return e.addEventListener("animationstart",f),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{u.clearTimeout(c),e.removeEventListener("animationstart",f),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else l("ANIMATION_END")},[e,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:E.useCallback(c=>{c&&(r.current=getComputedStyle(c)),n(c)},[])}}function Gm(t){return(t==null?void 0:t.animationName)||"none"}function W9(t){var r,i;let e=(r=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:r.get,n=e&&"isReactWarning"in e&&e.isReactWarning;return n?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,n=e&&"isReactWarning"in e&&e.isReactWarning,n?t.props.ref:t.props.ref||t.ref)}var Ay=0;function V9(){E.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Tk()),document.body.insertAdjacentElement("beforeend",t[1]??Tk()),Ay++,()=>{Ay===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e
vendor: 5,797 bytes, lines 316-331
316=>e.remove()),Ay--}},[])}function Tk(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Fr=function(){return Fr=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(e[s]=n[s])}return e},Fr.apply(this,arguments)};function Gx(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}function VP(t,e,n){if(n||arguments.length===2)for(var r=0,i=e.length,s;r<i;r++)(s||!(r in e))&&(s||(s=Array.prototype.slice.call(e,0,r)),s[r]=e[r]);return t.concat(s||Array.prototype.slice.call(e))}var sf="right-scroll-bar-position",af="width-before-scroll-bar",G9="with-scroll-bars-hidden",K9="--removed-body-scroll-bar-size";function Cy(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function Z9(t,e){var n=E.useState(function(){return{value:t,callback:e,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=e,n.facade}var Y9=typeof window<"u"?E.useLayoutEffect:E.useEffect,Rk=new WeakMap;function GP(t,e){var n=Z9(null,function(r){return t.forEach(function(i){return Cy(i,r)})});return Y9(function(){var r=Rk.get(n);if(r){var i=new Set(r),s=new Set(t),a=n.current;i.forEach(function(o){s.has(o)||Cy(o,null)}),s.forEach(function(o){i.has(o)||Cy(o,a)})}Rk.set(n,t)},[t]),n}function J9(t){return t}function X9(t,e){e===void 0&&(e=J9);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:t},useMedium:function(s){var a=e(s,r);return n.push(a),function(){n=n.filter(function(o){return o!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(o){return s(o)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var o=n;n=[],o.forEach(s),a=n}var l=function(){var u=a;a=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),n}}}};return i}function KP(t){t===void 0&&(t={});var e=X9(null);return e.options=Fr({async:!0,ssr:!1},t),e}var ZP=function(t){var e=t.sideCar,n=Gx(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=e.read();if(!r)throw new Error("Sidecar medium not found");return E.createElement(r,Fr({},n))};ZP.isSideCarExport=!0;function YP(t,e){return t.useMedium(e),ZP}var JP=KP(),Py=function(){},$v=E.forwardRef(function(t,e){var n=E.useRef(null),r=E.useState({onScrollCapture:Py,onWheelCapture:Py,onTouchMoveCapture:Py}),i=r[0],s=r[1],a=t.forwardProps,o=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,d=t.shards,f=t.sideCar,h=t.noIsolation,y=t.inert,v=t.allowPinchZoom,_=t.as,w=_===void 0?"div":_,x=t.gapMode,k=Gx(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=f,R=GP([n,e]),H=Fr(Fr({},k),i);return E.createElement(E.Fragment,null,u&&E.createElement(N,{sideCar:JP,removeScrollBar:c,shards:d,noIsolation:h,inert:y,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:x}),a?E.cloneElement(E.Children.only(o),Fr(Fr({},H),{ref:R})):E.createElement(w,Fr({},H,{className:l,ref:R}),o))});$v.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};$v.classNames={fullWidth:af,zeroRight:sf};var Q9=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function eU(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=Q9();return e&&t.setAttribute("nonce",e),t}function tU(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function nU(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var rU=function(){var t=0,e=null;return{add:function(n){t==0&&(e=eU())&&(tU(e,n),nU(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},iU=function(){var t=rU();return function(e,n){E.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&n])}},Kx=function(){var t=iU(),e=function(n){var r=n.styles,i=n.dynamic;return t(r,i),null};return e},sU={left:0,top:0,right:0,gap:0},Ty=function(t){return parseInt(t||"",10)||0},aU=function(t){var e=window.getComputedStyle(document.body),n=e[t==="padding"?"paddingLeft":"marginLeft"],r=e[t==="padding"?"paddingTop":"marginTop"],i=e[t==="padding"?"paddingRight":"marginRight"];return[Ty(n),Ty(r),Ty(i)]},oU=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return sU;var e=aU(t),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,r-n+e[2]-e[0])}},lU=Kx(),Hu="data-scroll-locked",cU=function(t,e,n,r){var i=t.left,s=t.top,a=t.right,o=t.gap;return n===void 0&&(n="margin"),` 317 .`.concat(G9,` { 318 overflow: hidden `).concat(r,`; 319 padding-right: `).concat(o,"px ").concat(r,`; 320 } 321 body[`).concat(Hu,`] { 322 overflow: hidden `).concat(r,`; 323 overscroll-behavior: contain; 324 `).concat([e&&"position: relative ".concat(r,";"),n==="margin"&&` 325 padding-left: `.concat(i,`px; 326 padding-top: `).concat(s,`px; 327 padding-right: `).concat(a,`px; 328 margin-left:0; 329 margin-top:0; 330 margin-right: `).concat(o,"px ").concat(r,`; 331 `),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";
331")].filter(Boolean).join(""),` 332 } 333 334 .`).concat(sf,` { 335 right: `).concat(o,"px ").concat(r,`; 336 } 337 338 .`).concat(af,` { 339 margin-right: `).concat(o,"px ").concat(r,`; 340 } 341 342 .`).concat(sf," .").concat(sf,` { 343 right: 0 `).concat(r,`; 344 } 345 346 .`).concat(af," .").concat(af,` { 347 margin-right: 0 `).concat(r,`; 348 } 349 350 body[`).concat(Hu,`] { 351 `).concat(K9,": ").concat(o,`px; 352 } 353`)},Lk=function(){var t=parseInt(document.body.getAttribute(Hu)||"0",10);return isFinite(t)?t:0},uU=function(){E.useEffect(function(){return document.body.setAttribute(Hu,(Lk()+1).toString()),function(){var t=Lk()-1;t<=0?document.body.removeAttribute(Hu):document.body.setAttribute(Hu,t.toString())}},[])},XP=function(t){var e=t.noRelative,n=t.noImportant,r=t.gapMode,i=r===void 0?"margin":r;uU();var s=E.useMemo(function(){return oU(i)},[i]);return E.createElement(lU,{styles:cU(s,!e,i,n?"":"!important")})},Fw=!1;if(typeof window<"u")try{var Km=Object.defineProperty({},"passive",{get:function(){return Fw=!0,!0}});window.addEventListener("test",Km,Km),window.removeEventListener("test",Km,Km)}catch{Fw=!1}var Qc=Fw?{passive:!1}:!1,dU=function(t){return t.tagName==="TEXTAREA"},QP=function(t,e){if(!(t instanceof Element))return!1;var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!dU(t)&&n[e]==="visible")},hU=function(t){return QP(t,"overflowY")},fU=function(t){return QP(t,"overflowX")},jk=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=eT(t,r);if(i){var s=tT(t,r),a=s[1],o=s[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},pU=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},mU=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},eT=function(t,e){return t==="v"?hU(e):fU(e)},tT=function(t,e){return t==="v"?pU(e):mU(e)},gU=function(t,e){return t==="h"&&e==="rtl"?-1:1},vU=function(t,e,n,r,i){var s=gU(t,window.getComputedStyle(e).direction),a=s*r,o=n.target,l=e.contains(o),c=!1,u=a>0,d=0,f=0;do{var h=tT(t,o),y=h[0],v=h[1],_=h[2],w=v-_-s*y;(y||w)&&eT(t,o)&&(d+=w,f+=y),o instanceof ShadowRoot?o=o.host:o=o.parentNode}while(!l&&o!==document.body||l&&(e.contains(o)||e===o));return(u&&(Math.abs(d)<1||!i)||!u&&(Math.abs(f)<1||!i))&&(c=!0),c},Zm=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Ok=function(t){return[t.deltaX,t.deltaY]},Ik=function(t){return t&&"current"in t?t.current:t},yU=function(t,e){return t[0]===e[0]&&t[1]===e[1]},wU=function(t){return` 354 .block-interactivity-`.concat(t,` {pointer-events: none;} 355 .allow-interactivity-`).concat(t,` {pointer-events: all;} 356`)},bU=0,eu=[];function xU(t){var e=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(bU++)[0],s=E.useState(Kx)[0],a=E.useRef(t);E.useEffect(function(){a.current=t},[t]),E.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var v=VP([t.lockRef.current],(t.shards||[]).map(Ik),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var o=E.useCallback(function(v,_){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var w=Zm(v),x=n.current,k="deltaX"in v?v.deltaX:x[0]-w[0],N="deltaY"in v?v.deltaY:x[1]-w[1],R,H=v.target,F=Math.abs(k)>Math.abs(N)?"h":"v";if("touches"in v&&F==="h"&&H.type==="range")return!1;var M=jk(F,H);if(!M)return!0;if(M?R=F:(R=F==="v"?"h":"v",M=jk(F,H)),!M)return!1;if(!r.current&&"changedTouches"in v&&(k||N)&&(r.current=R),!R)return!0;var I=r.current||R;return vU(I,_,v,I==="h"?k:N,!0)},[]),l=E.useCallback(function(v){var _=v;if(!(!eu.length||eu[eu.length-1]!==s)){var w="deltaY"in _?Ok(_):Zm(_),x=e.current.filter(function(R){return R.name===_.type&&(R.target===_.target||_.target===R.shadowParent)&&yU(R.delta,w)})[0];if(x&&x.should){_.cancelable&&_.preventDefault();return}
vendor: 6,270 bytes, line 356
356if(!x){var k=(a.current.shards||[]).map(Ik).filter(Boolean).filter(function(R){return R.contains(_.target)}),N=k.length>0?o(_,k[0]):!a.current.noIsolation;N&&_.cancelable&&_.preventDefault()}}},[]),c=E.useCallback(function(v,_,w,x){var k={name:v,delta:_,target:w,should:x,shadowParent:_U(w)};e.current.push(k),setTimeout(function(){e.current=e.current.filter(function(N){return N!==k})},1)},[]),u=E.useCallback(function(v){n.current=Zm(v),r.current=void 0},[]),d=E.useCallback(function(v){c(v.type,Ok(v),v.target,o(v,t.lockRef.current))},[]),f=E.useCallback(function(v){c(v.type,Zm(v),v.target,o(v,t.lockRef.current))},[]);E.useEffect(function(){return eu.push(s),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,Qc),document.addEventListener("touchmove",l,Qc),document.addEventListener("touchstart",u,Qc),function(){eu=eu.filter(function(v){return v!==s}),document.removeEventListener("wheel",l,Qc),document.removeEventListener("touchmove",l,Qc),document.removeEventListener("touchstart",u,Qc)}},[]);var h=t.removeScrollBar,y=t.inert;return E.createElement(E.Fragment,null,y?E.createElement(s,{styles:wU(i)}):null,h?E.createElement(XP,{gapMode:t.gapMode}):null)}function _U(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const SU=YP(JP,xU);var nT=E.forwardRef(function(t,e){return E.createElement($v,Fr({},t,{ref:e,sideCar:SU}))});nT.classNames=$v.classNames;var kU=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},tu=new WeakMap,Ym=new WeakMap,Jm={},Ry=0,rT=function(t){return t&&(t.host||rT(t.parentNode))},EU=function(t,e){return e.map(function(n){if(t.contains(n))return n;var r=rT(n);return r&&t.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",t,". Doing nothing"),null)}).filter(function(n){return!!n})},NU=function(t,e,n,r){var i=EU(e,Array.isArray(t)?t:[t]);Jm[n]||(Jm[n]=new WeakMap);var s=Jm[n],a=[],o=new Set,l=new Set(i),c=function(d){!d||o.has(d)||(o.add(d),c(d.parentNode))};i.forEach(c);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(f){if(o.has(f))u(f);else try{var h=f.getAttribute(r),y=h!==null&&h!=="false",v=(tu.get(f)||0)+1,_=(s.get(f)||0)+1;tu.set(f,v),s.set(f,_),a.push(f),v===1&&y&&Ym.set(f,!0),_===1&&f.setAttribute(n,"true"),y||f.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",f,w)}})};return u(e),o.clear(),Ry++,function(){a.forEach(function(d){var f=tu.get(d)-1,h=s.get(d)-1;tu.set(d,f),s.set(d,h),f||(Ym.has(d)||d.removeAttribute(r),Ym.delete(d)),h||d.removeAttribute(n)}),Ry--,Ry||(tu=new WeakMap,tu=new WeakMap,Ym=new WeakMap,Jm={})}},iT=function(t,e,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(t)?t:[t]),i=kU(t);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live]"))),NU(r,i,n,"aria-hidden")):function(){return null}},Zx="Dialog",[sT,bne]=O9(Zx),[AU,Ls]=sT(Zx),aT=t=>{const{__scopeDialog:e,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:a=!0}=t,o=E.useRef(null),l=E.useRef(null),[c=!1,u]=Nl({prop:r,defaultProp:i,onChange:s});return m.jsx(AU,{scope:e,triggerRef:o,contentRef:l,contentId:eo(),titleId:eo(),descriptionId:eo(),open:c,onOpenChange:u,onOpenToggle:E.useCallback(()=>u(d=>!d),[u]),modal:a,children:n})};aT.displayName=Zx;var oT="DialogTrigger",lT=E.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Ls(oT,n),s=an(e,i.triggerRef);return m.jsx(xt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":Xx(i.open),...r,ref:s,onClick:qe(t.onClick,i.onOpenToggle)})});lT.displayName=oT;var Yx="DialogPortal",[CU,cT]=sT(Yx,{forceMount:void 0}),uT=t=>{const{__scopeDialog:e,forceMount:n,children:r,container:i}=t,s=Ls(Yx,e);return m.jsx(CU,{scope:e,forceMount:n,children:E.Children.map(r,a=>m.jsx(zv,{present:n||s.open,children:m.jsx(cP,{asChild:!0,container:i,children:a})}))})};uT.displayName=Yx;var R0="DialogOverlay",dT=E.forwardRef((t,e)=>{const n=cT(R0,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=Ls(R0,t.__scopeDialog);return s.modal?m.jsx(zv,{present:r||s.open,children:m.jsx(PU,{...i,ref:e})}):null});dT.displayName=R0;var PU=E.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Ls(R0,n);return m.jsx(nT,{as:yc,allowPinchZoom:!0,shards:[i.contentRef],children:m.jsx(xt.div,{"data-state":Xx(i.open),...r,ref:e,style:{pointerEvents:"auto",...r.style}})})}),xc="DialogContent",hT=E.forwardRef((t,e)=>{const n=cT(xc,t.__scopeDialog),{forceMount:r=n.forceMount,...i}=t,s=Ls(xc,t.__scopeDialog);return m.jsx(zv,{present:r||s.open,children:s.modal?m.jsx(TU,{...i,ref:e}):m.jsx(RU,{...i,ref:e})})});hT.displayName=xc;var TU=E.forwardRef((t,e)=>{const n=Ls(xc,t.__scopeDialog),r=E.useRef(null),i=an(e,n.contentRef,r);return E.useEffect(()=>{const s=r.current;if(s)return iT(s)},[]),m.jsx(fT,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qe(t.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:qe(t.onPointerDownOutside,s=>{const a=s.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&s.preventDefault()}),onFocusOutside:qe(t.onFocusOutside,s=>s.preventDefault())})}),RU=E.forwardRef((t,e)=>{const n=Ls(xc,t.__scopeDialog),r=E.useRef(!1),i=E.useRef(!1);return m.jsx(fT,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,o;(a=t.onCloseAutoFocus)==null||a.call(t,s),s.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,c;(l=t.onInteractOutside)==null||l.call(t,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),fT=E.forwardRef((t,e)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=t,o=Ls(xc,n),l=E.useRef(null),c=an(e,l);return V9(),m.jsxs(m.Fragment,{children:[m.jsx(Vx,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:m.jsx(jx,{role:"dialog",id:o.c
356ontentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":Xx(o.open),...a,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(LU,{titleId:o.titleId}),m.jsx(OU,{contentRef:l,descriptionId:o.descriptionId})]})]})}),Jx="DialogTitle",pT=E.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Ls(Jx,n);return m.jsx(xt.h2,{id:i.titleId,...r,ref:e})});pT.displayName=Jx;var mT="DialogDescription",gT=E.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Ls(mT,n);return m.jsx(xt.p,{id:i.descriptionId,...r,ref:e})});gT.displayName=mT;var vT="DialogClose",yT=E.forwardRef((t,e)=>{const{__scopeDialog:n,...r}=t,i=Ls(vT,n);return m.jsx(xt.button,{type:"button",...r,ref:e,onClick:qe(t.onClick,()=>i.onOpenChange(!1))})});yT.displayName=vT;function Xx(t){return t?"open":"closed"}var wT="DialogTitleWarning",[xne,bT]=j9(wT,{contentName:xc,titleName:Jx,docsSlug:"dialog"}),LU=({titleId:t})=>{const e=bT(wT),n=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. 357 358If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. 359 360For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return E.useEffect(()=>{t&&(document.getElementById(t)||console.error(n))},[n,t]),null},jU="DialogDescriptionWarning",OU=({contentRef:t,descriptionId:e})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${bT(jU).contentName}}.`;return E.useEffect(()=>{var s;const i=(s=t.current)==null?void 0:s.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(r))},[r,t,e]),null},xT=aT,IU=lT,_T=uT,Uv=dT,Bv=hT,qv=pT,Hv=gT,Qx=yT;const DU=xT,MU=IU,FU=Qx,zU=_T,ST=E.forwardRef(({className:t,...e},n)=>m.jsx(Uv,{className:St("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e,ref:n}));ST.displayName=Uv.displayName;const $U=Ld("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),kT=E.forwardRef(({side:t="right",className:e,children:n,...r},i)=>m.jsxs(zU,{children:[m.jsx(ST,{}),m.jsxs(Bv,{ref:i,className:St($U({side:t}),e),...r,children:[n,m.jsxs(Qx,{className:"absolute right-4 top-4 roun
360ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[m.jsx(jd,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));kT.displayName=Bv.displayName;const UU=E.forwardRef(({className:t,...e},n)=>m.jsx(qv,{ref:n,className:St("text-lg font-semibold text-foreground",t),...e}));UU.displayName=qv.displayName;const BU=E.forwardRef(({className:t,...e},n)=>m.jsx(Hv,{ref:n,className:St("text-sm text-muted-foreground",t),...e}));BU.displayName=Hv.displayName;function qU(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?s(u.value):i(u.value).then(o,l)}c((r=r.apply(t,e||[])).next())})}const HU=t=>t?(...e)=>t(...e):(...e)=>fetch(...e);class e5 extends Error{constructor(e,n="FunctionsError",r){super(e),this.name=n,this.context=r}toJSON(){return{name:this.name,message:this.message,context:this.context}}}class WU extends e5{constructor(e){super("Failed to send a request to the Edge Function","FunctionsFetchError",e)}}class Dk extends e5{constructor(e){super("Relay Error invoking the Edge Function","FunctionsRelayError",e)}}class Mk extends e5{constructor(e){super("Edge Function returned a non-2xx status code","FunctionsHttpError",e)}}var zw;(function(t){t.Any="any",t.ApNortheast1="ap-northeast-1",t.ApNortheast2="ap-northeast-2",t.ApSouth1="ap-south-1",t.ApSoutheast1="ap-southeast-1",t.ApSoutheast2="ap-southeast-2",t.CaCentral1="ca-central-1",t.EuCentral1="eu-central-1",t.EuWest1="eu-west-1",t.EuWest2="eu-west-2",t.EuWest3="eu-west-3",t.SaEast1="sa-east-1",t.UsEast1="us-east-1",t.UsWest1="us-west-1",t.UsWest2="us-west-2"})(zw||(zw={}));class VU{constructor(e,{headers:n={},customFetch:r,region:i=zw.Any}={}){this.url=e,this.headers=n,this.region=i,this.fetch=HU(r)}setAuth(e){this.headers.Authorization=`Bearer ${e}`}invoke(e){return qU(this,arguments,void 0,function*(n,r={}){var i;let s,a;try{const{headers:o,method:l,body:c,signal:u,timeout:d}=r;let f={},{region:h}=r;h||(h=this.region);const y=new URL(`${this.url}/${n}`);h&&h!=="any"&&(f["x-region"]=h,y.searchParams.set("forceFunctionRegion",h));let v;const _=!!o&&Object.keys(o).some(H=>H.toLowerCase()==="content-type");c&&!_?typeof Blob<"u"&&c instanceof Blob||c instanceof ArrayBuffer?(f["Content-Type"]="application/octet-stream",v=c):typeof c=="string"?(f["Content-Type"]="text/plain",v=c):typeof FormData<"u"&&c instanceof FormData?v=c:(f["Content-Type"]="application/json",v=JSON.stringify(c)):c&&typeof c!="string"&&!(typeof Blob<"u"&&c instanceof Blob)&&!(c instanceof ArrayBuffer)&&!(typeof FormData<"u"&&c instanceof FormData)?v=JSON.stringify(c):v=c;let w=u;d&&(a=new AbortController,s=setTimeout(()=>a.abort(),d),u?(w=a.signal,u.addEventListener("abort",()=>a.abort())):w=a.signal);const x=yield this.fetch(y.toString(),{method:l||"POST",headers:Object.assign(Object.assign(Object.assign({},f),this.headers),o),body:v,signal:w}).catch(H=>{throw new WU(H)}),k=x.headers.get("x-relay-error");if(k&&k==="true")throw new Dk(x);if(!x.ok)throw new Mk(x);let N=((i=x.headers.get("Content-Type"))!==null&&i!==void 0?i:"text/plain").split(";")[0].trim(),R;return N==="application/json"?R=yield x.json():N==="application/octet-stream"||N==="application/pdf"?R=yield x.blob():N==="text/event-stream"?R=x:N==="multipart/form-data"?R=yield x.formData():R=yield x.text(),{data:R,error:null,response:x}}catch(o){return{data:null,error:o,response:o instanceof Mk||o instanceof Dk?o.context:void 0}}finally{s&&clearTimeout(s)}})}}const ET=3,Fk=t=>Math.min(1e3*2**t,3e4),GU=[520,503],NT=["GET","HEAD","OPTIONS"];var zk=class extends Error{constructor(t){super(t.message),this.name="PostgrestError",this.details=t.details,this.hint=t.hint,this.co
360de=t.code}toJSON(){return{name:this.name,message:this.message,details:this.details,hint:this.hint,code:this.code}}};function $k(t,e){return new Promise(n=>{if(e!=null&&e.aborted){n();return}const r=setTimeout(()=>{e==null||e.removeEventListener("abort",i),n()},t);function i(){clearTimeout(r),n()}e==null||e.addEventListener("abort",i)})}function KU(t,e,n,r){return!(!r||n>=ET||!NT.includes(t)||!GU.includes(e))}var ZU=class{constructor(t){var e,n,r,i,s;this.shouldThrowOnError=!1,this.retryEnabled=!0,this.method=t.method,this.url=t.url,this.headers=new Headers(t.headers),this.schema=t.schema,this.body=t.body,this.shouldThrowOnError=(e=t.shouldThrowOnError)!==null&&e!==void 0?e:!1,this.signal=t.signal,this.isMaybeSingle=(n=t.isMaybeSingle)!==null&&n!==void 0?n:!1,this.shouldStripNulls=(r=t.shouldStripNulls)!==null&&r!==void 0?r:!1,this.urlLengthLimit=(i=t.urlLengthLimit)!==null&&i!==void 0?i:8e3,this.retryEnabled=(s=t.retry)!==null&&s!==void 0?s:!0,t.fetch?this.fetch=t.fetch:this.fetch=fetch}throwOnError(){return this.shouldThrowOnError=!0,this}stripNulls(){if(this.headers.get("Accept")==="text/csv")throw new Error("stripNulls() cannot be used with csv()");return this.shouldStripNulls=!0,this}setHeader(t,e){return this.headers=new Headers(this.headers),this.headers.set(t,e),this}retry(t){return this.retryEnabled=t,this}then(t,e){var n=this;if(this.schema===void 0||(["GET","HEAD"].includes(this.method)?this.headers.set("Accept-Profile",this.schema):this.headers.set("Content-Profile",this.schema)),this.method!=="GET"&&this.method!=="HEAD"&&this.headers.set("Content-Type","application/json"),this.shouldStripNulls){const a=this.headers.get("Accept");a==="application/vnd.pgrst.object+json"?this.headers.set("Accept","application/vnd.pgrst.object+json;nulls=stripped"):(!a||a==="application/json")&&this.headers.set("Accept","application/vnd.pgrst.array+json;nulls=stripped")}const r=this.fetch;let s=(async()=>{let a=0;for(;;){const c={};n.headers.forEach((d,f)=>{c[f]=d}),a>0&&(c["X-Retry-Count"]=String(a));let u;try{u=await r(n.url.toString(),{method:n.method,headers:c,body:JSON.stringify(n.body,(d,f)=>typeof f=="bigint"?f.toString():f),signal:n.signal})}catch(d){if((d==null?void 0:d.name)==="AbortError"||(d==null?void 0:d.code)==="ABORT_ERR"||!NT.includes(n.method))throw d;if(n.retryEnabled&&a<ET){const f=Fk(a);a++,await $k(f,n.signal);continue}throw d}if(KU(n.method,u.status,a,n.retryEnabled)){var o,l;const d=(o=(l=u.headers)===null||l===void 0?void 0:l.get("Retry-After"))!==null&&o!==void 0?o:null,f=d!==null?Math.max(0,parseInt(d,10)||0)*1e3:Fk(a);await u.text(),a++,await $k(f,n.signal);continue}return await n.processResponse(u)}})();return this.shouldThrowOnError||(s=s.catch(a=>{var o;let l="",c="",u="";const d=a==null?void 0:a.cause;if(d){var f,h,y,v;const x=(f=d==null?void 0:d.message)!==null&&f!==void 0?f:"",k=(h=d==null?void 0:d.code)!==null&&h!==void 0?h:"";l=`${(y=a==null?void 0:a.name)!==null&&y!==void 0?y:"FetchError"}: ${a==null?void 0:a.message}`,l+=` 361 362Caused by: ${(v=d==null?void 0:d.name)!==null&&v!==void 0?v:"Error"}: ${x}`,k&&(l+=` (${k})`),d!=null&&d.stack&&(l+=` 363${d.stack}`)}else{var _;l=(_=a==null?void 0:a.stack)!==null&&_!==void 0?_:""}const w=this.url.toString().length;return(a==null?void 0:a.name)==="AbortError"||(a==null?void 0:a.code)==="ABORT_ERR"?(u="",c="Request was aborted (timeout or manual cancellation)",w>this.urlLengthLimit&&(c+=`. Note: Your request URL is ${w} characters, which may exceed server limits. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [many IDs])), consider using an RPC function to pass values server-side.`)):((d==null?void 0:d.name)==="HeadersOverflowError"||(d==null?void 0:d.code)==="UND_ERR_HEADERS_OVERFLOW")&&(u="",c="HTTP headers exceeded server limits (typically 16KB)",w>this.urlLengthLimit&&(c+=`. Your request URL is ${w} characters. If selecting many fields, consider using views. If filtering with large arrays (e.g., .in('id', [200+ IDs])), consider using an RPC function instead.`)),{success:!1,error:{message:`${(o=a==null?void 0:a.name)!==null&&o!==void 0?o:"FetchError"}: ${a==null?void 0:a.message}`,details:l,hint:c,code:u},data:null,count:null,status:0,statusText:""}}
363)),s.then(t,e)}async processResponse(t){var e=this;let n=null,r=null,i=null,s=t.status,a=t.statusText;if(t.ok){var o,l;if(e.method!=="HEAD"){var c;const f=await t.text();if(f!=="")if(e.headers.get("Accept")==="text/csv")r=f;else if(e.headers.get("Accept")&&(!((c=e.headers.get("Accept"))===null||c===void 0)&&c.includes("application/vnd.pgrst.plan+text")))r=f;else try{r=JSON.parse(f)}catch{if(n={message:f},r=null,e.shouldThrowOnError)throw new zk({message:f,details:"",hint:"",code:""})}}const u=(o=e.headers.get("Prefer"))===null||o===void 0?void 0:o.match(/count=(exact|planned|estimated)/),d=(l=t.headers.get("content-range"))===null||l===void 0?void 0:l.split("/");u&&d&&d.length>1&&(i=parseInt(d[1])),e.isMaybeSingle&&Array.isArray(r)&&(r.length>1?(n={code:"PGRST116",details:`Results contain ${r.length} rows, application/vnd.pgrst.object+json requires 1 row`,hint:null,message:"JSON object requested, multiple (or no) rows returned"},r=null,i=null,s=406,a="Not Acceptable"):r.length===1?r=r[0]:r=null)}else{const u=await t.text();try{n=JSON.parse(u),Array.isArray(n)&&t.status===404&&(r=[],n=null,s=200,a="OK")}catch{t.status===404&&u===""?(s=204,a="No Content"):n={message:u}}if(n&&e.shouldThrowOnError)throw new zk(n)}return{success:n===null,error:n,data:r,count:i,status:s,statusText:a}}returns(){return this}overrideTypes(){return this}},YU=class extends ZU{throwOnError(){return super.throwOnError()}select(t){let e=!1;const n=(t??"*").split("").map(r=>/\s/.test(r)&&!e?"":(r==='"'&&(e=!e),r)).join("");return this.url.searchParams.set("select",n),this.headers.append("Prefer","return=representation"),this}order(t,{ascending:e=!0,nullsFirst:n,foreignTable:r,referencedTable:i=r}={}){const s=i?`${i}.order`:"order",a=this.url.searchParams.get(s);return this.url.searchParams.set(s,`${a?`${a},`:""}${t}.${e?"asc":"desc"}${n===void 0?"":n?".nullsfirst":".nullslast"}`),this}limit(t,{foreignTable:e,referencedTable:n=e}={}){const r=typeof n>"u"?"limit":`${n}.limit`;return this.url.searchParams.set(r,`${t}`),this}range(t,e,{foreignTable:n,referencedTable:r=n}={}){const i=typeof r>"u"?"offset":`${r}.offset`,s=typeof r>"u"?"limit":`${r}.limit`;return this.url.searchParams.set(i,`${t}`),this.url.searchParams.set(s,`${e-t+1}`),this}abortSignal(t){return this.signal=t,this}single(){return this.headers.set("Accept","application/vnd.pgrst.object+json"),this}maybeSingle(){return this.isMaybeSingle=!0,this}csv(){return this.headers.set("Accept","text/csv"),this}geojson(){return this.headers.set("Accept","application/geo+json"),this}explain({analyze:t=!1,verbose:e=!1,settings:n=!1,buffers:r=!1,wal:i=!1,format:s="text"}={}){var a;const o=[t?"analyze":null,e?"verbose":null,n?"settings":null,r?"buffers":null,i?"wal":null].filter(Boolean).join("|"),l=(a=this.headers.get("Accept"))!==null&&a!==void 0?a:"application/json";return this.headers.set("Accept",`application/vnd.pgrst.plan+${s}; for="${l}"; options=${o};`),s==="json"?this:this}rollback(){return this.headers.append("Prefer","tx=rollback"),this}returns(){return this}maxAffected(t){return this.headers.append("Prefer","handling=strict"),this.headers.append("Prefer",`max-affected=${t}`),this}};const Uk=new RegExp("[,()]");var pu=class extends YU{throwOnError(){return super.throwOnError()}eq(t,e){return this.url.searchParams.append(t,`eq.${e}`),this}neq(t,e){return this.url.searchParams.append(t,`neq.${e}`),this}gt(t,e){return this.url.searchParams.append(t,`gt.${e}`),this}gte(t,e){return this.url.searchParams.append(t,`gte.${e}`),this}lt(t,e){return this.url.searchParams.append(t,`lt.${e}`),this}lte(t,e){return this.url.searchParams.append(t,`lte.${e}`),this}like(t,e){return this.url.searchParams.append(t,`like.${e}`),this}likeAllOf(t,e){return this.url.searchParams.append(t,`like(all).{${e.join(",")}}`),this}likeAnyOf(t,e){return this.url.searchParams.append(t,`like(any).{${e.join(",")}}`),this}ilike(t,e){return this.url.searchParams.append(t,`ilike.${e}`),this}ilikeAllOf(t,e){return this.url.searchParams.append(t,`ilike(all).{${e.join(",")}}`),this}ilikeAnyOf(t,e){return this.url.searchParams.append(t,`ilike(any).{${e.join(",")}}`),this}regexMatch(t,e){return this.url.searchParams.append(t,`match.${e}`),this}regexIMatch(t,e){return this.url.searchParams.append(t,`imatch.${e}`),this}is(t,e){return this.url.searchParams.append(t,`is.${e}`),this}isDistinct(t,e){return this.url.searchParams.append(t,`isdistinct.${e}`),this}in(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&Uk.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`in.(${n})`),this}notIn(t,e){const n=Array.from(new Set(e)).map(r=>typeof r=="string"&&Uk.test(r)?`"${r}"`:`${r}`).join(",");return this.url.searchParams.append(t,`not.in.(${n})`),this}contains(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cs.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cs.{${e.join(",")}}`):this.url.searchParams.append(t,`cs.${JSON.stringify(e)}`),this}containedBy(t,e){return typeof e=="string"?this.url.searchParams.append(t,`cd.${e}`):Array.isArray(e)?this.url.searchParams.append(t,`cd.{${e.join(",")}}`):this.url.searchParams.append(t,`cd.${JSON.stringify(e)}`),this}rangeGt(t,e){return this.url.searchParams.append(t,`sr.${e}`),this}rangeGte(t,e){return this.url.searchParams.append(t,`nxl.${e}`),this}rangeLt(t,e){return this.url.searchParams.append(t,`sl.${e}`),this}rangeLte(t,e){return this.url.searchParams.append(t,`nxr.${e}`),this}rangeAdjacent(t,e){return this.url.searchParams.append(t,`adj.${e}`),this}overlaps(t,e){return typeof e=="string"?this.url.searchParams.append(t,`ov.${e}`):this.url.searchParams.append(t,`ov.{${e.join(",")}}`),this}textSearch(t,e,{config:n,type:r}={}){let i="";r==="plain"?i="pl":r==="phrase"?i="ph":r==="websearch"&&(i="w");const s=n===void 0?"":`(${n})`;return this.url.searchParams.append(t,`${i}fts${s}.${e}`),this}match(t){return Object.entries(t).filter(([e,n])=>
363n!==void 0).forEach(([e,n])=>{this.url.searchParams.append(e,`eq.${n}`)}),this}not(t,e,n){return this.url.searchParams.append(t,`not.${e}.${n}`),this}or(t,{foreignTable:e,referencedTable:n=e}={}){const r=n?`${n}.or`:"or";return this.url.searchParams.append(r,`(${t})`),this}filter(t,e,n){return this.url.searchParams.append(t,`${e}.${n}`),this}},JU=class{constructor(t,{headers:e={},schema:n,fetch:r,urlLengthLimit:i=8e3,retry:s}){this.url=t,this.headers=new Headers(e),this.schema=n,this.fetch=r,this.urlLengthLimit=i,this.retry=s}cloneRequestState(){return{url:new URL(this.url.toString()),headers:new Headers(this.headers)}}select(t,e){const{head:n=!1,count:r}=e??{},i=n?"HEAD":"GET";let s=!1;const a=(t??"*").split("").map(c=>/\s/.test(c)&&!s?"":(c==='"'&&(s=!s),c)).join(""),{url:o,headers:l}=this.cloneRequestState();return o.searchParams.set("select",a),r&&l.append("Prefer",`count=${r}`),new pu({method:i,url:o,headers:l,schema:this.schema,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}insert(t,{count:e,defaultToNull:n=!0}={}){var r;const i="POST",{url:s,headers:a}=this.cloneRequestState();if(e&&a.append("Prefer",`count=${e}`),n||a.append("Prefer","missing=default"),Array.isArray(t)){const o=t.reduce((l,c)=>l.concat(Object.keys(c)),[]);if(o.length>0){const l=[...new Set(o)].map(c=>`"${c}"`);s.searchParams.set("columns",l.join(","))}}return new pu({method:i,url:s,headers:a,schema:this.schema,body:t,fetch:(r=this.fetch)!==null&&r!==void 0?r:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}upsert(t,{onConflict:e,ignoreDuplicates:n=!1,count:r,defaultToNull:i=!0}={}){var s;const a="POST",{url:o,headers:l}=this.cloneRequestState();if(l.append("Prefer",`resolution=${n?"ignore":"merge"}-duplicates`),e!==void 0&&o.searchParams.set("on_conflict",e),r&&l.append("Prefer",`count=${r}`),i||l.append("Prefer","missing=default"),Array.isArray(t)){const c=t.reduce((u,d)=>u.concat(Object.keys(d)),[]);if(c.length>0){const u=[...new Set(c)].map(d=>`"${d}"`);o.searchParams.set("columns",u.join(","))}}return new pu({method:a,url:o,headers:l,schema:this.schema,body:t,fetch:(s=this.fetch)!==null&&s!==void 0?s:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}update(t,{count:e}={}){var n;const r="PATCH",{url:i,headers:s}=this.cloneRequestState();return e&&s.append("Prefer",`count=${e}`),new pu({method:r,url:i,headers:s,schema:this.schema,body:t,fetch:(n=this.fetch)!==null&&n!==void 0?n:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}delete({count:t}={}){var e;const n="DELETE",{url:r,headers:i}=this.cloneRequestState();return t&&i.append("Prefer",`count=${t}`),new pu({method:n,url:r,headers:i,schema:this.schema,fetch:(e=this.fetch)!==null&&e!==void 0?e:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};function qf(t){"@babel/helpers - typeof";return qf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},qf(t)}function XU(t,e){if(qf(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(qf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function QU(t){var e=XU(t,"string");return qf(e)=="symbol"?e:e+""}function eB(t,e,n){return(e=QU(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Bk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function Xm(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Bk(Object(n),!0).forEach(function(r){eB(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Bk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var tB=class AT{constructor(e,{headers:n={},schema:r,fetch:i,timeout:s,urlLengthLimit:a=8e3,retry:o}={}){this.url=e,this.headers=new Headers(n),this.schemaName=r,this.urlLengthLimit=a;const l=i??globalThis.fetch;s!==void 0&&s>0?this.fetch=(c,u)=>{const d=new AbortController,f=setTimeout(()=>d.abort(),s),h=u==null?void 0:u.signal;if(h){if(h.aborted)return clearTimeout(f),l(c,u);const y=()=>{clearTimeout(f),d.abort()};return h.addEventListener("abort",y,{once:!0}),l(c,Xm(Xm({},u),{},{signal:d.signal})).finally(()=>{clearTimeout(f),h.removeEventListener("abort",y)})}return l(c,Xm(Xm({},u),{},{signal:d.signal})).finally(()=>clearTimeout(f))}:this.fetch=l,this.retry=o}from(e){if(!e||typeof e!="string"||e.trim()==="")throw new Error("Invalid relation name: relation must be a non-empty string.");return new JU(new URL(`${this.url}/${e}`),{headers:new Headers(this.headers),schema:this.schemaName,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}schema(e){return new AT(this.url,{headers:this.headers,schema:e,fetch:this.fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}rpc(e,n={},{head:r=!1,get:i=!1,count:s}={}){var a;let o;const l=new URL(`${this.url}/rpc/${e}`);let c;const u=h=>h!==null&&typeof h=="object"&&(!Array.isArray(h)||h.some(u)),d=r&&Object.values(n).some(u);d?(o="POST",c=n):r||i?(o=r?"HEAD":"GET",Object.entries(n).filter(([h,y])=>y!==void 0).map(([h,y])=>[h,Array.isArray(y)?`{${y.join(",")}}`:`${y}
363`]).forEach(([h,y])=>{l.searchParams.append(h,y)})):(o="POST",c=n);const f=new Headers(this.headers);return d?f.set("Prefer",s?`count=${s},return=minimal`:"return=minimal"):s&&f.set("Prefer",`count=${s}`),new pu({method:o,url:l,headers:f,schema:this.schemaName,body:c,fetch:(a=this.fetch)!==null&&a!==void 0?a:fetch,urlLengthLimit:this.urlLengthLimit,retry:this.retry})}};class nB{constructor(){}static detectEnvironment(){var e;if(typeof WebSocket<"u")return{type:"native",wsConstructor:WebSocket};const n=globalThis;if(typeof globalThis<"u"&&typeof n.WebSocket<"u")return{type:"native",wsConstructor:n.WebSocket};const r=typeof global<"u"?global:void 0;if(r&&typeof r.WebSocket<"u")return{type:"native",wsConstructor:r.WebSocket};if(typeof globalThis<"u"&&typeof n.WebSocketPair<"u"&&typeof globalThis.WebSocket>"u")return{type:"cloudflare",error:"Cloudflare Workers detected. WebSocket clients are not supported in Cloudflare Workers.",workaround:"Use Cloudflare Workers WebSocket API for server-side WebSocket handling, or deploy to a different runtime."};if(typeof globalThis<"u"&&n.EdgeRuntime||typeof navigator<"u"&&(!((e=navigator.userAgent)===null||e===void 0)&&e.includes("Vercel-Edge")))return{type:"unsupported",error:"Edge runtime detected (Vercel Edge/Netlify Edge). WebSockets are not supported in edge functions.",workaround:"Use serverless functions or a different deployment target for WebSocket functionality."};const i=globalThis.process;if(i){const s=i.versions;if(s&&s.node)return{type:"unsupported",error:"Node.js detected but native WebSocket not found.",workaround:"Ensure you are running Node.js 22+ or provide a WebSocket implementation via the transport option."}}return{type:"unsupported",error:"Unknown JavaScript runtime without WebSocket support.",workaround:"Ensure you're running in a supported environment (browser, Node.js, Deno) or provide a custom WebSocket implementation."}}static getWebSocketConstructor(){const e=this.detectEnvironment();if(e.wsConstructor)return e.wsConstructor;let n=e.error||"WebSocket not supported in this environment.";throw e.workaround&&(n+=` 364 365Suggested solution: ${e.workaround}`),new Error(n)}static isWebSocketSupported(){try{return this.detectEnvironment().type==="native"}catch{return!1}}}const rB="2.110.7",iB=`realtime-js/${rB}`,sB="1.0.0",CT="2.0.0",aB=CT,oB=1e4,lB=100,$o={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},PT={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave",access_token:"access_token"},$w={connecting:"connecting",open:"open",closing:"closing",closed:"closed"};class cB{constructor(e){this.HEADER_LENGTH=1,this.USER_BROADCAST_PUSH_META_LENGTH=6,this.KINDS={userBroadcastPush:3,userBroadcast:4},this.BINARY_ENCODING=0,this.JSON_ENCODING=1,this.BROADCAST_EVENT="broadcast",this.allowedMetadataKeys=[],this.allowedMetadataKeys=e??[]}encode(e,n){if(e.event===this.BROADCAST_EVENT&&!(e.payload instanceof ArrayBuffer)&&typeof e.payload.event=="string")return n(this._binaryEncodeUserBroadcastPush(e));let r=[e.join_ref,e.ref,e.topic,e.event,e.payload];return n(JSON.stringify(r))}_binaryEncodeUserBroadcastPush(e){var n;return this._isArrayBuffer((n=e.payload)===null||n===void 0?void 0:n.payload)?this._encodeBinaryUserBroadcastPush(e):this._encodeJsonUserBroadcastPush(e)}_encodeBinaryUserBroadcastPush(e){var n,r;const i=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:new ArrayBuffer(0);return this._encodeUserBroadcastPush(e,this.BINARY_ENCODING,i)}_encodeJsonUserBroadcastPush(e){var n,r;const i=(r=(n=e.payload)===null||n===void 0?void 0:n.payload)!==null&&r!==void 0?r:{},a=new TextEncoder().encode(JSON.stringify(i)).buffer;return this._encodeUserBroadcastPush(e,this.JSON_ENCODING,a)}_encodeUserBroadcastPush(e,n,r){var i,s;const a=new TextEncoder,o=a.encode(e.topic),l=a.encode((i=e.ref)!==null&&i!==void 0?i:""),c=a.encode((s=e.join_ref)!==null&&s!==void 0?s:""),u=a.encode(e.payload.event),d=this.allowedMetadataKeys?this._pick(e.payload,this.allowedMetadataKeys):{},f=a.encode(Object.keys(d).length===0?"":JSON.stringify(d));if(c.length>255)throw new Error(`joinRef length ${c.length} exceeds maximum of 255`);if(l.length>255)throw new Error(`ref length ${l.length} exceeds maximum of 255`);if(o.length>255)throw new Error(`topic length ${o.length} exceeds maximum of 255`);if(u.length>255)throw new Error(`userEvent length ${u.length} exceeds maximum of 255`);if(f.length>255)throw new Error(`metadata length ${f.length} exceeds maximum of 255`);const h=this.USER_BROADCAST_PUSH_META_LENGTH+c.length+l.length+o.length+u.length+f.length,y=new ArrayBuffer(this.HEADER_LENGTH+h),v=new DataView(y),_=new Uint8Array(y);let w=0;v.setUint8(w++,this.KINDS.userBroadcastPush),v.setUint8(w++,c.length),v.setUint8(w++,l.length),v.setUint8(w++,o.length),v.setUint8(w++,u.length),v.setUint8(w++,f.length),v.setUint8(w++,n),_.set(c,w),w+=c.length,_.set(l,w),w+=l.length,_.set(o,w),w+=o.length,_.set(u,w),w+=u.length,_.set(f,w),w+=f.length;var x=new Uint8Array(y.byteLength+r.byteLength);return x.set(new Uint8Array(y),0),x.set(new Uint8Array(r),y.byteLength),x.buffer}decode(e,n){if(this._isArrayBuffer(e)){let r=this._binaryDecode(e);return n(r)}if(typeof e=="string"){const r=JSON.parse(e),[i,s,a,o,l]=r;
365return n({join_ref:i,ref:s,topic:a,event:o,payload:l})}return n({})}_binaryDecode(e){const n=new DataView(e),r=n.getUint8(0),i=new TextDecoder;switch(r){case this.KINDS.userBroadcast:return this._decodeUserBroadcast(e,n,i)}}_decodeUserBroadcast(e,n,r){const i=n.getUint8(1),s=n.getUint8(2),a=n.getUint8(3),o=n.getUint8(4);let l=this.HEADER_LENGTH+4;const c=r.decode(e.slice(l,l+i));l=l+i;const u=r.decode(e.slice(l,l+s));l=l+s;const d=r.decode(e.slice(l,l+a));l=l+a;const f=e.slice(l,e.byteLength),h=o===this.JSON_ENCODING?JSON.parse(r.decode(f)):f,y={type:this.BROADCAST_EVENT,event:u,payload:h};return a>0&&(y.meta=JSON.parse(d)),{join_ref:null,ref:null,topic:c,event:this.BROADCAST_EVENT,payload:y}}_isArrayBuffer(e){var n;return e instanceof ArrayBuffer||((n=e==null?void 0:e.constructor)===null||n===void 0?void 0:n.name)==="ArrayBuffer"}_pick(e,n){return!e||typeof e!="object"?{}:Object.fromEntries(Object.entries(e).filter(([r])=>n.includes(r)))}}var hn;(function(t){t.abstime="abstime",t.bool="bool",t.date="date",t.daterange="daterange",t.float4="float4",t.float8="float8",t.int2="int2",t.int4="int4",t.int4range="int4range",t.int8="int8",t.int8range="int8range",t.json="json",t.jsonb="jsonb",t.money="money",t.numeric="numeric",t.oid="oid",t.reltime="reltime",t.text="text",t.time="time",t.timestamp="timestamp",t.timestamptz="timestamptz",t.timetz="timetz",t.tsrange="tsrange",t.tstzrange="tstzrange"})(hn||(hn={}));const qk=(t,e,n={})=>{var r;const i=(r=n.skipTypes)!==null&&r!==void 0?r:[];return e?Object.keys(e).reduce((s,a)=>(s[a]=uB(a,t,e,i),s),{}):{}},uB=(t,e,n,r)=>{const i=e.find(o=>o.name===t),s=i==null?void 0:i.type,a=n[t];return s&&!r.includes(s)?TT(s,a):Uw(a)},TT=(t,e)=>{if(t.charAt(0)==="_"){const n=t.slice(1,t.length);return pB(e,n)}switch(t){case hn.bool:return dB(e);case hn.float4:case hn.float8:case hn.int2:case hn.int4:case hn.int8:case hn.numeric:case hn.oid:return hB(e);case hn.json:case hn.jsonb:return fB(e);case hn.timestamp:return mB(e);case hn.abstime:case hn.date:case hn.daterange:case hn.int4range:case hn.int8range:case hn.money:case hn.reltime:case hn.text:case hn.time:case hn.timestamptz:case hn.timetz:case hn.tsrange:case hn.tstzrange:return Uw(e);default:return Uw(e)}},Uw=t=>t,dB=t=>{switch(t){case"t":return!0;case"f":return!1;default:return t}},hB=t=>{if(typeof t=="string"){const e=parseFloat(t);if(!Number.isNaN(e))return e}return t},fB=t=>{if(typeof t=="string")try{return JSON.parse(t)}catch{return t}return t},pB=(t,e)=>{if(typeof t!="string")return t;const n=t.length-1,r=t[n];if(t[0]==="{"&&r==="}"){let s;const a=t.slice(1,n);try{s=JSON.parse("["+a+"]")}catch{s=a?a.split(","):[]}return s.map(o=>TT(e,o))}return t},mB=t=>typeof t=="string"?t.replace(" ","T"):t,RT=t=>{const e=new URL(t);return e.protocol=e.protocol.replace(/^ws/i,"http"),e.pathname=e.pathname.replace(/\/+$/,"").replace(/\/socket\/websocket$/i,"").replace(/\/socket$/i,"").replace(/\/websocket$/i,""),e.pathname===""||e.pathname==="/"?e.pathname="/api/broadcast":e.pathname=e.pathname+"/api/broadcast",e.href};var Wu=t=>typeof t=="function"?t:function(){return t},gB=typeof self<"u"?self:null,mu=typeof window<"u"?window:null,Ks=gB||mu||globalThis,vB="2.0.0",yB=1e4,wB=1e3,bB=100,Qs={connecting:0,open:1,closing:2,closed:3},si={closed:"closed",errored:"errored",joined:"joined",joining:"joining",leaving:"leaving"},Ha={close:"phx_close",error:"phx_error",join:"phx_join",reply:"phx_reply",leave:"phx_leave"},Bw={longpoll:"longpoll",websocket:"websocket"},xB={complete:4},qw="base64url.bearer.phx.",Qm=class{constructor(t,e,n,r){this.channel=t,this.event=e,this.payload=n||function(){return{}},this.receivedResp=null,this.timeout=r,this.timeoutTimer=null,this.recHooks=[],this.sent=!1,this.ref=void 0}resend(t){this.timeout=t,this.reset(),this.send()}send(){this.hasReceived("timeout")||(this.startTimeout(),this.sent=!0,this.channel.socket.push({topic:this.channel.topic,event:this.event,payload:this.payload(),ref:this.ref,join_ref:this.channel.joinRef()}))}receive(t,e){return this.hasReceived(t)&&e(this.receivedResp.response),this.recHooks.push({status:t,callback:e}),this}reset(){this.cancelRefEvent(),this.ref=null,this.refEvent=null,this.receivedResp=null,this.sent=!1}destroy(){this.cancelRefEvent(),this.cancelTimeout()}
vendor: 21,118 bytes, lines 365-366
365matchReceive({status:t,response:e,_ref:n}){this.recHooks.filter(r=>r.status===t).forEach(r=>r.callback(e))}cancelRefEvent(){this.refEvent&&this.channel.off(this.refEvent)}cancelTimeout(){clearTimeout(this.timeoutTimer),this.timeoutTimer=null}startTimeout(){this.timeoutTimer&&this.cancelTimeout(),this.ref=this.channel.socket.makeRef(),this.refEvent=this.channel.replyEventName(this.ref),this.channel.on(this.refEvent,t=>{this.cancelRefEvent(),this.cancelTimeout(),this.receivedResp=t,this.matchReceive(t)}),this.timeoutTimer=setTimeout(()=>{this.trigger("timeout",{})},this.timeout)}hasReceived(t){return this.receivedResp&&this.receivedResp.status===t}trigger(t,e){this.channel.trigger(this.refEvent,{status:t,response:e})}},LT=class{constructor(t,e){this.callback=t,this.timerCalc=e,this.timer=void 0,this.tries=0}reset(){this.tries=0,clearTimeout(this.timer)}scheduleTimeout(){clearTimeout(this.timer),this.timer=setTimeout(()=>{this.tries=this.tries+1,this.callback()},this.timerCalc(this.tries+1))}},_B=class{constructor(t,e,n){this.state=si.closed,this.topic=t,this.params=Wu(e||{}),this.socket=n,this.bindings=[],this.bindingRef=0,this.timeout=this.socket.timeout,this.joinedOnce=!1,this.joinPush=new Qm(this,Ha.join,this.params,this.timeout),this.pushBuffer=[],this.stateChangeRefs=[],this.rejoinTimer=new LT(()=>{this.socket.isConnected()&&this.rejoin()},this.socket.rejoinAfterMs),this.stateChangeRefs.push(this.socket.onError(()=>this.rejoinTimer.reset())),this.stateChangeRefs.push(this.socket.onOpen(()=>{this.rejoinTimer.reset(),this.isErrored()&&this.rejoin()})),this.joinPush.receive("ok",()=>{this.state=si.joined,this.rejoinTimer.reset(),this.pushBuffer.forEach(r=>r.send()),this.pushBuffer=[]}),this.joinPush.receive("error",r=>{this.state=si.errored,this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.onClose(()=>{this.rejoinTimer.reset(),this.socket.hasLogger()&&this.socket.log("channel",`close ${this.topic}`),this.state=si.closed,this.socket.remove(this)}),this.onError(r=>{this.socket.hasLogger()&&this.socket.log("channel",`error ${this.topic}`,r),this.isJoining()&&this.joinPush.reset(),this.state=si.errored,this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.joinPush.receive("timeout",()=>{this.socket.hasLogger()&&this.socket.log("channel",`timeout ${this.topic}`,this.joinPush.timeout),new Qm(this,Ha.leave,Wu({}),this.timeout).send(),this.state=si.errored,this.joinPush.reset(),this.socket.isConnected()&&this.rejoinTimer.scheduleTimeout()}),this.on(Ha.reply,(r,i)=>{this.trigger(this.replyEventName(i),r)})}join(t=this.timeout){if(this.joinedOnce)throw new Error("tried to join multiple times. 'join' can only be called a single time per channel instance");return this.timeout=t,this.joinedOnce=!0,this.rejoin(),this.joinPush}teardown(){this.pushBuffer.forEach(t=>t.destroy()),this.pushBuffer=[],this.rejoinTimer.reset(),this.joinPush.destroy(),this.state=si.closed,this.bindings=[]}onClose(t){this.on(Ha.close,t)}onError(t){return this.on(Ha.error,e=>t(e))}on(t,e){let n=this.bindingRef++;return this.bindings.push({event:t,ref:n,callback:e}),n}off(t,e){this.bindings=this.bindings.filter(n=>!(n.event===t&&(typeof e>"u"||e===n.ref)))}canPush(){return this.socket.isConnected()&&this.isJoined()}push(t,e,n=this.timeout){if(e=e||{},!this.joinedOnce)throw new Error(`tried to push '${t}' to '${this.topic}' before joining. Use channel.join() before pushing events`);let r=new Qm(this,t,function(){return e},n);return this.canPush()?r.send():(r.startTimeout(),this.pushBuffer.push(r)),r}leave(t=this.timeout){this.rejoinTimer.reset(),this.joinPush.cancelTimeout(),this.state=si.leaving;let e=()=>{this.socket.hasLogger()&&this.socket.log("channel",`leave ${this.topic}`),this.trigger(Ha.close,"leave")},n=new Qm(this,Ha.leave,Wu({}),t);return n.receive("ok",()=>e()).receive("timeout",()=>e()),n.send(),this.canPush()||n.trigger("ok",{}),n}onMessage(t,e,n){return e}filterBindings(t,e,n){return!0}isMember(t,e,n,r){return this.topic!==t?!1:r&&r!==this.joinRef()?(this.socket.hasLogger()&&this.socket.log("channel","dropping outdated message",{topic:t,event:e,payload:n,joinRef:r}),!1):!0}joinRef(){return this.joinPush.ref}rejoin(t=this.timeout){this.isLeaving()||(this.socket.leaveOpenTopic(this.topic),this.state=si.joining,this.joinPush.resend(t))}trigger(t,e,n,r){let i=this.onMessage(t,e,n,r);if(e&&!i)throw new Error("channel onMessage callbacks must return the payload, modified or unmodified");let s=this.bindings.filter(a=>a.event===t&&this.filterBindings(a,e,n));for(let a=0;a<s.length;a++)s[a].callback(i,n,r||this.joinRef())}replyEventName(t){return`chan_reply_${t}`}isClosed(){return this.state===si.closed}isErrored(){return this.state===si.errored}isJoined(){return this.state===si.joined}isJoining(){return this.state===si.joining}isLeaving(){return this.state===si.leaving}},L0=class{static request(t,e,n,r,i,s,a){if(Ks.XDomainRequest){let o=new Ks.XDomainRequest;return this.xdomainRequest(o,t,e,r,i,s,a)}else if(Ks.XMLHttpRequest){let o=new Ks.XMLHttpRequest;return this.xhrRequest(o,t,e,n,r,i,s,a)}else{if(Ks.fetch&&Ks.AbortController)return this.fetchRequest(t,e,n,r,i,s,a);throw new Error("No suitable XMLHttpRequest implementation found")}}static fetchRequest(t,e,n,r,i,s,a){let o={method:t,headers:n,body:r},l=null;return i&&(l=new AbortController,setTimeout(()=>l.abort(),i),o.signal=l.signal),Ks.fetch(e,o).then(c=>c.text()).then(c=>this.parseJSON(c)).then(c=>a&&a(c)).catch(c=>{c.name==="AbortError"&&s?s():a&&a(null)}),l}static xdomainRequest(t,e,n,r,i,s,a){return t.timeout=i,t.open(e,n),t.onload=()=>{let o=this.parseJSON(t.responseText);a&&a(o)},s&&(t.ontimeout=s),t.onprogress=()=>{},t.send(r),t}static xhrRequest(t,e,n,r,i,s,a,o){t.open(e,n,!0),t.timeout=s;for(let[l,c]of Object.entries(r))t.setRequestHeader(l,c);return t.onerror=()=>o&&o(null),t.onreadystatechange=()=>{if(t.readyState===xB.complete&&o){let l=this.parseJSON(t.responseText);o(l)}},a&&(t.ontimeout=a),t.send(i),t}static parseJSON(t){if(!t||t==="")return null;try{return JSON.parse(t)}catch{return console&&console.log("failed to parse JSON response",t),null}}static serialize(t,e){let n=[];for(var r in t){if(!Object.prototype.hasOwnProperty.call(t,r))continue;let i=e?`${e}[${r}]`:r,s=t[r];typeof s=="object"?n.push(this.serialize(s,i)):n.push(encodeURIComponent(i)+"="+encodeURIComponent(s))}return n.join("&")}static appendParams(t,e){if(Object.keys(e).length===0)return t;let n=t.match(/\?/)?"&":"?";return`${t}${n}${this.serialize(e)}`}},SB=t=>{let e="",n=new Uint8Array(t),r=n.byteLength;for(let i=0;i<r;i++)e+=String.fromCharCode(n[i]);return btoa(e)},nu=class{constructor(t,e){e&&e.length===2&&e[1].startsWith(qw)&&(this.authToken=atob(e[1].slice(qw.length))),this.endPoint=null,this.token=null,this.skipHeartbeat=!0,this.reqs=new Set,this.awaitingBatchAck=!1,this.currentBatch=null,this.currentBatchTimer=null,this.batchBuffer=[],this.onopen=function(){},this.onerror=function(){},this.onmessage=function(){},this.onclose=function(){},this.pollEndpoint=this.normalizeEndpoint(t),this.readyState=Qs.connecting,setTimeout(()=>this.poll(),0)}normalizeEndpoint(t){return t.replace("ws://","http://").replace("wss://","https://").replace(new RegExp("(.*)/"+Bw.websocket),"$1/"+Bw.longpoll)}endpointURL(){return L0.appendParams(this.pollEndpoint,{token:this.token})}closeAndRetry(t,e,n){this.close(t,e,n),this.readyState=Qs.connecting}ontimeout(){this.onerror("timeout"),this.closeAndRetry(1005,"timeout",!1)}isActive(){return this.readyState===Qs.open||this.readyState===Qs.connecting}poll(){const t={Accept:"application/json"};this.authToken&&(t["X-Phoenix-AuthToken"]=this.authToken),this.ajax("GET",t,null,()=>this.ontimeout(),e=>{if(e){var{status:n,token:r,messages:i}=e;if(n===410&&this.token!==null){this.onerror(410),this.closeAndRetry(3410,"session_gone",!1);return}this.token=r}else n=0;switch(n){case 200:i.forEach(s=>{setTimeout(()=>this.onmessage({data:s}),0)}),this.poll();break;case 204:this.poll();break;case 410:this.readyState=Qs.open,this.onopen({}),this.poll();break;case 403:this.onerror(403),this.close(1008,"forbidden",!1);break;case 0:case 500:this.onerror(500),this.closeAndRetry(1011,"internal server error",500);break;default:throw new Error(`unhandled poll status ${n}`)}})}send(t){typeof t!="string"&&(t=SB(t)),this.currentBatch?this.currentBatch.push(t):this.awaitingBatchAck?this.batchBuffer.push(t):(this.currentBatch=[t],this.currentBatchTimer=setTimeout(()=>{this.batchSend(this.currentBatch),this.currentBatch=null},0))}batchSend(t,e=0){this.awaitingBatchAck=!0;const n=e+bB,r=t.slice(e,n);this.ajax("POST",{"Content-Type":"application/x-ndjson"},r.join(` 366`),()=>this.onerror("timeout"),i=>{!i||i.status!==200?(this.awaitingBatchAck=!1,this.onerror(i&&i.status),this.closeAndRetry(1011,"internal server error",!1)):n<t.length?this.batchSend(t,n):this.batchBuffer.length>0?(this.batchSend(this.batchBuffer),this.batchBuffer=[]):this.awaitingBatchAck=!1})}close(t,e,n){for(let i of this.reqs)i.abort();this.readyState=Qs.closed;let r=Object.assign({code:1e3,reason:void 0,wasClean:!0},{code:t,reason:e,wasClean:n});this.batchBuffer=[],clearTimeout(this.currentBatchTimer),this.currentBatchTimer=null,typeof CloseEvent<"u"?this.onclose(new CloseEvent("close",r)):this.onclose(r)}ajax(t,e,n,r,i){let s,a=()=>{this.reqs.delete(s),r()};s=L0.request(t,this.endpointURL(),e,n,this.timeout,a,o=>{this.reqs.delete(s),this.isActive()&&i(o)}),this.reqs.add(s)}},kB=class Fh{constructor(e,n={}){let r=n.events||{state:"presence_state",diff:"presence_diff"};this.state=Object.create(null),this.pendingDiffs=[],this.channel=e,this.joinRef=null,this.caller={onJoin:function(){},onLeave:function(){},onSync:function(){}},this.channel.on(r.state,i=>{let{onJoin:s,onLeave:a,onSync:o}=this.caller;this.joinRef=this.channel.joinRef(),this.state=Fh.syncState(this.state,i,s,a),this.pendingDiffs.forEach(l=>{this.state=Fh.syncDiff(this.state,l,s,a)}),this.pendingDiffs=[],o()}),this.channel.on(r.diff,i=>{let{onJoin:s,onLeave:a,onSync:o}=this.caller;this.inPendingSyncState()?this.pendingDiffs.push(i):(this.state=Fh.syncDiff(this.state,i,s,a),o())})}onJoin(e){this.caller.onJoin=e}onLeave(e){this.caller.onLeave=e}onSync(e){this.caller.onSync=e}list(e){return Fh.list(this.state,e)}inPendingSyncState(){return!this.joinRef||this.joinRef!==this.channel.joinRef()}static syncState(e,n,r,i){let s=this.toNullProtoObj(this.clone(e));n=this.toNullProtoObj(n);let a=Object.create(null),o=Object.create(null);return this.map(s,(l,c)=>{n[l]||(o[l]=c)}),this.map(n,(l,c)=>{let u=s[l];if(u){let d=c.metas.map(v=>v.phx_ref),f=u.metas.map(v=>v.phx_ref),h=c.metas.filter(v=>f.indexOf(v.phx_ref)<0),y=u.metas.filter(v=>d.indexOf(v.phx_ref)<0);h.length>0&&(a[l]=c,a[l].metas=h),y.length>0&&(o[l]=this.clone(u),o[l].metas=y)}else a[l]=c}),this.syncDiff(s,{joins:a,leaves:o},r,i)}static syncDiff(e,n,r,i){e=this.toNullProtoObj(e);let{joins:s,leaves:a}=this.clone(n);return r||(r=function(){}),i||(i=function(){}),this.map(s,(o,l)=>{let c=e[o];if(e[o]=this.clone(l),c){let u=e[o].metas.map(f=>f.phx_ref),d=c.metas.filter(f=>u.indexOf(f.phx_ref)<0);e[o].metas.unshift(...d)}r(o,c,l)}),this.map(a,(o,l)=>{let c=e[o];if(!c)return;let u=l.metas.map(d=>d.phx_ref);c.metas=c.metas.filter(d=>u.indexOf(d.phx_ref)<0),i(o,c,l),c.metas.length===0&&delete e[o]}),e}static list(e,n){return n||(n=function(r,i){return i}),this.map(e,(r,i)=>n(r,i))}static map(e,n){return Object.getOwnPropertyNames(e).map(r=>n(r,e[r]))}static toNullProtoObj(e){if(Object.getPrototypeOf(e)===null)return e;let n=Object.create(null);return Object.getOwnPropertyNames(e).forEach(r=>{n[r]=e[r]}),n}static clone(e){return JSON.parse(JSON.stringify(e))}},eg={HEADER_LENGTH:1,META_LENGTH:4,KINDS:{push:0,reply:1,broadcast:2},encode(t,e){if(t.payload.constructor===ArrayBuffer)return e(this.binaryEncode(t));{let n=[t.join_ref,t.ref,t.topic,t.event,t.payload];return e(JSON.stringify(n))}},decode(t,e){if(t.constructor===ArrayBuffer)return e(this.binaryDecode(t));{let[n,r,i,s,a]=JSON.parse(t);return e({join_ref:n,ref:r,topic:i,event:s,payload:a})}},binaryEncode(t){let{join_ref:e,ref:n,event:r,topic:i,payload:s}=t,a=new TextEncoder,o=a.encode(e),l=a.encode(n),c=a.encode(i),u=a.encode(r);this.assertFieldSize(o.byteLength,"join_ref"),this.assertFieldSize(l.byteLength,"ref"),this.assertFieldSize(c.byteLength,"topic"),this.assertFieldSize(u.byteLength,"event");let d=this.META_LENGTH+o.byteLength+l.byteLength+c.byteLength+u.byteLength,f=new ArrayBuffer(this.HEADER_LENGTH+d),h=new Uint8Array(f),y=new DataView(f),v=0;y.setUint8(v++,this.KINDS.push),y.setUint8(v++,o.byteLength),y.setUint8(v++,l.byteLength),y.setUint8(v++,c.byteLength),y.setUint8(v++,u.byteLength),h.set(o,v),v+=o.byteLength,h.set(l,v),v+=l.byteLength,h.set(c,v),v+=c.byteLength,h.set(u,v),v+=u.byteLength;var _=new Uint8Array(f.byteLength+s.byteLength);return _.set(h,0),_.set(new Uint8Array(s),f.byteLength),_.buffer},assertFieldSize(t,e){if(t>255)throw new Error(`unable to convert ${e} to binary: must be less than or equal to 255 bytes, but is ${t} bytes`)},binaryDecode(t){let e=new DataView(t),n=e.getUint8(0),r=new TextDecoder;switch(n){case this.KINDS.push:return this.decodePush(t,e,r);case this.KINDS.reply:return this.decodeReply(t,e,r);case this.KINDS.broadcast:return this.decodeBroadcast(t,e,r)}},decodePush(t,e,n){let r=e.getUint8(1),i=e.getUint8(2),s=e.getUint8(3),a=this.HEADER_LENGTH+this.META_LENGTH-1,o=n.decode(t.slice(a,a+r));a=a+r;let l=n.decode(t.slice(a,a+i));a=a+i;let c=n.decode(t.slice(a,a+s));a=a+s;let u=t.slice(a,t.byteLength);return{join_ref:o,ref:null,topic:l,event:c,payload:u}},decodeReply(t,e,n){let r=e.getUint8(1),i=e.getUint8(2),s=e.getUint8(3),a=e.getUint8(4),o=this.HEADER_LENGTH+this.META_LENGTH,l=n.decode(t.slice(o,o+r));o=o+r;let c=n.decode(t.slice(o,o+i));o=o+i;let u=n.decode(t.slice(o,o+s));o=o+s;let d=n.decode(t.slice(o,o+a));o=o+a;let f=t.slice(o,t.byteLength),h={status:d,response:f};return{join_ref:l,ref:c,topic:u,event:Ha.reply,payload:h}},decodeBroadcast(t,e,n){let r=e.getUint8(1),i=e.getUint8(2),s=this.HEADER_LENGTH+2,a=n.decode(t.slice(s,s+r));s=s+r;let o=n.decode(t.slice(s,s+i));s=s+i;let l=t.slice(s,t.byteLength);return{join_ref:null,ref:null,topic:a,event:o,payload:l}}},EB=class{constructor(t,e={}){this.stateChangeCallbacks={open:[],close:[],error:[],message:[]},this.channels=[],this.sendBuffer=[],this.ref=0,this.fallbackRef=null,this.timeout=e.timeout||yB,this.transport=e.transport||Ks.WebSocket||nu,this.conn=void 0,this.primaryPassedHealthCheck=!1,this.longPollFallbackMs=e.longPollFallbackMs,this.fallbackTimer=null;let n=null;try{n=Ks&&Ks.sessionStorage}catch{}this.sessionStore=e.sessionStorage||n,this.establishedConnections=0,this.defaultEncoder=eg.encode.bind(eg),this.defaultDecoder=eg.decode.bind(eg),this.closeWasClean=!0,this.disconnecting=!1,this.binaryType=e.binaryType||"arraybuffer",this.connectClock=1,this.pageHidden=!1,this.encode=void 0,this.decode=void 0,this.transport!==nu?(this.encode=e.encode||this.defaultEncoder,this.decode=e.decode||this.defaultDecoder):(this.encode=this.defaultEncoder,this.decode=this.defaultDecoder);let r=null;mu&&mu.addEventListener&&(mu.addEventListener("pagehide",i=>{this.conn&&(this.disconnect(),r=this.connectClock)}),mu.addEventListener("pageshow",i=>{r===this.connectClock&&(r=null,this.connect())}),mu.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"?this.pageHidden=!0:(this.pageHidden=!1,!this.isConnected()&&!this.closeWasClean&&this.teardown(()=>this.connect()))})),this.heartbeatIntervalMs=e.heartbeatIntervalMs||3e4,this.autoSendHeartbeat=e.autoSendHeartbeat??!0,this.heartbeatCallback=e.heartbeatCallback??(()=>{}),this.rejoinAfterMs=i=>e.rejoinAfterMs?e.rejoinAfterMs(i):[1e3,2e3,5e3][i-1]||1e4,this.reconnectAfterMs=i=>e.reconnectAfterMs?e.reconnectAfterMs(i):[10,50,100,150,200,250,500,1e3,2e3][i-1]||5e3,this.logger=e.logger||null,!this.logger&&e.debug&&(this.logger=(i,s,a)=>{console.log(`${i}: ${s}`,a)}),this.longpollerTimeout=e.longpollerTimeout||2e4,this.params=Wu(e.params||{}),this.endPoint=`${t}/${Bw.websocket}`,this.vsn=e.vsn||vB,this.heartbeatTimeoutTimer=null,this.heartbeatTimer=null,this.heartbeatSentAt=null,this.pendingHeartbeatRef=null,this.reconnectTimer=new LT(()=>{if(this.pageHidden){this.log("Not reconnecting as page is hidden!"),this.teardown();return}this.teardown(async()=>{e.beforeReconnect&&await e.beforeReconnect(),this.connect()})},this.reconnectAfterMs),this.authToken=e.authToken&&Wu(e.authToken)}getLongPollTransport(){return nu}replaceTransport(t){this.connectClock++,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.conn&&(this.conn.close(),this.conn=null),this.transport=t}protocol(){return location.protocol.match(/^https/)?"wss":"ws"}endPointURL(){let t=L0.appendParams(L0.appendParams(this.endPoint,this.params()),{vsn:this.vsn});return t.charAt(0)!=="/"?t:t.charAt(1)==="/"?`${this.protocol()}:${t}`:`${this.protocol()}://${location.host}${t}`}disconnect(t,e,n){this.connectClock++,this.disconnecting=!0,this.closeWasClean=!0,clearTimeout(this.fallbackTimer),this.reconnectTimer.reset(),this.teardown(()=>{this.disconnecting=!1,t&&t()},e,n)}connect(t){t&&(console&&console.log("passing params to connect is deprecated. Instead pass :params to the Socket constructor"),this.params=Wu(t)),!(this.conn&&!this.disconnecting)&&(this.longPollFallbackMs&&this.transport!==nu?this.connectWithFallback(nu,this.longPollFallbackMs):this.transportConnect())}log(t,e,n){this.logger&&this.logger(t,e,n)}hasLogger(){return this.logger!==null}onOpen(t){let e=this.makeRef();return this.stateChangeCallbacks.open.push([e,t]),e}onClose(t){let e=this.makeRef();return this.stateChangeCallbacks.close.push([e,t]),e}onError(t){let e=this.makeRef();return this.stateChangeCallbacks.error.push([e,t]),e}onMessage(t){let e=this.makeRef();return this.stateChangeCallbacks.message.push([e,t]),e}onHeartbeat(t){this.heartbeatCallback=t}ping(t){if(!this.isConnected())return!1;let e=this.makeRef(),n=Date.now();this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:e});let r=this.onMessage(i=>{i.ref===e&&(this.off([r]),t(Date.now()-n))});return!0}transportName(t){switch(t){case nu:return"LongPoll";default:return t.name}}transportConnect(){this.connectClock++,this.closeWasClean=!1;let t;this.authToken&&(t=["phoenix",`${qw}${btoa(this.authToken()).replace(/=/g,"")}`]),this.conn=new this.transport(this.endPointURL(),t),this.conn.binaryType=this.binaryType,this.conn.timeout=this.longpollerTimeout,this.conn.onopen=()=>this.onConnOpen(),this.conn.onerror=e=>this.onConnError(e),this.conn.onmessage=e=>this.onConnMessage(e),this.conn.onclose=e=>this.onConnClose(e)}getSession(t){return this.sessionStore&&this.sessionStore.getItem(t)}storeSession(t,e){this.sessionStore&&this.sessionStore.setItem(t,e)}connectWithFallback(t,e=2500){clearTimeout(this.fallbackTimer);let n=!1,r=!0,i,s,a=this.transportName(t),o=l=>{this.log("transport",`falling back to ${a}...`,l),this.off([i,s]),r=!1,this.replaceTransport(t),this.transportConnect()};if(this.getSession(`phx:fallback:${a}`))return o("memorized");this.fallbackTimer=setTimeout(o,e),s=this.onError(l=>{this.log("transport","error",l),r&&!n&&(clearTimeout(this.fallbackTimer),o(l))}),this.fallbackRef&&this.off([this.fallbackRef]),this.fallbackRef=this.onOpen(()=>{if(n=!0,!r){let l=this.transportName(t);return this.primaryPassedHealthCheck||this.storeSession(`phx:fallback:${l}`,"true"),this.log("transport",`established ${l} fallback`)}clearTimeout(this.fallbackTimer),this.fallbackTimer=setTimeout(o,e),this.ping(l=>{this.log("transport","connected to primary after",l),this.primaryPassedHealthCheck=!0,clearTimeout(this.fallbackTimer)})}),this.transportConnect()}clearHeartbeats(){clearTimeout(this.heartbeatTimer),clearTimeout(this.heartbeatTimeoutTimer)}onConnOpen(){this.hasLogger()&&this.log("transport",`connected to ${this.endPointURL()}`),this.closeWasClean=!1,this.disconnecting=!1,this.establishedConnections++,this.flushSendBuffer(),this.reconnectTimer.reset(),this.autoSendHeartbeat&&this.resetHeartbeat(),this.triggerStateCallbacks("open")}heartbeatTimeout(){if(this.pendingHeartbeatRef){this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.hasLogger()&&this.log("transport","heartbeat timeout. Attempting to re-establish connection");try{this.heartbeatCallback("timeout")}catch(t){this.log("error","error in heartbeat callback",t)}this.triggerChanError(new Error("heartbeat timeout")),this.closeWasClean=!1,this.teardown(()=>this.reconnectTimer.scheduleTimeout(),wB,"heartbeat timeout")}}resetHeartbeat(){this.conn&&this.conn.skipHeartbeat||(this.pendingHeartbeatRef=null,this.clearHeartbeats(),this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}teardown(t,e,n){if(!this.conn)return t&&t();const r=this.conn;this.waitForBufferDone(r,()=>{e?r.close(e,n||""):r.close(),this.waitForSocketClosed(r,()=>{this.conn===r&&(this.conn.onopen=function(){},this.conn.onerror=function(){},this.conn.onmessage=function(){}
366,this.conn.onclose=function(){},this.conn=null),t&&t()})})}waitForBufferDone(t,e,n=1){if(n===5||!t.bufferedAmount){e();return}setTimeout(()=>{this.waitForBufferDone(t,e,n+1)},150*n)}waitForSocketClosed(t,e,n=1){if(n===5||t.readyState===Qs.closed){e();return}setTimeout(()=>{this.waitForSocketClosed(t,e,n+1)},150*n)}onConnClose(t){this.conn&&(this.conn.onclose=()=>{}),this.hasLogger()&&this.log("transport","close",t),this.triggerChanError(t),this.clearHeartbeats(),this.closeWasClean||this.reconnectTimer.scheduleTimeout(),this.triggerStateCallbacks("close",t)}onConnError(t){this.hasLogger()&&this.log("transport","error",t);let e=this.transport,n=this.establishedConnections;this.triggerStateCallbacks("error",t,e,n),(e===this.transport||n>0)&&this.triggerChanError(t)}triggerChanError(t){this.channels.forEach(e=>{e.isErrored()||e.isLeaving()||e.isClosed()||e.trigger(Ha.error,t)})}connectionState(){switch(this.conn&&this.conn.readyState){case Qs.connecting:return"connecting";case Qs.open:return"open";case Qs.closing:return"closing";default:return"closed"}}isConnected(){return this.connectionState()==="open"}remove(t){this.off(t.stateChangeRefs),this.channels=this.channels.filter(e=>e!==t)}off(t){for(let e in this.stateChangeCallbacks)this.stateChangeCallbacks[e]=this.stateChangeCallbacks[e].filter(([n])=>t.indexOf(n)===-1)}channel(t,e={}){let n=new _B(t,e,this);return this.channels.push(n),n}push(t){if(this.hasLogger()){let{topic:e,event:n,payload:r,ref:i,join_ref:s}=t;this.log("push",`${e} ${n} (${s}, ${i})`,r)}this.isConnected()?this.encode(t,e=>this.conn.send(e)):this.sendBuffer.push(()=>this.encode(t,e=>this.conn.send(e)))}makeRef(){let t=this.ref+1;return t===this.ref?this.ref=0:this.ref=t,this.ref.toString()}sendHeartbeat(){if(!this.isConnected()){try{this.heartbeatCallback("disconnected")}catch(t){this.log("error","error in heartbeat callback",t)}return}if(this.pendingHeartbeatRef){this.heartbeatTimeout();return}this.pendingHeartbeatRef=this.makeRef(),this.heartbeatSentAt=Date.now(),this.push({topic:"phoenix",event:"heartbeat",payload:{},ref:this.pendingHeartbeatRef});try{this.heartbeatCallback("sent")}catch(t){this.log("error","error in heartbeat callback",t)}this.heartbeatTimeoutTimer=setTimeout(()=>this.heartbeatTimeout(),this.heartbeatIntervalMs)}flushSendBuffer(){this.isConnected()&&this.sendBuffer.length>0&&(this.sendBuffer.forEach(t=>t()),this.sendBuffer=[])}onConnMessage(t){this.decode(t.data,e=>{let{topic:n,event:r,payload:i,ref:s,join_ref:a}=e;if(s&&s===this.pendingHeartbeatRef){const o=this.heartbeatSentAt?Date.now()-this.heartbeatSentAt:void 0;this.clearHeartbeats();try{this.heartbeatCallback(i.status==="ok"?"ok":"error",o)}catch(l){this.log("error","error in heartbeat callback",l)}this.pendingHeartbeatRef=null,this.heartbeatSentAt=null,this.autoSendHeartbeat&&(this.heartbeatTimer=setTimeout(()=>this.sendHeartbeat(),this.heartbeatIntervalMs))}this.hasLogger()&&this.log("receive",`${i.status||""} ${n} ${r} ${s&&"("+s+")"||""}`.trim(),i);for(let o=0;o<this.channels.length;o++){const l=this.channels[o];l.isMember(n,r,i,a)&&l.trigger(r,i,s,a)}this.triggerStateCallbacks("message",e)})}triggerStateCallbacks(t,...e){try{this.stateChangeCallbacks[t].forEach(([n,r])=>{try{r(...e)}catch(i){this.log("error",`error in ${t} callback`,i)}})}catch(n){this.log("error",`error triggering ${t} callbacks`,n)}}leaveOpenTopic(t){let e=this.channels.find(n=>n.topic===t&&(n.isJoined()||n.isJoining()));e&&(this.hasLogger()&&this.log("transport",`leaving duplicate topic "${t}"`),e.leave())}};class of{constructor(e,n){const r=AB(n);this.presence=new kB(e.getChannel(),r),this.presence.onJoin((i,s,a)=>{const o=of.onJoinPayload(i,s,a);e.getChannel().trigger("presence",o)}),this.presence.onLeave((i,s,a)=>{const o=of.onLeavePayload(i,s,a);e.getChannel().trigger("presence",o)}),this.presence.onSync(()=>{e.getChannel().trigger("presence",{event:"sync"})})}get state(){return of.transformState(this.presence.state)}static transformState(e){return e=NB(e),Object.getOwnPropertyNames(e).reduce((n,r)=>{const i=e[r];return n[r]=zg(i),n},{})}static onJoinPayload(e,n,r){const i=Hk(n),s=zg(r);return{event:"join",key:e,currentPresences:i,newPresences:s}}static onLeavePayload(e,n,r){const i=Hk(n),s=zg(r);return{event:"leave",key:e,currentPresences:i,leftPresences:s}}}function zg(t){return t.metas.map(e=>(e.presence_ref=e.phx_ref,delete e.phx_ref,delete e.phx_ref_prev,e))}function NB(t){return JSON.parse(JSON.stringify(t))}function AB(t){return(t==null?void 0:t.events)&&{events:t.events}}function Hk(t){return t!=null&&t.metas?zg(t):[]}var Wk;(function(t){t.SYNC="sync",t.JOIN="join",t.LEAVE="leave"})(Wk||(Wk={}));class CB{get state(){return this.presenceAdapter.state}constructor(e,n){this.channel=e,this.presenceAdapter=new of(this.channel.channelAdapter,n)}}function PB(t){if(t instanceof Error)return t;if(typeof t=="string")return new Error(t);if(t&&typeof t=="object"){const e=t;
366if(typeof e.code=="number"){const n=typeof e.reason=="string"&&e.reason?` (${e.reason})`:"";return new Error(`socket closed: ${e.code}${n}`,{cause:t})}return new Error("channel error: transport failure",{cause:t})}return new Error("channel error: connection lost")}class TB{constructor(e,n,r){const i=RB(r);this.channel=e.getSocket().channel(n,i),this.socket=e}get state(){return this.channel.state}set state(e){this.channel.state=e}get joinedOnce(){return this.channel.joinedOnce}get joinPush(){return this.channel.joinPush}get rejoinTimer(){return this.channel.rejoinTimer}on(e,n){return this.channel.on(e,n)}off(e,n){this.channel.off(e,n)}subscribe(e){return this.channel.join(e)}unsubscribe(e){return this.channel.leave(e)}teardown(){this.channel.teardown()}onClose(e){this.channel.onClose(e)}onError(e){return this.channel.onError(e)}push(e,n,r){let i;try{i=this.channel.push(e,n,r)}catch{throw new Error(`tried to push '${e}' to '${this.channel.topic}' before joining. Use channel.subscribe() before pushing events`)}if(this.channel.pushBuffer.length>lB){const s=this.channel.pushBuffer.shift();s.cancelTimeout(),this.socket.log("channel",`discarded push due to buffer overflow: ${s.event}`,s.payload())}return i}updateJoinPayload(e){const n=this.channel.joinPush.payload();this.channel.joinPush.payload=()=>Object.assign(Object.assign({},n),e)}canPush(){return this.socket.isConnected()&&this.state===$o.joined}isJoined(){return this.state===$o.joined}isJoining(){return this.state===$o.joining}isClosed(){return this.state===$o.closed}isLeaving(){return this.state===$o.leaving}updateFilterBindings(e){this.channel.filterBindings=e}updatePayloadTransform(e){this.channel.onMessage=e}getChannel(){return this.channel}}function RB(t){return{config:Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},t.config)}}const LB=/[,()"\\]/,jB=t=>LB.test(t)||t!==t.trim(),OB=t=>`"${t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`,Vk=t=>{const e=t===null?"null":String(t);return jB(e)?OB(e):e},IB=t=>t===null?"null":String(t),DB=(t,e)=>{if(t==="in"){const n=Array.isArray(e)?e:[e];if(n.length===0)throw new Error("Realtime `in` filter requires at least one value.");return`in.(${Array.from(new Set(n)).map(i=>Vk(i)).join(",")})`}return t==="is"?`is.${IB(e)}`:`${t}.${Vk(e)}`};class MB{constructor(){this.filters=[]}add(e,n,r,i=!1){const s=i?"not.":"";return this.filters.push(`${e}=${s}${DB(n,r)}`),this}eq(e,n){return this.add(e,"eq",n)}neq(e,n){return this.add(e,"neq",n)}gt(e,n){return this.add(e,"gt",n)}gte(e,n){return this.add(e,"gte",n)}lt(e,n){return this.add(e,"lt",n)}lte(e,n){return this.add(e,"lte",n)}in(e,n){return this.add(e,"in",n)}like(e,n){return this.add(e,"like",n)}ilike(e,n){return this.add(e,"ilike",n)}match(e,n){return this.add(e,"match",n)}imatch(e,n){return this.add(e,"imatch",n)}is(e,n){return this.add(e,"is",n)}isDistinct(e,n){return this.add(e,"isdistinct",n)}not(e,n,r){return this.add(e,n,r,!0)}build(){return this.filters.join(",")}toString(){return this.build()}}var Gk;(function(t){t.ALL="*",t.INSERT="INSERT",t.UPDATE="UPDATE",t.DELETE="DELETE"})(Gk||(Gk={}));var Lu;(function(t){t.BROADCAST="broadcast",t.PRESENCE="presence",t.POSTGRES_CHANGES="postgres_changes",t.SYSTEM="system"})(Lu||(Lu={}));var Wa;(function(t){t.SUBSCRIBED="SUBSCRIBED",t.TIMED_OUT="TIMED_OUT",t.CLOSED="CLOSED",t.CHANNEL_ERROR="CHANNEL_ERROR"})(Wa||(Wa={}));class lf{get state(){return this.channelAdapter.state}set state(e){this.channelAdapter.state=e}get joinedOnce(){return this.channelAdapter.joinedOnce}get timeout(){return this.socket.timeout}get joinPush(){return this.channelAdapter.joinPush}get rejoinTimer(){return this.channelAdapter.rejoinTimer}constructor(e,n={config:{}},r){var i,s;if(this.topic=e,this.params=n,this.socket=r,this.bindings={},this.subTopic=e.replace(/^realtime:/i,""),this.params.config=Object.assign({broadcast:{ack:!1,self:!1},presence:{key:"",enabled:!1},private:!1},n.config),this.channelAdapter=new TB(this.socket.socketAdapter,e,this.params),this.presence=new CB(this),this._onClose(()=>{this.socket._remove(this)}),this._updateFilterTransform(),this.broadcastEndpointURL=RT(this.socket.socketAdapter.endPointURL()),this.private=this.params.config.private||!1,!this.private&&(!((s=(i=this.params.config)===null||i===void 0?void 0:i.broadcast)===null||s===void 0)&&s.replay))throw new Error(`tried to use replay on public channel '${this.topic}'. It must be a private channel.`)}subscribe(e,n=this.timeout){var r,i,s;if(this.socket.isConnected()||this.socket.connect(),this.channelAdapter.isClosed()){const{config:{broadcast:a,presence:o,private:l}}=this.params,c=(i=(r=this.bindings.postgres_changes)===null||r===void 0?void 0:r.map(h=>h.filter))!==null&&i!==void 0?i:[],u=!!this.bindings[Lu.PRESENCE]&&this.bindings[Lu.PRESENCE].length>0||((s=this.params.config.presence)===null||s===void 0?void 0:s.enabled)===!0,d={},f={broadcast:a,presence:Object.assign(Object.assign({},o),{enabled:u}),postgres_changes:c,private:l};this.socket.accessTokenValue&&(d.access_token=this.socket.accessTokenValue),this._onError(h=>{e==null||e(Wa.CHANNEL_ERROR,PB(h))}),this._onClose(()=>e==null?void 0:e(Wa.CLOSED)),this.updateJoinPayload(Object.assign({config:f},d)),this._updateFilterMessage(),this.channelAdapter.subscribe(n).receive("ok",async({postgres_changes:h})=>{if(this.socket._isManualToken()||this.socket.setAuth(),h===void 0){e==null||e(Wa.SUBSCRIBED);return}this._updatePostgresBindings(h,e)}).receive("error",h=>{this.state=$o.errored;const y=Object.values(h).join(", ")||"error";e==null||e(Wa.CHANNEL_ERROR,new Error(y,{cause:h}))}).receive("timeout",()=>{e==null||e(Wa.TIMED_OUT)})}return this}_updatePostgresBindings(e,n){var r;const i=this.bindings.postgres_changes,s=(r=i==null?void 0:i.length)!==null&&r!==void 0?r:0,a=[];for(let o=0;o<s;o++){const l=i[o],{filter:{event:c,schema:u,table:d,filter:f}}=l,h=e&&e[o];if(h&&h.event===c&&lf.isFilterValueEqual(h.schema,u)&&lf.isFilterValueEqual(h.table,d)&&lf.isFilterValueEqual(h.filter,f))a.push(Object.assign(Object.assign({},l),{id:h.id}));else{this.unsubscribe(),this.state=$o.errored,n==null||n(Wa.CHANNEL_ERROR,new Error("mismatch between server and client bindings for postgres changes"));return}}this.bindings.postgres_changes=a,this.state!=$o.errored&&n&&n(Wa.SUBSCRIBED)}presenceState(){return this.presence.state}async track(e,n={}){return await this.send({type:"presence",event:"track",payload:e},n)}async untrack(e={}){return await this.send({type:"presence",event:"untrack"},e)}on(e,n,r){const i=this.channelAdapter.isJoined()||this.channelAdapter.isJoining(),s=e===Lu.PRESENCE||e===Lu.POSTGRES_CHANGES;if(i&&s)throw this.socket.log("channel",`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`),new Error(`cannot add \`${e}\` callbacks for ${this.topic} after \`subscribe()\`.`);return this._on(e,n,r)}async httpSend(e,n,r={}){var i;if(n==null)return Promise.reject(new Error("Payload is required for httpSend()"));const s=n instanceof ArrayBuffer||ArrayBuffer.isView(n),a={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":s?"application/octet-stream":"application/json"};this.socket.accessTokenValue&&(a.Authorization=`Bearer ${this.socket.accessTokenValue}`);const o=new URL(this.broadcastEndpointURL);o.pathname+=`/${encodeURIComponent(this.subTopic)}/events/${encodeURIComponent(e)}`,this.private&&o.searchParams.set("private","true");const l={method:"POST",headers:a,body:s?n:JSON.stringify(n)},c=await this._fetchWithTimeout(o.toString(),l,(i=r.timeout)!==null&&i!==void 0?i:this.timeout);if(c.status===202)return{success:!0};if(c.status===404)return Promise.reject(new Error("httpSend() requires Realtime server v2.97.0 or newer; the endpoint returned 404. Update your Supabase CLI to a recent version, or upgrade the Realtime server in your self-hosted setup. See https://github.com/supabase/supabase-js/blob/master/packages/core/realt
366ime-js/migrations/httpsend-server-version.md"));let u=c.statusText;try{const d=await c.json();u=d.error||d.message||u}catch{}return Promise.reject(new Error(u))}async send(e,n={}){var r,i;if(!this.channelAdapter.canPush()&&e.type==="broadcast"){console.warn("Realtime send() is automatically falling back to REST API. This behavior will be deprecated in the future. Please use httpSend() explicitly for REST delivery.");const{event:s,payload:a}=e,o={apikey:this.socket.apiKey?this.socket.apiKey:"","Content-Type":"application/json"};this.socket.accessTokenValue&&(o.Authorization=`Bearer ${this.socket.accessTokenValue}`);const l={method:"POST",headers:o,body:JSON.stringify({messages:[{topic:this.subTopic,event:s,payload:a,private:this.private}]})};try{const c=await this._fetchWithTimeout(this.broadcastEndpointURL,l,(r=n.timeout)!==null&&r!==void 0?r:this.timeout);return await((i=c.body)===null||i===void 0?void 0:i.cancel()),c.ok?"ok":"error"}catch(c){return c instanceof Error&&c.name==="AbortError"?"timed out":"error"}}else return new Promise(s=>{var a,o,l;const c=this.channelAdapter.push(e.type,e,n.timeout||this.timeout);e.type==="broadcast"&&!(!((l=(o=(a=this.params)===null||a===void 0?void 0:a.config)===null||o===void 0?void 0:o.broadcast)===null||l===void 0)&&l.ack)&&s("ok"),c.receive("ok",()=>s("ok")),c.receive("error",()=>s("error")),c.receive("timeout",()=>s("timed out"))})}updateJoinPayload(e){this.channelAdapter.updateJoinPayload(e)}async unsubscribe(e=this.timeout){return new Promise(n=>{this.channelAdapter.unsubscribe(e).receive("ok",()=>n("ok")).receive("timeout",()=>n("timed out")).receive("error",()=>n("error"))})}teardown(){this.channelAdapter.teardown()}async _fetchWithTimeout(e,n,r){const i=new AbortController,s=setTimeout(()=>i.abort(),r),a=await this.socket.fetch(e,Object.assign(Object.assign({},n),{signal:i.signal}));return clearTimeout(s),a}_on(e,n,r){const i=e.toLocaleLowerCase(),s=n==null?void 0:n.filter;(s instanceof MB||typeof s=="object"&&s!==null&&typeof s.build=="function")&&(n=Object.assign(Object.assign({},n),{filter:s.build()}));const a=this.channelAdapter.on(e,r),o={type:i,filter:n,callback:r,ref:a};return this.bindings[i]?this.bindings[i].push(o):this.bindings[i]=[o],this._updateFilterMessage(),this}_onClose(e){this.channelAdapter.onClose(e)}_onError(e){this.channelAdapter.onError(e)}_updateFilterMessage(){this.channelAdapter.updateFilterBindings((e,n,r)=>{var i,s,a,o,l,c,u;const d=e.event.toLocaleLowerCase();if(this._notThisChannelEvent(d,r))return!1;const f=(i=this.bindings[d])===null||i===void 0?void 0:i.find(h=>h.ref===e.ref);if(!f)return!0;if(["broadcast","presence","postgres_changes"].includes(d))if("id"in f){const h=f.id,y=(s=f.filter)===null||s===void 0?void 0:s.event;return h&&((a=n.ids)===null||a===void 0?void 0:a.includes(h))&&(y==="*"||(y==null?void 0:y.toLocaleLowerCase())===((o=n.data)===null||o===void 0?void 0:o.type.toLocaleLowerCase()))}else{const h=(c=(l=f==null?void 0:f.filter)===null||l===void 0?void 0:l.event)===null||c===void 0?void 0:c.toLocaleLowerCase();return h==="*"||h===((u=n==null?void 0:n.event)===null||u===void 0?void 0:u.toLocaleLowerCase())}else return f.type.toLocaleLowerCase()===d})}_notThisChannelEvent(e,n){const{close:r,error:i,leave:s,join:a}=PT;return n&&[r,i,s,a].includes(e)&&n!==this.joinPush.ref}_updateFilterTransform(){this.channelAdapter.updatePayloadTransform((e,n,r)=>{if(typeof n=="object"&&"ids"in n){const i=n.data,{schema:s,table:a,commit_timestamp:o,type:l,errors:c}=i;return Object.assign(Object.assign({},{schema:s,table:a,commit_timestamp:o,eventType:l,new:{},old:{},errors:c}),this._getPayloadRecords(i))}return n})}copyBindings(e){if(this.joinedOnce)throw new Error("cannot copy bindings into joined channel");for(const n in e.bindings)for(const r of e.bindings[n])this._on(r.type,r.filter,r.callback)}static isFilterValueEqual(e,n){return(e??void 0)===(n??void 0)}_getPayloadRecords(e){const n={new:{},old:{}};return(e.type==="INSERT"||e.type==="UPDATE")&&(n.new=qk(e.columns,e.record)),(e.type==="UPDATE"||e.type==="DELETE")&&(n.old=qk(e.columns,e.old_record)),n}}class FB{constructor(e,n){this.socket=new EB(e,n)}get timeout(){return this.socket.timeout}get endPoint(){return this.socket.endPoint}get transport(){return this.socket.transport}get heartbeatIntervalMs(){return this.socket.heartbeatIntervalMs}get heartbeatCallback(){return this.socket.heartbeatCallback}set heartbeatCallback(e){this.socket.heartbeatCallback=e}get heartbeatTimer(){return this.socket.heartbeatTimer}get pendingHeartbeatRef(){return this.socket.pendingHeartbeatRef}get reconnectTimer(){return this.socket.reconnectTimer}get vsn(){return this.socket.vsn}get encode(){return this.socket.encode}get decode(){return this.socket.decode}get reconnectAfterMs(){return this.socket.reconnectAfterMs}get sendBuffer(){return this.socket.sendBuffer}get stateChangeCallbacks(){return this.socket.stateChangeCallbacks}connect(){this.socket.connect()}disconnect(e,n,r,i=1e4){return new Promise(s=>{setTimeout(()=>s("timeout"),i),this.socket.disconnect(()=>{e(),s("ok")},n,r)})}push(e){this.socket.push(e)}log(e,n,r){this.socket.log(e,n,r)}makeRef(){return this.socket.makeRef()}onOpen(e){this.socket.onOpen(e)}onClose(e){this.socket.onClose(e)}onError(e){this.socket.onError(e)}onMessage(e){this.socket.onMessage(e)}isConnected(){return this.socket.isConnected()}isConnecting(){return this.socket.connectionState()==$w.connecting}isDisconnecting(){return this.socket.connectionState()==$w.closing}connectionState(){return this.socket.connectionState()}endPointURL(){return this.socket.endPointURL()}sendHeartbeat(){this.socket.sendHeartbeat()}getSocket(){return this.socket}}const Kk={HEARTBEAT_INTERVAL:25e3,RECONNECT_DELAY:10,HEARTBEAT_TIMEOUT_FALLBACK:100},zB=[1e3,2e3,5e3,1e4],$B=1e4;function UB(){const t=new Map;return{get length(){return t.size},clear(){t.clear()},getItem(e){return t.has(e)?t.get(e):null},key(e){var n;return(n=Array.from(t.keys())[e])!==null&&n!==void 0?n:null},removeItem(e){t.delete(e)},setItem(e,n){t.set(e,String(n))}}}function BB(){try{if(typeof globalThis<"u"&&globalThis.sessionStorage)return globalThis.sessionStorage}catch{}return UB()}const qB=` 367 addEventListener("message", (e) => { 368 if (e.data.event === "start") { 369 setInterval(() => postMessage({ event: "keepAlive" }), e.data.interval); 370 } 371 });`;class HB{get endPoint(){return this.socketAdapter.endPoint}get timeout(){return this.socketAdapter.timeout}get transport(){return this.socketAdapter.transport}get heartbeatCallback(){return this.socketAdapter.heartbeatCallback}get heartbeatIntervalMs(){return this.socketAdapter.heartbeatIntervalMs}get heartbeatTimer(){return this.worker?this._workerHeartbeatTimer:this.socketAdapter.heartbeatTimer}get pendingHeartbeatRef(){return this.worker?this._pendingWorkerHeartbeatRef:this.socketAdapter.pendingHeartbeatRef}get reconnectTimer(){return this.socketAdapter.reconnectTimer}get vsn(){return this.socketAdapter.vsn}get encode(){return this.socketAdapter.encode}get decode(){return this.socketAdapter.decode}get reconnectAfterMs(){return this.socketAdapter.reconnectAfterMs}get sendBuffer(){return this.socketAdapter.sendBuffer}get stateChangeCallbacks(){return this.socketAdapter.stateChangeCallbacks}constructor(e,n){var r;if(this.channels=new Array,this.accessTokenValue=null,this.accessToken=null,this.apiKey=null,this.httpEndpoint="",this.headers={},this.params={}
371,this.ref=0,this.serializer=new cB,this._manuallySetToken=!1,this._authPromise=null,this._workerHeartbeatTimer=void 0,this._pendingWorkerHeartbeatRef=null,this._pendingDisconnectTimer=null,this._disconnectOnEmptyChannelsAfterMs=0,this._resolveFetch=s=>s?(...a)=>s(...a):(...a)=>fetch(...a),!(!((r=n==null?void 0:n.params)===null||r===void 0)&&r.apikey))throw new Error("API key is required to connect to Realtime");this.apiKey=n.params.apikey;const i=this._initializeOptions(n);this.socketAdapter=new FB(e,i),this.httpEndpoint=RT(e),this.fetch=this._resolveFetch(n==null?void 0:n.fetch)}connect(){if(!(this.isConnecting()||this.isDisconnecting()||this.isConnected())){this.accessToken&&!this._authPromise&&this._setAuthSafely("connect"),this._setupConnectionHandlers();try{this.socketAdapter.connect()}catch(e){const n=e.message;throw new Error(`WebSocket not available: ${n}`)}this._handleNodeJsRaceCondition()}}endpointURL(){return this.socketAdapter.endPointURL()}async disconnect(e,n){return this._cancelPendingDisconnect(),this.isDisconnecting()?"ok":await this.socketAdapter.disconnect(()=>{clearInterval(this._workerHeartbeatTimer),this._terminateWorker()},e,n)}getChannels(){return this.channels}async removeChannel(e){const n=await e.unsubscribe();return n==="ok"&&e.teardown(),n}async removeAllChannels(){const e=this.channels.map(async r=>{const i=await r.unsubscribe();return r.teardown(),i}),n=await Promise.all(e);return await this.disconnect(),n}log(e,n,r){this.socketAdapter.log(e,n,r)}connectionState(){return this.socketAdapter.connectionState()||$w.closed}isConnected(){return this.socketAdapter.isConnected()}isConnecting(){return this.socketAdapter.isConnecting()}isDisconnecting(){return this.socketAdapter.isDisconnecting()}channel(e,n={config:{}}){const r=`realtime:${e}`,i=this.getChannels().find(s=>s.topic===r);if(i)return i;{const s=new lf(`realtime:${e}`,n,this);return this._cancelPendingDisconnect(),this.channels.push(s),s}}push(e){this.socketAdapter.push(e)}async setAuth(e=null){this._authPromise=this._performAuth(e);try{await this._authPromise}finally{this._authPromise=null}}_isManualToken(){return this._manuallySetToken}async sendHeartbeat(){this.socketAdapter.sendHeartbeat()}onHeartbeat(e){this.socketAdapter.heartbeatCallback=this._wrapHeartbeatCallback(e)}_makeRef(){return this.socketAdapter.makeRef()}_remove(e){this.channels=this.channels.filter(n=>n.topic!==e.topic),this.channels.length===0&&(this.log("transport","no channels remaining, scheduling disconnect"),this._schedulePendingDisconnect())}_schedulePendingDisconnect(){if(this._cancelPendingDisconnect(),this._disconnectOnEmptyChannelsAfterMs===0){this.log("transport","disconnecting immediately - no channels"),this.disconnect();return}
371this._pendingDisconnectTimer=setTimeout(()=>{this._pendingDisconnectTimer=null,this.channels.length===0&&(this.log("transport","deferred disconnect fired - no channels, disconnecting"),this.disconnect())},this._disconnectOnEmptyChannelsAfterMs),this.log("transport",`deferred disconnect scheduled in ${this._disconnectOnEmptyChannelsAfterMs}ms`)}_cancelPendingDisconnect(){this._pendingDisconnectTimer!==null&&(this.log("transport","pending disconnect cancelled - channel activity detected"),clearTimeout(this._pendingDisconnectTimer),this._pendingDisconnectTimer=null)}async _performAuth(e=null){let n,r=!1;if(e)n=e,r=!0;else if(this.accessToken)try{n=await this.accessToken()}catch(i){this.log("error","Error fetching access token from callback",i),n=this.accessTokenValue}else n=this.accessTokenValue;r?this._manuallySetToken=!0:this.accessToken&&(this._manuallySetToken=!1),this.accessTokenValue!=n&&(this.accessTokenValue=n,this.channels.forEach(i=>{const s={access_token:n,version:iB};n&&i.updateJoinPayload(s),i.joinedOnce&&i.channelAdapter.isJoined()&&i.channelAdapter.push(PT.access_token,{access_token:n})}))}async _waitForAuthIfNeeded(){this._authPromise&&await this._authPromise}_setAuthSafely(e="general"){this._isManualToken()||this.setAuth().catch(n=>{this.log("error",`Error setting auth in ${e}`,n)})}_setupConnectionHandlers(){this.socketAdapter.onOpen(()=>{(this._authPromise||(this.accessToken&&!this.accessTokenValue?this.setAuth():Promise.resolve())).catch(n=>{this.log("error","error waiting for auth on connect",n)}),this.worker&&!this.workerRef&&this._startWorkerHeartbeat()}),this.socketAdapter.onClose(()=>{this.worker&&this.workerRef&&this._terminateWorker()}),this.socketAdapter.onMessage(e=>{e.ref&&e.ref===this._pendingWorkerHeartbeatRef&&(this._pendingWorkerHeartbeatRef=null)})}_handleNodeJsRaceCondition(){this.socketAdapter.isConnected()&&this.socketAdapter.getSocket().onConnOpen()}_wrapHeartbeatCallback(e){return(n,r)=>{n!=="disconnected"&&(n=="sent"&&this._setAuthSafely(),e&&e(n,r))}}_startWorkerHeartbeat(){this.workerUrl?this.log("worker",`starting worker for from ${this.workerUrl}`):this.log("worker","starting default worker");const e=this._workerObjectUrl(this.workerUrl);this.workerRef=new Worker(e),this.workerRef.onerror=n=>{this.log("worker","worker error",n.message),this._terminateWorker(),this.disconnect()},this.workerRef.onmessage=n=>{n.data.event==="keepAlive"&&this.sendHeartbeat()},this.workerRef.postMessage({event:"start",interval:this.heartbeatIntervalMs})}_terminateWorker(){this.workerRef&&(this.log("worker","terminating worker"),this.workerRef.terminate(),this.workerRef=void 0)}_workerObjectUrl(e){let n;if(e)n=e;else{const r=new Blob([qB],{type:"application/javascript"});n=URL.createObjectURL(r)}return n}_initializeOptions(e){var n,r,i,s,a,o,l,c,u,d,f,h;this.worker=(n=e==null?void 0:e.worker)!==null&&n!==void 0?n:!1,this.accessToken=(r=e==null?void 0:e.accessToken)!==null&&r!==void 0?r:null;const y={};y.timeout=(i=e==null?void 0:e.timeout)!==null&&i!==void 0?i:oB,y.heartbeatIntervalMs=(s=e==null?void 0:e.heartbeatIntervalMs)!==null&&s!==void 0?s:Kk.HEARTBEAT_INTERVAL,this._disconnectOnEmptyChannelsAfterMs=(a=e==null?void 0:e.disconnectOnEmptyChannelsAfterMs)!==null&&a!==void 0?a:2*((o=e==null?void 0:e.heartbeatIntervalMs)!==null&&o!==void 0?o:Kk.HEARTBEAT_INTERVAL),y.transport=(l=e==null?void 0:e.transport)!==null&&l!==void 0?l:nB.getWebSocketConstructor(),y.params=e==null?void 0:e.params,y.logger=e==null?void 0:e.logger,y.heartbeatCallback=this._wrapHeartbeatCallback(e==null?void 0:e.heartbeatCallback),y.sessionStorage=(c=e==null?void 0:e.sessionStorage)!==null&&c!==void 0?c:BB(),y.reconnectAfterMs=(u=e==null?void 0:e.reconnectAfterMs)!==null&&u!==void 0?u:x=>zB[x-1]||$B;let v,_;const w=(d=e==null?void 0:e.vsn)!==null&&d!==void 0?d:aB;switch(w){case sB:v=(x,k)=>k(JSON.stringify(x)),_=(x,k)=>k(JSON.parse(x));break;case CT:v=this.serializer.encode.bind(this.serializer),_=this.serializer.decode.bind(this.serializer);break;default:throw new Error(`Unsupported serializer version: ${y.vsn}`)}if(y.vsn=w,y.encode=(f=e==null?void 0:e.encode)!==null&&f!==void 0?f:v,y.decode=(h=e==null?void 0:e.decode)!==null&&h!==void 0?h:_,y.beforeReconnect=this._reconnectAuth.bind(this),(e!=null&&e.logLevel||e!=null&&e.log_level)&&(this.logLevel=e.logLevel||e.log_level,y.params=Object.assign(Object.assign({},y.params),{log_level:this.logLevel})),this.worker){if(typeof window<"u"&&!window.Worker)throw new Error("Web Worker is not supported");this.workerUrl=e==null?void 0:e.workerUrl,y.autoSendHeartbeat=!this.worker}return y}async _reconnectAuth(){await this._waitForAuthIfNeeded(),this.isConnected()||this.connect()}}
371var Hf=class extends Error{constructor(t,e){var n;super(t),this.name="IcebergError",this.status=e.status,this.icebergType=e.icebergType,this.icebergCode=e.icebergCode,this.details=e.details,this.isCommitStateUnknown=e.icebergType==="CommitStateUnknownException"||[500,502,504].includes(e.status)&&((n=e.icebergType)==null?void 0:n.includes("CommitState"))===!0}isNotFound(){return this.status===404}isConflict(){return this.status===409}isAuthenticationTimeout(){return this.status===419}};function WB(t,e,n){const r=new URL(e,t);if(n)for(const[i,s]of Object.entries(n))s!==void 0&&r.searchParams.set(i,s);return r.toString()}async function VB(t){return!t||t.type==="none"?{}:t.type==="bearer"?{Authorization:`Bearer ${t.token}`}:t.type==="header"?{[t.name]:t.value}:t.type==="custom"?await t.getHeaders():{}}function GB(t){const e=t.fetchImpl??globalThis.fetch;return{async request({method:n,path:r,query:i,body:s,headers:a}){const o=WB(t.baseUrl,r,i),l=await VB(t.auth),c=await e(o,{method:n,headers:{...s?{"Content-Type":"application/json"}:{},...l,...a},body:s?JSON.stringify(s):void 0}),u=await c.text(),d=(c.headers.get("content-type")||"").includes("application/json"),f=d&&u?JSON.parse(u):u;if(!c.ok){const h=d?f:void 0,y=h==null?void 0:h.error;throw new Hf((y==null?void 0:y.message)??`Request failed with status ${c.status}`,{status:c.status,icebergType:y==null?void 0:y.type,icebergCode:y==null?void 0:y.code,details:h})}return{status:c.status,headers:c.headers,data:f}}}}function tg(t){return t.join("�")}var KB=class{constructor(t,e=""){this.client=t,this.prefix=e}async listNamespaces(t){const e=t?{parent:tg(t.namespace)}:void 0;return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces`,query:e})).data.namespaces.map(r=>({namespace:r}))}async createNamespace(t,e){const n={namespace:t.namespace,properties:e==null?void 0:e.properties};return(await this.client.request({method:"POST",path:`${this.prefix}/namespaces`,body:n})).data}async dropNamespace(t){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${tg(t.namespace)}`})}async loadNamespaceMetadata(t){return{properties:(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${tg(t.namespace)}`})).data.properties}}async namespaceExists(t){try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${tg(t.namespace)}`}),!0}catch(e){if(e instanceof Hf&&e.status===404)return!1;throw e}}async createNamespaceIfNotExists(t,e){try{return await this.createNamespace(t,e)}catch(n){if(n instanceof Hf&&n.status===409)return;throw n}}};function ru(t){return t.join("�")}var ZB=class{constructor(t,e="",n){this.client=t,this.prefix=e,this.accessDelegation=n}async listTables(t){return(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ru(t.namespace)}/tables`})).data.identifiers}async createTable(t,e){const n={};return this.accessDelegation&&(n["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ru(t.namespace)}/tables`,body:e,headers:n})).data.metadata}async updateTable(t,e){const n=await this.client.request({method:"POST",path:`${this.prefix}/namespaces/${ru(t.namespace)}/tables/${t.name}`,body:e});return{"metadata-location":n.data["metadata-location"],metadata:n.data.metadata}}async dropTable(t,e){await this.client.request({method:"DELETE",path:`${this.prefix}/namespaces/${ru(t.namespace)}/tables/${t.name}`,query:{purgeRequested:String((e==null?void 0:e.purge)??!1)}})}async loadTable(t){const e={};return this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation),(await this.client.request({method:"GET",path:`${this.prefix}/namespaces/${ru(t.namespace)}/tables/${t.name}`,headers:e})).data.metadata}async tableExists(t){const e={};this.accessDelegation&&(e["X-Iceberg-Access-Delegation"]=this.accessDelegation);try{return await this.client.request({method:"HEAD",path:`${this.prefix}/namespaces/${ru(t.namespace)}/tables/${t.name}`,headers:e}),!0}catch(n){if(n instanceof Hf&&n.status===404)return!1;throw n}}async createTableIfNotExists(t,e){try{return await this.createTable(t,e)}catch(n){if(n instanceof Hf&&n.status===409)return await this.loadTable({namespace:t.namespace,name:e.name});throw n}}},YB=class{constructor(t){var r;let e="v1";t.catalogName&&(e+=`/${t.catalogName}`);const n=t.baseUrl.endsWith("/")?t.baseUrl:`${t.baseUrl}/`;this.client=GB({baseUrl:n,auth:t.auth,fetchImpl:t.fetch}),this.accessDelegation=(r=t.accessDelegation)==null?void 0:r.join(","),this.namespaceOps=new KB(this.client,e),this.tableOps=new ZB(this.client,e,this.accessDelegation)}async listNamespaces(t){return this.namespaceOps.listNamespaces(t)}async createNamespace(t,e){return this.namespaceOps.createNamespace(t,e)}async dropNamespace(t){await this.namespaceOps.dropNamespace(t)}async loadNamespaceMetadata(t){return this.namespaceOps.loadNamespaceMetadata(t)}async listTables(t){return this.tableOps.listTables(t)}
371async createTable(t,e){return this.tableOps.createTable(t,e)}async updateTable(t,e){return this.tableOps.updateTable(t,e)}async dropTable(t,e){await this.tableOps.dropTable(t,e)}async loadTable(t){return this.tableOps.loadTable(t)}async namespaceExists(t){return this.namespaceOps.namespaceExists(t)}async tableExists(t){return this.tableOps.tableExists(t)}async createNamespaceIfNotExists(t,e){return this.namespaceOps.createNamespaceIfNotExists(t,e)}async createTableIfNotExists(t,e){return this.tableOps.createTableIfNotExists(t,e)}};function Wf(t){"@babel/helpers - typeof";return Wf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wf(t)}function JB(t,e){if(Wf(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Wf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function XB(t){var e=JB(t,"string");return Wf(e)=="symbol"?e:e+""}function QB(t,e,n){return(e=XB(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zk(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function lt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Zk(Object(n),!0).forEach(function(r){QB(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Zk(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var Wv=class extends Error{constructor(t,e="storage",n,r){super(t),this.__isStorageError=!0,this.namespace=e,this.name=e==="vectors"?"StorageVectorsError":"StorageError",this.status=n,this.statusCode=r}toJSON(){return{name:this.name,message:this.message,status:this.status,statusCode:this.statusCode}}};function Vv(t){return typeof t=="object"&&t!==null&&"__isStorageError"in t}var Hw=class extends Wv{constructor(t,e,n,r="storage"){super(t,r,e,n),this.name=r==="vectors"?"StorageVectorsApiError":"StorageApiError",this.status=e,this.statusCode=n}toJSON(){return lt({},super.toJSON())}},jT=class extends Wv{constructor(t,e,n="storage"){super(t,n),this.name=n==="vectors"?"StorageVectorsUnknownError":"StorageUnknownError",this.originalError=e}};function j0(t,e,n){const r=lt({},t),i=e.toLowerCase();for(const s of Object.keys(r))s.toLowerCase()===i&&delete r[s];return r[i]=n,r}function eq(t){const e={};for(const[n,r]of Object.entries(t))e[n.toLowerCase()]=r;return e}const tq=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),nq=t=>{if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)},Ww=t=>{if(Array.isArray(t))return t.map(n=>Ww(n));if(typeof t=="function"||t!==Object(t))return t;const e={};return Object.entries(t).forEach(([n,r])=>{const i=n.replace(/([-_][a-z])/gi,s=>s.toUpperCase().replace(/[-_]/g,""));e[i]=Ww(r)}),e},rq=t=>!t||typeof t!="string"||t.length===0||t.length>100||t.trim()!==t||t.includes("/")||t.includes("\\")?!1:/^[\w!.\*'() &$@=;:+,?-]+$/.test(t),Yk=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error;if(typeof e.error=="object"&&e.error!==null){const n=e.error;if(typeof n.message=="string")return n.message}}return JSON.stringify(t)},iq=async(t,e,n,r)=>{if(t!==null&&typeof t=="object"&&"json"in t&&typeof t.json=="function"){const i=t;let s=parseInt(String(i.status),10);Number.isFinite(s)||(s=500),i.json().then(a=>{const o=(a==null?void 0:a.statusCode)||(a==null?void 0:a.code)||s+"";e(new Hw(Yk(a),s,o,r))}).catch(()=>{const a=s+"";e(new Hw(i.statusText||`HTTP ${s} error`,s,a,r))})}else e(new jT(Yk(t),t,r))},sq=(t,e,n,r)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};if(t==="GET"||t==="HEAD"||!r)return lt(lt({},i),n);if(nq(r)){var s;const a=(e==null?void 0:e.headers)||{};let o;for(const[l,c]of Object.entries(a))l.toLowerCase()==="content-type"&&(o=c);i.headers=j0(a,"Content-Type",(s=o)!==null&&s!==void 0?s:"application/json"),i.body=JSON.stringify(r)}else i.body=r;return e!=null&&e.duplex&&(i.duplex=e.duplex),lt(lt({},i),n)};async function Ch(t,e,n,r,i,s,a){return new Promise((o,l)=>{t(n,sq(e,r,i,s)).then(c=>{if(!c.ok)throw c;if(r!=null&&r.noResolveJson)return c;if(a==="vectors"){const u=c.headers.get("content-type");if(c.headers.get("content-length")==="0"||c.status===204)return{};if(!u||!u.includes("application/json"))return{}}return c.json()}).then(c=>o(c)).catch(c=>iq(c,l,r,a))})}function OT(t="storage"){return{get:async(e,n,r,i)=>Ch(e,"GET",n,r,i,void 0,t),post:async(e,n,r,i,s)=>Ch(e,"POST",n,i,s,r,t),put:async(e,n,r,i,s)=>Ch(e,"PUT",n,i,s,r,t),head:async(e,n,r,i)=>Ch(e,"HEAD",n,lt(lt({},r),{},{noResolveJson:!0}),i,void 0,t),remove:async(e,n,r,i,s)=>Ch(e,"DELETE",n,i,s,r,t)}}const aq=OT("storage"),{get:Vf,post:ys,put:Vw,head:oq,remove:Gf}=aq,Ai=OT("vectors");var Fd=class{constructor(t,e={},n,r="storage"){this.shouldThrowOnError=!1,this.url=t,this.headers=eq(e),this.fetch=tq(n),this.namespace=r}throwOnError(){return this.shouldThrowOnError=!0,this}setHeader(t,e){return this.headers=j0(this.headers,t,e),this}async handleOperation(t){var e=this;try{return{data:await t(),error:null}}catch(n){if(e.shouldThrowOnError)throw n;if(Vv(n))return{data:null,error:n};throw n}}};let IT;IT=Symbol.toStringTag;var lq=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[IT]="StreamDownloadBuilder",this.promise=null}
371then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:(await t.downloadFn()).body,error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Vv(e))return{data:null,error:e};throw e}}};let DT;DT=Symbol.toStringTag;var cq=class{constructor(t,e){this.downloadFn=t,this.shouldThrowOnError=e,this[DT]="BlobDownloadBuilder",this.promise=null}asStream(){return new lq(this.downloadFn,this.shouldThrowOnError)}then(t,e){return this.getPromise().then(t,e)}catch(t){return this.getPromise().catch(t)}finally(t){return this.getPromise().finally(t)}getPromise(){return this.promise||(this.promise=this.execute()),this.promise}async execute(){var t=this;try{return{data:await(await t.downloadFn()).blob(),error:null}}catch(e){if(t.shouldThrowOnError)throw e;if(Vv(e))return{data:null,error:e};throw e}}};const Ly={limit:100,offset:0,sortBy:{column:"name",order:"asc"}},Jk={cacheControl:"3600",contentType:"text/plain;charset=UTF-8",upsert:!1};var uq=class extends Fd{constructor(t,e={},n,r){super(t,e,r,"storage"),this.bucketId=n}async uploadOrUpdate(t,e,n,r){var i=this;return i.handleOperation(async()=>{let s;const a=lt(lt({},Jk),r);let o=lt(lt({},i.headers),t==="POST"&&{"x-upsert":String(a.upsert)});const l=a.metadata;if(typeof Blob<"u"&&n instanceof Blob?(s=new FormData,s.append("cacheControl",a.cacheControl),l&&s.append("metadata",i.encodeMetadata(l)),s.append("",n)):typeof FormData<"u"&&n instanceof FormData?(s=n,s.has("cacheControl")||s.append("cacheControl",a.cacheControl),l&&!s.has("metadata")&&s.append("metadata",i.encodeMetadata(l))):(s=n,o["cache-control"]=`max-age=${a.cacheControl}`,o["content-type"]=a.contentType,l&&(o["x-metadata"]=i.toBase64(i.encodeMetadata(l))),(typeof ReadableStream<"u"&&s instanceof ReadableStream||s&&typeof s=="object"&&"pipe"in s&&typeof s.pipe=="function")&&!a.duplex&&(a.duplex="half")),r!=null&&r.headers)for(const[f,h]of Object.entries(r.headers))o=j0(o,f,h);const c=i._removeEmptyFolders(e),u=i._getFinalPath(c),d=await(t=="PUT"?Vw:ys)(i.fetch,`${i.url}/object/${u}`,s,lt({headers:o},a!=null&&a.duplex?{duplex:a.duplex}:{}));return{path:c,id:d.Id,fullPath:d.Key}})}async upload(t,e,n){return this.uploadOrUpdate("POST",t,e,n)}async uploadToSignedUrl(t,e,n,r){var i=this;const s=i._removeEmptyFolders(t),a=i._getFinalPath(s),o=new URL(i.url+`/object/upload/sign/${a}`);return o.searchParams.set("token",e),i.handleOperation(async()=>{let l;const c=lt(lt({},Jk),r);let u=lt(lt({},i.headers),{"x-upsert":String(c.upsert)});const d=c.metadata;if(typeof Blob<"u"&&n instanceof Blob?(l=new FormData,l.append("cacheControl",c.cacheControl),d&&l.append("metadata",i.encodeMetadata(d)),l.append("",n)):typeof FormData<"u"&&n instanceof FormData?(l=n,l.has("cacheControl")||l.append("cacheControl",c.cacheControl),d&&!l.has("metadata")&&l.append("metadata",i.encodeMetadata(d))):(l=n,u["cache-control"]=`max-age=${c.cacheControl}`,u["content-type"]=c.contentType,d&&(u["x-metadata"]=i.toBase64(i.encodeMetadata(d))),(typeof ReadableStream<"u"&&l instanceof ReadableStream||l&&typeof l=="object"&&"pipe"in l&&typeof l.pipe=="function")&&!c.duplex&&(c.duplex="half")),r!=null&&r.headers)for(const[f,h]of Object.entries(r.headers))u=j0(u,f,h);return{path:s,fullPath:(await Vw(i.fetch,o.toString(),l,lt({headers:u},c!=null&&c.duplex?{duplex:c.duplex}:{}))).Key}})}async createSignedUploadUrl(t,e){var n=this;return n.handleOperation(async()=>{let r=n._getFinalPath(t);const i=lt({},n.headers);e!=null&&e.upsert&&(i["x-upsert"]="true");const s=await ys(n.fetch,`${n.url}/object/upload/sign/${r}`,{},{headers:i}),a=new URL(n.url+s.url),o=a.searchParams.get("token");if(!o)throw new Wv("No token returned by API");return{signedUrl:a.toString(),path:t,token:o}})}async update(t,e,n){return this.uploadOrUpdate("PUT",t,e,n)}async move(t,e,n){var r=this;return r.handleOperation(async()=>await ys(r.fetch,`${r.url}/object/move`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers}))}async copy(t,e,n){var r=this;return r.handleOperation(async()=>({path:(await ys(r.fetch,`${r.url}/object/copy`,{bucketId:r.bucketId,sourceKey:t,destinationKey:e,destinationBucket:n==null?void 0:n.destinationBucket},{headers:r.headers})).Key}))}async createSignedUrl(t,e,n){var r=this;return r.handleOperation(async()=>{let i=r._getFinalPath(t);const s=typeof(n==null?void 0:n.transform)=="object"&&n.transform!==null&&Object.keys(n.transform).length>0;let a=await ys(r.fetch,`${r.url}/object/sign/${i}
371`,lt({expiresIn:e},s?{transform:n.transform}:{}),{headers:r.headers});const o=new URLSearchParams;n!=null&&n.download&&o.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&o.set("cacheNonce",String(n.cacheNonce));const l=o.toString();return{signedUrl:encodeURI(`${r.url}${a.signedURL}${l?`&${l}`:""}`)}})}async createSignedUrls(t,e,n){var r=this;return r.handleOperation(async()=>{const i=await ys(r.fetch,`${r.url}/object/sign/${r.bucketId}`,{expiresIn:e,paths:t},{headers:r.headers}),s=new URLSearchParams;n!=null&&n.download&&s.set("download",n.download===!0?"":n.download),(n==null?void 0:n.cacheNonce)!=null&&s.set("cacheNonce",String(n.cacheNonce));const a=s.toString();return i.map(o=>lt(lt({},o),{},{signedUrl:o.signedURL?encodeURI(`${r.url}${o.signedURL}${a?`&${a}`:""}`):null}))})}download(t,e,n){const r=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image/authenticated":"object",i=new URLSearchParams;e!=null&&e.transform&&this.applyTransformOptsToQuery(i,e.transform),(e==null?void 0:e.cacheNonce)!=null&&i.set("cacheNonce",String(e.cacheNonce));const s=i.toString(),a=this._getFinalPath(t),o=()=>Vf(this.fetch,`${this.url}/${r}/${a}${s?`?${s}`:""}`,{headers:this.headers,noResolveJson:!0},n);return new cq(o,this.shouldThrowOnError)}async info(t){var e=this;const n=e._getFinalPath(t);return e.handleOperation(async()=>Ww(await Vf(e.fetch,`${e.url}/object/info/${n}`,{headers:e.headers})))}async exists(t){var e=this;const n=e._getFinalPath(t);try{return await oq(e.fetch,`${e.url}/object/${n}`,{headers:e.headers}),{data:!0,error:null}}catch(i){if(e.shouldThrowOnError)throw i;if(Vv(i)){var r;const s=i instanceof Hw?i.status:i instanceof jT?(r=i.originalError)===null||r===void 0?void 0:r.status:void 0;if(s!==void 0&&[400,404].includes(s))return{data:!1,error:i}}throw i}}getPublicUrl(t,e){const n=this._getFinalPath(t),r=new URLSearchParams;e!=null&&e.download&&r.set("download",e.download===!0?"":e.download),e!=null&&e.transform&&this.applyTransformOptsToQuery(r,e.transform),(e==null?void 0:e.cacheNonce)!=null&&r.set("cacheNonce",String(e.cacheNonce));const i=r.toString(),s=typeof(e==null?void 0:e.transform)=="object"&&e.transform!==null&&Object.keys(e.transform).length>0?"render/image":"object";return{data:{publicUrl:encodeURI(`${this.url}/${s}/public/${n}`)+(i?`?${i}`:"")}}}async remove(t){var e=this;return e.handleOperation(async()=>await Gf(e.fetch,`${e.url}/object/${e.bucketId}`,{prefixes:t},{headers:e.headers}))}async purgeCache(t,e,n){var r=this;return r.handleOperation(async()=>{const i=r._getFinalPath(t),s=new URLSearchParams;e!=null&&e.transformations&&s.set("transformations","true");const a=s.toString();return await Gf(r.fetch,`${r.url}/cdn/${i}${a?`?${a}`:""}`,{},{headers:r.headers},n)})}async list(t,e,n){var r=this;return r.handleOperation(async()=>{const i=e!=null&&e.sortBy?lt(lt({},Ly.sortBy),e.sortBy):Ly.sortBy,s=lt(lt(lt({},Ly),e),{},{sortBy:i,prefix:t||""});return await ys(r.fetch,`${r.url}/object/list/${r.bucketId}`,s,{headers:r.headers},n)})}async listV2(t,e){var n=this;return n.handleOperation(async()=>{const r=lt({},t);return await ys(n.fetch,`${n.url}/object/list-v2/${n.bucketId}`,r,{headers:n.headers},e)})}encodeMetadata(t){return JSON.stringify(t)}toBase64(t){return typeof Buffer<"u"?Buffer.from(t).toString("base64"):btoa(t)}_getFinalPath(t){return`${this.bucketId}/${t.replace(/^\/+/,"")}`}_removeEmptyFolders(t){return t.replace(/^\/|\/$/g,"").replace(/\/+/g,"/")}applyTransformOptsToQuery(t,e){return e.width&&t.set("width",e.width.toString()),e.height&&t.set("height",e.height.toString()),e.resize&&t.set("resize",e.resize),e.format&&t.set("format",e.format),e.quality&&t.set("quality",e.quality.toString()),t}};const dq="2.110.7",Tp={"X-Client-Info":`storage-js/${dq}`};var hq=class extends Fd{constructor(t,e={},n,r){const i=new URL(t);r!=null&&r.useNewHostname&&/supabase\.(co|in|red)$/.test(i.hostname)&&!i.hostname.includes("storage.supabase.")&&(i.hostname=i.hostname.replace("supabase.","storage.supabase."));const s=i.href.replace(/\/$/,""),a=lt(lt({},Tp),e);super(s,a,n,"storage")}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=e.listBucketOptionsToQueryString(t);return await Vf(e.fetch,`${e.url}/bucket${n}`,{headers:e.headers})})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Vf(e.fetch,`${e.url}/bucket/${t}`,{headers:e.headers}))}async createBucket(t,e={public:!1}){var n=this;return n.handleOperation(async()=>await ys(n.fetch,`${n.url}/bucket`,{id:t,name:t,type:e.type,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async updateBucket(t,e){var n=this;return n.handleOperation(async()=>await Vw(n.fetch,`${n.url}/bucket/${t}`,{id:t,name:t,public:e.public,file_size_limit:e.fileSizeLimit,allowed_mime_types:e.allowedMimeTypes},{headers:n.headers}))}async emptyBucket(t){var e=this;return e.handleOperation(async()=>await ys(e.fetch,`${e.url}/bucket/${t}/empty`,{},{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Gf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}async purgeBucketCache(t,e,n){var r=this;return r.handleOperation(async()=>{const i=new URLSearchParams;e!=null&&e.transformations&&i.set("transformations","true");const s=i.toString();return await Gf(r.fetch,`${r.url}/cdn/${t}${s?`?${s}`:""}`,{},{headers:r.headers},n)})}listBucketOptionsToQueryString(t){const e={};return t&&("limit"in t&&(e.limit=String(t.limit)),"offset"in t&&(e.offset=String(t.offset)),t.search&&(e.search=t.search),t.sortColumn&&(e.sortColumn=t.sortColumn),t.sortOrder&&(e.sortOrder=t.sortOrder)),Object.keys(e).length>0?"?"+new URLSearchParams(e).toString():""}},fq=class extends Fd{constructor(t,e={},n){const r=t.replace(/\/$/,""),i=lt(lt({},Tp),e);super(r,i,n,"storage")}async createBucket(t){var e=this;return e.handleOperation(async()=>await ys(e.fetch,`${e.url}/bucket`,{name:t},{headers:e.headers}))}async listBuckets(t){var e=this;return e.handleOperation(async()=>{const n=new URLSearchParams;(t==null?void 0:t.limit)!==void 0&&n.set("limit",t.limit.toString()),(t==null?void 0:t.offset)!==void 0&&n.set("offset",t.offset.toString()),t!=null&&t.sortColumn&&n.set("sortColumn",t.sortColumn),t!=null&&t.sortOrder&&n.set("sortOrder",t.sortOrder),t!=null&&t.search&&n.set("search",t.search);const r=n.toString(),i=r?`${e.url}/bucket?${r}`:`${e.url}/bucket`;return await Vf(e.fetch,i,{headers:e.headers})})}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Gf(e.fetch,`${e.url}/bucket/${t}`,{},{headers:e.headers}))}from(t){var e=this;if(!rq(t))throw new Wv("Invalid bucket name: File, folder, and bucket names must follow AWS object key naming guidelines and should avoid the use of any other characters.");const n=new YB({baseUrl:this.url,catalogName:t,auth:{type:"custom",getHeaders:async()=>e.headers},fetch:this.fetch}
371),r=this.shouldThrowOnError;return new Proxy(n,{get(i,s){const a=i[s];return typeof a!="function"?a:async(...o)=>{try{return{data:await a.apply(i,o),error:null}}catch(l){if(r)throw l;return{data:null,error:l}}}}})}},pq=class extends Fd{constructor(t,e={},n){const r=t.replace(/\/$/,""),i=lt(lt({},Tp),{},{"Content-Type":"application/json"},e);super(r,i,n,"vectors")}async createIndex(t){var e=this;return e.handleOperation(async()=>await Ai.post(e.fetch,`${e.url}/CreateIndex`,t,{headers:e.headers})||{})}async getIndex(t,e){var n=this;return n.handleOperation(async()=>await Ai.post(n.fetch,`${n.url}/GetIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers}))}async listIndexes(t){var e=this;return e.handleOperation(async()=>await Ai.post(e.fetch,`${e.url}/ListIndexes`,t,{headers:e.headers}))}async deleteIndex(t,e){var n=this;return n.handleOperation(async()=>await Ai.post(n.fetch,`${n.url}/DeleteIndex`,{vectorBucketName:t,indexName:e},{headers:n.headers})||{})}},mq=class extends Fd{constructor(t,e={},n){const r=t.replace(/\/$/,""),i=lt(lt({},Tp),{},{"Content-Type":"application/json"},e);super(r,i,n,"vectors")}async putVectors(t){var e=this;if(t.vectors.length<1||t.vectors.length>500)throw new Error("Vector batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Ai.post(e.fetch,`${e.url}/PutVectors`,t,{headers:e.headers})||{})}async getVectors(t){var e=this;return e.handleOperation(async()=>await Ai.post(e.fetch,`${e.url}/GetVectors`,t,{headers:e.headers}))}async listVectors(t){var e=this;if(t.segmentCount!==void 0){if(t.segmentCount<1||t.segmentCount>16)throw new Error("segmentCount must be between 1 and 16");if(t.segmentIndex!==void 0&&(t.segmentIndex<0||t.segmentIndex>=t.segmentCount))throw new Error(`segmentIndex must be between 0 and ${t.segmentCount-1}`)}return e.handleOperation(async()=>await Ai.post(e.fetch,`${e.url}/ListVectors`,t,{headers:e.headers}))}async queryVectors(t){var e=this;return e.handleOperation(async()=>await Ai.post(e.fetch,`${e.url}/QueryVectors`,t,{headers:e.headers}))}async deleteVectors(t){var e=this;if(t.keys.length<1||t.keys.length>500)throw new Error("Keys batch size must be between 1 and 500 items");return e.handleOperation(async()=>await Ai.post(e.fetch,`${e.url}/DeleteVectors`,t,{headers:e.headers})||{})}},gq=class extends Fd{constructor(t,e={},n){const r=t.replace(/\/$/,""),i=lt(lt({},Tp),{},{"Content-Type":"application/json"},e);super(r,i,n,"vectors")}async createBucket(t){var e=this;return e.handleOperation(async()=>await Ai.post(e.fetch,`${e.url}/CreateVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}async getBucket(t){var e=this;return e.handleOperation(async()=>await Ai.post(e.fetch,`${e.url}/GetVectorBucket`,{vectorBucketName:t},{headers:e.headers}))}async listBuckets(t={}){var e=this;return e.handleOperation(async()=>await Ai.post(e.fetch,`${e.url}/ListVectorBuckets`,t,{headers:e.headers}))}async deleteBucket(t){var e=this;return e.handleOperation(async()=>await Ai.post(e.fetch,`${e.url}/DeleteVectorBucket`,{vectorBucketName:t},{headers:e.headers})||{})}},vq=class extends gq{constructor(t,e={}){super(t,e.headers||{},e.fetch)}from(t){return new yq(this.url,this.headers,t,this.fetch)}async createBucket(t){var e=()=>super.createBucket,n=this;return e().call(n,t)}async getBucket(t){var e=()=>super.getBucket,n=this;return e().call(n,t)}async listBuckets(t={}){var e=()=>super.listBuckets,n=this;return e().call(n,t)}async deleteBucket(t){var e=()=>super.deleteBucket,n=this;return e().call(n,t)}},yq=class extends pq{constructor(t,e,n,r){super(t,e,r),this.vectorBucketName=n}async createIndex(t){var e=()=>super.createIndex,n=this;return e().call(n,lt(lt({},t),{},{vectorBucketName:n.vectorBucketName}))}async listIndexes(t={}){var e=()=>super.listIndexes,n=this;return e().call(n,lt(lt({},t),{},{vectorBucketName:n.vectorBucketName}))}async getIndex(t){var e=()=>super.getIndex,n=this;return e().call(n,n.vectorBucketName,t)}async deleteIndex(t){var e=()=>super.deleteIndex,n=this;return e().call(n,n.vectorBucketName,t)}index(t){return new wq(this.url,this.headers,this.vectorBucketName,t,this.fetch)}},wq=class extends mq{constructor(t,e,n,r,i){super(t,e,i),this.vectorBucketName=n,this.indexName=r}async putVectors(t){var e=()=>super.putVectors,n=this;return e().call(n,lt(lt({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async getVectors(t){var e=()=>super.getVectors,n=this;return e().call(n,lt(lt({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async listVectors(t={}){var e=()=>super.listVectors,n=this;return e().call(n,lt(lt({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async queryVectors(t){var e=()=>super.queryVectors,n=this;return e().call(n,lt(lt({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}async deleteVectors(t){var e=()=>super.deleteVectors,n=this;return e().call(n,lt(lt({},t),{},{vectorBucketName:n.vectorBucketName,indexName:n.indexName}))}},bq=class extends hq{constructor(t,e={},n,r){super(t,e,n,r)}from(t){return new uq(this.url,this.headers,t,this.fetch)}get vectors(){return new vq(this.url+"/vector",{headers:this.headers,fetch:this.fetch})}get analytics(){return new fq(this.url+"/iceberg",this.headers,this.fetch)}};function Gv(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n}const MT="2.110.7",Va=30*1e3,zh=3,jy=zh*Va,xq=2*Va,_q="http://localhost:9999",Sq
371="supabase.auth.token",kq={"X-Client-Info":`gotrue-js/${MT}`},Gw="X-Supabase-Api-Version",FT={"2024-01-01":{timestamp:Date.parse("2024-01-01T00:00:00.0Z"),name:"2024-01-01"}},Eq=/^([a-z0-9_-]{4})*($|[a-z0-9_-]{3}$|[a-z0-9_-]{2}$)$/i,Nq=10*60*1e3;class Kf extends Error{constructor(e,n,r){super(e),this.__isAuthError=!0,this.name="AuthError",this.status=n,this.code=r}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code}}}function Oe(t){return typeof t=="object"&&t!==null&&"__isAuthError"in t}class Aq extends Kf{constructor(e,n,r){super(e,n,r),this.name="AuthApiError",this.status=n,this.code=r}}function Cq(t){return Oe(t)&&t.name==="AuthApiError"}class _s extends Kf{constructor(e,n){super(e),this.name="AuthUnknownError",this.originalError=n}}class pa extends Kf{constructor(e,n,r,i){super(e,r,i),this.name=n,this.status=r}}class cr extends pa{constructor(){super("Auth session missing!","AuthSessionMissingError",400,void 0)}}function ng(t){return Oe(t)&&t.name==="AuthSessionMissingError"}class iu extends pa{constructor(){super("Auth session or user missing","AuthInvalidToken
371ResponseError",500,void 0)}}class rg extends pa{constructor(e){super(e,"AuthInvalidCredentialsError",400,void 0)}}class ig extends pa{constructor(e,n=null){super(e,"AuthImplicitGrantRedirectError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}function Pq(t){return Oe(t)&&t.name==="AuthImplicitGrantRedirectError"}class Xk extends pa{constructor(e,n=null){super(e,"AuthPKCEGrantCodeExchangeError",500,void 0),this.details=null,this.details=n}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{details:this.details})}}class Tq extends pa{constructor(){super("PKCE code verifier not found in storage. This can happen if the auth flow was initiated in a different browser or device, or if the storage was cleared. For SSR frameworks (Next.js, SvelteKit, etc.), use @supabase/ssr on both the server and client to store the code verifier in cookies.","AuthPKCECodeVerifierMissingError",400,"pkce_code_verifier_not_found")}}class Kw extends pa{constructor(e,n){super(e,"AuthRetryableFetchError",n,void 0)}}function Qk(t){return Oe(t)&&t.name==="AuthRetryableFetchError"}class eE extends pa{constructor(e="Refresh result discarded: session state changed mid-flight (e.g., concurrent signOut)"){super(e,"AuthRefreshDiscardedError",409,void 0)}}function Rq(t){return Oe(t)&&t.name==="AuthRefreshDiscardedError"}class tE extends pa{constructor(e,n,r){super(e,"AuthWeakPasswordError",n,"weak_password"),this.reasons=r}toJSON(){return Object.assign(Object.assign({},super.toJSON()),{reasons:this.reasons})}}class O0 extends pa{constructor(e){super(e,"AuthInvalidJwtError",400,"invalid_jwt")}}const I0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_".split(""),nE=` 372\r=`.split(""),Lq=(()=>{const t=new Array(128);for(let e=0;e<t.length;e+=1)t[e]=-1;for(let e=0;e<nE.length;e+=1)t[nE[e].charCodeAt(0)]=-2;for(let e=0;e<I0.length;e+=1)t[I0[e].charCodeAt(0)]=e;return t})();function rE(t,e,n){if(t!==null)for(e.queue=e.queue<<8|t,e.queuedBits+=8;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(I0[r]),e.queuedBits-=6}else if(e.queuedBits>0)for(e.queue=e.queue<<6-e.queuedBits,e.queuedBits=6;e.queuedBits>=6;){const r=e.queue>>e.queuedBits-6&63;n(I0[r]),e.queuedBits-=6}}function zT(t,e,n){const r=Lq[t];if(r>-1)for(e.queue=e.queue<<6|r,e.queuedBits+=6;e.queuedBits>=8;)n(e.queue>>e.queuedBits-8&255),e.queuedBits-=8;else{if(r===-2)return;throw new Error(`Invalid Base64-URL character "${String.fromCharCode(t)}"`)}}function iE(t){const e=[],n=a=>{e.push(String.fromCodePoint(a))},r={utf8seq:0,codepoint:0},i={queue:0,queuedBits:0},s=a=>{Iq(a,r,n)};for(let a=0;a<t.length;a+=1)zT(t.charCodeAt(a),i,s);return e.join("")}function jq(t,e){if(t<=127){e(t);return}else if(t<=2047){e(192|t>>6),e(128|t&63);return}else if(t<=65535){e(224|t>>12),e(128|t>>6&63),e(128|t&63);return}else if(t<=1114111){e(240|t>>18),e(128|t>>12&63),e(128|t>>6&63),e(128|t&63);return}throw new Error(`Unrecognized Unicode codepoint: ${t.toString(16)}`)}function Oq(t,e){for(let n=0;n<t.length;n+=1){let r=t.charCodeAt(n);if(r>55295&&r<=56319){const i=(r-55296)*1024&65535;r=(t.charCodeAt(n+1)-56320&65535|i)+65536,n+=1}jq(r,e)}}function Iq(t,e,n){if(e.utf8seq===0){if(t<=127){n(t);return}for(let r=1;r<6;r+=1)if(!(t>>7-r&1)){e.utf8seq=r;break}if(e.utf8seq===2)e.codepoint=t&31;else if(e.utf8seq===3)e.codepoint=t&15;else if(e.utf8seq===4)e.codepoint=t&7;else throw new Error("Invalid UTF-8 sequence");e.utf8seq-=1}else if(e.utf8seq>0){if(t<=127)throw new Error("Invalid UTF-8 sequence");e.codepoint=e.codepoint<<6|t&63,e.utf8seq-=1,e.utf8seq===0&&n(e.codepoint)}}function Vu(t){const e=[],n={queue:0,queuedBits:0},r=i=>{e.push(i)};for(let i=0;i<t.length;i+=1)zT(t.charCodeAt(i),n,r);return new Uint8Array(e)}function Dq(t){const e=[];return Oq(t,n=>e.push(n)),new Uint8Array(e)}function tc(t){const e=[],n={queue:0,queuedBits:0},r=i=>{e.push(i)};return t.forEach(i=>rE(i,n,r)),rE(null,n,r),e.join("")}function Mq(t){return Math.round(Date.now()/1e3)+t}function Fq(){return Symbol("auth-callback")}const Ir=()=>typeof window<"u"&&typeof document<"u",Wl={tested:!1,writable:!1},$T=()=>{if(!Ir())return!1;try{if(typeof globalThis.localStorage!="object")return!1}catch{return!1}if(Wl.tested)return Wl.writable;const t=`lswt-${Math.random()}${Math.random()}`;try{globalThis.localStorage.setItem(t,t),globalThis.localStorage.removeItem(t),Wl.tested=!0,Wl.writable=!0}catch{Wl.tested=!0,Wl.writable=!1}return Wl.writable};function zq(t){const e={},n=new URL(t);if(n.hash&&n.hash[0]==="#")try{new URLSearchParams(n.hash.substring(1)).forEac
372h((i,s)=>{e[s]=i})}catch{}return n.searchParams.forEach((r,i)=>{e[i]=r}),e}const UT=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),$q=t=>typeof t=="object"&&t!==null&&"status"in t&&"ok"in t&&"json"in t&&typeof t.json=="function",gu=async(t,e,n)=>{await t.setItem(e,JSON.stringify(n))},fs=async(t,e)=>{const n=await t.getItem(e);if(!n)return null;try{return JSON.parse(n)}catch{return null}},Kn=async(t,e)=>{await t.removeItem(e)};class Kv{constructor(){this.promise=new Kv.promiseConstructor((e,n)=>{this.resolve=e,this.reject=n})}}Kv.promiseConstructor=Promise;function sg(t){const e=t.split(".");if(e.length!==3)throw new O0("Invalid JWT structure");for(let r=0;r<e.length;r++)if(!Eq.test(e[r]))throw new O0("JWT not in base64url format");return{header:JSON.parse(iE(e[0])),payload:JSON.parse(iE(e[1])),signature:Vu(e[2]),raw:{header:e[0],payload:e[1]}}}async function Uq(t){return await new Promise(e=>{setTimeout(()=>e(null),t)})}function Bq(t,e){return new Promise((r,i)=>{(async()=>{for(let s=0;s<1/0;s++)try{const a=await t(s);if(!e(s,null,a)){r(a);return}}catch(a){if(!e(s,a)){i(a);return}}})()})}function qq(t){return("0"+t.toString(16)).substr(-2)}function Hq(){const e=new Uint32Array(56);if(typeof crypto>"u"){const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~",r=n.length;let i="";for(let s=0;s<56;s++)i+=n.charAt(Math.floor(Math.random()*r));return i}return crypto.getRandomValues(e),Array.from(e,qq).join("")}async function Wq(t){const n=new TextEncoder().encode(t),r=await crypto.subtle.digest("SHA-256",n),i=new Uint8Array(r);return Array.from(i).map(s=>String.fromCharCode(s)).join("")}async function Vq(t){if(!(typeof crypto<"u"&&typeof crypto.subtle<"u"&&typeof TextEncoder<"u"))return console.warn("WebCrypto API is not supported. Code challenge method will default to use plain instead of sha256."),t;const n=await Wq(t);return btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}async function Vl(t,e,n=!1){const r=Hq();let i=r;n&&(i+="/recovery"),await gu(t,`${e}-code-verifier`,i);const s=await Vq(r);return[s,r===s?"plain":"s256"]}const Gq=/^2[0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|1[0-9]|2[0-9]|3[0-1])$/i;function Kq(t){const e=t.headers.get(Gw);if(!e||!e.match(Gq))return null;try{return new Date(`${e}T00:00:00.0Z`)}catch{return null}}function Zq(t){if(!t)throw new Error("Missing exp claim");const e=Math.floor(Date.now()/1e3);if(t<=e)throw new Error("JWT has expired")}function Yq(t){switch(t){case"RS256":return{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}};case"ES256":return{name:"ECDSA",namedCurve:"P-256",hash:{name:"SHA-256"}};default:throw new Error("Invalid alg claim")}}const Jq=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/;function Fa(t){if(!Jq.test(t))throw new Error("@supabase/auth-js: Expected parameter to be UUID but is not")}function ms(t){if(!t.passkey)throw new Error("@supabase/auth-js: the passkey API is experimental and disabled by default. Enable it by passing `auth: { experimental: { passkey: true } }` to createClient (or to the GoTrueClient constructor).")}function Oy(){const t={};return new Proxy(t,{get:(e,n)=>{if(n==="__isUserNotAvailableProxy")return!0;if(typeof n=="symbol"){const r=n.toString();if(r==="Symbol(Symbol.toPrimitive)"||r==="Symbol(Symbol.toStringTag)"||r==="Symbol(util.inspect.custom)")return}throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Accessing the "${n}" property of the session object is not supported. Please use getUser() instead.`)},set:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Setting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)},deleteProperty:(e,n)=>{throw new Error(`@supabase/auth-js: client was created with userStorage option and there was no user stored in the user storage. Deleting the "${n}" property of the session object is not supported. Please use getUser() to fetch a user object you can manipulate.`)}})}function Xq(t,e){return new Proxy(t,{get:(n,r,i)=>{if(r==="__isInsecureUserWarningProxy")return!0;
372if(typeof r=="symbol"){const s=r.toString();if(s==="Symbol(Symbol.toPrimitive)"||s==="Symbol(Symbol.toStringTag)"||s==="Symbol(util.inspect.custom)"||s==="Symbol(nodejs.util.inspect.custom)")return Reflect.get(n,r,i)}return!e.value&&typeof r=="string"&&(console.warn("Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server."),e.value=!0),Reflect.get(n,r,i)}})}function sE(t){return JSON.parse(JSON.stringify(t))}const Zl=t=>{if(typeof t=="object"&&t!==null){const e=t;if(typeof e.msg=="string")return e.msg;if(typeof e.message=="string")return e.message;if(typeof e.error_description=="string")return e.error_description;if(typeof e.error=="string")return e.error}return JSON.stringify(t)},Qq=[500,501,502,503,504,520,521,522,523,524,525,526,527,528,529,530];async function aE(t){var e;if(!$q(t))throw new Kw(Zl(t),0);if(Qq.includes(t.status))throw new Kw(Zl(t),t.status);let n;try{n=await t.json()}catch(s){throw new _s(Zl(s),s)}let r;const i=Kq(t);if(i&&i.getTime()>=FT["2024-01-01"].timestamp&&typeof n=="object"&&n&&typeof n.code=="string"?r=n.code:typeof n=="object"&&n&&typeof n.error_code=="string"&&(r=n.error_code),r){if(r==="weak_password")throw new tE(Zl(n),t.status,((e=n.weak_password)===null||e===void 0?void 0:e.reasons)||[]);if(r==="session_not_found")throw new cr}else if(typeof n=="object"&&n&&typeof n.weak_password=="object"&&n.weak_password&&Array.isArray(n.weak_password.reasons)&&n.weak_password.reasons.length&&n.weak_password.reasons.reduce((s,a)=>s&&typeof a=="string",!0))throw new tE(Zl(n),t.status,n.weak_password.reasons);throw new Aq(Zl(n),t.status||500,r)}const eH=(t,e,n,r)=>{const i={method:t,headers:(e==null?void 0:e.headers)||{}};return t==="GET"?i:(i.headers=Object.assign({"Content-Type":"application/json;charset=UTF-8"},e==null?void 0:e.headers),i.body=JSON.stringify(r),Object.assign(Object.assign({},i),n))};async function Ve(t,e,n,r){var i;const s=Object.assign({},r==null?void 0:r.headers);s[Gw]||(s[Gw]=FT["2024-01-01"].name),r!=null&&r.jwt&&(s.Authorization=`Bearer ${r.jwt}`);const a=(i=r==null?void 0:r.query)!==null&&i!==void 0?i:{};r!=null&&r.redirectTo&&(a.redirect_to=r.redirectTo);const o=Object.keys(a).length?"?"+new URLSearchParams(a).toString():"",l=await tH(t,e,n+o,{headers:s,noResolveJson:r==null?void 0:r.noResolveJson},{},r==null?void 0:r.body);return r!=null&&r.xform?r==null?void 0:r.xform(l):{data:Object.assign({},l),error:null}}async function tH(t,e,n,r,i,s){const a=eH(e,r,i,s);let o;try{o=await t(n,Object.assign({},a))}catch(l){throw console.error(l),new Kw(Zl(l),0)}if(o.ok||await aE(o),r!=null&&r.noResolveJson)return o;try{return await o.json()}catch(l){await aE(l)}}function Gi(t){var e;let n=null;iH(t)&&(n=Object.assign({},t),t.expires_at||(n.expires_at=Mq(t.expires_in)));const r=(e=t.user)!==null&&e!==void 0?e:typeof(t==null?void 0:t.id)=="string"?t:null;return{data:{session:n,user:r},error:null}}function oE(t){const e=Gi(t);return!e.error&&t.weak_password&&typeof t.weak_password=="object"&&Array.isArray(t.weak_password.reasons)&&t.weak_password.reasons.length&&t.weak_password.message&&typeof t.weak_password.message=="string"&&t.weak_password.reasons.reduce((n,r)=>n&&typeof r=="string",!0)&&(e.data.weak_password=t.weak_password),e}function Uo(t){var e;return{data:{user:(e=t.user)!==null&&e!==void 0?e:t},error:null}}function nH(t){return{data:t,error:null}}function rH(t){const{action_link:e,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s}=t,a=Gv(t,["action_link","email_otp","hashed_token","redirect_to","verification_type"]),o={action_link:e,email_otp:n,hashed_token:r,redirect_to:i,verification_type:s},l=Object.assign({},a);return{data:{properties:o,user:l},error:null}}function lE(t){return t}function iH(t){return!!t.access_token&&!!t.refresh_token&&!!t.expires_in}const Iy=["global","local","others"];class sH{constructor({url:e="",headers:n={},fetch:r,experimental:i}){this.url=e,this.headers=n,this.fetch=UT(r),this.experimental=i??{},this.mfa={listFactors:this._listFactors.bind(this),deleteFactor:this._deleteFactor.bind(this)},this.oauth={listClients:this._listOAuthClients.bind(this),createClient:this._createOAuthClient.bind(this),getClient:this._getOAuthClient.bind(this),updateClient:this._updateOAuthClient.bind(this),deleteClient:this._deleteOAuthClient.bind(this),regenerateClientSecret:this._regenerateOAuthClientSecret.bind(this)},this.customProviders={listProviders:this._listCustomProviders.bind(this),createProvider:this._createCustomProvider.bind(this),getProvider:this._getCustomProvider.bind(this),updateProvider:this._updateCustomProvider.bind(this),deleteProvider:this._deleteCustomProvider.bind(this)},this.passkey={listPasskeys:this._adminListPasskeys.bind(this),deletePasskey:this._adminDeletePasskey.bind(this)}}async signOut(e,n=Iy[0]){if(Iy.indexOf(n)<0)throw new Error(`@supabase/auth-js: Parameter scope must be one of ${Iy.join(", ")}`);try{return await Ve(this.fetch,"POST",`${this.url}/logout?scope=${n}`,{headers:this.headers,jwt:e,noResolveJson:!0}),{data:null,error:null}}catch(r){if(Oe(r))return{data:null,error:r};throw r}}async inviteUserByEmail(e,n={}){try{return await Ve(this.fetch,"POST",`${this.url}/invite`,{body:{email:e,data:n.data},headers:this.headers,redirectTo:n.redirectTo,xform:Uo})}catch(r){if(Oe(r))return{data:{user:null},error:r};throw r}}async generateLink(e){try{const{options:n}=e,r=Gv(e,["options"]),i=Object.assign(Object.assign({},r),n);return"newEmail"in r&&(i.new_email=r==null?void 0:r.newEmail,delete i.newEmail),await Ve(this.fetch,"POST",`${this.url}/admin/generate_link`,{body:i,headers:this.headers,xform:rH,redirectTo:n==null?void 0:n.redirectTo})}catch(n){if(Oe(n))return{data:{properties:null,user:null},error:n};throw n}}async createUser(e){try{return await Ve(this.fetch,"POST",`${this.url}/admin/users`,{body:e,headers:this.headers,xform:Uo})}catch(n){if(Oe(n))return{data:{user:null},error:n};throw n}}async listUsers(e){var n,r,i,s,a,o,l;try{const c={nextPage:null,lastPage:0,total:0},u=await Ve(this.fetch,"GET",`${this.url}/admin/users`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(s=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:lE});if(u.error)throw u.error;const d=await u.json(),f=(a=u.headers.get("x-total-count"))!==null&&a!==void 0?a:0,h=(l=(o=u.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return h.length>
3720&&(h.forEach(y=>{const v=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(y.split(";")[1].split("=")[1]);c[`${_}Page`]=v}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(Oe(c))return{data:{users:[]},error:c};throw c}}async getUserById(e){Fa(e);try{return await Ve(this.fetch,"GET",`${this.url}/admin/users/${e}`,{headers:this.headers,xform:Uo})}catch(n){if(Oe(n))return{data:{user:null},error:n};throw n}}async updateUserById(e,n){Fa(e);try{return await Ve(this.fetch,"PUT",`${this.url}/admin/users/${e}`,{body:n,headers:this.headers,xform:Uo})}catch(r){if(Oe(r))return{data:{user:null},error:r};throw r}}async deleteUser(e,n=!1){Fa(e);try{return await Ve(this.fetch,"DELETE",`${this.url}/admin/users/${e}`,{headers:this.headers,body:{should_soft_delete:n},xform:Uo})}catch(r){if(Oe(r))return{data:{user:null},error:r};throw r}}async _listFactors(e){Fa(e.userId);try{const{data:n,error:r}=await Ve(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/factors`,{headers:this.headers,xform:i=>({data:{factors:i},error:null})});return{data:n,error:r}}catch(n){if(Oe(n))return{data:null,error:n};throw n}}async _deleteFactor(e){Fa(e.userId),Fa(e.id);try{return{data:await Ve(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/factors/${e.id}`,{headers:this.headers}),error:null}}catch(n){if(Oe(n))return{data:null,error:n};throw n}}async _listOAuthClients(e){var n,r,i,s,a,o,l;try{const c={nextPage:null,lastPage:0,total:0},u=await Ve(this.fetch,"GET",`${this.url}/admin/oauth/clients`,{headers:this.headers,noResolveJson:!0,query:{page:(r=(n=e==null?void 0:e.page)===null||n===void 0?void 0:n.toString())!==null&&r!==void 0?r:"",per_page:(s=(i=e==null?void 0:e.perPage)===null||i===void 0?void 0:i.toString())!==null&&s!==void 0?s:""},xform:lE});if(u.error)throw u.error;const d=await u.json(),f=(a=u.headers.get("x-total-count"))!==null&&a!==void 0?a:0,h=(l=(o=u.headers.get("link"))===null||o===void 0?void 0:o.split(","))!==null&&l!==void 0?l:[];return h.length>0&&(h.forEach(y=>{const v=parseInt(y.split(";")[0].split("=")[1].substring(0,1)),_=JSON.parse(y.split(";")[1].split("=")[1]);c[`${_}Page`]=v}),c.total=parseInt(f)),{data:Object.assign(Object.assign({},d),c),error:null}}catch(c){if(Oe(c))return{data:{clients:[]},error:c};throw c}}async _createOAuthClient(e){try{return await Ve(this.fetch,"POST",`${this.url}/admin/oauth/clients`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Oe(n))return{data:null,error:n};throw n}}async _getOAuthClient(e){try{return await Ve(this.fetch,"GET",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Oe(n))return{data:null,error:n};throw n}}async _updateOAuthClient(e,n){try{return await Ve(this.fetch,"PUT",`${this.url}/admin/oauth/clients/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Oe(r))return{data:null,error:r};throw r}}async _deleteOAuthClient(e){try{return await Ve(this.fetch,"DELETE",`${this.url}/admin/oauth/clients/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Oe(n))return{data:null,error:n};throw n}}async _regenerateOAuthClientSecret(e){try{return await Ve(this.fetch,"POST",`${this.url}/admin/oauth/clients/${e}/regenerate_secret`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Oe(n))return{data:null,error:n};throw n}}async _listCustomProviders(e){try{const n={};return e!=null&&e.type&&(n.type=e.type),await Ve(this.fetch,"GET",`${this.url}/admin/custom-providers`,{headers:this.headers,query:n,xform:r=>{var i;return{data:{providers:(i=r==null?void 0:r.providers)!==null&&i!==void 0?i:[]},error:null}}})}catch(n){if(Oe(n))return{data:{providers:[]},error:n};throw n}}async _createCustomProvider(e){try{return await Ve(this.fetch,"POST",`${this.url}/admin/custom-providers`,{body:e,headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Oe(n))return{data:null,error:n};throw n}}async _getCustomProvider(e){try{return await Ve(this.fetch,"GET",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Oe(n))return{data:null,error:n};throw n}}async _updateCustomProvider(e,n){try{return await Ve(this.fetch,"PUT",`${this.url}/admin/custom-providers/${e}`,{body:n,headers:this.headers,xform:r=>({data:r,error:null})})}catch(r){if(Oe(r))return{data:null,error:r};throw r}}async _deleteCustomProvider(e){try{return await Ve(this.fetch,"DELET
372E",`${this.url}/admin/custom-providers/${e}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Oe(n))return{data:null,error:n};throw n}}async _adminListPasskeys(e){ms(this.experimental),Fa(e.userId);try{return await Ve(this.fetch,"GET",`${this.url}/admin/users/${e.userId}/passkeys`,{headers:this.headers,xform:n=>({data:n,error:null})})}catch(n){if(Oe(n))return{data:null,error:n};throw n}}async _adminDeletePasskey(e){ms(this.experimental),Fa(e.userId),Fa(e.passkeyId);try{return await Ve(this.fetch,"DELETE",`${this.url}/admin/users/${e.userId}/passkeys/${e.passkeyId}`,{headers:this.headers,noResolveJson:!0}),{data:null,error:null}}catch(n){if(Oe(n))return{data:null,error:n};throw n}}}function cE(t={}){return{getItem:e=>t[e]||null,setItem:(e,n)=>{t[e]=n},removeItem:e=>{delete t[e]}}}globalThis&&$T()&&globalThis.localStorage&&globalThis.localStorage.getItem("supabase.gotrue-js.locks.debug");class aH extends Error{constructor(e){super(e),this.isAcquireTimeout=!0}}function oH(){if(typeof globalThis!="object")try{Object.defineProperty(Object.prototype,"__magic__",{get:function(){return this},configurable:!0}),__magic__.globalThis=__magic__,delete Object.prototype.__magic__}catch{typeof self<"u"&&(self.globalThis=self)}}function BT(t){if(!/^0x[a-fA-F0-9]{40}$/.test(t))throw new Error(`@supabase/auth-js: Address "${t}" is invalid.`);return t.toLowerCase()}function lH(t){return parseInt(t,16)}function cH(t){const e=new TextEncoder().encode(t);return"0x"+Array.from(e,r=>r.toString(16).padStart(2,"0")).join("")}function uH(t){var e;const{chainId:n,domain:r,expirationTime:i,issuedAt:s=new Date,nonce:a,notBefore:o,requestId:l,resources:c,scheme:u,uri:d,version:f}=t;{if(!Number.isInteger(n))throw new Error(`@supabase/auth-js: Invalid SIWE message field "chainId". Chain ID must be a EIP-155 chain ID. Provided value: ${n}`);if(!r)throw new Error('@supabase/auth-js: Invalid SIWE message field "domain". Domain must be provided.');if(a&&a.length<8)throw new Error(`@supabase/auth-js: Invalid SIWE message field "nonce". Nonce must be at least 8 characters. Provided value: ${a}`);if(!d)throw new Error('@supabase/auth-js: Invalid SIWE message field "uri". URI must be provided.');if(f!=="1")throw new Error(`@supabase/auth-js: Invalid SIWE message field "version". Version must be '1'. Provided value: ${f}`);if(!((e=t.statement)===null||e===void 0)&&e.includes(` 373`))throw new Error(`@supabase/auth-js: Invalid SIWE message field "statement". Statement must not include '\\n'. Provided value: ${t.statement}`)}const h=BT(t.address),y=u?`${u}://${r}`:r,v=t.statement?`${t.statement} 374`:"",_=`${y} wants you to sign in with your Ethereum account: 375${h} 376 377${v}`;let w=`URI: ${d} 378Version: ${f} 379Chain ID: ${n}${a?` 380Nonce: ${a}`:""} 381Issued At: ${s.toISOString()}`;if(i&&(w+=` 382Expiration Time: ${i.toISOString()}`),o&&(w+=` 383Not Before: ${o.toISOString()}`),l&&(w+=` 384Request ID: ${l}`),c){let x=` 385Resources:`;for(const k of c){if(!k||typeof k!="string")throw new Error(`@supabase/auth-js: Invalid SIWE message field "resources". Every resource must be a valid string. Provided value: ${k}`);x+=` 386- ${k}`}w+=x}return`${_} 387${w}`}class Zn extends Error{constructor({message:e,code:n,cause:r,name:i}){var s;super(e,{cause:r}),this.__isWebAuthnError=!0,this.name=(s=i??(r instanceof Error?r.name:void 0))!==null&&s!==void 0?s:"Unknown Error",this.code=n}toJSON(){return{name:this.name,message:this.message,code:this.code}}}class D0 extends Zn{constructor(e,n){super({code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:n,message:e}),this.name="WebAuthnUnknownError",this.originalError=n}}function dH({error:t,options:e}){var n,r,i;const{publicKey:s}=e;if(!s)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Zn({message:"Registration ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else if(t.name==="ConstraintError"){if(((n=s.authenticatorSelection)===null||n===void 0?void 0:n.requireResidentKey)===!0)return new Zn({message:"Discoverable credentials were required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",cause:t});if(e.mediation==="conditional"&&((r=s.authenticatorSelection)===null||r===void 0?void 0:r.userVerification)==="required")return new Zn({message:"User verification was required during automatic registration but it could not be performed",code:"ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",cause:t});if(((i=s.authenticatorSelection)===null||i===void 0?void 0:i.userVerification)==="required")return new Zn({message:"User verification was required but no available authenticator supported it",code:"ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",cause:t})}else{if(t.name==="InvalidStateError")return new Zn({message:"The authenticator was previously registered",code:"ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",cause:t});if(t.name==="NotAllowedError")return new Zn({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="NotSupportedError")return s.pubKeyCredParams.filter(o=>o.type==="public-key").length===0?new Zn({message:'No entry in pubKeyCredParams was of type "public-key"',code:"ERROR_MALFORMED_PUBKEYCREDPARAMS",cause:t}):new Zn({message:"No available authenticator supported any of the specified pubKeyCredParams algorithms",code:"ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",cause:t});if(t.name==="SecurityError"){const a=window.location.hostname;if(qT(a)){if(s.rp.id!==a)return new Zn({message:`The RP ID "${s.rp.id}
387" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Zn({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="TypeError"){if(s.user.id.byteLength<1||s.user.id.byteLength>64)return new Zn({message:"User ID was not between 1 and 64 characters",code:"ERROR_INVALID_USER_ID_LENGTH",cause:t})}else if(t.name==="UnknownError")return new Zn({message:"The authenticator was unable to process the specified options, or could not create a new credential",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Zn({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}function hH({error:t,options:e}){const{publicKey:n}=e;if(!n)throw Error("options was missing required publicKey property");if(t.name==="AbortError"){if(e.signal instanceof AbortSignal)return new Zn({message:"Authentication ceremony was sent an abort signal",code:"ERROR_CEREMONY_ABORTED",cause:t})}else{if(t.name==="NotAllowedError")return new Zn({message:t.message,code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t});if(t.name==="SecurityError"){const r=window.location.hostname;if(qT(r)){if(n.rpId!==r)return new Zn({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:"ERROR_INVALID_RP_ID",cause:t})}else return new Zn({message:`${window.location.hostname} is an invalid domain`,code:"ERROR_INVALID_DOMAIN",cause:t})}else if(t.name==="UnknownError")return new Zn({message:"The authenticator was unable to process the specified options, or could not create a new assertion signature",code:"ERROR_AUTHENTICATOR_GENERAL_ERROR",cause:t})}return new Zn({message:"a Non-Webauthn related error has occurred",code:"ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",cause:t})}class fH{createNewAbortSignal(){if(this.controller){const n=new Error("Cancelling existing WebAuthn API call for new one");n.name="AbortError",this.controller.abort(n)}const e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){const e=new Error("Manually cancelling existing WebAuthn API call");e.name="AbortError",this.controller.abort(e),this.controller=void 0}}}const Zw=new fH;function uE(t){if(!t)throw new Error("Credential creation options are required");if(typeof PublicKeyCredential<"u"&&"parseCreationOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseCreationOptionsFromJSON=="function")return PublicKeyCredential.parseCreationOptionsFromJSON(t);const{challenge:e,user:n,excludeCredentials:r}=t,i=Gv(t,["challenge","user","excludeCredentials"]),s=Vu(e).buffer,a=Object.assign(Object.assign({},n),{id:Vu(n.id).buffer}),o=Object.assign(Object.assign({},i),{challenge:s,user:a});if(r&&r.length>0){o.excludeCredentials=new Array(r.length);for(let l=0;l<r.length;l++){const c=r[l];o.excludeCredentials[l]=Object.assign(Object.assign({},c),{id:Vu(c.id).buffer,type:c.type||"public-key",transports:c.transports})}}return o}function dE(t){if(!t)throw new Error("Credential request options are required");if(typeof PublicKeyCredential<"u"&&"parseRequestOptionsFromJSON"in PublicKeyCredential&&typeof PublicKeyCredential.parseRequestOptionsFromJSON=="function")return PublicKeyCredential.parseRequestOptionsFromJSON(t);const{challenge:e,allowCredentials:n}=t,r=Gv(t,["challenge","allowCredentials"]),i=Vu(e).buffer,s=Object.assign(Object.assign({},r),{challenge:i});if(n&&n.length>0){s.allowCredentials=new Array(n.length);for(let a=0;a<n.length;a++){const o=n[a];s.allowCredentials[a]=Object.assign(Object.assign({},o),{id:Vu(o.id).buffer,type:o.type||"public-key",transports:o.transports})}}return s}function hE(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t;return{id:t.id,rawId:t.id,response:{attestationObject:tc(new Uint8Array(t.response.attestationObject)),clientDataJSON:tc(new Uint8Array(t.response.clientDataJSON))},type:"public-key",clientExtensionResults:t.getClientExtensionResults(),authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function fE(t){var e;if("toJSON"in t&&typeof t.toJSON=="function")return t.toJSON();const n=t,r=t.getClientExtensionResults(),i=t.response;return{id:t.id,rawId:t.id,response:{authenticatorData:tc(new Uint8Array(i.authenticatorData)),clientDataJSON:tc(new Uint8Array(i.clientDataJSON)),signature:tc(new Uint8Array(i.signature)),userHandle:i.userHandle?tc(new Uint8Array(i.userHandle)):void 0},type:"public-key",clientExtensionResults:r,authenticatorAttachment:(e=n.authenticatorAttachment)!==null&&e!==void 0?e:void 0}}function qT(t){return t==="localhost"||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(t)}function M0(){var t,e;return!!(Ir()&&"PublicKeyCredential"in window&&window.PublicKeyCredential&&"credentials"in navigator&&typeof((t=navigator==null?void 0:navigator.credentials)===null||t===void 0?void 0:t.create)=="function"&&typeof((e=navigator==null?void 0:navigator.credentials)===null||e===void 0?void 0:e.get)=="function")}async function HT(t){try{const e=await navigator.credentials.create(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new D0("Browser returned unexpected credential type",e)}:{data:null,error:new D0("Empty credential response",e)}}catch(e){return{data:null,error:dH({error:e,options:t})}}}async function WT(t){try{const e=await navigator.credentials.get(t);return e?e instanceof PublicKeyCredential?{data:e,error:null}:{data:null,error:new D0("Browser returned unexpected credential type",e)}:{data:null,error:new D0("Empty credential response",e)}}catch(e){return{data:null,error:hH({error:e,options:t})}}}const pH={hints:["security-key"],authenticatorSelection:{authenticatorAttachment:"cross-platform",requireResidentKey:!1,userVerification:"preferred",residentKey:"discouraged"},attestation:"direct"},mH={userVerification:"preferred",hints:["security-key"],attestation:"direct"};function F0(...t){const e=i=>i!==null&&typeof i=="object"&&!Array.isArray(i),n=i=>i instanceof ArrayBuffer||ArrayBuffer.isView(i),r={};for(const i of t)if(i)for(const s in i){const a=i[s];if(a!==void 0)if(Array.isArray(a))r[s]=a;else if(n(a))r[s]=a;else if(e(a)){const o=r[s];e(o)?r[s]=F0(o,a):r[s]=F0(a)}else r[s]=a}return r}function gH(t,e){return F0(pH,t,e||{})}function vH(t,e){return F0(mH,t,e||{})}class yH{constructor(e){this.client=e,this.enroll=this._enroll.bind(this),this.challenge=this._challenge.bind(this),this.verify=this._verify.bind(this),this.authenticate=this._authenticate.bind(this),this.register=this._register.bind(this)}async _enroll(e){return this.client.mfa.enroll(Object.assign(Object.assign({},e),{factorType:"webauthn"}))}async _challenge({factorId:e,webauthn:n,friendlyName:r,signal:i},s){var a;try{const{data:o,error:l}=await this.client.mfa.challenge({factorId:e,webauthn:n});if(!o)return{data:null,error:l};const c=i??Zw.createNewAbortSignal();if(o.webauthn.type==="create"){const{user:u}=o.webauthn.credential_options.publicKey;if(!u.name){const d=r;if(d)u.name=`${u.id}:${d}`;else{const h=(await this.client.getUser()).data.user,y=((a=h==null?void 0:h.user_metadata)===null||a===void 0?void 0:a.name)||(h==null?void 0:h.email)||(h==null?void 0:h.id)||"User";u.name=`${u.id}:${y}`}}u.displayName||(u.displayName=u.name)}
387switch(o.webauthn.type){case"create":{const u=gH(o.webauthn.credential_options.publicKey,s==null?void 0:s.create),{data:d,error:f}=await HT({publicKey:u,signal:c});return d?{data:{factorId:e,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}case"request":{const u=vH(o.webauthn.credential_options.publicKey,s==null?void 0:s.request),{data:d,error:f}=await WT(Object.assign(Object.assign({},o.webauthn.credential_options),{publicKey:u,signal:c}));return d?{data:{factorId:e,challengeId:o.id,webauthn:{type:o.webauthn.type,credential_response:d}},error:null}:{data:null,error:f}}}}catch(o){return Oe(o)?{data:null,error:o}:{data:null,error:new _s("Unexpected error in challenge",o)}}}async _verify({challengeId:e,factorId:n,webauthn:r}){return this.client.mfa.verify({factorId:n,challengeId:e,webauthn:r})}async _authenticate({factorId:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},s){if(!n)return{data:null,error:new Kf("rpId is required for WebAuthn authentication")};try{if(!M0())return{data:null,error:new _s("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this.challenge({factorId:e,webauthn:{rpId:n,rpOrigins:r},signal:i},{request:s});if(!a)return{data:null,error:o};const{webauthn:l}=a;return this._verify({factorId:e,challengeId:a.challengeId,webauthn:{type:l.type,rpId:n,rpOrigins:r,credential_response:l.credential_response}})}catch(a){return Oe(a)?{data:null,error:a}:{data:null,error:new _s("Unexpected error in authenticate",a)}}}async _register({friendlyName:e,webauthn:{rpId:n=typeof window<"u"?window.location.hostname:void 0,rpOrigins:r=typeof window<"u"?[window.location.origin]:void 0,signal:i}={}},s){if(!n)return{data:null,error:new Kf("rpId is required for WebAuthn registration")};try{if(!M0())return{data:null,error:new _s("Browser does not support WebAuthn",null)};const{data:a,error:o}=await this._enroll({friendlyName:e});if(!a)return await this.client.mfa.listFactors().then(u=>{var d;return(d=u.data)===null||d===void 0?void 0:d.all.find(f=>f.factor_type==="webauthn"&&f.friendly_name===e&&f.status!=="unverified")}).then(u=>u?this.client.mfa.unenroll({factorId:u==null?void 0:u.id}):void 0),{data:null,error:o};const{data:l,error:c}=await this._challenge({factorId:a.id,friendlyName:a.friendly_name,webauthn:{rpId:n,rpOrigins:r},signal:i},{create:s});return l?this._verify({factorId:a.id,challengeId:l.challengeId,webauthn:{rpId:n,rpOrigins:r,type:l.webauthn.type,credential_response:l.webauthn.credential_response}}):{data:null,error:c}}catch(a){return Oe(a)?{data:null,error:a}:{data:null,error:new _s("Unexpected error in register",a)}}}}oH();const wH={url:_q,storageKey:Sq,autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,headers:kq,flowType:"implicit",debug:!1,hasCustomAuthorizationHeader:!1,throwOnError:!1,lockAcquireTimeout:5e3,skipAutoInitialize:!1,experimental:{}},su={};class Zf{get jwks(){var e,n;return(n=(e=su[this.storageKey])===null||e===void 0?void 0:e.jwks)!==null&&n!==void 0?n:{keys:[]}}set jwks(e){su[this.storageKey]=Object.assign(Object.assign({},su[this.storageKey]),{jwks:e})}get jwks_cached_at(){var e,n;return(n=(e=su[this.storageKey])===null||e===void 0?void 0:e.cachedAt)!==null&&n!==void 0?n:Number.MIN_SAFE_INTEGER}set jwks_cached_at(e){su[this.storageKey]=Object.assign(Object.assign({},su[this.storageKey]),{cachedAt:e})}constructor(e){var n,r,i;this.userStorage=null,this.memoryStorage=null,this.stateChangeEmitters=new Map,this.autoRefreshTicker=null,this.autoRefreshTickTimeout=null,this.visibilityChangedCallback=null,this.refreshingDeferred=null,this.lastRefreshFailure=null,this._sessionRemovalEpoch=0,this.initializePromise=null,this._pendingInitNotifications=null,this.detectSessionInUrl=!0,this.hasCustomAuthorizationHeader=!1,this.suppressGetSessionWarning=!1,this.lock=null,this.lockAcquired=!1,this.pendingInLock=[],this.broadcastChannel=null,this.logger=console.log;const s=Object.assign(Object.assign({},wH),e);if(this.storageKey=s.storageKey,this.instanceID=(n=Zf.nextInstanceID[this.storageKey])!==null&&n!==void 0?n:0,Zf.nextInstanceID[this.storageKey]=this.instanceID+1,this.logDebugMessages=!!s.debug,typeof s.debug=="function"&&(this.logger=s.debug),this.instanceID>0&&Ir()){const a=`${this._logPrefix()} Multiple GoTrueClient instances detected in the same browser context. It is not an error, but this should be avoided as it may produce undefined behavior when used concurrently under the same storage key.`;console.warn(a),this.logDebugMessages&&console.trace(a)}if(this.persistSession=s.persistSession,this.autoRefreshToken=s.autoRefreshToken,this.experimental=(r=s.experimental)!==null&&r!==void 0?r:{},this.admin=new sH({url:s.url,headers:s.headers,fetch:s.fetch,experimental:this.experimental}),this.url=s.url,this.headers=s.headers,this.fetch=UT(s.fetch),this.detectSessionInUrl=s.detectSessionInUrl,this.flowType=s.flowType,this.hasCustomAuthorizationHeader=s.hasCustomAuthorizationHeader,this.throwOnError=s.throwOnError,this.lockAcquireTimeout=s.lockAcquireTimeout,s.lock!=null&&(this.lock=s.lock),this.jwks||(this.jwks={keys:[]},this.jwks_cached_at=Number.MIN_SAFE_INTEGER),this.mfa={verify:this._verify.bind(this),enroll:this._enroll.bind(this),unenroll:this._unenroll.bind(this),challenge:this._challenge.bind(this),listFactors:this._listFactors.bind(this),challengeAndVerify:this._challengeAndVerify.bind(this),getAuthenticatorAssuranceLevel:this._getAuthenticatorAssuranceLevel.bind(this),webauthn:new yH(this)}
387,this.oauth={getAuthorizationDetails:this._getAuthorizationDetails.bind(this),approveAuthorization:this._approveAuthorization.bind(this),denyAuthorization:this._denyAuthorization.bind(this),listGrants:this._listOAuthGrants.bind(this),revokeGrant:this._revokeOAuthGrant.bind(this)},this.passkey={startRegistration:this._startPasskeyRegistration.bind(this),verifyRegistration:this._verifyPasskeyRegistration.bind(this),startAuthentication:this._startPasskeyAuthentication.bind(this),verifyAuthentication:this._verifyPasskeyAuthentication.bind(this),list:this._listPasskeys.bind(this),update:this._updatePasskey.bind(this),delete:this._deletePasskey.bind(this)},this.persistSession?(s.storage?this.storage=s.storage:$T()?this.storage=globalThis.localStorage:(this.memoryStorage={},this.storage=cE(this.memoryStorage)),s.userStorage&&(this.userStorage=s.userStorage)):(this.memoryStorage={},this.storage=cE(this.memoryStorage)),Ir()&&globalThis.BroadcastChannel&&this.persistSession&&this.storageKey){try{this.broadcastChannel=new globalThis.BroadcastChannel(this.storageKey)}catch(a){console.error("Failed to create a new BroadcastChannel, multi-tab state changes will not be available",a)}(i=this.broadcastChannel)===null||i===void 0||i.addEventListener("message",async a=>{this._debug("received broadcast notification from other tab or client",a),(a.data.event==="TOKEN_REFRESHED"||a.data.event==="SIGNED_IN")&&(this.lastRefreshFailure=null);try{await this._notifyAllSubscribers(a.data.event,a.data.session,!1)}catch(o){this._debug("#broadcastChannel","error",o)}})}s.skipAutoInitialize||this.initialize().catch(a=>{this._debug("#initialize()","error",a)})}isThrowOnErrorEnabled(){return this.throwOnError}_returnResult(e){if(this.throwOnError&&e&&e.error)throw e.error;return e}_logPrefix(){return`GoTrueClient@${this.storageKey}:${this.instanceID} (${MT}) ${new Date().toISOString()}`}_debug(...e){return this.logDebugMessages&&this.logger(this._logPrefix(),...e),this}async initialize(){var e;if(this.initializePromise)return await this.initializePromise;this._pendingInitNotifications=[],this.initializePromise=(async()=>this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._initialize()):await this._initialize())();const n=await this.initializePromise,r=(e=this._pendingInitNotifications)!==null&&e!==void 0?e:[];this._pendingInitNotifications=null;for(const i of r)await this._notifyAllSubscribers(i.event,i.session,i.broadcast);return n}async _initialize(){var e;try{let n={},r="none";if(Ir()&&(n=zq(window.location.href),this._isImplicitGrantCallback(n)?r="implicit":await this._isPKCECallback(n)&&(r="pkce")),Ir()&&this.detectSessionInUrl&&r!=="none"){const{data:i,error:s}=await this._getSessionFromURL(n,r);if(s){if(this._debug("#_initialize()","error detecting session from URL",s),Pq(s)){const l=(e=s.details)===null||e===void 0?void 0:e.code;if(l==="identity_already_exists"||l==="identity_not_found"||l==="single_identity_not_deletable")return{error:s}}return{error:s}}const{session:a,redirectType:o}=i;return this._debug("#_initialize()","detected session in URL",a,"redirect type",o),await this._saveSession(a),setTimeout(async()=>{o==="recovery"?await this._notifyAllSubscribers("PASSWORD_RECOVERY",a):await this._notifyAllSubscribers("SIGNED_IN",a)},0),{error:null}}return await this._recoverAndRefresh(),{error:null}}catch(n){return Oe(n)?this._returnResult({error:n}):this._returnResult({error:new _s("Unexpected error during initialization",n)})}finally{await this._handleVisibilityChange(),this._debug("#_initialize()","end")}}async signInAnonymously(e){var n,r,i;try{const s=await Ve(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{data:(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.data)!==null&&r!==void 0?r:{},gotrue_meta_security:{captcha_token:(i=e==null?void 0:e.options)===null||i===void 0?void 0:i.captchaToken}},xform:Gi}),{data:a,error:o}=s;if(o||!a)return this._returnResult({data:{user:null,session:null},error:o});const l=a.session,c=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(Oe(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signUp(e){var n,r,i;try{let s;if("email"in e){const{email:u,password:d,options:f}=e;let h=null,y=null;this.flowType==="pkce"&&([h,y]=await Vl(this.storage,this.storageKey)),s=await Ve(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,redirectTo:f==null?void 0:f.emailRedirectTo,body:{email:u,password:d,data:(n=f==null?void 0:f.data)!==null&&n!==void 0?n:{},gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken},code_challenge:h,code_challenge_method:y},xform:Gi})}else if("phone"in e){const{phone:u,password:d,options:f}=e;s=await Ve(this.fetch,"POST",`${this.url}/signup`,{headers:this.headers,body:{phone:u,password:d,data:(r=f==null?void 0:f.data)!==null&&r!==void 0?r:{},channel:(i=f==null?void 0:f.channel)!==null&&i!==void 0?i:"sms",gotrue_meta_security:{captcha_token:f==null?void 0:f.captchaToken}},xform:Gi})}else throw new rg("You must provide either an email or phone number and a password");const{data:a,error:o}=s;
387if(o||!a)return await Kn(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:o});const l=a.session,c=a.user;return a.session&&(await this._saveSession(a.session),await this._notifyAllSubscribers("SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(s){if(await Kn(this.storage,`${this.storageKey}-code-verifier`),Oe(s))return this._returnResult({data:{user:null,session:null},error:s});throw s}}async signInWithPassword(e){try{let n;if("email"in e){const{email:s,password:a,options:o}=e;n=await Ve(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{email:s,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:oE})}else if("phone"in e){const{phone:s,password:a,options:o}=e;n=await Ve(this.fetch,"POST",`${this.url}/token?grant_type=password`,{headers:this.headers,body:{phone:s,password:a,gotrue_meta_security:{captcha_token:o==null?void 0:o.captchaToken}},xform:oE})}else throw new rg("You must provide either an email or phone number and a password");const{data:r,error:i}=n;if(i)return this._returnResult({data:{user:null,session:null},error:i});if(!r||!r.session||!r.user){const s=new iu;return this._returnResult({data:{user:null,session:null},error:s})}return r.session&&(await this._saveSession(r.session),await this._notifyAllSubscribers("SIGNED_IN",r.session)),this._returnResult({data:Object.assign({user:r.user,session:r.session},r.weak_password?{weakPassword:r.weak_password}:null),error:i})}catch(n){if(Oe(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOAuth(e){var n,r,i,s;return await this._handleProviderSignIn(e.provider,{redirectTo:(n=e.options)===null||n===void 0?void 0:n.redirectTo,scopes:(r=e.options)===null||r===void 0?void 0:r.scopes,queryParams:(i=e.options)===null||i===void 0?void 0:i.queryParams,skipBrowserRedirect:(s=e.options)===null||s===void 0?void 0:s.skipBrowserRedirect})}async exchangeCodeForSession(e){return await this.initializePromise,this.lock!=null?this._acquireLock(this.lockAcquireTimeout,async()=>this._exchangeCodeForSession(e)):this._exchangeCodeForSession(e)}async signInWithWeb3(e){const{chain:n}=e;switch(n){case"ethereum":return await this.signInWithEthereum(e);case"solana":return await this.signInWithSolana(e);default:throw new Error(`@supabase/auth-js: Unsupported chain "${n}"`)}}async signInWithEthereum(e){var n,r,i,s,a,o,l,c,u,d,f;let h,y;if("message"in e)h=e.message,y=e.signature;else{const{chain:v,wallet:_,statement:w,options:x}=e;let k;if(Ir())if(typeof _=="object")k=_;else{const I=window;if("ethereum"in I&&typeof I.ethereum=="object"&&"request"in I.ethereum&&typeof I.ethereum.request=="function")k=I.ethereum;else throw new Error("@supabase/auth-js: No compatible Ethereum wallet interface on the window object (window.ethereum) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'ethereum', wallet: resolvedUserWallet }) instead.")}else{if(typeof _!="object"||!(x!=null&&x.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");k=_}const N=new URL((n=x==null?void 0:x.url)!==null&&n!==void 0?n:window.location.href),R=await k.request({method:"eth_requestAccounts"}).then(I=>I).catch(()=>{throw new Error("@supabase/auth-js: Wallet method eth_requestAccounts is missing or invalid")});if(!R||R.length===0)throw new Error("@supabase/auth-js: No accounts available. Please ensure the wallet is connected.");const H=BT(R[0]);let F=(r=x==null?void 0:x.signInWithEthereum)===null||r===void 0?void 0:r.chainId;if(!F){const I=await k.request({method:"eth_chainId"});F=lH(I)}const M={domain:N.host,address:H,statement:w,uri:N.href,version:"1",chainId:F,nonce:(i=x==null?void 0:x.signInWithEthereum)===null||i===void 0?void 0:i.nonce,issuedAt:(a=(s=x==null?void 0:x.signInWithEthereum)===null||s===void 0?void 0:s.issuedAt)!==null&&a!==void 0?a:new Date,expirationTime:(o=x==null?void 0:x.signInWithEthereum)===null||o===void 0?void 0:o.expirationTime,notBefore:(l=x==null?void 0:x.signInWithEthereum)===null||l===void 0?void 0:l.notBefore,requestId:(c=x==null?void 0:x.signInWithEthereum)===null||c===void 0?void 0:c.requestId,resources:(u=x==null?void 0:x.signInWithEthereum)===null||u===void 0?void 0:u.resources};h=uH(M),y=await k.request({method:"personal_sign",params:[cH(h),H]})}try{const{data:v,error:_}=await Ve(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"ethereum",message:h,signature:y},!((d=e.options)===null||d===void 0)&&d.captchaToken?{gotrue_meta_security:{captcha_token:(f=e.options)===null||f===void 0?void 0:f.captchaToken}}:null),xform:Gi});if(_)throw _;if(!v||!v.session||!v.user){const w=new iu;return this._returnResult({data:{user:null,session:null},error:w})}return v.session&&(await this._saveSession(v.session),await this._notifyAllSubscribers("SIGNED_IN",v.session)),this._returnResult({data:Object.assign({},v),error:_})}catch(v){if(Oe(v))return this._returnResult({data:{user:null,session:null},error:v});throw v}}async signInWithSolana(e){var n,r,i,s,a,o,l,c,u,d,f,h;let y,v;if("message"in e)y=e.message,v=e.signature;else{const{chain:_,wallet:w,statement:x,options:k}=e;let N;if(Ir())if(typeof w=="object")N=w;else{const H=window;if("solana"in H&&typeof H.solana=="object"&&("signIn"in H.solana&&typeof H.solana.signIn=="function"||"signMessage"in H.solana&&typeof H.solana.signMessage=="function"))N=H.solana;else throw new Error("@supabase/auth-js: No compatible Solana wallet interface on the window object (window.solana) detected. Make sure the user already has a wallet installed and connected for this app. Prefer passing the wallet interface object directly to signInWithWeb3({ chain: 'solana', wallet: resolvedUserWallet }) instead.")}else{if(typeof w!="object"||!(k!=null&&k.url))throw new Error("@supabase/auth-js: Both wallet and url must be specified in non-browser environments.");N=w}const R=new URL((n=k==null?void 0:k.url)!==null&&n!==void 0?n:window.location.href);if("signIn"in N&&N.signIn){const H=await N.signIn(Object.assign(Object.assign(Object.assign({issuedAt:new Date().toISOString()},k==null?void 0:k.signInWithSolana),{version:"1",domain:R.host,uri:R.href}),x?{statement:x}:null));let F;if(Array.isArray(H)&&H[0]&&typeof H[0]=="object")F=H[0];else if(H&&typeof H=="object"&&"signedMessage"in H&&"signature"in H)F=H;else throw new Error("@supabase/auth-js: Wallet method signIn() returned unrecognized value");if("signedMessage"in F&&"signature"in F&&(typeof F.signedMessage=="string"||F.signedMessage instanceof Uint8Array)&&F.signature instanceof Uint8Array)y=typeof F.signedMessage=="string"?F.signedMessage:new TextDecoder().decode(F.signedMessage),v=F.signature;else throw new Error("@supabase/auth-js: Wallet method signIn() API returned object without signedMessage and signature fields")}else{if(!("signMessage"in N)||typeof N.signMessage!="function"||!("publicKey"in N)||typeof N!="object"||!N.publicKey||!("toBase58"in N.publicKey)||typeof N.publicKey.toBase58!="function")throw new Error("@supabase/auth-js: Wallet does not have a compatible signMessage() and publicKey.toBase58() API");y=[`${R.host} wants you to sign in with your Solana account:`,N.publicKey.toBase58(),...x?["",x,""]:[""],"Version: 1",`URI: ${R.href}`,`Issued At: ${(i=(r=k==null?void 0:k.signInWithSolana)===null||r===void 0?void 0:r.issuedAt)!==null&&i!==void 0?i:new Date().toISOString()}`,...!((s=k==null?void 0:k.signInWithSolana)===null||s===void 0)&&s.notBefore?[`Not Before: ${k.signInWithSolana.notBefore}`]:[],...!((a=k==null?void 0:k.signInWithSolana)===null||a===void 0)&&a.expirationTime?[`Expiration Time: ${k.signInWithSolana.expirationTime}`]:[],...!((o=k==null?void 0:k.signInWithSolana)===null||o===void 0)&&o.chainId?[`Chain ID: ${k.signInWithSolana.chainId}`]:[],...!((l=k==null?void 0:k.signInWithSolana)===null||l===void 0)&&l.nonce?[`Nonce: ${k.signInWithSolana.nonce}`]:[],...!((c=k==null?void 0:k.signInWithSolana)===null||c===void 0)&&c.requestId?[`Request ID: ${
387k.signInWithSolana.requestId}`]:[],...!((d=(u=k==null?void 0:k.signInWithSolana)===null||u===void 0?void 0:u.resources)===null||d===void 0)&&d.length?["Resources",...k.signInWithSolana.resources.map(F=>`- ${F}`)]:[]].join(` 388`);const H=await N.signMessage(new TextEncoder().encode(y),"utf8");if(!H||!(H instanceof Uint8Array))throw new Error("@supabase/auth-js: Wallet signMessage() API returned an recognized value");v=H}}try{const{data:_,error:w}=await Ve(this.fetch,"POST",`${this.url}/token?grant_type=web3`,{headers:this.headers,body:Object.assign({chain:"solana",message:y,signature:tc(v)},!((f=e.options)===null||f===void 0)&&f.captchaToken?{gotrue_meta_security:{captcha_token:(h=e.options)===null||h===void 0?void 0:h.captchaToken}}:null),xform:Gi});if(w)throw w;if(!_||!_.session||!_.user){const x=new iu;return this._returnResult({data:{user:null,session:null},error:x})}return _.session&&(await this._saveSession(_.session),await this._notifyAllSubscribers("SIGNED_IN",_.session)),this._returnResult({data:Object.assign({},_),error:w})}catch(_){if(Oe(_))return this._returnResult({data:{user:null,session:null},error:_});throw _}}async _exchangeCodeForSession(e){const n=await fs(this.storage,`${this.storageKey}-code-verifier`),[r,i]=(n??"").split("/");try{if(!r&&this.flowType==="pkce")throw new Tq;const{data:s,error:a}=await Ve(this.fetch,"POST",`${this.url}/token?grant_type=pkce`,{headers:this.headers,body:{auth_code:e,code_verifier:r},xform:Gi});if(await Kn(this.storage,`${this.storageKey}-code-verifier`),a)throw a;if(!s||!s.session||!s.user){const o=new iu;return this._returnResult({data:{user:null,session:null,redirectType:null},error:o})}return s.session&&(await this._saveSession(s.session),await this._notifyAllSubscribers(i==="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",s.session)),this._returnResult({data:Object.assign(Object.assign({},s),{redirectType:i??null}),error:a})}catch(s){if(await Kn(this.storage,`${this.storageKey}-code-verifier`),Oe(s))return this._returnResult({data:{user:null,session:null,redirectType:null},error:s});throw s}}async signInWithIdToken(e){try{const{options:n,provider:r,token:i,access_token:s,nonce:a}=e,o=await Ve(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,body:{provider:r,id_token:i,access_token:s,nonce:a,gotrue_meta_security:{captcha_token:n==null?void 0:n.captchaToken}},xform:Gi}),{data:l,error:c}=o;if(c)return this._returnResult({data:{user:null,session:null},error:c});if(!l||!l.session||!l.user){const u=new iu;return this._returnResult({data:{user:null,session:null},error:u})}return l.session&&(await this._saveSession(l.session),await this._notifyAllSubscribers("SIGNED_IN",l.session)),this._returnResult({data:l,error:c})}catch(n){if(Oe(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async signInWithOtp(e){var n,r,i,s,a;try{if("email"in e){const{email:o,options:l}=e;let c=null,u=null;this.flowType==="pkce"&&([c,u]=await Vl(this.storage,this.storageKey));const{error:d}=await Ve(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{email:o,data:(n=l==null?void 0:l.data)!==null&&n!==void 0?n:{},create_user:(r=l==null?void 0:l.shouldCreateUser)!==null&&r!==void 0?r:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},code_challenge:c,code_challenge_method:u},redirectTo:l==null?void 0:l.emailRedirectTo});return this._returnResult({data:{user:null,session:null},error:d})}if("phone"in e){const{phone:o,options:l}=e,{data:c,error:u}=await Ve(this.fetch,"POST",`${this.url}/otp`,{headers:this.headers,body:{phone:o,data:(i=l==null?void 0:l.data)!==null&&i!==void 0?i:{},create_user:(s=l==null?void 0:l.shouldCreateUser)!==null&&s!==void 0?s:!0,gotrue_meta_security:{captcha_token:l==null?void 0:l.captchaToken},channel:(a=l==null?void 0:l.channel)!==null&&a!==void 0?a:"sms"}});return this._returnResult({data:{user:null,session:null,messageId:c==null?void 0:c.message_id},error:u})}throw new rg("You must provide either an email or phone number.")}catch(o){if(await Kn(this.storage,`${this.storageKey}-code-verifier`),Oe(o))return this._returnResult({data:{user:null,session:null},error:o});throw o}}async verifyOtp(e){var n,r;try{let i,s;"options"in e&&(i=(n=e.options)===null||n===void 0?void 0:n.redirectTo,s=(r=e.options)===null||r===void 0?void 0:r.captchaToken);const{data:a,error:o}=await Ve(this.fetch,"POST",`${this.url}/verify`,{headers:this.headers,body:Object.assign(Object.assign({},e),{gotrue_meta_security:{captcha_token:s}}),redirectTo:i,xform:Gi});if(o)throw o;if(!a)throw new Error("An error occurred on token verification.");const l=a.session,c=a.user;return l!=null&&l.access_token&&(await this._saveSession(l),await this._notifyAllSubscribers(e.type=="recovery"?"PASSWORD_RECOVERY":"SIGNED_IN",l)),this._returnResult({data:{user:c,session:l},error:null})}catch(i){if(Oe(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}}async signInWithSSO(e){var n,r,i,s,a;try{let o=null,l=null;this.flowType==="pkce"&&([o,l]=await Vl(this.storage,this.storageKey));const c=await Ve(this.fetch,"POST",`${this.url}/sso`,{body:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},"providerId"in e?{provider_id:e.providerId}:null),"domain"in e?{domain:e.domain}:null),{redirect_to:(r=(n=e.options)===null||n===void 0?void 0:n.redirectTo)!==null&&r!==void 0?r:void 0}),!((i=e==null?void 0:e.options)===null||i===void 0)&&i.captchaToken?{gotrue_meta_security:{captcha_token:e.options.captchaToken}}
388:null),{skip_http_redirect:!0,code_challenge:o,code_challenge_method:l}),headers:this.headers,xform:nH});return!((s=c.data)===null||s===void 0)&&s.url&&Ir()&&!(!((a=e.options)===null||a===void 0)&&a.skipBrowserRedirect)&&window.location.assign(c.data.url),this._returnResult(c)}catch(o){if(await Kn(this.storage,`${this.storageKey}-code-verifier`),Oe(o))return this._returnResult({data:null,error:o});throw o}}async reauthenticate(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._reauthenticate()):await this._reauthenticate()}async _reauthenticate(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)throw r;if(!n)throw new cr;const{error:i}=await Ve(this.fetch,"GET",`${this.url}/reauthenticate`,{headers:this.headers,jwt:n.access_token});return this._returnResult({data:{user:null,session:null},error:i})})}catch(e){if(Oe(e))return this._returnResult({data:{user:null,session:null},error:e});throw e}}async resend(e){try{const n=`${this.url}/resend`;if("email"in e){const{email:r,type:i,options:s}=e;let a=null,o=null;this.flowType==="pkce"&&([a,o]=await Vl(this.storage,this.storageKey));const{error:l}=await Ve(this.fetch,"POST",n,{headers:this.headers,body:{email:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken},code_challenge:a,code_challenge_method:o},redirectTo:s==null?void 0:s.emailRedirectTo});return l&&await Kn(this.storage,`${this.storageKey}-code-verifier`),this._returnResult({data:{user:null,session:null},error:l})}else if("phone"in e){const{phone:r,type:i,options:s}=e,{data:a,error:o}=await Ve(this.fetch,"POST",n,{headers:this.headers,body:{phone:r,type:i,gotrue_meta_security:{captcha_token:s==null?void 0:s.captchaToken}}});return this._returnResult({data:{user:null,session:null,messageId:a==null?void 0:a.message_id},error:o})}throw new rg("You must provide either an email or phone number and a type")}catch(n){if(await Kn(this.storage,`${this.storageKey}-code-verifier`),Oe(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async getSession(){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>this._useSession(async e=>e)):await this._useSession(async e=>e)}async _acquireLock(e,n){this._debug("#_acquireLock","begin",e);try{if(this.lockAcquired){const r=this.pendingInLock.length?this.pendingInLock[this.pendingInLock.length-1]:Promise.resolve(),i=(async()=>(await r,await n()))();return this.pendingInLock.push((async()=>{try{await i}catch{}})()),i}return await this.lock(`lock:${this.storageKey}`,e,async()=>{this._debug("#_acquireLock","lock acquired for storage key",this.storageKey);try{this.lockAcquired=!0;const r=n();for(this.pendingInLock.push((async()=>{try{await r}catch{}})()),await r;this.pendingInLock.length;){const i=[...this.pendingInLock];await Promise.all(i),this.pendingInLock.splice(0,i.length)}return await r}finally{this._debug("#_acquireLock","lock released for storage key",this.storageKey),this.lockAcquired=!1}})}finally{this._debug("#_acquireLock","end")}}async _useSession(e){this._debug("#_useSession","begin");try{const n=await this.__loadSession();return await e(n)}finally{this._debug("#_useSession","end")}}async __loadSession(){this._debug("#__loadSession()","begin"),this.lock!=null&&!this.lockAcquired&&this._debug("#__loadSession()","used outside of an acquired lock!",new Error().stack);try{let e=null;const n=await fs(this.storage,this.storageKey);if(this._debug("#getSession()","session from storage",n),n!==null&&(this._isValidSession(n)?e=n:(this._debug("#getSession()","session from storage is not valid"),await this._removeSession())),!e)return{data:{session:null},error:null};const r=e.expires_at?e.expires_at*1e3-Date.now()<jy:!1;if(this._debug("#__loadSession()",`session has${r?"":" not"} expired`,"expires_at",e.expires_at),!r){if(this.userStorage){const a=await fs(this.userStorage,this.storageKey+"-user");a!=null&&a.user?e.user=a.user:e.user=Oy()}if(this.storage.isServer&&e.user&&!e.user.__isUserNotAvailableProxy){const a={value:this.suppressGetSessionWarning};e.user=Xq(e.user,a),a.value&&(this.suppressGetSessionWarning=!0)}return{data:{session:e},error:null}}const{data:i,error:s}=await this._callRefreshToken(e.refresh_token);if(s){if(!!(e.expires_at&&e.expires_at*1e3>Date.now())){const o=await fs(this.storage,this.storageKey);if(o&&o.refresh_token===e.refresh_token)return this._returnResult({data:{session:e},error:null})}return this._returnResult({data:{session:null},error:s})}return this._returnResult({data:{session:i},error:null})}finally{this._debug("#__loadSession()","end")}}async getUser(e){if(e)return await this._getUser(e);await this.initializePromise;let n;return this.lock!=null?n=await this._acquireLock(this.lockAcquireTimeout,async()=>await this._getUser()):n=await this._getUser(),n.data.user&&(this.suppressGetSessionWarning=!0),n}async _getUser(e){try{return e?await Ve(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:e,xform:Uo}):await this._useSession(async n=>{var r,i,s;const{data:a,error:o}=n;
388if(o)throw o;return!(!((r=a.session)===null||r===void 0)&&r.access_token)&&!this.hasCustomAuthorizationHeader?{data:{user:null},error:new cr}:await Ve(this.fetch,"GET",`${this.url}/user`,{headers:this.headers,jwt:(s=(i=a.session)===null||i===void 0?void 0:i.access_token)!==null&&s!==void 0?s:void 0,xform:Uo})})}catch(n){if(Oe(n))return ng(n)&&(await this._removeSession(),await Kn(this.storage,`${this.storageKey}-code-verifier`)),this._returnResult({data:{user:null},error:n});throw n}}async updateUser(e,n={}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._updateUser(e,n)):await this._updateUser(e,n)}async _updateUser(e,n={}){try{return await this._useSession(async r=>{const{data:i,error:s}=r;if(s)throw s;if(!i.session)throw new cr;const a=i.session;let o=null,l=null;this.flowType==="pkce"&&e.email!=null&&([o,l]=await Vl(this.storage,this.storageKey));const{data:c,error:u}=await Ve(this.fetch,"PUT",`${this.url}/user`,{headers:this.headers,redirectTo:n==null?void 0:n.emailRedirectTo,body:Object.assign(Object.assign({},e),{code_challenge:o,code_challenge_method:l}),jwt:a.access_token,xform:Uo});if(u)throw u;return a.user=c.user,await this._saveSession(a),await this._notifyAllSubscribers("USER_UPDATED",a),this._returnResult({data:{user:a.user},error:null})})}catch(r){if(await Kn(this.storage,`${this.storageKey}-code-verifier`),Oe(r))return this._returnResult({data:{user:null},error:r});throw r}}async setSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._setSession(e)):await this._setSession(e)}async _setSession(e){try{if(!e.access_token||!e.refresh_token)throw new cr;const n=Date.now()/1e3;let r=n,i=!0,s=null;const{payload:a}=sg(e.access_token);if(a.exp&&(r=a.exp,i=r<=n),i){const{data:o,error:l}=await this._callRefreshToken(e.refresh_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});if(!o)return{data:{user:null,session:null},error:null};s=o}else{const{data:o,error:l}=await this._getUser(e.access_token);if(l)return this._returnResult({data:{user:null,session:null},error:l});s={access_token:e.access_token,refresh_token:e.refresh_token,user:o.user,token_type:"bearer",expires_in:r-n,expires_at:r},await this._saveSession(s),await this._notifyAllSubscribers("SIGNED_IN",s)}return this._returnResult({data:{user:s.user,session:s},error:null})}catch(n){if(Oe(n))return this._returnResult({data:{session:null,user:null},error:n});throw n}}async refreshSession(e){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._refreshSession(e)):await this._refreshSession(e)}async _refreshSession(e){try{return await this._useSession(async n=>{var r;if(!e){const{data:a,error:o}=n;if(o)throw o;e=(r=a.session)!==null&&r!==void 0?r:void 0}if(!(e!=null&&e.refresh_token))throw new cr;const{data:i,error:s}=await this._callRefreshToken(e.refresh_token);return s?this._returnResult({data:{user:null,session:null},error:s}):i?this._returnResult({data:{user:i.user,session:i},error:null}):this._returnResult({data:{user:null,session:null},error:null})})}catch(n){if(Oe(n))return this._returnResult({data:{user:null,session:null},error:n});throw n}}async _getSessionFromURL(e,n){var r;try{if(!Ir())throw new ig("No browser detected.");if(e.error||e.error_description||e.error_code)throw new ig(e.error_description||"Error in URL with unspecified error_description",{error:e.error||"unspecified_error",code:e.error_code||"unspecified_code"});switch(n){case"implicit":if(this.flowType==="pkce")throw new Xk("Not a valid PKCE flow url.");break;case"pkce":if(this.flowType==="implicit")throw new ig("Not a valid implicit grant flow url.");break;default:}if(n==="pkce"){if(this._debug("#_initialize()","begin","is PKCE flow",!0),!e.code)throw new Xk("No code detected.");const{data:k,error:N}=await this._exchangeCodeForSession(e.code);if(N)throw N;const R=new URL(window.location.href);return R.searchParams.delete("code"),window.history.replaceState(window.history.state,"",R.toString()),{data:{session:k.session,redirectType:(r=k.redirectType)!==null&&r!==void 0?r:null},error:null}}const{provider_token:i,provider_refresh_token:s,access_token:a,refresh_token:o,expires_in:l,expires_at:c,token_type:u}=e;if(!a||!l||!o||!u)throw new ig("No session defined in URL");const d=Math.round(Date.now()/1e3),f=parseInt(l);let h=d+f;c&&(h=parseInt(c));const y=h-d;
388y*1e3<=Va&&console.warn(`@supabase/gotrue-js: Session as retrieved from URL expires in ${y}s, should have been closer to ${f}s`);const v=h-f;d-v>=120?console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued over 120s ago, URL could be stale",v,h,d):d-v<0&&console.warn("@supabase/gotrue-js: Session as retrieved from URL was issued in the future? Check the device clock for skew",v,h,d);const{data:_,error:w}=await this._getUser(a);if(w)throw w;const x={provider_token:i,provider_refresh_token:s,access_token:a,expires_in:f,expires_at:h,refresh_token:o,token_type:u,user:_.user};return window.location.hash="",this._debug("#_getSessionFromURL()","clearing window.location.hash"),this._returnResult({data:{session:x,redirectType:e.type},error:null})}catch(i){if(Oe(i))return this._returnResult({data:{session:null,redirectType:null},error:i});throw i}}_isImplicitGrantCallback(e){return typeof this.detectSessionInUrl=="function"?this.detectSessionInUrl(new URL(window.location.href),e):!!(e.access_token||e.error||e.error_description||e.error_code)}async _isPKCECallback(e){const n=await fs(this.storage,`${this.storageKey}-code-verifier`);return!!(e.code&&n)}async signOut(e={scope:"global"}){return await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>await this._signOut(e)):await this._signOut(e)}async _signOut({scope:e}={scope:"global"}){return await this._useSession(async n=>{var r;const i=async()=>{await this._removeSession(),await Kn(this.storage,`${this.storageKey}-code-verifier`)},{data:s,error:a}=n;if(a&&!ng(a))return this._returnResult({error:a});const o=(r=s.session)===null||r===void 0?void 0:r.access_token;if(o){const{error:l}=await this.admin.signOut(o,e);if(l&&!(Cq(l)&&(l.status===404||l.status===401||l.status===403)||ng(l)))return e!=="others"&&await i(),this._returnResult({error:l})}return e!=="others"&&await i(),this._returnResult({error:null})})}onAuthStateChange(e){const n=Fq(),r={id:n,callback:e,unsubscribe:()=>{this._debug("#unsubscribe()","state change callback with id removed",n),this.stateChangeEmitters.delete(n)}};return this._debug("#onAuthStateChange()","registered callback with id",n),this.stateChangeEmitters.set(n,r),(async()=>(await this.initializePromise,this.lock!=null?await this._acquireLock(this.lockAcquireTimeout,async()=>{this._emitInitialSession(n)}):await this._emitInitialSession(n)))(),{data:{subscription:r}}}async _emitInitialSession(e){return await this._useSession(async n=>{var r,i;try{const{data:{session:s},error:a}=n;if(a)throw a;await((r=this.stateChangeEmitters.get(e))===null||r===void 0?void 0:r.callback("INITIAL_SESSION",s)),this._debug("INITIAL_SESSION","callback id",e,"session",s)}catch(s){await((i=this.stateChangeEmitters.get(e))===null||i===void 0?void 0:i.callback("INITIAL_SESSION",null)),this._debug("INITIAL_SESSION","callback id",e,"error",s),ng(s)?console.warn(s):console.error(s)}})}async resetPasswordForEmail(e,n={}){let r=null,i=null;this.flowType==="pkce"&&([r,i]=await Vl(this.storage,this.storageKey,!0));try{return await Ve(this.fetch,"POST",`${this.url}/recover`,{body:{email:e,code_challenge:r,code_challenge_method:i,gotrue_meta_security:{captcha_token:n.captchaToken}},headers:this.headers,redirectTo:n.redirectTo})}catch(s){if(await Kn(this.storage,`${this.storageKey}-code-verifier`),Oe(s))return this._returnResult({data:null,error:s});throw s}}async getUserIdentities(){var e;try{const{data:n,error:r}=await this.getUser();if(r)throw r;return this._returnResult({data:{identities:(e=n.user.identities)!==null&&e!==void 0?e:[]},error:null})}catch(n){if(Oe(n))return this._returnResult({data:null,error:n});throw n}}async linkIdentity(e){return"token"in e?this.linkIdentityIdToken(e):this.linkIdentityOAuth(e)}async linkIdentityOAuth(e){var n;try{const{data:r,error:i}=await this._useSession(async s=>{var a,o,l,c,u;const{data:d,error:f}=s;if(f)throw f;const h=await this._getUrlForProvider(`${this.url}/user/identities/authorize`,e.provider,{redirectTo:(a=e.options)===null||a===void 0?void 0:a.redirectTo,scopes:(o=e.options)===null||o===void 0?void 0:o.scopes,queryParams:(l=e.options)===null||l===void 0?void 0:l.queryParams,skipBrowserRedirect:!0});return await Ve(this.fetch,"GET",h,{headers:this.headers,jwt:(u=(c=d.session)===null||c===void 0?void 0:c.access_token)!==null&&u!==void 0?u:void 0})});if(i)throw i;return Ir()&&!(!((n=e.options)===null||n===void 0)&&n.skipBrowserRedirect)&&window.location.assign(r==null?void 0:r.url),this._returnResult({data:{provider:e.provider,url:r==null?void 0:r.url},error:null})}catch(r){if(Oe(r))return this._returnResult({data:{provider:e.provider,url:null},error:r});throw r}}async linkIdentityIdToken(e){return await this._useSession(async n=>{var r;try{const{error:i,data:{session:s}}=n;
388if(i)throw i;const{options:a,provider:o,token:l,access_token:c,nonce:u}=e,d=await Ve(this.fetch,"POST",`${this.url}/token?grant_type=id_token`,{headers:this.headers,jwt:(r=s==null?void 0:s.access_token)!==null&&r!==void 0?r:void 0,body:{provider:o,id_token:l,access_token:c,nonce:u,link_identity:!0,gotrue_meta_security:{captcha_token:a==null?void 0:a.captchaToken}},xform:Gi}),{data:f,error:h}=d;return h?this._returnResult({data:{user:null,session:null},error:h}):!f||!f.session||!f.user?this._returnResult({data:{user:null,session:null},error:new iu}):(f.session&&(await this._saveSession(f.session),await this._notifyAllSubscribers("USER_UPDATED",f.session)),this._returnResult({data:f,error:h}))}catch(i){if(await Kn(this.storage,`${this.storageKey}-code-verifier`),Oe(i))return this._returnResult({data:{user:null,session:null},error:i});throw i}})}async unlinkIdentity(e){try{return await this._useSession(async n=>{var r,i;const{data:s,error:a}=n;if(a)throw a;return await Ve(this.fetch,"DELETE",`${this.url}/user/identities/${e.identity_id}`,{headers:this.headers,jwt:(i=(r=s.session)===null||r===void 0?void 0:r.access_token)!==null&&i!==void 0?i:void 0})})}catch(n){if(Oe(n))return this._returnResult({data:null,error:n});throw n}}async _refreshAccessToken(e){const n="#_refreshAccessToken()";this._debug(n,"begin");try{const r=Date.now();return await Bq(async i=>(i>0&&await Uq(200*Math.pow(2,i-1)),this._debug(n,"refreshing attempt",i),await Ve(this.fetch,"POST",`${this.url}/token?grant_type=refresh_token`,{body:{refresh_token:e},headers:this.headers,xform:Gi})),(i,s)=>{const a=200*Math.pow(2,i);return s&&Qk(s)&&Date.now()+a-r<Va})}catch(r){if(this._debug(n,"error",r),Oe(r))return this._returnResult({data:{session:null,user:null},error:r});throw r}finally{this._debug(n,"end")}}_isValidSession(e){return typeof e=="object"&&e!==null&&"access_token"in e&&"refresh_token"in e&&"expires_at"in e}async _handleProviderSignIn(e,n){const r=await this._getUrlForProvider(`${this.url}/authorize`,e,{redirectTo:n.redirectTo,scopes:n.scopes,queryParams:n.queryParams});return this._debug("#_handleProviderSignIn()","provider",e,"options",n,"url",r),Ir()&&!n.skipBrowserRedirect&&window.location.assign(r),{data:{provider:e,url:r},error:null}}async _recoverAndRefresh(){var e,n;const r="#_recoverAndRefresh()";this._debug(r,"begin");try{const i=await fs(this.storage,this.storageKey);if(i&&this.userStorage){let a=await fs(this.userStorage,this.storageKey+"-user");!this.storage.isServer&&Object.is(this.storage,this.userStorage)&&!a&&(a={user:i.user},await gu(this.userStorage,this.storageKey+"-user",a)),i.user=(e=a==null?void 0:a.user)!==null&&e!==void 0?e:Oy()}else if(i&&!i.user&&!i.user){const a=await fs(this.storage,this.storageKey+"-user");a&&(a!=null&&a.user)?(i.user=a.user,await Kn(this.storage,this.storageKey+"-user"),await gu(this.storage,this.storageKey,i)):i.user=Oy()}if(this._debug(r,"session from storage",i),!this._isValidSession(i)){this._debug(r,"session is not valid"),i!==null&&await this._removeSession();return}const s=((n=i.expires_at)!==null&&n!==void 0?n:1/0)*1e3-Date.now()<jy;if(this._debug(r,`session has${s?"":" not"} expired with margin of ${jy}s`),s){if(this.autoRefreshToken&&i.refresh_token){const{error:a}=await this._callRefreshToken(i.refresh_token);a&&(Rq(a)?this._debug(r,"refresh discarded by commit guard",a):this._debug(r,"refresh failed",a))}}else if(i.user&&i.user.__isUserNotAvailableProxy===!0)try{const{data:a,error:o}=await this._getUser(i.access_token);!o&&(a!=null&&a.user)?(i.user=a.user,await this._saveSession(i),await this._notifyAllSubscribers("SIGNED_IN",i)):this._debug(r,"could not get user data, skipping SIGNED_IN notification")}catch(a){console.error("Error getting user data:",a),this._debug(r,"error getting user data, skipping SIGNED_IN notification",a)}else await this._notifyAllSubscribers("SIGNED_IN",i)}catch(i){this._debug(r,"error",i),console.error(i);return}finally{this._debug(r,"end")}}async _callRefreshToken(e){var n,r;if(!e)throw new cr;if(this.refreshingDeferred)return this.refreshingDeferred.promise;if(this.lastRefreshFailure&&this.lastRefreshFailure.refreshToken===e&&Date.now()<this.lastRefreshFailure.expiresAt)return this._debug("#_callRefreshToken()","returning c
388ached failure (cooldown active)"),this.lastRefreshFailure.result;const i="#_callRefreshToken()";this._debug(i,"begin");try{this.refreshingDeferred=new Kv;const s=await fs(this.storage,this.storageKey),{data:a,error:o}=await this._refreshAccessToken(e);if(o)throw o;if(!a.session)throw new cr;const l=await fs(this.storage,this.storageKey);if(s!==null&&(l===null||l.refresh_token!==s.refresh_token)){this._debug(i,"commit guard: storage changed since refresh started, discarding rotated tokens",{startedWith:"present",nowHolds:l?"replaced":"cleared"});const f={data:null,error:new eE};return this.refreshingDeferred.resolve(f),f}const u=this._sessionRemovalEpoch;if(await this._saveSession(a.session),this._sessionRemovalEpoch!==u){this._debug(i,"commit guard (post-save): _removeSession ran during _saveSession, undoing write"),await Kn(this.storage,this.storageKey),this.userStorage&&await Kn(this.userStorage,this.storageKey+"-user");const f={data:null,error:new eE};return this.refreshingDeferred.resolve(f),f}await this._notifyAllSubscribers("TOKEN_REFRESHED",a.session);const d={data:a.session,error:null};return this.lastRefreshFailure=null,this.refreshingDeferred.resolve(d),d}catch(s){if(this._debug(i,"error",s),Oe(s)){const a={data:null,error:s};if(!Qk(s)){const o=await fs(this.storage,this.storageKey);!!(o!=null&&o.expires_at&&o.expires_at*1e3>Date.now())?this._debug(i,"proactive refresh failed, access token still valid â preserving session"):await this._removeSession()}return this.lastRefreshFailure={refreshToken:e,result:a,expiresAt:Date.now()+xq},(n=this.refreshingDeferred)===null||n===void 0||n.resolve(a),a}throw(r=this.refreshingDeferred)===null||r===void 0||r.reject(s),s}finally{this.refreshingDeferred=null,this._debug(i,"end")}}async _notifyAllSubscribers(e,n,r=!0){if(this._pendingInitNotifications!==null&&r){this._pendingInitNotifications.push({event:e,session:n,broadcast:r});return}const i=`#_notifyAllSubscribers(${e})`;this._debug(i,"begin",n,`broadcast = ${r}`);try{this.broadcastChannel&&r&&this.broadcastChannel.postMessage({event:e,session:n});const s=[],a=Array.from(this.stateChangeEmitters.values()).map(async o=>{try{await o.callback(e,n)}catch(l){s.push(l)}});if(await Promise.all(a),s.length>0){for(let o=0;o<s.length;o+=1)console.error(s[o]);throw s[0]}}finally{this._debug(i,"end")}}async _saveSession(e){this._debug("#_saveSession()",e),this.suppressGetSessionWarning=!0;const n=Object.assign({},e),r=n.user&&n.user.__isUserNotAvailableProxy===!0;if(this.userStorage){!r&&n.user&&await gu(this.userStorage,this.storageKey+"-user",{user:n.user});const i=Object.assign({},n);delete i.user;const s=sE(i);await gu(this.storage,this.storageKey,s)}else{const i=sE(n);await gu(this.storage,this.storageKey,i)}}async _removeSession(){this._sessionRemovalEpoch+=1,this._debug("#_removeSession()"),this.lastRefreshFailure=null,this.suppressGetSessionWarning=!1,await Kn(this.storage,this.storageKey),await Kn(this.storage,this.storageKey+"-code-verifier"),await Kn(this.storage,this.storageKey+"-user"),this.userStorage&&await Kn(this.userStorage,this.storageKey+"-user"),await this._notifyAllSubscribers("SIGNED_OUT",null)}_removeVisibilityChangedCallback(){this._debug("#_removeVisibilityChangedCallback()");const e=this.visibilityChangedCallback;this.visibilityChangedCallback=null;try{e&&Ir()&&(window!=null&&window.removeEventListener)&&window.removeEventListener("visibilitychange",e)}catch(n){console.error("removing visibilitychange callback failed",n)}}async _startAutoRefresh(){await this._stopAutoRefresh(),this._debug("#_startAutoRefresh()");const e=setInterval(()=>this._autoRefreshTokenTick(),Va);this.autoRefreshTicker=e,e&&typeof e=="object"&&typeof e.unref=="function"?e.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(e);const n=setTimeout(async()=>{await this.initializePromise,await this._autoRefreshTokenTick()},0);this.autoRefreshTickTimeout=n,n&&typeof n=="object"&&typeof n.unref=="function"?n.unref():typeof Deno<"u"&&typeof Deno.unrefTimer=="function"&&Deno.unrefTimer(n)}async _stopAutoRefresh(){this._debug("#_stopAutoRefresh()");const e=this.autoRefreshTicker;this.autoRefreshTicker=null,e&&clearInterval(e);const n=this.autoRefreshTickTimeout;this.autoRefreshTickTimeout=null,n&&clearTimeout(n)}async startAutoRefresh(){this._removeVisibilityChangedCallback(),await this._startAutoRefresh()}async stopAutoRefresh(){this._removeVisibilityChangedCallback(),await this._stopAutoRefresh()}async dispose(){var e;this._removeVisibilityChangedCallback(),await this._stopAutoRefresh(),(e=this.broadcastChannel)===null||e===void 0||e.close(),this.broadcastChannel=null,this.stateChangeEmitters.clear()}async _autoRefreshTokenTick(){if(this._debug("#_autoRefreshTokenTick()","begin"),this.lock!=null){try{await this._acquireLock(0,async()=>{try{const e=Date.now();try{return await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-e)/Va);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Va}ms, refresh threshold is ${zh} ticks`),i<=zh&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}})}catch(e){if(e instanceof aH)this._debug("auto refresh token tick lock not available");else throw e}return}if(this.refreshingDeferred!==null){this._debug("#_autoRefreshTokenTick()","refresh already in flight, skipping");return}try{const e=Date.now();try{await this._useSession(async n=>{const{data:{session:r}}=n;if(!r||!r.refresh_token||!r.expires_at){this._debug("#_autoRefreshTokenTick()","no session");return}const i=Math.floor((r.expires_at*1e3-e)/Va);this._debug("#_autoRefreshTokenTick()",`access token expires in ${i} ticks, a tick lasts ${Va}ms, refresh threshold is ${zh} ticks`),i<=zh&&await this._callRefreshToken(r.refresh_token)})}catch(n){console.error("Auto refresh tick failed with error. This is likely a transient error.",n)}}finally{this._debug("#_autoRefreshTokenTick()","end")}}async _handleVisibilityChange(){if(this._debug("#_handleVisibilityChange()"),!Ir()||!(window!=null&&window.addEventListener))return this.autoRefreshToken&&this.startAutoRefresh(),!1;try{this.visibilityChangedCallback=async()=>{try{await this._onVisibilityChanged(!1)}catch(e){this._debug("#visibilityChangedCallback","error",e)}},window==null||window.addEventListener("visibilitychange",this.visibilityChangedCallback),await this._onVisibilityChanged(!0)}catch(e){console.error("_handleVisibilityChange",e)}}async _onVisibilityChanged(e){const n=`#_onVisibilityChanged(${e})`;if(this._debug(n,"visibilityState",document.visibilityState),document.visibilityState==="visible"){if(this.autoRefreshToken&&this._startAutoRefresh(),!e)if(await this.initializePromise,this.lock!=null)await this._acquireLock(this.lockAcquireTimeout,async()=>
388{if(document.visibilityState!=="visible"){this._debug(n,"acquired the lock to recover the session, but the browser visibilityState is no longer visible, aborting");return}await this._recoverAndRefresh()});else{if(document.visibilityState!=="visible"){this._debug(n,"visibilityState is no longer visible, skipping recovery");return}await this._recoverAndRefresh()}}else document.visibilityState==="hidden"&&this.autoRefreshToken&&this._stopAutoRefresh()}async _getUrlForProvider(e,n,r){const i=[`provider=${encodeURIComponent(n)}`];if(r!=null&&r.redirectTo&&i.push(`redirect_to=${encodeURIComponent(r.redirectTo)}`),r!=null&&r.scopes&&i.push(`scopes=${encodeURIComponent(r.scopes)}`),this.flowType==="pkce"){const[s,a]=await Vl(this.storage,this.storageKey),o=new URLSearchParams({code_challenge:`${encodeURIComponent(s)}`,code_challenge_method:`${encodeURIComponent(a)}`});i.push(o.toString())}if(r!=null&&r.queryParams){const s=new URLSearchParams(r.queryParams);i.push(s.toString())}return r!=null&&r.skipBrowserRedirect&&i.push(`skip_http_redirect=${r.skipBrowserRedirect}`),`${e}?${i.join("&")}`}async _unenroll(e){try{return await this._useSession(async n=>{var r;const{data:i,error:s}=n;return s?this._returnResult({data:null,error:s}):await Ve(this.fetch,"DELETE",`${this.url}/factors/${e.factorId}`,{headers:this.headers,jwt:(r=i==null?void 0:i.session)===null||r===void 0?void 0:r.access_token})})}catch(n){if(Oe(n))return this._returnResult({data:null,error:n});throw n}}async _enroll(e){try{return await this._useSession(async n=>{var r,i;const{data:s,error:a}=n;if(a)return this._returnResult({data:null,error:a});const o=Object.assign({friendly_name:e.friendlyName,factor_type:e.factorType},e.factorType==="phone"?{phone:e.phone}:e.factorType==="totp"?{issuer:e.issuer}:{}),{data:l,error:c}=await Ve(this.fetch,"POST",`${this.url}/factors`,{body:o,headers:this.headers,jwt:(r=s==null?void 0:s.session)===null||r===void 0?void 0:r.access_token});return c?this._returnResult({data:null,error:c}):(e.factorType==="totp"&&l.type==="totp"&&(!((i=l==null?void 0:l.totp)===null||i===void 0)&&i.qr_code)&&(l.totp.qr_code=`data:image/svg+xml;utf-8,${l.totp.qr_code}`),this._returnResult({data:l,error:null}))})}catch(n){if(Oe(n))return this._returnResult({data:null,error:n});throw n}}async _verify(e){const n=async()=>{try{return await this._useSession(async r=>{var i;const{data:s,error:a}=r;if(a)return this._returnResult({data:null,error:a});const o=Object.assign({challenge_id:e.challengeId},"webauthn"in e?{webauthn:Object.assign(Object.assign({},e.webauthn),{credential_response:e.webauthn.type==="create"?hE(e.webauthn.credential_response):fE(e.webauthn.credential_response)})}:{code:e.code}),{data:l,error:c}=await Ve(this.fetch,"POST",`${this.url}/factors/${e.factorId}/verify`,{body:o,headers:this.headers,jwt:(i=s==null?void 0:s.session)===null||i===void 0?void 0:i.access_token});return c?this._returnResult({data:null,error:c}):(await this._saveSession(Object.assign({expires_at:Math.round(Date.now()/1e3)+l.expires_in},l)),await this._notifyAllSubscribers("MFA_CHALLENGE_VERIFIED",l),this._returnResult({data:l,error:c}))})}catch(r){if(Oe(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challenge(e){const n=async()=>{try{return await this._useSession(async r=>{var i;const{data:s,error:a}=r;if(a)return this._returnResult({data:null,error:a});const o=await Ve(this.fetch,"POST",`${this.url}/factors/${e.factorId}/challenge`,{body:e,headers:this.headers,jwt:(i=s==null?void 0:s.session)===null||i===void 0?void 0:i.access_token});if(o.error)return o;const{data:l}=o;if(l.type!=="webauthn")return{data:l,error:null};switch(l.webauthn.type){case"create":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:uE(l.webauthn.credential_options.publicKey)})})}),error:null};case"request":return{data:Object.assign(Object.assign({},l),{webauthn:Object.assign(Object.assign({},l.webauthn),{credential_options:Object.assign(Object.assign({},l.webauthn.credential_options),{publicKey:dE(l.webauthn.credential_options.publicKey)})})}),error:null}}})}catch(r){if(Oe(r))return this._returnResult({data:null,error:r});throw r}};return this.lock!=null?this._acquireLock(this.lockAcquireTimeout,n):n()}async _challengeAndVerify(e){const{data:n,error:r}=await this._challenge({factorId:e.factorId});return r?this._returnResult({data:null,error:r}):await this._verify({factorId:e.factorId,challengeId:n.id,code:e.code})}async _listFactors(){var e;const{data:{user:n},error:r}=await this.getUser();if(r)return{data:null,error:r};const i={all:[],phone:[],totp:[],webauthn:[]};for(const s of(e=n==null?void 0:n.factors)!==null&&e!==void 0?e:[])i.all.push(s),s.status==="verified"&&i[s.factor_type].push(s);return{data:i,error:null}}async _getAuthenticatorAssuranceLevel(e){var n,r,i,s;if(e)try{const{payload:h}=sg(e);let y=null;h.aal&&(y=h.aal);let v=y;const{data:{user:_},error:w}=await this.getUser(e);if(w)return this._returnResult({data:null,error:w});((r=(n=_==null?void 0:_.factors)===null||n===void 0?void 0:n.filter(N=>N.status==="verified"))!==null&&r!==void 0?r:[]).length>0&&(v="aal2");const k=h.amr||[];return{data:{currentLevel:y,nextLevel:v,currentAuthenticationMethods:k},error:null}}catch(h){if(Oe(h))return this._returnResult({data:null,error:h});throw h}const{data:{session:a},error:o}
388=await this.getSession();if(o)return this._returnResult({data:null,error:o});if(!a)return{data:{currentLevel:null,nextLevel:null,currentAuthenticationMethods:[]},error:null};const{payload:l}=sg(a.access_token);let c=null;l.aal&&(c=l.aal);let u=c;((s=(i=a.user.factors)===null||i===void 0?void 0:i.filter(h=>h.status==="verified"))!==null&&s!==void 0?s:[]).length>0&&(u="aal2");const f=l.amr||[];return{data:{currentLevel:c,nextLevel:u,currentAuthenticationMethods:f},error:null}}async _getAuthorizationDetails(e){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?await Ve(this.fetch,"GET",`${this.url}/oauth/authorizations/${e}`,{headers:this.headers,jwt:r.access_token,xform:s=>({data:s,error:null})}):this._returnResult({data:null,error:new cr})})}catch(n){if(Oe(n))return this._returnResult({data:null,error:n});throw n}}async _approveAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:i},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new cr});const a=await Ve(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"approve"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&Ir()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if(Oe(r))return this._returnResult({data:null,error:r});throw r}}async _denyAuthorization(e,n){try{return await this._useSession(async r=>{const{data:{session:i},error:s}=r;if(s)return this._returnResult({data:null,error:s});if(!i)return this._returnResult({data:null,error:new cr});const a=await Ve(this.fetch,"POST",`${this.url}/oauth/authorizations/${e}/consent`,{headers:this.headers,jwt:i.access_token,body:{action:"deny"},xform:o=>({data:o,error:null})});return a.data&&a.data.redirect_url&&Ir()&&!(n!=null&&n.skipBrowserRedirect)&&window.location.assign(a.data.redirect_url),a})}catch(r){if(Oe(r))return this._returnResult({data:null,error:r});throw r}}async _listOAuthGrants(){try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;return r?this._returnResult({data:null,error:r}):n?await Ve(this.fetch,"GET",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:n.access_token,xform:i=>({data:i,error:null})}):this._returnResult({data:null,error:new cr})})}catch(e){if(Oe(e))return this._returnResult({data:null,error:e});throw e}}async _revokeOAuthGrant(e){try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;return i?this._returnResult({data:null,error:i}):r?(await Ve(this.fetch,"DELETE",`${this.url}/user/oauth/grants`,{headers:this.headers,jwt:r.access_token,query:{client_id:e.clientId},noResolveJson:!0}),{data:{},error:null}):this._returnResult({data:null,error:new cr})})}catch(n){if(Oe(n))return this._returnResult({data:null,error:n});throw n}}async fetchJwk(e,n={keys:[]}){let r=n.keys.find(o=>o.kid===e);if(r)return r;const i=Date.now();if(r=this.jwks.keys.find(o=>o.kid===e),r&&this.jwks_cached_at+Nq>i)return r;const{data:s,error:a}=await Ve(this.fetch,"GET",`${this.url}/.well-known/jwks.json`,{headers:this.headers});if(a)throw a;return!s.keys||s.keys.length===0||(this.jwks=s,this.jwks_cached_at=i,r=s.keys.find(o=>o.kid===e),!r)?null:r}async getClaims(e,n={}){try{let r=e;if(!r){const{data:h,error:y}
388=await this.getSession();if(y||!h.session)return this._returnResult({data:null,error:y});r=h.session.access_token}const{header:i,payload:s,signature:a,raw:{header:o,payload:l}}=sg(r);if(!(n!=null&&n.allowExpired))try{Zq(s.exp)}catch(h){throw new O0(h instanceof Error?h.message:"JWT validation failed")}const c=!i.alg||i.alg.startsWith("HS")||!i.kid||!("crypto"in globalThis&&"subtle"in globalThis.crypto)?null:await this.fetchJwk(i.kid,n!=null&&n.keys?{keys:n.keys}:n==null?void 0:n.jwks);if(!c){const{error:h}=await this.getUser(r);if(h)throw h;return{data:{claims:s,header:i,signature:a},error:null}}const u=Yq(i.alg),d=await crypto.subtle.importKey("jwk",c,u,!0,["verify"]);if(!await crypto.subtle.verify(u,d,a,Dq(`${o}.${l}`)))throw new O0("Invalid JWT signature");return{data:{claims:s,header:i,signature:a},error:null}}catch(r){if(Oe(r))return this._returnResult({data:null,error:r});throw r}}async signInWithPasskey(e){var n,r,i;ms(this.experimental);try{if(!M0())return this._returnResult({data:null,error:new _s("Browser does not support WebAuthn",null)});const{data:s,error:a}=await this._startPasskeyAuthentication({options:{captchaToken:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}});if(a||!s)return this._returnResult({data:null,error:a});const o=dE(s.options),l=(i=(r=e==null?void 0:e.options)===null||r===void 0?void 0:r.signal)!==null&&i!==void 0?i:Zw.createNewAbortSignal(),{data:c,error:u}=await WT({publicKey:o,signal:l});if(u||!c)return this._returnResult({data:null,error:u??new _s("WebAuthn ceremony failed",null)});const d=fE(c);return this._verifyPasskeyAuthentication({challengeId:s.challenge_id,credential:d})}catch(s){if(Oe(s))return this._returnResult({data:null,error:s});throw s}}async registerPasskey(e){var n,r;ms(this.experimental);try{if(!M0())return this._returnResult({data:null,error:new _s("Browser does not support WebAuthn",null)});const{data:i,error:s}=await this._startPasskeyRegistration();if(s||!i)return this._returnResult({data:null,error:s});const a=uE(i.options),o=(r=(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.signal)!==null&&r!==void 0?r:Zw.createNewAbortSignal(),{data:l,error:c}=await HT({publicKey:a,signal:o});if(c||!l)return this._returnResult({data:null,error:c??new _s("WebAuthn ceremony failed",null)});const u=hE(l);return this._verifyPasskeyRegistration({challengeId:i.challenge_id,credential:u})}catch(i){if(Oe(i))return this._returnResult({data:null,error:i});throw i}}async _startPasskeyRegistration(){ms(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new cr});const{data:i,error:s}=await Ve(this.fetch,"POST",`${this.url}/passkeys/registration/options`,{headers:this.headers,jwt:n.access_token,body:{}});return s?this._returnResult({data:null,error:s}):this._returnResult({data:i,error:null})})}catch(e){if(Oe(e))return this._returnResult({data:null,error:e});throw e}}async _verifyPasskeyRegistration(e){ms(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new cr});const{data:s,error:a}=await Ve(this.fetch,"POST",`${this.url}/passkeys/registration/verify`,{headers:this.headers,jwt:r.access_token,body:{challenge_id:e.challengeId,credential:e.credential}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:s,error:null})})}catch(n){if(Oe(n))return this._returnResult({data:null,error:n});throw n}}async _startPasskeyAuthentication(e){var n;ms(this.experimental);try{const{data:r,error:i}=await Ve(this.fetch,"POST",`${this.url}/passkeys/authentication/options`,{headers:this.headers,body:{gotrue_meta_security:{captcha_token:(n=e==null?void 0:e.options)===null||n===void 0?void 0:n.captchaToken}}});return i?this._returnResult({data:null,error:i}):this._returnResult({data:r,error:null})}catch(r){if(Oe(r))return this._returnResult({data:null,error:r});throw r}}async _verifyPasskeyAuthentication(e){ms(this.experimental);try{const{data:n,error:r}=await Ve(this.fetch,"POST",`${this.url}/passkeys/authentication/verify`,{headers:this.headers,body:{challenge_id:e.challengeId,credential:e.credential},xform:Gi});return r?this._returnResult({data:null,error:r}):(n.session&&(await this._saveSession(n.session),await this._notifyAllSubscribers("SIGNED_IN",n.session)),this._returnResult({data:n,error:null}))}catch(n){if(Oe(n))return this._returnResult({data:null,error:n});throw n}}async _listPasskeys(){ms(this.experimental);try{return await this._useSession(async e=>{const{data:{session:n},error:r}=e;if(r)return this._returnResult({data:null,error:r});if(!n)return this._returnResult({data:null,error:new cr});const{data:i,error:s}=await Ve(this.fetch,"GET",`${this.url}/passkeys`,{headers:this.headers,jwt:n.access_token,xform:a=>({data:a,error:null})});return s?this._returnResult({data:null,error:s}):this._returnResult({data:i,error:null})})}catch(e){if(Oe(e))return this._returnResult({data:null,error:e});throw e}}async _updatePasskey(e){ms(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new cr});const{data:s,error:a}=await Ve(this.fetch,"PATCH",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:r.access_token,body:{friendly_name:e.friendlyName}});return a?this._returnResult({data:null,error:a}):this._returnResult({data:s,error:null})})}catch(n){if(Oe(n))return this._returnResult({data:null,error:n});throw n}}async _deletePasskey(e){ms(this.experimental);try{return await this._useSession(async n=>{const{data:{session:r},error:i}=n;if(i)return this._returnResult({data:null,error:i});if(!r)return this._returnResult({data:null,error:new cr});const{error:s}
388=await Ve(this.fetch,"DELETE",`${this.url}/passkeys/${e.passkeyId}`,{headers:this.headers,jwt:r.access_token,noResolveJson:!0});return s?this._returnResult({data:null,error:s}):this._returnResult({data:null,error:null})})}catch(n){if(Oe(n))return this._returnResult({data:null,error:n});throw n}}}Zf.nextInstanceID={};const bH=Zf,xH="2.110.7";let $h="",z0;if(typeof Deno<"u"){var Dy;$h="deno",z0=(Dy=Deno.version)===null||Dy===void 0?void 0:Dy.deno}else if(typeof document<"u")$h="web";else if(typeof navigator<"u"&&navigator.product==="ReactNative")$h="react-native";else{var My;$h="node";const t=globalThis.process;z0=t==null||(My=t.version)===null||My===void 0?void 0:My.replace(/^v/,"")}const VT=[`runtime=${$h}`];z0&&VT.push(`runtime-version=${z0}`);const _H={"X-Client-Info":`supabase-js/${xH}; ${VT.join("; ")}`},SH={headers:_H},kH={schema:"public"},EH={autoRefreshToken:!0,persistSession:!0,detectSessionInUrl:!0,flowType:"implicit"},NH={},AH={enabled:!1,respectSamplingDecision:!0};function CH(t,e,n,r){function i(s){return s instanceof n?s:new n(function(a){a(s)})}return new(n||(n=Promise))(function(s,a){function o(u){try{c(r.next(u))}catch(d){a(d)}}function l(u){try{c(r.throw(u))}catch(d){a(d)}}function c(u){u.done?s(u.value):i(u.value).then(o,l)}c((r=r.apply(t,[])).next())})}let Fy=null;const PH="@opentelemetry/api";function TH(){return Fy===null&&(Fy=import(PH).catch(()=>null)),Fy}function RH(){return CH(this,void 0,void 0,function*(){try{const t=yield TH();if(!t||!t.propagation||!t.context)return null;const e={};t.propagation.inject(t.context.active(),e);const n=e.traceparent;return n?{traceparent:n,tracestate:e.tracestate,baggage:e.baggage}:null}catch{return null}})}function LH(t){if(!t||typeof t!="string")return null;const e=t.split("-");if(e.length!==4)return null;const[n,r,i,s]=e;if(n.length!==2||r.length!==32||i.length!==16||s.length!==2)return null;const a=/^[0-9a-f]+$/i;return!a.test(n)||!a.test(r)||!a.test(i)||!a.test(s)||r==="00000000000000000000000000000000"||i==="0000000000000000"?null:{version:n,traceId:r,parentId:i,traceFlags:s,isSampled:(parseInt(s,16)&1)===1}}function jH(t,e){if(!t||!e||e.length===0)return!1;let n;if(t instanceof URL)n=t;else try{n=new URL(t)}catch{return!1}for(const r of e)try{if(typeof r=="string"){if(OH(n.hostname,r))return!0}else if(r instanceof RegExp){if(r.test(n.hostname))return!0}else if(typeof r=="function"&&r(n))return!0}catch{continue}return!1}function OH(t,e){if(e===t)return!0;if(e.startsWith("*.")){const n=e.slice(2);if(t.endsWith(n)&&(t===n||t.endsWith("."+n)))return!0}return!1}function IH(t){const e=[];try{const n=new URL(t);e.push(n.hostname)}catch{}return e.push("*.supabase.co","*.supabase.in"),e.push("localhost","127.0.0.1","[::1]"),e}function Yf(t){"@babel/helpers - typeof";return Yf=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Yf(t)}function DH(t,e){if(Yf(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var r=n.call(t,e||"default");if(Yf(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function MH(t){var e=DH(t,"string");return Yf(e)=="symbol"?e:e+""}function FH(t,e,n){return(e=MH(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function pE(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function jn(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?pE(Object(n),!0).forEach(function(r){FH(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):pE(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}const zH=t=>t?(...e)=>t(...e):(...e)=>fetch(...e),$H=()=>Headers,GT=t=>t.startsWith("sb_publishable_")||t.startsWith("sb_secret_"),UH="sb_temp_",mE=new Set,BH=t=>{var e,n;if(!t.startsWith("sb_")||GT(t)||t.startsWith(UH))return;const r=(e=(n=t.match(/^sb_[a-zA-Z0-9]+_/))===null||n===void 0?void 0:n[0])!==null&&e!==void 0?e:"unknown";mE.has(r)||(mE.add(r),console.warn("@supabase/supabase-js: Unrecognized Supabase API key format. The client will proceed and send this key as-is;
388 if you see authentication errors you may need to upgrade @supabase/supabase-js to a version that recognizes this key type."))},gE=(t,e,n,r,i,s)=>{const a=zH(r),o=$H(),l=(i==null?void 0:i.enabled)===!0,c=(i==null?void 0:i.respectSamplingDecision)!==!1,u=l?IH(e):null,d=!(s!=null&&s.omitApiKeyAsBearer&>(t));return async(f,h)=>{const y=await n();let v=new o(h==null?void 0:h.headers);if(v.has("apikey")||v.set("apikey",t),!v.has("Authorization")){const _=y??(d?t:null);_&&v.set("Authorization",`Bearer ${_}`)}if(u){const _=await qH(f,u,c);_&&(_.traceparent&&!v.has("traceparent")&&v.set("traceparent",_.traceparent),_.tracestate&&!v.has("tracestate")&&v.set("tracestate",_.tracestate),_.baggage&&!v.has("baggage")&&v.set("baggage",_.baggage))}return a(f,jn(jn({},h),{},{headers:v}))}};async function qH(t,e,n){if(!jH(typeof t=="string"||t instanceof URL?t:t.url,e))return null;const r=await RH();if(!r||!r.traceparent)return null;if(n){const i=LH(r.traceparent);if(i&&!i.isSampled)return null}return r}function vE(t){return typeof t=="boolean"?{enabled:t}:t}function HH(t){return t.endsWith("/")?t:t+"/"}function WH(t,e){var n,r,i,s,a,o;const{db:l,auth:c,realtime:u,global:d}=t,{db:f,auth:h,realtime:y,global:v}=e,_=vE(t.tracePropagation),w=vE(e.tracePropagation),x={db:jn(jn({},f),l),auth:jn(jn({},h),c),realtime:jn(jn({},y),u),storage:{},global:jn(jn(jn({},v),d),{},{headers:jn(jn({},(n=v==null?void 0:v.headers)!==null&&n!==void 0?n:{}),(r=d==null?void 0:d.headers)!==null&&r!==void 0?r:{})}),tracePropagation:{enabled:(i=(s=_==null?void 0:_.enabled)!==null&&s!==void 0?s:w==null?void 0:w.enabled)!==null&&i!==void 0?i:!1,respectSamplingDecision:(a=(o=_==null?void 0:_.respectSamplingDecision)!==null&&o!==void 0?o:w==null?void 0:w.respectSamplingDecision)!==null&&a!==void 0?a:!0},accessToken:async()=>""};return t.accessToken?x.accessToken=t.accessToken:delete x.accessToken,x}function VH(t){const e=t==null?void 0:t.trim();if(!e)throw new Error("supabaseUrl is required.");if(!e.match(/^https?:\/\//i))throw new Error("Invalid supabaseUrl: Must be a valid HTTP or HTTPS URL.");try{return new URL(HH(e))}catch{throw Error("Invalid supabaseUrl: Provided URL is malformed.")}}var GH=class extends bH{constructor(t){super(t)}},KH=class{constructor(t,e,n){var r,i;this.supabaseUrl=t,this.supabaseKey=e;const s=VH(t);if(!e)throw new Error("supabaseKey is required.");BH(e),this.realtimeUrl=new URL("realtime/v1",s),this.realtimeUrl.protocol=this.realtimeUrl.protocol.replace("http","ws"),this.authUrl=new URL("auth/v1",s),this.storageUrl=new URL("storage/v1",s),this.functionsUrl=new URL("functions/v1",s);const a=`sb-${s.hostname.split(".")[0]}-auth-token`,o={db:kH,realtime:NH,auth:jn(jn({},EH),{},{storageKey:a}),global:SH,tracePropagation:AH},l=WH(n??{},o);if(this.settings=l,this.storageKey=(r=l.auth.storageKey)!==null&&r!==void 0?r:"",this.headers=(i=l.global.headers)!==null&&i!==void 0?i:{},l.accessToken)this.accessToken=l.accessToken,this.auth=new Proxy({},{get:(u,d)=>{throw new Error(`@supabase/supabase-js: Supabase Client is configured with the accessToken option, accessing supabase.auth.${String(d)} is not possible`)}});else{var c;this.auth=this._initSupabaseAuthClient((c=l.auth)!==null&&c!==void 0?c:{},this.headers,l.global.fetch)}this.fetch=gE(e,t,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation),this.functionsFetch=gE(e,t,this._getSessionToken.bind(this),l.global.fetch,l.tracePropagation,{omitApiKeyAsBearer:!0}),this.realtime=this._initRealtimeClient(jn({headers:this.headers,accessToken:this._getAccessToken.bind(this),fetch:this.fetch},l.realtime)),this.accessToken&&Promise.resolve(this.accessToken()).then(u=>this.realtime.setAuth(u)).catch(u=>console.warn("Failed to set initial Realtime auth token:",u)),this.rest=new tB(new URL("rest/v1",s).href,{headers:this.headers,schema:l.db.schema,fetch:this.fetch,timeout:l.db.timeout,urlLengthLimit:l.db.urlLengthLimit}),this.storage=new bq(this.storageUrl.href,this.headers,this.fetch,n==null?void 0:n.storage),l.accessToken||this._listenForAuthEvents()}get functions(){return new VU(this.functionsUrl.href,{headers:this.headers,customFetch:this.functionsFetch})}from(t){return this.rest.from(t)}schema(t){return this.rest.schema(t)}rpc(t,e={},n={head:!1,get:!1,count:void 0}){return this.rest.rpc(t,e,n)}channel(t,e={config:{}}){return this.realtime.channel(t,e)}getChannels(){return this.realtime.getChannels()}removeChannel(t){return this.realtime.removeChannel(t)}removeAllChannels(){return this.realtime.removeAllChannels()}async _getSessionToken(){var t=this,e,n;if(t.accessToken)return await t.accessToken();const{data:r}=await t.auth.getSession();
388return(e=(n=r.session)===null||n===void 0?void 0:n.access_token)!==null&&e!==void 0?e:null}async _getAccessToken(){var t=this,e;return(e=await t._getSessionToken())!==null&&e!==void 0?e:t.supabaseKey}_initSupabaseAuthClient({autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:i,storageKey:s,flowType:a,lock:o,debug:l,throwOnError:c,experimental:u,lockAcquireTimeout:d,skipAutoInitialize:f},h,y){const v={Authorization:`Bearer ${this.supabaseKey}`,apikey:`${this.supabaseKey}`};return new GH({url:this.authUrl.href,headers:jn(jn({},v),h),storageKey:s,autoRefreshToken:t,persistSession:e,detectSessionInUrl:n,storage:r,userStorage:i,flowType:a,lock:o,debug:l,throwOnError:c,experimental:u,fetch:y,lockAcquireTimeout:d,skipAutoInitialize:f,hasCustomAuthorizationHeader:Object.keys(this.headers).some(_=>_.toLowerCase()==="authorization")})}_initRealtimeClient(t){return new HB(this.realtimeUrl.href,jn(jn({},t),{},{params:jn(jn({},{apikey:this.supabaseKey}),t==null?void 0:t.params)}))}_listenForAuthEvents(){return this.auth.onAuthStateChange((t,e)=>{this._handleTokenChanged(t,"CLIENT",e==null?void 0:e.access_token)})}_handleTokenChanged(t,e,n){(t==="TOKEN_REFRESHED"||t==="SIGNED_IN"||t==="INITIAL_SESSION")&&this.changedAccessToken!==n?(this.changedAccessToken=n,this.realtime.setAuth(n)):t==="SIGNED_OUT"&&(this.realtime.setAuth(),e=="STORAGE"&&this.auth.signOut(),this.changedAccessToken=void 0)}};const ZH=(t,e,n)=>new KH(t,e,n);function YH(){if(typeof window<"u")return!1;const t=globalThis.process;if(!t)return!1;const e=t.version;if(e==null)return!1;const n=e.match(/^v(\d+)\./);return n?parseInt(n[1],10)<=20:!1}YH()&&console.warn("â ï¸ Node.js 20 and below are deprecated and will no longer be supported in future versions of @supabase/supabase-js. Please upgrade to Node.js 22 or later. For more information, visit: https://github.com/orgs/supabase/discussions/45715");const JH="https://uzxjwgnceajzqotqprsw.supabase.co",yE="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InV6eGp3Z25jZWFqenFvdHFwcnN3Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODQzMTg1NDAsImV4cCI6MjA5OTg5NDU0MH0.rWZJOm8FpFnYlNIWJC34hjbwwj6L3ZnqI_90I0W-7Lc";function XH(t){return t.startsWith("sb_publishable_")||t.startsWith("sb_secret_")}function QH(t){return(e,n)=>{const r=new Headers(typeof Request<"u"&&e instanceof Request?e.headers:void 0);return n!=null&&n.headers&&new Headers(n.headers).forEach((i,s)=>r.set(s,i)),XH(t)&&r.get("Authorization")===`Bearer ${t}`&&r.delete("Authorization"),r.set("apikey",t),fetch(e,{...n,headers:r})}}const aa=ZH(JH,yE,{global:{fetch:QH(yE)},auth:{storage:localStorage,persistSession:!0,autoRefreshToken:!0}}),KT=E.createContext({user:null,session:null,loading:!0,signOut:async()=>{}}),eW=({children:t})=>{const[e,n]=E.useState(null),[r,i]=E.useState(null),[s,a]=E.useState(!0);E.useEffect(()=>{const{data:l}=aa.auth.onAuthStateChange((c,u)=>{n(u),i((u==null?void 0:u.user)??null)});return aa.auth.getSession().then(({data:c})=>{var u;n(c.session),i(((u=c.session)==null?void 0:u.user)??null),a(!1)}),()=>l.subscription.unsubscribe()},[]);const o=async()=>{await aa.auth.signOut()};return m.jsx(KT.Provider,{value:{user:r,session:e,loading:s,signOut:o},children:t})},zd=()=>E.useContext(KT),wE={subscribed:!1,plan:null,status:null,current_period_end:null,analyses_used:0,analyses_remaining:0},Rp=()=>{const{user:t,session:e}=zd(),[n,r]=E.useState(wE),[i,s]=E.useState(!1),a=E.useCallback(async()=>{if(!t||!e){r(wE);return}s(!0);try{const{data:o,error:l}=await aa.functions.invoke("check-subscription");if(l)throw l;o&&r(o)}catch(o){console.error("check-subscription failed",o)}finally{s(!1)}},[t,e]);return E.useEffect(()=>{a()},[a]),{...n,loading:i,refresh:a}};var tW=E.createContext(void 0);function Zv(t){const e=E.useContext(tW);return t||e||"ltr"}var nW="DismissableLayer",Yw="dismissableLayer.update",rW="dismissableLayer.pointerDownOutside",iW="dismissableLayer.focusOutside",bE,ZT=E.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),YT=E.forwardRef((t,e)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=t,c=E.useContext(ZT),[u,d]=E.useState(null),f=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=E.useState({}),y=an(e,F=>
vendor: 30,485 bytes, lines 388-391
388d(F)),v=Array.from(c.layers),[_]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),w=v.indexOf(_),x=u?v.indexOf(u):-1,k=c.layersWithOutsidePointerEventsDisabled.size>0,N=x>=w,R=oW(F=>{const M=F.target,I=[...c.branches].some(G=>G.contains(M));!N||I||(i==null||i(F),a==null||a(F),F.defaultPrevented||o==null||o())},f),H=lW(F=>{const M=F.target;[...c.branches].some(G=>G.contains(M))||(s==null||s(F),a==null||a(F),F.defaultPrevented||o==null||o())},f);return _x(F=>{x===c.layers.size-1&&(r==null||r(F),!F.defaultPrevented&&o&&(F.preventDefault(),o()))},f),E.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(bE=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),xE(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=bE)}},[u,f,n,c]),E.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),xE())},[u,c]),E.useEffect(()=>{const F=()=>h({});return document.addEventListener(Yw,F),()=>document.removeEventListener(Yw,F)},[]),m.jsx(xt.div,{...l,ref:y,style:{pointerEvents:k?N?"auto":"none":void 0,...t.style},onFocusCapture:qe(t.onFocusCapture,H.onFocusCapture),onBlurCapture:qe(t.onBlurCapture,H.onBlurCapture),onPointerDownCapture:qe(t.onPointerDownCapture,R.onPointerDownCapture)})});YT.displayName=nW;var sW="DismissableLayerBranch",aW=E.forwardRef((t,e)=>{const n=E.useContext(ZT),r=E.useRef(null),i=an(e,r);return E.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),m.jsx(xt.div,{...t,ref:i})});aW.displayName=sW;function oW(t,e=globalThis==null?void 0:globalThis.document){const n=or(t),r=E.useRef(!1),i=E.useRef(()=>{});return E.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let l=function(){JT(rW,n,c,{discrete:!0})};const c={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=l,e.addEventListener("click",i.current,{once:!0})):l()}else e.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{e.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),e.removeEventListener("pointerdown",s),e.removeEventListener("click",i.current)}},[e,n]),{onPointerDownCapture:()=>r.current=!0}}function lW(t,e=globalThis==null?void 0:globalThis.document){const n=or(t),r=E.useRef(!1);return E.useEffect(()=>{const i=s=>{s.target&&!r.current&&JT(iW,n,{originalEvent:s},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function xE(){const t=new CustomEvent(Yw);document.dispatchEvent(t)}function JT(t,e,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:n});e&&i.addEventListener(t,e,{once:!0}),r?Ap(i,s):i.dispatchEvent(s)}var zy=0;function cW(){E.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??_E()),document.body.insertAdjacentElement("beforeend",t[1]??_E()),zy++,()=>{zy===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),zy--}},[])}function _E(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",t}var uW="Portal",XT=E.forwardRef((t,e)=>{var o;const{container:n,...r}=t,[i,s]=E.useState(!1);Xr(()=>s(!0),[]);const a=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?_v.createPortal(m.jsx(xt.div,{...r,ref:e}),a):null});XT.displayName=uW;var $y="rovingFocusGroup.onEntryFocus",dW={bubbles:!1,cancelable:!0},Yv="RovingFocusGroup",[Jw,QT,hW]=kv(Yv),[fW,Jv]=uo(Yv,[hW]),[pW,mW]=fW(Yv),e6=E.forwardRef((t,e)=>m.jsx(Jw.Provider,{scope:t.__scopeRovingFocusGroup,children:m.jsx(Jw.Slot,{scope:t.__scopeRovingFocusGroup,children:m.jsx(gW,{...t,ref:e})})}));e6.displayName=Yv;var gW=E.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...d}=t,f=E.useRef(null),h=an(e,f),y=Zv(s),[v=null,_]=Nl({prop:a,defaultProp:o,onChange:l}),[w,x]=E.useState(!1),k=or(c),N=QT(n),R=E.useRef(!1),[H,F]=E.useState(0);return E.useEffect(()=>{const M=f.current;if(M)return M.addEventListener($y,k),()=>M.removeEventListener($y,k)},[k]),m.jsx(pW,{scope:n,orientation:r,dir:y,loop:i,currentTabStopId:v,onItemFocus:E.useCallback(M=>_(M),[_]),onItemShiftTab:E.useCallback(()=>x(!0),[]),onFocusableItemAdd:E.useCallback(()=>F(M=>M+1),[]),onFocusableItemRemove:E.useCallback(()=>F(M=>M-1),[]),children:m.jsx(xt.div,{tabIndex:w||H===0?-1:0,"data-orientation":r,...d,ref:h,style:{outline:"none",...t.style},onMouseDown:qe(t.onMouseDown,()=>{R.current=!0}),onFocus:qe(t.onFocus,M=>{const I=!R.current;if(M.target===M.currentTarget&&I&&!w){const G=new CustomEvent($y,dW);if(M.currentTarget.dispatchEvent(G),!G.defaultPrevented){const L=N().filter(ne=>ne.focusable),j=L.find(ne=>ne.active),W=L.find(ne=>ne.id===v),re=[j,W,...L].filter(Boolean).map(ne=>ne.ref.current);r6(re,u)}}R.current=!1}),onBlur:qe(t.onBlur,()=>x(!1))})})}),t6="RovingFocusGroupItem",n6=E.forwardRef((t,e)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,...a}=t,o=eo(),l=s||o,c=mW(t6,n),u=c.currentTabStopId===l,d=QT(n),{onFocusableItemAdd:f,onFocusableItemRemove:h}=c;return E.useEffect(()=>{if(r)return f(),()=>h()},[r,f,h]),m.jsx(Jw.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:m.jsx(xt.span,{tabIndex:u?0:-1,"data-orientation":c.orientation,...a,ref:e,onMouseDown:qe(t.onMouseDown,y=>{r?c.onItemFocus(l):y.preventDefault()}),onFocus:qe(t.onFocus,()=>c.onItemFocus(l)),onKeyDown:qe(t.onKeyDown,y=>{if(y.key==="Tab"&&y.shiftKey){c.onItemShiftTab();return}if(y.target!==y.currentTarget)return;const v=wW(y,c.orientation,c.dir);if(v!==void 0){if(y.metaKey||y.ctrlKey||y.altKey||y.shiftKey)return;y.preventDefault();let w=d().filter(x=>x.focusable).map(x=>x.ref.current);if(v==="last")w.reverse();else if(v==="prev"||v==="next"){v==="prev"&&w.reverse();const x=w.indexOf(y.currentTarget);w=c.loop?bW(w,x+1):w.slice(x+1)}setTimeout(()=>r6(w))}})})})});n6.displayName=t6;var vW={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yW(t,e){return e!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function wW(t,e,n){const r=yW(t.key,n);if(!(e==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(e==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return vW[r]}function r6(t,e=!1){const n=document.activeElement;for(const r of t)if(r===n||(r.focus({preventScroll:e}),document.activeElement!==n))return}function bW(t,e){return t.map((n,r)=>t[(e+r)%t.length])}var i6=e6,s6=n6,a6=KP(),Uy=function(){},Xv=E.forwardRef(function(t,e){var n=E.useRef(null),r=E.useState({onScrollCapture:Uy,onWheelCapture:Uy,onTouchMoveCapture:Uy}),i=r[0],s=r[1],a=t.forwardProps,o=t.children,l=t.className,c=t.removeScrollBar,u=t.enabled,d=t.shards,f=t.sideCar,h=t.noIsolation,y=t.inert,v=t.allowPinchZoom,_=t.as,w=_===void 0?"div":_,x=t.gapMode,k=Gx(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),N=f,R=GP([n,e]),H=Fr(Fr({},k),i);return E.createElement(E.Fragment,null,u&&E.createElement(N,{sideCar:a6,removeScrollBar:c,shards:d,noIsolation:h,inert:y,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:x}),a?E.cloneElement(E.Children.only(o),Fr(Fr({},H),{ref:R})):E.createElement(w,Fr({},H,{className:l,ref:R}),o))});Xv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xv.classNames={fullWidth:af,zeroRight:sf};var Xw=!1;if(typeof window<"u")try{var ag=Object.defineProperty({},"passive",{get:function(){return Xw=!0,!0}});window.addEventListener("test",ag,ag),window.removeEventListener("test",ag,ag)}catch{Xw=!1}var au=Xw?{passive:!1}:!1,xW=function(t){return t.tagName==="TEXTAREA"},o6=function(t,e){var n=window.getComputedStyle(t);return n[e]!=="hidden"&&!(n.overflowY===n.overflowX&&!xW(t)&&n[e]==="visible")},_W=function(t){return o6(t,"overflowY")},SW=function(t){return o6(t,"overflowX")},SE=function(t,e){var n=e.ownerDocument,r=e;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=l6(t,r);if(i){var s=c6(t,r),a=s[1],o=s[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},kW=function(t){var e=t.scrollTop,n=t.scrollHeight,r=t.clientHeight;return[e,n,r]},EW=function(t){var e=t.scrollLeft,n=t.scrollWidth,r=t.clientWidth;return[e,n,r]},l6=function(t,e){return t==="v"?_W(e):SW(e)},c6=function(t,e){return t==="v"?kW(e):EW(e)},NW=function(t,e){return t==="h"&&e==="rtl"?-1:1},AW=function(t,e,n,r,i){var s=NW(t,window.getComputedStyle(e).direction),a=s*r,o=n.target,l=e.contains(o),c=!1,u=a>0,d=0,f=0;do{var h=c6(t,o),y=h[0],v=h[1],_=h[2],w=v-_-s*y;(y||w)&&l6(t,o)&&(d+=w,f+=y),o instanceof ShadowRoot?o=o.host:o=o.parentNode}while(!l&&o!==document.body||l&&(e.contains(o)||e===o));return(u&&(Math.abs(d)<1||!i)||!u&&(Math.abs(f)<1||!i))&&(c=!0),c},og=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},kE=function(t){return[t.deltaX,t.deltaY]},EE=function(t){return t&&"current"in t?t.current:t},CW=function(t,e){return t[0]===e[0]&&t[1]===e[1]},PW=function(t){return` 389 .block-interactivity-`.concat(t,` {pointer-events: none;} 390 .allow-interactivity-`).concat(t,` {pointer-events: all;} 391`)},TW=0,ou=[];function RW(t){var e=E.useRef([]),n=E.useRef([0,0]),r=E.useRef(),i=E.useState(TW++)[0],s=E.useState(Kx)[0],a=E.useRef(t);E.useEffect(function(){a.current=t},[t]),E.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var v=VP([t.lockRef.current],(t.shards||[]).map(EE),!0).filter(Boolean);return v.forEach(function(_){return _.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var o=E.useCallback(function(v,_){if("touches"in v&&v.touches.length===2)return!a.current.allowPinchZoom;var w=og(v),x=n.current,k="deltaX"in v?v.deltaX:x[0]-w[0],N="deltaY"in v?v.deltaY:x[1]-w[1],R,H=v.target,F=Math.abs(k)>Math.abs(N)?"h":"v";if("touches"in v&&F==="h"&&H.type==="range")return!1;var M=SE(F,H);if(!M)return!0;if(M?R=F:(R=F==="v"?"h":"v",M=SE(F,H)),!M)return!1;if(!r.current&&"changedTouches"in v&&(k||N)&&(r.current=R),!R)return!0;var I=r.current||R;return AW(I,_,v,I==="h"?k:N,!0)},[]),l=E.useCallback(function(v){var _=v;if(!(!ou.length||ou[ou.length-1]!==s)){var w="deltaY"in _?kE(_):og(_),x=e.current.filter(function(R){return R.name===_.type&&(R.target===_.target||_.target===R.shadowParent)&&CW(R.delta,w)})[0];if(x&&x.should){_.cancelable&&_.preventDefault();return}if(!x){var k=(a.current.shards||[]).map(EE).filter(Boolean).filter(function(R){return R.contains(_.target)}),N=k.length>0?o(_,k[0]):!a.current.noIsolation;N&&_.cancelable&&_.preventDefault()}}},[]),c=E.useCallback(function(v,_,w,x){var k={name:v,delta:_,target:w,should:x,shadowParent:LW(w)};e.current.push(k),setTimeout(function(){e.current=e.current.filter(function(N){return N!==k})},1)},[]),u=E.useCallback(function(v){n.current=og(v),r.current=void 0},[]),d=E.useCallback(function(v){c(v.type,kE(v),v.target,o(v,t.lockRef.current))},[]),f=E.useCallback(function(v){c(v.type,og(v),v.target,o(v,t.lockRef.current))},[]);E.useEffect(function(){return ou.push(s),t.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",l,au),document.addEventListener("touchmove",l,au),document.addEventListener("touchstart",u,au),function(){ou=ou.filter(function(v){return v!==s}),document.removeEventListener("wheel",l,au),document.removeEventListener("touchmove",l,au),document.removeEventListener("touchstart",u,au)}},[]);var h=t.removeScrollBar,y=t.inert;return E.createElement(E.Fragment,null,y?E.createElement(s,{styles:PW(i)}):null,h?E.createElement(XP,{gapMode:t.gapMode}):null)}function LW(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const jW=YP(a6,RW);var u6=E.forwardRef(function(t,e){return E.createElement(Xv,Fr({},t,{ref:e,sideCar:jW}))});u6.classNames=Xv.classNames;var Qw=["Enter"," "],OW=["ArrowDown","PageUp","Home"],d6=["ArrowUp","PageDown","End"],IW=[...OW,...d6],DW={ltr:[...Qw,"ArrowRight"],rtl:[...Qw,"ArrowLeft"]},MW={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Lp="Menu",[Jf,FW,zW]=kv(Lp),[Ic,h6]=uo(Lp,[zW,Lv,Jv]),Qv=Lv(),f6=Jv(),[$W,Dc]=Ic(Lp),[UW,jp]=Ic(Lp),p6=t=>{const{__scopeMenu:e,open:n=!1,children:r,dir:i,onOpenChange:s,modal:a=!0}=t,o=Qv(e),[l,c]=E.useState(null),u=E.useRef(!1),d=or(s),f=Zv(i);return E.useEffect(()=>{const h=()=>{u.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>u.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),m.jsx(GF,{...o,children:m.jsx($W,{scope:e,open:n,onOpenChange:d,content:l,onContentChange:c,children:m.jsx(UW,{scope:e,onClose:E.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:a,children:r})})})};p6.displayName=Lp;var BW="MenuAnchor",t5=E.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=Qv(n);return m.jsx(aP,{...i,...r,ref:e})});t5.displayName=BW;var n5="MenuPortal",[qW,m6]=Ic(n5,{forceMount:void 0}),g6=t=>{const{__scopeMenu:e,forceMount:n,children:r,container:i}=t,s=Dc(n5,e);return m.jsx(qW,{scope:e,forceMount:n,children:m.jsx(El,{present:n||s.open,children:m.jsx(XT,{asChild:!0,container:i,children:r})})})};g6.displayName=n5;var es="MenuContent",[HW,r5]=Ic(es),v6=E.forwardRef((t,e)=>{const n=m6(es,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=Dc(es,t.__scopeMenu),a=jp(es,t.__scopeMenu);return m.jsx(Jf.Provider,{scope:t.__scopeMenu,children:m.jsx(El,{present:r||s.open,children:m.jsx(Jf.Slot,{scope:t.__scopeMenu,children:a.modal?m.jsx(WW,{...i,ref:e}):m.jsx(VW,{...i,ref:e})})})})}),WW=E.forwardRef((t,e)=>{const n=Dc(es,t.__scopeMenu),r=E.useRef(null),i=an(e,r);return E.useEffect(()=>{const s=r.current;if(s)return iT(s)},[]),m.jsx(i5,{...t,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:qe(t.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),VW=E.forwardRef((t,e)=>{const n=Dc(es,t.__scopeMenu);return m.jsx(i5,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),i5=E.forwardRef((t,e)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,disableOutsideScroll:y,...v}=t,_=Dc(es,n),w=jp(es,n),x=Qv(n),k=f6(n),N=FW(n),[R,H]=E.useState(null),F=E.useRef(null),M=an(e,F,_.onContentChange),I=E.useRef(0),G=E.useRef(""),L=E.useRef(0),j=E.useRef(null),W=E.useRef("right"),z=E.useRef(0),re=y?u6:E.Fragment,ne=y?{as:yc,allowPinchZoom:!0}:void 0,oe=J=>{var le,me;const de=G.current+J,ie=N().filter(pe=>!pe.disabled),C=document.activeElement,q=(le=ie.find(pe=>pe.ref.current===C))==null?void 0:le.textValue,X=ie.map(pe=>pe.textValue),Q=iV(X,de,q),ee=(me=ie.find(pe=>pe.textValue===Q))==null?void 0:me.ref.current;(function pe(ge){G.current=ge,window.clearTimeout(I.current),ge!==""&&(I.current=window.setTimeout(()=>pe(""),1e3))})(de),ee&&setTimeout(()=>ee.focus())};E.useEffect(()=>()=>window.clearTimeout(I.current),[]),cW();const U=E.useCallback(J=>{var ie,C;return W.current===((ie=j.current)==null?void 0:ie.side)&&aV(J,(C=j.current)==null?void 0:C.area)},[]);return m.jsx(HW,{scope:n,searchRef:G,onItemEnter:E.useCallback(J=>{U(J)&&J.preventDefault()},[U]),onItemLeave:E.useCallback(J=>{var de;U(J)||((de=F.current)==null||de.focus(),H(null))},[U]),onTriggerLeave:E.useCallback(J=>{U(J)&&J.preventDefault()},[U]),pointerGraceTimerRef:L,onPointerGraceIntentChange:E.useCallback(J=>{j.current=J},[]),children:m.jsx(re,{...ne,children:m.jsx(Vx,{asChild:!0,trapped:i,onMountAutoFocus:qe(s,J=>{var de;J.preventDefault(),(de=F.current)==null||de.focus({preventScroll:!0})}),onUnmountAutoFocus:a,children:m.jsx(YT,{asChild:!0,disableOutsidePointerEvents:o,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:h,children:m.jsx(i6,{asChild:!0,...k,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:R,onCurrentTabStopIdChange:H,onEntryFocus:qe(l,J=>{w.isUsingKeyboardRef.current||J.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(oP,{role:"menu","aria-orientation":"vertical","data-state":j6(_.open),"data-radix-menu-content":"",dir:w.dir,...x,...v,ref:M,style:{outline:"none",...v.style},onKeyDown:qe(v.onKeyDown,J=>{const ie=J.target.closest("[data-radix-menu-content]")===J.currentTarget,C=J.ctrlKey||J.altKey||J.metaKey,q=J.key.length===1;ie&&(J.key==="Tab"&&J.preventDefault(),!C&&q&&oe(J.key));const X=F.current;if(J.target!==X||!IW.includes(J.key))return;J.preventDefault();const ee=N().filter(le=>!le.disabled).map(le=>le.ref.current);d6.includes(J.key)&&ee.reverse(),nV(ee)}),onBlur:qe(t.onBlur,J=>{J.currentTarget.contains(J.target)||(window.clearTimeout(I.current),G.current="")}),onPointerMove:qe(t.onPointerMove,Xf(J=>{const de=J.target,ie=z.current!==J.clientX;if(J.currentTarget.contains(de)&&ie){const C=J.clientX>z.current?"right":"left";W.current=C,z.current=J.clientX}}))})})})})})})});v6.displayName=es;var GW="MenuGroup",s5=E.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return m.jsx(xt.div,{role:"group",...r,ref:e})});s5.displayName=GW;var KW="MenuLabel",y6=E.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return m.jsx(xt.div,{...r,ref:e})});y6.displayName=KW;var $0="MenuItem",NE="menu.itemSelect",e1=E.forwardRef((t,e)=>{const{disabled:n=!1,onSelect:r,...i}=t,s=E.useRef(null),a=jp($0,t.__scopeMenu),o=r5($0,t.__scopeMenu),l=an(e,s),c=E.useRef(!1),u=()=>{const d=s.current;if(!n&&d){const f=new CustomEvent(NE,{bubbles:!0,cancelable:!0});d.addEventListener(NE,h=>r==null?void 0:r(h),{once:!0}),Ap(d,f),f.defaultPrevented?c.current=!1:a.onClose()}};return m.jsx(w6,{...i,ref:l,disabled:n,onClick:qe(t.onClick,u),onPointerDown:d=>{var f;(f=t.onPointerDown)==null||f.call(t,d),c.current=!0},onPointerUp:qe(t.onPointerUp,d=>{var f;c.current||(f=d.currentTarget)==null||f.click()}),onKeyDown:qe(t.onKeyDown,d=>{const f=o.searchRef.current!=="";n||f&&d.key===" "||Qw.includes(d.key)&&(d.currentTarget.click(),d.preventDefault())})})});e1.displayName=$0;var w6=E.forwardRef((t,e)=>{const{__scopeMenu:n,disabled:r=!1,textValue:i,...s}=t,a=r5($0,n),o=f6(n),l=E.useRef(null),c=an(e,l),[u,d]=E.useState(!1),[f,h]=E.useState("");return E.useEffect(()=>{const y=l.current;y&&h((y.textContent??"").trim())},[s.children]),m.jsx(Jf.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:m.jsx(s6,{asChild:!0,...o,focusable:!r,children:m.jsx(xt.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:c,onPointerMove:qe(t.onPointerMove,Xf(y=>{r?a.onItemLeave(y):(a.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:qe(t.onPointerLeave,Xf(y=>a.onItemLeave(y))),onFocus:qe(t.onFocus,()=>d(!0)),onBlur:qe(t.onBlur,()=>d(!1))})})})}),ZW="MenuCheckboxItem",b6=E.forwardRef((t,e)=>{const{checked:n=!1,onCheckedChange:r,...i}=t;return m.jsx(E6,{scope:t.__scopeMenu,checked:n,children:m.jsx(e1,{role:"menuitemcheckbox","aria-checked":U0(n)?"mixed":n,...i,ref:e,"data-state":o5(n),onSelect:qe(i.onSelect,()=>r==null?void 0:r(U0(n)?!0:!n),{checkForDefaultPrevented:!1})})})});b6.displayName=ZW;var x6="MenuRadioGroup",[YW,JW]=Ic(x6,{value:void 0,onValueChange:()=>{}}),_6=E.forwardRef((t,e)=>{const{value:n,onValueChange:r,...i}=t,s=or(r);return m.jsx(YW,{scope:t.__scopeMenu,value:n,onValueChange:s,children:m.jsx(s5,{...i,ref:e})})});_6.displayName=x6;var S6="MenuRadioItem",k6=E.forwardRef((t,e)=>{const{value:n,...r}=t,i=JW(S6,t.__scopeMenu),s=n===i.value;return m.jsx(E6,{scope:t.__scopeMenu,checked:s,children:m.jsx(e1,{role:"menuitemradio","aria-checked":s,...r,ref:e,"data-state":o5(s),onSelect:qe(r.onSelect,()=>{var a;return(a=i.onValueChange)==null?void 0:a.call(i,n)},{checkForDefaultPrevented:!1})})})});k6.displayName=S6;var a5="MenuItemIndicator",[E6,XW]=Ic(a5,{checked:!1}),N6=E.forwardRef((t,e)=>{const{__scopeMenu:n,forceMount:r,...i}=t,s=XW(a5,n);return m.jsx(El,{present:r||U0(s.checked)||s.checked===!0,children:m.jsx(xt.span,{...i,ref:e,"data-state":o5(s.checked)})})});N6.displayName=a5;var QW="MenuSeparator",A6=E.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t;return m.jsx(xt.div,{role:"separator","aria-orientation":"horizontal",...r,ref:e})});A6.displayName=QW;var eV="MenuArrow",C6=E.forwardRef((t,e)=>{const{__scopeMenu:n,...r}=t,i=Qv(n);return m.jsx(lP,{...i,...r,ref:e})});C6.displayName=eV;var tV="MenuSub",[_ne,P6]=Ic(tV),Uh="MenuSubTrigger",T6=E.forwardRef((t,e)=>{const n=Dc(Uh,t.__scopeMenu),r=jp(Uh,t.__scopeMenu),i=P6(Uh,t.__scopeMenu),s=r5(Uh,t.__scopeMenu),a=E.useRef(null),{pointerGraceTimerRef:o,onPointerGraceIntentChange:l}=s,c={__scopeMenu:t.__scopeMenu},u=E.useCallback(()=>{a.current&&window.clearTimeout(a.current),a.current=null},[]);return E.useEffect(()=>u,[u]),E.useEffect(()=>{const d=o.current;return()=>{window.clearTimeout(d),l(null)}},[o,l]),m.jsx(t5,{asChild:!0,...c,children:m.jsx(w6,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":i.contentId,"data-state":j6(n.open),...t,ref:Sv(e,i.onTriggerChange),onClick:d=>{var f;(f=t.onClick)==null||f.call(t,d),!(t.disabled||d.defaultPrevented)&&(d.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:qe(t.onPointerMove,Xf(d=>{s.onItemEnter(d),!d.defaultPrevented&&!t.disabled&&!n.open&&!a.current&&(s.onPointerGraceIntentChange(null),a.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:qe(t.onPointerLeave,Xf(d=>{var h,y;u();const f=(h=n.content)==null?void 0:h.getBoundingClientRect();if(f){const v=(y=n.content)==null?void 0:y.dataset.side,_=v==="right",w=_?-5:5,x=f[_?"left":"right"],k=f[_?"right":"left"];s.onPointerGraceIntentChange({area:[{x:d.clientX+w,y:d.clientY},{x,y:f.top},{x:k,y:f.top},{x:k,y:f.bottom},{x,y:f.bottom}],side:v}),window.clearTimeout(o.current),o.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(d),d.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:qe(t.onKeyDown,d=>{var h;const f=s.searchRef.current!=="";t.disabled||f&&d.key===" "||DW[r.dir].includes(d.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),d.preventDefault())})})})});T6.displayName=Uh;var R6="MenuSubContent",L6=E.forwardRef((t,e)=>{const n=m6(es,t.__scopeMenu),{forceMount:r=n.forceMount,...i}=t,s=Dc(es,t.__scopeMenu),a=jp(es,t.__scopeMenu),o=P6(R6,t.__scopeMenu),l=E.useRef(null),c=an(e,l);return m.jsx(Jf.Provider,{scope:t.__scopeMenu,children:m.jsx(El,{present:r||s.open,children:m.jsx(Jf.Slot,{scope:t.__scopeMenu,children:m.jsx(i5,{id:o.contentId,"aria-labelledby":o.triggerId,...i,ref:c,align:"start",side:a.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var d;a.isUsingKeyboardRef.current&&((d=l.current)==null||d.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:qe(t.onFocusOutside,u=>{u.target!==o.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:qe(t.onEscapeKeyDown,u=>{a.onClose(),u.preventDefault()}),onKeyDown:qe(t.onKeyDown,u=>{var h;const d=u.currentTarget.contains(u.target),f=MW[a.dir].includes(u.key);d&&f&&(s.onOpenChange(!1),(h=o.trigger)==null||h.focus(),u.preventDefault())})})})})})});L6.displayName=R6;function j6(t){return t?"open":"closed"}function U0(t){return t==="indeterminate"}function o5(t){return U0(t)?"indeterminate":t?"checked":"unchecked"}function nV(t){const e=document.activeElement;for(const n of t)if(n===e||(n.focus(),document.activeElement!==e))return}function rV(t,e){return t.map((n,r)=>t[(e+r)%t.length])}function iV(t,e,n){const i=e.length>1&&Array.from(e).every(c=>c===e[0])?e[0]:e,s=n?t.indexOf(n):-1;let a=rV(t,Math.max(s,0));i.length===1&&(a=a.filter(c=>c!==n));const l=a.find(c=>c.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function sV(t,e){const{x:n,y:r}=t;let i=!1;for(let s=0,a=e.length-1;s<e.length;a=s++){const o=e[s].x,l=e[s].y,c=e[a].x,u=e[a].y;l>r!=u>r&&n<(c-o)*(r-l)/(u-l)+o&&(i=!i)}return i}function aV(t,e){if(!e)return!1;const n={x:t.clientX,y:t.clientY};return sV(n,e)}function Xf(t){return e=>e.pointerType==="mouse"?t(e):void 0}var oV=p6,lV=t5,cV=g6,uV=v6,dV=s5,hV=y6,fV=e1,pV=b6,mV=_6,gV=k6,vV=N6,yV=A6,wV=C6,bV=T6,xV=L6,l5="DropdownMenu",[_V,Sne]=uo(l5,[h6]),ni=h6(),[SV,O6]=_V(l5),I6=t=>{const{__scopeDropdownMenu:e,children:n,dir:r,open:i,defaultOpen:s,onOpenChange:a,modal:o=!0}=t,l=ni(e),c=E.useRef(null),[u=!1,d]=Nl({prop:i,defaultProp:s,onChange:a});return m.jsx(SV,{scope:e,triggerId:eo(),triggerRef:c,contentId:eo(),open:u,onOpenChange:d,onOpenToggle:E.useCallback(()=>d(f=>!f),[d]),modal:o,children:m.jsx(oV,{...l,open:u,onOpenChange:d,dir:r,modal:o,children:n})})};I6.displayName=l5;var D6="DropdownMenuTrigger",M6=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...i}=t,s=O6(D6,n),a=ni(n);return m.jsx(lV,{asChild:!0,...a,children:m.jsx(xt.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:Sv(e,s.triggerRef),onPointerDown:qe(t.onPointerDown,o=>{!r&&o.button===0&&o.ctrlKey===!1&&(s.onOpenToggle(),s.open||o.preventDefault())}),onKeyDown:qe(t.onKeyDown,o=>{r||(["Enter"," "].includes(o.key)&&s.onOpenToggle(),o.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(o.key)&&o.preventDefault())})})})});M6.displayName=D6;var kV="DropdownMenuPortal",F6=t=>{const{__scopeDropdownMenu:e,...n}=t,r=ni(e);return m.jsx(cV,{...r,...n})};F6.displayName=kV;var z6="DropdownMenuContent",$6=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=O6(z6,n),s=ni(n),a=E.useRef(!1);return m.jsx(uV,{id:i.contentId,"aria-labelledby":i.triggerId,...s,...r,ref:e,onCloseAutoFocus:qe(t.onCloseAutoFocus,o=>{var l;a.current||(l=i.triggerRef.current)==null||l.focus(),a.current=!1,o.preventDefault()}),onInteractOutside:qe(t.onInteractOutside,o=>{const l=o.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!i.modal||u)&&(a.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$6.displayName=z6;var EV="DropdownMenuGroup",NV=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ni(n);return m.jsx(dV,{...i,...r,ref:e})});NV.displayName=EV;var AV="DropdownMenuLabel",U6=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ni(n);return m.jsx(hV,{...i,...r,ref:e})});U6.displayName=AV;var CV="DropdownMenuItem",B6=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ni(n);return m.jsx(fV,{...i,...r,ref:e})});B6.displayName=CV;var PV="DropdownMenuCheckboxItem",q6=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ni(n);return m.jsx(pV,{...i,...r,ref:e})});q6.displayName=PV;var TV="DropdownMenuRadioGroup",RV=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ni(n);return m.jsx(mV,{...i,...r,ref:e})});RV.displayName=TV;var LV="DropdownMenuRadioItem",H6=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ni(n);return m.jsx(gV,{...i,...r,ref:e})});H6.displayName=LV;var jV="DropdownMenuItemIndicator",W6=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ni(n);return m.jsx(vV,{...i,...r,ref:e})});W6.displayName=jV;var OV="DropdownMenuSeparator",V6=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ni(n);return m.jsx(yV,{...i,...r,ref:e})});V6.displayName=OV;var IV="DropdownMenuArrow",DV=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ni(n);return m.jsx(wV,{...i,...r,ref:e})});DV.displayName=IV;var MV="DropdownMenuSubTrigger",G6=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ni(n);return m.jsx(bV,{...i,...r,ref:e})});G6.displayName=MV;var FV="DropdownMenuSubContent",K6=E.forwardRef((t,e)=>{const{__scopeDropdownMenu:n,...r}=t,i=ni(n);return m.jsx(xV,{...i,...r,ref:e,style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});K6.displayName=FV;var zV=I6,$V=M6,UV=F6,Z6=$6,Y6=U6,J6=B6,X6=q6,Q6=H6,eR=W6,tR=V6,nR=G6,rR=K6;const BV=zV,qV=$V,HV=E.forwardRef(({className:t,inset:e,children:n,...r},i)=>m.jsxs(nR,{ref:i,className:St("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",e&&"pl-8",t),...r,children:[n,m.jsx(Z7,{className:"ml-auto h-4 w-4"})]}));HV.displayName=nR.displayName;const WV=E.forwardRef(({className:t,...e},n)=>m.jsx(rR,{ref:n,className:St("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:sli
391de-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...e}));WV.displayName=rR.displayName;const iR=E.forwardRef(({className:t,sideOffset:e=4,...n},r)=>m.jsx(UV,{children:m.jsx(Z6,{ref:r,sideOffset:e,className:St("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",t),...n})}));iR.displayName=Z6.displayName;const sR=E.forwardRef(({className:t,inset:e,...n},r)=>m.jsx(J6,{ref:r,className:St("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e&&"pl-8",t),...n}));sR.displayName=J6.displayName;const VV=E.forwardRef(({className:t,children:e,checked:n,...r},i)=>m.jsxs(X6,{ref:i,className:St("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),checked:n,...r,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(eR,{children:m.jsx(Ax,{className:"h-4 w-4"})})}),e]}));VV.displayName=X6.displayName;const GV=E.forwardRef(({className:t,children:e,...n},r)=>m.jsxs(Q6,{ref:r,className:St("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t),...n,children:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(eR,{children:m.jsx(X7,{className:"h-2 w-2 fill-current"})})}),e]}));GV.displayName=Q6.displayName;const KV=E.forwardRef(({className:t,inset:e,...n},r)=>m.jsx(Y6,{ref:r,className:St("px-2 py-1.5 text-sm font-semibold",e&&"pl-8",t),...n}));KV.displayName=Y6.displayName;const ZV=E.forwardRef(({className:t,...e},n)=>m.jsx(tR,{ref:n,className:St("-mx-1 my-1 h-px bg-muted",t),...e}));ZV.displayName=tR.displayName;const lg=[{code:"it",label:"IT",flag:"ð®ð¹"},{code:"en",label:"EN",flag:"ð¬ð§"},{code:"es",label:"ES",flag:"ðªð¸"}],AE=({variant:t="desktop",onChange:e})=>{const{i18n:n}=Er(),r=(n.resolvedLanguage||n.language||"it").slice(0,2),i=lg.find(a=>a.code===r)||lg[0],s=a=>{n.changeLanguage(a),e==null||e()};return t==="mobile"?m.jsxs("div",{className:"flex items-center gap-2 px-4 py-2",children:[m.jsx(Px,{className:"h-4 w-4 text-muted-foreground"}),lg.map(a=>m.jsxs("button",{onClick:()=>s(a.code),className:`px-2 py-1 rounded-md text-sm font-semibold border transition-colors ${r===a.code?"bg-primary/20 border-primary text-primary":"border-primary/20 text-muted-foreground hover:text-primary"}`,children:[a.flag," ",a.label]},a.code))]}):m.jsxs(BV,{children:[m.jsx(qV,{asChild:!0,children:m.jsxs(En,{variant:"ghost",size:"sm",className:"text-muted-foreground hover:text-primary gap-1.5","aria-label":"Language",children:[m.jsx("span",{"aria-hidden":!0,children:i.flag}),m.jsx("span",{className:"text-xs font-bold",children:i.label})]})}),m.jsx(iR,{align:"end",className:"min-w-[8rem] bg-background border-primary/30",children:lg.map(a=>m.jsxs(sR,{onClick:()=>s(a.code),className:r===a.code?"text-primary font-semibold":"",children:[m.jsx("span",{className:"mr-2",children:a.flag}),a.label]},a.code))})]})},ma=()=>{const[t,e]=E.useState(!1),n=Oc(),{t:r}=Er(),{user:i,signOut:s}=zd(),{subscribed:a,plan:o,analyses_remaining:l}=Rp(),c=[{to:"/",icon:AC,label:r("nav.analyze"),isExternal:!1},{to:"/features",icon:G7,label:r("nav.features"),isExternal:!1},{to:"/pricing",icon:CC,label:r("nav.pricing"),isExternal:!1},{to:"https://blog.aeoanalyzer.it/",icon:NC,label:r("nav.news"),isExternal:!0},{to:"/contact",icon:Rx,label:r("nav.contact"),isExternal:!1}],u=async()=>{await s(),n("/")},d=a&&o?o==="pro"?r("plan.proUnlimited"):r("plan.baseRemaining",{count:l}):null;return m.jsx("header",{className:"fixed top-0 left-0 right-0 z-50 border-b border-primary/20 bg-background/90 backdrop-blur-xl",children:m.jsxs("div",{className:"container flex h-24 items-center justify-between",children:[m.jsx(_r,{to:"/",className:"flex items-center",children:m.jsx("img",{src:Mw,alt:"AEO Analyzer",className:"h-40 w-auto"})}),m.jsxs("nav",{className:"hidden md:flex items-center space-x-8",children:[c.map(f=>f.isExternal?m.jsx("a",{href:f.to,target:"_blank",rel:"noopener noreferrer",className:"text-base font-semibold text-muted-foreground transition-all hover:text-primary hover:drop-shadow-[0_0_8px_hsl(166,100%,50%,0.5)]",children:f.label},f.label):m.jsx(_r,{to:f.to,className:"text-base font-semibold text-muted-foreground transition-all hover:text-primary hover:drop-shadow-[0_0_8px_hsl(166,100%,50%,0.5)]",children:f.label},f.label)),m.jsxs("div",{className:"flex items-center gap-3 pl-4 border-l border-primary/20",children:[m.jsx(AE,{}),i?m.jsxs(m.Fragment,{children:[d&&m.jsx("span",{className:"hidden lg:inline text-xs px-3 py-1 rounded-full bg-primary/10 border border-primary/30 neon-text-cyan",children:d}),m.jsxs(En,{variant:"ghost",size:"sm",onClick:u,className:"text-muted-foreground hover:text-primary",children:[m.jsx(OS,{className:"h-4 w-4 mr-2"})," ",r("nav.logout")]})]}):m.jsxs(En,{size:"sm",onClick:()=>n("/auth"),className:"bg-primary text-primary-foreground hover:bg-primary/90",children:[m.jsx(jS,{className:"h-4 w-4 mr-2"})," ",r("nav.login")]})]})]}),m.jsxs(DU,{open:t,onOpenChange:e,children:[m.jsx(MU,{asChild:!0,className:"md:hidden",children:m.jsxs(En,{variant:"ghost",size:"icon",className:"text-foreground hover:bg-primary/10 hover:text-primary",children:[m.jsx(rD,{className:"h-7 w-7"}),m.jsx("span",{className:"sr-only",children:r("nav.menu")})]})}),m.jsx(kT,{side:"right",className:"w-[300px] bg-background border-primary/20 p-0",children:m.jsxs("div",{className:"flex flex-col h-full",children:[m.jsxs("div",{className:"flex items-center justify-between p-6 border-b border-primary/20",children:[m.jsx("img",{src:Mw,alt:"AEO Analyzer",className:"h-16 w-auto"}),m.jsx(FU,{asChild:!0,children:m.jsxs(En,{variant:"ghost",size:"icon",className:"text-foreground hover:bg-primary/10 hover:text-primary",children:[m.jsx(jd,{className:"h-6 w-6"}),m.jsx("span",{className:"sr-only",children:r("nav.close")})]})})]}),m.jsxs("nav",{className:"flex flex-col p-6 space-y-2",children:[c.map(f=>f.isExternal?m.jsxs("a",{href:f.to,target:"_blank",rel:"noopener noreferrer",onClick:()=>e(!1),className:"flex items-center px-4 py-4 text-lg font-semibold text-muted-foreground rounded-lg transition-all hover:bg-primary/10 hover:text-primary",children:[m.jsx(f.icon,{className:"mr-4 h-6 w-6"}),f.label]},f.label):m.jsxs(_r,{to:f.to,onClick:()=>e(!1),className:"flex items-center px-4 py-4 text-lg font-semibold text-muted-foreground rounded-lg transition-all hover:bg-primary/10 hover:text-primary",children:[m.jsx(f.icon,{className:"mr-4 h-6 w-6"}),f.label]},f.label)),m.jsxs("div",{className:"pt-4 mt-4 border-t border-primary/20",children:[m.jsx(AE,{variant:"mobile"}),i?m.jsxs(m.Fragment,{children:[d&&m.jsxs("div",{className:"px-4 py-2 mb-2 text-sm neon-text-cyan flex items-center gap-2",children:[m.jsx(dD,{className:"h-4 w-4"})," ",d]}),m.jsxs("button",{onClick:()=>{e(!1),u()},className:"w-full flex items-center px-4 py-4 text-lg font-semibold text-muted-foreground rounded-lg hover:bg-primary/10 hover:text-primary",children:[m.jsx(OS,{className:"mr-4 h-6 w-6"})," ",r("nav.logout")]})]}):m.jsxs(_r,{to:"/auth",onClick:()=>e(!1),className:"flex items-center px-4 py-4 text-lg font-semibold text-primary rounded-lg bg-primary/10 hover:bg-primary/20",children:[m.jsx(jS,{className:"mr-4 h-6 w-6"})," ",r("nav.login")]})]})]})]})})]})]})})},ga=()=>{const{t}=Er();return m.jsx("footer",{className:"bg-card border-t border-primary/20",children:m.jsx("div",{className:"container px-4 py-16 md:px-6 md:py-20",children:m.jsxs("div",{className:"grid grid-cols-2 gap-10 md:grid-cols-4",children:[m.jsxs("div",{className:"col-span-2 md:col-span-1",children:[m.jsx("div",{className:"flex items-center gap-2 mb-6",children:m.jsx("img",{src:Mw,alt:"AEO Analyzer",className:"h-32 w-auto"})}),m.jsx("p",{className:"text-base text-muted-foreground mb-4",children:t("footer.tagline")}),m.jsx("p",{className:"text-sm neon-text-green font-semibold mb-4",children:t("madeInItaly.footer")}
391),m.jsx("p",{className:"text-sm text-muted-foreground/70",children:m.jsx("a",{href:"https://vincenzobarbagallo.it",target:"_blank",rel:"noopener noreferrer",className:"hover:text-primary transition-colors",children:"AEOanalyzer è un prodotto creato da Vincenzo Barbagallo P.I. 05989610877 Iscritto alla Camera di Commercio REA CT-470241"})})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-base font-bold text-foreground mb-6 neon-text-green",children:t("footer.explore")}),m.jsxs("ul",{className:"space-y-4 text-base",children:[m.jsx("li",{children:m.jsx(_r,{to:"/",className:"text-muted-foreground hover:text-primary transition-colors",children:t("footer.home")})}),m.jsx("li",{children:m.jsx(_r,{to:"/features",className:"text-muted-foreground hover:text-primary transition-colors",children:t("footer.features")})}),m.jsx("li",{children:m.jsx(_r,{to:"/pricing",className:"text-muted-foreground hover:text-primary transition-colors",children:t("footer.pricing")})}),m.jsx("li",{children:m.jsx(_r,{to:"/contact",className:"text-muted-foreground hover:text-primary transition-colors",children:t("footer.contact")})}),m.jsx("li",{children:m.jsxs("a",{href:"https://blog.aeoanalyzer.it/",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-primary transition-colors flex items-center gap-2",children:[m.jsx(NC,{className:"h-4 w-4"}),m.jsx("span",{children:t("footer.news")})]})})]})]}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-base font-bold text-foreground mb-6 neon-text-green",children:t("footer.legal")}),m.jsxs("ul",{className:"space-y-4 text-base",children:[m.jsx("li",{children:m.jsx(_r,{to:"/terms",className:"text-muted-foreground hover:text-primary transition-colors",children:t("footer.terms")})}),m.jsx("li",{children:m.jsx(_r,{to:"/privacy",className:"text-muted-foreground hover:text-primary transition-colors",children:t("footer.privacy")})}),m.jsx("li",{children:m.jsx(_r,{to:"/sitemap",className:"text-muted-foreground hover:text-primary transition-colors",children:t("footer.sitemap")})})]})]}),m.jsxs("div",{className:"col-span-2 md:col-span-1",children:[m.jsx("h3",{className:"text-base font-bold text-foreground mb-6 neon-text-green",children:t("footer.contacts")}),m.jsxs("div",{className:"flex items-center space-x-6 mb-6",children:[m.jsxs("a",{href:"https://www.linkedin.com/company/aeoanalyzer-it/",target:"_blank",rel:"noopener noreferrer",className:"text-muted-foreground hover:text-primary transition-colors",children:[m.jsx(tD,{className:"h-7 w-7"}),m.jsx("span",{className:"sr-only",children:"LinkedIn"})]}),m.jsxs("a",{href:"mailto:[email protected]",className:"text-muted-foreground hover:text-primary transition-colors flex items-center",children:[m.jsx(Rx,{className:"h-7 w-7 mr-3"}),m.jsx("span",{className:"text-base",children:"[email protected]"})]})]}),m.jsxs("p",{className:"text-base text-muted-foreground",children:["© ",new Date().getFullYear()," AEO Analyzer.",m.jsx("br",{}),t("footer.rights")]})]})]})})})},YV=Ld("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),B0=E.forwardRef(({className:t,variant:e,...n},r)=>m.jsx("div",{ref:r,role:"alert",className:St(YV({variant:e}),t),...n}));B0.displayName="Alert";const JV=E.forwardRef(({className:t,...e},n)=>m.jsx("h5",{ref:n,className:St("mb-1 font-medium leading-none tracking-tight",t),...e}));JV.displayName="AlertTitle";const q0=E.forwardRef(({className:t,...e},n)=>m.jsx("div",{ref:n,className:St("text-sm [&_p]:leading-relaxed",t),...e}));q0.displayName="AlertDescription";const bd=E.forwardRef(({className:t,type:e,...n},r)=>m.jsx("input",{type:e,className:St("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t),ref:r,...n}));bd.displayName="Input";const XV=({size:t="md"})=>{const e={sm:"w-5 h-5",md:"w-8 h-8",lg:"w-12 h-12"};return m.jsxs("div",{className:`relative ${e[t]}`,children:[m.jsx("div",{className:"absolute inset-0 rounded-full border-2 border-primary/20"}),m.jsx("div",{className:"absolute inset-0 rounded-full animate-spin",style:{background:"conic-gradient(from 0deg, transparent, hsl(166 100% 50%), hsl(180 100% 50%), transparent)",mask:"radial-gradient(farthest-side, transparent calc(100% - 3px), white calc(100% - 2px))",WebkitMask:"radial-gradient(farthest-side, transparent calc(100% - 3px), white calc(100% - 2px))"}}),m.jsx("div",{className:"absolute inset-0 rounded-full blur-sm animate-spin opacity-50",style:{background:"conic-gradient(from 0deg, transparent, hsl(166 100% 50%), transparent)"}})]})}
391,QV=({onAnalyze:t,isLoading:e=!1})=>{const[n,r]=E.useState(""),{t:i}=Er(),s=a=>{a.preventDefault(),n.trim()&&t(n.trim())};return m.jsxs("form",{onSubmit:s,className:"flex w-full flex-col sm:flex-row gap-4",children:[m.jsxs("div",{className:"relative flex-1",children:[m.jsx(bd,{type:"url",placeholder:i("urlForm.placeholder"),className:"w-full h-16 pl-14 pr-6 text-lg bg-secondary/80 border-2 border-border/50 focus:border-primary focus:ring-2 focus:ring-primary/30 placeholder:text-muted-foreground/60 rounded-xl transition-all duration-300",value:n,onChange:a=>r(a.target.value),required:!0,disabled:e}),m.jsx(AC,{className:"absolute left-5 top-1/2 -translate-y-1/2 h-6 w-6 text-muted-foreground"})]}),m.jsx(En,{type:"submit",className:`h-16 px-10 text-lg font-bold rounded-xl transition-all duration-300 ${e?"bg-primary/50 cursor-not-allowed":"bg-primary hover:bg-primary/90 neon-glow-green hover:scale-105"} text-primary-foreground`,disabled:e,children:e?m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(XV,{size:"sm"}),m.jsx("span",{children:i("urlForm.analyzing")})]}):m.jsxs(m.Fragment,{children:[i("urlForm.button"),m.jsx(Nx,{className:"ml-3 h-6 w-6"})]})})]})},eG=()=>{const t=E.useRef(null),e=E.useRef([]),n=E.useRef();return E.useEffect(()=>{const r=t.current;if(!r)return;const i=r.getContext("2d");if(!i)return;const s=["hsl(166, 100%, 50%)","hsl(180, 100%, 50%)","hsl(300, 100%, 60%)","hsl(280, 100%, 65%)"],a=()=>{r.width=window.innerWidth,r.height=window.innerHeight},o=()=>{const d=[],f=Math.floor(r.width*r.height/15e3);for(let h=0;h<f;h++)d.push({x:Math.random()*r.width,y:Math.random()*r.height,size:Math.random()*2+.5,speedX:(Math.random()-.5)*.3,speedY:(Math.random()-.5)*.3,opacity:Math.random()*.5+.2,color:s[Math.floor(Math.random()*s.length)]});e.current=d},l=d=>{i&&(i.beginPath(),i.arc(d.x,d.y,d.size,0,Math.PI*2),i.fillStyle=d.color,i.globalAlpha=d.opacity,i.fill(),i.shadowBlur=10,i.shadowColor=d.color,i.fill(),i.shadowBlur=0,i.globalAlpha=1)},c=()=>{if(!i)return;const d=e.current,f=120;for(let h=0;h<d.length;h++)for(let y=h+1;y<d.length;y++){const v=d[h].x-d[y].x,_=d[h].y-d[y].y,w=Math.sqrt(v*v+_*_);if(w<f){const x=(1-w/f)*.15;i.beginPath(),i.strokeStyle=`hsla(166, 100%, 50%, ${x})`,i.lineWidth=.5,i.moveTo(d[h].x,d[h].y),i.lineTo(d[y].x,d[y].y),i.stroke()}}},u=()=>{!i||!r||(i.clearRect(0,0,r.width,r.height),e.current.forEach(d=>{d.x+=d.speedX,d.y+=d.speedY,d.x<0&&(d.x=r.width),d.x>r.width&&(d.x=0),d.y<0&&(d.y=r.height),d.y>r.height&&(d.y=0),d.opacity+=(Math.random()-.5)*.02,d.opacity=Math.max(.1,Math.min(.7,d.opacity)),l(d)}),c(),n.current=requestAnimationFrame(u))};return a(),o(),u(),window.addEventListener("resize",()=>{a(),o()}),()=>{n.current&&cancelAnimationFrame(n.current),window.removeEventListener("resize",a)}},[]),m.jsx("canvas",{ref:t,className:"absolute inset-0 pointer-events-none z-0",style:{opacity:.6}})},tG=()=>{const[t,e]=E.useState(!1),{toast:n}=Tc(),r=Oc(),{t:i}=Er(),{user:s}=zd(),{subscribed:a,plan:o,analyses_remaining:l}=Rp(),c=u=>{if(!u.startsWith("http")){n({title:i("toast.invalidUrlTitle"),description:i("toast.invalidUrlDesc"),variant:"destructive"});return}if(!s){n({title:i("toast.loginRequiredTitle"),description:i("toast.loginRequiredDesc")}),r("/auth");return}if(!a){n({title:i("toast.planRequiredTitle"),description:i("toast.planRequiredDesc")}),r("/pricing");return}if(o==="base"&&l<=0){n({title:i("toast.quotaExhaustedTitle"),description:i("toast.quotaExhaustedDesc"),variant:"destructive"}),r("/pricing");return}e(!0),setTimeout(()=>{e(!1),window.location.href=`/report?url=${encodeURIComponent(u)}`},800)};return m.jsxs("section",{className:"relative w-full min-h-screen flex items-center justify-center hero-gradient overflow-hidden pt-28",children:[m.jsx(eG,{}),m.jsx("div",{className:"absolute top-1/4 left-1/4 w-[500px] h-[500px] bg-primary/30 rounded-full blur-[120px] animate-pulse"}),m.jsx("div",{className:"absolute bottom-1/4 right-1/4 w-[400px] h-[400px] bg-accent/30 rounded-full blur-[100px] animate-pulse",style:{animationDelay:"1s"}}),m.jsx("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[600px] h-[600px] bg-[hsl(180,100%,50%,0.15)] rounded-full blur-[150px]"}),m.jsx("div",{className:"container px-4 md:px-6 relative z-10",children:m.jsxs("div",{className:"flex flex-col items-center space-y-8 text-center max-w-5xl mx-auto",children:[m.jsxs("div",{className:"inline-flex items-center gap-3 px-6 py-3 rounded-full glass border-primary/30 text-base font-semibold animate-fade-in-up",children:[m.jsx(cD,{className:"h-5 w-5 text-primary"}),m.jsx("span",{className:"neon-text-green",children:i("hero.badge")})]}),m.jsx("div",{className:"inline-flex items-center gap-2 px-5 py-2 rounded-full bg-accent/10 border border-accent/40 text-sm font-bold neon-text-magenta animate-fade-in-up",style:{animationDelay:"0.1s"},children:i("madeInItaly.hero")}),m.jsxs("div",{className:"space-y-6 animate-fade-in-up",style:{animationDelay:"0.2s"},children:[m.jsxs("h1",{className:"text-5xl sm:text-6xl md:text-7xl lg:text-8xl font-black tracking-tight leading-none",children:[m.jsx("span",{className:"text-foreground",children:i("hero.title1")}),m.jsx("br",{}),m.jsx("span",{className:"text-outline",children:i("hero.title2")})]}),m.jsxs("p",{className:"mx-auto max-w-[800px] text-xl md:text-2xl text-muted-foreground font-medium",children:[i("hero.subtitle")," ",m.jsx("span",{className:"neon-text-cyan",children:i("hero.engines.chatgpt")}),","," ",m.jsx("span",{className:"neon-text-magenta",children:i("hero.engines.claude")}),","," ",m.jsx("span",{className:"neon-text-yellow",children:i("hero.engines.perplexity")}),","," ",m.jsx("span",{className:"neon-text-green",children:i("hero.engines.copilot")}),","," ",m.jsx("span",{className:"neon-text-cyan",children:i("hero.engines.gemini")})," ",i("hero.and")," ",m.jsx("span",{className:"neon-text-magenta",children:i("hero.engines.grok")}),"."]})]}),m.jsxs("div",{className:"w-full max-w-2xl space-y-5 animate-fade-in-up",style:{animationDelay:"0.4s"},children:[m.jsx(QV,{onAnalyze:c,isLoading:t}),m.jsxs("div",{className:"flex justify-between items-center text-base",children:[m.jsx("span",{className:"text-muted-foreground",children:i("hero.placeholder")}),m.jsx("a",{href:"/pricing",className:"neon-text-green font-bold hover:underline",children:i("hero.pricingLink")})]})]}),m.jsxs(B0,{className:"max-w-[700px] glass border-primary/30 animate-fade-in-up",style:{animationDelay:"0.6s"},children:[m.jsx(b0,{className:"h-5 w-5 text-primary"}),m.jsx(q0,{className:"text-base text-muted-foreground",children:i("hero.alert")})]})]})}),m.jsx("div",{className:"absolute bottom-10 left-1/2 -translate-x-1/2 animate-bounce",children:m.jsx("div",{className:"w-8 h-14 border-2 border-primary/50 rounded-full flex items-start justify-center p-2 neon-glow-green",children:m.jsx("div",{className:"w-2 h-3 bg-primary rounded-full"})})})]})},nG=({title:t,description:e,icon:n})=>m.jsxs("div",{className:"group relative flex flex-col p-8 rounded-2xl border border-border/50 bg-card/50 backdrop-blur-sm transition-all duration-500 hover:border-primary/50 hover:bg-card/80",children:[m.jsx("div",{className:"absolute inset-0 rounded-2xl bg-gradient-to-br from-primary/10 to-accent/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500"}),m.jsx("div",{className:"absolute inset-0 rounded-2xl opacity-0 group-hover:opacity-100 transition-opacity duration-500 neon-glow-green"}),m.jsxs("div",{className:"relative z-10",children:[m.jsx("div",{className:"mb-6 rounded-xl bg-primary/10 p-4 w-16 h-16 flex items-center justify-center group-hover:bg-primary/20 group-hover:neon-glow-green transition-all duration-500",children:m.jsx(n,{className:"h-8 w-8 text-primary"})}),m.jsx("h3",{className:"text-xl font-bold mb-3 text-foreground group-hover:neon-text-green transition-all duration-300",children:t}),m.jsx("p",{className:"text-base text-muted-foreground leading-relaxed",children:e})]})]}),Jt=({children:t,className:e="",variant:n="up",delay:r=0})=>{const i=E.useRef(null);E.useEffect(()=>{const a=new IntersectionObserver(o=>{o.forEach(l=>{l.isIntersecting&&setTimeout(()=>{l.target.classList.add("visible")},r)})},{threshold:.1,rootMargin:"0px 0px -50px 0px"});return i.current&&a.observe(i.current),()=>{i.current&&a.unobserve(i.current)}},[r]);const s={up:"scroll-reveal",left:"scroll-reveal-left",right:"scroll-reveal-right",scale:"scroll-reveal-scale"}[n];return m.jsx("div",{ref:i,className:`${s} ${e}`,children:t})},rG=[Cx,kC,Cv,_C,bC,EC,xC],iG=["content","cite","factual","structured","readability","llm","report"],sG=()=>{const{t}=Er();return m.jsxs("section",{className:"w-full py-28 md:py-36 bg-background relative overflow-hidden",children:[m.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-background via-card/50 to-background"}),m.jsx("div",{className:"absolute top-1/2 left-0 w-[400px] h-[400px] bg-primary/10 rounded-full blur-[120px]"}),m.jsx("div",{className:"absolute top-1/2 right-0 w-[400px] h-[400px] bg-accent/10 rounded-full blur-[120px]"}),m.jsxs("div",{className:"container px-4 md:px-6 relative z-10",children:[m.jsxs(Jt,{className:"flex flex-col items-center space-y-6 text-center mb-20",children:[m.jsx("span",{className:"text-lg font-bold uppercase tracking-widest neon-text-magenta",children:t("features.kicker")}),m.jsxs("h2",{className:"text-4xl md:text-5xl lg:text-6xl font-black tracking-tight max-w-4xl",children:[t("features.title1")," ",m.jsx("span",{className:"text-outline",children:t("features.title2")})]}),m.jsx("p",{className:"mx-auto max-w-[700px] text-muted-foreground text-xl",children:t("features.subtitle")})]}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:iG.map((e,n)=>m.jsx(Jt,{delay:n*100,variant:"scale",children:m.jsx(nG,{title:t(`features.cards.${e}.title`),description:t(`features.cards.${e}.desc`),icon:rG[n]})},e))})]})]})},aG=()=>{const{t}=Er();return m.jsxs("section",{className:"w-full py-28 md:py-36 relative overflow-hidden",children:[m.jsx("div",{className:"absolute inset-0 hero-gradient"}),m.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-full max-w-4xl h-px bg-gradient-to-r from-transparent via-primary to-transparent"}),m.jsx("div",{className:"absolute top-1/2 left-1/4 w-80 h-80 bg-primary/20 rounded-full blur-[100px] animate-pulse"}),m.jsx("div",{className:"absolute top-1/2 right-1/4 w-80 h-80 bg-accent/20 rounded-full blur-[100px] animate-pulse",style:{animationDelay:"1s"}}),m.jsx("div",{className:"container px-4 md:px-6 relative z-10",children:m.jsxs(Jt,{className:"flex flex-col items-center space-y-10 text-center max-w-4xl mx-auto",children:[m.jsx("span",{className:"text-lg font-bold uppercase tracking-widest neon-text-cyan",children:t("cta.kicker")}),m.jsxs("h2",{className:"text-4xl md:text-5xl lg:text-6xl font-black tracking-tight",children:[t("cta.title1")," ",m.jsx("span",{className:"text-outline",children:t("cta.title2")})]}),m.jsx("p",{className:"text-xl text-muted-foreground max-w-[700px]",children:t("cta.subtitle")}),m.jsxs(En,{size:"lg",className:"h-16 px-12 text-lg font-bold bg-primary hover:bg-primary/90 text-primary-foreground neon-glow-green animate-pulse-glow transition-all duration-300 hover:scale-105",onClick:()=>window.scrollTo({top:0,behavior:"smooth"}),children:[t("features.why.cta"),m.jsx(Nx,{className:"ml-3 h-6 w-6"})]})]})})]})},oG=({end:t,duration:e=2e3,suffix:n="",prefix:r="",label:i,icon:s})=>{const[a,o]=E.useState(0),[l,c]=E.useState(!1),u=E.useRef(null);E.useEffect(()=>{const f=new IntersectionObserver(h=>{h.forEach(y=>{y.isIntersecting&&!l&&c(!0)})},{threshold:.3});return u.current&&f.observe(u.current),()=>{u.current&&f.unobserve(u.current)}},[l]),E.useEffect(()=>{if(!l)return;let f,h;const y=v=>{f||(f=v);const _=Math.min((v-f)/e,1),w=1-Math.pow(1-_,4);o(Math.floor(w*t)),_<1&&(h=requestAnimationFrame(y))};return h=requestAnimationFrame(y),()=>{h&&cancelAnimationFrame(h)}},[l,t,e]);const d=f=>f>=1e6?(f/1e6).toFixed(1)+"M":f>=1e3?(f/1e3).toFixed(f>
391=1e4?0:1)+"K":f.toLocaleString();return m.jsxs("div",{ref:u,className:"flex flex-col items-center text-center p-6 rounded-2xl glass border border-primary/20 hover:border-primary/40 transition-all duration-300 group",children:[s&&m.jsx("div",{className:"mb-4 p-3 rounded-xl bg-primary/10 group-hover:bg-primary/20 transition-colors",children:s}),m.jsxs("div",{className:"text-4xl md:text-5xl lg:text-6xl font-black neon-text-green mb-2",children:[r,d(a),n]}),m.jsx("div",{className:"text-lg text-muted-foreground font-medium",children:i})]})},lG=()=>{const{t}=Er(),e=[{end:15847,label:t("stats.urls"),icon:m.jsx(Px,{className:"h-8 w-8 text-primary"}),suffix:"+"},{end:4823,label:t("stats.users"),icon:m.jsx(hD,{className:"h-8 w-8 text-primary"}),suffix:"+"},{end:98,label:t("stats.satisfaction"),icon:m.jsx(W7,{className:"h-8 w-8 text-primary"}),suffix:"%"},{end:2,label:t("stats.avgTime"),icon:m.jsx(fD,{className:"h-8 w-8 text-primary"}),prefix:"<",suffix:"s"}];return m.jsxs("section",{className:"w-full py-20 md:py-28 bg-background relative overflow-hidden",children:[m.jsx("div",{className:"absolute inset-0 bg-gradient-to-b from-card/50 via-background to-card/50"}),m.jsx("div",{className:"absolute top-1/2 left-1/4 w-[300px] h-[300px] bg-primary/10 rounded-full blur-[100px]"}),m.jsx("div",{className:"absolute top-1/2 right-1/4 w-[300px] h-[300px] bg-accent/10 rounded-full blur-[100px]"}),m.jsxs("div",{className:"container px-4 md:px-6 relative z-10",children:[m.jsxs(Jt,{className:"text-center mb-16",children:[m.jsx("span",{className:"text-lg font-bold uppercase tracking-widest neon-text-cyan",children:t("stats.kicker")}),m.jsxs("h2",{className:"text-3xl md:text-4xl lg:text-5xl font-black tracking-tight mt-4",children:[t("stats.title1")," ",m.jsx("span",{className:"text-outline",children:t("stats.title2")})]})]}),m.jsx("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((n,r)=>m.jsx(Jt,{delay:r*150,variant:"scale",children:m.jsx(oG,{end:n.end,label:n.label,icon:n.icon,suffix:n.suffix,prefix:n.prefix})},r))})]})]})},cG=()=>{const{t}=Er(),e=t("marquee",{returnObjects:!0}),n=["â
","â","â"],r=[];return e.forEach((i,s)=>{r.push(i),r.push(n[s%n.length])}),m.jsx("div",{className:"w-full py-6 bg-primary/5 border-y border-primary/20 overflow-hidden",children:m.jsx("div",{className:"marquee-container",children:m.jsx("div",{className:"inline-flex animate-marquee",children:[...r,...r].map((i,s)=>m.jsx("span",{className:`mx-6 text-lg md:text-xl font-bold tracking-wider ${n.includes(i)?"neon-text-magenta":"neon-text-cyan"}`,children:i},s))})})})},uG=()=>m.jsxs("div",{className:"flex flex-col min-h-screen",children:[m.jsx(ma,{}),m.jsxs("main",{className:"flex-1",children:[m.jsx(tG,{}),m.jsx(cG,{}),m.jsx(lG,{}),m.jsx(sG,{}),m.jsx(aG,{})]}),m.jsx(ga,{})]}),dG=({url:t})=>{const{t:e}=Er();return m.jsx("div",{className:"flex-1 flex items-center justify-center py-20",children:m.jsxs("div",{className:"text-center space-y-8 max-w-lg",children:[m.jsxs("div",{className:"relative mx-auto w-32 h-32",children:[m.jsx("div",{className:"absolute inset-0 rounded-full animate-spin",style:{background:"conic-gradient(from 0deg, transparent, hsl(166 100% 50%), hsl(180 100% 50%), hsl(300 100% 60%), transparent)",mask:"radial-gradient(farthest-side, transparent calc(100% - 4px), white calc(100% - 3px))",WebkitMask:"radial-gradient(farthest-side, transparent calc(100% - 4px), white calc(100% - 3px))",animationDuration:"1.5s"}}),m.jsx("div",{className:"absolute inset-4 rounded-full animate-spin",style:{background:"conic-gradient(from 180deg, transparent, hsl(300 100% 60%), hsl(180 100% 50%), transparent)",mask:"radial-gradient(farthest-side, transparent calc(100% - 3px), white calc(100% - 2px))",WebkitMask:"radial-gradient(farthest-side, transparent calc(100% - 3px), white calc(100% - 2px))",animationDirection:"reverse",animationDuration:"1s"}}),m.jsx("div",{className:"absolute inset-0 rounded-full blur-md opacity-50 animate-pulse",style:{background:"radial-gradient(circle, hsl(166 100% 50% / 0.3), transparent 70%)"}}),m.jsx("div",{className:"absolute inset-8 rounded-full bg-card/80 backdrop-blur flex items-center justify-center",children:m.jsx("span",{className:"text-3xl font-black neon-text-green",children:"A"})})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:e("report.loading")}),m.jsxs("p",{className:"text-lg text-muted-foreground",children:[e("report.loadingDesc")," ",m.jsx("span",{className:"neon-text-cyan font-medium",children:t})]})]}),m.jsxs("div",{className:"space-y-3",children:[m.jsx("div",{className:"w-full h-3 bg-secondary/50 rounded-full overflow-hidden border border-primary/20",children:m.jsx("div",{className:"h-full rounded-full animated-gradient",style:{width:"70%",animation:"gradient-shift 2s ease infinite, pulse 1.5s ease-in-out infinite"}})}),m.jsxs("div",{className:"flex justify-center gap-6 text-sm",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-2 h-2 rounded-full bg-primary neon-glow-green"}),m.jsx("span",{className:"text-muted-foreground",children:"Connessione"})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-2 h-2 rounded-full bg-primary animate-pulse neon-glow-green"}),m.jsx("span",{className:"text-foreground font-medium",children:"Analisi AI"})]}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-2 h-2 rounded-full bg-muted-foreground
391/30"}),m.jsx("span",{className:"text-muted-foreground",children:"Report"})]})]})]}),m.jsx("p",{className:"text-sm text-muted-foreground/70",children:"Questo processo può richiedere fino a 60 secondi"})]})})},hG=({score:t,size:e=120,strokeWidth:n=8})=>{const[r,i]=E.useState(0),s=e/2-n,a=s*2*Math.PI,o=a-r/100*a,l=()=>t>=80?"hsl(166 100% 50%)":t>=60?"hsl(60 100% 50%)":"hsl(0 100% 60%)",c=()=>t>=80?"neon-glow-green":t>=60?"neon-glow-cyan":"neon-glow-magenta";return E.useEffect(()=>{const u=setTimeout(()=>{i(t)},100);return()=>clearTimeout(u)},[t]),m.jsxs("div",{className:`relative flex items-center justify-center ${c()}`,style:{borderRadius:"50%"},children:[m.jsxs("svg",{width:e,height:e,className:"progress-ring",children:[m.jsx("circle",{className:"stroke-secondary",strokeWidth:n,stroke:"currentColor",fill:"transparent",r:s,cx:e/2,cy:e/2}),m.jsx("circle",{className:"stroke-current transition-all duration-1000 ease-out",strokeWidth:n,strokeDasharray:a,strokeDashoffset:o,strokeLinecap:"round",stroke:l(),fill:"transparent",r:s,cx:e/2,cy:e/2,style:{filter:`drop-shadow(0 0 10px ${l()})`}})]}),m.jsxs("div",{className:"absolute flex flex-col items-center justify-center text-center",children:[m.jsx("span",{className:"text-4xl font-bold text-foreground",children:r}),m.jsx("span",{className:"text-xs text-muted-foreground",children:"Punteggio AEO"})]})]})},fG="modulepreload",pG=function(t){return"/"+t},CE={},By=function(e,n,r){let i=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),o=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));i=Promise.allSettled(n.map(l=>{if(l=pG(l),l in CE)return;CE[l]=!0;const c=l.endsWith(".css"),u=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${u}`))return;const d=document.createElement("link");if(d.rel=c?"stylesheet":fG,c||(d.as="script"),d.crossOrigin="",d.href=l,o&&d.setAttribute("nonce",o),document.head.appendChild(d),c)return new Promise((f,h)=>{d.addEventListener("load",f),d.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${l}`)))})}))}function s(a){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=a,window.dispatchEvent(o),!o.defaultPrevented)throw a}return i.then(a=>{for(const o of a||[])o.status==="rejected"&&s(o.reason);return e().catch(s)})};function rn(t){"@babel/helpers - typeof";return rn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},rn(t)}var Ts=Uint8Array,Pi=Uint16Array,c5=Int32Array,u5=new Ts([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),d5=new Ts([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),PE=new Ts([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),aR=function(t,e){for(var n=new Pi(31),r=0;r<31;++r)n[r]=e+=1<<t[r-1];for(var i=new c5(n[30]),r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)i[s]=s-n[r]<<5|r;return{b:n,r:i}},oR=aR(u5,2),mG=oR.b,eb=oR.r;mG[28]=258,eb[258]=28;var gG=aR(d5,0),TE=gG.r,tb=new Pi(32768);for(var vn=0;vn<32768;++vn){var Lo=(vn&43690)>>1|(vn&21845)<<1;Lo=(Lo&52428)>>2|(Lo&13107)<<2,Lo=(Lo&61680)>>4|(Lo&3855)<<4,tb[vn]=((Lo&65280)>>8|(Lo&255)<<8)>>1}var cf=function(t,e,n){for(var r=t.length,i=0,s=new Pi(e);i<r;++i)t[i]&&++s[t[i]-1];var a=new Pi(e);for(i=1;i<e;++i)a[i]=a[i-1]+s[i-1]<<1;var o;if(n){o=new Pi(1<<e);var l=15-e;for(i=0;i<r;++i)if(t[i])for(var c=i<<4|t[i],u=e-t[i],d=a[t[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)o[tb[d]>>l]=c}else for(o=new Pi(r),i=0;i<r;++i)t[i]&&(o[i]=tb[a[t[i]-1]++]>>15-t[i]);return o},_c=new Ts(288);for(var vn=0;vn<144;++vn)_c[vn]=8;for(var vn=144;vn<256;++vn)_c[vn]=9;for(var vn=256;vn<280;++vn)_c[vn]=7;for(var vn=280;vn<288;++vn)_c[vn]=8;var H0=new Ts(32);for(var vn=0;vn<32;++vn)H0[vn]=5;var vG=cf(_c,9,0),yG=cf(H0,5,0),lR=function(t){return(t+7)/8|0},wG=function(t,e,n){return(n==null||n>t.length)&&(n=t.length),new Ts(t.subarray(e,n))},za=function(t,e,n){n<<=e&7;var r=e/8|0;t[r]|=n,t[r+1]|=n>>8},Ph=function(t,e,n){n<<=e&7;var r=e/8|0;
vendor: 12,259 bytes, lines 391-392
391t[r]|=n,t[r+1]|=n>>8,t[r+2]|=n>>16},qy=function(t,e){for(var n=[],r=0;r<t.length;++r)t[r]&&n.push({s:r,f:t[r]});var i=n.length,s=n.slice();if(!i)return{t:uR,l:0};if(i==1){var a=new Ts(n[0].s+1);return a[n[0].s]=1,{t:a,l:1}}n.sort(function(R,H){return R.f-H.f}),n.push({s:-1,f:25001});var o=n[0],l=n[1],c=0,u=1,d=2;for(n[0]={s:-1,f:o.f+l.f,l:o,r:l};u!=i-1;)o=n[n[c].f<n[d].f?c++:d++],l=n[c!=u&&n[c].f<n[d].f?c++:d++],n[u++]={s:-1,f:o.f+l.f,l:o,r:l};for(var f=s[0].s,r=1;r<i;++r)s[r].s>f&&(f=s[r].s);var h=new Pi(f+1),y=nb(n[u-1],h,0);if(y>e){var r=0,v=0,_=y-e,w=1<<_;for(s.sort(function(H,F){return h[F.s]-h[H.s]||H.f-F.f});r<i;++r){var x=s[r].s;if(h[x]>e)v+=w-(1<<y-h[x]),h[x]=e;else break}for(v>>=_;v>0;){var k=s[r].s;h[k]<e?v-=1<<e-h[k]++-1:++r}for(;r>=0&&v;--r){var N=s[r].s;h[N]==e&&(--h[N],++v)}y=e}return{t:new Ts(h),l:y}},nb=function(t,e,n){return t.s==-1?Math.max(nb(t.l,e,n+1),nb(t.r,e,n+1)):e[t.s]=n},RE=function(t){for(var e=t.length;e&&!t[--e];);for(var n=new Pi(++e),r=0,i=t[0],s=1,a=function(l){n[r++]=l},o=1;o<=e;++o)if(t[o]==i&&o!=e)++s;else{if(!i&&s>2){for(;s>138;s-=138)a(32754);s>2&&(a(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(a(i),--s;s>6;s-=6)a(8304);s>2&&(a(s-3<<5|8208),s=0)}for(;s--;)a(i);s=1,i=t[o]}return{c:n.subarray(0,r),n:e}},Th=function(t,e){for(var n=0,r=0;r<e.length;++r)n+=t[r]*e[r];return n},cR=function(t,e,n){var r=n.length,i=lR(e+2);t[i]=r&255,t[i+1]=r>>8,t[i+2]=t[i]^255,t[i+3]=t[i+1]^255;for(var s=0;s<r;++s)t[i+s+4]=n[s];return(i+4+r)*8},LE=function(t,e,n,r,i,s,a,o,l,c,u){za(e,u++,n),++i[256];for(var d=qy(i,15),f=d.t,h=d.l,y=qy(s,15),v=y.t,_=y.l,w=RE(f),x=w.c,k=w.n,N=RE(v),R=N.c,H=N.n,F=new Pi(19),M=0;M<x.length;++M)++F[x[M]&31];for(var M=0;M<R.length;++M)++F[R[M]&31];for(var I=qy(F,7),G=I.t,L=I.l,j=19;j>4&&!G[PE[j-1]];--j);var W=c+5<<3,z=Th(i,_c)+Th(s,H0)+a,re=Th(i,f)+Th(s,v)+a+14+3*j+Th(F,G)+2*F[16]+3*F[17]+7*F[18];if(l>=0&&W<=z&&W<=re)return cR(e,u,t.subarray(l,l+c));var ne,oe,U,J;if(za(e,u,1+(re<z)),u+=2,re<z){ne=cf(f,h,0),oe=f,U=cf(v,_,0),J=v;var de=cf(G,L,0);za(e,u,k-257),za(e,u+5,H-1),za(e,u+10,j-4),u+=14;for(var M=0;M<j;++M)za(e,u+3*M,G[PE[M]]);u+=3*j;for(var ie=[x,R],C=0;C<2;++C)for(var q=ie[C],M=0;M<q.length;++M){var X=q[M]&31;za(e,u,de[X]),u+=G[X],X>15&&(za(e,u,q[M]>>5&127),u+=q[M]>>12)}}else ne=vG,oe=_c,U=yG,J=H0;for(var M=0;M<o;++M){var Q=r[M];if(Q>255){var X=Q>>18&31;Ph(e,u,ne[X+257]),u+=oe[X+257],X>7&&(za(e,u,Q>>23&31),u+=u5[X]);var ee=Q&31;Ph(e,u,U[ee]),u+=J[ee],ee>3&&(Ph(e,u,Q>>5&8191),u+=d5[ee])}else Ph(e,u,ne[Q]),u+=oe[Q]}return Ph(e,u,ne[256]),u+oe[256]},bG=new c5([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),uR=new Ts(0),xG=function(t,e,n,r,i,s){var a=s.z||t.length,o=new Ts(r+a+5*(1+Math.ceil(a/7e3))+i),l=o.subarray(r,o.length-i),c=s.l,u=(s.r||0)&7;if(e){u&&(l[0]=s.r>>3);for(var d=bG[e-1],f=d>>13,h=d&8191,y=(1<<n)-1,v=s.p||new Pi(32768),_=s.h||new Pi(y+1),w=Math.ceil(n/3),x=2*w,k=function(Ke){return(t[Ke]^t[Ke+1]<<w^t[Ke+2]<<x)&y},N=new c5(25e3),R=new Pi(288),H=new Pi(32),F=0,M=0,I=s.i||0,G=0,L=s.w||0,j=0;I+2<a;++I){var W=k(I),z=I&32767,re=_[W];if(v[z]=re,_[W]=z,L<=I){var ne=a-I;if((F>7e3||G>24576)&&(ne>423||!c)){u=LE(t,l,0,N,R,H,M,G,j,I-j,u),G=F=M=0,j=I;for(var oe=0;oe<286;++oe)R[oe]=0;for(var oe=0;oe<30;++oe)H[oe]=0}var U=2,J=0,de=h,ie=z-re&32767;if(ne>2&&W==k(I-ie))for(var C=Math.min(f,ne)-1,q=Math.min(32767,I),X=Math.min(258,ne);ie<=q&&--de&&z!=re;){if(t[I+U]==t[I+U-ie]){for(var Q=0;Q<X&&t[I+Q]==t[I+Q-ie];++Q);if(Q>U){if(U=Q,J=ie,Q>C)break;for(var ee=Math.min(ie,Q-2),le=0,oe=0;oe<ee;++oe){var me=I-ie+oe&32767,pe=v[me],ge=me-pe&32767;ge>le&&(le=ge,re=me)}}}z=re,re=v[z],ie+=z-re&32767}if(J){N[G++]=268435456|eb[U]<<18|TE[J];var Ne=eb[U]&31,je=TE[J]&31;M+=u5[Ne]+d5[je],++R[257+Ne],++H[je],L=I+U,++F}else N[G++]=t[I],++R[t[I]]}}for(I=Math.max(I,L);I<a;++I)N[G++]=t[I],++R[t[I]];u=LE(t,l,c,N,R,H,M,G,j,I-j,u),c||(s.r=u&7|l[u/8|0]<<3,u-=7,s.h=_,s.p=v,s.i=I,s.w=L)}else{for(var I=s.w||0;I<a+c;I+=65535){var Re=I+65535;Re>=a&&(l[u/8|0]=c,Re=a),u=cR(l,u+1,t.subarray(I,Re))}s.i=a}return wG(o,0,r+lR(u)+i)},dR=function(){var t=1,e=0;return{p:function(n){for(var r=t,i=e,s=n.length|0,a=0;a!=s;){for(var o=Math.min(a+2655,s);a<o;++a)i+=r+=n[a];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}t=r,e=i},d:function(){return t%=65521,e%=65521,(t&255)<<24|(t&65280)<<8|(e&255)<<8|e>>8}}},_G=function(t,e,n,r,i){if(!i&&(i={l:1},e.dictionary)){var s=e.dictionary.subarray(-32768),a=new Ts(s.length+t.length);a.set(s),a.set(t,s.length),t=a,i.w=s.length}return xG(t,e.level==null?6:e.level,e.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(t.length)))*1.5):20:12+e.mem,n,r,i)},hR=function(t,e,n){for(;n;++e)t[e]=n,n>>>=8},SG=function(t,e){var n=e.level,r=n==0?0:n<6?1:n==9?3:2;if(t[0]=120,t[1]=r<<6|(e.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,e.dictionary){var i=dR();i.p(e.dictionary),hR(t,2,i.d())}};function rb(t,e){e||(e={});var n=dR();n.p(t);var r=_G(t,e,e.dictionary?6:2,4);return SG(r,e),hR(r,r.length-4,n.d()),r}var kG=typeof TextDecoder<"u"&&new TextDecoder,EG=0;try{kG.decode(uR,{stream:!0}),EG=1}catch{}function NG(t){if(Array.isArray(t))return t}function AG(t,e){var n=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(n!=null){var r,i,s,a,o=[],l=!0,c=!1;try{if(s=(n=n.call(t)).next,e!==0)for(;!(l=(r=s.call(n)).done)&&(o.push(r.value),o.length!==e);l=!0);}catch(u){c=!0,i=u}finally{try{if(!l&&n.return!=null&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}function jE(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n<e;n++)r[n]=t[n];return r}function CG(t,e){if(t){if(typeof t=="string")return jE(t,e);var n={}.toString.call(t).slice(8,-1);return n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set"?Array.from(t):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?jE(t,e):void 0}}function PG(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 392In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OE(t,e){return NG(t)||AG(t,e)||CG(t,e)||PG()}function IE(t,e="utf8"){return new TextDecoder(e).decode(t)}const TG=new TextEncoder;function RG(t){return TG.encode(t)}const LG=1024*8,jG=(()=>{const t=new Uint8Array(4),e=new Uint32Array(t.buffer);return!((e[0]=1)&t[0])})(),Hy={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class h5{constructor(e=LG,n={}){nn(this,"buffer");nn(this,"byteLength");nn(this,"byteOffset");nn(this,"length");nn(this,"offset");nn(this,"lastWrittenByte");nn(this,"littleEndian");nn(this,"_data");nn(this,"_mark");nn(this,"_marks");let r=!1;typeof e=="number"?e=new ArrayBuffer(e):(r=!0,this.lastWrittenByte=e.byteLength);const i=n.offset?n.offset>>>0:0,s=e.byteLength-i;let a=i;(ArrayBuffer.isView(e)||e instanceof h5)&&(e.byteLength!==e.buffer.byteLength&&(a=e.byteOffset+i),e=e.buffer),r?this.lastWrittenByte=s:this.lastWrittenByte=0,this.buffer=e,this.length=s,this.byteLength=s,this.byteOffset=a,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,a,s),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(e===void 0)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){const r=(this.offset+e)*2,i=new Uint8Array(r);i.set(new Uint8Array(this.buffer)),this.buffer=i.buffer,this.length=r,this.byteLength=r,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,"uint8")}readArray(e,n){const r=Hy[n].BYTES_PER_ELEMENT*e,i=this.byteOffset+this.offset,s=this.buffer.slice(i,i+r);if(this.littleEndian===jG&&n!=="uint8"&&n!=="int8"){const o=new Uint8Array(this.buffer.slice(i,i+r));o.reverse();const l=new Hy[n](o.buffer);return this.offset+=r,l.reverse(),l}const a=new Hy[n](s);return this.offset+=r,a}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let n="";for(let r=0;r<e;r++)n+=this.readChar();return n}readUtf8(e=1){return IE(this.readBytes(e))}decodeText(e=1,n="utf8"){return IE(this.readBytes(e),n)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let n=0;n<e.length;n++)this._data.setUint8(this.offset++,e[n]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let n=0;n<e.length;n++)this.writeUint8(e.charCodeAt(n));return this}writeUtf8(e){return this.writeBytes(RG(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}/*! pako 2.2.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const OG=4,DE=0,ME=1,IG=2;function $d(t){let e=t.length;for(;--e>=0;)t[e]=0}const DG=0,fR=1,MG=2,FG=3,zG=258,f5=29,Op=256,Qf=Op+1+f5,Gu=30,p5=19,pR=2*Qf+1,nc=15,Wy=16,$G=7,m5=256,mR=16,gR=17,vR=18,ib=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),$g=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),UG=ne
vendor: 7,661 bytes, line 392
392w Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),yR=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),BG=512,Ka=new Array((Qf+2)*2);$d(Ka);const uf=new Array(Gu*2);$d(uf);const ep=new Array(BG);$d(ep);const tp=new Array(zG-FG+1);$d(tp);const g5=new Array(f5);$d(g5);const W0=new Array(Gu);$d(W0);function Vy(t,e,n,r,i){this.static_tree=t,this.extra_bits=e,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=t&&t.length}let wR,bR,xR;function Gy(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}const _R=t=>t<256?ep[t]:ep[256+(t>>>7)],np=(t,e)=>{t.pending_buf[t.pending++]=e&255,t.pending_buf[t.pending++]=e>>>8&255},li=(t,e,n)=>{t.bi_valid>Wy-n?(t.bi_buf|=e<<t.bi_valid&65535,np(t,t.bi_buf),t.bi_buf=e>>Wy-t.bi_valid,t.bi_valid+=n-Wy):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=n)},ta=(t,e,n)=>{li(t,n[e*2],n[e*2+1])},SR=(t,e)=>{let n=0;do n|=t&1,t>>>=1,n<<=1;while(--e>0);return n>>>1},qG=t=>{t.bi_valid===16?(np(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=t.bi_buf&255,t.bi_buf>>=8,t.bi_valid-=8)},HG=(t,e)=>{const n=e.dyn_tree,r=e.max_code,i=e.stat_desc.static_tree,s=e.stat_desc.has_stree,a=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let c,u,d,f,h,y,v=0;for(f=0;f<=nc;f++)t.bl_count[f]=0;for(n[t.heap[t.heap_max]*2+1]=0,c=t.heap_max+1;c<pR;c++)u=t.heap[c],f=n[n[u*2+1]*2+1]+1,f>l&&(f=l,v++),n[u*2+1]=f,!(u>r)&&(t.bl_count[f]++,h=0,u>=o&&(h=a[u-o]),y=n[u*2],t.opt_len+=y*(f+h),s&&(t.static_len+=y*(i[u*2+1]+h)));if(v!==0){do{for(f=l-1;t.bl_count[f]===0;)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,v-=2}while(v>0);for(f=l;f!==0;f--)for(u=t.bl_count[f];u!==0;)d=t.heap[--c],!(d>r)&&(n[d*2+1]!==f&&(t.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},kR=(t,e,n)=>{const r=new Array(nc+1);let i=0,s,a;for(s=1;s<=nc;s++)i=i+n[s-1]<<1,r[s]=i;for(a=0;a<=e;a++){let o=t[a*2+1];o!==0&&(t[a*2]=SR(r[o]++,o))}},WG=()=>{let t,e,n,r,i;const s=new Array(nc+1);for(n=0,r=0;r<f5-1;r++)for(g5[r]=n,t=0;t<1<<ib[r];t++)tp[n++]=r;for(tp[n-1]=r,i=0,r=0;r<16;r++)for(W0[r]=i,t=0;t<1<<$g[r];t++)ep[i++]=r;for(i>>=7;r<Gu;r++)for(W0[r]=i<<7,t=0;t<1<<$g[r]-7;t++)ep[256+i++]=r;for(e=0;e<=nc;e++)s[e]=0;for(t=0;t<=143;)Ka[t*2+1]=8,t++,s[8]++;for(;t<=255;)Ka[t*2+1]=9,t++,s[9]++;for(;t<=279;)Ka[t*2+1]=7,t++,s[7]++;for(;t<=287;)Ka[t*2+1]=8,t++,s[8]++;for(kR(Ka,Qf+1,s),t=0;t<Gu;t++)uf[t*2+1]=5,uf[t*2]=SR(t,5);wR=new Vy(Ka,ib,Op+1,Qf,nc),bR=new Vy(uf,$g,0,Gu,nc),xR=new Vy(new Array(0),UG,0,p5,$G)},ER=t=>{let e;for(e=0;e<Qf;e++)t.dyn_ltree[e*2]=0;for(e=0;e<Gu;e++)t.dyn_dtree[e*2]=0;for(e=0;e<p5;e++)t.bl_tree[e*2]=0;t.dyn_ltree[m5*2]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},NR=t=>{t.bi_valid>8?np(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},FE=(t,e,n,r)=>{const i=e*2,s=n*2;return t[i]<t[s]||t[i]===t[s]&&r[e]<=r[n]},Ky=(t,e,n)=>{const r=t.heap[n];let i=n<<1;for(;i<=t.heap_len&&(i<t.heap_len&&FE(e,t.heap[i+1],t.heap[i],t.depth)&&i++,!FE(e,r,t.heap[i],t.depth));)t.heap[n]=t.heap[i],n=i,i<<=1;t.heap[n]=r},zE=(t,e,n)=>{let r,i,s=0,a,o;if(t.sym_next!==0)do r=t.pending_buf[t.sym_buf+s++]&255,r+=(t.pending_buf[t.sym_buf+s++]&255)<<8,i=t.pending_buf[t.sym_buf+s++],r===0?ta(t,i,e):(a=tp[i],ta(t,a+Op+1,e),o=ib[a],o!==0&&(i-=g5[a],li(t,i,o)),r--,a=_R(r),ta(t,a,n),o=$g[a],o!==0&&(r-=W0[a],li(t,r,o)));while(s<t.sym_next);ta(t,m5,e)},sb=(t,e)=>{const n=e.dyn_tree,r=e.stat_desc.static_tree,i=e.stat_desc.has_stree,s=e.stat_desc.elems;let a,o,l=-1,c;for(t.heap_len=0,t.heap_max=pR,a=0;a<s;a++)n[a*2]!==0?(t.heap[++t.heap_len]=l=a,t.depth[a]=0):n[a*2+1]=0;for(;t.heap_len<2;)c=t.heap[++t.heap_len]=l<2?++l:0,n[c*2]=1,t.depth[c]=0,t.opt_len--,i&&(t.static_len-=r[c*2+1]);for(e.max_code=l,a=t.heap_len>>1;a>=1;a--)Ky(t,n,a);c=s;do a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],Ky(t,n,1),o=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=o,n[c*2]=n[a*2]+n[o*2],t.depth[c]=(t.depth[a]>=t.depth[o]?t.depth[a]:t.depth[o])+1,n[a*2+1]=n[o*2+1]=c,t.heap[1]=c++,Ky(t,n,1);while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],HG(t,e),kR(n,l,t.bl_count)},$E=(t,e,n)=>{let r,i=-1,s,a=e[0*2+1],o=0,l=7,c=4;for(a===0&&(l=138,c=3),e[(n+1)*2+1]=65535,r=0;r<=n;r++)s=a,a=e[(r+1)*2+1],!(++o<l&&s===a)&&(o<c?t.bl_tree[s*2]+=o:s!==0?(s!==i&&t.bl_tree[s*2]++,t.bl_tree[mR*2]++):o<=10?t.bl_tree[gR*2]++:t.bl_tree[vR*2]++,o=0,i=s,a===0?(l=138,c=3):s===a?(l=6,c=3):(l=7,c=4))},UE=(t,e,n)=>{let r,i=-1,s,a=e[0*2+1],o=0,l=7,c=4;for(a===0&&(l=138,c=3),r=0;r<=n;r++)if(s=a,a=e[(r+1)*2+1],!(++o<l&&s===a)){if(o<c)do ta(t,s,t.bl_tree);while(--o!==0);else s!==0?(s!==i&&(ta(t,s,t.bl_tree),o--),ta(t,mR,t.bl_tree),li(t,o-3,2)):o<=10?(ta(t,gR,t.bl_tree),li(t,o-3,3)):(ta(t,vR,t.bl_tree),li(t,o-11,7));o=0,i=s,a===0?(l=138,c=3):s===a?(l=6,c=3):(l=7,c=4)}},VG=t=>{let e;for($E(t,t.dyn_ltree,t.l_desc.max_code),$E(t,t.dyn_dtree,t.d_desc.max_code),sb(t,t.bl_desc),e=p5-1;e>=3&&t.bl_tree[yR[e]*2+1]===0;e--);return t.opt_len+=3*(e+1)+5+5+4,e},GG=(t,e,n,r)=>{let i;for(li(t,e-257,5),li(t,n-1,5),li(t,r-4,4),i=0;i<r;i++)li(t,t.bl_tree[yR[i]*2+1],3);UE(t,t.dyn_ltree,e-1),UE(t,t.dyn_dtree,n-1)},KG=t=>{let e=4093624447,n;for(n=0;n<=31;n++,e>>>=1)if(e&1&&t.dyn_ltree[n*2]!==0)return DE;if(t.dyn_ltree[9*2]!==0||t.dyn_ltree[10*2]!==0||t.dyn_ltree[13*2]!==0)return ME;for(n=32;n<Op;n++)if(t.dyn_ltree[n*2]!==0)return ME;return DE};let BE=!1;const ZG=t=>{BE||(WG(),BE=!0),t.l_desc=new Gy(t.dyn_ltree,wR),t.d_desc=new Gy(t.dyn_dtree,bR),t.bl_desc=new Gy(t.bl_tree,xR),t.bi_buf=0,t.bi_valid=0,ER(t)},AR=(t,e,n,r)=>{li(t,(DG<<1)+(r?1:0),3),NR(t),np(t,n),np(t,~n),n&&t.pending_buf.set(t.window.subarray(e,e+n),t.pending),t.pending+=n},YG=t=>{li(t,fR<<1,3),ta(t,m5,Ka),qG(t)},JG=(t,e,n,r)=>{let i,s,a=0;t.level>0?(t.strm.data_type===IG&&(t.strm.data_type=KG(t)),sb(t,t.l_desc),sb(t,t.d_desc),a=VG(t),i=t.opt_len+3+7>>>3,s=t.static_len+3+7>>>3,s<=i&&(i=s)):i=s=n+5,n+4<=i&&e!==-1?AR(t,e,n,r):t.strategy===OG||s===i?(li(t,(fR<<1)+(r?1:0),3),zE(t,Ka,uf)):(li(t,(MG<<1)+(r?1:0),3),GG(t,t.l_desc.max_code+1,t.d_desc.max_code+1,a+1),zE(t,t.dyn_ltree,t.dyn_dtree)),ER(t),r&&NR(t)},XG=(t,e,n)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=n,e===0?t.dyn_ltree[n*2]++:(t.matches++,e--,t.dyn_ltree[(tp[n]+Op+1)*2]++,t.dyn_dtree[_R(e)*2]++),t.sym_next===t.sym_end);var QG=ZG,eK=AR,tK=JG,nK=XG,rK=YG,iK={_tr_init:QG,_tr_stored_block:eK,_tr_flush_block:tK,_tr_tally:nK,_tr_align:rK};const sK=(t,e,n,r)=>{let i=t&65535|0,s=t>>>16&65535|0,a=0;for(;n!==0;){a=n>2e3?2e3:n,n-=a;do i=i+e[r++]|0,s=s+i|0;while(--a);i%=65521,s%=65521}return i|s<<16|0};var rp=sK;const aK=()=>{let t,e=[];for(var n=0;n<256;n++){t=n;for(var r=0;r<8;r++)t=t&1?3988292384^t>>>1:t>>>1;e[n]=t}return e},oK=new Uint32Array(aK()),lK=(t,e,n,r)=>{const i=oK,s=r+n;t^=-1;for(let a=r;a<s;a++)t=t>>>8^i[(t^e[a])&255];return t^-1};var ur=lK,xd={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Ip={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:cK,_tr_stored_block:ab,_tr_flush_block:uK,_tr_tally:cl,_tr_align:dK}=iK,{Z_NO_FLUSH:ul,Z_PARTIAL_FLUSH:hK,Z_FULL_FLUSH:fK,Z_FINISH:Ji,Z_BLOCK:qE,Z_OK:xr,Z_STREAM_END:HE,Z_STREAM_ERROR:oa,Z_DATA_ERROR:pK,Z_BUF_ER
vendor: 10,767 bytes, line 392
392ROR:Zy,Z_DEFAULT_COMPRESSION:mK,Z_FILTERED:gK,Z_HUFFMAN_ONLY:cg,Z_RLE:vK,Z_FIXED:yK,Z_DEFAULT_STRATEGY:wK,Z_UNKNOWN:bK,Z_DEFLATED:t1}=Ip,xK=9,_K=15,SK=8,kK=29,EK=256,ob=EK+1+kK,NK=30,AK=19,CK=2*ob+1,PK=15,Zt=3,Xo=258,la=Xo+Zt+1,TK=32,_d=42,v5=57,lb=69,cb=73,ub=91,db=103,rc=113,Bh=666,Yr=1,Ud=2,Sc=3,Bd=4,RK=3,ic=(t,e)=>(t.msg=xd[e],e),WE=t=>t*2-(t>4?9:0),Bo=t=>{let e=t.length;for(;--e>=0;)t[e]=0},LK=t=>{let e,n,r,i=t.w_size;e=t.hash_size,r=e;do n=t.head[--r],t.head[r]=n>=i?n-i:0;while(--e);e=i,r=e;do n=t.prev[--r],t.prev[r]=n>=i?n-i:0;while(--e)};let y5=(t,e,n)=>(e<<t.hash_shift^n)&t.hash_mask;const kc=(t,e)=>{let n;if(t.legacy_hash)n=t.ins_h=y5(t,t.ins_h,t.window[e+Zt-1]);else{const i=t.window,s=i[e]|i[e+1]<<8|i[e+2]<<16|i[e+3]<<24;n=t.ins_h=Math.imul(s,66521)+66521>>>16&t.hash_mask}const r=t.prev[e&t.w_mask]=t.head[n];return t.head[n]=e,r},_i=t=>{const e=t.state;let n=e.pending;n>t.avail_out&&(n=t.avail_out),n!==0&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+n),t.next_out),t.next_out+=n,e.pending_out+=n,t.total_out+=n,t.avail_out-=n,e.pending-=n,e.pending===0&&(e.pending_out=0))},Ti=(t,e)=>{uK(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,_i(t.strm)},Yt=(t,e)=>{t.pending_buf[t.pending++]=e},Rh=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=e&255},hb=(t,e,n,r)=>{let i=t.avail_in;return i>r&&(i=r),i===0?0:(t.avail_in-=i,e.set(t.input.subarray(t.next_in,t.next_in+i),n),t.state.wrap===1?t.adler=rp(t.adler,e,i,n):t.state.wrap===2&&(t.adler=ur(t.adler,e,i,n)),t.next_in+=i,t.total_in+=i,i)},CR=(t,e)=>{let n=t.max_chain_length,r=t.strstart,i,s,a=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-la?t.strstart-(t.w_size-la):0,c=t.window,u=t.w_mask,d=t.prev,f=t.strstart+Xo;let h=c[r+a-1],y=c[r+a];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do if(i=e,!(c[i+a]!==y||c[i+a-1]!==h||c[i]!==c[r]||c[++i]!==c[r+1])){r+=2,i++;do;while(c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&c[++r]===c[++i]&&r<f);if(s=Xo-(f-r),r=f-Xo,s>a){if(t.match_start=e,a=s,s>=o)break;h=c[r+a-1],y=c[r+a]}}while((e=d[e&u])>l&&--n!==0);return a<=t.lookahead?a:t.lookahead},Sd=t=>{const e=t.w_size;let n,r,i;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-la)&&(t.window.set(t.window.subarray(e,e+e-r),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),LK(t),r+=e),t.strm.avail_in===0)break;if(n=hb(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=n,t.legacy_hash){if(t.lookahead+t.insert>=Zt)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=y5(t,t.ins_h,t.window[i+1]);t.insert&&(kc(t,i),i++,t.insert--,!(t.lookahead+t.insert<Zt)););}else if(t.lookahead+t.insert>Zt)for(i=t.strstart-t.insert;t.insert&&(kc(t,i),i++,t.insert--,!(t.lookahead+t.insert<=Zt)););}while(t.lookahead<la&&t.strm.avail_in!==0)},PR=(t,e)=>{let n=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r,i,s,a=0,o=t.strm.avail_in;do{if(r=65535,s=t.bi_valid+42>>3,t.strm.avail_out<s||(s=t.strm.avail_out-s,i=t.strstart-t.block_start,r>i+t.strm.avail_in&&(r=i+t.strm.avail_in),r>s&&(r=s),r<n&&(r===0&&e!==Ji||e===ul||r!==i+t.strm.avail_in)))break;a=e===Ji&&r===i+t.strm.avail_in?1:0,ab(t,0,0,a),t.pending_buf[t.pending-4]=r,t.pending_buf[t.pending-3]=r>>8,t.pending_buf[t.pending-2]=~r,t.pending_buf[t.pending-1]=~r>>8,_i(t.strm),i&&(i>r&&(i=r),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,r-=i),r&&(hb(t.strm,t.strm.output,t.strm.next_out,r),t.strm.next_out+=r,t.strm.avail_out-=r,t.strm.total_out+=r)}while(a===0);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),a?Bd:e!==ul&&e!==Ji&&t.strm.avail_in===0&&t.strstart===t.block_start?Ud:(s=t.window_size-t.strstart,t.strm.avail_in>s&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,s+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),s>t.strm.avail_in&&(s=t.strm.avail_in),s&&(hb(t.strm,t.window,t.strstart,s),t.strstart+=s,t.insert+=s>t.w_size-t.insert?t.w_size-t.insert:s),t.high_water<t.strstart&&(t.high_water=t.strstart),s=t.bi_valid+42>>3,s=t.pending_buf_size-s>65535?65535:t.pending_buf_size-s,n=s>t.w_size?t.w_size:s,i=t.strstart-t.block_start,(i>=n||(i||e===Ji)&&e!==ul&&t.strm.avail_in===0&&i<=s)&&(r=i>s?s:i,a=e===Ji&&t.strm.avail_in===0&&r===i?1:0,ab(t,t.block_start,r,a),t.block_start+=r,_i(t.strm)),a?Sc:Yr)},Yy=(t,e)=>{let n,r;for(;;){if(t.lookahead<la){if(Sd(t),t.lookahead<la&&e===ul)return Yr;if(t.lookahead===0)break}if(n=0,t.lookahead>=Zt&&(n=kc(t,t.strstart)),n!==0&&t.strstart-n<=t.w_size-la&&(t.match_length=CR(t,n)),t.match_length>=Zt)if(r=cl(t,t.strstart-t.match_start,t.match_length-Zt),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=Zt){t.match_length--;do t.strstart++,n=kc(t,t.strstart);while(--t.match_length!==0);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.legacy_hash&&(t.ins_h=t.window[t.strstart],t.ins_h=y5(t,t.ins_h,t.window[t.strstart+1]));else r=cl(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(r&&(Ti(t,!1),t.strm.avail_out===0))return Yr}return t.insert=t.strstart<Zt-1?t.strstart:Zt-1,e===Ji?(Ti(t,!0),t.strm.avail_out===0?Sc:Bd):t.sym_next&&(Ti(t,!1),t.strm.avail_out===0)?Yr:Ud},lu=(t,e)=>{let n,r,i;for(;;){if(t.lookahead<la){if(Sd(t),t.lookahead<la&&e===ul)return Yr;if(t.lookahead===0)break}if(n=0,t.lookahead>=Zt&&(n=kc(t,t.strstart)),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=Zt-1,n!==0&&t.prev_length<t.max_lazy_match&&t.strstart-n<=t.w_size-la&&(t.match_length=CR(t,n),t.match_length<=5&&(t.strategy===gK||t.match_length===Zt&&t.strstart-t.match_start>4096)&&(t.match_length=Zt-1)),t.prev_length>=Zt&&t.match_length<=t.prev_length){i=t.strstart+t.lookahead-Zt,r=cl(t,t.strstart-1-t.prev_match,t.prev_length-Zt),t.lookahead-=t.prev_length-1,t.prev_length-=2;do++t.strstart<=i&&(n=kc(t,t.strstart));while(--t.prev_length!==0);if(t.match_available=0,t.match_length=Zt-1,t.strstart++,r&&(Ti(t,!1),t.strm.avail_out===0))return Yr}else if(t.match_available){if(r=cl(t,0,t.window[t.strstart-1]),r&&Ti(t,!1),t.strstart++,t.lookahead--,t.strm.avail_out===0)return Yr}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(r=cl(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<Zt-1?t.strstart:Zt-1,e===Ji?(Ti(t,!0),t.strm.avail_out===0?Sc:Bd):t.sym_next&&(Ti(t,!1),t.strm.avail_out===0)?Yr:Ud},jK=(t,e)=>{let n,r,i,s;const a=t.window;for(;;){if(t.lookahead<=Xo){if(Sd(t),t.lookahead<=Xo&&e===ul)return Yr;if(t.lookahead===0)break}if(t.match_length=0,t.lookahead>=Zt&&t.strstart>0&&(i=t.strstart-1,r=a[i],r===a[++i]&&r===a[++i]&&r===a[++i])){s=t.strstart+Xo;do;while(r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&r===a[++i]&&i<s);t.match_length=Xo-(s-i),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=Zt?(n=cl(t,1,t.match_length-Zt),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(n=cl(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),n&&(Ti(t,!1),t.strm.avail_out===0))return Yr}return t.insert=0,e===Ji?(Ti(t,!0),t.strm.avail_out===0?Sc:Bd):t.sym_next&&(Ti(t,!1),t.strm.avail_out===0)?Yr:Ud},OK=(t,e)=>{let n;for(;;){if(t.lookahead===0&&(Sd(t),t.lookahead===0)){if(e===ul)return Yr;break}if(t.match_length=0,n=cl(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,n&&(Ti(t,!1),t.strm.avail_out===0))return Yr}return t.insert=0,e===Ji?(Ti(t,!0),t.strm.avail_out===0?Sc:Bd):t.sym_next&&(Ti(t,!1),t.strm.avail_out===0)?Yr:Ud};function Ws(t,e,n,r,i){this.good_length=t,this.max_lazy=e,this.nice_length=n,this.max_chain=r,this.func=i}const qh=[new Ws(0,0,0,0,PR),new Ws(4,4,8,4,Yy),new Ws(4,5,16,8,Yy),new Ws(4,6,32,32,Yy),new Ws(4,4,16,16,lu),new Ws(8,16,32,32,lu),new Ws(8,16,128,128,lu),new Ws(8,32,128,256,lu),new Ws(32,128,258,1024,lu),new Ws(32,258,258,4096,lu)],IK=t=>{t.window_size=2*t.w_size,Bo(t.head),t.max_lazy_match=qh[t.level].max_lazy,t.good_match=qh[t.level].good_length,t.nice_match=qh[t.level].nice_length,t.max_chain_length=qh[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=Zt-1,t.match_available=0,t.ins_h=0};function DK(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=t1,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.legacy_hash=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(CK*2),this.dyn_dtree=new Uint16Array((2*NK+1)*2),this.bl_tree=new Uint16Array((2*AK+1)*2),Bo(this.dyn_ltree),Bo(this.dyn_dtree),Bo(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(PK+1),this.heap=new Uint16Array(2*ob+1),Bo(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*ob+1),Bo(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Dp=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.status!==_d&&e.status!==v5&&e.status!==lb&&e.status!==cb&&e.status!==ub&&e.status!==db&&e.status!==rc&&e.status!==Bh?1:0},TR=t=>{if(Dp(t))return ic(t,oa);t.total_in=t.total_out=0,t.data_type=bK;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap===2?v5:e.wrap?_d:rc,t.adler=e.wrap===2?0:1,e.last_flush=-2,cK(e),xr},RR=t=>{const e=TR(t);return e===xr&&IK(t.state),e},MK=(t,e)=>Dp(t)||t.state.wrap!==2?oa:(t.state.gzhead=e,xr),LR=(t,e,n,r,i,s,a)=>
vendor: 24,864 bytes, line 392
392{if(!t)return oa;let o=1;if(e===mK&&(e=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>xK||n!==t1||r<8||r>15||e<0||e>9||s<0||s>yK||r===8&&o!==1)return ic(t,oa);r===8&&(r=9);const l=new DK;return t.state=l,l.strm=t,l.status=_d,l.wrap=o,l.gzhead=null,l.w_bits=r,l.w_size=1<<l.w_bits,l.w_mask=l.w_size-1,l.legacy_hash=a?1:0,l.hash_bits=i+7,!l.legacy_hash&&l.hash_bits<15&&(l.hash_bits=15),l.hash_size=1<<l.hash_bits,l.hash_mask=l.hash_size-1,l.hash_shift=~~((l.hash_bits+Zt-1)/Zt),l.window=new Uint8Array(l.w_size*2),l.head=new Uint16Array(l.hash_size),l.prev=new Uint16Array(l.w_size),l.lit_bufsize=1<<i+6,l.pending_buf_size=l.lit_bufsize*4,l.pending_buf=new Uint8Array(l.pending_buf_size),l.sym_buf=l.lit_bufsize,l.sym_end=(l.lit_bufsize-1)*3,l.level=e,l.strategy=s,l.method=n,RR(t)},FK=(t,e)=>LR(t,e,t1,_K,SK,wK),zK=(t,e)=>{if(Dp(t)||e>qE||e<0)return t?ic(t,oa):oa;const n=t.state;if(!t.output||t.avail_in!==0&&!t.input||n.status===Bh&&e!==Ji)return ic(t,t.avail_out===0?Zy:oa);const r=n.last_flush;if(n.last_flush=e,n.pending!==0){if(_i(t),t.avail_out===0)return n.last_flush=-1,xr}else if(t.avail_in===0&&WE(e)<=WE(r)&&e!==Ji)return ic(t,Zy);if(n.status===Bh&&t.avail_in!==0)return ic(t,Zy);if(n.status===_d&&n.wrap===0&&(n.status=rc),n.status===_d){let i=t1+(n.w_bits-8<<4)<<8,s=-1;if(n.strategy>=cg||n.level<2?s=0:n.level<6?s=1:n.level===6?s=2:s=3,i|=s<<6,n.strstart!==0&&(i|=TK),i+=31-i%31,Rh(n,i),n.strstart!==0&&(Rh(n,t.adler>>>16),Rh(n,t.adler&65535)),t.adler=1,n.status=rc,_i(t),n.pending!==0)return n.last_flush=-1,xr}if(n.status===v5){if(t.adler=0,Yt(n,31),Yt(n,139),Yt(n,8),n.gzhead)Yt(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Yt(n,n.gzhead.time&255),Yt(n,n.gzhead.time>>8&255),Yt(n,n.gzhead.time>>16&255),Yt(n,n.gzhead.time>>24&255),Yt(n,n.level===9?2:n.strategy>=cg||n.level<2?4:0),Yt(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(Yt(n,n.gzhead.extra.length&255),Yt(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=ur(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=lb;else if(Yt(n,0),Yt(n,0),Yt(n,0),Yt(n,0),Yt(n,0),Yt(n,n.level===9?2:n.strategy>=cg||n.level<2?4:0),Yt(n,RK),n.status=rc,_i(t),n.pending!==0)return n.last_flush=-1,xr}if(n.status===lb){if(n.gzhead.extra){let i=n.pending,s=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+s>n.pending_buf_size;){let o=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(t.adler=ur(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=o,_i(t),n.pending!==0)return n.last_flush=-1,xr;i=0,s-=o}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+s),n.pending),n.pending+=s,n.gzhead.hcrc&&n.pending>i&&(t.adler=ur(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=cb}if(n.status===cb){if(n.gzhead.name){let i=n.pending,s;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(t.adler=ur(t.adler,n.pending_buf,n.pending-i,i)),_i(t),n.pending!==0)return n.last_flush=-1,xr;i=0}n.gzindex<n.gzhead.name.length?s=n.gzhead.name.charCodeAt(n.gzindex++)&255:s=0,Yt(n,s)}while(s!==0);n.gzhead.hcrc&&n.pending>i&&(t.adler=ur(t.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=ub}if(n.status===ub){if(n.gzhead.comment){let i=n.pending,s;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(t.adler=ur(t.adler,n.pending_buf,n.pending-i,i)),_i(t),n.pending!==0)return n.last_flush=-1,xr;i=0}n.gzindex<n.gzhead.comment.length?s=n.gzhead.comment.charCodeAt(n.gzindex++)&255:s=0,Yt(n,s)}while(s!==0);n.gzhead.hcrc&&n.pending>i&&(t.adler=ur(t.adler,n.pending_buf,n.pending-i,i))}n.status=db}if(n.status===db){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(_i(t),n.pending!==0))return n.last_flush=-1,xr;Yt(n,t.adler&255),Yt(n,t.adler>>8&255),t.adler=0}if(n.status=rc,_i(t),n.pending!==0)return n.last_flush=-1,xr}if(t.avail_in!==0||n.lookahead!==0||e!==ul&&n.status!==Bh){let i=n.level===0?PR(n,e):n.strategy===cg?OK(n,e):n.strategy===vK?jK(n,e):qh[n.level].func(n,e);if((i===Sc||i===Bd)&&(n.status=Bh),i===Yr||i===Sc)return t.avail_out===0&&(n.last_flush=-1),xr;if(i===Ud&&(e===hK?dK(n):e!==qE&&(ab(n,0,0,!1),e===fK&&(Bo(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),_i(t),t.avail_out===0))return n.last_flush=-1,xr}return e!==Ji?xr:n.wrap<=0?HE:(n.wrap===2?(Yt(n,t.adler&255),Yt(n,t.adler>>8&255),Yt(n,t.adler>>16&255),Yt(n,t.adler>>24&255),Yt(n,t.total_in&255),Yt(n,t.total_in>>8&255),Yt(n,t.total_in>>16&255),Yt(n,t.total_in>>24&255)):(Rh(n,t.adler>>>16),Rh(n,t.adler&65535)),_i(t),n.wrap>0&&(n.wrap=-n.wrap),n.pending!==0?xr:HE)},$K=t=>{if(Dp(t))return oa;const e=t.state.status;return t.state=null,e===rc?ic(t,pK):xr},UK=(t,e)=>{let n=e.length;if(Dp(t))return oa;const r=t.state,i=r.wrap;if(i===2||i===1&&r.status!==_d||r.lookahead)return oa;if(i===1&&(t.adler=rp(t.adler,e,n,0)),r.wrap=0,n>=r.w_size){i===0&&(Bo(r.head),r.strstart=0,r.block_start=0,r.insert=0);let l=new Uint8Array(r.w_size);l.set(e.subarray(n-r.w_size,n),0),e=l,n=r.w_size}const s=t.avail_in,a=t.next_in,o=t.input;for(t.avail_in=n,t.next_in=0,t.input=e,Sd(r);r.lookahead>=Zt;){let l=r.strstart,c=r.lookahead-(Zt-1);do kc(r,l),l++;while(--c);r.strstart=l,r.lookahead=Zt-1,Sd(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=Zt-1,r.match_available=0,t.next_in=a,t.input=o,t.avail_in=s,r.wrap=i,xr};var BK=FK,qK=LR,HK=RR,WK=TR,VK=MK,GK=zK,KK=$K,ZK=UK,YK="pako deflate (from Nodeca project)",df={deflateInit:BK,deflateInit2:qK,deflateReset:HK,deflateResetKeep:WK,deflateSetHeader:VK,deflate:GK,deflateEnd:KK,deflateSetDictionary:ZK,deflateInfo:YK};const JK=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var XK=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const n=e.shift();if(n){if(typeof n!="object")throw new TypeError(n+"must be non-object");for(const r in n)JK(n,r)&&(t[r]=n[r])}}return t},QK=t=>{let e=0;for(let r=0,i=t.length;r<i;r++)e+=t[r].length;const n=new Uint8Array(e);for(let r=0,i=0,s=t.length;r<s;r++){let a=t[r];n.set(a,i),i+=a.length}return n},n1={assign:XK,flattenChunks:QK};let jR=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{jR=!1}const ip=new Uint8Array(256);for(let t=0;t<256;t++)ip[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;ip[254]=ip[255]=1;var eZ=t=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(t);let e,n,r,i,s,a=t.length,o=0;for(i=0;i<a;i++)n=t.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),o+=n<128?1:n<2048?2:n<65536?3:4;for(e=new Uint8Array(o),s=0,i=0;s<o;i++)n=t.charCodeAt(i),(n&64512)===55296&&i+1<a&&(r=t.charCodeAt(i+1),(r&64512)===56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?e[s++]=n:n<2048?(e[s++]=192|n>>>6,e[s++]=128|n&63):n<65536?(e[s++]=224|n>>>12,e[s++]=128|n>>>6&63,e[s++]=128|n&63):(e[s++]=240|n>>>18,e[s++]=128|n>>>12&63,e[s++]=128|n>>>6&63,e[s++]=128|n&63);return e};const tZ=(t,e)=>{if(e<65534&&t.subarray&&jR)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let n="";for(let r=0;r<e;r++)n+=String.fromCharCode(t[r]);return n};var nZ=(t,e)=>{const n=e||t.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(t.subarray(0,e));let r,i;const s=new Array(n*2);for(i=0,r=0;r<n;){let a=t[r++];if(a<128){s[i++]=a;continue}let o=ip[a];if(o>4){s[i++]=65533,r+=o-1;continue}for(a&=o===2?31:o===3?15:7;o>1&&r<n;)a=a<<6|t[r++]&63,o--;if(o>1){s[i++]=65533;continue}a<65536?s[i++]=a:(a-=65536,s[i++]=55296|a>>10&1023,s[i++]=56320|a&1023)}return tZ(s,i)},rZ=(t,e)=>{e=e||t.length,e>t.length&&(e=t.length);let n=e-1;for(;n>=0&&(t[n]&192)===128;)n--;return n<0||n===0?e:n+ip[t[n]]>e?n:e},sp={string2buf:eZ,buf2string:nZ,utf8border:rZ};function iZ(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var OR=iZ;const IR=Object.prototype.toString,{Z_NO_FLUSH:sZ,Z_SYNC_FLUSH:aZ,Z_FULL_FLUSH:oZ,Z_FINISH:lZ,Z_OK:V0,Z_STREAM_END:cZ,Z_DEFAULT_COMPRESSION:uZ,Z_DEFAULT_STRATEGY:dZ,Z_DEFLATED:hZ}=Ip,fZ={level:uZ,method:hZ,chunkSize:16384,windowBits:15,memLevel:8,strategy:dZ,legacyHash:!0};function w5(t){this.options=n1.assign({},fZ,t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new OR,this.strm.avail_out=0;let n=df.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy,e.legacyHash);if(n!==V0)throw new Error(xd[n]);if(e.header&&df.deflateSetHeader(this.strm,e.header),e.dictionary){let r;if(typeof e.dictionary=="string"?r=sp.string2buf(e.dictionary):IR.call(e.dictionary)==="[object ArrayBuffer]"?r=new Uint8Array(e.dictionary):r=e.dictionary,n=df.deflateSetDictionary(this.strm,r),n!==V0)throw new Error(xd[n]);this._dict_set=!0}}w5.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize;let i,s;if(this.ended)return!1;for(e===~~e?s=e:s=e===!0?lZ:sZ,typeof t=="string"?n.input=sp.string2buf(t):IR.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(s===aZ||s===oZ)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=df.deflate(n,s),i===cZ)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=df.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===V0;if(n.avail_out===0){this.onData(n.output);continue}if(s>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0};w5.prototype.onData=function(t){this.chunks.push(t)};w5.prototype.onEnd=function(t){t===V0&&(this.result=n1.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const ug=16209,pZ=16191;var mZ=function(e,n){let r,i,s,a,o,l,c,u,d,f,h,y,v,_,w,x,k,N,R,H,F,M,I,G;const L=e.state;r=e.next_in,I=e.input,i=r+(e.avail_in-5),s=e.next_out,G=e.output,a=s-(n-e.avail_out),o=s+(e.avail_out-257),l=L.dmax,c=L.wsize,u=L.whave,d=L.wnext,f=L.window,h=L.hold,y=L.bits,v=L.lencode,_=L.distcode,w=(1<<L.lenbits)-1,x=(1<<L.distbits)-1;e:do{y<15&&(h+=I[r++]<<y,y+=8,h+=I[r++]<<y,y+=8),k=v[h&w];t:for(;;){if(N=k>>>24,h>>>=N,y-=N,N=k>>>16&255,N===0)G[s++]=k&65535;else if(N&16){R=k&65535,N&=15,N&&(y<N&&(h+=I[r++]<<y,y+=8),R+=h&(1<<N)-1,h>>>=N,y-=N),y<15&&(h+=I[r++]<<y,y+=8,h+=I[r++]<<y,y+=8),k=_[h&x];n:for(;;){if(N=k>>>24,h>>>=N,y-=N,N=k>>>16&255,N&16){if(H=k&65535,N&=15,y<N&&(h+=I[r++]<<y,y+=8,y<N&&(h+=I[r++]<<y,y+=8)),H+=h&(1<<N)-1,H>l){e.msg="invalid distance too far back",L.mode=ug;break e}if(h>>>=N,y-=N,N=s-a,H>N){if(N=H-N,N>u&&L.sane){e.msg="invalid distance too far back",L.mode=ug;break e}if(F=0,M=f,d===0){if(F+=c-N,N<R){R-=N;do G[s++]=f[F++];while(--N);F=s-H,M=G}}else if(d<N){if(F+=c+d-N,N-=d,N<R){R-=N;do G[s++]=f[F++];while(--N);if(F=0,d<R){N=d,R-=N;do G[s++]=f[F++];while(--N);F=s-H,M=G}}}else if(F+=d-N,N<R){R-=N;do G[s++]=f[F++];while(--N);F=s-H,M=G}for(;R>2;)G[s++]=M[F++],G[s++]=M[F++],G[s++]=M[F++],R-=3;R&&(G[s++]=M[F++],R>1&&(G[s++]=M[F++]))}else{F=s-H;do G[s++]=G[F++],G[s++]=G[F++],G[s++]=G[F++],R-=3;while(R>2);R&&(G[s++]=G[F++],R>1&&(G[s++]=G[F++]))}}else if(N&64){e.msg="invalid distance code",L.mode=ug;break e}else{k=_[(k&65535)+(h&(1<<N)-1)];continue n}break}}else if(N&64)if(N&32){L.mode=pZ;break e}else{e.msg="invalid literal/length code",L.mode=ug;break e}else{k=v[(k&65535)+(h&(1<<N)-1)];continue t}break}}while(r<i&&s<o);R=y>>3,r-=R,y-=R<<3,h&=(1<<y)-1,e.next_in=r,e.next_out=s,e.avail_in=r<i?5+(i-r):5-(r-i),e.avail_out=s<o?257+(o-s):257-(s-o),L.hold=h,L.bits=y};const cu=15,VE=852,GE=592,KE=0,Jy=1,ZE=2,gZ=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),vZ=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,199,75]),yZ=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),wZ=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),bZ=(t,e,n,r,i,s,a,o)=>{const l=o.bits;let c=0,u=0,d=0,f=0,h=0,y=0,v=0,_=0,w=0,x=0,k,N,R,H,F,M=null,I;const G=new Uint16Array(cu+1),L=new Uint16Array(cu+1);let j=null,W,z,re;for(c=0;c<=cu;c++)G[c]=0;for(u=0;u<r;u++)G[e[n+u]]++;for(h=l,f=cu;f>=1&&G[f]===0;f--);if(h>f&&(h=f),f===0)return i[s++]=1<<24|64<<16|0,i[s++]=1<<24|64<<16|0,o.bits=1,0;for(d=1;d<f&&G[d]===0;d++);for(h<d&&(h=d),_=1,c=1;c<=cu;c++)if(_<<=1,_-=G[c],_<0)return-1;if(_>0&&(t===KE||f!==1))return-1;for(L[1]=0,c=1;c<cu;c++)L[c+1]=L[c]+G[c];for(u=0;u<r;u++)e[n+u]!==0&&(a[L[e[n+u]]++]=u);if(t===KE?(M=j=a,I=20):t===Jy?(M=gZ,j=vZ,I=257):(M=yZ,j=wZ,I=0),x=0,u=0,c=d,F=s,y=h,v=0,R=-1,w=1<<h,H=w-1,t===Jy&&w>VE||t===ZE&&w>GE)return 1;for(;;){W=c-v,a[u]+1<I?(z=0,re=a[u]):a[u]>=I?(z=j[a[u]-I],re=M[a[u]-I]):(z=96,re=0),k=1<<c-v,N=1<<y,d=N;do N-=k,i[F+(x>>v)+N]=W<<24|z<<16|re|0;while(N!==0);for(k=1<<c-1;x&k;)k>>=1;if(k!==0?(x&=k-1,x+=k):x=0,u++,--G[c]===0){if(c===f)break;c=e[n+a[u]]}if(c>h&&(x&H)!==R){for(v===0&&(v=h),F+=d,y=c-v,_=1<<y;y+v<f&&(_-=G[y+v],!(_<=0));)y++,_<<=1;if(w+=1<<y,t===Jy&&w>VE||t===ZE&&w>GE)return 1;R=x&H,i[R]=h<<24|y<<16|F-s|0}}return x!==0&&(i[F+x]=c-v<<24|64<<16|0),o.bits=h,0};var hf=bZ;const xZ=0,DR=1,MR=2,{Z_FINISH:YE,Z_BLOCK:_Z,Z_TREES:dg,Z_OK:Ec,Z_STREAM_END:SZ,Z_NEED_DICT:kZ,Z_STREAM_ERROR:rs,Z_DATA_ERROR:FR,Z_MEM_ERROR:zR,Z_BUF_ERROR:EZ,Z_DEFLATED:JE}=Ip,r1=16180,XE=16181,QE=16182,eN=16183,tN=16184,nN=16185,rN=16186,iN=16187,sN=16188,aN=16189,G0=16190,$a=16191,Xy=16192,oN=16193,Qy=16194,lN=16195,cN=16196,uN=16197,dN=16198,hg=16199,fg=16200,hN=16201,fN=16202,pN=16203,mN=16204,gN=16205,e2=16206,vN=16207,yN=16208,bn=16209,$R=16210,UR=16211,NZ=852,AZ=592,CZ=15,PZ=CZ,wN=t=>(t>>>24&255)+(t>>>8&65280)+((t&65280)<<8)+((t&255)<<24);function TZ(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Mc=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<r1||e.mode>UR?1:0},BR=t=>{if(Mc(t))return rs;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=e.wrap&1),e.mode=r1,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(NZ),e.distcode=e.distdyn=new Int32Array(AZ),e.sane=1,e.back=-1,Ec},qR=t=>{if(Mc(t))return rs;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,BR(t)},HR=(t,e)=>{let n;if(Mc(t))return rs;const r=t.state;return e<0?(n=0,e=-e):(n=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?rs:(r.window!==null&&r.wbits!==e&&(r.window=null),r.wrap=n,r.wbits=e,qR(t))},WR=(t,e)=>{if(!t)return rs;const n=new TZ;t.state=n,n.strm=t,n.window=null,n.mode=r1;const r=HR(t,e);return r!==Ec&&(t.state=null),r},RZ=t=>WR(t,PZ);let bN=!0,t2,n2;const LZ=t=>{if(bN){t2=new Int32Array(512),n2=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(hf(DR,t.lens,0,288,t2,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;hf(MR,t.lens,0,32,n2,0,t.work,{bits:5}),bN=!1}t.lencode=t2,t.lenbits=9,t.distcode=n2,t.distbits=5},VR=(t,e,n,r)=>{let i;const s=t.state;return s.window===null&&(s.window=new Uint8Array(1<<s.wbits)),s.wsize===0&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0),r>=s.wsize?(s.window.set(e.subarray(n-s.wsize,n),0),s.wnext=0,s.whave=s.wsize):(i=s.wsize-s.wnext,i>r&&(i=r),s.window.set(e.subarray(n-r,n-r+i),s.wnext),r-=i,r?(s.window.set(e.subarray(n-r,n),0),s.wnext=r,s.whave=s.wsize):(s.wnext+=i,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=i))),0},jZ=(t,e)=>{let n,r,i,s,a,o,l,c,u,d,f,h,y,v,_=0,w,x,k,N,R,H,F,M;const I=new Uint8Array(4);let G,L;const j=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Mc(t)||!t.output||!t.input&&t.avail_in!==0)return rs;n=t.state,n.mode===$a&&(n.mode=Xy),a=t.next_out,i=t.output,l=t.avail_out,s=t.next_in,r=t.input,o=t.avail_in,c=n.hold,u=n.bits,d=o,f=l,M=Ec;e:for(;;)switch(n.mode){case r1:if(n.wrap===0){n.mode=Xy;break}for(;u<16;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}if(n.wrap&2&&c===35615){n.wbits===0&&(n.wbits=15),n.check=0,I[0]=c&255,I[1]=c>>>8&255,n.check=ur(n.check,I,2,0),c=0,u=0,n.mode=XE;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((c&255)<<8)+(c>>8))%31){t.msg="incorrect header check",n.mode=bn;break}if((c&15)!==JE){t.msg="unknown compression method",n.mode=bn;break}if(c>>>=4,u-=4,F=(c&15)+8,n.wbits===0&&(n.wbits=F),F>15||F>n.wbits){t.msg="invalid window size",n.mode=bn;break}n.dmax=1<<n.wbits,n.flags=0,t.adler=n.check=1,n.mode=c&512?aN:$a,c=0,u=0;break;case XE:for(;u<16;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}if(n.flags=c,(n.flags&255)!==JE){t.msg="unknown compression method",n.mode=bn;break}if(n.flags&57344){t.msg="unknown header flags set",n.mode=bn;break}n.head&&(n.head.text=c>>8&1),n.flags&512&&n.wrap&4&&(I[0]=c&255,I[1]=c>>>8&255,n.check=ur(n.check,I,2,0)),c=0,u=0,n.mode=QE;case QE:for(;u<32;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}n.head&&(n.head.time=c),n.flags&512&&n.wrap&4&&(I[0]=c&255,I[1]=c>>>8&255,I[2]=c>>>16&255,I[3]=c>>>24&255,n.check=ur(n.check,I,4,0)),c=0,u=0,n.mode=eN;case eN:for(;u<16;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}n.head&&(n.head.xflags=c&255,n.head.os=c>>8),n.flags&512&&n.wrap&4&&(I[0]=c&255,I[1]=c>>>8&255,n.check=ur(n.check,I,2,0)),c=0,u=0,n.mode=tN;case tN:if(n.flags&1024){for(;u<16;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),n.flags&512&&n.wrap&4&&(I[0]=c&255,I[1]=c>>>8&255,n.check=ur(n.check,I,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=nN;case nN:if(n.flags&1024&&(h=n.length,h>o&&(h=o),h&&(n.head&&(F=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(s,s+h),F)),n.flags&512&&n.wrap&4&&(n.check=ur(n.check,r,h,s)),o-=h,s+=h,n.length-=h),n.length))break e;n.length=0,n.mode=rN;case rN:if(n.flags&2048){if(o===0)break e;h=0;do F=r[s+h++],n.head&&F&&n.length<65536&&(n.head.name+=String.fromCharCode(F));while(F&&h<o);if(n.flags&512&&n.wrap&4&&(n.check=ur(n.check,r,h,s)),o-=h,s+=h,F)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=iN;case iN:if(n.flags&4096){if(o===0)break e;h=0;do F=r[s+h++],n.head&&F&&n.length<65536&&(n.head.comment+=String.fromCharCode(F));while(F&&h<o);if(n.flags&512&&n.wrap&4&&(n.check=ur(n.check,r,h,s)),o-=h,s+=h,F)break e}else n.head&&(n.head.comment=null);n.mode=sN;case sN:if(n.flags&512){for(;u<16;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}if(n.wrap&4&&c!==(n.check&65535)){t.msg="header crc mismatch",n.mode=bn;break}c=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),t.adler=n.check=0,n.mode=$a;break;case aN:for(;u<32;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}t.adler=n.check=wN(c),c=0,u=0,n.mode=G0;case G0:if(n.havedict===0)return t.next_out=a,t.avail_out=l,t.next_in=s,t.avail_in=o,n.hold=c,n.bits=u,kZ;t.adler=n.check=1,n.mode=$a;case $a:if(e===_Z||e===dg)break e;case Xy:if(n.last){c>>>=u&7,u-=u&7,n.mode=e2;break}for(;u<3;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}switch(n.last=c&1,c>>>=1,u-=1,c&3){case 0:n.mode=oN;break;case 1:if(LZ(n),n.mode=hg,e===dg){c>>>=2,u-=2;break e}break;case 2:n.mode=cN;break;case 3:t.msg="invalid block type",n.mode=bn}c>>>=2,u-=2;break;case oN:for(c>>>=u&7,u-=u&7;u<32;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}if((c&65535)!==(c>>>16^65535)){t.msg="invalid stored block lengths",n.mode=bn;break}if(n.length=c&65535,c=0,u=0,n.mode=Qy,e===dg)break e;case Qy:n.mode=lN;case lN:if(h=n.length,h){if(h>o&&(h=o),h>l&&(h=l),h===0)break e;i.set(r.subarray(s,s+h),a),o-=h,s+=h,l-=h,a+=h,n.length-=h;break}n.mode=$a;break;case cN:for(;u<14;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}if(n.nlen=(c&31)+257,c>>>=5,u-=5,n.ndist=(c&31)+1,c>>>=5,u-=5,n.ncode=(c&15)+4,c>>>=4,u-=4,n.nlen>286||n.ndist>30){t.msg="too many length or distance symbols",n.mode=bn;break}n.have=0,n.mode=uN;case uN:for(;n.have<n.ncode;){for(;u<3;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}n.lens[j[n.have++]]=c&7,c>>>=3,u-=3}for(;n.have<19;)n.lens[j[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,G={bits:n.lenbits},M=hf(xZ,n.lens,0,19,n.lencode,0,n.work,G),n.lenbits=G.bits,M){t.msg="invalid code lengths set",n.mode=bn;break}n.have=0,n.mode=dN;case dN:for(;n.have<n.nlen+n.ndist;){for(;_=n.lencode[c&(1<<n.lenbits)-1],w=_>>>24,x=_>>>16&255,k=_&65535,!(w<=u);){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}if(k<16)c>>>=w,u-=w,n.lens[n.have++]=k;else{if(k===16){for(L=w+2;u<L;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}if(c>>>=w,u-=w,n.have===0){t.msg="invalid bit length repeat",n.mode=bn;break}F=n.lens[n.have-1],h=3+(c&3),c>>>=2,u-=2}else if(k===17){for(L=w+3;u<L;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}c>>>=w,u-=w,F=0,h=3+(c&7),c>>>=3,u-=3}else{for(L=w+7;u<L;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}c>>>=w,u-=w,F=0,h=11+(c&127),c>>>=7,u-=7}if(n.have+h>n.nlen+n.ndist){t.msg="invalid bit length repeat",n.mode=bn;break}for(;h--;)n.lens[n.have++]=F}}if(n.mode===bn)break;if(n.lens[256]===0){t.msg="invalid code -- missing end-of-block",n.mode=bn;break}if(n.lenbits=9,G={bits:n.lenbits},M=hf(DR,n.lens,0,n.nlen,n.lencode,0,n.work,G),n.lenbits=G.bits,M){t.msg="invalid literal/lengths set",n.mode=bn;break}if(n.distbits=6,n.distcode=n.distdyn,G={bits:n.distbits},M=hf(MR,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,G),n.distbits=G.bits,M){t.msg="invalid distances set",n.mode=bn;break}if(n.mode=hg,e===dg)break e;case hg:n.mode=fg;case fg:if(o>=6&&l>=258){t.next_out=a,t.avail_out=l,t.next_in=s,t.avail_in=o,n.hold=c,n.bits=u,mZ(t,f),a=t.next_out,i=t.output,l=t.avail_out,s=t.next_in,r=t.input,o=t.avail_in,c=n.hold,u=n.bits,n.mode===$a&&(n.back=-1);break}for(n.back=0;_=n.lencode[c&(1<<n.lenbits)-1],w=_>>>24,x=_>>>16&255,k=_&65535,!(w<=u);){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}if(x&&!(x&240)){for(N=w,R=x,H=k;_=n.lencode[H+((c&(1<<N+R)-1)>>N)],w=_>>>24,x=_>>>16&255,k=_&65535,!(N+w<=u);){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}c>>>=N,u-=N,n.back+=N}if(c>>>=w,u-=w,n.back+=w,n.length=k,x===0){n.mode=gN;break}if(x&32){n.back=-1,n.mode=$a;break}if(x&64){t.msg="invalid literal/length code",n.mode=bn;break}n.extra=x&15,n.mode=hN;case hN:if(n.extra){for(L=n.extra;u<L;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=fN;case fN:for(;_=n.distcode[c&(1<<n.distbits)-1],w=_>>>24,x=_>>>16&255,k=_&65535,!(w<=u);){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}if(!(x&240)){for(N=w,R=x,H=k;_=n.distcode[H+((c&(1<<N+R)-1)>>N)],w=_>>>24,x=_>>>16&255,k=_&65535,!(N+w<=u);){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}c>>>=N,u-=N,n.back+=N}if(c>>>=w,u-=w,n.back+=w,x&64){t.msg="invalid distance code",n.mode=bn;break}n.offset=k,n.extra=x&15,n.mode=pN;case pN:if(n.extra){for(L=n.extra;u<L;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){t.msg="invalid distance too far back",n.mode=bn;break}n.mode=mN;case mN:if(l===0)break e;if(h=f-l,n.offset>h){if(h=n.offset-h,h>n.whave&&n.sane){t.msg="invalid distance too far back",n.mode=bn;break}h>n.wnext?(h-=n.wnext,y=n.wsize-h):y=n.wnext-h,h>n.length&&(h=n.length),v=n.window}else v=i,y=a-n.offset,h=n.length;h>l&&(h=l),l-=h,n.length-=h;do i[a++]=v[y++];while(--h);n.length===0&&(n.mode=fg);break;case gN:if(l===0)break e;i[a++]=n.length,l--,n.mode=fg;break;case e2:if(n.wrap){for(;u<32;){if(o===0)break e;o--,c|=r[s++]<<u,u+=8}if(f-=l,t.total_out+=f,n.total+=f,n.wrap&4&&f&&(t.adler=n.check=n.flags?ur(n.check,i,f,a-f):rp(n.check,i,f,a-f)),f=l,n.wrap&4&&(n.flags?c:wN(c))!==n.check){t.msg="incorrect data check",n.mode=bn;break}c=0,u=0}n.mode=vN;case vN:if(n.wrap&&n.flags){for(;u<32;){if(o===0)break e;o--,c+=r[s++]<<u,u+=8}if(n.wrap&4&&c!==(n.total&4294967295)){t.msg="incorrect length check",n.mode=bn;break}c=0,u=0}n.mode=yN;case yN:M=SZ;break e;case bn:M=FR;break e;case $R:return zR;case UR:default:return rs}return t.next_out=a,t.avail_out=l,t.next_in=s,t.avail_in=o,n.hold=c,n.bits=u,(n.wsize||f!==t.avail_out&&n.mode<bn&&(n.mode<e2||e!==YE))&&VR(t,t.output,t.next_out,f-t.avail_out),d-=t.avail_in,f-=t.avail_out,t.total_in+=d,t.total_out+=f,n.total+=f,
vendor: 12,512 bytes, line 392
392n.wrap&4&&f&&(t.adler=n.check=n.flags?ur(n.check,i,f,t.next_out-f):rp(n.check,i,f,t.next_out-f)),t.data_type=n.bits+(n.last?64:0)+(n.mode===$a?128:0)+(n.mode===hg||n.mode===Qy?256:0),(d===0&&f===0||e===YE)&&M===Ec&&(M=EZ),M},OZ=t=>{if(Mc(t))return rs;let e=t.state;return e.window&&(e.window=null),t.state=null,Ec},IZ=(t,e)=>{if(Mc(t))return rs;const n=t.state;return n.wrap&2?(n.head=e,e.done=!1,Ec):rs},DZ=(t,e)=>{const n=e.length;let r,i,s;return Mc(t)||(r=t.state,r.wrap!==0&&r.mode!==G0)?rs:r.mode===G0&&(i=1,i=rp(i,e,n,0),i!==r.check)?FR:(s=VR(t,e,n,n),s?(r.mode=$R,zR):(r.havedict=1,Ec))};var MZ=qR,FZ=HR,zZ=BR,$Z=RZ,UZ=WR,BZ=jZ,qZ=OZ,HZ=IZ,WZ=DZ,VZ="pako inflate (from Nodeca project)",Zs={inflateReset:MZ,inflateReset2:FZ,inflateResetKeep:zZ,inflateInit:$Z,inflateInit2:UZ,inflate:BZ,inflateEnd:qZ,inflateGetHeader:HZ,inflateSetDictionary:WZ,inflateInfo:VZ};function GZ(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var KZ=GZ;const GR=Object.prototype.toString,{Z_NO_FLUSH:ZZ,Z_FINISH:xN,Z_OK:Ku,Z_STREAM_END:r2,Z_NEED_DICT:i2,Z_STREAM_ERROR:YZ,Z_DATA_ERROR:_N,Z_MEM_ERROR:JZ,Z_BUF_ERROR:SN}=Ip,XZ={chunkSize:1024*64,windowBits:15,to:""};function Mp(t){this.options=n1.assign({},XZ,t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(t&&t.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new OR,this.strm.avail_out=0;let n=Zs.inflateInit2(this.strm,e.windowBits);if(n!==Ku)throw new Error(xd[n]);if(this.header=new KZ,Zs.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=sp.string2buf(e.dictionary):GR.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(n=Zs.inflateSetDictionary(this.strm,e.dictionary),n!==Ku)))throw new Error(xd[n])}Mp.prototype.push=function(t,e){const n=this.strm,r=this.options.chunkSize,i=this.options.dictionary;let s,a,o;if(this.ended)return!1;for(e===~~e?a=e:a=e===!0?xN:ZZ,GR.call(t)==="[object ArrayBuffer]"?n.input=new Uint8Array(t):n.input=t,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),s=Zs.inflate(n,a),s===i2&&i&&(s=Zs.inflateSetDictionary(n,i),s===Ku?s=Zs.inflate(n,a):s===_N&&(s=i2));n.avail_in>0&&s===r2&&n.state.wrap&2&&n.state.flags!==0&&n.input[n.next_in]!==0;)Zs.inflateReset(n),s=Zs.inflate(n,a);switch(s){case YZ:case _N:case i2:case JZ:return this.onEnd(s),this.ended=!0,!1}if(o=n.avail_out,n.next_out&&(n.avail_out===0||s===r2||a>0))if(this.options.to==="string"){let l=sp.utf8border(n.output,n.next_out),c=n.next_out-l,u=sp.buf2string(n.output,l);n.next_out=c,n.avail_out=r-c,c&&n.output.set(n.output.subarray(l,l+c),0),this.onData(u)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out)),n.avail_out=0,n.next_out=0;if(!((s===Ku||s===SN)&&o===0)){if(s===r2)return s=Zs.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(n.avail_in===0){if(a===xN)return s=Zs.inflateEnd(this.strm),this.onEnd(s===Ku?SN:s),this.ended=!0,!1;break}}}return!0};Mp.prototype.onData=function(t){this.chunks.push(t)};Mp.prototype.onEnd=function(t){t===Ku&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=n1.flattenChunks(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};function b5(t,e){const n=new Mp(e);if(n.push(t,!0),n.err)throw n.msg||xd[n.err];return n.result}function QZ(t,e){return e=e||{},e.raw=!0,b5(t,e)}var eY=Mp,tY=b5,nY=QZ,rY=b5,iY=Ip,sY={Inflate:eY,inflate:tY,inflateRaw:nY,ungzip:rY,constants:iY};const{Inflate:aY,inflate:oY,inflateRaw:kne,ungzip:Ene}=sY;var kN=aY,lY=oY;const KR=[];for(let t=0;t<256;t++){let e=t;for(let n=0;n<8;n++)e&1?e=3988292384^e>>>1:e=e>>>1;KR[t]=e}const EN=4294967295;function cY(t,e,n){let r=t;for(let i=0;i<n;i++)r=KR[(r^e[i])&255]^r>>>8;return r}function uY(t,e){return(cY(EN,t,e)^EN)>>>0}function NN(t,e,n){const r=t.readUint32(),i=uY(new Uint8Array(t.buffer,t.byteOffset+t.offset-e-4,e),e);if(i!==r)throw new Error(`CRC mismatch for chunk ${n}. Expected ${r}, found ${i}`)}function ZR(t,e,n){for(let r=0;r<n;r++)e[r]=t[r]}function YR(t,e,n,r){let i=0;for(;i<r;i++)e[i]=t[i];for(;i<n;i++)e[i]=t[i]+e[i-r]&255}function JR(t,e,n,r){let i=0;if(n.length===0)for(;i<r;i++)e[i]=t[i];else for(;i<r;i++)e[i]=t[i]+n[i]&255}function XR(t,e,n,r,i){let s=0;if(n.length===0){for(;s<i;s++)e[s]=t[s];for(;s<r;s++)e[s]=t[s]+(e[s-i]>>1)&255}else{for(;s<i;s++)e[s]=t[s]+(n[s]>>1)&255;for(;s<r;s++)e[s]=t[s]+(e[s-i]+n[s]>>1)&255}}function QR(t,e,n,r,i){let s=0;if(n.length===0){for(;s<i;s++)e[s]=t[s];for(;s<r;s++)e[s]=t[s]+e[s-i]&255}else{for(;s<i;s++)e[s]=t[s]+n[s]&255;for(;s<r;s++)e[s]=t[s]+dY(e[s-i],n[s],n[s-i])&255}}function dY(t,e,n){const r=t+e-n,i=Math.abs(r-t),s=Math.abs(r-e),a=Math.abs(r-n);return i<=s&&i<=a?t:s<=a?e:n}function hY(t,e,n,r,i,s){switch(t){case 0:ZR(e,n,i);break;case 1:YR(e,n,i,s);break;case 2:JR(e,n,r,i);break;case 3:XR(e,n,r,i,s);break;case 4:QR(e,n,r,i,s);break;default:throw new Error(`Unsupported filter: ${t}`)}}const fY=new Uint16Array([255]),pY=new Uint8Array(fY.buffer),mY=pY[0]===255;function gY(t){const{data:e,width:n,height:r,channels:i,depth:s}=t,a=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],o=Math.ceil(s/8)*i,l=new Uint8Array(r*n*o);let c=0;for(let u=0;u<7;u++){const d=a[u],f=Math.ceil((n-d.x)/d.xStep),h=Math.ceil((r-d.y)/d.yStep);if(f<=0||h<=0)continue;const y=f*o,v=new Uint8Array(y);for(let _=0;_<h;_++){const w=e[c++],x=e.subarray(c,c+y);c+=y;const k=new Uint8Array(y);hY(w,x,k,v,y,o),v.set(k);for(let N=0;N<f;N++){const R=d.x+N*d.xStep,H=d.y+_*d.yStep;if(!(R>=n||H>=r))for(let F=0;F<o;F++)l[(H*n+R)*o+F]=k[N*o+F]}}}if(s===16){const u=new Uint16Array(l.buffer);if(mY)for(let d=0;d<u.length;d++)u[d]=vY(u[d]);return u}else return l}function vY(t){return(t&255)<<8|t>>8&255}const yY=new Uint16Array([255]),wY=new Uint8Array(yY.buffer),bY=wY[0]===255,xY=new Uint8Array(0);function AN(t){const{data:e,width:n,height:r,channels:i,depth:s}=t,a=Math.ceil(s/8)*i,o=Math.ceil(s/8*i*n),l=new Uint8Array(r*o);let c=xY,u=0,d,f;for(let h=0;h<r;h++){switch(d=e.subarray(u+1,u+1+o),f=l.subarray(h*o,(h+1)*o),e[u]){case 0:ZR(d,f,o);break;case 1:YR(d,f,o,a);break;case 2:JR(d,f,c,o);break;case 3:XR(d,f,c,o,a);break;case 4:QR(d,f,c,o,a);break;default:throw new Error(`Unsupported filter: ${e[u]}`)}c=f,u+=o+1}if(s===16){const h=new Uint16Array(l.buffer);if(bY)for(let y=0;y<h.length;y++)h[y]=_Y(h[y]);return h}else return l}function _Y(t){return(t&255)<<8|t>>8&255}const Ug=Uint8Array.of(137,80,78,71,13,10,26,10);function CN(t){if(!SY(t.readBytes(Ug.length)))throw new Error("wrong PNG signature")}function SY(t){if(t.length<Ug.length)return!1;for(let e=0;e<Ug.length;e++)if(t[e]!==Ug[e])return!1;return!0}const kY="tEXt",EY=0,eL=new TextDecoder("latin1");function NY(t){if(CY(t),t.length===0||t.length>79)throw new Error("keyword length must be between 1 and 79")}const AY=/^[\u0000-\u00FF]*$/;function CY(t){if(!AY.test(t))throw new Error("invalid latin1 text")}function PY(t,e,n){const r=tL(e);t[r]=TY(e,n-r.length-1)}function tL(t){for(t.mark();t.readByte()!==EY;);const e=t.offset;t.reset();const n=eL.decode(t.readBytes(e-t.offset-1));return t.skip(1),NY(n),n}function TY(t,e){return eL.decode(t.readBytes(e))}const xi={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},s2={UNKNOWN:-1,DEFLATE:0},PN={UNKNOWN:-1,ADAPTIVE:0},a2={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},pg={NONE:0,BACKGROUND:1,PREVIOUS:2},o2={SOURCE:0,OVER:1};class RY extends h5{constructor(n,r={}){super(n);nn(this,"_checkCrc");nn(this,"_inflator");nn(this,"_png");nn(this,"_apng");nn(this,"_end");nn(this,"_hasPalette");nn(this,"_palette");nn(this,"_hasTransparency");nn(this,"_transparency");nn(this,"_compressionMethod");nn(this,"_filterMethod");nn(this,"_interlaceMethod");nn(this,"_colorType");nn(this,"_isAnimated");nn(this,"_numberOfFrames");nn(this,"_numberOfPlays");nn(this,"_frames");nn(this,"_writingDataChunks");const{checkCrc:i=!1}=r;this._checkCrc=i,this._inflator=new kN,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=s2.UNKNOWN,this._filterMethod=PN.UNKNOWN,this._interlaceMethod=a2.UNKNOWN,this._colorType=xi.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(CN(this);!this._end;){const n=this.readUint32(),r=this.readChars(4);this.decodeChunk(n,r)}return this.decodeImage(),this._png}decodeApng(){for(CN(this);!this._end;){const n=this.readUint32(),r=this.readChars(4);this.decodeApngChunk(n,r)}return this.decodeApngImage(),this._apng}decodeChunk(n,r){const i=this.offset;switch(r){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(n);break;case"IDAT":this.decodeIDAT(n);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(n);break;case"iCCP":this.decodeiCCP(n);break;case kY:PY(this._png.text,this,n);break;case"pHYs":this.decodepHYs();break;default:this.skip(n);break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?NN(this,n+4,r):this.skip(4)}decodeApngChunk(n,r){const i=this.offset;switch(r!=="fdAT"&&r!=="IDAT"&&this._writingDataChunks&&this.pushDataToFrame(),r){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(n);break;default:this.decodeChunk(n,r),this.offset=i+n;break}if(this.offset-i!==n)throw new Error(`Length mismatch while decoding chunk ${r}`);this._checkCrc?NN(this,n+4,r):this.skip(4)}decodeIHDR(){const n=this._png;n.width=this.readUint32(),n.height=this.readUint32(),n.depth=LY(this.readUint8());const r=this.readUint8();this._colorType=r;let i;switch(r){case xi.GREYSCALE:i=1;break;case xi.TRUECOLOUR:i=3;break;case xi.INDEXED_COLOUR:i=1;break;case xi.GREYSCALE_ALPHA:i=2;break;case xi.TRUECOLOUR_ALPHA:i=4;break;case xi.UNKNOWN:default:throw new Error(`Unknown color type: ${r}`)}if(this._png.channels=i,this._compressionMethod=this.readUint8(),this._compressionMethod!==s2.DEFLATE)throw new Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const n={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(n)}decodePLTE(n){if(n%3!==0)throw new RangeError(`PLTE field length must be a multiple of 3. Got ${n}`);const r=n/3;this._hasPalette=!0;const i=[];this._palette=i;for(let s=0;s<r;s++)i.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(n){this._writingDataChunks=!0;const r=n,i=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodeFDAT(n){this._writingDataChunks=!0;let r=n,i=this.offset+this.byteOffset;if(i+=4,r-=4,this._inflator.push(new Uint8Array(this.buffer,i,r)),this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(n)}decodetRNS(n){switch(this._colorType){case xi.GREYSCALE:case xi.TRUECOLOUR:{if(n%2!==0)throw new RangeError(`tRNS chunk length must be a multiple of 2. Got ${n}`);if(n/2>this._png.width*this._png.height)throw new Error(`tRNS chunk contains more alpha values than there are pixels (${n/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(n/2);for(let r=0;r<n/2;r++)this._transparency[r]=this.readUint16();break}case xi.INDEXED_COLOUR:{if(n>this._palette.length)throw new Error(`tRNS chunk contains more alph
392a values than there are palette colors (${n} vs ${this._palette.length})`);let r=0;for(;r<n;r++){const i=this.readByte();this._palette[r].push(i)}for(;r<this._palette.length;r++)this._palette[r].push(255);break}case xi.UNKNOWN:case xi.GREYSCALE_ALPHA:case xi.TRUECOLOUR_ALPHA:default:throw new Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(n){const r=tL(this),i=this.readUint8();if(i!==s2.DEFLATE)throw new Error(`Unsupported iCCP compression method: ${i}`);const s=this.readBytes(n-r.length-2);this._png.iccEmbeddedProfile={name:r,profile:lY(s)}}decodepHYs(){const n=this.readUint32(),r=this.readUint32(),i=this.readByte();this._png.resolution={x:n,y:r,unit:i}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let n=0;n<this._numberOfFrames;n++){const r={sequenceNumber:this._frames[n].sequenceNumber,delayNumber:this._frames[n].delayNumber,delayDenominator:this._frames[n].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},i=this._frames.at(n);if(i){if(i.data=AN({data:i.data,width:i.width,height:i.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),n===0||i.xOffset===0&&i.yOffset===0&&i.width===this._png.width&&i.height===this._png.height)r.data=i.data;else{const s=this._apng.frames.at(n-1);this.disposeFrame(i,s,r),this.addFrameDataToCanvas(r,i)}this._apng.frames.push(r)}}return this._apng}disposeFrame(n,r,i){switch(n.disposeOp){case pg.NONE:break;case pg.BACKGROUND:for(let s=0;s<this._png.height;s++)for(let a=0;a<this._png.width;a++){const o=(s*n.width+a)*this._png.channels;for(let l=0;l<this._png.channels;l++)i.data[o+l]=0}break;case pg.PREVIOUS:i.data.set(r.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(n,r){const i=1<<this._png.depth,s=(a,o)=>{const l=((a+r.yOffset)*this._png.width+r.xOffset+o)*this._png.channels,c=(a*r.width+o)*this._png.channels;return{index:l,frameIndex:c}};switch(r.blendOp){case o2.SOURCE:for(let a=0;a<r.height;a++)for(let o=0;o<r.width;o++){const{index:l,frameIndex:c}=s(a,o);for(let u=0;u<this._png.channels;u++)n.data[l+u]=r.data[c+u]}break;case o2.OVER:for(let a=0;a<r.height;a++)for(let o=0;o<r.width;o++){const{index:l,frameIndex:c}=s(a,o);for(let u=0;u<this._png.channels;u++){const d=r.data[c+this._png.channels-1]/i,f=u%(this._png.channels-1)===0?1:r.data[c+u],h=Math.floor(d*f+(1-d)*n.data[l+u]);n.data[l+u]+=h}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var r;if(this._inflator.err)throw new Error(`Error while decompressing the data: ${this._inflator.err}`);const n=this._isAnimated?((r=this._frames)==null?void 0:r.at(0)).data:this._inflator.result;if(this._filterMethod!==PN.ADAPTIVE)throw new Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===a2.NO_INTERLACE)this._png.data=AN({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===a2.ADAM7)this._png.data=gY({data:n,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw new Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const n=this._inflator.result,r=this._frames.at(-1);r?r.data=n:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:pg.NONE,blendOp:o2.SOURCE,data:n}),this._inflator=new kN,this._writingDataChunks=!1}}function LY(t){if(t!==1&&t!==2&&t!==4&&t!==8&&t!==16)throw new Error(`invalid bit depth: ${t}`);return t}var TN;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.METRE=1]="METRE"})(TN||(TN={}));function jY(t,e){return new RY(t,e).decode()}var pt=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function l2(){pt.console&&typeof pt.console.log=="function"&&pt.console.log.apply(pt.console,arguments)}var cn={log:l2,warn:function(t){pt.console&&(typeof pt.console.warn=="function"?pt.console.warn.apply(
vendor: 3,989 bytes, lines 392-397
392pt.console,arguments):l2.call(null,arguments))},error:function(t){pt.console&&(typeof pt.console.error=="function"?pt.console.error.apply(pt.console,arguments):l2(t))}};function c2(t,e,n){var r=new XMLHttpRequest;r.open("GET",t),r.responseType="blob",r.onload=function(){Yl(r.response,e,n)},r.onerror=function(){cn.error("could not download file")},r.send()}function RN(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch{}return e.status>=200&&e.status<=299}function mg(t){try{t.dispatchEvent(new MouseEvent("click"))}catch{var e=document.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(e)}}var Yl=pt.saveAs||((typeof window>"u"?"undefined":rn(window))!=="object"||window!==pt?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(t,e,n){var r=pt.URL||pt.webkitURL,i=document.createElement("a");e=e||t.name||"download",i.download=e,i.rel="noopener",typeof t=="string"?(i.href=t,i.origin!==location.origin?RN(i.href)?c2(t,e,n):mg(i,i.target="_blank"):mg(i)):(i.href=r.createObjectURL(t),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){mg(i)},0))}:"msSaveOrOpenBlob"in navigator?function(t,e,n){if(e=e||t.name||"download",typeof t=="string")if(RN(t))c2(t,e,n);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout(function(){mg(r)})}else navigator.msSaveOrOpenBlob(function(i,s){return s===void 0?s={autoBom:!1}:rn(s)!=="object"&&(cn.warn("Deprecated: Expected third argument to be a object"),s={autoBom:!s}),s.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}(t,n),e)}:function(t,e,n,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),typeof t=="string")return c2(t,e,n);var i=t.type==="application/octet-stream",s=/constructor/i.test(pt.HTMLElement)||pt.safari,a=/CriOS\/[\d]+/.test(navigator.userAgent);if((a||i&&s)&&(typeof FileReader>"u"?"undefined":rn(FileReader))==="object"){var o=new FileReader;o.onloadend=function(){var u=o.result;u=a?u:u.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=u:location=u,r=null},o.readAsDataURL(t)}else{var l=pt.URL||pt.webkitURL,c=l.createObjectURL(t);r?r.location=c:location.href=c,r=null,setTimeout(function(){l.revokeObjectURL(c)},4e4)}});/** 393 * A class to parse color values 394 * @author Stoyan Stefanov <[email protected]> 395 * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} 396 * @license Use it if you like it 397 */function nL(t){var e;t=t||"",this.ok=!1,t.charAt(0)=="#"&&(t=t.substr(1,6)),t={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee9
3970",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[t=(t=t.replace(/ /g,"")).toLowerCase()]||t;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(o){return[parseInt(o[1]),parseInt(o[2]),parseInt(o[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(o){return[parseInt(o[1],16),parseInt(o[2],16),parseInt(o[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(o){return[parseInt(o[1]+o[1],16),parseInt(o[2]+o[2],16),parseInt(o[3]+o[3],16)]}}],r=0;r<n.length;r++){var i=n[r].re,s=n[r].process,a=i.exec(t);a&&(e=s(a),this.r=e[0],this.g=e[1],this.b=e[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var o=this.r.toString(16),l=this.g.toString(16),c=this.b.toString(16);return o.length==1&&(o="0"+o),l.length==1&&(l="0"+l),c.length==1&&(c="0"+c),"#"+o+l+c}}var Bg=pt.atob.bind(pt),LN=pt.btoa.bind(pt);/** 398 * @license 399 * Joseph Myers does not specify a particular license for his work. 400 * 401 * Author: Joseph Myers 402 * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js 403 * 404 * Modified by: Owen Leong 405 */function u2(t,e){var n=t[0],r=t[1],i=t[2],s=t[3];n=Rr(n,r,i,s,e[0],7,-680876936),s=Rr(s,n,r,i,e[1],12,-389564586),i=Rr(i,s,n,r,e[2],17,606105819),r=Rr(r,i,s,n,e[3],22,-1044525330),n=Rr(n,r,i,s,e[4],7,-176418897),s=Rr(s,n,r,i,e[5],12,1200080426),i=Rr(i,s,n,r,e[6],17,-1473231341),r=Rr(r,i,s,n,e[7],22,-45705983),n=Rr(n,r,i,s,e[8],7,1770035416),s=Rr(s,n,r,i,e[9],12,-1958414417),i=Rr(i,s,n,r,e[10],17,-42063),r=Rr(r,i,s,n,e[11],22,-1990404162),n=Rr(n,r,i,s,e[12],7,1804603682),s=Rr(s,n,r,i,e[13],12,-40341101),i=Rr(i,s,n,r,e[14],17,-1502002290),n=Lr(n,r=Rr(r,i,s,n,e[15],22,1236535329),i,s,e[1],5,-165796510),s=Lr(s,n,r,i,e[6],9,-1069501632),i=Lr(i,s,n,r,e[11],14,643717713),r=Lr(r,i,s,n,e[0],20,-373897302),n=Lr(n,r,i,s,e[5],5,-701558691),s=Lr(s,n,r,i,e[10],9,38016083),i=Lr(i,s,n,r,e[15],14,-660478335),r=Lr(r,i,s,n,e[4],20,-405537848),n=Lr(n,r,i,s,e[9],5,568446438),s=Lr(s,n,r,i,e[14],9,-1019803690),i=Lr(i,s,n,r,e[3],14,-187363961),r=Lr(r,i,s,n,e[8],20,1163531501),n=Lr(n,r,i,s,e[13],5,-1444681467),s=Lr(s,n,r,i,e[2],9,-51403784),i=Lr(i,s,n,r,e[7],14,1735328473),n=jr(n,r=Lr(r,i,s,n,e[12],20,-1926607734),i,s,e[5],4,-378558),s=jr(s,n,r,i,e[8],11,-2022574463),i=jr(i,s,n,r,e[11],16,1839030562),r=jr(r,i,s,n,e[14],23,-35309556),n=jr(n,r,i,s,e[1],4,-1530992060),s=jr(s,n,r,i,e[4],11,1272893353),i=jr(i,s,n,r,e[7],16,-155497632),r=jr(r,i,s,n,e[10],23,-1094730640),n=jr(n,r,i,s,e[13],4,681279174),s=jr(s,n,r,i,e[0],11,-358537222),i=jr(i,s,n,r,e[3],16,-722521979),r=jr(r,i,s,n,e[6],23,76029189),n=jr(n,r,i,s,e[9],4,
vendor: 8,691 bytes, lines 405-422
405-640364487),s=jr(s,n,r,i,e[12],11,-421815835),i=jr(i,s,n,r,e[15],16,530742520),n=Or(n,r=jr(r,i,s,n,e[2],23,-995338651),i,s,e[0],6,-198630844),s=Or(s,n,r,i,e[7],10,1126891415),i=Or(i,s,n,r,e[14],15,-1416354905),r=Or(r,i,s,n,e[5],21,-57434055),n=Or(n,r,i,s,e[12],6,1700485571),s=Or(s,n,r,i,e[3],10,-1894986606),i=Or(i,s,n,r,e[10],15,-1051523),r=Or(r,i,s,n,e[1],21,-2054922799),n=Or(n,r,i,s,e[8],6,1873313359),s=Or(s,n,r,i,e[15],10,-30611744),i=Or(i,s,n,r,e[6],15,-1560198380),r=Or(r,i,s,n,e[13],21,1309151649),n=Or(n,r,i,s,e[4],6,-145523070),s=Or(s,n,r,i,e[11],10,-1120210379),i=Or(i,s,n,r,e[2],15,718787259),r=Or(r,i,s,n,e[9],21,-343485551),t[0]=Qo(n,t[0]),t[1]=Qo(r,t[1]),t[2]=Qo(i,t[2]),t[3]=Qo(s,t[3])}function i1(t,e,n,r,i,s){return e=Qo(Qo(e,t),Qo(r,s)),Qo(e<<i|e>>>32-i,n)}function Rr(t,e,n,r,i,s,a){return i1(e&n|~e&r,t,e,i,s,a)}function Lr(t,e,n,r,i,s,a){return i1(e&r|n&~r,t,e,i,s,a)}function jr(t,e,n,r,i,s,a){return i1(e^n^r,t,e,i,s,a)}function Or(t,e,n,r,i,s,a){return i1(n^(e|~r),t,e,i,s,a)}function rL(t){var e,n=t.length,r=[1732584193,-271733879,-1732584194,271733878];for(e=64;e<=t.length;e+=64)u2(r,OY(t.substring(e-64,e)));t=t.substring(e-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(e=0;e<t.length;e++)i[e>>2]|=t.charCodeAt(e)<<(e%4<<3);if(i[e>>2]|=128<<(e%4<<3),e>55)for(u2(r,i),e=0;e<16;e++)i[e]=0;return i[14]=8*n,u2(r,i),r}function OY(t){var e,n=[];for(e=0;e<64;e+=4)n[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return n}var jN="0123456789abcdef".split("");function IY(t){for(var e="",n=0;n<4;n++)e+=jN[t>>8*n+4&15]+jN[t>>8*n&15];return e}function DY(t){return String.fromCharCode(255&t,(65280&t)>>8,(16711680&t)>>16,(4278190080&t)>>24)}function fb(t){return rL(t).map(DY).join("")}var MY=function(t){for(var e=0;e<t.length;e++)t[e]=IY(t[e]);return t.join("")}(rL("hello"))!="5d41402abc4b2a76b9719d911017c592";function Qo(t,e){if(MY){var n=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(n>>16)<<16|65535&n}return t+e&4294967295}/** 406 * @license 407 * FPDF is released under a permissive license: there is no usage restriction. 408 * You may embed it freely in your application (commercial or not), with or 409 * without modifications. 410 * 411 * Reference: http://www.fpdf.org/en/script/script37.php 412 */function pb(t,e){var n,r,i,s;if(t!==n){for(var a=(i=t,s=1+(256/t.length|0),new Array(s+1).join(i)),o=[],l=0;l<256;l++)o[l]=l;var c=0;for(l=0;l<256;l++){var u=o[l];c=(c+u+a.charCodeAt(l))%256,o[l]=o[c],o[c]=u}n=t,r=o}else o=r;var d=e.length,f=0,h=0,y="";for(l=0;l<d;l++)h=(h+(u=o[f=(f+1)%256]))%256,o[f]=o[h],o[h]=u,a=o[(o[f]+o[h])%256],y+=String.fromCharCode(e.charCodeAt(l)^a);return y}/** 413 * @license 414 * Licensed under the MIT License. 415 * http://opensource.org/licenses/mit-license 416 * Author: Owen Leong (@owenl131) 417 * Date: 15 Oct 2020 418 * References: 419 * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt 420 * https://github.com/foliojs/pdfkit/blob/master/lib/security.js 421 * http://www.fpdf.org/en/script/script37.php 422 */var ON={print:4,modify:8,copy:16,"annot-forms":32};function vu(t,e,n,r){this.v=1,this.r=2;var i=192;t.forEach(function(o){if(ON.perm!==void 0)throw new Error("Invalid permission: "+o);i+=ON[o]}),this.padding="(¿N^NuÂAd\0NVÿú�\b..\0¶Ãh>Â/\f©þdSiz";var s=(e+this.padding).substr(0,32),a=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(s,a),this.P=-(1+(255^i)),this.encryptionKey=fb(s+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=pb(this.encryptionKey,this.padding)}function yu(t){if(/[^\u0000-\u00ff]/.test(t))throw new Error("Invalid PDF Name Object: "+t+", Only accept ASCII characters.");for(var e="",n=t.length,r=0;r<n;r++){var i=t.charCodeAt(r);e+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?"#"+("0"+i.toString(16)).slice(-2):t[r]}return e}function IN(t){if(rn(t)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var e={};this.subscribe=function(n,r,i){if(i=i||!1,typeof n!="string"||typeof r!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");e.hasOwnProperty(n)||(e[n]={});var s=Math.random().toString(35);return e[n][s]=[r,!!i],s},this.unsubscribe=function(n){for(var r in e)if(e[r][n])return delete e[r][n],Object.keys(e[r]).length===0&&delete e[r],!0;return!1},this.publish=function(n){if(e.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var s in e[n]){var a=e[n][s];try{a[0].apply(t,r)}catch(o){pt.console&&cn.error("jsPDF PubSub Error",o.message,o)}a[1]&&i.push(s)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return e}}function K0(t){if(!(this instanceof K0))return new K0(t);var e="opacity,stroke-opacity".split(",");for(var n in t)t.hasOwnProperty(n)&&e.indexOf(n)>=0&&(this[n]=t[n]);this.id="",this.objectNumber=-1}function iL(t,e){this.gState=t,this.matrix=e,this.id="",this.objectNumber=-1}function Jl(t,e,n,r,i){if(!(this instanceof Jl))return new Jl(t,e,n,r,i);this.type=t==="axial"?2:3,this.coords=e,this.colors=n,iL.call(this,r,i)}function ju(t,e,n,r,i){if(!(this instanceof ju))return new ju(t,e,n,r,i);this.boundingBox=t,this.xStep=e,this.yStep=n,this.stream="",this.cloneIndex=0,iL.call(this,r,i)}function nt(t){var e,n=typeof arguments[0]=="string"?arguments[0]:"p",r=arguments[1],i=arguments[2],s=arguments[3],a=[],o=1,l=16,c="S",u=null;rn(t=t||{})==="object"&&(n=t.orientation,r=t.unit||r,i=t.format||i,s=t.compress||t.compressPdf||s,(u=t.encryption||null)!==null&&(u.userPassword=u.userPassword||"",u.ownerPassword=u.ownerPassword||"",u.userPermissions=u.userPermissions||[]),o=typeof t.userUnit=="number"?Math.abs(t.userUnit):1,t.precision!==void 0&&(e=t.precision),t.floatPrecision!==void 0&&(l=t.floatPrecision),c=t.defaultPathOperation||"S"),a=t.filters||(s===!0?["FlateEncode"]:a),r=r||"mm",n=(""+(n||"P")).toLowerCase();var d=t.putOnlyUsedFonts||!1,f={},h={internal:{},__private__:{}};h.__private__.PubSub=IN;var y="1.3",v=h.__private__.getPdfVersion=function(){return y};h.__private__.setPdfVersion=function(b){y=b};var _={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};h.__private__.getPageFormats=function(){return _};var w=h.__private__.getPageFormat=function(b){return _[b]};i=i||"a4";var x="compat",k="advanced",N=x;function R(){this.saveGraphicsState(),V(new ct(vt,0,0,-vt,0,Il()*vt).toString()+" cm"),this.setFontSize(this.getFontSize()/vt),c="n",N=k}function H(){this.restoreGraphicsState(),c="S",N=x}var F=h.__private__.combineFontStyleAndFontWeight=function(b,P){if(b=="bold"&&P=="normal"||b=="bold"&&P==400||b=="normal"&&P=="italic"||b=="bold"&&P=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return P&&(b=P==400||P==="normal"?b==="italic"?"italic":"normal":P!=700&&P!=="bold"||b!=="normal"?(P==700?"bold":P)+""+b:"bold"),b};h.advancedAPI=function(b){var P=N===x;return P&&R.call(this),typeof b!="function"||(b(this),P&&H.call(this)),this},h.compatAPI=function(b){var P=N===k;return P&&H.call(this),typeof b!="function"||(b(this),P&&R.call(this)),this},h.isAdvancedAPI=function(){return N===k};var M,I=function(b){if(N!==k)throw new Error(b+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},G=h.roundToPrecision=h.__private__.roundToPrecision=function(b,P){var Y=e||P;if(isNaN(b)||isNaN(Y))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return b.toFixed(Y).replace(/0+$/,"")};M=h.hpf=h.__private__.hpf=typeof l=="number"?function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.hpf");return G(b,l)}:l==="smart"?function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.hpf");return G(b,b>-1&&b<1?16:5)}:function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.hpf");return G(b,16)};var L=h.f2=h.__private__.f2=function(b){if(isNaN(b))throw new Error("Invalid argument passed to
422jsPDF.f2");return G(b,2)},j=h.__private__.f3=function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.f3");return G(b,3)},W=h.scale=h.__private__.scale=function(b){if(isNaN(b))throw new Error("Invalid argument passed to jsPDF.scale");return N===x?b*vt:N===k?b:void 0},z=function(b){return W(function(P){return N===x?Il()-P:N===k?P:void 0}(b))};h.__private__.setPrecision=h.setPrecision=function(b){typeof parseInt(b,10)=="number"&&(e=parseInt(b,10))};var re,ne="00000000000000000000000000000000",oe=h.__private__.getFileId=function(){return ne},U=h.__private__.setFileId=function(b){return ne=b!==void 0&&/^[a-fA-F0-9]{32}$/.test(b)?b.toUpperCase():ne.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),u!==null&&(Qn=new vu(u.userPermissions,u.userPassword,u.ownerPassword,ne)),ne};h.setFileId=function(b){return U(b),this},h.getFileId=function(){return oe()};var J=h.__private__.convertDateToPDFDate=function(b){var P=b.getTimezoneOffset(),Y=P<0?"+":"-",te=Math.floor(Math.abs(P/60)),ce=Math.abs(P%60),be=[Y,X(te),"'",X(ce),"'"].join("");return["D:",b.getFullYear(),X(b.getMonth()+1),X(b.getDate()),X(b.getHours()),X(b.getMinutes()),X(b.getSeconds()),be].join("")},de=h.__private__.convertPDFDateToDate=function(b){var P=parseInt(b.substr(2,4),10),Y=parseInt(b.substr(6,2),10)-1,te=parseInt(b.substr(8,2),10),ce=parseInt(b.substr(10,2),10),be=parseInt(b.substr(12,2),10),ke=parseInt(b.substr(14,2),10);return new Date(P,Y,te,ce,be,ke,0)},ie=h.__private__.setCreationDate=function(b){var P;if(b===void 0&&(b=new Date),b instanceof Date)P=J(b);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(b))throw new Error("Invalid argument passed to jsPDF.setCreationDate");P=b}return re=P},C=h.__private__.getCreationDate=function(b){var P=re;return b==="jsDate"&&(P=de(re)),P};h.setCreationDate=function(b){return ie(b),this},h.getCreationDate=function(b){return C(b)};var q,X=h.__private__.padd2=function(b){return("0"+parseInt(b)).slice(-2)},Q=h.__private__.padd2Hex=function(b){return("00"+(b=b.toString())).substr(b.length)},ee=0,le=[],me=[],pe=0,ge=[],Ne=[],je=!1,Re=me;h.__private__.setCustomOutputDestination=function(b){je=!0,Re=b};var Ke=function(b){je||(Re=b)};h.__private__.resetCustomOutputDestination=function(){je=!1,Re=me};var V=h.__private__.out=function(b){return b=b.toString(),pe+=b.length+1,Re.push(b),Re},Te=h.__private__.write=function(b){return V(arguments.length===1?b.toString():Array.prototype.join.call(arguments," "))},wt=h.__private__.getArrayBuffer=function(b){for(var P=b.length,Y=new ArrayBuffer(P),te=new Uint8Array(Y);P--;)te[P]=b.charCodeAt(P);return Y},it=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];h.__private__.getStandardFonts=function(){return it};var _e=t.fontSize||16;h.__private__.setFontSize=h.setFontSize=function(b){return _e=N===k?b/vt:b,this};var et,$e=h.__private__.getFontSize=h.getFontSize=function(){return N===x?_e:_e*vt},ot=t.R2L||!1;h.__private__.setR2L=h.setR2L=function(b){return ot=b,this},h.__private__.getR2L=h.getR2L=function(){return ot};var Je,Gt=h.__private__.setZoomMode=function(b){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(b))et=b;else if(isNaN(b)){if([void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(b)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+b+'" is not recognized.');et=b}else et=parseInt(b,10)};h.__private__.getZoomMode=function(){return et};var It,ft=h.__private__.setPageMode=function(b){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(b)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+b+'" is not recognized.');Je=b};h.__private__.getPageMode=function(){return Je};var Nt=h.__private__.setLayoutMode=function(b){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(b)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+b+'" is not recognized.');It=b};h.__private__.getLayoutMode=function(){return It},h.__private__.setDisplayMode=h.setDisplayMode=function(b,P,Y){return Gt(b),Nt(P),ft(Y),this};var Dt={title:"",subject:"",author:"",keywords:"",creator:""};h.__private__.getDocumentProperty=function(b){if(Object.keys(Dt).indexOf(b)===-1)throw new Error("Invalid argument passed to
422jsPDF.getDocumentProperty");return Dt[b]},h.__private__.getDocumentProperties=function(){return Dt},h.__private__.setDocumentProperties=h.setProperties=h.setDocumentProperties=function(b){for(var P in Dt)Dt.hasOwnProperty(P)&&b[P]&&(Dt[P]=b[P]);return this},h.__private__.setDocumentProperty=function(b,P){if(Object.keys(Dt).indexOf(b)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Dt[b]=P};var Ue,vt,Xe,wn,Ft,Pt={},kt={},qt=[],st={},ze={},Ie={},Me={},zt=null,ut=0,at=[],Kt=new IN(h),Al=t.hotfixes||[],Nr={},ya={},Is=[],ct=function b(P,Y,te,ce,be,ke){if(!(this instanceof b))return new b(P,Y,te,ce,be,ke);isNaN(P)&&(P=1),isNaN(Y)&&(Y=0),isNaN(te)&&(te=0),isNaN(ce)&&(ce=1),isNaN(be)&&(be=0),isNaN(ke)&&(ke=0),this._matrix=[P,Y,te,ce,be,ke]};Object.defineProperty(ct.prototype,"sx",{get:function(){return this._matrix[0]},set:function(b){this._matrix[0]=b}}),Object.defineProperty(ct.prototype,"shy",{get:function(){return this._matrix[1]},set:function(b){this._matrix[1]=b}}),Object.defineProperty(ct.prototype,"shx",{get:function(){return this._matrix[2]},set:function(b){this._matrix[2]=b}}),Object.defineProperty(ct.prototype,"sy",{get:function(){return this._matrix[3]},set:function(b){this._matrix[3]=b}}),Object.defineProperty(ct.prototype,"tx",{get:function(){return this._matrix[4]},set:function(b){this._matrix[4]=b}}),Object.defineProperty(ct.prototype,"ty",{get:function(){return this._matrix[5]},set:function(b){this._matrix[5]=b}}),Object.defineProperty(ct.prototype,"a",{get:function(){return this._matrix[0]},set:function(b){this._matrix[0]=b}}),Object.defineProperty(ct.prototype,"b",{get:function(){return this._matrix[1]},set:function(b){this._matrix[1]=b}}),Object.defineProperty(ct.prototype,"c",{get:function(){return this._matrix[2]},set:function(b){this._matrix[2]=b}}),Object.defineProperty(ct.prototype,"d",{get:function(){return this._matrix[3]},set:function(b){this._matrix[3]=b}}),Object.defineProperty(ct.prototype,"e",{get:function(){return this._matrix[4]},set:function(b){this._matrix[4]=b}}),Object.defineProperty(ct.prototype,"f",{get:function(){return this._matrix[5]},set:function(b){this._matrix[5]=b}}),Object.defineProperty(ct.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(ct.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(ct.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(ct.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),ct.prototype.join=function(b){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(M).join(b)},ct.prototype.multiply=function(b){var P=b.sx*this.sx+b.shy*this.shx,Y=b.sx*this.shy+b.shy*this.sy,te=b.shx*this.sx+b.sy*this.shx,ce=b.shx*this.shy+b.sy*this.sy,be=b.tx*this.sx+b.ty*this.shx+this.tx,ke=b.tx*this.shy+b.ty*this.sy+this.ty;return new ct(P,Y,te,ce,be,ke)},ct.prototype.decompose=function(){var b=this.sx,P=this.shy,Y=this.shx,te=this.sy,ce=this.tx,be=this.ty,ke=Math.sqrt(b*b+P*P),Ge=(b/=ke)*Y+(P/=ke)*te;Y-=b*Ge,te-=P*Ge;var Qe=Math.sqrt(Y*Y+te*te);return Ge/=Qe,b*(te/=Qe)<P*(Y/=Qe)&&(b=-b,P=-P,Ge=-Ge,ke=-ke),{scale:new ct(ke,0,0,Qe,0,0),translate:new ct(1,0,0,1,ce,be),rotate:new ct(b,P,-P,b,0,0),skew:new ct(1,0,Ge,1,0,0)}},ct.prototype.toString=function(b){return this.join(" ")},ct.prototype.inversed=function(){var b=this.sx,P=this.shy,Y=this.shx,te=this.sy,ce=this.tx,be=this.ty,ke=1/(b*te-P*Y),Ge=te*ke,Qe=-P*ke,gt=-Y*ke,At=b*ke;return new ct(Ge,Qe,gt,At,-Ge*ce-gt*be,-Qe*ce-At*be)},ct.prototype.applyToPoint=function(b){var P=b.x*this.sx+b.y*this.shx+this.tx,Y=b.x*this.shy+b.y*this.sy+this.ty;return new Ea(P,Y)},ct.prototype.applyToRectangle=function(b){var P=this.applyToPoint(b),Y=this.applyToPoint(new Ea(b.x+b.w,b.y+b.h));return new Jd(P.x,P.y,Y.x-P.x,Y.y-P.y)},ct.prototype.clone=function(){var b=this.sx,P=this.shy,Y=this.shx,te=this.sy,ce=this.tx,be=this.ty;return new ct(b,P,Y,te,ce,be)},h.Matrix=ct;var wa=h.matrixMult=function(b,P){return P.multiply(b)},ba=new ct(1,0,0,1,0,0);h.unitMatrix=h.identityMatrix=ba;var Mi=function(b,P){if(!ze[b]){var Y=(P instanceof Jl?"Sh":"P")+(Object.keys(st).length+1).toString(10);P.id=Y,ze[b]=Y,st[Y]=P,Kt.publish("addPattern",P)}};h.ShadingPattern=Jl,h.TilingPattern=ju,h.addShadingPattern=function(b,P){return I("addShadingPattern()"),Mi(b,P),this},h.beginTilingPattern=function(b){I("beginTilingPattern()"),Xd(b.boundingBox[0],b.boundingBox[1],b.boundingBox[2]-b.boundingBox[0],b.boundingBox[3]-b.boundingBox[1],b.matrix)},h.endTilingPattern=function(b,P){I("endTilingPattern()"),P.stream=Ne[q].join(`
423`),Mi(b,P),Kt.publish("endTilingPattern",P),Is.pop().restore()};var Fi,Cn=h.__private__.newObject=function(){var b=lr();return pr(b,!0),b},lr=h.__private__.newObjectDeferred=function(){return ee++,le[ee]=function(){return pe},ee},pr=function(b,P){return P=typeof P=="boolean"&&P,le[b]=pe,P&&V(b+" 0 obj"),b},Cl=h.__private__.newAdditionalObject=function(){var b={objId:lr(),content:""};return ge.push(b),b},fo=lr(),is=lr(),Ds=h.__private__.decodeColorString=function(b){var P=b.split(" ");if(P.length!==2||P[1]!=="g"&&P[1]!=="G")P.length!==5||P[4]!=="k"&&P[4]!=="K"||(P=[(1-P[0])*(1-P[3]),(1-P[1])*(1-P[3]),(1-P[2])*(1-P[3]),"r"]);else{var Y=parseFloat(P[0]);P=[Y,Y,Y,"r"]}for(var te="#",ce=0;ce<3;ce++)te+=("0"+Math.floor(255*parseFloat(P[ce])).toString(16)).slice(-2);return te},ss=h.__private__.encodeColorString=function(b){var P;typeof b=="string"&&(b={ch1:b});var Y=b.ch1,te=b.ch2,ce=b.ch3,be=b.ch4,ke=b.pdfColorType==="draw"?["G","RG","K"]:["g","rg","k"];if(typeof Y=="string"&&Y.charAt(0)!=="#"){var Ge=new nL(Y);if(Ge.ok)Y=Ge.toHex();else if(!/^\d*\.?\d*$/.test(Y))throw new Error('Invalid color "'+Y+'" passed to jsPDF.encodeColorString.')}if(typeof Y=="string"&&/^#[0-9A-Fa-f]{3}$/.test(Y)&&(Y="#"+Y[1]+Y[1]+Y[2]+Y[2]+Y[3]+Y[3]),typeof Y=="string"&&/^#[0-9A-Fa-f]{6}$/.test(Y)){var Qe=parseInt(Y.substr(1),16);Y=Qe>>16&255,te=Qe>>8&255,ce=255&Qe}if(te===void 0||be===void 0&&Y===te&&te===ce)P=typeof Y=="string"?Y+" "+ke[0]:b.precision===2?L(Y/255)+" "+ke[0]:j(Y/255)+" "+ke[0];else if(be===void 0||rn(be)==="object"){if(be&&!isNaN(be.a)&&be.a===0)return["1.","1.","1.",ke[1]].join(" ");P=typeof Y=="string"?[Y,te,ce,ke[1]].join(" "):b.precision===2?[L(Y/255),L(te/255),L(ce/255),ke[1]].join(" "):[j(Y/255),j(te/255),j(ce/255),ke[1]].join(" ")}else P=typeof Y=="string"?[Y,te,ce,be,ke[2]].join(" "):b.precision===2?[L(Y),L(te),L(ce),L(be),ke[2]].join(" "):[j(Y),j(te),j(ce),j(be),ke[2]].join(" ");return P},as=h.__private__.getFilters=function(){return a},zi=h.__private__.putStream=function(b){var P=(b=b||{}).data||"",Y=b.filters||as(),te=b.alreadyAppliedFilters||[],ce=b.addLength1||!1,be=P.length,ke=b.objectId,Ge=function(er){return er};if(u!==null&&ke===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");u!==null&&(Ge=Qn.encryptor(ke,0));var Qe={};Y===!0&&(Y=["FlateEncode"]);var gt=b.additionalKeyValues||[],At=(Qe=nt.API.processDataByFilters!==void 0?nt.API.processDataByFilters(P,Y):{data:P,reverseChain:[]}).reverseChain+(Array.isArray(te)?te.join(" "):te.toString());if(Qe.data.length!==0&&(gt.push({key:"Length",value:Qe.data.length}),ce===!0&>.push({key:"Length1",value:be})),At.length!=0)if(At.split("/").length-1==1)gt.push({key:"Filter",value:At});else{gt.push({key:"Filter",value:"["+At+"]"});for(var Ht=0;Ht<gt.length;Ht+=1)if(gt[Ht].key==="DecodeParms"){for(var _n=[],Vn=0;Vn<Qe.reverseChain.split("/").length-1;Vn+=1)_n.push("null");_n.push(gt[Ht].value),gt[Ht].value="["+_n.join(" ")+"]"}}V("<<");for(var un=0;un<gt.length;un++)V("/"+gt[un].key+" "+gt[un].value);V(">>"),Qe.data.length!==0&&(V("stream"),V(Ge(Qe.data)),V("endstream"))},Pl=h.__private__.putPage=function(b){var P=b.number,Y=b.data,te=b.objId,ce=b.contentsObjId;pr(te,!0),V("<</Type /Page"),V("/Parent "+b.rootDictionaryObjId+" 0 R"),V("/Resources "+b.resourceDictionaryObjId+" 0 R"),V("/MediaBox ["+parseFloat(M(b.mediaBox.bottomLeftX))+" "+parseFloat(M(b.mediaBox.bottomLeftY))+" "+M(b.mediaBox.topRightX)+" "+M(b.mediaBox.topRightY)+"]"),b.cropBox!==null&&V("/CropBox ["+M(b.cropBox.bottomLeftX)+" "+M(b.cropBox.bottomLeftY)+" "+M(b.cropBox.topRightX)+" "+M(b.cropBox.topRightY)+"]"),b.bleedBox!==null&&V("/BleedBox ["+M(b.bleedBox.bottomLeftX)+" "+M(b.bleedBox.bottomLeftY)+" "+M(b.bleedBox.topRightX)+" "+M(b.bleedBox.topRightY)+"]"),b.trimBox!==null&&V("/TrimBox ["+M(b.trimBox.bottomLeftX)+" "+M(b.trimBox.bottomLeftY)+" "+M(b.trimBox.topRightX)+" "+M(b.trimBox.topRightY)+"]"),b.artBox!==null&&V("/ArtBox ["+M(b.artBox.bottomLeftX)+" "+M(b.artBox.bottomLeftY)+" "+M(b.artBox.topRightX)+" "+M(b.artBox.topRightY)+"]"),typeof b.userUnit=="number"&&b.userUnit!==1&&V("/UserUnit "+b.userUnit),Kt.publish("putPage",{objId:te,pageContext:at[P],pageNumber:P,page:Y}),V("/Contents "+ce+" 0 R"),V(">>"),V("endobj");var be=Y.join(` 424`);return N===k&&(be+=` 425Q`),pr(ce,!0),zi({data:be,filters:as(),objectId:ce}),V("endobj"),te},Ms=h.__private__.putPages=function(){var b,P,Y=[];for(b=1;b<=ut;b++)at[b].objId=lr(),at[b].contentsObjId=lr();for(b=1;b<=ut;b++)Y.push(Pl({number:b,data:Ne[b],objId:at[b].objId,contentsObjId:at[b].contentsObjId,mediaBox:at[b].mediaBox,cropBox:at[b].cropBox,bleedBox:at[b].bleedBox,trimBox:at[b].trimBox,artBox:at[b].artBox,userUnit:at[b].userUnit,rootDictionaryObjId:fo,resourceDictionaryObjId:is}));pr(fo,!0),V("<</Type /Pages");var te="/Kids [";for(P=0;P<ut;P++)te+=Y[P]+" 0 R ";V(te+"]"),V("/Count "+ut),V(">>"),V("endobj"),Kt.publish("postPutPages")},Tl=function(b){Kt.publish("putFont",{font:b,out:V,newObject:Cn,putStream:zi}),b.isAlreadyPutted!==!0&&(b.objectNumber=Cn(),V("<<"),V("/Type /Font"),V("/BaseFont /"+yu(b.postScriptName)),V("/Subtype /Type1"),typeof b.encoding=="string"&&V("/Encoding /"+b.encoding),V("/FirstChar 32"),V("/LastChar 255"),V(">>"),V("endobj"))},zc=function(b){b.objectNumber=Cn();var P=[];P.push({key:"Type",value:"/XObject"}),P.push({key:"Subtype",value:"/Form"}),P.push({key:"BBox",value:"["+[M(b.x),M(b.y),M(b.x+b.width),M(b.y+b.height)].join(" ")+"]"}),P.push({key:"Matrix",value:"["+b.matrix.toString()+"]"});var Y=b.pages[1].join(` 426`);zi({data:Y,additionalKeyValues:P,objectId:b.objectNumber}),V("endobj")},$c=function(b,P){P||(P=21);var Y=Cn(),te=function(ke,Ge){var Qe,gt=[],At=1/(Ge-1);for(Qe=0;Qe<1;Qe+=At)gt.push(Qe);
vendor: 6,001 bytes, line 426
426if(gt.push(1),ke[0].offset!=0){var Ht={offset:0,color:ke[0].color};ke.unshift(Ht)}if(ke[ke.length-1].offset!=1){var _n={offset:1,color:ke[ke.length-1].color};ke.push(_n)}for(var Vn="",un=0,er=0;er<gt.length;er++){for(Qe=gt[er];Qe>ke[un+1].offset;)un++;var Gn=ke[un].offset,mr=(Qe-Gn)/(ke[un+1].offset-Gn),Ca=ke[un].color,ls=ke[un+1].color;Vn+=Q(Math.round((1-mr)*Ca[0]+mr*ls[0]).toString(16))+Q(Math.round((1-mr)*Ca[1]+mr*ls[1]).toString(16))+Q(Math.round((1-mr)*Ca[2]+mr*ls[2]).toString(16))}return Vn.trim()}(b.colors,P),ce=[];ce.push({key:"FunctionType",value:"0"}),ce.push({key:"Domain",value:"[0.0 1.0]"}),ce.push({key:"Size",value:"["+P+"]"}),ce.push({key:"BitsPerSample",value:"8"}),ce.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ce.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),zi({data:te,additionalKeyValues:ce,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Y}),V("endobj"),b.objectNumber=Cn(),V("<< /ShadingType "+b.type),V("/ColorSpace /DeviceRGB");var be="/Coords ["+M(parseFloat(b.coords[0]))+" "+M(parseFloat(b.coords[1]))+" ";b.type===2?be+=M(parseFloat(b.coords[2]))+" "+M(parseFloat(b.coords[3])):be+=M(parseFloat(b.coords[2]))+" "+M(parseFloat(b.coords[3]))+" "+M(parseFloat(b.coords[4]))+" "+M(parseFloat(b.coords[5])),V(be+="]"),b.matrix&&V("/Matrix ["+b.matrix.toString()+"]"),V("/Function "+Y+" 0 R"),V("/Extend [true true]"),V(">>"),V("endobj")},Uc=function(b,P){var Y=lr(),te=Cn();P.push({resourcesOid:Y,objectOid:te}),b.objectNumber=te;var ce=[];ce.push({key:"Type",value:"/Pattern"}),ce.push({key:"PatternType",value:"1"}),ce.push({key:"PaintType",value:"1"}),ce.push({key:"TilingType",value:"1"}),ce.push({key:"BBox",value:"["+b.boundingBox.map(M).join(" ")+"]"}),ce.push({key:"XStep",value:M(b.xStep)}),ce.push({key:"YStep",value:M(b.yStep)}),ce.push({key:"Resources",value:Y+" 0 R"}),b.matrix&&ce.push({key:"Matrix",value:"["+b.matrix.toString()+"]"}),zi({data:b.stream,additionalKeyValues:ce,objectId:b.objectNumber}),V("endobj")},c1=function(b){for(var P in b.objectNumber=Cn(),V("<<"),b)switch(P){case"opacity":V("/ca "+L(b[P]));break;case"stroke-opacity":V("/CA "+L(b[P]))}V(">>"),V("endobj")},qd=function(b){pr(b.resourcesOid,!0),V("<<"),V("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var P in V("/Font <<"),Pt)Pt.hasOwnProperty(P)&&(d===!1||d===!0&&f.hasOwnProperty(P))&&V("/"+P+" "+Pt[P].objectNumber+" 0 R");V(">>")}(),function(){if(Object.keys(st).length>0){for(var P in V("/Shading <<"),st)st.hasOwnProperty(P)&&st[P]instanceof Jl&&st[P].objectNumber>=0&&V("/"+P+" "+st[P].objectNumber+" 0 R");Kt.publish("putShadingPatternDict"),V(">>")}}(),function(P){if(Object.keys(st).length>0){for(var Y in V("/Pattern <<"),st)st.hasOwnProperty(Y)&&st[Y]instanceof h.TilingPattern&&st[Y].objectNumber>=0&&st[Y].objectNumber<P&&V("/"+Y+" "+st[Y].objectNumber+" 0 R");Kt.publish("putTilingPatternDict"),V(">>")}}(b.objectOid),function(){if(Object.keys(Ie).length>0){var P;for(P in V("/ExtGState <<"),Ie)Ie.hasOwnProperty(P)&&Ie[P].objectNumber>=0&&V("/"+P+" "+Ie[P].objectNumber+" 0 R");Kt.publish("putGStateDict"),V(">>")}}(),function(){for(var P in V("/XObject <<"),Nr)Nr.hasOwnProperty(P)&&Nr[P].objectNumber>=0&&V("/"+P+" "+Nr[P].objectNumber+" 0 R");Kt.publish("putXobjectDict"),V(">>")}(),V(">>"),V("endobj")},zp=function(b){kt[b.fontName]=kt[b.fontName]||{},kt[b.fontName][b.fontStyle]=b.id},$p=function(b,P,Y,te,ce){var be={id:"F"+(Object.keys(Pt).length+1).toString(10),postScriptName:b,fontName:P,fontStyle:Y,encoding:te,isStandardFont:ce||!1,metadata:{}};return Kt.publish("addFont",{font:be,instance:this}),Pt[be.id]=be,zp(be),be.id},$i=h.__private__.pdfEscape=h.pdfEscape=function(b,P){return function(Y,te){var ce,be,ke,Ge,Qe,gt,At,Ht,_n;if(ke=(te=te||{}).sourceEncoding||"Unicode",Qe=te.outputEncoding,(te.autoencode||Qe)&&Pt[Ue].metadata&&Pt[Ue].metadata[ke]&&Pt[Ue].metadata[ke].encoding&&(Ge=Pt[Ue].metadata[ke].encoding,!Qe&&Pt[Ue].encoding&&(Qe=Pt[Ue].encoding),!Qe&&Ge.codePages&&(Qe=Ge.codePages[0]),typeof Qe=="string"&&(Qe=Ge[Qe]),Qe)){for(At=!1,gt=[],ce=0,be=Y.length;ce<be;ce++)(Ht=Qe[Y.charCodeAt(ce)])?gt.push(String.fromCharCode(Ht)):gt.push(Y[ce]),gt[ce].charCodeAt(0)>>8&&(At=!0);Y=gt.join("")}for(ce=Y.length;At===void 0&&ce!==0;)Y.charCodeAt(ce-1)>>8&&(At=!0),ce--;if(!At)return Y;for(gt=te.noBOM?[]:[254,255],ce=0,be=Y.length;ce<be;ce++){if((_n=(Ht=Y.charCodeAt(ce))>>8)>>8)throw new Error("Character at position "+ce+" of string '"+Y+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");gt.push(_n),gt.push(Ht-(_n<<8))}return String.fromCharCode.apply(void 0,gt)}(b,P).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},Hd=h.__private__.beginPage=function(b){Ne[++ut]=[],at[ut]={objId:0,contentsObjId:0,userUnit:Number(o),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(b[0]),topRightY:Number(b[1])}},Bp(ut),Ke(Ne[q])},Up=function(b,P){var Y,te,ce;switch(n=P||n,typeof b=="string"&&(Y=w(b.toLowerCase()),Array.isArray(Y)&&(te=Y[0],ce=Y[1])),Array.isArray(b)&&(te=b[0]*vt,ce=b[1]*vt),isNaN(te)&&(te=i[0],ce=i[1]),(te>14400||ce>14400)&&(cn.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),te=Math.min(14400,te),ce=Math.min(14400,ce)),i=[te,ce],n.substr(0,1)){case"l":ce>te&&(i=[ce,te]);break;case"p":te>ce&&(i=[ce,te])}Hd(i),yt(Gd),V(Wc),Zd!==0&&V(Zd+" J"),Yd!==0&&V(Yd+" j"),Kt.publish("addPage",{pageNumber:ut})},Wd=function(b){b>0&&b<=ut&&(Ne.splice(b,1),at.splice(b,1),ut--,q>ut&&(q=ut),this.setPage(q))},Bp=function(b){b>0&&b<=ut&&(q=b)},qp=h.__private__.getNumberOfPages=h.getNumberOfPages=function(){return Ne.length-1},Hp=function(b,P,Y){var te,ce=void 0;return Y=Y||{},b=b!==void 0?b:Pt[Ue].fontName,P=P!==void 0?P:Pt[Ue].fontStyle,te=b.toLowerCase(),kt[te]!==void 0&&kt[te][P]!==void 0?ce=kt[te][P]:kt[b]!==void 0&&kt[b][P]!==void 0?ce=kt[b][P]:Y.disableWarning===!1&&cn.warn("Unable to look up font label for font '"+b+"', '"+P+"'. Refer to getFontList(
426) for available fonts."),ce||Y.noFallback||(ce=kt.times[P])==null&&(ce=kt.times.normal),ce},Fs=h.__private__.putInfo=function(){var b=Cn(),P=function(te){return te};for(var Y in u!==null&&(P=Qn.encryptor(b,0)),V("<<"),V("/Producer ("+$i(P("jsPDF "+nt.version))+")"),Dt)Dt.hasOwnProperty(Y)&&Dt[Y]&&V("/"+Y.substr(0,1).toUpperCase()+Y.substr(1)+" ("+$i(P(Dt[Y]))+")");V("/CreationDate ("+$i(P(re))+")"),V(">>"),V("endobj")},Bc=h.__private__.putCatalog=function(b){var P=(b=b||{}).rootDictionaryObjId||fo;switch(Cn(),V("<<"),V("/Type /Catalog"),V("/Pages "+P+" 0 R"),et||(et="fullwidth"),et){case"fullwidth":V("/OpenAction [3 0 R /FitH null]");break;case"fullheight":V("/OpenAction [3 0 R /FitV null]");break;case"fullpage":V("/OpenAction [3 0 R /Fit]");break;case"original":V("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Y=""+et;Y.substr(Y.length-1)==="%"&&(et=parseInt(et)/100),typeof et=="number"&&V("/OpenAction [3 0 R /XYZ null null "+L(et)+"]")}switch(It||(It="continuous"),It){case"continuous":V("/PageLayout /OneColumn");break;case"single":V("/PageLayout /SinglePage");break;case"two":case"twoleft":V("/PageLayout /TwoColumnLeft");break;case"tworight":V("/PageLayout /TwoColumnRight")}Je&&V("/PageMode /"+Je),Kt.publish("putCatalog"),V(">>"),V("endobj")},u1=h.__private__.putTrailer=function(){V("trailer"),V("<<"),V("/Size "+(ee+1)),V("/Root "+ee+" 0 R"),V("/Info "+(ee-1)+" 0 R"),u!==null&&V("/Encrypt "+Qn.oid+" 0 R"),V("/ID [ <"+ne+"> <"+ne+"> ]"),V(">>")},Wn=h.__private__.putHeader=function(){V("%PDF-"+y),V("%ºÃˆ ")},Wp=h.__private__.putXRef=function(){var b="0000000000";V("xref"),V("0 "+(ee+1)),V("0000000000 65535 f ");for(var P=1;P<=ee;P++)typeof le[P]=="function"?V((b+le[P]()).slice(-10)+" 00000 n "):le[P]!==void 0?V((b+le[P]).slice(-10)+" 00000 n "):V("0000000000 00000 n ")},zs=h.__private__.buildDocument=function(){var b;ee=0,pe=0,me=[],le=[],ge=[],fo=lr(),is=lr(),Ke(me),Kt.publish("buildDocument"),Wn(),Ms(),function(){Kt.publish("putAdditionalObjects");for(var Y=0;Y<ge.length;Y++){var te=ge[Y];pr(te.objId,!0),V(te.content),V("endobj")}Kt.publish("postPutAdditionalObjects")}(),b=[],function(){for(var Y in Pt)Pt.hasOwnProperty(Y)&&(d===!1||d===!0&&f.hasOwnProperty(Y))&&Tl(Pt[Y])}(),function(){var Y;for(Y in Ie)Ie.hasOwnProperty(Y)&&c1(Ie[Y])}(),function(){for(var Y in Nr)Nr.hasOwnProperty(Y)&&zc(Nr[Y])}(),function(Y){var te;for(te in st)st.hasOwnProperty(te)&&(st[te]instanceof Jl?$c(st[te]):st[te]instanceof ju&&Uc(st[te],Y))}(b),Kt.publish("putResources"),b.forEach(qd),qd({resourcesOid:is,objectOid:Number.MAX_SAFE_INTEGER}),Kt.publish("postPutResources"),u!==null&&(Qn.oid=Cn(),V("<<"),V("/Filter /Standard"),V("/V "+Qn.v),V("/R "+Qn.r),V("/U <"+Qn.toHexString(Qn.U)+">"),V("/O <"+Qn.toHexString(Qn.O)+">"),V("/P "+Qn.P),V(">>"),V("endobj")),Fs(),Bc();var P=pe;return Wp(),u1(),V("startxref"),V(""+P),V("%%EOF"),Ke(Ne[q]),me.join(` 427`)},qc=h.__private__.getBlob=function(b){return new Blob([wt(b)],{type:"application/pdf"})},Vp=h.output=h.__private__.output=(Fi=function(b,P){switch(typeof(P=P||{})=="string"?P={filename:P}:P.filename=P.filename||"generated.pdf",b){case void 0:return zs();case"save":h.save(P.filename);break;case"arraybuffer":return wt(zs());case"blob":return qc(zs());case"bloburi":case"bloburl":if(pt.URL!==void 0&&typeof pt.URL.createObjectURL=="function")return pt.URL&&pt.URL.createObjectURL(qc(zs()))||void 0;cn.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Y="",te=zs();try{Y=LN(te)}catch{Y=LN(unescape(encodeURIComponent(te)))}return"data:application/pdf;filename="+P.filename+";base64,"+Y;case"pdfobjectnewwindow":if(Object.prototype.toString.call(pt)==="[object Window]"){var ce="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",be=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';P.pdfObjectUrl&&(ce=P.pdfObjectUrl,be="");var ke='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+ce+'"'+be+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(P)+");<\/script></body></html>",Ge=pt.open();return Ge!==null&&Ge.document.write(ke),Ge}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if(Object.prototype.toString.call(pt)==="[object Window]"){var Qe='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(P.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+P.filename+'" width="500px" height="400px" /></body></html>',gt=pt.open();if(gt!==null){gt.document.write(Qe);var At=this;gt.document.documentElement.querySelector("#pdfViewer").onload=function(){gt.document.title=P.filename,gt.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(At.output("bloburl"))}}return gt}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if(Object.prototype.toString.call(pt)!=="[object Window]")throw new Error("The option dataurlnewwindow just works in a browser-environment.");var Ht='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",P)+'"></iframe></body></html>',_n=pt.open();if(_n!==null&&(_n.document.write(Ht),_n.document.title=P.filename),_n||typeof safari>"u")return _n;break;case"datauri":case"dataurl":return pt.document.location.href=this.output("datauristring",P);default:return null}},Fi.foo=function(){try{return Fi.apply(this,arguments)}catch(Y){var b=Y.stack||"";~b.indexOf(" at ")&&(b=b.split(" at ")[1]);var P="Error in function "+b.split(` 428`)[0].split("<")[0]+": "+Y.message;if(!pt.console)throw new Error(P);pt.console.error(P,Y),pt.alert&&alert(P)}},Fi.foo.bar=Fi,Fi.foo),Ui=function(b){return Array.isArray(Al)===!0&&Al.indexOf(b)>-1};switch(r){case"pt":vt=1;break;case"mm":vt=72/25.4;break;case"cm":vt=72/2.54;break;case"in":vt=72;break;case"px":vt=Ui("px_scaling")==1?.75:96/72;break;case"pc":case"em":vt=12;break;case"ex":vt=6;break;default:if(typeof r!="number")throw new Error("Invalid unit: "+r);vt=r}var Qn=null;ie(),U();var xa=h.__private__.getPageInfo=h.getPageInfo=function(b){if(isNaN(b)||b%1!=0)throw new Error("Invalid argument passed to
428jsPDF.getPageInfo");return{objId:at[b].objId,pageNumber:b,pageContext:at[b]}},Gp=h.__private__.getPageInfoByObjId=function(b){if(isNaN(b)||b%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var P in at)if(at[P].objId===b)break;return xa(P)},d1=h.__private__.getCurrentPageInfo=h.getCurrentPageInfo=function(){return{objId:at[q].objId,pageNumber:q,pageContext:at[q]}};h.addPage=function(){return Up.apply(this,arguments),this},h.setPage=function(){return Bp.apply(this,arguments),Ke.call(this,Ne[q]),this},h.insertPage=function(b){return this.addPage(),this.movePage(q,b),this},h.movePage=function(b,P){var Y,te;if(b>P){Y=Ne[b],te=at[b];for(var ce=b;ce>P;ce--)Ne[ce]=Ne[ce-1],at[ce]=at[ce-1];Ne[P]=Y,at[P]=te,this.setPage(P)}else if(b<P){Y=Ne[b],te=at[b];for(var be=b;be<P;be++)Ne[be]=Ne[be+1],at[be]=at[be+1];Ne[P]=Y,at[P]=te,this.setPage(P)}return this},h.deletePage=function(){return Wd.apply(this,arguments),this},h.__private__.text=h.text=function(b,P,Y,te,ce){var be,ke,Ge,Qe,gt,At,Ht,_n,Vn,un=(te=te||{}).scope||this;if(typeof b=="number"&&typeof P=="number"&&(typeof Y=="string"||Array.isArray(Y))){var er=Y;Y=P,P=b,b=er}if(arguments[3]instanceof ct==0?(Ge=arguments[4],Qe=arguments[5],rn(Ht=arguments[3])==="object"&&Ht!==null||(typeof Ge=="string"&&(Qe=Ge,Ge=null),typeof Ht=="string"&&(Qe=Ht,Ht=null),typeof Ht=="number"&&(Ge=Ht,Ht=null),te={flags:Ht,angle:Ge,align:Qe})):(I("The transform parameter of text() with a Matrix value"),Vn=ce),isNaN(P)||isNaN(Y)||b==null)throw new Error("Invalid arguments passed to jsPDF.text");if(b.length===0)return un;var Gn,mr="",Ca=typeof te.lineHeightFactor=="number"?te.lineHeightFactor:Ll,ls=un.internal.scaleFactor;function Pa(Xt){return Xt=Xt.split(" ").join(Array(te.TabLen||9).join(" ")),$i(Xt,Ht)}function eh(Xt){for(var on,Dn=Xt.concat(),tr=[],La=Dn.length;La--;)typeof(on=Dn.shift())=="string"?tr.push(on):Array.isArray(Xt)&&(on.length===1||on[1]===void 0&&on[2]===void 0)?tr.push(on[0]):tr.push([on[0],on[1],on[2]]);return tr}function Gc(Xt,on){var Dn;if(typeof Xt=="string")Dn=on(Xt)[0];else if(Array.isArray(Xt)){for(var tr,La,uh=Xt.concat(),Yc=[],im=uh.length;im--;)typeof(tr=uh.shift())=="string"?Yc.push(on(tr)[0]):Array.isArray(tr)&&typeof tr[0]=="string"&&(La=on(tr[0],tr[1],tr[2]),Yc.push([La[0],La[1],La[2]]));Dn=Yc}return Dn}var po=!1,Dl=!0;if(typeof b=="string")po=!0;else if(Array.isArray(b)){var Ml=b.concat();ke=[];for(var mo,gr=Ml.length;gr--;)(typeof(mo=Ml.shift())!="string"||Array.isArray(mo)&&typeof mo[0]!="string")&&(Dl=!1);po=Dl}if(po===!1)throw new Error('Type of text must be string or Array. "'+b+'" is not recognized.');typeof b=="string"&&(b=b.match(/[\r?\n]/)?b.split(/\r\n|\r|\n/g):[b]);var Fl=_e/un.internal.scaleFactor,zl=Fl*(Ca-1);switch(te.baseline){case"bottom":Y-=zl;break;case"top":Y+=Fl-zl;break;case"hanging":Y+=Fl-2*zl;break;case"middle":Y+=Fl/2-zl}if((At=te.maxWidth||0)>0&&(typeof b=="string"?b=un.splitTextToSize(b,At):Object.prototype.toString.call(b)==="[object Array]"&&(b=b.reduce(function(Xt,on){return Xt.concat(un.splitTextToSize(on,At))},[]))),be={text:b,x:P,y:Y,options:te,mutex:{pdfEscape:$i,activeFontKey:Ue,fonts:Pt,activeFontSize:_e}},Kt.publish("preProcessText",be),b=be.text,Ge=(te=be.options).angle,Vn instanceof ct==0&&Ge&&typeof Ge=="number"){Ge*=Math.PI/180,te.rotationDirection===0&&(Ge=-Ge),N===k&&(Ge=-Ge);var th=Math.cos(Ge),nh=Math.sin(Ge);Vn=new ct(th,nh,-nh,th,0,0)}else Ge&&Ge instanceof ct&&(Vn=Ge);N!==k||Vn||(Vn=ba),(gt=te.charSpace||ka)!==void 0&&(mr+=M(W(gt))+` Tc 429`,this.setCharSpace(this.getCharSpace()||0)),(_n=te.horizontalScale)!==void 0&&(mr+=M(100*_n)+` Tz 430`),te.lang;var Br=-1,Ta=te.renderingMode!==void 0?te.renderingMode:te.stroke,Kc=un.internal.getCurrentPageInfo().pageContext;switch(Ta){case 0:case!1:case"fill":Br=0;break;case 1:case!0:case"stroke":Br=1;break;case 2:case"fillThenStroke":Br=2;break;case 3:case"invisible":Br=3;break;case 4:case"fillAndAddForClipping":Br=4;break;case 5:case"strokeAndAddPathForClipping":Br=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":Br=6;break;case 7:case"addToPathForClipping":Br=7}var nm=Kc.usedRenderingMode!==void 0?Kc.usedRenderingMode:-1;Br!==-1?mr+=Br+` Tr 431`:nm!==-1&&(mr+=`0 Tr 432`),Br!==-1&&(Kc.usedRenderingMode=Br),Qe=te.align||"left";var Bi,$l=_e*Ca,rh=un.internal.pageSize.getWidth(),ih=Pt[Ue];gt=te.charSpace||ka,At=te.maxWidth||0,Ht=Object.assign({autoencode:!0,noBOM:!0},te.flags);var go=[],Ul=function(Xt){return un.getStringUnitWidth(Xt,{font:ih,charSpace:gt,fontSize:_e,doKerning:!1})*_e/ls};if(Object.prototype.toString.call(b)==="[object Array]"){var fi;ke=eh(b),Qe!=="left"&&(Bi=ke.map(Ul));var pi,vo=0;if(Qe==="right"){P-=Bi[0],b=[],gr=ke.length;for(var Ra=0;Ra<gr;Ra++)Ra===0?(pi=_a(P),fi=Sa(Y)):(pi=W(vo-Bi[Ra]),fi=-$l),b.push([ke[Ra],pi,fi]),vo=Bi[Ra]}else if(Qe==="center"){P-=Bi[0]/2,b=[],gr=ke.length;for(var yo=0;yo<gr;yo++)yo===0?(pi=_a(P),fi=Sa(Y)):(pi=W((vo-Bi[yo])/2),fi=-$l),b.push([ke[yo],pi,fi]),vo=Bi[yo]}else if(Qe==="left"){b=[],gr=ke.length;for(var sh=0;sh<gr;sh++)b.push(ke[sh])}else if(Qe==="justify"&&ih.encoding==="Identity-H"){b=[],gr=ke.length,At=At!==0?At:rh;for(var Zc=0,In=0;In<gr;In++)if(fi=In===0?Sa(Y):-$l,pi=In===0?_a(P):Zc,In<gr-1){var rm=W((At-Bi[In])/(ke[In].split(" ").length-1)),Us=ke[In].split(" ");b.push([Us[0]+" ",pi,fi]),Zc=0;for(var Bs=1;Bs<Us.length;Bs++){var ah=(Ul(Us[Bs-1]+" "+Us[Bs])-Ul(Us[Bs]))*ls+rm;Bs==Us.length-1?b.push([Us[Bs],ah,0]):b.push([Us[Bs]+" ",ah,0]),Zc-=ah}}else b.push([ke[In],pi,fi]);b.push(["",Zc,0])}else{if(Qe!=="justify")throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(b=[],gr=ke.length,At=At!==0?At:rh,In=0;In<gr;In++){fi=In===0?Sa(Y):-$l,pi=In===0?_a(P):0;var oh=ke[In].split(" ").length-1,lh=oh>0?(At-Bi[In])/oh:0;In<gr-1?go.push(M(W(lh))):go.push(0),b.push([ke[In],pi,fi])}}}(typeof te.R2L=="boolean"?te.R2L:ot)===!0&&(b=Gc(b,function(Xt,on,Dn){return[
vendor: 4,350 bytes, lines 432-442
432Xt.split("").reverse().join(""),on,Dn]})),be={text:b,x:P,y:Y,options:te,mutex:{pdfEscape:$i,activeFontKey:Ue,fonts:Pt,activeFontSize:_e}},Kt.publish("postProcessText",be),b=be.text,Gn=be.mutex.isHex||!1;var ch=Pt[Ue].encoding;ch!=="WinAnsiEncoding"&&ch!=="StandardEncoding"||(b=Gc(b,function(Xt,on,Dn){return[Pa(Xt),on,Dn]})),ke=eh(b),b=[];for(var wo,bo,xo,Bl=Array.isArray(ke[0])?1:0,_o="",ql=function(Xt,on,Dn){var tr="";return Dn instanceof ct?(Dn=typeof te.angle=="number"?wa(Dn,new ct(1,0,0,1,Xt,on)):wa(new ct(1,0,0,1,Xt,on),Dn),N===k&&(Dn=wa(new ct(1,0,0,-1,0,0),Dn)),tr=Dn.join(" ")+` Tm 433`):tr=M(Xt)+" "+M(on)+` Td 434`,tr},qi=0;qi<ke.length;qi++){switch(_o="",Bl){case 1:xo=(Gn?"<":"(")+ke[qi][0]+(Gn?">":")"),wo=parseFloat(ke[qi][1]),bo=parseFloat(ke[qi][2]);break;case 0:xo=(Gn?"<":"(")+ke[qi]+(Gn?">":")"),wo=_a(P),bo=Sa(Y)}go!==void 0&&go[qi]!==void 0&&(_o=go[qi]+` Tw 435`),qi===0?b.push(_o+ql(wo,bo,Vn)+xo):Bl===0?b.push(_o+xo):Bl===1&&b.push(_o+ql(wo,bo,Vn)+xo)}b=Bl===0?b.join(` Tj 436T* `):b.join(` Tj 437`),b+=` Tj 438`;var qs=`BT 439/`;return qs+=Ue+" "+_e+` Tf 440`,qs+=M(_e*Ca)+` TL 441`,qs+=jl+` 442`,qs+=mr,qs+=b,V(qs+="ET"),f[Ue]=!0,un};var h1=h.__private__.clip=h.clip=function(b){return V(b==="evenodd"?"W*":"W"),this};h.clipEvenOdd=function(){return h1("evenodd")},h.__private__.discardPath=h.discardPath=function(){return V("n"),this};var $s=h.__private__.isValidStyle=function(b){var P=!1;return[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(b)!==-1&&(P=!0),P};h.__private__.setDefaultPathOperation=h.setDefaultPathOperation=function(b){return $s(b)&&(c=b),this};var Kp=h.__private__.getStyle=h.getStyle=function(b){var P=c;switch(b){case"D":case"S":P="S";break;case"F":P="f";break;case"FD":case"DF":P="B";break;case"f":case"f*":case"B":case"B*":P=b}return P},Zp=h.close=function(){return V("h"),this};h.stroke=function(){return V("S"),this},h.fill=function(b){return Hc("f",b),this},h.fillEvenOdd=function(b){return Hc("f*",b),this},h.fillStroke=function(b){return Hc("B",b),this},h.fillStrokeEvenOdd=function(b){return Hc("B*",b),this};var Hc=function(b,P){rn(P)==="object"?p1(P,b):V(b)},Rl=function(b){b===null||N===k&&b===void 0||(b=Kp(b),V(b))};function f1(b,P,Y,te,ce){var be=new ju(P||this.boundingBox,Y||this.xStep,te||this.yStep,this.gState,ce||this.matrix);be.stream=this.stream;var ke=b+"$$"+this.cloneIndex+++"$$";return Mi(ke,be),be}var p1=function(b,P){var Y=ze[b.key],te=st[Y];if(te instanceof Jl)V("q"),V(m1(P)),te.gState&&h.setGState(te.gState),V(b.matrix.toString()+" cm"),V("/"+Y+" sh"),V("Q");else if(te instanceof ju){var ce=new ct(1,0,0,-1,0,Il());b.matrix&&(ce=ce.multiply(b.matrix||ba),Y=f1.call(te,b.key,b.boundingBox,b.xStep,b.yStep,ce).id),V("q"),V("/Pattern cs"),V("/"+Y+" scn"),te.gState&&h.setGState(te.gState),V(P),V("Q")}},m1=function(b){switch(b){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Vd=h.moveTo=function(b,P){return V(M(W(b))+" "+M(z(P))+" m"),this},Yp=h.lineTo=function(b,P){return V(M(W(b))+" "+M(z(P))+" l"),this},os=h.curveTo=function(b,P,Y,te,ce,be){return V([M(W(b)),M(z(P)),M(W(Y)),M(z(te)),M(W(ce)),M(z(be)),"c"].join(" ")),this};h.__private__.line=h.line=function(b,P,Y,te,ce){if(isNaN(b)||isNaN(P)||isNaN(Y)||isNaN(te)||!$s(ce))throw new Error("Invalid arguments passed to jsPDF.line");return N===x?this.lines([[Y-b,te-P]],b,P,[1,1],ce||"S"):this.lines([[Y-b,te-P]],b,P,[1,1]).stroke()},h.__private__.lines=h.lines=function(b,P,Y,te,ce,be){var ke,Ge,Qe,gt,At,Ht,_n,Vn,un,er,Gn,mr;if(typeof b=="number"&&(mr=Y,Y=P,P=b,b=mr),te=te||[1,1],be=be||!1,isNaN(P)||isNaN(Y)||!Array.isArray(b)||!Array.isArray(te)||!$s(ce)||typeof be!="boolean")throw new Error("Invalid arguments passed to jsPDF.lines");for(Vd(P,Y),ke=te[0],Ge=te[1],gt=b.length,er=P,Gn=Y,Qe=0;Qe<gt;Qe++)(At=b[Qe]).length===2?(er=At[0]*ke+er,Gn=At[1]*Ge+Gn,Yp(er,Gn)):(Ht=At[0]*ke+er,_n=At[1]*Ge+Gn,Vn=At[2]*ke+er,un=At[3]*Ge+Gn,er=At[4]*ke+er,Gn=At[5]*Ge+Gn,os(Ht,_n,Vn,un,er,Gn));return be&&Zp(),Rl(ce),this},h.path=function(b){for(var P=0;P<b.length;P++){var Y=b[P],te=Y.c;switch(Y.op){case"m":Vd(te[0],te[1]);break;case"l":Yp(te[0],te[1]);break;case"c":os.apply(this,te);break;case"h":Zp()}}return this},h.__private__.rect=h.rect=function(b,P,Y,te,ce){if(isNaN(b)||isNaN(P)||isNaN(Y)||isNaN(te)||!$s(ce))throw new Error("Invalid arguments passed to
442jsPDF.rect");return N===x&&(te=-te),V([M(W(b)),M(z(P)),M(W(Y)),M(W(te)),"re"].join(" ")),Rl(ce),this},h.__private__.triangle=h.triangle=function(b,P,Y,te,ce,be,ke){if(isNaN(b)||isNaN(P)||isNaN(Y)||isNaN(te)||isNaN(ce)||isNaN(be)||!$s(ke))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[Y-b,te-P],[ce-Y,be-te],[b-ce,P-be]],b,P,[1,1],ke,!0),this},h.__private__.roundedRect=h.roundedRect=function(b,P,Y,te,ce,be,ke){if(isNaN(b)||isNaN(P)||isNaN(Y)||isNaN(te)||isNaN(ce)||isNaN(be)||!$s(ke))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var Ge=4/3*(Math.SQRT2-1);return ce=Math.min(ce,.5*Y),be=Math.min(be,.5*te),this.lines([[Y-2*ce,0],[ce*Ge,0,ce,be-be*Ge,ce,be],[0,te-2*be],[0,be*Ge,-ce*Ge,be,-ce,be],[2*ce-Y,0],[-ce*Ge,0,-ce,-be*Ge,-ce,-be],[0,2*be-te],[0,-be*Ge,ce*Ge,-be,ce,-be]],b+ce,P,[1,1],ke,!0),this},h.__private__.ellipse=h.ellipse=function(b,P,Y,te,ce){if(isNaN(b)||isNaN(P)||isNaN(Y)||isNaN(te)||!$s(ce))throw new Error("Invalid arguments passed to jsPDF.ellipse");var be=4/3*(Math.SQRT2-1)*Y,ke=4/3*(Math.SQRT2-1)*te;return Vd(b+Y,P),os(b+Y,P-ke,b+be,P-te,b,P-te),os(b-be,P-te,b-Y,P-ke,b-Y,P),os(b-Y,P+ke,b-be,P+te,b,P+te),os(b+be,P+te,b+Y,P+ke,b+Y,P),Rl(ce),this},h.__private__.circle=h.circle=function(b,P,Y,te){if(isNaN(b)||isNaN(P)||isNaN(Y)||!$s(te))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(b,P,Y,Y,te)},h.setFont=function(b,P,Y){return Y&&(P=F(P,Y)),Ue=Hp(b,P,{disableWarning:!1}),this};var g1=h.__private__.getFont=h.getFont=function(){return Pt[Hp.apply(h,arguments)]};h.__private__.getFontList=h.getFontList=function(){var b,P,Y={};for(b in kt)if(kt.hasOwnProperty(b))for(P in Y[b]=[],kt[b])kt[b].hasOwnProperty(P)&&Y[b].push(P);return Y},h.addFont=function(b,P,Y,te,ce){var be=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&be.indexOf(arguments[3])!==-1?ce=arguments[3]:arguments[3]&&be.indexOf(arguments[3])==-1&&(Y=F(Y,te)),$p.call(this,b,P,Y,ce=ce||"Identity-H")};var Ll,Gd=t.lineWidth||.200025,v1=h.__private__.getLineWidth=h.getLineWidth=function(){return Gd},yt=h.__private__.setLineWidth=h.setLineWidth=function(b){return Gd=b,V(M(W(b))+" w"),this};h.__private__.setLineDash=nt.API.setLineDash=nt.API.setLineDashPattern=function(b,P){if(b=b||[],P=P||0,isNaN(P)||!Array.isArray(b))throw new Error("Invalid arguments passed to jsPDF.setLineDash");return b=b.map(function(Y){return M(W(Y))}).join(" "),P=M(W(P)),V("["+b+"] "+P+" d"),this};var y1=h.__private__.getLineHeight=h.getLineHeight=function(){return _e*Ll};h.__private__.getLineHeight=h.getLineHeight=function(){return _e*Ll};var w1=h.__private__.setLineHeightFactor=h.setLineHeightFactor=function(b){return typeof(b=b||1.15)=="number"&&(Ll=b),this},b1=h.__private__.getLineHeightFactor=h.getLineHeightFactor=function(){return Ll};w1(t.lineHeight);var _a=h.__private__.getHorizontalCoordinate=function(b){return W(b)},Sa=h.__private__.getVerticalCoordinate=function(b){return N===k?b:at[q].mediaBox.topRightY-at[q].mediaBox.bottomLeftY-W(b)},x1=h.__private__.getHorizontalCoordinateString=h.getHorizontalCoordinateString=function(b){return M(_a(b))},_1=h.__private__.getVerticalCoordinateString=h.getVerticalCoordinateString=function(b){return M(Sa(b))},Wc=t.strokeColor||"0 G";h.__private__.getStrokeColor=h.getDrawColor=function(){return Ds(Wc)},h.__private__.setStrokeColor=h.setDrawColor=function(b,P,Y,te){return Wc=ss({ch1:b,ch2:P,ch3:Y,ch4:te,pdfColorType:"draw",precision:2}),V(Wc),this};var Kd=t.fillColor||"0 g";h.__private__.getFillColor=h.getFillColor=function(){return Ds(Kd)},h.__private__.setFillColor=h.setFillColor=function(b,P,Y,te){return Kd=ss({ch1:b,ch2:P,ch3:Y,ch4:te,pdfColorType:"fill",precision:2}),V(Kd),this};var jl=t.textColor||"0 g",S1=h.__private__.getTextColor=h.getTextColor=function(){return Ds(jl)};h.__private__.setTextColor=h.setTextColor=function(b,P,Y,te){return jl=ss({ch1:b,ch2:P,ch3:Y,ch4:te,pdfColorType:"text",precision:3}),this};var ka=t.charSpace,k1=h.__private__.getCharSpace=h.getCharSpace=function(){return parseFloat(ka||0)};h.__private__.setCharSpace=h.setCharSpace=function(b){if(isNaN(b))throw new Error("Invalid argument passed to
442jsPDF.setCharSpace");return ka=b,this};var Zd=0;h.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},h.__private__.setLineCap=h.setLineCap=function(b){var P=h.CapJoinStyles[b];if(P===void 0)throw new Error("Line cap style of '"+b+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Zd=P,V(P+" J"),this};var Yd=0;h.__private__.setLineJoin=h.setLineJoin=function(b){var P=h.CapJoinStyles[b];if(P===void 0)throw new Error("Line join style of '"+b+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Yd=P,V(P+" j"),this},h.__private__.setLineMiterLimit=h.__private__.setMiterLimit=h.setLineMiterLimit=h.setMiterLimit=function(b){if(b=b||0,isNaN(b))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return V(M(W(b))+" M"),this},h.GState=K0,h.setGState=function(b){(b=typeof b=="string"?Ie[Me[b]]:Jp(null,b)).equals(zt)||(V("/"+b.id+" gs"),zt=b)};var Jp=function(b,P){if(!b||!Me[b]){var Y=!1;for(var te in Ie)if(Ie.hasOwnProperty(te)&&Ie[te].equals(P)){Y=!0;break}if(Y)P=Ie[te];else{var ce="GS"+(Object.keys(Ie).length+1).toString(10);Ie[ce]=P,P.id=ce}return b&&(Me[b]=P.id),Kt.publish("addGState",P),P}};h.addGState=function(b,P){return Jp(b,P),this},h.saveGraphicsState=function(){return V("q"),qt.push({key:Ue,size:_e,color:jl}),this},h.restoreGraphicsState=function(){V("Q");var b=qt.pop();return Ue=b.key,_e=b.size,jl=b.color,zt=null,this},h.setCurrentTransformationMatrix=function(b){return V(b.toString()+" cm"),this},h.comment=function(b){return V("#"+b),this};var Ea=function(b,P){var Y=b||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return Y},set:function(be){isNaN(be)||(Y=parseFloat(be))}});var te=P||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return te},set:function(be){isNaN(be)||(te=parseFloat(be))}});var ce="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return ce},set:function(be){ce=be.toString()}}),this},Jd=function(b,P,Y,te){Ea.call(this,b,P),this.type="rect";var ce=Y||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return ce},set:function(ke){isNaN(ke)||(ce=parseFloat(ke))}});var be=te||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return be},set:function(ke){isNaN(ke)||(be=parseFloat(ke))}}),this},Vc=function(){this.page=ut,this.currentPage=q,this.pages=Ne.slice(0),this.pagesContext=at.slice(0),this.x=Xe,this.y=wn,this.matrix=Ft,this.width=Qd(q),this.height=Qp(q),this.outputDestination=Re,this.id="",this.objectNumber=-1};Vc.prototype.restore=function(){ut=this.page,q=this.currentPage,at=this.pagesContext,Ne=this.pages,Xe=this.x,wn=this.y,Ft=this.matrix,Xp(q,this.width),Na(q,this.height),Re=this.outputDestination};var Xd=function(b,P,Y,te,ce){Is.push(new Vc),ut=q=0,Ne=[],Xe=b,wn=P,Ft=ce,Hd([Y,te])};for(var Ol in h.beginFormObject=function(b,P,Y,te,ce){return Xd(b,P,Y,te,ce),this},h.endFormObject=function(b){return function(P){if(ya[P])Is.pop().restore();else{var Y=new Vc,te="Xo"+(Object.keys(Nr).length+1).toString(10);Y.id=te,ya[P]=te,Nr[te]=Y,Kt.publish("addFormObject",Y),Is.pop().restore()}}(b),this},h.doFormObject=function(b,P){var Y=Nr[ya[b]];return V("q"),V(P.toString()+" cm"),V("/"+Y.id+" Do"),V("Q"),this},h.getFormObject=function(b){var P=Nr[ya[b]];return{x:P.x,y:P.y,width:P.width,height:P.height,matrix:P.matrix}},h.save=function(b,P){return b=b||"generated.pdf",(P=P||{}).returnPromise=P.returnPromise||!1,P.returnPromise===!1?(Yl(qc(zs()),b),typeof Yl.unload=="function"&&pt.setTimeout&&setTimeout(Yl.unload,911),this):new Promise(function(Y,te){try{var ce=Yl(qc(zs()),b);typeof Yl.unload=="function"&&pt.setTimeout&&setTimeout(Yl.unload,911),Y(ce)}catch(be){te(be.message)}})},nt.API)nt.API.hasOwnProperty(Ol)&&(Ol==="events"&&nt.API.events.length?function(b,P){var Y,te,ce;for(ce=P.length-1;ce!==-1;ce--)Y=P[ce][0],te=P[ce][1],b.subscribe.apply(b,[Y].concat(typeof te=="function"?[te]:te))}(Kt,nt.API.events):h[Ol]=nt.API[Ol]);function Qd(b){return at[b].mediaBox.topRightX-at[b].mediaBox.bottomLeftX}function Xp(b,P){at[b].mediaBox.topRightX=P+at[b].mediaBox.bottomLeftX}function Qp(b){return at[b].mediaBox.topRightY-at[b].mediaBox.bottomLeftY}function Na(b,P){at[b].mediaBox.topRightY=P+at[b].mediaBox.bottomLeftY}var Aa=h.getPageWidth=function(b){return Qd(b=b||q)/vt},em=h.setPageWidth=function(b,P){Xp(b,P*vt)},Il=h.getPageHeight=function(b){return Qp(b=b||q)/vt},tm=h.setPageHeight=function(b,P){Na(b,P*vt)};return h.internal={pdfEscape:$i,getStyle:Kp,getFont:g1,getFontSize:$e,getCharSpace:k1,getTextColor:S1,getLineHeight:y1,getLineHeightFactor:b1,getLineWidth:v1,write:Te,getHorizontalCoordinate:_a,getVerticalCoordinate:Sa,getCoordinateString:x1,getVerticalCoordinateString:_1,collections:{},newObject:Cn,newAdditionalObject:Cl,newObjectDeferred:lr,newObjectDeferredBegin:pr,getFilters:as,putStream:zi,events:Kt,scaleFactor:vt,pageSize:{getWidth:function(){return Aa(q)}
vendor: 4,912 bytes, lines 442-444
442,setWidth:function(b){em(q,b)},getHeight:function(){return Il(q)},setHeight:function(b){tm(q,b)}},encryptionOptions:u,encryption:Qn,getEncryptor:function(b){return u!==null?Qn.encryptor(b,0):function(P){return P}},output:Vp,getNumberOfPages:qp,get pages(){return Ne},out:V,f2:L,f3:j,getPageInfo:xa,getPageInfoByObjId:Gp,getCurrentPageInfo:d1,getPDFVersion:v,Point:Ea,Rectangle:Jd,Matrix:ct,hasHotfix:Ui},Object.defineProperty(h.internal.pageSize,"width",{get:function(){return Aa(q)},set:function(b){em(q,b)},enumerable:!0,configurable:!0}),Object.defineProperty(h.internal.pageSize,"height",{get:function(){return Il(q)},set:function(b){tm(q,b)},enumerable:!0,configurable:!0}),(function(b){for(var P=0,Y=it.length;P<Y;P++){var te=$p.call(this,b[P][0],b[P][1],b[P][2],it[P][3],!0);d===!1&&(f[te]=!0);var ce=b[P][0].split("-");zp({id:te,fontName:ce[0],fontStyle:ce[1]||""})}Kt.publish("addFonts",{fonts:Pt,dictionary:kt})}).call(h,it),Ue="F1",Up(i,n),Kt.publish("initialized"),h}vu.prototype.lsbFirstWord=function(t){return String.fromCharCode(255&t,t>>8&255,t>>16&255,t>>24&255)},vu.prototype.toHexString=function(t){return t.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},vu.prototype.hexToBytes=function(t){for(var e=[],n=0;n<t.length;n+=2)e.push(String.fromCharCode(parseInt(t.substr(n,2),16)));return e.join("")},vu.prototype.processOwnerPassword=function(t,e){return pb(fb(e).substr(0,5),t)},vu.prototype.encryptor=function(t,e){var n=fb(this.encryptionKey+String.fromCharCode(255&t,t>>8&255,t>>16&255,255&e,e>>8&255)).substr(0,10);return function(r){return pb(n,r)}},K0.prototype.equals=function(t){var e,n="id,objectNumber,equals";if(!t||rn(t)!==rn(this))return!1;var r=0;for(e in this)if(!(n.indexOf(e)>=0)){if(this.hasOwnProperty(e)&&!t.hasOwnProperty(e)||this[e]!==t[e])return!1;r++}for(e in t)t.hasOwnProperty(e)&&n.indexOf(e)<0&&r--;return r===0},nt.API={events:[]},nt.version="3.0.4";var Ln=nt.API,x5=1,Fc=function(t){return t.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},uu=function(t){return t.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},bt=function(t){return t.toFixed(2)},jo=function(t){return t.toFixed(5)};Ln.__acroform__={};var hi=function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t},DN=function(t){return t*x5},Vs=function(t){var e=new aL,n=We.internal.getHeight(t)||0,r=We.internal.getWidth(t)||0;return e.BBox=[0,0,Number(bt(r)),Number(bt(n))],e},FY=Ln.__acroform__.setBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return t|1<<e},zY=Ln.__acroform__.clearBit=function(t,e){if(t=t||0,e=e||0,isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return t&~(1<<e)},$Y=Ln.__acroform__.getBit=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return t&1<<e?1:0},Un=Ln.__acroform__.getBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return $Y(t,e-1)},Bn=Ln.__acroform__.setBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return FY(t,e-1)},qn=Ln.__acroform__.clearBitForPdf=function(t,e){if(isNaN(t)||isNaN(e))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return zY(t,e-1)},UY=Ln.__acroform__.calculateCoordinates=function(t,e){var n=e.internal.getHorizontalCoordinate,r=e.internal.getVerticalCoordinate,i=t[0],s=t[1],a=t[2],o=t[3],l={};return l.lowerLeft_X=n(i)||0,l.lowerLeft_Y=r(s+o)||0,l.upperRight_X=n(i+a)||0,l.upperRight_Y=r(s)||0,[Number(bt(l.lowerLeft_X)),Number(bt(l.lowerLeft_Y)),Number(bt(l.upperRight_X)),Number(bt(l.upperRight_Y))]},BY=function(t){if(t.appearanceStreamContent)return t.appearanceStreamContent;if(t.V||t.DV){var e=[],n=t._V||t.DV,r=mb(t,n),i=t.scope.internal.getFont(t.fontName,t.fontStyle).id;e.push("/Tx BMC"),e.push("q"),e.push("BT"),e.push(t.scope.__private__.encodeColorString(t.color)),e.push("/"+i+" "+bt(r.fontSize)+" Tf"),e.push("1 0 0 1 0 0 Tm"),e.push(r.text),e.push("ET"),e.push("Q"),e.push("EMC");var s=Vs(t);return s.scope=t.scope,s.stream=e.join(` 443`),s}},mb=function(t,e){var n=t.fontSize===0?t.maxFontSize:t.fontSize,r={text:"",fontSize:""},i=(e=(e=e.substr(0,1)=="("?e.substr(1):e).substr(e.length-1)==")"?e.substr(0,e.length-1):e).split(" ");i=t.multiline?i.map(function(L){return L.split(` 444`)}):i.map(function(L){return[L]});var s=n,a=We.internal.getHeight(t)||0;a=a<0?-a:a;var o=We.internal.getWidth(t)||0;o=o<0?-o:o;var l=function(L,j,W){if(L+1<i.length){var z=j+" "+i[L+1][0];return gg(z,t,W).width<=o-4}return!1};s++;e:for(;s>0;){e="",s--;var c,u,d=gg("3",t,s).height,f=t.multiline?a-s:(a-d)/2,h=f+=2,y=0,v=0,_=0;if(s<=0){e=`(...) Tj
445`,e+="% Width of Text: "+gg(e,t,s=12).width+", FieldWidth:"+o+` 446`;break}for(var w="",x=0,k=0;k<i.length;k++)if(i.hasOwnProperty(k)){var N=!1;if(i[k].length!==1&&_!==i[k].length-1){if((d+2)*(x+2)+2>a)continue e;w+=i[k][_],N=!0,v=k,k--}else{w=(w+=i[k][_]+" ").substr(w.length-1)==" "?w.substr(0,w.length-1):w;var R=parseInt(k),H=l(R,w,s),F=k>=i.length-1;if(H&&!F){w+=" ",_=0;continue}if(H||F){if(F)v=R;else if(t.multiline&&(d+2)*(x+2)+2>a)continue e}else{if(!t.multiline||(d+2)*(x+2)+2>a)continue e;v=R}}for(var M="",I=y;I<=v;I++){var G=i[I];if(t.multiline){if(I===v){M+=G[_]+" ",_=(_+1)%G.length;continue}if(I===y){M+=G[G.length-1]+" ";continue}}M+=G[0]+" "}switch(M=M.substr(M.length-1)==" "?M.substr(0,M.length-1):M,u=gg(M,t,s).width,t.textAlign){case"right":c=o-u-2;break;case"center":c=(o-u)/2;break;default:c=2}e+=bt(c)+" "+bt(h)+` Td 447`,e+="("+Fc(M)+`) Tj 448`,e+=-bt(c)+` 0 Td 449`,h=-(s+2),u=0,y=N?v:v+1,x++,w=""}break}return r.text=e,r.fontSize=s,r},gg=function(t,e,n){var r=e.scope.internal.getFont(e.fontName,e.fontStyle),i=e.scope.getStringUnitWidth(t,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:e.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},qY={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},HY=function(t,e){var n={type:"reference",object:t};e.internal.getPageInfo(t.page).pageContext.annotations.find(function(r){return r.type===n.type&&r.object===n.object})===void 0&&e.internal.getPageInfo(t.page).pageContext.annotations.push(n)},WY=function(t,e){if(e.scope=t,t.internal!==void 0&&(t.internal.acroformPlugin===void 0||t.internal.acroformPlugin.isInitialized===!1)){if(js.FieldNum=0,t.internal.acroformPlugin=JSON.parse(JSON.stringify(qY)),t.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");x5=t.internal.scaleFactor,t.internal.acroformPlugin.acroFormDictionaryRoot=new oL,t.internal.acroformPlugin.acroFormDictionaryRoot.scope=t,t.internal.acroformPlugin.acroFormDictionaryRoot._eventID=t.internal.events.subscribe("postPutResources",function(){(function(n){n.internal.events.unsubscribe(n.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete n.internal.acroformPlugin.acroFormDictionaryRoot._eventID,n.internal.acroformPlugin.printedOut=!0})(t)}),t.internal.events.subscribe("buildDocument",function(){(function(n){n.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var r=n.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var i in r)if(r.hasOwnProperty(i)){var s=r[i];s.objId=void 0,s.hasAnnotation&&HY(s,n)}})(t)}),t.internal.events.subscribe("putCatalog",function(){(function(n){if(n.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw new Error("putCatalogCallback: Root missing.");n.internal.write("/AcroForm "+n.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")})(t)}),t.internal.events.subscribe("postPutPages",function(n){(function(r,i){var s=!r;for(var a in r||(i.internal.newObjectDeferredBegin(i.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),i.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),r=r||i.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(r.hasOwnProperty(a)){var o=r[a],l=[],c=o.Rect;if(o.Rect&&(o.Rect=UY(o.Rect,i)),i.internal.newObjectDeferredBegin(o.objId,!0),o.DA=We.createDefaultAppearanceStream(o),rn(o)==="object"&&typeof o.getKeyValueListForStream=="function"&&(l=o.getKeyValueListForStream()),o.Rect=c,o.hasAppearanceStream&&!o.appearanceStreamContent){var u=BY(o);l.push({key:"AP",value:"<</N "+u+">>"}),i.internal.acroformPlugin.xForms.push(u)}if(o.appearanceStreamContent){var d="";for(var f in o.appearanceStreamContent)if(o.appearanceStreamContent.hasOwnProperty(f)){var h=o.appearanceStreamContent[f];if(d+="/"+f+" ",d+="<<",Object.keys(h).length>=1||Array.isArray(h)){for(var a in h)if(h.hasOwnProperty(a)){var y=h[a];typeof y=="function"&&(y=y.call(i,o)),d+="/"+a+" "+y+" ",i.internal.acroformPlugin.xForms.indexOf(y)>=0||i.internal.acroformPlugin.xForms.push(y)}}else typeof(y=h)=="function"&&(y=y.call(i,o)),d+="/"+a+" "+y,i.internal.acroformPlugin.xForms.indexOf(y)>=0||i.internal.acroformPlugin.xForms.push(y);d+=">>"}l.push({key:"AP",value:`<< 450`+d+">>
450"})}i.internal.putStream({additionalKeyValues:l,objectId:o.objId}),i.internal.out("endobj")}s&&function(v,_){for(var w in v)if(v.hasOwnProperty(w)){var x=w,k=v[w];_.internal.newObjectDeferredBegin(k.objId,!0),rn(k)==="object"&&typeof k.putStream=="function"&&k.putStream(),delete v[x]}}(i.internal.acroformPlugin.xForms,i)})(n,t)}),t.internal.acroformPlugin.isInitialized=!0}},sL=Ln.__acroform__.arrayToPdfArray=function(t,e,n){var r=function(a){return a};if(Array.isArray(t)){for(var i="[",s=0;s<t.length;s++)switch(s!==0&&(i+=" "),rn(t[s])){case"boolean":case"number":case"object":i+=t[s].toString();break;case"string":t[s].substr(0,1)!=="/"?(e!==void 0&&n&&(r=n.internal.getEncryptor(e)),i+="("+Fc(r(t[s].toString()))+")"):i+=t[s].toString()}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},d2=function(t,e,n){var r=function(i){return i};return e!==void 0&&n&&(r=n.internal.getEncryptor(e)),(t=t||"").toString(),"("+Fc(r(t))+")"},ra=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(t){this._objId=t}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};ra.prototype.toString=function(){return this.objId+" 0 R"},ra.prototype.putStream=function(){var t=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:t,objectId:this.objId}),this.scope.internal.out("endobj")},ra.prototype.getKeyValueListForStream=function(){var t=[],e=Object.getOwnPropertyNames(this).filter(function(s){return s!="content"&&s!="appearanceStreamContent"&&s!="scope"&&s!="objId"&&s.substring(0,1)!="_"});for(var n in e)if(Object.getOwnPropertyDescriptor(this,e[n]).configurable===!1){var r=e[n],i=this[r];i&&(Array.isArray(i)?t.push({key:r,value:sL(i,this.objId,this.scope)}):i instanceof ra?(i.scope=this.scope,t.push({key:r,value:i.objId+" 0 R"})):typeof i!="function"&&t.push({key:r,value:i}))}return t};var aL=function(){ra.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var t,e=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return e},set:function(n){e=n}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(n){t=n.trim()},get:function(){return t||null}})};hi(aL,ra);var oL=function(){ra.call(this);var t,e=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return e.length>0?e:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return e}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(t){var n=function(r){return r};return this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),"("+Fc(n(t))+")"}},set:function(n){t=n}})};hi(oL,ra);var js=function t(){ra.call(this);var e=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return e},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute F supplied.');e=w}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!Un(e,3)},set:function(w){w?this.F=Bn(e,3):this.F=qn(e,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(w){if(isNaN(w))throw new Error('Invalid value "'+w+'" for attribute Ff supplied.');n=w}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(w){r=w!==void 0?w:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(w){r[0]=w}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(w){r[1]=w}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(w){r[2]=w}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]}
vendor: 17,969 bytes, lines 450-461
450,set:function(w){r[3]=w}});var i="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(w){switch(w){case"/Btn":case"/Tx":case"/Ch":case"/Sig":i=w;break;default:throw new Error('Invalid value "'+w+'" for attribute FT supplied.')}}});var s=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!s||s.length<1){if(this instanceof Z0)return;s="FieldObject"+t.FieldNum++}var w=function(x){return x};return this.scope&&(w=this.scope.internal.getEncryptor(this.objId)),"("+Fc(w(s))+")"},set:function(w){s=w.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return s},set:function(w){s=w}});var a="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return a},set:function(w){a=w}});var o="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return o},set:function(w){o=w}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(w){l=w}});var c=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return c===void 0?50/x5:c},set:function(w){c=w}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(w){u=w}});var d="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!d||this instanceof Z0||this instanceof dc))return d2(d,this.objId,this.scope)},set:function(w){w=w.toString(),d=w}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof hr==0?d2(f,this.objId,this.scope):f},set:function(w){w=w.toString(),f=this instanceof hr==0?w.substr(0,1)==="("?uu(w.substr(1,w.length-2)):uu(w):w}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof hr==1?uu(f.substr(1,f.length-1)):f},set:function(w){w=w.toString(),f=this instanceof hr==1?"/"+w:w}});var h=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(h)return h},set:function(w){this.V=w}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof hr==0?d2(h,this.objId,this.scope):h},set:function(w){w=w.toString(),h=this instanceof hr==0?w.substr(0,1)==="("?uu(w.substr(1,w.length-2)):uu(w):w}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof hr==1?uu(h.substr(1,h.length-1)):h},set:function(w){w=w.toString(),h=this instanceof hr==1?"/"+w:w}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var y,v=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return v},set:function(w){w=!!w,v=w}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(y)return y},set:function(w){y=w}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,1)},set:function(w){w?this.Ff=Bn(this.Ff,1):this.Ff=qn(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,2)},set:function(w){w?this.Ff=Bn(this.Ff,2):this.Ff=qn(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,3)},set:function(w){w?this.Ff=Bn(this.Ff,3):this.Ff=qn(this.Ff,3)}});var _=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(_!==null)return _},set:function(w){if([0,1,2].indexOf(w)===-1)throw new Error('Invalid value "'+w+'" for attribute Q supplied.');_=w}}),Object.defineProperty(this,"textAlign",{get:function(){var w;switch(_){case 0:default:w="left";break;case 1:w="center";break;case 2:w="right"}return w},configurable:!0,enumerable:!0,set:function(w){switch(w){case"right":case 2:_=2;break;case"center":case 1:_=1;break;default:_=0}}})};hi(js,ra);var Zu=function(){js.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var t=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return t},set:function(n){t=n}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return t},set:function(n){t=n}});var e=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return sL(e,this.objId,this.scope)},set:function(n){var r,i;i=[],typeof(r=n)=="string"&&(i=function(s,a,o){o||(o=1);for(var l,c=[];l=a.exec(s);)c.push(l[o]);return c}(r,/\((.*?)\)/g)),e=i}}),this.getOptions=function(){return e},this.setOptions=function(n){e=n,this.sort&&e.sort()},this.addOption=function(n){n=(n=n||"").toString(),e.push(n),this.sort&&e.sort()},this.removeOption=function(n,r){for(r=r||!1,n=(n=n||"").toString();e.indexOf(n)!==-1&&(e.splice(e.indexOf(n),1),r!==!1););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,18)},set:function(n){n?this.Ff=Bn(this.Ff,18):this.Ff=qn(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,19)},set:function(n){this.combo===!0&&(n?this.Ff=Bn(this.Ff,19):this.Ff=qn(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,20)},set:function(n){n?(this.Ff=Bn(this.Ff,20),e.sort()):this.Ff=qn(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,22)},set:function(n){n?this.Ff=Bn(this.Ff,22):this.Ff=qn(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,23)},set:function(n){n?this.Ff=Bn(this.Ff,23):this.Ff=qn(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,27)},set:function(n){n?this.Ff=Bn(this.Ff,27):this.Ff=qn(this.Ff,27)}}),this.hasAppearanceStream=!1};hi(Zu,js);var Yu=function(){Zu.call(this),this.fontName="helvetica",this.combo=!1};hi(Yu,Zu);var Ju=function(){Yu.call(this),this.combo=!0};hi(Ju,Yu);var qg=function(){Ju.call(this),this.edit=!0};hi(qg,Ju);var hr=function(){js.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,15)},set:function(n){n?this.Ff=Bn(this.Ff,15):this.Ff=qn(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,16)},set:function(n){n?this.Ff=Bn(this.Ff,16):this.Ff=qn(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,17)},set:function(n){n?this.Ff=Bn(this.Ff,17):this.Ff=qn(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,26)},set:function(n){n?this.Ff=Bn(this.Ff,26):this.Ff=qn(this.Ff,26)}});var t,e={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var n=function(s){return s};if(this.scope&&(n=this.scope.internal.getEncryptor(this.objId)),Object.keys(e).length!==0){var r,i=[];for(r in i.push("<<"),e)i.push("/"+r+" ("+Fc(n(e[r]))+")");return i.push(">>"),i.join(` 451`)}},set:function(n){rn(n)==="object"&&(e=n)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return e.CA||""},set:function(n){typeof n=="string"&&(e.CA=n)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return t},set:function(n){t=n}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return t.substr(1,t.length-1)},set:function(n){t="/"+n}})};hi(hr,js);var Hg=function(){hr.call(this),this.pushButton=!0};hi(Hg,hr);var Xu=function(){hr.call(this),this.radio=!0,this.pushButton=!1;var t=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e!==void 0?e:[]}})};hi(Xu,hr);var Z0=function(){var t,e;js.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return t},set:function(i){t=i}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return e},set:function(i){e=i}});var n,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var i=function(o){return o};this.scope&&(i=this.scope.internal.getEncryptor(this.objId));var s,a=[];for(s in a.push("<<"),r)a.push("/"+s+" ("+Fc(i(r[s]))+")");return a.push(">>"),a.join(` 452`)},set:function(i){rn(i)==="object"&&(r=i)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||""},set:function(i){typeof i=="string"&&(r.CA=i)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(i){n=i}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(i){n="/"+i}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=We.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};hi(Z0,js),Xu.prototype.setAppearance=function(t){if(!("createAppearanceStream"in t)||!("getCA"in t))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var e in this.Kids)if(this.Kids.hasOwnProperty(e)){var n=this.Kids[e];n.appearanceStreamContent=t.createAppearanceStream(n.optionName),n.caption=t.getCA()}},Xu.prototype.createOption=function(t){var e=new Z0;return e.Parent=this,e.optionName=t,this.Kids.push(e),VY.call(this.scope,e),e};var Wg=function(){hr.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=We.CheckBox.createAppearanceStream()};hi(Wg,hr);var dc=function(){js.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,13)},set:function(e){e?this.Ff=Bn(this.Ff,13):this.Ff=qn(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,21)},set:function(e){e?this.Ff=Bn(this.Ff,21):this.Ff=qn(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,23)},set:function(e){e?this.Ff=Bn(this.Ff,23):this.Ff=qn(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,24)},set:function(e){e?this.Ff=Bn(this.Ff,24):this.Ff=qn(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,25)},set:function(e){e?this.Ff=Bn(this.Ff,25):this.Ff=qn(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,26)},set:function(e){e?this.Ff=Bn(this.Ff,26):this.Ff=qn(this.Ff,26)}});var t=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return t},set:function(e){Number.isInteger(e)&&(t=e)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};hi(dc,js);var Vg=function(){dc.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!Un(this.Ff,14)},set:function(t){t?this.Ff=Bn(this.Ff,14):this.Ff=qn(this.Ff,14)}}),this.password=!0};hi(Vg,dc);var We={CheckBox:{createAppearanceStream:function(){return{N:{On:We.CheckBox.YesNormal},D:{On:We.CheckBox.YesPushDown,Off:We.CheckBox.OffPushDown}}},YesPushDown:function(t){var e=Vs(t);e.scope=t.scope;var n=[],r=t.scope.internal.getFont(t.fontName,t.fontStyle).id,i=t.scope.__private__.encodeColorString(t.color),s=mb(t,t.caption);return n.push("0.749023 g"),n.push("0 0 "+bt(We.internal.getWidth(t))+" "+bt(We.internal.getHeight(t))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+r+" "+bt(s.fontSize)+" Tf "+i),n.push("BT"),n.push(s.text),n.push("ET"),n.push("Q"),n.push("EMC"),e.stream=n.join(` 453`),e},YesNormal:function(t){var e=Vs(t);e.scope=t.scope;var n=t.scope.internal.getFont(t.fontName,t.fontStyle).id,r=t.scope.__private__.encodeColorString(t.color),i=[],s=We.internal.getHeight(t),a=We.internal.getWidth(t),o=mb(t,t.caption);return i.push("1 g"),i.push("0 0 "+bt(a)+" "+bt(s)+" re"),i.push("f"),i.push("q"),i.push("0 0 1 rg"),i.push("0 0 "+bt(a-1)+" "+bt(s-1)+" re"),i.push("W"),i.push("n"),i.push("0 g"),i.push("BT"),i.push("/"+n+" "+bt(o.fontSize)+" Tf "+r),i.push(o.text),i.push("ET"),i.push("Q"),e.stream=i.join(` 454`),e},OffPushDown:function(t){var e=Vs(t);e.scope=t.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+bt(We.internal.getWidth(t))+" "+bt(We.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join(` 455`),e}},RadioButton:{Circle:{createAppearanceStream:function(t){var e={D:{Off:We.RadioButton.Circle.OffPushDown},N:{}};return e.N[t]=We.RadioButton.Circle.YesNormal,e.D[t]=We.RadioButton.Circle.YesPushDown,e},getCA:function(){return"l"},YesNormal:function(t){var e=Vs(t);e.scope=t.scope;var n=[],r=We.internal.getWidth(t)<=We.internal.getHeight(t)?We.internal.getWidth(t)/4:We.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var i=We.internal.Bezier_C,s=Number((r*i).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+jo(We.internal.getWidth(t)/2)+" "+jo(We.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+s+" "+s+" "+r+" 0 "+r+" c"),n.push("-"+s+" "+r+" -"+r+" "+s+" -"+r+" 0 c"),n.push("-"+r+" -"+s+" -"+s+" -"+r+" 0 -"+r+" c"),n.push(s+" -"+r+" "+r+" -"+s+" "+r+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(` 456`),e},YesPushDown:function(t){var e=Vs(t);e.scope=t.scope;var n=[],r=We.internal.getWidth(t)<=We.internal.getHeight(t)?We.internal.getWidth(t)/4:We.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),s=Number((i*We.internal.Bezier_C).toFixed(5)),a=Number((r*We.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+jo(We.internal.getWidth(t)/2)+" "+jo(We.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),n.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),n.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),n.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+jo(We.internal.getWidth(t)/2)+" "+jo(We.internal.getHeight(t)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+a+" "+a+" "+r+" 0 "+r+" c"),n.push("-"+a+" "+r+" -"+r+" "+a+" -"+r+" 0 c"),n.push("-"+r+" -"+a+" -"+a+" -"+r+" 0 -"+r+" c"),n.push(a+" -"+r+" "+r+" -"+a+" "+r+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(` 457`),e},OffPushDown:function(t){var e=Vs(t);e.scope=t.scope;var n=[],r=We.internal.getWidth(t)<=We.internal.getHeight(t)?We.internal.getWidth(t)/4:We.internal.getHeight(t)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),s=Number((i*We.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+jo(We.internal.getWidth(t)/2)+" "+jo(We.internal.getHeight(t)/2)+" cm"),n.push(i+" 0 m"),n.push(i+" "+s+" "+s+" "+i+" 0 "+i+" c"),n.push("-"+s+" "+i+" -"+i+" "+s+" -"+i+" 0 c"),n.push("-"+i+" -"+s+" -"+s+" -"+i+" 0 -"+i+" c"),n.push(s+" -"+i+" "+i+" -"+s+" "+i+" 0 c"),n.push("f"),n.push("Q"),e.stream=n.join(` 458`),e}},Cross:{createAppearanceStream:function(t){var e={D:{Off:We.RadioButton.Cross.OffPushDown},N:{}};return e.N[t]=We.RadioButton.Cross.YesNormal,e.D[t]=We.RadioButton.Cross.YesPushDown,e},getCA:function(){return"8"},YesNormal:function(t){var e=Vs(t);e.scope=t.scope;var n=[],r=We.internal.calculateCross(t);return n.push("q"),n.push("1 1 "+bt(We.internal.getWidth(t)-2)+" "+bt(We.internal.getHeight(t)-2)+" re"),n.push("W"),n.push("n"),n.push(bt(r.x1.x)+" "+bt(r.x1.y)+" m"),n.push(bt(r.x2.x)+" "+bt(r.x2.y)+" l"),n.push(bt(r.x4.x)+" "+bt(r.x4.y)+" m"),n.push(bt(r.x3.x)+" "+bt(r.x3.y)+" l"),n.push("s"),n.push("Q"),e.stream=n.join(` 459`),e},YesPushDown:function(t){var e=Vs(t);e.scope=t.scope;var n=We.internal.calculateCross(t),r=[];return r.push("0.749023 g"),r.push("0 0 "+bt(We.internal.getWidth(t))+" "+bt(We.internal.getHeight(t))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+bt(We.internal.getWidth(t)-2)+" "+bt(We.internal.getHeight(t)-2)+" re"),r.push("W"),r.push("n"),r.push(bt(n.x1.x)+" "+bt(n.x1.y)+" m"),r.push(bt(n.x2.x)+" "+bt(n.x2.y)+" l"),r.push(bt(n.x4.x)+" "+bt(n.x4.y)+" m"),r.push(bt(n.x3.x)+" "+bt(n.x3.y)+" l"),r.push("s"),r.push("Q"),e.stream=r.join(` 460`),e},OffPushDown:function(t){var e=Vs(t);e.scope=t.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+bt(We.internal.getWidth(t))+" "+bt(We.internal.getHeight(t))+" re"),n.push("f"),e.stream=n.join(` 461`),e}}},createDefaultAppearanceStream:function(t){var e=t.scope.internal.getFont(t.fontName,t.fontStyle).id,n=t.scope.__private__.encodeColorString(t.color);return"/"+e+" "+t.fontSize+" Tf "+n}};We.internal={Bezier_C:.551915024494,calculateCross:function(t){var e=We.internal.getWidth(t),n=We.internal.getHeight(t),r=Math.min(e,n);return{x1:{x:(e-r)/2,y:(n-r)/2+r},x2:{x:(e-r)/2+r,y:(n-r)/2},x3:{x:(e-r)/2,y:(n-r)/2},x4:{x:(e-r)/2+r,y:(n-r)/2+r}}}},We.internal.getWidth=function(t){var e=0;return rn(t)==="object"&&(e=DN(t.Rect[2])),e},We.internal.getHeight=function(t){var e=0;return rn(t)==="object"&&(e=DN(t.Rect[3])),e};var VY=Ln.addField=function(t){if(WY(this,t),!(t instanceof js))throw new Error("Invalid argument passed to
461jsPDF.addField.");var e;return(e=t).scope.internal.acroformPlugin.printedOut&&(e.scope.internal.acroformPlugin.printedOut=!1,e.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),e.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(e),t.page=t.scope.internal.getCurrentPageInfo().pageNumber,this};Ln.AcroFormChoiceField=Zu,Ln.AcroFormListBox=Yu,Ln.AcroFormComboBox=Ju,Ln.AcroFormEditBox=qg,Ln.AcroFormButton=hr,Ln.AcroFormPushButton=Hg,Ln.AcroFormRadioButton=Xu,Ln.AcroFormCheckBox=Wg,Ln.AcroFormTextField=dc,Ln.AcroFormPasswordField=Vg,Ln.AcroFormAppearance=We,Ln.AcroForm={ChoiceField:Zu,ListBox:Yu,ComboBox:Ju,EditBox:qg,Button:hr,PushButton:Hg,RadioButton:Xu,CheckBox:Wg,TextField:dc,PasswordField:Vg,Appearance:We},nt.AcroForm={ChoiceField:Zu,ListBox:Yu,ComboBox:Ju,EditBox:qg,Button:hr,PushButton:Hg,RadioButton:Xu,CheckBox:Wg,TextField:dc,PasswordField:Vg,Appearance:We};function lL(t){return t.reduce(function(e,n,r){return e[n]=r,e},{})}(function(t){var e="addImage_";t.__addimage__={};var n="UNKNOWN",r={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=t.__addimage__.getImageFileTypeByImageData=function(L,j){var W,z,re,ne,oe,U=n;if((j=j||n)==="RGBA"||L.data!==void 0&&L.data instanceof Uint8ClampedArray&&"height"in L&&"width"in L)return"RGBA";if(H(L))for(oe in r)for(re=r[oe],W=0;W<re.length;W+=1){for(ne=!0,z=0;z<re[W].length;z+=1)if(re[W][z]!==void 0&&re[W][z]!==L[z]){ne=!1;break}if(ne===!0){U=oe;break}}else for(oe in r)for(re=r[oe],W=0;W<re.length;W+=1){for(ne=!0,z=0;z<re[W].length;z+=1)if(re[W][z]!==void 0&&re[W][z]!==L.charCodeAt(z)){ne=!1;break}if(ne===!0){U=oe;break}}return U===n&&j!==n&&(U=j),U},s=function L(j){for(var W=this.internal.write,z=this.internal.putStream,re=(0,this.internal.getFilters)();re.indexOf("FlateEncode")!==-1;)re.splice(re.indexOf("FlateEncode"),1);j.objectId=this.internal.newObject();var ne=[];if(ne.push({key:"Type",value:"/XObject"}),ne.push({key:"Subtype",value:"/Image"}),ne.push({key:"Width",value:j.width}),ne.push({key:"Height",value:j.height}
vendor: 6,372 bytes, line 461
461),j.colorSpace===w.INDEXED?ne.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(j.palette.length/3-1)+" "+("sMask"in j&&j.sMask!==void 0?j.objectId+2:j.objectId+1)+" 0 R]"}):(ne.push({key:"ColorSpace",value:"/"+j.colorSpace}),j.colorSpace===w.DEVICE_CMYK&&ne.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),ne.push({key:"BitsPerComponent",value:j.bitsPerComponent}),"decodeParameters"in j&&j.decodeParameters!==void 0&&ne.push({key:"DecodeParms",value:"<<"+j.decodeParameters+">>"}),"transparency"in j&&Array.isArray(j.transparency)&&j.transparency.length>0){for(var oe="",U=0,J=j.transparency.length;U<J;U++)oe+=j.transparency[U]+" "+j.transparency[U]+" ";ne.push({key:"Mask",value:"["+oe+"]"})}j.sMask!==void 0&&ne.push({key:"SMask",value:j.objectId+1+" 0 R"});var de=j.filter!==void 0?["/"+j.filter]:void 0;if(z({data:j.data,additionalKeyValues:ne,alreadyAppliedFilters:de,objectId:j.objectId}),W("endobj"),"sMask"in j&&j.sMask!==void 0){var ie,C=(ie=j.sMaskBitsPerComponent)!==null&&ie!==void 0?ie:j.bitsPerComponent,q={width:j.width,height:j.height,colorSpace:"DeviceGray",bitsPerComponent:C,data:j.sMask};"filter"in j&&(q.decodeParameters="/Predictor ".concat(j.predictor," /Colors 1 /BitsPerComponent ").concat(C," /Columns ").concat(j.width),q.filter=j.filter),L.call(this,q)}if(j.colorSpace===w.INDEXED){var X=this.internal.newObject();z({data:M(new Uint8Array(j.palette)),objectId:X}),W("endobj")}},a=function(){var L=this.internal.collections[e+"images"];for(var j in L)s.call(this,L[j])},o=function(){var L,j=this.internal.collections[e+"images"],W=this.internal.write;for(var z in j)W("/I"+(L=j[z]).index,L.objectId,"0","R")},l=function(){this.internal.collections[e+"images"]||(this.internal.collections[e+"images"]={},this.internal.events.subscribe("putResources",a),this.internal.events.subscribe("putXobjectDict",o))},c=function(){var L=this.internal.collections[e+"images"];return l.call(this),L},u=function(){return Object.keys(this.internal.collections[e+"images"]).length},d=function(L){return typeof t["process"+L.toUpperCase()]=="function"},f=function(L){return rn(L)==="object"&&L.nodeType===1},h=function(L,j){if(L.nodeName==="IMG"&&L.hasAttribute("src")){var W=""+L.getAttribute("src");if(W.indexOf("data:image/")===0)return Bg(unescape(W).split("base64,").pop());var z=t.loadFile(W,!0);if(z!==void 0)return z}if(L.nodeName==="CANVAS"){if(L.width===0||L.height===0)throw new Error("Given canvas must have data. Canvas width: "+L.width+", height: "+L.height);var re;switch(j){case"PNG":re="image/png";break;case"WEBP":re="image/webp";break;default:re="image/jpeg"}return Bg(L.toDataURL(re,1).split("base64,").pop())}},y=function(L){var j=this.internal.collections[e+"images"];if(j){for(var W in j)if(L===j[W].alias)return j[W]}},v=function(L,j,W){return L||j||(L=-96,j=-96),L<0&&(L=-1*W.width*72/L/this.internal.scaleFactor),j<0&&(j=-1*W.height*72/j/this.internal.scaleFactor),L===0&&(L=j*W.width/W.height),j===0&&(j=L*W.height/W.width),[L,j]},_=function(L,j,W,z,re,ne){var oe=v.call(this,W,z,re),U=this.internal.getCoordinateString,J=this.internal.getVerticalCoordinateString,de=c.call(this);if(W=oe[0],z=oe[1],de[re.index]=re,ne){ne*=Math.PI/180;var ie=Math.cos(ne),C=Math.sin(ne),q=function(Q){return Q.toFixed(4)},X=[q(ie),q(C),q(-1*C),q(ie),0,0,"cm"]}this.internal.write("q"),ne?(this.internal.write([1,"0","0",1,U(L),J(j+z),"cm"].join(" ")),this.internal.write(X.join(" ")),this.internal.write([U(W),"0","0",U(z),"0","0","cm"].join(" "))):this.internal.write([U(W),"0","0",U(z),U(L),J(j+z),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+re.index+" Do"),this.internal.write("Q")},w=t.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};t.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var x=t.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},k=t.__addimage__.sHashCode=function(L){var j,W,z=0;if(typeof L=="string")for(W=L.length,j=0;j<W;j++)z=(z<<5)-z+L.charCodeAt(j),z|=0;else if(H(L))for(W=L.byteLength/2,j=0;j<W;j++)z=(z<<5)-z+L[j],z|=0;return z},N=t.__addimage__.validateStringAsBase64=function(L){(L=L||"").toString().trim();var j=!0;return L.length===0&&(j=!1),L.length%4!=0&&(j=!1),/^[A-Za-z0-9+/]+$/.test(L.substr(0,L.length-2))===!1&&(j=!1),/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(L.substr(-2))===!1&&(j=!1),j},R=t.__addimage__.extractImageFromDataUrl=function(L){if(L==null||!(L=L.trim()).startsWith("data:"))return null;var j=L.indexOf(",");return j<0?null:L.substring(0,j).trim().endsWith("base64")?L.substring(j+1):null};t.__addimage__.isArrayBuffer=function(L){return L instanceof ArrayBuffer};var H=t.__addimage__.isArrayBufferView=function(L){return L instanceof Int8Array||L instanceof Uint8Array||L instanceof Uint8ClampedArray||L instanceof Int16Array||L instanceof Uint16Array||L instanceof Int32Array||L instanceof Uint32Array||L instanceof Float32Array||L instanceof Float64Array},F=t.__addimage__.binaryStringToUint8Array=function(L){for(var j=L.length,W=new Uint8Array(j),z=0;z<j;z++)W[z]=L.charCodeAt(z);return W},M=t.__addimage__.arrayBufferToBinaryString=function(L){for(var j="",W=H(L)?L:new Uint8Array(L),z=0;z<W.length;z+=8192)j+=String.fromCharCode.apply(null,W.subarray(z,z+8192));return j};t.addImage=function(){var L,j,W,z,re,ne,oe,U,J;if(typeof arguments[1]=="number"?(j=n,W=arguments[1],z=arguments[2],re=arguments[3],ne=arguments[4],oe=arguments[5],U=arguments[6],J=arguments[7]):(j=arguments[1],W=arguments[2],z=arguments[3],re=arguments[4],ne=arguments[5],oe=arguments[6],U=arguments[7],J=arguments[8]),rn(L=arguments[0])==="object"&&!f(L)&&"imageData"in L){var de=L;L=de.imageData,j=de.format||j||n,W=de.x||W||0,z=de.y||z||0,re=de.w||de.width||re,ne=de.h||de.height||ne,oe=de.alias||oe,U=de.compression||U,J=de.rotation||de.angle||J}var ie=this.internal.getFilters();if(U===void 0&&ie.indexOf("FlateEncode")!==-1&&(U="SLOW"),isNaN(W)||isNaN(z))throw new Error("Invalid coordinates passed to
461jsPDF.addImage");l.call(this);var C=I.call(this,L,j,oe,U);return _.call(this,W,z,re,ne,C,J),this};var I=function(L,j,W,z){var re,ne,oe;if(typeof L=="string"&&i(L)===n){L=unescape(L);var U=G(L,!1);(U!==""||(U=t.loadFile(L,!0))!==void 0)&&(L=U)}if(f(L)&&(L=h(L,j)),j=i(L,j),!d(j))throw new Error("addImage does not support files of type '"+j+"', please ensure that a plugin for '"+j+"' support is added.");if(((oe=W)==null||oe.length===0)&&(W=function(J){return typeof J=="string"||H(J)?k(J):H(J.data)?k(J.data):null}(L)),(re=y.call(this,W))||(L instanceof Uint8Array||j==="RGBA"||(ne=L,L=F(L)),re=this["process"+j.toUpperCase()](L,u.call(this),W,function(J){return J&&typeof J=="string"&&(J=J.toUpperCase()),J in t.image_compression?J:x.NONE}(z),ne)),!re)throw new Error("An unknown error occurred whilst processing the image.");return re},G=t.__addimage__.convertBase64ToBinaryString=function(L,j){j=typeof j!="boolean"||j;var W,z="";if(typeof L=="string"){var re;W=(re=R(L))!==null&&re!==void 0?re:L;try{z=Bg(W)}catch(ne){if(j)throw N(W)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+ne.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return z};t.getImageProperties=function(L){var j,W,z="";if(f(L)&&(L=h(L)),typeof L=="string"&&i(L)===n&&((z=G(L,!1))===""&&(z=t.loadFile(L)||""),L=z),W=i(L),!d(W))throw new Error("addImage does not support files of type '"+W+"', please ensure that a plugin for '"+W+"' support is added.");if(L instanceof Uint8Array||(L=F(L)),!(j=this["process"+W.toUpperCase()](L)))throw new Error("An unknown error occurred whilst processing the image");return j.fileType=W,j}})(nt.API),function(t){var e=function(n){if(n!==void 0&&n!="")return!0};nt.API.events.push(["addPage",function(n){this.internal.getPageInfo(n.pageNumber).pageContext.annotations=[]}]),t.events.push(["putPage",function(n){for(var r,i,s,a=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,l=this.internal.getPageInfoByObjId(n.objId),c=n.pageContext.annotations,u=!1,d=0;d<c.length&&!u;d++)switch((r=c[d]).type){case"link":(e(r.options.url)||e(r.options.pageNumber))&&(u=!0);break;case"reference":case"text":case"freetext":u=!0}if(u!=0){this.internal.write("/Annots [");for(var f=0;f<c.length;f++){r=c[f];var h=this.internal.pdfEscape,y=this.internal.getEncryptor(n.objId);switch(r.type){case"reference":this.internal.write(" "+r.object.objId+" 0 R ");break;case"text":var v=this.internal.newAdditionalObject(),_=this.internal.newAdditionalObject(),w=this.internal.getEncryptor(v.objId),x=r.title||"Note";s="<</Type /Annot /Subtype /Text "+(i="/Rect ["+a(r.bounds.x)+" "+o(r.bounds.y+r.bounds.h)+" "+a(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y)+"] ")+"/Contents ("+h(w(r.contents))+")",s+=" /Popup "+_.objId+" 0 R",s+=" /P "+l.objId+" 0 R",s+=" /T ("+h(w(x))+") >>",v.content=s;var k=v.objId+" 0 R";s="<</Type /Annot /Subtype /Popup "+(i="/Rect ["+a(r.bounds.x+30)+" "+o(r.bounds.y+r.bounds.h)+" "+a(r.bounds.x+r.bounds.w+30)+" "+o(r.bounds.y)+"] ")+" /Parent "+k,r.open&&(s+=" /Open true"),s+=" >>",_.content=s,this.internal.write(v.objId,"0 R",_.objId,"0 R");break;case"freetext":i="/Rect ["+a(r.bounds.x)+" "+o(r.bounds.y)+" "+a(r.bounds.x+r.bounds.w)+" "+o(r.bounds.y+r.bounds.h)+"] ";var N=r.color||"#000000";s="<</Type /Annot /Subtype /FreeText "+i+"/Contents ("+h(y(r.contents))+")",s+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+N+")",s+=" /Border [0 0 0]",s+=" >>",this.internal.write(s);break;case"link":if(r.options.name){var R=this.annotations._nameMap[r.options.name];r.options.pageNumber=R.page,r.options.top=R.y}else r.options.top||(r.options.top=0);if(i="/Rect ["+r.finalBounds.x+" "+r.finalBounds.y+" "+r.finalBounds.w+" "+r.finalBounds.h+"] ",s="",r.options.url)s="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /A <</S /URI /URI ("+h(y(r.options.url))+") >>";else if(r.options.pageNumber)switch(s="<</Type /Annot /Subtype /Link "+i+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(r.options.pageNumber).objId+" 0 R",r.options.magFactor=r.options.magFactor||"XYZ",r.options.magFactor){case"Fit":s+=" /Fit]";break;case"FitH":s+=" /FitH "+r.options.top+"]";break;
vendor: 22,700 bytes, lines 461-485
461case"FitV":r.options.left=r.options.left||0,s+=" /FitV "+r.options.left+"]";break;default:var H=o(r.options.top);r.options.left=r.options.left||0,r.options.zoom===void 0&&(r.options.zoom=0),s+=" /XYZ "+r.options.left+" "+H+" "+r.options.zoom+"]"}s!=""&&(s+=" >>",this.internal.write(s))}}this.internal.write("]")}}]),t.createAnnotation=function(n){var r=this.internal.getCurrentPageInfo();switch(n.type){case"link":this.link(n.bounds.x,n.bounds.y,n.bounds.w,n.bounds.h,n);break;case"text":case"freetext":r.pageContext.annotations.push(n)}},t.link=function(n,r,i,s,a){var o=this.internal.getCurrentPageInfo(),l=this.internal.getCoordinateString,c=this.internal.getVerticalCoordinateString;o.pageContext.annotations.push({finalBounds:{x:l(n),y:c(r),w:l(n+i),h:c(r+s)},options:a,type:"link"})},t.textWithLink=function(n,r,i,s){var a,o,l=this.getTextWidth(n),c=this.internal.getLineHeight()/this.internal.scaleFactor;if(s.maxWidth!==void 0){o=s.maxWidth;var u=this.splitTextToSize(n,o).length;a=Math.ceil(c*u)}else o=l,a=c;return this.text(n,r,i,s),i+=.2*c,s.align==="center"&&(r-=l/2),s.align==="right"&&(r-=l),this.link(r,i-c,o,a,s),l},t.getTextWidth=function(n){var r=this.internal.getFontSize();return this.getStringUnitWidth(n)*r/this.internal.scaleFactor}}(nt.API),function(t){var e={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];t.__arabicParser__={};var s=t.__arabicParser__.isInArabicSubstitutionA=function(v){return e[v.charCodeAt(0)]!==void 0},a=t.__arabicParser__.isArabicLetter=function(v){return typeof v=="string"&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(v)},o=t.__arabicParser__.isArabicEndLetter=function(v){return a(v)&&s(v)&&e[v.charCodeAt(0)].length<=2},l=t.__arabicParser__.isArabicAlfLetter=function(v){return a(v)&&i.indexOf(v.charCodeAt(0))>=0};t.__arabicParser__.arabicLetterHasIsolatedForm=function(v){return a(v)&&s(v)&&e[v.charCodeAt(0)].length>=1};var c=t.__arabicParser__.arabicLetterHasFinalForm=function(v){return a(v)&&s(v)&&e[v.charCodeAt(0)].length>=2};t.__arabicParser__.arabicLetterHasInitialForm=function(v){return a(v)&&s(v)&&e[v.charCodeAt(0)].length>=3};var u=t.__arabicParser__.arabicLetterHasMedialForm=function(v){return a(v)&&s(v)&&e[v.charCodeAt(0)].length==4},d=t.__arabicParser__.resolveLigatures=function(v){var _=0,w=n,x="",k=0;for(_=0;_<v.length;_+=1)w[v.charCodeAt(_)]!==void 0?(k++,typeof(w=w[v.charCodeAt(_)])=="number"&&(x+=String.fromCharCode(w),w=n,k=0),_===v.length-1&&(w=n,x+=v.charAt(_-(k-1)),_-=k-1,k=0)):(w=n,x+=v.charAt(_-k),_-=k,k=0);return x};t.__arabicParser__.isArabicDiacritic=function(v){return v!==void 0&&r[v.charCodeAt(0)]!==void 0};var f=t.__arabicParser__.getCorrectForm=function(v,_,w){return a(v)?s(v)===!1?-1:!c(v)||!a(_)&&!a(w)||!a(w)&&o(_)||o(v)&&!a(_)||o(v)&&l(_)||o(v)&&o(_)?0:u(v)&&a(_)&&!o(_)&&a(w)&&c(w)?3:o(v)||!a(w)?1:2:-1},h=function(v){var _=0,w=0,x=0,k="",N="",R="",H=(v=v||"").split("\\s+"),F=[];for(_=0;_<H.length;_+=1){for(F.push(""),w=0;w<H[_].length;w+=1)k=H[_][w],N=H[_][w-1],R=H[_][w+1],a(k)?(x=f(k,N,R),F[_]+=x!==-1?String.fromCharCode(e[k.charCodeAt(0)][x]):k):F[_]+=k;F[_]=d(F[_])}return F.join(" ")},y=t.__arabicParser__.processArabic=t.processArabic=function(){var v,_=typeof arguments[0]=="string"?arguments[0]:arguments[0].text,w=[];if(Array.isArray(_)){var x=0;for(w=[],x=0;x<_.length;x+=1)Array.isArray(_[x])?w.push([h(_[x][0]),_[x][1],_[x][2]]):w.push([h(_[x])]);v=w}else v=h(_);return typeof arguments[0]=="string"?v:(arguments[0].text=v,arguments[0])};t.events.push(["preProcessText",y])}(nt.API),nt.API.autoPrint=function(t){var e;return(t=t||{}).variant=t.variant||"non-conform",t.variant==="javascript"?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){e=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+e+" 0 R")})),this},function(t){var e=function(){var n=void 0;Object.defineProperty(this,"pdf",{get:function(){return n},set:function(o){n=o}});var r=150;Object.defineProperty(this,"width",{get:function(){return r},set:function(o){r=isNaN(o)||Number.isInteger(o)===!1||o<0?150:o,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=r+1)}});var i=300;Object.defineProperty(this,"height",{get:function(){return i},set:function(o){i=isNaN(o)||Number.isInteger(o)===!1||o<0?300:o,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=i+1)}});var s=[];Object.defineProperty(this,"childNodes",{get:function(){return s},set:function(o){s=o}});var a={};Object.defineProperty(this,"style",{get:function(){return a},set:function(o){a=o}}),Object.defineProperty(this,"parentNode",{})};e.prototype.getContext=function(n,r){var i;if((n=n||"2d")!=="2d")return null;for(i in r)this.pdf.context2d.hasOwnProperty(i)&&(this.pdf.context2d[i]=r[i]);return this.pdf.context2d._canvas=this,this.pdf.context2d},e.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},t.events.push(["initialized",function(){this.canvas=new e,this.canvas.pdf=this}])}(nt.API),function(t){var e={left:0,top:0,bottom:0,right:0},n=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},e),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var l=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return l},set:function(v){l=v}});var c=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return c},set:function(v){c=v}});var u=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return u},set:function(v){u=v}});var d=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return d},set:function(v){d=v}});var f=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return f},set:function(v){f=v}});var h=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return h},set:function(v){h=v}});var y=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return y},set:function(v){y=v}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},t.setHeaderFunction=function(l){return r.call(this),this.internal.__cell__.headerFunction=typeof l=="function"?l:void 0,this},t.getTextDimensions=function(l,c){r.call(this);var u=(c=c||{}).fontSize||this.getFontSize(),d=c.font||this.getFont(),f=c.scaleFactor||this.internal.scaleFactor,h=0,y=0,v=0,_=this;if(!Array.isArray(l)&&typeof l!="string"){if(typeof l!="number")throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");l=String(l)}var w=c.maxWidth;w>0?typeof l=="string"?l=this.splitTextToSize(l,w):Object.prototype.toString.call(l)==="[object Array]"&&(l=l.reduce(function(k,N){return k.concat(_.splitTextToSize(N,w))},[])):l=Array.isArray(l)?l:[l];for(var x=0;x<l.length;x++)h<(v=this.getStringUnitWidth(l[x],{font:d})*u)&&(h=v);return h!==0&&(y=l.length),{w:h/=f,h:Math.max((y*u*this.getLineHeightFactor()-u*(this.getLineHeightFactor()-1))/f,0)}},t.cellAddPage=function(){r.call(this),this.addPage();var l=this.internal.__cell__.margins||e;return this.internal.__cell__.lastCell=new s(l.left,l.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var a=t.cell=function(){var l;l=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),r.call(this);var c=this.internal.__cell__.lastCell,u=this.internal.__cell__.padding,d=this.internal.__cell__.margins||e,f=this.internal.__cell__.tableHeaderRow,h=this.internal.__cell__.printHeaders;return c.lineNumber!==void 0&&(c.lineNumber===l.lineNumber?(l.x=(c.x||0)+(c.width||0),l.y=c.y||0):c.y+c.height+l.height+d.bottom>this.getPageHeight()?(this.cellAddPage(),l.y=d.top,h&&f&&(this.printHeaderRow(l.lineNumber,!0),l.y+=f[0].height)):l.y=c.y+c.height||l.y),l.text[0]!==void 0&&(this.rect(l.x,l.y,l.width,l.height,n===!0?"FD":void 0),l.align==="right"?this.text(l.text,l.x+l.width-u,l.y+u,{align:"right",baseline:"top"}):l.align==="center"?this.text(l.text,l.x+l.width/2,l.y+u,{align:"center",baseline:"top",maxWidth:l.width-u-u}):this.text(l.text,l.x+u,l.y+u,{align:"left",baseline:"top",maxWidth:l.width-u-u})),this.internal.__cell__.lastCell=l,this};t.table=function(l,c,u,d,f){if(r.call(this),!u)throw new Error("No data for PDF table.");var h,y,v,_,w=[],x=[],k=[],N={},R={},H=[],F=[],M=(f=f||{}).autoSize||!1,I=f.printHeaders!==!1,G=f.css&&f.css["font-size"]!==void 0?16*f.css["font-size"]:f.fontSize||12,L=f.margins||Object.assign({width:this.getPageWidth()},e),j=typeof f.padding=="number"?f.padding:3,W=f.headerBackgroundColor||"#c8c8c8",z=f.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=I,this.internal.__cell__.margins=L,this.internal.__cell__.table_font_size=G,this.internal.__cell__.padding=j,this.internal.__cell__.headerBackgroundColor=W,this.internal.__cell__.headerTextColor=z,this.setFontSize(G),d==null)x=w=Object.keys(u[0]),k=w.map(function(){return"left"});else if(Array.isArray(d)&&rn(d[0])==="object")for(w=d.map(function(de){return de.name}),x=d.map(function(de){return de.prompt||de.name||""}),k=d.map(function(de){return de.align||"left"}),h=0;h<d.length;h+=1)R[d[h].name]=.7499990551181103*d[h].width;else Array.isArray(d)&&typeof d[0]=="string"&&(x=w=d,k=w.map(function(){return"left"}));if(M||Array.isArray(d)&&typeof d[0]=="string")for(h=0;h<w.length;h+=1){for(N[_=w[h]]=u.map(function(de){return de[_]}),this.setFont(void 0,"bold"),H.push(this.getTextDimensions(x[h],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),y=N[_],this.setFont(void 0,"normal"),v=0;v<y.length;v+=1)H.push(this.getTextDimensions(y[v],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);R[_]=Math.max.apply(null,H)+j+j,H=[]}if(I){var re={};for(h=0;h<w.length;h+=1)re[w[h]]={},re[w[h]].text=x[h],re[w[h]].align=k[h];var ne=o.call(this,re,R);F=w.map(function(de){return new s(l,c,R[de],ne,re[de].text,void 0,re[de].align)}),this.setTableHeaderRow(F),this.printHeaderRow(1,!1)}var oe=d.reduce(function(de,ie){return de[ie.name]=ie.align,de},{});for(h=0;h<u.length;h+=1){"rowStart"in f&&f.rowStart instanceof Function&&f.rowStart({row:h,data:u[h]},this);var U=o.call(this,u[h],R);for(v=0;v<w.length;v+=1){var J=u[h][w[v]];"cellStart"in f&&f.cellStart instanceof Function&&f.cellStart({row:h,col:v,data:J},this),a.call(this,new s(l,c,R[w[v]],U,J,h+2,oe[w[v]]))}}return this.internal.__cell__.table_x=l,this.internal.__cell__.table_y=c,this};var o=function(l,c){var u=this.internal.__cell__.padding,d=this.internal.__cell__.table_font_size,f=this.internal.scaleFactor;return Object.keys(l).map(function(h){var y=l[h];return this.splitTextToSize(y.hasOwnProperty("text")?y.text:y,c[h]-u-u)},this).map(function(h){return this.getLineHeightFactor()*h.length*d/f+u+u},this).reduce(function(h,y){return Math.max(h,y)},0)};t.setTableHeaderRow=function(l){r.call(this),this.internal.__cell__.tableHeaderRow=l},t.printHeaderRow=function(l,c){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var u;if(n=!0,typeof this.internal.__cell__.headerFunction=="function"){var d=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(d[0],d[1],d[2],d[3],void 0,-1)}this.setFont(void 0,"bold");for(var f=[],h=0;h<this.internal.__cell__.tableHeaderRow.length;h+=1){u=this.internal.__cell__.tableHeaderRow[h].clone(),c&&(u.y=this.internal.__cell__.margins.top||0,f.push(u)),u.lineNumber=l;var y=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),a.call(this,u),this.setTextColor(y)}f.length>0&&this.setTableHeaderRow(f),this.setFont(void 0,"normal"),n=!1}}(nt.API);var cL={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},uL=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],gb=lL(uL),dL=[100,200,300,400,500,600,700,800,900],GY=lL(dL);function h2(t){var e=t.family.replace(/"|'/g,"").toLowerCase(),n=function(s){return cL[s=s||"normal"]?s:"normal"}(t.style),r=function(s){return s?typeof s=="number"?s>=100&&s<=900&&s%100==0?s:400:/^\d00$/.test(s)?parseInt(s):s==="bold"?700:400:400}(t.weight),i=function(s){return typeof gb[s=s||"normal"]=="number"?s:"normal"}(t.stretch);return{family:e,style:n,weight:r,stretch:i,src:t.src||[],ref:t.ref||{name:e,style:[i,n,r].join(" ")}}}function MN(t,e,n,r){var i;for(i=n;i>=0&&i<e.length;i+=r)if(t[e[i]])return t[e[i]];for(i=n;i>=0&&i<e.length;i-=r)if(t[e[i]])return t[e[i]]}var KY={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},FN={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function zN(t){return[t.stretch,t.style,t.weight,t.family].join(" ")}function $N(t){return t.trimLeft()}function ZY(t,e){for(var n=0;n<t.length;){if(t.charAt(n)===e)return[t.substring(0,n),t.substring(n+1)];n+=1}return null}function YY(t){var e=t.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return e===null?null:[e[0],t.substring(e[0].length)]}var vg,UN,BN,du,yg,qN,HN,WN,f2=["times"];function VN(t,e,n,r,i){var s=4,a=KN;switch(i){case nt.API.image_compression.FAST:s=1,a=GN;break;case nt.API.image_compression.MEDIUM:s=6,a=ZN;break;case nt.API.image_compression.SLOW:s=9,a=YN}t=function(l,c,u,d){for(var f,h=l.length/c,y=new Uint8Array(l.length+h),v=[JY,GN,KN,ZN,YN],_=0;_<h;_+=1){var w=_*c,x=l.subarray(w,w+c);if(d)y.set(d(x,u,f),w+_);else{for(var k=v.length,N=[],R=0;R<k;R+=1)N[R]=v[R](x,u,f);var H=QY(N.concat());y.set(N[H],w+_)}f=x}return y}(t,e,Math.ceil(n*r/8),a);var o=rb(t,{level:s});return nt.API.__addimage__.arrayBufferToBinaryString(o)}function JY(t){var e=Array.apply([],t);return e.unshift(0),e}function GN(t,e){var n=t.length,r=[];r[0]=1;for(var i=0;i<n;i+=1){var s=t[i-e]||0;r[i+1]=t[i]-s+256&255}return r}function KN(t,e,n){var r=t.length,i=[];i[0]=2;for(var s=0;s<r;s+=1){var a=n&&n[s]||0;i[s+1]=t[s]-a+256&255}return i}function ZN(t,e,n){var r=t.length,i=[];i[0]=3;for(var s=0;s<r;s+=1){var a=t[s-e]||0,o=n&&n[s]||0;i[s+1]=t[s]+256-(a+o>>>1)&255}return i}function YN(t,e,n){var r=t.length,i=[];i[0]=4;for(var s=0;s<r;s+=1){var a=XY(t[s-e]||0,n&&n[s]||0,n&&n[s-e]||0);i[s+1]=t[s]-a+256&255}return i}function XY(t,e,n){if(t===e&&e===n)return t;var r=Math.abs(e-n),i=Math.abs(t-n),s=Math.abs(t+e-n-n);return r<=i&&r<=s?t:i<=s?e:n}function QY(t){var e=t.map(function(n){return n.reduce(function(r,i){return r+Math.abs(i)},0)});return e.indexOf(Math.min.apply(null,e))}function p2(t,e,n){var r=e*n,i=Math.floor(r/8),s=16-(r-8*i+n),a=(1<<n)-1;return hL(t,i)>>s&a}function JN(t,e,n,r){var i=n*r,s=Math.floor(i/8),a=16-(i-8*s+r),o=(1<<r)-1,l=(e&o)<<a;(function(c,u,d){if(u+1<c.byteLength)c.setUint16(u,d,!1);else{var f=d>>8&255;c.setUint8(u,f)}})(t,s,hL(t,s)&~(o<<a)&65535|l)}function hL(t,e){return e+1<t.byteLength?t.getUint16(e,!1):t.getUint8(e)<<8}function eJ(t){var e=0;if(t[e++]!==71||t[e++]!==73||t[e++]!==70||t[e++]!==56||(t[e++]+1&253)!=56||t[e++]!==97)throw new Error("Invalid GIF 87a/89a header.");var n=t[e++]|t[e++]<<8,r=t[e++]|t[e++]<<8,i=t[e++],s=i>>7,a=1<<1+(7&i);t[e++],t[e++];var o=null,l=null;s&&(o=e,l=a,e+=3*a);var c=!0,u=[],d=0,f=null,h=0,y=null;for(this.width=n,this.height=r;c&&e<t.length;)switch(t[e++]){case 33:switch(t[e++]){case 255:if(t[e]!==11||t[e+1]==78&&t[e+2]==69&&t[e+3]==84&&t[e+4]==83&&t[e+5]==67&&t[e+6]==65&&t[e+7]==80&&t[e+8]==69&&t[e+9]==50&&t[e+10]==46&&t[e+11]==48&&t[e+12]==3&&t[e+13]==1&&t[e+16]==0)e+=14,y=t[e++]|t[e++]<<8,e++;else for(e+=12;;){if(!((L=t[e++])>=0))throw Error("Invalid block size");if(L===0)break;e+=L}break;case 249:if(t[e++]!==4||t[e+4]!==0)throw new Error("Invalid graphics extension block.");var v=t[e++];d=t[e++]|t[e++]<<8,f=t[e++],1&v||(f=null),h=v>>2&7,e++;break;case 254:for(;;){if(!((L=t[e++])>=0))throw Error("Invalid block size");if(L===0)break;e+=L}break;default:throw new Error("Unknown graphic control label: 0x"+t[e-1].toString(16))}break;case 44:var _=t[e++]|t[e++]<<8,w=t[e++]|t[e++]<<8,x=t[e++]|t[e++]<<8,k=t[e++]|t[e++]<<8,N=t[e++],R=N>>6&1,H=1<<1+(7&N),F=o,M=l,I=!1;N>>7&&(I=!0,F=e,M=H,e+=3*H);var G=e;for(e++;;){var L;if(!((L=t[e++])>=0))throw Error("Invalid block size");if(L===0)break;e+=L}u.push({x:_,y:w,width:x,height:k,has_local_palette:I,palette_offset:F,palette_size:M,data_offset:G,data_length:e-G,transparent_index:f,interlaced:!!R,delay:d,disposal:h});break;case 59:c=!1;break;default:throw new Error("Unknown gif block: 0x"+t[e-1].toString(16))}this.numFrames=function(){return u.length},this.loopCount=function(){return y},this.frameInfo=function(j){if(j<0||j>=u.length)throw new Error("Frame index out of range.");return u[j]},this.decodeAndBlitFrameBGRA=function(j,W){var z=this.frameInfo(j),re=z.width*z.height,ne=new Uint8Array(re);XN(t,z.data_offset,ne,re);var oe=z.palette_offset,U=z.transparent_index;U===null&&(U=256);var J=z.width,de=n-J,ie=J,C=4*(z.y*n+z.x),q=4*((z.y+z.height)*n+z.x),X=C,Q=4*de;z.interlaced===!0&&(Q+=4*n*7);for(var ee=8,le=0,me=ne.length;le<me;++le){var pe=ne[le];if(ie===0&&(ie=J,(X+=Q)>=q&&(Q=4*de+4*n*(ee-1),X=C+(J+de)*(ee<<1),ee>>=1)),pe===U)X+=4;else{var ge=t[oe+3*pe],Ne=t[oe+3*pe+1],je=t[oe+3*pe+2];W[X++]=je,W[X++]=Ne,W[X++]=ge,W[X++]=255}--ie}},this.decodeAndBlitFrameRGBA=function(j,W){var z=this.frameInfo(j),re=z.width*z.height,ne=new Uint8Array(re);XN(t,z.data_offset,ne,re);var oe=z.palette_offset,U=z.transparent_index;U===null&&(U=256);var J=z.width,de=n-J,ie=J,C=4*(z.y*n+z.x),q=4*((z.y+z.height)*n+z.x),X=C,Q=4*de;z.interlaced===!0&&(Q+=4*n*7);for(var ee=8,le=0,me=ne.length;le<me;++le){var pe=ne[le];if(ie===0&&(ie=J,(X+=Q)>=q&&(Q=4*de+4*n*(ee-1),X=C+(J+de)*(ee<<1),ee>>=1)),pe===U)X+=4;else{var ge=t[oe+3*pe],Ne=t[oe+3*pe+1],je=t[oe+3*pe+2];W[X++]=ge,W[X++]=Ne,W[X++]=je,W[X++]=255}--ie}}}function XN(t,e,n,r){for(var i=t[e++],s=1<<i,a=s+1,o=a+1,l=i+1,c=(1<<l)-1,u=0,d=0,f=0,h=t[e++],y=new Int32Array(4096),v=null;;){for(;u<16&&h!==0;)d|=t[e++]<<u,u+=8,h===1?h=t[e++]:--h;if(u<l)break;var _=d&c;if(d>>=l,u-=l,_!==s){if(_===a)break;for(var w=_<o?_:v,x=0,k=w;k>s;)k=y[k]>>8,++x;var N=k;if(f+x+(w!==_?1:0)>r)return void cn.log("Warning, gif stream longer than expected.");n[f++]=N;var R=f+=x;for(w!==_&&(n[f++]=N),k=w;x--;)k=y[k],n[--R]=255&k,k>>=8;v!==null&&o<4096&&(y[o++]=v<<8|N,o>=c+1&&l<12&&(++l,c=c<<1|1)),v=_}else o=a+1,c=(1<<(l=i+1))-1,v=null}return f!==r&&cn.log("Warning, gif stream shorter than expected."),n}/** 462 * @license 463 Copyright (c) 2008, Adobe Systems Incorporated 464 All rights reserved. 465 466 Redistribution and use in source and binary forms, with or without 467 modification, are permitted provided that the following conditions are 468 met: 469 470 * Redistributions of source code must retain the above copyright notice, 471 this list of conditions and the following disclaimer. 472 473 * Redistributions in binary form must reproduce the above copyright 474 notice, this list of conditions and the following disclaimer in the 475 documentation and/or other materials provided with the distribution. 476 477 * Neither the name of Adobe Systems Incorporated nor the names of its 478 contributors may be used to endorse or promote products derived from 479 this software without specific prior written permission. 480 481 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 482 IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 483 THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 484 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 485 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
vendor: 5,835 bytes, lines 486-492
486 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 487 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 488 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 489 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 490 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 491 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 492*/function m2(t){var e,n,r,i,s,a=Math.floor,o=new Array(64),l=new Array(64),c=new Array(64),u=new Array(64),d=new Array(65535),f=new Array(65535),h=new Array(64),y=new Array(64),v=[],_=0,w=7,x=new Array(64),k=new Array(64),N=new Array(64),R=new Array(256),H=new Array(2048),F=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],M=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],I=[0,1,2,3,4,5,6,7,8,9,10,11],G=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],L=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],j=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],W=[0,1,2,3,4,5,6,7,8,9,10,11],z=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],re=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function ne(C,q){for(var X=0,Q=0,ee=new Array,le=1;le<=16;le++){for(var me=1;me<=C[le];me++)ee[q[Q]]=[],ee[q[Q]][0]=X,ee[q[Q]][1]=le,Q++,X++;X*=2}return ee}function oe(C){for(var q=C[0],X=C[1]-1;X>=0;)q&1<<X&&(_|=1<<w),X--,--w<0&&(_==255?(U(255),U(0)):U(_),w=7,_=0)}function U(C){v.push(C)}function J(C){U(C>>8&255),U(255&C)}function de(C,q,X,Q,ee){for(var le,me=ee[0],pe=ee[240],ge=function(_e,et){var $e,ot,Je,Gt,It,ft,Nt,Dt,Ue,vt,Xe=0;for(Ue=0;Ue<8;++Ue){$e=_e[Xe],ot=_e[Xe+1],Je=_e[Xe+2],Gt=_e[Xe+3],It=_e[Xe+4],ft=_e[Xe+5],Nt=_e[Xe+6];var wn=$e+(Dt=_e[Xe+7]),Ft=$e-Dt,Pt=ot+Nt,kt=ot-Nt,qt=Je+ft,st=Je-ft,ze=Gt+It,Ie=Gt-It,Me=wn+ze,zt=wn-ze,ut=Pt+qt,at=Pt-qt;_e[Xe]=Me+ut,_e[Xe+4]=Me-ut;var Kt=.707106781*(at+zt);_e[Xe+2]=zt+Kt,_e[Xe+6]=zt-Kt;var Al=.382683433*((Me=Ie+st)-(at=kt+Ft)),Nr=.5411961*Me+Al,ya=1.306562965*at+Al,Is=.707106781*(ut=st+kt),ct=Ft+Is,wa=Ft-Is;_e[Xe+5]=wa+Nr,_e[Xe+3]=wa-Nr,_e[Xe+1]=ct+ya,_e[Xe+7]=ct-ya,Xe+=8}for(Xe=0,Ue=0;Ue<8;++Ue){$e=_e[Xe],ot=_e[Xe+8],Je=_e[Xe+16],Gt=_e[Xe+24],It=_e[Xe+32],ft=_e[Xe+40],Nt=_e[Xe+48];var ba=$e+(Dt=_e[Xe+56]),Mi=$e-Dt,Fi=ot+Nt,Cn=ot-Nt,lr=Je+ft,pr=Je-ft,Cl=Gt+It,fo=Gt-It,is=ba+Cl,Ds=ba-Cl,ss=Fi+lr,as=Fi-lr;_e[Xe]=is+ss,_e[Xe+32]=is-ss;var zi=.707106781*(as+Ds);_e[Xe+16]=Ds+zi,_e[Xe+48]=Ds-zi;var Pl=.382683433*((is=fo+pr)-(as=Cn+Mi)),Ms=.5411961*is+Pl,Tl=1.306562965*as+Pl,zc=.707106781*(ss=pr+Cn),$c=Mi+zc,Uc=Mi-zc;_e[Xe+40]=Uc+Ms,_e[Xe+24]=Uc-Ms,_e[Xe+8]=$c+Tl,_e[Xe+56]=$c-Tl,Xe++}for(Ue=0;Ue<64;++Ue)vt=_e[Ue]*et[Ue],h[Ue]=vt>0?vt+.5|0:vt-.5|0;return h}(C,q),Ne=0;Ne<64;++Ne)y[F[Ne]]=ge[Ne];var je=y[0]-X;X=y[0],je==0?oe(Q[0]):(oe(Q[f[le=32767+je]]),oe(d[le]));for(var Re=63;Re>0&&y[Re]==0;)Re--;if(Re==0)return oe(me),X;for(var Ke,V=1;V<=Re;){for(var Te=V;y[V]==0&&V<=Re;)++V;var wt=V-Te;if(wt>=16){Ke=wt>>4;for(var it=1;it<=Ke;++it)oe(pe);wt&=15}le=32767+y[V],oe(ee[(wt<<4)+f[le]]),oe(d[le]),V++}return Re!=63&&oe(me),X}function ie(C){C=Math.min(Math.max(C,1),100),s!=C&&(function(q){for(var X=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],Q=0;Q<64;Q++){var ee=a((X[Q]*q+50)/100);ee=Math.min(Math.max(ee,1),255),o[F[Q]]=ee}for(var le=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],me=0;me<64;me++){var pe=a((le[me]*q+50)/100);pe=Math.min(Math.max(pe,1),255),l[F[me]]=pe}for(var ge=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],Ne=0,je=0;je<8;je++)for(var Re=0;Re<8;Re++)c[Ne]=1/(o[F[Ne]]*ge[je]*ge[Re]*8),u[Ne]=1/(l[F[Ne]]*ge[je]*ge[Re]*8),Ne++}(C<50?Math.floor(5e3/C):Math.floor(200-2*C)),s=C)}this.encode=function(C,q){q&&ie(q),v=new Array,_=0,w=7,J(65496),J(65504),J(16),U(74),U(70),U(73),U(70),U(0),U(1),U(1),U(0),J(1),J(1),U(0),U(0),function(){J(65499),J(132),U(0);for(var ot=0;ot<64;ot++)U(o[ot]);U(1);for(var Je=0;Je<64;Je++)U(l[Je])}(),function(ot,Je){J(65472),J(17),U(8),J(Je),J(ot),U(3),U(1),U(17),U(0),U(2),U(17),U(1),U(3),U(17),U(1)}(C.width,C.height),function(){J(65476),J(418),U(0);for(var ot=0;ot<16;ot++)U(M[ot+1]);for(var Je=0;Je<=11;Je++)U(I[Je]);U(16);for(var Gt=0;Gt<16;Gt++)U(G[Gt+1]);for(var It=0;It<=161;It++)U(L[It]);U(1);for(var ft=0;ft<16;ft++)U(j[ft+1]);for(var Nt=0;Nt<=11;Nt++)U(W[Nt]);U(17);for(var Dt=0;Dt<16;Dt++)U(z[Dt+1]);for(var Ue=0;Ue<=161;Ue++)U(re[Ue])}(),J(65498),J(12),U(3),U(1),U(0),U(2),U(17),U(3),U(17),U(0),U(63),U(0);var X=0,Q=0,ee=0;
vendor: 47,386 bytes, lines 492-498
492_=0,w=7,this.encode.displayName="_encode_";for(var le,me,pe,ge,Ne,je,Re,Ke,V,Te=C.data,wt=C.width,it=C.height,_e=4*wt,et=0;et<it;){for(le=0;le<_e;){for(Ne=_e*et+le,Re=-1,Ke=0,V=0;V<64;V++)je=Ne+(Ke=V>>3)*_e+(Re=4*(7&V)),et+Ke>=it&&(je-=_e*(et+1+Ke-it)),le+Re>=_e&&(je-=le+Re-_e+4),me=Te[je++],pe=Te[je++],ge=Te[je++],x[V]=(H[me]+H[pe+256|0]+H[ge+512|0]>>16)-128,k[V]=(H[me+768|0]+H[pe+1024|0]+H[ge+1280|0]>>16)-128,N[V]=(H[me+1280|0]+H[pe+1536|0]+H[ge+1792|0]>>16)-128;X=de(x,c,X,e,r),Q=de(k,u,Q,n,i),ee=de(N,u,ee,n,i),le+=32}et+=8}if(w>=0){var $e=[];$e[1]=w+1,$e[0]=(1<<w+1)-1,oe($e)}return J(65497),new Uint8Array(v)},t=t||50,function(){for(var C=String.fromCharCode,q=0;q<256;q++)R[q]=C(q)}(),e=ne(M,I),n=ne(j,W),r=ne(G,L),i=ne(z,re),function(){for(var C=1,q=2,X=1;X<=15;X++){for(var Q=C;Q<q;Q++)f[32767+Q]=X,d[32767+Q]=[],d[32767+Q][1]=X,d[32767+Q][0]=Q;for(var ee=-(q-1);ee<=-C;ee++)f[32767+ee]=X,d[32767+ee]=[],d[32767+ee][1]=X,d[32767+ee][0]=q-1+ee;C<<=1,q<<=1}}(),function(){for(var C=0;C<256;C++)H[C]=19595*C,H[C+256|0]=38470*C,H[C+512|0]=7471*C+32768,H[C+768|0]=-11059*C,H[C+1024|0]=-21709*C,H[C+1280|0]=32768*C+8421375,H[C+1536|0]=-27439*C,H[C+1792|0]=-5329*C}(),ie(t)}/** 493 * @license 494 * Copyright (c) 2017 Aras Abbasi 495 * 496 * Licensed under the MIT License. 497 * http://opensource.org/licenses/mit-license 498 */function ps(t,e){if(this.pos=0,this.buffer=t,this.datav=new DataView(t.buffer),this.is_with_alpha=!!e,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,["BM","BA","CI","CP","IC","PT"].indexOf(this.flag)===-1)throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function QN(t){function e(I){if(!I)throw Error("assert :P")}function n(I,G,L){for(var j=0;4>j;j++)if(I[G+j]!=L.charCodeAt(j))return!0;return!1}function r(I,G,L,j,W){for(var z=0;z<W;z++)I[G+z]=L[j+z]}function i(I,G,L,j){for(var W=0;W<j;W++)I[G+W]=L}function s(I){return new Int32Array(I)}function a(I,G){for(var L=[],j=0;j<I;j++)L.push(new G);return L}function o(I,G){var L=[];return function j(W,z,re){for(var ne=re[z],oe=0;oe<ne&&(W.push(re.length>z+1?[]:new G),!(re.length<z+1));oe++)j(W[oe],z+1,re)}(L,0,I),L}var l=function(){var I=this;function G(p,g){for(var S=1<<g-1>>>0;p&S;)S>>>=1;return S?(p&S-1)+S:p}function L(p,g,S,A,T){e(!(A%S));do p[g+(A-=S)]=T;while(0<A)}function j(p,g,S,A,T){if(e(2328>=T),512>=T)var O=s(512);else if((O=s(T))==null)return 0;return function(D,$,B,K,se,fe){var Z,ae,ue=$,ve=1<<B,he=s(16),we=s(16);for(e(se!=0),e(K!=null),e(D!=null),e(0<B),ae=0;ae<se;++ae){if(15<K[ae])return 0;++he[K[ae]]}if(he[0]==se)return 0;for(we[1]=0,Z=1;15>Z;++Z){if(he[Z]>1<<Z)return 0;we[Z+1]=we[Z]+he[Z]}for(ae=0;ae<se;++ae)Z=K[ae],0<K[ae]&&(fe[we[Z]++]=ae);if(we[15]==1)return(K=new W).g=0,K.value=fe[0],L(D,ue,1,ve,K),ve;var xe,Ae=-1,Ee=ve-1,tt=0,He=1,Tt=1,Ze=1<<B;for(ae=0,Z=1,se=2;Z<=B;++Z,se<<=1){if(He+=Tt<<=1,0>(Tt-=he[Z]))return 0;for(;0<he[Z];--he[Z])(K=new W).g=Z,K.value=fe[ae++],L(D,ue+tt,se,Ze,K),tt=G(tt,Z)}for(Z=B+1,se=2;15>=Z;++Z,se<<=1){if(He+=Tt<<=1,0>(Tt-=he[Z]))return 0;for(;0<he[Z];--he[Z]){if(K=new W,(tt&Ee)!=Ae){for(ue+=Ze,xe=1<<(Ae=Z)-B;15>Ae&&!(0>=(xe-=he[Ae]));)++Ae,xe<<=1;ve+=Ze=1<<(xe=Ae-B),D[$+(Ae=tt&Ee)].g=xe+B,D[$+Ae].value=ue-$-Ae}K.g=Z-B,K.value=fe[ae++],L(D,ue+(tt>>B),se,Ze,K),tt=G(tt,Z)}}return He!=2*we[15]-1?0:ve}(p,g,S,A,T,O)}function W(){this.value=this.g=0}function z(){this.value=this.g=0}function re(){this.G=a(5,W),this.H=s(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=a(Ul,z)}function ne(p,g,S,A){e(p!=null),e(g!=null),e(2147483648>A),p.Ca=254,p.I=0,p.b=-8,p.Ka=0,p.oa=g,p.pa=S,p.Jd=g,p.Yc=S+A,p.Zc=4<=A?S+A-4+1:S,me(p)}function oe(p,g){for(var S=0;0<g--;)S|=ge(p,128)<<g;return S}function U(p,g){var S=oe(p,g);return pe(p)?-S:S}function J(p,g,S,A){var T,O=0;for(e(p!=null),e(g!=null),e(4294967288>A),p.Sb=A,p.Ra=0,p.u=0,p.h=0,4<A&&(A=4),T=0;T<A;++T)O+=g[S+T]<<8*T;p.Ra=O,p.bb=A,p.oa=g,p.pa=S}function de(p){for(;8<=p.u&&p.bb<p.Sb;)p.Ra>>>=8,p.Ra+=p.oa[p.pa+p.bb]<<vo-8>>>0,++p.bb,p.u-=8;Q(p)&&(p.h=1,p.u=0)}function ie(p,g){if(e(0<=g),!p.h&&g<=pi){var S=X(p)&fi[g];return p.u+=g,de(p),S}return p.h=1,p.u=0}function C(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function q(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function X(p){return p.Ra>>>(p.u&vo-1)>>>0}function Q(p){return e(p.bb<=p.Sb),p.h||p.bb==p.Sb&&p.u>vo}function ee(p,g){p.u=g,p.h=Q(p)}function le(p){p.u>=Ra&&(e(p.u>=Ra),de(p))}function me(p){e(p!=null&&p.oa!=null),p.pa<p.Zc?(p.I=(p.oa[p.pa++]|p.I<<8)>>>0,p.b+=8):(e(p!=null&&p.oa!=null),p.pa<p.Yc?(p.b+=8,p.I=p.oa[p.pa++]|p.I<<8):p.Ka?p.b=0:(p.I<<=8,p.b+=8,p.Ka=1))}function pe(p){return oe(p,1)}function ge(p,g){var S=p.Ca;0>p.b&&me(p);var A=p.b,T=S*g>>>8,O=(p.I>>>A>T)+0;for(O?(S-=T,p.I-=T+1<<A>>>0):S=T+1,A=S,T=0;256<=A;)T+=8,A>>=8;return A=7^T+yo[A],p.b-=A,p.Ca=(S<<A)-1,O}function Ne(p,g,S){p[g+0]=S>>24&255,p[g+1]=S>>16&255,p[g+2]=S>>8&255,p[g+3]=255&S}function je(p,g){return p[g+0]|p[g+1]<<8}function Re(p,g){return je(p,g)|p[g+2]<<16}function Ke(p,g){return je(p,g)|je(p,g+2)<<16}function V(p,g){var S=1<<g;return e(p!=null),e(0<g),p.X=s(S),p.X==null?0:(p.Mb=32-g,p.Xa=g,1)}function Te(p,g){e(p!=null),e(g!=null),e(p.Xa==g.Xa),r(g.X,0,p.X,0,1<<g.Xa)}function wt(){this.X=[],this.Xa=this.Mb=0}function it(p,g,S,A){e(S!=null),e(A!=null);var T=S[0],O=A[0];return T==0&&(T=(p*O+g/2)/g),O==0&&(O=(g*T+p/2)/p),0>=T||0>=O?0:(S[0]=T,A[0]=O,1)}function _e(p,g){return p+(1<<g)-1>>>g}function et(p,g){return((4278255360&p)+(4278255360&g)>>>0&4278255360)+((16711935&p)+(16711935&g)>>>0&16711935)>>>0}function $e(p,g){I[g]=function(S,A,T,O,D,$,B){var K;for(K=0;K<D;++K){var se=I[p]($[B+K-1],T,O+K);$[B+K]=et(S[A+K],se)}}}function ot(){this.ud=this.hd=this.jd=0}function Je(p,g){return((4278124286&(p^g))>>>1)+(p&g)>>>0}function Gt(p){return 0<=p&&256>p?p:0>p?0:255<p?255:void 0}function It(p,g){return Gt(p+(p-g+.5>>1))}function ft(p,g,S){return Math.abs(g-S)-Math.abs(p-S)}function Nt(p,g,S,A,T,O,D){for(A=O[D-1],S=0;S<T;++S)O[D+S]=A=et(p[g+S],A)}function Dt(p,g,S,A,T){var O;for(O=0;O<S;++O){var D=p[g+O],$=D>>8&255,B=16711935&(B=(B=16711935&D)+(($<<16)+$));A[T+O]=(4278255360&D)+B>>>0}}function Ue(p,g){g.jd=255&p,g.hd=p>>8&255,g.ud=p>>16&255}function vt(p,g,S,A,T,O){var D;for(D=0;D<A;++D){var $=g[S+D],B=$>>>8,K=$,se=255&(se=(se=$>>>16)+((p.jd<<24>>24)*(B<<24>>24)>>>5));K=255&(K=(K+=(p.hd<<24>>24)*(B<<24>>24)>>>5)+((p.ud<<24>>24)*(se<<24>>24)>>>5)),T[O+D]=(4278255360&$)+(se<<16)+K}}function Xe(p,g,S,A,T){I[g]=function(O,D,$,B,K,se,fe,Z,ae){for(B=fe;B<Z;++B)for(fe=0;fe<ae;++fe)K[se++]=T($[A(O[D++])])},I[p]=function(O,D,$,B,K,se,fe){var Z=8>>O.b,ae=O.Ea,ue=O.K[0],ve=O.w;if(8>Z)for(O=(1<<O.b)-1,ve=(1<<Z)-1;D<$;++D){var he,we=0;for(he=0;he<ae;++he)he&O||(we=A(B[K++])),se[fe++]=T(ue[we&ve]),we>>=Z}else I["VP8LMapColor"+S](B,K,ue,ve,se,fe,D,$,ae)}}function wn(p,g,S,A,T){for(S=g+S;g<S;){var O=p[g++];A[T++]=O>>16&255,A[T++]=O>>8&255,A[T++]=255&O}}function Ft(p,g,S,A,T){for(S=g+S;g<S;){var O=p[g++];A[T++]=O>>16&255,A[T++]=O>>8&255,A[T++]=255&O,A[T++]=O>>24&255}}function Pt(p,g,S,A,T){for(S=g+S;g<S;){var O=(D=p[g++])>>16&240|D>>12&15,D=240&D|D>>28&15;A[T++]=O,A[T++]=D}}function kt(p,g,S,A,T){for(S=g+S;g<S;){var O=(D=p[g++])>>16&248|D>>13&7,D=D>>5&224|D>>3&31;A[T++]=O,A[T++]=D}}function qt(p,g,S,A,T){for(S=g+S;g<S;){var O=p[g++];A[T++]=255&O,A[T++]=O>>8&255,A[T++]=O>>16&255}}function st(p,g,S,A,T,O){if(O==0)for(S=g+S;g<S;)Ne(A,((O=p[g++])[0]>>24|O[1]>>8&65280|O[2]<<8&16711680|O[3]<<24)>>>0),T+=32;else r(A,T,p,g,S)}function ze(p,g){I[g][0]=I[p+"0"],I[g][1]=I[p+"1"],I[g][2]=I[p+"2"],I[g][3]=I[p+"3"],I[g][4]=I[p+"4"],I[g][5]=I[p+"5"],I[g][6]=I[p+"6"],I[g][7]=I[p+"7"],I[g][8]=I[p+"8"],I[g][9]=I[p+"9"],I[g][10]=I[p+"10"],I[g][11]=I[p+"11"],I[g][12]=I[p+"12"],I[g][13]=I[p+"13"],I[g][14]=I[p+"0"],I[g][15]=I[p+"0"]}function Ie(p){return p==A1||p==C1||p==um||p==P1}function Me(){this.eb=[],this.size=this.A=this.fb=0}function zt(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ut(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new Me,this.f.kb=new zt,this.sd=null}function at(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function Kt(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function Al(p){return alert("todo:WebPSamplerProcessPlane"),p.T}function Nr(p,g){var S=p.T,A=g.ba.f.RGBA,T=A.eb,O=A.fb+p.ka*A.A,D=Wi[g.ba.S],$=p.y,B=p.O,K=p.f,se=p.N,fe=p.ea,Z=p.W,ae=g.cc,ue=g.dc,ve=g.Mc,he=g.Nc,we=p.ka,xe=p.ka+p.T,Ae=p.U,Ee=Ae+1>>1;for(we==0?D($,B,null,null,K,se,fe,Z,K,se,fe,Z,T,O,null,null,Ae):(D(g.ec,g.fc,$,B,ae,ue,ve,he,K,se,fe,Z,T,O-A.A,T,O,Ae),++S);we+2<xe;we+=2)ae=K,ue=se,ve=fe,he=Z,se+=p.Rc,Z+=p.Rc,O+=2*A.A,D($,(B+=2*p.fa)-p.fa,$,B,ae,ue,ve,he,K,se,fe,Z,T,O-A.A,T,O,Ae);return B+=p.fa,p.j+xe<p.o?(r(g.ec,g.fc,$,B,Ae),r(g.cc,g.dc,K,se,Ee),r(g.Mc,g.Nc,fe,Z,Ee),S--):1&xe||D($,B,null,null,K,se,fe,Z,K,se,fe,Z,T,O+A.A,null,null,Ae),S}function ya(p,g,S){var A=p.F,T=[p.J];if(A!=null){var O=p.U,D=g.ba.S,$=D==cm||D==um;g=g.ba.f.RGBA;var B=[0],K=p.ka;B[0]=p.T,p.Kb&&(K==0?--B[0]:(--K,T[0]-=p.width),p.j+p.ka+p.T==p.o&&(B[0]=p.o-p.j-K));var se=g.eb;K=g.fb+K*g.A,p=U5(A,T[0],p.width,O,B,se,K+($?0:3),g.A),e(S==B),p&&Ie(D)&&dh(se,K,$,O,B,g.A)}return 0}function Is(p){var g=p.ma,S=g.ba.S,A=11>S,T=S==om||S==lm||S==cm||S==N1||S==12||Ie(S);if(g.memory=null,g.Ib=null,g.Jb=null,g.Nd=null,!rh(g.Oa,p,T?11:12))return 0;if(T&&Ie(S)&&eh(),p.da)alert("todo:use_scaling");else{if(A){if(g.Ib=Al,p.Kb){if(S=p.U+1>>1,g.memory=s(p.U+2*S),g.memory==null)return 0;g.ec=g.memory,g.fc=0,g.cc=g.ec,g.dc=g.fc+p.U,g.Mc=g.cc,g.Nc=g.dc+S,g.Ib=Nr,eh()}}else alert("todo:EmitYUV");T&&(g.Jb=ya,A&&ls())}if(A&&!i_){for(p=0;256>p;++p)uO[p]=89858*(p-128)+hm>>dm,fO[p]=-22014*(p-128)+hm,hO[p]=-45773*(p-128),dO[p]=113618*(p-128)+hm>>dm;for(p=fh;p<L1;++p)g=76283*(p-16)+hm>>dm,pO[p-fh]=Fs(g,255),mO[p-fh]=Fs(g+8>>4,15);i_=1}return 1}function ct(p){var g=p.ma,S=p.U,A=p.T;return e(!(1&p.ka)),0>=S||0>=A?0:(S=g.Ib(p,g),g.Jb!=null&&g.Jb(p,g,S),g.Dc+=S,1)}function wa(p){p.ma.memory=null}function ba(p,g,S,A){return ie(p,8)!=47?0:(g[0]=ie(p,14)+1,S[0]=ie(p,14)+1,A[0]=ie(p,1),ie(p,3)!=0?0:!p.h)}function Mi(p,g){if(4>p)return p+1;var S=p-2>>1;return(2+(1&p)<<S)+ie(g,S)+1}function Fi(p,g){return 120<g?g-120:1<=(S=((S=Yj[g-1])>>4)*p+(8-(15&S)))?S:1;var S}function Cn(p,g,S){var A=X(S),T=p[g+=255&A].g-8;return 0<T&&(ee(S,S.u+8),A=X(S),g+=p[g].value,g+=A&(1<<T)-1),ee(S,S.u+p[g].g),p[g].value}function lr(p,g,S){return S.g+=p.g,S.value+=p.value<<g>>>0,e(8>=S.g),p.g}function pr(p,g,S){var A=p.xc;return e((g=A==0?0:p.vc[p.md*(S>>A)+(g>>A)])<p.Wb),p.Ya[g]}function Cl(p,g,S,A){var T=p.ab,O=p.c*g,D=p.C;g=D+g;var $=S,B=A;for(A=p.Ta,S=p.Ua;0<T--;){var K=p.gc[T],se=D,fe=g,Z=$,ae=B,ue=(B=A,$=S,K.Ea);switch(e(se<fe),e(fe<=K.nc),K.hc){case 2:In(Z,ae,(fe-se)*ue,B,$);break;case 0:var ve=se,he=fe,we=B,xe=$,Ae=(Ze=K).Ea;ve==0&&(sh(Z,ae,null,null,1,we,xe),Nt(Z,ae+1,0,0,Ae-1,we,xe+1),ae+=Ae,xe+=Ae,++ve);for(var Ee=1<<Ze.b,tt=Ee-1,He=_e(Ae,Ze.b),Tt=Ze.K,Ze=Ze.w+(ve>>Ze.b)*He;ve<he;){var $t=Tt,nr=Ze,Rt=1;for(Zc(Z,ae,we,xe-Ae,1,we,xe);Rt<Ae;){var Ye=(Rt&~tt)+Ee;Ye>Ae&&(Ye=Ae),(0,oh[$t[nr++]>>8&15])(Z,ae+ +Rt,we,xe+Rt-Ae,Ye-Rt,we,xe+Rt),Rt=Ye}ae+=Ae,xe+=Ae,++ve&tt||(Ze+=He)}fe!=K.nc&&r(B,$-ue,B,$+(fe-se-1)*ue,ue);break;case 1:for(ue=Z,he=ae,Ae=(Z=K.Ea)-(xe=Z&~(we=(ae=1<<K.b)-1)),ve=_e(Z,K.b),Ee=K.K,K=K.w+(se>>K.b)*ve;se<fe;){for(tt=Ee,He=K,Tt=new ot,Ze=he+xe,$t=he+Z;he<Ze;)Ue(tt[He++],Tt),lh(Tt,ue,he,ae,B,$),he+=ae,$+=ae;he<$t&&(Ue(tt[He++],Tt),lh(Tt,ue,he,Ae,B,$),he+=Ae,$+=Ae),++se&we||(K+=ve)}break;case 3:if(Z==B&&ae==$&&0<K.b){for(he=B,Z=ue=$+(fe-se)*ue-(xe=(fe-se)*_e(K.Ea,K.b)),ae=B,we=$,ve=[],xe=(Ae=xe)-1;0<=xe;--xe)ve[xe]=ae[we+xe];for(xe=Ae-1;0<=xe;--xe)he[Z+xe]=ve[xe];rm(K,se,fe,B,ue,B,$)}else rm(K,se,fe,Z,ae,B,$)}$=A,B=S}B!=S&&r(A,S,$,B,O)}function fo(p,g){var S=p.V,A=p.Ba+p.c*p.C,T=g-p.C;if(e(g<=p.l.o),e(16>=T),0<T){var O=p.l,D=p.Ta,$=p.Ua,B=O.width;if(Cl(p,T,S,A),T=$=[$],e((S=p.C)<(A=g)),e(O.v<O.va),A>O.o&&(A=O.o),S<O.j){var K=O.j-S;S=O.j,T[0]+=K*B}if(S>=A?S=0:(T[0]+=4*O.v,O.ka=S-O.j,O.U=O.va-O.v,O.T=A-S,S=1),S){if($=$[0],11>(S=p.ca).S){var se=S.f.RGBA,fe=(A=S.S,T=O.U,O=O.T,K=se.eb,se.A),Z=O;for(se=se.fb+p.Ma*se.A;0<Z--;){var ae=D,ue=$,ve=T,he=K,we=se;switch(A){case am:ch(ae,ue,ve,he,we);break;case om:wo(ae,ue,ve,he,we);break;case A1:wo(ae,ue,ve,he,we),dh(he,we,0,ve,1,0);break;case K5:Bl(ae,ue,ve,he,we);break;case lm:st(ae,ue,ve,he,we,1);break;case C1:st(ae,ue,ve,he,we,1),dh(he,we,0,ve,1,0);break;case cm:st(ae,ue,ve,he,we,0);break;case um:st(ae,ue,ve,he,we,0),dh(he,we,1,ve,1,0);break;case N1:bo(ae,ue,ve,he,we);break;case P1:bo(ae,ue,ve,he,we),$5(he,we,ve,1,0);break;case Z5:xo(ae,ue,ve,he,we);break;default:e(0)}$+=B,se+=fe}p.Ma+=O}else alert("todo:EmitRescaledRowsYUVA");e(p.Ma<=S.height)}}p.C=g,e(p.C<=p.i)}function is(p){var g;if(0<p.ua)return 0;for(g=0;g<p.Wb;++g){var S=p.Ya[g].G,A=p.Ya[g].H;if(0<S[1][A[1]+0].g||0<S[2][A[2]+0].g||0<S[3][A[3]+0].g)return 0}return 1}function Ds(p,g,S,A,T,O){if(p.Z!=0){var D=p.qd,$=p.rd;for(e(ko[p.Z]!=null);g<S;++g)ko[p.Z](D,$,A,T,A,T,O),D=A,$=T,T+=O;p.qd=D,p.rd=$}}function ss(p,g){var S=p.l.ma,A=S.Z==0||S.Z==1?p.l.j:p.C;if(A=p.C<A?A:p.C,e(g<=p.l.o),g>A){var T=p.l.width,O=S.ca,D=S.tb+T*A,$=p.V,B=p.Ba+p.c*A,K=p.gc;e(p.ab==1),e(K[0].hc==3),Bs(K[0],A,g,$,B,O,D),Ds(S,A,g,O,D,T)}p.C=p.Ma=g}function as(p,g,S,A,T,O,D){var $=p.$/A,B=p.$%A,K=p.m,se=p.s,fe=S+p.$,Z=fe;T=S+A*T;var ae=S+A*O,ue=280+se.ua,ve=p.Pb?$:16777216,he=0<se.ua?se.Wa:null,we=se.wc,xe=fe<ae?pr(se,B,$):null;e(p.C<O),e(ae<=T);var Ae=!1;e:for(;;){for(;Ae||fe<ae;){var Ee=0;if($>=ve){var tt=fe-S;e((ve=p).Pb),ve.wd=ve.m,ve.xd=tt,0<ve.s.ua&&Te(ve.s.Wa,ve.s.vb),ve=$+Xj}if(B&we||(xe=pr(se,B,$)),e(xe!=null),xe.Qb&&(g[fe]=xe.qb,Ae=!0),!Ae)if(le(K),xe.jc){Ee=K,tt=g;var He=fe,Tt=xe.pd[X(Ee)&Ul-1];e(xe.jc),256>Tt.g?(ee(Ee,Ee.u+Tt.g),tt[He]=Tt.value,Ee=0):(ee(Ee,Ee.u+Tt.g-256),e(256<=Tt.value),Ee=Tt.value),Ee==0&&(Ae=!0)}else Ee=Cn(xe.G[0],xe.H[0],K);if(K.h)break;if(Ae||256>Ee){if(!Ae)if(xe.nd)g[fe]=(xe.qb|Ee<<8)>>>0;else{if(le(K),Ae=Cn(xe.G[1],xe.H[1],K),le(K),tt=Cn(xe.G[2],xe.H[2],K),He=Cn(xe.G[3],xe.H[3],K),K.h)break;g[fe]=(He<<24|Ae<<16|Ee<<8|tt)>>>0}if(Ae=!1,++fe,++B>=A&&(B=0,++$,D!=null&&$<=O&&!($%16)&&D(p,$),he!=null))for(;Z<fe;)Ee=g[Z++],he.X[(506832829*Ee&4294967295)>>>he.Mb]=Ee}else if(280>Ee){if(Ee=Mi(Ee-256,K),tt=Cn(xe.G[4],xe.H[4],K),le(K),tt=Fi(A,tt=Mi(tt,K)),K.h)break;if(fe-S<tt||T-fe<Ee)break e;for(He=0;He<Ee;++He)g[fe+He]=g[fe+He-tt];for(fe+=Ee,B+=Ee;B>=A;)B-=A,++$,D!=null&&$<=O&&!($%16)&&D(p,$);if(e(fe<=T),B&we&&(xe=pr(se,B,$)),he!=null)for(;Z<fe;)Ee=g[Z++],he.X[(506832829*Ee&4294967295)>>>he.Mb]=Ee}else{if(!(Ee<ue))break e;for(Ae=Ee-280,e(he!=null);Z<fe;)Ee=g[Z++],he.X[(506832829*Ee&4294967295)>>>he.Mb]=Ee;Ee=fe,e(!(Ae>>>(tt=he).Xa)),g[Ee]=tt.X[Ae],Ae=!0}Ae||e(K.h==Q(K))}if(p.Pb&&K.h&&fe<T)e(p.m.h),p.a=5,p.m=p.wd,p.$=p.xd,0<p.s.ua&&Te(p.s.vb,p.s.Wa);else{if(K.h)break e;D!=null&&D(p,$>O?O:$),p.a=0,p.$=fe-S}return 1}return p.a=3,0}function zi(p){e(p!=null),p.vc=null,p.yc=null,p.Ya=null;var g=p.Wa;g!=null&&(g.X=null),p.vb=null,e(p!=null)}function Pl(){var p=new gt;return p==null?null:(p.a=0,p.xb=X5,ze("Predictor","VP8LPredictors"),ze("Predictor","VP8LPredictors_C"),ze("PredictorAdd","VP8LPredictorsAdd"),ze("PredictorAdd","VP8LPredictorsAdd_C"),In=Dt,lh=vt,ch=wn,wo=Ft,bo=Pt,xo=kt,Bl=qt,I.VP8LMapColor32b=Us,I.VP8LMapColor8b=ah,p)}function Ms(p,g,S,A,T){var O=1,D=[p],$=[g],B=A.m,K=A.s,se=null,fe=0;e:for(;;){if(S)for(;O&&ie(B,1);){var Z=D,ae=$,ue=A,ve=1,he=ue.m,we=ue.gc[ue.ab],xe=ie(he,2);if(ue.Oc&1<<xe)O=0;else{switch(ue.Oc|=1<<xe,we.hc=xe,we.Ea=Z[0],we.nc=ae[0],we.K=[null],++ue.ab,e(4>=ue.ab),xe){case 0:case 1:we.b=ie(he,3)+2,ve=Ms(_e(we.Ea,we.b),_e(we.nc,we.b),0,ue,we.K),we.K=we.K[0];break;case 3:var Ae,Ee=ie(he,8)+1,tt=16<Ee?0:4<Ee?1:2<Ee?2:3;if(Z[0]=_e(we.Ea,tt),we.b=tt,Ae=ve=Ms(Ee,1,0,ue,we.K)){var He,Tt=Ee,Ze=we,$t=1<<(8>>Ze.b),nr=s($t);if(nr==null)Ae=0;else{var Rt=Ze.K[0],Ye=Ze.w;for(nr[0]=Ze.K[0][0],He=1;He<1*Tt;++He)nr[He]=et(Rt[Ye+He],nr[He-1]);for(;He<4*$t;++He)nr[He]=0;Ze.K[0]=null,Ze.K[0]=nr,Ae=1}}ve=Ae;break;case 2:break;default:e(0)}O=ve}}if(D=D[0],$=$[0],O&&ie(B,1)&&!(O=1<=(fe=ie(B,4))&&11>=fe)){A.a=3;break e}var Le;if(Le=O)t:{var Mn,Et,Ut,pn=A,vr=D,qr=$,Pn=fe,Ar=S,Hr=pn.m,rr=pn.s,Wt=[null],en=1,Tn=0,tn=Jj[Pn];n:for(;;){if(Ar&&ie(Hr,1)){var yr=ie(Hr,3)+2,us=_e(vr,yr),Fn=_e(qr,yr),ri=us*Fn;if(!Ms(us,Fn,0,pn,Wt))break n;for(Wt=Wt[0],rr.xc=yr,Mn=0;Mn<ri;++Mn){var ln=Wt[Mn]>>8&65535;Wt[Mn]=ln,ln>=en&&(en=ln+1)}}if(Hr.h)break n;for(Et=0;5>Et;++Et){var ir=Y5[Et];!Et&&0<Pn&&(ir+=1<<Pn),Tn<ir&&(Tn=ir)}var gi=a(en*tn,W),Wr=en,vi=a(Wr,re);if(vi==null)var yi=null;else e(65536>=Wr),yi=vi;var ii=s(Tn);if(yi==null||ii==null||gi==null){pn.a=1;break n}var wi=gi;for(Mn=Ut=0;Mn<en;++Mn){var dn=yi[Mn],bi=dn.G,ds=dn.H,Hl=0,Oa=1,wr=0;for(Et=0;5>Et;++Et){ir=Y5[Et],bi[Et]=wi,ds[Et]=Ut,!Et&&0<Pn&&(ir+=1<<Pn);i:{var pm,j1=ir,mm=pn,ph=ii,yO=wi,wO=Ut,O1=0,Eo=mm.m,bO=ie(Eo,1);if(i(ph,0,0,j1),bO){var xO=ie(Eo,1)+1,_O=ie(Eo,1),o_=ie(Eo,_O==0?1:8);ph[o_]=1,xO==2&&(ph[o_=ie(Eo,8)]=1);var gm=1}else{var l_=s(19),c_=ie(Eo,4)+4;if(19<c_){mm.a=3;var vm=0;break i}for(pm=0;pm<c_;++pm)l_[Zj[pm]]=ie(Eo,3);var I1=void 0,mh=void 0,u_=mm,SO=l_,ym=j1,d_=ph,D1=0,No=u_.m,h_=8,f_=a(128,W);r:for(;j(f_,0,7,SO,19);){if(ie(No,1)){var kO=2+2*ie(No,3);if((I1=2+ie(No,kO))>ym)break r}else I1=ym;for(mh=0;mh<ym&&I1--;){le(No);var p_=f_[0+(127&X(No))];ee(No,No.u+p_.g);var Jc=p_.value;if(16>Jc)d_[mh++]=Jc,Jc!=0&&(h_=Jc);else{var EO=Jc==16,m_=Jc-16,NO=Gj[m_],g_=ie(No,Vj[m_])+NO;if(mh+g_>ym)break r;for(var AO=EO?h_:0;0<g_--;)d_[mh++]=AO}}D1=1;break r}D1||(u_.a=3),gm=D1}(gm=gm&&!Eo.h)&&(O1=j(yO,wO,8,ph,j1)),gm&&O1!=0?vm=O1:(mm.a=3,vm=0)}if(vm==0)break n;if(Oa&&Kj[Et]==1&&(Oa=wi[Ut].g==0),Hl+=wi[Ut].g,Ut+=vm,3>=Et){var gh,M1=ii[0];for(gh=1;gh<ir;++gh)ii[gh]>M1&&(M1=ii[gh]);wr+=M1}}if(dn.nd=Oa,dn.Qb=0,Oa&&(dn.qb=(bi[3][ds[3]+0].value<<24|bi[1][ds[1]+0].value<<16|bi[2][ds[2]+0].value)>>>0,Hl==0&&256>bi[0][ds[0]+0].value&&(dn.Qb=1,dn.qb+=bi[0][ds[0]+0].value<<8)),dn.jc=!dn.Qb&&6>wr,dn.jc){var wm,Ia=dn;for(wm=0;wm<Ul;++wm){var Ao=wm,Co=Ia.pd[Ao],bm=Ia.G[0][Ia.H[0]+Ao];256<=bm.value?(Co.g=bm.g+256,Co.value=bm.value):(Co.g=0,Co.value=0,Ao>>=lr(bm,8,Co),Ao>>=lr(Ia.G[1][Ia.H[1]+Ao],16,Co),Ao>>=lr(Ia.G[2][Ia.H[2]+Ao],0,Co),lr(Ia.G[3][Ia.H[3]+Ao],24,Co))}}}rr.vc=Wt,rr.Wb=en,rr.Ya=yi,rr.yc=gi,Le=1;break t}Le=0}if(!(O=Le)){A.a=3;break e}if(0<fe){if(K.ua=1<<fe,!V(K.Wa,fe)){A.a=1,O=0;break e}}else K.ua=0;var F1=A,v_=D,CO=$,z1=F1.s,$1=z1.xc;if(F1.c=v_,F1.i=CO,z1.md=_e(v_,$1),z1.wc=$1==0?-1:(1<<$1)-1,S){A.xb=sO;break e}if((se=s(D*$))==null){A.a=1,O=0;break e}O=(O=as(A,se,0,D,$,$,null))&&!B.h;break e}return O?(T!=null?T[0]=se:(e(se==null),e(S)),A.$=0,S||zi(K)):zi(K),O}function Tl(p,g){var S=p.c*p.i,A=S+g+16*g;return e(p.c<=g),p.V=s(A),p.V==null?(p.Ta=null,p.Ua=0,p.a=1,0):(p.Ta=p.V,p.Ua=p.Ba+S+g,1)}function zc(p,g){var S=p.C,A=g-S,T=p.V,O=p.Ba+p.c*S;for(e(g<=p.l.o);0<A;){var D=16<A?16:A,$=p.l.ma,B=p.l.width,K=B*D,se=$.ca,fe=$.tb+B*S,Z=p.Ta,ae=p.Ua;Cl(p,D,T,O),B5(Z,ae,se,fe,K),Ds($,S,S+D,se,fe,B),A-=D,T+=D*p.c,S+=D}e(S==g),p.C=p.Ma=g}function $c(){this.ub=this.yd=this.td=this.Rb=0}function Uc(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function c1(){this.Fb=this.Bb=this.Cb=0,this.Zb=s(4),this.Lb=s(4)}function qd(){this.Yb=function(){var p=[];return function g(S,A,T){for(var O=T[A],D=0;D<O&&(S.push(T.length>A+1?[]:0),!(T.length<A+1));D++)g(S[D],A+1,T)}(p,0,[3,11]),p}()}function zp(){this.jb=s(3),this.Wc=o([4,8],qd),this.Xc=o([4,17],qd)}function $p(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new s(4),this.od=new s(4)}function $i(){this.ld=this.La=this.dd=this.tc=0}function Hd(){this.Na=this.la=0}function Up(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Wd(){this.ad=s(384),this.Za=0,this.Ob=s(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Bp(){this.uc=this.M=this.Nb=0,this.wa=Array(new $i),this.Y=0,this.ya=Array(new Wd),this.aa=0,this.l=new Bc}function qp(){this.y=s(16),this.f=s(8),this.ea=s(8)}function Hp(){this.cb=this.a=0,this.sc="",this.m=new C,this.Od=new $c,this.Kc=new Uc,this.ed=new $p,this.Qa=new c1,this.Ic=this.$c=this.Aa=0,this.D=new Bp,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=a(8,C),this.ia=0,this.pb=a(4,Up),this.Pa=new zp,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new qp),this.Hd=0,this.rb=Array(new Hd),this.sb=0,this.wa=Array(new $i),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Wd),this.L=this.aa=0,this.gd=o([4,2],$i),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function Fs(p,g){return 0>p?0:p>g?g:p}function Bc(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function u1(){var p=new Hp;return p!=null&&(p.a=0,p.sc="OK",p.cb=0,p.Xb=0,hh||(hh=qc)),p}function Wn(p,g,S){return p.a==0&&(p.a=g,p.sc=S,p.cb=0),0}function Wp(p,g,S){return 3<=S&&p[g+0]==157&&p[g+1]==1&&p[g+2]==42}function zs(p,g){if(p==null)return 0;if(p.a=0,p.sc="OK",g==null)return Wn(p,2,"null VP8Io passed to VP8GetHeaders()");var S=g.data,A=g.w,T=g.ha;if(4>T)return Wn(p,7,"Truncated header.");var O=S[A+0]|S[A+1]<<8|S[A+2]<<16,D=p.Od;if(D.Rb=!(1&O),D.td=O>>1&7,D.yd=O>>4&1,D.ub=O>>5,3<D.td)return Wn(p,3,"Incorrect keyframe parameters.");if(!D.yd)return Wn(p,4,"Frame not displayable.");A+=3,T-=3;var $=p.Kc;if(D.Rb){if(7>T)return Wn(p,7,"cannot parse picture header");if(!Wp(S,A,T))return Wn(p,3,"Bad code word");$.c=16383&(S[A+4]<<8|S[A+3]),$.Td=S[A+4]>>6,$.i=16383&(S[A+6]<<8|S[A+5]),$.Ud=S[A+6]>>6,A+=7,T-=7,p.za=$.c+15>>4,p.Ub=$.i+15>>4,g.width=$.c,g.height=$.i,g.Da=0,g.j=0,g.v=0,g.va=g.width,g.o=g.height,g.da=0,g.ib=g.width,g.hb=g.height,g.U=g.width,g.T=g.height,i((O=p.Pa).jb,0,255,O.jb.length),e((O=p.Qa)!=null),O.Cb=0,O.Bb=0,O.Fb=1,i(O.Zb,0,0,O.Zb.length),i(O.Lb,0,0,O.Lb)}if(D.ub>T)return Wn(p,7,"bad partition length");ne(O=p.m,S,A,D.ub),A+=D.ub,T-=D.ub,D.Rb&&($.Ld=pe(O),$.Kd=pe(O)),$=p.Qa;var B,K=p.Pa;if(e(O!=null),e($!=null),$.Cb=pe(O),$.Cb){if($.Bb=pe(O),pe(O)){for($.Fb=pe(O),B=0;4>B;++B)$.Zb[B]=pe(O)?U(O,7):0;for(B=0;4>B;++B)$.Lb[B]=pe(O)?U(O,6):0}if($.Bb)for(B=0;3>B;++B)K.jb[B]=pe(O)?oe(O,8):255}else $.Bb=0;if(O.Ka)return Wn(p,3,"cannot parse segment header");if(($=p.ed).zd=pe(O),$.Tb=oe(O,6),$.wb=oe(O,3),$.Pc=pe(O),$.Pc&&pe(O)){for(K=0;4>K;++K)pe(O)&&($.vd[K]=U(O,6));for(K=0;4>K;++K)pe(O)&&($.od[K]=U(O,6))}if(p.L=$.Tb==0?0:$.zd?1:2,O.Ka)return Wn(p,3,"cannot parse filter header");var se=T;if(T=B=A,A=B+se,$=se,p.Xb=(1<<oe(p.m,2))-1,se<3*(K=p.Xb))S=7;else{for(B+=3*K,$-=3*K,se=0;se<K;++se){var fe=S[T+0]|S[T+1]<<8|S[T+2]<<16;fe>$&&(fe=$),ne(p.Jc[+se],S,B,fe),B+=fe,$-=fe,T+=3}ne(p.Jc[+K],S,B,$),S=B<A?0:5}if(S!=0)return Wn(p,S,"cannot parse partitions");for(S=oe(B=p.m,7),T=pe(B)?U(B,4):0,A=pe(B)?U(B,4):0,$=pe(B)?U(B,4):0,K=pe(B)?U(B,4):0,B=pe(B)?U(B,4):0,se=p.Qa,fe=0;4>fe;++fe){if(se.Cb){var Z=se.Zb[fe];se.Fb||(Z+=S)}else{if(0<fe){p.pb[fe]=p.pb[0];continue}Z=S}var ae=p.pb[fe];ae.Sc[0]=T1[Fs(Z+T,127)],ae.Sc[1]=R1[Fs(Z+0,127)],ae.Eb[0]=2*T1[Fs(Z+A,127)],ae.Eb[1]=101581*R1[Fs(Z+$,127)]>>16,8>ae.Eb[1]&&(ae.Eb[1]=8),ae.Qc[0]=T1[Fs(Z+K,117)],ae.Qc[1]=R1[Fs(Z+B,127)],ae.lc=Z+B}if(!D.Rb)return Wn(p,4,"Not a key frame.");for(pe(O),D=p.Pa,S=0;4>S;++S){for(T=0;8>T;++T)for(A=0;3>A;++A)for($=0;11>$;++$)K=ge(O,rO[S][T][A][$])?oe(O,8):tO[S][T][A][$],D.Wc[S][T].Yb[A][$]=K;for(T=0;17>T;++T)D.Xc[S][T]=D.Wc[S][iO[T]]}return p.kc=pe(O),p.kc&&(p.Bd=oe(O,8)),p.cb=1}function qc(p,g,S,A,T,O,D){var $=g[T].Yb[S];for(S=0;16>T;++T){if(!ge(p,$[S+0]))return T;for(;!ge(p,$[S+1]);)if($=g[++T].Yb[0],S=0,T==16)return 16;var B=g[T+1].Yb;if(ge(p,$[S+2])){var K=p,se=0;if(ge(K,(Z=$)[(fe=S)+3]))if(ge(K,Z[fe+6])){for($=0,fe=2*(se=ge(K,Z[fe+8]))+(Z=ge(K,Z[fe+9+se])),se=0,Z=Qj[fe];Z[$];++$)se+=se+ge(K,Z[$]);se+=3+(8<<fe)}else ge(K,Z[fe+7])?(se=7+2*ge(K,165),se+=ge(K,145)):se=5+ge(K,159);else se=ge(K,Z[fe+4])?3+ge(K,Z[fe+5]):2;$=B[2]}else se=1,$=B[1];B=D+eO[T],0>(K=p).b&&me(K);var fe,Z=K.b,ae=(fe=K.Ca>>1)-(K.I>>Z)>>31;--K.b,K.Ca+=ae,K.Ca|=1,K.I-=(fe+1&ae)<<Z,O[B]=((se^ae)-ae)*A[(0<T)+0]}return 16}function Vp(p){var g=p.rb[p.sb-1];g.la=0,g.Na=0,i(p.zc,0,0,p.zc.length),p.ja=0}function Ui(p,g,S,A,T){T=p[g+S+32*A]+(T>>3),p[g+S+32*A]=-256&T?0>T?0:255:T}function Qn(p,g,S,A,T,O){Ui(p,g,0,S,A+T),Ui(p,g,1,S,A+O),Ui(p,g,2,S,A-O),Ui(p,g,3,S,A-T)}function xa(p){return(20091*p>>16)+p}function Gp(p,g,S,A){var T,O=0,D=s(16);for(T=0;4>T;++T){var $=p[g+0]+p[g+8],B=p[g+0]-p[g+8],K=(35468*p[g+4]>>16)-xa(p[g+12]),se=xa(p[g+4])+(35468*p[g+12]>>16);D[O+0]=$+se,D[O+1]=B+K,D[O+2]=B-K,D[O+3]=$-se,O+=4,g++}for(T=O=0;4>T;++T)$=(p=D[O+0]+4)+D[O+8],B=p-D[O+8],K=(35468*D[O+4]>>16)-xa(D[O+12]),Ui(S,A,0,0,$+(se=xa(D[O+4])+(35468*D[O+12]>>16))),Ui(S,A,1,0,B+K),Ui(S,A,2,0,B-K),Ui(S,A,3,0,$-se),O++,A+=32}function d1(p,g,S,A){var T=p[g+0]+4,O=35468*p[g+4]>>16,D=xa(p[g+4]),$=35468*p[g+1]>>16;Qn(S,A,0,T+D,p=xa(p[g+1]),$),Qn(S,A,1,T+O,p,$),Qn(S,A,2,T-O,p,$),Qn(S,A,3,T-D,p,$)}function h1(p,g,S,A,T){Gp(p,g,S,A),T&&Gp(p,g+16,S,A+4)}function $s(p,g,S,A){ql(p,g+0,S,A,1),ql(p,g+32,S,A+128,1)}function Kp(p,g,S,A){var T;for(p=p[g+0]+4,T=0;4>T;++T)for(g=0;4>g;++g)Ui(S,A,g,T,p)}function Zp(p,g,S,A){p[g+0]&&Xt(p,g+0,S,A),p[g+16]&&Xt(p,g+16,S,A+4),p[g+32]&&Xt(p,g+32,S,A+128),p[g+48]&&Xt(p,g+48,S,A+128+4)}function Hc(p,g,S,A){var T,O=s(16);for(T=0;4>T;++T){var D=p[g+0+T]+p[g+12+T],$=p[g+4+T]+p[g+8+T],B=p[g+4+T]-p[g+8+T],K=p[g+0+T]-p[g+12+T];O[0+T]=D+$,O[8+T]=D-$,O[4+T]=K+B,O[12+T]=K-B}for(T=0;4>T;++T)D=(p=O[0+4*T]+3)+O[3+4*T],$=O[1+4*T]+O[2+4*T],B=O[1+4*T]-O[2+4*T],K=p-O[3+4*T],S[A+0]=D+$>>3,S[A+16]=K+B>>3,S[A+32]=D-$>>3,S[A+48]=K-B>>3,A+=64}function Rl(p,g,S){var A,T=g-32,O=mi,D=255-p[T-1];for(A=0;A<S;++A){var $,B=O,K=D+p[g-1];for($=0;$<S;++$)p[g+$]=B[K+p[T+$]];g+=32}}function f1(p,g){Rl(p,g,4)}function p1(p,g){Rl(p,g,8)}function m1(p,g){Rl(p,g,16)}function Vd(p,g){var S;for(S=0;16>S;++S)r(p,g+32*S,p,g-32,16)}function Yp(p,g){var S;for(S=16;0<S;--S)i(p,g,p[g-1],16),g+=32}function os(p,g,S){var A;for(A=0;16>A;++A)i(g,S+32*A,p,16)}function g1(p,g){var S,A=16;for(S=0;16>S;++S)A+=p[g-1+32*S]+p[g+S-32];os(A>>5,p,g)}function Ll(p,g){var S,A=8;for(S=0;16>S;++S)A+=p[g-1+32*S];os(A>>4,p,g)}function Gd(p,g){var S,A=8;for(S=0;16>S;++S)A+=p[g+S-32];os(A>>4,p,g)}function v1(p,g){os(128,p,g)}function yt(p,g,S){return p+2*g+S+2>>2}function y1(p,g){var S,A=g-32;for(A=new Uint8Array([yt(p[A-1],p[A+0],p[A+1]),yt(p[A+0],p[A+1],p[A+2]),yt(p[A+1],p[A+2],p[A+3]),yt(p[A+2],p[A+3],p[A+4])]),S=0;4>S;++S)r(p,g+32*S,A,0,A.length)}function w1(p,g){var S=p[g-1],A=p[g-1+32],T=p[g-1+64],O=p[g-1+96];Ne(p,g+0,16843009*yt(p[g-1-32],S,A)),Ne(p,g+32,16843009*yt(S,A,T)),Ne(p,g+64,16843009*yt(A,T,O)),Ne(p,g+96,16843009*yt(T,O,O))}function b1(p,g){var S,A=4;for(S=0;4>S;++S)A+=p[g+S-32]+p[g-1+32*S];for(A>>=3,S=0;4>S;++S)i(p,g+32*S,A,4)}function _a(p,g){var S=p[g-1+0],A=p[g-1+32],T=p[g-1+64],O=p[g-1-32],D=p[g+0-32],$=p[g+1-32],B=p[g+2-32],K=p[g+3-32];p[g+0+96]=yt(A,T,p[g-1+96]),p[g+1+96]=p[g+0+64]=yt(S,A,T),p[g+2+96]=p[g+1+64]=p[g+0+32]=yt(O,S,A),p[g+3+96]=p[g+2+64]=p[g+1+32]=p[g+0+0]=yt(D,O,S),p[g+3+64]=p[g+2+32]=p[g+1+0]=yt($,D,O),p[g+3+32]=p[g+2+0]=yt(B,$,D),p[g+3+0]=yt(K,B,$)}function Sa(p,g){var S=p[g+1-32],A=p[g+2-32],T=p[g+3-32],O=p[g+4-32],D=p[g+5-32],$=p[g+6-32],B=p[g+7-32];p[g+0+0]=yt(p[g+0-32],S,A),p[g+1+0]=p[g+0+32]=yt(S,A,T),p[g+2+0]=p[g+1+32]=p[g+0+64]=yt(A,T,O),p[g+3+0]=p[g+2+32]=p[g+1+64]=p[g+0+96]=yt(T,O,D),p[g+3+32]=p[g+2+64]=p[g+1+96]=yt(O,D,$),p[g+3+64]=p[g+2+96]=yt(D,$,B),p[g+3+96]=yt($,B,B)}function x1(p,g){var S=p[g-1+0],A=p[g-1+32],T=p[g-1+64],O=p[g-1-32],D=p[g+0-32],$=p[g+1-32],B=p[g+2-32],K=p[g+3-32];p[g+0+0]=p[g+1+64]=O+D+1>>1,p[g+1+0]=p[g+2+64]=D+$+1>>1,p[g+2+0]=p[g+3+64]=$+B+1>>1,p[g+3+0]=B+K+1>>1,p[g+0+96]=yt(T,A,S),p[g+0+64]=yt(A,S,O),p[g+0+32]=p[g+1+96]=yt(S,O,D),p[g+1+32]=p[g+2+96]=yt(O,D,$),p[g+2+32]=p[g+3+96]=yt(D,$,B),p[g+3+32]=yt($,B,K)}function _1(p,g){var S=p[g+0-32],A=p[g+1-32],T=p[g+2-32],O=p[g+3-32],D=p[g+4-32],$=p[g+5-32],B=p[g+6-32],K=p[g+7-32];p[g+0+0]=S+A+1>>1,p[g+1+0]=p[g+0+64]=A+T+1>>1,p[g+2+0]=p[g+1+64]=T+O+1>>1,p[g+3+0]=p[g+2+64]=O+D+1>>1,p[g+0+32]=yt(S,A,T),p[g+1+32]=p[g+0+96]=yt(A,T,O),p[g+2+32]=p[g+1+96]=yt(T,O,D),p[g+3+32]=p[g+2+96]=yt(O,D,$),p[g+3+64]=yt(D,$,B),p[g+3+96]=yt($,B,K)}function Wc(p,g){var S=p[g-1+0],A=p[g-1+32],T=p[g-1+64],O=p[g-1+96];p[g+0+0]=S+A+1>>1,p[g+2+0]=p[g+0+32]=A+T+1>>1,p[g+2+32]=p[g+0+64]=T+O+1>>1,p[g+1+0]=yt(S,A,T),p[g+3+0]=p[g+1+32]=yt(A,T,O),p[g+3+32]=p[g+1+64]=yt(T,O,O),p[g+3+64]=p[g+2+64]=p[g+0+96]=p[g+1+96]=p[g+2+96]=p[g+3+96]=O}function Kd(p,g){var S=p[g-1+0],A=p[g-1+32],T=p[g-1+64],O=p[g-1+96],D=p[g-1-32],$=p[g+0-32],B=p[g+1-32],K=p[g+2-32];p[g+0+0]=p[g+2+32]=S+D+1>>1,p[g+0+32]=p[g+2+64]=A+S+1>>1,p[g+0+64]=p[g+2+96]=T+A+1>>1,p[g+0+96]=O+T+1>>1,p[g+3+0]=yt($,B,K),p[g+2+0]=yt(D,$,B),p[g+1+0]=p[g+3+32]=yt(S,D,$),p[g+1+32]=p[g+3+64]=yt(A,S,D),p[g+1+64]=p[g+3+96]=yt(T,A,S),p[g+1+96]=yt(O,T,A)}function jl(p,g){var S;for(S=0;8>S;++S)r(p,g+32*S,p,g-32,8)}function S1(p,g){var S;for(S=0;8>S;++S)i(p,g,p[g-1],8),g+=32}function ka(p,g,S){var A;for(A=0;8>A;++A)i(g,S+32*A,p,8)}function k1(p,g){var S,A=8;for(S=0;8>S;++S)A+=p[g+S-32]+p[g-1+32*S];ka(A>>4,p,g)}function Zd(p,g){var S,A=4;for(S=0;8>S;++S)A+=p[g+S-32];ka(A>>3,p,g)}function Yd(p,g){var S,A=4;for(S=0;8>S;++S)A+=p[g-1+32*S];ka(A>>3,p,g)}function Jp(p,g){ka(128,p,g)}function Ea(p,g,S){var A=p[g-S],T=p[g+0],O=3*(T-A)+E1[1020+p[g-2*S]-p[g+S]],D=sm[112+(O+4>>3)];p[g-S]=mi[255+A+sm[112+(O+3>>3)]],p[g+0]=mi[255+T-D]}function Jd(p,g,S,A){var T=p[g+0],O=p[g+S];return Hi[255+p[g-2*S]-p[g-S]]>A||Hi[255+O-T]>A}function Vc(p,g,S,A){return 4*Hi[255+p[g-S]-p[g+0]]+Hi[255+p[g-2*S]-p[g+S]]<=A}function Xd(p,g,S,A,T){var O=p[g-3*S],D=p[g-2*S],$=p[g-S],B=p[g+0],K=p[g+S],se=p[g+2*S],fe=p[g+3*S];return 4*Hi[255+$-B]+Hi[255+D-K]>A?0:Hi[255+p[g-4*S]-O]<=T&&Hi[255+O-D]<=T&&Hi[255+D-$]<=T&&Hi[255+fe-se]<=T&&Hi[255+se-K]<=T&&Hi[255+K-B]<=T}function Ol(p,g,S,A){var T=2*A+1;for(A=0;16>A;++A)Vc(p,g+A,S,T)&&Ea(p,g+A,S)}function Qd(p,g,S,A){var T=2*A+1;for(A=0;16>A;++A)Vc(p,g+A*S,1,T)&&Ea(p,g+A*S,1)}function Xp(p,g,S,A){var T;for(T=3;0<T;--T)Ol(p,g+=4*S,S,A)}function Qp(p,g,S,A){var T;for(T=3;0<T;--T)Qd(p,g+=4,S,A)}function Na(p,g,S,A,T,O,D,$){for(O=2*O+1;0<T--;){if(Xd(p,g,S,O,D))if(Jd(p,g,S,$))Ea(p,g,S);else{var B=p,K=g,se=S,fe=B[K-2*se],Z=B[K-se],ae=B[K+0],ue=B[K+se],ve=B[K+2*se],he=27*(xe=E1[1020+3*(ae-Z)+E1[1020+fe-ue]])+63>>7,we=18*xe+63>>7,xe=9*xe+63>>7;B[K-3*se]=mi[255+B[K-3*se]+xe],B[K-2*se]=mi[255+fe+we],B[K-se]=mi[255+Z+he],B[K+0]=mi[255+ae-he],B[K+se]=mi[255+ue-we],B[K+2*se]=mi[255+ve-xe]}g+=A}}function Aa(p,g,S,A,T,O,D,$){for(O=2*O+1;0<T--;){if(Xd(p,g,S,O,D))if(Jd(p,g,S,$))Ea(p,g,S);else{var B=p,K=g,se=S,fe=B[K-se],Z=B[K+0],ae=B[K+se],ue=sm[112+(4+(ve=3*(Z-fe))>>3)],ve=sm[112+(ve+3>>3)],he=ue+1>>1;B[K-2*se]=mi[255+B[K-2*se]+he],B[K-se]=mi[255+fe+ve],B[K+0]=mi[255+Z-ue],B[K+se]=mi[255+ae-he]}g+=A}}function em(p,g,S,A,T,O){Na(p,g,S,1,16,A,T,O)}function Il(p,g,S,A,T,O){Na(p,g,1,S,16,A,T,O)}function tm(p,g,S,A,T,O){var D;for(D=3;0<D;--D)Aa(p,g+=4*S,S,1,16,A,T,O)}function b(p,g,S,A,T,O){var D;for(D=3;0<D;--D)Aa(p,g+=4,1,S,16,A,T,O)}function P(p,g,S,A,T,O,D,$){Na(p,g,T,1,8,O,D,$),Na(S,A,T,1,8,O,D,$)}function Y(p,g,S,A,T,O,D,$){Na(p,g,1,T,8,O,D,$),Na(S,A,1,T,8,O,D,$)}function te(p,g,S,A,T,O,D,$){Aa(p,g+4*T,T,1,8,O,D,$),Aa(S,A+4*T,T,1,8,O,D,$)}function ce(p,g,S,A,T,O,D,$){Aa(p,g+4,1,T,8,O,D,$),Aa(S,A+4,1,T,8,O,D,$)}function be(){this.ba=new ut,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new Kt,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function ke(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function Ge(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function Qe(){this.ua=0,this.Wa=new wt,this.vb=new wt,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new re,this.yc=new W}function gt(){this.xb=this.a=0,this.l=new Bc,this.ca=new ut,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new q,this.Pb=0,this.wd=new q,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new Qe,this.ab=0,this.gc=a(4,Ge),this.Oc=0}function At(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Bc,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function Ht(p,g,S,A,T,O,D){for(p=p==null?0:p[g+0],g=0;g<D;++g)T[O+g]=p+S[A+g]&255,p=T[O+g]}function _n(p,g,S,A,T,O,D){var $;if(p==null)Ht(null,null,S,A,T,O,D);else for($=0;$<D;++$)T[O+$]=p[g+$]+S[A+$]&255}function Vn(p,g,S,A,T,O,D){if(p==null)Ht(null,null,S,A,T,O,D);else{var $,B=p[g+0],K=B,se=B;for($=0;$<D;++$)K=se+(B=p[g+$])-K,se=S[A+$]+(-256&K?0>K?0:255:K)&255,K=B,T[O+$]=se}}function un(p,g,S,A){var T=g.width,O=g.o;if(e(p!=null&&g!=null),0>S||0>=A||S+A>O)return null;if(!p.Cc){if(p.ga==null){var D;if(p.ga=new At,(D=p.ga==null)||(D=g.width*g.o,e(p.Gb.length==0),p.Gb=s(D),p.Uc=0,p.Gb==null?D=0:(p.mb=p.Gb,p.nb=p.Uc,p.rc=null,D=1),D=!D),!D){D=p.ga;var $=p.Fa,B=p.P,K=p.qc,se=p.mb,fe=p.nb,Z=B+1,ae=K-1,ue=D.l;if(e($!=null&&se!=null&&g!=null),ko[0]=null,ko[1]=Ht,ko[2]=_n,ko[3]=Vn,D.ca=se,D.tb=fe,D.c=g.width,D.i=g.height,e(0<D.c&&0<D.i),1>=K)g=0;else if(D.$a=3&$[B+0],D.Z=$[B+0]>>2&3,D.Lc=$[B+0]>>4&3,B=$[B+0]>>6&3,0>D.$a||1<D.$a||4<=D.Z||1<D.Lc||B)g=0;else if(ue.put=ct,ue.ac=Is,ue.bc=wa,ue.ma=D,ue.width=g.width,ue.height=g.height,ue.Da=g.Da,ue.v=g.v,ue.va=g.va,ue.j=g.j,ue.o=g.o,D.$a)e:{e(D.$a==1),g=Pl();t:for(;;){if(g==null){g=0;break e}if(e(D!=null),D.mc=g,g.c=D.c,g.i=D.i,g.l=D.l,g.l.ma=D,g.l.width=D.c,g.l.height=D.i,g.a=0,J(g.m,$,Z,ae),!Ms(D.c,D.i,1,g,null)||(g.ab==1&&g.gc[0].hc==3&&is(g.s)?(D.ic=1,$=g.c*g.i,g.Ta=null,g.Ua=0,g.V=s($),g.Ba=0,g.V==null?(g.a=1,g=0):g=1):(D.ic=0,g=Tl(g,D.c)),!g))break t;g=1;break e}D.mc=null,g=0}else g=ae>=D.c*D.i;D=!g}if(D)return null;p.ga.Lc!=1?p.Ga=0:A=O-S}e(p.ga!=null),e(S+A<=O);e:{if(g=($=p.ga).c,O=$.l.o,$.$a==0){if(Z=p.rc,ae=p.Vc,ue=p.Fa,B=p.P+1+S*g,K=p.mb,se=p.nb+S*g,e(B<=p.P+p.qc),$.Z!=0)for(e(ko[$.Z]!=null),D=0;D<A;++D)ko[$.Z](Z,ae,ue,B,K,se,g),Z=K,ae=se,se+=g,B+=g;else for(D=0;D<A;++D)r(K,se,ue,B,g),Z=K,ae=se,se+=g,B+=g;p.rc=Z,p.Vc=ae}else{if(e($.mc!=null),g=S+A,e((D=$.mc)!=null),e(g<=D.i),D.C>=g)g=1;else if($.ic||ls(),$.ic){$=D.V,Z=D.Ba,ae=D.c;var ve=D.i,he=(ue=1,B=D.$/ae,K=D.$%ae,se=D.m,fe=D.s,D.$),we=ae*ve,xe=ae*g,Ae=fe.wc,Ee=he<xe?pr(fe,K,B):null;e(he<=we),e(g<=ve),e(is(fe));t:for(;;){for(;!se.h&&he<xe;){if(K&Ae||(Ee=pr(fe,K,B)),e(Ee!=null),le(se),256>(ve=Cn(Ee.G[0],Ee.H[0],se)))$[Z+he]=ve,++he,++K>=ae&&(K=0,++B<=g&&!(B%16)&&ss(D,B));else{if(!(280>ve)){ue=0;break t}ve=Mi(ve-256,se);var tt,He=Cn(Ee.G[4],Ee.H[4],se);if(le(se),!(he>=(He=Fi(ae,He=Mi(He,se)))&&we-he>=ve)){ue=0;break t}for(tt=0;tt<ve;++tt)$[Z+he+tt]=$[Z+he+tt-He];for(he+=ve,K+=ve;K>=ae;)K-=ae,++B<=g&&!(B%16)&&ss(D,B);he<xe&&K&Ae&&(Ee=pr(fe,K,B))}e(se.h==Q(se))}ss(D,B>g?g:B);break t}!ue||se.h&&he<we?(ue=0,D.a=se.h?5:3):D.$=he,g=ue}else g=as(D,D.V,D.Ba,D.c,D.i,g,zc);if(!g){A=0;break e}}S+A>=O&&(p.Cc=1),A=1}if(!A)return null;if(p.Cc&&((A=p.ga)!=null&&(A.mc=null),p.ga=null,0<p.Ga))return alert("todo:WebPDequantizeLevels"),null}return p.nb+S*T}function er(p,g,S,A,T,O){for(;0<T--;){var D,$=p,B=g+(S?1:0),K=p,se=g+(S?0:3);for(D=0;D<A;++D){var fe=K[se+4*D];fe!=255&&(fe*=32897,$[B+4*D+0]=$[B+4*D+0]*fe>>23,$[B+4*D+1]=$[B+4*D+1]*fe>>23,$[B+4*D+2]=$[B+4*D+2]*fe>>23)}g+=O}}function Gn(p,g,S,A,T){for(;0<A--;){var O;for(O=0;O<S;++O){var D=p[g+2*O+0],$=15&(K=p[g+2*O+1]),B=4369*$,K=(240&K|K>>4)*B>>16;p[g+2*O+0]=(240&D|D>>4)*B>>16&240|(15&D|D<<4)*B>>16>>4&15,p[g+2*O+1]=240&K|$}g+=T}}function mr(p,g,S,A,T,O,D,$){var B,K,se=255;for(K=0;K<T;++K){for(B=0;B<A;++B){var fe=p[g+B];O[D+4*B]=fe,se&=fe}g+=S,D+=$}return se!=255}function Ca(p,g,S,A,T){var O;for(O=0;O<T;++O)S[A+O]=p[g+O]>>8}function ls(){dh=er,$5=Gn,U5=mr,B5=Ca}function Pa(p,g,S){I[p]=function(A,T,O,D,$,B,K,se,fe,Z,ae,ue,ve,he,we,xe,Ae){var Ee,tt=Ae-1>>1,He=$[B+0]|K[se+0]<<16,Tt=fe[Z+0]|ae[ue+0]<<16;e(A!=null);var Ze=3*He+Tt+131074>>2;for(g(A[T+0],255&Ze,Ze>>16,ve,he),O!=null&&(Ze=3*Tt+He+131074>>2,g(O[D+0],255&Ze,Ze>>16,we,xe)),Ee=1;Ee<=tt;++Ee){var $t=$[B+Ee]|K[se+Ee]<<16,nr=fe[Z+Ee]|ae[ue+Ee]<<16,Rt=He+$t+Tt+nr+524296,Ye=Rt+2*($t+Tt)>>3;Ze=Ye+He>>1,He=(Rt=Rt+2*(He+nr)>>3)+$t>>1,g(A[T+2*Ee-1],255&Ze,Ze>>16,ve,he+(2*Ee-1)*S),g(A[T+2*Ee-0],255&He,He>>16,ve,he+(2*Ee-0)*S),O!=null&&(Ze=Rt+Tt>>1,He=Ye+nr>>1,g(O[D+2*Ee-1],255&Ze,Ze>>16,we,xe+(2*Ee-1)*S),g(O[D+2*Ee+0],255&He,He>>16,we,xe+(2*Ee+0)*S)),He=$t,Tt=nr}1&Ae||(Ze=3*He+Tt+131074>>2,g(A[T+Ae-1],255&Ze,Ze>>16,ve,he+(Ae-1)*S),O!=null&&(Ze=3*Tt+He+131074>>2,g(O[D+Ae-1],255&Ze,Ze>>16,we,xe+(Ae-1)*S)))}}function eh(){Wi[am]=aO,Wi[om]=Q5,Wi[K5]=oO,Wi[lm]=e_,Wi[cm]=t_,Wi[N1]=n_,Wi[Z5]=lO,Wi[A1]=Q5,Wi[C1]=e_,Wi[um]=t_,Wi[P1]=n_}function Gc(p){return p&~cO?0>p?0:255:p>>r_}function po(p,g){return Gc((19077*p>>8)+(26149*g>>8)-14234)}function Dl(p,g,S){return Gc((19077*p>>8)-(6419*g>>8)-(13320*S>>8)+8708)}function Ml(p,g){return Gc((19077*p>>8)+(33050*g>>8)-17685)}function mo(p,g,S,A,T){A[T+0]=po(p,S),A[T+1]=Dl(p,g,S),A[T+2]=Ml(p,g)}function gr(p,g,S,A,T){A[T+0]=Ml(p,g),A[T+1]=Dl(p,g,S),A[T+2]=po(p,S)}function Fl(p,g,S,A,T){var O=Dl(p,g,S);g=O<<3&224|Ml(p,g)>>3,A[T+0]=248&po(p,S)|O>>5,A[T+1]=g}function zl(p,g,S,A,T){var O=240&Ml(p,g)|15;A[T+0]=240&po(p,S)|Dl(p,g,S)>>4,A[T+1]=O}function th(p,g,S,A,T){A[T+0]=255,mo(p,g,S,A,T+1)}function nh(p,g,S,A,T){gr(p,g,S,A,T),A[T+3]=255}function Br(p,g,S,A,T){mo(p,g,S,A,T),A[T+3]=255}function Ta(p,g,S){I[p]=function(A,T,O,D,$,B,K,se,fe){for(var Z=se+(-2&fe)*S;se!=Z;)g(A[T+0],O[D+0],$[B+0],K,se),g(A[T+1],O[D+0],$[B+0],K,se+S),T+=2,++D,++B,se+=2*S;1&fe&&g(A[T+0],O[D+0],$[B+0],K,se)}}function Kc(p,g,S){return S==0?p==0?g==0?6:5:g==0?4:0:S}function nm(p,g,S,A,T){switch(p>>>30){case 3:ql(g,S,A,T,0);break;case 2:qi(g,S,A,T);break;case 1:Xt(g,S,A,T)}}function Bi(p,g){var S,A,T=g.M,O=g.Nb,D=p.oc,$=p.pc+40,B=p.oc,K=p.pc+584,se=p.oc,fe=p.pc+600;for(S=0;16>S;++S)D[$+32*S-1]=129;for(S=0;8>S;++S)B[K+32*S-1]=129,se[fe+32*S-1]=129;for(0<T?D[$-1-32]=B[K-1-32]=se[fe-1-32]=129:(i(D,$-32-1,127,21),i(B,K-32-1,127,9),i(se,fe-32-1,127,9)),A=0;A<p.za;++A){var Z=g.ya[g.aa+A];if(0<A){for(S=-1;16>S;++S)r(D,$+32*S-4,D,$+32*S+12,4);for(S=-1;8>S;++S)r(B,K+32*S-4,B,K+32*S+4,4),r(se,fe+32*S-4,se,fe+32*S+4,4)}var ae=p.Gd,ue=p.Hd+A,ve=Z.ad,he=Z.Hc;if(0<T&&(r(D,$-32,ae[ue].y,0,16),r(B,K-32,ae[ue].f,0,8),r(se,fe-32,ae[ue].ea,0,8)),Z.Za){var we=D,xe=$-32+16;for(0<T&&(A>=p.za-1?i(we,xe,ae[ue].y[15],4):r(we,xe,ae[ue+1].y,0,4)),S=0;4>S;S++)we[xe+128+S]=we[xe+256+S]=we[xe+384+S]=we[xe+0+S];for(S=0;16>S;++S,he<<=2)we=D,xe=$+s_[S],cs[Z.Ob[S]](we,xe),nm(he,ve,16*+S,we,xe)}else if(we=Kc(A,T,Z.Ob[0]),So[we](D,$),he!=0)for(S=0;16>S;++S,he<<=2)nm(he,ve,16*+S,D,$+s_[S]);for(S=Z.Gc,we=Kc(A,T,Z.Dd),ja[we](B,K),ja[we](se,fe),he=ve,we=B,xe=K,255&(Z=0|S)&&(170&Z?qs(he,256,we,xe):on(he,256,we,xe)),Z=se,he=fe,255&(S>>=8)&&(170&S?qs(ve,320,Z,he):on(ve,320,Z,he)),T<p.Ub-1&&(r(ae[ue].y,0,D,$+480,16),r(ae[ue].f,0,B,K+224,8),r(ae[ue].ea,0,se,fe+224,8)),S=8*O*p.B,ae=p.sa,ue=p.ta+16*A+16*O*p.R,ve=p.qa,Z=p.ra+8*A+S,he=p.Ha,we=p.Ia+8*A+S,S=0;16>S;++S)r(ae,ue+S*p.R,D,$+32*S,16);for(S=0;8>S;++S)r(ve,Z+S*p.B,B,K+32*S,8),r(he,we+S*p.B,se,fe+32*S,8)}}function $l(p,g,S,A,T,O,D,$,B){var K=[0],se=[0],fe=0,Z=B!=null?B.kd:0,ae=B??new ke;if(p==null||12>S)return 7;ae.data=p,ae.w=g,ae.ha=S,g=[g],S=[S],ae.gb=[ae.gb];e:{var ue=g,ve=S,he=ae.gb;if(e(p!=null),e(ve!=null),e(he!=null),he[0]=0,12<=ve[0]&&!n(p,ue[0],"RIFF")){if(n(p,ue[0]+8,"WEBP")){he=3;break e}var we=Ke(p,ue[0]+4);if(12>we||4294967286<we){he=3;break e}if(Z&&we>ve[0]-8){he=7;break e}he[0]=we,ue[0]+=12,ve[0]-=12}he=0}if(he!=0)return he;for(we=0<ae.gb[0],S=S[0];;){e:{var xe=p;ve=g,he=S;var Ae=K,Ee=se,tt=ue=[0];if((Ze=fe=[fe])[0]=0,8>he[0])he=7;else{if(!n(xe,ve[0],"VP8X")){if(Ke(xe,ve[0]+4)!=10){he=3;break e}if(18>he[0]){he=7;break e}var He=Ke(xe,ve[0]+8),Tt=1+Re(xe,ve[0]+12);if(2147483648<=Tt*(xe=1+Re(xe,ve[0]+15))){he=3;break e}tt!=null&&(tt[0]=He),Ae!=null&&(Ae[0]=Tt),Ee!=null&&(Ee[0]=xe),ve[0]+=18,he[0]-=18,Ze[0]=1}he=0}}if(fe=fe[0],ue=ue[0],he!=0)return he;if(ve=!!(2&ue),!we&&fe)return 3;if(O!=null&&(O[0]=!!(16&ue)),D!=null&&(D[0]=ve),$!=null&&($[0]=0),D=K[0],ue=se[0],fe&&ve&&B==null){he=0;break}if(4>S){he=7;break}if(we&&fe||!we&&!fe&&!n(p,g[0],"ALPH")){S=[S],ae.na=[ae.na],ae.P=[ae.P],ae.Sa=[ae.Sa];e:{He=p,he=g,we=S;var Ze=ae.gb;Ae=ae.na,Ee=ae.P,tt=ae.Sa,Tt=22,e(He!=null),e(we!=null),xe=he[0];var $t=we[0];for(e(Ae!=null),e(tt!=null),Ae[0]=null,Ee[0]=null,tt[0]=0;;){if(he[0]=xe,we[0]=$t,8>$t){he=7;break e}var nr=Ke(He,xe+4);if(4294967286<nr){he=3;break e}var Rt=8+nr+1&-2;if(Tt+=Rt,0<Ze&&Tt>Ze){he=3;break e}if(!n(He,xe,"VP8 ")||!n(He,xe,"VP8L")){he=0;break e}if($t[0]<Rt){he=7;break e}n(He,xe,"ALPH")||(Ae[0]=He,Ee[0]=xe+8,tt[0]=nr),xe+=Rt,$t-=Rt}}if(S=S[0],ae.na=ae.na[0],ae.P=ae.P[0],ae.Sa=ae.Sa[0],he!=0)break}S=[S],ae.Ja=[ae.Ja],ae.xa=[ae.xa];e:if(Ze=p,he=g,we=S,Ae=ae.gb[0],Ee=ae.Ja,tt=ae.xa,He=he[0],xe=!n(Ze,He,"VP8 "),Tt=!n(Ze,He,"VP8L"),e(Ze!=null),e(we!=null),e(Ee!=null),e(tt!=null),8>we[0])he=7;else{if(xe||Tt){if(Ze=Ke(Ze,He+4),12<=Ae&&Ze>Ae-12){he=3;break e}if(Z&&Ze>we[0]-8){he=7;break e}Ee[0]=Ze,he[0]+=8,we[0]-=8,tt[0]=Tt}else tt[0]=5<=we[0]&&Ze[He+0]==47&&!(Ze[He+4]>>5),Ee[0]=we[0];he=0}if(S=S[0],ae.Ja=ae.Ja[0],ae.xa=ae.xa[0],g=g[0],he!=0)break;if(4294967286<ae.Ja)return 3;if($==null||ve||($[0]=ae.xa?2:1),D=[D],ue=[ue],ae.xa){if(5>S){he=7;break}$=D,Z=ue,ve=O,p==null||5>S?p=0:5<=S&&p[g+0]==47&&!(p[g+4]>>5)?(we=[0],Ze=[0],Ae=[0],J(Ee=new q,p,g,S),ba(Ee,we,Ze,Ae)?($!=null&&($[0]=we[0]),Z!=null&&(Z[0]=Ze[0]),ve!=null&&(ve[0]=Ae[0]),p=1):p=0):p=0}else{if(10>S){he=7;break}$=ue,p==null||10>S||!Wp(p,g+3,S-3)?p=0:(Z=p[g+0]|p[g+1]<<8|p[g+2]<<16,ve=16383&(p[g+7]<<8|p[g+6]),p=16383&(p[g+9]<<8|p[g+8]),1&Z||3<(Z>>1&7)||!(Z>>4&1)||Z>>5>=ae.Ja||!ve||!p?p=0:(D&&(D[0]=ve),$&&($[0]=p),p=1))}if(!p||(D=D[0],ue=ue[0],fe&&(K[0]!=D||se[0]!=ue)))return 3;B!=null&&(B[0]=ae,B.offset=g-B.w,e(4294967286>g-B.w),e(B.offset==B.ha-S));break}return he==0||he==7&&fe&&B==null?(O!=null&&(O[0]|=ae.na!=null&&0<ae.na.length),A!=null&&(A[0]=D),T!=null&&(T[0]=ue),0):he}function rh(p,g,S){var A=g.width,T=g.height,O=0,D=0,$=A,B=T;if(g.Da=p!=null&&0<p.Da,g.Da&&($=p.cd,B=p.bd,O=p.v,D=p.j,11>S||(O&=-2,D&=-2),0>O||0>D||0>=$||0>=B||O+$>A||D+B>T))return 0;if(g.v=O,g.j=D,g.va=O+$,g.o=D+B,g.U=$,g.T=B,g.da=p!=null&&0<p.da,g.da){if(!it($,B,S=[p.ib],O=[p.hb]))return 0;g.ib=S[0],g.hb=O[0]}return g.ob=p!=null&&p.ob,g.Kb=p==null||!p.Sd,g.da&&(g.ob=g.ib<3*A/4&&g.hb<3*T/4,g.Kb=0),1}function ih(p){if(p==null)return 2;if(11>p.S){var g=p.f.RGBA;g.fb+=(p.height-1)*g.A,g.A=-g.A}else g=p.f.kb,p=p.height,g.O+=(p-1)*g.fa,g.fa=-g.fa,g.N+=(p-1>>1)*g.Ab,g.Ab=-g.Ab,g.W+=(p-1>>1)*g.Db,g.Db=-g.Db,g.F!=null&&(g.J+=(p-1)*g.lb,g.lb=-g.lb);return 0}function go(p,g,S,A){if(A==null||0>=p||0>=g)return 2;if(S!=null){if(S.Da){var T=S.cd,O=S.bd,D=-2&S.v,$=-2&S.j;if(0>D||0>$||0>=T||0>=O||D+T>p||$+O>g)return 2;p=T,g=O}if(S.da){if(!it(p,g,T=[S.ib],O=[S.hb]))return 2;p=T[0],g=O[0]}}A.width=p,A.height=g;e:{var B=A.width,K=A.height;if(p=A.S,0>=B||0>=K||!(p>=am&&13>p))p=2;else{if(0>=A.Rd&&A.sd==null){D=O=T=g=0;var se=($=B*a_[p])*K;if(11>p||(O=(K+1)/2*(g=(B+1)/2),p==12&&(D=(T=B)*K)),(K=s(se+2*O+D))==null){p=1;break e}A.sd=K,11>p?((B=A.f.RGBA).eb=K,B.fb=0,B.A=$,B.size=se):((B=A.f.kb).y=K,B.O=0,B.fa=$,B.Fd=se,B.f=K,B.N=0+se,B.Ab=g,B.Cd=O,B.ea=K,B.W=0+se+O,B.Db=g,B.Ed=O,p==12&&(B.F=K,B.J=0+se+2*O),B.Tc=D,B.lb=T)}if(g=1,T=A.S,O=A.width,D=A.height,T>=am&&13>T)if(11>T)p=A.f.RGBA,g&=($=Math.abs(p.A))*(D-1)+O<=p.size,g&=$>=O*a_[T],g&=p.eb!=null;else{p=A.f.kb,$=(O+1)/2,se=(D+1)/2,B=Math.abs(p.fa),K=Math.abs(p.Ab);var fe=Math.abs(p.Db),Z=Math.abs(p.lb),ae=Z*(D-1)+O;g&=B*(D-1)+O<=p.Fd,g&=K*(se-1)+$<=p.Cd,g=(g&=fe*(se-1)+$<=p.Ed)&B>=O&K>=$&fe>=$,g&=p.y!=null,g&=p.f!=null,g&=p.ea!=null,T==12&&(g&=Z>=O,g&=ae<=p.Tc,g&=p.F!=null)}else g=0;p=g?0:2}}return p!=0||S!=null&&S.fd&&(p=ih(A)),p}var Ul=64,fi=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],pi=24,vo=32,Ra=8,yo=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];$e("Predictor0","PredictorAdd0"),I.Predictor0=function(){return 4278190080},I.Predictor1=function(p){return p},I.Predictor2=function(p,g,S){return g[S+0]},I.Predictor3=function(p,g,S){return g[S+1]},I.Predictor4=function(p,g,S){return g[S-1]},I.Predictor5=function(p,g,S){return Je(Je(p,g[S+1]),g[S+0])},I.Predictor6=function(p,g,S){return Je(p,g[S-1])},I.Predictor7=function(p,g,S){return Je(p,g[S+0])},I.Predictor8=function(p,g,S){return Je(g[S-1],g[S+0])},I.Predictor9=function(p,g,S){return Je(g[S+0],g[S+1])},I.Predictor10=function(p,g,S){return Je(Je(p,g[S-1]),Je(g[S+0],g[S+1]))},I.Predictor11=function(p,g,S){var A=g[S+0];return 0>=ft(A>>24&255,p>>24&255,(g=g[S-1])>>24&255)+ft(A>>16&255,p>>16&255,g>>16&255)+ft(A>>8&255,p>>8&255,g>>8&255)+ft(255&A,255&p,255&g)?A:p},I.Predictor12=function(p,g,S){var A=g[S+0];return(Gt((p>>24&255)+(A>>24&255)-((g=g[S-1])>>24&255))<<24|Gt((p>>16&255)+(A>>16&255)-(g>>16&255))<<16|Gt((p>>8&255)+(A>>8&255)-(g>>8&255))<<8|Gt((255&p)+(255&A)-(255&g)))>>>0},I.Predictor13=function(p,g,S){var A=g[S-1];return(It((p=Je(p,g[S+0]))>>24&255,A>>24&255)<<24|It(p>>16&255,A>>16&255)<<16|It(p>>8&255,A>>8&255)<<8|It(255&p,255&A))>>>0};var sh=I.PredictorAdd0;I.PredictorAdd1=Nt,$e("Predictor2","PredictorAdd2"),$e("Predictor3","PredictorAdd3"),$e("Predictor4","PredictorAdd4"),$e("Predictor5","PredictorAdd5"),$e("Predictor6","PredictorAdd6"),$e("Predictor7","PredictorAdd7"),$e("Predictor8","PredictorAdd8"),$e("Predictor9","PredictorAdd9"),$e("Predictor10","PredictorAdd10"),$e("Predictor11","PredictorAdd11"),$e("Predictor12","PredictorAdd12"),$e("Predictor13","PredictorAdd13");var Zc=I.PredictorAdd2;Xe("ColorIndexInverseTransform","MapARGB","32b",function(p){return p>>8&255},function(p){return p}),Xe("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(p){return p},function(p){return p>>8&255});var In,rm=I.ColorIndexInverseTransform,Us=I.MapARGB,Bs=I.VP8LColorIndexInverseTransformAlpha,ah=I.MapAlpha,oh=I.VP8LPredictorsAdd=[];oh.length=16,(I.VP8LPredictors=[]).length=16,(I.VP8LPredictorsAdd_C=[]).length=16,(I.VP8LPredictors_C=[]).length=16;var lh,ch,wo,bo,xo,Bl,_o,ql,qi,qs,Xt,on,Dn,tr,La,uh,Yc,im,O5,I5,D5,M5,F5,z5,dh,$5,U5,B5,q5=s(511),H5=s(2041),W5=s(225),V5=s(767),G5=0,E1=H5,sm=W5,mi=V5,Hi=q5,am=0,om=1,K5=2,lm=3,cm=4,N1=5,Z5=6,A1=7,C1=8,um=9,P1=10,Vj=[2,3,7],Gj=[3,3,11],Y5=[280,256,256,256,40],Kj=[0,1,1,1,0],Zj=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Yj=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,3
vendor: 4,386 bytes, line 498
4986,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],Jj=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Xj=8,T1=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],R1=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],hh=null,Qj=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],eO=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],J5=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],tO=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,25
4985,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],nO=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,
4981,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],rO=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,25
vendor: 21,486 bytes, line 498
4985,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],iO=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],So=[],cs=[],ja=[],sO=1,X5=2,ko=[],Wi=[];Pa("UpsampleRgbLinePair",mo,3),Pa("UpsampleBgrLinePair",gr,3),Pa("UpsampleRgbaLinePair",Br,4),Pa("UpsampleBgraLinePair",nh,4),Pa("UpsampleArgbLinePair",th,4),Pa("UpsampleRgba4444LinePair",zl,2),Pa("UpsampleRgb565LinePair",Fl,2);var aO=I.UpsampleRgbLinePair,oO=I.UpsampleBgrLinePair,Q5=I.UpsampleRgbaLinePair,e_=I.UpsampleBgraLinePair,t_=I.UpsampleArgbLinePair,n_=I.UpsampleRgba4444LinePair,lO=I.UpsampleRgb565LinePair,dm=16,hm=1<<dm-1,fh=-227,L1=482,r_=6,cO=(256<<r_)-1,i_=0,uO=s(256),dO=s(256),hO=s(256),fO=s(256),pO=s(L1-fh),mO=s(L1-fh);Ta("YuvToRgbRow",mo,3),Ta("YuvToBgrRow",gr,3),Ta("YuvToRgbaRow",Br,4),Ta("YuvToBgraRow",nh,4),Ta("YuvToArgbRow",th,4),Ta("YuvToRgba4444Row",zl,2),Ta("YuvToRgb565Row",Fl,2);var s_=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],fm=[0,2,8],gO=[8,7,6,4,4,2,2,2,1,1,1,1],vO=1;this.WebPDecodeRGBA=function(p,g,S,A,T){var O=om,D=new be,$=new ut;D.ba=$,$.S=O,$.width=[$.width],$.height=[$.height];var B=$.width,K=$.height,se=new at;if(se==null||p==null)var fe=2;else e(se!=null),fe=$l(p,g,S,se.width,se.height,se.Pd,se.Qd,se.format,null);if(fe!=0?B=0:(B!=null&&(B[0]=se.width[0]),K!=null&&(K[0]=se.height[0]),B=1),B){$.width=$.width[0],$.height=$.height[0],A!=null&&(A[0]=$.width),T!=null&&(T[0]=$.height);e:{if(A=new Bc,(T=new ke).data=p,T.w=g,T.ha=S,T.kd=1,g=[0],e(T!=null),((p=$l(T.data,T.w,T.ha,null,null,null,g,null,T))==0||p==7)&&g[0]&&(p=4),(g=p)==0){if(e(D!=null),A.data=T.data,A.w=T.w+T.offset,A.ha=T.ha-T.offset,A.put=ct,A.ac=Is,A.bc=wa,A.ma=D,T.xa){if((p=Pl())==null){D=1;break e}if(function(Z,ae){var ue=[0],ve=[0],he=[0];t:for(;;){if(Z==null)return 0;if(ae==null)return Z.a=2,0;if(Z.l=ae,Z.a=0,J(Z.m,ae.data,ae.w,ae.ha),!ba(Z.m,ue,ve,he)){Z.a=3;break t}if(Z.xb=X5,ae.width=ue[0],ae.height=ve[0],!Ms(ue[0],ve[0],1,Z,null))break t;return 1}return e(Z.a!=0),0}(p,A)){if(A=(g=go(A.width,A.height,D.Oa,D.ba))==0){t:{A=p;n:for(;;){if(A==null){A=0;break t}if(e(A.s.yc!=null),e(A.s.Ya!=null),e(0<A.s.Wb),e((S=A.l)!=null),e((T=S.ma)!=null),A.xb!=0){if(A.ca=T.ba,A.tb=T.tb,e(A.ca!=null),!rh(T.Oa,S,lm)){A.a=2;break n}if(!Tl(A,S.width)||S.da)break n;if((S.da||Ie(A.ca.S))&&ls(),11>A.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),A.ca.f.kb.F!=null&&ls()),A.Pb&&0<A.s.ua&&A.s.vb.X==null&&!V(A.s.vb,A.s.Wa.Xa)){A.a=1;break n}A.xb=0}if(!as(A,A.V,A.Ba,A.c,A.i,S.o,fo))break n;T.Dc=A.Ma,A=1;break t}e(A.a!=0),A=0}A=!A}A&&(g=p.a)}else g=p.a}else{if((p=new u1)==null){D=1;break e}if(p.Fa=T.na,p.P=T.P,p.qc=T.Sa,zs(p,A)){if((g=go(A.width,A.height,D.Oa,D.ba))==0){if(p.Aa=0,S=D.Oa,e((T=p)!=null),S!=null){if(0<(B=0>(B=S.Md)?0:100<B?255:255*B/100)){for(K=se=0;4>K;++K)12>(fe=T.pb[K]).lc&&(fe.ia=B*gO[0>fe.lc?0:fe.lc]>>3),se|=fe.ia;se&&(alert("todo:VP8InitRandom"),T.ia=1)}T.Ga=S.Id,100<T.Ga?T.Ga=100:0>T.Ga&&(T.Ga=0)}(function(Z,ae){if(Z==null)return 0;if(ae==null)return Wn(Z,2,"NULL VP8Io parameter in VP8Decode().");if(!Z.cb&&!zs(Z,ae))return 0;if(e(Z.cb),ae.ac==null||ae.ac(ae)){ae.ob&&(Z.L=0);var ue=fm[Z.L];if(Z.L==2?(Z.yb=0,Z.zb=0):(Z.yb=ae.v-ue>>4,Z.zb=ae.j-ue>>4,0>Z.yb&&(Z.yb=0),0>Z.zb&&(Z.zb=0)),Z.Va=ae.o+15+ue>>4,Z.Hb=ae.va+15+ue>>4,Z.Hb>Z.za&&(Z.Hb=Z.za),Z.Va>Z.Ub&&(Z.Va=Z.Ub),0<Z.L){var ve=Z.ed;for(ue=0;4>ue;++ue){var he;if(Z.Qa.Cb){var we=Z.Qa.Lb[ue];Z.Qa.Fb||(we+=ve.Tb)}else we=ve.Tb;for(he=0;1>=he;++he){var xe=Z.gd[ue][he],Ae=we;if(ve.Pc&&(Ae+=ve.vd[0],he&&(Ae+=ve.od[0])),0<(Ae=0>Ae?0:63<Ae?63:Ae)){var Ee=Ae;0<ve.wb&&(Ee=4<ve.wb?Ee>>2:Ee>>1)>9-ve.wb&&(Ee=9-ve.wb),1>Ee&&(Ee=1),xe.dd=Ee,xe.tc=2*Ae+Ee,xe.ld=40<=Ae?2:15<=Ae?1:0}else xe.tc=0;xe.La=he}}}ue=0}else Wn(Z,6,"Frame setup failed"),ue=Z.a;if(ue=ue==0){if(ue){Z.$c=0,0<Z.Aa||(Z.Ic=vO);t:{ue=Z.Ic,ve=4*(Ee=Z.za);var tt=32*Ee,He=Ee+1,Tt=0<Z.L?Ee*(0<Z.Aa?2:1):0,Ze=(Z.Aa==2?2:1)*Ee;if((xe=ve+832+(he=3*(16*ue+fm[Z.L])/2*tt)+(we=Z.Fa!=null&&0<Z.Fa.length?Z.Kc.c*Z.Kc.i:0))!=xe)ue=0;else{if(xe>Z.Vb){if(Z.Vb=0,Z.Ec=s(xe),Z.Fc=0,Z.Ec==null){ue=Wn(Z,1,"no memory during frame initialization.");break t}Z.Vb=xe}xe=Z.Ec,Ae=Z.Fc,Z.Ac=xe,Z.Bc=Ae,Ae+=ve,Z.Gd=a(tt,qp),Z.Hd=0,Z.rb=a(He+1,Hd),Z.sb=1,Z.wa=Tt?a(Tt,$i):null,Z.Y=0,Z.D.Nb=0,Z.D.wa=Z.wa,Z.D.Y=Z.Y,0<Z.Aa&&(Z.D.Y+=Ee),e(!0),Z.oc=xe,Z.pc=Ae,Ae+=832,Z.ya=a(Ze,Wd),Z.aa=0,Z.D.ya=Z.ya,Z.D.aa=Z.aa,Z.Aa==2&&(Z.D.aa+=Ee),Z.R=16*Ee,Z.B=8*Ee,Ee=(tt=fm[Z.L])*Z.R,tt=tt/2*Z.B,Z.sa=xe,Z.ta=Ae+Ee,Z.qa=Z.sa,Z.ra=Z.ta+16*ue*Z.R+tt,Z.Ha=Z.qa,Z.Ia=Z.ra+8*ue*Z.B+tt,Z.$c=0,Ae+=he,Z.mb=we?xe:null,Z.nb=we?Ae:null,e(Ae+we<=Z.Fc+Z.Vb),Vp(Z),i(Z.Ac,Z.Bc,0,ve),ue=1}}if(ue){if(ae.ka=0,ae.y=Z.sa,ae.O=Z.ta,ae.f=Z.qa,ae.N=Z.ra,ae.ea=Z.Ha,ae.Vd=Z.Ia,ae.fa=Z.R,ae.Rc=Z.B,ae.F=null,ae.J=0,!G5){for(ue=-255;255>=ue;++ue)q5[255+ue]=0>ue?-ue:ue;for(ue=-1020;1020>=ue;++ue)H5[1020+ue]=-128>ue?-128:127<ue?127:ue;for(ue=-112;112>=ue;++ue)W5[112+ue]=-16>ue?-16:15<ue?15:ue;for(ue=-255;510>=ue;++ue)V5[255+ue]=0>ue?0:255<ue?255:ue;G5=1}_o=Hc,ql=h1,qs=$s,Xt=Kp,on=Zp,qi=d1,Dn=em,tr=Il,La=P,uh=Y,Yc=tm,im=b,O5=te,I5=ce,D5=Ol,M5=Qd,F5=Xp,z5=Qp,cs[0]=b1,cs[1]=f1,cs[2]=y1,cs[3]=w1,cs[4]=_a,cs[5]=x1,cs[6]=Sa,cs[7]=_1,cs[8]=Kd,cs[9]=Wc,So[0]=g1,So[1]=m1,So[2]=Vd,So[3]=Yp,So[4]=Ll,So[5]=Gd,So[6]=v1,ja[0]=k1,ja[1]=p1,ja[2]=jl,ja[3]=S1,ja[4]=Yd,ja[5]=Zd,ja[6]=Jp,ue=1}else ue=0}ue&&(ue=function($t,nr){for($t.M=0;$t.M<$t.Va;++$t.M){var Rt,Ye=$t.Jc[$t.M&$t.Xb],Le=$t.m,Mn=$t;for(Rt=0;Rt<Mn.za;++Rt){var Et=Le,Ut=Mn,pn=Ut.Ac,vr=Ut.Bc+4*Rt,qr=Ut.zc,Pn=Ut.ya[Ut.aa+Rt];if(Ut.Qa.Bb?Pn.$b=ge(Et,Ut.Pa.jb[0])?2+ge(Et,Ut.Pa.jb[2]):ge(Et,Ut.Pa.jb[1]):Pn.$b=0,Ut.kc&&(Pn.Ad=ge(Et,Ut.Bd)),Pn.Za=!ge(Et,145)+0,Pn.Za){var Ar=Pn.Ob,Hr=0;for(Ut=0;4>Ut;++Ut){var rr,Wt=qr[0+Ut];for(rr=0;4>rr;++rr){Wt=nO[pn[vr+rr]][Wt];for(var en=J5[ge(Et,Wt[0])];0<en;)en=J5[2*en+ge(Et,Wt[en])];Wt=-en,pn[vr+rr]=Wt}r(Ar,Hr,pn,vr,4),Hr+=4,qr[0+Ut]=Wt}}else Wt=ge(Et,156)?ge(Et,128)?1:3:ge(Et,163)?2:0,Pn.Ob[0]=Wt,i(pn,vr,Wt,4),i(qr,0,Wt,4);Pn.Dd=ge(Et,142)?ge(Et,114)?ge(Et,183)?1:3:2:0}if(Mn.m.Ka)return Wn($t,7,"Premature end-of-partition0 encountered.");for(;$t.ja<$t.za;++$t.ja){if(Mn=Ye,Et=(Le=$t).rb[Le.sb-1],pn=Le.rb[Le.sb+Le.ja],Rt=Le.ya[Le.aa+Le.ja],vr=Le.kc?Rt.Ad:0)Et.la=pn.la=0,Rt.Za||(Et.Na=pn.Na=0),Rt.Hc=0,Rt.Gc=0,Rt.ia=0;else{var Tn,tn;if(Et=pn,pn=Mn,vr=Le.Pa.Xc,qr=Le.ya[Le.aa+Le.ja],Pn=Le.pb[qr.$b],Ut=qr.ad,Ar=0,Hr=Le.rb[Le.sb-1],Wt=rr=0,i(Ut,Ar,0,384),qr.Za)var yr=0,us=vr[3];else{en=s(16);var Fn=Et.Na+Hr.Na;if(Fn=hh(pn,vr[1],Fn,Pn.Eb,0,en,0),Et.Na=Hr.Na=(0<Fn)+0,1<Fn)_o(en,0,Ut,Ar);else{var ri=en[0]+3>>3;for(en=0;256>en;en+=16)Ut[Ar+en]=ri}yr=1,us=vr[0]}var ln=15&Et.la,ir=15&Hr.la;for(en=0;4>en;++en){var gi=1&ir;for(ri=tn=0;4>ri;++ri)ln=ln>>1|(gi=(Fn=hh(pn,us,Fn=gi+(1&ln),Pn.Sc,yr,Ut,Ar))>yr)<<7,tn=tn<<2|(3<Fn?3:1<Fn?2:Ut[Ar+0]!=0),Ar+=16;ln>>=4,ir=ir>>1|gi<<7,rr=(rr<<8|tn)>>>0}for(us=ln,yr=ir>>4,Tn=0;4>Tn;Tn+=2){for(tn=0,ln=Et.la>>4+Tn,ir=Hr.la>>4+Tn,en=0;2>en;++en){for(gi=1&ir,ri=0;2>ri;++ri)Fn=gi+(1&ln),ln=ln>>1|(gi=0<(Fn=hh(pn,vr[2],Fn,Pn.Qc,0,Ut,Ar)))<<3,tn=tn<<2|(3<Fn?3:1<Fn?2:Ut[Ar+0]!=0),Ar+=16;ln>>=2,ir=ir>>1|gi<<5}Wt|=tn<<4*Tn,us|=ln<<4<<Tn,yr|=(240&ir)<<Tn}Et.la=us,Hr.la=yr,qr.Hc=rr,qr.Gc=Wt,qr.ia=43690&Wt?0:Pn.ia,vr=!(rr|Wt)}if(0<Le.L&&(Le.wa[Le.Y+Le.ja]=Le.gd[Rt.$b][Rt.Za],Le.wa[Le.Y+Le.ja].La|=!vr),Mn.Ka)return Wn($t,7,"Premature end-of-file encountered.")}if(Vp($t),Le=nr,Mn=1,Rt=(Ye=$t).D,Et=0<Ye.L&&Ye.M>=Ye.zb&&Ye.M<=Ye.Va,Ye.Aa==0)t:{if(Rt.M=Ye.M,Rt.uc=Et,Bi(Ye,Rt),Mn=1,Rt=(tn=Ye.D).Nb,Et=(Wt=fm[Ye.L])*Ye.R,pn=Wt/2*Ye.B,en=16*Rt*Ye.R,ri=8*Rt*Ye.B,vr=Ye.sa,qr=Ye.ta-Et+en,Pn=Ye.qa,Ut=Ye.ra-pn+ri,Ar=Ye.Ha,Hr=Ye.Ia-pn+ri,ir=(ln=tn.M)==0,rr=ln>=Ye.Va-1,Ye.Aa==2&&Bi(Ye,tn),tn.uc)for(gi=(Fn=Ye).D.M,e(Fn.D.uc),tn=Fn.yb;tn<Fn.Hb;++tn){yr=tn,us=gi;var Wr=(vi=(wr=Fn).D).Nb;Tn=wr.R;var vi=vi.wa[vi.Y+yr],yi=wr.sa,ii=wr.ta+16*Wr*Tn+16*yr,wi=vi.dd,dn=vi.tc;if(dn!=0)if(e(3<=dn),wr.L==1)0<yr&&M5(yi,ii,Tn,dn+4),vi.La&&z5(yi,ii,Tn,dn),0<us&&D5(yi,ii,Tn,dn+4),vi.La&&F5(yi,ii,Tn,dn);else{var bi=wr.B,ds=wr.qa,Hl=wr.ra+8*Wr*bi+8*yr,Oa=wr.Ha,wr=wr.Ia+8*Wr*bi+8*yr;Wr=vi.ld,0<yr&&(tr(yi,ii,Tn,dn+4,wi,Wr),uh(ds,Hl,Oa,wr,bi,dn+4,wi,Wr)),vi.La&&(im(yi,ii,Tn,dn,wi,Wr),I5(ds,Hl,Oa,wr,bi,dn,wi,Wr)),0<us&&(Dn(yi,ii,Tn,dn+4,wi,Wr),La(ds,Hl,Oa,wr,bi,dn+4,wi,Wr)),vi.La&&(Yc(yi,ii,Tn,dn,wi,Wr),O5(ds,Hl,Oa,wr,bi,dn,wi,Wr))}}if(Ye.ia&&alert("todo:DitherRow"),Le.put!=null){if(tn=16*ln,ln=16*(ln+1),ir?(Le.y=Ye.sa,Le.O=Ye.ta+en,Le.f=Ye.qa,Le.N=Ye.ra+ri,Le.ea=Ye.Ha,Le.W=Ye.Ia+ri):(tn-=Wt,Le.y=vr,Le.O=qr,Le.f=Pn,Le.N=Ut,Le.ea=Ar,Le.W=Hr),rr||(ln-=Wt),ln>Le.o&&(ln=Le.o),Le.F=null,Le.J=null,Ye.Fa!=null&&0<Ye.Fa.length&&tn<ln&&(Le.J=un(Ye,Le,tn,ln-tn),Le.F=Ye.mb,Le.F==null&&Le.F.length==0)){Mn=Wn(Ye,3,"Could not decode alpha data.");break t}tn<Le.j&&(Wt=Le.j-tn,tn=Le.j,e(!(1&Wt)),Le.O+=Ye.R*Wt,Le.N+=Ye.B*(Wt>>1),Le.W+=Ye.B*(Wt>>1),Le.F!=null&&(Le.J+=Le.width*Wt)),tn<ln&&(Le.O+=Le.v,Le.N+=Le.v>>1,Le.W+=Le.v>>1,Le.F!=null&&(Le.J+=Le.v),Le.ka=tn-Le.j,Le.U=Le.va-Le.v,Le.T=ln-tn,Mn=Le.put(Le))}Rt+1!=Ye.Ic||rr||(r(Ye.sa,Ye.ta-Et,vr,qr+16*Ye.R,Et),r(Ye.qa,Ye.ra-pn,Pn,Ut+8*Ye.B,pn),r(Ye.Ha,Ye.Ia-pn,Ar,Hr+8*Ye.B,pn))}if(!Mn)return Wn($t,6,"Output aborted.")}return 1}(Z,ae)),ae.bc!=null&&ae.bc(ae),ue&=1}return ue?(Z.cb=0,ue):0})(p,A)||(g=p.a)}}else g=p.a}g==0&&D.Oa!=null&&D.Oa.fd&&(g=ih(D.ba))}D=g}O=D!=0?null:11>O?$.f.RGBA.eb:$.f.kb.y}else O=null;return O};var a_=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function c(I,G){for(var L="",j=0;j<4;j++)L+=String.fromCharCode(I[G++]);return L}function u(I,G){return I[G+0]|I[G+1]<<8}function d(I,G){return(I[G+0]|I[G+1]<<8|I[G+2]<<16)>>>0}function f(I,G){return(I[G+0]|I[G+1]<<8|I[G+2]<<16|I[G+3]<<24)>>>0}new l;var h=[0],y=[0],v=[],_=new l,w=t,x=function(I,G){var L={},j=0,W=!1,z=0,re=0;if(L.frames=[],!function(C,q){for(var X=0;X<4;X++)if(C[q+X]!="RIFF".charCodeAt(X))return!0;return!1}(I,G)){for(f(I,G+=4),G+=8;G<I.length;){var ne=c(I,G),oe=f(I,G+=4);G+=4;var U=oe+(1&oe);switch(ne){case"VP8 ":case"VP8L":L.frames[j]===void 0&&(L.frames[j]={}),(ie=L.frames[j]).src_off=W?re:G-8,ie.src_size=z+oe+8,j++,W&&(W=!1,z=0,re=0);break;case"VP8X":(ie=L.header={}).feature_flags=I[G];var J=G+4;ie.canvas_width=1+d(I,J),J+=3,ie.canvas_height=1+d(I,J),J+=3;break;case"ALPH":W=!0,z=U+8,re=G-8;break;case"ANIM":(ie=L.header).bgcolor=f(I,G),J=G+4,ie.loop_count=u(I,J),J+=2;break;case"ANMF":var de,ie;(ie=L.frames[j]={}).offset_x=2*d(I,G),G+=3,ie.offset_y=2*d(I,G),G+=3,ie.width=1+d(I,G),G+=3,ie.height=1+d(I,G),G+=3,ie.duration=d(I,G),G+=3,de=I[G++],ie.dispose=1&de,ie.blend=de>>1&1}ne!="ANMF"&&(G+=U)}return L}}(w,0);x.response=w,x.rgbaoutput=!0,x.dataurl=!1;var k=x.header?x.header:null,N=x.frames?x.frames:null;if(k){k.loop_counter=k.loop_count,h=[k.canvas_height],y=[k.canvas_width];for(var R=0;R<N.length&&N[R].blend!=0;R++);}var H=N[0],F=_.WebPDecodeRGBA(w,H.src_off,H.src_size,y,h);H.rgba=F,H.imgwidth=y[0],H.imgheight=h[0];for(var M=0;M<y[0]*h[0]*4;M++)v[M]=F[M];return this.width=y,this.height=h,this.data=v,this}(function(t){var e,n,r,i,s,a,o,l,c,u=function(C){return C=C||{},this.isStrokeTransparent=C.isStrokeTransparent||!1,this.strokeOpacity=C.strokeOpacity||1,this.strokeStyle=C.strokeStyle||"#000000",this.fillStyle=C.fillStyle||"#000000",this.isFillTransparent=C.isFillTransparent||!1,this.fillOpacity=C.fillOpacity||1,this.font=C.font||"10px sans-serif",this.textBaseline=C.textBaseline||"alphabetic",this.textAlign=C.textAlign||"left",this.lineWidth=C.lineWidth||1,this.lineJoin=C.lineJoin||"miter",this.lineCap=C.lineCap||"butt",this.path=C.path||[],this.transform=C.transform!==void 0?C.transform.clone():new l,this.globalCompositeOperation=C.globalCompositeOperation||"normal",this.globalAlpha=C.globalAlpha||1,this.clip_path=C.clip_path||[],this.currentPoint=C.currentPoint||new a,this.miterLimit=C.miterLimit||10,this.lastPoint=C.lastPoint||new a,this.lineDashOffset=C.lineDashOffset||0,this.lineDash=C.lineDash||[],this.margin=C.margin||[0,0,0,0],this.prevPageLastElemOffset=C.prevPageLastElemOffset||0,this.ignoreClearRect=typeof C.ignoreClearRect!="boolean"||C.ignoreClearRect,this};t.events.push(["initialized",function(){this.context2d=new d(this),e=this.internal.f2,n=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,s=this.internal.getVerticalCoordinate,a=this.internal.Point,o=this.internal.Rectangle,l=this.internal.Matrix,c=new u}]);var d=function(C){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var q=C;Object.defineProperty(this,"pdf",{get:function(){return q}});var X=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return X},set:function(V){X=!!V}});var Q=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return Q},set:function(V){Q=!!V}});var ee=0;Object.defineProperty(this,"posX",{get:function(){return ee},set:function(V){isNaN(V)||(ee=V)}});var le=0;Object.defineProperty(this,"posY",{get:function(){return le},set:function(V){isNaN(V)||(le=V)}}),Object.defineProperty(this,"margin",{get:function(){return c.margin},set:function(V){var Te;typeof V=="number"?Te=[V,V,V,V]:((Te=new Array(4))[0]=V[0],Te[1]=V.length>=2?V[1]:Te[0],Te[2]=V.length>=3?V[2]:Te[0],Te[3]=V.length>=4?V[3]:Te[1]),c.margin=Te}});var me=!1;Object.defineProperty(this,"autoPaging",{get:function(){return me},set:function(V){me=V}});var pe=0;Object.defineProperty(this,"lastBreak",{get:function(){return pe},set:function(V){pe=V}});var ge=[];Object.defineProperty(this,"pageBreaks",{get:function(){return ge},set:function(V){ge=V}}),Object.defineProperty(this,"ctx",{get:function(){return c},set:function(V){V instanceof u&&(c=V)}}),Object.defineProperty(this,"path",{get:function(){return c.path},set:function(V){c.path=V}});var Ne=[];Object.defineProperty(this,"ctxStack",{get:function(){return Ne},set:function(V){Ne=V}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(V){var Te;Te=f(V),this.ctx.fillStyle=Te.style,this.ctx.isFillTransparent=Te.a===0,this.ctx.fillOpacity=Te.a,this.pdf.setFillColor(Te.r,Te.g,Te.b,{a:Te.a}),this.pdf.setTextColor(Te.r,Te.g,Te.b,{a:Te.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(V){var Te=f(V);this.ctx.strokeStyle=Te.style,this.ctx.isStrokeTransparent=Te.a===0,this.ctx.strokeOpacity=Te.a,Te.a===0?this.pdf.setDrawColor(255,255,255):(Te.a,this.pdf.setDrawColor(Te.r,Te.g,Te.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(V){["butt","round","square"].indexOf(V)!==-1&&(this.ctx.lineCap=V,this.pdf.setLineCap(V))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(V){isNaN(V)||(this.ctx.lineWidth=V,this.pdf.setLineWidth(V))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(V){["bevel","round","miter"].indexOf(V)!==-1&&(this.ctx.lineJoin=V,this.pdf.setLineJoin(V))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(V){isNaN(V)||(this.ctx.miterLimit=V,this.pdf.setMiterLimit(V))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(V){this.ctx.textBaseline=V}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(V){["right","end","center","left","start"].indexOf(V)!==-1&&(this.ctx.textAlign=V)}});var je=null,Re=null,Ke=null;Object.defineProperty(this,"fontFaces",{get:function(){return Ke},set:function(V){je=null,Re=null,Ke=V}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(V){var Te;if(this.ctx.font=V,(Te=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(V))!==null){var wt=Te[1];Te[2];var it=Te[3],_e=Te[4];Te[5];var et=Te[6],$e=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(_e)[2];_e=Math.floor($e==="px"?parseFloat(_e)*this.pdf.internal.scaleFactor:$e==="em"?parseFloat(_e)*this.pdf.getFontSize():parseFloat(_e)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(_e);var ot=function(Xe){var wn,Ft,Pt=[],kt=Xe.trim();if(kt==="")return f2;if(kt in FN)return[FN[kt]];for(;kt!=="";){switch(Ft=null,wn=(kt=$N(kt)).charAt(0)){case'"':case"'":Ft=ZY(kt.substring(1),wn);break;default:Ft=YY(kt)}if(Ft===null||(Pt.push(Ft[0]),(kt=$N(Ft[1]))!==""&&kt.charAt(0)!==","))return f2;kt=kt.replace(/^,/,"")}return Pt}(et);if(this.fontFaces){var Je=function(Xe,wn){var Ft=Xe.getFontList(),Pt=JSON.stringify(Ft);if(je===null||Re!==Pt){var kt=function(qt){var st=[];return Object.keys(qt).forEach(function(ze){qt[ze].forEach(function(Ie){var Me=null;switch(Ie){case"bold":Me={family:ze,weight:"bold"};break;case"italic":Me={family:ze,style:"italic"};break;case"bolditalic":Me={family:ze,weight:"bold",style:"italic"};break;case"":case"normal":Me={family:ze}}Me!==null&&(Me.ref={name:ze,style:Ie},st.push(Me))})}),st}(Ft);je=function(qt){for(var st={},ze=0;ze<qt.length;++ze){var Ie=h2(qt[ze]),Me=Ie.family,zt=Ie.stretch,ut=Ie.style,at=Ie.weight;st[Me]=st[Me]||{},st[Me][zt]=st[Me][zt]||{},st[Me][zt][ut]=st[Me][zt][ut]||{},st[Me][zt][ut][at]=Ie}return st}(kt.concat(wn)),Re=Pt}return je}(this.pdf,this.fontFaces),Gt=ot.map(function(Xe){return{family:Xe,stretch:"normal",weight:it,style:wt}}),It=function(Xe,wn,Ft){for(var Pt=(Ft=Ft||{}).defaultFontFamily||"times",kt=Object.assign({},KY,Ft.genericFontFamilies||{}),qt=null,st=null,ze=0;ze<wn.length;++ze)if(kt[(qt=h2(wn[ze])).family]&&(qt.family=kt[qt.family]),Xe.hasOwnProperty(qt.family)){st=Xe[qt.family];break}if(!(st=st||Xe[Pt]))throw new Error("Could not find a font-family for the rule '"+zN(qt)+"' and default family '"+Pt+"'.");if(st=function(Ie,Me){if(Me[Ie])return Me[Ie];var zt=gb[Ie],ut=zt<=gb.normal?-1:1,at=MN(Me,uL,zt,ut);if(!at)throw new Error("Could not find a matching font-stretch value for "+Ie);return at}(qt.stretch,st),st=function(Ie,Me){if(Me[Ie])return Me[Ie];for(var zt=cL[Ie],ut=0;ut<zt.length;++ut)if(Me[zt[ut]])return Me[zt[ut]];throw new Error("Could not find a matching font-style for "+Ie)}(qt.style,st),!(st=function(Ie,Me){if(Me[Ie])return Me[Ie];if(Ie===400&&Me[500])return Me[500];if(Ie===500&&Me[400])return Me[400];var zt=GY[Ie],ut=MN(Me,dL,zt,Ie<400?-1:1);if(!ut)throw new Error("Could not find a matching font-weight for value "+Ie);return ut}(qt.weight,st)))throw new Error("Failed to resolve a font for the rule '"+zN(qt)+"'.");return st}(Je,Gt);this.pdf.setFont(It.ref.name,It.ref.style)}else{var ft="";(it==="bold"||parseInt(it,10)>=700||wt==="bold")&&(ft="bold"),wt==="italic"&&(ft+="italic"),ft.length===0&&(ft="normal");for(var Nt="",Dt={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},Ue=0;Ue<ot.length;Ue++){if(this.pdf.internal.getFont(ot[Ue],ft,{noFallback:!0,disableWarning:!0})!==void 0){Nt=ot[Ue];break}if(ft==="bolditalic"&&this.pdf.internal.getFont(ot[Ue],"bold",{noFallback:!0,disableWarning:!0})!==void 0)Nt=ot[Ue],ft="bold";else if(this.pdf.internal.getFont(ot[Ue],"normal",{noFallback:!0,disableWarning:!0})!==void 0){Nt=ot[Ue],ft="normal";break}}if(Nt===""){for(var vt=0;vt<ot.length;vt++)if(Dt[ot[vt]]){Nt=Dt[ot[vt]];break}}Nt=Nt===""?"Times":Nt,this.pdf.setFont(Nt,ft)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(V){this.ctx.globalCompositeOperation=V}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(V){this.ctx.globalAlpha=V}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(V){this.ctx.lineDashOffset=V,ie.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(V){this.ctx.lineDash=V,ie.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(V){this.ctx.ignoreClearRect=!!V}})};d.prototype.setLineDash=function(C){this.lineDash=C},d.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},d.prototype.fill=function(){N.call(this,"fill",!1)},d.prototype.stroke=function(){N.call(this,"stroke",!1)},d.prototype.beginPath=function(){this.path=[{type:"begin"}]},d.prototype.moveTo=function(C,q){if(isNaN(C)||isNaN(q))throw cn.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to
498jsPDF.context2d.moveTo");var X=this.ctx.transform.applyToPoint(new a(C,q));this.path.push({type:"mt",x:X.x,y:X.y}),this.ctx.lastPoint=new a(C,q)},d.prototype.closePath=function(){var C=new a(0,0),q=0;for(q=this.path.length-1;q!==-1;q--)if(this.path[q].type==="begin"&&rn(this.path[q+1])==="object"&&typeof this.path[q+1].x=="number"){C=new a(this.path[q+1].x,this.path[q+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new a(C.x,C.y)},d.prototype.lineTo=function(C,q){if(isNaN(C)||isNaN(q))throw cn.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.lineTo");var X=this.ctx.transform.applyToPoint(new a(C,q));this.path.push({type:"lt",x:X.x,y:X.y}),this.ctx.lastPoint=new a(X.x,X.y)},d.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),N.call(this,null,!0)},d.prototype.quadraticCurveTo=function(C,q,X,Q){if(isNaN(X)||isNaN(Q)||isNaN(C)||isNaN(q))throw cn.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var ee=this.ctx.transform.applyToPoint(new a(X,Q)),le=this.ctx.transform.applyToPoint(new a(C,q));this.path.push({type:"qct",x1:le.x,y1:le.y,x:ee.x,y:ee.y}),this.ctx.lastPoint=new a(ee.x,ee.y)},d.prototype.bezierCurveTo=function(C,q,X,Q,ee,le){if(isNaN(ee)||isNaN(le)||isNaN(C)||isNaN(q)||isNaN(X)||isNaN(Q))throw cn.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var me=this.ctx.transform.applyToPoint(new a(ee,le)),pe=this.ctx.transform.applyToPoint(new a(C,q)),ge=this.ctx.transform.applyToPoint(new a(X,Q));this.path.push({type:"bct",x1:pe.x,y1:pe.y,x2:ge.x,y2:ge.y,x:me.x,y:me.y}),this.ctx.lastPoint=new a(me.x,me.y)},d.prototype.arc=function(C,q,X,Q,ee,le){if(isNaN(C)||isNaN(q)||isNaN(X)||isNaN(Q)||isNaN(ee))throw cn.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(le=!!le,!this.ctx.transform.isIdentity){var me=this.ctx.transform.applyToPoint(new a(C,q));C=me.x,q=me.y;var pe=this.ctx.transform.applyToPoint(new a(0,X)),ge=this.ctx.transform.applyToPoint(new a(0,0));X=Math.sqrt(Math.pow(pe.x-ge.x,2)+Math.pow(pe.y-ge.y,2))}Math.abs(ee-Q)>=2*Math.PI&&(Q=0,ee=2*Math.PI),this.path.push({type:"arc",x:C,y:q,radius:X,startAngle:Q,endAngle:ee,counterclockwise:le})},d.prototype.arcTo=function(C,q,X,Q,ee){throw new Error("arcTo not implemented.")},d.prototype.rect=function(C,q,X,Q){if(isNaN(C)||isNaN(q)||isNaN(X)||isNaN(Q))throw cn.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(C,q),this.lineTo(C+X,q),this.lineTo(C+X,q+Q),this.lineTo(C,q+Q),this.lineTo(C,q),this.lineTo(C+X,q),this.lineTo(C,q)},d.prototype.fillRect=function(C,q,X,Q){if(isNaN(C)||isNaN(q)||isNaN(X)||isNaN(Q))throw cn.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!h.call(this)){var ee={};this.lineCap!=="butt"&&(ee.lineCap=this.lineCap,this.lineCap="butt"),this.lineJoin!=="miter"&&(ee.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(C,q,X,Q),this.fill(),ee.hasOwnProperty("lineCap")&&(this.lineCap=ee.lineCap),ee.hasOwnProperty("lineJoin")&&(this.lineJoin=ee.lineJoin)}},d.prototype.strokeRect=function(C,q,X,Q){if(isNaN(C)||isNaN(q)||isNaN(X)||isNaN(Q))throw cn.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");y.call(this)||(this.beginPath(),this.rect(C,q,X,Q),this.stroke())},d.prototype.clearRect=function(C,q,X,Q){if(isNaN(C)||isNaN(q)||isNaN(X)||isNaN(Q))throw cn.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(C,q,X,Q))},d.prototype.save=function(C){C=typeof C!="boolean"||C;for(var q=this.pdf.internal.getCurrentPageInfo().pageNumber,X=0;X<this.pdf.internal.getNumberOfPages();X++)this.pdf.setPage(X+1),this.pdf.internal.out("q");
vendor: 4,163 bytes, line 498
498if(this.pdf.setPage(q),C){this.ctx.fontSize=this.pdf.internal.getFontSize();var Q=new u(this.ctx);this.ctxStack.push(this.ctx),this.ctx=Q}},d.prototype.restore=function(C){C=typeof C!="boolean"||C;for(var q=this.pdf.internal.getCurrentPageInfo().pageNumber,X=0;X<this.pdf.internal.getNumberOfPages();X++)this.pdf.setPage(X+1),this.pdf.internal.out("Q");this.pdf.setPage(q),C&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},d.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var f=function(C){var q,X,Q,ee;if(C.isCanvasGradient===!0&&(C=C.getColor()),!C)return{r:0,g:0,b:0,a:0,style:C};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(C))q=0,X=0,Q=0,ee=0;else{var le=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(C);if(le!==null)q=parseInt(le[1]),X=parseInt(le[2]),Q=parseInt(le[3]),ee=1;else if((le=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(C))!==null)q=parseInt(le[1]),X=parseInt(le[2]),Q=parseInt(le[3]),ee=parseFloat(le[4]);else{if(ee=1,typeof C=="string"&&C.charAt(0)!=="#"){var me=new nL(C);C=me.ok?me.toHex():"#000000"}C.length===4?(q=C.substring(1,2),q+=q,X=C.substring(2,3),X+=X,Q=C.substring(3,4),Q+=Q):(q=C.substring(1,3),X=C.substring(3,5),Q=C.substring(5,7)),q=parseInt(q,16),X=parseInt(X,16),Q=parseInt(Q,16)}}return{r:q,g:X,b:Q,a:ee,style:C}},h=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},y=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};d.prototype.fillText=function(C,q,X,Q){if(isNaN(q)||isNaN(X)||typeof C!="string")throw cn.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillText");if(Q=isNaN(Q)?void 0:Q,!h.call(this)){var ee=U(this.ctx.transform.rotation),le=this.ctx.transform.scaleX;j.call(this,{text:C,x:q,y:X,scale:le,angle:ee,align:this.textAlign,maxWidth:Q})}},d.prototype.strokeText=function(C,q,X,Q){if(isNaN(q)||isNaN(X)||typeof C!="string")throw cn.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!y.call(this)){Q=isNaN(Q)?void 0:Q;var ee=U(this.ctx.transform.rotation),le=this.ctx.transform.scaleX;j.call(this,{text:C,x:q,y:X,scale:le,renderingMode:"stroke",angle:ee,align:this.textAlign,maxWidth:Q})}},d.prototype.measureText=function(C){if(typeof C!="string")throw cn.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var q=this.pdf,X=this.pdf.internal.scaleFactor,Q=q.internal.getFontSize(),ee=q.getStringUnitWidth(C)*Q/q.internal.scaleFactor;return new function(le){var me=(le=le||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return me}}),this}({width:ee*=Math.round(96*X/72*1e4)/1e4})},d.prototype.scale=function(C,q){if(isNaN(C)||isNaN(q))throw cn.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var X=new l(C,0,0,q,0,0);this.ctx.transform=this.ctx.transform.multiply(X)},d.prototype.rotate=function(C){if(isNaN(C))throw cn.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var q=new l(Math.cos(C),Math.sin(C),-Math.sin(C),Math.cos(C),0,0);this.ctx.transform=this.ctx.transform.multiply(q)},d.prototype.translate=function(C,q){if(isNaN(C)||isNaN(q))throw cn.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var X=new l(1,0,0,1,C,q);this.ctx.transform=this.ctx.transform.multiply(X)},d.prototype.transform=function(C,q,X,Q,ee,le){if(isNaN(C)||isNaN(q)||isNaN(X)||isNaN(Q)||isNaN(ee)||isNaN(le))throw cn.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to
498jsPDF.context2d.transform");var me=new l(C,q,X,Q,ee,le);this.ctx.transform=this.ctx.transform.multiply(me)},d.prototype.setTransform=function(C,q,X,Q,ee,le){C=isNaN(C)?1:C,q=isNaN(q)?0:q,X=isNaN(X)?0:X,Q=isNaN(Q)?1:Q,ee=isNaN(ee)?0:ee,le=isNaN(le)?0:le,this.ctx.transform=new l(C,q,X,Q,ee,le)};var v=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};d.prototype.drawImage=function(C,q,X,Q,ee,le,me,pe,ge){var Ne=this.pdf.getImageProperties(C),je=1,Re=1,Ke=1,V=1;Q!==void 0&&pe!==void 0&&(Ke=pe/Q,V=ge/ee,je=Ne.width/Q*pe/Q,Re=Ne.height/ee*ge/ee),le===void 0&&(le=q,me=X,q=0,X=0),Q!==void 0&&pe===void 0&&(pe=Q,ge=ee),Q===void 0&&pe===void 0&&(pe=Ne.width,ge=Ne.height);var Te=this.ctx.transform.decompose(),wt=U(Te.rotate.shx),it=new l,_e=(it=(it=(it=it.multiply(Te.translate)).multiply(Te.skew)).multiply(Te.scale)).applyToRectangle(new o(le-q*Ke,me-X*V,Q*je,ee*Re));if(this.autoPaging){for(var et,$e=_.call(this,_e),ot=[],Je=0;Je<$e.length;Je+=1)ot.indexOf($e[Je])===-1&&ot.push($e[Je]);k(ot);for(var Gt=ot[0],It=ot[ot.length-1],ft=Gt;ft<It+1;ft++){this.pdf.setPage(ft);var Nt=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Dt=ft===1?this.posY+this.margin[0]:this.margin[0],Ue=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],vt=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],Xe=ft===1?0:Ue+(ft-2)*vt;if(this.ctx.clip_path.length!==0){var wn=this.path;et=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=x(et,this.posX+this.margin[3],-Xe+Dt+this.ctx.prevPageLastElemOffset),R.call(this,"fill",!0),this.path=wn}var Ft=JSON.parse(JSON.stringify(_e));Ft=x([Ft],this.posX+this.margin[3],-Xe+Dt+this.ctx.prevPageLastElemOffset)[0];var Pt=(ft>Gt||ft<It)&&v.call(this);Pt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],Nt,vt,null).clip().discardPath()),this.pdf.addImage(C,"JPEG",Ft.x,Ft.y,Ft.w,Ft.h,null,null,wt),Pt&&this.pdf.restoreGraphicsState()}}
vendor: 1,820 bytes, line 498
498else this.pdf.addImage(C,"JPEG",_e.x,_e.y,_e.w,_e.h,null,null,wt)};var _=function(C,q,X){var Q=[];q=q||this.pdf.internal.pageSize.width,X=X||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var ee=this.posY+this.ctx.prevPageLastElemOffset;switch(C.type){default:case"mt":case"lt":Q.push(Math.floor((C.y+ee)/X)+1);break;case"arc":Q.push(Math.floor((C.y+ee-C.radius)/X)+1),Q.push(Math.floor((C.y+ee+C.radius)/X)+1);break;case"qct":var le=J(this.ctx.lastPoint.x,this.ctx.lastPoint.y,C.x1,C.y1,C.x,C.y);Q.push(Math.floor((le.y+ee)/X)+1),Q.push(Math.floor((le.y+le.h+ee)/X)+1);break;case"bct":var me=de(this.ctx.lastPoint.x,this.ctx.lastPoint.y,C.x1,C.y1,C.x2,C.y2,C.x,C.y);Q.push(Math.floor((me.y+ee)/X)+1),Q.push(Math.floor((me.y+me.h+ee)/X)+1);break;case"rect":Q.push(Math.floor((C.y+ee)/X)+1),Q.push(Math.floor((C.y+C.h+ee)/X)+1)}for(var pe=0;pe<Q.length;pe+=1)for(;this.pdf.internal.getNumberOfPages()<Q[pe];)w.call(this);return Q},w=function(){var C=this.fillStyle,q=this.strokeStyle,X=this.font,Q=this.lineCap,ee=this.lineWidth,le=this.lineJoin;this.pdf.addPage(),this.fillStyle=C,this.strokeStyle=q,this.font=X,this.lineCap=Q,this.lineWidth=ee,this.lineJoin=le},x=function(C,q,X){for(var Q=0;Q<C.length;Q++)switch(C[Q].type){case"bct":C[Q].x2+=q,C[Q].y2+=X;case"qct":C[Q].x1+=q,C[Q].y1+=X;default:C[Q].x+=q,C[Q].y+=X}return C},k=function(C){return C.sort(function(q,X){return q-X})},N=function(C,q){var X=this.fillStyle,Q=this.strokeStyle,ee=this.lineCap,le=this.lineWidth,me=Math.abs(le*this.ctx.transform.scaleX),pe=this.lineJoin;if(this.autoPaging){for(var ge,Ne,je=JSON.parse(JSON.stringify(this.path)),Re=JSON.parse(JSON.stringify(this.path)),Ke=[],V=0;V<Re.length;V++)if(Re[V].x!==void 0)for(var Te=_.call(this,Re[V]),wt=0;wt<Te.length;wt+=1)Ke.indexOf(Te[wt])===-1&&Ke.push(Te[wt]);for(var it=0;
vendor: 44,984 bytes, lines 498-506
498it<Ke.length;it++)for(;this.pdf.internal.getNumberOfPages()<Ke[it];)w.call(this);k(Ke);for(var _e=Ke[0],et=Ke[Ke.length-1],$e=_e;$e<et+1;$e++){this.pdf.setPage($e),this.fillStyle=X,this.strokeStyle=Q,this.lineCap=ee,this.lineWidth=me,this.lineJoin=pe;var ot=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],Je=$e===1?this.posY+this.margin[0]:this.margin[0],Gt=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],It=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ft=$e===1?0:Gt+($e-2)*It;if(this.ctx.clip_path.length!==0){var Nt=this.path;ge=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=x(ge,this.posX+this.margin[3],-ft+Je+this.ctx.prevPageLastElemOffset),R.call(this,C,!0),this.path=Nt}if(Ne=JSON.parse(JSON.stringify(je)),this.path=x(Ne,this.posX+this.margin[3],-ft+Je+this.ctx.prevPageLastElemOffset),q===!1||$e===0){var Dt=($e>_e||$e<et)&&v.call(this);Dt&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ot,It,null).clip().discardPath()),R.call(this,C,q),Dt&&this.pdf.restoreGraphicsState()}this.lineWidth=le}this.path=je}else this.lineWidth=me,R.call(this,C,q),this.lineWidth=le},R=function(C,q){if((C!=="stroke"||q||!y.call(this))&&(C==="stroke"||q||!h.call(this))){for(var X,Q,ee=[],le=this.path,me=0;me<le.length;me++){var pe=le[me];switch(pe.type){case"begin":ee.push({begin:!0});break;case"close":ee.push({close:!0});break;case"mt":ee.push({start:pe,deltas:[],abs:[]});break;case"lt":var ge=ee.length;if(le[me-1]&&!isNaN(le[me-1].x)&&(X=[pe.x-le[me-1].x,pe.y-le[me-1].y],ge>0)){for(;ge>=0;ge--)if(ee[ge-1].close!==!0&&ee[ge-1].begin!==!0){ee[ge-1].deltas.push(X),ee[ge-1].abs.push(pe);break}}break;case"bct":X=[pe.x1-le[me-1].x,pe.y1-le[me-1].y,pe.x2-le[me-1].x,pe.y2-le[me-1].y,pe.x-le[me-1].x,pe.y-le[me-1].y],ee[ee.length-1].deltas.push(X);break;case"qct":var Ne=le[me-1].x+2/3*(pe.x1-le[me-1].x),je=le[me-1].y+2/3*(pe.y1-le[me-1].y),Re=pe.x+2/3*(pe.x1-pe.x),Ke=pe.y+2/3*(pe.y1-pe.y),V=pe.x,Te=pe.y;X=[Ne-le[me-1].x,je-le[me-1].y,Re-le[me-1].x,Ke-le[me-1].y,V-le[me-1].x,Te-le[me-1].y],ee[ee.length-1].deltas.push(X);break;case"arc":ee.push({deltas:[],abs:[],arc:!0}),Array.isArray(ee[ee.length-1].abs)&&ee[ee.length-1].abs.push(pe)}}Q=q?null:C==="stroke"?"stroke":"fill";for(var wt=!1,it=0;it<ee.length;it++)if(ee[it].arc)for(var _e=ee[it].abs,et=0;et<_e.length;et++){var $e=_e[et];$e.type==="arc"?M.call(this,$e.x,$e.y,$e.radius,$e.startAngle,$e.endAngle,$e.counterclockwise,void 0,q,!wt):W.call(this,$e.x,$e.y),wt=!0}else if(ee[it].close===!0)this.pdf.internal.out("h"),wt=!1;else if(ee[it].begin!==!0){var ot=ee[it].start.x,Je=ee[it].start.y;z.call(this,ee[it].deltas,ot,Je),wt=!0}Q&&I.call(this,Q),q&&G.call(this)}},H=function(C){var q=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,X=q*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return C-X;case"top":return C+q-X;case"hanging":return C+q-2*X;case"middle":return C+q/2-X;default:return C}},F=function(C){return C+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};d.prototype.createLinearGradient=function(){var C=function(){};return C.colorStops=[],C.addColorStop=function(q,X){this.colorStops.push([q,X])},C.getColor=function(){return this.colorStops.length===0?"#000000":this.colorStops[0][1]},C.isCanvasGradient=!0,C},d.prototype.createPattern=function(){return this.createLinearGradient()},d.prototype.createRadialGradient=function(){return this.createLinearGradient()};var M=function(C,q,X,Q,ee,le,me,pe,ge){for(var Ne=ne.call(this,X,Q,ee,le),je=0;je<Ne.length;je++){var Re=Ne[je];je===0&&(ge?L.call(this,Re.x1+C,Re.y1+q):W.call(this,Re.x1+C,Re.y1+q)),re.call(this,C,q,Re.x2,Re.y2,Re.x3,Re.y3,Re.x4,Re.y4)}pe?G.call(this):I.call(this,me)},I=function(C){switch(C){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},G=function(){this.pdf.clip(),this.pdf.discardPath()},L=function(C,q){this.pdf.internal.out(n(C)+" "+r(q)+" m")},j=function(C){var q;switch(C.align){case"right":case"end":q="right";break;case"center":q="center";break;default:q="left"}var X,Q,ee,le=this.pdf.getTextDimensions(C.text),me=H.call(this,C.y),pe=F.call(this,me)-le.h,ge=this.ctx.transform.applyToPoint(new a(C.x,me));if(this.autoPaging){var Ne=this.ctx.transform.decompose(),je=new l;je=(je=(je=je.multiply(Ne.translate)).multiply(Ne.skew)).multiply(Ne.scale);for(var Re=this.ctx.transform.applyToRectangle(new o(C.x,me,le.w,le.h)),Ke=je.applyToRectangle(new o(C.x,pe,le.w,le.h)),V=_.call(this,Ke),Te=[],wt=0;wt<V.length;wt+=1)Te.indexOf(V[wt])===-1&&Te.push(V[wt]);k(Te);for(var it=Te[0],_e=Te[Te.length-1],et=it;et<_e+1;et++){this.pdf.setPage(et);var $e=et===1?this.posY+this.margin[0]:this.margin[0],ot=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],Je=this.pdf.internal.pageSize.height-this.margin[2],Gt=Je-this.margin[0],It=this.pdf.internal.pageSize.width-this.margin[1],ft=It-this.margin[3],Nt=et===1?0:ot+(et-2)*Gt;if(this.ctx.clip_path.length!==0){var Dt=this.path;X=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=x(X,this.posX+this.margin[3],-1*Nt+$e),R.call(this,"fill",!0),this.path=Dt}var Ue=x([JSON.parse(JSON.stringify(Ke))],this.posX+this.margin[3],-Nt+$e+this.ctx.prevPageLastElemOffset)[0];C.scale>=.01&&(Q=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Q*C.scale),ee=this.lineWidth,this.lineWidth=ee*C.scale);var vt=this.autoPaging!=="text";if(vt||Ue.y+Ue.h<=Je){if(vt||Ue.y>=$e&&Ue.x<=It){var Xe=vt?C.text:this.pdf.splitTextToSize(C.text,C.maxWidth||It-Ue.x)[0],wn=x([JSON.parse(JSON.stringify(Re))],this.posX+this.margin[3],-Nt+$e+this.ctx.prevPageLastElemOffset)[0],Ft=vt&&(et>it||et<_e)&&v.call(this);Ft&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],ft,Gt,null).clip().discardPath()),this.pdf.text(Xe,wn.x,wn.y,{angle:C.angle,align:q,renderingMode:C.renderingMode}),Ft&&this.pdf.restoreGraphicsState()}}else Ue.y<Je&&(this.ctx.prevPageLastElemOffset+=Je-Ue.y);C.scale>=.01&&(this.pdf.setFontSize(Q),this.lineWidth=ee)}}else C.scale>=.01&&(Q=this.pdf.internal.getFontSize(),this.pdf.setFontSize(Q*C.scale),ee=this.lineWidth,this.lineWidth=ee*C.scale),this.pdf.text(C.text,ge.x+this.posX,ge.y+this.posY,{angle:C.angle,align:q,renderingMode:C.renderingMode,maxWidth:C.maxWidth}),C.scale>=.01&&(this.pdf.setFontSize(Q),this.lineWidth=ee)},W=function(C,q,X,Q){X=X||0,Q=Q||0,this.pdf.internal.out(n(C+X)+" "+r(q+Q)+" l")},z=function(C,q,X){return this.pdf.lines(C,q,X,null,null)},re=function(C,q,X,Q,ee,le,me,pe){this.pdf.internal.out([e(i(X+C)),e(s(Q+q)),e(i(ee+C)),e(s(le+q)),e(i(me+C)),e(s(pe+q)),"c"].join(" "))},ne=function(C,q,X,Q){for(var ee=2*Math.PI,le=Math.PI/2;q>X;)q-=ee;var me=Math.abs(X-q);me<ee&&Q&&(me=ee-me);for(var pe=[],ge=Q?-1:1,Ne=q;me>1e-5;){var je=Ne+ge*Math.min(me,le);pe.push(oe.call(this,C,Ne,je)),me-=Math.abs(je-Ne),Ne=je}return pe},oe=function(C,q,X){var Q=(X-q)/2,ee=C*Math.cos(Q),le=C*Math.sin(Q),me=ee,pe=-le,ge=me*me+pe*pe,Ne=ge+me*ee+pe*le,je=4/3*(Math.sqrt(2*ge*Ne)-Ne)/(me*le-pe*ee),Re=me-je*pe,Ke=pe+je*me,V=Re,Te=-Ke,wt=Q+q,it=Math.cos(wt),_e=Math.sin(wt);return{x1:C*Math.cos(q),y1:C*Math.sin(q),x2:Re*it-Ke*_e,y2:Re*_e+Ke*it,x3:V*it-Te*_e,y3:V*_e+Te*it,x4:C*Math.cos(X),y4:C*Math.sin(X)}},U=function(C){return 180*C/Math.PI},J=function(C,q,X,Q,ee,le){var me=C+.5*(X-C),pe=q+.5*(Q-q),ge=ee+.5*(X-ee),Ne=le+.5*(Q-le),je=Math.min(C,ee,me,ge),Re=Math.max(C,ee,me,ge),Ke=Math.min(q,le,pe,Ne),V=Math.max(q,le,pe,Ne);return new o(je,Ke,Re-je,V-Ke)},de=function(C,q,X,Q,ee,le,me,pe){var ge,Ne,je,Re,Ke,V,Te,wt,it,_e,et,$e,ot,Je,Gt=X-C,It=Q-q,ft=ee-X,Nt=le-Q,Dt=me-ee,Ue=pe-le;for(Ne=0;Ne<41;Ne++)it=(Te=(je=C+(ge=Ne/40)*Gt)+ge*((Ke=X+ge*ft)-je))+ge*(Ke+ge*(ee+ge*Dt-Ke)-Te),_e=(wt=(Re=q+ge*It)+ge*((V=Q+ge*Nt)-Re))+ge*(V+ge*(le+ge*Ue-V)-wt),Ne==0?(et=it,$e=_e,ot=it,Je=_e):(et=Math.min(et,it),$e=Math.min($e,_e),ot=Math.max(ot,it),Je=Math.max(Je,_e));return new o(Math.round(et),Math.round($e),Math.round(ot-et),Math.round(Je-$e))},ie=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var C,q,X=(C=this.ctx.lineDash,q=this.ctx.lineDashOffset,JSON.stringify({lineDash:C,lineDashOffset:q}));this.prevLineDash!==X&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=X)}}})(nt.API),function(t){var e=function(a){var o,l,c,u,d,f,h,y,v,_;for(l=[],c=0,u=(a+=o="\0\0\0\0".slice(a.length%4||4)).length;u>c;c+=4)(d=(a.charCodeAt(c)<<24)+(a.charCodeAt(c+1)<<16)+(a.charCodeAt(c+2)<<8)+a.charCodeAt(c+3))!==0?(f=(d=((d=((d=((d=(d-(_=d%85))/85)-(v=d%85))/85)-(y=d%85))/85)-(h=d%85))/85)%85,l.push(f+33,h+33,y+33,v+33,_+33)):l.push(122);return function(w,x){for(var k=x;k>0;k--)w.pop()}(l,o.length),String.fromCharCode.apply(String,l)+"~>"},n=function(a){var o,l,c,u,d,f=String,h="length",y=255,v="charCodeAt",_="slice",w="replace";for(a[_](-2),a=a[_](0,-2)[w](/\s/g,"")[w]("z","!!!!!"),c=[],u=0,d=(a+=o="uuuuu"[_](a[h]%5||5))[h];d>u;u+=5)l=52200625*(a[v](u)-33)+614125*(a[v](u+1)-33)+7225*(a[v](u+2)-33)+85*(a[v](u+3)-33)+(a[v](u+4)-33),c.push(y&l>>24,y&l>>16,y&l>>8,y&l);return function(x,k){for(var N=k;N>0;N--)x.pop()}(c,o[h]),f.fromCharCode.apply(f,c)},r=function(a){return a.split("").map(function(o){return("0"+o.charCodeAt().toString(16)).slice(-2)}).join("")+">"},i=function(a){var o=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((a=a.replace(/\s/g,"")).indexOf(">")!==-1&&(a=a.substr(0,a.indexOf(">"))),a.length%2&&(a+="0"),o.test(a)===!1)return"";for(var l="",c=0;c<a.length;c+=2)l+=String.fromCharCode("0x"+(a[c]+a[c+1]));return l},s=function(a){for(var o=new Uint8Array(a.length),l=a.length;l--;)o[l]=a.charCodeAt(l);return(o=rb(o)).reduce(function(c,u){return c+String.fromCharCode(u)},"")};t.processDataByFilters=function(a,o){var l=0,c=a||"",u=[];for(typeof(o=o||[])=="string"&&(o=[o]),l=0;l<o.length;l+=1)switch(o[l]){case"ASCII85Decode":case"/ASCII85Decode":c=n(c),u.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":c=e(c),u.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":c=i(c),u.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":c=r(c),u.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":c=s(c),u.push("/FlateDecode");break;default:throw new Error('The filter: "'+o[l]+'" is not implemented')}return{data:c,reverseChain:u.reverse().join(" ")}}}(nt.API),function(t){t.loadFile=function(e,n,r){return function(i,s,a){s=s!==!1,a=typeof a=="function"?a:function(){};var o=void 0;try{o=function(l,c,u){var d=new XMLHttpRequest,f=0,h=function(y){var v=y.length,_=[],w=String.fromCharCode;for(f=0;f<v;f+=1)_.push(w(255&y.charCodeAt(f)));return _.join("")};if(d.open("GET",l,!c),d.overrideMimeType("text/plain; charset=x-user-defined"),c===!1&&(d.onload=function(){d.status===200?u(h(this.responseText)):u(void 0)}),d.send(null),c&&d.status===200)return h(d.responseText)}(i,s,a)}catch{}return o}(e,n,r)},t.loadImageFile=t.loadFile}(nt.API),function(t){function e(){return(pt.html2canvas?Promise.resolve(pt.html2canvas):By(()=>import("./html2canvas.esm-CBrSDip1.js"),[])).catch(function(o){return Promise.reject(new Error("Could not load html2canvas: "+o))}).then(function(o){return o.default?o.default:o})}function n(){return(pt.DOMPurify?Promise.resolve(pt.DOMPurify):By(()=>import("./purify.es-Jn2rvFN8.js"),[])).catch(function(o){return Promise.reject(new Error("Could not load dompurify: "+o))}).then(function(o){return o.default?o.default:o})}var r=function(o){var l=rn(o);return l==="undefined"?"undefined":l==="string"||o instanceof String?"string":l==="number"||o instanceof Number?"number":l==="function"||o instanceof Function?"function":o&&o.constructor===Array?"array":o&&o.nodeType===1?"element":l==="object"?"object":"unknown"},i=function(o,l){var c=document.createElement(o);for(var u in l.className&&(c.className=l.className),l.innerHTML&&l.dompurify&&(c.innerHTML=l.dompurify.sanitize(l.innerHTML)),l.style)c.style[u]=l.style[u];return c},s=function o(l,c){for(var u=l.nodeType===3?document.createTextNode(l.nodeValue):l.cloneNode(!1),d=l.firstChild;d;d=d.nextSibling)c!==!0&&d.nodeType===1&&d.nodeName==="SCRIPT"||u.appendChild(o(d,c));return l.nodeType===1&&(l.nodeName==="CANVAS"?(u.width=l.width,u.height=l.height,u.getContext("2d").drawImage(l,0,0)):l.nodeName!=="TEXTAREA"&&l.nodeName!=="SELECT"||(u.value=l.value),u.addEventListener("load",function(){u.scrollTop=l.scrollTop,u.scrollLeft=l.scrollLeft},!0)),u},a=function o(l){var c=Object.assign(o.convert(Promise.resolve()),JSON.parse(JSON.stringify(o.template))),u=o.convert(Promise.resolve(),c);return(u=u.setProgress(1,o,1,[o])).set(l)};(a.prototype=Object.create(Promise.prototype)).constructor=a,a.convert=function(o,l){return o.__proto__=l||a.prototype,o},a.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},a.prototype.from=function(o,l){return this.then(function(){switch(l=l||function(c){switch(r(c)){case"string":return"string";case"element":return c.nodeName.toLowerCase()==="canvas"?"canvas":"element";default:return"unknown"}}(o),l){case"string":return this.then(n).then(function(c){return this.set({src:i("div",{innerHTML:o,dompurify:c})})});case"element":return this.set({src:o});case"canvas":return this.set({canvas:o});case"img":return this.set({img:o});default:return this.error("Unknown source type.")}})},a.prototype.to=function(o){switch(o){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},a.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var o={position:"relative",display:"inline-block",width:(typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},l=s(this.prop.src,this.opt.html2canvas.javascriptEnabled);l.tagName==="BODY"&&(o.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=i("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=i("div",{className:"html2pdf__container",style:o}),this.prop.container.appendChild(l),this.prop.container.firstChild.appendChild(i("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},a.prototype.toCanvas=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(e).then(function(l){var c=Object.assign({},this.opt.html2canvas);return delete c.onrendered,l(this.prop.container,c)}).then(function(l){(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},a.prototype.toContext2d=function(){var o=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(o).then(e).then(function(l){var c=this.opt.jsPDF,u=this.opt.fontFaces,d=typeof this.opt.width!="number"||isNaN(this.opt.width)||typeof this.opt.windowWidth!="number"||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,f=Object.assign({async:!0,allowTaint:!0,scale:d,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete f.onrendered,c.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,c.context2d.posX=this.opt.x,c.context2d.posY=this.opt.y,c.context2d.margin=this.opt.margin,c.context2d.fontFaces=u,u)for(var h=0;h<u.length;++h){var y=u[h],v=y.src.find(function(_){return _.format==="truetype"});v&&c.addFont(v.url,y.ref.name,y.ref.style)}return f.windowHeight=f.windowHeight||0,f.windowHeight=f.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):f.windowHeight,c.context2d.save(!0),l(this.prop.container,f)}).then(function(l){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(l),this.prop.canvas=l,document.body.removeChild(this.prop.overlay)})},a.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var o=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=o})},a.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},a.prototype.output=function(o,l,c){return(c=c||"pdf").toLowerCase()==="img"||c.toLowerCase()==="image"?this.outputImg(o,l):this.outputPdf(o,l)},a.prototype.outputPdf=function(o,l){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(o,l)})},a.prototype.outputImg=function(o){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(o){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+o+'" is not supported.'}})},a.prototype.save=function(o){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(o?{filename:o}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},a.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},a.prototype.set=function(o){if(r(o)!=="object")return this;var l=Object.keys(o||{}).map(function(c){if(c in a.template.prop)return function(){this.prop[c]=o[c]};switch(c){case"margin":return this.setMargin.bind(this,o.margin);case"jsPDF":return function(){return this.opt.jsPDF=o.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,o.pageSize);default:return function(){this.opt[c]=o[c]}}},this);return this.then(function(){return this.thenList(l)})},a.prototype.get=function(o,l){return this.then(function(){var c=o in a.template.prop?this.prop[o]:this.opt[o];return l?l(c):c})},a.prototype.setMargin=function(o){return this.then(function(){switch(r(o)){case"number":o=[o,o,o,o];case"array":if(o.length===2&&(o=[o[0],o[1],o[0],o[1]]),o.length===4)break;default:return this.error("Invalid margin array.")}this.opt.margin=o}).then(this.setPageSize)},a.prototype.setPageSize=function(o){function l(c,u){return Math.floor(c*u/72*96)}return this.then(function(){(o=o||nt.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(o.inner={width:o.width-this.opt.margin[1]-this.opt.margin[3],height:o.height-this.opt.margin[0]-this.opt.margin[2]},o.inner.px={width:l(o.inner.width,o.k),height:l(o.inner.height,o.k)},o.inner.ratio=o.inner.height/o.inner.width),this.prop.pageSize=o})},a.prototype.setProgress=function(o,l,c,u){return o!=null&&(this.progress.val=o),l!=null&&(this.progress.state=l),c!=null&&(this.progress.n=c),u!=null&&(this.progress.stack=u),this.progress.ratio=this.progress.val/this.progress.state,this},a.prototype.updateProgress=function(o,l,c,u){return this.setProgress(o?this.progress.val+o:null,l||null,c?this.progress.n+c:null,u?this.progress.stack.concat(u):null)},a.prototype.then=function(o,l){var c=this;return this.thenCore(o,l,function(u,d){return c.updateProgress(null,null,1,[u]),Promise.prototype.then.call(this,function(f){return c.updateProgress(null,u),f}).then(u,d).then(function(f){return c.updateProgress(1),f})})},a.prototype.thenCore=function(o,l,c){c=c||Promise.prototype.then;var u=this;o&&(o=o.bind(u)),l&&(l=l.bind(u));var d=Promise.toString().indexOf("[native code]")!==-1&&Promise.name==="Promise"?u:a.convert(Object.assign({},u),Promise.prototype),f=c.call(d,o,l);return a.convert(f,u.__proto__)},a.prototype.thenExternal=function(o,l){return Promise.prototype.then.call(this,o,l)},a.prototype.thenList=function(o){var l=this;return o.forEach(function(c){l=l.thenCore(c)}),l},a.prototype.catch=function(o){o&&(o=o.bind(this));var l=Promise.prototype.catch.call(this,o);return a.convert(l,this)},a.prototype.catchExternal=function(o){return Promise.prototype.catch.call(this,o)},a.prototype.error=function(o){return this.then(function(){throw new Error(o)})},a.prototype.using=a.prototype.set,a.prototype.saveAs=a.prototype.save,a.prototype.export=a.prototype.output,a.prototype.run=a.prototype.then,nt.getPageSize=function(o,l,c){if(rn(o)==="object"){var u=o;o=u.orientation,l=u.unit||l,c=u.format||c}l=l||"mm",c=c||"a4",o=(""+(o||"P")).toLowerCase();var d,f=(""+c).toLowerCase(),h={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(l){case"pt":d=1;break;case"mm":d=72/25.4;break;case"cm":d=72/2.54;break;case"in":d=72;break;case"px":d=.75;break;case"pc":case"em":d=12;break;case"ex":d=6;break;default:throw"Invalid unit: "+l}var y,v=0,_=0;if(h.hasOwnProperty(f))v=h[f][1]/d,_=h[f][0]/d;else try{v=c[1],_=c[0]}catch{throw new Error("Invalid format: "+c)}if(o==="p"||o==="portrait")o="p",_>v&&(y=_,_=v,v=y);else{if(o!=="l"&&o!=="landscape")throw"Invalid orientation: "+o;o="l",v>_&&(y=_,_=v,v=y)}return{width:_,height:v,unit:l,k:d,orientation:o}},t.html=function(o,l){(l=l||{}).callback=l.callback||function(){},l.html2canvas=l.html2canvas||{},l.html2canvas.canvas=l.html2canvas.canvas||this.canvas,l.jsPDF=l.jsPDF||this,l.fontFaces=l.fontFaces?l.fontFaces.map(h2):null;var c=new a(l);return l.worker?c:c.from(o).doCallback()}}(nt.API),nt.API.addJS=function(t){return BN=t,this.internal.events.subscribe("postPutResources",function(){vg=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(vg+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),UN=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+BN+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){vg!==void 0&&UN!==void 0&&this.internal.out("/Names <</JavaScript "+vg+" 0 R>>")}),this},function(t){var e;t.events.push(["postPutResources",function(){var n=this,r=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var i=n.outline.render().split(/\r\n/),s=0;s<i.length;s++){var a=i[s],o=r.exec(a);if(o!=null){var l=o[1];n.internal.newObjectDeferredBegin(l,!1)}n.internal.write(a)}if(this.outline.createNamedDestinations){var c=this.internal.pages.length,u=[];for(s=0;s<c;s++){var d=n.internal.newObject();u.push(d);var f=n.internal.getPageInfo(s+1);n.internal.write("<< /D["+f.objId+" 0 R /XYZ null null null]>> endobj")}var h=n.internal.newObject();for(n.internal.write("<< /Names [ "),s=0;s<u.length;s++)n.internal.write("(page_"+(s+1)+")"+u[s]+" 0 R");n.internal.write(" ] >>","endobj"),e=n.internal.newObject(),n.internal.write("<< /Dests "+h+" 0 R"),n.internal.write(">>","endobj")}}]),t.events.push(["putCatalog",function(){var n=this;n.outline.root.children.length>0&&(n.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&n.internal.write("/Names "+e+" 0 R"))}]),t.events.push(["initialized",function(){var n=this;n.outline={createNamedDestinations:!1,root:{children:[]}},n.outline.add=function(r,i,s){var a={title:i,options:s,children:[]};return r==null&&(r=this.root),r.children.push(a),a},n.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=n,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},n.outline.genIds_r=function(r){r.id=n.internal.newObjectDeferred();for(var i=0;i<r.children.length;i++)this.genIds_r(r.children[i])},n.outline.renderRoot=function(r){this.objStart(r),this.line("/Type /Outlines"),r.children.length>0&&(this.line("/First "+this.makeRef(r.children[0])),this.line("/Last "+this.makeRef(r.children[r.children.length-1]))),this.line("/Count "+this.count_r({count:0},r)),this.objEnd()},n.outline.renderItems=function(r){for(var i=this.ctx.pdf.internal.getVerticalCoordinateString,s=0;s<r.children.length;s++){var a=r.children[s];this.objStart(a),this.line("/Title "+this.makeString(a.title)),this.line("/Parent "+this.makeRef(r)),s>0&&this.line("/Prev "+this.makeRef(r.children[s-1])),s<r.children.length-1&&this.line("/Next "+this.makeRef(r.children[s+1])),a.children.length>0&&(this.line("/First "+this.makeRef(a.children[0])),this.line("/Last "+this.makeRef(a.children[a.children.length-1])));var o=this.count=this.count_r({count:0},a);if(o>0&&this.line("/Count "+o),a.options&&a.options.pageNumber){var l=n.internal.getPageInfo(a.options.pageNumber);this.line("/Dest ["+l.objId+" 0 R /XYZ 0 "+i(0)+" 0]")}this.objEnd()}for(var c=0;c<r.children.length;c++)this.renderItems(r.children[c])},n.outline.line=function(r){this.ctx.val+=r+`\r 499`},n.outline.makeRef=function(r){return r.id+" 0 R"},n.outline.makeString=function(r){return"("+n.internal.pdfEscape(r)+")"},n.outline.objStart=function(r){this.ctx.val+=`\r 500`+r.id+` 0 obj\r 501<<\r 502`},n.outline.objEnd=function(){this.ctx.val+=`>> \r 503endobj\r 504`},n.outline.count_r=function(r,i){for(var s=0;s<i.children.length;s++)r.count++,this.count_r(r,i.children[s]);return r.count}}])}(nt.API),function(t){var e=[192,193,194,195,196,197,198,199];t.processJPEG=function(n,r,i,s,a,o){var l,c=this.decode.DCT_DECODE,u=null;if(typeof n=="string"||this.__addimage__.isArrayBuffer(n)||this.__addimage__.isArrayBufferView(n)){switch(n=a||n,n=this.__addimage__.isArrayBuffer(n)?new Uint8Array(n):n,l=function(d){for(var f,h=256*d.charCodeAt(4)+d.charCodeAt(5),y=d.length,v={width:0,height:0,numcomponents:1},_=4;_<y;_+=2){if(_+=h,e.indexOf(d.charCodeAt(_+1))!==-1){f=256*d.charCodeAt(_+5)+d.charCodeAt(_+6),v={width:256*d.charCodeAt(_+7)+d.charCodeAt(_+8),height:f,numcomponents:d.charCodeAt(_+9)};break}h=256*d.charCodeAt(_+2)+d.charCodeAt(_+3)}return v}(n=this.__addimage__.isArrayBufferView(n)?this.__addimage__.arrayBufferToBinaryString(n):n),l.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}u={data:n,width:l.width,height:l.height,colorSpace:o,bitsPerComponent:8,filter:c,index:r,alias:i}}return u}}(nt.API),nt.API.processPNG=function(t,e,n,r){if(this.__addimage__.isArrayBuffer(t)&&(t=new Uint8Array(t)),this.__addimage__.isArrayBufferView(t)){var i,s=jY(t,{checkCrc:!0}),a=s.width,o=s.height,l=s.channels,c=s.palette,u=s.depth;i=c&&l===1?function(M){for(var I=M.width,G=M.height,L=M.data,j=M.palette,W=M.depth,z=!1,re=[],ne=[],oe=void 0,U=!1,J=0,de=0;de<j.length;de++){var ie=OE(j[de],4),C=ie[0],q=ie[1],X=ie[2],Q=ie[3];re.push(C,q,X),Q!=null&&(Q===0?(J++,ne.length<1&&ne.push(de)):Q<255&&(U=!0))}if(U||J>1){z=!0,ne=void 0;var ee=I*G;oe=new Uint8Array(ee);for(var le=new DataView(L.buffer),me=0;me<ee;me++){var pe=p2(le,me,W),ge=OE(j[pe],4)[3];oe[me]=ge}}else J===0&&(ne=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:z?8:void 0,colorBytes:L,alphaBytes:oe,needSMask:z,palette:re,mask:ne}}(s):l===2||l===4?function(M){for(var I=M.data,G=M.width,L=M.height,j=M.channels,W=M.depth,z=j===2?"DeviceGray":"DeviceRGB",re=j-1,ne=G*L,oe=re,U=ne*oe,J=1*ne,de=Math.ceil(U*W/8),ie=Math.ceil(J*W/8),C=new Uint8Array(de),q=new Uint8Array(ie),X=new DataView(I.buffer),Q=new DataView(C.buffer),ee=new DataView(q.buffer),le=!1,me=0;me<ne;me++){for(var pe=me*j,ge=0;ge<oe;ge++)JN(Q,p2(X,pe+ge,W),me*oe+ge,W);var Ne=p2(X,pe+oe,W);Ne<(1<<W)-1&&(le=!0),JN(ee,Ne,1*me,W)}return{colorSpace:z,colorsPerPixel:re,sMaskBitsPerComponent:le?W:void 0,colorBytes:C,alphaBytes:q,needSMask:le}}(s):function(M){var I=M.data,G=M.channels===1?"DeviceGray":"DeviceRGB";return{colorSpace:G,colorsPerPixel:G==="DeviceGray"?1:3,colorBytes:I instanceof Uint16Array?function(L){for(var j=L.length,W=new Uint8Array(2*j),z=new DataView(W.buffer,W.byteOffset,W.byteLength),re=0;re<j;re++)z.setUint16(2*re,L[re],!1);return W}(I):I,needSMask:!1}}(s);var d,f,h,y=i,v=y.colorSpace,_=y.colorsPerPixel,w=y.sMaskBitsPerComponent,x=y.colorBytes,k=y.alphaBytes,N=y.needSMask,R=y.palette,H=y.mask,F=null;return r!==nt.API.image_compression.NONE&&typeof rb=="function"?(F=function(M){var I;switch(M){case nt.API.image_compression.FAST:I=11;break;case nt.API.image_compression.MEDIUM:I=13;break;case nt.API.image_compression.SLOW:I=14;break;default:I=12}return I}(r),d=this.decode.FLATE_DECODE,f="/Predictor ".concat(F," /Colors ").concat(_," /BitsPerComponent ").concat(u," /Columns ").concat(a),t=VN(x,Math.ceil(a*_*u/8),_,u,r),N&&(h=VN(k,Math.ceil(a*w/8),1,w,r))):(d=void 0,f=void 0,t=x,N&&(h=k)),(this.__addimage__.isArrayBuffer(t)||this.__addimage__.isArrayBufferView(t))&&(t=this.__addimage__.arrayBufferToBinaryString(t)),(h&&this.__addimage__.isArrayBuffer(h)||this.__addimage__.isArrayBufferView(h))&&(h=this.__addimage__.arrayBufferToBinaryString(h)),{alias:n,data:t,index:e,filter:d,decodeParameters:f,transparency:H,palette:R,sMask:h,predictor:F,width:a,height:o,bitsPerComponent:u,sMaskBitsPerComponent:w,colorSpace:v}}},function(t){t.processGIF89A=function(e,n,r,i){var s=new eJ(e),a=s.width,o=s.height,l=[];s.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:a,height:o},u=new m2(100).encode(c,100);return t.processJPEG.call(this,u,n,r,i)},t.processGIF87A=t.processGIF89A}(nt.API),ps.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var t=this.colors===0?1<<this.bitPP:this.colors;this.palette=new Array(t);for(var e=0;e<t;e++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0);this.palette[e]={red:i,green:r,blue:n,quad:s}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},ps.prototype.parseBGR=function(){this.pos=this.offset;try{var t="bit"+this.bitPP,e=this.width*this.height*4;this.data=new Uint8Array(e),this[t]()}catch(n){cn.log("bit decode error:"+n)}},ps.prototype.bit1=function(){var t,e=Math.ceil(this.width/8),n=e%4;for(t=this.height-1;t>=0;t--){for(var r=this.bottom_up?t:this.height-1-t,i=0;i<e;i++)for(var s=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+8*i*4,o=0;o<8&&8*i+o<this.width;o++){var l=this.palette[s>>7-o&1];this.data[a+4*o]=l.blue,this.data[a+4*o+1]=l.green,this.data[a+4*o+2]=l.red,this.data[a+4*o+3]=255}n!==0&&(this.pos+=4-n)}},ps.prototype.bit4=function(){for(var t=Math.ceil(this.width/2),e=t%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<t;i++){var s=this.datav.getUint8(this.pos++,!0),a=r*this.width*4+2*i*4,o=s>>4,l=15&s,c=this.palette[o];if(this.data[a]=c.blue,this.data[a+1]=c.green,this.data[a+2]=c.red,this.data[a+3]=255,2*i+1>=this.width)break;c=this.palette[l],this.data[a+4]=c.blue,this.data[a+4+1]=c.green,this.data[a+4+2]=c.red,this.data[a+4+3]=255}e!==0&&(this.pos+=4-e)}},ps.prototype.bit8=function(){for(var t=this.width%4,e=this.height-1;e>=0;e--){for(var n=this.bottom_up?e:this.height-1-e,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),s=n*this.width*4+4*r;if(i<this.palette.length){var a=this.palette[i];this.data[s]=a.red,this.data[s+1]=a.green,this.data[s+2]=a.blue,this.data[s+3]=255}else this.data[s]=255,this.data[s+1]=255,this.data[s+2]=255,this.data[s+3]=255}t!==0&&(this.pos+=4-t)}},ps.prototype.bit15=function(){for(var t=this.width%3,e=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var a=(s&e)/e*255|0,o=(s>>5&e)/e*255|0,l=(s>>10&e)/e*255|0,c=s>>15?255:0,u=r*this.width*4+4*i;this.data[u]=l,this.data[u+1]=o,this.data[u+2]=a,this.data[u+3]=c}this.pos+=t}},ps.prototype.bit16=function(){for(var t=this.width%3,e=parseInt("11111",2),n=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,s=0;s<this.width;s++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&e)/e*255|0,l=(a>>5&n)/n*255|0,c=(a>>11)/e*255|0,u=i*this.width*4+4*s;this.data[u]=c,this.data[u+1]=l,this.data[u+2]=o,this.data[u+3]=255}this.pos+=t}},ps.prototype.bit24=function(){for(var t=this.height-1;t>=0;t--){for(var e=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=e*this.width*4+4*n;this.data[a]=s,this.data[a+1]=i,this.data[a+2]=r,this.data[a+3]=255}this.pos+=this.width%4}},ps.prototype.bit32=function(){for(var t=this.height-1;t>=0;t--)for(var e=this.bottom_up?t:this.height-1-t,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=e*this.width*4+4*n;this.data[o]=s,this.data[o+1]=i,this.data[o+2]=r,this.data[o+3]=a}},ps.prototype.getData=function(){return this.data},function(t){t.processBMP=function(e,n,r,i){var s=new ps(e,!1),a=s.width,o=s.height,l={data:s.getData(),width:a,height:o},c=new m2(100).encode(l,100);return t.processJPEG.call(this,c,n,r,i)}}(nt.API),QN.prototype.getData=function(){return this.data},function(t){t.processWEBP=function(e,n,r,i){var s=new QN(e),a=s.width,o=s.height,l={data:s.getData(),width:a,height:o},c=new m2(100).encode(l,100);return t.processJPEG.call(this,c,n,r,i)}}(nt.API),nt.API.processRGBA=function(t,e,n){for(var r=t.data,i=r.length,s=new Uint8Array(i/4*3),a=new Uint8Array(i/4),o=0,l=0,c=0;c<i;c+=4){var u=r[c],d=r[c+1],f=r[c+2],h=r[c+3];s[o++]=u,s[o++]=d,s[o++]=f,a[l++]=h}var y=this.__addimage__.arrayBufferToBinaryString(s);return{alpha:this.__addimage__.arrayBufferToBinaryString(a),data:y,index:e,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:t.width,height:t.height}},nt.API.setLanguage=function(t){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canada)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[t]!==void 0&&(this.internal.languageSettings.languageCode=t,this.internal.languageSettings.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},du=nt.API,yg=du.getCharWidthsArray=function(t,e){var n,r,i=(e=e||{}).font||this.internal.getFont(),s=e.fontSize||this.internal.getFontSize(),a=e.charSpace||this.internal.getCharSpace(),o=e.widths?e.widths:i.metadata.Unicode.widths,l=o.fof?o.fof:1,c=e.kerning?e.kerning:i.metadata.Unicode.kerning,u=c.fof?c.fof:1,d=e.doKerning!==!1,f=0,h=t.length,y=0,v=o[0]||l,_=[];for(n=0;n<h;n++)r=t.charCodeAt(n),typeof i.metadata.widthOfString=="function"?_.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+a*(1e3/s)||0)/1e3):(f=d&&rn(c[r])==="object"&&!isNaN(parseInt(c[r][y],10))?c[r][y]/u:0,_.push((o[r]||v)/l+f)),y=r;return _},qN=du.getStringUnitWidth=function(t,e){var n=(e=e||{}).fontSize||this.internal.getFontSize(),r=e.font||this.internal.getFont(),i=e.charSpace||this.internal.getCharSpace();return du.processArabic&&(t=du.processArabic(t)),typeof r.metadata.widthOfString=="function"?r.metadata.widthOfString(t,n,i)/n:yg.apply(this,arguments).reduce(function(s,a){return s+a},0)},HN=function(t,e,n,r){for(var i=[],s=0,a=t.length,o=0;s!==a&&o+e[s]<n;)o+=e[s],s++;i.push(t.slice(0,s));var l=s;for(o=0;s!==a;)o+e[s]>r&&(i.push(t.slice(l,s)),o=0,l=s),o+=e[s],s++;return l!==s&&i.push(t.slice(l,s)),i},WN=function(t,e,n){n||(n={});var r,i,s,a,o,l,c,u=[],d=[u],f=n.textIndent||0,h=0,y=0,v=t.split(" "),_=yg.apply(this,[" ",n])[0];if(l=n.lineIndent===-1?v[0].length+2:n.lineIndent||0){var w=Array(l).join(" "),x=[];v.map(function(N){(N=N.split(/\s*\n/)).length>1?x=x.concat(N.map(function(R,H){return(H&&R.length?` 505`:"")+R})):x.push(N[0])}),v=x,l=qN.apply(this,[w,n])}for(s=0,a=v.length;s<a;s++){var k=0;if(r=v[s],l&&r[0]==` 506`&&(r=r.substr(1),k=1),f+h+(y=(i=yg.apply(this,[r,n])).reduce(function(N,R){return N+R},0))>e||k){if(y>e){for(o=HN.apply(this,[r,i,e-(f+h),e]),u.push(o.shift()),u=[o.pop()];o.length;)d.push([o.shift()]);y=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(N,R){return N+R},0)}else u=[r];d.push(u),f=y+l,h=_}else u.push(r),f+=h+y,h=_}return c=l?function(N,R){return(R?w:"")+N.join(" ")}:function(N){return N.join(" ")},d.map(c)},du.splitTextToSize=function(t,e,n){var r,i=(n=n||{}).fontSize||this.internal.getFontSize(),s=(function(u){if(u.widths&&u.kerning)return{widths:u.widths,kerning:u.kerning};var d=this.internal.getFont(u.fontName,u.fontStyle),f="Unicode";return d.metadata[f]?{widths:d.metadata[f].widths||{0:1},kerning:d.metadata[f].kerning||{}}:{font:d.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}).call(this,n);r=Array.isArray(t)?t:String(t).split(/\r?\n/);var a=1*this.internal.scaleFactor*e/i;s.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,s.lineIndent=n.lineIndent;var o,l,c=[];for(o=0,l=r.length;o<l;o++)c=c.concat(WN.apply(this,[r[o],a,s]));return c},function(t){t.__fontmetrics__=t.__fontmetrics__||{};for(var e="0123456789abcdef",n="klmnopqrstuvwxyz",r={},i={},s=0;s<16;s++)r[n[s]]=e[s],i[e[s]]=n[s];var a=function(f){return"0x"+parseInt(f,10).toString(16)},o=t.__fontmetrics__.compress=function(f){var h,y,v,_,w=["{"];for(var x in f){if(h=f[x],isNaN(parseInt(x,10))?y="'"+x+"'":(x=parseInt(x,10),y=(y=a(x).slice(2)).slice(0,-1)+i[y.slice(-1)]),typeof h=="number")h<0?(v=a(h).slice(3),_="-"):(v=a(h).slice(2),_=""),v=_+v.slice(0,-1)+i[v.slice(-1)];else{if(rn(h)!=="object")throw new Error("Don't know what to do with value type "+rn(h)+".");v=o(h)}w.push(y+v)}return w.push("}"),w.join("")},l=t.__fontmetrics__.uncompress=function(f){if(typeof f!="string")throw new Error("Invalid argument passed to uncompress.");for(var h,y,v,_,w={},x=1,k=w,N=[],R="",H="",F=f.length-1,M=1;M<F;M+=1)(_=f[M])=="'"?h?(v=h.join(""),h=void 0):h=[]:h?h.push(_):_=="{"?(N.push([k,v]),k={},v=void 0):_=="}"?((y=N.pop())[0][y[1]]=k,v=void 0,k=y[0]):_=="-"?x=-1:v===void 0?r.hasOwnProperty(_)?(R+=r[_],v=parseInt(R,16)*x,x=1,R=""):R+=_:r.hasOwnProperty(_)?(H+=r[_],k[v]=parseInt(H,16)*x,x=1,v=void 0,H=""):H+=_;return w},c={codePages:["WinAnsiEncoding"],WinAnsiEncoding:l("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},u={Unicode:{Courier:c,"Courier-Bold":c,"Courier-BoldOblique":c,"Courier-Oblique":c,Helvetica:c,"Helvetica-Bold":c,"Helvetica-BoldOblique":c,"Helvetica-Oblique":c,"Times-Roman":c,"Times-Bold":c,"Times-BoldItalic":c,"Times-Italic":c}},d
vendor: 14,693 bytes, line 506
506={Unicode:{"Courier-Oblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":l("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":l("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:l("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":l("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:l("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":l("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":l("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":l("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":l("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};
vendor: 45,936 bytes, lines 506-534
506t.events.push(["addFont",function(f){var h=f.font,y=d.Unicode[h.postScriptName];y&&(h.metadata.Unicode={},h.metadata.Unicode.widths=y.widths,h.metadata.Unicode.kerning=y.kerning);var v=u.Unicode[h.postScriptName];v&&(h.metadata.Unicode.encoding=v,h.encoding=v.codePages[0])}])}(nt.API),function(t){var e=function(n){for(var r=n.length,i=new Uint8Array(r),s=0;s<r;s++)i[s]=n.charCodeAt(s);return i};t.API.events.push(["addFont",function(n){var r=void 0,i=n.font,s=n.instance;if(!i.isStandardFont){if(s===void 0)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");if(typeof(r=s.existsFileInVFS(i.postScriptName)===!1?s.loadFile(i.postScriptName):s.getFileFromVFS(i.postScriptName))!="string")throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+i.postScriptName+"').");(function(a,o){o=/^\x00\x01\x00\x00/.test(o)?e(o):e(Bg(o)),a.metadata=t.API.TTFFont.open(o),a.metadata.Unicode=a.metadata.Unicode||{encoding:{},kerning:{},widths:[]},a.metadata.glyIdsUsed=[0]})(i,r)}}])}(nt),nt.API.addSvgAsImage=function(t,e,n,r,i,s,a,o){if(isNaN(e)||isNaN(n))throw cn.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(r)||isNaN(i))throw cn.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var l=document.createElement("canvas");l.width=r,l.height=i;var c=l.getContext("2d");c.fillStyle="#fff",c.fillRect(0,0,l.width,l.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return(pt.canvg?Promise.resolve(pt.canvg):By(()=>import("./index.es-DBK5RvyM.js"),[])).catch(function(f){return Promise.reject(new Error("Could not load canvg: "+f))}).then(function(f){return f.default?f.default:f}).then(function(f){return f.fromString(c,t,u)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(f){return f.render(u)}).then(function(){d.addImage(l.toDataURL("image/jpeg",1),e,n,r,i,a,o)})},nt.API.putTotalPages=function(t){var e,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(e=new RegExp(t,"g"),n=this.internal.getNumberOfPages()):(e=new RegExp(this.pdfEscape16(t,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(e,n);return this},nt.API.viewerPreferences=function(t,e){var n;t=t||{},e=e||!1;var r,i,s,a={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},o=Object.keys(a),l=[],c=0,u=0,d=0;function f(y,v){var _,w=!1;for(_=0;_<y.length;_+=1)y[_]===v&&(w=!0);return w}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(a)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,t==="reset"||e===!0){var h=o.length;for(d=0;d<h;d+=1)n[o[d]].value=n[o[d]].defaultValue,n[o[d]].explicitSet=!1}if(rn(t)==="object"){for(i in t)if(s=t[i],f(o,i)&&s!==void 0){if(n[i].type==="boolean"&&typeof s=="boolean")n[i].value=s;else if(n[i].type==="name"&&f(n[i].valueSet,s))n[i].value=s;else if(n[i].type==="integer"&&Number.isInteger(s))n[i].value=s;else if(n[i].type==="array"){for(c=0;c<s.length;c+=1)if(r=!0,s[c].length===1&&typeof s[c][0]=="number")l.push(String(s[c]-1));else if(s[c].length>1){for(u=0;u<s[c].length;u+=1)typeof s[c][u]!="number"&&(r=!1);r===!0&&l.push([s[c][0]-1,s[c][1]-1].join(" "))}n[i].value="["+l.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return this.internal.viewerpreferences.isSubscribed===!1&&(this.internal.events.subscribe("putCatalog",function(){var y,v=[];for(y in n)n[y].explicitSet===!0&&(n[y].type==="name"?v.push("/"+y+" /"+n[y].value):v.push("/"+y+" "+n[y].value));v.length!==0&&this.internal.write(`/ViewerPreferences 507<< 508`+v.join(` 509`)+` 510>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},function(t){var e=function(){var r='<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceuri+'"><jspdf:metadata>',i=unescape(encodeURIComponent('<x:xmpmeta xmlns:x="adobe:ns:meta/">')),s=unescape(encodeURIComponent(r)),a=unescape(encodeURIComponent(this.internal.__metadata__.metadata)),o=unescape(encodeURIComponent("</jspdf:metadata></rdf:Description></rdf:RDF>")),l=unescape(encodeURIComponent("</x:xmpmeta>")),c=s.length+a.length+o.length+i.length+l.length;this.internal.__metadata__.metadata_object_number=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+c+" >>"),this.internal.write("stream"),this.internal.write(i+s+a+o+l),this.internal.write("endstream"),this.internal.write("endobj")},n=function(){this.internal.__metadata__.metadata_object_number&&this.internal.write("/Metadata "+this.internal.__metadata__.metadata_object_number+" 0 R")};t.addMetadata=function(r,i){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:r,namespaceuri:i||"http://jspdf.default.namespaceuri/"},this.internal.events.subscribe("putCatalog",n),this.internal.events.subscribe("postPutResources",e)),this}}(nt.API),function(t){var e=t.API,n=e.pdfEscape16=function(s,a){for(var o,l=a.metadata.Unicode.widths,c=["","0","00","000","0000"],u=[""],d=0,f=s.length;d<f;++d){if(o=a.metadata.characterToGlyph(s.charCodeAt(d)),a.metadata.glyIdsUsed.push(o),a.metadata.toUnicode[o]=s.charCodeAt(d),l.indexOf(o)==-1&&(l.push(o),l.push([parseInt(a.metadata.widthOfGlyph(o),10)])),o=="0")return u.join("");o=o.toString(16),u.push(c[4-o.length],o)}return u.join("")},r=function(s){var a,o,l,c,u,d,f;for(u=`/CIDInit /ProcSet findresource begin 51112 dict begin 512begincmap 513/CIDSystemInfo << 514 /Registry (Adobe) 515 /Ordering (UCS) 516 /Supplement 0 517>> def 518/CMapName /Adobe-Identity-UCS def 519/CMapType 2 def 5201 begincodespacerange 521<0000><ffff> 522endcodespacerange`,l=[],d=0,f=(o=Object.keys(s).sort(function(h,y){return h-y})).length;d<f;d++)a=o[d],l.length>=100&&(u+=` 523`+l.length+` beginbfchar 524`+l.join(` 525`)+` 526endbfchar`,l=[]),s[a]!==void 0&&s[a]!==null&&typeof s[a].toString=="function"&&(c=("0000"+s[a].toString(16)).slice(-4),a=("0000"+(+a).toString(16)).slice(-4),l.push("<"+a+"><"+c+">"));return l.length&&(u+=` 527`+l.length+` beginbfchar 528`+l.join(` 529`)+` 530endbfchar 531`),u+`endcmap 532CMapName currentdict /CMap defineresource pop 533end 534end`};e.events.push(["putFont",function(s){(function(a){var o=a.font,l=a.out,c=a.newObject,u=a.putStream;if(o.metadata instanceof t.API.TTFFont&&o.encoding==="Identity-H"){for(var d=o.metadata.Unicode.widths,f=o.metadata.subset.encode(o.metadata.glyIdsUsed,1),h="",y=0;y<f.length;y++)h+=String.fromCharCode(f[y]);var v=c();u({data:h,addLength1:!0,objectId:v}),l("endobj");var _=c();u({data:r(o.metadata.toUnicode),addLength1:!0,objectId:_}),l("endobj");var w=c();l("<<"),l("/Type /FontDescriptor"),l("/FontName /"+yu(o.fontName)),l("/FontFile2 "+v+" 0 R"),l("/FontBBox "+t.API.PDFObject.convert(o.metadata.bbox)),l("/Flags "+o.metadata.flags),l("/StemV "+o.metadata.stemV),l("/ItalicAngle "+o.metadata.italicAngle),l("/Ascent "+o.metadata.ascender),l("/Descent "+o.metadata.decender),l("/CapHeight "+o.metadata.capHeight),l(">>"),l("endobj");var x=c();l("<<"),l("/Type /Font"),l("/BaseFont /"+yu(o.fontName)),l("/FontDescriptor "+w+" 0 R"),l("/W "+t.API.PDFObject.convert(d)),l("/CIDToGIDMap /Identity"),l("/DW 1000"),l("/Subtype /CIDFontType2"),l("/CIDSystemInfo"),l("<<"),l("/Supplement 0"),l("/Registry (Adobe)"),l("/Ordering ("+o.encoding+")"),l(">>"),l(">>"),l("endobj"),o.objectNumber=c(),l("<<"),l("/Type /Font"),l("/Subtype /Type0"),l("/ToUnicode "+_+" 0 R"),l("/BaseFont /"+yu(o.fontName)),l("/Encoding /"+o.encoding),l("/DescendantFonts ["+x+" 0 R]"),l(">>"),l("endobj"),o.isAlreadyPutted=!0}})(s)}]),e.events.push(["putFont",function(s){(function(a){var o=a.font,l=a.out,c=a.newObject,u=a.putStream;if(o.metadata instanceof t.API.TTFFont&&o.encoding==="WinAnsiEncoding"){for(var d=o.metadata.rawData,f="",h=0;h<d.length;h++)f+=String.fromCharCode(d[h]);var y=c();u({data:f,addLength1:!0,objectId:y}),l("endobj");var v=c();u({data:r(o.metadata.toUnicode),addLength1:!0,objectId:v}),l("endobj");var _=c();l("<<"),l("/Descent "+o.metadata.decender),l("/CapHeight "+o.metadata.capHeight),l("/StemV "+o.metadata.stemV),l("/Type /FontDescriptor"),l("/FontFile2 "+y+" 0 R"),l("/Flags 96"),l("/FontBBox "+t.API.PDFObject.convert(o.metadata.bbox)),l("/FontName /"+yu(o.fontName)),l("/ItalicAngle "+o.metadata.italicAngle),l("/Ascent "+o.metadata.ascender),l(">>"),l("endobj"),o.objectNumber=c();for(var w=0;w<o.metadata.hmtx.widths.length;w++)o.metadata.hmtx.widths[w]=parseInt(o.metadata.hmtx.widths[w]*(1e3/o.metadata.head.unitsPerEm));l("<</Subtype/TrueType/Type/Font/ToUnicode "+v+" 0 R/BaseFont/"+yu(o.fontName)+"/FontDescriptor "+_+" 0 R/Encoding/"+o.encoding+" /FirstChar 29 /LastChar 255 /Widths "+t.API.PDFObject.convert(o.metadata.hmtx.widths)+">>"),l("endobj"),o.isAlreadyPutted=!0}})(s)}]);var i=function(s){var a,o=s.text||"",l=s.x,c=s.y,u=s.options||{},d=s.mutex||{},f=d.pdfEscape,h=d.activeFontKey,y=d.fonts,v=h,_="",w=0,x="",k=y[v].encoding;if(y[v].encoding!=="Identity-H")return{text:o,x:l,y:c,options:u,mutex:d};for(x=o,v=h,Array.isArray(o)&&(x=o[0]),w=0;w<x.length;w+=1)y[v].metadata.hasOwnProperty("cmap")&&(a=y[v].metadata.cmap.unicode.codeMap[x[w].charCodeAt(0)]),a||x[w].charCodeAt(0)<256&&y[v].metadata.hasOwnProperty("Unicode")?_+=x[w]:_+="";var N="";return parseInt(v.slice(1))<14||k==="WinAnsiEncoding"?N=f(_,v).split("").map(function(R){return R.charCodeAt(0).toString(16)}).join(""):k==="Identity-H"&&(N=n(_,y[v])),d.isHex=!0,{text:N,x:l,y:c,options:u,mutex:d}};e.events.push(["postProcessText",function(s){var a=s.text||"",o=[],l={text:a,x:s.x,y:s.y,options:s.options,mutex:s.mutex};if(Array.isArray(a)){var c=0;for(c=0;c<a.length;c+=1)Array.isArray(a[c])&&a[c].length===3?o.push([i(Object.assign({},l,{text:a[c][0]})).text,a[c][1],a[c][2]]):o.push(i(Object.assign({},l,{text:a[c]})).text);s.text=o}else s.text=i(Object.assign({},l,{text:a})).text}])}(nt),function(t){var e=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};t.existsFileInVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0},t.addFileToVFS=function(n,r){return e.call(this),this.internal.vFS[n]=r,this},t.getFileFromVFS=function(n){return e.call(this),this.internal.vFS[n]!==void 0?this.internal.vFS[n]:null}}(nt.API),function(t){t.__bidiEngine__=t.prototype.__bidiEngine__=function(r){var i,s,a,o,l,c,u,d=e,f=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],h=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],y={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},v={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},_=["(",")","(","<",">","<","[","]","[","{","}","{","«","»","«","â¹","âº","â¹","â ","â","â ","â½","â¾","â½","â","â","â","â¤","â¥","â¤","â©","âª","â©","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","ï¹","﹤","ï¹¥","﹤"],w=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),x=!1,k=0;this.__bidiEngine__={};var N=function(L){var j=L.charCodeAt(),W=j>>8,z=v[W];return z!==void 0?d[256*z+(255&j)]:W===252||W===253?"AL":w.test(W)?"L":W===8?"R":"N"},R=function(L){for(var j,W=0;W<L.length;W++){if((j=N(L.charAt(W)))==="L")return!1;if(j==="R")return!0}return!1},H=function(L,j,W,z){var re,ne,oe,U,J=j[z];switch(J){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":x=!1;break;case"N":case"AN":break;case"EN":x&&(J="AN");break;case"AL":x=!0,J="R";break;case"WS":case"BN":J="N";break;case"CS":z<1||z+1>=j.length||(re=W[z-1])!=="EN"&&re!=="AN"||(ne=j[z+1])!=="EN"&&ne!=="AN"?J="N":x&&(ne="AN"),J=ne===re?ne:"N";break;case"ES":J=(re=z>0?W[z-1]:"B")==="EN"&&z+1<j.length&&j[z+1]==="EN"?"EN":"N";break;case"ET":if(z>0&&W[z-1]==="EN"){J="EN";break}if(x){J="N";break}for(oe=z+1,U=j.length;oe<U&&j[oe]==="ET";)oe++;J=oe<U&&j[oe]==="EN"?"EN":"N";break;case"NSM":if(a&&!o){for(U=j.length,oe=z+1;oe<U&&j[oe]==="NSM";)oe++;if(oe<U){var de=L[z],ie=de>=1425&&de<=2303||de===64286;if(re=j[oe],ie&&(re==="R"||re==="AL")){J="R";break}}}J=z<1||(re=j[z-1])==="B"?"N":W[z-1];break;case"B":x=!1,i=!0,J=k;break;case"S":s=!0,J="N"}return J},F=function(L,j,W){var z=L.split("");return W&&M(z,W,{hiLevel:k}),z.reverse(),j&&j.reverse(),z.join("")},M=function(L,j,W){var z,re,ne,oe,U,J=-1,de=L.length,ie=0,C=[],q=k?h:f,X=[];for(x=!1,i=!1,s=!1,re=0;re<de;re++)X[re]=N(L[re]);for(ne=0;ne<de;ne++){if(U=ie,C[ne]=H(L,X,C,ne),z=240&(ie=q[U][y[C[ne]]]),ie&=15,j[ne]=oe=q[ie][5],z>0)if(z===16){for(re=J;re<ne;re++)j[re]=1;J=-1}else J=-1;if(q[ie][6])J===-1&&(J=ne);else if(J>-1){for(re=J;re<ne;re++)j[re]=oe;J=-1}X[ne]==="B"&&(j[ne]=0),W.hiLevel|=oe}s&&function(Q,ee,le){for(var me=0;me<le;me++)if(Q[me]==="S"){ee[me]=k;for(var pe=me-1;pe>=0&&Q[pe]==="WS";pe--)ee[pe]=k}}(X,j,de)},I=function(L,j,W,z,re){if(!(re.hiLevel<L)){if(L===1&&k===1&&!i)return j.reverse(),void(W&&W.reverse());for(var ne,oe,U,J,de=j.length,ie=0;ie<de;){if(z[ie]>=L){for(U=ie+1;U<de&&z[U]>=L;)U++;for(J=ie,oe=U-1;J<oe;J++,oe--)ne=j[J],j[J]=j[oe],j[oe]=ne,W&&(ne=W[J],W[J]=W[oe],W[oe]=ne);ie=U}ie++}}},G=function(L,j,W){var z=L.split(""),re={hiLevel:k};return W||(W=[]),M(z,W,re),function(ne,oe,U){if(U.hiLevel!==0&&u)for(var J,de=0;de<ne.length;de++)oe[de]===1&&(J=_.indexOf(ne[de]))>=0&&(ne[de]=_[J+1])}(z,W,re),I(2,z,j,W,re),I(1,z,j,W,re),z.join("")};return this.__bidiEngine__.doBidiReorder=function(L,j,W){if(function(re,ne){if(ne)for(var oe=0;oe<re.length;oe++)ne[oe]=oe;o===void 0&&(o=R(re)),c===void 0&&(c=R(re))}(L,j),a||!l||c)if(a&&l&&o^c)k=o?1:0,L=F(L,j,W);else if(!a&&l&&c)k=o?1:0,L=G(L,j,W),L=F(L,j);else if(!a||o||l||c){if(a&&!l&&o^c)L=F(L,j),o?(k=0,L=G(L,j,W)):(k=1,L=G(L,j,W),L=F(L,j));else if(a&&o&&!l&&c)k=1,L=G(L,j,W),L=F(L,j);else if(!a&&!l&&o^c){var z=u;o?(k=1,L=G(L,j,W),k=0,u=!1,L=G(L,j,W),u=z):(k=0,L=G(L,j,W),L=F(L,j),k=1,u=!1,L=G(L,j,W),u=z,L=F(L,j))}}else k=0,L=G(L,j,W);else k=o?1:0,L=G(L,j,W);return L},this.__bidiEngine__.setOptions=function(L){L&&(a=L.isInputVisual,l=L.isOutputVisual,o=L.isInputRtl,c=L.isOutputRtl,u=L.isSymmetricSwapping)},this.__bidiEngine__.setOptions(r),this.__bidiEngine__};var e=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new t.__bidiEngine__({isInputVisual:!0});t.API.events.push(["postProcessText",function(r){var i=r.text;r.x,r.y;var s=r.options||{};r.mutex,s.lang;var a=[];if(s.isInputVisual=typeof s.isInputVisual!="boolean"||s.isInputVisual,n.setOptions(s),Object.prototype.toString.call(i)==="[object Array]"){var o=0;for(a=[],o=0;o<i.length;o+=1)Object.prototype.toString.call(i[o])==="[object Array]"?a.push([n.doBidiReorder(i[o][0]),i[o][1],i[o][2]]):a.push([n.doBidiReorder(i[o])]);r.text=a}else r.text=n.doBidiReorder(i);n.setOptions({isInputVisual:!0})}])}(nt),nt.API.TTFFont=function(){function t(e){var n;if(this.rawData=e,n=this.contents=new vl(e),this.contents.pos=4,n.readString(4)==="ttcf")throw new Error("TTCF not supported.");n.pos=0,this.parse(),this.subset=new mJ(this),this.registerTTF()}return t.open=function(e){return new t(e)},t.prototype.parse=function(){return this.directory=new tJ(this.contents),this.head=new rJ(this),this.name=new lJ(this),this.cmap=new fL(this),this.toUnicode={},this.hhea=new iJ(this),this.maxp=new cJ(this),this.hmtx=new uJ(this),this.post=new aJ(this),this.os2=new sJ(this),this.loca=new pJ(this),this.glyf=new dJ(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},t.prototype.registerTTF=function(){var e,n,r,i,s;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=(function(){var a,o,l,c;for(c=[],a=0,o=(l=this.bbox).length;a<o;a++)e=l[a],c.push(Math.round(e*this.scaleFactor));return c}).call(this),this.stemV=0,this.post.exists?(r=255&(i=this.post.italic_angle),32768&(n=i>>16)&&(n=-(1+(65535^n))),this.italicAngle=+(n+"."+r)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(s=this.familyClass)===1||s===2||s===3||s===4||s===5||s===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},t.prototype.characterToGlyph=function(e){var n;return((n=this.cmap.unicode)!=null?n.codeMap[e]:void 0)||0},t.prototype.widthOfGlyph=function(e){var n;return n=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*n},t.prototype.widthOfString=function(e,n,r){var i,s,a,o;for(a=0,s=0,o=(e=""+e).length;0<=o?s<o:s>o;s=0<=o?++s:--s)i=e.charCodeAt(s),a+=this.widthOfGlyph(this.characterToGlyph(i))+r*(1e3/n)||0;return a*(n/1e3)},t.prototype.lineHeight=function(e,n){var r;return n==null&&(n=!1),r=n?this.lineGap:0,(this.ascender+r-this.decender)/1e3*e},t}();var Os,vl=function(){function t(e){this.data=e??[],this.pos=0,this.length=this.data.length}return t.prototype.readByte=function(){return this.data[this.pos++]},t.prototype.writeByte=function(e){return this.data[this.pos++]=e},t.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},t.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},t.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},t.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},t.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},t.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},t.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},t.prototype.readString=function(e){var n,r;for(r=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)r[n]=String.fromCharCode(this.readByte());return r.join("")},t.prototype.writeString=function(e){var n,r,i;for(i=[],n=0,r=e.length;0<=r?n<r:n>r;n=0<=r?++n:--n)i.push(this.writeByte(e.charCodeAt(n)));return i},t.prototype.readShort=function(){return this.readInt16()},t.prototype.writeShort=function(e){return this.writeInt16(e)},t.prototype.readLongLong=function(){var e,n,r,i,s,a,o,l;return e=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),s=this.readByte(),a=this.readByte(),o=this.readByte(),l=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^n)+1099511627776*(255^r)+4294967296*(255^i)+16777216*(255^s)+65536*(255^a)+256*(255^o)+(255^l)+1):72057594037927940*e+281474976710656*n+1099511627776*r+4294967296*i+16777216*s+65536*a+256*o+l},t.prototype.writeLongLong=function(e){var n,r;return n=Math.floor(e/4294967296),r=4294967295&e,this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n),this.writeByte(r>>24&255),this.writeByte(r>>16&255),this.writeByte(r>>8&255),this.writeByte(255&r)},t.prototype.readInt=function(){return this.readInt32()},t.prototype.writeInt=function(e){return this.writeInt32(e)},t.prototype.read=function(e){var n,r;for(n=[],r=0;0<=e?r<e:r>e;r=0<=e?++r:--r)n.push(this.readByte());return n},t.prototype.write=function(e){var n,r,i,s;for(s=[],r=0,i=e.length;r<i;r++)n=e[r],s.push(this.writeByte(n));return s},t}(),tJ=function(){var t;function e(n){var r,i,s;for(this.scalarType=n.readInt(),this.tableCount=n.readShort(),this.searchRange=n.readShort(),this.entrySelector=n.readShort(),this.rangeShift=n.readShort(),this.tables={},i=0,s=this.tableCount;0<=s?i<s:i>s;i=0<=s?++i:--i)r={tag:n.readString(4),checksum:n.readInt(),offset:n.readInt(),length:n.readInt()},this.tables[r.tag]=r}return e.prototype.encode=function(n){var r,i,s,a,o,l,c,u,d,f,h,y,v;for(v in h=Object.keys(n).length,l=Math.log(2),d=16*Math.floor(Math.log(h)/l),a=Math.floor(d/l),u=16*h-d,(i=new vl).writeInt(this.scalarType),i.writeShort(h),i.writeShort(d),i.writeShort(a),i.writeShort(u),s=16*h,c=i.pos+s,o=null,y=[],n)for(f=n[v],i.writeString(v),i.writeInt(t(f)),i.writeInt(c),i.writeInt(f.length),y=y.concat(f),v==="head"&&(o=c),c+=f.length;c%4;)y.push(0),c++;return i.write(y),r=2981146554-t(i.data),i.pos=o+8,i.writeUInt32(r),i.data},t=function(n){var r,i,s,a;for(n=pL.call(n);n.length%4;)n.push(0);for(s=new vl(n),i=0,r=0,a=n.length;r<a;r=r+=4)i+=s.readUInt32();return 4294967295&i},e}(),nJ={}.hasOwnProperty,va=function(t,e){for(var n in e)nJ.call(e,n)&&(t[n]=e[n]);function r(){this.constructor=t}return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Os=function(){function t(e){var n;this.file=e,n=this.file.directory.tables[this.tag],this.exists=!!n,n&&(this.offset=n.offset,this.length=n.length,this.parse(this.file.contents))}return t.prototype.parse=function(){},t.prototype.encode=function(){},t.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},t}();var rJ=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return va(t,Os),t.prototype.tag="head",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},t.prototype.encode=function(e){var n;return(n=new vl).writeInt(this.version),n.writeInt(this.revision),n.writeInt(this.checkSumAdjustment),n.writeInt(this.magicNumber),n.writeShort(this.flags),n.writeShort(this.unitsPerEm),n.writeLongLong(this.created),n.writeLongLong(this.modified),n.writeShort(this.xMin),n.writeShort(this.yMin),n.writeShort(this.xMax),n.writeShort(this.yMax),n.writeShort(this.macStyle),n.writeShort(this.lowestRecPPEM),n.writeShort(this.fontDirectionHint),n.writeShort(e),n.writeShort(this.glyphDataFormat),n.data},t}(),e4=function(){function t(e,n){var r,i,s,a,o,l,c,u,d,f,h,y,v,_,w,x,k;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=n+e.readInt(),d=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(l=0;l<256;++l)this.codeMap[l]=e.readByte();break;case 4:for(h=e.readUInt16(),f=h/2,e.pos+=6,s=function(){var N,R;for(R=[],l=N=0;0<=f?N<f:N>f;l=0<=f?++N:--N)R.push(e.readUInt16());return R}(),e.pos+=2,v=function(){var N,R;for(R=[],l=N=0;0<=f?N<f:N>f;l=0<=f?++N:--N)R.push(e.readUInt16());return R}(),c=function(){var N,R;for(R=[],l=N=0;0<=f?N<f:N>f;l=0<=f?++N:--N)R.push(e.readUInt16());return R}(),u=function(){var N,R;for(R=[],l=N=0;0<=f?N<f:N>f;l=0<=f?++N:--N)R.push(e.readUInt16());return R}(),i=(this.length-e.pos+this.offset)/2,o=function(){var N,R;for(R=[],l=N=0;0<=i?N<i:N>i;l=0<=i?++N:--N)R.push(e.readUInt16());return R}(),l=w=0,k=s.length;w<k;l=++w)for(_=s[l],r=x=y=v[l];y<=_?x<=_:x>=_;r=y<=_?++x:--x)u[l]===0?a=r+c[l]:(a=o[u[l]/2+(r-y)-(f-l)]||0)!==0&&(a+=c[l]),this.codeMap[r]=65535&a}e.pos=d}return t.encode=function(e,n){var r,i,s,a,o,l,c,u,d,f,h,y,v,_,w,x,k,N,R,H,F,M,I,G,L,j,W,z,re,ne,oe,U,J,de,ie,C,q,X,Q,ee,le,me,pe,ge,Ne,je;switch(z=new vl,a=Object.keys(e).sort(function(Re,Ke){return Re-Ke}),n){case"macroman":for(v=0,_=function(){var Re=[];for(y=0;y<256;++y)Re.push(0);return Re}(),x={0:0},s={},re=0,J=a.length;re<J;re++)x[pe=e[i=a[re]]]==null&&(x[pe]=++v),s[i]={old:e[i],new:x[e[i]]},_[i]=x[e[i]];return z.writeUInt16(1),z.writeUInt16(0),z.writeUInt32(12),z.writeUInt16(0),z.writeUInt16(262),z.writeUInt16(0),z.write(_),{charMap:s,subtable:z.data,maxGlyphID:v+1};case"unicode":for(j=[],d=[],k=0,x={},r={},w=c=null,ne=0,de=a.length;ne<de;ne++)x[R=e[i=a[ne]]]==null&&(x[R]=++k),r[i]={old:R,new:x[R]},o=x[R]-i,w!=null&&o===c||(w&&d.push(w),j.push(i),c=o),w=i;for(w&&d.push(w),d.push(65535),j.push(65535),G=2*(I=j.length),M=2*Math.pow(Math.log(I)/Math.LN2,2),f=Math.log(M/2)/Math.LN2,F=2*I-M,l=[],H=[],h=[],y=oe=0,ie=j.length;oe<ie;y=++oe){if(L=j[y],u=d[y],L===65535){l.push(0),H.push(0);break}if(L-(W=r[L].new)>=32768)for(l.push(0),H.push(2*(h.length+I-y)),i=U=L;L<=u?U<=u:U>=u;i=L<=u?++U:--U)h.push(r[i].new);else l.push(W-L),H.push(0)}for(z.writeUInt16(3),z.writeUInt16(1),z.writeUInt32(12),z.writeUInt16(4),z.writeUInt16(16+8*I+2*h.length),z.writeUInt16(0),z.writeUInt16(G),z.writeUInt16(M),z.writeUInt16(f),z.writeUInt16(F),le=0,C=d.length;le<C;le++)i=d[le],z.writeUInt16(i);for(z.writeUInt16(0),me=0,q=j.length;me<q;me++)i=j[me],z.writeUInt16(i);for(ge=0,X=l.length;ge<X;ge++)o=l[ge],z.writeUInt16(o);for(Ne=0,Q=H.length;Ne<Q;Ne++)N=H[Ne],z.writeUInt16(N);for(je=0,ee=h.length;je<ee;je++)v=h[je],z.writeUInt16(v);return{charMap:r,subtable:z.data,maxGlyphID:k+1}}},t}(),fL=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return va(t,Os),t.prototype.tag="cmap",t.prototype.parse=function(e){var n,r,i;for(e.pos=this.offset,this.version=e.readUInt16(),i=e.readUInt16(),this.tables=[],this.unicode=null,r=0;0<=i?r<i:r>i;r=0<=i?++r:--r)n=new e4(e,this.offset),this.tables.push(n),n.isUnicode&&this.unicode==null&&(this.unicode=n);return!0},t.encode=function(e,n){var r,i;return n==null&&(n="macroman"),r=e4.encode(e,n),(i=new vl).writeUInt16(0),i.writeUInt16(1),r.table=i.data.concat(r.subtable),r},t}(),iJ=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return va(t,Os),t.prototype.tag="hhea",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},t}(),sJ=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return va(t,Os),t.prototype.tag="OS/2",t.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var n,r;for(r=[],n=0;n<10;++n)r.push(e.readByte());return r}(),this.charRange=function(){var n,r;for(r=[],n=0;n<4;++n)r.push(e.readInt());return r}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var n,r;for(r=[],n=0;n<2;n=++n)r.push(e.readInt());return r}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},t}(),aJ=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return va(t,Os),t.prototype.tag="post",t.prototype.parse=function(e){var n,r,i;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var s;for(r=e.readUInt16(),this.glyphNameIndex=[],s=0;0<=r?s<r:s>r;s=0<=r?++s:--s)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],i=[];e.pos<this.offset+this.length;)n=e.readByte(),i.push(this.names.push(e.readString(n)));return i;case 151552:return r=e.readUInt16(),this.offsets=e.read(r);case 262144:return this.map=(function(){var a,o,l;for(l=[],s=a=0,o=this.file.maxp.numGlyphs;0<=o?a<o:a>o;s=0<=o?++a:--a)l.push(e.readUInt32());return l}).call(this)}},t}(),oJ=function(t,e){this.raw=t,this.length=t.length,this.platformID=e.platformID,this.encodingID=e.encodingID,this.languageID=e.languageID},lJ=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return va(t,Os),t.prototype.tag="name",t.prototype.parse=function(e){var n,r,i,s,a,o,l,c,u,d,f;for(e.pos=this.offset,e.readShort(),n=e.readShort(),o=e.readShort(),r=[],s=0;0<=n?s<n:s>n;s=0<=n?++s:--s)r.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+o+e.readShort()});for(l={},s=u=0,d=r.length;u<d;s=++u)i=r[s],e.pos=i.offset,c=e.readString(i.length),a=new oJ(c,i),l[f=i.nameID]==null&&(l[f]=[]),l[i.nameID].push(a);this.strings=l,this.copyright=l[0],this.fontFamily=l[1],this.fontSubfamily=l[2],this.uniqueSubfamily=l[3],this.fontName=l[4],this.version=l[5];try{this.postscriptName=l[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch{this.postscriptName=l[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=l[7],this.manufacturer=l[8],this.designer=l[9],this.description=l[10],this.vendorUrl=l[11],this.designerUrl=l[12],this.license=l[13],this.licenseUrl=l[14],this.preferredFamily=l[15],this.preferredSubfamily=l[17],this.compatibleFull=l[18],this.sampleText=l[19]},t}(),cJ=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return va(t,Os),t.prototype.tag="maxp",t.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},t}(),uJ=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return va(t,Os),t.prototype.tag="hmtx",t.prototype.parse=function(e){var n,r,i,s,a,o,l;for(e.pos=this.offset,this.metrics=[],n=0,o=this.file.hhea.numberOfMetrics;0<=o?n<o:n>o;n=0<=o?++n:--n)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(i=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var c,u;for(u=[],n=c=0;0<=i?c<i:c>i;n=0<=i?++c:--c)u.push(e.readInt16());return u}(),this.widths=(function(){var c,u,d,f;for(f=[],c=0,u=(d=this.metrics).length;c<u;c++)s=d[c],f.push(s.advance);return f}).call(this),r=this.widths[this.widths.length-1],l=[],n=a=0;0<=i?a<i:a>i;n=0<=i?++a:--a)l.push(this.widths.push(r));return l},t.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},t}(),pL=[].slice,dJ=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return va(t,Os),t.prototype.tag="glyf",t.prototype.parse=function(){return this.cache={}},t.prototype.glyphFor=function(e){var n,r,i,s,a,o,l,c,u,d;return e in this.cache?this.cache[e]:(s=this.file.loca,n=this.file.contents,r=s.indexOf(e),(i=s.lengthOf(e))===0?this.cache[e]=null:(n.pos=this.offset+r,a=(o=new vl(n.read(i))).readShort(),c=o.readShort(),d=o.readShort(),l=o.readShort(),u=o.readShort(),this.cache[e]=a===-1?new fJ(o,c,d,l,u):new hJ(o,a,c,d,l,u),this.cache[e]))},t.prototype.encode=function(e,n,r){var i,s,a,o,l;for(a=[],s=[],o=0,l=n.length;o<l;o++)i=e[n[o]],s.push(a.length),i&&(a=a.concat(i.encode(r)));return s.push(a.length),{table:a,offsets:s}},t}(),hJ=function(){function t(e,n,r,i,s,a){this.raw=e,this.numberOfContours=n,this.xMin=r,this.yMin=i,this.xMax=s,this.yMax=a,this.compound=!1}return t.prototype.encode=function(){return this.raw.data},t}(),fJ=function(){function t(e,n,r,i,s){var a,o;for(this.raw=e,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=s,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],a=this.raw;o=a.readShort(),this.glyphOffsets.push(a.pos),this.glyphIDs.push(a.readUInt16()),32&o;)a.pos+=1&o?4:2,128&o?a.pos+=8:64&o?a.pos+=4:8&o&&(a.pos+=2)}return t.prototype.encode=function(){var e,n,r;for(n=new vl(pL.call(this.raw.data)),e=0,r=this.glyphIDs.length;e<r;++e)n.pos=this.glyphOffsets[e];return n.data},t}(),pJ=function(){function t(){return t.__super__.constructor.apply(this,arguments)}return va(t,Os),t.prototype.tag="loca",t.prototype.parse=function(e){var n,r;return e.pos=this.offset,n=this.file.head.indexToLocFormat,this.offsets=n===0?(function(){var i,s;for(s=[],r=0,i=this.length;r<i;r+=2)s.push(2*e.readUInt16());return s}).call(this):(function(){var i,s;for(s=[],r=0,i=this.length;r<i;r+=4)s.push(e.readUInt32());return s}).call(this)},t.prototype.indexOf=function(e){return this.offsets[e]},t.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]}
534,t.prototype.encode=function(e,n){for(var r=new Uint32Array(this.offsets.length),i=0,s=0,a=0;a<r.length;++a)if(r[a]=i,s<n.length&&n[s]==a){++s,r[a]=i;var o=this.offsets[a],l=this.offsets[a+1]-o;l>0&&(i+=l)}for(var c=new Array(4*r.length),u=0;u<r.length;++u)c[4*u+3]=255&r[u],c[4*u+2]=(65280&r[u])>>8,c[4*u+1]=(16711680&r[u])>>16,c[4*u]=(4278190080&r[u])>>24;return c},t}(),mJ=function(){function t(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return t.prototype.generateCmap=function(){var e,n,r,i,s;for(n in i=this.font.cmap.tables[0].codeMap,e={},s=this.subset)r=s[n],e[n]=i[r];return e},t.prototype.glyphsFor=function(e){var n,r,i,s,a,o,l;for(i={},a=0,o=e.length;a<o;a++)i[s=e[a]]=this.font.glyf.glyphFor(s);for(s in n=[],i)(r=i[s])!=null&&r.compound&&n.push.apply(n,r.glyphIDs);if(n.length>0)for(s in l=this.glyphsFor(n))r=l[s],i[s]=r;return i},t.prototype.encode=function(e,n){var r,i,s,a,o,l,c,u,d,f,h,y,v,_,w;for(i in r=fL.encode(this.generateCmap(),"unicode"),a=this.glyphsFor(e),h={0:0},w=r.charMap)h[(l=w[i]).old]=l.new;for(y in f=r.maxGlyphID,a)y in h||(h[y]=f++);return u=function(x){var k,N;for(k in N={},x)N[x[k]]=k;return N}(h),d=Object.keys(u).sort(function(x,k){return x-k}),v=function(){var x,k,N;for(N=[],x=0,k=d.length;x<k;x++)o=d[x],N.push(u[o]);return N}(),s=this.font.glyf.encode(a,v,h),c=this.font.loca.encode(s.offsets,v),_={cmap:this.font.cmap.raw(),glyf:s.table,loca:c,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(n)},this.font.os2.exists&&(_["OS/2"]=this.font.os2.raw()),this.font.directory.encode(_)},t}();nt.API.PDFObject=function(){var t;function e(){}return t=function(n,r){return(Array(r+1).join("0")+n).slice(-r)},e.convert=function(n){var r,i,s,a;if(Array.isArray(n))return"["+function(){var o,l,c;for(c=[],o=0,l=n.length;o<l;o++)r=n[o],c.push(e.convert(r));return c}().join(" ")+"]";if(typeof n=="string")return"/"+n;if(n!=null&&n.isString)return"("+n+")";if(n instanceof Date)return"(D:"+t(n.getUTCFullYear(),4)+t(n.getUTCMonth(),2)+t(n.getUTCDate(),2)+t(n.getUTCHours(),2)+t(n.getUTCMinutes(),2)+t(n.getUTCSeconds(),2)+"Z)";if({}.toString.call(n)==="[object Object]"){for(i in s=["<<"],n)a=n[i],s.push("/"+i+" "+e.convert(a));return s.push(">>"),s.join(` 535`)}return""+n},e}();function mL(t,e,n,r,i){r=r||{};var s=1.15,a=i.internal.scaleFactor,o=i.internal.getFontSize()/a,l=i.getLineHeightFactor?i.getLineHeightFactor():s,c=o*l,u=/\r\n|\r|\n/g,d="",f=1;if((r.valign==="middle"||r.valign==="bottom"||r.halign==="center"||r.halign==="right")&&(d=typeof t=="string"?t.split(u):t,f=d.length||1),n+=o*(2-s),r.valign==="middle"?n-=f/2*c:r.valign==="bottom"&&(n-=f*c),r.halign==="center"||r.halign==="right"){var h=o;if(r.halign==="center"&&(h*=.5),d&&f>=1){for(var y=0;y<d.length;y++)i.text(d[y],e-i.getStringUnitWidth(d[y])*h,n),n+=c;return i}e-=i.getStringUnitWidth(t)*h}return r.halign==="justify"?i.text(t,e,n,{maxWidth:r.maxWidth||100,align:"justify"}):i.text(t,e,n),i}var t4={},Qu=function(){function t(e){this.jsPDFDocument=e,this.userStyles={textColor:e.getTextColor?this.jsPDFDocument.getTextColor():0,fontSize:e.internal.getFontSize(),fontStyle:e.internal.getFont().fontStyle,font:e.internal.getFont().fontName,lineWidth:e.getLineWidth?this.jsPDFDocument.getLineWidth():0,lineColor:e.getDrawColor?this.jsPDFDocument.getDrawColor():0}}
535return t.setDefaults=function(e,n){n===void 0&&(n=null),n?n.__autoTableDocumentDefaults=e:t4=e},t.unifyColor=function(e){return Array.isArray(e)?e:typeof e=="number"?[e,e,e]:typeof e=="string"?[e]:null},t.prototype.applyStyles=function(e,n){var r,i,s;n===void 0&&(n=!1),e.fontStyle&&this.jsPDFDocument.setFontStyle&&this.jsPDFDocument.setFontStyle(e.fontStyle);var a=this.jsPDFDocument.internal.getFont(),o=a.fontStyle,l=a.fontName;if(e.font&&(l=e.font),e.fontStyle){o=e.fontStyle;var c=this.getFontList()[l];c&&c.indexOf(o)===-1&&this.jsPDFDocument.setFontStyle&&(this.jsPDFDocument.setFontStyle(c[0]),o=c[0])}if(this.jsPDFDocument.setFont(l,o),e.fontSize&&this.jsPDFDocument.setFontSize(e.fontSize),!n){var u=t.unifyColor(e.fillColor);u&&(r=this.jsPDFDocument).setFillColor.apply(r,u),u=t.unifyColor(e.textColor),u&&(i=this.jsPDFDocument).setTextColor.apply(i,u),u=t.unifyColor(e.lineColor),u&&(s=this.jsPDFDocument).setDrawColor.apply(s,u),typeof e.lineWidth=="number"&&this.jsPDFDocument.setLineWidth(e.lineWidth)}},t.prototype.splitTextToSize=function(e,n,r){return this.jsPDFDocument.splitTextToSize(e,n,r)},t.prototype.rect=function(e,n,r,i,s){return this.jsPDFDocument.rect(e,n,r,i,s)},t.prototype.getLastAutoTable=function(){return this.jsPDFDocument.lastAutoTable||null},t.prototype.getTextWidth=function(e){return this.jsPDFDocument.getTextWidth(e)},t.prototype.getDocument=function(){return this.jsPDFDocument},t.prototype.setPage=function(e){this.jsPDFDocument.setPage(e)},t.prototype.addPage=function(){return this.jsPDFDocument.addPage()},t.prototype.getFontList=function(){return this.jsPDFDocument.getFontList()},t.prototype.getGlobalOptions=function(){return t4||{}},t.prototype.getDocumentOptions=function(){return this.jsPDFDocument.__autoTableDocumentDefaults||{}},t.prototype.pageSize=function(){var e=this.jsPDFDocument.internal.pageSize;return e.width==null&&(e={width:e.getWidth(),height:e.getHeight()}),e},t.prototype.scaleFactor=function(){return this.jsPDFDocument.internal.scaleFactor},t.prototype.getLineHeightFactor=function(){var e=this.jsPDFDocument;return e.getLineHeightFactor?e.getLineHeightFactor():1.15},t.prototype.getLineHeight=function(e){return e/this.scaleFactor()*this.getLineHeightFactor()},t.prototype.pageNumber=function(){var e=this.jsPDFDocument.internal.getCurrentPageInfo();return e?e.pageNumber:this.jsPDFDocument.internal.getNumberOfPages()},t}(),vb=function(t,e){return vb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},vb(t,e)};function gL(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");vb(t,e);function n(){this.constructor=t}t.prototype=e===null?Object.create(e):(n.prototype=e.prototype,new n)}var vL=function(t){gL(e,t);function e(n){var r=t.call(this)||this;return r._element=n,r}return e}(Array);function gJ(t){return{font:"helvetica",fontStyle:"normal",overflow:"linebreak",fillColor:!1,textColor:20,halign:"left",valign:"top",fontSize:10,cellPadding:5/t,lineColor:200,lineWidth:0,cellWidth:"auto",minCellHeight:0,minCellWidth:0}}function vJ(t){var e={striped:{table:{fillColor:255,textColor:80,fontStyle:"normal"},head:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},body:{},foot:{textColor:255,fillColor:[41,128,185],fontStyle:"bold"},alternateRow:{fillColor:245}},grid:{table:{fillColor:255,textColor:80,fontStyle:"normal",lineWidth:.1},head:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},body:{},foot:{textColor:255,fillColor:[26,188,156],fontStyle:"bold",lineWidth:0},alternateRow:{}},plain:{head:{fontStyle:"bold"},foot:{fontStyle:"bold"}}};return e[t]}function Y0(t,e,n){n.applyStyles(e,!0);var r=Array.isArray(t)?t:[t],i=r.map(function(s){return n.getTextWidth(s)}).reduce(function(s,a){return Math.max(s,a)},0);return i}function yL(t,e,n,r){var i=e.settings.tableLineWidth,s=e.settings.tableLineColor;t.applyStyles({lineWidth:i,lineColor:s});var a=wL(i,!1);a&&t.rect(n.x,n.y,e.getWidth(t.pageSize().width),r.y-n.y,a)}function wL(t,e){var n=t>0,r=e||e===0;return n&&r?"DF":n?"S":r?"F":null}function s1(t,e){var n,r,i,s;if(t=t||e,Array.isArray(t)){if(t.length>=4)return{top:t[0],right:t[1],bottom:t[2],left:t[3]};if(t.length===3)return{top:t[0],right:t[1],bottom:t[2],left:t[1]};if(t.length===2)return{top:t[0],right:t[1],bottom:t[0],left:t[1]};t.length===1?t=t[0]:t=e}return typeof t=="object"?(typeof t.vertical=="number"&&(t.top=t.vertical,t.bottom=t.vertical),typeof t.horizontal=="number"&&(t.right=t.horizontal,t.left=t.horizontal),{left:(n=t.left)!==null&&n!==void 0?n:e,top:(r=t.top)!==null&&r!==void 0?r:e,right:(i=t.right)!==null&&i!==void 0?i:e,bottom:(s=t.bottom)!==null&&s!==void 0?s:e}):(typeof t!="number"&&(t=e),{top:t,right:t,bottom:t,left:t})}
535function bL(t,e){var n=s1(e.settings.margin,0);return t.pageSize().width-(n.left+n.right)}function yJ(t,e,n,r,i){var s={},a=1.3333333333333333,o=g2(e,function(k){return i.getComputedStyle(k).backgroundColor});o!=null&&(s.fillColor=o);var l=g2(e,function(k){return i.getComputedStyle(k).color});l!=null&&(s.textColor=l);var c=bJ(r,n);c&&(s.cellPadding=c);var u="borderTopColor",d=a*n,f=r.borderTopWidth;if(r.borderBottomWidth===f&&r.borderRightWidth===f&&r.borderLeftWidth===f){var h=(parseFloat(f)||0)/d;h&&(s.lineWidth=h)}else s.lineWidth={top:(parseFloat(r.borderTopWidth)||0)/d,right:(parseFloat(r.borderRightWidth)||0)/d,bottom:(parseFloat(r.borderBottomWidth)||0)/d,left:(parseFloat(r.borderLeftWidth)||0)/d},s.lineWidth.top||(s.lineWidth.right?u="borderRightColor":s.lineWidth.bottom?u="borderBottomColor":s.lineWidth.left&&(u="borderLeftColor"));var y=g2(e,function(k){return i.getComputedStyle(k)[u]});y!=null&&(s.lineColor=y);var v=["left","right","center","justify"];v.indexOf(r.textAlign)!==-1&&(s.halign=r.textAlign),v=["middle","bottom","top"],v.indexOf(r.verticalAlign)!==-1&&(s.valign=r.verticalAlign);var _=parseInt(r.fontSize||"");isNaN(_)||(s.fontSize=_/a);var w=wJ(r);w&&(s.fontStyle=w);var x=(r.fontFamily||"").toLowerCase();return t.indexOf(x)!==-1&&(s.font=x),s}function wJ(t){var e="";return(t.fontWeight==="bold"||t.fontWeight==="bolder"||parseInt(t.fontWeight)>=700)&&(e="bold"),(t.fontStyle==="italic"||t.fontStyle==="oblique")&&(e+="italic"),e}function g2(t,e){var n=xL(t,e);if(!n)return null;var r=n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);if(!r||!Array.isArray(r))return null;var i=[parseInt(r[1]),parseInt(r[2]),parseInt(r[3])],s=parseInt(r[4]);return s===0||isNaN(i[0])||isNaN(i[1])||isNaN(i[2])?null:i}function xL(t,e){var n=e(t);return n==="rgba(0, 0, 0, 0)"||n==="transparent"||n==="initial"||n==="inherit"?t.parentElement==null?null:xL(t.parentElement,e):n}function bJ(t,e){var n=[t.paddingTop,t.paddingRight,t.paddingBottom,t.paddingLeft],r=96/(72/e),i=(parseInt(t.lineHeight)-parseInt(t.fontSize))/e/2,s=n.map(function(o){return parseInt(o||"0")/r}),a=s1(s,0);return i>a.top&&(a.top=i),i>a.bottom&&(a.bottom=i),a}function _L(t,e,n,r,i){var s,a;r===void 0&&(r=!1),i===void 0&&(i=!1);var o;typeof e=="string"?o=n.document.querySelector(e):o=e;var l=Object.keys(t.getFontList()),c=t.scaleFactor(),u=[],d=[],f=[];if(!o)return console.error("Html table could not be found with input: ",e),{head:u,body:d,foot:f};for(var h=0;h<o.rows.length;h++){var y=o.rows[h],v=(a=(s=y==null?void 0:y.parentElement)===null||s===void 0?void 0:s.tagName)===null||a===void 0?void 0:a.toLowerCase(),_=xJ(l,c,n,y,r,i);_&&(v==="thead"?u.push(_):v==="tfoot"?f.push(_):d.push(_))}return{head:u,body:d,foot:f}}function xJ(t,e,n,r,i,s){for(var a=new vL(r),o=0;o<r.cells.length;o++){var l=r.cells[o],c=n.getComputedStyle(l);if(i||c.display!=="none"){var u=void 0;s&&(u=yJ(t,l,e,c,n)),a.push({rowSpan:l.rowSpan,colSpan:l.colSpan,styles:u,_element:l,content:_J(l)})}}var d=n.getComputedStyle(r);if(a.length>0&&(i||d.display!=="none"))return a}function _J(t){var e=t.cloneNode(!0);return e.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/ +/g," "),e.innerHTML=e.innerHTML.split(/<br.*?>/).map(function(n){return n.trim()}).join(` 536`),e.innerText||e.textContent||""}function SJ(t,e,n){for(var r=0,i=[t,e,n];r<i.length;r++){var s=i[r];s&&typeof s!="object"&&console.error("The options parameter should be of type object, is: "+typeof s),s.startY&&typeof s.startY!="number"&&(console.error("Invalid value for startY option",s.startY),delete s.startY)}}function Xa(t,e,n,r,i){if(t==null)throw new TypeError("Cannot convert undefined or null to object");for(var s=Object(t),a=1;a<arguments.length;a++){var o=arguments[a];if(o!=null)for(var l in o)Object.prototype.hasOwnProperty.call(o,l)&&(s[l]=o[l])}return s}function SL(t,e){var n=new Qu(t),r=n.getDocumentOptions(),i=n.getGlobalOptions();SJ(i,r,e);var s=Xa({},i,r,e),a;typeof window<"u"&&(a=window);var o=kJ(i,r,e),l=EJ(i,r,e),c=NJ(n,s),u=CJ(n,s,a);return{id:e.tableId,content:u,hooks:l,styles:o,settings:c}}function kJ(t,e,n){for(var r={styles:{},headStyles:{},bodyStyles:{},footStyles:{},alternateRowStyles:{},columnStyles:{}},i=function(l){if(l==="columnStyles"){var c=t[l],u=e[l],d=n[l];r.columnStyles=Xa({},c,u,d)}else{var f=[t,e,n],h=f.map(function(y){return y[l]||{}});r[l]=Xa({},h[0],h[1],h[2])}},s=0,a=Object.keys(r);s<a.length;s++){var o=a[s];i(o)}return r}function EJ(t,e,n){for(var r=[t,e,n],i={didParseCell:[],willDrawCell:[],didDrawCell:[],willDrawPage:[],didDrawPage:[]},s=0,a=r;s<a.length;s++){var o=a[s];o.didParseCell&&i.didParseCell.push(o.didParseCell),o.willDrawCell&&i.willDrawCell.push(o.willDrawCell),o.didDrawCell&&i.didDrawCell.push(o.didDrawCell),o.willDrawPage&&i.willDrawPage.push(o.willDrawPage),o.didDrawPage&&i.didDrawPage.push(o.didDrawPage)}return i}function NJ(t,e){var n,r,i,s,a,o,l,c,u,d,f,h,y=s1(e.margin,40/t.scaleFactor()),v=(n=AJ(t,e.startY))!==null&&n!==void 0?n:y.top,_;e.showFoot===!0?_="everyPage":e.showFoot===!1?_="never":_=(r=e.showFoot)!==null&&r!==void 0?r:"everyPage";var w;
536e.showHead===!0?w="everyPage":e.showHead===!1?w="never":w=(i=e.showHead)!==null&&i!==void 0?i:"everyPage";var x=(s=e.useCss)!==null&&s!==void 0?s:!1,k=e.theme||(x?"plain":"striped"),N=!!e.horizontalPageBreak,R=(a=e.horizontalPageBreakRepeat)!==null&&a!==void 0?a:null;return{includeHiddenHtml:(o=e.includeHiddenHtml)!==null&&o!==void 0?o:!1,useCss:x,theme:k,startY:v,margin:y,pageBreak:(l=e.pageBreak)!==null&&l!==void 0?l:"auto",rowPageBreak:(c=e.rowPageBreak)!==null&&c!==void 0?c:"auto",tableWidth:(u=e.tableWidth)!==null&&u!==void 0?u:"auto",showHead:w,showFoot:_,tableLineWidth:(d=e.tableLineWidth)!==null&&d!==void 0?d:0,tableLineColor:(f=e.tableLineColor)!==null&&f!==void 0?f:200,horizontalPageBreak:N,horizontalPageBreakRepeat:R,horizontalPageBreakBehaviour:(h=e.horizontalPageBreakBehaviour)!==null&&h!==void 0?h:"afterAllRows"}}function AJ(t,e){var n=t.getLastAutoTable(),r=t.scaleFactor(),i=t.pageNumber(),s=!1;if(n&&n.startPageNumber){var a=n.startPageNumber+n.pageNumber-1;s=a===i}return typeof e=="number"?e:(e==null||e===!1)&&s&&(n==null?void 0:n.finalY)!=null?n.finalY+20/r:null}function CJ(t,e,n){var r=e.head||[],i=e.body||[],s=e.foot||[];if(e.html){var a=e.includeHiddenHtml;if(n){var o=_L(t,e.html,n,a,e.useCss)||{};r=o.head||r,i=o.body||r,s=o.foot||r}else console.error("Cannot parse html in non browser environment")}var l=e.columns||PJ(r,i,s);return{columns:l,head:r,body:i,foot:s}}function PJ(t,e,n){var r=t[0]||e[0]||n[0]||[],i=[];return Object.keys(r).filter(function(s){return s!=="_element"}).forEach(function(s){var a=1,o;Array.isArray(r)?o=r[parseInt(s)]:o=r[s],typeof o=="object"&&!Array.isArray(o)&&(a=(o==null?void 0:o.colSpan)||1);for(var l=0;l<a;l++){var c=void 0;Array.isArray(r)?c=i.length:c=s+(l>0?"_".concat(l):"");var u={dataKey:c};i.push(u)}}),i}var yb=function(){function t(e,n,r){this.table=n,this.pageNumber=n.pageNumber,this.settings=n.settings,this.cursor=r,this.doc=e.getDocument()}return t}(),TJ=function(t){gL(e,t);function e(n,r,i,s,a,o){var l=t.call(this,n,r,o)||this;return l.cell=i,l.row=s,l.column=a,l.section=s.section,l}return e}(yb),RJ=function(){function t(e,n){this.pageNumber=1,this.id=e.id,this.settings=e.settings,this.styles=e.styles,this.hooks=e.hooks,this.columns=n.columns,this.head=n.head,this.body=n.body,this.foot=n.foot}return t.prototype.getHeadHeight=function(e){return this.head.reduce(function(n,r){return n+r.getMaxCellHeight(e)},0)},t.prototype.getFootHeight=function(e){return this.foot.reduce(function(n,r){return n+r.getMaxCellHeight(e)},0)},t.prototype.allRows=function(){return this.head.concat(this.body).concat(this.foot)},t.prototype.callCellHooks=function(e,n,r,i,s,a){for(var o=0,l=n;o<l.length;o++){var c=l[o],u=new TJ(e,this,r,i,s,a),d=c(u)===!1;if(r.text=Array.isArray(r.text)?r.text:[r.text],d)return!1}return!0},t.prototype.callEndPageHooks=function(e,n){e.applyStyles(e.userStyles);for(var r=0,i=this.hooks.didDrawPage;r<i.length;r++){var s=i[r];s(new yb(e,this,n))}},t.prototype.callWillDrawPageHooks=function(e,n){for(var r=0,i=this.hooks.willDrawPage;r<i.length;r++){var s=i[r];s(new yb(e,this,n))}},t.prototype.getWidth=function(e){if(typeof this.settings.tableWidth=="number")return this.settings.tableWidth;if(this.settings.tableWidth==="wrap"){var n=this.columns.reduce(function(i,s){return i+s.wrappedWidth},0);return n}else{var r=this.settings.margin;return e-r.left-r.right}},t}(),kL=function(){function t(e,n,r,i,s){s===void 0&&(s=!1),this.height=0,this.raw=e,e instanceof vL&&(this.raw=e._element,this.element=e._element),this.index=n,this.section=r,this.cells=i,this.spansMultiplePages=s}return t.prototype.getMaxCellHeight=function(e){var n=this;return e.reduce(function(r,i){var s;return Math.max(r,((s=n.cells[i.index])===null||s===void 0?void 0:s.height)||0)},0)},t.prototype.hasRowSpan=function(e){var n=this;return e.filter(function(r){var i=n.cells[r.index];return i?i.rowSpan>1:!1}).length>0},t.prototype.canEntireRowFit=function(e,n){return this.getMaxCellHeight(n)<=e},t.prototype.getMinimumRowHeight=function(e,n){var r=this;return e.reduce(function(i,s){var a=r.cells[s.index];if(!a)return 0;var o=n.getLineHeight(a.styles.fontSize),l=a.padding("vertical"),c=l+o;return c>i?c:i},0)},t}(),EL=function(){function t(e,n,r){var i;this.contentHeight=0,this.contentWidth=0,this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.height=0,this.x=0,this.y=0,this.styles=n,this.section=r,this.raw=e;var s=e;e!=null&&typeof e=="object"&&!Array.isArray(e)?(this.rowSpan=e.rowSpan||1,this.colSpan=e.colSpan||1,s=(i=e.content)!==null&&i!==void 0?i:e,e._element&&(this.raw=e._element)):(this.rowSpan=1,this.colSpan=1);var a=s!=null?""+s:"",o=/\r\n|\r|\n/g;this.text=a.split(o)}return t.prototype.getTextPos=function(){var e;if(this.styles.valign==="top")e=this.y+this.padding("top");else if(this.styles.valign==="bottom")e=this.y+this.height-this.padding("bottom");else{var n=this.height-this.padding("vertical");e=this.y+n/2+this.padding("top")}var r;if(this.styles.halign==="right")r=this.x+this.width-this.padding("right");else if(this.styles.halign==="center"){var i=this.width-this.padding("horizontal");r=this.x+i/2+this.padding("left")}else r=this.x+this.padding("left");return{x:r,y:e}}
536,t.prototype.getContentHeight=function(e,n){n===void 0&&(n=1.15);var r=Array.isArray(this.text)?this.text.length:1,i=this.styles.fontSize/e*n,s=r*i+this.padding("vertical");return Math.max(s,this.styles.minCellHeight)},t.prototype.padding=function(e){var n=s1(this.styles.cellPadding,0);return e==="vertical"?n.top+n.bottom:e==="horizontal"?n.left+n.right:n[e]},t}(),LJ=function(){function t(e,n,r){this.wrappedWidth=0,this.minReadableWidth=0,this.minWidth=0,this.width=0,this.dataKey=e,this.raw=n,this.index=r}return t.prototype.getMaxCustomCellWidth=function(e){for(var n=0,r=0,i=e.allRows();r<i.length;r++){var s=i[r],a=s.cells[this.index];a&&typeof a.styles.cellWidth=="number"&&(n=Math.max(n,a.styles.cellWidth))}return n},t}();function jJ(t,e){OJ(t,e);var n=[],r=0;e.columns.forEach(function(s){var a=s.getMaxCustomCellWidth(e);a?s.width=a:(s.width=s.wrappedWidth,n.push(s)),r+=s.width});var i=e.getWidth(t.pageSize().width)-r;i&&(i=wb(n,i,function(s){return Math.max(s.minReadableWidth,s.minWidth)})),i&&(i=wb(n,i,function(s){return s.minWidth})),i=Math.abs(i),!e.settings.horizontalPageBreak&&i>.1/t.scaleFactor()&&(i=i<1?i:Math.round(i),console.log("Of the table content, ".concat(i," units width could not fit page"))),DJ(e),MJ(e,t),IJ(e)}function OJ(t,e){var n=t.scaleFactor(),r=e.settings.horizontalPageBreak,i=bL(t,e);e.allRows().forEach(function(s){for(var a=0,o=e.columns;a<o.length;a++){var l=o[a],c=s.cells[l.index];if(c){var u=e.hooks.didParseCell;e.callCellHooks(t,u,c,s,l,null);var d=c.padding("horizontal");c.contentWidth=Y0(c.text,c.styles,t)+d;var f=Y0(c.text.join(" ").split(/[^\S\u00A0]+/),c.styles,t);if(c.minReadableWidth=f+c.padding("horizontal"),typeof c.styles.cellWidth=="number")c.minWidth=c.styles.cellWidth,c.wrappedWidth=c.styles.cellWidth;else if(c.styles.cellWidth==="wrap"||r===!0)c.contentWidth>i?(c.minWidth=i,c.wrappedWidth=i):(c.minWidth=c.contentWidth,c.wrappedWidth=c.contentWidth);else{var h=10/n;c.minWidth=c.styles.minCellWidth||h,c.wrappedWidth=c.contentWidth,c.minWidth>c.wrappedWidth&&(c.wrappedWidth=c.minWidth)}}}}),e.allRows().forEach(function(s){for(var a=0,o=e.columns;a<o.length;a++){var l=o[a],c=s.cells[l.index];if(c&&c.colSpan===1)l.wrappedWidth=Math.max(l.wrappedWidth,c.wrappedWidth),l.minWidth=Math.max(l.minWidth,c.minWidth),l.minReadableWidth=Math.max(l.minReadableWidth,c.minReadableWidth);else{var u=e.styles.columnStyles[l.dataKey]||e.styles.columnStyles[l.index]||{},d=u.cellWidth||u.minCellWidth;d&&typeof d=="number"&&(l.minWidth=d,l.wrappedWidth=d)}c&&(c.colSpan>1&&!l.minWidth&&(l.minWidth=c.minWidth),c.colSpan>1&&!l.wrappedWidth&&(l.wrappedWidth=c.minWidth))}})}function wb(t,e,n){for(var r=e,i=t.reduce(function(h,y){return h+y.wrappedWidth},0),s=0;s<t.length;s++){var a=t[s],o=a.wrappedWidth/i,l=r*o,c=a.width+l,u=n(a),d=c<u?u:c;e-=d-a.width,a.width=d}if(e=Math.round(e*1e10)/1e10,e){var f=t.filter(function(h){return e<0?h.width>n(h):!0});f.length&&(e=wb(f,e,n))}return e}function IJ(t){for(var e={},n=1,r=t.allRows(),i=0;i<r.length;i++)for(var s=r[i],a=0,o=t.columns;a<o.length;a++){var l=o[a],c=e[l.index];if(n>1)n--,delete s.cells[l.index];else if(c)c.cell.height+=s.height,n=c.cell.colSpan,delete s.cells[l.index],c.left--,c.left<=1&&delete e[l.index];else{var u=s.cells[l.index];if(!u)continue;if(u.height=s.height,u.rowSpan>1){var d=r.length-i,f=u.rowSpan>d?d:u.rowSpan;e[l.index]={cell:u,left:f,row:s}}}}}function DJ(t){for(var e=t.allRows(),n=0;n<e.length;n++)for(var r=e[n],i=null,s=0,a=0,o=0;o<t.columns.length;o++){var l=t.columns[o];if(a-=1,a>1&&t.columns[o+1])s+=l.width,delete r.cells[l.index];else if(i){var c=i;delete r.cells[l.index],i=null,c.width=l.width+s}else{var c=r.cells[l.index];if(!c)continue;if(a=c.colSpan,s=0,c.colSpan>1){i=c,s+=l.width;continue}c.width=l.width+s}}}function MJ(t,e){for(var n={count:0,height:0},r=0,i=t.allRows();r<i.length;r++){for(var s=i[r],a=0,o=t.columns;a<o.length;a++){var l=o[a],c=s.cells[l.index];if(c){e.applyStyles(c.styles,!0);var u=c.width-c.padding("horizontal");if(c.styles.overflow==="linebreak")c.text=e.splitTextToSize(c.text,u+1/e.scaleFactor(),{fontSize:c.styles.fontSize});else if(c.styles.overflow==="ellipsize")c.text=n4(c.text,u,c.styles,e,"...");else if(c.styles.overflow==="hidden")c.text=n4(c.text,u,c.styles,e,"");else if(typeof c.styles.overflow=="function"){var d=c.styles.overflow(c.text,u);
536typeof d=="string"?c.text=[d]:c.text=d}c.contentHeight=c.getContentHeight(e.scaleFactor(),e.getLineHeightFactor());var f=c.contentHeight/c.rowSpan;c.rowSpan>1&&n.count*n.height<f*c.rowSpan?n={height:f,count:c.rowSpan}:n&&n.count>0&&n.height>f&&(f=n.height),f>s.height&&(s.height=f)}}n.count--}}function n4(t,e,n,r,i){return t.map(function(s){return FJ(s,e,n,r,i)})}function FJ(t,e,n,r,i){var s=1e4*r.scaleFactor();if(e=Math.ceil(e*s)/s,e>=Y0(t,n,r))return t;for(;e<Y0(t+i,n,r)&&!(t.length<=1);)t=t.substring(0,t.length-1);return t.trim()+i}function NL(t,e){var n=new Qu(t),r=zJ(e,n.scaleFactor()),i=new RJ(e,r);return jJ(n,i),n.applyStyles(n.userStyles),i}function zJ(t,e){var n=t.content,r=UJ(n.columns);if(n.head.length===0){var i=r4(r,"head");i&&n.head.push(i)}if(n.foot.length===0){var i=r4(r,"foot");i&&n.foot.push(i)}var s=t.settings.theme,a=t.styles;return{columns:r,head:v2("head",n.head,r,a,s,e),body:v2("body",n.body,r,a,s,e),foot:v2("foot",n.foot,r,a,s,e)}}function v2(t,e,n,r,i,s){var a={},o=e.map(function(l,c){for(var u=0,d={},f=0,h=0,y=0,v=n;y<v.length;y++){var _=v[y];if(a[_.index]==null||a[_.index].left===0)if(h===0){var w=void 0;Array.isArray(l)?w=l[_.index-f-u]:w=l[_.dataKey];var x={};typeof w=="object"&&!Array.isArray(w)&&(x=(w==null?void 0:w.styles)||{});var k=BJ(t,_,c,i,r,s,x),N=new EL(w,k,t);d[_.dataKey]=N,d[_.index]=N,h=N.colSpan-1,a[_.index]={left:N.rowSpan-1,times:h}}else h--,f++;else a[_.index].left--,h=a[_.index].times,u++}return new kL(l,c,t,d)});return o}function r4(t,e){var n={};return t.forEach(function(r){if(r.raw!=null){var i=$J(e,r.raw);i!=null&&(n[r.dataKey]=i)}}),Object.keys(n).length>0?n:null}function $J(t,e){if(t==="head"){if(typeof e=="object")return e.header||null;if(typeof e=="string"||typeof e=="number")return e}else if(t==="foot"&&typeof e=="object")return e.footer;return null}function UJ(t){return t.map(function(e,n){var r,i;return typeof e=="object"?i=(r=e.dataKey)!==null&&r!==void 0?r:n:i=n,new LJ(i,e,n)})}function BJ(t,e,n,r,i,s,a){var o=vJ(r),l;t==="head"?l=i.headStyles:t==="body"?l=i.bodyStyles:t==="foot"&&(l=i.footStyles);var c=Xa({},o.table,o[t],i.styles,l),u=i.columnStyles[e.dataKey]||i.columnStyles[e.index]||{},d=t==="body"?u:{},f=t==="body"&&n%2===0?Xa({},o.alternateRow,i.alternateRowStyles):{},h=gJ(s),y=Xa({},h,c,f,d);return Xa(y,a)}function qJ(t,e,n){var r;n===void 0&&(n={});var i=bL(t,e),s=new Map,a=[],o=[],l=[];Array.isArray(e.settings.horizontalPageBreakRepeat)?l=e.settings.horizontalPageBreakRepeat:(typeof e.settings.horizontalPageBreakRepeat=="string"||typeof e.settings.horizontalPageBreakRepeat=="number")&&(l=[e.settings.horizontalPageBreakRepeat]),l.forEach(function(f){var h=e.columns.find(function(y){return y.dataKey===f||y.index===f});h&&!s.has(h.index)&&(s.set(h.index,!0),a.push(h.index),o.push(e.columns[h.index]),i-=h.wrappedWidth)});for(var c=!0,u=(r=n==null?void 0:n.start)!==null&&r!==void 0?r:0;u<e.columns.length;){if(s.has(u)){u++;continue}var d=e.columns[u].wrappedWidth;if(c||i>=d)c=!1,a.push(u),o.push(e.columns[u]),i-=d;else break;u++}return{colIndexes:a,columns:o,lastIndex:u-1}}function HJ(t,e){for(var n=[],r=0;r<e.columns.length;r++){var i=qJ(t,e,{start:r});i.columns.length&&(n.push(i),r=i.lastIndex)}return n}function AL(t,e){var n=e.settings,r=n.startY,i=n.margin,s={x:i.left,y:r},a=e.getHeadHeight(e.columns)+e.getFootHeight(e.columns),o=r+i.bottom+a;if(n.pageBreak==="avoid"){var l=e.body,c=l.reduce(function(f,h){return f+h.height},0);o+=c}var u=new Qu(t);(n.pageBreak==="always"||n.startY!=null&&o>u.pageSize().height)&&(PL(u),s.y=i.top),e.callWillDrawPageHooks(u,s);var d=Xa({},s);e.startPageNumber=u.pageNumber(),n.horizontalPageBreak?WJ(u,e,d,s):(u.applyStyles(u.userStyles),(n.showHead==="firstPage"||n.showHead==="everyPage")&&e.head.forEac
vendor: 1,098 bytes, line 536
536h(function(f){return oo(u,e,f,s,e.columns)}),u.applyStyles(u.userStyles),e.body.forEach(function(f,h){var y=h===e.body.length-1;J0(u,e,f,y,d,s,e.columns)}),u.applyStyles(u.userStyles),(n.showFoot==="lastPage"||n.showFoot==="everyPage")&&e.foot.forEach(function(f){return oo(u,e,f,s,e.columns)})),yL(u,e,d,s),e.callEndPageHooks(u,s),e.finalY=s.y,t.lastAutoTable=e,u.applyStyles(u.userStyles)}function WJ(t,e,n,r){var i=HJ(t,e),s=e.settings;if(s.horizontalPageBreakBehaviour==="afterAllRows")i.forEach(function(c,u){t.applyStyles(t.userStyles),u>0?ff(t,e,n,r,c.columns,!0):i4(t,e,r,c.columns),VJ(t,e,n,r,c.columns),y2(t,e,r,c.columns)});else for(var a=-1,o=i[0],l=function(){var c=a;if(o){t.applyStyles(t.userStyles);var u=o.columns;a>=0?ff(t,e,n,r,u,!0):i4(t,e,r,u),c=s4(t,e,a+1,r,u),y2(t,e,r,u)}var d=c-a;i.slice(1).forEach(function(f){t.applyStyles(t.userStyles),ff(t,e,n,r,f.columns,!0),s4(t,e,a+1,r,f.columns,d),y2(t,e,r,f.columns)}),a=c};a<e.body.length-1;)l()}function i4(t,e,n,r){var i=e.settings;t.applyStyles(t.userStyles),(i.showHead==="firstPage"||i.showHead==="everyPage")&&e.head.forEac
536h(function(s){return oo(t,e,s,n,r)})}function VJ(t,e,n,r,i){t.applyStyles(t.userStyles),e.body.forEach(function(s,a){var o=a===e.body.length-1;J0(t,e,s,o,n,r,i)})}function s4(t,e,n,r,i,s){t.applyStyles(t.userStyles),s=s??e.body.length;for(var a=Math.min(n+s,e.body.length),o=-1,l=e.body.slice(n,a),c=0;c<l.length;c++){var u=l[c],d=n+c===e.body.length-1,f=CL(t,e,d,r);if(u.canEntireRowFit(f,i))oo(t,e,u,r,i),o=n+c;else break}return o}function y2(t,e,n,r){var i=e.settings;t.applyStyles(t.userStyles),(i.showFoot==="lastPage"||i.showFoot==="everyPage")&&e.foot.forEach(function(s){return oo(t,e,s,n,r)})}function GJ(t,e,n){var r=n.getLineHeight(t.styles.fontSize),i=t.padding("vertical"),s=Math.floor((e-i)/r);return Math.max(0,s)}function KJ(t,e,n,r){var i={};t.spansMultiplePages=!0,t.height=0;for(var s=0,a=0,o=n.columns;a<o.length;a++){var l=o[a],c=t.cells[l.index];if(c){Array.isArray(c.text)||(c.text=[c.text]);var u=new EL(c.raw,c.styles,c.section);u=Xa(u,c),u.text=[];var d=GJ(c,e,r);c.text.length>d&&(u.text=c.text.splice(d,c.text.length));var f=r.scaleFactor(),h=r.getLineHeightFactor();c.contentHeight=c.getContentHeight(f,h),c.contentHeight>=e&&(c.contentHeight=e,u.styles.minCellHeight-=e),c.contentHeight>t.height&&(t.height=c.contentHeight),u.contentHeight=u.getContentHeight(f,h),u.contentHeight>s&&(s=u.contentHeight),i[l.index]=u}}var y=new kL(t.raw,-1,t.section,i,!0);y.height=s;for(var v=0,_=n.columns;v<_.length;v++){var l=_[v],u=y.cells[l.index];u&&(u.height=y.height);var c=t.cells[l.index];c&&(c.height=t.height)}return y}function ZJ(t,e,n,r){var i=t.pageSize().height,s=r.settings.margin,a=s.top+s.bottom,o=i-a;e.section==="body"&&(o-=r.getHeadHeight(r.columns)+r.getFootHeight(r.columns));var l=e.getMinimumRowHeight(r.columns,t),c=l<n;if(l>o)return console.log("Will not be able to print row ".concat(e.index," correctly since it's minimum height is larger than page height")),!0;if(!c)return!1;var u=e.hasRowSpan(r.columns),d=e.getMaxCellHeight(r.columns)>o;return d?(u&&console.log("The content of row ".concat(e.index," will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")),!0):!(u||r.settings.rowPageBreak==="avoid")}function J0(t,e,n,r,i,s,a){var o=CL(t,e,r,s);if(n.canEntireRowFit(o,a))oo(t,e,n,s,a);else if(ZJ(t,n,o,e)){var l=KJ(n,o,e,t);oo(t,e,n,s,a),ff(t,e,i,s,a),J0(t,e,l,r,i,s,a)}else ff(t,e,i,s,a),J0(t,e,n,r,i,s,a)}function oo(t,e,n,r,i){r.x=e.settings.margin.left;for(var s=0,a=i;s<a.length;s++){var o=a[s],l=n.cells[o.index];if(!l){r.x+=o.width;continue}t.applyStyles(l.styles),l.x=r.x,l.y=r.y;var c=e.callCellHooks(t,e.hooks.willDrawCell,l,n,o,r);if(c===!1){r.x+=o.width;continue}YJ(t,l,r);var u=l.getTextPos();mL(l.text,u.x,u.y,{halign:l.styles.halign,valign:l.styles.valign,maxWidth:Math.ceil(l.width-l.padding("left")-l.padding("right"))},t.getDocument()),e.callCellHooks(t,e.hooks.didDrawCell,l,n,o,r),r.x+=o.width}r.y+=n.height}function YJ(t,e,n){var r=e.styles;if(t.getDocument().setFillColor(t.getDocument().getFillColor()),typeof r.lineWidth=="number"){var i=wL(r.lineWidth,r.fillColor);i&&t.rect(e.x,n.y,e.width,e.height,i)}else typeof r.lineWidth=="object"&&(r.fillColor&&t.rect(e.x,n.y,e.width,e.height,"F"),JJ(t,e,n,r.lineWidth))}function JJ(t,e,n,r){var i,s,a,o;r.top&&(i=n.x,s=n.y,a=n.x+e.width,o=n.y,r.right&&(a+=.5*r.right),r.left&&(i-=.5*r.left),l(r.top,i,s,a,o)),r.bottom&&(i=n.x,s=n.y+e.height,a=n.x+e.width,o=n.y+e.height,r.right&&(a+=.5*r.right),r.left&&(i-=.5*r.left),l(r.bottom,i,s,a,o)),r.left&&(i=n.x,s=n.y,a=n.x,o=n.y+e.height,r.top&&(s-=.5*r.top),r.bottom&&(o+=.5*r.bottom),l(r.left,i,s,a,o)),r.right&&(i=n.x+e.width,s=n.y,a=n.x+e.width,o=n.y+e.height,r.top&&(s-=.5*r.top),r.bottom&&(o+=.5*r.bottom),l(r.right,i,s,a,o));function l(c,u,d,f,h){t.getDocument().setLineWidth(c),t.getDocument().line(u,d,f,h,"S")}}function CL(t,e,n,r){var i=e.settings.margin.bottom,s=e.settings.showFoot;return(s==="everyPage"||s==="lastPage"&&n)&&(i+=e.getFootHeight(e.columns)),t.pageSize().height-r.y-i}function ff(t,e,n,r,i,s){i===void 0&&(i=[]),s===void 0&&(s=!1),t.applyStyles(t.userStyles),e.settings.showFoot==="everyPage"&&!s&&e.foot.forEach(function(o){return oo(t,e,o,r,i)}),e.callEndPageHooks(t,r);var a=e.settings.margin;yL(t,e,n,r),PL(t),e.pageNumber++,r.x=a.left,r.y=a.top,n.y=a.top,e.callWillDrawPageHooks(t,r),e.settings.showHead==="everyPage"&&(e.head.forEac
536h(function(o){return oo(t,e,o,r,i)}),t.applyStyles(t.userStyles))}function PL(t){var e=t.pageNumber();t.setPage(e+1);var n=t.pageNumber();return n===e?(t.addPage(),!0):!1}function XJ(t){t.API.autoTable=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var r=e[0],i=SL(this,r),s=NL(this,i);return AL(this,s),this},t.API.lastAutoTable=!1,t.API.autoTableText=function(e,n,r,i){mL(e,n,r,i,this)},t.API.autoTableSetDefaults=function(e){return Qu.setDefaults(e,this),this},t.autoTableSetDefaults=function(e,n){Qu.setDefaults(e,n)},t.API.autoTableHtmlToJson=function(e,n){var r;if(n===void 0&&(n=!1),typeof window>"u")return console.error("Cannot run autoTableHtmlToJson in non browser environment"),null;var i=new Qu(this),s=_L(i,e,window,n,!1),a=s.head,o=s.body,l=((r=a[0])===null||r===void 0?void 0:r.map(function(c){return c.content}))||[];return{columns:l,rows:o,data:o}}}var w2;function QJ(t,e){var n=SL(t,e),r=NL(t,n);AL(t,r)}try{if(typeof window<"u"&&window){var a4=window,o4=a4.jsPDF||((w2=a4.jspdf)===null||w2===void 0?void 0:w2.jsPDF);o4&&XJ(o4)}}catch(t){console.error("Could not apply autoTable plugin",t)}const eX=(t,e)=>{const n=new nt;n.addImage("/lovable-uploads/3da707ea-452b-4812-8001-ebc607dfa5e2.png","PNG",14,10,70,20),n.setFontSize(20),n.setTextColor(0,47,167),n.text(`Report AEO di ${t.domain}`,14,45),n.setFontSize(10),n.setTextColor(100,100,100),n.text(`URL analizzato: ${e}`,14,55);const i=new Date;n.text(`Data: ${i.toLocaleDateString("it-IT")}`,14,60),n.setFontSize(14),n.setTextColor(0,0,0),n.text(`Punteggio complessivo: ${t.overallScore}/100`,14,70),n.setFontSize(14),n.text("Metriche AEO",14,80);const s=t.metrics.map(c=>[c.title,c.value,c.status==="good"?"Buono":c.status==="warning"?"Da migliorare":"Critico"]);QJ(n,{startY:85,head:[["Metrica","Valore","Stato"]],body:s,theme:"striped",headStyles:{fillColor:[0,90,200]}});const a=n.lastAutoTable.finalY+15;n.setFontSize(14),n.text("Problemi e suggerimenti",14,a);let o=a+8;t.issues.forEach((c,u)=>{o>250&&(n.addPage(),o=20),n.setFontSize(12),n.setTextColor(0,0,0),n.text(`${u+1}. ${c.title}`,14,o),o+=7,n.setFontSize(10),n.setTextColor(80,80,80);const d=n.splitTextToSize(c.description,180);n.text(d,14,o),o+=d.length*5+3,n.setTextColor(0,100,0);const f=n.splitTextToSize(`Suggerimento: ${c.suggestion}`,180);n.text(f,14,o),o+=f.length*5+10});const l=n.getNumberOfPages();for(let c=1;c<=l;c++){n.setPage(c),n.setFontSize(8),n.setTextColor(150,150,150);const d=n.splitTextToSize("AEO Analyzer, La prima piattaforma italiana di analisi AEO. AEOanalyzer è un prodotto creato da Vincenzo Barbagallo P.I. 05989610877 Iscritto alla Camera di Commercio REA CT-470241.",180);n.text(d,14,280),n.text(`Pagina ${c} di ${l}`,14,290)}return n.save(`AEO_Report_${t.domain}.pdf`),!0},tX=({reportData:t,url:e})=>{const{toast:n}=Tc(),r=()=>{try{eX(t,e),n({title:"Esportazione completata",description:"Il report è stato esportato con successo in formato PDF"})}catch(i){console.error("Errore durante l'esportazione del PDF:",i),n({title:"Errore di esportazione",description:"Non è stato possibile generare il PDF. Riprova più tardi.",variant:"destructive"})}};return m.jsxs(En,{onClick:r,className:"bg-primary text-primary-foreground hover:bg-primary/80 font-semibold neon-glow-green",children:[m.jsx(Cx,{className:"mr-2 h-4 w-4"}),"Esporta in PDF"]})};function nX(t){const e=Object.prototype.toString.call(t);return t instanceof Date||typeof t=="object"&&e==="[object Date]"?new t.constructor(+t):typeof t=="number"||e==="[object Number]"||typeof t=="string"||e==="[object String]"?new Date(t):new Date(NaN)}function b2(t,e){const n=t<0?"-":"",r=Math.abs(t).toString().padStart(e,"0");return n+r}function rX(t,e){const n=nX(t);if(isNaN(n.getTime()))throw new RangeError("Invalid time value");const r=(e==null?void 0:e.format)??"extended";let i="";const s=r==="extended"?"-":"";{const a=b2(n.getDate(),2),o=b2(n.getMonth()+1,2);i=`${b2(n.getFullYear(),4)}${s}${o}${s}${a}`}return i}const iX=t=>{const{domain:e,url:n,pageContent:r}=t,i=rX(new Date,{representation:"date"});let s=`# ${e} 537 538`;return s+=`> Contenuti principali del sito ${e}. Documento generato il ${i}. 539 540`,s+=`Questo documento contiene una raccolta dei contenuti principali presenti sul sito ${n}, organizzati in modo strutturato per facilitare l'analisi e la comprensione da parte dei modelli di linguaggio. 541 542`,r?(r.title&&(s+=`## Titolo della pagina 543 544${r.title} 545 546`),r.description&&(s+=`## Descrizione 547 548${r.description} 549 550`),r.mainHeadings&&r.mainHeadings.length>0&&(s+=`## Intestazioni principali 551
552`,r.mainHeadings.forEach(a=>{s+=`- ${a} 553`}),s+=` 554`),r.keyTopics&&r.keyTopics.length>0&&(s+=`## Argomenti chiave 555 556`,r.keyTopics.forEach(a=>{s+=`- ${a} 557`}),s+=` 558`),r.links&&r.links.length>0&&(s+=`## Collegamenti importanti 559 560`,r.links.forEach(a=>{s+=`- [${a.text}](${a.url}) 561`}),s+=` 562`)):(s+=`## Contenuto non disponibile 563 564`,s+=`I contenuti dettagliati di questo sito non sono disponibili nell'attuale analisi. Visita ${n} per visualizzare il contenuto completo. 565 566`),s+=`## Opzionale 567 568`,s+=`- [Schema.org](https://schema.org/) - Documentazione per l'implementazione di dati strutturati. 569`,s+=`- [Google Search Central](https://developers.google.com/search) - Linee guida per l'ottimizzazione dei contenuti. 570`,s+=`- [Answer Engine Optimization](https://vincenzobarbagallo.it) - Risorse su come ottimizzare i contenuti per i motori di risposta. 571 572`,s+=`--- 573 574`,s+=`Questo documento è stato generato automaticamente come risorsa per modelli di linguaggio. Contiene solo una rappresentazione parziale dei contenuti presenti sul sito. 575`,s},sX=t=>{const e=iX(t),r=`${t.domain.replace(/[^a-zA-Z0-9]/g,"_")}_llms.txt`,i=new Blob([e],{type:"text/plain"}),s=URL.createObjectURL(i),a=document.createElement("a");a.href=s,a.download=r,a.click(),URL.revokeObjectURL(s)},aX=({reportData:t,url:e})=>{const{toast:n}=Tc(),r=()=>{try{const i={domain:t.domain,url:e,overallScore:t.overallScore,metrics:t.metrics,issues:t.issues,pageContent:t.pageContent||{title:t.pageTitle||t.domain,description:t.pageDescription||"Contenuto del sito web",mainHeadings:t.headings||[],keyTopics:t.keywords||[],links:t.links||[]}};sX(i),n({title:"Esportazione completata",description:"Il file llms.txt è stato generato e scaricato con successo"})}catch(i){console.error("Errore durante la generazione del file LLM:",i),n({title:"Errore di esportazione",description:"Non è stato possibile generare il file llms.txt. Riprova più tardi.",variant:"destructive"})}};return m.jsxs(En,{onClick:r,variant:"outline",className:"border-primary/50 text-foreground hover:bg-primary/20 hover:border-primary font-semibold",children:[m.jsx(SC,{className:"mr-2 h-4 w-4 text-primary"}),"Esporta in formato LLM"]})},oX=({reportData:t,url:e})=>m.jsx("section",{className:"w-full py-12 bg-gradient-to-br from-background via-secondary/50 to-background",children:m.jsxs("div",{className:"container px-4 md:px-6",children:[m.jsxs("div",{className:"text-center space-y-4 mb-8",children:[m.jsx("div",{className:"inline-flex px-4 py-1.5 rounded-full glass border-primary/30 neon-text-green text-sm font-medium",children:"Analisi AEO completata"}),m.jsxs("h1",{className:"text-3xl font-bold tracking-tighter sm:text-4xl md:text-5xl text-foreground",children:["Report AEO di ",m.jsx("span",{className:"neon-text-cyan",children:t.domain})]}),m.jsx("p",{className:"text-muted-foreground max-w-[700px] mx-auto",children:"Ecco i risultati dell'analisi di Answer Engine Optimization. Scorri per vedere tutti i dettagli e i suggerimenti di miglioramento."}),m.jsxs("div",{className:"flex items-center justify-center space-x-2 text-sm",children:[m.jsx(Px,{className:"h-4 w-4 text-muted-foreground"}),m.jsxs("a",{href:e||"",target:"_blank",rel:"noopener noreferrer",className:"neon-text-cyan hover:underline flex items-center",children:[e," ",m.jsx(Q7,{className:"h-3 w-3 ml-1"})]})]})]}),m.jsx("div",{className:"flex justify-center pb-6",children:m.jsx(hG,{score:t.overallScore,size:180,strokeWidth:12})}),m.jsxs("div",{className:"flex flex-col md:flex-row justify-center mt-6 space-y-4 md:space-y-0 md:space-x-4",children:[m.jsx(tX,{reportData:t,url:e||""}),m.jsx(aX,{reportData:t,url:e||""}),m.jsx("a",{href:"https://vincenzobarbagallo.it/consulenzagratuita/",target:"_blank",rel:"noopener noreferrer",children:m.jsxs(En,{className:"bg-accent hover:bg-accent/80 text-accent-foreground font-semibold neon-glow-magenta w-full md:w-auto",children:[m.jsx(iD,{className:"mr-2 h-4 w-4"}),"Ricevi una consulenza gratuita"]})})]})]})}),lX=({title:t,value:e,description:n,status:r,icon:i})=>{const a=(()=>{switch(r){case"good":return{iconBg:"bg-primary/20 text-primary",badge:"bg-primary/20 text-primary border-primary/30",label:"Buono"};case"warning":return{iconBg:"bg-amber-500/20 text-amber-400",badge:"bg-amber-500/20 text-amber-400 border-amber-500/30",label:"Attenzione"};case"bad":return{iconBg:"bg-destructive/20 text-destructive",badge:"bg-destructive/20 text-destructive border-destructive/30",label:"Critico"};default:return{iconBg:"bg-muted text-muted-foreground",badge:"bg-muted text-muted-foreground border-border",label:"N/A"}}})();return m.jsxs("div",{className:"metric-card",children:[m.jsxs("div",{className:"flex items-center justify-between mb-4",children:[m.jsx("div",{className:`rounded-full p-2 ${a.iconBg}`,children:m.jsx(i,{className:"h-5 w-5"})}),m.jsx("div",{className:`text-sm font-medium px-3 py-1 rounded-full border ${a.badge}`,children:a.label})]}),m.jsx("h3",{className:"text-lg font-medium text-foreground",children:t}),m.jsx("p",{className:"text-2xl font-bold my-2 neon-text-cyan",children:e}),m.jsx("p",{className:"text-sm text-muted-foreground",children:n})]})};
575var _5="Tabs",[cX,Nne]=uo(_5,[Jv]),TL=Jv(),[uX,S5]=cX(_5),RL=E.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,onValueChange:i,defaultValue:s,orientation:a="horizontal",dir:o,activationMode:l="automatic",...c}=t,u=Zv(o),[d,f]=Nl({prop:r,onChange:i,defaultProp:s});return m.jsx(uX,{scope:n,baseId:eo(),value:d,onValueChange:f,orientation:a,dir:u,activationMode:l,children:m.jsx(xt.div,{dir:u,"data-orientation":a,...c,ref:e})})});RL.displayName=_5;var LL="TabsList",jL=E.forwardRef((t,e)=>{const{__scopeTabs:n,loop:r=!0,...i}=t,s=S5(LL,n),a=TL(n);return m.jsx(i6,{asChild:!0,...a,orientation:s.orientation,dir:s.dir,loop:r,children:m.jsx(xt.div,{role:"tablist","aria-orientation":s.orientation,...i,ref:e})})});jL.displayName=LL;var OL="TabsTrigger",IL=E.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,disabled:i=!1,...s}=t,a=S5(OL,n),o=TL(n),l=FL(a.baseId,r),c=zL(a.baseId,r),u=r===a.value;return m.jsx(s6,{asChild:!0,...o,focusable:!i,active:u,children:m.jsx(xt.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:l,...s,ref:e,onMouseDown:qe(t.onMouseDown,d=>{!i&&d.button===0&&d.ctrlKey===!1?a.onValueChange(r):d.preventDefault()}),onKeyDown:qe(t.onKeyDown,d=>{[" ","Enter"].includes(d.key)&&a.onValueChange(r)}),onFocus:qe(t.onFocus,()=>{const d=a.activationMode!=="manual";!u&&!i&&d&&a.onValueChange(r)})})})});IL.displayName=OL;var DL="TabsContent",ML=E.forwardRef((t,e)=>{const{__scopeTabs:n,value:r,forceMount:i,children:s,...a}=t,o=S5(DL,n),l=FL(o.baseId,r),c=zL(o.baseId,r),u=r===o.value,d=E.useRef(u);return E.useEffect(()=>{const f=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(f)},[]),m.jsx(El,{present:i||u,children:({present:f})=>m.jsx(xt.div,{"data-state":u?"active":"inactive","data-orientation":o.orientation,role:"tabpanel","aria-labelledby":l,hidden:!f,id:c,tabIndex:0,...a,ref:e,style:{...t.style,animationDuration:d.current?"0s":void 0},children:f&&s})})});ML.displayName=DL;function FL(t,e){return`${t}-trigger-${e}`}function zL(t,e){return`${t}-content-${e}`}var dX=RL,$L=jL,UL=IL,BL=ML;const hX=dX,qL=E.forwardRef(({className:t,...e},n)=>m.jsx($L,{ref:n,className:St("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...e}));qL.displayName=$L.displayName;const Gg=E.forwardRef(({className:t,...e},n)=>m.jsx(UL,{ref:n,className:St("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...e}));Gg.displayName=UL.displayName;const fX=E.forwardRef(({className:t,...e},n)=>m.jsx(BL,{ref:n,className:St("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...e}));fX.displayName=BL.displayName;const pX=({metrics:t})=>{const[e,n]=E.useState("all"),r=t.slice(0,6),i=t.slice(6),s=e==="all"?t:e==="basic"?r:i;return m.jsx("section",{className:"w-full py-12 bg-background",children:m.jsxs("div",{className:"container px-4 md:px-6",children:[m.jsxs("div",{className:"text-center mb-10",children:[m.jsx("h2",{className:"text-2xl font-bold tracking-tighter md:text-3xl mb-3 neon-text-cyan",children:"Riepilogo dell'analisi AEO"}),m.jsx("p",{className:"text-muted-foreground max-w-[700px] mx-auto",children:"Ecco un riepilogo delle principali metriche di Answer Engine Optimization del tuo sito web"})]}),m.jsx("div",{className:"flex justify-center mb-8",children:m.jsx(hX,{defaultValue:"all",value:e,onValueChange:n,className:"w-full max-w-[600px]",children:m.jsxs(qL,{className:"grid grid-cols-3 w-full glass border border-primary/20",children:[m.jsx(Gg,{value:"all",className:"data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:neon-glow-green",children:"Tutte le metriche"}),m.jsx(Gg,{value:"basic",className:"data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:neon-glow-green",children:"Metriche Base"}),m.jsx(Gg,{value:"ai",className:"data-[state=active]:bg-primary data-[state=active]:text-primary-foreground data-[state=active]:neon-glow-green",children:"Indicatori AI"})]})})}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:s.map((a,o)=>m.jsx(lX,{title:a.title,value:a.value,description:a.description,status:a.status,icon:a.icon},o))})]})})},mX=({issues:t})=>{const e=n=>{switch(n){case"good":return m.jsx(Cv,{className:"h-5 w-5 text-primary"});case"warning":return m.jsx(PC,{className:"h-5 w-5 neon-text-yellow"});case"bad":return m.jsx(J7,{className:"h-5 w-5 text-destructive"});default:return m.jsx(b0,{className:"h-5 w-5 text-muted-foreground"})}};return m.jsx("section",{className:"w-full py-12 bg-secondary/30",children:m.jsxs("div",{className:"container px-4 md:px-6",children:[m.jsxs("div",{className:"text-center mb-10",children:[m.jsx("h2",{className:"text-2xl font-bold tracking-tighter md:text-3xl mb-3 neon-text-magenta",children:"Problemi riscontrati e suggerimenti"}),m.jsx("p",{className:"text-muted-foreground max-w-[700px] mx-auto",children:"Abbiamo individuato i seguenti punti da migliorare per ottimizzare il tuo sito per i motori di risposta"})]}),m.jsx("div",{className:"space-y-6 max-w-3xl mx-auto",children:t.map((n,r)=>m.jsx("div",{className:"glass rounded-lg p-6 border border-border/50 hover:border-primary/30 transition-all duration-300",children:m.jsxs("div",{className:"flex items-start gap-4",children:[m.jsx("div",{className:"flex-shrink-0 mt-1",children:e(n.severity)}),m.jsxs("div",{children:[m.jsx("h3",{className:"font-medium text-lg mb-2 text-foreground",children:n.title}),m.jsx("p",{className:"text-muted-foreground mb-4",children:n.description}),m.jsxs("div",{className:"bg-card/80 border border-primary/20 p-4 rounded-md",children:[m.jsx("h4",{className:"text-sm font-medium mb-2 neon-text-green",children:"Suggerimento"}
575),m.jsx("p",{className:"text-sm text-foreground/80",children:n.suggestion})]})]})]})},r))})]})})};var k5="Collapsible",[gX,HL]=uo(k5),[vX,E5]=gX(k5),WL=E.forwardRef((t,e)=>{const{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:s,onOpenChange:a,...o}=t,[l=!1,c]=Nl({prop:r,defaultProp:i,onChange:a});return m.jsx(vX,{scope:n,disabled:s,contentId:eo(),open:l,onOpenToggle:E.useCallback(()=>c(u=>!u),[c]),children:m.jsx(xt.div,{"data-state":A5(l),"data-disabled":s?"":void 0,...o,ref:e})})});WL.displayName=k5;var VL="CollapsibleTrigger",GL=E.forwardRef((t,e)=>{const{__scopeCollapsible:n,...r}=t,i=E5(VL,n);return m.jsx(xt.button,{type:"button","aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":A5(i.open),"data-disabled":i.disabled?"":void 0,disabled:i.disabled,...r,ref:e,onClick:qe(t.onClick,i.onOpenToggle)})});GL.displayName=VL;var N5="CollapsibleContent",KL=E.forwardRef((t,e)=>{const{forceMount:n,...r}=t,i=E5(N5,t.__scopeCollapsible);return m.jsx(El,{present:n||i.open,children:({present:s})=>m.jsx(yX,{...r,ref:e,present:s})})});KL.displayName=N5;var yX=E.forwardRef((t,e)=>{const{__scopeCollapsible:n,present:r,children:i,...s}=t,a=E5(N5,n),[o,l]=E.useState(r),c=E.useRef(null),u=an(e,c),d=E.useRef(0),f=d.current,h=E.useRef(0),y=h.current,v=a.open||o,_=E.useRef(v),w=E.useRef();return E.useEffect(()=>{const x=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(x)},[]),Xr(()=>{const x=c.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const k=x.getBoundingClientRect();d.current=k.height,h.current=k.width,_.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),l(r)}},[a.open,r]),m.jsx(xt.div,{"data-state":A5(a.open),"data-disabled":a.disabled?"":void 0,id:a.contentId,hidden:!v,...s,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...t.style},children:v&&i})});function A5(t){return t?"open":"closed"}var wX=WL,bX=GL,xX=KL,ho="Accordion",_X=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[C5,SX,kX]=kv(ho),[a1,Ane]=uo(ho,[kX,HL]),P5=HL(),ZL=ye.forwardRef((t,e)=>{const{type:n,...r}=t,i=r,s=r;return m.jsx(C5.Provider,{scope:t.__scopeAccordion,children:n==="multiple"?m.jsx(CX,{...s,ref:e}):m.jsx(AX,{...i,ref:e})})});ZL.displayName=ho;var[YL,EX]=a1(ho),[JL,NX]=a1(ho,{collapsible:!1}),AX=ye.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:s=!1,...a}=t,[o,l]=Nl({prop:n,defaultProp:r,onChange:i});return m.jsx(YL,{scope:t.__scopeAccordion,value:o?[o]:[],onItemOpen:l,onItemClose:ye.useCallback(()=>s&&l(""),[s,l]),children:m.jsx(JL,{scope:t.__scopeAccordion,collapsible:s,children:m.jsx(XL,{...a,ref:e})})})}),CX=ye.forwardRef((t,e)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=t,[a=[],o]=Nl({prop:n,defaultProp:r,onChange:i}),l=ye.useCallback(u=>o((d=[])=>[...d,u]),[o]),c=ye.useCallback(u=>o((d=[])=>d.filter(f=>f!==u)),[o]);return m.jsx(YL,{scope:t.__scopeAccordion,value:a,onItemOpen:l,onItemClose:c,children:m.jsx(JL,{scope:t.__scopeAccordion,collapsible:!0,children:m.jsx(XL,{...s,ref:e})})})}),[PX,o1]=a1(ho),XL=ye.forwardRef((t,e)=>{const{__scopeAccordion:n,disabled:r,dir:i,orientation:s="vertical",...a}=t,o=ye.useRef(null),l=an(o,e),c=SX(n),d=Zv(i)==="ltr",f=qe(t.onKeyDown,h=>{var M;if(!_X.includes(h.key))return;const y=h.target,v=c().filter(I=>{var G;return!((G=I.ref.current)!=null&&G.disabled)}),_=v.findIndex(I=>I.ref.current===y),w=v.length;if(_===-1)return;h.preventDefault();let x=_;const k=0,N=w-1,R=()=>{x=_+1,x>N&&(x=k)},H=()=>{x=_-1,x<k&&(x=N)};switch(h.key){case"Home":x=k;break;case"End":x=N;break;case"ArrowRight":s==="horizontal"&&(d?R():H());break;case"ArrowDown":s==="vertical"&&R();break;case"ArrowLeft":s==="horizontal"&&(d?H():R());break;case"ArrowUp":s==="vertical"&&H();break}const F=x%w;(M=v[F].ref.current)==null||M.focus()});return m.jsx(PX,{scope:n,disabled:r,direction:i,orientation:s,children:m.jsx(C5.Slot,{scope:n,children:m.jsx(xt.div,{...a,"data-orientation":s,ref:l,onKeyDown:r?void 0:f})})})}),X0="AccordionItem",[TX,T5]=a1(X0),QL=ye.forwardRef((t,e)=>{const{__scopeAccordion:n,value:r,...i}=t,s=o1(X0,n),a=EX(X0,n),o=P5(n),l=eo(),c=r&&a.value.includes(r)||!1,u=s.disabled||t.disabled;return m.jsx(TX,{scope:n,open:c,disabled:u,triggerId:l,children:m.jsx(wX,{"data-orientation":s.orientation,"data-state":sj(c),...o,...i,ref:e,disabled:u,open:c,onOpenChange:d=>{d?a.onItemOpen(r):a.onItemClose(r)}})})});QL.displayName=X0;var ej="AccordionHeader",tj=ye.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=o1(ho,n),s=T5(ej,n);return m.jsx(xt.h3,{"data-orientation":i.orientation,"data-state":sj(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:e})});tj.displayName=ej;var bb="AccordionTrigger",nj=ye.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=o1(ho,n),s=T5(bb,n),a=NX(bb,n),o=P5(n);return m.jsx(C5.ItemSlot,{scope:n,children:m.jsx(bX,{"aria-disabled":s.open&&!a.collapsible||void 0,"data-orientation":i.orientation,id:s.triggerId,...o,...r,ref:e})})});nj.displayName=bb;var rj="AccordionContent",ij=ye.forwardRef((t,e)=>{const{__scopeAccordion:n,...r}=t,i=o1(ho,n),s=T5(rj,n),a=P5(n);return m.jsx(xX,{role:"region","aria-labelledby":s.triggerId,"data-orientation":i.orientation,...a,...r,ref:e,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...t.style}})});ij.displayName=rj;function sj(t){return t?"open":"closed"}var RX=ZL,LX=QL,jX=tj,aj=nj,oj=ij;const OX=RX,lj=E.forwardRef(({className:t,...e},n)=>m.jsx(LX,{ref:n,className:St("border-b",t),...e}));lj.displayName="AccordionItem";const cj=E.forwardRef(({className:t,children:e,...n},r)=>m.jsx(jX,{className:"flex",children:m.jsxs(aj,{ref:r,className:St("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",t),...n,children:[e,m.jsx(K7,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));cj.displayName=aj.displayName;const uj=E.forwardRef(({className:t,children:e,...n},r)=>m.jsx(oj,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:m.jsx("div",{className:St("pb-4 pt-0",t),children:e})}));uj.displayName=oj.displayName;const IX=({title:t,description:e,technicalDetails:n})=>m.jsx("div",{className:"container px-4 md:px-6 my-6",children:m.jsxs("div",{className:"flex items-start gap-4 p-6 glass border-primary/30 rounded-lg",children:[m.jsx("div",{className:"mt-1 p-2 rounded-full bg-primary/20",children:m.jsx(eD,{className:"h-5 w-5 text-primary"})}),m.jsxs("div",{className:"space-y-3",children:[m.jsx("h3",{className:"text-lg font-medium neon-text-cyan",children:t}),m.jsx("p",{className:"text-muted-foreground",children:e}),m.jsx(OX,{type:"single",collapsible:!0,className:"w-full",children:m.jsxs(lj,{value:"technical-details",className:"border-b-0",children:[m.jsx(cj,{className:"text-sm font-medium text-primary py-2 hover:text-primary/80",children:"Dettagli tecnici"}),m.jsx(uj,{children:m.jsx("div",{className:"space-y-4 pt-2 pl-2 border-l-2 border-primary/30",children:n.map((r,i)=>m.jsxs("div",{className:"space-y-1",children:[m.jsx("h4",{className:"text-sm font-medium text-foreground",children:r.title}),m.jsx("p",{className:"text-sm text-muted-foreground",children:r.description})]},i))})})]})})]})]})}),pf=E.forwardRef(({className:t,...e},n)=>m.jsx("div",{ref:n,className:St("rounded-lg border bg-card text-card-foreground shadow-sm",t),...e}));
575pf.displayName="Card";const mf=E.forwardRef(({className:t,...e},n)=>m.jsx("div",{ref:n,className:St("flex flex-col space-y-1.5 p-6",t),...e}));mf.displayName="CardHeader";const gf=E.forwardRef(({className:t,...e},n)=>m.jsx("h3",{ref:n,className:St("text-2xl font-semibold leading-none tracking-tight",t),...e}));gf.displayName="CardTitle";const vf=E.forwardRef(({className:t,...e},n)=>m.jsx("p",{ref:n,className:St("text-sm text-muted-foreground",t),...e}));vf.displayName="CardDescription";const yf=E.forwardRef(({className:t,...e},n)=>m.jsx("div",{ref:n,className:St("p-6 pt-0",t),...e}));yf.displayName="CardContent";const DX=E.forwardRef(({className:t,...e},n)=>m.jsx("div",{ref:n,className:St("flex items-center p-6 pt-0",t),...e}));DX.displayName="CardFooter";const MX=Ld("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function x2({className:t,variant:e,...n}){return m.jsx("div",{className:St(MX({variant:e}),t),...n})}const FX=({url:t})=>{const e={hasSchema:!0,schemas:[{type:"Organization",isValid:!0},{type:"WebPage",isValid:!0},{type:"Article",isValid:!0}],missingRecommended:[{type:"FAQPage",priority:"high"},{type:"Breadcrumb",priority:"medium"},{type:"Speakable",priority:"high"}],jsonLdExample:`{ 576 "@context": "https://schema.org", 577 "@type": "FAQPage", 578 "mainEntity": [{ 579 "@type": "Question", 580 "name": "Che cos'è l'AEO?", 581 "acceptedAnswer": { 582 "@type": "Answer", 583 "text": "L'AEO (Answer Engine Optimization) è l'ottimizzazione dei contenuti per i motori di ricerca basati su intelligenza artificiale." 584 } 585 }] 586}`};return m.jsxs("div",{children:[m.jsx("p",{className:"text-muted-foreground mb-6 text-center",children:"Analisi della presenza e correttezza dei dati strutturati Schema.org, fondamentali per l'AEO."}),t?m.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[m.jsxs(pf,{className:"glass border-border/50 hover:border-primary/30 transition-all duration-300",children:[m.jsxs(mf,{children:[m.jsx(gf,{className:"text-foreground",children:"Schema.org rilevati"}),m.jsx(vf,{className:"text-muted-foreground",children:"Dati strutturati presenti sulla pagina"})]}),m.jsx(yf,{children:m.jsx("div",{className:"space-y-4",children:e.schemas.map((n,r)=>m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsx("div",{className:"flex items-center gap-2",children:m.jsx(x2,{variant:"outline",className:"border-primary/50 text-foreground",children:n.type})}),n.isValid?m.jsx(Ax,{className:"h-5 w-5 text-primary"}):m.jsx(jd,{className:"h-5 w-5 text-destructive"})]},r))})})]}),m.jsxs(pf,{className:"glass border-border/50 hover:border-primary/30 transition-all duration-300",children:[m.jsxs(mf,{children:[m.jsx(gf,{className:"text-foreground",children:"Schema.org consigliati"}),m.jsx(vf,{className:"text-muted-foreground",children:"Dati strutturati mancanti ma consigliati per AEO"})]}),m.jsx(yf,{children:m.jsx("div",{className:"space-y-4",children:e.missingRecommended.map((n,r)=>m.jsxs("div",{className:"flex items-center justify-between",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(x2,{variant:"outline",className:"border-primary/50 text-foreground",children:n.type}),m.jsx(x2,{className:n.priority==="high"?"bg-destructive/20 text-destructive border-destructive/30":"bg-amber-500/20 text-amber-400 border-amber-500/30",children:n.priority==="high"?"Alta priorità ":"Media priorità "})]}),m.jsx(PC,{className:`h-5 w-5 ${n.priority==="high"?"text-destructive":"neon-text-yellow"}`})]},r))})})]}),m.jsxs(pf,{className:"md:col-span-2 glass border-border/50 hover:border-primary/30 transition-all duration-300",children:[m.jsxs(mf,{children:[m.jsx(gf,{className:"text-foreground",children:"Esempio implementazione FAQPage"}),m.jsx(vf,{className:"text-muted-foreground",children:"Codice JSON-LD di esempio per implementare lo schema FAQPage"})]}),m.jsxs(yf,{children:[m.jsx("pre",{className:"bg-card border border-border/50 p-4 rounded-md overflow-x-auto text-xs md:text-sm text-foreground
586/80",children:m.jsx("code",{children:e.jsonLdExample})}),m.jsx("div",{className:"mt-4 flex justify-end",children:m.jsx(En,{variant:"outline",size:"sm",className:"border-primary/50 text-foreground hover:bg-primary/20 hover:border-primary",children:"Copia codice"})})]})]})]}):m.jsxs("div",{className:"text-center py-8 glass rounded-lg border border-border/50",children:[m.jsx(SC,{className:"h-12 w-12 mx-auto text-muted-foreground mb-4"}),m.jsx("p",{className:"text-muted-foreground",children:"Inserisci un URL per iniziare l'analisi dei dati strutturati"})]})]})},zX=()=>{const t=jc(),e=Oc(),{toast:n}=Tc(),{t:r,i18n:i}=Er(),{user:s,loading:a}=zd(),{subscribed:o,plan:l,analyses_remaining:c,refresh:u}=Rp(),[d,f]=E.useState(!0),[h,y]=E.useState(null),[v,_]=E.useState(null),[w,x]=E.useState(!1),N=new URLSearchParams(t.search).get("url"),R=(i.resolvedLanguage||i.language||"it").slice(0,2),H=E.useCallback(async()=>{if(N){f(!0),_(null),x(!1);try{const{data:F,error:M}=await aa.functions.invoke("analyze-aeo",{body:{url:N,language:R}});if(M){let I=M.message||"Analysis error";try{const G=M.context;if(G!=null&&G.text&&(I=await G.text()),I&&I.startsWith("{")){const L=JSON.parse(I);(L.code==="no_subscription"||L.code==="quota_exceeded")&&x(!0),I=L.error||I}}catch{}_(I),u();return}if(F!=null&&F.error){_(F.error);return}y(F),u()}catch(F){console.error("Analyze error:",F),_("Analysis failed")}finally{f(!1)}}},[N,u,R]);return E.useEffect(()=>{if(!N){n({title:r("toast.missingUrl"),description:r("toast.missingUrlDesc"),variant:"destructive"}),e("/");return}if(!a){if(!s){e(`/auth?redirect=${encodeURIComponent(`/report?url=${N}`)}`);return}H()}},[N,s,a,n,e,H,r]),m.jsxs("div",{className:"flex flex-col min-h-screen bg-background",children:[m.jsx(ma,{}),m.jsxs("main",{className:"flex-1 pt-28",children:[m.jsx("div",{className:"container px-4 md:px-6 mt-4",children:m.jsxs(B0,{className:"glass border-primary/30 bg-card/50",children:[m.jsx(b0,{className:"h-4 w-4 neon-text-cyan"}),m.jsxs(q0,{className:"text-sm text-foreground/80",children:[l==="pro"?r("report.banner.pro"):l==="base"?r("report.banner.base",{count:c}):r("report.banner.none")," ",m.jsx("a",{href:"/",className:"neon-text-cyan hover:underline font-medium",children:r("report.banner.home")}),"."]})]})}),d?m.jsx(dG,{url:N}):v?m.jsx("div",{className:"flex items-center justify-center",children:m.jsxs("div",{className:"max-w-md mx-auto mt-16 flex flex-col items-center gap-4",children:[m.jsxs(B0,{variant:"destructive",className:"glass border-destructive/50",children:[m.jsx(b0,{className:"h-4 w-4"}),m.jsx(q0,{className:"text-foreground",children:v})]}),m.jsxs("div",{className:"flex gap-3",children:[w?m.jsxs(En,{onClick:()=>e("/pricing"),className:"gap-2",children:[m.jsx(CC,{className:"h-4 w-4"})," ",r("report.seePlans")]}):m.jsxs(En,{onClick:H,className:"gap-2",children:[m.jsx(oD,{className:"h-4 w-4"})," ",r("report.retry")]}),m.jsx(En,{variant:"outline",onClick:()=>e("/"),children:r("report.home")})]})]})}):h?m.jsxs(m.Fragment,{children:[m.jsx(oX,{reportData:h,url:N}),h.aiDynamicDisclaimer&&m.jsx(IX,{title:h.aiDynamicDisclaimer.title,description:h.aiDynamicDisclaimer.description,technicalDetails:h.aiDynamicDisclaimer.technicalDetails}),m.jsx("div",{className:"w-full py-12 bg-secondary/30",children:m.jsxs("div",{className:"container px-4 md:px-6",children:[m.jsx("h2",{className:"text-2xl font-bold tracking-tighter md:text-3xl mb-6 text-center neon-text-green",children:r("report.schemaTitle")}),m.jsx(FX,{url:N})]})}),m.jsx(pX,{metrics:h.metrics}),m.jsx(mX,{issues:h.issues})]}):null]}),m.jsx(ga,{})]})},$X=()=>{const{t}=Er(),e=["content","cite","factual","structured","readability","llm","report"],n=[Cx,kC,Cv,_C,bC,EC,xC],r=e.map((i,s)=>({title:t(`features.cards.${i}.title`),description:t(`features.cards.${i}.desc`),icon:n[s]}));return r.push({title:t("features.extraCard.title"),description:t("features.extraCard.desc"),icon:V7}),m.jsxs("div",{className:"flex flex-col min-h-screen",children:[m.jsx(ma,{}),m.jsxs("main",{className:"flex-1 pt-28",children:[m.jsxs("section",{className:"relative py-20 hero-gradient overflow-hidden",children:[m.jsx("div",{className:"absolute top-1/2 left-1/4 w-[400px] h-[400px] bg-primary/20 rounded-full blur-[120px]"}),m.jsx("div",{className:"absolute top-1/2 right-1/4 w-[300px] h-[300px] bg-accent/20 rounded-full blur-[100px]"}),m.jsx("div",{className:"container px-4 md:px-6 relative z-10",children:m.jsxs(Jt,{className:"space-y-6 max-w-3xl",children:[m.jsx("span",{className:"text-lg font-bold uppercase tracking-widest neon-text-magenta",children:t("features.pageHero.kicker")}),m.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-black tracking-tight",children:[t("features.pageHero.title1")," ",m.jsx("span",{className:"text-outline",children:t("features.pageHero.title2")})]}),m.jsxs("p",{className:"text-xl text-muted-foreground",children:[t("features.pageHero.subtitle")," ",m.jsx("span",{className:"neon-text-cyan",children:t("hero.engines.chatgpt")}),","," ",m.jsx("span",{className:"neon-text-magenta",children:t("hero.engines.claude")}),","," ",m.jsx("span",{className:"neon-text-yellow",children:t("hero.engines.perplexity")}),","," ",m.jsx("span",{className:"neon-text-green",children:t("hero.engines.copilot")}),","," ",m.jsx("span",{className:"neon-text-cyan",children:t("hero.engines.gemini")})," ",t("hero.and")," ",m.jsx("span",{className:"neon-text-magenta",children:t("hero.engines.grok")}),"."]})]})})]}),m.jsx("section",{className:"py-20 bg-background",children:m.jsx("div",{className:"container px-4 md:px-6",children:m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8",children:r.map((i,s)=>m.jsx(Jt,{delay:s*100,variant:"scale",children:m.jsxs(pf,{className:"h-full border-border/50 bg-card/50 backdrop-blur-sm hover:border-primary/50 transition-all duration-300 group",children:[m.jsxs(mf,{className:"pb-2",children:[m.jsx("div",{className:"mb-4 rounded-xl bg-primary/10 p-4 w-14 h-14 flex items-center justify-center group-hover:bg-primary/20 group-hover:neon-glow-green transition-all duration-300",children:m.jsx(i.icon,{className:"h-7 w-7 text-primary"})}),m.jsx(gf,{className:"text-xl font-bold text-foreground",children:i.title})]}),m.jsx(yf,{children:m.jsx(vf,{className:"text-base text-muted-foreground",children:i.description})})]})},s))})})}),m.jsxs("section",{className:"py-20 relative overflow-hidden",children:[m.jsx("div",{className:"absolute inset-0 hero-gradient"}),m.jsx("div",{className:"absolute top-1/2 left-1/3 w-[300px] h-[300px] bg-primary/20 rounded-full blur-[100px]"}),m.jsx("div",{className:"absolute top-1/2 right-1/3 w-[300px] h-[300px] bg-accent/20 rounded-full blur-[100px]"}),m.jsx("div",{className:"container px-4 md:px-6 relative z-10",children:m.jsxs(Jt,{className:"max-w-3xl mx-auto text-center space-y-8",children:[m.jsxs("h2",{className:"text-3xl md:text-4xl font-black",children:[t("features.why.title1")," ",m.jsx("span",{className:"text-outline",children:t("features.why.title2")})," ",t("features.why.title3")]}),m.jsx("p",{className:"text-lg text-muted-foreground",children:t("features.why.desc")}),m.jsxs(En,{size:"lg",className:"h-14 px-10 text-lg font-bold bg-primary hover:bg-primary/90 text-primary-foreground neon-glow-green transition-all duration-300 hover:scale-105",onClick:()=>window.location.href="/",children:[t("features.why.cta")," ",m.jsx(Nx,{className:"ml-3 h-5 w-5"})]})]})})]}),m.jsx("section",{className:"py-20 bg-background",children:m.jsxs("div",{className:"container px-4 md:px-6",children:[m.jsxs(Jt,{className:"text-center mb-16",children:[m.jsx("span",{className:"text-lg font-bold uppercase tracking-widest neon-text-cyan",children:t("features.how.kicker")}),m.jsxs("h2",{className:"text-3xl md:text-4xl font-black tracking-tight mt-4",children:[t("features.how.title1")," ",m.jsx("span",{className:"text-outline",children:t("features.how.title2")})]})]}),m.jsx("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-10",children:[{step:"1",title:t("features.how.s1t"),desc:t("features.how.s1d")},{step:"2",title:t("features.how.s2t"),desc:t("features.how.s2d")},{step:"3",title:t("features.how.s3t"),desc:t("features.how.s3d")}].map((i,s)=>m.jsx(Jt,{delay:s*150,variant:"up",children:m.jsxs("div",{className:"text-center space-y-4",children:[m.jsx("div",{className:"mx-auto rounded-2xl bg-primary/10 p-5 w-20 h-20 flex items-center justify-center neon-glow-green",children:m.jsx("span",{className:"text-3xl font-black neon-text-green",children:i.step})}),m.jsx("h3",{className:"text-xl font-bold text-foreground",children:i.title}),m.jsx("p",{className:"text-muted-foreground",children:i.desc})]})},s))})]})})]}),m.jsx(ga,{})]})},dj=E.forwardRef(({className:t,...e},n)=>m.jsx("textarea",{className:St("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm r
586ing-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t),ref:n,...e}));dj.displayName="Textarea";var Bt;(function(t){t.assertEqual=i=>i;function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=>{const s={};for(const a of i)s[a]=a;return s},t.getValidEnumValues=i=>{const s=t.objectKeys(i).filter(o=>typeof i[i[o]]!="number"),a={};for(const o of s)a[o]=i[o];return t.objectValues(a)},t.objectValues=i=>t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys=="function"?i=>Object.keys(i):i=>{const s=[];for(const a in i)Object.prototype.hasOwnProperty.call(i,a)&&s.push(a);return s},t.find=(i,s)=>{for(const a of i)if(s(a))return a},t.isInteger=typeof Number.isInteger=="function"?i=>Number.isInteger(i):i=>typeof i=="number"&&isFinite(i)&&Math.floor(i)===i;function r(i,s=" | "){return i.map(a=>typeof a=="string"?`'${a}'`:a).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=>typeof s=="bigint"?s.toString():s})(Bt||(Bt={}));var xb;(function(t){t.mergeShapes=(e,n)=>({...e,...n})})(xb||(xb={}));const Fe=Bt.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),qo=t=>{switch(typeof t){case"undefined":return Fe.undefined;case"string":return Fe.string;case"number":return isNaN(t)?Fe.nan:Fe.number;case"boolean":return Fe.boolean;case"function":return Fe.function;case"bigint":return Fe.bigint;case"symbol":return Fe.symbol;case"object":return Array.isArray(t)?Fe.array:t===null?Fe.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Fe.promise:typeof Map<"u"&&t instanceof Map?Fe.map:typeof Set<"u"&&t instanceof Set?Fe.set:typeof Date<"u"&&t instanceof Date?Fe.date:Fe.object;default:return Fe.unknown}}
vendor: 4,302 bytes, line 586
586,Pe=Bt.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),UX=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:");class ji extends Error{constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=e}get errors(){return this.issues}format(e){const n=e||function(s){return s.message},r={_errors:[]},i=s=>{for(const a of s.issues)if(a.code==="invalid_union")a.unionErrors.map(i);else if(a.code==="invalid_return_type")i(a.returnTypeError);else if(a.code==="invalid_arguments")i(a.argumentsError);else if(a.path.length===0)r._errors.push(n(a));else{let o=r,l=0;for(;l<a.path.length;){const c=a.path[l];l===a.path.length-1?(o[c]=o[c]||{_errors:[]},o[c]._errors.push(n(a))):o[c]=o[c]||{_errors:[]},o=o[c],l++}}};return i(this),r}static assert(e){if(!(e instanceof ji))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Bt.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=>n.message){const n={},r=[];for(const i of this.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(e(i))):r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}ji.create=t=>new ji(t);const kd=(t,e)=>{let n;switch(t.code){case Pe.invalid_type:t.received===Fe.undefined?n="Required":n=`Expected ${t.expected}, received ${t.received}`;break;case Pe.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,Bt.jsonStringifyReplacer)}`;break;case Pe.unrecognized_keys:n=`Unrecognized key(s) in object: ${Bt.joinValues(t.keys,", ")}`;break;case Pe.invalid_union:n="Invalid input";break;case Pe.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Bt.joinValues(t.options)}`;break;case Pe.invalid_enum_value:n=`Invalid enum value. Expected ${Bt.joinValues(t.options)}, received '${t.received}'`;break;case Pe.invalid_arguments:n="Invalid function arguments";break;case Pe.invalid_return_type:n="Invalid function return type";break;case Pe.invalid_date:n="Invalid date";break;case Pe.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(n=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?n=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?n=`Invalid input: must end with "${t.validation.endsWith}"`:Bt.assertNever(t.validation):t.validation!=="regex"?n=`Invalid ${t.validation}`:n="Invalid";break;case Pe.too_small:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:n="Invalid input";break;case Pe.too_big:t.type==="array"?n=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?n=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?n=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?n=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?n=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:n="Invalid input";break;case Pe.custom:n="Invalid input";break;
vendor: 6,008 bytes, line 586
586case Pe.invalid_intersection_types:n="Intersection results could not be merged";break;case Pe.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case Pe.not_finite:n="Number must be finite";break;default:n=e.defaultError,Bt.assertNever(t)}return{message:n}};let hj=kd;function BX(t){hj=t}function Q0(){return hj}const ev=t=>{const{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],a={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o="";const l=r.filter(c=>!!c).slice().reverse();for(const c of l)o=c(a,{data:e,defaultError:o}).message;return{...i,path:s,message:o}},qX=[];function De(t,e){const n=Q0(),r=ev({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===kd?void 0:kd].filter(i=>!!i)});t.common.issues.push(r)}class $r{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,n){const r=[];for(const i of n){if(i.status==="aborted")return ht;i.status==="dirty"&&e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n){const s=await i.key,a=await i.value;r.push({key:s,value:a})}return $r.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:s,value:a}=i;if(s.status==="aborted"||a.status==="aborted")return ht;s.status==="dirty"&&e.dirty(),a.status==="dirty"&&e.dirty(),s.value!=="__proto__"&&(typeof a.value<"u"||i.alwaysSet)&&(r[s.value]=a.value)}return{status:e.value,value:r}}}const ht=Object.freeze({status:"aborted"}),Ou=t=>({status:"dirty",value:t}),Qr=t=>({status:"valid",value:t}),_b=t=>t.status==="aborted",Sb=t=>t.status==="dirty",ap=t=>t.status==="valid",op=t=>typeof Promise<"u"&&t instanceof Promise;function tv(t,e,n,r){if(typeof e=="function"?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)}function fj(t,e,n,r,i){if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}var rt;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message})(rt||(rt={}));var Hh,Wh;class da{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const l4=(t,e)=>{if(ap(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new ji(t.common.issues);return this._error=n,this._error}}};function Ct(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(a,o)=>{var l,c;const{message:u}=t;return a.code==="invalid_enum_value"?{message:u??o.defaultError}:typeof o.data>"u"?{message:(l=u??r)!==null&&l!==void 0?l:o.defaultError}:a.code!=="invalid_type"?{message:o.defaultError}:{message:(c=u??n)!==null&&c!==void 0?c:o.defaultError}},description:i}}class Ot{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(e){return qo(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:qo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new $r,ctx:{common:e.parent.common,data:e.data,parsedType:qo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(op(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){var r;const i={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qo(e)},s=this._parseSync({data:e,path:i.path,parent:i});return l4(i,s)}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qo(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(op(i)?i:Promise.resolve(i));return l4(r,s)}refine(e,n){const r=i=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(i):n;return this._refinement((i,s)=>{const a=e(i),o=()=>s.addIssue({code:Pe.custom,...r(i)});
vendor: 4,485 bytes, line 586
586return typeof Promise<"u"&&a instanceof Promise?a.then(l=>l?!0:(o(),!1)):a?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,i)=>e(r)?!0:(i.addIssue(typeof n=="function"?n(r,i):n),!1))}_refinement(e){return new Rs({schema:this,typeName:dt.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return ca.create(this,this._def)}nullable(){return xl.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ns.create(this,this._def)}promise(){return Nd.create(this,this._def)}or(e){return dp.create([this,e],this._def)}and(e){return hp.create(this,e,this._def)}transform(e){return new Rs({...Ct(this._def),schema:this,typeName:dt.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const n=typeof e=="function"?e:()=>e;return new vp({...Ct(this._def),innerType:this,defaultValue:n,typeName:dt.ZodDefault})}brand(){return new R5({typeName:dt.ZodBranded,type:this,...Ct(this._def)})}catch(e){const n=typeof e=="function"?e:()=>e;return new yp({...Ct(this._def),innerType:this,catchValue:n,typeName:dt.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return Fp.create(this,e)}readonly(){return wp.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const HX=/^c[^\s-]{8,}$/i,WX=/^[0-9a-z]+$/,VX=/^[0-9A-HJKMNP-TV-Z]{26}$/,GX=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,KX=/^[a-z0-9_-]{21}$/i,ZX=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,YX=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,JX="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let _2;const XX=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,QX=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,eQ=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,pj="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",tQ=new RegExp(`^${pj}$`);function mj(t){let e="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&&(e=`${e}(\\.\\d+)?`),e}function nQ(t){return new RegExp(`^${mj(t)}$`)}function gj(t){let e=`${pj}T${mj(t)}`;const n=[];return n.push(t.local?"Z?":"Z"),t.offset&&n.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${n.join("|")})`,new RegExp(`^${e}$`)}function rQ(t,e){return!!((e==="v4"||!e)&&XX.test(t)||(e==="v6"||!e)&&QX.test(t))}class Ss extends Ot{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Fe.string){const s=this._getOrReturnCtx(e);return De(s,{code:Pe.invalid_type,expected:Fe.string,received:s.parsedType}),ht}const r=new $r;let i;for(const s of this._def.checks)if(s.kind==="min")e.data.length<s.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:Pe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="max")e.data.length>s.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:Pe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind==="length"){const a=e.data.length>s.value,o=e.data.length<s.value;(a||o)&&(i=this._getOrReturnCtx(e,i),a?De(i,{code:Pe.too_big,maximum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}):o&&De(i,{code:Pe.too_small,minimum:s.value,type:"string",inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind==="email")YX.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"email",code:Pe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="emoji")_2||(_2=new RegExp(JX,"u")),_2.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"emoji",code:Pe.invali
586d_string,message:s.message}),r.dirty());else if(s.kind==="uuid")GX.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"uuid",code:Pe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="nanoid")KX.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"nanoid",code:Pe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid")HX.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"cuid",code:Pe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="cuid2")WX.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"cuid2",code:Pe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="ulid")VX.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"ulid",code:Pe.invalid_string,message:s.message}),r.dirty());else if(s.kind==="url")try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),De(i,{validation:"url",code:Pe.invalid_string,message:s.message}),r.dirty()}else s.kind==="regex"?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"regex",code:Pe.invali
vendor: 1,088 bytes, line 586
586d_string,message:s.message}),r.dirty())):s.kind==="trim"?e.data=e.data.trim():s.kind==="includes"?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),De(i,{code:Pe.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind==="toLowerCase"?e.data=e.data.toLowerCase():s.kind==="toUpperCase"?e.data=e.data.toUpperCase():s.kind==="startsWith"?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),De(i,{code:Pe.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind==="endsWith"?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),De(i,{code:Pe.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind==="datetime"?gj(s).test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{code:Pe.invalid_string,validation:"datetime",message:s.message}),r.dirty()):s.kind==="date"?tQ.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{code:Pe.invalid_string,validation:"date",message:s.message}),r.dirty()):s.kind==="time"?nQ(s).test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{code:Pe.invali
vendor: 11,858 bytes, line 586
586d_string,validation:"time",message:s.message}),r.dirty()):s.kind==="duration"?ZX.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"duration",code:Pe.invalid_string,message:s.message}),r.dirty()):s.kind==="ip"?rQ(e.data,s.version)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"ip",code:Pe.invalid_string,message:s.message}),r.dirty()):s.kind==="base64"?eQ.test(e.data)||(i=this._getOrReturnCtx(e,i),De(i,{validation:"base64",code:Pe.invalid_string,message:s.message}),r.dirty()):Bt.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=>e.test(i),{validation:n,code:Pe.invalid_string,...rt.errToObj(r)})}_addCheck(e){return new Ss({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...rt.errToObj(e)})}url(e){return this._addCheck({kind:"url",...rt.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...rt.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...rt.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...rt.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...rt.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...rt.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...rt.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...rt.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...rt.errToObj(e)})}datetime(e){var n,r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,offset:(n=e==null?void 0:e.offset)!==null&&n!==void 0?n:!1,local:(r=e==null?void 0:e.local)!==null&&r!==void 0?r:!1,...rt.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof(e==null?void 0:e.precision)>"u"?null:e==null?void 0:e.precision,...rt.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:"duration",...rt.errToObj(e)})}regex(e,n){return this._addCheck({kind:"regex",regex:e,...rt.errToObj(n)})}includes(e,n){return this._addCheck({kind:"includes",value:e,position:n==null?void 0:n.position,...rt.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:"startsWith",value:e,...rt.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:"endsWith",value:e,...rt.errToObj(n)})}min(e,n){return this._addCheck({kind:"min",value:e,...rt.errToObj(n)})}max(e,n){return this._addCheck({kind:"max",value:e,...rt.errToObj(n)})}length(e,n){return this._addCheck({kind:"length",value:e,...rt.errToObj(n)})}nonempty(e){return this.min(1,rt.errToObj(e))}trim(){return new Ss({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new Ss({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new Ss({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get minLength(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}Ss.create=t=>{var e;return new Ss({checks:[],typeName:dt.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ct(t)})};function iQ(t,e){const n=(t.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,i=n>r?n:r,s=parseInt(t.toFixed(i).replace(".","")),a=parseInt(e.toFixed(i).replace(".",""));return s%a/Math.pow(10,i)}class yl extends Ot{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Fe.number){const s=this._getOrReturnCtx(e);return De(s,{code:Pe.invalid_type,expected:Fe.number,received:s.parsedType}),ht}let r;const i=new $r;for(const s of this._def.checks)s.kind==="int"?Bt.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),De(r,{code:Pe.invalid_type,expected:"integer",received:"float",message:s.message}),i.dirty()):s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),De(r,{code:Pe.too_small,minimum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),De(r,{code:Pe.too_big,maximum:s.value,type:"number",inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind==="multipleOf"?iQ(e.data,s.value)!==0&&(r=this._getOrReturnCtx(e,r),De(r,{code:Pe.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),De(r,{code:Pe.not_finite,message:s.message}),i.dirty()):Bt.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,rt.toString(n))}gt(e,n){return this.setLimit("min",e,!1,rt.toString(n))}lte(e,n){return this.setLimit("max",e,!0,rt.toString(n))}lt(e,n){return this.setLimit("max",e,!1,rt.toString(n))}setLimit(e,n,r,i){return new yl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:rt.toString(i)}]})}_addCheck(e){return new yl({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:rt.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:rt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:rt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:rt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:rt.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:rt.toString(n)})}finite(e){return this._addCheck({kind:"finite",message:rt.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:rt.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:rt.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Bt.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(n)&&Number.isFinite(e)}}yl.create=t=>new yl({checks:[],typeName:dt.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Ct(t)});class wl extends Ot{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Fe.bigint){const s=this._getOrReturnCtx(e);return De(s,{code:Pe.invalid_type,expected:Fe.bigint,received:s.parsedType}),ht}let r;const i=new $r;for(const s of this._def.checks)s.kind==="min"?(s.inclusive?e.data<s.value:e.data<=s.value)&&(r=this._getOrReturnCtx(e,r),De(r,{code:Pe.too_small,type:"bigint",minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="max"?(s.inclusive?e.data>s.value:e.data>=s.value)&&(r=this._getOrReturnCtx(e,r),De(r,{code:Pe.too_big,type:"bigint",maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind==="multipleOf"?e.data%s.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),De(r,{code:Pe.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):Bt.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit("min",e,!0,rt.toString(n))}gt(e,n){return this.setLimit("min",e,!1,rt.toString(n))}lte(e,n){return this.setLimit("max",e,!0,rt.toString(n))}lt(e,n){return this.setLimit("max",e,!1,rt.toString(n))}setLimit(e,n,r,i){return new wl({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:rt.toString(i)}]})}_addCheck(e){return new wl({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:rt.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:rt.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:rt.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:rt.toString(e)})}multipleOf(e,n){return this._addCheck({kind:"multipleOf",value:e,message:rt.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e}}wl.create=t=>{var e;return new wl({checks:[],typeName:dt.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Ct(t)})};class lp extends Ot{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Fe.boolean){const r=this._getOrReturnCtx(e);return De(r,{code:Pe.invalid_type,expected:Fe.boolean,received:r.parsedType}),ht}return Qr(e.data)}}lp.create=t=>new lp({typeName:dt.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Ct(t)});class Nc extends Ot{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Fe.date){const s=this._getOrReturnCtx(e);return De(s,{code:Pe.invalid_type,expected:Fe.date,received:s.parsedType}),ht}if(isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return De(s,{code:Pe.invalid_date}),ht}const r=new $r;let i;for(const s of this._def.checks)s.kind==="min"?e.data.getTime()<s.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:Pe.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:"date"}),r.dirty()):s.kind==="max"?e.data.getTime()>s.value&&(i=this._getOrReturnCtx(e,i),De(i,{code:Pe.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:"date"}),r.dirty()):Bt.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new Nc({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:"min",value:e.getTime(),message:rt.toString(n)})}max(e,n){return this._addCheck({kind:"max",value:e.getTime(),message:rt.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind==="min"&&(e===null||n.value>e)&&(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind==="max"&&(e===null||n.value<e)&&(e=n.value);return e!=null?new Date(e):null}}Nc.create=t=>new Nc({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:dt.ZodDate,...Ct(t)});class nv extends Ot{_parse(e){if(this._getType(e)!==Fe.symbol){const r=this._getOrReturnCtx(e);
vendor: 1,043 bytes, line 586
586return De(r,{code:Pe.invalid_type,expected:Fe.symbol,received:r.parsedType}),ht}return Qr(e.data)}}nv.create=t=>new nv({typeName:dt.ZodSymbol,...Ct(t)});class cp extends Ot{_parse(e){if(this._getType(e)!==Fe.undefined){const r=this._getOrReturnCtx(e);return De(r,{code:Pe.invalid_type,expected:Fe.undefined,received:r.parsedType}),ht}return Qr(e.data)}}cp.create=t=>new cp({typeName:dt.ZodUndefined,...Ct(t)});class up extends Ot{_parse(e){if(this._getType(e)!==Fe.null){const r=this._getOrReturnCtx(e);return De(r,{code:Pe.invalid_type,expected:Fe.null,received:r.parsedType}),ht}return Qr(e.data)}}up.create=t=>new up({typeName:dt.ZodNull,...Ct(t)});class Ed extends Ot{constructor(){super(...arguments),this._any=!0}_parse(e){return Qr(e.data)}}Ed.create=t=>new Ed({typeName:dt.ZodAny,...Ct(t)});class hc extends Ot{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Qr(e.data)}}hc.create=t=>new hc({typeName:dt.ZodUnknown,...Ct(t)});class lo extends Ot{_parse(e){const n=this._getOrReturnCtx(e);return De(n,{code:Pe.invali
vendor: 21,103 bytes, line 586
586d_type,expected:Fe.never,received:n.parsedType}),ht}}lo.create=t=>new lo({typeName:dt.ZodNever,...Ct(t)});class rv extends Ot{_parse(e){if(this._getType(e)!==Fe.undefined){const r=this._getOrReturnCtx(e);return De(r,{code:Pe.invalid_type,expected:Fe.void,received:r.parsedType}),ht}return Qr(e.data)}}rv.create=t=>new rv({typeName:dt.ZodVoid,...Ct(t)});class Ns extends Ot{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==Fe.array)return De(n,{code:Pe.invalid_type,expected:Fe.array,received:n.parsedType}),ht;if(i.exactLength!==null){const a=n.data.length>i.exactLength.value,o=n.data.length<i.exactLength.value;(a||o)&&(De(n,{code:a?Pe.too_big:Pe.too_small,minimum:o?i.exactLength.value:void 0,maximum:a?i.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&&n.data.length<i.minLength.value&&(De(n,{code:Pe.too_small,minimum:i.minLength.value,type:"array",inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&&n.data.length>i.maxLength.value&&(De(n,{code:Pe.too_big,maximum:i.maxLength.value,type:"array",inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((a,o)=>i.type._parseAsync(new da(n,a,n.path,o)))).then(a=>$r.mergeArray(r,a));const s=[...n.data].map((a,o)=>i.type._parseSync(new da(n,a,n.path,o)));return $r.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new Ns({...this._def,minLength:{value:e,message:rt.toString(n)}})}max(e,n){return new Ns({...this._def,maxLength:{value:e,message:rt.toString(n)}})}length(e,n){return new Ns({...this._def,exactLength:{value:e,message:rt.toString(n)}})}nonempty(e){return this.min(1,e)}}Ns.create=(t,e)=>new Ns({type:t,minLength:null,maxLength:null,exactLength:null,typeName:dt.ZodArray,...Ct(e)});function wu(t){if(t instanceof Sn){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=ca.create(wu(r))}return new Sn({...t._def,shape:()=>e})}else return t instanceof Ns?new Ns({...t._def,type:wu(t.element)}):t instanceof ca?ca.create(wu(t.unwrap())):t instanceof xl?xl.create(wu(t.unwrap())):t instanceof ha?ha.create(t.items.map(e=>wu(e))):t}class Sn extends Ot{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=Bt.objectKeys(e);return this._cached={shape:e,keys:n}}_parse(e){if(this._getType(e)!==Fe.object){const c=this._getOrReturnCtx(e);return De(c,{code:Pe.invalid_type,expected:Fe.object,received:c.parsedType}),ht}const{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:a}=this._getCached(),o=[];if(!(this._def.catchall instanceof lo&&this._def.unknownKeys==="strip"))for(const c in i.data)a.includes(c)||o.push(c);const l=[];for(const c of a){const u=s[c],d=i.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new da(i,d,i.path,c)),alwaysSet:c in i.data})}if(this._def.catchall instanceof lo){const c=this._def.unknownKeys;if(c==="passthrough")for(const u of o)l.push({key:{status:"valid",value:u},value:{status:"valid",value:i.data[u]}});else if(c==="strict")o.length>0&&(De(i,{code:Pe.unrecognized_keys,keys:o}),r.dirty());else if(c!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const c=this._def.catchall;for(const u of o){const d=i.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new da(i,d,i.path,u)),alwaysSet:u in i.data})}}return i.common.async?Promise.resolve().then(async()=>{const c=[];for(const u of l){const d=await u.key,f=await u.value;c.push({key:d,value:f,alwaysSet:u.alwaysSet})}return c}).then(c=>$r.mergeObjectSync(r,c)):$r.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(e){return rt.errToObj,new Sn({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(n,r)=>{var i,s,a,o;const l=(a=(s=(i=this._def).errorMap)===null||s===void 0?void 0:s.call(i,n,r).message)!==null&&a!==void 0?a:r.defaultError;return n.code==="unrecognized_keys"?{message:(o=rt.errToObj(e).message)!==null&&o!==void 0?o:l}:{message:l}}}:{}})}strip(){return new Sn({...this._def,unknownKeys:"strip"})}passthrough(){return new Sn({...this._def,unknownKeys:"passthrough"})}extend(e){return new Sn({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new Sn({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:dt.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Sn({...this._def,catchall:e})}pick(e){const n={};return Bt.objectKeys(e).forEach(r=>{e[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new Sn({...this._def,shape:()=>n})}omit(e){const n={};return Bt.objectKeys(this.shape).forEach(r=>{e[r]||(n[r]=this.shape[r])}),new Sn({...this._def,shape:()=>n})}deepPartial(){return wu(this)}partial(e){const n={};return Bt.objectKeys(this.shape).forEach(r=>{const i=this.shape[r];e&&!e[r]?n[r]=i:n[r]=i.optional()}),new Sn({...this._def,shape:()=>n})}required(e){const n={};return Bt.objectKeys(this.shape).forEach(r=>{if(e&&!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof ca;)s=s._def.innerType;n[r]=s}}),new Sn({...this._def,shape:()=>n})}keyof(){return vj(Bt.objectKeys(this.shape))}}Sn.create=(t,e)=>new Sn({shape:()=>t,unknownKeys:"strip",catchall:lo.create(),typeName:dt.ZodObject,...Ct(e)});Sn.strictCreate=(t,e)=>new Sn({shape:()=>t,unknownKeys:"strict",catchall:lo.create(),typeName:dt.ZodObject,...Ct(e)});Sn.lazycreate=(t,e)=>new Sn({shape:t,unknownKeys:"strip",catchall:lo.create(),typeName:dt.ZodObject,...Ct(e)});class dp extends Ot{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(const o of s)if(o.result.status==="valid")return o.result;for(const o of s)if(o.result.status==="dirty")return n.common.issues.push(...o.ctx.common.issues),o.result;const a=s.map(o=>new ji(o.ctx.common.issues));return De(n,{code:Pe.invalid_union,unionErrors:a}),ht}if(n.common.async)return Promise.all(r.map(async s=>{const a={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:a}),ctx:a}})).then(i);{let s;const a=[];for(const l of r){const c={...n,common:{...n.common,issues:[]},parent:null},u=l._parseSync({data:n.data,path:n.path,parent:c});if(u.status==="valid")return u;u.status==="dirty"&&!s&&(s={result:u,ctx:c}),c.common.issues.length&&a.push(c.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=a.map(l=>new ji(l));return De(n,{code:Pe.invalid_union,unionErrors:o}),ht}}get options(){return this._def.options}}dp.create=(t,e)=>new dp({options:t,typeName:dt.ZodUnion,...Ct(e)});const Ba=t=>t instanceof pp?Ba(t.schema):t instanceof Rs?Ba(t.innerType()):t instanceof mp?[t.value]:t instanceof bl?t.options:t instanceof gp?Bt.objectValues(t.enum):t instanceof vp?Ba(t._def.innerType):t instanceof cp?[void 0]:t instanceof up?[null]:t instanceof ca?[void 0,...Ba(t.unwrap())]:t instanceof xl?[null,...Ba(t.unwrap())]:t instanceof R5||t instanceof wp?Ba(t.unwrap()):t instanceof yp?Ba(t._def.innerType):[];class l1 extends Ot{_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Fe.object)return De(n,{code:Pe.invalid_type,expected:Fe.object,received:n.parsedType}),ht;const r=this.discriminator,i=n.data[r],s=this.optionsMap.get(i);return s?n.common.async?s._parseAsync({data:n.data,path:n.path,parent:n}):s._parseSync({data:n.data,path:n.path,parent:n}):(De(n,{code:Pe.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),ht)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,n,r){const i=new Map;for(const s of n){const a=Ba(s.shape[e]);if(!a.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const o of a){if(i.has(o))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(o)}`);i.set(o,s)}}return new l1({typeName:dt.ZodDiscriminatedUnion,discriminator:e,options:n,optionsMap:i,...Ct(r)})}}function kb(t,e){const n=qo(t),r=qo(e);if(t===e)return{valid:!0,data:t};if(n===Fe.object&&r===Fe.object){const i=Bt.objectKeys(e),s=Bt.objectKeys(t).filter(o=>i.indexOf(o)!==-1),a={...t,...e};for(const o of s){const l=kb(t[o],e[o]);if(!l.valid)return{valid:!1};a[o]=l.data}return{valid:!0,data:a}}else if(n===Fe.array&&r===Fe.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s<t.length;s++){const a=t[s],o=e[s],l=kb(a,o);if(!l.valid)return{valid:!1};i.push(l.data)}return{valid:!0,data:i}}else return n===Fe.date&&r===Fe.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}class hp extends Ot{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(s,a)=>{if(_b(s)||_b(a))return ht;const o=kb(s.value,a.value);return o.valid?((Sb(s)||Sb(a))&&n.dirty(),{status:n.value,value:o.data}):(De(r,{code:Pe.invalid_intersection_types}),ht)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,a])=>i(s,a)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}hp.create=(t,e,n)=>new hp({left:t,right:e,typeName:dt.ZodIntersection,...Ct(n)});class ha extends Ot{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Fe.array)return De(r,{code:Pe.invalid_type,expected:Fe.array,received:r.parsedType}),ht;if(r.data.length<this._def.items.length)return De(r,{code:Pe.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),ht;!this._def.rest&&r.data.length>this._def.items.length&&(De(r,{code:Pe.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const s=[...r.data].map((a,o)=>{const l=this._def.items[o]||this._def.rest;return l?l._parse(new da(r,a,r.path,o)):null}).filter(a=>!!a);return r.common.async?Promise.all(s).then(a=>$r.mergeArray(n,a)):$r.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new ha({...this._def,rest:e})}}ha.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ha({items:t,typeName:dt.ZodTuple,rest:null,...Ct(e)})};class fp extends Ot{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Fe.object)return De(r,{code:Pe.invalid_type,expected:Fe.object,received:r.parsedType}),ht;const i=[],s=this._def.keyType,a=this._def.valueType;for(const o in r.data)i.push({key:s._parse(new da(r,o,r.path,o)),value:a._parse(new da(r,r.data[o],r.path,o)),alwaysSet:o in r.data});return r.common.async?$r.mergeObjectAsync(n,i):$r.mergeObjectSync(n,i)}get element(){return this._def.valueType}static create(e,n,r){return n instanceof Ot?new fp({keyType:e,valueType:n,typeName:dt.ZodRecord,...Ct(r)}):new fp({keyType:Ss.create(),valueType:e,typeName:dt.ZodRecord,...Ct(n)})}}class iv extends Ot{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Fe.map)return De(r,{code:Pe.invalid_type,expected:Fe.map,received:r.parsedType}),ht;const i=this._def.keyType,s=this._def.valueType,a=[...r.data.entries()].map(([o,l],c)=>({key:i._parse(new da(r,o,r.path,[c,"key"])),value:s._parse(new da(r,l,r.path,[c,"value"]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=>{for(const l of a){const c=await l.key,u=await l.value;if(c.status==="aborted"||u.status==="aborted")return ht;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const l of a){const c=l.key,u=l.value;if(c.status==="aborted"||u.status==="aborted")return ht;(c.status==="dirty"||u.status==="dirty")&&n.dirty(),o.set(c.value,u.value)}return{status:n.value,value:o}}}}iv.create=(t,e,n)=>new iv({valueType:e,keyType:t,typeName:dt.ZodMap,...Ct(n)});class Ac extends Ot{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==Fe.set)return De(r,{code:Pe.invalid_type,expected:Fe.set,received:r.parsedType}),ht;const i=this._def;i.minSize!==null&&r.data.size<i.minSize.value&&(De(r,{code:Pe.too_small,minimum:i.minSize.value,type:"set",inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&&r.data.size>i.maxSize.value&&(De(r,{code:Pe.too_big,maximum:i.maxSize.value,type:"set",inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function a(l){const c=new Set;for(const u of l){if(u.status==="aborted")return ht;u.status==="dirty"&&n.dirty(),c.add(u.value)}return{status:n.value,value:c}}const o=[...r.data.values()].map((l,c)=>s._parse(new da(r,l,r.path,c)));return r.common.async?Promise.all(o).then(l=>a(l)):a(o)}min(e,n){return new Ac({...this._def,minSize:{value:e,message:rt.toString(n)}})}max(e,n){return new Ac({...this._def,maxSize:{value:e,message:rt.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}Ac.create=(t,e)=>new Ac({valueType:t,minSize:null,maxSize:null,typeName:dt.ZodSet,...Ct(e)});class ed extends Ot{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Fe.function)return De(n,{code:Pe.invalid_type,expected:Fe.function,received:n.parsedType}),ht;function r(o,l){return ev({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Q0(),kd].filter(c=>!!c),issueData:{code:Pe.invalid_arguments,argumentsError:l}})}function i(o,l){return ev({data:o,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,Q0(),kd].filter(c=>!!c),issueData:{code:Pe.invalid_return_type,returnTypeError:l}})}const s={errorMap:n.common.contextualErrorMap},a=n.data;if(this._def.returns instanceof Nd){const o=this;return Qr(async function(...l){const c=new ji([]),u=await o._def.args.parseAsync(l,s).catch(h=>{throw c.addIssue(r(l,h)),c}),d=await Reflect.apply(a,this,u);return await o._def.returns._def.type.parseAsync(d,s).catch(h=>{throw c.addIssue(i(d,h)),c})})}else{const o=this;return Qr(function(...l){const c=o._def.args.safeParse(l,s);if(!c.success)throw new ji([r(l,c.error)]);const u=Reflect.apply(a,this,c.data),d=o._def.returns.safeParse(u,s);if(!d.success)throw new ji([i(u,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ed({...this._def,args:ha.create(e).rest(hc.create())})}returns(e){return new ed({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,n,r){return new ed({args:e||ha.create([]).rest(hc.create()),returns:n||hc.create(),typeName:dt.ZodFunction,...Ct(r)})}}class pp extends Ot{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}pp.create=(t,e)=>new pp({getter:t,typeName:dt.ZodLazy,...Ct(e)});class mp extends Ot{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return De(n,{received:n.data,code:Pe.invalid_literal,expected:this._def.value}),ht}return{status:"valid",value:e.data}}get value(){return this._def.value}}mp.create=(t,e)=>new mp({value:t,typeName:dt.ZodLiteral,...Ct(e)});function vj(t,e){return new bl({values:t,typeName:dt.ZodEnum,...Ct(e)})}class bl extends Ot{constructor(){super(...arguments),Hh.set(this,void 0)}_parse(e){if(typeof e.data!="string"){const n=this._getOrReturnCtx(e),r=this._def.values;return De(n,{expected:Bt.joinValues(r),received:n.parsedType,code:Pe.invalid_type}),ht}if(tv(this,Hh)||fj(this,Hh,new Set(this._def.values)),!tv(this,Hh).has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return De(n,{received:n.data,code:Pe.invalid_enum_value,options:r}),ht}return Qr(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return bl.create(e,{...this._def,...n})}exclude(e,n=this._def){return bl.create(this.options.filter(r=>!e.includes(r)),{...this._def,...n})}}Hh=new WeakMap;bl.create=vj;class gp extends Ot{constructor(){super(...arguments),Wh.set(this,void 0)}_parse(e){const n=Bt.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==Fe.string&&r.parsedType!==Fe.number){const i=Bt.objectValues(n);return De(r,{expected:Bt.joinValues(i),received:r.parsedType,code:Pe.invalid_type}),ht}if(tv(this,Wh)||fj(this,Wh,new Set(Bt.getValidEnumValues(this._def.values))),!tv(this,Wh).has(e.data)){const i=Bt.objectValues(n);return De(r,{received:r.data,code:Pe.invalid_enum_value,options:i}),ht}return Qr(e.data)}get enum(){return this._def.values}}Wh=new WeakMap;gp.create=(t,e)=>new gp({values:t,typeName:dt.ZodNativeEnum,...Ct(e)});class Nd extends Ot{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==Fe.promise&&n.common.async===!1)return De(n,{code:Pe.invalid_type,expected:Fe.promise,received:n.parsedType}),ht;const r=n.parsedType===Fe.promise?n.data:Promise.resolve(n.data);return Qr(r.then(i=>this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Nd.create=(t,e)=>new Nd({type:t,typeName:dt.ZodPromise,...Ct(e)});class Rs extends Ot{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===dt.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:a=>{De(r,a),a.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type==="preprocess"){const a=i.transform(r.data,s);if(r.common.async)return Promise.resolve(a).then(async o=>{if(n.value==="aborted")return ht;const l=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return l.status==="aborted"?ht:l.status==="dirty"||n.value==="dirty"?Ou(l.value):l});{if(n.value==="aborted")return ht;const o=this._def.schema._parseSync({data:a,path:r.path,parent:r});return o.status==="aborted"?ht:o.status==="dirty"||n.value==="dirty"?Ou(o.value):o}}if(i.type==="refinement"){const a=o=>{const l=i.refinement(o,s);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status==="aborted"?ht:(o.status==="dirty"&&n.dirty(),a(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>o.status==="aborted"?ht:(o.status==="dirty"&&n.dirty(),a(o.value).then(()=>({status:n.value,value:o.value}))))}if(i.type==="transform")if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ap(a))return a;const o=i.transform(a.value,s);if(o instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>ap(a)?Promise.resolve(i.transform(a.value,s)).then(o=>({status:n.value,value:o})):a);Bt.assertNever(i)}}Rs.create=(t,e,n)=>new Rs({schema:t,typeName:dt.ZodEffects,effect:e,...Ct(n)});Rs.createWithPreprocess=(t,e,n)=>new Rs({schema:e,effect:{type:"preprocess",transform:t},typeName:dt.ZodEffects,...Ct(n)});class ca extends Ot{_parse(e){return this._getType(e)===Fe.undefined?Qr(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ca.create=(t,e)=>new ca({innerType:t,typeName:dt.ZodOptional,...Ct(e)});class xl extends Ot{_parse(e){return this._getType(e)===Fe.null?Qr(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}xl.create=(t,e)=>new xl({innerType:t,typeName:dt.ZodNullable,...Ct(e)});class vp extends Ot{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===Fe.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}vp.create=(t,e)=>new vp({innerType:t,typeName:dt.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Ct(e)});class yp extends Ot{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return op(i)?i.then(s=>({status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new ji(r.common.issues)},input:r.data})}
586)):{status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new ji(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}yp.create=(t,e)=>new yp({innerType:t,typeName:dt.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Ct(e)});class sv extends Ot{_parse(e){if(this._getType(e)!==Fe.nan){const r=this._getOrReturnCtx(e);return De(r,{code:Pe.invalid_type,expected:Fe.nan,received:r.parsedType}),ht}return{status:"valid",value:e.data}}}sv.create=t=>new sv({typeName:dt.ZodNaN,...Ct(t)});const sQ=Symbol("zod_brand");class R5 extends Ot{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Fp extends Ot{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?ht:s.status==="dirty"?(n.dirty(),Ou(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?ht:i.status==="dirty"?(n.dirty(),{status:"dirty",value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new Fp({in:e,out:n,typeName:dt.ZodPipeline})}}class wp extends Ot{_parse(e){const n=this._def.innerType._parse(e),r=i=>(ap(i)&&(i.value=Object.freeze(i.value)),i);return op(n)?n.then(i=>r(i)):r(n)}unwrap(){return this._def.innerType}}wp.create=(t,e)=>new wp({innerType:t,typeName:dt.ZodReadonly,...Ct(e)});function yj(t,e={},n){return t?Ed.create().superRefine((r,i)=>{var s,a;if(!t(r)){const o=typeof e=="function"?e(r):typeof e=="string"?{message:e}:e,l=(a=(s=o.fatal)!==null&&s!==void 0?s:n)!==null&&a!==void 0?a:!0,c=typeof o=="string"?{message:o}:o;i.addIssue({code:"custom",...c,fatal:l})}}):Ed.create()}const aQ={object:Sn.lazycreate};var dt;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly"})(dt||(dt={}));const oQ=(t,e={message:`Input not instance of ${t.name}`})=>yj(n=>n instanceof t,e),wj=Ss.create,bj=yl.create,lQ=sv.create,cQ=wl.create,xj=lp.create,uQ=Nc.create,dQ=nv.create,hQ=cp.create,fQ=up.create,pQ=Ed.create,mQ=hc.create,gQ=lo.create,vQ=rv.create,yQ=Ns.create,wQ=Sn.create,bQ=Sn.strictCreate,xQ=dp.create,_Q=l1.create,SQ=hp.create,kQ=ha.create,EQ=fp.create,NQ=iv.create,AQ=Ac.create,CQ=ed.create,PQ=pp.create,TQ=mp.create,RQ=bl.create,LQ=gp.create,jQ=Nd.create,c4=Rs.create,OQ=ca.create,IQ=xl.create,DQ=Rs.createWithPreprocess,MQ=Fp.create,FQ=()=>wj().optional(),zQ=()=>bj().optional(),$Q=()=>xj().optional(),UQ={string:t=>Ss.create({...t,coerce:!0}),number:t=>yl.create({...t,coerce:!0}),boolean:t=>lp.create({...t,coerce:!0}),bigint:t=>wl.create({...t,coerce:!0}),date:t=>Nc.create({...t,coerce:!0})},BQ=ht;var wg=Object.freeze({__proto__:null,defaultErrorMap:kd,setErrorMap:BX,getErrorMap:Q0,makeIssue:ev,EMPTY_PATH:qX,addIssueToContext:De,ParseStatus:$r,INVALID:ht,DIRTY:Ou,OK:Qr,isAborted:_b,isDirty:Sb,isValid:ap,isAsync:op,get util(){return Bt},get objectUtil(){return xb},ZodParsedType:Fe,getParsedType:qo,ZodType:Ot,datetimeRegex:gj,ZodString:Ss,ZodNumber:yl,ZodBigInt:wl,ZodBoolean:lp,ZodDate:Nc,ZodSymbol:nv,ZodUndefined:cp,ZodNull:up,ZodAny:Ed,ZodUnknown:hc,ZodNever:lo,ZodVoid:rv,ZodArray:Ns,ZodObject:Sn,ZodUnion:dp,ZodDiscriminatedUnion:l1,ZodIntersection:hp,ZodTuple:ha,ZodRecord:fp,ZodMap:iv,ZodSet:Ac,ZodFunction:ed,ZodLazy:pp,ZodLiteral:mp,ZodEnum:bl,ZodNativeEnum:gp,ZodPromise:Nd,ZodEffects:Rs,ZodTransformer:Rs,ZodOptional:ca,ZodNullable:xl,ZodDefault:vp,ZodCatch:yp,ZodNaN:sv,BRAND:sQ,ZodBranded:R5,ZodPipeline:Fp,ZodReadonly:wp,custom:yj,Schema:Ot,ZodSchema:Ot,late:aQ,get ZodFirstPartyTypeKind(){return dt},coerce:UQ,any:pQ,array:yQ,bigint:cQ,boolean:xj,date:uQ,discriminatedUnion:_Q,effect:c4,enum:RQ,function:CQ,instanceof:oQ,intersection:SQ,lazy:PQ,literal:TQ,map:NQ,nan:lQ,nativeEnum:LQ,never:gQ,null:fQ,nullable:IQ,number:bj,object:wQ,oboolean:$Q,onumber:zQ,optional:OQ,ostring:FQ,pipeline:MQ,preprocess:DQ,promise:jQ,record:EQ,set:AQ,strictObject:bQ,string:wj,symbol:dQ,transformer:c4,tuple:kQ,undefined:hQ,union:xQ,unknown:mQ,void:vQ,NEVER:BQ,ZodIssueCode:Pe,quotelessJson:UX,ZodError:ji});const qQ=()=>{const{t}=Er(),e=wg.object({name:wg.string().trim().min(1,t("contact.errors.nameRequired")).max(100,t("contact.errors.nameMax")),email:wg.string().trim().email(t("contact.errors.emailInvalid")).max(255,t("contact.errors.emailMax")),message:wg.string().trim().min(1,t("contact.errors.messageRequired")).max(2e3,t("contact.errors.messageMax"))}),[n,r]=E.useState({name:"",email:"",message:""}),[i,s]=E.useState(!1),[a,o]=E.useState(!1),[l,c]=E.useState({}),u=f=>{const{id:h,value:y}=f.target;r(v=>({...v,[h]:y})),l[h]&&c(v=>({...v,[h]:void 0}))},d=async f=>{f.preventDefault(),c({});const h=e.safeParse(n);if(!h.success){const y={};
586h.error.errors.forEach(v=>{const _=v.path[0];y[_]=v.message}),c(y);return}s(!0);try{const{data:y,error:v}=await aa.functions.invoke("send-contact-email",{body:n});if(v){Um.error(t("toast.contactErrorSend"));return}if(y!=null&&y.error){Um.error(y.error);return}o(!0),r({name:"",email:"",message:""}),Um.success(t("toast.contactSuccess"))}catch{Um.error(t("toast.contactGenericError"))}finally{s(!1)}};return m.jsxs("div",{className:"flex flex-col min-h-screen",children:[m.jsx(ma,{}),m.jsxs("main",{className:"flex-1 pt-28",children:[m.jsxs("section",{className:"relative py-20 hero-gradient overflow-hidden",children:[m.jsx("div",{className:"absolute top-1/2 left-1/4 w-[400px] h-[400px] bg-primary/20 rounded-full blur-[120px]"}),m.jsx("div",{className:"absolute top-1/2 right-1/4 w-[300px] h-[300px] bg-accent/20 rounded-full blur-[100px]"}),m.jsx("div",{className:"container px-4 md:px-6 relative z-10",children:m.jsxs(Jt,{className:"text-center space-y-6 max-w-3xl mx-auto",children:[m.jsx("span",{className:"text-lg font-bold uppercase tracking-widest neon-text-cyan",children:t("contact.kicker")}),m.jsxs("h1",{className:"text-4xl md:text-5xl lg:text-6xl font-black tracking-tight",children:[t("contact.title1")," ",m.jsx("span",{className:"text-outline",children:t("contact.title2")})]}),m.jsx("p",{className:"text-xl text-muted-foreground",children:t("contact.subtitle")})]})})]}),m.jsx("section",{className:"py-20 bg-background",children:m.jsx("div",{className:"container px-4 md:px-6",children:m.jsxs("div",{className:"grid lg:grid-cols-2 gap-16 max-w-6xl mx-auto",children:[m.jsx(Jt,{variant:"left",children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8",children:[m.jsx("h2",{className:"text-2xl font-bold mb-6 neon-text-green",children:t("contact.sendMessage")}),a?m.jsxs("div",{className:"flex flex-col items-center justify-center py-12 space-y-4",children:[m.jsx("div",{className:"p-4 rounded-full bg-primary/20 neon-glow-green",children:m.jsx(Cv,{className:"h-12 w-12 text-primary"})}),m.jsx("h3",{className:"text-xl font-bold neon-text-green",children:t("contact.success")}),m.jsx("p",{className:"text-muted-foreground text-center",children:t("contact.successDesc")}),m.jsx(En,{onClick:()=>o(!1),variant:"outline",className:"mt-4 border-primary/50 text-primary hover:bg-primary/10",children:t("contact.another")})]}):m.jsxs("form",{onSubmit:d,className:"space-y-6",children:[m.jsxs("div",{children:[m.jsx("label",{htmlFor:"name",className:"block text-base font-semibold mb-2 text-foreground",children:t("contact.name")}),m.jsx(bd,{id:"name",value:n.name,onChange:u,placeholder:t("contact.namePlaceholder"),className:`h-14 text-lg bg-secondary/50 border-border/50 focus:border-primary focus:ring-primary/30 ${l.name?"border-destructive":""}`,disabled:i}),l.name&&m.jsx("p",{className:"text-destructive text-sm mt-1",children:l.name})]}),m.jsxs("div",{children:[m.jsx("label",{htmlFor:"email",className:"block text-base font-semibold mb-2 text-foreground",children:t("contact.email")}),m.jsx(bd,{id:"email",type:"email",value:n.email,onChange:u,placeholder:t("contact.emailPlaceholder"),className:`h-14 text-lg bg-secondary/50 border-border/50 focus:border-primary focus:ring-primary/30 ${l.email?"border-destructive":""}`,disabled:i}),l.email&&m.jsx("p",{className:"text-destructive text-sm mt-1",children:l.email})]}),m.jsxs("div",{children:[m.jsx("label",{htmlFor:"message",className:"block text-base font-semibold mb-2 text-foreground",children:t("contact.message")}),m.jsx(dj,{id:"message",value:n.message,onChange:u,placeholder:t("contact.messagePlaceholder"),className:`min-h-[180px] text-lg bg-secondary/50 border-border/50 focus:border-primary focus:ring-primary/30 ${l.message?"border-destructive":""}`,disabled:i}),l.message&&m.jsx("p",{className:"text-destructive text-sm mt-1",children:l.message})]}),m.jsx(En,{type:"submit",size:"lg",disabled:i,className:"w-full h-14 text-lg font-bold bg-primary hover:bg-primary/90 text-primary-foreground neon-glow-green transition-all duration-300 hover:scale-[1.02] disabled:opacity-50 disabled:cursor-not-allowed",children:i?m.jsxs(m.Fragment,{children:[m.jsx(Tx,{className:"mr-3 h-5 w-5 animate-spin"}),t("contact.submitting")]}):m.jsxs(m.Fragment,{children:[m.jsx(lD,{className:"mr-3 h-5 w-5"}),t("contact.submit")]})})]})]})}),m.jsx(Jt,{variant:"right",children:m.jsxs("div",{className:"space-y-8",children:[m.jsxs("div",{children:[m.jsx("h2",{className:"text-2xl font-bold mb-4 neon-text-green",children:t("contact.
586infoTitle")}),m.jsx("p",{className:"text-lg text-muted-foreground",children:t("contact.infoDesc")})]}),m.jsxs("div",{className:"space-y-6",children:[m.jsxs("div",{className:"flex items-start gap-4 p-6 glass border border-primary/20 rounded-xl",children:[m.jsx("div",{className:"p-3 rounded-xl bg-primary/10",children:m.jsx(Rx,{className:"h-6 w-6 text-primary"})}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-lg font-bold text-foreground",children:t("contact.email")}),m.jsx("a",{href:"mailto:[email protected]",className:"text-muted-foreground hover:text-primary transition-colors",children:"[email protected]"})]})]}),m.jsxs("div",{className:"flex items-start gap-4 p-6 glass border border-primary/20 rounded-xl",children:[m.jsx("div",{className:"p-3 rounded-xl bg-primary/10",children:m.jsx(nD,{className:"h-6 w-6 text-primary"})}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-lg font-bold text-foreground",children:t("contact.location")}),m.jsx("p",{className:"text-muted-foreground",children:t("contact.locationValue")})]})]}),m.jsxs("div",{className:"flex items-start gap-4 p-6 glass border border-primary/20 rounded-xl",children:[m.jsx("div",{className:"p-3 rounded-xl bg-primary/10",children:m.jsx(aD,{className:"h-6 w-6 text-primary"})}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-lg font-bold text-foreground",children:t("contact.hours")}),m.jsx("p",{className:"text-muted-foreground",children:t("contact.hoursValue")})]})]})]})]})})]})})})]}),m.jsx(ga,{})]})},HQ=()=>m.jsxs("div",{className:"flex flex-col min-h-screen",children:[m.jsx(ma,{}),m.jsxs("main",{className:"flex-1 pt-28",children:[m.jsxs("section",{className:"relative py-16 hero-gradient overflow-hidden",children:[m.jsx("div",{className:"absolute top-1/2 left-1/4 w-[300px] h-[300px] bg-primary/20 rounded-full blur-[100px]"}),m.jsx("div",{className:"container px-4 md:px-6 relative z-10",children:m.jsxs(Jt,{className:"space-y-4",children:[m.jsx("span",{className:"text-lg font-bold uppercase tracking-widest neon-text-magenta",children:"Legale"}),m.jsxs("h1",{className:"text-4xl md:text-5xl font-black tracking-tight",children:["Termini e ",m.jsx("span",{className:"text-outline",children:"Condizioni"})]}),m.jsxs("p",{className:"text-lg text-muted-foreground",children:["Ultimo aggiornamento: ",new Date().toLocaleDateString("it-IT")]})]})})]}),m.jsx("section",{className:"py-16 bg-background",children:m.jsx("div",{className:"container px-4 md:px-6",children:m.jsxs("div",{className:"max-w-4xl mx-auto space-y-12",children:[m.jsx(Jt,{children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"1. Introduzione"}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:`Benvenuti su AEO Analyzer, un servizio di analisi per l'ottimizzazione dei contenuti per i motori di risposta ("Servizio") gestito da Vincenzo Barbagallo, P.I. 05989610877, Iscrizione al registro delle imprese REA CT-470241 ("noi", "nostro"). Utilizzando il nostro Servizio, accetti i presenti Termini e Condizioni d'Uso ("Termini"). Ti preghiamo di leggerli attentamente.`})]})}),m.jsx(Jt,{delay:100,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"2. Utilizzo del Servizio"}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"AEO Analyzer è uno strumento di analisi che ti aiuta a ottimizzare i tuoi contenuti per i motori di risposta come ChatGPT, Perplexity, Bing AI e Google SGE. Il Servizio fornisce rapporti e suggerimenti basati sull'analisi dell'URL fornito."}),m.jsx("p",{className:"text-lg text-foreground font-medium mt-4",children:"Per utilizzare il Servizio, devi:"}),m.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-lg text-muted-foreground",children:[m.jsx("li",{children:"Avere almeno 18 anni o l'età legale per stipulare un contratto vincolante nella tua giurisdizione"}),m.jsx("li",{children:"Essere legalmente autorizzato ad utilizzare il Servizio secondo le leggi applicabili"}),m.jsx("li",{children:"Fornire informazioni accurate quando richiesto"}),m.jsx("li",{children:"Utilizzare il Servizio solo per scopi legittimi e in conformità con questi Termini"})]})]})}),m.jsx(Jt,{delay:200,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"3. Account e Registrazione"}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Per accedere a determinate funzionalità del Servizio, potrebbe essere necessario creare un account. Ti assumi la responsabilità di mantenere la sicurezza delle tue credenziali e di tutte le attività che si verificano sotto il tuo account."})]})}),m.jsx(Jt,{delay:300,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"4. Proprietà Intellettuale"}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Tutti i diritti, titoli e interessi relativi al Servizio, inclusi tutti i contenuti, il design, i testi, la grafica, le interfacce, il co
586dice, il software e altri elementi sono di nostra proprietà o dei nostri licenzianti e sono protetti dalle leggi sulla proprietà intellettuale."}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Ti concediamo una licenza limitata, non esclusiva, non trasferibile e revocabile per utilizzare il Servizio per i tuoi scopi personali o aziendali in conformità con questi Termini."})]})}),m.jsx(Jt,{delay:400,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"5. Limitazioni di Utilizzo"}),m.jsx("p",{className:"text-lg text-foreground font-medium",children:"Nell'utilizzare il nostro Servizio, accetti di non:"}),m.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-lg text-muted-foreground",children:[m.jsx("li",{children:"Violare qualsiasi legge o regolamento applicabile"}),m.jsx("li",{children:"Eludere, disabilitare o interferire con le funzionalità di sicurezza del Servizio"}),m.jsx("li",{children:"Utilizzare robot, spider o altri mezzi automatici per accedere al Servizio"}),m.jsx("li",{children:"Decompilare, decodificare o tentare di accedere al codice sorgente del Servizio"}),m.jsx("li",{children:"Condurre attività che potrebbero danneggiare, disabilitare, sovraccaricare o compromettere il funzionamento del Servizio"}),m.jsx("li",{children:"Utilizzare il Servizio per scopi illegali o non autorizzati"})]})]})}),m.jsx(Jt,{delay:500,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"6. Limitazione di Responsabilità "}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:`Il Servizio è fornito "così com'è" e "come disponibile", senza garanzie di alcun tipo, esplicite o implicite, nei limiti consentiti dalla legge applicabile.`})]})}),m.jsx(Jt,{delay:600,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"7. Modifiche ai Termini"}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Ci riserviamo il diritto di modificare o sostituire questi Termini in qualsiasi momento a nostra discrezione. Ti informeremo di eventuali modifiche pubblicando i Termini aggiornati su questa pagina con una nuova data di entrata in vigore."})]})}),m.jsx(Jt,{delay:700,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"8. Legge Applicabile"}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Questi Termini sono regolati e interpretati in conformità con le leggi italiane, senza riguardo ai suoi principi di conflitto di leggi. Qualsiasi controversia derivante o relativa a questi Termini sarà soggetta alla giurisdizione esclusiva dei tribunali di Catania, Italia."})]})}),m.jsx(Jt,{delay:800,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"9. Contatti"}),m.jsxs("p",{className:"text-lg text-muted-foreground leading-relaxed",children:["Per domande o chiarimenti riguardanti questi Termini, puoi contattarci all'indirizzo email:"," ",m.jsx("a",{href:"mailto:[email protected]",className:"neon-text-cyan hover:underline",children:"[email protected]"})]}),m.jsxs("p",{className:"text-lg text-muted-foreground leading-relaxed mt-4",children:["Per ulteriori informazioni sul trattamento dei tuoi dati personali, consulta la nostra"," ",m.jsx(_r,{to:"/privacy",className:"neon-text-cyan hover:underline",children:"Informativa sulla Privacy"}),"."]})]})})]})})})]}),m.jsx(ga,{})]}),WQ=()=>m.jsxs("div",{className:"flex flex-col min-h-screen",children:[m.jsx(ma,{}),m.jsxs("main",{className:"flex-1 pt-28",children:[m.jsxs("section",{className:"relative py-16 hero-gradient overflow-hidden",children:[m.jsx("div",{className:"absolute top-1/2 left-1/4 w-[300px] h-[300px] bg-primary/20 rounded-full blur-[100px]"}),m.jsx("div",{className:"container px-4 md:px-6 relative z-10",children:m.jsxs(Jt,{className:"space-y-4",children:[m.jsx("span",{className:"text-lg font-bold uppercase tracking-widest neon-text-cyan",children:"Legale"}),m.jsxs("h1",{className:"text-4xl md:text-5xl font-black tracking-tight",children:["Privacy ",m.jsx("span",{className:"text-outline",children:"Policy"})]}),m.jsxs("p",{className:"text-lg text-muted-foreground",children:["Ultimo aggiornamento: ",new Date().toLocaleDateString("it-IT")]})]})})]}),m.jsx("section",{className:"py-16 bg-background",children:m.jsx("div",{className:"container px-4 md:px-6",children:m.jsxs("div",{className:"max-w-4xl mx-auto
586space-y-8",children:[m.jsx(Jt,{children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"1. Introduzione"}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:'La presente Informativa sulla Privacy descrive le modalità con cui Vincenzo Barbagallo, P.I. 05989610877, Iscrizione al registro delle imprese REA CT-470241 ("noi", "nostro"), in qualità di Titolare del trattamento, raccoglie, utilizza e condivide i tuoi dati personali quando utilizzi il nostro servizio AEO Analyzer ("Servizio").'}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Ci impegniamo a proteggere la tua privacy e a trattare i tuoi dati personali in conformità con il Regolamento Generale sulla Protezione dei Dati (GDPR) dell'Unione Europea e altre leggi applicabili sulla protezione dei dati."})]})}),m.jsx(Jt,{delay:100,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"2. Dati personali che raccogliamo"}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Raccogliamo i seguenti tipi di dati personali:"}),m.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-lg text-muted-foreground",children:[m.jsxs("li",{children:[m.jsx("span",{className:"text-foreground font-medium",children:"Dati forniti direttamente da te:"})," quando utilizzi il nostro Servizio, potremmo raccogliere il tuo indirizzo email, nome, e altre informazioni che decidi di fornirci."]}),m.jsxs("li",{children:[m.jsx("span",{className:"text-foreground font-medium",children:"Dati di utilizzo:"})," raccogliamo automaticamente informazioni su come interagisci con il nostro Servizio, inclusi gli URL che analizzi."]}),m.jsxs("li",{children:[m.jsx("span",{className:"text-foreground font-medium",children:"Informazioni del dispositivo:"})," raccogliamo informazioni sul dispositivo con cui accedi al Servizio, inclusi il tipo di dispositivo, sistema operativo, browser web e indirizzo IP."]})]})]})}),m.jsx(Jt,{delay:200,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"3. Come utilizziamo i tuoi dati"}),m.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-lg text-muted-foreground",children:[m.jsx("li",{children:"Fornire, mantenere e migliorare il nostro Servizio"}),m.jsx("li",{children:"Elaborare e completare le tue richieste di analisi AEO"}),m.jsx("li",{children:"Mostrare annunci pubblicitari pertinenti tramite Google AdSense"}),m.jsx("li",{children:"Inviare informazioni tecniche, aggiornamenti e avvisi di sicurezza"}),m.jsx("li",{children:"Rispondere alle tue richieste, domande e feedback"}),m.jsx("li",{children:"Monitorare e analizzare tendenze, utilizzo e attività "})]})]})}),m.jsx(Jt,{delay:300,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"4. Cookie e Google AdSense"}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Utilizziamo cookie e tecnologie di tracciamento simili per raccogliere e utilizzare dati personali su di te. I cookie sono piccoli file di testo che vengono memorizzati sul tuo dispositivo quando visiti il nostro sito web."}),m.jsx("p",{className:"text-lg text-foreground font-medium mt-4",children:"Tipi di Cookie utilizzati:"}),m.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-lg text-muted-foreground",children:[m.jsxs("li",{children:[m.jsx("span",{className:"neon-text-cyan",children:"Cookie tecnici:"})," necessari per il funzionamento del sito"]}),m.jsxs("li",{children:[m.jsx("span",{className:"neon-text-cyan",children:"Cookie analitici:"})," per comprendere come utilizzi il Servizio"]}),m.jsxs("li",{children:[m.jsx("span",{className:"neon-text-cyan",children:"Cookie pubblicitari:"})," utilizzati da Google AdSense per mostrare annunci pertinenti"]})]})]})}),m.jsx(Jt,{delay:400,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"5. I tuoi diritti"}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"In conformità con il GDPR, hai i seguenti diritti:"}),m.jsxs("ul",{className:"list-disc pl-6 space-y-2 text-lg text-muted-foreground",children:[m.jsx("li",{children:"Diritto di accesso ai tuoi dati personali"}),m.jsx("li",{children:"Diritto di rettifica dei dati inesatti"}),m.jsx("li",{children:`Diritto alla cancellazione ("diritto all'oblio")`}),m.jsx("li",{children:"Diritto di limitazione del trattamento"}),m.jsx("li",{children:"Diritto alla portabilità dei dati"}),m.jsx("li",{children:"Diritto di opposizione al trattamento"})]})]})}),m.jsx(Jt,{delay:500,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"6. Sicurezza dei dati"}),m.jsx("p",{className:"text-lg text-muted-foreground leading-relaxed",children:"Adottiamo misure tecniche e organizzative appropriate per proteggere i tuoi dati personali da perdita, uso improprio e accesso non autorizzato, divulgazione, alterazione e distruzione."})]})}),m.jsx(Jt,{delay:600,children:m.jsxs("div",{className:"glass border border-primary/20 rounded-2xl p-8 space-y-4",children:[m.jsx("h2",{className:"text-2xl font-bold neon-text-green",children:"7.
586Contatti"}),m.jsxs("p",{className:"text-lg text-muted-foreground leading-relaxed",children:["Per qualsiasi domanda o richiesta relativa alla presente Informativa sulla Privacy, puoi contattarci all'indirizzo email:"," ",m.jsx("a",{href:"mailto:[email protected]",className:"neon-text-cyan hover:underline",children:"[email protected]"})]}),m.jsxs("p",{className:"text-lg text-muted-foreground leading-relaxed mt-4",children:["Per ulteriori informazioni, consulta i nostri"," ",m.jsx(_r,{to:"/terms",className:"neon-text-cyan hover:underline",children:"Termini e Condizioni"}),"."]})]})})]})})})]}),m.jsx(ga,{})]}),VQ=()=>{const t=[{path:"/",title:"Home",description:"Analizza e Migliora il tuo AEO"},{path:"/features",title:"Funzionalità ",description:"Scopri le funzionalità di AEO Analyzer"},{path:"/analysis-tools",title:"Strumenti",description:"Utilizza i nostri strumenti avanzati di analisi AEO"},{path:"/dashboard",title:"Le tue analisi",description:"Visualizza lo storico delle tue analisi AEO"},{path:"/contact",title:"Contatti",description:"Contattaci per domande o suggerimenti"},{path:"/auth",title:"Accedi/Registrati",description:"Accedi al tuo account o registrati"},{path:"/terms",title:"Termini e Condizioni",description:"Termini e condizioni d'uso del servizio"},{path:"/privacy",title:"Privacy Policy",description:"Informativa sulla privacy del servizio"}];return m.jsxs("div",{className:"flex flex-col min-h-screen",children:[m.jsx(ma,{}),m.jsx("main",{className:"flex-1 py-12",children:m.jsxs("div",{className:"container px-4 md:px-6",children:[m.jsx("h1",{className:"text-3xl font-bold mb-6",children:"Sitemap"}),m.jsx("div",{className:"grid gap-4 md:grid-cols-2 lg:grid-cols-3",children:t.map(e=>m.jsxs("div",{className:"border rounded-lg p-4 transition-colors hover:bg-muted/50",children:[m.jsx("h2",{className:"text-lg font-medium",children:m.jsx(_r,{to:e.path,className:"hover:text-seo-blue",children:e.title})}),m.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:e.description})]},e.path))})]})}),m.jsx(ga,{})]})};var GQ="Label",_j=E.forwardRef((t,e)=>m.jsx(xt.label,{...t,ref:e,onMouseDown:n=>{var i;n.target.closest("button, input, select, textarea")||((i=t.onMouseDown)==null||i.call(t,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));_j.displayName=GQ;var Sj=_j;const KQ=Ld("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Eb=E.forwardRef(({className:t,...e},n)=>m.jsx(Sj,{ref:n,className:St(KQ(),t),...e}));Eb.displayName=Sj.displayName;const ZQ=()=>{const t=Oc(),{toast:e}=Tc(),{t:n}=Er(),{user:r,loading:i}=zd(),[s,a]=E.useState("signin"),[o,l]=E.useState(""),[c,u]=E.useState(""),[d,f]=E.useState(!1);E.useEffect(()=>{!i&&r&&t("/")},[r,i,t]);const h=async y=>{y.preventDefault(),f(!0);try{if(s==="signup"){const{error:v}=await aa.auth.signUp({email:o,password:c,options:{emailRedirectTo:`${window.location.origin}/`}});if(v)throw v;e({title:n("toast.accountCreated"),description:n("toast.accountCreatedDesc")}),t("/pricing")}else{const{error:v}=await aa.auth.signInWithPassword({email:o,password:c});if(v)throw v;e({title:n("toast.welcomeBack")}),t("/")}}catch(v){e({title:n("toast.error"),description:v.message==="Invalid login credentials"?n("toast.invalidCredentials"):v.message,variant:"destructive"})}finally{f(!1)}};return m.jsxs("div",{className:"flex flex-col min-h-screen bg-background",children:[m.jsx(ma,{}),m.jsx("main",{className:"flex-1 pt-32 pb-16",children:m.jsx("div",{className:"container max-w-md mx-auto px-4",children:m.jsxs("div",{className:"glass rounded-2xl p-8 border border-primary/30",children:[m.jsx("h1",{className:"text-3xl font-bold neon-text-cyan mb-2",children:n(s==="signin"?"auth.signinTitle":"auth.signupTitle")}),m.jsx("p",{className:"text-muted-foreground mb-6",children:n(s==="signin"?"auth.signinSub":"auth.signupSub")}),m.jsxs("form",{onSubmit:h,className:"space-y-4",children:[m.jsxs("div",{children:[m.jsx(Eb,{htmlFor:"email",children:n("auth.email")}),m.jsx(bd,{id:"email",type:"email",required:!0,value:o,onChange:y=>l(y.target.value)})]}),m.jsxs("div",{children:[m.jsx(Eb,{htmlFor:"password",children:n("auth.password")}),m.jsx(bd,{id:"password",type:"password",required:!0,minLength:6,value:c,onChange:y=>u(y.target.value)})]}),m.jsxs(En,{type:"submit",disabled:d,className:"w-full",children:[d&&m.jsx(Tx,{className:"mr-2 h-4 w-4 animate-spin"}),n(s==="signin"?"auth.signin":"auth.signup")]})]}),m.jsx("div",{className:"mt-6 text-center text-sm text-muted-foreground",children:s==="signin"?m.jsxs(m.Fragment,{children:[n("auth.noAccount")," ",m.jsx("button",{onClick:()=>a("signup"),className:"neon-text-cyan hover:underline",children:n("auth.signup")})]}):m.jsxs(m.Fragment,{children:[n("auth.hasAccount")," ",m.jsx("button",{onClick:()=>a("signin"),className:"neon-text-cyan hover:underline",children:n("auth.signin")})]})}),m.jsx("div",{className:"mt-4 text-center text-xs text-muted-foreground",children:m.jsx(_r,{to:"/pricing",className:"hover:underline",children:n("auth.seePlans")})})]})})}),m.jsx(ga,{})]})},kj=xT,YQ=_T,Ej=E.forwardRef(({className:t,...e},n)=>m.jsx(Uv,{ref:n,className:St("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));Ej.displayName=Uv.displayName;const L5=E.forwardRef(({className:t,children:e,...n},r)=>m.jsxs(YQ,{children:[m.jsx(Ej,{}),m.jsxs(Bv,{ref:r,className:St("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
586nded-lg",t),...n,children:[e,m.jsxs(Qx,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[m.jsx(jd,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));L5.displayName=Bv.displayName;const Nj=({className:t,...e})=>m.jsx("div",{className:St("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});Nj.displayName="DialogHeader";const Aj=E.forwardRef(({className:t,...e},n)=>m.jsx(qv,{ref:n,className:St("text-lg font-semibold leading-none tracking-tight",t),...e}));Aj.displayName=qv.displayName;const JQ=E.forwardRef(({className:t,...e},n)=>m.jsx(Hv,{ref:n,className:St("text-sm text-muted-foreground",t),...e}));JQ.displayName=Hv.displayName;const XQ="pk_live_51MWK9hEymcNfZzcIdjVwCIdw9a1ktUqIu6G5T8j4m5ovmSfGQIK29rsiyKSSmAm8Evpsd1AnjuggqecXwjBX5F1800gYJsHKFc";function QQ(){return XQ.startsWith("pk_test_")?m.jsx("div",{className:"w-full bg-orange-100 border-b border-orange-300 px-4 py-2 text-center text-sm text-orange-800",children:"I pagamenti in anteprima sono in modalità test â usa la carta 4242 4242 4242 4242."}):null}var Cj={exports:{}},eee="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",tee=eee,nee=tee;function Pj(){}function Tj(){}Tj.resetWarningCache=Pj;var ree=function(){function t(r,i,s,a,o,l){if(l!==nee){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}t.isRequired=t;function e(){return t}var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:Tj,resetWarningCache:Pj};return n.PropTypes=n,n};Cj.exports=ree();var iee=Cj.exports;const zn=Ab(iee);function u4(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function d4(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?u4(Object(n),!0).forEach(function(r){Rj(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):u4(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}function Kg(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Kg=function(e){return typeof e}:Kg=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kg(t)}function Rj(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function see(t,e){if(t==null)return{};var n={},r=Object.keys(t),i,s;for(s=0;s<r.length;s++)i=r[s],!(e.indexOf(i)>=0)&&(n[i]=t[i]);return n}function aee(t,e){if(t==null)return{};var n=see(t,e),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(i=0;i<s.length;i++)r=s[i],!(e.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function Lj(t,e){return oee(t)||lee(t,e)||cee(t,e)||uee()}function oee(t){if(Array.isArray(t))return t}function lee(t,e){var n=t&&(typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"]);if(n!=null){var r=[],i=!0,s=!1,a,o;try{for(n=n.call(t);!(i=(a=n.next()).done)&&(r.push(a.value),!(e&&r.length===e));i=!0);}catch(l){s=!0,o=l}finally{try{!i&&n.return!=null&&n.return()}finally{if(s)throw o}}return r}}function cee(t,e){if(t){if(typeof t=="string")return h4(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);if(n==="Object"&&t.constructor&&(n=t.constructor.name),n==="Map"||n==="Set")return Array.from(t);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return h4
586(t,e)}}function h4(t,e){(e==null||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function uee(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 587In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Vr=function(e,n,r){var i=!!r,s=ye.useRef(r);ye.useEffect(function(){s.current=r},[r]),ye.useEffect(function(){if(!i||!e)return function(){};var a=function(){s.current&&s.current.apply(s,arguments)};return e.on(n,a),function(){e.off(n,a)}},[i,n,e,s])},Nb=function(e){var n=ye.useRef(e);return ye.useEffect(function(){n.current=e},[e]),n.current},Ad=function(e){return e!==null&&Kg(e)==="object"},dee=function(e){return Ad(e)&&typeof e.then=="function"},hee=function(e){return Ad(e)&&typeof e.elements=="function"&&typeof e.createToken=="function"&&typeof e.createPaymentMethod=="function"&&typeof e.confirmCardPayment=="function"},f4="[object Object]",fee=function t(e,n){if(!Ad(e)||!Ad(n))return e===n;var r=Array.isArray(e),i=Array.isArray(n);if(r!==i)return!1;var s=Object.prototype.toString.call(e)===f4,a=Object.prototype.toString.call(n)===f4;if(s!==a)return!1;if(!s&&!r)return e===n;var o=Object.keys(e),l=Object.keys(n);if(o.length!==l.length)return!1;for(var c={},u=0;u<o.length;u+=1)c[o[u]]=!0;for(var d=0;d<l.length;d+=1)c[l[d]]=!0;var f=Object.keys(c);if(f.length!==o.length)return!1;var h=e,y=n,v=function(w){return t(h[w],y[w])};return f.every(v)},pee=function(e,n,r){return Ad(e)?Object.keys(e).reduce(function(i,s){var a=!Ad(n)||!fee(e[s],n[s]);return r.includes(s)?(a&&console.warn("Unsupported prop change: options.".concat(s," is not a mutable property.")),i):a?d4(d4({},i||{}),{},Rj({},s,e[s])):i},null):null},jj="Invalid prop `stripe` supplied to `Elements`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",p4=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jj;if(e===null||hee(e))return e;throw new Error(n)},mee=function(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:jj;if(dee(e))return{tag:"async",stripePromise:Promise.resolve(e).then(function(i){return p4(i,n)})};var r=p4(e,n);return r===null?{tag:"empty"}:{tag:"sync",stripe:r}},gee=function(e){!e||!e._registerWrapper||!e.registerAppInfo||(e._registerWrapper({name:"react-stripe-js",version:"6.2.0"}),e.registerAppInfo({name:"react-stripe-js",version:"6.2.0",url:"https://stripe.com/docs/stripe-js/react"}))},Oj=ye.createContext(null);Oj.displayName="ElementsContext";var vee=function(e,n){if(!e)throw new Error("Could not find Elements context; You need to wrap the part of your app that ".concat(n," in an <Elements> provider."));return e};zn.any,zn.object;zn.func.isRequired;var Ij=ye.createContext(null);Ij.displayName="CheckoutContext";var m4=function(e){var n=ye.useContext(Ij),r=ye.useContext(Oj);if(n){if(r)throw new Error("You cannot wrap the part of your app that ".concat(e," in both a checkout provider and <Elements> provider."));return n}else return vee(r,e)},yee=["mode"],wee=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},Xn=function(e,n,r){var i="".concat(wee(e),"Element"),s=function(c){var u=c.id,d=c.className,f=c.options,h=f===void 0?{}:f,y=c.onBlur,v=c.onFocus,_=c.onReady,w=c.onChange,x=c.onEscape,k=c.onClick,N=c.onLoadError,R=c.onLoaderStart,H=c.onNetworksChange,F=c.onConfirm,M=c.onCancel,I=c.onShippingAddressChange,G=c.onShippingRateChange,L=c.onSavedPaymentMethodRemove,j=c.onSavedPaymentMethodUpdate,W=m4("mounts <".concat(i,">")),z="elements"in W?W.elements:null,re="checkoutState"in W?W.checkoutState:null,ne=(re==null?void 0:re.type)==="success"||(re==null?void 0:re.type)==="loading"?re.sdk:null,oe=ye.useState(null),U=Lj(oe,2),J=U[0],de=U[1],ie=ye.useRef(null),C=ye.useRef(null);Vr(J,"blur",y),Vr(J,"focus",v),Vr(J,"escape",x),Vr(J,"click",k),Vr(J,"loaderror",N),Vr(J,"loaderstart",R),Vr(J,"networkschange",H),Vr(J,"confirm",F),Vr(J,"cancel",M),Vr(J,"shippingaddresschange",I),Vr(J,"shippingratechange",G),Vr(J,"savedpaymentmethodremove",L),Vr(J,"savedpaymentmethodupdate",j),Vr(J,"change",w);var q;_&&(e==="expressCheckout"?q=_:q=function(){_(J)}),Vr(J,"ready",q),ye.useLayoutEffect(function(){if(ie.current===null&&C.current!==null&&(z||ne)){var Q=null;if(ne){var ee=ne,le=ne;switch(e){case"paymentForm":Q=le.createForm(h);break;case"payment":Q=ee.createPaymentElement(h);break;case"address":if("mode"in h){var me=h.mode,pe=aee(h,yee);if(me==="shipping")Q=ee.createShippingAddressElement(pe);else if(me==="billing")Q=ee.createBillingAddressElement(pe);else throw new Error("Invalid options.mode. mode must be 'billing' or 'shipping'.")}else throw new Error("You must supply options.mode. mode must be 'billing' or 'shipping'.");break;case"expressCheckout":Q=ee.createExpressCheckoutElement(h);break;case"currencySelector":Q=ne.createCurrencySelectorElement();break;case"taxId":Q=ee.createTaxIdElement(h);break;case"contactDetails":Q=ee.createContactDetailsElement();break;default:throw new Error("<".concat(i,"> is not supported inside a checkout provider. Use an <Elements> provider instead."))}}else z&&(Q=z.create(e,h));ie.current=Q,de(Q),Q&&Q.mount(C.current)}},[z,ne,h]);var X=Nb(h);return ye.useEffect(function(){if(ie.current){var Q=pee(h,X,["paymentRequest"]);Q&&"update"in ie.current&&ie.current.update(Q)}},[h,X]),ye.useLayoutEffect(function(){return function(){if(ie.current&&typeof ie.current.destroy=="function")try{ie.current.destroy(),ie.current=null}catch{}}},[]),ye.createElement("div",{id:u,className:d,ref:C})},a=function(c){m4("mounts <".concat(i,">"));var u=c.id,d=c.className;return ye.createElement("div",{id:u,className:d})},o=n?a:s;return o.propTypes={id:zn.string,className:zn.string,onChange:zn.func,onBlur:zn.func,onFocus:zn.func,onReady:zn.func,onEscape:zn.func,onClick:zn.func,onLoadError:zn.func,onLoaderStart:zn.func,onNetworksChange:zn.func,onConfirm:zn.func,onCancel:zn.func,onShippingAddressChange:zn.func,onShippingRateChange:zn.func,onSavedPaymentMethodRemove:zn.func,onSavedPaymentMethodUpdate:zn.func,options:zn.object},o.displayName=i,o.__elementType=e,o},Hn=typeof window>"u",j5=ye.createContext(null);j5.displayName="EmbeddedCheckoutProviderContext";var Dj=function(){var e=ye.useContext(j5);if(!e)throw new Error("<EmbeddedCheckout> must be used within <EmbeddedCheckoutProvider>");return e},bee="Invalid prop `stripe` supplied to `EmbeddedCheckoutProvider`. We recommend using the `loadStripe` utility from `@stripe/stripe-js`. See https://stripe.com/docs/stripe-js/react#elements-props-stripe for details.",xee=function(e){var n=e.stripe,r=e.options,i=e.children,s=ye.useMemo(function(){return mee(n,bee)},[n]),a=ye.useRef(null),o=ye.useRef(null),l=ye.useState({embeddedCheckout:null}),c=Lj(l,2),u=c[0],d=c[1];ye.useEffect(function(){if(!(o.current||a.current)){var y=function(_){o.current||a.current||(o.current=_,a.current=o.current.createEmbeddedCheckoutPage(r).then(function(w){d({embeddedCheckout:w})}))};s.tag==="async"&&!o.current&&(r.clientSecret||r.fetchClientSecret)?s.str
587ipePromise.then(function(v){v&&y(v)}):s.tag==="sync"&&!o.current&&(r.clientSecret||r.fetchClientSecret)&&y(s.stripe)}},[s,r,u,o]),ye.useEffect(function(){return function(){u.embeddedCheckout?(a.current=null,u.embeddedCheckout.destroy()):a.current&&a.current.then(function(){a.current=null,u.embeddedCheckout&&u.embeddedCheckout.destroy()})}},[u.embeddedCheckout]),ye.useEffect(function(){gee(o)},[o]);var f=Nb(n);ye.useEffect(function(){f!==null&&f!==n&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the `stripe` prop after setting it.")},[f,n]);var h=Nb(r);return ye.useEffect(function(){if(h!=null){if(r==null){console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot unset options after setting them.");return}r.clientSecret===void 0&&r.fetchClientSecret===void 0&&console.warn("Invalid props passed to EmbeddedCheckoutProvider: You must provide one of either `options.fetchClientSecret` or `options.clientSecret`."),h.clientSecret!=null&&r.clientSecret!==h.clientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the client secret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),h.fetchClientSecret!=null&&r.fetchClientSecret!==h.fetchClientSecret&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change fetchClientSecret after setting it. Unmount and create a new instance of EmbeddedCheckoutProvider instead."),h.onComplete!=null&&r.onComplete!==h.onComplete&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onComplete option after setting it."),h.onShippingDetailsChange!=null&&r.onShippingDetailsChange!==h.onShippingDetailsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onShippingDetailsChange option after setting it."),h.onLineItemsChange!=null&&r.onLineItemsChange!==h.onLineItemsChange&&console.warn("Unsupported prop change on EmbeddedCheckoutProvider: You cannot change the onLineItemsChange option after setting it.")}},[h,r]),ye.createElement(j5.Provider,{value:u},i)},_ee=function(e){var n=e.id,r=e.className,i=Dj(),s=i.embeddedCheckout,a=ye.useRef(!1),o=ye.useRef(null);return ye.useLayoutEffect(function(){return!a.current&&s&&o.current!==null&&(s.mount(o.current),a.current=!0),function(){if(a.current&&s)try{s.unmount(),a.current=!1}catch{}}},[s]),ye.createElement("div",{ref:o,id:n,className:r})},See=function(e){var n=e.id,r=e.className;return Dj(),ye.createElement("div",{id:n,className:r})},kee=Hn?See:_ee;Xn("auBankAccount",Hn);Xn("card",Hn);Xn("cardNumber",Hn);Xn("cardExpiry",Hn);Xn("cardCvc",Hn);Xn("iban",Hn);Xn("payment",Hn);Xn("expressCheckout",Hn);Xn("paymentRequestButton",Hn);Xn("linkAuthentication",Hn);Xn("contactDetails",Hn);Xn("address",Hn);Xn("shippingAddress",Hn);Xn("paymentMethodMessaging",Hn);Xn("taxId",Hn);Xn("issuingCardNumberDisplay",Hn);Xn("issuingCardCvcDisplay",Hn);Xn("issuingCardExpiryDisplay",Hn);Xn("issuingCardPinDisplay",Hn);Xn("issuingCardCopyButton",Hn);function Zg(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Zg=function(e){return typeof e}:Zg=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Zg(t)}var Mj="dahlia",Eee=function(e){return e===3?"v3":e},Fj="https://js.stripe.com",Nee="".concat(Fj,"/").concat(Mj,"/stripe.js"),Aee=/^https:\/\/js\.stripe\.com\/v3\/?(\?.*)?$/,Cee=/^https:\/\/js\.stripe\.com\/(v3|[a-z]+)\/stripe\.js(\?.*)?$/,g4="loadStripe.setLoadParameters was called but an existing Stripe.js script already exists in the document; existing script parameters will be used",Pee=function(e){return Aee.test(e)||Cee.test(e)},Tee=function(){for(var e=document.querySelectorAll('script[src^="'.concat(Fj,'"]')),n=0;n<e.length;n++){var r=e[n];if(Pee(r.src))return r}return null},v4=function(e){var n="",r=document.createElement("script");r.src="".concat(Nee).concat(n);var i=document.head||document.body;if(!i)throw new Error("Expected document.body not to be null. Stripe.js requires a <body> element.");return i.appendChild(r),r},Ree=function(e,n){!e||!e._registerWrapper||e._registerWrapper({name:"stripe-js",version:"9.2.0",startTime:n})}
587,Lh=null,bg=null,xg=null,Lee=function(e){return function(n){e(new Error("Failed to load Stripe.js",{cause:n}))}},jee=function(e,n){return function(){window.Stripe?e(window.Stripe):n(new Error("Stripe.js not available"))}},Oee=function(e){return Lh!==null?Lh:(Lh=new Promise(function(n,r){if(typeof window>"u"||typeof document>"u"){n(null);return}if(window.Stripe&&e&&console.warn(g4),window.Stripe){n(window.Stripe);return}try{var i=Tee();if(i&&e)console.warn(g4);else if(!i)i=v4(e);else if(i&&xg!==null&&bg!==null){var s;i.removeEventListener("load",xg),i.removeEventListener("error",bg),(s=i.parentNode)===null||s===void 0||s.removeChild(i),i=v4(e)}xg=jee(n,r),bg=Lee(r),i.addEventListener("load",xg),i.addEventListener("error",bg)}catch(a){r(a);return}}),Lh.catch(function(n){return Lh=null,Promise.reject(n)}))},Iee=function(e,n,r){if(e===null)return null;var i=n[0];if(typeof i!="string")throw new Error("Expected publishable key to be of type string, got type ".concat(Zg(i)," instead."));var s=i.match(/^pk_test/),a=Eee(e.version),o=Mj;s&&a!==o&&console.warn("Stripe.js@".concat(a," was loaded on the page, but @stripe/stripe-js@").concat("9.2.0"," expected Stripe.js@").concat(o,". This may result in unexpected behavior. For more information, see https://docs.stripe.com/sdks/stripejs-versioning"));var l=e.apply(void 0,n);return Ree(l,r),l},jh,zj=!1,$j=function(){return jh||(jh=Oee(null).catch(function(e){return jh=null,Promise.reject(e)}),jh)};Promise.resolve().then(function(){return $j()}).catch(function(t){zj||console.warn(t)});var Dee=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];zj=!0;var i=Date.now();return $j().then(function(s){return Iee(s,n,i)})};const Za="pk_live_51MWK9hEymcNfZzcIdjVwCIdw9a1ktUqIu6G5T8j4m5ovmSfGQIK29rsiyKSSmAm8Evpsd1AnjuggqecXwjBX5F1800gYJsHKFc";function Uj(){if(Za!=null&&Za.startsWith("pk_test_"))return"sandbox";if(Za!=null&&Za.startsWith("pk_live_"))return"live";throw new Error("Pagamenti non configurati. Completa il setup Stripe in Lovable per abilitare il checkout.")}let S2=null;function Mee(){return S2||(Uj(),S2=Dee(Za)),S2}function Bj(){return Uj()}function Fee(){return Za.startsWith("pk_test_")||Za.startsWith("pk_live_")}function zee({priceId:t,returnUrl:e}){const n=async()=>{const{data:r,error:i}=await aa.functions.invoke("create-checkout",{body:{priceId:t,environment:Bj(),returnUrl:e||`${window.location.origin}/checkout/return?session_id={CHECKOUT_SESSION_ID}`}});if(i||!(r!=null&&r.clientSecret))throw new Error((i==null?void 0:i.message)||(r==null?void 0:r.error)||"Impossibile creare la sessione di checkout");return r.clientSecret};return m.jsx("div",{id:"checkout",className:"min-h-[500px]",children:m.jsx(xee,{stripe:Mee(),options:{fetchClientSecret:n},children:m.jsx(kee,{})})})}const $ee=()=>{const t=Oc(),{toast:e}=Tc(),{t:n}=Er(),{user:r}=zd(),{plan:i,subscribed:s,refresh:a}=Rp(),[o,l]=E.useState(null),[c,u]=E.useState(null),d=[{id:"base",priceId:"base_monthly",name:n("pricing.basePlan.name"),price:"9â¬",highlight:!1,features:n("pricing.basePlan.features",{returnObjects:!0})},{id:"pro",priceId:"pro_monthly",name:n("pricing.proPlan.name"),price:"29â¬",highlight:!0,features:n("pricing.proPlan.features",{returnObjects:!0})}],f=async(h,y)=>{if(!r){t("/auth");return}if(!Fee()){e({title:n("toast.paymentsNotConfigured"),description:n("toast.paymentsNotConfiguredDesc"),variant:"destructive"});return}if(s&&i&&i!==h){l(h);try{const{data:v,error:_}=await aa.functions.invoke("create-checkout",{body:{priceId:y,environment:Bj()}});if(_)throw _;if(v!=null&&v.upgraded)e({title:n("toast.planUpgraded"),description:n("toast.planUpgradedDesc",{plan:h==="pro"?"Pro":"Base"})}),await a();else if(v!=null&&v.error)throw new Error(v.error)}catch(v){e({title:n("toast.error"),description:v.message,variant:"destructive"})}finally{l(null)}return}u(y)};return m.jsxs("div",{className:"flex flex-col min-h-screen bg-background",children:[m.jsx(QQ,{}),m.jsx(ma,{}),m.jsx("main",{className:"flex-1 pt-32 pb-20",children:m.jsxs("div",{className:"container px-4 md:px-6",children:[m.jsxs("div",{className:"text-center mb-12",children:[m.jsx("div",{className:"inline-flex items-center gap-2 px-5 py-2 rounded-full bg-accent/10 border border-accent/40 text-sm font-bold neon-text-magenta mb-6",children:n("madeInItaly.pricing")}),m.jsx("h1",{className:"text-4xl md:text-6xl font-bold neon-text-cyan mb-4",children:n("pricing.title")}),m.jsx("p",{className:"text-lg text-muted-foreground max-w-2xl mx-auto",children:n("pricing.subtitle")})]}),m.jsx("div",{className:"grid md:grid-cols-2 gap-8 max-w-4xl mx-auto",children:d.map(h=>{const y=s&&i===h.id,v=s&&i&&i!==h.id;return m.jsxs("div",{className:`glass rounded-2xl p-8 border ${h.highlight?"border-primary shadow-[0_0_40px_hsl(166,100%,50%,0.3)]":"border-primary/20"}`,children:[h.highlight&&m.jsx("div",{className:"inline-block px-3 py-1 rounded-full bg-primary/20 text-primary text-xs font-bold mb-4",children:n("pricing.popular")}),m.jsx("h2",{className:"text-2xl font-bold mb-2",children:h.name}),m.jsxs("div",{className:"mb-6",children:[m.jsx("span",{className:"text-5xl font-bold neon-text-cyan",children:h.price}),m.jsx("span",{className:"text-muted-foreground",children:n("pricing.month")})]}),m.jsx("ul",{className:"space-y-3 mb-8",children:h.features.map(_=>m.jsxs("li",{className:"flex items-start gap-2 text-sm",children:[m.jsx(Ax,{className:"h-5 w-5 text-primary shrink-0 mt-0.5"}),m.jsx("span",{children:_})]},_))}),m.jsxs(En,{className:"w-full",variant:h.highlight?"default":"outline",disabled:o===h.id||y,onClick:()=>f(h.id,h.priceId),children:[o===h.id&&m.jsx(Tx,{className:"mr-2 h-4 w-4 animate-spin"}),y?n("pricing.active"):v?n("pricing.switchTo",{plan:h.name}):n("pricing.activate",{plan:h.name})]})]}
587,h.id)})}),m.jsx("p",{className:"text-center text-sm text-muted-foreground mt-8",children:n("pricing.secure")})]})}),m.jsx(ga,{}),m.jsx(kj,{open:!!c,onOpenChange:h=>!h&&u(null),children:m.jsxs(L5,{className:"max-w-3xl max-h-[90vh] overflow-y-auto",children:[m.jsx(Nj,{children:m.jsx(Aj,{children:n("pricing.checkoutTitle")})}),c&&m.jsx(zee,{priceId:c})]})})]})},Uee=()=>{const[t]=F$(),e=t.get("session_id"),{refresh:n}=Rp();return E.useEffect(()=>{const r=setTimeout(()=>n(),1500);return()=>clearTimeout(r)},[n]),m.jsxs("div",{className:"flex flex-col min-h-screen bg-background",children:[m.jsx(ma,{}),m.jsx("main",{className:"flex-1 pt-32 pb-20",children:m.jsxs("div",{className:"container px-4 md:px-6 max-w-2xl mx-auto text-center",children:[m.jsx(Y7,{className:"w-20 h-20 mx-auto text-emerald-400 mb-6"}),m.jsx("h1",{className:"text-4xl md:text-5xl font-bold neon-text-cyan mb-4",children:"Pagamento completato!"}),m.jsx("p",{className:"text-lg text-muted-foreground mb-8",children:"Il tuo abbonamento è attivo. Puoi iniziare subito ad analizzare i tuoi siti."}),e&&m.jsxs("p",{className:"text-xs text-muted-foreground/60 mb-8",children:["Riferimento: ",e]}),m.jsxs("div",{className:"flex gap-4 justify-center flex-wrap",children:[m.jsx(En,{asChild:!0,size:"lg",className:"btn-neon-cyan",children:m.jsx(_r,{to:"/",children:"Inizia un'analisi"})}),m.jsx(En,{asChild:!0,size:"lg",variant:"outline",children:m.jsx(_r,{to:"/pricing",children:"Vedi il mio piano"})})]})]})}),m.jsx(ga,{})]})},Bee=()=>{const t=jc();return E.useEffect(()=>{console.error("404 Error: User attempted to access non-existent route:",t.pathname)},[t.pathname]),m.jsx("div",{className:"min-h-screen flex items-center justify-center bg-gray-100",children:m.jsxs("div",{className:"text-center",children:[m.jsx("h1",{className:"text-4xl font-bold mb-4",children:"404"}),m.jsx("p",{className:"text-xl text-gray-600 mb-4",children:"Oops! Page not found"}),m.jsx("a",{href:"/",className:"text-blue-500 hover:text-blue-700 underline",children:"Return to Home"})]})})},qee=()=>{const[t,e]=E.useState(!1),[n,r]=E.useState(!1);E.useEffect(()=>{if(!localStorage.getItem("bookPopupShown")){const a=setTimeout(()=>{e(!0),setTimeout(()=>{r(!0)},5e3)},5e3);return()=>{clearTimeout(a)}}},[]);const i=()=>{n&&(e(!1),localStorage.setItem("bookPopupShown","true"))};return m.jsx(kj,{open:t,onOpenChange:i,children:m.jsx(L5,{className:"sm:max-w-md border-0 p-0 gap-0 bg-transparent shadow-none",children:m.jsxs("div",{className:"relative bg-gradient-to-br from-blue-500 to-blue-700 text-white rounded-lg shadow-lg overflow-hidden",children:[m.jsx("div",{className:"absolute top-2 right-2",children:n&&m.jsxs("button",{onClick:i,className:"rounded-full bg-white/10 p-1 text-white hover:bg-white/20 transition-colors",children:[m.jsx(jd,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Chiudi"})]})}),m.jsxs("div",{className:"grid md:grid-cols-2 gap-4 p-6",children:[m.jsx("div",{className:"flex items-center justify-center",children:m.jsx("a",{href:"https://amzn.to/4clhoJl",target:"_blank",rel:"noopener noreferrer",className:"block hover:opacity-90 transition-opacity",children:m.jsx("img",{src:"/lovable-uploads/15a4d1dd-d061-4421-869b-7ae2391c4438.png",alt:"Libro AEO: la nuova frontiera della SEO",className:"max-w-full h-auto rounded-md shadow-md"})})}),m.jsxs("div",{className:"flex flex-col justify-center space-y-4",children:[m.jsx("h3",{className:"text-xl font-bold",children:"AEO: La Nuova Frontiera della SEO"}),m.jsx("p",{className:"text-white/90 text-sm",children:"Il primo libro in italiano sull'Answer Engine Optimization (AEO)! Scopri come ottimizzare i tuoi contenuti per i motori di risposta come ChatGPT, Perplexity e Google SGE."}),m.jsx("div",{className:"pt-2",children:m.jsx("a",{href:"https://amzn.to/4clhoJl",target:"_blank",rel:"noopener noreferrer",className:"inline-block bg-white text-blue-700 font-medium rounded-md px-4 py-2 text-sm hover:bg-white/90 transition-colors",children:"Acquista su Amazon"})}),m.jsx("p",{className:"text-xs text-white/70 mt-2",children:n?"Puoi chiudere questo popup":"Attendi un attimo prima di chiudere..."})]})]})]})})})},Hee=()=>{const[t,e]=E.useState("light"),{t:n}=Er();E.useEffect(()=>{const s=localStorage.getItem("theme");s?(e(s),document.documentElement.classList.toggle("dark",s==="dark")):window.matchMedia("(prefers-color-scheme: dark)").matches&&(e("dark"),document.documentElement.classList.add("dark"))},[]);const r=()=>{const s=t==="light"?"dark":"light";e(s),document.documentElement.classList.toggle("dark",s==="dark"),localStorage.setItem("theme",s)},i=n(t==="light"?"theme.enable":"theme.disable");return m.jsxs(En,{variant:"outline",size:"icon",onClick:r,className:"fixed bottom-4 left-1/2 transform -translate-x-1/2 z-50 rounded-full w-auto px-4 gap-2 bg-background border-primary shadow-md",title:i,children:[t==="light"?m.jsx(sD,{className:"h-4 w-4"}):m.jsx(uD,{className:"h-4 w-4"}),m.jsx("span",{className:"text-xs sm:text-sm",children:i})]})},y4="https://aeoanalyzer.it",_g=(t,e,n)=>{const r=document.head.querySelector(t);r&&r.setAttribute(e,n)},w4=(t,e,n)=>{const r=e?`link[rel="${t}"][hreflang="${e}"]`:`link[rel="${t}"]:not([hreflang])`;let i=document.head.querySelector(r);i||(i=document.createElement("link"),i.rel=t,e&&(i.hreflang=e),document.head.appendChild(i)),i.href=n},Wee=()=>{const{t,i18n:e}=Er(),n=(e.resolvedLanguage||e.language||"it").slice(0,2);return E.useEffect(()=>{document.documentElement.lang=n;const r=t("meta.title"),i=t("meta.description");document.title=r,_g('meta[name="description"]',"content",i),_g('meta[property="og:title"]',"content",r),_g('meta[property="og:description"]',"content",i),_g('meta[property="og:locale"]',"content",n==="it"?"it_IT":n==="es"?"es_ES":"en_US");const s=window.location.pathname+window.location.search;["it","en","es"].forEach(a=>w4("alternate",a,`${y4}${s}?lng=${a}`)),w4("alternate","x-default",`${y4}${s}`)},[n,t]),null},Vee=new Dz,Gee=()=>m.jsx(Fz,{client:Vee,children:m.jsx(eW,{children:m.jsxs(pz,{children:[m.jsx(eM,{}),m.jsx(PM,{}),m.jsxs(O$,{children:[m.jsx(Wee,{}),m.jsxs(N$,{children:[m.jsx(Vi,{path:"/",element:m.jsx(uG,{})}),m.jsx(Vi,{path:"/report",element:m.jsx(zX,{})}),m.jsx(Vi,{path:"/features",element:m.jsx($X,{})}),m.jsx(Vi,{path:"/pricing",element:m.jsx($ee,{})}),m.jsx(Vi,{path:"/checkout/return",element:m.jsx(Uee,{})}),m.jsx(Vi,{path:"/auth",element:m.jsx(ZQ,{})}),m.jsx(Vi,{path:"/contact",element:m.jsx(qQ,{})}),m.jsx(Vi,{path:"/terms",element:m.jsx(HQ,{})}),m.jsx(Vi,{path:"/privacy",element:m.jsx(WQ,{})}),m.jsx(Vi,{path:"/sitemap",element:m.jsx(VQ,{})}),m.jsx(Vi,{path:"*",element:m.jsx(Bee,{})})]}),m.jsx(qee,{}),m.jsx(Hee,{})]})]})})}),{slice:Kee,forEach:Zee}=[];
vendor: 1,049 bytes, line 587
587function Yee(t){return Zee.call(Kee.call(arguments,1),e=>{if(e)for(const n in e)t[n]===void 0&&(t[n]=e[n])}),t}function Jee(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(n=>n.test(t))}const b4=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,Xee=function(t,e){const r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let s=`${t}=${i}`;if(r.maxAge>0){const a=r.maxAge-0;if(Number.isNaN(a))throw new Error("maxAge should be a Number");s+=`; Max-Age=${Math.floor(a)}`}if(r.domain){if(!b4.test(r.domain))throw new TypeError("option domain is invalid");s+=`; Domain=${r.domain}`}if(r.path){if(!b4.test(r.path))throw new TypeError("option path is invalid");s+=`; Path=${r.path}`}if(r.expires){if(typeof r.expires.toUTCString!="function")throw new TypeError("option expires is invali
587d");s+=`; Expires=${r.expires.toUTCString()}`}if(r.httpOnly&&(s+="; HttpOnly"),r.secure&&(s+="; Secure"),r.sameSite)switch(typeof r.sameSite=="string"?r.sameSite.toLowerCase():r.sameSite){case!0:s+="; SameSite=Strict";break;case"lax":s+="; SameSite=Lax";break;case"strict":s+="; SameSite=Strict";break;case"none":s+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return r.partitioned&&(s+="; Partitioned"),s},x4={create(t,e,n,r){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+n*60*1e3)),r&&(i.domain=r),document.cookie=Xee(t,e,i)},read(t){const e=`${t}=`,n=document.cookie.split(";");for(let r=0;r<n.length;r++){let i=n[r];for(;i.charAt(0)===" ";)i=i.substring(1,i.length);if(i.indexOf(e)===0)return i.substring(e.length,i.length)}return null},remove(t,e){this.create(t,"",-1,e)}};var Qee={name:"cookie",lookup(t){let{lookupCookie:e}=t;if(e&&typeof document<"u")return x4.read(e)||void 0},cacheUserLanguage(t,e){let{lookupCookie:n,cookieMinutes:r,cookieDomain:i,cookieOptions:s}=e;n&&typeof document<"u"&&x4.create(n,t,r,i,s)}},ete={name:"querystring",lookup(t){var r;let{lookupQuerystring:e}=t,n;if(typeof window<"u"){let{search:i}=window.location;!window.location.search&&((r=window.location.hash)==null?void 0:r.indexOf("?"))>-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const a=i.substring(1).split("&");for(let o=0;o<a.length;o++){const l=a[o].indexOf("=");l>0&&a[o].substring(0,l)===e&&(n=a[o].substring(l+1))}}return n}},tte={name:"hash",lookup(t){var i;let{lookupHash:e,lookupFromHashIndex:n}=t,r;if(typeof window<"u"){const{hash:s}=window.location;if(s&&s.length>2){const a=s.substring(1);if(e){const o=a.split("&");for(let l=0;l<o.length;l++){const c=o[l].indexOf("=");c>0&&o[l].substring(0,c)===e&&(r=o[l].substring(c+1))}}if(r)return r;if(!r&&n>-1){const o=s.match(/\/([a-zA-Z-]*)/g);return Array.isArray(o)?(i=o[typeof n=="number"?n:0])==null?void 0:i.replace("/",""):void 0}}}return r}};let hu=null;const _4=()=>{if(hu!==null)return hu;try{if(hu=typeof window<"u"&&window.localStorage!==null,!hu)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{hu=!1}return hu};var nte={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&_4())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:n}=e;n&&_4()&&window.localStorage.setItem(n,t)}};let fu=null;const S4=()=>{if(fu!==null)return fu;try{if(fu=typeof window<"u"&&window.sessionStorage!==null,!fu)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{fu=!1}return fu};var rte={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&S4())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:n}=e;n&&S4()&&window.sessionStorage.setItem(n,t)}},ite={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:n,userLanguage:r,language:i}=navigator;if(n)for(let s=0;s<n.length;s++)e.push(n[s]);r&&e.push(r),i&&e.push(i)}return e.length>0?e:void 0}},ste={name:"htmlTag",lookup(t){let{htmlTag:e}=t,n;const r=e||(typeof document<"u"?document.documentElement:null);return r&&typeof r.getAttribute=="function"&&(n=r.getAttribute("lang")),n}},ate={name:"path",lookup(t){var i;let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(n)?(i=n[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},ote={name:"subdomain",lookup(t){var i,s;let{lookupFromSubdomainIndex:e}=t;const n=typeof e=="number"?e+1:1,r=typeof window<"u"&&((s=(i=window.location)==null?void 0:i.hostname)==null?void 0:s.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(r)return r[n]}};let qj=!1;try{document.cookie,qj=!0}catch{}const Hj=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];qj||Hj.splice(1,1);const lte=()=>({order:Hj,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class Wj{constructor(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,n)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=Yee(n,this.options||{},lte()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=r,this.addDetector(Qee),this.addDetector(ete),this.addDetector(nte),this.addDetector(rte),this.addDetector(ite),this.addDetector(ste),this.addDetector(ate),this.addDetector(ote),this.addDetector(tte)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,n=[];return e.forEach(r=>{if(this.detectors[r]){let i=this.detectors[r].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(n=n.concat(i))}}),n=n.filter(r=>r!=null&&!Jee(r)).map(r=>this.options.convertDetectedLanguage(r)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}
587cacheUserLanguage(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;n&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||n.forEach(r=>{this.detectors[r]&&this.detectors[r].cacheUserLanguage(e,this.options)}))}}Wj.type="languageDetector";const cte={title:"AEO Analyzer â Ottimizzazione per ChatGPT, Claude, Perplexity, Copilot, Gemini, Grok",description:"Analizza il tuo sito e ottimizzalo per i motori di risposta AI: ChatGPT, Claude (Anthropic), Perplexity, Microsoft Copilot, Google Gemini / AI Overviews e Grok."},ute={analyze:"Analizza",features:"Funzionalità ",pricing:"Prezzi",news:"News",contact:"Contatti",login:"Accedi",logout:"Esci",menu:"Apri menu",close:"Chiudi menu"},dte={proUnlimited:"Pro · illimitate",baseRemaining:"Base · {{count}} rimaste"},hte={hero:"ð®ð¹ Sviluppato in Italia",footer:"Sviluppato con â¤ï¸ in Italia",pricing:"ð®ð¹ Made in Italy â Sviluppato in Italia"},fte={badge:"La prima piattaforma italiana di analisi AEO",title1:"Analizza e",title2:"Migliora il tuo AEO",subtitle:"Scopri come ottimizzare il tuo sito per i motori di risposta come",engines:{chatgpt:"ChatGPT",claude:"Claude",perplexity:"Perplexity",copilot:"Microsoft Copilot",gemini:"Google Gemini",grok:"Grok"},and:"e",placeholder:"Es. https://esempio.com",pricingLink:"Da 9â¬/mese",alert:"Analisi reale con AI (Gemini) su title, meta, schema, contenuto e citabilità . Serve un abbonamento attivo per avviare l'analisi."},pte={placeholder:"https://iltuosito.com",button:"Analizza",analyzing:"Analisi in corso..."},mte={invalidUrlTitle:"URL non valido",invalidUrlDesc:"Inserisci un URL completo che inizia con http:// o https://",loginRequiredTitle:"Accedi per continuare",loginRequiredDesc:"Registrati o accedi per avviare un'analisi.",planRequiredTitle:"Serve un piano attivo",planRequiredDesc:"Scegli Base o Pro per avviare l'analisi.",quotaExhaustedTitle:"Analisi mensili esaurite",quotaExhaustedDesc:"Passa al piano Pro per analisi illimitate.",missingUrl:"URL mancante",missingUrlDesc:"Nessun URL fornito.",welcomeBack:"Bentornato",accountCreated:"Account creato",accountCreatedDesc:"Ora puoi scegliere un piano.",error:"Errore",invalidCredentials:"Credenziali non valide",planUpgraded:"Piano aggiornato!",planUpgradedDesc:"Sei passato al piano {{plan}} con addebito proporzionale.",paymentsNotConfigured:"Pagamenti non configurati",paymentsNotConfiguredDesc:"Completa il setup Stripe in Lovable per abilitare i pagamenti.",contactErrorSend:"Errore nell'invio del messaggio. Riprova più tardi.",contactGenericError:"Si è verificato un errore. Riprova più tardi.",contactSuccess:"Messaggio inviato con successo!"},gte={kicker:"I Numeri",title1:"La nostra",title2:"crescita",urls:"URL Analizzati",users:"Utenti Soddisfatti",satisfaction:"Tasso di Soddisfazione",avgTime:"Secondi Tempo Medio"},vte={kicker:"Funzionalità ",title1:"Tutto ciò che serve per",title2:"ottimizzare",subtitle:"AEO Analyzer valuta gli elementi chiave che determinano se il tuo contenuto verrà utilizzato dai nuovi motori di risposta AI.",cards:{content:{title:"Analisi Qualità Contenuto",desc:"Verifica se il contenuto è approfondito e risponde a domande specifiche."},cite:{title:"Valutazione Citabilità ",desc:"Analisi della presenza di fonti, citazioni e riferimenti esterni."},factual:{title:"Accuratezza Fattuale",desc:"Controllo dell'affidabilità e verificabilità delle informazioni."},structured:{title:"Analisi Dati Strutturati",desc:"Verifica dello Schema markup e dei dati macchina-leggibili."},readability:{title:"Leggibilità del Testo",desc:"Controllo della facilità di comprensione e chiarezza del contenuto."},llm:{title:"Ottimizzazione per LLM",desc:"Analisi della compatibilità con ChatGPT, Claude, Copilot, Gemini e Grok con suggerimenti mirati."},report:{title:"Report Completo AEO",desc:"Punteggio complessivo e suggerimenti per ottimizzare per i motori di risposta."}},pageHero:{kicker:"Funzionalità ",title1:"Tutto il potere di",title2:"AEO Analyzer",subtitle:"Scopri come AEO Analyzer ti aiuta a ottimizzare i tuoi contenuti per i motori di risposta AI moderni."},why:{title1:"Perché l'ottimizzazione",title2:"AEO",title3:"è importante",desc:"Con l'avvento di motori di risposta come ChatGPT, Claude, Perplexity, Copilot, Gemini e Grok, la SEO tradizionale non basta più. AEO Analyzer rende i tuoi contenuti più rilevanti, affidabili e citabili da questi sistemi.",cta:"Inizia l'analisi"},how:{kicker:"Come Funziona",title1:"Tre semplici",title2:"passaggi",s1t:"Inserisci l'URL",s1d:"Incolla l'URL della pagina che desideri analizzare per l'ottimizzazione AEO.",s2t:"Analisi Completa",s2d:"I nostri algoritmi analizzano il contenuto secondo i criteri di ottimizzazione AEO.",s3t:"Report Dettagliato",s3d:"Ricevi un report completo con valutazioni e suggerimenti pratici."},extraCard:{title:"Integrazione AI Avanzata",desc:"Algoritmi di intelligenza artificiale che analizzano il tuo contenuto come farebbe un motore di risposta."}},yte={kicker:"Inizia ora",title1:"Pronto a ottimizzare per i",title2:"motori di risposta AI?",subtitle:"Ottieni sub
587ito un'analisi AEO completa del tuo sito e scopri come migliorarlo per ChatGPT, Claude, Perplexity, Copilot, Gemini e Grok."},wte=["ANALISI AEO","CHATGPT","CLAUDE","PERPLEXITY","COPILOT","GEMINI","GROK","AI OVERVIEWS","OTTIMIZZAZIONE","CONTENUTI AI","SCHEMA.ORG"],bte={title:"Piani e Prezzi",subtitle:"Analizza il tuo sito con AI reale. Scegli il piano adatto a te.",popular:"PIà POPOLARE",month:"/mese",active:"Piano attivo",switchTo:"Passa a {{plan}}",activate:"Attiva {{plan}}",secure:"Pagamento sicuro con Stripe. Puoi annullare quando vuoi dal portale clienti.",checkoutTitle:"Completa il pagamento",basePlan:{name:"Base",features:["5 analisi AEO complete al mese","Analisi con AI reale (Gemini)","Report dettagliato + suggerimenti","Storico analisi","Export PDF e LLM.txt"]},proPlan:{name:"Pro",features:["Analisi illimitate","Analisi con AI reale (Gemini)","Report dettagliato + suggerimenti","Storico analisi illimitato","Export PDF e LLM.txt","Supporto prioritario"]}},xte={signinTitle:"Accedi",signupTitle:"Crea account",signinSub:"Entra per avviare un'analisi.",signupSub:"Registrati per attivare il tuo piano.",email:"Email",password:"Password",signin:"Accedi",signup:"Registrati",noAccount:"Non hai un account?",hasAccount:"Hai già un account?",seePlans:"Vedi i piani"},_te={kicker:"Contatti",title1:"Parliamo del tuo",title2:"progetto",subtitle:"Hai domande o suggerimenti? Siamo qui per aiutarti a ottimizzare i tuoi contenuti per i motori di risposta AI.",sendMessage:"Invia un messaggio",name:"Nome",namePlaceholder:"Il tuo nome",email:"Email",emailPlaceholder:"La tua email",message:"Messaggio",messagePlaceholder:"Il tuo messaggio",submit:"Invia messaggio",submitting:"Invio in corso...",success:"Messaggio Inviato!",successDesc:"Grazie per averci contattato. Ti risponderemo il prima possibile.",another:"Invia un altro messaggio",infoTitle:"Informazioni di contatto",infoDesc:"Puoi contattarci attraverso il modulo o direttamente tramite i canali sottostanti.",location:"Sede",locationValue:"Catania, Italia",hours:"Orari",hoursValue:"Lun - Ven: 9:00 - 18:00",errors:{nameRequired:"Il nome è obbligatorio",nameMax:"Il nome deve essere inferiore a 100 caratteri",emailInvalid:"Inserisci un'email valida",emailMax:"L'email deve essere inferiore a 255 caratteri",messageRequired:"Il messaggio è obbligatorio",messageMax:"Il messaggio deve essere inferiore a 2000 caratteri"}},Ste={tagline:"Ottimizza i tuoi contenuti per ChatGPT, Claude, Perplexity, Copilot, Gemini e Grok con analisi AEO avanzate.",explore:"Esplora",home:"Home",features:"Funzionalità ",pricing:"Piani e Prezzi",contact:"Contatti",news:"News",legal:"Info Legali",terms:"Termini e Condizioni",privacy:"Privacy Policy",sitemap:"Sitemap",contacts:"Contatti",rights:"Tutti i diritti riservati.",madeIn:"Sviluppato con â¤ï¸ in Italia"},kte={banner:{pro:"Piano Pro attivo â analisi illimitate.",base:"Piano Base â {{count}} analisi rimaste questo mese.",none:"Serve un piano attivo per avviare un'analisi.",home:"Torna alla home"},completed:"Analisi AEO completata",reportFor:"Report AEO di",intro:"Ecco i risultati dell'analisi di Answer Engine Optimization. Scorri per vedere tutti i dettagli e i suggerimenti di miglioramento.",schemaTitle:"Analisi Schema.org",retry:"Riprova",home:"Home",seePlans:"Vedi i piani",loading:"Analisi del sito in corso",loadingDesc:"Stiamo esaminando il tuo sito per valutarne l'ottimizzazione AEO. Un momentoâ¦"},Ete={it:"Italiano",en:"English",es:"Español"},Nte={enable:"Attiva la modalità risparmio energetico",disable:"Disattiva la modalità risparmio energetico"},Ate={meta:cte,nav:ute,plan:dte,madeInItaly:hte,hero:fte,urlForm:pte,toast:mte,stats:gte,features:vte,cta:yte,marquee:wte,pricing:bte,auth:xte,contact:_te,footer:Ste,report:kte,language:Ete,theme:Nte},Cte={title:"AEO Analyzer â Optimize for ChatGPT, Claude, Perplexity, Copilot, Gemini, Grok",description:"Analyze your site and optimize it for AI answer engines: ChatGPT, Claude (Anthropic), Perplexity, Microsoft Copilot, Google Gemini / AI Overviews and Grok."},Pte={analyze:"Analyze",features:"Features",pricing:"Pricing",news:"News",contact:"Contact",login:"Sign in",logout:"Sign out",menu:"Open menu",close:"Close menu"},Tte={proUnlimited:"Pro · unlimited",baseRemaining:"Base · {{count}} left"}
587,Rte={hero:"ð®ð¹ Developed in Italy",footer:"Made with â¤ï¸ in Italy",pricing:"ð®ð¹ Made in Italy â Developed in Italy"},Lte={badge:"Italy's AEO analysis platform",title1:"Analyze and",title2:"Boost your AEO",subtitle:"Learn how to optimize your site for answer engines like",engines:{chatgpt:"ChatGPT",claude:"Claude",perplexity:"Perplexity",copilot:"Microsoft Copilot",gemini:"Google Gemini",grok:"Grok"},and:"and",placeholder:"e.g. https://example.com",pricingLink:"From â¬9/month",alert:"Real AI-powered analysis (Gemini) on title, meta, schema, content and citability. An active subscription is required to run an analysis."},jte={placeholder:"https://yoursite.com",button:"Analyze",analyzing:"Analyzing..."},Ote={invalidUrlTitle:"Invalid URL",invalidUrlDesc:"Enter a full URL starting with http:// or https://",loginRequiredTitle:"Sign in to continue",loginRequiredDesc:"Register or log in to start an analysis.",planRequiredTitle:"Active plan required",planRequiredDesc:"Choose Base or Pro to start the analysis.",quotaExhaustedTitle:"Monthly analyses used up",quotaExhaustedDesc:"Upgrade to Pro for unlimited analyses.",missingUrl:"Missing URL",missingUrlDesc:"No URL provided.",welcomeBack:"Welcome back",accountCreated:"Account created",accountCreatedDesc:"You can now pick a plan.",error:"Error",invalidCredentials:"Invalid credentials",planUpgraded:"Plan upgraded!",planUpgradedDesc:"You switched to the {{plan}} plan with prorated billing.",paymentsNotConfigured:"Payments not configured",paymentsNotConfiguredDesc:"Complete Stripe setup in Lovable to enable payments.",contactErrorSend:"Failed to send message. Please try again later.",contactGenericError:"Something went wrong. Please try again later.",contactSuccess:"Message sent successfully!"},Ite={kicker:"The Numbers",title1:"Our",title2:"growth",urls:"URLs Analyzed",users:"Happy Users",satisfaction:"Satisfaction Rate",avgTime:"Seconds Avg Time"},Dte={kicker:"Features",title1:"Everything you need to",title2:"optimize",subtitle:"AEO Analyzer evaluates the key elements that decide whether AI answer engines will surface your content.",cards:{content:{title:"Content Quality Analysis",desc:"Checks whether the content is thorough and answers specific user questions."},cite:{title:"Citability Assessment",desc:"Analyzes sources, citations and external references."},factual:{title:"Factual Accuracy",desc:"Verifies the reliability and verifiability of the information."},structured:{title:"Structured Data Analysis",desc:"Checks Schema markup and machine-readable data."},readability:{title:"Text Readability",desc:"Assesses clarity and ease of understanding."},llm:{title:"LLM Optimization",desc:"Compatibility analysis with ChatGPT, Claude, Copilot, Gemini and Grok with targeted suggestions."},report:{title:"Full AEO Report",desc:"Overall score and recommendations to optimize for answer engines."}},pageHero:{kicker:"Features",title1:"All the power of",title2:"AEO Analyzer",subtitle:"Discover how AEO Analyzer helps you optimize your content for modern AI answer engines."},why:{title1:"Why",title2:"AEO",title3:"optimization matters",desc:"With answer engines like ChatGPT, Claude, Perplexity, Copilot, Gemini and Grok, traditional SEO is no longer enough. AEO Analyzer makes your content more relevant, trustworthy and citable for these systems.",cta:"Start the analysis"},how:{kicker:"How It Works",title1:"Three simple",title2:"steps",s1t:"Enter the URL",s1d:"Paste the URL of the page you want to analyze.",s2t:"Full Analysis",s2d:"Our algorithms evaluate the content against AEO best practices.",s3t:"Detailed Report",s3d:"Get a complete report with scores and actionable suggestions."},extraCard:{title:"Advanced AI Integration",desc:"AI algorithms analyze your content the way an answer engine would."}},Mte={kicker:"Get started",title1:"Ready to optimize for",title2:"AI answer engines?",subtitle:"Get a full AEO analysis of your site and learn how to improve it for ChatGPT, Claude, Perplexity, Copilot, Gemini and Grok."},Fte=["AEO ANALYSIS","CHATGPT","CLAUDE","PERPLEXITY","COPILOT","GEMINI","GROK","AI OVERVIEWS","OPTIMIZATION","AI CONTENT","SCHEMA.ORG"],zte={title:"Plans & Pricing",subt
587itle:"Analyze your site with real AI. Pick the plan that fits you.",popular:"MOST POPULAR",month:"/month",active:"Current plan",switchTo:"Switch to {{plan}}",activate:"Get {{plan}}",secure:"Secure payment with Stripe. Cancel anytime from the customer portal.",checkoutTitle:"Complete your payment",basePlan:{name:"Base",features:["5 full AEO analyses per month","Real AI analysis (Gemini)","Detailed report + suggestions","Analysis history","PDF and LLM.txt export"]},proPlan:{name:"Pro",features:["Unlimited analyses","Real AI analysis (Gemini)","Detailed report + suggestions","Unlimited analysis history","PDF and LLM.txt export","Priority support"]}},$te={signinTitle:"Sign in",signupTitle:"Create account",signinSub:"Log in to start an analysis.",signupSub:"Sign up to activate your plan.",email:"Email",password:"Password",signin:"Sign in",signup:"Sign up",noAccount:"No account?",hasAccount:"Already have an account?",seePlans:"See plans"},Ute={kicker:"Contact",title1:"Let's talk about your",title2:"project",subtitle:"Questions or feedback? We're here to help you optimize your content for AI answer engines.",sendMessage:"Send a message",name:"Name",namePlaceholder:"Your name",email:"Email",emailPlaceholder:"Your email",message:"Message",messagePlaceholder:"Your message",submit:"Send message",submitting:"Sending...",success:"Message Sent!",successDesc:"Thanks for reaching out. We'll get back to you as soon as possible.",another:"Send another message",infoTitle:"Contact information",infoDesc:"Reach out via the form or directly through the channels below.",location:"Location",locationValue:"Catania, Italy",hours:"Hours",hoursValue:"Mon - Fri: 9:00 - 18:00",errors:{nameRequired:"Name is required",nameMax:"Name must be under 100 characters",emailInvalid:"Enter a valid email",emailMax:"Email must be under 255 characters",messageRequired:"Message is required",messageMax:"Message must be under 2000 characters"}},Bte={tagline:"Optimize your content for ChatGPT, Claude, Perplexity, Copilot, Gemini and Grok with advanced AEO analysis.",explore:"Explore",home:"Home",features:"Features",pricing:"Plans & Pricing",contact:"Contact",news:"News",legal:"Legal",terms:"Terms & Conditions",privacy:"Privacy Policy",sitemap:"Sitemap",contacts:"Contact",rights:"All rights reserved.",madeIn:"Made with â¤ï¸ in Italy"},qte={banner:{pro:"Pro plan active â unlimited analyses.",base:"Base plan â {{count}} analyses left this month.",none:"An active plan is required to run an analysis.",home:"Back to home"},completed:"AEO analysis completed",reportFor:"AEO Report for",intro:"Here are the Answer Engine Optimization results. Scroll to see all details and improvement suggestions.",schemaTitle:"Schema.org analysis",retry:"Retry",home:"Home",seePlans:"See plans",loading:"Analyzing website",loadingDesc:"We're evaluating your site's AEO optimization. One momentâ¦"},Hte={it:"Italiano",en:"English",es:"Español"},Wte={enable:"Enable energy saving mode",disable:"Disable energy saving mode"},Vte={meta:Cte,nav:Pte,plan:Tte,madeInItaly:Rte,hero:Lte,urlForm:jte,toast:Ote,stats:Ite,features:Dte,cta:Mte,marquee:Fte,pricing:zte,auth:$te,contact:Ute,footer
587:Bte,report:qte,language:Hte,theme:Wte},Gte={title:"AEO Analyzer â Optimización para ChatGPT, Claude, Perplexity, Copilot, Gemini, Grok",description:"Analiza tu sitio y optimÃzalo para motores de respuesta con IA: ChatGPT, Claude (Anthropic), Perplexity, Microsoft Copilot, Google Gemini / AI Overviews y Grok."},Kte={analyze:"Analizar",features:"Funciones",pricing:"Precios",news:"Noticias",contact:"Contacto",login:"Entrar",logout:"Salir",menu:"Abrir menú",close:"Cerrar menú"},Zte={proUnlimited:"Pro · ilimitadas",baseRemaining:"Base · {{count}} restantes"},Yte={hero:"ð®ð¹ Desarrollado en Italia",footer:"Hecho con â¤ï¸ en Italia",pricing:"ð®ð¹ Made in Italy â Desarrollado en Italia"},Jte={badge:"La plataforma italiana de análisis AEO",title1:"Analiza y",title2:"Mejora tu AEO",subtitle:"Descubre cómo optimizar tu sitio para motores de respuesta como",engines:{chatgpt:"ChatGPT",claude:"Claude",perplexity:"Perplexity",copilot:"Microsoft Copilot",gemini:"Google Gemini",grok:"Grok"},and:"y",placeholder:"Ej. https://ejemplo.com",pricingLink:"Desde 9â¬/mes",alert:"Análisis real con IA (Gemini) sobre title, meta, schema, contenido y citabilidad. Se necesita una suscripción activa para iniciar el análisis."},Xte={placeholder:"https://tusitio.com",button:"Analizar",analyzing:"Analizando..."},Qte={invalidUrlTitle:"URL no válida",invalidUrlDesc:"Introduce una URL completa que empiece por http:// o https://",loginRequiredTitle:"Inicia sesión para continuar",loginRequiredDesc:"RegÃstrate o inicia sesión para iniciar un análisis.",planRequiredTitle:"Necesitas un plan activo",planRequiredDesc:"Elige Base o Pro para iniciar el análisis.",quotaExhaustedTitle:"Análisis mensuales agotados",quotaExhaustedDesc:"Cambia al plan Pro para análisis ilimitados.",missingUrl:"Falta la URL",missingUrlDesc:"No se proporcionó ninguna URL.",welcomeBack:"Bienvenido de nuevo",accountCreated:"Cuenta creada",accountCreatedDesc:"Ahora puedes elegir un plan.",error:"Error",invalidCredentials:"Credenciales no válidas",planUpgraded:"¡Plan actualizado!",planUpgradedDesc:"Has cambiado al plan {{plan}} con cobro prorrateado.",paymentsNotConfigured:"Pagos no configurados",paymentsNotConfiguredDesc:"Completa la configuración de Stripe en Lovable para habilitar los pagos.",contactErrorSend:"Error al enviar el mensaje. Inténtalo de nuevo más tarde.",contactGenericError:"Ha ocurrido un error. Inténtalo de nuevo más tarde.",contactSuccess:"¡Mensaje enviado con éxito!"},ene={kicker:"Los Números",title1:"Nuestro",title2:"crecimiento",urls:"URLs Analizadas",users:"Usuarios Satisfechos",satisfaction:"Tasa de Satisfacción",avgTime:"Segundos Tiempo Medio"},tne={kicker:"Funciones",title1:"Todo lo que necesitas para",title2:"optimizar",subtitle:"AEO Analyzer evalúa los elementos clave que determinan si los motores de respuesta con IA usarán tu contenido.",cards:{content:{title:"Análisis de calidad de contenido",desc:"Verifica si el contenido es profundo y responde a preguntas especÃficas."},cite:{title:"Evaluación de citabilidad",desc:"Análisis de fuentes, citas y referencias externas."},factual:{title:"Precisión factual",desc:"Control de la fiabilidad y verificabilidad de la información."},structured:{title:"Datos estructurados",desc:"Verifica el Schema markup y los datos legibles por máquina."},readability:{title:"Legibilidad del texto",desc:"Comprueba la claridad y facilidad de comprensión."},llm:{title:"Optimización para LLM",desc:"Análisis de compatibilidad con ChatGPT, Claude, Copilot, Gemini y Grok con sugerencias especÃficas."},report:{title:"Informe AEO completo",desc:"Puntuación global y sugerencias para optimizar para los motores de respuesta."}},pageHero:{kicker:"Funciones",title1:"Todo el poder de",title2:"AEO Analyzer",subtitle:"Descubre cómo AEO Analyzer te ayuda a optimizar tu contenido para los modernos motores de respuesta con IA."},why:{title1:"Por qué la optimización",title2:"AEO",title3:"es importante",desc:"Con motores de respuesta como ChatGPT, Claude, Perplexity, Copilot, Gemini y Grok, el SEO tradicional ya no es suficiente. AEO Analyzer hace tu contenido más relevante, fiable y citable para estos sistemas.",cta:"Iniciar el análisis"},how:{kicker:"Cómo Funciona",title1:"Tres sencillos",title2:"pasos",s1t:"Introduce la URL",s1d:"Pega la URL de la página que quieres analizar.",s2t:"Análisis Completo",s2d:"Nuestros algoritmos evalúan el contenido según las mejores prácticas AEO.",s3t:"Informe Detallado",s3d:"Recibe un informe completo con puntuaciones y sugerencias prácticas."},extraCard:{title:"Integración IA Avanzada",desc:"Algoritmos de IA que analizan tu contenido como lo harÃa un motor de respuesta."}},nne={kicker:"Empieza ya",title1:"¿Listo para optimizar para los",title2:"motores de respuesta con IA?",subtitle:"Consigue un análisis AEO completo de tu sitio y descubre cómo mejorarlo para ChatGPT, Claude, Perplexity, Copilot, Gemini y Grok."},rne=["ANÃLISIS AEO","CHATGPT","CLAUDE","PERPLEXITY","COPILOT","GEMINI","GROK","AI OVERVIEWS","OPTIMIZACIÃN","CONTENIDO IA","SCHEMA.ORG"],ine={title:"Planes y Precios",subtitle:"Analiza tu sitio con IA real. Elige el plan que mejor te venga.",popular:"MÃS POPULAR",month:"/mes",active:"Plan actual",switchTo:"Cambiar a {{plan}}",activate:"Activar {{plan}}",secure:"Pago seguro con Stripe. Cancela cuando quieras desde el portal de clientes.",checkoutTitle:"Completa el pago",basePlan:{name:"Base",features:["5 análisis AEO completos al mes","Análisis con IA real (Gemini)","Informe detallado + sugerencias","Historial de análisis","Exportación PDF y LLM.txt"]},proPlan:{name:"Pro",features:["Análisis ilimitados","Análisis con IA real (Gemini)","Informe detallado + sugerencias","Historial ilimitado","Exportación PDF y LLM.txt","Soporte prioritario"]}},sne={signinTitle:"Iniciar sesión",signupTitle:"Crear cuenta",signinSub:"Entra para iniciar un análisis.",signupSub:"RegÃstrate para activar tu plan.",email:"Email",password:"Contraseña",signin:"Entrar",signup:"Registrarse",noAccount:"¿No tienes cuenta?",hasAccount:"¿Ya tienes cuenta?",seePlans:"Ver planes"},ane={kicker:"Contacto",title1:"Hablemos de tu",title2:"proyecto",subtitle:"¿Preguntas o sugerencias? Estamos aquà para ayudarte a optimizar tu contenido para los motores de respuesta con IA.",sendMessage:"EnvÃa un mensaje",name:"Nombre",namePlaceholder:"Tu nombre",email:"Email",emailPlaceholder:"Tu email",message:"Mensaje",messagePlaceholder:"Tu mensaje",submit:"Enviar mensaje",submitting:"Env
587iando...",success:"¡Mensaje Enviado!",successDesc:"Gracias por contactarnos. Te responderemos lo antes posible.",another:"Enviar otro mensaje",infoTitle:"Información de contacto",infoDesc:"Puedes contactarnos por el formulario o directamente por los canales de abajo.",location:"Sede",locationValue:"Catania, Italia",hours:"Horario",hoursValue:"Lun - Vie: 9:00 - 18:00",errors:{nameRequired:"El nombre es obligatorio",nameMax:"El nombre debe tener menos de 100 caracteres",emailInvalid:"Introduce un email válido",emailMax:"El email debe tener menos de 255 caracteres",messageRequired:"El mensaje es obligatorio",messageMax:"El mensaje debe tener menos de 2000 caracteres"}},one={tagline:"Optimiza tu contenido para ChatGPT, Claude, Perplexity, Copilot, Gemini y Grok con análisis AEO avanzado.",explore:"Explorar",home:"Inicio",features:"Funciones",pricing:"Planes y Precios",contact:"Contacto",news:"Noticias",legal:"Legal",terms:"Términos y Condiciones",privacy:"PolÃtica de Privacidad",sitemap:"Mapa del sitio",contacts:"Contacto",rights:"Todos los derechos reservados.",madeIn:"Hecho con â¤ï¸ en Italia"},lne={banner:{pro:"Plan Pro activo â análisis ilimitados.",base:"Plan Base â {{count}} análisis restantes este mes.",none:"Necesitas un plan activo para iniciar un análisis.",home:"Volver al inicio"},completed:"Análisis AEO completado",reportFor:"Informe AEO de",intro:"Aquà están los resultados del análisis Answer Engine Optimization. Desplázate para ver todos los detalles y sugerencias.",schemaTitle:"Análisis Schema.org",retry:"Reintentar",home:"Inicio",seePlans:"Ver planes",loading:"Analizando el sitio",loadingDesc:"Estamos evaluando la optimización AEO de tu sitio. Un momentoâ¦"},cne={it:"Italiano",en:"English",es:"Español"},une={enable:"Activar modo de ahorro de energÃa",disable:"Desactivar modo de ahorro de energÃa"},dne={meta:Gte,nav:Kte,plan:Zte,madeInItaly:Yte,hero:Jte,urlForm:Xte,toast:Qte,stats:ene,features:tne,cta:nne,marquee:rne,pricing:ine,auth:sne,contact:ane,footer:one,report:lne,language:cne,theme:une},hne=["it","en","es"];Ur.use(Wj).use(g9).init({resources:{it:{translation:Ate},en:{translation:Vte},es:{translation:dne}},fallbackLng:"it",supportedLngs:hne,interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator","htmlTag"],lookupLocalStorage:"aeo_lang",caches:["localStorage"]}});Ur.on("languageChanged",t=>{typeof document<"u"&&(document.documentElement.lang=t)});W3(document.getElementById("root")).render(m.jsx(Gee,{}));export{rn as _,pne as c,Ab as g};
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.