lazyscout 0.4.5 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -1
- package/dist/index.js +17572 -3768
- package/dist/web/assets/index-Ck4qpsiz.js +66 -0
- package/dist/web/assets/index-D9Jx_eV9.css +1 -0
- package/dist/web/guide/guide.css +254 -0
- package/dist/web/guide/guide.js +22 -0
- package/dist/web/guide/index.html +399 -0
- package/dist/web/index.html +2 -2
- package/package.json +4 -2
- package/dist/web/assets/index-C5nneGGd.css +0 -1
- package/dist/web/assets/index-DnlLX0tF.js +0 -58
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))o(c);new MutationObserver(c=>{for(const d of c)if(d.type==="childList")for(const f of d.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(c){const d={};return c.integrity&&(d.integrity=c.integrity),c.referrerPolicy&&(d.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?d.credentials="include":c.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function o(c){if(c.ep)return;c.ep=!0;const d=l(c);fetch(c.href,d)}})();var so=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Uv(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Gu={exports:{}},xs={};var Xm;function Kx(){if(Xm)return xs;Xm=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function l(o,c,d){var f=null;if(d!==void 0&&(f=""+d),c.key!==void 0&&(f=""+c.key),"key"in c){d={};for(var p in c)p!=="key"&&(d[p]=c[p])}else d=c;return c=d.ref,{$$typeof:n,type:o,key:f,ref:c!==void 0?c:null,props:d}}return xs.Fragment=i,xs.jsx=l,xs.jsxs=l,xs}var Zm;function Qx(){return Zm||(Zm=1,Gu.exports=Kx()),Gu.exports}var a=Qx(),Vu={exports:{}},He={};var Km;function Jx(){if(Km)return He;Km=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=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"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function b(x){return x===null||typeof x!="object"?null:(x=w&&x[w]||x["@@iterator"],typeof x=="function"?x:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,O={};function S(x,C,H){this.props=x,this.context=C,this.refs=O,this.updater=H||E}S.prototype.isReactComponent={},S.prototype.setState=function(x,C){if(typeof x!="object"&&typeof x!="function"&&x!=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,x,C,"setState")},S.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function T(){}T.prototype=S.prototype;function L(x,C,H){this.props=x,this.context=C,this.refs=O,this.updater=H||E}var D=L.prototype=new T;D.constructor=L,_(D,S.prototype),D.isPureReactComponent=!0;var M=Array.isArray;function V(){}var K={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function I(x,C,H){var G=H.ref;return{$$typeof:n,type:x,key:C,ref:G!==void 0?G:null,props:H}}function $(x,C){return I(x.type,C,x.props)}function ee(x){return typeof x=="object"&&x!==null&&x.$$typeof===n}function B(x){var C={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(H){return C[H]})}var Q=/\/+/g;function j(x,C){return typeof x=="object"&&x!==null&&x.key!=null?B(""+x.key):C.toString(36)}function F(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(V,V):(x.status="pending",x.then(function(C){x.status==="pending"&&(x.status="fulfilled",x.value=C)},function(C){x.status==="pending"&&(x.status="rejected",x.reason=C)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function X(x,C,H,G,te){var pe=typeof x;(pe==="undefined"||pe==="boolean")&&(x=null);var Ne=!1;if(x===null)Ne=!0;else switch(pe){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(x.$$typeof){case n:case i:Ne=!0;break;case y:return Ne=x._init,X(Ne(x._payload),C,H,G,te)}}if(Ne)return te=te(x),Ne=G===""?"."+j(x,0):G,M(te)?(H="",Ne!=null&&(H=Ne.replace(Q,"$&/")+"/"),X(te,C,H,"",function(_e){return _e})):te!=null&&(ee(te)&&(te=$(te,H+(te.key==null||x&&x.key===te.key?"":(""+te.key).replace(Q,"$&/")+"/")+Ne)),C.push(te)),1;Ne=0;var we=G===""?".":G+":";if(M(x))for(var se=0;se<x.length;se++)G=x[se],pe=we+j(G,se),Ne+=X(G,C,H,pe,te);else if(se=b(x),typeof se=="function")for(x=se.call(x),se=0;!(G=x.next()).done;)G=G.value,pe=we+j(G,se++),Ne+=X(G,C,H,pe,te);else if(pe==="object"){if(typeof x.then=="function")return X(F(x),C,H,G,te);throw C=String(x),Error("Objects are not valid as a React child (found: "+(C==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":C)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function Y(x,C,H){if(x==null)return x;var G=[],te=0;return X(x,G,"","",function(pe){return C.call(H,pe,te++)}),G}function Z(x){if(x._status===-1){var C=x._result;C=C(),C.then(function(H){(x._status===0||x._status===-1)&&(x._status=1,x._result=H)},function(H){(x._status===0||x._status===-1)&&(x._status=2,x._result=H)}),x._status===-1&&(x._status=0,x._result=C)}if(x._status===1)return x._result.default;throw x._result}var R=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var C=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(C))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},q={map:Y,forEach:function(x,C,H){Y(x,function(){C.apply(this,arguments)},H)},count:function(x){var C=0;return Y(x,function(){C++}),C},toArray:function(x){return Y(x,function(C){return C})||[]},only:function(x){if(!ee(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return He.Activity=v,He.Children=q,He.Component=S,He.Fragment=l,He.Profiler=c,He.PureComponent=L,He.StrictMode=o,He.Suspense=g,He.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=K,He.__COMPILER_RUNTIME={__proto__:null,c:function(x){return K.H.useMemoCache(x)}},He.cache=function(x){return function(){return x.apply(null,arguments)}},He.cacheSignal=function(){return null},He.cloneElement=function(x,C,H){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var G=_({},x.props),te=x.key;if(C!=null)for(pe in C.key!==void 0&&(te=""+C.key),C)!ae.call(C,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&C.ref===void 0||(G[pe]=C[pe]);var pe=arguments.length-2;if(pe===1)G.children=H;else if(1<pe){for(var Ne=Array(pe),we=0;we<pe;we++)Ne[we]=arguments[we+2];G.children=Ne}return I(x.type,te,G)},He.createContext=function(x){return x={$$typeof:f,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:d,_context:x},x},He.createElement=function(x,C,H){var G,te={},pe=null;if(C!=null)for(G in C.key!==void 0&&(pe=""+C.key),C)ae.call(C,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(te[G]=C[G]);var Ne=arguments.length-2;if(Ne===1)te.children=H;else if(1<Ne){for(var we=Array(Ne),se=0;se<Ne;se++)we[se]=arguments[se+2];te.children=we}if(x&&x.defaultProps)for(G in Ne=x.defaultProps,Ne)te[G]===void 0&&(te[G]=Ne[G]);return I(x,pe,te)},He.createRef=function(){return{current:null}},He.forwardRef=function(x){return{$$typeof:p,render:x}},He.isValidElement=ee,He.lazy=function(x){return{$$typeof:y,_payload:{_status:-1,_result:x},_init:Z}},He.memo=function(x,C){return{$$typeof:m,type:x,compare:C===void 0?null:C}},He.startTransition=function(x){var C=K.T,H={};K.T=H;try{var G=x(),te=K.S;te!==null&&te(H,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(V,R)}catch(pe){R(pe)}finally{C!==null&&H.types!==null&&(C.types=H.types),K.T=C}},He.unstable_useCacheRefresh=function(){return K.H.useCacheRefresh()},He.use=function(x){return K.H.use(x)},He.useActionState=function(x,C,H){return K.H.useActionState(x,C,H)},He.useCallback=function(x,C){return K.H.useCallback(x,C)},He.useContext=function(x){return K.H.useContext(x)},He.useDebugValue=function(){},He.useDeferredValue=function(x,C){return K.H.useDeferredValue(x,C)},He.useEffect=function(x,C){return K.H.useEffect(x,C)},He.useEffectEvent=function(x){return K.H.useEffectEvent(x)},He.useId=function(){return K.H.useId()},He.useImperativeHandle=function(x,C,H){return K.H.useImperativeHandle(x,C,H)},He.useInsertionEffect=function(x,C){return K.H.useInsertionEffect(x,C)},He.useLayoutEffect=function(x,C){return K.H.useLayoutEffect(x,C)},He.useMemo=function(x,C){return K.H.useMemo(x,C)},He.useOptimistic=function(x,C){return K.H.useOptimistic(x,C)},He.useReducer=function(x,C,H){return K.H.useReducer(x,C,H)},He.useRef=function(x){return K.H.useRef(x)},He.useState=function(x){return K.H.useState(x)},He.useSyncExternalStore=function(x,C,H){return K.H.useSyncExternalStore(x,C,H)},He.useTransition=function(){return K.H.useTransition()},He.version="19.2.8",He}var Qm;function nf(){return Qm||(Qm=1,Vu.exports=Jx()),Vu.exports}var z=nf();const Ni=Uv(z);var Fu={exports:{}},Ss={},Yu={exports:{}},Xu={};var Jm;function Wx(){return Jm||(Jm=1,(function(n){function i(X,Y){var Z=X.length;X.push(Y);e:for(;0<Z;){var R=Z-1>>>1,q=X[R];if(0<c(q,Y))X[R]=Y,X[Z]=q,Z=R;else break e}}function l(X){return X.length===0?null:X[0]}function o(X){if(X.length===0)return null;var Y=X[0],Z=X.pop();if(Z!==Y){X[0]=Z;e:for(var R=0,q=X.length,x=q>>>1;R<x;){var C=2*(R+1)-1,H=X[C],G=C+1,te=X[G];if(0>c(H,Z))G<q&&0>c(te,H)?(X[R]=te,X[G]=Z,R=G):(X[R]=H,X[C]=Z,R=C);else if(G<q&&0>c(te,Z))X[R]=te,X[G]=Z,R=G;else break e}}return Y}function c(X,Y){var Z=X.sortIndex-Y.sortIndex;return Z!==0?Z:X.id-Y.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var d=performance;n.unstable_now=function(){return d.now()}}else{var f=Date,p=f.now();n.unstable_now=function(){return f.now()-p}}var g=[],m=[],y=1,v=null,w=3,b=!1,E=!1,_=!1,O=!1,S=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function D(X){for(var Y=l(m);Y!==null;){if(Y.callback===null)o(m);else if(Y.startTime<=X)o(m),Y.sortIndex=Y.expirationTime,i(g,Y);else break;Y=l(m)}}function M(X){if(_=!1,D(X),!E)if(l(g)!==null)E=!0,V||(V=!0,B());else{var Y=l(m);Y!==null&&F(M,Y.startTime-X)}}var V=!1,K=-1,ae=5,I=-1;function $(){return O?!0:!(n.unstable_now()-I<ae)}function ee(){if(O=!1,V){var X=n.unstable_now();I=X;var Y=!0;try{e:{E=!1,_&&(_=!1,T(K),K=-1),b=!0;var Z=w;try{t:{for(D(X),v=l(g);v!==null&&!(v.expirationTime>X&&$());){var R=v.callback;if(typeof R=="function"){v.callback=null,w=v.priorityLevel;var q=R(v.expirationTime<=X);if(X=n.unstable_now(),typeof q=="function"){v.callback=q,D(X),Y=!0;break t}v===l(g)&&o(g),D(X)}else o(g);v=l(g)}if(v!==null)Y=!0;else{var x=l(m);x!==null&&F(M,x.startTime-X),Y=!1}}break e}finally{v=null,w=Z,b=!1}Y=void 0}}finally{Y?B():V=!1}}}var B;if(typeof L=="function")B=function(){L(ee)};else if(typeof MessageChannel<"u"){var Q=new MessageChannel,j=Q.port2;Q.port1.onmessage=ee,B=function(){j.postMessage(null)}}else B=function(){S(ee,0)};function F(X,Y){K=S(function(){X(n.unstable_now())},Y)}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(X){X.callback=null},n.unstable_forceFrameRate=function(X){0>X||125<X?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<X?Math.floor(1e3/X):5},n.unstable_getCurrentPriorityLevel=function(){return w},n.unstable_next=function(X){switch(w){case 1:case 2:case 3:var Y=3;break;default:Y=w}var Z=w;w=Y;try{return X()}finally{w=Z}},n.unstable_requestPaint=function(){O=!0},n.unstable_runWithPriority=function(X,Y){switch(X){case 1:case 2:case 3:case 4:case 5:break;default:X=3}var Z=w;w=X;try{return Y()}finally{w=Z}},n.unstable_scheduleCallback=function(X,Y,Z){var R=n.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?R+Z:R):Z=R,X){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=Z+q,X={id:y++,callback:Y,priorityLevel:X,startTime:Z,expirationTime:q,sortIndex:-1},Z>R?(X.sortIndex=Z,i(m,X),l(g)===null&&X===l(m)&&(_?(T(K),K=-1):_=!0,F(M,Z-R))):(X.sortIndex=q,i(g,X),E||b||(E=!0,V||(V=!0,B()))),X},n.unstable_shouldYield=$,n.unstable_wrapCallback=function(X){var Y=w;return function(){var Z=w;w=Y;try{return X.apply(this,arguments)}finally{w=Z}}}})(Xu)),Xu}var Wm;function e0(){return Wm||(Wm=1,Yu.exports=Wx()),Yu.exports}var Zu={exports:{}},cn={};var eg;function t0(){if(eg)return cn;eg=1;var n=nf();function i(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}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 l(){}var o={d:{f:l,r:function(){throw Error(i(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},c=Symbol.for("react.portal");function d(g,m,y){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:g,containerInfo:m,implementation:y}}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 cn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,cn.createPortal=function(g,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return d(g,m,null,y)},cn.flushSync=function(g){var m=f.T,y=o.p;try{if(f.T=null,o.p=2,g)return g()}finally{f.T=m,o.p=y,o.d.f()}},cn.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))},cn.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},cn.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var y=m.as,v=p(y,m.crossOrigin),w=typeof m.integrity=="string"?m.integrity:void 0,b=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?o.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:w,fetchPriority:b}):y==="script"&&o.d.X(g,{crossOrigin:v,integrity:w,fetchPriority:b,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},cn.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=p(m.as,m.crossOrigin);o.d.M(g,{crossOrigin:y,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)},cn.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,v=p(y,m.crossOrigin);o.d.L(g,y,{crossOrigin:v,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})}},cn.preloadModule=function(g,m){if(typeof g=="string")if(m){var y=p(m.as,m.crossOrigin);o.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else o.d.m(g)},cn.requestFormReset=function(g){o.d.r(g)},cn.unstable_batchedUpdates=function(g,m){return g(m)},cn.useFormState=function(g,m,y){return f.H.useFormState(g,m,y)},cn.useFormStatus=function(){return f.H.useHostTransitionStatus()},cn.version="19.2.8",cn}var tg;function n0(){if(tg)return Zu.exports;tg=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(i){console.error(i)}}return n(),Zu.exports=t0(),Zu.exports}var ng;function a0(){if(ng)return Ss;ng=1;var n=e0(),i=nf(),l=n0();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var r=2;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r])}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 c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function d(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r: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(d(e)!==e)throw Error(o(188))}function m(e){var t=e.alternate;if(!t){if(t=d(e),t===null)throw Error(o(188));return t!==e?null:e}for(var r=e,s=t;;){var u=r.return;if(u===null)break;var h=u.alternate;if(h===null){if(s=u.return,s!==null){r=s;continue}break}if(u.child===h.child){for(h=u.child;h;){if(h===r)return g(u),e;if(h===s)return g(u),t;h=h.sibling}throw Error(o(188))}if(r.return!==s.return)r=u,s=h;else{for(var N=!1,U=u.child;U;){if(U===r){N=!0,r=u,s=h;break}if(U===s){N=!0,s=u,r=h;break}U=U.sibling}if(!N){for(U=h.child;U;){if(U===r){N=!0,r=h,s=u;break}if(U===s){N=!0,s=h,r=u;break}U=U.sibling}if(!N)throw Error(o(189))}}if(r.alternate!==s)throw Error(o(190))}if(r.tag!==3)throw Error(o(188));return r.stateNode.current===r?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,w=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),T=Symbol.for("react.consumer"),L=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),K=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),$=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function B(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var Q=Symbol.for("react.client.reference");function j(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 _:return"Fragment";case S:return"Profiler";case O:return"StrictMode";case M:return"Suspense";case V:return"SuspenseList";case I:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case L:return e.displayName||"Context";case T:return(e._context.displayName||"Context")+".Consumer";case D:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K:return t=e.displayName||null,t!==null?t:j(e.type)||"Memo";case ae:t=e._payload,e=e._init;try{return j(e(t))}catch{}}return null}var F=Array.isArray,X=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},R=[],q=-1;function x(e){return{current:e}}function C(e){0>q||(e.current=R[q],R[q]=null,q--)}function H(e,t){q++,R[q]=e.current,e.current=t}var G=x(null),te=x(null),pe=x(null),Ne=x(null);function we(e,t){switch(H(pe,t),H(te,e),H(G,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?vm(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=vm(t),e=ym(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}C(G),H(G,e)}function se(){C(G),C(te),C(pe)}function _e(e){e.memoizedState!==null&&H(Ne,e);var t=G.current,r=ym(t,e.type);t!==r&&(H(te,e),H(G,r))}function Ce(e){te.current===e&&(C(G),C(te)),Ne.current===e&&(C(Ne),gs._currentValue=Z)}var qe,Ie;function A(e){if(qe===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);qe=t&&t[1]||"",Ie=-1<r.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<r.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+qe+e+Ie}var ge=!1;function ue(e,t){if(!e||ge)return"";ge=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var xe=function(){throw Error()};if(Object.defineProperty(xe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(xe,[])}catch(me){var de=me}Reflect.construct(e,[],xe)}else{try{xe.call()}catch(me){de=me}e.call(xe.prototype)}}else{try{throw Error()}catch(me){de=me}(xe=e())&&typeof xe.catch=="function"&&xe.catch(function(){})}}catch(me){if(me&&de&&typeof me.stack=="string")return[me.stack,de.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=s.DetermineComponentFrameRoot(),N=h[0],U=h[1];if(N&&U){var W=N.split(`
|
|
4
|
+
`),ce=U.split(`
|
|
5
|
+
`);for(u=s=0;s<W.length&&!W[s].includes("DetermineComponentFrameRoot");)s++;for(;u<ce.length&&!ce[u].includes("DetermineComponentFrameRoot");)u++;if(s===W.length||u===ce.length)for(s=W.length-1,u=ce.length-1;1<=s&&0<=u&&W[s]!==ce[u];)u--;for(;1<=s&&0<=u;s--,u--)if(W[s]!==ce[u]){if(s!==1||u!==1)do if(s--,u--,0>u||W[s]!==ce[u]){var ye=`
|
|
6
|
+
`+W[s].replace(" at new "," at ");return e.displayName&&ye.includes("<anonymous>")&&(ye=ye.replace("<anonymous>",e.displayName)),ye}while(1<=s&&0<=u);break}}}finally{ge=!1,Error.prepareStackTrace=r}return(r=e?e.displayName||e.name:"")?A(r):""}function P(e,t){switch(e.tag){case 26:case 27:case 5:return A(e.type);case 16:return A("Lazy");case 13:return e.child!==t&&t!==null?A("Suspense Fallback"):A("Suspense");case 19:return A("SuspenseList");case 0:case 15:return ue(e.type,!1);case 11:return ue(e.type.render,!1);case 1:return ue(e.type,!0);case 31:return A("Activity");default:return""}}function k(e){try{var t="",r=null;do t+=P(e,r),r=e,e=e.return;while(e);return t}catch(s){return`
|
|
7
|
+
Error generating stack: `+s.message+`
|
|
8
|
+
`+s.stack}}var J=Object.prototype.hasOwnProperty,he=n.unstable_scheduleCallback,fe=n.unstable_cancelCallback,ne=n.unstable_shouldYield,je=n.unstable_requestPaint,Te=n.unstable_now,Se=n.unstable_getCurrentPriorityLevel,Ee=n.unstable_ImmediatePriority,Ke=n.unstable_UserBlockingPriority,Me=n.unstable_NormalPriority,kt=n.unstable_LowPriority,Bt=n.unstable_IdlePriority,Tt=n.log,Wt=n.unstable_setDisableYieldValue,Ze=null,lt=null;function it(e){if(typeof Tt=="function"&&Wt(e),lt&&typeof lt.setStrictMode=="function")try{lt.setStrictMode(Ze,e)}catch{}}var Oe=Math.clz32?Math.clz32:Fe,pt=Math.log,jt=Math.LN2;function Fe(e){return e>>>=0,e===0?32:31-(pt(e)/jt|0)|0}var ot=256,Je=262144,Ye=4194304;function Ge(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 Et(e,t,r){var s=e.pendingLanes;if(s===0)return 0;var u=0,h=e.suspendedLanes,N=e.pingedLanes;e=e.warmLanes;var U=s&134217727;return U!==0?(s=U&~h,s!==0?u=Ge(s):(N&=U,N!==0?u=Ge(N):r||(r=U&~e,r!==0&&(u=Ge(r))))):(U=s&~h,U!==0?u=Ge(U):N!==0?u=Ge(N):r||(r=s&~e,r!==0&&(u=Ge(r)))),u===0?0:t!==0&&t!==u&&(t&h)===0&&(h=u&-u,r=t&-t,h>=r||h===32&&(r&4194048)!==0)?t:u}function Qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Pe(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 sn(){var e=Ye;return Ye<<=1,(Ye&62914560)===0&&(Ye=4194304),e}function la(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function st(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ze(e,t,r,s,u,h){var N=e.pendingLanes;e.pendingLanes=r,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=r,e.entangledLanes&=r,e.errorRecoveryDisabledLanes&=r,e.shellSuspendCounter=0;var U=e.entanglements,W=e.expirationTimes,ce=e.hiddenUpdates;for(r=N&~r;0<r;){var ye=31-Oe(r),xe=1<<ye;U[ye]=0,W[ye]=-1;var de=ce[ye];if(de!==null)for(ce[ye]=null,ye=0;ye<de.length;ye++){var me=de[ye];me!==null&&(me.lane&=-536870913)}r&=~xe}s!==0&&$e(e,s,0),h!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=h&~(N&~t))}function $e(e,t,r){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Oe(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|r&261930}function ga(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var s=31-Oe(r),u=1<<s;u&t|e[s]&t&&(e[s]|=t),r&=~u}}function ln(e,t){var r=t&-t;return r=(r&42)!==0?1:It(r),(r&(e.suspendedLanes|t))!==0?0:r}function It(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 Rt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function La(){var e=Y.p;return e!==0?e:(e=window.event,e===void 0?32:Pm(e.type))}function on(e,t){var r=Y.p;try{return Y.p=e,t()}finally{Y.p=r}}var Kt=Math.random().toString(36).slice(2),At="__reactFiber$"+Kt,Ft="__reactProps$"+Kt,fn="__reactContainer$"+Kt,Ua="__reactEvents$"+Kt,Qt="__reactListeners$"+Kt,Cn="__reactHandles$"+Kt,_n="__reactResources$"+Kt,vn="__reactMarker$"+Kt;function hn(e){delete e[At],delete e[Ft],delete e[Ua],delete e[Qt],delete e[Cn]}function Yt(e){var t=e[At];if(t)return t;for(var r=e.parentNode;r;){if(t=r[fn]||r[At]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Cm(e);e!==null;){if(r=e[At])return r;e=Cm(e)}return t}e=r,r=e.parentNode}return null}function Tn(e){if(e=e[At]||e[fn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function En(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function ct(e){var t=e[_n];return t||(t=e[_n]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function wt(e){e[vn]=!0}var Br=new Set,Ir={};function An(e,t){oa(e,t),oa(e+"Capture",t)}function oa(e,t){for(Ir[e]=t,e=0;e<t.length;e++)Br.add(t[e])}var Ai=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]*$"),On={},za={};function mr(e){return J.call(za,e)?!0:J.call(On,e)?!1:Ai.test(e)?za[e]=!0:(On[e]=!0,!1)}function Ma(e,t,r){if(mr(t))if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+r)}}function Ba(e,t,r){if(r===null)e.removeAttribute(t);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+r)}}function kn(e,t,r,s){if(s===null)e.removeAttribute(r);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(r);return}e.setAttributeNS(t,r,""+s)}}function ie(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ae(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Xt(e,t,r){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var u=s.get,h=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return u.call(this)},set:function(N){r=""+N,h.call(this,N)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return r},setValue:function(N){r=""+N},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dt(e){if(!e._valueTracker){var t=Ae(e)?"checked":"value";e._valueTracker=Xt(e,t,""+e[t])}}function Oi(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),s="";return e&&(s=Ae(e)?e.checked?"true":"false":e.value),e=s,e!==r?(t.setValue(e),!0):!1}function gr(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 $o=/[\n"\\]/g;function yn(e){return e.replace($o,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ve(e,t,r,s,u,h,N,U){e.name="",N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?e.type=N:e.removeAttribute("type"),t!=null?N==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ie(t)):e.value!==""+ie(t)&&(e.value=""+ie(t)):N!=="submit"&&N!=="reset"||e.removeAttribute("value"),t!=null?ut(e,N,ie(t)):r!=null?ut(e,N,ie(r)):s!=null&&e.removeAttribute("value"),u==null&&h!=null&&(e.defaultChecked=!!h),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),U!=null&&typeof U!="function"&&typeof U!="symbol"&&typeof U!="boolean"?e.name=""+ie(U):e.removeAttribute("name")}function ke(e,t,r,s,u,h,N,U){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),t!=null||r!=null){if(!(h!=="submit"&&h!=="reset"||t!=null)){Dt(e);return}r=r!=null?""+ie(r):"",t=t!=null?""+ie(t):r,U||t===e.value||(e.value=t),e.defaultValue=t}s=s??u,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=U?e.checked:!!s,e.defaultChecked=!!s,N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"&&(e.name=N),Dt(e)}function ut(e,t,r){t==="number"&&gr(e.ownerDocument)===e||e.defaultValue===""+r||(e.defaultValue=""+r)}function xt(e,t,r,s){if(e=e.options,t){t={};for(var u=0;u<r.length;u++)t["$"+r[u]]=!0;for(r=0;r<e.length;r++)u=t.hasOwnProperty("$"+e[r].value),e[r].selected!==u&&(e[r].selected=u),u&&s&&(e[r].defaultSelected=!0)}else{for(r=""+ie(r),t=null,u=0;u<e.length;u++){if(e[u].value===r){e[u].selected=!0,s&&(e[u].defaultSelected=!0);return}t!==null||e[u].disabled||(t=e[u])}t!==null&&(t.selected=!0)}}function en(e,t,r){if(t!=null&&(t=""+ie(t),t!==e.value&&(e.value=t),r==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=r!=null?""+ie(r):""}function Lt(e,t,r,s){if(t==null){if(s!=null){if(r!=null)throw Error(o(92));if(F(s)){if(1<s.length)throw Error(o(93));s=s[0]}r=s}r==null&&(r=""),t=r}r=ie(t),e.defaultValue=r,s=e.textContent,s===r&&s!==""&&s!==null&&(e.value=s),Dt(e)}function Rn(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Po=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 Ks(e,t,r){var s=t.indexOf("--")===0;r==null||typeof r=="boolean"||r===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,r):typeof r!="number"||r===0||Po.has(t)?t==="float"?e.cssFloat=r:e[t]=(""+r).trim():e[t]=r+"px"}function Qs(e,t,r){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,r!=null){for(var s in r)!r.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var u in t)s=t[u],t.hasOwnProperty(u)&&r[u]!==s&&Ks(e,u,s)}else for(var h in t)t.hasOwnProperty(h)&&Ks(e,h,t[h])}function Jn(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 ki=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"]]),$r=/^[\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 pn(e){return $r.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Wn(){}var Ri=null;function qo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Pr=null,qr=null;function gf(e){var t=Tn(e);if(t&&(e=t.stateNode)){var r=e[Ft]||null;e:switch(e=t.stateNode,t.type){case"input":if(ve(e,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll('input[name="'+yn(""+t)+'"][type="radio"]'),t=0;t<r.length;t++){var s=r[t];if(s!==e&&s.form===e.form){var u=s[Ft]||null;if(!u)throw Error(o(90));ve(s,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(t=0;t<r.length;t++)s=r[t],s.form===e.form&&Oi(s)}break e;case"textarea":en(e,r.value,r.defaultValue);break e;case"select":t=r.value,t!=null&&xt(e,!!r.multiple,t,!1)}}}var Ho=!1;function vf(e,t,r){if(Ho)return e(t,r);Ho=!0;try{var s=e(t);return s}finally{if(Ho=!1,(Pr!==null||qr!==null)&&(Bl(),Pr&&(t=Pr,e=qr,qr=Pr=null,gf(t),e)))for(t=0;t<e.length;t++)gf(e[t])}}function Di(e,t){var r=e.stateNode;if(r===null)return null;var s=r[Ft]||null;if(s===null)return null;r=s[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":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(o(231,t,typeof r));return r}var va=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Go=!1;if(va)try{var Li={};Object.defineProperty(Li,"passive",{get:function(){Go=!0}}),window.addEventListener("test",Li,Li),window.removeEventListener("test",Li,Li)}catch{Go=!1}var Ia=null,Vo=null,Js=null;function yf(){if(Js)return Js;var e,t=Vo,r=t.length,s,u="value"in Ia?Ia.value:Ia.textContent,h=u.length;for(e=0;e<r&&t[e]===u[e];e++);var N=r-e;for(s=1;s<=N&&t[r-s]===u[h-s];s++);return Js=u.slice(e,1<s?1-s:void 0)}function Ws(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 el(){return!0}function bf(){return!1}function bn(e){function t(r,s,u,h,N){this._reactName=r,this._targetInst=u,this.type=s,this.nativeEvent=h,this.target=N,this.currentTarget=null;for(var U in e)e.hasOwnProperty(U)&&(r=e[U],this[U]=r?r(h):h[U]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?el:bf,this.isPropagationStopped=bf,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=el)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=el)},persist:function(){},isPersistent:el}),t}var vr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},tl=bn(vr),Ui=v({},vr,{view:0,detail:0}),Xy=bn(Ui),Fo,Yo,zi,nl=v({},Ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zo,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!==zi&&(zi&&e.type==="mousemove"?(Fo=e.screenX-zi.screenX,Yo=e.screenY-zi.screenY):Yo=Fo=0,zi=e),Fo)},movementY:function(e){return"movementY"in e?e.movementY:Yo}}),xf=bn(nl),Zy=v({},nl,{dataTransfer:0}),Ky=bn(Zy),Qy=v({},Ui,{relatedTarget:0}),Xo=bn(Qy),Jy=v({},vr,{animationName:0,elapsedTime:0,pseudoElement:0}),Wy=bn(Jy),eb=v({},vr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),tb=bn(eb),nb=v({},vr,{data:0}),Sf=bn(nb),ab={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rb={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"},ib={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=ib[e])?!!t[e]:!1}function Zo(){return sb}var lb=v({},Ui,{key:function(e){if(e.key){var t=ab[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ws(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zo,charCode:function(e){return e.type==="keypress"?Ws(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ws(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),ob=bn(lb),cb=v({},nl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jf=bn(cb),ub=v({},Ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zo}),db=bn(ub),fb=v({},vr,{propertyName:0,elapsedTime:0,pseudoElement:0}),hb=bn(fb),pb=v({},nl,{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}),mb=bn(pb),gb=v({},vr,{newState:0,oldState:0}),vb=bn(gb),yb=[9,13,27,32],Ko=va&&"CompositionEvent"in window,Mi=null;va&&"documentMode"in document&&(Mi=document.documentMode);var bb=va&&"TextEvent"in window&&!Mi,wf=va&&(!Ko||Mi&&8<Mi&&11>=Mi),Nf=" ",Cf=!1;function _f(e,t){switch(e){case"keyup":return yb.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hr=!1;function xb(e,t){switch(e){case"compositionend":return Tf(t);case"keypress":return t.which!==32?null:(Cf=!0,Nf);case"textInput":return e=t.data,e===Nf&&Cf?null:e;default:return null}}function Sb(e,t){if(Hr)return e==="compositionend"||!Ko&&_f(e,t)?(e=yf(),Js=Vo=Ia=null,Hr=!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 wf&&t.locale!=="ko"?null:t.data;default:return null}}var jb={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 Ef(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!jb[e.type]:t==="textarea"}function Af(e,t,r,s){Pr?qr?qr.push(s):qr=[s]:Pr=s,t=Vl(t,"onChange"),0<t.length&&(r=new tl("onChange","change",null,r,s),e.push({event:r,listeners:t}))}var Bi=null,Ii=null;function wb(e){dm(e,0)}function al(e){var t=En(e);if(Oi(t))return e}function Of(e,t){if(e==="change")return t}var kf=!1;if(va){var Qo;if(va){var Jo="oninput"in document;if(!Jo){var Rf=document.createElement("div");Rf.setAttribute("oninput","return;"),Jo=typeof Rf.oninput=="function"}Qo=Jo}else Qo=!1;kf=Qo&&(!document.documentMode||9<document.documentMode)}function Df(){Bi&&(Bi.detachEvent("onpropertychange",Lf),Ii=Bi=null)}function Lf(e){if(e.propertyName==="value"&&al(Ii)){var t=[];Af(t,Ii,e,qo(e)),vf(wb,t)}}function Nb(e,t,r){e==="focusin"?(Df(),Bi=t,Ii=r,Bi.attachEvent("onpropertychange",Lf)):e==="focusout"&&Df()}function Cb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return al(Ii)}function _b(e,t){if(e==="click")return al(t)}function Tb(e,t){if(e==="input"||e==="change")return al(t)}function Eb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Dn=typeof Object.is=="function"?Object.is:Eb;function $i(e,t){if(Dn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),s=Object.keys(t);if(r.length!==s.length)return!1;for(s=0;s<r.length;s++){var u=r[s];if(!J.call(t,u)||!Dn(e[u],t[u]))return!1}return!0}function Uf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function zf(e,t){var r=Uf(e);e=0;for(var s;r;){if(r.nodeType===3){if(s=e+r.textContent.length,e<=t&&s>=t)return{node:r,offset:t-e};e=s}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Uf(r)}}function Mf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Mf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=gr(e.document);t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=gr(e.document)}return t}function Wo(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 Ab=va&&"documentMode"in document&&11>=document.documentMode,Gr=null,ec=null,Pi=null,tc=!1;function If(e,t,r){var s=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;tc||Gr==null||Gr!==gr(s)||(s=Gr,"selectionStart"in s&&Wo(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Pi&&$i(Pi,s)||(Pi=s,s=Vl(ec,"onSelect"),0<s.length&&(t=new tl("onSelect","select",null,t,r),e.push({event:t,listeners:s}),t.target=Gr)))}function yr(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Vr={animationend:yr("Animation","AnimationEnd"),animationiteration:yr("Animation","AnimationIteration"),animationstart:yr("Animation","AnimationStart"),transitionrun:yr("Transition","TransitionRun"),transitionstart:yr("Transition","TransitionStart"),transitioncancel:yr("Transition","TransitionCancel"),transitionend:yr("Transition","TransitionEnd")},nc={},$f={};va&&($f=document.createElement("div").style,"AnimationEvent"in window||(delete Vr.animationend.animation,delete Vr.animationiteration.animation,delete Vr.animationstart.animation),"TransitionEvent"in window||delete Vr.transitionend.transition);function br(e){if(nc[e])return nc[e];if(!Vr[e])return e;var t=Vr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in $f)return nc[e]=t[r];return e}var Pf=br("animationend"),qf=br("animationiteration"),Hf=br("animationstart"),Ob=br("transitionrun"),kb=br("transitionstart"),Rb=br("transitioncancel"),Gf=br("transitionend"),Vf=new Map,ac="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(" ");ac.push("scrollEnd");function ea(e,t){Vf.set(e,t),An(t,[e])}var rl=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)},qn=[],Fr=0,rc=0;function il(){for(var e=Fr,t=rc=Fr=0;t<e;){var r=qn[t];qn[t++]=null;var s=qn[t];qn[t++]=null;var u=qn[t];qn[t++]=null;var h=qn[t];if(qn[t++]=null,s!==null&&u!==null){var N=s.pending;N===null?u.next=u:(u.next=N.next,N.next=u),s.pending=u}h!==0&&Ff(r,u,h)}}function sl(e,t,r,s){qn[Fr++]=e,qn[Fr++]=t,qn[Fr++]=r,qn[Fr++]=s,rc|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function ic(e,t,r,s){return sl(e,t,r,s),ll(e)}function xr(e,t){return sl(e,null,null,t),ll(e)}function Ff(e,t,r){e.lanes|=r;var s=e.alternate;s!==null&&(s.lanes|=r);for(var u=!1,h=e.return;h!==null;)h.childLanes|=r,s=h.alternate,s!==null&&(s.childLanes|=r),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(u=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,u&&t!==null&&(u=31-Oe(r),e=h.hiddenUpdates,s=e[u],s===null?e[u]=[t]:s.push(t),t.lane=r|536870912),h):null}function ll(e){if(50<cs)throw cs=0,pu=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Yr={};function Db(e,t,r,s){this.tag=e,this.key=r,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ln(e,t,r,s){return new Db(e,t,r,s)}function sc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ya(e,t){var r=e.alternate;return r===null?(r=Ln(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&65011712,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r.refCleanup=e.refCleanup,r}function Yf(e,t){e.flags&=65011714;var r=e.alternate;return r===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=r.childLanes,e.lanes=r.lanes,e.child=r.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=r.memoizedProps,e.memoizedState=r.memoizedState,e.updateQueue=r.updateQueue,e.type=r.type,t=r.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ol(e,t,r,s,u,h){var N=0;if(s=e,typeof e=="function")sc(e)&&(N=1);else if(typeof e=="string")N=Bx(e,r,G.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case I:return e=Ln(31,r,t,u),e.elementType=I,e.lanes=h,e;case _:return Sr(r.children,u,h,t);case O:N=8,u|=24;break;case S:return e=Ln(12,r,t,u|2),e.elementType=S,e.lanes=h,e;case M:return e=Ln(13,r,t,u),e.elementType=M,e.lanes=h,e;case V:return e=Ln(19,r,t,u),e.elementType=V,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case L:N=10;break e;case T:N=9;break e;case D:N=11;break e;case K:N=14;break e;case ae:N=16,s=null;break e}N=29,r=Error(o(130,e===null?"null":typeof e,"")),s=null}return t=Ln(N,r,t,u),t.elementType=e,t.type=s,t.lanes=h,t}function Sr(e,t,r,s){return e=Ln(7,e,s,t),e.lanes=r,e}function lc(e,t,r){return e=Ln(6,e,null,t),e.lanes=r,e}function Xf(e){var t=Ln(18,null,null,0);return t.stateNode=e,t}function oc(e,t,r){return t=Ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Zf=new WeakMap;function Hn(e,t){if(typeof e=="object"&&e!==null){var r=Zf.get(e);return r!==void 0?r:(t={value:e,source:t,stack:k(t)},Zf.set(e,t),t)}return{value:e,source:t,stack:k(t)}}var Xr=[],Zr=0,cl=null,qi=0,Gn=[],Vn=0,$a=null,ca=1,ua="";function ba(e,t){Xr[Zr++]=qi,Xr[Zr++]=cl,cl=e,qi=t}function Kf(e,t,r){Gn[Vn++]=ca,Gn[Vn++]=ua,Gn[Vn++]=$a,$a=e;var s=ca;e=ua;var u=32-Oe(s)-1;s&=~(1<<u),r+=1;var h=32-Oe(t)+u;if(30<h){var N=u-u%5;h=(s&(1<<N)-1).toString(32),s>>=N,u-=N,ca=1<<32-Oe(t)+u|r<<u|s,ua=h+e}else ca=1<<h|r<<u|s,ua=e}function cc(e){e.return!==null&&(ba(e,1),Kf(e,1,0))}function uc(e){for(;e===cl;)cl=Xr[--Zr],Xr[Zr]=null,qi=Xr[--Zr],Xr[Zr]=null;for(;e===$a;)$a=Gn[--Vn],Gn[Vn]=null,ua=Gn[--Vn],Gn[Vn]=null,ca=Gn[--Vn],Gn[Vn]=null}function Qf(e,t){Gn[Vn++]=ca,Gn[Vn++]=ua,Gn[Vn++]=$a,ca=t.id,ua=t.overflow,$a=e}var tn=null,Nt=null,rt=!1,Pa=null,Fn=!1,dc=Error(o(519));function qa(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Hi(Hn(t,e)),dc}function Jf(e){var t=e.stateNode,r=e.type,s=e.memoizedProps;switch(t[At]=e,t[Ft]=s,r){case"dialog":tt("cancel",t),tt("close",t);break;case"iframe":case"object":case"embed":tt("load",t);break;case"video":case"audio":for(r=0;r<ds.length;r++)tt(ds[r],t);break;case"source":tt("error",t);break;case"img":case"image":case"link":tt("error",t),tt("load",t);break;case"details":tt("toggle",t);break;case"input":tt("invalid",t),ke(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":tt("invalid",t);break;case"textarea":tt("invalid",t),Lt(t,s.value,s.defaultValue,s.children)}r=s.children,typeof r!="string"&&typeof r!="number"&&typeof r!="bigint"||t.textContent===""+r||s.suppressHydrationWarning===!0||mm(t.textContent,r)?(s.popover!=null&&(tt("beforetoggle",t),tt("toggle",t)),s.onScroll!=null&&tt("scroll",t),s.onScrollEnd!=null&&tt("scrollend",t),s.onClick!=null&&(t.onclick=Wn),t=!0):t=!1,t||qa(e,!0)}function Wf(e){for(tn=e.return;tn;)switch(tn.tag){case 5:case 31:case 13:Fn=!1;return;case 27:case 3:Fn=!0;return;default:tn=tn.return}}function Kr(e){if(e!==tn)return!1;if(!rt)return Wf(e),rt=!0,!1;var t=e.tag,r;if((r=t!==3&&t!==27)&&((r=t===5)&&(r=e.type,r=!(r!=="form"&&r!=="button")||Au(e.type,e.memoizedProps)),r=!r),r&&Nt&&qa(e),Wf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Nt=Nm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Nt=Nm(e)}else t===27?(t=Nt,nr(e.type)?(e=Lu,Lu=null,Nt=e):Nt=t):Nt=tn?Xn(e.stateNode.nextSibling):null;return!0}function jr(){Nt=tn=null,rt=!1}function fc(){var e=Pa;return e!==null&&(wn===null?wn=e:wn.push.apply(wn,e),Pa=null),e}function Hi(e){Pa===null?Pa=[e]:Pa.push(e)}var hc=x(null),wr=null,xa=null;function Ha(e,t,r){H(hc,t._currentValue),t._currentValue=r}function Sa(e){e._currentValue=hc.current,C(hc)}function pc(e,t,r){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===r)break;e=e.return}}function mc(e,t,r,s){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var h=u.dependencies;if(h!==null){var N=u.child;h=h.firstContext;e:for(;h!==null;){var U=h;h=u;for(var W=0;W<t.length;W++)if(U.context===t[W]){h.lanes|=r,U=h.alternate,U!==null&&(U.lanes|=r),pc(h.return,r,e),s||(N=null);break e}h=U.next}}else if(u.tag===18){if(N=u.return,N===null)throw Error(o(341));N.lanes|=r,h=N.alternate,h!==null&&(h.lanes|=r),pc(N,r,e),N=null}else N=u.child;if(N!==null)N.return=u;else for(N=u;N!==null;){if(N===e){N=null;break}if(u=N.sibling,u!==null){u.return=N.return,N=u;break}N=N.return}u=N}}function Qr(e,t,r,s){e=null;for(var u=t,h=!1;u!==null;){if(!h){if((u.flags&524288)!==0)h=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var N=u.alternate;if(N===null)throw Error(o(387));if(N=N.memoizedProps,N!==null){var U=u.type;Dn(u.pendingProps.value,N.value)||(e!==null?e.push(U):e=[U])}}else if(u===Ne.current){if(N=u.alternate,N===null)throw Error(o(387));N.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(gs):e=[gs])}u=u.return}e!==null&&mc(t,e,r,s),t.flags|=262144}function ul(e){for(e=e.firstContext;e!==null;){if(!Dn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Nr(e){wr=e,xa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function nn(e){return eh(wr,e)}function dl(e,t){return wr===null&&Nr(e),eh(e,t)}function eh(e,t){var r=t._currentValue;if(t={context:t,memoizedValue:r,next:null},xa===null){if(e===null)throw Error(o(308));xa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else xa=xa.next=t;return r}var Lb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(r,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(r){return r()})}},Ub=n.unstable_scheduleCallback,zb=n.unstable_NormalPriority,qt={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gc(){return{controller:new Lb,data:new Map,refCount:0}}function Gi(e){e.refCount--,e.refCount===0&&Ub(zb,function(){e.controller.abort()})}var Vi=null,vc=0,Jr=0,Wr=null;function Mb(e,t){if(Vi===null){var r=Vi=[];vc=0,Jr=xu(),Wr={status:"pending",value:void 0,then:function(s){r.push(s)}}}return vc++,t.then(th,th),t}function th(){if(--vc===0&&Vi!==null){Wr!==null&&(Wr.status="fulfilled");var e=Vi;Vi=null,Jr=0,Wr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Bb(e,t){var r=[],s={status:"pending",value:null,reason:null,then:function(u){r.push(u)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var u=0;u<r.length;u++)(0,r[u])(t)},function(u){for(s.status="rejected",s.reason=u,u=0;u<r.length;u++)(0,r[u])(void 0)}),s}var nh=X.S;X.S=function(e,t){Ip=Te(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Mb(e,t),nh!==null&&nh(e,t)};var Cr=x(null);function yc(){var e=Cr.current;return e!==null?e:St.pooledCache}function fl(e,t){t===null?H(Cr,Cr.current):H(Cr,t.pool)}function ah(){var e=yc();return e===null?null:{parent:qt._currentValue,pool:e}}var ei=Error(o(460)),bc=Error(o(474)),hl=Error(o(542)),pl={then:function(){}};function rh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function ih(e,t,r){switch(r=e[r],r===void 0?e.push(t):r!==t&&(t.then(Wn,Wn),t=r),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,lh(e),e;default:if(typeof t.status=="string")t.then(Wn,Wn);else{if(e=St,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var u=t;u.status="fulfilled",u.value=s}},function(s){if(t.status==="pending"){var u=t;u.status="rejected",u.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,lh(e),e}throw Tr=t,ei}}function _r(e){try{var t=e._init;return t(e._payload)}catch(r){throw r!==null&&typeof r=="object"&&typeof r.then=="function"?(Tr=r,ei):r}}var Tr=null;function sh(){if(Tr===null)throw Error(o(459));var e=Tr;return Tr=null,e}function lh(e){if(e===ei||e===hl)throw Error(o(483))}var ti=null,Fi=0;function ml(e){var t=Fi;return Fi+=1,ti===null&&(ti=[]),ih(ti,e,t)}function Yi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function gl(e,t){throw t.$$typeof===w?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function oh(e){function t(le,re){if(e){var oe=le.deletions;oe===null?(le.deletions=[re],le.flags|=16):oe.push(re)}}function r(le,re){if(!e)return null;for(;re!==null;)t(le,re),re=re.sibling;return null}function s(le){for(var re=new Map;le!==null;)le.key!==null?re.set(le.key,le):re.set(le.index,le),le=le.sibling;return re}function u(le,re){return le=ya(le,re),le.index=0,le.sibling=null,le}function h(le,re,oe){return le.index=oe,e?(oe=le.alternate,oe!==null?(oe=oe.index,oe<re?(le.flags|=67108866,re):oe):(le.flags|=67108866,re)):(le.flags|=1048576,re)}function N(le){return e&&le.alternate===null&&(le.flags|=67108866),le}function U(le,re,oe,be){return re===null||re.tag!==6?(re=lc(oe,le.mode,be),re.return=le,re):(re=u(re,oe),re.return=le,re)}function W(le,re,oe,be){var Ue=oe.type;return Ue===_?ye(le,re,oe.props.children,be,oe.key):re!==null&&(re.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===ae&&_r(Ue)===re.type)?(re=u(re,oe.props),Yi(re,oe),re.return=le,re):(re=ol(oe.type,oe.key,oe.props,null,le.mode,be),Yi(re,oe),re.return=le,re)}function ce(le,re,oe,be){return re===null||re.tag!==4||re.stateNode.containerInfo!==oe.containerInfo||re.stateNode.implementation!==oe.implementation?(re=oc(oe,le.mode,be),re.return=le,re):(re=u(re,oe.children||[]),re.return=le,re)}function ye(le,re,oe,be,Ue){return re===null||re.tag!==7?(re=Sr(oe,le.mode,be,Ue),re.return=le,re):(re=u(re,oe),re.return=le,re)}function xe(le,re,oe){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return re=lc(""+re,le.mode,oe),re.return=le,re;if(typeof re=="object"&&re!==null){switch(re.$$typeof){case b:return oe=ol(re.type,re.key,re.props,null,le.mode,oe),Yi(oe,re),oe.return=le,oe;case E:return re=oc(re,le.mode,oe),re.return=le,re;case ae:return re=_r(re),xe(le,re,oe)}if(F(re)||B(re))return re=Sr(re,le.mode,oe,null),re.return=le,re;if(typeof re.then=="function")return xe(le,ml(re),oe);if(re.$$typeof===L)return xe(le,dl(le,re),oe);gl(le,re)}return null}function de(le,re,oe,be){var Ue=re!==null?re.key:null;if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Ue!==null?null:U(le,re,""+oe,be);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:return oe.key===Ue?W(le,re,oe,be):null;case E:return oe.key===Ue?ce(le,re,oe,be):null;case ae:return oe=_r(oe),de(le,re,oe,be)}if(F(oe)||B(oe))return Ue!==null?null:ye(le,re,oe,be,null);if(typeof oe.then=="function")return de(le,re,ml(oe),be);if(oe.$$typeof===L)return de(le,re,dl(le,oe),be);gl(le,oe)}return null}function me(le,re,oe,be,Ue){if(typeof be=="string"&&be!==""||typeof be=="number"||typeof be=="bigint")return le=le.get(oe)||null,U(re,le,""+be,Ue);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case b:return le=le.get(be.key===null?oe:be.key)||null,W(re,le,be,Ue);case E:return le=le.get(be.key===null?oe:be.key)||null,ce(re,le,be,Ue);case ae:return be=_r(be),me(le,re,oe,be,Ue)}if(F(be)||B(be))return le=le.get(oe)||null,ye(re,le,be,Ue,null);if(typeof be.then=="function")return me(le,re,oe,ml(be),Ue);if(be.$$typeof===L)return me(le,re,oe,dl(re,be),Ue);gl(re,be)}return null}function Re(le,re,oe,be){for(var Ue=null,dt=null,De=re,Xe=re=0,at=null;De!==null&&Xe<oe.length;Xe++){De.index>Xe?(at=De,De=null):at=De.sibling;var ft=de(le,De,oe[Xe],be);if(ft===null){De===null&&(De=at);break}e&&De&&ft.alternate===null&&t(le,De),re=h(ft,re,Xe),dt===null?Ue=ft:dt.sibling=ft,dt=ft,De=at}if(Xe===oe.length)return r(le,De),rt&&ba(le,Xe),Ue;if(De===null){for(;Xe<oe.length;Xe++)De=xe(le,oe[Xe],be),De!==null&&(re=h(De,re,Xe),dt===null?Ue=De:dt.sibling=De,dt=De);return rt&&ba(le,Xe),Ue}for(De=s(De);Xe<oe.length;Xe++)at=me(De,le,Xe,oe[Xe],be),at!==null&&(e&&at.alternate!==null&&De.delete(at.key===null?Xe:at.key),re=h(at,re,Xe),dt===null?Ue=at:dt.sibling=at,dt=at);return e&&De.forEach(function(lr){return t(le,lr)}),rt&&ba(le,Xe),Ue}function Be(le,re,oe,be){if(oe==null)throw Error(o(151));for(var Ue=null,dt=null,De=re,Xe=re=0,at=null,ft=oe.next();De!==null&&!ft.done;Xe++,ft=oe.next()){De.index>Xe?(at=De,De=null):at=De.sibling;var lr=de(le,De,ft.value,be);if(lr===null){De===null&&(De=at);break}e&&De&&lr.alternate===null&&t(le,De),re=h(lr,re,Xe),dt===null?Ue=lr:dt.sibling=lr,dt=lr,De=at}if(ft.done)return r(le,De),rt&&ba(le,Xe),Ue;if(De===null){for(;!ft.done;Xe++,ft=oe.next())ft=xe(le,ft.value,be),ft!==null&&(re=h(ft,re,Xe),dt===null?Ue=ft:dt.sibling=ft,dt=ft);return rt&&ba(le,Xe),Ue}for(De=s(De);!ft.done;Xe++,ft=oe.next())ft=me(De,le,Xe,ft.value,be),ft!==null&&(e&&ft.alternate!==null&&De.delete(ft.key===null?Xe:ft.key),re=h(ft,re,Xe),dt===null?Ue=ft:dt.sibling=ft,dt=ft);return e&&De.forEach(function(Zx){return t(le,Zx)}),rt&&ba(le,Xe),Ue}function bt(le,re,oe,be){if(typeof oe=="object"&&oe!==null&&oe.type===_&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:e:{for(var Ue=oe.key;re!==null;){if(re.key===Ue){if(Ue=oe.type,Ue===_){if(re.tag===7){r(le,re.sibling),be=u(re,oe.props.children),be.return=le,le=be;break e}}else if(re.elementType===Ue||typeof Ue=="object"&&Ue!==null&&Ue.$$typeof===ae&&_r(Ue)===re.type){r(le,re.sibling),be=u(re,oe.props),Yi(be,oe),be.return=le,le=be;break e}r(le,re);break}else t(le,re);re=re.sibling}oe.type===_?(be=Sr(oe.props.children,le.mode,be,oe.key),be.return=le,le=be):(be=ol(oe.type,oe.key,oe.props,null,le.mode,be),Yi(be,oe),be.return=le,le=be)}return N(le);case E:e:{for(Ue=oe.key;re!==null;){if(re.key===Ue)if(re.tag===4&&re.stateNode.containerInfo===oe.containerInfo&&re.stateNode.implementation===oe.implementation){r(le,re.sibling),be=u(re,oe.children||[]),be.return=le,le=be;break e}else{r(le,re);break}else t(le,re);re=re.sibling}be=oc(oe,le.mode,be),be.return=le,le=be}return N(le);case ae:return oe=_r(oe),bt(le,re,oe,be)}if(F(oe))return Re(le,re,oe,be);if(B(oe)){if(Ue=B(oe),typeof Ue!="function")throw Error(o(150));return oe=Ue.call(oe),Be(le,re,oe,be)}if(typeof oe.then=="function")return bt(le,re,ml(oe),be);if(oe.$$typeof===L)return bt(le,re,dl(le,oe),be);gl(le,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint"?(oe=""+oe,re!==null&&re.tag===6?(r(le,re.sibling),be=u(re,oe),be.return=le,le=be):(r(le,re),be=lc(oe,le.mode,be),be.return=le,le=be),N(le)):r(le,re)}return function(le,re,oe,be){try{Fi=0;var Ue=bt(le,re,oe,be);return ti=null,Ue}catch(De){if(De===ei||De===hl)throw De;var dt=Ln(29,De,null,le.mode);return dt.lanes=be,dt.return=le,dt}}}var Er=oh(!0),ch=oh(!1),Ga=!1;function xc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sc(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Fa(e,t,r){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(ht&2)!==0){var u=s.pending;return u===null?t.next=t:(t.next=u.next,u.next=t),s.pending=t,t=ll(e),Ff(e,null,r),t}return sl(e,s,t,r),ll(e)}function Xi(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,ga(e,r)}}function jc(e,t){var r=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,r===s)){var u=null,h=null;if(r=r.firstBaseUpdate,r!==null){do{var N={lane:r.lane,tag:r.tag,payload:r.payload,callback:null,next:null};h===null?u=h=N:h=h.next=N,r=r.next}while(r!==null);h===null?u=h=t:h=h.next=t}else u=h=t;r={baseState:s.baseState,firstBaseUpdate:u,lastBaseUpdate:h,shared:s.shared,callbacks:s.callbacks},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}var wc=!1;function Zi(){if(wc){var e=Wr;if(e!==null)throw e}}function Ki(e,t,r,s){wc=!1;var u=e.updateQueue;Ga=!1;var h=u.firstBaseUpdate,N=u.lastBaseUpdate,U=u.shared.pending;if(U!==null){u.shared.pending=null;var W=U,ce=W.next;W.next=null,N===null?h=ce:N.next=ce,N=W;var ye=e.alternate;ye!==null&&(ye=ye.updateQueue,U=ye.lastBaseUpdate,U!==N&&(U===null?ye.firstBaseUpdate=ce:U.next=ce,ye.lastBaseUpdate=W))}if(h!==null){var xe=u.baseState;N=0,ye=ce=W=null,U=h;do{var de=U.lane&-536870913,me=de!==U.lane;if(me?(nt&de)===de:(s&de)===de){de!==0&&de===Jr&&(wc=!0),ye!==null&&(ye=ye.next={lane:0,tag:U.tag,payload:U.payload,callback:null,next:null});e:{var Re=e,Be=U;de=t;var bt=r;switch(Be.tag){case 1:if(Re=Be.payload,typeof Re=="function"){xe=Re.call(bt,xe,de);break e}xe=Re;break e;case 3:Re.flags=Re.flags&-65537|128;case 0:if(Re=Be.payload,de=typeof Re=="function"?Re.call(bt,xe,de):Re,de==null)break e;xe=v({},xe,de);break e;case 2:Ga=!0}}de=U.callback,de!==null&&(e.flags|=64,me&&(e.flags|=8192),me=u.callbacks,me===null?u.callbacks=[de]:me.push(de))}else me={lane:de,tag:U.tag,payload:U.payload,callback:U.callback,next:null},ye===null?(ce=ye=me,W=xe):ye=ye.next=me,N|=de;if(U=U.next,U===null){if(U=u.shared.pending,U===null)break;me=U,U=me.next,me.next=null,u.lastBaseUpdate=me,u.shared.pending=null}}while(!0);ye===null&&(W=xe),u.baseState=W,u.firstBaseUpdate=ce,u.lastBaseUpdate=ye,h===null&&(u.shared.lanes=0),Qa|=N,e.lanes=N,e.memoizedState=xe}}function uh(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function dh(e,t){var r=e.callbacks;if(r!==null)for(e.callbacks=null,e=0;e<r.length;e++)uh(r[e],t)}var ni=x(null),vl=x(0);function fh(e,t){e=Oa,H(vl,e),H(ni,t),Oa=e|t.baseLanes}function Nc(){H(vl,Oa),H(ni,ni.current)}function Cc(){Oa=vl.current,C(ni),C(vl)}var Un=x(null),Yn=null;function Ya(e){var t=e.alternate;H($t,$t.current&1),H(Un,e),Yn===null&&(t===null||ni.current!==null||t.memoizedState!==null)&&(Yn=e)}function _c(e){H($t,$t.current),H(Un,e),Yn===null&&(Yn=e)}function hh(e){e.tag===22?(H($t,$t.current),H(Un,e),Yn===null&&(Yn=e)):Xa()}function Xa(){H($t,$t.current),H(Un,Un.current)}function zn(e){C(Un),Yn===e&&(Yn=null),C($t)}var $t=x(0);function yl(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||Ru(r)||Du(r)))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 ja=0,Ve=null,vt=null,Ht=null,bl=!1,ai=!1,Ar=!1,xl=0,Qi=0,ri=null,Ib=0;function Ut(){throw Error(o(321))}function Tc(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Dn(e[r],t[r]))return!1;return!0}function Ec(e,t,r,s,u,h){return ja=h,Ve=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,X.H=e===null||e.memoizedState===null?Kh:Hc,Ar=!1,h=r(s,u),Ar=!1,ai&&(h=mh(t,r,s,u)),ph(e),h}function ph(e){X.H=es;var t=vt!==null&&vt.next!==null;if(ja=0,Ht=vt=Ve=null,bl=!1,Qi=0,ri=null,t)throw Error(o(300));e===null||Gt||(e=e.dependencies,e!==null&&ul(e)&&(Gt=!0))}function mh(e,t,r,s){Ve=e;var u=0;do{if(ai&&(ri=null),Qi=0,ai=!1,25<=u)throw Error(o(301));if(u+=1,Ht=vt=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}X.H=Qh,h=t(r,s)}while(ai);return h}function $b(){var e=X.H,t=e.useState()[0];return t=typeof t.then=="function"?Ji(t):t,e=e.useState()[0],(vt!==null?vt.memoizedState:null)!==e&&(Ve.flags|=1024),t}function Ac(){var e=xl!==0;return xl=0,e}function Oc(e,t,r){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~r}function kc(e){if(bl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}bl=!1}ja=0,Ht=vt=Ve=null,ai=!1,Qi=xl=0,ri=null}function mn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?Ve.memoizedState=Ht=e:Ht=Ht.next=e,Ht}function Pt(){if(vt===null){var e=Ve.alternate;e=e!==null?e.memoizedState:null}else e=vt.next;var t=Ht===null?Ve.memoizedState:Ht.next;if(t!==null)Ht=t,vt=e;else{if(e===null)throw Ve.alternate===null?Error(o(467)):Error(o(310));vt=e,e={memoizedState:vt.memoizedState,baseState:vt.baseState,baseQueue:vt.baseQueue,queue:vt.queue,next:null},Ht===null?Ve.memoizedState=Ht=e:Ht=Ht.next=e}return Ht}function Sl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ji(e){var t=Qi;return Qi+=1,ri===null&&(ri=[]),e=ih(ri,e,t),t=Ve,(Ht===null?t.memoizedState:Ht.next)===null&&(t=t.alternate,X.H=t===null||t.memoizedState===null?Kh:Hc),e}function jl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ji(e);if(e.$$typeof===L)return nn(e)}throw Error(o(438,String(e)))}function Rc(e){var t=null,r=Ve.updateQueue;if(r!==null&&(t=r.memoCache),t==null){var s=Ve.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(u){return u.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),r===null&&(r=Sl(),Ve.updateQueue=r),r.memoCache=t,r=t.data[t.index],r===void 0)for(r=t.data[t.index]=Array(e),s=0;s<e;s++)r[s]=$;return t.index++,r}function wa(e,t){return typeof t=="function"?t(e):t}function wl(e){var t=Pt();return Dc(t,vt,e)}function Dc(e,t,r){var s=e.queue;if(s===null)throw Error(o(311));s.lastRenderedReducer=r;var u=e.baseQueue,h=s.pending;if(h!==null){if(u!==null){var N=u.next;u.next=h.next,h.next=N}t.baseQueue=u=h,s.pending=null}if(h=e.baseState,u===null)e.memoizedState=h;else{t=u.next;var U=N=null,W=null,ce=t,ye=!1;do{var xe=ce.lane&-536870913;if(xe!==ce.lane?(nt&xe)===xe:(ja&xe)===xe){var de=ce.revertLane;if(de===0)W!==null&&(W=W.next={lane:0,revertLane:0,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null}),xe===Jr&&(ye=!0);else if((ja&de)===de){ce=ce.next,de===Jr&&(ye=!0);continue}else xe={lane:0,revertLane:ce.revertLane,gesture:null,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},W===null?(U=W=xe,N=h):W=W.next=xe,Ve.lanes|=de,Qa|=de;xe=ce.action,Ar&&r(h,xe),h=ce.hasEagerState?ce.eagerState:r(h,xe)}else de={lane:xe,revertLane:ce.revertLane,gesture:ce.gesture,action:ce.action,hasEagerState:ce.hasEagerState,eagerState:ce.eagerState,next:null},W===null?(U=W=de,N=h):W=W.next=de,Ve.lanes|=xe,Qa|=xe;ce=ce.next}while(ce!==null&&ce!==t);if(W===null?N=h:W.next=U,!Dn(h,e.memoizedState)&&(Gt=!0,ye&&(r=Wr,r!==null)))throw r;e.memoizedState=h,e.baseState=N,e.baseQueue=W,s.lastRenderedState=h}return u===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Lc(e){var t=Pt(),r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=e;var s=r.dispatch,u=r.pending,h=t.memoizedState;if(u!==null){r.pending=null;var N=u=u.next;do h=e(h,N.action),N=N.next;while(N!==u);Dn(h,t.memoizedState)||(Gt=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),r.lastRenderedState=h}return[h,s]}function gh(e,t,r){var s=Ve,u=Pt(),h=rt;if(h){if(r===void 0)throw Error(o(407));r=r()}else r=t();var N=!Dn((vt||u).memoizedState,r);if(N&&(u.memoizedState=r,Gt=!0),u=u.queue,Mc(bh.bind(null,s,u,e),[e]),u.getSnapshot!==t||N||Ht!==null&&Ht.memoizedState.tag&1){if(s.flags|=2048,ii(9,{destroy:void 0},yh.bind(null,s,u,r,t),null),St===null)throw Error(o(349));h||(ja&127)!==0||vh(s,t,r)}return r}function vh(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ve.updateQueue,t===null?(t=Sl(),Ve.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function yh(e,t,r,s){t.value=r,t.getSnapshot=s,xh(t)&&Sh(e)}function bh(e,t,r){return r(function(){xh(t)&&Sh(e)})}function xh(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Dn(e,r)}catch{return!0}}function Sh(e){var t=xr(e,2);t!==null&&Nn(t,e,2)}function Uc(e){var t=mn();if(typeof e=="function"){var r=e;if(e=r(),Ar){it(!0);try{r()}finally{it(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:e},t}function jh(e,t,r,s){return e.baseState=r,Dc(e,vt,typeof s=="function"?s:wa)}function Pb(e,t,r,s,u){if(_l(e))throw Error(o(485));if(e=t.action,e!==null){var h={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(N){h.listeners.push(N)}};X.T!==null?r(!0):h.isTransition=!1,s(h),r=t.pending,r===null?(h.next=t.pending=h,wh(t,h)):(h.next=r.next,t.pending=r.next=h)}}function wh(e,t){var r=t.action,s=t.payload,u=e.state;if(t.isTransition){var h=X.T,N={};X.T=N;try{var U=r(u,s),W=X.S;W!==null&&W(N,U),Nh(e,t,U)}catch(ce){zc(e,t,ce)}finally{h!==null&&N.types!==null&&(h.types=N.types),X.T=h}}else try{h=r(u,s),Nh(e,t,h)}catch(ce){zc(e,t,ce)}}function Nh(e,t,r){r!==null&&typeof r=="object"&&typeof r.then=="function"?r.then(function(s){Ch(e,t,s)},function(s){return zc(e,t,s)}):Ch(e,t,r)}function Ch(e,t,r){t.status="fulfilled",t.value=r,_h(t),e.state=r,t=e.pending,t!==null&&(r=t.next,r===t?e.pending=null:(r=r.next,t.next=r,wh(e,r)))}function zc(e,t,r){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=r,_h(t),t=t.next;while(t!==s)}e.action=null}function _h(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Th(e,t){return t}function Eh(e,t){if(rt){var r=St.formState;if(r!==null){e:{var s=Ve;if(rt){if(Nt){t:{for(var u=Nt,h=Fn;u.nodeType!==8;){if(!h){u=null;break t}if(u=Xn(u.nextSibling),u===null){u=null;break t}}h=u.data,u=h==="F!"||h==="F"?u:null}if(u){Nt=Xn(u.nextSibling),s=u.data==="F!";break e}}qa(s)}s=!1}s&&(t=r[0])}}return r=mn(),r.memoizedState=r.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Th,lastRenderedState:t},r.queue=s,r=Yh.bind(null,Ve,s),s.dispatch=r,s=Uc(!1),h=qc.bind(null,Ve,!1,s.queue),s=mn(),u={state:t,dispatch:null,action:e,pending:null},s.queue=u,r=Pb.bind(null,Ve,u,h,r),u.dispatch=r,s.memoizedState=e,[t,r,!1]}function Ah(e){var t=Pt();return Oh(t,vt,e)}function Oh(e,t,r){if(t=Dc(e,t,Th)[0],e=wl(wa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Ji(t)}catch(N){throw N===ei?hl:N}else s=t;t=Pt();var u=t.queue,h=u.dispatch;return r!==t.memoizedState&&(Ve.flags|=2048,ii(9,{destroy:void 0},qb.bind(null,u,r),null)),[s,h,e]}function qb(e,t){e.action=t}function kh(e){var t=Pt(),r=vt;if(r!==null)return Oh(t,r,e);Pt(),t=t.memoizedState,r=Pt();var s=r.queue.dispatch;return r.memoizedState=e,[t,s,!1]}function ii(e,t,r,s){return e={tag:e,create:r,deps:s,inst:t,next:null},t=Ve.updateQueue,t===null&&(t=Sl(),Ve.updateQueue=t),r=t.lastEffect,r===null?t.lastEffect=e.next=e:(s=r.next,r.next=e,e.next=s,t.lastEffect=e),e}function Rh(){return Pt().memoizedState}function Nl(e,t,r,s){var u=mn();Ve.flags|=e,u.memoizedState=ii(1|t,{destroy:void 0},r,s===void 0?null:s)}function Cl(e,t,r,s){var u=Pt();s=s===void 0?null:s;var h=u.memoizedState.inst;vt!==null&&s!==null&&Tc(s,vt.memoizedState.deps)?u.memoizedState=ii(t,h,r,s):(Ve.flags|=e,u.memoizedState=ii(1|t,h,r,s))}function Dh(e,t){Nl(8390656,8,e,t)}function Mc(e,t){Cl(2048,8,e,t)}function Hb(e){Ve.flags|=4;var t=Ve.updateQueue;if(t===null)t=Sl(),Ve.updateQueue=t,t.events=[e];else{var r=t.events;r===null?t.events=[e]:r.push(e)}}function Lh(e){var t=Pt().memoizedState;return Hb({ref:t,nextImpl:e}),function(){if((ht&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function Uh(e,t){return Cl(4,2,e,t)}function zh(e,t){return Cl(4,4,e,t)}function Mh(e,t){if(typeof t=="function"){e=e();var r=t(e);return function(){typeof r=="function"?r():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Bh(e,t,r){r=r!=null?r.concat([e]):null,Cl(4,4,Mh.bind(null,t,e),r)}function Bc(){}function Ih(e,t){var r=Pt();t=t===void 0?null:t;var s=r.memoizedState;return t!==null&&Tc(t,s[1])?s[0]:(r.memoizedState=[e,t],e)}function $h(e,t){var r=Pt();t=t===void 0?null:t;var s=r.memoizedState;if(t!==null&&Tc(t,s[1]))return s[0];if(s=e(),Ar){it(!0);try{e()}finally{it(!1)}}return r.memoizedState=[s,t],s}function Ic(e,t,r){return r===void 0||(ja&1073741824)!==0&&(nt&261930)===0?e.memoizedState=t:(e.memoizedState=r,e=Pp(),Ve.lanes|=e,Qa|=e,r)}function Ph(e,t,r,s){return Dn(r,t)?r:ni.current!==null?(e=Ic(e,r,s),Dn(e,t)||(Gt=!0),e):(ja&42)===0||(ja&1073741824)!==0&&(nt&261930)===0?(Gt=!0,e.memoizedState=r):(e=Pp(),Ve.lanes|=e,Qa|=e,t)}function qh(e,t,r,s,u){var h=Y.p;Y.p=h!==0&&8>h?h:8;var N=X.T,U={};X.T=U,qc(e,!1,t,r);try{var W=u(),ce=X.S;if(ce!==null&&ce(U,W),W!==null&&typeof W=="object"&&typeof W.then=="function"){var ye=Bb(W,s);Wi(e,t,ye,In(e))}else Wi(e,t,s,In(e))}catch(xe){Wi(e,t,{then:function(){},status:"rejected",reason:xe},In())}finally{Y.p=h,N!==null&&U.types!==null&&(N.types=U.types),X.T=N}}function Gb(){}function $c(e,t,r,s){if(e.tag!==5)throw Error(o(476));var u=Hh(e).queue;qh(e,u,t,Z,r===null?Gb:function(){return Gh(e),r(s)})}function Hh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:Z},next:null};var r={};return t.next={memoizedState:r,baseState:r,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wa,lastRenderedState:r},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Gh(e){var t=Hh(e);t.next===null&&(t=e.alternate.memoizedState),Wi(e,t.next.queue,{},In())}function Pc(){return nn(gs)}function Vh(){return Pt().memoizedState}function Fh(){return Pt().memoizedState}function Vb(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var r=In();e=Va(r);var s=Fa(t,e,r);s!==null&&(Nn(s,t,r),Xi(s,t,r)),t={cache:gc()},e.payload=t;return}t=t.return}}function Fb(e,t,r){var s=In();r={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},_l(e)?Xh(t,r):(r=ic(e,t,r,s),r!==null&&(Nn(r,e,s),Zh(r,t,s)))}function Yh(e,t,r){var s=In();Wi(e,t,r,s)}function Wi(e,t,r,s){var u={lane:s,revertLane:0,gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null};if(_l(e))Xh(t,u);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var N=t.lastRenderedState,U=h(N,r);if(u.hasEagerState=!0,u.eagerState=U,Dn(U,N))return sl(e,t,u,0),St===null&&il(),!1}catch{}if(r=ic(e,t,u,s),r!==null)return Nn(r,e,s),Zh(r,t,s),!0}return!1}function qc(e,t,r,s){if(s={lane:2,revertLane:xu(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},_l(e)){if(t)throw Error(o(479))}else t=ic(e,r,s,2),t!==null&&Nn(t,e,2)}function _l(e){var t=e.alternate;return e===Ve||t!==null&&t===Ve}function Xh(e,t){ai=bl=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Zh(e,t,r){if((r&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,r|=s,t.lanes=r,ga(e,r)}}var es={readContext:nn,use:jl,useCallback:Ut,useContext:Ut,useEffect:Ut,useImperativeHandle:Ut,useLayoutEffect:Ut,useInsertionEffect:Ut,useMemo:Ut,useReducer:Ut,useRef:Ut,useState:Ut,useDebugValue:Ut,useDeferredValue:Ut,useTransition:Ut,useSyncExternalStore:Ut,useId:Ut,useHostTransitionStatus:Ut,useFormState:Ut,useActionState:Ut,useOptimistic:Ut,useMemoCache:Ut,useCacheRefresh:Ut};es.useEffectEvent=Ut;var Kh={readContext:nn,use:jl,useCallback:function(e,t){return mn().memoizedState=[e,t===void 0?null:t],e},useContext:nn,useEffect:Dh,useImperativeHandle:function(e,t,r){r=r!=null?r.concat([e]):null,Nl(4194308,4,Mh.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Nl(4194308,4,e,t)},useInsertionEffect:function(e,t){Nl(4,2,e,t)},useMemo:function(e,t){var r=mn();t=t===void 0?null:t;var s=e();if(Ar){it(!0);try{e()}finally{it(!1)}}return r.memoizedState=[s,t],s},useReducer:function(e,t,r){var s=mn();if(r!==void 0){var u=r(t);if(Ar){it(!0);try{r(t)}finally{it(!1)}}}else u=t;return s.memoizedState=s.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},s.queue=e,e=e.dispatch=Fb.bind(null,Ve,e),[s.memoizedState,e]},useRef:function(e){var t=mn();return e={current:e},t.memoizedState=e},useState:function(e){e=Uc(e);var t=e.queue,r=Yh.bind(null,Ve,t);return t.dispatch=r,[e.memoizedState,r]},useDebugValue:Bc,useDeferredValue:function(e,t){var r=mn();return Ic(r,e,t)},useTransition:function(){var e=Uc(!1);return e=qh.bind(null,Ve,e.queue,!0,!1),mn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,r){var s=Ve,u=mn();if(rt){if(r===void 0)throw Error(o(407));r=r()}else{if(r=t(),St===null)throw Error(o(349));(nt&127)!==0||vh(s,t,r)}u.memoizedState=r;var h={value:r,getSnapshot:t};return u.queue=h,Dh(bh.bind(null,s,h,e),[e]),s.flags|=2048,ii(9,{destroy:void 0},yh.bind(null,s,h,r,t),null),r},useId:function(){var e=mn(),t=St.identifierPrefix;if(rt){var r=ua,s=ca;r=(s&~(1<<32-Oe(s)-1)).toString(32)+r,t="_"+t+"R_"+r,r=xl++,0<r&&(t+="H"+r.toString(32)),t+="_"}else r=Ib++,t="_"+t+"r_"+r.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Pc,useFormState:Eh,useActionState:Eh,useOptimistic:function(e){var t=mn();t.memoizedState=t.baseState=e;var r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=r,t=qc.bind(null,Ve,!0,r),r.dispatch=t,[e,t]},useMemoCache:Rc,useCacheRefresh:function(){return mn().memoizedState=Vb.bind(null,Ve)},useEffectEvent:function(e){var t=mn(),r={impl:e};return t.memoizedState=r,function(){if((ht&2)!==0)throw Error(o(440));return r.impl.apply(void 0,arguments)}}},Hc={readContext:nn,use:jl,useCallback:Ih,useContext:nn,useEffect:Mc,useImperativeHandle:Bh,useInsertionEffect:Uh,useLayoutEffect:zh,useMemo:$h,useReducer:wl,useRef:Rh,useState:function(){return wl(wa)},useDebugValue:Bc,useDeferredValue:function(e,t){var r=Pt();return Ph(r,vt.memoizedState,e,t)},useTransition:function(){var e=wl(wa)[0],t=Pt().memoizedState;return[typeof e=="boolean"?e:Ji(e),t]},useSyncExternalStore:gh,useId:Vh,useHostTransitionStatus:Pc,useFormState:Ah,useActionState:Ah,useOptimistic:function(e,t){var r=Pt();return jh(r,vt,e,t)},useMemoCache:Rc,useCacheRefresh:Fh};Hc.useEffectEvent=Lh;var Qh={readContext:nn,use:jl,useCallback:Ih,useContext:nn,useEffect:Mc,useImperativeHandle:Bh,useInsertionEffect:Uh,useLayoutEffect:zh,useMemo:$h,useReducer:Lc,useRef:Rh,useState:function(){return Lc(wa)},useDebugValue:Bc,useDeferredValue:function(e,t){var r=Pt();return vt===null?Ic(r,e,t):Ph(r,vt.memoizedState,e,t)},useTransition:function(){var e=Lc(wa)[0],t=Pt().memoizedState;return[typeof e=="boolean"?e:Ji(e),t]},useSyncExternalStore:gh,useId:Vh,useHostTransitionStatus:Pc,useFormState:kh,useActionState:kh,useOptimistic:function(e,t){var r=Pt();return vt!==null?jh(r,vt,e,t):(r.baseState=e,[e,r.queue.dispatch])},useMemoCache:Rc,useCacheRefresh:Fh};Qh.useEffectEvent=Lh;function Gc(e,t,r,s){t=e.memoizedState,r=r(s,t),r=r==null?t:v({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Vc={enqueueSetState:function(e,t,r){e=e._reactInternals;var s=In(),u=Va(s);u.payload=t,r!=null&&(u.callback=r),t=Fa(e,u,s),t!==null&&(Nn(t,e,s),Xi(t,e,s))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var s=In(),u=Va(s);u.tag=1,u.payload=t,r!=null&&(u.callback=r),t=Fa(e,u,s),t!==null&&(Nn(t,e,s),Xi(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=In(),s=Va(r);s.tag=2,t!=null&&(s.callback=t),t=Fa(e,s,r),t!==null&&(Nn(t,e,r),Xi(t,e,r))}};function Jh(e,t,r,s,u,h,N){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,h,N):t.prototype&&t.prototype.isPureReactComponent?!$i(r,s)||!$i(u,h):!0}function Wh(e,t,r,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,s),t.state!==e&&Vc.enqueueReplaceState(t,t.state,null)}function Or(e,t){var r=t;if("ref"in t){r={};for(var s in t)s!=="ref"&&(r[s]=t[s])}if(e=e.defaultProps){r===t&&(r=v({},r));for(var u in e)r[u]===void 0&&(r[u]=e[u])}return r}function ep(e){rl(e)}function tp(e){console.error(e)}function np(e){rl(e)}function Tl(e,t){try{var r=e.onUncaughtError;r(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function ap(e,t,r){try{var s=e.onCaughtError;s(r.value,{componentStack:r.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Fc(e,t,r){return r=Va(r),r.tag=3,r.payload={element:null},r.callback=function(){Tl(e,t)},r}function rp(e){return e=Va(e),e.tag=3,e}function ip(e,t,r,s){var u=r.type.getDerivedStateFromError;if(typeof u=="function"){var h=s.value;e.payload=function(){return u(h)},e.callback=function(){ap(t,r,s)}}var N=r.stateNode;N!==null&&typeof N.componentDidCatch=="function"&&(e.callback=function(){ap(t,r,s),typeof u!="function"&&(Ja===null?Ja=new Set([this]):Ja.add(this));var U=s.stack;this.componentDidCatch(s.value,{componentStack:U!==null?U:""})})}function Yb(e,t,r,s,u){if(r.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=r.alternate,t!==null&&Qr(t,r,u,!0),r=Un.current,r!==null){switch(r.tag){case 31:case 13:return Yn===null?Il():r.alternate===null&&zt===0&&(zt=3),r.flags&=-257,r.flags|=65536,r.lanes=u,s===pl?r.flags|=16384:(t=r.updateQueue,t===null?r.updateQueue=new Set([s]):t.add(s),vu(e,s,u)),!1;case 22:return r.flags|=65536,s===pl?r.flags|=16384:(t=r.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},r.updateQueue=t):(r=t.retryQueue,r===null?t.retryQueue=new Set([s]):r.add(s)),vu(e,s,u)),!1}throw Error(o(435,r.tag))}return vu(e,s,u),Il(),!1}if(rt)return t=Un.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=u,s!==dc&&(e=Error(o(422),{cause:s}),Hi(Hn(e,r)))):(s!==dc&&(t=Error(o(423),{cause:s}),Hi(Hn(t,r))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,s=Hn(s,r),u=Fc(e.stateNode,s,u),jc(e,u),zt!==4&&(zt=2)),!1;var h=Error(o(520),{cause:s});if(h=Hn(h,r),os===null?os=[h]:os.push(h),zt!==4&&(zt=2),t===null)return!0;s=Hn(s,r),r=t;do{switch(r.tag){case 3:return r.flags|=65536,e=u&-u,r.lanes|=e,e=Fc(r.stateNode,s,e),jc(r,e),!1;case 1:if(t=r.type,h=r.stateNode,(r.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(Ja===null||!Ja.has(h))))return r.flags|=65536,u&=-u,r.lanes|=u,u=rp(u),ip(u,e,r,s),jc(r,u),!1}r=r.return}while(r!==null);return!1}var Yc=Error(o(461)),Gt=!1;function an(e,t,r,s){t.child=e===null?ch(t,null,r,s):Er(t,e.child,r,s)}function sp(e,t,r,s,u){r=r.render;var h=t.ref;if("ref"in s){var N={};for(var U in s)U!=="ref"&&(N[U]=s[U])}else N=s;return Nr(t),s=Ec(e,t,r,N,h,u),U=Ac(),e!==null&&!Gt?(Oc(e,t,u),Na(e,t,u)):(rt&&U&&cc(t),t.flags|=1,an(e,t,s,u),t.child)}function lp(e,t,r,s,u){if(e===null){var h=r.type;return typeof h=="function"&&!sc(h)&&h.defaultProps===void 0&&r.compare===null?(t.tag=15,t.type=h,op(e,t,h,s,u)):(e=ol(r.type,null,s,t,t.mode,u),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!tu(e,u)){var N=h.memoizedProps;if(r=r.compare,r=r!==null?r:$i,r(N,s)&&e.ref===t.ref)return Na(e,t,u)}return t.flags|=1,e=ya(h,s),e.ref=t.ref,e.return=t,t.child=e}function op(e,t,r,s,u){if(e!==null){var h=e.memoizedProps;if($i(h,s)&&e.ref===t.ref)if(Gt=!1,t.pendingProps=s=h,tu(e,u))(e.flags&131072)!==0&&(Gt=!0);else return t.lanes=e.lanes,Na(e,t,u)}return Xc(e,t,r,s,u)}function cp(e,t,r,s){var u=s.children,h=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(h=h!==null?h.baseLanes|r:r,e!==null){for(s=t.child=e.child,u=0;s!==null;)u=u|s.lanes|s.childLanes,s=s.sibling;s=u&~h}else s=0,t.child=null;return up(e,t,h,r,s)}if((r&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fl(t,h!==null?h.cachePool:null),h!==null?fh(t,h):Nc(),hh(t);else return s=t.lanes=536870912,up(e,t,h!==null?h.baseLanes|r:r,r,s)}else h!==null?(fl(t,h.cachePool),fh(t,h),Xa(),t.memoizedState=null):(e!==null&&fl(t,null),Nc(),Xa());return an(e,t,u,r),t.child}function ts(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function up(e,t,r,s,u){var h=yc();return h=h===null?null:{parent:qt._currentValue,pool:h},t.memoizedState={baseLanes:r,cachePool:h},e!==null&&fl(t,null),Nc(),hh(t),e!==null&&Qr(e,t,s,!0),t.childLanes=u,null}function El(e,t){return t=Ol({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function dp(e,t,r){return Er(t,e.child,null,r),e=El(t,t.pendingProps),e.flags|=2,zn(t),t.memoizedState=null,e}function Xb(e,t,r){var s=t.pendingProps,u=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(rt){if(s.mode==="hidden")return e=El(t,s),t.lanes=536870912,ts(null,e);if(_c(t),(e=Nt)?(e=wm(e,Fn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$a!==null?{id:ca,overflow:ua}:null,retryLane:536870912,hydrationErrors:null},r=Xf(e),r.return=t,t.child=r,tn=t,Nt=null)):e=null,e===null)throw qa(t);return t.lanes=536870912,null}return El(t,s)}var h=e.memoizedState;if(h!==null){var N=h.dehydrated;if(_c(t),u)if(t.flags&256)t.flags&=-257,t=dp(e,t,r);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if(Gt||Qr(e,t,r,!1),u=(r&e.childLanes)!==0,Gt||u){if(s=St,s!==null&&(N=ln(s,r),N!==0&&N!==h.retryLane))throw h.retryLane=N,xr(e,N),Nn(s,e,N),Yc;Il(),t=dp(e,t,r)}else e=h.treeContext,Nt=Xn(N.nextSibling),tn=t,rt=!0,Pa=null,Fn=!1,e!==null&&Qf(t,e),t=El(t,s),t.flags|=4096;return t}return e=ya(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Al(e,t){var r=t.ref;if(r===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof r!="function"&&typeof r!="object")throw Error(o(284));(e===null||e.ref!==r)&&(t.flags|=4194816)}}function Xc(e,t,r,s,u){return Nr(t),r=Ec(e,t,r,s,void 0,u),s=Ac(),e!==null&&!Gt?(Oc(e,t,u),Na(e,t,u)):(rt&&s&&cc(t),t.flags|=1,an(e,t,r,u),t.child)}function fp(e,t,r,s,u,h){return Nr(t),t.updateQueue=null,r=mh(t,s,r,u),ph(e),s=Ac(),e!==null&&!Gt?(Oc(e,t,h),Na(e,t,h)):(rt&&s&&cc(t),t.flags|=1,an(e,t,r,h),t.child)}function hp(e,t,r,s,u){if(Nr(t),t.stateNode===null){var h=Yr,N=r.contextType;typeof N=="object"&&N!==null&&(h=nn(N)),h=new r(s,h),t.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=Vc,t.stateNode=h,h._reactInternals=t,h=t.stateNode,h.props=s,h.state=t.memoizedState,h.refs={},xc(t),N=r.contextType,h.context=typeof N=="object"&&N!==null?nn(N):Yr,h.state=t.memoizedState,N=r.getDerivedStateFromProps,typeof N=="function"&&(Gc(t,r,N,s),h.state=t.memoizedState),typeof r.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(N=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),N!==h.state&&Vc.enqueueReplaceState(h,h.state,null),Ki(t,s,h,u),Zi(),h.state=t.memoizedState),typeof h.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){h=t.stateNode;var U=t.memoizedProps,W=Or(r,U);h.props=W;var ce=h.context,ye=r.contextType;N=Yr,typeof ye=="object"&&ye!==null&&(N=nn(ye));var xe=r.getDerivedStateFromProps;ye=typeof xe=="function"||typeof h.getSnapshotBeforeUpdate=="function",U=t.pendingProps!==U,ye||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(U||ce!==N)&&Wh(t,h,s,N),Ga=!1;var de=t.memoizedState;h.state=de,Ki(t,s,h,u),Zi(),ce=t.memoizedState,U||de!==ce||Ga?(typeof xe=="function"&&(Gc(t,r,xe,s),ce=t.memoizedState),(W=Ga||Jh(t,r,W,s,de,ce,N))?(ye||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(t.flags|=4194308)):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=ce),h.props=s,h.state=ce,h.context=N,s=W):(typeof h.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{h=t.stateNode,Sc(e,t),N=t.memoizedProps,ye=Or(r,N),h.props=ye,xe=t.pendingProps,de=h.context,ce=r.contextType,W=Yr,typeof ce=="object"&&ce!==null&&(W=nn(ce)),U=r.getDerivedStateFromProps,(ce=typeof U=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(N!==xe||de!==W)&&Wh(t,h,s,W),Ga=!1,de=t.memoizedState,h.state=de,Ki(t,s,h,u),Zi();var me=t.memoizedState;N!==xe||de!==me||Ga||e!==null&&e.dependencies!==null&&ul(e.dependencies)?(typeof U=="function"&&(Gc(t,r,U,s),me=t.memoizedState),(ye=Ga||Jh(t,r,ye,s,de,me,W)||e!==null&&e.dependencies!==null&&ul(e.dependencies))?(ce||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(s,me,W),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(s,me,W)),typeof h.componentDidUpdate=="function"&&(t.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof h.componentDidUpdate!="function"||N===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=me),h.props=s,h.state=me,h.context=W,s=ye):(typeof h.componentDidUpdate!="function"||N===e.memoizedProps&&de===e.memoizedState||(t.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&de===e.memoizedState||(t.flags|=1024),s=!1)}return h=s,Al(e,t),s=(t.flags&128)!==0,h||s?(h=t.stateNode,r=s&&typeof r.getDerivedStateFromError!="function"?null:h.render(),t.flags|=1,e!==null&&s?(t.child=Er(t,e.child,null,u),t.child=Er(t,null,r,u)):an(e,t,r,u),t.memoizedState=h.state,e=t.child):e=Na(e,t,u),e}function pp(e,t,r,s){return jr(),t.flags|=256,an(e,t,r,s),t.child}var Zc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Kc(e){return{baseLanes:e,cachePool:ah()}}function Qc(e,t,r){return e=e!==null?e.childLanes&~r:0,t&&(e|=Bn),e}function mp(e,t,r){var s=t.pendingProps,u=!1,h=(t.flags&128)!==0,N;if((N=h)||(N=e!==null&&e.memoizedState===null?!1:($t.current&2)!==0),N&&(u=!0,t.flags&=-129),N=(t.flags&32)!==0,t.flags&=-33,e===null){if(rt){if(u?Ya(t):Xa(),(e=Nt)?(e=wm(e,Fn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:$a!==null?{id:ca,overflow:ua}:null,retryLane:536870912,hydrationErrors:null},r=Xf(e),r.return=t,t.child=r,tn=t,Nt=null)):e=null,e===null)throw qa(t);return Du(e)?t.lanes=32:t.lanes=536870912,null}var U=s.children;return s=s.fallback,u?(Xa(),u=t.mode,U=Ol({mode:"hidden",children:U},u),s=Sr(s,u,r,null),U.return=t,s.return=t,U.sibling=s,t.child=U,s=t.child,s.memoizedState=Kc(r),s.childLanes=Qc(e,N,r),t.memoizedState=Zc,ts(null,s)):(Ya(t),Jc(t,U))}var W=e.memoizedState;if(W!==null&&(U=W.dehydrated,U!==null)){if(h)t.flags&256?(Ya(t),t.flags&=-257,t=Wc(e,t,r)):t.memoizedState!==null?(Xa(),t.child=e.child,t.flags|=128,t=null):(Xa(),U=s.fallback,u=t.mode,s=Ol({mode:"visible",children:s.children},u),U=Sr(U,u,r,null),U.flags|=2,s.return=t,U.return=t,s.sibling=U,t.child=s,Er(t,e.child,null,r),s=t.child,s.memoizedState=Kc(r),s.childLanes=Qc(e,N,r),t.memoizedState=Zc,t=ts(null,s));else if(Ya(t),Du(U)){if(N=U.nextSibling&&U.nextSibling.dataset,N)var ce=N.dgst;N=ce,s=Error(o(419)),s.stack="",s.digest=N,Hi({value:s,source:null,stack:null}),t=Wc(e,t,r)}else if(Gt||Qr(e,t,r,!1),N=(r&e.childLanes)!==0,Gt||N){if(N=St,N!==null&&(s=ln(N,r),s!==0&&s!==W.retryLane))throw W.retryLane=s,xr(e,s),Nn(N,e,s),Yc;Ru(U)||Il(),t=Wc(e,t,r)}else Ru(U)?(t.flags|=192,t.child=e.child,t=null):(e=W.treeContext,Nt=Xn(U.nextSibling),tn=t,rt=!0,Pa=null,Fn=!1,e!==null&&Qf(t,e),t=Jc(t,s.children),t.flags|=4096);return t}return u?(Xa(),U=s.fallback,u=t.mode,W=e.child,ce=W.sibling,s=ya(W,{mode:"hidden",children:s.children}),s.subtreeFlags=W.subtreeFlags&65011712,ce!==null?U=ya(ce,U):(U=Sr(U,u,r,null),U.flags|=2),U.return=t,s.return=t,s.sibling=U,t.child=s,ts(null,s),s=t.child,U=e.child.memoizedState,U===null?U=Kc(r):(u=U.cachePool,u!==null?(W=qt._currentValue,u=u.parent!==W?{parent:W,pool:W}:u):u=ah(),U={baseLanes:U.baseLanes|r,cachePool:u}),s.memoizedState=U,s.childLanes=Qc(e,N,r),t.memoizedState=Zc,ts(e.child,s)):(Ya(t),r=e.child,e=r.sibling,r=ya(r,{mode:"visible",children:s.children}),r.return=t,r.sibling=null,e!==null&&(N=t.deletions,N===null?(t.deletions=[e],t.flags|=16):N.push(e)),t.child=r,t.memoizedState=null,r)}function Jc(e,t){return t=Ol({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ol(e,t){return e=Ln(22,e,null,t),e.lanes=0,e}function Wc(e,t,r){return Er(t,e.child,null,r),e=Jc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function gp(e,t,r){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),pc(e.return,t,r)}function eu(e,t,r,s,u,h){var N=e.memoizedState;N===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:r,tailMode:u,treeForkCount:h}:(N.isBackwards=t,N.rendering=null,N.renderingStartTime=0,N.last=s,N.tail=r,N.tailMode=u,N.treeForkCount=h)}function vp(e,t,r){var s=t.pendingProps,u=s.revealOrder,h=s.tail;s=s.children;var N=$t.current,U=(N&2)!==0;if(U?(N=N&1|2,t.flags|=128):N&=1,H($t,N),an(e,t,s,r),s=rt?qi:0,!U&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&gp(e,r,t);else if(e.tag===19)gp(e,r,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(u){case"forwards":for(r=t.child,u=null;r!==null;)e=r.alternate,e!==null&&yl(e)===null&&(u=r),r=r.sibling;r=u,r===null?(u=t.child,t.child=null):(u=r.sibling,r.sibling=null),eu(t,!1,u,r,h,s);break;case"backwards":case"unstable_legacy-backwards":for(r=null,u=t.child,t.child=null;u!==null;){if(e=u.alternate,e!==null&&yl(e)===null){t.child=u;break}e=u.sibling,u.sibling=r,r=u,u=e}eu(t,!0,r,null,h,s);break;case"together":eu(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Na(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Qa|=t.lanes,(r&t.childLanes)===0)if(e!==null){if(Qr(e,t,r,!1),(r&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,r=ya(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=ya(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function tu(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&ul(e)))}function Zb(e,t,r){switch(t.tag){case 3:we(t,t.stateNode.containerInfo),Ha(t,qt,e.memoizedState.cache),jr();break;case 27:case 5:_e(t);break;case 4:we(t,t.stateNode.containerInfo);break;case 10:Ha(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,_c(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Ya(t),t.flags|=128,null):(r&t.child.childLanes)!==0?mp(e,t,r):(Ya(t),e=Na(e,t,r),e!==null?e.sibling:null);Ya(t);break;case 19:var u=(e.flags&128)!==0;if(s=(r&t.childLanes)!==0,s||(Qr(e,t,r,!1),s=(r&t.childLanes)!==0),u){if(s)return vp(e,t,r);t.flags|=128}if(u=t.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),H($t,$t.current),s)break;return null;case 22:return t.lanes=0,cp(e,t,r,t.pendingProps);case 24:Ha(t,qt,e.memoizedState.cache)}return Na(e,t,r)}function yp(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps)Gt=!0;else{if(!tu(e,r)&&(t.flags&128)===0)return Gt=!1,Zb(e,t,r);Gt=(e.flags&131072)!==0}else Gt=!1,rt&&(t.flags&1048576)!==0&&Kf(t,qi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=_r(t.elementType),t.type=e,typeof e=="function")sc(e)?(s=Or(e,s),t.tag=1,t=hp(null,t,e,s,r)):(t.tag=0,t=Xc(null,t,e,s,r));else{if(e!=null){var u=e.$$typeof;if(u===D){t.tag=11,t=sp(null,t,e,s,r);break e}else if(u===K){t.tag=14,t=lp(null,t,e,s,r);break e}}throw t=j(e)||e,Error(o(306,t,""))}}return t;case 0:return Xc(e,t,t.type,t.pendingProps,r);case 1:return s=t.type,u=Or(s,t.pendingProps),hp(e,t,s,u,r);case 3:e:{if(we(t,t.stateNode.containerInfo),e===null)throw Error(o(387));s=t.pendingProps;var h=t.memoizedState;u=h.element,Sc(e,t),Ki(t,s,null,r);var N=t.memoizedState;if(s=N.cache,Ha(t,qt,s),s!==h.cache&&mc(t,[qt],r,!0),Zi(),s=N.element,h.isDehydrated)if(h={element:s,isDehydrated:!1,cache:N.cache},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){t=pp(e,t,s,r);break e}else if(s!==u){u=Hn(Error(o(424)),t),Hi(u),t=pp(e,t,s,r);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Nt=Xn(e.firstChild),tn=t,rt=!0,Pa=null,Fn=!0,r=ch(t,null,s,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(jr(),s===u){t=Na(e,t,r);break e}an(e,t,s,r)}t=t.child}return t;case 26:return Al(e,t),e===null?(r=Am(t.type,null,t.pendingProps,null))?t.memoizedState=r:rt||(r=t.type,e=t.pendingProps,s=Fl(pe.current).createElement(r),s[At]=t,s[Ft]=e,rn(s,r,e),wt(s),t.stateNode=s):t.memoizedState=Am(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _e(t),e===null&&rt&&(s=t.stateNode=_m(t.type,t.pendingProps,pe.current),tn=t,Fn=!0,u=Nt,nr(t.type)?(Lu=u,Nt=Xn(s.firstChild)):Nt=u),an(e,t,t.pendingProps.children,r),Al(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&rt&&((u=s=Nt)&&(s=Cx(s,t.type,t.pendingProps,Fn),s!==null?(t.stateNode=s,tn=t,Nt=Xn(s.firstChild),Fn=!1,u=!0):u=!1),u||qa(t)),_e(t),u=t.type,h=t.pendingProps,N=e!==null?e.memoizedProps:null,s=h.children,Au(u,h)?s=null:N!==null&&Au(u,N)&&(t.flags|=32),t.memoizedState!==null&&(u=Ec(e,t,$b,null,null,r),gs._currentValue=u),Al(e,t),an(e,t,s,r),t.child;case 6:return e===null&&rt&&((e=r=Nt)&&(r=_x(r,t.pendingProps,Fn),r!==null?(t.stateNode=r,tn=t,Nt=null,e=!0):e=!1),e||qa(t)),null;case 13:return mp(e,t,r);case 4:return we(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Er(t,null,s,r):an(e,t,s,r),t.child;case 11:return sp(e,t,t.type,t.pendingProps,r);case 7:return an(e,t,t.pendingProps,r),t.child;case 8:return an(e,t,t.pendingProps.children,r),t.child;case 12:return an(e,t,t.pendingProps.children,r),t.child;case 10:return s=t.pendingProps,Ha(t,t.type,s.value),an(e,t,s.children,r),t.child;case 9:return u=t.type._context,s=t.pendingProps.children,Nr(t),u=nn(u),s=s(u),t.flags|=1,an(e,t,s,r),t.child;case 14:return lp(e,t,t.type,t.pendingProps,r);case 15:return op(e,t,t.type,t.pendingProps,r);case 19:return vp(e,t,r);case 31:return Xb(e,t,r);case 22:return cp(e,t,r,t.pendingProps);case 24:return Nr(t),s=nn(qt),e===null?(u=yc(),u===null&&(u=St,h=gc(),u.pooledCache=h,h.refCount++,h!==null&&(u.pooledCacheLanes|=r),u=h),t.memoizedState={parent:s,cache:u},xc(t),Ha(t,qt,u)):((e.lanes&r)!==0&&(Sc(e,t),Ki(t,null,null,r),Zi()),u=e.memoizedState,h=t.memoizedState,u.parent!==s?(u={parent:s,cache:s},t.memoizedState=u,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=u),Ha(t,qt,s)):(s=h.cache,Ha(t,qt,s),s!==u.cache&&mc(t,[qt],r,!0))),an(e,t,t.pendingProps.children,r),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function Ca(e){e.flags|=4}function nu(e,t,r,s,u){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Vp())e.flags|=8192;else throw Tr=pl,bc}else e.flags&=-16777217}function bp(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Lm(t))if(Vp())e.flags|=8192;else throw Tr=pl,bc}function kl(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?sn():536870912,e.lanes|=t,ci|=t)}function ns(e,t){if(!rt)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var s=null;r!==null;)r.alternate!==null&&(s=r),r=r.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,s=0;if(t)for(var u=e.child;u!==null;)r|=u.lanes|u.childLanes,s|=u.subtreeFlags&65011712,s|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)r|=u.lanes|u.childLanes,s|=u.subtreeFlags,s|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=s,e.childLanes=r,t}function Kb(e,t,r){var s=t.pendingProps;switch(uc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(t),null;case 1:return Ct(t),null;case 3:return r=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Sa(qt),se(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(Kr(t)?Ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,fc())),Ct(t),null;case 26:var u=t.type,h=t.memoizedState;return e===null?(Ca(t),h!==null?(Ct(t),bp(t,h)):(Ct(t),nu(t,u,null,s,r))):h?h!==e.memoizedState?(Ca(t),Ct(t),bp(t,h)):(Ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Ca(t),Ct(t),nu(t,u,e,s,r)),null;case 27:if(Ce(t),r=pe.current,u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ca(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return Ct(t),null}e=G.current,Kr(t)?Jf(t):(e=_m(u,s,r),t.stateNode=e,Ca(t))}return Ct(t),null;case 5:if(Ce(t),u=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Ca(t);else{if(!s){if(t.stateNode===null)throw Error(o(166));return Ct(t),null}if(h=G.current,Kr(t))Jf(t);else{var N=Fl(pe.current);switch(h){case 1:h=N.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:h=N.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":h=N.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":h=N.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":h=N.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof s.is=="string"?N.createElement("select",{is:s.is}):N.createElement("select"),s.multiple?h.multiple=!0:s.size&&(h.size=s.size);break;default:h=typeof s.is=="string"?N.createElement(u,{is:s.is}):N.createElement(u)}}h[At]=t,h[Ft]=s;e:for(N=t.child;N!==null;){if(N.tag===5||N.tag===6)h.appendChild(N.stateNode);else if(N.tag!==4&&N.tag!==27&&N.child!==null){N.child.return=N,N=N.child;continue}if(N===t)break e;for(;N.sibling===null;){if(N.return===null||N.return===t)break e;N=N.return}N.sibling.return=N.return,N=N.sibling}t.stateNode=h;e:switch(rn(h,u,s),u){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Ca(t)}}return Ct(t),nu(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,r),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Ca(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(o(166));if(e=pe.current,Kr(t)){if(e=t.stateNode,r=t.memoizedProps,s=null,u=tn,u!==null)switch(u.tag){case 27:case 5:s=u.memoizedProps}e[At]=t,e=!!(e.nodeValue===r||s!==null&&s.suppressHydrationWarning===!0||mm(e.nodeValue,r)),e||qa(t,!0)}else e=Fl(e).createTextNode(s),e[At]=t,t.stateNode=e}return Ct(t),null;case 31:if(r=t.memoizedState,e===null||e.memoizedState!==null){if(s=Kr(t),r!==null){if(e===null){if(!s)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[At]=t}else jr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ct(t),e=!1}else r=fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),e=!0;if(!e)return t.flags&256?(zn(t),t):(zn(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Ct(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Kr(t),s!==null&&s.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=t.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[At]=t}else jr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ct(t),u=!1}else u=fc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return t.flags&256?(zn(t),t):(zn(t),null)}return zn(t),(t.flags&128)!==0?(t.lanes=r,t):(r=s!==null,e=e!==null&&e.memoizedState!==null,r&&(s=t.child,u=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(u=s.alternate.memoizedState.cachePool.pool),h=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(h=s.memoizedState.cachePool.pool),h!==u&&(s.flags|=2048)),r!==e&&r&&(t.child.flags|=8192),kl(t,t.updateQueue),Ct(t),null);case 4:return se(),e===null&&Nu(t.stateNode.containerInfo),Ct(t),null;case 10:return Sa(t.type),Ct(t),null;case 19:if(C($t),s=t.memoizedState,s===null)return Ct(t),null;if(u=(t.flags&128)!==0,h=s.rendering,h===null)if(u)ns(s,!1);else{if(zt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(h=yl(e),h!==null){for(t.flags|=128,ns(s,!1),e=h.updateQueue,t.updateQueue=e,kl(t,e),t.subtreeFlags=0,e=r,r=t.child;r!==null;)Yf(r,e),r=r.sibling;return H($t,$t.current&1|2),rt&&ba(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Te()>zl&&(t.flags|=128,u=!0,ns(s,!1),t.lanes=4194304)}else{if(!u)if(e=yl(h),e!==null){if(t.flags|=128,u=!0,e=e.updateQueue,t.updateQueue=e,kl(t,e),ns(s,!0),s.tail===null&&s.tailMode==="hidden"&&!h.alternate&&!rt)return Ct(t),null}else 2*Te()-s.renderingStartTime>zl&&r!==536870912&&(t.flags|=128,u=!0,ns(s,!1),t.lanes=4194304);s.isBackwards?(h.sibling=t.child,t.child=h):(e=s.last,e!==null?e.sibling=h:t.child=h,s.last=h)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Te(),e.sibling=null,r=$t.current,H($t,u?r&1|2:r&1),rt&&ba(t,s.treeForkCount),e):(Ct(t),null);case 22:case 23:return zn(t),Cc(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(r&536870912)!==0&&(t.flags&128)===0&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),r=t.updateQueue,r!==null&&kl(t,r.retryQueue),r=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==r&&(t.flags|=2048),e!==null&&C(Cr),null;case 24:return r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Sa(qt),Ct(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function Qb(e,t){switch(uc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sa(qt),se(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ce(t),null;case 31:if(t.memoizedState!==null){if(zn(t),t.alternate===null)throw Error(o(340));jr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));jr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return C($t),null;case 4:return se(),null;case 10:return Sa(t.type),null;case 22:case 23:return zn(t),Cc(),e!==null&&C(Cr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sa(qt),null;case 25:return null;default:return null}}function xp(e,t){switch(uc(t),t.tag){case 3:Sa(qt),se();break;case 26:case 27:case 5:Ce(t);break;case 4:se();break;case 31:t.memoizedState!==null&&zn(t);break;case 13:zn(t);break;case 19:C($t);break;case 10:Sa(t.type);break;case 22:case 23:zn(t),Cc(),e!==null&&C(Cr);break;case 24:Sa(qt)}}function as(e,t){try{var r=t.updateQueue,s=r!==null?r.lastEffect:null;if(s!==null){var u=s.next;r=u;do{if((r.tag&e)===e){s=void 0;var h=r.create,N=r.inst;s=h(),N.destroy=s}r=r.next}while(r!==u)}}catch(U){gt(t,t.return,U)}}function Za(e,t,r){try{var s=t.updateQueue,u=s!==null?s.lastEffect:null;if(u!==null){var h=u.next;s=h;do{if((s.tag&e)===e){var N=s.inst,U=N.destroy;if(U!==void 0){N.destroy=void 0,u=t;var W=r,ce=U;try{ce()}catch(ye){gt(u,W,ye)}}}s=s.next}while(s!==h)}}catch(ye){gt(t,t.return,ye)}}function Sp(e){var t=e.updateQueue;if(t!==null){var r=e.stateNode;try{dh(t,r)}catch(s){gt(e,e.return,s)}}}function jp(e,t,r){r.props=Or(e.type,e.memoizedProps),r.state=e.memoizedState;try{r.componentWillUnmount()}catch(s){gt(e,t,s)}}function rs(e,t){try{var r=e.ref;if(r!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof r=="function"?e.refCleanup=r(s):r.current=s}}catch(u){gt(e,t,u)}}function da(e,t){var r=e.ref,s=e.refCleanup;if(r!==null)if(typeof s=="function")try{s()}catch(u){gt(e,t,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof r=="function")try{r(null)}catch(u){gt(e,t,u)}else r.current=null}function wp(e){var t=e.type,r=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":r.autoFocus&&s.focus();break e;case"img":r.src?s.src=r.src:r.srcSet&&(s.srcset=r.srcSet)}}catch(u){gt(e,e.return,u)}}function au(e,t,r){try{var s=e.stateNode;bx(s,e.type,r,t),s[Ft]=t}catch(u){gt(e,e.return,u)}}function Np(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&nr(e.type)||e.tag===4}function ru(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Np(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&&nr(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 iu(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r).insertBefore(e,t):(t=r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,t.appendChild(e),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Wn));else if(s!==4&&(s===27&&nr(e.type)&&(r=e.stateNode,t=null),e=e.child,e!==null))for(iu(e,t,r),e=e.sibling;e!==null;)iu(e,t,r),e=e.sibling}function Rl(e,t,r){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(s!==4&&(s===27&&nr(e.type)&&(r=e.stateNode),e=e.child,e!==null))for(Rl(e,t,r),e=e.sibling;e!==null;)Rl(e,t,r),e=e.sibling}function Cp(e){var t=e.stateNode,r=e.memoizedProps;try{for(var s=e.type,u=t.attributes;u.length;)t.removeAttributeNode(u[0]);rn(t,s,r),t[At]=e,t[Ft]=r}catch(h){gt(e,e.return,h)}}var _a=!1,Vt=!1,su=!1,_p=typeof WeakSet=="function"?WeakSet:Set,Jt=null;function Jb(e,t){if(e=e.containerInfo,Tu=Wl,e=Bf(e),Wo(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var u=s.anchorOffset,h=s.focusNode;s=s.focusOffset;try{r.nodeType,h.nodeType}catch{r=null;break e}var N=0,U=-1,W=-1,ce=0,ye=0,xe=e,de=null;t:for(;;){for(var me;xe!==r||u!==0&&xe.nodeType!==3||(U=N+u),xe!==h||s!==0&&xe.nodeType!==3||(W=N+s),xe.nodeType===3&&(N+=xe.nodeValue.length),(me=xe.firstChild)!==null;)de=xe,xe=me;for(;;){if(xe===e)break t;if(de===r&&++ce===u&&(U=N),de===h&&++ye===s&&(W=N),(me=xe.nextSibling)!==null)break;xe=de,de=xe.parentNode}xe=me}r=U===-1||W===-1?null:{start:U,end:W}}else r=null}r=r||{start:0,end:0}}else r=null;for(Eu={focusedElem:e,selectionRange:r},Wl=!1,Jt=t;Jt!==null;)if(t=Jt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Jt=e;else for(;Jt!==null;){switch(t=Jt,h=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(r=0;r<e.length;r++)u=e[r],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,r=t,u=h.memoizedProps,h=h.memoizedState,s=r.stateNode;try{var Re=Or(r.type,u);e=s.getSnapshotBeforeUpdate(Re,h),s.__reactInternalSnapshotBeforeUpdate=e}catch(Be){gt(r,r.return,Be)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,r=e.nodeType,r===9)ku(e);else if(r===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ku(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,Jt=e;break}Jt=t.return}}function Tp(e,t,r){var s=r.flags;switch(r.tag){case 0:case 11:case 15:Ea(e,r),s&4&&as(5,r);break;case 1:if(Ea(e,r),s&4)if(e=r.stateNode,t===null)try{e.componentDidMount()}catch(N){gt(r,r.return,N)}else{var u=Or(r.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(u,t,e.__reactInternalSnapshotBeforeUpdate)}catch(N){gt(r,r.return,N)}}s&64&&Sp(r),s&512&&rs(r,r.return);break;case 3:if(Ea(e,r),s&64&&(e=r.updateQueue,e!==null)){if(t=null,r.child!==null)switch(r.child.tag){case 27:case 5:t=r.child.stateNode;break;case 1:t=r.child.stateNode}try{dh(e,t)}catch(N){gt(r,r.return,N)}}break;case 27:t===null&&s&4&&Cp(r);case 26:case 5:Ea(e,r),t===null&&s&4&&wp(r),s&512&&rs(r,r.return);break;case 12:Ea(e,r);break;case 31:Ea(e,r),s&4&&Op(e,r);break;case 13:Ea(e,r),s&4&&kp(e,r),s&64&&(e=r.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(r=lx.bind(null,r),Tx(e,r))));break;case 22:if(s=r.memoizedState!==null||_a,!s){t=t!==null&&t.memoizedState!==null||Vt,u=_a;var h=Vt;_a=s,(Vt=t)&&!h?Aa(e,r,(r.subtreeFlags&8772)!==0):Ea(e,r),_a=u,Vt=h}break;case 30:break;default:Ea(e,r)}}function Ep(e){var t=e.alternate;t!==null&&(e.alternate=null,Ep(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&hn(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 Ot=null,xn=!1;function Ta(e,t,r){for(r=r.child;r!==null;)Ap(e,t,r),r=r.sibling}function Ap(e,t,r){if(lt&&typeof lt.onCommitFiberUnmount=="function")try{lt.onCommitFiberUnmount(Ze,r)}catch{}switch(r.tag){case 26:Vt||da(r,t),Ta(e,t,r),r.memoizedState?r.memoizedState.count--:r.stateNode&&(r=r.stateNode,r.parentNode.removeChild(r));break;case 27:Vt||da(r,t);var s=Ot,u=xn;nr(r.type)&&(Ot=r.stateNode,xn=!1),Ta(e,t,r),hs(r.stateNode),Ot=s,xn=u;break;case 5:Vt||da(r,t);case 6:if(s=Ot,u=xn,Ot=null,Ta(e,t,r),Ot=s,xn=u,Ot!==null)if(xn)try{(Ot.nodeType===9?Ot.body:Ot.nodeName==="HTML"?Ot.ownerDocument.body:Ot).removeChild(r.stateNode)}catch(h){gt(r,t,h)}else try{Ot.removeChild(r.stateNode)}catch(h){gt(r,t,h)}break;case 18:Ot!==null&&(xn?(e=Ot,Sm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,r.stateNode),vi(e)):Sm(Ot,r.stateNode));break;case 4:s=Ot,u=xn,Ot=r.stateNode.containerInfo,xn=!0,Ta(e,t,r),Ot=s,xn=u;break;case 0:case 11:case 14:case 15:Za(2,r,t),Vt||Za(4,r,t),Ta(e,t,r);break;case 1:Vt||(da(r,t),s=r.stateNode,typeof s.componentWillUnmount=="function"&&jp(r,t,s)),Ta(e,t,r);break;case 21:Ta(e,t,r);break;case 22:Vt=(s=Vt)||r.memoizedState!==null,Ta(e,t,r),Vt=s;break;default:Ta(e,t,r)}}function Op(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{vi(e)}catch(r){gt(t,t.return,r)}}}function kp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{vi(e)}catch(r){gt(t,t.return,r)}}function Wb(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _p),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _p),t;default:throw Error(o(435,e.tag))}}function Dl(e,t){var r=Wb(e);t.forEach(function(s){if(!r.has(s)){r.add(s);var u=ox.bind(null,e,s);s.then(u,u)}})}function Sn(e,t){var r=t.deletions;if(r!==null)for(var s=0;s<r.length;s++){var u=r[s],h=e,N=t,U=N;e:for(;U!==null;){switch(U.tag){case 27:if(nr(U.type)){Ot=U.stateNode,xn=!1;break e}break;case 5:Ot=U.stateNode,xn=!1;break e;case 3:case 4:Ot=U.stateNode.containerInfo,xn=!0;break e}U=U.return}if(Ot===null)throw Error(o(160));Ap(h,N,u),Ot=null,xn=!1,h=u.alternate,h!==null&&(h.return=null),u.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Rp(t,e),t=t.sibling}var ta=null;function Rp(e,t){var r=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sn(t,e),jn(e),s&4&&(Za(3,e,e.return),as(3,e),Za(5,e,e.return));break;case 1:Sn(t,e),jn(e),s&512&&(Vt||r===null||da(r,r.return)),s&64&&_a&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(r=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=r===null?s:r.concat(s))));break;case 26:var u=ta;if(Sn(t,e),jn(e),s&512&&(Vt||r===null||da(r,r.return)),s&4){var h=r!==null?r.memoizedState:null;if(s=e.memoizedState,r===null)if(s===null)if(e.stateNode===null){e:{s=e.type,r=e.memoizedProps,u=u.ownerDocument||u;t:switch(s){case"title":h=u.getElementsByTagName("title")[0],(!h||h[vn]||h[At]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=u.createElement(s),u.head.insertBefore(h,u.querySelector("head > title"))),rn(h,s,r),h[At]=e,wt(h),s=h;break e;case"link":var N=Rm("link","href",u).get(s+(r.href||""));if(N){for(var U=0;U<N.length;U++)if(h=N[U],h.getAttribute("href")===(r.href==null||r.href===""?null:r.href)&&h.getAttribute("rel")===(r.rel==null?null:r.rel)&&h.getAttribute("title")===(r.title==null?null:r.title)&&h.getAttribute("crossorigin")===(r.crossOrigin==null?null:r.crossOrigin)){N.splice(U,1);break t}}h=u.createElement(s),rn(h,s,r),u.head.appendChild(h);break;case"meta":if(N=Rm("meta","content",u).get(s+(r.content||""))){for(U=0;U<N.length;U++)if(h=N[U],h.getAttribute("content")===(r.content==null?null:""+r.content)&&h.getAttribute("name")===(r.name==null?null:r.name)&&h.getAttribute("property")===(r.property==null?null:r.property)&&h.getAttribute("http-equiv")===(r.httpEquiv==null?null:r.httpEquiv)&&h.getAttribute("charset")===(r.charSet==null?null:r.charSet)){N.splice(U,1);break t}}h=u.createElement(s),rn(h,s,r),u.head.appendChild(h);break;default:throw Error(o(468,s))}h[At]=e,wt(h),s=h}e.stateNode=s}else Dm(u,e.type,e.stateNode);else e.stateNode=km(u,s,e.memoizedProps);else h!==s?(h===null?r.stateNode!==null&&(r=r.stateNode,r.parentNode.removeChild(r)):h.count--,s===null?Dm(u,e.type,e.stateNode):km(u,s,e.memoizedProps)):s===null&&e.stateNode!==null&&au(e,e.memoizedProps,r.memoizedProps)}break;case 27:Sn(t,e),jn(e),s&512&&(Vt||r===null||da(r,r.return)),r!==null&&s&4&&au(e,e.memoizedProps,r.memoizedProps);break;case 5:if(Sn(t,e),jn(e),s&512&&(Vt||r===null||da(r,r.return)),e.flags&32){u=e.stateNode;try{Rn(u,"")}catch(Re){gt(e,e.return,Re)}}s&4&&e.stateNode!=null&&(u=e.memoizedProps,au(e,u,r!==null?r.memoizedProps:u)),s&1024&&(su=!0);break;case 6:if(Sn(t,e),jn(e),s&4){if(e.stateNode===null)throw Error(o(162));s=e.memoizedProps,r=e.stateNode;try{r.nodeValue=s}catch(Re){gt(e,e.return,Re)}}break;case 3:if(Zl=null,u=ta,ta=Yl(t.containerInfo),Sn(t,e),ta=u,jn(e),s&4&&r!==null&&r.memoizedState.isDehydrated)try{vi(t.containerInfo)}catch(Re){gt(e,e.return,Re)}su&&(su=!1,Dp(e));break;case 4:s=ta,ta=Yl(e.stateNode.containerInfo),Sn(t,e),jn(e),ta=s;break;case 12:Sn(t,e),jn(e);break;case 31:Sn(t,e),jn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Dl(e,s)));break;case 13:Sn(t,e),jn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Ul=Te()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Dl(e,s)));break;case 22:u=e.memoizedState!==null;var W=r!==null&&r.memoizedState!==null,ce=_a,ye=Vt;if(_a=ce||u,Vt=ye||W,Sn(t,e),Vt=ye,_a=ce,jn(e),s&8192)e:for(t=e.stateNode,t._visibility=u?t._visibility&-2:t._visibility|1,u&&(r===null||W||_a||Vt||kr(e)),r=null,t=e;;){if(t.tag===5||t.tag===26){if(r===null){W=r=t;try{if(h=W.stateNode,u)N=h.style,typeof N.setProperty=="function"?N.setProperty("display","none","important"):N.display="none";else{U=W.stateNode;var xe=W.memoizedProps.style,de=xe!=null&&xe.hasOwnProperty("display")?xe.display:null;U.style.display=de==null||typeof de=="boolean"?"":(""+de).trim()}}catch(Re){gt(W,W.return,Re)}}}else if(t.tag===6){if(r===null){W=t;try{W.stateNode.nodeValue=u?"":W.memoizedProps}catch(Re){gt(W,W.return,Re)}}}else if(t.tag===18){if(r===null){W=t;try{var me=W.stateNode;u?jm(me,!0):jm(W.stateNode,!1)}catch(Re){gt(W,W.return,Re)}}}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;r===t&&(r=null),t=t.return}r===t&&(r=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(r=s.retryQueue,r!==null&&(s.retryQueue=null,Dl(e,r))));break;case 19:Sn(t,e),jn(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Dl(e,s)));break;case 30:break;case 21:break;default:Sn(t,e),jn(e)}}function jn(e){var t=e.flags;if(t&2){try{for(var r,s=e.return;s!==null;){if(Np(s)){r=s;break}s=s.return}if(r==null)throw Error(o(160));switch(r.tag){case 27:var u=r.stateNode,h=ru(e);Rl(e,h,u);break;case 5:var N=r.stateNode;r.flags&32&&(Rn(N,""),r.flags&=-33);var U=ru(e);Rl(e,U,N);break;case 3:case 4:var W=r.stateNode.containerInfo,ce=ru(e);iu(e,ce,W);break;default:throw Error(o(161))}}catch(ye){gt(e,e.return,ye)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Dp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ea(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Tp(e,t.alternate,t),t=t.sibling}function kr(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Za(4,t,t.return),kr(t);break;case 1:da(t,t.return);var r=t.stateNode;typeof r.componentWillUnmount=="function"&&jp(t,t.return,r),kr(t);break;case 27:hs(t.stateNode);case 26:case 5:da(t,t.return),kr(t);break;case 22:t.memoizedState===null&&kr(t);break;case 30:kr(t);break;default:kr(t)}e=e.sibling}}function Aa(e,t,r){for(r=r&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,u=e,h=t,N=h.flags;switch(h.tag){case 0:case 11:case 15:Aa(u,h,r),as(4,h);break;case 1:if(Aa(u,h,r),s=h,u=s.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(ce){gt(s,s.return,ce)}if(s=h,u=s.updateQueue,u!==null){var U=s.stateNode;try{var W=u.shared.hiddenCallbacks;if(W!==null)for(u.shared.hiddenCallbacks=null,u=0;u<W.length;u++)uh(W[u],U)}catch(ce){gt(s,s.return,ce)}}r&&N&64&&Sp(h),rs(h,h.return);break;case 27:Cp(h);case 26:case 5:Aa(u,h,r),r&&s===null&&N&4&&wp(h),rs(h,h.return);break;case 12:Aa(u,h,r);break;case 31:Aa(u,h,r),r&&N&4&&Op(u,h);break;case 13:Aa(u,h,r),r&&N&4&&kp(u,h);break;case 22:h.memoizedState===null&&Aa(u,h,r),rs(h,h.return);break;case 30:break;default:Aa(u,h,r)}t=t.sibling}}function lu(e,t){var r=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(r=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==r&&(e!=null&&e.refCount++,r!=null&&Gi(r))}function ou(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gi(e))}function na(e,t,r,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Lp(e,t,r,s),t=t.sibling}function Lp(e,t,r,s){var u=t.flags;switch(t.tag){case 0:case 11:case 15:na(e,t,r,s),u&2048&&as(9,t);break;case 1:na(e,t,r,s);break;case 3:na(e,t,r,s),u&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gi(e)));break;case 12:if(u&2048){na(e,t,r,s),e=t.stateNode;try{var h=t.memoizedProps,N=h.id,U=h.onPostCommit;typeof U=="function"&&U(N,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(W){gt(t,t.return,W)}}else na(e,t,r,s);break;case 31:na(e,t,r,s);break;case 13:na(e,t,r,s);break;case 23:break;case 22:h=t.stateNode,N=t.alternate,t.memoizedState!==null?h._visibility&2?na(e,t,r,s):is(e,t):h._visibility&2?na(e,t,r,s):(h._visibility|=2,si(e,t,r,s,(t.subtreeFlags&10256)!==0||!1)),u&2048&&lu(N,t);break;case 24:na(e,t,r,s),u&2048&&ou(t.alternate,t);break;default:na(e,t,r,s)}}function si(e,t,r,s,u){for(u=u&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var h=e,N=t,U=r,W=s,ce=N.flags;switch(N.tag){case 0:case 11:case 15:si(h,N,U,W,u),as(8,N);break;case 23:break;case 22:var ye=N.stateNode;N.memoizedState!==null?ye._visibility&2?si(h,N,U,W,u):is(h,N):(ye._visibility|=2,si(h,N,U,W,u)),u&&ce&2048&&lu(N.alternate,N);break;case 24:si(h,N,U,W,u),u&&ce&2048&&ou(N.alternate,N);break;default:si(h,N,U,W,u)}t=t.sibling}}function is(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var r=e,s=t,u=s.flags;switch(s.tag){case 22:is(r,s),u&2048&&lu(s.alternate,s);break;case 24:is(r,s),u&2048&&ou(s.alternate,s);break;default:is(r,s)}t=t.sibling}}var ss=8192;function li(e,t,r){if(e.subtreeFlags&ss)for(e=e.child;e!==null;)Up(e,t,r),e=e.sibling}function Up(e,t,r){switch(e.tag){case 26:li(e,t,r),e.flags&ss&&e.memoizedState!==null&&Ix(r,ta,e.memoizedState,e.memoizedProps);break;case 5:li(e,t,r);break;case 3:case 4:var s=ta;ta=Yl(e.stateNode.containerInfo),li(e,t,r),ta=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=ss,ss=16777216,li(e,t,r),ss=s):li(e,t,r));break;default:li(e,t,r)}}function zp(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 ls(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var s=t[r];Jt=s,Bp(s,e)}zp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Mp(e),e=e.sibling}function Mp(e){switch(e.tag){case 0:case 11:case 15:ls(e),e.flags&2048&&Za(9,e,e.return);break;case 3:ls(e);break;case 12:ls(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ll(e)):ls(e);break;default:ls(e)}}function Ll(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var r=0;r<t.length;r++){var s=t[r];Jt=s,Bp(s,e)}zp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Za(8,t,t.return),Ll(t);break;case 22:r=t.stateNode,r._visibility&2&&(r._visibility&=-3,Ll(t));break;default:Ll(t)}e=e.sibling}}function Bp(e,t){for(;Jt!==null;){var r=Jt;switch(r.tag){case 0:case 11:case 15:Za(8,r,t);break;case 23:case 22:if(r.memoizedState!==null&&r.memoizedState.cachePool!==null){var s=r.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Gi(r.memoizedState.cache)}if(s=r.child,s!==null)s.return=r,Jt=s;else e:for(r=e;Jt!==null;){s=Jt;var u=s.sibling,h=s.return;if(Ep(s),s===r){Jt=null;break e}if(u!==null){u.return=h,Jt=u;break e}Jt=h}}}var ex={getCacheForType:function(e){var t=nn(qt),r=t.data.get(e);return r===void 0&&(r=e(),t.data.set(e,r)),r},cacheSignal:function(){return nn(qt).controller.signal}},tx=typeof WeakMap=="function"?WeakMap:Map,ht=0,St=null,et=null,nt=0,mt=0,Mn=null,Ka=!1,oi=!1,cu=!1,Oa=0,zt=0,Qa=0,Rr=0,uu=0,Bn=0,ci=0,os=null,wn=null,du=!1,Ul=0,Ip=0,zl=1/0,Ml=null,Ja=null,Zt=0,Wa=null,ui=null,ka=0,fu=0,hu=null,$p=null,cs=0,pu=null;function In(){return(ht&2)!==0&&nt!==0?nt&-nt:X.T!==null?xu():La()}function Pp(){if(Bn===0)if((nt&536870912)===0||rt){var e=Je;Je<<=1,(Je&3932160)===0&&(Je=262144),Bn=e}else Bn=536870912;return e=Un.current,e!==null&&(e.flags|=32),Bn}function Nn(e,t,r){(e===St&&(mt===2||mt===9)||e.cancelPendingCommit!==null)&&(di(e,0),er(e,nt,Bn,!1)),st(e,r),((ht&2)===0||e!==St)&&(e===St&&((ht&2)===0&&(Rr|=r),zt===4&&er(e,nt,Bn,!1)),fa(e))}function qp(e,t,r){if((ht&6)!==0)throw Error(o(327));var s=!r&&(t&127)===0&&(t&e.expiredLanes)===0||Qe(e,t),u=s?rx(e,t):gu(e,t,!0),h=s;do{if(u===0){oi&&!s&&er(e,t,0,!1);break}else{if(r=e.current.alternate,h&&!nx(r)){u=gu(e,t,!1),h=!1;continue}if(u===2){if(h=t,e.errorRecoveryDisabledLanes&h)var N=0;else N=e.pendingLanes&-536870913,N=N!==0?N:N&536870912?536870912:0;if(N!==0){t=N;e:{var U=e;u=os;var W=U.current.memoizedState.isDehydrated;if(W&&(di(U,N).flags|=256),N=gu(U,N,!1),N!==2){if(cu&&!W){U.errorRecoveryDisabledLanes|=h,Rr|=h,u=4;break e}h=wn,wn=u,h!==null&&(wn===null?wn=h:wn.push.apply(wn,h))}u=N}if(h=!1,u!==2)continue}}if(u===1){di(e,0),er(e,t,0,!0);break}e:{switch(s=e,h=u,h){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:er(s,t,Bn,!Ka);break e;case 2:wn=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(u=Ul+300-Te(),10<u)){if(er(s,t,Bn,!Ka),Et(s,0,!0)!==0)break e;ka=t,s.timeoutHandle=bm(Hp.bind(null,s,r,wn,Ml,du,t,Bn,Rr,ci,Ka,h,"Throttled",-0,0),u);break e}Hp(s,r,wn,Ml,du,t,Bn,Rr,ci,Ka,h,null,-0,0)}}break}while(!0);fa(e)}function Hp(e,t,r,s,u,h,N,U,W,ce,ye,xe,de,me){if(e.timeoutHandle=-1,xe=t.subtreeFlags,xe&8192||(xe&16785408)===16785408){xe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wn},Up(t,h,xe);var Re=(h&62914560)===h?Ul-Te():(h&4194048)===h?Ip-Te():0;if(Re=$x(xe,Re),Re!==null){ka=h,e.cancelPendingCommit=Re(Qp.bind(null,e,t,h,r,s,u,N,U,W,ye,xe,null,de,me)),er(e,h,N,!ce);return}}Qp(e,t,h,r,s,u,N,U,W)}function nx(e){for(var t=e;;){var r=t.tag;if((r===0||r===11||r===15)&&t.flags&16384&&(r=t.updateQueue,r!==null&&(r=r.stores,r!==null)))for(var s=0;s<r.length;s++){var u=r[s],h=u.getSnapshot;u=u.value;try{if(!Dn(h(),u))return!1}catch{return!1}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 er(e,t,r,s){t&=~uu,t&=~Rr,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var u=t;0<u;){var h=31-Oe(u),N=1<<h;s[h]=-1,u&=~N}r!==0&&$e(e,r,t)}function Bl(){return(ht&6)===0?(us(0),!1):!0}function mu(){if(et!==null){if(mt===0)var e=et.return;else e=et,xa=wr=null,kc(e),ti=null,Fi=0,e=et;for(;e!==null;)xp(e.alternate,e),e=e.return;et=null}}function di(e,t){var r=e.timeoutHandle;r!==-1&&(e.timeoutHandle=-1,jx(r)),r=e.cancelPendingCommit,r!==null&&(e.cancelPendingCommit=null,r()),ka=0,mu(),St=e,et=r=ya(e.current,null),nt=t,mt=0,Mn=null,Ka=!1,oi=Qe(e,t),cu=!1,ci=Bn=uu=Rr=Qa=zt=0,wn=os=null,du=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var u=31-Oe(s),h=1<<u;t|=e[u],s&=~h}return Oa=t,il(),r}function Gp(e,t){Ve=null,X.H=es,t===ei||t===hl?(t=sh(),mt=3):t===bc?(t=sh(),mt=4):mt=t===Yc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Mn=t,et===null&&(zt=1,Tl(e,Hn(t,e.current)))}function Vp(){var e=Un.current;return e===null?!0:(nt&4194048)===nt?Yn===null:(nt&62914560)===nt||(nt&536870912)!==0?e===Yn:!1}function Fp(){var e=X.H;return X.H=es,e===null?es:e}function Yp(){var e=X.A;return X.A=ex,e}function Il(){zt=4,Ka||(nt&4194048)!==nt&&Un.current!==null||(oi=!0),(Qa&134217727)===0&&(Rr&134217727)===0||St===null||er(St,nt,Bn,!1)}function gu(e,t,r){var s=ht;ht|=2;var u=Fp(),h=Yp();(St!==e||nt!==t)&&(Ml=null,di(e,t)),t=!1;var N=zt;e:do try{if(mt!==0&&et!==null){var U=et,W=Mn;switch(mt){case 8:mu(),N=6;break e;case 3:case 2:case 9:case 6:Un.current===null&&(t=!0);var ce=mt;if(mt=0,Mn=null,fi(e,U,W,ce),r&&oi){N=0;break e}break;default:ce=mt,mt=0,Mn=null,fi(e,U,W,ce)}}ax(),N=zt;break}catch(ye){Gp(e,ye)}while(!0);return t&&e.shellSuspendCounter++,xa=wr=null,ht=s,X.H=u,X.A=h,et===null&&(St=null,nt=0,il()),N}function ax(){for(;et!==null;)Xp(et)}function rx(e,t){var r=ht;ht|=2;var s=Fp(),u=Yp();St!==e||nt!==t?(Ml=null,zl=Te()+500,di(e,t)):oi=Qe(e,t);e:do try{if(mt!==0&&et!==null){t=et;var h=Mn;t:switch(mt){case 1:mt=0,Mn=null,fi(e,t,h,1);break;case 2:case 9:if(rh(h)){mt=0,Mn=null,Zp(t);break}t=function(){mt!==2&&mt!==9||St!==e||(mt=7),fa(e)},h.then(t,t);break e;case 3:mt=7;break e;case 4:mt=5;break e;case 7:rh(h)?(mt=0,Mn=null,Zp(t)):(mt=0,Mn=null,fi(e,t,h,7));break;case 5:var N=null;switch(et.tag){case 26:N=et.memoizedState;case 5:case 27:var U=et;if(N?Lm(N):U.stateNode.complete){mt=0,Mn=null;var W=U.sibling;if(W!==null)et=W;else{var ce=U.return;ce!==null?(et=ce,$l(ce)):et=null}break t}}mt=0,Mn=null,fi(e,t,h,5);break;case 6:mt=0,Mn=null,fi(e,t,h,6);break;case 8:mu(),zt=6;break e;default:throw Error(o(462))}}ix();break}catch(ye){Gp(e,ye)}while(!0);return xa=wr=null,X.H=s,X.A=u,ht=r,et!==null?0:(St=null,nt=0,il(),zt)}function ix(){for(;et!==null&&!ne();)Xp(et)}function Xp(e){var t=yp(e.alternate,e,Oa);e.memoizedProps=e.pendingProps,t===null?$l(e):et=t}function Zp(e){var t=e,r=t.alternate;switch(t.tag){case 15:case 0:t=fp(r,t,t.pendingProps,t.type,void 0,nt);break;case 11:t=fp(r,t,t.pendingProps,t.type.render,t.ref,nt);break;case 5:kc(t);default:xp(r,t),t=et=Yf(t,Oa),t=yp(r,t,Oa)}e.memoizedProps=e.pendingProps,t===null?$l(e):et=t}function fi(e,t,r,s){xa=wr=null,kc(t),ti=null,Fi=0;var u=t.return;try{if(Yb(e,u,t,r,nt)){zt=1,Tl(e,Hn(r,e.current)),et=null;return}}catch(h){if(u!==null)throw et=u,h;zt=1,Tl(e,Hn(r,e.current)),et=null;return}t.flags&32768?(rt||s===1?e=!0:oi||(nt&536870912)!==0?e=!1:(Ka=e=!0,(s===2||s===9||s===3||s===6)&&(s=Un.current,s!==null&&s.tag===13&&(s.flags|=16384))),Kp(t,e)):$l(t)}function $l(e){var t=e;do{if((t.flags&32768)!==0){Kp(t,Ka);return}e=t.return;var r=Kb(t.alternate,t,Oa);if(r!==null){et=r;return}if(t=t.sibling,t!==null){et=t;return}et=t=e}while(t!==null);zt===0&&(zt=5)}function Kp(e,t){do{var r=Qb(e.alternate,e);if(r!==null){r.flags&=32767,et=r;return}if(r=e.return,r!==null&&(r.flags|=32768,r.subtreeFlags=0,r.deletions=null),!t&&(e=e.sibling,e!==null)){et=e;return}et=e=r}while(e!==null);zt=6,et=null}function Qp(e,t,r,s,u,h,N,U,W){e.cancelPendingCommit=null;do Pl();while(Zt!==0);if((ht&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(h=t.lanes|t.childLanes,h|=rc,ze(e,r,h,N,U,W),e===St&&(et=St=null,nt=0),ui=t,Wa=e,ka=r,fu=h,hu=u,$p=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,cx(Me,function(){return nm(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=X.T,X.T=null,u=Y.p,Y.p=2,N=ht,ht|=4;try{Jb(e,t,r)}finally{ht=N,Y.p=u,X.T=s}}Zt=1,Jp(),Wp(),em()}}function Jp(){if(Zt===1){Zt=0;var e=Wa,t=ui,r=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||r){r=X.T,X.T=null;var s=Y.p;Y.p=2;var u=ht;ht|=4;try{Rp(t,e);var h=Eu,N=Bf(e.containerInfo),U=h.focusedElem,W=h.selectionRange;if(N!==U&&U&&U.ownerDocument&&Mf(U.ownerDocument.documentElement,U)){if(W!==null&&Wo(U)){var ce=W.start,ye=W.end;if(ye===void 0&&(ye=ce),"selectionStart"in U)U.selectionStart=ce,U.selectionEnd=Math.min(ye,U.value.length);else{var xe=U.ownerDocument||document,de=xe&&xe.defaultView||window;if(de.getSelection){var me=de.getSelection(),Re=U.textContent.length,Be=Math.min(W.start,Re),bt=W.end===void 0?Be:Math.min(W.end,Re);!me.extend&&Be>bt&&(N=bt,bt=Be,Be=N);var le=zf(U,Be),re=zf(U,bt);if(le&&re&&(me.rangeCount!==1||me.anchorNode!==le.node||me.anchorOffset!==le.offset||me.focusNode!==re.node||me.focusOffset!==re.offset)){var oe=xe.createRange();oe.setStart(le.node,le.offset),me.removeAllRanges(),Be>bt?(me.addRange(oe),me.extend(re.node,re.offset)):(oe.setEnd(re.node,re.offset),me.addRange(oe))}}}}for(xe=[],me=U;me=me.parentNode;)me.nodeType===1&&xe.push({element:me,left:me.scrollLeft,top:me.scrollTop});for(typeof U.focus=="function"&&U.focus(),U=0;U<xe.length;U++){var be=xe[U];be.element.scrollLeft=be.left,be.element.scrollTop=be.top}}Wl=!!Tu,Eu=Tu=null}finally{ht=u,Y.p=s,X.T=r}}e.current=t,Zt=2}}function Wp(){if(Zt===2){Zt=0;var e=Wa,t=ui,r=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||r){r=X.T,X.T=null;var s=Y.p;Y.p=2;var u=ht;ht|=4;try{Tp(e,t.alternate,t)}finally{ht=u,Y.p=s,X.T=r}}Zt=3}}function em(){if(Zt===4||Zt===3){Zt=0,je();var e=Wa,t=ui,r=ka,s=$p;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Zt=5:(Zt=0,ui=Wa=null,tm(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(Ja=null),Rt(r),t=t.stateNode,lt&&typeof lt.onCommitFiberRoot=="function")try{lt.onCommitFiberRoot(Ze,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=X.T,u=Y.p,Y.p=2,X.T=null;try{for(var h=e.onRecoverableError,N=0;N<s.length;N++){var U=s[N];h(U.value,{componentStack:U.stack})}}finally{X.T=t,Y.p=u}}(ka&3)!==0&&Pl(),fa(e),u=e.pendingLanes,(r&261930)!==0&&(u&42)!==0?e===pu?cs++:(cs=0,pu=e):cs=0,us(0)}}function tm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Gi(t)))}function Pl(){return Jp(),Wp(),em(),nm()}function nm(){if(Zt!==5)return!1;var e=Wa,t=fu;fu=0;var r=Rt(ka),s=X.T,u=Y.p;try{Y.p=32>r?32:r,X.T=null,r=hu,hu=null;var h=Wa,N=ka;if(Zt=0,ui=Wa=null,ka=0,(ht&6)!==0)throw Error(o(331));var U=ht;if(ht|=4,Mp(h.current),Lp(h,h.current,N,r),ht=U,us(0,!1),lt&&typeof lt.onPostCommitFiberRoot=="function")try{lt.onPostCommitFiberRoot(Ze,h)}catch{}return!0}finally{Y.p=u,X.T=s,tm(e,t)}}function am(e,t,r){t=Hn(r,t),t=Fc(e.stateNode,t,2),e=Fa(e,t,2),e!==null&&(st(e,2),fa(e))}function gt(e,t,r){if(e.tag===3)am(e,e,r);else for(;t!==null;){if(t.tag===3){am(t,e,r);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Ja===null||!Ja.has(s))){e=Hn(r,e),r=rp(2),s=Fa(t,r,2),s!==null&&(ip(r,s,t,e),st(s,2),fa(s));break}}t=t.return}}function vu(e,t,r){var s=e.pingCache;if(s===null){s=e.pingCache=new tx;var u=new Set;s.set(t,u)}else u=s.get(t),u===void 0&&(u=new Set,s.set(t,u));u.has(r)||(cu=!0,u.add(r),e=sx.bind(null,e,t,r),t.then(e,e))}function sx(e,t,r){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&r,e.warmLanes&=~r,St===e&&(nt&r)===r&&(zt===4||zt===3&&(nt&62914560)===nt&&300>Te()-Ul?(ht&2)===0&&di(e,0):uu|=r,ci===nt&&(ci=0)),fa(e)}function rm(e,t){t===0&&(t=sn()),e=xr(e,t),e!==null&&(st(e,t),fa(e))}function lx(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),rm(e,r)}function ox(e,t){var r=0;switch(e.tag){case 31:case 13:var s=e.stateNode,u=e.memoizedState;u!==null&&(r=u.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(o(314))}s!==null&&s.delete(t),rm(e,r)}function cx(e,t){return he(e,t)}var ql=null,hi=null,yu=!1,Hl=!1,bu=!1,tr=0;function fa(e){e!==hi&&e.next===null&&(hi===null?ql=hi=e:hi=hi.next=e),Hl=!0,yu||(yu=!0,dx())}function us(e,t){if(!bu&&Hl){bu=!0;do for(var r=!1,s=ql;s!==null;){if(e!==0){var u=s.pendingLanes;if(u===0)var h=0;else{var N=s.suspendedLanes,U=s.pingedLanes;h=(1<<31-Oe(42|e)+1)-1,h&=u&~(N&~U),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(r=!0,om(s,h))}else h=nt,h=Et(s,s===St?h:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(h&3)===0||Qe(s,h)||(r=!0,om(s,h));s=s.next}while(r);bu=!1}}function ux(){im()}function im(){Hl=yu=!1;var e=0;tr!==0&&Sx()&&(e=tr);for(var t=Te(),r=null,s=ql;s!==null;){var u=s.next,h=sm(s,t);h===0?(s.next=null,r===null?ql=u:r.next=u,u===null&&(hi=r)):(r=s,(e!==0||(h&3)!==0)&&(Hl=!0)),s=u}Zt!==0&&Zt!==5||us(e),tr!==0&&(tr=0)}function sm(e,t){for(var r=e.suspendedLanes,s=e.pingedLanes,u=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var N=31-Oe(h),U=1<<N,W=u[N];W===-1?((U&r)===0||(U&s)!==0)&&(u[N]=Pe(U,t)):W<=t&&(e.expiredLanes|=U),h&=~U}if(t=St,r=nt,r=Et(e,e===t?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,r===0||e===t&&(mt===2||mt===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&fe(s),e.callbackNode=null,e.callbackPriority=0;if((r&3)===0||Qe(e,r)){if(t=r&-r,t===e.callbackPriority)return t;switch(s!==null&&fe(s),Rt(r)){case 2:case 8:r=Ke;break;case 32:r=Me;break;case 268435456:r=Bt;break;default:r=Me}return s=lm.bind(null,e),r=he(r,s),e.callbackPriority=t,e.callbackNode=r,t}return s!==null&&s!==null&&fe(s),e.callbackPriority=2,e.callbackNode=null,2}function lm(e,t){if(Zt!==0&&Zt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var r=e.callbackNode;if(Pl()&&e.callbackNode!==r)return null;var s=nt;return s=Et(e,e===St?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(qp(e,s,t),sm(e,Te()),e.callbackNode!=null&&e.callbackNode===r?lm.bind(null,e):null)}function om(e,t){if(Pl())return null;qp(e,t,!0)}function dx(){wx(function(){(ht&6)!==0?he(Ee,ux):im()})}function xu(){if(tr===0){var e=Jr;e===0&&(e=ot,ot<<=1,(ot&261888)===0&&(ot=256)),tr=e}return tr}function cm(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:pn(""+e)}function um(e,t){var r=t.ownerDocument.createElement("input");return r.name=t.name,r.value=t.value,e.id&&r.setAttribute("form",e.id),t.parentNode.insertBefore(r,t),e=new FormData(e),r.parentNode.removeChild(r),e}function fx(e,t,r,s,u){if(t==="submit"&&r&&r.stateNode===u){var h=cm((u[Ft]||null).action),N=s.submitter;N&&(t=(t=N[Ft]||null)?cm(t.formAction):N.getAttribute("formAction"),t!==null&&(h=t,N=null));var U=new tl("action","action",null,s,u);e.push({event:U,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(tr!==0){var W=N?um(u,N):new FormData(u);$c(r,{pending:!0,data:W,method:u.method,action:h},null,W)}}else typeof h=="function"&&(U.preventDefault(),W=N?um(u,N):new FormData(u),$c(r,{pending:!0,data:W,method:u.method,action:h},h,W))},currentTarget:u}]})}}for(var Su=0;Su<ac.length;Su++){var ju=ac[Su],hx=ju.toLowerCase(),px=ju[0].toUpperCase()+ju.slice(1);ea(hx,"on"+px)}ea(Pf,"onAnimationEnd"),ea(qf,"onAnimationIteration"),ea(Hf,"onAnimationStart"),ea("dblclick","onDoubleClick"),ea("focusin","onFocus"),ea("focusout","onBlur"),ea(Ob,"onTransitionRun"),ea(kb,"onTransitionStart"),ea(Rb,"onTransitionCancel"),ea(Gf,"onTransitionEnd"),oa("onMouseEnter",["mouseout","mouseover"]),oa("onMouseLeave",["mouseout","mouseover"]),oa("onPointerEnter",["pointerout","pointerover"]),oa("onPointerLeave",["pointerout","pointerover"]),An("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),An("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),An("onBeforeInput",["compositionend","keypress","textInput","paste"]),An("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),An("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),An("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ds="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(" "),mx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ds));function dm(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var s=e[r],u=s.event;s=s.listeners;e:{var h=void 0;if(t)for(var N=s.length-1;0<=N;N--){var U=s[N],W=U.instance,ce=U.currentTarget;if(U=U.listener,W!==h&&u.isPropagationStopped())break e;h=U,u.currentTarget=ce;try{h(u)}catch(ye){rl(ye)}u.currentTarget=null,h=W}else for(N=0;N<s.length;N++){if(U=s[N],W=U.instance,ce=U.currentTarget,U=U.listener,W!==h&&u.isPropagationStopped())break e;h=U,u.currentTarget=ce;try{h(u)}catch(ye){rl(ye)}u.currentTarget=null,h=W}}}}function tt(e,t){var r=t[Ua];r===void 0&&(r=t[Ua]=new Set);var s=e+"__bubble";r.has(s)||(fm(t,e,2,!1),r.add(s))}function wu(e,t,r){var s=0;t&&(s|=4),fm(r,e,s,t)}var Gl="_reactListening"+Math.random().toString(36).slice(2);function Nu(e){if(!e[Gl]){e[Gl]=!0,Br.forEach(function(r){r!=="selectionchange"&&(mx.has(r)||wu(r,!1,e),wu(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Gl]||(t[Gl]=!0,wu("selectionchange",!1,t))}}function fm(e,t,r,s){switch(Pm(t)){case 2:var u=Hx;break;case 8:u=Gx;break;default:u=Iu}r=u.bind(null,t,r,e),u=void 0,!Go||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(u=!0),s?u!==void 0?e.addEventListener(t,r,{capture:!0,passive:u}):e.addEventListener(t,r,!0):u!==void 0?e.addEventListener(t,r,{passive:u}):e.addEventListener(t,r,!1)}function Cu(e,t,r,s,u){var h=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var N=s.tag;if(N===3||N===4){var U=s.stateNode.containerInfo;if(U===u)break;if(N===4)for(N=s.return;N!==null;){var W=N.tag;if((W===3||W===4)&&N.stateNode.containerInfo===u)return;N=N.return}for(;U!==null;){if(N=Yt(U),N===null)return;if(W=N.tag,W===5||W===6||W===26||W===27){s=h=N;continue e}U=U.parentNode}}s=s.return}vf(function(){var ce=h,ye=qo(r),xe=[];e:{var de=Vf.get(e);if(de!==void 0){var me=tl,Re=e;switch(e){case"keypress":if(Ws(r)===0)break e;case"keydown":case"keyup":me=ob;break;case"focusin":Re="focus",me=Xo;break;case"focusout":Re="blur",me=Xo;break;case"beforeblur":case"afterblur":me=Xo;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=xf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=Ky;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=db;break;case Pf:case qf:case Hf:me=Wy;break;case Gf:me=hb;break;case"scroll":case"scrollend":me=Xy;break;case"wheel":me=mb;break;case"copy":case"cut":case"paste":me=tb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=jf;break;case"toggle":case"beforetoggle":me=vb}var Be=(t&4)!==0,bt=!Be&&(e==="scroll"||e==="scrollend"),le=Be?de!==null?de+"Capture":null:de;Be=[];for(var re=ce,oe;re!==null;){var be=re;if(oe=be.stateNode,be=be.tag,be!==5&&be!==26&&be!==27||oe===null||le===null||(be=Di(re,le),be!=null&&Be.push(fs(re,be,oe))),bt)break;re=re.return}0<Be.length&&(de=new me(de,Re,null,r,ye),xe.push({event:de,listeners:Be}))}}if((t&7)===0){e:{if(de=e==="mouseover"||e==="pointerover",me=e==="mouseout"||e==="pointerout",de&&r!==Ri&&(Re=r.relatedTarget||r.fromElement)&&(Yt(Re)||Re[fn]))break e;if((me||de)&&(de=ye.window===ye?ye:(de=ye.ownerDocument)?de.defaultView||de.parentWindow:window,me?(Re=r.relatedTarget||r.toElement,me=ce,Re=Re?Yt(Re):null,Re!==null&&(bt=d(Re),Be=Re.tag,Re!==bt||Be!==5&&Be!==27&&Be!==6)&&(Re=null)):(me=null,Re=ce),me!==Re)){if(Be=xf,be="onMouseLeave",le="onMouseEnter",re="mouse",(e==="pointerout"||e==="pointerover")&&(Be=jf,be="onPointerLeave",le="onPointerEnter",re="pointer"),bt=me==null?de:En(me),oe=Re==null?de:En(Re),de=new Be(be,re+"leave",me,r,ye),de.target=bt,de.relatedTarget=oe,be=null,Yt(ye)===ce&&(Be=new Be(le,re+"enter",Re,r,ye),Be.target=oe,Be.relatedTarget=bt,be=Be),bt=be,me&&Re)t:{for(Be=gx,le=me,re=Re,oe=0,be=le;be;be=Be(be))oe++;be=0;for(var Ue=re;Ue;Ue=Be(Ue))be++;for(;0<oe-be;)le=Be(le),oe--;for(;0<be-oe;)re=Be(re),be--;for(;oe--;){if(le===re||re!==null&&le===re.alternate){Be=le;break t}le=Be(le),re=Be(re)}Be=null}else Be=null;me!==null&&hm(xe,de,me,Be,!1),Re!==null&&bt!==null&&hm(xe,bt,Re,Be,!0)}}e:{if(de=ce?En(ce):window,me=de.nodeName&&de.nodeName.toLowerCase(),me==="select"||me==="input"&&de.type==="file")var dt=Of;else if(Ef(de))if(kf)dt=Tb;else{dt=Cb;var De=Nb}else me=de.nodeName,!me||me.toLowerCase()!=="input"||de.type!=="checkbox"&&de.type!=="radio"?ce&&Jn(ce.elementType)&&(dt=Of):dt=_b;if(dt&&(dt=dt(e,ce))){Af(xe,dt,r,ye);break e}De&&De(e,de,ce),e==="focusout"&&ce&&de.type==="number"&&ce.memoizedProps.value!=null&&ut(de,"number",de.value)}switch(De=ce?En(ce):window,e){case"focusin":(Ef(De)||De.contentEditable==="true")&&(Gr=De,ec=ce,Pi=null);break;case"focusout":Pi=ec=Gr=null;break;case"mousedown":tc=!0;break;case"contextmenu":case"mouseup":case"dragend":tc=!1,If(xe,r,ye);break;case"selectionchange":if(Ab)break;case"keydown":case"keyup":If(xe,r,ye)}var Xe;if(Ko)e:{switch(e){case"compositionstart":var at="onCompositionStart";break e;case"compositionend":at="onCompositionEnd";break e;case"compositionupdate":at="onCompositionUpdate";break e}at=void 0}else Hr?_f(e,r)&&(at="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(at="onCompositionStart");at&&(wf&&r.locale!=="ko"&&(Hr||at!=="onCompositionStart"?at==="onCompositionEnd"&&Hr&&(Xe=yf()):(Ia=ye,Vo="value"in Ia?Ia.value:Ia.textContent,Hr=!0)),De=Vl(ce,at),0<De.length&&(at=new Sf(at,e,null,r,ye),xe.push({event:at,listeners:De}),Xe?at.data=Xe:(Xe=Tf(r),Xe!==null&&(at.data=Xe)))),(Xe=bb?xb(e,r):Sb(e,r))&&(at=Vl(ce,"onBeforeInput"),0<at.length&&(De=new Sf("onBeforeInput","beforeinput",null,r,ye),xe.push({event:De,listeners:at}),De.data=Xe)),fx(xe,e,ce,r,ye)}dm(xe,t)})}function fs(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Vl(e,t){for(var r=t+"Capture",s=[];e!==null;){var u=e,h=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||h===null||(u=Di(e,r),u!=null&&s.unshift(fs(e,u,h)),u=Di(e,t),u!=null&&s.push(fs(e,u,h))),e.tag===3)return s;e=e.return}return[]}function gx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function hm(e,t,r,s,u){for(var h=t._reactName,N=[];r!==null&&r!==s;){var U=r,W=U.alternate,ce=U.stateNode;if(U=U.tag,W!==null&&W===s)break;U!==5&&U!==26&&U!==27||ce===null||(W=ce,u?(ce=Di(r,h),ce!=null&&N.unshift(fs(r,ce,W))):u||(ce=Di(r,h),ce!=null&&N.push(fs(r,ce,W)))),r=r.return}N.length!==0&&e.push({event:t,listeners:N})}var vx=/\r\n?/g,yx=/\u0000|\uFFFD/g;function pm(e){return(typeof e=="string"?e:""+e).replace(vx,`
|
|
9
|
+
`).replace(yx,"")}function mm(e,t){return t=pm(t),pm(e)===t}function yt(e,t,r,s,u,h){switch(r){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Rn(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Rn(e,""+s);break;case"className":Ba(e,"class",s);break;case"tabIndex":Ba(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ba(e,r,s);break;case"style":Qs(e,s,h);break;case"data":if(t!=="object"){Ba(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||r!=="href")){e.removeAttribute(r);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(r);break}s=pn(""+s),e.setAttribute(r,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(r,"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 h=="function"&&(r==="formAction"?(t!=="input"&&yt(e,t,"name",u.name,u,null),yt(e,t,"formEncType",u.formEncType,u,null),yt(e,t,"formMethod",u.formMethod,u,null),yt(e,t,"formTarget",u.formTarget,u,null)):(yt(e,t,"encType",u.encType,u,null),yt(e,t,"method",u.method,u,null),yt(e,t,"target",u.target,u,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(r);break}s=pn(""+s),e.setAttribute(r,s);break;case"onClick":s!=null&&(e.onclick=Wn);break;case"onScroll":s!=null&&tt("scroll",e);break;case"onScrollEnd":s!=null&&tt("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(r=s.__html,r!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}r=pn(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",r);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(r,""+s):e.removeAttribute(r);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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(r,""):e.removeAttribute(r);break;case"capture":case"download":s===!0?e.setAttribute(r,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(r,s):e.removeAttribute(r);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(r,s):e.removeAttribute(r);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(r):e.setAttribute(r,s);break;case"popover":tt("beforetoggle",e),tt("toggle",e),Ma(e,"popover",s);break;case"xlinkActuate":kn(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":kn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":kn(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":kn(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":kn(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":kn(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":kn(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":kn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":kn(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Ma(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<r.length)||r[0]!=="o"&&r[0]!=="O"||r[1]!=="n"&&r[1]!=="N")&&(r=ki.get(r)||r,Ma(e,r,s))}}function _u(e,t,r,s,u,h){switch(r){case"style":Qs(e,s,h);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(o(61));if(r=s.__html,r!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=r}}break;case"children":typeof s=="string"?Rn(e,s):(typeof s=="number"||typeof s=="bigint")&&Rn(e,""+s);break;case"onScroll":s!=null&&tt("scroll",e);break;case"onScrollEnd":s!=null&&tt("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Wn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ir.hasOwnProperty(r))e:{if(r[0]==="o"&&r[1]==="n"&&(u=r.endsWith("Capture"),t=r.slice(2,u?r.length-7:void 0),h=e[Ft]||null,h=h!=null?h[r]:null,typeof h=="function"&&e.removeEventListener(t,h,u),typeof s=="function")){typeof h!="function"&&h!==null&&(r in e?e[r]=null:e.hasAttribute(r)&&e.removeAttribute(r)),e.addEventListener(t,s,u);break e}r in e?e[r]=s:s===!0?e.setAttribute(r,""):Ma(e,r,s)}}}function rn(e,t,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":tt("error",e),tt("load",e);var s=!1,u=!1,h;for(h in r)if(r.hasOwnProperty(h)){var N=r[h];if(N!=null)switch(h){case"src":s=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:yt(e,t,h,N,r,null)}}u&&yt(e,t,"srcSet",r.srcSet,r,null),s&&yt(e,t,"src",r.src,r,null);return;case"input":tt("invalid",e);var U=h=N=u=null,W=null,ce=null;for(s in r)if(r.hasOwnProperty(s)){var ye=r[s];if(ye!=null)switch(s){case"name":u=ye;break;case"type":N=ye;break;case"checked":W=ye;break;case"defaultChecked":ce=ye;break;case"value":h=ye;break;case"defaultValue":U=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(o(137,t));break;default:yt(e,t,s,ye,r,null)}}ke(e,h,U,W,ce,N,u,!1);return;case"select":tt("invalid",e),s=N=h=null;for(u in r)if(r.hasOwnProperty(u)&&(U=r[u],U!=null))switch(u){case"value":h=U;break;case"defaultValue":N=U;break;case"multiple":s=U;default:yt(e,t,u,U,r,null)}t=h,r=N,e.multiple=!!s,t!=null?xt(e,!!s,t,!1):r!=null&&xt(e,!!s,r,!0);return;case"textarea":tt("invalid",e),h=u=s=null;for(N in r)if(r.hasOwnProperty(N)&&(U=r[N],U!=null))switch(N){case"value":s=U;break;case"defaultValue":u=U;break;case"children":h=U;break;case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(91));break;default:yt(e,t,N,U,r,null)}Lt(e,s,u,h);return;case"option":for(W in r)r.hasOwnProperty(W)&&(s=r[W],s!=null)&&(W==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":yt(e,t,W,s,r,null));return;case"dialog":tt("beforetoggle",e),tt("toggle",e),tt("cancel",e),tt("close",e);break;case"iframe":case"object":tt("load",e);break;case"video":case"audio":for(s=0;s<ds.length;s++)tt(ds[s],e);break;case"image":tt("error",e),tt("load",e);break;case"details":tt("toggle",e);break;case"embed":case"source":case"link":tt("error",e),tt("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(ce in r)if(r.hasOwnProperty(ce)&&(s=r[ce],s!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:yt(e,t,ce,s,r,null)}return;default:if(Jn(t)){for(ye in r)r.hasOwnProperty(ye)&&(s=r[ye],s!==void 0&&_u(e,t,ye,s,r,void 0));return}}for(U in r)r.hasOwnProperty(U)&&(s=r[U],s!=null&&yt(e,t,U,s,r,null))}function bx(e,t,r,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,h=null,N=null,U=null,W=null,ce=null,ye=null;for(me in r){var xe=r[me];if(r.hasOwnProperty(me)&&xe!=null)switch(me){case"checked":break;case"value":break;case"defaultValue":W=xe;default:s.hasOwnProperty(me)||yt(e,t,me,null,s,xe)}}for(var de in s){var me=s[de];if(xe=r[de],s.hasOwnProperty(de)&&(me!=null||xe!=null))switch(de){case"type":h=me;break;case"name":u=me;break;case"checked":ce=me;break;case"defaultChecked":ye=me;break;case"value":N=me;break;case"defaultValue":U=me;break;case"children":case"dangerouslySetInnerHTML":if(me!=null)throw Error(o(137,t));break;default:me!==xe&&yt(e,t,de,me,s,xe)}}ve(e,N,U,W,ce,ye,h,u);return;case"select":me=N=U=de=null;for(h in r)if(W=r[h],r.hasOwnProperty(h)&&W!=null)switch(h){case"value":break;case"multiple":me=W;default:s.hasOwnProperty(h)||yt(e,t,h,null,s,W)}for(u in s)if(h=s[u],W=r[u],s.hasOwnProperty(u)&&(h!=null||W!=null))switch(u){case"value":de=h;break;case"defaultValue":U=h;break;case"multiple":N=h;default:h!==W&&yt(e,t,u,h,s,W)}t=U,r=N,s=me,de!=null?xt(e,!!r,de,!1):!!s!=!!r&&(t!=null?xt(e,!!r,t,!0):xt(e,!!r,r?[]:"",!1));return;case"textarea":me=de=null;for(U in r)if(u=r[U],r.hasOwnProperty(U)&&u!=null&&!s.hasOwnProperty(U))switch(U){case"value":break;case"children":break;default:yt(e,t,U,null,s,u)}for(N in s)if(u=s[N],h=r[N],s.hasOwnProperty(N)&&(u!=null||h!=null))switch(N){case"value":de=u;break;case"defaultValue":me=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==h&&yt(e,t,N,u,s,h)}en(e,de,me);return;case"option":for(var Re in r)de=r[Re],r.hasOwnProperty(Re)&&de!=null&&!s.hasOwnProperty(Re)&&(Re==="selected"?e.selected=!1:yt(e,t,Re,null,s,de));for(W in s)de=s[W],me=r[W],s.hasOwnProperty(W)&&de!==me&&(de!=null||me!=null)&&(W==="selected"?e.selected=de&&typeof de!="function"&&typeof de!="symbol":yt(e,t,W,de,s,me));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 Be in r)de=r[Be],r.hasOwnProperty(Be)&&de!=null&&!s.hasOwnProperty(Be)&&yt(e,t,Be,null,s,de);for(ce in s)if(de=s[ce],me=r[ce],s.hasOwnProperty(ce)&&de!==me&&(de!=null||me!=null))switch(ce){case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(o(137,t));break;default:yt(e,t,ce,de,s,me)}return;default:if(Jn(t)){for(var bt in r)de=r[bt],r.hasOwnProperty(bt)&&de!==void 0&&!s.hasOwnProperty(bt)&&_u(e,t,bt,void 0,s,de);for(ye in s)de=s[ye],me=r[ye],!s.hasOwnProperty(ye)||de===me||de===void 0&&me===void 0||_u(e,t,ye,de,s,me);return}}for(var le in r)de=r[le],r.hasOwnProperty(le)&&de!=null&&!s.hasOwnProperty(le)&&yt(e,t,le,null,s,de);for(xe in s)de=s[xe],me=r[xe],!s.hasOwnProperty(xe)||de===me||de==null&&me==null||yt(e,t,xe,de,s,me)}function gm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,r=performance.getEntriesByType("resource"),s=0;s<r.length;s++){var u=r[s],h=u.transferSize,N=u.initiatorType,U=u.duration;if(h&&U&&gm(N)){for(N=0,U=u.responseEnd,s+=1;s<r.length;s++){var W=r[s],ce=W.startTime;if(ce>U)break;var ye=W.transferSize,xe=W.initiatorType;ye&&gm(xe)&&(W=W.responseEnd,N+=ye*(W<U?1:(U-ce)/(W-ce)))}if(--s,t+=8*(h+N)/(u.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 Tu=null,Eu=null;function Fl(e){return e.nodeType===9?e:e.ownerDocument}function vm(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 ym(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 Au(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 Ou=null;function Sx(){var e=window.event;return e&&e.type==="popstate"?e===Ou?!1:(Ou=e,!0):(Ou=null,!1)}var bm=typeof setTimeout=="function"?setTimeout:void 0,jx=typeof clearTimeout=="function"?clearTimeout:void 0,xm=typeof Promise=="function"?Promise:void 0,wx=typeof queueMicrotask=="function"?queueMicrotask:typeof xm<"u"?function(e){return xm.resolve(null).then(e).catch(Nx)}:bm;function Nx(e){setTimeout(function(){throw e})}function nr(e){return e==="head"}function Sm(e,t){var r=t,s=0;do{var u=r.nextSibling;if(e.removeChild(r),u&&u.nodeType===8)if(r=u.data,r==="/$"||r==="/&"){if(s===0){e.removeChild(u),vi(t);return}s--}else if(r==="$"||r==="$?"||r==="$~"||r==="$!"||r==="&")s++;else if(r==="html")hs(e.ownerDocument.documentElement);else if(r==="head"){r=e.ownerDocument.head,hs(r);for(var h=r.firstChild;h;){var N=h.nextSibling,U=h.nodeName;h[vn]||U==="SCRIPT"||U==="STYLE"||U==="LINK"&&h.rel.toLowerCase()==="stylesheet"||r.removeChild(h),h=N}}else r==="body"&&hs(e.ownerDocument.body);r=u}while(r);vi(t)}function jm(e,t){var r=e;e=0;do{var s=r.nextSibling;if(r.nodeType===1?t?(r._stashedDisplay=r.style.display,r.style.display="none"):(r.style.display=r._stashedDisplay||"",r.getAttribute("style")===""&&r.removeAttribute("style")):r.nodeType===3&&(t?(r._stashedText=r.nodeValue,r.nodeValue=""):r.nodeValue=r._stashedText||""),s&&s.nodeType===8)if(r=s.data,r==="/$"){if(e===0)break;e--}else r!=="$"&&r!=="$?"&&r!=="$~"&&r!=="$!"||e++;r=s}while(r)}function ku(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var r=t;switch(t=t.nextSibling,r.nodeName){case"HTML":case"HEAD":case"BODY":ku(r),hn(r);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(r.rel.toLowerCase()==="stylesheet")continue}e.removeChild(r)}}function Cx(e,t,r,s){for(;e.nodeType===1;){var u=r;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[vn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var h=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=Xn(e.nextSibling),e===null)break}return null}function _x(e,t,r){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!r||(e=Xn(e.nextSibling),e===null))return null;return e}function wm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Xn(e.nextSibling),e===null))return null;return e}function Ru(e){return e.data==="$?"||e.data==="$~"}function Du(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Tx(e,t){var r=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||r.readyState!=="loading")t();else{var s=function(){t(),r.removeEventListener("DOMContentLoaded",s)};r.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Xn(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 Lu=null;function Nm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"||r==="/&"){if(t===0)return Xn(e.nextSibling);t--}else r!=="$"&&r!=="$!"&&r!=="$?"&&r!=="$~"&&r!=="&"||t++}e=e.nextSibling}return null}function Cm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"){if(t===0)return e;t--}else r!=="/$"&&r!=="/&"||t++}e=e.previousSibling}return null}function _m(e,t,r){switch(t=Fl(r),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 hs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);hn(e)}var Zn=new Map,Tm=new Set;function Yl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ra=Y.d;Y.d={f:Ex,r:Ax,D:Ox,C:kx,L:Rx,m:Dx,X:Ux,S:Lx,M:zx};function Ex(){var e=Ra.f(),t=Bl();return e||t}function Ax(e){var t=Tn(e);t!==null&&t.tag===5&&t.type==="form"?Gh(t):Ra.r(e)}var pi=typeof document>"u"?null:document;function Em(e,t,r){var s=pi;if(s&&typeof t=="string"&&t){var u=yn(t);u='link[rel="'+e+'"][href="'+u+'"]',typeof r=="string"&&(u+='[crossorigin="'+r+'"]'),Tm.has(u)||(Tm.add(u),e={rel:e,crossOrigin:r,href:t},s.querySelector(u)===null&&(t=s.createElement("link"),rn(t,"link",e),wt(t),s.head.appendChild(t)))}}function Ox(e){Ra.D(e),Em("dns-prefetch",e,null)}function kx(e,t){Ra.C(e,t),Em("preconnect",e,t)}function Rx(e,t,r){Ra.L(e,t,r);var s=pi;if(s&&e&&t){var u='link[rel="preload"][as="'+yn(t)+'"]';t==="image"&&r&&r.imageSrcSet?(u+='[imagesrcset="'+yn(r.imageSrcSet)+'"]',typeof r.imageSizes=="string"&&(u+='[imagesizes="'+yn(r.imageSizes)+'"]')):u+='[href="'+yn(e)+'"]';var h=u;switch(t){case"style":h=mi(e);break;case"script":h=gi(e)}Zn.has(h)||(e=v({rel:"preload",href:t==="image"&&r&&r.imageSrcSet?void 0:e,as:t},r),Zn.set(h,e),s.querySelector(u)!==null||t==="style"&&s.querySelector(ps(h))||t==="script"&&s.querySelector(ms(h))||(t=s.createElement("link"),rn(t,"link",e),wt(t),s.head.appendChild(t)))}}function Dx(e,t){Ra.m(e,t);var r=pi;if(r&&e){var s=t&&typeof t.as=="string"?t.as:"script",u='link[rel="modulepreload"][as="'+yn(s)+'"][href="'+yn(e)+'"]',h=u;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=gi(e)}if(!Zn.has(h)&&(e=v({rel:"modulepreload",href:e},t),Zn.set(h,e),r.querySelector(u)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(r.querySelector(ms(h)))return}s=r.createElement("link"),rn(s,"link",e),wt(s),r.head.appendChild(s)}}}function Lx(e,t,r){Ra.S(e,t,r);var s=pi;if(s&&e){var u=ct(s).hoistableStyles,h=mi(e);t=t||"default";var N=u.get(h);if(!N){var U={loading:0,preload:null};if(N=s.querySelector(ps(h)))U.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},r),(r=Zn.get(h))&&Uu(e,r);var W=N=s.createElement("link");wt(W),rn(W,"link",e),W._p=new Promise(function(ce,ye){W.onload=ce,W.onerror=ye}),W.addEventListener("load",function(){U.loading|=1}),W.addEventListener("error",function(){U.loading|=2}),U.loading|=4,Xl(N,t,s)}N={type:"stylesheet",instance:N,count:1,state:U},u.set(h,N)}}}function Ux(e,t){Ra.X(e,t);var r=pi;if(r&&e){var s=ct(r).hoistableScripts,u=gi(e),h=s.get(u);h||(h=r.querySelector(ms(u)),h||(e=v({src:e,async:!0},t),(t=Zn.get(u))&&zu(e,t),h=r.createElement("script"),wt(h),rn(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(u,h))}}function zx(e,t){Ra.M(e,t);var r=pi;if(r&&e){var s=ct(r).hoistableScripts,u=gi(e),h=s.get(u);h||(h=r.querySelector(ms(u)),h||(e=v({src:e,async:!0,type:"module"},t),(t=Zn.get(u))&&zu(e,t),h=r.createElement("script"),wt(h),rn(h,"link",e),r.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},s.set(u,h))}}function Am(e,t,r,s){var u=(u=pe.current)?Yl(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof r.precedence=="string"&&typeof r.href=="string"?(t=mi(r.href),r=ct(u).hoistableStyles,s=r.get(t),s||(s={type:"style",instance:null,count:0,state:null},r.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(r.rel==="stylesheet"&&typeof r.href=="string"&&typeof r.precedence=="string"){e=mi(r.href);var h=ct(u).hoistableStyles,N=h.get(e);if(N||(u=u.ownerDocument||u,N={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,N),(h=u.querySelector(ps(e)))&&!h._p&&(N.instance=h,N.state.loading=5),Zn.has(e)||(r={rel:"preload",as:"style",href:r.href,crossOrigin:r.crossOrigin,integrity:r.integrity,media:r.media,hrefLang:r.hrefLang,referrerPolicy:r.referrerPolicy},Zn.set(e,r),h||Mx(u,e,r,N.state))),t&&s===null)throw Error(o(528,""));return N}if(t&&s!==null)throw Error(o(529,""));return null;case"script":return t=r.async,r=r.src,typeof r=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=gi(r),r=ct(u).hoistableScripts,s=r.get(t),s||(s={type:"script",instance:null,count:0,state:null},r.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function mi(e){return'href="'+yn(e)+'"'}function ps(e){return'link[rel="stylesheet"]['+e+"]"}function Om(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Mx(e,t,r,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),rn(t,"link",r),wt(t),e.head.appendChild(t))}function gi(e){return'[src="'+yn(e)+'"]'}function ms(e){return"script[async]"+e}function km(e,t,r){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+yn(r.href)+'"]');if(s)return t.instance=s,wt(s),s;var u=v({},r,{"data-href":r.href,"data-precedence":r.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),wt(s),rn(s,"style",u),Xl(s,r.precedence,e),t.instance=s;case"stylesheet":u=mi(r.href);var h=e.querySelector(ps(u));if(h)return t.state.loading|=4,t.instance=h,wt(h),h;s=Om(r),(u=Zn.get(u))&&Uu(s,u),h=(e.ownerDocument||e).createElement("link"),wt(h);var N=h;return N._p=new Promise(function(U,W){N.onload=U,N.onerror=W}),rn(h,"link",s),t.state.loading|=4,Xl(h,r.precedence,e),t.instance=h;case"script":return h=gi(r.src),(u=e.querySelector(ms(h)))?(t.instance=u,wt(u),u):(s=r,(u=Zn.get(h))&&(s=v({},r),zu(s,u)),e=e.ownerDocument||e,u=e.createElement("script"),wt(u),rn(u,"link",s),e.head.appendChild(u),t.instance=u);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Xl(s,r.precedence,e));return t.instance}function Xl(e,t,r){for(var s=r.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=s.length?s[s.length-1]:null,h=u,N=0;N<s.length;N++){var U=s[N];if(U.dataset.precedence===t)h=U;else if(h!==u)break}h?h.parentNode.insertBefore(e,h.nextSibling):(t=r.nodeType===9?r.head:r,t.insertBefore(e,t.firstChild))}function Uu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function zu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Zl=null;function Rm(e,t,r){if(Zl===null){var s=new Map,u=Zl=new Map;u.set(r,s)}else u=Zl,s=u.get(r),s||(s=new Map,u.set(r,s));if(s.has(e))return s;for(s.set(e,null),r=r.getElementsByTagName(e),u=0;u<r.length;u++){var h=r[u];if(!(h[vn]||h[At]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var N=h.getAttribute(t)||"";N=e+N;var U=s.get(N);U?U.push(h):s.set(N,[h])}}return s}function Dm(e,t,r){e=e.ownerDocument||e,e.head.insertBefore(r,t==="title"?e.querySelector("head > title"):null)}function Bx(e,t,r){if(r===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 Lm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Ix(e,t,r,s){if(r.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(r.state.loading&4)===0){if(r.instance===null){var u=mi(s.href),h=t.querySelector(ps(u));if(h){t=h._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Kl.bind(e),t.then(e,e)),r.state.loading|=4,r.instance=h,wt(h);return}h=t.ownerDocument||t,s=Om(s),(u=Zn.get(u))&&Uu(s,u),h=h.createElement("link"),wt(h);var N=h;N._p=new Promise(function(U,W){N.onload=U,N.onerror=W}),rn(h,"link",s),r.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(r,t),(t=r.state.preload)&&(r.state.loading&3)===0&&(e.count++,r=Kl.bind(e),t.addEventListener("load",r),t.addEventListener("error",r))}}var Mu=0;function $x(e,t){return e.stylesheets&&e.count===0&&Jl(e,e.stylesheets),0<e.count||0<e.imgCount?function(r){var s=setTimeout(function(){if(e.stylesheets&&Jl(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+t);0<e.imgBytes&&Mu===0&&(Mu=62500*xx());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Jl(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>Mu?50:800)+t);return e.unsuspend=r,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(u)}}:null}function Kl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Jl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ql=null;function Jl(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ql=new Map,t.forEach(Px,e),Ql=null,Kl.call(e))}function Px(e,t){if(!(t.state.loading&4)){var r=Ql.get(e);if(r)var s=r.get(null);else{r=new Map,Ql.set(e,r);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<u.length;h++){var N=u[h];(N.nodeName==="LINK"||N.getAttribute("media")!=="not all")&&(r.set(N.dataset.precedence,N),s=N)}s&&r.set(null,s)}u=t.instance,N=u.getAttribute("data-precedence"),h=r.get(N)||s,h===s&&r.set(null,u),r.set(N,u),this.count++,s=Kl.bind(this),u.addEventListener("load",s),u.addEventListener("error",s),h?h.parentNode.insertBefore(u,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),t.state.loading|=4}}var gs={$$typeof:L,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function qx(e,t,r,s,u,h,N,U,W){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=la(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=la(0),this.hiddenUpdates=la(null),this.identifierPrefix=s,this.onUncaughtError=u,this.onCaughtError=h,this.onRecoverableError=N,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=W,this.incompleteTransitions=new Map}function Um(e,t,r,s,u,h,N,U,W,ce,ye,xe){return e=new qx(e,t,r,N,W,ce,ye,xe,U),t=1,h===!0&&(t|=24),h=Ln(3,null,null,t),e.current=h,h.stateNode=e,t=gc(),t.refCount++,e.pooledCache=t,t.refCount++,h.memoizedState={element:s,isDehydrated:r,cache:t},xc(h),e}function zm(e){return e?(e=Yr,e):Yr}function Mm(e,t,r,s,u,h){u=zm(u),s.context===null?s.context=u:s.pendingContext=u,s=Va(t),s.payload={element:r},h=h===void 0?null:h,h!==null&&(s.callback=h),r=Fa(e,s,t),r!==null&&(Nn(r,e,t),Xi(r,e,t))}function Bm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Bu(e,t){Bm(e,t),(e=e.alternate)&&Bm(e,t)}function Im(e){if(e.tag===13||e.tag===31){var t=xr(e,67108864);t!==null&&Nn(t,e,67108864),Bu(e,67108864)}}function $m(e){if(e.tag===13||e.tag===31){var t=In();t=It(t);var r=xr(e,t);r!==null&&Nn(r,e,t),Bu(e,t)}}var Wl=!0;function Hx(e,t,r,s){var u=X.T;X.T=null;var h=Y.p;try{Y.p=2,Iu(e,t,r,s)}finally{Y.p=h,X.T=u}}function Gx(e,t,r,s){var u=X.T;X.T=null;var h=Y.p;try{Y.p=8,Iu(e,t,r,s)}finally{Y.p=h,X.T=u}}function Iu(e,t,r,s){if(Wl){var u=$u(s);if(u===null)Cu(e,t,s,eo,r),qm(e,s);else if(Fx(u,e,t,r,s))s.stopPropagation();else if(qm(e,s),t&4&&-1<Vx.indexOf(e)){for(;u!==null;){var h=Tn(u);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var N=Ge(h.pendingLanes);if(N!==0){var U=h;for(U.pendingLanes|=2,U.entangledLanes|=2;N;){var W=1<<31-Oe(N);U.entanglements[1]|=W,N&=~W}fa(h),(ht&6)===0&&(zl=Te()+500,us(0))}}break;case 31:case 13:U=xr(h,2),U!==null&&Nn(U,h,2),Bl(),Bu(h,2)}if(h=$u(s),h===null&&Cu(e,t,s,eo,r),h===u)break;u=h}u!==null&&s.stopPropagation()}else Cu(e,t,s,null,r)}}function $u(e){return e=qo(e),Pu(e)}var eo=null;function Pu(e){if(eo=null,e=Yt(e),e!==null){var t=d(e);if(t===null)e=null;else{var r=t.tag;if(r===13){if(e=f(t),e!==null)return e;e=null}else if(r===31){if(e=p(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return eo=e,null}function Pm(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(Se()){case Ee:return 2;case Ke:return 8;case Me:case kt:return 32;case Bt:return 268435456;default:return 32}default:return 32}}var qu=!1,ar=null,rr=null,ir=null,vs=new Map,ys=new Map,sr=[],Vx="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 qm(e,t){switch(e){case"focusin":case"focusout":ar=null;break;case"dragenter":case"dragleave":rr=null;break;case"mouseover":case"mouseout":ir=null;break;case"pointerover":case"pointerout":vs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ys.delete(t.pointerId)}}function bs(e,t,r,s,u,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:r,eventSystemFlags:s,nativeEvent:h,targetContainers:[u]},t!==null&&(t=Tn(t),t!==null&&Im(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,u!==null&&t.indexOf(u)===-1&&t.push(u),e)}function Fx(e,t,r,s,u){switch(t){case"focusin":return ar=bs(ar,e,t,r,s,u),!0;case"dragenter":return rr=bs(rr,e,t,r,s,u),!0;case"mouseover":return ir=bs(ir,e,t,r,s,u),!0;case"pointerover":var h=u.pointerId;return vs.set(h,bs(vs.get(h)||null,e,t,r,s,u)),!0;case"gotpointercapture":return h=u.pointerId,ys.set(h,bs(ys.get(h)||null,e,t,r,s,u)),!0}return!1}function Hm(e){var t=Yt(e.target);if(t!==null){var r=d(t);if(r!==null){if(t=r.tag,t===13){if(t=f(r),t!==null){e.blockedOn=t,on(e.priority,function(){$m(r)});return}}else if(t===31){if(t=p(r),t!==null){e.blockedOn=t,on(e.priority,function(){$m(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function to(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=$u(e.nativeEvent);if(r===null){r=e.nativeEvent;var s=new r.constructor(r.type,r);Ri=s,r.target.dispatchEvent(s),Ri=null}else return t=Tn(r),t!==null&&Im(t),e.blockedOn=r,!1;t.shift()}return!0}function Gm(e,t,r){to(e)&&r.delete(t)}function Yx(){qu=!1,ar!==null&&to(ar)&&(ar=null),rr!==null&&to(rr)&&(rr=null),ir!==null&&to(ir)&&(ir=null),vs.forEach(Gm),ys.forEach(Gm)}function no(e,t){e.blockedOn===t&&(e.blockedOn=null,qu||(qu=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,Yx)))}var ao=null;function Vm(e){ao!==e&&(ao=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){ao===e&&(ao=null);for(var t=0;t<e.length;t+=3){var r=e[t],s=e[t+1],u=e[t+2];if(typeof s!="function"){if(Pu(s||r)===null)continue;break}var h=Tn(r);h!==null&&(e.splice(t,3),t-=3,$c(h,{pending:!0,data:u,method:r.method,action:s},s,u))}}))}function vi(e){function t(W){return no(W,e)}ar!==null&&no(ar,e),rr!==null&&no(rr,e),ir!==null&&no(ir,e),vs.forEach(t),ys.forEach(t);for(var r=0;r<sr.length;r++){var s=sr[r];s.blockedOn===e&&(s.blockedOn=null)}for(;0<sr.length&&(r=sr[0],r.blockedOn===null);)Hm(r),r.blockedOn===null&&sr.shift();if(r=(e.ownerDocument||e).$$reactFormReplay,r!=null)for(s=0;s<r.length;s+=3){var u=r[s],h=r[s+1],N=u[Ft]||null;if(typeof h=="function")N||Vm(r);else if(N){var U=null;if(h&&h.hasAttribute("formAction")){if(u=h,N=h[Ft]||null)U=N.formAction;else if(Pu(u)!==null)continue}else U=N.action;typeof U=="function"?r[s+1]=U:(r.splice(s,3),s-=3),Vm(r)}}}function Fm(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(N){return u=N})},focusReset:"manual",scroll:"manual"})}function t(){u!==null&&(u(),u=null),s||setTimeout(r,20)}function r(){if(!s&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(r,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),u!==null&&(u(),u=null)}}}function Hu(e){this._internalRoot=e}ro.prototype.render=Hu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var r=t.current,s=In();Mm(r,s,e,t,null,null)},ro.prototype.unmount=Hu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mm(e.current,2,null,e,null,null),Bl(),t[fn]=null}};function ro(e){this._internalRoot=e}ro.prototype.unstable_scheduleHydration=function(e){if(e){var t=La();e={blockedOn:null,target:e,priority:t};for(var r=0;r<sr.length&&t!==0&&t<sr[r].priority;r++);sr.splice(r,0,e),r===0&&Hm(e)}};var Ym=i.version;if(Ym!=="19.2.8")throw Error(o(527,Ym,"19.2.8"));Y.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?y(e):null,e=e===null?null:e.stateNode,e};var Xx={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:X,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var io=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!io.isDisabled&&io.supportsFiber)try{Ze=io.inject(Xx),lt=io}catch{}}return Ss.createRoot=function(e,t){if(!c(e))throw Error(o(299));var r=!1,s="",u=ep,h=tp,N=np;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(u=t.onUncaughtError),t.onCaughtError!==void 0&&(h=t.onCaughtError),t.onRecoverableError!==void 0&&(N=t.onRecoverableError)),t=Um(e,1,!1,null,null,r,s,null,u,h,N,Fm),e[fn]=t.current,Nu(e),new Hu(t)},Ss.hydrateRoot=function(e,t,r){if(!c(e))throw Error(o(299));var s=!1,u="",h=ep,N=tp,U=np,W=null;return r!=null&&(r.unstable_strictMode===!0&&(s=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(h=r.onUncaughtError),r.onCaughtError!==void 0&&(N=r.onCaughtError),r.onRecoverableError!==void 0&&(U=r.onRecoverableError),r.formState!==void 0&&(W=r.formState)),t=Um(e,1,!0,t,r??null,s,u,W,h,N,U,Fm),t.context=zm(null),r=t.current,s=In(),s=It(s),u=Va(s),u.callback=null,Fa(r,u,s),r=s,t.current.lanes=r,st(t,r),fa(t),e[fn]=t.current,Nu(e),new ro(t)},Ss.version="19.2.8",Ss}var ag;function r0(){if(ag)return Fu.exports;ag=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(i){console.error(i)}}return n(),Fu.exports=a0(),Fu.exports}var i0=r0();const rg={"Could not load OCR. Check the connection and try again, or enter the text manually.":"โหลดเครื่องมืออ่านข้อความไม่สำเร็จ ตรวจการเชื่อมต่อแล้วลองอีกครั้ง หรือพิมพ์ข้อความจากภาพเองได้","OCR failed. Try a clearer image or enter the text manually.":"อ่านภาพไม่สำเร็จ ลองใช้ภาพที่ชัดขึ้น หรือพิมพ์ข้อความจากภาพเองได้","could not open the page — navigation failed":"เปิดหน้าเว็บเป้าหมายไม่สำเร็จ","could not connect — connection refused":"เว็บไซต์เป้าหมายปฏิเสธการเชื่อมต่อ ตรวจว่าเว็บเปิดอยู่และใช้พอร์ตถูกต้อง","could not resolve domain name — check the URL":"ค้นหาชื่อโดเมนไม่พบ ตรวจ URL ของเว็บไซต์เป้าหมาย","the SSL certificate of the website is invalid":"ใบรับรองความปลอดภัยของเว็บไซต์เป้าหมายไม่ถูกต้อง","could not open the page — timeout":"หมดเวลารอหน้าเว็บเป้าหมาย","could not connect — connection timeout":"หมดเวลารอเชื่อมต่อเว็บไซต์เป้าหมาย","could not open the page — page crash":"หน้าเว็บเป้าหมายหยุดทำงานขณะเปิด","could not open the page — navigation aborted":"การเปิดหน้าเว็บเป้าหมายถูกยกเลิก","Could not reach the LazyScout API.":"เชื่อมต่อ LazyScout บนเครื่องนี้ไม่ได้","Check that LazyScout is running on this device, then try again.":"ตรวจว่าเปิด LazyScout อยู่บนเครื่องนี้ แล้วลองอีกครั้ง","Check that the URL is correct and the website is available.":"ตรวจ URL และลองเปิดเว็บไซต์เป้าหมายในเบราว์เซอร์อีกครั้ง","Install a local Ollama text model, then check the connection again.":"ยังไม่มีโมเดล Ollama ที่ใช้ในเครื่องได้ ให้ติดตั้งโมเดลสร้างข้อความ แล้วกดทดสอบการเชื่อมต่ออีกครั้ง","The selected model does not support text generation.":"โมเดลที่เลือกสร้างข้อความไม่ได้ เลือกโมเดลสำหรับแชตแล้วทดสอบการเชื่อมต่ออีกครั้ง","Select an installed Ollama model that runs locally.":"เลือกโมเดล Ollama ที่ติดตั้งและทำงานบนเครื่องนี้ แล้วลองอีกครั้ง","The AI provider could not be reached or returned an unreadable response.":"ติดต่อผู้ให้บริการ AI ไม่ได้หรืออ่านคำตอบไม่ได้ ตรวจว่าเปิดบริการแล้วและ URL ถูกต้อง จากนั้นลองอีกครั้ง","The AI provider is temporarily unavailable.":"บริการ AI ไม่พร้อมใช้งานชั่วคราว กรุณาลองอีกครั้งภายหลัง","The AI provider rate limit was reached.":"ใช้บริการ AI ถึงขีดจำกัดแล้ว รอสักครู่หรือตรวจโควตาของบัญชีก่อนลองอีกครั้ง","This model requires available credits or billing.":"โมเดลนี้ต้องใช้เครดิต ตรวจยอดเครดิตและการเรียกเก็บเงินของบัญชี หรือเลือกโมเดลอื่น","The AI provider did not respond in time.":"หมดเวลารอคำตอบจากผู้ให้บริการ AI ตรวจการเชื่อมต่อแล้วลองอีกครั้ง","The AI provider timed out.":"ผู้ให้บริการ AI ตอบกลับไม่ทันเวลา กรุณาลองอีกครั้ง","The model or endpoint was not found.":"ไม่พบโมเดลหรือปลายทางที่ระบุ ตรวจ URL และเลือกโมเดลที่ติดตั้งอยู่ แล้วลองอีกครั้ง","The AI provider returned invalid JSON.":"ผู้ให้บริการตอบกลับในรูปแบบที่อ่านไม่ได้ ตรวจว่า URL เป็นปลายทาง API ของผู้ให้บริการที่เลือก","The provider did not return a model list.":"คำตอบจากผู้ให้บริการไม่มีรายการโมเดล ตรวจ URL ของ API แล้วลองอีกครั้ง","The AI provider refused authentication.":"ผู้ให้บริการยืนยันตัวตนไม่สำเร็จ ตรวจคีย์ API ของบัญชีแล้วลองอีกครั้ง","Access denied. Check whether this account can access the requested endpoint or model.":"บัญชีนี้ไม่มีสิทธิ์เข้าถึง ตรวจสิทธิ์ของบัญชีสำหรับ API หรือโมเดลที่เลือก","Cannot reach LazyScout. Check that it is running on this device, then try again.":"เชื่อมต่อ LazyScout บนเครื่องนี้ไม่ได้ ตรวจว่าโปรแกรมยังเปิดอยู่ แล้วลองอีกครั้ง","Enter the provider API key in AI Scout or configure it on the server.":"กรอกคีย์ API ใน AI Scout หรือตั้งค่าคีย์บนเซิร์ฟเวอร์ แล้วลองอีกครั้ง","The API key for this project and provider has expired or is unavailable.":"คีย์ที่บันทึกไว้ในโปรเจกต์นี้หมดอายุหรือใช้งานไม่ได้ กรอกคีย์อีกครั้ง","Use a loopback address for the local model server.":"กรอก URL ของบริการในเครื่อง เช่น http://localhost:11434 สำหรับ Ollama","Enter a valid API key without spaces.":"กรอกคีย์ API ที่ถูกต้องโดยไม่เว้นวรรค","Enter a valid provider base URL.":"กรอก URL ของบริการ AI ให้ถูกต้อง","The rule-based plan is ready to review.":"ระบบใช้กฎบนเครื่องสร้างแผนแทนแล้ว ตรวจแผนก่อนเริ่มทดสอบ","The AI provider could not finish the plan.":"ผู้ให้บริการ AI สร้างแผนไม่สำเร็จ","Codex is unavailable. Install or update Codex CLI, then try again.":"ติดต่อ Codex บนเครื่องนี้ไม่ได้ ติดตั้งหรืออัปเดต Codex CLI แล้วลองเชื่อมต่ออีกครั้ง","Connect your ChatGPT account before loading Codex models.":"ลงชื่อเข้าใช้ ChatGPT ผ่าน Codex ก่อนโหลดโมเดล","Codex returned no available models. Check your ChatGPT account and refresh the model list.":"บัญชี ChatGPT นี้ยังไม่มีโมเดลให้เลือก ตรวจบัญชีแล้วโหลดรายการโมเดลอีกครั้ง","Codex did not return its model list.":"Codex ไม่ได้ส่งรายการโมเดลกลับมา ลองโหลดรายการอีกครั้ง","Could not load models from Codex.":"โหลดรายการโมเดลจาก Codex ไม่สำเร็จ ลองอีกครั้ง","The sign-in code expired. Start a new attempt.":"รหัสลงชื่อเข้าใช้หมดอายุ กดเชื่อมต่ออีกครั้งเพื่อขอรหัสใหม่","ChatGPT sign-in did not finish. Start a new attempt.":"การลงชื่อเข้าใช้ ChatGPT ยังไม่สำเร็จ กรุณาเริ่มใหม่","Codex did not respond in time.":"Codex ตอบกลับไม่ทันเวลา ลองอีกครั้ง","The AI provider returned an empty response.":"ผู้ให้บริการ AI ส่งคำตอบว่างกลับมา กรุณาลองอีกครั้ง","The AI answer did not match the required JSON structure.":"คำตอบของ AI มีรูปแบบไม่ตรงกับที่ต้องใช้ ลองอีกครั้งหรือเลือกโมเดลอื่น","The AI provider returned no complete answer.":"AI ตอบกลับมาไม่ครบ ลองอีกครั้งหรือเลือกโมเดลอื่น","The AI provider returned an invalid result.":"อ่านผลลัพธ์จาก AI ไม่ได้ ลองอีกครั้งหรือเลือกโมเดลอื่น","OpenRouter Free accepts openrouter/free or a model ending in :free.":"เลือก openrouter/free หรือโมเดลที่ลงท้ายด้วย :free สำหรับ OpenRouter Free","LazyScout version":"เวอร์ชัน LazyScout","Choose your LazyScout version":"เลือกเวอร์ชัน LazyScout","Check again":"ตรวจสอบอีกครั้ง",Unavailable:"ไม่มีข้อมูล","Update available":"มีรุ่นใหม่","Up to date":"เป็นรุ่นล่าสุดแล้ว",Copied:"คัดลอกแล้ว","Copy command":"คัดลอกคำสั่ง",Current:"รุ่นปัจจุบัน","Installing…":"กำลังติดตั้ง…","Published on npm":"เผยแพร่บน npm","Could not check npm versions.":"ตรวจสอบเวอร์ชันบน npm ไม่สำเร็จ","Could not install this version.":"ติดตั้งเวอร์ชันนี้ไม่สำเร็จ","Visual check":"เทียบภาพ","Compare text, colors and layout with the image":"เปรียบเทียบข้อความ สี และการจัดวางกับภาพอ้างอิง","Text check":"ตรวจข้อความ","Create steps for text read from the image":"สร้างขั้นตอนตรวจสอบจากข้อความที่อ่านได้ในภาพ","Manual checklist":"รายการตรวจด้วยตนเอง","Create a checklist for a Tester to review":"สร้างรายการให้ผู้ทดสอบตรวจทีละข้อ","Ready to read the image.":"พร้อมอ่านข้อความจากภาพ","Reading Thai and English from the image…":"กำลังอ่านข้อความภาษาไทยและอังกฤษจากภาพ…","Reading complete. Review and edit the text before creating Test Cases.":"อ่านเสร็จแล้ว ตรวจและแก้ไขข้อความก่อนสร้างเคส","OCR failed.":"อ่านข้อความจากภาพไม่สำเร็จ",page:"หน้าเว็บ",dialog:"กล่องโต้ตอบ",tab:"แท็บ",accordion:"ส่วนพับได้",dropdown:"รายการแบบเลื่อนลง",drawer:"แผงเลื่อน",popover:"กล่องข้อมูลลอย",loading:"กำลังโหลด",success:"สำเร็จ",error:"ข้อผิดพลาด",unknown:"ไม่ทราบ",navigate:"เปิดหน้า",click:"คลิก",fill:"กรอกข้อมูล",select:"เลือก",check:"เลือกช่องทำเครื่องหมาย",wait:"รอ",assert:"ตรวจเงื่อนไข",assertText:"ตรวจข้อความ",assertUrl:"ตรวจ URL",assertVisible:"ตรวจว่ามองเห็น",assertInvalid:"ตรวจค่าที่ไม่ถูกต้อง",assertValidation:"ตรวจการแจ้งเตือนในฟอร์ม",openModal:"เปิดหน้าต่างโต้ตอบ",closeDialog:"ปิดกล่องโต้ตอบ",selectTab:"เลือกแท็บ",expandAccordion:"ขยายส่วนที่พับไว้",openDropdown:"เปิดรายการแบบเลื่อนลง",openDrawer:"เปิดแผงเลื่อน",expandMenu:"ขยายเมนู",breadcrumb:"ลิงก์ลำดับหน้า",pagination:"เปลี่ยนหน้า",other:"อื่น ๆ","Could not check the sign-in. Start again.":"ตรวจสอบการเข้าสู่ระบบไม่สำเร็จ กรุณาลองอีกครั้ง","The key could not be saved. This connection is available in the current tab.":"บันทึกคีย์ไม่สำเร็จ ใช้การเชื่อมต่อนี้ต่อได้ในแท็บปัจจุบัน","Could not remove the saved key.":"ล้างคีย์ที่บันทึกไว้ไม่สำเร็จ","Signed out of Codex on this device.":"ออกจากบัญชี Codex บนเครื่องนี้แล้ว","Code copied":"คัดลอกรหัสแล้ว","Select and copy the code above.":"เลือกและคัดลอกรหัสที่แสดงด้านบน","Could not connect.":"เชื่อมต่อไม่สำเร็จ","UI Coverage":"ความครอบคลุมของหน้าเว็บ","Playwright Automation":"สคริปต์ Playwright","Cypress Automation":"สคริปต์ Cypress","Bug Report Draft":"ร่างรายงานปัญหา","Recorded Test Execution":"ผลการทดสอบที่บันทึกไว้","Test Summary":"สรุปการทดสอบ",Summary:"สรุป","Coverage Gaps":"ส่วนที่ยังไม่ได้ทดสอบ","Execution Results":"ผลการทดสอบ","Free on this device":"ใช้ฟรีบนเครื่องนี้","Cloud with a free tier":"บริการคลาวด์ที่มีโควตาฟรี","Cloud · billing depends on your plan":"บริการคลาวด์ · คิดค่าบริการตามแพ็กเกจ","Other endpoints":"บริการอื่น","No AI / rules":"ใช้กฎบนเครื่อง (ไม่ใช้ AI)","ChatGPT / Codex (sign in)":"ChatGPT / Codex (ลงชื่อเข้าใช้)","Refresh Codex models":"โหลดรายการโมเดล Codex ใหม่","Test connection & load models":"ทดสอบการเชื่อมต่อและโหลดโมเดล",passed:"ผ่าน",failed:"ไม่ผ่าน",pending:"รอทดสอบ",queued:"อยู่ในคิว",completed:"เสร็จสิ้น",cancelled:"ยกเลิกแล้ว",stopped:"หยุดแล้ว",none:"ไม่มี",", not the whole HTML tag.":"โดยไม่ต้องใส่แท็ก HTML ทั้งบรรทัด",". Do not put real credentials in Value.":"และเว้นข้อมูลลับจริงออกจากช่องค่า",". If it is a named button, choose":"หากเป็นปุ่มที่มีชื่อ ให้เลือก","… and":"… และอีก","· Limit:":"· จำกัด","· Scope:":"· ขอบเขต","· Start:":"· จุดเริ่มต้น","›_ CLI Terminal":"›_ เทอร์มินัล CLI","(no title)":"(ไม่มีชื่อ)","/50 saved":"/50 ภาพที่บันทึก","+ Add Bug Report":"+ เพิ่มรายงานปัญหา","+ Add Row":"+ เพิ่มแถว","+ Add step":"+ เพิ่มขั้นตอน","+ Add Step":"+ เพิ่มขั้นตอน","+ New Flow":"+ สร้างชุดขั้นตอน","▶ Run again":"▶ รันอีกครั้ง","▶ Start Load Test":"▶ เริ่มทดสอบโหลด","◉ Event Stream":"◉ เหตุการณ์","○ Recorder idle":"○ พร้อมบันทึก","◎ Pick from page":"◎ เลือกจากหน้าเว็บ","● Recording":"● กำลังบันทึก","1 visual comparison case":"1 เคสสำหรับเปรียบเทียบภาพ","1. Open…\n2. Click…\n3. Observe…":`1. เปิด…
|
|
10
|
+
2. คลิก…
|
|
11
|
+
3. สังเกต…`,accessibility:"การเข้าถึง","Accessible name":"ชื่อสำหรับโปรแกรมอ่านหน้าจอ","Accessible name:":"ชื่อสำหรับโปรแกรมอ่านหน้าจอ","Action type":"ประเภทการกระทำ",Actions:"จัดการ","actions,":"การกระทำ,","Actual Result":"ผลที่เกิดขึ้นจริง","Add a Jira ID, GitLab issue or merge request URL, ticket, or requirement URL to a Test Case to track coverage here.":"เพิ่มรหัส Jira, ลิงก์ GitLab, ทิกเก็ต หรือลิงก์ข้อกำหนดในเคสทดสอบเพื่อติดตามความครอบคลุมที่นี่","Add page.screenshot() to edited Playwright code, save it, then run that Test Case.":"เพิ่ม page.screenshot() ในโค้ด Playwright บันทึกแล้วรันเคสนั้นเพื่อเก็บภาพ","Add suggested words":"เพิ่มคำที่แนะนำ","Add to Guided Flow":"เพิ่มในขั้นตอนทดสอบ","Advanced settings":"ตั้งค่าขั้นสูง","Agent execution":"การทำงานของเอเจนต์","AI Scout workspace":"พื้นที่ทำงาน AI Scout","AI tokens:":"โทเคน AI",All:"ทั้งหมด","All folders and tags":"ทุกโฟลเดอร์และแท็ก","All requests passed":"ทุกคำขอผ่าน","API key":"คีย์ API","API token":"โทเคน API","API Token":"โทเคน API","Approve and start":"ยืนยันและเริ่ม",Assertion:"เงื่อนไขตรวจสอบ","Authorized target":"สิทธิ์ในการทดสอบ","Auto Scout":"สำรวจอัตโนมัติ","Auto Scout finds the paths. Guided Scout follows yours.":"เลือกสำรวจอัตโนมัติเพื่อค้นหาเส้นทาง หรือกำหนดขั้นตอนให้ระบบทำตาม",Automation:"รันทดสอบ","Automation readiness":"ความพร้อมในการรันอัตโนมัติ","Automation source":"โค้ดทดสอบอัตโนมัติ","Automation Status":"สถานะการทดสอบอัตโนมัติ","Automation workspace":"พื้นที่รันทดสอบ",Average:"เฉลี่ย",Back:"ย้อนกลับ","Bar chart":"กราฟแท่งแนวนอน","Base URL":"URL เริ่มต้น","Beginner guide":"คู่มือเริ่มต้น","Block controls whose label contains one of these words":"ข้ามปุ่มหรือลิงก์ที่มีคำเหล่านี้",blocked:"ถูกบล็อก",Blocked:"ถูกบล็อก","Bring an existing suite into LazyScout":"นำชุดทดสอบเดิมมาใช้ใน LazyScout","Browser address":"ที่อยู่เว็บ","Bug ID":"รหัสปัญหา","Bug Report":"รายงานปัญหา","Bug Reports":"รายงานปัญหา","Bug Reports (":"รายงานปัญหา (",Buttons:"ปุ่ม","buttons ·":"ปุ่ม ·",Cancel:"ยกเลิก","Capture reproducible issues and keep screenshots with the local project.":"บันทึกปัญหาที่พบพร้อมขั้นตอนทำซ้ำและภาพหน้าจอไว้ในโปรเจกต์นี้",case:"เคส","Case coverage":"ความครอบคลุมของเคส",cases:"เคส",Cases:"เคส","cases linked":"เคสที่เชื่อมโยง",Chart:"กราฟ","ChatGPT connection":"การเชื่อมต่อ ChatGPT","Check that the LazyScout workspace is writable.":"ตรวจสอบว่าสามารถบันทึกไฟล์ลงในพื้นที่ทำงาน LazyScout ได้",Checked:"เลือกแล้ว","Checking npm Registry…":"กำลังตรวจสอบ npm Registry…","Checking…":"กำลังตรวจสอบ…","Choose a CSV, XLSX or JSON file":"เลือกไฟล์ CSV, XLSX หรือ JSON","Choose a Test Case pattern":"เลือกรูปแบบเคสทดสอบ","Choose OCR lines to create assertions (":"เลือกบรรทัดจากภาพที่จะใช้ตรวจสอบ (","Clear list":"ล้างรายการ","CLI output":"ผลลัพธ์จาก CLI","Click a node to view observed UI. Click a line to inspect the action that created it.":"คลิกจุดเพื่อดูสิ่งที่พบในหน้าเว็บ หรือคลิกเส้นเชื่อมเพื่อดูว่าการกระทำใดทำให้สถานะเปลี่ยน","Click safeguards":"ป้องกันการคลิกที่เสี่ยง","Click the page, type normally, paste text, or scroll here. Actions are sent to Playwright directly.":"คลิก พิมพ์ วางข้อความ หรือเลื่อนหน้าเว็บที่นี่เพื่อส่งการกระทำให้ Playwright","Click to choose an image":"คลิกเพื่อเลือกภาพ",Close:"ปิด","Close editor":"ปิดตัวแก้ไข","Close explorer":"ปิดหน้าสำรวจ","Close generated code":"ปิดโค้ดที่สร้าง","Close recorder workspace":"ปิดเครื่องมือบันทึก","Close the current LazyScout terminal and run `lazyscout` again to switch versions.":"ปิดเทอร์มินัล LazyScout แล้วรัน `lazyscout` อีกครั้งเพื่อเปลี่ยนเวอร์ชัน","Close workspace":"ปิดพื้นที่ทำงาน",code:"โค้ด","Collapse Explorer":"พับตัวสำรวจ","Collapse sidebar":"พับแถบด้านข้าง","Collecting pages and controls":"กำลังเก็บข้อมูลหน้าเว็บและส่วนควบคุม","Collecting pages, controls and event logs.":"กำลังรวบรวมหน้าเว็บ ส่วนควบคุม และบันทึกเหตุการณ์","Column chart":"กราฟแท่งแนวตั้ง",Comparison:"เปรียบเทียบ",Complete:"เสร็จสิ้น",COMPLETED:"เสร็จสิ้น",Composition:"สัดส่วน","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":"ใช้แผงด้านซ้ายควบคุมการบันทึกและดูหน้าเว็บทางด้านขวา การคลิกและการพิมพ์จะกลายเป็นขั้นตอนทดสอบ ระบบจะไม่อ่านรหัสผ่าน และจะบันทึกเป็น","Controlled traffic":"ปริมาณคำขอ",Copy:"คัดลอก","Copy Codex command":"คัดลอกคำสั่ง Codex","Copy locator":"คัดลอกตัวระบุ","Copy MCP settings":"คัดลอกการตั้งค่า MCP","Coverage and readiness for":"ความครอบคลุมและความพร้อมของ","Coverage at a glance":"ภาพรวมความครอบคลุม","Create a flow to define a deterministic path.":"สร้างชุดขั้นตอนเพื่อกำหนดเส้นทางทดสอบ","Create Draft Test Cases":"สร้างเคสฉบับร่าง","Create first Bug Report":"สร้างรายงานปัญหาแรก","Create Guided Flow":"สร้างชุดขั้นตอนทดสอบ","Create Test Cases from an image":"สร้างเคสทดสอบจากภาพ","Creating ZIP…":"กำลังสร้าง ZIP…",critical:"วิกฤต","CSS selector":"ตัวเลือก CSS","CSV, XLSX and JSON are supported. Fields are mapped automatically.":"รองรับ CSV, XLSX และ JSON ระบบจะจับคู่ช่องข้อมูลให้อัตโนมัติ","Cumulative Scout discovery trend":"แนวโน้มจำนวนรายการที่พบสะสม","Current Workspace":"พื้นที่ทำงานปัจจุบัน",Customize:"ปรับแต่ง","Dashboard layout":"จัดวางแดชบอร์ด","Defect tracking":"ติดตามข้อบกพร่อง","Define a path and LazyScout will follow it only.":"กำหนดเส้นทางที่ต้องการให้ LazyScout ทดสอบ",Delete:"ลบ","Delete Flow":"ลบชุดขั้นตอน","Delete project":"ลบโปรเจกต์","Delete this Flow?":"ลบชุดขั้นตอนนี้หรือไม่?",depth:"ระดับความลึก","Describe the defect so another person can reproduce it quickly.":"อธิบายปัญหาให้ผู้อื่นทำตามแล้วพบอาการเดียวกันได้",Description:"คำอธิบาย","Destructive actions blocked":"บล็อกการกระทำที่อาจทำให้ข้อมูลเสียหาย",Discard:"ทิ้ง",Discovered:"พบเมื่อ",discoveries:"รายการที่พบ",Dismiss:"ปิด","Dismiss notice":"ปิดแจ้งเตือน",DONE:"เสร็จสิ้น","Donut chart":"กราฟโดนัท","Double-click to edit":"ดับเบิลคลิกเพื่อแก้ไข",Download:"ดาวน์โหลด","Draft preview":"ตัวอย่างฉบับร่าง","draft test cases":"เคสฉบับร่าง","Drag to reorder":"ลากเพื่อจัดลำดับ",Duplicate:"ทำสำเนา","Duplicate IDs are replaced with a new TC-IMPORT ID.":"ระบบจะสร้างรหัส TC-IMPORT ใหม่สำหรับรหัสที่ซ้ำ",duration:"ระยะเวลา",Edit:"แก้ไข","Edit code":"แก้ไขโค้ด","Edit Test Case":"แก้ไขเคสทดสอบ","Edit the generated file per Test Case, then run one case or selected cases.":"เลือกเคสเพื่อดูหรือแก้ไขสคริปต์ แล้วรันทีละเคสหรือรันพร้อมกัน","Edit value":"แก้ไขค่า","Element visible":"มองเห็นองค์ประกอบ",Email:"อีเมล","enabled to collect the API requests used by the page.":"เพื่อเก็บคำขอ API ที่หน้าเว็บใช้",English:"อังกฤษ","Enter only the selector value, for example":"กรอกเฉพาะค่าที่ใช้ค้นหา เช่น",Evidence:"หลักฐาน","Evidence screenshots":"ภาพหลักฐาน","Example:":"ตัวอย่าง","Example: Storefront regression":"เช่น ทดสอบหน้าร้าน","Execute only the steps defined here.":"รันเฉพาะขั้นตอนที่ระบุไว้ที่นี่","Execution result":"ผลการทดสอบ","Execution status":"สถานะการทดสอบ","Execution:":"การทำงาน","Expand Explorer":"ขยายตัวสำรวจ","Expand sidebar":"ขยายแถบด้านข้าง","Expected fields: TC_ID, Title, Module, Folder, Tags, Requirements, Steps and Expected Result":"ช่องข้อมูลที่รองรับ ได้แก่ TC_ID, Title, Module, Folder, Tags, Requirements, Steps และ Expected Result","Expected Result":"ผลที่คาดหวัง","Expected value":"ค่าที่คาดหวัง",Explorer:"ตัวสำรวจ","Explorer mode":"โหมดสำรวจ","Explorer ready":"พร้อมสำรวจ","Explorer view":"มุมมองการสำรวจ","Export CSV":"ส่งออก CSV","Export PDF":"ส่งออก PDF","Export ZIP + images":"ส่งออก ZIP พร้อมภาพ","Exporting…":"กำลังส่งออก…","External custom URLs must also be configured on the LazyScout server.":"หากใช้ URL ภายนอกที่กำหนดเอง ให้ตั้งค่าบนเซิร์ฟเวอร์ LazyScout ด้วย",FAIL:"ไม่ผ่าน",Failed:"ไม่ผ่าน",FAILED:"ไม่ผ่าน","failed ·":"ไม่ผ่าน ·",Field:"ช่องข้อมูล","Fill credentials and verify the next URL":"กรอกข้อมูลเข้าสู่ระบบแล้วตรวจสอบ URL ถัดไป",Filtered:"ตามตัวกรอง",Fingerprint:"ลายนิ้วมือสถานะ","First time using Guided Flow?":"เพิ่งเริ่มทดสอบตามขั้นตอนใช่ไหม?",Fit:"พอดีจอ","Flow name":"ชื่อชุดขั้นตอน","Flow Steps":"ขั้นตอนทดสอบ",Folder:"โฟลเดอร์","Folder / Module":"โฟลเดอร์ / โมดูล","Folder coverage":"ความครอบคลุมตามโฟลเดอร์","Folder treemap":"แผนภูมิต้นไม้ตามโฟลเดอร์","Follow three steps to create Draft Test Cases for review.":"ทำตาม 3 ขั้นตอนเพื่อสร้างเคสฉบับร่างไว้ตรวจทาน","For uploads, create a draft first and choose a safe test file before running.":"สำหรับการอัปโหลด ให้สร้างฉบับร่างและเลือกไฟล์ทดสอบที่ปลอดภัยก่อนรัน","For usernames and passwords, leave Value empty and use":"สำหรับชื่อผู้ใช้และรหัสผ่าน ให้เว้นช่องค่าแล้วเลือก","Forms:":"ฟอร์ม",Forward:"ถัดไป",From:"จาก","Generate Cypress":"สร้างสคริปต์ Cypress","Generate Playwright":"สร้างสคริปต์ Playwright","Generate Test Case":"สร้างเคสทดสอบ","generated source":"โค้ดที่สร้าง","Generated Tests":"สคริปต์ทดสอบ","GET only · Local runner":"เฉพาะ GET · รันบนเครื่องนี้","globally? Restart LazyScout after installation to use it.":"ทั่วทั้งเครื่องหรือไม่? หลังติดตั้งให้เปิด LazyScout ใหม่",Go:"ไป",Guide:"คู่มือ","Guided Flow":"ทดสอบตามขั้นตอน","Guided Flow Guide":"คู่มือการทดสอบตามขั้นตอน","Guided Flows":"ชุดขั้นตอนทดสอบ","Headings (":"หัวเรื่อง (",Hierarchy:"โครงสร้าง",high:"สูง",High:"สูง","Hover preview":"ตัวอย่างเมื่อชี้เมาส์","Hover to preview. Click an element to lock it while scrolling, click another element to switch, or click empty space to unlock.":"เลื่อนเมาส์เพื่อดูตัวอย่าง คลิกเพื่อเลือกองค์ประกอบ คลิกองค์ประกอบอื่นเพื่อเปลี่ยน หรือคลิกพื้นที่ว่างเพื่อยกเลิก","HTML report":"รายงาน HTML","HTTP performance workspace":"ทดสอบประสิทธิภาพ HTTP","HTTP Request Results":"ผลคำขอ HTTP",Huge:"ใหญ่มาก","I own this target or have permission to run a load test.":"ฉันเป็นเจ้าของเว็บไซต์นี้หรือได้รับอนุญาตให้ทดสอบโหลด","ID:":"รหัส","id/name → CSS · button/link name → Role · real label → Label · data-testid → Test ID · no stable attribute → CSS parent + child":"มี id หรือ name ใช้ CSS · มีชื่อปุ่มหรือลิงก์ใช้บทบาท · มี label ใช้ป้ายกำกับ · มี data-testid ใช้ Test ID · หากไม่มีค่าคงที่ ใช้ CSS ขององค์ประกอบแม่และลูก","If it has an id, choose":"หากมี id ให้เลือก",Import:"นำเข้า","Import Test Cases":"นำเข้าเคสทดสอบ","in a Test Case. Values are passed to the runner only while it runs.":"ในเคสทดสอบ ค่าจะถูกส่งให้ตัวรันเฉพาะตอนที่รันเท่านั้น","in-progress":"กำลังแก้ไข","Include API checks from XHR/fetch":"รวมการตรวจสอบ API จาก XHR/fetch","Input Type":"ชนิดข้อมูล","input,":"ขาเข้า,",Inputs:"ช่องกรอก","inputs ·":"ช่องกรอก ·","Inputs without a label":"ช่องกรอกที่ไม่มีป้ายกำกับ","Inspect element":"ตรวจองค์ประกอบ","Inspecting element":"กำลังตรวจองค์ประกอบ",Install:"ติดตั้ง","Install the latest release or switch to an earlier published version before opening a workspace.":"ติดตั้งรุ่นล่าสุดหรือเลือกรุ่นที่เคยเผยแพร่ก่อนเปิดพื้นที่ทำงาน","Install v":"ติดตั้งรุ่น","installed.":"ติดตั้งแล้ว","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.":"โต้ตอบกับหน้าต่างเบราว์เซอร์ที่ LazyScout เปิดไว้ แผงนี้ควบคุมการบันทึกเดียวกัน",interaction:"การโต้ตอบ","interactions explored ·":"การโต้ตอบที่สำรวจ ·","Interactive Playwright browser":"เบราว์เซอร์ Playwright สำหรับโต้ตอบ",Interval:"ช่วงห่าง","Invalid Value":"ค่าที่ไม่ถูกต้อง","Keep running":"ทดสอบต่อ",Label:"ป้ายกำกับ",Labels:"ป้ายกำกับ",Large:"ใหญ่","Latest release":"รุ่นล่าสุด","Launching Playwright runner":"กำลังเปิด Playwright","LazyScout does not capture automatically. Add":"เมื่อต้องการเก็บภาพ ให้เพิ่ม","LazyScout v":"LazyScout รุ่น","Line chart":"กราฟเส้น","Linked cases":"เคสที่เชื่อมโยง",links:"ลิงก์",Links:"ลิงก์","Live Playwright browser":"เบราว์เซอร์ Playwright แบบสด","Load Test":"ทดสอบโหลด","Load test is running":"กำลังทดสอบโหลด",Locator:"ตัวระบุตำแหน่ง",Locked:"เลือกค้างไว้","Login example":"ตัวอย่างการเข้าสู่ระบบ","Login success":"เข้าสู่ระบบสำเร็จ","Login validation":"ตรวจสอบการเข้าสู่ระบบ",low:"ต่ำ",Low:"ต่ำ",manual:"ทดสอบด้วยตนเอง",Manual:"ทดสอบด้วยตนเอง","Manual suite":"ชุดทดสอบด้วยตนเอง","Match the instruction":"ใช้ภาษาเดียวกับคำสั่ง","Maximum 100 per user":"สูงสุด 100 คำขอต่อคน","Maximum 20 concurrent users":"พร้อมกันได้สูงสุด 20 คน","Maximum pages":"จำนวนหน้าสูงสุด","Maximum total requests":"คำขอทั้งหมดสูงสุด","Maximum virtual users":"ผู้ใช้จำลองสูงสุด",medium:"ปานกลาง",Medium:"ปานกลาง",Method:"วิธีส่ง","Min / Max":"ต่ำสุด / สูงสุด",Model:"โมเดล",Module:"โมดูล",more:"รายการ","more requirements":"ข้อกำหนดเพิ่มเติม",ms:"มิลลิวินาที","Name:":"ชื่อ",navigation:"การนำทาง","Need Review":"รอตรวจทาน","Needs data":"รอข้อมูล","Needs review":"รอตรวจทาน","needs-data":"รอข้อมูล","needs-review":"รอตรวจทาน",negative:"กรณีผิดพลาด",Negative:"กรณีผิดพลาด","Network validation":"ตรวจสอบคำขอเครือข่าย","No Bug Reports yet":"ยังไม่มีรายงานปัญหา","No folders found.":"ยังไม่มีโฟลเดอร์","No Guided Flow selected":"ยังไม่ได้เลือกชุดขั้นตอน","No headings recorded":"ยังไม่มีหัวเรื่องที่บันทึก","No screenshots yet":"ยังไม่มีภาพหน้าจอ","No steps were recorded. Start again and interact with the page.":"ยังไม่มีขั้นตอนที่บันทึก ลองเริ่มใหม่แล้วคลิกหรือพิมพ์ในหน้าเว็บ","No steps yet.":"ยังไม่มีขั้นตอน","No Test Cases are available to generate.":"ยังไม่มีเคสสำหรับสร้างสคริปต์","No Test Cases match the current filters.":"ไม่มีเคสที่ตรงกับตัวกรอง","No Test Data matches the current filters.":"ไม่มีข้อมูลทดสอบที่ตรงกับตัวกรอง",Normal:"ปกติ","Not clicked (destructive)":"ข้ามการคลิกที่อาจทำให้ข้อมูลเสียหาย","Not linked":"ยังไม่ได้เชื่อมโยง","Not observed":"ยังไม่พบ","Not sure which locator to choose?":"ควรเลือกตัวระบุแบบไหน?",Note:"หมายเหตุ",Notes:"หมายเหตุ","Notes from Generator":"หมายเหตุจากตัวสร้างเคส","npm Registry is unavailable.":"เชื่อมต่อ npm Registry ไม่ได้",observed:"รายการที่พบ","Observed state":"สถานะที่พบ","Observed UI":"สิ่งที่พบบนหน้าเว็บ",of:"จาก",OFF:"ปิด",ON:"เปิด","once?":"หนึ่งครั้งหรือไม่?","One word per line. Matching ignores case and looks at the label, title, name, id and link URL of a control.":"ใส่หนึ่งคำต่อบรรทัด ระบบตรวจจากป้ายกำกับ ชื่อ รหัส และ URL โดยไม่แยกตัวพิมพ์เล็กหรือใหญ่","Only HTTP GET is sent. LazyScout does not submit forms, log in, or modify target data.":"LazyScout ส่งเฉพาะ HTTP GET โดยจะไม่ส่งฟอร์ม เข้าสู่ระบบ หรือแก้ไขข้อมูลเป้าหมาย",open:"เปิด","Open AI Scout workspace":"เปิดพื้นที่ทำงาน AI Scout","Open LazyScout Guide":"เปิดคู่มือ LazyScout","Open recorder workspace":"เปิดเครื่องมือบันทึก","Open the target page in your browser and inspect the element you want to test.":"เปิดหน้าเป้าหมายในเบราว์เซอร์แล้วตรวจดูองค์ประกอบที่ต้องการทดสอบ","Open the visual Guided Flow guide":"เปิดคู่มือภาพการทดสอบตามขั้นตอน","Open visual Guided Flow guide":"เปิดคู่มือภาพการทดสอบตามขั้นตอน","Opening target URL":"กำลังเปิดเว็บไซต์เป้าหมาย","Opening workspace":"กำลังเปิดพื้นที่ทำงาน",Option:"ตัวเลือก",or:"หรือ","or drop a file here":"หรือลากไฟล์มาวางที่นี่",output:"ขาออก","Outputs:":"ผลลัพธ์",pages:"หน้า","pages ·":"หน้า ·","pages discovered":"หน้าที่พบ","pages explored":"หน้าที่สำรวจ","Pages that could not be opened (":"หน้าที่เปิดไม่ได้ (","pages,":"หน้า,",Pass:"ผ่าน",PASS:"ผ่าน",Passed:"ผ่าน",PASSED:"ผ่าน",Password:"รหัสผ่าน",Path:"เส้นทาง","Pause between each request":"ระยะพักระหว่างคำขอ",Pending:"รอทดสอบ",PENDING:"รอทดสอบ","pending execution":"รอรันทดสอบ","Pick the pattern that matches what you need to check.":"เลือกรูปแบบที่ตรงกับสิ่งที่ต้องการตรวจสอบ",Placeholder:"ข้อความตัวอย่างในช่อง","Plan preview":"ตรวจทานแผน","Playwright CLI output":"ผลลัพธ์จาก Playwright CLI","Playwright evidence":"หลักฐานจาก Playwright","Playwright is opening the website and collecting page data… This can take a few moments.":"Playwright กำลังเปิดเว็บไซต์และเก็บข้อมูลหน้าเว็บ อาจใช้เวลาสักครู่","Playwright locator":"ตัวระบุตำแหน่ง Playwright","Playwright Scout Log":"บันทึกการสำรวจด้วย Playwright","Please wait until Scout finishes.":"กรุณารอให้สำรวจเสร็จ","PNG, JPG and WEBP are supported.":"รองรับไฟล์ PNG, JPG และ WEBP",positive:"กรณีปกติ",Positive:"กรณีปกติ",Preconditions:"เงื่อนไขก่อนทดสอบ","Preconditions (one per line)":"เงื่อนไขก่อนทดสอบ (บรรทัดละข้อ)","Prefer Role + accessible name, or CSS when the button has a stable id.":"เลือกบทบาทและชื่อที่โปรแกรมอ่านหน้าจอใช้ หรือใช้ CSS หากปุ่มมี id ที่คงที่","Preparing MCP settings…":"กำลังเตรียมการตั้งค่า MCP…","Preparing your local QA tools…":"กำลังเตรียมเครื่องมือทดสอบ…","Previewing 10 of":"แสดงตัวอย่าง 10 จาก","Previous scan":"ผลการสำรวจครั้งก่อน",Priority:"ความสำคัญ","Priority comparison":"เปรียบเทียบความสำคัญ","Project actions":"จัดการโปรเจกต์","Project dashboard":"แดชบอร์ดโปรเจกต์","Project settings sections":"หมวดการตั้งค่าโปรเจกต์","Protected API action":"ยืนยันการส่งคำขอ API",Provider:"ผู้ให้บริการ","Published LazyScout versions":"รุ่น LazyScout ที่เผยแพร่","QA workspace":"พื้นที่ทำงาน QA","Quality overview":"ภาพรวมคุณภาพ","Read text from image":"อ่านข้อความจากภาพ","Read text from the image, or type it yourself":"อ่านข้อความจากภาพหรือพิมพ์เอง","Reading file…":"กำลังอ่านไฟล์…","Could not save the imported cases. Check that LazyScout is running and try again.":"บันทึกเคสที่นำเข้าไม่สำเร็จ ตรวจว่า LazyScout ยังเปิดอยู่ แล้วกดนำเข้าอีกครั้ง","Could not read the file.":"อ่านไฟล์ไม่สำเร็จ","No valid Test Cases were found. Check that the file contains TC_ID or Title.":"ไม่พบเคสทดสอบในไฟล์ ตรวจว่ามีคอลัมน์ TC_ID หรือ Title","Supported formats are CSV, XLSX and JSON.":"เลือกไฟล์ CSV, XLSX หรือ JSON","CSV contains an unclosed quoted value.":"ในไฟล์ CSV มีช่องที่ใส่เครื่องหมายคำพูดเปิดไว้โดยไม่ได้ปิด","Reading…":"กำลังอ่าน…",ready:"พร้อมทดสอบ",Ready:"พร้อมทดสอบ","Record a flow":"บันทึกขั้นตอนทดสอบ","Record and inspect":"บันทึกและตรวจสอบ","Record Flow · Planned":"บันทึกขั้นตอน · เร็ว ๆ นี้","Record Flow is planned for a future release":"การบันทึกขั้นตอนจะเพิ่มในรุ่นถัดไป","Recorded login":"บันทึกการเข้าสู่ระบบ","Recorded steps:":"ขั้นตอนที่บันทึก","Recording stopped. Save the Test Case from the left panel.":"หยุดบันทึกแล้ว กดบันทึกเป็นเคสทดสอบในแผงด้านซ้าย","Refreshing now will stop the active Playwright session and cancel the remaining selected Test Cases.":"การรีเฟรชจะปิด Playwright และยกเลิกเคสที่ยังไม่ได้รัน",Regenerate:"สร้างใหม่","Related Test Case":"เคสทดสอบที่เกี่ยวข้อง",Reload:"โหลดใหม่","Remove “":"ลบ “","Remove Guided Flow":"ลบชุดขั้นตอน",Rename:"เปลี่ยนชื่อ","Report sections":"ส่วนของรายงาน","Request settings":"การส่งคำขอ","Request URL":"URL ของคำขอ","Requested outputs":"ผลลัพธ์ที่ต้องการ",requests:"คำขอ","Requests / user":"คำขอต่อผู้ใช้","Requests observed from XHR/fetch during Explorer. Run uses server-side fetch and project token when configured.":"คำขอ XHR/fetch ที่พบระหว่างสำรวจ เมื่อกดรัน เซิร์ฟเวอร์จะส่งคำขอโดยใช้โทเคนของโปรเจกต์หากตั้งค่าไว้","requests…":"คำขอ…","Requests/sec":"คำขอต่อวินาที",required:"จำเป็น",Required:"จำเป็น",requirements:"ข้อกำหนด",Requirements:"ข้อกำหนด","Requirements / Tickets":"ข้อกำหนด / ทิกเก็ต","Requirements traceability":"การเชื่อมโยงข้อกำหนด",resolved:"แก้ไขแล้ว",Result:"ผลลัพธ์","Results are marked":"เคสที่สร้างจะมีสถานะ","Reuse existing observations where possible":"ใช้ข้อมูลที่เคยสำรวจเมื่อทำได้",review:"รอตรวจทาน","Review Test Cases":"ตรวจทานเคสทดสอบ","Review text and create cases":"ตรวจข้อความแล้วสร้างเคส",Role:"บทบาท","Role:":"บทบาท","rows · Generated values are examples only. Replace them with real test data before use · CSV export includes Test Cases and Test Data together.":"แถว · ค่าที่สร้างเป็นเพียงตัวอย่าง ให้แทนด้วยข้อมูลทดสอบก่อนใช้ เมื่อส่งออก CSV จะรวมเคสและข้อมูลทดสอบไว้ด้วยกัน",Run:"รัน","Run Analyze with":"เริ่มสำรวจโดยเปิดตัวเลือก","Run API":"ทดสอบ API","Run Flow":"รันตามขั้นตอน","Run once":"รันหนึ่งครั้ง","Run report":"รายงานการทดสอบ","Run result:":"ผลการรัน","Run selected cases":"รันเคสที่เลือก",running:"กำลังใช้งาน",Running:"กำลังรัน",RUNNING:"กำลังรัน","Running now":"รุ่นที่กำลังใช้งาน","Running tests":"กำลังรันทดสอบ","Running…":"กำลังรัน…","Safe action":"การกระทำที่ปลอดภัย","Safe exploration only":"สำรวจเฉพาะการกระทำที่ปลอดภัย","Safe limits":"ขีดจำกัดการทดสอบ",Safety:"ความปลอดภัย",Save:"บันทึก","Save as Test Case":"บันทึกเป็นเคสทดสอบ","Save Bug Report":"บันทึกรายงานปัญหา","Save code":"บันทึกโค้ด","Save file":"ดาวน์โหลดไฟล์","Save Flow":"บันทึกขั้นตอน","Save Guided Flow":"บันทึกชุดขั้นตอน","Save the Flow, run it, then use the CLI error to adjust only the failing step.":"บันทึกขั้นตอนแล้วลองรัน หากพบข้อผิดพลาด ให้ดูข้อความจาก CLI แล้วแก้เฉพาะขั้นที่มีปัญหา","Save your changes?":"บันทึกการเปลี่ยนแปลงหรือไม่?","Saving…":"กำลังบันทึก…","scan complete":"สำรวจเสร็จแล้ว","Scope path":"เส้นทางในขอบเขต","Scout completed · Playwright events captured":"สำรวจเสร็จแล้ว · บันทึกเหตุการณ์ Playwright แล้ว","Scout discovery":"ผลการสำรวจ","Scout Log":"บันทึกการสำรวจ","Scout trend":"แนวโน้มการสำรวจ","Scouting website with Playwright":"กำลังสำรวจเว็บไซต์ด้วย Playwright","Screen name":"ชื่อหน้าจอ",screenshot:"ภาพหน้าจอ","Screenshot → Test Case":"สร้างเคสจากภาพหน้าจอ","Screenshot preview":"ตัวอย่างภาพหน้าจอ",Screenshots:"ภาพหน้าจอ","Screenshots (":"ภาพหน้าจอ (",Search:"ค้นหา","Search field, value or note":"ค้นหาช่องข้อมูล ค่า หรือหมายเหตุ","Search ID, title, expected result, steps, tags or requirements":"ค้นหารหัส ชื่อ ผลที่คาดหวัง ขั้นตอน แท็ก หรือข้อกำหนด","Search or select folder":"ค้นหาหรือเลือกโฟลเดอร์",seconds:"วินาที","Select a state or transition":"เลือกสถานะหรือเส้นเชื่อม","Select all":"เลือกทั้งหมด",selected:"รายการที่เลือก","Selected element":"องค์ประกอบที่เลือก","selected)":"รายการที่เลือก)","Send controlled GET traffic, compare response times, and inspect every HTTP response.":"ส่งคำขอ GET ตามจำนวนที่กำหนด เปรียบเทียบเวลาตอบสนอง และดูผลของแต่ละคำขอ","Set project target":"ตั้งเว็บไซต์เป้าหมาย",Severity:"ความรุนแรง","Show or hide charts":"เลือกกราฟที่ต้องการแสดง",Showing:"แสดง","Site Map":"แผนที่เว็บ",Size:"ขนาด",skipped:"ข้าม",Small:"เล็ก","Source URL":"URL ต้นทาง",Start:"เริ่ม","Start path":"เส้นทางเริ่มต้น","Start recording":"เริ่มบันทึก","Start the Cypress-style workspace to record clicks, typing, and element locators.":"เปิดเครื่องมือบันทึกเพื่อเก็บการคลิก การพิมพ์ และตำแหน่งองค์ประกอบ","Starting Playwright browser…":"กำลังเปิดเบราว์เซอร์ Playwright…","Starting…":"กำลังเริ่ม…","State detail":"รายละเอียดสถานะ","State Flow":"เส้นทางการเปลี่ยนสถานะ","State Tree":"โครงสร้างสถานะ",states:"สถานะ","states ·":"สถานะ ·",Status:"สถานะ",Step:"ขั้นตอน",steps:"ขั้นตอน",Steps:"ขั้นตอน","Steps to reproduce":"ขั้นตอนทำซ้ำ",Stop:"หยุด","Stop and refresh":"หยุดและรีเฟรช","Stop recording":"หยุดบันทึก","Stop run":"หยุดทดสอบ","Stop tests and refresh?":"หยุดทดสอบแล้วรีเฟรชหรือไม่?","Stop the running tests?":"หยุดการทดสอบที่กำลังรันอยู่หรือไม่?",STOPPED:"หยุดแล้ว","Stopping…":"กำลังหยุด…","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.":"ระบบจะข้ามปุ่มที่อาจทำให้ข้อมูลเสียหายขณะสำรวจ และหยุดเมื่อพบระหว่างรันทดสอบ ส่วนปุ่มออกจากระบบยังทดสอบได้","Switch language":"เปลี่ยนภาษา","Switch to English (US)":"เปลี่ยนเป็นภาษาอังกฤษ (US)",Tag:"แท็ก",Tags:"แท็ก","Tags (comma separated)":"แท็ก (คั่นด้วยจุลภาค)","Target element":"องค์ประกอบเป้าหมาย","Target URL":"URL เป้าหมาย","Target:":"เป้าหมาย","TC ID":"รหัสเคส","TD ID":"รหัสข้อมูล","Test API":"ทดสอบ API","Test API (":"ทดสอบ API (","Test Case":"เคสทดสอบ","Test Case detail":"รายละเอียดเคสทดสอบ","Test Case language":"ภาษาของเคสทดสอบ","Test Case Review":"ตรวจทานเคสทดสอบ","Test Case table columns":"คอลัมน์ในตารางเคสทดสอบ","Test Case title":"ชื่อเคสทดสอบ","test cases":"เคสทดสอบ","Test Cases":"เคสทดสอบ","Test Cases (":"เคสทดสอบ (","Test Cases ready to import":"เคสพร้อมนำเข้า","Test Cases.":"เคสทดสอบ","Test configuration":"ตั้งค่าการทดสอบ","Test Data":"ข้อมูลทดสอบ","Test Data (":"ข้อมูลทดสอบ (","Test email":"อีเมลทดสอบ","Test files (":"ไฟล์ทดสอบ (","Test password":"รหัสผ่านทดสอบ","Test type":"ประเภทการทดสอบ","Test type comparison":"เปรียบเทียบประเภทการทดสอบ","Test username":"ชื่อผู้ใช้ทดสอบ",Tester:"ผู้ทดสอบ","Tester decision needed":"รอผู้ทดสอบตัดสินใจ","Tester-defined execution":"รันตามขั้นตอนที่กำหนด","Testing instruction":"สิ่งที่ต้องการทดสอบ",Text:"ข้อความ","Text color":"สีตัวอักษร","Text detected":"ข้อความที่พบ","Text size":"ขนาดตัวอักษร","Text visible":"มองเห็นข้อความ",Thai:"ไทย","The active Playwright session will be closed. Remaining selected Test Cases will not run.":"ระบบจะปิด Playwright และยกเลิกเคสที่เหลือในรอบนี้","The page is intentionally not embedded in an iframe.":"ดูหน้าเว็บในหน้าต่างเบราว์เซอร์ที่เปิดแยกไว้","The project will be removed from this local workspace. You can undo immediately afterward.":"โปรเจกต์จะถูกลบออกจากพื้นที่ทำงานนี้ คุณสามารถกดเลิกทำได้ทันทีหลังลบ","This request can create, update, or delete data. LazyScout will send it only once for this run.":"คำขอนี้อาจสร้าง แก้ไข หรือลบข้อมูล LazyScout จะส่งเพียงครั้งเดียวในรอบนี้",Time:"เวลา","Timeout per request":"ระยะหมดเวลาต่อคำขอ",Title:"ชื่อเรื่อง",To:"ไปยัง","to edited Playwright code when evidence is needed.":"ในสคริปต์ Playwright แล้วรันเคส",Total:"ทั้งหมด","Transition detail":"รายละเอียดการเปลี่ยนสถานะ",transitions:"การเปลี่ยนสถานะ",Treemap:"แผนภูมิต้นไม้",Trend:"แนวโน้ม","Try an invalid password and assert the alert":"ลองใช้รหัสผ่านผิดแล้วตรวจสอบข้อความแจ้งเตือน",Type:"ประเภท","UI State Explorer":"สำรวจสถานะหน้าเว็บ","UI state flow graph":"กราฟการเปลี่ยนสถานะหน้าเว็บ","UI states observed":"สถานะที่พบ",Undo:"เลิกทำ","unsafe actions blocked":"การกระทำที่ถูกบล็อก","Untitled bug":"ปัญหาที่ยังไม่มีชื่อ","Upload a Screenshot":"อัปโหลดภาพหน้าจอ","Upload up to 5 images at a time. Images are included in ZIP export.":"อัปโหลดได้ครั้งละ 5 ภาพ ภาพจะรวมอยู่ในไฟล์ ZIP ที่ส่งออก","URL contains":"URL มีข้อความนี้",Use:"ใช้","Use a Project Settings variable such as":"ใช้ตัวแปรจากการตั้งค่าโปรเจกต์ เช่น","Use a template, then replace labels and expected results with what you observed.":"เลือกตัวอย่างแล้วปรับชื่อและผลที่คาดหวังให้ตรงกับสิ่งที่พบบนหน้าเว็บ","Use CSS with a stable id or name. Example:":"ใช้ CSS ที่อ้างอิง id หรือ name ที่คงที่ เช่น","Use Label when the input has a real HTML label. It is also useful for validation checks.":"เลือกป้ายกำกับเมื่อช่องกรอกมี label ใน HTML วิธีนี้ใช้ตรวจสอบผลได้ด้วย","Use this element":"ใช้องค์ประกอบนี้",User:"ผู้ใช้",Username:"ชื่อผู้ใช้","Valid Value":"ค่าที่ถูกต้อง",validation:"ตรวจสอบข้อมูล",Validation:"ตรวจสอบข้อมูล","Validation:":"การตรวจสอบข้อมูล",Value:"ค่า","Value reference":"ตัวแปรอ้างอิง","Version Center":"จัดการเวอร์ชัน","View Test Case":"ดูเคสทดสอบ","Virtual users":"ผู้ใช้จำลอง","VS Code style editor · Ctrl+Space for suggestions.":"กด Ctrl+Space เพื่อดูคำแนะนำขณะเขียนโค้ด","Wait for element visible":"รอให้องค์ประกอบปรากฏ","Wait for text":"รอข้อความ","Wait for timeout":"รอตามเวลาที่กำหนด","Wait for URL":"รอ URL","Wait type":"รูปแบบการรอ","Waiting for all virtual users to complete their request budget…":"กำลังรอให้ผู้ใช้จำลองทุกคนส่งคำขอครบ…","Website exploration results":"ผลการสำรวจเว็บไซต์","Website explorer":"สำรวจเว็บไซต์","Website UI State Explorer":"สำรวจหน้าและสถานะของเว็บไซต์","What should I add next?":"เพิ่มอะไรต่อดี?","What went wrong?":"พบปัญหาอะไร?","When a Test Case fails, add the actual result, expected result, reproduction steps, and screenshots here.":"เมื่อทดสอบไม่ผ่าน ให้บันทึกผลที่เกิดขึ้น ผลที่คาดหวัง ขั้นตอนทำซ้ำ และภาพหน้าจอที่นี่","Without requirement":"เคสที่ยังไม่มีข้อกำหนด","Working…":"กำลังดำเนินการ…","You can edit OCR text before importing.":"คุณแก้ไขข้อความที่อ่านจากภาพได้ก่อนนำเข้า"},s0={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:"เคสทดสอบ",automation:"รันทดสอบ",scoutLog:"บันทึกการสำรวจ",explorer:"ตัวสำรวจ",newProject:"โปรเจกต์ใหม่",projects:"โปรเจกต์",files:"ไฟล์",settings:"ตั้งค่าโปรเจกต์",localWorkspace:"พื้นที่ทำงานในเครื่อง",storedHere:"โปรเจกต์ถูกเก็บไว้ในอุปกรณ์นี้",activeTarget:"เว็บไซต์ของโปรเจกต์",savedProject:"บันทึกแล้ว",newWorkspace:"พื้นที่ทำงานใหม่",scoutWebsite:"สำรวจเว็บไซต์",targetUrl:"URL เป้าหมาย",startPath:"เส้นทางเริ่มต้น",scopePath:"เส้นทางในขอบเขต",maxPages:"จำนวนหน้าสูงสุด",maxDepth:"ระดับความลึก",language:"ภาษาของเคสทดสอบ",english:"อังกฤษ",thai:"ไทย",scoutSite:"สำรวจเว็บไซต์",targetedExploration:"กำหนดขอบเขตการสำรวจ",targetedExplorationHelp:"เลือกหน้าหรือส่วนของเว็บไซต์ที่ต้องการสำรวจ",startPathHelp:"หน้าเริ่มต้นภายในเว็บไซต์ เช่น /admin/users ใช้เมื่ออยากเริ่มจากหน้าลึก ๆ",scopePathHelp:"สำรวจเฉพาะหน้าภายใต้เส้นทางนี้ เช่น /admin",startPathHint:"หน้าที่ต้องการให้เริ่มสำรวจหลังเข้าสู่ระบบ",scopePathHint:"จำกัดการสำรวจให้อยู่ในส่วนนี้",explore:"ขอบเขตการสำรวจ",currentPageOnly:"สำรวจหน้าเดียว",thisSection:"สำรวจเฉพาะส่วนนี้",entireSite:"สำรวจทั้งเว็บไซต์",targetedGuideTitle:"วิธีกำหนดขอบเขตการสำรวจ",targetedGuideTargetUrl:"ใส่ URL หลักของระบบที่ต้องการให้ LazyScout สำรวจ",targetedGuideStartPath:"ใส่เส้นทางที่ต้องการเริ่มสำรวจ เช่น",targetedGuideScopePath:"ใส่ขอบเขต เช่น",targetedGuideScopePathEnd:"เพื่อสำรวจเฉพาะส่วนที่ต้องการ",targetedGuideCurrentPage:"สำรวจเพียงหน้าเดียว",targetedGuideThisSection:"สำรวจเฉพาะส่วนที่กำหนด",targetedGuideEntireSite:"สำรวจทั้งเว็บไซต์",targetedGuideExample:"ตัวอย่าง หากต้องการสำรวจส่วนผู้ดูแลระบบ ให้ใส่ URL ของเว็บไซต์ กำหนดเส้นทางเริ่มต้นเป็น /admin/users กำหนดขอบเขตเป็น /admin แล้วเลือก “สำรวจเฉพาะส่วนนี้”",search:"ค้นหา",addCase:"เพิ่มเคสทดสอบ",screenshot:"ภาพหน้าจอ",delete:"ลบ",export:"ส่งออก CSV",activeProjectTarget:"เว็บไซต์เป้าหมายของโปรเจกต์",currentProject:"โปรเจกต์ปัจจุบัน",scoutDescription:"ใส่ URL แล้วให้ Playwright ค้นหาหน้า ปุ่ม ฟอร์ม และสถานะ UI โดยอัตโนมัติ",scouting:"กำลังสำรวจ…",optional:"ไม่บังคับ",targetUrlHelp:"URL หลักของเว็บไซต์ที่ต้องการให้ LazyScout เปิดและสำรวจ เช่น https://example.com",maxPagesHelp:"จำนวนหน้าสูงสุดที่ Scout จะสำรวจ ค่ายิ่งมากอาจใช้เวลานานขึ้น",maxDepthHelp:"ระดับความลึกของลิงก์จากหน้าเริ่มต้น 0 คือหน้าเดียว และ 1 คือหน้าที่ลิงก์จากหน้านั้น",testLanguageHelp:"ภาษาที่ใช้สร้างชื่อและรายละเอียดของเคสทดสอบ",maxPagesDescription:"จำนวนหน้าสูงสุดที่จะสำรวจ",maxDepthDescription:"ระดับความลึกของลิงก์จากหน้าเป้าหมาย",testLanguageDescription:"ภาษาสำหรับรายละเอียดเคสที่สร้างใหม่",safetyNotice:"Playwright จะอยู่ภายใน origin เดียวกัน และหลีกเลี่ยงการกระทำที่อาจเปลี่ยนแปลงหรือลบข้อมูล",includeApiChecks:"รวมการตรวจสอบ API จาก XHR/fetch",validationMatrix:"สร้างเคสตรวจสอบข้อมูลในฟอร์ม",validationMatrixHelp:"สร้างเคสทดสอบช่องบังคับ รูปแบบ ความยาว ช่วงตัวเลข นโยบายรหัสผ่าน และการเข้าสู่ระบบไม่สำเร็จตามกฎที่พบในฟอร์ม",validationMatrixSafety:"ขั้นสำรวจจะสร้างเคสไว้ก่อน เคสที่ทดสอบการเข้าสู่ระบบไม่สำเร็จหรือตรวจสอบข้อมูลฝั่งเซิร์ฟเวอร์จะทำงานครั้งเดียวเมื่อคุณกดรันทดสอบ",waitAfterNavigation:"รอหลังเปลี่ยนหน้า",debugMode:"โหมดแก้จุดบกพร่อง",scoutAgain:"สำรวจอีกครั้ง",regenerateProject:"ต้องการสร้างข้อมูลของโปรเจกต์นี้ใหม่หรือไม่?",regenerateWarning:"การสำรวจรอบใหม่จะเขียนทับหน้าที่พบและเคสที่ระบบสร้างไว้ในโปรเจกต์นี้",regenerateHint:"ส่งออกเคสที่ต้องการเก็บไว้ก่อนยืนยัน การตั้งค่าโปรเจกต์จะคงเดิม",cancel:"ยกเลิก",expandScout:"ขยายฟอร์มสำรวจเว็บไซต์",collapseScout:"พับฟอร์มสำรวจเว็บไซต์",help:"คำอธิบาย"}},zv=z.createContext(null);function l0({children:n}){const[i,l]=z.useState(()=>localStorage.getItem("lazyscout-language")==="th"?"th":"en");z.useEffect(()=>{localStorage.setItem("lazyscout-language",i),document.documentElement.lang=i},[i]);const o=z.useMemo(()=>({language:i,setLanguage:l,ui:c=>i==="th"&&Object.hasOwn(rg,c)?rg[c]:c,toggleLanguage:()=>l(c=>c==="en"?"th":"en"),t:c=>s0[i][c]}),[i]);return a.jsx(zv.Provider,{value:o,children:n})}function Le(){const n=z.useContext(zv);if(!n)throw new Error("useLanguage must be used inside LanguageProvider");return n}const Mv="lazyscout-test-case-language";function o0(){const n=localStorage.getItem(Mv);return n==="th"||n==="en"?n:"en"}function Dr({text:n}){const{t:i}=Le(),[l,o]=z.useState(!1);return a.jsxs("span",{className:`help-tip ${l?"is-open":""}`,children:[a.jsx("button",{type:"button","aria-label":i("help"),"aria-expanded":l,title:n,onClick:c=>{c.preventDefault(),c.stopPropagation(),o(d=>!d)},children:"?"}),a.jsx("span",{className:"help-tip-popover",role:"tooltip",children:n})]})}function c0({hidden:n,loading:i,initialUrl:l="",hasExistingData:o=!1,initialLanguage:c,onLanguageChange:d,onOpenAiScout:f,onAnalyze:p}){const{ui:g,t:m,language:y}=Le(),[v,w]=z.useState(l),[b,E]=z.useState(20),[_,O]=z.useState(3),[S,T]=z.useState(c??o0),[L,D]=z.useState(!1),[M,V]=z.useState(750),[K,ae]=z.useState(""),[I,$]=z.useState(""),[ee,B]=z.useState("site"),[Q,j]=z.useState(!1),[F,X]=z.useState(!1),[Y,Z]=z.useState(!1),R=(()=>{try{return new URL(l).hostname}catch{return"Current project"}})();function q(C){if(C.preventDefault(),!(!v.trim()||i)){if(o){Z(!0);return}x()}}function x(){const C=Math.min(100,Math.max(1,b===""?20:b)),H=Math.min(10,Math.max(0,_===""?3:_));p(v.trim(),C,H,S,L,M,K.trim()||void 0,I.trim()||void 0,ee,Q),Z(!1)}return a.jsxs("form",{hidden:n,onSubmit:q,className:l?"project-scout-card":"new-project-card",children:[l&&a.jsxs("div",{className:"project-target-heading",children:[a.jsx("span",{className:"target-glow",children:"◎"}),a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:m("activeProjectTarget")}),a.jsx("h2",{children:R}),a.jsx("span",{children:l})]}),a.jsxs("span",{className:"target-status",children:[a.jsx("i",{})," ",m("savedProject")]}),a.jsx("button",{type:"button",className:`scout-collapse-btn ${F?"is-collapsed":""}`,onClick:()=>X(C=>!C),"aria-label":m(F?"expandScout":"collapseScout"),title:m(F?"expandScout":"collapseScout"),children:a.jsx("span",{children:"⌃"})})]}),!l&&a.jsxs("div",{className:"new-project-hero",children:[a.jsx("span",{className:"scout-orbit",children:"✦"}),a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:m("localWorkspace")}),a.jsx("h2",{children:m("scoutWebsite")}),a.jsx("p",{children:m("scoutDescription")})]}),a.jsx("button",{type:"button",className:`scout-collapse-btn ${F?"is-collapsed":""}`,onClick:()=>X(C=>!C),"aria-label":m(F?"expandScout":"collapseScout"),title:m(F?"expandScout":"collapseScout"),children:a.jsx("span",{children:"⌃"})})]}),a.jsxs("div",{className:`scout-form-body ${F?"is-collapsed":""}`,children:[a.jsxs("div",{className:"scout-form-grid",children:[a.jsxs("div",{className:"scout-url-field",children:[a.jsxs("label",{className:"field-label",htmlFor:"target-url",children:[m("targetUrl"),a.jsx(Dr,{text:m("targetUrlHelp")})]}),a.jsx("input",{id:"target-url",className:"field",value:v,onChange:C=>w(C.target.value),placeholder:"https://example.com",autoComplete:"off",disabled:i})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"field-label",htmlFor:"max-pages",children:[m("maxPages"),a.jsx(Dr,{text:m("maxPagesHelp")})]}),a.jsx("input",{id:"max-pages",className:"field",type:"number",min:1,max:100,value:b,onChange:C=>E(C.target.value===""?"":Math.min(100,Math.max(1,Number(C.target.value)))),disabled:i})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"field-label",htmlFor:"max-depth",children:[m("maxDepth"),a.jsx(Dr,{text:m("maxDepthHelp")})]}),a.jsx("input",{id:"max-depth",className:"field",type:"number",min:0,max:10,value:_,onChange:C=>O(C.target.value===""?"":Math.min(10,Math.max(0,Number(C.target.value)))),disabled:i})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"field-label",htmlFor:"test-language",children:[m("language"),a.jsx(Dr,{text:m("testLanguageHelp")})]}),a.jsxs("select",{id:"test-language",className:"field",value:S,onChange:C=>{const H=C.target.value;T(H),localStorage.setItem(Mv,H),d?.(H)},disabled:i,children:[a.jsx("option",{value:"en",children:g("English")}),a.jsx("option",{value:"th",children:"ไทย"})]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2 md:flex-col md:items-stretch xl:flex-row xl:items-center",children:[a.jsx("button",{type:"submit",className:"btn btn-primary scout-submit",disabled:i||!v.trim(),children:m(i?"scouting":"scoutSite")}),f&&a.jsxs("button",{type:"button",disabled:i,onClick:f,"aria-label":g("Open AI Scout workspace"),title:y==="th"?"เชื่อม ChatGPT, เลือกโมเดล และตั้งค่า MCP":"Connect AI, choose a model and set up MCP",className:"inline-flex min-h-[38px] items-center justify-center gap-2 rounded-lg bg-indigo-700 px-3 text-sm font-semibold whitespace-nowrap text-white shadow-sm transition-colors hover:bg-indigo-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 disabled:opacity-50",children:[a.jsx("span",{"aria-hidden":"true",children:"✦"})," AI Scout",a.jsx("span",{"aria-hidden":"true",className:"rounded bg-white/15 px-1.5 py-0.5 text-[10px] tracking-wide",children:"MCP"})]})]})]}),!l&&a.jsxs("div",{className:"scout-options-help",children:[a.jsxs("span",{children:[a.jsx("b",{children:m("maxPages")})," ",m("maxPagesDescription")]}),a.jsxs("span",{children:[a.jsx("b",{children:m("maxDepth")})," ",m("maxDepthDescription")]}),a.jsxs("span",{children:[a.jsx("b",{children:m("language")})," ",m("testLanguageDescription")]})]}),a.jsxs("div",{className:"mt-3 border-t border-slate-100 pt-3",children:[a.jsxs("p",{className:"text-xs font-semibold text-slate-700 mb-2",children:[m("targetedExploration")," ",a.jsx(Dr,{text:m("targetedExplorationHelp")})]}),a.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[a.jsxs("div",{children:[a.jsxs("label",{className:"field-label text-xs",htmlFor:"start-path",children:[m("startPath"),a.jsx(Dr,{text:m("startPathHelp")}),a.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",m("optional"),")"]})]}),a.jsx("input",{id:"start-path",className:"field text-sm",value:K,onChange:C=>ae(C.target.value),placeholder:"/admin/users",autoComplete:"off",disabled:i}),a.jsx("p",{className:"text-xs text-slate-400 mt-1",children:m("startPathHint")})]}),a.jsxs("div",{children:[a.jsxs("label",{className:"field-label text-xs",htmlFor:"scope-path",children:[m("scopePath"),a.jsx(Dr,{text:m("scopePathHelp")}),a.jsxs("span",{className:"text-slate-400 font-normal ml-1",children:["(",m("optional"),")"]})]}),a.jsx("input",{id:"scope-path",className:"field text-sm",value:I,onChange:C=>$(C.target.value),placeholder:"/admin",autoComplete:"off",disabled:i}),a.jsx("p",{className:"text-xs text-slate-400 mt-1",children:m("scopePathHint")})]})]}),a.jsxs("div",{className:"mt-3",children:[a.jsx("label",{className:"field-label text-xs",children:m("explore")}),a.jsxs("div",{className:"flex gap-4 mt-1",children:[a.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[a.jsx("input",{type:"radio",name:"explore-mode",value:"current-page",checked:ee==="current-page",onChange:()=>B("current-page"),disabled:i}),m("currentPageOnly")]}),a.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[a.jsx("input",{type:"radio",name:"explore-mode",value:"scope",checked:ee==="scope",onChange:()=>B("scope"),disabled:i}),m("thisSection")]}),a.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[a.jsx("input",{type:"radio",name:"explore-mode",value:"site",checked:ee==="site",onChange:()=>B("site"),disabled:i}),m("entireSite")]})]})]})]}),a.jsxs("details",{className:"scout-guide",children:[a.jsx("summary",{children:m("targetedGuideTitle")}),a.jsxs("div",{className:"scout-guide-body",children:[a.jsx("img",{src:"/lazyscout-icon-v2.png",alt:"LazyScout"}),a.jsxs("div",{children:[a.jsxs("p",{children:[a.jsx("b",{children:m("targetUrl")})," ",m("targetedGuideTargetUrl")]}),a.jsxs("p",{children:[a.jsx("b",{children:m("startPath")})," ",m("targetedGuideStartPath")," ",a.jsx("code",{children:"/admin/users"})]}),a.jsxs("p",{children:[a.jsx("b",{children:m("scopePath")})," ",m("targetedGuideScopePath")," ",a.jsx("code",{children:"/admin"})," ",m("targetedGuideScopePathEnd")]}),a.jsxs("p",{children:[a.jsx("b",{children:m("currentPageOnly")})," ",m("targetedGuideCurrentPage")," · ",a.jsx("b",{children:m("thisSection")})," ",m("targetedGuideThisSection")," · ",a.jsx("b",{children:m("entireSite")})," ",m("targetedGuideEntireSite")]}),a.jsx("p",{className:"text-slate-500",children:m("targetedGuideExample")})]})]})]}),a.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:[a.jsxs("label",{className:"m-0 flex items-center gap-2",children:[a.jsx("input",{type:"checkbox",checked:L,onChange:C=>D(C.target.checked),className:"h-4 w-4",disabled:i})," ",m("includeApiChecks")]}),a.jsxs("label",{className:"m-0 flex items-center gap-2",children:[m("waitAfterNavigation")," ",a.jsx("input",{className:"field w-24",type:"number",min:0,max:5e3,step:250,value:M,onChange:C=>V(C.target.value===""?0:Number(C.target.value)),disabled:i})," ",g("ms")]}),a.jsxs("label",{className:"m-0 flex items-center gap-2",children:[a.jsx("input",{type:"checkbox",checked:Q,onChange:C=>j(C.target.checked),className:"h-4 w-4",disabled:i})," ",m("debugMode")]})]})]}),Y&&a.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:a.jsxs("section",{className:"modern-modal scout-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"scout-confirm-title",children:[a.jsxs("header",{className:"modal-header",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:m("scoutAgain")}),a.jsx("h2",{id:"scout-confirm-title",children:m("regenerateProject")})]}),a.jsx("button",{type:"button",className:"icon-btn",onClick:()=>Z(!1),"aria-label":g("Close"),children:"×"})]}),a.jsxs("div",{className:"modal-body",children:[a.jsx("p",{children:m("regenerateWarning")}),a.jsx("p",{className:"text-sm text-slate-500",children:m("regenerateHint")})]}),a.jsxs("footer",{className:"modal-footer",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Z(!1),children:m("cancel")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:x,children:m("scoutSite")})]})]})})]})}function lo(n){if(!/[<&]/.test(n))return n;const i=document.createElement("template");return i.innerHTML=n,i.content.textContent||n}function Lr(n,i){try{const l=new URL(n,i);return!["https:","http:"].includes(l.protocol)||l.username||l.password?void 0:l}catch{return}}function u0(n,i,l){const o=new Map,c=new Map,d=new Set;for(const g of n?.pages??[]){const m=Lr(g.finalUrl||g.url);m&&d.add(m.href)}for(const g of n?.pages??[]){const m=Lr(g.finalUrl),y=Lr(g.url);if(!y||!m||d.has(y.href))continue;const v=c.get(y.href);c.set(y.href,v&&v!==m.href?y.href:m.href)}function f(g){const m=Lr(g);if(!m)return;const y=c.get(m.href)??m.href;let v=o.get(y);if(!v){const w=new URL(y);v={url:y,path:w.pathname+w.search+w.hash,title:"",cases:[],controls:new Set,links:new Set},o.set(y,v)}return v}f(i||n?.startUrl||"");for(const g of n?.pages??[]){const m=f(g.finalUrl||g.url);if(m){m.title||=g.title;for(const y of[...g.buttons,...g.inputs,...g.selects,...g.textareas]){const v=y.accessibleName||y.placeholder||y.text;v&&m.controls.add(v)}for(const y of g.links){const v=y.href&&Lr(y.href,m.url);v&&m.links.add(c.get(v.href)??v.href)}}}for(const g of l)f(g.sourceUrl)?.cases.push(g);const p=new Map(n?.actionGraph.states.map(g=>[g.id,g.url]));for(const g of n?.actionGraph.edges??[]){if(!g.toStateId||g.status!=="visited")continue;const m=Lr(p.get(g.fromStateId)??"")?.href,y=Lr(p.get(g.toStateId)??"")?.href;m&&y&&o.get(c.get(m)??m)?.links.add(c.get(y)??y)}return[...o.values()]}const d0={map:"M12 8v4M5 16v-4h14v4 M9 3h6v5H9z M2 16h6v5H2z M16 16h6v5h-6z",globe:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0ZM3 12h18M12 3c5 5 5 13 0 18-5-5-5-13 0-18Z",page:"M3 5h18v14H3z M3 9h18 M6 7h.1 M9 7h.1",cases:"M8 5H5v16h14V5h-3M9 3h6v4H9z M8 12h8M8 16h6",eye:"M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12ZM15 12a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z",play:"m8 4 12 8-12 8z",stack:"m12 3 10 5-10 5L2 8z M2 12l10 5 10-5 M2 16l10 5 10-5",external:"M13 4h7v7 M20 4 10 14 M10 5H5v15h15v-5",spark:"M12 3c0 5-4 9-9 9 5 0 9 4 9 9 0-5 4-9 9-9-5 0-9-4-9-9Z",plus:"M12 5v14M5 12h14",check:"m4 12 5 5L20 6",down:"m6 9 6 6 6-6",back:"m14 6-6 6 6 6",next:"m10 6 6 6-6 6",close:"m6 6 12 12M18 6 6 18",grip:"M9 6h.1M15 6h.1M9 12h.1M15 12h.1M9 18h.1M15 18h.1",queue:"M3 5h12M3 10h10M3 15h7 M15 12l6 4-6 4z"};function Mt({name:n}){return a.jsx("svg",{className:"map-icon",width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:n==="grip"?3:1.7,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:a.jsx("path",{d:d0[n]})})}const Ku="application/x-lazyscout-selection",ig=50,or=(n,i)=>(n+.5)*320/i;function f0({projectId:n,projectName:i,target:l,result:o,cases:c,queue:d,onQueue:f,onReview:p,onCase:g,onScout:m,onWrite:y}){const v=Le().language==="th",w=z.useMemo(()=>u0(o,l,c),[o,l,c]),[b,E]=z.useState(""),[_,O]=z.useState("map"),[S,T]=z.useState(!1),[L,D]=z.useState(),M={full:v?"คิวเต็มแล้ว ใส่ได้ครั้งละ 50 เคส":"Queue full. Review up to 50 cases per run.",empty:v?"หน้านี้ยังไม่มีเคสให้ใส่คิว":"This page has no cases to queue yet.",duplicate:v?"เคสที่เลือกอยู่ในคิวแล้ว":"These cases are already in the queue."},V=w.find(x=>x.url===b)??w[0],K=z.useMemo(()=>new Map(c.map(x=>[x.id,x])),[c]),ae=d.filter(x=>K.has(x)),I=x=>{E(x),D(void 0)};function $(x){const C=[...new Set([...ae,...x])];f(C.slice(0,ig)),C.length>ig?D("full"):x.length?C.length===ae.length?D("duplicate"):D(C.length-ae.length):D("empty")}function ee(x,C){x.dataTransfer.setData(Ku,JSON.stringify({projectId:n,...C})),x.dataTransfer.effectAllowed="copy"}function B(x){x.preventDefault(),T(!1);try{const C=JSON.parse(x.dataTransfer.getData(Ku));if(C.projectId!==n)return;if(C.kind==="page"){const H=w.find(G=>G.url===C.value);H&&$(H.cases.map(G=>G.id))}else C.kind==="case"&&K.has(C.value)&&$([C.value])}catch{}}const Q=V&&new URL(V.url).host,j=Math.max(0,w.indexOf(V)),F=Math.floor(j/3)*3,X=w.slice(F,F+3),Y=V?w.filter(x=>x!==V&&V.links.has(x.url)).slice(0,2):[],Z=[...Y.map(x=>({kind:"page",value:x.url,title:x.path})),...V?.cases.slice(0,3-Y.length).map(x=>({kind:"case",value:x.id,title:lo(x.title)}))??[]],R=_==="map"?v?"แผนที่เว็บไซต์":"Page map":v?"ตัวอย่างเว็บไซต์":"Website preview";function q(x,C){return a.jsxs("button",{type:"button",className:"map-node route-node"+(x===V?" selected-node":""),style:{top:or(C,X.length)/3.2+"%"},"aria-pressed":x===V,title:x.url,draggable:!0,onDragStart:H=>ee(H,{kind:"page",value:x.url}),onClick:()=>I(x.url),children:[a.jsx(Mt,{name:"page"}),a.jsxs("span",{children:[a.jsx("small",{children:v?"หน้าเว็บ":"Page"}),a.jsx("b",{children:x.path})]}),a.jsx(Mt,{name:"grip"})]},x.url)}return a.jsxs("section",{className:"map-studio","aria-label":R,children:[a.jsxs("div",{className:"studio-heading",children:[a.jsxs("div",{children:[a.jsx("h1",{children:R}),a.jsx("p",{children:_==="map"?v?"เลือกหน้าเว็บ แล้วลากหน้าหรือเคสที่อยากทดสอบลงคิว":"Select a page, then drag pages or test cases into your run queue.":v?"เปิดหน้าที่เลือก แล้วเทียบกับเคสที่บันทึกไว้ด้านข้าง":"Explore the selected page alongside its saved test cases."})]}),a.jsxs("button",{className:"studio-button",onClick:m,children:[a.jsx(Mt,{name:"map"}),v?"สำรวจเว็บไซต์":"Scout website"]})]}),a.jsxs("div",{className:"studio-layout",children:[a.jsxs("div",{className:"map-workbench",children:[a.jsxs("div",{className:"map-toolbar",children:[a.jsxs("div",{className:"map-segments",role:"group","aria-label":v?"มุมมอง":"View",children:[a.jsxs("button",{"aria-pressed":_==="map",onClick:()=>O("map"),children:[a.jsx(Mt,{name:"map"}),v?"แผนที่":"Map"]}),a.jsxs("button",{"aria-pressed":_==="preview",disabled:!V,onClick:()=>O("preview"),children:[a.jsx(Mt,{name:"eye"}),v?"ตัวอย่างเว็บ":"Web preview"]})]}),V&&a.jsxs("label",{className:"page-picker",children:[a.jsx("span",{children:v?"หน้า":"Page"}),a.jsx("select",{"aria-label":v?"เลือกหน้าเว็บ":"Select page",value:V.url,onChange:x=>I(x.target.value),children:w.map(x=>a.jsxs("option",{value:x.url,children:[x.path," · ",new URL(x.url).host]},x.url))})]})]}),V?_==="preview"?a.jsxs("div",{className:"live-preview",children:[a.jsxs("div",{className:"preview-address",children:[a.jsx(Mt,{name:"globe"}),a.jsx("code",{title:V.url,children:V.url}),a.jsxs("a",{href:V.url,target:"_blank",rel:"noopener noreferrer",children:[v?"เปิดแท็บใหม่":"Open in new tab"," ",a.jsx(Mt,{name:"external"})]})]}),new URL(V.url).origin!==window.location.origin&&a.jsx("iframe",{title:v?"ตัวอย่างหน้าเว็บที่เลือก":"Selected website preview",src:V.url,sandbox:"allow-scripts",referrerPolicy:"no-referrer"},V.url),a.jsx("p",{children:v?"ถ้าเว็บต้องล็อกอินหรือไม่แสดงในกรอบ ให้เปิดในแท็บใหม่":"If the site needs sign-in or blocks embedding, open it in a new tab."})]}):a.jsxs("div",{className:"map-canvas",children:[a.jsxs("div",{className:"canvas-meta",children:[a.jsxs("span",{children:[a.jsx("i",{}),v?"แผนที่โปรเจกต์":"Project map"]}),a.jsxs("span",{children:[w.length," ",v?"หน้า":w.length===1?"page":"pages"]})]}),a.jsx("div",{className:"graph-scroll",tabIndex:0,"aria-label":v?"แผนผังหน้าเว็บ":"Page diagram",children:a.jsxs("div",{className:"route-graph",children:[a.jsxs("svg",{className:"map-lines",viewBox:"0 0 1000 320",preserveAspectRatio:"none","aria-hidden":"true",children:[X.map((x,C)=>a.jsx("path",{d:`M 250 160 C 295 160, 295 ${or(C,X.length)}, 340 ${or(C,X.length)}`},x.url)),Z.map((x,C)=>a.jsx("path",{d:`M 615 ${or(j-F,X.length)} C 650 ${or(j-F,X.length)}, 650 ${or(C,Z.length)}, 694 ${or(C,Z.length)}`},x.value))]}),a.jsxs("div",{className:"map-node root-node",children:[a.jsx(Mt,{name:"globe"}),a.jsxs("span",{children:[a.jsx("small",{children:v?"โปรเจกต์":"Project"}),a.jsx("b",{title:i,children:i})]})]}),X.map(q),Z.map((x,C)=>a.jsxs("button",{type:"button",className:"map-node leaf-node",style:{top:or(C,Z.length)/3.2+"%"},title:x.title,draggable:!0,onDragStart:H=>ee(H,x),onClick:()=>x.kind==="case"?g(x.value):I(x.value),children:[a.jsx(Mt,{name:x.kind==="case"?"cases":"page"}),a.jsxs("span",{children:[a.jsx("small",{children:x.kind==="case"?x.value:v?"ลิงก์ไปยัง":"Links to"}),a.jsx("b",{children:x.title})]}),a.jsx(Mt,{name:"grip"})]},x.value))]})}),a.jsxs("div",{className:"canvas-footer",children:[a.jsxs("span",{children:[a.jsx("i",{}),v?"หน้าที่เลือก":"Selected page"]}),a.jsx("code",{title:Q,children:Q})]})]}):a.jsxs("div",{className:"map-empty",children:[a.jsx(Mt,{name:"map"}),a.jsx("h2",{children:v?"เริ่มแผนที่ของโปรเจกต์นี้":"Build your first page map"}),a.jsx("p",{children:v?"ใส่ URL ที่ต้องการสำรวจ หรือเริ่มเขียนเคสด้วยตัวเอง":"Scout a website to map its pages, or start by writing a case."}),a.jsxs("button",{className:"studio-button orange",onClick:m,children:[v?"ตั้งค่าเว็บไซต์":"Set up website"," ",a.jsx(Mt,{name:"next"})]})]})]}),a.jsxs("aside",{className:"page-inspector",children:[a.jsxs("header",{children:[a.jsx("span",{className:"studio-icon",children:a.jsx(Mt,{name:"page"})}),a.jsx("span",{children:v?"รายละเอียดหน้าเว็บ":"Page inspector"})]}),V?a.jsxs(a.Fragment,{children:[a.jsx("h2",{title:V.url,children:V.path}),a.jsx("p",{className:"page-subtitle",children:V.title||Q}),a.jsxs("button",{className:"studio-button preview-action",onClick:()=>O(_==="map"?"preview":"map"),children:[a.jsx(Mt,{name:_==="map"?"eye":"map"}),_==="map"?v?"เปิดตัวอย่างเว็บ":"Preview website":v?"กลับไปแผนที่":"Back to map"]}),_==="preview"&&V.controls.size>0&&a.jsxs("details",{className:"inspector-controls",children:[a.jsxs("summary",{children:[v?"ปุ่มและช่องกรอกที่สำรวจพบ":"Recorded controls"," (",V.controls.size,")"]}),a.jsx("ul",{children:[...V.controls].map(x=>a.jsx("li",{children:x},x))})]}),a.jsxs("div",{className:"linked-head",children:[a.jsx("h3",{children:v?"เคสของหน้านี้":"Linked cases"}),a.jsx("span",{children:V.cases.length})]}),V.cases.length?a.jsx("ul",{className:"linked-list",children:V.cases.map(x=>a.jsxs("li",{draggable:!0,onDragStart:C=>ee(C,{kind:"case",value:x.id}),children:[a.jsx(Mt,{name:"grip"}),a.jsxs("button",{className:"linked-title",title:lo(x.title),onClick:()=>g(x.id),children:[a.jsx("small",{children:x.id}),a.jsx("b",{children:lo(x.title)})]}),a.jsx("button",{className:"icon-button","aria-label":(v?"เพิ่มเข้าคิว ":"Queue ")+x.id,disabled:ae.includes(x.id),onClick:()=>$([x.id]),children:a.jsx(Mt,{name:ae.includes(x.id)?"check":"plus"})})]},x.id))}):a.jsx("p",{className:"inspector-note",children:v?"ยังไม่มีเคสของหน้านี้ สำรวจเว็บหรือสร้างเคสเพื่อเริ่มทดสอบ":"No cases for this page yet. Scout the website or write a case to get started."}),V.cases.length?a.jsxs("button",{className:"studio-button orange",onClick:()=>$(V.cases.map(x=>x.id)),children:[a.jsx(Mt,{name:"plus"}),v?"เพิ่มเคสของหน้านี้ลงคิว":"Queue page cases"]}):a.jsx("button",{className:"studio-button",onClick:()=>y(V.url),children:v?"เขียนเคส":"Write a case"})]}):a.jsx("button",{className:"studio-button",onClick:()=>y(),children:v?"เขียนเคส":"Write a case"})]}),a.jsxs("section",{className:"test-queue"+(S?" drag-over":""),onDragOver:x=>{x.dataTransfer.types.includes(Ku)&&(x.preventDefault(),x.dataTransfer.dropEffect="copy",T(!0))},onDragLeave:x=>{x.currentTarget.contains(x.relatedTarget)||T(!1)},onDrop:B,children:[a.jsxs("div",{className:"queue-head",children:[a.jsxs("div",{children:[a.jsx("span",{className:"studio-icon",children:a.jsx(Mt,{name:"queue"})}),a.jsx("h2",{children:v?"คิวทดสอบ":"Run queue"}),a.jsx("span",{className:"queue-count",children:ae.length})]}),a.jsxs("button",{className:"studio-button orange",disabled:!ae.length,onClick:p,children:[a.jsx(Mt,{name:"play"}),v?"ตรวจคิวและรัน":"Review & run"]})]}),a.jsxs("div",{className:"queue-drop",children:[a.jsx(Mt,{name:"stack"}),a.jsx("span",{children:v?"ลากหน้าเว็บหรือเคสมาวางที่นี่":"Drop a page or test case here"})]}),!!ae.length&&a.jsx("ol",{children:ae.map((x,C)=>a.jsxs("li",{children:[a.jsx("span",{children:C+1}),a.jsx("button",{onClick:()=>g(x),children:lo(K.get(x).title)}),a.jsx("button",{className:"icon-button","aria-label":(v?"เอาออก ":"Remove ")+x,onClick:()=>{f(ae.filter(H=>H!==x)),D(void 0)},children:a.jsx(Mt,{name:"close"})})]},x))}),a.jsx("p",{role:"status",className:"queue-feedback",children:typeof L=="number"?v?`เพิ่มแล้ว ${L} เคส`:`Added ${L} to the queue.`:L&&M[L]})]})]})]})}class sa extends Error{code;hint;constructor(i,l,o){super(l),this.name="ApiError",this.code=i,this.hint=o}}async function pr(n){try{const i=await n.json();if(i?.error?.message)return new sa(i.error.code,i.error.message,i.error.hint)}catch{}return new sa("unknown",`The server returned status ${n.status}.`)}async function h0(n){let i;try{i=await fetch("/api/analyze",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}catch{throw new sa("server-unreachable","Could not reach the LazyScout API.","Check that LazyScout is running on this device, then try again.")}if(!i.ok)throw await pr(i);return await i.json()}async function p0(){const n=await fetch("/api/versions");if(!n.ok)throw await pr(n);return await n.json()}async function m0(n){const i=await fetch("/api/versions/install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({version:n})});if(!i.ok)throw await pr(i);return await i.json()}async function g0(n,i=[]){const l=await fetch("/api/export/csv",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCases:n,testData:i})});await af(l,`lazyscout-testcases-${new Date().toISOString().slice(0,10)}.csv`)}async function af(n,i){if(!n.ok)throw await pr(n);const l=await n.blob(),o=URL.createObjectURL(l),c=document.createElement("a");c.href=o,c.download=i,document.body.appendChild(c),c.click(),c.remove(),URL.revokeObjectURL(o)}async function v0(n,i="playwright",l,o,c,d,f,p){const g=await fetch("/api/automation/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({testCase:n,framework:i,code:l,secrets:o,runId:c,projectId:d,blockedKeywords:f}),signal:p});if(!g.ok)throw await pr(g);return await g.json()}async function sg(){return We("/api/workspace")}async function Qu(n){await We(`/api/workspace/projects/${encodeURIComponent(n.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}async function y0(n){await We(`/api/workspace/projects/${encodeURIComponent(n)}`,{method:"DELETE"})}async function b0(n,i){await We(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:i})})}async function x0(n){return We(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session/status`)}async function S0(n){return We(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session/capture`,{method:"POST"})}async function j0(n){await We(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session/login-browser`,{method:"DELETE"})}async function w0(n,i){return We(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session/verify`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:i})})}async function N0(n){return We(`/api/workspace/projects/${encodeURIComponent(n)}/guided-flows`)}async function C0(n,i){await We(`/api/workspace/projects/${encodeURIComponent(n)}/guided-flows`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({flows:i})})}async function _0(n,i,l,o){return We("/api/guided-flows/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({flow:n,projectId:i,secrets:l,runId:o})})}async function T0(n){return We("/api/guided-flows/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:n})})}async function E0(n){await We(`/api/workspace/projects/${encodeURIComponent(n)}/auth-session`,{method:"DELETE"})}async function A0(n,i){return We(`/api/recorder/${encodeURIComponent(n)}/start`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:i})})}async function lg(n){return We(`/api/recorder/${encodeURIComponent(n)}`)}async function O0(n){return We(`/api/recorder/${encodeURIComponent(n)}/stop`,{method:"POST"})}async function k0(n,i){return We(`/api/recorder/${encodeURIComponent(n)}/inspect`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({enabled:i})})}function R0(n,i){return`/api/recorder/${encodeURIComponent(n)}/frame?v=${i}`}async function D0(n,i){return We(`/api/recorder/${encodeURIComponent(n)}/interact`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})}async function og(n){return We(`/api/recorder/${encodeURIComponent(n)}`,{method:"DELETE"})}async function L0(){await We("/api/workspace/open",{method:"POST"})}async function U0(n){return We(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots`)}async function cg(n,i){return We(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})}async function z0(n,i){await We(`/api/workspace/projects/${encodeURIComponent(n)}/screenshots/${encodeURIComponent(i)}`,{method:"DELETE"})}async function M0(n){return We(`/api/workspace/projects/${encodeURIComponent(n)}/automation`)}async function Ju(n,i){await We(`/api/workspace/projects/${encodeURIComponent(n)}/automation`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})}async function B0(n,i,l){await We(`/api/workspace/projects/${encodeURIComponent(n)}/reports`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:i,html:l})})}async function I0(n){return We(`/api/workspace/projects/${encodeURIComponent(n)}/bugs`)}async function ug(n,i){await We(`/api/workspace/projects/${encodeURIComponent(n)}/bugs/${encodeURIComponent(i.id)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)})}async function $0(n,i){await We(`/api/workspace/projects/${encodeURIComponent(n)}/bugs/${encodeURIComponent(i)}`,{method:"DELETE"})}async function We(n,i){const l=await fetch(n,i).catch(o=>{throw o instanceof TypeError&&!i?.signal?.aborted?new sa("network-error","Cannot reach LazyScout. Check that it is running on this device, then try again."):o});if(!l.ok)throw await pr(l);return await l.json()}async function dg(n){await fetch("/api/automation/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:n}),keepalive:!0})}async function P0(n){const i=await fetch("/api/load-test/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!i.ok)throw await pr(i);return await i.json()}async function q0(n,i,l=!1){const o=await fetch("/api/api-check/run",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiCheck:n,secrets:i,allowUnsafe:l})});if(!o.ok)throw await pr(o);return await o.json()}const ma=(n,i)=>We(n,{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)}),H0=n=>ma("/api/qa/plans",n),G0=n=>ma("/api/qa/instruction-draft",n),fg=(n,i,l)=>ma("/api/qa/provider/status",{provider:n,allowExternal:i,...l}),V0=n=>ma("/api/qa/provider/credentials",{kind:n}),rf=n=>`/api/qa/connection/${encodeURIComponent(n)}`,F0=n=>We(rf(n),{cache:"no-store"}),Y0=(n,i,l)=>We(rf(n),{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:i,apiKey:l})}),X0=n=>We(rf(n),{method:"DELETE"}),Z0=()=>ma("/api/qa/codex/login",{}),hg=n=>ma("/api/qa/codex/status",{loginId:n}),Wu=n=>ma("/api/qa/codex/cancel",{loginId:n}),K0=()=>ma("/api/qa/codex/logout",{confirmed:!0}),Q0=n=>We(`/api/qa/mcp/setup/${encodeURIComponent(n)}`),J0=(n,i)=>ma(`/api/qa/mcp/setup/${encodeURIComponent(n)}`,{confirmed:!0,write:i}),W0=(n,i)=>ma("/api/qa/runs",{projectId:n,planId:i,confirmed:!0}),sf=(n,i)=>`/api/qa/runs/${encodeURIComponent(n)}/${encodeURIComponent(i)}`,eS=(n,i)=>We(sf(n,i)),tS=(n,i)=>We(sf(n,i),{method:"DELETE"}),nS=(n,i,l,o)=>We(`${sf(n,i)}/summary`,{method:"POST",cache:"no-store",headers:{"Content-Type":"application/json"},body:JSON.stringify({...l,confirmed:!0}),signal:o}),go=(n,i,l)=>`/api/qa/report/${encodeURIComponent(n)}?format=${i}&sheets=${encodeURIComponent(l.join(","))}`;async function aS(n){const i=await fetch(go(n,"xlsx",["Test Cases"]),{cache:"no-store"});await af(i,`lazyscout-testcases-${new Date().toISOString().slice(0,10)}.xlsx`)}const lf=(n,i)=>`/api/qa/artifact/${encodeURIComponent(n)}/${encodeURIComponent(i)}`,rS=(n,i)=>We(`/api/qa/artifacts/${encodeURIComponent(n)}`,{signal:i,cache:"no-store"}),iS=/^[$_\u0080-\uFFFFa-zA-Z][$_\u0080-\uFFFF\w]*$/;function sS(n){const i={},l={},o=n(),c=n.toString(),d=c.slice(c.indexOf("[")+1,c.lastIndexOf("]")).split(",").map(p=>p.trim());for(const p of d)if(!iS.test(p))throw new Error(`Invalid dependency name: ${p}`);let f=0;for(;f<o.length;){let p=d[f],g=o[f];typeof g=="function"?i[p]=lS(g,p):l[p]=g,f++}return{functions:i,variables:l}}function lS(n,i){const l=n.toString();if(n.prototype)if(l.indexOf("[native code]")>=0){const o=l.indexOf(" ",8)+1,c=l.indexOf("(",o);return l.slice(o,c)}else{let o=l;for(const c in n.prototype)o+=";"+i+".prototype."+c+"="+n.prototype[c].toString();return o}else return l}function oS(n,i,l,o,c,d){let f=!1,p;const g=()=>{p.stop()},m=(v,w)=>{try{p.ingest(v,w)}catch(b){throw g(),b}};return{start:(v,w)=>{if(f)throw new Error("Was started");f=!0;const b=c(),E=b&&b._,_=E||dS(i,v);E||d({_});const[O,S]=_;p=n(O,()=>{const D=c();if(D)return D.other},D=>{d(Object.assign(Object.assign({},c()),{other:D}))},l,o),S&&m(S,w)},stop:g,ingest:m}}const cS="var onMessage = function(data) {for (var key in data) {self[key] = data[key]}onMessage = (",uS=")(postMessage)}";function dS(n,i){const[l,o]=fS(i);return[l+";"+cS+n.toString()+uS,o]}function fS(n){let i={},l={};for(const c of n){const{functions:d,variables:f}=sS(c);i=Object.assign(Object.assign({},i),d),l=Object.assign(Object.assign({},l),f)}return[Object.keys(i).map(c=>c+"="+i[c]).join(";"),l]}function hS(n,i,l,o,c,d){let f=!1,p=!1,g=[];const m=void 0;let y=()=>[],v=()=>[],w,b;const E=F=>pg[F],_=(F,X)=>{pg[F]=X},O=()=>{if(!f)throw new Error("Not started")},S=()=>{if(f)throw new Error("Was started")},T=()=>{if(p)throw new Error("Was stopped")},L=()=>{if(w)throw new Error("Has alias")},D=F=>{if(typeof F!="function")throw new TypeError("Argument must be a function")};let M;if(typeof i=="string"){if(w=i,b=E(w),!b||!b.$)throw new Error("Not found");M=b.$[0],g=b.$[1],y=b.$[2],v=b.$[3],b.$[4]}else M=i;D(M);let V;const K=F=>{T(),S(),D(F),g.push(F)},ae=()=>{T(),S(),K(()=>[M,v,o]),f=!0,V.start(g,m)},I=()=>{p=!0,V.stop()},$=F=>{V.ingest([Date.now(),F],y(...F))};let ee;const B=Object.assign({inputLatency:ee,outputLatency:ee,addDependencies(F){L(),K(F)},inputTransferList:F=>{T(),S(),L(),D(F),y=F},outputTransferList:F=>{T(),S(),L(),D(F),v=F},alias(F){T(),S(),L(),w=F,_(w,{$:[M,g,y,v]})},start:ae,stop:I},l(ae,I,f,p,$,O,S,T));return V=oS(n,F=>{let X=-1,Y=-1;const R=o(M,q=>{F([X,Y,Date.now(),q],v(q))});return([q,x])=>(X=q,Y=Date.now(),R(x))},F=>{p||c(F)},([F,X,Y,Z])=>{p||(F!==-1&&(B.inputLatency=X-F),B.outputLatency=Date.now()-Y,d(Z))},()=>{if(w){const F=E(w);if(F)return F.other}},F=>{w&&_(w,Object.assign(Object.assign({},E(w)),{other:F}))}),B}const pg={};function pS(n,i){let l,o;return hS(n,i,(g,m,y,v,w,b,E,_)=>({call(...O){if(_(),b(),l||o)throw new Error("Previous call not finished");return new Promise((S,T)=>{l=S,o=T,w(O)})},callOnce(...O){return g(),this.call(...O).finally(m)}}),(g,m)=>{const y=v=>v!==null&&typeof v=="object"&&typeof v.then=="function";return v=>{const w=g(...v);y(w)?w.then(m):m(w)}},g=>{if(o)o(g),l=void 0,o=void 0;else throw new Error("`reject` callback not found")},g=>{if(l)l(g),l=void 0,o=void 0;else throw new Error("`resolve` callback not found")})}function mS(n,i,l,o,c){let d=i();d||(d=gS(n),l(d));const f=new Worker(d);return f.onmessage=p=>{const g=p.data,m=g?g[Bv]:void 0;if(m){const y=new Error(m[0]);y.stack=m[1];let v=2;for(;v<m.length;)y[m[v][0]]=m[v][1],v++;o(y),f.terminate()}else c(g)},{stop:f.terminate.bind(f),ingest:f.postMessage.bind(f)}}function gS(n){return URL.createObjectURL(new Blob([n+";"+vS],{type:"text/javascript"}))}const Bv="$err$",vS="self.onmessage = function(evt) {onMessage(evt.data)};function onErr(err_, msg) {var err = err_ instanceof Error ? err_ : new Error(msg);postMessage({"+Bv+':[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 Iv(n){return pS(mS,n)}function Id(n){"@babel/helpers - typeof";return Id=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Id(n)}function yS(n){var i=String.fromCharCode,l=Object.prototype.hasOwnProperty,o=/&#(\d+);|&#x([0-9a-f]+);|&(\w+);/ig,c={amp:"&",apos:"'",gt:">",lt:"<",quot:'"'};Object.keys(c).forEach(function(T){c[T.toUpperCase()]=c[T]});function d(T,L,D,M){return M?l.call(c,M)?c[M]:"&"+M+";":i(L||parseInt(D,16))}function f(T){return T.length>3&&T.indexOf("&")!==-1?T.replace(o,d):T}var p="non-whitespace outside of root node";function g(T){return new Error(T)}function m(T){return"missing namespace for prefix <"+T+">"}function y(T){return{get:T,enumerable:!0}}function v(T){var L={},D;for(D in T)L[D]=T[D];return L}var w=Symbol("nameCache");function b(T){return T+"$uri"}function E(T){var L={},D,M;for(D in T)M=T[D],L[M]=M,L[b(M)]=D;return L}function _(){return{line:0,column:0}}function O(T){throw T}function S(T){if(!this)return new S(T);var L=T&&T.proxy,D,M,V,K,ae=O,I,$,ee,B,Q=_,j=!1,F=!1,X="",Y=!1,Z=!1,R=null,q=!1,x,C,H,G;function te(se){se instanceof Error||(se=g(se)),R=se,ae(se,Q)}function pe(se){I&&(se instanceof Error||(se=g(se)),I(se,Q))}this.on=function(se,_e){if(typeof _e!="function")throw g("required args <name, cb>");switch(se){case"openTag":M=_e;break;case"text":D=_e;break;case"closeTag":V=_e;break;case"error":ae=_e;break;case"warn":I=_e;break;case"cdata":K=_e;break;case"attention":B=_e;break;case"question":ee=_e;break;case"comment":$=_e;break;default:throw g("unsupported event: "+se)}return this},this.ns=function(se){if(typeof se>"u"&&(se={}),Id(se)!=="object")throw g("required args <nsMap={}>");var _e={},Ce;for(Ce in se)_e[Ce]=se[Ce];return Z=!0,G=_e,this};function Ne(){x=Z?[]:null,C=Z?E(G):null,H=[],Q=_,q=!1,R=null,F=!1,X=""}this.parse=function(se){if(typeof se!="string")throw g("required args <xml=string>");if(j)throw g("parse during stream; call end() first");return Ne(),we(se),Q=_,q=!1,R},this.write=function(se){if(typeof se!="string")throw g("required args <xml=string>");return j||(Ne(),j=!0),R||(X=we(X+se,!0)||""),this},this.end=function(){return j||Ne(),j=!1,R||we(X),X="",Q=_,q=!1,R},this.stop=function(){q=!0};function we(se){var _e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ce=null,qe=null,Ie,A=0,ge=!1,ue=!1,P=0,k=0,J,he,fe,ne,je,Te,Se,Ee,Ke,Me="",kt=0,Bt;function Tt(it,Oe){var pt=it.indexOf(":");if(pt===-1)return it;var jt=C[it.substring(0,pt)];return jt?Oe===jt?it.substr(pt+1):jt+it.substr(pt):(pe(m(it.substring(0,pt))),null)}function Wt(){if(Bt!==null)return Bt;var it,Oe,pt=Z&&C.xmlns,jt=Z&&Y?[]:null,Fe=kt,ot=Me,Je=ot.length,Ye,Ge,Et,Qe,Pe,sn={},la=new Set,st,ze,$e;e:for(;Fe<Je;Fe++)if(st=!1,ze=ot.charCodeAt(Fe),!(ze===32||ze<14&&ze>8)){for((ze<65||ze>122||ze>90&&ze<97)&&ze!==95&&ze!==58&&(pe("illegal first char attribute name"),st=!0),$e=Fe+1;$e<Je;$e++)if(ze=ot.charCodeAt($e),!(ze>96&&ze<123||ze>64&&ze<91||ze>47&&ze<59||ze===46||ze===45||ze===95)){if(ze===32||ze<14&&ze>8){pe("missing attribute value"),Fe=$e;continue e}if(ze===61)break;pe("illegal attribute name char"),st=!0}if(Pe=ot.substring(Fe,$e),Pe==="xmlns:xmlns"&&(pe("illegal declaration of xmlns"),st=!0),ze=ot.charCodeAt($e+1),ze===34)$e=ot.indexOf('"',Fe=$e+2),$e===-1&&($e=ot.indexOf("'",Fe),$e!==-1&&(pe("attribute value quote missmatch"),st=!0));else if(ze===39)$e=ot.indexOf("'",Fe=$e+2),$e===-1&&($e=ot.indexOf('"',Fe),$e!==-1&&(pe("attribute value quote missmatch"),st=!0));else for(pe("missing attribute value quotes"),st=!0,$e=$e+1;$e<Je&&(ze=ot.charCodeAt($e+1),!(ze===32||ze<14&&ze>8));$e++);for($e===-1&&(pe("missing closing quotes"),$e=Je,st=!0),st||(Et=ot.substring(Fe,$e)),Fe=$e;$e+1<Je&&(ze=ot.charCodeAt($e+1),!(ze===32||ze<14&&ze>8));$e++)Fe===$e&&(pe("illegal character after attribute end"),st=!0);if(Fe=$e+1,st)continue e;if(la.has(Pe)){pe("attribute <"+Pe+"> already defined");continue}if(la.add(Pe),!Z){sn[Pe]=Et;continue}if(Y){if(Ge=Pe==="xmlns"?"xmlns":Pe.charCodeAt(0)===120&&Pe.substr(0,6)==="xmlns:"?Pe.substr(6):null,Ge!==null){if(it=f(Et),Oe=b(Ge),Qe=G[it],!Qe){if(Ge==="xmlns"||Oe in C&&C[Oe]!==it)do Qe="ns"+A++;while(typeof C[Qe]<"u");else Qe=Ge;G[it]=Qe}C[Ge]!==Qe&&(Ye||(C=v(C),Ye=!0),C[Ge]=Qe,Ge==="xmlns"&&(C[b(Qe)]=it,pt=Qe),C[Oe]=it),sn[Pe]=Et;continue}jt.push(Pe,Et);continue}Pe=Tt(Pe,pt),Pe!==null&&(sn[Pe]=Et)}if(Y)for(Fe=0,Je=jt.length;Fe<Je;Fe++)Pe=Tt(jt[Fe++],pt),Et=jt[Fe],Pe!==null&&(sn[Pe]=Et);return Bt=sn}function Ze(){for(var it=/(\r\n|\r|\n)/g,Oe=0,pt=0,jt=0,Fe=k,ot,Je;P>=jt&&(ot=it.exec(se),!(!ot||(Fe=ot[0].length+ot.index,Fe>P)));)Oe+=1,jt=Fe;return P==-1?(pt=Fe,Je=se.substring(k)):k===0?Je=se.substring(k,P):(pt=P-jt,Je=k==-1?se.substring(P):se.substring(P,k+1)),{data:Je,line:Oe,column:pt}}for(Q=Ze,L&&(Ke=Object.create({},{name:y(function(){return Se}),originalName:y(function(){return Ee}),attrs:y(Wt),ns:y(function(){return C})}));k!==-1;){if(se.charCodeAt(k)===60?P=k:P=se.indexOf("<",k),P===-1){if(_e)return se.substring(k);if(H.length)return te("unexpected end of file");if(!F)return te("missing start tag");k<se.length&&se.substring(k).trim()&&pe(p);return}if(F||(F=!0),k!==P){if(H.length){if(D&&(D(se.substring(k,P),f,Q),q))return}else if(se.substring(k,P).trim()&&(pe(p),q))return}if(ne=se.charCodeAt(P+1),ne===33){if(fe=se.charCodeAt(P+2),fe===91&&se.substr(P+3,6)==="CDATA["){if(k=se.indexOf("]]>",P),k===-1)return _e?se.substring(P):te("unclosed cdata");if(K&&(K(se.substring(P+9,k),Q),q))return;k+=3;continue}if(fe===45&&se.charCodeAt(P+3)===45){if(k=se.indexOf("-->",P),k===-1)return _e?se.substring(P):te("unclosed comment");if($&&($(se.substring(P+4,k),f,Q),q))return;k+=3;continue}}if(ne===63){if(k=se.indexOf("?>",P),k===-1)return _e?se.substring(P):te("unclosed question");if(ee&&(ee(se.substring(P,k+2),Q),q))return;k+=2;continue}for(J=P+1;;J++){if(je=se.charCodeAt(J),isNaN(je))return _e?se.substring(P):(k=-1,te("unclosed tag"));if(je===34)fe=se.indexOf('"',J+1),J=fe!==-1?fe:J;else if(je===39)fe=se.indexOf("'",J+1),J=fe!==-1?fe:J;else if(je===62){k=J;break}}if(ne===33){if(B&&(B(se.substring(P,k+1),f,Q),q))return;k+=1;continue}if(Bt={},ne===47){if(ge=!1,ue=!0,!H.length)return te("missing open tag");if(J=Se=H.pop(),fe=P+2+J.length,se.substring(P+2,fe)!==J)return te("closing tag mismatch");for(;fe<k;fe++)if(ne=se.charCodeAt(fe),!(ne===32||ne>8&&ne<14))return te("close tag")}else{if(se.charCodeAt(k-1)===47?(J=Se=se.substring(P+1,k-1),ge=!0,ue=!0):(J=Se=se.substring(P+1,k),ge=!0,ue=!1),!(ne>96&&ne<123||ne>64&&ne<91||ne===95||ne===58))return te("illegal first char nodeName");for(fe=1,he=J.length;fe<he;fe++)if(ne=J.charCodeAt(fe),!(ne>96&&ne<123||ne>64&&ne<91||ne>47&&ne<59||ne===45||ne===95||ne==46)){if(ne===32||ne<14&&ne>8){Se=J.substring(0,fe),Bt=null;break}return te("invalid nodeName")}ue||H.push(Se)}if(Z){Ie=C,ge&&(ue||x.push(Ie),Bt===null&&(Y=J.indexOf("xmlns",fe)!==-1)&&(kt=fe,Me=J,Wt(),Y=!1)),Ee=Se,qe!==C&&(Ce=C[w],Ce===void 0&&(Ce=C[w]={}),qe=C);var lt=Ce[Se];if(lt!==void 0)Se=lt;else{if(ne=Se.indexOf(":"),ne!==-1){if(Te=C[Se.substring(0,ne)],!Te)return te("missing namespace on <"+Ee+">");Se=Se.substr(ne+1)}else Te=C.xmlns;Te&&(Se=Te+":"+Se),Ce[Ee]=Se}}if(ge&&(kt=fe,Me=J,M&&(L?M(Ke,f,ue,Q):M(Se,Wt,f,ue,Q),q)))return;if(ue){if(V&&(V(L?Ke:Se,f,ge,Q),q))return;Z&&(ge?C=Ie:C=x.pop())}k+=1}}}return new S(n)}function bS(n,i,l,o){var c=!1,d=function(){if(c)throw new Error("Errored")},f,p=new yS,g=function(w){d(),p.write(w)},m=function(){d(),p.end(),f()},y=new Promise(function(v,w){f=v;var b=function(T){throw c=!0,T},E=function(T,L){o&&o(L(T),n)},_=function(T,L,D,M,V){if(i){var K=L();for(var ae in K)K[ed(ae,!0)]=D(K[ae]);i(ed(T),K,n)}},O=function(T){l&&l(ed(T),n)};p.on("error",b),p.on("text",E),p.on("openTag",_),p.on("closeTag",O)});return{promise:y,write:g,end:m}}function ed(n,i){for(var l=0;l<n.length;){if(n[l]===":"&&!(i&&l===5&&n.slice(0,5)==="xmlns"))return n.slice(l+1);l++}return n}function $d(n){"@babel/helpers - typeof";return $d=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},$d(n)}function xS(n,i,l){return Object.defineProperty(n,"prototype",{writable:!1}),n}function SS(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function jS(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&Ls(n,i)}function wS(n){var i=$v();return function(){var o=Us(n),c;if(i){var d=Us(this).constructor;c=Reflect.construct(o,arguments,d)}else c=o.apply(this,arguments);return NS(this,c)}}function NS(n,i){if(i&&($d(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return CS(n)}function CS(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Pd(n){var i=typeof Map=="function"?new Map:void 0;return Pd=function(o){if(o===null||!_S(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(o))return i.get(o);i.set(o,c)}function c(){return vo(o,arguments,Us(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Ls(c,o)},Pd(n)}function vo(n,i,l){return $v()?vo=Reflect.construct.bind():vo=function(c,d,f){var p=[null];p.push.apply(p,d);var g=Function.bind.apply(c,p),m=new g;return f&&Ls(m,f.prototype),m},vo.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 _S(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function Ls(n,i){return Ls=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Ls(n,i)}function Us(n){return Us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Us(n)}var Rs=(function(n){jS(l,n);var i=wS(l);function l(o){var c;return SS(this,l),c=i.call(this,o),c.name="InvalidSpreadsheetError",c}return xS(l)})(Pd(Error));function Pv(n,i,l,o,c,d){var f=bS(i,l,o,c);return d?p(f,n,d):(f.write(n),f.end()),f.promise.then(function(g){return g},function(g){var m=new Rs(g.message);throw m.stack=g.stack,m.cause=g,m});function p(g,m,y,v){var w=7,b=64*1024,E=b,_=function(){var T=Date.now();if(m.length>E){g.write(m.slice(0,E)),y&&y(!1),m=m.slice(E);var L=Date.now()-T;return L<w*.5?E*=2:L>w&&(E/=2),!0}else return g.write(m),g.end(),y&&y(!0),!1},O=function S(){_()&&S()};O()}}var mg={},TS=(function(n,i,l,o,c){var d=new Worker(mg[i]||(mg[i]=URL.createObjectURL(new Blob([n+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return d.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],c(m,null)}else c(null,p)},d.postMessage(l,o),d}),gn=Uint8Array,zr=Uint16Array,qv=Int32Array,of=new gn([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]),cf=new gn([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]),Hv=new gn([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Gv=function(n,i){for(var l=new zr(31),o=0;o<31;++o)l[o]=i+=1<<n[o-1];for(var c=new qv(l[30]),o=1;o<30;++o)for(var d=l[o];d<l[o+1];++d)c[d]=d-l[o]<<5|o;return{b:l,r:c}},Vv=Gv(of,2),uf=Vv.b,ES=Vv.r;uf[28]=258,ES[258]=28;var AS=Gv(cf,0),Fv=AS.b,To=new zr(32768);for(var _t=0;_t<32768;++_t){var cr=(_t&43690)>>1|(_t&21845)<<1;cr=(cr&52428)>>2|(cr&13107)<<2,cr=(cr&61680)>>4|(cr&3855)<<4,To[_t]=((cr&65280)>>8|(cr&255)<<8)>>1}var Ci=(function(n,i,l){for(var o=n.length,c=0,d=new zr(i);c<o;++c)n[c]&&++d[n[c]-1];var f=new zr(i);for(c=1;c<i;++c)f[c]=f[c-1]+d[c-1]<<1;var p;if(l){p=new zr(1<<i);var g=15-i;for(c=0;c<o;++c)if(n[c])for(var m=c<<4|n[c],y=i-n[c],v=f[n[c]-1]++<<y,w=v|(1<<y)-1;v<=w;++v)p[To[v]>>g]=m}else for(p=new zr(o),c=0;c<o;++c)n[c]&&(p[c]=To[f[n[c]-1]++]>>15-n[c]);return p}),Xs=new gn(288);for(var _t=0;_t<144;++_t)Xs[_t]=8;for(var _t=144;_t<256;++_t)Xs[_t]=9;for(var _t=256;_t<280;++_t)Xs[_t]=7;for(var _t=280;_t<288;++_t)Xs[_t]=8;var Yv=new gn(32);for(var _t=0;_t<32;++_t)Yv[_t]=5;var Xv=Ci(Xs,9,1),Zv=Ci(Yv,5,1),yo=function(n){for(var i=n[0],l=1;l<n.length;++l)n[l]>i&&(i=n[l]);return i},Kn=function(n,i,l){var o=i/8|0;return(n[o]|n[o+1]<<8)>>(i&7)&l},bo=function(n,i){var l=i/8|0;return(n[l]|n[l+1]<<8|n[l+2]<<16)>>(i&7)},Kv=function(n){return(n+7)/8|0},Mo=function(n,i,l){return(i==null||i<0)&&(i=0),(l==null||l>n.length)&&(l=n.length),new gn(n.subarray(i,l))},Qv=["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"],un=function(n,i,l){var o=new Error(i||Qv[n]);if(o.code=n,Error.captureStackTrace&&Error.captureStackTrace(o,un),!l)throw o;return o},Jv=function(n,i,l,o){var c=n.length,d=o?o.length:0;if(!c||i.f&&!i.l)return l||new gn(0);var f=!l,p=f||i.i!=2,g=i.i;f&&(l=new gn(c*3));var m=function(Ce){var qe=l.length;if(Ce>qe){var Ie=new gn(Math.max(qe*2,Ce));Ie.set(l),l=Ie}},y=i.f||0,v=i.p||0,w=i.b||0,b=i.l,E=i.d,_=i.m,O=i.n,S=c*8;do{if(!b){y=Kn(n,v,1);var T=Kn(n,v+1,3);if(v+=3,T)if(T==1)b=Xv,E=Zv,_=9,O=5;else if(T==2){var V=Kn(n,v,31)+257,K=Kn(n,v+10,15)+4,ae=V+Kn(n,v+5,31)+1;v+=14;for(var I=new gn(ae),$=new gn(19),ee=0;ee<K;++ee)$[Hv[ee]]=Kn(n,v+ee*3,7);v+=K*3;for(var B=yo($),Q=(1<<B)-1,j=Ci($,B,1),ee=0;ee<ae;){var F=j[Kn(n,v,Q)];v+=F&15;var L=F>>4;if(L<16)I[ee++]=L;else{var X=0,Y=0;for(L==16?(Y=3+Kn(n,v,3),v+=2,X=I[ee-1]):L==17?(Y=3+Kn(n,v,7),v+=3):L==18&&(Y=11+Kn(n,v,127),v+=7);Y--;)I[ee++]=X}}var Z=I.subarray(0,V),R=I.subarray(V);_=yo(Z),O=yo(R),b=Ci(Z,_,1),E=Ci(R,O,1)}else un(1);else{var L=Kv(v)+4,D=n[L-4]|n[L-3]<<8,M=L+D;if(M>c){g&&un(0);break}p&&m(w+D),l.set(n.subarray(L,M),w),i.b=w+=D,i.p=v=M*8,i.f=y;continue}if(v>S){g&&un(0);break}}p&&m(w+131072);for(var q=(1<<_)-1,x=(1<<O)-1,C=v;;C=v){var X=b[bo(n,v)&q],H=X>>4;if(v+=X&15,v>S){g&&un(0);break}if(X||un(2),H<256)l[w++]=H;else if(H==256){C=v,b=null;break}else{var G=H-254;if(H>264){var ee=H-257,te=of[ee];G=Kn(n,v,(1<<te)-1)+uf[ee],v+=te}var pe=E[bo(n,v)&x],Ne=pe>>4;pe||un(3),v+=pe&15;var R=Fv[Ne];if(Ne>3){var te=cf[Ne];R+=bo(n,v)&(1<<te)-1,v+=te}if(v>S){g&&un(0);break}p&&m(w+131072);var we=w+G;if(w<R){var se=d-R,_e=Math.min(R,we);for(se+w<0&&un(3);w<_e;++w)l[w]=o[se+w]}for(;w<we;++w)l[w]=l[w-R]}}i.l=b,i.p=C,i.b=w,i.f=y,b&&(y=1,i.m=_,i.d=E,i.n=O)}while(!y);return w!=l.length&&f?Mo(l,0,w):l.subarray(0,w)},OS=new gn(0),kS=function(n,i){var l={};for(var o in n)l[o]=n[o];for(var o in i)l[o]=i[o];return l},gg=function(n,i,l){for(var o=n(),c=n.toString(),d=c.slice(c.indexOf("[")+1,c.lastIndexOf("]")).replace(/\s+/g,"").split(","),f=0;f<o.length;++f){var p=o[f],g=d[f];if(typeof p=="function"){i+=";"+g+"=";var m=p.toString();if(p.prototype)if(m.indexOf("[native code]")!=-1){var y=m.indexOf(" ",8)+1;i+=m.slice(y,m.indexOf("(",y))}else{i+=m;for(var v in p.prototype)i+=";"+g+".prototype."+v+"="+p.prototype[v].toString()}else i+=m}else l[g]=p}return i},oo=[],RS=function(n){var i=[];for(var l in n)n[l].buffer&&i.push((n[l]=new n[l].constructor(n[l])).buffer);return i},DS=function(n,i,l,o){if(!oo[l]){for(var c="",d={},f=n.length-1,p=0;p<f;++p)c=gg(n[p],c,d);oo[l]={c:gg(n[f],c,d),e:d}}var g=kS({},oo[l].e);return TS(oo[l].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+i.toString()+"}",l,g,RS(g),o)},LS=function(){return[gn,zr,qv,of,cf,Hv,uf,Fv,Xv,Zv,To,Qv,Ci,yo,Kn,bo,Kv,Mo,un,Jv,df,Wv,ey]},Wv=function(n){return postMessage(n,[n.buffer])},ey=function(n){return n&&{out:n.size&&new gn(n.size),dictionary:n.dictionary}},US=function(n,i,l,o,c,d){var f=DS(l,o,c,function(p,g){f.terminate(),d(p,g)});return f.postMessage([n,i],i.consume?[n.buffer]:[]),function(){f.terminate()}},ha=function(n,i){return n[i]|n[i+1]<<8},Qn=function(n,i){return(n[i]|n[i+1]<<8|n[i+2]<<16|n[i+3]<<24)>>>0},td=function(n,i){return Qn(n,i)+Qn(n,i+4)*4294967296};function zS(n,i,l){return l||(l=i,i={}),typeof l!="function"&&un(7),US(n,i,[LS],function(o){return Wv(df(o.data[0],ey(o.data[1])))},1,l)}function df(n,i){return Jv(n,{i:2},i&&i.out,i&&i.dictionary)}var qd=typeof TextDecoder<"u"&&new TextDecoder,MS=0;try{qd.decode(OS,{stream:!0}),MS=1}catch{}var BS=function(n){for(var i="",l=0;;){var o=n[l++],c=(o>127)+(o>223)+(o>239);if(l+c>n.length)return{s:i,r:Mo(n,l-1)};c?c==3?(o=((o&15)<<18|(n[l++]&63)<<12|(n[l++]&63)<<6|n[l++]&63)-65536,i+=String.fromCharCode(55296|o>>10,56320|o&1023)):c&1?i+=String.fromCharCode((o&31)<<6|n[l++]&63):i+=String.fromCharCode((o&15)<<12|(n[l++]&63)<<6|n[l++]&63):i+=String.fromCharCode(o)}};function ty(n,i){if(i){for(var l="",o=0;o<n.length;o+=16384)l+=String.fromCharCode.apply(null,n.subarray(o,o+16384));return l}else{if(qd)return qd.decode(n);var c=BS(n),d=c.s,l=c.r;return l.length&&un(8),d}}var IS=function(n,i){return i+30+ha(n,i+26)+ha(n,i+28)},$S=function(n,i,l){var o=ha(n,i+28),c=ha(n,i+30),d=ty(n.subarray(i+46,i+46+o),!(ha(n,i+8)&2048)),f=i+46+o,p=PS(n,f,c,l,Qn(n,i+20),Qn(n,i+24),Qn(n,i+42)),g=p[0],m=p[1],y=p[2];return[ha(n,i+10),g,m,d,f+c+ha(n,i+32),y]},PS=function(n,i,l,o,c,d,f){var p=c==4294967295,g=d==4294967295,m=f==4294967295,y=i+l,v=p+g+m;if(o&&v){for(;i+4<y;i+=4+ha(n,i+2))if(ha(n,i)==1)return[p?td(n,i+4+8*g):c,g?td(n,i+4):d,m?td(n,i+4+8*(g+p)):f,1];o<2&&un(13)}return[c,d,f,0]},vg=typeof queueMicrotask=="function"?queueMicrotask:typeof setTimeout=="function"?setTimeout:function(n){n()};function qS(n,i,l){l||(l=i,i={}),typeof l!="function"&&un(7);var o=[],c=function(){for(var O=0;O<o.length;++O)o[O]()},d={},f=function(O,S){vg(function(){l(O,S)})};vg(function(){f=l});for(var p=n.length-22;Qn(n,p)!=101010256;--p)if(!p||n.length-p>65558)return f(un(13,0,1),null),c;var g=ha(n,p+8);if(g){var m=g,y=Qn(n,p+16),v=Qn(n,p-20)==117853008;if(v){var w=Qn(n,p-12);v=Qn(n,w)==101075792,v&&(m=g=Qn(n,w+32),y=Qn(n,w+48))}for(var b=i&&i.filter,E=function(O){var S=$S(n,y,v),T=S[0],L=S[1],D=S[2],M=S[3],V=S[4],K=S[5],ae=IS(n,K);y=V;var I=function(ee,B){ee?(c(),f(ee,null)):(B&&(d[M]=B),--g||f(null,d))};if(!b||b({name:M,size:L,originalSize:D,compression:T}))if(!T)I(null,Mo(n,ae,ae+L));else if(T==8){var $=n.subarray(ae,ae+L);if(D<524288||L>.8*D)try{I(null,df($,{out:new gn(D)}))}catch(ee){I(ee,null)}else o.push(zS($,{size:D},I))}else I(un(14,"unknown compression type "+T,1),null);else I(null,null)},_=0;_<m;++_)E(_)}else f(null,{});return c}function Hd(n){"@babel/helpers - typeof";return Hd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Hd(n)}function HS(n,i,l){return Object.defineProperty(n,"prototype",{writable:!1}),n}function GS(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function VS(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&zs(n,i)}function FS(n){var i=ny();return function(){var o=Ms(n),c;if(i){var d=Ms(this).constructor;c=Reflect.construct(o,arguments,d)}else c=o.apply(this,arguments);return YS(this,c)}}function YS(n,i){if(i&&(Hd(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return XS(n)}function XS(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Gd(n){var i=typeof Map=="function"?new Map:void 0;return Gd=function(o){if(o===null||!ZS(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(o))return i.get(o);i.set(o,c)}function c(){return xo(o,arguments,Ms(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),zs(c,o)},Gd(n)}function xo(n,i,l){return ny()?xo=Reflect.construct.bind():xo=function(c,d,f){var p=[null];p.push.apply(p,d);var g=Function.bind.apply(c,p),m=new g;return f&&zs(m,f.prototype),m},xo.apply(null,arguments)}function ny(){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 ZS(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function zs(n,i){return zs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},zs(n,i)}function Ms(n){return Ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Ms(n)}var ay=(function(n){VS(l,n);var i=FS(l);function l(){return GS(this,l),i.apply(this,arguments)}return HS(l)})(Gd(Error));function ry(n){var i=new ay(n.message);return n.stack&&(i.stack=n.stack),Error.captureStackTrace&&Error.captureStackTrace(i,ry),i.cause=n,i}function KS(n,i){return QS(n,i,JS,!0)}function QS(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},l=i.filter,o=arguments.length>2?arguments[2]:void 0;return o(new Uint8Array(n),{filter:function(d){return l?l({path:d.name}):!0}}).then(function(c){return c},function(c){throw WS(c)?ry(c):c})}function JS(n){return new Promise(function(i,l){qS(n,function(o,c){o?l(o):i(c)})})}function WS(n){return typeof n.code=="number"}function Vd(n){"@babel/helpers - typeof";return Vd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Vd(n)}function ej(n,i,l){return Object.defineProperty(n,"prototype",{writable:!1}),n}function tj(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function nj(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&Bs(n,i)}function aj(n){var i=iy();return function(){var o=Is(n),c;if(i){var d=Is(this).constructor;c=Reflect.construct(o,arguments,d)}else c=o.apply(this,arguments);return rj(this,c)}}function rj(n,i){if(i&&(Vd(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return ij(n)}function ij(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Fd(n){var i=typeof Map=="function"?new Map:void 0;return Fd=function(o){if(o===null||!sj(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(o))return i.get(o);i.set(o,c)}function c(){return So(o,arguments,Is(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Bs(c,o)},Fd(n)}function So(n,i,l){return iy()?So=Reflect.construct.bind():So=function(c,d,f){var p=[null];p.push.apply(p,d);var g=Function.bind.apply(c,p),m=new g;return f&&Bs(m,f.prototype),m},So.apply(null,arguments)}function iy(){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 sj(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function Bs(n,i){return Bs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Bs(n,i)}function Is(n){return Is=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Is(n)}var lj={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"},Eo=(function(n){nj(l,n);var i=aj(l);function l(o,c){var d;return tj(this,l),d=i.call(this,lj[o]||o),d.code=o,d.name="InvalidInputError",d.cause=c,d}return ej(l)})(Fd(Error));function oj(n){var i=n.path;return i.endsWith(".xml")||i.endsWith(".xml.rels")}var cj=[80,75],sy=[208,207,17,224],jo=[cj,sy],uj=jo.indexOf(sy);function dj(){var n,i=fj(jo),l=0;return function(o){if(isNaN(n)){var c;i=i.filter(function(d){if(o===jo[d][l])return jo[d].length===l+1&&(c=d),!0}),i.length===1?n=c:i.length===0&&(n=-1)}return l++,n}}function fj(n){for(var i=[],l=0;l<n.length;)i.push(l),l++;return i}function hj(n,i){var l=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l)return(l=l.call(n)).next.bind(l);if(Array.isArray(n)||(l=pj(n))||i){l&&(n=l);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.
|
|
12
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pj(n,i){if(n){if(typeof n=="string")return yg(n,i);var l=Object.prototype.toString.call(n).slice(8,-1);if(l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set")return Array.from(n);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return yg(n,i)}}function yg(n,i){(i==null||i>n.length)&&(i=n.length);for(var l=0,o=new Array(i);l<i;l++)o[l]=n[l];return o}function mj(n){for(var i=dj(),l=hj(n),o;!(o=l()).done;){var c=o.value;if(gj(c,i))return}vj(n.length)}function gj(n,i){var l=i(n);if(l!==void 0){if(l===uj)throw new Eo("XLS_FILE_NOT_SUPPORTED");if(l<0)throw new Eo("FILE_NOT_SUPPORTED");return!0}}function vj(n){throw new Eo(n===0?"NO_DATA":"FILE_NOT_SUPPORTED")}var wo;function fr(n){var i=Date.now(),l=typeof global<"u"?!!global.READ_EXCEL_FILE_CHECKPOINTS:typeof window<"u"?!!window.READ_EXCEL_FILE_CHECKPOINTS:!1;l&&(wo&&console.log(" -",i-wo,"ms"),console.log("*",n)),wo=i}function yj(){wo=void 0}function ly(n){return yj(),fr("unpack files"),n instanceof File||n instanceof Blob?n.arrayBuffer().then(bg):Promise.resolve(n).then(bg)}function bg(n){return mj(new Uint8Array(n)),KS(n,{filter:oj}).then(function(i){return i},function(i){throw i instanceof ay?new Eo("INVALID_ZIP",i.cause):i})}function bj(n,i){var l=o();return i(n,l,d,null,null).then(function(){return c(l)});function o(){return{workbookPr:void 0,sheets:[]}}function c(f){return{epoch1904:f.workbookPr?f.workbookPr.epoch1904:!1,sheets:f.sheets}}function d(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 xj(n,i){var l="http://schemas.openxmlformats.org/officeDocument/2006/relationships/",o="http://purl.oclc.org/ooxml/officeDocument/relationships/",c=d();return i(n,c,p,null,null).then(function(){return c});function d(){return{sheets:{},sharedStrings:void 0,styles:void 0}}function f(y){return y}function p(y,v,w){y==="Relationship"&&g(w,v.Id,v.Type,v.Target)}function g(y,v,w,b){switch(w){case l+"styles":case o+"styles":y.styles=m(b);break;case l+"sharedStrings":case o+"sharedStrings":y.sharedStrings=m(b);break;case l+"worksheet":case o+"worksheet":y.sheets[v]=m(b);break}}function m(y){return y[0]==="/"?y.slice(1):"xl/"+y}}function $s(n){"@babel/helpers - typeof";return $s=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},$s(n)}var Sj=["xfId"];function xg(n,i){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);i&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),l.push.apply(l,o)}return l}function Sg(n){for(var i=1;i<arguments.length;i++){var l=arguments[i]!=null?arguments[i]:{};i%2?xg(Object(l),!0).forEach(function(o){jj(n,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):xg(Object(l)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(l,o))})}return n}function jj(n,i,l){return i=wj(i),i in n?Object.defineProperty(n,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[i]=l,n}function wj(n){var i=Nj(n,"string");return $s(i)==="symbol"?i:String(i)}function Nj(n,i){if($s(n)!=="object"||n===null)return n;var l=n[Symbol.toPrimitive];if(l!==void 0){var o=l.call(n,i);if($s(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}function Cj(n,i){if(n==null)return{};var l=_j(n,i),o,c;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(c=0;c<d.length;c++)o=d[c],!(i.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(l[o]=n[o])}return l}function _j(n,i){if(n==null)return{};var l={},o=Object.keys(n),c,d;for(d=0;d<o.length;d++)c=o[d],!(i.indexOf(c)>=0)&&(l[c]=n[c]);return l}function Tj(n,i){var l=o();return i(n,l,d,f,null).then(function(){return c(l)});function o(){return{numberFormats:{},baseStyles:[],styles:[],cellStyleXfs:!1,cellXfs:!1}}function c(g){return g.styles.map(function(m){if(m.xfId){var y=m.xfId,v=Cj(m,Sj);return Sg(Sg({},g.baseStyles[y]),v)}else return m})}function d(g,m,y){if(g==="numFmt")y.numberFormats[m.numFmtId]={id:Number(m.numFmtId),template:m.formatCode};else if(g==="cellStyleXfs")y.cellStyleXfs=!0;else if(g==="cellXfs")y.cellXfs=!0;else if(g==="xf"){if(y.cellStyleXfs)y.baseStyles.push(p(m));else if(y.cellXfs){var v=p(m,y.numberFormats);m.xfId&&(v.xfId=Number(m.xfId)),y.styles.push(v)}}}function f(g,m){g==="cellStyleXfs"?m.cellStyleXfs=!1:g==="cellXfs"&&(m.cellXfs=!1)}function p(g,m){var y={},v=g.numFmtId;return v&&(m&&m[v]?y.numberFormat=m[v]:y.numberFormat={id:Number(v)}),y}}function Ej(n,i){var l=o();return i(n,l,d,f,p).then(function(){return c(l)});function o(){return{si:void 0,strings:[]}}function c(w){return w.strings}function d(w,b,E){w==="si"?E.si=g():E.si&&m(w,b,E.si)}function f(w,b){w==="si"?(b.strings.push(b.si.string),b.si=void 0):b.si&&y(w,b.si)}function p(w,b){b.si&&v(w,b.si)}function g(){return{t:!1,r:!1,rPh:!1,string:""}}function m(w,b,E){w==="t"?E.t=!0:w==="r"?E.r=!0:w==="rPh"&&(E.rPh=!0)}function y(w,b){w==="t"?b.t=!1:w==="r"?b.r=!1:w==="rPh"&&(b.rPh=!1)}function v(w,b){b.rPh||b.t&&(b.r?b.string+=w:b.string=w)}}function Aj(n,i){var l=17,o=1,c=1,d=1440*60*1e3,f=365;i&&(n+=4*f+o+c);var p=o+c+70*f+l;return Math.floor((n-p)*d)}var Oj=/^\[\$-[^\]]+\]/,kj=/;@$/,nd={};function Rj(n){if(n in nd)return nd[n];n=n.toLowerCase(),n=n.replace(Oj,""),n=n.replace(kj,"");var i=n.split(/\W+/),l=i.length===0?!1:i.every(function(o){return Dj.indexOf(o)>=0});return nd[n]=l,l}var Dj=["ss","mm","h","hh","am","pm","d","dd","m","mm","mmm","mmmm","yy","yyyy","e"];function Lj(n,i,l){return n.numberFormat?!!(Mj.indexOf(n.numberFormat.id)>=0||i&&n.numberFormat.template===i||l&&n.numberFormat.template&&Rj(n.numberFormat.template)):!1}var Uj=[14,15,16,17,18,19,20,21,22,45,46,47],ad=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],jg=[27,28,29,30,31,32,33,34,35,36,50,51,52,53,54,55,56,57,58],zj=[71,72,73,74,75,76,77,78,79,80,81],Mj=Uj.concat(ad).concat(jg.filter(function(n){return ad.indexOf(n)<0})).concat(zj.filter(function(n){return ad.indexOf(n)<0}).filter(function(n){return jg.indexOf(n)<0}));function Bj(n,i){return qj(n)||Pj(n,i)||$j(n,i)||Ij()}function Ij(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
13
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $j(n,i){if(n){if(typeof n=="string")return wg(n,i);var l=Object.prototype.toString.call(n).slice(8,-1);if(l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set")return Array.from(n);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return wg(n,i)}}function wg(n,i){(i==null||i>n.length)&&(i=n.length);for(var l=0,o=new Array(i);l<i;l++)o[l]=n[l];return o}function Pj(n,i){var l=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l!=null){var o,c,d,f,p=[],g=!0,m=!1;try{if(d=(l=l.call(n)).next,i!==0)for(;!(g=(o=d.call(l)).done)&&(p.push(o.value),p.length!==i);g=!0);}catch(y){m=!0,c=y}finally{try{if(!g&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(m)throw c}}return p}}function qj(n){if(Array.isArray(n))return n}var Hj=null,_i=[null,Hj];function Gj(n,i,l,o,c){var d=Bj(c,6),f=d[0],p=d[1],g=d[2],m=d[3],y=d[4],v=d[5];switch(n||"n"){case"str":return l===void 0?"VALUE_MISSING":l?["s",l]:_i;case"inlineStr":return o===void 0?"VALUE_MISSING":["s",o];case"s":if(!l)return"VALUE_MISSING";var w=Number(l);return isNaN(w)||f[w]===void 0?"VALUE_INVALID":["s",f[w]];case"b":return l?l==="1"?["b",!0]:l==="0"?["b",!1]:"VALUE_INVALID":"VALUE_MISSING";case"e":return l?["e",l]:"VALUE_MISSING";case"d":if(!l)return _i;var b=new Date(l);return isNaN(b.valueOf())?"VALUE_INVALID":["d",b.getTime()];case"n":if(!l)return _i;if(i){var E=Number(i);if(isNaN(E)||p[E]===void 0)return"FORMAT_INVALID";if(Lj(p[E],m,y)){var _=Number(l);return isNaN(_)?"VALUE_INVALID":["d",Aj(_,g)]}}if(v)return["n",l];var O=Number(l);return isNaN(O)?"VALUE_INVALID":["n",O];default:return"TYPE_INVALID"}}function Ng(n){for(var i=0,l=0;l<n.length;){var o=n.charCodeAt(l);if(o>=48&&o<=57){var c=Number(n.slice(l));return isNaN(c)&&Cg(n),[c,i]}i*=26,i+=n.charCodeAt(l)-64,l++}Cg(n)}function Cg(n){throw new Error('<c r="'.concat(n,'">'))}function Vj(n,i){return Xj(n)||Yj(n,i)||oy(n,i)||Fj()}function Fj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
14
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Yj(n,i){var l=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l!=null){var o,c,d,f,p=[],g=!0,m=!1;try{if(d=(l=l.call(n)).next,i!==0)for(;!(g=(o=d.call(l)).done)&&(p.push(o.value),p.length!==i);g=!0);}catch(y){m=!0,c=y}finally{try{if(!g&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(m)throw c}}return p}}function Xj(n){if(Array.isArray(n))return n}function Zj(n,i){var l=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l)return(l=l.call(n)).next.bind(l);if(Array.isArray(n)||(l=oy(n))||i){l&&(n=l);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.
|
|
15
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function oy(n,i){if(n){if(typeof n=="string")return _g(n,i);var l=Object.prototype.toString.call(n).slice(8,-1);if(l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set")return Array.from(n);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return _g(n,i)}}function _g(n,i){(i==null||i>n.length)&&(i=n.length);for(var l=0,o=new Array(i);l<i;l++)o[l]=n[l];return o}var rd=null;function Kj(n,i,l){var o=l.sharedStrings,c=l.styles,d=l.epoch1904,f=l.options,p=[o,c,d,f.dateFormat,f.smartDateParser!==!1,f.parseNumber],g=[],m=[],y=v();return i(n,y,T,L,D,S).then(function(){var Z=y.sheetData,R=Z.rowCount,q=Z.columnCount,x=Z.dataRowCount,C=Z.dataColumnCount;if(x<R&&(g=g.slice(0,x)),C<q)for(var H=0;H<g.length;)g[H].length>C&&(g[H]=g[H].slice(0,C)),H++;for(var G=Zj(g),te;!(te=G()).done;)for(var pe=te.value;pe.length<C;)pe.push(rd);return g});function v(){return{dimension:void 0,sheetData:void 0}}function w(Z){return Z.sheetData.rows}function b(Z,R){Z.sheetData.rowIndexShift+=Z.sheetData.rows.length-R.length,Z.sheetData.rows=R}function E(Z){return Z.sheetData.errors}function _(Z,R){Z.sheetData.errors=R}function O(Z){var R=Z.row,q=Z.column,x=Z.error;throw new Rs("<c/> at row ".concat(R,", col ").concat(q,": ").concat(x))}function S(Z){var R=w(y),q=E(y);if(Z)g=g.concat(R),m=m.concat(q),m.length>0&&O(m[0]);else if(R.length>1){var x=R.slice(0,-1);g=g.concat(x),m=m.concat(q),b(y,R.slice(-1)),_(y,[])}}function T(Z,R,q){Z==="dimension"?q.dimension=M(R.ref):Z==="sheetData"?q.sheetData=V():q.sheetData&&K(Z,R,q.sheetData)}function L(Z,R){R.sheetData&&ae(Z,R.sheetData)}function D(Z,R){R.sheetData&&I(Z,R.sheetData)}function M(Z){var R=Z.split(":").map(Ng);return R.length===1&&(R=[R[0],R[0]]),R}function V(){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 K(Z,R,q){Z==="row"?(R.r&&(q.rowNumber=Number(R.r)),q.row=[]):Z==="c"?(q.c=j(),q.c.attributes=R):q.c&&F(Z,R,q.c)}function ae(Z,R){if(Z==="row"){if(R.rowNumber){var q=R.rowIndexShift+R.rows.length;if(R.rowNumber<=q)throw new Rs("Out-of-place <row/> number ".concat(R.rowNumber," follows <row/> number ").concat(q));for(;R.rowNumber>R.rowIndexShift+R.rows.length+1;)R.rows.push([])}R.rows.push(R.row),R.row.length>0&&(R.dataRowCount=R.rowNumber),R.rowNumber>R.rowCount&&(R.rowCount=R.rowNumber),R.row=void 0,R.rowNumber=void 0}else if(Z==="c"){var x=$(R.c);if(x.row<R.cursor[0]||x.row===R.cursor[0]&&x.column<=R.cursor[1])throw new Rs("Out-of-place <c/> at row ".concat(x.row," col ").concat(x.column," follows <c/> at row ").concat(R.cursor[0]," col ").concat(R.cursor[1]));if(R.cursor[0]=x.row,R.cursor[1]=x.column,R.rowNumber||(R.rowNumber=x.row),x.error)O(x),R.errors.push(x);else if(x.value!==rd){for(;x.column>R.row.length+1;)R.row.push(rd);R.row.push(x.value),x.column>R.dataColumnCount&&(R.dataColumnCount=x.column)}x.column>R.columnCount&&(R.columnCount=x.column),R.c=void 0}else R.c&&X(Z,R.c)}function I(Z,R){R.c&&Y(Z,R.c)}function $(Z){var R=Z.attributes,q=Z.inlineString,x=Z.vText,C=Ng(R.r),H=Vj(C,2),G=H[0],te=H[1],pe=ee(R.t,R.s,x,q,p,f.trim!==!1);return typeof pe=="string"?{row:G,column:te,error:pe}:{row:G,column:te,value:Q(pe[1],pe[0])}}function ee(Z,R,q,x,C,H){var G=B(Z,R,q,x,C);return Array.isArray(G)&&G[0]==="s"&&(H&&(G[1]=G[1].trim()),G[1]==="")?_i:G}function B(Z,R,q,x,C){var H=Gj(Z,R,q,x,C);if(H==="VALUE_MISSING")switch(Z||"n"){case"str":case"inlineStr":case"s":case"b":return _i}return Z==="e"?_i:H}function Q(Z,R){return R==="n"?f.parseNumber?f.parseNumber(Z):Z:R==="d"?new Date(Z):Z}function j(){return{v:!1,is:!1,t:!1,r:!1,rPh:!1,vText:void 0,inlineString:void 0,attributes:void 0}}function F(Z,R,q){Z==="v"?q.v=!0:Z==="is"?(q.is=!0,q.inlineString=""):Z==="t"?q.t=!0:Z==="r"?q.r=!0:Z==="rPh"&&(q.rPh=!0)}function X(Z,R){Z==="v"?(R.v=!1,R.vText||(R.vText="")):Z==="is"?R.is=!1:Z==="t"?R.t=!1:Z==="r"?R.r=!1:Z==="rPh"&&(R.rPh=!1)}function Y(Z,R){R.v?R.vText=Z:R.is&&(R.rPh||R.t&&(R.r?R.inlineString+=Z:R.inlineString=Z))}}function Qj(n){fr("convert files to strings");for(var i={},l=0,o=Object.keys(n);l<o.length;l++){var c=o[l];i[c]=Jj(n[c])}return i}function Jj(n){return typeof TextDecoder<"u"?new TextDecoder().decode(n):ty(n)}function Yd(n){"@babel/helpers - typeof";return Yd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Yd(n)}function Wj(n){return Yd(n)==="object"&&typeof n.then=="function"}function Xd(n){"@babel/helpers - typeof";return Xd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Xd(n)}function ew(n,i,l){return Object.defineProperty(n,"prototype",{writable:!1}),n}function tw(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function nw(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&Ps(n,i)}function aw(n){var i=cy();return function(){var o=qs(n),c;if(i){var d=qs(this).constructor;c=Reflect.construct(o,arguments,d)}else c=o.apply(this,arguments);return rw(this,c)}}function rw(n,i){if(i&&(Xd(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return iw(n)}function iw(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Zd(n){var i=typeof Map=="function"?new Map:void 0;return Zd=function(o){if(o===null||!sw(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(o))return i.get(o);i.set(o,c)}function c(){return No(o,arguments,qs(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Ps(c,o)},Zd(n)}function No(n,i,l){return cy()?No=Reflect.construct.bind():No=function(c,d,f){var p=[null];p.push.apply(p,d);var g=Function.bind.apply(c,p),m=new g;return f&&Ps(m,f.prototype),m},No.apply(null,arguments)}function cy(){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 sw(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function Ps(n,i){return Ps=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Ps(n,i)}function qs(n){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},qs(n)}var Tg=(function(n){nw(l,n);var i=aw(l);function l(o){var c;return tw(this,l),c=i.call(this,o),c.name="SheetNotFoundError",c}return ew(l)})(Zd(Error));function Hs(n){"@babel/helpers - typeof";return Hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Hs(n)}function uy(n,i){var l=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l)return(l=l.call(n)).next.bind(l);if(Array.isArray(n)||(l=lw(n))||i){l&&(n=l);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.
|
|
16
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function lw(n,i){if(n){if(typeof n=="string")return Eg(n,i);var l=Object.prototype.toString.call(n).slice(8,-1);if(l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set")return Array.from(n);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Eg(n,i)}}function Eg(n,i){(i==null||i>n.length)&&(i=n.length);for(var l=0,o=new Array(i);l<i;l++)o[l]=n[l];return o}function Ag(n,i){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);i&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),l.push.apply(l,o)}return l}function Ao(n){for(var i=1;i<arguments.length;i++){var l=arguments[i]!=null?arguments[i]:{};i%2?Ag(Object(l),!0).forEach(function(o){Oo(n,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Ag(Object(l)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(l,o))})}return n}function Oo(n,i,l){return i=ow(i),i in n?Object.defineProperty(n,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[i]=l,n}function ow(n){var i=cw(n,"string");return Hs(i)==="symbol"?i:String(i)}function cw(n,i){if(Hs(n)!=="object"||n===null)return n;var l=n[Symbol.toPrimitive];if(l!==void 0){var o=l.call(n,i);if(Hs(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}function uw(n,i){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=Qj(i);return fr("parse spreadsheet info and file paths"),id(hw(),o,n).then(function(c){var d=c.spreadsheetInfo,f=c.filePaths;return fr('parse "shared strings" and "styles"'),id(pw(f),o,n).then(function(p){var g=p.sharedStrings,m=p.styles,y=l.sheets?l.sheets.map(function(v){return dw(v,d.sheets)}):d.sheets.map(function(v){return v.relationId});return fr("parse sheet".concat(y.length===1?"":"s"," data")),id(mw(f,y,{sharedStrings:g,styles:m,epoch1904:d.epoch1904,options:l}),o,n).then(function(v){return fr("end"),y.map(function(w){return{sheet:fw(w,d.sheets),data:v[w]}})})})})}function dy(n,i,l,o){return o&&o.parseNumber||(o=Ao(Ao({},o),{},{parseNumber:null})),uw(i,l,o)}function dw(n,i){if(typeof n=="string"){for(var l=uy(i),o;!(o=l()).done;){var c=o.value;if(c.name===n)return c.relationId}throw new Tg('Sheet "'.concat(n,'" not found. Available sheets: ').concat(i.map(function(d){var f=d.name;return'"'.concat(f,'"')}).join(", ")))}else{if(n<=i.length)return i[n-1].relationId;throw new Tg("Sheet number out of bounds: ".concat(n,". Available sheets count: ").concat(i.length))}}function fw(n,i){for(var l=uy(i),o;!(o=l()).done;){var c=o.value;if(c.relationId===n)return c.name}throw new Error("Sheet relation ID not found: ".concat(n))}function hw(){return{"xl/_rels/workbook.xml.rels":{name:"filePaths",parse:xj},"xl/workbook.xml":{name:"spreadsheetInfo",parse:bj}}}function pw(n){var i;return i={},Oo(i,n.sharedStrings||"xl/sharedStrings.xml",{name:"sharedStrings",parse:Ej,fallback:[]}),Oo(i,n.styles||"xl/styles.xml",{name:"styles",parse:Tj,fallback:{}}),i}function mw(n,i,l){return Object.keys(n.sheets).filter(function(o){return i.includes(o)}).reduce(function(o,c){return Ao(Ao({},o),{},Oo({},n.sheets[c],{name:c,parse:function(f,p){return Kj(f,p,l)}}))},{})}function id(n,i,l){for(var o={},c=function(){var w=f[d],b=n[w];o[b.name]=i[w]===void 0?b.fallback===void 0?(function(){throw new Rs('"'.concat(w,'" file not found inside the `.xlsx` file'))})():b.fallback:b.parse(i[w],l)},d=0,f=Object.keys(n);d<f.length;d++)c();for(var p=[],g=function(){var w=y[m];Wj(o[w])&&p.push(o[w].then(function(b){o[w]=b}))},m=0,y=Object.keys(o);m<y.length;m++)g();return p.length>0?Promise.all(p).then(function(){return o}):o}function gw(n,i){return ly(n).then(function(l){return dy(Iv,Pv,l,i)})}function Kd(n){"@babel/helpers - typeof";return Kd=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Kd(n)}function vw(n,i,l){return Object.defineProperty(n,"prototype",{writable:!1}),n}function yw(n,i){if(!(n instanceof i))throw new TypeError("Cannot call a class as a function")}function bw(n,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(i&&i.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),Object.defineProperty(n,"prototype",{writable:!1}),i&&Gs(n,i)}function xw(n){var i=fy();return function(){var o=Vs(n),c;if(i){var d=Vs(this).constructor;c=Reflect.construct(o,arguments,d)}else c=o.apply(this,arguments);return Sw(this,c)}}function Sw(n,i){if(i&&(Kd(i)==="object"||typeof i=="function"))return i;if(i!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jw(n)}function jw(n){if(n===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function Qd(n){var i=typeof Map=="function"?new Map:void 0;return Qd=function(o){if(o===null||!ww(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(typeof i<"u"){if(i.has(o))return i.get(o);i.set(o,c)}function c(){return Co(o,arguments,Vs(this).constructor)}return c.prototype=Object.create(o.prototype,{constructor:{value:c,enumerable:!1,writable:!0,configurable:!0}}),Gs(c,o)},Qd(n)}function Co(n,i,l){return fy()?Co=Reflect.construct.bind():Co=function(c,d,f){var p=[null];p.push.apply(p,d);var g=Function.bind.apply(c,p),m=new g;return f&&Gs(m,f.prototype),m},Co.apply(null,arguments)}function fy(){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 ww(n){return Function.toString.call(n).indexOf("[native code]")!==-1}function Gs(n,i){return Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,c){return o.__proto__=c,o},Gs(n,i)}function Vs(n){return Vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(l){return l.__proto__||Object.getPrototypeOf(l)},Vs(n)}var pa=(function(n){bw(l,n);var i=xw(l);function l(o){var c;return yw(this,l),c=i.call(this,"invalid"),c.reason=o,c}return vw(l)})(Qd(Error));function Nw(n){if(typeof n=="string"){var i=n;if(n=Number(n),String(n)!==i)throw new pa("not_a_number")}if(typeof n!="number")throw new pa("not_a_number");if(isNaN(n))throw new pa("invalid_number");if(!isFinite(n))throw new pa("out_of_bounds");return n}function Cw(n){if(typeof n=="string")return n;if(typeof n=="number"){if(isNaN(n))throw new pa("invalid_number");if(!isFinite(n))throw new pa("out_of_bounds");return String(n)}throw new pa("not_a_string")}function _w(n){if(typeof n=="boolean")return n;throw new pa("not_a_boolean")}function Tw(n){if(n instanceof Date){if(isNaN(n.valueOf()))throw new pa("out_of_bounds");return n}throw new pa("not_a_date")}var Ew={}.constructor;function hy(n){return n!=null&&n.constructor===Ew}function Ti(n){"@babel/helpers - typeof";return Ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ti(n)}function Aw(n,i){return my(n)||Ow(n,i)||ff(n,i)||py()}function Ow(n,i){var l=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l!=null){var o,c,d,f,p=[],g=!0,m=!1;try{if(d=(l=l.call(n)).next,i!==0)for(;!(g=(o=d.call(l)).done)&&(p.push(o.value),p.length!==i);g=!0);}catch(y){m=!0,c=y}finally{try{if(!g&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(m)throw c}}return p}}function kw(n){return my(n)||Rw(n)||ff(n)||py()}function py(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
17
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rw(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)}function my(n){if(Array.isArray(n))return n}function Og(n,i){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);i&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),l.push.apply(l,o)}return l}function ko(n){for(var i=1;i<arguments.length;i++){var l=arguments[i]!=null?arguments[i]:{};i%2?Og(Object(l),!0).forEach(function(o){Dw(n,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Og(Object(l)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(l,o))})}return n}function Dw(n,i,l){return i=Lw(i),i in n?Object.defineProperty(n,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[i]=l,n}function Lw(n){var i=Uw(n,"string");return Ti(i)==="symbol"?i:String(i)}function Uw(n,i){if(Ti(n)!=="object"||n===null)return n;var l=n[Symbol.toPrimitive];if(l!==void 0){var o=l.call(n,i);if(Ti(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}function gy(n,i){var l=typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l)return(l=l.call(n)).next.bind(l);if(Array.isArray(n)||(l=ff(n))||i){l&&(n=l);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.
|
|
18
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ff(n,i){if(n){if(typeof n=="string")return kg(n,i);var l=Object.prototype.toString.call(n).slice(8,-1);if(l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set")return Array.from(n);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return kg(n,i)}}function kg(n,i){(i==null||i>n.length)&&(i=n.length);for(var l=0,o=new Array(i);l<i;l++)o[l]=n[l];return o}var Ro=null;function zw(n,i,l){fr("parse sheet data using schema");for(var o=[],c=[],d=Mw(n,i),f=0,p=gy(d),g;!(g=p()).done;){var m=g.value,y=m.object,v=m.errors;v?c=c.concat(v.map(function(w){return ko(ko({},w),{},{row:f+1})})):o.push(y),f++}return fr("end"),c.length>0?{errors:c}:{objects:o}}function Mw(n,i,l){Xw(i);var o=Qw(),c=kw(n),d=c[0],f=c.slice(1);return f.map(function(p){return Bw(p,i,d,o)})}function Bw(n,i,l,o){var c={schema:i},d=vy(n,c,void 0,l,o),f=d.value,p=d.isEmptyValue,g=d.errors,m=d.children,y={value:Jw,isEmptyValue:p,errors:g,isRequired:void 0},v=xy(c,f,p,g,m,y.isRequired,y.value,y.isEmptyValue,y.errors,l);return g||v?{errors:(g||[]).concat(v||[])}:{object:by(f,p,void 0,o)}}function Iw(n,i,l,o,c){for(var d={},f=!0,p=[],g=[],m=0,y=Object.keys(i);m<y.length;m++){var v=y[m],w=vy(n,i[v],Rg(v,l),o,c);w.errors?p=p.concat(w.errors):(d[v]=by(w.value,w.isEmptyValue,Rg(v,l),c),f&&!w.isEmptyValue&&(f=!1)),g.push(ko(ko({},w),{},{schemaEntry:i[v]}))}return p.length>0?{errors:p,children:g}:{value:d,isEmptyValue:f,children:g}}function vy(n,i,l,o,c){var d=i.column?o.indexOf(i.column):void 0,f=i.column?d<0:void 0,p=i.column?f?{value:c.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:$w(n[d],i,d,c):Iw(n,i.schema,l,o,c),g=p.value,m=p.isEmptyValue,y=p.errors,v=p.children;return y?{errors:y,children:v}:{value:g,isEmptyValue:m,children:v}}function $w(n,i,l,o){var c=Pw(n,i,o),d=c.value,f=c.isEmptyValue,p=c.error,g=c.reason;if(p){var m=Sy({error:p,reason:g,column:i.column,columnIndex:l,valueType:i.type,value:n});return{errors:[m]}}return{value:d,isEmptyValue:f}}function Pw(n,i,l){return n===void 0?{value:l.propertyValueWhenColumnIsMissing,isEmptyValue:!0}:n===Ro?{value:l.propertyValueWhenCellIsEmpty,isEmptyValue:!0}:Array.isArray(i.type)?qw(n,i,l):yy(n,i)}function qw(n,i,l){if(typeof n!="string")return{error:"not_a_string"};var o=!0,c=[],d=[],f=Fw(n,l.separatorCharacter).map(function(p){if(!(c.length>0)){if(!p){c.push("invalid"),d.push("syntax");return}var g=yy(p,i),m=g.value,y=g.isEmptyValue,v=g.error,w=g.reason;if(v){c.push(v),d.push(w);return}return o&&!y&&(o=!1),m}});return c.length>0?{error:c[0],reason:d[0]}:{value:f,isEmptyValue:o}}function yy(n,i,l){if(n===Ro)return{value:n,isEmptyValue:!0};var o;if(i.type?o=Gw(n,Array.isArray(i.type)?i.type[0]:i.type):o={value:n},o.error)return o;if(n===Ro)return{value:n,isEmptyValue:!0};if(i.oneOf){var c=Hw(o.value,i.oneOf);if(c)return c}if(i.validate)try{i.validate(o.value)}catch(d){return{error:d.message}}return{value:o.value,isEmptyValue:Zw(o.value)}}function Hw(n,i){if(i.indexOf(n)<0)return{error:"invalid",reason:"unknown"}}function Gw(n,i){switch(i){case String:return js(n,Cw);case Number:return js(n,Nw);case Date:return js(n,Tw);case Boolean:return js(n,_w);default:if(typeof i!="function")throw new Error("Unsupported schema `type`: ".concat(i&&i.name||i));return js(n,i)}}function js(n,i){try{var l=i(n);return l===void 0?{value:Ro}:{value:l}}catch(c){var o={error:c.message};return c.reason&&(o.reason=c.reason),o}}function Vw(n,i,l){for(var o=0,c="";l+o<n.length;){var d=n[l+o];if(d===i)return[c,o];c+=d,o++}return[c,o]}function Fw(n,i){for(var l=[],o=0;o<n.length;){var c=Vw(n,i,o),d=Aw(c,2),f=d[0],p=d[1];o+=p+i.length,l.push(f.trim())}return l}function by(n,i,l,o){if(i){if(hy(n))return o.transformEmptyObject(n,{path:l});if(Array.isArray(n))return o.transformEmptyArray(n,{path:l})}return n}function Rg(n,i){return"".concat(i?i+".":"").concat(n)}function xy(n,i,l,o,c,d,f,p,g,m){var y=[],v=Yw(n,d,f,p,g);if(v&&l&&y.push(Sy({error:"required",column:n.column,columnIndex:m.indexOf(n.column),valueType:n.type,value:i})),c)for(var w=gy(c),b;!(b=w()).done;){var E=b.value,_=xy(E.schemaEntry,E.value,E.isEmptyValue,E.errors,E.children,v,i,l,o,m);_&&(y=y.concat(_))}if(y.length>0)return y}function Yw(n,i,l,o,c){return i===!1&&(o||c)?!1:n.required&&(typeof n.required=="boolean"?n.required:c?!1:n.required(l))}function Sy(n){var i=n.column,l=n.columnIndex,o=n.valueType,c=n.value,d=n.error,f=n.reason,p={error:d,column:i,columnIndex:l,value:c};return f&&(p.reason=f),o&&(p.type=o),p}function Xw(n){for(var i=0,l=Object.keys(n);i<l.length;i++){var o=l[i],c=n[o];if(Ti(c.type)==="object"&&!Array.isArray(c.type))throw new Error("When defining a nested schema, use a `schema` property instead of a `type` property");if(!c.schema&&!c.column)throw new Error('"column" not defined for schema entry "'.concat(o,'".'))}jy(n,void 0)}function jy(n,i){if(i!==void 0&&i!==!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(i));for(var l=0,o=Object.keys(n);l<o.length;l++){var c=o[l];if(hy(n[c].schema)){if(n[c].column)throw new Error("In a schema, `column` property is only allowed when describing a property value rather than a nested object. Key: ".concat(c,`. Schema:
|
|
19
|
+
`).concat(JSON.stringify(n[c],null,2)));jy(n[c].schema,n[c].required)}}}function Zw(n){return n==null}var Kw={propertyValueWhenColumnIsMissing:void 0,propertyValueWhenCellIsEmpty:null,transformEmptyObject:function(){return null},transformEmptyArray:function(){return null},separatorCharacter:","};function Qw(n){return Kw}var Jw={};function Fs(n){"@babel/helpers - typeof";return Fs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Fs(n)}var Ww=["schema"];function Dg(n,i){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);i&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),l.push.apply(l,o)}return l}function Lg(n){for(var i=1;i<arguments.length;i++){var l=arguments[i]!=null?arguments[i]:{};i%2?Dg(Object(l),!0).forEach(function(o){e1(n,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Dg(Object(l)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(l,o))})}return n}function e1(n,i,l){return i=t1(i),i in n?Object.defineProperty(n,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[i]=l,n}function t1(n){var i=n1(n,"string");return Fs(i)==="symbol"?i:String(i)}function n1(n,i){if(Fs(n)!=="object"||n===null)return n;var l=n[Symbol.toPrimitive];if(l!==void 0){var o=l.call(n,i);if(Fs(o)!=="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}function a1(n,i){if(n==null)return{};var l=r1(n,i),o,c;if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(c=0;c<d.length;c++)o=d[c],!(i.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(l[o]=n[o])}return l}function r1(n,i){if(n==null)return{};var l={},o=Object.keys(n),c,d;for(d=0;d<o.length;d++)c=o[d],!(i.indexOf(c)>=0)&&(l[c]=n[c]);return l}function i1(n,i,l,o,c){var d={},f=d.schema,p=a1(d,Ww);return dy(n,i,l,Lg(Lg({},p),{},{sheets:[1]})).then(function(g){var m=g[0].data;return f?zw(m,f):m})}function s1(n,i,l){return ly(n).then(function(o){return i1(Iv,Pv,o)})}function wy(n){const i=[];let l=[],o="",c=!1;const d=n.replace(/^\uFEFF/,"");for(let f=0;f<d.length;f++){const p=d[f];p==='"'?c&&d[f+1]==='"'?(o+='"',f++):c=!c:p===","&&!c?(l.push(o),o=""):(p===`
|
|
20
|
+
`||p==="\r")&&!c?(p==="\r"&&d[f+1]===`
|
|
21
|
+
`&&f++,l.push(o),l.some(g=>g.trim())&&i.push(l),l=[],o=""):o+=p}if(l.push(o),l.some(f=>f.trim())&&i.push(l),c)throw new Error("CSV contains an unclosed quoted value.");return i}const sd=50,Ug=25,zg=24e3,Ny=2e6;function Mg(n,i){return{name:n,rows:i.slice(0,sd).map(l=>l.slice(0,Ug).map(o=>String(o??""))),clipped:i.length>sd||i.slice(0,sd).some(l=>l.length>Ug)}}function l1(n){const i=document.createElement("template");i.innerHTML=n;const l=new Set("style main header section article aside footer div span h1 h2 h3 h4 h5 h6 p strong b em i small code pre hr br ul ol li table caption thead tbody tr th td".split(" "));for(const o of i.content.querySelectorAll("*")){if(o.namespaceURI!=="http://www.w3.org/1999/xhtml"||!l.has(o.localName)){o.remove();continue}for(const c of Array.from(o.attributes))["class","style","colspan","rowspan"].includes(c.name)||o.removeAttribute(c.name)}return`<!doctype html><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; base-uri 'none'; form-action 'none'"><body>${i.innerHTML}</body>`}async function o1(n,i,l){const o=await fetch(n,{signal:l,cache:"no-store"});if(!o.ok)throw new Error("Document unavailable");const c=await o.blob();if(c.size>Ny)throw new Error("Document too large");if(i.endsWith(".xlsx"))return{sheets:(await gw(c)).map(f=>Mg(f.sheet,f.data))};const d=await c.text();return i.endsWith(".csv")?{sheets:[Mg("CSV",wy(d))]}:i.endsWith(".html")?{html:l1(d)}:{text:d.slice(0,zg),clipped:d.length>zg}}function Cy({rows:n,header:i}){return a.jsxs("table",{className:"w-full border-collapse text-left text-sm",children:[i&&a.jsx("thead",{children:a.jsx("tr",{children:i.map((l,o)=>a.jsx("th",{scope:"col",className:"border border-slate-200 px-2 py-1",children:l},o))})}),a.jsx("tbody",{children:n.map((l,o)=>a.jsx("tr",{children:l.map((c,d)=>a.jsx("td",{className:"min-w-20 whitespace-pre-wrap border border-slate-200 px-2 py-1 align-top",children:c},d))},o))})]})}function Bg(n){return Array.from(n.trim().slice(1).matchAll(/((?:\\.|[^|\\])*)\|/g),([,i])=>i.trim().replace(/\\(.)/g,"$1").replaceAll("<br>",`
|
|
22
|
+
`).replaceAll("<","<").replaceAll(">",">").replaceAll("&","&"))}function c1({text:n}){return a.jsx("article",{className:"max-h-96 space-y-3 overflow-auto text-sm",children:n.replaceAll(`\r
|
|
23
|
+
`,`
|
|
24
|
+
`).split(/\n\s*\n/).map((i,l)=>{const o=i.split(`
|
|
25
|
+
`);return o.length===1&&/^#{1,6} /.test(i)?a.jsx("h3",{className:"font-semibold",children:i.replace(/^#{1,6} /,"")},l):o[0].startsWith("|")&&/^\|[ :|-]+\|$/.test(o[1]??"")?a.jsx("div",{className:"overflow-x-auto",children:a.jsx(Cy,{header:Bg(o[0]),rows:o.slice(2).map(Bg)})},l):a.jsx("p",{className:"whitespace-pre-wrap break-words",children:i},l)})})}function u1({file:n,projectId:i}){const l=Le().language==="th",[o,c]=z.useState(),[d,f]=z.useState(!1),[p,g]=z.useState(0),m=n.size>Ny;z.useEffect(()=>{if(m)return;const w=new AbortController;return o1(lf(i,n.filename),n.filename,w.signal).then(b=>{w.signal.aborted||c(b)}).catch(()=>{w.signal.aborted||f(!0)}),()=>w.abort()},[i,n.filename,m]);const y=l?"ตัวอย่างเอกสาร":"Document preview",v=o&&"sheets"in o?o.sheets[p]:void 0;return a.jsxs("section",{"aria-label":y,className:"mt-3 min-w-0 rounded-lg border border-slate-200 p-3",children:[m?a.jsx("p",{children:l?"ไฟล์นี้มีขนาดเกิน 2 MB กดดาวน์โหลดเพื่อเปิดดูฉบับเต็ม":"This file exceeds 2 MB. Download it to view the full document."}):d?a.jsx("p",{role:"alert",children:l?"เปิดตัวอย่างไม่สำเร็จ ลองรีเฟรชรายการหรือดาวน์โหลดไฟล์":"Could not open the preview. Refresh the list or download the file."}):o?null:a.jsx("p",{role:"status",children:l?"กำลังเปิดตัวอย่าง…":"Opening preview…"}),o&&"html"in o&&a.jsx("iframe",{title:y,sandbox:"",referrerPolicy:"no-referrer",className:"h-96 w-full bg-white",srcDoc:o.html}),o&&"text"in o&&a.jsx(c1,{text:o.text}),o&&"sheets"in o&&o.sheets.length>1&&a.jsxs("label",{className:"mb-3 flex items-center gap-2 text-sm",children:[l?"แผ่นงาน":"Sheet",a.jsx("select",{className:"rounded border p-1",value:p,onChange:w=>g(Number(w.target.value)),children:o.sheets.map((w,b)=>a.jsx("option",{value:b,children:w.name},w.name))})]}),v&&a.jsxs("div",{className:"max-h-96 overflow-auto",children:[a.jsx(Cy,{rows:v.rows}),!v.rows.length&&a.jsx("p",{children:l?"ไม่มีข้อมูลในแผ่นงานนี้":"This sheet is empty."})]}),(v?.clipped||o&&"text"in o&&o.clipped)&&a.jsx("p",{className:"mt-2 text-xs",children:l?"แสดงบางส่วน กดดาวน์โหลดเพื่อดูไฟล์เต็ม":"Showing part of this document. Download the file for the full contents."})]})}function d1({projectId:n,projectName:i}){const{language:l}=Le(),o=l==="th",[c,d]=z.useState([]),[f,p]=z.useState(0),[g,m]=z.useState(!0),[y,v]=z.useState(!1),[w,b]=z.useState(""),[E,_]=z.useState(""),[O,S]=z.useState("");z.useEffect(()=>{const D=()=>p(M=>M+1);return window.addEventListener("focus",D),()=>window.removeEventListener("focus",D)},[]),z.useEffect(()=>{const D=new AbortController;return m(!0),v(!1),rS(n,D.signal).then(({files:M})=>{D.signal.aborted||(d(M),b(V=>M.some(K=>K.filename===V)?V:""))}).catch(()=>{D.signal.aborted||v(!0)}).finally(()=>{D.signal.aborted||m(!1)}),()=>D.abort()},[n,f]);async function T(D){_(D),S("");try{await af(await fetch(lf(n,D),{cache:"no-store"}),D)}catch{S(D)}finally{_("")}}const L=new Intl.DateTimeFormat(o?"th-TH":"en",{dateStyle:"medium",timeStyle:"short"});return a.jsxs("section",{className:"card p-4 sm:p-6","aria-labelledby":"project-documents-title",children:[a.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-3",children:[a.jsxs("div",{children:[a.jsx("h2",{id:"project-documents-title",className:"text-xl font-bold",children:o?"เอกสาร":"Documents"}),a.jsx("p",{className:"text-sm text-slate-600",children:i})]}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:g,onClick:()=>p(f+1),children:o?"รีเฟรชรายการ":"Refresh list"})]}),g&&a.jsx("p",{role:"status",className:"mt-4",children:o?"กำลังโหลดรายการเอกสาร…":"Loading documents…"}),y&&a.jsx("p",{role:"alert",className:"mt-4 text-red-700",children:o?"โหลดรายการไม่ได้ ตรวจว่า LazyScout เปิดอยู่ แล้วกดรีเฟรชรายการ":"Could not load documents. Check that LazyScout is running and refresh the list."}),!g&&!y&&!c.length&&a.jsxs("div",{className:"my-5 rounded-lg border border-dashed border-slate-300 p-5",children:[a.jsx("strong",{children:o?"ยังไม่มีเอกสารในโปรเจกต์นี้":"No saved documents in this project"}),a.jsx("p",{className:"mt-1 text-sm",children:o?"สั่ง Codex ผ่าน LazyScout MCP ว่า “บันทึกรายงาน QA เป็น Excel” แล้วกดรีเฟรชรายการ":"Ask Codex via LazyScout MCP to “save the QA report as Excel”, then refresh the list."})]}),a.jsx("ul",{className:"mt-4 divide-y divide-slate-200",children:c.map(D=>{const{filename:M}=D,V=M.split(".").at(-1)?.toUpperCase(),K=M.endsWith("-bug-draft.md")?o?"ร่างรายงานบั๊ก":"Bug report draft":/-test-cases\.(xlsx|csv|md)$/.test(M)?o?"ชุดเคสทดสอบ":"Test case export":M==="quality-report-print.html"?o?"รายงานคุณภาพสำหรับพิมพ์":"Printable quality report":M==="quality-report.html"?o?"รายงานคุณภาพ":"Quality report":M.startsWith("qa-")?o?"รายงาน QA":"QA report":M,ae=M===w;return a.jsxs("li",{className:"py-3",children:[a.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[a.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[a.jsx("span",{className:"rounded-md border border-slate-200 px-2 py-2 font-mono text-xs font-semibold",children:V}),a.jsxs("div",{className:"min-w-0",children:[a.jsx("strong",{children:K}),a.jsxs("p",{className:"text-xs text-slate-600",children:[a.jsx("time",{dateTime:D.modifiedAt,children:L.format(new Date(D.modifiedAt))})," ·"," ",D.size<1024?D.size+" B":Math.ceil(D.size/1024).toLocaleString(l)+" KB"]}),M!==K&&a.jsx("p",{className:"break-all font-mono text-xs text-slate-500",children:M})]})]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsxs("button",{type:"button",className:"btn btn-secondary","aria-expanded":ae,onClick:()=>b(ae?"":M),children:[a.jsx(Mt,{name:"eye"}),ae?o?"ปิดตัวอย่าง":"Close preview":o?"ดูตัวอย่าง":"Preview"]}),a.jsx("button",{type:"button",className:"btn btn-primary",disabled:!!E,onClick:()=>{T(M)},children:E===M?o?"กำลังดาวน์โหลด…":"Downloading…":o?"ดาวน์โหลด":"Download"})]})]}),O===M&&a.jsx("p",{role:"alert",className:"mt-2 text-red-700",children:o?"ดาวน์โหลดไม่สำเร็จ ลองรีเฟรชรายการแล้วกดดาวน์โหลดอีกครั้ง":"Download failed. Refresh the list and try again."}),ae&&a.jsx(u1,{file:D,projectId:n},M+D.modifiedAt)]},M)})})]})}function ld({message:n,hint:i}){const{ui:l}=Le();return a.jsxs("div",{role:"alert",className:"rounded-lg border border-red-200 bg-red-50 p-4",children:[a.jsx("p",{className:"text-sm font-semibold text-red-700",children:l(n)}),i&&a.jsx("p",{className:"mt-1 text-sm text-red-600",children:l(i)})]})}function f1({result:n,activeUrl:i,onSelect:l}){const{ui:o}=Le(),[c,d]=z.useState(!1),{language:f}=Le(),p=n.pages.reduce((g,m)=>{const y=new URL(m.finalUrl).pathname||"/";return(g[y]??=[]).push(m),g},{});return a.jsxs("aside",{className:`workspace-panel workspace-tree ${c?"is-collapsed":""}`,children:[a.jsxs("div",{className:"workspace-panel-head",children:[a.jsx("button",{type:"button",className:"tree-panel-toggle",onClick:()=>d(g=>!g),"aria-label":c?f==="th"?"ขยาย Explorer":"Expand Explorer":f==="th"?"พับ Explorer":"Collapse Explorer",title:c?f==="th"?"ขยาย Explorer":"Expand Explorer":f==="th"?"พับ Explorer":"Collapse Explorer",children:c?"›":"‹"}),a.jsxs("div",{className:"tree-panel-heading",children:[a.jsx("p",{className:"eyebrow",children:o("Explorer")}),a.jsx("h2",{children:o("State Tree")})]}),a.jsx("span",{className:"status-dot status-pass",title:o("scan complete")})]}),!c&&a.jsxs("div",{className:"tree-meta",children:[a.jsxs("span",{children:[n.pages.length," ",o("pages")]}),a.jsxs("span",{children:[n.actionGraph.states.length," ",o("states")]})]}),!c&&a.jsx("div",{className:"tree-list",children:Object.entries(p).map(([g,m])=>a.jsxs("div",{className:"tree-branch",children:[a.jsxs("div",{className:"tree-path",children:[a.jsx("span",{className:"tree-chevron",children:"⌄"}),a.jsx("span",{className:"tree-folder",children:"●"}),g]}),m.map(y=>a.jsxs("button",{type:"button",onClick:()=>l(y.finalUrl),className:`tree-node ${i===y.finalUrl?"is-active":""}`,children:[a.jsx("span",{className:"tree-node-icon",children:y.state?.visibleDialogs.length?"◈":"◇"}),a.jsx("span",{className:"truncate",children:y.state?.visibleDialogs[0]??(y.title||"Untitled page")}),a.jsx("span",{className:"tree-node-count",children:y.buttons.length})]},y.state?.id??y.finalUrl))]},g))}),!c&&a.jsxs("div",{className:"tree-footer",children:[a.jsx("span",{className:"status-dot status-pass"})," ",o("Safe exploration only"),a.jsx("br",{}),a.jsx("span",{className:"status-dot status-warn"})," ",o("Destructive actions blocked")]})]})}const h1={rules:{label:"No AI / rules",tier:"local",key:"none"},ollama:{label:"Ollama",tier:"local",key:"none",baseUrl:"http://localhost:11434"},"lm-studio":{label:"LM Studio",tier:"local",key:"optional",baseUrl:"http://localhost:1234/v1"},codex:{label:"ChatGPT / Codex (sign in)",tier:"cloud",key:"none"},gemini:{label:"Google Gemini",tier:"free-tier",key:"required",baseUrl:"https://generativelanguage.googleapis.com/v1beta/openai",keyEnv:"GEMINI_API_KEY",keyUrl:"https://aistudio.google.com/app/apikey"},groq:{label:"Groq",tier:"free-tier",key:"required",baseUrl:"https://api.groq.com/openai/v1",keyEnv:"GROQ_API_KEY",keyUrl:"https://console.groq.com/keys"},"openrouter-free":{label:"OpenRouter Free",tier:"free-tier",key:"required",baseUrl:"https://openrouter.ai/api/v1",keyEnv:"OPENROUTER_API_KEY",defaultModel:"openrouter/free",keyUrl:"https://openrouter.ai/keys"},openai:{label:"OpenAI",tier:"cloud",key:"required",baseUrl:"https://api.openai.com/v1",keyEnv:"OPENAI_API_KEY",keyUrl:"https://platform.openai.com/api-keys"},anthropic:{label:"Anthropic Claude",tier:"cloud",key:"required",baseUrl:"https://api.anthropic.com/v1",keyEnv:"ANTHROPIC_API_KEY",keyUrl:"https://platform.claude.com/settings/keys"},openrouter:{label:"OpenRouter (all models)",tier:"cloud",key:"required",baseUrl:"https://openrouter.ai/api/v1",keyEnv:"OPENROUTER_API_KEY",keyUrl:"https://openrouter.ai/keys"},deepseek:{label:"DeepSeek",tier:"cloud",key:"required",baseUrl:"https://api.deepseek.com",keyEnv:"DEEPSEEK_API_KEY",keyUrl:"https://platform.deepseek.com/api_keys"},mistral:{label:"Mistral AI",tier:"cloud",key:"required",baseUrl:"https://api.mistral.ai/v1",keyEnv:"MISTRAL_API_KEY",keyUrl:"https://console.mistral.ai/api-keys/"},xai:{label:"xAI Grok",tier:"cloud",key:"required",baseUrl:"https://api.x.ai/v1",keyEnv:"XAI_API_KEY",keyUrl:"https://console.x.ai/"},compatible:{label:"Custom OpenAI-compatible",tier:"custom",key:"optional"}},_o=h1;function p1(n){return typeof n=="string"&&Object.hasOwn(_o,n)}const _y=["password","passwd","token","access_token","refresh_token","api_key","apikey","authorization","cookie","set-cookie","secret","client_secret","session","sessionid"];_y.map(n=>n.replace("-","[-_]?").replace("_","[-_]?")).join("|");_y.filter(n=>n!=="authorization").map(n=>n.replace("-","[-_]?").replace("_","[-_]?")).join("|");const Ty=["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","ลบ","ชำระเงิน","จ่าย","โอน","ซื้อ","สั่งซื้อ","ยืนยันการชำระ"],m1=100,g1=80;function Ey(n){if(!Array.isArray(n))return[];const i=n.filter(l=>typeof l=="string").map(l=>l.trim().toLowerCase().slice(0,g1)).filter(Boolean);return[...new Set(i)].slice(0,m1)}function Ur(n){const i=n.name||n.label||n.text||n.placeholder;return i&&n.role?`${n.role} "${i}"`:i?`"${i}"`:n.cssSelector?`element (${n.cssSelector})`:"element"}function Ei(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 v1(n){return n.map((i,l)=>`${l+1}. ${Ei(i)}`).join(`
|
|
26
|
+
`)}function Jd(n,i){return`TC-${n}-${String(i).padStart(3,"0")}`}function Wd(n,i){return`TD-${n}-${String(i).padStart(3,"0")}`}function y1(n="MANUAL",i=Wd("MANUAL",1),l=""){return{id:i,module:n,sourceUrl:l,field:"",inputType:"text",required:!1,validValue:"",invalidValue:""}}function b1(n="MANUAL",i=Jd("MANUAL",1),l=""){return{id:i,module:n,title:"New test case",preconditions:[],steps:[],expectedResult:"",type:"positive",priority:"medium",automationStatus:"manual",status:"pending",sourceUrl:l}}const x1={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"},S1={high:"bg-red-100 text-red-800",medium:"bg-blue-100 text-blue-800",low:"bg-slate-100 text-slate-700"},j1={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 w1({value:n}){const{ui:i}=Le();return a.jsx("span",{className:`badge ${x1[n]}`,children:i(n)})}function N1({value:n}){const{ui:i}=Le();return a.jsx("span",{className:`badge ${S1[n]}`,children:i(n)})}function C1({value:n}){const{ui:i}=Le();return a.jsx("span",{className:`badge ${j1[n]}`,children:i(n)})}function _1({testCase:n,onEdit:i,onClose:l}){const{ui:o}=Le();return a.jsx("div",{className:"modern-modal-backdrop",onMouseDown:c=>c.target===c.currentTarget&&l(),children:a.jsxs("section",{className:"modern-modal test-detail-modal",role:"dialog","aria-modal":"true","aria-labelledby":"test-case-detail-title",children:[a.jsxs("header",{className:"modal-header",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:o("Test Case detail")}),a.jsx("h2",{id:"test-case-detail-title",children:n.id}),a.jsx("p",{children:n.title})]}),a.jsx("button",{type:"button",className:"icon-btn",onClick:l,"aria-label":o("Close"),children:"×"})]}),a.jsxs("div",{className:"test-detail-body",children:[a.jsxs("div",{className:"test-detail-meta",children:[a.jsx(w1,{value:n.type}),a.jsx(N1,{value:n.priority}),a.jsx(C1,{value:n.automationStatus}),a.jsx("span",{className:"badge bg-slate-100 text-slate-600",children:n.folder??n.module})]}),(n.tags?.length||n.requirements?.length)&&a.jsxs("section",{className:"traceability-meta",children:[n.tags?.length?a.jsxs("div",{children:[a.jsx("h4",{className:"field-label",children:o("Tags")}),n.tags.map(c=>a.jsx("span",{className:"tag-chip",children:c},c))]}):null,n.requirements?.length?a.jsxs("div",{children:[a.jsx("h4",{className:"field-label",children:o("Requirements / Tickets")}),n.requirements.map(c=>a.jsx("span",{className:"requirement-chip",children:c},c))]}):null]}),a.jsxs("section",{children:[a.jsx("h4",{className:"field-label",children:o("Preconditions")}),n.preconditions.length===0?a.jsx("p",{className:"text-sm text-slate-400",children:"—"}):a.jsx("ul",{className:"list-inside list-disc space-y-1 text-sm text-slate-700",children:n.preconditions.map((c,d)=>a.jsx("li",{children:c},d))})]}),a.jsxs("section",{children:[a.jsx("h4",{className:"field-label",children:o("Steps")}),n.steps.length===0?a.jsx("p",{className:"text-sm text-slate-400",children:"—"}):a.jsx("ol",{className:"space-y-2 text-sm text-slate-700",children:n.steps.map((c,d)=>a.jsxs("li",{className:"test-detail-step",children:[a.jsx("span",{children:d+1}),a.jsxs("div",{children:[Ei(c),a.jsxs("small",{children:["[",o(c.type),"]"]})]})]},d))})]}),a.jsxs("section",{children:[a.jsx("h4",{className:"field-label",children:o("Expected Result")}),a.jsx("p",{className:"text-sm text-slate-700",children:n.expectedResult||"—"})]}),n.notes&&a.jsxs("section",{children:[a.jsx("h4",{className:"field-label",children:o("Notes from Generator")}),a.jsx("p",{className:"text-sm text-slate-500",children:n.notes})]}),a.jsxs("section",{children:[a.jsx("h4",{className:"field-label",children:o("Source URL")}),a.jsx("p",{className:"break-all text-xs text-slate-500",children:n.sourceUrl})]})]}),a.jsxs("footer",{className:"modal-footer",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:l,children:o("Close")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:i,children:o("Edit Test Case")})]})]})})}function T1({testCase:n,onSave:i,onCancel:l}){const{ui:o}=Le(),[c,d]=z.useState({...n}),[f,p]=z.useState(n.preconditions.join(`
|
|
27
|
+
`)),[g,m]=z.useState((n.tags??[]).join(", ")),[y,v]=z.useState((n.requirements??[]).join(", "));z.useEffect(()=>{function S(T){T.key==="Escape"&&l()}return document.addEventListener("keydown",S),document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",S),document.body.style.overflow=""}},[l]);function w(S){d(T=>({...T,...S}))}function b(S,T){d(L=>({...L,steps:L.steps.map((D,M)=>M===S?{...D,description:T}:D)}))}function E(S){d(T=>({...T,steps:T.steps.filter((L,D)=>D!==S)}))}function _(){d(S=>({...S,steps:[...S.steps,{type:"manual",description:"New step"}]}))}function O(){i({...c,preconditions:f.split(`
|
|
28
|
+
`).map(S=>S.trim()).filter(Boolean),tags:Ig(g),requirements:Ig(y)})}return a.jsx("div",{className:"modern-modal-backdrop",onMouseDown:S=>S.target===S.currentTarget&&l(),children:a.jsxs("div",{className:"modern-modal test-case-editor-modal",children:[a.jsxs("div",{className:"card-title flex shrink-0 items-center justify-between",children:[a.jsxs("span",{children:[o("Edit")," ",c.id]}),a.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:l,"aria-label":o("Close editor"),children:"✕"})]}),a.jsxs("div",{className:"test-case-editor-body",children:[a.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[a.jsxs("div",{children:[a.jsx("label",{className:"field-label",htmlFor:"edit-module",children:o("Module")}),a.jsx("input",{id:"edit-module",className:"field",value:c.module,onChange:S=>w({module:S.target.value})})]}),a.jsxs("div",{children:[a.jsx("label",{className:"field-label",htmlFor:"edit-id",children:o("TC ID")}),a.jsx("input",{id:"edit-id",className:"field font-mono",value:c.id,onChange:S=>w({id:S.target.value})})]}),a.jsxs("div",{children:[a.jsx("label",{className:"field-label",htmlFor:"edit-folder",children:o("Folder")}),a.jsx("input",{id:"edit-folder",className:"field",value:c.folder??c.module,onChange:S=>w({folder:S.target.value})})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"field-label",htmlFor:"edit-title",children:o("Title")}),a.jsx("input",{id:"edit-title",className:"field",value:c.title,onChange:S=>w({title:S.target.value})})]}),a.jsxs("div",{className:"grid gap-3 md:grid-cols-3",children:[a.jsxs("div",{children:[a.jsx("label",{className:"field-label",htmlFor:"edit-type",children:o("Type")}),a.jsxs("select",{id:"edit-type",className:"field",value:c.type,onChange:S=>w({type:S.target.value}),children:[a.jsx("option",{value:"positive",children:o("positive")}),a.jsx("option",{value:"negative",children:o("negative")}),a.jsx("option",{value:"validation",children:o("validation")})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"field-label",htmlFor:"edit-priority",children:o("Priority")}),a.jsxs("select",{id:"edit-priority",className:"field",value:c.priority,onChange:S=>w({priority:S.target.value}),children:[a.jsx("option",{value:"high",children:o("high")}),a.jsx("option",{value:"medium",children:o("medium")}),a.jsx("option",{value:"low",children:o("low")})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"field-label",htmlFor:"edit-automation",children:o("Automation Status")}),a.jsxs("select",{id:"edit-automation",className:"field",value:c.automationStatus,onChange:S=>w({automationStatus:S.target.value}),children:[a.jsx("option",{value:"ready",children:o("ready")}),a.jsx("option",{value:"needs-data",children:o("needs-data")}),a.jsx("option",{value:"needs-review",children:o("needs-review")}),a.jsx("option",{value:"manual",children:o("manual")})]})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"field-label",htmlFor:"edit-preconditions",children:o("Preconditions (one per line)")}),a.jsx("textarea",{id:"edit-preconditions",className:"field h-20",value:f,onChange:S=>p(S.target.value)})]}),a.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[a.jsxs("div",{children:[a.jsx("label",{className:"field-label",htmlFor:"edit-tags",children:o("Tags (comma separated)")}),a.jsx("input",{id:"edit-tags",className:"field",value:g,onChange:S=>m(S.target.value),placeholder:"smoke, regression, critical"})]}),a.jsxs("div",{children:[a.jsx("label",{className:"field-label",htmlFor:"edit-requirements",children:o("Requirements / Tickets")}),a.jsx("textarea",{id:"edit-requirements",className:"field min-h-10 resize-y leading-5",value:y,onChange:S=>v(S.target.value),placeholder:"JIRA-123, https://tracker.example/456",rows:2})]})]}),a.jsxs("div",{children:[a.jsxs("div",{className:"mb-1 flex items-center justify-between",children:[a.jsx("span",{className:"field-label mb-0",children:o("Steps")}),a.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:_,children:o("+ Add step")})]}),a.jsxs("div",{className:"space-y-2",children:[c.steps.map((S,T)=>a.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[a.jsxs("span",{className:"w-5 text-xs text-slate-400",children:[T+1,"."]}),a.jsx("input",{className:"field min-w-0",value:Ei(S),onChange:L=>b(T,L.target.value)}),a.jsx("span",{className:"w-24 shrink-0 font-mono text-xs text-slate-400",children:o(S.type)}),a.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>E(T),children:o("Delete")})]},T)),c.steps.length===0&&a.jsx("p",{className:"text-sm text-slate-400",children:o("No steps yet.")})]})]}),a.jsxs("div",{children:[a.jsx("label",{className:"field-label",htmlFor:"edit-expected",children:o("Expected Result")}),a.jsx("textarea",{id:"edit-expected",className:"field h-20",value:c.expectedResult,onChange:S=>w({expectedResult:S.target.value})})]})]}),a.jsxs("div",{className:"test-case-editor-footer",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:l,children:o("Cancel")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:O,children:o("Save")})]})]})})}function Ig(n){return n.split(/[,;\n]/).map(i=>i.trim()).filter(Boolean)}function yi({value:n,editValue:i=n,options:l,multiline:o=!1,onSave:c}){const{ui:d,language:f}=Le(),[p,g]=z.useState(!1),[m,y]=z.useState(i);if(z.useEffect(()=>{p||y(i)},[p,i]),!p)return a.jsxs("span",{className:"inline-edit-shell",children:[a.jsx("span",{className:"inline-edit-value",title:f==="th"?"ดับเบิลคลิกเพื่อแก้ไข":"Double-click to edit",onDoubleClick:()=>g(!0),children:(l?d(n):n)||"—"}),a.jsx("button",{type:"button",onClick:()=>g(!0),"aria-label":f==="th"?"แก้ไขค่า":"Edit value",title:f==="th"?"แก้ไข":"Edit",children:"✎"})]});const v=()=>{g(!1),m!==i&&c(m)},w={autoFocus:!0,value:m,onChange:b=>y(b.target.value),onBlur:v,onKeyDown:b=>{b.key==="Enter"&&v(),b.key==="Escape"&&(y(i),g(!1))},onClick:b=>b.stopPropagation()};return o&&!l?a.jsx("textarea",{...w,className:"inline-edit-textarea",rows:5}):l?a.jsx("select",{...w,className:"inline-edit-input",children:l.map(b=>a.jsx("option",{value:b,children:d(b)},b))}):a.jsx("input",{...w,className:"inline-edit-input"})}function ws({value:n,onSave:i}){const{ui:l,language:o}=Le(),[c,d]=z.useState(!1),[f,p]=z.useState(n),g=z.useRef(null),m=z.useRef(null);if(z.useEffect(()=>{c||p(n)},[c,n]),!c)return a.jsxs("span",{className:"inline-edit-shell",children:[a.jsx("span",{className:"inline-edit-value",title:o==="th"?"ดับเบิลคลิกเพื่อแก้ไข":"Double-click to edit",onDoubleClick:()=>d(!0),dangerouslySetInnerHTML:{__html:n||"—"}}),a.jsx("button",{type:"button",onClick:()=>d(!0),"aria-label":o==="th"?"แก้ไขค่า":"Edit value",title:o==="th"?"แก้ไข":"Edit",children:"✎"})]});const y=()=>{const E=window.getSelection();E?.rangeCount&&(g.current=E.getRangeAt(0).cloneRange())},v=()=>{const E=window.getSelection();g.current&&E&&(E.removeAllRanges(),E.addRange(g.current))},w=(E,_)=>{v(),document.execCommand(E,!1,_),m.current?.focus(),y()},b=E=>{p(E.innerHTML),d(!1),i(E.innerHTML)};return a.jsxs("div",{className:"rich-text-editor",onClick:E=>E.stopPropagation(),children:[a.jsxs("div",{className:"rich-text-toolbar",children:[a.jsx("button",{type:"button",onMouseDown:()=>y(),onClick:()=>w("bold"),children:"B"}),a.jsx("button",{type:"button",onMouseDown:()=>y(),onClick:()=>w("italic"),children:"I"}),a.jsx("input",{type:"color",defaultValue:"#1e293b",onMouseDown:()=>y(),onChange:E=>w("foreColor",E.target.value),"aria-label":l("Text color")}),a.jsxs("select",{defaultValue:"3",onMouseDown:()=>y(),onChange:E=>w("fontSize",E.target.value),"aria-label":l("Text size"),children:[a.jsx("option",{value:"2",children:l("Small")}),a.jsx("option",{value:"3",children:l("Normal")}),a.jsx("option",{value:"5",children:l("Large")}),a.jsx("option",{value:"7",children:l("Huge")})]})]}),a.jsx("div",{className:"rich-text-content",ref:m,contentEditable:!0,suppressContentEditableWarning:!0,dangerouslySetInnerHTML:{__html:f},onBlur:E=>{E.relatedTarget&&m.current?.parentElement?.contains(E.relatedTarget)||b(E.currentTarget)},onMouseUp:y,onKeyUp:y,onKeyDown:E=>{E.key==="Escape"&&(p(n),d(!1))}})]})}function E1({testCases:n,selectedIds:i,activeId:l,onToggleSelect:o,onToggleAll:c,onOpen:d,onEdit:f,onDelete:p,onReorder:g,onUpdateCell:m,executionStatuses:y={}}){const{ui:v,language:w}=Le(),b=w==="th",[E,_]=z.useState(),[O,S]=z.useState(),[T,L]=z.useState(),[D,M]=z.useState("basic"),[V,K]=z.useState({}),ae=z.useRef(null),I=n.length>0&&n.every($=>i.includes($.id));return z.useEffect(()=>{function $(B){ae.current&&!ae.current.contains(B.target)&&L(void 0)}function ee(B){B.key==="Escape"&&L(void 0)}return document.addEventListener("pointerdown",$),document.addEventListener("keydown",ee),()=>{document.removeEventListener("pointerdown",$),document.removeEventListener("keydown",ee)}},[]),n.length===0?a.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:b?"ไม่พบ Test Case ที่ตรงกับตัวกรอง":"No Test Cases match the current filters."}):a.jsxs("div",{className:`test-case-table-wrap table-view-${D}`,children:[a.jsxs("div",{className:"test-case-view-bar",children:[a.jsxs("div",{children:[a.jsx("b",{children:b?"คอลัมน์ตาราง":"Table columns"}),a.jsx("span",{children:b?"เริ่มจากข้อมูลพื้นฐาน แล้วแสดงรายละเอียดเมื่อจำเป็น":"Start simple, then show more detail only when you need it."})]}),a.jsxs("div",{role:"group","aria-label":v("Test Case table columns"),children:[a.jsx("button",{type:"button",className:D==="basic"?"is-active":"",onClick:()=>M("basic"),children:b?"พื้นฐาน":"Basic"}),a.jsx("button",{type:"button",className:D==="tester"?"is-active":"",onClick:()=>M("tester"),children:v("Tester")}),a.jsx("button",{type:"button",className:D==="all"?"is-active":"",onClick:()=>M("all"),children:b?"ทุกคอลัมน์":"All columns"})]})]}),a.jsx("div",{className:"test-case-table-scroll border border-slate-200",children:a.jsxs("table",{className:"test-case-table border-collapse",children:[a.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:a.jsxs("tr",{children:[a.jsx("th",{className:"table-head w-10",children:b?"ย้าย":"Move"}),a.jsx("th",{className:"table-head w-10",children:a.jsx("input",{type:"checkbox",checked:I,onChange:()=>c(I?[]:n.map($=>$.id)),"aria-label":v("Select all")})}),a.jsx("th",{className:"table-head w-32",children:v("TC ID")}),a.jsx("th",{className:"table-head w-28",children:v("Folder")}),a.jsx("th",{className:"table-head",children:b?"ชื่อ":"Title"}),a.jsx("th",{className:"table-head w-24 col-tester",children:v("Type")}),a.jsx("th",{className:"table-head w-24",children:v("Priority")}),a.jsx("th",{className:"table-head w-56 col-tester",children:b?"ขั้นตอน":"Steps"}),a.jsx("th",{className:"table-head col-tester",children:v("Expected Result")}),a.jsx("th",{className:"table-head w-32",children:v("Automation")}),a.jsx("th",{className:"table-head w-48 col-all",children:v("Preconditions")}),a.jsx("th",{className:"table-head w-48 col-all",children:v("Notes")}),a.jsx("th",{className:"table-head w-40 col-tester",children:v("Tags")}),a.jsx("th",{className:"table-head w-32",children:v("Status")}),a.jsx("th",{className:"table-head w-28 text-center",children:b?"จัดการ":"Actions"})]})}),a.jsx("tbody",{children:n.map($=>a.jsxs("tr",{onDragOver:ee=>{ee.preventDefault(),S($.id)},onDrop:ee=>{ee.preventDefault(),E&&g(E,$.id),_(void 0),S(void 0)},onDragEnd:()=>{_(void 0),S(void 0)},className:`border-b border-slate-100 hover:bg-blue-50 ${O===$.id?"bg-indigo-50 ring-2 ring-inset ring-indigo-300":""} ${l===$.id?"bg-blue-50":""}`,children:[a.jsx("td",{className:"table-cell drag-handle",draggable:!0,onDragStart:()=>_($.id),onClick:ee=>ee.stopPropagation(),title:v("Drag to reorder"),children:"⠿"}),a.jsx("td",{className:"table-cell",onClick:ee=>ee.stopPropagation(),children:a.jsx("input",{type:"checkbox",checked:i.includes($.id),onChange:()=>o($.id),"aria-label":`Select ${$.id}`})}),a.jsx("td",{className:"table-cell font-mono text-xs",children:$.id}),a.jsx("td",{className:"table-cell",children:a.jsx(yi,{value:$.folder??$.module,onSave:ee=>m($.id,"folder",ee)})}),a.jsxs("td",{className:"table-cell font-medium text-slate-900",children:[a.jsx(ws,{value:$.title,onSave:ee=>m($.id,"title",ee)}),($.tags?.length||$.requirements?.length)&&a.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[$.tags?.slice(0,3).map(ee=>a.jsx("span",{className:"tag-chip",children:ee},ee)),$.requirements?.slice(0,2).map(ee=>a.jsx("span",{className:"requirement-chip",children:ee},ee))]})]}),a.jsx("td",{className:"table-cell col-tester",children:a.jsx(yi,{value:$.type,options:["positive","negative","validation"],onSave:ee=>m($.id,"type",ee)})}),a.jsx("td",{className:"table-cell",children:a.jsx(yi,{value:$.priority,options:["high","medium","low"],onSave:ee=>m($.id,"priority",ee)})}),a.jsxs("td",{className:"table-cell min-w-56 col-tester",children:[a.jsx(ws,{value:$.steps.map((ee,B)=>`${B+1}. ${Ei(ee)}`).join(`
|
|
29
|
+
`),onSave:ee=>m($.id,"steps",ee)}),a.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:ee=>{ee.stopPropagation(),d($)},children:b?"ดูขั้นตอน":"View Steps"})]}),a.jsx("td",{className:"table-cell max-w-md text-slate-600 col-tester",children:a.jsx(ws,{value:$.expectedResult,onSave:ee=>m($.id,"expectedResult",ee)})}),a.jsx("td",{className:"table-cell",children:a.jsx(yi,{value:$.automationStatus,options:["ready","needs-data","needs-review","manual"],onSave:ee=>m($.id,"automationStatus",ee)})}),a.jsx("td",{className:"table-cell min-w-48 col-all",children:a.jsx(ws,{value:$.preconditions.join(`
|
|
30
|
+
`),onSave:ee=>m($.id,"preconditions",ee)})}),a.jsx("td",{className:"table-cell min-w-48 col-all",children:a.jsx(ws,{value:$.notes??"",onSave:ee=>m($.id,"notes",ee)})}),a.jsx("td",{className:"table-cell min-w-40 col-tester",children:a.jsx(yi,{value:($.tags??[]).join(", "),onSave:ee=>m($.id,"tags",ee)})}),a.jsx("td",{className:"table-cell",children:a.jsx(yi,{value:V[$.id]??y[$.id]??$.status??"pending",options:["pending","passed","failed"],onSave:ee=>{const B=ee;K(Q=>({...Q,[$.id]:B})),m($.id,"status",B)}})}),a.jsx("td",{className:"table-cell text-center",onClick:ee=>ee.stopPropagation(),children:a.jsxs("div",{className:"action-menu-wrap",ref:T===$.id?ae:void 0,children:[a.jsx("button",{type:"button",className:"action-menu-trigger","aria-label":`Actions for ${$.id}`,"aria-expanded":T===$.id,onClick:()=>L(ee=>ee===$.id?void 0:$.id),children:"⋯"}),T===$.id&&a.jsxs("div",{className:"action-menu",children:[a.jsx("button",{type:"button",onClick:()=>{d($),L(void 0)},children:v("View Test Case")}),a.jsx("button",{type:"button",onClick:()=>{f($),L(void 0)},children:v("Edit")}),a.jsx("button",{type:"button",className:"danger",onClick:()=>{p($.id),L(void 0)},children:v("Delete")})]})]})})]},$.id))})]})})]})}function A1({filters:n,modules:i,totalCount:l,visibleCount:o,selectedCount:c,exporting:d,onFiltersChange:f,onAdd:p,onImportScreenshot:g,onImport:m,onRecord:y,onDeleteSelected:v,onExport:w,onExportExcel:b}){const{ui:E,language:_,t:O}=Le(),S=_==="th",T=L=>f({...n,...L});return a.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[a.jsxs("div",{className:"min-w-56 flex-1",children:[a.jsx("label",{className:"field-label",htmlFor:"search",children:O("search")}),a.jsx("input",{id:"search",className:"field",value:n.search,onChange:L=>T({search:L.target.value}),placeholder:E("Search ID, title, expected result, steps, tags or requirements")})]}),a.jsxs("div",{className:"w-48",children:[a.jsx("label",{className:"field-label",htmlFor:"filter-module",children:E("Folder / Module")}),a.jsx("input",{id:"filter-module",className:"field",list:"module-options",value:n.module==="all"?"":n.module,onChange:L=>T({module:L.target.value||"all"}),placeholder:E("Search or select folder")}),a.jsx("datalist",{id:"module-options",children:i.map(L=>a.jsx("option",{value:L},L))})]}),a.jsxs("div",{className:"w-36",children:[a.jsx("label",{className:"field-label",htmlFor:"filter-type",children:E("Type")}),a.jsxs("select",{id:"filter-type",className:"field",value:n.type,onChange:L=>T({type:L.target.value}),children:[a.jsx("option",{value:"all",children:E("All")}),a.jsx("option",{value:"positive",children:E("positive")}),a.jsx("option",{value:"negative",children:E("negative")}),a.jsx("option",{value:"validation",children:E("validation")})]})]}),a.jsxs("div",{className:"w-36",children:[a.jsx("label",{className:"field-label",htmlFor:"filter-priority",children:E("Priority")}),a.jsxs("select",{id:"filter-priority",className:"field",value:n.priority,onChange:L=>T({priority:L.target.value}),children:[a.jsx("option",{value:"all",children:E("All")}),a.jsx("option",{value:"high",children:E("high")}),a.jsx("option",{value:"medium",children:E("medium")}),a.jsx("option",{value:"low",children:E("low")})]})]}),a.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[a.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:p,children:["+ ",O("addCase")]}),a.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:m,children:["⇧ ",S?"นำเข้า":"Import"]}),a.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:g,children:["▣ ",O("screenshot")]}),a.jsxs("button",{type:"button",className:"btn btn-secondary",onClick:y,children:["● ",S?"บันทึกขั้นตอน":"Record Flow"]}),a.jsxs("button",{type:"button",className:"btn btn-danger",onClick:v,disabled:c===0,children:[O("delete")," (",c,")"]}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:w,disabled:d,children:d?S?"กำลังส่งออก…":"Exporting…":O("export")}),b&&a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:b,disabled:d,children:S?"Excel ทั้งโปรเจกต์":"Project Excel"})]}),a.jsxs("p",{className:"w-full text-xs text-slate-500",children:[S?"แสดง":"Showing"," ",o," ",S?"จาก":"of"," ",l," ",E("Test Cases"),c>0&&` · ${c} ${S?"รายการที่เลือก":"selected"}`]})]})}function O1({testCases:n}){const{ui:i}=Le(),l=z.useMemo(()=>{const d=new Map;for(const f of n)for(const p of f.requirements??[])d.set(p,[...d.get(p)??[],f]);return[...d.entries()].sort(([f],[p])=>f.localeCompare(p))},[n]),o=n.filter(d=>(d.requirements?.length??0)>0).length,c=n.length-o;return n.length?a.jsxs("section",{className:"traceability-summary",children:[a.jsxs("div",{className:"traceability-summary-head",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:i("Requirements traceability")}),a.jsx("h3",{children:i("Coverage at a glance")})]}),a.jsxs("span",{children:[l.length," ",i("requirements")]})]}),a.jsxs("div",{className:"traceability-kpis",children:[a.jsxs("div",{children:[a.jsx("b",{children:o}),a.jsx("span",{children:i("Linked cases")})]}),a.jsxs("div",{children:[a.jsx("b",{children:c}),a.jsx("span",{children:i("Without requirement")})]}),a.jsxs("div",{children:[a.jsxs("b",{children:[l.length?Math.round(o/n.length*100):0,"%"]}),a.jsx("span",{children:i("Case coverage")})]})]}),l.length?a.jsxs("div",{className:"traceability-list",children:[l.slice(0,8).map(([d,f])=>a.jsxs("div",{children:[a.jsx("span",{title:d,children:d}),a.jsxs("b",{children:[f.length," ",i("case"),f.length===1?"":"s"]})]},d)),l.length>8&&a.jsxs("small",{children:["+ ",l.length-8," ",i("more requirements")]})]}):a.jsx("p",{className:"traceability-empty",children:i("Add a Jira ID, GitLab issue or merge request URL, ticket, or requirement URL to a Test Case to track coverage here.")})]}):null}function k1({rows:n,onUpdate:i,onDelete:l}){const{ui:o}=Le();return n.length===0?a.jsx("p",{className:"p-6 text-center text-sm text-slate-500",children:o("No Test Data matches the current filters.")}):a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"w-full border-collapse",children:[a.jsx("thead",{className:"border-b border-slate-200 bg-slate-50",children:a.jsxs("tr",{children:[a.jsx("th",{className:"table-head w-32",children:o("TD ID")}),a.jsx("th",{className:"table-head w-28",children:o("Module")}),a.jsx("th",{className:"table-head w-44",children:o("Field")}),a.jsx("th",{className:"table-head w-28",children:o("Input Type")}),a.jsx("th",{className:"table-head w-20",children:o("Required")}),a.jsx("th",{className:"table-head",children:o("Valid Value")}),a.jsx("th",{className:"table-head",children:o("Invalid Value")}),a.jsx("th",{className:"table-head",children:o("Note")}),a.jsx("th",{className:"table-head w-20",children:o("Actions")})]})}),a.jsx("tbody",{children:n.map(c=>a.jsxs("tr",{className:"border-b border-slate-100 hover:bg-slate-50",children:[a.jsx("td",{className:"table-cell font-mono text-xs",children:c.id}),a.jsx("td",{className:"table-cell",children:c.module}),a.jsx("td",{className:"table-cell",children:a.jsx("input",{className:"field px-2 py-1",value:c.field,onChange:d=>i(c.id,{...c,field:d.target.value}),"aria-label":`Field for ${c.id}`})}),a.jsx("td",{className:"table-cell font-mono text-xs text-slate-500",children:c.inputType}),a.jsx("td",{className:"table-cell text-center",children:a.jsx("input",{type:"checkbox",checked:c.required,onChange:d=>i(c.id,{...c,required:d.target.checked}),"aria-label":`Required for ${c.id}`})}),a.jsx("td",{className:"table-cell",children:a.jsx("input",{className:"field px-2 py-1",value:c.validValue,onChange:d=>i(c.id,{...c,validValue:d.target.value}),"aria-label":`Valid value for ${c.id}`})}),a.jsx("td",{className:"table-cell",children:a.jsx("input",{className:"field px-2 py-1",value:c.invalidValue,onChange:d=>i(c.id,{...c,invalidValue:d.target.value}),"aria-label":`Invalid value for ${c.id}`})}),a.jsx("td",{className:"table-cell",children:a.jsx("input",{className:"field px-2 py-1",value:c.note??"",onChange:d=>i(c.id,{...c,note:d.target.value}),"aria-label":`Note for ${c.id}`})}),a.jsx("td",{className:"table-cell",children:a.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>l(c.id),children:o("Delete")})})]},c.id))})]})})}function R1({search:n,module:i,modules:l,totalCount:o,visibleCount:c,exporting:d,onSearchChange:f,onModuleChange:p,onAdd:g,onExport:m}){const{ui:y}=Le();return a.jsxs("div",{className:"flex flex-wrap items-end gap-3 border-b border-slate-200 p-4",children:[a.jsxs("div",{className:"min-w-56 flex-1",children:[a.jsx("label",{className:"field-label",htmlFor:"data-search",children:y("Search")}),a.jsx("input",{id:"data-search",className:"field",value:n,onChange:v=>f(v.target.value),placeholder:y("Search field, value or note")})]}),a.jsxs("div",{className:"w-40",children:[a.jsx("label",{className:"field-label",htmlFor:"data-module",children:y("Module")}),a.jsxs("select",{id:"data-module",className:"field",value:i,onChange:v=>p(v.target.value),children:[a.jsx("option",{value:"all",children:y("All")}),l.map(v=>a.jsx("option",{value:v,children:v},v))]})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:g,children:y("+ Add Row")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:m,disabled:d,children:y(d?"Exporting…":"Export CSV")})]}),a.jsxs("p",{className:"w-full text-xs text-slate-500",children:[y("Showing")," ",c," ",y("of")," ",o," ",y("rows · Generated values are examples only. Replace them with real test data before use · CSV export includes Test Cases and Test Data together.")]})]})}const D1=/\bdata-v-[0-9a-f]{6,}\b/i,L1=/\d{4,}/,$g="data-testid";function U1(n){const i=[],l=(o,c)=>{!c||D1.test(c)||i.some(([,d])=>d===c)||i.push([o,c])};return l(...z1(n)),l("id",n.elementId&&!L1.test(n.elementId)?As(I1(n.elementId)):void 0),l("semantic locator",M1(n)),l("name",n.attributeName?As(Ay("name",n.attributeName,n.tagName)):void 0),l("recorded CSS",n.cssSelector?As(Pg(n.cssSelector)):void 0),i.length===0&&l("recorded CSS",As(Pg(n.cssSelector??""))),i}function z1(n){if(!n.testId)return["test id",void 0];const i=n.testIdAttribute??$g;return i===$g?["test id",`page.getByTestId(${Da(n.testId)})`]:[i,As(Ay(i,n.testId))]}function M1(n){const i=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(!i)return;const l=n.contextTestId?`page.getByTestId(${Da(n.contextTestId)})`:n.contextSelector?`page.locator(${Da(n.contextSelector)})`:void 0,o=l?n.contextText?`${l}.filter({ hasText: ${Da(n.contextText)} }).${i.slice(5)}`:`${l}.${i.slice(5)}`:i;return n.nth===void 0?o:`${o}.nth(${n.nth})`}function B1(n){return n.name??n.label??n.placeholder??n.text??n.testId??n.elementId??n.attributeName??n.cssSelector??"target"}function Ay(n,i,l){const o=i.replace(/\\/g,"\\\\").replace(/"/g,'\\"');return`${l?l.toLowerCase():""}[${n}="${o}"]`}function I1(n){return`#${n.replace(/[^\w-]/g,i=>`\\${i}`)}`}function As(n){return`page.locator(${$1(n)})`}function Pg(n){return n.replace(/\\(["'])/g,"$1")}function $1(n){return`'${n.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}const Da=n=>JSON.stringify(n);function qg(n){const i=["import { test, expect } from '@playwright/test'","",...H1(),"",`test(${ra(n.title)}, async ({ page }) => {`];for(const l of n.steps)i.push(` ${G1(l)}`);return i.push("})",""),i.join(`
|
|
31
|
+
`)}const P1=5e3,q1=100;function H1(){return[`async function resolveTarget(page, candidates, description, timeout = ${P1}) {`," 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(${q1})`," } 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 ur(n){const i=U1(n);return`resolveTarget(page, [${(n.strategy==="css"?[...i].sort(([c],[d])=>c==="recorded CSS"?-1:d==="recorded CSS"?1:0):i).map(([c,d])=>`[${ra(c)}, ${d}]`).join(", ")}], ${ra(B1(n))})`}function G1(n){switch(n.type){case"navigate":return`await page.goto(${ra(V1(n.url))})`;case"click":return`await (await ${ur(n.target)}).click()`;case"fill":return`await (await ${ur(n.target)}).fill(${ra(n.value)})`;case"select":return`await (await ${ur(n.target)}).selectOption(${ra(n.option)})`;case"check":return`await (await ${ur(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(${ra(n.value)}))`:n.mode==="text"?`await expect(page).toContainText(${ra(n.value)})`:`await expect(await ${ur(n.target)}).toBeVisible()`;case"assertVisible":return`await expect(await ${ur(n.target)}).toBeVisible()`;case"assertText":return n.target?`await expect(await ${ur(n.target)}).toContainText(${ra(n.text)})`:`await expect(page.locator('body')).toContainText(${ra(n.text)})`;case"assertUrl":return`await expect(page).toHaveURL(new RegExp(${ra(n.urlContains)}))`;case"assertInvalid":return`expect(await (await ${ur(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 ra=n=>JSON.stringify(n);function V1(n){const i=/^\s*\[([^\]]+)\]\(\s*([^)\s]+)\s*\)\s*$/.exec(n);return i?i[2]:n.trim()}function Hg(n){const i=[`describe(${dn(n.module)}, () => {`,` it(${dn(n.title)}, () => {`];for(const l of n.steps)i.push(` ${F1(l)}`);return i.push(" })","})",""),i.join(`
|
|
32
|
+
`)}function dr(n){if(n.cssSelector){const l=`cy.get(${dn(n.cssSelector)})`,o=n.role&&n.name||n.label||n.placeholder||n.text;return n.nth!==void 0&&(n.strategy==="css"||!o)?`${l}.eq(${n.nth})`:l}const i=n.role&&n.name?`cy.contains(${dn(n.role)}, ${dn(n.name)})`:n.label?`cy.get('label').contains(${dn(n.label)}).invoke('attr', 'for').then((id) => cy.get('#' + id))`:n.placeholder?`cy.get(${dn(`[placeholder="${n.placeholder}"]`)})`:n.text?`cy.contains(${dn(n.text)})`:"cy.get('')";return n.nth===void 0?i:`${i}.eq(${n.nth})`}function F1(n){switch(n.type){case"navigate":return`cy.visit(${dn(n.url)})`;case"click":return`${dr(n.target)}.click()`;case"fill":return`${dr(n.target)}.clear().type(${dn(n.value)})`;case"select":return`${dr(n.target)}.select(${dn(n.option)})`;case"check":return`${dr(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', ${dn(n.value)})`:n.mode==="text"?`cy.contains(${dn(n.value)}).should('be.visible')`:`${dr(n.target)}.should('be.visible')`;case"assertVisible":return`${dr(n.target)}.should('be.visible')`;case"assertText":return n.target?`${dr(n.target)}.should('contain.text', ${dn(n.text)})`:`cy.contains(${dn(n.text)}).should('be.visible')`;case"assertUrl":return`cy.url().should('include', ${dn(n.urlContains)})`;case"assertInvalid":return`${dr(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 dn=n=>JSON.stringify(n);function Y1(n){const i=n.steps.map(c=>X1(n,c)),l=n.steps.find(c=>c.type==="assert"),o=l?.type==="assert"&&l.assertion.type==="text"?`The page shows "${l.assertion.value}".`:l?.type==="assert"&&l.assertion.type==="url"?`The URL contains "${l.assertion.value}".`:l?.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:i,expectedResult:o,type:"positive",priority:"medium",automationStatus:i.length?"ready":"needs-review",status:"pending",sourceUrl:n.baseUrl,notes:l?void 0:"Guided Flow has no assertion — expected result needs review."}}function X1(n,i){switch(i.type){case"navigate":return{type:"navigate",url:new URL(i.path,n.baseUrl).toString()};case"click":return{type:"click",target:i.target};case"fill":return{type:"fill",target:i.target,value:i.valueRef?`{{${i.valueRef}}}`:i.value??""};case"select":return{type:"select",target:i.target,option:i.option};case"check":return{type:"check",target:i.target,checked:i.checked};case"wait":return{type:"wait",mode:i.mode,value:i.value,target:i.target};case"assert":return i.assertion.type==="visible"?{type:"assertVisible",target:i.assertion.target}:i.assertion.type==="text"?{type:"assertText",text:i.assertion.value}:{type:"assertUrl",urlContains:i.assertion.value}}}function Z1(n){const i=["import { test, expect } from '@playwright/test'","",`test(${JSON.stringify(n.name)}, async ({ page }) => {`];for(const l of n.steps)i.push(` ${K1(n,l)}`);return i.push("})",""),i.join(`
|
|
33
|
+
`)}function K1(n,i){switch(i.type){case"navigate":return`await page.goto(${JSON.stringify(new URL(i.path,n.baseUrl).toString())})`;case"click":return`await ${bi(i.target)}.click()`;case"fill":return`await ${bi(i.target)}.fill(${JSON.stringify(i.valueRef?`{{${i.valueRef}}}`:i.value??"")})`;case"select":return`await ${bi(i.target)}.selectOption(${JSON.stringify(i.option)})`;case"check":return`await ${bi(i.target)}.${i.checked?"check":"uncheck"}()`;case"wait":return i.mode==="timeout"?`await page.waitForTimeout(${Math.min(5e3,Math.max(0,Number(i.value)||0))})`:i.mode==="url"?`await page.waitForURL(new RegExp(${JSON.stringify(i.value)}))`:i.mode==="text"?`await expect(page).toContainText(${JSON.stringify(i.value)})`:`await expect(${bi(i.target)}).toBeVisible()`;case"assert":return i.assertion.type==="visible"?`await expect(${bi(i.assertion.target)}).toBeVisible()`:i.assertion.type==="text"?`await expect(page.getByText(${JSON.stringify(i.assertion.value)})).toBeVisible()`:`await expect(page).toHaveURL(new RegExp(${JSON.stringify(i.assertion.value)}))`}}function bi(n){if(Q1(n))return`page.locator(${od(Gg(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 i=n.testId??n.value??"";return n.testIdAttribute&&n.testIdAttribute!=="data-testid"?`page.locator(${od(J1(n.testIdAttribute,i))})`:`page.getByTestId(${JSON.stringify(i)})`}return n.strategy==="text"||n.text?`page.getByText(${JSON.stringify(n.text??n.value??"")})`:`page.locator(${od(Gg(n.cssSelector??n.value??""))})`}function Q1(n){return!!(n.cssSelector&&(n.strategy==="css"||n.matchCount!==void 0&&n.matchCount>1&&!n.contextSelector&&!n.contextText))}function J1(n,i){return`[${n}="${i.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"]`}function Gg(n){return n.replace(/\\(["'])/g,"$1")}function od(n){return`'${n.replace(/\\/g,"\\\\").replace(/'/g,"\\'")}'`}function W1(n){const i=[`describe(${JSON.stringify(n.name)}, () => {`,` it(${JSON.stringify(n.name)}, () => {`];for(const l of n.steps)i.push(` ${eN(n,l)}`);return i.push(" })","})",""),i.join(`
|
|
34
|
+
`)}function eN(n,i){switch(i.type){case"navigate":return`cy.visit(${JSON.stringify(new URL(i.path,n.baseUrl).toString())})`;case"click":return`${xi(i.target)}.click()`;case"fill":return`${xi(i.target)}.clear().type(${JSON.stringify(i.valueRef?`{{${i.valueRef}}}`:i.value??"")})`;case"select":return`${xi(i.target)}.select(${JSON.stringify(i.option)})`;case"check":return`${xi(i.target)}.${i.checked?"check":"uncheck"}()`;case"wait":return i.mode==="timeout"?`cy.wait(${Math.min(5e3,Math.max(0,Number(i.value)||0))})`:i.mode==="url"?`cy.url().should('include', ${JSON.stringify(i.value)})`:i.mode==="text"?`cy.contains(${JSON.stringify(i.value)}).should('be.visible')`:`${xi(i.target)}.should('be.visible')`;case"assert":return i.assertion.type==="visible"?`${xi(i.assertion.target)}.should('be.visible')`:i.assertion.type==="text"?`cy.contains(${JSON.stringify(i.assertion.value)}).should('be.visible')`:`cy.url().should('include', ${JSON.stringify(i.assertion.value)})`}}function xi(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??"")})`}function Vg(n,i){(i==null||i>n.length)&&(i=n.length);for(var l=0,o=Array(i);l<i;l++)o[l]=n[l];return o}function tN(n){if(Array.isArray(n))return n}function nN(n,i,l){return(i=cN(i))in n?Object.defineProperty(n,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[i]=l,n}function aN(n,i){var l=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(l!=null){var o,c,d,f,p=[],g=!0,m=!1;try{if(d=(l=l.call(n)).next,i!==0)for(;!(g=(o=d.call(l)).done)&&(p.push(o.value),p.length!==i);g=!0);}catch(y){m=!0,c=y}finally{try{if(!g&&l.return!=null&&(f=l.return(),Object(f)!==f))return}finally{if(m)throw c}}return p}}function rN(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
35
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fg(n,i){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);i&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),l.push.apply(l,o)}return l}function Yg(n){for(var i=1;i<arguments.length;i++){var l=arguments[i]!=null?arguments[i]:{};i%2?Fg(Object(l),!0).forEach(function(o){nN(n,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Fg(Object(l)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(l,o))})}return n}function iN(n,i){if(n==null)return{};var l,o,c=sN(n,i);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(n);for(o=0;o<d.length;o++)l=d[o],i.indexOf(l)===-1&&{}.propertyIsEnumerable.call(n,l)&&(c[l]=n[l])}return c}function sN(n,i){if(n==null)return{};var l={};for(var o in n)if({}.hasOwnProperty.call(n,o)){if(i.indexOf(o)!==-1)continue;l[o]=n[o]}return l}function lN(n,i){return tN(n)||aN(n,i)||uN(n,i)||rN()}function oN(n,i){if(typeof n!="object"||!n)return n;var l=n[Symbol.toPrimitive];if(l!==void 0){var o=l.call(n,i);if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(i==="string"?String:Number)(n)}function cN(n){var i=oN(n,"string");return typeof i=="symbol"?i:i+""}function uN(n,i){if(n){if(typeof n=="string")return Vg(n,i);var l={}.toString.call(n).slice(8,-1);return l==="Object"&&n.constructor&&(l=n.constructor.name),l==="Map"||l==="Set"?Array.from(n):l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l)?Vg(n,i):void 0}}function dN(n,i,l){return i in n?Object.defineProperty(n,i,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[i]=l,n}function Xg(n,i){var l=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);i&&(o=o.filter(function(c){return Object.getOwnPropertyDescriptor(n,c).enumerable})),l.push.apply(l,o)}return l}function Zg(n){for(var i=1;i<arguments.length;i++){var l=arguments[i]!=null?arguments[i]:{};i%2?Xg(Object(l),!0).forEach(function(o){dN(n,o,l[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(l)):Xg(Object(l)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(l,o))})}return n}function fN(){for(var n=arguments.length,i=new Array(n),l=0;l<n;l++)i[l]=arguments[l];return function(o){return i.reduceRight(function(c,d){return d(c)},o)}}function Os(n){return function i(){for(var l=this,o=arguments.length,c=new Array(o),d=0;d<o;d++)c[d]=arguments[d];return c.length>=n.length?n.apply(this,c):function(){for(var f=arguments.length,p=new Array(f),g=0;g<f;g++)p[g]=arguments[g];return i.apply(l,[].concat(c,p))}}}function Do(n){return{}.toString.call(n).includes("Object")}function hN(n){return!Object.keys(n).length}function Ys(n){return typeof n=="function"}function pN(n,i){return Object.prototype.hasOwnProperty.call(n,i)}function mN(n,i){return Do(i)||hr("changeType"),Object.keys(i).some(function(l){return!pN(n,l)})&&hr("changeField"),i}function gN(n){Ys(n)||hr("selectorType")}function vN(n){Ys(n)||Do(n)||hr("handlerType"),Do(n)&&Object.values(n).some(function(i){return!Ys(i)})&&hr("handlersType")}function yN(n){n||hr("initialIsRequired"),Do(n)||hr("initialType"),hN(n)&&hr("initialContent")}function bN(n,i){throw new Error(n[i]||n.default)}var xN={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"},hr=Os(bN)(xN),co={changes:mN,selector:gN,handler:vN,initial:yN};function SN(n){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};co.initial(n),co.handler(i);var l={current:n},o=Os(NN)(l,i),c=Os(wN)(l),d=Os(co.changes)(n),f=Os(jN)(l);function p(){var m=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(y){return y};return co.selector(m),m(l.current)}function g(m){fN(o,c,d,f)(m)}return[p,g]}function jN(n,i){return Ys(i)?i(n.current):i}function wN(n,i){return n.current=Zg(Zg({},n.current),i),i}function NN(n,i,l){return Ys(i)?i(n.current):Object.keys(l).forEach(function(o){var c;return(c=i[o])===null||c===void 0?void 0:c.call(i,n.current[o])}),l}var CN={create:SN},_N={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function TN(n){return function i(){for(var l=this,o=arguments.length,c=new Array(o),d=0;d<o;d++)c[d]=arguments[d];return c.length>=n.length?n.apply(this,c):function(){for(var f=arguments.length,p=new Array(f),g=0;g<f;g++)p[g]=arguments[g];return i.apply(l,[].concat(c,p))}}}function EN(n){return{}.toString.call(n).includes("Object")}function AN(n){return n||Kg("configIsRequired"),EN(n)||Kg("configType"),n.urls?(ON(),{paths:{vs:n.urls.monacoBase}}):n}function ON(){console.warn(Oy.deprecation)}function kN(n,i){throw new Error(n[i]||n.default)}var Oy={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!
|
|
36
|
+
You are using deprecated way of configuration.
|
|
37
|
+
|
|
38
|
+
Instead of using
|
|
39
|
+
monaco.config({ urls: { monacoBase: '...' } })
|
|
40
|
+
use
|
|
41
|
+
monaco.config({ paths: { vs: '...' } })
|
|
42
|
+
|
|
43
|
+
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
44
|
+
`},Kg=TN(kN)(Oy),RN={config:AN},DN=function(){for(var i=arguments.length,l=new Array(i),o=0;o<i;o++)l[o]=arguments[o];return function(c){return l.reduceRight(function(d,f){return f(d)},c)}};function ky(n,i){return Object.keys(i).forEach(function(l){i[l]instanceof Object&&n[l]&&Object.assign(i[l],ky(n[l],i[l]))}),Yg(Yg({},n),i)}var LN={type:"cancelation",msg:"operation is manually canceled"};function cd(n){var i=!1,l=new Promise(function(o,c){n.then(function(d){return i?c(LN):o(d)}),n.catch(c)});return l.cancel=function(){return i=!0},l}var UN=["monaco"],zN=CN.create({config:_N,isInitialized:!1,resolve:null,reject:null,monaco:null}),Ry=lN(zN,2),Zs=Ry[0],Bo=Ry[1];function MN(n){var i=RN.config(n),l=i.monaco,o=iN(i,UN);Bo(function(c){return{config:ky(c.config,o),monaco:l}})}function BN(){var n=Zs(function(i){var l=i.monaco,o=i.isInitialized,c=i.resolve;return{monaco:l,isInitialized:o,resolve:c}});if(!n.isInitialized){if(Bo({isInitialized:!0}),n.monaco)return n.resolve(n.monaco),cd(ud);if(window.monaco&&window.monaco.editor)return Dy(window.monaco),n.resolve(window.monaco),cd(ud);DN(IN,PN)(qN)}return cd(ud)}function IN(n){return document.body.appendChild(n)}function $N(n){var i=document.createElement("script");return n&&(i.src=n),i}function PN(n){var i=Zs(function(o){var c=o.config,d=o.reject;return{config:c,reject:d}}),l=$N("".concat(i.config.paths.vs,"/loader.js"));return l.onload=function(){return n()},l.onerror=i.reject,l}function qN(){var n=Zs(function(l){var o=l.config,c=l.resolve,d=l.reject;return{config:o,resolve:c,reject:d}}),i=window.require;i.config(n.config),i(["vs/editor/editor.main"],function(l){var o=l.m||l;Dy(o),n.resolve(o)},function(l){n.reject(l)})}function Dy(n){Zs().monaco||Bo({monaco:n})}function HN(){return Zs(function(n){var i=n.monaco;return i})}var ud=new Promise(function(n,i){return Bo({resolve:n,reject:i})}),Ly={config:MN,init:BN,__getMonacoInstance:HN},GN={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},dd=GN,VN={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},FN=VN;function YN({children:n}){return Ni.createElement("div",{style:FN.container},n)}var XN=YN,ZN=XN;function KN({width:n,height:i,isEditorReady:l,loading:o,_ref:c,className:d,wrapperProps:f}){return Ni.createElement("section",{style:{...dd.wrapper,width:n,height:i},...f},!l&&Ni.createElement(ZN,null,o),Ni.createElement("div",{ref:c,style:{...dd.fullWidth,...!l&&dd.hide},className:d}))}var QN=KN,Uy=z.memo(QN);function JN(n){z.useEffect(n,[])}var zy=JN;function WN(n,i,l=!0){let o=z.useRef(!0);z.useEffect(o.current||!l?()=>{o.current=!1}:n,i)}var Pn=WN;function Ds(){}function wi(n,i,l,o){return e2(n,o)||t2(n,i,l,o)}function e2(n,i){return n.editor.getModel(My(n,i))}function t2(n,i,l,o){return n.editor.createModel(i,l,o?My(n,o):void 0)}function My(n,i){return n.Uri.parse(i)}function n2({original:n,modified:i,language:l,originalLanguage:o,modifiedLanguage:c,originalModelPath:d,modifiedModelPath:f,keepCurrentOriginalModel:p=!1,keepCurrentModifiedModel:g=!1,theme:m="light",loading:y="Loading...",options:v={},height:w="100%",width:b="100%",className:E,wrapperProps:_={},beforeMount:O=Ds,onMount:S=Ds}){let[T,L]=z.useState(!1),[D,M]=z.useState(!0),V=z.useRef(null),K=z.useRef(null),ae=z.useRef(null),I=z.useRef(S),$=z.useRef(O),ee=z.useRef(!1);zy(()=>{let F=Ly.init();return F.then(X=>(K.current=X)&&M(!1)).catch(X=>X?.type!=="cancelation"&&console.error("Monaco initialization: error:",X)),()=>V.current?j():F.cancel()}),Pn(()=>{if(V.current&&K.current){let F=V.current.getOriginalEditor(),X=wi(K.current,n||"",o||l||"text",d||"");X!==F.getModel()&&F.setModel(X)}},[d],T),Pn(()=>{if(V.current&&K.current){let F=V.current.getModifiedEditor(),X=wi(K.current,i||"",c||l||"text",f||"");X!==F.getModel()&&F.setModel(X)}},[f],T),Pn(()=>{let F=V.current.getModifiedEditor();F.getOption(K.current.editor.EditorOption.readOnly)?F.setValue(i||""):i!==F.getValue()&&(F.executeEdits("",[{range:F.getModel().getFullModelRange(),text:i||"",forceMoveMarkers:!0}]),F.pushUndoStop())},[i],T),Pn(()=>{V.current?.getModel()?.original.setValue(n||"")},[n],T),Pn(()=>{let{original:F,modified:X}=V.current.getModel();K.current.editor.setModelLanguage(F,o||l||"text"),K.current.editor.setModelLanguage(X,c||l||"text")},[l,o,c],T),Pn(()=>{K.current?.editor.setTheme(m)},[m],T),Pn(()=>{V.current?.updateOptions(v)},[v],T);let B=z.useCallback(()=>{if(!K.current)return;$.current(K.current);let F=wi(K.current,n||"",o||l||"text",d||""),X=wi(K.current,i||"",c||l||"text",f||"");V.current?.setModel({original:F,modified:X})},[l,i,c,n,o,d,f]),Q=z.useCallback(()=>{!ee.current&&ae.current&&(V.current=K.current.editor.createDiffEditor(ae.current,{automaticLayout:!0,...v}),B(),K.current?.editor.setTheme(m),L(!0),ee.current=!0)},[v,m,B]);z.useEffect(()=>{T&&I.current(V.current,K.current)},[T]),z.useEffect(()=>{!D&&!T&&Q()},[D,T,Q]);function j(){let F=V.current?.getModel();p||F?.original?.dispose(),g||F?.modified?.dispose(),V.current?.dispose()}return Ni.createElement(Uy,{width:b,height:w,isEditorReady:T,loading:y,_ref:ae,className:E,wrapperProps:_})}var a2=n2;z.memo(a2);function r2(n){let i=z.useRef();return z.useEffect(()=>{i.current=n},[n]),i.current}var i2=r2,uo=new Map;function s2({defaultValue:n,defaultLanguage:i,defaultPath:l,value:o,language:c,path:d,theme:f="light",line:p,loading:g="Loading...",options:m={},overrideServices:y={},saveViewState:v=!0,keepCurrentModel:w=!1,width:b="100%",height:E="100%",className:_,wrapperProps:O={},beforeMount:S=Ds,onMount:T=Ds,onChange:L,onValidate:D=Ds}){let[M,V]=z.useState(!1),[K,ae]=z.useState(!0),I=z.useRef(null),$=z.useRef(null),ee=z.useRef(null),B=z.useRef(T),Q=z.useRef(S),j=z.useRef(),F=z.useRef(o),X=i2(d),Y=z.useRef(!1),Z=z.useRef(!1);zy(()=>{let x=Ly.init();return x.then(C=>(I.current=C)&&ae(!1)).catch(C=>C?.type!=="cancelation"&&console.error("Monaco initialization: error:",C)),()=>$.current?q():x.cancel()}),Pn(()=>{let x=wi(I.current,n||o||"",i||c||"",d||l||"");x!==$.current?.getModel()&&(v&&uo.set(X,$.current?.saveViewState()),$.current?.setModel(x),v&&$.current?.restoreViewState(uo.get(d)))},[d],M),Pn(()=>{$.current?.updateOptions(m)},[m],M),Pn(()=>{!$.current||o===void 0||($.current.getOption(I.current.editor.EditorOption.readOnly)?$.current.setValue(o):o!==$.current.getValue()&&(Z.current=!0,$.current.executeEdits("",[{range:$.current.getModel().getFullModelRange(),text:o,forceMoveMarkers:!0}]),$.current.pushUndoStop(),Z.current=!1))},[o],M),Pn(()=>{let x=$.current?.getModel();x&&c&&I.current?.editor.setModelLanguage(x,c)},[c],M),Pn(()=>{p!==void 0&&$.current?.revealLine(p)},[p],M),Pn(()=>{I.current?.editor.setTheme(f)},[f],M);let R=z.useCallback(()=>{if(!(!ee.current||!I.current)&&!Y.current){Q.current(I.current);let x=d||l,C=wi(I.current,o||n||"",i||c||"",x||"");$.current=I.current?.editor.create(ee.current,{model:C,automaticLayout:!0,...m},y),v&&$.current.restoreViewState(uo.get(x)),I.current.editor.setTheme(f),p!==void 0&&$.current.revealLine(p),V(!0),Y.current=!0}},[n,i,l,o,c,d,m,y,v,f,p]);z.useEffect(()=>{M&&B.current($.current,I.current)},[M]),z.useEffect(()=>{!K&&!M&&R()},[K,M,R]),F.current=o,z.useEffect(()=>{M&&L&&(j.current?.dispose(),j.current=$.current?.onDidChangeModelContent(x=>{Z.current||L($.current.getValue(),x)}))},[M,L]),z.useEffect(()=>{if(M){let x=I.current.editor.onDidChangeMarkers(C=>{let H=$.current.getModel()?.uri;if(H&&C.find(G=>G.path===H.path)){let G=I.current.editor.getModelMarkers({resource:H});D?.(G)}});return()=>{x?.dispose()}}return()=>{}},[M,D]);function q(){j.current?.dispose(),w?v&&uo.set(d,$.current.saveViewState()):$.current.getModel()?.dispose(),$.current.dispose()}return Ni.createElement(Uy,{width:b,height:E,isEditorReady:M,loading:g,_ref:ee,className:_,wrapperProps:O})}var l2=s2,o2=z.memo(l2),c2=o2;function Qg({value:n,framework:i,onChange:l,height:o="calc(100vh - 420px)"}){function c(d,f){const p="typescript",g=i==="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:(y,v)=>{const w=y.getWordUntilPosition(v),b=y.getLineContent(v.lineNumber).slice(0,v.column-1).toLowerCase(),E={startLineNumber:v.lineNumber,endLineNumber:v.lineNumber,startColumn:w.startColumn,endColumn:v.column},_=u2(b,i);return{suggestions:[...g.map(O=>({label:O,kind:f.languages.CompletionItemKind.Method,insertText:O,range:E,detail:i==="playwright"?"Playwright API":"Cypress API"})),..._.map(O=>({...O,kind:f.languages.CompletionItemKind.Snippet,range:E}))]}}});d.onDidDispose(()=>m.dispose())}return a.jsx(c2,{height:o,theme:"vs-dark",language:"typescript",value:n,onChange:d=>l(d??""),onMount:c,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 u2(n,i){const l=i==="playwright",o=[];return/กรอก|พิมพ์|fill|type|input/i.test(n)&&o.push({label:"Fill an input",insertText:l?"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:l?"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:l?"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:l?"await expect(page.getByText('${1:Success}')).toBeVisible()":"cy.contains('${1:Success}').should('be.visible')",detail:"Suggested from an assertion instruction"}),o}function d2({sourceUrl:n,onUse:i}){const{ui:l}=Le(),o=n||"http://localhost:5500/login",c=`await page.goto("${o}")
|
|
45
|
+
await page.getByLabel("Email address").fill("{{TEST_EMAIL}}")
|
|
46
|
+
await page.getByLabel("Password").fill("{{TEST_PASSWORD}}")
|
|
47
|
+
await page.getByRole("button", { name: "Login", exact: true }).click()
|
|
48
|
+
await expect(page).toHaveURL(new RegExp("/dashboard"))`,d=`await page.goto("${o}")
|
|
49
|
+
await page.getByLabel("Password").fill("wrong-password")
|
|
50
|
+
await page.getByRole("button", { name: "Login", exact: true }).click()
|
|
51
|
+
await expect(page.getByRole("alert")).toContainText("Invalid password")`;return a.jsxs("section",{className:"qa-guidance",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:l("Beginner guide")}),a.jsx("h3",{children:l("What should I add next?")}),a.jsx("p",{children:l("Use a template, then replace labels and expected results with what you observed.")})]}),a.jsxs("div",{className:"qa-guidance-actions",children:[a.jsxs("button",{type:"button",onClick:()=>i(c),children:[a.jsx("b",{children:l("Login success")}),a.jsx("span",{children:l("Fill credentials and verify the next URL")})]}),a.jsxs("button",{type:"button",onClick:()=>i(d),children:[a.jsx("b",{children:l("Login validation")}),a.jsx("span",{children:l("Try an invalid password and assert the alert")})]}),a.jsx("span",{children:l("For uploads, create a draft first and choose a safe test file before running.")})]})]})}function f2({stopped:n=!1}){return a.jsx("svg",{className:"run-button-icon",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:n?a.jsx("rect",{x:"5.25",y:"5.25",width:"9.5",height:"9.5",rx:"2",fill:"currentColor"}):a.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 fd({children:n,stopped:i=!1,onClick:l,disabled:o=!1}){return a.jsxs("button",{type:"button",className:`btn ${i?"btn-danger":"btn-dark"} run-button`,onClick:l,disabled:o,children:[a.jsx(f2,{stopped:i}),a.jsx("span",{children:n})]})}function h2({testCases:n,projectId:i="active",secrets:l,blockedKeywords:o,onRunStatus:c,onRunResult:d}){const{ui:f,language:p}=Le(),[g,m]=z.useState("playwright"),y=n.find(k=>/submit|login|sign in|เข้าสู่ระบบ|ล็อกอิน/i.test(`${k.title} ${k.module}`))??n[0],[v,w]=z.useState(y?.id??""),[b,E]=z.useState(()=>n.map(k=>k.id)),[_,O]=z.useState(!1),[S,T]=z.useState(!1),[L,D]=z.useState(""),[M,V]=z.useState(),[K,ae]=z.useState([]),[I,$]=z.useState(!1),[ee,B]=z.useState(!1),[Q,j]=z.useState("all"),F=z.useRef(void 0),X=z.useRef(!1),Y=z.useRef(!1);z.useEffect(()=>(Y.current=!0,()=>{Y.current=!1,X.current=!0;const k=F.current;k&&(k.controller.abort(),dg(k.runId).catch(()=>{}))}),[]);const[Z,R]=z.useState({}),q=n.find(k=>k.id===v)??n[0],x=z.useMemo(()=>[{value:"all",label:f("All folders and tags")},...[...new Set(n.map(k=>k.folder??k.module))].sort().map(k=>({value:`folder:${k}`,label:`${f("Folder")}: ${k}`})),...[...new Set(n.flatMap(k=>k.tags??[]))].sort().map(k=>({value:`tag:${k}`,label:`${f("Tag")}: ${k}`}))],[n,f]),C=z.useMemo(()=>Q==="all"?n:n.filter(k=>Q.startsWith("folder:")?(k.folder??k.module)===Q.slice(7):(k.tags??[]).includes(Q.slice(4))),[Q,n]),H=C.filter(k=>b.includes(k.id)).length;z.useEffect(()=>{n.some(k=>k.id===v)||w(y?.id??"")},[y?.id,v,n]),z.useEffect(()=>{R({}),(async()=>{const k=await M0(i),J=`lazyscout.automation.${i}`;let he={};try{he=JSON.parse(localStorage.getItem(J)??"{}")}catch{}const fe={...he,...k};Object.keys(he).length&&(await Ju(i,fe),localStorage.removeItem(J)),R(fe)})().catch(()=>R({}))},[i]),z.useEffect(()=>{E(n.map(k=>k.id))},[n]),z.useEffect(()=>{const k=he=>{_&&(he.key==="F5"||(he.ctrlKey||he.metaKey)&&he.key.toLowerCase()==="r")&&(he.preventDefault(),B(!0))},J=he=>{if(!_)return;const fe=F.current;fe&&navigator.sendBeacon("/api/automation/stop",new Blob([JSON.stringify({runId:fe.runId})],{type:"application/json"})),he.preventDefault(),he.returnValue=""};return window.addEventListener("keydown",k),window.addEventListener("beforeunload",J),()=>{window.removeEventListener("keydown",k),window.removeEventListener("beforeunload",J)}},[_]);const G=z.useMemo(()=>q?g==="playwright"?qg(q):Hg(q):"",[g,q]),te=q?`${g}:${q.id}`:"",pe=Z[te]??G;function Ne(){D(pe),T(!0)}function we(){const k={...Z,[te]:L};R(k),Ju(i,k),T(!1)}function se(){const k={...Z};delete k[te],R(k),Ju(i,k),T(!1)}function _e(k){const J=`${g}:${k.id}`;return Z[J]??(g==="playwright"?qg(k):Hg(k))}async function Ce(k,J){const he=crypto.randomUUID(),fe=new AbortController;F.current={runId:he,controller:fe};try{const ne=await v0(k,g,J,l,he,i,o,fe.signal);return Y.current&&(c?.(k.id,ne.status==="passed"?"passed":ne.status==="failed"?"failed":"pending"),d?.(k.id,ne)),ne}catch(ne){const je=X.current||ne instanceof DOMException&&ne.name==="AbortError",Te={status:je?"stopped":"failed",framework:g,logs:[{timestamp:new Date().toISOString(),level:je?"warn":"fail",message:je?"Run stopped by user.":ne instanceof Error?ne.message:String(ne)}]};return Y.current&&(c?.(k.id,je?"pending":"failed"),d?.(k.id,Te)),Te}finally{F.current?.runId===he&&(F.current=void 0)}}async function qe(){X.current=!0;const k=F.current;k&&(k.controller.abort(),dg(k.runId).catch(()=>{})),$(!1),B(!1),ae(J=>[...J,{timestamp:new Date().toISOString(),level:"warn",message:"Stop requested. Closing the active Playwright session…"}])}async function Ie(){if(!q||_)return;X.current=!1,O(!0),V("running"),ae([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --case ${q.id}`},{timestamp:new Date().toISOString(),level:"info",message:`Starting Playwright runner: ${q.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 k=await Ce(q,pe);V(k.status),ae(J=>[...J,...k.logs]),O(!1)}async function A(){if(_)return;const k=C.filter(he=>b.includes(he.id)).slice(0,50);if(X.current=!1,O(!0),V("running"),ae([{timestamp:new Date().toISOString(),level:"info",message:`$ lazyscout test --all --project ${i}`},{timestamp:new Date().toISOString(),level:"info",message:`Selected cases: ${k.length}/${C.length} in current filter · Run budget: 50 cases`}]),k.length===0){ae(he=>[...he,{timestamp:new Date().toISOString(),level:"warn",message:"No test cases selected. Nothing to run."}]),V("pending"),O(!1);return}let J="passed";for(const he of k){if(X.current)break;const fe=await Ce(he,_e(he));if((fe.status==="failed"||J==="passed")&&(J=fe.status),ae(ne=>[...ne,...fe.logs]),fe.status==="stopped")break}V(X.current?"stopped":J),O(!1)}function ge(){navigator.clipboard?.writeText(pe)}function ue(){const k=new Blob([pe],{type:"text/plain"}),J=URL.createObjectURL(k),he=document.createElement("a");he.href=J,he.download=`${q?.id??"lazyscout-test"}.${g==="playwright"?"spec.ts":"cy.ts"}`,he.click(),URL.revokeObjectURL(J)}function P(){qe(),window.location.reload()}return a.jsxs("section",{className:"automation-page",children:[a.jsxs("div",{className:"automation-header",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:f("Automation workspace")}),a.jsx("h2",{children:f("Generated Tests")}),a.jsx("p",{children:f("Edit the generated file per Test Case, then run one case or selected cases.")})]}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("select",{className:"automation-run-filter",value:Q,disabled:_,onChange:k=>j(k.target.value),children:x.map(k=>a.jsx("option",{value:k.value,children:k.label},k.value))}),a.jsxs("span",{className:"automation-selected-count",children:[H,"/",C.length," ",f("selected")]}),_?a.jsx(fd,{stopped:!0,onClick:()=>$(!0),children:f("Stop run")}):a.jsx(fd,{onClick:A,children:f("Run selected cases")})]})]}),a.jsx(d2,{sourceUrl:q?.sourceUrl,onUse:k=>{D(k),T(!0)}}),a.jsxs("div",{className:"automation-layout",children:[a.jsxs("aside",{className:"automation-case-list",children:[a.jsxs("div",{className:"automation-filter-head",children:[a.jsxs("span",{className:"field-label",children:[f("Test files ("),C.length,"/",n.length,")"]}),a.jsx("span",{children:f(Q==="all"?"All":"Filtered")})]}),C.map(k=>a.jsxs("button",{type:"button",className:q?.id===k.id?"selected":"",onClick:()=>{w(k.id),T(!1)},children:[a.jsx("input",{type:"checkbox",checked:b.includes(k.id),onChange:J=>{J.stopPropagation(),E(he=>J.target.checked?[...he,k.id]:he.filter(fe=>fe!==k.id))},onClick:J=>J.stopPropagation(),"aria-label":`${f("Run")} ${k.id}`}),a.jsx("span",{className:"case-file-icon",children:Z[`playwright:${k.id}`]||Z[`cypress:${k.id}`]?"●":"○"}),a.jsxs("span",{children:[a.jsx("b",{children:k.id}),a.jsx("small",{children:k.title}),k.tags?.length?a.jsx("em",{className:"automation-tag",children:k.tags.slice(0,2).join(" · ")}):null]})]},k.id))]}),a.jsxs("div",{className:"automation-editor",children:[a.jsxs("div",{className:"automation-toolbar",children:[a.jsxs("select",{className:"field",value:g,onChange:k=>m(k.target.value),disabled:_,children:[a.jsx("option",{value:"playwright",children:"Playwright"}),a.jsx("option",{value:"cypress",children:"Cypress"})]}),a.jsx("span",{className:"automation-source",children:q?.sourceUrl}),a.jsxs("div",{className:"ml-auto flex gap-2",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:Ne,disabled:S||_,children:f("Edit code")}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:se,disabled:_,children:f("Regenerate")}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:ge,children:f("Copy")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:ue,children:f("Save file")}),a.jsx(fd,{onClick:Ie,disabled:_||!q,children:f("Run")})]})]}),S?a.jsxs("div",{className:"code-edit-area",children:[a.jsx(Qg,{value:L,framework:g,onChange:D}),a.jsxs("div",{className:"code-edit-actions",children:[a.jsx("span",{className:"muted",children:f("VS Code style editor · Ctrl+Space for suggestions.")}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>T(!1),children:f("Cancel")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:we,children:f("Save code")})]})]}):a.jsx("pre",{className:"automation-code",children:pe||f("No Test Cases are available to generate.")}),M&&a.jsxs("div",{className:"terminal-panel",children:[a.jsxs("div",{className:"terminal-head",children:[a.jsxs("span",{children:[a.jsx("i",{})," ",f("CLI output")]}),a.jsx("b",{className:M==="passed"?"terminal-pass":M==="failed"?"terminal-fail":"terminal-warn",children:f(M.toUpperCase())})]}),a.jsx("div",{className:"terminal-body",children:K.map((k,J)=>a.jsxs("div",{className:`terminal-line terminal-${k.level}`,children:[a.jsx("span",{children:new Date(k.timestamp).toLocaleTimeString()}),k.message,k.durationMs!==void 0&&a.jsxs("em",{children:[k.durationMs,f("ms")]})]},`${k.timestamp}-${J}`))})]})]})]}),I&&a.jsx(Jg,{title:f("Stop the running tests?"),message:f("The active Playwright session will be closed. Remaining selected Test Cases will not run."),confirmLabel:f("Stop run"),onCancel:()=>$(!1),onConfirm:()=>{qe()}}),ee&&a.jsx(Jg,{title:f("Stop tests and refresh?"),message:f("Refreshing now will stop the active Playwright session and cancel the remaining selected Test Cases."),confirmLabel:f("Stop and refresh"),onCancel:()=>B(!1),onConfirm:P}),S&&a.jsx("div",{className:"modern-modal-backdrop code-editor-backdrop",children:a.jsxs("section",{className:"modern-modal code-editor-modal",role:"dialog","aria-modal":"true","aria-labelledby":"code-editor-title",children:[a.jsxs("header",{className:"modal-header",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:f("Automation source")}),a.jsxs("h2",{id:"code-editor-title",children:[p==="th"?"แก้ไขโค้ด":"Edit"," ",g==="playwright"?"Playwright":"Cypress",p==="en"&&" code"]}),a.jsxs("p",{children:[q?.id," · ",q?.title]})]}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":f("Close editor"),onClick:()=>T(!1),children:"×"})]}),a.jsx("div",{className:"code-editor-modal-body",children:a.jsx(Qg,{value:L,framework:g,onChange:D,height:"100%"})}),a.jsxs("footer",{className:"modal-footer code-editor-modal-footer",children:[a.jsx("span",{className:"muted",children:f("VS Code style editor · Ctrl+Space for suggestions.")}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>T(!1),children:f("Cancel")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:we,children:f("Save code")})]})]})})]})}function Jg({title:n,message:i,confirmLabel:l,onCancel:o,onConfirm:c}){const{ui:d}=Le();return a.jsx("div",{className:"modern-modal-backdrop",children:a.jsxs("section",{className:"modern-modal run-confirm-modal",role:"dialog","aria-modal":"true",children:[a.jsx("div",{className:"modal-header",children:a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:d("Running tests")}),a.jsx("h2",{children:n}),a.jsx("p",{children:i})]})}),a.jsxs("div",{className:"modal-footer",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:d("Keep running")}),a.jsx("button",{type:"button",className:"btn btn-danger",onClick:c,children:l})]})]})})}function p2({result:n}){const{ui:i}=Le(),[l,o]=z.useState("events"),[c,d]=z.useState(!1),[f,p]=z.useState(n.runEvents);async function g(){if(!c){o("terminal"),d(!0),p([]);for(const y of n.runEvents)await new Promise(v=>window.setTimeout(v,120)),p(v=>[...v,y]);d(!1)}}const m=c||f.length<n.runEvents.length?f:n.runEvents;return a.jsxs("section",{className:"scout-log-card",children:[a.jsxs("div",{className:"workspace-panel-head",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:i("Playwright Scout Log")}),a.jsx("h2",{children:i("Scout Log")})]}),a.jsxs("span",{className:"run-live",children:[a.jsx("i",{})," ",i("DONE")]})]}),a.jsxs("div",{className:"scout-log-tabs",children:[a.jsx("button",{type:"button",className:l==="events"?"active":"",onClick:()=>o("events"),children:i("◉ Event Stream")}),a.jsx("button",{type:"button",className:l==="terminal"?"active":"",onClick:()=>o("terminal"),children:i("›_ CLI Terminal")})]}),a.jsxs("div",{className:"run-summary",children:[a.jsxs("div",{children:[a.jsxs("strong",{children:[n.stats.durationMs,i("ms")]}),a.jsx("span",{children:i("duration")})]}),a.jsxs("div",{children:[a.jsx("strong",{children:n.stats.pagesVisited}),a.jsx("span",{children:i("pages")})]}),a.jsxs("div",{children:[a.jsx("strong",{className:n.stats.urlsSkipped?"text-amber-600":"",children:n.stats.urlsSkipped}),a.jsx("span",{children:i("skipped")})]})]}),l==="terminal"?a.jsxs("div",{className:"scout-cli-terminal",children:[a.jsxs("div",{className:"scout-cli-head",children:[a.jsxs("span",{children:[a.jsx("i",{})," ",i("Playwright CLI output")]}),a.jsxs("div",{className:"flex items-center gap-3",children:[a.jsx("b",{children:i(c?"RUNNING":"COMPLETED")}),a.jsx("button",{type:"button",className:"cli-run-button",onClick:g,disabled:c,children:i(c?"Running…":"▶ Run again")})]})]}),a.jsxs("div",{className:"scout-cli-body",children:[a.jsxs("div",{children:[a.jsx("em",{children:"$"})," npx playwright scout ",n.startUrl]}),m.map((y,v)=>a.jsxs("div",{className:y.result==="failed"?"cli-fail":y.result==="warning"||y.result==="blocked"?"cli-warn":"cli-pass",children:[a.jsx("em",{children:"›"})," ",y.message]},`cli-${y.timestamp}-${v}`)),c&&a.jsx("div",{className:"cli-cursor",children:"▌"})]})]}):a.jsx("div",{className:"run-events",children:n.runEvents.map((y,v)=>a.jsxs("div",{className:"run-event",children:[a.jsx("div",{className:`event-marker event-${y.result}`}),a.jsxs("div",{className:"run-event-body",children:[a.jsxs("div",{className:"run-event-top",children:[a.jsx("span",{children:new Date(y.timestamp).toLocaleTimeString()}),a.jsx("b",{children:y.eventType})]}),a.jsx("p",{children:y.message}),y.currentUrl&&a.jsx("small",{children:new URL(y.currentUrl).pathname})]})]},`${y.timestamp}-${v}`))}),a.jsxs("div",{className:"inspector-foot",children:[a.jsx("span",{className:"status-dot status-pass"})," ",i("Scout completed · Playwright events captured")]})]})}function m2({checks:n,secrets:i}){const{ui:l}=Le(),[o,c]=z.useState(),[d,f]=z.useState({}),[p,g]=z.useState();async function m(y,v=!1){c(y.id);try{const w=await q0(y,i,v);f(b=>({...b,[y.id]:`${w.status.toUpperCase()} · ${w.message}`}))}catch(w){f(b=>({...b,[y.id]:w instanceof Error?w.message:String(w)}))}finally{c(void 0)}}return a.jsxs("div",{className:"api-checks",children:[a.jsxs("div",{className:"api-checks-head",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:l("Network validation")}),a.jsx("h3",{children:l("Test API")}),a.jsx("p",{children:l("Requests observed from XHR/fetch during Explorer. Run uses server-side fetch and project token when configured.")})]}),a.jsxs("span",{className:"status-badge status-badge-pass",children:[n.length," ",l("observed")]})]}),n.length===0?a.jsxs("div",{className:"empty-state",children:[l("Run Analyze with")," ",a.jsx("b",{children:l("Include API checks from XHR/fetch")})," ",l("enabled to collect the API requests used by the page.")]}):a.jsx("div",{className:"api-table",children:n.map(y=>a.jsxs("div",{className:"api-row",children:[a.jsx("span",{className:"api-method",children:y.method}),a.jsxs("div",{children:[a.jsx("b",{children:y.id}),a.jsx("p",{children:y.url}),a.jsx("small",{children:y.note??`Observed HTTP ${y.observedStatus??"—"} · ${y.durationMs??0}ms`})]}),a.jsx("span",{className:`status-badge ${y.status==="observed"?"status-badge-pass":"status-badge-warn"}`,children:y.status}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>["GET","HEAD","OPTIONS"].includes(y.method.toUpperCase())?void m(y):g(y),disabled:o===y.id,children:o===y.id?l("Checking…"):l("Run API")}),d[y.id]&&a.jsx("div",{className:"api-result",children:d[y.id]})]},y.id))}),p&&a.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:a.jsxs("section",{className:"modern-modal",role:"dialog","aria-modal":"true","aria-labelledby":"unsafe-api-title",children:[a.jsxs("header",{className:"modal-header",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:l("Protected API action")}),a.jsxs("h2",{id:"unsafe-api-title",children:[l("Run")," ",p.method.toUpperCase()," ",l("once?")]})]}),a.jsx("button",{type:"button",className:"icon-btn",onClick:()=>g(void 0),"aria-label":l("Close"),children:"×"})]}),a.jsxs("div",{className:"modal-body",children:[a.jsx("p",{children:l("This request can create, update, or delete data. LazyScout will send it only once for this run.")}),a.jsx("code",{className:"block break-all",children:p.url})]}),a.jsxs("footer",{className:"modal-footer",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>g(void 0),children:l("Cancel")}),a.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{g(void 0),m(p,!0)},children:l("Run once")})]})]})})]})}function Wg({view:n,onChange:i,counts:l}){const{t:o,language:c,ui:d}=Le(),f=n==="queue"?"map":n,p=[["overview",o("overview"),"⌂"],["qa","AI Scout","✦"],["testcases",`${o("testCases")} ${l.cases}`,"✓"],["map",c==="th"?"แผนที่เว็บ":"Page map","▦"],["automation",o("automation"),"↗"],["documents",c==="th"?"เอกสาร":"Documents","▤"],["scoutlog",o("scoutLog"),"◉"],["explorer",o("explorer"),"⌘"],["loadtest",d("Load Test"),"⚡"]];return a.jsx("nav",{className:"workspace-nav",children:p.map(([g,m,y])=>a.jsxs("button",{type:"button","aria-current":f===g?"page":void 0,className:[f===g?"is-active":"",g==="qa"?"ai-workspace-nav-tab":""].filter(Boolean).join(" "),onClick:()=>i(g),children:[a.jsx("span",{"aria-hidden":"true",children:y}),m,g==="explorer"&&a.jsx("small",{children:l.states})]},g))})}function g2({projectId:n,detailsRef:i}){const{ui:l,language:o}=Le(),c=o==="th",[d,f]=z.useState(),[p,g]=z.useState(!1),[m,y]=z.useState(""),[v,w]=z.useState(!1),[b,E]=z.useState(!1),[_,O]=z.useState("");async function S(){if(!(d||v)){w(!0),y("");try{f(await Q0(n))}catch($){y($ instanceof Error?$.message:"Could not prepare MCP settings.")}finally{w(!1)}}}const T=d?.command,L=d?.names[p?"run":"read"],D=d?[...d.args,...p?["--allow-qa-write"]:[]]:[],M=T&&L?`[mcp_servers.${L}]
|
|
52
|
+
command = ${JSON.stringify(T)}
|
|
53
|
+
args = ${JSON.stringify(D)}`:void 0,V=$=>`'${$.replaceAll("'",d?.platform==="win32"?"''":`'"'"'`)}'`,K=T&&L?`codex mcp add ${L} -- ${[T,...D].map(V).join(" ")}`:void 0;async function ae(){E(!0),O(""),y("");try{const $=await J0(n,p);y(c?`ตั้งค่า ${$.name} แล้ว เปิด Codex ใหม่เพื่อโหลด MCP`:`Configured ${$.name}. Reopen Codex to load the MCP server.`)}catch($){O($ instanceof Error?$.message:"Could not connect Codex MCP.")}finally{E(!1)}}function I($){if(!navigator.clipboard){y("Select and copy the settings above.");return}navigator.clipboard.writeText($).then(()=>y("Copied.")).catch(()=>y("Select and copy the settings above."))}return a.jsxs("details",{ref:i,id:"local-mcp",className:"scroll-mt-6 rounded-2xl border border-indigo-200 bg-indigo-50/75 p-5 text-slate-900",onToggle:$=>{$.currentTarget.open&&S()},children:[a.jsx("summary",{className:"cursor-pointer font-semibold text-indigo-950",children:c?"เชื่อม MCP บนเครื่อง":"Connect a local MCP client"}),a.jsx("p",{className:"mt-2 text-sm text-slate-600",children:c?"ให้ Codex อ่านข้อมูลจากโปรเจกต์นี้ผ่าน MCP บนเครื่อง เลือกเพิ่มสิทธิ์รัน Scout ได้ด้านล่าง":"Give Codex read access to this project over local MCP. Optionally allow Scout runs below."}),v&&a.jsx("p",{role:"status",children:l("Preparing MCP settings…")}),M&&a.jsxs("div",{className:"mt-4 grid gap-3",children:[a.jsxs("label",{className:"flex items-start gap-2 text-sm",children:[a.jsx("input",{type:"checkbox",checked:p,disabled:b,onChange:$=>{g($.target.checked),y("")}})," ",c?"อนุญาตให้รัน Scout และสร้างรายงานในโปรเจกต์นี้":"Allow Scout runs and report creation in this project"]}),a.jsx("button",{type:"button",disabled:b,onClick:()=>{ae()},className:"justify-self-start rounded-xl bg-indigo-700 px-4 py-2.5 text-sm font-semibold text-white shadow-sm transition-colors hover:bg-indigo-600 focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600 disabled:opacity-60",children:b?c?"กำลังเชื่อม…":"Connecting…":c?"ตั้งค่า Codex MCP อัตโนมัติ":"Set up Codex MCP automatically"}),a.jsxs("details",{className:"rounded-xl border border-indigo-100 bg-white p-3",children:[a.jsx("summary",{className:"cursor-pointer text-sm font-medium text-indigo-800",children:c?"ตั้งค่าเองหรือใช้ MCP client อื่น":"Manual setup or another MCP client"}),a.jsx("pre",{className:"mt-3 overflow-auto whitespace-pre-wrap break-all rounded-lg bg-slate-950 p-3 text-xs text-slate-100",children:M}),a.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[K&&a.jsx("button",{type:"button",className:"btn",onClick:()=>I(K),children:l("Copy Codex command")}),a.jsx("button",{type:"button",className:"btn",onClick:()=>I(M),children:l("Copy MCP settings")})]})]})]}),_&&a.jsx("p",{role:"alert",className:"mt-3 text-sm font-medium text-red-800",children:_}),m&&a.jsx("p",{role:"status",className:"mt-3 text-sm font-medium text-emerald-800",children:m})]})}const v2={"failed-interactions":{en:"Check the failed interactions and confirm their expected behavior.",th:"ตรวจการโต้ตอบที่ล้มเหลวและยืนยันว่าพฤติกรรมที่คาดไว้คืออะไร"},"blocked-interactions":{en:"Review why some interactions were blocked and which need a manual check.",th:"ดูสาเหตุที่การโต้ตอบถูกบล็อกและเลือกรายการที่ต้องตรวจด้วยตัวเอง"},"unexplored-interactions":{en:"Review discovered interactions that Scout has yet to explore.",th:"ตรวจการโต้ตอบที่พบแต่ Scout ยังไม่ได้สำรวจ"},"review-test-cases":{en:"Review the drafted Test Cases and confirm their assertions.",th:"ทบทวน Test Case ที่ร่างไว้และยืนยันเงื่อนไขที่ต้องตรวจ"},"review-scope":{en:"Compare the approved scope and observed pages with your testing goals.",th:"เทียบขอบเขตที่อนุมัติและหน้าที่สำรวจกับเป้าหมายการทดสอบ"}};function y2({providerLabel:n,external:i,request:l}){const{language:o}=Le(),c=o==="th",d=z.useRef(null),[f,p]=z.useState(!1),[g,m]=z.useState(""),[y,v]=z.useState();z.useEffect(()=>()=>d.current?.abort(),[]);async function w(){if(d.current)return;const b=new AbortController;d.current=b,p(!0),m("");try{v(await l(b.signal))}catch(E){b.signal.aborted||m(E instanceof Error?E.message:c?"ขอคำแนะนำไม่สำเร็จ":"Could not review the run.")}finally{d.current=null,b.signal.aborted||p(!1)}}return a.jsxs("section",{className:"grid gap-3 rounded-2xl border border-indigo-100 bg-indigo-50/55 p-4 text-sm text-slate-800",children:[a.jsx("h3",{className:"font-semibold text-indigo-950",children:c?"ให้ AI ช่วยจัดลำดับการตรวจต่อ":"AI review priorities"}),y?a.jsxs(a.Fragment,{children:[a.jsx("ol",{className:"list-decimal space-y-1 pl-5","aria-live":"polite",children:y.priorities.map(b=>a.jsx("li",{children:v2[b][o]},b))}),a.jsx("p",{className:"text-xs text-slate-600",children:c?"คำแนะนำสำหรับตรวจต่อ ผลทดสอบจริงอยู่ในรายงาน":"Review suggestions. Recorded test outcomes are in the report."}),y.usage&&a.jsx("p",{className:"text-xs text-slate-600",children:c?`โทเคนเข้า ${y.usage.inputTokens??"—"} · ออก ${y.usage.outputTokens??"—"}`:`AI tokens · ${y.usage.inputTokens??"—"} input · ${y.usage.outputTokens??"—"} output`})]}):a.jsxs(a.Fragment,{children:[a.jsx("p",{children:i?c?`ปุ่มนี้จะส่งเฉพาะจำนวนหน้า สถานะ UI การโต้ตอบ และ Test Case ไปยัง ${n}`:`This sends only page, UI state, interaction, and Test Case counts to ${n}.`:c?`วิเคราะห์ตัวเลขสรุปของรอบนี้ด้วย ${n} บนเครื่อง`:`Review this run's aggregate counts with ${n} on this device.`}),a.jsx("button",{type:"button",className:"qa-button justify-self-start border border-indigo-200 bg-white text-indigo-800 hover:bg-indigo-50",disabled:f,onClick:()=>{w()},children:f?c?"กำลังจัดลำดับ…":"Reviewing…":i?c?"ส่งตัวเลขให้ AI วิเคราะห์":"Send counts for AI review":c?"วิเคราะห์บนเครื่อง":"Review counts locally"}),g&&a.jsx("p",{role:"alert",className:"text-red-800",children:g})]})]})}const ev=[["test-cases","Test Cases"],["coverage","UI Coverage"],["playwright","Playwright Automation"],["cypress","Cypress Automation"],["bug-draft","Bug Report Draft"],["execution-report","Recorded Test Execution"],["summary","Test Summary"],["excel","Excel"]],tv=["Summary","Test Cases","UI Coverage","Coverage Gaps","Execution Results","Bug Reports"],b2=[["local","Free on this device"],["free-tier","Cloud with a free tier"],["cloud","Cloud · billing depends on your plan"],["custom","Other endpoints"]],Ns="min-w-0 rounded-2xl border border-slate-200 bg-white p-5 shadow-sm sm:p-6",Cs="qa-button bg-indigo-700 text-white shadow-sm hover:bg-indigo-800",$n="qa-button border border-indigo-200 bg-white text-indigo-800 hover:bg-indigo-50",fo="__manual__",x2={prepare:"กำลังตรวจโปรเจกต์และขอบเขตที่อนุมัติ","verify-session":"ยืนยันว่าพร้อมใช้เซสชันของโปรเจกต์แล้ว","reuse-observations":"กำลังใช้ผลสำรวจที่บันทึกไว้",scout:"กำลังสำรวจหน้าที่อนุมัติและลองการโต้ตอบที่ปลอดภัย","draft-test-cases":"กำลังร่างเคสทดสอบจากผลสำรวจ","analyze-coverage":"กำลังวิเคราะห์ความครอบคลุมของการสำรวจ","prepare-outputs":"กำลังบันทึกผลและไฟล์ที่เลือก"};function hd({step:n,title:i,hint:l}){return a.jsxs("header",{className:"mb-4 flex items-start gap-3",children:[a.jsx("span",{"aria-hidden":"true",className:"grid h-8 w-8 shrink-0 place-items-center rounded-lg bg-indigo-100 text-sm font-bold text-indigo-800",children:n}),a.jsxs("div",{children:[a.jsx("h3",{className:"text-base font-bold text-slate-950",children:i}),a.jsx("p",{className:"mt-0.5 text-sm text-slate-600",children:l})]})]})}function S2(n){try{return["localhost","127.0.0.1","[::1]"].includes(new URL(n??"").hostname)}catch{return!1}}function j2({projectId:n,targetUrl:i,onComplete:l,onSetTarget:o,onOpenSessionSettings:c}){const{ui:d,language:f}=Le(),p=f==="th",g=z.useRef(null),m=z.useRef(null),[y,v]=z.useState(""),[w,b]=z.useState(!1),[E,_]=z.useState(!1),[O,S]=z.useState(""),[T,L]=z.useState(""),[D,M]=z.useState(""),[V,K]=z.useState(""),[ae,I]=z.useState("auto"),[$,ee]=z.useState({kind:"rules"}),[B,Q]=z.useState(!1),[j,F]=z.useState(""),[X,Y]=z.useState(),[Z,R]=z.useState(!0),[q,x]=z.useState(""),[C,H]=z.useState(!1),[G,te]=z.useState(""),[pe,Ne]=z.useState({state:"disconnected"}),[we,se]=z.useState(!1),[_e,Ce]=z.useState(!1),[qe,Ie]=z.useState(!1),[A,ge]=z.useState(""),[ue,P]=z.useState(""),[k,J]=z.useState(!1),[he,fe]=z.useState(!1),[ne,je]=z.useState(20),[Te,Se]=z.useState(["test-cases","coverage"]),[Ee,Ke]=z.useState(),[Me,kt]=z.useState(),[Bt,Tt]=z.useState([]),[Wt,Ze]=z.useState(!1),[lt,it]=z.useState(tv),[Oe,pt]=z.useState(),[jt,Fe]=z.useState(""),[ot,Je]=z.useState(""),[Ye,Ge]=z.useState(!1),[Et,Qe]=z.useState(!1),Pe=_o[$.kind],sn=Pe.tier==="free-tier"||Pe.tier==="cloud"||Pe.tier==="custom"&&!S2($.baseUrl),la=$.kind!=="rules"&&!($.model?.trim()||!Wt&&Pe.defaultModel),st=$.kind==="codex",ze=pe.state==="pending"&&"loginId"in pe?pe:void 0,$e=Oe?.status==="queued"||Oe?.status==="running",ga=$e?Oe.events.at(-1):void 0,ln=$e?Oe.progress:void 0,It=Et||w||$e||!X,Rt=sn&&!k,La=st&&pe.state!=="connected",on=X?.connection,Kt=!!(on&&on.provider.kind===$.kind&&(on.provider.baseUrl??"")===($.baseUrl?.trim()??"")&&Date.parse(on.expiresAt)>Date.now()),At=Pe.key==="required"&&!C&&!Kt&&!j.trim(),Ft=B&&!la&&!Rt&&!La&&!At,fn=!It&&Ft,Ua=fn&&!!(i&&y.trim()),Qt=$.kind==="rules",Cn=st?"ChatGPT / Codex":Pe.label,_n=Pe.key==="none"?void 0:j.trim()||void 0,vn={projectId:n,apiKey:_n,useSavedKey:Kt&&!_n},hn=Array.from(new Set([...Pe.defaultModel?[Pe.defaultModel]:[],...Bt])),Yt=$.model??Pe.defaultModel??"",Tn=Wt||!hn.length||!!(Yt&&!hn.includes(Yt)),En=Ye||Oe?.error?.code==="auth-not-ready";z.useEffect(()=>{let ie=!1;return F0(n).then(Ae=>{ie||(Y(Ae),Ae.connection&&ee(Ae.connection.provider))}).catch(()=>{ie||Y({supported:!1})}),()=>{ie=!0}},[n]),z.useEffect(()=>{if(!on)return;const ie=window.setTimeout(()=>{Y(Ae=>Ae?.connection?.expiresAt===on.expiresAt?{supported:Ae.supported}:Ae),Kt&&!_n&&Q(!1)},Math.max(0,Date.parse(on.expiresAt)-Date.now()));return()=>window.clearTimeout(ie)},[on?.expiresAt,Kt,_n]),z.useEffect(()=>{if(Pe.key!=="required"||Rt)return;let ie=!1;return V0($.kind).then(({configured:Ae})=>{ie||H(Ae)}).catch(()=>{ie||H(!1)}),()=>{ie=!0}},[$.kind,Pe.key,Rt]),z.useEffect(()=>{if(!Oe||!$e)return;let ie=!1,Ae=!1;const Xt=window.setInterval(()=>{Ae||(Ae=!0,eS(n,Oe.id).then(async Dt=>{ie||(pt(Dt),Dt.status==="completed"&&await l(n))}).catch(Dt=>{ie||Je(Dt instanceof Error?Dt.message:String(Dt))}).finally(()=>{Ae=!1}))},1500);return()=>{ie=!0,window.clearInterval(Xt)}},[n,Oe?.id,$e]),z.useEffect(()=>{if(!st||Rt)return;let ie=!1;return se(!0),hg().then(Ae=>{ie||(Ne(Ae),Ae.state==="connected"&&On())}).catch(Ae=>{ie||Ne({state:"failed",message:Ae instanceof Error?Ae.message:String(Ae)})}).finally(()=>{ie||se(!1)}),()=>{ie=!0}},[st,Rt]),z.useEffect(()=>{if(Rt||pe.state!=="pending")return;let ie=!1,Ae=!1;const Xt=window.setInterval(()=>{Ae||(Ae=!0,hg(ze?.loginId).then(Dt=>{ie||Dt.state==="pending"||(Ne(Dt),Dt.state==="connected"&&On())}).catch(()=>{ie||Ne({state:"failed",message:"Could not check the sign-in. Start again."})}).finally(()=>{Ae=!1}))},1800);return()=>{ie=!0,window.clearInterval(Xt)}},[pe.state,Rt,ze?.loginId]);function ct(){Ke(void 0),kt(void 0),Fe(""),Je(""),S(""),te("")}function wt(ie){return!(ie instanceof sa)||!["missing-api-key","invalid-api-key","access-denied"].includes(ie.code)?!1:(Q(!1),ie.code==="missing-api-key"&&vn.useSavedKey&&Y(Ae=>Ae&&{supported:Ae.supported}),te(ie.message),!0)}async function Br(){if(!fn)return;b(!0),S(""),te("");const ie=ae==="auto"?new RegExp("\\p{Script=Thai}","u").test(y)?"th":f:ae;try{const Ae=await G0({topic:y,language:ie,provider:$,...vn,allowExternal:k});ct(),v(Ae.instruction)}catch(Ae){wt(Ae)||S(Ae instanceof Error?Ae.message:String(Ae))}finally{b(!1)}}async function Ir(){if(Ua){Qe(!0),Je(""),te(""),Ge(!1),Fe(""),Ke(void 0),pt(void 0);try{const ie=await H0({instruction:y,startPath:D||void 0,scopePath:V||void 0,language:ae==="auto"?void 0:ae,outputs:Te,provider:$,...vn,allowExternal:k,reuseObservations:he,maxPages:ne});Ke(ie.plan),kt(ie.usage),ie.providerWarningReason?Fe({rulePlanReason:ie.providerWarningReason}):ie.providerWarning&&Fe(ie.providerWarning)}catch(ie){wt(ie)||Je(ie instanceof Error?ie.message:String(ie))}finally{Qe(!1)}}}async function An(){Qe(!0),Je("");try{await o(n,T)}catch(ie){Je(ie instanceof Error?ie.message:String(ie))}finally{Qe(!1)}}async function oa(){Qe(!0),ct(),x("");try{const ie=await fg($,k,vn);if(Tt(ie.models),Q(ie.available),ie.available){const Ae={...$,model:$.model?.trim()||Pe.defaultModel||ie.models[0]};if(ee(Ae),Z&&X?.supported&&_n)try{Y(await Y0(n,Ae,_n)),F("")}catch{x("The key could not be saved. This connection is available in the current tab.")}Fe({en:`Connected (${ie.local?"local":"external"}). Models available: ${ie.models.length}.`,th:`เชื่อมต่อ${ie.local?"บริการในเครื่อง":"บริการภายนอก"}แล้ว พบ ${ie.models.length} โมเดล`})}else(!ie.error||!wt(new sa(ie.error.code,ie.error.message)))&&te(ie.error?.message??"Could not connect.")}catch(ie){Q(!1),wt(ie)||te(ie instanceof Error?ie.message:String(ie))}finally{Qe(!1)}}async function Ai(){Qe(!0),x("");try{await X0(n),Y(ie=>ie&&{supported:ie.supported}),_n||Q(!1),ct()}catch{x("Could not remove the saved key.")}finally{Qe(!1)}}async function On(){Qe(!0),ct();try{const ie=await fg({kind:"codex"},k);if(Tt(ie.models),Q(ie.available),!ie.available){te(ie.error?.message??"Could not load models from Codex.");return}ee(Ae=>Ae.kind==="codex"?{...Ae,model:Ae.model??ie.models[0]}:Ae),Fe({en:`ChatGPT connected. Models available: ${ie.models.length}.`,th:`เชื่อมต่อ ChatGPT แล้ว พบ ${ie.models.length} โมเดล`})}catch(ie){Q(!1),te(ie instanceof Error?ie.message:String(ie))}finally{Qe(!1)}}async function za(){if(!Rt){ct(),P(""),Qe(!0),Ce(!0);try{const ie=await Z0();Ne(ie),ie.state==="connected"&&await On()}catch(ie){Ne({state:"failed",message:ie instanceof Error?ie.message:String(ie)})}finally{Ce(!1),Qe(!1)}}}async function mr(){if(ze){Qe(!0);try{Ne(await Wu(ze.loginId))}catch(ie){Je(ie instanceof Error?ie.message:String(ie))}finally{Qe(!1)}}}async function Ma(){Qe(!0),ge("");try{const ie=await K0();ct(),Ne(ie),Q(!1),ee({kind:"codex"}),Tt([]),Ze(!1),Ie(!1),Fe("Signed out of Codex on this device.")}catch(ie){ge(ie instanceof Error?ie.message:String(ie))}finally{Qe(!1)}}async function Ba(){if(!(!Ee||Et)){Qe(!0),_(!0),Je(""),Ge(!1);try{pt(await W0(n,Ee.id))}catch(ie){ie instanceof sa&&ie.code==="auth-not-ready"?Ge(!0):Je(ie instanceof Error?ie.message:String(ie))}finally{_(!1),Qe(!1)}}}async function kn(){if(Oe){Qe(!0),Je("");try{pt(await tS(n,Oe.id))}catch(ie){Je(ie instanceof Error?ie.message:String(ie))}finally{Qe(!1)}}}return a.jsxs("section",{className:"grid min-w-0 grid-cols-1 gap-4","aria-label":d("AI Scout workspace"),children:[a.jsxs("header",{className:"flex flex-wrap items-center justify-between gap-5 rounded-2xl border border-indigo-200 bg-linear-to-br from-indigo-950 via-indigo-900 to-indigo-700 p-6 text-white shadow-sm sm:p-7",children:[a.jsxs("div",{className:"flex items-start gap-3",children:[a.jsx("span",{"aria-hidden":"true",className:"grid h-11 w-11 shrink-0 place-items-center rounded-xl bg-white/15 text-xl",children:"✦"}),a.jsxs("div",{children:[a.jsx("h2",{className:"text-2xl font-bold tracking-tight sm:text-3xl",children:"AI Scout"}),a.jsx("p",{className:"mt-1 text-sm text-indigo-100",children:p?"เชื่อมผู้ให้บริการ AI หรือใช้กฎบนเครื่อง จากนั้นเขียนงาน QA และตรวจแผนก่อนรัน":"Connect an AI provider or use local rules. Describe the QA task and review its plan before running."})]})]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("a",{href:"#local-mcp",onClick:()=>{g.current&&(g.current.open=!0)},className:"qa-button bg-white text-indigo-950 hover:bg-indigo-50",children:p?"ตั้งค่า MCP":"Set up MCP"}),a.jsxs("a",{href:`/guide/index.html?lang=${f}`,target:"_blank",rel:"noreferrer",className:"qa-button border border-white/30 text-white hover:bg-white/10",children:[p?"คู่มือ 5 ขั้น":"5-step guide"," ",a.jsx("span",{"aria-hidden":"true",children:"↗"})]})]})]}),a.jsxs("form",{onSubmit:ie=>{ie.preventDefault(),Ir()},className:"qa-workspace-form grid grid-cols-1 items-start gap-4 lg:grid-cols-[minmax(0,0.84fr)_minmax(0,1.16fr)]",children:[a.jsxs("section",{className:Ns,children:[a.jsx(hd,{step:1,title:p?"เชื่อม AI และเลือกโมเดล":"Connect AI & choose a model",hint:p?"เริ่มด้วยกฎบนเครื่องได้ทันที หรือเลือกผู้ให้บริการด้านล่าง":"Start with local rules or connect a provider below."}),a.jsxs("div",{className:"grid min-w-0 gap-3",children:[a.jsxs("label",{children:[d("Provider"),a.jsx("select",{"aria-label":d("Provider"),value:$.kind,disabled:It,onChange:ie=>{const Ae=ie.target.value;p1(Ae)&&(ze&&Wu(ze.loginId).catch(()=>{}),Ne({state:"disconnected"}),se(!1),Ie(!1),ge(""),P(""),ct(),Q(!1),J(!1),F(""),x(""),H(!1),Tt([]),Ze(!1),ee({kind:Ae,model:_o[Ae].defaultModel}))},children:b2.map(([ie,Ae])=>a.jsx("optgroup",{label:d(Ae),children:Object.entries(_o).filter(([,Xt])=>Xt.tier===ie).map(([Xt,Dt])=>a.jsx("option",{value:Xt,children:d(Dt.label)},Xt))},ie))})]}),Qt&&a.jsx("button",{type:"button",className:$n,disabled:It||B,onClick:()=>Q(!0),children:B?p?"พร้อมใช้กฎบนเครื่อง":"Local rules ready":p?"ใช้กฎบนเครื่อง":"Use local rules"}),(Pe.tier==="custom"||Pe.tier==="local"&&!Qt)&&a.jsxs("label",{children:[d("Base URL"),a.jsx("input",{value:$.baseUrl??"",disabled:It,onChange:ie=>{ct(),Q(!1),J(!1),Tt([]),F(""),ee({...$,baseUrl:ie.target.value})},placeholder:Pe.baseUrl??"http://localhost:8080/v1"})]}),sn&&a.jsxs("fieldset",{className:"grid min-w-0 gap-2 rounded-xl border border-slate-200 bg-slate-50 p-3",children:[a.jsx("legend",{className:"px-1 text-sm font-semibold text-slate-900",children:p?"1. อนุญาตการเชื่อมต่อ":"1. Allow the connection"}),a.jsxs("label",{className:"qa-check",children:[a.jsx("input",{type:"checkbox",checked:k,disabled:It,onChange:ie=>{const Ae=ie.target.checked;ct(),J(Ae),Ae||Q(!1),st&&(Ae||(ze&&Wu(ze.loginId).catch(()=>{}),Ne({state:"disconnected"}),Ie(!1),ge(""),P("")),se(Ae))}}),p?"อนุญาตให้เชื่อมต่อผู้ให้บริการนี้และส่งข้อความเมื่อเจนคำหรือสร้างแผน":"I approve connecting to this provider and sending my text when drafting a prompt or creating a plan."]})]}),st&&!Rt&&a.jsxs("section",{className:"grid gap-2 rounded-xl border border-indigo-100 bg-indigo-50 p-3 text-sm text-indigo-950","aria-label":d("ChatGPT connection"),children:[a.jsx("h4",{className:"font-semibold",children:p?"2. ลงชื่อเข้าใช้ ChatGPT":"2. Sign in to ChatGPT"}),ze?a.jsxs(a.Fragment,{children:[a.jsx("p",{children:p?"กรอกรหัสนี้ที่หน้า OpenAI แล้วกลับมาที่ LazyScout":"Enter this code on the OpenAI page, then return to LazyScout."}),a.jsx("p",{className:"flex w-fit items-center gap-2 rounded-lg border border-indigo-200 bg-white px-3 py-2 font-semibold tracking-widest",children:a.jsx("code",{children:ze.userCode})}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("button",{type:"button",className:$n,onClick:async()=>{try{await navigator.clipboard.writeText(ze.userCode),P("Code copied")}catch{P("Select and copy the code above.")}},children:p?"คัดลอกรหัส":"Copy code"}),a.jsx("a",{className:Cs,href:ze.verificationUrl,target:"_blank",rel:"noreferrer",children:p?"กรอกรหัสที่ OpenAI":"Enter code on OpenAI"})]}),ue&&a.jsx("p",{role:"status",children:d(ue)}),a.jsx("p",{role:"status",children:p?"กำลังรอให้ยืนยันการลงชื่อเข้าใช้…":"Waiting for you to confirm sign-in…"}),a.jsx("button",{type:"button",className:$n,disabled:Et,onClick:()=>{mr()},children:p?"ยกเลิกการลงชื่อเข้าใช้":"Cancel sign-in"})]}):pe.state==="connected"?a.jsxs(a.Fragment,{children:[a.jsx("p",{role:"status",className:"font-semibold text-emerald-800",children:p?"เชื่อมบัญชี ChatGPT จาก Codex บนเครื่องแล้ว":"ChatGPT connected using the Codex sign-in on this device."}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("a",{className:$n,href:"https://chatgpt.com/",target:"_blank",rel:"noreferrer",children:p?"เปิด ChatGPT":"Open ChatGPT"}),!qe&&a.jsx("button",{type:"button",className:"btn btn-danger",disabled:It,onClick:()=>Ie(!0),children:p?"ออกจากบัญชี":"Sign out"})]}),qe&&a.jsxs("div",{className:"grid gap-2 rounded-lg border border-red-200 bg-white p-3 text-red-950",children:[a.jsx("p",{children:p?"การยืนยันจะออกจากบัญชี ChatGPT ที่ Codex และ LazyScout ใช้ร่วมกันบนเครื่องนี้":"This signs out the ChatGPT account that Codex and LazyScout share on this device."}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("button",{type:"button",className:"btn btn-danger",disabled:It,onClick:()=>{Ma()},children:p?"ยืนยันออกจากบัญชี":"Confirm sign out"}),a.jsx("button",{type:"button",className:$n,disabled:It,onClick:()=>{Ie(!1),ge("")},children:p?"ยกเลิก":"Cancel"})]}),A&&a.jsx("p",{role:"alert",children:A})]})]}):we||_e||pe.state==="pending"?a.jsx("p",{role:"status",children:pe.state==="pending"?p?"กำลังรอให้ยืนยันการลงชื่อเข้าใช้จากแท็บเดิม…":"Waiting for sign-in from the original tab…":_e?p?"กำลังขอรหัสลงชื่อเข้าใช้…":"Getting your sign-in code…":p?"กำลังตรวจบัญชี ChatGPT ที่เชื่อมกับ Codex บนเครื่อง…":"Checking the ChatGPT sign-in on this device…"}):a.jsxs(a.Fragment,{children:[pe.state==="failed"&&a.jsx("p",{role:"alert",children:pe.message&&d(pe.message)}),a.jsx("p",{children:p?"ลงชื่อเข้าใช้ที่หน้า OpenAI ด้วยรหัสที่จะขึ้นใน LazyScout":"Sign in on OpenAI with the code shown here."}),a.jsx("button",{type:"button",className:Cs,disabled:It,onClick:()=>{za()},children:p?"เชื่อม ChatGPT":"Connect ChatGPT"})]})]}),!Qt&&!Rt&&a.jsxs(a.Fragment,{children:[Pe.key!=="none"&&a.jsxs("section",{className:"grid gap-2 rounded-xl border border-indigo-200 bg-indigo-50 p-3",children:[Pe.key==="required"&&a.jsx("h4",{className:"text-sm font-semibold text-indigo-950",children:p?`2. เชื่อม ${Cn} ด้วย API key`:`2. Connect ${Cn} with an API key`}),a.jsxs("label",{children:[d("API key"),Pe.key==="optional"?p?" (ไม่บังคับ)":" (optional)":"",a.jsx("input",{type:"password",autoComplete:"off",spellCheck:!1,maxLength:1024,disabled:It,"aria-describedby":"qa-api-key-help","aria-required":Pe.key==="required"&&!C&&!Kt,placeholder:p?"วาง API key ที่นี่":"Paste your API key here",value:j,onChange:ie=>{ct(),Tt([]),Q(!1),F(ie.target.value)}})]}),a.jsx("small",{id:"qa-api-key-help",className:"text-slate-600",children:Kt?p?"เว้นว่างเพื่อใช้ API key ที่บันทึกไว้ในโปรเจกต์นี้":"Leave this blank to use the API key saved for this project.":C?p?"เครื่องนี้มี API key ตั้งไว้แล้ว เว้นช่องว่างเพื่อใช้คีย์เดิม หรือกรอกคีย์อื่นแทน":"A key is configured on this device. Leave this blank to use it or paste another key.":Pe.key==="required"?p?"สร้างคีย์จากบัญชีผู้ให้บริการ แล้วนำมาวางในช่องนี้":"Create a key in your provider account and paste it here.":p?"กรอกเฉพาะเมื่อเซิร์ฟเวอร์นี้ขอ API key":"Enter a key if this server requires one."}),Pe.keyUrl&&a.jsx("a",{className:"justify-self-start text-sm font-semibold text-indigo-800 underline underline-offset-4",href:Pe.keyUrl,target:"_blank",rel:"noreferrer",children:p?`เปิดหน้าสร้าง API key ของ ${Cn}`:`Get a ${Cn} API key`}),X?.supported&&a.jsxs("label",{className:"qa-check",children:[a.jsx("input",{type:"checkbox",checked:Z,disabled:It,onChange:ie=>R(ie.target.checked)}),p?"จำ API key ในโปรเจกต์นี้ 24 ชั่วโมง":"Remember the API key for this project for 24 hours"]}),Kt&&a.jsx("button",{type:"button",className:$n,disabled:It,onClick:()=>{Ai()},children:p?"ล้างคีย์ที่บันทึกไว้":"Forget saved key"}),q&&a.jsx("p",{role:"status",className:"text-xs text-indigo-900",children:d(q)})]}),Pe.tier==="free-tier"&&a.jsx("small",{className:"text-slate-600",children:$.kind==="openrouter-free"?"Uses free models only. The provider applies rate limits.":"Free quota depends on the model, region and account plan. Check your provider before running."}),$.kind==="compatible"&&a.jsx("small",{className:"text-slate-600",children:d("External custom URLs must also be configured on the LazyScout server.")}),!At&&!La&&a.jsxs("div",{className:"grid min-w-0 gap-3",children:[sn&&a.jsx("h4",{className:"text-sm font-semibold text-slate-900",children:p?"3. เลือกโมเดล":"3. Choose a model"}),a.jsx("button",{type:"button",className:$n,disabled:It||(st?La:Rt||At),onClick:()=>{st?On():oa()},children:d(st?"Refresh Codex models":"Test connection & load models")}),hn.length>0&&a.jsxs("label",{children:[d("Model"),a.jsxs("select",{"aria-label":d("Model"),disabled:It,value:Tn?fo:Yt,onChange:ie=>{const Ae=ie.target.value;ct(),$.kind==="ollama"&&Q(!1),Ze(Ae===fo),ee({...$,model:Ae===fo?"":Ae})},children:[a.jsx("option",{value:"",disabled:!0,children:p?"เลือกโมเดล":"Select a model"}),hn.map(ie=>a.jsx("option",{value:ie,children:ie},ie)),a.jsx("option",{value:fo,children:p?"กรอก Model ID เอง":"Enter model ID manually"})]})]}),Tn&&a.jsxs("label",{children:[hn.length?"Model ID":d("Model"),a.jsx("input",{"aria-label":hn.length?"Model ID":d("Model"),value:Yt,placeholder:p?"กรอก Model ID หรือโหลดรายการด้านบน":"Enter a model ID or load the list above",disabled:It,onChange:ie=>{ct(),$.kind==="ollama"&&Q(!1),ee({...$,model:ie.target.value})}})]}),hn.length>0&&a.jsx("p",{className:"break-all text-xs text-slate-600","aria-live":"polite",children:Yt&&a.jsxs(a.Fragment,{children:[a.jsx("strong",{className:"text-indigo-800",children:p?"เลือกแล้ว":"Selected"})," · ",Yt]})})]}),G&&a.jsx("p",{role:"alert",className:"text-sm text-red-800",children:d(G)})]})]})]}),a.jsxs("section",{className:Ns,children:[a.jsx(hd,{step:2,title:p?"กำหนดงานทดสอบ":"Describe the test",hint:p?"ตรวจ URL ระบุสิ่งที่อยากทดสอบ และเลือกผลลัพธ์ที่ต้องการ":"Confirm the URL, describe what to test, and choose your outputs."}),Ft?a.jsxs("div",{className:"grid min-w-0 gap-4",children:[a.jsxs("label",{children:[d("Target URL"),a.jsx("input",{type:"url",value:i||T,readOnly:!!i,onChange:ie=>L(ie.target.value),placeholder:"http://localhost:5500"})]}),!i&&a.jsx("button",{type:"button",className:$n,disabled:Et||!T.trim(),onClick:()=>{An()},children:d("Set project target")}),a.jsxs("div",{className:"grid min-w-0 gap-2",children:[a.jsx("label",{htmlFor:"qa-testing-instruction",children:d("Testing instruction")}),a.jsx("div",{className:"overflow-hidden rounded-xl","aria-busy":w,children:a.jsx("textarea",{id:"qa-testing-instruction",ref:m,className:w?"block blur-[2px]":"block",required:!0,rows:4,maxLength:2e3,value:y,disabled:w,onChange:ie=>{ct(),v(ie.target.value)},placeholder:p?"เช่น ตรวจช่องค้นหาและตัวกรองในหน้าสมาชิก แล้วสร้างเคสทดสอบภาษาไทย":"Example: Check Search and Filter on the Members page and create English test cases."})})]}),a.jsxs("div",{className:"grid gap-2 rounded-xl border border-indigo-100 bg-indigo-50 p-3",children:[a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsxs("button",{type:"button",className:$n,disabled:!fn,onClick:()=>{Br()},children:[a.jsx("span",{"aria-hidden":"true",children:"✦"})," ",w?p?"กำลังเจนคำ…":"Generating…":Qt?p?"ช่วยร่างคำ":"Draft with rules":p?"เจนคำ":"Generate prompt"]}),a.jsx("button",{type:"submit",className:Cs,disabled:!Ua,children:Qt?p?"สร้างแผน":"Create plan":p?`ถาม ${Cn}`:`Ask ${Cn}`})]}),a.jsx("p",{className:"text-xs text-slate-700","aria-live":"polite",children:Qt?p?"ร่างจากตัวอย่างด้วยกฎบนเครื่อง ใช้ได้ทันที":"Draft from a template using local rules.":`${Cn}${Yt?` · ${Yt}`:""}`}),O&&a.jsxs("div",{role:"alert",className:"grid gap-1 text-xs text-red-900",children:[a.jsx("p",{children:d(O)}),a.jsx("p",{children:a.jsx("a",{className:"font-semibold underline underline-offset-2",href:`/guide/index.html?lang=${f}#${f}-3`,target:"_blank",rel:"noreferrer",children:p?"ดูวิธีเชื่อมผู้ให้บริการ":"Provider setup guide"})})]})]}),a.jsxs("fieldset",{children:[a.jsx("legend",{className:"mb-2 font-semibold text-slate-900",children:d("Requested outputs")}),a.jsx("div",{className:"grid gap-2 sm:grid-cols-2",children:ev.map(([ie,Ae])=>a.jsxs("label",{className:"qa-check rounded-lg border border-slate-200 p-2.5 has-checked:border-indigo-300 has-checked:bg-indigo-50",children:[a.jsx("input",{type:"checkbox",checked:Te.includes(ie),onChange:Xt=>{ct(),Se(Xt.target.checked?[...Te,ie]:Te.filter(Dt=>Dt!==ie))}})," ",d(Ae)]},ie))})]}),a.jsxs("details",{className:"rounded-xl border border-slate-200 bg-slate-50 p-3",children:[a.jsx("summary",{className:"cursor-pointer font-semibold text-slate-800",children:d("Advanced settings")}),a.jsxs("div",{className:"mt-3 grid gap-3 sm:grid-cols-2",children:[a.jsxs("label",{children:[d("Start path"),a.jsx("input",{value:D,onChange:ie=>{ct(),M(ie.target.value)},placeholder:"/users"})]}),a.jsxs("label",{children:[d("Scope path"),a.jsx("input",{value:V,onChange:ie=>{ct(),K(ie.target.value)},placeholder:"/users"})]}),a.jsxs("label",{children:[d("Test Case language"),a.jsxs("select",{value:ae,onChange:ie=>{ct(),I(ie.target.value)},children:[a.jsx("option",{value:"auto",children:d("Match the instruction")}),a.jsx("option",{value:"th",children:d("Thai")}),a.jsx("option",{value:"en",children:d("English")})]})]}),a.jsxs("label",{children:[d("Maximum pages"),a.jsx("input",{type:"number",min:"1",max:"20",value:ne,onChange:ie=>{ct(),je(Number(ie.target.value))}})]}),a.jsxs("label",{className:"qa-check sm:col-span-2",children:[a.jsx("input",{type:"checkbox",checked:he,onChange:ie=>{ct(),fe(ie.target.checked)}})," ",d("Reuse existing observations where possible")]})]})]}),i&&a.jsx("button",{type:"button",onClick:c,className:"justify-self-start text-xs font-semibold text-indigo-800 underline underline-offset-4",children:p?"ตั้งค่าเซสชันของเว็บทดสอบ":"Website browser session settings"})]}):a.jsx("p",{className:"rounded-xl border border-dashed border-indigo-200 bg-indigo-50/60 p-4 text-sm text-slate-700",children:p?"เชื่อม AI และเลือกโมเดลให้พร้อมเพื่อเปิดส่วนนี้ หรือเลือกใช้กฎบนเครื่อง":"Connect a provider and choose a model, or activate local rules to open this section."})]})]}),jt&&a.jsx("p",{role:"status",className:"rounded-xl border border-indigo-200 bg-indigo-50 px-4 py-3 text-sm text-indigo-950",children:typeof jt=="string"?d(jt):"rulePlanReason"in jt?`${d(jt.rulePlanReason)} ${d("The rule-based plan is ready to review.")}`:jt[f]}),En&&a.jsxs("div",{className:"grid gap-2 rounded-xl border border-amber-200 bg-amber-50 px-4 py-3 text-sm text-amber-950",children:[a.jsx("p",{role:"alert",children:p?"ก่อนเริ่มสำรวจ ให้ตรวจสอบเซสชันของเว็บทดสอบ เมื่อเซสชันพร้อมใช้ ให้กลับมากดอนุมัติแผน":"Verify the test website session before scouting. Once it is ready, return and approve the plan."}),a.jsx("button",{type:"button",className:$n,onClick:c,children:p?"เปิดการตั้งค่าเซสชัน":"Open Browser Session"})]}),ot&&a.jsx("p",{role:"alert",className:"rounded-xl border border-red-200 bg-red-50 px-4 py-3 text-sm text-red-900",children:d(ot)}),Ee&&a.jsxs("section",{className:`${Ns} grid gap-3 text-sm`,"aria-label":d("Plan preview"),children:[a.jsx(hd,{step:3,title:p?"ตรวจแผนก่อนเริ่ม":"Plan preview",hint:p?"ตรวจ URL, เส้นทาง และงานที่ระบบจะทำก่อนกดอนุมัติ":"Check the target, paths, and proposed steps before you approve."}),a.jsxs("p",{children:[d("Target:")," ",Ee.targetUrl," ",d("· Scope:")," ",Ee.scopePath||"/"," ",d("· Start:")," ",Ee.startPath||"/"]}),a.jsx("ol",{className:"list-decimal space-y-1 pl-5",children:Ee.steps.map((ie,Ae)=>a.jsx("li",{children:ie},Ae))}),a.jsx("ul",{className:"list-disc space-y-1 pl-5",children:Ee.objectives.map(ie=>a.jsx("li",{children:ie},ie))}),Me&&a.jsxs("p",{children:[d("AI tokens:")," ",Me.inputTokens??"—"," ",d("input,")," ",Me.outputTokens??"—"," ",d("output")]}),a.jsxs("p",{children:[d("Outputs:")," ",Ee.outputs.map(ie=>d(ev.find(([Ae])=>Ae===ie)?.[1]??ie)).join(", ")||d("none")," ",d("· Limit:")," ",Ee.limits.maxPages," ",d("pages,")," ",Ee.limits.maxActions," ",d("actions,")," ",Ee.limits.timeoutMs," ",d("ms")]}),a.jsx("button",{className:Cs,disabled:Et||!!Oe,onClick:()=>{Ba()},children:d("Approve and start")})]}),Oe&&a.jsxs("section",{className:`${Ns} grid gap-3 text-sm`,"aria-label":d("Agent execution"),children:[a.jsxs("h3",{className:"font-bold text-slate-950",children:[d("Execution:")," ",d(Oe.status)]}),Oe.error&&Oe.error.code!=="auth-not-ready"&&a.jsx("p",{role:"alert",children:Oe.error.message}),a.jsx("ol",{className:"max-h-52 list-decimal space-y-1 overflow-y-auto rounded-xl bg-slate-50 py-3 pr-3 pl-8",children:Oe.events.map((ie,Ae)=>a.jsxs("li",{children:[ie.step,": ",ie.message]},`${ie.at}-${Ae}`))}),Oe.summary&&a.jsxs(a.Fragment,{children:[a.jsxs("p",{children:[Oe.summary.pages," ",d("pages ·")," ",Oe.summary.states," ",d("states ·")," ",Oe.summary.testCases," ",d("test cases")]}),a.jsxs("p",{children:[Oe.summary.exploredActions," ",d("of")," ",Oe.summary.discoveredInteractions," ",d("interactions explored ·")," ",Oe.summary.failedActions," ",d("failed ·")," ",Oe.summary.blockedActions," ",d("blocked")]}),Oe.summary.artifacts.length>0&&a.jsx("ul",{children:Oe.summary.artifacts.map(ie=>a.jsx("li",{children:a.jsx("a",{className:"font-semibold text-indigo-800 underline underline-offset-4",href:lf(n,ie),children:ie.endsWith("-bug-draft.md")?"Download bug draft":"Download run report"})},ie))})]})]}),Oe?.status==="completed"&&a.jsxs("section",{className:`${Ns} grid gap-4`,children:[fn&&a.jsx("button",{type:"button",className:`${$n} justify-self-start`,onClick:()=>{ct(),fe(!0),m.current?.focus()},children:p?"ทำงานต่อจากผลสำรวจเดิม":"Follow up using saved observations"}),fn&&!Qt&&!st&&Oe.summary&&a.jsx(y2,{providerLabel:Cn,external:sn,request:ie=>nS(n,Oe.id,{provider:$,allowExternal:k,...vn},ie)},JSON.stringify([Oe.id,$.kind,$.model,$.baseUrl])),a.jsxs("fieldset",{children:[a.jsx("legend",{className:"mb-3 font-bold text-slate-950",children:d("Report sections")}),a.jsx("div",{className:"flex flex-wrap gap-2",children:tv.map(ie=>a.jsxs("label",{className:"qa-check rounded-lg border border-slate-200 p-2.5 has-checked:bg-indigo-50",children:[a.jsx("input",{type:"checkbox",checked:lt.includes(ie),onChange:Ae=>it(Xt=>Ae.target.checked?[...Xt,ie]:Xt.filter(Dt=>Dt!==ie))})," ",d(ie)]},d(ie)))}),lt.length>0&&a.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[a.jsx("a",{className:Cs,href:go(n,"xlsx",lt),children:"Excel"}),a.jsx("a",{className:$n,href:go(n,"csv",lt),children:"CSV"}),a.jsx("a",{className:$n,href:go(n,"markdown",lt),children:"Markdown"})]})]})]}),(w||E||$e)&&a.jsx("dialog",{ref:ie=>{ie&&!ie.open&&ie.showModal()},onCancel:ie=>ie.preventDefault(),className:"fixed inset-0 m-auto max-h-[calc(100dvh_-_2rem)] w-[calc(100%_-_2rem)] max-w-sm overflow-y-auto rounded-3xl border border-indigo-200/20 bg-slate-950 text-slate-100 shadow-2xl backdrop:bg-slate-950/55 backdrop:backdrop-blur-sm","aria-labelledby":"qa-scout-progress-title",children:a.jsxs("div",{className:"grid justify-items-center gap-5 bg-linear-to-b from-indigo-950/85 to-slate-950 px-6 py-8 text-center",children:[a.jsxs("div",{className:"relative grid size-20 place-items-center rounded-full bg-indigo-400/10 ring-8 ring-indigo-400/5","aria-hidden":"true",children:[a.jsx("span",{className:"absolute inset-0 rounded-full border-3 border-indigo-300/15 border-t-cyan-300 border-r-indigo-400 motion-safe:animate-spin"}),a.jsx("span",{className:"grid size-12 place-items-center rounded-2xl bg-indigo-400/15 text-2xl text-indigo-100 motion-safe:animate-[spin_1.8s_linear_infinite_reverse]",children:"✦"})]}),a.jsxs("div",{className:"grid gap-2",role:"status",children:[a.jsx("h2",{id:"qa-scout-progress-title",className:"text-lg font-semibold text-white",children:w?p?"กำลังเจนคำสั่งทดสอบ…":"Drafting the testing instruction…":E||Oe?.status==="queued"?p?"กำลังเตรียม Scout…":"Preparing Scout…":p?"AI Scout กำลังสำรวจ…":"AI Scout is running…"}),!w&&a.jsx("p",{className:"text-sm text-slate-300",children:ga?p?x2[ga.step]??ga.message:ga.message:p?"กำลังเตรียมงานตามแผนที่อนุมัติ":"Preparing the approved plan."})]}),!w&&ln&&a.jsx("dl",{className:"flex w-full flex-wrap justify-center gap-x-4 gap-y-2 rounded-2xl bg-white/5 px-3 py-3",children:[{label:p?"หน้า":"Pages",value:ln.pages},{label:p?"สถานะ UI":"UI states",value:ln.states},{label:p?"ลองทำ":"Attempted",value:ln.actions},{label:p?"ล้มเหลว":"Failed",value:ln.failed},{label:p?"ถูกบล็อก":"Blocked",value:ln.blocked}].map(({label:ie,value:Ae})=>a.jsxs("div",{className:"flex flex-col",children:[a.jsx("dt",{className:"order-2 text-xs text-slate-300",children:ie}),a.jsx("dd",{className:"font-semibold text-white tabular-nums",children:Ae})]},ie))}),!w&&ot&&a.jsx("p",{role:"alert",className:"text-sm text-red-200",children:d(ot)}),!w&&$e&&a.jsx("button",{type:"button",className:"rounded-lg border border-slate-600 px-4 py-2 text-sm font-medium text-slate-100 transition-colors hover:bg-slate-800 focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-indigo-300 disabled:opacity-60",disabled:Et,onClick:()=>{kn()},children:p?"หยุดการรัน":"Cancel run"})]})}),a.jsx(g2,{projectId:n,detailsRef:g})]})}function w2({projects:n,activeProjectId:i,result:l,collapsed:o,onToggleCollapsed:c,onSelect:d,onNew:f,onDelete:p,onRename:g,onSettings:m,workspaceRoot:y,onOpenWorkspace:v}){const{ui:w,language:b,toggleLanguage:E,t:_}=Le(),[O,S]=z.useState(),[T,L]=z.useState(),[D,M]=z.useState("");return a.jsxs("aside",{className:`workspace-sidebar ${o?"is-collapsed":""}`,children:[a.jsxs("div",{className:"sidebar-brand",children:[a.jsx("span",{className:"brand-mark",children:"LS"}),a.jsx("b",{children:"LazyScout"}),a.jsx("button",{type:"button",className:"sidebar-collapse",onClick:c,title:w(o?"Expand sidebar":"Collapse sidebar"),children:o?"›":"‹"})]}),a.jsxs("button",{type:"button",className:"new-project-btn",onClick:f,title:_("newProject"),children:[a.jsx("span",{children:"+"}),a.jsx("em",{children:_("newProject")})]}),a.jsxs("div",{className:"sidebar-label",children:[a.jsx("span",{children:_("projects")}),a.jsx("b",{children:n.length})]}),a.jsx("div",{className:"project-list",children:n.map(V=>a.jsx("div",{className:`project-item ${V.id===i?"active":""}`,children:T===V.id?a.jsxs("form",{className:"project-rename",onSubmit:K=>{K.preventDefault(),g(V.id,D),L(void 0)},children:[a.jsx("input",{autoFocus:!0,value:D,onChange:K=>M(K.target.value),onKeyDown:K=>{K.key==="Escape"&&L(void 0)}}),a.jsx("button",{type:"submit",children:w("Save")}),a.jsx("button",{type:"button",onClick:()=>L(void 0),children:"×"})]}):a.jsxs(a.Fragment,{children:[a.jsxs("button",{type:"button",onClick:()=>d(V.id),title:V.targetUrl?`${V.name}
|
|
54
|
+
${V.targetUrl}`:V.name,children:[a.jsx("span",{className:"project-icon",children:"◈"}),a.jsxs("span",{className:"project-copy",children:[a.jsx("b",{children:V.name}),a.jsx("small",{children:V.targetUrl||w("Manual suite")})]})]}),a.jsxs("div",{className:"project-actions",children:[a.jsx("button",{type:"button",className:"project-more",title:w("Project actions"),onClick:()=>S(K=>K===V.id?void 0:V.id),children:"⋯"}),O===V.id&&a.jsxs("div",{className:"project-action-menu",children:[a.jsx("button",{type:"button",onClick:()=>{L(V.id),M(V.name),S(void 0)},children:w("Rename")}),a.jsx("button",{type:"button",className:"danger",onClick:()=>{p(V.id),S(void 0)},children:w("Delete")})]})]})]})},V.id))}),l&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"sidebar-label",children:[a.jsx("span",{children:_("files")}),a.jsx("b",{children:l.pages.length})]}),a.jsx("div",{className:"file-list",children:l.pages.map(V=>a.jsxs("div",{className:"file-item",title:V.finalUrl,children:[a.jsx("span",{children:"◫"}),a.jsx("span",{className:"file-name",children:new URL(V.finalUrl).pathname==="/"?"index":new URL(V.finalUrl).pathname.slice(1)}),a.jsx("small",{children:V.state?.fingerprint.slice(-4)})]},V.finalUrl))})]}),i&&a.jsxs("button",{type:"button",className:"sidebar-settings",onClick:m,title:_("settings"),children:[a.jsx("span",{children:"⚙"}),a.jsx("em",{children:_("settings")})]}),a.jsx("div",{className:"sidebar-bottom",children:a.jsxs("div",{className:"workspace-language-row",children:[a.jsxs("button",{type:"button",className:"workspace-copy",onClick:v,title:y,children:[a.jsx("span",{className:"status-dot status-pass"})," ",a.jsx("b",{children:_("localWorkspace")}),a.jsx("small",{children:y||_("storedHere")})]}),a.jsx("button",{type:"button",className:"language-circle",onClick:E,title:b==="en"?"Switch to Thai":w("Switch to English (US)"),"aria-label":w("Switch language"),children:b==="en"?"EN":"TH"})]})})]})}function N2(n){return By(n,!0)}function C2(n){return By(n,!1)}function By(n,i){const l=`<!doctype html><html><head><meta charset="utf-8"><title>LazyScout Quality Report</title><style>${E2}</style></head><body>${_2(n)}</body></html>`,o=window.open("","_blank","width=1100,height=820");return o&&(o.document.open(),o.document.write(l),o.document.close(),i&&window.setTimeout(()=>{o.focus(),o.print()},350)),l}function _2(n){const i=[["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`]],l=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>${ia(o.id)} · ${ia(o.title)}</b><small>${ia(o.folder||"UNASSIGNED")}</small></div><pre>${o.logs.length?ia(o.logs.join(`
|
|
55
|
+
`)):"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>${ia(n.origin)} · Generated ${ia(n.generatedAt)}</small></div><div class="report-state">${n.pending} pending execution</div></header><section class="metrics">${i.map(([o,c,d])=>`<article><span>${o}</span><b>${c}</b><small>${d}</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>${nv(n.status,"Test Cases")}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Priority</h2></div><em>Column chart</em></div>${T2(n.priority)}</article><article class="card"><div class="head"><div><p>COMPARISON</p><h2>Test type</h2></div><em>Bar chart</em></div>${av(n.testType)}</article><article class="card"><div class="head"><div><p>COMPOSITION</p><h2>Automation readiness</h2></div><em>Donut chart</em></div>${nv(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>${av(n.modules)}</article></section>${l}<footer>LazyScout · Local QA workspace</footer></main>`}function nv(n,i){const l=n.reduce((d,f)=>d+f.value,0);let o=0;return`<div class="donut-wrap"><div class="donut" style="background:conic-gradient(${n.map(d=>{const f=l?o/l*100:0;o+=d.value;const p=l?o/l*100:0;return`${d.color} ${f}% ${p}%`}).join(", ")||"#e2e8f0 0 100%"})"><div><b>${l}</b><span>${i}</span></div></div><div class="legend">${n.map(d=>`<div><i style="background:${d.color}"></i><span title="${ia(d.label)}">${ia(hf(d.label))}</span><b>${d.value}</b></div>`).join("")}</div></div>`}function T2(n){const i=Math.max(...n.map(o=>o.value),1),l=n.reduce((o,c)=>o+c.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/i*100}%;background:${o.color}"></i></div><b>${o.value} <small>${Math.round(o.value/l*100)}%</small></b><span>${ia(hf(o.label))}</span></div>`).join("")}</div></div>`}function av(n){const i=Math.max(...n.map(l=>l.value),1);return`<div class="bars">${n.map(l=>`<div><span title="${ia(l.label)}">${ia(hf(l.label))}</span><section><i style="width:${l.value/i*100}%;background:${l.color}"></i></section><b>${l.value}</b></div>`).join("")}</div>`}function hf(n){return n.length>10?`${n.slice(0,10)}...`:n}function ia(n){return String(n).replace(/[&<>'"]/g,i=>({"&":"&","<":"<",">":">","'":"'",'"':"""})[i]??i)}const E2="@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 A2({result:n,testCases:i,executionStatuses:l={},runResults:o={},projectId:c}){const{ui:d}=Le(),[f,p]=z.useState(!1),[g,m]=z.useState({status:!0,priority:!0,type:!0,automation:!0,modules:!0,trend:!0}),[y,v]=z.useState({status:"donut",priority:"column",type:"bar",automation:"donut",modules:"treemap",trend:"line"}),w=j=>l[j.id]??j.status??"pending",b={passed:i.filter(j=>w(j)==="passed").length,failed:i.filter(j=>w(j)==="failed").length,pending:i.filter(j=>w(j)==="pending").length},E=ho(i,j=>j.priority),_=ho(i,j=>j.type),O=ho(i,j=>j.automationStatus),S=ho(i,j=>(j.folder??j.module)||"UNASSIGNED"),T=z.useMemo(()=>z2(n),[n]),L=[{label:d("Pass"),value:b.passed,color:"#10b981"},{label:d("Failed"),value:b.failed,color:"#ef4444"},{label:d("Pending"),value:b.pending,color:"#f59e0b"}],D=[{label:d("High"),value:E.high??0,color:"#ef4444"},{label:d("Medium"),value:E.medium??0,color:"#f59e0b"},{label:d("Low"),value:E.low??0,color:"#3b82f6"}],M=[{label:d("Positive"),value:_.positive??0,color:"#10b981"},{label:d("Negative"),value:_.negative??0,color:"#ef4444"},{label:d("Validation"),value:_.validation??0,color:"#6366f1"}],V=[{label:d("Ready"),value:O.ready??0,color:"#3b82f6"},{label:d("Needs review"),value:O["needs-review"]??0,color:"#f59e0b"},{label:d("Needs data"),value:O["needs-data"]??0,color:"#8b5cf6"},{label:d("Manual"),value:O.manual??0,color:"#64748b"}],K=Object.entries(S).map(([j,F],X)=>({label:j,value:F,color:rv[X%rv.length]})),ae=i.filter(j=>(j.requirements?.length??0)>0).length,I=new Set(i.flatMap(j=>j.requirements??[])).size,$={origin:n.origin,generatedAt:new Date().toLocaleString(),pages:n.pages.length,testCases:i.length,passed:b.passed,failed:b.failed,pending:b.pending,needsReview:O["needs-review"]??0,linkedCases:ae,requirementCount:I,status:L,priority:D,testType:M,readiness:V,modules:$y(K),failedCases:i.filter(j=>w(j)==="failed").map(j=>({id:j.id,title:j.title,folder:j.folder??j.module,logs:(o[j.id]?.logs??[]).slice(-8).map(F=>`${new Date(F.timestamp).toLocaleTimeString()} ${F.message}`)}))},ee=j=>m(F=>({...F,[j]:!F[j]})),B=(j,F)=>v(X=>({...X,[j]:F})),Q=j=>{const F=j?N2($):C2($);c&&B0(c,j?"quality-report-print.html":"quality-report.html",F)};return a.jsxs("div",{className:"dashboard-view",children:[a.jsxs("div",{className:"dashboard-title",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:d("Project dashboard")}),a.jsx("h2",{children:d("Quality overview")}),a.jsxs("p",{children:[d("Coverage and readiness for")," ",a.jsx("b",{children:n.origin})]})]}),a.jsxs("div",{className:"dashboard-actions",children:[a.jsxs("span",{className:"status-badge status-badge-warn",children:[b.pending," ",d("pending execution")]}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>p(j=>!j),children:d("Customize")}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Q(!1),children:d("HTML report")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>Q(!0),children:d("Export PDF")})]})]}),f&&a.jsxs("div",{className:"dashboard-customize",children:[a.jsx("b",{children:d("Dashboard layout")}),a.jsx("span",{children:d("Show or hide charts")}),["status","priority","type","automation","modules","trend"].map(j=>a.jsxs("label",{children:[a.jsx("input",{type:"checkbox",checked:g[j],onChange:()=>ee(j)})," ",d(O2(j))]},j))]}),a.jsxs("div",{className:"dashboard-metrics",children:[a.jsx(_s,{label:d("Test Cases"),value:i.length,hint:`${n.pages.length} ${d("pages explored")}`,tone:"blue"}),a.jsx(_s,{label:d("Pass"),value:b.passed,hint:d("Execution result"),tone:"green"}),a.jsx(_s,{label:d("Failed"),value:b.failed,hint:d("Execution result"),tone:"red"}),a.jsx(_s,{label:d("Need Review"),value:O["needs-review"]??0,hint:d("Tester decision needed"),tone:"amber"}),a.jsx(_s,{label:d("Requirements"),value:I,hint:`${ae}/${i.length} ${d("cases linked")}`,tone:"blue"})]}),a.jsxs("div",{className:"dashboard-columns",children:[g.status&&a.jsx(Si,{eyebrow:d("Composition"),title:d("Execution status"),panel:"status",kind:y.status,onChange:B,children:Ts(y.status,L,d("Test Cases"))}),g.priority&&a.jsx(Si,{eyebrow:d("Comparison"),title:d("Priority"),panel:"priority",kind:y.priority,onChange:B,children:Ts(y.priority,D,d("Cases"))})]}),a.jsxs("div",{className:"dashboard-columns",children:[g.type&&a.jsx(Si,{eyebrow:d("Comparison"),title:d("Test type"),panel:"type",kind:y.type,onChange:B,children:Ts(y.type,M,d("Cases"))}),g.automation&&a.jsx(Si,{eyebrow:d("Composition"),title:d("Automation readiness"),panel:"automation",kind:y.automation,onChange:B,children:Ts(y.automation,V,d("Cases"))})]}),a.jsxs("div",{className:"dashboard-columns",children:[g.modules&&a.jsx(Si,{eyebrow:d("Hierarchy"),title:d("Folder coverage"),panel:"modules",kind:y.modules,onChange:B,children:Ts(y.modules,K,d("Cases"))}),g.trend&&a.jsx(Si,{eyebrow:d("Trend"),title:d("Scout discovery"),panel:"trend",kind:y.trend,onChange:B,children:y.trend==="line"?a.jsx(U2,{points:T.slice(-ef)}):a.jsx(Iy,{items:T.slice(-ef).map((j,F)=>({label:`${d("Step")} ${F+1}`,value:j,color:"#4f46e5"}))})})]})]})}function Si({eyebrow:n,title:i,panel:l,kind:o,onChange:c,children:d}){const{ui:f}=Le();return a.jsxs("section",{className:"dashboard-card",children:[a.jsxs("div",{className:"dashboard-card-head",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:n}),a.jsx("h3",{children:i})]}),a.jsxs("label",{className:"chart-selector",children:[a.jsx("span",{children:f("Chart")}),a.jsx("select",{value:o,onChange:p=>c(l,p.target.value),children:M2[l].map(p=>a.jsx("option",{value:p,children:f(k2(p))},p))})]})]}),d]})}function _s({label:n,value:i,hint:l,tone:o}){return a.jsxs("div",{className:`dashboard-metric tone-${o}`,children:[a.jsx("span",{children:n}),a.jsx("strong",{children:i}),a.jsx("small",{children:l})]})}function ho(n,i){return n.reduce((l,o)=>{const c=i(o);return l[c]=(l[c]??0)+1,l},{})}function O2(n){return{status:"Execution status",priority:"Priority comparison",type:"Test type comparison",automation:"Automation readiness",modules:"Folder treemap",trend:"Scout trend"}[n]}function k2(n){return{bar:"Bar chart",column:"Column chart",donut:"Donut chart",treemap:"Treemap",line:"Line chart"}[n]}function Ts(n,i,l){const o=$y(i);return n==="donut"?a.jsx(R2,{slices:o,totalLabel:l,compact:o.length>3}):n==="column"?a.jsx(Iy,{items:o}):n==="treemap"?a.jsx(L2,{items:o}):a.jsx(D2,{items:o})}function R2({slices:n,totalLabel:i,compact:l=!1}){const o=n.reduce((f,p)=>f+p.value,0);let c=0;const d=n.map(f=>{const p=o?c/o*100:0;c+=f.value;const g=o?c/o*100:0;return`${f.color} ${p}% ${g}%`}).join(", ");return a.jsxs("div",{className:`donut-chart ${l?"is-compact":""}`,children:[a.jsx("div",{className:"donut-ring",style:{background:o?`conic-gradient(${d})`:"#e2e8f0"},children:a.jsxs("div",{children:[a.jsx("b",{children:o}),a.jsx("span",{children:i})]})}),a.jsx("div",{className:"donut-legend",children:n.map(f=>a.jsxs("div",{children:[a.jsx("i",{style:{background:f.color}}),a.jsx("span",{title:f.label,children:Io(f.label)}),a.jsx("b",{children:f.value})]},f.label))})]})}function Iy({items:n}){const i=Math.max(...n.map(o=>o.value),1),l=n.reduce((o,c)=>o+c.value,0)||1;return a.jsxs("div",{className:"column-chart-wrap",children:[a.jsxs("div",{className:"column-axis","aria-hidden":"true",children:[a.jsx("span",{children:"100%"}),a.jsx("span",{children:"75%"}),a.jsx("span",{children:"50%"}),a.jsx("span",{children:"25%"}),a.jsx("span",{children:"0%"})]}),a.jsxs("div",{className:"column-chart",style:{gridTemplateColumns:`repeat(${Math.max(n.length,1)}, minmax(0, 1fr))`},children:[a.jsx("div",{className:"column-grid","aria-hidden":"true"}),n.map(o=>a.jsxs("div",{className:"column-item",title:o.label,children:[a.jsx("div",{className:"column-track",children:a.jsx("i",{style:{height:`${o.value/i*100}%`,background:o.color}})}),a.jsxs("div",{className:"column-value",children:[a.jsx("b",{children:o.value}),a.jsxs("small",{children:[Math.round(o.value/l*100),"%"]})]}),a.jsx("span",{children:Io(o.label)})]},o.label))]})]})}function D2({items:n}){const i=Math.max(...n.map(l=>l.value),1);return a.jsx("div",{className:"bar-chart",children:n.map(l=>a.jsxs("div",{className:"bar-row",children:[a.jsx("span",{title:l.label,children:Io(l.label)}),a.jsx("div",{children:a.jsx("i",{style:{width:`${l.value/i*100}%`,background:l.color}})}),a.jsx("b",{children:l.value})]},l.label))})}function L2({items:n}){const{ui:i}=Le();return a.jsx("div",{className:"treemap",children:n.length?n.map(l=>a.jsxs("div",{style:{flexGrow:l.value,background:l.color},title:`${l.label}: ${l.value}`,children:[a.jsx("b",{children:Io(l.label)}),a.jsxs("span",{children:[l.value," ",i("cases")]})]},l.label)):a.jsx("p",{children:i("No folders found.")})})}function U2({points:n}){const{ui:i}=Le(),l=Math.max(...n,1),o=Math.max(n.length-1,1),c=n.map((d,f)=>`${f/o*100},${100-d/l*82-9}`).join(" ");return a.jsxs("div",{className:"line-chart",children:[a.jsxs("svg",{viewBox:"0 0 100 100",preserveAspectRatio:"none",role:"img","aria-label":i("Cumulative Scout discovery trend"),children:[a.jsx("line",{x1:"0",y1:"91",x2:"100",y2:"91"}),a.jsx("polyline",{points:c})]}),a.jsxs("div",{className:"line-chart-meta",children:[a.jsx("span",{children:i("Start")}),a.jsxs("b",{children:[n[n.length-1]??0," ",i("discoveries")]}),a.jsx("span",{children:i("Complete")})]})]})}function z2(n){let i=0;const l=[0];for(const o of n.runEvents)(o.eventType==="page-discovered"||o.eventType==="state-discovered"||o.eventType==="action-discovered")&&(i++,l.push(i));return l.length>1?l:[0,n.pages.length]}const rv=["#2563eb","#7c3aed","#0891b2","#059669","#d97706","#db2777","#475569"],M2={status:["donut","bar","column"],priority:["column","bar","donut"],type:["bar","column","donut"],automation:["donut","bar","column"],modules:["treemap","bar","column","donut"],trend:["line","column"]},ef=10;function $y(n){return[...n].sort((i,l)=>l.value-i.value).slice(0,ef)}function Io(n){return n.length>10?`${n.slice(0,10)}...`:n}function B2({pages:n,testCases:i,recordedCases:l,completedRuns:o,onScout:c,onReview:d,onRecord:f,onRun:p,onExport:g}){const{language:m}=Le(),y=m==="th",v=[{label:y?"สำรวจเว็บไซต์":"Scout the website",description:n?y?`ค้นพบ ${n} หน้า`:`${n} pages discovered`:y?"ใส่ URL แล้วให้ LazyScout สร้างเคสทดสอบชุดแรก":"Enter a URL and let LazyScout discover the first Test Cases.",complete:n>0,action:n?y?"สำรวจอีกครั้ง":"Scout again":y?"เริ่มสำรวจ":"Start Scout",onClick:c},{label:y?"ตรวจทานเคสทดสอบ":"Review Test Cases",description:i?y?`มี ${i} เคสพร้อมให้ตรวจทาน`:`${i} Test Cases are ready to review.`:y?"ตรวจชื่อ ขั้นตอน และผลลัพธ์ที่คาดหวัง":"Review titles, steps, and expected results.",complete:i>0,action:y?"เปิดเคสทดสอบ":"Open Test Cases",onClick:d},{label:y?"บันทึกขั้นตอนที่ยังขาด":"Record missing flows",description:l?y?`บันทึกแล้ว ${l} ชุดขั้นตอน`:`${l} recorded flow${l===1?"":"s"} saved.`:y?"บันทึกการเข้าสู่ระบบหรือขั้นตอนที่ยังสำรวจไม่พบ":"Record login or business actions that Scout cannot infer.",complete:l>0,action:y?"บันทึกขั้นตอน":"Record Flow",onClick:f},{label:y?"รันทดสอบ":"Run Automation",description:o?y?`รันแล้ว ${o} เคส`:`${o} Test Case${o===1?"":"s"} executed.`:y?"รันเคสที่เลือกด้วย Playwright CLI":"Run selected Test Cases with the Playwright CLI.",complete:o>0,action:y?"เปิดหน้ารันทดสอบ":"Open Automation",onClick:p},{label:y?"ส่งเคสทดสอบให้ทีม":"Share the Test Cases",description:y?"ส่งออกเคสที่ตรวจแล้วเป็นไฟล์ CSV ให้ทีม":"Export the reviewed Test Cases as a CSV file for your team.",complete:!1,action:y?"ส่งออก CSV":"Export CSV",onClick:g}];return a.jsxs("section",{className:"journey-card","aria-labelledby":"journey-title",children:[a.jsxs("header",{children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:y?"ขั้นตอนที่แนะนำ":"Recommended workflow"}),a.jsx("h3",{id:"journey-title",children:y?"ต่อไปควรทำอะไร?":"What should I do next?"})]}),a.jsxs("span",{children:[v.filter(w=>w.complete).length,"/4 ",y?"ขั้นตอนพร้อมแล้ว":"setup steps complete"]})]}),a.jsx("div",{className:"journey-steps",children:v.map((w,b)=>a.jsxs("article",{className:w.complete?"is-complete":"",children:[a.jsx("span",{className:"journey-number",children:w.complete?"✓":b+1}),a.jsxs("div",{children:[a.jsx("b",{children:w.label}),a.jsx("small",{children:w.description})]}),a.jsxs("button",{type:"button",onClick:w.onClick,children:[w.action," ",a.jsx("span",{children:"→"})]})]},w.label))})]})}const I2=1e3,$2=3,pd=n=>({projectId:n,status:"idle",startUrl:"",startedAt:"",steps:[]});function P2(n){const[i,l]=z.useState(()=>pd(n??"")),[o,c]=z.useState(!1),[d,f]=z.useState(),[p,g]=z.useState(!1),[m,y]=z.useState(!1);z.useEffect(()=>{if(!n)return;let S=!0;return l(pd(n)),f(void 0),g(!1),y(!1),lg(n).then(T=>{if(T.status==="stopped"){og(n).catch(()=>{});return}S&&T.status==="recording"&&l(T)}).catch(()=>{}),()=>{S=!1}},[n]);const v=i.status==="recording"&&!p;z.useEffect(()=>{if(!n||!v)return;let S=!0,T=!1,L=0;const D=setInterval(()=>{T||(T=!0,lg(n).then(M=>{L=0,S&&l(M)}).catch(()=>{L+=1,L>=$2&&S&&(f("Lost contact with the recorder. Stop and start it again."),g(!0))}).finally(()=>{T=!1}))},I2);return()=>{S=!1,clearInterval(D)}},[n,v]);const w=z.useCallback(async S=>{if(n){c(!0),f(void 0),g(!1),y(!1);try{l(await A0(n,S))}catch(T){f(T instanceof Error?T.message:"The recorder could not be started.")}finally{c(!1)}}},[n]),b=z.useCallback(async()=>{if(n){c(!0);try{l(await O0(n))}catch(S){f(S instanceof Error?S.message:"The recorder could not be stopped.")}finally{c(!1)}}},[n]),E=z.useCallback(async()=>{if(!n||!v)return;const S=!m;try{const T=await k0(n,S);l(T),y(S)}catch(T){f(T instanceof Error?T.message:"The inspect mode could not be changed.")}},[m,n,v]),_=z.useCallback(async S=>{if(!(!n||!v))try{l(await D0(n,S))}catch(T){f(T instanceof Error?T.message:"The browser interaction failed.")}},[n,v]),O=z.useCallback(()=>{l(pd(n??"")),f(void 0),g(!1),y(!1),n&&og(n).catch(()=>{})},[n]);return{state:i,recording:v,busy:o,error:d,start:w,stop:b,reset:O,inspectMode:m,toggleInspectMode:E,interact:_}}const q2="{{TEST_PASSWORD}}",iv="Recorded login",H2=160;function Py({projectId:n,targetUrl:i,onSaveRecording:l,onPickTarget:o}){const{ui:c}=Le(),{state:d,recording:f,busy:p,error:g,start:m,stop:y,reset:v,inspectMode:w,toggleInspectMode:b,interact:E}=P2(n),[_,O]=z.useState(iv),[S,T]=z.useState(!1),[L,D]=z.useState(0),[M,V]=z.useState(i),[K,ae]=z.useState(!1),I=z.useRef(0),$=z.useRef(void 0),ee=d.steps,B=d.status==="stopped"&&ee.length>0;z.useEffect(()=>{!K&&d.currentUrl&&V(d.currentUrl)},[K,d.currentUrl]),z.useEffect(()=>{if(!(!S||!f))return D(Date.now()),()=>{$.current!==void 0&&window.clearTimeout($.current)}},[f,S]);const Q=()=>{$.current!==void 0&&window.clearTimeout($.current),$.current=window.setTimeout(()=>D(Date.now()),H2)},j=async C=>{await E(C),D(Date.now())};z.useEffect(()=>{if(!S)return;const C=document.body,H=document.documentElement,G=C.style.overflow,te=C.style.paddingRight,pe=H.style.overflow,Ne=window.innerWidth-H.clientWidth;return C.style.overflow="hidden",H.style.overflow="hidden",Ne>0&&(C.style.paddingRight=`${Ne}px`),()=>{C.style.overflow=G,C.style.paddingRight=te,H.style.overflow=pe}},[S]);const F=C=>{const H=C.currentTarget.getBoundingClientRect();return{x:(C.clientX-H.left)/H.width*C.currentTarget.naturalWidth,y:(C.clientY-H.top)/H.height*C.currentTarget.naturalHeight}},X=C=>{if(C.nativeEvent.isComposing||["Shift","Control","Alt","Meta"].includes(C.key))return;if(C.preventDefault(),C.key.length===1&&!C.ctrlKey&&!C.altKey&&!C.metaKey){j({type:"text",text:C.key});return}const H=[C.ctrlKey&&"Control",C.altKey&&"Alt",C.metaKey&&"Meta",C.shiftKey&&"Shift"].filter(Boolean).join("+");j({type:"key",key:H?`${H}+${C.key}`:C.key})},Y=C=>{C.preventDefault(),C.stopPropagation(),j({type:"scroll",deltaX:C.deltaX,deltaY:C.deltaY})},Z=()=>{const C=M.trim();if(!C||!f)return;let H=C;try{H=new URL(C,d.currentUrl||i).toString()}catch{return}j({type:"navigate",url:H})},R=()=>{v(),O(iv),T(!1)},q=()=>{l(ee,_.trim()||"Recorded flow",d.startUrl||i),R()},x=async C=>{if(!o)return;const H=G2(C);await y(),v(),T(!1),o(H)};return a.jsxs("div",{className:"settings-notice settings-notice-stacked recorder-panel",children:[a.jsx("b",{children:c("Record a flow")}),a.jsx("span",{children:c("Start the Cypress-style workspace to record clicks, typing, and element locators.")}),g&&a.jsx("p",{className:"recorder-error",children:g}),!f&&!B&&a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:p,onClick:()=>{T(!0),m(i)},children:c(p?"Starting…":"Start recording")}),f&&!S&&a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>T(!0),children:c("Open recorder workspace")}),!S&&f&&d.inspection&&a.jsxs("div",{className:"recorder-inspection","aria-live":"polite",children:[a.jsxs("div",{className:"recorder-inspection-heading",children:[a.jsx("b",{children:c("Selected element")}),a.jsxs("code",{children:["<",d.inspection.tagName,">"]})]}),d.inspection.accessibleName&&a.jsxs("span",{children:[c("Accessible name:")," ",d.inspection.accessibleName]}),d.inspection.role&&a.jsxs("span",{children:[c("Role:")," ",d.inspection.role]}),d.inspection.id&&a.jsxs("span",{children:[c("ID:")," ",d.inspection.id]}),d.inspection.name&&a.jsxs("span",{children:[c("Name:")," ",d.inspection.name]}),a.jsxs("label",{children:[c("CSS selector"),a.jsx("code",{children:d.inspection.cssSelector})]}),a.jsxs("label",{children:[c("Playwright locator"),a.jsx("code",{children:d.inspection.playwrightLocator})]}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{navigator.clipboard?.writeText(d.inspection?.playwrightLocator??"")},children:c("Copy locator")})]}),!S&&ee.length>0&&a.jsx("ol",{className:"recorder-steps",children:ee.map((C,H)=>a.jsxs("li",{children:[a.jsx("span",{className:"recorder-step-index",children:H+1}),a.jsx("span",{children:Ei(C)})]},`${H}-${C.type}`))}),!S&&B&&a.jsxs(a.Fragment,{children:[a.jsxs("label",{className:"recorder-title",children:[a.jsx("span",{children:c("Test Case title")}),a.jsx("input",{value:_,onChange:C=>O(C.target.value),placeholder:c("Recorded login")})]}),a.jsxs("div",{className:"recorder-actions",children:[a.jsx("button",{type:"button",className:"btn btn-primary",onClick:q,children:c("Save as Test Case")}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:R,children:c("Discard")})]})]}),d.status==="stopped"&&ee.length===0&&a.jsx("p",{className:"recorder-status",children:c("No steps were recorded. Start again and interact with the page.")}),S&&a.jsx("div",{className:"modern-modal-backdrop recorder-workspace-backdrop",role:"presentation",children:a.jsxs("section",{className:"modern-modal recorder-workspace-modal",role:"dialog","aria-modal":"true","aria-labelledby":"recorder-workspace-title",children:[a.jsxs("header",{className:"modal-header",children:[a.jsxs("div",{children:[a.jsx("h2",{id:"recorder-workspace-title",children:c("Record and inspect")}),a.jsxs("p",{children:[c("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")," ",a.jsx("code",{children:q2}),"."]})]}),a.jsx("button",{type:"button",className:"icon-btn","aria-label":c("Close recorder workspace"),onClick:()=>T(!1),children:"×"})]}),a.jsxs("div",{className:"recorder-workspace-body",children:[a.jsxs("aside",{className:"recorder-workspace-sidebar",children:[a.jsx("span",{className:"recorder-workspace-status",children:c(f?"● Recording":"○ Recorder idle")}),a.jsx("button",{type:"button",className:"btn btn-danger",disabled:!f||p,onClick:()=>{y()},children:c(p?"Stopping…":"Stop recording")}),a.jsx("button",{type:"button",className:w?"btn btn-primary":"btn btn-secondary",disabled:!f||p,onClick:()=>{b()},children:c(w?"Inspecting element":"Inspect element")}),a.jsx("p",{className:"recorder-workspace-help",children:c("Hover to preview. Click an element to lock it while scrolling, click another element to switch, or click empty space to unlock.")}),d.inspection&&a.jsxs("div",{className:"recorder-workspace-selection",children:[a.jsxs("div",{className:"recorder-inspection-lock-row",children:[a.jsx("b",{children:c("Selected element")}),a.jsx("span",{className:d.inspection.locked?"is-locked":"",children:d.inspection.locked?c("Locked"):c("Hover preview")})]}),a.jsxs("code",{children:["<",d.inspection.tagName,">"]}),d.inspection.accessibleName&&a.jsx("span",{children:d.inspection.accessibleName}),a.jsx("code",{children:d.inspection.playwrightLocator}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>{navigator.clipboard?.writeText(d.inspection?.playwrightLocator??"")},children:c("Copy locator")}),o&&d.inspection.locked&&a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>{x(d.inspection)},children:c("Use this element")})]}),ee.length>0&&a.jsx("ol",{className:"recorder-workspace-steps",children:ee.map((C,H)=>a.jsxs("li",{children:[a.jsx("span",{children:H+1}),a.jsx("p",{children:Ei(C)})]},`${H}-${C.type}`))}),B&&a.jsxs("div",{className:"recorder-workspace-save",children:[a.jsxs("label",{children:[c("Test Case title"),a.jsx("input",{value:_,onChange:C=>O(C.target.value)})]}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:q,children:c("Save as Test Case")}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:R,children:c("Discard")})]}),a.jsxs("span",{className:"recorder-workspace-count",children:[c("Recorded steps:")," ",ee.length]})]}),a.jsxs("main",{className:"recorder-workspace-preview",children:[a.jsxs("div",{className:"recorder-workspace-browser-bar",children:[a.jsx("button",{type:"button","aria-label":c("Back"),disabled:!f,onClick:()=>{j({type:"back"})},children:"←"}),a.jsx("button",{type:"button","aria-label":c("Forward"),disabled:!f,onClick:()=>{j({type:"forward"})},children:"→"}),a.jsx("button",{type:"button","aria-label":c("Reload"),disabled:!f,onClick:()=>{j({type:"reload"})},children:"↻"}),a.jsxs("form",{className:"recorder-workspace-address-form",onSubmit:C=>{C.preventDefault(),Z()},children:[a.jsx("input",{className:"recorder-workspace-url",value:M,disabled:!f,"aria-label":c("Browser address"),spellCheck:!1,onFocus:()=>ae(!0),onBlur:()=>ae(!1),onChange:C=>V(C.target.value)}),a.jsx("button",{type:"submit",className:"recorder-address-go",disabled:!f||!M.trim(),children:c("Go")})]})]}),a.jsx("div",{className:"recorder-browser-viewport",style:{cursor:d.pointerCursor??"default"},role:"application",tabIndex:0,"aria-label":c("Interactive Playwright browser"),onKeyDown:X,onCompositionEnd:C=>{j({type:"text",text:C.data})},onPaste:C=>{C.preventDefault(),j({type:"text",text:C.clipboardData.getData("text")})},onWheel:Y,children:f?a.jsx("img",{src:R0(n,L),alt:c("Live Playwright browser"),draggable:!1,style:{cursor:d.pointerCursor??"default"},onLoad:Q,onError:Q,onClick:C=>{C.currentTarget.parentElement?.focus(),j({type:"click",...F(C)})},onMouseMove:C=>{Date.now()-I.current<80||(I.current=Date.now(),E({type:"move",...F(C)}))}}):a.jsx("div",{className:"recorder-browser-loading",children:c(B?"Recording stopped. Save the Test Case from the left panel.":"Starting Playwright browser…")})}),a.jsx("p",{children:c("Click the page, type normally, paste text, or scroll here. Actions are sent to Playwright directly.")}),a.jsxs("div",{className:"hidden","aria-hidden":"true",children:[a.jsx("span",{className:"recorder-live-browser-icon","aria-hidden":"true",children:"◉"}),a.jsx("b",{children:c("Live Playwright browser")}),a.jsx("p",{children:c("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.")}),a.jsx("span",{className:"recorder-live-browser-note",children:c("The page is intentionally not embedded in an iframe.")})]})]})]}),a.jsx("footer",{className:"modal-footer",children:a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>T(!1),children:c("Close workspace")})})]})})]})}function G2(n){return n.role&&n.accessibleName?{strategy:"role",role:n.role,name:n.accessibleName,cssSelector:n.cssSelector}:{strategy:"css",cssSelector:n.cssSelector}}const V2=["navigate","click","fill","select","check","wait","assert"],F2="https://lazyscout.lazyscout.workers.dev/guided-flow.html";function Y2({flows:n,baseUrl:i,projectId:l,secrets:o,onSave:c,onGenerateTestCase:d}){const{ui:f}=Le(),[p,g]=z.useState(),[m,y]=z.useState(),[v,w]=z.useState("click"),[b,E]=z.useState(!1),[_,O]=z.useState(!1),[S,T]=z.useState(),[L,D]=z.useState(),[M,V]=z.useState(),[K,ae]=z.useState();z.useEffect(()=>{if(!n.length)return;const G=n.find(te=>te.id===p)??n[0];g(G.id),y(G)},[n]);const I=n.findIndex(G=>G.id===m?.id),$=!!(m?.baseUrl&&m.steps.length);function ee(){const G=new Date().toISOString(),te={id:crypto.randomUUID(),name:"New Guided Flow",description:"",baseUrl:i||"http://localhost:5173",steps:[{id:crypto.randomUUID(),type:"navigate",path:"/"}],createdAt:G,updatedAt:G};g(te.id),y(te),D(void 0)}function B(G){y(te=>te&&{...te,...G,updatedAt:new Date().toISOString()})}function Q(G,te){if(!m)return;const pe=m.steps.map((Ne,we)=>we===G?te:Ne);B({steps:pe})}function j(){m&&B({steps:[...m.steps,Z2(v)]})}function F(G){m&&B({steps:m.steps.filter((te,pe)=>pe!==G)})}function X(G,te){if(!m)return;const pe=G+te;if(pe<0||pe>=m.steps.length)return;const Ne=[...m.steps],[we]=Ne.splice(G,1);Ne.splice(pe,0,we),B({steps:Ne})}async function Y(){if(m){E(!0);try{const G=I<0?[...n,m]:n.map(te=>te.id===m.id?m:te);await c(G)}finally{E(!1)}}}async function Z(){if(!m)return;const G={...m,id:crypto.randomUUID(),name:`${m.name} Copy`,steps:m.steps.map(te=>({...te,id:crypto.randomUUID()})),createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};await c([...n,G]),g(G.id),y(G)}async function R(){if(!m)return;const G=n.filter(te=>te.id!==m.id);E(!0);try{await c(G),g(G[0]?.id),y(G[0])}finally{E(!1)}}async function q(){if(K)try{K==="save"?await Y():await R(),ae(void 0)}catch{}}async function x(){if(!m||!$||_)return;O(!0),D(void 0);const G=crypto.randomUUID();T(G);try{D(await _0(m,l,o,G))}catch(te){D({status:"failed",framework:"playwright",runId:G,logs:[{timestamp:new Date().toISOString(),level:"fail",message:te instanceof Error?te.message:String(te)}],stepStatuses:m.steps.map(pe=>({id:pe.id,status:"pending"}))})}finally{O(!1),T(void 0)}}async function C(){S&&await T0(S)}const H=z.useMemo(()=>new Map(L?.stepStatuses.map(G=>[G.id,G.status])),[L]);return a.jsxs("div",{className:"guided-flow-panel",children:[a.jsxs("div",{className:"guided-flow-intro",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:f("Tester-defined execution")}),a.jsx("h2",{children:f("Guided Flow")}),a.jsx("p",{children:f("Auto Scout finds the paths. Guided Scout follows yours.")})]}),a.jsxs("div",{className:"guided-flow-intro-actions",children:[a.jsxs("a",{className:"guided-flow-guide-link",href:F2,target:"_blank",rel:"noreferrer","aria-label":f("Open the visual Guided Flow guide"),title:f("Open visual Guided Flow guide"),children:[a.jsx("span",{"aria-hidden":"true",children:"▤"}),f("Guided Flow Guide")]}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:ee,children:f("+ New Flow")})]})]}),a.jsxs("section",{className:"hidden","aria-hidden":"true",children:[a.jsxs("div",{className:"guided-flow-guide-grid",children:[a.jsxs("div",{children:[a.jsx("strong",{children:f("Inputs without a label")}),a.jsxs("p",{children:[f("Use CSS with a stable id or name. Example:")," ",a.jsx("code",{children:"input#username"}),"."]})]}),a.jsxs("div",{children:[a.jsx("strong",{children:f("Buttons")}),a.jsx("p",{children:f("Prefer Role + accessible name, or CSS when the button has a stable id.")})]}),a.jsxs("div",{children:[a.jsx("strong",{children:f("Labels")}),a.jsx("p",{children:f("Use Label when the input has a real HTML label. It is also useful for validation checks.")})]}),a.jsxs("div",{children:[a.jsx("strong",{children:f("Login example")}),a.jsx("pre",{children:`Fill · CSS · #username · TEST_USERNAME
|
|
56
|
+
Fill · CSS · #password · TEST_PASSWORD
|
|
57
|
+
Click · CSS · #submit`})]})]}),a.jsxs("div",{className:"guided-flow-guide-steps",children:[a.jsx("strong",{children:f("First time using Guided Flow?")}),a.jsxs("ol",{children:[a.jsx("li",{children:f("Open the target page in your browser and inspect the element you want to test.")}),a.jsxs("li",{children:[f("If it has an id, choose")," ",a.jsx("b",{children:"CSS"}),f(". If it is a named button, choose")," ",a.jsx("b",{children:f("Role")}),"."]}),a.jsxs("li",{children:[f("Enter only the selector value, for example")," ",a.jsx("code",{children:"#username"}),f(", not the whole HTML tag.")]}),a.jsxs("li",{children:[f("For usernames and passwords, leave Value empty and use")," ",a.jsx("b",{children:f("Value reference")}),"."]}),a.jsx("li",{children:f("Save the Flow, run it, then use the CLI error to adjust only the failing step.")})]})]}),a.jsxs("div",{className:"guided-flow-guide-decision",children:[a.jsx("b",{children:f("Not sure which locator to choose?")}),a.jsx("span",{children:f("id/name → CSS · button/link name → Role · real label → Label · data-testid → Test ID · no stable attribute → CSS parent + child")})]})]}),a.jsxs("div",{className:"guided-flow-layout",children:[a.jsxs("aside",{className:"guided-flow-list",children:[a.jsxs("div",{className:"guided-flow-list-head",children:[a.jsx("b",{children:f("Guided Flows")}),a.jsx("span",{children:n.length})]}),n.map(G=>a.jsxs("button",{type:"button",className:G.id===m?.id?"is-active":"",onClick:()=>{g(G.id),y(G),D(void 0)},children:[a.jsx("strong",{children:G.name}),a.jsxs("small",{children:[G.steps.length," ",f("steps")]})]},G.id)),!n.length&&a.jsx("p",{className:"guided-flow-empty",children:f("Create a flow to define a deterministic path.")})]}),m?a.jsxs("main",{className:"guided-flow-editor",children:[a.jsxs("div",{className:"guided-flow-fields",children:[a.jsxs("label",{children:[f("Flow name"),a.jsx("input",{className:"field",value:m.name,onChange:G=>B({name:G.target.value})})]}),a.jsxs("label",{children:[f("Base URL"),a.jsx("input",{className:"field",value:m.baseUrl,onChange:G=>B({baseUrl:G.target.value})})]}),a.jsxs("label",{className:"guided-flow-wide",children:[f("Description"),a.jsx("textarea",{className:"field",rows:2,value:m.description??"",onChange:G=>B({description:G.target.value})})]})]}),a.jsxs("div",{className:"guided-flow-section-head",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:f("Flow Steps")}),a.jsx("span",{children:f("Execute only the steps defined here.")})]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:Z,children:f("Duplicate")}),a.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>ae("delete"),children:f("Delete")}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>ae("save"),disabled:b,children:f(b?"Saving…":"Save Flow")})]})]}),a.jsx("div",{className:"guided-flow-steps",children:m.steps.map((G,te)=>a.jsx(K2,{index:te,step:G,status:H.get(G.id),projectId:l,baseUrl:m.baseUrl||i,onChange:pe=>Q(te,pe),onDelete:()=>F(te),onMove:X},G.id))}),a.jsxs("div",{className:"guided-flow-add",children:[a.jsx("select",{className:"field",value:v,onChange:G=>w(G.target.value),children:V2.map(G=>a.jsx("option",{value:G,children:f(G)},G))}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:j,children:f("+ Add Step")})]}),a.jsxs("div",{className:"guided-flow-actions",children:[a.jsx("button",{type:"button",className:"btn btn-primary",disabled:!$||_,onClick:x,children:f(_?"Running…":"Run Flow")}),_&&a.jsx("button",{type:"button",className:"btn btn-danger",onClick:C,children:f("Stop")}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!m.steps.length,onClick:()=>V({framework:"playwright",source:Z1(m)}),children:f("Generate Playwright")}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!m.steps.length,onClick:()=>V({framework:"cypress",source:W1(m)}),children:f("Generate Cypress")}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!m.steps.length,onClick:()=>d(Y1(m)),children:f("Generate Test Case")}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!0,title:f("Record Flow is planned for a future release"),children:f("Record Flow · Planned")})]}),M&&a.jsxs("section",{className:"guided-flow-code",children:[a.jsxs("header",{children:[a.jsxs("b",{children:[M.framework==="playwright"?"Playwright":"Cypress"," ",f("generated source")]}),a.jsx("button",{type:"button",className:"icon-btn",onClick:()=>V(void 0),"aria-label":f("Close generated code"),children:"×"})]}),a.jsx("pre",{children:M.source})]}),L&&a.jsxs("section",{className:"guided-flow-run",children:[a.jsx("header",{children:a.jsxs("b",{children:[f("Run result:")," ",L.status]})}),a.jsx("div",{className:"guided-flow-log",children:L.logs.map((G,te)=>a.jsx("code",{className:`cli-${G.level}`,children:G.message},`${G.timestamp}-${te}`))})]})]}):a.jsxs("div",{className:"guided-flow-empty-state",children:[a.jsx("b",{children:f("No Guided Flow selected")}),a.jsx("span",{children:f("Define a path and LazyScout will follow it only.")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:ee,children:f("Create Guided Flow")})]})]}),K&&m&&a.jsx(X2,{action:K,flowName:m.name,busy:b,onCancel:()=>ae(void 0),onConfirm:q})]})}function X2({action:n,flowName:i,busy:l,onCancel:o,onConfirm:c}){const{ui:d}=Le(),f=n==="delete";return a.jsx("div",{className:"guided-flow-confirm-backdrop",role:"presentation",onMouseDown:o,children:a.jsxs("section",{className:"guided-flow-confirm-modal",role:"dialog","aria-modal":"true","aria-labelledby":"guided-flow-confirm-title",onMouseDown:p=>p.stopPropagation(),children:[a.jsx("span",{className:"guided-flow-confirm-icon"+(f?" is-delete":""),"aria-hidden":"true",children:f?"×":"✓"}),a.jsx("p",{className:"eyebrow",children:d(f?"Remove Guided Flow":"Save Guided Flow")}),a.jsx("h3",{id:"guided-flow-confirm-title",children:d(f?"Delete this Flow?":"Save your changes?")}),a.jsx("p",{children:f?'"'+i+'" will be removed from this local Project. This action cannot be undone.':'"'+i+'" will be saved to this local Project and will be ready to run.'}),a.jsxs("footer",{children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,disabled:l,children:d("Cancel")}),a.jsx("button",{type:"button",className:"btn "+(f?"btn-danger":"btn-primary"),onClick:c,disabled:l,children:d(l?"Saving…":f?"Delete Flow":"Save Flow")})]})]})})}function Mr(){return{strategy:"role",role:"button",name:"Button"}}function Z2(n){const i=crypto.randomUUID();return n==="navigate"?{id:i,type:n,path:"/"}:n==="click"?{id:i,type:n,target:Mr()}:n==="fill"?{id:i,type:n,target:{...Mr(),role:"textbox"},value:""}:n==="select"?{id:i,type:n,target:{...Mr(),role:"combobox"},option:""}:n==="check"?{id:i,type:n,target:{...Mr(),role:"checkbox"},checked:!0}:n==="wait"?{id:i,type:n,mode:"timeout",value:"750"}:{id:i,type:n,assertion:{type:"text",value:""}}}function K2({index:n,step:i,status:l,onChange:o,onDelete:c,onMove:d,projectId:f,baseUrl:p}){const{ui:g}=Le();return a.jsxs("article",{className:`guided-flow-step ${l?`is-${l}`:""}`,children:[a.jsxs("header",{children:[a.jsx("span",{className:"guided-flow-step-number",children:n+1}),a.jsx("b",{children:g(i.type)}),l&&a.jsx("em",{children:g(l)}),a.jsxs("div",{className:"guided-flow-step-actions",children:[a.jsx("button",{type:"button",onClick:()=>d(n,-1),disabled:n===0,children:"↑"}),a.jsx("button",{type:"button",onClick:()=>d(n,1),children:"↓"}),a.jsx("button",{type:"button",onClick:c,children:g("Delete")})]})]}),a.jsx(Q2,{step:i,onChange:o,projectId:f,baseUrl:p})]})}function Q2({step:n,onChange:i,projectId:l,baseUrl:o}){const{ui:c}=Le();return n.type==="navigate"?a.jsxs("label",{children:[c("Path"),a.jsx("input",{className:"field",value:n.path,onChange:d=>i({...n,path:d.target.value})})]}):n.type==="click"||n.type==="fill"||n.type==="select"||n.type==="check"?a.jsxs(a.Fragment,{children:[a.jsx(md,{target:n.target,projectId:l,baseUrl:o,onChange:d=>i({...n,target:d})}),n.type==="fill"&&a.jsxs("div",{className:"guided-flow-inline-fields",children:[a.jsxs("label",{children:[c("Value"),a.jsx("input",{className:"field",value:n.value??"",onChange:d=>i({...n,value:d.target.value,valueRef:void 0})})]}),a.jsxs("label",{children:[c("Value reference"),a.jsx("input",{className:"field",placeholder:"TEST_USERNAME",value:n.valueRef??"",onChange:d=>i({...n,valueRef:d.target.value||void 0,value:d.target.value?void 0:n.value})}),a.jsxs("small",{className:"guided-flow-field-help",children:[c("Use a Project Settings variable such as")," ",a.jsx("code",{children:"TEST_USERNAME"})," ",c("or")," ",a.jsx("code",{children:"TEST_PASSWORD"}),c(". Do not put real credentials in Value.")]})]})]}),n.type==="select"&&a.jsxs("label",{children:[c("Option"),a.jsx("input",{className:"field",value:n.option,onChange:d=>i({...n,option:d.target.value})})]}),n.type==="check"&&a.jsxs("label",{className:"guided-flow-check",children:[a.jsx("input",{type:"checkbox",checked:n.checked,onChange:d=>i({...n,checked:d.target.checked})})," ",c("Checked")]})]}):n.type==="wait"?a.jsxs("div",{className:"guided-flow-inline-fields",children:[a.jsxs("label",{children:[c("Wait type"),a.jsxs("select",{className:"field",value:n.mode,onChange:d=>i({...n,mode:d.target.value}),children:[a.jsx("option",{value:"timeout",children:c("Wait for timeout")}),a.jsx("option",{value:"url",children:c("Wait for URL")}),a.jsx("option",{value:"text",children:c("Wait for text")}),a.jsx("option",{value:"visible",children:c("Wait for element visible")})]})]}),a.jsxs("label",{children:[c("Value"),a.jsx("input",{className:"field",value:n.value,onChange:d=>i({...n,value:d.target.value})})]}),n.mode==="visible"&&a.jsx(md,{target:n.target??Mr(),projectId:l,baseUrl:o,onChange:d=>i({...n,target:d})})]}):a.jsxs("div",{className:"guided-flow-inline-fields",children:[a.jsxs("label",{children:[c("Assertion"),a.jsxs("select",{className:"field",value:n.assertion.type,onChange:d=>i({...n,assertion:d.target.value==="visible"?{type:"visible",target:Mr()}:{type:d.target.value,value:""}}),children:[a.jsx("option",{value:"visible",children:c("Element visible")}),a.jsx("option",{value:"text",children:c("Text visible")}),a.jsx("option",{value:"url",children:c("URL contains")})]})]}),n.assertion.type==="visible"?a.jsx(md,{target:n.assertion.target,projectId:l,baseUrl:o,onChange:d=>i({...n,assertion:{type:"visible",target:d}})}):a.jsxs("label",{children:[c("Expected value"),a.jsx("input",{className:"field",value:n.assertion.value,onChange:d=>i({...n,assertion:n.assertion.type==="text"?{type:"text",value:d.target.value}:{type:"url",value:d.target.value}})})]})]})}function md({target:n,onChange:i,projectId:l,baseUrl:o}){const{ui:c}=Le(),[d,f]=z.useState(!1),p=n.strategy==="role"?n.name??"":n[n.strategy==="testid"?"testId":n.strategy==="css"?"cssSelector":n.strategy];return a.jsxs("div",{className:"guided-flow-target",children:[a.jsxs("div",{className:"guided-flow-picker-head",children:[a.jsx("span",{children:c("Target element")}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!l||!o,onClick:()=>f(g=>!g),children:c("◎ Pick from page")})]}),d&&l&&o&&a.jsx("div",{className:"guided-flow-picker",children:a.jsx(Py,{projectId:l,targetUrl:o,onSaveRecording:()=>{},onPickTarget:g=>{i({...Mr(),...g}),f(!1)}})}),a.jsxs("label",{children:[c("Locator"),a.jsxs("select",{className:"field",value:n.strategy,onChange:g=>i({strategy:g.target.value,value:""}),children:[a.jsx("option",{value:"role",children:c("Role")}),a.jsx("option",{value:"label",children:c("Label")}),a.jsx("option",{value:"placeholder",children:c("Placeholder")}),a.jsx("option",{value:"text",children:c("Text")}),a.jsx("option",{value:"testid",children:"Test ID"}),a.jsx("option",{value:"css",children:"CSS"})]}),a.jsx("small",{className:"guided-flow-field-help",children:J2(n.strategy)})]}),n.strategy==="role"&&a.jsxs("label",{children:[c("Role"),a.jsx("input",{className:"field",value:n.role??"",onChange:g=>i({...n,role:g.target.value})})]}),a.jsxs("label",{children:[n.strategy==="role"?c("Accessible name"):c("Value"),a.jsx("input",{className:"field",value:p??"",placeholder:sv(n.strategy),onChange:g=>i(W2(n,g.target.value))}),a.jsxs("small",{className:"guided-flow-field-help",children:[c("Example:")," ",a.jsx("code",{children:sv(n.strategy)})]})]})]})}function J2(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 sv(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 W2(n,i){return n.strategy==="role"?{...n,name:i}:n.strategy==="testid"?{...n,testId:i}:n.strategy==="css"?{...n,cssSelector:i.replace(/\\(["'])/g,"$1")}:{...n,[n.strategy]:i}}function eC({result:n,testCaseCount:i,flows:l,baseUrl:o,projectId:c,secrets:d,onSaveFlows:f,onGenerateTestCase:p,onAddToFlow:g,onClose:m,onOpenCases:y}){const{ui:v}=Le(),[w,b]=z.useState("state-flow"),[E,_]=z.useState("auto-scout"),[O,S]=z.useState(),[T,L]=z.useState(),[D,M]=z.useState(1),V=n.actionGraph.states.find(ae=>ae.id===O),K=n.actionGraph.edges.find(ae=>ae.id===T);return a.jsx("div",{className:"modern-modal-backdrop",onMouseDown:ae=>ae.target===ae.currentTarget&&m(),children:a.jsxs("section",{className:"modern-modal explorer-flow-modal",role:"dialog","aria-modal":"true","aria-labelledby":"flow-title",children:[a.jsxs("header",{className:"modal-header",children:[a.jsxs("div",{children:[a.jsx("span",{className:"eyebrow",children:v("Website explorer")}),a.jsx("h2",{id:"flow-title",children:v("UI State Explorer")}),a.jsx("p",{children:n.origin})]}),a.jsx("button",{type:"button",className:"icon-btn",onClick:m,"aria-label":v("Close explorer"),children:"×"})]}),a.jsxs("div",{className:"explorer-main-tabs",role:"tablist","aria-label":v("Explorer mode"),children:[a.jsx("button",{type:"button",className:E==="auto-scout"?"active":"",onClick:()=>_("auto-scout"),children:v("Auto Scout")}),a.jsx("button",{type:"button",className:E==="guided-flow"?"active":"",onClick:()=>_("guided-flow"),children:v("Guided Flow")})]}),E==="guided-flow"?a.jsx(Y2,{flows:l,baseUrl:o,projectId:c,secrets:d,onSave:f,onGenerateTestCase:p}):a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"explorer-hero",children:[a.jsxs("div",{className:"explorer-number",children:[a.jsx("strong",{children:i}),a.jsx("span",{children:v("draft test cases")})]}),a.jsxs("div",{className:"explorer-number",children:[a.jsx("strong",{children:n.stats.pagesVisited}),a.jsx("span",{children:v("pages discovered")})]}),a.jsxs("div",{className:"explorer-number",children:[a.jsx("strong",{children:n.actionGraph.states.length}),a.jsx("span",{children:v("UI states observed")})]})]}),a.jsxs("div",{className:"explorer-view-tabs",role:"tablist","aria-label":v("Explorer view"),children:[a.jsx("button",{type:"button",className:w==="site-map"?"active":"",onClick:()=>b("site-map"),children:v("Site Map")}),a.jsxs("button",{type:"button",className:w==="state-flow"?"active":"",onClick:()=>b("state-flow"),children:[v("State Flow")," ",a.jsx("span",{children:n.actionGraph.edges.length})]})]}),w==="site-map"?a.jsx(tC,{result:n,onSelect:ae=>{S(ae.id),b("state-flow")}}):a.jsxs("div",{className:"state-flow-layout",children:[a.jsx(nC,{states:n.actionGraph.states,edges:n.actionGraph.edges,selectedStateId:O,selectedEdgeId:T,zoom:D,onZoom:M,onState:ae=>{S(ae),L(void 0)},onEdge:ae=>{L(ae),S(void 0)}}),a.jsx(aC,{state:V,edge:K,states:n.actionGraph.states,onAddToFlow:g})]})]}),a.jsxs("footer",{className:"modal-footer",children:[a.jsxs("span",{className:"flow-safety",children:[n.actionGraph.blockedActionKeys.length," ",v("unsafe actions blocked")]}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:m,children:v("Close")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:y,children:v("Review Test Cases")})]})]})})}function tC({result:n,onSelect:i}){const{ui:l}=Le(),o=z.useMemo(()=>{const c=new Map;for(const d of n.actionGraph.states){const f=c.get(d.url)??[];f.push(d),c.set(d.url,f)}return[...c.entries()]},[n.actionGraph.states]);return a.jsx("div",{className:"site-map-list",children:o.map(([c,d])=>a.jsxs("section",{children:[a.jsx("h3",{children:new URL(c).pathname||"/"}),a.jsx("small",{children:c}),d.map(f=>a.jsxs("button",{type:"button",onClick:()=>i(f),children:[a.jsx("i",{className:`state-type-${f.type}`})," ",a.jsx("span",{children:f.name||f.title||l("Observed state")}),a.jsx("em",{children:l(f.type)})]},f.id))]},c))})}function nC({states:n,edges:i,selectedStateId:l,selectedEdgeId:o,zoom:c,onZoom:d,onState:f,onEdge:p}){const{ui:g}=Le(),m=[...new Map(n.map(S=>[S.url,n.filter(T=>T.url===S.url)])).values()],y=Math.max(1,Math.min(4,Math.ceil(Math.sqrt(m.length)))),v=Math.ceil(m.length/y),b=Math.max(1,...m.map(S=>S.length))*130+90,E=new Map;m.forEach((S,T)=>{const L=T%y,D=Math.floor(T/y);S.forEach((M,V)=>{E.set(M.id,{x:150+L*300,y:115+D*b+V*130})})});const _=y*300+80,O=Math.max(320,v*b+40);return a.jsxs("div",{className:"state-flow-canvas",children:[a.jsxs("div",{className:"flow-toolbar",children:[a.jsxs("span",{children:[n.length," ",g("states ·")," ",i.length," ",g("transitions")]}),a.jsxs("div",{children:[a.jsx("button",{type:"button",onClick:()=>d(Math.max(.6,c-.15)),children:"−"}),a.jsx("button",{type:"button",onClick:()=>d(Math.min(1.4,c+.15)),children:"+"}),a.jsx("button",{type:"button",onClick:()=>d(1),children:g("Fit")})]})]}),a.jsx("div",{className:"flow-viewport",children:a.jsxs("svg",{width:_*c,height:O*c,viewBox:`0 0 ${_} ${O}`,"aria-label":g("UI state flow graph"),children:[a.jsx("defs",{children:a.jsx("marker",{id:"flow-arrow",markerWidth:"8",markerHeight:"8",refX:"7",refY:"4",orient:"auto",children:a.jsx("path",{d:"M0,0 L8,4 L0,8 Z",fill:"#94a3b8"})})}),m.map((S,T)=>{const L=T%y,D=Math.floor(T/y),M=20+L*300,V=35+D*b;return a.jsxs("g",{className:"flow-page-group",children:[a.jsx("rect",{x:M,y:V,width:"260",height:b-20,rx:"14"}),a.jsx("text",{x:M+14,y:V+22,className:"flow-page-label",children:gd(new URL(S[0].url).pathname||"/",30)})]},S[0].url)}),i.map(S=>{const T=E.get(S.fromStateId),L=S.toStateId?E.get(S.toStateId):void 0;if(!T||!L)return null;const D=S.id===o;return a.jsxs("g",{onClick:()=>p(S.id),className:"flow-edge",children:[a.jsx("path",{className:D?"selected":"",d:`M ${T.x} ${T.y+38} C ${T.x} ${T.y+95}, ${L.x} ${L.y-95}, ${L.x} ${L.y-38}`,markerEnd:"url(#flow-arrow)"}),a.jsx("title",{children:S.action.description})]},S.id)}),n.map(S=>{const T=E.get(S.id),L=S.id===l;return a.jsxs("g",{onClick:()=>f(S.id),className:"flow-node",children:[a.jsx("rect",{className:L?"selected":"",x:T.x-112,y:T.y-38,width:"224",height:"76",rx:"12"}),a.jsx("text",{x:T.x-94,y:T.y-11,className:"flow-node-type",children:g(S.type).toUpperCase()}),a.jsx("text",{x:T.x-94,y:T.y+12,className:"flow-node-name",children:gd(S.name||S.title||S.url,27)}),a.jsx("text",{x:T.x-94,y:T.y+28,className:"flow-node-url",children:gd(new URL(S.url).pathname||"/",31)}),a.jsx("title",{children:S.name||S.title||S.url})]},S.id)})]})})]})}function aC({state:n,edge:i,states:l,onAddToFlow:o}){const{ui:c}=Le();if(!n&&!i)return a.jsxs("aside",{className:"flow-inspector empty",children:[a.jsx("b",{children:c("Select a state or transition")}),a.jsx("span",{children:c("Click a node to view observed UI. Click a line to inspect the action that created it.")})]});if(i){const d=l.find(p=>p.id===i.fromStateId),f=l.find(p=>p.id===i.toStateId);return a.jsxs("aside",{className:"flow-inspector",children:[a.jsx("p",{className:"eyebrow",children:c("Transition detail")}),a.jsx("h3",{children:i.action.description}),a.jsxs("dl",{children:[a.jsx("dt",{children:c("Action type")}),a.jsx("dd",{children:c(i.action.type)}),a.jsx("dt",{children:c("Status")}),a.jsx("dd",{children:i.status}),a.jsx("dt",{children:c("Safety")}),a.jsx("dd",{children:i.action.safe?c("Safe action"):i.action.reason||c("Blocked")}),a.jsx("dt",{children:c("From")}),a.jsx("dd",{children:d?.name||d?.url}),a.jsx("dt",{children:c("To")}),a.jsx("dd",{children:f?.name||c("Not observed")}),i.action.locator&&a.jsxs(a.Fragment,{children:[a.jsx("dt",{children:c("Locator")}),a.jsxs("dd",{children:[i.action.locator.role,": ",i.action.locator.name]})]}),i.action.locator&&a.jsx("button",{type:"button",className:"btn btn-secondary mt-3",onClick:()=>o({id:crypto.randomUUID(),type:"click",target:rC(i.action.locator)}),children:c("Add to Guided Flow")})]})]})}return a.jsxs("aside",{className:"flow-inspector",children:[a.jsx("p",{className:"eyebrow",children:c("State detail")}),a.jsx("h3",{children:n.name||n.title||c("Observed state")}),a.jsxs("dl",{children:[a.jsx("dt",{children:c("Type")}),a.jsx("dd",{children:c(n.type)}),a.jsx("dt",{children:"URL"}),a.jsx("dd",{className:"break-all",children:n.url}),a.jsx("dt",{children:c("Fingerprint")}),a.jsxs("dd",{className:"font-mono",children:[n.fingerprint.slice(0,18),"…"]}),a.jsx("dt",{children:c("Discovered")}),a.jsx("dd",{children:n.discoveredAt?new Date(n.discoveredAt).toLocaleString():c("Previous scan")})]}),a.jsxs("section",{children:[a.jsx("b",{children:c("Observed UI")}),a.jsx("p",{children:n.headings.slice(0,3).join(" · ")||c("No headings recorded")}),a.jsx("p",{children:n.visibleDialogs.length?`Dialog: ${n.visibleDialogs.join(", ")}`:`${n.controls.length} controls observed`}),n.validationMessages?.length?a.jsxs("p",{children:[c("Validation:")," ",n.validationMessages.join(" · ")]}):null]})]})}function rC(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 gd(n,i){return n.length>i?`${n.slice(0,i-1)}…`:n}const lv=n=>n.join(`
|
|
58
|
+
`),iC=n=>n.split(/[\n,]/).map(i=>i.trim());function sC({filter:n,onChange:i}){const{ui:l}=Le(),[o,c]=z.useState(()=>lv(n.keywords)),d=(f,p=n.enabled)=>{c(f),i({enabled:p,keywords:iC(f)})};return a.jsxs("div",{className:"settings-notice settings-notice-stacked click-filter-panel",children:[a.jsxs("b",{children:[l("Click safeguards")," ",n.enabled?l("ON"):l("OFF")]}),a.jsx("span",{children:l("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.")}),a.jsxs("label",{className:"settings-toggle",children:[a.jsx("input",{type:"checkbox",checked:n.enabled,onChange:f=>i({...n,enabled:f.target.checked})}),a.jsx("span",{children:l("Block controls whose label contains one of these words")})]}),n.enabled&&a.jsxs(a.Fragment,{children:[a.jsx("textarea",{className:"click-filter-input",rows:5,value:o,onChange:f=>d(f.target.value),placeholder:`delete
|
|
59
|
+
pay now
|
|
60
|
+
transfer`}),a.jsx("p",{className:"click-filter-help",children:l("One word per line. Matching ignores case and looks at the label, title, name, id and link URL of a control.")}),a.jsxs("div",{className:"recorder-actions",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>d(lv([...new Set([...n.keywords,...Ty])])),children:l("Add suggested words")}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>d(""),children:l("Clear list")})]})]})]})}const lC={"not-configured":["No session saved","ยังไม่มีเซสชัน"],recorded:["Session saved — not verified yet","บันทึกแล้ว — ยังไม่ได้ตรวจสอบ"],verifying:["Checking…","กำลังตรวจสอบ…"],ready:["Ready — a protected page opened","พร้อมใช้ — เปิดหน้าที่ต้องล็อกอินได้"],expired:["Expired — sign in again","หมดอายุ — ต้องเข้าสู่ระบบใหม่"],invalid:["Unusable — record the login again","ใช้ไม่ได้ — บันทึกการเข้าสู่ระบบใหม่"]};function po(n){return n instanceof Error?n.message:String(n)}function oC({projectName:n,projectId:i,targetUrl:l,secrets:o,onSave:c,onClear:d,onClose:f,onSaveRecording:p,clickFilter:g,onChangeClickFilter:m,initialTab:y="credentials"}){const{ui:v,language:w}=Le(),b=w==="th",[E,_]=z.useState(y),[O,S]=z.useState(o),[T,L]=z.useState(),[D,M]=z.useState(!1),[V,K]=z.useState(!1),[ae,I]=z.useState(!1),[$,ee]=z.useState(!1),[B,Q]=z.useState(!1),[j,F]=z.useState(!1),[X,Y]=z.useState(),[Z,R]=z.useState(""),[q,x]=z.useState(!1),C=(Ce,qe)=>S(Ie=>({...Ie,[Ce]:qe||void 0})),H=T?.status??"not-configured",G=T?.loginBrowserOpen??j,te=V||ae||$,pe=H!=="not-configured",Ne=!pe||H==="expired"||H==="invalid",we=JSON.stringify(O)!==JSON.stringify(o),se=T?.detail??(T?.verifiedAt?`${b?"ตรวจล่าสุด":"Last verified"} ${new Date(T.verifiedAt).toLocaleString()}${T.verifiedPath?` · ${T.verifiedPath}`:""}`:T?.capturedAt?`${b?"บันทึกเมื่อ":"Captured"} ${new Date(T.capturedAt).toLocaleString()}`:b?"ยังไม่ได้บันทึกเซสชัน สำหรับโปรเจกต์นี้":"No session has been recorded for this Project yet.");async function _e(){if(i){M(!0);try{L(await x0(i))}catch{L(void 0)}finally{M(!1)}}}return z.useEffect(()=>{_e()},[i]),a.jsx("div",{className:"modal-backdrop",role:"presentation",onMouseDown:Ce=>{Ce.target===Ce.currentTarget&&f()},children:a.jsxs("section",{className:"modal-card project-settings-modal",role:"dialog","aria-modal":"true","aria-labelledby":"project-settings-title",children:[a.jsxs("div",{className:"modal-head",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:b?"ตั้งค่าโปรเจกต์":"Project settings"}),a.jsx("h2",{id:"project-settings-title",children:E==="credentials"?b?"ข้อมูลสำหรับทดสอบ":"Test credentials":E==="session"?"Browser session":E==="safety"?b?"กฎความปลอดภัย":"Safety rules":b?"บันทึกขั้นตอน":"Record a flow"}),a.jsxs("p",{children:[n??(b?"โปรเจกต์ปัจจุบัน":"Current project")," ·"," ",b?"ตั้งค่าทีละหมวด":"Configure one task at a time"]})]}),a.jsx("button",{type:"button",className:"icon-btn",onClick:f,"aria-label":v("Close"),children:"×"})]}),a.jsx("nav",{className:"settings-tabs","aria-label":v("Project settings sections"),children:[["credentials",b?"ข้อมูลทดสอบ":"Credentials",b?"ตัวแปรสำหรับเข้าสู่ระบบและเรียก API":"Variables used by login and API steps"],["session",b?"เซสชันเบราว์เซอร์":"Browser Session",b?"Google, SSO และ Cookie ที่บันทึกไว้":"Google, SSO, and saved cookies"],["safety",b?"ความปลอดภัย":"Safety",b?"ป้องกันการคลิกที่มีความเสี่ยง":"Block risky clicks and actions"],["recorder",b?"บันทึกขั้นตอน":"Recorder",b?"เก็บการคลิกและการพิมพ์เป็นขั้นตอนทดสอบ":"Turn your browser actions into Test Steps"]].map(([Ce,qe,Ie])=>a.jsx("button",{type:"button",title:Ie,"aria-label":`${qe} — ${Ie}`,className:E===Ce?"is-active":"",onClick:()=>_(Ce),children:a.jsx("b",{children:qe})},Ce))}),a.jsxs("div",{className:"modal-body",children:[E==="credentials"&&a.jsxs("div",{className:"settings-section",children:[a.jsxs("div",{className:"settings-notice",children:[a.jsx("b",{children:b?"เก็บในหน่วยความจำเท่านั้น":"Memory only"}),a.jsx("span",{children:b?"ข้อมูลจะอยู่ในแท็บนี้เท่านั้น ถูกล้างเมื่อ Refresh และไม่ถูกเขียนลง Test Case หรือ Log":"Values stay in this browser tab, are cleared on refresh and are never written to Test Cases or logs."})]}),a.jsxs("div",{className:"settings-grid",children:[a.jsxs("label",{children:[a.jsx("span",{children:v("Email")}),a.jsx("input",{type:"email",value:O.email??"",onChange:Ce=>C("email",Ce.target.value),placeholder:v("Test email"),autoComplete:"off"})]}),a.jsxs("label",{children:[a.jsx("span",{children:v("Username")}),a.jsx("input",{value:O.username??"",onChange:Ce=>C("username",Ce.target.value),placeholder:v("Test username"),autoComplete:"off"})]}),a.jsxs("label",{children:[a.jsx("span",{children:v("Password")}),a.jsx("input",{type:"password",value:O.password??"",onChange:Ce=>C("password",Ce.target.value),placeholder:v("Test password"),autoComplete:"off"})]}),a.jsxs("label",{children:[a.jsx("span",{children:v("API Token")}),a.jsx("input",{type:"password",value:O.apiToken??"",onChange:Ce=>C("apiToken",Ce.target.value),placeholder:v("API token"),autoComplete:"off"})]})]}),a.jsxs("p",{className:"settings-help",children:[v("Use")," ",a.jsx("code",{children:"{{TEST_PASSWORD}}"}),", ",a.jsx("code",{children:"{{TEST_EMAIL}}"}),","," ",a.jsx("code",{children:"{{TEST_USERNAME}}"})," ",v("or")," ",a.jsx("code",{children:"{{API_TOKEN}}"})," ",v("in a Test Case. Values are passed to the runner only while it runs.")]}),a.jsxs("div",{className:"settings-notice settings-notice-stacked",children:[a.jsx("b",{children:b?"วิธีใช้ข้อมูลทดสอบกับ Guided Flow":"How to connect credentials to Guided Flow"}),a.jsxs("span",{children:[b?"ในขั้นตอน Fill ให้เว้น Value ว่าง แล้วใส่ ":"In a Fill step, leave Value empty and put ",a.jsx("code",{children:"TEST_USERNAME"}),", ",a.jsx("code",{children:"TEST_PASSWORD"}),", ",b?"หรือ":"or"," ",a.jsx("code",{children:"TEST_EMAIL"})," ",b?"ใน Value reference โดย LazyScout จะแทนค่าตอนรันเท่านั้น":"in Value reference. LazyScout replaces the reference only during the run."]})]})]}),E==="session"&&i&&l&&a.jsxs("div",{className:"auth-panel",children:[a.jsxs("div",{className:`auth-state auth-state-${H}`,"aria-live":"polite",children:[a.jsx("span",{className:"auth-state-dot"}),a.jsxs("div",{children:[a.jsx("b",{children:lC[H][b?1:0]}),a.jsx("small",{children:se})]}),a.jsx("span",{className:"auth-state-badge",children:H})]}),Ne&&!G&&a.jsxs("ol",{className:"auth-steps",children:[a.jsx("li",{children:b?"เปิดเบราว์เซอร์เพื่อเข้าสู่ระบบ แล้วเข้าสู่ระบบ":"Open the login browser and sign in"}),a.jsx("li",{children:b?"กดบันทึกเซสชัน":"Capture the session"}),a.jsx("li",{children:b?"ตรวจสอบเซสชันกับหน้าที่ต้องเข้าสู่ระบบ":"Verify against a page that requires a login"})]}),G&&a.jsx("p",{className:"settings-help",role:"status",children:b?"เข้าสู่ระบบในหน้าต่างเบราว์เซอร์ที่เปิดแยกไว้ แล้วกลับมากดบันทึกเซสชัน โดยเปิดหน้าต่างนั้นค้างไว้":"Sign in in the separate browser window. Leave it open and return here to click Capture session."}),H==="recorded"&&!G&&a.jsx("p",{className:"settings-help",children:b?"บันทึกเซสชัน แล้ว ใส่ path ของหน้าที่ต้องล็อกอิน แล้วกดตรวจสอบ":"The session is saved. Enter a path that requires login, then click Verify."}),pe&&a.jsxs("dl",{className:"auth-session-facts",children:[a.jsxs("div",{children:[a.jsx("dt",{children:b?"Cookie":"Cookies"}),a.jsxs("dd",{children:[T?.cookieCount??0,T?.sessionCookieCount?` (${T.sessionCookieCount} session)`:""]})]}),a.jsxs("div",{children:[a.jsx("dt",{children:b?"Origin":"Origins"}),a.jsx("dd",{children:T?.originCount??0})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"sessionStorage"}),a.jsx("dd",{children:T?.sessionStorageOriginCount??0})]}),a.jsxs("div",{children:[a.jsx("dt",{children:"IndexedDB"}),a.jsx("dd",{children:T?.indexedDb?b?"รวม":"included":b?"ไม่รองรับ":"unsupported"})]})]}),T?.browserModeMismatch&&a.jsx("p",{className:"auth-warn",children:b?"Session ถูกบันทึกคนละโหมดเบราว์เซอร์กับที่ใช้รัน บางเว็บจะปฏิเสธ":"Captured in a different browser mode from the one runs use. Some applications reject that."}),T?.lockedBy&&a.jsx("p",{className:"auth-warn",children:b?`กำลังถูกใช้โดย ${T.lockedBy} — รันพร้อมกันสองตัวจะทำให้ session หลุด`:`Held by ${T.lockedBy}. Running two at once on one session signs both out.`}),a.jsxs("div",{className:"auth-session-actions",children:[a.jsx("button",{type:"button",className:Ne&&!G?"btn btn-primary":"btn btn-secondary",disabled:V||te,onClick:async()=>{K(!0),Y(void 0);try{await b0(i,l),F(!0),await _e()}catch(Ce){Y(po(Ce))}finally{K(!1)}},children:V?b?"กำลังเปิด…":"Opening…":b?"เปิดเบราว์เซอร์เพื่อเข้าสู่ระบบ":"Open login browser"}),a.jsx("button",{type:"button",className:G?"btn btn-primary":"btn btn-secondary",disabled:!G||te,title:G?void 0:b?"เปิดเบราว์เซอร์เพื่อเข้าสู่ระบบ และเข้าสู่ระบบก่อน":"Open the login browser and sign in first",onClick:async()=>{I(!0),Y(void 0);try{L(await S0(i)),F(!1)}catch(Ce){Y(po(Ce))}finally{I(!1)}},children:ae?b?"กำลังบันทึก…":"Capturing…":b?"บันทึกเซสชัน":"Capture session"}),G&&a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:ae,onClick:async()=>{Y(void 0);try{await j0(i),F(!1),await _e()}catch(Ce){Y(po(Ce))}},children:b?"ยกเลิกการเข้าสู่ระบบ":"Cancel sign-in"})]}),a.jsxs("label",{className:"auth-verify-row",children:[a.jsx("span",{children:b?"หน้าที่ต้องล็อกอิน (เช่น /dashboard)":"A path that requires a login (e.g. /dashboard)"}),a.jsxs("div",{children:[a.jsx("input",{value:Z,onChange:Ce=>R(Ce.target.value),placeholder:"/dashboard",autoComplete:"off"}),a.jsx("button",{type:"button",className:H==="recorded"&&!G?"btn btn-primary":"btn btn-secondary",disabled:te||G||!pe||!Z.trim(),title:G?b?"บันทึกเซสชัน จากหน้าต่างที่เปิดก่อน":"Capture the session from the open browser first":pe?Z.trim()?void 0:b?"ใส่ path ของหน้าที่ต้องล็อกอิน":"Enter a path that requires a login":b?"บันทึกเซสชัน ก่อน":"Capture a session first",onClick:async()=>{ee(!0),Y(void 0);try{const Ce=new URL(Z||"/",l).toString();L(await w0(i,Ce))}catch(Ce){Y(po(Ce))}finally{ee(!1)}},children:$?b?"กำลังตรวจ…":"Verifying…":b?"ตรวจสอบ":"Verify"})]})]}),X&&a.jsx("p",{className:"auth-session-error",children:X}),a.jsxs("div",{className:"auth-session-actions auth-session-secondary",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:D,onClick:()=>{_e()},children:D?b?"กำลังเช็ก…":"Checking…":b?"รีเฟรชสถานะ":"Refresh status"}),B?a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:"btn btn-danger",onClick:async()=>{await E0(i),Q(!1),F(!1),await _e()},children:b?"ยืนยันล้าง":"Confirm clear"}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Q(!1),children:b?"ยกเลิก":"Cancel"})]}):a.jsx("button",{type:"button",className:"btn btn-danger",disabled:te,onClick:()=>Q(!0),children:b?"ล้างเซสชัน":"Clear login session"})]}),a.jsx("small",{className:"auth-session-hint",children:b?"สถานะจะเป็น ready ก็ต่อเมื่อเปิดหน้าที่ต้องล็อกอินได้จริงเท่านั้น การมีโฟลเดอร์อยู่ไม่ได้แปลว่า login ยังใช้ได้ · เคสที่บันทึกการ Login ไว้ต้องล้างเซสชัน ก่อนถึงจะ replay ได้":"The status reaches ready only when a protected page actually opens — a saved folder never meant a working login. A recorded login Test Case needs the session cleared before it can replay."})]}),E==="session"&&(!i||!l)&&a.jsxs("div",{className:"settings-empty-state",children:[a.jsx("b",{children:b?"Scout เว็บไซต์ก่อน":"Scout a website first"}),a.jsx("span",{children:b?"ต้องมี Target URL ก่อน LazyScout จึงจะสร้าง Browser Session ที่ใช้ซ้ำได้":"A target URL is required before LazyScout can create a reusable browser session."})]}),E==="safety"&&a.jsx(sC,{filter:g,onChange:m}),E==="recorder"&&i&&l&&p&&a.jsx(Py,{projectId:i,targetUrl:l,onSaveRecording:p}),E==="recorder"&&(!i||!l)&&a.jsxs("div",{className:"settings-empty-state",children:[a.jsx("b",{children:b?"เพิ่ม Target URL ก่อน":"Add a target URL first"}),a.jsx("span",{children:b?"Scout เว็บไซต์หนึ่งครั้ง แล้วกลับมาบันทึก Login และ Business Flow ที่นี่":"Scout a website once, then return here to record login and business flows."})]})]}),a.jsxs("div",{className:"modal-footer",children:[a.jsx("button",{type:"button",className:"btn btn-secondary mr-auto",onClick:()=>{d(),S({}),x(!1)},children:b?"ล้างข้อมูลทดสอบ":"Clear secrets"}),q&&!we&&a.jsx("span",{className:"settings-saved",role:"status",children:b?"บันทึกแล้ว":"Saved"}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:f,children:b?"ปิด":"Close"}),a.jsx("button",{type:"button",className:"btn btn-primary",disabled:!we,title:we?void 0:b?"ยังไม่มีการแก้ไข":"Nothing has changed",onClick:()=>{c(O),x(!0)},children:b?"บันทึกข้อมูลทดสอบ":"Save credentials"})]})]})})}var vd={exports:{}},ov;function cC(){return ov||(ov=1,(function(n){var i=(function(l){var o=Object.prototype,c=o.hasOwnProperty,d=Object.defineProperty||function(R,q,x){R[q]=x.value},f,p=typeof Symbol=="function"?Symbol:{},g=p.iterator||"@@iterator",m=p.asyncIterator||"@@asyncIterator",y=p.toStringTag||"@@toStringTag";function v(R,q,x){return Object.defineProperty(R,q,{value:x,enumerable:!0,configurable:!0,writable:!0}),R[q]}try{v({},"")}catch{v=function(q,x,C){return q[x]=C}}function w(R,q,x,C){var H=q&&q.prototype instanceof L?q:L,G=Object.create(H.prototype),te=new X(C||[]);return d(G,"_invoke",{value:B(R,x,te)}),G}l.wrap=w;function b(R,q,x){try{return{type:"normal",arg:R.call(q,x)}}catch(C){return{type:"throw",arg:C}}}var E="suspendedStart",_="suspendedYield",O="executing",S="completed",T={};function L(){}function D(){}function M(){}var V={};v(V,g,function(){return this});var K=Object.getPrototypeOf,ae=K&&K(K(Y([])));ae&&ae!==o&&c.call(ae,g)&&(V=ae);var I=M.prototype=L.prototype=Object.create(V);D.prototype=M,d(I,"constructor",{value:M,configurable:!0}),d(M,"constructor",{value:D,configurable:!0}),D.displayName=v(M,y,"GeneratorFunction");function $(R){["next","throw","return"].forEach(function(q){v(R,q,function(x){return this._invoke(q,x)})})}l.isGeneratorFunction=function(R){var q=typeof R=="function"&&R.constructor;return q?q===D||(q.displayName||q.name)==="GeneratorFunction":!1},l.mark=function(R){return Object.setPrototypeOf?Object.setPrototypeOf(R,M):(R.__proto__=M,v(R,y,"GeneratorFunction")),R.prototype=Object.create(I),R},l.awrap=function(R){return{__await:R}};function ee(R,q){function x(G,te,pe,Ne){var we=b(R[G],R,te);if(we.type==="throw")Ne(we.arg);else{var se=we.arg,_e=se.value;return _e&&typeof _e=="object"&&c.call(_e,"__await")?q.resolve(_e.__await).then(function(Ce){x("next",Ce,pe,Ne)},function(Ce){x("throw",Ce,pe,Ne)}):q.resolve(_e).then(function(Ce){se.value=Ce,pe(se)},function(Ce){return x("throw",Ce,pe,Ne)})}}var C;function H(G,te){function pe(){return new q(function(Ne,we){x(G,te,Ne,we)})}return C=C?C.then(pe,pe):pe()}d(this,"_invoke",{value:H})}$(ee.prototype),v(ee.prototype,m,function(){return this}),l.AsyncIterator=ee,l.async=function(R,q,x,C,H){H===void 0&&(H=Promise);var G=new ee(w(R,q,x,C),H);return l.isGeneratorFunction(q)?G:G.next().then(function(te){return te.done?te.value:G.next()})};function B(R,q,x){var C=E;return function(G,te){if(C===O)throw new Error("Generator is already running");if(C===S){if(G==="throw")throw te;return Z()}for(x.method=G,x.arg=te;;){var pe=x.delegate;if(pe){var Ne=Q(pe,x);if(Ne){if(Ne===T)continue;return Ne}}if(x.method==="next")x.sent=x._sent=x.arg;else if(x.method==="throw"){if(C===E)throw C=S,x.arg;x.dispatchException(x.arg)}else x.method==="return"&&x.abrupt("return",x.arg);C=O;var we=b(R,q,x);if(we.type==="normal"){if(C=x.done?S:_,we.arg===T)continue;return{value:we.arg,done:x.done}}else we.type==="throw"&&(C=S,x.method="throw",x.arg=we.arg)}}}function Q(R,q){var x=q.method,C=R.iterator[x];if(C===f)return q.delegate=null,x==="throw"&&R.iterator.return&&(q.method="return",q.arg=f,Q(R,q),q.method==="throw")||x!=="return"&&(q.method="throw",q.arg=new TypeError("The iterator does not provide a '"+x+"' method")),T;var H=b(C,R.iterator,q.arg);if(H.type==="throw")return q.method="throw",q.arg=H.arg,q.delegate=null,T;var G=H.arg;if(!G)return q.method="throw",q.arg=new TypeError("iterator result is not an object"),q.delegate=null,T;if(G.done)q[R.resultName]=G.value,q.next=R.nextLoc,q.method!=="return"&&(q.method="next",q.arg=f);else return G;return q.delegate=null,T}$(I),v(I,y,"Generator"),v(I,g,function(){return this}),v(I,"toString",function(){return"[object Generator]"});function j(R){var q={tryLoc:R[0]};1 in R&&(q.catchLoc=R[1]),2 in R&&(q.finallyLoc=R[2],q.afterLoc=R[3]),this.tryEntries.push(q)}function F(R){var q=R.completion||{};q.type="normal",delete q.arg,R.completion=q}function X(R){this.tryEntries=[{tryLoc:"root"}],R.forEach(j,this),this.reset(!0)}l.keys=function(R){var q=Object(R),x=[];for(var C in q)x.push(C);return x.reverse(),function H(){for(;x.length;){var G=x.pop();if(G in q)return H.value=G,H.done=!1,H}return H.done=!0,H}};function Y(R){if(R){var q=R[g];if(q)return q.call(R);if(typeof R.next=="function")return R;if(!isNaN(R.length)){var x=-1,C=function H(){for(;++x<R.length;)if(c.call(R,x))return H.value=R[x],H.done=!1,H;return H.value=f,H.done=!0,H};return C.next=C}}return{next:Z}}l.values=Y;function Z(){return{value:f,done:!0}}return X.prototype={constructor:X,reset:function(R){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(F),!R)for(var q in this)q.charAt(0)==="t"&&c.call(this,q)&&!isNaN(+q.slice(1))&&(this[q]=f)},stop:function(){this.done=!0;var R=this.tryEntries[0],q=R.completion;if(q.type==="throw")throw q.arg;return this.rval},dispatchException:function(R){if(this.done)throw R;var q=this;function x(Ne,we){return G.type="throw",G.arg=R,q.next=Ne,we&&(q.method="next",q.arg=f),!!we}for(var C=this.tryEntries.length-1;C>=0;--C){var H=this.tryEntries[C],G=H.completion;if(H.tryLoc==="root")return x("end");if(H.tryLoc<=this.prev){var te=c.call(H,"catchLoc"),pe=c.call(H,"finallyLoc");if(te&&pe){if(this.prev<H.catchLoc)return x(H.catchLoc,!0);if(this.prev<H.finallyLoc)return x(H.finallyLoc)}else if(te){if(this.prev<H.catchLoc)return x(H.catchLoc,!0)}else if(pe){if(this.prev<H.finallyLoc)return x(H.finallyLoc)}else throw new Error("try statement without catch or finally")}}},abrupt:function(R,q){for(var x=this.tryEntries.length-1;x>=0;--x){var C=this.tryEntries[x];if(C.tryLoc<=this.prev&&c.call(C,"finallyLoc")&&this.prev<C.finallyLoc){var H=C;break}}H&&(R==="break"||R==="continue")&&H.tryLoc<=q&&q<=H.finallyLoc&&(H=null);var G=H?H.completion:{};return G.type=R,G.arg=q,H?(this.method="next",this.next=H.finallyLoc,T):this.complete(G)},complete:function(R,q){if(R.type==="throw")throw R.arg;return R.type==="break"||R.type==="continue"?this.next=R.arg:R.type==="return"?(this.rval=this.arg=R.arg,this.method="return",this.next="end"):R.type==="normal"&&q&&(this.next=q),T},finish:function(R){for(var q=this.tryEntries.length-1;q>=0;--q){var x=this.tryEntries[q];if(x.finallyLoc===R)return this.complete(x.completion,x.afterLoc),F(x),T}},catch:function(R){for(var q=this.tryEntries.length-1;q>=0;--q){var x=this.tryEntries[q];if(x.tryLoc===R){var C=x.completion;if(C.type==="throw"){var H=C.arg;F(x)}return H}}throw new Error("illegal catch attempt")},delegateYield:function(R,q,x){return this.delegate={iterator:Y(R),resultName:q,nextLoc:x},this.method==="next"&&(this.arg=f),T}},l})(n.exports);try{regeneratorRuntime=i}catch{typeof globalThis=="object"?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}})(vd)),vd.exports}var yd,cv;function pf(){return cv||(cv=1,yd=(n,i)=>`${n}-${i}-${Math.random().toString(16).slice(3,8)}`),yd}var bd,uv;function qy(){if(uv)return bd;uv=1;const n=pf();let i=0;return bd=({id:l,action:o,payload:c={}})=>{let d=l;return typeof d>"u"&&(d=n("Job",i),i+=1),{id:d,action:o,payload:c}},bd}var Es={},dv;function mf(){if(dv)return Es;dv=1;let n=!1;return Es.logging=n,Es.setLogging=i=>{n=i},Es.log=(...i)=>n?console.log.apply(this,i):null,Es}var xd,fv;function uC(){if(fv)return xd;fv=1;const n=qy(),{log:i}=mf(),l=pf();let o=0;return xd=()=>{const c=l("Scheduler",o),d={},f={};let p=[];o+=1;const g=()=>p.length,m=()=>Object.keys(d).length,y=()=>{if(p.length!==0){const _=Object.keys(d);for(let O=0;O<_.length;O+=1)if(typeof f[_[O]]>"u"){p[0](d[_[O]]);break}}},v=(_,O)=>new Promise((S,T)=>{const L=n({action:_,payload:O});p.push(async D=>{p.shift(),f[D.id]=L;try{S(await D[_].apply(this,[...O,L.id]))}catch(M){T(M)}finally{delete f[D.id],y()}}),i(`[${c}]: Add ${L.id} to JobQueue`),i(`[${c}]: JobQueue length=${p.length}`),y()});return{addWorker:_=>(d[_.id]=_,i(`[${c}]: Add ${_.id}`),i(`[${c}]: Number of workers=${m()}`),y(),_.id),addJob:async(_,...O)=>{if(m()===0)throw Error(`[${c}]: You need to have at least one worker before adding jobs`);return v(_,O)},terminate:async()=>{Object.keys(d).forEach(async _=>{await d[_].terminate()}),p=[]},getQueueLen:g,getNumWorkers:m}},xd}function ks(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 Sd,hv;function dC(){return hv||(hv=1,Sd=n=>{const i={};return typeof WorkerGlobalScope<"u"?i.type="webworker":typeof document=="object"?i.type="browser":typeof process=="object"&&typeof ks=="function"&&(i.type="node"),typeof n>"u"?i:i[n]}),Sd}var jd,pv;function fC(){if(pv)return jd;pv=1;const i=dC()("type")==="browser"?l=>new URL(l,window.location.href).href:l=>l;return jd=l=>{const o={...l};return["corePath","workerPath","langPath"].forEach(c=>{l[c]&&(o[c]=i(o[c]))}),o},jd}var wd,mv;function Hy(){return mv||(mv=1,wd={TESSERACT_ONLY:0,LSTM_ONLY:1,TESSERACT_LSTM_COMBINED:2,DEFAULT:3}),wd}const hC="7.0.0",pC={version:hC};var Nd,gv;function mC(){return gv||(gv=1,Nd={workerBlobURL:!0,logger:()=>{}}),Nd}var Cd,vv;function gC(){if(vv)return Cd;vv=1;const n=pC.version;return Cd={...mC(),workerPath:`https://cdn.jsdelivr.net/npm/tesseract.js@v${n}/dist/worker.min.js`},Cd}var _d,yv;function vC(){return yv||(yv=1,_d=({workerPath:n,workerBlobURL:i})=>{let l;if(Blob&&URL&&i){const o=new Blob([`importScripts("${n}");`],{type:"application/javascript"});l=new Worker(URL.createObjectURL(o))}else l=new Worker(n);return l}),_d}var Td,bv;function yC(){return bv||(bv=1,Td=n=>{n.terminate()}),Td}var Ed,xv;function bC(){return xv||(xv=1,Ed=(n,i)=>{n.onmessage=({data:l})=>{i(l)}}),Ed}var Ad,Sv;function xC(){return Sv||(Sv=1,Ad=async(n,i)=>{n.postMessage(i)}),Ad}var Od,jv;function SC(){if(jv)return Od;jv=1;const n=l=>new Promise((o,c)=>{const d=new FileReader;d.onload=()=>{o(d.result)},d.onerror=({target:{error:{code:f}}})=>{c(Error(`File could not be read! Code=${f}`))},d.readAsArrayBuffer(l)}),i=async l=>{let o=l;if(typeof l>"u")return"undefined";if(typeof l=="string")/data:image\/([a-zA-Z]*);base64,([^"]*)/.test(l)?o=atob(l.split(",")[1]).split("").map(c=>c.charCodeAt(0)):o=await(await fetch(l)).arrayBuffer();else if(typeof HTMLElement<"u"&&l instanceof HTMLElement)l.tagName==="IMG"&&(o=await i(l.src)),l.tagName==="VIDEO"&&(o=await i(l.poster)),l.tagName==="CANVAS"&&await new Promise(c=>{l.toBlob(async d=>{o=await n(d),c()})});else if(typeof OffscreenCanvas<"u"&&l instanceof OffscreenCanvas){const c=await l.convertToBlob();o=await n(c)}else(l instanceof File||l instanceof Blob)&&(o=await n(l));return new Uint8Array(o)};return Od=i,Od}var kd,wv;function jC(){if(wv)return kd;wv=1;const n=gC(),i=vC(),l=yC(),o=bC(),c=xC(),d=SC();return kd={defaultOptions:n,spawnWorker:i,terminateWorker:l,onMessage:o,send:c,loadImage:d},kd}var Rd,Nv;function Gy(){if(Nv)return Rd;Nv=1;const n=fC(),i=qy(),{log:l}=mf(),o=pf(),c=Hy(),{defaultOptions:d,spawnWorker:f,terminateWorker:p,onMessage:g,loadImage:m,send:y}=jC();let v=0;return Rd=async(w="eng",b=c.LSTM_ONLY,E={},_={})=>{const O=o("Worker",v),{logger:S,errorHandler:T,...L}=n({...d,...E}),D={},M=typeof w=="string"?w.split("+"):w;let V=b,K=_;const ae=[c.DEFAULT,c.LSTM_ONLY].includes(b)&&!L.legacyCore;let I,$;const ee=new Promise((se,_e)=>{$=se,I=_e}),B=se=>{I(se.message)};let Q=f(L);Q.onerror=B,v+=1;const j=({id:se,action:_e,payload:Ce})=>new Promise((qe,Ie)=>{l(`[${O}]: Start ${se}, action=${_e}`);const A=`${_e}-${se}`;D[A]={resolve:qe,reject:Ie},y(Q,{workerId:O,jobId:se,action:_e,payload:Ce})}),F=()=>console.warn("`load` is depreciated and should be removed from code (workers now come pre-loaded)"),X=se=>j(i({id:se,action:"load",payload:{options:{lstmOnly:ae,corePath:L.corePath,logging:L.logging}}})),Y=(se,_e,Ce)=>j(i({id:Ce,action:"FS",payload:{method:"writeFile",args:[se,_e]}})),Z=(se,_e)=>j(i({id:_e,action:"FS",payload:{method:"readFile",args:[se,{encoding:"utf8"}]}})),R=(se,_e)=>j(i({id:_e,action:"FS",payload:{method:"unlink",args:[se]}})),q=(se,_e,Ce)=>j(i({id:Ce,action:"FS",payload:{method:se,args:_e}})),x=(se,_e)=>j(i({id:_e,action:"loadLanguage",payload:{langs:se,options:{langPath:L.langPath,dataPath:L.dataPath,cachePath:L.cachePath,cacheMethod:L.cacheMethod,gzip:L.gzip,lstmOnly:[c.DEFAULT,c.LSTM_ONLY].includes(V)&&!L.legacyLang}}})),C=(se,_e,Ce,qe)=>j(i({id:qe,action:"initialize",payload:{langs:se,oem:_e,config:Ce}})),H=(se="eng",_e,Ce,qe)=>{if(ae&&[c.TESSERACT_ONLY,c.TESSERACT_LSTM_COMBINED].includes(_e))throw Error("Legacy model requested but code missing.");const Ie=_e||V;V=Ie;const A=Ce||K;K=A;const ue=(typeof se=="string"?se.split("+"):se).filter(P=>!M.includes(P));return M.push(...ue),ue.length>0?x(ue,qe).then(()=>C(se,Ie,A,qe)):C(se,Ie,A,qe)},G=(se={},_e)=>j(i({id:_e,action:"setParameters",payload:{params:se}})),te=async(se,_e={},Ce={text:!0},qe)=>j(i({id:qe,action:"recognize",payload:{image:await m(se),options:_e,output:Ce}})),pe=async(se,_e)=>{if(ae)throw Error("`worker.detect` requires Legacy model, which was not loaded.");return j(i({id:_e,action:"detect",payload:{image:await m(se)}}))},Ne=async()=>(Q!==null&&(p(Q),Q=null),Promise.resolve());g(Q,({workerId:se,jobId:_e,status:Ce,action:qe,data:Ie})=>{const A=`${qe}-${_e}`;if(Ce==="resolve")l(`[${se}]: Complete ${_e}`),D[A].resolve({jobId:_e,data:Ie}),delete D[A];else if(Ce==="reject")if(D[A].reject(Ie),delete D[A],qe==="load"&&I(Ie),T)T(Ie);else throw Error(Ie);else Ce==="progress"&&S({...Ie,userJobId:_e})});const we={id:O,worker:Q,load:F,writeText:Y,readText:Z,removeFile:R,FS:q,reinitialize:H,setParameters:G,recognize:te,detect:pe,terminate:Ne};return X().then(()=>x(w)).then(()=>C(w,b,_)).then(()=>$(we)).catch(()=>{}),ee},Rd}var Dd,Cv;function wC(){if(Cv)return Dd;Cv=1;const n=Gy();return Dd={recognize:async(o,c,d)=>{const f=await n(c,1,d);return f.recognize(o).finally(async()=>{await f.terminate()})},detect:async(o,c)=>{const d=await n("osd",0,c);return d.detect(o).finally(async()=>{await d.terminate()})}},Dd}var Ld,_v;function NC(){return _v||(_v=1,Ld={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"}),Ld}var Ud,Tv;function CC(){return Tv||(Tv=1,Ud={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"}),Ud}var zd,Ev;function _C(){if(Ev)return zd;Ev=1,cC();const n=uC(),i=Gy(),l=wC(),o=NC(),c=Hy(),d=CC(),{setLogging:f}=mf();return zd={languages:o,OEM:c,PSM:d,createScheduler:n,createWorker:i,setLogging:f,...l},zd}var TC=_C();const EC=[{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"}],Vy="lazyscout-test-case-language";function AC(){const n=localStorage.getItem(Vy);return n==="th"||n==="en"?n:"en"}function OC({sourceUrl:n,initialLanguage:i,onLanguageChange:l,existingCases:o,onImport:c,onClose:d}){const{ui:f,language:p}=Le(),[g,m]=z.useState(""),[y,v]=z.useState(""),[w,b]=z.useState("Screenshot screen"),[E,_]=z.useState("visual"),[O,S]=z.useState(i??AC),[T,L]=z.useState(""),[D,M]=z.useState([]),[V,K]=z.useState(""),[ae,I]=z.useState(!1),[$,ee]=z.useState(!1),[B,Q]=z.useState(!1);function j(R){!R||!R.type.startsWith("image/")||(v(R.name),m(URL.createObjectURL(R)),K("Ready to read the image."))}async function F(){if(!g||ae)return;I(!0),K("Reading Thai and English from the image…");let R;try{R=await new Promise((C,H)=>{TC.createWorker("tha+eng",void 0,{errorHandler:H}).then(C,H)});const x=(await R.recognize(g)).data.text.trim();L(x),M(x.split(/\r?\n/).map(C=>C.trim()).filter(C=>C.length>1).slice(0,12).map((C,H)=>H)),K("Reading complete. Review and edit the text before creating Test Cases.")}catch{K(R?"OCR failed. Try a clearer image or enter the text manually.":"Could not load OCR. Check the connection and try again, or enter the text manually.")}finally{I(!1),await R?.terminate().catch(()=>{})}}async function X(){const R=T.split(/\r?\n/).map(we=>we.trim()).filter(we=>we.length>1).slice(0,12),q=(D.length?D.map(we=>R[we]).filter(Boolean):R).slice(0,8),x="SCREENSHOT",C=new Set(o.map(we=>we.id));let H=1;const G=()=>{let we=`TC-${x}-${String(H).padStart(3,"0")}`;for(;C.has(we);)we=`TC-${x}-${String(++H).padStart(3,"0")}`;return C.add(we),H++,we},te=q.slice(0,8).map(we=>({type:"assertText",text:we,description:O==="th"?`ตรวจสอบว่าหน้าเว็บแสดงข้อความ "${we}"`:`Verify that "${we}" is visible on the page`})),pe={module:x,preconditions:O==="th"?["เปิดหน้าที่ต้องการตรวจสอบให้ตรงกับภาพอ้างอิง"]:["Open the page that matches the screenshot reference"],sourceUrl:n||y,priority:"medium",automationStatus:"needs-review",type:"validation",notes:O==="th"?`สร้างจากภาพ ${y||"อ้างอิง"} · โปรดตรวจทานก่อนนำไปใช้งานจริง`:`Created from ${y||"reference"} · Review before production use`},Ne=[];(E==="visual"||E==="manual")&&Ne.push({...pe,id:G(),title:O==="th"?`ตรวจสอบว่า ${w} แสดงผลตรงตามภาพอ้างอิง`:`${w} 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."}),(E==="visual"||E==="text")&&Ne.push({...pe,id:G(),title:O==="th"?`ตรวจสอบข้อความสำคัญทั้งหมดบน ${w}`:`${w} shows all important text`,steps:te,expectedResult:O==="th"?"ข้อความสำคัญบนหน้าจอแสดงครบถ้วนและอ่านได้ชัดเจน":"Important on-screen text is complete and readable."}),ee(!0),Q(!1);try{await c(Ne),d()}catch{Q(!0)}finally{ee(!1)}}const Y=T.split(/\r?\n/).map(R=>R.trim()).filter(R=>R.length>1).slice(0,12),Z=D.length||Y.length;return a.jsx("div",{className:"modern-modal-backdrop",onMouseDown:R=>!$&&R.target===R.currentTarget&&d(),children:a.jsxs("section",{className:"modern-modal screenshot-importer",role:"dialog","aria-modal":"true",children:[a.jsxs("header",{className:"modal-header",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:f("Create Test Cases from an image")}),a.jsx("h2",{children:f("Screenshot → Test Case")}),a.jsx("p",{children:f("Follow three steps to create Draft Test Cases for review.")})]}),a.jsx("button",{type:"button",className:"icon-btn",disabled:$,onClick:d,children:"×"})]}),a.jsxs("div",{className:"screenshot-import-body",children:[a.jsxs("div",{className:"import-step",children:[a.jsx("span",{children:"1"}),a.jsxs("div",{children:[a.jsx("b",{children:f("Choose a Test Case pattern")}),a.jsx("p",{children:f("Pick the pattern that matches what you need to check.")})]})]}),a.jsx("div",{className:"pattern-grid",children:EC.map(R=>a.jsxs("button",{type:"button",className:`pattern-card ${E===R.id?"is-selected":""}`,onClick:()=>_(R.id),children:[a.jsx("b",{children:f(R.title)}),a.jsx("span",{children:f(R.description)})]},R.id))}),a.jsxs("div",{className:"import-step",children:[a.jsx("span",{children:"2"}),a.jsxs("div",{children:[a.jsx("b",{children:f("Upload a Screenshot")}),a.jsx("p",{children:f("PNG, JPG and WEBP are supported.")})]})]}),a.jsxs("label",{className:"upload-dropzone",children:[a.jsx("input",{type:"file",accept:"image/png,image/jpeg,image/webp",onChange:R=>j(R.target.files?.[0])}),a.jsx("strong",{children:y||f("Click to choose an image")}),a.jsx("span",{children:f("or drop a file here")})]}),g&&a.jsxs("div",{className:"screenshot-preview",children:[a.jsx("img",{src:g,alt:f("Screenshot preview")}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:F,disabled:ae,children:f(ae?"Reading…":"Read text from image")})]}),a.jsxs("div",{className:"import-step",children:[a.jsx("span",{children:"3"}),a.jsxs("div",{children:[a.jsx("b",{children:f("Review text and create cases")}),a.jsx("p",{children:f("You can edit OCR text before importing.")})]})]}),a.jsxs("label",{className:"field-label",children:[f("Screen name"),a.jsx("input",{className:"field mt-1",value:w,onChange:R=>b(R.target.value)})]}),a.jsxs("label",{className:"field-label",children:[f("Test Case language"),a.jsxs("select",{className:"field mt-1",value:O,onChange:R=>{const q=R.target.value;S(q),localStorage.setItem(Vy,q),l?.(q)},children:[a.jsx("option",{value:"en",children:f("English")}),a.jsx("option",{value:"th",children:"ไทย"})]})]}),a.jsxs("label",{className:"field-label",children:[f("Text detected"),a.jsx("textarea",{className:"field screenshot-ocr",value:T,onChange:R=>{L(R.target.value),M([])},placeholder:f("Read text from the image, or type it yourself")})]}),Y.length>0&&a.jsxs("div",{className:"import-preview",children:[a.jsxs("b",{children:[f("Choose OCR lines to create assertions ("),Z," ",f("selected)")]}),a.jsx("table",{children:a.jsx("tbody",{children:Y.map((R,q)=>{const x=D.length===0||D.includes(q);return a.jsxs("tr",{children:[a.jsx("td",{children:a.jsx("input",{type:"checkbox",checked:x,onChange:()=>M(C=>{const H=C.length===0?Y.map((G,te)=>te):C;return H.includes(q)?H.filter(G=>G!==q):[...H,q]})})}),a.jsx("td",{children:R})]},`${q}-${R}`)})})})]}),a.jsxs("div",{className:"import-summary",children:[a.jsx("b",{children:f("Draft preview")}),a.jsxs("span",{children:[E==="visual"||E==="manual"?f("1 visual comparison case"):"",E==="visual"?" + ":"",E==="visual"||E==="text"?p==="th"?`1 เคสตรวจข้อความ (${Z} เงื่อนไข)`:`1 text verification case with ${Z} assertion(s)`:""]})]}),a.jsx("p",{role:"status",className:"screenshot-status",children:f(V)}),B&&a.jsx("p",{role:"alert",className:"import-error",children:f("Could not save the imported cases. Check that LazyScout is running and try again.")})]}),a.jsxs("footer",{className:"modal-footer",children:[a.jsxs("span",{className:"mr-auto text-xs text-slate-500",children:[f("Results are marked")," ",a.jsx("b",{children:f("needs-review")})]}),a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:$,onClick:d,children:f("Cancel")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:X,disabled:ae||$||!T.trim()&&E!=="manual",children:f($?"Saving…":"Create Draft Test Cases")})]})]})})}function kC({existingCases:n,sourceUrl:i,onImport:l,onClose:o}){const{ui:c}=Le(),[d,f]=z.useState(""),[p,g]=z.useState([]),[m,y]=z.useState(""),[v,w]=z.useState(!1),[b,E]=z.useState(!1);async function _(){E(!0),y("");try{await l(p),o()}catch{y("Could not save the imported cases. Check that LazyScout is running and try again.")}finally{E(!1)}}async function O(S){if(!(!S||v)){w(!0),y(""),f(S.name);try{const T=await RC(S),L=DC(T,n,i);if(!L.length)throw new Error("No valid Test Cases were found. Check that the file contains TC_ID or Title.");g(L)}catch(T){g([]),y(T instanceof Error?T.message:"Could not read the file.")}finally{w(!1)}}}return a.jsx("div",{className:"modern-modal-backdrop",onMouseDown:S=>!b&&S.target===S.currentTarget&&o(),children:a.jsxs("section",{className:"modern-modal import-testcase-modal",role:"dialog","aria-modal":"true",children:[a.jsxs("header",{className:"modal-header",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:c("Import Test Cases")}),a.jsx("h2",{children:c("Bring an existing suite into LazyScout")}),a.jsx("p",{children:c("CSV, XLSX and JSON are supported. Fields are mapped automatically.")})]}),a.jsx("button",{type:"button",className:"icon-btn",disabled:b,onClick:o,"aria-label":c("Close"),children:"×"})]}),a.jsxs("div",{className:"import-testcase-body",children:[a.jsxs("label",{className:"upload-dropzone",children:[a.jsx("input",{type:"file",accept:".csv,.xlsx,.json",disabled:b||v,onChange:S=>{O(S.target.files?.[0])}}),a.jsx("strong",{children:v?c("Reading file…"):d||c("Choose a CSV, XLSX or JSON file")}),a.jsx("span",{children:c("Expected fields: TC_ID, Title, Module, Folder, Tags, Requirements, Steps and Expected Result")})]}),m&&a.jsx("p",{role:"alert",className:"import-error",children:c(m)}),p.length>0&&a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"import-summary",children:[a.jsxs("b",{children:[p.length," ",c("Test Cases ready to import")]}),a.jsx("span",{children:c("Duplicate IDs are replaced with a new TC-IMPORT ID.")})]}),a.jsxs("div",{className:"import-preview",children:[a.jsxs("table",{children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:c("TC ID")}),a.jsx("th",{children:c("Folder")}),a.jsx("th",{children:c("Title")}),a.jsx("th",{children:c("Tags")}),a.jsx("th",{children:c("Requirements")})]})}),a.jsx("tbody",{children:p.slice(0,10).map(S=>a.jsxs("tr",{children:[a.jsx("td",{children:S.id}),a.jsx("td",{children:S.folder??S.module}),a.jsx("td",{children:S.title}),a.jsx("td",{children:(S.tags??[]).join(", ")||"—"}),a.jsx("td",{children:(S.requirements??[]).join(", ")||"—"})]},S.id))})]}),p.length>10&&a.jsxs("p",{children:[c("Previewing 10 of")," ",p.length," ",c("Test Cases.")]})]})]})]}),a.jsxs("footer",{className:"modal-footer",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:b,onClick:o,children:c("Cancel")}),a.jsx("button",{type:"button",className:"btn btn-primary",disabled:!p.length||v||b,onClick:_,children:b?c("Saving…"):[c("Import"),p.length||"",c("Test Cases")].filter(Boolean).join(" ")})]})]})})}async function RC(n){const i=n.name.split(".").pop()?.toLowerCase();if(i==="json"){const l=JSON.parse(await n.text());return(Array.isArray(l)?l:l&&typeof l=="object"&&Array.isArray(l.testCases)?l.testCases:[]).filter(c=>!!c&&typeof c=="object")}if(i==="csv")return Av(wy(await n.text()));if(i==="xlsx")return Av(await s1(n));throw new Error("Supported formats are CSV, XLSX and JSON.")}function Av(n){const[i,...l]=n;if(!i)return[];const o=i.map(c=>String(c??"").trim());return l.filter(c=>c.some(d=>d!=null&&String(d).trim())).map(c=>Object.fromEntries(o.map((d,f)=>[d||`Column_${f+1}`,c[f]??""])))}function DC(n,i,l){const o=new Set(i.map(f=>f.id));let c=1;const d=()=>{let f=`TC-IMPORT-${String(c).padStart(3,"0")}`;for(;o.has(f);)f=`TC-IMPORT-${String(++c).padStart(3,"0")}`;return o.add(f),c++,f};return n.map(f=>{const p=aa(f,"TC_ID","ID","TEST_CASE_ID"),g=aa(f,"TITLE","TEST_CASE","NAME");if(!g&&!p)return null;const m=!p||o.has(p)?d():p;o.add(m);const y=aa(f,"MODULE")||"IMPORTED",v=mo(f,"TEST_STEPS","STEPS").map(w=>({type:"manual",description:w}));return{id:m,module:y,folder:aa(f,"FOLDER")||y,tags:mo(f,"TAGS","TAG"),requirements:mo(f,"REQUIREMENTS","REQUIREMENT","TICKET","TICKETS"),title:g||m,preconditions:mo(f,"PRECONDITIONS","PRECONDITION"),steps:v.length?v:[{type:"manual",description:"Review imported steps"}],expectedResult:aa(f,"EXPECTED_RESULT","EXPECTED RESULT","EXPECTED")||"Review expected result",type:LC(aa(f,"TYPE")),priority:UC(aa(f,"PRIORITY")),automationStatus:zC(aa(f,"AUTOMATION_STATUS","AUTOMATION")),sourceUrl:aa(f,"SOURCE_URL","SOURCE URL","URL")||l||"Imported file",notes:aa(f,"NOTES","NOTE")||"Imported into LazyScout"}}).filter(f=>!!f)}function Ov(n){return n.toUpperCase().replace(/[^A-Z0-9]/g,"")}function aa(n,...i){const l=new Map(Object.entries(n).map(([o,c])=>[Ov(o),String(c??"").trim()]));for(const o of i){const c=l.get(Ov(o));if(c)return c}return""}function mo(n,...i){return aa(n,...i).split(/[\n,;|]/).map(l=>l.replace(/^\s*\d+[.)-]?\s*/,"").trim()).filter(Boolean)}function LC(n){return n.toLowerCase()==="negative"?"negative":n.toLowerCase()==="validation"?"validation":"positive"}function UC(n){return n.toLowerCase()==="high"?"high":n.toLowerCase()==="low"?"low":"medium"}function zC(n){return["ready","needs-data","needs-review","manual"].includes(n)?n:"needs-review"}function MC(n,i){return n?new Intl.DateTimeFormat(i,{dateStyle:"medium"}).format(new Date(n)):"Published on npm"}function BC({compact:n=!1}){const{ui:i,language:l}=Le(),[o,c]=z.useState(),[d,f]=z.useState(!0),[p,g]=z.useState(),[m,y]=z.useState(),[v,w]=z.useState(),[b,E]=z.useState(),[_,O]=z.useState();async function S(){f(!0),g(void 0);try{c(await p0())}catch(D){g(D instanceof Error?D.message:"Could not check npm versions.")}finally{f(!1)}}z.useEffect(()=>{S()},[]);async function T(D){await navigator.clipboard.writeText(`npm install -g lazyscout@${D}`),O(D),window.setTimeout(()=>O(M=>M===D?void 0:M),1600)}async function L(D){w(D),y(void 0),E(void 0),g(void 0);try{E(await m0(D))}catch(M){g(M instanceof sa&&M.hint?`${M.message} ${M.hint}`:M instanceof Error?M.message:"Could not install this version.")}finally{w(void 0)}}return a.jsxs("section",{className:`version-center ${n?"is-compact":""}`,children:[a.jsxs("header",{className:"version-center-head",children:[a.jsx("div",{className:"version-center-icon",children:"V"}),a.jsxs("div",{children:[a.jsx("span",{className:"eyebrow",children:i("Version Center")}),a.jsx("h3",{children:i(n?"LazyScout version":"Choose your LazyScout version")}),!n&&a.jsx("p",{children:i("Install the latest release or switch to an earlier published version before opening a workspace.")})]}),a.jsx("button",{type:"button",className:"version-refresh",onClick:()=>{S()},disabled:d,children:i(d?"Checking…":"Check again")})]}),d&&!o?a.jsxs("div",{className:"version-loading",children:[a.jsx("span",{className:"scout-spinner"})," ",i("Checking npm Registry…")]}):o?a.jsxs(a.Fragment,{children:[a.jsxs("div",{className:"version-summary",children:[a.jsxs("div",{children:[a.jsx("small",{children:i("Running now")}),a.jsxs("strong",{children:["v",o.currentVersion]})]}),a.jsx("span",{className:"version-summary-arrow",children:"→"}),a.jsxs("div",{children:[a.jsx("small",{children:i("Latest release")}),a.jsx("strong",{children:o.latestVersion?`v${o.latestVersion}`:i("Unavailable")})]}),a.jsx("span",{className:`version-state ${o.updateAvailable?"has-update":""}`,children:o.updateAvailable?i("Update available"):i("Up to date")})]}),!n&&a.jsx("div",{className:"version-list","aria-label":i("Published LazyScout versions"),children:o.versions.slice(0,3).map(D=>{const M=D.version===o.currentVersion,V=D.version===m,K=D.version===v;return a.jsxs("div",{className:`version-row ${M?"is-current":""}`,children:[a.jsxs("div",{className:"version-number",children:[a.jsxs("span",{children:["v",D.version]}),a.jsx("small",{children:i(MC(D.publishedAt,l))})]}),a.jsxs("div",{className:"version-tags",children:[D.tags.map(ae=>a.jsx("span",{children:ae},ae)),M&&a.jsx("span",{className:"current",children:i("running")})]}),a.jsx("button",{type:"button",className:"btn btn-secondary version-copy",onClick:()=>{T(D.version)},children:_===D.version?i("Copied"):i("Copy command")}),a.jsx("button",{type:"button",className:"btn btn-primary version-install",disabled:M||!!v,onClick:()=>y(V?void 0:D.version),children:i(M?"Current":K?"Installing…":"Install")}),V&&a.jsxs("div",{className:"version-confirm",children:[a.jsxs("span",{children:[i("Install")," ",a.jsxs("b",{children:["v",D.version]})," ",i("globally? Restart LazyScout after installation to use it.")]}),a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>y(void 0),children:i("Cancel")}),a.jsxs("button",{type:"button",className:"btn btn-primary",onClick:()=>{L(D.version)},children:[i("Install v"),D.version]})]})]},D.version)})})]}):null,o&&!o.registryAvailable&&a.jsxs("div",{className:"version-message warning",children:[i("npm Registry is unavailable.")," ",o.error]}),p&&a.jsx("div",{className:"version-message error",children:i(p)}),b&&a.jsxs("div",{className:"version-message success",children:[a.jsxs("b",{children:[i("LazyScout v"),b.installedVersion," ",i("installed.")]}),a.jsx("span",{children:i("Close the current LazyScout terminal and run `lazyscout` again to switch versions.")})]})]})}function IC({projects:n,onScout:i,onEmpty:l,onSample:o,onOpenProject:c,onClose:d}){const{ui:f,language:p}=Le(),g=p==="th",[m,y]=z.useState(""),[v,w]=z.useState(n[0]?.id??""),b=m.trim()||"Untitled Test Suite";return a.jsx("div",{className:"modern-modal-backdrop",onMouseDown:E=>E.target===E.currentTarget&&d(),children:a.jsxs("section",{className:"modern-modal new-project-modal",role:"dialog","aria-modal":"true",children:[a.jsxs("header",{className:"modal-header",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:g?"โปรเจกต์ใหม่":"New Project"}),a.jsx("h2",{children:g?"เริ่มพื้นที่ทำงาน QA":"Start a QA workspace"}),a.jsx("p",{children:g?"เลือกสำรวจเว็บไซต์ ลองโปรเจกต์ตัวอย่าง หรือนำเข้าเคสทดสอบเดิม":"Choose whether to scout a website now or import an existing Test Case suite."})]}),a.jsx("button",{type:"button",className:"icon-btn",onClick:d,"aria-label":f("Close"),children:"×"})]}),a.jsxs("div",{className:"new-project-modal-body",children:[a.jsx(BC,{compact:!0}),a.jsxs("label",{children:[a.jsx("span",{children:g?"ชื่อโปรเจกต์":"Project name"}),a.jsx("input",{className:"field",value:m,onChange:E=>y(E.target.value),placeholder:f("Example: Storefront regression"),autoFocus:!0})]}),a.jsxs("div",{className:"new-project-choices",children:[a.jsxs("button",{type:"button",onClick:()=>i(b),children:[a.jsx("span",{className:"new-project-choice-icon scout",children:"◉"}),a.jsxs("span",{children:[a.jsx("b",{children:g?"Scout เว็บไซต์":"Scout a website"}),a.jsx("small",{children:g?"ใส่ URL แล้วให้ Playwright ค้นหาหน้าและสร้างเคสทดสอบชุดแรก":"Enter a URL, then let Playwright discover pages and create a first Test Case suite."})]}),a.jsx("em",{children:"→"})]}),a.jsxs("button",{type:"button",onClick:o,children:[a.jsx("span",{className:"new-project-choice-icon sample",children:"✦"}),a.jsxs("span",{children:[a.jsx("b",{children:g?"ลองโปรเจกต์ตัวอย่าง":"Try a sample project"}),a.jsx("small",{children:g?"ลองทดสอบการเข้าสู่ระบบบน Practice Test Automation ด้วยเคสที่พร้อมรัน":"Run a ready-made login suite against Practice Test Automation immediately."})]}),a.jsx("em",{children:"→"})]}),n.length?a.jsxs("div",{className:"existing-project-choice",children:[a.jsx("span",{className:"new-project-choice-icon empty",children:"↗"}),a.jsxs("div",{children:[a.jsx("b",{children:g?"เปิดโปรเจกต์เดิม":"Open existing project"}),a.jsx("small",{children:g?"ทำงานต่อจาก Local workspace":"Continue a local workspace."}),a.jsx("select",{className:"field",value:v,onChange:E=>w(E.target.value),children:n.map(E=>a.jsx("option",{value:E.id,children:E.name},E.id))})]})]}):a.jsxs("button",{type:"button",onClick:()=>l(b),children:[a.jsx("span",{className:"new-project-choice-icon empty",children:"⇧"}),a.jsxs("span",{children:[a.jsx("b",{children:g?"โปรเจกต์เปล่า":"Empty project"}),a.jsx("small",{children:g?"สร้างชุดเปล่าสำหรับนำเข้า CSV, XLSX หรือ JSON และเพิ่มเคสทดสอบเองได้":"Create a blank suite for CSV, XLSX, or JSON import. You can add Test Cases manually too."})]}),a.jsx("em",{children:"→"})]})]})]}),a.jsxs("footer",{className:"modal-footer",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:d,children:g?"ยกเลิก":"Cancel"}),n.length>0&&a.jsx("button",{type:"button",className:"btn btn-primary",disabled:!v,onClick:()=>v&&c(v),children:g?"เปิดโปรเจกต์":"Open project"})]})]})})}var Md={exports:{}};var kv;function $C(){return kv||(kv=1,(function(n,i){(function(l){n.exports=l()})(function(){return(function l(o,c,d){function f(m,y){if(!c[m]){if(!o[m]){var v=typeof ks=="function"&&ks;if(!y&&v)return v(m,!0);if(p)return p(m,!0);var w=new Error("Cannot find module '"+m+"'");throw w.code="MODULE_NOT_FOUND",w}var b=c[m]={exports:{}};o[m][0].call(b.exports,function(E){var _=o[m][1][E];return f(_||E)},b,b.exports,l,o,c,d)}return c[m].exports}for(var p=typeof ks=="function"&&ks,g=0;g<d.length;g++)f(d[g]);return f})({1:[function(l,o,c){var d=l("./utils"),f=l("./support"),p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";c.encode=function(g){for(var m,y,v,w,b,E,_,O=[],S=0,T=g.length,L=T,D=d.getTypeOf(g)!=="string";S<g.length;)L=T-S,v=D?(m=g[S++],y=S<T?g[S++]:0,S<T?g[S++]:0):(m=g.charCodeAt(S++),y=S<T?g.charCodeAt(S++):0,S<T?g.charCodeAt(S++):0),w=m>>2,b=(3&m)<<4|y>>4,E=1<L?(15&y)<<2|v>>6:64,_=2<L?63&v:64,O.push(p.charAt(w)+p.charAt(b)+p.charAt(E)+p.charAt(_));return O.join("")},c.decode=function(g){var m,y,v,w,b,E,_=0,O=0,S="data:";if(g.substr(0,S.length)===S)throw new Error("Invalid base64 input, it looks like a data url.");var T,L=3*(g=g.replace(/[^A-Za-z0-9+/=]/g,"")).length/4;if(g.charAt(g.length-1)===p.charAt(64)&&L--,g.charAt(g.length-2)===p.charAt(64)&&L--,L%1!=0)throw new Error("Invalid base64 input, bad content length.");for(T=f.uint8array?new Uint8Array(0|L):new Array(0|L);_<g.length;)m=p.indexOf(g.charAt(_++))<<2|(w=p.indexOf(g.charAt(_++)))>>4,y=(15&w)<<4|(b=p.indexOf(g.charAt(_++)))>>2,v=(3&b)<<6|(E=p.indexOf(g.charAt(_++))),T[O++]=m,b!==64&&(T[O++]=y),E!==64&&(T[O++]=v);return T}},{"./support":30,"./utils":32}],2:[function(l,o,c){var d=l("./external"),f=l("./stream/DataWorker"),p=l("./stream/Crc32Probe"),g=l("./stream/DataLengthProbe");function m(y,v,w,b,E){this.compressedSize=y,this.uncompressedSize=v,this.crc32=w,this.compression=b,this.compressedContent=E}m.prototype={getContentWorker:function(){var y=new f(d.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new g("data_length")),v=this;return y.on("end",function(){if(this.streamInfo.data_length!==v.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")}),y},getCompressedWorker:function(){return new f(d.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},m.createWorkerFrom=function(y,v,w){return y.pipe(new p).pipe(new g("uncompressedSize")).pipe(v.compressWorker(w)).pipe(new g("compressedSize")).withStreamInfo("compression",v)},o.exports=m},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(l,o,c){var d=l("./stream/GenericWorker");c.STORE={magic:"\0\0",compressWorker:function(){return new d("STORE compression")},uncompressWorker:function(){return new d("STORE decompression")}},c.DEFLATE=l("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(l,o,c){var d=l("./utils"),f=(function(){for(var p,g=[],m=0;m<256;m++){p=m;for(var y=0;y<8;y++)p=1&p?3988292384^p>>>1:p>>>1;g[m]=p}return g})();o.exports=function(p,g){return p!==void 0&&p.length?d.getTypeOf(p)!=="string"?(function(m,y,v,w){var b=f,E=w+v;m^=-1;for(var _=w;_<E;_++)m=m>>>8^b[255&(m^y[_])];return-1^m})(0|g,p,p.length,0):(function(m,y,v,w){var b=f,E=w+v;m^=-1;for(var _=w;_<E;_++)m=m>>>8^b[255&(m^y.charCodeAt(_))];return-1^m})(0|g,p,p.length,0):0}},{"./utils":32}],5:[function(l,o,c){c.base64=!1,c.binary=!1,c.dir=!1,c.createFolders=!0,c.date=null,c.compression=null,c.compressionOptions=null,c.comment=null,c.unixPermissions=null,c.dosPermissions=null},{}],6:[function(l,o,c){var d=null;d=typeof Promise<"u"?Promise:l("lie"),o.exports={Promise:d}},{lie:37}],7:[function(l,o,c){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Uint32Array<"u",f=l("pako"),p=l("./utils"),g=l("./stream/GenericWorker"),m=d?"uint8array":"array";function y(v,w){g.call(this,"FlateWorker/"+v),this._pako=null,this._pakoAction=v,this._pakoOptions=w,this.meta={}}c.magic="\b\0",p.inherits(y,g),y.prototype.processChunk=function(v){this.meta=v.meta,this._pako===null&&this._createPako(),this._pako.push(p.transformTo(m,v.data),!1)},y.prototype.flush=function(){g.prototype.flush.call(this),this._pako===null&&this._createPako(),this._pako.push([],!0)},y.prototype.cleanUp=function(){g.prototype.cleanUp.call(this),this._pako=null},y.prototype._createPako=function(){this._pako=new f[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var v=this;this._pako.onData=function(w){v.push({data:w,meta:v.meta})}},c.compressWorker=function(v){return new y("Deflate",v)},c.uncompressWorker=function(){return new y("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(l,o,c){function d(b,E){var _,O="";for(_=0;_<E;_++)O+=String.fromCharCode(255&b),b>>>=8;return O}function f(b,E,_,O,S,T){var L,D,M=b.file,V=b.compression,K=T!==m.utf8encode,ae=p.transformTo("string",T(M.name)),I=p.transformTo("string",m.utf8encode(M.name)),$=M.comment,ee=p.transformTo("string",T($)),B=p.transformTo("string",m.utf8encode($)),Q=I.length!==M.name.length,j=B.length!==$.length,F="",X="",Y="",Z=M.dir,R=M.date,q={crc32:0,compressedSize:0,uncompressedSize:0};E&&!_||(q.crc32=b.crc32,q.compressedSize=b.compressedSize,q.uncompressedSize=b.uncompressedSize);var x=0;E&&(x|=8),K||!Q&&!j||(x|=2048);var C=0,H=0;Z&&(C|=16),S==="UNIX"?(H=798,C|=(function(te,pe){var Ne=te;return te||(Ne=pe?16893:33204),(65535&Ne)<<16})(M.unixPermissions,Z)):(H=20,C|=(function(te){return 63&(te||0)})(M.dosPermissions)),L=R.getUTCHours(),L<<=6,L|=R.getUTCMinutes(),L<<=5,L|=R.getUTCSeconds()/2,D=R.getUTCFullYear()-1980,D<<=4,D|=R.getUTCMonth()+1,D<<=5,D|=R.getUTCDate(),Q&&(X=d(1,1)+d(y(ae),4)+I,F+="up"+d(X.length,2)+X),j&&(Y=d(1,1)+d(y(ee),4)+B,F+="uc"+d(Y.length,2)+Y);var G="";return G+=`
|
|
61
|
+
\0`,G+=d(x,2),G+=V.magic,G+=d(L,2),G+=d(D,2),G+=d(q.crc32,4),G+=d(q.compressedSize,4),G+=d(q.uncompressedSize,4),G+=d(ae.length,2),G+=d(F.length,2),{fileRecord:v.LOCAL_FILE_HEADER+G+ae+F,dirRecord:v.CENTRAL_FILE_HEADER+d(H,2)+G+d(ee.length,2)+"\0\0\0\0"+d(C,4)+d(O,4)+ae+F+ee}}var p=l("../utils"),g=l("../stream/GenericWorker"),m=l("../utf8"),y=l("../crc32"),v=l("../signature");function w(b,E,_,O){g.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=E,this.zipPlatform=_,this.encodeFileName=O,this.streamFiles=b,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}p.inherits(w,g),w.prototype.push=function(b){var E=b.meta.percent||0,_=this.entriesCount,O=this._sources.length;this.accumulate?this.contentBuffer.push(b):(this.bytesWritten+=b.data.length,g.prototype.push.call(this,{data:b.data,meta:{currentFile:this.currentFile,percent:_?(E+100*(_-O-1))/_:100}}))},w.prototype.openedSource=function(b){this.currentSourceOffset=this.bytesWritten,this.currentFile=b.file.name;var E=this.streamFiles&&!b.file.dir;if(E){var _=f(b,E,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:_.fileRecord,meta:{percent:0}})}else this.accumulate=!0},w.prototype.closedSource=function(b){this.accumulate=!1;var E=this.streamFiles&&!b.file.dir,_=f(b,E,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(_.dirRecord),E)this.push({data:(function(O){return v.DATA_DESCRIPTOR+d(O.crc32,4)+d(O.compressedSize,4)+d(O.uncompressedSize,4)})(b),meta:{percent:100}});else for(this.push({data:_.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},w.prototype.flush=function(){for(var b=this.bytesWritten,E=0;E<this.dirRecords.length;E++)this.push({data:this.dirRecords[E],meta:{percent:100}});var _=this.bytesWritten-b,O=(function(S,T,L,D,M){var V=p.transformTo("string",M(D));return v.CENTRAL_DIRECTORY_END+"\0\0\0\0"+d(S,2)+d(S,2)+d(T,4)+d(L,4)+d(V.length,2)+V})(this.dirRecords.length,_,b,this.zipComment,this.encodeFileName);this.push({data:O,meta:{percent:100}})},w.prototype.prepareNextSource=function(){this.previous=this._sources.shift(),this.openedSource(this.previous.streamInfo),this.isPaused?this.previous.pause():this.previous.resume()},w.prototype.registerPrevious=function(b){this._sources.push(b);var E=this;return b.on("data",function(_){E.processChunk(_)}),b.on("end",function(){E.closedSource(E.previous.streamInfo),E._sources.length?E.prepareNextSource():E.end()}),b.on("error",function(_){E.error(_)}),this},w.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))},w.prototype.error=function(b){var E=this._sources;if(!g.prototype.error.call(this,b))return!1;for(var _=0;_<E.length;_++)try{E[_].error(b)}catch{}return!0},w.prototype.lock=function(){g.prototype.lock.call(this);for(var b=this._sources,E=0;E<b.length;E++)b[E].lock()},o.exports=w},{"../crc32":4,"../signature":23,"../stream/GenericWorker":28,"../utf8":31,"../utils":32}],9:[function(l,o,c){var d=l("../compressions"),f=l("./ZipFileWorker");c.generateWorker=function(p,g,m){var y=new f(g.streamFiles,m,g.platform,g.encodeFileName),v=0;try{p.forEach(function(w,b){v++;var E=(function(T,L){var D=T||L,M=d[D];if(!M)throw new Error(D+" is not a valid compression method !");return M})(b.options.compression,g.compression),_=b.options.compressionOptions||g.compressionOptions||{},O=b.dir,S=b.date;b._compressWorker(E,_).withStreamInfo("file",{name:w,dir:O,date:S,comment:b.comment||"",unixPermissions:b.unixPermissions,dosPermissions:b.dosPermissions}).pipe(y)}),y.entriesCount=v}catch(w){y.error(w)}return y}},{"../compressions":3,"./ZipFileWorker":8}],10:[function(l,o,c){function d(){if(!(this instanceof d))return new d;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 d;for(var p in this)typeof this[p]!="function"&&(f[p]=this[p]);return f}}(d.prototype=l("./object")).loadAsync=l("./load"),d.support=l("./support"),d.defaults=l("./defaults"),d.version="3.10.2",d.loadAsync=function(f,p){return new d().loadAsync(f,p)},d.external=l("./external"),o.exports=d},{"./defaults":5,"./external":6,"./load":11,"./object":15,"./support":30}],11:[function(l,o,c){var d=l("./utils"),f=l("./external"),p=l("./utf8"),g=l("./zipEntries"),m=l("./stream/Crc32Probe"),y=l("./nodejsUtils");function v(w){return new f.Promise(function(b,E){var _=w.decompressed.getContentWorker().pipe(new m);_.on("error",function(O){E(O)}).on("end",function(){_.streamInfo.crc32!==w.decompressed.crc32?E(new Error("Corrupted zip : CRC32 mismatch")):b()}).resume()})}o.exports=function(w,b){var E=this;return b=d.extend(b||{},{base64:!1,checkCRC32:!1,optimizedBinaryString:!1,createFolders:!1,decodeFileName:p.utf8decode}),y.isNode&&y.isStream(w)?f.Promise.reject(new Error("JSZip can't accept a stream when loading a zip file.")):d.prepareContent("the loaded zip file",w,!0,b.optimizedBinaryString,b.base64).then(function(_){var O=new g(b);return O.load(_),O}).then(function(_){var O=[f.Promise.resolve(_)],S=_.files;if(b.checkCRC32)for(var T=0;T<S.length;T++)O.push(v(S[T]));return f.Promise.all(O)}).then(function(_){for(var O=_.shift(),S=O.files,T=0;T<S.length;T++){var L=S[T],D=L.fileNameStr,M=d.resolve(L.fileNameStr);E.file(M,L.decompressed,{binary:!0,optimizedBinaryString:!0,date:L.date,dir:L.dir,comment:L.fileCommentStr.length?L.fileCommentStr:null,unixPermissions:L.unixPermissions,dosPermissions:L.dosPermissions,createFolders:b.createFolders}),L.dir||(E.file(M).unsafeOriginalName=D)}return O.zipComment.length&&(E.comment=O.zipComment),E})}},{"./external":6,"./nodejsUtils":14,"./stream/Crc32Probe":25,"./utf8":31,"./utils":32,"./zipEntries":33}],12:[function(l,o,c){var d=l("../utils"),f=l("../stream/GenericWorker");function p(g,m){f.call(this,"Nodejs stream input adapter for "+g),this._upstreamEnded=!1,this._bindStream(m)}d.inherits(p,f),p.prototype._bindStream=function(g){var m=this;(this._stream=g).pause(),g.on("data",function(y){m.push({data:y,meta:{percent:0}})}).on("error",function(y){m.isPaused?this.generatedError=y:m.error(y)}).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(l,o,c){var d=l("readable-stream").Readable;function f(p,g,m){d.call(this,g),this._helper=p;var y=this;p.on("data",function(v,w){y.push(v)||y._helper.pause(),m&&m(w)}).on("error",function(v){y.emit("error",v)}).on("end",function(){y.push(null)})}l("../utils").inherits(f,d),f.prototype._read=function(){this._helper.resume()},o.exports=f},{"../utils":32,"readable-stream":16}],14:[function(l,o,c){o.exports={isNode:typeof Buffer<"u",newBufferFrom:function(d,f){if(Buffer.from&&Buffer.from!==Uint8Array.from)return Buffer.from(d,f);if(typeof d=="number")throw new Error('The "data" argument must not be a number');return new Buffer(d,f)},allocBuffer:function(d){if(Buffer.alloc)return Buffer.alloc(d);var f=new Buffer(d);return f.fill(0),f},isBuffer:function(d){return Buffer.isBuffer(d)},isStream:function(d){return d&&typeof d.on=="function"&&typeof d.pause=="function"&&typeof d.resume=="function"}}},{}],15:[function(l,o,c){function d(M,V,K){var ae,I=p.getTypeOf(V),$=p.extend(K||{},y);$.date=$.date||new Date,$.compression!==null&&($.compression=$.compression.toUpperCase()),typeof $.unixPermissions=="string"&&($.unixPermissions=parseInt($.unixPermissions,8)),$.unixPermissions&&16384&$.unixPermissions&&($.dir=!0),$.dosPermissions&&16&$.dosPermissions&&($.dir=!0),$.dir&&(M=S(M)),$.createFolders&&(ae=O(M))&&T.call(this,ae,!0);var ee=I==="string"&&$.binary===!1&&$.base64===!1;K&&K.binary!==void 0||($.binary=!ee),(V instanceof v&&V.uncompressedSize===0||$.dir||!V||V.length===0)&&($.base64=!1,$.binary=!0,V="",$.compression="STORE",I="string");var B=null;B=V instanceof v||V instanceof g?V:E.isNode&&E.isStream(V)?new _(M,V):p.prepareContent(M,V,$.binary,$.optimizedBinaryString,$.base64);var Q=new w(M,B,$);this.files[M]=Q}var f=l("./utf8"),p=l("./utils"),g=l("./stream/GenericWorker"),m=l("./stream/StreamHelper"),y=l("./defaults"),v=l("./compressedObject"),w=l("./zipObject"),b=l("./generate"),E=l("./nodejsUtils"),_=l("./nodejs/NodejsStreamInputAdapter"),O=function(M){M.slice(-1)==="/"&&(M=M.substring(0,M.length-1));var V=M.lastIndexOf("/");return 0<V?M.substring(0,V):""},S=function(M){return M.slice(-1)!=="/"&&(M+="/"),M},T=function(M,V){return V=V!==void 0?V:y.createFolders,M=S(M),this.files[M]||d.call(this,M,null,{dir:!0,createFolders:V}),this.files[M]};function L(M){return Object.prototype.toString.call(M)==="[object RegExp]"}var D={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(M){var V,K,ae;for(V in this.files)ae=this.files[V],(K=V.slice(this.root.length,V.length))&&V.slice(0,this.root.length)===this.root&&M(K,ae)},filter:function(M){var V=[];return this.forEach(function(K,ae){M(K,ae)&&V.push(ae)}),V},file:function(M,V,K){if(arguments.length!==1)return M=this.root+M,d.call(this,M,V,K),this;if(L(M)){var ae=M;return this.filter(function($,ee){return!ee.dir&&ae.test($)})}var I=this.files[this.root+M];return I&&!I.dir?I:null},folder:function(M){if(!M)return this;if(L(M))return this.filter(function(I,$){return $.dir&&M.test(I)});var V=this.root+M,K=T.call(this,V),ae=this.clone();return ae.root=K.name,ae},remove:function(M){M=this.root+M;var V=this.files[M];if(V||(M.slice(-1)!=="/"&&(M+="/"),V=this.files[M]),V&&!V.dir)delete this.files[M];else for(var K=this.filter(function(I,$){return $.name.slice(0,M.length)===M}),ae=0;ae<K.length;ae++)delete this.files[K[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(M){var V,K={};try{if((K=p.extend(M||{},{streamFiles:!1,compression:"STORE",compressionOptions:null,type:"",platform:"DOS",comment:null,mimeType:"application/zip",encodeFileName:f.utf8encode})).type=K.type.toLowerCase(),K.compression=K.compression.toUpperCase(),K.type==="binarystring"&&(K.type="string"),!K.type)throw new Error("No output type specified.");p.checkSupport(K.type),K.platform!=="darwin"&&K.platform!=="freebsd"&&K.platform!=="linux"&&K.platform!=="sunos"||(K.platform="UNIX"),K.platform==="win32"&&(K.platform="DOS");var ae=K.comment||this.comment||"";V=b.generateWorker(this,K,ae)}catch(I){(V=new g("error")).error(I)}return new m(V,K.type||"string",K.mimeType)},generateAsync:function(M,V){return this.generateInternalStream(M).accumulate(V)},generateNodeStream:function(M,V){return(M=M||{}).type||(M.type="nodebuffer"),this.generateInternalStream(M).toNodejsStream(V)}};o.exports=D},{"./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(l,o,c){o.exports=l("stream")},{stream:void 0}],17:[function(l,o,c){var d=l("./DataReader");function f(p){d.call(this,p);for(var g=0;g<this.data.length;g++)p[g]=255&p[g]}l("../utils").inherits(f,d),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),y=p.charCodeAt(2),v=p.charCodeAt(3),w=this.length-4;0<=w;--w)if(this.data[w]===g&&this.data[w+1]===m&&this.data[w+2]===y&&this.data[w+3]===v)return w-this.zero;return-1},f.prototype.readAndCheckSignature=function(p){var g=p.charCodeAt(0),m=p.charCodeAt(1),y=p.charCodeAt(2),v=p.charCodeAt(3),w=this.readData(4);return g===w[0]&&m===w[1]&&y===w[2]&&v===w[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(l,o,c){var d=l("../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 d.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(l,o,c){var d=l("./Uint8ArrayReader");function f(p){d.call(this,p)}l("../utils").inherits(f,d),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(l,o,c){var d=l("./DataReader");function f(p){d.call(this,p)}l("../utils").inherits(f,d),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(l,o,c){var d=l("./ArrayReader");function f(p){d.call(this,p)}l("../utils").inherits(f,d),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(l,o,c){var d=l("../utils"),f=l("../support"),p=l("./ArrayReader"),g=l("./StringReader"),m=l("./NodeBufferReader"),y=l("./Uint8ArrayReader");o.exports=function(v){var w=d.getTypeOf(v);return d.checkSupport(w),w!=="string"||f.uint8array?w==="nodebuffer"?new m(v):f.uint8array?new y(d.transformTo("uint8array",v)):new p(d.transformTo("array",v)):new g(v)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(l,o,c){c.LOCAL_FILE_HEADER="PK",c.CENTRAL_FILE_HEADER="PK",c.CENTRAL_DIRECTORY_END="PK",c.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK\x07",c.ZIP64_CENTRAL_DIRECTORY_END="PK",c.DATA_DESCRIPTOR="PK\x07\b"},{}],24:[function(l,o,c){var d=l("./GenericWorker"),f=l("../utils");function p(g){d.call(this,"ConvertWorker to "+g),this.destType=g}f.inherits(p,d),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(l,o,c){var d=l("./GenericWorker"),f=l("../crc32");function p(){d.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}l("../utils").inherits(p,d),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(l,o,c){var d=l("../utils"),f=l("./GenericWorker");function p(g){f.call(this,"DataLengthProbe for "+g),this.propName=g,this.withStreamInfo(g,0)}d.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(l,o,c){var d=l("../utils"),f=l("./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(y){m.dataIsReady=!0,m.data=y,m.max=y&&y.length||0,m.type=d.getTypeOf(y),m.isPaused||m._tickAndRepeat()},function(y){m.error(y)})}d.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,d.delay(this._tickAndRepeat,[],this)),!0)},p.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(d.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(l,o,c){function d(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}d.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=d},{}],29:[function(l,o,c){var d=l("../utils"),f=l("./ConvertWorker"),p=l("./GenericWorker"),g=l("../base64"),m=l("../support"),y=l("../external"),v=null;if(m.nodestream)try{v=l("../nodejs/NodejsStreamOutputAdapter")}catch{}function w(E,_){return new y.Promise(function(O,S){var T=[],L=E._internalType,D=E._outputType,M=E._mimeType;E.on("data",function(V,K){T.push(V),_&&_(K)}).on("error",function(V){T=[],S(V)}).on("end",function(){try{var V=(function(K,ae,I){switch(K){case"blob":return d.newBlob(d.transformTo("arraybuffer",ae),I);case"base64":return g.encode(ae);default:return d.transformTo(K,ae)}})(D,(function(K,ae){var I,$=0,ee=null,B=0;for(I=0;I<ae.length;I++)B+=ae[I].length;switch(K){case"string":return ae.join("");case"array":return Array.prototype.concat.apply([],ae);case"uint8array":for(ee=new Uint8Array(B),I=0;I<ae.length;I++)ee.set(ae[I],$),$+=ae[I].length;return ee;case"nodebuffer":return Buffer.concat(ae);default:throw new Error("concat : unsupported type '"+K+"'")}})(L,T),M);O(V)}catch(K){S(K)}T=[]}).resume()})}function b(E,_,O){var S=_;switch(_){case"blob":case"arraybuffer":S="uint8array";break;case"base64":S="string"}try{this._internalType=S,this._outputType=_,this._mimeType=O,d.checkSupport(S),this._worker=E.pipe(new f(S)),E.lock()}catch(T){this._worker=new p("error"),this._worker.error(T)}}b.prototype={accumulate:function(E){return w(this,E)},on:function(E,_){var O=this;return E==="data"?this._worker.on(E,function(S){_.call(O,S.data,S.meta)}):this._worker.on(E,function(){d.delay(_,arguments,O)}),this},resume:function(){return d.delay(this._worker.resume,[],this._worker),this},pause:function(){return this._worker.pause(),this},toNodejsStream:function(E){if(d.checkSupport("nodestream"),this._outputType!=="nodebuffer")throw new Error(this._outputType+" is not supported by this method");return new v(this,{objectMode:this._outputType!=="nodebuffer"},E)}},o.exports=b},{"../base64":1,"../external":6,"../nodejs/NodejsStreamOutputAdapter":13,"../support":30,"../utils":32,"./ConvertWorker":24,"./GenericWorker":28}],30:[function(l,o,c){if(c.base64=!0,c.array=!0,c.string=!0,c.arraybuffer=typeof ArrayBuffer<"u"&&typeof Uint8Array<"u",c.nodebuffer=typeof Buffer<"u",c.uint8array=typeof Uint8Array<"u",typeof ArrayBuffer>"u")c.blob=!1;else{var d=new ArrayBuffer(0);try{c.blob=new Blob([d],{type:"application/zip"}).size===0}catch{try{var f=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);f.append(d),c.blob=f.getBlob("application/zip").size===0}catch{c.blob=!1}}}try{c.nodestream=!!l("readable-stream").Readable}catch{c.nodestream=!1}},{"readable-stream":16}],31:[function(l,o,c){for(var d=l("./utils"),f=l("./support"),p=l("./nodejsUtils"),g=l("./stream/GenericWorker"),m=new Array(256),y=0;y<256;y++)m[y]=252<=y?6:248<=y?5:240<=y?4:224<=y?3:192<=y?2:1;m[254]=m[254]=1;function v(){g.call(this,"utf-8 decode"),this.leftOver=null}function w(){g.call(this,"utf-8 encode")}c.utf8encode=function(b){return f.nodebuffer?p.newBufferFrom(b,"utf-8"):(function(E){var _,O,S,T,L,D=E.length,M=0;for(T=0;T<D;T++)(64512&(O=E.charCodeAt(T)))==55296&&T+1<D&&(64512&(S=E.charCodeAt(T+1)))==56320&&(O=65536+(O-55296<<10)+(S-56320),T++),M+=O<128?1:O<2048?2:O<65536?3:4;for(_=f.uint8array?new Uint8Array(M):new Array(M),T=L=0;L<M;T++)(64512&(O=E.charCodeAt(T)))==55296&&T+1<D&&(64512&(S=E.charCodeAt(T+1)))==56320&&(O=65536+(O-55296<<10)+(S-56320),T++),O<128?_[L++]=O:(O<2048?_[L++]=192|O>>>6:(O<65536?_[L++]=224|O>>>12:(_[L++]=240|O>>>18,_[L++]=128|O>>>12&63),_[L++]=128|O>>>6&63),_[L++]=128|63&O);return _})(b)},c.utf8decode=function(b){return f.nodebuffer?d.transformTo("nodebuffer",b).toString("utf-8"):(function(E){var _,O,S,T,L=E.length,D=new Array(2*L);for(_=O=0;_<L;)if((S=E[_++])<128)D[O++]=S;else if(4<(T=m[S]))D[O++]=65533,_+=T-1;else{for(S&=T===2?31:T===3?15:7;1<T&&_<L;)S=S<<6|63&E[_++],T--;1<T?D[O++]=65533:S<65536?D[O++]=S:(S-=65536,D[O++]=55296|S>>10&1023,D[O++]=56320|1023&S)}return D.length!==O&&(D.subarray?D=D.subarray(0,O):D.length=O),d.applyFromCharCode(D)})(b=d.transformTo(f.uint8array?"uint8array":"array",b))},d.inherits(v,g),v.prototype.processChunk=function(b){var E=d.transformTo(f.uint8array?"uint8array":"array",b.data);if(this.leftOver&&this.leftOver.length){if(f.uint8array){var _=E;(E=new Uint8Array(_.length+this.leftOver.length)).set(this.leftOver,0),E.set(_,this.leftOver.length)}else E=this.leftOver.concat(E);this.leftOver=null}var O=(function(T,L){var D;for((L=L||T.length)>T.length&&(L=T.length),D=L-1;0<=D&&(192&T[D])==128;)D--;return D<0||D===0?L:D+m[T[D]]>L?D:L})(E),S=E;O!==E.length&&(f.uint8array?(S=E.subarray(0,O),this.leftOver=E.subarray(O,E.length)):(S=E.slice(0,O),this.leftOver=E.slice(O,E.length))),this.push({data:c.utf8decode(S),meta:b.meta})},v.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:c.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},c.Utf8DecodeWorker=v,d.inherits(w,g),w.prototype.processChunk=function(b){this.push({data:c.utf8encode(b.data),meta:b.meta})},c.Utf8EncodeWorker=w},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(l,o,c){var d=l("./support"),f=l("./base64"),p=l("./nodejsUtils"),g=l("./external");function m(_){return _}function y(_,O){for(var S=0;S<_.length;++S)O[S]=255&_.charCodeAt(S);return O}l("setimmediate"),c.newBlob=function(_,O){c.checkSupport("blob");try{return new Blob([_],{type:O})}catch{try{var S=new(self.BlobBuilder||self.WebKitBlobBuilder||self.MozBlobBuilder||self.MSBlobBuilder);return S.append(_),S.getBlob(O)}catch{throw new Error("Bug : can't construct the Blob.")}}};var v={stringifyByChunk:function(_,O,S){var T=[],L=0,D=_.length;if(D<=S)return String.fromCharCode.apply(null,_);for(;L<D;)O==="array"||O==="nodebuffer"?T.push(String.fromCharCode.apply(null,_.slice(L,Math.min(L+S,D)))):T.push(String.fromCharCode.apply(null,_.subarray(L,Math.min(L+S,D)))),L+=S;return T.join("")},stringifyByChar:function(_){for(var O="",S=0;S<_.length;S++)O+=String.fromCharCode(_[S]);return O},applyCanBeUsed:{uint8array:(function(){try{return d.uint8array&&String.fromCharCode.apply(null,new Uint8Array(1)).length===1}catch{return!1}})(),nodebuffer:(function(){try{return d.nodebuffer&&String.fromCharCode.apply(null,p.allocBuffer(1)).length===1}catch{return!1}})()}};function w(_){var O=65536,S=c.getTypeOf(_),T=!0;if(S==="uint8array"?T=v.applyCanBeUsed.uint8array:S==="nodebuffer"&&(T=v.applyCanBeUsed.nodebuffer),T)for(;1<O;)try{return v.stringifyByChunk(_,S,O)}catch{O=Math.floor(O/2)}return v.stringifyByChar(_)}function b(_,O){for(var S=0;S<_.length;S++)O[S]=_[S];return O}c.applyFromCharCode=w;var E={};E.string={string:m,array:function(_){return y(_,new Array(_.length))},arraybuffer:function(_){return E.string.uint8array(_).buffer},uint8array:function(_){return y(_,new Uint8Array(_.length))},nodebuffer:function(_){return y(_,p.allocBuffer(_.length))}},E.array={string:w,array:m,arraybuffer:function(_){return new Uint8Array(_).buffer},uint8array:function(_){return new Uint8Array(_)},nodebuffer:function(_){return p.newBufferFrom(_)}},E.arraybuffer={string:function(_){return w(new Uint8Array(_))},array:function(_){return b(new Uint8Array(_),new Array(_.byteLength))},arraybuffer:m,uint8array:function(_){return new Uint8Array(_)},nodebuffer:function(_){return p.newBufferFrom(new Uint8Array(_))}},E.uint8array={string:w,array:function(_){return b(_,new Array(_.length))},arraybuffer:function(_){return _.buffer},uint8array:m,nodebuffer:function(_){return p.newBufferFrom(_)}},E.nodebuffer={string:w,array:function(_){return b(_,new Array(_.length))},arraybuffer:function(_){return E.nodebuffer.uint8array(_).buffer},uint8array:function(_){return b(_,new Uint8Array(_.length))},nodebuffer:m},c.transformTo=function(_,O){if(O=O||"",!_)return O;c.checkSupport(_);var S=c.getTypeOf(O);return E[S][_](O)},c.resolve=function(_){for(var O=_.split("/"),S=[],T=0;T<O.length;T++){var L=O[T];L==="."||L===""&&T!==0&&T!==O.length-1||(L===".."?S.pop():S.push(L))}return S.join("/")},c.getTypeOf=function(_){if(typeof _=="string")return"string";var O=Object.prototype.toString.call(_);return O==="[object Array]"?"array":d.nodebuffer&&p.isBuffer(_)?"nodebuffer":d.uint8array&&O==="[object Uint8Array]"?"uint8array":d.arraybuffer&&O==="[object ArrayBuffer]"?"arraybuffer":void 0},c.checkSupport=function(_){if(!d[_.toLowerCase()])throw new Error(_+" is not supported by this platform")},c.MAX_VALUE_16BITS=65535,c.MAX_VALUE_32BITS=-1,c.pretty=function(_){var O,S,T="";for(S=0;S<(_||"").length;S++)T+="\\x"+((O=_.charCodeAt(S))<16?"0":"")+O.toString(16).toUpperCase();return T},c.delay=function(_,O,S){setImmediate(function(){_.apply(S||null,O||[])})},c.inherits=function(_,O){function S(){}S.prototype=O.prototype,_.prototype=new S},c.extend=function(){var _,O,S={};for(_=0;_<arguments.length;_++)for(O in arguments[_])Object.prototype.hasOwnProperty.call(arguments[_],O)&&S[O]===void 0&&(S[O]=arguments[_][O]);return S},c.prepareContent=function(_,O,S,T,L){return g.Promise.resolve(O).then(function(D){return d.blob&&(D instanceof Blob||["[object File]","[object Blob]"].indexOf(Object.prototype.toString.call(D))!==-1)?Blob.prototype.arrayBuffer!==void 0?D.arrayBuffer():typeof FileReader<"u"?new g.Promise(function(M,V){var K=new FileReader;K.onload=function(ae){M(ae.target.result)},K.onerror=function(ae){V(ae.target.error)},K.readAsArrayBuffer(D)}):g.Promise.reject(new Error(_+" is a Blob, but we have no way of reading it.")):D}).then(function(D){var M=c.getTypeOf(D);return M?(M==="arraybuffer"?D=c.transformTo("uint8array",D):M==="string"&&(L?D=f.decode(D):S&&T!==!0&&(D=(function(V){return y(V,d.uint8array?new Uint8Array(V.length):new Array(V.length))})(D))),D):g.Promise.reject(new Error("Can't read the data of '"+_+"'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"))})}},{"./base64":1,"./external":6,"./nodejsUtils":14,"./support":30,setimmediate:54}],33:[function(l,o,c){var d=l("./reader/readerFor"),f=l("./utils"),p=l("./signature"),g=l("./zipEntry"),m=l("./support");function y(v){this.files=[],this.loadOptions=v}y.prototype={checkSignature:function(v){if(!this.reader.readAndCheckSignature(v)){this.reader.index-=4;var w=this.reader.readString(4);throw new Error("Corrupted zip or bug: unexpected signature ("+f.pretty(w)+", expected "+f.pretty(v)+")")}},isSignature:function(v,w){var b=this.reader.index;this.reader.setIndex(v);var E=this.reader.readString(4)===w;return this.reader.setIndex(b),E},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 v=this.reader.readData(this.zipCommentLength),w=m.uint8array?"uint8array":"array",b=f.transformTo(w,v);this.zipComment=this.loadOptions.decodeFileName(b)},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 v,w,b,E=this.zip64EndOfCentralSize-44;0<E;)v=this.reader.readInt(2),w=this.reader.readInt(4),b=this.reader.readData(w),this.zip64ExtensibleData[v]={id:v,length:w,value:b}},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 v,w;for(v=0;v<this.files.length;v++)w=this.files[v],this.reader.setIndex(w.localHeaderOffset),this.checkSignature(p.LOCAL_FILE_HEADER),w.readLocalPart(this.reader),w.handleUTF8(),w.processAttributes()},readCentralDir:function(){var v;for(this.reader.setIndex(this.centralDirOffset);this.reader.readAndCheckSignature(p.CENTRAL_FILE_HEADER);)(v=new g({zip64:this.zip64},this.loadOptions)).readCentralPart(this.reader),this.files.push(v);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 v=this.reader.lastIndexOfSignature(p.CENTRAL_DIRECTORY_END);if(v<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(v);var w=v;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,(v=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(v),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 b=this.centralDirOffset+this.centralDirSize;this.zip64&&(b+=20,b+=12+this.zip64EndOfCentralSize);var E=w-b;if(0<E)this.isSignature(w,p.CENTRAL_FILE_HEADER)||(this.reader.zero=E);else if(E<0)throw new Error("Corrupted zip: missing "+Math.abs(E)+" bytes.")},prepareReader:function(v){this.reader=d(v)},load:function(v){this.prepareReader(v),this.readEndOfCentral(),this.readCentralDir(),this.readLocalFiles()}},o.exports=y},{"./reader/readerFor":22,"./signature":23,"./support":30,"./utils":32,"./zipEntry":34}],34:[function(l,o,c){var d=l("./reader/readerFor"),f=l("./utils"),p=l("./compressedObject"),g=l("./crc32"),m=l("./utf8"),y=l("./compressions"),v=l("./support");function w(b,E){this.options=b,this.loadOptions=E}w.prototype={isEncrypted:function(){return(1&this.bitFlag)==1},useUTF8:function(){return(2048&this.bitFlag)==2048},readLocalPart:function(b){var E,_;if(b.skip(22),this.fileNameLength=b.readInt(2),_=b.readInt(2),this.fileName=b.readData(this.fileNameLength),b.skip(_),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((E=(function(O){for(var S in y)if(Object.prototype.hasOwnProperty.call(y,S)&&y[S].magic===O)return y[S];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,E,b.readData(this.compressedSize))},readCentralPart:function(b){this.versionMadeBy=b.readInt(2),b.skip(2),this.bitFlag=b.readInt(2),this.compressionMethod=b.readString(2),this.date=b.readDate(),this.crc32=b.readInt(4),this.compressedSize=b.readInt(4),this.uncompressedSize=b.readInt(4);var E=b.readInt(2);if(this.extraFieldsLength=b.readInt(2),this.fileCommentLength=b.readInt(2),this.diskNumberStart=b.readInt(2),this.internalFileAttributes=b.readInt(2),this.externalFileAttributes=b.readInt(4),this.localHeaderOffset=b.readInt(4),this.isEncrypted())throw new Error("Encrypted zip are not supported");b.skip(E),this.readExtraFields(b),this.parseZIP64ExtraField(b),this.fileComment=b.readData(this.fileCommentLength)},processAttributes:function(){this.unixPermissions=null,this.dosPermissions=null;var b=this.versionMadeBy>>8;this.dir=!!(16&this.externalFileAttributes),b==0&&(this.dosPermissions=63&this.externalFileAttributes),b==3&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||this.fileNameStr.slice(-1)!=="/"||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var b=d(this.extraFields[1].value);this.uncompressedSize===f.MAX_VALUE_32BITS&&(this.uncompressedSize=b.readInt(8)),this.compressedSize===f.MAX_VALUE_32BITS&&(this.compressedSize=b.readInt(8)),this.localHeaderOffset===f.MAX_VALUE_32BITS&&(this.localHeaderOffset=b.readInt(8)),this.diskNumberStart===f.MAX_VALUE_32BITS&&(this.diskNumberStart=b.readInt(4))}},readExtraFields:function(b){var E,_,O,S=b.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});b.index+4<S;)E=b.readInt(2),_=b.readInt(2),O=b.readData(_),this.extraFields[E]={id:E,length:_,value:O};b.setIndex(S)},handleUTF8:function(){var b=v.uint8array?"uint8array":"array";if(this.useUTF8())this.fileNameStr=m.utf8decode(this.fileName),this.fileCommentStr=m.utf8decode(this.fileComment);else{var E=this.findExtraFieldUnicodePath();if(E!==null)this.fileNameStr=E;else{var _=f.transformTo(b,this.fileName);this.fileNameStr=this.loadOptions.decodeFileName(_)}var O=this.findExtraFieldUnicodeComment();if(O!==null)this.fileCommentStr=O;else{var S=f.transformTo(b,this.fileComment);this.fileCommentStr=this.loadOptions.decodeFileName(S)}}},findExtraFieldUnicodePath:function(){var b=this.extraFields[28789];if(b){var E=d(b.value);return E.readInt(1)!==1||g(this.fileName)!==E.readInt(4)?null:m.utf8decode(E.readData(b.length-5))}return null},findExtraFieldUnicodeComment:function(){var b=this.extraFields[25461];if(b){var E=d(b.value);return E.readInt(1)!==1||g(this.fileComment)!==E.readInt(4)?null:m.utf8decode(E.readData(b.length-5))}return null}},o.exports=w},{"./compressedObject":2,"./compressions":3,"./crc32":4,"./reader/readerFor":22,"./support":30,"./utf8":31,"./utils":32}],35:[function(l,o,c){function d(E,_,O){this.name=E,this.dir=O.dir,this.date=O.date,this.comment=O.comment,this.unixPermissions=O.unixPermissions,this.dosPermissions=O.dosPermissions,this._data=_,this._dataBinary=O.binary,this.options={compression:O.compression,compressionOptions:O.compressionOptions}}var f=l("./stream/StreamHelper"),p=l("./stream/DataWorker"),g=l("./utf8"),m=l("./compressedObject"),y=l("./stream/GenericWorker");d.prototype={internalStream:function(E){var _=null,O="string";try{if(!E)throw new Error("No output type specified.");var S=(O=E.toLowerCase())==="string"||O==="text";O!=="binarystring"&&O!=="text"||(O="string"),_=this._decompressWorker();var T=!this._dataBinary;T&&!S&&(_=_.pipe(new g.Utf8EncodeWorker)),!T&&S&&(_=_.pipe(new g.Utf8DecodeWorker))}catch(L){(_=new y("error")).error(L)}return new f(_,O,"")},async:function(E,_){return this.internalStream(E).accumulate(_)},nodeStream:function(E,_){return this.internalStream(E||"nodebuffer").toNodejsStream(_)},_compressWorker:function(E,_){if(this._data instanceof m&&this._data.compression.magic===E.magic)return this._data.getCompressedWorker();var O=this._decompressWorker();return this._dataBinary||(O=O.pipe(new g.Utf8EncodeWorker)),m.createWorkerFrom(O,E,_)},_decompressWorker:function(){return this._data instanceof m?this._data.getContentWorker():this._data instanceof y?this._data:new p(this._data)}};for(var v=["asText","asBinary","asNodeBuffer","asUint8Array","asArrayBuffer"],w=function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},b=0;b<v.length;b++)d.prototype[v[b]]=w;o.exports=d},{"./compressedObject":2,"./stream/DataWorker":27,"./stream/GenericWorker":28,"./stream/StreamHelper":29,"./utf8":31}],36:[function(l,o,c){(function(d){var f,p,g=d.MutationObserver||d.WebKitMutationObserver;if(g){var m=0,y=new g(E),v=d.document.createTextNode("");y.observe(v,{characterData:!0}),f=function(){v.data=m=++m%2}}else if(d.setImmediate||d.MessageChannel===void 0)f="document"in d&&"onreadystatechange"in d.document.createElement("script")?function(){var _=d.document.createElement("script");_.onreadystatechange=function(){E(),_.onreadystatechange=null,_.parentNode.removeChild(_),_=null},d.document.documentElement.appendChild(_)}:function(){setTimeout(E,0)};else{var w=new d.MessageChannel;w.port1.onmessage=E,f=function(){w.port2.postMessage(0)}}var b=[];function E(){var _,O;p=!0;for(var S=b.length;S;){for(O=b,b=[],_=-1;++_<S;)O[_]();S=b.length}p=!1}o.exports=function(_){b.push(_)!==1||p||f()}}).call(this,typeof so<"u"?so:typeof self<"u"?self:typeof window<"u"?window:{})},{}],37:[function(l,o,c){var d=l("immediate");function f(){}var p={},g=["REJECTED"],m=["FULFILLED"],y=["PENDING"];function v(S){if(typeof S!="function")throw new TypeError("resolver must be a function");this.state=y,this.queue=[],this.outcome=void 0,S!==f&&_(this,S)}function w(S,T,L){this.promise=S,typeof T=="function"&&(this.onFulfilled=T,this.callFulfilled=this.otherCallFulfilled),typeof L=="function"&&(this.onRejected=L,this.callRejected=this.otherCallRejected)}function b(S,T,L){d(function(){var D;try{D=T(L)}catch(M){return p.reject(S,M)}D===S?p.reject(S,new TypeError("Cannot resolve promise with itself")):p.resolve(S,D)})}function E(S){var T=S&&S.then;if(S&&(typeof S=="object"||typeof S=="function")&&typeof T=="function")return function(){T.apply(S,arguments)}}function _(S,T){var L=!1;function D(K){L||(L=!0,p.reject(S,K))}function M(K){L||(L=!0,p.resolve(S,K))}var V=O(function(){T(M,D)});V.status==="error"&&D(V.value)}function O(S,T){var L={};try{L.value=S(T),L.status="success"}catch(D){L.status="error",L.value=D}return L}(o.exports=v).prototype.finally=function(S){if(typeof S!="function")return this;var T=this.constructor;return this.then(function(L){return T.resolve(S()).then(function(){return L})},function(L){return T.resolve(S()).then(function(){throw L})})},v.prototype.catch=function(S){return this.then(null,S)},v.prototype.then=function(S,T){if(typeof S!="function"&&this.state===m||typeof T!="function"&&this.state===g)return this;var L=new this.constructor(f);return this.state!==y?b(L,this.state===m?S:T,this.outcome):this.queue.push(new w(L,S,T)),L},w.prototype.callFulfilled=function(S){p.resolve(this.promise,S)},w.prototype.otherCallFulfilled=function(S){b(this.promise,this.onFulfilled,S)},w.prototype.callRejected=function(S){p.reject(this.promise,S)},w.prototype.otherCallRejected=function(S){b(this.promise,this.onRejected,S)},p.resolve=function(S,T){var L=O(E,T);if(L.status==="error")return p.reject(S,L.value);var D=L.value;if(D)_(S,D);else{S.state=m,S.outcome=T;for(var M=-1,V=S.queue.length;++M<V;)S.queue[M].callFulfilled(T)}return S},p.reject=function(S,T){S.state=g,S.outcome=T;for(var L=-1,D=S.queue.length;++L<D;)S.queue[L].callRejected(T);return S},v.resolve=function(S){return S instanceof this?S:p.resolve(new this(f),S)},v.reject=function(S){var T=new this(f);return p.reject(T,S)},v.all=function(S){var T=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=S.length,D=!1;if(!L)return this.resolve([]);for(var M=new Array(L),V=0,K=-1,ae=new this(f);++K<L;)I(S[K],K);return ae;function I($,ee){T.resolve($).then(function(B){M[ee]=B,++V!==L||D||(D=!0,p.resolve(ae,M))},function(B){D||(D=!0,p.reject(ae,B))})}},v.race=function(S){var T=this;if(Object.prototype.toString.call(S)!=="[object Array]")return this.reject(new TypeError("must be an array"));var L=S.length,D=!1;if(!L)return this.resolve([]);for(var M=-1,V=new this(f);++M<L;)K=S[M],T.resolve(K).then(function(ae){D||(D=!0,p.resolve(V,ae))},function(ae){D||(D=!0,p.reject(V,ae))});var K;return V}},{immediate:36}],38:[function(l,o,c){var d={};(0,l("./lib/utils/common").assign)(d,l("./lib/deflate"),l("./lib/inflate"),l("./lib/zlib/constants")),o.exports=d},{"./lib/deflate":39,"./lib/inflate":40,"./lib/utils/common":41,"./lib/zlib/constants":44}],39:[function(l,o,c){var d=l("./zlib/deflate"),f=l("./utils/common"),p=l("./utils/strings"),g=l("./zlib/messages"),m=l("./zlib/zstream"),y=Object.prototype.toString,v=0,w=-1,b=0,E=8;function _(S){if(!(this instanceof _))return new _(S);this.options=f.assign({level:w,method:E,chunkSize:16384,windowBits:15,memLevel:8,strategy:b,to:""},S||{});var T=this.options;T.raw&&0<T.windowBits?T.windowBits=-T.windowBits:T.gzip&&0<T.windowBits&&T.windowBits<16&&(T.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new m,this.strm.avail_out=0;var L=d.deflateInit2(this.strm,T.level,T.method,T.windowBits,T.memLevel,T.strategy);if(L!==v)throw new Error(g[L]);if(T.header&&d.deflateSetHeader(this.strm,T.header),T.dictionary){var D;if(D=typeof T.dictionary=="string"?p.string2buf(T.dictionary):y.call(T.dictionary)==="[object ArrayBuffer]"?new Uint8Array(T.dictionary):T.dictionary,(L=d.deflateSetDictionary(this.strm,D))!==v)throw new Error(g[L]);this._dict_set=!0}}function O(S,T){var L=new _(T);if(L.push(S,!0),L.err)throw L.msg||g[L.err];return L.result}_.prototype.push=function(S,T){var L,D,M=this.strm,V=this.options.chunkSize;if(this.ended)return!1;D=T===~~T?T:T===!0?4:0,typeof S=="string"?M.input=p.string2buf(S):y.call(S)==="[object ArrayBuffer]"?M.input=new Uint8Array(S):M.input=S,M.next_in=0,M.avail_in=M.input.length;do{if(M.avail_out===0&&(M.output=new f.Buf8(V),M.next_out=0,M.avail_out=V),(L=d.deflate(M,D))!==1&&L!==v)return this.onEnd(L),!(this.ended=!0);M.avail_out!==0&&(M.avail_in!==0||D!==4&&D!==2)||(this.options.to==="string"?this.onData(p.buf2binstring(f.shrinkBuf(M.output,M.next_out))):this.onData(f.shrinkBuf(M.output,M.next_out)))}while((0<M.avail_in||M.avail_out===0)&&L!==1);return D===4?(L=d.deflateEnd(this.strm),this.onEnd(L),this.ended=!0,L===v):D!==2||(this.onEnd(v),!(M.avail_out=0))},_.prototype.onData=function(S){this.chunks.push(S)},_.prototype.onEnd=function(S){S===v&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=S,this.msg=this.strm.msg},c.Deflate=_,c.deflate=O,c.deflateRaw=function(S,T){return(T=T||{}).raw=!0,O(S,T)},c.gzip=function(S,T){return(T=T||{}).gzip=!0,O(S,T)}},{"./utils/common":41,"./utils/strings":42,"./zlib/deflate":46,"./zlib/messages":51,"./zlib/zstream":53}],40:[function(l,o,c){var d=l("./zlib/inflate"),f=l("./utils/common"),p=l("./utils/strings"),g=l("./zlib/constants"),m=l("./zlib/messages"),y=l("./zlib/zstream"),v=l("./zlib/gzheader"),w=Object.prototype.toString;function b(_){if(!(this instanceof b))return new b(_);this.options=f.assign({chunkSize:16384,windowBits:0,to:""},_||{});var O=this.options;O.raw&&0<=O.windowBits&&O.windowBits<16&&(O.windowBits=-O.windowBits,O.windowBits===0&&(O.windowBits=-15)),!(0<=O.windowBits&&O.windowBits<16)||_&&_.windowBits||(O.windowBits+=32),15<O.windowBits&&O.windowBits<48&&(15&O.windowBits)==0&&(O.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new y,this.strm.avail_out=0;var S=d.inflateInit2(this.strm,O.windowBits);if(S!==g.Z_OK)throw new Error(m[S]);this.header=new v,d.inflateGetHeader(this.strm,this.header)}function E(_,O){var S=new b(O);if(S.push(_,!0),S.err)throw S.msg||m[S.err];return S.result}b.prototype.push=function(_,O){var S,T,L,D,M,V,K=this.strm,ae=this.options.chunkSize,I=this.options.dictionary,$=!1;if(this.ended)return!1;T=O===~~O?O:O===!0?g.Z_FINISH:g.Z_NO_FLUSH,typeof _=="string"?K.input=p.binstring2buf(_):w.call(_)==="[object ArrayBuffer]"?K.input=new Uint8Array(_):K.input=_,K.next_in=0,K.avail_in=K.input.length;do{if(K.avail_out===0&&(K.output=new f.Buf8(ae),K.next_out=0,K.avail_out=ae),(S=d.inflate(K,g.Z_NO_FLUSH))===g.Z_NEED_DICT&&I&&(V=typeof I=="string"?p.string2buf(I):w.call(I)==="[object ArrayBuffer]"?new Uint8Array(I):I,S=d.inflateSetDictionary(this.strm,V)),S===g.Z_BUF_ERROR&&$===!0&&(S=g.Z_OK,$=!1),S!==g.Z_STREAM_END&&S!==g.Z_OK)return this.onEnd(S),!(this.ended=!0);K.next_out&&(K.avail_out!==0&&S!==g.Z_STREAM_END&&(K.avail_in!==0||T!==g.Z_FINISH&&T!==g.Z_SYNC_FLUSH)||(this.options.to==="string"?(L=p.utf8border(K.output,K.next_out),D=K.next_out-L,M=p.buf2string(K.output,L),K.next_out=D,K.avail_out=ae-D,D&&f.arraySet(K.output,K.output,L,D,0),this.onData(M)):this.onData(f.shrinkBuf(K.output,K.next_out)))),K.avail_in===0&&K.avail_out===0&&($=!0)}while((0<K.avail_in||K.avail_out===0)&&S!==g.Z_STREAM_END);return S===g.Z_STREAM_END&&(T=g.Z_FINISH),T===g.Z_FINISH?(S=d.inflateEnd(this.strm),this.onEnd(S),this.ended=!0,S===g.Z_OK):T!==g.Z_SYNC_FLUSH||(this.onEnd(g.Z_OK),!(K.avail_out=0))},b.prototype.onData=function(_){this.chunks.push(_)},b.prototype.onEnd=function(_){_===g.Z_OK&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=f.flattenChunks(this.chunks)),this.chunks=[],this.err=_,this.msg=this.strm.msg},c.Inflate=b,c.inflate=E,c.inflateRaw=function(_,O){return(O=O||{}).raw=!0,E(_,O)},c.ungzip=E},{"./utils/common":41,"./utils/strings":42,"./zlib/constants":44,"./zlib/gzheader":47,"./zlib/inflate":49,"./zlib/messages":51,"./zlib/zstream":53}],41:[function(l,o,c){var d=typeof Uint8Array<"u"&&typeof Uint16Array<"u"&&typeof Int32Array<"u";c.assign=function(g){for(var m=Array.prototype.slice.call(arguments,1);m.length;){var y=m.shift();if(y){if(typeof y!="object")throw new TypeError(y+"must be non-object");for(var v in y)y.hasOwnProperty(v)&&(g[v]=y[v])}}return g},c.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,y,v,w){if(m.subarray&&g.subarray)g.set(m.subarray(y,y+v),w);else for(var b=0;b<v;b++)g[w+b]=m[y+b]},flattenChunks:function(g){var m,y,v,w,b,E;for(m=v=0,y=g.length;m<y;m++)v+=g[m].length;for(E=new Uint8Array(v),m=w=0,y=g.length;m<y;m++)b=g[m],E.set(b,w),w+=b.length;return E}},p={arraySet:function(g,m,y,v,w){for(var b=0;b<v;b++)g[w+b]=m[y+b]},flattenChunks:function(g){return[].concat.apply([],g)}};c.setTyped=function(g){g?(c.Buf8=Uint8Array,c.Buf16=Uint16Array,c.Buf32=Int32Array,c.assign(c,f)):(c.Buf8=Array,c.Buf16=Array,c.Buf32=Array,c.assign(c,p))},c.setTyped(d)},{}],42:[function(l,o,c){var d=l("./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 d.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 y(v,w){if(w<65537&&(v.subarray&&p||!v.subarray&&f))return String.fromCharCode.apply(null,d.shrinkBuf(v,w));for(var b="",E=0;E<w;E++)b+=String.fromCharCode(v[E]);return b}g[254]=g[254]=1,c.string2buf=function(v){var w,b,E,_,O,S=v.length,T=0;for(_=0;_<S;_++)(64512&(b=v.charCodeAt(_)))==55296&&_+1<S&&(64512&(E=v.charCodeAt(_+1)))==56320&&(b=65536+(b-55296<<10)+(E-56320),_++),T+=b<128?1:b<2048?2:b<65536?3:4;for(w=new d.Buf8(T),_=O=0;O<T;_++)(64512&(b=v.charCodeAt(_)))==55296&&_+1<S&&(64512&(E=v.charCodeAt(_+1)))==56320&&(b=65536+(b-55296<<10)+(E-56320),_++),b<128?w[O++]=b:(b<2048?w[O++]=192|b>>>6:(b<65536?w[O++]=224|b>>>12:(w[O++]=240|b>>>18,w[O++]=128|b>>>12&63),w[O++]=128|b>>>6&63),w[O++]=128|63&b);return w},c.buf2binstring=function(v){return y(v,v.length)},c.binstring2buf=function(v){for(var w=new d.Buf8(v.length),b=0,E=w.length;b<E;b++)w[b]=v.charCodeAt(b);return w},c.buf2string=function(v,w){var b,E,_,O,S=w||v.length,T=new Array(2*S);for(b=E=0;b<S;)if((_=v[b++])<128)T[E++]=_;else if(4<(O=g[_]))T[E++]=65533,b+=O-1;else{for(_&=O===2?31:O===3?15:7;1<O&&b<S;)_=_<<6|63&v[b++],O--;1<O?T[E++]=65533:_<65536?T[E++]=_:(_-=65536,T[E++]=55296|_>>10&1023,T[E++]=56320|1023&_)}return y(T,E)},c.utf8border=function(v,w){var b;for((w=w||v.length)>v.length&&(w=v.length),b=w-1;0<=b&&(192&v[b])==128;)b--;return b<0||b===0?w:b+g[v[b]]>w?b:w}},{"./common":41}],43:[function(l,o,c){o.exports=function(d,f,p,g){for(var m=65535&d|0,y=d>>>16&65535|0,v=0;p!==0;){for(p-=v=2e3<p?2e3:p;y=y+(m=m+f[g++]|0)|0,--v;);m%=65521,y%=65521}return m|y<<16|0}},{}],44:[function(l,o,c){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(l,o,c){var d=(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 y=d,v=m+g;f^=-1;for(var w=m;w<v;w++)f=f>>>8^y[255&(f^p[w])];return-1^f}},{}],46:[function(l,o,c){var d,f=l("../utils/common"),p=l("./trees"),g=l("./adler32"),m=l("./crc32"),y=l("./messages"),v=0,w=4,b=0,E=-2,_=-1,O=4,S=2,T=8,L=9,D=286,M=30,V=19,K=2*D+1,ae=15,I=3,$=258,ee=$+I+1,B=42,Q=113,j=1,F=2,X=3,Y=4;function Z(A,ge){return A.msg=y[ge],ge}function R(A){return(A<<1)-(4<A?9:0)}function q(A){for(var ge=A.length;0<=--ge;)A[ge]=0}function x(A){var ge=A.state,ue=ge.pending;ue>A.avail_out&&(ue=A.avail_out),ue!==0&&(f.arraySet(A.output,ge.pending_buf,ge.pending_out,ue,A.next_out),A.next_out+=ue,ge.pending_out+=ue,A.total_out+=ue,A.avail_out-=ue,ge.pending-=ue,ge.pending===0&&(ge.pending_out=0))}function C(A,ge){p._tr_flush_block(A,0<=A.block_start?A.block_start:-1,A.strstart-A.block_start,ge),A.block_start=A.strstart,x(A.strm)}function H(A,ge){A.pending_buf[A.pending++]=ge}function G(A,ge){A.pending_buf[A.pending++]=ge>>>8&255,A.pending_buf[A.pending++]=255&ge}function te(A,ge){var ue,P,k=A.max_chain_length,J=A.strstart,he=A.prev_length,fe=A.nice_match,ne=A.strstart>A.w_size-ee?A.strstart-(A.w_size-ee):0,je=A.window,Te=A.w_mask,Se=A.prev,Ee=A.strstart+$,Ke=je[J+he-1],Me=je[J+he];A.prev_length>=A.good_match&&(k>>=2),fe>A.lookahead&&(fe=A.lookahead);do if(je[(ue=ge)+he]===Me&&je[ue+he-1]===Ke&&je[ue]===je[J]&&je[++ue]===je[J+1]){J+=2,ue++;do;while(je[++J]===je[++ue]&&je[++J]===je[++ue]&&je[++J]===je[++ue]&&je[++J]===je[++ue]&&je[++J]===je[++ue]&&je[++J]===je[++ue]&&je[++J]===je[++ue]&&je[++J]===je[++ue]&&J<Ee);if(P=$-(Ee-J),J=Ee-$,he<P){if(A.match_start=ge,fe<=(he=P))break;Ke=je[J+he-1],Me=je[J+he]}}while((ge=Se[ge&Te])>ne&&--k!=0);return he<=A.lookahead?he:A.lookahead}function pe(A){var ge,ue,P,k,J,he,fe,ne,je,Te,Se=A.w_size;do{if(k=A.window_size-A.lookahead-A.strstart,A.strstart>=Se+(Se-ee)){for(f.arraySet(A.window,A.window,Se,Se,0),A.match_start-=Se,A.strstart-=Se,A.block_start-=Se,ge=ue=A.hash_size;P=A.head[--ge],A.head[ge]=Se<=P?P-Se:0,--ue;);for(ge=ue=Se;P=A.prev[--ge],A.prev[ge]=Se<=P?P-Se:0,--ue;);k+=Se}if(A.strm.avail_in===0)break;if(he=A.strm,fe=A.window,ne=A.strstart+A.lookahead,je=k,Te=void 0,Te=he.avail_in,je<Te&&(Te=je),ue=Te===0?0:(he.avail_in-=Te,f.arraySet(fe,he.input,he.next_in,Te,ne),he.state.wrap===1?he.adler=g(he.adler,fe,Te,ne):he.state.wrap===2&&(he.adler=m(he.adler,fe,Te,ne)),he.next_in+=Te,he.total_in+=Te,Te),A.lookahead+=ue,A.lookahead+A.insert>=I)for(J=A.strstart-A.insert,A.ins_h=A.window[J],A.ins_h=(A.ins_h<<A.hash_shift^A.window[J+1])&A.hash_mask;A.insert&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[J+I-1])&A.hash_mask,A.prev[J&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=J,J++,A.insert--,!(A.lookahead+A.insert<I)););}while(A.lookahead<ee&&A.strm.avail_in!==0)}function Ne(A,ge){for(var ue,P;;){if(A.lookahead<ee){if(pe(A),A.lookahead<ee&&ge===v)return j;if(A.lookahead===0)break}if(ue=0,A.lookahead>=I&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+I-1])&A.hash_mask,ue=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),ue!==0&&A.strstart-ue<=A.w_size-ee&&(A.match_length=te(A,ue)),A.match_length>=I)if(P=p._tr_tally(A,A.strstart-A.match_start,A.match_length-I),A.lookahead-=A.match_length,A.match_length<=A.max_lazy_match&&A.lookahead>=I){for(A.match_length--;A.strstart++,A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+I-1])&A.hash_mask,ue=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart,--A.match_length!=0;);A.strstart++}else A.strstart+=A.match_length,A.match_length=0,A.ins_h=A.window[A.strstart],A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+1])&A.hash_mask;else P=p._tr_tally(A,0,A.window[A.strstart]),A.lookahead--,A.strstart++;if(P&&(C(A,!1),A.strm.avail_out===0))return j}return A.insert=A.strstart<I-1?A.strstart:I-1,ge===w?(C(A,!0),A.strm.avail_out===0?X:Y):A.last_lit&&(C(A,!1),A.strm.avail_out===0)?j:F}function we(A,ge){for(var ue,P,k;;){if(A.lookahead<ee){if(pe(A),A.lookahead<ee&&ge===v)return j;if(A.lookahead===0)break}if(ue=0,A.lookahead>=I&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+I-1])&A.hash_mask,ue=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),A.prev_length=A.match_length,A.prev_match=A.match_start,A.match_length=I-1,ue!==0&&A.prev_length<A.max_lazy_match&&A.strstart-ue<=A.w_size-ee&&(A.match_length=te(A,ue),A.match_length<=5&&(A.strategy===1||A.match_length===I&&4096<A.strstart-A.match_start)&&(A.match_length=I-1)),A.prev_length>=I&&A.match_length<=A.prev_length){for(k=A.strstart+A.lookahead-I,P=p._tr_tally(A,A.strstart-1-A.prev_match,A.prev_length-I),A.lookahead-=A.prev_length-1,A.prev_length-=2;++A.strstart<=k&&(A.ins_h=(A.ins_h<<A.hash_shift^A.window[A.strstart+I-1])&A.hash_mask,ue=A.prev[A.strstart&A.w_mask]=A.head[A.ins_h],A.head[A.ins_h]=A.strstart),--A.prev_length!=0;);if(A.match_available=0,A.match_length=I-1,A.strstart++,P&&(C(A,!1),A.strm.avail_out===0))return j}else if(A.match_available){if((P=p._tr_tally(A,0,A.window[A.strstart-1]))&&C(A,!1),A.strstart++,A.lookahead--,A.strm.avail_out===0)return j}else A.match_available=1,A.strstart++,A.lookahead--}return A.match_available&&(P=p._tr_tally(A,0,A.window[A.strstart-1]),A.match_available=0),A.insert=A.strstart<I-1?A.strstart:I-1,ge===w?(C(A,!0),A.strm.avail_out===0?X:Y):A.last_lit&&(C(A,!1),A.strm.avail_out===0)?j:F}function se(A,ge,ue,P,k){this.good_length=A,this.max_lazy=ge,this.nice_length=ue,this.max_chain=P,this.func=k}function _e(){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=T,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*K),this.dyn_dtree=new f.Buf16(2*(2*M+1)),this.bl_tree=new f.Buf16(2*(2*V+1)),q(this.dyn_ltree),q(this.dyn_dtree),q(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*D+1),q(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new f.Buf16(2*D+1),q(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 Ce(A){var ge;return A&&A.state?(A.total_in=A.total_out=0,A.data_type=S,(ge=A.state).pending=0,ge.pending_out=0,ge.wrap<0&&(ge.wrap=-ge.wrap),ge.status=ge.wrap?B:Q,A.adler=ge.wrap===2?0:1,ge.last_flush=v,p._tr_init(ge),b):Z(A,E)}function qe(A){var ge=Ce(A);return ge===b&&(function(ue){ue.window_size=2*ue.w_size,q(ue.head),ue.max_lazy_match=d[ue.level].max_lazy,ue.good_match=d[ue.level].good_length,ue.nice_match=d[ue.level].nice_length,ue.max_chain_length=d[ue.level].max_chain,ue.strstart=0,ue.block_start=0,ue.lookahead=0,ue.insert=0,ue.match_length=ue.prev_length=I-1,ue.match_available=0,ue.ins_h=0})(A.state),ge}function Ie(A,ge,ue,P,k,J){if(!A)return E;var he=1;if(ge===_&&(ge=6),P<0?(he=0,P=-P):15<P&&(he=2,P-=16),k<1||L<k||ue!==T||P<8||15<P||ge<0||9<ge||J<0||O<J)return Z(A,E);P===8&&(P=9);var fe=new _e;return(A.state=fe).strm=A,fe.wrap=he,fe.gzhead=null,fe.w_bits=P,fe.w_size=1<<fe.w_bits,fe.w_mask=fe.w_size-1,fe.hash_bits=k+7,fe.hash_size=1<<fe.hash_bits,fe.hash_mask=fe.hash_size-1,fe.hash_shift=~~((fe.hash_bits+I-1)/I),fe.window=new f.Buf8(2*fe.w_size),fe.head=new f.Buf16(fe.hash_size),fe.prev=new f.Buf16(fe.w_size),fe.lit_bufsize=1<<k+6,fe.pending_buf_size=4*fe.lit_bufsize,fe.pending_buf=new f.Buf8(fe.pending_buf_size),fe.d_buf=1*fe.lit_bufsize,fe.l_buf=3*fe.lit_bufsize,fe.level=ge,fe.strategy=J,fe.method=ue,qe(A)}d=[new se(0,0,0,0,function(A,ge){var ue=65535;for(ue>A.pending_buf_size-5&&(ue=A.pending_buf_size-5);;){if(A.lookahead<=1){if(pe(A),A.lookahead===0&&ge===v)return j;if(A.lookahead===0)break}A.strstart+=A.lookahead,A.lookahead=0;var P=A.block_start+ue;if((A.strstart===0||A.strstart>=P)&&(A.lookahead=A.strstart-P,A.strstart=P,C(A,!1),A.strm.avail_out===0)||A.strstart-A.block_start>=A.w_size-ee&&(C(A,!1),A.strm.avail_out===0))return j}return A.insert=0,ge===w?(C(A,!0),A.strm.avail_out===0?X:Y):(A.strstart>A.block_start&&(C(A,!1),A.strm.avail_out),j)}),new se(4,4,8,4,Ne),new se(4,5,16,8,Ne),new se(4,6,32,32,Ne),new se(4,4,16,16,we),new se(8,16,32,32,we),new se(8,16,128,128,we),new se(8,32,128,256,we),new se(32,128,258,1024,we),new se(32,258,258,4096,we)],c.deflateInit=function(A,ge){return Ie(A,ge,T,15,8,0)},c.deflateInit2=Ie,c.deflateReset=qe,c.deflateResetKeep=Ce,c.deflateSetHeader=function(A,ge){return A&&A.state?A.state.wrap!==2?E:(A.state.gzhead=ge,b):E},c.deflate=function(A,ge){var ue,P,k,J;if(!A||!A.state||5<ge||ge<0)return A?Z(A,E):E;if(P=A.state,!A.output||!A.input&&A.avail_in!==0||P.status===666&&ge!==w)return Z(A,A.avail_out===0?-5:E);if(P.strm=A,ue=P.last_flush,P.last_flush=ge,P.status===B)if(P.wrap===2)A.adler=0,H(P,31),H(P,139),H(P,8),P.gzhead?(H(P,(P.gzhead.text?1:0)+(P.gzhead.hcrc?2:0)+(P.gzhead.extra?4:0)+(P.gzhead.name?8:0)+(P.gzhead.comment?16:0)),H(P,255&P.gzhead.time),H(P,P.gzhead.time>>8&255),H(P,P.gzhead.time>>16&255),H(P,P.gzhead.time>>24&255),H(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),H(P,255&P.gzhead.os),P.gzhead.extra&&P.gzhead.extra.length&&(H(P,255&P.gzhead.extra.length),H(P,P.gzhead.extra.length>>8&255)),P.gzhead.hcrc&&(A.adler=m(A.adler,P.pending_buf,P.pending,0)),P.gzindex=0,P.status=69):(H(P,0),H(P,0),H(P,0),H(P,0),H(P,0),H(P,P.level===9?2:2<=P.strategy||P.level<2?4:0),H(P,3),P.status=Q);else{var he=T+(P.w_bits-8<<4)<<8;he|=(2<=P.strategy||P.level<2?0:P.level<6?1:P.level===6?2:3)<<6,P.strstart!==0&&(he|=32),he+=31-he%31,P.status=Q,G(P,he),P.strstart!==0&&(G(P,A.adler>>>16),G(P,65535&A.adler)),A.adler=1}if(P.status===69)if(P.gzhead.extra){for(k=P.pending;P.gzindex<(65535&P.gzhead.extra.length)&&(P.pending!==P.pending_buf_size||(P.gzhead.hcrc&&P.pending>k&&(A.adler=m(A.adler,P.pending_buf,P.pending-k,k)),x(A),k=P.pending,P.pending!==P.pending_buf_size));)H(P,255&P.gzhead.extra[P.gzindex]),P.gzindex++;P.gzhead.hcrc&&P.pending>k&&(A.adler=m(A.adler,P.pending_buf,P.pending-k,k)),P.gzindex===P.gzhead.extra.length&&(P.gzindex=0,P.status=73)}else P.status=73;if(P.status===73)if(P.gzhead.name){k=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>k&&(A.adler=m(A.adler,P.pending_buf,P.pending-k,k)),x(A),k=P.pending,P.pending===P.pending_buf_size)){J=1;break}J=P.gzindex<P.gzhead.name.length?255&P.gzhead.name.charCodeAt(P.gzindex++):0,H(P,J)}while(J!==0);P.gzhead.hcrc&&P.pending>k&&(A.adler=m(A.adler,P.pending_buf,P.pending-k,k)),J===0&&(P.gzindex=0,P.status=91)}else P.status=91;if(P.status===91)if(P.gzhead.comment){k=P.pending;do{if(P.pending===P.pending_buf_size&&(P.gzhead.hcrc&&P.pending>k&&(A.adler=m(A.adler,P.pending_buf,P.pending-k,k)),x(A),k=P.pending,P.pending===P.pending_buf_size)){J=1;break}J=P.gzindex<P.gzhead.comment.length?255&P.gzhead.comment.charCodeAt(P.gzindex++):0,H(P,J)}while(J!==0);P.gzhead.hcrc&&P.pending>k&&(A.adler=m(A.adler,P.pending_buf,P.pending-k,k)),J===0&&(P.status=103)}else P.status=103;if(P.status===103&&(P.gzhead.hcrc?(P.pending+2>P.pending_buf_size&&x(A),P.pending+2<=P.pending_buf_size&&(H(P,255&A.adler),H(P,A.adler>>8&255),A.adler=0,P.status=Q)):P.status=Q),P.pending!==0){if(x(A),A.avail_out===0)return P.last_flush=-1,b}else if(A.avail_in===0&&R(ge)<=R(ue)&&ge!==w)return Z(A,-5);if(P.status===666&&A.avail_in!==0)return Z(A,-5);if(A.avail_in!==0||P.lookahead!==0||ge!==v&&P.status!==666){var fe=P.strategy===2?(function(ne,je){for(var Te;;){if(ne.lookahead===0&&(pe(ne),ne.lookahead===0)){if(je===v)return j;break}if(ne.match_length=0,Te=p._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++,Te&&(C(ne,!1),ne.strm.avail_out===0))return j}return ne.insert=0,je===w?(C(ne,!0),ne.strm.avail_out===0?X:Y):ne.last_lit&&(C(ne,!1),ne.strm.avail_out===0)?j:F})(P,ge):P.strategy===3?(function(ne,je){for(var Te,Se,Ee,Ke,Me=ne.window;;){if(ne.lookahead<=$){if(pe(ne),ne.lookahead<=$&&je===v)return j;if(ne.lookahead===0)break}if(ne.match_length=0,ne.lookahead>=I&&0<ne.strstart&&(Se=Me[Ee=ne.strstart-1])===Me[++Ee]&&Se===Me[++Ee]&&Se===Me[++Ee]){Ke=ne.strstart+$;do;while(Se===Me[++Ee]&&Se===Me[++Ee]&&Se===Me[++Ee]&&Se===Me[++Ee]&&Se===Me[++Ee]&&Se===Me[++Ee]&&Se===Me[++Ee]&&Se===Me[++Ee]&&Ee<Ke);ne.match_length=$-(Ke-Ee),ne.match_length>ne.lookahead&&(ne.match_length=ne.lookahead)}if(ne.match_length>=I?(Te=p._tr_tally(ne,1,ne.match_length-I),ne.lookahead-=ne.match_length,ne.strstart+=ne.match_length,ne.match_length=0):(Te=p._tr_tally(ne,0,ne.window[ne.strstart]),ne.lookahead--,ne.strstart++),Te&&(C(ne,!1),ne.strm.avail_out===0))return j}return ne.insert=0,je===w?(C(ne,!0),ne.strm.avail_out===0?X:Y):ne.last_lit&&(C(ne,!1),ne.strm.avail_out===0)?j:F})(P,ge):d[P.level].func(P,ge);if(fe!==X&&fe!==Y||(P.status=666),fe===j||fe===X)return A.avail_out===0&&(P.last_flush=-1),b;if(fe===F&&(ge===1?p._tr_align(P):ge!==5&&(p._tr_stored_block(P,0,0,!1),ge===3&&(q(P.head),P.lookahead===0&&(P.strstart=0,P.block_start=0,P.insert=0))),x(A),A.avail_out===0))return P.last_flush=-1,b}return ge!==w?b:P.wrap<=0?1:(P.wrap===2?(H(P,255&A.adler),H(P,A.adler>>8&255),H(P,A.adler>>16&255),H(P,A.adler>>24&255),H(P,255&A.total_in),H(P,A.total_in>>8&255),H(P,A.total_in>>16&255),H(P,A.total_in>>24&255)):(G(P,A.adler>>>16),G(P,65535&A.adler)),x(A),0<P.wrap&&(P.wrap=-P.wrap),P.pending!==0?b:1)},c.deflateEnd=function(A){var ge;return A&&A.state?(ge=A.state.status)!==B&&ge!==69&&ge!==73&&ge!==91&&ge!==103&&ge!==Q&&ge!==666?Z(A,E):(A.state=null,ge===Q?Z(A,-3):b):E},c.deflateSetDictionary=function(A,ge){var ue,P,k,J,he,fe,ne,je,Te=ge.length;if(!A||!A.state||(J=(ue=A.state).wrap)===2||J===1&&ue.status!==B||ue.lookahead)return E;for(J===1&&(A.adler=g(A.adler,ge,Te,0)),ue.wrap=0,Te>=ue.w_size&&(J===0&&(q(ue.head),ue.strstart=0,ue.block_start=0,ue.insert=0),je=new f.Buf8(ue.w_size),f.arraySet(je,ge,Te-ue.w_size,ue.w_size,0),ge=je,Te=ue.w_size),he=A.avail_in,fe=A.next_in,ne=A.input,A.avail_in=Te,A.next_in=0,A.input=ge,pe(ue);ue.lookahead>=I;){for(P=ue.strstart,k=ue.lookahead-(I-1);ue.ins_h=(ue.ins_h<<ue.hash_shift^ue.window[P+I-1])&ue.hash_mask,ue.prev[P&ue.w_mask]=ue.head[ue.ins_h],ue.head[ue.ins_h]=P,P++,--k;);ue.strstart=P,ue.lookahead=I-1,pe(ue)}return ue.strstart+=ue.lookahead,ue.block_start=ue.strstart,ue.insert=ue.lookahead,ue.lookahead=0,ue.match_length=ue.prev_length=I-1,ue.match_available=0,A.next_in=fe,A.input=ne,A.avail_in=he,ue.wrap=J,b},c.deflateInfo="pako deflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./messages":51,"./trees":52}],47:[function(l,o,c){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(l,o,c){o.exports=function(d,f){var p,g,m,y,v,w,b,E,_,O,S,T,L,D,M,V,K,ae,I,$,ee,B,Q,j,F;p=d.state,g=d.next_in,j=d.input,m=g+(d.avail_in-5),y=d.next_out,F=d.output,v=y-(f-d.avail_out),w=y+(d.avail_out-257),b=p.dmax,E=p.wsize,_=p.whave,O=p.wnext,S=p.window,T=p.hold,L=p.bits,D=p.lencode,M=p.distcode,V=(1<<p.lenbits)-1,K=(1<<p.distbits)-1;e:do{L<15&&(T+=j[g++]<<L,L+=8,T+=j[g++]<<L,L+=8),ae=D[T&V];t:for(;;){if(T>>>=I=ae>>>24,L-=I,(I=ae>>>16&255)===0)F[y++]=65535&ae;else{if(!(16&I)){if((64&I)==0){ae=D[(65535&ae)+(T&(1<<I)-1)];continue t}if(32&I){p.mode=12;break e}d.msg="invalid literal/length code",p.mode=30;break e}$=65535&ae,(I&=15)&&(L<I&&(T+=j[g++]<<L,L+=8),$+=T&(1<<I)-1,T>>>=I,L-=I),L<15&&(T+=j[g++]<<L,L+=8,T+=j[g++]<<L,L+=8),ae=M[T&K];n:for(;;){if(T>>>=I=ae>>>24,L-=I,!(16&(I=ae>>>16&255))){if((64&I)==0){ae=M[(65535&ae)+(T&(1<<I)-1)];continue n}d.msg="invalid distance code",p.mode=30;break e}if(ee=65535&ae,L<(I&=15)&&(T+=j[g++]<<L,(L+=8)<I&&(T+=j[g++]<<L,L+=8)),b<(ee+=T&(1<<I)-1)){d.msg="invalid distance too far back",p.mode=30;break e}if(T>>>=I,L-=I,(I=y-v)<ee){if(_<(I=ee-I)&&p.sane){d.msg="invalid distance too far back",p.mode=30;break e}if(Q=S,(B=0)===O){if(B+=E-I,I<$){for($-=I;F[y++]=S[B++],--I;);B=y-ee,Q=F}}else if(O<I){if(B+=E+O-I,(I-=O)<$){for($-=I;F[y++]=S[B++],--I;);if(B=0,O<$){for($-=I=O;F[y++]=S[B++],--I;);B=y-ee,Q=F}}}else if(B+=O-I,I<$){for($-=I;F[y++]=S[B++],--I;);B=y-ee,Q=F}for(;2<$;)F[y++]=Q[B++],F[y++]=Q[B++],F[y++]=Q[B++],$-=3;$&&(F[y++]=Q[B++],1<$&&(F[y++]=Q[B++]))}else{for(B=y-ee;F[y++]=F[B++],F[y++]=F[B++],F[y++]=F[B++],2<($-=3););$&&(F[y++]=F[B++],1<$&&(F[y++]=F[B++]))}break}}break}}while(g<m&&y<w);g-=$=L>>3,T&=(1<<(L-=$<<3))-1,d.next_in=g,d.next_out=y,d.avail_in=g<m?m-g+5:5-(g-m),d.avail_out=y<w?w-y+257:257-(y-w),p.hold=T,p.bits=L}},{}],49:[function(l,o,c){var d=l("../utils/common"),f=l("./adler32"),p=l("./crc32"),g=l("./inffast"),m=l("./inftrees"),y=1,v=2,w=0,b=-2,E=1,_=852,O=592;function S(B){return(B>>>24&255)+(B>>>8&65280)+((65280&B)<<8)+((255&B)<<24)}function T(){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 d.Buf16(320),this.work=new d.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function L(B){var Q;return B&&B.state?(Q=B.state,B.total_in=B.total_out=Q.total=0,B.msg="",Q.wrap&&(B.adler=1&Q.wrap),Q.mode=E,Q.last=0,Q.havedict=0,Q.dmax=32768,Q.head=null,Q.hold=0,Q.bits=0,Q.lencode=Q.lendyn=new d.Buf32(_),Q.distcode=Q.distdyn=new d.Buf32(O),Q.sane=1,Q.back=-1,w):b}function D(B){var Q;return B&&B.state?((Q=B.state).wsize=0,Q.whave=0,Q.wnext=0,L(B)):b}function M(B,Q){var j,F;return B&&B.state?(F=B.state,Q<0?(j=0,Q=-Q):(j=1+(Q>>4),Q<48&&(Q&=15)),Q&&(Q<8||15<Q)?b:(F.window!==null&&F.wbits!==Q&&(F.window=null),F.wrap=j,F.wbits=Q,D(B))):b}function V(B,Q){var j,F;return B?(F=new T,(B.state=F).window=null,(j=M(B,Q))!==w&&(B.state=null),j):b}var K,ae,I=!0;function $(B){if(I){var Q;for(K=new d.Buf32(512),ae=new d.Buf32(32),Q=0;Q<144;)B.lens[Q++]=8;for(;Q<256;)B.lens[Q++]=9;for(;Q<280;)B.lens[Q++]=7;for(;Q<288;)B.lens[Q++]=8;for(m(y,B.lens,0,288,K,0,B.work,{bits:9}),Q=0;Q<32;)B.lens[Q++]=5;m(v,B.lens,0,32,ae,0,B.work,{bits:5}),I=!1}B.lencode=K,B.lenbits=9,B.distcode=ae,B.distbits=5}function ee(B,Q,j,F){var X,Y=B.state;return Y.window===null&&(Y.wsize=1<<Y.wbits,Y.wnext=0,Y.whave=0,Y.window=new d.Buf8(Y.wsize)),F>=Y.wsize?(d.arraySet(Y.window,Q,j-Y.wsize,Y.wsize,0),Y.wnext=0,Y.whave=Y.wsize):(F<(X=Y.wsize-Y.wnext)&&(X=F),d.arraySet(Y.window,Q,j-F,X,Y.wnext),(F-=X)?(d.arraySet(Y.window,Q,j-F,F,0),Y.wnext=F,Y.whave=Y.wsize):(Y.wnext+=X,Y.wnext===Y.wsize&&(Y.wnext=0),Y.whave<Y.wsize&&(Y.whave+=X))),0}c.inflateReset=D,c.inflateReset2=M,c.inflateResetKeep=L,c.inflateInit=function(B){return V(B,15)},c.inflateInit2=V,c.inflate=function(B,Q){var j,F,X,Y,Z,R,q,x,C,H,G,te,pe,Ne,we,se,_e,Ce,qe,Ie,A,ge,ue,P,k=0,J=new d.Buf8(4),he=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!B||!B.state||!B.output||!B.input&&B.avail_in!==0)return b;(j=B.state).mode===12&&(j.mode=13),Z=B.next_out,X=B.output,q=B.avail_out,Y=B.next_in,F=B.input,R=B.avail_in,x=j.hold,C=j.bits,H=R,G=q,ge=w;e:for(;;)switch(j.mode){case E:if(j.wrap===0){j.mode=13;break}for(;C<16;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}if(2&j.wrap&&x===35615){J[j.check=0]=255&x,J[1]=x>>>8&255,j.check=p(j.check,J,2,0),C=x=0,j.mode=2;break}if(j.flags=0,j.head&&(j.head.done=!1),!(1&j.wrap)||(((255&x)<<8)+(x>>8))%31){B.msg="incorrect header check",j.mode=30;break}if((15&x)!=8){B.msg="unknown compression method",j.mode=30;break}if(C-=4,A=8+(15&(x>>>=4)),j.wbits===0)j.wbits=A;else if(A>j.wbits){B.msg="invalid window size",j.mode=30;break}j.dmax=1<<A,B.adler=j.check=1,j.mode=512&x?10:12,C=x=0;break;case 2:for(;C<16;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}if(j.flags=x,(255&j.flags)!=8){B.msg="unknown compression method",j.mode=30;break}if(57344&j.flags){B.msg="unknown header flags set",j.mode=30;break}j.head&&(j.head.text=x>>8&1),512&j.flags&&(J[0]=255&x,J[1]=x>>>8&255,j.check=p(j.check,J,2,0)),C=x=0,j.mode=3;case 3:for(;C<32;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}j.head&&(j.head.time=x),512&j.flags&&(J[0]=255&x,J[1]=x>>>8&255,J[2]=x>>>16&255,J[3]=x>>>24&255,j.check=p(j.check,J,4,0)),C=x=0,j.mode=4;case 4:for(;C<16;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}j.head&&(j.head.xflags=255&x,j.head.os=x>>8),512&j.flags&&(J[0]=255&x,J[1]=x>>>8&255,j.check=p(j.check,J,2,0)),C=x=0,j.mode=5;case 5:if(1024&j.flags){for(;C<16;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}j.length=x,j.head&&(j.head.extra_len=x),512&j.flags&&(J[0]=255&x,J[1]=x>>>8&255,j.check=p(j.check,J,2,0)),C=x=0}else j.head&&(j.head.extra=null);j.mode=6;case 6:if(1024&j.flags&&(R<(te=j.length)&&(te=R),te&&(j.head&&(A=j.head.extra_len-j.length,j.head.extra||(j.head.extra=new Array(j.head.extra_len)),d.arraySet(j.head.extra,F,Y,te,A)),512&j.flags&&(j.check=p(j.check,F,te,Y)),R-=te,Y+=te,j.length-=te),j.length))break e;j.length=0,j.mode=7;case 7:if(2048&j.flags){if(R===0)break e;for(te=0;A=F[Y+te++],j.head&&A&&j.length<65536&&(j.head.name+=String.fromCharCode(A)),A&&te<R;);if(512&j.flags&&(j.check=p(j.check,F,te,Y)),R-=te,Y+=te,A)break e}else j.head&&(j.head.name=null);j.length=0,j.mode=8;case 8:if(4096&j.flags){if(R===0)break e;for(te=0;A=F[Y+te++],j.head&&A&&j.length<65536&&(j.head.comment+=String.fromCharCode(A)),A&&te<R;);if(512&j.flags&&(j.check=p(j.check,F,te,Y)),R-=te,Y+=te,A)break e}else j.head&&(j.head.comment=null);j.mode=9;case 9:if(512&j.flags){for(;C<16;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}if(x!==(65535&j.check)){B.msg="header crc mismatch",j.mode=30;break}C=x=0}j.head&&(j.head.hcrc=j.flags>>9&1,j.head.done=!0),B.adler=j.check=0,j.mode=12;break;case 10:for(;C<32;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}B.adler=j.check=S(x),C=x=0,j.mode=11;case 11:if(j.havedict===0)return B.next_out=Z,B.avail_out=q,B.next_in=Y,B.avail_in=R,j.hold=x,j.bits=C,2;B.adler=j.check=1,j.mode=12;case 12:if(Q===5||Q===6)break e;case 13:if(j.last){x>>>=7&C,C-=7&C,j.mode=27;break}for(;C<3;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}switch(j.last=1&x,C-=1,3&(x>>>=1)){case 0:j.mode=14;break;case 1:if($(j),j.mode=20,Q!==6)break;x>>>=2,C-=2;break e;case 2:j.mode=17;break;case 3:B.msg="invalid block type",j.mode=30}x>>>=2,C-=2;break;case 14:for(x>>>=7&C,C-=7&C;C<32;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}if((65535&x)!=(x>>>16^65535)){B.msg="invalid stored block lengths",j.mode=30;break}if(j.length=65535&x,C=x=0,j.mode=15,Q===6)break e;case 15:j.mode=16;case 16:if(te=j.length){if(R<te&&(te=R),q<te&&(te=q),te===0)break e;d.arraySet(X,F,Y,te,Z),R-=te,Y+=te,q-=te,Z+=te,j.length-=te;break}j.mode=12;break;case 17:for(;C<14;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}if(j.nlen=257+(31&x),x>>>=5,C-=5,j.ndist=1+(31&x),x>>>=5,C-=5,j.ncode=4+(15&x),x>>>=4,C-=4,286<j.nlen||30<j.ndist){B.msg="too many length or distance symbols",j.mode=30;break}j.have=0,j.mode=18;case 18:for(;j.have<j.ncode;){for(;C<3;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}j.lens[he[j.have++]]=7&x,x>>>=3,C-=3}for(;j.have<19;)j.lens[he[j.have++]]=0;if(j.lencode=j.lendyn,j.lenbits=7,ue={bits:j.lenbits},ge=m(0,j.lens,0,19,j.lencode,0,j.work,ue),j.lenbits=ue.bits,ge){B.msg="invalid code lengths set",j.mode=30;break}j.have=0,j.mode=19;case 19:for(;j.have<j.nlen+j.ndist;){for(;se=(k=j.lencode[x&(1<<j.lenbits)-1])>>>16&255,_e=65535&k,!((we=k>>>24)<=C);){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}if(_e<16)x>>>=we,C-=we,j.lens[j.have++]=_e;else{if(_e===16){for(P=we+2;C<P;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}if(x>>>=we,C-=we,j.have===0){B.msg="invalid bit length repeat",j.mode=30;break}A=j.lens[j.have-1],te=3+(3&x),x>>>=2,C-=2}else if(_e===17){for(P=we+3;C<P;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}C-=we,A=0,te=3+(7&(x>>>=we)),x>>>=3,C-=3}else{for(P=we+7;C<P;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}C-=we,A=0,te=11+(127&(x>>>=we)),x>>>=7,C-=7}if(j.have+te>j.nlen+j.ndist){B.msg="invalid bit length repeat",j.mode=30;break}for(;te--;)j.lens[j.have++]=A}}if(j.mode===30)break;if(j.lens[256]===0){B.msg="invalid code -- missing end-of-block",j.mode=30;break}if(j.lenbits=9,ue={bits:j.lenbits},ge=m(y,j.lens,0,j.nlen,j.lencode,0,j.work,ue),j.lenbits=ue.bits,ge){B.msg="invalid literal/lengths set",j.mode=30;break}if(j.distbits=6,j.distcode=j.distdyn,ue={bits:j.distbits},ge=m(v,j.lens,j.nlen,j.ndist,j.distcode,0,j.work,ue),j.distbits=ue.bits,ge){B.msg="invalid distances set",j.mode=30;break}if(j.mode=20,Q===6)break e;case 20:j.mode=21;case 21:if(6<=R&&258<=q){B.next_out=Z,B.avail_out=q,B.next_in=Y,B.avail_in=R,j.hold=x,j.bits=C,g(B,G),Z=B.next_out,X=B.output,q=B.avail_out,Y=B.next_in,F=B.input,R=B.avail_in,x=j.hold,C=j.bits,j.mode===12&&(j.back=-1);break}for(j.back=0;se=(k=j.lencode[x&(1<<j.lenbits)-1])>>>16&255,_e=65535&k,!((we=k>>>24)<=C);){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}if(se&&(240&se)==0){for(Ce=we,qe=se,Ie=_e;se=(k=j.lencode[Ie+((x&(1<<Ce+qe)-1)>>Ce)])>>>16&255,_e=65535&k,!(Ce+(we=k>>>24)<=C);){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}x>>>=Ce,C-=Ce,j.back+=Ce}if(x>>>=we,C-=we,j.back+=we,j.length=_e,se===0){j.mode=26;break}if(32&se){j.back=-1,j.mode=12;break}if(64&se){B.msg="invalid literal/length code",j.mode=30;break}j.extra=15&se,j.mode=22;case 22:if(j.extra){for(P=j.extra;C<P;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}j.length+=x&(1<<j.extra)-1,x>>>=j.extra,C-=j.extra,j.back+=j.extra}j.was=j.length,j.mode=23;case 23:for(;se=(k=j.distcode[x&(1<<j.distbits)-1])>>>16&255,_e=65535&k,!((we=k>>>24)<=C);){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}if((240&se)==0){for(Ce=we,qe=se,Ie=_e;se=(k=j.distcode[Ie+((x&(1<<Ce+qe)-1)>>Ce)])>>>16&255,_e=65535&k,!(Ce+(we=k>>>24)<=C);){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}x>>>=Ce,C-=Ce,j.back+=Ce}if(x>>>=we,C-=we,j.back+=we,64&se){B.msg="invalid distance code",j.mode=30;break}j.offset=_e,j.extra=15&se,j.mode=24;case 24:if(j.extra){for(P=j.extra;C<P;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}j.offset+=x&(1<<j.extra)-1,x>>>=j.extra,C-=j.extra,j.back+=j.extra}if(j.offset>j.dmax){B.msg="invalid distance too far back",j.mode=30;break}j.mode=25;case 25:if(q===0)break e;if(te=G-q,j.offset>te){if((te=j.offset-te)>j.whave&&j.sane){B.msg="invalid distance too far back",j.mode=30;break}pe=te>j.wnext?(te-=j.wnext,j.wsize-te):j.wnext-te,te>j.length&&(te=j.length),Ne=j.window}else Ne=X,pe=Z-j.offset,te=j.length;for(q<te&&(te=q),q-=te,j.length-=te;X[Z++]=Ne[pe++],--te;);j.length===0&&(j.mode=21);break;case 26:if(q===0)break e;X[Z++]=j.length,q--,j.mode=21;break;case 27:if(j.wrap){for(;C<32;){if(R===0)break e;R--,x|=F[Y++]<<C,C+=8}if(G-=q,B.total_out+=G,j.total+=G,G&&(B.adler=j.check=j.flags?p(j.check,X,G,Z-G):f(j.check,X,G,Z-G)),G=q,(j.flags?x:S(x))!==j.check){B.msg="incorrect data check",j.mode=30;break}C=x=0}j.mode=28;case 28:if(j.wrap&&j.flags){for(;C<32;){if(R===0)break e;R--,x+=F[Y++]<<C,C+=8}if(x!==(4294967295&j.total)){B.msg="incorrect length check",j.mode=30;break}C=x=0}j.mode=29;case 29:ge=1;break e;case 30:ge=-3;break e;case 31:return-4;default:return b}return B.next_out=Z,B.avail_out=q,B.next_in=Y,B.avail_in=R,j.hold=x,j.bits=C,(j.wsize||G!==B.avail_out&&j.mode<30&&(j.mode<27||Q!==4))&&ee(B,B.output,B.next_out,G-B.avail_out)?(j.mode=31,-4):(H-=B.avail_in,G-=B.avail_out,B.total_in+=H,B.total_out+=G,j.total+=G,j.wrap&&G&&(B.adler=j.check=j.flags?p(j.check,X,G,B.next_out-G):f(j.check,X,G,B.next_out-G)),B.data_type=j.bits+(j.last?64:0)+(j.mode===12?128:0)+(j.mode===20||j.mode===15?256:0),(H==0&&G===0||Q===4)&&ge===w&&(ge=-5),ge)},c.inflateEnd=function(B){if(!B||!B.state)return b;var Q=B.state;return Q.window&&(Q.window=null),B.state=null,w},c.inflateGetHeader=function(B,Q){var j;return B&&B.state?(2&(j=B.state).wrap)==0?b:((j.head=Q).done=!1,w):b},c.inflateSetDictionary=function(B,Q){var j,F=Q.length;return B&&B.state?(j=B.state).wrap!==0&&j.mode!==11?b:j.mode===11&&f(1,Q,F,0)!==j.check?-3:ee(B,Q,F,F)?(j.mode=31,-4):(j.havedict=1,w):b},c.inflateInfo="pako inflate (from Nodeca project)"},{"../utils/common":41,"./adler32":43,"./crc32":45,"./inffast":48,"./inftrees":50}],50:[function(l,o,c){var d=l("../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(y,v,w,b,E,_,O,S){var T,L,D,M,V,K,ae,I,$,ee=S.bits,B=0,Q=0,j=0,F=0,X=0,Y=0,Z=0,R=0,q=0,x=0,C=null,H=0,G=new d.Buf16(16),te=new d.Buf16(16),pe=null,Ne=0;for(B=0;B<=15;B++)G[B]=0;for(Q=0;Q<b;Q++)G[v[w+Q]]++;for(X=ee,F=15;1<=F&&G[F]===0;F--);if(F<X&&(X=F),F===0)return E[_++]=20971520,E[_++]=20971520,S.bits=1,0;for(j=1;j<F&&G[j]===0;j++);for(X<j&&(X=j),B=R=1;B<=15;B++)if(R<<=1,(R-=G[B])<0)return-1;if(0<R&&(y===0||F!==1))return-1;for(te[1]=0,B=1;B<15;B++)te[B+1]=te[B]+G[B];for(Q=0;Q<b;Q++)v[w+Q]!==0&&(O[te[v[w+Q]]++]=Q);if(K=y===0?(C=pe=O,19):y===1?(C=f,H-=257,pe=p,Ne-=257,256):(C=g,pe=m,-1),B=j,V=_,Z=Q=x=0,D=-1,M=(q=1<<(Y=X))-1,y===1&&852<q||y===2&&592<q)return 1;for(;;){for(ae=B-Z,$=O[Q]<K?(I=0,O[Q]):O[Q]>K?(I=pe[Ne+O[Q]],C[H+O[Q]]):(I=96,0),T=1<<B-Z,j=L=1<<Y;E[V+(x>>Z)+(L-=T)]=ae<<24|I<<16|$|0,L!==0;);for(T=1<<B-1;x&T;)T>>=1;if(T!==0?(x&=T-1,x+=T):x=0,Q++,--G[B]==0){if(B===F)break;B=v[w+O[Q]]}if(X<B&&(x&M)!==D){for(Z===0&&(Z=X),V+=j,R=1<<(Y=B-Z);Y+Z<F&&!((R-=G[Y+Z])<=0);)Y++,R<<=1;if(q+=1<<Y,y===1&&852<q||y===2&&592<q)return 1;E[D=x&M]=X<<24|Y<<16|V-_|0}}return x!==0&&(E[V+x]=B-Z<<24|64<<16|0),S.bits=X,0}},{"../utils/common":41}],51:[function(l,o,c){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(l,o,c){var d=l("../utils/common"),f=0,p=1;function g(k){for(var J=k.length;0<=--J;)k[J]=0}var m=0,y=29,v=256,w=v+1+y,b=30,E=19,_=2*w+1,O=15,S=16,T=7,L=256,D=16,M=17,V=18,K=[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],I=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],$=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ee=new Array(2*(w+2));g(ee);var B=new Array(2*b);g(B);var Q=new Array(512);g(Q);var j=new Array(256);g(j);var F=new Array(y);g(F);var X,Y,Z,R=new Array(b);function q(k,J,he,fe,ne){this.static_tree=k,this.extra_bits=J,this.extra_base=he,this.elems=fe,this.max_length=ne,this.has_stree=k&&k.length}function x(k,J){this.dyn_tree=k,this.max_code=0,this.stat_desc=J}function C(k){return k<256?Q[k]:Q[256+(k>>>7)]}function H(k,J){k.pending_buf[k.pending++]=255&J,k.pending_buf[k.pending++]=J>>>8&255}function G(k,J,he){k.bi_valid>S-he?(k.bi_buf|=J<<k.bi_valid&65535,H(k,k.bi_buf),k.bi_buf=J>>S-k.bi_valid,k.bi_valid+=he-S):(k.bi_buf|=J<<k.bi_valid&65535,k.bi_valid+=he)}function te(k,J,he){G(k,he[2*J],he[2*J+1])}function pe(k,J){for(var he=0;he|=1&k,k>>>=1,he<<=1,0<--J;);return he>>>1}function Ne(k,J,he){var fe,ne,je=new Array(O+1),Te=0;for(fe=1;fe<=O;fe++)je[fe]=Te=Te+he[fe-1]<<1;for(ne=0;ne<=J;ne++){var Se=k[2*ne+1];Se!==0&&(k[2*ne]=pe(je[Se]++,Se))}}function we(k){var J;for(J=0;J<w;J++)k.dyn_ltree[2*J]=0;for(J=0;J<b;J++)k.dyn_dtree[2*J]=0;for(J=0;J<E;J++)k.bl_tree[2*J]=0;k.dyn_ltree[2*L]=1,k.opt_len=k.static_len=0,k.last_lit=k.matches=0}function se(k){8<k.bi_valid?H(k,k.bi_buf):0<k.bi_valid&&(k.pending_buf[k.pending++]=k.bi_buf),k.bi_buf=0,k.bi_valid=0}function _e(k,J,he,fe){var ne=2*J,je=2*he;return k[ne]<k[je]||k[ne]===k[je]&&fe[J]<=fe[he]}function Ce(k,J,he){for(var fe=k.heap[he],ne=he<<1;ne<=k.heap_len&&(ne<k.heap_len&&_e(J,k.heap[ne+1],k.heap[ne],k.depth)&&ne++,!_e(J,fe,k.heap[ne],k.depth));)k.heap[he]=k.heap[ne],he=ne,ne<<=1;k.heap[he]=fe}function qe(k,J,he){var fe,ne,je,Te,Se=0;if(k.last_lit!==0)for(;fe=k.pending_buf[k.d_buf+2*Se]<<8|k.pending_buf[k.d_buf+2*Se+1],ne=k.pending_buf[k.l_buf+Se],Se++,fe===0?te(k,ne,J):(te(k,(je=j[ne])+v+1,J),(Te=K[je])!==0&&G(k,ne-=F[je],Te),te(k,je=C(--fe),he),(Te=ae[je])!==0&&G(k,fe-=R[je],Te)),Se<k.last_lit;);te(k,L,J)}function Ie(k,J){var he,fe,ne,je=J.dyn_tree,Te=J.stat_desc.static_tree,Se=J.stat_desc.has_stree,Ee=J.stat_desc.elems,Ke=-1;for(k.heap_len=0,k.heap_max=_,he=0;he<Ee;he++)je[2*he]!==0?(k.heap[++k.heap_len]=Ke=he,k.depth[he]=0):je[2*he+1]=0;for(;k.heap_len<2;)je[2*(ne=k.heap[++k.heap_len]=Ke<2?++Ke:0)]=1,k.depth[ne]=0,k.opt_len--,Se&&(k.static_len-=Te[2*ne+1]);for(J.max_code=Ke,he=k.heap_len>>1;1<=he;he--)Ce(k,je,he);for(ne=Ee;he=k.heap[1],k.heap[1]=k.heap[k.heap_len--],Ce(k,je,1),fe=k.heap[1],k.heap[--k.heap_max]=he,k.heap[--k.heap_max]=fe,je[2*ne]=je[2*he]+je[2*fe],k.depth[ne]=(k.depth[he]>=k.depth[fe]?k.depth[he]:k.depth[fe])+1,je[2*he+1]=je[2*fe+1]=ne,k.heap[1]=ne++,Ce(k,je,1),2<=k.heap_len;);k.heap[--k.heap_max]=k.heap[1],(function(Me,kt){var Bt,Tt,Wt,Ze,lt,it,Oe=kt.dyn_tree,pt=kt.max_code,jt=kt.stat_desc.static_tree,Fe=kt.stat_desc.has_stree,ot=kt.stat_desc.extra_bits,Je=kt.stat_desc.extra_base,Ye=kt.stat_desc.max_length,Ge=0;for(Ze=0;Ze<=O;Ze++)Me.bl_count[Ze]=0;for(Oe[2*Me.heap[Me.heap_max]+1]=0,Bt=Me.heap_max+1;Bt<_;Bt++)Ye<(Ze=Oe[2*Oe[2*(Tt=Me.heap[Bt])+1]+1]+1)&&(Ze=Ye,Ge++),Oe[2*Tt+1]=Ze,pt<Tt||(Me.bl_count[Ze]++,lt=0,Je<=Tt&&(lt=ot[Tt-Je]),it=Oe[2*Tt],Me.opt_len+=it*(Ze+lt),Fe&&(Me.static_len+=it*(jt[2*Tt+1]+lt)));if(Ge!==0){do{for(Ze=Ye-1;Me.bl_count[Ze]===0;)Ze--;Me.bl_count[Ze]--,Me.bl_count[Ze+1]+=2,Me.bl_count[Ye]--,Ge-=2}while(0<Ge);for(Ze=Ye;Ze!==0;Ze--)for(Tt=Me.bl_count[Ze];Tt!==0;)pt<(Wt=Me.heap[--Bt])||(Oe[2*Wt+1]!==Ze&&(Me.opt_len+=(Ze-Oe[2*Wt+1])*Oe[2*Wt],Oe[2*Wt+1]=Ze),Tt--)}})(k,J),Ne(je,Ke,k.bl_count)}function A(k,J,he){var fe,ne,je=-1,Te=J[1],Se=0,Ee=7,Ke=4;for(Te===0&&(Ee=138,Ke=3),J[2*(he+1)+1]=65535,fe=0;fe<=he;fe++)ne=Te,Te=J[2*(fe+1)+1],++Se<Ee&&ne===Te||(Se<Ke?k.bl_tree[2*ne]+=Se:ne!==0?(ne!==je&&k.bl_tree[2*ne]++,k.bl_tree[2*D]++):Se<=10?k.bl_tree[2*M]++:k.bl_tree[2*V]++,je=ne,Ke=(Se=0)===Te?(Ee=138,3):ne===Te?(Ee=6,3):(Ee=7,4))}function ge(k,J,he){var fe,ne,je=-1,Te=J[1],Se=0,Ee=7,Ke=4;for(Te===0&&(Ee=138,Ke=3),fe=0;fe<=he;fe++)if(ne=Te,Te=J[2*(fe+1)+1],!(++Se<Ee&&ne===Te)){if(Se<Ke)for(;te(k,ne,k.bl_tree),--Se!=0;);else ne!==0?(ne!==je&&(te(k,ne,k.bl_tree),Se--),te(k,D,k.bl_tree),G(k,Se-3,2)):Se<=10?(te(k,M,k.bl_tree),G(k,Se-3,3)):(te(k,V,k.bl_tree),G(k,Se-11,7));je=ne,Ke=(Se=0)===Te?(Ee=138,3):ne===Te?(Ee=6,3):(Ee=7,4)}}g(R);var ue=!1;function P(k,J,he,fe){G(k,(m<<1)+(fe?1:0),3),(function(ne,je,Te,Se){se(ne),H(ne,Te),H(ne,~Te),d.arraySet(ne.pending_buf,ne.window,je,Te,ne.pending),ne.pending+=Te})(k,J,he)}c._tr_init=function(k){ue||((function(){var J,he,fe,ne,je,Te=new Array(O+1);for(ne=fe=0;ne<y-1;ne++)for(F[ne]=fe,J=0;J<1<<K[ne];J++)j[fe++]=ne;for(j[fe-1]=ne,ne=je=0;ne<16;ne++)for(R[ne]=je,J=0;J<1<<ae[ne];J++)Q[je++]=ne;for(je>>=7;ne<b;ne++)for(R[ne]=je<<7,J=0;J<1<<ae[ne]-7;J++)Q[256+je++]=ne;for(he=0;he<=O;he++)Te[he]=0;for(J=0;J<=143;)ee[2*J+1]=8,J++,Te[8]++;for(;J<=255;)ee[2*J+1]=9,J++,Te[9]++;for(;J<=279;)ee[2*J+1]=7,J++,Te[7]++;for(;J<=287;)ee[2*J+1]=8,J++,Te[8]++;for(Ne(ee,w+1,Te),J=0;J<b;J++)B[2*J+1]=5,B[2*J]=pe(J,5);X=new q(ee,K,v+1,w,O),Y=new q(B,ae,0,b,O),Z=new q(new Array(0),I,0,E,T)})(),ue=!0),k.l_desc=new x(k.dyn_ltree,X),k.d_desc=new x(k.dyn_dtree,Y),k.bl_desc=new x(k.bl_tree,Z),k.bi_buf=0,k.bi_valid=0,we(k)},c._tr_stored_block=P,c._tr_flush_block=function(k,J,he,fe){var ne,je,Te=0;0<k.level?(k.strm.data_type===2&&(k.strm.data_type=(function(Se){var Ee,Ke=4093624447;for(Ee=0;Ee<=31;Ee++,Ke>>>=1)if(1&Ke&&Se.dyn_ltree[2*Ee]!==0)return f;if(Se.dyn_ltree[18]!==0||Se.dyn_ltree[20]!==0||Se.dyn_ltree[26]!==0)return p;for(Ee=32;Ee<v;Ee++)if(Se.dyn_ltree[2*Ee]!==0)return p;return f})(k)),Ie(k,k.l_desc),Ie(k,k.d_desc),Te=(function(Se){var Ee;for(A(Se,Se.dyn_ltree,Se.l_desc.max_code),A(Se,Se.dyn_dtree,Se.d_desc.max_code),Ie(Se,Se.bl_desc),Ee=E-1;3<=Ee&&Se.bl_tree[2*$[Ee]+1]===0;Ee--);return Se.opt_len+=3*(Ee+1)+5+5+4,Ee})(k),ne=k.opt_len+3+7>>>3,(je=k.static_len+3+7>>>3)<=ne&&(ne=je)):ne=je=he+5,he+4<=ne&&J!==-1?P(k,J,he,fe):k.strategy===4||je===ne?(G(k,2+(fe?1:0),3),qe(k,ee,B)):(G(k,4+(fe?1:0),3),(function(Se,Ee,Ke,Me){var kt;for(G(Se,Ee-257,5),G(Se,Ke-1,5),G(Se,Me-4,4),kt=0;kt<Me;kt++)G(Se,Se.bl_tree[2*$[kt]+1],3);ge(Se,Se.dyn_ltree,Ee-1),ge(Se,Se.dyn_dtree,Ke-1)})(k,k.l_desc.max_code+1,k.d_desc.max_code+1,Te+1),qe(k,k.dyn_ltree,k.dyn_dtree)),we(k),fe&&se(k)},c._tr_tally=function(k,J,he){return k.pending_buf[k.d_buf+2*k.last_lit]=J>>>8&255,k.pending_buf[k.d_buf+2*k.last_lit+1]=255&J,k.pending_buf[k.l_buf+k.last_lit]=255&he,k.last_lit++,J===0?k.dyn_ltree[2*he]++:(k.matches++,J--,k.dyn_ltree[2*(j[he]+v+1)]++,k.dyn_dtree[2*C(J)]++),k.last_lit===k.lit_bufsize-1},c._tr_align=function(k){G(k,2,3),te(k,L,ee),(function(J){J.bi_valid===16?(H(J,J.bi_buf),J.bi_buf=0,J.bi_valid=0):8<=J.bi_valid&&(J.pending_buf[J.pending++]=255&J.bi_buf,J.bi_buf>>=8,J.bi_valid-=8)})(k)}},{"../utils/common":41}],53:[function(l,o,c){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(l,o,c){(function(d){(function(f,p){if(!f.setImmediate){var g,m,y,v,w=1,b={},E=!1,_=f.document,O=Object.getPrototypeOf&&Object.getPrototypeOf(f);O=O&&O.setTimeout?O:f,g={}.toString.call(f.process)==="[object process]"?function(D){process.nextTick(function(){T(D)})}:(function(){if(f.postMessage&&!f.importScripts){var D=!0,M=f.onmessage;return f.onmessage=function(){D=!1},f.postMessage("","*"),f.onmessage=M,D}})()?(v="setImmediate$"+Math.random()+"$",f.addEventListener?f.addEventListener("message",L,!1):f.attachEvent("onmessage",L),function(D){f.postMessage(v+D,"*")}):f.MessageChannel?((y=new MessageChannel).port1.onmessage=function(D){T(D.data)},function(D){y.port2.postMessage(D)}):_&&"onreadystatechange"in _.createElement("script")?(m=_.documentElement,function(D){var M=_.createElement("script");M.onreadystatechange=function(){T(D),M.onreadystatechange=null,m.removeChild(M),M=null},m.appendChild(M)}):function(D){setTimeout(T,0,D)},O.setImmediate=function(D){typeof D!="function"&&(D=new Function(""+D));for(var M=new Array(arguments.length-1),V=0;V<M.length;V++)M[V]=arguments[V+1];var K={callback:D,args:M};return b[w]=K,g(w),w++},O.clearImmediate=S}function S(D){delete b[D]}function T(D){if(E)setTimeout(T,0,D);else{var M=b[D];if(M){E=!0;try{(function(V){var K=V.callback,ae=V.args;switch(ae.length){case 0:K();break;case 1:K(ae[0]);break;case 2:K(ae[0],ae[1]);break;case 3:K(ae[0],ae[1],ae[2]);break;default:K.apply(p,ae)}})(M)}finally{S(D),E=!1}}}}function L(D){D.source===f&&typeof D.data=="string"&&D.data.indexOf(v)===0&&T(+D.data.slice(v.length))}})(typeof self>"u"?d===void 0?this:d:self)}).call(this,typeof so<"u"?so:typeof self<"u"?self:typeof window<"u"?window:{})},{}]},{},[10])(10)})})(Md)),Md.exports}var PC=$C();const qC=Uv(PC),Rv=()=>({id:`BUG-${Date.now().toString().slice(-6)}`,title:"",severity:"medium",status:"open",actualResult:"",expectedResult:"",stepsToReproduce:"",attachments:[],createdAt:new Date().toISOString()});function HC({reports:n,testCases:i,onSave:l,onDelete:o}){const{ui:c}=Le(),[d,f]=z.useState(),[p,g]=z.useState(!1);async function m(){g(!0);try{const y=new qC;y.file("bug-reports.csv",FC(n));for(const E of n)for(const _ of E.attachments)y.file(`attachments/${Lo(E.id)}/${Lo(_.name)}`,_.dataUrl.split(",")[1]??"",{base64:!0});const v=await y.generateAsync({type:"blob"}),w=URL.createObjectURL(v),b=document.createElement("a");b.href=w,b.download=`lazyscout-bug-reports-${new Date().toISOString().slice(0,10)}.zip`,b.click(),URL.revokeObjectURL(w)}finally{g(!1)}}return a.jsxs("section",{className:"bug-reports",children:[a.jsxs("div",{className:"bug-reports-head",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:c("Defect tracking")}),a.jsx("h3",{children:c("Bug Reports")}),a.jsx("p",{children:c("Capture reproducible issues and keep screenshots with the local project.")})]}),a.jsxs("div",{className:"flex flex-wrap gap-2",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",disabled:!n.length||p,onClick:()=>{m()},children:c(p?"Creating ZIP…":"Export ZIP + images")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>f(Rv()),children:c("+ Add Bug Report")})]})]}),n.length?a.jsx("div",{className:"overflow-x-auto",children:a.jsxs("table",{className:"bug-report-table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:c("Bug ID")}),a.jsx("th",{children:c("Title")}),a.jsx("th",{children:c("Test Case")}),a.jsx("th",{children:c("Severity")}),a.jsx("th",{children:c("Status")}),a.jsx("th",{children:c("Evidence")}),a.jsx("th",{children:c("Actions")})]})}),a.jsx("tbody",{children:n.map(y=>a.jsxs("tr",{children:[a.jsx("td",{children:y.id}),a.jsxs("td",{children:[a.jsx("b",{children:y.title||c("Untitled bug")}),a.jsx("small",{children:new Date(y.createdAt).toLocaleDateString()})]}),a.jsx("td",{children:y.testCaseId||"—"}),a.jsx("td",{children:a.jsx("span",{className:`bug-severity ${y.severity}`,children:y.severity})}),a.jsx("td",{children:a.jsx("span",{className:"bug-status",children:y.status})}),a.jsxs("td",{children:[y.attachments.length," ",c("screenshot"),y.attachments.length===1?"":"s"]}),a.jsx("td",{children:a.jsxs("div",{className:"flex justify-center gap-1",children:[a.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>f(y),children:c("Edit")}),a.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>o(y.id),children:c("Delete")})]})})]},y.id))})]})}):a.jsxs("div",{className:"bug-empty",children:[a.jsx("b",{children:c("No Bug Reports yet")}),a.jsx("span",{children:c("When a Test Case fails, add the actual result, expected result, reproduction steps, and screenshots here.")}),a.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>f(Rv()),children:c("Create first Bug Report")})]}),d&&a.jsx(GC,{report:d,testCases:i,onClose:()=>f(void 0),onSave:y=>{l(y),f(void 0)}})]})}function GC({report:n,testCases:i,onSave:l,onClose:o}){const{ui:c}=Le(),[d,f]=z.useState(n);async function p(g){const m=[...g.target.files??[]].filter(v=>v.type.startsWith("image/")).slice(0,5),y=await Promise.all(m.map(async v=>({name:v.name,type:v.type,dataUrl:await VC(v)})));f(v=>({...v,attachments:[...v.attachments,...y]}))}return a.jsx("div",{className:"modern-modal-backdrop",children:a.jsxs("section",{className:"modern-modal bug-editor",role:"dialog","aria-modal":"true",children:[a.jsxs("header",{className:"modal-header",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:c("Bug Report")}),a.jsx("h2",{children:d.id}),a.jsx("p",{children:c("Describe the defect so another person can reproduce it quickly.")})]}),a.jsx("button",{type:"button",className:"icon-btn",onClick:o,children:"×"})]}),a.jsxs("div",{className:"bug-editor-body",children:[a.jsxs("div",{className:"grid gap-3 md:grid-cols-[1fr_150px_150px]",children:[a.jsxs("label",{children:[a.jsx("span",{children:c("Title")}),a.jsx("input",{className:"field",value:d.title,onChange:g=>f({...d,title:g.target.value}),placeholder:c("What went wrong?")})]}),a.jsxs("label",{children:[a.jsx("span",{children:c("Severity")}),a.jsxs("select",{className:"field",value:d.severity,onChange:g=>f({...d,severity:g.target.value}),children:[a.jsx("option",{value:"critical",children:c("critical")}),a.jsx("option",{value:"high",children:c("high")}),a.jsx("option",{value:"medium",children:c("medium")}),a.jsx("option",{value:"low",children:c("low")})]})]}),a.jsxs("label",{children:[a.jsx("span",{children:c("Status")}),a.jsxs("select",{className:"field",value:d.status,onChange:g=>f({...d,status:g.target.value}),children:[a.jsx("option",{value:"open",children:c("open")}),a.jsx("option",{value:"in-progress",children:c("in-progress")}),a.jsx("option",{value:"resolved",children:c("resolved")})]})]})]}),a.jsxs("label",{children:[a.jsx("span",{children:c("Related Test Case")}),a.jsxs("select",{className:"field",value:d.testCaseId??"",onChange:g=>f({...d,testCaseId:g.target.value||void 0}),children:[a.jsx("option",{value:"",children:c("Not linked")}),i.map(g=>a.jsxs("option",{value:g.id,children:[g.id," · ",g.title]},g.id))]})]}),a.jsxs("label",{children:[a.jsx("span",{children:c("Steps to reproduce")}),a.jsx("textarea",{className:"field",rows:4,value:d.stepsToReproduce,onChange:g=>f({...d,stepsToReproduce:g.target.value}),placeholder:c(`1. Open…
|
|
62
|
+
2. Click…
|
|
63
|
+
3. Observe…`)})]}),a.jsxs("div",{className:"grid gap-3 md:grid-cols-2",children:[a.jsxs("label",{children:[a.jsx("span",{children:c("Actual Result")}),a.jsx("textarea",{className:"field",rows:4,value:d.actualResult,onChange:g=>f({...d,actualResult:g.target.value})})]}),a.jsxs("label",{children:[a.jsx("span",{children:c("Expected Result")}),a.jsx("textarea",{className:"field",rows:4,value:d.expectedResult,onChange:g=>f({...d,expectedResult:g.target.value})})]})]}),a.jsxs("label",{className:"bug-upload",children:[a.jsx("span",{children:c("Evidence screenshots")}),a.jsx("input",{type:"file",accept:"image/*",multiple:!0,onChange:g=>{p(g)}}),a.jsx("em",{children:c("Upload up to 5 images at a time. Images are included in ZIP export.")})]}),d.attachments.length?a.jsx("div",{className:"bug-attachments",children:d.attachments.map((g,m)=>a.jsxs("figure",{children:[a.jsx("img",{src:g.dataUrl,alt:g.name}),a.jsxs("figcaption",{children:[g.name,a.jsx("button",{type:"button",onClick:()=>f(y=>({...y,attachments:y.attachments.filter((v,w)=>w!==m)})),children:"×"})]})]},`${g.name}-${m}`))}):null]}),a.jsxs("footer",{className:"modal-footer",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:o,children:c("Cancel")}),a.jsx("button",{type:"button",className:"btn btn-primary",disabled:!d.title.trim(),onClick:()=>l(d),children:c("Save Bug Report")})]})]})})}function VC(n){return new Promise((i,l)=>{const o=new FileReader;o.onload=()=>i(String(o.result)),o.onerror=()=>l(o.error),o.readAsDataURL(n)})}function Lo(n){return n.replace(/[^a-z0-9._-]/gi,"_")}function FC(n){const i=["Bug_ID","Title","Test_Case","Severity","Status","Steps_To_Reproduce","Actual_Result","Expected_Result","Attachments"],l=o=>`"${o.replaceAll('"','""')}"`;return[i,...n.map(o=>[o.id,o.title,o.testCaseId??"",o.severity,o.status,o.stepsToReproduce,o.actualResult,o.expectedResult,o.attachments.map(c=>`attachments/${Lo(o.id)}/${Lo(c.name)}`).join("; ")])].map(o=>o.map(l).join(",")).join(`\r
|
|
64
|
+
`)}function YC({screenshots:n,onDelete:i}){const{ui:l}=Le();function o(c){const d=document.createElement("a");d.href=c.dataUrl,d.download=c.name,d.click()}return a.jsxs("section",{className:"screenshot-gallery",children:[a.jsxs("header",{className:"screenshot-gallery-head",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:l("Playwright evidence")}),a.jsx("h3",{children:l("Screenshots")}),a.jsxs("p",{children:[l("LazyScout does not capture automatically. Add")," ",a.jsxs("code",{children:["await page.screenshot(","{"," path: 'evidence.png', fullPage: true ","}",")"]})," ",l("to edited Playwright code when evidence is needed.")]})]}),a.jsxs("span",{children:[n.length,l("/50 saved")]})]}),n.length?a.jsx("div",{className:"screenshot-gallery-grid",children:n.map(c=>a.jsxs("figure",{children:[a.jsx("img",{src:c.dataUrl,alt:`Screenshot for ${c.testCaseId}`}),a.jsxs("figcaption",{children:[a.jsxs("div",{children:[a.jsx("b",{children:c.testCaseId}),a.jsxs("span",{children:[c.status," · ",new Date(c.capturedAt).toLocaleString()]})]}),a.jsxs("div",{className:"flex shrink-0 gap-1",children:[a.jsx("button",{type:"button",className:"btn btn-secondary px-2 py-1",onClick:()=>o(c),children:l("Download")}),a.jsx("button",{type:"button",className:"btn btn-danger px-2 py-1",onClick:()=>i(c.name),children:l("Delete")})]})]})]},c.name))}):a.jsxs("div",{className:"bug-empty",children:[a.jsx("b",{children:l("No screenshots yet")}),a.jsx("span",{children:l("Add page.screenshot() to edited Playwright code, save it, then run that Test Case.")})]})]})}function XC({defaultUrl:n}){const{ui:i}=Le(),[l,o]=z.useState(n),[c,d]=z.useState(3),[f,p]=z.useState(5),[g,m]=z.useState(300),[y,v]=z.useState(!1),[w,b]=z.useState(!1),[E,_]=z.useState(),[O,S]=z.useState(""),T=Math.min(20,Math.max(1,Number(c)||1))*Math.min(100,Math.max(1,Number(f)||1));async function L(){if(!(w||!y)){b(!0),_(void 0),S("");try{_(await P0({url:l,virtualUsers:Number(c)||1,requestsPerUser:Number(f)||1,intervalMs:Number(g)||0,confirmed:y}))}catch(D){S(D instanceof Error?D.message:String(D))}finally{b(!1)}}}return a.jsxs("section",{className:"load-test-page",children:[a.jsxs("header",{className:"load-test-hero",children:[a.jsx("div",{className:"load-test-hero-icon",children:"⚡"}),a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:i("HTTP performance workspace")}),a.jsx("h2",{children:i("Load Test")}),a.jsx("p",{children:i("Send controlled GET traffic, compare response times, and inspect every HTTP response.")})]}),a.jsx("span",{children:i("GET only · Local runner")})]}),a.jsxs("div",{className:"load-test-layout",children:[a.jsxs("section",{className:"load-config-card",children:[a.jsxs("div",{className:"load-section-title",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:i("Test configuration")}),a.jsx("h3",{children:i("Request settings")})]}),a.jsxs("b",{children:[T," ",i("requests")]})]}),a.jsxs("div",{className:"load-test-form",children:[a.jsxs("label",{className:"load-url",children:[a.jsx("span",{children:i("Target URL")}),a.jsx("input",{className:"field",value:l,onChange:D=>o(D.target.value),placeholder:"https://example.com",disabled:w})]}),a.jsxs("div",{className:"load-input-grid",children:[a.jsxs("label",{children:[a.jsx("span",{children:i("Virtual users")}),a.jsx("input",{className:"field",type:"number",min:1,max:20,value:c,onChange:D=>d(D.target.value===""?"":Number(D.target.value)),disabled:w}),a.jsx("small",{children:i("Maximum 20 concurrent users")})]}),a.jsxs("label",{children:[a.jsx("span",{children:i("Requests / user")}),a.jsx("input",{className:"field",type:"number",min:1,max:100,value:f,onChange:D=>p(D.target.value===""?"":Number(D.target.value)),disabled:w}),a.jsx("small",{children:i("Maximum 100 per user")})]}),a.jsxs("label",{children:[a.jsx("span",{children:i("Interval")}),a.jsxs("div",{className:"load-input-unit",children:[a.jsx("input",{className:"field",type:"number",min:0,max:1e4,value:g,onChange:D=>m(D.target.value===""?"":Number(D.target.value)),disabled:w}),a.jsx("em",{children:i("ms")})]}),a.jsx("small",{children:i("Pause between each request")})]})]}),a.jsxs("label",{className:"load-confirm",children:[a.jsx("input",{type:"checkbox",checked:y,onChange:D=>v(D.target.checked),disabled:w}),a.jsxs("span",{children:[a.jsx("b",{children:i("Authorized target")}),a.jsx("small",{children:i("I own this target or have permission to run a load test.")})]})]}),a.jsx("button",{type:"button",className:"btn btn-primary load-run-button",disabled:w||!y||!l.trim(),onClick:()=>{L()},children:w?a.jsxs(a.Fragment,{children:[a.jsx("i",{})," ",i("Running")," ",T," ",i("requests…")]}):a.jsx(a.Fragment,{children:i("▶ Start Load Test")})})]})]}),a.jsxs("aside",{className:"load-safety-card",children:[a.jsx("p",{className:"eyebrow",children:i("Safe limits")}),a.jsx("h3",{children:i("Controlled traffic")}),a.jsxs("ul",{children:[a.jsxs("li",{children:[a.jsx("b",{children:"20"}),a.jsx("span",{children:i("Maximum virtual users")})]}),a.jsxs("li",{children:[a.jsx("b",{children:"2,000"}),a.jsx("span",{children:i("Maximum total requests")})]}),a.jsxs("li",{children:[a.jsx("b",{children:"15s"}),a.jsx("span",{children:i("Timeout per request")})]})]}),a.jsx("p",{children:i("Only HTTP GET is sent. LazyScout does not submit forms, log in, or modify target data.")})]})]}),O&&a.jsx("p",{className:"load-error",children:O}),w&&a.jsxs("section",{className:"load-running",children:[a.jsx("i",{}),a.jsxs("div",{children:[a.jsx("b",{children:i("Load test is running")}),a.jsx("span",{children:i("Waiting for all virtual users to complete their request budget…")})]})]}),E&&a.jsxs("section",{className:"load-results",children:[a.jsxs("div",{className:"load-results-head",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:i("Run report")}),a.jsx("h3",{children:i("HTTP Request Results")})]}),a.jsx("span",{className:E.failed?"has-failures":"all-passed",children:E.failed?`${E.failed} failed`:i("All requests passed")})]}),a.jsxs("div",{className:"load-kpis",children:[a.jsx(ji,{label:i("Total"),value:String(E.total)}),a.jsx(ji,{label:i("Passed"),value:String(E.passed),tone:"pass"}),a.jsx(ji,{label:i("Failed"),value:String(E.failed),tone:"fail"}),a.jsx(ji,{label:i("Average"),value:`${E.averageMs} ms`}),a.jsx(ji,{label:i("Min / Max"),value:`${E.minMs} / ${E.maxMs} ms`}),a.jsx(ji,{label:i("Requests/sec"),value:String(E.requestsPerSecond)})]}),a.jsx("div",{className:"load-table-wrap",children:a.jsxs("table",{className:"load-request-table",children:[a.jsx("thead",{children:a.jsxs("tr",{children:[a.jsx("th",{children:"#"}),a.jsx("th",{children:i("User")}),a.jsx("th",{children:i("Method")}),a.jsx("th",{children:i("Request URL")}),a.jsx("th",{children:"HTTP"}),a.jsx("th",{children:i("Time")}),a.jsx("th",{children:i("Size")}),a.jsx("th",{children:i("Result")})]})}),a.jsx("tbody",{children:E.requests.map(D=>a.jsxs("tr",{children:[a.jsx("td",{children:D.id}),a.jsxs("td",{children:["VU-",D.virtualUser,a.jsxs("small",{children:[i("Run")," ",D.iteration]})]}),a.jsx("td",{children:a.jsx("span",{className:"load-method",children:D.method})}),a.jsxs("td",{children:[a.jsx("span",{className:"load-request-url",title:D.finalUrl??D.url,children:D.finalUrl??D.url}),D.error&&a.jsx("small",{className:"load-request-error",children:D.error})]}),a.jsx("td",{children:D.statusCode?a.jsxs(a.Fragment,{children:[a.jsx("b",{children:D.statusCode}),a.jsx("small",{children:D.statusText})]}):"—"}),a.jsxs("td",{children:[D.durationMs," ",i("ms")]}),a.jsx("td",{children:ZC(D.responseBytes)}),a.jsx("td",{children:a.jsx("span",{className:`load-result-badge ${D.passed?"passed":"failed"}`,children:D.passed?i("PASS"):i("FAIL")})})]},D.id))})]})})]})]})}function ji({label:n,value:i,tone:l=""}){return a.jsxs("div",{className:l,children:[a.jsx("span",{children:n}),a.jsx("b",{children:i})]})}function ZC(n){return n?n<1024?`${n} B`:`${(n/1024).toFixed(1)} KB`:"—"}function KC({message:n,detail:i,onClose:l}){const{ui:o}=Le();return a.jsxs("div",{className:"scout-notice",role:"alert",children:[a.jsx("div",{className:"scout-notice-icon",children:"!"}),a.jsxs("div",{children:[a.jsx("b",{children:n}),a.jsx("p",{children:i})]}),a.jsx("button",{type:"button",onClick:l,"aria-label":o("Dismiss notice"),children:"×"})]})}function QC(){const[n,i]=z.useState({status:"idle",result:null,error:null});async function l(c,d,f,p="en",g=!1,m=750,y=[],v,w,b,E,_=!1){i({status:"loading",result:null,error:null});try{const O=await h0({url:c,maxPages:d,maxDepth:f,language:p,includeApiChecks:g,waitAfterNavigationMs:m,blockedKeywords:y,projectId:v,startPath:w,scopePath:b,mode:E,debug:_});return i({status:"success",result:O,error:null}),O}catch(O){const S=O instanceof sa?O:new sa("unknown","An unexpected error occurred.");return i({status:"error",result:null,error:S}),null}}function o(){i({status:"idle",result:null,error:null})}return{...n,analyze:l,reset:o}}const Uo={enabled:!0,keywords:Ty},Fy=n=>`lazyscout-click-filter:${n}`;function JC(n){try{const i=localStorage.getItem(Fy(n));if(!i)return Uo;const l=JSON.parse(i);return{enabled:l.enabled===!0,keywords:Ey(l.keywords)}}catch{return Uo}}function WC(n){const[i,l]=z.useState(Uo);z.useEffect(()=>{l(n?JC(n):Uo)},[n]);const o=z.useCallback(d=>{const f={enabled:d.enabled,keywords:Ey(d.keywords)};l(f),n&&localStorage.setItem(Fy(n),JSON.stringify(f))},[n]),c=i.enabled?i.keywords:[];return{filter:i,blockedKeywords:c,save:o}}function e_(n){const[i,l]=z.useState([]),[o,c]=z.useState([]);z.useEffect(()=>{l(n??[]),c([])},[n]);function d(E,_){l(O=>O.map(S=>S.id===E?_:S)),c(O=>O.map(S=>S===E?_.id:S))}function f(E){l(_=>_.filter(O=>O.id!==E)),c(_=>_.filter(O=>O!==E))}function p(){l(E=>E.filter(_=>!o.includes(_.id))),c([])}function g(E,_){E!==_&&l(O=>{const S=O.findIndex(M=>M.id===E),T=O.findIndex(M=>M.id===_);if(S<0||T<0)return O;const L=[...O],[D]=L.splice(S,1);return L.splice(T,0,D),L})}function m(E){const _=new Set(i.map(S=>S.id));let O=i.filter(S=>S.module==="MANUAL").length+1;for(;_.has(Jd("MANUAL",O));)O++;return b1("MANUAL",Jd("MANUAL",O),E)}function y(E){return l(_=>[E,..._]),E}function v(E){l(_=>[...E,..._])}function w(E){c(_=>_.includes(E)?_.filter(O=>O!==E):[..._,E])}function b(E){c(E)}return{testCases:i,selectedIds:o,updateTestCase:d,deleteTestCase:f,deleteSelected:p,reorderTestCases:g,createTestCaseDraft:m,addTestCase:y,addImportedTestCases:v,toggleSelected:w,setSelection:b}}function t_(n){const[i,l]=z.useState([]);z.useEffect(()=>{l(n??[])},[n]);function o(f,p){l(g=>g.map(m=>m.id===f?p:m))}function c(f){l(p=>p.filter(g=>g.id!==f))}function d(f){const p=new Set(i.map(m=>m.id));let g=i.filter(m=>m.module==="MANUAL").length+1;for(;p.has(Wd("MANUAL",g));)g++;l(m=>[y1("MANUAL",Wd("MANUAL",g),f),...m])}return{testData:i,updateRow:o,deleteRow:c,addRow:d}}const zo="lazyscout.projects.v1";function n_(){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 tf(){try{return JSON.parse(localStorage.getItem(zo)??"[]")}catch{return[]}}function a_(n){const i=tf().filter(l=>l.id!==n);i.length?localStorage.setItem(zo,JSON.stringify(i)):localStorage.removeItem(zo)}function r_(){const[n,i]=z.useState([]),[l,o]=z.useState(),[c,d]=z.useState("~/LazyScout"),[f,p]=z.useState(),[g,m]=z.useState(!0),y=z.useRef(new Set),v=z.useRef(new Map),w=z.useRef(new Map);z.useEffect(()=>{(async()=>{try{const I=await sg();d(I.root);const $=tf(),ee=$.filter(B=>!I.projects.some(Q=>Q.id===B.id));for(const B of ee)await Qu(B);$.length&&localStorage.removeItem(zo),i([...ee,...I.projects])}catch(I){i(tf()),p(I instanceof Error?I.message:String(I))}finally{m(!1)}})()},[]);function b(I){if(y.current.has(I.id))return Promise.resolve();const ee=(v.current.get(I.id)??Promise.resolve()).catch(()=>{}).then(()=>Qu(I)).then(()=>{const B=w.current.get(I.id);w.current.delete(I.id),B&&![...w.current.values()].includes(B)&&p(Q=>Q===B?"":Q)}).catch(B=>{const Q=B instanceof Error?B.message:String(B);w.current.set(I.id,Q),p(Q)});return v.current.set(I.id,ee),ee.finally(()=>{v.current.get(I.id)===ee&&v.current.delete(I.id)}),ee}async function E(I){let $=v.current.get(I);for(;$;)await $,$=v.current.get(I);const ee=w.current.get(I);if(ee)throw new Error(ee)}function _(I,$,ee,B,Q){const j=new Date().toISOString(),F=`project-${i_(I)}`,X=B??F,Y=n.find(R=>R.id===X),Z={id:X,name:ee??Y?.name??new URL(I).hostname,targetUrl:I,createdAt:Y?.createdAt??j,updatedAt:j,mode:Y?.mode,testCaseLanguage:Q??Y?.testCaseLanguage??"en",result:$};return y.current.delete(X),i(R=>Y?R.map(q=>q.id===X?Z:q):[Z,...R]),b(Z),o(X),X}function O(I="Untitled Test Suite",$="empty",ee=n_(),B=""){const Q=new Date().toISOString(),j=`project-${crypto.randomUUID()}`,F={id:j,name:I.trim()||"Untitled Test Suite",targetUrl:B,createdAt:Q,updatedAt:Q,mode:$,result:ee};return y.current.delete(j),i(X=>[F,...X]),b(F),o(j),j}async function S(I){const $=n.findIndex(Q=>Q.id===I),ee=n[$];if(!ee)return;const B=n.filter(Q=>Q.id!==I);y.current.add(I),i(B),l===I&&o(B[0]?.id);try{await(v.current.get(I)??Promise.resolve()),await y0(I),w.current.delete(I),a_(I)}catch(Q){y.current.delete(I),i(j=>{if(j.some(X=>X.id===I))return j;const F=Math.min($,j.length);return[...j.slice(0,F),ee,...j.slice(F)]}),l===I&&o(I),p(Q instanceof Error?Q.message:String(Q))}}function T(I){y.current.delete(I.id),i($=>$.some(ee=>ee.id===I.id)?$:[I,...$]),b(I),o(I.id)}function L(I,$){const ee=$.trim(),B=n.find(j=>j.id===I);if(!ee||!B)return;const Q={...B,name:ee,updatedAt:new Date().toISOString()};i(j=>j.map(F=>F.id===I?Q:F)),b(Q)}function D(I,$,ee=!1){const B=n.find(F=>F.id===I);if(!B)return;const Q={...B,result:$,updatedAt:new Date().toISOString()},j=()=>i(F=>F.map(X=>X.id===I?{...X,result:$,updatedAt:Q.updatedAt}:X));if(b(Q),ee)return E(I).then(j);j()}function M(I,$){const ee=n.find(Q=>Q.id===I);if(!ee)return;const B={...ee,testCaseLanguage:$,updatedAt:new Date().toISOString()};i(Q=>Q.map(j=>j.id===I?B:j)),b(B)}function V(){L0().catch(I=>p(I instanceof Error?I.message:String(I)))}async function K(I){await v.current.get(I);const $=(await sg()).projects.find(ee=>ee.id===I);!$||y.current.has(I)||i(ee=>ee.map(B=>B.id===I?$:B))}async function ae(I,$){const ee=n.find(j=>j.id===I);if(!ee||ee.targetUrl)throw new Error("This project already has a target.");let B;try{B=new URL($.trim())}catch{throw new Error("Enter a full website URL.")}if(!["http:","https:"].includes(B.protocol)||B.username||B.password)throw new Error("Use an HTTP or HTTPS URL without credentials.");const Q={...ee,targetUrl:B.toString(),updatedAt:new Date().toISOString()};await v.current.get(I),await Qu(Q),i(j=>j.map(F=>F.id===I?Q:F))}return{projects:n,activeProjectId:l,setActiveProjectId:o,saveProject:_,createEmptyProject:O,deleteProject:S,restoreProject:T,renameProject:L,updateProjectResult:D,updateProjectTestCaseLanguage:M,reloadProject:K,waitForProjectSave:E,setProjectTargetUrl:ae,workspaceRoot:c,workspaceError:f,loading:g,openWorkspace:V}}function i_(n){const i=new TextEncoder().encode(n),l=Array.from(i,o=>String.fromCharCode(o)).join("");return btoa(l).replace(/[^a-z0-9]/gi,"").slice(0,32).toLowerCase()}function s_(n){const[i,l]=z.useState({}),o=n?i[n]??{}:{};function c(f){n&&l(p=>({...p,[n]:f}))}function d(){n&&l(f=>{const p={...f};return delete p[n],p})}return{secrets:o,saveSecrets:c,clearSecrets:d,hasSecrets:Object.values(o).some(Boolean)}}function l_(n){const[i,l]=z.useState([]);z.useEffect(()=>{l([]),n&&(async()=>{const d=await I0(n),f=`lazyscout.bug-reports.${n}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const g=p.filter(m=>!d.some(y=>y.id===m.id));for(const m of g)await ug(n,m);p.length&&localStorage.removeItem(f),l([...g,...d])})().catch(()=>l([]))},[n]);function o(d){l(f=>f.some(p=>p.id===d.id)?f.map(p=>p.id===d.id?d:p):[d,...f]),n&&ug(n,d)}function c(d){l(f=>f.filter(p=>p.id!==d)),n&&$0(n,d)}return{reports:i,save:o,remove:c}}function o_(n){const[i,l]=z.useState([]);z.useEffect(()=>{l([]),n&&(async()=>{const d=await U0(n),f=`lazyscout.screenshots.${n}`;let p=[];try{p=JSON.parse(localStorage.getItem(f)??"[]")}catch{}const g=[];for(const m of p)d.some(y=>y.name===m.name)||g.push(await cg(n,m));p.length&&localStorage.removeItem(f),l([...g,...d])})().catch(()=>l([]))},[n]);function o(d){n&&cg(n,d).then(f=>l(p=>[f,...p.filter(g=>g.name!==f.name)].slice(0,50)))}function c(d){l(f=>f.filter(p=>p.name!==d)),n&&z0(n,d)}return{screenshots:i,add:o,remove:c}}function c_(n){const[i,l]=z.useState([]),[o,c]=z.useState();z.useEffect(()=>{if(!n){l([]);return}N0(n).then(l).catch(f=>c(f instanceof Error?f.message:String(f)))},[n]);async function d(f){l(f);try{await C0(n,f),c(void 0)}catch(p){c(p instanceof Error?p.message:String(p))}}return{flows:i,update:d,error:o}}function u_(n,i){const l=i.search.trim().toLowerCase();return n.filter(o=>i.module!=="all"&&!(o.folder??o.module).toLowerCase().includes(i.module.toLowerCase())||i.type!=="all"&&o.type!==i.type||i.priority!=="all"&&o.priority!==i.priority?!1:l?[o.id,o.module,o.folder??"",...o.tags??[],...o.requirements??[],o.title,o.expectedResult,o.sourceUrl,v1(o.steps)].join(" ").toLowerCase().includes(l):!0)}function Dv(n){return[...new Set(n.map(i=>i.folder??i.module))].sort()}function d_(n,i,l){const o=i.trim().toLowerCase();return n.filter(c=>l!=="all"&&c.module!==l?!1:o?[c.id,c.module,c.field,c.inputType,c.validValue,c.invalidValue,c.note??""].join(" ").toLowerCase().includes(o):!0)}const f_={search:"",module:"all",type:"all",priority:"all"},Bd="lazyscout-active-project-id",Lv=["Launching Playwright runner","Opening target URL","Collecting pages and controls"];function h_(){const{ui:n,language:i}=Le(),l=i==="th",{status:o,result:c,error:d,analyze:f,reset:p}=QC(),{projects:g,activeProjectId:m,setActiveProjectId:y,saveProject:v,createEmptyProject:w,deleteProject:b,restoreProject:E,renameProject:_,updateProjectResult:O,updateProjectTestCaseLanguage:S,reloadProject:T,waitForProjectSave:L,setProjectTargetUrl:D,workspaceRoot:M,workspaceError:V,loading:K,openWorkspace:ae}=r_(),I=g.find(ve=>ve.id===m),{secrets:$,saveSecrets:ee,clearSecrets:B}=s_(m),{filter:Q,blockedKeywords:j,save:F}=WC(m),Y=I?.result??c,{testCases:Z,selectedIds:R,updateTestCase:q,deleteTestCase:x,deleteSelected:C,reorderTestCases:H,createTestCaseDraft:G,addImportedTestCases:te,addTestCase:pe,toggleSelected:Ne,setSelection:we}=e_(Y?.testCases),{testData:se,updateRow:_e,deleteRow:Ce,addRow:qe}=t_(Y?.testData),{reports:Ie,save:A,remove:ge}=l_(m),{screenshots:ue,add:P,remove:k}=o_(m),{flows:J,update:he}=c_(m),fe=Y??(I?Yy(I.targetUrl):void 0),[ne,je]=z.useState("testcases"),[Te,Se]=z.useState(0),[Ee,Ke]=z.useState(f_),[Me,kt]=z.useState(""),[Bt,Tt]=z.useState("all"),[Wt,Ze]=z.useState(),[lt,it]=z.useState(),[Oe,pt]=z.useState(null),[jt,Fe]=z.useState(!1),[ot,Je]=z.useState(),[Ye,Ge]=z.useState(()=>window.location.hash==="#documents"?"documents":"overview");z.useEffect(()=>{const ve=new URL(window.location.href);if(Ye==="documents")ve.hash="documents";else if(ve.hash==="#documents")ve.hash="";else return;ve.href!==window.location.href&&window.history.replaceState(window.history.state,"",ve)},[Ye]);const[Et,Qe]=z.useState({}),Pe=Ye==="map"||Ye==="queue",sn=z.useMemo(()=>{if(Ye!=="queue")return Z;const ve=new Map(Z.map(ke=>[ke.id,ke]));return(Et[m??""]??[]).flatMap(ke=>ve.get(ke)??[])},[Z,Ye,Et,m]),[la,st]=z.useState(!1),[ze,$e]=z.useState({}),[ga,ln]=z.useState({}),[It,Rt]=z.useState(!1),[La,on]=z.useState("credentials"),[Kt,At]=z.useState(!1),[Ft,fn]=z.useState(!1),[Ua,Qt]=z.useState(!1),[Cn,_n]=z.useState(!1),[vn,hn]=z.useState(),[Yt,Tn]=z.useState(),[En,ct]=z.useState(),[wt,Br]=z.useState(()=>localStorage.getItem("lazyscout-sidebar-collapsed")==="true");function Ir(){Br(ve=>(localStorage.setItem("lazyscout-sidebar-collapsed",String(!ve)),!ve))}function An(ve,ke){ct({message:ve,restore:ke})}function oa(ve){const ke=Z.find(ut=>ut.id===ve);ke&&(x(ve),An(ut=>ut?`ลบ ${ke.id} แล้ว`:`Deleted ${ke.id}`,()=>te([ke])))}function Ai(){const ve=Z.filter(ke=>R.includes(ke.id));ve.length&&(C(),An(ke=>ke?`ลบแล้ว ${ve.length} เคส`:`Deleted ${ve.length} Test Cases`,()=>te(ve)))}z.useEffect(()=>{if(!En)return;const ve=window.setTimeout(()=>ct(void 0),8e3);return()=>window.clearTimeout(ve)},[En]);function On(ve){Cn||(_n(!0),window.setTimeout(()=>{ve(),_n(!1)},700))}const za=z.useMemo(()=>u_(Z,Ee),[Z,Ee]),mr=z.useMemo(()=>d_(se,Me,Bt),[se,Me,Bt]),Ma=z.useMemo(()=>Dv(Z),[Z]),Ba=z.useMemo(()=>Dv(se),[se]),kn=Z.find(ve=>ve.id===Wt);function ie(ve,ke,ut){const xt=Z.find(Lt=>Lt.id===ve);if(!xt)return;const en={...xt};if(ke==="preconditions"||ke==="tags"?en[ke]=ut.split(/\n|,/).map(Lt=>Lt.trim()).filter(Boolean):ke==="steps"?en.steps=ut.split(`
|
|
65
|
+
`).map(Lt=>Lt.trim()).filter(Boolean).map(Lt=>{try{return JSON.parse(Lt)}catch{return{type:"manual",description:Lt}}}):en[ke]=ut,q(ve,en),m&&Y){const Lt=Z.map(Rn=>Rn.id===ve?en:Rn);O(m,{...Y,testCases:Lt,testData:se})}}z.useEffect(()=>{if(!m||!Y||!I?.result)return;const ve=window.setTimeout(()=>{const ke=I.result;JSON.stringify(ke.testCases)===JSON.stringify(Z)&&JSON.stringify(ke.testData)===JSON.stringify(se)||O(m,{...Y,testCases:Z,testData:se})},150);return()=>window.clearTimeout(ve)},[m,I?.result,Y,Z,se]),z.useEffect(()=>{if(K)return;if(g.length===0){localStorage.removeItem(Bd),Qt(!0);return}if(m&&g.some(ut=>ut.id===m))return;const ve=localStorage.getItem(Bd),ke=g.find(ut=>ut.id===ve)??g[0];y(ke.id)},[m,g,K,y]),z.useEffect(()=>{!K&&m&&localStorage.setItem(Bd,m)},[m,K]),z.useEffect(()=>{if(o!=="loading")return;const ve=document.body.style.overflow,ke=document.documentElement.style.overflow;return document.body.style.overflow="hidden",document.documentElement.style.overflow="hidden",()=>{document.body.style.overflow=ve,document.documentElement.style.overflow=ke}},[o]),z.useEffect(()=>{if(o!=="loading"){Se(0);return}const ve=window.setInterval(()=>{Se(ke=>(ke+1)%Lv.length)},1800);return()=>window.clearInterval(ve)},[o]);async function Ae(ve,ke,ut,xt,en,Lt,Rn,Po,Ks,Qs){const Jn=await f(ve,ke,ut,xt,en,Lt,j,m,Rn,Po,Ks,Qs);if(Jn){v(ve,Jn,void 0,m,xt);const ki=Jn.pages.reduce(($r,pn)=>$r+pn.links.length+pn.buttons.length+pn.inputs.length+pn.textareas.length+pn.selects.length+(pn.state?.interactions.length??0),0);if(Jn.testCases.length===0||ki===0){const $r=Jn.issues.map(pn=>pn.code).filter((pn,Wn,Ri)=>Ri.indexOf(pn)===Wn);hn({message:"Scout finished, but no usable Test Cases were created.",detail:`Visited ${Jn.pages.length} page${Jn.pages.length===1?"":"s"} and found ${ki} testable control${ki===1?"":"s"}.${$r.length?` Explorer reported: ${$r.join(", ")}.`:" The site may show a bot challenge, render content after a delay, or expose no detectable controls. Check Scout Log for details."}`})}else hn(void 0)}}async function Xt(){const ve=ne==="testcases"?za:[],ke=ne==="testdata"?mr:[];if(ve.length===0&&ke.length===0){Je("No data is available for export.");return}Fe(!0),Je(void 0);try{await g0(ve,ke)}catch(ut){Je(ut instanceof sa?ut.message:"Could not export CSV.")}finally{Fe(!1)}}async function Dt(ve){Fe(!0),Je(void 0);try{await L(ve),await aS(ve)}catch(ke){Je(ke instanceof Error?ke.message:"Could not export Excel.")}finally{Fe(!1)}}async function Oi(ve){if(!m||!Y){te(ve);return}await O(m,{...Y,testCases:[...ve,...Z],testData:se},!0)}function gr(ve=Y?.startUrl??""){const ke=G(ve);pt(ke),Ze(ke.id)}function $o(ve,ke,ut){const xt=pe({...G(ut),title:ke,steps:ve,expectedResult:"The recorded flow completes without an error.",automationStatus:"needs-review"});Rt(!1),je("testcases"),Ze(xt.id)}function yn(ve){const ke=I?.targetUrl||Y?.startUrl||"http://localhost:5173",ut=J[0],xt=ut??{id:crypto.randomUUID(),name:"Explorer Guided Flow",description:"Steps added from Auto Scout Explorer.",baseUrl:ke,steps:[{id:crypto.randomUUID(),type:"navigate",path:new URL(ke).pathname||"/"}],createdAt:new Date().toISOString(),updatedAt:new Date().toISOString()};he(ut?J.map(en=>en.id===ut.id?{...en,steps:[...en.steps,ve],updatedAt:new Date().toISOString()}:en):[{...xt,steps:[...xt.steps,ve]}])}return a.jsxs("div",{className:"app-frame","data-view":Ye,children:[a.jsx(w2,{projects:g,activeProjectId:m,result:Y,collapsed:o==="loading"?!1:wt,onToggleCollapsed:()=>{o!=="loading"&&Ir()},onSelect:ve=>On(()=>{y(ve),$e({}),ln({}),Ge(ke=>ke==="documents"?ke:"overview"),Ze(void 0)}),onNew:()=>Qt(!0),onDelete:ve=>Tn(g.find(ke=>ke.id===ve)),onRename:_,onSettings:()=>{on("credentials"),Rt(!0)},workspaceRoot:M,onOpenWorkspace:ae}),a.jsxs("div",{className:"app-main",children:[a.jsxs("header",{className:"app-header",children:[a.jsxs("div",{children:[a.jsxs("div",{className:"brand-mark",children:[a.jsx("span",{children:"LS"}),a.jsx("h1",{children:"LazyScout"}),a.jsxs("a",{className:"guide-link",href:"/guide/index.html",target:"_blank",rel:"noreferrer","aria-label":n("Open LazyScout Guide"),title:n("Open LazyScout Guide"),children:[a.jsx("svg",{viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:a.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"})}),a.jsx("span",{children:n("Guide")})]})]}),a.jsxs("p",{children:[n("QA workspace")," ",a.jsx("span",{children:"/"})," ",n("Website UI State Explorer")]})]}),I&&!Y&&a.jsx(Wg,{view:Ye,onChange:ve=>ve==="explorer"?st(!0):Ge(ve),counts:{cases:Z.length,states:0}}),Y&&a.jsxs("div",{className:"header-status",children:[a.jsx("span",{className:"status-dot status-pass"})," ",n("Explorer ready")," ",a.jsx("span",{className:"header-divider"})," ",a.jsx("span",{children:Y.origin})]})]}),a.jsxs("div",{className:"space-y-4",children:[Ye!=="qa"&&I&&(I.targetUrl||I.mode==="scout")&&a.jsx(c0,{hidden:Pe||Ye==="documents",initialUrl:I?.targetUrl,hasExistingData:!!I?.result?.testCases?.length,initialLanguage:I.testCaseLanguage,loading:o==="loading",onLanguageChange:ve=>m&&S(m,ve),onAnalyze:Ae,onOpenAiScout:()=>Ge("qa")},m??"new-project"),o==="loading"&&a.jsx("div",{className:"card p-6 text-center text-sm text-slate-600",children:n("Playwright is opening the website and collecting page data… This can take a few moments.")}),d&&a.jsx(ld,{message:d.message,hint:d.hint}),V&&a.jsx(ld,{message:V,hint:n("Check that the LazyScout workspace is writable.")}),ot&&a.jsx(ld,{message:ot}),vn&&a.jsx(KC,{...vn,onClose:()=>hn(void 0)}),Y&&a.jsx(Wg,{view:Ye,onChange:ve=>ve==="explorer"?st(!0):Ge(ve),counts:{cases:Z.length,states:Y.actionGraph.states.length}}),Ye==="documents"&&I&&a.jsx(d1,{projectId:I.id,projectName:I.name},I.id),Ye==="map"&&I&&a.jsx(f0,{projectId:I.id,projectName:I.name,target:I.targetUrl,result:I.result,cases:Z,queue:Et[I.id]??[],onQueue:ve=>Qe(ke=>({...ke,[I.id]:ve})),onReview:()=>Ge("queue"),onCase:it,onWrite:gr,onScout:()=>{if(!I.targetUrl&&I.mode!=="scout"){Ge("qa");return}Ge("overview"),requestAnimationFrame(()=>{const ve=document.querySelector(".project-scout-card, .new-project-card");ve?.scrollIntoView({block:"start"}),ve?.querySelector("#target-url")?.focus({preventScroll:!0})})}},I.id),Ye==="queue"&&I&&a.jsxs("div",{className:"queue-return",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Ge("map"),children:l?"กลับไปคิวทดสอบ":"Back to run queue"}),a.jsxs("b",{children:[l?"เคสในคิว":"Queued cases"," · ",sn.length]})]}),Ye==="qa"&&I&&a.jsx(j2,{projectId:I.id,targetUrl:I.targetUrl,onComplete:T,onSetTarget:D,onOpenSessionSettings:()=>{on("session"),Rt(!0)}},I.id),Y&&Ye!=="qa"&&Ye!=="map"&&Ye!=="documents"&&a.jsx(a.Fragment,{children:Ye==="scoutlog"?a.jsx(p2,{result:Y}):Ye==="loadtest"?a.jsx(XC,{defaultUrl:I?.targetUrl||Y.startUrl}):Ye==="automation"||Ye==="queue"?a.jsx(h2,{testCases:sn,projectId:m,secrets:$,blockedKeywords:j,onRunStatus:(ve,ke)=>{$e(xt=>({...xt,[ve]:ke}));const ut=Z.find(xt=>xt.id===ve);ut&&q(ve,{...ut,status:ke})},onRunResult:(ve,ke)=>{ln(xt=>({...xt,[ve]:{...ke,finishedAt:new Date().toISOString()}}));const ut=ke.screenshots?.length?ke.screenshots:ke.screenshot?[ke.screenshot]:[];if(ut.forEach(P),ke.status==="failed"&&m){const xt=Z.find(Lt=>Lt.id===ve),en={id:`bug-${crypto.randomUUID()}`,title:`Automation failed: ${xt?.title??ve}`,severity:"high",status:"open",testCaseId:ve,actualResult:"The Playwright automation step failed. Open Automation Run Log for details.",expectedResult:xt?.expectedResult??"The Test Case should complete successfully.",stepsToReproduce:xt?.steps.map((Lt,Rn)=>`${Rn+1}. ${Lt.type}`).join(`
|
|
66
|
+
`)??"",attachments:ut.map(Lt=>({name:Lt.name,type:"image/png",dataUrl:Lt.dataUrl})),createdAt:new Date().toISOString()};A(en)}}},`${m}-${Ye}`):Ye==="overview"?a.jsxs(a.Fragment,{children:[a.jsx(B2,{pages:Y.pages.length,testCases:Z.length,recordedCases:Z.filter(ve=>ve.module==="MANUAL").length,completedRuns:Z.filter(ve=>ve.status==="passed"||ve.status==="failed").length,onScout:()=>{const ve=document.getElementById("target-url");ve?(window.scrollTo({top:0,behavior:"smooth"}),window.setTimeout(()=>ve.focus(),250)):Qt(!0)},onReview:()=>Ge("testcases"),onRecord:()=>{on("recorder"),Rt(!0)},onRun:()=>Ge("automation"),onExport:()=>{Xt()}}),a.jsx(A2,{result:Y,testCases:Z,executionStatuses:ze,runResults:ga,projectId:m})]}):a.jsxs("div",{className:"workspace-shell",children:[a.jsx(f1,{result:Y,activeUrl:kn?.sourceUrl,onSelect:ve=>Ze(Z.find(ke=>ke.sourceUrl===ve)?.id)}),a.jsxs("main",{className:"workspace-center",children:[a.jsxs("div",{className:"workspace-center-head",children:[a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:n("Current Workspace")}),a.jsx("h2",{children:n(ne==="testcases"?"Test Case Review":"Test Data")})]}),a.jsxs("div",{className:"center-chips",children:[a.jsxs("span",{className:"status-badge status-badge-pass",children:[Z.filter(ve=>ve.automationStatus==="ready").length," ",n("ready")]}),a.jsxs("span",{className:"status-badge status-badge-warn",children:[Z.filter(ve=>ve.automationStatus==="needs-review").length," ",n("review")]})]})]}),a.jsx("div",{className:"grid gap-4",children:a.jsxs("div",{className:"card",children:[a.jsxs("div",{className:"flex gap-1 border-b border-slate-200 px-4 pt-3",children:[a.jsxs("button",{type:"button",onClick:()=>je("testcases"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ne==="testcases"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[n("Test Cases ("),Z.length,")"]}),a.jsxs("button",{type:"button",onClick:()=>je("testdata"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ne==="testdata"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[n("Test Data ("),se.length,")"]}),a.jsxs("button",{type:"button",onClick:()=>je("apichecks"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ne==="apichecks"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[n("Test API ("),Y.apiChecks?.length??0,")"]}),a.jsxs("button",{type:"button",onClick:()=>je("bugreports"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ne==="bugreports"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[n("Bug Reports ("),Ie.length,")"]}),a.jsxs("button",{type:"button",onClick:()=>je("screenshots"),className:`rounded-t-md border border-b-0 px-4 py-2 text-sm font-medium ${ne==="screenshots"?"border-slate-200 bg-white text-slate-900":"border-transparent text-slate-500 hover:text-slate-800"}`,children:[n("Screenshots ("),ue.length,")"]})]}),ne==="screenshots"?a.jsx(YC,{screenshots:ue,onDelete:k}):ne==="bugreports"?a.jsx(HC,{reports:Ie,testCases:Z,onSave:A,onDelete:ge}):ne==="apichecks"?a.jsx(m2,{checks:Y.apiChecks??[],secrets:$}):ne==="testcases"?a.jsxs(a.Fragment,{children:[a.jsx(O1,{testCases:Z}),a.jsx(A1,{filters:Ee,modules:Ma,totalCount:Z.length,visibleCount:za.length,selectedCount:R.length,exporting:jt,onFiltersChange:Ke,onAdd:()=>gr(),onImport:()=>fn(!0),onImportScreenshot:()=>At(!0),onRecord:()=>{on("recorder"),Rt(!0)},onDeleteSelected:Ai,onExport:Xt,onExportExcel:I&&Z.length?()=>{Dt(I.id)}:void 0}),a.jsx(E1,{testCases:za,selectedIds:R,activeId:Wt,onToggleSelect:Ne,onToggleAll:we,onOpen:ve=>{Ze(ve.id),it(ve.id)},onEdit:pt,onDelete:oa,onReorder:H,onUpdateCell:ie,executionStatuses:ze})]}):a.jsxs(a.Fragment,{children:[a.jsx(R1,{search:Me,module:Bt,modules:Ba,totalCount:se.length,visibleCount:mr.length,exporting:jt,onSearchChange:kt,onModuleChange:Tt,onAdd:()=>qe(Y.startUrl),onExport:Xt}),a.jsx(k1,{rows:mr,onUpdate:_e,onDelete:Ce})]})]})})]})]})})]}),Oe&&a.jsx(T1,{testCase:Oe,onCancel:()=>pt(null),onSave:ve=>{Z.some(ke=>ke.id===Oe.id)?q(Oe.id,ve):pe(ve),Ze(ve.id),pt(null)}}),la&&fe&&a.jsx(eC,{result:fe,testCaseCount:Z.length,flows:J,baseUrl:I?.targetUrl||fe.startUrl,projectId:m,secrets:$,onSaveFlows:he,onGenerateTestCase:ve=>{pe(ve),st(!1),Ge("testcases")},onAddToFlow:yn,onClose:()=>st(!1),onOpenCases:()=>{st(!1),Ge("testcases")}}),lt&&!Oe&&(Ye==="map"||ne==="testcases")&&Z.find(ve=>ve.id===lt)&&a.jsx(_1,{testCase:Z.find(ve=>ve.id===lt),onEdit:()=>pt(Z.find(ve=>ve.id===lt)),onClose:()=>it(void 0)}),It&&I&&a.jsx(oC,{projectName:I.name,projectId:I.id,targetUrl:I.targetUrl,secrets:$,onSave:ee,onClear:B,onClose:()=>Rt(!1),onSaveRecording:$o,clickFilter:Q,onChangeClickFilter:F,initialTab:La}),Yt&&a.jsx("div",{className:"modern-modal-backdrop",role:"presentation",children:a.jsxs("section",{className:"modern-modal confirm-delete-modal",role:"dialog","aria-modal":"true",children:[a.jsx("header",{className:"modal-header",children:a.jsxs("div",{children:[a.jsx("p",{className:"eyebrow",children:n("Delete project")}),a.jsxs("h2",{children:[n("Remove “"),Yt.name,"”?"]}),a.jsx("p",{children:n("The project will be removed from this local workspace. You can undo immediately afterward.")})]})}),a.jsxs("footer",{className:"modal-footer",children:[a.jsx("button",{type:"button",className:"btn btn-secondary",onClick:()=>Tn(void 0),children:n("Cancel")}),a.jsx("button",{type:"button",className:"btn btn-danger",onClick:()=>{const ve=Yt;Tn(void 0),b(ve.id).then(()=>An(ke=>ke?`ลบโปรเจกต์ ${ve.name} แล้ว`:`Deleted project ${ve.name}`,()=>E(ve)))},children:n("Delete project")})]})]})}),En&&a.jsxs("div",{className:"undo-toast",role:"status","aria-live":"polite",children:[a.jsx("span",{children:En.message(l)}),a.jsx("button",{type:"button",onClick:()=>{En.restore(),ct(void 0)},children:n("Undo")}),a.jsx("button",{type:"button","aria-label":n("Dismiss"),onClick:()=>ct(void 0),children:"×"})]}),Kt&&a.jsx(OC,{sourceUrl:Y?.startUrl??I?.targetUrl??"",initialLanguage:I?.testCaseLanguage,onLanguageChange:ve=>m&&S(m,ve),existingCases:Z,onImport:Oi,onClose:()=>At(!1)}),Ft&&a.jsx(kC,{sourceUrl:Y?.startUrl??I?.targetUrl??"",existingCases:Z,onImport:Oi,onClose:()=>fn(!1)}),Ua&&a.jsx(IC,{projects:g,onClose:()=>Qt(!1),onScout:ve=>On(()=>{w(ve,"scout"),p(),$e({}),ln({}),Ge("overview"),Qt(!1)}),onEmpty:ve=>On(()=>{w(ve,"empty"),p(),$e({}),ln({}),Ge("testcases"),Qt(!1)}),onSample:()=>On(()=>{w("Practice Login Demo","empty",p_(),"https://practicetestautomation.com/practice-test-login/"),p(),$e({}),ln({}),Ge("overview"),Qt(!1)}),onOpenProject:ve=>On(()=>{y(ve),p(),$e({}),ln({}),Ge("overview"),Qt(!1)})}),o==="loading"&&a.jsx("div",{className:"scout-lock",role:"status","aria-live":"polite",children:a.jsxs("div",{className:"scout-lock-card",children:[a.jsxs("div",{className:"scout-progress-head",children:[a.jsx("div",{className:"scout-progress-icon",children:"✦"}),a.jsxs("div",{children:[a.jsx("b",{children:n("Scouting website with Playwright")}),a.jsx("span",{children:n("Collecting pages, controls and event logs.")})]})]}),a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"scout-progress-track",children:a.jsx("i",{})}),a.jsx("strong",{className:"scout-progress-percent",children:n("Working…")}),a.jsxs("code",{className:"scout-cli-line",children:["$ ",n(Lv[Te]),"…"]})]}),a.jsx("span",{children:n("Please wait until Scout finishes.")})]})}),Cn&&a.jsx("div",{className:"navigation-loader",children:a.jsxs("div",{children:[a.jsx("span",{children:"LS"}),a.jsx("b",{children:n("Opening workspace")}),a.jsx("small",{children:n("Preparing your local QA tools…")})]})})]})]})}function Yy(n){const i=new URL(n);return{startUrl:n,origin:i.origin,pages:[],testCases:[],testData:[],issues:[],stats:{pagesVisited:0,urlsSkipped:0,durationMs:0,limitReached:"none"},actionGraph:{states:[],edges:[],visitedStateIds:[],visitedActionKeys:[],failedActionKeys:[],blockedActionKeys:[]},runEvents:[],apiChecks:[]}}function p_(){const n="https://practicetestautomation.com/practice-test-login/",i=Yy(n);return i.origin=new URL(n).origin,i.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}],i}i0.createRoot(document.getElementById("root")).render(a.jsx(z.StrictMode,{children:a.jsx(l0,{children:a.jsx(h_,{})})}));
|