lazyscout 0.3.11 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/dist/index.js +1470 -155
- package/dist/web/assets/index-DMf3DZ4t.js +58 -0
- package/dist/web/assets/index-Dj24yU11.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-BlO66Lgr.css +0 -1
- package/dist/web/assets/index-CqjtbfVm.js +0 -58
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const h of u)if(h.type==="childList")for(const f of h.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function s(u){const h={};return u.integrity&&(h.integrity=u.integrity),u.referrerPolicy&&(h.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?h.credentials="include":u.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(u){if(u.ep)return;u.ep=!0;const h=s(u);fetch(u.href,h)}})();var Is=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ev(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Tu={exports:{}},Wi={};var _m;function dx(){if(_m)return Wi;_m=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function s(o,u,h){var f=null;if(h!==void 0&&(f=""+h),u.key!==void 0&&(f=""+u.key),"key"in u){h={};for(var p in u)p!=="key"&&(h[p]=u[p])}else h=u;return u=h.ref,{$$typeof:n,type:o,key:f,ref:u!==void 0?u:null,props:h}}return Wi.Fragment=l,Wi.jsx=s,Wi.jsxs=s,Wi}var Nm;function fx(){return Nm||(Nm=1,Tu.exports=dx()),Tu.exports}var r=fx(),Eu={exports:{}},ze={};var Tm;function hx(){if(Tm)return ze;Tm=1;var n=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),j=Symbol.for("react.lazy"),b=Symbol.for("react.activity"),S=Symbol.iterator;function y(v){return v===null||typeof v!="object"?null:(v=S&&v[S]||v["@@iterator"],typeof v=="function"?v:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,w={};function _(v,R,$){this.props=v,this.context=R,this.refs=w,this.updater=$||O}_.prototype.isReactComponent={},_.prototype.setState=function(v,R){if(typeof v!="object"&&typeof v!="function"&&v!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,v,R,"setState")},_.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function C(){}C.prototype=_.prototype;function A(v,R,$){this.props=v,this.context=R,this.refs=w,this.updater=$||O}var H=A.prototype=new C;H.constructor=A,N(H,_.prototype),H.isPureReactComponent=!0;var D=Array.isArray;function K(){}var G={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function B(v,R,$){var W=$.ref;return{$$typeof:n,type:v,key:R,ref:W!==void 0?W:null,props:$}}function F(v,R){return B(v.type,R,v.props)}function te(v){return typeof v=="object"&&v!==null&&v.$$typeof===n}function M(v){var R={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function($){return R[$]})}var q=/\/+/g;function E(v,R){return typeof v=="object"&&v!==null&&v.key!=null?M(""+v.key):R.toString(36)}function Z(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(K,K):(v.status="pending",v.then(function(R){v.status==="pending"&&(v.status="fulfilled",v.value=R)},function(R){v.status==="pending"&&(v.status="rejected",v.reason=R)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function Y(v,R,$,W,le){var ve=typeof v;(ve==="undefined"||ve==="boolean")&&(v=null);var Ne=!1;if(v===null)Ne=!0;else switch(ve){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(v.$$typeof){case n:case l:Ne=!0;break;case j:return Ne=v._init,Y(Ne(v._payload),R,$,W,le)}}if(Ne)return le=le(v),Ne=W===""?"."+E(v,0):W,D(le)?($="",Ne!=null&&($=Ne.replace(q,"$&/")+"/"),Y(le,R,$,"",function(we){return we})):le!=null&&(te(le)&&(le=F(le,$+(le.key==null||v&&v.key===le.key?"":(""+le.key).replace(q,"$&/")+"/")+Ne)),R.push(le)),1;Ne=0;var _e=W===""?".":W+":";if(D(v))for(var oe=0;oe<v.length;oe++)W=v[oe],ve=_e+E(W,oe),Ne+=Y(W,R,$,ve,le);else if(oe=y(v),typeof oe=="function")for(v=oe.call(v),oe=0;!(W=v.next()).done;)W=W.value,ve=_e+E(W,oe++),Ne+=Y(W,R,$,ve,le);else if(ve==="object"){if(typeof v.then=="function")return Y(Z(v),R,$,W,le);throw R=String(v),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function P(v,R,$){if(v==null)return v;var W=[],le=0;return Y(v,W,"","",function(ve){return R.call($,ve,le++)}),W}function X(v){if(v._status===-1){var R=v._result;R=R(),R.then(function($){(v._status===0||v._status===-1)&&(v._status=1,v._result=$)},function($){(v._status===0||v._status===-1)&&(v._status=2,v._result=$)}),v._status===-1&&(v._status=0,v._result=R)}if(v._status===1)return v._result.default;throw v._result}var k=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},V={map:P,forEach:function(v,R,$){P(v,function(){R.apply(this,arguments)},$)},count:function(v){var R=0;return P(v,function(){R++}),R},toArray:function(v){return P(v,function(R){return R})||[]},only:function(v){if(!te(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return ze.Activity=b,ze.Children=V,ze.Component=_,ze.Fragment=s,ze.Profiler=u,ze.PureComponent=A,ze.StrictMode=o,ze.Suspense=g,ze.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,ze.__COMPILER_RUNTIME={__proto__:null,c:function(v){return G.H.useMemoCache(v)}},ze.cache=function(v){return function(){return v.apply(null,arguments)}},ze.cacheSignal=function(){return null},ze.cloneElement=function(v,R,$){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var W=N({},v.props),le=v.key;if(R!=null)for(ve in R.key!==void 0&&(le=""+R.key),R)!ae.call(R,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&R.ref===void 0||(W[ve]=R[ve]);var ve=arguments.length-2;if(ve===1)W.children=$;else if(1<ve){for(var Ne=Array(ve),_e=0;_e<ve;_e++)Ne[_e]=arguments[_e+2];W.children=Ne}return B(v.type,le,W)},ze.createContext=function(v){return v={$$typeof:f,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:h,_context:v},v},ze.createElement=function(v,R,$){var W,le={},ve=null;if(R!=null)for(W in R.key!==void 0&&(ve=""+R.key),R)ae.call(R,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(le[W]=R[W]);var Ne=arguments.length-2;if(Ne===1)le.children=$;else if(1<Ne){for(var _e=Array(Ne),oe=0;oe<Ne;oe++)_e[oe]=arguments[oe+2];le.children=_e}if(v&&v.defaultProps)for(W in Ne=v.defaultProps,Ne)le[W]===void 0&&(le[W]=Ne[W]);return B(v,ve,le)},ze.createRef=function(){return{current:null}},ze.forwardRef=function(v){return{$$typeof:p,render:v}},ze.isValidElement=te,ze.lazy=function(v){return{$$typeof:j,_payload:{_status:-1,_result:v},_init:X}},ze.memo=function(v,R){return{$$typeof:m,type:v,compare:R===void 0?null:R}},ze.startTransition=function(v){var R=G.T,$={};G.T=$;try{var W=v(),le=G.S;le!==null&&le($,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(K,k)}catch(ve){k(ve)}finally{R!==null&&$.types!==null&&(R.types=$.types),G.T=R}},ze.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},ze.use=function(v){return G.H.use(v)},ze.useActionState=function(v,R,$){return G.H.useActionState(v,R,$)},ze.useCallback=function(v,R){return G.H.useCallback(v,R)},ze.useContext=function(v){return G.H.useContext(v)},ze.useDebugValue=function(){},ze.useDeferredValue=function(v,R){return G.H.useDeferredValue(v,R)},ze.useEffect=function(v,R){return G.H.useEffect(v,R)},ze.useEffectEvent=function(v){return G.H.useEffectEvent(v)},ze.useId=function(){return G.H.useId()},ze.useImperativeHandle=function(v,R,$){return G.H.useImperativeHandle(v,R,$)},ze.useInsertionEffect=function(v,R){return G.H.useInsertionEffect(v,R)},ze.useLayoutEffect=function(v,R){return G.H.useLayoutEffect(v,R)},ze.useMemo=function(v,R){return G.H.useMemo(v,R)},ze.useOptimistic=function(v,R){return G.H.useOptimistic(v,R)},ze.useReducer=function(v,R,$){return G.H.useReducer(v,R,$)},ze.useRef=function(v){return G.H.useRef(v)},ze.useState=function(v){return G.H.useState(v)},ze.useSyncExternalStore=function(v,R,$){return G.H.useSyncExternalStore(v,R,$)},ze.useTransition=function(){return G.H.useTransition()},ze.version="19.2.8",ze}var Em;function Dd(){return Em||(Em=1,Eu.exports=hx()),Eu.exports}var I=Dd();const ai=ev(I);var Cu={exports:{}},el={},Ou={exports:{}},Au={};var Cm;function px(){return Cm||(Cm=1,(function(n){function l(Y,P){var X=Y.length;Y.push(P);e:for(;0<X;){var k=X-1>>>1,V=Y[k];if(0<u(V,P))Y[k]=P,Y[X]=V,X=k;else break e}}function s(Y){return Y.length===0?null:Y[0]}function o(Y){if(Y.length===0)return null;var P=Y[0],X=Y.pop();if(X!==P){Y[0]=X;e:for(var k=0,V=Y.length,v=V>>>1;k<v;){var R=2*(k+1)-1,$=Y[R],W=R+1,le=Y[W];if(0>u($,X))W<V&&0>u(le,$)?(Y[k]=le,Y[W]=X,k=W):(Y[k]=$,Y[R]=X,k=R);else if(W<V&&0>u(le,X))Y[k]=le,Y[W]=X,k=W;else break e}}return P}function u(Y,P){var X=Y.sortIndex-P.sortIndex;return X!==0?X:Y.id-P.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;n.unstable_now=function(){return h.now()}}else{var f=Date,p=f.now();n.unstable_now=function(){return f.now()-p}}var g=[],m=[],j=1,b=null,S=3,y=!1,O=!1,N=!1,w=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function H(Y){for(var P=s(m);P!==null;){if(P.callback===null)o(m);else if(P.startTime<=Y)o(m),P.sortIndex=P.expirationTime,l(g,P);else break;P=s(m)}}function D(Y){if(N=!1,H(Y),!O)if(s(g)!==null)O=!0,K||(K=!0,M());else{var P=s(m);P!==null&&Z(D,P.startTime-Y)}}var K=!1,G=-1,ae=5,B=-1;function F(){return w?!0:!(n.unstable_now()-B<ae)}function te(){if(w=!1,K){var Y=n.unstable_now();B=Y;var P=!0;try{e:{O=!1,N&&(N=!1,C(G),G=-1),y=!0;var X=S;try{t:{for(H(Y),b=s(g);b!==null&&!(b.expirationTime>Y&&F());){var k=b.callback;if(typeof k=="function"){b.callback=null,S=b.priorityLevel;var V=k(b.expirationTime<=Y);if(Y=n.unstable_now(),typeof V=="function"){b.callback=V,H(Y),P=!0;break t}b===s(g)&&o(g),H(Y)}else o(g);b=s(g)}if(b!==null)P=!0;else{var v=s(m);v!==null&&Z(D,v.startTime-Y),P=!1}}break e}finally{b=null,S=X,y=!1}P=void 0}}finally{P?M():K=!1}}}var M;if(typeof A=="function")M=function(){A(te)};else if(typeof MessageChannel<"u"){var q=new MessageChannel,E=q.port2;q.port1.onmessage=te,M=function(){E.postMessage(null)}}else M=function(){_(te,0)};function Z(Y,P){G=_(function(){Y(n.unstable_now())},P)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(Y){Y.callback=null},n.unstable_forceFrameRate=function(Y){0>Y||125<Y?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<Y?Math.floor(1e3/Y):5},n.unstable_getCurrentPriorityLevel=function(){return S},n.unstable_next=function(Y){switch(S){case 1:case 2:case 3:var P=3;break;default:P=S}var X=S;S=P;try{return Y()}finally{S=X}},n.unstable_requestPaint=function(){w=!0},n.unstable_runWithPriority=function(Y,P){switch(Y){case 1:case 2:case 3:case 4:case 5:break;default:Y=3}var X=S;S=Y;try{return P()}finally{S=X}},n.unstable_scheduleCallback=function(Y,P,X){var k=n.unstable_now();switch(typeof X=="object"&&X!==null?(X=X.delay,X=typeof X=="number"&&0<X?k+X:k):X=k,Y){case 1:var V=-1;break;case 2:V=250;break;case 5:V=1073741823;break;case 4:V=1e4;break;default:V=5e3}return V=X+V,Y={id:j++,callback:P,priorityLevel:Y,startTime:X,expirationTime:V,sortIndex:-1},X>k?(Y.sortIndex=X,l(m,Y),s(g)===null&&Y===s(m)&&(N?(C(G),G=-1):N=!0,Z(D,X-k))):(Y.sortIndex=V,l(g,Y),O||y||(O=!0,K||(K=!0,M()))),Y},n.unstable_shouldYield=F,n.unstable_wrapCallback=function(Y){var P=S;return function(){var X=S;S=P;try{return Y.apply(this,arguments)}finally{S=X}}}})(Au)),Au}var Om;function mx(){return Om||(Om=1,Ou.exports=px()),Ou.exports}var Ru={exports:{}},Yt={};var Am;function gx(){if(Am)return Yt;Am=1;var n=Dd();function l(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var j=2;j<arguments.length;j++)m+="&args[]="+encodeURIComponent(arguments[j])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var o={d:{f:s,r:function(){throw Error(l(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},u=Symbol.for("react.portal");function h(g,m,j){var b=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:b==null?null:""+b,children:g,containerInfo:m,implementation:j}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,Yt.createPortal=function(g,m){var j=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return h(g,m,null,j)},Yt.flushSync=function(g){var m=f.T,j=o.p;try{if(f.T=null,o.p=2,g)return g()}finally{f.T=m,o.p=j,o.d.f()}},Yt.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,o.d.C(g,m))},Yt.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},Yt.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var j=m.as,b=p(j,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,y=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;j==="style"?o.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:b,integrity:S,fetchPriority:y}):j==="script"&&o.d.X(g,{crossOrigin:b,integrity:S,fetchPriority:y,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Yt.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var j=p(m.as,m.crossOrigin);o.d.M(g,{crossOrigin:j,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&o.d.M(g)},Yt.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var j=m.as,b=p(j,m.crossOrigin);o.d.L(g,j,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Yt.preloadModule=function(g,m){if(typeof g=="string")if(m){var j=p(m.as,m.crossOrigin);o.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:j,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else o.d.m(g)},Yt.requestFormReset=function(g){o.d.r(g)},Yt.unstable_batchedUpdates=function(g,m){return g(m)},Yt.useFormState=function(g,m,j){return f.H.useFormState(g,m,j)},Yt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Yt.version="19.2.8",Yt}var Rm;function vx(){if(Rm)return Ru.exports;Rm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Ru.exports=gx(),Ru.exports}var km;function yx(){if(km)return el;km=1;var n=mx(),l=Dd(),s=vx();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function p(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function g(e){if(h(e)!==e)throw Error(o(188))}function m(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var a=e,i=t;;){var c=a.return;if(c===null)break;var d=c.alternate;if(d===null){if(i=c.return,i!==null){a=i;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===a)return g(c),e;if(d===i)return g(c),t;d=d.sibling}throw Error(o(188))}if(a.return!==i.return)a=c,i=d;else{for(var x=!1,z=c.child;z;){if(z===a){x=!0,a=c,i=d;break}if(z===i){x=!0,i=c,a=d;break}z=z.sibling}if(!x){for(z=d.child;z;){if(z===a){x=!0,a=d,i=c;break}if(z===i){x=!0,i=d,a=c;break}z=z.sibling}if(!x)throw Error(o(189))}}if(a.alternate!==i)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?e:t}function j(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=j(e),t!==null)return t;e=e.sibling}return null}var b=Object.assign,S=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),A=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),K=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),F=Symbol.for("react.memo_cache_sentinel"),te=Symbol.iterator;function M(e){return e===null||typeof e!="object"?null:(e=te&&e[te]||e["@@iterator"],typeof e=="function"?e:null)}var q=Symbol.for("react.client.reference");function E(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===q?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case _:return"Profiler";case w:return"StrictMode";case D:return"Suspense";case K:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case A:return e.displayName||"Context";case C:return(e._context.displayName||"Context")+".Consumer";case H:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return t=e.displayName||null,t!==null?t:E(e.type)||"Memo";case ae:t=e._payload,e=e._init;try{return E(e(t))}catch{}}return null}var Z=Array.isArray,Y=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X={pending:!1,data:null,method:null,action:null},k=[],V=-1;function v(e){return{current:e}}function R(e){0>V||(e.current=k[V],k[V]=null,V--)}function $(e,t){V++,k[V]=e.current,e.current=t}var W=v(null),le=v(null),ve=v(null),Ne=v(null);function _e(e,t){switch($(ve,t),$(le,e),$(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Pp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Pp(t),e=Zp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}R(W),$(W,e)}function oe(){R(W),R(le),R(ve)}function we(e){e.memoizedState!==null&&$(Ne,e);var t=W.current,a=Zp(t,e.type);t!==a&&($(le,e),$(W,a))}function Te(e){le.current===e&&(R(W),R(le)),Ne.current===e&&(R(Ne),Xi._currentValue=X)}var Ge,Me;function T(e){if(Ge===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);Ge=t&&t[1]||"",Me=-1<a.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Ge+e+Me}var J=!1;function re(e,t){if(!e||J)return"";J=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var i={DetermineComponentFrameRoot:function(){try{if(t){var be=function(){throw Error()};if(Object.defineProperty(be.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(be,[])}catch(fe){var de=fe}Reflect.construct(e,[],be)}else{try{be.call()}catch(fe){de=fe}e.call(be.prototype)}}else{try{throw Error()}catch(fe){de=fe}(be=e())&&typeof be.catch=="function"&&be.catch(function(){})}}catch(fe){if(fe&&de&&typeof fe.stack=="string")return[fe.stack,de.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=i.DetermineComponentFrameRoot(),x=d[0],z=d[1];if(x&&z){var Q=x.split(`
|
|
4
|
+
`),ue=z.split(`
|
|
5
|
+
`);for(c=i=0;i<Q.length&&!Q[i].includes("DetermineComponentFrameRoot");)i++;for(;c<ue.length&&!ue[c].includes("DetermineComponentFrameRoot");)c++;if(i===Q.length||c===ue.length)for(i=Q.length-1,c=ue.length-1;1<=i&&0<=c&&Q[i]!==ue[c];)c--;for(;1<=i&&0<=c;i--,c--)if(Q[i]!==ue[c]){if(i!==1||c!==1)do if(i--,c--,0>c||Q[i]!==ue[c]){var pe=`
|
|
6
|
+
`+Q[i].replace(" at new "," at ");return e.displayName&&pe.includes("<anonymous>")&&(pe=pe.replace("<anonymous>",e.displayName)),pe}while(1<=i&&0<=c);break}}}finally{J=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?T(a):""}function L(e,t){switch(e.tag){case 26:case 27:case 5:return T(e.type);case 16:return T("Lazy");case 13:return e.child!==t&&t!==null?T("Suspense Fallback"):T("Suspense");case 19:return T("SuspenseList");case 0:case 15:return re(e.type,!1);case 11:return re(e.type.render,!1);case 1:return re(e.type,!0);case 31:return T("Activity");default:return""}}function U(e){try{var t="",a=null;do t+=L(e,a),a=e,e=e.return;while(e);return t}catch(i){return`
|
|
7
|
+
Error generating stack: `+i.message+`
|
|
8
|
+
`+i.stack}}var ee=Object.prototype.hasOwnProperty,me=n.unstable_scheduleCallback,he=n.unstable_cancelCallback,ie=n.unstable_shouldYield,Se=n.unstable_requestPaint,je=n.unstable_now,xe=n.unstable_getCurrentPriorityLevel,Ce=n.unstable_ImmediatePriority,Be=n.unstable_UserBlockingPriority,De=n.unstable_NormalPriority,jt=n.unstable_LowPriority,wt=n.unstable_IdlePriority,_t=n.log,Jt=n.unstable_setDisableYieldValue,Qe=null,gt=null;function Je(e){if(typeof _t=="function"&&Jt(e),gt&&typeof gt.setStrictMode=="function")try{gt.setStrictMode(Qe,e)}catch{}}var $e=Math.clz32?Math.clz32:Xe,nt=Math.log,Bt=Math.LN2;function Xe(e){return e>>>=0,e===0?32:31-(nt(e)/Bt|0)|0}var ct=256,ut=262144,Zt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xt(e,t,a){var i=e.pendingLanes;if(i===0)return 0;var c=0,d=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var z=i&134217727;return z!==0?(i=z&~d,i!==0?c=it(i):(x&=z,x!==0?c=it(x):a||(a=z&~e,a!==0&&(c=it(a))))):(z=i&~d,z!==0?c=it(z):x!==0?c=it(x):a||(a=i&~e,a!==0&&(c=it(a)))),c===0?0:t!==0&&t!==c&&(t&d)===0&&(d=c&-c,a=t&-t,d>=a||d===32&&(a&4194048)!==0)?t:c}function bt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function yt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function mn(){var e=Zt;return Zt<<=1,(Zt&62914560)===0&&(Zt=4194304),e}function fa(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Ot(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function He(e,t,a,i,c,d){var x=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var z=e.entanglements,Q=e.expirationTimes,ue=e.hiddenUpdates;for(a=x&~a;0<a;){var pe=31-$e(a),be=1<<pe;z[pe]=0,Q[pe]=-1;var de=ue[pe];if(de!==null)for(ue[pe]=null,pe=0;pe<de.length;pe++){var fe=de[pe];fe!==null&&(fe.lane&=-536870913)}a&=~be}i!==0&&Ie(e,i,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(x&~t))}function Ie(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var i=31-$e(t);e.entangledLanes|=t,e.entanglements[i]=e.entanglements[i]|1073741824|a&261930}function El(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var i=31-$e(a),c=1<<i;c&t|e[i]&t&&(e[i]|=t),a&=~c}}function On(e,t){var a=t&-t;return a=(a&42)!==0?1:pr(a),(a&(e.suspendedLanes|t))!==0?0:a}function pr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function mr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function oi(){var e=P.p;return e!==0?e:(e=window.event,e===void 0?32:vm(e.type))}function gr(e,t){var a=P.p;try{return P.p=e,t()}finally{P.p=a}}var gn=Math.random().toString(36).slice(2),Nt="__reactFiber$"+gn,At="__reactProps$"+gn,An="__reactContainer$"+gn,ci="__reactEvents$"+gn,yo="__reactListeners$"+gn,bo="__reactHandles$"+gn,vr="__reactResources$"+gn,Va="__reactMarker$"+gn;function ui(e){delete e[Nt],delete e[At],delete e[ci],delete e[yo],delete e[bo]}function vn(e){var t=e[Nt];if(t)return t;for(var a=e.parentNode;a;){if(t=a[An]||a[Nt]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=tm(e);e!==null;){if(a=e[Nt])return a;e=tm(e)}return t}e=a,a=e.parentNode}return null}function Mn(e){if(e=e[Nt]||e[An]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Fn(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ha(e){var t=e[vr];return t||(t=e[vr]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Rt(e){e[Va]=!0}var di=new Set,Cl={};function Pn(e,t){Bn(e,t),Bn(e+"Capture",t)}function Bn(e,t){for(Cl[e]=t,e=0;e<t.length;e++)di.add(t[e])}var Ol=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Al={},Rl={};function xo(e){return ee.call(Rl,e)?!0:ee.call(Al,e)?!1:Ol.test(e)?Rl[e]=!0:(Al[e]=!0,!1)}function ye(e,t,a){if(xo(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var i=t.toLowerCase().slice(0,5);if(i!=="data-"&&i!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Ae(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function qe(e,t,a,i){if(i===null)e.removeAttribute(a);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+i)}}function Ke(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ht(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Tt(e,t,a){var i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof i<"u"&&typeof i.get=="function"&&typeof i.set=="function"){var c=i.get,d=i.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(x){a=""+x,d.call(this,x)}}),Object.defineProperty(e,t,{enumerable:i.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $n(e){if(!e._valueTracker){var t=Ht(e)?"checked":"value";e._valueTracker=Tt(e,t,""+e[t])}}function kl(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),i="";return e&&(i=Ht(e)?e.checked?"true":"false":e.value),e=i,e!==a?(t.setValue(e),!0):!1}function yr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var So=/[\n"\\]/g;function kt(e){return e.replace(So,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ya(e,t,a,i,c,d,x,z){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ke(t)):e.value!==""+Ke(t)&&(e.value=""+Ke(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Wt(e,x,Ke(t)):a!=null?Wt(e,x,Ke(a)):i!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),z!=null&&typeof z!="function"&&typeof z!="symbol"&&typeof z!="boolean"?e.name=""+Ke(z):e.removeAttribute("name")}function Fa(e,t,a,i,c,d,x,z){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||a!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){$n(e);return}a=a!=null?""+Ke(a):"",t=t!=null?""+Ke(t):a,z||t===e.value||(e.value=t),e.defaultValue=t}i=i??c,i=typeof i!="function"&&typeof i!="symbol"&&!!i,e.checked=z?e.checked:!!i,e.defaultChecked=!!i,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),$n(e)}function Wt(e,t,a){t==="number"&&yr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function pa(e,t,a,i){if(e=e.options,t){t={};for(var c=0;c<a.length;c++)t["$"+a[c]]=!0;for(a=0;a<e.length;a++)c=t.hasOwnProperty("$"+e[a].value),e[a].selected!==c&&(e[a].selected=c),c&&i&&(e[a].defaultSelected=!0)}else{for(a=""+Ke(a),t=null,c=0;c<e.length;c++){if(e[c].value===a){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Dl(e,t,a){if(t!=null&&(t=""+Ke(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+Ke(a):""}function Gd(e,t,a,i){if(t==null){if(i!=null){if(a!=null)throw Error(o(92));if(Z(i)){if(1<i.length)throw Error(o(93));i=i[0]}a=i}a==null&&(a=""),t=a}a=Ke(t),e.defaultValue=a,i=e.textContent,i===a&&i!==""&&i!==null&&(e.value=i),$n(e)}function br(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var ly=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Id(e,t,a){var i=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?i?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":i?e.setProperty(t,a):typeof a!="number"||a===0||ly.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Vd(e,t,a){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,a!=null){for(var i in a)!a.hasOwnProperty(i)||t!=null&&t.hasOwnProperty(i)||(i.indexOf("--")===0?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="");for(var c in t)i=t[c],t.hasOwnProperty(c)&&a[c]!==i&&Id(e,c,i)}else for(var d in t)t.hasOwnProperty(d)&&Id(e,d,t[d])}function jo(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var sy=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),oy=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function zl(e){return oy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zn(){}var wo=null;function _o(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xr=null,Sr=null;function Yd(e){var t=Mn(e);if(t&&(e=t.stateNode)){var a=e[At]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ya(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+kt(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var i=a[t];if(i!==e&&i.form===e.form){var c=i[At]||null;if(!c)throw Error(o(90));Ya(i,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(t=0;t<a.length;t++)i=a[t],i.form===e.form&&kl(i)}break e;case"textarea":Dl(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&pa(e,!!a.multiple,t,!1)}}}var No=!1;function Fd(e,t,a){if(No)return e(t,a);No=!0;try{var i=e(t);return i}finally{if(No=!1,(xr!==null||Sr!==null)&&(Ss(),xr&&(t=xr,e=Sr,Sr=xr=null,Yd(t),e)))for(t=0;t<e.length;t++)Yd(e[t])}}function fi(e,t){var a=e.stateNode;if(a===null)return null;var i=a[At]||null;if(i===null)return null;a=i[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(o(231,t,typeof a));return a}var Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),To=!1;if(Xn)try{var hi={};Object.defineProperty(hi,"passive",{get:function(){To=!0}}),window.addEventListener("test",hi,hi),window.removeEventListener("test",hi,hi)}catch{To=!1}var ma=null,Eo=null,Ul=null;function Pd(){if(Ul)return Ul;var e,t=Eo,a=t.length,i,c="value"in ma?ma.value:ma.textContent,d=c.length;for(e=0;e<a&&t[e]===c[e];e++);var x=a-e;for(i=1;i<=x&&t[a-i]===c[d-i];i++);return Ul=c.slice(e,1<i?1-i:void 0)}function Ll(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Ml(){return!0}function Zd(){return!1}function en(e){function t(a,i,c,d,x){this._reactName=a,this._targetInst=c,this.type=i,this.nativeEvent=d,this.target=x,this.currentTarget=null;for(var z in e)e.hasOwnProperty(z)&&(a=e[z],this[z]=a?a(d):d[z]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Ml:Zd,this.isPropagationStopped=Zd,this}return b(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ml)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ml)},persist:function(){},isPersistent:Ml}),t}var Pa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bl=en(Pa),pi=b({},Pa,{view:0,detail:0}),cy=en(pi),Co,Oo,mi,$l=b({},pi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ro,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==mi&&(mi&&e.type==="mousemove"?(Co=e.screenX-mi.screenX,Oo=e.screenY-mi.screenY):Oo=Co=0,mi=e),Co)},movementY:function(e){return"movementY"in e?e.movementY:Oo}}),Xd=en($l),uy=b({},$l,{dataTransfer:0}),dy=en(uy),fy=b({},pi,{relatedTarget:0}),Ao=en(fy),hy=b({},Pa,{animationName:0,elapsedTime:0,pseudoElement:0}),py=en(hy),my=b({},Pa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),gy=en(my),vy=b({},Pa,{data:0}),Kd=en(vy),yy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},by={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"},xy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=xy[e])?!!t[e]:!1}function Ro(){return Sy}var jy=b({},pi,{key:function(e){if(e.key){var t=yy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ll(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?by[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ro,charCode:function(e){return e.type==="keypress"?Ll(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ll(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),wy=en(jy),_y=b({},$l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Qd=en(_y),Ny=b({},pi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ro}),Ty=en(Ny),Ey=b({},Pa,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cy=en(Ey),Oy=b({},$l,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ay=en(Oy),Ry=b({},Pa,{newState:0,oldState:0}),ky=en(Ry),Dy=[9,13,27,32],ko=Xn&&"CompositionEvent"in window,gi=null;Xn&&"documentMode"in document&&(gi=document.documentMode);var zy=Xn&&"TextEvent"in window&&!gi,Jd=Xn&&(!ko||gi&&8<gi&&11>=gi),Wd=" ",ef=!1;function tf(e,t){switch(e){case"keyup":return Dy.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var jr=!1;function Uy(e,t){switch(e){case"compositionend":return nf(t);case"keypress":return t.which!==32?null:(ef=!0,Wd);case"textInput":return e=t.data,e===Wd&&ef?null:e;default:return null}}function Ly(e,t){if(jr)return e==="compositionend"||!ko&&tf(e,t)?(e=Pd(),Ul=Eo=ma=null,jr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Jd&&t.locale!=="ko"?null:t.data;default:return null}}var My={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 af(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!My[e.type]:t==="textarea"}function rf(e,t,a,i){xr?Sr?Sr.push(i):Sr=[i]:xr=i,t=Cs(t,"onChange"),0<t.length&&(a=new Bl("onChange","change",null,a,i),e.push({event:a,listeners:t}))}var vi=null,yi=null;function By(e){qp(e,0)}function Hl(e){var t=Fn(e);if(kl(t))return e}function lf(e,t){if(e==="change")return t}var sf=!1;if(Xn){var Do;if(Xn){var zo="oninput"in document;if(!zo){var of=document.createElement("div");of.setAttribute("oninput","return;"),zo=typeof of.oninput=="function"}Do=zo}else Do=!1;sf=Do&&(!document.documentMode||9<document.documentMode)}function cf(){vi&&(vi.detachEvent("onpropertychange",uf),yi=vi=null)}function uf(e){if(e.propertyName==="value"&&Hl(yi)){var t=[];rf(t,yi,e,_o(e)),Fd(By,t)}}function $y(e,t,a){e==="focusin"?(cf(),vi=t,yi=a,vi.attachEvent("onpropertychange",uf)):e==="focusout"&&cf()}function Hy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Hl(yi)}function qy(e,t){if(e==="click")return Hl(t)}function Gy(e,t){if(e==="input"||e==="change")return Hl(t)}function Iy(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sn=typeof Object.is=="function"?Object.is:Iy;function bi(e,t){if(sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;for(i=0;i<a.length;i++){var c=a[i];if(!ee.call(t,c)||!sn(e[c],t[c]))return!1}return!0}function df(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ff(e,t){var a=df(e);e=0;for(var i;a;){if(a.nodeType===3){if(i=e+a.textContent.length,e<=t&&i>=t)return{node:a,offset:t-e};e=i}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=df(a)}}function hf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=yr(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=yr(e.document)}return t}function Uo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Vy=Xn&&"documentMode"in document&&11>=document.documentMode,wr=null,Lo=null,xi=null,Mo=!1;function mf(e,t,a){var i=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Mo||wr==null||wr!==yr(i)||(i=wr,"selectionStart"in i&&Uo(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),xi&&bi(xi,i)||(xi=i,i=Cs(Lo,"onSelect"),0<i.length&&(t=new Bl("onSelect","select",null,t,a),e.push({event:t,listeners:i}),t.target=wr)))}function Za(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var _r={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionrun:Za("Transition","TransitionRun"),transitionstart:Za("Transition","TransitionStart"),transitioncancel:Za("Transition","TransitionCancel"),transitionend:Za("Transition","TransitionEnd")},Bo={},gf={};Xn&&(gf=document.createElement("div").style,"AnimationEvent"in window||(delete _r.animationend.animation,delete _r.animationiteration.animation,delete _r.animationstart.animation),"TransitionEvent"in window||delete _r.transitionend.transition);function Xa(e){if(Bo[e])return Bo[e];if(!_r[e])return e;var t=_r[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in gf)return Bo[e]=t[a];return e}var vf=Xa("animationend"),yf=Xa("animationiteration"),bf=Xa("animationstart"),Yy=Xa("transitionrun"),Fy=Xa("transitionstart"),Py=Xa("transitioncancel"),xf=Xa("transitionend"),Sf=new Map,$o="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");$o.push("scrollEnd");function Rn(e,t){Sf.set(e,t),Pn(t,[e])}var ql=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},yn=[],Nr=0,Ho=0;function Gl(){for(var e=Nr,t=Ho=Nr=0;t<e;){var a=yn[t];yn[t++]=null;var i=yn[t];yn[t++]=null;var c=yn[t];yn[t++]=null;var d=yn[t];if(yn[t++]=null,i!==null&&c!==null){var x=i.pending;x===null?c.next=c:(c.next=x.next,x.next=c),i.pending=c}d!==0&&jf(a,c,d)}}function Il(e,t,a,i){yn[Nr++]=e,yn[Nr++]=t,yn[Nr++]=a,yn[Nr++]=i,Ho|=i,e.lanes|=i,e=e.alternate,e!==null&&(e.lanes|=i)}function qo(e,t,a,i){return Il(e,t,a,i),Vl(e)}function Ka(e,t){return Il(e,null,null,t),Vl(e)}function jf(e,t,a){e.lanes|=a;var i=e.alternate;i!==null&&(i.lanes|=a);for(var c=!1,d=e.return;d!==null;)d.childLanes|=a,i=d.alternate,i!==null&&(i.childLanes|=a),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&t!==null&&(c=31-$e(a),e=d.hiddenUpdates,i=e[c],i===null?e[c]=[t]:i.push(t),t.lane=a|536870912),d):null}function Vl(e){if(50<Gi)throw Gi=0,Kc=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Tr={};function Zy(e,t,a,i){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,a,i){return new Zy(e,t,a,i)}function Go(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Kn(e,t){var a=e.alternate;return a===null?(a=on(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function wf(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Yl(e,t,a,i,c,d){var x=0;if(i=e,typeof e=="function")Go(e)&&(x=1);else if(typeof e=="string")x=Wb(e,a,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=on(31,a,t,c),e.elementType=B,e.lanes=d,e;case N:return Qa(a.children,c,d,t);case w:x=8,c|=24;break;case _:return e=on(12,a,t,c|2),e.elementType=_,e.lanes=d,e;case D:return e=on(13,a,t,c),e.elementType=D,e.lanes=d,e;case K:return e=on(19,a,t,c),e.elementType=K,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case A:x=10;break e;case C:x=9;break e;case H:x=11;break e;case G:x=14;break e;case ae:x=16,i=null;break e}x=29,a=Error(o(130,e===null?"null":typeof e,"")),i=null}return t=on(x,a,t,c),t.elementType=e,t.type=i,t.lanes=d,t}function Qa(e,t,a,i){return e=on(7,e,i,t),e.lanes=a,e}function Io(e,t,a){return e=on(6,e,null,t),e.lanes=a,e}function _f(e){var t=on(18,null,null,0);return t.stateNode=e,t}function Vo(e,t,a){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Nf=new WeakMap;function bn(e,t){if(typeof e=="object"&&e!==null){var a=Nf.get(e);return a!==void 0?a:(t={value:e,source:t,stack:U(t)},Nf.set(e,t),t)}return{value:e,source:t,stack:U(t)}}var Er=[],Cr=0,Fl=null,Si=0,xn=[],Sn=0,ga=null,Hn=1,qn="";function Qn(e,t){Er[Cr++]=Si,Er[Cr++]=Fl,Fl=e,Si=t}function Tf(e,t,a){xn[Sn++]=Hn,xn[Sn++]=qn,xn[Sn++]=ga,ga=e;var i=Hn;e=qn;var c=32-$e(i)-1;i&=~(1<<c),a+=1;var d=32-$e(t)+c;if(30<d){var x=c-c%5;d=(i&(1<<x)-1).toString(32),i>>=x,c-=x,Hn=1<<32-$e(t)+c|a<<c|i,qn=d+e}else Hn=1<<d|a<<c|i,qn=e}function Yo(e){e.return!==null&&(Qn(e,1),Tf(e,1,0))}function Fo(e){for(;e===Fl;)Fl=Er[--Cr],Er[Cr]=null,Si=Er[--Cr],Er[Cr]=null;for(;e===ga;)ga=xn[--Sn],xn[Sn]=null,qn=xn[--Sn],xn[Sn]=null,Hn=xn[--Sn],xn[Sn]=null}function Ef(e,t){xn[Sn++]=Hn,xn[Sn++]=qn,xn[Sn++]=ga,Hn=t.id,qn=t.overflow,ga=e}var qt=null,ht=null,Ze=!1,va=null,jn=!1,Po=Error(o(519));function ya(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ji(bn(t,e)),Po}function Cf(e){var t=e.stateNode,a=e.type,i=e.memoizedProps;switch(t[Nt]=e,t[At]=i,a){case"dialog":Ye("cancel",t),Ye("close",t);break;case"iframe":case"object":case"embed":Ye("load",t);break;case"video":case"audio":for(a=0;a<Vi.length;a++)Ye(Vi[a],t);break;case"source":Ye("error",t);break;case"img":case"image":case"link":Ye("error",t),Ye("load",t);break;case"details":Ye("toggle",t);break;case"input":Ye("invalid",t),Fa(t,i.value,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name,!0);break;case"select":Ye("invalid",t);break;case"textarea":Ye("invalid",t),Gd(t,i.value,i.defaultValue,i.children)}a=i.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||i.suppressHydrationWarning===!0||Yp(t.textContent,a)?(i.popover!=null&&(Ye("beforetoggle",t),Ye("toggle",t)),i.onScroll!=null&&Ye("scroll",t),i.onScrollEnd!=null&&Ye("scrollend",t),i.onClick!=null&&(t.onclick=Zn),t=!0):t=!1,t||ya(e,!0)}function Of(e){for(qt=e.return;qt;)switch(qt.tag){case 5:case 31:case 13:jn=!1;return;case 27:case 3:jn=!0;return;default:qt=qt.return}}function Or(e){if(e!==qt)return!1;if(!Ze)return Of(e),Ze=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||du(e.type,e.memoizedProps)),a=!a),a&&ht&&ya(e),Of(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=em(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));ht=em(e)}else t===27?(t=ht,ka(e.type)?(e=gu,gu=null,ht=e):ht=t):ht=qt?_n(e.stateNode.nextSibling):null;return!0}function Ja(){ht=qt=null,Ze=!1}function Zo(){var e=va;return e!==null&&(rn===null?rn=e:rn.push.apply(rn,e),va=null),e}function ji(e){va===null?va=[e]:va.push(e)}var Xo=v(null),Wa=null,Jn=null;function ba(e,t,a){$(Xo,t._currentValue),t._currentValue=a}function Wn(e){e._currentValue=Xo.current,R(Xo)}function Ko(e,t,a){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===a)break;e=e.return}}function Qo(e,t,a,i){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var x=c.child;d=d.firstContext;e:for(;d!==null;){var z=d;d=c;for(var Q=0;Q<t.length;Q++)if(z.context===t[Q]){d.lanes|=a,z=d.alternate,z!==null&&(z.lanes|=a),Ko(d.return,a,e),i||(x=null);break e}d=z.next}}else if(c.tag===18){if(x=c.return,x===null)throw Error(o(341));x.lanes|=a,d=x.alternate,d!==null&&(d.lanes|=a),Ko(x,a,e),x=null}else x=c.child;if(x!==null)x.return=c;else for(x=c;x!==null;){if(x===e){x=null;break}if(c=x.sibling,c!==null){c.return=x.return,x=c;break}x=x.return}c=x}}function Ar(e,t,a,i){e=null;for(var c=t,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var x=c.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var z=c.type;sn(c.pendingProps.value,x.value)||(e!==null?e.push(z):e=[z])}}else if(c===Ne.current){if(x=c.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(Xi):e=[Xi])}c=c.return}e!==null&&Qo(t,e,a,i),t.flags|=262144}function Pl(e){for(e=e.firstContext;e!==null;){if(!sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function er(e){Wa=e,Jn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Gt(e){return Af(Wa,e)}function Zl(e,t){return Wa===null&&er(e),Af(e,t)}function Af(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Jn===null){if(e===null)throw Error(o(308));Jn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jn=Jn.next=t;return a}var Xy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,i){e.push(i)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Ky=n.unstable_scheduleCallback,Qy=n.unstable_NormalPriority,Dt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jo(){return{controller:new Xy,data:new Map,refCount:0}}function wi(e){e.refCount--,e.refCount===0&&Ky(Qy,function(){e.controller.abort()})}var _i=null,Wo=0,Rr=0,kr=null;function Jy(e,t){if(_i===null){var a=_i=[];Wo=0,Rr=nu(),kr={status:"pending",value:void 0,then:function(i){a.push(i)}}}return Wo++,t.then(Rf,Rf),t}function Rf(){if(--Wo===0&&_i!==null){kr!==null&&(kr.status="fulfilled");var e=_i;_i=null,Rr=0,kr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Wy(e,t){var a=[],i={status:"pending",value:null,reason:null,then:function(c){a.push(c)}};return e.then(function(){i.status="fulfilled",i.value=t;for(var c=0;c<a.length;c++)(0,a[c])(t)},function(c){for(i.status="rejected",i.reason=c,c=0;c<a.length;c++)(0,a[c])(void 0)}),i}var kf=Y.S;Y.S=function(e,t){mp=je(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Jy(e,t),kf!==null&&kf(e,t)};var tr=v(null);function ec(){var e=tr.current;return e!==null?e:dt.pooledCache}function Xl(e,t){t===null?$(tr,tr.current):$(tr,t.pool)}function Df(){var e=ec();return e===null?null:{parent:Dt._currentValue,pool:e}}var Dr=Error(o(460)),tc=Error(o(474)),Kl=Error(o(542)),Ql={then:function(){}};function zf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Uf(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(Zn,Zn),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mf(e),e;default:if(typeof t.status=="string")t.then(Zn,Zn);else{if(e=dt,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(i){if(t.status==="pending"){var c=t;c.status="fulfilled",c.value=i}},function(i){if(t.status==="pending"){var c=t;c.status="rejected",c.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Mf(e),e}throw ar=t,Dr}}function nr(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(ar=a,Dr):a}}var ar=null;function Lf(){if(ar===null)throw Error(o(459));var e=ar;return ar=null,e}function Mf(e){if(e===Dr||e===Kl)throw Error(o(483))}var zr=null,Ni=0;function Jl(e){var t=Ni;return Ni+=1,zr===null&&(zr=[]),Uf(zr,e,t)}function Ti(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Wl(e,t){throw t.$$typeof===S?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Bf(e){function t(se,ne){if(e){var ce=se.deletions;ce===null?(se.deletions=[ne],se.flags|=16):ce.push(ne)}}function a(se,ne){if(!e)return null;for(;ne!==null;)t(se,ne),ne=ne.sibling;return null}function i(se){for(var ne=new Map;se!==null;)se.key!==null?ne.set(se.key,se):ne.set(se.index,se),se=se.sibling;return ne}function c(se,ne){return se=Kn(se,ne),se.index=0,se.sibling=null,se}function d(se,ne,ce){return se.index=ce,e?(ce=se.alternate,ce!==null?(ce=ce.index,ce<ne?(se.flags|=67108866,ne):ce):(se.flags|=67108866,ne)):(se.flags|=1048576,ne)}function x(se){return e&&se.alternate===null&&(se.flags|=67108866),se}function z(se,ne,ce,ge){return ne===null||ne.tag!==6?(ne=Io(ce,se.mode,ge),ne.return=se,ne):(ne=c(ne,ce),ne.return=se,ne)}function Q(se,ne,ce,ge){var Re=ce.type;return Re===N?pe(se,ne,ce.props.children,ge,ce.key):ne!==null&&(ne.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===ae&&nr(Re)===ne.type)?(ne=c(ne,ce.props),Ti(ne,ce),ne.return=se,ne):(ne=Yl(ce.type,ce.key,ce.props,null,se.mode,ge),Ti(ne,ce),ne.return=se,ne)}function ue(se,ne,ce,ge){return ne===null||ne.tag!==4||ne.stateNode.containerInfo!==ce.containerInfo||ne.stateNode.implementation!==ce.implementation?(ne=Vo(ce,se.mode,ge),ne.return=se,ne):(ne=c(ne,ce.children||[]),ne.return=se,ne)}function pe(se,ne,ce,ge,Re){return ne===null||ne.tag!==7?(ne=Qa(ce,se.mode,ge,Re),ne.return=se,ne):(ne=c(ne,ce),ne.return=se,ne)}function be(se,ne,ce){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return ne=Io(""+ne,se.mode,ce),ne.return=se,ne;if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case y:return ce=Yl(ne.type,ne.key,ne.props,null,se.mode,ce),Ti(ce,ne),ce.return=se,ce;case O:return ne=Vo(ne,se.mode,ce),ne.return=se,ne;case ae:return ne=nr(ne),be(se,ne,ce)}if(Z(ne)||M(ne))return ne=Qa(ne,se.mode,ce,null),ne.return=se,ne;if(typeof ne.then=="function")return be(se,Jl(ne),ce);if(ne.$$typeof===A)return be(se,Zl(se,ne),ce);Wl(se,ne)}return null}function de(se,ne,ce,ge){var Re=ne!==null?ne.key:null;if(typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint")return Re!==null?null:z(se,ne,""+ce,ge);if(typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:return ce.key===Re?Q(se,ne,ce,ge):null;case O:return ce.key===Re?ue(se,ne,ce,ge):null;case ae:return ce=nr(ce),de(se,ne,ce,ge)}if(Z(ce)||M(ce))return Re!==null?null:pe(se,ne,ce,ge,null);if(typeof ce.then=="function")return de(se,ne,Jl(ce),ge);if(ce.$$typeof===A)return de(se,ne,Zl(se,ce),ge);Wl(se,ce)}return null}function fe(se,ne,ce,ge,Re){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return se=se.get(ce)||null,z(ne,se,""+ge,Re);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case y:return se=se.get(ge.key===null?ce:ge.key)||null,Q(ne,se,ge,Re);case O:return se=se.get(ge.key===null?ce:ge.key)||null,ue(ne,se,ge,Re);case ae:return ge=nr(ge),fe(se,ne,ce,ge,Re)}if(Z(ge)||M(ge))return se=se.get(ce)||null,pe(ne,se,ge,Re,null);if(typeof ge.then=="function")return fe(se,ne,ce,Jl(ge),Re);if(ge.$$typeof===A)return fe(se,ne,ce,Zl(ne,ge),Re);Wl(ne,ge)}return null}function Ee(se,ne,ce,ge){for(var Re=null,We=null,Oe=ne,Le=ne=0,Pe=null;Oe!==null&&Le<ce.length;Le++){Oe.index>Le?(Pe=Oe,Oe=null):Pe=Oe.sibling;var et=de(se,Oe,ce[Le],ge);if(et===null){Oe===null&&(Oe=Pe);break}e&&Oe&&et.alternate===null&&t(se,Oe),ne=d(et,ne,Le),We===null?Re=et:We.sibling=et,We=et,Oe=Pe}if(Le===ce.length)return a(se,Oe),Ze&&Qn(se,Le),Re;if(Oe===null){for(;Le<ce.length;Le++)Oe=be(se,ce[Le],ge),Oe!==null&&(ne=d(Oe,ne,Le),We===null?Re=Oe:We.sibling=Oe,We=Oe);return Ze&&Qn(se,Le),Re}for(Oe=i(Oe);Le<ce.length;Le++)Pe=fe(Oe,se,Le,ce[Le],ge),Pe!==null&&(e&&Pe.alternate!==null&&Oe.delete(Pe.key===null?Le:Pe.key),ne=d(Pe,ne,Le),We===null?Re=Pe:We.sibling=Pe,We=Pe);return e&&Oe.forEach(function(Ma){return t(se,Ma)}),Ze&&Qn(se,Le),Re}function ke(se,ne,ce,ge){if(ce==null)throw Error(o(151));for(var Re=null,We=null,Oe=ne,Le=ne=0,Pe=null,et=ce.next();Oe!==null&&!et.done;Le++,et=ce.next()){Oe.index>Le?(Pe=Oe,Oe=null):Pe=Oe.sibling;var Ma=de(se,Oe,et.value,ge);if(Ma===null){Oe===null&&(Oe=Pe);break}e&&Oe&&Ma.alternate===null&&t(se,Oe),ne=d(Ma,ne,Le),We===null?Re=Ma:We.sibling=Ma,We=Ma,Oe=Pe}if(et.done)return a(se,Oe),Ze&&Qn(se,Le),Re;if(Oe===null){for(;!et.done;Le++,et=ce.next())et=be(se,et.value,ge),et!==null&&(ne=d(et,ne,Le),We===null?Re=et:We.sibling=et,We=et);return Ze&&Qn(se,Le),Re}for(Oe=i(Oe);!et.done;Le++,et=ce.next())et=fe(Oe,se,Le,et.value,ge),et!==null&&(e&&et.alternate!==null&&Oe.delete(et.key===null?Le:et.key),ne=d(et,ne,Le),We===null?Re=et:We.sibling=et,We=et);return e&&Oe.forEach(function(ux){return t(se,ux)}),Ze&&Qn(se,Le),Re}function ot(se,ne,ce,ge){if(typeof ce=="object"&&ce!==null&&ce.type===N&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case y:e:{for(var Re=ce.key;ne!==null;){if(ne.key===Re){if(Re=ce.type,Re===N){if(ne.tag===7){a(se,ne.sibling),ge=c(ne,ce.props.children),ge.return=se,se=ge;break e}}else if(ne.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===ae&&nr(Re)===ne.type){a(se,ne.sibling),ge=c(ne,ce.props),Ti(ge,ce),ge.return=se,se=ge;break e}a(se,ne);break}else t(se,ne);ne=ne.sibling}ce.type===N?(ge=Qa(ce.props.children,se.mode,ge,ce.key),ge.return=se,se=ge):(ge=Yl(ce.type,ce.key,ce.props,null,se.mode,ge),Ti(ge,ce),ge.return=se,se=ge)}return x(se);case O:e:{for(Re=ce.key;ne!==null;){if(ne.key===Re)if(ne.tag===4&&ne.stateNode.containerInfo===ce.containerInfo&&ne.stateNode.implementation===ce.implementation){a(se,ne.sibling),ge=c(ne,ce.children||[]),ge.return=se,se=ge;break e}else{a(se,ne);break}else t(se,ne);ne=ne.sibling}ge=Vo(ce,se.mode,ge),ge.return=se,se=ge}return x(se);case ae:return ce=nr(ce),ot(se,ne,ce,ge)}if(Z(ce))return Ee(se,ne,ce,ge);if(M(ce)){if(Re=M(ce),typeof Re!="function")throw Error(o(150));return ce=Re.call(ce),ke(se,ne,ce,ge)}if(typeof ce.then=="function")return ot(se,ne,Jl(ce),ge);if(ce.$$typeof===A)return ot(se,ne,Zl(se,ce),ge);Wl(se,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"||typeof ce=="bigint"?(ce=""+ce,ne!==null&&ne.tag===6?(a(se,ne.sibling),ge=c(ne,ce),ge.return=se,se=ge):(a(se,ne),ge=Io(ce,se.mode,ge),ge.return=se,se=ge),x(se)):a(se,ne)}return function(se,ne,ce,ge){try{Ni=0;var Re=ot(se,ne,ce,ge);return zr=null,Re}catch(Oe){if(Oe===Dr||Oe===Kl)throw Oe;var We=on(29,Oe,null,se.mode);return We.lanes=ge,We.return=se,We}}}var rr=Bf(!0),$f=Bf(!1),xa=!1;function nc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ac(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Sa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ja(e,t,a){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(tt&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,t=Vl(e),jf(e,null,a),t}return Il(e,i,t,a),Vl(e)}function Ei(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,El(e,a)}}function rc(e,t){var a=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,a===i)){var c=null,d=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};d===null?c=d=x:d=d.next=x,a=a.next}while(a!==null);d===null?c=d=t:d=d.next=t}else c=d=t;a={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:i.shared,callbacks:i.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var ic=!1;function Ci(){if(ic){var e=kr;if(e!==null)throw e}}function Oi(e,t,a,i){ic=!1;var c=e.updateQueue;xa=!1;var d=c.firstBaseUpdate,x=c.lastBaseUpdate,z=c.shared.pending;if(z!==null){c.shared.pending=null;var Q=z,ue=Q.next;Q.next=null,x===null?d=ue:x.next=ue,x=Q;var pe=e.alternate;pe!==null&&(pe=pe.updateQueue,z=pe.lastBaseUpdate,z!==x&&(z===null?pe.firstBaseUpdate=ue:z.next=ue,pe.lastBaseUpdate=Q))}if(d!==null){var be=c.baseState;x=0,pe=ue=Q=null,z=d;do{var de=z.lane&-536870913,fe=de!==z.lane;if(fe?(Fe&de)===de:(i&de)===de){de!==0&&de===Rr&&(ic=!0),pe!==null&&(pe=pe.next={lane:0,tag:z.tag,payload:z.payload,callback:null,next:null});e:{var Ee=e,ke=z;de=t;var ot=a;switch(ke.tag){case 1:if(Ee=ke.payload,typeof Ee=="function"){be=Ee.call(ot,be,de);break e}be=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=ke.payload,de=typeof Ee=="function"?Ee.call(ot,be,de):Ee,de==null)break e;be=b({},be,de);break e;case 2:xa=!0}}de=z.callback,de!==null&&(e.flags|=64,fe&&(e.flags|=8192),fe=c.callbacks,fe===null?c.callbacks=[de]:fe.push(de))}else fe={lane:de,tag:z.tag,payload:z.payload,callback:z.callback,next:null},pe===null?(ue=pe=fe,Q=be):pe=pe.next=fe,x|=de;if(z=z.next,z===null){if(z=c.shared.pending,z===null)break;fe=z,z=fe.next,fe.next=null,c.lastBaseUpdate=fe,c.shared.pending=null}}while(!0);pe===null&&(Q=be),c.baseState=Q,c.firstBaseUpdate=ue,c.lastBaseUpdate=pe,d===null&&(c.shared.lanes=0),Ea|=x,e.lanes=x,e.memoizedState=be}}function Hf(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function qf(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Hf(a[e],t)}var Ur=v(null),es=v(0);function Gf(e,t){e=oa,$(es,e),$(Ur,t),oa=e|t.baseLanes}function lc(){$(es,oa),$(Ur,Ur.current)}function sc(){oa=es.current,R(Ur),R(es)}var cn=v(null),wn=null;function wa(e){var t=e.alternate;$(Et,Et.current&1),$(cn,e),wn===null&&(t===null||Ur.current!==null||t.memoizedState!==null)&&(wn=e)}function oc(e){$(Et,Et.current),$(cn,e),wn===null&&(wn=e)}function If(e){e.tag===22?($(Et,Et.current),$(cn,e),wn===null&&(wn=e)):_a()}function _a(){$(Et,Et.current),$(cn,cn.current)}function un(e){R(cn),wn===e&&(wn=null),R(Et)}var Et=v(0);function ts(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||pu(a)||mu(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ea=0,Ue=null,lt=null,zt=null,ns=!1,Lr=!1,ir=!1,as=0,Ai=0,Mr=null,eb=0;function xt(){throw Error(o(321))}function cc(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!sn(e[a],t[a]))return!1;return!0}function uc(e,t,a,i,c,d){return ea=d,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Y.H=e===null||e.memoizedState===null?Th:Nc,ir=!1,d=a(i,c),ir=!1,Lr&&(d=Yf(t,a,i,c)),Vf(e),d}function Vf(e){Y.H=Di;var t=lt!==null&<.next!==null;if(ea=0,zt=lt=Ue=null,ns=!1,Ai=0,Mr=null,t)throw Error(o(300));e===null||Ut||(e=e.dependencies,e!==null&&Pl(e)&&(Ut=!0))}function Yf(e,t,a,i){Ue=e;var c=0;do{if(Lr&&(Mr=null),Ai=0,Lr=!1,25<=c)throw Error(o(301));if(c+=1,zt=lt=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}Y.H=Eh,d=t(a,i)}while(Lr);return d}function tb(){var e=Y.H,t=e.useState()[0];return t=typeof t.then=="function"?Ri(t):t,e=e.useState()[0],(lt!==null?lt.memoizedState:null)!==e&&(Ue.flags|=1024),t}function dc(){var e=as!==0;return as=0,e}function fc(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function hc(e){if(ns){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ns=!1}ea=0,zt=lt=Ue=null,Lr=!1,Ai=as=0,Mr=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?Ue.memoizedState=zt=e:zt=zt.next=e,zt}function Ct(){if(lt===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=zt===null?Ue.memoizedState:zt.next;if(t!==null)zt=t,lt=e;else{if(e===null)throw Ue.alternate===null?Error(o(467)):Error(o(310));lt=e,e={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},zt===null?Ue.memoizedState=zt=e:zt=zt.next=e}return zt}function rs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ri(e){var t=Ai;return Ai+=1,Mr===null&&(Mr=[]),e=Uf(Mr,e,t),t=Ue,(zt===null?t.memoizedState:zt.next)===null&&(t=t.alternate,Y.H=t===null||t.memoizedState===null?Th:Nc),e}function is(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ri(e);if(e.$$typeof===A)return Gt(e)}throw Error(o(438,String(e)))}function pc(e){var t=null,a=Ue.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var i=Ue.alternate;i!==null&&(i=i.updateQueue,i!==null&&(i=i.memoCache,i!=null&&(t={data:i.data.map(function(c){return c.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=rs(),Ue.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),i=0;i<e;i++)a[i]=F;return t.index++,a}function ta(e,t){return typeof t=="function"?t(e):t}function ls(e){var t=Ct();return mc(t,lt,e)}function mc(e,t,a){var i=e.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=a;var c=e.baseQueue,d=i.pending;if(d!==null){if(c!==null){var x=c.next;c.next=d.next,d.next=x}t.baseQueue=c=d,i.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{t=c.next;var z=x=null,Q=null,ue=t,pe=!1;do{var be=ue.lane&-536870913;if(be!==ue.lane?(Fe&be)===be:(ea&be)===be){var de=ue.revertLane;if(de===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null}),be===Rr&&(pe=!0);else if((ea&de)===de){ue=ue.next,de===Rr&&(pe=!0);continue}else be={lane:0,revertLane:ue.revertLane,gesture:null,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Q===null?(z=Q=be,x=d):Q=Q.next=be,Ue.lanes|=de,Ea|=de;be=ue.action,ir&&a(d,be),d=ue.hasEagerState?ue.eagerState:a(d,be)}else de={lane:be,revertLane:ue.revertLane,gesture:ue.gesture,action:ue.action,hasEagerState:ue.hasEagerState,eagerState:ue.eagerState,next:null},Q===null?(z=Q=de,x=d):Q=Q.next=de,Ue.lanes|=be,Ea|=be;ue=ue.next}while(ue!==null&&ue!==t);if(Q===null?x=d:Q.next=z,!sn(d,e.memoizedState)&&(Ut=!0,pe&&(a=kr,a!==null)))throw a;e.memoizedState=d,e.baseState=x,e.baseQueue=Q,i.lastRenderedState=d}return c===null&&(i.lanes=0),[e.memoizedState,i.dispatch]}function gc(e){var t=Ct(),a=t.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=e;var i=a.dispatch,c=a.pending,d=t.memoizedState;if(c!==null){a.pending=null;var x=c=c.next;do d=e(d,x.action),x=x.next;while(x!==c);sn(d,t.memoizedState)||(Ut=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),a.lastRenderedState=d}return[d,i]}function Ff(e,t,a){var i=Ue,c=Ct(),d=Ze;if(d){if(a===void 0)throw Error(o(407));a=a()}else a=t();var x=!sn((lt||c).memoizedState,a);if(x&&(c.memoizedState=a,Ut=!0),c=c.queue,bc(Xf.bind(null,i,c,e),[e]),c.getSnapshot!==t||x||zt!==null&&zt.memoizedState.tag&1){if(i.flags|=2048,Br(9,{destroy:void 0},Zf.bind(null,i,c,a,t),null),dt===null)throw Error(o(349));d||(ea&127)!==0||Pf(i,t,a)}return a}function Pf(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ue.updateQueue,t===null?(t=rs(),Ue.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Zf(e,t,a,i){t.value=a,t.getSnapshot=i,Kf(t)&&Qf(e)}function Xf(e,t,a){return a(function(){Kf(t)&&Qf(e)})}function Kf(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!sn(e,a)}catch{return!0}}function Qf(e){var t=Ka(e,2);t!==null&&ln(t,e,2)}function vc(e){var t=Kt();if(typeof e=="function"){var a=e;if(e=a(),ir){Je(!0);try{a()}finally{Je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:e},t}function Jf(e,t,a,i){return e.baseState=a,mc(e,lt,typeof i=="function"?i:ta)}function nb(e,t,a,i,c){if(cs(e))throw Error(o(485));if(e=t.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){d.listeners.push(x)}};Y.T!==null?a(!0):d.isTransition=!1,i(d),a=t.pending,a===null?(d.next=t.pending=d,Wf(t,d)):(d.next=a.next,t.pending=a.next=d)}}function Wf(e,t){var a=t.action,i=t.payload,c=e.state;if(t.isTransition){var d=Y.T,x={};Y.T=x;try{var z=a(c,i),Q=Y.S;Q!==null&&Q(x,z),eh(e,t,z)}catch(ue){yc(e,t,ue)}finally{d!==null&&x.types!==null&&(d.types=x.types),Y.T=d}}else try{d=a(c,i),eh(e,t,d)}catch(ue){yc(e,t,ue)}}function eh(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(i){th(e,t,i)},function(i){return yc(e,t,i)}):th(e,t,a)}function th(e,t,a){t.status="fulfilled",t.value=a,nh(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,Wf(e,a)))}function yc(e,t,a){var i=e.pending;if(e.pending=null,i!==null){i=i.next;do t.status="rejected",t.reason=a,nh(t),t=t.next;while(t!==i)}e.action=null}function nh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ah(e,t){return t}function rh(e,t){if(Ze){var a=dt.formState;if(a!==null){e:{var i=Ue;if(Ze){if(ht){t:{for(var c=ht,d=jn;c.nodeType!==8;){if(!d){c=null;break t}if(c=_n(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){ht=_n(c.nextSibling),i=c.data==="F!";break e}}ya(i)}i=!1}i&&(t=a[0])}}return a=Kt(),a.memoizedState=a.baseState=t,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ah,lastRenderedState:t},a.queue=i,a=wh.bind(null,Ue,i),i.dispatch=a,i=vc(!1),d=_c.bind(null,Ue,!1,i.queue),i=Kt(),c={state:t,dispatch:null,action:e,pending:null},i.queue=c,a=nb.bind(null,Ue,c,d,a),c.dispatch=a,i.memoizedState=e,[t,a,!1]}function ih(e){var t=Ct();return lh(t,lt,e)}function lh(e,t,a){if(t=mc(e,t,ah)[0],e=ls(ta)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var i=Ri(t)}catch(x){throw x===Dr?Kl:x}else i=t;t=Ct();var c=t.queue,d=c.dispatch;return a!==t.memoizedState&&(Ue.flags|=2048,Br(9,{destroy:void 0},ab.bind(null,c,a),null)),[i,d,e]}function ab(e,t){e.action=t}function sh(e){var t=Ct(),a=lt;if(a!==null)return lh(t,a,e);Ct(),t=t.memoizedState,a=Ct();var i=a.queue.dispatch;return a.memoizedState=e,[t,i,!1]}function Br(e,t,a,i){return e={tag:e,create:a,deps:i,inst:t,next:null},t=Ue.updateQueue,t===null&&(t=rs(),Ue.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(i=a.next,a.next=e,e.next=i,t.lastEffect=e),e}function oh(){return Ct().memoizedState}function ss(e,t,a,i){var c=Kt();Ue.flags|=e,c.memoizedState=Br(1|t,{destroy:void 0},a,i===void 0?null:i)}function os(e,t,a,i){var c=Ct();i=i===void 0?null:i;var d=c.memoizedState.inst;lt!==null&&i!==null&&cc(i,lt.memoizedState.deps)?c.memoizedState=Br(t,d,a,i):(Ue.flags|=e,c.memoizedState=Br(1|t,d,a,i))}function ch(e,t){ss(8390656,8,e,t)}function bc(e,t){os(2048,8,e,t)}function rb(e){Ue.flags|=4;var t=Ue.updateQueue;if(t===null)t=rs(),Ue.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function uh(e){var t=Ct().memoizedState;return rb({ref:t,nextImpl:e}),function(){if((tt&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function dh(e,t){return os(4,2,e,t)}function fh(e,t){return os(4,4,e,t)}function hh(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ph(e,t,a){a=a!=null?a.concat([e]):null,os(4,4,hh.bind(null,t,e),a)}function xc(){}function mh(e,t){var a=Ct();t=t===void 0?null:t;var i=a.memoizedState;return t!==null&&cc(t,i[1])?i[0]:(a.memoizedState=[e,t],e)}function gh(e,t){var a=Ct();t=t===void 0?null:t;var i=a.memoizedState;if(t!==null&&cc(t,i[1]))return i[0];if(i=e(),ir){Je(!0);try{e()}finally{Je(!1)}}return a.memoizedState=[i,t],i}function Sc(e,t,a){return a===void 0||(ea&1073741824)!==0&&(Fe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=vp(),Ue.lanes|=e,Ea|=e,a)}function vh(e,t,a,i){return sn(a,t)?a:Ur.current!==null?(e=Sc(e,a,i),sn(e,t)||(Ut=!0),e):(ea&42)===0||(ea&1073741824)!==0&&(Fe&261930)===0?(Ut=!0,e.memoizedState=a):(e=vp(),Ue.lanes|=e,Ea|=e,t)}function yh(e,t,a,i,c){var d=P.p;P.p=d!==0&&8>d?d:8;var x=Y.T,z={};Y.T=z,_c(e,!1,t,a);try{var Q=c(),ue=Y.S;if(ue!==null&&ue(z,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var pe=Wy(Q,i);ki(e,t,pe,hn(e))}else ki(e,t,i,hn(e))}catch(be){ki(e,t,{then:function(){},status:"rejected",reason:be},hn())}finally{P.p=d,x!==null&&z.types!==null&&(x.types=z.types),Y.T=x}}function ib(){}function jc(e,t,a,i){if(e.tag!==5)throw Error(o(476));var c=bh(e).queue;yh(e,c,t,X,a===null?ib:function(){return xh(e),a(i)})}function bh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:X,baseState:X,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:X},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ta,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xh(e){var t=bh(e);t.next===null&&(t=e.alternate.memoizedState),ki(e,t.next.queue,{},hn())}function wc(){return Gt(Xi)}function Sh(){return Ct().memoizedState}function jh(){return Ct().memoizedState}function lb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=hn();e=Sa(a);var i=ja(t,e,a);i!==null&&(ln(i,t,a),Ei(i,t,a)),t={cache:Jo()},e.payload=t;return}t=t.return}}function sb(e,t,a){var i=hn();a={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},cs(e)?_h(t,a):(a=qo(e,t,a,i),a!==null&&(ln(a,e,i),Nh(a,t,i)))}function wh(e,t,a){var i=hn();ki(e,t,a,i)}function ki(e,t,a,i){var c={lane:i,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(cs(e))_h(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var x=t.lastRenderedState,z=d(x,a);if(c.hasEagerState=!0,c.eagerState=z,sn(z,x))return Il(e,t,c,0),dt===null&&Gl(),!1}catch{}if(a=qo(e,t,c,i),a!==null)return ln(a,e,i),Nh(a,t,i),!0}return!1}function _c(e,t,a,i){if(i={lane:2,revertLane:nu(),gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},cs(e)){if(t)throw Error(o(479))}else t=qo(e,a,i,2),t!==null&&ln(t,e,2)}function cs(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function _h(e,t){Lr=ns=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function Nh(e,t,a){if((a&4194048)!==0){var i=t.lanes;i&=e.pendingLanes,a|=i,t.lanes=a,El(e,a)}}var Di={readContext:Gt,use:is,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};Di.useEffectEvent=xt;var Th={readContext:Gt,use:is,useCallback:function(e,t){return Kt().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:ch,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,ss(4194308,4,hh.bind(null,t,e),a)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var a=Kt();t=t===void 0?null:t;var i=e();if(ir){Je(!0);try{e()}finally{Je(!1)}}return a.memoizedState=[i,t],i},useReducer:function(e,t,a){var i=Kt();if(a!==void 0){var c=a(t);if(ir){Je(!0);try{a(t)}finally{Je(!1)}}}else c=t;return i.memoizedState=i.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},i.queue=e,e=e.dispatch=sb.bind(null,Ue,e),[i.memoizedState,e]},useRef:function(e){var t=Kt();return e={current:e},t.memoizedState=e},useState:function(e){e=vc(e);var t=e.queue,a=wh.bind(null,Ue,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:xc,useDeferredValue:function(e,t){var a=Kt();return Sc(a,e,t)},useTransition:function(){var e=vc(!1);return e=yh.bind(null,Ue,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var i=Ue,c=Kt();if(Ze){if(a===void 0)throw Error(o(407));a=a()}else{if(a=t(),dt===null)throw Error(o(349));(Fe&127)!==0||Pf(i,t,a)}c.memoizedState=a;var d={value:a,getSnapshot:t};return c.queue=d,ch(Xf.bind(null,i,d,e),[e]),i.flags|=2048,Br(9,{destroy:void 0},Zf.bind(null,i,d,a,t),null),a},useId:function(){var e=Kt(),t=dt.identifierPrefix;if(Ze){var a=qn,i=Hn;a=(i&~(1<<32-$e(i)-1)).toString(32)+a,t="_"+t+"R_"+a,a=as++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=eb++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:wc,useFormState:rh,useActionState:rh,useOptimistic:function(e){var t=Kt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=_c.bind(null,Ue,!0,a),a.dispatch=t,[e,t]},useMemoCache:pc,useCacheRefresh:function(){return Kt().memoizedState=lb.bind(null,Ue)},useEffectEvent:function(e){var t=Kt(),a={impl:e};return t.memoizedState=a,function(){if((tt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},Nc={readContext:Gt,use:is,useCallback:mh,useContext:Gt,useEffect:bc,useImperativeHandle:ph,useInsertionEffect:dh,useLayoutEffect:fh,useMemo:gh,useReducer:ls,useRef:oh,useState:function(){return ls(ta)},useDebugValue:xc,useDeferredValue:function(e,t){var a=Ct();return vh(a,lt.memoizedState,e,t)},useTransition:function(){var e=ls(ta)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:Ri(e),t]},useSyncExternalStore:Ff,useId:Sh,useHostTransitionStatus:wc,useFormState:ih,useActionState:ih,useOptimistic:function(e,t){var a=Ct();return Jf(a,lt,e,t)},useMemoCache:pc,useCacheRefresh:jh};Nc.useEffectEvent=uh;var Eh={readContext:Gt,use:is,useCallback:mh,useContext:Gt,useEffect:bc,useImperativeHandle:ph,useInsertionEffect:dh,useLayoutEffect:fh,useMemo:gh,useReducer:gc,useRef:oh,useState:function(){return gc(ta)},useDebugValue:xc,useDeferredValue:function(e,t){var a=Ct();return lt===null?Sc(a,e,t):vh(a,lt.memoizedState,e,t)},useTransition:function(){var e=gc(ta)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:Ri(e),t]},useSyncExternalStore:Ff,useId:Sh,useHostTransitionStatus:wc,useFormState:sh,useActionState:sh,useOptimistic:function(e,t){var a=Ct();return lt!==null?Jf(a,lt,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:pc,useCacheRefresh:jh};Eh.useEffectEvent=uh;function Tc(e,t,a,i){t=e.memoizedState,a=a(i,t),a=a==null?t:b({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Ec={enqueueSetState:function(e,t,a){e=e._reactInternals;var i=hn(),c=Sa(i);c.payload=t,a!=null&&(c.callback=a),t=ja(e,c,i),t!==null&&(ln(t,e,i),Ei(t,e,i))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var i=hn(),c=Sa(i);c.tag=1,c.payload=t,a!=null&&(c.callback=a),t=ja(e,c,i),t!==null&&(ln(t,e,i),Ei(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=hn(),i=Sa(a);i.tag=2,t!=null&&(i.callback=t),t=ja(e,i,a),t!==null&&(ln(t,e,a),Ei(t,e,a))}};function Ch(e,t,a,i,c,d,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,d,x):t.prototype&&t.prototype.isPureReactComponent?!bi(a,i)||!bi(c,d):!0}function Oh(e,t,a,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,i),t.state!==e&&Ec.enqueueReplaceState(t,t.state,null)}function lr(e,t){var a=t;if("ref"in t){a={};for(var i in t)i!=="ref"&&(a[i]=t[i])}if(e=e.defaultProps){a===t&&(a=b({},a));for(var c in e)a[c]===void 0&&(a[c]=e[c])}return a}function Ah(e){ql(e)}function Rh(e){console.error(e)}function kh(e){ql(e)}function us(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(i){setTimeout(function(){throw i})}}function Dh(e,t,a){try{var i=e.onCaughtError;i(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Cc(e,t,a){return a=Sa(a),a.tag=3,a.payload={element:null},a.callback=function(){us(e,t)},a}function zh(e){return e=Sa(e),e.tag=3,e}function Uh(e,t,a,i){var c=a.type.getDerivedStateFromError;if(typeof c=="function"){var d=i.value;e.payload=function(){return c(d)},e.callback=function(){Dh(t,a,i)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){Dh(t,a,i),typeof c!="function"&&(Ca===null?Ca=new Set([this]):Ca.add(this));var z=i.stack;this.componentDidCatch(i.value,{componentStack:z!==null?z:""})})}function ob(e,t,a,i,c){if(a.flags|=32768,i!==null&&typeof i=="object"&&typeof i.then=="function"){if(t=a.alternate,t!==null&&Ar(t,a,c,!0),a=cn.current,a!==null){switch(a.tag){case 31:case 13:return wn===null?js():a.alternate===null&&St===0&&(St=3),a.flags&=-257,a.flags|=65536,a.lanes=c,i===Ql?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([i]):t.add(i),Wc(e,i,c)),!1;case 22:return a.flags|=65536,i===Ql?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([i])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([i]):a.add(i)),Wc(e,i,c)),!1}throw Error(o(435,a.tag))}return Wc(e,i,c),js(),!1}if(Ze)return t=cn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=c,i!==Po&&(e=Error(o(422),{cause:i}),ji(bn(e,a)))):(i!==Po&&(t=Error(o(423),{cause:i}),ji(bn(t,a))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,i=bn(i,a),c=Cc(e.stateNode,i,c),rc(e,c),St!==4&&(St=2)),!1;var d=Error(o(520),{cause:i});if(d=bn(d,a),qi===null?qi=[d]:qi.push(d),St!==4&&(St=2),t===null)return!0;i=bn(i,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=c&-c,a.lanes|=e,e=Cc(a.stateNode,i,e),rc(a,e),!1;case 1:if(t=a.type,d=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Ca===null||!Ca.has(d))))return a.flags|=65536,c&=-c,a.lanes|=c,c=zh(c),Uh(c,e,a,i),rc(a,c),!1}a=a.return}while(a!==null);return!1}var Oc=Error(o(461)),Ut=!1;function It(e,t,a,i){t.child=e===null?$f(t,null,a,i):rr(t,e.child,a,i)}function Lh(e,t,a,i,c){a=a.render;var d=t.ref;if("ref"in i){var x={};for(var z in i)z!=="ref"&&(x[z]=i[z])}else x=i;return er(t),i=uc(e,t,a,x,d,c),z=dc(),e!==null&&!Ut?(fc(e,t,c),na(e,t,c)):(Ze&&z&&Yo(t),t.flags|=1,It(e,t,i,c),t.child)}function Mh(e,t,a,i,c){if(e===null){var d=a.type;return typeof d=="function"&&!Go(d)&&d.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=d,Bh(e,t,d,i,c)):(e=Yl(a.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Mc(e,c)){var x=d.memoizedProps;if(a=a.compare,a=a!==null?a:bi,a(x,i)&&e.ref===t.ref)return na(e,t,c)}return t.flags|=1,e=Kn(d,i),e.ref=t.ref,e.return=t,t.child=e}function Bh(e,t,a,i,c){if(e!==null){var d=e.memoizedProps;if(bi(d,i)&&e.ref===t.ref)if(Ut=!1,t.pendingProps=i=d,Mc(e,c))(e.flags&131072)!==0&&(Ut=!0);else return t.lanes=e.lanes,na(e,t,c)}return Ac(e,t,a,i,c)}function $h(e,t,a,i){var c=i.children,d=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.mode==="hidden"){if((t.flags&128)!==0){if(d=d!==null?d.baseLanes|a:a,e!==null){for(i=t.child=e.child,c=0;i!==null;)c=c|i.lanes|i.childLanes,i=i.sibling;i=c&~d}else i=0,t.child=null;return Hh(e,t,d,a,i)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xl(t,d!==null?d.cachePool:null),d!==null?Gf(t,d):lc(),If(t);else return i=t.lanes=536870912,Hh(e,t,d!==null?d.baseLanes|a:a,a,i)}else d!==null?(Xl(t,d.cachePool),Gf(t,d),_a(),t.memoizedState=null):(e!==null&&Xl(t,null),lc(),_a());return It(e,t,c,a),t.child}function zi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Hh(e,t,a,i,c){var d=ec();return d=d===null?null:{parent:Dt._currentValue,pool:d},t.memoizedState={baseLanes:a,cachePool:d},e!==null&&Xl(t,null),lc(),If(t),e!==null&&Ar(e,t,i,!0),t.childLanes=c,null}function ds(e,t){return t=hs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qh(e,t,a){return rr(t,e.child,null,a),e=ds(t,t.pendingProps),e.flags|=2,un(t),t.memoizedState=null,e}function cb(e,t,a){var i=t.pendingProps,c=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ze){if(i.mode==="hidden")return e=ds(t,i),t.lanes=536870912,zi(null,e);if(oc(t),(e=ht)?(e=Wp(e,jn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ga!==null?{id:Hn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},a=_f(e),a.return=t,t.child=a,qt=t,ht=null)):e=null,e===null)throw ya(t);return t.lanes=536870912,null}return ds(t,i)}var d=e.memoizedState;if(d!==null){var x=d.dehydrated;if(oc(t),c)if(t.flags&256)t.flags&=-257,t=qh(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Ut||Ar(e,t,a,!1),c=(a&e.childLanes)!==0,Ut||c){if(i=dt,i!==null&&(x=On(i,a),x!==0&&x!==d.retryLane))throw d.retryLane=x,Ka(e,x),ln(i,e,x),Oc;js(),t=qh(e,t,a)}else e=d.treeContext,ht=_n(x.nextSibling),qt=t,Ze=!0,va=null,jn=!1,e!==null&&Ef(t,e),t=ds(t,i),t.flags|=4096;return t}return e=Kn(e.child,{mode:i.mode,children:i.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function Ac(e,t,a,i,c){return er(t),a=uc(e,t,a,i,void 0,c),i=dc(),e!==null&&!Ut?(fc(e,t,c),na(e,t,c)):(Ze&&i&&Yo(t),t.flags|=1,It(e,t,a,c),t.child)}function Gh(e,t,a,i,c,d){return er(t),t.updateQueue=null,a=Yf(t,i,a,c),Vf(e),i=dc(),e!==null&&!Ut?(fc(e,t,d),na(e,t,d)):(Ze&&i&&Yo(t),t.flags|=1,It(e,t,a,d),t.child)}function Ih(e,t,a,i,c){if(er(t),t.stateNode===null){var d=Tr,x=a.contextType;typeof x=="object"&&x!==null&&(d=Gt(x)),d=new a(i,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Ec,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=i,d.state=t.memoizedState,d.refs={},nc(t),x=a.contextType,d.context=typeof x=="object"&&x!==null?Gt(x):Tr,d.state=t.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(Tc(t,a,x,i),d.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(x=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),x!==d.state&&Ec.enqueueReplaceState(d,d.state,null),Oi(t,i,d,c),Ci(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),i=!0}else if(e===null){d=t.stateNode;var z=t.memoizedProps,Q=lr(a,z);d.props=Q;var ue=d.context,pe=a.contextType;x=Tr,typeof pe=="object"&&pe!==null&&(x=Gt(pe));var be=a.getDerivedStateFromProps;pe=typeof be=="function"||typeof d.getSnapshotBeforeUpdate=="function",z=t.pendingProps!==z,pe||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(z||ue!==x)&&Oh(t,d,i,x),xa=!1;var de=t.memoizedState;d.state=de,Oi(t,i,d,c),Ci(),ue=t.memoizedState,z||de!==ue||xa?(typeof be=="function"&&(Tc(t,a,be,i),ue=t.memoizedState),(Q=xa||Ch(t,a,Q,i,de,ue,x))?(pe||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=ue),d.props=i,d.state=ue,d.context=x,i=Q):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{d=t.stateNode,ac(e,t),x=t.memoizedProps,pe=lr(a,x),d.props=pe,be=t.pendingProps,de=d.context,ue=a.contextType,Q=Tr,typeof ue=="object"&&ue!==null&&(Q=Gt(ue)),z=a.getDerivedStateFromProps,(ue=typeof z=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(x!==be||de!==Q)&&Oh(t,d,i,Q),xa=!1,de=t.memoizedState,d.state=de,Oi(t,i,d,c),Ci();var fe=t.memoizedState;x!==be||de!==fe||xa||e!==null&&e.dependencies!==null&&Pl(e.dependencies)?(typeof z=="function"&&(Tc(t,a,z,i),fe=t.memoizedState),(pe=xa||Ch(t,a,pe,i,de,fe,Q)||e!==null&&e.dependencies!==null&&Pl(e.dependencies))?(ue||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(i,fe,Q),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(i,fe,Q)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=fe),d.props=i,d.state=fe,d.context=Q,i=pe):(typeof d.componentDidUpdate!="function"||x===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),i=!1)}return d=i,fs(e,t),i=(t.flags&128)!==0,d||i?(d=t.stateNode,a=i&&typeof a.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&i?(t.child=rr(t,e.child,null,c),t.child=rr(t,null,a,c)):It(e,t,a,c),t.memoizedState=d.state,e=t.child):e=na(e,t,c),e}function Vh(e,t,a,i){return Ja(),t.flags|=256,It(e,t,a,i),t.child}var Rc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kc(e){return{baseLanes:e,cachePool:Df()}}function Dc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=fn),e}function Yh(e,t,a){var i=t.pendingProps,c=!1,d=(t.flags&128)!==0,x;if((x=d)||(x=e!==null&&e.memoizedState===null?!1:(Et.current&2)!==0),x&&(c=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ze){if(c?wa(t):_a(),(e=ht)?(e=Wp(e,jn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ga!==null?{id:Hn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},a=_f(e),a.return=t,t.child=a,qt=t,ht=null)):e=null,e===null)throw ya(t);return mu(e)?t.lanes=32:t.lanes=536870912,null}var z=i.children;return i=i.fallback,c?(_a(),c=t.mode,z=hs({mode:"hidden",children:z},c),i=Qa(i,c,a,null),z.return=t,i.return=t,z.sibling=i,t.child=z,i=t.child,i.memoizedState=kc(a),i.childLanes=Dc(e,x,a),t.memoizedState=Rc,zi(null,i)):(wa(t),zc(t,z))}var Q=e.memoizedState;if(Q!==null&&(z=Q.dehydrated,z!==null)){if(d)t.flags&256?(wa(t),t.flags&=-257,t=Uc(e,t,a)):t.memoizedState!==null?(_a(),t.child=e.child,t.flags|=128,t=null):(_a(),z=i.fallback,c=t.mode,i=hs({mode:"visible",children:i.children},c),z=Qa(z,c,a,null),z.flags|=2,i.return=t,z.return=t,i.sibling=z,t.child=i,rr(t,e.child,null,a),i=t.child,i.memoizedState=kc(a),i.childLanes=Dc(e,x,a),t.memoizedState=Rc,t=zi(null,i));else if(wa(t),mu(z)){if(x=z.nextSibling&&z.nextSibling.dataset,x)var ue=x.dgst;x=ue,i=Error(o(419)),i.stack="",i.digest=x,ji({value:i,source:null,stack:null}),t=Uc(e,t,a)}else if(Ut||Ar(e,t,a,!1),x=(a&e.childLanes)!==0,Ut||x){if(x=dt,x!==null&&(i=On(x,a),i!==0&&i!==Q.retryLane))throw Q.retryLane=i,Ka(e,i),ln(x,e,i),Oc;pu(z)||js(),t=Uc(e,t,a)}else pu(z)?(t.flags|=192,t.child=e.child,t=null):(e=Q.treeContext,ht=_n(z.nextSibling),qt=t,Ze=!0,va=null,jn=!1,e!==null&&Ef(t,e),t=zc(t,i.children),t.flags|=4096);return t}return c?(_a(),z=i.fallback,c=t.mode,Q=e.child,ue=Q.sibling,i=Kn(Q,{mode:"hidden",children:i.children}),i.subtreeFlags=Q.subtreeFlags&65011712,ue!==null?z=Kn(ue,z):(z=Qa(z,c,a,null),z.flags|=2),z.return=t,i.return=t,i.sibling=z,t.child=i,zi(null,i),i=t.child,z=e.child.memoizedState,z===null?z=kc(a):(c=z.cachePool,c!==null?(Q=Dt._currentValue,c=c.parent!==Q?{parent:Q,pool:Q}:c):c=Df(),z={baseLanes:z.baseLanes|a,cachePool:c}),i.memoizedState=z,i.childLanes=Dc(e,x,a),t.memoizedState=Rc,zi(e.child,i)):(wa(t),a=e.child,e=a.sibling,a=Kn(a,{mode:"visible",children:i.children}),a.return=t,a.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=a,t.memoizedState=null,a)}function zc(e,t){return t=hs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function hs(e,t){return e=on(22,e,null,t),e.lanes=0,e}function Uc(e,t,a){return rr(t,e.child,null,a),e=zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Fh(e,t,a){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Ko(e.return,t,a)}function Lc(e,t,a,i,c,d){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:a,tailMode:c,treeForkCount:d}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=i,x.tail=a,x.tailMode=c,x.treeForkCount=d)}function Ph(e,t,a){var i=t.pendingProps,c=i.revealOrder,d=i.tail;i=i.children;var x=Et.current,z=(x&2)!==0;if(z?(x=x&1|2,t.flags|=128):x&=1,$(Et,x),It(e,t,i,a),i=Ze?Si:0,!z&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Fh(e,a,t);else if(e.tag===19)Fh(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(c){case"forwards":for(a=t.child,c=null;a!==null;)e=a.alternate,e!==null&&ts(e)===null&&(c=a),a=a.sibling;a=c,a===null?(c=t.child,t.child=null):(c=a.sibling,a.sibling=null),Lc(t,!1,c,a,d,i);break;case"backwards":case"unstable_legacy-backwards":for(a=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&ts(e)===null){t.child=c;break}e=c.sibling,c.sibling=a,a=c,c=e}Lc(t,!0,a,null,d,i);break;case"together":Lc(t,!1,null,null,void 0,i);break;default:t.memoizedState=null}return t.child}function na(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ea|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(Ar(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,a=Kn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Kn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Mc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Pl(e)))}function ub(e,t,a){switch(t.tag){case 3:_e(t,t.stateNode.containerInfo),ba(t,Dt,e.memoizedState.cache),Ja();break;case 27:case 5:we(t);break;case 4:_e(t,t.stateNode.containerInfo);break;case 10:ba(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,oc(t),null;break;case 13:var i=t.memoizedState;if(i!==null)return i.dehydrated!==null?(wa(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Yh(e,t,a):(wa(t),e=na(e,t,a),e!==null?e.sibling:null);wa(t);break;case 19:var c=(e.flags&128)!==0;if(i=(a&t.childLanes)!==0,i||(Ar(e,t,a,!1),i=(a&t.childLanes)!==0),c){if(i)return Ph(e,t,a);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),$(Et,Et.current),i)break;return null;case 22:return t.lanes=0,$h(e,t,a,t.pendingProps);case 24:ba(t,Dt,e.memoizedState.cache)}return na(e,t,a)}function Zh(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ut=!0;else{if(!Mc(e,a)&&(t.flags&128)===0)return Ut=!1,ub(e,t,a);Ut=(e.flags&131072)!==0}else Ut=!1,Ze&&(t.flags&1048576)!==0&&Tf(t,Si,t.index);switch(t.lanes=0,t.tag){case 16:e:{var i=t.pendingProps;if(e=nr(t.elementType),t.type=e,typeof e=="function")Go(e)?(i=lr(e,i),t.tag=1,t=Ih(null,t,e,i,a)):(t.tag=0,t=Ac(null,t,e,i,a));else{if(e!=null){var c=e.$$typeof;if(c===H){t.tag=11,t=Lh(null,t,e,i,a);break e}else if(c===G){t.tag=14,t=Mh(null,t,e,i,a);break e}}throw t=E(e)||e,Error(o(306,t,""))}}return t;case 0:return Ac(e,t,t.type,t.pendingProps,a);case 1:return i=t.type,c=lr(i,t.pendingProps),Ih(e,t,i,c,a);case 3:e:{if(_e(t,t.stateNode.containerInfo),e===null)throw Error(o(387));i=t.pendingProps;var d=t.memoizedState;c=d.element,ac(e,t),Oi(t,i,null,a);var x=t.memoizedState;if(i=x.cache,ba(t,Dt,i),i!==d.cache&&Qo(t,[Dt],a,!0),Ci(),i=x.element,d.isDehydrated)if(d={element:i,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=Vh(e,t,i,a);break e}else if(i!==c){c=bn(Error(o(424)),t),ji(c),t=Vh(e,t,i,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ht=_n(e.firstChild),qt=t,Ze=!0,va=null,jn=!0,a=$f(t,null,i,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Ja(),i===c){t=na(e,t,a);break e}It(e,t,i,a)}t=t.child}return t;case 26:return fs(e,t),e===null?(a=im(t.type,null,t.pendingProps,null))?t.memoizedState=a:Ze||(a=t.type,e=t.pendingProps,i=Os(ve.current).createElement(a),i[Nt]=t,i[At]=e,Vt(i,a,e),Rt(i),t.stateNode=i):t.memoizedState=im(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return we(t),e===null&&Ze&&(i=t.stateNode=nm(t.type,t.pendingProps,ve.current),qt=t,jn=!0,c=ht,ka(t.type)?(gu=c,ht=_n(i.firstChild)):ht=c),It(e,t,t.pendingProps.children,a),fs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ze&&((c=i=ht)&&(i=Hb(i,t.type,t.pendingProps,jn),i!==null?(t.stateNode=i,qt=t,ht=_n(i.firstChild),jn=!1,c=!0):c=!1),c||ya(t)),we(t),c=t.type,d=t.pendingProps,x=e!==null?e.memoizedProps:null,i=d.children,du(c,d)?i=null:x!==null&&du(c,x)&&(t.flags|=32),t.memoizedState!==null&&(c=uc(e,t,tb,null,null,a),Xi._currentValue=c),fs(e,t),It(e,t,i,a),t.child;case 6:return e===null&&Ze&&((e=a=ht)&&(a=qb(a,t.pendingProps,jn),a!==null?(t.stateNode=a,qt=t,ht=null,e=!0):e=!1),e||ya(t)),null;case 13:return Yh(e,t,a);case 4:return _e(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=rr(t,null,i,a):It(e,t,i,a),t.child;case 11:return Lh(e,t,t.type,t.pendingProps,a);case 7:return It(e,t,t.pendingProps,a),t.child;case 8:return It(e,t,t.pendingProps.children,a),t.child;case 12:return It(e,t,t.pendingProps.children,a),t.child;case 10:return i=t.pendingProps,ba(t,t.type,i.value),It(e,t,i.children,a),t.child;case 9:return c=t.type._context,i=t.pendingProps.children,er(t),c=Gt(c),i=i(c),t.flags|=1,It(e,t,i,a),t.child;case 14:return Mh(e,t,t.type,t.pendingProps,a);case 15:return Bh(e,t,t.type,t.pendingProps,a);case 19:return Ph(e,t,a);case 31:return cb(e,t,a);case 22:return $h(e,t,a,t.pendingProps);case 24:return er(t),i=Gt(Dt),e===null?(c=ec(),c===null&&(c=dt,d=Jo(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=a),c=d),t.memoizedState={parent:i,cache:c},nc(t),ba(t,Dt,c)):((e.lanes&a)!==0&&(ac(e,t),Oi(t,null,null,a),Ci()),c=e.memoizedState,d=t.memoizedState,c.parent!==i?(c={parent:i,cache:i},t.memoizedState=c,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=c),ba(t,Dt,i)):(i=d.cache,ba(t,Dt,i),i!==c.cache&&Qo(t,[Dt],a,!0))),It(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function aa(e){e.flags|=4}function Bc(e,t,a,i,c){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(Sp())e.flags|=8192;else throw ar=Ql,tc}else e.flags&=-16777217}function Xh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!um(t))if(Sp())e.flags|=8192;else throw ar=Ql,tc}function ps(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?mn():536870912,e.lanes|=t,Gr|=t)}function Ui(e,t){if(!Ze)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var i=null;a!==null;)a.alternate!==null&&(i=a),a=a.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function pt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,i=0;if(t)for(var c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags&65011712,i|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)a|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=a,t}function db(e,t,a){var i=t.pendingProps;switch(Fo(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return pt(t),null;case 1:return pt(t),null;case 3:return a=t.stateNode,i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),Wn(Dt),oe(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Or(t)?aa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Zo())),pt(t),null;case 26:var c=t.type,d=t.memoizedState;return e===null?(aa(t),d!==null?(pt(t),Xh(t,d)):(pt(t),Bc(t,c,null,i,a))):d?d!==e.memoizedState?(aa(t),pt(t),Xh(t,d)):(pt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==i&&aa(t),pt(t),Bc(t,c,e,i,a)),null;case 27:if(Te(t),a=ve.current,c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&aa(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return pt(t),null}e=W.current,Or(t)?Cf(t):(e=nm(c,i,a),t.stateNode=e,aa(t))}return pt(t),null;case 5:if(Te(t),c=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==i&&aa(t);else{if(!i){if(t.stateNode===null)throw Error(o(166));return pt(t),null}if(d=W.current,Or(t))Cf(t);else{var x=Os(ve.current);switch(d){case 1:d=x.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=x.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=x.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=x.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=x.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof i.is=="string"?x.createElement("select",{is:i.is}):x.createElement("select"),i.multiple?d.multiple=!0:i.size&&(d.size=i.size);break;default:d=typeof i.is=="string"?x.createElement(c,{is:i.is}):x.createElement(c)}}d[Nt]=t,d[At]=i;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)d.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=d;e:switch(Vt(d,c,i),c){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}i&&aa(t)}}return pt(t),Bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==i&&aa(t);else{if(typeof i!="string"&&t.stateNode===null)throw Error(o(166));if(e=ve.current,Or(t)){if(e=t.stateNode,a=t.memoizedProps,i=null,c=qt,c!==null)switch(c.tag){case 27:case 5:i=c.memoizedProps}e[Nt]=t,e=!!(e.nodeValue===a||i!==null&&i.suppressHydrationWarning===!0||Yp(e.nodeValue,a)),e||ya(t,!0)}else e=Os(e).createTextNode(i),e[Nt]=t,t.stateNode=e}return pt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(i=Or(t),a!==null){if(e===null){if(!i)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[Nt]=t}else Ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),e=!1}else a=Zo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(un(t),t):(un(t),null);if((t.flags&128)!==0)throw Error(o(558))}return pt(t),null;case 13:if(i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Or(t),i!==null&&i.dehydrated!==null){if(e===null){if(!c)throw Error(o(318));if(c=t.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(o(317));c[Nt]=t}else Ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;pt(t),c=!1}else c=Zo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return t.flags&256?(un(t),t):(un(t),null)}return un(t),(t.flags&128)!==0?(t.lanes=a,t):(a=i!==null,e=e!==null&&e.memoizedState!==null,a&&(i=t.child,c=null,i.alternate!==null&&i.alternate.memoizedState!==null&&i.alternate.memoizedState.cachePool!==null&&(c=i.alternate.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==c&&(i.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ps(t,t.updateQueue),pt(t),null);case 4:return oe(),e===null&&lu(t.stateNode.containerInfo),pt(t),null;case 10:return Wn(t.type),pt(t),null;case 19:if(R(Et),i=t.memoizedState,i===null)return pt(t),null;if(c=(t.flags&128)!==0,d=i.rendering,d===null)if(c)Ui(i,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=ts(e),d!==null){for(t.flags|=128,Ui(i,!1),e=d.updateQueue,t.updateQueue=e,ps(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)wf(a,e),a=a.sibling;return $(Et,Et.current&1|2),Ze&&Qn(t,i.treeForkCount),t.child}e=e.sibling}i.tail!==null&&je()>bs&&(t.flags|=128,c=!0,Ui(i,!1),t.lanes=4194304)}else{if(!c)if(e=ts(d),e!==null){if(t.flags|=128,c=!0,e=e.updateQueue,t.updateQueue=e,ps(t,e),Ui(i,!0),i.tail===null&&i.tailMode==="hidden"&&!d.alternate&&!Ze)return pt(t),null}else 2*je()-i.renderingStartTime>bs&&a!==536870912&&(t.flags|=128,c=!0,Ui(i,!1),t.lanes=4194304);i.isBackwards?(d.sibling=t.child,t.child=d):(e=i.last,e!==null?e.sibling=d:t.child=d,i.last=d)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=je(),e.sibling=null,a=Et.current,$(Et,c?a&1|2:a&1),Ze&&Qn(t,i.treeForkCount),e):(pt(t),null);case 22:case 23:return un(t),sc(),i=t.memoizedState!==null,e!==null?e.memoizedState!==null!==i&&(t.flags|=8192):i&&(t.flags|=8192),i?(a&536870912)!==0&&(t.flags&128)===0&&(pt(t),t.subtreeFlags&6&&(t.flags|=8192)):pt(t),a=t.updateQueue,a!==null&&ps(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),i=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(i=t.memoizedState.cachePool.pool),i!==a&&(t.flags|=2048),e!==null&&R(tr),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wn(Dt),pt(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function fb(e,t){switch(Fo(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wn(Dt),oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Te(t),null;case 31:if(t.memoizedState!==null){if(un(t),t.alternate===null)throw Error(o(340));Ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(un(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return R(Et),null;case 4:return oe(),null;case 10:return Wn(t.type),null;case 22:case 23:return un(t),sc(),e!==null&&R(tr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wn(Dt),null;case 25:return null;default:return null}}function Kh(e,t){switch(Fo(t),t.tag){case 3:Wn(Dt),oe();break;case 26:case 27:case 5:Te(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&un(t);break;case 13:un(t);break;case 19:R(Et);break;case 10:Wn(t.type);break;case 22:case 23:un(t),sc(),e!==null&&R(tr);break;case 24:Wn(Dt)}}function Li(e,t){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var c=i.next;a=c;do{if((a.tag&e)===e){i=void 0;var d=a.create,x=a.inst;i=d(),x.destroy=i}a=a.next}while(a!==c)}}catch(z){rt(t,t.return,z)}}function Na(e,t,a){try{var i=t.updateQueue,c=i!==null?i.lastEffect:null;if(c!==null){var d=c.next;i=d;do{if((i.tag&e)===e){var x=i.inst,z=x.destroy;if(z!==void 0){x.destroy=void 0,c=t;var Q=a,ue=z;try{ue()}catch(pe){rt(c,Q,pe)}}}i=i.next}while(i!==d)}}catch(pe){rt(t,t.return,pe)}}function Qh(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{qf(t,a)}catch(i){rt(e,e.return,i)}}}function Jh(e,t,a){a.props=lr(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(i){rt(e,t,i)}}function Mi(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var i=e.stateNode;break;case 30:i=e.stateNode;break;default:i=e.stateNode}typeof a=="function"?e.refCleanup=a(i):a.current=i}}catch(c){rt(e,t,c)}}function Gn(e,t){var a=e.ref,i=e.refCleanup;if(a!==null)if(typeof i=="function")try{i()}catch(c){rt(e,t,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(c){rt(e,t,c)}else a.current=null}function Wh(e){var t=e.type,a=e.memoizedProps,i=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&i.focus();break e;case"img":a.src?i.src=a.src:a.srcSet&&(i.srcset=a.srcSet)}}catch(c){rt(e,e.return,c)}}function $c(e,t,a){try{var i=e.stateNode;zb(i,e.type,a,t),i[At]=t}catch(c){rt(e,e.return,c)}}function ep(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ka(e.type)||e.tag===4}function Hc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ep(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ka(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qc(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Zn));else if(i!==4&&(i===27&&ka(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(qc(e,t,a),e=e.sibling;e!==null;)qc(e,t,a),e=e.sibling}function ms(e,t,a){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(i!==4&&(i===27&&ka(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ms(e,t,a),e=e.sibling;e!==null;)ms(e,t,a),e=e.sibling}function tp(e){var t=e.stateNode,a=e.memoizedProps;try{for(var i=e.type,c=t.attributes;c.length;)t.removeAttributeNode(c[0]);Vt(t,i,a),t[Nt]=e,t[At]=a}catch(d){rt(e,e.return,d)}}var ra=!1,Lt=!1,Gc=!1,np=typeof WeakSet=="function"?WeakSet:Set,$t=null;function hb(e,t){if(e=e.containerInfo,cu=Ls,e=pf(e),Uo(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var i=a.getSelection&&a.getSelection();if(i&&i.rangeCount!==0){a=i.anchorNode;var c=i.anchorOffset,d=i.focusNode;i=i.focusOffset;try{a.nodeType,d.nodeType}catch{a=null;break e}var x=0,z=-1,Q=-1,ue=0,pe=0,be=e,de=null;t:for(;;){for(var fe;be!==a||c!==0&&be.nodeType!==3||(z=x+c),be!==d||i!==0&&be.nodeType!==3||(Q=x+i),be.nodeType===3&&(x+=be.nodeValue.length),(fe=be.firstChild)!==null;)de=be,be=fe;for(;;){if(be===e)break t;if(de===a&&++ue===c&&(z=x),de===d&&++pe===i&&(Q=x),(fe=be.nextSibling)!==null)break;be=de,de=be.parentNode}be=fe}a=z===-1||Q===-1?null:{start:z,end:Q}}else a=null}a=a||{start:0,end:0}}else a=null;for(uu={focusedElem:e,selectionRange:a},Ls=!1,$t=t;$t!==null;)if(t=$t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$t=e;else for(;$t!==null;){switch(t=$t,d=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)c=e[a],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,a=t,c=d.memoizedProps,d=d.memoizedState,i=a.stateNode;try{var Ee=lr(a.type,c);e=i.getSnapshotBeforeUpdate(Ee,d),i.__reactInternalSnapshotBeforeUpdate=e}catch(ke){rt(a,a.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)hu(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,$t=e;break}$t=t.return}}function ap(e,t,a){var i=a.flags;switch(a.tag){case 0:case 11:case 15:la(e,a),i&4&&Li(5,a);break;case 1:if(la(e,a),i&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(x){rt(a,a.return,x)}else{var c=lr(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(c,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){rt(a,a.return,x)}}i&64&&Qh(a),i&512&&Mi(a,a.return);break;case 3:if(la(e,a),i&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{qf(e,t)}catch(x){rt(a,a.return,x)}}break;case 27:t===null&&i&4&&tp(a);case 26:case 5:la(e,a),t===null&&i&4&&Wh(a),i&512&&Mi(a,a.return);break;case 12:la(e,a);break;case 31:la(e,a),i&4&&lp(e,a);break;case 13:la(e,a),i&4&&sp(e,a),i&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=jb.bind(null,a),Gb(e,a))));break;case 22:if(i=a.memoizedState!==null||ra,!i){t=t!==null&&t.memoizedState!==null||Lt,c=ra;var d=Lt;ra=i,(Lt=t)&&!d?sa(e,a,(a.subtreeFlags&8772)!==0):la(e,a),ra=c,Lt=d}break;case 30:break;default:la(e,a)}}function rp(e){var t=e.alternate;t!==null&&(e.alternate=null,rp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ui(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vt=null,tn=!1;function ia(e,t,a){for(a=a.child;a!==null;)ip(e,t,a),a=a.sibling}function ip(e,t,a){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Qe,a)}catch{}switch(a.tag){case 26:Lt||Gn(a,t),ia(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Lt||Gn(a,t);var i=vt,c=tn;ka(a.type)&&(vt=a.stateNode,tn=!1),ia(e,t,a),Fi(a.stateNode),vt=i,tn=c;break;case 5:Lt||Gn(a,t);case 6:if(i=vt,c=tn,vt=null,ia(e,t,a),vt=i,tn=c,vt!==null)if(tn)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(a.stateNode)}catch(d){rt(a,t,d)}else try{vt.removeChild(a.stateNode)}catch(d){rt(a,t,d)}break;case 18:vt!==null&&(tn?(e=vt,Qp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Kr(e)):Qp(vt,a.stateNode));break;case 4:i=vt,c=tn,vt=a.stateNode.containerInfo,tn=!0,ia(e,t,a),vt=i,tn=c;break;case 0:case 11:case 14:case 15:Na(2,a,t),Lt||Na(4,a,t),ia(e,t,a);break;case 1:Lt||(Gn(a,t),i=a.stateNode,typeof i.componentWillUnmount=="function"&&Jh(a,t,i)),ia(e,t,a);break;case 21:ia(e,t,a);break;case 22:Lt=(i=Lt)||a.memoizedState!==null,ia(e,t,a),Lt=i;break;default:ia(e,t,a)}}function lp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kr(e)}catch(a){rt(t,t.return,a)}}}function sp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kr(e)}catch(a){rt(t,t.return,a)}}function pb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new np),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new np),t;default:throw Error(o(435,e.tag))}}function gs(e,t){var a=pb(e);t.forEach(function(i){if(!a.has(i)){a.add(i);var c=wb.bind(null,e,i);i.then(c,c)}})}function nn(e,t){var a=t.deletions;if(a!==null)for(var i=0;i<a.length;i++){var c=a[i],d=e,x=t,z=x;e:for(;z!==null;){switch(z.tag){case 27:if(ka(z.type)){vt=z.stateNode,tn=!1;break e}break;case 5:vt=z.stateNode,tn=!1;break e;case 3:case 4:vt=z.stateNode.containerInfo,tn=!0;break e}z=z.return}if(vt===null)throw Error(o(160));ip(d,x,c),vt=null,tn=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)op(t,e),t=t.sibling}var kn=null;function op(e,t){var a=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:nn(t,e),an(e),i&4&&(Na(3,e,e.return),Li(3,e),Na(5,e,e.return));break;case 1:nn(t,e),an(e),i&512&&(Lt||a===null||Gn(a,a.return)),i&64&&ra&&(e=e.updateQueue,e!==null&&(i=e.callbacks,i!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:var c=kn;if(nn(t,e),an(e),i&512&&(Lt||a===null||Gn(a,a.return)),i&4){var d=a!==null?a.memoizedState:null;if(i=e.memoizedState,a===null)if(i===null)if(e.stateNode===null){e:{i=e.type,a=e.memoizedProps,c=c.ownerDocument||c;t:switch(i){case"title":d=c.getElementsByTagName("title")[0],(!d||d[Va]||d[Nt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(i),c.head.insertBefore(d,c.querySelector("head > title"))),Vt(d,i,a),d[Nt]=e,Rt(d),i=d;break e;case"link":var x=om("link","href",c).get(i+(a.href||""));if(x){for(var z=0;z<x.length;z++)if(d=x[z],d.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&d.getAttribute("rel")===(a.rel==null?null:a.rel)&&d.getAttribute("title")===(a.title==null?null:a.title)&&d.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){x.splice(z,1);break t}}d=c.createElement(i),Vt(d,i,a),c.head.appendChild(d);break;case"meta":if(x=om("meta","content",c).get(i+(a.content||""))){for(z=0;z<x.length;z++)if(d=x[z],d.getAttribute("content")===(a.content==null?null:""+a.content)&&d.getAttribute("name")===(a.name==null?null:a.name)&&d.getAttribute("property")===(a.property==null?null:a.property)&&d.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&d.getAttribute("charset")===(a.charSet==null?null:a.charSet)){x.splice(z,1);break t}}d=c.createElement(i),Vt(d,i,a),c.head.appendChild(d);break;default:throw Error(o(468,i))}d[Nt]=e,Rt(d),i=d}e.stateNode=i}else cm(c,e.type,e.stateNode);else e.stateNode=sm(c,i,e.memoizedProps);else d!==i?(d===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):d.count--,i===null?cm(c,e.type,e.stateNode):sm(c,i,e.memoizedProps)):i===null&&e.stateNode!==null&&$c(e,e.memoizedProps,a.memoizedProps)}break;case 27:nn(t,e),an(e),i&512&&(Lt||a===null||Gn(a,a.return)),a!==null&&i&4&&$c(e,e.memoizedProps,a.memoizedProps);break;case 5:if(nn(t,e),an(e),i&512&&(Lt||a===null||Gn(a,a.return)),e.flags&32){c=e.stateNode;try{br(c,"")}catch(Ee){rt(e,e.return,Ee)}}i&4&&e.stateNode!=null&&(c=e.memoizedProps,$c(e,c,a!==null?a.memoizedProps:c)),i&1024&&(Gc=!0);break;case 6:if(nn(t,e),an(e),i&4){if(e.stateNode===null)throw Error(o(162));i=e.memoizedProps,a=e.stateNode;try{a.nodeValue=i}catch(Ee){rt(e,e.return,Ee)}}break;case 3:if(ks=null,c=kn,kn=As(t.containerInfo),nn(t,e),kn=c,an(e),i&4&&a!==null&&a.memoizedState.isDehydrated)try{Kr(t.containerInfo)}catch(Ee){rt(e,e.return,Ee)}Gc&&(Gc=!1,cp(e));break;case 4:i=kn,kn=As(e.stateNode.containerInfo),nn(t,e),an(e),kn=i;break;case 12:nn(t,e),an(e);break;case 31:nn(t,e),an(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,gs(e,i)));break;case 13:nn(t,e),an(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ys=je()),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,gs(e,i)));break;case 22:c=e.memoizedState!==null;var Q=a!==null&&a.memoizedState!==null,ue=ra,pe=Lt;if(ra=ue||c,Lt=pe||Q,nn(t,e),Lt=pe,ra=ue,an(e),i&8192)e:for(t=e.stateNode,t._visibility=c?t._visibility&-2:t._visibility|1,c&&(a===null||Q||ra||Lt||sr(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){Q=a=t;try{if(d=Q.stateNode,c)x=d.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{z=Q.stateNode;var be=Q.memoizedProps.style,de=be!=null&&be.hasOwnProperty("display")?be.display:null;z.style.display=de==null||typeof de=="boolean"?"":(""+de).trim()}}catch(Ee){rt(Q,Q.return,Ee)}}}else if(t.tag===6){if(a===null){Q=t;try{Q.stateNode.nodeValue=c?"":Q.memoizedProps}catch(Ee){rt(Q,Q.return,Ee)}}}else if(t.tag===18){if(a===null){Q=t;try{var fe=Q.stateNode;c?Jp(fe,!0):Jp(Q.stateNode,!1)}catch(Ee){rt(Q,Q.return,Ee)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}i&4&&(i=e.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,gs(e,a))));break;case 19:nn(t,e),an(e),i&4&&(i=e.updateQueue,i!==null&&(e.updateQueue=null,gs(e,i)));break;case 30:break;case 21:break;default:nn(t,e),an(e)}}function an(e){var t=e.flags;if(t&2){try{for(var a,i=e.return;i!==null;){if(ep(i)){a=i;break}i=i.return}if(a==null)throw Error(o(160));switch(a.tag){case 27:var c=a.stateNode,d=Hc(e);ms(e,d,c);break;case 5:var x=a.stateNode;a.flags&32&&(br(x,""),a.flags&=-33);var z=Hc(e);ms(e,z,x);break;case 3:case 4:var Q=a.stateNode.containerInfo,ue=Hc(e);qc(e,ue,Q);break;default:throw Error(o(161))}}catch(pe){rt(e,e.return,pe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function cp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;cp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function la(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ap(e,t.alternate,t),t=t.sibling}function sr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Na(4,t,t.return),sr(t);break;case 1:Gn(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&Jh(t,t.return,a),sr(t);break;case 27:Fi(t.stateNode);case 26:case 5:Gn(t,t.return),sr(t);break;case 22:t.memoizedState===null&&sr(t);break;case 30:sr(t);break;default:sr(t)}e=e.sibling}}function sa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var i=t.alternate,c=e,d=t,x=d.flags;switch(d.tag){case 0:case 11:case 15:sa(c,d,a),Li(4,d);break;case 1:if(sa(c,d,a),i=d,c=i.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(ue){rt(i,i.return,ue)}if(i=d,c=i.updateQueue,c!==null){var z=i.stateNode;try{var Q=c.shared.hiddenCallbacks;if(Q!==null)for(c.shared.hiddenCallbacks=null,c=0;c<Q.length;c++)Hf(Q[c],z)}catch(ue){rt(i,i.return,ue)}}a&&x&64&&Qh(d),Mi(d,d.return);break;case 27:tp(d);case 26:case 5:sa(c,d,a),a&&i===null&&x&4&&Wh(d),Mi(d,d.return);break;case 12:sa(c,d,a);break;case 31:sa(c,d,a),a&&x&4&&lp(c,d);break;case 13:sa(c,d,a),a&&x&4&&sp(c,d);break;case 22:d.memoizedState===null&&sa(c,d,a),Mi(d,d.return);break;case 30:break;default:sa(c,d,a)}t=t.sibling}}function Ic(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&wi(a))}function Vc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wi(e))}function Dn(e,t,a,i){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)up(e,t,a,i),t=t.sibling}function up(e,t,a,i){var c=t.flags;switch(t.tag){case 0:case 11:case 15:Dn(e,t,a,i),c&2048&&Li(9,t);break;case 1:Dn(e,t,a,i);break;case 3:Dn(e,t,a,i),c&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&wi(e)));break;case 12:if(c&2048){Dn(e,t,a,i),e=t.stateNode;try{var d=t.memoizedProps,x=d.id,z=d.onPostCommit;typeof z=="function"&&z(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(Q){rt(t,t.return,Q)}}else Dn(e,t,a,i);break;case 31:Dn(e,t,a,i);break;case 13:Dn(e,t,a,i);break;case 23:break;case 22:d=t.stateNode,x=t.alternate,t.memoizedState!==null?d._visibility&2?Dn(e,t,a,i):Bi(e,t):d._visibility&2?Dn(e,t,a,i):(d._visibility|=2,$r(e,t,a,i,(t.subtreeFlags&10256)!==0||!1)),c&2048&&Ic(x,t);break;case 24:Dn(e,t,a,i),c&2048&&Vc(t.alternate,t);break;default:Dn(e,t,a,i)}}function $r(e,t,a,i,c){for(c=c&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,x=t,z=a,Q=i,ue=x.flags;switch(x.tag){case 0:case 11:case 15:$r(d,x,z,Q,c),Li(8,x);break;case 23:break;case 22:var pe=x.stateNode;x.memoizedState!==null?pe._visibility&2?$r(d,x,z,Q,c):Bi(d,x):(pe._visibility|=2,$r(d,x,z,Q,c)),c&&ue&2048&&Ic(x.alternate,x);break;case 24:$r(d,x,z,Q,c),c&&ue&2048&&Vc(x.alternate,x);break;default:$r(d,x,z,Q,c)}t=t.sibling}}function Bi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,i=t,c=i.flags;switch(i.tag){case 22:Bi(a,i),c&2048&&Ic(i.alternate,i);break;case 24:Bi(a,i),c&2048&&Vc(i.alternate,i);break;default:Bi(a,i)}t=t.sibling}}var $i=8192;function Hr(e,t,a){if(e.subtreeFlags&$i)for(e=e.child;e!==null;)dp(e,t,a),e=e.sibling}function dp(e,t,a){switch(e.tag){case 26:Hr(e,t,a),e.flags&$i&&e.memoizedState!==null&&ex(a,kn,e.memoizedState,e.memoizedProps);break;case 5:Hr(e,t,a);break;case 3:case 4:var i=kn;kn=As(e.stateNode.containerInfo),Hr(e,t,a),kn=i;break;case 22:e.memoizedState===null&&(i=e.alternate,i!==null&&i.memoizedState!==null?(i=$i,$i=16777216,Hr(e,t,a),$i=i):Hr(e,t,a));break;default:Hr(e,t,a)}}function fp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Hi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];$t=i,pp(i,e)}fp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)hp(e),e=e.sibling}function hp(e){switch(e.tag){case 0:case 11:case 15:Hi(e),e.flags&2048&&Na(9,e,e.return);break;case 3:Hi(e);break;case 12:Hi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,vs(e)):Hi(e);break;default:Hi(e)}}function vs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var i=t[a];$t=i,pp(i,e)}fp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Na(8,t,t.return),vs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,vs(t));break;default:vs(t)}e=e.sibling}}function pp(e,t){for(;$t!==null;){var a=$t;switch(a.tag){case 0:case 11:case 15:Na(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var i=a.memoizedState.cachePool.pool;i!=null&&i.refCount++}break;case 24:wi(a.memoizedState.cache)}if(i=a.child,i!==null)i.return=a,$t=i;else e:for(a=e;$t!==null;){i=$t;var c=i.sibling,d=i.return;if(rp(i),i===a){$t=null;break e}if(c!==null){c.return=d,$t=c;break e}$t=d}}}var mb={getCacheForType:function(e){var t=Gt(Dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Gt(Dt).controller.signal}},gb=typeof WeakMap=="function"?WeakMap:Map,tt=0,dt=null,Ve=null,Fe=0,at=0,dn=null,Ta=!1,qr=!1,Yc=!1,oa=0,St=0,Ea=0,or=0,Fc=0,fn=0,Gr=0,qi=null,rn=null,Pc=!1,ys=0,mp=0,bs=1/0,xs=null,Ca=null,Mt=0,Oa=null,Ir=null,ca=0,Zc=0,Xc=null,gp=null,Gi=0,Kc=null;function hn(){return(tt&2)!==0&&Fe!==0?Fe&-Fe:Y.T!==null?nu():oi()}function vp(){if(fn===0)if((Fe&536870912)===0||Ze){var e=ut;ut<<=1,(ut&3932160)===0&&(ut=262144),fn=e}else fn=536870912;return e=cn.current,e!==null&&(e.flags|=32),fn}function ln(e,t,a){(e===dt&&(at===2||at===9)||e.cancelPendingCommit!==null)&&(Vr(e,0),Aa(e,Fe,fn,!1)),Ot(e,a),((tt&2)===0||e!==dt)&&(e===dt&&((tt&2)===0&&(or|=a),St===4&&Aa(e,Fe,fn,!1)),In(e))}function yp(e,t,a){if((tt&6)!==0)throw Error(o(327));var i=!a&&(t&127)===0&&(t&e.expiredLanes)===0||bt(e,t),c=i?bb(e,t):Jc(e,t,!0),d=i;do{if(c===0){qr&&!i&&Aa(e,t,0,!1);break}else{if(a=e.current.alternate,d&&!vb(a)){c=Jc(e,t,!1),d=!1;continue}if(c===2){if(d=t,e.errorRecoveryDisabledLanes&d)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var z=e;c=qi;var Q=z.current.memoizedState.isDehydrated;if(Q&&(Vr(z,x).flags|=256),x=Jc(z,x,!1),x!==2){if(Yc&&!Q){z.errorRecoveryDisabledLanes|=d,or|=d,c=4;break e}d=rn,rn=c,d!==null&&(rn===null?rn=d:rn.push.apply(rn,d))}c=x}if(d=!1,c!==2)continue}}if(c===1){Vr(e,0),Aa(e,t,0,!0);break}e:{switch(i=e,d=c,d){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Aa(i,t,fn,!Ta);break e;case 2:rn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(c=ys+300-je(),10<c)){if(Aa(i,t,fn,!Ta),Xt(i,0,!0)!==0)break e;ca=t,i.timeoutHandle=Xp(bp.bind(null,i,a,rn,xs,Pc,t,fn,or,Gr,Ta,d,"Throttled",-0,0),c);break e}bp(i,a,rn,xs,Pc,t,fn,or,Gr,Ta,d,null,-0,0)}}break}while(!0);In(e)}function bp(e,t,a,i,c,d,x,z,Q,ue,pe,be,de,fe){if(e.timeoutHandle=-1,be=t.subtreeFlags,be&8192||(be&16785408)===16785408){be={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},dp(t,d,be);var Ee=(d&62914560)===d?ys-je():(d&4194048)===d?mp-je():0;if(Ee=tx(be,Ee),Ee!==null){ca=d,e.cancelPendingCommit=Ee(Ep.bind(null,e,t,d,a,i,c,x,z,Q,pe,be,null,de,fe)),Aa(e,d,x,!ue);return}}Ep(e,t,d,a,i,c,x,z,Q)}function vb(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var i=0;i<a.length;i++){var c=a[i],d=c.getSnapshot;c=c.value;try{if(!sn(d(),c))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Aa(e,t,a,i){t&=~Fc,t&=~or,e.suspendedLanes|=t,e.pingedLanes&=~t,i&&(e.warmLanes|=t),i=e.expirationTimes;for(var c=t;0<c;){var d=31-$e(c),x=1<<d;i[d]=-1,c&=~x}a!==0&&Ie(e,a,t)}function Ss(){return(tt&6)===0?(Ii(0),!1):!0}function Qc(){if(Ve!==null){if(at===0)var e=Ve.return;else e=Ve,Jn=Wa=null,hc(e),zr=null,Ni=0,e=Ve;for(;e!==null;)Kh(e.alternate,e),e=e.return;Ve=null}}function Vr(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,Mb(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),ca=0,Qc(),dt=e,Ve=a=Kn(e.current,null),Fe=t,at=0,dn=null,Ta=!1,qr=bt(e,t),Yc=!1,Gr=fn=Fc=or=Ea=St=0,rn=qi=null,Pc=!1,(t&8)!==0&&(t|=t&32);var i=e.entangledLanes;if(i!==0)for(e=e.entanglements,i&=t;0<i;){var c=31-$e(i),d=1<<c;t|=e[c],i&=~d}return oa=t,Gl(),a}function xp(e,t){Ue=null,Y.H=Di,t===Dr||t===Kl?(t=Lf(),at=3):t===tc?(t=Lf(),at=4):at=t===Oc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,dn=t,Ve===null&&(St=1,us(e,bn(t,e.current)))}function Sp(){var e=cn.current;return e===null?!0:(Fe&4194048)===Fe?wn===null:(Fe&62914560)===Fe||(Fe&536870912)!==0?e===wn:!1}function jp(){var e=Y.H;return Y.H=Di,e===null?Di:e}function wp(){var e=Y.A;return Y.A=mb,e}function js(){St=4,Ta||(Fe&4194048)!==Fe&&cn.current!==null||(qr=!0),(Ea&134217727)===0&&(or&134217727)===0||dt===null||Aa(dt,Fe,fn,!1)}function Jc(e,t,a){var i=tt;tt|=2;var c=jp(),d=wp();(dt!==e||Fe!==t)&&(xs=null,Vr(e,t)),t=!1;var x=St;e:do try{if(at!==0&&Ve!==null){var z=Ve,Q=dn;switch(at){case 8:Qc(),x=6;break e;case 3:case 2:case 9:case 6:cn.current===null&&(t=!0);var ue=at;if(at=0,dn=null,Yr(e,z,Q,ue),a&&qr){x=0;break e}break;default:ue=at,at=0,dn=null,Yr(e,z,Q,ue)}}yb(),x=St;break}catch(pe){xp(e,pe)}while(!0);return t&&e.shellSuspendCounter++,Jn=Wa=null,tt=i,Y.H=c,Y.A=d,Ve===null&&(dt=null,Fe=0,Gl()),x}function yb(){for(;Ve!==null;)_p(Ve)}function bb(e,t){var a=tt;tt|=2;var i=jp(),c=wp();dt!==e||Fe!==t?(xs=null,bs=je()+500,Vr(e,t)):qr=bt(e,t);e:do try{if(at!==0&&Ve!==null){t=Ve;var d=dn;t:switch(at){case 1:at=0,dn=null,Yr(e,t,d,1);break;case 2:case 9:if(zf(d)){at=0,dn=null,Np(t);break}t=function(){at!==2&&at!==9||dt!==e||(at=7),In(e)},d.then(t,t);break e;case 3:at=7;break e;case 4:at=5;break e;case 7:zf(d)?(at=0,dn=null,Np(t)):(at=0,dn=null,Yr(e,t,d,7));break;case 5:var x=null;switch(Ve.tag){case 26:x=Ve.memoizedState;case 5:case 27:var z=Ve;if(x?um(x):z.stateNode.complete){at=0,dn=null;var Q=z.sibling;if(Q!==null)Ve=Q;else{var ue=z.return;ue!==null?(Ve=ue,ws(ue)):Ve=null}break t}}at=0,dn=null,Yr(e,t,d,5);break;case 6:at=0,dn=null,Yr(e,t,d,6);break;case 8:Qc(),St=6;break e;default:throw Error(o(462))}}xb();break}catch(pe){xp(e,pe)}while(!0);return Jn=Wa=null,Y.H=i,Y.A=c,tt=a,Ve!==null?0:(dt=null,Fe=0,Gl(),St)}function xb(){for(;Ve!==null&&!ie();)_p(Ve)}function _p(e){var t=Zh(e.alternate,e,oa);e.memoizedProps=e.pendingProps,t===null?ws(e):Ve=t}function Np(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Gh(a,t,t.pendingProps,t.type,void 0,Fe);break;case 11:t=Gh(a,t,t.pendingProps,t.type.render,t.ref,Fe);break;case 5:hc(t);default:Kh(a,t),t=Ve=wf(t,oa),t=Zh(a,t,oa)}e.memoizedProps=e.pendingProps,t===null?ws(e):Ve=t}function Yr(e,t,a,i){Jn=Wa=null,hc(t),zr=null,Ni=0;var c=t.return;try{if(ob(e,c,t,a,Fe)){St=1,us(e,bn(a,e.current)),Ve=null;return}}catch(d){if(c!==null)throw Ve=c,d;St=1,us(e,bn(a,e.current)),Ve=null;return}t.flags&32768?(Ze||i===1?e=!0:qr||(Fe&536870912)!==0?e=!1:(Ta=e=!0,(i===2||i===9||i===3||i===6)&&(i=cn.current,i!==null&&i.tag===13&&(i.flags|=16384))),Tp(t,e)):ws(t)}function ws(e){var t=e;do{if((t.flags&32768)!==0){Tp(t,Ta);return}e=t.return;var a=db(t.alternate,t,oa);if(a!==null){Ve=a;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);St===0&&(St=5)}function Tp(e,t){do{var a=fb(e.alternate,e);if(a!==null){a.flags&=32767,Ve=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=a}while(e!==null);St=6,Ve=null}function Ep(e,t,a,i,c,d,x,z,Q){e.cancelPendingCommit=null;do _s();while(Mt!==0);if((tt&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(d=t.lanes|t.childLanes,d|=Ho,He(e,a,d,x,z,Q),e===dt&&(Ve=dt=null,Fe=0),Ir=t,Oa=e,ca=a,Zc=d,Xc=c,gp=i,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,_b(De,function(){return kp(),null})):(e.callbackNode=null,e.callbackPriority=0),i=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||i){i=Y.T,Y.T=null,c=P.p,P.p=2,x=tt,tt|=4;try{hb(e,t,a)}finally{tt=x,P.p=c,Y.T=i}}Mt=1,Cp(),Op(),Ap()}}function Cp(){if(Mt===1){Mt=0;var e=Oa,t=Ir,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=Y.T,Y.T=null;var i=P.p;P.p=2;var c=tt;tt|=4;try{op(t,e);var d=uu,x=pf(e.containerInfo),z=d.focusedElem,Q=d.selectionRange;if(x!==z&&z&&z.ownerDocument&&hf(z.ownerDocument.documentElement,z)){if(Q!==null&&Uo(z)){var ue=Q.start,pe=Q.end;if(pe===void 0&&(pe=ue),"selectionStart"in z)z.selectionStart=ue,z.selectionEnd=Math.min(pe,z.value.length);else{var be=z.ownerDocument||document,de=be&&be.defaultView||window;if(de.getSelection){var fe=de.getSelection(),Ee=z.textContent.length,ke=Math.min(Q.start,Ee),ot=Q.end===void 0?ke:Math.min(Q.end,Ee);!fe.extend&&ke>ot&&(x=ot,ot=ke,ke=x);var se=ff(z,ke),ne=ff(z,ot);if(se&&ne&&(fe.rangeCount!==1||fe.anchorNode!==se.node||fe.anchorOffset!==se.offset||fe.focusNode!==ne.node||fe.focusOffset!==ne.offset)){var ce=be.createRange();ce.setStart(se.node,se.offset),fe.removeAllRanges(),ke>ot?(fe.addRange(ce),fe.extend(ne.node,ne.offset)):(ce.setEnd(ne.node,ne.offset),fe.addRange(ce))}}}}for(be=[],fe=z;fe=fe.parentNode;)fe.nodeType===1&&be.push({element:fe,left:fe.scrollLeft,top:fe.scrollTop});for(typeof z.focus=="function"&&z.focus(),z=0;z<be.length;z++){var ge=be[z];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}Ls=!!cu,uu=cu=null}finally{tt=c,P.p=i,Y.T=a}}e.current=t,Mt=2}}function Op(){if(Mt===2){Mt=0;var e=Oa,t=Ir,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=Y.T,Y.T=null;var i=P.p;P.p=2;var c=tt;tt|=4;try{ap(e,t.alternate,t)}finally{tt=c,P.p=i,Y.T=a}}Mt=3}}function Ap(){if(Mt===4||Mt===3){Mt=0,Se();var e=Oa,t=Ir,a=ca,i=gp;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Mt=5:(Mt=0,Ir=Oa=null,Rp(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Ca=null),mr(a),t=t.stateNode,gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Qe,t,void 0,(t.current.flags&128)===128)}catch{}if(i!==null){t=Y.T,c=P.p,P.p=2,Y.T=null;try{for(var d=e.onRecoverableError,x=0;x<i.length;x++){var z=i[x];d(z.value,{componentStack:z.stack})}}finally{Y.T=t,P.p=c}}(ca&3)!==0&&_s(),In(e),c=e.pendingLanes,(a&261930)!==0&&(c&42)!==0?e===Kc?Gi++:(Gi=0,Kc=e):Gi=0,Ii(0)}}function Rp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,wi(t)))}function _s(){return Cp(),Op(),Ap(),kp()}function kp(){if(Mt!==5)return!1;var e=Oa,t=Zc;Zc=0;var a=mr(ca),i=Y.T,c=P.p;try{P.p=32>a?32:a,Y.T=null,a=Xc,Xc=null;var d=Oa,x=ca;if(Mt=0,Ir=Oa=null,ca=0,(tt&6)!==0)throw Error(o(331));var z=tt;if(tt|=4,hp(d.current),up(d,d.current,x,a),tt=z,Ii(0,!1),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Qe,d)}catch{}return!0}finally{P.p=c,Y.T=i,Rp(e,t)}}function Dp(e,t,a){t=bn(a,t),t=Cc(e.stateNode,t,2),e=ja(e,t,2),e!==null&&(Ot(e,2),In(e))}function rt(e,t,a){if(e.tag===3)Dp(e,e,a);else for(;t!==null;){if(t.tag===3){Dp(t,e,a);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ca===null||!Ca.has(i))){e=bn(a,e),a=zh(2),i=ja(t,a,2),i!==null&&(Uh(a,i,t,e),Ot(i,2),In(i));break}}t=t.return}}function Wc(e,t,a){var i=e.pingCache;if(i===null){i=e.pingCache=new gb;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(a)||(Yc=!0,c.add(a),e=Sb.bind(null,e,t,a),t.then(e,e))}function Sb(e,t,a){var i=e.pingCache;i!==null&&i.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,dt===e&&(Fe&a)===a&&(St===4||St===3&&(Fe&62914560)===Fe&&300>je()-ys?(tt&2)===0&&Vr(e,0):Fc|=a,Gr===Fe&&(Gr=0)),In(e)}function zp(e,t){t===0&&(t=mn()),e=Ka(e,t),e!==null&&(Ot(e,t),In(e))}function jb(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),zp(e,a)}function wb(e,t){var a=0;switch(e.tag){case 31:case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(a=c.retryLane);break;case 19:i=e.stateNode;break;case 22:i=e.stateNode._retryCache;break;default:throw Error(o(314))}i!==null&&i.delete(t),zp(e,a)}function _b(e,t){return me(e,t)}var Ns=null,Fr=null,eu=!1,Ts=!1,tu=!1,Ra=0;function In(e){e!==Fr&&e.next===null&&(Fr===null?Ns=Fr=e:Fr=Fr.next=e),Ts=!0,eu||(eu=!0,Tb())}function Ii(e,t){if(!tu&&Ts){tu=!0;do for(var a=!1,i=Ns;i!==null;){if(e!==0){var c=i.pendingLanes;if(c===0)var d=0;else{var x=i.suspendedLanes,z=i.pingedLanes;d=(1<<31-$e(42|e)+1)-1,d&=c&~(x&~z),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(a=!0,Bp(i,d))}else d=Fe,d=Xt(i,i===dt?d:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),(d&3)===0||bt(i,d)||(a=!0,Bp(i,d));i=i.next}while(a);tu=!1}}function Nb(){Up()}function Up(){Ts=eu=!1;var e=0;Ra!==0&&Lb()&&(e=Ra);for(var t=je(),a=null,i=Ns;i!==null;){var c=i.next,d=Lp(i,t);d===0?(i.next=null,a===null?Ns=c:a.next=c,c===null&&(Fr=a)):(a=i,(e!==0||(d&3)!==0)&&(Ts=!0)),i=c}Mt!==0&&Mt!==5||Ii(e),Ra!==0&&(Ra=0)}function Lp(e,t){for(var a=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var x=31-$e(d),z=1<<x,Q=c[x];Q===-1?((z&a)===0||(z&i)!==0)&&(c[x]=yt(z,t)):Q<=t&&(e.expiredLanes|=z),d&=~z}if(t=dt,a=Fe,a=Xt(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i=e.callbackNode,a===0||e===t&&(at===2||at===9)||e.cancelPendingCommit!==null)return i!==null&&i!==null&&he(i),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||bt(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(i!==null&&he(i),mr(a)){case 2:case 8:a=Be;break;case 32:a=De;break;case 268435456:a=wt;break;default:a=De}return i=Mp.bind(null,e),a=me(a,i),e.callbackPriority=t,e.callbackNode=a,t}return i!==null&&i!==null&&he(i),e.callbackPriority=2,e.callbackNode=null,2}function Mp(e,t){if(Mt!==0&&Mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_s()&&e.callbackNode!==a)return null;var i=Fe;return i=Xt(e,e===dt?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),i===0?null:(yp(e,i,t),Lp(e,je()),e.callbackNode!=null&&e.callbackNode===a?Mp.bind(null,e):null)}function Bp(e,t){if(_s())return null;yp(e,t,!0)}function Tb(){Bb(function(){(tt&6)!==0?me(Ce,Nb):Up()})}function nu(){if(Ra===0){var e=Rr;e===0&&(e=ct,ct<<=1,(ct&261888)===0&&(ct=256)),Ra=e}return Ra}function $p(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:zl(""+e)}function Hp(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function Eb(e,t,a,i,c){if(t==="submit"&&a&&a.stateNode===c){var d=$p((c[At]||null).action),x=i.submitter;x&&(t=(t=x[At]||null)?$p(t.formAction):x.getAttribute("formAction"),t!==null&&(d=t,x=null));var z=new Bl("action","action",null,i,c);e.push({event:z,listeners:[{instance:null,listener:function(){if(i.defaultPrevented){if(Ra!==0){var Q=x?Hp(c,x):new FormData(c);jc(a,{pending:!0,data:Q,method:c.method,action:d},null,Q)}}else typeof d=="function"&&(z.preventDefault(),Q=x?Hp(c,x):new FormData(c),jc(a,{pending:!0,data:Q,method:c.method,action:d},d,Q))},currentTarget:c}]})}}for(var au=0;au<$o.length;au++){var ru=$o[au],Cb=ru.toLowerCase(),Ob=ru[0].toUpperCase()+ru.slice(1);Rn(Cb,"on"+Ob)}Rn(vf,"onAnimationEnd"),Rn(yf,"onAnimationIteration"),Rn(bf,"onAnimationStart"),Rn("dblclick","onDoubleClick"),Rn("focusin","onFocus"),Rn("focusout","onBlur"),Rn(Yy,"onTransitionRun"),Rn(Fy,"onTransitionStart"),Rn(Py,"onTransitionCancel"),Rn(xf,"onTransitionEnd"),Bn("onMouseEnter",["mouseout","mouseover"]),Bn("onMouseLeave",["mouseout","mouseover"]),Bn("onPointerEnter",["pointerout","pointerover"]),Bn("onPointerLeave",["pointerout","pointerover"]),Pn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vi="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(" "),Ab=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vi));function qp(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var i=e[a],c=i.event;i=i.listeners;e:{var d=void 0;if(t)for(var x=i.length-1;0<=x;x--){var z=i[x],Q=z.instance,ue=z.currentTarget;if(z=z.listener,Q!==d&&c.isPropagationStopped())break e;d=z,c.currentTarget=ue;try{d(c)}catch(pe){ql(pe)}c.currentTarget=null,d=Q}else for(x=0;x<i.length;x++){if(z=i[x],Q=z.instance,ue=z.currentTarget,z=z.listener,Q!==d&&c.isPropagationStopped())break e;d=z,c.currentTarget=ue;try{d(c)}catch(pe){ql(pe)}c.currentTarget=null,d=Q}}}}function Ye(e,t){var a=t[ci];a===void 0&&(a=t[ci]=new Set);var i=e+"__bubble";a.has(i)||(Gp(t,e,2,!1),a.add(i))}function iu(e,t,a){var i=0;t&&(i|=4),Gp(a,e,i,t)}var Es="_reactListening"+Math.random().toString(36).slice(2);function lu(e){if(!e[Es]){e[Es]=!0,di.forEach(function(a){a!=="selectionchange"&&(Ab.has(a)||iu(a,!1,e),iu(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Es]||(t[Es]=!0,iu("selectionchange",!1,t))}}function Gp(e,t,a,i){switch(vm(t)){case 2:var c=rx;break;case 8:c=ix;break;default:c=Su}a=c.bind(null,t,a,e),c=void 0,!To||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(t,a,{capture:!0,passive:c}):e.addEventListener(t,a,!0):c!==void 0?e.addEventListener(t,a,{passive:c}):e.addEventListener(t,a,!1)}function su(e,t,a,i,c){var d=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var x=i.tag;if(x===3||x===4){var z=i.stateNode.containerInfo;if(z===c)break;if(x===4)for(x=i.return;x!==null;){var Q=x.tag;if((Q===3||Q===4)&&x.stateNode.containerInfo===c)return;x=x.return}for(;z!==null;){if(x=vn(z),x===null)return;if(Q=x.tag,Q===5||Q===6||Q===26||Q===27){i=d=x;continue e}z=z.parentNode}}i=i.return}Fd(function(){var ue=d,pe=_o(a),be=[];e:{var de=Sf.get(e);if(de!==void 0){var fe=Bl,Ee=e;switch(e){case"keypress":if(Ll(a)===0)break e;case"keydown":case"keyup":fe=wy;break;case"focusin":Ee="focus",fe=Ao;break;case"focusout":Ee="blur",fe=Ao;break;case"beforeblur":case"afterblur":fe=Ao;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=Xd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=dy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=Ty;break;case vf:case yf:case bf:fe=py;break;case xf:fe=Cy;break;case"scroll":case"scrollend":fe=cy;break;case"wheel":fe=Ay;break;case"copy":case"cut":case"paste":fe=gy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=Qd;break;case"toggle":case"beforetoggle":fe=ky}var ke=(t&4)!==0,ot=!ke&&(e==="scroll"||e==="scrollend"),se=ke?de!==null?de+"Capture":null:de;ke=[];for(var ne=ue,ce;ne!==null;){var ge=ne;if(ce=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||ce===null||se===null||(ge=fi(ne,se),ge!=null&&ke.push(Yi(ne,ge,ce))),ot)break;ne=ne.return}0<ke.length&&(de=new fe(de,Ee,null,a,pe),be.push({event:de,listeners:ke}))}}if((t&7)===0){e:{if(de=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",de&&a!==wo&&(Ee=a.relatedTarget||a.fromElement)&&(vn(Ee)||Ee[An]))break e;if((fe||de)&&(de=pe.window===pe?pe:(de=pe.ownerDocument)?de.defaultView||de.parentWindow:window,fe?(Ee=a.relatedTarget||a.toElement,fe=ue,Ee=Ee?vn(Ee):null,Ee!==null&&(ot=h(Ee),ke=Ee.tag,Ee!==ot||ke!==5&&ke!==27&&ke!==6)&&(Ee=null)):(fe=null,Ee=ue),fe!==Ee)){if(ke=Xd,ge="onMouseLeave",se="onMouseEnter",ne="mouse",(e==="pointerout"||e==="pointerover")&&(ke=Qd,ge="onPointerLeave",se="onPointerEnter",ne="pointer"),ot=fe==null?de:Fn(fe),ce=Ee==null?de:Fn(Ee),de=new ke(ge,ne+"leave",fe,a,pe),de.target=ot,de.relatedTarget=ce,ge=null,vn(pe)===ue&&(ke=new ke(se,ne+"enter",Ee,a,pe),ke.target=ce,ke.relatedTarget=ot,ge=ke),ot=ge,fe&&Ee)t:{for(ke=Rb,se=fe,ne=Ee,ce=0,ge=se;ge;ge=ke(ge))ce++;ge=0;for(var Re=ne;Re;Re=ke(Re))ge++;for(;0<ce-ge;)se=ke(se),ce--;for(;0<ge-ce;)ne=ke(ne),ge--;for(;ce--;){if(se===ne||ne!==null&&se===ne.alternate){ke=se;break t}se=ke(se),ne=ke(ne)}ke=null}else ke=null;fe!==null&&Ip(be,de,fe,ke,!1),Ee!==null&&ot!==null&&Ip(be,ot,Ee,ke,!0)}}e:{if(de=ue?Fn(ue):window,fe=de.nodeName&&de.nodeName.toLowerCase(),fe==="select"||fe==="input"&&de.type==="file")var We=lf;else if(af(de))if(sf)We=Gy;else{We=Hy;var Oe=$y}else fe=de.nodeName,!fe||fe.toLowerCase()!=="input"||de.type!=="checkbox"&&de.type!=="radio"?ue&&jo(ue.elementType)&&(We=lf):We=qy;if(We&&(We=We(e,ue))){rf(be,We,a,pe);break e}Oe&&Oe(e,de,ue),e==="focusout"&&ue&&de.type==="number"&&ue.memoizedProps.value!=null&&Wt(de,"number",de.value)}switch(Oe=ue?Fn(ue):window,e){case"focusin":(af(Oe)||Oe.contentEditable==="true")&&(wr=Oe,Lo=ue,xi=null);break;case"focusout":xi=Lo=wr=null;break;case"mousedown":Mo=!0;break;case"contextmenu":case"mouseup":case"dragend":Mo=!1,mf(be,a,pe);break;case"selectionchange":if(Vy)break;case"keydown":case"keyup":mf(be,a,pe)}var Le;if(ko)e:{switch(e){case"compositionstart":var Pe="onCompositionStart";break e;case"compositionend":Pe="onCompositionEnd";break e;case"compositionupdate":Pe="onCompositionUpdate";break e}Pe=void 0}else jr?tf(e,a)&&(Pe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Pe="onCompositionStart");Pe&&(Jd&&a.locale!=="ko"&&(jr||Pe!=="onCompositionStart"?Pe==="onCompositionEnd"&&jr&&(Le=Pd()):(ma=pe,Eo="value"in ma?ma.value:ma.textContent,jr=!0)),Oe=Cs(ue,Pe),0<Oe.length&&(Pe=new Kd(Pe,e,null,a,pe),be.push({event:Pe,listeners:Oe}),Le?Pe.data=Le:(Le=nf(a),Le!==null&&(Pe.data=Le)))),(Le=zy?Uy(e,a):Ly(e,a))&&(Pe=Cs(ue,"onBeforeInput"),0<Pe.length&&(Oe=new Kd("onBeforeInput","beforeinput",null,a,pe),be.push({event:Oe,listeners:Pe}),Oe.data=Le)),Eb(be,e,ue,a,pe)}qp(be,t)})}function Yi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Cs(e,t){for(var a=t+"Capture",i=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=fi(e,a),c!=null&&i.unshift(Yi(e,c,d)),c=fi(e,t),c!=null&&i.push(Yi(e,c,d))),e.tag===3)return i;e=e.return}return[]}function Rb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ip(e,t,a,i,c){for(var d=t._reactName,x=[];a!==null&&a!==i;){var z=a,Q=z.alternate,ue=z.stateNode;if(z=z.tag,Q!==null&&Q===i)break;z!==5&&z!==26&&z!==27||ue===null||(Q=ue,c?(ue=fi(a,d),ue!=null&&x.unshift(Yi(a,ue,Q))):c||(ue=fi(a,d),ue!=null&&x.push(Yi(a,ue,Q)))),a=a.return}x.length!==0&&e.push({event:t,listeners:x})}var kb=/\r\n?/g,Db=/\u0000|\uFFFD/g;function Vp(e){return(typeof e=="string"?e:""+e).replace(kb,`
|
|
9
|
+
`).replace(Db,"")}function Yp(e,t){return t=Vp(t),Vp(e)===t}function st(e,t,a,i,c,d){switch(a){case"children":typeof i=="string"?t==="body"||t==="textarea"&&i===""||br(e,i):(typeof i=="number"||typeof i=="bigint")&&t!=="body"&&br(e,""+i);break;case"className":Ae(e,"class",i);break;case"tabIndex":Ae(e,"tabindex",i);break;case"dir":case"role":case"viewBox":case"width":case"height":Ae(e,a,i);break;case"style":Vd(e,i,d);break;case"data":if(t!=="object"){Ae(e,"data",i);break}case"src":case"href":if(i===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(i==null||typeof i=="function"||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=zl(""+i),e.setAttribute(a,i);break;case"action":case"formAction":if(typeof i=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(a==="formAction"?(t!=="input"&&st(e,t,"name",c.name,c,null),st(e,t,"formEncType",c.formEncType,c,null),st(e,t,"formMethod",c.formMethod,c,null),st(e,t,"formTarget",c.formTarget,c,null)):(st(e,t,"encType",c.encType,c,null),st(e,t,"method",c.method,c,null),st(e,t,"target",c.target,c,null)));if(i==null||typeof i=="symbol"||typeof i=="boolean"){e.removeAttribute(a);break}i=zl(""+i),e.setAttribute(a,i);break;case"onClick":i!=null&&(e.onclick=Zn);break;case"onScroll":i!=null&&Ye("scroll",e);break;case"onScrollEnd":i!=null&&Ye("scrollend",e);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"multiple":e.multiple=i&&typeof i!="function"&&typeof i!="symbol";break;case"muted":e.muted=i&&typeof i!="function"&&typeof i!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(i==null||typeof i=="function"||typeof i=="boolean"||typeof i=="symbol"){e.removeAttribute("xlink:href");break}a=zl(""+i),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""+i):e.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":i&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":i===!0?e.setAttribute(a,""):i!==!1&&i!=null&&typeof i!="function"&&typeof i!="symbol"?e.setAttribute(a,i):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":i!=null&&typeof i!="function"&&typeof i!="symbol"&&!isNaN(i)&&1<=i?e.setAttribute(a,i):e.removeAttribute(a);break;case"rowSpan":case"start":i==null||typeof i=="function"||typeof i=="symbol"||isNaN(i)?e.removeAttribute(a):e.setAttribute(a,i);break;case"popover":Ye("beforetoggle",e),Ye("toggle",e),ye(e,"popover",i);break;case"xlinkActuate":qe(e,"http://www.w3.org/1999/xlink","xlink:actuate",i);break;case"xlinkArcrole":qe(e,"http://www.w3.org/1999/xlink","xlink:arcrole",i);break;case"xlinkRole":qe(e,"http://www.w3.org/1999/xlink","xlink:role",i);break;case"xlinkShow":qe(e,"http://www.w3.org/1999/xlink","xlink:show",i);break;case"xlinkTitle":qe(e,"http://www.w3.org/1999/xlink","xlink:title",i);break;case"xlinkType":qe(e,"http://www.w3.org/1999/xlink","xlink:type",i);break;case"xmlBase":qe(e,"http://www.w3.org/XML/1998/namespace","xml:base",i);break;case"xmlLang":qe(e,"http://www.w3.org/XML/1998/namespace","xml:lang",i);break;case"xmlSpace":qe(e,"http://www.w3.org/XML/1998/namespace","xml:space",i);break;case"is":ye(e,"is",i);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=sy.get(a)||a,ye(e,a,i))}}function ou(e,t,a,i,c,d){switch(a){case"style":Vd(e,i,d);break;case"dangerouslySetInnerHTML":if(i!=null){if(typeof i!="object"||!("__html"in i))throw Error(o(61));if(a=i.__html,a!=null){if(c.children!=null)throw Error(o(60));e.innerHTML=a}}break;case"children":typeof i=="string"?br(e,i):(typeof i=="number"||typeof i=="bigint")&&br(e,""+i);break;case"onScroll":i!=null&&Ye("scroll",e);break;case"onScrollEnd":i!=null&&Ye("scrollend",e);break;case"onClick":i!=null&&(e.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Cl.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(c=a.endsWith("Capture"),t=a.slice(2,c?a.length-7:void 0),d=e[At]||null,d=d!=null?d[a]:null,typeof d=="function"&&e.removeEventListener(t,d,c),typeof i=="function")){typeof d!="function"&&d!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,i,c);break e}a in e?e[a]=i:i===!0?e.setAttribute(a,""):ye(e,a,i)}}}function Vt(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ye("error",e),Ye("load",e);var i=!1,c=!1,d;for(d in a)if(a.hasOwnProperty(d)){var x=a[d];if(x!=null)switch(d){case"src":i=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,d,x,a,null)}}c&&st(e,t,"srcSet",a.srcSet,a,null),i&&st(e,t,"src",a.src,a,null);return;case"input":Ye("invalid",e);var z=d=x=c=null,Q=null,ue=null;for(i in a)if(a.hasOwnProperty(i)){var pe=a[i];if(pe!=null)switch(i){case"name":c=pe;break;case"type":x=pe;break;case"checked":Q=pe;break;case"defaultChecked":ue=pe;break;case"value":d=pe;break;case"defaultValue":z=pe;break;case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(o(137,t));break;default:st(e,t,i,pe,a,null)}}Fa(e,d,z,Q,ue,x,c,!1);return;case"select":Ye("invalid",e),i=x=d=null;for(c in a)if(a.hasOwnProperty(c)&&(z=a[c],z!=null))switch(c){case"value":d=z;break;case"defaultValue":x=z;break;case"multiple":i=z;default:st(e,t,c,z,a,null)}t=d,a=x,e.multiple=!!i,t!=null?pa(e,!!i,t,!1):a!=null&&pa(e,!!i,a,!0);return;case"textarea":Ye("invalid",e),d=c=i=null;for(x in a)if(a.hasOwnProperty(x)&&(z=a[x],z!=null))switch(x){case"value":i=z;break;case"defaultValue":c=z;break;case"children":d=z;break;case"dangerouslySetInnerHTML":if(z!=null)throw Error(o(91));break;default:st(e,t,x,z,a,null)}Gd(e,i,c,d);return;case"option":for(Q in a)a.hasOwnProperty(Q)&&(i=a[Q],i!=null)&&(Q==="selected"?e.selected=i&&typeof i!="function"&&typeof i!="symbol":st(e,t,Q,i,a,null));return;case"dialog":Ye("beforetoggle",e),Ye("toggle",e),Ye("cancel",e),Ye("close",e);break;case"iframe":case"object":Ye("load",e);break;case"video":case"audio":for(i=0;i<Vi.length;i++)Ye(Vi[i],e);break;case"image":Ye("error",e),Ye("load",e);break;case"details":Ye("toggle",e);break;case"embed":case"source":case"link":Ye("error",e),Ye("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ue in a)if(a.hasOwnProperty(ue)&&(i=a[ue],i!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:st(e,t,ue,i,a,null)}return;default:if(jo(t)){for(pe in a)a.hasOwnProperty(pe)&&(i=a[pe],i!==void 0&&ou(e,t,pe,i,a,void 0));return}}for(z in a)a.hasOwnProperty(z)&&(i=a[z],i!=null&&st(e,t,z,i,a,null))}function zb(e,t,a,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,x=null,z=null,Q=null,ue=null,pe=null;for(fe in a){var be=a[fe];if(a.hasOwnProperty(fe)&&be!=null)switch(fe){case"checked":break;case"value":break;case"defaultValue":Q=be;default:i.hasOwnProperty(fe)||st(e,t,fe,null,i,be)}}for(var de in i){var fe=i[de];if(be=a[de],i.hasOwnProperty(de)&&(fe!=null||be!=null))switch(de){case"type":d=fe;break;case"name":c=fe;break;case"checked":ue=fe;break;case"defaultChecked":pe=fe;break;case"value":x=fe;break;case"defaultValue":z=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(o(137,t));break;default:fe!==be&&st(e,t,de,fe,i,be)}}Ya(e,x,z,Q,ue,pe,d,c);return;case"select":fe=x=z=de=null;for(d in a)if(Q=a[d],a.hasOwnProperty(d)&&Q!=null)switch(d){case"value":break;case"multiple":fe=Q;default:i.hasOwnProperty(d)||st(e,t,d,null,i,Q)}for(c in i)if(d=i[c],Q=a[c],i.hasOwnProperty(c)&&(d!=null||Q!=null))switch(c){case"value":de=d;break;case"defaultValue":z=d;break;case"multiple":x=d;default:d!==Q&&st(e,t,c,d,i,Q)}t=z,a=x,i=fe,de!=null?pa(e,!!a,de,!1):!!i!=!!a&&(t!=null?pa(e,!!a,t,!0):pa(e,!!a,a?[]:"",!1));return;case"textarea":fe=de=null;for(z in a)if(c=a[z],a.hasOwnProperty(z)&&c!=null&&!i.hasOwnProperty(z))switch(z){case"value":break;case"children":break;default:st(e,t,z,null,i,c)}for(x in i)if(c=i[x],d=a[x],i.hasOwnProperty(x)&&(c!=null||d!=null))switch(x){case"value":de=c;break;case"defaultValue":fe=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(o(91));break;default:c!==d&&st(e,t,x,c,i,d)}Dl(e,de,fe);return;case"option":for(var Ee in a)de=a[Ee],a.hasOwnProperty(Ee)&&de!=null&&!i.hasOwnProperty(Ee)&&(Ee==="selected"?e.selected=!1:st(e,t,Ee,null,i,de));for(Q in i)de=i[Q],fe=a[Q],i.hasOwnProperty(Q)&&de!==fe&&(de!=null||fe!=null)&&(Q==="selected"?e.selected=de&&typeof de!="function"&&typeof de!="symbol":st(e,t,Q,de,i,fe));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ke in a)de=a[ke],a.hasOwnProperty(ke)&&de!=null&&!i.hasOwnProperty(ke)&&st(e,t,ke,null,i,de);for(ue in i)if(de=i[ue],fe=a[ue],i.hasOwnProperty(ue)&&de!==fe&&(de!=null||fe!=null))switch(ue){case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(o(137,t));break;default:st(e,t,ue,de,i,fe)}return;default:if(jo(t)){for(var ot in a)de=a[ot],a.hasOwnProperty(ot)&&de!==void 0&&!i.hasOwnProperty(ot)&&ou(e,t,ot,void 0,i,de);for(pe in i)de=i[pe],fe=a[pe],!i.hasOwnProperty(pe)||de===fe||de===void 0&&fe===void 0||ou(e,t,pe,de,i,fe);return}}for(var se in a)de=a[se],a.hasOwnProperty(se)&&de!=null&&!i.hasOwnProperty(se)&&st(e,t,se,null,i,de);for(be in i)de=i[be],fe=a[be],!i.hasOwnProperty(be)||de===fe||de==null&&fe==null||st(e,t,be,de,i,fe)}function Fp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ub(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),i=0;i<a.length;i++){var c=a[i],d=c.transferSize,x=c.initiatorType,z=c.duration;if(d&&z&&Fp(x)){for(x=0,z=c.responseEnd,i+=1;i<a.length;i++){var Q=a[i],ue=Q.startTime;if(ue>z)break;var pe=Q.transferSize,be=Q.initiatorType;pe&&Fp(be)&&(Q=Q.responseEnd,x+=pe*(Q<z?1:(z-ue)/(Q-ue)))}if(--i,t+=8*(d+x)/(c.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var cu=null,uu=null;function Os(e){return e.nodeType===9?e:e.ownerDocument}function Pp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function du(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var fu=null;function Lb(){var e=window.event;return e&&e.type==="popstate"?e===fu?!1:(fu=e,!0):(fu=null,!1)}var Xp=typeof setTimeout=="function"?setTimeout:void 0,Mb=typeof clearTimeout=="function"?clearTimeout:void 0,Kp=typeof Promise=="function"?Promise:void 0,Bb=typeof queueMicrotask=="function"?queueMicrotask:typeof Kp<"u"?function(e){return Kp.resolve(null).then(e).catch($b)}:Xp;function $b(e){setTimeout(function(){throw e})}function ka(e){return e==="head"}function Qp(e,t){var a=t,i=0;do{var c=a.nextSibling;if(e.removeChild(a),c&&c.nodeType===8)if(a=c.data,a==="/$"||a==="/&"){if(i===0){e.removeChild(c),Kr(t);return}i--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")i++;else if(a==="html")Fi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Fi(a);for(var d=a.firstChild;d;){var x=d.nextSibling,z=d.nodeName;d[Va]||z==="SCRIPT"||z==="STYLE"||z==="LINK"&&d.rel.toLowerCase()==="stylesheet"||a.removeChild(d),d=x}}else a==="body"&&Fi(e.ownerDocument.body);a=c}while(a);Kr(t)}function Jp(e,t){var a=e;e=0;do{var i=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),i&&i.nodeType===8)if(a=i.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=i}while(a)}function hu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":hu(a),ui(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function Hb(e,t,a,i){for(;e.nodeType===1;){var c=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!i&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(i){if(!e[Va])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=_n(e.nextSibling),e===null)break}return null}function qb(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=_n(e.nextSibling),e===null))return null;return e}function Wp(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=_n(e.nextSibling),e===null))return null;return e}function pu(e){return e.data==="$?"||e.data==="$~"}function mu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Gb(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var i=function(){t(),a.removeEventListener("DOMContentLoaded",i)};a.addEventListener("DOMContentLoaded",i),e._reactRetry=i}}function _n(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var gu=null;function em(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return _n(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function tm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function nm(e,t,a){switch(t=Os(a),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Fi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ui(e)}var Nn=new Map,am=new Set;function As(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ua=P.d;P.d={f:Ib,r:Vb,D:Yb,C:Fb,L:Pb,m:Zb,X:Kb,S:Xb,M:Qb};function Ib(){var e=ua.f(),t=Ss();return e||t}function Vb(e){var t=Mn(e);t!==null&&t.tag===5&&t.type==="form"?xh(t):ua.r(e)}var Pr=typeof document>"u"?null:document;function rm(e,t,a){var i=Pr;if(i&&typeof t=="string"&&t){var c=kt(t);c='link[rel="'+e+'"][href="'+c+'"]',typeof a=="string"&&(c+='[crossorigin="'+a+'"]'),am.has(c)||(am.add(c),e={rel:e,crossOrigin:a,href:t},i.querySelector(c)===null&&(t=i.createElement("link"),Vt(t,"link",e),Rt(t),i.head.appendChild(t)))}}function Yb(e){ua.D(e),rm("dns-prefetch",e,null)}function Fb(e,t){ua.C(e,t),rm("preconnect",e,t)}function Pb(e,t,a){ua.L(e,t,a);var i=Pr;if(i&&e&&t){var c='link[rel="preload"][as="'+kt(t)+'"]';t==="image"&&a&&a.imageSrcSet?(c+='[imagesrcset="'+kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(c+='[imagesizes="'+kt(a.imageSizes)+'"]')):c+='[href="'+kt(e)+'"]';var d=c;switch(t){case"style":d=Zr(e);break;case"script":d=Xr(e)}Nn.has(d)||(e=b({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Nn.set(d,e),i.querySelector(c)!==null||t==="style"&&i.querySelector(Pi(d))||t==="script"&&i.querySelector(Zi(d))||(t=i.createElement("link"),Vt(t,"link",e),Rt(t),i.head.appendChild(t)))}}function Zb(e,t){ua.m(e,t);var a=Pr;if(a&&e){var i=t&&typeof t.as=="string"?t.as:"script",c='link[rel="modulepreload"][as="'+kt(i)+'"][href="'+kt(e)+'"]',d=c;switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Xr(e)}if(!Nn.has(d)&&(e=b({rel:"modulepreload",href:e},t),Nn.set(d,e),a.querySelector(c)===null)){switch(i){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Zi(d)))return}i=a.createElement("link"),Vt(i,"link",e),Rt(i),a.head.appendChild(i)}}}function Xb(e,t,a){ua.S(e,t,a);var i=Pr;if(i&&e){var c=ha(i).hoistableStyles,d=Zr(e);t=t||"default";var x=c.get(d);if(!x){var z={loading:0,preload:null};if(x=i.querySelector(Pi(d)))z.loading=5;else{e=b({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Nn.get(d))&&vu(e,a);var Q=x=i.createElement("link");Rt(Q),Vt(Q,"link",e),Q._p=new Promise(function(ue,pe){Q.onload=ue,Q.onerror=pe}),Q.addEventListener("load",function(){z.loading|=1}),Q.addEventListener("error",function(){z.loading|=2}),z.loading|=4,Rs(x,t,i)}x={type:"stylesheet",instance:x,count:1,state:z},c.set(d,x)}}}function Kb(e,t){ua.X(e,t);var a=Pr;if(a&&e){var i=ha(a).hoistableScripts,c=Xr(e),d=i.get(c);d||(d=a.querySelector(Zi(c)),d||(e=b({src:e,async:!0},t),(t=Nn.get(c))&&yu(e,t),d=a.createElement("script"),Rt(d),Vt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(c,d))}}function Qb(e,t){ua.M(e,t);var a=Pr;if(a&&e){var i=ha(a).hoistableScripts,c=Xr(e),d=i.get(c);d||(d=a.querySelector(Zi(c)),d||(e=b({src:e,async:!0,type:"module"},t),(t=Nn.get(c))&&yu(e,t),d=a.createElement("script"),Rt(d),Vt(d,"link",e),a.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},i.set(c,d))}}function im(e,t,a,i){var c=(c=ve.current)?As(c):null;if(!c)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Zr(a.href),a=ha(c).hoistableStyles,i=a.get(t),i||(i={type:"style",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Zr(a.href);var d=ha(c).hoistableStyles,x=d.get(e);if(x||(c=c.ownerDocument||c,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,x),(d=c.querySelector(Pi(e)))&&!d._p&&(x.instance=d,x.state.loading=5),Nn.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Nn.set(e,a),d||Jb(c,e,a,x.state))),t&&i===null)throw Error(o(528,""));return x}if(t&&i!==null)throw Error(o(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Xr(a),a=ha(c).hoistableScripts,i=a.get(t),i||(i={type:"script",instance:null,count:0,state:null},a.set(t,i)),i):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Zr(e){return'href="'+kt(e)+'"'}function Pi(e){return'link[rel="stylesheet"]['+e+"]"}function lm(e){return b({},e,{"data-precedence":e.precedence,precedence:null})}function Jb(e,t,a,i){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?i.loading=1:(t=e.createElement("link"),i.preload=t,t.addEventListener("load",function(){return i.loading|=1}),t.addEventListener("error",function(){return i.loading|=2}),Vt(t,"link",a),Rt(t),e.head.appendChild(t))}function Xr(e){return'[src="'+kt(e)+'"]'}function Zi(e){return"script[async]"+e}function sm(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var i=e.querySelector('style[data-href~="'+kt(a.href)+'"]');if(i)return t.instance=i,Rt(i),i;var c=b({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return i=(e.ownerDocument||e).createElement("style"),Rt(i),Vt(i,"style",c),Rs(i,a.precedence,e),t.instance=i;case"stylesheet":c=Zr(a.href);var d=e.querySelector(Pi(c));if(d)return t.state.loading|=4,t.instance=d,Rt(d),d;i=lm(a),(c=Nn.get(c))&&vu(i,c),d=(e.ownerDocument||e).createElement("link"),Rt(d);var x=d;return x._p=new Promise(function(z,Q){x.onload=z,x.onerror=Q}),Vt(d,"link",i),t.state.loading|=4,Rs(d,a.precedence,e),t.instance=d;case"script":return d=Xr(a.src),(c=e.querySelector(Zi(d)))?(t.instance=c,Rt(c),c):(i=a,(c=Nn.get(d))&&(i=b({},a),yu(i,c)),e=e.ownerDocument||e,c=e.createElement("script"),Rt(c),Vt(c,"link",i),e.head.appendChild(c),t.instance=c);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(i=t.instance,t.state.loading|=4,Rs(i,a.precedence,e));return t.instance}function Rs(e,t,a){for(var i=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=i.length?i[i.length-1]:null,d=c,x=0;x<i.length;x++){var z=i[x];if(z.dataset.precedence===t)d=z;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function vu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ks=null;function om(e,t,a){if(ks===null){var i=new Map,c=ks=new Map;c.set(a,i)}else c=ks,i=c.get(a),i||(i=new Map,c.set(a,i));if(i.has(e))return i;for(i.set(e,null),a=a.getElementsByTagName(e),c=0;c<a.length;c++){var d=a[c];if(!(d[Va]||d[Nt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var x=d.getAttribute(t)||"";x=e+x;var z=i.get(x);z?z.push(d):i.set(x,[d])}}return i}function cm(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function Wb(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function um(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ex(e,t,a,i){if(a.type==="stylesheet"&&(typeof i.media!="string"||matchMedia(i.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var c=Zr(i.href),d=t.querySelector(Pi(c));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ds.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=d,Rt(d);return}d=t.ownerDocument||t,i=lm(i),(c=Nn.get(c))&&vu(i,c),d=d.createElement("link"),Rt(d);var x=d;x._p=new Promise(function(z,Q){x.onload=z,x.onerror=Q}),Vt(d,"link",i),a.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Ds.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var bu=0;function tx(e,t){return e.stylesheets&&e.count===0&&Us(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var i=setTimeout(function(){if(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&bu===0&&(bu=62500*Ub());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Us(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>bu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(i),clearTimeout(c)}}:null}function Ds(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Us(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zs=null;function Us(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zs=new Map,t.forEach(nx,e),zs=null,Ds.call(e))}function nx(e,t){if(!(t.state.loading&4)){var a=zs.get(e);if(a)var i=a.get(null);else{a=new Map,zs.set(e,a);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var x=c[d];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),i=x)}i&&a.set(null,i)}c=t.instance,x=c.getAttribute("data-precedence"),d=a.get(x)||i,d===i&&a.set(null,c),a.set(x,c),this.count++,i=Ds.bind(this),c.addEventListener("load",i),c.addEventListener("error",i),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),t.state.loading|=4}}var Xi={$$typeof:A,Provider:null,Consumer:null,_currentValue:X,_currentValue2:X,_threadCount:0};function ax(e,t,a,i,c,d,x,z,Q){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=fa(0),this.hiddenUpdates=fa(null),this.identifierPrefix=i,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function dm(e,t,a,i,c,d,x,z,Q,ue,pe,be){return e=new ax(e,t,a,x,Q,ue,pe,be,z),t=1,d===!0&&(t|=24),d=on(3,null,null,t),e.current=d,d.stateNode=e,t=Jo(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:i,isDehydrated:a,cache:t},nc(d),e}function fm(e){return e?(e=Tr,e):Tr}function hm(e,t,a,i,c,d){c=fm(c),i.context===null?i.context=c:i.pendingContext=c,i=Sa(t),i.payload={element:a},d=d===void 0?null:d,d!==null&&(i.callback=d),a=ja(e,i,t),a!==null&&(ln(a,e,t),Ei(a,e,t))}function pm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function xu(e,t){pm(e,t),(e=e.alternate)&&pm(e,t)}function mm(e){if(e.tag===13||e.tag===31){var t=Ka(e,67108864);t!==null&&ln(t,e,67108864),xu(e,67108864)}}function gm(e){if(e.tag===13||e.tag===31){var t=hn();t=pr(t);var a=Ka(e,t);a!==null&&ln(a,e,t),xu(e,t)}}var Ls=!0;function rx(e,t,a,i){var c=Y.T;Y.T=null;var d=P.p;try{P.p=2,Su(e,t,a,i)}finally{P.p=d,Y.T=c}}function ix(e,t,a,i){var c=Y.T;Y.T=null;var d=P.p;try{P.p=8,Su(e,t,a,i)}finally{P.p=d,Y.T=c}}function Su(e,t,a,i){if(Ls){var c=ju(i);if(c===null)su(e,t,i,Ms,a),ym(e,i);else if(sx(c,e,t,a,i))i.stopPropagation();else if(ym(e,i),t&4&&-1<lx.indexOf(e)){for(;c!==null;){var d=Mn(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var x=it(d.pendingLanes);if(x!==0){var z=d;for(z.pendingLanes|=2,z.entangledLanes|=2;x;){var Q=1<<31-$e(x);z.entanglements[1]|=Q,x&=~Q}In(d),(tt&6)===0&&(bs=je()+500,Ii(0))}}break;case 31:case 13:z=Ka(d,2),z!==null&&ln(z,d,2),Ss(),xu(d,2)}if(d=ju(i),d===null&&su(e,t,i,Ms,a),d===c)break;c=d}c!==null&&i.stopPropagation()}else su(e,t,i,null,a)}}function ju(e){return e=_o(e),wu(e)}var Ms=null;function wu(e){if(Ms=null,e=vn(e),e!==null){var t=h(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=f(t),e!==null)return e;e=null}else if(a===31){if(e=p(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ms=e,null}function vm(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(xe()){case Ce:return 2;case Be:return 8;case De:case jt:return 32;case wt:return 268435456;default:return 32}default:return 32}}var _u=!1,Da=null,za=null,Ua=null,Ki=new Map,Qi=new Map,La=[],lx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function ym(e,t){switch(e){case"focusin":case"focusout":Da=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":Ua=null;break;case"pointerover":case"pointerout":Ki.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Qi.delete(t.pointerId)}}function Ji(e,t,a,i,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:a,eventSystemFlags:i,nativeEvent:d,targetContainers:[c]},t!==null&&(t=Mn(t),t!==null&&mm(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function sx(e,t,a,i,c){switch(t){case"focusin":return Da=Ji(Da,e,t,a,i,c),!0;case"dragenter":return za=Ji(za,e,t,a,i,c),!0;case"mouseover":return Ua=Ji(Ua,e,t,a,i,c),!0;case"pointerover":var d=c.pointerId;return Ki.set(d,Ji(Ki.get(d)||null,e,t,a,i,c)),!0;case"gotpointercapture":return d=c.pointerId,Qi.set(d,Ji(Qi.get(d)||null,e,t,a,i,c)),!0}return!1}function bm(e){var t=vn(e.target);if(t!==null){var a=h(t);if(a!==null){if(t=a.tag,t===13){if(t=f(a),t!==null){e.blockedOn=t,gr(e.priority,function(){gm(a)});return}}else if(t===31){if(t=p(a),t!==null){e.blockedOn=t,gr(e.priority,function(){gm(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Bs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ju(e.nativeEvent);if(a===null){a=e.nativeEvent;var i=new a.constructor(a.type,a);wo=i,a.target.dispatchEvent(i),wo=null}else return t=Mn(a),t!==null&&mm(t),e.blockedOn=a,!1;t.shift()}return!0}function xm(e,t,a){Bs(e)&&a.delete(t)}function ox(){_u=!1,Da!==null&&Bs(Da)&&(Da=null),za!==null&&Bs(za)&&(za=null),Ua!==null&&Bs(Ua)&&(Ua=null),Ki.forEach(xm),Qi.forEach(xm)}function $s(e,t){e.blockedOn===t&&(e.blockedOn=null,_u||(_u=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,ox)))}var Hs=null;function Sm(e){Hs!==e&&(Hs=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Hs===e&&(Hs=null);for(var t=0;t<e.length;t+=3){var a=e[t],i=e[t+1],c=e[t+2];if(typeof i!="function"){if(wu(i||a)===null)continue;break}var d=Mn(a);d!==null&&(e.splice(t,3),t-=3,jc(d,{pending:!0,data:c,method:a.method,action:i},i,c))}}))}function Kr(e){function t(Q){return $s(Q,e)}Da!==null&&$s(Da,e),za!==null&&$s(za,e),Ua!==null&&$s(Ua,e),Ki.forEach(t),Qi.forEach(t);for(var a=0;a<La.length;a++){var i=La[a];i.blockedOn===e&&(i.blockedOn=null)}for(;0<La.length&&(a=La[0],a.blockedOn===null);)bm(a),a.blockedOn===null&&La.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(i=0;i<a.length;i+=3){var c=a[i],d=a[i+1],x=c[At]||null;if(typeof d=="function")x||Sm(a);else if(x){var z=null;if(d&&d.hasAttribute("formAction")){if(c=d,x=d[At]||null)z=x.formAction;else if(wu(c)!==null)continue}else z=x.action;typeof z=="function"?a[i+1]=z:(a.splice(i,3),i-=3),Sm(a)}}}function jm(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(x){return c=x})},focusReset:"manual",scroll:"manual"})}function t(){c!==null&&(c(),c=null),i||setTimeout(a,20)}function a(){if(!i&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var i=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){i=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),c!==null&&(c(),c=null)}}}function Nu(e){this._internalRoot=e}qs.prototype.render=Nu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var a=t.current,i=hn();hm(a,i,e,t,null,null)},qs.prototype.unmount=Nu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hm(e.current,2,null,e,null,null),Ss(),t[An]=null}};function qs(e){this._internalRoot=e}qs.prototype.unstable_scheduleHydration=function(e){if(e){var t=oi();e={blockedOn:null,target:e,priority:t};for(var a=0;a<La.length&&t!==0&&t<La[a].priority;a++);La.splice(a,0,e),a===0&&bm(e)}};var wm=l.version;if(wm!=="19.2.8")throw Error(o(527,wm,"19.2.8"));P.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=m(t),e=e!==null?j(e):null,e=e===null?null:e.stateNode,e};var cx={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:Y,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gs.isDisabled&&Gs.supportsFiber)try{Qe=Gs.inject(cx),gt=Gs}catch{}}return el.createRoot=function(e,t){if(!u(e))throw Error(o(299));var a=!1,i="",c=Ah,d=Rh,x=kh;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onUncaughtError!==void 0&&(c=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=dm(e,1,!1,null,null,a,i,null,c,d,x,jm),e[An]=t.current,lu(e),new Nu(t)},el.hydrateRoot=function(e,t,a){if(!u(e))throw Error(o(299));var i=!1,c="",d=Ah,x=Rh,z=kh,Q=null;return a!=null&&(a.unstable_strictMode===!0&&(i=!0),a.identifierPrefix!==void 0&&(c=a.identifierPrefix),a.onUncaughtError!==void 0&&(d=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(z=a.onRecoverableError),a.formState!==void 0&&(Q=a.formState)),t=dm(e,1,!0,t,a??null,i,c,Q,d,x,z,jm),t.context=fm(null),a=t.current,i=hn(),i=pr(i),c=Sa(i),c.callback=null,ja(a,c,i),a=i,t.current.lanes=a,Ot(t,a),In(t),e[An]=t.current,lu(e),new qs(t)},el.version="19.2.8",el}var Dm;function bx(){if(Dm)return Cu.exports;Dm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(l){console.error(l)}}return n(),Cu.exports=yx(),Cu.exports}var xx=bx();const Sx={en:{overview:"Overview",testCases:"Test Cases",automation:"Automation",scoutLog:"Scout Log",explorer:"Explorer",newProject:"New project",projects:"Projects",files:"Files",settings:"Project settings",localWorkspace:"Local workspace",storedHere:"Projects are stored on this device",activeTarget:"Active project target",savedProject:"Saved project",newWorkspace:"New local workspace",scoutWebsite:"Scout a website",targetUrl:"Target URL",startPath:"Start Path",scopePath:"Scope Path",maxPages:"Max pages",maxDepth:"Max depth",language:"Test Case Language",english:"English",thai:"ไทย",scoutSite:"Scout Site",targetedExploration:"Targeted Exploration",targetedExplorationHelp:"Limit exploration to a specific page or path.",startPathHelp:"The page path where exploration should begin, such as /admin/users.",scopePathHelp:"Keep exploration under this path, such as /admin.",startPathHint:"Where to continue exploring after login",scopePathHint:"Limits exploration to this section",explore:"Explore",currentPageOnly:"Current page only",thisSection:"This section",entireSite:"Entire site",targetedGuideTitle:"How to use Targeted Exploration",targetedGuideTargetUrl:"Enter the main URL of the system you want LazyScout to explore.",targetedGuideStartPath:"Enter the path where exploration should begin, such as",targetedGuideScopePath:"Set a boundary such as",targetedGuideScopePathEnd:"so the flow does not move to other areas.",targetedGuideCurrentPage:"explores one page",targetedGuideThisSection:"explores only the scope",targetedGuideEntireSite:"explores the whole website",targetedGuideExample:"Example: Target URL = your system, Start Path = /admin/users, Scope Path = /admin, choose This section.",search:"Search",addCase:"Add Test Case",screenshot:"Screenshot",delete:"Delete",export:"Export CSV",activeProjectTarget:"Active project target",currentProject:"Current project",scoutDescription:"Enter a URL and let Playwright discover pages, controls, forms and UI states automatically.",scouting:"Scouting…",optional:"optional",targetUrlHelp:"The main website URL that LazyScout should open and explore, such as https://example.com.",maxPagesHelp:"Maximum number of pages Scout will inspect. Higher values may take longer.",maxDepthHelp:"Link depth from the starting page. 0 means one page; 1 means pages linked from it.",testLanguageHelp:"Language used for generated Test Case titles and details.",maxPagesDescription:"Maximum number of pages to inspect",maxDepthDescription:"Link depth to follow from the target page",testLanguageDescription:"Language used for generated Test Case details",safetyNotice:"Playwright stays within the same origin and avoids actions that can change or delete data.",includeApiChecks:"Include API checks from XHR/fetch",validationMatrix:"Full validation matrix included",validationMatrixHelp:"Generates required, invalid format, length, range, password policy, and failed-login Test Cases from detected form rules.",validationMatrixSafety:"Scout only discovers and generates these cases. Failed-login and server validation cases run once only when you start Automation.",waitAfterNavigation:"Wait after navigation",debugMode:"Debug mode",scoutAgain:"Scout again",regenerateProject:"Regenerate this project?",regenerateWarning:"Scout Site will replace the current discovered pages and generated Test Cases for this project.",regenerateHint:"Export any Test Cases you want to keep before confirming. Project Settings will remain unchanged.",cancel:"Cancel",expandScout:"Expand Scout form",collapseScout:"Collapse Scout form",help:"Help"},th:{overview:"ภาพรวม",testCases:"Test Case",automation:"Automation",scoutLog:"Scout Log",explorer:"Explorer",newProject:"โปรเจกต์ใหม่",projects:"โปรเจกต์",files:"ไฟล์",settings:"ตั้งค่าโปรเจกต์",localWorkspace:"พื้นที่ทำงานในเครื่อง",storedHere:"โปรเจกต์ถูกเก็บไว้ในอุปกรณ์นี้",activeTarget:"เว็บไซต์ของโปรเจกต์",savedProject:"บันทึกแล้ว",newWorkspace:"พื้นที่ทำงานใหม่",scoutWebsite:"สำรวจเว็บไซต์",targetUrl:"URL เป้าหมาย",startPath:"จุดเริ่มต้น (Path)",scopePath:"ขอบเขต (Path)",maxPages:"จำนวนหน้าสูงสุด",maxDepth:"ระดับความลึก",language:"ภาษาของ Test Case",english:"English",thai:"ไทย",scoutSite:"Scout Site",targetedExploration:"Targeted Exploration",targetedExplorationHelp:"กำหนดขอบเขตการสำรวจเฉพาะหน้า หรือเฉพาะ path ที่ต้องการ",startPathHelp:"หน้าเริ่มต้นภายในเว็บไซต์ เช่น /admin/users ใช้เมื่ออยากเริ่มจากหน้าลึก ๆ",scopePathHelp:"จำกัดการสำรวจให้อยู่ใต้ path นี้ เช่น /admin จะไม่ออกไปสำรวจส่วนอื่นของเว็บ",startPathHint:"หน้าที่ต้องการให้เริ่มสำรวจหลังเข้าสู่ระบบ",scopePathHint:"จำกัดการสำรวจให้อยู่ในส่วนนี้",explore:"ขอบเขตการสำรวจ",currentPageOnly:"สำรวจหน้าเดียว",thisSection:"สำรวจเฉพาะส่วนนี้",entireSite:"สำรวจทั้งเว็บไซต์",targetedGuideTitle:"วิธีใช้ Targeted Exploration",targetedGuideTargetUrl:"ใส่ URL หลักของระบบที่ต้องการให้ LazyScout สำรวจ",targetedGuideStartPath:"ใส่ path ที่ต้องการให้เริ่ม เช่น",targetedGuideScopePath:"ใส่ขอบเขต เช่น",targetedGuideScopePathEnd:"เพื่อไม่ให้ flow โยกไปหน้าอื่น",targetedGuideCurrentPage:"สำรวจเพียงหน้าเดียว",targetedGuideThisSection:"สำรวจเฉพาะ scope",targetedGuideEntireSite:"สำรวจทั้งเว็บไซต์",targetedGuideExample:"ตัวอย่าง: Target URL = ระบบของคุณ, Start Path = /admin/users, Scope Path = /admin, เลือก This section",search:"ค้นหา",addCase:"เพิ่ม Test Case",screenshot:"Screenshot",delete:"ลบ",export:"Export CSV",activeProjectTarget:"เว็บไซต์เป้าหมายของโปรเจกต์",currentProject:"โปรเจกต์ปัจจุบัน",scoutDescription:"ใส่ URL แล้วให้ Playwright ค้นหาหน้า ปุ่ม ฟอร์ม และสถานะ UI โดยอัตโนมัติ",scouting:"กำลังสำรวจ…",optional:"ไม่บังคับ",targetUrlHelp:"URL หลักของเว็บไซต์ที่ต้องการให้ LazyScout เปิดและสำรวจ เช่น https://example.com",maxPagesHelp:"จำนวนหน้าสูงสุดที่ Scout จะสำรวจ ค่ายิ่งมากอาจใช้เวลานานขึ้น",maxDepthHelp:"ระดับความลึกของลิงก์จากหน้าเริ่มต้น 0 คือหน้าเดียว และ 1 คือหน้าที่ลิงก์จากหน้านั้น",testLanguageHelp:"ภาษาที่ใช้สร้างชื่อและรายละเอียดของ Test Case",maxPagesDescription:"จำนวนหน้าสูงสุดที่จะสำรวจ",maxDepthDescription:"ระดับความลึกของลิงก์จากหน้าเป้าหมาย",testLanguageDescription:"ภาษาที่ใช้สร้างรายละเอียด Test Case",safetyNotice:"Playwright จะอยู่ภายใน origin เดียวกัน และหลีกเลี่ยงการกระทำที่อาจเปลี่ยนแปลงหรือลบข้อมูล",includeApiChecks:"รวม API checks จาก XHR/fetch",validationMatrix:"รวม Validation Matrix แบบครบชุด",validationMatrixHelp:"สร้าง Test Case สำหรับ required, รูปแบบผิด, ความยาว, ช่วงตัวเลข, นโยบายรหัสผ่าน และ Login ไม่สำเร็จ จากกฎที่ตรวจพบในฟอร์ม",validationMatrixSafety:"Scout จะค้นหาและสร้างเคสเท่านั้น ส่วน Login ผิดและ Server validation จะยิงหนึ่งครั้งเมื่อผู้ใช้สั่ง Run Automation",waitAfterNavigation:"รอหลังเปลี่ยนหน้า",debugMode:"โหมด Debug",scoutAgain:"สำรวจอีกครั้ง",regenerateProject:"ต้องการสร้างข้อมูลของโปรเจกต์นี้ใหม่หรือไม่?",regenerateWarning:"Scout Site จะเขียนทับหน้าที่ค้นพบและ Test Case ที่สร้างไว้ของโปรเจกต์นี้",regenerateHint:"Export Test Case ที่ต้องการเก็บไว้ก่อนยืนยัน ส่วน Project Settings จะยังคงเดิม",cancel:"ยกเลิก",expandScout:"ขยายฟอร์ม Scout",collapseScout:"พับฟอร์ม Scout",help:"คำอธิบาย"}},tv=I.createContext(null);function jx({children:n}){const[l,s]=I.useState(()=>localStorage.getItem("lazyscout-language")||"en");I.useEffect(()=>{localStorage.setItem("lazyscout-language",l),document.documentElement.lang=l},[l]);const o=I.useMemo(()=>({language:l,setLanguage:s,toggleLanguage:()=>s(u=>u==="en"?"th":"en"),t:u=>Sx[l][u]}),[l]);return r.jsx(tv.Provider,{value:o,children:n})}function Cn(){const n=I.useContext(tv);if(!n)throw new Error("useLanguage must be used inside LanguageProvider");return n}const nv="lazyscout-test-case-language";function wx(){const n=localStorage.getItem(nv);return n==="th"||n==="en"?n:"en"}function cr({text:n}){const{t:l}=Cn(),[s,o]=I.useState(!1);return r.jsxs("span",{className:`help-tip ${s?"is-open":""}`,children:[r.jsx("button",{type:"button","aria-label":l("help"),"aria-expanded":s,title:n,onClick:u=>{u.preventDefault(),u.stopPropagation(),o(h=>!h)},children:"?"}),r.jsx("span",{className:"help-tip-popover",role:"tooltip",children:n})]})}function _x({loading:n,initialUrl:l="",hasExistingData:s=!1,initialLanguage:o,onLanguageChange:u,onAnalyze:h}){const{t:f}=Cn(),[p,g]=I.useState(l),[m,j]=I.useState(20),[b,S]=I.useState(3),[y,O]=I.useState(o??wx),[N,w]=I.useState(!1),[_,C]=I.useState(750),[A,H]=I.useState(""),[D,K]=I.useState(""),[G,ae]=I.useState("site"),[B,F]=I.useState(!1),[te,M]=I.useState(!1),[q,E]=I.useState(!1),Z=(()=>{try{return new URL(l).hostname}catch{return"Current project"}})();function Y(X){if(X.preventDefault(),!(!p.trim()||n)){if(s){E(!0);return}P()}}function P(){const X=Math.min(100,Math.max(1,m===""?20:m)),k=Math.min(10,Math.max(0,b===""?3:b));h(p.trim(),X,k,y,N,_,A.trim()||void 0,D.trim()||void 0,G,B),E(!1)}return r.jsxs("form",{onSubmit:Y,className:l?"project-scout-card":"new-project-card",children:[l&&r.jsxs("div",{className:"project-target-heading",children:[r.jsx("span",{className:"target-glow",children:"◎"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("activeProjectTarget")}),r.jsx("h2",{children:Z}),r.jsx("span",{children:l})]}),r.jsxs("span",{className:"target-status",children:[r.jsx("i",{})," ",f("savedProject")]}),r.jsx("button",{type:"button",className:`scout-collapse-btn ${te?"is-collapsed":""}`,onClick:()=>M(X=>!X),"aria-label":f(te?"expandScout":"collapseScout"),title:f(te?"expandScout":"collapseScout"),children:r.jsx("span",{children:"⌃"})})]}),!l&&r.jsxs("div",{className:"new-project-hero",children:[r.jsx("span",{className:"scout-orbit",children:"✦"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("localWorkspace")}),r.jsx("h2",{children:f("scoutWebsite")}),r.jsx("p",{children:f("scoutDescription")})]}),r.jsx("button",{type:"button",className:`scout-collapse-btn ${te?"is-collapsed":""}`,onClick:()=>M(X=>!X),"aria-label":f(te?"expandScout":"collapseScout"),title:f(te?"expandScout":"collapseScout"),children:r.jsx("span",{children:"⌃"})})]}),r.jsxs("div",{className:`scout-form-body ${te?"is-collapsed":""}`,children:[r.jsxs("div",{className:"scout-form-grid",children:[r.jsxs("div",{className:"scout-url-field",children:[r.jsxs("label",{className:"field-label",htmlFor:"target-url",children:[f("targetUrl"),r.jsx(cr,{text:f("targetUrlHelp")})]}),r.jsx("input",{id:"target-url",className:"field",value:p,onChange:X=>g(X.target.value),placeholder:"https://example.com",autoComplete:"off",disabled:n})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"max-pages",children:[f("maxPages"),r.jsx(cr,{text:f("maxPagesHelp")})]}),r.jsx("input",{id:"max-pages",className:"field",type:"number",min:1,max:100,value:m,onChange:X=>j(X.target.value===""?"":Math.min(100,Math.max(1,Number(X.target.value)))),disabled:n})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"max-depth",children:[f("maxDepth"),r.jsx(cr,{text:f("maxDepthHelp")})]}),r.jsx("input",{id:"max-depth",className:"field",type:"number",min:0,max:10,value:b,onChange:X=>S(X.target.value===""?"":Math.min(10,Math.max(0,Number(X.target.value)))),disabled:n})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label",htmlFor:"test-language",children:[f("language"),r.jsx(cr,{text:f("testLanguageHelp")})]}),r.jsxs("select",{id:"test-language",className:"field",value:y,onChange:X=>{const k=X.target.value;O(k),localStorage.setItem(nv,k),u?.(k)},disabled:n,children:[r.jsx("option",{value:"en",children:"English"}),r.jsx("option",{value:"th",children:"ไทย"})]})]}),r.jsx("button",{type:"submit",className:"btn btn-primary scout-submit",disabled:n||!p.trim(),children:f(n?"scouting":"scoutSite")})]}),!l&&r.jsxs("div",{className:"scout-options-help",children:[r.jsxs("span",{children:[r.jsx("b",{children:f("maxPages")})," ",f("maxPagesDescription")]}),r.jsxs("span",{children:[r.jsx("b",{children:f("maxDepth")})," ",f("maxDepthDescription")]}),r.jsxs("span",{children:[r.jsx("b",{children:f("language")})," ",f("testLanguageDescription")]})]}),r.jsxs("div",{className:"mt-3 border-t border-slate-100 pt-3",children:[r.jsxs("p",{className:"text-xs font-semibold text-slate-700 mb-2",children:[f("targetedExploration")," ",r.jsx(cr,{text:f("targetedExplorationHelp")})]}),r.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[r.jsxs("div",{children:[r.jsxs("label",{className:"field-label text-xs",htmlFor:"start-path",children:[f("startPath"),r.jsx(cr,{text:f("startPathHelp")}),r.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",f("optional"),")"]})]}),r.jsx("input",{id:"start-path",className:"field text-sm",value:A,onChange:X=>H(X.target.value),placeholder:"/admin/users",autoComplete:"off",disabled:n}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:f("startPathHint")})]}),r.jsxs("div",{children:[r.jsxs("label",{className:"field-label text-xs",htmlFor:"scope-path",children:[f("scopePath"),r.jsx(cr,{text:f("scopePathHelp")}),r.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",f("optional"),")"]})]}),r.jsx("input",{id:"scope-path",className:"field text-sm",value:D,onChange:X=>K(X.target.value),placeholder:"/admin",autoComplete:"off",disabled:n}),r.jsx("p",{className:"text-xs text-slate-400 mt-1",children:f("scopePathHint")})]})]}),r.jsxs("div",{className:"mt-3",children:[r.jsx("label",{className:"field-label text-xs",children:f("explore")}),r.jsxs("div",{className:"flex gap-4 mt-1",children:[r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"current-page",checked:G==="current-page",onChange:()=>ae("current-page"),disabled:n}),f("currentPageOnly")]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"scope",checked:G==="scope",onChange:()=>ae("scope"),disabled:n}),f("thisSection")]}),r.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[r.jsx("input",{type:"radio",name:"explore-mode",value:"site",checked:G==="site",onChange:()=>ae("site"),disabled:n}),f("entireSite")]})]})]})]}),r.jsxs("details",{className:"scout-guide",children:[r.jsx("summary",{children:f("targetedGuideTitle")}),r.jsxs("div",{className:"scout-guide-body",children:[r.jsx("img",{src:"/lazyscout-icon-v2.png",alt:"LazyScout"}),r.jsxs("div",{children:[r.jsxs("p",{children:[r.jsx("b",{children:f("targetUrl")})," ",f("targetedGuideTargetUrl")]}),r.jsxs("p",{children:[r.jsx("b",{children:f("startPath")})," ",f("targetedGuideStartPath")," ",r.jsx("code",{children:"/admin/users"})]}),r.jsxs("p",{children:[r.jsx("b",{children:f("scopePath")})," ",f("targetedGuideScopePath")," ",r.jsx("code",{children:"/admin"})," ",f("targetedGuideScopePathEnd")]}),r.jsxs("p",{children:[r.jsx("b",{children:f("currentPageOnly")})," ",f("targetedGuideCurrentPage")," · ",r.jsx("b",{children:f("thisSection")})," ",f("targetedGuideThisSection")," · ",r.jsx("b",{children:f("entireSite")})," ",f("targetedGuideEntireSite")]}),r.jsx("p",{className:"text-slate-500",children:f("targetedGuideExample")})]})]})]}),r.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-4 border-t border-slate-100 pt-3 text-xs text-slate-600",children:[r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[r.jsx("input",{type:"checkbox",checked:N,onChange:X=>w(X.target.checked),className:"h-4 w-4",disabled:n})," ",f("includeApiChecks")]}),r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[f("waitAfterNavigation")," ",r.jsx("input",{className:"field w-24",type:"number",min:0,max:5e3,step:250,value:_,onChange:X=>C(X.target.value===""?0:Number(X.target.value)),disabled:n})," ","ms"]}),r.jsxs("label",{className:"m-0 flex items-center gap-2",children:[r.jsx("input",{type:"checkbox",checked:B,onChange:X=>F(X.target.checked),className:"h-4 w-4",disabled:n})," ",f("debugMode")]})]})]}),q&&r.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal scout-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"scout-confirm-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:f("scoutAgain")}),r.jsx("h2",{id:"scout-confirm-title",children:f("regenerateProject")})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>E(!1),"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"modal-body",children:[r.jsx("p",{children:f("regenerateWarning")}),r.jsx("p",{className:"text-sm text-slate-500",children:f("regenerateHint")})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>E(!1),children:f("cancel")}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:P,children:f("scoutSite")})]})]})})]})}function ku({message:n,hint:l}){return r.jsxs("div",{className:"rounded-lg border border-red-200 bg-red-50 p-4",children:[r.jsx("p",{className:"text-sm font-semibold text-red-700",children:n}),l&&r.jsx("p",{className:"mt-1 text-sm text-red-600",children:l})]})}function Nx({result:n,activeUrl:l,onSelect:s}){const[o,u]=I.useState(!1),{language:h}=Cn(),f=n.pages.reduce((p,g)=>{const m=new URL(g.finalUrl).pathname||"/";return(p[m]??=[]).push(g),p},{});return r.jsxs("aside",{className:`workspace-panel workspace-tree ${o?"is-collapsed":""}`,children:[r.jsxs("div",{className:"workspace-panel-head",children:[r.jsx("button",{type:"button",className:"tree-panel-toggle",onClick:()=>u(p=>!p),"aria-label":o?h==="th"?"ขยาย Explorer":"Expand Explorer":h==="th"?"พับ Explorer":"Collapse Explorer",title:o?h==="th"?"ขยาย Explorer":"Expand Explorer":h==="th"?"พับ Explorer":"Collapse Explorer",children:o?"›":"‹"}),r.jsxs("div",{className:"tree-panel-heading",children:[r.jsx("p",{className:"eyebrow",children:"Explorer"}),r.jsx("h2",{children:"State Tree"})]}),r.jsx("span",{className:"status-dot status-pass",title:"scan complete"})]}),!o&&r.jsxs("div",{className:"tree-meta",children:[r.jsxs("span",{children:[n.pages.length," pages"]}),r.jsxs("span",{children:[n.actionGraph.states.length," states"]})]}),!o&&r.jsx("div",{className:"tree-list",children:Object.entries(f).map(([p,g])=>r.jsxs("div",{className:"tree-branch",children:[r.jsxs("div",{className:"tree-path",children:[r.jsx("span",{className:"tree-chevron",children:"⌄"}),r.jsx("span",{className:"tree-folder",children:"●"}),p]}),g.map(m=>r.jsxs("button",{type:"button",onClick:()=>s(m.finalUrl),className:`tree-node ${l===m.finalUrl?"is-active":""}`,children:[r.jsx("span",{className:"tree-node-icon",children:m.state?.visibleDialogs.length?"◈":"◇"}),r.jsx("span",{className:"truncate",children:m.state?.visibleDialogs[0]??(m.title||"Untitled page")}),r.jsx("span",{className:"tree-node-count",children:m.buttons.length})]},m.state?.id??m.finalUrl))]},p))}),!o&&r.jsxs("div",{className:"tree-footer",children:[r.jsx("span",{className:"status-dot status-pass"})," Safe exploration only",r.jsx("br",{}),r.jsx("span",{className:"status-dot status-warn"})," Destructive actions blocked"]})]})}const av=["password","passwd","token","access_token","refresh_token","api_key","apikey","authorization","cookie","set-cookie","secret","client_secret","session","sessionid"];av.map(n=>n.replace("-","[-_]?").replace("_","[-_]?")).join("|");av.filter(n=>n!=="authorization").map(n=>n.replace("-","[-_]?").replace("_","[-_]?")).join("|");const rv=["delete","remove","destroy","erase","drop","reset","purchase","buy","checkout","pay","payment","transfer","withdraw","refund","submit order","place order","confirm payment","confirm order","deactivate","disable account","delete account","close account","unsubscribe","cancel subscription","revoke access","reset database","ลบ","ชำระเงิน","จ่าย","โอน","ซื้อ","สั่งซื้อ","ยืนยันการชำระ"],Tx=100,Ex=80;function iv(n){if(!Array.isArray(n))return[];const l=n.filter(s=>typeof s=="string").map(s=>s.trim().toLowerCase().slice(0,Ex)).filter(Boolean);return[...new Set(l)].slice(0,Tx)}function ur(n){const l=n.name||n.label||n.text||n.placeholder;return l&&n.role?`${n.role} "${l}"`:l?`"${l}"`:n.cssSelector?`element (${n.cssSelector})`:"element"}function li(n){if(n.description)return n.description;switch(n.type){case"navigate":return`Navigate to ${n.url}`;case"click":return`Click ${ur(n.target)}`;case"fill":return`Enter "${n.value}" in ${ur(n.target)}`;case"select":return`Select "${n.option}" from ${ur(n.target)}`;case"check":return`${n.checked?"Check":"Uncheck"} ${ur(n.target)}`;case"wait":return`Wait for ${n.mode}: ${n.value}`;case"assertVisible":return`Verify that ${ur(n.target)} is visible`;case"assertText":return n.target?`Verify that ${ur(n.target)} shows "${n.text}"`:`Verify that the page shows "${n.text}"`;case"assertUrl":return`Verify that the URL contains "${n.urlContains}"`;case"assertInvalid":return`Verify that ${ur(n.target)} is invalid and the form remains open`;case"assertValidation":return"Wait for a visible validation or error message";case"manual":return n.description}}function Cx(n){return n.map((l,s)=>`${s+1}. ${li(l)}`).join(`
|
|
10
|
+
`)}function gd(n,l){return`TC-${n}-${String(l).padStart(3,"0")}`}function vd(n,l){return`TD-${n}-${String(l).padStart(3,"0")}`}function Ox(n="MANUAL",l=vd("MANUAL",1),s=""){return{id:l,module:n,sourceUrl:s,field:"",inputType:"text",required:!1,validValue:"",invalidValue:""}}function Ax(n="MANUAL",l=gd("MANUAL",1),s=""){return{id:l,module:n,title:"New test case",preconditions:[],steps:[],expectedResult:"",type:"positive",priority:"medium",automationStatus:"manual",status:"pending",sourceUrl:s}}const Rx={positive:"bg-emerald-100 text-emerald-800",negative:"bg-rose-100 text-rose-800",validation:"bg-amber-100 text-amber-800",navigation:"bg-sky-100 text-sky-800",interaction:"bg-violet-100 text-violet-800",accessibility:"bg-teal-100 text-teal-800",manual:"bg-slate-200 text-slate-700"},kx={high:"bg-red-100 text-red-800",medium:"bg-blue-100 text-blue-800",low:"bg-slate-100 text-slate-700"},Dx={ready:"bg-emerald-100 text-emerald-800","needs-data":"bg-amber-100 text-amber-800","needs-review":"bg-orange-100 text-orange-800",manual:"bg-slate-200 text-slate-700"};function zx({value:n}){return r.jsx("span",{className:`badge ${Rx[n]}`,children:n})}function Ux({value:n}){return r.jsx("span",{className:`badge ${kx[n]}`,children:n})}function Lx({value:n}){return r.jsx("span",{className:`badge ${Dx[n]}`,children:n})}function Mx({testCase:n,onEdit:l,onClose:s}){return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:o=>o.target===o.currentTarget&&s(),children:r.jsxs("section",{className:"modern-modal test-detail-modal",role:"dialog","aria-modal":"true","aria-labelledby":"test-case-detail-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Test Case detail"}),r.jsx("h2",{id:"test-case-detail-title",children:n.id}),r.jsx("p",{children:n.title})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:s,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"test-detail-body",children:[r.jsxs("div",{className:"test-detail-meta",children:[r.jsx(zx,{value:n.type}),r.jsx(Ux,{value:n.priority}),r.jsx(Lx,{value:n.automationStatus}),r.jsx("span",{className:"badge bg-slate-100 text-slate-600",children:n.folder??n.module})]}),(n.tags?.length||n.requirements?.length)&&r.jsxs("section",{className:"traceability-meta",children:[n.tags?.length?r.jsxs("div",{children:[r.jsx("h4",{className:"field-label",children:"Tags"}),n.tags.map(o=>r.jsx("span",{className:"tag-chip",children:o},o))]}):null,n.requirements?.length?r.jsxs("div",{children:[r.jsx("h4",{className:"field-label",children:"Requirements / Tickets"}),n.requirements.map(o=>r.jsx("span",{className:"requirement-chip",children:o},o))]}):null]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Preconditions"}),n.preconditions.length===0?r.jsx("p",{className:"text-sm text-slate-400",children:"—"}):r.jsx("ul",{className:"list-inside list-disc space-y-1 text-sm text-slate-700",children:n.preconditions.map((o,u)=>r.jsx("li",{children:o},u))})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Steps"}),n.steps.length===0?r.jsx("p",{className:"text-sm text-slate-400",children:"—"}):r.jsx("ol",{className:"space-y-2 text-sm text-slate-700",children:n.steps.map((o,u)=>r.jsxs("li",{className:"test-detail-step",children:[r.jsx("span",{children:u+1}),r.jsxs("div",{children:[li(o),r.jsxs("small",{children:["[",o.type,"]"]})]})]},u))})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Expected Result"}),r.jsx("p",{className:"text-sm text-slate-700",children:n.expectedResult||"—"})]}),n.notes&&r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Notes from Generator"}),r.jsx("p",{className:"text-sm text-slate-500",children:n.notes})]}),r.jsxs("section",{children:[r.jsx("h4",{className:"field-label",children:"Source URL"}),r.jsx("p",{className:"break-all text-xs text-slate-500",children:n.sourceUrl})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,children:"Close"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:l,children:"Edit Test Case"})]})]})})}function Bx({testCase:n,onSave:l,onCancel:s}){const[o,u]=I.useState({...n}),[h,f]=I.useState(n.preconditions.join(`
|
|
11
|
+
`)),[p,g]=I.useState((n.tags??[]).join(", ")),[m,j]=I.useState((n.requirements??[]).join(", "));I.useEffect(()=>{function w(_){_.key==="Escape"&&s()}return document.addEventListener("keydown",w),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",w),document.body.style.overflow=""}},[s]);function b(w){u(_=>({..._,...w}))}function S(w,_){u(C=>({...C,steps:C.steps.map((A,H)=>H===w?{...A,description:_}:A)}))}function y(w){u(_=>({..._,steps:_.steps.filter((C,A)=>A!==w)}))}function O(){u(w=>({...w,steps:[...w.steps,{type:"manual",description:"New step"}]}))}function N(){l({...o,preconditions:h.split(`
|
|
12
|
+
`).map(w=>w.trim()).filter(Boolean),tags:zm(p),requirements:zm(m)})}return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:w=>w.target===w.currentTarget&&s(),children:r.jsxs("div",{className:"modern-modal test-case-editor-modal",children:[r.jsxs("div",{className:"card-title flex shrink-0 items-center justify-between",children:[r.jsxs("span",{children:["Edit ",o.id]}),r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:s,"aria-label":"Close editor",children:"✕"})]}),r.jsxs("div",{className:"test-case-editor-body",children:[r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-module",children:"Module"}),r.jsx("input",{id:"edit-module",className:"field",value:o.module,onChange:w=>b({module:w.target.value})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-id",children:"TC ID"}),r.jsx("input",{id:"edit-id",className:"field font-mono",value:o.id,onChange:w=>b({id:w.target.value})})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-folder",children:"Folder"}),r.jsx("input",{id:"edit-folder",className:"field",value:o.folder??o.module,onChange:w=>b({folder:w.target.value})})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-title",children:"Title"}),r.jsx("input",{id:"edit-title",className:"field",value:o.title,onChange:w=>b({title:w.target.value})})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-type",children:"Type"}),r.jsxs("select",{id:"edit-type",className:"field",value:o.type,onChange:w=>b({type:w.target.value}),children:[r.jsx("option",{value:"positive",children:"positive"}),r.jsx("option",{value:"negative",children:"negative"}),r.jsx("option",{value:"validation",children:"validation"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-priority",children:"Priority"}),r.jsxs("select",{id:"edit-priority",className:"field",value:o.priority,onChange:w=>b({priority:w.target.value}),children:[r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-automation",children:"Automation Status"}),r.jsxs("select",{id:"edit-automation",className:"field",value:o.automationStatus,onChange:w=>b({automationStatus:w.target.value}),children:[r.jsx("option",{value:"ready",children:"ready"}),r.jsx("option",{value:"needs-data",children:"needs-data"}),r.jsx("option",{value:"needs-review",children:"needs-review"}),r.jsx("option",{value:"manual",children:"manual"})]})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-preconditions",children:"Preconditions (one per line)"}),r.jsx("textarea",{id:"edit-preconditions",className:"field h-20",value:h,onChange:w=>f(w.target.value)})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-tags",children:"Tags (comma separated)"}),r.jsx("input",{id:"edit-tags",className:"field",value:p,onChange:w=>g(w.target.value),placeholder:"smoke, regression, critical"})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-requirements",children:"Requirements / Tickets"}),r.jsx("textarea",{id:"edit-requirements",className:"field min-h-10 resize-y leading-5",value:m,onChange:w=>j(w.target.value),placeholder:"JIRA-123, https://tracker.example/456",rows:2})]})]}),r.jsxs("div",{children:[r.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[r.jsx("span",{className:"field-label mb-0",children:"Steps"}),r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:O,children:"+ Add step"})]}),r.jsxs("div",{className:"space-y-2",children:[o.steps.map((w,_)=>r.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[r.jsxs("span",{className:"w-5 text-xs text-slate-400",children:[_+1,"."]}),r.jsx("input",{className:"field min-w-0",value:li(w),onChange:C=>S(_,C.target.value)}),r.jsx("span",{className:"w-24 shrink-0 font-mono text-xs text-slate-400",children:w.type}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>y(_),children:"Delete"})]},_)),o.steps.length===0&&r.jsx("p",{className:"text-sm text-slate-400",children:"No steps yet."})]})]}),r.jsxs("div",{children:[r.jsx("label",{className:"field-label",htmlFor:"edit-expected",children:"Expected Result"}),r.jsx("textarea",{id:"edit-expected",className:"field h-20",value:o.expectedResult,onChange:w=>b({expectedResult:w.target.value})})]})]}),r.jsxs("div",{className:"test-case-editor-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:s,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:N,children:"Save"})]})]})})}function zm(n){return n.split(/[,;\n]/).map(l=>l.trim()).filter(Boolean)}function Qr({value:n,editValue:l=n,options:s,multiline:o=!1,onSave:u}){const{language:h}=Cn(),[f,p]=I.useState(!1),[g,m]=I.useState(l);if(I.useEffect(()=>{f||m(l)},[f,l]),!f)return r.jsxs("span",{className:"inline-edit-shell",children:[r.jsx("span",{className:"inline-edit-value",title:h==="th"?"ดับเบิลคลิกเพื่อแก้ไข":"Double-click to edit",onDoubleClick:()=>p(!0),children:n||"—"}),r.jsx("button",{type:"button",onClick:()=>p(!0),"aria-label":h==="th"?"แก้ไขค่า":"Edit value",title:h==="th"?"แก้ไข":"Edit",children:"✎"})]});const j=()=>{p(!1),g!==l&&u(g)},b={autoFocus:!0,value:g,onChange:S=>m(S.target.value),onBlur:j,onKeyDown:S=>{S.key==="Enter"&&j(),S.key==="Escape"&&(m(l),p(!1))},onClick:S=>S.stopPropagation()};return o&&!s?r.jsx("textarea",{...b,className:"inline-edit-textarea",rows:5}):s?r.jsx("select",{...b,className:"inline-edit-input",children:s.map(S=>r.jsx("option",{children:S},S))}):r.jsx("input",{...b,className:"inline-edit-input"})}function tl({value:n,onSave:l}){const{language:s}=Cn(),[o,u]=I.useState(!1),[h,f]=I.useState(n),p=I.useRef(null),g=I.useRef(null);if(I.useEffect(()=>{o||f(n)},[o,n]),!o)return r.jsxs("span",{className:"inline-edit-shell",children:[r.jsx("span",{className:"inline-edit-value",title:s==="th"?"ดับเบิลคลิกเพื่อแก้ไข":"Double-click to edit",onDoubleClick:()=>u(!0),dangerouslySetInnerHTML:{__html:n||"—"}}),r.jsx("button",{type:"button",onClick:()=>u(!0),"aria-label":s==="th"?"แก้ไขค่า":"Edit value",title:s==="th"?"แก้ไข":"Edit",children:"✎"})]});const m=()=>{const y=window.getSelection();y?.rangeCount&&(p.current=y.getRangeAt(0).cloneRange())},j=()=>{const y=window.getSelection();p.current&&y&&(y.removeAllRanges(),y.addRange(p.current))},b=(y,O)=>{j(),document.execCommand(y,!1,O),g.current?.focus(),m()},S=y=>{f(y.innerHTML),u(!1),l(y.innerHTML)};return r.jsxs("div",{className:"rich-text-editor",onClick:y=>y.stopPropagation(),children:[r.jsxs("div",{className:"rich-text-toolbar",children:[r.jsx("button",{type:"button",onMouseDown:()=>m(),onClick:()=>b("bold"),children:"B"}),r.jsx("button",{type:"button",onMouseDown:()=>m(),onClick:()=>b("italic"),children:"I"}),r.jsx("input",{type:"color",defaultValue:"#1e293b",onMouseDown:()=>m(),onChange:y=>b("foreColor",y.target.value),"aria-label":"Text color"}),r.jsxs("select",{defaultValue:"3",onMouseDown:()=>m(),onChange:y=>b("fontSize",y.target.value),"aria-label":"Text size",children:[r.jsx("option",{value:"2",children:"Small"}),r.jsx("option",{value:"3",children:"Normal"}),r.jsx("option",{value:"5",children:"Large"}),r.jsx("option",{value:"7",children:"Huge"})]})]}),r.jsx("div",{className:"rich-text-content",ref:g,contentEditable:!0,suppressContentEditableWarning:!0,dangerouslySetInnerHTML:{__html:h},onBlur:y=>{y.relatedTarget&&g.current?.parentElement?.contains(y.relatedTarget)||S(y.currentTarget)},onMouseUp:m,onKeyUp:m,onKeyDown:y=>{y.key==="Escape"&&(f(n),u(!1))}})]})}function $x({testCases:n,selectedIds:l,activeId:s,onToggleSelect:o,onToggleAll:u,onOpen:h,onEdit:f,onDelete:p,onReorder:g,onUpdateCell:m,executionStatuses:j={}}){const{language:b}=Cn(),S=b==="th",[y,O]=I.useState(),[N,w]=I.useState(),[_,C]=I.useState(),[A,H]=I.useState("basic"),[D,K]=I.useState({}),G=I.useRef(null),ae=n.length>0&&n.every(B=>l.includes(B.id));return I.useEffect(()=>{function B(te){G.current&&!G.current.contains(te.target)&&C(void 0)}function F(te){te.key==="Escape"&&C(void 0)}return document.addEventListener("pointerdown",B),document.addEventListener("keydown",F),()=>{document.removeEventListener("pointerdown",B),document.removeEventListener("keydown",F)}},[]),n.length===0?r.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:S?"ไม่พบ Test Case ที่ตรงกับตัวกรอง":"No Test Cases match the current filters."}):r.jsxs("div",{className:`test-case-table-wrap table-view-${A}`,children:[r.jsxs("div",{className:"test-case-view-bar",children:[r.jsxs("div",{children:[r.jsx("b",{children:S?"คอลัมน์ตาราง":"Table columns"}),r.jsx("span",{children:S?"เริ่มจากข้อมูลพื้นฐาน แล้วแสดงรายละเอียดเมื่อจำเป็น":"Start simple, then show more detail only when you need it."})]}),r.jsxs("div",{role:"group","aria-label":"Test Case table columns",children:[r.jsx("button",{type:"button",className:A==="basic"?"is-active":"",onClick:()=>H("basic"),children:S?"พื้นฐาน":"Basic"}),r.jsx("button",{type:"button",className:A==="tester"?"is-active":"",onClick:()=>H("tester"),children:"Tester"}),r.jsx("button",{type:"button",className:A==="all"?"is-active":"",onClick:()=>H("all"),children:S?"ทุกคอลัมน์":"All columns"})]})]}),r.jsx("div",{className:"test-case-table-scroll border border-slate-200",children:r.jsxs("table",{className:"test-case-table border-collapse",children:[r.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"table-head w-10",children:S?"ย้าย":"Move"}),r.jsx("th",{className:"table-head w-10",children:r.jsx("input",{type:"checkbox",checked:ae,onChange:()=>u(ae?[]:n.map(B=>B.id)),"aria-label":"Select all"})}),r.jsx("th",{className:"table-head w-32",children:"TC ID"}),r.jsx("th",{className:"table-head w-28",children:"Folder"}),r.jsx("th",{className:"table-head",children:S?"ชื่อ":"Title"}),r.jsx("th",{className:"table-head w-24 col-tester",children:"Type"}),r.jsx("th",{className:"table-head w-24",children:"Priority"}),r.jsx("th",{className:"table-head w-56 col-tester",children:S?"ขั้นตอน":"Steps"}),r.jsx("th",{className:"table-head col-tester",children:"Expected Result"}),r.jsx("th",{className:"table-head w-32",children:"Automation"}),r.jsx("th",{className:"table-head w-48 col-all",children:"Preconditions"}),r.jsx("th",{className:"table-head w-48 col-all",children:"Notes"}),r.jsx("th",{className:"table-head w-40 col-tester",children:"Tags"}),r.jsx("th",{className:"table-head w-32",children:"Status"}),r.jsx("th",{className:"table-head w-28 text-center",children:S?"จัดการ":"Actions"})]})}),r.jsx("tbody",{children:n.map(B=>r.jsxs("tr",{onDragOver:F=>{F.preventDefault(),w(B.id)},onDrop:F=>{F.preventDefault(),y&&g(y,B.id),O(void 0),w(void 0)},onDragEnd:()=>{O(void 0),w(void 0)},className:`border-b border-slate-100 hover:bg-blue-50 ${N===B.id?"bg-indigo-50 ring-2 ring-inset ring-indigo-300":""} ${s===B.id?"bg-blue-50":""}`,children:[r.jsx("td",{className:"table-cell drag-handle",draggable:!0,onDragStart:()=>O(B.id),onClick:F=>F.stopPropagation(),title:"Drag to reorder",children:"⠿"}),r.jsx("td",{className:"table-cell",onClick:F=>F.stopPropagation(),children:r.jsx("input",{type:"checkbox",checked:l.includes(B.id),onChange:()=>o(B.id),"aria-label":`Select ${B.id}`})}),r.jsx("td",{className:"table-cell font-mono text-xs",children:B.id}),r.jsx("td",{className:"table-cell",children:r.jsx(Qr,{value:B.folder??B.module,onSave:F=>m(B.id,"folder",F)})}),r.jsxs("td",{className:"table-cell font-medium text-slate-900",children:[r.jsx(tl,{value:B.title,onSave:F=>m(B.id,"title",F)}),(B.tags?.length||B.requirements?.length)&&r.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[B.tags?.slice(0,3).map(F=>r.jsx("span",{className:"tag-chip",children:F},F)),B.requirements?.slice(0,2).map(F=>r.jsx("span",{className:"requirement-chip",children:F},F))]})]}),r.jsx("td",{className:"table-cell col-tester",children:r.jsx(Qr,{value:B.type,options:["positive","negative","validation"],onSave:F=>m(B.id,"type",F)})}),r.jsx("td",{className:"table-cell",children:r.jsx(Qr,{value:B.priority,options:["high","medium","low"],onSave:F=>m(B.id,"priority",F)})}),r.jsxs("td",{className:"table-cell min-w-56 col-tester",children:[r.jsx(tl,{value:B.steps.map((F,te)=>`${te+1}. ${li(F)}`).join(`
|
|
13
|
+
`),onSave:F=>m(B.id,"steps",F)}),r.jsx("button",{type:"button",className:"mt-2 rounded border border-indigo-200 bg-indigo-50 px-2 py-1 text-[10px] font-semibold text-indigo-700 hover:bg-indigo-100",onClick:F=>{F.stopPropagation(),h(B)},children:S?"ดูขั้นตอน":"View Steps"})]}),r.jsx("td",{className:"table-cell max-w-md text-slate-600 col-tester",children:r.jsx(tl,{value:B.expectedResult,onSave:F=>m(B.id,"expectedResult",F)})}),r.jsx("td",{className:"table-cell",children:r.jsx(Qr,{value:B.automationStatus,options:["ready","needs-data","needs-review","manual"],onSave:F=>m(B.id,"automationStatus",F)})}),r.jsx("td",{className:"table-cell min-w-48 col-all",children:r.jsx(tl,{value:B.preconditions.join(`
|
|
14
|
+
`),onSave:F=>m(B.id,"preconditions",F)})}),r.jsx("td",{className:"table-cell min-w-48 col-all",children:r.jsx(tl,{value:B.notes??"",onSave:F=>m(B.id,"notes",F)})}),r.jsx("td",{className:"table-cell min-w-40 col-tester",children:r.jsx(Qr,{value:(B.tags??[]).join(", "),onSave:F=>m(B.id,"tags",F)})}),r.jsx("td",{className:"table-cell",children:r.jsx(Qr,{value:D[B.id]??j[B.id]??B.status??"pending",options:["pending","passed","failed"],onSave:F=>{const te=F;K(M=>({...M,[B.id]:te})),m(B.id,"status",te)}})}),r.jsx("td",{className:"table-cell text-center",onClick:F=>F.stopPropagation(),children:r.jsxs("div",{className:"action-menu-wrap",ref:_===B.id?G:void 0,children:[r.jsx("button",{type:"button",className:"action-menu-trigger","aria-label":`Actions for ${B.id}`,"aria-expanded":_===B.id,onClick:()=>C(F=>F===B.id?void 0:B.id),children:"⋯"}),_===B.id&&r.jsxs("div",{className:"action-menu",children:[r.jsx("button",{type:"button",onClick:()=>{h(B),C(void 0)},children:"View Test Case"}),r.jsx("button",{type:"button",onClick:()=>{f(B),C(void 0)},children:"Edit"}),r.jsx("button",{type:"button",className:"danger",onClick:()=>{p(B.id),C(void 0)},children:"Delete"})]})]})})]},B.id))})]})})]})}function Hx({filters:n,modules:l,totalCount:s,visibleCount:o,selectedCount:u,exporting:h,onFiltersChange:f,onAdd:p,onImportScreenshot:g,onImport:m,onRecord:j,onDeleteSelected:b,onExport:S}){const{language:y,t:O}=Cn(),N=y==="th",w=_=>f({...n,..._});return r.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[r.jsxs("div",{className:"min-w-56 flex-1",children:[r.jsx("label",{className:"field-label",htmlFor:"search",children:O("search")}),r.jsx("input",{id:"search",className:"field",value:n.search,onChange:_=>w({search:_.target.value}),placeholder:"Search ID, title, expected result, steps, tags or requirements"})]}),r.jsxs("div",{className:"w-48",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-module",children:"Folder / Module"}),r.jsx("input",{id:"filter-module",className:"field",list:"module-options",value:n.module==="all"?"":n.module,onChange:_=>w({module:_.target.value||"all"}),placeholder:"Search or select folder"}),r.jsx("datalist",{id:"module-options",children:l.map(_=>r.jsx("option",{value:_},_))})]}),r.jsxs("div",{className:"w-36",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-type",children:"Type"}),r.jsxs("select",{id:"filter-type",className:"field",value:n.type,onChange:_=>w({type:_.target.value}),children:[r.jsx("option",{value:"all",children:"All"}),r.jsx("option",{value:"positive",children:"positive"}),r.jsx("option",{value:"negative",children:"negative"}),r.jsx("option",{value:"validation",children:"validation"})]})]}),r.jsxs("div",{className:"w-36",children:[r.jsx("label",{className:"field-label",htmlFor:"filter-priority",children:"Priority"}),r.jsxs("select",{id:"filter-priority",className:"field",value:n.priority,onChange:_=>w({priority:_.target.value}),children:[r.jsx("option",{value:"all",children:"All"}),r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:p,children:["+ ",O("addCase")]}),r.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:m,children:["⇧ ",N?"นำเข้า":"Import"]}),r.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:g,children:["▣ ",O("screenshot")]}),r.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:j,children:["● ",N?"บันทึก Flow":"Record Flow"]}),r.jsxs("button",{type:"button",className:"btn btn-danger",onClick:b,disabled:u===0,children:[O("delete")," (",u,")"]}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:S,disabled:h,children:h?N?"กำลัง Export…":"Exporting…":O("export")})]}),r.jsxs("p",{className:"w-full text-xs text-slate-500",children:[N?"แสดง":"Showing"," ",o," ",N?"จาก":"of"," ",s," Test Cases",u>0&&` · ${u} ${N?"รายการที่เลือก":"selected"}`]})]})}function qx({testCases:n}){const l=I.useMemo(()=>{const u=new Map;for(const h of n)for(const f of h.requirements??[])u.set(f,[...u.get(f)??[],h]);return[...u.entries()].sort(([h],[f])=>h.localeCompare(f))},[n]),s=n.filter(u=>(u.requirements?.length??0)>0).length,o=n.length-s;return n.length?r.jsxs("section",{className:"traceability-summary",children:[r.jsxs("div",{className:"traceability-summary-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Requirements traceability"}),r.jsx("h3",{children:"Coverage at a glance"})]}),r.jsxs("span",{children:[l.length," requirements"]})]}),r.jsxs("div",{className:"traceability-kpis",children:[r.jsxs("div",{children:[r.jsx("b",{children:s}),r.jsx("span",{children:"Linked cases"})]}),r.jsxs("div",{children:[r.jsx("b",{children:o}),r.jsx("span",{children:"Without requirement"})]}),r.jsxs("div",{children:[r.jsxs("b",{children:[l.length?Math.round(s/n.length*100):0,"%"]}),r.jsx("span",{children:"Case coverage"})]})]}),l.length?r.jsxs("div",{className:"traceability-list",children:[l.slice(0,8).map(([u,h])=>r.jsxs("div",{children:[r.jsx("span",{title:u,children:u}),r.jsxs("b",{children:[h.length," case",h.length===1?"":"s"]})]},u)),l.length>8&&r.jsxs("small",{children:["+ ",l.length-8," more requirements"]})]}):r.jsx("p",{className:"traceability-empty",children:"Add a Jira ID, GitLab issue or merge request URL, ticket, or requirement URL to a Test Case to track coverage here."})]}):null}function Gx({rows:n,onUpdate:l,onDelete:s}){return n.length===0?r.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:"No Test Data matches the current filters."}):r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"w-full border-collapse",children:[r.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:r.jsxs("tr",{children:[r.jsx("th",{className:"table-head w-32",children:"TD ID"}),r.jsx("th",{className:"table-head w-28",children:"Module"}),r.jsx("th",{className:"table-head w-44",children:"Field"}),r.jsx("th",{className:"table-head w-28",children:"Input Type"}),r.jsx("th",{className:"table-head w-20",children:"Required"}),r.jsx("th",{className:"table-head",children:"Valid Value"}),r.jsx("th",{className:"table-head",children:"Invalid Value"}),r.jsx("th",{className:"table-head",children:"Note"}),r.jsx("th",{className:"table-head w-20",children:"Actions"})]})}),r.jsx("tbody",{children:n.map(o=>r.jsxs("tr",{className:"border-b border-slate-100 hover:bg-slate-50",children:[r.jsx("td",{className:"table-cell font-mono text-xs",children:o.id}),r.jsx("td",{className:"table-cell",children:o.module}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.field,onChange:u=>l(o.id,{...o,field:u.target.value}),"aria-label":`Field for ${o.id}`})}),r.jsx("td",{className:"table-cell font-mono text-xs text-slate-500",children:o.inputType}),r.jsx("td",{className:"table-cell text-center",children:r.jsx("input",{type:"checkbox",checked:o.required,onChange:u=>l(o.id,{...o,required:u.target.checked}),"aria-label":`Required for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.validValue,onChange:u=>l(o.id,{...o,validValue:u.target.value}),"aria-label":`Valid value for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.invalidValue,onChange:u=>l(o.id,{...o,invalidValue:u.target.value}),"aria-label":`Invalid value for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("input",{className:"field px-2 py-1",value:o.note??"",onChange:u=>l(o.id,{...o,note:u.target.value}),"aria-label":`Note for ${o.id}`})}),r.jsx("td",{className:"table-cell",children:r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>s(o.id),children:"Delete"})})]},o.id))})]})})}function Ix({search:n,module:l,modules:s,totalCount:o,visibleCount:u,exporting:h,onSearchChange:f,onModuleChange:p,onAdd:g,onExport:m}){return r.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[r.jsxs("div",{className:"min-w-56 flex-1",children:[r.jsx("label",{className:"field-label",htmlFor:"data-search",children:"Search"}),r.jsx("input",{id:"data-search",className:"field",value:n,onChange:j=>f(j.target.value),placeholder:"Search field, value or note"})]}),r.jsxs("div",{className:"w-40",children:[r.jsx("label",{className:"field-label",htmlFor:"data-module",children:"Module"}),r.jsxs("select",{id:"data-module",className:"field",value:l,onChange:j=>p(j.target.value),children:[r.jsx("option",{value:"all",children:"All"}),s.map(j=>r.jsx("option",{value:j,children:j},j))]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:g,children:"+ Add Row"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:m,disabled:h,children:h?"Exporting…":"Export CSV"})]}),r.jsxs("p",{className:"w-full text-xs text-slate-500",children:["Showing ",u," of ",o," rows · Generated values are examples only. Replace them with real test data before use · CSV export includes Test Cases and Test Data together."]})]})}const Vx=/\bdata-v-[0-9a-f]{6,}\b/i,Yx=/\d{4,}/,Um="data-testid";function Fx(n){const l=[],s=(o,u)=>{!u||Vx.test(u)||l.some(([,h])=>h===u)||l.push([o,u])};return s(...Px(n)),s("id",n.elementId&&!Yx.test(n.elementId)?ll(Kx(n.elementId)):void 0),s("semantic locator",Zx(n)),s("name",n.attributeName?ll(lv("name",n.attributeName,n.tagName)):void 0),s("recorded CSS",n.cssSelector?ll(Lm(n.cssSelector)):void 0),l.length===0&&s("recorded CSS",ll(Lm(n.cssSelector??""))),l}function Px(n){if(!n.testId)return["test id",void 0];const l=n.testIdAttribute??Um;return l===Um?["test id",`page.getByTestId(${da(n.testId)})`]:[l,ll(lv(l,n.testId))]}function Zx(n){const l=n.role&&n.name?`page.getByRole(${da(n.role)}, { name: ${da(n.name)}, exact: true })`:n.label?`page.getByLabel(${da(n.label)}, { exact: true })`:n.placeholder?`page.getByPlaceholder(${da(n.placeholder)})`:n.text?`page.getByText(${da(n.text)})`:void 0;if(!l)return;const s=n.contextTestId?`page.getByTestId(${da(n.contextTestId)})`:n.contextSelector?`page.locator(${da(n.contextSelector)})`:void 0,o=s?n.contextText?`${s}.filter({ hasText: ${da(n.contextText)} }).${l.slice(5)}`:`${s}.${l.slice(5)}`:l;return n.nth===void 0?o:`${o}.nth(${n.nth})`}function Xx(n){return n.name??n.label??n.placeholder??n.text??n.testId??n.elementId??n.attributeName??n.cssSelector??"target"}function lv(n,l,s){const o=l.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return`${s?s.toLowerCase():""}[${n}="${o}"]`}function Kx(n){return`#${n.replace(/[^\w-]/g,l=>`\\${l}`)}`}function ll(n){return`page.locator(${Qx(n)})`}function Lm(n){return n.replace(/\\(["'])/g,"$1")}function Qx(n){return`'${n.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}const da=n=>JSON.stringify(n);function Mm(n){const l=["import { test, expect } from '@playwright/test'","",...e0(),"",`test(${Un(n.title)}, async ({ page }) => {`];for(const s of n.steps)l.push(` ${t0(s)}`);return l.push("})",""),l.join(`
|
|
15
|
+
`)}const Jx=5e3,Wx=100;function e0(){return[`async function resolveTarget(page, candidates, description, timeout = ${Jx}) {`," const startedAt = Date.now()"," let attempts = []"," do {"," attempts = []"," for (const [kind, candidate] of candidates) {"," try {"," const count = await candidate.count()"," if (count !== 1) {"," attempts.push('- ' + kind + ': ' + count + ' matches')"," continue"," }"," if (!(await candidate.isVisible())) {"," attempts.push('- ' + kind + ': matched but not visible')"," continue"," }"," console.log('[Locator] ' + description + ' -> ' + kind + ' (' + (Date.now() - startedAt) + 'ms)')"," return candidate"," } catch (error) {"," attempts.push('- ' + kind + ': ' + (error instanceof Error ? error.message : String(error)))"," }"," }",` await page.waitForTimeout(${Wx})`," } while (Date.now() - startedAt < timeout)",""," const diagnostics = await page"," .evaluate(() => ({ readyState: document.readyState, title: document.title }))"," .catch(() => ({ readyState: 'unknown', title: 'unknown' }))"," throw new Error(",` 'Could not resolve "' + description + '" after ' + (Date.now() - startedAt) + 'ms.\\n' +`," 'URL: ' + page.url() + '\\n' +"," 'Page title: ' + diagnostics.title + '\\n' +"," 'document.readyState: ' + diagnostics.readyState + '\\n' +"," 'Candidates:\\n' + attempts.join('\\n')"," )","}"]}function Ba(n){const l=Fx(n);return`resolveTarget(page, [${(n.strategy==="css"?[...l].sort(([u],[h])=>u==="recorded CSS"?-1:h==="recorded CSS"?1:0):l).map(([u,h])=>`[${Un(u)}, ${h}]`).join(", ")}], ${Un(Xx(n))})`}function t0(n){switch(n.type){case"navigate":return`await page.goto(${Un(n0(n.url))})`;case"click":return`await (await ${Ba(n.target)}).click()`;case"fill":return`await (await ${Ba(n.target)}).fill(${Un(n.value)})`;case"select":return`await (await ${Ba(n.target)}).selectOption(${Un(n.option)})`;case"check":return`await (await ${Ba(n.target)}).${n.checked?"check":"uncheck"}()`;case"wait":return n.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(n.value)||0))})`:n.mode==="url"?`await page.waitForURL(new RegExp(${Un(n.value)}))`:n.mode==="text"?`await expect(page).toContainText(${Un(n.value)})`:`await expect(await ${Ba(n.target)}).toBeVisible()`;case"assertVisible":return`await expect(await ${Ba(n.target)}).toBeVisible()`;case"assertText":return n.target?`await expect(await ${Ba(n.target)}).toContainText(${Un(n.text)})`:`await expect(page.locator('body')).toContainText(${Un(n.text)})`;case"assertUrl":return`await expect(page).toHaveURL(new RegExp(${Un(n.urlContains)}))`;case"assertInvalid":return`expect(await (await ${Ba(n.target)}).evaluate((element) => element.matches(':invalid'))).toBe(true)`;case"assertValidation":return`await expect(page.locator('[role="alert"], [aria-invalid="true"], .error, .errors, .invalid-feedback, #error').filter({ visible: true }).first()).toBeVisible()`;case"manual":return`// TODO: ${n.description}`}}const Un=n=>JSON.stringify(n);function n0(n){const l=/^\s*\[([^\]]+)\]\(\s*([^)\s]+)\s*\)\s*$/.exec(n);return l?l[2]:n.trim()}function Bm(n){const l=[`describe(${Ft(n.module)}, () => {`,` it(${Ft(n.title)}, () => {`];for(const s of n.steps)l.push(` ${a0(s)}`);return l.push(" })","})",""),l.join(`
|
|
16
|
+
`)}function $a(n){const l=n.role&&n.name?`cy.contains(${Ft(n.role)}, ${Ft(n.name)})`:n.label?`cy.get('label').contains(${Ft(n.label)}).invoke('attr', 'for').then((id) => cy.get('#' + id))`:n.placeholder?`cy.get(${Ft(`[placeholder="${n.placeholder}"]`)})`:n.text?`cy.contains(${Ft(n.text)})`:`cy.get(${Ft(n.cssSelector??"")})`;return n.nth===void 0?l:`${l}.eq(${n.nth})`}function a0(n){switch(n.type){case"navigate":return`cy.visit(${Ft(n.url)})`;case"click":return`${$a(n.target)}.click()`;case"fill":return`${$a(n.target)}.clear().type(${Ft(n.value)})`;case"select":return`${$a(n.target)}.select(${Ft(n.option)})`;case"check":return`${$a(n.target)}.${n.checked?"check":"uncheck"}()`;case"wait":return n.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(n.value)||0))})`:n.mode==="url"?`cy.url().should('include', ${Ft(n.value)})`:n.mode==="text"?`cy.contains(${Ft(n.value)}).should('be.visible')`:`${$a(n.target)}.should('be.visible')`;case"assertVisible":return`${$a(n.target)}.should('be.visible')`;case"assertText":return n.target?`${$a(n.target)}.should('contain.text', ${Ft(n.text)})`:`cy.contains(${Ft(n.text)}).should('be.visible')`;case"assertUrl":return`cy.url().should('include', ${Ft(n.urlContains)})`;case"assertInvalid":return`${$a(n.target)}.should('be.invalid')`;case"assertValidation":return`cy.get('[role="alert"], [aria-invalid="true"], .error, .errors, .invalid-feedback, #error').filter(':visible').first().should('be.visible')`;case"manual":return`// TODO: ${n.description}`}}const Ft=n=>JSON.stringify(n);function r0(n){const l=n.steps.map(u=>i0(n,u)),s=n.steps.find(u=>u.type==="assert"),o=s?.type==="assert"&&s.assertion.type==="text"?`The page shows "${s.assertion.value}".`:s?.type==="assert"&&s.assertion.type==="url"?`The URL contains "${s.assertion.value}".`:s?.type==="assert"?"The expected element is visible.":"Needs Review";return{id:`TC-FLOW-${n.id.slice(-8).toUpperCase()}`,module:"FLOW",title:n.name,preconditions:n.description?[n.description]:[],steps:l,expectedResult:o,type:"positive",priority:"medium",automationStatus:l.length?"ready":"needs-review",status:"pending",sourceUrl:n.baseUrl,notes:s?void 0:"Guided Flow has no assertion — expected result needs review."}}function i0(n,l){switch(l.type){case"navigate":return{type:"navigate",url:new URL(l.path,n.baseUrl).toString()};case"click":return{type:"click",target:l.target};case"fill":return{type:"fill",target:l.target,value:l.valueRef?`{{${l.valueRef}}}`:l.value??""};case"select":return{type:"select",target:l.target,option:l.option};case"check":return{type:"check",target:l.target,checked:l.checked};case"wait":return{type:"wait",mode:l.mode,value:l.value,target:l.target};case"assert":return l.assertion.type==="visible"?{type:"assertVisible",target:l.assertion.target}:l.assertion.type==="text"?{type:"assertText",text:l.assertion.value}:{type:"assertUrl",urlContains:l.assertion.value}}}function l0(n){const l=["import { test, expect } from '@playwright/test'","",`test(${JSON.stringify(n.name)}, async ({ page }) => {`];for(const s of n.steps)l.push(` ${s0(n,s)}`);return l.push("})",""),l.join(`
|
|
17
|
+
`)}function s0(n,l){switch(l.type){case"navigate":return`await page.goto(${JSON.stringify(new URL(l.path,n.baseUrl).toString())})`;case"click":return`await ${Jr(l.target)}.click()`;case"fill":return`await ${Jr(l.target)}.fill(${JSON.stringify(l.valueRef?`{{${l.valueRef}}}`:l.value??"")})`;case"select":return`await ${Jr(l.target)}.selectOption(${JSON.stringify(l.option)})`;case"check":return`await ${Jr(l.target)}.${l.checked?"check":"uncheck"}()`;case"wait":return l.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(l.value)||0))})`:l.mode==="url"?`await page.waitForURL(new RegExp(${JSON.stringify(l.value)}))`:l.mode==="text"?`await expect(page).toContainText(${JSON.stringify(l.value)})`:`await expect(${Jr(l.target)}).toBeVisible()`;case"assert":return l.assertion.type==="visible"?`await expect(${Jr(l.assertion.target)}).toBeVisible()`:l.assertion.type==="text"?`await expect(page.getByText(${JSON.stringify(l.assertion.value)})).toBeVisible()`:`await expect(page).toHaveURL(new RegExp(${JSON.stringify(l.assertion.value)}))`}}function Jr(n){if(o0(n))return`page.locator(${Du($m(n.cssSelector??n.value??""))})`;if(n.strategy==="role"||n.role&&n.name)return`page.getByRole(${JSON.stringify(n.role??"generic")}, { name: ${JSON.stringify(n.name??n.value??"")}, exact: true })`;if(n.strategy==="label"||n.label)return`page.getByLabel(${JSON.stringify(n.label??n.value??"")}, { exact: true })`;if(n.strategy==="placeholder"||n.placeholder)return`page.getByPlaceholder(${JSON.stringify(n.placeholder??n.value??"")})`;if(n.strategy==="testid"||n.testId){const l=n.testId??n.value??"";return n.testIdAttribute&&n.testIdAttribute!=="data-testid"?`page.locator(${Du(c0(n.testIdAttribute,l))})`:`page.getByTestId(${JSON.stringify(l)})`}return n.strategy==="text"||n.text?`page.getByText(${JSON.stringify(n.text??n.value??"")})`:`page.locator(${Du($m(n.cssSelector??n.value??""))})`}function o0(n){return!!(n.cssSelector&&(n.strategy==="css"||n.matchCount!==void 0&&n.matchCount>1&&!n.contextSelector&&!n.contextText))}function c0(n,l){return`[${n}="${l.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"]`}function $m(n){return n.replace(/\\(["'])/g,"$1")}function Du(n){return`'${n.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function u0(n){const l=[`describe(${JSON.stringify(n.name)}, () => {`,` it(${JSON.stringify(n.name)}, () => {`];for(const s of n.steps)l.push(` ${d0(n,s)}`);return l.push(" })","})",""),l.join(`
|
|
18
|
+
`)}function d0(n,l){switch(l.type){case"navigate":return`cy.visit(${JSON.stringify(new URL(l.path,n.baseUrl).toString())})`;case"click":return`${Wr(l.target)}.click()`;case"fill":return`${Wr(l.target)}.clear().type(${JSON.stringify(l.valueRef?`{{${l.valueRef}}}`:l.value??"")})`;case"select":return`${Wr(l.target)}.select(${JSON.stringify(l.option)})`;case"check":return`${Wr(l.target)}.${l.checked?"check":"uncheck"}()`;case"wait":return l.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(l.value)||0))})`:l.mode==="url"?`cy.url().should('include', ${JSON.stringify(l.value)})`:l.mode==="text"?`cy.contains(${JSON.stringify(l.value)}).should('be.visible')`:`${Wr(l.target)}.should('be.visible')`;case"assert":return l.assertion.type==="visible"?`${Wr(l.assertion.target)}.should('be.visible')`:l.assertion.type==="text"?`cy.contains(${JSON.stringify(l.assertion.value)}).should('be.visible')`:`cy.url().should('include', ${JSON.stringify(l.assertion.value)})`}}function Wr(n){return n.strategy==="role"||n.role&&n.name?`cy.contains(${JSON.stringify(n.name??n.value??"")})`:n.strategy==="label"||n.label?`cy.get('label').contains(${JSON.stringify(n.label??n.value??"")})`:n.strategy==="placeholder"||n.placeholder?`cy.get(${JSON.stringify(`[placeholder="${n.placeholder??n.value??""}"]`)})`:n.strategy==="testid"||n.testId?`cy.get(${JSON.stringify(`[data-testid="${n.testId??n.value??""}"]`)})`:n.strategy==="text"||n.text?`cy.contains(${JSON.stringify(n.text??n.value??"")})`:`cy.get(${JSON.stringify(n.cssSelector??n.value??"")})`}class hr extends Error{code;hint;constructor(l,s,o){super(s),this.name="ApiError",this.code=l,this.hint=o}}async function Ia(n){try{const l=await n.json();if(l?.error?.message)return new hr(l.error.code,l.error.message,l.error.hint)}catch{}return new hr("unknown",`The server returned status ${n.status}.`)}async function f0(n){let l;try{l=await fetch("/api/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch{throw new hr("server-unreachable","Could not reach the LazyScout API.",'Check that "npm run dev:server" is running.')}if(!l.ok)throw await Ia(l);return await l.json()}async function h0(){const n=await fetch("/api/versions");if(!n.ok)throw await Ia(n);return await n.json()}async function p0(n){const l=await fetch("/api/versions/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({version:n})});if(!l.ok)throw await Ia(l);return await l.json()}async function m0(n,l=[]){const s=await fetch("/api/export/csv",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:n,testData:l})});if(!s.ok)throw await Ia(s);const o=await s.blob(),u=URL.createObjectURL(o),h=document.createElement("a");h.href=u,h.download=`lazyscout-testcases-${new Date().toISOString().slice(0,10)}.csv`,document.body.appendChild(h),h.click(),h.remove(),URL.revokeObjectURL(u)}async function g0(n,l="playwright",s,o,u,h,f,p){const g=await fetch("/api/automation/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCase:n,framework:l,code:s,secrets:o,runId:u,projectId:h,blockedKeywords:f}),signal:p});if(!g.ok)throw await Ia(g);return await g.json()}async function v0(){return ft("/api/workspace")}async function Hm(n){await ft(`/api/workspace/projects/${encodeURIComponent(n.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}async function y0(n){await ft(`/api/workspace/projects/${encodeURIComponent(n)}`,{method:"DELETE"})}async function b0(n,l){await ft(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l})})}async function x0(n){return ft(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session/status`)}async function S0(n){return ft(`/api/workspace/projects/${encodeURIComponent(n)}/guided-flows`)}async function j0(n,l){await ft(`/api/workspace/projects/${encodeURIComponent(n)}/guided-flows`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({flows:l})})}async function w0(n,l,s,o){return ft("/api/guided-flows/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({flow:n,projectId:l,secrets:s,runId:o})})}async function _0(n){return ft("/api/guided-flows/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:n})})}async function N0(n){await ft(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session`,{method:"DELETE"})}async function T0(n,l){return ft(`/api/recorder/${encodeURIComponent(n)}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:l})})}async function qm(n){return ft(`/api/recorder/${encodeURIComponent(n)}`)}async function E0(n){return ft(`/api/recorder/${encodeURIComponent(n)}/stop`,{method:"POST"})}async function C0(n,l){return ft(`/api/recorder/${encodeURIComponent(n)}/inspect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:l})})}function O0(n,l){return`/api/recorder/${encodeURIComponent(n)}/frame?v=${l}`}async function A0(n,l){return ft(`/api/recorder/${encodeURIComponent(n)}/interact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function Gm(n){return ft(`/api/recorder/${encodeURIComponent(n)}`,{method:"DELETE"})}async function R0(){await ft("/api/workspace/open",{method:"POST"})}async function k0(n){return ft(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots`)}async function Im(n,l){return ft(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function D0(n,l){await ft(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots/${encodeURIComponent(l)}`,{method:"DELETE"})}async function z0(n){return ft(`/api/workspace/projects/${encodeURIComponent(n)}/automation`)}async function zu(n,l){await ft(`/api/workspace/projects/${encodeURIComponent(n)}/automation`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function U0(n,l,s){await ft(`/api/workspace/projects/${encodeURIComponent(n)}/reports`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l,html:s})})}async function L0(n){return ft(`/api/workspace/projects/${encodeURIComponent(n)}/bugs`)}async function Vm(n,l){await ft(`/api/workspace/projects/${encodeURIComponent(n)}/bugs/${encodeURIComponent(l.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(l)})}async function M0(n,l){await ft(`/api/workspace/projects/${encodeURIComponent(n)}/bugs/${encodeURIComponent(l)}`,{method:"DELETE"})}async function ft(n,l){const s=await fetch(n,l);if(!s.ok)throw await Ia(s);return await s.json()}async function B0(n){await fetch("/api/automation/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:n}),keepalive:!0})}async function $0(n){const l=await fetch("/api/load-test/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!l.ok)throw await Ia(l);return await l.json()}async function H0(n,l,s=!1){const o=await fetch("/api/api-check/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiCheck:n,secrets:l,allowUnsafe:s})});if(!o.ok)throw await Ia(o);return await o.json()}function Ym(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=Array(l);s<l;s++)o[s]=n[s];return o}function q0(n){if(Array.isArray(n))return n}function G0(n,l,s){return(l=X0(l))in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function I0(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,u,h,f,p=[],g=!0,m=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(g=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);g=!0);}catch(j){m=!0,u=j}finally{try{if(!g&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(m)throw u}}return p}}function V0(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
19
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fm(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function Pm(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Fm(Object(s),!0).forEach(function(o){G0(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Fm(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function Y0(n,l){if(n==null)return{};var s,o,u=F0(n,l);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(n);for(o=0;o<h.length;o++)s=h[o],l.indexOf(s)===-1&&{}.propertyIsEnumerable.call(n,s)&&(u[s]=n[s])}return u}function F0(n,l){if(n==null)return{};var s={};for(var o in n)if({}.hasOwnProperty.call(n,o)){if(l.indexOf(o)!==-1)continue;s[o]=n[o]}return s}function P0(n,l){return q0(n)||I0(n,l)||K0(n,l)||V0()}function Z0(n,l){if(typeof n!="object"||!n)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function X0(n){var l=Z0(n,"string");return typeof l=="symbol"?l:l+""}function K0(n,l){if(n){if(typeof n=="string")return Ym(n,l);var s={}.toString.call(n).slice(8,-1);return s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set"?Array.from(n):s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?Ym(n,l):void 0}}function Q0(n,l,s){return l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function Zm(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function Xm(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Zm(Object(s),!0).forEach(function(o){Q0(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Zm(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function J0(){for(var n=arguments.length,l=new Array(n),s=0;s<n;s++)l[s]=arguments[s];return function(o){return l.reduceRight(function(u,h){return h(u)},o)}}function sl(n){return function l(){for(var s=this,o=arguments.length,u=new Array(o),h=0;h<o;h++)u[h]=arguments[h];return u.length>=n.length?n.apply(this,u):function(){for(var f=arguments.length,p=new Array(f),g=0;g<f;g++)p[g]=arguments[g];return l.apply(s,[].concat(u,p))}}}function ro(n){return{}.toString.call(n).includes("Object")}function W0(n){return!Object.keys(n).length}function dl(n){return typeof n=="function"}function eS(n,l){return Object.prototype.hasOwnProperty.call(n,l)}function tS(n,l){return ro(l)||Ga("changeType"),Object.keys(l).some(function(s){return!eS(n,s)})&&Ga("changeField"),l}function nS(n){dl(n)||Ga("selectorType")}function aS(n){dl(n)||ro(n)||Ga("handlerType"),ro(n)&&Object.values(n).some(function(l){return!dl(l)})&&Ga("handlersType")}function rS(n){n||Ga("initialIsRequired"),ro(n)||Ga("initialType"),W0(n)&&Ga("initialContent")}function iS(n,l){throw new Error(n[l]||n.default)}var lS={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Ga=sl(iS)(lS),Vs={changes:tS,selector:nS,handler:aS,initial:rS};function sS(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};Vs.initial(n),Vs.handler(l);var s={current:n},o=sl(uS)(s,l),u=sl(cS)(s),h=sl(Vs.changes)(n),f=sl(oS)(s);function p(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(j){return j};return Vs.selector(m),m(s.current)}function g(m){J0(o,u,h,f)(m)}return[p,g]}function oS(n,l){return dl(l)?l(n.current):l}function cS(n,l){return n.current=Xm(Xm({},n.current),l),l}function uS(n,l,s){return dl(l)?l(n.current):Object.keys(s).forEach(function(o){var u;return(u=l[o])===null||u===void 0?void 0:u.call(l,n.current[o])}),s}var dS={create:sS},fS={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function hS(n){return function l(){for(var s=this,o=arguments.length,u=new Array(o),h=0;h<o;h++)u[h]=arguments[h];return u.length>=n.length?n.apply(this,u):function(){for(var f=arguments.length,p=new Array(f),g=0;g<f;g++)p[g]=arguments[g];return l.apply(s,[].concat(u,p))}}}function pS(n){return{}.toString.call(n).includes("Object")}function mS(n){return n||Km("configIsRequired"),pS(n)||Km("configType"),n.urls?(gS(),{paths:{vs:n.urls.monacoBase}}):n}function gS(){console.warn(sv.deprecation)}function vS(n,l){throw new Error(n[l]||n.default)}var sv={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
|
|
20
|
+
You are using deprecated way of configuration.
|
|
21
|
+
|
|
22
|
+
Instead of using
|
|
23
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
24
|
+
use
|
|
25
|
+
monaco.config({ paths: { vs: '...' } })
|
|
26
|
+
|
|
27
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
28
|
+
`},Km=hS(vS)(sv),yS={config:mS},bS=function(){for(var l=arguments.length,s=new Array(l),o=0;o<l;o++)s[o]=arguments[o];return function(u){return s.reduceRight(function(h,f){return f(h)},u)}};function ov(n,l){return Object.keys(l).forEach(function(s){l[s]instanceof Object&&n[s]&&Object.assign(l[s],ov(n[s],l[s]))}),Pm(Pm({},n),l)}var xS={type:"cancelation",msg:"operation is manually canceled"};function Uu(n){var l=!1,s=new Promise(function(o,u){n.then(function(h){return l?u(xS):o(h)}),n.catch(u)});return s.cancel=function(){return l=!0},s}var SS=["monaco"],jS=dS.create({config:fS,isInitialized:!1,resolve:null,reject:null,monaco:null}),cv=P0(jS,2),Nl=cv[0],mo=cv[1];function wS(n){var l=yS.config(n),s=l.monaco,o=Y0(l,SS);mo(function(u){return{config:ov(u.config,o),monaco:s}})}function _S(){var n=Nl(function(l){var s=l.monaco,o=l.isInitialized,u=l.resolve;return{monaco:s,isInitialized:o,resolve:u}});if(!n.isInitialized){if(mo({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),Uu(Lu);if(window.monaco&&window.monaco.editor)return uv(window.monaco),n.resolve(window.monaco),Uu(Lu);bS(NS,ES)(CS)}return Uu(Lu)}function NS(n){return document.body.appendChild(n)}function TS(n){var l=document.createElement("script");return n&&(l.src=n),l}function ES(n){var l=Nl(function(o){var u=o.config,h=o.reject;return{config:u,reject:h}}),s=TS("".concat(l.config.paths.vs,"/loader.js"));return s.onload=function(){return n()},s.onerror=l.reject,s}function CS(){var n=Nl(function(s){var o=s.config,u=s.resolve,h=s.reject;return{config:o,resolve:u,reject:h}}),l=window.require;l.config(n.config),l(["vs/editor/editor.main"],function(s){var o=s.m||s;uv(o),n.resolve(o)},function(s){n.reject(s)})}function uv(n){Nl().monaco||mo({monaco:n})}function OS(){return Nl(function(n){var l=n.monaco;return l})}var Lu=new Promise(function(n,l){return mo({resolve:n,reject:l})}),dv={config:wS,init:_S,__getMonacoInstance:OS},AS={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Mu=AS,RS={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},kS=RS;function DS({children:n}){return ai.createElement("div",{style:kS.container},n)}var zS=DS,US=zS;function LS({width:n,height:l,isEditorReady:s,loading:o,_ref:u,className:h,wrapperProps:f}){return ai.createElement("section",{style:{...Mu.wrapper,width:n,height:l},...f},!s&&ai.createElement(US,null,o),ai.createElement("div",{ref:u,style:{...Mu.fullWidth,...!s&&Mu.hide},className:h}))}var MS=LS,fv=I.memo(MS);function BS(n){I.useEffect(n,[])}var hv=BS;function $S(n,l,s=!0){let o=I.useRef(!0);I.useEffect(o.current||!s?()=>{o.current=!1}:n,l)}var pn=$S;function cl(){}function ni(n,l,s,o){return HS(n,o)||qS(n,l,s,o)}function HS(n,l){return n.editor.getModel(pv(n,l))}function qS(n,l,s,o){return n.editor.createModel(l,s,o?pv(n,o):void 0)}function pv(n,l){return n.Uri.parse(l)}function GS({original:n,modified:l,language:s,originalLanguage:o,modifiedLanguage:u,originalModelPath:h,modifiedModelPath:f,keepCurrentOriginalModel:p=!1,keepCurrentModifiedModel:g=!1,theme:m="light",loading:j="Loading...",options:b={},height:S="100%",width:y="100%",className:O,wrapperProps:N={},beforeMount:w=cl,onMount:_=cl}){let[C,A]=I.useState(!1),[H,D]=I.useState(!0),K=I.useRef(null),G=I.useRef(null),ae=I.useRef(null),B=I.useRef(_),F=I.useRef(w),te=I.useRef(!1);hv(()=>{let Z=dv.init();return Z.then(Y=>(G.current=Y)&&D(!1)).catch(Y=>Y?.type!=="cancelation"&&console.error("Monaco initialization: error:",Y)),()=>K.current?E():Z.cancel()}),pn(()=>{if(K.current&&G.current){let Z=K.current.getOriginalEditor(),Y=ni(G.current,n||"",o||s||"text",h||"");Y!==Z.getModel()&&Z.setModel(Y)}},[h],C),pn(()=>{if(K.current&&G.current){let Z=K.current.getModifiedEditor(),Y=ni(G.current,l||"",u||s||"text",f||"");Y!==Z.getModel()&&Z.setModel(Y)}},[f],C),pn(()=>{let Z=K.current.getModifiedEditor();Z.getOption(G.current.editor.EditorOption.readOnly)?Z.setValue(l||""):l!==Z.getValue()&&(Z.executeEdits("",[{range:Z.getModel().getFullModelRange(),text:l||"",forceMoveMarkers:!0}]),Z.pushUndoStop())},[l],C),pn(()=>{K.current?.getModel()?.original.setValue(n||"")},[n],C),pn(()=>{let{original:Z,modified:Y}=K.current.getModel();G.current.editor.setModelLanguage(Z,o||s||"text"),G.current.editor.setModelLanguage(Y,u||s||"text")},[s,o,u],C),pn(()=>{G.current?.editor.setTheme(m)},[m],C),pn(()=>{K.current?.updateOptions(b)},[b],C);let M=I.useCallback(()=>{if(!G.current)return;F.current(G.current);let Z=ni(G.current,n||"",o||s||"text",h||""),Y=ni(G.current,l||"",u||s||"text",f||"");K.current?.setModel({original:Z,modified:Y})},[s,l,u,n,o,h,f]),q=I.useCallback(()=>{!te.current&&ae.current&&(K.current=G.current.editor.createDiffEditor(ae.current,{automaticLayout:!0,...b}),M(),G.current?.editor.setTheme(m),A(!0),te.current=!0)},[b,m,M]);I.useEffect(()=>{C&&B.current(K.current,G.current)},[C]),I.useEffect(()=>{!H&&!C&&q()},[H,C,q]);function E(){let Z=K.current?.getModel();p||Z?.original?.dispose(),g||Z?.modified?.dispose(),K.current?.dispose()}return ai.createElement(fv,{width:y,height:S,isEditorReady:C,loading:j,_ref:ae,className:O,wrapperProps:N})}var IS=GS;I.memo(IS);function VS(n){let l=I.useRef();return I.useEffect(()=>{l.current=n},[n]),l.current}var YS=VS,Ys=new Map;function FS({defaultValue:n,defaultLanguage:l,defaultPath:s,value:o,language:u,path:h,theme:f="light",line:p,loading:g="Loading...",options:m={},overrideServices:j={},saveViewState:b=!0,keepCurrentModel:S=!1,width:y="100%",height:O="100%",className:N,wrapperProps:w={},beforeMount:_=cl,onMount:C=cl,onChange:A,onValidate:H=cl}){let[D,K]=I.useState(!1),[G,ae]=I.useState(!0),B=I.useRef(null),F=I.useRef(null),te=I.useRef(null),M=I.useRef(C),q=I.useRef(_),E=I.useRef(),Z=I.useRef(o),Y=YS(h),P=I.useRef(!1),X=I.useRef(!1);hv(()=>{let v=dv.init();return v.then(R=>(B.current=R)&&ae(!1)).catch(R=>R?.type!=="cancelation"&&console.error("Monaco initialization: error:",R)),()=>F.current?V():v.cancel()}),pn(()=>{let v=ni(B.current,n||o||"",l||u||"",h||s||"");v!==F.current?.getModel()&&(b&&Ys.set(Y,F.current?.saveViewState()),F.current?.setModel(v),b&&F.current?.restoreViewState(Ys.get(h)))},[h],D),pn(()=>{F.current?.updateOptions(m)},[m],D),pn(()=>{!F.current||o===void 0||(F.current.getOption(B.current.editor.EditorOption.readOnly)?F.current.setValue(o):o!==F.current.getValue()&&(X.current=!0,F.current.executeEdits("",[{range:F.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),F.current.pushUndoStop(),X.current=!1))},[o],D),pn(()=>{let v=F.current?.getModel();v&&u&&B.current?.editor.setModelLanguage(v,u)},[u],D),pn(()=>{p!==void 0&&F.current?.revealLine(p)},[p],D),pn(()=>{B.current?.editor.setTheme(f)},[f],D);let k=I.useCallback(()=>{if(!(!te.current||!B.current)&&!P.current){q.current(B.current);let v=h||s,R=ni(B.current,o||n||"",l||u||"",v||"");F.current=B.current?.editor.create(te.current,{model:R,automaticLayout:!0,...m},j),b&&F.current.restoreViewState(Ys.get(v)),B.current.editor.setTheme(f),p!==void 0&&F.current.revealLine(p),K(!0),P.current=!0}},[n,l,s,o,u,h,m,j,b,f,p]);I.useEffect(()=>{D&&M.current(F.current,B.current)},[D]),I.useEffect(()=>{!G&&!D&&k()},[G,D,k]),Z.current=o,I.useEffect(()=>{D&&A&&(E.current?.dispose(),E.current=F.current?.onDidChangeModelContent(v=>{X.current||A(F.current.getValue(),v)}))},[D,A]),I.useEffect(()=>{if(D){let v=B.current.editor.onDidChangeMarkers(R=>{let $=F.current.getModel()?.uri;if($&&R.find(W=>W.path===$.path)){let W=B.current.editor.getModelMarkers({resource:$});H?.(W)}});return()=>{v?.dispose()}}return()=>{}},[D,H]);function V(){E.current?.dispose(),S?b&&Ys.set(h,F.current.saveViewState()):F.current.getModel()?.dispose(),F.current.dispose()}return ai.createElement(fv,{width:y,height:O,isEditorReady:D,loading:g,_ref:te,className:N,wrapperProps:w})}var PS=FS,ZS=I.memo(PS),XS=ZS;function Qm({value:n,framework:l,onChange:s,height:o="calc(100vh - 420px)"}){function u(h,f){const p="typescript",g=l==="playwright"?["page.goto()","page.getByRole()","page.getByLabel()","page.getByText()","page.locator()","page.waitForTimeout()",'await page.screenshot({ path: "evidence.png", fullPage: true })',"expect(page).toHaveURL()","expect(locator).toBeVisible()","expect(locator).toContainText()"]:["cy.visit()","cy.findByRole()","cy.get()","cy.contains()","cy.wait()","cy.url().should()","locator.should('be.visible')","locator.should('contain.text')"],m=f.languages.registerCompletionItemProvider(p,{triggerCharacters:[".","("],provideCompletionItems:(j,b)=>{const S=j.getWordUntilPosition(b),y=j.getLineContent(b.lineNumber).slice(0,b.column-1).toLowerCase(),O={startLineNumber:b.lineNumber,endLineNumber:b.lineNumber,startColumn:S.startColumn,endColumn:b.column},N=KS(y,l);return{suggestions:[...g.map(w=>({label:w,kind:f.languages.CompletionItemKind.Method,insertText:w,range:O,detail:l==="playwright"?"Playwright API":"Cypress API"})),...N.map(w=>({...w,kind:f.languages.CompletionItemKind.Snippet,range:O}))]}}});h.onDidDispose(()=>m.dispose())}return r.jsx(XS,{height:o,theme:"vs-dark",language:"typescript",value:n,onChange:h=>s(h??""),onMount:u,options:{automaticLayout:!0,minimap:{enabled:!0},fontSize:13,lineNumbers:"on",folding:!0,wordWrap:"off",tabSize:2,insertSpaces:!0,scrollBeyondLastLine:!1,smoothScrolling:!0,suggestOnTriggerCharacters:!0,quickSuggestions:!0,padding:{top:16,bottom:16}}})}function KS(n,l){const s=l==="playwright",o=[];return/กรอก|พิมพ์|fill|type|input/i.test(n)&&o.push({label:"Fill an input",insertText:s?"await page.getByLabel('${1:Email}').fill('${2:value}')":"cy.findByLabelText('${1:Email}').type('${2:value}')",detail:"Suggested from a fill or typing instruction"}),/คลิก|กด|click|press|ปุ่ม/i.test(n)&&o.push({label:"Click a button",insertText:s?"await page.getByRole('button', { name: '${1:Login}', exact: true }).click()":"cy.findByRole('button', { name: '${1:Login}' }).click()",detail:"Suggested from a click instruction"}),/เปิดหน้า|ไปที่|navigate|visit|goto/i.test(n)&&o.push({label:"Navigate to a URL",insertText:s?"await page.goto('${1:https://example.com}')":"cy.visit('${1:https://example.com}')",detail:"Suggested from a navigation instruction"}),/ตรวจสอบ|เช็ค|assert|expect|verify|เห็นข้อความ|ข้อความ/i.test(n)&&o.push({label:"Assert visible text",insertText:s?"await expect(page.getByText('${1:Success}')).toBeVisible()":"cy.contains('${1:Success}').should('be.visible')",detail:"Suggested from an assertion instruction"}),o}function QS({sourceUrl:n,onUse:l}){const s=n||"http://localhost:5500/login",o=`await page.goto("${s}")
|
|
29
|
+
await page.getByLabel("Email address").fill("{{TEST_EMAIL}}")
|
|
30
|
+
await page.getByLabel("Password").fill("{{TEST_PASSWORD}}")
|
|
31
|
+
await page.getByRole("button", { name: "Login", exact: true }).click()
|
|
32
|
+
await expect(page).toHaveURL(new RegExp("/dashboard"))`,u=`await page.goto("${s}")
|
|
33
|
+
await page.getByLabel("Password").fill("wrong-password")
|
|
34
|
+
await page.getByRole("button", { name: "Login", exact: true }).click()
|
|
35
|
+
await expect(page.getByRole("alert")).toContainText("Invalid password")`;return r.jsxs("section",{className:"qa-guidance",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Beginner guide"}),r.jsx("h3",{children:"What should I add next?"}),r.jsx("p",{children:"Use a template, then replace labels and expected results with what you observed."})]}),r.jsxs("div",{className:"qa-guidance-actions",children:[r.jsxs("button",{type:"button",onClick:()=>l(o),children:[r.jsx("b",{children:"Login success"}),r.jsx("span",{children:"Fill credentials and verify the next URL"})]}),r.jsxs("button",{type:"button",onClick:()=>l(u),children:[r.jsx("b",{children:"Login validation"}),r.jsx("span",{children:"Try an invalid password and assert the alert"})]}),r.jsx("span",{children:"For uploads, create a draft first and choose a safe test file before running."})]})]})}function JS({stopped:n=!1}){return r.jsx("svg",{className:"run-button-icon",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:n?r.jsx("rect",{x:"5.25",y:"5.25",width:"9.5",height:"9.5",rx:"2",fill:"currentColor"}):r.jsx("path",{d:"M6.2 3.95a1.15 1.15 0 0 1 1.75-.97l7.05 5.03a1.2 1.2 0 0 1 0 1.98l-7.05 5.03a1.15 1.15 0 0 1-1.75-.97V3.95Z",fill:"currentColor"})})}function Bu({children:n,stopped:l=!1,onClick:s,disabled:o=!1}){return r.jsxs("button",{type:"button",className:`btn ${l?"btn-danger":"btn-dark"} run-button`,onClick:s,disabled:o,children:[r.jsx(JS,{stopped:l}),r.jsx("span",{children:n})]})}function WS({testCases:n,projectId:l="active",secrets:s,blockedKeywords:o,onRunStatus:u,onRunResult:h}){const[f,p]=I.useState("playwright"),g=n.find(J=>/submit|login|sign in|เข้าสู่ระบบ|ล็อกอิน/i.test(`${J.title} ${J.module}`))??n[0],[m,j]=I.useState(g?.id??""),[b,S]=I.useState(()=>n.map(J=>J.id)),[y,O]=I.useState(!1),[N,w]=I.useState(!1),[_,C]=I.useState(""),[A,H]=I.useState(),[D,K]=I.useState([]),[G,ae]=I.useState(!1),[B,F]=I.useState(!1),[te,M]=I.useState("all"),q=I.useRef(void 0),E=I.useRef(!1),[Z,Y]=I.useState({}),P=n.find(J=>J.id===m)??n[0],X=I.useMemo(()=>[{value:"all",label:"All folders and tags"},...[...new Set(n.map(J=>J.folder??J.module))].sort().map(J=>({value:`folder:${J}`,label:`Folder: ${J}`})),...[...new Set(n.flatMap(J=>J.tags??[]))].sort().map(J=>({value:`tag:${J}`,label:`Tag: ${J}`}))],[n]),k=I.useMemo(()=>te==="all"?n:n.filter(J=>te.startsWith("folder:")?(J.folder??J.module)===te.slice(7):(J.tags??[]).includes(te.slice(4))),[te,n]),V=k.filter(J=>b.includes(J.id)).length;I.useEffect(()=>{n.some(J=>J.id===m)||j(g?.id??"")},[g?.id,m,n]),I.useEffect(()=>{Y({}),(async()=>{const J=await z0(l),re=`lazyscout.automation.${l}`;let L={};try{L=JSON.parse(localStorage.getItem(re)??"{}")}catch{}const U={...L,...J};Object.keys(L).length&&(await zu(l,U),localStorage.removeItem(re)),Y(U)})().catch(()=>Y({}))},[l]),I.useEffect(()=>{S(n.map(J=>J.id))},[n]),I.useEffect(()=>{const J=L=>{y&&(L.key==="F5"||(L.ctrlKey||L.metaKey)&&L.key.toLowerCase()==="r")&&(L.preventDefault(),F(!0))},re=L=>{if(!y)return;const U=q.current;U&&navigator.sendBeacon("/api/automation/stop",new Blob([JSON.stringify({runId:U.runId})],{type:"application/json"})),L.preventDefault(),L.returnValue=""};return window.addEventListener("keydown",J),window.addEventListener("beforeunload",re),()=>{window.removeEventListener("keydown",J),window.removeEventListener("beforeunload",re)}},[y]);const v=I.useMemo(()=>P?f==="playwright"?Mm(P):Bm(P):"",[f,P]),R=P?`${f}:${P.id}`:"",$=Z[R]??v;function W(){C($),w(!0)}function le(){const J={...Z,[R]:_};Y(J),zu(l,J),w(!1)}function ve(){const J={...Z};delete J[R],Y(J),zu(l,J),w(!1)}function Ne(J){const re=`${f}:${J.id}`;return Z[re]??(f==="playwright"?Mm(J):Bm(J))}async function _e(J,re){const L=crypto.randomUUID(),U=new AbortController;q.current={runId:L,controller:U};try{const ee=await g0(J,f,re,s,L,l,o,U.signal);return u?.(J.id,ee.status==="passed"?"passed":ee.status==="failed"?"failed":"pending"),h?.(J.id,ee),ee}catch(ee){const me=E.current||ee instanceof DOMException&&ee.name==="AbortError",he={status:me?"stopped":"failed",framework:f,logs:[{timestamp:new Date().toISOString(),level:me?"warn":"fail",message:me?"Run stopped by user.":ee instanceof Error?ee.message:String(ee)}]};return u?.(J.id,me?"pending":"failed"),h?.(J.id,he),he}finally{q.current?.runId===L&&(q.current=void 0)}}async function oe(){E.current=!0;const J=q.current;J&&(J.controller.abort(),B0(J.runId).catch(()=>{})),ae(!1),F(!1),K(re=>[...re,{timestamp:new Date().toISOString(),level:"warn",message:"Stop requested. Closing the active Playwright session…"}])}async function we(){if(!P||y)return;E.current=!1,O(!0),H("running"),K([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --case ${P.id}`},{timestamp:new Date().toISOString(),level:"info",message:`Starting Playwright runner: ${P.title}`},{timestamp:new Date().toISOString(),level:"info",message:"Preparing browser context and test steps…"},{timestamp:new Date().toISOString(),level:"info",message:"Running generated automation source…"}]);const J=await _e(P,$);H(J.status),K(re=>[...re,...J.logs]),O(!1)}async function Te(){if(y)return;const J=k.filter(L=>b.includes(L.id)).slice(0,50);if(E.current=!1,O(!0),H("running"),K([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --all --project ${l}`},{timestamp:new Date().toISOString(),level:"info",message:`Selected cases: ${J.length}/${k.length} in current filter · Run budget: 50 cases`}]),J.length===0){K(L=>[...L,{timestamp:new Date().toISOString(),level:"warn",message:"No test cases selected. Nothing to run."}]),H("pending"),O(!1);return}let re=!1;for(const L of J){if(E.current)break;const U=await _e(L,Ne(L));if(U.status==="failed"&&(re=!0),K(ee=>[...ee,...U.logs]),U.status==="stopped")break}H(E.current?"stopped":re?"failed":"passed"),O(!1)}function Ge(){navigator.clipboard?.writeText($)}function Me(){const J=new Blob([$],{type:"text/plain"}),re=URL.createObjectURL(J),L=document.createElement("a");L.href=re,L.download=`${P?.id??"lazyscout-test"}.${f==="playwright"?"spec.ts":"cy.ts"}`,L.click(),URL.revokeObjectURL(re)}function T(){oe(),window.location.reload()}return r.jsxs("section",{className:"automation-page",children:[r.jsxs("div",{className:"automation-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Automation workspace"}),r.jsx("h2",{children:"Generated Tests"}),r.jsx("p",{children:"Edit the generated file per Test Case, then run one case or selected cases."})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("select",{className:"automation-run-filter",value:te,disabled:y,onChange:J=>M(J.target.value),children:X.map(J=>r.jsx("option",{value:J.value,children:J.label},J.value))}),r.jsxs("span",{className:"automation-selected-count",children:[V,"/",k.length," selected"]}),y?r.jsx(Bu,{stopped:!0,onClick:()=>ae(!0),children:"Stop run"}):r.jsx(Bu,{onClick:Te,children:"Run selected cases"})]})]}),r.jsx(QS,{sourceUrl:P?.sourceUrl,onUse:J=>{C(J),w(!0)}}),r.jsxs("div",{className:"automation-layout",children:[r.jsxs("aside",{className:"automation-case-list",children:[r.jsxs("div",{className:"automation-filter-head",children:[r.jsxs("span",{className:"field-label",children:["Test files (",k.length,"/",n.length,")"]}),r.jsx("span",{children:te==="all"?"All":"Filtered"})]}),k.map(J=>r.jsxs("button",{type:"button",className:P?.id===J.id?"selected":"",onClick:()=>{j(J.id),w(!1)},children:[r.jsx("input",{type:"checkbox",checked:b.includes(J.id),onChange:re=>{re.stopPropagation(),S(L=>re.target.checked?[...L,J.id]:L.filter(U=>U!==J.id))},onClick:re=>re.stopPropagation(),"aria-label":`Run ${J.id}`}),r.jsx("span",{className:"case-file-icon",children:Z[`playwright:${J.id}`]||Z[`cypress:${J.id}`]?"●":"○"}),r.jsxs("span",{children:[r.jsx("b",{children:J.id}),r.jsx("small",{children:J.title}),J.tags?.length?r.jsx("em",{className:"automation-tag",children:J.tags.slice(0,2).join(" · ")}):null]})]},J.id))]}),r.jsxs("div",{className:"automation-editor",children:[r.jsxs("div",{className:"automation-toolbar",children:[r.jsxs("select",{className:"field",value:f,onChange:J=>p(J.target.value),disabled:y,children:[r.jsx("option",{value:"playwright",children:"Playwright"}),r.jsx("option",{value:"cypress",children:"Cypress"})]}),r.jsx("span",{className:"automation-source",children:P?.sourceUrl}),r.jsxs("div",{className:"ml-auto flex gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:W,disabled:N||y,children:"Edit code"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:ve,disabled:y,children:"Regenerate"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:Ge,children:"Copy"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:Me,children:"Save file"}),r.jsx(Bu,{onClick:we,disabled:y||!P,children:"Run"})]})]}),N?r.jsxs("div",{className:"code-edit-area",children:[r.jsx(Qm,{value:_,framework:f,onChange:C}),r.jsxs("div",{className:"code-edit-actions",children:[r.jsx("span",{className:"muted",children:"VS Code style editor · Ctrl+Space for suggestions."}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>w(!1),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:le,children:"Save code"})]})]}):r.jsx("pre",{className:"automation-code",children:$||"No Test Cases are available to generate."}),A&&r.jsxs("div",{className:"terminal-panel",children:[r.jsxs("div",{className:"terminal-head",children:[r.jsxs("span",{children:[r.jsx("i",{})," CLI output"]}),r.jsx("b",{className:A==="passed"?"terminal-pass":A==="failed"?"terminal-fail":"terminal-warn",children:A.toUpperCase()})]}),r.jsx("div",{className:"terminal-body",children:D.map((J,re)=>r.jsxs("div",{className:`terminal-line terminal-${J.level}`,children:[r.jsx("span",{children:new Date(J.timestamp).toLocaleTimeString()}),J.message,J.durationMs!==void 0&&r.jsxs("em",{children:[J.durationMs,"ms"]})]},`${J.timestamp}-${re}`))})]})]})]}),G&&r.jsx(Jm,{title:"Stop the running tests?",message:"The active Playwright session will be closed. Remaining selected Test Cases will not run.",confirmLabel:"Stop run",onCancel:()=>ae(!1),onConfirm:()=>{oe()}}),B&&r.jsx(Jm,{title:"Stop tests and refresh?",message:"Refreshing now will stop the active Playwright session and cancel the remaining selected Test Cases.",confirmLabel:"Stop and refresh",onCancel:()=>F(!1),onConfirm:T}),N&&r.jsx("div",{className:"modern-modal-backdrop code-editor-backdrop",children:r.jsxs("section",{className:"modern-modal code-editor-modal",role:"dialog","aria-modal":"true","aria-labelledby":"code-editor-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Automation source"}),r.jsxs("h2",{id:"code-editor-title",children:["Edit ",f==="playwright"?"Playwright":"Cypress"," code"]}),r.jsxs("p",{children:[P?.id," · ",P?.title]})]}),r.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close editor",onClick:()=>w(!1),children:"×"})]}),r.jsx("div",{className:"code-editor-modal-body",children:r.jsx(Qm,{value:_,framework:f,onChange:C,height:"100%"})}),r.jsxs("footer",{className:"modal-footer code-editor-modal-footer",children:[r.jsx("span",{className:"muted",children:"VS Code style editor · Ctrl+Space for suggestions."}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>w(!1),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:le,children:"Save code"})]})]})})]})}function Jm({title:n,message:l,confirmLabel:s,onCancel:o,onConfirm:u}){return r.jsx("div",{className:"modern-modal-backdrop",children:r.jsxs("section",{className:"modern-modal run-confirm-modal",role:"dialog","aria-modal":"true",children:[r.jsx("div",{className:"modal-header",children:r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Running tests"}),r.jsx("h2",{children:n}),r.jsx("p",{children:l})]})}),r.jsxs("div",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Keep running"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:u,children:s})]})]})})}function e1({result:n}){const[l,s]=I.useState("events"),[o,u]=I.useState(!1),[h,f]=I.useState(n.runEvents);async function p(){if(!o){s("terminal"),u(!0),f([]);for(const m of n.runEvents)await new Promise(j=>window.setTimeout(j,120)),f(j=>[...j,m]);u(!1)}}const g=o||h.length<n.runEvents.length?h:n.runEvents;return r.jsxs("section",{className:"scout-log-card",children:[r.jsxs("div",{className:"workspace-panel-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Playwright Scout Log"}),r.jsx("h2",{children:"Scout Log"})]}),r.jsxs("span",{className:"run-live",children:[r.jsx("i",{})," DONE"]})]}),r.jsxs("div",{className:"scout-log-tabs",children:[r.jsx("button",{type:"button",className:l==="events"?"active":"",onClick:()=>s("events"),children:"◉ Event Stream"}),r.jsx("button",{type:"button",className:l==="terminal"?"active":"",onClick:()=>s("terminal"),children:"›_ CLI Terminal"})]}),r.jsxs("div",{className:"run-summary",children:[r.jsxs("div",{children:[r.jsxs("strong",{children:[n.stats.durationMs,"ms"]}),r.jsx("span",{children:"duration"})]}),r.jsxs("div",{children:[r.jsx("strong",{children:n.stats.pagesVisited}),r.jsx("span",{children:"pages"})]}),r.jsxs("div",{children:[r.jsx("strong",{className:n.stats.urlsSkipped?"text-amber-600":"",children:n.stats.urlsSkipped}),r.jsx("span",{children:"skipped"})]})]}),l==="terminal"?r.jsxs("div",{className:"scout-cli-terminal",children:[r.jsxs("div",{className:"scout-cli-head",children:[r.jsxs("span",{children:[r.jsx("i",{})," Playwright CLI output"]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("b",{children:o?"RUNNING":"COMPLETED"}),r.jsx("button",{type:"button",className:"cli-run-button",onClick:p,disabled:o,children:o?"Running…":"▶ Run again"})]})]}),r.jsxs("div",{className:"scout-cli-body",children:[r.jsxs("div",{children:[r.jsx("em",{children:"$"})," npx playwright scout ",n.startUrl]}),g.map((m,j)=>r.jsxs("div",{className:m.result==="failed"?"cli-fail":m.result==="warning"||m.result==="blocked"?"cli-warn":"cli-pass",children:[r.jsx("em",{children:"›"})," ",m.message]},`cli-${m.timestamp}-${j}`)),o&&r.jsx("div",{className:"cli-cursor",children:"▌"})]})]}):r.jsx("div",{className:"run-events",children:n.runEvents.map((m,j)=>r.jsxs("div",{className:"run-event",children:[r.jsx("div",{className:`event-marker event-${m.result}`}),r.jsxs("div",{className:"run-event-body",children:[r.jsxs("div",{className:"run-event-top",children:[r.jsx("span",{children:new Date(m.timestamp).toLocaleTimeString()}),r.jsx("b",{children:m.eventType})]}),r.jsx("p",{children:m.message}),m.currentUrl&&r.jsx("small",{children:new URL(m.currentUrl).pathname})]})]},`${m.timestamp}-${j}`))}),r.jsxs("div",{className:"inspector-foot",children:[r.jsx("span",{className:"status-dot status-pass"})," Scout completed · Playwright events captured"]})]})}function t1({checks:n,secrets:l}){const[s,o]=I.useState(),[u,h]=I.useState({}),[f,p]=I.useState();async function g(m,j=!1){o(m.id);try{const b=await H0(m,l,j);h(S=>({...S,[m.id]:`${b.status.toUpperCase()} · ${b.message}`}))}catch(b){h(S=>({...S,[m.id]:b instanceof Error?b.message:String(b)}))}finally{o(void 0)}}return r.jsxs("div",{className:"api-checks",children:[r.jsxs("div",{className:"api-checks-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Network validation"}),r.jsx("h3",{children:"Test API"}),r.jsx("p",{children:"Requests observed from XHR/fetch during Explorer. Run uses server-side fetch and project token when configured."})]}),r.jsxs("span",{className:"status-badge status-badge-pass",children:[n.length," observed"]})]}),n.length===0?r.jsxs("div",{className:"empty-state",children:["Run Analyze with ",r.jsx("b",{children:"Include API checks from XHR/fetch"})," enabled to collect the API requests used by the page."]}):r.jsx("div",{className:"api-table",children:n.map(m=>r.jsxs("div",{className:"api-row",children:[r.jsx("span",{className:"api-method",children:m.method}),r.jsxs("div",{children:[r.jsx("b",{children:m.id}),r.jsx("p",{children:m.url}),r.jsx("small",{children:m.note??`Observed HTTP ${m.observedStatus??"—"} · ${m.durationMs??0}ms`})]}),r.jsx("span",{className:`status-badge ${m.status==="observed"?"status-badge-pass":"status-badge-warn"}`,children:m.status}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>["GET","HEAD","OPTIONS"].includes(m.method.toUpperCase())?void g(m):p(m),disabled:s===m.id,children:s===m.id?"Checking…":"Run API"}),u[m.id]&&r.jsx("div",{className:"api-result",children:u[m.id]})]},m.id))}),f&&r.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal",role:"dialog","aria-modal":"true","aria-labelledby":"unsafe-api-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Protected API action"}),r.jsxs("h2",{id:"unsafe-api-title",children:["Run ",f.method.toUpperCase()," once?"]})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>p(void 0),"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"modal-body",children:[r.jsx("p",{children:"This request can create, update, or delete data. LazyScout will send it only once for this run."}),r.jsx("code",{className:"block break-all",children:f.url})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>p(void 0),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{p(void 0),g(f,!0)},children:"Run once"})]})]})})]})}function Wm({view:n,onChange:l,counts:s}){const{t:o}=Cn(),u=[["overview",o("overview"),"⌂"],["testcases",`${o("testCases")} ${s.cases}`,"✓"],["automation",o("automation"),"↗"],["scoutlog",o("scoutLog"),"◉"],["explorer",o("explorer"),"⌘"],["loadtest","Load Test","⚡"]];return r.jsx("nav",{className:"workspace-nav",children:u.map(([h,f,p])=>r.jsxs("button",{type:"button",className:n===h?"is-active":"",onClick:()=>l(h),children:[r.jsx("span",{children:p}),f,h==="explorer"&&r.jsx("small",{children:s.states})]},h))})}function n1({projects:n,activeProjectId:l,result:s,collapsed:o,onToggleCollapsed:u,onSelect:h,onNew:f,onDelete:p,onRename:g,onSettings:m,workspaceRoot:j,onOpenWorkspace:b}){const{language:S,toggleLanguage:y,t:O}=Cn(),[N,w]=I.useState(),[_,C]=I.useState(),[A,H]=I.useState("");return r.jsxs("aside",{className:`workspace-sidebar ${o?"is-collapsed":""}`,children:[r.jsxs("div",{className:"sidebar-brand",children:[r.jsx("span",{className:"brand-mark",children:"LS"}),r.jsx("b",{children:"LazyScout"}),r.jsx("button",{type:"button",className:"sidebar-collapse",onClick:u,title:o?"Expand sidebar":"Collapse sidebar",children:o?"›":"‹"})]}),r.jsxs("button",{type:"button",className:"new-project-btn",onClick:f,title:O("newProject"),children:[r.jsx("span",{children:"+"}),r.jsx("em",{children:O("newProject")})]}),r.jsxs("div",{className:"sidebar-label",children:[r.jsx("span",{children:O("projects")}),r.jsx("b",{children:n.length})]}),r.jsx("div",{className:"project-list",children:n.map(D=>r.jsx("div",{className:`project-item ${D.id===l?"active":""}`,children:_===D.id?r.jsxs("form",{className:"project-rename",onSubmit:K=>{K.preventDefault(),g(D.id,A),C(void 0)},children:[r.jsx("input",{autoFocus:!0,value:A,onChange:K=>H(K.target.value),onKeyDown:K=>{K.key==="Escape"&&C(void 0)}}),r.jsx("button",{type:"submit",children:"Save"}),r.jsx("button",{type:"button",onClick:()=>C(void 0),children:"×"})]}):r.jsxs(r.Fragment,{children:[r.jsxs("button",{type:"button",onClick:()=>h(D.id),title:D.targetUrl?`${D.name}
|
|
36
|
+
${D.targetUrl}`:D.name,children:[r.jsx("span",{className:"project-icon",children:"◈"}),r.jsxs("span",{className:"project-copy",children:[r.jsx("b",{children:D.name}),r.jsx("small",{children:D.targetUrl||"Manual suite"})]})]}),r.jsxs("div",{className:"project-actions",children:[r.jsx("button",{type:"button",className:"project-more",title:"Project actions",onClick:()=>w(K=>K===D.id?void 0:D.id),children:"⋯"}),N===D.id&&r.jsxs("div",{className:"project-action-menu",children:[r.jsx("button",{type:"button",onClick:()=>{C(D.id),H(D.name),w(void 0)},children:"Rename"}),r.jsx("button",{type:"button",className:"danger",onClick:()=>{p(D.id),w(void 0)},children:"Delete"})]})]})]})},D.id))}),s&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"sidebar-label",children:[r.jsx("span",{children:O("files")}),r.jsx("b",{children:s.pages.length})]}),r.jsx("div",{className:"file-list",children:s.pages.map(D=>r.jsxs("div",{className:"file-item",title:D.finalUrl,children:[r.jsx("span",{children:"◫"}),r.jsx("span",{className:"file-name",children:new URL(D.finalUrl).pathname==="/"?"index":new URL(D.finalUrl).pathname.slice(1)}),r.jsx("small",{children:D.state?.fingerprint.slice(-4)})]},D.finalUrl))})]}),l&&r.jsxs("button",{type:"button",className:"sidebar-settings",onClick:m,title:O("settings"),children:[r.jsx("span",{children:"⚙"}),r.jsx("em",{children:O("settings")})]}),r.jsx("div",{className:"sidebar-bottom",children:r.jsxs("div",{className:"workspace-language-row",children:[r.jsxs("button",{type:"button",className:"workspace-copy",onClick:b,title:j,children:[r.jsx("span",{className:"status-dot status-pass"})," ",r.jsx("b",{children:O("localWorkspace")}),r.jsx("small",{children:j||O("storedHere")})]}),r.jsx("button",{type:"button",className:"language-circle",onClick:y,title:S==="en"?"Switch to Thai":"Switch to English (US)","aria-label":"Switch language",children:S==="en"?"EN":"TH"})]})})]})}function a1(n){return mv(n,!0)}function r1(n){return mv(n,!1)}function mv(n,l){const s=`<!doctype html><html><head><meta charset="utf-8"><title>LazyScout Quality Report</title><style>${s1}</style></head><body>${i1(n)}</body></html>`,o=window.open("","_blank","width=1100,height=820");return o&&(o.document.open(),o.document.write(s),o.document.close(),l&&window.setTimeout(()=>{o.focus(),o.print()},350)),s}function i1(n){const l=[["Test Cases",n.testCases,`${n.pages} pages explored`],["Pass",n.passed,"Execution result"],["Failed",n.failed,"Execution result"],["Requirements",n.requirementCount,`${n.linkedCases}/${n.testCases} cases linked`]],s=n.failedCases.length?`<section class="failures"><div class="head"><div><p>FOLLOW-UP</p><h2>Failed Test Cases & logs</h2></div><em>${n.failedCases.length} failed</em></div>${n.failedCases.map(o=>`<article><div><b>${Ln(o.id)} · ${Ln(o.title)}</b><small>${Ln(o.folder||"UNASSIGNED")}</small></div><pre>${o.logs.length?Ln(o.logs.join(`
|
|
37
|
+
`)):"No run log was captured for this case."}</pre></article>`).join("")}</section>`:"";return`<main><header><div><div class="brand">LS <span>LazyScout</span></div><p>QUALITY REPORT</p><h1>Quality overview</h1><small>${Ln(n.origin)} · Generated ${Ln(n.generatedAt)}</small></div><div class="report-state">${n.pending} pending execution</div></header><section class="metrics">${l.map(([o,u,h])=>`<article><span>${o}</span><b>${u}</b><small>${h}</small></article>`).join("")}</section><section class="grid"><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Execution status</h2></div><em>Donut chart</em></div>${eg(n.status,"Test Cases")}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Priority</h2></div><em>Column chart</em></div>${l1(n.priority)}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Test type</h2></div><em>Bar chart</em></div>${tg(n.testType)}</article><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Automation readiness</h2></div><em>Donut chart</em></div>${eg(n.readiness,"Cases")}</article><article class="card wide"><div class="head"><div><p>HIERARCHY</p><h2>Folder coverage</h2></div><em>Top 10</em></div>${tg(n.modules)}</article></section>${s}<footer>LazyScout · Local QA workspace</footer></main>`}function eg(n,l){const s=n.reduce((h,f)=>h+f.value,0);let o=0;return`<div class="donut-wrap"><div class="donut" style="background:conic-gradient(${n.map(h=>{const f=s?o/s*100:0;o+=h.value;const p=s?o/s*100:0;return`${h.color} ${f}% ${p}%`}).join(", ")||"#e2e8f0 0 100%"})"><div><b>${s}</b><span>${l}</span></div></div><div class="legend">${n.map(h=>`<div><i style="background:${h.color}"></i><span title="${Ln(h.label)}">${Ln(zd(h.label))}</span><b>${h.value}</b></div>`).join("")}</div></div>`}function l1(n){const l=Math.max(...n.map(o=>o.value),1),s=n.reduce((o,u)=>o+u.value,0)||1;return`<div class="columns"><div class="axis"><span>100%</span><span>75%</span><span>50%</span><span>25%</span><span>0%</span></div><div class="column-area" style="grid-template-columns:repeat(${Math.max(n.length,1)},minmax(0,1fr))">${n.map(o=>`<div class="column"><div class="column-track"><i style="height:${o.value/l*100}%;background:${o.color}"></i></div><b>${o.value} <small>${Math.round(o.value/s*100)}%</small></b><span>${Ln(zd(o.label))}</span></div>`).join("")}</div></div>`}function tg(n){const l=Math.max(...n.map(s=>s.value),1);return`<div class="bars">${n.map(s=>`<div><span title="${Ln(s.label)}">${Ln(zd(s.label))}</span><section><i style="width:${s.value/l*100}%;background:${s.color}"></i></section><b>${s.value}</b></div>`).join("")}</div>`}function zd(n){return n.length>10?`${n.slice(0,10)}...`:n}function Ln(n){return String(n).replace(/[&<>'"]/g,l=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[l]??l)}const s1="@page{size:A4 landscape;margin:12mm}*{box-sizing:border-box}body{margin:0;color:#182238;font:12px Inter,Arial,sans-serif;-webkit-print-color-adjust:exact;print-color-adjust:exact}main{max-width:1120px;margin:auto}header{display:flex;justify-content:space-between;align-items:start;padding-bottom:18px;border-bottom:1px solid #e2e8f0}.brand{font-size:18px;font-weight:800;color:#fff;background:#2563eb;border-radius:7px;display:inline-flex;gap:9px;align-items:center;padding:6px 9px}.brand span{color:#182238}header p{margin:15px 0 3px;font-size:9px;letter-spacing:1.4px;color:#64748b;font-weight:700}h1{margin:0;font-size:26px}header small{display:block;margin-top:6px;color:#64748b}.report-state{border-radius:999px;padding:7px 10px;background:#fffbeb;color:#b45309;font-weight:700}.metrics{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0}.metrics article,.card,.failures{border:1px solid #e2e8f0;border-radius:10px;background:#fff}.metrics article{padding:13px}.metrics span,.metrics small{display:block;color:#64748b}.metrics b{display:block;margin:8px 0 2px;font-size:27px}.metrics small{font-size:10px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.card{padding:15px;min-height:230px}.card.wide{grid-column:1/3;min-height:180px}.head{display:flex;justify-content:space-between;align-items:start;border-bottom:1px solid #f1f5f9;padding-bottom:10px}.head p{margin:0;color:#64748b;font-size:9px;font-weight:700;letter-spacing:1px}.head h2{margin:4px 0 0;font-size:14px}.head em{font-style:normal;background:#f1f5f9;border-radius:999px;padding:4px 7px;color:#64748b;font-size:9px}.donut-wrap{height:165px;display:flex;align-items:center;justify-content:center;gap:30px}.donut{width:124px;height:124px;border-radius:50%;display:flex;align-items:center;justify-content:center}.donut>div{width:68px;height:68px;border-radius:50%;background:#fff;display:flex;flex-direction:column;align-items:center;justify-content:center}.donut b{font-size:21px}.donut span{font-size:9px;color:#64748b}.legend{min-width:140px}.legend div{display:grid;grid-template-columns:9px 1fr auto;gap:7px;align-items:center;margin:8px 0}.legend i{width:8px;height:8px;border-radius:50%}.legend span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}.columns{display:grid;grid-template-columns:34px 1fr;gap:5px;height:165px;margin-top:10px}.axis{display:flex;flex-direction:column;justify-content:space-between;padding-bottom:25px;text-align:right;font-size:8px;color:#94a3b8}.column-area{display:grid;gap:6px;align-items:end;border-bottom:1px solid #cbd5e1;background:repeating-linear-gradient(to bottom,transparent 0 calc(25% - 1px),#e2e8f0 calc(25% - 1px) 25%)}.column{min-width:0;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:end;gap:3px}.column-track{height:112px;width:100%;max-width:34px;background:#f1f5f9;display:flex;align-items:end;border-radius:4px 4px 0 0}.column-track i{width:100%;display:block;border-radius:4px 4px 0 0}.column b{font-size:10px;white-space:nowrap}.column small{font-size:8px;color:#94a3b8}.column>span{width:100%;font-size:8px;color:#64748b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}.bars{margin-top:18px}.bars>div{display:grid;grid-template-columns:85px 1fr 28px;gap:9px;align-items:center;margin:9px 0}.bars span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#475569}.bars section{height:9px;border-radius:99px;background:#f1f5f9;overflow:hidden}.bars i{display:block;height:100%;border-radius:99px}.bars b{text-align:right}.failures{margin-top:12px;padding:15px}.failures article{padding:10px 0;border-bottom:1px solid #f1f5f9}.failures article:last-child{border:0}.failures b,.failures small{display:block}.failures small{margin-top:3px;color:#64748b;font-size:10px}.failures pre{margin:8px 0 0;max-height:110px;overflow:auto;white-space:pre-wrap;border-radius:6px;background:#0b1120;padding:9px;color:#dbeafe;font:9px ui-monospace,monospace}footer{margin-top:18px;border-top:1px solid #e2e8f0;padding-top:10px;color:#94a3b8;font-size:10px}";function o1({result:n,testCases:l,executionStatuses:s={},runResults:o={},projectId:u}){const[h,f]=I.useState(!1),[p,g]=I.useState({status:!0,priority:!0,type:!0,automation:!0,modules:!0,trend:!0}),[m,j]=I.useState({status:"donut",priority:"column",type:"bar",automation:"donut",modules:"treemap",trend:"line"}),b=q=>s[q.id]??q.status??"pending",S={passed:l.filter(q=>b(q)==="passed").length,failed:l.filter(q=>b(q)==="failed").length,pending:l.filter(q=>b(q)==="pending").length},y=Fs(l,q=>q.priority),O=Fs(l,q=>q.type),N=Fs(l,q=>q.automationStatus),w=Fs(l,q=>(q.folder??q.module)||"UNASSIGNED"),_=I.useMemo(()=>m1(n),[n]),C=[{label:"Pass",value:S.passed,color:"#10b981"},{label:"Failed",value:S.failed,color:"#ef4444"},{label:"Pending",value:S.pending,color:"#f59e0b"}],A=[{label:"High",value:y.high??0,color:"#ef4444"},{label:"Medium",value:y.medium??0,color:"#f59e0b"},{label:"Low",value:y.low??0,color:"#3b82f6"}],H=[{label:"Positive",value:O.positive??0,color:"#10b981"},{label:"Negative",value:O.negative??0,color:"#ef4444"},{label:"Validation",value:O.validation??0,color:"#6366f1"}],D=[{label:"Ready",value:N.ready??0,color:"#3b82f6"},{label:"Needs review",value:N["needs-review"]??0,color:"#f59e0b"},{label:"Needs data",value:N["needs-data"]??0,color:"#8b5cf6"},{label:"Manual",value:N.manual??0,color:"#64748b"}],K=Object.entries(w).map(([q,E],Z)=>({label:q,value:E,color:ng[Z%ng.length]})),G=l.filter(q=>(q.requirements?.length??0)>0).length,ae=new Set(l.flatMap(q=>q.requirements??[])).size,B={origin:n.origin,generatedAt:new Date().toLocaleString(),pages:n.pages.length,testCases:l.length,passed:S.passed,failed:S.failed,pending:S.pending,needsReview:N["needs-review"]??0,linkedCases:G,requirementCount:ae,status:C,priority:A,testType:H,readiness:D,modules:vv(K),failedCases:l.filter(q=>b(q)==="failed").map(q=>({id:q.id,title:q.title,folder:q.folder??q.module,logs:(o[q.id]?.logs??[]).slice(-8).map(E=>`${new Date(E.timestamp).toLocaleTimeString()} ${E.message}`)}))},F=q=>g(E=>({...E,[q]:!E[q]})),te=(q,E)=>j(Z=>({...Z,[q]:E})),M=q=>{const E=q?a1(B):r1(B);u&&U0(u,q?"quality-report-print.html":"quality-report.html",E)};return r.jsxs("div",{className:"dashboard-view",children:[r.jsxs("div",{className:"dashboard-title",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Project dashboard"}),r.jsx("h2",{children:"Quality overview"}),r.jsxs("p",{children:["Coverage and readiness for ",r.jsx("b",{children:n.origin})]})]}),r.jsxs("div",{className:"dashboard-actions",children:[r.jsxs("span",{className:"status-badge status-badge-warn",children:[S.pending," pending execution"]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>f(q=>!q),children:"Customize"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>M(!1),children:"HTML report"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>M(!0),children:"Export PDF"})]})]}),h&&r.jsxs("div",{className:"dashboard-customize",children:[r.jsx("b",{children:"Dashboard layout"}),r.jsx("span",{children:"Show or hide charts"}),["status","priority","type","automation","modules","trend"].map(q=>r.jsxs("label",{children:[r.jsx("input",{type:"checkbox",checked:p[q],onChange:()=>F(q)})," ",c1(q)]},q))]}),r.jsxs("div",{className:"dashboard-metrics",children:[r.jsx(nl,{label:"Test Cases",value:l.length,hint:`${n.pages.length} pages explored`,tone:"blue"}),r.jsx(nl,{label:"Pass",value:S.passed,hint:"Execution result",tone:"green"}),r.jsx(nl,{label:"Failed",value:S.failed,hint:"Execution result",tone:"red"}),r.jsx(nl,{label:"Need Review",value:N["needs-review"]??0,hint:"Tester decision needed",tone:"amber"}),r.jsx(nl,{label:"Requirements",value:ae,hint:`${G}/${l.length} cases linked`,tone:"blue"})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.status&&r.jsx(ei,{eyebrow:"Composition",title:"Execution status",panel:"status",kind:m.status,onChange:te,children:al(m.status,C,"Test Cases")}),p.priority&&r.jsx(ei,{eyebrow:"Comparison",title:"Priority",panel:"priority",kind:m.priority,onChange:te,children:al(m.priority,A,"Cases")})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.type&&r.jsx(ei,{eyebrow:"Comparison",title:"Test type",panel:"type",kind:m.type,onChange:te,children:al(m.type,H,"Cases")}),p.automation&&r.jsx(ei,{eyebrow:"Composition",title:"Automation readiness",panel:"automation",kind:m.automation,onChange:te,children:al(m.automation,D,"Cases")})]}),r.jsxs("div",{className:"dashboard-columns",children:[p.modules&&r.jsx(ei,{eyebrow:"Hierarchy",title:"Folder coverage",panel:"modules",kind:m.modules,onChange:te,children:al(m.modules,K,"Cases")}),p.trend&&r.jsx(ei,{eyebrow:"Trend",title:"Scout discovery",panel:"trend",kind:m.trend,onChange:te,children:m.trend==="line"?r.jsx(p1,{points:_.slice(-yd)}):r.jsx(gv,{items:_.slice(-yd).map((q,E)=>({label:`Step ${E+1}`,value:q,color:"#4f46e5"}))})})]})]})}function ei({eyebrow:n,title:l,panel:s,kind:o,onChange:u,children:h}){return r.jsxs("section",{className:"dashboard-card",children:[r.jsxs("div",{className:"dashboard-card-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:n}),r.jsx("h3",{children:l})]}),r.jsxs("label",{className:"chart-selector",children:[r.jsx("span",{children:"Chart"}),r.jsx("select",{value:o,onChange:f=>u(s,f.target.value),children:g1[s].map(f=>r.jsx("option",{value:f,children:u1(f)},f))})]})]}),h]})}function nl({label:n,value:l,hint:s,tone:o}){return r.jsxs("div",{className:`dashboard-metric tone-${o}`,children:[r.jsx("span",{children:n}),r.jsx("strong",{children:l}),r.jsx("small",{children:s})]})}function Fs(n,l){return n.reduce((s,o)=>{const u=l(o);return s[u]=(s[u]??0)+1,s},{})}function c1(n){return{status:"Execution status",priority:"Priority comparison",type:"Test type comparison",automation:"Automation readiness",modules:"Folder treemap",trend:"Scout trend"}[n]}function u1(n){return{bar:"Bar chart",column:"Column chart",donut:"Donut chart",treemap:"Treemap",line:"Line chart"}[n]}function al(n,l,s){const o=vv(l);return n==="donut"?r.jsx(d1,{slices:o,totalLabel:s,compact:o.length>3}):n==="column"?r.jsx(gv,{items:o}):n==="treemap"?r.jsx(h1,{items:o}):r.jsx(f1,{items:o})}function d1({slices:n,totalLabel:l,compact:s=!1}){const o=n.reduce((f,p)=>f+p.value,0);let u=0;const h=n.map(f=>{const p=o?u/o*100:0;u+=f.value;const g=o?u/o*100:0;return`${f.color} ${p}% ${g}%`}).join(", ");return r.jsxs("div",{className:`donut-chart ${s?"is-compact":""}`,children:[r.jsx("div",{className:"donut-ring",style:{background:o?`conic-gradient(${h})`:"#e2e8f0"},children:r.jsxs("div",{children:[r.jsx("b",{children:o}),r.jsx("span",{children:l})]})}),r.jsx("div",{className:"donut-legend",children:n.map(f=>r.jsxs("div",{children:[r.jsx("i",{style:{background:f.color}}),r.jsx("span",{title:f.label,children:go(f.label)}),r.jsx("b",{children:f.value})]},f.label))})]})}function gv({items:n}){const l=Math.max(...n.map(o=>o.value),1),s=n.reduce((o,u)=>o+u.value,0)||1;return r.jsxs("div",{className:"column-chart-wrap",children:[r.jsxs("div",{className:"column-axis","aria-hidden":"true",children:[r.jsx("span",{children:"100%"}),r.jsx("span",{children:"75%"}),r.jsx("span",{children:"50%"}),r.jsx("span",{children:"25%"}),r.jsx("span",{children:"0%"})]}),r.jsxs("div",{className:"column-chart",style:{gridTemplateColumns:`repeat(${Math.max(n.length,1)}, minmax(0, 1fr))`},children:[r.jsx("div",{className:"column-grid","aria-hidden":"true"}),n.map(o=>r.jsxs("div",{className:"column-item",title:o.label,children:[r.jsx("div",{className:"column-track",children:r.jsx("i",{style:{height:`${o.value/l*100}%`,background:o.color}})}),r.jsxs("div",{className:"column-value",children:[r.jsx("b",{children:o.value}),r.jsxs("small",{children:[Math.round(o.value/s*100),"%"]})]}),r.jsx("span",{children:go(o.label)})]},o.label))]})]})}function f1({items:n}){const l=Math.max(...n.map(s=>s.value),1);return r.jsx("div",{className:"bar-chart",children:n.map(s=>r.jsxs("div",{className:"bar-row",children:[r.jsx("span",{title:s.label,children:go(s.label)}),r.jsx("div",{children:r.jsx("i",{style:{width:`${s.value/l*100}%`,background:s.color}})}),r.jsx("b",{children:s.value})]},s.label))})}function h1({items:n}){return r.jsx("div",{className:"treemap",children:n.length?n.map(l=>r.jsxs("div",{style:{flexGrow:l.value,background:l.color},title:`${l.label}: ${l.value}`,children:[r.jsx("b",{children:go(l.label)}),r.jsxs("span",{children:[l.value," cases"]})]},l.label)):r.jsx("p",{children:"No folders found."})})}function p1({points:n}){const l=Math.max(...n,1),s=Math.max(n.length-1,1),o=n.map((u,h)=>`${h/s*100},${100-u/l*82-9}`).join(" ");return r.jsxs("div",{className:"line-chart",children:[r.jsxs("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",role:"img","aria-label":"Cumulative Scout discovery trend",children:[r.jsx("line",{x1:"0",y1:"91",x2:"100",y2:"91"}),r.jsx("polyline",{points:o})]}),r.jsxs("div",{className:"line-chart-meta",children:[r.jsx("span",{children:"Start"}),r.jsxs("b",{children:[n[n.length-1]??0," discoveries"]}),r.jsx("span",{children:"Complete"})]})]})}function m1(n){let l=0;const s=[0];for(const o of n.runEvents)(o.eventType==="page-discovered"||o.eventType==="state-discovered"||o.eventType==="action-discovered")&&(l++,s.push(l));return s.length>1?s:[0,n.pages.length]}const ng=["#2563eb","#7c3aed","#0891b2","#059669","#d97706","#db2777","#475569"],g1={status:["donut","bar","column"],priority:["column","bar","donut"],type:["bar","column","donut"],automation:["donut","bar","column"],modules:["treemap","bar","column","donut"],trend:["line","column"]},yd=10;function vv(n){return[...n].sort((l,s)=>s.value-l.value).slice(0,yd)}function go(n){return n.length>10?`${n.slice(0,10)}...`:n}function v1({pages:n,testCases:l,recordedCases:s,completedRuns:o,onScout:u,onReview:h,onRecord:f,onRun:p,onExport:g}){const{language:m}=Cn(),j=m==="th",b=[{label:j?"สำรวจเว็บไซต์":"Scout the website",description:n?j?`ค้นพบ ${n} หน้า`:`${n} pages discovered`:j?"ใส่ URL แล้วให้ LazyScout สร้าง Test Case ชุดแรก":"Enter a URL and let LazyScout discover the first Test Cases.",complete:n>0,action:n?j?"สำรวจอีกครั้ง":"Scout again":j?"เริ่ม Scout":"Start Scout",onClick:u},{label:j?"ตรวจทาน Test Case":"Review Test Cases",description:l?j?`มี ${l} Test Case พร้อมให้ตรวจทาน`:`${l} Test Cases are ready to review.`:j?"ตรวจชื่อ ขั้นตอน และผลลัพธ์ที่คาดหวัง":"Review titles, steps, and expected results.",complete:l>0,action:j?"เปิด Test Case":"Open Test Cases",onClick:h},{label:j?"Record Flow ที่ขาด":"Record missing flows",description:s?j?`บันทึกแล้ว ${s} Flow`:`${s} recorded flow${s===1?"":"s"} saved.`:j?"บันทึก Login หรือขั้นตอนงานที่ Scout คาดเดาไม่ได้":"Record login or business actions that Scout cannot infer.",complete:s>0,action:"Record Flow",onClick:f},{label:j?"รัน Automation":"Run Automation",description:o?j?`รันแล้ว ${o} Test Case`:`${o} Test Case${o===1?"":"s"} executed.`:j?"รัน Test Case ที่เลือกด้วย Playwright CLI":"Run selected Test Cases with the Playwright CLI.",complete:o>0,action:j?"เปิด Automation":"Open Automation",onClick:p},{label:j?"ส่ง Test Case ให้ทีม":"Share the Test Cases",description:j?"Export Test Case ที่ตรวจแล้วเป็น CSV เพื่อส่งให้ทีม":"Export the reviewed Test Cases as a CSV file for your team.",complete:!1,action:"Export CSV",onClick:g}];return r.jsxs("section",{className:"journey-card","aria-labelledby":"journey-title",children:[r.jsxs("header",{children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:j?"ขั้นตอนที่แนะนำ":"Recommended workflow"}),r.jsx("h3",{id:"journey-title",children:j?"ต่อไปควรทำอะไร?":"What should I do next?"})]}),r.jsxs("span",{children:[b.filter(S=>S.complete).length,"/4 ",j?"ขั้นตอนพร้อมแล้ว":"setup steps complete"]})]}),r.jsx("div",{className:"journey-steps",children:b.map((S,y)=>r.jsxs("article",{className:S.complete?"is-complete":"",children:[r.jsx("span",{className:"journey-number",children:S.complete?"✓":y+1}),r.jsxs("div",{children:[r.jsx("b",{children:S.label}),r.jsx("small",{children:S.description})]}),r.jsxs("button",{type:"button",onClick:S.onClick,children:[S.action," ",r.jsx("span",{children:"→"})]})]},S.label))})]})}const y1=1e3,b1=3,$u=n=>({projectId:n,status:"idle",startUrl:"",startedAt:"",steps:[]});function x1(n){const[l,s]=I.useState(()=>$u(n??"")),[o,u]=I.useState(!1),[h,f]=I.useState(),[p,g]=I.useState(!1),[m,j]=I.useState(!1);I.useEffect(()=>{if(!n)return;let _=!0;return s($u(n)),f(void 0),g(!1),j(!1),qm(n).then(C=>{if(C.status==="stopped"){Gm(n).catch(()=>{});return}_&&C.status==="recording"&&s(C)}).catch(()=>{}),()=>{_=!1}},[n]);const b=l.status==="recording"&&!p;I.useEffect(()=>{if(!n||!b)return;let _=!0,C=!1,A=0;const H=setInterval(()=>{C||(C=!0,qm(n).then(D=>{A=0,_&&s(D)}).catch(()=>{A+=1,A>=b1&&_&&(f("Lost contact with the recorder. Stop and start it again."),g(!0))}).finally(()=>{C=!1}))},y1);return()=>{_=!1,clearInterval(H)}},[n,b]);const S=I.useCallback(async _=>{if(n){u(!0),f(void 0),g(!1),j(!1);try{s(await T0(n,_))}catch(C){f(C instanceof Error?C.message:"The recorder could not be started.")}finally{u(!1)}}},[n]),y=I.useCallback(async()=>{if(n){u(!0);try{s(await E0(n))}catch(_){f(_ instanceof Error?_.message:"The recorder could not be stopped.")}finally{u(!1)}}},[n]),O=I.useCallback(async()=>{if(!n||!b)return;const _=!m;try{const C=await C0(n,_);s(C),j(_)}catch(C){f(C instanceof Error?C.message:"The inspect mode could not be changed.")}},[m,n,b]),N=I.useCallback(async _=>{if(!(!n||!b))try{s(await A0(n,_))}catch(C){f(C instanceof Error?C.message:"The browser interaction failed.")}},[n,b]),w=I.useCallback(()=>{s($u(n??"")),f(void 0),g(!1),j(!1),n&&Gm(n).catch(()=>{})},[n]);return{state:l,recording:b,busy:o,error:h,start:S,stop:y,reset:w,inspectMode:m,toggleInspectMode:O,interact:N}}const S1="{{TEST_PASSWORD}}",ag="Recorded login",j1=160;function yv({projectId:n,targetUrl:l,onSaveRecording:s,onPickTarget:o}){const{state:u,recording:h,busy:f,error:p,start:g,stop:m,reset:j,inspectMode:b,toggleInspectMode:S,interact:y}=x1(n),[O,N]=I.useState(ag),[w,_]=I.useState(!1),[C,A]=I.useState(0),[H,D]=I.useState(l),[K,G]=I.useState(!1),ae=I.useRef(0),B=I.useRef(void 0),F=u.steps,te=u.status==="stopped"&&F.length>0;I.useEffect(()=>{!K&&u.currentUrl&&D(u.currentUrl)},[K,u.currentUrl]),I.useEffect(()=>{if(!(!w||!h))return A(Date.now()),()=>{B.current!==void 0&&window.clearTimeout(B.current)}},[h,w]);const M=()=>{B.current!==void 0&&window.clearTimeout(B.current),B.current=window.setTimeout(()=>A(Date.now()),j1)},q=async v=>{await y(v),A(Date.now())};I.useEffect(()=>{if(!w)return;const v=document.body,R=document.documentElement,$=v.style.overflow,W=v.style.paddingRight,le=R.style.overflow,ve=window.innerWidth-R.clientWidth;return v.style.overflow="hidden",R.style.overflow="hidden",ve>0&&(v.style.paddingRight=`${ve}px`),()=>{v.style.overflow=$,v.style.paddingRight=W,R.style.overflow=le}},[w]);const E=v=>{const R=v.currentTarget.getBoundingClientRect();return{x:(v.clientX-R.left)/R.width*v.currentTarget.naturalWidth,y:(v.clientY-R.top)/R.height*v.currentTarget.naturalHeight}},Z=v=>{if(v.nativeEvent.isComposing||["Shift","Control","Alt","Meta"].includes(v.key))return;if(v.preventDefault(),v.key.length===1&&!v.ctrlKey&&!v.altKey&&!v.metaKey){q({type:"text",text:v.key});return}const R=[v.ctrlKey&&"Control",v.altKey&&"Alt",v.metaKey&&"Meta",v.shiftKey&&"Shift"].filter(Boolean).join("+");q({type:"key",key:R?`${R}+${v.key}`:v.key})},Y=v=>{v.preventDefault(),v.stopPropagation(),q({type:"scroll",deltaX:v.deltaX,deltaY:v.deltaY})},P=()=>{const v=H.trim();if(!v||!h)return;let R=v;try{R=new URL(v,u.currentUrl||l).toString()}catch{return}q({type:"navigate",url:R})},X=()=>{j(),N(ag),_(!1)},k=()=>{s(F,O.trim()||"Recorded flow",u.startUrl||l),X()},V=async v=>{if(!o)return;const R=w1(v);await m(),j(),_(!1),o(R)};return r.jsxs("div",{className:"settings-notice settings-notice-stacked recorder-panel",children:[r.jsx("b",{children:"Record a flow"}),r.jsx("span",{children:"Start the Cypress-style workspace to record clicks, typing, and element locators."}),p&&r.jsx("p",{className:"recorder-error",children:p}),!h&&!te&&r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:f,onClick:()=>{_(!0),g(l)},children:f?"Starting…":"Start recording"}),h&&!w&&r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>_(!0),children:"Open recorder workspace"}),!w&&h&&u.inspection&&r.jsxs("div",{className:"recorder-inspection","aria-live":"polite",children:[r.jsxs("div",{className:"recorder-inspection-heading",children:[r.jsx("b",{children:"Selected element"}),r.jsxs("code",{children:["<",u.inspection.tagName,">"]})]}),u.inspection.accessibleName&&r.jsxs("span",{children:["Accessible name: ",u.inspection.accessibleName]}),u.inspection.role&&r.jsxs("span",{children:["Role: ",u.inspection.role]}),u.inspection.id&&r.jsxs("span",{children:["ID: ",u.inspection.id]}),u.inspection.name&&r.jsxs("span",{children:["Name: ",u.inspection.name]}),r.jsxs("label",{children:["CSS selector",r.jsx("code",{children:u.inspection.cssSelector})]}),r.jsxs("label",{children:["Playwright locator",r.jsx("code",{children:u.inspection.playwrightLocator})]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{navigator.clipboard?.writeText(u.inspection?.playwrightLocator??"")},children:"Copy locator"})]}),!w&&F.length>0&&r.jsx("ol",{className:"recorder-steps",children:F.map((v,R)=>r.jsxs("li",{children:[r.jsx("span",{className:"recorder-step-index",children:R+1}),r.jsx("span",{children:li(v)})]},`${R}-${v.type}`))}),!w&&te&&r.jsxs(r.Fragment,{children:[r.jsxs("label",{className:"recorder-title",children:[r.jsx("span",{children:"Test Case title"}),r.jsx("input",{value:O,onChange:v=>N(v.target.value),placeholder:"Recorded login"})]}),r.jsxs("div",{className:"recorder-actions",children:[r.jsx("button",{type:"button",className:"btn btn-primary",onClick:k,children:"Save as Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:X,children:"Discard"})]})]}),u.status==="stopped"&&F.length===0&&r.jsx("p",{className:"recorder-status",children:"No steps were recorded. Start again and interact with the page."}),w&&r.jsx("div",{className:"modern-modal-backdrop recorder-workspace-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal recorder-workspace-modal",role:"dialog","aria-modal":"true","aria-labelledby":"recorder-workspace-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Cypress-style recorder"}),r.jsx("h2",{id:"recorder-workspace-title",children:"Record and inspect"}),r.jsxs("p",{children:["Control the recorder from the left and preview the target page on the right. Your clicks and typing become Test Steps. Passwords are never read and are saved as ",r.jsx("code",{children:S1}),"."]})]}),r.jsx("button",{type:"button",className:"icon-btn","aria-label":"Close recorder workspace",onClick:()=>_(!1),children:"×"})]}),r.jsxs("div",{className:"recorder-workspace-body",children:[r.jsxs("aside",{className:"recorder-workspace-sidebar",children:[r.jsx("span",{className:"recorder-workspace-status",children:h?"● Recording":"○ Recorder idle"}),r.jsx("button",{type:"button",className:"btn btn-danger",disabled:!h||f,onClick:()=>{m()},children:f?"Stopping…":"Stop recording"}),r.jsx("button",{type:"button",className:b?"btn btn-primary":"btn btn-secondary",disabled:!h||f,onClick:()=>{S()},children:b?"Inspecting element":"Inspect element"}),r.jsx("p",{className:"recorder-workspace-help",children:"Hover to preview. Click an element to lock it while scrolling, click another element to switch, or click empty space to unlock."}),u.inspection&&r.jsxs("div",{className:"recorder-workspace-selection",children:[r.jsxs("div",{className:"recorder-inspection-lock-row",children:[r.jsx("b",{children:"Selected element"}),r.jsx("span",{className:u.inspection.locked?"is-locked":"",children:u.inspection.locked?"Locked":"Hover preview"})]}),r.jsxs("code",{children:["<",u.inspection.tagName,">"]}),u.inspection.accessibleName&&r.jsx("span",{children:u.inspection.accessibleName}),r.jsx("code",{children:u.inspection.playwrightLocator}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{navigator.clipboard?.writeText(u.inspection?.playwrightLocator??"")},children:"Copy locator"}),o&&u.inspection.locked&&r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{V(u.inspection)},children:"Use this element"})]}),F.length>0&&r.jsx("ol",{className:"recorder-workspace-steps",children:F.map((v,R)=>r.jsxs("li",{children:[r.jsx("span",{children:R+1}),r.jsx("p",{children:li(v)})]},`${R}-${v.type}`))}),te&&r.jsxs("div",{className:"recorder-workspace-save",children:[r.jsxs("label",{children:["Test Case title",r.jsx("input",{value:O,onChange:v=>N(v.target.value)})]}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:k,children:"Save as Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:X,children:"Discard"})]}),r.jsxs("span",{className:"recorder-workspace-count",children:["Recorded steps: ",F.length]})]}),r.jsxs("main",{className:"recorder-workspace-preview",children:[r.jsxs("div",{className:"recorder-workspace-browser-bar",children:[r.jsx("button",{type:"button","aria-label":"Back",disabled:!h,onClick:()=>{q({type:"back"})},children:"←"}),r.jsx("button",{type:"button","aria-label":"Forward",disabled:!h,onClick:()=>{q({type:"forward"})},children:"→"}),r.jsx("button",{type:"button","aria-label":"Reload",disabled:!h,onClick:()=>{q({type:"reload"})},children:"↻"}),r.jsxs("form",{className:"recorder-workspace-address-form",onSubmit:v=>{v.preventDefault(),P()},children:[r.jsx("input",{className:"recorder-workspace-url",value:H,disabled:!h,"aria-label":"Browser address",spellCheck:!1,onFocus:()=>G(!0),onBlur:()=>G(!1),onChange:v=>D(v.target.value)}),r.jsx("button",{type:"submit",className:"recorder-address-go",disabled:!h||!H.trim(),children:"Go"})]})]}),r.jsx("div",{className:"recorder-browser-viewport",style:{cursor:u.pointerCursor??"default"},role:"application",tabIndex:0,"aria-label":"Interactive Playwright browser",onKeyDown:Z,onCompositionEnd:v=>{q({type:"text",text:v.data})},onPaste:v=>{v.preventDefault(),q({type:"text",text:v.clipboardData.getData("text")})},onWheel:Y,children:h?r.jsx("img",{src:O0(n,C),alt:"Live Playwright browser",draggable:!1,style:{cursor:u.pointerCursor??"default"},onLoad:M,onError:M,onClick:v=>{v.currentTarget.parentElement?.focus(),q({type:"click",...E(v)})},onMouseMove:v=>{Date.now()-ae.current<80||(ae.current=Date.now(),y({type:"move",...E(v)}))}}):r.jsx("div",{className:"recorder-browser-loading",children:te?"Recording stopped. Save the Test Case from the left panel.":"Starting Playwright browser…"})}),r.jsx("p",{children:"Click the page, type normally, paste text, or scroll here. Actions are sent to Playwright directly."}),r.jsxs("div",{className:"hidden","aria-hidden":"true",children:[r.jsx("span",{className:"recorder-live-browser-icon","aria-hidden":"true",children:"◉"}),r.jsx("b",{children:"Live Playwright browser"}),r.jsx("p",{children:"Interact with the browser window opened by LazyScout. This modal controls the same recording session and prevents the target page from being opened a second time."}),r.jsx("span",{className:"recorder-live-browser-note",children:"The page is intentionally not embedded in an iframe."})]})]})]}),r.jsx("footer",{className:"modal-footer",children:r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>_(!1),children:"Close workspace"})})]})})]})}function w1(n){return n.role&&n.accessibleName?{strategy:"role",role:n.role,name:n.accessibleName,cssSelector:n.cssSelector}:{strategy:"css",cssSelector:n.cssSelector}}const _1=["navigate","click","fill","select","check","wait","assert"],N1="https://lazyscout.lazyscout.workers.dev/guided-flow.html";function T1({flows:n,baseUrl:l,projectId:s,secrets:o,onSave:u,onGenerateTestCase:h}){const[f,p]=I.useState(),[g,m]=I.useState(),[j,b]=I.useState("click"),[S,y]=I.useState(!1),[O,N]=I.useState(!1),[w,_]=I.useState(),[C,A]=I.useState(),[H,D]=I.useState(),[K,G]=I.useState();I.useEffect(()=>{if(!n.length)return;const $=n.find(W=>W.id===f)??n[0];p($.id),m($)},[n]);const ae=n.findIndex($=>$.id===g?.id),B=!!(g?.baseUrl&&g.steps.length);function F(){const $=new Date().toISOString(),W={id:crypto.randomUUID(),name:"New Guided Flow",description:"",baseUrl:l||"http://localhost:5173",steps:[{id:crypto.randomUUID(),type:"navigate",path:"/"}],createdAt:$,updatedAt:$};p(W.id),m(W),A(void 0)}function te($){m(W=>W&&{...W,...$,updatedAt:new Date().toISOString()})}function M($,W){if(!g)return;const le=g.steps.map((ve,Ne)=>Ne===$?W:ve);te({steps:le})}function q(){g&&te({steps:[...g.steps,C1(j)]})}function E($){g&&te({steps:g.steps.filter((W,le)=>le!==$)})}function Z($,W){if(!g)return;const le=$+W;if(le<0||le>=g.steps.length)return;const ve=[...g.steps],[Ne]=ve.splice($,1);ve.splice(le,0,Ne),te({steps:ve})}async function Y(){if(g){y(!0);try{const $=ae<0?[...n,g]:n.map(W=>W.id===g.id?g:W);await u($)}finally{y(!1)}}}async function P(){if(!g)return;const $={...g,id:crypto.randomUUID(),name:`${g.name} Copy`,steps:g.steps.map(W=>({...W,id:crypto.randomUUID()})),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};await u([...n,$]),p($.id),m($)}async function X(){if(!g)return;const $=n.filter(W=>W.id!==g.id);y(!0);try{await u($),p($[0]?.id),m($[0])}finally{y(!1)}}async function k(){if(K)try{K==="save"?await Y():await X(),G(void 0)}catch{}}async function V(){if(!g||!B||O)return;N(!0),A(void 0);const $=crypto.randomUUID();_($);try{A(await w0(g,s,o,$))}catch(W){A({status:"failed",framework:"playwright",runId:$,logs:[{timestamp:new Date().toISOString(),level:"fail",message:W instanceof Error?W.message:String(W)}],stepStatuses:g.steps.map(le=>({id:le.id,status:"pending"}))})}finally{N(!1),_(void 0)}}async function v(){w&&await _0(w)}const R=I.useMemo(()=>new Map(C?.stepStatuses.map($=>[$.id,$.status])),[C]);return r.jsxs("div",{className:"guided-flow-panel",children:[r.jsxs("div",{className:"guided-flow-intro",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Tester-defined execution"}),r.jsx("h2",{children:"Guided Flow"}),r.jsx("p",{children:"Auto Scout finds the paths. Guided Scout follows yours."})]}),r.jsxs("div",{className:"guided-flow-intro-actions",children:[r.jsxs("a",{className:"guided-flow-guide-link",href:N1,target:"_blank",rel:"noreferrer","aria-label":"Open the visual Guided Flow guide",title:"Open visual Guided Flow guide",children:[r.jsx("span",{"aria-hidden":"true",children:"▤"}),"Guided Flow Guide"]}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:F,children:"+ New Flow"})]})]}),r.jsxs("section",{className:"hidden","aria-hidden":"true",children:[r.jsxs("div",{className:"guided-flow-guide-grid",children:[r.jsxs("div",{children:[r.jsx("strong",{children:"Inputs without a label"}),r.jsxs("p",{children:["Use CSS with a stable id or name. Example: ",r.jsx("code",{children:"input#username"}),"."]})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Buttons"}),r.jsx("p",{children:"Prefer Role + accessible name, or CSS when the button has a stable id."})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Labels"}),r.jsx("p",{children:"Use Label when the input has a real HTML label. It is also useful for validation checks."})]}),r.jsxs("div",{children:[r.jsx("strong",{children:"Login example"}),r.jsx("pre",{children:`Fill · CSS · #username · TEST_USERNAME
|
|
38
|
+
Fill · CSS · #password · TEST_PASSWORD
|
|
39
|
+
Click · CSS · #submit`})]})]}),r.jsxs("div",{className:"guided-flow-guide-steps",children:[r.jsx("strong",{children:"First time using Guided Flow?"}),r.jsxs("ol",{children:[r.jsx("li",{children:"Open the target page in your browser and inspect the element you want to test."}),r.jsxs("li",{children:["If it has an id, choose ",r.jsx("b",{children:"CSS"}),". If it is a named button, choose ",r.jsx("b",{children:"Role"}),"."]}),r.jsxs("li",{children:["Enter only the selector value, for example ",r.jsx("code",{children:"#username"}),", not the whole HTML tag."]}),r.jsxs("li",{children:["For usernames and passwords, leave Value empty and use ",r.jsx("b",{children:"Value reference"}),"."]}),r.jsx("li",{children:"Save the Flow, run it, then use the CLI error to adjust only the failing step."})]})]}),r.jsxs("div",{className:"guided-flow-guide-decision",children:[r.jsx("b",{children:"Not sure which locator to choose?"}),r.jsx("span",{children:"id/name → CSS · button/link name → Role · real label → Label · data-testid → Test ID · no stable attribute → CSS parent + child"})]})]}),r.jsxs("div",{className:"guided-flow-layout",children:[r.jsxs("aside",{className:"guided-flow-list",children:[r.jsxs("div",{className:"guided-flow-list-head",children:[r.jsx("b",{children:"Guided Flows"}),r.jsx("span",{children:n.length})]}),n.map($=>r.jsxs("button",{type:"button",className:$.id===g?.id?"is-active":"",onClick:()=>{p($.id),m($),A(void 0)},children:[r.jsx("strong",{children:$.name}),r.jsxs("small",{children:[$.steps.length," steps"]})]},$.id)),!n.length&&r.jsx("p",{className:"guided-flow-empty",children:"Create a flow to define a deterministic path."})]}),g?r.jsxs("main",{className:"guided-flow-editor",children:[r.jsxs("div",{className:"guided-flow-fields",children:[r.jsxs("label",{children:["Flow name",r.jsx("input",{className:"field",value:g.name,onChange:$=>te({name:$.target.value})})]}),r.jsxs("label",{children:["Base URL",r.jsx("input",{className:"field",value:g.baseUrl,onChange:$=>te({baseUrl:$.target.value})})]}),r.jsxs("label",{className:"guided-flow-wide",children:["Description",r.jsx("textarea",{className:"field",rows:2,value:g.description??"",onChange:$=>te({description:$.target.value})})]})]}),r.jsxs("div",{className:"guided-flow-section-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Flow Steps"}),r.jsx("span",{children:"Execute only the steps defined here."})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:P,children:"Duplicate"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>G("delete"),children:"Delete"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>G("save"),disabled:S,children:S?"Saving…":"Save Flow"})]})]}),r.jsx("div",{className:"guided-flow-steps",children:g.steps.map(($,W)=>r.jsx(O1,{index:W,step:$,status:R.get($.id),projectId:s,baseUrl:g.baseUrl||l,onChange:le=>M(W,le),onDelete:()=>E(W),onMove:Z},$.id))}),r.jsxs("div",{className:"guided-flow-add",children:[r.jsx("select",{className:"field",value:j,onChange:$=>b($.target.value),children:_1.map($=>r.jsx("option",{children:$},$))}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:q,children:"+ Add Step"})]}),r.jsxs("div",{className:"guided-flow-actions",children:[r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!B||O,onClick:V,children:O?"Running…":"Run Flow"}),O&&r.jsx("button",{type:"button",className:"btn btn-danger",onClick:v,children:"Stop"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>D({framework:"playwright",source:l0(g)}),children:"Generate Playwright"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>D({framework:"cypress",source:u0(g)}),children:"Generate Cypress"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!g.steps.length,onClick:()=>h(r0(g)),children:"Generate Test Case"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!0,title:"Record Flow is planned for a future release",children:"Record Flow · Planned"})]}),H&&r.jsxs("section",{className:"guided-flow-code",children:[r.jsxs("header",{children:[r.jsxs("b",{children:[H.framework==="playwright"?"Playwright":"Cypress"," generated source"]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:()=>D(void 0),"aria-label":"Close generated code",children:"×"})]}),r.jsx("pre",{children:H.source})]}),C&&r.jsxs("section",{className:"guided-flow-run",children:[r.jsx("header",{children:r.jsxs("b",{children:["Run result: ",C.status]})}),r.jsx("div",{className:"guided-flow-log",children:C.logs.map(($,W)=>r.jsx("code",{className:`cli-${$.level}`,children:$.message},`${$.timestamp}-${W}`))})]})]}):r.jsxs("div",{className:"guided-flow-empty-state",children:[r.jsx("b",{children:"No Guided Flow selected"}),r.jsx("span",{children:"Define a path and LazyScout will follow it only."}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:F,children:"Create Guided Flow"})]})]}),K&&g&&r.jsx(E1,{action:K,flowName:g.name,busy:S,onCancel:()=>G(void 0),onConfirm:k})]})}function E1({action:n,flowName:l,busy:s,onCancel:o,onConfirm:u}){const h=n==="delete";return r.jsx("div",{className:"guided-flow-confirm-backdrop",role:"presentation",onMouseDown:o,children:r.jsxs("section",{className:"guided-flow-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"guided-flow-confirm-title",onMouseDown:f=>f.stopPropagation(),children:[r.jsx("span",{className:"guided-flow-confirm-icon"+(h?" is-delete":""),"aria-hidden":"true",children:h?"×":"✓"}),r.jsx("p",{className:"eyebrow",children:h?"Remove Guided Flow":"Save Guided Flow"}),r.jsx("h3",{id:"guided-flow-confirm-title",children:h?"Delete this Flow?":"Save your changes?"}),r.jsx("p",{children:h?'"'+l+'" will be removed from this local Project. This action cannot be undone.':'"'+l+'" will be saved to this local Project and will be ready to run.'}),r.jsxs("footer",{children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,disabled:s,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn "+(h?"btn-danger":"btn-primary"),onClick:u,disabled:s,children:s?"Saving…":h?"Delete Flow":"Save Flow"})]})]})})}function dr(){return{strategy:"role",role:"button",name:"Button"}}function C1(n){const l=crypto.randomUUID();return n==="navigate"?{id:l,type:n,path:"/"}:n==="click"?{id:l,type:n,target:dr()}:n==="fill"?{id:l,type:n,target:{...dr(),role:"textbox"},value:""}:n==="select"?{id:l,type:n,target:{...dr(),role:"combobox"},option:""}:n==="check"?{id:l,type:n,target:{...dr(),role:"checkbox"},checked:!0}:n==="wait"?{id:l,type:n,mode:"timeout",value:"750"}:{id:l,type:n,assertion:{type:"text",value:""}}}function O1({index:n,step:l,status:s,onChange:o,onDelete:u,onMove:h,projectId:f,baseUrl:p}){return r.jsxs("article",{className:`guided-flow-step ${s?`is-${s}`:""}`,children:[r.jsxs("header",{children:[r.jsx("span",{className:"guided-flow-step-number",children:n+1}),r.jsx("b",{children:l.type}),s&&r.jsx("em",{children:s}),r.jsxs("div",{className:"guided-flow-step-actions",children:[r.jsx("button",{type:"button",onClick:()=>h(n,-1),disabled:n===0,children:"↑"}),r.jsx("button",{type:"button",onClick:()=>h(n,1),children:"↓"}),r.jsx("button",{type:"button",onClick:u,children:"Delete"})]})]}),r.jsx(A1,{step:l,onChange:o,projectId:f,baseUrl:p})]})}function A1({step:n,onChange:l,projectId:s,baseUrl:o}){return n.type==="navigate"?r.jsxs("label",{children:["Path",r.jsx("input",{className:"field",value:n.path,onChange:u=>l({...n,path:u.target.value})})]}):n.type==="click"||n.type==="fill"||n.type==="select"||n.type==="check"?r.jsxs(r.Fragment,{children:[r.jsx(Hu,{target:n.target,projectId:s,baseUrl:o,onChange:u=>l({...n,target:u})}),n.type==="fill"&&r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Value",r.jsx("input",{className:"field",value:n.value??"",onChange:u=>l({...n,value:u.target.value,valueRef:void 0})})]}),r.jsxs("label",{children:["Value reference",r.jsx("input",{className:"field",placeholder:"TEST_USERNAME",value:n.valueRef??"",onChange:u=>l({...n,valueRef:u.target.value||void 0,value:u.target.value?void 0:n.value})}),r.jsxs("small",{className:"guided-flow-field-help",children:["Use a Project Settings variable such as ",r.jsx("code",{children:"TEST_USERNAME"})," or ",r.jsx("code",{children:"TEST_PASSWORD"}),". Do not put real credentials in Value."]})]})]}),n.type==="select"&&r.jsxs("label",{children:["Option",r.jsx("input",{className:"field",value:n.option,onChange:u=>l({...n,option:u.target.value})})]}),n.type==="check"&&r.jsxs("label",{className:"guided-flow-check",children:[r.jsx("input",{type:"checkbox",checked:n.checked,onChange:u=>l({...n,checked:u.target.checked})})," ","Checked"]})]}):n.type==="wait"?r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Wait type",r.jsxs("select",{className:"field",value:n.mode,onChange:u=>l({...n,mode:u.target.value}),children:[r.jsx("option",{value:"timeout",children:"Wait for timeout"}),r.jsx("option",{value:"url",children:"Wait for URL"}),r.jsx("option",{value:"text",children:"Wait for text"}),r.jsx("option",{value:"visible",children:"Wait for element visible"})]})]}),r.jsxs("label",{children:["Value",r.jsx("input",{className:"field",value:n.value,onChange:u=>l({...n,value:u.target.value})})]}),n.mode==="visible"&&r.jsx(Hu,{target:n.target??dr(),projectId:s,baseUrl:o,onChange:u=>l({...n,target:u})})]}):r.jsxs("div",{className:"guided-flow-inline-fields",children:[r.jsxs("label",{children:["Assertion",r.jsxs("select",{className:"field",value:n.assertion.type,onChange:u=>l({...n,assertion:u.target.value==="visible"?{type:"visible",target:dr()}:{type:u.target.value,value:""}}),children:[r.jsx("option",{value:"visible",children:"Element visible"}),r.jsx("option",{value:"text",children:"Text visible"}),r.jsx("option",{value:"url",children:"URL contains"})]})]}),n.assertion.type==="visible"?r.jsx(Hu,{target:n.assertion.target,projectId:s,baseUrl:o,onChange:u=>l({...n,assertion:{type:"visible",target:u}})}):r.jsxs("label",{children:["Expected value",r.jsx("input",{className:"field",value:n.assertion.value,onChange:u=>l({...n,assertion:n.assertion.type==="text"?{type:"text",value:u.target.value}:{type:"url",value:u.target.value}})})]})]})}function Hu({target:n,onChange:l,projectId:s,baseUrl:o}){const[u,h]=I.useState(!1),f=n.strategy==="role"?n.name??"":n[n.strategy==="testid"?"testId":n.strategy==="css"?"cssSelector":n.strategy];return r.jsxs("div",{className:"guided-flow-target",children:[r.jsxs("div",{className:"guided-flow-picker-head",children:[r.jsx("span",{children:"Target element"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!s||!o,onClick:()=>h(p=>!p),children:"◎ Pick from page"})]}),u&&s&&o&&r.jsx("div",{className:"guided-flow-picker",children:r.jsx(yv,{projectId:s,targetUrl:o,onSaveRecording:()=>{},onPickTarget:p=>{l({...dr(),...p}),h(!1)}})}),r.jsxs("label",{children:["Locator",r.jsxs("select",{className:"field",value:n.strategy,onChange:p=>l({strategy:p.target.value,value:""}),children:[r.jsx("option",{value:"role",children:"Role"}),r.jsx("option",{value:"label",children:"Label"}),r.jsx("option",{value:"placeholder",children:"Placeholder"}),r.jsx("option",{value:"text",children:"Text"}),r.jsx("option",{value:"testid",children:"Test ID"}),r.jsx("option",{value:"css",children:"CSS"})]}),r.jsx("small",{className:"guided-flow-field-help",children:R1(n.strategy)})]}),n.strategy==="role"&&r.jsxs("label",{children:["Role",r.jsx("input",{className:"field",value:n.role??"",onChange:p=>l({...n,role:p.target.value})})]}),r.jsxs("label",{children:[n.strategy==="role"?"Accessible name":"Value",r.jsx("input",{className:"field",value:f??"",placeholder:rg(n.strategy),onChange:p=>l(k1(n,p.target.value))}),r.jsxs("small",{className:"guided-flow-field-help",children:["Example: ",r.jsx("code",{children:rg(n.strategy)})]})]})]})}function R1(n){return n==="css"?"Best for inputs/buttons with a stable id, name, or data attribute. Enter quotes without backslashes.":n==="role"?"Best for buttons, links, checkboxes, and controls with a clear accessible name.":n==="label"?"Use only when the input has a real HTML label. Useful for validation checks.":n==="placeholder"?"Use when the input has a stable placeholder attribute.":n==="testid"?"Best when the application provides a stable data-testid attribute.":"Use for visible text assertions or text-based controls when no stronger locator exists."}function rg(n){return n==="css"?'#username or input[name="email"]':n==="role"?"Submit":n==="label"?"Email":n==="placeholder"?"Search products":n==="testid"?"save-button":"Welcome back"}function k1(n,l){return n.strategy==="role"?{...n,name:l}:n.strategy==="testid"?{...n,testId:l}:n.strategy==="css"?{...n,cssSelector:l.replace(/\\(["'])/g,"$1")}:{...n,[n.strategy]:l}}function D1({result:n,testCaseCount:l,flows:s,baseUrl:o,projectId:u,secrets:h,onSaveFlows:f,onGenerateTestCase:p,onAddToFlow:g,onClose:m,onOpenCases:j}){const[b,S]=I.useState("state-flow"),[y,O]=I.useState("auto-scout"),[N,w]=I.useState(),[_,C]=I.useState(),[A,H]=I.useState(1),D=n.actionGraph.states.find(G=>G.id===N),K=n.actionGraph.edges.find(G=>G.id===_);return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:G=>G.target===G.currentTarget&&m(),children:r.jsxs("section",{className:"modern-modal explorer-flow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"flow-title",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("span",{className:"eyebrow",children:"Website explorer"}),r.jsx("h2",{id:"flow-title",children:"UI State Explorer"}),r.jsx("p",{children:n.origin})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:m,"aria-label":"Close explorer",children:"×"})]}),r.jsxs("div",{className:"explorer-main-tabs",role:"tablist","aria-label":"Explorer mode",children:[r.jsx("button",{type:"button",className:y==="auto-scout"?"active":"",onClick:()=>O("auto-scout"),children:"Auto Scout"}),r.jsx("button",{type:"button",className:y==="guided-flow"?"active":"",onClick:()=>O("guided-flow"),children:"Guided Flow"})]}),y==="guided-flow"?r.jsx(T1,{flows:s,baseUrl:o,projectId:u,secrets:h,onSave:f,onGenerateTestCase:p}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"explorer-hero",children:[r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:l}),r.jsx("span",{children:"draft test cases"})]}),r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:n.stats.pagesVisited}),r.jsx("span",{children:"pages discovered"})]}),r.jsxs("div",{className:"explorer-number",children:[r.jsx("strong",{children:n.actionGraph.states.length}),r.jsx("span",{children:"UI states observed"})]})]}),r.jsxs("div",{className:"explorer-view-tabs",role:"tablist","aria-label":"Explorer view",children:[r.jsx("button",{type:"button",className:b==="site-map"?"active":"",onClick:()=>S("site-map"),children:"Site Map"}),r.jsxs("button",{type:"button",className:b==="state-flow"?"active":"",onClick:()=>S("state-flow"),children:["State Flow ",r.jsx("span",{children:n.actionGraph.edges.length})]})]}),b==="site-map"?r.jsx(z1,{result:n,onSelect:G=>{w(G.id),S("state-flow")}}):r.jsxs("div",{className:"state-flow-layout",children:[r.jsx(U1,{states:n.actionGraph.states,edges:n.actionGraph.edges,selectedStateId:N,selectedEdgeId:_,zoom:A,onZoom:H,onState:G=>{w(G),C(void 0)},onEdge:G=>{C(G),w(void 0)}}),r.jsx(L1,{state:D,edge:K,states:n.actionGraph.states,onAddToFlow:g})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsxs("span",{className:"flow-safety",children:[n.actionGraph.blockedActionKeys.length," unsafe actions blocked"]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:m,children:"Close"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:j,children:"Review Test Cases"})]})]})})}function z1({result:n,onSelect:l}){const s=I.useMemo(()=>{const o=new Map;for(const u of n.actionGraph.states){const h=o.get(u.url)??[];h.push(u),o.set(u.url,h)}return[...o.entries()]},[n.actionGraph.states]);return r.jsx("div",{className:"site-map-list",children:s.map(([o,u])=>r.jsxs("section",{children:[r.jsx("h3",{children:new URL(o).pathname||"/"}),r.jsx("small",{children:o}),u.map(h=>r.jsxs("button",{type:"button",onClick:()=>l(h),children:[r.jsx("i",{className:`state-type-${h.type}`})," ",r.jsx("span",{children:h.name||h.title||"Observed state"}),r.jsx("em",{children:h.type})]},h.id))]},o))})}function U1({states:n,edges:l,selectedStateId:s,selectedEdgeId:o,zoom:u,onZoom:h,onState:f,onEdge:p}){const g=[...new Map(n.map(w=>[w.url,n.filter(_=>_.url===w.url)])).values()],m=Math.max(1,Math.min(4,Math.ceil(Math.sqrt(g.length)))),j=Math.ceil(g.length/m),S=Math.max(1,...g.map(w=>w.length))*130+90,y=new Map;g.forEach((w,_)=>{const C=_%m,A=Math.floor(_/m);w.forEach((H,D)=>{y.set(H.id,{x:150+C*300,y:115+A*S+D*130})})});const O=m*300+80,N=Math.max(320,j*S+40);return r.jsxs("div",{className:"state-flow-canvas",children:[r.jsxs("div",{className:"flow-toolbar",children:[r.jsxs("span",{children:[n.length," states · ",l.length," transitions"]}),r.jsxs("div",{children:[r.jsx("button",{type:"button",onClick:()=>h(Math.max(.6,u-.15)),children:"−"}),r.jsx("button",{type:"button",onClick:()=>h(Math.min(1.4,u+.15)),children:"+"}),r.jsx("button",{type:"button",onClick:()=>h(1),children:"Fit"})]})]}),r.jsx("div",{className:"flow-viewport",children:r.jsxs("svg",{width:O*u,height:N*u,viewBox:`0 0 ${O} ${N}`,"aria-label":"UI state flow graph",children:[r.jsx("defs",{children:r.jsx("marker",{id:"flow-arrow",markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",children:r.jsx("path",{d:"M0,0 L8,4 L0,8 Z",fill:"#94a3b8"})})}),g.map((w,_)=>{const C=_%m,A=Math.floor(_/m),H=20+C*300,D=35+A*S;return r.jsxs("g",{className:"flow-page-group",children:[r.jsx("rect",{x:H,y:D,width:"260",height:S-20,rx:"14"}),r.jsx("text",{x:H+14,y:D+22,className:"flow-page-label",children:qu(new URL(w[0].url).pathname||"/",30)})]},w[0].url)}),l.map(w=>{const _=y.get(w.fromStateId),C=w.toStateId?y.get(w.toStateId):void 0;if(!_||!C)return null;const A=w.id===o;return r.jsxs("g",{onClick:()=>p(w.id),className:"flow-edge",children:[r.jsx("path",{className:A?"selected":"",d:`M ${_.x} ${_.y+38} C ${_.x} ${_.y+95}, ${C.x} ${C.y-95}, ${C.x} ${C.y-38}`,markerEnd:"url(#flow-arrow)"}),r.jsx("title",{children:w.action.description})]},w.id)}),n.map(w=>{const _=y.get(w.id),C=w.id===s;return r.jsxs("g",{onClick:()=>f(w.id),className:"flow-node",children:[r.jsx("rect",{className:C?"selected":"",x:_.x-112,y:_.y-38,width:"224",height:"76",rx:"12"}),r.jsx("text",{x:_.x-94,y:_.y-11,className:"flow-node-type",children:w.type.toUpperCase()}),r.jsx("text",{x:_.x-94,y:_.y+12,className:"flow-node-name",children:qu(w.name||w.title||w.url,27)}),r.jsx("text",{x:_.x-94,y:_.y+28,className:"flow-node-url",children:qu(new URL(w.url).pathname||"/",31)}),r.jsx("title",{children:w.name||w.title||w.url})]},w.id)})]})})]})}function L1({state:n,edge:l,states:s,onAddToFlow:o}){if(!n&&!l)return r.jsxs("aside",{className:"flow-inspector empty",children:[r.jsx("b",{children:"Select a state or transition"}),r.jsx("span",{children:"Click a node to view observed UI. Click a line to inspect the action that created it."})]});if(l){const u=s.find(f=>f.id===l.fromStateId),h=s.find(f=>f.id===l.toStateId);return r.jsxs("aside",{className:"flow-inspector",children:[r.jsx("p",{className:"eyebrow",children:"Transition detail"}),r.jsx("h3",{children:l.action.description}),r.jsxs("dl",{children:[r.jsx("dt",{children:"Action type"}),r.jsx("dd",{children:l.action.type}),r.jsx("dt",{children:"Status"}),r.jsx("dd",{children:l.status}),r.jsx("dt",{children:"Safety"}),r.jsx("dd",{children:l.action.safe?"Safe action":l.action.reason||"Blocked"}),r.jsx("dt",{children:"From"}),r.jsx("dd",{children:u?.name||u?.url}),r.jsx("dt",{children:"To"}),r.jsx("dd",{children:h?.name||"Not observed"}),l.action.locator&&r.jsxs(r.Fragment,{children:[r.jsx("dt",{children:"Locator"}),r.jsxs("dd",{children:[l.action.locator.role,": ",l.action.locator.name]})]}),l.action.locator&&r.jsx("button",{type:"button",className:"btn btn-secondary mt-3",onClick:()=>o({id:crypto.randomUUID(),type:"click",target:M1(l.action.locator)}),children:"Add to Guided Flow"})]})]})}return r.jsxs("aside",{className:"flow-inspector",children:[r.jsx("p",{className:"eyebrow",children:"State detail"}),r.jsx("h3",{children:n.name||n.title||"Observed state"}),r.jsxs("dl",{children:[r.jsx("dt",{children:"Type"}),r.jsx("dd",{children:n.type}),r.jsx("dt",{children:"URL"}),r.jsx("dd",{className:"break-all",children:n.url}),r.jsx("dt",{children:"Fingerprint"}),r.jsxs("dd",{className:"font-mono",children:[n.fingerprint.slice(0,18),"…"]}),r.jsx("dt",{children:"Discovered"}),r.jsx("dd",{children:n.discoveredAt?new Date(n.discoveredAt).toLocaleString():"Previous scan"})]}),r.jsxs("section",{children:[r.jsx("b",{children:"Observed UI"}),r.jsx("p",{children:n.headings.slice(0,3).join(" · ")||"No headings recorded"}),r.jsx("p",{children:n.visibleDialogs.length?`Dialog: ${n.visibleDialogs.join(", ")}`:`${n.controls.length} controls observed`}),n.validationMessages?.length?r.jsxs("p",{children:["Validation: ",n.validationMessages.join(" · ")]}):null]})]})}function M1(n){return n.role?{strategy:"role",role:n.role,name:n.name??""}:n.label?{strategy:"label",label:n.label}:n.placeholder?{strategy:"placeholder",placeholder:n.placeholder}:n.testId?{strategy:"testid",testId:n.testId}:{strategy:"text",text:n.name??""}}function qu(n,l){return n.length>l?`${n.slice(0,l-1)}…`:n}const ig=n=>n.join(`
|
|
40
|
+
`),B1=n=>n.split(/[\n,]/).map(l=>l.trim());function $1({filter:n,onChange:l}){const[s,o]=I.useState(()=>ig(n.keywords)),u=(h,f=n.enabled)=>{o(h),l({enabled:f,keywords:B1(h)})};return r.jsxs("div",{className:"settings-notice settings-notice-stacked click-filter-panel",children:[r.jsxs("b",{children:["Click safeguards ",n.enabled?"ON":"OFF"]}),r.jsx("span",{children:"Suggested destructive actions are blocked by default. Explorer skips them and an Automation run stops instead of clicking. Logout and sign-out actions remain available for QA testing."}),r.jsxs("label",{className:"settings-toggle",children:[r.jsx("input",{type:"checkbox",checked:n.enabled,onChange:h=>l({...n,enabled:h.target.checked})}),r.jsx("span",{children:"Block controls whose label contains one of these words"})]}),n.enabled&&r.jsxs(r.Fragment,{children:[r.jsx("textarea",{className:"click-filter-input",rows:5,value:s,onChange:h=>u(h.target.value),placeholder:`delete
|
|
41
|
+
pay now
|
|
42
|
+
transfer`}),r.jsx("p",{className:"click-filter-help",children:"One word per line. Matching ignores case and looks at the label, title, name, id and link URL of a control."}),r.jsxs("div",{className:"recorder-actions",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>u(ig([...new Set([...n.keywords,...rv])])),children:"Add suggested words"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>u(""),children:"Clear list"})]})]})]})}function H1({projectName:n,projectId:l,targetUrl:s,secrets:o,onSave:u,onClear:h,onClose:f,onSaveRecording:p,clickFilter:g,onChangeClickFilter:m,initialTab:j="credentials"}){const{language:b}=Cn(),S=b==="th",[y,O]=I.useState(j),[N,w]=I.useState(o),[_,C]=I.useState(),[A,H]=I.useState(!1),[D,K]=I.useState(!1),[G,ae]=I.useState(!1),B=(te,M)=>w(q=>({...q,[te]:M||void 0}));async function F(){if(l){H(!0);try{C(await x0(l))}catch{C(void 0)}finally{H(!1)}}}return I.useEffect(()=>{F()},[l]),r.jsx("div",{className:"modal-backdrop",role:"presentation",onMouseDown:te=>{te.target===te.currentTarget&&f()},children:r.jsxs("section",{className:"modal-card project-settings-modal",role:"dialog","aria-modal":"true","aria-labelledby":"project-settings-title",children:[r.jsxs("div",{className:"modal-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:S?"ตั้งค่าโปรเจกต์":"Project settings"}),r.jsx("h2",{id:"project-settings-title",children:y==="credentials"?S?"ข้อมูลสำหรับทดสอบ":"Test credentials":y==="session"?"Browser session":y==="safety"?S?"กฎความปลอดภัย":"Safety rules":S?"บันทึก Flow":"Record a flow"}),r.jsxs("p",{children:[n??(S?"โปรเจกต์ปัจจุบัน":"Current project")," ·"," ",S?"ตั้งค่าทีละหมวด":"Configure one task at a time"]})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:f,"aria-label":"Close",children:"×"})]}),r.jsx("nav",{className:"settings-tabs","aria-label":"Project settings sections",children:[["credentials",S?"ข้อมูลทดสอบ":"Credentials",S?"ตัวแปรสำหรับ Login และ API":"Variables used by login and API steps"],["session","Browser Session",S?"Google, SSO และ Cookie ที่บันทึกไว้":"Google, SSO, and saved cookies"],["safety",S?"ความปลอดภัย":"Safety",S?"ป้องกันการคลิกที่มีความเสี่ยง":"Block risky clicks and actions"],["recorder","Recorder",S?"เปลี่ยนการกดของคุณเป็น Test Step":"Turn your browser actions into Test Steps"]].map(([te,M,q])=>r.jsxs("button",{type:"button",className:y===te?"is-active":"",onClick:()=>O(te),children:[r.jsx("b",{children:M}),r.jsx("small",{children:q})]},te))}),r.jsxs("div",{className:"modal-body",children:[y==="credentials"&&r.jsxs("div",{className:"settings-section",children:[r.jsxs("div",{className:"settings-notice",children:[r.jsx("b",{children:S?"เก็บในหน่วยความจำเท่านั้น":"Memory only"}),r.jsx("span",{children:S?"ข้อมูลจะอยู่ในแท็บนี้เท่านั้น ถูกล้างเมื่อ Refresh และไม่ถูกเขียนลง Test Case หรือ Log":"Values stay in this browser tab, are cleared on refresh and are never written to Test Cases or logs."})]}),r.jsxs("div",{className:"settings-grid",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Email"}),r.jsx("input",{type:"email",value:N.email??"",onChange:te=>B("email",te.target.value),placeholder:"Test email",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Username"}),r.jsx("input",{value:N.username??"",onChange:te=>B("username",te.target.value),placeholder:"Test username",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Password"}),r.jsx("input",{type:"password",value:N.password??"",onChange:te=>B("password",te.target.value),placeholder:"Test password",autoComplete:"off"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"API Token"}),r.jsx("input",{type:"password",value:N.apiToken??"",onChange:te=>B("apiToken",te.target.value),placeholder:"API token",autoComplete:"off"})]})]}),r.jsxs("p",{className:"settings-help",children:["Use ",r.jsx("code",{children:"{{TEST_PASSWORD}}"}),", ",r.jsx("code",{children:"{{TEST_EMAIL}}"}),","," ",r.jsx("code",{children:"{{TEST_USERNAME}}"})," or ",r.jsx("code",{children:"{{API_TOKEN}}"})," in a Test Case. Values are passed to the runner only while it runs."]}),r.jsxs("div",{className:"settings-notice settings-notice-stacked",children:[r.jsx("b",{children:S?"วิธีใช้ข้อมูลทดสอบกับ Guided Flow":"How to connect credentials to Guided Flow"}),r.jsxs("span",{children:[S?"ในขั้นตอน Fill ให้เว้น Value ว่าง แล้วใส่ ":"In a Fill step, leave Value empty and put ",r.jsx("code",{children:"TEST_USERNAME"}),", ",r.jsx("code",{children:"TEST_PASSWORD"}),", ",S?"หรือ":"or"," ",r.jsx("code",{children:"TEST_EMAIL"})," ",S?"ใน Value reference โดย LazyScout จะแทนค่าตอนรันเท่านั้น":"in Value reference. LazyScout replaces the reference only during the run."]})]})]}),y==="session"&&l&&s&&r.jsxs("div",{className:"settings-notice settings-notice-stacked",children:[r.jsx("b",{children:"Google / SSO session"}),r.jsx("span",{children:"Open a separate LazyScout browser, sign in manually, then close that browser. Future Automation runs use this Project profile."}),r.jsxs("div",{className:"auth-session-status","aria-live":"polite",children:[r.jsx("span",{className:`auth-session-dot ${_?.cookieStoreDetected?"is-ready":_?.profileExists?"is-profile":""}`}),r.jsxs("div",{children:[r.jsx("b",{children:_?.cookieStoreDetected?"Browser profile saved":_?.profileExists?"Browser profile created — login not verified":"No saved browser profile yet"}),r.jsx("small",{children:_?.lastModifiedAt?`Last changed ${new Date(_.lastModifiedAt).toLocaleString()}`:"Open the login browser to create this Project profile."})]})]}),r.jsxs("div",{className:"auth-session-actions",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:D,onClick:async()=>{K(!0);try{await b0(l,s),await F()}finally{K(!1)}},children:D?"Opening browser…":"Open login browser"}),r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:A,onClick:()=>{F()},children:A?"Checking…":"Refresh session status"}),G?r.jsxs(r.Fragment,{children:[r.jsx("button",{type:"button",className:"btn btn-danger",onClick:async()=>{await N0(l),ae(!1),await F()},children:"Confirm clear"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>ae(!1),children:"Cancel"})]}):r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>ae(!0),children:"Clear saved session"})]}),r.jsxs("small",{className:"auth-session-hint",children:["Profile saved confirms that browser data exists. To verify Google / SSO is still valid, Scout the authenticated Start Path, such as ",r.jsx("code",{children:"/dashboard"}),"."]})]}),y==="session"&&(!l||!s)&&r.jsxs("div",{className:"settings-empty-state",children:[r.jsx("b",{children:S?"Scout เว็บไซต์ก่อน":"Scout a website first"}),r.jsx("span",{children:S?"ต้องมี Target URL ก่อน LazyScout จึงจะสร้าง Browser Session ที่ใช้ซ้ำได้":"A target URL is required before LazyScout can create a reusable browser session."})]}),y==="safety"&&r.jsx($1,{filter:g,onChange:m}),y==="recorder"&&l&&s&&p&&r.jsx(yv,{projectId:l,targetUrl:s,onSaveRecording:p}),y==="recorder"&&(!l||!s)&&r.jsxs("div",{className:"settings-empty-state",children:[r.jsx("b",{children:S?"เพิ่ม Target URL ก่อน":"Add a target URL first"}),r.jsx("span",{children:S?"Scout เว็บไซต์หนึ่งครั้ง แล้วกลับมาบันทึก Login และ Business Flow ที่นี่":"Scout a website once, then return here to record login and business flows."})]})]}),r.jsxs("div",{className:"modal-footer",children:[y==="credentials"&&r.jsx("button",{type:"button",className:"btn btn-secondary mr-auto",onClick:()=>{h(),w({})},children:S?"ล้างข้อมูลทดสอบ":"Clear secrets"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:f,children:S?"ปิด":"Close"}),y==="credentials"&&r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{u(N),f()},children:S?"บันทึกข้อมูลทดสอบ":"Save credentials"})]})]})})}var Gu={exports:{}},lg;function q1(){return lg||(lg=1,(function(n){var l=(function(s){var o=Object.prototype,u=o.hasOwnProperty,h=Object.defineProperty||function(k,V,v){k[V]=v.value},f,p=typeof Symbol=="function"?Symbol:{},g=p.iterator||"@@iterator",m=p.asyncIterator||"@@asyncIterator",j=p.toStringTag||"@@toStringTag";function b(k,V,v){return Object.defineProperty(k,V,{value:v,enumerable:!0,configurable:!0,writable:!0}),k[V]}try{b({},"")}catch{b=function(V,v,R){return V[v]=R}}function S(k,V,v,R){var $=V&&V.prototype instanceof A?V:A,W=Object.create($.prototype),le=new Y(R||[]);return h(W,"_invoke",{value:M(k,v,le)}),W}s.wrap=S;function y(k,V,v){try{return{type:"normal",arg:k.call(V,v)}}catch(R){return{type:"throw",arg:R}}}var O="suspendedStart",N="suspendedYield",w="executing",_="completed",C={};function A(){}function H(){}function D(){}var K={};b(K,g,function(){return this});var G=Object.getPrototypeOf,ae=G&&G(G(P([])));ae&&ae!==o&&u.call(ae,g)&&(K=ae);var B=D.prototype=A.prototype=Object.create(K);H.prototype=D,h(B,"constructor",{value:D,configurable:!0}),h(D,"constructor",{value:H,configurable:!0}),H.displayName=b(D,j,"GeneratorFunction");function F(k){["next","throw","return"].forEach(function(V){b(k,V,function(v){return this._invoke(V,v)})})}s.isGeneratorFunction=function(k){var V=typeof k=="function"&&k.constructor;return V?V===H||(V.displayName||V.name)==="GeneratorFunction":!1},s.mark=function(k){return Object.setPrototypeOf?Object.setPrototypeOf(k,D):(k.__proto__=D,b(k,j,"GeneratorFunction")),k.prototype=Object.create(B),k},s.awrap=function(k){return{__await:k}};function te(k,V){function v(W,le,ve,Ne){var _e=y(k[W],k,le);if(_e.type==="throw")Ne(_e.arg);else{var oe=_e.arg,we=oe.value;return we&&typeof we=="object"&&u.call(we,"__await")?V.resolve(we.__await).then(function(Te){v("next",Te,ve,Ne)},function(Te){v("throw",Te,ve,Ne)}):V.resolve(we).then(function(Te){oe.value=Te,ve(oe)},function(Te){return v("throw",Te,ve,Ne)})}}var R;function $(W,le){function ve(){return new V(function(Ne,_e){v(W,le,Ne,_e)})}return R=R?R.then(ve,ve):ve()}h(this,"_invoke",{value:$})}F(te.prototype),b(te.prototype,m,function(){return this}),s.AsyncIterator=te,s.async=function(k,V,v,R,$){$===void 0&&($=Promise);var W=new te(S(k,V,v,R),$);return s.isGeneratorFunction(V)?W:W.next().then(function(le){return le.done?le.value:W.next()})};function M(k,V,v){var R=O;return function(W,le){if(R===w)throw new Error("Generator is already running");if(R===_){if(W==="throw")throw le;return X()}for(v.method=W,v.arg=le;;){var ve=v.delegate;if(ve){var Ne=q(ve,v);if(Ne){if(Ne===C)continue;return Ne}}if(v.method==="next")v.sent=v._sent=v.arg;else if(v.method==="throw"){if(R===O)throw R=_,v.arg;v.dispatchException(v.arg)}else v.method==="return"&&v.abrupt("return",v.arg);R=w;var _e=y(k,V,v);if(_e.type==="normal"){if(R=v.done?_:N,_e.arg===C)continue;return{value:_e.arg,done:v.done}}else _e.type==="throw"&&(R=_,v.method="throw",v.arg=_e.arg)}}}function q(k,V){var v=V.method,R=k.iterator[v];if(R===f)return V.delegate=null,v==="throw"&&k.iterator.return&&(V.method="return",V.arg=f,q(k,V),V.method==="throw")||v!=="return"&&(V.method="throw",V.arg=new TypeError("The iterator does not provide a '"+v+"' method")),C;var $=y(R,k.iterator,V.arg);if($.type==="throw")return V.method="throw",V.arg=$.arg,V.delegate=null,C;var W=$.arg;if(!W)return V.method="throw",V.arg=new TypeError("iterator result is not an object"),V.delegate=null,C;if(W.done)V[k.resultName]=W.value,V.next=k.nextLoc,V.method!=="return"&&(V.method="next",V.arg=f);else return W;return V.delegate=null,C}F(B),b(B,j,"Generator"),b(B,g,function(){return this}),b(B,"toString",function(){return"[object Generator]"});function E(k){var V={tryLoc:k[0]};1 in k&&(V.catchLoc=k[1]),2 in k&&(V.finallyLoc=k[2],V.afterLoc=k[3]),this.tryEntries.push(V)}function Z(k){var V=k.completion||{};V.type="normal",delete V.arg,k.completion=V}function Y(k){this.tryEntries=[{tryLoc:"root"}],k.forEach(E,this),this.reset(!0)}s.keys=function(k){var V=Object(k),v=[];for(var R in V)v.push(R);return v.reverse(),function $(){for(;v.length;){var W=v.pop();if(W in V)return $.value=W,$.done=!1,$}return $.done=!0,$}};function P(k){if(k){var V=k[g];if(V)return V.call(k);if(typeof k.next=="function")return k;if(!isNaN(k.length)){var v=-1,R=function $(){for(;++v<k.length;)if(u.call(k,v))return $.value=k[v],$.done=!1,$;return $.value=f,$.done=!0,$};return R.next=R}}return{next:X}}s.values=P;function X(){return{value:f,done:!0}}return Y.prototype={constructor:Y,reset:function(k){if(this.prev=0,this.next=0,this.sent=this._sent=f,this.done=!1,this.delegate=null,this.method="next",this.arg=f,this.tryEntries.forEach(Z),!k)for(var V in this)V.charAt(0)==="t"&&u.call(this,V)&&!isNaN(+V.slice(1))&&(this[V]=f)},stop:function(){this.done=!0;var k=this.tryEntries[0],V=k.completion;if(V.type==="throw")throw V.arg;return this.rval},dispatchException:function(k){if(this.done)throw k;var V=this;function v(Ne,_e){return W.type="throw",W.arg=k,V.next=Ne,_e&&(V.method="next",V.arg=f),!!_e}for(var R=this.tryEntries.length-1;R>=0;--R){var $=this.tryEntries[R],W=$.completion;if($.tryLoc==="root")return v("end");if($.tryLoc<=this.prev){var le=u.call($,"catchLoc"),ve=u.call($,"finallyLoc");if(le&&ve){if(this.prev<$.catchLoc)return v($.catchLoc,!0);if(this.prev<$.finallyLoc)return v($.finallyLoc)}else if(le){if(this.prev<$.catchLoc)return v($.catchLoc,!0)}else if(ve){if(this.prev<$.finallyLoc)return v($.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(k,V){for(var v=this.tryEntries.length-1;v>=0;--v){var R=this.tryEntries[v];if(R.tryLoc<=this.prev&&u.call(R,"finallyLoc")&&this.prev<R.finallyLoc){var $=R;break}}$&&(k==="break"||k==="continue")&&$.tryLoc<=V&&V<=$.finallyLoc&&($=null);var W=$?$.completion:{};return W.type=k,W.arg=V,$?(this.method="next",this.next=$.finallyLoc,C):this.complete(W)},complete:function(k,V){if(k.type==="throw")throw k.arg;return k.type==="break"||k.type==="continue"?this.next=k.arg:k.type==="return"?(this.rval=this.arg=k.arg,this.method="return",this.next="end"):k.type==="normal"&&V&&(this.next=V),C},finish:function(k){for(var V=this.tryEntries.length-1;V>=0;--V){var v=this.tryEntries[V];if(v.finallyLoc===k)return this.complete(v.completion,v.afterLoc),Z(v),C}},catch:function(k){for(var V=this.tryEntries.length-1;V>=0;--V){var v=this.tryEntries[V];if(v.tryLoc===k){var R=v.completion;if(R.type==="throw"){var $=R.arg;Z(v)}return $}}throw new Error("illegal catch attempt")},delegateYield:function(k,V,v){return this.delegate={iterator:P(k),resultName:V,nextLoc:v},this.method==="next"&&(this.arg=f),C}},s})(n.exports);try{regeneratorRuntime=l}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=l:Function("r","regeneratorRuntime = r")(l)}})(Gu)),Gu.exports}var Iu,sg;function Ud(){return sg||(sg=1,Iu=(n,l)=>`${n}-${l}-${Math.random().toString(16).slice(3,8)}`),Iu}var Vu,og;function bv(){if(og)return Vu;og=1;const n=Ud();let l=0;return Vu=({id:s,action:o,payload:u={}})=>{let h=s;return typeof h>"u"&&(h=n("Job",l),l+=1),{id:h,action:o,payload:u}},Vu}var rl={},cg;function Ld(){if(cg)return rl;cg=1;let n=!1;return rl.logging=n,rl.setLogging=l=>{n=l},rl.log=(...l)=>n?console.log.apply(this,l):null,rl}var Yu,ug;function G1(){if(ug)return Yu;ug=1;const n=bv(),{log:l}=Ld(),s=Ud();let o=0;return Yu=()=>{const u=s("Scheduler",o),h={},f={};let p=[];o+=1;const g=()=>p.length,m=()=>Object.keys(h).length,j=()=>{if(p.length!==0){const N=Object.keys(h);for(let w=0;w<N.length;w+=1)if(typeof f[N[w]]>"u"){p[0](h[N[w]]);break}}},b=(N,w)=>new Promise((_,C)=>{const A=n({action:N,payload:w});p.push(async H=>{p.shift(),f[H.id]=A;try{_(await H[N].apply(this,[...w,A.id]))}catch(D){C(D)}finally{delete f[H.id],j()}}),l(`[${u}]: Add ${A.id} to JobQueue`),l(`[${u}]: JobQueue length=${p.length}`),j()});return{addWorker:N=>(h[N.id]=N,l(`[${u}]: Add ${N.id}`),l(`[${u}]: Number of workers=${m()}`),j(),N.id),addJob:async(N,...w)=>{if(m()===0)throw Error(`[${u}]: You need to have at least one worker before adding jobs`);return b(N,w)},terminate:async()=>{Object.keys(h).forEach(async N=>{await h[N].terminate()}),p=[]},getQueueLen:g,getNumWorkers:m}},Yu}function ol(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Fu,dg;function I1(){return dg||(dg=1,Fu=n=>{const l={};return typeof WorkerGlobalScope<"u"?l.type="webworker":typeof document=="object"?l.type="browser":typeof process=="object"&&typeof ol=="function"&&(l.type="node"),typeof n>"u"?l:l[n]}),Fu}var Pu,fg;function V1(){if(fg)return Pu;fg=1;const l=I1()("type")==="browser"?s=>new URL(s,window.location.href).href:s=>s;return Pu=s=>{const o={...s};return["corePath","workerPath","langPath"].forEach(u=>{s[u]&&(o[u]=l(o[u]))}),o},Pu}var Zu,hg;function xv(){return hg||(hg=1,Zu={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}),Zu}const Y1="7.0.0",F1={version:Y1};var Xu,pg;function P1(){return pg||(pg=1,Xu={workerBlobURL:!0,logger:()=>{}}),Xu}var Ku,mg;function Z1(){if(mg)return Ku;mg=1;const n=F1.version;return Ku={...P1(),workerPath:`https://cdn.jsdelivr.net/npm/tesseract.js@v${n}/dist/worker.min.js`},Ku}var Qu,gg;function X1(){return gg||(gg=1,Qu=({workerPath:n,workerBlobURL:l})=>{let s;if(Blob&&URL&&l){const o=new Blob([`importScripts("${n}");`],{type:"application/javascript"});s=new Worker(URL.createObjectURL(o))}else s=new Worker(n);return s}),Qu}var Ju,vg;function K1(){return vg||(vg=1,Ju=n=>{n.terminate()}),Ju}var Wu,yg;function Q1(){return yg||(yg=1,Wu=(n,l)=>{n.onmessage=({data:s})=>{l(s)}}),Wu}var ed,bg;function J1(){return bg||(bg=1,ed=async(n,l)=>{n.postMessage(l)}),ed}var td,xg;function W1(){if(xg)return td;xg=1;const n=s=>new Promise((o,u)=>{const h=new FileReader;h.onload=()=>{o(h.result)},h.onerror=({target:{error:{code:f}}})=>{u(Error(`File could not be read! Code=${f}`))},h.readAsArrayBuffer(s)}),l=async s=>{let o=s;if(typeof s>"u")return"undefined";if(typeof s=="string")/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(s)?o=atob(s.split(",")[1]).split("").map(u=>u.charCodeAt(0)):o=await(await fetch(s)).arrayBuffer();else if(typeof HTMLElement<"u"&&s instanceof HTMLElement)s.tagName==="IMG"&&(o=await l(s.src)),s.tagName==="VIDEO"&&(o=await l(s.poster)),s.tagName==="CANVAS"&&await new Promise(u=>{s.toBlob(async h=>{o=await n(h),u()})});else if(typeof OffscreenCanvas<"u"&&s instanceof OffscreenCanvas){const u=await s.convertToBlob();o=await n(u)}else(s instanceof File||s instanceof Blob)&&(o=await n(s));return new Uint8Array(o)};return td=l,td}var nd,Sg;function ej(){if(Sg)return nd;Sg=1;const n=Z1(),l=X1(),s=K1(),o=Q1(),u=J1(),h=W1();return nd={defaultOptions:n,spawnWorker:l,terminateWorker:s,onMessage:o,send:u,loadImage:h},nd}var ad,jg;function Sv(){if(jg)return ad;jg=1;const n=V1(),l=bv(),{log:s}=Ld(),o=Ud(),u=xv(),{defaultOptions:h,spawnWorker:f,terminateWorker:p,onMessage:g,loadImage:m,send:j}=ej();let b=0;return ad=async(S="eng",y=u.LSTM_ONLY,O={},N={})=>{const w=o("Worker",b),{logger:_,errorHandler:C,...A}=n({...h,...O}),H={},D=typeof S=="string"?S.split("+"):S;let K=y,G=N;const ae=[u.DEFAULT,u.LSTM_ONLY].includes(y)&&!A.legacyCore;let B,F;const te=new Promise((oe,we)=>{F=oe,B=we}),M=oe=>{B(oe.message)};let q=f(A);q.onerror=M,b+=1;const E=({id:oe,action:we,payload:Te})=>new Promise((Ge,Me)=>{s(`[${w}]: Start ${oe}, action=${we}`);const T=`${we}-${oe}`;H[T]={resolve:Ge,reject:Me},j(q,{workerId:w,jobId:oe,action:we,payload:Te})}),Z=()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),Y=oe=>E(l({id:oe,action:"load",payload:{options:{lstmOnly:ae,corePath:A.corePath,logging:A.logging}}})),P=(oe,we,Te)=>E(l({id:Te,action:"FS",payload:{method:"writeFile",args:[oe,we]}})),X=(oe,we)=>E(l({id:we,action:"FS",payload:{method:"readFile",args:[oe,{encoding:"utf8"}]}})),k=(oe,we)=>E(l({id:we,action:"FS",payload:{method:"unlink",args:[oe]}})),V=(oe,we,Te)=>E(l({id:Te,action:"FS",payload:{method:oe,args:we}})),v=(oe,we)=>E(l({id:we,action:"loadLanguage",payload:{langs:oe,options:{langPath:A.langPath,dataPath:A.dataPath,cachePath:A.cachePath,cacheMethod:A.cacheMethod,gzip:A.gzip,lstmOnly:[u.DEFAULT,u.LSTM_ONLY].includes(K)&&!A.legacyLang}}})),R=(oe,we,Te,Ge)=>E(l({id:Ge,action:"initialize",payload:{langs:oe,oem:we,config:Te}})),$=(oe="eng",we,Te,Ge)=>{if(ae&&[u.TESSERACT_ONLY,u.TESSERACT_LSTM_COMBINED].includes(we))throw Error("Legacy model requested but code missing.");const Me=we||K;K=Me;const T=Te||G;G=T;const re=(typeof oe=="string"?oe.split("+"):oe).filter(L=>!D.includes(L));return D.push(...re),re.length>0?v(re,Ge).then(()=>R(oe,Me,T,Ge)):R(oe,Me,T,Ge)},W=(oe={},we)=>E(l({id:we,action:"setParameters",payload:{params:oe}})),le=async(oe,we={},Te={text:!0},Ge)=>E(l({id:Ge,action:"recognize",payload:{image:await m(oe),options:we,output:Te}})),ve=async(oe,we)=>{if(ae)throw Error("`worker.detect` requires Legacy model, which was not loaded.");return E(l({id:we,action:"detect",payload:{image:await m(oe)}}))},Ne=async()=>(q!==null&&(p(q),q=null),Promise.resolve());g(q,({workerId:oe,jobId:we,status:Te,action:Ge,data:Me})=>{const T=`${Ge}-${we}`;if(Te==="resolve")s(`[${oe}]: Complete ${we}`),H[T].resolve({jobId:we,data:Me}),delete H[T];else if(Te==="reject")if(H[T].reject(Me),delete H[T],Ge==="load"&&B(Me),C)C(Me);else throw Error(Me);else Te==="progress"&&_({...Me,userJobId:we})});const _e={id:w,worker:q,load:Z,writeText:P,readText:X,removeFile:k,FS:V,reinitialize:$,setParameters:W,recognize:le,detect:ve,terminate:Ne};return Y().then(()=>v(S)).then(()=>R(S,y,N)).then(()=>F(_e)).catch(()=>{}),te},ad}var rd,wg;function tj(){if(wg)return rd;wg=1;const n=Sv();return rd={recognize:async(o,u,h)=>{const f=await n(u,1,h);return f.recognize(o).finally(async()=>{await f.terminate()})},detect:async(o,u)=>{const h=await n("osd",0,u);return h.detect(o).finally(async()=>{await h.terminate()})}},rd}var id,_g;function nj(){return _g||(_g=1,id={AFR:"afr",AMH:"amh",ARA:"ara",ASM:"asm",AZE:"aze",AZE_CYRL:"aze_cyrl",BEL:"bel",BEN:"ben",BOD:"bod",BOS:"bos",BUL:"bul",CAT:"cat",CEB:"ceb",CES:"ces",CHI_SIM:"chi_sim",CHI_TRA:"chi_tra",CHR:"chr",CYM:"cym",DAN:"dan",DEU:"deu",DZO:"dzo",ELL:"ell",ENG:"eng",ENM:"enm",EPO:"epo",EST:"est",EUS:"eus",FAS:"fas",FIN:"fin",FRA:"fra",FRK:"frk",FRM:"frm",GLE:"gle",GLG:"glg",GRC:"grc",GUJ:"guj",HAT:"hat",HEB:"heb",HIN:"hin",HRV:"hrv",HUN:"hun",IKU:"iku",IND:"ind",ISL:"isl",ITA:"ita",ITA_OLD:"ita_old",JAV:"jav",JPN:"jpn",KAN:"kan",KAT:"kat",KAT_OLD:"kat_old",KAZ:"kaz",KHM:"khm",KIR:"kir",KOR:"kor",KUR:"kur",LAO:"lao",LAT:"lat",LAV:"lav",LIT:"lit",MAL:"mal",MAR:"mar",MKD:"mkd",MLT:"mlt",MSA:"msa",MYA:"mya",NEP:"nep",NLD:"nld",NOR:"nor",ORI:"ori",PAN:"pan",POL:"pol",POR:"por",PUS:"pus",RON:"ron",RUS:"rus",SAN:"san",SIN:"sin",SLK:"slk",SLV:"slv",SPA:"spa",SPA_OLD:"spa_old",SQI:"sqi",SRP:"srp",SRP_LATN:"srp_latn",SWA:"swa",SWE:"swe",SYR:"syr",TAM:"tam",TEL:"tel",TGK:"tgk",TGL:"tgl",THA:"tha",TIR:"tir",TUR:"tur",UIG:"uig",UKR:"ukr",URD:"urd",UZB:"uzb",UZB_CYRL:"uzb_cyrl",VIE:"vie",YID:"yid"}),id}var ld,Ng;function aj(){return Ng||(Ng=1,ld={OSD_ONLY:"0",AUTO_OSD:"1",AUTO_ONLY:"2",AUTO:"3",SINGLE_COLUMN:"4",SINGLE_BLOCK_VERT_TEXT:"5",SINGLE_BLOCK:"6",SINGLE_LINE:"7",SINGLE_WORD:"8",CIRCLE_WORD:"9",SINGLE_CHAR:"10",SPARSE_TEXT:"11",SPARSE_TEXT_OSD:"12",RAW_LINE:"13"}),ld}var sd,Tg;function rj(){if(Tg)return sd;Tg=1,q1();const n=G1(),l=Sv(),s=tj(),o=nj(),u=xv(),h=aj(),{setLogging:f}=Ld();return sd={languages:o,OEM:u,PSM:h,createScheduler:n,createWorker:l,setLogging:f,...s},sd}var ij=rj();const lj=[{id:"visual",title:"Visual check",description:"Compare text, colors and layout with the image"},{id:"text",title:"Text check",description:"Create steps for text read from the image"},{id:"manual",title:"Manual checklist",description:"Create a checklist for a Tester to review"}],jv="lazyscout-test-case-language";function sj(){const n=localStorage.getItem(jv);return n==="th"||n==="en"?n:"en"}function oj({sourceUrl:n,initialLanguage:l,onLanguageChange:s,existingCases:o,onImport:u,onClose:h}){const[f,p]=I.useState(""),[g,m]=I.useState(""),[j,b]=I.useState("Screenshot screen"),[S,y]=I.useState("visual"),[O,N]=I.useState(l??sj),[w,_]=I.useState(""),[C,A]=I.useState([]),[H,D]=I.useState(""),[K,G]=I.useState(!1);function ae(q){!q||!q.type.startsWith("image/")||(m(q.name),p(URL.createObjectURL(q)),D("Ready to read the image."))}async function B(){if(!f||K)return;G(!0),D("Reading Thai and English from the image…");const q=await ij.createWorker("tha+eng");try{const Z=(await q.recognize(f)).data.text.trim();_(Z),A(Z.split(/\r?\n/).map(Y=>Y.trim()).filter(Y=>Y.length>1).slice(0,12).map((Y,P)=>P)),D("Reading complete. Review and edit the text before creating Test Cases.")}catch(E){D(E instanceof Error?E.message:"OCR failed.")}finally{await q.terminate(),G(!1)}}function F(){const q=w.split(/\r?\n/).map(R=>R.trim()).filter(R=>R.length>1).slice(0,12),E=(C.length?C.map(R=>q[R]).filter(Boolean):q).slice(0,8),Z="SCREENSHOT",Y=new Set(o.map(R=>R.id));let P=1;const X=()=>{let R=`TC-${Z}-${String(P).padStart(3,"0")}`;for(;Y.has(R);)R=`TC-${Z}-${String(++P).padStart(3,"0")}`;return Y.add(R),P++,R},k=E.slice(0,8).map(R=>({type:"assertText",text:R,description:O==="th"?`ตรวจสอบว่าหน้าเว็บแสดงข้อความ "${R}"`:`Verify that "${R}" is visible on the page`})),V={module:Z,preconditions:O==="th"?["เปิดหน้าที่ต้องการตรวจสอบให้ตรงกับภาพอ้างอิง"]:["Open the page that matches the screenshot reference"],sourceUrl:n||g,priority:"medium",automationStatus:"needs-review",type:"validation",notes:O==="th"?`สร้างจากภาพ ${g||"อ้างอิง"} · โปรดตรวจทานก่อนนำไปใช้งานจริง`:`Created from ${g||"reference"} · Review before production use`},v=[];(S==="visual"||S==="manual")&&v.push({...V,id:X(),title:O==="th"?`ตรวจสอบว่า ${j} แสดงผลตรงตามภาพอ้างอิง`:`${j} matches the screenshot reference`,steps:[{type:"navigate",url:n||"about:blank",description:O==="th"?"เปิดหน้าที่ต้องการตรวจสอบ":"Open the page to inspect"},{type:"manual",description:O==="th"?"เปรียบเทียบโครงร่าง ระยะห่าง สี และตำแหน่งขององค์ประกอบกับภาพอ้างอิง":"Compare layout, spacing, colors and element positions with the screenshot"}],expectedResult:O==="th"?"โครงร่างและองค์ประกอบที่มองเห็นบนหน้าเว็บตรงกับภาพอ้างอิง":"The page layout and visible elements match the screenshot reference."}),(S==="visual"||S==="text")&&v.push({...V,id:X(),title:O==="th"?`ตรวจสอบข้อความสำคัญทั้งหมดบน ${j}`:`${j} shows all important text`,steps:k,expectedResult:O==="th"?"ข้อความสำคัญบนหน้าจอแสดงครบถ้วนและอ่านได้ชัดเจน":"Important on-screen text is complete and readable."}),u(v),h()}const te=w.split(/\r?\n/).map(q=>q.trim()).filter(q=>q.length>1).slice(0,12),M=C.length||te.length;return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:q=>q.target===q.currentTarget&&h(),children:r.jsxs("section",{className:"modern-modal screenshot-importer",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Create Test Cases from an image"}),r.jsx("h2",{children:"Screenshot → Test Case"}),r.jsx("p",{children:"Follow three steps to create Draft Test Cases for review."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:h,children:"×"})]}),r.jsxs("div",{className:"screenshot-import-body",children:[r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"1"}),r.jsxs("div",{children:[r.jsx("b",{children:"Choose a Test Case pattern"}),r.jsx("p",{children:"Pick the pattern that matches what you need to check."})]})]}),r.jsx("div",{className:"pattern-grid",children:lj.map(q=>r.jsxs("button",{type:"button",className:`pattern-card ${S===q.id?"is-selected":""}`,onClick:()=>y(q.id),children:[r.jsx("b",{children:q.title}),r.jsx("span",{children:q.description})]},q.id))}),r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"2"}),r.jsxs("div",{children:[r.jsx("b",{children:"Upload a Screenshot"}),r.jsx("p",{children:"PNG, JPG and WEBP are supported."})]})]}),r.jsxs("label",{className:"upload-dropzone",children:[r.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp",onChange:q=>ae(q.target.files?.[0])}),r.jsx("strong",{children:g||"Click to choose an image"}),r.jsx("span",{children:"or drop a file here"})]}),f&&r.jsxs("div",{className:"screenshot-preview",children:[r.jsx("img",{src:f,alt:"Screenshot preview"}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:B,disabled:K,children:K?"Reading…":"Read text from image"})]}),r.jsxs("div",{className:"import-step",children:[r.jsx("span",{children:"3"}),r.jsxs("div",{children:[r.jsx("b",{children:"Review text and create cases"}),r.jsx("p",{children:"You can edit OCR text before importing."})]})]}),r.jsxs("label",{className:"field-label",children:["Screen name",r.jsx("input",{className:"field mt-1",value:j,onChange:q=>b(q.target.value)})]}),r.jsxs("label",{className:"field-label",children:["Test Case language",r.jsxs("select",{className:"field mt-1",value:O,onChange:q=>{const E=q.target.value;N(E),localStorage.setItem(jv,E),s?.(E)},children:[r.jsx("option",{value:"en",children:"English"}),r.jsx("option",{value:"th",children:"ไทย"})]})]}),r.jsxs("label",{className:"field-label",children:["Text detected",r.jsx("textarea",{className:"field screenshot-ocr",value:w,onChange:q=>{_(q.target.value),A([])},placeholder:"Read text from the image, or type it yourself"})]}),te.length>0&&r.jsxs("div",{className:"import-preview",children:[r.jsxs("b",{children:["Choose OCR lines to create assertions (",M," selected)"]}),r.jsx("table",{children:r.jsx("tbody",{children:te.map((q,E)=>{const Z=C.length===0||C.includes(E);return r.jsxs("tr",{children:[r.jsx("td",{children:r.jsx("input",{type:"checkbox",checked:Z,onChange:()=>A(Y=>{const P=Y.length===0?te.map((X,k)=>k):Y;return P.includes(E)?P.filter(X=>X!==E):[...P,E]})})}),r.jsx("td",{children:q})]},`${E}-${q}`)})})})]}),r.jsxs("div",{className:"import-summary",children:[r.jsx("b",{children:"Draft preview"}),r.jsxs("span",{children:[S==="visual"||S==="manual"?"1 visual comparison case":"",S==="visual"?" + ":"",S==="visual"||S==="text"?`1 text verification case with ${M} assertion(s)`:""]})]}),r.jsx("p",{className:"screenshot-status",children:H})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsxs("span",{className:"mr-auto text-xs text-slate-500",children:["Results are marked ",r.jsx("b",{children:"needs-review"})]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:h,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:F,disabled:!w.trim()&&S!=="manual",children:"Create Draft Test Cases"})]})]})})}const cj=/^[$_\u0080-\uFFFFa-zA-Z][$_\u0080-\uFFFF\w]*$/;function uj(n){const l={},s={},o=n(),u=n.toString(),h=u.slice(u.indexOf("[")+1,u.lastIndexOf("]")).split(",").map(p=>p.trim());for(const p of h)if(!cj.test(p))throw new Error(`Invalid dependency name: ${p}`);let f=0;for(;f<o.length;){let p=h[f],g=o[f];typeof g=="function"?l[p]=dj(g,p):s[p]=g,f++}return{functions:l,variables:s}}function dj(n,l){const s=n.toString();if(n.prototype)if(s.indexOf("[native code]")>=0){const o=s.indexOf(" ",8)+1,u=s.indexOf("(",o);return s.slice(o,u)}else{let o=s;for(const u in n.prototype)o+=";"+l+".prototype."+u+"="+n.prototype[u].toString();return o}else return s}function fj(n,l,s,o,u,h){let f=!1,p;const g=()=>{p.stop()},m=(b,S)=>{try{p.ingest(b,S)}catch(y){throw g(),y}};return{start:(b,S)=>{if(f)throw new Error("Was started");f=!0;const y=u(),O=y&&y._,N=O||mj(l,b);O||h({_:N});const[w,_]=N;p=n(w,()=>{const H=u();if(H)return H.other},H=>{h(Object.assign(Object.assign({},u()),{other:H}))},s,o),_&&m(_,S)},stop:g,ingest:m}}const hj="var onMessage = function(data) {for (var key in data) {self[key] = data[key]}onMessage = (",pj=")(postMessage)}";function mj(n,l){const[s,o]=gj(l);return[s+";"+hj+n.toString()+pj,o]}function gj(n){let l={},s={};for(const u of n){const{functions:h,variables:f}=uj(u);l=Object.assign(Object.assign({},l),h),s=Object.assign(Object.assign({},s),f)}return[Object.keys(l).map(u=>u+"="+l[u]).join(";"),s]}function vj(n,l,s,o,u,h){let f=!1,p=!1,g=[];const m=void 0;let j=()=>[],b=()=>[],S,y;const O=Z=>Eg[Z],N=(Z,Y)=>{Eg[Z]=Y},w=()=>{if(!f)throw new Error("Not started")},_=()=>{if(f)throw new Error("Was started")},C=()=>{if(p)throw new Error("Was stopped")},A=()=>{if(S)throw new Error("Has alias")},H=Z=>{if(typeof Z!="function")throw new TypeError("Argument must be a function")};let D;if(typeof l=="string"){if(S=l,y=O(S),!y||!y.$)throw new Error("Not found");D=y.$[0],g=y.$[1],j=y.$[2],b=y.$[3],y.$[4]}else D=l;H(D);let K;const G=Z=>{C(),_(),H(Z),g.push(Z)},ae=()=>{C(),_(),G(()=>[D,b,o]),f=!0,K.start(g,m)},B=()=>{p=!0,K.stop()},F=Z=>{K.ingest([Date.now(),Z],j(...Z))};let te;const M=Object.assign({inputLatency:te,outputLatency:te,addDependencies(Z){A(),G(Z)},inputTransferList:Z=>{C(),_(),A(),H(Z),j=Z},outputTransferList:Z=>{C(),_(),A(),H(Z),b=Z},alias(Z){C(),_(),A(),S=Z,N(S,{$:[D,g,j,b]})},start:ae,stop:B},s(ae,B,f,p,F,w,_,C));return K=fj(n,Z=>{let Y=-1,P=-1;const k=o(D,V=>{Z([Y,P,Date.now(),V],b(V))});return([V,v])=>(Y=V,P=Date.now(),k(v))},Z=>{p||u(Z)},([Z,Y,P,X])=>{p||(Z!==-1&&(M.inputLatency=Y-Z),M.outputLatency=Date.now()-P,h(X))},()=>{if(S){const Z=O(S);if(Z)return Z.other}},Z=>{S&&N(S,Object.assign(Object.assign({},O(S)),{other:Z}))}),M}const Eg={};function yj(n,l){let s,o;return vj(n,l,(g,m,j,b,S,y,O,N)=>({call(...w){if(N(),y(),s||o)throw new Error("Previous call not finished");return new Promise((_,C)=>{s=_,o=C,S(w)})},callOnce(...w){return g(),this.call(...w).finally(m)}}),(g,m)=>{const j=b=>b!==null&&typeof b=="object"&&typeof b.then=="function";return b=>{const S=g(...b);j(S)?S.then(m):m(S)}},g=>{if(o)o(g),s=void 0,o=void 0;else throw new Error("`reject` callback not found")},g=>{if(s)s(g),s=void 0,o=void 0;else throw new Error("`resolve` callback not found")})}function bj(n,l,s,o,u){let h=l();h||(h=xj(n),s(h));const f=new Worker(h);return f.onmessage=p=>{const g=p.data,m=g?g[wv]:void 0;if(m){const j=new Error(m[0]);j.stack=m[1];let b=2;for(;b<m.length;)j[m[b][0]]=m[b][1],b++;o(j),f.terminate()}else u(g)},{stop:f.terminate.bind(f),ingest:f.postMessage.bind(f)}}function xj(n){return URL.createObjectURL(new Blob([n+";"+Sj],{type:"text/javascript"}))}const wv="$err$",Sj="self.onmessage = function(evt) {onMessage(evt.data)};function onErr(err_, msg) {var err = err_ instanceof Error ? err_ : new Error(msg);postMessage({"+wv+':[err.message,err.stack].concat(Object.keys(err).map(function(k){return[k,err[k]]}))})};var postMessage = self.postMessage;addEventListener("error",function(evt) {onErr(evt.error, evt.message)});addEventListener("unhandledrejection",function(evt) {evt.preventDefault();onErr(evt.reason, String(evt.reason))})';function jj(n){return yj(bj,n)}function bd(n){"@babel/helpers - typeof";return bd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},bd(n)}function wj(n){var l=String.fromCharCode,s=Object.prototype.hasOwnProperty,o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,u={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(u).forEach(function(C){u[C.toUpperCase()]=u[C]});function h(C,A,H,D){return D?s.call(u,D)?u[D]:"&"+D+";":l(A||parseInt(H,16))}function f(C){return C.length>3&&C.indexOf("&")!==-1?C.replace(o,h):C}var p="non-whitespace outside of root node";function g(C){return new Error(C)}function m(C){return"missing namespace for prefix <"+C+">"}function j(C){return{get:C,enumerable:!0}}function b(C){var A={},H;for(H in C)A[H]=C[H];return A}var S=Symbol("nameCache");function y(C){return C+"$uri"}function O(C){var A={},H,D;for(H in C)D=C[H],A[D]=D,A[y(D)]=H;return A}function N(){return{line:0,column:0}}function w(C){throw C}function _(C){if(!this)return new _(C);var A=C&&C.proxy,H,D,K,G,ae=w,B,F,te,M,q=N,E=!1,Z=!1,Y="",P=!1,X=!1,k=null,V=!1,v,R,$,W;function le(oe){oe instanceof Error||(oe=g(oe)),k=oe,ae(oe,q)}function ve(oe){B&&(oe instanceof Error||(oe=g(oe)),B(oe,q))}this.on=function(oe,we){if(typeof we!="function")throw g("required args <name, cb>");switch(oe){case"openTag":D=we;break;case"text":H=we;break;case"closeTag":K=we;break;case"error":ae=we;break;case"warn":B=we;break;case"cdata":G=we;break;case"attention":M=we;break;case"question":te=we;break;case"comment":F=we;break;default:throw g("unsupported event: "+oe)}return this},this.ns=function(oe){if(typeof oe>"u"&&(oe={}),bd(oe)!=="object")throw g("required args <nsMap={}>");var we={},Te;for(Te in oe)we[Te]=oe[Te];return X=!0,W=we,this};function Ne(){v=X?[]:null,R=X?O(W):null,$=[],q=N,V=!1,k=null,Z=!1,Y=""}this.parse=function(oe){if(typeof oe!="string")throw g("required args <xml=string>");if(E)throw g("parse during stream; call end() first");return Ne(),_e(oe),q=N,V=!1,k},this.write=function(oe){if(typeof oe!="string")throw g("required args <xml=string>");return E||(Ne(),E=!0),k||(Y=_e(Y+oe,!0)||""),this},this.end=function(){return E||Ne(),E=!1,k||_e(Y),Y="",q=N,V=!1,k},this.stop=function(){V=!0};function _e(oe){var we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Te=null,Ge=null,Me,T=0,J=!1,re=!1,L=0,U=0,ee,me,he,ie,Se,je,xe,Ce,Be,De="",jt=0,wt;function _t(Je,$e){var nt=Je.indexOf(":");if(nt===-1)return Je;var Bt=R[Je.substring(0,nt)];return Bt?$e===Bt?Je.substr(nt+1):Bt+Je.substr(nt):(ve(m(Je.substring(0,nt))),null)}function Jt(){if(wt!==null)return wt;var Je,$e,nt=X&&R.xmlns,Bt=X&&P?[]:null,Xe=jt,ct=De,ut=ct.length,Zt,it,Xt,bt,yt,mn={},fa=new Set,Ot,He,Ie;e:for(;Xe<ut;Xe++)if(Ot=!1,He=ct.charCodeAt(Xe),!(He===32||He<14&&He>8)){for((He<65||He>122||He>90&&He<97)&&He!==95&&He!==58&&(ve("illegal first char attribute name"),Ot=!0),Ie=Xe+1;Ie<ut;Ie++)if(He=ct.charCodeAt(Ie),!(He>96&&He<123||He>64&&He<91||He>47&&He<59||He===46||He===45||He===95)){if(He===32||He<14&&He>8){ve("missing attribute value"),Xe=Ie;continue e}if(He===61)break;ve("illegal attribute name char"),Ot=!0}if(yt=ct.substring(Xe,Ie),yt==="xmlns:xmlns"&&(ve("illegal declaration of xmlns"),Ot=!0),He=ct.charCodeAt(Ie+1),He===34)Ie=ct.indexOf('"',Xe=Ie+2),Ie===-1&&(Ie=ct.indexOf("'",Xe),Ie!==-1&&(ve("attribute value quote missmatch"),Ot=!0));else if(He===39)Ie=ct.indexOf("'",Xe=Ie+2),Ie===-1&&(Ie=ct.indexOf('"',Xe),Ie!==-1&&(ve("attribute value quote missmatch"),Ot=!0));else for(ve("missing attribute value quotes"),Ot=!0,Ie=Ie+1;Ie<ut&&(He=ct.charCodeAt(Ie+1),!(He===32||He<14&&He>8));Ie++);for(Ie===-1&&(ve("missing closing quotes"),Ie=ut,Ot=!0),Ot||(Xt=ct.substring(Xe,Ie)),Xe=Ie;Ie+1<ut&&(He=ct.charCodeAt(Ie+1),!(He===32||He<14&&He>8));Ie++)Xe===Ie&&(ve("illegal character after attribute end"),Ot=!0);if(Xe=Ie+1,Ot)continue e;if(fa.has(yt)){ve("attribute <"+yt+"> already defined");continue}if(fa.add(yt),!X){mn[yt]=Xt;continue}if(P){if(it=yt==="xmlns"?"xmlns":yt.charCodeAt(0)===120&&yt.substr(0,6)==="xmlns:"?yt.substr(6):null,it!==null){if(Je=f(Xt),$e=y(it),bt=W[Je],!bt){if(it==="xmlns"||$e in R&&R[$e]!==Je)do bt="ns"+T++;while(typeof R[bt]<"u");else bt=it;W[Je]=bt}R[it]!==bt&&(Zt||(R=b(R),Zt=!0),R[it]=bt,it==="xmlns"&&(R[y(bt)]=Je,nt=bt),R[$e]=Je),mn[yt]=Xt;continue}Bt.push(yt,Xt);continue}yt=_t(yt,nt),yt!==null&&(mn[yt]=Xt)}if(P)for(Xe=0,ut=Bt.length;Xe<ut;Xe++)yt=_t(Bt[Xe++],nt),Xt=Bt[Xe],yt!==null&&(mn[yt]=Xt);return wt=mn}function Qe(){for(var Je=/(\r\n|\r|\n)/g,$e=0,nt=0,Bt=0,Xe=U,ct,ut;L>=Bt&&(ct=Je.exec(oe),!(!ct||(Xe=ct[0].length+ct.index,Xe>L)));)$e+=1,Bt=Xe;return L==-1?(nt=Xe,ut=oe.substring(U)):U===0?ut=oe.substring(U,L):(nt=L-Bt,ut=U==-1?oe.substring(L):oe.substring(L,U+1)),{data:ut,line:$e,column:nt}}for(q=Qe,A&&(Be=Object.create({},{name:j(function(){return xe}),originalName:j(function(){return Ce}),attrs:j(Jt),ns:j(function(){return R})}));U!==-1;){if(oe.charCodeAt(U)===60?L=U:L=oe.indexOf("<",U),L===-1){if(we)return oe.substring(U);if($.length)return le("unexpected end of file");if(!Z)return le("missing start tag");U<oe.length&&oe.substring(U).trim()&&ve(p);return}if(Z||(Z=!0),U!==L){if($.length){if(H&&(H(oe.substring(U,L),f,q),V))return}else if(oe.substring(U,L).trim()&&(ve(p),V))return}if(ie=oe.charCodeAt(L+1),ie===33){if(he=oe.charCodeAt(L+2),he===91&&oe.substr(L+3,6)==="CDATA["){if(U=oe.indexOf("]]>",L),U===-1)return we?oe.substring(L):le("unclosed cdata");if(G&&(G(oe.substring(L+9,U),q),V))return;U+=3;continue}if(he===45&&oe.charCodeAt(L+3)===45){if(U=oe.indexOf("-->",L),U===-1)return we?oe.substring(L):le("unclosed comment");if(F&&(F(oe.substring(L+4,U),f,q),V))return;U+=3;continue}}if(ie===63){if(U=oe.indexOf("?>",L),U===-1)return we?oe.substring(L):le("unclosed question");if(te&&(te(oe.substring(L,U+2),q),V))return;U+=2;continue}for(ee=L+1;;ee++){if(Se=oe.charCodeAt(ee),isNaN(Se))return we?oe.substring(L):(U=-1,le("unclosed tag"));if(Se===34)he=oe.indexOf('"',ee+1),ee=he!==-1?he:ee;else if(Se===39)he=oe.indexOf("'",ee+1),ee=he!==-1?he:ee;else if(Se===62){U=ee;break}}if(ie===33){if(M&&(M(oe.substring(L,U+1),f,q),V))return;U+=1;continue}if(wt={},ie===47){if(J=!1,re=!0,!$.length)return le("missing open tag");if(ee=xe=$.pop(),he=L+2+ee.length,oe.substring(L+2,he)!==ee)return le("closing tag mismatch");for(;he<U;he++)if(ie=oe.charCodeAt(he),!(ie===32||ie>8&&ie<14))return le("close tag")}else{if(oe.charCodeAt(U-1)===47?(ee=xe=oe.substring(L+1,U-1),J=!0,re=!0):(ee=xe=oe.substring(L+1,U),J=!0,re=!1),!(ie>96&&ie<123||ie>64&&ie<91||ie===95||ie===58))return le("illegal first char nodeName");for(he=1,me=ee.length;he<me;he++)if(ie=ee.charCodeAt(he),!(ie>96&&ie<123||ie>64&&ie<91||ie>47&&ie<59||ie===45||ie===95||ie==46)){if(ie===32||ie<14&&ie>8){xe=ee.substring(0,he),wt=null;break}return le("invalid nodeName")}re||$.push(xe)}if(X){Me=R,J&&(re||v.push(Me),wt===null&&(P=ee.indexOf("xmlns",he)!==-1)&&(jt=he,De=ee,Jt(),P=!1)),Ce=xe,Ge!==R&&(Te=R[S],Te===void 0&&(Te=R[S]={}),Ge=R);var gt=Te[xe];if(gt!==void 0)xe=gt;else{if(ie=xe.indexOf(":"),ie!==-1){if(je=R[xe.substring(0,ie)],!je)return le("missing namespace on <"+Ce+">");xe=xe.substr(ie+1)}else je=R.xmlns;je&&(xe=je+":"+xe),Te[Ce]=xe}}if(J&&(jt=he,De=ee,D&&(A?D(Be,f,re,q):D(xe,Jt,f,re,q),V)))return;if(re){if(K&&(K(A?Be:xe,f,J,q),V))return;X&&(J?R=Me:R=v.pop())}U+=1}}}return new _(n)}function _j(n,l,s,o){var u=!1,h=function(){if(u)throw new Error("Errored")},f,p=new wj,g=function(S){h(),p.write(S)},m=function(){h(),p.end(),f()},j=new Promise(function(b,S){f=b;var y=function(C){throw u=!0,C},O=function(C,A){o&&o(A(C),n)},N=function(C,A,H,D,K){if(l){var G=A();for(var ae in G)G[od(ae,!0)]=H(G[ae]);l(od(C),G,n)}},w=function(C){s&&s(od(C),n)};p.on("error",y),p.on("text",O),p.on("openTag",N),p.on("closeTag",w)});return{promise:j,write:g,end:m}}function od(n,l){for(var s=0;s<n.length;){if(n[s]===":"&&!(l&&s===5&&n.slice(0,5)==="xmlns"))return n.slice(s+1);s++}return n}function xd(n){"@babel/helpers - typeof";return xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},xd(n)}function Nj(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function Tj(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function Ej(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&fl(n,l)}function Cj(n){var l=_v();return function(){var o=hl(n),u;if(l){var h=hl(this).constructor;u=Reflect.construct(o,arguments,h)}else u=o.apply(this,arguments);return Oj(this,u)}}function Oj(n,l){if(l&&(xd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Aj(n)}function Aj(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Sd(n){var l=typeof Map=="function"?new Map:void 0;return Sd=function(o){if(o===null||!Rj(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,u)}function u(){return Xs(o,arguments,hl(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),fl(u,o)},Sd(n)}function Xs(n,l,s){return _v()?Xs=Reflect.construct.bind():Xs=function(u,h,f){var p=[null];p.push.apply(p,h);var g=Function.bind.apply(u,p),m=new g;return f&&fl(m,f.prototype),m},Xs.apply(null,arguments)}function _v(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Rj(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function fl(n,l){return fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},fl(n,l)}function hl(n){return hl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},hl(n)}var ul=(function(n){Ej(s,n);var l=Cj(s);function s(o){var u;return Tj(this,s),u=l.call(this,o),u.name="InvalidSpreadsheetError",u}return Nj(s)})(Sd(Error));function kj(n,l,s,o,u,h){var f=_j(l,s,o,u);return h?p(f,n,h):(f.write(n),f.end()),f.promise.then(function(g){return g},function(g){var m=new ul(g.message);throw m.stack=g.stack,m.cause=g,m});function p(g,m,j,b){var S=7,y=64*1024,O=y,N=function(){var C=Date.now();if(m.length>O){g.write(m.slice(0,O)),j&&j(!1),m=m.slice(O);var A=Date.now()-C;return A<S*.5?O*=2:A>S&&(O/=2),!0}else return g.write(m),g.end(),j&&j(!0),!1},w=function _(){N()&&_()};w()}}var Cg={},Dj=(function(n,l,s,o,u){var h=new Worker(Cg[l]||(Cg[l]=URL.createObjectURL(new Blob([n+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return h.onmessage=function(f){var p=f.data,g=p.$e$;if(g){var m=new Error(g[0]);m.code=g[1],m.stack=g[2],u(m,null)}else u(null,p)},h.postMessage(s,o),h}),Qt=Uint8Array,fr=Uint16Array,Nv=Int32Array,Md=new Qt([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]),Bd=new Qt([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]),Tv=new Qt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ev=function(n,l){for(var s=new fr(31),o=0;o<31;++o)s[o]=l+=1<<n[o-1];for(var u=new Nv(s[30]),o=1;o<30;++o)for(var h=s[o];h<s[o+1];++h)u[h]=h-s[o]<<5|o;return{b:s,r:u}},Cv=Ev(Md,2),$d=Cv.b,zj=Cv.r;$d[28]=258,zj[258]=28;var Uj=Ev(Bd,0),Ov=Uj.b,io=new fr(32768);for(var mt=0;mt<32768;++mt){var Ha=(mt&43690)>>1|(mt&21845)<<1;Ha=(Ha&52428)>>2|(Ha&13107)<<2,Ha=(Ha&61680)>>4|(Ha&3855)<<4,io[mt]=((Ha&65280)>>8|(Ha&255)<<8)>>1}var ri=(function(n,l,s){for(var o=n.length,u=0,h=new fr(l);u<o;++u)n[u]&&++h[n[u]-1];var f=new fr(l);for(u=1;u<l;++u)f[u]=f[u-1]+h[u-1]<<1;var p;if(s){p=new fr(1<<l);var g=15-l;for(u=0;u<o;++u)if(n[u])for(var m=u<<4|n[u],j=l-n[u],b=f[n[u]-1]++<<j,S=b|(1<<j)-1;b<=S;++b)p[io[b]>>g]=m}else for(p=new fr(o),u=0;u<o;++u)n[u]&&(p[u]=io[f[n[u]-1]++]>>15-n[u]);return p}),Tl=new Qt(288);for(var mt=0;mt<144;++mt)Tl[mt]=8;for(var mt=144;mt<256;++mt)Tl[mt]=9;for(var mt=256;mt<280;++mt)Tl[mt]=7;for(var mt=280;mt<288;++mt)Tl[mt]=8;var Av=new Qt(32);for(var mt=0;mt<32;++mt)Av[mt]=5;var Rv=ri(Tl,9,1),kv=ri(Av,5,1),Ks=function(n){for(var l=n[0],s=1;s<n.length;++s)n[s]>l&&(l=n[s]);return l},Tn=function(n,l,s){var o=l/8|0;return(n[o]|n[o+1]<<8)>>(l&7)&s},Qs=function(n,l){var s=l/8|0;return(n[s]|n[s+1]<<8|n[s+2]<<16)>>(l&7)},Dv=function(n){return(n+7)/8|0},vo=function(n,l,s){return(l==null||l<0)&&(l=0),(s==null||s>n.length)&&(s=n.length),new Qt(n.subarray(l,s))},zv=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],Pt=function(n,l,s){var o=new Error(l||zv[n]);if(o.code=n,Error.captureStackTrace&&Error.captureStackTrace(o,Pt),!s)throw o;return o},Uv=function(n,l,s,o){var u=n.length,h=o?o.length:0;if(!u||l.f&&!l.l)return s||new Qt(0);var f=!s,p=f||l.i!=2,g=l.i;f&&(s=new Qt(u*3));var m=function(Te){var Ge=s.length;if(Te>Ge){var Me=new Qt(Math.max(Ge*2,Te));Me.set(s),s=Me}},j=l.f||0,b=l.p||0,S=l.b||0,y=l.l,O=l.d,N=l.m,w=l.n,_=u*8;do{if(!y){j=Tn(n,b,1);var C=Tn(n,b+1,3);if(b+=3,C)if(C==1)y=Rv,O=kv,N=9,w=5;else if(C==2){var K=Tn(n,b,31)+257,G=Tn(n,b+10,15)+4,ae=K+Tn(n,b+5,31)+1;b+=14;for(var B=new Qt(ae),F=new Qt(19),te=0;te<G;++te)F[Tv[te]]=Tn(n,b+te*3,7);b+=G*3;for(var M=Ks(F),q=(1<<M)-1,E=ri(F,M,1),te=0;te<ae;){var Z=E[Tn(n,b,q)];b+=Z&15;var A=Z>>4;if(A<16)B[te++]=A;else{var Y=0,P=0;for(A==16?(P=3+Tn(n,b,3),b+=2,Y=B[te-1]):A==17?(P=3+Tn(n,b,7),b+=3):A==18&&(P=11+Tn(n,b,127),b+=7);P--;)B[te++]=Y}}var X=B.subarray(0,K),k=B.subarray(K);N=Ks(X),w=Ks(k),y=ri(X,N,1),O=ri(k,w,1)}else Pt(1);else{var A=Dv(b)+4,H=n[A-4]|n[A-3]<<8,D=A+H;if(D>u){g&&Pt(0);break}p&&m(S+H),s.set(n.subarray(A,D),S),l.b=S+=H,l.p=b=D*8,l.f=j;continue}if(b>_){g&&Pt(0);break}}p&&m(S+131072);for(var V=(1<<N)-1,v=(1<<w)-1,R=b;;R=b){var Y=y[Qs(n,b)&V],$=Y>>4;if(b+=Y&15,b>_){g&&Pt(0);break}if(Y||Pt(2),$<256)s[S++]=$;else if($==256){R=b,y=null;break}else{var W=$-254;if($>264){var te=$-257,le=Md[te];W=Tn(n,b,(1<<le)-1)+$d[te],b+=le}var ve=O[Qs(n,b)&v],Ne=ve>>4;ve||Pt(3),b+=ve&15;var k=Ov[Ne];if(Ne>3){var le=Bd[Ne];k+=Qs(n,b)&(1<<le)-1,b+=le}if(b>_){g&&Pt(0);break}p&&m(S+131072);var _e=S+W;if(S<k){var oe=h-k,we=Math.min(k,_e);for(oe+S<0&&Pt(3);S<we;++S)s[S]=o[oe+S]}for(;S<_e;++S)s[S]=s[S-k]}}l.l=y,l.p=R,l.b=S,l.f=j,y&&(j=1,l.m=N,l.d=O,l.n=w)}while(!j);return S!=s.length&&f?vo(s,0,S):s.subarray(0,S)},Lj=new Qt(0),Mj=function(n,l){var s={};for(var o in n)s[o]=n[o];for(var o in l)s[o]=l[o];return s},Og=function(n,l,s){for(var o=n(),u=n.toString(),h=u.slice(u.indexOf("[")+1,u.lastIndexOf("]")).replace(/\s+/g,"").split(","),f=0;f<o.length;++f){var p=o[f],g=h[f];if(typeof p=="function"){l+=";"+g+"=";var m=p.toString();if(p.prototype)if(m.indexOf("[native code]")!=-1){var j=m.indexOf(" ",8)+1;l+=m.slice(j,m.indexOf("(",j))}else{l+=m;for(var b in p.prototype)l+=";"+g+".prototype."+b+"="+p.prototype[b].toString()}else l+=m}else s[g]=p}return l},Ps=[],Bj=function(n){var l=[];for(var s in n)n[s].buffer&&l.push((n[s]=new n[s].constructor(n[s])).buffer);return l},$j=function(n,l,s,o){if(!Ps[s]){for(var u="",h={},f=n.length-1,p=0;p<f;++p)u=Og(n[p],u,h);Ps[s]={c:Og(n[f],u,h),e:h}}var g=Mj({},Ps[s].e);return Dj(Ps[s].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+l.toString()+"}",s,g,Bj(g),o)},Hj=function(){return[Qt,fr,Nv,Md,Bd,Tv,$d,Ov,Rv,kv,io,zv,ri,Ks,Tn,Qs,Dv,vo,Pt,Uv,Hd,Lv,Mv]},Lv=function(n){return postMessage(n,[n.buffer])},Mv=function(n){return n&&{out:n.size&&new Qt(n.size),dictionary:n.dictionary}},qj=function(n,l,s,o,u,h){var f=$j(s,o,u,function(p,g){f.terminate(),h(p,g)});return f.postMessage([n,l],l.consume?[n.buffer]:[]),function(){f.terminate()}},Vn=function(n,l){return n[l]|n[l+1]<<8},En=function(n,l){return(n[l]|n[l+1]<<8|n[l+2]<<16|n[l+3]<<24)>>>0},cd=function(n,l){return En(n,l)+En(n,l+4)*4294967296};function Gj(n,l,s){return s||(s=l,l={}),typeof s!="function"&&Pt(7),qj(n,l,[Hj],function(o){return Lv(Hd(o.data[0],Mv(o.data[1])))},1,s)}function Hd(n,l){return Uv(n,{i:2},l&&l.out,l&&l.dictionary)}var jd=typeof TextDecoder<"u"&&new TextDecoder,Ij=0;try{jd.decode(Lj,{stream:!0}),Ij=1}catch{}var Vj=function(n){for(var l="",s=0;;){var o=n[s++],u=(o>127)+(o>223)+(o>239);if(s+u>n.length)return{s:l,r:vo(n,s-1)};u?u==3?(o=((o&15)<<18|(n[s++]&63)<<12|(n[s++]&63)<<6|n[s++]&63)-65536,l+=String.fromCharCode(55296|o>>10,56320|o&1023)):u&1?l+=String.fromCharCode((o&31)<<6|n[s++]&63):l+=String.fromCharCode((o&15)<<12|(n[s++]&63)<<6|n[s++]&63):l+=String.fromCharCode(o)}};function Bv(n,l){if(l){for(var s="",o=0;o<n.length;o+=16384)s+=String.fromCharCode.apply(null,n.subarray(o,o+16384));return s}else{if(jd)return jd.decode(n);var u=Vj(n),h=u.s,s=u.r;return s.length&&Pt(8),h}}var Yj=function(n,l){return l+30+Vn(n,l+26)+Vn(n,l+28)},Fj=function(n,l,s){var o=Vn(n,l+28),u=Vn(n,l+30),h=Bv(n.subarray(l+46,l+46+o),!(Vn(n,l+8)&2048)),f=l+46+o,p=Pj(n,f,u,s,En(n,l+20),En(n,l+24),En(n,l+42)),g=p[0],m=p[1],j=p[2];return[Vn(n,l+10),g,m,h,f+u+Vn(n,l+32),j]},Pj=function(n,l,s,o,u,h,f){var p=u==4294967295,g=h==4294967295,m=f==4294967295,j=l+s,b=p+g+m;if(o&&b){for(;l+4<j;l+=4+Vn(n,l+2))if(Vn(n,l)==1)return[p?cd(n,l+4+8*g):u,g?cd(n,l+4):h,m?cd(n,l+4+8*(g+p)):f,1];o<2&&Pt(13)}return[u,h,f,0]},Ag=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(n){n()};function Zj(n,l,s){s||(s=l,l={}),typeof s!="function"&&Pt(7);var o=[],u=function(){for(var w=0;w<o.length;++w)o[w]()},h={},f=function(w,_){Ag(function(){s(w,_)})};Ag(function(){f=s});for(var p=n.length-22;En(n,p)!=101010256;--p)if(!p||n.length-p>65558)return f(Pt(13,0,1),null),u;var g=Vn(n,p+8);if(g){var m=g,j=En(n,p+16),b=En(n,p-20)==117853008;if(b){var S=En(n,p-12);b=En(n,S)==101075792,b&&(m=g=En(n,S+32),j=En(n,S+48))}for(var y=l&&l.filter,O=function(w){var _=Fj(n,j,b),C=_[0],A=_[1],H=_[2],D=_[3],K=_[4],G=_[5],ae=Yj(n,G);j=K;var B=function(te,M){te?(u(),f(te,null)):(M&&(h[D]=M),--g||f(null,h))};if(!y||y({name:D,size:A,originalSize:H,compression:C}))if(!C)B(null,vo(n,ae,ae+A));else if(C==8){var F=n.subarray(ae,ae+A);if(H<524288||A>.8*H)try{B(null,Hd(F,{out:new Qt(H)}))}catch(te){B(te,null)}else o.push(Gj(F,{size:H},B))}else B(Pt(14,"unknown compression type "+C,1),null);else B(null,null)},N=0;N<m;++N)O(N)}else f(null,{});return u}function wd(n){"@babel/helpers - typeof";return wd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},wd(n)}function Xj(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function Kj(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function Qj(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&pl(n,l)}function Jj(n){var l=$v();return function(){var o=ml(n),u;if(l){var h=ml(this).constructor;u=Reflect.construct(o,arguments,h)}else u=o.apply(this,arguments);return Wj(this,u)}}function Wj(n,l){if(l&&(wd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ew(n)}function ew(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function _d(n){var l=typeof Map=="function"?new Map:void 0;return _d=function(o){if(o===null||!tw(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,u)}function u(){return Js(o,arguments,ml(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),pl(u,o)},_d(n)}function Js(n,l,s){return $v()?Js=Reflect.construct.bind():Js=function(u,h,f){var p=[null];p.push.apply(p,h);var g=Function.bind.apply(u,p),m=new g;return f&&pl(m,f.prototype),m},Js.apply(null,arguments)}function $v(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function tw(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function pl(n,l){return pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},pl(n,l)}function ml(n){return ml=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},ml(n)}var Hv=(function(n){Qj(s,n);var l=Jj(s);function s(){return Kj(this,s),l.apply(this,arguments)}return Xj(s)})(_d(Error));function qv(n){var l=new Hv(n.message);return n.stack&&(l.stack=n.stack),Error.captureStackTrace&&Error.captureStackTrace(l,qv),l.cause=n,l}function nw(n,l){return aw(n,l,rw,!0)}function aw(n){var l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=l.filter,o=arguments.length>2?arguments[2]:void 0;return o(new Uint8Array(n),{filter:function(h){return s?s({path:h.name}):!0}}).then(function(u){return u},function(u){throw iw(u)?qv(u):u})}function rw(n){return new Promise(function(l,s){Zj(n,function(o,u){o?s(o):l(u)})})}function iw(n){return typeof n.code=="number"}function Nd(n){"@babel/helpers - typeof";return Nd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Nd(n)}function lw(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function sw(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function ow(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&gl(n,l)}function cw(n){var l=Gv();return function(){var o=vl(n),u;if(l){var h=vl(this).constructor;u=Reflect.construct(o,arguments,h)}else u=o.apply(this,arguments);return uw(this,u)}}function uw(n,l){if(l&&(Nd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return dw(n)}function dw(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Td(n){var l=typeof Map=="function"?new Map:void 0;return Td=function(o){if(o===null||!fw(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,u)}function u(){return Ws(o,arguments,vl(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),gl(u,o)},Td(n)}function Ws(n,l,s){return Gv()?Ws=Reflect.construct.bind():Ws=function(u,h,f){var p=[null];p.push.apply(p,h);var g=Function.bind.apply(u,p),m=new g;return f&&gl(m,f.prototype),m},Ws.apply(null,arguments)}function Gv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function fw(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function gl(n,l){return gl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},gl(n,l)}function vl(n){return vl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},vl(n)}var hw={XLS_FILE_NOT_SUPPORTED:"You passed a legacy `.xls` file. Only `.xlsx` files are supported",FILE_NOT_SUPPORTED:"Doesn't look like an `.xlsx` file",INVALID_ZIP:"Couldn't unzip `.xlsx` file contents",NO_DATA:"No data"},lo=(function(n){ow(s,n);var l=cw(s);function s(o,u){var h;return sw(this,s),h=l.call(this,hw[o]||o),h.code=o,h.name="InvalidInputError",h.cause=u,h}return lw(s)})(Td(Error));function pw(n){var l=n.path;return l.endsWith(".xml")||l.endsWith(".xml.rels")}var mw=[80,75],Iv=[208,207,17,224],eo=[mw,Iv],gw=eo.indexOf(Iv);function vw(){var n,l=yw(eo),s=0;return function(o){if(isNaN(n)){var u;l=l.filter(function(h){if(o===eo[h][s])return eo[h].length===s+1&&(u=h),!0}),l.length===1?n=u:l.length===0&&(n=-1)}return s++,n}}function yw(n){for(var l=[],s=0;s<n.length;)l.push(s),s++;return l}function bw(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=xw(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
43
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xw(n,l){if(n){if(typeof n=="string")return Rg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Rg(n,l)}}function Rg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}function Sw(n){for(var l=vw(),s=bw(n),o;!(o=s()).done;){var u=o.value;if(jw(u,l))return}ww(n.length)}function jw(n,l){var s=l(n);if(s!==void 0){if(s===gw)throw new lo("XLS_FILE_NOT_SUPPORTED");if(s<0)throw new lo("FILE_NOT_SUPPORTED");return!0}}function ww(n){throw new lo(n===0?"NO_DATA":"FILE_NOT_SUPPORTED")}var to;function qa(n){var l=Date.now(),s=typeof global<"u"?!!global.READ_EXCEL_FILE_CHECKPOINTS:typeof window<"u"?!!window.READ_EXCEL_FILE_CHECKPOINTS:!1;s&&(to&&console.log(" -",l-to,"ms"),console.log("*",n)),to=l}function _w(){to=void 0}function Nw(n){return _w(),qa("unpack files"),n instanceof File||n instanceof Blob?n.arrayBuffer().then(kg):Promise.resolve(n).then(kg)}function kg(n){return Sw(new Uint8Array(n)),nw(n,{filter:pw}).then(function(l){return l},function(l){throw l instanceof Hv?new lo("INVALID_ZIP",l.cause):l})}function Tw(n,l){var s=o();return l(n,s,h,null,null).then(function(){return u(s)});function o(){return{workbookPr:void 0,sheets:[]}}function u(f){return{epoch1904:f.workbookPr?f.workbookPr.epoch1904:!1,sheets:f.sheets}}function h(f,p,g){f==="workbookPr"?g.workbookPr||(g.workbookPr={epoch1904:p.date1904==="1"}):f==="sheet"&&p.name&&g.sheets.push({id:Number(p.sheetId),name:p.name,relationId:p.id})}}function Ew(n,l){var s="http://schemas.openxmlformats.org/officeDocument/2006/relationships/",o="http://purl.oclc.org/ooxml/officeDocument/relationships/",u=h();return l(n,u,p,null,null).then(function(){return u});function h(){return{sheets:{},sharedStrings:void 0,styles:void 0}}function f(j){return j}function p(j,b,S){j==="Relationship"&&g(S,b.Id,b.Type,b.Target)}function g(j,b,S,y){switch(S){case s+"styles":case o+"styles":j.styles=m(y);break;case s+"sharedStrings":case o+"sharedStrings":j.sharedStrings=m(y);break;case s+"worksheet":case o+"worksheet":j.sheets[b]=m(y);break}}function m(j){return j[0]==="/"?j.slice(1):"xl/"+j}}function yl(n){"@babel/helpers - typeof";return yl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},yl(n)}var Cw=["xfId"];function Dg(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function zg(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Dg(Object(s),!0).forEach(function(o){Ow(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Dg(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function Ow(n,l,s){return l=Aw(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function Aw(n){var l=Rw(n,"string");return yl(l)==="symbol"?l:String(l)}function Rw(n,l){if(yl(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(yl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function kw(n,l){if(n==null)return{};var s=Dw(n,l),o,u;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(n);for(u=0;u<h.length;u++)o=h[u],!(l.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(s[o]=n[o])}return s}function Dw(n,l){if(n==null)return{};var s={},o=Object.keys(n),u,h;for(h=0;h<o.length;h++)u=o[h],!(l.indexOf(u)>=0)&&(s[u]=n[u]);return s}function zw(n,l){var s=o();return l(n,s,h,f,null).then(function(){return u(s)});function o(){return{numberFormats:{},baseStyles:[],styles:[],cellStyleXfs:!1,cellXfs:!1}}function u(g){return g.styles.map(function(m){if(m.xfId){var j=m.xfId,b=kw(m,Cw);return zg(zg({},g.baseStyles[j]),b)}else return m})}function h(g,m,j){if(g==="numFmt")j.numberFormats[m.numFmtId]={id:Number(m.numFmtId),template:m.formatCode};else if(g==="cellStyleXfs")j.cellStyleXfs=!0;else if(g==="cellXfs")j.cellXfs=!0;else if(g==="xf"){if(j.cellStyleXfs)j.baseStyles.push(p(m));else if(j.cellXfs){var b=p(m,j.numberFormats);m.xfId&&(b.xfId=Number(m.xfId)),j.styles.push(b)}}}function f(g,m){g==="cellStyleXfs"?m.cellStyleXfs=!1:g==="cellXfs"&&(m.cellXfs=!1)}function p(g,m){var j={},b=g.numFmtId;return b&&(m&&m[b]?j.numberFormat=m[b]:j.numberFormat={id:Number(b)}),j}}function Uw(n,l){var s=o();return l(n,s,h,f,p).then(function(){return u(s)});function o(){return{si:void 0,strings:[]}}function u(S){return S.strings}function h(S,y,O){S==="si"?O.si=g():O.si&&m(S,y,O.si)}function f(S,y){S==="si"?(y.strings.push(y.si.string),y.si=void 0):y.si&&j(S,y.si)}function p(S,y){y.si&&b(S,y.si)}function g(){return{t:!1,r:!1,rPh:!1,string:""}}function m(S,y,O){S==="t"?O.t=!0:S==="r"?O.r=!0:S==="rPh"&&(O.rPh=!0)}function j(S,y){S==="t"?y.t=!1:S==="r"?y.r=!1:S==="rPh"&&(y.rPh=!1)}function b(S,y){y.rPh||y.t&&(y.r?y.string+=S:y.string=S)}}function Lw(n,l){var s=17,o=1,u=1,h=1440*60*1e3,f=365;l&&(n+=4*f+o+u);var p=o+u+70*f+s;return Math.floor((n-p)*h)}var Mw=/^\[\$-[^\]]+\]/,Bw=/;@$/,ud={};function $w(n){if(n in ud)return ud[n];n=n.toLowerCase(),n=n.replace(Mw,""),n=n.replace(Bw,"");var l=n.split(/\W+/),s=l.length===0?!1:l.every(function(o){return Hw.indexOf(o)>=0});return ud[n]=s,s}var Hw=["ss","mm","h","hh","am","pm","d","dd","m","mm","mmm","mmmm","yy","yyyy","e"];function qw(n,l,s){return n.numberFormat?!!(Vw.indexOf(n.numberFormat.id)>=0||l&&n.numberFormat.template===l||s&&n.numberFormat.template&&$w(n.numberFormat.template)):!1}var Gw=[14,15,16,17,18,19,20,21,22,45,46,47],dd=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],Ug=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],Iw=[71,72,73,74,75,76,77,78,79,80,81],Vw=Gw.concat(dd).concat(Ug.filter(function(n){return dd.indexOf(n)<0})).concat(Iw.filter(function(n){return dd.indexOf(n)<0}).filter(function(n){return Ug.indexOf(n)<0}));function Yw(n,l){return Xw(n)||Zw(n,l)||Pw(n,l)||Fw()}function Fw(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
44
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Pw(n,l){if(n){if(typeof n=="string")return Lg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Lg(n,l)}}function Lg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}function Zw(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,u,h,f,p=[],g=!0,m=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(g=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);g=!0);}catch(j){m=!0,u=j}finally{try{if(!g&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(m)throw u}}return p}}function Xw(n){if(Array.isArray(n))return n}var Kw=null,ii=[null,Kw];function Qw(n,l,s,o,u){var h=Yw(u,6),f=h[0],p=h[1],g=h[2],m=h[3],j=h[4],b=h[5];switch(n||"n"){case"str":return s===void 0?"VALUE_MISSING":s?["s",s]:ii;case"inlineStr":return o===void 0?"VALUE_MISSING":["s",o];case"s":if(!s)return"VALUE_MISSING";var S=Number(s);return isNaN(S)||f[S]===void 0?"VALUE_INVALID":["s",f[S]];case"b":return s?s==="1"?["b",!0]:s==="0"?["b",!1]:"VALUE_INVALID":"VALUE_MISSING";case"e":return s?["e",s]:"VALUE_MISSING";case"d":if(!s)return ii;var y=new Date(s);return isNaN(y.valueOf())?"VALUE_INVALID":["d",y.getTime()];case"n":if(!s)return ii;if(l){var O=Number(l);if(isNaN(O)||p[O]===void 0)return"FORMAT_INVALID";if(qw(p[O],m,j)){var N=Number(s);return isNaN(N)?"VALUE_INVALID":["d",Lw(N,g)]}}if(b)return["n",s];var w=Number(s);return isNaN(w)?"VALUE_INVALID":["n",w];default:return"TYPE_INVALID"}}function Mg(n){for(var l=0,s=0;s<n.length;){var o=n.charCodeAt(s);if(o>=48&&o<=57){var u=Number(n.slice(s));return isNaN(u)&&Bg(n),[u,l]}l*=26,l+=n.charCodeAt(s)-64,s++}Bg(n)}function Bg(n){throw new Error('<c r="'.concat(n,'">'))}function Jw(n,l){return t2(n)||e2(n,l)||Vv(n,l)||Ww()}function Ww(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
45
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function e2(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,u,h,f,p=[],g=!0,m=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(g=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);g=!0);}catch(j){m=!0,u=j}finally{try{if(!g&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(m)throw u}}return p}}function t2(n){if(Array.isArray(n))return n}function n2(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=Vv(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
46
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Vv(n,l){if(n){if(typeof n=="string")return $g(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return $g(n,l)}}function $g(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}var fd=null;function a2(n,l,s){var o=s.sharedStrings,u=s.styles,h=s.epoch1904,f=s.options,p=[o,u,h,f.dateFormat,f.smartDateParser!==!1,f.parseNumber],g=[],m=[],j=b();return l(n,j,C,A,H,_).then(function(){var X=j.sheetData,k=X.rowCount,V=X.columnCount,v=X.dataRowCount,R=X.dataColumnCount;if(v<k&&(g=g.slice(0,v)),R<V)for(var $=0;$<g.length;)g[$].length>R&&(g[$]=g[$].slice(0,R)),$++;for(var W=n2(g),le;!(le=W()).done;)for(var ve=le.value;ve.length<R;)ve.push(fd);return g});function b(){return{dimension:void 0,sheetData:void 0}}function S(X){return X.sheetData.rows}function y(X,k){X.sheetData.rowIndexShift+=X.sheetData.rows.length-k.length,X.sheetData.rows=k}function O(X){return X.sheetData.errors}function N(X,k){X.sheetData.errors=k}function w(X){var k=X.row,V=X.column,v=X.error;throw new ul("<c/> at row ".concat(k,", col ").concat(V,": ").concat(v))}function _(X){var k=S(j),V=O(j);if(X)g=g.concat(k),m=m.concat(V),m.length>0&&w(m[0]);else if(k.length>1){var v=k.slice(0,-1);g=g.concat(v),m=m.concat(V),y(j,k.slice(-1)),N(j,[])}}function C(X,k,V){X==="dimension"?V.dimension=D(k.ref):X==="sheetData"?V.sheetData=K():V.sheetData&&G(X,k,V.sheetData)}function A(X,k){k.sheetData&&ae(X,k.sheetData)}function H(X,k){k.sheetData&&B(X,k.sheetData)}function D(X){var k=X.split(":").map(Mg);return k.length===1&&(k=[k[0],k[0]]),k}function K(){return{c:void 0,rows:[],row:void 0,rowNumber:void 0,rowIndexShift:0,cursor:[0,0],rowCount:0,columnCount:0,dataRowCount:0,dataColumnCount:0,errors:[]}}function G(X,k,V){X==="row"?(k.r&&(V.rowNumber=Number(k.r)),V.row=[]):X==="c"?(V.c=E(),V.c.attributes=k):V.c&&Z(X,k,V.c)}function ae(X,k){if(X==="row"){if(k.rowNumber){var V=k.rowIndexShift+k.rows.length;if(k.rowNumber<=V)throw new ul("Out-of-place <row/> number ".concat(k.rowNumber," follows <row/> number ").concat(V));for(;k.rowNumber>k.rowIndexShift+k.rows.length+1;)k.rows.push([])}k.rows.push(k.row),k.row.length>0&&(k.dataRowCount=k.rowNumber),k.rowNumber>k.rowCount&&(k.rowCount=k.rowNumber),k.row=void 0,k.rowNumber=void 0}else if(X==="c"){var v=F(k.c);if(v.row<k.cursor[0]||v.row===k.cursor[0]&&v.column<=k.cursor[1])throw new ul("Out-of-place <c/> at row ".concat(v.row," col ").concat(v.column," follows <c/> at row ").concat(k.cursor[0]," col ").concat(k.cursor[1]));if(k.cursor[0]=v.row,k.cursor[1]=v.column,k.rowNumber||(k.rowNumber=v.row),v.error)w(v),k.errors.push(v);else if(v.value!==fd){for(;v.column>k.row.length+1;)k.row.push(fd);k.row.push(v.value),v.column>k.dataColumnCount&&(k.dataColumnCount=v.column)}v.column>k.columnCount&&(k.columnCount=v.column),k.c=void 0}else k.c&&Y(X,k.c)}function B(X,k){k.c&&P(X,k.c)}function F(X){var k=X.attributes,V=X.inlineString,v=X.vText,R=Mg(k.r),$=Jw(R,2),W=$[0],le=$[1],ve=te(k.t,k.s,v,V,p,f.trim!==!1);return typeof ve=="string"?{row:W,column:le,error:ve}:{row:W,column:le,value:q(ve[1],ve[0])}}function te(X,k,V,v,R,$){var W=M(X,k,V,v,R);return Array.isArray(W)&&W[0]==="s"&&($&&(W[1]=W[1].trim()),W[1]==="")?ii:W}function M(X,k,V,v,R){var $=Qw(X,k,V,v,R);if($==="VALUE_MISSING")switch(X||"n"){case"str":case"inlineStr":case"s":case"b":return ii}return X==="e"?ii:$}function q(X,k){return k==="n"?f.parseNumber?f.parseNumber(X):X:k==="d"?new Date(X):X}function E(){return{v:!1,is:!1,t:!1,r:!1,rPh:!1,vText:void 0,inlineString:void 0,attributes:void 0}}function Z(X,k,V){X==="v"?V.v=!0:X==="is"?(V.is=!0,V.inlineString=""):X==="t"?V.t=!0:X==="r"?V.r=!0:X==="rPh"&&(V.rPh=!0)}function Y(X,k){X==="v"?(k.v=!1,k.vText||(k.vText="")):X==="is"?k.is=!1:X==="t"?k.t=!1:X==="r"?k.r=!1:X==="rPh"&&(k.rPh=!1)}function P(X,k){k.v?k.vText=X:k.is&&(k.rPh||k.t&&(k.r?k.inlineString+=X:k.inlineString=X))}}function r2(n){qa("convert files to strings");for(var l={},s=0,o=Object.keys(n);s<o.length;s++){var u=o[s];l[u]=i2(n[u])}return l}function i2(n){return typeof TextDecoder<"u"?new TextDecoder().decode(n):Bv(n)}function Ed(n){"@babel/helpers - typeof";return Ed=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Ed(n)}function l2(n){return Ed(n)==="object"&&typeof n.then=="function"}function Cd(n){"@babel/helpers - typeof";return Cd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Cd(n)}function s2(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function o2(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function c2(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&bl(n,l)}function u2(n){var l=Yv();return function(){var o=xl(n),u;if(l){var h=xl(this).constructor;u=Reflect.construct(o,arguments,h)}else u=o.apply(this,arguments);return d2(this,u)}}function d2(n,l){if(l&&(Cd(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return f2(n)}function f2(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Od(n){var l=typeof Map=="function"?new Map:void 0;return Od=function(o){if(o===null||!h2(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,u)}function u(){return no(o,arguments,xl(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),bl(u,o)},Od(n)}function no(n,l,s){return Yv()?no=Reflect.construct.bind():no=function(u,h,f){var p=[null];p.push.apply(p,h);var g=Function.bind.apply(u,p),m=new g;return f&&bl(m,f.prototype),m},no.apply(null,arguments)}function Yv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function h2(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function bl(n,l){return bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},bl(n,l)}function xl(n){return xl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},xl(n)}var Hg=(function(n){c2(s,n);var l=u2(s);function s(o){var u;return o2(this,s),u=l.call(this,o),u.name="SheetNotFoundError",u}return s2(s)})(Od(Error));function Sl(n){"@babel/helpers - typeof";return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Sl(n)}function Fv(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=p2(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
47
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function p2(n,l){if(n){if(typeof n=="string")return qg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return qg(n,l)}}function qg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}function Gg(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function so(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Gg(Object(s),!0).forEach(function(o){oo(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Gg(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function oo(n,l,s){return l=m2(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function m2(n){var l=g2(n,"string");return Sl(l)==="symbol"?l:String(l)}function g2(n,l){if(Sl(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(Sl(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function v2(n,l){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=r2(l);return qa("parse spreadsheet info and file paths"),hd(S2(),o,n).then(function(u){var h=u.spreadsheetInfo,f=u.filePaths;return qa('parse "shared strings" and "styles"'),hd(j2(f),o,n).then(function(p){var g=p.sharedStrings,m=p.styles,j=s.sheets?s.sheets.map(function(b){return b2(b,h.sheets)}):h.sheets.map(function(b){return b.relationId});return qa("parse sheet".concat(j.length===1?"":"s"," data")),hd(w2(f,j,{sharedStrings:g,styles:m,epoch1904:h.epoch1904,options:s}),o,n).then(function(b){return qa("end"),j.map(function(S){return{sheet:x2(S,h.sheets),data:b[S]}})})})})}function y2(n,l,s,o){return o&&o.parseNumber||(o=so(so({},o),{},{parseNumber:null})),v2(l,s,o)}function b2(n,l){if(typeof n=="string"){for(var s=Fv(l),o;!(o=s()).done;){var u=o.value;if(u.name===n)return u.relationId}throw new Hg('Sheet "'.concat(n,'" not found. Available sheets: ').concat(l.map(function(h){var f=h.name;return'"'.concat(f,'"')}).join(", ")))}else{if(n<=l.length)return l[n-1].relationId;throw new Hg("Sheet number out of bounds: ".concat(n,". Available sheets count: ").concat(l.length))}}function x2(n,l){for(var s=Fv(l),o;!(o=s()).done;){var u=o.value;if(u.relationId===n)return u.name}throw new Error("Sheet relation ID not found: ".concat(n))}function S2(){return{"xl/_rels/workbook.xml.rels":{name:"filePaths",parse:Ew},"xl/workbook.xml":{name:"spreadsheetInfo",parse:Tw}}}function j2(n){var l;return l={},oo(l,n.sharedStrings||"xl/sharedStrings.xml",{name:"sharedStrings",parse:Uw,fallback:[]}),oo(l,n.styles||"xl/styles.xml",{name:"styles",parse:zw,fallback:{}}),l}function w2(n,l,s){return Object.keys(n.sheets).filter(function(o){return l.includes(o)}).reduce(function(o,u){return so(so({},o),{},oo({},n.sheets[u],{name:u,parse:function(f,p){return a2(f,p,s)}}))},{})}function hd(n,l,s){for(var o={},u=function(){var S=f[h],y=n[S];o[y.name]=l[S]===void 0?y.fallback===void 0?(function(){throw new ul('"'.concat(S,'" file not found inside the `.xlsx` file'))})():y.fallback:y.parse(l[S],s)},h=0,f=Object.keys(n);h<f.length;h++)u();for(var p=[],g=function(){var S=j[m];l2(o[S])&&p.push(o[S].then(function(y){o[S]=y}))},m=0,j=Object.keys(o);m<j.length;m++)g();return p.length>0?Promise.all(p).then(function(){return o}):o}function Ad(n){"@babel/helpers - typeof";return Ad=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},Ad(n)}function _2(n,l,s){return Object.defineProperty(n,"prototype",{writable:!1}),n}function N2(n,l){if(!(n instanceof l))throw new TypeError("Cannot call a class as a function")}function T2(n,l){if(typeof l!="function"&&l!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(l&&l.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),l&&jl(n,l)}function E2(n){var l=Pv();return function(){var o=wl(n),u;if(l){var h=wl(this).constructor;u=Reflect.construct(o,arguments,h)}else u=o.apply(this,arguments);return C2(this,u)}}function C2(n,l){if(l&&(Ad(l)==="object"||typeof l=="function"))return l;if(l!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return O2(n)}function O2(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Rd(n){var l=typeof Map=="function"?new Map:void 0;return Rd=function(o){if(o===null||!A2(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof l<"u"){if(l.has(o))return l.get(o);l.set(o,u)}function u(){return ao(o,arguments,wl(this).constructor)}return u.prototype=Object.create(o.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),jl(u,o)},Rd(n)}function ao(n,l,s){return Pv()?ao=Reflect.construct.bind():ao=function(u,h,f){var p=[null];p.push.apply(p,h);var g=Function.bind.apply(u,p),m=new g;return f&&jl(m,f.prototype),m},ao.apply(null,arguments)}function Pv(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function A2(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function jl(n,l){return jl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,u){return o.__proto__=u,o},jl(n,l)}function wl(n){return wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(s){return s.__proto__||Object.getPrototypeOf(s)},wl(n)}var Yn=(function(n){T2(s,n);var l=E2(s);function s(o){var u;return N2(this,s),u=l.call(this,"invalid"),u.reason=o,u}return _2(s)})(Rd(Error));function R2(n){if(typeof n=="string"){var l=n;if(n=Number(n),String(n)!==l)throw new Yn("not_a_number")}if(typeof n!="number")throw new Yn("not_a_number");if(isNaN(n))throw new Yn("invalid_number");if(!isFinite(n))throw new Yn("out_of_bounds");return n}function k2(n){if(typeof n=="string")return n;if(typeof n=="number"){if(isNaN(n))throw new Yn("invalid_number");if(!isFinite(n))throw new Yn("out_of_bounds");return String(n)}throw new Yn("not_a_string")}function D2(n){if(typeof n=="boolean")return n;throw new Yn("not_a_boolean")}function z2(n){if(n instanceof Date){if(isNaN(n.valueOf()))throw new Yn("out_of_bounds");return n}throw new Yn("not_a_date")}var U2={}.constructor;function Zv(n){return n!=null&&n.constructor===U2}function si(n){"@babel/helpers - typeof";return si=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},si(n)}function L2(n,l){return Kv(n)||M2(n,l)||qd(n,l)||Xv()}function M2(n,l){var s=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s!=null){var o,u,h,f,p=[],g=!0,m=!1;try{if(h=(s=s.call(n)).next,l!==0)for(;!(g=(o=h.call(s)).done)&&(p.push(o.value),p.length!==l);g=!0);}catch(j){m=!0,u=j}finally{try{if(!g&&s.return!=null&&(f=s.return(),Object(f)!==f))return}finally{if(m)throw u}}return p}}function B2(n){return Kv(n)||$2(n)||qd(n)||Xv()}function Xv(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
48
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $2(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function Kv(n){if(Array.isArray(n))return n}function Ig(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function co(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Ig(Object(s),!0).forEach(function(o){H2(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Ig(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function H2(n,l,s){return l=q2(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function q2(n){var l=G2(n,"string");return si(l)==="symbol"?l:String(l)}function G2(n,l){if(si(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(si(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function Qv(n,l){var s=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(s)return(s=s.call(n)).next.bind(s);if(Array.isArray(n)||(s=qd(n))||l){s&&(n=s);var o=0;return function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
49
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qd(n,l){if(n){if(typeof n=="string")return Vg(n,l);var s=Object.prototype.toString.call(n).slice(8,-1);if(s==="Object"&&n.constructor&&(s=n.constructor.name),s==="Map"||s==="Set")return Array.from(n);if(s==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return Vg(n,l)}}function Vg(n,l){(l==null||l>n.length)&&(l=n.length);for(var s=0,o=new Array(l);s<l;s++)o[s]=n[s];return o}var uo=null;function I2(n,l,s){qa("parse sheet data using schema");for(var o=[],u=[],h=V2(n,l),f=0,p=Qv(h),g;!(g=p()).done;){var m=g.value,j=m.object,b=m.errors;b?u=u.concat(b.map(function(S){return co(co({},S),{},{row:f+1})})):o.push(j),f++}return qa("end"),u.length>0?{errors:u}:{objects:o}}function V2(n,l,s){t_(l);var o=r_(),u=B2(n),h=u[0],f=u.slice(1);return f.map(function(p){return Y2(p,l,h,o)})}function Y2(n,l,s,o){var u={schema:l},h=Jv(n,u,void 0,s,o),f=h.value,p=h.isEmptyValue,g=h.errors,m=h.children,j={value:i_,isEmptyValue:p,errors:g,isRequired:void 0},b=ty(u,f,p,g,m,j.isRequired,j.value,j.isEmptyValue,j.errors,s);return g||b?{errors:(g||[]).concat(b||[])}:{object:ey(f,p,void 0,o)}}function F2(n,l,s,o,u){for(var h={},f=!0,p=[],g=[],m=0,j=Object.keys(l);m<j.length;m++){var b=j[m],S=Jv(n,l[b],Yg(b,s),o,u);S.errors?p=p.concat(S.errors):(h[b]=ey(S.value,S.isEmptyValue,Yg(b,s),u),f&&!S.isEmptyValue&&(f=!1)),g.push(co(co({},S),{},{schemaEntry:l[b]}))}return p.length>0?{errors:p,children:g}:{value:h,isEmptyValue:f,children:g}}function Jv(n,l,s,o,u){var h=l.column?o.indexOf(l.column):void 0,f=l.column?h<0:void 0,p=l.column?f?{value:u.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:P2(n[h],l,h,u):F2(n,l.schema,s,o,u),g=p.value,m=p.isEmptyValue,j=p.errors,b=p.children;return j?{errors:j,children:b}:{value:g,isEmptyValue:m,children:b}}function P2(n,l,s,o){var u=Z2(n,l,o),h=u.value,f=u.isEmptyValue,p=u.error,g=u.reason;if(p){var m=ny({error:p,reason:g,column:l.column,columnIndex:s,valueType:l.type,value:n});return{errors:[m]}}return{value:h,isEmptyValue:f}}function Z2(n,l,s){return n===void 0?{value:s.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:n===uo?{value:s.propertyValueWhenCellIsEmpty,isEmptyValue:!0}:Array.isArray(l.type)?X2(n,l,s):Wv(n,l)}function X2(n,l,s){if(typeof n!="string")return{error:"not_a_string"};var o=!0,u=[],h=[],f=W2(n,s.separatorCharacter).map(function(p){if(!(u.length>0)){if(!p){u.push("invalid"),h.push("syntax");return}var g=Wv(p,l),m=g.value,j=g.isEmptyValue,b=g.error,S=g.reason;if(b){u.push(b),h.push(S);return}return o&&!j&&(o=!1),m}});return u.length>0?{error:u[0],reason:h[0]}:{value:f,isEmptyValue:o}}function Wv(n,l,s){if(n===uo)return{value:n,isEmptyValue:!0};var o;if(l.type?o=Q2(n,Array.isArray(l.type)?l.type[0]:l.type):o={value:n},o.error)return o;if(n===uo)return{value:n,isEmptyValue:!0};if(l.oneOf){var u=K2(o.value,l.oneOf);if(u)return u}if(l.validate)try{l.validate(o.value)}catch(h){return{error:h.message}}return{value:o.value,isEmptyValue:n_(o.value)}}function K2(n,l){if(l.indexOf(n)<0)return{error:"invalid",reason:"unknown"}}function Q2(n,l){switch(l){case String:return il(n,k2);case Number:return il(n,R2);case Date:return il(n,z2);case Boolean:return il(n,D2);default:if(typeof l!="function")throw new Error("Unsupported schema `type`: ".concat(l&&l.name||l));return il(n,l)}}function il(n,l){try{var s=l(n);return s===void 0?{value:uo}:{value:s}}catch(u){var o={error:u.message};return u.reason&&(o.reason=u.reason),o}}function J2(n,l,s){for(var o=0,u="";s+o<n.length;){var h=n[s+o];if(h===l)return[u,o];u+=h,o++}return[u,o]}function W2(n,l){for(var s=[],o=0;o<n.length;){var u=J2(n,l,o),h=L2(u,2),f=h[0],p=h[1];o+=p+l.length,s.push(f.trim())}return s}function ey(n,l,s,o){if(l){if(Zv(n))return o.transformEmptyObject(n,{path:s});if(Array.isArray(n))return o.transformEmptyArray(n,{path:s})}return n}function Yg(n,l){return"".concat(l?l+".":"").concat(n)}function ty(n,l,s,o,u,h,f,p,g,m){var j=[],b=e_(n,h,f,p,g);if(b&&s&&j.push(ny({error:"required",column:n.column,columnIndex:m.indexOf(n.column),valueType:n.type,value:l})),u)for(var S=Qv(u),y;!(y=S()).done;){var O=y.value,N=ty(O.schemaEntry,O.value,O.isEmptyValue,O.errors,O.children,b,l,s,o,m);N&&(j=j.concat(N))}if(j.length>0)return j}function e_(n,l,s,o,u){return l===!1&&(o||u)?!1:n.required&&(typeof n.required=="boolean"?n.required:u?!1:n.required(s))}function ny(n){var l=n.column,s=n.columnIndex,o=n.valueType,u=n.value,h=n.error,f=n.reason,p={error:h,column:l,columnIndex:s,value:u};return f&&(p.reason=f),o&&(p.type=o),p}function t_(n){for(var l=0,s=Object.keys(n);l<s.length;l++){var o=s[l],u=n[o];if(si(u.type)==="object"&&!Array.isArray(u.type))throw new Error("When defining a nested schema, use a `schema` property instead of a `type` property");if(!u.schema&&!u.column)throw new Error('"column" not defined for schema entry "'.concat(o,'".'))}ay(n,void 0)}function ay(n,l){if(l!==void 0&&l!==!1)throw new Error("In a schema, a nested object can have a `required` property but the only allowed value is `undefined` or `false`. Otherwise, a \"required\" error for a nested object would have to include a specific `column` title and a nested object doesn't have one. You've specified the following `required`: ".concat(l));for(var s=0,o=Object.keys(n);s<o.length;s++){var u=o[s];if(Zv(n[u].schema)){if(n[u].column)throw new Error("In a schema, `column` property is only allowed when describing a property value rather than a nested object. Key: ".concat(u,`. Schema:
|
|
50
|
+
`).concat(JSON.stringify(n[u],null,2)));ay(n[u].schema,n[u].required)}}}function n_(n){return n==null}var a_={propertyValueWhenColumnIsMissing:void 0,propertyValueWhenCellIsEmpty:null,transformEmptyObject:function(){return null},transformEmptyArray:function(){return null},separatorCharacter:","};function r_(n){return a_}var i_={};function _l(n){"@babel/helpers - typeof";return _l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},_l(n)}var l_=["schema"];function Fg(n,l){var s=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);l&&(o=o.filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable})),s.push.apply(s,o)}return s}function Pg(n){for(var l=1;l<arguments.length;l++){var s=arguments[l]!=null?arguments[l]:{};l%2?Fg(Object(s),!0).forEach(function(o){s_(n,o,s[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(s)):Fg(Object(s)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(s,o))})}return n}function s_(n,l,s){return l=o_(l),l in n?Object.defineProperty(n,l,{value:s,enumerable:!0,configurable:!0,writable:!0}):n[l]=s,n}function o_(n){var l=c_(n,"string");return _l(l)==="symbol"?l:String(l)}function c_(n,l){if(_l(n)!=="object"||n===null)return n;var s=n[Symbol.toPrimitive];if(s!==void 0){var o=s.call(n,l);if(_l(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(l==="string"?String:Number)(n)}function u_(n,l){if(n==null)return{};var s=d_(n,l),o,u;if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(n);for(u=0;u<h.length;u++)o=h[u],!(l.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(s[o]=n[o])}return s}function d_(n,l){if(n==null)return{};var s={},o=Object.keys(n),u,h;for(h=0;h<o.length;h++)u=o[h],!(l.indexOf(u)>=0)&&(s[u]=n[u]);return s}function f_(n,l,s,o,u){var h={},f=h.schema,p=u_(h,l_);return y2(n,l,s,Pg(Pg({},p),{},{sheets:[1]})).then(function(g){var m=g[0].data;return f?I2(m,f):m})}function h_(n,l,s){return Nw(n).then(function(o){return f_(jj,kj,o)})}function p_({existingCases:n,sourceUrl:l,onImport:s,onClose:o}){const[u,h]=I.useState(""),[f,p]=I.useState([]),[g,m]=I.useState(""),[j,b]=I.useState(!1);async function S(y){if(!(!y||j)){b(!0),m(""),h(y.name);try{const O=await m_(y),N=v_(O,n,l);if(!N.length)throw new Error("No valid Test Cases were found. Check that the file contains TC_ID or Title.");p(N)}catch(O){p([]),m(O instanceof Error?O.message:"Could not read the file.")}finally{b(!1)}}}return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:y=>y.target===y.currentTarget&&o(),children:r.jsxs("section",{className:"modern-modal import-testcase-modal",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Import Test Cases"}),r.jsx("h2",{children:"Bring an existing suite into LazyScout"}),r.jsx("p",{children:"CSV, XLSX and JSON are supported. Fields are mapped automatically."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:o,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"import-testcase-body",children:[r.jsxs("label",{className:"upload-dropzone",children:[r.jsx("input",{type:"file",accept:".csv,.xlsx,.json",onChange:y=>{S(y.target.files?.[0])}}),r.jsx("strong",{children:j?"Reading file…":u||"Choose a CSV, XLSX or JSON file"}),r.jsx("span",{children:"Expected fields: TC_ID, Title, Module, Folder, Tags, Requirements, Steps and Expected Result"})]}),g&&r.jsx("p",{className:"import-error",children:g}),f.length>0&&r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"import-summary",children:[r.jsxs("b",{children:[f.length," Test Cases ready to import"]}),r.jsx("span",{children:"Duplicate IDs are replaced with a new TC-IMPORT ID."})]}),r.jsxs("div",{className:"import-preview",children:[r.jsxs("table",{children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"TC ID"}),r.jsx("th",{children:"Folder"}),r.jsx("th",{children:"Title"}),r.jsx("th",{children:"Tags"}),r.jsx("th",{children:"Requirements"})]})}),r.jsx("tbody",{children:f.slice(0,10).map(y=>r.jsxs("tr",{children:[r.jsx("td",{children:y.id}),r.jsx("td",{children:y.folder??y.module}),r.jsx("td",{children:y.title}),r.jsx("td",{children:(y.tags??[]).join(", ")||"—"}),r.jsx("td",{children:(y.requirements??[]).join(", ")||"—"})]},y.id))})]}),f.length>10&&r.jsxs("p",{children:["Previewing 10 of ",f.length," Test Cases."]})]})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Cancel"}),r.jsxs("button",{type:"button",className:"btn btn-primary",disabled:!f.length,onClick:()=>{s(f),o()},children:["Import ",f.length||""," Test Cases"]})]})]})})}async function m_(n){const l=n.name.split(".").pop()?.toLowerCase();if(l==="json"){const s=JSON.parse(await n.text());return(Array.isArray(s)?s:s&&typeof s=="object"&&Array.isArray(s.testCases)?s.testCases:[]).filter(u=>!!u&&typeof u=="object")}if(l==="csv")return Zg(g_(await n.text()));if(l==="xlsx")return Zg(await h_(n));throw new Error("Supported formats are CSV, XLSX and JSON.")}function Zg(n){const[l,...s]=n;if(!l)return[];const o=l.map(u=>String(u??"").trim());return s.filter(u=>u.some(h=>h!=null&&String(h).trim())).map(u=>Object.fromEntries(o.map((h,f)=>[h||`Column_${f+1}`,u[f]??""])))}function g_(n){const l=[];let s=[],o="",u=!1;const h=n.replace(/^\uFEFF/,"");for(let f=0;f<h.length;f++){const p=h[f];p==='"'?u&&h[f+1]==='"'?(o+='"',f++):u=!u:p===","&&!u?(s.push(o),o=""):(p===`
|
|
51
|
+
`||p==="\r")&&!u?(p==="\r"&&h[f+1]===`
|
|
52
|
+
`&&f++,s.push(o),s.some(g=>g.trim())&&l.push(s),s=[],o=""):o+=p}if(s.push(o),s.some(f=>f.trim())&&l.push(s),u)throw new Error("CSV contains an unclosed quoted value.");return l}function v_(n,l,s){const o=new Set(l.map(f=>f.id));let u=1;const h=()=>{let f=`TC-IMPORT-${String(u).padStart(3,"0")}`;for(;o.has(f);)f=`TC-IMPORT-${String(++u).padStart(3,"0")}`;return o.add(f),u++,f};return n.map(f=>{const p=zn(f,"TC_ID","ID","TEST_CASE_ID"),g=zn(f,"TITLE","TEST_CASE","NAME");if(!g&&!p)return null;const m=!p||o.has(p)?h():p;o.add(m);const j=zn(f,"MODULE")||"IMPORTED",b=Zs(f,"TEST_STEPS","STEPS").map(S=>({type:"manual",description:S}));return{id:m,module:j,folder:zn(f,"FOLDER")||j,tags:Zs(f,"TAGS","TAG"),requirements:Zs(f,"REQUIREMENTS","REQUIREMENT","TICKET","TICKETS"),title:g||m,preconditions:Zs(f,"PRECONDITIONS","PRECONDITION"),steps:b.length?b:[{type:"manual",description:"Review imported steps"}],expectedResult:zn(f,"EXPECTED_RESULT","EXPECTED RESULT","EXPECTED")||"Review expected result",type:y_(zn(f,"TYPE")),priority:b_(zn(f,"PRIORITY")),automationStatus:x_(zn(f,"AUTOMATION_STATUS","AUTOMATION")),sourceUrl:zn(f,"SOURCE_URL","SOURCE URL","URL")||s||"Imported file",notes:zn(f,"NOTES","NOTE")||"Imported into LazyScout"}}).filter(f=>!!f)}function Xg(n){return n.toUpperCase().replace(/[^A-Z0-9]/g,"")}function zn(n,...l){const s=new Map(Object.entries(n).map(([o,u])=>[Xg(o),String(u??"").trim()]));for(const o of l){const u=s.get(Xg(o));if(u)return u}return""}function Zs(n,...l){return zn(n,...l).split(/[\n,;|]/).map(s=>s.replace(/^\s*\d+[.)-]?\s*/,"").trim()).filter(Boolean)}function y_(n){return n.toLowerCase()==="negative"?"negative":n.toLowerCase()==="validation"?"validation":"positive"}function b_(n){return n.toLowerCase()==="high"?"high":n.toLowerCase()==="low"?"low":"medium"}function x_(n){return["ready","needs-data","needs-review","manual"].includes(n)?n:"needs-review"}function S_(n){return n?new Intl.DateTimeFormat(void 0,{dateStyle:"medium"}).format(new Date(n)):"Published on npm"}function j_({compact:n=!1}){const[l,s]=I.useState(),[o,u]=I.useState(!0),[h,f]=I.useState(),[p,g]=I.useState(),[m,j]=I.useState(),[b,S]=I.useState(),[y,O]=I.useState();async function N(){u(!0),f(void 0);try{s(await h0())}catch(C){f(C instanceof Error?C.message:"Could not check npm versions.")}finally{u(!1)}}I.useEffect(()=>{N()},[]);async function w(C){await navigator.clipboard.writeText(`npm install -g lazyscout@${C}`),O(C),window.setTimeout(()=>O(A=>A===C?void 0:A),1600)}async function _(C){j(C),g(void 0),S(void 0),f(void 0);try{S(await p0(C))}catch(A){f(A instanceof hr&&A.hint?`${A.message} ${A.hint}`:A instanceof Error?A.message:"Could not install this version.")}finally{j(void 0)}}return r.jsxs("section",{className:`version-center ${n?"is-compact":""}`,children:[r.jsxs("header",{className:"version-center-head",children:[r.jsx("div",{className:"version-center-icon",children:"V"}),r.jsxs("div",{children:[r.jsx("span",{className:"eyebrow",children:"Version Center"}),r.jsx("h3",{children:n?"LazyScout version":"Choose your LazyScout version"}),!n&&r.jsx("p",{children:"Install the latest release or switch to an earlier published version before opening a workspace."})]}),r.jsx("button",{type:"button",className:"version-refresh",onClick:()=>{N()},disabled:o,children:o?"Checking…":"Check again"})]}),o&&!l?r.jsxs("div",{className:"version-loading",children:[r.jsx("span",{className:"scout-spinner"})," Checking npm Registry…"]}):l?r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"version-summary",children:[r.jsxs("div",{children:[r.jsx("small",{children:"Running now"}),r.jsxs("strong",{children:["v",l.currentVersion]})]}),r.jsx("span",{className:"version-summary-arrow",children:"→"}),r.jsxs("div",{children:[r.jsx("small",{children:"Latest release"}),r.jsx("strong",{children:l.latestVersion?`v${l.latestVersion}`:"Unavailable"})]}),r.jsx("span",{className:`version-state ${l.updateAvailable?"has-update":""}`,children:l.updateAvailable?"Update available":"Up to date"})]}),!n&&r.jsx("div",{className:"version-list","aria-label":"Published LazyScout versions",children:l.versions.slice(0,3).map(C=>{const A=C.version===l.currentVersion,H=C.version===p,D=C.version===m;return r.jsxs("div",{className:`version-row ${A?"is-current":""}`,children:[r.jsxs("div",{className:"version-number",children:[r.jsxs("span",{children:["v",C.version]}),r.jsx("small",{children:S_(C.publishedAt)})]}),r.jsxs("div",{className:"version-tags",children:[C.tags.map(K=>r.jsx("span",{children:K},K)),A&&r.jsx("span",{className:"current",children:"running"})]}),r.jsx("button",{type:"button",className:"btn btn-secondary version-copy",onClick:()=>{w(C.version)},children:y===C.version?"Copied":"Copy command"}),r.jsx("button",{type:"button",className:"btn btn-primary version-install",disabled:A||!!m,onClick:()=>g(H?void 0:C.version),children:A?"Current":D?"Installing…":"Install"}),H&&r.jsxs("div",{className:"version-confirm",children:[r.jsxs("span",{children:["Install ",r.jsxs("b",{children:["v",C.version]})," globally? Restart LazyScout after installation to use it."]}),r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>g(void 0),children:"Cancel"}),r.jsxs("button",{type:"button",className:"btn btn-primary",onClick:()=>{_(C.version)},children:["Install v",C.version]})]})]},C.version)})})]}):null,l&&!l.registryAvailable&&r.jsxs("div",{className:"version-message warning",children:["npm Registry is unavailable. ",l.error]}),h&&r.jsx("div",{className:"version-message error",children:h}),b&&r.jsxs("div",{className:"version-message success",children:[r.jsxs("b",{children:["LazyScout v",b.installedVersion," installed."]}),r.jsx("span",{children:"Close the current LazyScout terminal and run `lazyscout` again to switch versions."})]})]})}function w_({projects:n,onScout:l,onEmpty:s,onSample:o,onOpenProject:u,onClose:h}){const{language:f}=Cn(),p=f==="th",[g,m]=I.useState(""),[j,b]=I.useState(n[0]?.id??""),S=g.trim()||"Untitled Test Suite";return r.jsx("div",{className:"modern-modal-backdrop",onMouseDown:y=>y.target===y.currentTarget&&h(),children:r.jsxs("section",{className:"modern-modal new-project-modal",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:p?"โปรเจกต์ใหม่":"New Project"}),r.jsx("h2",{children:p?"เริ่ม QA workspace":"Start a QA workspace"}),r.jsx("p",{children:p?"เลือก Scout เว็บไซต์ สร้างโปรเจกต์ตัวอย่าง หรือนำเข้า Test Case เดิม":"Choose whether to scout a website now or import an existing Test Case suite."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:h,"aria-label":"Close",children:"×"})]}),r.jsxs("div",{className:"new-project-modal-body",children:[r.jsx(j_,{compact:!0}),r.jsxs("label",{children:[r.jsx("span",{children:p?"ชื่อโปรเจกต์":"Project name"}),r.jsx("input",{className:"field",value:g,onChange:y=>m(y.target.value),placeholder:"Example: Storefront regression",autoFocus:!0})]}),r.jsxs("div",{className:"new-project-choices",children:[r.jsxs("button",{type:"button",onClick:()=>l(S),children:[r.jsx("span",{className:"new-project-choice-icon scout",children:"◉"}),r.jsxs("span",{children:[r.jsx("b",{children:p?"Scout เว็บไซต์":"Scout a website"}),r.jsx("small",{children:p?"ใส่ URL แล้วให้ Playwright ค้นหาหน้าและสร้าง Test Case ชุดแรก":"Enter a URL, then let Playwright discover pages and create a first Test Case suite."})]}),r.jsx("em",{children:"→"})]}),r.jsxs("button",{type:"button",onClick:o,children:[r.jsx("span",{className:"new-project-choice-icon sample",children:"✦"}),r.jsxs("span",{children:[r.jsx("b",{children:p?"ลองโปรเจกต์ตัวอย่าง":"Try a sample project"}),r.jsx("small",{children:p?"ทดลอง Login จริงบน Practice Test Automation พร้อม Test Case ที่รันได้ทันที":"Run a ready-made login suite against Practice Test Automation immediately."})]}),r.jsx("em",{children:"→"})]}),n.length?r.jsxs("div",{className:"existing-project-choice",children:[r.jsx("span",{className:"new-project-choice-icon empty",children:"↗"}),r.jsxs("div",{children:[r.jsx("b",{children:p?"เปิดโปรเจกต์เดิม":"Open existing project"}),r.jsx("small",{children:p?"ทำงานต่อจาก Local workspace":"Continue a local workspace."}),r.jsx("select",{className:"field",value:j,onChange:y=>b(y.target.value),children:n.map(y=>r.jsx("option",{value:y.id,children:y.name},y.id))})]})]}):r.jsxs("button",{type:"button",onClick:()=>s(S),children:[r.jsx("span",{className:"new-project-choice-icon empty",children:"⇧"}),r.jsxs("span",{children:[r.jsx("b",{children:p?"โปรเจกต์เปล่า":"Empty project"}),r.jsx("small",{children:p?"สร้างชุดเปล่าสำหรับนำเข้า CSV, XLSX หรือ JSON และเพิ่ม Test Case เองได้":"Create a blank suite for CSV, XLSX, or JSON import. You can add Test Cases manually too."})]}),r.jsx("em",{children:"→"})]})]})]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:h,children:p?"ยกเลิก":"Cancel"}),n.length>0&&r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!j,onClick:()=>j&&u(j),children:p?"เปิดโปรเจกต์":"Open project"})]})]})})}var pd={exports:{}};var Kg;function __(){return Kg||(Kg=1,(function(n,l){(function(s){n.exports=s()})(function(){return(function s(o,u,h){function f(m,j){if(!u[m]){if(!o[m]){var b=typeof ol=="function"&&ol;if(!j&&b)return b(m,!0);if(p)return p(m,!0);var S=new Error("Cannot find module '"+m+"'");throw S.code="MODULE_NOT_FOUND",S}var y=u[m]={exports:{}};o[m][0].call(y.exports,function(O){var N=o[m][1][O];return f(N||O)},y,y.exports,s,o,u,h)}return u[m].exports}for(var p=typeof ol=="function"&&ol,g=0;g<h.length;g++)f(h[g]);return f})({1:[function(s,o,u){var h=s("./utils"),f=s("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";u.encode=function(g){for(var m,j,b,S,y,O,N,w=[],_=0,C=g.length,A=C,H=h.getTypeOf(g)!=="string";_<g.length;)A=C-_,b=H?(m=g[_++],j=_<C?g[_++]:0,_<C?g[_++]:0):(m=g.charCodeAt(_++),j=_<C?g.charCodeAt(_++):0,_<C?g.charCodeAt(_++):0),S=m>>2,y=(3&m)<<4|j>>4,O=1<A?(15&j)<<2|b>>6:64,N=2<A?63&b:64,w.push(p.charAt(S)+p.charAt(y)+p.charAt(O)+p.charAt(N));return w.join("")},u.decode=function(g){var m,j,b,S,y,O,N=0,w=0,_="data:";if(g.substr(0,_.length)===_)throw new Error("Invalid base64 input, it looks like a data url.");var C,A=3*(g=g.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(g.charAt(g.length-1)===p.charAt(64)&&A--,g.charAt(g.length-2)===p.charAt(64)&&A--,A%1!=0)throw new Error("Invalid base64 input, bad content length.");for(C=f.uint8array?new Uint8Array(0|A):new Array(0|A);N<g.length;)m=p.indexOf(g.charAt(N++))<<2|(S=p.indexOf(g.charAt(N++)))>>4,j=(15&S)<<4|(y=p.indexOf(g.charAt(N++)))>>2,b=(3&y)<<6|(O=p.indexOf(g.charAt(N++))),C[w++]=m,y!==64&&(C[w++]=j),O!==64&&(C[w++]=b);return C}},{"./support":30,"./utils":32}],2:[function(s,o,u){var h=s("./external"),f=s("./stream/DataWorker"),p=s("./stream/Crc32Probe"),g=s("./stream/DataLengthProbe");function m(j,b,S,y,O){this.compressedSize=j,this.uncompressedSize=b,this.crc32=S,this.compression=y,this.compressedContent=O}m.prototype={getContentWorker:function(){var j=new f(h.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new g("data_length")),b=this;return j.on("end",function(){if(this.streamInfo.data_length!==b.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),j},getCompressedWorker:function(){return new f(h.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},m.createWorkerFrom=function(j,b,S){return j.pipe(new p).pipe(new g("uncompressedSize")).pipe(b.compressWorker(S)).pipe(new g("compressedSize")).withStreamInfo("compression",b)},o.exports=m},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(s,o,u){var h=s("./stream/GenericWorker");u.STORE={magic:"\0\0",compressWorker:function(){return new h("STORE compression")},uncompressWorker:function(){return new h("STORE decompression")}},u.DEFLATE=s("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(s,o,u){var h=s("./utils"),f=(function(){for(var p,g=[],m=0;m<256;m++){p=m;for(var j=0;j<8;j++)p=1&p?3988292384^p>>>1:p>>>1;g[m]=p}return g})();o.exports=function(p,g){return p!==void 0&&p.length?h.getTypeOf(p)!=="string"?(function(m,j,b,S){var y=f,O=S+b;m^=-1;for(var N=S;N<O;N++)m=m>>>8^y[255&(m^j[N])];return-1^m})(0|g,p,p.length,0):(function(m,j,b,S){var y=f,O=S+b;m^=-1;for(var N=S;N<O;N++)m=m>>>8^y[255&(m^j.charCodeAt(N))];return-1^m})(0|g,p,p.length,0):0}},{"./utils":32}],5:[function(s,o,u){u.base64=!1,u.binary=!1,u.dir=!1,u.createFolders=!0,u.date=null,u.compression=null,u.compressionOptions=null,u.comment=null,u.unixPermissions=null,u.dosPermissions=null},{}],6:[function(s,o,u){var h=null;h=typeof Promise<"u"?Promise:s("lie"),o.exports={Promise:h}},{lie:37}],7:[function(s,o,u){var h=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",f=s("pako"),p=s("./utils"),g=s("./stream/GenericWorker"),m=h?"uint8array":"array";function j(b,S){g.call(this,"FlateWorker/"+b),this._pako=null,this._pakoAction=b,this._pakoOptions=S,this.meta={}}u.magic="\b\0",p.inherits(j,g),j.prototype.processChunk=function(b){this.meta=b.meta,this._pako===null&&this._createPako(),this._pako.push(p.transformTo(m,b.data),!1)},j.prototype.flush=function(){g.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},j.prototype.cleanUp=function(){g.prototype.cleanUp.call(this),this._pako=null},j.prototype._createPako=function(){this._pako=new f[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var b=this;this._pako.onData=function(S){b.push({data:S,meta:b.meta})}},u.compressWorker=function(b){return new j("Deflate",b)},u.uncompressWorker=function(){return new j("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(s,o,u){function h(y,O){var N,w="";for(N=0;N<O;N++)w+=String.fromCharCode(255&y),y>>>=8;return w}function f(y,O,N,w,_,C){var A,H,D=y.file,K=y.compression,G=C!==m.utf8encode,ae=p.transformTo("string",C(D.name)),B=p.transformTo("string",m.utf8encode(D.name)),F=D.comment,te=p.transformTo("string",C(F)),M=p.transformTo("string",m.utf8encode(F)),q=B.length!==D.name.length,E=M.length!==F.length,Z="",Y="",P="",X=D.dir,k=D.date,V={crc32:0,compressedSize:0,uncompressedSize:0};O&&!N||(V.crc32=y.crc32,V.compressedSize=y.compressedSize,V.uncompressedSize=y.uncompressedSize);var v=0;O&&(v|=8),G||!q&&!E||(v|=2048);var R=0,$=0;X&&(R|=16),_==="UNIX"?($=798,R|=(function(le,ve){var Ne=le;return le||(Ne=ve?16893:33204),(65535&Ne)<<16})(D.unixPermissions,X)):($=20,R|=(function(le){return 63&(le||0)})(D.dosPermissions)),A=k.getUTCHours(),A<<=6,A|=k.getUTCMinutes(),A<<=5,A|=k.getUTCSeconds()/2,H=k.getUTCFullYear()-1980,H<<=4,H|=k.getUTCMonth()+1,H<<=5,H|=k.getUTCDate(),q&&(Y=h(1,1)+h(j(ae),4)+B,Z+="up"+h(Y.length,2)+Y),E&&(P=h(1,1)+h(j(te),4)+M,Z+="uc"+h(P.length,2)+P);var W="";return W+=`
|
|
53
|
+
\0`,W+=h(v,2),W+=K.magic,W+=h(A,2),W+=h(H,2),W+=h(V.crc32,4),W+=h(V.compressedSize,4),W+=h(V.uncompressedSize,4),W+=h(ae.length,2),W+=h(Z.length,2),{fileRecord:b.LOCAL_FILE_HEADER+W+ae+Z,dirRecord:b.CENTRAL_FILE_HEADER+h($,2)+W+h(te.length,2)+"\0\0\0\0"+h(R,4)+h(w,4)+ae+Z+te}}var p=s("../utils"),g=s("../stream/GenericWorker"),m=s("../utf8"),j=s("../crc32"),b=s("../signature");function S(y,O,N,w){g.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=O,this.zipPlatform=N,this.encodeFileName=w,this.streamFiles=y,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}p.inherits(S,g),S.prototype.push=function(y){var O=y.meta.percent||0,N=this.entriesCount,w=this._sources.length;this.accumulate?this.contentBuffer.push(y):(this.bytesWritten+=y.data.length,g.prototype.push.call(this,{data:y.data,meta:{currentFile:this.currentFile,percent:N?(O+100*(N-w-1))/N:100}}))},S.prototype.openedSource=function(y){this.currentSourceOffset=this.bytesWritten,this.currentFile=y.file.name;var O=this.streamFiles&&!y.file.dir;if(O){var N=f(y,O,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:N.fileRecord,meta:{percent:0}})}else this.accumulate=!0},S.prototype.closedSource=function(y){this.accumulate=!1;var O=this.streamFiles&&!y.file.dir,N=f(y,O,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(N.dirRecord),O)this.push({data:(function(w){return b.DATA_DESCRIPTOR+h(w.crc32,4)+h(w.compressedSize,4)+h(w.uncompressedSize,4)})(y),meta:{percent:100}});else for(this.push({data:N.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},S.prototype.flush=function(){for(var y=this.bytesWritten,O=0;O<this.dirRecords.length;O++)this.push({data:this.dirRecords[O],meta:{percent:100}});var N=this.bytesWritten-y,w=(function(_,C,A,H,D){var K=p.transformTo("string",D(H));return b.CENTRAL_DIRECTORY_END+"\0\0\0\0"+h(_,2)+h(_,2)+h(C,4)+h(A,4)+h(K.length,2)+K})(this.dirRecords.length,N,y,this.zipComment,this.encodeFileName);this.push({data:w,meta:{percent:100}})},S.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},S.prototype.registerPrevious=function(y){this._sources.push(y);var O=this;return y.on("data",function(N){O.processChunk(N)}),y.on("end",function(){O.closedSource(O.previous.streamInfo),O._sources.length?O.prepareNextSource():O.end()}),y.on("error",function(N){O.error(N)}),this},S.prototype.resume=function(){return!!g.prototype.resume.call(this)&&(!this.previous&&this._sources.length?(this.prepareNextSource(),!0):this.previous||this._sources.length||this.generatedError?void 0:(this.end(),!0))},S.prototype.error=function(y){var O=this._sources;if(!g.prototype.error.call(this,y))return!1;for(var N=0;N<O.length;N++)try{O[N].error(y)}catch{}return!0},S.prototype.lock=function(){g.prototype.lock.call(this);for(var y=this._sources,O=0;O<y.length;O++)y[O].lock()},o.exports=S},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(s,o,u){var h=s("../compressions"),f=s("./ZipFileWorker");u.generateWorker=function(p,g,m){var j=new f(g.streamFiles,m,g.platform,g.encodeFileName),b=0;try{p.forEach(function(S,y){b++;var O=(function(C,A){var H=C||A,D=h[H];if(!D)throw new Error(H+" is not a valid compression method !");return D})(y.options.compression,g.compression),N=y.options.compressionOptions||g.compressionOptions||{},w=y.dir,_=y.date;y._compressWorker(O,N).withStreamInfo("file",{name:S,dir:w,date:_,comment:y.comment||"",unixPermissions:y.unixPermissions,dosPermissions:y.dosPermissions}).pipe(j)}),j.entriesCount=b}catch(S){j.error(S)}return j}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(s,o,u){function h(){if(!(this instanceof h))return new h;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files=Object.create(null),this.comment=null,this.root="",this.clone=function(){var f=new h;for(var p in this)typeof this[p]!="function"&&(f[p]=this[p]);return f}}(h.prototype=s("./object")).loadAsync=s("./load"),h.support=s("./support"),h.defaults=s("./defaults"),h.version="3.10.1",h.loadAsync=function(f,p){return new h().loadAsync(f,p)},h.external=s("./external"),o.exports=h},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(s,o,u){var h=s("./utils"),f=s("./external"),p=s("./utf8"),g=s("./zipEntries"),m=s("./stream/Crc32Probe"),j=s("./nodejsUtils");function b(S){return new f.Promise(function(y,O){var N=S.decompressed.getContentWorker().pipe(new m);N.on("error",function(w){O(w)}).on("end",function(){N.streamInfo.crc32!==S.decompressed.crc32?O(new Error("Corrupted zip : CRC32 mismatch")):y()}).resume()})}o.exports=function(S,y){var O=this;return y=h.extend(y||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:p.utf8decode}),j.isNode&&j.isStream(S)?f.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):h.prepareContent("the loaded zip file",S,!0,y.optimizedBinaryString,y.base64).then(function(N){var w=new g(y);return w.load(N),w}).then(function(N){var w=[f.Promise.resolve(N)],_=N.files;if(y.checkCRC32)for(var C=0;C<_.length;C++)w.push(b(_[C]));return f.Promise.all(w)}).then(function(N){for(var w=N.shift(),_=w.files,C=0;C<_.length;C++){var A=_[C],H=A.fileNameStr,D=h.resolve(A.fileNameStr);O.file(D,A.decompressed,{binary:!0,optimizedBinaryString:!0,date:A.date,dir:A.dir,comment:A.fileCommentStr.length?A.fileCommentStr:null,unixPermissions:A.unixPermissions,dosPermissions:A.dosPermissions,createFolders:y.createFolders}),A.dir||(O.file(D).unsafeOriginalName=H)}return w.zipComment.length&&(O.comment=w.zipComment),O})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(s,o,u){var h=s("../utils"),f=s("../stream/GenericWorker");function p(g,m){f.call(this,"Nodejs stream input adapter for "+g),this._upstreamEnded=!1,this._bindStream(m)}h.inherits(p,f),p.prototype._bindStream=function(g){var m=this;(this._stream=g).pause(),g.on("data",function(j){m.push({data:j,meta:{percent:0}})}).on("error",function(j){m.isPaused?this.generatedError=j:m.error(j)}).on("end",function(){m.isPaused?m._upstreamEnded=!0:m.end()})},p.prototype.pause=function(){return!!f.prototype.pause.call(this)&&(this._stream.pause(),!0)},p.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(this._upstreamEnded?this.end():this._stream.resume(),!0)},o.exports=p},{"../stream/GenericWorker":28,"../utils":32}],13:[function(s,o,u){var h=s("readable-stream").Readable;function f(p,g,m){h.call(this,g),this._helper=p;var j=this;p.on("data",function(b,S){j.push(b)||j._helper.pause(),m&&m(S)}).on("error",function(b){j.emit("error",b)}).on("end",function(){j.push(null)})}s("../utils").inherits(f,h),f.prototype._read=function(){this._helper.resume()},o.exports=f},{"../utils":32,"readable-stream":16}],14:[function(s,o,u){o.exports={isNode:typeof Buffer<"u",newBufferFrom:function(h,f){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(h,f);if(typeof h=="number")throw new Error('The "data" argument must not be a number');return new Buffer(h,f)},allocBuffer:function(h){if(Buffer.alloc)return Buffer.alloc(h);var f=new Buffer(h);return f.fill(0),f},isBuffer:function(h){return Buffer.isBuffer(h)},isStream:function(h){return h&&typeof h.on=="function"&&typeof h.pause=="function"&&typeof h.resume=="function"}}},{}],15:[function(s,o,u){function h(D,K,G){var ae,B=p.getTypeOf(K),F=p.extend(G||{},j);F.date=F.date||new Date,F.compression!==null&&(F.compression=F.compression.toUpperCase()),typeof F.unixPermissions=="string"&&(F.unixPermissions=parseInt(F.unixPermissions,8)),F.unixPermissions&&16384&F.unixPermissions&&(F.dir=!0),F.dosPermissions&&16&F.dosPermissions&&(F.dir=!0),F.dir&&(D=_(D)),F.createFolders&&(ae=w(D))&&C.call(this,ae,!0);var te=B==="string"&&F.binary===!1&&F.base64===!1;G&&G.binary!==void 0||(F.binary=!te),(K instanceof b&&K.uncompressedSize===0||F.dir||!K||K.length===0)&&(F.base64=!1,F.binary=!0,K="",F.compression="STORE",B="string");var M=null;M=K instanceof b||K instanceof g?K:O.isNode&&O.isStream(K)?new N(D,K):p.prepareContent(D,K,F.binary,F.optimizedBinaryString,F.base64);var q=new S(D,M,F);this.files[D]=q}var f=s("./utf8"),p=s("./utils"),g=s("./stream/GenericWorker"),m=s("./stream/StreamHelper"),j=s("./defaults"),b=s("./compressedObject"),S=s("./zipObject"),y=s("./generate"),O=s("./nodejsUtils"),N=s("./nodejs/NodejsStreamInputAdapter"),w=function(D){D.slice(-1)==="/"&&(D=D.substring(0,D.length-1));var K=D.lastIndexOf("/");return 0<K?D.substring(0,K):""},_=function(D){return D.slice(-1)!=="/"&&(D+="/"),D},C=function(D,K){return K=K!==void 0?K:j.createFolders,D=_(D),this.files[D]||h.call(this,D,null,{dir:!0,createFolders:K}),this.files[D]};function A(D){return Object.prototype.toString.call(D)==="[object RegExp]"}var H={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(D){var K,G,ae;for(K in this.files)ae=this.files[K],(G=K.slice(this.root.length,K.length))&&K.slice(0,this.root.length)===this.root&&D(G,ae)},filter:function(D){var K=[];return this.forEach(function(G,ae){D(G,ae)&&K.push(ae)}),K},file:function(D,K,G){if(arguments.length!==1)return D=this.root+D,h.call(this,D,K,G),this;if(A(D)){var ae=D;return this.filter(function(F,te){return!te.dir&&ae.test(F)})}var B=this.files[this.root+D];return B&&!B.dir?B:null},folder:function(D){if(!D)return this;if(A(D))return this.filter(function(B,F){return F.dir&&D.test(B)});var K=this.root+D,G=C.call(this,K),ae=this.clone();return ae.root=G.name,ae},remove:function(D){D=this.root+D;var K=this.files[D];if(K||(D.slice(-1)!=="/"&&(D+="/"),K=this.files[D]),K&&!K.dir)delete this.files[D];else for(var G=this.filter(function(B,F){return F.name.slice(0,D.length)===D}),ae=0;ae<G.length;ae++)delete this.files[G[ae].name];return this},generate:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},generateInternalStream:function(D){var K,G={};try{if((G=p.extend(D||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:f.utf8encode})).type=G.type.toLowerCase(),G.compression=G.compression.toUpperCase(),G.type==="binarystring"&&(G.type="string"),!G.type)throw new Error("No output type specified.");p.checkSupport(G.type),G.platform!=="darwin"&&G.platform!=="freebsd"&&G.platform!=="linux"&&G.platform!=="sunos"||(G.platform="UNIX"),G.platform==="win32"&&(G.platform="DOS");var ae=G.comment||this.comment||"";K=y.generateWorker(this,G,ae)}catch(B){(K=new g("error")).error(B)}return new m(K,G.type||"string",G.mimeType)},generateAsync:function(D,K){return this.generateInternalStream(D).accumulate(K)},generateNodeStream:function(D,K){return(D=D||{}).type||(D.type="nodebuffer"),this.generateInternalStream(D).toNodejsStream(K)}};o.exports=H},{"./compressedObject":2,"./defaults":5,"./generate":9,"./nodejs/NodejsStreamInputAdapter":12,"./nodejsUtils":14,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31,"./utils":32,"./zipObject":35}],16:[function(s,o,u){o.exports=s("stream")},{stream:void 0}],17:[function(s,o,u){var h=s("./DataReader");function f(p){h.call(this,p);for(var g=0;g<this.data.length;g++)p[g]=255&p[g]}s("../utils").inherits(f,h),f.prototype.byteAt=function(p){return this.data[this.zero+p]},f.prototype.lastIndexOfSignature=function(p){for(var g=p.charCodeAt(0),m=p.charCodeAt(1),j=p.charCodeAt(2),b=p.charCodeAt(3),S=this.length-4;0<=S;--S)if(this.data[S]===g&&this.data[S+1]===m&&this.data[S+2]===j&&this.data[S+3]===b)return S-this.zero;return-1},f.prototype.readAndCheckSignature=function(p){var g=p.charCodeAt(0),m=p.charCodeAt(1),j=p.charCodeAt(2),b=p.charCodeAt(3),S=this.readData(4);return g===S[0]&&m===S[1]&&j===S[2]&&b===S[3]},f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return[];var g=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,g},o.exports=f},{"../utils":32,"./DataReader":18}],18:[function(s,o,u){var h=s("../utils");function f(p){this.data=p,this.length=p.length,this.index=0,this.zero=0}f.prototype={checkOffset:function(p){this.checkIndex(this.index+p)},checkIndex:function(p){if(this.length<this.zero+p||p<0)throw new Error("End of data reached (data length = "+this.length+", asked index = "+p+"). Corrupted zip ?")},setIndex:function(p){this.checkIndex(p),this.index=p},skip:function(p){this.setIndex(this.index+p)},byteAt:function(){},readInt:function(p){var g,m=0;for(this.checkOffset(p),g=this.index+p-1;g>=this.index;g--)m=(m<<8)+this.byteAt(g);return this.index+=p,m},readString:function(p){return h.transformTo("string",this.readData(p))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var p=this.readInt(4);return new Date(Date.UTC(1980+(p>>25&127),(p>>21&15)-1,p>>16&31,p>>11&31,p>>5&63,(31&p)<<1))}},o.exports=f},{"../utils":32}],19:[function(s,o,u){var h=s("./Uint8ArrayReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),f.prototype.readData=function(p){this.checkOffset(p);var g=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,g},o.exports=f},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(s,o,u){var h=s("./DataReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),f.prototype.byteAt=function(p){return this.data.charCodeAt(this.zero+p)},f.prototype.lastIndexOfSignature=function(p){return this.data.lastIndexOf(p)-this.zero},f.prototype.readAndCheckSignature=function(p){return p===this.readData(4)},f.prototype.readData=function(p){this.checkOffset(p);var g=this.data.slice(this.zero+this.index,this.zero+this.index+p);return this.index+=p,g},o.exports=f},{"../utils":32,"./DataReader":18}],21:[function(s,o,u){var h=s("./ArrayReader");function f(p){h.call(this,p)}s("../utils").inherits(f,h),f.prototype.readData=function(p){if(this.checkOffset(p),p===0)return new Uint8Array(0);var g=this.data.subarray(this.zero+this.index,this.zero+this.index+p);return this.index+=p,g},o.exports=f},{"../utils":32,"./ArrayReader":17}],22:[function(s,o,u){var h=s("../utils"),f=s("../support"),p=s("./ArrayReader"),g=s("./StringReader"),m=s("./NodeBufferReader"),j=s("./Uint8ArrayReader");o.exports=function(b){var S=h.getTypeOf(b);return h.checkSupport(S),S!=="string"||f.uint8array?S==="nodebuffer"?new m(b):f.uint8array?new j(h.transformTo("uint8array",b)):new p(h.transformTo("array",b)):new g(b)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(s,o,u){u.LOCAL_FILE_HEADER="PK",u.CENTRAL_FILE_HEADER="PK",u.CENTRAL_DIRECTORY_END="PK",u.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",u.ZIP64_CENTRAL_DIRECTORY_END="PK",u.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(s,o,u){var h=s("./GenericWorker"),f=s("../utils");function p(g){h.call(this,"ConvertWorker to "+g),this.destType=g}f.inherits(p,h),p.prototype.processChunk=function(g){this.push({data:f.transformTo(this.destType,g.data),meta:g.meta})},o.exports=p},{"../utils":32,"./GenericWorker":28}],25:[function(s,o,u){var h=s("./GenericWorker"),f=s("../crc32");function p(){h.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}s("../utils").inherits(p,h),p.prototype.processChunk=function(g){this.streamInfo.crc32=f(g.data,this.streamInfo.crc32||0),this.push(g)},o.exports=p},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(s,o,u){var h=s("../utils"),f=s("./GenericWorker");function p(g){f.call(this,"DataLengthProbe for "+g),this.propName=g,this.withStreamInfo(g,0)}h.inherits(p,f),p.prototype.processChunk=function(g){if(g){var m=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=m+g.data.length}f.prototype.processChunk.call(this,g)},o.exports=p},{"../utils":32,"./GenericWorker":28}],27:[function(s,o,u){var h=s("../utils"),f=s("./GenericWorker");function p(g){f.call(this,"DataWorker");var m=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,g.then(function(j){m.dataIsReady=!0,m.data=j,m.max=j&&j.length||0,m.type=h.getTypeOf(j),m.isPaused||m._tickAndRepeat()},function(j){m.error(j)})}h.inherits(p,f),p.prototype.cleanUp=function(){f.prototype.cleanUp.call(this),this.data=null},p.prototype.resume=function(){return!!f.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,h.delay(this._tickAndRepeat,[],this)),!0)},p.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(h.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},p.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var g=null,m=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":g=this.data.substring(this.index,m);break;case"uint8array":g=this.data.subarray(this.index,m);break;case"array":case"nodebuffer":g=this.data.slice(this.index,m)}return this.index=m,this.push({data:g,meta:{percent:this.max?this.index/this.max*100:0}})},o.exports=p},{"../utils":32,"./GenericWorker":28}],28:[function(s,o,u){function h(f){this.name=f||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}h.prototype={push:function(f){this.emit("data",f)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(f){this.emit("error",f)}return!0},error:function(f){return!this.isFinished&&(this.isPaused?this.generatedError=f:(this.isFinished=!0,this.emit("error",f),this.previous&&this.previous.error(f),this.cleanUp()),!0)},on:function(f,p){return this._listeners[f].push(p),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(f,p){if(this._listeners[f])for(var g=0;g<this._listeners[f].length;g++)this._listeners[f][g].call(this,p)},pipe:function(f){return f.registerPrevious(this)},registerPrevious:function(f){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.streamInfo=f.streamInfo,this.mergeStreamInfo(),this.previous=f;var p=this;return f.on("data",function(g){p.processChunk(g)}),f.on("end",function(){p.end()}),f.on("error",function(g){p.error(g)}),this},pause:function(){return!this.isPaused&&!this.isFinished&&(this.isPaused=!0,this.previous&&this.previous.pause(),!0)},resume:function(){if(!this.isPaused||this.isFinished)return!1;var f=this.isPaused=!1;return this.generatedError&&(this.error(this.generatedError),f=!0),this.previous&&this.previous.resume(),!f},flush:function(){},processChunk:function(f){this.push(f)},withStreamInfo:function(f,p){return this.extraStreamInfo[f]=p,this.mergeStreamInfo(),this},mergeStreamInfo:function(){for(var f in this.extraStreamInfo)Object.prototype.hasOwnProperty.call(this.extraStreamInfo,f)&&(this.streamInfo[f]=this.extraStreamInfo[f])},lock:function(){if(this.isLocked)throw new Error("The stream '"+this+"' has already been used.");this.isLocked=!0,this.previous&&this.previous.lock()},toString:function(){var f="Worker "+this.name;return this.previous?this.previous+" -> "+f:f}},o.exports=h},{}],29:[function(s,o,u){var h=s("../utils"),f=s("./ConvertWorker"),p=s("./GenericWorker"),g=s("../base64"),m=s("../support"),j=s("../external"),b=null;if(m.nodestream)try{b=s("../nodejs/NodejsStreamOutputAdapter")}catch{}function S(O,N){return new j.Promise(function(w,_){var C=[],A=O._internalType,H=O._outputType,D=O._mimeType;O.on("data",function(K,G){C.push(K),N&&N(G)}).on("error",function(K){C=[],_(K)}).on("end",function(){try{var K=(function(G,ae,B){switch(G){case"blob":return h.newBlob(h.transformTo("arraybuffer",ae),B);case"base64":return g.encode(ae);default:return h.transformTo(G,ae)}})(H,(function(G,ae){var B,F=0,te=null,M=0;for(B=0;B<ae.length;B++)M+=ae[B].length;switch(G){case"string":return ae.join("");case"array":return Array.prototype.concat.apply([],ae);case"uint8array":for(te=new Uint8Array(M),B=0;B<ae.length;B++)te.set(ae[B],F),F+=ae[B].length;return te;case"nodebuffer":return Buffer.concat(ae);default:throw new Error("concat : unsupported type '"+G+"'")}})(A,C),D);w(K)}catch(G){_(G)}C=[]}).resume()})}function y(O,N,w){var _=N;switch(N){case"blob":case"arraybuffer":_="uint8array";break;case"base64":_="string"}try{this._internalType=_,this._outputType=N,this._mimeType=w,h.checkSupport(_),this._worker=O.pipe(new f(_)),O.lock()}catch(C){this._worker=new p("error"),this._worker.error(C)}}y.prototype={accumulate:function(O){return S(this,O)},on:function(O,N){var w=this;return O==="data"?this._worker.on(O,function(_){N.call(w,_.data,_.meta)}):this._worker.on(O,function(){h.delay(N,arguments,w)}),this},resume:function(){return h.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(O){if(h.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new b(this,{objectMode:this._outputType!=="nodebuffer"},O)}},o.exports=y},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(s,o,u){if(u.base64=!0,u.array=!0,u.string=!0,u.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",u.nodebuffer=typeof Buffer<"u",u.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")u.blob=!1;else{var h=new ArrayBuffer(0);try{u.blob=new Blob([h],{type:"application/zip"}).size===0}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);f.append(h),u.blob=f.getBlob("application/zip").size===0}catch{u.blob=!1}}}try{u.nodestream=!!s("readable-stream").Readable}catch{u.nodestream=!1}},{"readable-stream":16}],31:[function(s,o,u){for(var h=s("./utils"),f=s("./support"),p=s("./nodejsUtils"),g=s("./stream/GenericWorker"),m=new Array(256),j=0;j<256;j++)m[j]=252<=j?6:248<=j?5:240<=j?4:224<=j?3:192<=j?2:1;m[254]=m[254]=1;function b(){g.call(this,"utf-8 decode"),this.leftOver=null}function S(){g.call(this,"utf-8 encode")}u.utf8encode=function(y){return f.nodebuffer?p.newBufferFrom(y,"utf-8"):(function(O){var N,w,_,C,A,H=O.length,D=0;for(C=0;C<H;C++)(64512&(w=O.charCodeAt(C)))==55296&&C+1<H&&(64512&(_=O.charCodeAt(C+1)))==56320&&(w=65536+(w-55296<<10)+(_-56320),C++),D+=w<128?1:w<2048?2:w<65536?3:4;for(N=f.uint8array?new Uint8Array(D):new Array(D),C=A=0;A<D;C++)(64512&(w=O.charCodeAt(C)))==55296&&C+1<H&&(64512&(_=O.charCodeAt(C+1)))==56320&&(w=65536+(w-55296<<10)+(_-56320),C++),w<128?N[A++]=w:(w<2048?N[A++]=192|w>>>6:(w<65536?N[A++]=224|w>>>12:(N[A++]=240|w>>>18,N[A++]=128|w>>>12&63),N[A++]=128|w>>>6&63),N[A++]=128|63&w);return N})(y)},u.utf8decode=function(y){return f.nodebuffer?h.transformTo("nodebuffer",y).toString("utf-8"):(function(O){var N,w,_,C,A=O.length,H=new Array(2*A);for(N=w=0;N<A;)if((_=O[N++])<128)H[w++]=_;else if(4<(C=m[_]))H[w++]=65533,N+=C-1;else{for(_&=C===2?31:C===3?15:7;1<C&&N<A;)_=_<<6|63&O[N++],C--;1<C?H[w++]=65533:_<65536?H[w++]=_:(_-=65536,H[w++]=55296|_>>10&1023,H[w++]=56320|1023&_)}return H.length!==w&&(H.subarray?H=H.subarray(0,w):H.length=w),h.applyFromCharCode(H)})(y=h.transformTo(f.uint8array?"uint8array":"array",y))},h.inherits(b,g),b.prototype.processChunk=function(y){var O=h.transformTo(f.uint8array?"uint8array":"array",y.data);if(this.leftOver&&this.leftOver.length){if(f.uint8array){var N=O;(O=new Uint8Array(N.length+this.leftOver.length)).set(this.leftOver,0),O.set(N,this.leftOver.length)}else O=this.leftOver.concat(O);this.leftOver=null}var w=(function(C,A){var H;for((A=A||C.length)>C.length&&(A=C.length),H=A-1;0<=H&&(192&C[H])==128;)H--;return H<0||H===0?A:H+m[C[H]]>A?H:A})(O),_=O;w!==O.length&&(f.uint8array?(_=O.subarray(0,w),this.leftOver=O.subarray(w,O.length)):(_=O.slice(0,w),this.leftOver=O.slice(w,O.length))),this.push({data:u.utf8decode(_),meta:y.meta})},b.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:u.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},u.Utf8DecodeWorker=b,h.inherits(S,g),S.prototype.processChunk=function(y){this.push({data:u.utf8encode(y.data),meta:y.meta})},u.Utf8EncodeWorker=S},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(s,o,u){var h=s("./support"),f=s("./base64"),p=s("./nodejsUtils"),g=s("./external");function m(N){return N}function j(N,w){for(var _=0;_<N.length;++_)w[_]=255&N.charCodeAt(_);return w}s("setimmediate"),u.newBlob=function(N,w){u.checkSupport("blob");try{return new Blob([N],{type:w})}catch{try{var _=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return _.append(N),_.getBlob(w)}catch{throw new Error("Bug : can't construct the Blob.")}}};var b={stringifyByChunk:function(N,w,_){var C=[],A=0,H=N.length;if(H<=_)return String.fromCharCode.apply(null,N);for(;A<H;)w==="array"||w==="nodebuffer"?C.push(String.fromCharCode.apply(null,N.slice(A,Math.min(A+_,H)))):C.push(String.fromCharCode.apply(null,N.subarray(A,Math.min(A+_,H)))),A+=_;return C.join("")},stringifyByChar:function(N){for(var w="",_=0;_<N.length;_++)w+=String.fromCharCode(N[_]);return w},applyCanBeUsed:{uint8array:(function(){try{return h.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return h.nodebuffer&&String.fromCharCode.apply(null,p.allocBuffer(1)).length===1}catch{return!1}})()}};function S(N){var w=65536,_=u.getTypeOf(N),C=!0;if(_==="uint8array"?C=b.applyCanBeUsed.uint8array:_==="nodebuffer"&&(C=b.applyCanBeUsed.nodebuffer),C)for(;1<w;)try{return b.stringifyByChunk(N,_,w)}catch{w=Math.floor(w/2)}return b.stringifyByChar(N)}function y(N,w){for(var _=0;_<N.length;_++)w[_]=N[_];return w}u.applyFromCharCode=S;var O={};O.string={string:m,array:function(N){return j(N,new Array(N.length))},arraybuffer:function(N){return O.string.uint8array(N).buffer},uint8array:function(N){return j(N,new Uint8Array(N.length))},nodebuffer:function(N){return j(N,p.allocBuffer(N.length))}},O.array={string:S,array:m,arraybuffer:function(N){return new Uint8Array(N).buffer},uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(N)}},O.arraybuffer={string:function(N){return S(new Uint8Array(N))},array:function(N){return y(new Uint8Array(N),new Array(N.byteLength))},arraybuffer:m,uint8array:function(N){return new Uint8Array(N)},nodebuffer:function(N){return p.newBufferFrom(new Uint8Array(N))}},O.uint8array={string:S,array:function(N){return y(N,new Array(N.length))},arraybuffer:function(N){return N.buffer},uint8array:m,nodebuffer:function(N){return p.newBufferFrom(N)}},O.nodebuffer={string:S,array:function(N){return y(N,new Array(N.length))},arraybuffer:function(N){return O.nodebuffer.uint8array(N).buffer},uint8array:function(N){return y(N,new Uint8Array(N.length))},nodebuffer:m},u.transformTo=function(N,w){if(w=w||"",!N)return w;u.checkSupport(N);var _=u.getTypeOf(w);return O[_][N](w)},u.resolve=function(N){for(var w=N.split("/"),_=[],C=0;C<w.length;C++){var A=w[C];A==="."||A===""&&C!==0&&C!==w.length-1||(A===".."?_.pop():_.push(A))}return _.join("/")},u.getTypeOf=function(N){return typeof N=="string"?"string":Object.prototype.toString.call(N)==="[object Array]"?"array":h.nodebuffer&&p.isBuffer(N)?"nodebuffer":h.uint8array&&N instanceof Uint8Array?"uint8array":h.arraybuffer&&N instanceof ArrayBuffer?"arraybuffer":void 0},u.checkSupport=function(N){if(!h[N.toLowerCase()])throw new Error(N+" is not supported by this platform")},u.MAX_VALUE_16BITS=65535,u.MAX_VALUE_32BITS=-1,u.pretty=function(N){var w,_,C="";for(_=0;_<(N||"").length;_++)C+="\\x"+((w=N.charCodeAt(_))<16?"0":"")+w.toString(16).toUpperCase();return C},u.delay=function(N,w,_){setImmediate(function(){N.apply(_||null,w||[])})},u.inherits=function(N,w){function _(){}_.prototype=w.prototype,N.prototype=new _},u.extend=function(){var N,w,_={};for(N=0;N<arguments.length;N++)for(w in arguments[N])Object.prototype.hasOwnProperty.call(arguments[N],w)&&_[w]===void 0&&(_[w]=arguments[N][w]);return _},u.prepareContent=function(N,w,_,C,A){return g.Promise.resolve(w).then(function(H){return h.blob&&(H instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(H))!==-1)&&typeof FileReader<"u"?new g.Promise(function(D,K){var G=new FileReader;G.onload=function(ae){D(ae.target.result)},G.onerror=function(ae){K(ae.target.error)},G.readAsArrayBuffer(H)}):H}).then(function(H){var D=u.getTypeOf(H);return D?(D==="arraybuffer"?H=u.transformTo("uint8array",H):D==="string"&&(A?H=f.decode(H):_&&C!==!0&&(H=(function(K){return j(K,h.uint8array?new Uint8Array(K.length):new Array(K.length))})(H))),H):g.Promise.reject(new Error("Can't read the data of '"+N+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(s,o,u){var h=s("./reader/readerFor"),f=s("./utils"),p=s("./signature"),g=s("./zipEntry"),m=s("./support");function j(b){this.files=[],this.loadOptions=b}j.prototype={checkSignature:function(b){if(!this.reader.readAndCheckSignature(b)){this.reader.index-=4;var S=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+f.pretty(S)+", expected "+f.pretty(b)+")")}},isSignature:function(b,S){var y=this.reader.index;this.reader.setIndex(b);var O=this.reader.readString(4)===S;return this.reader.setIndex(y),O},readBlockEndOfCentral:function(){this.diskNumber=this.reader.readInt(2),this.diskWithCentralDirStart=this.reader.readInt(2),this.centralDirRecordsOnThisDisk=this.reader.readInt(2),this.centralDirRecords=this.reader.readInt(2),this.centralDirSize=this.reader.readInt(4),this.centralDirOffset=this.reader.readInt(4),this.zipCommentLength=this.reader.readInt(2);var b=this.reader.readData(this.zipCommentLength),S=m.uint8array?"uint8array":"array",y=f.transformTo(S,b);this.zipComment=this.loadOptions.decodeFileName(y)},readBlockZip64EndOfCentral:function(){this.zip64EndOfCentralSize=this.reader.readInt(8),this.reader.skip(4),this.diskNumber=this.reader.readInt(4),this.diskWithCentralDirStart=this.reader.readInt(4),this.centralDirRecordsOnThisDisk=this.reader.readInt(8),this.centralDirRecords=this.reader.readInt(8),this.centralDirSize=this.reader.readInt(8),this.centralDirOffset=this.reader.readInt(8),this.zip64ExtensibleData={};for(var b,S,y,O=this.zip64EndOfCentralSize-44;0<O;)b=this.reader.readInt(2),S=this.reader.readInt(4),y=this.reader.readData(S),this.zip64ExtensibleData[b]={id:b,length:S,value:y}},readBlockZip64EndOfCentralLocator:function(){if(this.diskWithZip64CentralDirStart=this.reader.readInt(4),this.relativeOffsetEndOfZip64CentralDir=this.reader.readInt(8),this.disksCount=this.reader.readInt(4),1<this.disksCount)throw new Error("Multi-volumes zip are not supported")},readLocalFiles:function(){var b,S;for(b=0;b<this.files.length;b++)S=this.files[b],this.reader.setIndex(S.localHeaderOffset),this.checkSignature(p.LOCAL_FILE_HEADER),S.readLocalPart(this.reader),S.handleUTF8(),S.processAttributes()},readCentralDir:function(){var b;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(p.CENTRAL_FILE_HEADER);)(b=new g({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(b);if(this.centralDirRecords!==this.files.length&&this.centralDirRecords!==0&&this.files.length===0)throw new Error("Corrupted zip or bug: expected "+this.centralDirRecords+" records in central dir, got "+this.files.length)},readEndOfCentral:function(){var b=this.reader.lastIndexOfSignature(p.CENTRAL_DIRECTORY_END);if(b<0)throw this.isSignature(0,p.LOCAL_FILE_HEADER)?new Error("Corrupted zip: can't find end of central directory"):new Error("Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html");this.reader.setIndex(b);var S=b;if(this.checkSignature(p.CENTRAL_DIRECTORY_END),this.readBlockEndOfCentral(),this.diskNumber===f.MAX_VALUE_16BITS||this.diskWithCentralDirStart===f.MAX_VALUE_16BITS||this.centralDirRecordsOnThisDisk===f.MAX_VALUE_16BITS||this.centralDirRecords===f.MAX_VALUE_16BITS||this.centralDirSize===f.MAX_VALUE_32BITS||this.centralDirOffset===f.MAX_VALUE_32BITS){if(this.zip64=!0,(b=this.reader.lastIndexOfSignature(p.ZIP64_CENTRAL_DIRECTORY_LOCATOR))<0)throw new Error("Corrupted zip: can't find the ZIP64 end of central directory locator");if(this.reader.setIndex(b),this.checkSignature(p.ZIP64_CENTRAL_DIRECTORY_LOCATOR),this.readBlockZip64EndOfCentralLocator(),!this.isSignature(this.relativeOffsetEndOfZip64CentralDir,p.ZIP64_CENTRAL_DIRECTORY_END)&&(this.relativeOffsetEndOfZip64CentralDir=this.reader.lastIndexOfSignature(p.ZIP64_CENTRAL_DIRECTORY_END),this.relativeOffsetEndOfZip64CentralDir<0))throw new Error("Corrupted zip: can't find the ZIP64 end of central directory");this.reader.setIndex(this.relativeOffsetEndOfZip64CentralDir),this.checkSignature(p.ZIP64_CENTRAL_DIRECTORY_END),this.readBlockZip64EndOfCentral()}var y=this.centralDirOffset+this.centralDirSize;this.zip64&&(y+=20,y+=12+this.zip64EndOfCentralSize);var O=S-y;if(0<O)this.isSignature(S,p.CENTRAL_FILE_HEADER)||(this.reader.zero=O);else if(O<0)throw new Error("Corrupted zip: missing "+Math.abs(O)+" bytes.")},prepareReader:function(b){this.reader=h(b)},load:function(b){this.prepareReader(b),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},o.exports=j},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(s,o,u){var h=s("./reader/readerFor"),f=s("./utils"),p=s("./compressedObject"),g=s("./crc32"),m=s("./utf8"),j=s("./compressions"),b=s("./support");function S(y,O){this.options=y,this.loadOptions=O}S.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(y){var O,N;if(y.skip(22),this.fileNameLength=y.readInt(2),N=y.readInt(2),this.fileName=y.readData(this.fileNameLength),y.skip(N),this.compressedSize===-1||this.uncompressedSize===-1)throw new Error("Bug or corrupted zip : didn't get enough information from the central directory (compressedSize === -1 || uncompressedSize === -1)");if((O=(function(w){for(var _ in j)if(Object.prototype.hasOwnProperty.call(j,_)&&j[_].magic===w)return j[_];return null})(this.compressionMethod))===null)throw new Error("Corrupted zip : compression "+f.pretty(this.compressionMethod)+" unknown (inner file : "+f.transformTo("string",this.fileName)+")");this.decompressed=new p(this.compressedSize,this.uncompressedSize,this.crc32,O,y.readData(this.compressedSize))},readCentralPart:function(y){this.versionMadeBy=y.readInt(2),y.skip(2),this.bitFlag=y.readInt(2),this.compressionMethod=y.readString(2),this.date=y.readDate(),this.crc32=y.readInt(4),this.compressedSize=y.readInt(4),this.uncompressedSize=y.readInt(4);var O=y.readInt(2);if(this.extraFieldsLength=y.readInt(2),this.fileCommentLength=y.readInt(2),this.diskNumberStart=y.readInt(2),this.internalFileAttributes=y.readInt(2),this.externalFileAttributes=y.readInt(4),this.localHeaderOffset=y.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");y.skip(O),this.readExtraFields(y),this.parseZIP64ExtraField(y),this.fileComment=y.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var y=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),y==0&&(this.dosPermissions=63&this.externalFileAttributes),y==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var y=h(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=y.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=y.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=y.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=y.readInt(4))}},readExtraFields:function(y){var O,N,w,_=y.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});y.index+4<_;)O=y.readInt(2),N=y.readInt(2),w=y.readData(N),this.extraFields[O]={id:O,length:N,value:w};y.setIndex(_)},handleUTF8:function(){var y=b.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=m.utf8decode(this.fileName),this.fileCommentStr=m.utf8decode(this.fileComment);else{var O=this.findExtraFieldUnicodePath();if(O!==null)this.fileNameStr=O;else{var N=f.transformTo(y,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(N)}var w=this.findExtraFieldUnicodeComment();if(w!==null)this.fileCommentStr=w;else{var _=f.transformTo(y,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(_)}}},findExtraFieldUnicodePath:function(){var y=this.extraFields[28789];if(y){var O=h(y.value);return O.readInt(1)!==1||g(this.fileName)!==O.readInt(4)?null:m.utf8decode(O.readData(y.length-5))}return null},findExtraFieldUnicodeComment:function(){var y=this.extraFields[25461];if(y){var O=h(y.value);return O.readInt(1)!==1||g(this.fileComment)!==O.readInt(4)?null:m.utf8decode(O.readData(y.length-5))}return null}},o.exports=S},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(s,o,u){function h(O,N,w){this.name=O,this.dir=w.dir,this.date=w.date,this.comment=w.comment,this.unixPermissions=w.unixPermissions,this.dosPermissions=w.dosPermissions,this._data=N,this._dataBinary=w.binary,this.options={compression:w.compression,compressionOptions:w.compressionOptions}}var f=s("./stream/StreamHelper"),p=s("./stream/DataWorker"),g=s("./utf8"),m=s("./compressedObject"),j=s("./stream/GenericWorker");h.prototype={internalStream:function(O){var N=null,w="string";try{if(!O)throw new Error("No output type specified.");var _=(w=O.toLowerCase())==="string"||w==="text";w!=="binarystring"&&w!=="text"||(w="string"),N=this._decompressWorker();var C=!this._dataBinary;C&&!_&&(N=N.pipe(new g.Utf8EncodeWorker)),!C&&_&&(N=N.pipe(new g.Utf8DecodeWorker))}catch(A){(N=new j("error")).error(A)}return new f(N,w,"")},async:function(O,N){return this.internalStream(O).accumulate(N)},nodeStream:function(O,N){return this.internalStream(O||"nodebuffer").toNodejsStream(N)},_compressWorker:function(O,N){if(this._data instanceof m&&this._data.compression.magic===O.magic)return this._data.getCompressedWorker();var w=this._decompressWorker();return this._dataBinary||(w=w.pipe(new g.Utf8EncodeWorker)),m.createWorkerFrom(w,O,N)},_decompressWorker:function(){return this._data instanceof m?this._data.getContentWorker():this._data instanceof j?this._data:new p(this._data)}};for(var b=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],S=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},y=0;y<b.length;y++)h.prototype[b[y]]=S;o.exports=h},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(s,o,u){(function(h){var f,p,g=h.MutationObserver||h.WebKitMutationObserver;if(g){var m=0,j=new g(O),b=h.document.createTextNode("");j.observe(b,{characterData:!0}),f=function(){b.data=m=++m%2}}else if(h.setImmediate||h.MessageChannel===void 0)f="document"in h&&"onreadystatechange"in h.document.createElement("script")?function(){var N=h.document.createElement("script");N.onreadystatechange=function(){O(),N.onreadystatechange=null,N.parentNode.removeChild(N),N=null},h.document.documentElement.appendChild(N)}:function(){setTimeout(O,0)};else{var S=new h.MessageChannel;S.port1.onmessage=O,f=function(){S.port2.postMessage(0)}}var y=[];function O(){var N,w;p=!0;for(var _=y.length;_;){for(w=y,y=[],N=-1;++N<_;)w[N]();_=y.length}p=!1}o.exports=function(N){y.push(N)!==1||p||f()}}).call(this,typeof Is<"u"?Is:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(s,o,u){var h=s("immediate");function f(){}var p={},g=["REJECTED"],m=["FULFILLED"],j=["PENDING"];function b(_){if(typeof _!="function")throw new TypeError("resolver must be a function");this.state=j,this.queue=[],this.outcome=void 0,_!==f&&N(this,_)}function S(_,C,A){this.promise=_,typeof C=="function"&&(this.onFulfilled=C,this.callFulfilled=this.otherCallFulfilled),typeof A=="function"&&(this.onRejected=A,this.callRejected=this.otherCallRejected)}function y(_,C,A){h(function(){var H;try{H=C(A)}catch(D){return p.reject(_,D)}H===_?p.reject(_,new TypeError("Cannot resolve promise with itself")):p.resolve(_,H)})}function O(_){var C=_&&_.then;if(_&&(typeof _=="object"||typeof _=="function")&&typeof C=="function")return function(){C.apply(_,arguments)}}function N(_,C){var A=!1;function H(G){A||(A=!0,p.reject(_,G))}function D(G){A||(A=!0,p.resolve(_,G))}var K=w(function(){C(D,H)});K.status==="error"&&H(K.value)}function w(_,C){var A={};try{A.value=_(C),A.status="success"}catch(H){A.status="error",A.value=H}return A}(o.exports=b).prototype.finally=function(_){if(typeof _!="function")return this;var C=this.constructor;return this.then(function(A){return C.resolve(_()).then(function(){return A})},function(A){return C.resolve(_()).then(function(){throw A})})},b.prototype.catch=function(_){return this.then(null,_)},b.prototype.then=function(_,C){if(typeof _!="function"&&this.state===m||typeof C!="function"&&this.state===g)return this;var A=new this.constructor(f);return this.state!==j?y(A,this.state===m?_:C,this.outcome):this.queue.push(new S(A,_,C)),A},S.prototype.callFulfilled=function(_){p.resolve(this.promise,_)},S.prototype.otherCallFulfilled=function(_){y(this.promise,this.onFulfilled,_)},S.prototype.callRejected=function(_){p.reject(this.promise,_)},S.prototype.otherCallRejected=function(_){y(this.promise,this.onRejected,_)},p.resolve=function(_,C){var A=w(O,C);if(A.status==="error")return p.reject(_,A.value);var H=A.value;if(H)N(_,H);else{_.state=m,_.outcome=C;for(var D=-1,K=_.queue.length;++D<K;)_.queue[D].callFulfilled(C)}return _},p.reject=function(_,C){_.state=g,_.outcome=C;for(var A=-1,H=_.queue.length;++A<H;)_.queue[A].callRejected(C);return _},b.resolve=function(_){return _ instanceof this?_:p.resolve(new this(f),_)},b.reject=function(_){var C=new this(f);return p.reject(C,_)},b.all=function(_){var C=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=_.length,H=!1;if(!A)return this.resolve([]);for(var D=new Array(A),K=0,G=-1,ae=new this(f);++G<A;)B(_[G],G);return ae;function B(F,te){C.resolve(F).then(function(M){D[te]=M,++K!==A||H||(H=!0,p.resolve(ae,D))},function(M){H||(H=!0,p.reject(ae,M))})}},b.race=function(_){var C=this;if(Object.prototype.toString.call(_)!=="[object Array]")return this.reject(new TypeError("must be an array"));var A=_.length,H=!1;if(!A)return this.resolve([]);for(var D=-1,K=new this(f);++D<A;)G=_[D],C.resolve(G).then(function(ae){H||(H=!0,p.resolve(K,ae))},function(ae){H||(H=!0,p.reject(K,ae))});var G;return K}},{immediate:36}],38:[function(s,o,u){var h={};(0,s("./lib/utils/common").assign)(h,s("./lib/deflate"),s("./lib/inflate"),s("./lib/zlib/constants")),o.exports=h},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(s,o,u){var h=s("./zlib/deflate"),f=s("./utils/common"),p=s("./utils/strings"),g=s("./zlib/messages"),m=s("./zlib/zstream"),j=Object.prototype.toString,b=0,S=-1,y=0,O=8;function N(_){if(!(this instanceof N))return new N(_);this.options=f.assign({level:S,method:O,chunkSize:16384,windowBits:15,memLevel:8,strategy:y,to:""},_||{});var C=this.options;C.raw&&0<C.windowBits?C.windowBits=-C.windowBits:C.gzip&&0<C.windowBits&&C.windowBits<16&&(C.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m,this.strm.avail_out=0;var A=h.deflateInit2(this.strm,C.level,C.method,C.windowBits,C.memLevel,C.strategy);if(A!==b)throw new Error(g[A]);if(C.header&&h.deflateSetHeader(this.strm,C.header),C.dictionary){var H;if(H=typeof C.dictionary=="string"?p.string2buf(C.dictionary):j.call(C.dictionary)==="[object ArrayBuffer]"?new Uint8Array(C.dictionary):C.dictionary,(A=h.deflateSetDictionary(this.strm,H))!==b)throw new Error(g[A]);this._dict_set=!0}}function w(_,C){var A=new N(C);if(A.push(_,!0),A.err)throw A.msg||g[A.err];return A.result}N.prototype.push=function(_,C){var A,H,D=this.strm,K=this.options.chunkSize;if(this.ended)return!1;H=C===~~C?C:C===!0?4:0,typeof _=="string"?D.input=p.string2buf(_):j.call(_)==="[object ArrayBuffer]"?D.input=new Uint8Array(_):D.input=_,D.next_in=0,D.avail_in=D.input.length;do{if(D.avail_out===0&&(D.output=new f.Buf8(K),D.next_out=0,D.avail_out=K),(A=h.deflate(D,H))!==1&&A!==b)return this.onEnd(A),!(this.ended=!0);D.avail_out!==0&&(D.avail_in!==0||H!==4&&H!==2)||(this.options.to==="string"?this.onData(p.buf2binstring(f.shrinkBuf(D.output,D.next_out))):this.onData(f.shrinkBuf(D.output,D.next_out)))}while((0<D.avail_in||D.avail_out===0)&&A!==1);return H===4?(A=h.deflateEnd(this.strm),this.onEnd(A),this.ended=!0,A===b):H!==2||(this.onEnd(b),!(D.avail_out=0))},N.prototype.onData=function(_){this.chunks.push(_)},N.prototype.onEnd=function(_){_===b&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg},u.Deflate=N,u.deflate=w,u.deflateRaw=function(_,C){return(C=C||{}).raw=!0,w(_,C)},u.gzip=function(_,C){return(C=C||{}).gzip=!0,w(_,C)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(s,o,u){var h=s("./zlib/inflate"),f=s("./utils/common"),p=s("./utils/strings"),g=s("./zlib/constants"),m=s("./zlib/messages"),j=s("./zlib/zstream"),b=s("./zlib/gzheader"),S=Object.prototype.toString;function y(N){if(!(this instanceof y))return new y(N);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},N||{});var w=this.options;w.raw&&0<=w.windowBits&&w.windowBits<16&&(w.windowBits=-w.windowBits,w.windowBits===0&&(w.windowBits=-15)),!(0<=w.windowBits&&w.windowBits<16)||N&&N.windowBits||(w.windowBits+=32),15<w.windowBits&&w.windowBits<48&&(15&w.windowBits)==0&&(w.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new j,this.strm.avail_out=0;var _=h.inflateInit2(this.strm,w.windowBits);if(_!==g.Z_OK)throw new Error(m[_]);this.header=new b,h.inflateGetHeader(this.strm,this.header)}function O(N,w){var _=new y(w);if(_.push(N,!0),_.err)throw _.msg||m[_.err];return _.result}y.prototype.push=function(N,w){var _,C,A,H,D,K,G=this.strm,ae=this.options.chunkSize,B=this.options.dictionary,F=!1;if(this.ended)return!1;C=w===~~w?w:w===!0?g.Z_FINISH:g.Z_NO_FLUSH,typeof N=="string"?G.input=p.binstring2buf(N):S.call(N)==="[object ArrayBuffer]"?G.input=new Uint8Array(N):G.input=N,G.next_in=0,G.avail_in=G.input.length;do{if(G.avail_out===0&&(G.output=new f.Buf8(ae),G.next_out=0,G.avail_out=ae),(_=h.inflate(G,g.Z_NO_FLUSH))===g.Z_NEED_DICT&&B&&(K=typeof B=="string"?p.string2buf(B):S.call(B)==="[object ArrayBuffer]"?new Uint8Array(B):B,_=h.inflateSetDictionary(this.strm,K)),_===g.Z_BUF_ERROR&&F===!0&&(_=g.Z_OK,F=!1),_!==g.Z_STREAM_END&&_!==g.Z_OK)return this.onEnd(_),!(this.ended=!0);G.next_out&&(G.avail_out!==0&&_!==g.Z_STREAM_END&&(G.avail_in!==0||C!==g.Z_FINISH&&C!==g.Z_SYNC_FLUSH)||(this.options.to==="string"?(A=p.utf8border(G.output,G.next_out),H=G.next_out-A,D=p.buf2string(G.output,A),G.next_out=H,G.avail_out=ae-H,H&&f.arraySet(G.output,G.output,A,H,0),this.onData(D)):this.onData(f.shrinkBuf(G.output,G.next_out)))),G.avail_in===0&&G.avail_out===0&&(F=!0)}while((0<G.avail_in||G.avail_out===0)&&_!==g.Z_STREAM_END);return _===g.Z_STREAM_END&&(C=g.Z_FINISH),C===g.Z_FINISH?(_=h.inflateEnd(this.strm),this.onEnd(_),this.ended=!0,_===g.Z_OK):C!==g.Z_SYNC_FLUSH||(this.onEnd(g.Z_OK),!(G.avail_out=0))},y.prototype.onData=function(N){this.chunks.push(N)},y.prototype.onEnd=function(N){N===g.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=N,this.msg=this.strm.msg},u.Inflate=y,u.inflate=O,u.inflateRaw=function(N,w){return(w=w||{}).raw=!0,O(N,w)},u.ungzip=O},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(s,o,u){var h=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";u.assign=function(g){for(var m=Array.prototype.slice.call(arguments,1);m.length;){var j=m.shift();if(j){if(typeof j!="object")throw new TypeError(j+"must be non-object");for(var b in j)j.hasOwnProperty(b)&&(g[b]=j[b])}}return g},u.shrinkBuf=function(g,m){return g.length===m?g:g.subarray?g.subarray(0,m):(g.length=m,g)};var f={arraySet:function(g,m,j,b,S){if(m.subarray&&g.subarray)g.set(m.subarray(j,j+b),S);else for(var y=0;y<b;y++)g[S+y]=m[j+y]},flattenChunks:function(g){var m,j,b,S,y,O;for(m=b=0,j=g.length;m<j;m++)b+=g[m].length;for(O=new Uint8Array(b),m=S=0,j=g.length;m<j;m++)y=g[m],O.set(y,S),S+=y.length;return O}},p={arraySet:function(g,m,j,b,S){for(var y=0;y<b;y++)g[S+y]=m[j+y]},flattenChunks:function(g){return[].concat.apply([],g)}};u.setTyped=function(g){g?(u.Buf8=Uint8Array,u.Buf16=Uint16Array,u.Buf32=Int32Array,u.assign(u,f)):(u.Buf8=Array,u.Buf16=Array,u.Buf32=Array,u.assign(u,p))},u.setTyped(h)},{}],42:[function(s,o,u){var h=s("./common"),f=!0,p=!0;try{String.fromCharCode.apply(null,[0])}catch{f=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{p=!1}for(var g=new h.Buf8(256),m=0;m<256;m++)g[m]=252<=m?6:248<=m?5:240<=m?4:224<=m?3:192<=m?2:1;function j(b,S){if(S<65537&&(b.subarray&&p||!b.subarray&&f))return String.fromCharCode.apply(null,h.shrinkBuf(b,S));for(var y="",O=0;O<S;O++)y+=String.fromCharCode(b[O]);return y}g[254]=g[254]=1,u.string2buf=function(b){var S,y,O,N,w,_=b.length,C=0;for(N=0;N<_;N++)(64512&(y=b.charCodeAt(N)))==55296&&N+1<_&&(64512&(O=b.charCodeAt(N+1)))==56320&&(y=65536+(y-55296<<10)+(O-56320),N++),C+=y<128?1:y<2048?2:y<65536?3:4;for(S=new h.Buf8(C),N=w=0;w<C;N++)(64512&(y=b.charCodeAt(N)))==55296&&N+1<_&&(64512&(O=b.charCodeAt(N+1)))==56320&&(y=65536+(y-55296<<10)+(O-56320),N++),y<128?S[w++]=y:(y<2048?S[w++]=192|y>>>6:(y<65536?S[w++]=224|y>>>12:(S[w++]=240|y>>>18,S[w++]=128|y>>>12&63),S[w++]=128|y>>>6&63),S[w++]=128|63&y);return S},u.buf2binstring=function(b){return j(b,b.length)},u.binstring2buf=function(b){for(var S=new h.Buf8(b.length),y=0,O=S.length;y<O;y++)S[y]=b.charCodeAt(y);return S},u.buf2string=function(b,S){var y,O,N,w,_=S||b.length,C=new Array(2*_);for(y=O=0;y<_;)if((N=b[y++])<128)C[O++]=N;else if(4<(w=g[N]))C[O++]=65533,y+=w-1;else{for(N&=w===2?31:w===3?15:7;1<w&&y<_;)N=N<<6|63&b[y++],w--;1<w?C[O++]=65533:N<65536?C[O++]=N:(N-=65536,C[O++]=55296|N>>10&1023,C[O++]=56320|1023&N)}return j(C,O)},u.utf8border=function(b,S){var y;for((S=S||b.length)>b.length&&(S=b.length),y=S-1;0<=y&&(192&b[y])==128;)y--;return y<0||y===0?S:y+g[b[y]]>S?y:S}},{"./common":41}],43:[function(s,o,u){o.exports=function(h,f,p,g){for(var m=65535&h|0,j=h>>>16&65535|0,b=0;p!==0;){for(p-=b=2e3<p?2e3:p;j=j+(m=m+f[g++]|0)|0,--b;);m%=65521,j%=65521}return m|j<<16|0}},{}],44:[function(s,o,u){o.exports={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_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}},{}],45:[function(s,o,u){var h=(function(){for(var f,p=[],g=0;g<256;g++){f=g;for(var m=0;m<8;m++)f=1&f?3988292384^f>>>1:f>>>1;p[g]=f}return p})();o.exports=function(f,p,g,m){var j=h,b=m+g;f^=-1;for(var S=m;S<b;S++)f=f>>>8^j[255&(f^p[S])];return-1^f}},{}],46:[function(s,o,u){var h,f=s("../utils/common"),p=s("./trees"),g=s("./adler32"),m=s("./crc32"),j=s("./messages"),b=0,S=4,y=0,O=-2,N=-1,w=4,_=2,C=8,A=9,H=286,D=30,K=19,G=2*H+1,ae=15,B=3,F=258,te=F+B+1,M=42,q=113,E=1,Z=2,Y=3,P=4;function X(T,J){return T.msg=j[J],J}function k(T){return(T<<1)-(4<T?9:0)}function V(T){for(var J=T.length;0<=--J;)T[J]=0}function v(T){var J=T.state,re=J.pending;re>T.avail_out&&(re=T.avail_out),re!==0&&(f.arraySet(T.output,J.pending_buf,J.pending_out,re,T.next_out),T.next_out+=re,J.pending_out+=re,T.total_out+=re,T.avail_out-=re,J.pending-=re,J.pending===0&&(J.pending_out=0))}function R(T,J){p._tr_flush_block(T,0<=T.block_start?T.block_start:-1,T.strstart-T.block_start,J),T.block_start=T.strstart,v(T.strm)}function $(T,J){T.pending_buf[T.pending++]=J}function W(T,J){T.pending_buf[T.pending++]=J>>>8&255,T.pending_buf[T.pending++]=255&J}function le(T,J){var re,L,U=T.max_chain_length,ee=T.strstart,me=T.prev_length,he=T.nice_match,ie=T.strstart>T.w_size-te?T.strstart-(T.w_size-te):0,Se=T.window,je=T.w_mask,xe=T.prev,Ce=T.strstart+F,Be=Se[ee+me-1],De=Se[ee+me];T.prev_length>=T.good_match&&(U>>=2),he>T.lookahead&&(he=T.lookahead);do if(Se[(re=J)+me]===De&&Se[re+me-1]===Be&&Se[re]===Se[ee]&&Se[++re]===Se[ee+1]){ee+=2,re++;do;while(Se[++ee]===Se[++re]&&Se[++ee]===Se[++re]&&Se[++ee]===Se[++re]&&Se[++ee]===Se[++re]&&Se[++ee]===Se[++re]&&Se[++ee]===Se[++re]&&Se[++ee]===Se[++re]&&Se[++ee]===Se[++re]&&ee<Ce);if(L=F-(Ce-ee),ee=Ce-F,me<L){if(T.match_start=J,he<=(me=L))break;Be=Se[ee+me-1],De=Se[ee+me]}}while((J=xe[J&je])>ie&&--U!=0);return me<=T.lookahead?me:T.lookahead}function ve(T){var J,re,L,U,ee,me,he,ie,Se,je,xe=T.w_size;do{if(U=T.window_size-T.lookahead-T.strstart,T.strstart>=xe+(xe-te)){for(f.arraySet(T.window,T.window,xe,xe,0),T.match_start-=xe,T.strstart-=xe,T.block_start-=xe,J=re=T.hash_size;L=T.head[--J],T.head[J]=xe<=L?L-xe:0,--re;);for(J=re=xe;L=T.prev[--J],T.prev[J]=xe<=L?L-xe:0,--re;);U+=xe}if(T.strm.avail_in===0)break;if(me=T.strm,he=T.window,ie=T.strstart+T.lookahead,Se=U,je=void 0,je=me.avail_in,Se<je&&(je=Se),re=je===0?0:(me.avail_in-=je,f.arraySet(he,me.input,me.next_in,je,ie),me.state.wrap===1?me.adler=g(me.adler,he,je,ie):me.state.wrap===2&&(me.adler=m(me.adler,he,je,ie)),me.next_in+=je,me.total_in+=je,je),T.lookahead+=re,T.lookahead+T.insert>=B)for(ee=T.strstart-T.insert,T.ins_h=T.window[ee],T.ins_h=(T.ins_h<<T.hash_shift^T.window[ee+1])&T.hash_mask;T.insert&&(T.ins_h=(T.ins_h<<T.hash_shift^T.window[ee+B-1])&T.hash_mask,T.prev[ee&T.w_mask]=T.head[T.ins_h],T.head[T.ins_h]=ee,ee++,T.insert--,!(T.lookahead+T.insert<B)););}while(T.lookahead<te&&T.strm.avail_in!==0)}function Ne(T,J){for(var re,L;;){if(T.lookahead<te){if(ve(T),T.lookahead<te&&J===b)return E;if(T.lookahead===0)break}if(re=0,T.lookahead>=B&&(T.ins_h=(T.ins_h<<T.hash_shift^T.window[T.strstart+B-1])&T.hash_mask,re=T.prev[T.strstart&T.w_mask]=T.head[T.ins_h],T.head[T.ins_h]=T.strstart),re!==0&&T.strstart-re<=T.w_size-te&&(T.match_length=le(T,re)),T.match_length>=B)if(L=p._tr_tally(T,T.strstart-T.match_start,T.match_length-B),T.lookahead-=T.match_length,T.match_length<=T.max_lazy_match&&T.lookahead>=B){for(T.match_length--;T.strstart++,T.ins_h=(T.ins_h<<T.hash_shift^T.window[T.strstart+B-1])&T.hash_mask,re=T.prev[T.strstart&T.w_mask]=T.head[T.ins_h],T.head[T.ins_h]=T.strstart,--T.match_length!=0;);T.strstart++}else T.strstart+=T.match_length,T.match_length=0,T.ins_h=T.window[T.strstart],T.ins_h=(T.ins_h<<T.hash_shift^T.window[T.strstart+1])&T.hash_mask;else L=p._tr_tally(T,0,T.window[T.strstart]),T.lookahead--,T.strstart++;if(L&&(R(T,!1),T.strm.avail_out===0))return E}return T.insert=T.strstart<B-1?T.strstart:B-1,J===S?(R(T,!0),T.strm.avail_out===0?Y:P):T.last_lit&&(R(T,!1),T.strm.avail_out===0)?E:Z}function _e(T,J){for(var re,L,U;;){if(T.lookahead<te){if(ve(T),T.lookahead<te&&J===b)return E;if(T.lookahead===0)break}if(re=0,T.lookahead>=B&&(T.ins_h=(T.ins_h<<T.hash_shift^T.window[T.strstart+B-1])&T.hash_mask,re=T.prev[T.strstart&T.w_mask]=T.head[T.ins_h],T.head[T.ins_h]=T.strstart),T.prev_length=T.match_length,T.prev_match=T.match_start,T.match_length=B-1,re!==0&&T.prev_length<T.max_lazy_match&&T.strstart-re<=T.w_size-te&&(T.match_length=le(T,re),T.match_length<=5&&(T.strategy===1||T.match_length===B&&4096<T.strstart-T.match_start)&&(T.match_length=B-1)),T.prev_length>=B&&T.match_length<=T.prev_length){for(U=T.strstart+T.lookahead-B,L=p._tr_tally(T,T.strstart-1-T.prev_match,T.prev_length-B),T.lookahead-=T.prev_length-1,T.prev_length-=2;++T.strstart<=U&&(T.ins_h=(T.ins_h<<T.hash_shift^T.window[T.strstart+B-1])&T.hash_mask,re=T.prev[T.strstart&T.w_mask]=T.head[T.ins_h],T.head[T.ins_h]=T.strstart),--T.prev_length!=0;);if(T.match_available=0,T.match_length=B-1,T.strstart++,L&&(R(T,!1),T.strm.avail_out===0))return E}else if(T.match_available){if((L=p._tr_tally(T,0,T.window[T.strstart-1]))&&R(T,!1),T.strstart++,T.lookahead--,T.strm.avail_out===0)return E}else T.match_available=1,T.strstart++,T.lookahead--}return T.match_available&&(L=p._tr_tally(T,0,T.window[T.strstart-1]),T.match_available=0),T.insert=T.strstart<B-1?T.strstart:B-1,J===S?(R(T,!0),T.strm.avail_out===0?Y:P):T.last_lit&&(R(T,!1),T.strm.avail_out===0)?E:Z}function oe(T,J,re,L,U){this.good_length=T,this.max_lazy=J,this.nice_length=re,this.max_chain=L,this.func=U}function we(){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=C,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.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 f.Buf16(2*G),this.dyn_dtree=new f.Buf16(2*(2*D+1)),this.bl_tree=new f.Buf16(2*(2*K+1)),V(this.dyn_ltree),V(this.dyn_dtree),V(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new f.Buf16(ae+1),this.heap=new f.Buf16(2*H+1),V(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new f.Buf16(2*H+1),V(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function Te(T){var J;return T&&T.state?(T.total_in=T.total_out=0,T.data_type=_,(J=T.state).pending=0,J.pending_out=0,J.wrap<0&&(J.wrap=-J.wrap),J.status=J.wrap?M:q,T.adler=J.wrap===2?0:1,J.last_flush=b,p._tr_init(J),y):X(T,O)}function Ge(T){var J=Te(T);return J===y&&(function(re){re.window_size=2*re.w_size,V(re.head),re.max_lazy_match=h[re.level].max_lazy,re.good_match=h[re.level].good_length,re.nice_match=h[re.level].nice_length,re.max_chain_length=h[re.level].max_chain,re.strstart=0,re.block_start=0,re.lookahead=0,re.insert=0,re.match_length=re.prev_length=B-1,re.match_available=0,re.ins_h=0})(T.state),J}function Me(T,J,re,L,U,ee){if(!T)return O;var me=1;if(J===N&&(J=6),L<0?(me=0,L=-L):15<L&&(me=2,L-=16),U<1||A<U||re!==C||L<8||15<L||J<0||9<J||ee<0||w<ee)return X(T,O);L===8&&(L=9);var he=new we;return(T.state=he).strm=T,he.wrap=me,he.gzhead=null,he.w_bits=L,he.w_size=1<<he.w_bits,he.w_mask=he.w_size-1,he.hash_bits=U+7,he.hash_size=1<<he.hash_bits,he.hash_mask=he.hash_size-1,he.hash_shift=~~((he.hash_bits+B-1)/B),he.window=new f.Buf8(2*he.w_size),he.head=new f.Buf16(he.hash_size),he.prev=new f.Buf16(he.w_size),he.lit_bufsize=1<<U+6,he.pending_buf_size=4*he.lit_bufsize,he.pending_buf=new f.Buf8(he.pending_buf_size),he.d_buf=1*he.lit_bufsize,he.l_buf=3*he.lit_bufsize,he.level=J,he.strategy=ee,he.method=re,Ge(T)}h=[new oe(0,0,0,0,function(T,J){var re=65535;for(re>T.pending_buf_size-5&&(re=T.pending_buf_size-5);;){if(T.lookahead<=1){if(ve(T),T.lookahead===0&&J===b)return E;if(T.lookahead===0)break}T.strstart+=T.lookahead,T.lookahead=0;var L=T.block_start+re;if((T.strstart===0||T.strstart>=L)&&(T.lookahead=T.strstart-L,T.strstart=L,R(T,!1),T.strm.avail_out===0)||T.strstart-T.block_start>=T.w_size-te&&(R(T,!1),T.strm.avail_out===0))return E}return T.insert=0,J===S?(R(T,!0),T.strm.avail_out===0?Y:P):(T.strstart>T.block_start&&(R(T,!1),T.strm.avail_out),E)}),new oe(4,4,8,4,Ne),new oe(4,5,16,8,Ne),new oe(4,6,32,32,Ne),new oe(4,4,16,16,_e),new oe(8,16,32,32,_e),new oe(8,16,128,128,_e),new oe(8,32,128,256,_e),new oe(32,128,258,1024,_e),new oe(32,258,258,4096,_e)],u.deflateInit=function(T,J){return Me(T,J,C,15,8,0)},u.deflateInit2=Me,u.deflateReset=Ge,u.deflateResetKeep=Te,u.deflateSetHeader=function(T,J){return T&&T.state?T.state.wrap!==2?O:(T.state.gzhead=J,y):O},u.deflate=function(T,J){var re,L,U,ee;if(!T||!T.state||5<J||J<0)return T?X(T,O):O;if(L=T.state,!T.output||!T.input&&T.avail_in!==0||L.status===666&&J!==S)return X(T,T.avail_out===0?-5:O);if(L.strm=T,re=L.last_flush,L.last_flush=J,L.status===M)if(L.wrap===2)T.adler=0,$(L,31),$(L,139),$(L,8),L.gzhead?($(L,(L.gzhead.text?1:0)+(L.gzhead.hcrc?2:0)+(L.gzhead.extra?4:0)+(L.gzhead.name?8:0)+(L.gzhead.comment?16:0)),$(L,255&L.gzhead.time),$(L,L.gzhead.time>>8&255),$(L,L.gzhead.time>>16&255),$(L,L.gzhead.time>>24&255),$(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),$(L,255&L.gzhead.os),L.gzhead.extra&&L.gzhead.extra.length&&($(L,255&L.gzhead.extra.length),$(L,L.gzhead.extra.length>>8&255)),L.gzhead.hcrc&&(T.adler=m(T.adler,L.pending_buf,L.pending,0)),L.gzindex=0,L.status=69):($(L,0),$(L,0),$(L,0),$(L,0),$(L,0),$(L,L.level===9?2:2<=L.strategy||L.level<2?4:0),$(L,3),L.status=q);else{var me=C+(L.w_bits-8<<4)<<8;me|=(2<=L.strategy||L.level<2?0:L.level<6?1:L.level===6?2:3)<<6,L.strstart!==0&&(me|=32),me+=31-me%31,L.status=q,W(L,me),L.strstart!==0&&(W(L,T.adler>>>16),W(L,65535&T.adler)),T.adler=1}if(L.status===69)if(L.gzhead.extra){for(U=L.pending;L.gzindex<(65535&L.gzhead.extra.length)&&(L.pending!==L.pending_buf_size||(L.gzhead.hcrc&&L.pending>U&&(T.adler=m(T.adler,L.pending_buf,L.pending-U,U)),v(T),U=L.pending,L.pending!==L.pending_buf_size));)$(L,255&L.gzhead.extra[L.gzindex]),L.gzindex++;L.gzhead.hcrc&&L.pending>U&&(T.adler=m(T.adler,L.pending_buf,L.pending-U,U)),L.gzindex===L.gzhead.extra.length&&(L.gzindex=0,L.status=73)}else L.status=73;if(L.status===73)if(L.gzhead.name){U=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>U&&(T.adler=m(T.adler,L.pending_buf,L.pending-U,U)),v(T),U=L.pending,L.pending===L.pending_buf_size)){ee=1;break}ee=L.gzindex<L.gzhead.name.length?255&L.gzhead.name.charCodeAt(L.gzindex++):0,$(L,ee)}while(ee!==0);L.gzhead.hcrc&&L.pending>U&&(T.adler=m(T.adler,L.pending_buf,L.pending-U,U)),ee===0&&(L.gzindex=0,L.status=91)}else L.status=91;if(L.status===91)if(L.gzhead.comment){U=L.pending;do{if(L.pending===L.pending_buf_size&&(L.gzhead.hcrc&&L.pending>U&&(T.adler=m(T.adler,L.pending_buf,L.pending-U,U)),v(T),U=L.pending,L.pending===L.pending_buf_size)){ee=1;break}ee=L.gzindex<L.gzhead.comment.length?255&L.gzhead.comment.charCodeAt(L.gzindex++):0,$(L,ee)}while(ee!==0);L.gzhead.hcrc&&L.pending>U&&(T.adler=m(T.adler,L.pending_buf,L.pending-U,U)),ee===0&&(L.status=103)}else L.status=103;if(L.status===103&&(L.gzhead.hcrc?(L.pending+2>L.pending_buf_size&&v(T),L.pending+2<=L.pending_buf_size&&($(L,255&T.adler),$(L,T.adler>>8&255),T.adler=0,L.status=q)):L.status=q),L.pending!==0){if(v(T),T.avail_out===0)return L.last_flush=-1,y}else if(T.avail_in===0&&k(J)<=k(re)&&J!==S)return X(T,-5);if(L.status===666&&T.avail_in!==0)return X(T,-5);if(T.avail_in!==0||L.lookahead!==0||J!==b&&L.status!==666){var he=L.strategy===2?(function(ie,Se){for(var je;;){if(ie.lookahead===0&&(ve(ie),ie.lookahead===0)){if(Se===b)return E;break}if(ie.match_length=0,je=p._tr_tally(ie,0,ie.window[ie.strstart]),ie.lookahead--,ie.strstart++,je&&(R(ie,!1),ie.strm.avail_out===0))return E}return ie.insert=0,Se===S?(R(ie,!0),ie.strm.avail_out===0?Y:P):ie.last_lit&&(R(ie,!1),ie.strm.avail_out===0)?E:Z})(L,J):L.strategy===3?(function(ie,Se){for(var je,xe,Ce,Be,De=ie.window;;){if(ie.lookahead<=F){if(ve(ie),ie.lookahead<=F&&Se===b)return E;if(ie.lookahead===0)break}if(ie.match_length=0,ie.lookahead>=B&&0<ie.strstart&&(xe=De[Ce=ie.strstart-1])===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]){Be=ie.strstart+F;do;while(xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&xe===De[++Ce]&&Ce<Be);ie.match_length=F-(Be-Ce),ie.match_length>ie.lookahead&&(ie.match_length=ie.lookahead)}if(ie.match_length>=B?(je=p._tr_tally(ie,1,ie.match_length-B),ie.lookahead-=ie.match_length,ie.strstart+=ie.match_length,ie.match_length=0):(je=p._tr_tally(ie,0,ie.window[ie.strstart]),ie.lookahead--,ie.strstart++),je&&(R(ie,!1),ie.strm.avail_out===0))return E}return ie.insert=0,Se===S?(R(ie,!0),ie.strm.avail_out===0?Y:P):ie.last_lit&&(R(ie,!1),ie.strm.avail_out===0)?E:Z})(L,J):h[L.level].func(L,J);if(he!==Y&&he!==P||(L.status=666),he===E||he===Y)return T.avail_out===0&&(L.last_flush=-1),y;if(he===Z&&(J===1?p._tr_align(L):J!==5&&(p._tr_stored_block(L,0,0,!1),J===3&&(V(L.head),L.lookahead===0&&(L.strstart=0,L.block_start=0,L.insert=0))),v(T),T.avail_out===0))return L.last_flush=-1,y}return J!==S?y:L.wrap<=0?1:(L.wrap===2?($(L,255&T.adler),$(L,T.adler>>8&255),$(L,T.adler>>16&255),$(L,T.adler>>24&255),$(L,255&T.total_in),$(L,T.total_in>>8&255),$(L,T.total_in>>16&255),$(L,T.total_in>>24&255)):(W(L,T.adler>>>16),W(L,65535&T.adler)),v(T),0<L.wrap&&(L.wrap=-L.wrap),L.pending!==0?y:1)},u.deflateEnd=function(T){var J;return T&&T.state?(J=T.state.status)!==M&&J!==69&&J!==73&&J!==91&&J!==103&&J!==q&&J!==666?X(T,O):(T.state=null,J===q?X(T,-3):y):O},u.deflateSetDictionary=function(T,J){var re,L,U,ee,me,he,ie,Se,je=J.length;if(!T||!T.state||(ee=(re=T.state).wrap)===2||ee===1&&re.status!==M||re.lookahead)return O;for(ee===1&&(T.adler=g(T.adler,J,je,0)),re.wrap=0,je>=re.w_size&&(ee===0&&(V(re.head),re.strstart=0,re.block_start=0,re.insert=0),Se=new f.Buf8(re.w_size),f.arraySet(Se,J,je-re.w_size,re.w_size,0),J=Se,je=re.w_size),me=T.avail_in,he=T.next_in,ie=T.input,T.avail_in=je,T.next_in=0,T.input=J,ve(re);re.lookahead>=B;){for(L=re.strstart,U=re.lookahead-(B-1);re.ins_h=(re.ins_h<<re.hash_shift^re.window[L+B-1])&re.hash_mask,re.prev[L&re.w_mask]=re.head[re.ins_h],re.head[re.ins_h]=L,L++,--U;);re.strstart=L,re.lookahead=B-1,ve(re)}return re.strstart+=re.lookahead,re.block_start=re.strstart,re.insert=re.lookahead,re.lookahead=0,re.match_length=re.prev_length=B-1,re.match_available=0,T.next_in=he,T.input=ie,T.avail_in=me,re.wrap=ee,y},u.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(s,o,u){o.exports=function(){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}},{}],48:[function(s,o,u){o.exports=function(h,f){var p,g,m,j,b,S,y,O,N,w,_,C,A,H,D,K,G,ae,B,F,te,M,q,E,Z;p=h.state,g=h.next_in,E=h.input,m=g+(h.avail_in-5),j=h.next_out,Z=h.output,b=j-(f-h.avail_out),S=j+(h.avail_out-257),y=p.dmax,O=p.wsize,N=p.whave,w=p.wnext,_=p.window,C=p.hold,A=p.bits,H=p.lencode,D=p.distcode,K=(1<<p.lenbits)-1,G=(1<<p.distbits)-1;e:do{A<15&&(C+=E[g++]<<A,A+=8,C+=E[g++]<<A,A+=8),ae=H[C&K];t:for(;;){if(C>>>=B=ae>>>24,A-=B,(B=ae>>>16&255)===0)Z[j++]=65535&ae;else{if(!(16&B)){if((64&B)==0){ae=H[(65535&ae)+(C&(1<<B)-1)];continue t}if(32&B){p.mode=12;break e}h.msg="invalid literal/length code",p.mode=30;break e}F=65535&ae,(B&=15)&&(A<B&&(C+=E[g++]<<A,A+=8),F+=C&(1<<B)-1,C>>>=B,A-=B),A<15&&(C+=E[g++]<<A,A+=8,C+=E[g++]<<A,A+=8),ae=D[C&G];n:for(;;){if(C>>>=B=ae>>>24,A-=B,!(16&(B=ae>>>16&255))){if((64&B)==0){ae=D[(65535&ae)+(C&(1<<B)-1)];continue n}h.msg="invalid distance code",p.mode=30;break e}if(te=65535&ae,A<(B&=15)&&(C+=E[g++]<<A,(A+=8)<B&&(C+=E[g++]<<A,A+=8)),y<(te+=C&(1<<B)-1)){h.msg="invalid distance too far back",p.mode=30;break e}if(C>>>=B,A-=B,(B=j-b)<te){if(N<(B=te-B)&&p.sane){h.msg="invalid distance too far back",p.mode=30;break e}if(q=_,(M=0)===w){if(M+=O-B,B<F){for(F-=B;Z[j++]=_[M++],--B;);M=j-te,q=Z}}else if(w<B){if(M+=O+w-B,(B-=w)<F){for(F-=B;Z[j++]=_[M++],--B;);if(M=0,w<F){for(F-=B=w;Z[j++]=_[M++],--B;);M=j-te,q=Z}}}else if(M+=w-B,B<F){for(F-=B;Z[j++]=_[M++],--B;);M=j-te,q=Z}for(;2<F;)Z[j++]=q[M++],Z[j++]=q[M++],Z[j++]=q[M++],F-=3;F&&(Z[j++]=q[M++],1<F&&(Z[j++]=q[M++]))}else{for(M=j-te;Z[j++]=Z[M++],Z[j++]=Z[M++],Z[j++]=Z[M++],2<(F-=3););F&&(Z[j++]=Z[M++],1<F&&(Z[j++]=Z[M++]))}break}}break}}while(g<m&&j<S);g-=F=A>>3,C&=(1<<(A-=F<<3))-1,h.next_in=g,h.next_out=j,h.avail_in=g<m?m-g+5:5-(g-m),h.avail_out=j<S?S-j+257:257-(j-S),p.hold=C,p.bits=A}},{}],49:[function(s,o,u){var h=s("../utils/common"),f=s("./adler32"),p=s("./crc32"),g=s("./inffast"),m=s("./inftrees"),j=1,b=2,S=0,y=-2,O=1,N=852,w=592;function _(M){return(M>>>24&255)+(M>>>8&65280)+((65280&M)<<8)+((255&M)<<24)}function C(){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 h.Buf16(320),this.work=new h.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function A(M){var q;return M&&M.state?(q=M.state,M.total_in=M.total_out=q.total=0,M.msg="",q.wrap&&(M.adler=1&q.wrap),q.mode=O,q.last=0,q.havedict=0,q.dmax=32768,q.head=null,q.hold=0,q.bits=0,q.lencode=q.lendyn=new h.Buf32(N),q.distcode=q.distdyn=new h.Buf32(w),q.sane=1,q.back=-1,S):y}function H(M){var q;return M&&M.state?((q=M.state).wsize=0,q.whave=0,q.wnext=0,A(M)):y}function D(M,q){var E,Z;return M&&M.state?(Z=M.state,q<0?(E=0,q=-q):(E=1+(q>>4),q<48&&(q&=15)),q&&(q<8||15<q)?y:(Z.window!==null&&Z.wbits!==q&&(Z.window=null),Z.wrap=E,Z.wbits=q,H(M))):y}function K(M,q){var E,Z;return M?(Z=new C,(M.state=Z).window=null,(E=D(M,q))!==S&&(M.state=null),E):y}var G,ae,B=!0;function F(M){if(B){var q;for(G=new h.Buf32(512),ae=new h.Buf32(32),q=0;q<144;)M.lens[q++]=8;for(;q<256;)M.lens[q++]=9;for(;q<280;)M.lens[q++]=7;for(;q<288;)M.lens[q++]=8;for(m(j,M.lens,0,288,G,0,M.work,{bits:9}),q=0;q<32;)M.lens[q++]=5;m(b,M.lens,0,32,ae,0,M.work,{bits:5}),B=!1}M.lencode=G,M.lenbits=9,M.distcode=ae,M.distbits=5}function te(M,q,E,Z){var Y,P=M.state;return P.window===null&&(P.wsize=1<<P.wbits,P.wnext=0,P.whave=0,P.window=new h.Buf8(P.wsize)),Z>=P.wsize?(h.arraySet(P.window,q,E-P.wsize,P.wsize,0),P.wnext=0,P.whave=P.wsize):(Z<(Y=P.wsize-P.wnext)&&(Y=Z),h.arraySet(P.window,q,E-Z,Y,P.wnext),(Z-=Y)?(h.arraySet(P.window,q,E-Z,Z,0),P.wnext=Z,P.whave=P.wsize):(P.wnext+=Y,P.wnext===P.wsize&&(P.wnext=0),P.whave<P.wsize&&(P.whave+=Y))),0}u.inflateReset=H,u.inflateReset2=D,u.inflateResetKeep=A,u.inflateInit=function(M){return K(M,15)},u.inflateInit2=K,u.inflate=function(M,q){var E,Z,Y,P,X,k,V,v,R,$,W,le,ve,Ne,_e,oe,we,Te,Ge,Me,T,J,re,L,U=0,ee=new h.Buf8(4),me=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!M||!M.state||!M.output||!M.input&&M.avail_in!==0)return y;(E=M.state).mode===12&&(E.mode=13),X=M.next_out,Y=M.output,V=M.avail_out,P=M.next_in,Z=M.input,k=M.avail_in,v=E.hold,R=E.bits,$=k,W=V,J=S;e:for(;;)switch(E.mode){case O:if(E.wrap===0){E.mode=13;break}for(;R<16;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(2&E.wrap&&v===35615){ee[E.check=0]=255&v,ee[1]=v>>>8&255,E.check=p(E.check,ee,2,0),R=v=0,E.mode=2;break}if(E.flags=0,E.head&&(E.head.done=!1),!(1&E.wrap)||(((255&v)<<8)+(v>>8))%31){M.msg="incorrect header check",E.mode=30;break}if((15&v)!=8){M.msg="unknown compression method",E.mode=30;break}if(R-=4,T=8+(15&(v>>>=4)),E.wbits===0)E.wbits=T;else if(T>E.wbits){M.msg="invalid window size",E.mode=30;break}E.dmax=1<<T,M.adler=E.check=1,E.mode=512&v?10:12,R=v=0;break;case 2:for(;R<16;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(E.flags=v,(255&E.flags)!=8){M.msg="unknown compression method",E.mode=30;break}if(57344&E.flags){M.msg="unknown header flags set",E.mode=30;break}E.head&&(E.head.text=v>>8&1),512&E.flags&&(ee[0]=255&v,ee[1]=v>>>8&255,E.check=p(E.check,ee,2,0)),R=v=0,E.mode=3;case 3:for(;R<32;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}E.head&&(E.head.time=v),512&E.flags&&(ee[0]=255&v,ee[1]=v>>>8&255,ee[2]=v>>>16&255,ee[3]=v>>>24&255,E.check=p(E.check,ee,4,0)),R=v=0,E.mode=4;case 4:for(;R<16;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}E.head&&(E.head.xflags=255&v,E.head.os=v>>8),512&E.flags&&(ee[0]=255&v,ee[1]=v>>>8&255,E.check=p(E.check,ee,2,0)),R=v=0,E.mode=5;case 5:if(1024&E.flags){for(;R<16;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}E.length=v,E.head&&(E.head.extra_len=v),512&E.flags&&(ee[0]=255&v,ee[1]=v>>>8&255,E.check=p(E.check,ee,2,0)),R=v=0}else E.head&&(E.head.extra=null);E.mode=6;case 6:if(1024&E.flags&&(k<(le=E.length)&&(le=k),le&&(E.head&&(T=E.head.extra_len-E.length,E.head.extra||(E.head.extra=new Array(E.head.extra_len)),h.arraySet(E.head.extra,Z,P,le,T)),512&E.flags&&(E.check=p(E.check,Z,le,P)),k-=le,P+=le,E.length-=le),E.length))break e;E.length=0,E.mode=7;case 7:if(2048&E.flags){if(k===0)break e;for(le=0;T=Z[P+le++],E.head&&T&&E.length<65536&&(E.head.name+=String.fromCharCode(T)),T&&le<k;);if(512&E.flags&&(E.check=p(E.check,Z,le,P)),k-=le,P+=le,T)break e}else E.head&&(E.head.name=null);E.length=0,E.mode=8;case 8:if(4096&E.flags){if(k===0)break e;for(le=0;T=Z[P+le++],E.head&&T&&E.length<65536&&(E.head.comment+=String.fromCharCode(T)),T&&le<k;);if(512&E.flags&&(E.check=p(E.check,Z,le,P)),k-=le,P+=le,T)break e}else E.head&&(E.head.comment=null);E.mode=9;case 9:if(512&E.flags){for(;R<16;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(v!==(65535&E.check)){M.msg="header crc mismatch",E.mode=30;break}R=v=0}E.head&&(E.head.hcrc=E.flags>>9&1,E.head.done=!0),M.adler=E.check=0,E.mode=12;break;case 10:for(;R<32;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}M.adler=E.check=_(v),R=v=0,E.mode=11;case 11:if(E.havedict===0)return M.next_out=X,M.avail_out=V,M.next_in=P,M.avail_in=k,E.hold=v,E.bits=R,2;M.adler=E.check=1,E.mode=12;case 12:if(q===5||q===6)break e;case 13:if(E.last){v>>>=7&R,R-=7&R,E.mode=27;break}for(;R<3;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}switch(E.last=1&v,R-=1,3&(v>>>=1)){case 0:E.mode=14;break;case 1:if(F(E),E.mode=20,q!==6)break;v>>>=2,R-=2;break e;case 2:E.mode=17;break;case 3:M.msg="invalid block type",E.mode=30}v>>>=2,R-=2;break;case 14:for(v>>>=7&R,R-=7&R;R<32;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if((65535&v)!=(v>>>16^65535)){M.msg="invalid stored block lengths",E.mode=30;break}if(E.length=65535&v,R=v=0,E.mode=15,q===6)break e;case 15:E.mode=16;case 16:if(le=E.length){if(k<le&&(le=k),V<le&&(le=V),le===0)break e;h.arraySet(Y,Z,P,le,X),k-=le,P+=le,V-=le,X+=le,E.length-=le;break}E.mode=12;break;case 17:for(;R<14;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(E.nlen=257+(31&v),v>>>=5,R-=5,E.ndist=1+(31&v),v>>>=5,R-=5,E.ncode=4+(15&v),v>>>=4,R-=4,286<E.nlen||30<E.ndist){M.msg="too many length or distance symbols",E.mode=30;break}E.have=0,E.mode=18;case 18:for(;E.have<E.ncode;){for(;R<3;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}E.lens[me[E.have++]]=7&v,v>>>=3,R-=3}for(;E.have<19;)E.lens[me[E.have++]]=0;if(E.lencode=E.lendyn,E.lenbits=7,re={bits:E.lenbits},J=m(0,E.lens,0,19,E.lencode,0,E.work,re),E.lenbits=re.bits,J){M.msg="invalid code lengths set",E.mode=30;break}E.have=0,E.mode=19;case 19:for(;E.have<E.nlen+E.ndist;){for(;oe=(U=E.lencode[v&(1<<E.lenbits)-1])>>>16&255,we=65535&U,!((_e=U>>>24)<=R);){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(we<16)v>>>=_e,R-=_e,E.lens[E.have++]=we;else{if(we===16){for(L=_e+2;R<L;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(v>>>=_e,R-=_e,E.have===0){M.msg="invalid bit length repeat",E.mode=30;break}T=E.lens[E.have-1],le=3+(3&v),v>>>=2,R-=2}else if(we===17){for(L=_e+3;R<L;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}R-=_e,T=0,le=3+(7&(v>>>=_e)),v>>>=3,R-=3}else{for(L=_e+7;R<L;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}R-=_e,T=0,le=11+(127&(v>>>=_e)),v>>>=7,R-=7}if(E.have+le>E.nlen+E.ndist){M.msg="invalid bit length repeat",E.mode=30;break}for(;le--;)E.lens[E.have++]=T}}if(E.mode===30)break;if(E.lens[256]===0){M.msg="invalid code -- missing end-of-block",E.mode=30;break}if(E.lenbits=9,re={bits:E.lenbits},J=m(j,E.lens,0,E.nlen,E.lencode,0,E.work,re),E.lenbits=re.bits,J){M.msg="invalid literal/lengths set",E.mode=30;break}if(E.distbits=6,E.distcode=E.distdyn,re={bits:E.distbits},J=m(b,E.lens,E.nlen,E.ndist,E.distcode,0,E.work,re),E.distbits=re.bits,J){M.msg="invalid distances set",E.mode=30;break}if(E.mode=20,q===6)break e;case 20:E.mode=21;case 21:if(6<=k&&258<=V){M.next_out=X,M.avail_out=V,M.next_in=P,M.avail_in=k,E.hold=v,E.bits=R,g(M,W),X=M.next_out,Y=M.output,V=M.avail_out,P=M.next_in,Z=M.input,k=M.avail_in,v=E.hold,R=E.bits,E.mode===12&&(E.back=-1);break}for(E.back=0;oe=(U=E.lencode[v&(1<<E.lenbits)-1])>>>16&255,we=65535&U,!((_e=U>>>24)<=R);){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(oe&&(240&oe)==0){for(Te=_e,Ge=oe,Me=we;oe=(U=E.lencode[Me+((v&(1<<Te+Ge)-1)>>Te)])>>>16&255,we=65535&U,!(Te+(_e=U>>>24)<=R);){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}v>>>=Te,R-=Te,E.back+=Te}if(v>>>=_e,R-=_e,E.back+=_e,E.length=we,oe===0){E.mode=26;break}if(32&oe){E.back=-1,E.mode=12;break}if(64&oe){M.msg="invalid literal/length code",E.mode=30;break}E.extra=15&oe,E.mode=22;case 22:if(E.extra){for(L=E.extra;R<L;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}E.length+=v&(1<<E.extra)-1,v>>>=E.extra,R-=E.extra,E.back+=E.extra}E.was=E.length,E.mode=23;case 23:for(;oe=(U=E.distcode[v&(1<<E.distbits)-1])>>>16&255,we=65535&U,!((_e=U>>>24)<=R);){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if((240&oe)==0){for(Te=_e,Ge=oe,Me=we;oe=(U=E.distcode[Me+((v&(1<<Te+Ge)-1)>>Te)])>>>16&255,we=65535&U,!(Te+(_e=U>>>24)<=R);){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}v>>>=Te,R-=Te,E.back+=Te}if(v>>>=_e,R-=_e,E.back+=_e,64&oe){M.msg="invalid distance code",E.mode=30;break}E.offset=we,E.extra=15&oe,E.mode=24;case 24:if(E.extra){for(L=E.extra;R<L;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}E.offset+=v&(1<<E.extra)-1,v>>>=E.extra,R-=E.extra,E.back+=E.extra}if(E.offset>E.dmax){M.msg="invalid distance too far back",E.mode=30;break}E.mode=25;case 25:if(V===0)break e;if(le=W-V,E.offset>le){if((le=E.offset-le)>E.whave&&E.sane){M.msg="invalid distance too far back",E.mode=30;break}ve=le>E.wnext?(le-=E.wnext,E.wsize-le):E.wnext-le,le>E.length&&(le=E.length),Ne=E.window}else Ne=Y,ve=X-E.offset,le=E.length;for(V<le&&(le=V),V-=le,E.length-=le;Y[X++]=Ne[ve++],--le;);E.length===0&&(E.mode=21);break;case 26:if(V===0)break e;Y[X++]=E.length,V--,E.mode=21;break;case 27:if(E.wrap){for(;R<32;){if(k===0)break e;k--,v|=Z[P++]<<R,R+=8}if(W-=V,M.total_out+=W,E.total+=W,W&&(M.adler=E.check=E.flags?p(E.check,Y,W,X-W):f(E.check,Y,W,X-W)),W=V,(E.flags?v:_(v))!==E.check){M.msg="incorrect data check",E.mode=30;break}R=v=0}E.mode=28;case 28:if(E.wrap&&E.flags){for(;R<32;){if(k===0)break e;k--,v+=Z[P++]<<R,R+=8}if(v!==(4294967295&E.total)){M.msg="incorrect length check",E.mode=30;break}R=v=0}E.mode=29;case 29:J=1;break e;case 30:J=-3;break e;case 31:return-4;default:return y}return M.next_out=X,M.avail_out=V,M.next_in=P,M.avail_in=k,E.hold=v,E.bits=R,(E.wsize||W!==M.avail_out&&E.mode<30&&(E.mode<27||q!==4))&&te(M,M.output,M.next_out,W-M.avail_out)?(E.mode=31,-4):($-=M.avail_in,W-=M.avail_out,M.total_in+=$,M.total_out+=W,E.total+=W,E.wrap&&W&&(M.adler=E.check=E.flags?p(E.check,Y,W,M.next_out-W):f(E.check,Y,W,M.next_out-W)),M.data_type=E.bits+(E.last?64:0)+(E.mode===12?128:0)+(E.mode===20||E.mode===15?256:0),($==0&&W===0||q===4)&&J===S&&(J=-5),J)},u.inflateEnd=function(M){if(!M||!M.state)return y;var q=M.state;return q.window&&(q.window=null),M.state=null,S},u.inflateGetHeader=function(M,q){var E;return M&&M.state?(2&(E=M.state).wrap)==0?y:((E.head=q).done=!1,S):y},u.inflateSetDictionary=function(M,q){var E,Z=q.length;return M&&M.state?(E=M.state).wrap!==0&&E.mode!==11?y:E.mode===11&&f(1,q,Z,0)!==E.check?-3:te(M,q,Z,Z)?(E.mode=31,-4):(E.havedict=1,S):y},u.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(s,o,u){var h=s("../utils/common"),f=[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],p=[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,72,78],g=[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],m=[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];o.exports=function(j,b,S,y,O,N,w,_){var C,A,H,D,K,G,ae,B,F,te=_.bits,M=0,q=0,E=0,Z=0,Y=0,P=0,X=0,k=0,V=0,v=0,R=null,$=0,W=new h.Buf16(16),le=new h.Buf16(16),ve=null,Ne=0;for(M=0;M<=15;M++)W[M]=0;for(q=0;q<y;q++)W[b[S+q]]++;for(Y=te,Z=15;1<=Z&&W[Z]===0;Z--);if(Z<Y&&(Y=Z),Z===0)return O[N++]=20971520,O[N++]=20971520,_.bits=1,0;for(E=1;E<Z&&W[E]===0;E++);for(Y<E&&(Y=E),M=k=1;M<=15;M++)if(k<<=1,(k-=W[M])<0)return-1;if(0<k&&(j===0||Z!==1))return-1;for(le[1]=0,M=1;M<15;M++)le[M+1]=le[M]+W[M];for(q=0;q<y;q++)b[S+q]!==0&&(w[le[b[S+q]]++]=q);if(G=j===0?(R=ve=w,19):j===1?(R=f,$-=257,ve=p,Ne-=257,256):(R=g,ve=m,-1),M=E,K=N,X=q=v=0,H=-1,D=(V=1<<(P=Y))-1,j===1&&852<V||j===2&&592<V)return 1;for(;;){for(ae=M-X,F=w[q]<G?(B=0,w[q]):w[q]>G?(B=ve[Ne+w[q]],R[$+w[q]]):(B=96,0),C=1<<M-X,E=A=1<<P;O[K+(v>>X)+(A-=C)]=ae<<24|B<<16|F|0,A!==0;);for(C=1<<M-1;v&C;)C>>=1;if(C!==0?(v&=C-1,v+=C):v=0,q++,--W[M]==0){if(M===Z)break;M=b[S+w[q]]}if(Y<M&&(v&D)!==H){for(X===0&&(X=Y),K+=E,k=1<<(P=M-X);P+X<Z&&!((k-=W[P+X])<=0);)P++,k<<=1;if(V+=1<<P,j===1&&852<V||j===2&&592<V)return 1;O[H=v&D]=Y<<24|P<<16|K-N|0}}return v!==0&&(O[K+v]=M-X<<24|64<<16|0),_.bits=Y,0}},{"../utils/common":41}],51:[function(s,o,u){o.exports={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"}},{}],52:[function(s,o,u){var h=s("../utils/common"),f=0,p=1;function g(U){for(var ee=U.length;0<=--ee;)U[ee]=0}var m=0,j=29,b=256,S=b+1+j,y=30,O=19,N=2*S+1,w=15,_=16,C=7,A=256,H=16,D=17,K=18,G=[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],ae=[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],B=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],F=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],te=new Array(2*(S+2));g(te);var M=new Array(2*y);g(M);var q=new Array(512);g(q);var E=new Array(256);g(E);var Z=new Array(j);g(Z);var Y,P,X,k=new Array(y);function V(U,ee,me,he,ie){this.static_tree=U,this.extra_bits=ee,this.extra_base=me,this.elems=he,this.max_length=ie,this.has_stree=U&&U.length}function v(U,ee){this.dyn_tree=U,this.max_code=0,this.stat_desc=ee}function R(U){return U<256?q[U]:q[256+(U>>>7)]}function $(U,ee){U.pending_buf[U.pending++]=255&ee,U.pending_buf[U.pending++]=ee>>>8&255}function W(U,ee,me){U.bi_valid>_-me?(U.bi_buf|=ee<<U.bi_valid&65535,$(U,U.bi_buf),U.bi_buf=ee>>_-U.bi_valid,U.bi_valid+=me-_):(U.bi_buf|=ee<<U.bi_valid&65535,U.bi_valid+=me)}function le(U,ee,me){W(U,me[2*ee],me[2*ee+1])}function ve(U,ee){for(var me=0;me|=1&U,U>>>=1,me<<=1,0<--ee;);return me>>>1}function Ne(U,ee,me){var he,ie,Se=new Array(w+1),je=0;for(he=1;he<=w;he++)Se[he]=je=je+me[he-1]<<1;for(ie=0;ie<=ee;ie++){var xe=U[2*ie+1];xe!==0&&(U[2*ie]=ve(Se[xe]++,xe))}}function _e(U){var ee;for(ee=0;ee<S;ee++)U.dyn_ltree[2*ee]=0;for(ee=0;ee<y;ee++)U.dyn_dtree[2*ee]=0;for(ee=0;ee<O;ee++)U.bl_tree[2*ee]=0;U.dyn_ltree[2*A]=1,U.opt_len=U.static_len=0,U.last_lit=U.matches=0}function oe(U){8<U.bi_valid?$(U,U.bi_buf):0<U.bi_valid&&(U.pending_buf[U.pending++]=U.bi_buf),U.bi_buf=0,U.bi_valid=0}function we(U,ee,me,he){var ie=2*ee,Se=2*me;return U[ie]<U[Se]||U[ie]===U[Se]&&he[ee]<=he[me]}function Te(U,ee,me){for(var he=U.heap[me],ie=me<<1;ie<=U.heap_len&&(ie<U.heap_len&&we(ee,U.heap[ie+1],U.heap[ie],U.depth)&&ie++,!we(ee,he,U.heap[ie],U.depth));)U.heap[me]=U.heap[ie],me=ie,ie<<=1;U.heap[me]=he}function Ge(U,ee,me){var he,ie,Se,je,xe=0;if(U.last_lit!==0)for(;he=U.pending_buf[U.d_buf+2*xe]<<8|U.pending_buf[U.d_buf+2*xe+1],ie=U.pending_buf[U.l_buf+xe],xe++,he===0?le(U,ie,ee):(le(U,(Se=E[ie])+b+1,ee),(je=G[Se])!==0&&W(U,ie-=Z[Se],je),le(U,Se=R(--he),me),(je=ae[Se])!==0&&W(U,he-=k[Se],je)),xe<U.last_lit;);le(U,A,ee)}function Me(U,ee){var me,he,ie,Se=ee.dyn_tree,je=ee.stat_desc.static_tree,xe=ee.stat_desc.has_stree,Ce=ee.stat_desc.elems,Be=-1;for(U.heap_len=0,U.heap_max=N,me=0;me<Ce;me++)Se[2*me]!==0?(U.heap[++U.heap_len]=Be=me,U.depth[me]=0):Se[2*me+1]=0;for(;U.heap_len<2;)Se[2*(ie=U.heap[++U.heap_len]=Be<2?++Be:0)]=1,U.depth[ie]=0,U.opt_len--,xe&&(U.static_len-=je[2*ie+1]);for(ee.max_code=Be,me=U.heap_len>>1;1<=me;me--)Te(U,Se,me);for(ie=Ce;me=U.heap[1],U.heap[1]=U.heap[U.heap_len--],Te(U,Se,1),he=U.heap[1],U.heap[--U.heap_max]=me,U.heap[--U.heap_max]=he,Se[2*ie]=Se[2*me]+Se[2*he],U.depth[ie]=(U.depth[me]>=U.depth[he]?U.depth[me]:U.depth[he])+1,Se[2*me+1]=Se[2*he+1]=ie,U.heap[1]=ie++,Te(U,Se,1),2<=U.heap_len;);U.heap[--U.heap_max]=U.heap[1],(function(De,jt){var wt,_t,Jt,Qe,gt,Je,$e=jt.dyn_tree,nt=jt.max_code,Bt=jt.stat_desc.static_tree,Xe=jt.stat_desc.has_stree,ct=jt.stat_desc.extra_bits,ut=jt.stat_desc.extra_base,Zt=jt.stat_desc.max_length,it=0;for(Qe=0;Qe<=w;Qe++)De.bl_count[Qe]=0;for($e[2*De.heap[De.heap_max]+1]=0,wt=De.heap_max+1;wt<N;wt++)Zt<(Qe=$e[2*$e[2*(_t=De.heap[wt])+1]+1]+1)&&(Qe=Zt,it++),$e[2*_t+1]=Qe,nt<_t||(De.bl_count[Qe]++,gt=0,ut<=_t&&(gt=ct[_t-ut]),Je=$e[2*_t],De.opt_len+=Je*(Qe+gt),Xe&&(De.static_len+=Je*(Bt[2*_t+1]+gt)));if(it!==0){do{for(Qe=Zt-1;De.bl_count[Qe]===0;)Qe--;De.bl_count[Qe]--,De.bl_count[Qe+1]+=2,De.bl_count[Zt]--,it-=2}while(0<it);for(Qe=Zt;Qe!==0;Qe--)for(_t=De.bl_count[Qe];_t!==0;)nt<(Jt=De.heap[--wt])||($e[2*Jt+1]!==Qe&&(De.opt_len+=(Qe-$e[2*Jt+1])*$e[2*Jt],$e[2*Jt+1]=Qe),_t--)}})(U,ee),Ne(Se,Be,U.bl_count)}function T(U,ee,me){var he,ie,Se=-1,je=ee[1],xe=0,Ce=7,Be=4;for(je===0&&(Ce=138,Be=3),ee[2*(me+1)+1]=65535,he=0;he<=me;he++)ie=je,je=ee[2*(he+1)+1],++xe<Ce&&ie===je||(xe<Be?U.bl_tree[2*ie]+=xe:ie!==0?(ie!==Se&&U.bl_tree[2*ie]++,U.bl_tree[2*H]++):xe<=10?U.bl_tree[2*D]++:U.bl_tree[2*K]++,Se=ie,Be=(xe=0)===je?(Ce=138,3):ie===je?(Ce=6,3):(Ce=7,4))}function J(U,ee,me){var he,ie,Se=-1,je=ee[1],xe=0,Ce=7,Be=4;for(je===0&&(Ce=138,Be=3),he=0;he<=me;he++)if(ie=je,je=ee[2*(he+1)+1],!(++xe<Ce&&ie===je)){if(xe<Be)for(;le(U,ie,U.bl_tree),--xe!=0;);else ie!==0?(ie!==Se&&(le(U,ie,U.bl_tree),xe--),le(U,H,U.bl_tree),W(U,xe-3,2)):xe<=10?(le(U,D,U.bl_tree),W(U,xe-3,3)):(le(U,K,U.bl_tree),W(U,xe-11,7));Se=ie,Be=(xe=0)===je?(Ce=138,3):ie===je?(Ce=6,3):(Ce=7,4)}}g(k);var re=!1;function L(U,ee,me,he){W(U,(m<<1)+(he?1:0),3),(function(ie,Se,je,xe){oe(ie),$(ie,je),$(ie,~je),h.arraySet(ie.pending_buf,ie.window,Se,je,ie.pending),ie.pending+=je})(U,ee,me)}u._tr_init=function(U){re||((function(){var ee,me,he,ie,Se,je=new Array(w+1);for(ie=he=0;ie<j-1;ie++)for(Z[ie]=he,ee=0;ee<1<<G[ie];ee++)E[he++]=ie;for(E[he-1]=ie,ie=Se=0;ie<16;ie++)for(k[ie]=Se,ee=0;ee<1<<ae[ie];ee++)q[Se++]=ie;for(Se>>=7;ie<y;ie++)for(k[ie]=Se<<7,ee=0;ee<1<<ae[ie]-7;ee++)q[256+Se++]=ie;for(me=0;me<=w;me++)je[me]=0;for(ee=0;ee<=143;)te[2*ee+1]=8,ee++,je[8]++;for(;ee<=255;)te[2*ee+1]=9,ee++,je[9]++;for(;ee<=279;)te[2*ee+1]=7,ee++,je[7]++;for(;ee<=287;)te[2*ee+1]=8,ee++,je[8]++;for(Ne(te,S+1,je),ee=0;ee<y;ee++)M[2*ee+1]=5,M[2*ee]=ve(ee,5);Y=new V(te,G,b+1,S,w),P=new V(M,ae,0,y,w),X=new V(new Array(0),B,0,O,C)})(),re=!0),U.l_desc=new v(U.dyn_ltree,Y),U.d_desc=new v(U.dyn_dtree,P),U.bl_desc=new v(U.bl_tree,X),U.bi_buf=0,U.bi_valid=0,_e(U)},u._tr_stored_block=L,u._tr_flush_block=function(U,ee,me,he){var ie,Se,je=0;0<U.level?(U.strm.data_type===2&&(U.strm.data_type=(function(xe){var Ce,Be=4093624447;for(Ce=0;Ce<=31;Ce++,Be>>>=1)if(1&Be&&xe.dyn_ltree[2*Ce]!==0)return f;if(xe.dyn_ltree[18]!==0||xe.dyn_ltree[20]!==0||xe.dyn_ltree[26]!==0)return p;for(Ce=32;Ce<b;Ce++)if(xe.dyn_ltree[2*Ce]!==0)return p;return f})(U)),Me(U,U.l_desc),Me(U,U.d_desc),je=(function(xe){var Ce;for(T(xe,xe.dyn_ltree,xe.l_desc.max_code),T(xe,xe.dyn_dtree,xe.d_desc.max_code),Me(xe,xe.bl_desc),Ce=O-1;3<=Ce&&xe.bl_tree[2*F[Ce]+1]===0;Ce--);return xe.opt_len+=3*(Ce+1)+5+5+4,Ce})(U),ie=U.opt_len+3+7>>>3,(Se=U.static_len+3+7>>>3)<=ie&&(ie=Se)):ie=Se=me+5,me+4<=ie&&ee!==-1?L(U,ee,me,he):U.strategy===4||Se===ie?(W(U,2+(he?1:0),3),Ge(U,te,M)):(W(U,4+(he?1:0),3),(function(xe,Ce,Be,De){var jt;for(W(xe,Ce-257,5),W(xe,Be-1,5),W(xe,De-4,4),jt=0;jt<De;jt++)W(xe,xe.bl_tree[2*F[jt]+1],3);J(xe,xe.dyn_ltree,Ce-1),J(xe,xe.dyn_dtree,Be-1)})(U,U.l_desc.max_code+1,U.d_desc.max_code+1,je+1),Ge(U,U.dyn_ltree,U.dyn_dtree)),_e(U),he&&oe(U)},u._tr_tally=function(U,ee,me){return U.pending_buf[U.d_buf+2*U.last_lit]=ee>>>8&255,U.pending_buf[U.d_buf+2*U.last_lit+1]=255&ee,U.pending_buf[U.l_buf+U.last_lit]=255&me,U.last_lit++,ee===0?U.dyn_ltree[2*me]++:(U.matches++,ee--,U.dyn_ltree[2*(E[me]+b+1)]++,U.dyn_dtree[2*R(ee)]++),U.last_lit===U.lit_bufsize-1},u._tr_align=function(U){W(U,2,3),le(U,A,te),(function(ee){ee.bi_valid===16?($(ee,ee.bi_buf),ee.bi_buf=0,ee.bi_valid=0):8<=ee.bi_valid&&(ee.pending_buf[ee.pending++]=255&ee.bi_buf,ee.bi_buf>>=8,ee.bi_valid-=8)})(U)}},{"../utils/common":41}],53:[function(s,o,u){o.exports=function(){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}},{}],54:[function(s,o,u){(function(h){(function(f,p){if(!f.setImmediate){var g,m,j,b,S=1,y={},O=!1,N=f.document,w=Object.getPrototypeOf&&Object.getPrototypeOf(f);w=w&&w.setTimeout?w:f,g={}.toString.call(f.process)==="[object process]"?function(H){process.nextTick(function(){C(H)})}:(function(){if(f.postMessage&&!f.importScripts){var H=!0,D=f.onmessage;return f.onmessage=function(){H=!1},f.postMessage("","*"),f.onmessage=D,H}})()?(b="setImmediate$"+Math.random()+"$",f.addEventListener?f.addEventListener("message",A,!1):f.attachEvent("onmessage",A),function(H){f.postMessage(b+H,"*")}):f.MessageChannel?((j=new MessageChannel).port1.onmessage=function(H){C(H.data)},function(H){j.port2.postMessage(H)}):N&&"onreadystatechange"in N.createElement("script")?(m=N.documentElement,function(H){var D=N.createElement("script");D.onreadystatechange=function(){C(H),D.onreadystatechange=null,m.removeChild(D),D=null},m.appendChild(D)}):function(H){setTimeout(C,0,H)},w.setImmediate=function(H){typeof H!="function"&&(H=new Function(""+H));for(var D=new Array(arguments.length-1),K=0;K<D.length;K++)D[K]=arguments[K+1];var G={callback:H,args:D};return y[S]=G,g(S),S++},w.clearImmediate=_}function _(H){delete y[H]}function C(H){if(O)setTimeout(C,0,H);else{var D=y[H];if(D){O=!0;try{(function(K){var G=K.callback,ae=K.args;switch(ae.length){case 0:G();break;case 1:G(ae[0]);break;case 2:G(ae[0],ae[1]);break;case 3:G(ae[0],ae[1],ae[2]);break;default:G.apply(p,ae)}})(D)}finally{_(H),O=!1}}}}function A(H){H.source===f&&typeof H.data=="string"&&H.data.indexOf(b)===0&&C(+H.data.slice(b.length))}})(typeof self>"u"?h===void 0?this:h:self)}).call(this,typeof Is<"u"?Is:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(pd)),pd.exports}var N_=__();const T_=ev(N_),Qg=()=>({id:`BUG-${Date.now().toString().slice(-6)}`,title:"",severity:"medium",status:"open",actualResult:"",expectedResult:"",stepsToReproduce:"",attachments:[],createdAt:new Date().toISOString()});function E_({reports:n,testCases:l,onSave:s,onDelete:o}){const[u,h]=I.useState(),[f,p]=I.useState(!1);async function g(){p(!0);try{const m=new T_;m.file("bug-reports.csv",A_(n));for(const y of n)for(const O of y.attachments)m.file(`attachments/${fo(y.id)}/${fo(O.name)}`,O.dataUrl.split(",")[1]??"",{base64:!0});const j=await m.generateAsync({type:"blob"}),b=URL.createObjectURL(j),S=document.createElement("a");S.href=b,S.download=`lazyscout-bug-reports-${new Date().toISOString().slice(0,10)}.zip`,S.click(),URL.revokeObjectURL(b)}finally{p(!1)}}return r.jsxs("section",{className:"bug-reports",children:[r.jsxs("div",{className:"bug-reports-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Defect tracking"}),r.jsx("h3",{children:"Bug Reports"}),r.jsx("p",{children:"Capture reproducible issues and keep screenshots with the local project."})]}),r.jsxs("div",{className:"flex flex-wrap gap-2",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!n.length||f,onClick:()=>{g()},children:f?"Creating ZIP…":"Export ZIP + images"}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>h(Qg()),children:"+ Add Bug Report"})]})]}),n.length?r.jsx("div",{className:"overflow-x-auto",children:r.jsxs("table",{className:"bug-report-table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"Bug ID"}),r.jsx("th",{children:"Title"}),r.jsx("th",{children:"Test Case"}),r.jsx("th",{children:"Severity"}),r.jsx("th",{children:"Status"}),r.jsx("th",{children:"Evidence"}),r.jsx("th",{children:"Actions"})]})}),r.jsx("tbody",{children:n.map(m=>r.jsxs("tr",{children:[r.jsx("td",{children:m.id}),r.jsxs("td",{children:[r.jsx("b",{children:m.title||"Untitled bug"}),r.jsx("small",{children:new Date(m.createdAt).toLocaleDateString()})]}),r.jsx("td",{children:m.testCaseId||"—"}),r.jsx("td",{children:r.jsx("span",{className:`bug-severity ${m.severity}`,children:m.severity})}),r.jsx("td",{children:r.jsx("span",{className:"bug-status",children:m.status})}),r.jsxs("td",{children:[m.attachments.length," screenshot",m.attachments.length===1?"":"s"]}),r.jsx("td",{children:r.jsxs("div",{className:"flex justify-center gap-1",children:[r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>h(m),children:"Edit"}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>o(m.id),children:"Delete"})]})})]},m.id))})]})}):r.jsxs("div",{className:"bug-empty",children:[r.jsx("b",{children:"No Bug Reports yet"}),r.jsx("span",{children:"When a Test Case fails, add the actual result, expected result, reproduction steps, and screenshots here."}),r.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>h(Qg()),children:"Create first Bug Report"})]}),u&&r.jsx(C_,{report:u,testCases:l,onClose:()=>h(void 0),onSave:m=>{s(m),h(void 0)}})]})}function C_({report:n,testCases:l,onSave:s,onClose:o}){const[u,h]=I.useState(n);async function f(p){const g=[...p.target.files??[]].filter(j=>j.type.startsWith("image/")).slice(0,5),m=await Promise.all(g.map(async j=>({name:j.name,type:j.type,dataUrl:await O_(j)})));h(j=>({...j,attachments:[...j.attachments,...m]}))}return r.jsx("div",{className:"modern-modal-backdrop",children:r.jsxs("section",{className:"modern-modal bug-editor",role:"dialog","aria-modal":"true",children:[r.jsxs("header",{className:"modal-header",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Bug Report"}),r.jsx("h2",{children:u.id}),r.jsx("p",{children:"Describe the defect so another person can reproduce it quickly."})]}),r.jsx("button",{type:"button",className:"icon-btn",onClick:o,children:"×"})]}),r.jsxs("div",{className:"bug-editor-body",children:[r.jsxs("div",{className:"grid gap-3 md:grid-cols-[1fr_150px_150px]",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Title"}),r.jsx("input",{className:"field",value:u.title,onChange:p=>h({...u,title:p.target.value}),placeholder:"What went wrong?"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Severity"}),r.jsxs("select",{className:"field",value:u.severity,onChange:p=>h({...u,severity:p.target.value}),children:[r.jsx("option",{value:"critical",children:"critical"}),r.jsx("option",{value:"high",children:"high"}),r.jsx("option",{value:"medium",children:"medium"}),r.jsx("option",{value:"low",children:"low"})]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Status"}),r.jsxs("select",{className:"field",value:u.status,onChange:p=>h({...u,status:p.target.value}),children:[r.jsx("option",{value:"open",children:"open"}),r.jsx("option",{value:"in-progress",children:"in-progress"}),r.jsx("option",{value:"resolved",children:"resolved"})]})]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Related Test Case"}),r.jsxs("select",{className:"field",value:u.testCaseId??"",onChange:p=>h({...u,testCaseId:p.target.value||void 0}),children:[r.jsx("option",{value:"",children:"Not linked"}),l.map(p=>r.jsxs("option",{value:p.id,children:[p.id," · ",p.title]},p.id))]})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Steps to reproduce"}),r.jsx("textarea",{className:"field",rows:4,value:u.stepsToReproduce,onChange:p=>h({...u,stepsToReproduce:p.target.value}),placeholder:`1. Open…
|
|
54
|
+
2. Click…
|
|
55
|
+
3. Observe…`})]}),r.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Actual Result"}),r.jsx("textarea",{className:"field",rows:4,value:u.actualResult,onChange:p=>h({...u,actualResult:p.target.value})})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Expected Result"}),r.jsx("textarea",{className:"field",rows:4,value:u.expectedResult,onChange:p=>h({...u,expectedResult:p.target.value})})]})]}),r.jsxs("label",{className:"bug-upload",children:[r.jsx("span",{children:"Evidence screenshots"}),r.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:p=>{f(p)}}),r.jsx("em",{children:"Upload up to 5 images at a time. Images are included in ZIP export."})]}),u.attachments.length?r.jsx("div",{className:"bug-attachments",children:u.attachments.map((p,g)=>r.jsxs("figure",{children:[r.jsx("img",{src:p.dataUrl,alt:p.name}),r.jsxs("figcaption",{children:[p.name,r.jsx("button",{type:"button",onClick:()=>h(m=>({...m,attachments:m.attachments.filter((j,b)=>b!==g)})),children:"×"})]})]},`${p.name}-${g}`))}):null]}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-primary",disabled:!u.title.trim(),onClick:()=>s(u),children:"Save Bug Report"})]})]})})}function O_(n){return new Promise((l,s)=>{const o=new FileReader;o.onload=()=>l(String(o.result)),o.onerror=()=>s(o.error),o.readAsDataURL(n)})}function fo(n){return n.replace(/[^a-z0-9._-]/gi,"_")}function A_(n){const l=["Bug_ID","Title","Test_Case","Severity","Status","Steps_To_Reproduce","Actual_Result","Expected_Result","Attachments"],s=o=>`"${o.replaceAll('"','""')}"`;return[l,...n.map(o=>[o.id,o.title,o.testCaseId??"",o.severity,o.status,o.stepsToReproduce,o.actualResult,o.expectedResult,o.attachments.map(u=>`attachments/${fo(o.id)}/${fo(u.name)}`).join("; ")])].map(o=>o.map(s).join(",")).join(`\r
|
|
56
|
+
`)}function R_({screenshots:n,onDelete:l}){function s(o){const u=document.createElement("a");u.href=o.dataUrl,u.download=o.name,u.click()}return r.jsxs("section",{className:"screenshot-gallery",children:[r.jsxs("header",{className:"screenshot-gallery-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Playwright evidence"}),r.jsx("h3",{children:"Screenshots"}),r.jsxs("p",{children:["LazyScout does not capture automatically. Add"," ",r.jsxs("code",{children:["await page.screenshot(","{"," path: 'evidence.png', fullPage: true ","}",")"]})," ","to edited Playwright code when evidence is needed."]})]}),r.jsxs("span",{children:[n.length,"/50 saved"]})]}),n.length?r.jsx("div",{className:"screenshot-gallery-grid",children:n.map(o=>r.jsxs("figure",{children:[r.jsx("img",{src:o.dataUrl,alt:`Screenshot for ${o.testCaseId}`}),r.jsxs("figcaption",{children:[r.jsxs("div",{children:[r.jsx("b",{children:o.testCaseId}),r.jsxs("span",{children:[o.status," · ",new Date(o.capturedAt).toLocaleString()]})]}),r.jsxs("div",{className:"flex shrink-0 gap-1",children:[r.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>s(o),children:"Download"}),r.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>l(o.name),children:"Delete"})]})]})]},o.name))}):r.jsxs("div",{className:"bug-empty",children:[r.jsx("b",{children:"No screenshots yet"}),r.jsx("span",{children:"Add page.screenshot() to edited Playwright code, save it, then run that Test Case."})]})]})}function k_({defaultUrl:n}){const[l,s]=I.useState(n),[o,u]=I.useState(3),[h,f]=I.useState(5),[p,g]=I.useState(300),[m,j]=I.useState(!1),[b,S]=I.useState(!1),[y,O]=I.useState(),[N,w]=I.useState(""),_=Math.min(20,Math.max(1,Number(o)||1))*Math.min(100,Math.max(1,Number(h)||1));async function C(){if(!(b||!m)){S(!0),O(void 0),w("");try{O(await $0({url:l,virtualUsers:Number(o)||1,requestsPerUser:Number(h)||1,intervalMs:Number(p)||0,confirmed:m}))}catch(A){w(A instanceof Error?A.message:String(A))}finally{S(!1)}}}return r.jsxs("section",{className:"load-test-page",children:[r.jsxs("header",{className:"load-test-hero",children:[r.jsx("div",{className:"load-test-hero-icon",children:"⚡"}),r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"HTTP performance workspace"}),r.jsx("h2",{children:"Load Test"}),r.jsx("p",{children:"Send controlled GET traffic, compare response times, and inspect every HTTP response."})]}),r.jsx("span",{children:"GET only · Local runner"})]}),r.jsxs("div",{className:"load-test-layout",children:[r.jsxs("section",{className:"load-config-card",children:[r.jsxs("div",{className:"load-section-title",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Test configuration"}),r.jsx("h3",{children:"Request settings"})]}),r.jsxs("b",{children:[_," requests"]})]}),r.jsxs("div",{className:"load-test-form",children:[r.jsxs("label",{className:"load-url",children:[r.jsx("span",{children:"Target URL"}),r.jsx("input",{className:"field",value:l,onChange:A=>s(A.target.value),placeholder:"https://example.com",disabled:b})]}),r.jsxs("div",{className:"load-input-grid",children:[r.jsxs("label",{children:[r.jsx("span",{children:"Virtual users"}),r.jsx("input",{className:"field",type:"number",min:1,max:20,value:o,onChange:A=>u(A.target.value===""?"":Number(A.target.value)),disabled:b}),r.jsx("small",{children:"Maximum 20 concurrent users"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Requests / user"}),r.jsx("input",{className:"field",type:"number",min:1,max:100,value:h,onChange:A=>f(A.target.value===""?"":Number(A.target.value)),disabled:b}),r.jsx("small",{children:"Maximum 100 per user"})]}),r.jsxs("label",{children:[r.jsx("span",{children:"Interval"}),r.jsxs("div",{className:"load-input-unit",children:[r.jsx("input",{className:"field",type:"number",min:0,max:1e4,value:p,onChange:A=>g(A.target.value===""?"":Number(A.target.value)),disabled:b}),r.jsx("em",{children:"ms"})]}),r.jsx("small",{children:"Pause between each request"})]})]}),r.jsxs("label",{className:"load-confirm",children:[r.jsx("input",{type:"checkbox",checked:m,onChange:A=>j(A.target.checked),disabled:b}),r.jsxs("span",{children:[r.jsx("b",{children:"Authorized target"}),r.jsx("small",{children:"I own this target or have permission to run a load test."})]})]}),r.jsx("button",{type:"button",className:"btn btn-primary load-run-button",disabled:b||!m||!l.trim(),onClick:()=>{C()},children:b?r.jsxs(r.Fragment,{children:[r.jsx("i",{})," Running ",_," requests…"]}):r.jsx(r.Fragment,{children:"▶ Start Load Test"})})]})]}),r.jsxs("aside",{className:"load-safety-card",children:[r.jsx("p",{className:"eyebrow",children:"Safe limits"}),r.jsx("h3",{children:"Controlled traffic"}),r.jsxs("ul",{children:[r.jsxs("li",{children:[r.jsx("b",{children:"20"}),r.jsx("span",{children:"Maximum virtual users"})]}),r.jsxs("li",{children:[r.jsx("b",{children:"2,000"}),r.jsx("span",{children:"Maximum total requests"})]}),r.jsxs("li",{children:[r.jsx("b",{children:"15s"}),r.jsx("span",{children:"Timeout per request"})]})]}),r.jsx("p",{children:"Only HTTP GET is sent. LazyScout does not submit forms, log in, or modify target data."})]})]}),N&&r.jsx("p",{className:"load-error",children:N}),b&&r.jsxs("section",{className:"load-running",children:[r.jsx("i",{}),r.jsxs("div",{children:[r.jsx("b",{children:"Load test is running"}),r.jsx("span",{children:"Waiting for all virtual users to complete their request budget…"})]})]}),y&&r.jsxs("section",{className:"load-results",children:[r.jsxs("div",{className:"load-results-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Run report"}),r.jsx("h3",{children:"HTTP Request Results"})]}),r.jsx("span",{className:y.failed?"has-failures":"all-passed",children:y.failed?`${y.failed} failed`:"All requests passed"})]}),r.jsxs("div",{className:"load-kpis",children:[r.jsx(ti,{label:"Total",value:String(y.total)}),r.jsx(ti,{label:"Passed",value:String(y.passed),tone:"pass"}),r.jsx(ti,{label:"Failed",value:String(y.failed),tone:"fail"}),r.jsx(ti,{label:"Average",value:`${y.averageMs} ms`}),r.jsx(ti,{label:"Min / Max",value:`${y.minMs} / ${y.maxMs} ms`}),r.jsx(ti,{label:"Requests/sec",value:String(y.requestsPerSecond)})]}),r.jsx("div",{className:"load-table-wrap",children:r.jsxs("table",{className:"load-request-table",children:[r.jsx("thead",{children:r.jsxs("tr",{children:[r.jsx("th",{children:"#"}),r.jsx("th",{children:"User"}),r.jsx("th",{children:"Method"}),r.jsx("th",{children:"Request URL"}),r.jsx("th",{children:"HTTP"}),r.jsx("th",{children:"Time"}),r.jsx("th",{children:"Size"}),r.jsx("th",{children:"Result"})]})}),r.jsx("tbody",{children:y.requests.map(A=>r.jsxs("tr",{children:[r.jsx("td",{children:A.id}),r.jsxs("td",{children:["VU-",A.virtualUser,r.jsxs("small",{children:["Run ",A.iteration]})]}),r.jsx("td",{children:r.jsx("span",{className:"load-method",children:A.method})}),r.jsxs("td",{children:[r.jsx("span",{className:"load-request-url",title:A.finalUrl??A.url,children:A.finalUrl??A.url}),A.error&&r.jsx("small",{className:"load-request-error",children:A.error})]}),r.jsx("td",{children:A.statusCode?r.jsxs(r.Fragment,{children:[r.jsx("b",{children:A.statusCode}),r.jsx("small",{children:A.statusText})]}):"—"}),r.jsxs("td",{children:[A.durationMs," ms"]}),r.jsx("td",{children:D_(A.responseBytes)}),r.jsx("td",{children:r.jsx("span",{className:`load-result-badge ${A.passed?"passed":"failed"}`,children:A.passed?"PASS":"FAIL"})})]},A.id))})]})})]})]})}function ti({label:n,value:l,tone:s=""}){return r.jsxs("div",{className:s,children:[r.jsx("span",{children:n}),r.jsx("b",{children:l})]})}function D_(n){return n?n<1024?`${n} B`:`${(n/1024).toFixed(1)} KB`:"—"}function z_({message:n,detail:l,onClose:s}){return r.jsxs("div",{className:"scout-notice",role:"alert",children:[r.jsx("div",{className:"scout-notice-icon",children:"!"}),r.jsxs("div",{children:[r.jsx("b",{children:n}),r.jsx("p",{children:l})]}),r.jsx("button",{type:"button",onClick:s,"aria-label":"Dismiss notice",children:"×"})]})}function U_(){const[n,l]=I.useState({status:"idle",result:null,error:null});async function s(u,h,f,p="en",g=!1,m=750,j=[],b,S,y,O,N=!1){l({status:"loading",result:null,error:null});try{const w=await f0({url:u,maxPages:h,maxDepth:f,language:p,includeApiChecks:g,waitAfterNavigationMs:m,blockedKeywords:j,projectId:b,startPath:S,scopePath:y,mode:O,debug:N});return l({status:"success",result:w,error:null}),w}catch(w){const _=w instanceof hr?w:new hr("unknown","An unexpected error occurred.");return l({status:"error",result:null,error:_}),null}}function o(){l({status:"idle",result:null,error:null})}return{...n,analyze:s,reset:o}}const ho={enabled:!0,keywords:rv},ry=n=>`lazyscout-click-filter:${n}`;function L_(n){try{const l=localStorage.getItem(ry(n));if(!l)return ho;const s=JSON.parse(l);return{enabled:s.enabled===!0,keywords:iv(s.keywords)}}catch{return ho}}function M_(n){const[l,s]=I.useState(ho);I.useEffect(()=>{s(n?L_(n):ho)},[n]);const o=I.useCallback(h=>{const f={enabled:h.enabled,keywords:iv(h.keywords)};s(f),n&&localStorage.setItem(ry(n),JSON.stringify(f))},[n]),u=l.enabled?l.keywords:[];return{filter:l,blockedKeywords:u,save:o}}function B_(n){const[l,s]=I.useState([]),[o,u]=I.useState([]);I.useEffect(()=>{s(n??[]),u([])},[n]);function h(O,N){s(w=>w.map(_=>_.id===O?N:_)),u(w=>w.map(_=>_===O?N.id:_))}function f(O){s(N=>N.filter(w=>w.id!==O)),u(N=>N.filter(w=>w!==O))}function p(){s(O=>O.filter(N=>!o.includes(N.id))),u([])}function g(O,N){O!==N&&s(w=>{const _=w.findIndex(D=>D.id===O),C=w.findIndex(D=>D.id===N);if(_<0||C<0)return w;const A=[...w],[H]=A.splice(_,1);return A.splice(C,0,H),A})}function m(O){const N=new Set(l.map(_=>_.id));let w=l.filter(_=>_.module==="MANUAL").length+1;for(;N.has(gd("MANUAL",w));)w++;return Ax("MANUAL",gd("MANUAL",w),O)}function j(O){return s(N=>[O,...N]),O}function b(O){s(N=>[...O,...N])}function S(O){u(N=>N.includes(O)?N.filter(w=>w!==O):[...N,O])}function y(O){u(O)}return{testCases:l,selectedIds:o,updateTestCase:h,deleteTestCase:f,deleteSelected:p,reorderTestCases:g,createTestCaseDraft:m,addTestCase:j,addImportedTestCases:b,toggleSelected:S,setSelection:y}}function $_(n){const[l,s]=I.useState([]);I.useEffect(()=>{s(n??[])},[n]);function o(f,p){s(g=>g.map(m=>m.id===f?p:m))}function u(f){s(p=>p.filter(g=>g.id!==f))}function h(f){const p=new Set(l.map(m=>m.id));let g=l.filter(m=>m.module==="MANUAL").length+1;for(;p.has(vd("MANUAL",g));)g++;s(m=>[Ox("MANUAL",vd("MANUAL",g),f),...m])}return{testData:l,updateRow:o,deleteRow:u,addRow:h}}const po="lazyscout.projects.v1";function H_(){return{startUrl:"",origin:"Manual test suite",pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}function kd(){try{return JSON.parse(localStorage.getItem(po)??"[]")}catch{return[]}}function q_(n){const l=kd().filter(s=>s.id!==n);l.length?localStorage.setItem(po,JSON.stringify(l)):localStorage.removeItem(po)}function G_(){const[n,l]=I.useState([]),[s,o]=I.useState(),[u,h]=I.useState("~/LazyScout"),[f,p]=I.useState(),[g,m]=I.useState(!0),j=I.useRef(new Set),b=I.useRef(new Map);I.useEffect(()=>{(async()=>{try{const D=await v0();h(D.root);const K=kd(),G=K.filter(ae=>!D.projects.some(B=>B.id===ae.id));for(const ae of G)await Hm(ae);K.length&&localStorage.removeItem(po),l([...G,...D.projects])}catch(D){l(kd()),p(D instanceof Error?D.message:String(D))}finally{m(!1)}})()},[]);function S(D){if(j.current.has(D.id))return Promise.resolve();const G=(b.current.get(D.id)??Promise.resolve()).catch(()=>{}).then(()=>Hm(D)).catch(ae=>{p(ae instanceof Error?ae.message:String(ae))});return b.current.set(D.id,G),G.finally(()=>{b.current.get(D.id)===G&&b.current.delete(D.id)}),G}function y(D,K,G,ae,B){const F=new Date().toISOString(),te=`project-${I_(D)}`,M=ae??te,q=n.find(Z=>Z.id===M),E={id:M,name:G??q?.name??new URL(D).hostname,targetUrl:D,createdAt:q?.createdAt??F,updatedAt:F,mode:q?.mode,testCaseLanguage:B??q?.testCaseLanguage??"en",result:K};return j.current.delete(M),l(Z=>q?Z.map(Y=>Y.id===M?E:Y):[E,...Z]),S(E),o(M),M}function O(D="Untitled Test Suite",K="empty",G=H_(),ae=""){const B=new Date().toISOString(),F=`project-${crypto.randomUUID()}`,te={id:F,name:D.trim()||"Untitled Test Suite",targetUrl:ae,createdAt:B,updatedAt:B,mode:K,result:G};return j.current.delete(F),l(M=>[te,...M]),S(te),o(F),F}async function N(D){const K=n.findIndex(B=>B.id===D),G=n[K];if(!G)return;const ae=n.filter(B=>B.id!==D);j.current.add(D),l(ae),s===D&&o(ae[0]?.id);try{await(b.current.get(D)??Promise.resolve()),await y0(D),q_(D)}catch(B){j.current.delete(D),l(F=>{if(F.some(M=>M.id===D))return F;const te=Math.min(K,F.length);return[...F.slice(0,te),G,...F.slice(te)]}),s===D&&o(D),p(B instanceof Error?B.message:String(B))}}function w(D){j.current.delete(D.id),l(K=>K.some(G=>G.id===D.id)?K:[D,...K]),S(D),o(D.id)}function _(D,K){const G=K.trim(),ae=n.find(F=>F.id===D);if(!G||!ae)return;const B={...ae,name:G,updatedAt:new Date().toISOString()};l(F=>F.map(te=>te.id===D?B:te)),S(B)}function C(D,K){const G=n.find(B=>B.id===D);if(!G)return;const ae={...G,result:K,updatedAt:new Date().toISOString()};l(B=>B.map(F=>F.id===D?ae:F)),S(ae)}function A(D,K){const G=n.find(B=>B.id===D);if(!G)return;const ae={...G,testCaseLanguage:K,updatedAt:new Date().toISOString()};l(B=>B.map(F=>F.id===D?ae:F)),S(ae)}function H(){R0().catch(D=>p(D instanceof Error?D.message:String(D)))}return{projects:n,activeProjectId:s,setActiveProjectId:o,saveProject:y,createEmptyProject:O,deleteProject:N,restoreProject:w,renameProject:_,updateProjectResult:C,updateProjectTestCaseLanguage:A,workspaceRoot:u,workspaceError:f,loading:g,openWorkspace:H}}function I_(n){const l=new TextEncoder().encode(n),s=Array.from(l,o=>String.fromCharCode(o)).join("");return btoa(s).replace(/[^a-z0-9]/gi,"").slice(0,32).toLowerCase()}function V_(n){const[l,s]=I.useState({}),o=n?l[n]??{}:{};function u(f){n&&s(p=>({...p,[n]:f}))}function h(){n&&s(f=>{const p={...f};return delete p[n],p})}return{secrets:o,saveSecrets:u,clearSecrets:h,hasSecrets:Object.values(o).some(Boolean)}}function Y_(n){const[l,s]=I.useState([]);I.useEffect(()=>{s([]),n&&(async()=>{const h=await L0(n),f=`lazyscout.bug-reports.${n}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const g=p.filter(m=>!h.some(j=>j.id===m.id));for(const m of g)await Vm(n,m);p.length&&localStorage.removeItem(f),s([...g,...h])})().catch(()=>s([]))},[n]);function o(h){s(f=>f.some(p=>p.id===h.id)?f.map(p=>p.id===h.id?h:p):[h,...f]),n&&Vm(n,h)}function u(h){s(f=>f.filter(p=>p.id!==h)),n&&M0(n,h)}return{reports:l,save:o,remove:u}}function F_(n){const[l,s]=I.useState([]);I.useEffect(()=>{s([]),n&&(async()=>{const h=await k0(n),f=`lazyscout.screenshots.${n}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const g=[];for(const m of p)h.some(j=>j.name===m.name)||g.push(await Im(n,m));p.length&&localStorage.removeItem(f),s([...g,...h])})().catch(()=>s([]))},[n]);function o(h){n&&Im(n,h).then(f=>s(p=>[f,...p.filter(g=>g.name!==f.name)].slice(0,50)))}function u(h){s(f=>f.filter(p=>p.name!==h)),n&&D0(n,h)}return{screenshots:l,add:o,remove:u}}function P_(n){const[l,s]=I.useState([]),[o,u]=I.useState();I.useEffect(()=>{if(!n){s([]);return}S0(n).then(s).catch(f=>u(f instanceof Error?f.message:String(f)))},[n]);async function h(f){s(f);try{await j0(n,f),u(void 0)}catch(p){u(p instanceof Error?p.message:String(p))}}return{flows:l,update:h,error:o}}function Z_(n,l){const s=l.search.trim().toLowerCase();return n.filter(o=>l.module!=="all"&&!(o.folder??o.module).toLowerCase().includes(l.module.toLowerCase())||l.type!=="all"&&o.type!==l.type||l.priority!=="all"&&o.priority!==l.priority?!1:s?[o.id,o.module,o.folder??"",...o.tags??[],...o.requirements??[],o.title,o.expectedResult,o.sourceUrl,Cx(o.steps)].join(" ").toLowerCase().includes(s):!0)}function Jg(n){return[...new Set(n.map(l=>l.folder??l.module))].sort()}function X_(n,l,s){const o=l.trim().toLowerCase();return n.filter(u=>s!=="all"&&u.module!==s?!1:o?[u.id,u.module,u.field,u.inputType,u.validValue,u.invalidValue,u.note??""].join(" ").toLowerCase().includes(o):!0)}const K_={search:"",module:"all",type:"all",priority:"all"},md="lazyscout-active-project-id",Wg=["Launching Playwright runner","Opening target URL","Collecting pages and controls"];function Q_(){const{status:n,result:l,error:s,analyze:o,reset:u}=U_(),{projects:h,activeProjectId:f,setActiveProjectId:p,saveProject:g,createEmptyProject:m,deleteProject:j,restoreProject:b,renameProject:S,updateProjectResult:y,updateProjectTestCaseLanguage:O,workspaceRoot:N,workspaceError:w,loading:_,openWorkspace:C}=G_(),A=h.find(ye=>ye.id===f),{secrets:H,saveSecrets:D,clearSecrets:K}=V_(f),{filter:G,blockedKeywords:ae,save:B}=M_(f),te=A?.result??l,{testCases:M,selectedIds:q,updateTestCase:E,deleteTestCase:Z,deleteSelected:Y,reorderTestCases:P,createTestCaseDraft:X,addImportedTestCases:k,addTestCase:V,toggleSelected:v,setSelection:R}=B_(te?.testCases),{testData:$,updateRow:W,deleteRow:le,addRow:ve}=$_(te?.testData),{reports:Ne,save:_e,remove:oe}=Y_(f),{screenshots:we,add:Te,remove:Ge}=F_(f),{flows:Me,update:T}=P_(f),J=te??(A?iy(A.targetUrl):void 0),[re,L]=I.useState("testcases"),[U,ee]=I.useState(0),[me,he]=I.useState(K_),[ie,Se]=I.useState(""),[je,xe]=I.useState("all"),[Ce,Be]=I.useState(),[De,jt]=I.useState(),[wt,_t]=I.useState(null),[Jt,Qe]=I.useState(!1),[gt,Je]=I.useState(),[$e,nt]=I.useState("overview"),[Bt,Xe]=I.useState(!1),[ct,ut]=I.useState({}),[Zt,it]=I.useState({}),[Xt,bt]=I.useState(!1),[yt,mn]=I.useState("credentials"),[fa,Ot]=I.useState(!1),[He,Ie]=I.useState(!1),[El,On]=I.useState(!1),[pr,mr]=I.useState(!1),[oi,gr]=I.useState(),[gn,Nt]=I.useState(),[At,An]=I.useState(),[ci,yo]=I.useState(()=>localStorage.getItem("lazyscout-sidebar-collapsed")==="true");function bo(){yo(ye=>(localStorage.setItem("lazyscout-sidebar-collapsed",String(!ye)),!ye))}function vr(ye,Ae){An({message:ye,restore:Ae})}function Va(ye){const Ae=M.find(qe=>qe.id===ye);Ae&&(Z(ye),vr(`Deleted ${Ae.id}`,()=>k([Ae])))}function ui(){const ye=M.filter(Ae=>q.includes(Ae.id));ye.length&&(Y(),vr(`Deleted ${ye.length} Test Cases`,()=>k(ye)))}I.useEffect(()=>{if(!At)return;const ye=window.setTimeout(()=>An(void 0),8e3);return()=>window.clearTimeout(ye)},[At]);function vn(ye){pr||(mr(!0),window.setTimeout(()=>{ye(),mr(!1)},700))}const Mn=I.useMemo(()=>Z_(M,me),[M,me]),Fn=I.useMemo(()=>X_($,ie,je),[$,ie,je]),ha=I.useMemo(()=>Jg(M),[M]),Rt=I.useMemo(()=>Jg($),[$]),di=M.find(ye=>ye.id===Ce);function Cl(ye,Ae,qe){const Ke=M.find(Tt=>Tt.id===ye);if(!Ke)return;const Ht={...Ke};if(Ae==="preconditions"||Ae==="tags"?Ht[Ae]=qe.split(/\n|,/).map(Tt=>Tt.trim()).filter(Boolean):Ae==="steps"?Ht.steps=qe.split(`
|
|
57
|
+
`).map(Tt=>Tt.trim()).filter(Boolean).map(Tt=>{try{return JSON.parse(Tt)}catch{return{type:"manual",description:Tt}}}):Ht[Ae]=qe,E(ye,Ht),f&&te){const Tt=M.map($n=>$n.id===ye?Ht:$n);y(f,{...te,testCases:Tt,testData:$})}}I.useEffect(()=>{if(!f||!te||!A?.result)return;const ye=window.setTimeout(()=>{const Ae=A.result;JSON.stringify(Ae.testCases)===JSON.stringify(M)&&JSON.stringify(Ae.testData)===JSON.stringify($)||y(f,{...te,testCases:M,testData:$})},150);return()=>window.clearTimeout(ye)},[f,A?.result,te,M,$]),I.useEffect(()=>{if(_)return;if(h.length===0){localStorage.removeItem(md),On(!0);return}if(f&&h.some(qe=>qe.id===f))return;const ye=localStorage.getItem(md),Ae=h.find(qe=>qe.id===ye)??h[0];p(Ae.id)},[f,h,_,p]),I.useEffect(()=>{!_&&f&&localStorage.setItem(md,f)},[f,_]),I.useEffect(()=>{if(n!=="loading")return;const ye=document.body.style.overflow,Ae=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=ye,document.documentElement.style.overflow=Ae}},[n]),I.useEffect(()=>{if(n!=="loading"){ee(0);return}const ye=window.setInterval(()=>{ee(Ae=>(Ae+1)%Wg.length)},1800);return()=>window.clearInterval(ye)},[n]);async function Pn(ye,Ae,qe,Ke,Ht,Tt,$n,kl,yr,So){const kt=await o(ye,Ae,qe,Ke,Ht,Tt,ae,f,$n,kl,yr,So);if(kt){g(ye,kt,void 0,f,Ke);const Ya=kt.pages.reduce((Fa,Wt)=>Fa+Wt.links.length+Wt.buttons.length+Wt.inputs.length+Wt.textareas.length+Wt.selects.length+(Wt.state?.interactions.length??0),0);if(kt.testCases.length===0||Ya===0){const Fa=kt.issues.map(Wt=>Wt.code).filter((Wt,pa,Dl)=>Dl.indexOf(Wt)===pa);gr({message:"Scout finished, but no usable Test Cases were created.",detail:`Visited ${kt.pages.length} page${kt.pages.length===1?"":"s"} and found ${Ya} testable control${Ya===1?"":"s"}.${Fa.length?` Explorer reported: ${Fa.join(", ")}.`:" The site may show a bot challenge, render content after a delay, or expose no detectable controls. Check Scout Log for details."}`})}else gr(void 0)}}async function Bn(){const ye=re==="testcases"?Mn:[],Ae=re==="testdata"?Fn:[];if(ye.length===0&&Ae.length===0){Je("No data is available for export.");return}Qe(!0),Je(void 0);try{await m0(ye,Ae)}catch(qe){Je(qe instanceof hr?qe.message:"Could not export CSV.")}finally{Qe(!1)}}function Ol(ye){const Ae=di?.sourceUrl??te?.startUrl;if(!Ae){k(ye);return}k(ye.filter(qe=>qe.sourceUrl===Ae))}function Al(){const ye=X(te?.startUrl??"");_t(ye),Be(ye.id)}function Rl(ye,Ae,qe){const Ke=V({...X(qe),title:Ae,steps:ye,expectedResult:"The recorded flow completes without an error.",automationStatus:"needs-review"});bt(!1),L("testcases"),Be(Ke.id)}function xo(ye){const Ae=A?.targetUrl||te?.startUrl||"http://localhost:5173",qe=Me[0],Ke=qe??{id:crypto.randomUUID(),name:"Explorer Guided Flow",description:"Steps added from Auto Scout Explorer.",baseUrl:Ae,steps:[{id:crypto.randomUUID(),type:"navigate",path:new URL(Ae).pathname||"/"}],createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};T(qe?Me.map(Ht=>Ht.id===qe.id?{...Ht,steps:[...Ht.steps,ye],updatedAt:new Date().toISOString()}:Ht):[{...Ke,steps:[...Ke.steps,ye]}])}return r.jsxs("div",{className:"app-frame",children:[r.jsx(n1,{projects:h,activeProjectId:f,result:te,collapsed:n==="loading"?!1:ci,onToggleCollapsed:()=>{n!=="loading"&&bo()},onSelect:ye=>vn(()=>{p(ye),ut({}),it({}),nt("overview"),Be(void 0)}),onNew:()=>On(!0),onDelete:ye=>Nt(h.find(Ae=>Ae.id===ye)),onRename:S,onSettings:()=>{mn("credentials"),bt(!0)},workspaceRoot:N,onOpenWorkspace:C}),r.jsxs("div",{className:"app-main",children:[r.jsxs("header",{className:"app-header",children:[r.jsxs("div",{children:[r.jsxs("div",{className:"brand-mark",children:[r.jsx("span",{children:"LS"}),r.jsx("h1",{children:"LazyScout"}),r.jsxs("a",{className:"guide-link",href:"https://lazyscout.lazyscout.workers.dev/",target:"_blank",rel:"noreferrer","aria-label":"Open LazyScout Guide",title:"Open LazyScout Guide",children:[r.jsx("svg",{viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:r.jsx("path",{d:"M3.5 3.25A2.25 2.25 0 0 1 5.75 1h3A2.25 2.25 0 0 1 11 3.25v13.5A2.75 2.75 0 0 0 8.25 14h-2.5a2.25 2.25 0 0 0-2.25 2.25v-13Zm13 0A2.25 2.25 0 0 0 14.25 1h-3A2.25 2.25 0 0 0 9 3.25v13.5A2.75 2.75 0 0 1 11.75 14h2.5a2.25 2.25 0 0 1 2.25 2.25v-13Z"})}),r.jsx("span",{children:"Guide"})]})]}),r.jsxs("p",{children:["QA workspace ",r.jsx("span",{children:"/"})," Website UI State Explorer"]})]}),A&&!te&&r.jsx(Wm,{view:$e,onChange:ye=>ye==="explorer"?Xe(!0):nt(ye),counts:{cases:M.length,states:0}}),te&&r.jsxs("div",{className:"header-status",children:[r.jsx("span",{className:"status-dot status-pass"})," Explorer ready ",r.jsx("span",{className:"header-divider"})," ",r.jsx("span",{children:te.origin})]})]}),r.jsxs("div",{className:"space-y-4",children:[A&&(A.targetUrl||A.mode==="scout")&&r.jsx(_x,{initialUrl:A?.targetUrl,hasExistingData:!!A?.result?.testCases?.length,initialLanguage:A.testCaseLanguage,loading:n==="loading",onLanguageChange:ye=>f&&O(f,ye),onAnalyze:Pn},f??"new-project"),n==="loading"&&r.jsx("div",{className:"card p-6 text-center text-sm text-slate-600",children:"Playwright is opening the website and collecting page data… This can take a few moments."}),s&&r.jsx(ku,{message:s.message,hint:s.hint}),w&&r.jsx(ku,{message:w,hint:"Check that the LazyScout workspace is writable."}),gt&&r.jsx(ku,{message:gt}),oi&&r.jsx(z_,{...oi,onClose:()=>gr(void 0)}),te&&r.jsxs(r.Fragment,{children:[r.jsx(Wm,{view:$e,onChange:ye=>ye==="explorer"?Xe(!0):nt(ye),counts:{cases:M.length,states:te.actionGraph.states.length}}),$e==="scoutlog"?r.jsx(e1,{result:te}):$e==="loadtest"?r.jsx(k_,{defaultUrl:A?.targetUrl||te.startUrl}):$e==="automation"?r.jsx(WS,{testCases:M,projectId:f,secrets:H,blockedKeywords:ae,onRunStatus:(ye,Ae)=>{ut(Ke=>({...Ke,[ye]:Ae}));const qe=M.find(Ke=>Ke.id===ye);qe&&E(ye,{...qe,status:Ae})},onRunResult:(ye,Ae)=>{it(Ke=>({...Ke,[ye]:{...Ae,finishedAt:new Date().toISOString()}}));const qe=Ae.screenshots?.length?Ae.screenshots:Ae.screenshot?[Ae.screenshot]:[];if(qe.forEach(Te),Ae.status==="failed"&&f){const Ke=M.find(Tt=>Tt.id===ye),Ht={id:`bug-${crypto.randomUUID()}`,title:`Automation failed: ${Ke?.title??ye}`,severity:"high",status:"open",testCaseId:ye,actualResult:"The Playwright automation step failed. Open Automation Run Log for details.",expectedResult:Ke?.expectedResult??"The Test Case should complete successfully.",stepsToReproduce:Ke?.steps.map((Tt,$n)=>`${$n+1}. ${Tt.type}`).join(`
|
|
58
|
+
`)??"",attachments:qe.map(Tt=>({name:Tt.name,type:"image/png",dataUrl:Tt.dataUrl})),createdAt:new Date().toISOString()};_e(Ht)}}}):$e==="overview"?r.jsxs(r.Fragment,{children:[r.jsx(v1,{pages:te.pages.length,testCases:M.length,recordedCases:M.filter(ye=>ye.module==="MANUAL").length,completedRuns:M.filter(ye=>ye.status==="passed"||ye.status==="failed").length,onScout:()=>{const ye=document.getElementById("target-url");ye?(window.scrollTo({top:0,behavior:"smooth"}),window.setTimeout(()=>ye.focus(),250)):On(!0)},onReview:()=>nt("testcases"),onRecord:()=>{mn("recorder"),bt(!0)},onRun:()=>nt("automation"),onExport:()=>{Bn()}}),r.jsx(o1,{result:te,testCases:M,executionStatuses:ct,runResults:Zt,projectId:f})]}):r.jsxs("div",{className:"workspace-shell",children:[r.jsx(Nx,{result:te,activeUrl:di?.sourceUrl,onSelect:ye=>Be(M.find(Ae=>Ae.sourceUrl===ye)?.id)}),r.jsxs("main",{className:"workspace-center",children:[r.jsxs("div",{className:"workspace-center-head",children:[r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Current Workspace"}),r.jsx("h2",{children:re==="testcases"?"Test Case Review":"Test Data"})]}),r.jsxs("div",{className:"center-chips",children:[r.jsxs("span",{className:"status-badge status-badge-pass",children:[M.filter(ye=>ye.automationStatus==="ready").length," ready"]}),r.jsxs("span",{className:"status-badge status-badge-warn",children:[M.filter(ye=>ye.automationStatus==="needs-review").length," review"]})]})]}),r.jsx("div",{className:"grid gap-4",children:r.jsxs("div",{className:"card",children:[r.jsxs("div",{className:"flex gap-1 border-b border-slate-200 px-4 pt-3",children:[r.jsxs("button",{type:"button",onClick:()=>L("testcases"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${re==="testcases"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test Cases (",M.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>L("testdata"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${re==="testdata"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test Data (",$.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>L("apichecks"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${re==="apichecks"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Test API (",te.apiChecks?.length??0,")"]}),r.jsxs("button",{type:"button",onClick:()=>L("bugreports"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${re==="bugreports"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Bug Reports (",Ne.length,")"]}),r.jsxs("button",{type:"button",onClick:()=>L("screenshots"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${re==="screenshots"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:["Screenshots (",we.length,")"]})]}),re==="screenshots"?r.jsx(R_,{screenshots:we,onDelete:Ge}):re==="bugreports"?r.jsx(E_,{reports:Ne,testCases:M,onSave:_e,onDelete:oe}):re==="apichecks"?r.jsx(t1,{checks:te.apiChecks??[],secrets:H}):re==="testcases"?r.jsxs(r.Fragment,{children:[r.jsx(qx,{testCases:M}),r.jsx(Hx,{filters:me,modules:ha,totalCount:M.length,visibleCount:Mn.length,selectedCount:q.length,exporting:Jt,onFiltersChange:he,onAdd:Al,onImport:()=>Ie(!0),onImportScreenshot:()=>Ot(!0),onRecord:()=>{mn("recorder"),bt(!0)},onDeleteSelected:ui,onExport:Bn}),r.jsx($x,{testCases:Mn,selectedIds:q,activeId:Ce,onToggleSelect:v,onToggleAll:R,onOpen:ye=>{Be(ye.id),jt(ye.id)},onEdit:_t,onDelete:Va,onReorder:P,onUpdateCell:Cl,executionStatuses:ct})]}):r.jsxs(r.Fragment,{children:[r.jsx(Ix,{search:ie,module:je,modules:Rt,totalCount:$.length,visibleCount:Fn.length,exporting:Jt,onSearchChange:Se,onModuleChange:xe,onAdd:()=>ve(te.startUrl),onExport:Bn}),r.jsx(Gx,{rows:Fn,onUpdate:W,onDelete:le})]})]})})]})]})]})]}),wt&&r.jsx(Bx,{testCase:wt,onCancel:()=>_t(null),onSave:ye=>{M.some(Ae=>Ae.id===wt.id)?E(wt.id,ye):V(ye),Be(ye.id),_t(null)}}),Bt&&J&&r.jsx(D1,{result:J,testCaseCount:M.length,flows:Me,baseUrl:A?.targetUrl||J.startUrl,projectId:f,secrets:H,onSaveFlows:T,onGenerateTestCase:ye=>{V(ye),Xe(!1),nt("testcases")},onAddToFlow:xo,onClose:()=>Xe(!1),onOpenCases:()=>{Xe(!1),nt("testcases")}}),De&&!wt&&re==="testcases"&&M.find(ye=>ye.id===De)&&r.jsx(Mx,{testCase:M.find(ye=>ye.id===De),onEdit:()=>_t(M.find(ye=>ye.id===De)),onClose:()=>jt(void 0)}),Xt&&A&&r.jsx(H1,{projectName:A.name,projectId:A.id,targetUrl:A.targetUrl,secrets:H,onSave:D,onClear:K,onClose:()=>bt(!1),onSaveRecording:Rl,clickFilter:G,onChangeClickFilter:B,initialTab:yt}),gn&&r.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:r.jsxs("section",{className:"modern-modal confirm-delete-modal",role:"dialog","aria-modal":"true",children:[r.jsx("header",{className:"modal-header",children:r.jsxs("div",{children:[r.jsx("p",{className:"eyebrow",children:"Delete project"}),r.jsxs("h2",{children:["Remove “",gn.name,"”?"]}),r.jsx("p",{children:"The project will be removed from this local workspace. You can undo immediately afterward."})]})}),r.jsxs("footer",{className:"modal-footer",children:[r.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Nt(void 0),children:"Cancel"}),r.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{const ye=gn;Nt(void 0),j(ye.id).then(()=>vr(`Deleted project ${ye.name}`,()=>b(ye)))},children:"Delete project"})]})]})}),At&&r.jsxs("div",{className:"undo-toast",role:"status","aria-live":"polite",children:[r.jsx("span",{children:At.message}),r.jsx("button",{type:"button",onClick:()=>{At.restore(),An(void 0)},children:"Undo"}),r.jsx("button",{type:"button","aria-label":"Dismiss",onClick:()=>An(void 0),children:"×"})]}),fa&&r.jsx(oj,{sourceUrl:te?.startUrl??A?.targetUrl??"",initialLanguage:A?.testCaseLanguage,onLanguageChange:ye=>f&&O(f,ye),existingCases:M,onImport:Ol,onClose:()=>Ot(!1)}),He&&r.jsx(p_,{sourceUrl:te?.startUrl??A?.targetUrl??"",existingCases:M,onImport:Ol,onClose:()=>Ie(!1)}),El&&r.jsx(w_,{projects:h,onClose:()=>On(!1),onScout:ye=>vn(()=>{m(ye,"scout"),u(),ut({}),it({}),nt("overview"),On(!1)}),onEmpty:ye=>vn(()=>{m(ye,"empty"),u(),ut({}),it({}),nt("testcases"),On(!1)}),onSample:()=>vn(()=>{m("Practice Login Demo","empty",J_(),"https://practicetestautomation.com/practice-test-login/"),u(),ut({}),it({}),nt("overview"),On(!1)}),onOpenProject:ye=>vn(()=>{p(ye),u(),ut({}),it({}),nt("overview"),On(!1)})}),n==="loading"&&r.jsx("div",{className:"scout-lock",role:"status","aria-live":"polite",children:r.jsxs("div",{className:"scout-lock-card",children:[r.jsxs("div",{className:"scout-progress-head",children:[r.jsx("div",{className:"scout-progress-icon",children:"✦"}),r.jsxs("div",{children:[r.jsx("b",{children:"Scouting website with Playwright"}),r.jsx("span",{children:"Collecting pages, controls and event logs."})]})]}),r.jsxs(r.Fragment,{children:[r.jsx("span",{className:"scout-progress-track",children:r.jsx("i",{})}),r.jsx("strong",{className:"scout-progress-percent",children:"Working…"}),r.jsxs("code",{className:"scout-cli-line",children:["$ ",Wg[U],"…"]})]}),r.jsx("span",{children:"Please wait until Scout finishes."})]})}),pr&&r.jsx("div",{className:"navigation-loader",children:r.jsxs("div",{children:[r.jsx("span",{children:"LS"}),r.jsx("b",{children:"Opening workspace"}),r.jsx("small",{children:"Preparing your local QA tools…"})]})})]})]})}function iy(n){const l=new URL(n);return{startUrl:n,origin:l.origin,pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}function J_(){const n="https://practicetestautomation.com/practice-test-login/",l=iy(n);return l.origin=new URL(n).origin,l.testCases=[{id:"TC-LOGIN-001",module:"LOGIN",folder:"Authentication",tags:["smoke","login"],title:"Sign in with valid demo credentials",preconditions:["The Practice Test Automation login page is available"],steps:[{type:"navigate",url:n},{type:"fill",target:{strategy:"css",cssSelector:"#username"},value:"student"},{type:"fill",target:{strategy:"css",cssSelector:"#password"},value:"Password123"},{type:"click",target:{strategy:"role",role:"button",name:"Submit",cssSelector:"#submit"}},{type:"assertUrl",urlContains:"/logged-in-successfully/"},{type:"assertText",target:{strategy:"css",cssSelector:"strong"},text:"Congratulations"},{type:"assertVisible",target:{strategy:"role",role:"link",name:"Log out"}}],expectedResult:"The success page opens, shows a congratulations message, and displays Log out.",type:"positive",priority:"high",automationStatus:"ready",status:"pending",sourceUrl:n,notes:"Uses the public demo credentials published on Practice Test Automation."},{id:"TC-LOGIN-002",module:"LOGIN",folder:"Authentication",tags:["validation","login"],title:"Reject an invalid username",preconditions:["The Practice Test Automation login page is available"],steps:[{type:"navigate",url:n},{type:"fill",target:{strategy:"css",cssSelector:"#username"},value:"incorrectUser"},{type:"fill",target:{strategy:"css",cssSelector:"#password"},value:"Password123"},{type:"click",target:{strategy:"role",role:"button",name:"Submit",cssSelector:"#submit"}},{type:"assertText",target:{strategy:"css",cssSelector:"#error"},text:"Your username is invalid!"}],expectedResult:"The page displays “Your username is invalid!”.",type:"negative",priority:"high",automationStatus:"ready",status:"pending",sourceUrl:n},{id:"TC-LOGIN-003",module:"LOGIN",folder:"Authentication",tags:["validation","login"],title:"Reject an invalid password",preconditions:["The Practice Test Automation login page is available"],steps:[{type:"navigate",url:n},{type:"fill",target:{strategy:"css",cssSelector:"#username"},value:"student"},{type:"fill",target:{strategy:"css",cssSelector:"#password"},value:"incorrectPassword"},{type:"click",target:{strategy:"role",role:"button",name:"Submit",cssSelector:"#submit"}},{type:"assertText",target:{strategy:"css",cssSelector:"#error"},text:"Your password is invalid!"}],expectedResult:"The page displays “Your password is invalid!”.",type:"negative",priority:"high",automationStatus:"ready",status:"pending",sourceUrl:n}],l}xx.createRoot(document.getElementById("root")).render(r.jsx(I.StrictMode,{children:r.jsx(jx,{children:r.jsx(Q_,{})})}));
|