1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,19643,60198,e=>{"use strict";var t=e.i(74822);let r=(0,t.default)("arrow-down",[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]);e.s(["ArrowDown",0,r],19643);let n=(0,t.default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",0,n],60198)},92804,e=>{e.v({classicItem:"ColorIndicator-module__yxIhba__classicItem",classicItems:"ColorIndicator-module__yxIhba__classicItems",container:"ColorIndicator-module__yxIhba__container",enhancedToggle:"ColorIndicator-module__yxIhba__enhancedToggle",icon:"ColorIndicator-module__yxIhba__icon",label:"ColorIndicator-module__yxIhba__label",laughItem:"ColorIndicator-module__yxIhba__laughItem",laughItems:"ColorIndicator-module__yxIhba__laughItems",wantedItems:"ColorIndicator-module__yxIhba__wantedItems"})},78708,e=>{"use strict";let t;var r=e.i(33030);let n="classic-enhanced-feedback",o="classic-feedback-change";function i(e){return window.addEventListener("storage",e),window.addEventListener(o,e),()=>{window.removeEventListener("storage",e),window.removeEventListener(o,e)}}function a(){if(void 0!==t)return t;try{return"true"===window.localStorage.getItem(n)}catch{return!1}}e.s(["useGameFeedback",0,function(){return{enhanced:(0,r.useSyncExternalStore)(i,a,()=>!1),setEnhanced:e=>{try{window.localStorage.setItem(n,String(e)),t=void 0}catch{t=e}window.dispatchEvent(new Event(o))}}}])},84253,e=>{"use strict";var t=e.i(33030),r=e.i(35410);function n(e){let[n,o]=t.useState(void 0);return(0,r.useLayoutEffect)(()=>{if(e){o({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{let r,n;if(!Array.isArray(t)||!t.length)return;let i=t[0];if("borderBoxSize"in i){let e=i.borderBoxSize,t=Array.isArray(e)?e[0]:e;r=t.inlineSize,n=t.blockSize}else r=e.offsetWidth,n=e.offsetHeight;o({width:r,height:n})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}o(void 0)},[e]),n}(0,Object.defineProperty)(n,"name",{value:"useSize",configurable:!0}),e.s(["useSize",0,n])},46798,e=>{"use strict";var t=e.i(69163),r=e.i(33030),n=e.i(43836),o=e.i(5439),i=e.i(61089),a=e.i(90811),s=e.i(89494);let l=["top","right","bottom","left"],c=Math.min,u=Math.max,d=Math.round,f=Math.floor,h=e=>({x:e,y:e}),p={left:"right",right:"left",bottom:"top",top:"bottom"},m={start:"end",end:"start"};function g(e,t){return"function"==typeof e?e(t):e}function y(e){return e.split("-")[0]}function v(e){return e.split("-")[1]}function b(e){return"x"===e?"y":"x"}function _(e){return"y"===e?"height":"width"}function x(e){return["top","bottom"].includes(y(e))?"y":"x"}function w(e){return e.replace(/start|end/g,e=>m[e])}function S(e){return e.replace(/left|right|bottom|top/g,e=>p[e])}function A(e){return"number"!=typeof e?{top:0,right:0,bottom:0,left:0,...e}:{top:e,right:e,bottom:e,left:e}}function C(e){let{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function E(e,t,r){let n,{reference:o,floating:i}=e,a=x(t),s=b(x(t)),l=_(s),c=y(t),u="y"===a,d=o.x+o.width/2-i.width/2,f=o.y+o.height/2-i.height/2,h=o[l]/2-i[l]/2;switch(c){case"top":n={x:d,y:o.y-i.height};break;case"bottom":n={x:d,y:o.y+o.height};break;case"right":n={x:o.x+o.width,y:f};break;case"left":n={x:o.x-i.width,y:f};break;default:n={x:o.x,y:o.y}}switch(v(t)){case"start":n[s]-=h*(r&&u?-1:1);break;case"end":n[s]+=h*(r&&u?-1:1)}return n}let I=async(e,t,r)=>{let{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}
1=r,s=i.filter(Boolean),l=await (null==a.isRTL?void 0:a.isRTL(t)),c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=E(c,n,l),f=n,h={},p=0;for(let r=0;r<s.length;r++){let{name:i,fn:m}=s[r],{x:g,y:y,data:v,reset:b}=await m({x:u,y:d,initialPlacement:n,placement:f,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=y?y:d,h={...h,[i]:{...h[i],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),{x:u,y:d}=E(c,f,l)),r=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}};async function j(e,t){var r;void 0===t&&(t={});let{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:h=0}=g(t,e),p=A(h),m=s[f?"floating"===d?"reference":"floating":d],y=C(await i.getClippingRect({element:null==(r=await (null==i.isElement?void 0:i.isElement(m)))||r?m:m.contextElement||await (null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:n,y:o,width:a.floating.width,height:a.floating.height}:a.reference,b=await (null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),_=await (null==i.isElement?void 0:i.isElement(b))&&await (null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=C(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:b,strategy:l}):v);return{top:(y.top-x.top+p.top)/_.y,bottom:(x.bottom-y.bottom+p.bottom)/_.y,left:(y.left-x.left+p.left)/_.x,right:(x.right-y.right+p.right)/_.x}}function k(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function R(e){return l.some(t=>e[t]>=0)}async function N(e,t){let{placement:r,platform:n,elements:o}=e,i=await (null==n.isRTL?void 0:n.isRTL(o.floating)),a=y(r),s=v(r),l="y"===x(r),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=g(t,e),{mainAxis:f,crossAxis:h,alignmentAxis:p}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof p&&(h="end"===s?-1*p:p),l?{x:h*u,y:f*c}:{x:f*c,y:h*u}}function T(){return"u">typeof window}function M(e){return F(e)?(e.nodeName||"").toLowerCase():"#document"}function D(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function L(e){var t;return null==(t=(F(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function F(e){return!!T()&&(e instanceof Node||e instanceof D(e).Node)}function B(e){return!!T()&&(e instanceof Element||e instanceof D(e).Element)}function O(e){return!!T()&&(e instanceof HTMLElement||e instanceof D(e).HTMLElement)}function P(e){return!(!T()||"u"<typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof D(e).ShadowRoot)}function z(e){let{overflow:t,overflowX:r,overflowY:n,display:o}=V(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function G(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch(e){return!1}})}function $(e){let t=H(),r=B(e)?V(e):e;return["transform","translate","scale","rotate","perspective"].some(e=>!!r[e]&&"none"!==r[e])||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","translate","scale","rotate","perspective","filter"].some(e=>(r.willChange||"").includes(e))||["paint","layout","strict","content"].some(e=>(r.contain||"").includes(e))}function H(){return!("u"<typeof CSS)&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}function U(e){return["html","body","#document"].includes(M(e))}function V(e){return D(e).getComputedStyle(e)}function W(e){return B(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function K(e){if("html"===M(e))return e;let t=e.assignedSlot||e.parentNode||P(e)&&e.host||L(e);return P(t)?t.host:t}function q(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);let o=function e(t){let r=K(t);return U(r)?t.ownerDocument?t.ownerDocument.body:t.body:O(r)&&z(r)?r:e(r)}(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=D(o);if(i){let e=Y(a);
1return t.concat(a,a.visualViewport||[],z(o)?o:[],e&&r?q(e):[])}return t.concat(o,q(o,[],r))}function Y(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function X(e){let t=V(e),r=parseFloat(t.width)||0,n=parseFloat(t.height)||0,o=O(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=d(r)!==i||d(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function Q(e){return B(e)?e:e.contextElement}function J(e){let t=Q(e);if(!O(t))return h(1);let r=t.getBoundingClientRect(),{width:n,height:o,$:i}=X(t),a=(i?d(r.width):r.width)/n,s=(i?d(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}let Z=h(0);function ee(e){let t=D(e);return H()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Z}function et(e,t,r,n){var o;void 0===t&&(t=!1),void 0===r&&(r=!1);let i=e.getBoundingClientRect(),a=Q(e),s=h(1);t&&(n?B(n)&&(s=J(n)):s=J(e));let l=(void 0===(o=r)&&(o=!1),n&&(!o||n===D(a))&&o)?ee(a):h(0),c=(i.left+l.x)/s.x,u=(i.top+l.y)/s.y,d=i.width/s.x,f=i.height/s.y;if(a){let e=D(a),t=n&&B(n)?D(n):n,r=e,o=Y(r);for(;o&&n&&t!==r;){let e=J(o),t=o.getBoundingClientRect(),n=V(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;c*=e.x,u*=e.y,d*=e.x,f*=e.y,c+=i,u+=a,o=Y(r=D(o))}}return C({width:d,height:f,x:c,y:u})}function er(e,t){let r=W(e).scrollLeft;return t?t.left+r:et(L(e)).left+r}function en(e,t,r){void 0===r&&(r=!1);let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-(r?0:er(e,n)),y:n.top+t.scrollTop}}function eo(e,t,r){var n;let o;if("viewport"===t)o=function(e,t){let r=D(e),n=L(e),o=r.visualViewport,i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;let e=H();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,r);else if("document"===t){let t,r,i,a,s,l,c;n=L(e),t=L(n),r=W(n),i=n.ownerDocument.body,a=u(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),s=u(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight),l=-r.scrollLeft+er(n),c=-r.scrollTop,"rtl"===V(i).direction&&(l+=u(t.clientWidth,i.clientWidth)-a),o={width:a,height:s,x:l,y:c}}else if(B(t)){let e,n,i,a,s,l;n=(e=et(t,!0,"fixed"===r)).top+t.clientTop,i=e.left+t.clientLeft,a=O(t)?J(t):h(1),s=t.clientWidth*a.x,l=t.clientHeight*a.y,o={width:s,height:l,x:i*a.x,y:n*a.y}}else{let r=ee(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return C(o)}function ei(e){return"static"===V(e).position}function ea(e,t){if(!O(e)||"fixed"===V(e).position)return null;if(t)return t(e);let r=e.offsetParent;return L(e)===r&&(r=r.ownerDocument.body),r}function es(e,t){let r=D(e);if(G(e))return r;if(!O(e)){let t=K(e);for(;t&&!U(t);){if(B(t)&&!ei(t))return t;t=K(t)}return r}let n=ea(e,t);for(;n&&["table","td","th"].includes(M(n))&&ei(n);)n=ea(n,t);return n&&U(n)&&ei(n)&&!$(n)?r:n||function(e){let t=K(e);for(;O(t)&&!U(t);){if($(t))return t;if(G(t))break;t=K(t)}return null}(e)||r}let el=async function(e){let t=this.getOffsetParent||es,r=this.getDimensions,n=await r(e.floating);return{reference:function(e,t,r){let n=O(t),o=L(t),i="fixed"===r,a=et(e,!0,i,t),s={scrollLeft:0,scrollTop:0},l=h(0);if(n||!n&&!i)if(("body"!==M(t)||z(o))&&(s=W(t)),n){let e=et(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=er(o));let c=!o||n||i?h(0):en(o,s);return{x:a.left+s.scrollLeft-l.x-c.x,y:a.top+s.scrollTop-l.y-c.y,width:a.width,height:a.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}},ec={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e,i="fixed"===o,a=L(n),s=!!t&&G(t.floating);if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=h(1),u=h(0),d=O(n);
1if((d||!d&&!i)&&(("body"!==M(n)||z(a))&&(l=W(n)),O(n))){let e=et(n);c=J(n),u.x=e.x+n.clientLeft,u.y=e.y+n.clientTop}let f=!a||d||i?h(0):en(a,l,!0);return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:r.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:L,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e,i=[..."clippingAncestors"===r?G(t)?[]:function(e,t){let r=t.get(e);if(r)return r;let n=q(e,[],!1).filter(e=>B(e)&&"body"!==M(e)),o=null,i="fixed"===V(e).position,a=i?K(e):e;for(;B(a)&&!U(a);){let t=V(a),r=$(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&!!o&&["absolute","fixed"].includes(o.position)||z(a)&&!r&&function e(t,r){let n=K(t);return!(n===r||!B(n)||U(n))&&("fixed"===V(n).position||e(n,r))}(e,a))?n=n.filter(e=>e!==a):o=t,a=K(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],a=i[0],s=i.reduce((e,r)=>{let n=eo(t,r,o);return e.top=u(n.top,e.top),e.right=c(n.right,e.right),e.bottom=c(n.bottom,e.bottom),e.left=u(n.left,e.left),e},eo(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:es,getElementRects:el,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:r}=X(e);return{width:t,height:r}},getScale:J,isElement:B,isRTL:function(e){return"rtl"===V(e).direction}};function eu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}let ed=e=>({name:"arrow",options:e,async fn(t){let{x:r,y:n,placement:o,rects:i,platform:a,elements:s,middlewareData:l}=t,{element:d,padding:f=0}=g(e,t)||{};if(null==d)return{};let h=A(f),p={x:r,y:n},m=b(x(o)),y=_(m),w=await a.getDimensions(d),S="y"===m,C=S?"clientHeight":"clientWidth",E=i.reference[y]+i.reference[m]-p[m]-i.floating[y],I=p[m]-i.reference[m],j=await (null==a.getOffsetParent?void 0:a.getOffsetParent(d)),k=j?j[C]:0;k&&await (null==a.isElement?void 0:a.isElement(j))||(k=s.floating[C]||i.floating[y]);let R=k/2-w[y]/2-1,N=c(h[S?"top":"left"],R),T=c(h[S?"bottom":"right"],R),M=k-w[y]-T,D=k/2-w[y]/2+(E/2-I/2),L=u(N,c(D,M)),F=!l.arrow&&null!=v(o)&&D!==L&&i.reference[y]/2-(D<N?N:T)-w[y]/2<0,B=F?D<N?D-N:D-M:0;return{[m]:p[m]+B,data:{[m]:L,centerOffset:D-L-B,...F&&{alignmentOffset:B}},reset:F}}});var ef=e.i(30522),eh="u">typeof document?r.useLayoutEffect:r.useEffect;function ep(e,t){let r,n,o;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((r=e.length)!==t.length)return!1;for(n=r;0!=n--;)if(!ep(e[n],t[n]))return!1;return!0}if((r=(o=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!({}).hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){let r=o[n];if(("_owner"!==r||!e.$$typeof)&&!ep(e[r],t[r]))return!1}return!0}return e!=e&&t!=t}function em(e){return"u"<typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function eg(e,t){let r=em(e);return Math.round(t*r)/r}function ey(e){let t=r.useRef(e);return eh(()=>{t.current=e}),t}var ev=e.i(83627),eb=Object.defineProperty,e_=r.forwardRef(eb(function(e,r){let{children:n,width:o=10,height:i=5,...a}=e;return(0,t.jsx)(ev.Primitive.svg,{...a,ref:r,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,t.jsx)("polygon",{points:"0,0 30,0 15,10"})})},"name",{value:"Arrow",configurable:!0})),ex=e.i(33224),ew=e.i(35410),eS=e.i(84253),eA=Object.defineProperty,eC=(e,t)=>eA(e,"name",{value:t,configurable:!0}),eE="Popper",[eI,ej]=(0,i.createContextScope)(eE),[ek,eR]=eI(eE),eN=eC(e=>{let{__scopePopper:n,children:o}=e,[i,a]=r.useState(null),[s,l]=r.useState(void 0);return(0,t.jsx)(ek,{scope:n,anchor:i,onAnchorChange:a,placementState:s,setPlacementState:l,children:o})},"Popper"),eT=r.forwardRef(eC(function(e,n){let{__scopePopper:i,virtualRef:a,...s}=e,l=eR("PopperAnchor",i),c=r.useRef(null),u=l.onAnchorChange,d=r.useCallback(e=>{c.current=e,e&&u(e)},[u]),f=(0,o.useComposedRefs)(n,d),h=r.useRef(null);r.useEffect(()=>{if(!a)return;let e=h.current;h.current=a.current,e!==h.current&&u(h.current)});let p=l.placementState&&eG(l.placementState),m=p?.[0],g=p?.[1];return a?null:(0,t.jsx)(ev.Primitive.div,{"data-radix-popper-side":m,"data-radix-popper-align":g,...s,ref:f})},"PopperAnchor")),eM="PopperContent",[eD,eL]=eI(eM),eF=r.forwardRef(eC(function(e,n){var i,a,s,l,d,h,p,m,A,C,E,T,M,D,F,B,O,P,z,G,$;let{__scopePopper:H,side:U="bottom",sideOffset:V=0,align:W="center",alignOffset:K=0,arrowPadding:Y=0,avoidCollisions:X=!0,collisionBoundary:J=[],collisionPadding:Z=0,sticky:ee="partial",hideWhenDetached:er=!1,updatePositionStrategy:en="optimized",onPlaced:eo,...ei}=e,ea=eR(eM,H),[es,el]=r.useState(null),eb=(0,o.useComposedRefs)(n,el),[e_,eA]=r.useState(null),eE=(0,eS.use
1Size)(e_),eI=eE?.width??0,ej=eE?.height??0,ek="number"==typeof Z?Z:{top:0,right:0,bottom:0,left:0,...Z},eN=Array.isArray(J)?J:[J],eT=eN.length>0,eL={padding:ek,boundary:eN.filter(eP),altBoundary:eT},{refs:eF,floatingStyles:eB,placement:eO,isPositioned:e$,middlewareData:eH}=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:a,floating:s}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,f]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=r.useState(o);ep(h,o)||p(o);let[m,g]=r.useState(null),[y,v]=r.useState(null),b=r.useCallback(e=>{e!==S.current&&(S.current=e,g(e))},[]),_=r.useCallback(e=>{e!==A.current&&(A.current=e,v(e))},[]),x=a||m,w=s||y,S=r.useRef(null),A=r.useRef(null),C=r.useRef(d),E=null!=c,j=ey(c),k=ey(i),R=ey(u),N=r.useCallback(()=>{var e,r;let o,i,a;if(!S.current||!A.current)return;let s={placement:t,strategy:n,middleware:h};k.current&&(s.platform=k.current),(e=S.current,r=A.current,o=new Map,a={...(i={platform:ec,...s}).platform,_c:o},I(e,r,{...i,platform:a})).then(e=>{let t={...e,isPositioned:!1!==R.current};T.current&&!ep(C.current,t)&&(C.current=t,ef.flushSync(()=>{f(t)}))})},[h,t,n,k,R]);eh(()=>{!1===u&&C.current.isPositioned&&(C.current.isPositioned=!1,f(e=>({...e,isPositioned:!1})))},[u]);let T=r.useRef(!1);eh(()=>(T.current=!0,()=>{T.current=!1}),[]),eh(()=>
1{if(x&&(S.current=x),w&&(A.current=w),x&&w){if(j.current)return j.current(x,w,N);N()}},[x,w,N,j,E]);let M=r.useMemo(()=>({reference:S,floating:A,setReference:b,setFloating:_}),[b,_]),D=r.useMemo(()=>({reference:x,floating:w}),[x,w]),L=r.useMemo(()=>{let e={position:n,left:0,top:0};if(!D.floating)return e;let t=eg(D.floating,d.x),r=eg(D.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...em(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,l,D.floating,d.x,d.y]);return r.useMemo(()=>({...d,update:N,refs:M,elements:D,floatingStyles:L}),[d,N,M,D,L])}({strategy:"fixed",placement:U+("center"!==W?"-"+W:""),whileElementsMounted:eC((...e)=>(function(e,t,r,n){let o;void 0===n&&(n={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:d=!1}=n,h=Q(e),p=i||a?[...h?q(h):[],...q(t)]:[];p.forEach(e=>{i&&e.addEventListener("scroll",r,{passive:!0}),a&&e.addEventListener("resize",r)});let m=h&&l?function(e,t){let r,n=null,o=L(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return!function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();let d=e.getBoundingClientRect(),{left:h,top:p,width:m,height:g}=d;if(s||t(),!m||!g)return;let y={rootMargin:-f(p)+"px "+-f(o.clientWidth-(h+m))+"px "+-f(o.clientHeight-(p+g))+"px "+-f(h)+"px",threshold:u(0,c(1,l))||1},v=!0;function b(t){let n=t[0].intersectionRatio;if(n!==l){if(!v)return a();n?a(!1,n):r=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==n||eu(d,e.getBoundingClientRect())||a(),v=!1}try{n=new IntersectionObserver(b,{...y,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(b,y)}n.observe(e)}(!0),i}(h,r):null,g=-1,y=null;s&&(y=new ResizeObserver(e=>{let[n]=e;n&&n.target===h&&y&&(y.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame(()=>{var e;null==(e=y)||e.observe(t)})),r()}),h&&!d&&y.observe(h),y.observe(t));let v=d?et(e):null;return d&&function t(){let n=et(e);v&&!eu(v,n)&&r(),v=n,o=requestAnimationFrame(t)}(),r(),()=>{var e;p.forEach(e=>{i&&e.removeEventListener("scroll",r),a&&e.removeEventListener("resize",r)}),null==m||m(),null==(e=y)||e.disconnect(),y=null,d&&cancelAnimationFrame(o)}})(...e,{animationFrame:"always"===en}),"whileElementsMounted"),elements:{reference:ea.anchor},middleware:[{...{name:"offset",options:s=i={mainAxis:V+ej,alignmentAxis:K},async fn(e){var t,r;let{x:n,y:o,placement:i,middlewareData:a}=e,l=await N(e,s);return i===(null==(t=a.offset)?void 0:t.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:n+l.x,y:o+l.y,data:{...l,placement:i}}}},options:[i,a]},X&&{...{name:"shift",options:A=p={mainAxis:!0,crossAxis:!1,limiter:"partial"===ee?{...(void 0===(h=l)&&(h={}),{options:h,fn(e){let{x:t,y:r,placement:n,rects:o,middlewareData:i}=e,{offset:a=0,mainAxis:s=!0,crossAxis:l=!0}=g(h,e),c={x:t,y:r},u=x(n),d=b(u),f=c[d],p=c[u],m=g(a,e),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(s){let e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+v.mainAxis,r=o.reference[d]+o.reference[e]-v.mainAxis;f<t?f=t:f>r&&(f=r)}if(l){var _,w;let e="y"===d?"width":"height",t=["top","left"].includes(y(n)),r=o.reference[u]-o.floating[e]+(t&&(null==(_=i.offset)?void 0:_[u])||0)+(t?0:v.crossAxis),a=o.reference[u]+o.reference[e]+(t?0:(null==(w=i.offset)?void 0:w[u])||0)-(t?v.crossAxis:0);p<r?p=r:p>a&&(p=a)}return{[d]:f,[u]:p}}}),options:[l,d]}:void 0,...eL},async fn(e){let{x:t,y:r,placement:n}=e,{mainAxis:o=!0,crossAxis:i=!1,limiter:a={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...s}=g(A,e),l={x:t,y:r},d=await j(e,s),f=x(y(n)),h=b(f),p=l[h],m=l[f];if(o){let e="y"===h?"top":"left",t="y"===h?"bottom":"right",r=p+d[e],n=p-d[t];p=u(r,c(p,n))}if(i){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",r=m+d[e],n=m-d[t];m=u(r,c(m,n))}let v=a.fn({...e,[h]:p,[f]:m});return{...v,data:{x:v.x-t,y:v.y-r,enabled:{[h]:o,[f]:i}}}}},options:[p,m]},X&&{...{name:"flip",options:T=C={...eL},async fn(e){var t,r,n,o,i,a,s,l;let c,u,d,{placement:f,middlewareData:h,rects:p,initialPlacement:m,platform:A,elements:C}=e,{mainAxis:E=!0,crossAxis:I=!0,fallbackPlacements:k,fallbackStrategy:R="bestFit",fallbackAxisSideDirection:N="none",flipAlignment:M=!0,...D}=g(T,e);if(null!=(t=h.arrow)&&t.alignmentOffset)return{};let L=y(f),F=x(m),B=y(m)===m,O=await (null==A.isRTL?void 0:A.isRTL(C.floating)),P=k||(B||!M?[S(m)]:(c=S(m),[w(m),c,w(c)])),z="none"!==N;!k&&z&&P.push(...(u=v(m),d=function(e,t,r){let n=["left","right"],o=["right","left"];switch(e){case"top":case"bottom":if(r)return t?o:n;return t?n:o;case"left":case"right":return t?["top","bottom"]:["bottom","top"];default:return[]}}(y(m),"start"===N,O),u&&(d=d.map(e=>e+"-"+u),M&&(d=d.concat(d.map(w)))),d));let G=[m,...P],$=await j(e,D),H=[],U=(null==(r=h.flip)?void 0:r.overflows)||[];if(E&&H.push($[L]),I){let e,t,r,n,o=(a=f,s=p,void 0===(l=O)&&(l=!1),e=v(a),r=_(t=b(x(a))),n="x"===t?e===(l?"end":"start")?"right":"left":"start"===e?"bottom":"top",s.reference[r]>s.floating[r]&&(n=S(n)),[n,S(n)]);H.push($[o[0]],$[o[1]])}if(U=[...U,{placement:f,overflows:H}],!H.every(e=>e<=0)){let e=((null==(n=h.flip)?void 0:n.index)||0)+1,t=G[e];if(t)return{data:{index:e,overflows:U},reset:{placement:t}};let r=null==(o=U.filter(e=>e.overflows[0]<=0).sort((e,t)=>
1e.overflows[1]-t.overflows[1])[0])?void 0:o.placement;if(!r)switch(R){case"bestFit":{let e=null==(i=U.filter(e=>{if(z){let t=x(e.placement);return t===F||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:i[0];e&&(r=e);break}case"initialPlacement":r=m}if(f!==r)return{reset:{placement:r}}}return{}}},options:[C,E]},{...{name:"size",options:F=M={...eL,apply:eC(({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{let{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)},"apply")},async fn(e){var t,r;let n,o,{placement:i,rects:a,platform:s,elements:l}=e,{apply:d=()=>{},...f}=g(F,e),h=await j(e,f),p=y(i),m=v(i),b="y"===x(i),{width:_,height:w}=a.floating;"top"===p||"bottom"===p?(n=p,o=m===(await (null==s.isRTL?void 0:s.isRTL(l.floating))?"start":"end")?"left":"right"):(o=p,n="end"===m?"top":"bottom");let S=w-h.top-h.bottom,A=_-h.left-h.right,C=c(w-h[n],S),E=c(_-h[o],A),I=!e.middlewareData.shift,k=C,R=E;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(R=A),null!=(r=e.middlewareData.shift)&&r.enabled.y&&(k=S),I&&!m){let e=u(h.left,0),t=u(h.right,0),r=u(h.top,0),n=u(h.bottom,0);b?R=_-2*(0!==e||0!==t?e+t:u(h.left,h.right)):k=w-2*(0!==r||0!==n?r+n:u(h.top,h.bottom))}await d({...e,availableWidth:R,availableHeight:k});let N=await s.getDimensions(l.floating);return _!==N.width||w!==N.height?{reset:{rects:!0}}:{}}},options:[M,D]},e_&&{...{name:"arrow",options:P=B={element:e_,padding:Y},fn(e){let{element:t,padding:r}="function"==typeof P?P(e):P;return t&&({}).hasOwnProperty.call(t,"current")?null!=t.current?ed({element:t.current,padding:r}).fn(e):{}:t?ed({element:t,padding:r}).fn(e):{}}},options:[B,O]},ez({arrowWidth:eI,arrowHeight:ej}),er&&{...{name:"hide",options:$=z={strategy:"referenceHidden",...eL,boundary:eT?eL.boundary:void 0},async fn(e){let{rects:t}=e,{strategy:r="referenceHidden",...n}=g($,e);switch(r){case"referenceHidden":{let r=k(await j(e,{...n,elementContext:"reference"}),t.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:R(r)}}}case"escaped":{let r=k(await j(e,{...n,altBoundary:!0}),t.floating);return{data:{escapedOffsets:r,escaped:R(r)}}}default:return{}}}},options:[z,G]}]}),eU=ea.setPlacementState;(0,ew.useLayoutEffect)(()=>(eU(eO),()=>{eU(void 0)}),[eO,eU]);let[eV,eW]=eG(eO),eK=(0,ex.useCallbackRef)(eo);(0,ew.useLayoutEffect)(()=>{e$&&eK?.()},[e$,eK]);let eq=eH.arrow?.x,eY=eH.arrow?.y,eX=eH.arrow?.centerOffset!==0,[eQ,eJ]=r.useState();return(0,ew.useLayoutEffect)(()=>{es&&eJ(window.getComputedStyle(es).zIndex)},[es]),(0,t.jsx)("div",{ref:eF.setFloating,"data-radix-popper-content-wrapper":"",style:{...eB,transform:e$?eB.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:eQ,"--radix-popper-transform-origin":[eH.transformOrigin?.x,eH.transformOrigin?.y].join(" "),...eH.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:(0,t.jsx)(eD,{scope:H,placedSide:eV,placedAlign:eW,onArrowChange:eA,arrowX:eq,arrowY:eY,shouldHideArrow:eX,children:(0,t.jsx)(ev.Primitive.div,{"data-side":eV,"data-align":eW,...ei,ref:eb,style:{...ei.style,animation:e$?ei.style?.animation:"none"}})})})},"PopperContent")),eB={top:"bottom",right:"left",bottom:"top",left:"right"},eO=r.forwardRef(eC(function(e,r){let{__scopePopper:n,...o}=e,i=eL("PopperArrow",n),a=eB[i.placedSide];return(0,t.jsx)("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:(0,t.jsx)(e_,{...o,ref:r,style:{...o.style,display:"block"}})})},"PopperArrow"));function eP(e){return null!==e}eC(eP,"isNotNull");var ez=eC(e=>({name:"transformOrigin",options:e,fn(t){let{placement:r,rects:n,middlewareData:o}=t,i=o.arrow?.centerOffset!==0,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[l,c]=eG(r),u={start:"0%",center:"50%",end:"100%"}[c],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+s/2,h="",p="";return"bottom"===l?(h=i?u:`${d}px`,p=`${-s}px`):"top"===l?(h=i?u:`${d}px`,p=`${n.floating.height+s}px`):"right"===l?(h=`${-s}px`,p=i?u:`${f}px`):"left"===l&&(h=`${n.floating.width+s}px`,p=i?u:`${f}px`),{data:{x:h,y:p}}}}),"transformOrigin");function eG(e){let[t,r="center"]=e.split("-");return[t,r]}eC(eG,"getSideAndAlignFromPlacement");var e$=e.i(40681),eH=e.i(99204),eU=e.i(97871),eV=e.i(83554),eW=Object.defineProperty,eK=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),eq=r.forwardRef(eW(function(e,r){return(0,t.jsx)(ev.Primitive.span,{...e,ref:r,style:{...eK,...e.style}})},"name",{value:"VisuallyHidden",configurable:!0})),eY=Object.defineProperty,eX=(e,t)=>eY(e,"name",{value:t,configurable:!0}),[eQ,eJ]=(0,i.createContextScope)("Tooltip",[ej]),eZ=ej(),e0="tooltip.open",[e1,e2]=eQ("TooltipProvider"),e3=eX(e=>{let{__scopeTooltip:n,delayDuration:o=700,skipDelayDuration:i=300,disableHoverableContent:a=!1,children:s}=e,l=r.useRef(!0),c=r.useRef(!1),u=r.useRef(0);return r.useEffect(()=>{let e=u.current;return()=>window.clearTimeout(e)},[]),(0,t.jsx)(e1,{scope:n,isOpenDelayedRef:l,delayDuration:o,onOpen:r.useCallback(()=>{i<=0||(window.clearTimeout(u.current),l.current=!1)},[i]),onClose:r.useCallback(()=>{i<=0||(window.clearTimeout(u.current),u.current=window.setTimeout(()=>l.current=!0,i))},[i]),isPointerInTransitRef:c,onPointerInTransitChange:r.useCallback(e=>{c.current=e},[]),disableHoverableContent:a,children:s})},"TooltipProvider"),e6="Tooltip",[e4,e8]=eQ(e6),e7=eX(e=>{let{__scopeTooltip:n,children:o,open:i,defaultOpen:a,onOpenChange:l,disableHoverableContent:c,delayDuration:u}=e,d=e2(e6,e.__scopeTooltip),f=eZ(n),[h,p]=r.useState(null),[m,g]=r.useState(void 0),y=(0,s.useId)(),v=r.useRef(0),b=c??d.disableHoverableContent,_=u??d.delayDuration,x=r.useRef(!1),[w,S]=(0,eV.useControllableState)({prop:i,defaultProp:a??!1,onChange:eX(e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(e0))):d.onClose(),l?.(e)}
1,"onChange"),caller:e6}),A=r.useMemo(()=>w?x.current?"delayed-open":"instant-open":"closed",[w]),C=r.useCallback(()=>{window.clearTimeout(v.current),v.current=0,x.current=!1,S(!0)},[S]),E=r.useCallback(()=>{window.clearTimeout(v.current),v.current=0,S(!1)},[S]),I=r.useCallback(()=>{window.clearTimeout(v.current),v.current=window.setTimeout(()=>{x.current=!0,S(!0),v.current=0},_)},[_,S]);return r.useEffect(()=>()=>{v.current&&(window.clearTimeout(v.current),v.current=0)},[]),(0,t.jsx)(eN,{...f,children:(0,t.jsx)(e4,{scope:n,contentId:m??y,setContentId:g,open:w,stateAttribute:A,trigger:h,onTriggerChange:p,onTriggerEnter:r.useCallback(()=>{d.isOpenDelayedRef.current?I():C()},[d.isOpenDelayedRef,I,C]),onTriggerLeave:r.useCallback(()=>{b?E():(window.clearTimeout(v.current),v.current=0)},[E,b]),onOpen:C,onClose:E,disableHoverableContent:b,children:o})})},"Tooltip"),e5="TooltipTrigger",e9=r.forwardRef(eX(function(e,i){let{__scopeTooltip:a,...s}=e,l=e8(e5,a),c=e2(e5,a),u=eZ(a),d=r.useRef(null),f=(0,o.useComposedRefs)(i,d,l.onTriggerChange),h=r.useRef(!1),p=r.useRef(!1),m=r.useCallback(()=>h.current=!1,[]);return r.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),(0,t.jsx)(eT,{asChild:!0,...u,children:(0,t.jsx)(ev.Primitive.button,{"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute,...s,ref:f,onPointerMove:(0,n.composeEventHandlers)(e.onPointerMove,e=>{"touch"!==e.pointerType&&(p.current||c.isPointerInTransitRef.current||(l.onTriggerEnter(),p.current=!0))}),onPointerLeave:(0,n.composeEventHandlers)(e.onPointerLeave,()=>{l.onTriggerLeave(),p.current=!1}),onPointerDown:(0,n.composeEventHandlers)(e.onPointerDown,()=>{l.open&&l.onClose(),h.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:(0,n.composeEventHandlers)(e.onFocus,()=>{h.current||l.onOpen()}),onBlur:(0,n.composeEventHandlers)(e.onBlur,l.onClose),onClick:(0,n.composeEventHandlers)(e.onClick,l.onClose)})})},"TooltipTrigger")),te="TooltipPortal",[tt,tr]=eQ(te,{forceMount:void 0}),tn=eX(e=>{let{__scopeTooltip:r,forceMount:n,children:o,container:i}=e,a=e8(te,r);return(0,t.jsx)(tt,{scope:r,forceMount:n,children:(0,t.jsx)(eH.Presence,{present:n||a.open,children:(0,t.jsx)(e$.Portal,{asChild:!0,container:i,children:o})})})},"TooltipPortal"),to="TooltipContent",ti=r.forwardRef(eX(function(e,r){let n=tr(to,e.__scopeTooltip),{forceMount:o=n.forceMount,side:i="top",...a}=e,s=e8(to,e.__scopeTooltip);return(0,t.jsx)(eH.Presence,{present:o||s.open,children:s.disableHoverableContent?(0,t.jsx)(tl,{side:i,...a,ref:r}):(0,t.jsx)(ta,{side:i,...a,ref:r})})},"TooltipContent")),ta=r.forwardRef(eX(function(e,n){let i=e8(to,e.__scopeTooltip),a=e2(to,e.__scopeTooltip),s=r.useRef(null),l=(0,o.useComposedRefs)(n,s),[c,u]=r.useState(null),{trigger:d,onClose:f}=i,h=s.current,{onPointerInTransitChange:p}=a,m=r.useCallback(()=>{u(null),p(!1)},[p]),g=r.useCallback((e,t)=>{let r=e.currentTarget,n={x:e.clientX,y:e.clientY},o=tu(n,r.getBoundingClientRect());u(tp([...td(n,o),...tf(t.getBoundingClientRect())])),p(!0)},[p]);return r.useEffect(()=>()=>m(),[m]),r.useEffect(()=>{if(d&&h){let e=eX(e=>g(e,h),"handleTriggerLeave"),t=eX(e=>g(e,d),"handleContentLeave");return d.addEventListener("pointerleave",e),h.addEventListener("pointerleave",t),()=>{d.removeEventListener("pointerleave",e),h.removeEventListener("pointerleave",t)}}},[d,h,g,m]),r.useEffect(()=>{if(c){let e=eX(e=>{let t=e.target,r={x:e.clientX,y:e.clientY},n=d?.contains(t)||h?.contains(t),o=!th(r,c);n?m():o&&(m(),f())},"handleTrackPointerGrace");return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}},[d,h,c,f,m]),(0,t.jsx)(tl,{...e,ref:l})},"TooltipContentHoverable")),ts=(0,eU.createSlottable)("TooltipContent"),tl=r.forwardRef(eX(function(e,n){let{__scopeTooltip:o,children:i,"aria-label":s,id:l,onEscapeKeyDown:c,onPointerDownOutside:u,...d}=e,f=e8(to,o),h=eZ(o),{onClose:p}=f;r.useEffect(()=>(document.addEventListener(e0,p),()=>document.removeEventListener(e0,p)),[p]),r.useEffect(()=>{if(f.trigger){let e=eX(e=>{e.target instanceof Node&&e.target.contains(f.trigger)&&p()},"handleScroll");return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}},[f.trigger,p]);let{setContentId:m}=f;return(0,ew.useLayoutEffect)(()=>(m(l),()=>{m(void 0)}),[l,m]),(0,t.jsx)(a.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:p,children:(0,t.jsxs)(eF,{"data-state":f.stateAttribute,role:s?void 0:"tooltip",id:s?void 0:f.contentId,...h,...d,ref:n,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[(0,t.jsx)(ts,{children:i}),s?(0,t.jsx)(eq,{id:f.contentId,role:"tooltip",children:s}):null]})})},"TooltipContentImpl")),tc=r.forwardRef(eX(function(e,r){let{__scopeTooltip:n,...o}=e,i=eZ(n);return(0,t.jsx)(eO,{...i,...o,ref:r})},"TooltipArrow"));function tu(e,t){let r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw Error("unreachable")}}function td(e,t,r=5){let n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}function tf(e){let{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function th(e,t){let{x:r,y:n}=e,o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){let a=t[e],s=t[i],l=a.x,c=a.y,u=s.x,d=s.y;c>n!=d>n&&r<(u-l)*(n-c)/(d-c)+l&&(o=!o)}return o}function tp(e){let t=e.slice();return t.sort((e,t)=>
1e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:1*!!(e.y>t.y)),tm(t)}function tm(e){if(e.length<=1)return e.slice();let t=[];for(let r=0;r<e.length;r++){let n=e[r];for(;t.length>=2;){let e=t[t.length-1],r=t[t.length-2];if((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x))t.pop();else break}t.push(n)}t.pop();let r=[];for(let t=e.length-1;t>=0;t--){let n=e[t];for(;r.length>=2;){let e=r[r.length-1],t=r[r.length-2];if((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x))r.pop();else break}r.push(n)}return(r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y)?t:t.concat(r)}eX(tu,"getExitSideFromRect"),eX(td,"getPaddedExitPoints"),eX(tf,"getPointsFromRect"),eX(th,"isPointInPolygon"),eX(tp,"getHull"),eX(tm,"getHullPresorted");var tg=e.i(75157);function ty({delayDuration:e=0,...r}){return(0,t.jsx)(e3,{"data-slot":"tooltip-provider",delayDuration:e,...r})}e.s(["Tooltip",0,function({...e}){return(0,t.jsx)(ty,{children:(0,t.jsx)(e7,{"data-slot":"tooltip",...e})})},"TooltipContent",0,function({className:e,sideOffset:r=0,children:n,...o}){return(0,t.jsx)(tn,{children:(0,t.jsxs)(ti,{"data-slot":"tooltip-content",sideOffset:r,className:(0,tg.cn)("bg-primary text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit rounded-md px-3 py-1.5 text-xs text-balance",e),...o,children:[n,(0,t.jsx)(tc,{className:"bg-primary fill-primary z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})},"TooltipTrigger",0,function({...e}){return(0,t.jsx)(e9,{"data-slot":"tooltip-trigger",...e})}],46798)},23233,e=>{e.v({palette:"GameFeedback-module__pOFPnG__palette"})},78848,e=>{"use strict";var t=e.i(69163),r=e.i(19643),n=e.i(60198),o=e.i(28296),i=e.i(92804),a=e.i(78708),s=e.i(33030),l=e.i(46798);function c(){let{enhanced:e,setEnhanced:r}=(0,a.useGameFeedback)(),n=(0,o.useTranslations)("ColorIndicators"),c=(0,s.useId)(),u=n("enhancedFeedbackHelp");return(0,t.jsxs)(l.Tooltip,{children:[(0,t.jsx)(l.TooltipTrigger,{asChild:!0,children:(0,t.jsxs)("label",{className:i.default.enhancedToggle,children:[(0,t.jsx)("input",{type:"checkbox","aria-label":n("enhancedFeedback"),checked:e,"aria-describedby":c,onChange:e=>r(e.target.checked)}),(0,t.jsx)("span",{children:n("enhancedFeedback")}),(0,t.jsx)("span",{className:"sr-only",id:c,children:u})]})}),(0,t.jsx)(l.TooltipContent,{className:"max-w-[calc(100vw-2rem)] text-center",children:u})]})}var u=e.i(23233);e.s(["default",0,({mode:e="classic"})=>{let{enhanced:s}=(0,a.useGameFeedback)(),l=(0,o.useTranslations)("ColorIndicators"),d=(0,o.useTranslations)("DailyModes.wanted"),f=l("title"),h=[{key:"correct",tone:"correct",label:l("exactMatch"),icon:null},..."classic"===e?[{key:"partial",tone:"partial",label:l("partialMatch"),icon:null}]:[],{key:"incorrect",tone:"incorrect",label:l("noMatch"),icon:null},..."classic"===e||"wanted"===e?[{key:"lower",tone:"incorrect",label:"wanted"===e?d("lowerBounty"):l("targetIsLower"),icon:r.ArrowDown},{key:"higher",tone:"incorrect",label:"wanted"===e?d("higherBounty"):l("targetIsHigher"),icon:n.ArrowUp}]:[]],p="classic"===e?i.default.classicItems:"wanted"===e?i.default.wantedItems:i.default.laughItems;return(0,t.jsx)("aside",{className:`section section-color-indicator ${u.default.palette}`,"data-mode":e,"aria-label":f,"data-enhanced":s,children:(0,t.jsx)("div",{className:i.default.container,children:(0,t.jsxs)("div",{className:p,children:[h.map(({key:e,tone:r,label:n,icon:o})=>(0,t.jsxs)("div",{className:i.default.classicItem,"data-tone":r,"data-feedback":r,children:[o&&(0,t.jsx)("span",{className:i.default.icon,"aria-hidden":"true",children:(0,t.jsx)(o,{})}),(0,t.jsx)("span",{className:i.default.label,children:n})]},e)),(0,t.jsx)(c,{})]})})})}],78848)},70053,e=>{e.v({icon:"DailyResetCountdown-module__jdOgXa__icon",initial:"DailyResetCountdown-module__jdOgXa__initial",label:"DailyResetCountdown-module__jdOgXa__label",timer:"DailyResetCountdown-module__jdOgXa__timer",toolbar:"DailyResetCountdown-module__jdOgXa__toolbar",utc:"DailyResetCountdown-module__jdOgXa__utc",value:"DailyResetCountdown-module__jdOgXa__value",victory:"DailyResetCountdown-module__jdOgXa__victory"})},57667,e=>{e.v({avatar:"YesterdayTarget-module__rl7ffa__avatar",characterButton:"YesterdayTarget-module__rl7ffa__characterButton",characterName:"YesterdayTarget-module__rl7ffa__characterName",sentence:"YesterdayTarget-module__rl7ffa__sentence",wrapper:"YesterdayTarget-module__rl7ffa__wrapper"})},37603,e=>{e.v({accessory:"VictoryResult-module__ciwKEG__accessory",actions:"VictoryResult-module__ciwKEG__actions",answerCard:"VictoryResult-module__ciwKEG__answerCard",answerText:"VictoryResult-module__ciwKEG__answerText",banner:"VictoryResult-module__ciwKEG__banner",brandActions:"VictoryResult-module__ciwKEG__brandActions",brandResult:"VictoryResult-module__ciwKEG__brandResult",compactBanner:"VictoryResult-module__ciwKEG__compactBanner",description:"VictoryResult-module__ciwKEG__description",detail
1:"VictoryResult-module__ciwKEG__detail",eyebrow:"VictoryResult-module__ciwKEG__eyebrow",heading:"VictoryResult-module__ciwKEG__heading",name:"VictoryResult-module__ciwKEG__name",portrait:"VictoryResult-module__ciwKEG__portrait",portraitFrame:"VictoryResult-module__ciwKEG__portraitFrame",rank:"VictoryResult-module__ciwKEG__rank","rank-loader-pulse":"VictoryResult-module__ciwKEG__rank-loader-pulse",rankLoader:"VictoryResult-module__ciwKEG__rankLoader",rankValue:"VictoryResult-module__ciwKEG__rankValue",shareBlock:"VictoryResult-module__ciwKEG__shareBlock",successMark:"VictoryResult-module__ciwKEG__successMark",title:"VictoryResult-module__ciwKEG__title"})},93933,52248,18271,74664,e=>{"use strict";e.i(4105);var t=e.i(69163),r=e.i(75157);function n({className:e,type:o,...i}){return(0,t.jsx)("input",{type:o,"data-slot":"input",className:(0,r.cn)("border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...i})}var o=e.i(88969),i=e.i(33030),a=e.i(44705);let s={[a.LocaleRoute.EN]:async()=>await e.A(54763),[a.LocaleRoute.TR]:async()=>await e.A(21957),[a.LocaleRoute.ID]:async()=>await e.A(72773),[a.LocaleRoute.DE]:async()=>await e.A(13895),[a.LocaleRoute.FR]:async()=>await e.A(69197),[a.LocaleRoute.ES]:async()=>await e.A(45342),[a.LocaleRoute.BR]:async()=>await e.A(42608),[a.LocaleRoute.ZH]:async()=>await e.A(69727),[a.LocaleRoute.JA]:async()=>await e.A(71595),[a.LocaleRoute.IT]:async()=>await e.A(64455)};async function l(e,t){let r=Array.from(new Set(t)),n=await Promise.all(r.map(async e=>{let t=await s[e]();return[e,(t.default??t).characters]}));return e.map(e=>{let t={};for(let[r,o]of n){let n=o[e.playerName];n&&(t[r]=[n.name,n.alias,n.epithet].filter(Boolean).join(" "))}return{...e,searchFields:t}})}function c(e){return Array.isArray?Array.isArray(e):"[object Array]"===g(e)}function u(e){return null==e?"":function(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();let t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function d(e){return"string"==typeof e}function f(e){return"number"==typeof e}function h(e){return"object"==typeof e}function p(e){return null!=e}function m(e){return!e.trim().length}function g(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}let y="Invalid doc index: must be a non-negative integer within the bounds of the docs array",v=Object.prototype.hasOwnProperty;var b=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let r=_(e);this._keys.push(r),this._keyMap[r.id]=r,t+=r.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function _(e){let t=null,r=null,n=null,o=1,i=null;if(d(e)||c(e))n=e,t=x(e),r=w(e);else{if(!v.call(e,"name"))throw Error("Missing name property in key");let a=e.name;if(n=a,v.call(e,"weight")&&void 0!==e.weight&&(o=e.weight)<=0){let e;throw Error((e=w(a),`Property 'weight' in key '${e}' must be a positive integer`))}t=x(a),r=w(a),i=e.getFn??null}return{path:t,id:r,weight:o,src:n,getFn:i}}function x(e){return c(e)?e:e.split(".")}function w(e){return c(e)?e.join("."):e}let S=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:function(e,t){let r=[],n=!1,o=(e,t,i,a)=>{if(p(e))if(t[i]){var s,l;let m=e[t[i]];if(!p(m))return;
1if(i===t.length-1&&(d(m)||f(m)||!0===(s=m)||!1===s||h(l=s)&&null!==l&&"[object Boolean]"==g(s)||"bigint"==typeof m))r.push(void 0!==a?{v:u(m),i:a}:u(m));else if(c(m)){n=!0;for(let e=0,r=m.length;e<r;e+=1)o(m[e],t,i+1,e)}else t.length&&o(m,t,i+1,a)}else r.push(void 0!==a?{v:e,i:a}:e)};return o(e,d(t)?t.split("."):t,0),n?r:r[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1});var A=class{constructor({getFn:e=S.getFn,fieldNormWeight:t=S.fieldNormWeight}={}){this.norm=function(e=1,t=3){let r=new Map,n=Math.pow(10,t);return{get(t){let o=0,i=!1;for(let e=0;e<t.length;e++){var a;(a=t.charCodeAt(e))>=9&&a<=13||32===a||160===a?i=!1:i||(o++,i=!0)}if(0===o&&(o=1),r.has(o))return r.get(o);let s=Math.round(n/Math.pow(o,.5*e))/n;return r.set(o,s),s},clear(){r.clear()}}}(t,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((e,t)=>{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(d(this.docs[0]))for(let r=0;r<e;r++){let e=this._createStringRecord(this.docs[r],r);e&&(this.records[t++]=e)}else for(let r=0;r<e;r++)this.records[t++]=this._createObjectRecord(this.docs[r],r);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw Error(y);if(d(e)){let r=this._createStringRecord(e,t);return r&&this.records.push(r),r}let r=this._createObjectRecord(e,t);return this.records.push(r),r}removeAt(e){if(!Number.isInteger(e)||e<0)throw Error(y);for(let t=0,r=this.records.length;t<r;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,r=this.records.length;t<r;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){let t=new Set;for(let r of e)Number.isInteger(r)&&r>=0&&t.add(r);if(0===t.size)return;this.records=this.records.filter(e=>!t.has(e.i));let r=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,n=r.length;for(;t<n;){let o=t+n>>>1;r[o]<e.i?t=o+1:n=o}e.i-=t}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!p(e)||m(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){let r={i:t,$:{}};for(let t=0,n=this.keys.length;t<n;t++){let n=this.keys[t],o=n.getFn?n.getFn(e):this.getFn(e,n.path);if(p(o)){if(c(o)){let e=[];for(let t=0,r=o.length;t<r;t+=1){let r=o[t];if(p(r)){if(d(r)){if(!m(r)){let n={v:r,i:t,n:this.norm.get(r)};e.push(n)}}else if(p(r.v)){let t=d(r.v)?r.v:u(r.v);if(!m(t)){let n={v:t,i:r.i,n:this.norm.get(t)};e.push(n)}}}}r.$[t]=e}else if(d(o)&&!m(o)){let e={v:o,n:this.norm.get(o)};r.$[t]=e}}}return r}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function C(e,t,{getFn:r=S.getFn,fieldNormWeight:n=S.fieldNormWeight}={}){let o=new A({getFn:r,fieldNormWeight:n});return o.setKeys(e.map(_)),o.setSources(t),o.create(),o}function E(e){if(e.length<=1)return e;e.sort((e,t)=>e[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let r=1,n=e.length;r<n;r+=1){let n=t[t.length-1],o=e[r];o[0]<=n[1]+1?n[1]=Math.max(n[1],o[1]):t.push(o)}return t}let I={Å:"l",Å:"L",Ä:"d",Ä:"D",ø:"o",Ã:"O",ħ:"h",Ħ:"H",ŧ:"t",Ŧ:"T",ı:"i",Ã:"ss"},j=RegExp("["+Object.keys(I).join("")+"]","g"),k="function"==typeof String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D
17F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(j,e=>I[e]):e=>e;var R=class{constructor(e,{location:t=S.location,threshold:r=S.threshold,distance:n=S.distance,includeMatches:o=S.includeMatches,findAllMatches:i=S.findAllMatches,minMatchCharLength:a=S.minMatchCharLength,isCaseSensitive:s=S.isCaseSensitive,ignoreDiacritics:l=S.ignoreDiacritics,ignoreLocation:c=S.ignoreLocation}={}){if(this.options={location:t,threshold:r,distance:n,includeMatches:o,findAllMatches:i,minMatchCharLength:a,isCaseSensitive:s,ignoreDiacritics:l,ignoreLocation:c},e=s?e:e.toLowerCase(),e=l?k(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const u=(e,t)=>{this.chunks.push({pattern:e,alphabet:function(e){let t={};for(let r=0,n=e.length;r<n;r+=1){let o=e.charAt(r);t[o]=(t[o]||0)|1<<n-r-1}return t}(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0;const t=d%32,r=d-t;for(;e<r;)u(this.pattern.substr(e,32),e),e+=32;if(t){const e=d-32;u(this.pattern.substr(e),e)}}else u(this.pattern,0)}searchIn(e){let{isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=r?k(e):e,this.pattern===e){if(e.length<this.options.minMatchCharLength)return{isMatch:!1,score:1};let t={isMatch:!0,score:0};return n&&(t.indices=[[0,e.length-1]]),t}let{location:o,distance:i,threshold:a,findAllMatches:s,minMatchCharLength:l,ignoreLocation:c}=this.options,u=[],d=0,f=!1;this.chunks.forEach(({pattern:t,alphabet:r,startIndex:h})=>{let{isMatch:p,score:m,indices:g}=function(e,t,r,{location:n=S.location,distance:o=S.distance,threshold:i=S.threshold,findAllMatches:a=S.findAllMatches,minMatchCharLength:s=S.minMatchCharLength,includeMatches:l=S.includeMatches,ignoreLocation:c=S.ignoreLocation}={}){let u;if(t.length>32)throw Error("Pattern length exceeds max of 32.");let d=t.length,f=e.length,h=Math.max(0,Math.min(n,f)),p=i,m=h,g=(e,t)=>{let r=e/d;if(c)return r;let n=Math.abs(h-t);return o?r+n/o:n?1:r},y=s>1||l,v=y?Array(f):[];for(;(u=e.indexOf(t,m))>-1;)if(p=Math.min(g(0,u),p),m=u+d,y){let e=0;for(;e<d;)v[u+e]=1,e+=1}m=-1;let b=[],_=1,x=0,w=d+f,A=1<<d-1;for(let t=0;t<d;t+=1){let n=0,o=w;for(;n<o;)g(t,h+o)<=p?n=o:w=o,o=Math.floor((w-n)/2+n);w=o;let i=Math.max(1,h-o+1),s=a?f:Math.min(h+o,f)+d,l=Array(s+2);l[s+1]=(1<<t)-1;for(let n=s;n>=i;n-=1){let o=n-1,a=r[e[o]];if(l[n]=(l[n+1]<<1|1)&a,t&&(l[n]|=(b[n+1]|b[n])<<1|1|b[n+1]),l[n]&A&&(_=g(t,o))<=p){if(p=_,m=o,x=t,m<=h)break;i=Math.max(1,2*h-m)}}if(g(t+1,h)>p)break;b=l}if(y&&m>=0){let t=Math.min(f-1,m+d-1+x);for(let n=m;n<=t;n+=1)r[e[n]]&&(v[n]=1)}let C={isMatch:m>=0,score:Math.max(.001,_)};if(y){let e=function(e=[],t=S.minMatchCharLength){let r=[],n=-1,o=-1,i=0;for(let a=e.length;i<a;i+=1){let a=e[i];a&&-1===n?n=i:a||-1===n||((o=i-1)-n+1>=t&&r.push([n,o]),n=-1)}return e[i-1]&&i-n>=t&&r.push([n,i-1]),r}(v,s);e.length?l&&(C.indices=e):C.isMatch=!1}return C}(e,t,r,{location:o+h,distance:i,threshold:a,findAllMatches:s,minMatchCharLength:l,includeMatches:n,ignoreLocation:c});p&&(f=!0),d+=m,p&&g&&u.push(...g)});let h={isMatch:f,score:f?d/this.chunks.length:1};return f&&n&&(h.indices=E(u)),h}};let N=new Set(["fuzzy","include"]),T=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){let r=t===e;return{isMatch:r,score:+!r,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let r,n=0,o=[],i=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+i,o.push([r,n-1]);let a=!!o.length;return{isMatch:a,score:+!a,indices:o}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){let r=t.startsWith(e);return{isMatch:r,score:+!r,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){let r=!t.startsWith(e);return{isMatch:r,score:+!r,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){let r=!t.endsWith(e);return{isMatch:r,score:+!r,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){let r=t.endsWith(e);return{isMatch:r,score:+!r,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){let r=-1===t.indexOf(e);return{isMatch:r,score:+!r,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let r=new R(e,{location:t.location??S.location,threshold:t.threshold??S.threshold,distance:t.distance??S.distance,includeMatches:t.includeMatches??S.includeMatches,findAllMatches:t.findAllMatches??S.findAllMatches,minMatchCharLength:t.minMatchCharLength??S.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??S.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??S.ignoreDiacritics,ignoreLocation:t.ignoreLocation??S.ignoreLocation});return{type:"fuzzy",search:e=>r.searchIn(e)}}}],M=T.length;function D(e,t){let r=e.match(t);return r?r[1]:null}var L=class{constructor(e,{isCaseSensitive:t=S.isCaseSensitive,ignoreDiacritics:r=S.ignoreDiacritics,includeMatches:n=S.includeMatches,minMatchCharLength:o=S.minMatchCharLength,ignoreLocation:i=S.ignoreLocation,findAllMatches:a=S.findAllMatches,location:s=S.location,threshold:l=S.threshold,distance:c=S.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:r,includeMatches:n,minMatchCharLength:o,findAllMatches:a,ignoreLocation:i,location:s,threshold:l,distance:c},e=t?e:e.toLowerCase(),e=r?k(e):e,this.pattern=e,this.query=function(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(e=>{let r=(function(e){let t=[],r=e.length,n=0;for(;n<r;){for(;n<r&&" "===e[n];)n++;if(n>=r)break;let o=n;for(;o<r&&" "!==e[o]&&'"'!==e[o];)o++;if(o<r&&'"'===e[o]){for(o++;o<r;
1){if('"'===e[o]){let t=o+1;if(t>=r||" "===e[t]){o++;break}if("$"===e[t]&&(t+1>=r||" "===e[t+1])){o+=2;break}}o++}t.push(e.substring(n,o)),n=o}else{for(;o<r&&" "!==e[o];)o++;t.push(e.substring(n,o)),n=o}}return t})(e.replace(/\u0000/g,"|").trim()).filter(e=>e&&!!e.trim()),n=[];for(let e=0,o=r.length;e<o;e+=1){let o=r[e],i=!1,a=-1;for(;!i&&++a<M;){let e=T[a],r=D(o,e.multiRegex);r&&(n.push(e.create(r,t)),i=!0)}if(!i)for(a=-1;++a<M;){let e=T[a],r=D(o,e.singleRegex);if(r){n.push(e.create(r,t));break}}}return n})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){let t=this.query;if(!t)return{isMatch:!1,score:1};let{includeMatches:r,isCaseSensitive:n,ignoreDiacritics:o}=this.options;e=n?e:e.toLowerCase(),e=o?k(e):e;let i=0,a=[],s=0,l=!1;for(let n=0,o=t.length;n<o;n+=1){let o=t[n];a.length=0,i=0,l=!1;for(let t=0,n=o.length;t<n;t+=1){let n=o[t],{isMatch:c,indices:u,score:d}=n.search(e);if(c)i+=1,s+=d,n.type.startsWith("inverse")&&(l=!0),r&&(N.has(n.type)?a.push(...u):a.push(u));else{s=0,i=0,a.length=0,l=!1;break}}if(i){let e={isMatch:!0,score:s/i};return l&&(e.hasInverse=!0),r&&(e.indices=E(a)),e}}return{isMatch:!1,score:1}}};let F=[];function B(...e){F.push(...e)}function O(e,t){for(let r=0,n=F.length;r<n;r+=1){let n=F[r];if(n.condition(e,t))return new n(e,t)}return new R(e,t)}let P="$and",z="$path",G=e=>!!(e[P]||e.$or),$=e=>({[P]:Object.keys(e).map(t=>({[t]:e[t]}))});function H(e,t,{auto:r=!0}={}){let n=e=>{if(d(e)){let n={keyId:null,pattern:e};return r&&(n.searcher=O(e,t)),n}let o=Object.keys(e),i=!!e[z];if(!i&&o.length>1&&!G(e))return n($(e));if(!c(e)&&h(e)&&!G(e)){let n=i?e[z]:o[0],a=i?e.$val:e[n];if(!d(a))throw Error(`Invalid value for key ${n}`);let s={keyId:w(n),pattern:a};return r&&(s.searcher=O(a,t)),s}let a={children:[],operator:o[0]};return o.forEach(t=>{let r=e[t];c(r)&&r.forEach(e=>{a.children.push(n(e))})}),a};return G(e)||(e=$(e)),n(e)}function U(e,{ignoreFieldNorm:t=S.ignoreFieldNorm}){let r=1;return e.forEach(({key:e,norm:n,score:o})=>{let i=e?e.weight:null;r*=Math.pow(0===o&&i?Number.EPSILON:o,(i||1)*(t?1:n))}),r}var V=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):0>this.comparator(e,this.heap[0])&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(){return this.heap.sort(this.comparator)}_bubbleUp(e){let t=this.heap;for(;e>0;){let r=e-1>>1;if(0>=this.comparator(t[e],t[r]))break;let n=t[e];t[e]=t[r],t[r]=n,e=r}}_sinkDown(e){let t=this.heap,r=t.length,n=e;do{let o=2*(e=n)+1,i=2*e+2;if(o<r&&this.comparator(t[o],t[n])>0&&(n=o),i<r&&this.comparator(t[i],t[n])>0&&(n=i),n!==e){let r=t[e];t[e]=t[n],t[n]=r}}while(n!==e)}};let W=/[\p{L}\p{M}\p{N}_]+/gu,K=new WeakSet;function q({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:r}={}){let n=function(e){if("function"==typeof e){let t=!1;return r=>{let n=e(r);if(!t&&(t=!0,!Array.isArray(n)||n.some(e=>"string"!=typeof e)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(n)?"array containing non-strings":typeof n}.`);return n}}if(e instanceof RegExp)return!e.global&&(K.has(e)||(K.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))),t=>t.match(e)||[];return e=>e.match(W)||[]}(r);return{tokenize:r=>(e||(r=r.toLowerCase()),t&&(r=k(r)),n(r))}}var Y=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=q({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const r=this.analyzer.tokenize(e),{df:n,fieldCount:o}=t._invertedIndex;for(const e of(this.termSearchers=[],this.idfWeights=[],r)){this.termSearchers.push(new R(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const r=n.get(e)||0,i=Math.log(1+(o-r+.5)/(r+.5));this.idfWeights.push(i)}this.combineAll="all"===t.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],r=0,n=0,o=0,i=0,a=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s<this.termSearchers.length;s++){let l=this.termSearchers[s].searchIn(e),c=this.idfWeights[s];
1n+=c,l.isMatch&&(o++,r+=c*(1-l.score),l.indices&&t.push(...l.indices),this.combineAll&&(this.useMask?i|=1<<s:a.add(s)))}if(0===o)return{isMatch:!1,score:1};let s={isMatch:!0,score:Math.max(.001,n>0?1-r/n:0)};return this.options.includeMatches&&t.length&&(s.indices=E(t)),this.combineAll&&(this.useMask?s.matchedMask=i:s.matchedTerms=a,s.termCount=this.numTerms),s}};function X(e,t,r,n){let o=n.tokenize(t);if(!o.length)return;e.fieldCount++,e.docFieldCount.set(r,(e.docFieldCount.get(r)||0)+1);let i=new Set(o),a=e.docTermFieldHits.get(r);for(let t of(a||(a=new Map,e.docTermFieldHits.set(r,a)),i))a.set(t,(a.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function Q(e,t,r,n){let{i:o,v:i,$:a}=t;if(void 0!==i)return void X(e,i,o,n);if(a)for(let t=0;t<r;t++){let r=a[t];if(r)if(Array.isArray(r))for(let t of r)X(e,t.v,o,n);else X(e,r.v,o,n)}}function J(e,t){if(0===t.length)return;let r=Array.from(new Set(t)).sort((e,t)=>e-t);for(let t of r)!function(e,t){let r=e.docFieldCount.get(t);if(void 0===r)return;e.fieldCount-=r,e.docFieldCount.delete(t);let n=e.docTermFieldHits.get(t);if(n){for(let[t,r]of n){let n=(e.df.get(t)||0)-r;n<=0?e.df.delete(t):e.df.set(t,n)}e.docTermFieldHits.delete(t)}}(e,t);let n=e=>{let t=0,n=r.length;for(;t<n;){let o=t+n>>>1;r[o]<e?t=o+1:n=o}return e-t},o=r[0],i=new Map;for(let[t,r]of e.docFieldCount)i.set(t>o?n(t):t,r);e.docFieldCount=i;let a=new Map;for(let[t,r]of e.docTermFieldHits)a.set(t>o?n(t):t,r);e.docTermFieldHits=a}var Z=class{constructor(e,t,r){this.options={...S,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new b(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,r),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=O(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof A))throw Error("Incorrect 'index' type");if(this._myIndex=t||C(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=q({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function(e,t,r){let n={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(let o of e)Q(n,o,t,r);return n}(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!p(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){var r;let e=q({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});r=this._invertedIndex,Q(r,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],r=[];for(let n=0,o=this._docs.length;n<o;n+=1)e(this._docs[n],n)&&(t.push(this._docs[n]),r.push(n));if(r.length){this._invertedIndex&&J(this._invertedIndex,r);let e=new Set(r);this._docs=this._docs.filter((t,r)=>!e.has(r)),this._myIndex.removeAll(r),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(y);this._invertedIndex&&J(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let r,{limit:n=-1}=t||{},{includeMatches:o,includeScore:i,shouldSort:a,sortFn:s,ignoreFieldNorm:l}=this.options;if(d(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return f(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&f(n)&&n>0&&d(e),u=(e,t)=>
1s(e,t)||e.idx-t.idx;if(c){let t=new V(n,u);d(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:l}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:l}),r=t.extractSorted()}else!function(e,{ignoreFieldNorm:t=S.ignoreFieldNorm}){e.forEach(e=>{e.score=U(e.matches,{ignoreFieldNorm:t})})}(r=d(e)?d(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),{ignoreFieldNorm:l}),a&&r.sort(d(e)?u:s),f(n)&&n>-1&&(r=r.slice(0,n));return function(e,t,{includeMatches:r=S.includeMatches,includeScore:n=S.includeScore}={}){return e.map(e=>{let o,{idx:i}=e,a={item:t[i],refIndex:i};return r&&(o=[],e.matches.forEach(e=>{if(!p(e.indices)||!e.indices.length)return;let t={indices:e.indices,value:e.value};e.key&&(t.key=e.key.id),e.idx>-1&&(t.refIndex=e.idx),o.push(t)}),a.matches=o),n&&(a.score=e.score),a})}(r,this._docs,{includeMatches:o,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:r}={}){let n=this._getSearcher(e),o=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:i}=this._myIndex,a=t?null:[];return i.forEach(({v:e,i:i,n:s})=>{if(!p(e))return;let l=n.searchIn(e);if(l.isMatch){let n={score:l.score,value:e,norm:s,indices:l.indices};o&&(n.matchedMask=l.matchedMask,n.matchedTerms=l.matchedTerms,n.termCount=l.termCount);let c=[n];if(!o||this._coversAllTokens(c)){let n={item:e,idx:i,matches:c};t?(n.score=U(n.matches,{ignoreFieldNorm:r}),t.insert(n)):a.push(n)}}}),a}_searchLogical(e){let t=H(e,this.options),r=this._normalizedKeys(),n=(e,t,o)=>{if(!("children"in e)){let n,{keyId:i,searcher:a}=e;return(null===i?(n=[],r.forEach((e,r)=>{n.push(...this._findMatches({key:e,value:t[r],searcher:a}))})):n=this._findMatches({key:this._keyStore.get(i),value:this._myIndex.getValueForItemAtKeyId(t,i),searcher:a}),n&&n.length)?[{idx:o,item:t,matches:n}]:[]}let{children:i,operator:a}=e,s=[];for(let e=0,r=i.length;e<r;e+=1){let r=n(i[e],t,o);if(r.length)s.push(...r);else if(a===P)return[]}return s},o=this._myIndex.records,i=new Map,a=[];return o.forEach(({$:e,i:r})=>{if(p(e)){let o=n(t,e,r);o.length&&(i.has(r)||(i.set(r,{idx:r,item:e,matches:[]}),a.push(i.get(r))),o.forEach(({matches:e})=>{i.get(r).matches.push(...e)}))}}),a}_searchObjectList(e,{heap:t,ignoreFieldNorm:r}={}){let n=this._getSearcher(e),o=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:i}=this._myIndex,a=this._normalizedKeys(),s=t?null:[];return i.forEach(({$:e,i:i})=>{if(!p(e))return;let l=[],c=!1,u=!1;if(a.forEach((t,r)=>{let o=this._findMatches({key:t,value:e[r],searcher:n});o.length?(l.push(...o),o[0].hasInverse&&(u=!0)):c=!0}),(!u||!c)&&l.length&&(!o||this._coversAllTokens(l))){let n={idx:i,item:e,matches:l};t?(n.score=U(n.matches,{ignoreFieldNorm:r}),t.insert(n)):s.push(n)}}),s}_findMatches({key:e,value:t,searcher:r}){if(!p(t))return[];let n=[];if(c(t))t.forEach(({v:t,i:o,n:i})=>{if(!p(t))return;let a=r.searchIn(t);if(a.isMatch){let r={score:a.score,key:e,value:t,idx:o,norm:i,indices:a.indices,hasInverse:a.hasInverse};void 0!==a.termCount&&(r.matchedMask=a.matchedMask,r.matchedTerms=a.matchedTerms,r.termCount=a.termCount),n.push(r)}});else{let{v:o,n:i}=t,a=r.searchIn(o);if(a.isMatch){let t={score:a.score,key:e,value:o,norm:i,indices:a.indices,hasInverse:a.hasInverse};void 0!==a.termCount&&(t.matchedMask=a.matchedMask,t.matchedTerms=a.matchedTerms,t.termCount=a.termCount),n.push(t)}}return n}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(void 0===t)return!0;if(t<=31){let r=0;for(let t=0;t<e.length;t++)r|=e[t].matchedMask||0;return r===2**t-1}let r=new Set;for(let t=0;t<e.length;t++){let n=e[t].matchedTerms;if(n)for(let e of n)r.add(e)}return r.size===t}};Z.version="7.5.0",Z.createIndex=C,Z.parseIndex=function(e,{getFn:t=S.getFn,fieldNormWeight:r=S.fieldNormWeight}={}){let{keys:n,records:o}=e,i=new A({getFn:t,fieldNormWeight:r});return i.setKeys(n),i.setIndexRecords(o),i},Z.config=S,Z.match=function(e,t,r){if(r&&r.useTokenSearch)throw Error("Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.");return O(e,{...S,...r}).searchIn(t)}
1,Z.parseQuery=H,B(L),B(Y),Z.use=function(...e){e.forEach(e=>B(e))};var ee=e.i(94031),et=e.i(52916),er=e.i(43572),en=e.i(28296);let eo={keys:a.Locales.map(e=>`searchFields.${e}`),threshold:.3,includeMatches:!0,minMatchCharLength:1,distance:300};e.s(["default",0,({onSelect:e,selectedCharacters:r,target:s,characters:c,externalQuery:u,onQueryChange:d})=>{let f=(0,en.useTranslations)("Autocomplete"),h=(0,en.useTranslations)("characters"),p=(0,er.useLocale)(),[m,g]=(0,i.useState)(""),y=void 0!==u?u:m,v=d||g,[b,_]=(0,i.useState)([]),[x,w]=(0,i.useState)(!1),[S,A]=(0,i.useState)(-1),C=(0,i.useRef)(null),E=(0,i.useRef)(null),I=(0,i.useRef)(()=>void 0),j=((e,t)=>{let[r,n]=(0,i.useState)(e);return(0,i.useEffect)(()=>{let r=setTimeout(()=>{n(e)},t);return()=>{clearTimeout(r)}},[e,t]),r})(y,300),[k,R]=(0,i.useState)([]),[N,T]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e,t=!0,r=!1,n=null;l(c,Array.from(new Set([a.Locales.includes(p)?p:a.LocaleRoute.EN,a.LocaleRoute.EN]))).then(e=>{t&&!r&&(R(e),T(!0))});let o=()=>{(n??=l(c,a.Locales)).then(e=>{r=!0,t&&R(e)})};I.current=o;let i=window,s=window.setTimeout(()=>{void 0===(e=i.requestIdleCallback?.(o,{timeout:4e3}))&&o()},2500);return()=>{t=!1,window.clearTimeout(s),void 0!==e&&i.cancelIdleCallback?.(e)}},[c,p]);let M=(0,i.useMemo)(()=>k.filter(e=>!r.some(t=>t.playerId===e.playerId)),[k,r]),D=(0,i.useMemo)(()=>new Z(M,eo),[M]);(0,i.useEffect)(()=>{let e=e=>{C.current&&!C.current.contains(e.target)&&E.current&&!E.current.contains(e.target)&&w(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,i.useEffect)(()=>{j?(_(D.search(j,{limit:10}).map(e=>e.item)),w(!0)):(_([]),w(!1)),A(0)},[j,D]),(0,i.useEffect)(()=>{let e=y.trim();if(!e)return;let t=window.setTimeout(()=>{for(let{item:t}of D.search(e,{limit:10})){let e=new window.Image;e.decoding="async",e.src=(0,o.getAvatarUrl)(t.playerId)}},75);return()=>window.clearTimeout(t)},[D,y]);let L=t=>{e(t),v(""),_([]),w(!1),C.current?.focus()};(0,i.useEffect)(()=>{E.current&&S>=0&&E.current.children[S].scrollIntoView({behavior:"smooth",block:"nearest"})},[S]);let F=({character:e})=>{let r=(0,o.getAvatarUrl)(e.playerId);return(0,t.jsxs)("div",{className:"flex items-center gap-2 cursor-pointer rounded",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-10 h-10 rounded-xl overflow-hidden",children:(0,t.jsx)(et.default,{src:r,alt:e.playerName,width:40,height:40,sizes:"40px",loading:"eager",className:"w-full h-full object-cover object-top",onError:e=>{e.currentTarget.src=`${o.ASSETS_URL}/icons/placeholder.png`}})}),(0,t.jsxs)("div",{className:"flex-grow",children:[(0,t.jsx)("div",{className:"font-medium",children:h(`${e.playerName}.name`)}),h(`${e.playerName}.alias`).length>0&&(0,t.jsx)("div",{className:"text-xs text-gray-500",children:h(`${e.playerName}.alias`)}),h(`${e.playerName}.epithet`).length>0&&(0,t.jsx)("div",{className:"text-xs text-gray-500",children:h(`${e.playerName}.epithet`)})]})]})};return(0,t.jsxs)("div",{className:"autocomplete-container w-full",children:[(0,t.jsxs)("div",{className:"search-field",children:[!1,(0,t.jsx)(n,{type:"search",name:"onepiece-character-search",autoComplete:"off",autoCorrect:"off",autoCapitalize:"none",spellCheck:!1,inputMode:"search",enterKeyHint:"search","aria-label":f("placeholder"),className:"search-input",value:y,onChange:e=>{v(e.target.value),e.target.value&&w(!0)},onKeyDown:e=>{if(x)switch(e.key){case"ArrowDown":A(e=>e>=b.length-1?0:e+1);break;case"ArrowUp":A(e=>e<=0?b.length-1:e-1);break;case"Enter":S>=0&&S<b.length&&L(b[S]);break;case"Escape":w(!1),_([])}},onFocus:()=>I.current(),placeholder:f("placeholder"),ref:C}),(0,t.jsx)("button",{type:"button",onClick:()=>{S>=0&&S<b.length&&L(b[S])},className:"search-submit absolute right-1.5 top-1/2 -translate-y-1/2","aria-label":f("placeholder"),children:(0,t.jsx)(ee.Search,{className:"h-5 w-5"})})]}),x&&y&&(0,t.jsx)("div",{className:"absolute top-full left-0 right-0 mt-1 z-50",children:(0,t.jsx)("div",{className:"rounded-md shadow-lg overflow-hidden border-none bg-white/95",children:(0,t.jsx)("div",{className:"max-h-60 overflow-y-auto",ref:E,children:b.length>0?b.map((e,r)=>(0,t.jsx)("div",{className:`search-suggestion cursor-pointer rounded-md border border-transparent p-2 ${S===r?"is-selected":""}`,onClick:()=>L(e),children:(0,t.jsx)(F,{character:e})},e.playerId)):(0,t.jsx)("div",{className:"p-4 text-center text-gray-500",children:N?f("noResults"):"â¦"})})})})]})}],93933);var ei=e.i(74822);let ea=(0,ei.default)("clock-3",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]]);var es=e.i(70053);function el({layout:e="standalone",variant:r="initial"}){var n;let o=(0,en.useTranslations)("VictoryBanner"),a=(0,i.useRef)(0),[s,l]=(0,i.useState)(null);(0,i.useEffect)(()=>{let e;a.current=Date.UTC((e=new Date).getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()+1);let t=()=>{let e=Math.max(0,Math.ceil((a.current-Date.now())/1e3));l(e),0===e&&window.location.reload()};t();let r=window.setInterval(t,1e3);return()=>window.clearInterval(r)},[]);let c=null===(n=s)?"--:--:--":[Math.floor(n/3600),Math.floor(n%3600/60),n%60].map(e=>String(e).padStart(2,"0")).join(":");return(0,t.jsxs)("div",{className:`${es.default.timer} ${es.default[r]} ${es.default[e]}`,role:"timer","aria-label":`${o("nextReset")} ${c}`,title:o("resetTimeDesc"),children:[(0,t.jsx)(ea,{className:es.default.icon,"aria-hidden":"true"}),(0,t.jsx)("span",{className:es.default.label,children:o("nextReset")}),(0,t.jsx)("time",{className:es.default.value,suppressHydrationWarning:!0,children:c}),(0,t.jsx)("span",{className:es.default.utc,children:"UTC"})]})}var ec=e.i(35697),eu=e.i(57667);function ed({characterId:e,alt:r}){let[n,a]=(0,i.useState)(!0);return n?(0,t.jsx)(et.default,{className:eu.default.avatar,src:(0,o.getAvatarUrl)(e),alt:r,"aria-hidden":"true",width:36,height:36,sizes:"36px",onError:()=>a(!1)}):null}function ef({characterId:e,characterName:r,gameTitle:n,onCharacterClick:o}){let i=(0,en.useTranslations)(),a=(0,en.useTranslations)("characters")(`${r}.name`);return(0,t.jsx)("div",{className:eu.default.wrapper,children:(0,t.jsx)("span",{className:eu.default.sentence,children:i.rich("YesterdayTarget",{characterName:a,element:r=>(0,t.jsxs)("button",{className:eu.default.characterButton,type:"button",onClick:o,children:[null!==e&&(0,t.jsx)(ed,{characterId:e,alt:`${n}: ${a}`},e),(0,t.jsx)("span",{className:eu.default.characterName,children:r})]})})})})}e.s(["default",0,({victory:e,celebrated:r,victoryBannerRef:n,victoryBanner:o,victoryAnswer:i,victoryActions:a,yesterdayTarget:s,yesterdayTargetId:l,gameTitle:c,guessCount:u,clueContainer:d,renderAutocomplete:f,renderGuessGrid:h,topControl
1s:p,victoryLayout:m="stacked",onYesterdayTargetClick:g})=>{let y=(0,en.useTranslations)("GuessHistory"),v=h();return(0,t.jsxs)("div",{className:"main-content","data-victory":String(e),children:[e&&!r&&(0,t.jsx)("div",{className:"confetti-container",children:(0,t.jsx)(ec.default,{})}),p?(0,t.jsxs)("div",{className:"game-toolbar",children:[!e&&(0,t.jsx)(el,{layout:"toolbar"}),p]}):!e&&(0,t.jsx)(el,{}),e&&(0,t.jsx)("div",{className:"game-panel victory-panel border-container",children:(0,t.jsxs)("div",{ref:n,className:"victory-content","data-layout":m,children:[i,o,a]})}),!e&&d,!e&&(0,t.jsx)("div",{className:"autocomplete-section",children:f()}),e?(0,t.jsxs)("details",{className:"victory-guess-history",children:[(0,t.jsx)("summary",{children:y("summary",{count:u})}),(0,t.jsx)("div",{className:"victory-guess-history-content",children:v})]}):v,!e&&(0,t.jsx)("div",{className:"yesterday-target-section",children:(0,t.jsx)(ef,{characterId:l,characterName:s??"",gameTitle:c,onCharacterClick:g})})]})}],52248);var eh=e.i(82689);e.s(["default",0,function(){return(0,t.jsx)("div",{className:"loading-section",children:(0,t.jsx)("div",{className:"loading-squares",children:eh.spinnerLoader})})}],18271);var ep=eh;let em=(0,ei.default)("circle-check-big",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);var eg=e.i(55243),ey=e.i(37603);function ev({attempts:e,gameMode:r}){let n=r!==ep.GameMode.OP2048;return(0,t.jsxs)("div",{className:`${ey.default.actions} ${n?ey.default.brandActions:""}`,children:[(0,t.jsx)(el,{variant:"victory"}),(0,t.jsx)("div",{className:ey.default.shareBlock,children:(0,t.jsx)(eg.default,{attempts:e,gameMode:r})})]})}e.s(["VictoryActions",0,ev,"VictoryBanner",0,({attempts:e,rank:r,gameMode:n=ep.GameMode.CLASSIC,titleOverride:o,descriptionOverride:i,showActions:a=!0})=>{let s=(0,en.useTranslations)("VictoryBanner"),l=n!==ep.GameMode.OP2048,c=o??s(n===ep.GameMode.LAUGH?"laughTitle":"title");return(0,t.jsxs)("section",{className:`${ey.default.banner} ${n===ep.GameMode.WANTED?ey.default.compactBanner:""} ${l?ey.default.brandResult:""} victory-banner animate-fadeIn`,children:[(0,t.jsxs)("div",{className:ey.default.heading,children:[(0,t.jsx)("span",{className:ey.default.successMark,"aria-hidden":"true",children:(0,t.jsx)(em,{})}),(0,t.jsx)("p",{className:ey.default.title,children:c}),(0,t.jsx)("p",{className:ey.default.description,children:i??s(n===ep.GameMode.LAUGH?"laughDescription":"description",{attempts:e})})]}),void 0===r?(0,t.jsx)("div",{className:ey.default.rank,"aria-label":s("rankLoading"),children:(0,t.jsxs)("span",{className:ey.default.rankLoader,"aria-hidden":"true",children:[(0,t.jsx)("i",{}),(0,t.jsx)("i",{}),(0,t.jsx)("i",{})]})}):null!==r?(0,t.jsx)("p",{className:ey.default.rank,children:s.rich("congratsRank",{rank:r,rankElement:e=>(0,t.jsx)("span",{className:ey.default.rankValue,children:e})})}):null,a&&(0,t.jsx)(ev,{attempts:e,gameMode:n})]})}],74664)},40606,6701,e=>{"use strict";let t="anime";function r(e){return"endOfWano"===e||"anime"===e||"manga"===e?e:null}e.s(["DEFAULT_STORY_PROGRESS",0,t,"STORY_PROGRESS_COOKIE",0,"onepiecedle-story-progress","STORY_PROGRESS_HINT_COOKIE",0,"onepiecedle-story-progress-hint-seen","STORY_PROGRESS_STORAGE_KEY",0,"onepiecedle-story-progress","normalizeStoryProgress",0,r,"resolveClientStoryProgress",0,function({queryValue:e,storedValue:t,serverValue:n}){return r(e)??r(t)??n},"storyProgressBoundaries",0,{endOfWano:{chapter:1057,episode:1085,asOf:"2023-11-26"},anime:{chapter:1146,episode:1176,asOf:"2026-08-30"},manga:{chapter:1191,episode:1176,asOf:"2026-08-30"}}],6701);var n=e.i(33030);let o={characters:[],dailyCharacter:null,yesterdayTarget:null,dailySeed:"",storyProgress:t},i=(0,n.createContext)(o),a=(0,n.createContext)({...o,laugh:""}),s=(0,n.createContext)({characters:[],dailyCharacter:null,acceptedTargetIds:[],yesterdayTarget:null,dailySeed:"",storyProgress:t});e.s(["CharacterContext",0,i,"CharacterLaughContext",0,a,"DevilFruitContext",0,s],40606)},37256,e=>{"use strict";var t=e.i(33030);e.s(["useAutocompleteControl",0,function(){let[e,r]=(0,t.useState)("");return{query:e,setQuery:r}}])},26605,(e,t,r)=>{"use strict";
1Object.defineProperty(r,"__esModule",{value:!0});var n={callServer:function(){return i.callServer},createServerReference:function(){return s.createServerReference},findSourceMapURL:function(){return a.findSourceMapURL}};for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]});let i=e.r(80735),a=e.r(70170),s=e.r(89738)},20924,(e,t,r)=>{t.exports=(function t(r,n,o){function i(s,l){if(!n[s]){if(!r[s]){var c=e.t;return!l&&c?c(s,!0):a(s,!0)}var u=n[s]={exports:{}};r[s][0].call(u.exports,function(e){return i(r[s][1][e]||e)},u,u.exports,t,r,n,o)}return n[s].exports}for(var a=e.t,s=0;s<o.length;s++)i(o[s]);return i})({1:[function(t,r,n){(function(e){"use strict";var t,n,o=e.MutationObserver||e.WebKitMutationObserver;if(o){var i=0,a=new o(u),s=e.document.createTextNode("");a.observe(s,{characterData:!0}),t=function(){s.data=i=++i%2}}else if(e.setImmediate||void 0===e.MessageChannel)t="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var l=new e.MessageChannel;l.port1.onmessage=u,t=function(){l.port2.postMessage(0)}}var c=[];function u(){n=!0;for(var e,t,r=c.length;r;){for(t=c,c=[],e=-1;++e<r;)t[e]();r=c.length}n=!1}r.exports=function(e){1!==c.push(e)||n||t()}}).call(this,e.g)},{}],2:[function(e,t,r){"use strict";var n=e(1);function o(){}var i={},a=["REJECTED"],s=["FULFILLED"],l=["PENDING"];function c(e){if("function"!=typeof e)throw TypeError("resolver must be a function");this.state=l,this.queue=[],this.outcome=void 0,e!==o&&h(this,e)}function u(e,t,r){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof r&&(this.onRejected=r,this.callRejected=this.otherCallRejected)}function d(e,t,r){n(function(){var n;try{n=t(r)}catch(t){return i.reject(e,t)}n===e?i.reject(e,TypeError("Cannot resolve promise with itself")):i.resolve(e,n)})}function f(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function h(e,t){var r=!1;function n(t){r||(r=!0,i.reject(e,t))}function o(t){r||(r=!0,i.resolve(e,t))}var a=p(function(){t(o,n)});"error"===a.status&&n(a.value)}function p(e,t){var r={};try{r.value=e(t),r.status="success"}catch(e){r.status="error",r.value=e}return r}t.exports=c,c.prototype.catch=function(e){return this.then(null,e)},c.prototype.then=function(e,t){if("function"!=typeof e&&this.state===s||"function"!=typeof t&&this.state===a)return this;var r=new this.constructor(o);return this.state!==l?d(r,this.state===s?e:t,this.outcome):this.queue.push(new u(r,e,t)),r},u.prototype.callFulfilled=function(e){i.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){i.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},i.resolve=function(e,t){var r=p(f,t);if("error"===r.status)return i.reject(e,r.value);var n=r.value;if(n)h(e,n);else{e.state=s,e.outcome=t;for(var o=-1,a=e.queue.length;++o<a;)e.queue[o].callFulfilled(t)}return e},i.reject=function(e,t){e.state=a,e.outcome=t;for(var r=-1,n=e.queue.length;++r<n;)e.queue[r].callRejected(t);return e},c.resolve=function(e){return e instanceof this?e:i.resolve(new this(o),e)},c.reject=function(e){var t=new this(o);return i.reject(t,e)},c.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(TypeError("must be an array"));var r=e.length,n=!1;if(!r)return this.resolve([]);for(var a=Array(r),s=0,l=-1,c=new this(o);++l<r;)!function(e,o){t.resolve(e).then(function(e){a[o]=e,++s!==r||n||(n=!0,i.resolve(c,a))},function(e){n||(n=!0,i.reject(c,e))})}(e[l],l);return c},c.race=function(e){var t,r=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(TypeError("must be an array"));var n=e.length,a=!1;if(!n)return this.resolve([]);for(var s=-1,l=new this(o);++s<n;){t=e[s],r.resolve(t).then(function(e){a||(a=!0,i.resolve(l,e))},function(e){a||(a=!0,i.reject(l,e))})}return l}},{1:1}],3:[function(t,r,n){(function(e){"use strict";"function"!=typeof e.Promise&&(e.Promise=t(2))}).call(this,e.g)},{2:2}],4:[function(e,t,r){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(){try{if("u">typeof indexedDB)return indexedDB;if("u">typeof webkitIndexedDB)return webkitIndexedDB;if("u">typeof mozIndexedDB)return mozIndexedDB;if("u">typeof OIndexedDB)return OIndexedDB;if("u">typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function i(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(o){if("TypeError"!==o.name)throw o;for(var r=new("u">typeof BlobBuilder?BlobBuilder:"u">typeof MSBlobBuilder?MSBlobBuilder:"u">typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),n=0;n<e.length;n+=1)r.append(e[n]);return r.getBlob(t.type)}}"u"<typeof Promise&&e(3);var a=Promise;function s(e,t){t&&e.then(function(e){t(null,e)},function(e){t(e)})}function l(e,t,r){"function"==typeof t&&e.then(t),"function"==typeof r&&e.catch(r)}function c(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function u(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var d="local-forage-detect-blob-support",f=void 0,h={},p=Object.prototype.toString,m="readonly",g="readwrite";function y(e){var t=h[e.name],r={};r.promise=new a(function(e,t){r.resolve=e,r.reject=t}),t.deferredOperations.push(r),t.dbReady?t.dbReady=t.dbReady.then(function(){return r.promise}):t.dbReady=r.promise}function v(e){var t=h[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function b(e,t){var r=h[e.name].deferredOperations.pop();if(r)return r.reject(t),r.promise}function _(e,t){return new a(function(r,n){if(h[e.name]=h[e.name]||E(),e.db)if(!t)return r(e.db);else y(e),e.db.close();var i=[e.name];t&&i.push(e.version);var a=o.open.apply(o,i);t&&(a.onupgradeneeded=function(t){var r=a.result;try{r.createObjectStore(e.storeName),t.oldVersion<=1&&r.createObjectStore(d)}catch(r){if("ConstraintError"===r.name)console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.');else throw r}}),a.onerror=function(e){e.preventDefault(),n(a.error)},a.onsuccess=function(){var t=a.result;t.onversionchange=function(e){e.target.close()},r(t),v(e)}})}function x(e,t){if(!e.db)return!0;var r=!e.db.objectStoreNames.contains(e.storeName),n=e.version<e.db.version,o=e.version>e.db.version;if(n&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),o||r){if(r){var i=e.db.version+1;i>e.version&&(e.version=i)}return!0}return!1}function w(e){return i([function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),o=0;o<t;o++)n[o]=e.charCodeAt(o);return r}(atob(e.data))],{type:e.type})}function S(e){return e&&e.__local_forage_encoded_blob}function A(e){var t=this,r=t._initReady().then(function(){var e=h[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady});return l(r,e,e),r}function C(e,t,r,n){void 0===n&&(n=1);try{var o=e.db.transaction(e.storeName,t);r(null,o)}catch(o){if(n>0&&(!e.db||"InvalidStateError"===o.name||"NotFoundError"===o.name))return a.resolve().then(function(){if(!e.db||"NotFoundError"===o.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),_(e,!0)}).then(function(){return(function(e){y(e);for(var t=h[e.name],r=t.forages,n=0;n<r.length;n++){var o=r[n];o._dbInfo.db&&(o._dbInfo.db.close(),o._dbInfo.db=null)}
1return e.db=null,_(e,!1).then(function(t){return(e.db=t,x(e))?_(e,!0):t}).then(function(n){e.db=t.db=n;for(var o=0;o<r.length;o++)r[o]._dbInfo.db=n}).catch(function(t){throw b(e,t),t})})(e).then(function(){C(e,t,r,n-1)})}).catch(r);r(o)}}function E(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}var I={_driver:"asyncStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]=e[n];var o=h[r.name];o||(o=E(),h[r.name]=o),o.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=A);var i=[];function s(){return a.resolve()}for(var l=0;l<o.forages.length;l++){var c=o.forages[l];c!==t&&i.push(c._initReady().catch(s))}var u=o.forages.slice(0);return a.all(i).then(function(){return r.db=o.db,_(r,!1)}).then(function(e){return(r.db=e,x(r,t._defaultConfig.version))?_(r,!0):e}).then(function(e){r.db=o.db=e,t._dbInfo=r;for(var n=0;n<u.length;n++){var i=u[n];i!==t&&(i._dbInfo.db=r.db,i._dbInfo.version=r.version)}})},_support:function(){try{if(!o||!o.open)return!1;var e="u">typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"u">typeof indexedDB&&"u">typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=new a(function(t,n){r.ready().then(function(){C(r._dbInfo,m,function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).openCursor(),s=1;a.onsuccess=function(){var r=a.result;if(r){var n=r.value;S(n)&&(n=w(n));var o=e(n,r.key,s++);void 0!==o?t(o):r.continue()}else t()},a.onerror=function(){n(a.error)}}catch(e){n(e)}})}).catch(n)});return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new a(function(t,n){r.ready().then(function(){C(r._dbInfo,m,function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).get(e);a.onsuccess=function(){var e=a.result;void 0===e&&(e=null),S(e)&&(e=w(e)),t(e)},a.onerror=function(){n(a.error)}}catch(e){n(e)}})}).catch(n)});return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var o=new a(function(r,o){var s;n.ready().then(function(){return(s=n._dbInfo,"[object Blob]"===p.call(t))?(function(e){return"boolean"==typeof f?a.resolve(f):new a(function(t){var r=e.transaction(d,g),n=i([""]);r.objectStore(d).put(n,"key"),r.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},r.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/);t(navigator.userAgent.match(/Edge\//)||!e||parseInt(e[1],10)>=43)}}).catch(function(){return!1}).then(function(e){return f=e})})(s.db).then(function(e){return e?t:new a(function(e,r){var n=new FileReader;n.onerror=r,n.onloadend=function(r){e({__local_forage_encoded_blob:!0,data:btoa(r.target.result||""),type:t.type})},n.readAsBinaryString(t)})}):t}).then(function(t){C(n._dbInfo,g,function(i,a){if(i)return o(i);try{var s=a.objectStore(n._dbInfo.storeName);null===t&&(t=void 0);var l=s.put(t,e);a.oncomplete=function(){void 0===t&&(t=null),r(t)},a.onabort=a.onerror=function(){var e=l.error?l.error:l.transaction.error;o(e)}}catch(e){o(e)}})}).catch(o)});return s(o,r),o},removeItem:function(e,t){var r=this;e=c(e);var n=new a(function(t,n){r.ready().then(function(){C(r._dbInfo,g,function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName).delete(e);i.oncomplete=function(){t()},i.onerror=function(){n(a.error)},i.onabort=function(){var e=a.error?a.error:a.transaction.error;n(e)}}catch(e){n(e)}})}).catch(n)});return s(n,t),n},clear:function(e){var t=this,r=new a(function(e,r){t.ready().then(function(){C(t._dbInfo,g,function(n,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).clear();o.oncomplete=function(){e()},o.onabort=o.onerror=function(){var e=i.error?i.error:i.transaction.error;r(e)}}catch(e){r(e)}})}).catch(r)});return s(r,e),r},length:function(e){var t=this,r=new a(function(e,r){t.ready().then(function(){C(t._dbInfo,m,function(n,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).count();i.onsuccess=function(){e(i.result)},i.onerror=function(){r(i.error)}}catch(e){r(e)}})}).catch(r)});return s(r,e),r},key:function(e,t){var r=this,n=new a(function(t,n){e<0?t(null):r.ready().then(function(){C(r._dbInfo,m,function(o,i){if(o)return n(o);try{var a=i.objectStore(r._dbInfo.storeName),s=!1,l=a.openKeyCursor();l.onsuccess=function(){var r=l.result;r?0===e||s?t(r.key):(s=!0,r.advance(e)):t(null)},l.onerror=function(){n(l.error)}}catch(e){n(e)}})}).catch(n)});return s(n,t),n},keys:function(e){var t=this,r=new a(function(e,r){t.ready().then(function(){C(t._dbInfo,m,function(n,o){if(n)return r(n);try{var i=o.objectStore(t._dbInfo.storeName).openKeyCursor(),a=[];i.onsuccess=function(){var t=i.result;t?(a.push(t.key),t.continue()):e(a)},i.onerror=function(){r(i.error)}}catch(e){r(e)}})}).catch(r)});return s(r,e),r},dropInstance:function(e,t){t=u.apply(this,arguments);var r,n=this.config();if((e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName),e.name){var i=e.name===n.name&&this._dbInfo.db?a.resolve(this._dbInfo.db):_(e,!1).then(function(t){var r=h[e.name],n=r.forages;r.db=t;for(var o=0;o<n.length;o++)n[o]._dbInfo.db=t;return t});r=e.storeName?i.then(function(t){if(t.objectStoreNames.contains(e.storeName)){var r=t.version+1;y(e);var n=h[e.name],i=n.forages;t.close();for(var s=0;s<i.length;s++){var l=i[s];l._dbInfo.db=null,l._dbInfo.version=r}return new a(function(t,n){var i=o.open(e.name,r);i.onerror=function(e){i.result.close(),n(e)},i.onupgradeneeded=function(){i.result.deleteObjectStore(e.storeName)},i.onsuccess=function(){var e=i.result;e.close(),t(e)}}).then(function(e){n.db=e;for(var t=0;t<i.length;t++){var r=i[t];r._dbInfo.db=e,v(r._dbInfo)}}).catch(function(t){throw(b(e,t)||a.resolve()).catch(function(){}),t})}}):i.then(function(t){y(e);var r=h[e.name],n=r.forages;t.close();for(var i=0;i<n.length;i++)n[i]._dbInfo.db=null;return new a(function(t,r){var n=o.deleteDatabase(e.name);n.onerror=function(){var e=n.result;e&&e.close(),r(n.error)},n.onblocked=function(){console.warn('dropInstance blocked for database "'+e.name+'" until all open connections are closed')},n.onsuccess=function(){var e=n.result;e&&e.close(),t(e)}}).then(function(e){r.db=e;for(var t=0;t<n.length;t++)v(n[t]._dbInfo)}).catch(function(t){throw(b(e,t)||a.resolve()).catch(function(){}),t})})}else r=a.reject("Invalid arguments");return s(r,t),r}},j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/",k=/^~~local_forage_type~([^~]+)~/,R="__lfsc__:",N=R.length,T="arbf",M="blob",D="si08",L="ui08",F="uic8",B="si16",O="si32",P="ur16",z="ui32",G="fl32",$="fl64",H=N+T.length,U=Object.prototype.toString;function V(e){var t,r,n,o,i,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);var c=new ArrayBuffer(a),u=new Uint8Array(c);for(t=0;t<s;t+=4)r=j.indexOf(e[t]),n=j.indexOf(e[t+1]),o=j.indexOf(e[t+2]),i=j.indexOf(e[t+3]),u[l++]=r<<2|n>>4,u[l++]=(15&n)<<4|o>>2,u[l++]=(3&o)<<6|63&i;return c}function W(e){var t,r=new Uint8Array(e),n="";for(t=0;t<r.length;t+=3)n+=j[r[t]>>2],n+=j[(3&r[t])<<4|r[t+1]>>4],n+=j[(15&r[t+1])<<2|r[t+2]>>6],n+=j[63&r[t+2]];return r.length%3==2?n=n.substring(0,n.length-1)+"=":r.length%3==1&&(n=n.substring(0,n.length-2)+"=="),n}var K={serialize:function(e,t){var r="";if(e&&(r=U.call(e)),e&&("[object ArrayBuffer]"===r||e.buffer&&"[object ArrayBuffer]"===U.call(e.buffer))){var n,o=R;e instanceof ArrayBuffer?(n=e,o+=T):(n=e.buffer,"[object Int8Array]"===r?o+=D:"[object Uint8Array]"===r?o+=L:"[object Uint8ClampedArray]"===r?o+=F:"[object Int16Array]"===r?o+=B:"[object Uint16Array]"===r?o+=P:"[object Int32Array]"===r?o+=O:"[object Uint32Array]"===r?o+=z:"[object Float32Array]"===r?o+=G:"[object Float64Array]"===r?o+=$:t(Error("Failed to get type for BinaryArray"))),t(o+W(n))}else if("[object Blob]"===r){var i=new FileReader;i.onload=function(){t(R+M+("~~local_forage_type~"+e.type+"~")+W(this.result))},i.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(r){console.error("Couldn't convert value into a JSON string: ",e),t(null,r)}},deserialize:function(e){if(e.substring(0,N)!==R)return JSON.parse(e);var t,r=e.substring(H),n=e.substring(N,H);if(n===M&&k.test(r)){var o=r.match(k);t=o[1],r=r.substring(o[0].length)}var a=V(r);switch(n){case T:return a;case M:return i([a],{type:t});case D:return new Int8Array(a);case L:return new Uint8Array(a);case F:return new Uint8ClampedArray(a);case B:return new Int16Array(a);case P:return new Uint16Array(a);case O:return new Int32Array(a);case z:return new Uint32Array(a);case G:return new Float32Array(a);case $:return new Float64Array(a);default:throw Error("Unkown type: "+n)}},stringToBuffer:V,bufferToString:W};function q(e,t,r,n){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],r,n)}function Y(e,t,r,n,o,i){e.executeSql(r,n,o,function(e,a){a.code===a.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],function(e,s){s.rows.length?i(e,a):q(e,t,function(){e.executeSql(r,n,o,i)},i)},i):i(e,a)},i)}function X(e,t,r,n){var o=this;e=c(e);var i=new a(function(i,a){o.ready().then(function(){void 0===t&&(t=null);var s=t,l=o._dbInfo;l.serializer.serialize(t,function(t,c){c?a(c):l.db.transaction(function(r){Y(r,l,"INSERT OR REPLACE INTO "+l.storeName+" (key, value) VALUES (?, ?)",[e,t],function(){i(s)},function(e,t){a(t)})},function(t){if(t.code===t.QUOTA_ERR){if(n>0)return void i(X.apply(o,[e,s,r,n-1]));a(t)}})})}).catch(a)});return s(i,r),i}var Q={_driver:"webSQLStorage",_initStorage:function(e){var t=this,r={db:null};if(e)for(var n in e)r[n]="string"!=typeof e[n]?e[n].toString():e[n];var o=new a(function(e,n){try{r.db=openDatabase(r.name,String(r.version),r.description,r.size)}catch(e){return n(e)}r.db.transaction(function(o){q(o,r,function(){t._dbInfo=r,e()},function(e,t){n(t)})},n)});return r.serializer=K,o},_support:"function"==typeof openDatabase,iterate:function(e,t){var r=this,n=new a(function(t,n){r.ready().then(function(){var o=r._dbInfo;o.db.transaction(function(r){Y(r,o,"SELECT * FROM "+o.storeName,[],function(r,n){for(var i=n.rows,a=i.length,s=0;s<a;s++){var l=i.item(s),c=l.value;if(c&&(c=o.serializer.deserialize(c)),void 0!==(c=e(c,l.key,s+1)))return void t(c)}t()},function(e,t){n(t)})})}).catch(n)});return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=new a(function(t,n){r.ready().then(function(){var o=r._dbInfo;o.db.transaction(function(r){Y(r,o,"SELECT * FROM "+o.storeName+" WHERE key = ? LIMIT 1",[e],function(e,r){var n=r.rows.length?r.rows.item(0).value:null;n&&(n=o.serializer.deserialize(n)),t(n)},function(e,t){n(t)})})}).catch(n)});return s(n,t),n},setItem:function(e,t,r){return X.apply(this,[e,t,r,1])},removeItem:function(e,t){var r=this;e=c(e);var n=new a(function(t,n){r.ready().then(function(){var o=r._dbInfo;o.db.transaction(function(r){Y(r,o,"DELETE FROM "+o.storeName+" WHERE key = ?",[e],function(){t()},function(e,t){n(t)})})}).catch(n)});return s(n,t),n},clear:function(e){var t=this,r=new a(function(e,r){t.ready().then(function(){var n=t._dbInfo;
1n.db.transaction(function(t){Y(t,n,"DELETE FROM "+n.storeName,[],function(){e()},function(e,t){r(t)})})}).catch(r)});return s(r,e),r},length:function(e){var t=this,r=new a(function(e,r){t.ready().then(function(){var n=t._dbInfo;n.db.transaction(function(t){Y(t,n,"SELECT COUNT(key) as c FROM "+n.storeName,[],function(t,r){e(r.rows.item(0).c)},function(e,t){r(t)})})}).catch(r)});return s(r,e),r},key:function(e,t){var r=this,n=new a(function(t,n){r.ready().then(function(){var o=r._dbInfo;o.db.transaction(function(r){Y(r,o,"SELECT key FROM "+o.storeName+" WHERE id = ? LIMIT 1",[e+1],function(e,r){t(r.rows.length?r.rows.item(0).key:null)},function(e,t){n(t)})})}).catch(n)});return s(n,t),n},keys:function(e){var t=this,r=new a(function(e,r){t.ready().then(function(){var n=t._dbInfo;n.db.transaction(function(t){Y(t,n,"SELECT key FROM "+n.storeName,[],function(t,r){for(var n=[],o=0;o<r.rows.length;o++)n.push(r.rows.item(o).key);e(n)},function(e,t){r(t)})})}).catch(r)});return s(r,e),r},dropInstance:function(e,t){t=u.apply(this,arguments);var r,n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var o=this;return s(r=e.name?new a(function(t){var r;(r=e.name===n.name?o._dbInfo.db:openDatabase(e.name,"","",0),e.storeName)?t({db:r,storeNames:[e.storeName]}):t(new a(function(e,t){r.transaction(function(n){n.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(t,n){for(var o=[],i=0;i<n.rows.length;i++)o.push(n.rows.item(i).name);e({db:r,storeNames:o})},function(e,r){t(r)})},function(e){t(e)})}))}).then(function(e){return new a(function(t,r){e.db.transaction(function(n){for(var o=[],i=0,s=e.storeNames.length;i<s;i++)o.push(function(e){return new a(function(t,r){n.executeSql("DROP TABLE IF EXISTS "+e,[],function(){t()},function(e,t){r(t)})})}(e.storeNames[i]));a.all(o).then(function(){t()}).catch(function(e){r(e)})},function(e){r(e)})})}):a.reject("Invalid arguments"),t),r}};function J(e,t){var r=e.name+"/";return e.storeName!==t.storeName&&(r+=e.storeName+"/"),r}var Z={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var r in e)t[r]=e[r];return(t.keyPrefix=J(e,this._defaultConfig),!function(){var e="_localforage_support_test";try{return localStorage.setItem(e,!0),localStorage.removeItem(e),!1}catch(e){return!0}}()||localStorage.length>0)?(this._dbInfo=t,t.serializer=K,a.resolve()):a.reject()},_support:function(){try{return"u">typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var r=this,n=r.ready().then(function(){for(var t=r._dbInfo,n=t.keyPrefix,o=n.length,i=localStorage.length,a=1,s=0;s<i;s++){var l=localStorage.key(s);if(0===l.indexOf(n)){var c=localStorage.getItem(l);if(c&&(c=t.serializer.deserialize(c)),void 0!==(c=e(c,l.substring(o),a++)))return c}}});return s(n,t),n},getItem:function(e,t){var r=this;e=c(e);var n=r.ready().then(function(){var t=r._dbInfo,n=localStorage.getItem(t.keyPrefix+e);return n&&(n=t.serializer.deserialize(n)),n});return s(n,t),n},setItem:function(e,t,r){var n=this;e=c(e);var o=n.ready().then(function(){void 0===t&&(t=null);var r=t;return new a(function(o,i){var a=n._dbInfo;a.serializer.serialize(t,function(t,n){if(n)i(n);else try{localStorage.setItem(a.keyPrefix+e,t),o(r)}catch(e){("QuotaExceededError"===e.name||"NS_ERROR_DOM_QUOTA_REACHED"===e.name)&&i(e),i(e)}})})});return s(o,r),o},removeItem:function(e,t){var r=this;e=c(e);var n=r.ready().then(function(){var t=r._dbInfo;localStorage.removeItem(t.keyPrefix+e)});return s(n,t),n},clear:function(e){var t=this,r=t.ready().then(function(){for(var e=t._dbInfo.keyPrefix,r=localStorage.length-1;r>=0;r--){var n=localStorage.key(r);0===n.indexOf(e)&&localStorage.removeItem(n)}});return s(r,e),r},length:function(e){var t=this.keys().then(function(e){return e.length});return s(t,e),t},key:function(e,t){var r=this,n=r.ready().then(function(){var t,n=r._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(n.keyPrefix.length)),t});return s(n,t),n},keys:function(e){var t=this,r=t.ready().then(function(){for(var e=t._dbInfo,r=localStorage.length,n=[],o=0;o<r;o++){var i=localStorage.key(o);0===i.indexOf(e.keyPrefix)&&n.push(i.substring(e.keyPrefix.length))}return n});return s(r,e),r},dropInstance:function(e,t){if(t=u.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var r,n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var o=this;return s(r=e.name?new a(function(t){t(e.storeName?J(e,o._defaultConfig):e.name+"/")}).then(function(e){for(var t=localStorage.length-1;t>=0;t--){var r=localStorage.key(t);0===r.indexOf(e)&&localStorage.removeItem(r)}}):a.reject("Invalid arguments"),t),r}},ee=function(e,t){for(var r,n=e.length,o=0;o<n;){if((r=e[o])===t||"number"==typeof r&&"number"==typeof t&&isNaN(r)&&isNaN(t))return!0;o++}return!1},et=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},er={},en={},eo={INDEXEDDB:I,WEBSQL:Q,LOCALSTORAGE:Z},ei=[eo.INDEXEDDB._driver,eo.WEBSQL._driver,eo.LOCALSTORAGE._driver],ea=["dropInstance"],es=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(ea),el={description:"",driver:ei.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function ec(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var r in t)t.hasOwnProperty(r)&&(et(t[r])?arguments[0][r]=t[r].slice():arguments[0][r]=t[r])}return arguments[0]}t.exports=new(function(){function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function");for(var r in eo)if(eo.hasOwnProperty(r)){var n=eo[r],o=n._driver;this[r]=o,er[o]||this.defineDriver(n)}this._defaultConfig=ec({},el),this._config=ec({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return e.prototype.config=function(e){if((void 0===e?"undefined":n(e))==="object"){if(this._ready)return Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,r){var n=new a(function(t,r){try{var n=e._driver,o=Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void r(o);for(var i=es.concat("_initStorage"),l=0,c=i.length;l<c;l++){var u=i[l];if((!ee(ea,u)||e[u])&&"function"!=typeof e[u])return void r(o)}for(var d=function(e){return function(){var t=Error("Method "+e+" is not implemented by the current driver"),r=a.reject(t);return s(r,arguments[arguments.length-1]),r}},f=0,h=ea.length;f<h;f++){var p=ea[f];e[p]||(e[p]=d(p))}var m=function(r){er[n]&&console.info("Redefining LocalForage driver: "+n),er[n]=e,en[n]=r,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(m,r):m(!!e._support):m(!0)}catch(e){r(e)}});return l(n,t,r),n},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,r){var n=er[e]?a.resolve(er[e]):a.reject(Error("Driver not found."));return l(n,t,r),n}
1,e.prototype.getSerializer=function(e){var t=a.resolve(K);return l(t,e),t},e.prototype.ready=function(e){var t=this,r=t._driverSet.then(function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready});return l(r,e,e),r},e.prototype.setDriver=function(e,t,r){var n=this;et(e)||(e=[e]);var o=this._getSupportedDrivers(e);function i(){n._config.driver=n.driver()}function s(e){return n._extend(e),i(),n._ready=n._initStorage(n._config),n._ready}var c=null!==this._driverSet?this._driverSet.catch(function(){return a.resolve()}):a.resolve();return this._driverSet=c.then(function(){var e=o[0];return n._dbInfo=null,n._ready=null,n.getDriver(e).then(function(e){n._driver=e._driver,i(),n._wrapLibraryMethodsWithReady(),n._initDriver=function(){var e=0;return function t(){for(;e<o.length;){var r=o[e];return e++,n._dbInfo=null,n._ready=null,n.getDriver(r).then(s).catch(t)}i();var l=Error("No available storage method found.");return n._driverSet=a.reject(l),n._driverSet}()}})}).catch(function(){i();var e=Error("No available storage method found.");return n._driverSet=a.reject(e),n._driverSet}),l(this._driverSet,t,r),this._driverSet},e.prototype.supports=function(e){return!!en[e]},e.prototype._extend=function(e){ec(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],r=0,n=e.length;r<n;r++){var o=e[r];this.supports(o)&&t.push(o)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=es.length;e<t;e++)!function(e,t){e[t]=function(){var r=arguments;return e.ready().then(function(){return e[t].apply(e,r)})}}(this,es[e])},e.prototype.createInstance=function(t){return new e(t)},e}())},{3:3}]},{},[4])(4)},43324,(e,t,r)=>{var n=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function o(e,t){if(!n[e]){n[e]={};for(var r=0;r<e.length;r++)n[e][e.charAt(r)]=r}return n[e][t]}var i={compressToBase64:function(e){if(null==e)return"";var r=i._compress(e,6,function(e){return t.charAt(e)});switch(r.length%4){default:case 0:return r;case 1:return r+"===";case 2:return r+"==";case 3:return r+"="}},decompressFromBase64:function(e){return null==e?"":""==e?null:i._decompress(e.length,32,function(r){return o(t,e.charAt(r))})},compressToUTF16:function(t){return null==t?"":i._compress(t,15,function(t){return e(t+32)})+" "},decompressFromUTF16:function(e){return null==e?"":""==e?null:i._decompress(e.length,16384,function(t){return e.charCodeAt(t)-32})},compressToUint8Array:function(e){for(var t=i.compress(e),r=new Uint8Array(2*t.length),n=0,o=t.length;n<o;n++){var a=t.charCodeAt(n);r[2*n]=a>>>8,r[2*n+1]=a%256}return r},decompressFromUint8Array:function(t){if(null==t)return i.decompress(t);for(var r=Array(t.length/2),n=0,o=r.length;n<o;n++)r[n]=256*t[2*n]+t[2*n+1];var a=[];return r.forEach(function(t){a.push(e(t))}),i.decompress(a.join(""))},compressToEncodedURIComponent:function(e){return null==e?"":i._compress(e,6,function(e){return r.charAt(e)})},decompressFromEncodedURIComponent:function(e){return null==e?"":""==e?null:(e=e.replace(/ /g,"+"),i._decompress(e.length,32,function(t){return o(r,e.charAt(t))}))},compress:function(t){return i._compress(t,16,function(t){return e(t)})},_compress:function(e,t,r){if(null==e)return"";var n,o,i,a={},s={},l="",c="",u="",d=2,f=3,h=2,p=[],m=0,g=0;for(i=0;i<e.length;i+=1)if(l=e.charAt(i),Object.prototype.hasOwnProperty.call(a,l)||(a[l]=f++,s[l]=!0),c=u+l,Object.prototype.hasOwnProperty.call(a,c))u=c;else{if(Object.prototype.hasOwnProperty.call(s,u)){if(256>u.charCodeAt(0)){for(n=0;n<h;n++)m<<=1,g==t-1?(g=0,p.push(r(m)),m=0):g++;for(n=0,o=u.charCodeAt(0);n<8;n++)m=m<<1|1&o,g==t-1?(g=0,p.push(r(m)),m=0):g++,o>>=1}else{for(n=0,o=1;n<h;n++)m=m<<1|o,g==t-1?(g=0,p.push(r(m)),m=0):g++,o=0;for(n=0,o=u.charCodeAt(0);n<16;n++)m=m<<1|1&o,g==t-1?(g=0,p.push(r(m)),m=0):g++,o>>=1}0==--d&&(d=Math.pow(2,h),h++),delete s[u]}else for(n=0,o=a[u];n<h;n++)m=m<<1|1&o,g==t-1?(g=0,p.push(r(m)),m=0):g++,o>>=1;0==--d&&(d=Math.pow(2,h),h++),a[c]=f++,u=String(l)}if(""!==u){if(Object.prototype.hasOwnProperty.call(s,u)){if(256>u.charCodeAt(0)){for(n=0;n<h;n++)m<<=1,g==t-1?(g=0,p.push(r(m)),m=0):g++;for(n=0,o=u.charCodeAt(0);n<8;n++)m=m<<1|1&o,g==t-1?(g=0,p.push(r(m)),m=0):g++,o>>=1}else{for(n=0,o=1;n<h;n++)m=m<<1|o,g==t-1?(g=0,p.push(r(m)),m=0):g++,o=0;for(n=0,o=u.charCodeAt(0);n<16;n++)m=m<<1|1&o,g==t-1?(g=0,p.push(r(m)),m=0):g++,o>>=1}0==--d&&(d=Math.pow(2,h),h++),delete s[u]}else for(n=0,o=a[u];n<h;n++)m=m<<1|1&o,g==t-1?(g=0,p.push(r(m)),m=0):g++,o>>=1;0==--d&&(d=Math.pow(2,h),h++)}for(n=0,o=2;n<h;n++)m=m<<1|1&o,g==t-1?(g=0,p.push(r(m)),m=0):g++,o>>=1;for(;;){if(m<<=1,g==t-1){p.push(r(m));break}g++}return p.join("")},decompress:function(e){return null==e?"":""==e?null:i._decompress(e.length,32768,function(t){return e.charCodeAt(t)})},_decompress:function(t,r,n){var o,i,a,s,l,c,u,d=[],f=4,h=4,p=3,m="",g=[],y={val:n(0),position:r,index:1};for(o=0;o<3;o+=1)d[o]=o;for(a=0,l=4,c=1;c!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(s>0)*c,c<<=1;switch(a){case 0:for(a=0,l=256,c=1;c!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(s>0)*c,c<<=1;u=e(a);break;case 1:for(a=0,l=65536,c=1;c!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(s>0)*c,c<<=1;u=e(a);break;case 2:return""}for(d[3]=u,i=u,g.push(u);;){if(y.index>t)return"";for(a=0,l=Math.pow(2,p),c=1;c!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(s>0)*c,c<<=1;switch(u=a){case 0:for(a=0,l=256,c=1;c!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(s>0)*c,c<<=1;d[h++]=e(a),u=h-1,f--;break;case 1:for(a=0,l=65536,c=1;c!=l;)s=y.val&y.position,y.position>>=1,0==y.position&&(y.position=r,y.val=n(y.index++)),a|=(s>0)*c,c<<=1;d[h++]=e(a),u=h-1,f--;break;case 2:return g.join("")}if(0==f&&(f=Math.pow(2,p),p++),d[u])m=d[u];else{if(u!==h)return null;m=i+i.charAt(0)}g.push(m),d[h++]=i+m.charAt(0),f--,i=m,0==f&&(f=Math.pow(2,p),p++)}}};return i}();if("function"==typeof define&&define.amd)e.r,void 0!==n&&e.v(n);else null!=t?t.exports=n:"u">typeof angular&&null!=angular&&angular.module("LZString",[]).factory("LZString",function(){return n})},93422,e=>{"use strict";var t=e.i(26605);let r=(0,t.createServerReference)("60552c97452f5f08ece3367ba4e9ccb4ca47bd83d2",t.callServer,void 0,t.findSourceMapURL,"recordUserFoundCharacter");var n=e.i(88969),o=e.i(75679);let i=(e,t)=>e.find(e=>e.playerId===t);var a=e.i(20924),s=e.i(43324);let l=async(e,t)=>{try{let r=(0,s.compress)(JSON.stringify(t));await a.default.setItem(e,r),navigator.storage&&navigator.storage.persist&&await navigator.storage.persist()}catch(t){console.error("Save error:",t),await a.default.removeItem(e)}},c=async e=>{try{let t=await a.default.getItem(e);if(!t)return null;let r=(0,s.decompress)(t),n=JSON.parse(r||"");if(!(n&&"object"==typeof n&&Array.isArray(n.guessedIds)&&n.guessedIds.every(e=>Number.isSafeInteger(e)&&e>=0)&&"number"==typeof n.version&&Number.isFinite(n.version)&&("playing"===n.gameState||"won"===n.gameState)&&"string"==typeof n.lastPlayed&&"string"==typeof n.dailySeed&&(void 0===n.userRank||"number"==typeof n.userRank&&Number.isFinite(n.userRank))&&"string"==typeof n.userId&&"boolean"==typeof n.celebrated))return console.error("Invalid game state:",n),await a.default.removeItem(e),null;return n}catch(e){return console.error("Load error:",e),null}}
1,u="op-user-id",d=async()=>{let e=await a.default.getItem(u);return e||(e=crypto.randomUUID(),await a.default.setItem(u,e)),e};var f=e.i(33030);let h=(e,t="")=>({guessedIds:[],gameState:"playing",lastPlayed:new Date().toISOString(),dailySeed:e,version:n.GAME_VERSION,userId:t,celebrated:!1});e.s(["default",0,function({gameStateKey:e,gameMode:t,characters:s,dailyCharacter:u,dailySeed:p,winningCharacterIds:m,winnerScope:g}){let[y,v]=(0,f.useState)(""),[b,_]=(0,f.useState)(()=>h(p)),[x,w]=(0,f.useState)([]),[S,A]=(0,f.useState)(!1),[C,E]=(0,f.useState)(!0),[I,j]=(0,f.useState)(!1),[k,R]=(0,f.useState)(!1),[N,T]=(0,f.useState)(void 0);(0,f.useEffect)(()=>{if(!k||!b.dailySeed)return;let t=!1;return(async()=>{await l(e,b),t||R(!1)})(),()=>{t=!0}},[b,e,k]),(0,f.useEffect)(()=>{let t=!1;return(async()=>{if(!s.length){t||E(!1);return}let r="";try{let[o,l]=await Promise.all([d(),c(e)]);if(t)return;if(r=o,v(o),l?.version!==n.GAME_VERSION||l.dailySeed!==p){if(await a.default.removeItem(e),t)return;_(h(p,o)),w([]),A(!1),j(!1),T(null);return}let u=l.guessedIds.map(e=>i(s,e)).filter(e=>!!e);_({...l,userId:o}),w(u),A("won"===l.gameState),j(l.celebrated),T(l.userRank??null)}catch(n){if(console.error("Error initializing game:",n),await a.default.removeItem(e),t)return;_(h(p,r)),w([]),A(!1),j(!1),T(null)}finally{t||E(!1)}})(),()=>{t=!0}},[s,p,e]);let M=async e=>{let n=i(s,e.playerId);if(!u||!n)return;let a=[...x,n],l=m?.length?m.includes(n.playerId):n.playerId===u.playerId,c=String(t).toLowerCase(),d=a.length;0===x.length&&(0,o.trackGameEvent)("game_start",{game_mode:t}),(0,o.trackGameEvent)("game_guess",{game_mode:t,guess_number:d}),window.clarity?.("event",`${c}_guess_submitted`),w(a);let f={...b,guessedIds:a.map(e=>e.playerId),gameState:l?"won":"playing",lastPlayed:new Date().toISOString()};if(l){(0,o.trackGameEvent)("game_complete",{game_mode:t,attempts:d}),window.clarity?.("event",`${c}_completed`),window.clarity?.("upgrade",`${c}_completed`),A(!0),T(void 0);try{f.userRank=(await r(y,g??t)).rank??null,f.celebrated=!0,T(f.userRank)}catch(e){console.error("Error handling victory:",e),T(null)}}_(f),R(!0)};return{userId:y,gameState:b,guesses:x,victory:S,isLoading:C,celebrated:I,userRank:N,handleGuess:M,setCelebrated:j}}],93422)},1798,e=>{"use strict";function t(e){let t=0x811c9dc5;for(let r=0;r<e.length;r+=1)t^=e.charCodeAt(r),t=Math.imul(t,0x1000193);return t>>>0}e.s(["decodeDailyTargetToken",0,function(e,r){let[n,o,...i]=e.split("."),a=i.pop();if("1"!==n||!o||!/^[a-f0-9]{16}$/.test(o)||0===i.length||!a||!r)throw Error("Invalid daily target token");let s=[n,o,...i].join(".");if(a!==t(`${s}:${r}`).toString(36))throw Error("Invalid daily target token checksum");let l=i.map((e,n)=>{if(!/^[a-z0-9]+$/.test(e))throw Error("Invalid character ID in daily target token");return(Number.parseInt(e,36)^t(`${r}:${o}:${n}`))>>>0});if(0===l.length||l.some(e=>!Number.isSafeInteger(e)||e<0||e>0xffffffff))throw Error("Daily target token requires valid character IDs");return l}])},69329,e=>{e.v({adContent:"GameLayout-module__MSaazG__adContent",adPlacement:"GameLayout-module__MSaazG__adPlacement",chapterContent:"GameLayout-module__MSaazG__chapterContent",chapterNumber:"GameLayout-module__MSaazG__chapterNumber",classic:"GameLayout-module__MSaazG__classic",classicLegend:"GameLayout-module__MSaazG__classicLegend",content:"GameLayout-module__MSaazG__content",dailyModeLegend:"GameLayout-module__MSaazG__dailyModeLegend",devilFruit:"GameLayout-module__MSaazG__devilFruit",gameContent:"GameLayout-module__MSaazG__gameContent",gameLegend:"GameLayout-module__MSaazG__gameLegend",laugh:"GameLayout-module__MSaazG__laugh","laugh-wave-pulse":"GameLayout-module__MSaazG__laugh-wave-pulse",laughLegend:"GameLayout-module__MSaazG__laughLegend",narrative:"GameLayout-module__MSaazG__narrative",page:"GameLayout-module__MSaazG__page",player:"GameLayout-module__MSaazG__player","recommended-card-arrive":"GameLayout-module__MSaazG__recommended-card-arrive",story:"GameLayout-module__MSaazG__story",storyChapter:"GameLayout-module__MSaazG__storyChapter",supporting:"GameLayout-module__MSaazG__supporting",wanted:"GameLayout-module__MSaazG__wanted"})},37458,e=>{"use strict";var t=e.i(69163),r=e.i(47782),n=e.i(20133),o=e.i(44705),i=e.i(75157),a=e.i(28296);function s(){let e=(0,a.useTranslations)("PlayInDifferentLanguages"),s=(0,n.usePathname)();return(0,t.jsx)("section",{className:"section section-languages bg-section-purple py-8 px-2",id:"languages",children:(0,t.jsxs)("div",{className:"container",children:[(0,t.jsx)("h2",{className:"section-title",children:e("title")}),(0,t.jsx)("p",{className:"section-description pt-4 sm:pt-8",children:e("description")}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2 justify-center gap-x-4 pt-4 sm:pt-8",children:o.Locale_Info.map(e=>{let n;return(0,t.jsxs)(r.default,{title:e.localName,href:`${s}`,locale:e.route,hrefLang:e.code,className:(0,i.cn)("flex items-center gap-2 px-3 py-1.5","bg-background/90 hover:bg-background/100","rounded-md transition-colors duration-200","text-sm font-medium"),children:[(0,t.jsx)("img",{src:(n=e.flag,`https://flagcdn.com/w40/${n}.png`),alt:`${e.name} flag`,width:16,height:12,loading:"lazy",decoding:"async",className:"rounded-[1px]"}),(0,t.jsx)("span",{children:e.localName})]},e.route)})})]})})}var l=e.i(92243),c=e.i(4170);function u({variant:e}){let r=(0,a.useTranslations)({classic:"StrategyGuide",laugh:"LaughGame.StrategyGuide",devilFruit:"DailyModes.devilFruit.StrategyGuide",wanted:"DailyModes.wanted.StrategyGuide"}[e]);return(0,t.jsx)("section",{className:"section strategy-guide bg-section-green py-8 sm:py-10",children:(0,t.jsxs)("div",{className:"container",children:[(0,t.jsx)("h2",{className:"section-title",children:r("title")}),(0,t.jsx)("p",{className:"section-description",children:r("intro")}),(0,t.jsx)("div",{className:"mt-6 grid gap-4 md:grid-cols-3","data-story-reveal":!0,"data-reveal":"cards",children:["first","second","third"].map(e=>(0,t.jsxs)("article",{className:"story-step",children:[(0,t.jsx)("h3",{className:"mb-1 text-base font-bold",children:r(`${e}.title`)}),(0,t.jsx)("p",{children:r(`${e}.description`)})]},e))})]})})}var d=e.i(31502),f=e.i(10810),h=e.i(95674),p=e.i(70718),m=e.i(69329);e.s(["default",0,function({gameBoard:e,colorIndicator:r,gameInfo:n,howToPlay:o,faq:a,variant:g,strategyGuide:y}){let v=(e,r)=>(0,t.jsxs)("div",{className:m.default.storyChapter,"data-story-reveal":!0,"data-reveal":Number(e)%2==0?"right":"left",children:[(0,t.jsx)("span",{className:m.default.chapterNumber,"aria-hidden":"true",children:e}),(0,t.jsx)("div",{className:m.default.chapterContent,children:r})]});return(0,t.jsx)(f.default,{children:(0,t.jsxs)(c.default,{className:(0,i.cn)(m.default.page,m.default[g],m.default.narrative),children:[(0,t.jsxs)("div",{...p.SIDE_RAIL_SAFE_AREA_PROPS,className:(0,i.cn)(m.default.content,m.default.gameC
1ontent),children:[(0,t.jsxs)("div",{className:(0,i.cn)("section section-game",m.default.player),children:[e,(0,t.jsx)("div",{className:(0,i.cn)(m.default.gameLegend,"classic"===g?m.default.classicLegend:"laugh"===g?m.default.laughLegend:m.default.dailyModeLegend),children:r})]}),(0,t.jsxs)("div",{className:m.default.supporting,children:[(0,t.jsx)("div",{"data-story-reveal":!0,"data-reveal":"cards",children:(0,t.jsx)(l.default,{rounded:!1})}),(0,t.jsx)("div",{className:m.default.adPlacement,"data-ad-placement":"after-recommended-games",children:(0,t.jsx)(d.default,{adSlot:h.ADSENSE_SLOTS.topBanner,name:"HOME_BANNER"})}),(0,t.jsx)("div",{"data-story-reveal":!0,"data-reveal":"right",children:n}),(0,t.jsx)("div",{className:m.default.adPlacement,"data-ad-placement":"after-game-info",children:(0,t.jsx)(d.default,{adSlot:h.ADSENSE_SLOTS.bottomBanner,name:"BOTTOM_AD"})})]})]}),(0,t.jsx)("div",{...p.SIDE_RAIL_SAFE_AREA_PROPS,className:(0,i.cn)(m.default.content,m.default.adContent),children:(0,t.jsxs)("div",{className:(0,i.cn)(m.default.supporting,m.default.story),children:[v("01",o),!1!==y&&v("02",y??(0,t.jsx)(u,{variant:g})),v("03",(0,t.jsx)(s,{})),v("04",a)]})})]})})}],37458)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.