1/*! For license information please see main.5296c7e0.js.LICENSE.txt */ 2(()=>{"use strict";var e={276(e,t,n){n.d(t,{n:()=>p});var r=n(9379),a=n(3986),i=n(5043),s=n(2814),o=n(7914),l=n(7490),c=n(579);const u=["loop","trapped","onMountAutoFocus","onUnmountAutoFocus"];var d="focusScope.autoFocusOnMount",h="focusScope.autoFocusOnUnmount",f={bubbles:!1,cancelable:!0},p=i.forwardRef((e,t)=>{const{loop:n=!1,trapped:p=!1,onMountAutoFocus:v,onUnmountAutoFocus:x}=e,w=(0,a.A)(e,u),[k,N]=i.useState(null),A=(0,l.c)(v),j=(0,l.c)(x),_=i.useRef(null),S=(0,s.s)(t,e=>N(e)),C=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(p){let e=function(e){if(C.paused||!k)return;const t=e.target;k.contains(t)?_.current=t:b(_.current,{select:!0})},t=function(e){if(C.paused||!k)return;const t=e.relatedTarget;null!==t&&(k.contains(t)||b(_.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&b(k)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return k&&r.observe(k,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[p,k,C.paused]),i.useEffect(()=>{if(k){y.add(C);const t=document.activeElement;if(!k.contains(t)){const n=new CustomEvent(d,f);k.addEventListener(d,A),k.dispatchEvent(n),n.defaultPrevented||(!function(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=document.activeElement;for(const r of e)if(b(r,{select:t}),document.activeElement!==n)return}((e=m(k),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&b(k))}return()=>{k.removeEventListener(d,A),setTimeout(()=>{const e=new CustomEvent(h,f);k.addEventListener(h,j),k.dispatchEvent(e),e.defaultPrevented||b(null!==t&&void 0!==t?t:document.body,{select:!0}),k.removeEventListener(h,j),y.remove(C)},0)}}var e},[k,A,j,C]);const E=i.useCallback(e=>{if(!n&&!p)return;if(C.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=document.activeElement;if(t&&r){const t=e.currentTarget,[a,i]=function(e){const t=m(e),n=g(t,e),r=g(t.reverse(),e);return[n,r]}(t);a&&i?e.shiftKey||r!==i?e.shiftKey&&r===a&&(e.preventDefault(),n&&b(i,{select:!0})):(e.preventDefault(),n&&b(a,{select:!0})):r===t&&e.preventDefault()}},[n,p,C.paused]);return(0,c.jsx)(o.sG.div,(0,r.A)((0,r.A)({tabIndex:-1},w),{},{ref:S,onKeyDown:E}))});function m(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function g(e,t){for(const n of e)if(!v(n,{upTo:t}))return n}function v(e,t){let{upTo:n}=t;if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==n&&e===n)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function b(e){let{select:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}p.displayName="FocusScope";var y=function(){let e=[];return{add(t){const n=e[0];t!==n&&(null===n||void 0===n||n.pause()),e=x(e,t),e.unshift(t)},remove(t){var n;e=x(e,t),null===(n=e[0])||void 0===n||n.resume()}}}();function x(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}},503(e,t,n){n.d(t,{N:()=>a});var r=n(5043),a=null!==globalThis&&void 0!==globalThis&&globalThis.document?r.useLayoutEffect:()=>{}},516(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]])},556(e,t,n){n.d(t,{J:()=>g});var r=n(9379),a=n(3986),i=n(5043),s=(n(7950),n(6851)),o=n(579);const l=["asChild"];var c=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>
2{const n=(0,s.TL)("Primitive.".concat(t)),c=i.forwardRef((e,i)=>{const{asChild:s}=e,c=(0,a.A)(e,l),u=s?n:t;return"undefined"!==typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,o.jsx)(u,(0,r.A)((0,r.A)({},c),{},{ref:i}))});return c.displayName="Primitive.".concat(t),(0,r.A)((0,r.A)({},e),{},{[t]:c})},{});var u=i.forwardRef((e,t)=>(0,o.jsx)(c.label,(0,r.A)((0,r.A)({},e),{},{ref:t,onMouseDown:t=>{var n;t.target.closest("button, input, select, textarea")||(null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}})));u.displayName="Label";var d=u,h=n(917),f=n(9766);const p=["className"],m=(0,h.F)("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),g=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,p);return(0,o.jsx)(d,(0,r.A)({ref:t,className:(0,f.cn)(m(),n)},i))});g.displayName=d.displayName},579(e,t,n){e.exports=n(2799)},614(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},764(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]])},797(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]])},849(e,t,n){n.d(t,{q:()=>a});let r={};function a(){return r}},858(e,t,n){n.d(t,{mK:()=>r});"undefined"===typeof window||!window.document||window.document.createElement;function r(e,t){let{checkForDefaultPrevented:n=!0}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return function(r){if(null===e||void 0===e||e(r),!1===n||!r.defaultPrevented)return null===t||void 0===t?void 0:t(r)}}},917(e,t,n){n.d(t,{F:()=>c});var r=n(9379),a=n(3986),i=n(8387);const s=["class","className"],o=e=>"boolean"===typeof e?"".concat(e):0===e?"0":e,l=i.$,c=(e,t)=>n=>{var i;if(null==(null===t||void 0===t?void 0:t.variants))return l(e,null===n||void 0===n?void 0:n.class,null===n||void 0===n?void 0:n.className);const{variants:c,defaultVariants:u}=t,d=Object.keys(c).map(e=>{const t=null===n||void 0===n?void 0:n[e],r=null===u||void 0===u?void 0:u[e];if(null===t)return null;const a=o(t)||o(r);return c[e][a]}),h=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return void 0===r||(e[n]=r),e},{}),f=null===t||void 0===t||null===(i=t.compoundVariants)||void 0===i?void 0:i.reduce((e,t)=>{let{class:n,className:i}=t,o=(0,a.A)(t,s);return Object.entries(o).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes((0,r.A)((0,r.A)({},u),h)[t]):(0,r.A)((0,r.A)({},u),h)[t]===n})?[...e,n,i]:e},[]);return l(e,d,f,null===n||void 0===n?void 0:n.class,null===n||void 0===n?void 0:n.className)}},1140(e,t,n){n.d(t,{Zp:()=>p});var r=n(9379),a=n(3986),i=n(5043),s=n(9766),o=n(579);const l=["className"],c=["className"],u=["className"],d=["className"],h=["className"],f=["className"],p=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,l);return(0,o.jsx)("div",(0,r.A)({ref:t,className:(0,s.cn)("rounded-xl border bg-card text-card-foreground shadow",n)},i))});p.displayName="Card";i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,c);return(0,o.jsx)("div",(0,r.A)({ref:t,className:(0,s.cn)("flex flex-col space-y-1.5 p-6",n)},i))}).displayName="CardHeader";i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,u);return(0,o.jsx)("div",(0,r.A)({ref:t,className:(0,s.cn)("font-semibold leading-none tracking-tight",n)},i))}).displayName="CardTitle";i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,d);return(0,o.jsx)("div",(0,r.A)({ref:t,className:(0,s.cn)("text-sm text-muted-foreground",n)},i))}).displayName="CardDescription";i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,h);return(0,o.jsx)("div",(0,r.A)({ref:t,className:(0,s.cn)("p-6 pt-0",n)},i))}).displayName="CardContent";i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,f);return(0,o.jsx)("div",(0,r.A)({ref:t,className:(0,s.cn)("flex items-center p-6 pt-0",n)},i))}
2).displayName="CardFooter"},1184(e,t,n){n.d(t,{qW:()=>v});var r=n(9379),a=n(3986),i=n(5043),s=n(858),o=n(7914),l=n(2814),c=n(7490);var u=n(579);const d=["disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","onDismiss"];var h,f="dismissableLayer.update",p="dismissableLayer.pointerDownOutside",m="dismissableLayer.focusOutside",g=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),v=i.forwardRef((e,t)=>{var n;const{disableOutsidePointerEvents:v=!1,onEscapeKeyDown:b,onPointerDownOutside:w,onFocusOutside:k,onInteractOutside:N,onDismiss:A}=e,j=(0,a.A)(e,d),_=i.useContext(g),[S,C]=i.useState(null),E=null!==(n=null===S||void 0===S?void 0:S.ownerDocument)&&void 0!==n?n:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,L]=i.useState({}),P=(0,l.s)(t,e=>C(e)),T=Array.from(_.layers),[R]=[..._.layersWithOutsidePointerEventsDisabled].slice(-1),F=T.indexOf(R),M=S?T.indexOf(S):-1,O=_.layersWithOutsidePointerEventsDisabled.size>0,D=M>=F,I=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document;const n=(0,c.c)(e),r=i.useRef(!1),a=i.useRef(()=>{});return i.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){x(p,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[..._.branches].some(e=>e.contains(t));D&&!n&&(null===w||void 0===w||w(e),null===N||void 0===N||N(e),e.defaultPrevented||null===A||void 0===A||A())},E),z=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document;const n=(0,c.c)(e),r=i.useRef(!1);return i.useEffect(()=>{const e=e=>{if(e.target&&!r.current){x(m,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[..._.branches].some(e=>e.contains(t))||(null===k||void 0===k||k(e),null===N||void 0===N||N(e),e.defaultPrevented||null===A||void 0===A||A())},E);return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===globalThis||void 0===globalThis?void 0:globalThis.document;const n=(0,c.c)(e);i.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{M===_.layers.size-1&&(null===b||void 0===b||b(e),!e.defaultPrevented&&A&&(e.preventDefault(),A()))},E),i.useEffect(()=>{if(S)return v&&(0===_.layersWithOutsidePointerEventsDisabled.size&&(h=E.body.style.pointerEvents,E.body.style.pointerEvents="none"),_.layersWithOutsidePointerEventsDisabled.add(S)),_.layers.add(S),y(),()=>{v&&1===_.layersWithOutsidePointerEventsDisabled.size&&(E.body.style.pointerEvents=h)}},[S,E,v,_]),i.useEffect(()=>()=>{S&&(_.layers.delete(S),_.layersWithOutsidePointerEventsDisabled.delete(S),y())},[S,_]),i.useEffect(()=>{const e=()=>L({});return document.addEventListener(f,e),()=>document.removeEventListener(f,e)},[]),(0,u.jsx)(o.sG.div,(0,r.A)((0,r.A)({},j),{},{ref:P,style:(0,r.A)({pointerEvents:O?D?"auto":"none":void 0},e.style),onFocusCapture:(0,s.mK)(e.onFocusCapture,z.onFocusCapture),onBlurCapture:(0,s.mK)(e.onBlurCapture,z.onBlurCapture),onPointerDownCapture:(0,s.mK)(e.onPointerDownCapture,I.onPointerDownCapture)}))});v.displayName="DismissableLayer";var b=i.forwardRef((e,t)=>{const n=i.useContext(g),a=i.useRef(null),s=(0,l.s)(t,a);return i.useEffect(()=>{const e=a.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,u.jsx)(o.sG.div,(0,r.A)((0,r.A)({},e),{},{ref:s}))});function y(){const e=new CustomEvent(f);document.dispatchEvent(e)}function x(e,t,n,r){let{discrete:a}=r;const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),a?(0,o.hO)(i,s):i.dispatchEvent(s)}b.displayName="DismissableLayerBranch"},1286(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("phone",[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]])},1311(e,t,n){n.d(t,{S:()=>I});var r=n(9379),a=n(3986),i=n(5043),s=n(2814),o=n(1862),l=n(858),c=n(3642),u=n(3168),d=n(3124),h=n(2894),f=n(7914),p=n(579);const m=["__scopeCheckbox","onKeyDown","onClick"],g=["__scopeCheckbox","name","checked","defaultChecked","required","disabled","value","onCheckedChange","form"],v=["__scopeCheckbox","forceMount"],b=["__scopeCheckbox"];var y="Checkbox",[x,w]=(0,o.A)(y),[k,N]=x(y);function A(e){const{__scopeCheckbox:t,checked:n,children:a,defaultChecked:s,disabled:o,form:l,name:u,onCheckedChange:d,required:h,value:f="on",internal_do_not_use_render:m}=e,[g,v]=(0,c.i)({prop:n,defaultProp:null!==s&&void 0!==s&&s,onChange:d,caller:y}),[b,x]=i.useState(null),[w,N]=i.useState(null),A=i.useRef(!1),j=!b||(!!l||!!b.closest("form")),_={checked:g,disabled:o,setChecked:v,control:b,setControl:x,name:u,form:l,value:f,hasConsumerStoppedPropagationRef:A,required:h,defaultChecked:!R(s)&&s,isFormControl:j,bubbleInput:w,setBubbleInput:N};return(0,p.jsx)(k,(0,r.A)((0,r.A)({scope:t},_),{},{children:T(m)?m(_):a}))}var j="CheckboxTrigger",_=i.forwardRef((e,t)=>
2{let{__scopeCheckbox:n,onKeyDown:o,onClick:c}=e,u=(0,a.A)(e,m);const{control:d,value:h,disabled:g,checked:v,required:b,setControl:y,setChecked:x,hasConsumerStoppedPropagationRef:w,isFormControl:k,bubbleInput:A}=N(j,n),_=(0,s.s)(t,y),S=i.useRef(v);return i.useEffect(()=>{const e=null===d||void 0===d?void 0:d.form;if(e){const t=()=>x(S.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}},[d,x]),(0,p.jsx)(f.sG.button,(0,r.A)((0,r.A)({type:"button",role:"checkbox","aria-checked":R(v)?"mixed":v,"aria-required":b,"data-state":F(v),"data-disabled":g?"":void 0,disabled:g,value:h},u),{},{ref:_,onKeyDown:(0,l.mK)(o,e=>{"Enter"===e.key&&e.preventDefault()}),onClick:(0,l.mK)(c,e=>{x(e=>!!R(e)||!e),A&&k&&(w.current=e.isPropagationStopped(),w.current||e.stopPropagation())})}))});_.displayName=j;var S=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:i,checked:s,defaultChecked:o,required:l,disabled:c,value:u,onCheckedChange:d,form:h}=e,f=(0,a.A)(e,g);return(0,p.jsx)(A,{__scopeCheckbox:n,checked:s,defaultChecked:o,disabled:c,required:l,onCheckedChange:d,name:i,form:h,value:u,internal_do_not_use_render:e=>{let{isFormControl:a}=e;return(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(_,(0,r.A)((0,r.A)({},f),{},{ref:t,__scopeCheckbox:n})),a&&(0,p.jsx)(P,{__scopeCheckbox:n})]})}})});S.displayName=y;var C="CheckboxIndicator",E=i.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:i}=e,s=(0,a.A)(e,v),o=N(C,n);return(0,p.jsx)(h.C,{present:i||R(o.checked)||!0===o.checked,children:(0,p.jsx)(f.sG.span,(0,r.A)((0,r.A)({"data-state":F(o.checked),"data-disabled":o.disabled?"":void 0},s),{},{ref:t,style:(0,r.A)({pointerEvents:"none"},e.style)}))})});E.displayName=C;var L="CheckboxBubbleInput",P=i.forwardRef((e,t)=>{let{__scopeCheckbox:n}=e,o=(0,a.A)(e,b);const{control:l,hasConsumerStoppedPropagationRef:c,checked:h,defaultChecked:m,required:g,disabled:v,name:y,value:x,form:w,bubbleInput:k,setBubbleInput:A}=N(L,n),j=(0,s.s)(t,A),_=(0,u.Z)(h),S=(0,d.X)(l);i.useEffect(()=>{const e=k;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set,r=!c.current;if(_!==h&&n){const t=new Event("click",{bubbles:r});e.indeterminate=R(h),n.call(e,!R(h)&&h),e.dispatchEvent(t)}},[k,_,h,c]);const C=i.useRef(!R(h)&&h);return(0,p.jsx)(f.sG.input,(0,r.A)((0,r.A)({type:"checkbox","aria-hidden":!0,defaultChecked:null!==m&&void 0!==m?m:C.current,required:g,disabled:v,name:y,value:x,form:w},o),{},{tabIndex:-1,ref:j,style:(0,r.A)((0,r.A)((0,r.A)({},o.style),S),{},{position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"})}))});function T(e){return"function"===typeof e}function R(e){return"indeterminate"===e}function F(e){return R(e)?"indeterminate":e?"checked":"unchecked"}P.displayName=L;var M=n(6210),O=n(9766);const D=["className"],I=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,D);return(0,p.jsx)(S,(0,r.A)((0,r.A)({ref:t,className:(0,O.cn)("peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",n)},i),{},{children:(0,p.jsx)(E,{className:(0,O.cn)("flex items-center justify-center text-current"),children:(0,p.jsx)(M.A,{className:"h-4 w-4"})})}))});I.displayName=S.displayName},1360(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},1529(e,t,n){n.d(t,{A:()=>X});var r=n(5043),a=n(9722),i=n(6328),s=n(5598),o=n(1140),l=n(5949),c=n(2224),u=n(4459),d=n(2024),h=n(5244),f=n(1680),p=n(7784);const m=(0,p.A)("receipt",[["path",{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z",key:"q3az6g"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 17.5v-11",key:"1jc1ny"}]]),g=(0,p.A)("briefcase",[["path",{d:"M16 20V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16",key:"jecpp"}],["rect",{width:"20",height:"14",x:"2",y:"6",rx:"2",key:"i6l2r4"}]]);var v=n(8646);const b=(0,p.A)("message-circle",[["path",{d:"M7.9 20A9 9 0 1 0 4 16.1L2 22Z",key:"vv11sd"}]]);var y=n(5327),x=n(1286),w=n(8006),k=n(5731),N=n(1360);const A=(0,p.A)("file-pen",[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]]),j=(0,p.A)("calendar-plus",[["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M19 16v6",key:"tddt3s"}],["path",{d:"M21 12.598V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8.5",key:"1glfrc"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}]]);var _=n(5746),S=n(7737),C=n(9581),E=n(3390),L=n(2264),P=n(556),T=n(3416),R=n(6178),F=n(
2579);const M="https://nextgen-staging.emergent.host",O={open:"border-amber-500/40 text-amber-400",in_progress:"border-blue-500/40 text-blue-400",waiting_on_client:"border-purple-500/40 text-purple-400",closed:"border-muted text-muted-foreground",draft:"border-muted text-muted-foreground",sent:"border-blue-500/40 text-blue-400",accepted:"border-primary/50 text-primary",rejected:"border-red-500/40 text-red-400",paid:"border-primary/50 text-primary",pending:"border-amber-500/40 text-amber-400",overdue:"border-red-500/40 text-red-400",active:"border-primary/50 text-primary",cancelled:"border-muted text-muted-foreground"},D=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"MMM dd, yyyy";if(!e)return"\u2014";try{return(0,C.GP)(new Date(e),t)}catch(n){return e}},I=e=>{let{icon:t,label:n,count:r}=e;return(0,F.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,F.jsx)(t,{className:"w-4 h-4 text-primary"}),(0,F.jsx)("h4",{className:"font-bold uppercase tracking-tight text-sm",children:n}),(0,F.jsx)(l.E,{variant:"outline",className:"text-[10px]",children:r})]})},z=e=>{let{user:t,business:n,summary:r}=e;return(0,F.jsx)(o.Zp,{className:"p-4 border-primary/30 bg-primary/5","data-testid":"profile-contact-card",children:(0,F.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[(0,F.jsxs)("div",{className:"space-y-1.5",children:[(0,F.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,F.jsx)(y.A,{className:"w-3.5 h-3.5 text-muted-foreground"}),(0,F.jsx)("span",{className:"font-mono",children:t.email})]}),(null===n||void 0===n?void 0:n.phone_number)&&(0,F.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,F.jsx)(x.A,{className:"w-3.5 h-3.5 text-muted-foreground"}),(0,F.jsx)("span",{children:n.phone_number})]}),(null===n||void 0===n?void 0:n.formatted_address)&&(0,F.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[(0,F.jsx)(w.A,{className:"w-3.5 h-3.5 text-muted-foreground mt-0.5"}),(0,F.jsx)("span",{className:"text-xs",children:n.formatted_address})]}),(null===n||void 0===n?void 0:n.website)&&(0,F.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,F.jsx)(k.A,{className:"w-3.5 h-3.5 text-muted-foreground"}),(0,F.jsx)("a",{href:n.website,target:"_blank",rel:"noopener noreferrer",className:"text-primary text-xs hover:underline",children:n.website.replace(/^https?:\/\//,"").split("/")[0]})]})]}),(0,F.jsxs)("div",{className:"grid grid-cols-3 gap-2 text-center",children:[(0,F.jsx)(B,{label:"Open Tickets",value:r.tickets_open}),(0,F.jsx)(B,{label:"Open Quotes",value:r.quotes_open}),(0,F.jsx)(B,{label:"Unpaid Inv.",value:r.invoices_unpaid}),(0,F.jsx)(B,{label:"Active Subs",value:r.subscriptions_active}),(0,F.jsx)(B,{label:"Bookings",value:r.bookings_total}),(0,F.jsx)(B,{label:"Role",value:t.role,small:!0})]})]})})},B=e=>{let{label:t,value:n,small:r}=e;return(0,F.jsxs)("div",{className:"rounded-md border border-border p-2",children:[(0,F.jsx)("p",{className:"font-bold ".concat(r?"text-xs uppercase":"text-lg"),children:n}),(0,F.jsx)("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground",children:t})]})},q=e=>{let{msg:t}=e;return(0,F.jsx)("p",{className:"text-sm text-muted-foreground italic py-4 text-center",children:t})},U=e=>{let{user:t,business:n,onAfterAction:a}=e;const[i,s]=(0,r.useState)(null);return(0,F.jsxs)(o.Zp,{className:"p-3 border-border bg-background/40","data-testid":"profile-quick-actions",children:[(0,F.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,F.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-muted-foreground mr-1",children:"Quick actions:"}),(0,F.jsx)(V,{icon:N.A,label:"Create Ticket",testId:"qa-ticket",active:"ticket"===i,onClick:()=>s("ticket"===i?null:"ticket")}),(0,F.jsx)(V,{icon:A,label:"Send Quote",testId:"qa-quote",active:"quote"===i,onClick:()=>s("quote"===i?null:"quote")}),(0,F.jsx)(V,{icon:j,label:"Open Booking",testId:"qa-booking",active:"booking"===i,onClick:()=>s("booking"===i?null:"booking")}),(0,F.jsx)(V,{icon:_.A,label:"Send Email",testId:"qa-email",active:"email"===i,onClick:()=>s("email"===i?null:"email")}),(0,F.jsx)(V,{icon:S.A,label:"Add Credential",testId:"qa-credential",active:"credential"===i,onClick:()=>s("credential"===i?null:"credential")})]}),"ticket"===i&&(0,F.jsx)(W,{user:t,onClose:()=>s(null),onDone:a}),"quote"===i&&(0,F.jsx)(G,{user:t,business:n,onClose:()=>s(null),onDone:a}),"booking"===i&&(0,F.jsx)($,{user:t,onClose:()=>s(null),onDone:a}),"email"===i&&(0,F.jsx)(Y,{user:t,onClose:()=>s(null),onDone:a}),"credential"===i&&(0,F.jsx)(K,{user:t,onClose:()=>s(null),onDone:a})]})},V=e=>{let{icon:t,label:n,testId:r,active:a,onClick:i}=e;return(0,F.jsxs)(E.$,{size:"sm",variant:a?"default":"outline",onClick:i,"data-testid":r,className:a?"font-bold":"",children:[(0,F.jsx)(t,{className:"w-3.5 h-3.5 mr-1.5"}),n]})},H=e=>{let{title:t,onClose:n,children:r,submitting:a,onSubmit:i,submitLabel:s="Submit",submitTestId:o}=e;return(0,F.jsxs)("div",{className:"mt-3 pt-3 border-t border-border space-y-3",children:[(0,F.jsx)("h5",{className:"text-xs uppercase tracking-widest text-muted-foreground",children:t}),r,(0,F.jsxs)("div",{className:"flex justify-end gap-2 pt-1",children:[(0,F.jsx)(E.$,{variant:"ghost",size:"sm",onClick:n,disabled:a,children:"Cancel"}),(0,F.jsx)(E.$,{size:"sm",onClick:i,disabled:a,className:"font-bold uppercase","data-testid":o,children:a?"Saving\u2026":s})]})]})},W=e=>{let{user:t,onClose:n,onDone:s}
2=e;const[o,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(""),[d,h]=(0,r.useState)("medium"),[f,p]=(0,r.useState)("general"),[m,g]=(0,r.useState)(!1);return(0,F.jsxs)(H,{title:"New Ticket",onClose:n,submitting:m,onSubmit:async()=>{if(!o.trim()||!c.trim())return i.oR.error("Title and description required");g(!0);try{await a.A.post("".concat(M,"/api/admin/tickets"),{user_id:t.user_id,title:o.trim(),description:c.trim(),priority:d,category:f},{withCredentials:!0}),i.oR.success("Ticket created for ".concat(t.name)),n(),null===s||void 0===s||s()}catch(l){var e,r;i.oR.error((null===(e=l.response)||void 0===e||null===(r=e.data)||void 0===r?void 0:r.detail)||"Failed to create ticket")}finally{g(!1)}},submitLabel:"Create Ticket",submitTestId:"qa-ticket-submit",children:[(0,F.jsx)(L.p,{value:o,onChange:e=>l(e.target.value),placeholder:"Title",className:"bg-input","data-testid":"qa-ticket-title"}),(0,F.jsx)(T.T,{rows:3,value:c,onChange:e=>u(e.target.value),placeholder:"Describe the issue",className:"bg-input","data-testid":"qa-ticket-desc"}),(0,F.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,F.jsxs)(R.l6,{value:d,onValueChange:h,children:[(0,F.jsx)(R.bq,{className:"bg-input","data-testid":"qa-ticket-priority",children:(0,F.jsx)(R.yv,{})}),(0,F.jsxs)(R.gC,{children:[(0,F.jsx)(R.eb,{value:"low",children:"Low"}),(0,F.jsx)(R.eb,{value:"medium",children:"Medium"}),(0,F.jsx)(R.eb,{value:"high",children:"High"}),(0,F.jsx)(R.eb,{value:"urgent",children:"Urgent"})]})]}),(0,F.jsxs)(R.l6,{value:f,onValueChange:p,children:[(0,F.jsx)(R.bq,{className:"bg-input","data-testid":"qa-ticket-category",children:(0,F.jsx)(R.yv,{})}),(0,F.jsxs)(R.gC,{children:[(0,F.jsx)(R.eb,{value:"general",children:"General"}),(0,F.jsx)(R.eb,{value:"technical",children:"Technical"}),(0,F.jsx)(R.eb,{value:"billing",children:"Billing"}),(0,F.jsx)(R.eb,{value:"network",children:"Network"}),(0,F.jsx)(R.eb,{value:"security",children:"Security"})]})]})]})]})},G=e=>{let{user:t,business:n,onClose:s,onDone:o}=e;const[l,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(""),[h,f]=(0,r.useState)(1),[p,m]=(0,r.useState)(""),[g,v]=(0,r.useState)(!1);return(0,F.jsxs)(H,{title:"Draft Quote",onClose:s,submitting:g,onSubmit:async()=>{if(!u.trim()||!p)return i.oR.error("Item description and unit price required");v(!0);try{await a.A.post("".concat(M,"/api/admin/quotes"),{user_id:t.user_id,client_name:t.name,client_email:t.email,client_address:(null===n||void 0===n?void 0:n.formatted_address)||"",items:[{description:u.trim(),quantity:parseFloat(h)||1,unit_price:parseFloat(p)}],tax_rate:0,valid_days:30,notes:l.trim()||""},{withCredentials:!0}),i.oR.success("Draft quote created \u2014 finish it from the Quotes tab"),s(),null===o||void 0===o||o()}catch(c){var e,r;i.oR.error((null===(e=c.response)||void 0===e||null===(r=e.data)||void 0===r?void 0:r.detail)||"Failed to create quote")}finally{v(!1)}},submitLabel:"Save Draft",submitTestId:"qa-quote-submit",children:[(0,F.jsx)(L.p,{value:l,onChange:e=>c(e.target.value),placeholder:"Internal note (optional)",className:"bg-input","data-testid":"qa-quote-title"}),(0,F.jsx)(L.p,{value:u,onChange:e=>d(e.target.value),placeholder:"Line item description",className:"bg-input","data-testid":"qa-quote-item"}),(0,F.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,F.jsxs)("div",{children:[(0,F.jsx)(P.J,{className:"text-[11px]",children:"Quantity"}),(0,F.jsx)(L.p,{type:"number",min:"1",value:h,onChange:e=>f(e.target.value),className:"bg-input","data-testid":"qa-quote-qty"})]}),(0,F.jsxs)("div",{children:[(0,F.jsx)(P.J,{className:"text-[11px]",children:"Unit price ($)"}),(0,F.jsx)(L.p,{type:"number",step:"0.01",value:p,onChange:e=>m(e.target.value),className:"bg-input","data-testid":"qa-quote-price"})]})]}),(0,F.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Saved as a draft. Add more line items, taxes, and send from the Quotes tab."})]})},$=e=>{let{user:t,onClose:n,onDone:s}=e;const o=r.useMemo(()=>{const e=[],t=new Date;for(let n=0;n<14&&e.length<30;n++){const r=new Date(t);r.setDate(t.getDate()+n);const a=r.getDay();if(0!==a&&6!==a)for(let t=9;t<17;t++)for(const n of[0,30]){const a=new Date(r);a.setHours(t,n,0,0),a.getTime()<Date.now()+36e5||e.push(a.toISOString())}}return e.slice(0,40)},[]),[l,c]=(0,r.useState)(o[0]||""),[u,d]=(0,r.useState)(30),[h,f]=(0,r.useState)(""),[p,m]=(0,r.useState)(!1);return(0,F.jsxs)(H,{title:"New Booking",onClose:n,submitting:p,onSubmit:async()=>
2{if(!l)return i.oR.error("Pick a time slot");m(!0);try{await a.A.post("".concat(M,"/api/admin/bookings"),{name:t.name,email:t.email,start_at:l,duration_minutes:parseInt(u,10),topic:h.trim(),status:"confirmed"},{withCredentials:!0}),i.oR.success("Booking confirmed for ".concat(t.name)),n(),null===s||void 0===s||s()}catch(o){var e,r;i.oR.error((null===(e=o.response)||void 0===e||null===(r=e.data)||void 0===r?void 0:r.detail)||"Failed to create booking")}finally{m(!1)}},submitLabel:"Confirm Booking",submitTestId:"qa-booking-submit",children:[(0,F.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,F.jsxs)("div",{children:[(0,F.jsx)(P.J,{className:"text-[11px]",children:"Slot"}),(0,F.jsxs)(R.l6,{value:l,onValueChange:c,children:[(0,F.jsx)(R.bq,{className:"bg-input","data-testid":"qa-booking-slot",children:(0,F.jsx)(R.yv,{})}),(0,F.jsx)(R.gC,{className:"max-h-[260px]",children:o.map(e=>(0,F.jsx)(R.eb,{value:e,children:(0,C.GP)(new Date(e),"EEE MMM dd \xb7 h:mm a")},e))})]})]}),(0,F.jsxs)("div",{children:[(0,F.jsx)(P.J,{className:"text-[11px]",children:"Duration (min)"}),(0,F.jsxs)(R.l6,{value:String(u),onValueChange:e=>d(parseInt(e,10)),children:[(0,F.jsx)(R.bq,{className:"bg-input","data-testid":"qa-booking-duration",children:(0,F.jsx)(R.yv,{})}),(0,F.jsxs)(R.gC,{children:[(0,F.jsx)(R.eb,{value:"15",children:"15"}),(0,F.jsx)(R.eb,{value:"30",children:"30"}),(0,F.jsx)(R.eb,{value:"45",children:"45"}),(0,F.jsx)(R.eb,{value:"60",children:"60"}),(0,F.jsx)(R.eb,{value:"90",children:"90"}),(0,F.jsx)(R.eb,{value:"120",children:"120"})]})]})]})]}),(0,F.jsx)(T.T,{rows:2,value:h,onChange:e=>f(e.target.value),placeholder:"Topic / agenda (optional)",className:"bg-input","data-testid":"qa-booking-topic"})]})},Y=e=>{let{user:t,onClose:n,onDone:s}=e;const[o,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(""),[d,h]=(0,r.useState)(!1);return(0,F.jsxs)(H,{title:"Email ".concat(t.email),onClose:n,submitting:d,onSubmit:async()=>{if(!o.trim()||!c.trim())return i.oR.error("Subject and message required");h(!0);try{const e=await a.A.post("".concat(M,"/api/admin/clients/").concat(t.user_id,"/send-email"),{subject:o.trim(),message:c},{withCredentials:!0});i.oR.success("Email sent to ".concat(e.data.to_email)),n(),null===s||void 0===s||s()}catch(l){var e,r;i.oR.error((null===(e=l.response)||void 0===e||null===(r=e.data)||void 0===r?void 0:r.detail)||"Email failed")}finally{h(!1)}},submitLabel:"Send",submitTestId:"qa-email-submit",children:[(0,F.jsx)(L.p,{value:o,onChange:e=>l(e.target.value),placeholder:"Subject",className:"bg-input","data-testid":"qa-email-subject"}),(0,F.jsx)(T.T,{rows:5,value:c,onChange:e=>u(e.target.value),placeholder:"Hi there, ...",className:"bg-input","data-testid":"qa-email-body"})]})},K=e=>{let{user:t,onClose:n,onDone:s}=e;const[o,l]=(0,r.useState)(""),[c,u]=(0,r.useState)(""),[d,h]=(0,r.useState)(""),[f,p]=(0,r.useState)(""),[m,g]=(0,r.useState)(""),[v,b]=(0,r.useState)(!1);return(0,F.jsxs)(H,{title:"New Credential",onClose:n,submitting:v,onSubmit:async()=>{if(!o.trim()||!c.trim()||!d)return i.oR.error("System, username, and password required");b(!0);try{await a.A.post("".concat(M,"/api/admin/credentials"),{user_id:t.user_id,system_name:o.trim(),username:c.trim(),password:d,url:f.trim()||null,notes:m.trim()||null},{withCredentials:!0}),i.oR.success("Credential saved for ".concat(t.name)),n(),null===s||void 0===s||s()}catch(l){var e,r;i.oR.error((null===(e=l.response)||void 0===e||null===(r=e.data)||void 0===r?void 0:r.detail)||"Failed to add credential")}finally{b(!1)}},submitLabel:"Save Credential",submitTestId:"qa-credential-submit",children:[(0,F.jsx)(L.p,{value:o,onChange:e=>l(e.target.value),placeholder:"System / app name (e.g. Office 365 admin)",className:"bg-input","data-testid":"qa-cred-system"}),(0,F.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,F.jsx)(L.p,{value:c,onChange:e=>u(e.target.value),placeholder:"Username",className:"bg-input","data-testid":"qa-cred-username"}),(0,F.jsx)(L.p,{type:"password",value:d,onChange:e=>h(e.target.value),placeholder:"Password (encrypted at rest)",className:"bg-input","data-testid":"qa-cred-password"})]}),(0,F.jsx)(L.p,{value:f,onChange:e=>p(e.target.value),placeholder:"URL (optional)",className:"bg-input","data-testid":"qa-cred-url"}),(0,F.jsx)(T.T,{rows:2,value:m,onChange:e=>g(e.target.value),placeholder:"Internal notes (optional)",className:"bg-input","data-testid":"qa-cred-notes"}),(0,F.jsx)("p",{className:"text-[11px] text-muted-foreground",children:"Stored encrypted via Fernet. The client and admins can reveal it later from the Credentials tab."})]})},X=e=>{var t,n;let{userId:p,open:y,onClose:x}=e;const[w,k]=(0,r.useState)(null),[N,A]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{y&&p&&(A(!0),a.A.get("".concat(M,"/api/admin/clients/").concat(p,"/profile"),{withCredentials:!0}).then(e=>k(e.data)).catch(e=>{var t,n;return i.oR.error((null===(t=e.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.detail)||"Failed to load profile")}).finally(()=>A(!1)))},[p,y]),(0,F.jsx)(s.lG,{open:y,onOpenChange:e=>!e&&(null===x||void 0===x?void 0:x()),children:(0,F.jsxs)(s.Cf,{className:"bg-card border-border max-w-4xl max-h-[88vh] overflow-y-auto","data-testid":"client-profile-dialog",children:[(0,F.jsx)(s.c7,{children:(0,F.jsxs)(s.L3,{className:"text-xl font-bold uppercase flex items-center gap-2",children:[(0,F.jsx)(u.A,{className:"w-5 h-5 text-primary"}),(null===w||void 0===w||null===(t=w.user)||void 0===t?void 0:t.name)||"Client Profile"]})}),N&&(0,F.jsx)("div",{className:"py-12 text-center",children:(0,F.jsx)(d.A,{className:"w-8 h-8 animate-spin mx-auto text-muted-foreground"})}),!N&&w&&(0,F.jsxs)("div",{className:"space-y-5",children:[(0,F.jsx)(z,{user:w.user,business:w.business,summary:w.summary}),(0,F.jsx)(U,{user:w.user,business:w.business,onAfterAction:()=>{A(!0),a.A.get("".concat(M,"/api/admin/clients/").concat(p,"/profile"),{withCredentials:!0}).then(e=>k(e.data)).finally(()=>A(!1))}}),(0,F.jsxs)(c.tU,{defaultValue:"tickets",className:"w-full",children:[(0,F.jsxs)(c.j7,{className:"grid grid-cols-6 w-full",children:[(0,F.jsxs)(c.Xi,{value:"tickets","data-testid":"profile-tab-tickets",children:["Tickets (",w.summary.tickets_total,")"]}),(0,F.jsxs)(c.Xi,{value:"quotes","data-testid":"profile-tab-quotes",children:["Quotes (",w.summary.quotes_total,")"]}),(0,F.jsxs)(c.Xi,{value:"invoices","data-testid":"profile-tab-invoices",children:["Invoices (",w.summary.invoices_total,")"]}),(0,F.jsxs)(c.Xi,{value:"subs","data-testid":"profile-tab-subs",children:["Subs (",w.summary.subscriptions_total,")"]}),(0,F.jsxs)(c.Xi,{value:"bookings","data-testid":"profile-tab-bookings",children:["Bookings (",w.summary.bookings_total,")"]}),(0,F.jsx)(c.Xi,{value:"comms","data-testid":"profile-tab-comms",children:"Comms"})]}),(0,F.jsxs)(c.av,{value:"tickets",className:"mt-4",children:[(0,F.jsx)(I,{icon:h.A,label:"Tickets",count:w.tickets.length}),0===w.tickets.length?(0,F.jsx)(q,{msg:"No tickets yet."}):(0,F.jsx)("div",{className:"space-y-2",children:w.tickets.map(e=>(0,F.jsx)(o.Zp,{className:"p-3 border-border","data-testid":"profile-ticket-".concat(e.ticket_id),children:(0,F.jsxs)("div",{className:"flex items-start justify-between gap-3 flex-wrap",children:[(0,F.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,F.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,F.jsx)("span",{className:"font-bold text-sm",children:e.title}),(0,F.jsx)(l.E,{variant:"outline",className:"text-[10px] ".concat(O[e.status]||""),children:e.status}),(0,F.jsx)(l.E,{variant:"outline",className:"text-[10px] uppercase",children:e.priority}),e.category&&(0,F.jsx)(l.E,{variant:"outline",className:"text-[10px]",children:e.category})]}),(0,F.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description})]}),(0,F.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0",children:D(e.created_at)})]})}
2,e.ticket_id))})]}),(0,F.jsxs)(c.av,{value:"quotes",className:"mt-4",children:[(0,F.jsx)(I,{icon:f.A,label:"Quotes",count:w.quotes.length}),0===w.quotes.length?(0,F.jsx)(q,{msg:"No quotes yet."}):(0,F.jsx)("div",{className:"space-y-2",children:w.quotes.map(e=>(0,F.jsx)(o.Zp,{className:"p-3 border-border","data-testid":"profile-quote-".concat(e.quote_id),children:(0,F.jsxs)("div",{className:"flex items-start justify-between gap-3 flex-wrap",children:[(0,F.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,F.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,F.jsx)("span",{className:"font-bold text-sm",children:e.title||"Untitled quote"}),(0,F.jsx)(l.E,{variant:"outline",className:"text-[10px] ".concat(O[e.status]||""),children:e.status})]}),(0,F.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:["$",(e.total_amount||0).toFixed(2)," \xb7 ",(e.items||[]).length," item",1===(e.items||[]).length?"":"s"]})]}),(0,F.jsx)("span",{className:"text-[11px] text-muted-foreground shrink-0",children:D(e.created_at)})]})},e.quote_id))})]}),(0,F.jsxs)(c.av,{value:"invoices",className:"mt-4",children:[(0,F.jsx)(I,{icon:m,label:"Invoices",count:w.invoices.length}),0===w.invoices.length?(0,F.jsx)(q,{msg:"No invoices yet."}):(0,F.jsx)("div",{className:"space-y-2",children:w.invoices.map(e=>(0,F.jsx)(o.Zp,{className:"p-3 border-border","data-testid":"profile-invoice-".concat(e.invoice_id),children:(0,F.jsxs)("div",{className:"flex items-start justify-between gap-3 flex-wrap",children:[(0,F.jsxs)("div",{className:"flex-1",children:[(0,F.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,F.jsx)("span",{className:"font-bold text-sm font-mono",children:e.wave_invoice_number?"#".concat(e.wave_invoice_number):e.invoice_id}),(0,F.jsx)(l.E,{variant:"outline",className:"text-[10px] ".concat(O[(e.status||"").toLowerCase()]||""),children:e.status})]}),(0,F.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:e.description||"\u2014"})]}),(0,F.jsxs)("div",{className:"text-right shrink-0",children:[(0,F.jsxs)("p",{className:"font-bold text-sm",children:["$",(e.amount||0).toFixed(2)]}),(0,F.jsx)("p",{className:"text-[11px] text-muted-foreground",children:D(e.created_at)})]})]})},e.invoice_id))})]}),(0,F.jsxs)(c.av,{value:"subs",className:"mt-4",children:[(0,F.jsx)(I,{icon:g,label:"Subscriptions",count:w.subscriptions.length}),0===w.subscriptions.length?(0,F.jsx)(q,{msg:"No subscriptions."}):(0,F.jsx)("div",{className:"space-y-2",children:w.subscriptions.map(e=>(0,F.jsx)(o.Zp,{className:"p-3 border-border","data-testid":"profile-sub-".concat(e.subscription_id),children:(0,F.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,F.jsxs)("div",{children:[(0,F.jsx)("p",{className:"font-bold text-sm",children:e.service_name}),(0,F.jsxs)("p",{className:"text-[11px] text-muted-foreground",children:["$",(e.monthly_price||0).toFixed(2)," \xb7 ",e.billing_cycle]})]}),(0,F.jsx)(l.E,{variant:"outline",className:"text-[10px] ".concat(O[e.status]||""),children:e.status})]})},e.subscription_id))})]}),(0,F.jsxs)(c.av,{value:"bookings",className:"mt-4",children:[(0,F.jsx)(I,{icon:v.A,label:"Bookings",count:w.bookings.length}),0===w.bookings.length?(0,F.jsx)(q,{msg:"No bookings on file."}):(0,F.jsx)("div",{className:"space-y-2",children:w.bookings.map(e=>(0,F.jsx)(o.Zp,{className:"p-3 border-border","data-testid":"profile-booking-".concat(e.booking_id),children:(0,F.jsxs)("div",{className:"flex items-center justify-between gap-3 flex-wrap",children:[(0,F.jsxs)("div",{children:[(0,F.jsx)("p",{className:"font-bold text-sm",children:D(e.start_at,"EEE MMM dd \xb7 h:mm a")}),(0,F.jsx)("p",{className:"text-[11px] text-muted-foreground",children:e.topic||"\u2014"})]}),(0,F.jsx)(l.E,{variant:"outline",className:"text-[10px] ".concat(O[e.status]||""),children:e.status})]})},e.booking_id))})]}),(0,F.jsxs)(c.av,{value:"comms",className:"mt-4",children:[(0,F.jsx)(I,{icon:b,label:"Communication log",count:((null===(n=w.business)||void 0===n?void 0:n.contact_log)||[]).length}),w.business&&0!==(w.business.contact_log||[]).length?(0,F.jsx)("div",{className:"space-y-2",children:[...w.business.contact_log||[]].reverse().map((e,t)=>(0,F.jsx)(o.Zp,{className:"p-3 border-border","data-testid":"profile-comm-".concat(t),children:(0,F.jsxs)("div",{className:"flex items-start gap-3",children:[(0,F.jsx)(l.E,{variant:"outline",className:"text-[10px] uppercase shrink-0",children:e.channel||"manual"}),(0,F.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,F.jsx)("p",{className:"text-xs",children:e.note||"\u2014"}),(0,F.jsxs)("p",{className:"text-[10px] text-muted-foreground mt-1",children:[D(e.at,"MMM dd yyyy \xb7 h:mm a")," ",e.actor&&"\xb7 ".concat(e.actor)]})]})]})},t))}):(0,F.jsx)(q,{msg:"No marketing/contact history."})]})]})]})]})})}},1578(e,t,n){function r(e){return r="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},r(e)}n.d(t,{uE:()=>Ja});var a=Uint8Array,i=Uint16Array,s=Int32Array,o=new a([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),l=new a([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),c=new a([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=function(e,t){for(var n=new i(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var a=new s(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)a[o]=o-n[r]<<5|r;return{b:n,r:a}},d=u(o,2),h=d.b,f=d.r;h[28]=258,f[258]=28;for(var p=u(l,0),m=(p.b,p.r),g=new i(32768),v=0;v<32768;++v){var b=(43690&v)>>1|(21845&v)<<1;b=(61680&(b=(52428&b)>>2|(13107&b)<<2))>>4|(3855&b)<<4,g[v]=((65280&b)>>8|(255&b)<<8)>>1}var y=function(e,t,n){for(var r=e.length,a=0,s=new i(t);a<r;++a)e[a]&&++s[e[a]-1];var o,l=new i(t);for(a=1;a<t;++a)l[a]=l[a-1]+s[a-1]<<1;if(n){o=new i(1<<t);var c=15-t;for(a=0;a<r;++a)if(e[a])for(var u=a<<4|e[a],d=t-e[a],h=l[e[a]-1]++<<d,f=h|(1<<d)-1;h<=f;++h)o[g[h]>>c]=u}else for(o=new i(r),a=0;a<r;++a)e[a]&&(o[a]=g[l[e[a]-1]++]>>15-e[a]);return o},x=new a(288);for(v=0;v<144;++v)x[v]=8;for(v=144;v<256;++v)x[v]=9;for(v=256;v<280;
vendor: 5,773 bytes, line 2
2++v)x[v]=7;for(v=280;v<288;++v)x[v]=8;var w=new a(32);for(v=0;v<32;++v)w[v]=5;var k=y(x,9,0),N=y(w,5,0),A=function(e){return(e+7)/8|0},j=function(e,t,n){return(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length),new a(e.subarray(t,n))},_=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},S=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},C=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var s=n.length,o=n.slice();if(!s)return{t:M,l:0};if(1==s){var l=new a(n[0].s+1);return l[n[0].s]=1,{t:l,l:1}}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var c=n[0],u=n[1],d=0,h=1,f=2;for(n[0]={s:-1,f:c.f+u.f,l:c,r:u};h!=s-1;)c=n[n[d].f<n[f].f?d++:f++],u=n[d!=h&&n[d].f<n[f].f?d++:f++],n[h++]={s:-1,f:c.f+u.f,l:c,r:u};var p=o[0].s;for(r=1;r<s;++r)o[r].s>p&&(p=o[r].s);var m=new i(p+1),g=E(n[h-1],m,0);if(g>t){r=0;var v=0,b=g-t,y=1<<b;for(o.sort(function(e,t){return m[t.s]-m[e.s]||e.f-t.f});r<s;++r){var x=o[r].s;if(!(m[x]>t))break;v+=y-(1<<g-m[x]),m[x]=t}for(v>>=b;v>0;){var w=o[r].s;m[w]<t?v-=1<<t-m[w]++-1:++r}for(;r>=0&&v;--r){var k=o[r].s;m[k]==t&&(--m[k],++v)}g=t}return{t:new a(m),l:g}},E=function(e,t,n){return-1==e.s?Math.max(E(e.l,t,n+1),E(e.r,t,n+1)):t[e.s]=n},L=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new i(++t),r=0,a=e[0],s=1,o=function(e){n[r++]=e},l=1;l<=t;++l)if(e[l]==a&&l!=t)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=e[l]}return{c:n.subarray(0,r),n:t}},P=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},T=function(e,t,n){var r=n.length,a=A(t+2);e[a]=255&r,e[a+1]=r>>8,e[a+2]=255^e[a],e[a+3]=255^e[a+1];for(var i=0;i<r;++i)e[a+i+4]=n[i];return 8*(a+4+r)},R=function(e,t,n,r,a,s,u,d,h,f,p){_(t,p++,n),++a[256];for(var m=C(a,15),g=m.t,v=m.l,b=C(s,15),A=b.t,j=b.l,E=L(g),R=E.c,F=E.n,M=L(A),O=M.c,D=M.n,I=new i(19),z=0;z<R.length;++z)++I[31&R[z]];for(z=0;z<O.length;++z)++I[31&O[z]];for(var B=C(I,7),q=B.t,U=B.l,V=19;V>4&&!q[c[V-1]];--V);var H,W,G,$,Y=f+5<<3,K=P(a,x)+P(s,w)+u,X=P(a,g)+P(s,A)+u+14+3*V+P(I,q)+2*I[16]+3*I[17]+7*I[18];if(h>=0&&Y<=K&&Y<=X)return T(t,p,e.subarray(h,h+f));if(_(t,p,1+(X<K)),p+=2,X<K){H=y(g,v,0),W=g,G=y(A,j,0),$=A;var Z=y(q,U,0);_(t,p,F-257),_(t,p+5,D-1),_(t,p+10,V-4),p+=14;for(z=0;z<V;++z)_(t,p+3*z,q[c[z]]);p+=3*V;for(var J=[R,O],Q=0;Q<2;++Q){var ee=J[Q];for(z=0;z<ee.length;++z){var te=31&ee[z];_(t,p,Z[te]),p+=q[te],te>15&&(_(t,p,ee[z]>>5&127),p+=ee[z]>>12)}}}else H=k,W=x,G=N,$=w;for(z=0;z<d;++z){var ne=r[z];if(ne>255){S(t,p,H[(te=ne>>18&31)+257]),p+=W[te+257],te>7&&(_(t,p,ne>>23&31),p+=o[te]);var re=31≠S(t,p,G[re]),p+=$[re],re>3&&(S(t,p,ne>>5&8191),p+=l[re])}else S(t,p,H[ne]),p+=W[ne]}return S(t,p,H[256]),p+W[256]},F=new s([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),M=new a(0),O=function(e,t,n,r,c,u){var d=u.z||e.length,h=new a(r+d+5*(1+Math.ceil(d/7e3))+c),p=h.subarray(r,h.length-c),g=u.l,v=7&(u.r||0);if(t){v&&(p[0]=u.r>>3);for(var b=F[t-1],y=b>>13,x=8191&b,w=(1<<n)-1,k=u.p||new i(32768),N=u.h||new i(w+1),_=Math.ceil(n/3),S=2*_,C=function(t){return(e[t]^e[t+1]<<_^e[t+2]<<S)&w},E=new s(25e3),L=new i(288),P=new i(32),M=0,O=0,D=u.i||0,I=0,z=u.w||0,B=0;D+2<d;++D){var q=C(D),U=32767&D,V=N[q];if(k[U]=V,N[q]=U,z<=D){var H=d-D;if((M>7e3||I>24576)&&(H>423||!g)){v=R(e,p,0,E,L,P,O,I,B,D-B,v),I=M=O=0,B=D;for(var W=0;W<286;++W)L[W]=0;for(W=0;W<30;++W)P[W]=0}var G=2,$=0,Y=x,K=U-V&32767;if(H>2&&q==C(D-K))for(var X=Math.min(y,H)-1,Z=Math.min(32767,D),J=Math.min(258,H);K<=Z&&--Y&&U!=V;){if(e[D+G]==e[D+G-K]){for(var Q=0;Q<J&&e[D+Q]==e[D+Q-K];++Q);if(Q>G){if(G=Q,$=K,Q>X)break;var ee=Math.min(K,Q-2),te=0;for(W=0;W<ee;++W){var ne=D-K+W&32767,re=ne-k[ne]&32767;re>te&&(te=re,V=ne)}}}K+=(U=V)-(V=k[U])&32767}if($){E[I++]=268435456|f[G]<<18|m[$];var ae=31&f[G],ie=31&m[$];O+=o[ae]+l[ie],++L[257+ae],++P[ie],z=D+G,++M}else E[I++]=e[D],++L[e[D]]}}for(D=Math.max(D,z);D<d;++D)E[I++]=e[D],++L[e[D]];v=R(e,p,g,E,L,P,O,I,B,D-B,v),g||(u.r=7&v|p[v/8|0]<<3,v-=7,u.h=N,u.p=k,u.i=D,u.w=z)}else{for(D=u.w||0;D<d+g;D+=65535){var se=D+65535;se>=d&&(p[v/8|0]=g,se=d),v=T(p,v+1,e.subarray(D,se))}u.i=d}return j(h,0,r+A(v)+c)},D=function(){var e=1,t=0;return{p:function(n){for(var r=e,a=t,i=0|n.length,s=0;s!=i;){for(var o=Math.min(s+2655,i);s<o;++s)a+=r+=n[s];r=(65535&r)+15*(r>>16),a=(65535&a)+15*(a>>16)}e=r,t=a},d:function(){return(255&(e%=65521))<<24|(65280&e)<<8|(255&(t%=65521))<<8|t>>8}}},I=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var s=t.dictionary.subarray(-32768),o=new a(s.length+e.length);o.set(s),o.set(e,s.length),e=o,i.w=s.length}return O(e,null==t.level?6:t.level,null==t.mem?i.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,n,r,i)},z=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},B=function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var a=D();a.p(t.dictionary),z(e,2,a.d())}};function q(e,t){t||(t={});var n=D();n.p(e);var r=I(e,t,t.dictionary?6:2,4);return B(r,t),z(r,r.length-4,n.d()),r}var U="undefined"!=typeof TextDecoder&&new TextDecoder;try{U.decode(M,{stream:!0})}catch(Ws){}"function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout&&setTimeout;function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function H(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,i,s,o=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(e){c=!0,a=e}
2finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw a}}return o}}(e,t)||function(e,t){if(e){if("string"==typeof e)return V(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var W=n(4705);function G(e){return new TextDecoder(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8").decode(e)}const $=new TextEncoder;const Y=(()=>{const e=new Uint8Array(4);return!((new Uint32Array(e.buffer)[0]=1)&e[0])})(),K={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array};class X{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8192,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,W.A)(this,"buffer",void 0),(0,W.A)(this,"byteLength",void 0),(0,W.A)(this,"byteOffset",void 0),(0,W.A)(this,"length",void 0),(0,W.A)(this,"offset",void 0),(0,W.A)(this,"lastWrittenByte",void 0),(0,W.A)(this,"littleEndian",void 0),(0,W.A)(this,"_data",void 0),(0,W.A)(this,"_mark",void 0),(0,W.A)(this,"_marks",void 0);let n=!1;"number"===typeof e?e=new ArrayBuffer(e):(n=!0,this.lastWrittenByte=e.byteLength);const r=t.offset?t.offset>>>0:0,a=e.byteLength-r;let i=r;(ArrayBuffer.isView(e)||e instanceof X)&&(e.byteLength!==e.buffer.byteLength&&(i=e.byteOffset+r),e=e.buffer),this.lastWrittenByte=n?a:0,this.buffer=e,this.length=a,this.byteLength=a,this.byteOffset=i,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,i,a),this._mark=0,this._marks=[]}available(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.offset+=e,this}back(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){const e=this._marks.pop();if(void 0===e)throw new Error("Mark stack empty");return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;if(!this.available(e)){const t=2*(this.offset+e),n=new Uint8Array(t);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=t,this.byteLength=t,this._data=new DataView(this.buffer)}return this}readBoolean(){return 0!==this.readUint8()}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.readArray(e,"uint8")}readArray(e,t){const n=K[t].BYTES_PER_ELEMENT*e,r=this.byteOffset+this.offset,a=this.buffer.slice(r,r+n);if(this.littleEndian===Y&&"uint8"!==t&&"int8"!==t){const e=new Uint8Array(this.buffer.slice(r,r+n));e.reverse();const a=new K[t](e.buffer);return this.offset+=n,a.reverse(),a}const i=new K[t](a);return this.offset+=n,i}readInt16(){const e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){const e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){const e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){const e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){const e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){const e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){const e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){const e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t="";for(let n=0;n<e;n++)t+=this.readChar();return t}readUtf8(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return G(this.readBytes(e))}decodeText(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"utf8";return G(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(function(e){return $.encode(e)}(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}}function Z(e){let t=e.length;for(;--t>=0;)e[t]=0}const J=256,Q=286,ee=30,te=15,ne=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),re=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),ae=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),ie=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),se=new Array(576);Z(se);const oe=new Array(60);Z(oe);const le=new Array(512);Z(le);const ce=new Array(256);Z(ce);const ue=new Array(29);Z(ue);const de=new Array(ee);function he(e,t,n,r,a){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=a,this.has_stree=e&&e.length}let fe,pe,me;function ge(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}Z(de);const ve=e=>e<256?le[e]:le[256+(e>>>7)],be=(e,t)=>
vendor: 1,155 bytes, line 2
2{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},ye=(e,t,n)=>{e.bi_valid>16-n?(e.bi_buf|=t<<e.bi_valid&65535,be(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},xe=(e,t,n)=>{ye(e,n[2*t],n[2*t+1])},we=(e,t)=>{let n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1},ke=(e,t,n)=>{const r=new Array(16);let a,i,s=0;for(a=1;a<=te;a++)s=s+n[a-1]<<1,r[a]=s;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=we(r[t]++,t))}},Ne=e=>{let t;for(t=0;t<Q;t++)e.dyn_ltree[2*t]=0;for(t=0;t<ee;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},Ae=e=>{e.bi_valid>8?be(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},je=(e,t,n,r)=>{const a=2*t,i=2*n;return e[a]<e[i]||e[a]===e[i]&&r[t]<=r[n]},_e=(e,t,n)=>{const r=e.heap[n];let a=n<<1;for(;a<=e.heap_len&&(a<e.heap_len&&je(t,e.heap[a+1],e.heap[a],e.depth)&&a++,!je(t,r,e.heap[a],e.depth));)e.heap[n]=e.heap[a],n=a,a<<=1;e.heap[n]=r},Se=(e,t,n)=>{let r,a,i,s,o=0;if(0!==e.sym_next)do{r=255&e.pending_buf[e.sym_buf+o++],r+=(255&e.pen
vendor: 6,186 bytes, line 2
2ding_buf[e.sym_buf+o++])<<8,a=e.pending_buf[e.sym_buf+o++],0===r?xe(e,a,t):(i=ce[a],xe(e,i+J+1,t),s=ne[i],0!==s&&(a-=ue[i],ye(e,a,s)),r--,i=ve(r),xe(e,i,n),s=re[i],0!==s&&(r-=de[i],ye(e,r,s)))}while(o<e.sym_next);xe(e,256,t)},Ce=(e,t)=>{const n=t.dyn_tree,r=t.stat_desc.static_tree,a=t.stat_desc.has_stree,i=t.stat_desc.elems;let s,o,l,c=-1;for(e.heap_len=0,e.heap_max=573,s=0;s<i;s++)0!==n[2*s]?(e.heap[++e.heap_len]=c=s,e.depth[s]=0):n[2*s+1]=0;for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[2*l]=1,e.depth[l]=0,e.opt_len--,a&&(e.static_len-=r[2*l+1]);for(t.max_code=c,s=e.heap_len>>1;s>=1;s--)_e(e,n,s);l=i;do{s=e.heap[1],e.heap[1]=e.heap[e.heap_len--],_e(e,n,1),o=e.heap[1],e.heap[--e.heap_max]=s,e.heap[--e.heap_max]=o,n[2*l]=n[2*s]+n[2*o],e.depth[l]=(e.depth[s]>=e.depth[o]?e.depth[s]:e.depth[o])+1,n[2*s+1]=n[2*o+1]=l,e.heap[1]=l++,_e(e,n,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const n=t.dyn_tree,r=t.max_code,a=t.stat_desc.static_tree,i=t.stat_desc.has_stree,s=t.stat_desc.extra_bits,o=t.stat_desc.extra_base,l=t.stat_desc.max_length;let c,u,d,h,f,p,m=0;for(h=0;h<=te;h++)e.bl_count[h]=0;for(n[2*e.heap[e.heap_max]+1]=0,c=e.heap_max+1;c<573;c++)u=e.heap[c],h=n[2*n[2*u+1]+1]+1,h>l&&(h=l,m++),n[2*u+1]=h,u>r||(e.bl_count[h]++,f=0,u>=o&&(f=s[u-o]),p=n[2*u],e.opt_len+=p*(h+f),i&&(e.static_len+=p*(a[2*u+1]+f)));if(0!==m){do{for(h=l-1;0===e.bl_count[h];)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[l]--,m-=2}while(m>0);for(h=l;0!==h;h--)for(u=e.bl_count[h];0!==u;)d=e.heap[--c],d>r||(n[2*d+1]!==h&&(e.opt_len+=(h-n[2*d+1])*n[2*d],n[2*d+1]=h),u--)}})(e,t),ke(n,c,e.bl_count)},Ee=(e,t,n)=>{let r,a,i=-1,s=t[1],o=0,l=7,c=4;for(0===s&&(l=138,c=3),t[2*(n+1)+1]=65535,r=0;r<=n;r++)a=s,s=t[2*(r+1)+1],++o<l&&a===s||(o<c?e.bl_tree[2*a]+=o:0!==a?(a!==i&&e.bl_tree[2*a]++,e.bl_tree[32]++):o<=10?e.bl_tree[34]++:e.bl_tree[36]++,o=0,i=a,0===s?(l=138,c=3):a===s?(l=6,c=3):(l=7,c=4))},Le=(e,t,n)=>{let r,a,i=-1,s=t[1],o=0,l=7,c=4;for(0===s&&(l=138,c=3),r=0;r<=n;r++)if(a=s,s=t[2*(r+1)+1],!(++o<l&&a===s)){if(o<c)do{xe(e,a,e.bl_tree)}while(0!==--o);else 0!==a?(a!==i&&(xe(e,a,e.bl_tree),o--),xe(e,16,e.bl_tree),ye(e,o-3,2)):o<=10?(xe(e,17,e.bl_tree),ye(e,o-3,3)):(xe(e,18,e.bl_tree),ye(e,o-11,7));o=0,i=a,0===s?(l=138,c=3):a===s?(l=6,c=3):(l=7,c=4)}};let Pe=!1;const Te=(e,t,n,r)=>{ye(e,0+(r?1:0),3),Ae(e),be(e,n),be(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n};var Re=e=>{Pe||((()=>{let e,t,n,r,a;const i=new Array(16);for(n=0,r=0;r<28;r++)for(ue[r]=n,e=0;e<1<<ne[r];e++)ce[n++]=r;for(ce[n-1]=r,a=0,r=0;r<16;r++)for(de[r]=a,e=0;e<1<<re[r];e++)le[a++]=r;for(a>>=7;r<ee;r++)for(de[r]=a<<7,e=0;e<1<<re[r]-7;e++)le[256+a++]=r;for(t=0;t<=te;t++)i[t]=0;for(e=0;e<=143;)se[2*e+1]=8,e++,i[8]++;for(;e<=255;)se[2*e+1]=9,e++,i[9]++;for(;e<=279;)se[2*e+1]=7,e++,i[7]++;for(;e<=287;)se[2*e+1]=8,e++,i[8]++;for(ke(se,287,i),e=0;e<ee;e++)oe[2*e+1]=5,oe[2*e]=we(e,5);fe=new he(se,ne,257,Q,te),pe=new he(oe,re,0,ee,te),me=new he(new Array(0),ae,0,19,7)})(),Pe=!0),e.l_desc=new ge(e.dyn_ltree,fe),e.d_desc=new ge(e.dyn_dtree,pe),e.bl_desc=new ge(e.bl_tree,me),e.bi_buf=0,e.bi_valid=0,Ne(e)},Fe=(e,t,n,r)=>{let a,i,s=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<J;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),Ce(e,e.l_desc),Ce(e,e.d_desc),s=(e=>{let t;for(Ee(e,e.dyn_ltree,e.l_desc.max_code),Ee(e,e.dyn_dtree,e.d_desc.max_code),Ce(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*ie[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),a=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=a&&(a=i)):a=i=n+5,n+4<=a&&-1!==t?Te(e,t,n,r):4===e.strategy||i===a?(ye(e,2+(r?1:0),3),Se(e,se,oe)):(ye(e,4+(r?1:0),3),((e,t,n,r)=>{let a;for(ye(e,t-257,5),ye(e,n-1,5),ye(e,r-4,4),a=0;a<r;a++)ye(e,e.bl_tree[2*ie[a]+1],3);Le(e,e.dyn_ltree,t-1),Le(e,e.dyn_dtree,n-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,s+1),Se(e,e.dyn_ltree,e.dyn_dtree)),Ne(e),r&&Ae(e)},Me=(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(ce[n]+J+1)]++,e.dyn_dtree[2*ve(t)]++),e.sym_next===e.sym_end),Oe=e=>{ye(e,2,3),xe(e,256,se),(e=>{16===e.bi_valid?(be(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)},De={_tr_init:Re,_tr_stored_block:Te,_tr_flush_block:Fe,_tr_tally:Me,_tr_align:Oe};var Ie=(e,t,n,r)=>{let a=65535&e,i=e>>>16&65535,s=0;for(;0!==n;){s=n>2e3?2e3:n,n-=s;do{a=a+t[r++]|0,i=i+a|0}while(--s);a%=65521,i%=65521}return a|i<<16};const ze=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t})());var Be=(e,t,n,r)=>{const a=ze,i=r+n;e^=-1;for(let s=r;s<i;s++)e=e>>>8^a[255&(e^t[s])];return-1^e},qe={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Ue={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:Ve,_tr_stored_block:He,_tr_flush_block:We,_tr_tally:Ge,_tr_align:$e}=De,{Z_NO_FLUSH:Ye,Z_PARTIAL_FLUSH:Ke,Z_FULL_FLUSH:Xe,Z_FINISH:Ze,Z_BLOCK:Je,Z_OK:Qe,Z_STREAM_END:et,Z_STREAM_ERROR:tt,Z_DATA_ERROR:nt,Z_BUF_ERROR:rt,Z_DEFAULT_COMPRESSION:at,Z_FILTERED:it,Z_HUFFMAN_ONLY:st,Z_RLE:ot,Z_FIXED:lt,Z_DEFAULT_STRATEGY:ct,Z_UNKNOWN:ut,Z_DEFLATED:dt}=Ue,ht=258,ft=262,pt=42,mt=113,gt=666,vt=(e,t)=>(e.msg=qe[t],t),bt=e=>2*e-(e>4?9:0),yt=e=>{let t=e.length;for(;--t>=0;)e[t]=0},xt=e=>{let t,n,r,a=e.w_size;t=e.hash_size,r=t;do{n=e.head[--r],e.head[r]=n>=a?n-a:0}while(--t);t=a,r=t;do{n=e.prev[--r],e.prev[r]=n>=a?n-a:0}while(--t)};
vendor: 4,086 bytes, line 2
2let wt=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask;const kt=e=>{const t=e.state;let n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Nt=(e,t)=>{We(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,kt(e.strm)},At=(e,t)=>{e.pending_buf[e.pending++]=t},jt=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},_t=(e,t,n,r)=>{let a=e.avail_in;return a>r&&(a=r),0===a?0:(e.avail_in-=a,t.set(e.input.subarray(e.next_in,e.next_in+a),n),1===e.state.wrap?e.adler=Ie(e.adler,t,a,n):2===e.state.wrap&&(e.adler=Be(e.adler,t,a,n)),e.next_in+=a,e.total_in+=a,a)},St=(e,t)=>{let n,r,a=e.max_chain_length,i=e.strstart,s=e.prev_length,o=e.nice_match;const l=e.strstart>e.w_size-ft?e.strstart-(e.w_size-ft):0,c=e.window,u=e.w_mask,d=e.prev,h=e.strstart+ht;let f=c[i+s-1],p=c[i+s];e.prev_length>=e.good_match&&(a>>=2),o>e.lookahead&&(o=e.lookahead);do{if(n=t,c[n+s]===p&&c[n+s-1]===f&&c[n]===c[i]&&c[++n]===c[i+1]){i+=2,n++;do{}while(c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&c[++i]===c[++n]&&i<h);if(r=ht-(h-i),i=h-ht,r>s){if(e.match_start=t,s=r,r>=o)break;f=c[i+s-1],p=c[i+s]}}}while((t=d[t&u])>l&&0!==--a);return s<=e.lookahead?s:e.lookahead},Ct=e=>{const t=e.w_size;let n,r,a;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-ft)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),xt(e),r+=t),0===e.strm.avail_in)break;if(n=_t(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=3)for(a=e.strstart-e.insert,e.ins_h=e.window[a],e.ins_h=wt(e,e.ins_h,e.window[a+1]);e.insert&&(e.ins_h=wt(e,e.ins_h,e.window[a+3-1]),e.prev[a&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=a,a++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<ft&&0!==e.strm.avail_in)},Et=(e,t)=>{let n,r,a,i=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,s=0,o=e.strm.avail_in;do{if(n=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a)break;if(a=e.strm.avail_out-a,r=e.strstart-e.block_start,n>r+e.strm.avail_in&&(n=r+e.strm.avail_in),n>a&&(n=a),n<i&&(0===n&&t!==Ze||t===Ye||n!==r+e.strm.avail_in))break;s=t===Ze&&n===r+e.strm.avail_in?1:0,He(e,0,0,s),e.pending_buf[e.pending-4]=n,e.pending_buf[e.pending-3]=n>>8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,kt(e.strm),r&&(r>n&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(_t(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(0===s);return o-=e.strm.avail_in,o&&(o>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=o&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-o,e.strm.next_in),e.strstart),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),s?4:t!==Ye&&t!==Ze&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(_t(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,i=a>
vendor: 6,092 bytes, line 2
2e.w_size?e.w_size:a,r=e.strstart-e.block_start,(r>=i||(r||t===Ze)&&t!==Ye&&0===e.strm.avail_in&&r<=a)&&(n=r>a?a:r,s=t===Ze&&0===e.strm.avail_in&&n===r?1:0,He(e,e.block_start,n,s),e.block_start+=n,kt(e.strm)),s?3:1)},Lt=(e,t)=>{let n,r;for(;;){if(e.lookahead<ft){if(Ct(e),e.lookahead<ft&&t===Ye)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=wt(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-ft&&(e.match_length=St(e,n)),e.match_length>=3)if(r=Ge(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=wt(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!==--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=wt(e,e.ins_h,e.window[e.strstart+1]);else r=Ge(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Nt(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===Ze?(Nt(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Nt(e,!1),0===e.strm.avail_out)?1:2},Pt=(e,t)=>{let n,r,a;for(;;){if(e.lookahead<ft){if(Ct(e),e.lookahead<ft&&t===Ye)return 1;if(0===e.lookahead)break}if(n=0,e.lookahead>=3&&(e.ins_h=wt(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-ft&&(e.match_length=St(e,n),e.match_length<=5&&(e.strategy===it||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){a=e.strstart+e.lookahead-3,r=Ge(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=a&&(e.ins_h=wt(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!==--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Nt(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(r=Ge(e,0,e.window[e.strstart-1]),r&&Nt(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(r=Ge(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===Ze?(Nt(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Nt(e,!1),0===e.strm.avail_out)?1:2};function Tt(e,t,n,r,a){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=a}const Rt=[new Tt(0,0,0,0,Et),new Tt(4,4,8,4,Lt),new Tt(4,5,16,8,Lt),new Tt(4,6,32,32,Lt),new Tt(4,4,16,16,Pt),new Tt(8,16,32,32,Pt),new Tt(8,16,128,128,Pt),new Tt(8,32,128,256,Pt),new Tt(32,128,258,1024,Pt),new Tt(32,258,258,4096,Pt)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=dt,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),yt(this.dyn_ltree),yt(this.dyn_dtree),yt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),yt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),yt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Mt=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==pt&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==mt&&t.status!==gt?1:0},Ot=e=>{if(Mt(e))return vt(e,tt);e.total_in=e.total_out=0,e.data_type=ut;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?pt:mt,e.adler=2===t.wrap?0:1,t.last_flush=-2,Ve(t),Qe},Dt=e=>{const t=Ot(e);return t===Qe&&(e=>{e.window_size=2*e.w_size,yt(e.head),e.max_lazy_match=Rt[e.level].max_lazy,e.good_match=Rt[e.level].good_length,e.nice_match=Rt[e.level].nice_length,e.max_chain_length=Rt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0})(e.state),t},It=(e,t,n,r,a,i)=>{if(!e)return tt;let s=1;if(t===at&&(t=6),r<0?(s=0,r=-r):r>15&&(s=2,r-=16),a<1||a>9||n!==dt||r<8||r>15||t<0||t>9||i<0||i>lt||8===r&&1!==s)return vt(e,tt);8===r&&(r=9);const o=new Ft;return e.state=o,o.strm=e,o.status=pt,o.wrap=s,o.gzhead=null,o.w_bits=r,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=a+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<a+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=t,o.strategy=i,o.method=n,Dt(e)};var zt=(e,t)=>{if(Mt(e)||t>Je||t<0)return e?vt(e,tt):tt;const n=e.state;if(!e.output||0!==e.avail_in&&!e.input||n.status===gt&&t!==Ze)return vt(e,0===e.avail_out?rt:tt);const r=n.last_flush;if(n.last_flush=t,0!==n.pending){if(kt(e),0===e.avail_out)return n.last_flush=-1,Qe}else if(0===e.avail_in&&bt(t)<=bt(r)&&t!==Ze)return vt(e,rt);if(n.status===gt&&0!==e.avail_in)return vt(e,rt);if(n.status===pt&&0===n.wrap&&(n.status=mt),n.status===pt){let t=dt+(n.w_b
vendor: 4,537 bytes, line 2
2its-8<<4)<<8,r=-1;if(r=n.strategy>=st||n.level<2?0:n.level<6?1:6===n.level?2:3,t|=r<<6,0!==n.strstart&&(t|=32),t+=31-t%31,jt(n,t),0!==n.strstart&&(jt(n,e.adler>>>16),jt(n,65535&e.adler)),e.adler=1,n.status=mt,kt(e),0!==n.pending)return n.last_flush=-1,Qe}if(57===n.status)if(e.adler=0,At(n,31),At(n,139),At(n,8),n.gzhead)At(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),At(n,255&n.gzhead.time),At(n,n.gzhead.time>>8&255),At(n,n.gzhead.time>>16&255),At(n,n.gzhead.time>>24&255),At(n,9===n.level?2:n.strategy>=st||n.level<2?4:0),At(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(At(n,255&n.gzhead.extra.length),At(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=Be(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(At(n,0),At(n,0),At(n,0),At(n,0),At(n,0),At(n,9===n.level?2:n.strategy>=st||n.level<2?4:0),At(n,3),n.status=mt,kt(e),0!==n.pending)return n.last_flush=-1,Qe;if(69===n.status){if(n.gzhead.extra){let t=n.pending,r=(65535&n.gzhead.extra.length)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let a=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+a),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=Be(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=a,kt(e),0!==n.pending)return n.last_flush=-1,Qe;t=0,r-=a}let a=new Uint8Array(n.gzhead.extra);n.pending_buf.set(a.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=Be(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){let t,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(e.adler=Be(e.adler,n.pending_buf,n.pending-r,r)),kt(e),0!==n.pending)return n.last_flush=-1,Qe;r=0}t=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,At(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=Be(e.adler,n.pending_buf,n.pending-r,r)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){let t,r=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>r&&(e.adler=Be(e.adler,n.pending_buf,n.pending-r,r)),kt(e),0!==n.pending)return n.last_flush=-1,Qe;r=0}t=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,At(n,t)}while(0!==t);n.gzhead.hcrc&&n.pending>r&&(e.adler=Be(e.adler,n.pending_buf,n.pending-r,r))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(kt(e),0!==n.pending))return n.last_flush=-1,Qe;At(n,255&e.adler),At(n,e.adler>>8&255),e.adler=0}if(n.status=mt,kt(e),0!==n.pending)return n.last_flush=-1,Qe}if(0!==e.avail_in||0!==n.lookahead||t!==Ye&&n.status!==gt){let r=0===n.level?Et(n,t):n.strategy===st?((e,t)=>{let n;for(;;){if(0===e.lookahead&&(Ct(e),0===e.lookahead)){if(t===Ye)return 1;break}if(e.match_length=0,n=Ge(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Nt(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Ze?(Nt(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Nt(e,!1),0===e.strm.avail_out)?1:2})(n,t):n.strategy===ot?((e,t)=>{let n,r,a,i;const s=e.window;for(;;){if(e.lookahead<=ht){if(Ct(e),e.lookahead<=ht&&t===Ye)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(a=e.strstart-1,r=s[a],r===s[++a]&&r===s[++a]&&r===s[++a])){i=e.strstart+ht;do{}while(r===s[++a]&&r===s[++a]&&r===s[++a]&&r===s[++a]&&r===s[++a]&&r===s[++a]&&r===s[++a]&&r===s[++a]&&a<i);e.match_length=ht-(i-a),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=Ge(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Ge(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Nt(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Ze?(Nt(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Nt(e,!1),0===e.strm.avail_out)?1:2})(n,t):Rt[n.level].func(n,t);if(3!==r&&4!==r||(n.status=gt),1===r||3===r)return 0===e.avail_out&&(n.last_flush=-1),Qe;if(2===r&&(t===Ke?$e(n):t!==Je&&(He(n,0,0,!1),t===Xe&&(yt(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),kt(e),0===e.avail_out))return n.last_flush=-1,Qe}return t!==Ze?Qe:n.wrap<=0?et:(2===n.wrap?(At(n,255&e.adler),At(n,e.adler>>8&255),At(n,e.adler>>16&255),At(n,e.adler>>24&255),At(n,255&e.total_in),At(n,e.total_in>>8&255),At(n,e.total_in>>16&255),At(n,e.total_in>>24&255)):(jt(n,e.adler>>>16),jt(n,65535&e.adler)),kt(e),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?Qe:et)},Bt=(e,t)=>
vendor: 4,670 bytes, line 2
2{let n=t.length;if(Mt(e))return tt;const r=e.state,a=r.wrap;if(2===a||1===a&&r.status!==pt||r.lookahead)return tt;if(1===a&&(e.adler=Ie(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){0===a&&(yt(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}const i=e.avail_in,s=e.next_in,o=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Ct(r);r.lookahead>=3;){let e=r.strstart,t=r.lookahead-2;do{r.ins_h=wt(r,r.ins_h,r.window[e+3-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++}while(--t);r.strstart=e,r.lookahead=2,Ct(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=s,e.input=o,e.avail_in=i,r.wrap=a,Qe},qt={deflateInit:(e,t)=>It(e,t,dt,15,8,ct),deflateInit2:It,deflateReset:Dt,deflateResetKeep:Ot,deflateSetHeader:(e,t)=>Mt(e)||2!==e.state.wrap?tt:(e.state.gzhead=t,Qe),deflate:zt,deflateEnd:e=>{if(Mt(e))return tt;const t=e.state.status;return e.state=null,t===mt?vt(e,nt):Qe},deflateSetDictionary:Bt,deflateInfo:"pako deflate (from Nodeca project)"};const Ut=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var Vt=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const n=t.shift();if(n){if("object"!==typeof n)throw new TypeError(n+"must be non-object");for(const t in n)Ut(n,t)&&(e[t]=n[t])}}return e},Ht=e=>{let t=0;for(let r=0,a=e.length;r<a;r++)t+=e[r].length;const n=new Uint8Array(t);for(let r=0,a=0,i=e.length;r<i;r++){let t=e[r];n.set(t,a),a+=t.length}return n};let Wt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(Gs){Wt=!1}const Gt=new Uint8Array(256);for(let $s=0;$s<256;$s++)Gt[$s]=$s>=252?6:$s>=248?5:$s>=240?4:$s>=224?3:$s>=192?2:1;Gt[254]=Gt[254]=1;var $t=e=>{if("function"===typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,n,r,a,i,s=e.length,o=0;for(a=0;a<s;a++)n=e.charCodeAt(a),55296===(64512&n)&&a+1<s&&(r=e.charCodeAt(a+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),a++)),o+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(o),i=0,a=0;i<o;a++)n=e.charCodeAt(a),55296===(64512&n)&&a+1<s&&(r=e.charCodeAt(a+1),56320===(64512&r)&&(n=65536+(n-55296<<10)+(r-56320),a++)),n<128?t[i++]=n:n<2048?(t[i++]=192|n>>>6,t[i++]=128|63&n):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|63&n):(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63,t[i++]=128|n>>>6&63,t[i++]=128|63&n);return t},Yt=(e,t)=>{const n=t||e.length;if("function"===typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let r,a;const i=new Array(2*n);for(a=0,r=0;r<n;){let t=e[r++];if(t<128){i[a++]=t;continue}let s=Gt[t];if(s>4)i[a++]=65533,r+=s-1;else{for(t&=2===s?31:3===s?15:7;s>1&&r<n;)t=t<<6|63&e[r++],s--;s>1?i[a++]=65533:t<65536?i[a++]=t:(t-=65536,i[a++]=55296|t>>10&1023,i[a++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&Wt)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n="";for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n})(i,a)},Kt=(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let n=t-1;for(;n>=0&&128===(192&e[n]);)n--;return n<0||0===n?t:n+Gt[e[n]]>t?n:t};var Xt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Zt=Object.prototype.toString,{Z_NO_FLUSH:Jt,Z_SYNC_FLUSH:Qt,Z_FULL_FLUSH:en,Z_FINISH:tn,Z_OK:nn,Z_STREAM_END:rn,Z_DEFAULT_COMPRESSION:an,Z_DEFAULT_STRATEGY:sn,Z_DEFLATED:on}=Ue;function ln(e){this.options=Vt({level:an,method:on,chunkSize:16384,windowBits:15,memLevel:8,strategy:sn},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Xt,this.strm.avail_out=0;let n=qt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==nn)throw new Error(qe[n]);if(t.header&&qt.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"===typeof t.dictionary?$t(t.dictionary):"[object ArrayBuffer]"===Zt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,n=qt.deflateSetDictionary(this.strm,e),n!==nn)throw new Error(qe[n]);this._dict_set=!0}}function cn(e,t){const n=new ln(t);if(n.push(e,!0),n.err)throw n.msg||qe[n.err];return n.result}ln.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize;let a,i;if(this.ended)return!1;for(i=t===~~t?t:!0===t?tn:Jt,"string"===typeof e?n.input=$t(e):"[object ArrayBuffer]"===Zt.call(e)?n.input=new
vendor: 4,466 bytes, line 2
2Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(i===Qt||i===en)&&n.avail_out<=6)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if(a=qt.deflate(n,i),a===rn)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),a=qt.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===nn;if(0!==n.avail_out){if(i>0&&n.next_out>0)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else if(0===n.avail_in)break}else this.onData(n.output)}return!0},ln.prototype.onData=function(e){this.chunks.push(e)},ln.prototype.onEnd=function(e){e===nn&&(this.result=Ht(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var un=function(e,t){return(t=t||{}).raw=!0,cn(e,t)},dn=function(e,t){return(t=t||{}).gzip=!0,cn(e,t)},hn={Deflate:ln,deflate:cn,deflateRaw:un,gzip:dn,constants:Ue};const fn=16209;var pn=function(e,t){let n,r,a,i,s,o,l,c,u,d,h,f,p,m,g,v,b,y,x,w,k,N,A,j;const _=e.state;n=e.next_in,A=e.input,r=n+(e.avail_in-5),a=e.next_out,j=e.output,i=a-(t-e.avail_out),s=a+(e.avail_out-257),o=_.dmax,l=_.wsize,c=_.whave,u=_.wnext,d=_.window,h=_.hold,f=_.bits,p=_.lencode,m=_.distcode,g=(1<<_.lenbits)-1,v=(1<<_.distbits)-1;e:do{f<15&&(h+=A[n++]<<f,f+=8,h+=A[n++]<<f,f+=8),b=p[h&g];t:for(;;){if(y=b>>>24,h>>>=y,f-=y,y=b>>>16&255,0===y)j[a++]=65535&b;else{if(!(16&y)){if(0===(64&y)){b=p[(65535&b)+(h&(1<<y)-1)];continue t}if(32&y){_.mode=16191;break e}e.msg="invalid literal/length code",_.mode=fn;break e}x=65535&b,y&=15,y&&(f<y&&(h+=A[n++]<<f,f+=8),x+=h&(1<<y)-1,h>>>=y,f-=y),f<15&&(h+=A[n++]<<f,f+=8,h+=A[n++]<<f,f+=8),b=m[h&v];n:for(;;){if(y=b>>>24,h>>>=y,f-=y,y=b>>>16&255,!(16&y)){if(0===(64&y)){b=m[(65535&b)+(h&(1<<y)-1)];continue n}e.msg="invalid distance code",_.mode=fn;break e}if(w=65535&b,y&=15,f<y&&(h+=A[n++]<<f,f+=8,f<y&&(h+=A[n++]<<f,f+=8)),w+=h&(1<<y)-1,w>o){e.msg="invalid distance too far back",_.mode=fn;break e}if(h>>>=y,f-=y,y=a-i,w>y){if(y=w-y,y>c&&_.sane){e.msg="invalid distance too far back",_.mode=fn;break e}if(k=0,N=d,0===u){if(k+=l-y,y<x){x-=y;do{j[a++]=d[k++]}while(--y);k=a-w,N=j}}else if(u<y){if(k+=l+u-y,y-=u,y<x){x-=y;do{j[a++]=d[k++]}while(--y);if(k=0,u<x){y=u,x-=y;do{j[a++]=d[k++]}while(--y);k=a-w,N=j}}}else if(k+=u-y,y<x){x-=y;do{j[a++]=d[k++]}while(--y);k=a-w,N=j}for(;x>2;)j[a++]=N[k++],j[a++]=N[k++],j[a++]=N[k++],x-=3;x&&(j[a++]=N[k++],x>1&&(j[a++]=N[k++]))}else{k=a-w;do{j[a++]=j[k++],j[a++]=j[k++],j[a++]=j[k++],x-=3}while(x>2);x&&(j[a++]=j[k++],x>1&&(j[a++]=j[k++]))}break}}break}}while(n<r&&a<s);x=f>>3,n-=x,f-=x<<3,h&=(1<<f)-1,e.next_in=n,e.next_out=a,e.avail_in=n<r?r-n+5:5-(n-r),e.avail_out=a<s?s-a+257:257-(a-s),_.hold=h,_.bits=f};const mn=15,gn=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),vn=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),bn=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),yn=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var xn=(e,t,n,r,a,i,s,o)=>{const l=o.bits;let c,u,d,h,f,p,m=0,g=0,v=0,b=0,y=0,x=0,w=0,k=0,N=0,A=0,j=null;const _=new Uint16Array(16),S=new Uint16Array(16);let C,E,L,P=null;for(m=0;m<=mn;m++)_[m]=0;for(g=0;g<r;g++)_[t[n+g]]++;for(y=l,b=mn;b>=1&&0===_[b];b--);if(y>b&&(y=b),0===b)return a[i++]=20971520,a[i++]=20971520,o.bits=1,0;for(v=1;v<b&&0===_[v];v++);for(y<v&&(y=v),k=1,m=1;m<=mn;m++)if(k<<=1,k-=_[m],k<0)return-1;if(k>0&&(0===e||1!==b))return-1;for(S[1]=0,m=1;m<mn;m++)S[m+1]=S[m]+_[m];for(g=0;g<r;g++)0!==t[n+g]&&(s[S[t[n+g]]++]=g);if(0===e?(j=P=s,p=20):1===e?(j=gn,P=vn,p=257):(j=bn,P=yn,p=0),A=0,g=0,m=v,f=i,x=y,w=0,d=-1,N=1<<y,h=N-1,1===e&&N>852||2===e&&N>592)return 1;for(;;){C=m-w,s[g]+1<p?(E=0,L=s[g]):s[g]>=p?(E=P[s[g]-p],L=j[s[g]-p]):(E=96,L=0),c=1<<m-w,u=1<<x,v=u;do{u-=c,a[f+(A>>w)+u]=C<<24|E<<16|L}while(0!==u);for(c=1<<m-1;A&c;)c>>=1;if(0!==c?(A&=c-1,A+=c):A=0,g++,0===--_[m]){if(m===b)break;m=t[n+s[g]]}if(m>y&&(A&h)!==d){for(0===w&&(w=y),f+=v,x=m-w,k=1<<x;x+w<b&&(k-=_[x+w],!(k<=0));)x++,k<<=1;if(N+=1<<x,1===e&&N>852||2===e&&N>592)return 1;d=A&h,a[d]=y<<24|x<<16|f-i}}return 0!==A&&(a[f+A]=m-w<<24|64<<16),o.bits=y,0};const{Z_FINISH:wn,Z_BLOCK:kn,Z_TREES:Nn,Z_OK:An,Z_STREAM_END:jn,Z_NEED_DICT:_n,Z_STREAM_ERROR:Sn,Z_DATA_ERROR:Cn,Z_MEM_ERROR:En,Z_BUF_ER
vendor: 8,073 bytes, line 2
2ROR:Ln,Z_DEFLATED:Pn}=Ue,Tn=16180,Rn=16190,Fn=16191,Mn=16192,On=16194,Dn=16199,In=16200,zn=16206,Bn=16209,qn=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Un(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Vn=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<Tn||t.mode>16211?1:0},Hn=e=>{if(Vn(e))return Sn;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Tn,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,An},Wn=e=>{if(Vn(e))return Sn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Hn(e)},Gn=(e,t)=>{let n;if(Vn(e))return Sn;const r=e.state;return t<0?(n=0,t=-t):(n=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Sn:(null!==r.window&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,Wn(e))},$n=(e,t)=>{if(!e)return Sn;const n=new Un;e.state=n,n.strm=e,n.window=null,n.mode=Tn;const r=Gn(e,t);return r!==An&&(e.state=null),r};let Yn,Kn,Xn=!0;const Zn=e=>{if(Xn){Yn=new Int32Array(512),Kn=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(xn(1,e.lens,0,288,Yn,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;xn(2,e.lens,0,32,Kn,0,e.work,{bits:5}),Xn=!1}e.lencode=Yn,e.lenbits=9,e.distcode=Kn,e.distbits=5},Jn=(e,t,n,r)=>{let a;const i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new Uint8Array(i.wsize)),r>=i.wsize?(i.window.set(t.subarray(n-i.wsize,n),0),i.wnext=0,i.whave=i.wsize):(a=i.wsize-i.wnext,a>r&&(a=r),i.window.set(t.subarray(n-r,n-r+a),i.wnext),(r-=a)?(i.window.set(t.subarray(n-r,n),0),i.wnext=r,i.whave=i.wsize):(i.wnext+=a,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=a))),0};var Qn=(e,t)=>{let n,r,a,i,s,o,l,c,u,d,h,f,p,m,g,v,b,y,x,w,k,N,A=0;const j=new Uint8Array(4);let _,S;const C=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Vn(e)||!e.output||!e.input&&0!==e.avail_in)return Sn;n=e.state,n.mode===Fn&&(n.mode=Mn),s=e.next_out,a=e.output,l=e.avail_out,i=e.next_in,r=e.input,o=e.avail_in,c=n.hold,u=n.bits,d=o,h=l,N=An;e:for(;;)switch(n.mode){case Tn:if(0===n.wrap){n.mode=Mn;break}for(;u<16;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}if(2&n.wrap&&35615===c){0===n.wbits&&(n.wbits=15),n.check=0,j[0]=255&c,j[1]=c>>>8&255,n.check=Be(n.check,j,2,0),c=0,u=0,n.mode=16181;break}if(n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&c)<<8)+(c>>8))%31){e.msg="incorrect header check",n.mode=Bn;break}if((15&c)!==Pn){e.msg="unknown compression method",n.mode=Bn;break}if(c>>>=4,u-=4,k=8+(15&c),0===n.wbits&&(n.wbits=k),k>15||k>n.wbits){e.msg="invalid window size",n.mode=Bn;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=512&c?16189:Fn,c=0,u=0;break;case 16181:for(;u<16;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}if(n.flags=c,(255&n.flags)!==Pn){e.msg="unknown compression method",n.mode=Bn;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=Bn;break}n.head&&(n.head.text=c>>8&1),512&n.flags&&4&n.wrap&&(j[0]=255&c,j[1]=c>>>8&255,n.check=Be(n.check,j,2,0)),c=0,u=0,n.mode=16182;case 16182:for(;u<32;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}n.head&&(n.head.time=c),512&n.flags&&4&n.wrap&&(j[0]=255&c,j[1]=c>>>8&255,j[2]=c>>>16&255,j[3]=c>>>24&255,n.check=Be(n.check,j,4,0)),c=0,u=0,n.mode=16183;case 16183:for(;u<16;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}n.head&&(n.head.xflags=255&c,n.head.os=c>>8),512&n.flags&&4&n.wrap&&(j[0]=255&c,j[1]=c>>>8&255,n.check=Be(n.check,j,2,0)),c=0,u=0,n.mode=16184;case 16184:if(1024&n.flags){for(;u<16;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}n.length=c,n.head&&(n.head.extra_len=c),512&n.flags&&4&n.wrap&&(j[0]=255&c,j[1]=c>>>8&255,n.check=Be(n.check,j,2,0)),c=0,u=0}else n.head&&(n.head.extra=null);n.mode=16185;case 16185:if(1024&n.flags&&(f=n.length,f>o&&(f=o),f&&(n.head&&(k=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(i,i+f),k)),512&n.flags&&4&n.wrap&&(n.check=Be(n.check,r,f,i)),o-=f,i+=f,n.length-=f),n.length))break e;n.length=0,n.mode=16186;case 16186:if(2048&n.flags){if(0===o)break e;f=0;do{k=r[i+f++],n.head&&k&&n.length<65536&&(n.head.name+=String.fromCharCode(k))}while(k&&f<o);if(512&n.flags&&4&n.wrap&&(n.check=Be(n.check,r,f,i)),o-=f,i+=f,k)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=16187;case 16187:if(4096&n.flags){if(0===o)break e;f=0;do{k=r[i+f++],n.head&&k&&n.length<65536&&(n.head.comment+=String.fromCharCode(k))}while(k&&f<o);if(512&n.flags&&4&n.wrap&&(n.check=Be(n.check,r,f,i)),o-=f,i+=f,k)break e}else n.head&&(n.head.comment=null);n.mode=16188;case 16188:if(512&n.flags){for(;u<16;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}if(4&n.wrap&&c!==(65535&n.check)){e.msg="header crc mismatch",n.mode=Bn;break}c=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Fn;break;case 16189:for(;u<32;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}e.adler=n.check=qn(c),c=0,u=0,n.mode=Rn;case Rn:if(0===n.havedict)return e.next_out=s,e.avail_out=l,e.next_in=i,e.avail_in=o,n.hold=c,n.bits=u,_n;e.adler=n.check=1,n.mode=Fn;case Fn:if(t===kn||t===Nn)break e;case Mn:if(n.last){c>>>=7&u,u-=7&u,n.mode=zn;break}for(;u<3;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}switch(n.last=1&c,c>>>=1,u-=1,3&c){case 0:n.mode=16193;break;case 1:if(Zn(n),n.mode=Dn,t===Nn){c>>>=2,u-=2;break e}break;case 2:n.mode=16196;break;case 3:e.msg="invalid block type",n.mode=Bn}c>>>=2,u-=2;break;case 16193:for(c>>>=7&u,u-=7&u;u<32;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}if((65535&c)!==(c>>>16^65535)){e.msg="invalid stored block lengths",n.mode=Bn;break}if(n.length=65535&c,c=0,u=0,n.mode=On,t===Nn)break e;case On:n.mode=16195;case 16195:if(f=n.length,f){if(f>o&&(f=o),f>l&&(f=l),0===f)break e;a.set(r.subarray(i,i+f),s),o-=f,i+=f,l-=f,s+=f,n.length-=f;break}n.mode=Fn;break;case 16196:for(;u<14;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}if(n.nlen=257+(31&c),c>>>=5,u-=5,n.ndist=1+(31&c),c>>>=5,u-=5,n.ncode=4+(15&c),c>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=Bn;break}n.have=0,n.mode=16197;case 16197:for(;n.have<n.ncode;){for(;u<3;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}n.lens[C[n.have++]]=7&c,c>>>=3,u-=3}for(;n.have<19;)n.lens[C[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,_={bits:n.lenbits},N=xn(0,n.lens,0,19,n.lencode,0,n.work,_),n.lenbits=_.bits,N){e.msg="invalid code lengths set",n.mode=Bn;break}n.have=0,n.mode=16198;case 16198:for(;n.have<n.nlen+n.ndist;){for(;A=n.lencode[c&(1<<n.lenbits)-1],g=A>>>24,v=A>>>16&255,b=65535&A,!(g<=u);){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}if(b<16)c>>>=g,u-=g,n.lens[n.have++]=b;else{if(16===b){for(S=g+2;u<S;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}if(c>>>=g,u-=g,0===n.have){e.msg="invalid bit length repeat",n.mode=Bn;break}k=n.lens[n.have-1],f=3+(3&c),c>>>=2,u-=2}else if(17===b){for(S=g+3;u<S;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}c>>>=g,u-=g,k=0,f=3+(7&c),c>>>=3,u-=3}else{for(S=g+7;u<S;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}c>>>=g,u-=g,k=0,f=11+(127&c),c>>>=7,u-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=Bn;break}for(;f--;)n.lens[n.have++]=k}}if(n.mode===Bn)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=Bn;break}if(n.lenbits=9,_={bits:n.lenbits},N=xn(1,n.lens,0,n.nlen,n.lencode,0,n.work,_),n.lenbits=_.bits,N){e.msg="invalid literal/lengths set",n.mode=Bn;break}if(n.distbits=6,n.distcode=n.distdyn,_={bits:n.distbits},N=xn(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,_),n.distbits=_.b
vendor: 5,120 bytes, line 2
2its,N){e.msg="invalid distances set",n.mode=Bn;break}if(n.mode=Dn,t===Nn)break e;case Dn:n.mode=In;case In:if(o>=6&&l>=258){e.next_out=s,e.avail_out=l,e.next_in=i,e.avail_in=o,n.hold=c,n.bits=u,pn(e,h),s=e.next_out,a=e.output,l=e.avail_out,i=e.next_in,r=e.input,o=e.avail_in,c=n.hold,u=n.bits,n.mode===Fn&&(n.back=-1);break}for(n.back=0;A=n.lencode[c&(1<<n.lenbits)-1],g=A>>>24,v=A>>>16&255,b=65535&A,!(g<=u);){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}if(v&&0===(240&v)){for(y=g,x=v,w=b;A=n.lencode[w+((c&(1<<y+x)-1)>>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=u);){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}c>>>=y,u-=y,n.back+=y}if(c>>>=g,u-=g,n.back+=g,n.length=b,0===v){n.mode=16205;break}if(32&v){n.back=-1,n.mode=Fn;break}if(64&v){e.msg="invalid literal/length code",n.mode=Bn;break}n.extra=15&v,n.mode=16201;case 16201:if(n.extra){for(S=n.extra;u<S;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}n.length+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=16202;case 16202:for(;A=n.distcode[c&(1<<n.distbits)-1],g=A>>>24,v=A>>>16&255,b=65535&A,!(g<=u);){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}if(0===(240&v)){for(y=g,x=v,w=b;A=n.distcode[w+((c&(1<<y+x)-1)>>y)],g=A>>>24,v=A>>>16&255,b=65535&A,!(y+g<=u);){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}c>>>=y,u-=y,n.back+=y}if(c>>>=g,u-=g,n.back+=g,64&v){e.msg="invalid distance code",n.mode=Bn;break}n.offset=b,n.extra=15&v,n.mode=16203;case 16203:if(n.extra){for(S=n.extra;u<S;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}n.offset+=c&(1<<n.extra)-1,c>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=Bn;break}n.mode=16204;case 16204:if(0===l)break e;if(f=h-l,n.offset>f){if(f=n.offset-f,f>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=Bn;break}f>n.wnext?(f-=n.wnext,p=n.wsize-f):p=n.wnext-f,f>n.length&&(f=n.length),m=n.window}else m=a,p=s-n.offset,f=n.length;f>l&&(f=l),l-=f,n.length-=f;do{a[s++]=m[p++]}while(--f);0===n.length&&(n.mode=In);break;case 16205:if(0===l)break e;a[s++]=n.length,l--,n.mode=In;break;case zn:if(n.wrap){for(;u<32;){if(0===o)break e;o--,c|=r[i++]<<u,u+=8}if(h-=l,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?Be(n.check,a,h,s-h):Ie(n.check,a,h,s-h)),h=l,4&n.wrap&&(n.flags?c:qn(c))!==n.check){e.msg="incorrect data check",n.mode=Bn;break}c=0,u=0}n.mode=16207;case 16207:if(n.wrap&&n.flags){for(;u<32;){if(0===o)break e;o--,c+=r[i++]<<u,u+=8}if(4&n.wrap&&c!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=Bn;break}c=0,u=0}n.mode=16208;case 16208:N=jn;break e;case Bn:N=Cn;break e;case 16210:return En;default:return Sn}return e.next_out=s,e.avail_out=l,e.next_in=i,e.avail_in=o,n.hold=c,n.bits=u,(n.wsize||h!==e.avail_out&&n.mode<Bn&&(n.mode<zn||t!==wn))&&Jn(e,e.output,e.next_out,h-e.avail_out),d-=e.avail_in,h-=e.avail_out,e.total_in+=d,e.total_out+=h,n.total+=h,4&n.wrap&&h&&(e.adler=n.check=n.flags?Be(n.check,a,h,e.next_out-h):Ie(n.check,a,h,e.next_out-h)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Fn?128:0)+(n.mode===Dn||n.mode===On?256:0),(0===d&&0===h||t===wn)&&N===An&&(N=Ln),N},er={inflateReset:Wn,inflateReset2:Gn,inflateResetKeep:Hn,inflateInit:e=>$n(e,15),inflateInit2:$n,inflate:Qn,inflateEnd:e=>{if(Vn(e))return Sn;let t=e.state;return t.window&&(t.window=null),e.state=null,An},inflateGetHeader:(e,t)=>{if(Vn(e))return Sn;const n=e.state;return 0===(2&n.wrap)?Sn:(n.head=t,t.done=!1,An)},inflateSetDictionary:(e,t)=>{const n=t.length;let r,a,i;return Vn(e)?Sn:(r=e.state,0!==r.wrap&&r.mode!==Rn?Sn:r.mode===Rn&&(a=1,a=Ie(a,t,n,0),a!==r.check)?Cn:(i=Jn(e,t,n,n),i?(r.mode=16210,En):(r.havedict=1,An)))},inflateInfo:"pako inflate (from Nodeca project)"};var tr=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const nr=Object.prototype.toString,{Z_NO_FLUSH:rr,Z_FINISH:ar,Z_OK:ir,Z_STREAM_END:sr,Z_NEED_DICT:or,Z_STREAM_ERROR:lr,Z_DATA_ERROR:cr,Z_MEM_ERROR:ur}=Ue;function dr(e){this.options=Vt({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0===(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Xt,this.strm.avail_out=0;let n=er.inflateInit2(this.strm,t.windowBits);if(n!==ir)throw new Error(qe[n]);if(this.header=new tr,er.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"===typeof t.dictionary?t.dictionary=$t(t.dictionary):"[object ArrayBuffer]"===nr.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=er.inflateSetDictionary(this.strm,t.dictionary),n!==ir)))throw new Error(qe[n])}function hr(e,t){const n=new dr(t);if(n.push(e),n.err)throw n.msg||qe[n.err];return n.result}dr.prototype.push=function(e,t){const n=this.strm,r=this.options.chunkSize,a=this.options.dictionary;let i,s,o;if(this.ended)return!1;for(s=t===~~t?t:!0===t?ar:rr,"[object ArrayBuffer]"===nr.call(e)?n.input=new
2Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),i=er.inflate(n,s),i===or&&a&&(i=er.inflateSetDictionary(n,a),i===ir?i=er.inflate(n,s):i===cr&&(i=or));n.avail_in>0&&i===sr&&n.state.wrap>0&&0!==e[n.next_in];)er.inflateReset(n),i=er.inflate(n,s);switch(i){case lr:case cr:case or:case ur:return this.onEnd(i),this.ended=!0,!1}if(o=n.avail_out,n.next_out&&(0===n.avail_out||i===sr))if("string"===this.options.to){let e=Kt(n.output,n.next_out),t=n.next_out-e,a=Yt(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(a)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(i!==ir||0!==o){if(i===sr)return i=er.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===n.avail_in)break}}return!0},dr.prototype.onData=function(e){this.chunks.push(e)},dr.prototype.onEnd=function(e){e===ir&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ht(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var fr=function(e,t){return(t=t||{}).raw=!0,hr(e,t)},pr={Inflate:dr,inflate:hr,inflateRaw:fr,ungzip:hr,constants:Ue};const{Deflate:mr,deflate:gr,deflateRaw:vr,gzip:br}=hn,{Inflate:yr,inflate:xr,inflateRaw:wr,ungzip:kr}=pr;var Nr=yr,Ar=xr;const jr=[];for(let $s=0;$s<256;$s++){let e=$s;for(let t=0;t<8;t++)1&e?e=3988292384^e>>>1:e>>>=1;jr[$s]=e}const _r=4294967295;function Sr(e,t){return(function(e,t,n){let r=e;for(let a=0;a<n;a++)r=jr[255&(r^t[a])]^r>>>8;return r}(_r,e,t)^_r)>>>0}function Cr(e,t,n){const r=e.readUint32(),a=Sr(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(a!==r)throw new Error("CRC mismatch for chunk ".concat(n,". Expected ").concat(r,", found ").concat(a))}function Er(e,t,n){for(let r=0;r<n;r++)t[r]=e[r]}function Lr(e,t,n,r){let a=0;for(;a<r;a++)t[a]=e[a];for(;a<n;a++)t[a]=e[a]+t[a-r]&255}function Pr(e,t,n,r){let a=0;if(0===n.length)for(;a<r;a++)t[a]=e[a];else for(;a<r;a++)t[a]=e[a]+n[a]&255}function Tr(e,t,n,r,a){let i=0;if(0===n.length){for(;i<a;i++)t[i]=e[i];for(;i<r;i++)t[i]=e[i]+(t[i-a]>>1)&255}else{for(;i<a;i++)t[i]=e[i]+(n[i]>>1)&255;for(;i<r;i++)t[i]=e[i]+(t[i-a]+n[i]>>1)&255}}function Rr(e,t,n,r,a){let i=0;if(0===n.length){for(;i<a;i++)t[i]=e[i];for(;i<r;i++)t[i]=e[i]+t[i-a]&255}else{for(;i<a;i++)t[i]=e[i]+n[i]&255;for(;i<r;i++)t[i]=e[i]+Fr(t[i-a],n[i],n[i-a])&255}}function Fr(e,t,n){const r=e+t-n,a=Math.abs(r-e),i=Math.abs(r-t),s=Math.abs(r-n);return a<=i&&a<=s?e:i<=s?t:n}function Mr(e,t,n,r,a,i){switch(e){case 0:Er(t,n,a);break;case 1:Lr(t,n,a,i);break;case 2:Pr(t,n,r,a);break;case 3:Tr(t,n,r,a,i);break;case 4:Rr(t,n,r,a,i);break;default:throw new Error("Unsupported filter: ".concat(e))}}const Or=new Uint16Array([255]),Dr=255===new Uint8Array(Or.buffer)[0];function Ir(e){return(255&e)<<8|e>>8&255}const zr=new Uint16Array([255]),Br=255===new Uint8Array(zr.buffer)[0],qr=new Uint8Array(0);function Ur(e){const{data:t,width:n,height:r,channels:a,depth:i}=e,s=Math.ceil(i/8)*a,o=Math.ceil(i/8*a*n),l=new Uint8Array(r*o);let c,u,d=qr,h=0;for(let f=0;f<r;f++){switch(c=t.subarray(h+1,h+1+o),u=l.subarray(f*o,(f+1)*o),t[h]){case 0:Er(c,u,o);break;case 1:Lr(c,u,o,s);break;case 2:Pr(c,u,d,o);break;case 3:Tr(c,u,d,o,s);break;case 4:Rr(c,u,d,o,s);break;default:throw new Error("Unsupported filter: ".concat(t[h]))}d=u,h+=o+1}if(16===i){const e=new Uint16Array(l.buffer);if(Br)for(let t=0;t<e.length;t++)e[t]=Vr(e[t]);return e}return l}function Vr(e){return(255&e)<<8|e>>8&255}const Hr=Uint8Array.of(137,80,78,71,13,10,26,10);function Wr(e){if(!function(e){if(e.length<Hr.length)return!1;for(let t=0;t<Hr.length;t++)if(e[t]!==Hr[t])return!1;return!0}(e.readBytes(Hr.length)))throw new Error("wrong PNG signature")}const Gr="tEXt",$r=new TextDecoder("latin1");function Yr(e){if(Xr(e),0===e.length||e.length>79)throw new Error("keyword length must be between 1 and 79")}const Kr=/^[\u0000-\u00FF]*$/;function Xr(e){if(!Kr.test(e))throw new Error("invalid latin1 text")}function Zr(e,t,n){const r=Jr(t);e[r]=function(e,t){return $r.decode(e.readBytes(t))}(t,n-r.length-1)}function Jr(e){for(e.mark();0!==e.readByte(););const t=e.offset;e.reset();const n=$r.decode(e.readBytes(t-e.offset-1));return e.skip(1),Yr(n),n}const Qr=-1,ea=0,ta=2,na=3,ra=4,aa=6,ia=-1,sa=0,oa=-1,la=0,ca=-1,ua=0,da=1,ha=0,fa=1,pa=2,ma=0,ga=1;class va extends X{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(e),(0,W.A)(this,"_checkCrc",void 0),(0,W.A)(this,"_inflator",void 0),(0,W.A)(this,"_png",void 0),(0,W.A)(this,"_apng",void 0),(0,W.A)(this,"_end",void 0),(0,W.A)(this,"_hasPalette",void 0),(0,W.A)(this,"_palette",void 0),(0,W.A)(this,"_hasTransparency",void 0),(0,W.A)(this,"_transparency",void 0),(0,W.A)(this,"_compressionMethod",void 0),(0,W.A)(this,"_filterMethod",void 0),(0,W.A)(this,"_interlaceMethod",void 0),(0,W.A)(this,"_colorType",void 0),(0,W.A)(this,"_isAnimated",void 0),(0,W.A)(this,"_numberOfFrames",void 0),(0,W.A)(this,"_numberOfPlays",void 0),(0,W.A)(this,"_frames",void 0),(0,W.A)(this,"_writingDataChunks",void 0);const{checkCrc:n=!1}=t;this._checkCrc=n,this._inflator=new Nr,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array(0),depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array(0),this._compressionMethod=ia,this._filterMethod=oa,this._interlaceMethod=ca,this._colorType=Qr,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(Wr(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeChunk(e,t)}return this.decodeImage(),this._png}decodeApng(){for(Wr(this);!this._end;){const e=this.readUint32(),t=this.readChars(4);this.decodeApngChunk(e,t)}return this.decodeApngImage(),this._apng}decodeChunk(e,t){const n=this.offset;switch(t){case"IHDR":this.decodeIHDR();break;case"PLTE":this.decodePLTE(e);break;case"IDAT":this.decodeIDAT(e);break;case"IEND":this._end=!0;break;case"tRNS":this.decodetRNS(e);break;case"iCCP":this.decodeiCCP(e);break;case Gr:Zr(this._png.text,this,e);break;case"pHYs":this.decodepHYs();break;default:this.skip(e)}if(this.offset-n!==e)throw new Error("Length mismatch while decoding chunk ".concat(t));this._checkCrc?Cr(this,e+4,t):this.skip(4)}decodeApngChunk(e,t){const n=this.offset;switch("fdAT"!==t&&"IDAT"!==t&&this._writingDataChunks&&this.pushDataToFrame(),t){case"acTL":this.decodeACTL();break;case"fcTL":this.decodeFCTL();break;case"fdAT":this.decodeFDAT(e);break;default:this.decodeChunk(e,t),this.offset=n+e}if(this.offset-n!==e)throw new Error("Length mismatch while decoding chunk ".concat(t));this._checkCrc?Cr(this,e+4,t):this.skip(4)}decodeIHDR(){const e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=function(e){if(1!==e&&2!==e&&4!==e&&8!==e&&16!==e)throw new Error("invalid bit depth: ".concat(e));return e}(this.readUint8());const t=this.readUint8();let n;switch(this._colorType=t,t){case ea:n=1;break;case ta:n=3;break;case na:n=1;break;case ra:n=2;break;case aa:n=4;break;default:throw new Error("Unknown color type: ".concat(t))}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==sa)throw new Error("Unsupported compression method: ".concat(this._compressionMethod));this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){const e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array(0)};this._frames.push(e)}decodePLTE(e){if(e%3!==0)throw new RangeError("PLTE field length must be a multiple of 3. Got ".concat(e));const t=e/3;this._hasPalette=!0;const n=[];this._palette=n;for(let r=0;r<t;r++)n.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;const t=e,n=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,n,t)),this._inflator.err)throw new Error("Error while decompressing the data: ".concat(this._inflator.err));this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let t=e,n=this.offset+this.byteOffset;if(n+=4,t-=4,this._inflator.push(new Uint8Array(this.buffer,n,t)),this._inflator.err)throw new Error("Error while decompressing the data: ".concat(this._inflator.err));this.skip(e)}decodetRNS(e){switch(this._colorType){case ea:case ta:if(e%2!==0)throw new RangeError("tRNS chunk length must be a multiple of 2. Got ".concat(e));if(e/2>this._png.width*this._png.height)throw new Error("tRNS chunk contains more alph
2a values than there are pixels (".concat(e/2," vs ").concat(this._png.width*this._png.height,")"));this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let t=0;t<e/2;t++)this._transparency[t]=this.readUint16();break;case na:{if(e>this._palette.length)throw new Error("tRNS chunk contains more alpha values than there are palette colors (".concat(e," vs ").concat(this._palette.length,")"));let t=0;for(;t<e;t++){const e=this.readByte();this._palette[t].push(e)}for(;t<this._palette.length;t++)this._palette[t].push(255);break}default:throw new Error("tRNS chunk is not supported for color type ".concat(this._colorType))}}decodeiCCP(e){const t=Jr(this),n=this.readUint8();if(n!==sa)throw new Error("Unsupported iCCP compression method: ".concat(n));const r=this.readBytes(e-t.length-2);this._png.iccEmbeddedProfile={name:t,profile:Ar(r)}}decodepHYs(){const e=this.readUint32(),t=this.readUint32(),n=this.readByte();this._png.resolution={x:e,y:t,unit:n}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){const t={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:8===this._apng.depth?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},n=this._frames.at(e);if(n){if(n.data=Ur({data:n.data,width:n.width,height:n.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),0===e||0===n.xOffset&&0===n.yOffset&&n.width===this._png.width&&n.height===this._png.height)t.data=n.data;else{const r=this._apng.frames.at(e-1);this.disposeFrame(n,r,t),this.addFrameDataToCanvas(t,n)}this._apng.frames.push(t)}}return this._apng}disposeFrame(e,t,n){switch(e.disposeOp){case ha:break;case fa:for(let t=0;t<this._png.height;t++)for(let r=0;r<this._png.width;r++){const a=(t*e.width+r)*this._png.channels;for(let e=0;e<this._png.channels;e++)n.data[a+e]=0}break;case pa:n.data.set(t.data);break;default:throw new Error("Unknown disposeOp")}}addFrameDataToCanvas(e,t){const n=1<<this._png.depth,r=(e,n)=>({index:((e+t.yOffset)*this._png.width+t.xOffset+n)*this._png.channels,frameIndex:(e*t.width+n)*this._png.channels});switch(t.blendOp){case ma:for(let n=0;n<t.height;n++)for(let a=0;a<t.width;a++){const{index:i,frameIndex:s}=r(n,a);for(let n=0;n<this._png.channels;n++)e.data[i+n]=t.data[s+n]}break;case ga:for(let a=0;a<t.height;a++)for(let i=0;i<t.width;i++){const{index:s,frameIndex:o}=r(a,i);for(let r=0;r<this._png.channels;r++){const a=t.data[o+this._png.channels-1]/n,i=r%(this._png.channels-1)===0?1:t.data[o+r],l=Math.floor(a*i+(1-a)*e.data[s+r]);e.data[s+r]+=l}}break;default:throw new Error("Unknown blendOp")}}decodeImage(){var e;if(this._inflator.err)throw new Error("Error while decompressing the data: ".concat(this._inflator.err));const t=this._isAnimated?(null===(e=this._frames)||void 0===e?void 0:e.at(0)).data:this._inflator.result;if(this._filterMethod!==la)throw new Error("Filter method ".concat(this._filterMethod," not supported"));if(this._interlaceMethod===ua)this._png.data=Ur({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else{if(this._interlaceMethod!==da)throw new Error("Interlace method ".concat(this._interlaceMethod," not supported"));this._png.data=function(e){const{data:t,width:n,height:r,channels:a,depth:i}=e,s=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],o=Math.ceil(i/8)*a,l=new Uint8Array(r*n*o);let c=0;for(let u=0;u<7;u++){const e=s[u],a=Math.ceil((n-e.x)/e.xStep),i=Math.ceil((r-e.y)/e.yStep);if(a<=0||i<=0)continue;const d=a*o,h=new Uint8Array(d);for(let s=0;s<i;s++){const i=t[c++],u=t.subarray(c,c+d);c+=d;const f=new Uint8Array(d);Mr(i,u,f,h,d,o),h.set(f);for(let t=0;t<a;t++){const a=e.x+t*e.xStep,i=e.y+s*e.yStep;if(!(a>=n||i>=r))for(let e=0;e<o;e++)l[(i*n+a)*o+e]=f[t*o+e]}}}if(16===i){const e=new Uint16Array(l.buffer);if(Dr)for(let t=0;t<e.length;t++)e[t]=Ir(e[t]);return e}return l}({data:t,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth})}this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){const e=this._inflator.result,t=this._frames.at(-1);t?t.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:ha,blendOp:ma,data:e}),this._inflator=new Nr,this._writingDataChunks=!1}}n(9379);var ba;!function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.METRE=1]="METRE"}(ba||(ba={}));var ya=function(){return"undefined"!=typeof window?window:"undefined"!=typeof n.g?n.g:"undefined"!=typeof self?self:this}();function xa(){ya.console&&"function"==typeof ya.console.log&&ya.console.log.apply(ya.console,arguments)}var wa={log:xa,warn:function(e){ya.console&&("function"==typeof ya.console.warn?ya.console.warn.apply(ya.console,arguments):xa.call(null,arguments))},error:function(e){ya.console&&("function"==typeof ya.console.error?ya.console.error.apply(ya.console,arguments):xa(e))}};function ka(e,t,n){var r=new XMLHttpRequest;r.open("GET",e),r.responseType="blob",r.onload=function(){ja(r.response,t,n
vendor: 3,563 bytes, line 2
2)},r.onerror=function(){wa.error("could not download file")},r.send()}function Na(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(n){}return t.status>=200&&t.status<=299}function Aa(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var ja=ya.saveAs||("object"!==("undefined"==typeof window?"undefined":r(window))||window!==ya?function(){}:"undefined"!=typeof HTMLAnchorElement&&"download"in HTMLAnchorElement.prototype?function(e,t,n){var r=ya.URL||ya.webkitURL,a=document.createElement("a");t=t||e.name||"download",a.download=t,a.rel="noopener","string"==typeof e?(a.href=e,a.origin!==location.origin?Na(a.href)?ka(e,t,n):Aa(a,a.target="_blank"):Aa(a)):(a.href=r.createObjectURL(e),setTimeout(function(){r.revokeObjectURL(a.href)},4e4),setTimeout(function(){Aa(a)},0))}:"msSaveOrOpenBlob"in navigator?function(e,t,n){if(t=t||e.name||"download","string"==typeof e)if(Na(e))ka(e,t,n);else{var a=document.createElement("a");a.href=e,a.target="_blank",setTimeout(function(){Aa(a)})}else navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!==r(t)&&(wa.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([String.fromCharCode(65279),e],{type:e.type}):e}(e,n),t)}:function(e,t,n,a){if((a=a||open("","_blank"))&&(a.document.title=a.document.body.innerText="downloading..."),"string"==typeof e)return ka(e,t,n);var i="application/octet-stream"===e.type,s=/constructor/i.test(ya.HTMLElement)||ya.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&s)&&"object"===("undefined"==typeof FileReader?"undefined":r(FileReader))){var l=new FileReader;l.onloadend=function(){var e=l.result;e=o?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),a?a.location.href=e:location=e,a=null},l.readAsDataURL(e)}else{var c=ya.URL||ya.webkitURL,u=c.createObjectURL(e);a?a.location=u:location.href=u,a=null,setTimeout(function(){c.revokeObjectURL(u)},4e4)}});function _a(e){var t;e=e||"",this.ok=!1,"#"==e.charAt(0)&&(e=e.substr(1,6)),e={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee9
20",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[e=(e=e.replace(/ /g,"")).toLowerCase()]||e;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],r=0;r<n.length;r++){var a=n[r].re,i=n[r].process,s=a.exec(e);s&&(t=i(s),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return 1==e.length&&(e="0"+e),1==t.length&&(t="0"+t),1==n.length&&(n="0"+n),"#"+e+t+n}}var Sa=ya.atob.bind(ya),Ca=ya.btoa.bind(ya);function Ea(e,t){var n=e[0],r=e[1],a=e[2],i=e[3];n=Pa(n,r,a,i,t[0],7,-680876936),i=Pa(i,n,r,a,t[1],12,-389564586),a=Pa(a,i,n,r,t[2],17,606105819),r=Pa(r,a,i,n,t[3],22,-1044525330),n=Pa(n,r,a,i,t[4],7,-176418897),i=Pa(i,n,r,a,t[5],12,1200080426),a=Pa(a,i,n,r,t[6],17,-1473231341),r=Pa(r,a,i,n,t[7],22,-45705983),n=Pa(n,r,a,i,t[8],7,1770035416),i=Pa(i,n,r,a,t[9],12,-1958414417),a=Pa(a,i,n,r,t[10],17,-42063),r=Pa(r,a,i,n,t[11],22,-1990404162),n=Pa(n,r,a,i,t[12],7,1804603682),i=Pa(i,n,r,a,t[13],12,-40341101),a=Pa(a,i,n,r,t[14],17,-1502002290),n=Ta(n,r=Pa(r,a,i,n,t[15],22,1236535329),a,i,t[1],5,-165796510),i=Ta(i,n,r,a,t[6],9,-1069501632),a=Ta(a,i,n,r,t[11],14,643717713),r=Ta(r,a,i,n,t[0],20,-373897302),n=Ta(n,r,a,i,t[5],5,-701558691),i=Ta(i,n,r,a,t[10],9,38016083),a=Ta(a,i,n,r,t[15],14,-660478335),r=Ta(r,a,i,n,t[4],20,-405537848),n=Ta(n,r,a,i,t[9],5,568446438),i=Ta(i,n,r,a,t[14],9,-1019803690),a=Ta(a,i,n,r,t[3],14,-187363961),r=Ta(r,a,i,n,t[8],20,1163531501),n=Ta(n,r,a,i,t[13],5,-1444681467),i=Ta(i,n,r,a,t[2],9,-51403784),a=Ta(a,i,n,r,t[7],14,1735328473),n=Ra(n,r=Ta(r,a,i,n,t[12],20,-1926607734),a,i,t[5],4,-378558),i=Ra(i,n,r,a,t[8],11,-2022574463),a=Ra(a,i,n,r,t[11],16,1839030562),r=Ra(r,a,i,n,t[14],23,-35309556),n=Ra(n,r,a,i,t[1],4,-1530992060),i=Ra(i,n,r,a,t[4],11,1272893353),a=Ra(a,i,n,r,t[7],16,-155497632),r=Ra(r,a,i,n,t[10],23,-1094730640),n=Ra(n,r,a,i,t[13],4,681279174),i=Ra(i,n,r,a,t[0],11,-358537222),a=Ra(a,i,n,r,t[3],16,-722521979),r=Ra(r,a,i,n,t[6],23,76029189),n=Ra(n,r,a,i,t[9],4,-640364487),i=Ra(i,n,r,a,t[12],11,-421815835),a=Ra(a,i,n,r,t[15],16,530742520),n=Fa(n,r=Ra(r,a,i,n,t[2],23,-995338651),a,i,t[0],6,-198630844),i=Fa(i,n,r,a,t[7],10,1126891415),a=Fa(a,i,n,r,t[14],15,-1416354905),r=Fa(r,a,i,n,t[5],21,-57434055),n=Fa(n,r,a,i,t[12],6,1700485571),i=Fa(i,n,r,a,t[3],10,-1894986606),a=Fa(a,i,n,r,t[10],15,-1051523),r=Fa(r,a,i,n,t[1],21,-2054922799),n=Fa(n,r,a,i,t[8],6,1873313359),i=Fa(i,n,r,a,t[15],10,-30611744),a=Fa(a,i,n,r,t[6],15,-1560198380),r=Fa(r,a,i,n,t[13],21,1309151649),n=Fa(n,r,a,i,t[4],6,-145523070),i=Fa(i,n,r,a,t[11],10,-1120210379),a=Fa(a,i,n,r,t[2],15,718787259),r=Fa(r,a,i,n,t[9],21,-343485551),e[0]=Ua(n,e[0]),e[1]=Ua(r,e[1]),e[2]=Ua(a,e[2]),e[3]=Ua(i,e[3])}function La(e,t,n,r,a,i){return t=Ua(Ua(t,e),Ua(r,i)),Ua(t<<a|t>>>32-a,n)}function Pa(e,t,n,r,a,i,s){return La(t&n|~t&r,e,t,a,i,s)}function Ta(e,t,n,r,a,i,s){return La(t&r|n&~r,e,t,a,i,s)}function Ra(e,t,n,r,a,i,s){return La(t^n^r,e,t,a,i,s)}function Fa(e,t,n,r,a,i,s){return La(n^(t|~r),e,t,a,i,s)}function Ma(e){var t,n=e.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)Ea(r,Oa(e.substring(t-64,t)));e=e.substring(t-64);var a=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)a[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(a[t>>2]|=128<<(t%4<<3),t>55)for(Ea(r,a),t=0;t<16;t++)a[t]=0;return a[14]=8*n,Ea(r,a),r}function Oa(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}var Da="0123456789abcdef".split("");function Ia(e){for(var t="",n=0;n<4;n++)t+=Da[e>>8*n+4&15]+Da[e>>8*n&15];return t}function za(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function Ba(e){return Ma(e).map(za).join("")}var qa="5d41402abc4b2a76b9719d911017c592"!=function(e){for(var t=0;t<e.length;t++)e[t]=Ia(e[t]);return e.join("")}(Ma("hello"));function Ua(e,t){if(qa){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}return e+t&4294967295}function Va(e,t){var n,r,a,i;if(e!==n){for(var s=(a=e,i=1+(256/e.length|0),new Array(i+1).join(a)),o=[],l=0;l<256;l++)o[l]=l;var c=0;for(l=0;l<256;l++){var u=o[l];c=(c+u+s.charCodeAt(l))%256,o[l]=o[c],o[c]=u}n=e,r=o}else o=r;var d=t.length,h=0,f=0,p="";for(l=0;l<d;l++)f=(f+(u=o[h=(h+1)%256]))%256,o[h]=o[f],o[f]=u,s=o[(o[h]+o[f])%256],p+=String.fromCharCode(t.charCodeAt(l)^s);return p}var Ha={print:4,modify:8,copy:16,"annot-forms":32};function Wa(e,t,n,r){this.v=1,this.r=2;var a=192;e.forEach(function(e){if(void 0!==Ha.perm)throw new Error("Invalid permission: "+e);a+=Ha[e]}),this.padding="(\xbfN^Nu\x8aAd\0NV\xff\xfa\x01\b..\0\xb6\xd0h>\x80/\f\xa9\xfedSiz";var i=(t+this.padding).substr(0,32),s=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(i,s),this.P=-(1+(255^a)),this.encryptionKey=Ba(i+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=Va(this.encryptionKey,this.padding)}function Ga(e){if(/[^\u0000-\u00ff]/.test(e))throw new Error("Invalid PDF Name Object: "+e+", Only accept ASCII characters.");for(var t="",n=e.length,r=0;r<n;r++){var a=e.charCodeAt(r);t+=a<33||35===a||37===a||40===a||41===a||47===a||60===a||62===a||91===a||93===a||123===a||125===a||a>126?"#"+("0"+a.toString(16)).slice(-2):e[r]}return t}function $a(e){if("object"!==r(e))throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(e,n,r){if(r=r||!1,"string"!=typeof e||"function"!=typeof n||"boolean"!=typeof r)throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(e)||(t[e]={});var a=Math.random().toString(35);return t[e][a]=[n,!!r],a},this.unsubscribe=function(e){for(var n in t)if(t[n][e])return delete t[n][e],0===Object.keys(t[n]).length&&delete t[n],!0;return!1},this.publish=function(n){if(t.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1
vendor: 4,217 bytes, line 2
2),a=[];for(var i in t[n]){var s=t[n][i];try{s[0].apply(e,r)}catch(Aa){ya.console&&wa.error("jsPDF PubSub Error",Aa.message,Aa)}s[1]&&a.push(i)}a.length&&a.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function Ya(e){if(!(this instanceof Ya))return new Ya(e);var t="opacity,stroke-opacity".split(",");for(var n in e)e.hasOwnProperty(n)&&t.indexOf(n)>=0&&(this[n]=e[n]);this.id="",this.objectNumber=-1}function Ka(e,t){this.gState=e,this.matrix=t,this.id="",this.objectNumber=-1}function Xa(e,t,n,r,a){if(!(this instanceof Xa))return new Xa(e,t,n,r,a);this.type="axial"===e?2:3,this.coords=t,this.colors=n,Ka.call(this,r,a)}function Za(e,t,n,r,a){if(!(this instanceof Za))return new Za(e,t,n,r,a);this.boundingBox=e,this.xStep=t,this.yStep=n,this.stream="",this.cloneIndex=0,Ka.call(this,r,a)}function Ja(e){var t,n="string"==typeof arguments[0]?arguments[0]:"p",a=arguments[1],i=arguments[2],s=arguments[3],o=[],l=1,c=16,u="S",d=null;"object"===r(e=e||{})&&(n=e.orientation,a=e.unit||a,i=e.format||i,s=e.compress||e.compressPdf||s,null!==(d=e.encryption||null)&&(d.userPassword=d.userPassword||"",d.ownerPassword=d.ownerPassword||"",d.userPermissions=d.userPermissions||[]),l="number"==typeof e.userUnit?Math.abs(e.userUnit):1,void 0!==e.precision&&(t=e.precision),void 0!==e.floatPrecision&&(c=e.floatPrecision),u=e.defaultPathOperation||"S"),o=e.filters||(!0===s?["FlateEncode"]:o),a=a||"mm",n=(""+(n||"P")).toLowerCase();var h=e.putOnlyUsedFonts||!1,f={},p={internal:{},__private__:{}};p.__private__.PubSub=$a;var m="1.3",g=p.__private__.getPdfVersion=function(){return m};p.__private__.setPdfVersion=function(e){m=e};var v={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return v};var b=p.__private__.getPageFormat=function(e){return v[e]};i=i||"a4";var y="compat",x="advanced",w=y;function k(){this.saveGraphicsState(),J(new Te(fe,0,0,-fe,0,pn()*fe).toString()+" cm"),this.setFontSize(this.getFontSize()/fe),u="n",w=x}function N(){this.restoreGraphicsState(),u="S",w=y}var A=p.__private__.combineFontStyleAndFontWeight=function(e,t){if("bold"==e&&"normal"==t||"bold"==e&&400==t||"normal"==e&&"italic"==t||"bold"==e&&"italic"==t)throw new Error("Invalid Combination of fontweight and fontstyle");return t&&(e=400==t||"normal"===t?"italic"===e?"italic":"normal":700!=t&&"bold"!==t||"normal"!==e?(700==t?"bold":t)+""+e:"bold"),e};p.advancedAPI=function(e){var t=w===y;return t&&k.call(this),"function"!=typeof e||(e(this),t&&N.call(this)),this},p.compatAPI=function(e){var t=w===x;return t&&N.call(this),"function"!=typeof e||(e(this),t&&k.call(this)),this},p.isAdvancedAPI=function(){return w===x};var j,_=function(e){if(w!==x)throw new Error(e+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},S=p.roundToPrecision=p.__private__.roundToPrecision=function(e,n){var r=t||n;if(isNaN(e)||isNaN(r))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return e.toFixed(r).replace(/0+$/,"")};j=p.hpf=p.__private__.hpf="number"==typeof c?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return S(e,c)}:"smart"===c?function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return S(e,e>-1&&e<1?16:5)}:function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.hpf");return S(e,16)};var C=p.f2=p.__private__.f2=function(e){if(isNaN(e))throw new Error("Invalid argument passed to
2jsPDF.f2");return S(e,2)},E=p.__private__.f3=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.f3");return S(e,3)},L=p.scale=p.__private__.scale=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.scale");return w===y?e*fe:w===x?e:void 0},P=function(e){return L(function(e){return w===y?pn()-e:w===x?e:void 0}(e))};p.__private__.setPrecision=p.setPrecision=function(e){"number"==typeof parseInt(e,10)&&(t=parseInt(e,10))};var T,R="00000000000000000000000000000000",F=p.__private__.getFileId=function(){return R},M=p.__private__.setFileId=function(e){return R=void 0!==e&&/^[a-fA-F0-9]{32}$/.test(e)?e.toUpperCase():R.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),null!==d&&(yt=new Wa(d.userPermissions,d.userPassword,d.ownerPassword,R)),R};p.setFileId=function(e){return M(e),this},p.getFileId=function(){return F()};var O=p.__private__.convertDateToPDFDate=function(e){var t=e.getTimezoneOffset(),n=t<0?"+":"-",r=Math.floor(Math.abs(t/60)),a=Math.abs(t%60),i=[n,q(r),"'",q(a),"'"].join("");return["D:",e.getFullYear(),q(e.getMonth()+1),q(e.getDate()),q(e.getHours()),q(e.getMinutes()),q(e.getSeconds()),i].join("")},D=p.__private__.convertPDFDateToDate=function(e){var t=parseInt(e.substr(2,4),10),n=parseInt(e.substr(6,2),10)-1,r=parseInt(e.substr(8,2),10),a=parseInt(e.substr(10,2),10),i=parseInt(e.substr(12,2),10),s=parseInt(e.substr(14,2),10);return new Date(t,n,r,a,i,s,0)},I=p.__private__.setCreationDate=function(e){var t;if(void 0===e&&(e=new Date),e instanceof Date)t=O(e);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(e))throw new Error("Invalid argument passed to jsPDF.setCreationDate");t=e}return T=t},z=p.__private__.getCreationDate=function(e){var t=T;return"jsDate"===e&&(t=D(T)),t};p.setCreationDate=function(e){return I(e),this},p.getCreationDate=function(e){return z(e)};var B,q=p.__private__.padd2=function(e){return("0"+parseInt(e)).slice(-2)},U=p.__private__.padd2Hex=function(e){return("00"+(e=e.toString())).substr(e.length)},V=0,H=[],W=[],G=0,$=[],Y=[],K=!1,X=W;p.__private__.setCustomOutputDestination=function(e){K=!0,X=e};var Z=function(e){K||(X=e)};p.__private__.resetCustomOutputDestination=function(){K=!1,X=W};var J=p.__private__.out=function(e){return e=e.toString(),G+=e.length+1,X.push(e),X},Q=p.__private__.write=function(e){return J(1===arguments.length?e.toString():Array.prototype.join.call(arguments," "))},ee=p.__private__.getArrayBuffer=function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n);t--;)r[t]=e.charCodeAt(t);return n},te=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];p.__private__.getStandardFonts=function(){return te};var ne=e.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(e){return ne=w===x?e/fe:e,this};var re,ae=p.__private__.getFontSize=p.getFontSize=function(){return w===y?ne:ne*fe},ie=e.R2L||!1;p.__private__.setR2L=p.setR2L=function(e){return ie=e,this},p.__private__.getR2L=p.getR2L=function(){return ie};var se,oe=p.__private__.setZoomMode=function(e){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(e))re=e;else if(isNaN(e)){if(-1===[void 0,null,"fullwidth","fullheight","fullpage","original"].indexOf(e))throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+e+'" is not recognized.');re=e}else re=parseInt(e,10)};p.__private__.getZoomMode=function(){return re};var le,ce=p.__private__.setPageMode=function(e){if(-1==[void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(e))throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+e+'" is not recognized.');se=e};p.__private__.getPageMode=function(){return se};var ue=p.__private__.setLayoutMode=function(e){if(-1==[void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(e))throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+e+'" is not recognized.');le=e};p.__private__.getLayoutMode=function(){return le},p.__private__.setDisplayMode=p.setDisplayMode=function(e,t,n){return oe(e),ue(t),ce(n),this};var de={title:"",subject:"",author:"",keywords:"",creator:""};p.__private__.getDocumentProperty=function(e){if(-1===Object.keys(de).indexOf(e))throw new Error("Invalid argument passed to
2jsPDF.getDocumentProperty");return de[e]},p.__private__.getDocumentProperties=function(){return de},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(e){for(var t in de)de.hasOwnProperty(t)&&e[t]&&(de[t]=e[t]);return this},p.__private__.setDocumentProperty=function(e,t){if(-1===Object.keys(de).indexOf(e))throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return de[e]=t};var he,fe,pe,me,ge,ve={},be={},ye=[],xe={},we={},ke={},Ne={},Ae=null,je=0,_e=[],Se=new $a(p),Ce=e.hotfixes||[],Ee={},Le={},Pe=[],Te=function e(t,n,r,a,i,s){if(!(this instanceof e))return new e(t,n,r,a,i,s);isNaN(t)&&(t=1),isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(a)&&(a=1),isNaN(i)&&(i=0),isNaN(s)&&(s=0),this._matrix=[t,n,r,a,i,s]};Object.defineProperty(Te.prototype,"sx",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Te.prototype,"shy",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Te.prototype,"shx",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Te.prototype,"sy",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Te.prototype,"tx",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Te.prototype,"ty",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Te.prototype,"a",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Te.prototype,"b",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Te.prototype,"c",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Te.prototype,"d",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Te.prototype,"e",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Te.prototype,"f",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Te.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Te.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Te.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Te.prototype,"isIdentity",{get:function(){return 1===this.sx&&0===this.shy&&0===this.shx&&1===this.sy&&0===this.tx&&0===this.ty}}),Te.prototype.join=function(e){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(j).join(e)},Te.prototype.multiply=function(e){var t=e.sx*this.sx+e.shy*this.shx,n=e.sx*this.shy+e.shy*this.sy,r=e.shx*this.sx+e.sy*this.shx,a=e.shx*this.shy+e.sy*this.sy,i=e.tx*this.sx+e.ty*this.shx+this.tx,s=e.tx*this.shy+e.ty*this.sy+this.ty;return new Te(t,n,r,a,i,s)},Te.prototype.decompose=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,a=this.tx,i=this.ty,s=Math.sqrt(e*e+t*t),o=(e/=s)*n+(t/=s)*r;n-=e*o,r-=t*o;var l=Math.sqrt(n*n+r*r);return o/=l,e*(r/=l)<t*(n/=l)&&(e=-e,t=-t,o=-o,s=-s),{scale:new Te(s,0,0,l,0,0),translate:new Te(1,0,0,1,a,i),rotate:new Te(e,t,-t,e,0,0),skew:new Te(1,0,o,1,0,0)}},Te.prototype.toString=function(e){return this.join(" ")},Te.prototype.inversed=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,a=this.tx,i=this.ty,s=1/(e*r-t*n),o=r*s,l=-t*s,c=-n*s,u=e*s;return new Te(o,l,c,u,-o*a-c*i,-l*a-u*i)},Te.prototype.applyToPoint=function(e){var t=e.x*this.sx+e.y*this.shx+this.tx,n=e.x*this.shy+e.y*this.sy+this.ty;return new nn(t,n)},Te.prototype.applyToRectangle=function(e){var t=this.applyToPoint(e),n=this.applyToPoint(new nn(e.x+e.w,e.y+e.h));return new rn(t.x,t.y,n.x-t.x,n.y-t.y)},Te.prototype.clone=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,a=this.tx,i=this.ty;return new Te(e,t,n,r,a,i)},p.Matrix=Te;var Re=p.matrixMult=function(e,t){return t.multiply(e)},Fe=new Te(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Fe;var Me=function(e,t){if(!we[e]){var n=(t instanceof Xa?"Sh":"P")+(Object.keys(xe).length+1).toString(10);t.id=n,we[e]=n,xe[n]=t,Se.publish("addPattern",t)}};p.ShadingPattern=Xa,p.TilingPattern=Za,p.addShadingPattern=function(e,t){return _("addShadingPattern()"),Me(e,t),this},p.beginTilingPattern=function(e){_("beginTilingPattern()"),sn(e.boundingBox[0],e.boundingBox[1],e.boundingBox[2]-e.boundingBox[0],e.boundingBox[3]-e.boundingBox[1],e.matrix)},p.endTilingPattern=function(e,t){_("endTilingPattern()"),t.stream=Y[B].join("\n"),Me(e,t),Se.publish("endTilingPattern",t),Pe.pop().restore(
vendor: 13,530 bytes, line 2
2)};var Oe,De=p.__private__.newObject=function(){var e=Ie();return ze(e,!0),e},Ie=p.__private__.newObjectDeferred=function(){return V++,H[V]=function(){return G},V},ze=function(e,t){return t="boolean"==typeof t&&t,H[e]=G,t&&J(e+" 0 obj"),e},Be=p.__private__.newAdditionalObject=function(){var e={objId:Ie(),content:""};return $.push(e),e},qe=Ie(),Ue=Ie(),Ve=p.__private__.decodeColorString=function(e){var t=e.split(" ");if(2!==t.length||"g"!==t[1]&&"G"!==t[1])5!==t.length||"k"!==t[4]&&"K"!==t[4]||(t=[(1-t[0])*(1-t[3]),(1-t[1])*(1-t[3]),(1-t[2])*(1-t[3]),"r"]);else{var n=parseFloat(t[0]);t=[n,n,n,"r"]}for(var r="#",a=0;a<3;a++)r+=("0"+Math.floor(255*parseFloat(t[a])).toString(16)).slice(-2);return r},He=p.__private__.encodeColorString=function(e){var t;"string"==typeof e&&(e={ch1:e});var n=e.ch1,a=e.ch2,i=e.ch3,s=e.ch4,o="draw"===e.pdfColorType?["G","RG","K"]:["g","rg","k"];if("string"==typeof n&&"#"!==n.charAt(0)){var l=new _a(n);if(l.ok)n=l.toHex();else if(!/^\d*\.?\d*$/.test(n))throw new Error('Invalid color "'+n+'" passed to jsPDF.encodeColorString.')}if("string"==typeof n&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n="#"+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),"string"==typeof n&&/^#[0-9A-Fa-f]{6}$/.test(n)){var c=parseInt(n.substr(1),16);n=c>>16&255,a=c>>8&255,i=255&c}if(void 0===a||void 0===s&&n===a&&a===i)t="string"==typeof n?n+" "+o[0]:2===e.precision?C(n/255)+" "+o[0]:E(n/255)+" "+o[0];else if(void 0===s||"object"===r(s)){if(s&&!isNaN(s.a)&&0===s.a)return["1.","1.","1.",o[1]].join(" ");t="string"==typeof n?[n,a,i,o[1]].join(" "):2===e.precision?[C(n/255),C(a/255),C(i/255),o[1]].join(" "):[E(n/255),E(a/255),E(i/255),o[1]].join(" ")}else t="string"==typeof n?[n,a,i,s,o[2]].join(" "):2===e.precision?[C(n),C(a),C(i),C(s),o[2]].join(" "):[E(n),E(a),E(i),E(s),o[2]].join(" ");return t},We=p.__private__.getFilters=function(){return o},Ge=p.__private__.putStream=function(e){var t=(e=e||{}).data||"",n=e.filters||We(),r=e.alreadyAppliedFilters||[],a=e.addLength1||!1,i=t.length,s=e.objectId,o=function(e){return e};if(null!==d&&void 0===s)throw new Error("ObjectId must be passed to putStream for file encryption");null!==d&&(o=yt.encryptor(s,0));var l={};!0===n&&(n=["FlateEncode"]);var c=e.additionalKeyValues||[],u=(l=void 0!==Ja.API.processDataByFilters?Ja.API.processDataByFilters(t,n):{data:t,reverseChain:[]}).reverseChain+(Array.isArray(r)?r.join(" "):r.toString());if(0!==l.data.length&&(c.push({key:"Length",value:l.data.length}),!0===a&&c.push({key:"Length1",value:i})),0!=u.length)if(u.split("/").length-1==1)c.push({key:"Filter",value:u});else{c.push({key:"Filter",value:"["+u+"]"});for(var h=0;h<c.length;h+=1)if("DecodeParms"===c[h].key){for(var f=[],p=0;p<l.reverseChain.split("/").length-1;p+=1)f.push("null");f.push(c[h].value),c[h].value="["+f.join(" ")+"]"}}J("<<");for(var m=0;m<c.length;m++)J("/"+c[m].key+" "+c[m].value);J(">>"),0!==l.data.length&&(J("stream"),J(o(l.data)),J("endstream"))},$e=p.__private__.putPage=function(e){var t=e.number,n=e.data,r=e.objId,a=e.contentsObjId;ze(r,!0),J("<</Type /Page"),J("/Parent "+e.rootDictionaryObjId+" 0 R"),J("/Resources "+e.resourceDictionaryObjId+" 0 R"),J("/MediaBox ["+parseFloat(j(e.mediaBox.bottomLeftX))+" "+parseFloat(j(e.mediaBox.bottomLeftY))+" "+j(e.mediaBox.topRightX)+" "+j(e.mediaBox.topRightY)+"]"),null!==e.cropBox&&J("/CropBox ["+j(e.cropBox.bottomLeftX)+" "+j(e.cropBox.bottomLeftY)+" "+j(e.cropBox.topRightX)+" "+j(e.cropBox.topRightY)+"]"),null!==e.bleedBox&&J("/BleedBox ["+j(e.bleedBox.bottomLeftX)+" "+j(e.bleedBox.bottomLeftY)+" "+j(e.bleedBox.topRightX)+" "+j(e.bleedBox.topRightY)+"]"),null!==e.trimBox&&J("/TrimBox ["+j(e.trimBox.bottomLeftX)+" "+j(e.trimBox.bottomLeftY)+" "+j(e.trimBox.topRightX)+" "+j(e.trimBox.topRightY)+"]"),null!==e.artBox&&J("/ArtBox ["+j(e.artBox.bottomLeftX)+" "+j(e.artBox.bottomLeftY)+" "+j(e.artBox.topRightX)+" "+j(e.artBox.topRightY)+"]"),"number"==typeof e.userUnit&&1!==e.userUnit&&J("/UserUnit "+e.userUnit),Se.publish("putPage",{objId:r,pageContext:_e[t],pageNumber:t,page:n}),J("/Contents "+a+" 0 R"),J(">>"),J("endobj");var i=n.join("\n");return w===x&&(i+="\nQ"),ze(a,!0),Ge({data:i,filters:We(),objectId:a}),J("endobj"),r},Ye=p.__private__.putPages=function(){var e,t,n=[];for(e=1;e<=je;e++)_e[e].objId=Ie(),_e[e].contentsObjId=Ie();for(e=1;e<=je;e++)n.push($e({number:e,data:Y[e],objId:_e[e].objId,contentsObjId:_e[e].contentsObjId,mediaBox:_e[e].mediaBox,cropBox:_e[e].cropBox,bleedBox:_e[e].bleedBox,trimBox:_e[e].trimBox,artBox:_e[e].artBox,userUnit:_e[e].userUnit,rootDictionaryObjId:qe,resourceDictionaryObjId:Ue}));ze(qe,!0),J("<</Type /Pages");var r="/Kids [";for(t=0;t<je;t++)r+=n[t]+" 0 R ";J(r+"]"),J("/Count "+je),J(">>"),J("endobj"),Se.publish("postPutPages")},Ke=function(e){Se.publish("putFont",{font:e,out:J,newObject:De,putStream:Ge}),!0!==e.isAlreadyPutted&&(e.objectNumber=De(),J("<<"),J("/Type /Font"),J("/BaseFont /"+Ga(e.postScriptName)),J("/Subtype /Type1"),"string"==typeof e.encoding&&J("/Encoding /"+e.encoding),J("/FirstChar 32"),J("/LastChar 255"),J(">>"),J("endobj"))},Xe=function(e){e.objectNumber=De();var t=[];t.push({key:"Type",value:"/XObject"}),t.push({key:"Subtype",value:"/Form"}),t.push({key:"BBox",value:"["+[j(e.x),j(e.y),j(e.x+e.width),j(e.y+e.height)].join(" ")+"]"}),t.push({key:"Matrix",value:"["+e.matrix.toString()+"]"});var n=e.pages[1].join("\n");Ge({data:n,additionalKeyValues:t,objectId:e.objectNumber}),J("endobj")},Ze=function(e,t){t||(t=21);var n=De(),r=function(e,t){var n,r=[],a=1/(t-1);for(n=0;n<1;n+=a)r.push(n);if(r.push(1),0!=e[0].offset){var i={offset:0,color:e[0].color};e.unshift(i)}if(1!=e[e.length-1].offset){var s={offset:1,color:e[e.length-1].color};e.push(s)}for(var o="",l=0,c=0;c<r.length;c++){for(n=r[c];n>e[l+1].offset;)l++;var u=e[l].offset,d=(n-u)/(e[l+1].offset-u),h=e[l].color,f=e[l+1].color;o+=U(Math.round((1-d)*h[0]+d*f[0]).toString(16))+U(Math.round((1-d)*h[1]+d*f[1]).toString(16))+U(Math.round((1-d)*h[2]+d*f[2]).toString(16))}return o.trim()}(e.colors,t),a=[];a.push({key:"FunctionType",value:"0"}),a.push({key:"Domain",value:"[0.0 1.0]"}),a.push({key:"Size",value:"["+t+"]"}),a.push({key:"BitsPerSample",value:"8"}),a.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),a.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),Ge({data:r,additionalKeyValues:a,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:n}),J("endobj"),e.objectNumber=De(),J("<< /ShadingType "+e.type),J("/ColorSpace /DeviceRGB");var i="/Coords ["+j(parseFloat(e.coords[0]))+" "+j(parseFloat(e.coords[1]))+" ";2===e.type?i+=j(parseFloat(e.coords[2]))+" "+j(parseFloat(e.coords[3])):i+=j(parseFloat(e.coords[2]))+" "+j(parseFloat(e.coords[3]))+" "+j(parseFloat(e.coords[4]))+" "+j(parseFloat(e.coords[5])),J(i+="]"),e.matrix&&J("/Matrix ["+e.matrix.toString()+"]"),J("/Function "+n+" 0 R"),J("/Extend [true true]"),J(">>"),J("endobj")},Je=function(e,t){var n=Ie(),r=De();t.push({resourcesOid:n,objectOid:r}),e.objectNumber=r;var a=[];a.push({key:"Type",value:"/Pattern"}),a.push({key:"PatternType",value:"1"}),a.push({key:"PaintType",value:"1"}),a.push({key:"TilingType",value:"1"}),a.push({key:"BBox",value:"["+e.boundingBox.map(j).join(" ")+"]"}),a.push({key:"XStep",value:j(e.xStep)}),a.push({key:"YStep",value:j(e.yStep)}),a.push({key:"Resources",value:n+" 0 R"}),e.matrix&&a.push({key:"Matrix",value:"["+e.matrix.toString()+"]"}),Ge({data:e.stream,additionalKeyValues:a,objectId:e.objectNumber}),J("endobj")},Qe=function(e){for(var t in e.objectNumber=De(),J("<<"),e)switch(t){case"opacity":J("/ca "+C(e[t]));break;case"stroke-opacity":J("/CA "+C(e[t]))}J(">>"),J("endobj")},et=function(e){ze(e.resourcesOid,!0),J("<<"),J("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),function(){for(var e in J("/Font <<"),ve)ve.hasOwnProperty(e)&&(!1===h||!0===h&&f.hasOwnProperty(e))&&J("/"+e+" "+ve[e].objectNumber+" 0 R");J(">>")}(),function(){if(Object.keys(xe).length>0){for(var e in J("/Shading <<"),xe)xe.hasOwnProperty(e)&&xe[e]instanceof Xa&&xe[e].objectNumber>=0&&J("/"+e+" "+xe[e].objectNumber+" 0 R");Se.publish("putShadingPatternDict"),J(">>")}}(),function(e){if(Object.keys(xe).length>0){for(var t in J("/Pattern <<"),xe)xe.hasOwnProperty(t)&&xe[t]instanceof p.TilingPattern&&xe[t].objectNumber>=0&&xe[t].objectNumber<e&&J("/"+t+" "+xe[t].objectNumber+" 0 R");Se.publish("putTilingPatternDict"),J(">>")}}(e.objectOid),function(){if(Object.keys(ke).length>0){var e;for(e in J("/ExtGState <<"),ke)ke.hasOwnProperty(e)&&ke[e].objectNumber>=0&&J("/"+e+" "+ke[e].objectNumber+" 0 R");Se.publish("putGStateDict"),J(">>")}}(),function(){for(var e in J("/XObject <<"),Ee)Ee.hasOwnProperty(e)&&Ee[e].objectNumber>=0&&J("/"+e+" "+Ee[e].objectNumber+" 0 R");Se.publish("putXobjectDict"),J(">>")}(),J(">>"),J("endobj")},tt=function(e){be[e.fontName]=be[e.fontName]||{},be[e.fontName][e.fontStyle]=e.id},nt=function(e,t,n,r,a){var i={id:"F"+(Object.keys(ve).length+1).toString(10),postScriptName:e,fontName:t,fontStyle:n,encoding:r,isStandardFont:a||!1,metadata:{}};return Se.publish("addFont",{font:i,instance:this}),ve[i.id]=i,tt(i),i.id},rt=p.__private__.pdfEscape=p.pdfEscape=function(e,t){return function(e,t){var n,r,a,i,s,o,l,c,u;if(a=(t=t||{}).sourceEncoding||"Unicode",s=t.outputEncoding,(t.autoencode||s)&&ve[he].metadata&&ve[he].metadata[a]&&ve[he].metadata[a].encoding&&(i=ve[he].metadata[a].encoding,!s&&ve[he].encoding&&(s=ve[he].encoding),!s&&i.codePages&&(s=i.codePages[0]),"string"==typeof s&&(s=i[s]),s)){for(l=!1,o=[],n=0,r=e.length;n<r;n++)(c=s[e.charCodeAt(n)])?o.push(String.fromCharCode(c)):o.push(e[n]),o[n].charCodeAt(0)>>8&&(l=!0);e=o.join("")}for(n=e.length;void 0===l&&0!==n;)e.charCodeAt(n-1)>>8&&(l=!0),n--;if(!l)return e;for(o=t.noBOM?[]:[254,255],n=0,r=e.length;n<r;n++){if((u=(c=e.charCodeAt(n))>>8)>>8)throw new Error("Character at position "+n+" of string '"+e+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");o.push(u),o.push(c-(u<<8))}return String.fromCharCode.apply(void 0,o)}(e,t).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},at=p.__private__.beginPage=function(e){Y[++je]=[],_e[je]={objId:0,contentsObjId:0,userUnit:Number(l),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(e[0]),topRightY:Number(e[1])}},ot(je),Z(Y[B])},it=function(e,t){var r,a,s;switch(n=t||n,"string"==typeof e&&(r=b(e.toLowerCase()),Array.isArray(r)&&(a=r[0],s=r[1])),Array.isArray(e)&&(a=e[0]*fe,s=e[1]*fe),isNaN(a)&&(a=i[0],s=i[1]),(a>14400||s>14400)&&(wa.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),a=Math.min(14400,a),s=Math.min(14400,s)),i=[a,s],n.substr(0,1)){case"l":s>a&&(i=[s,a]);break;case"p":a>s&&(i=[s,a])}at(i),zt(Dt),J($t),0!==Qt&&J(Qt+" J"),0!==en&&J(en+" j"),Se.publish("addPage",{pageNumber:je})},st=function(e){e>0&&e<=je&&(Y.splice(e,1),_e.splice(e,1),je--,B>je&&(B=je),this.setPage(B))},ot=function(e){e>0&&e<=je&&(B=e)},lt=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return Y.length-1},ct=function(e,t,n){var r,a=void 0;return n=n||{},e=void 0!==e?e:ve[he].fontName,t=void 0!==t?t:ve[he].fontStyle,r=e.toLowerCase(),void 0!==be[r]&&void 0!==be[r][t]?a=be[r][t]:void 0!==be[e]&&void 0!==be[e][t]?a=be[e][t]:!1===n.disableWarning&&wa.warn("Unable to look up font label for font '"+e+"', '"+t+"'. Refer to getFontList() for available fonts."),a||n.noFallback||null==(a=be.times[t])&&(a=be.times.normal),a},ut=p.__private__.putInfo=function(){var e=De(),t=function(e){return e};for(var n in null!==d&&(t=yt.encryptor(e,0)),J("<<"),J("/Producer ("+rt(t("jsPDF "+Ja.version))+")"),de)de.hasOwnProperty(n)&&de[n]&&J("/"+n.substr(0,1).toUpperCase()+n.substr(1)+" ("+rt(t(de[n]))+")");J("/CreationDate ("+rt(t(T))+")"),J(">>"),J("endobj")},dt=p.__private__.putCatalog=function(e){var t=(e=e||{}).rootDictionaryObjId||qe;switch(De(),J("<<"),J("/Type /Catalog"),J("/Pages "+t+" 0 R"),re||(re="fullwidth"),re){case"fullwidth":J("/OpenAction [3 0 R /FitH null]");break;case"fullheight":J("/OpenAction [3 0 R /FitV null]");break;case"fullpage":J("/OpenAction [3 0 R /Fit]");break;case"original":J("/OpenAction [3 0 R /XYZ null null 1]");break;default:var n=""+re;"%"===n.substr(n.length-1)&&(re=parseInt(re)/100),"number"==typeof re&&J("/OpenAction [3 0 R /XYZ null null "+C(re)+"]")}switch(le||(le="continuous"),le){case"continuous":J("/PageLayout /OneColumn");break;case"single":J("/PageLayout /SinglePage");break;case"two":case"twoleft":J("/PageLayout /TwoColumnLeft");break;case"tworight":J("/PageLayout /TwoColumnRight")}se&&J("/PageMode /"+se),Se.publish("putCatalog"),J(">>"),J("endobj")},ht=p.__private__.putTrailer=function(){J("trailer"),J("<<"),J("/Size "+(V+1)),J("/Root "+V+" 0 R"),J("/Info "+(V-1)+" 0 R"),null!==d&&J("/Encrypt "+yt.oid+" 0 R"),J("/ID [ <"+R+"> <"+R+"> ]"),J(">>")},ft=p.__private__.putHeader=function(){J("%PDF-"+m),J("%\xba\xdf\xac\xe0")},pt=p.__private__.putXRef=function(){var e="0000000000";J("xref"),J("0 "+(V+1)),J("0000000000 65535 f ");for(var t=1;t<=V;t++)"function"==typeof H[t]?J((e+H[t]()).slice(-10)+" 00000 n "):void 0!==H[t]?J((e+H[t]).slice(-10)+" 00000 n "):J("0000000000 00000 n ")},mt=p.__private__.buildDocument=function(){var e;V=0,G=0,W=[],H=[],$=[],qe=Ie(),Ue=Ie(),Z(W),Se.publish("buildDocument"),ft(),Ye(),function(){Se.publish("putAdditionalObjects");for(var e=0;e<$.length;e++){var t=$[e];ze(t.objId,!0),J(t.content),J("endobj")}Se.publish("postPutAdditionalObjects")}(),e=[],function(){for(var e in ve)ve.hasOwnProperty(e)&&(!1===h||!0===h&&f.hasOwnProperty(e))&&Ke(ve[e])}(),function(){var e;
vendor: 4,268 bytes, line 2
2for(e in ke)ke.hasOwnProperty(e)&&Qe(ke[e])}(),function(){for(var e in Ee)Ee.hasOwnProperty(e)&&Xe(Ee[e])}(),function(e){var t;for(t in xe)xe.hasOwnProperty(t)&&(xe[t]instanceof Xa?Ze(xe[t]):xe[t]instanceof Za&&Je(xe[t],e))}(e),Se.publish("putResources"),e.forEach(et),et({resourcesOid:Ue,objectOid:Number.MAX_SAFE_INTEGER}),Se.publish("postPutResources"),null!==d&&(yt.oid=De(),J("<<"),J("/Filter /Standard"),J("/V "+yt.v),J("/R "+yt.r),J("/U <"+yt.toHexString(yt.U)+">"),J("/O <"+yt.toHexString(yt.O)+">"),J("/P "+yt.P),J(">>"),J("endobj")),ut(),dt();var t=G;return pt(),ht(),J("startxref"),J(""+t),J("%%EOF"),Z(Y[B]),W.join("\n")},gt=p.__private__.getBlob=function(e){return new Blob([ee(e)],{type:"application/pdf"})},vt=p.output=p.__private__.output=(Oe=function(e,t){switch("string"==typeof(t=t||{})?t={filename:t}:t.filename=t.filename||"generated.pdf",e){case void 0:return mt();case"save":p.save(t.filename);break;case"arraybuffer":return ee(mt());case"blob":return gt(mt());case"bloburi":case"bloburl":if(void 0!==ya.URL&&"function"==typeof ya.URL.createObjectURL)return ya.URL&&ya.URL.createObjectURL(gt(mt()))||void 0;wa.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var n="",r=mt();try{n=Ca(r)}catch(d){n=Ca(unescape(encodeURIComponent(r)))}return"data:application/pdf;filename="+t.filename+";base64,"+n;case"pdfobjectnewwindow":if("[object Window]"===Object.prototype.toString.call(ya)){var a="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",i=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';t.pdfObjectUrl&&(a=t.pdfObjectUrl,i="");var s='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><script src="'+a+'"'+i+'><\/script><script >PDFObject.embed("'+this.output("dataurlstring")+'", '+JSON.stringify(t)+");<\/script></body></html>",o=ya.open();return null!==o&&o.document.write(s),o}throw new Error("The option pdfobjectnewwindow just works in a browser-environment.");case"pdfjsnewwindow":if("[object Window]"===Object.prototype.toString.call(ya)){var l='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe id="pdfViewer" src="'+(t.pdfJsUrl||"examples/PDF.js/web/viewer.html")+"?file=&downloadName="+t.filename+'" width="500px" height="400px" /></body></html>',c=ya.open();if(null!==c){c.document.write(l);var u=this;c.document.documentElement.querySelector("#pdfViewer").onload=function(){c.document.title=t.filename,c.document.documentElement.querySelector("#pdfViewer").contentWindow.PDFViewerApplication.open(u.output("bloburl"))}}return c}throw new Error("The option pdfjsnewwindow just works in a browser-environment.");case"dataurlnewwindow":if("[object Window]"!==Object.prototype.toString.call(ya))throw new Error("The option dataurlnewwindow just works in a browser-environment.");var h='<html><style>html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;} </style><body><iframe src="'+this.output("datauristring",t)+'"></iframe></body></html>',f=ya.open();if(null!==f&&(f.document.write(h),f.document.title=t.filename),f||"undefined"==typeof safari)return f;break;case"datauri":case"dataurl":return ya.document.location.href=this.output("datauristring",t);default:return null}},Oe.foo=function(){try{return Oe.apply(this,arguments)}catch(t){var e=t.stack||"";~e.indexOf(" at ")&&(e=e.split(" at ")[1]);var n="Error in function "+e.split("\n")[0].split("<")[0]+": "+t.message;if(!ya.console)throw new Error(n);ya.console.error(n,t),ya.alert&&alert(n)}},Oe.foo.bar=Oe,Oe.foo),bt=function(e){return!0===Array.isArray(Ce)&&Ce.indexOf(e)>-1};switch(a){case"pt":fe=1;break;case"mm":fe=72/25.4;break;case"cm":fe=72/2.54;break;case"in":fe=72;break;case"px":fe=1==bt("px_scaling")?.75:96/72;break;case"pc":case"em":fe=12;break;case"ex":fe=6;break;default:if("number"!=typeof a)throw new Error("Invalid unit: "+a);fe=a}var yt=null;I(),M();var xt=p.__private__.getPageInfo=p.getPageInfo=function(e){if(isNaN(e)||e%1!=0)throw new Error("Invalid argument passed to
2jsPDF.getPageInfo");return{objId:_e[e].objId,pageNumber:e,pageContext:_e[e]}},wt=p.__private__.getPageInfoByObjId=function(e){if(isNaN(e)||e%1!=0)throw new Error("Invalid argument passed to jsPDF.getPageInfoByObjId");for(var t in _e)if(_e[t].objId===e)break;return xt(t)},kt=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:_e[B].objId,pageNumber:B,pageContext:_e[B]}};p.addPage=function(){return it.apply(this,arguments),this},p.setPage=function(){return ot.apply(this,arguments),Z.call(this,Y[B]),this},p.insertPage=function(e){return this.addPage(),this.movePage(B,e),this},p.movePage=function(e,t){var n,r;if(e>t){n=Y[e],r=_e[e];for(var a=e;a>t;a--)Y[a]=Y[a-1],_e[a]=_e[a-1];Y[t]=n,_e[t]=r,this.setPage(t)}else if(e<t){n=Y[e],r=_e[e];for(var i=e;i<t;i++)Y[i]=Y[i+1],_e[i]=_e[i+1];Y[t]=n,_e[t]=r,this.setPage(t)}return this},p.deletePage=function(){return st.apply(this,arguments),this},p.__private__.text=p.text=function(e,t,n,a,i){var s,o,l,c,u,d,h,p,m,g=(a=a||{}).scope||this;if("number"==typeof e&&"number"==typeof t&&("string"==typeof n||Array.isArray(n))){var v=n;n=t,t=e,e=v}if(arguments[3]instanceof Te==0?(l=arguments[4],c=arguments[5],"object"===r(h=arguments[3])&&null!==h||("string"==typeof l&&(c=l,l=null),"string"==typeof h&&(c=h,h=null),"number"==typeof h&&(l=h,h=null),a={flags:h,angle:l,align:c})):(_("The transform parameter of text() with a Matrix value"),m=i),isNaN(t)||isNaN(n)||null==e)throw new Error("Invalid arguments passed to jsPDF.text");if(0===e.length)return g;var b,y="",k="number"==typeof a.lineHeightFactor?a.lineHeightFactor:Ot,N=g.internal.scaleFactor;function A(e){return e=e.split("\t").join(Array(a.TabLen||9).join(" ")),rt(e,h)}function S(e){for(var t,n=e.concat(),r=[],a=n.length;a--;)"string"==typeof(t=n.shift())?r.push(t):Array.isArray(e)&&(1===t.length||void 0===t[1]&&void 0===t[2])?r.pu
vendor: 10,145 bytes, line 2
2sh(t[0]):r.push([t[0],t[1],t[2]]);return r}function C(e,t){var n;if("string"==typeof e)n=t(e)[0];else if(Array.isArray(e)){for(var r,a,i=e.concat(),s=[],o=i.length;o--;)"string"==typeof(r=i.shift())?s.push(t(r)[0]):Array.isArray(r)&&"string"==typeof r[0]&&(a=t(r[0],r[1],r[2]),s.push([a[0],a[1],a[2]]));n=s}return n}var E=!1,P=!0;if("string"==typeof e)E=!0;else if(Array.isArray(e)){var T=e.concat();o=[];for(var R,F=T.length;F--;)("string"!=typeof(R=T.shift())||Array.isArray(R)&&"string"!=typeof R[0])&&(P=!1);E=P}if(!1===E)throw new Error('Type of text must be string or Array. "'+e+'" is not recognized.');"string"==typeof e&&(e=e.match(/[\r?\n]/)?e.split(/\r\n|\r|\n/g):[e]);var M=ne/g.internal.scaleFactor,O=M*(k-1);switch(a.baseline){case"bottom":n-=O;break;case"top":n+=M-O;break;case"hanging":n+=M-2*O;break;case"middle":n+=M/2-O}if((d=a.maxWidth||0)>0&&("string"==typeof e?e=g.splitTextToSize(e,d):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce(function(e,t){return e.concat(g.splitTextToSize(t,d))},[]))),s={text:e,x:t,y:n,options:a,mutex:{pdfEscape:rt,activeFontKey:he,fonts:ve,activeFontSize:ne}},Se.publish("preProcessText",s),e=s.text,l=(a=s.options).angle,m instanceof Te==0&&l&&"number"==typeof l){l*=Math.PI/180,0===a.rotationDirection&&(l=-l),w===x&&(l=-l);var D=Math.cos(l),I=Math.sin(l);m=new Te(D,I,-I,D,0,0)}else l&&l instanceof Te&&(m=l);w!==x||m||(m=Fe),void 0!==(u=a.charSpace||Zt)&&(y+=j(L(u))+" Tc\n",this.setCharSpace(this.getCharSpace()||0)),void 0!==(p=a.horizontalScale)&&(y+=j(100*p)+" Tz\n"),a.lang;var z=-1,B=void 0!==a.renderingMode?a.renderingMode:a.stroke,q=g.internal.getCurrentPageInfo().pageContext;switch(B){case 0:case!1:case"fill":z=0;break;case 1:case!0:case"stroke":z=1;break;case 2:case"fillThenStroke":z=2;break;case 3:case"invisible":z=3;break;case 4:case"fillAndAddForClipping":z=4;break;case 5:case"strokeAndAddPathForClipping":z=5;break;case 6:case"fillThenStrokeAndAddToPathForClipping":z=6;break;case 7:case"addToPathForClipping":z=7}var U=void 0!==q.usedRenderingMode?q.usedRenderingMode:-1;-1!==z?y+=z+" Tr\n":-1!==U&&(y+="0 Tr\n"),-1!==z&&(q.usedRenderingMode=z),c=a.align||"left";var V,H=ne*k,W=g.internal.pageSize.getWidth(),G=ve[he];u=a.charSpace||Zt,d=a.maxWidth||0,h=Object.assign({autoencode:!0,noBOM:!0},a.flags);var $=[],Y=function(e){return g.getStringUnitWidth(e,{font:G,charSpace:u,fontSize:ne,doKerning:!1})*ne/N};if("[object Array]"===Object.prototype.toString.call(e)){var K;o=S(e),"left"!==c&&(V=o.map(Y));var X,Z=0;if("right"===c){t-=V[0],e=[],F=o.length;for(var Q=0;Q<F;Q++)0===Q?(X=Vt(t),K=Ht(n)):(X=L(Z-V[Q]),K=-H),e.push([o[Q],X,K]),Z=V[Q]}else if("center"===c){t-=V[0]/2,e=[],F=o.length;for(var ee=0;ee<F;ee++)0===ee?(X=Vt(t),K=Ht(n)):(X=L((Z-V[ee])/2),K=-H),e.push([o[ee],X,K]),Z=V[ee]}else if("left"===c){e=[],F=o.length;for(var te=0;te<F;te++)e.push(o[te])}else if("justify"===c&&"Identity-H"===G.encoding){e=[],F=o.length,d=0!==d?d:W;for(var re=0,ae=0;ae<F;ae++)if(K=0===ae?Ht(n):-H,X=0===ae?Vt(t):re,ae<F-1){var se=L((d-V[ae])/(o[ae].split(" ").length-1)),oe=o[ae].split(" ");e.push([oe[0]+" ",X,K]),re=0;for(var le=1;le<oe.length;le++){var ce=(Y(oe[le-1]+" "+oe[le])-Y(oe[le]))*N+se;le==oe.length-1?e.push([oe[le],ce,0]):e.push([oe[le]+" ",ce,0]),re-=ce}}else e.push([o[ae],X,K]);e.push(["",re,0])}else{if("justify"!==c)throw new Error('Unrecognized alignment option, use "left", "center", "right" or "justify".');for(e=[],F=o.length,d=0!==d?d:W,ae=0;ae<F;ae++){K=0===ae?Ht(n):-H,X=0===ae?Vt(t):0;var ue=o[ae].split(" ").length-1,de=ue>0?(d-V[ae])/ue:0;ae<F-1?$.push(j(L(de))):$.push(0),e.push([o[ae],X,K])}}}!0===("boolean"==typeof a.R2L?a.R2L:ie)&&(e=C(e,function(e,t,n){return[e.split("").reverse().join(""),t,n]})),s={text:e,x:t,y:n,options:a,mutex:{pdfEscape:rt,activeFontKey:he,fonts:ve,activeFontSize:ne}},Se.publish("postProcessText",s),e=s.text,b=s.mutex.isHex||!1;var fe=ve[he].encoding;"WinAnsiEncoding"!==fe&&"StandardEncoding"!==fe||(e=C(e,function(e,t,n){return[A(e),t,n]})),o=S(e),e=[];for(var pe,me,ge,be=Array.isArray(o[0])?1:0,ye="",xe=function(e,t,n){var r="";return n instanceof Te?(n="number"==typeof a.angle?Re(n,new Te(1,0,0,1,e,t)):Re(new Te(1,0,0,1,e,t),n),w===x&&(n=Re(new Te(1,0,0,-1,0,0),n)),r=n.join(" ")+" Tm\n"):r=j(e)+" "+j(t)+" Td\n",r},we=0;we<o.length;we++){switch(ye="",be){case 1:ge=(b?"<":"(")+o[we][0]+(b?">":")"),pe=parseFloat(o[we][1]),me=parseFloat(o[we][2]);break;case 0:ge=(b?"<":"(")+o[we]+(b?">":")"),pe=Vt(t),me=Ht(n)}void 0!==$&&void 0!==$[we]&&(ye=$[we]+" Tw\n"),0===we?e.push(ye+xe(pe,me,m)+ge):0===be?e.push(ye+ge):1===be&&e.push(ye+xe(pe,me,m)+ge)}e=0===be?e.join(" Tj\nT* "):e.join(" Tj\n"),e+=" Tj\n";var ke="BT\n/";return ke+=he+" "+ne+" Tf\n",ke+=j(ne*k)+" TL\n",ke+=Kt+"\n",ke+=y,ke+=e,J(ke+="ET"),f[he]=!0,g};var Nt=p.__private__.clip=p.clip=function(e){return J("evenodd"===e?"W*":"W"),this};p.clipEvenOdd=function(){return Nt("evenodd")},p.__private__.discardPath=p.discardPath=function(){return J("n"),this};var At=p.__private__.isValidStyle=function(e){var t=!1;return-1!==[void 0,null,"S","D","F","DF","FD","f","f*","B","B*","n"].indexOf(e)&&(t=!0),t};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(e){return At(e)&&(u=e),this};var jt=p.__private__.getStyle=p.getStyle=function(e){var t=u;switch(e){case"D":case"S":t="S";break;case"F":t="f";break;case"FD":case"DF":t="B";break;case"f":case"f*":case"B":case"B*":t=e}return t},_t=p.close=function(){return J("h"),this};p.stroke=function(){return J("S"),this},p.fill=function(e){return St("f",e),this},p.fillEvenOdd=function(e){return St("f*",e),this},p.fillStroke=function(e){return St("B",e),this},p.fillStrokeEvenOdd=function(e){return St("B*",e),this};var St=function(e,t){"object"===r(t)?Lt(t,e):J(e)},Ct=function(e){null===e||w===x&&void 0===e||(e=jt(e),J(e))};function Et(e,t,n,r,a){var i=new Za(t||this.boundingBox,n||this.xStep,r||this.yStep,this.gState,a||this.matrix);i.stream=this.stream;var s=e+"$$"+this.cloneIndex+++"$$";return Me(s,i),i}var Lt=function(e,t){var n=we[e.key],r=xe[n];if(r instanceof Xa)J("q"),J(Pt(t)),r.gState&&p.setGState(r.gState),J(e.matrix.toString()+" cm"),J("/"+n+" sh"),J("Q");else if(r instanceof Za){var a=new Te(1,0,0,-1,0,pn());e.matrix&&(a=a.multiply(e.matrix||Fe),n=Et.call(r,e.key,e.boundingBox,e.xStep,e.yStep,a).id),J("q"),J("/Pattern cs"),J("/"+n+" scn"),r.gState&&p.setGState(r.gState),J(t),J("Q")}},Pt=function(e){switch(e){case"f":case"F":case"n":return"W n";case"f*":return"W* n";case"B":case"S":return"W S";case"B*":return"W* S"}},Tt=p.moveTo=function(e,t){return J(j(L(e))+" "+j(P(t))+" m"),this},Rt=p.lineTo=function(e,t){return J(j(L(e))+" "+j(P(t))+" l"),this},Ft=p.curveTo=function(e,t,n,r,a,i){return J([j(L(e)),j(P(t)),j(L(n)),j(P(r)),j(L(a)),j(P(i)),"c"].join(" ")),this};p.__private__.line=p.line=function(e,t,n,r,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!At(a))throw new Error("Invalid arguments passed to jsPDF.line");return w===y?this.lines([[n-e,r-t]],e,t,[1,1],a||"S"):this.lines([[n-e,r-t]],e,t,[1,1]).stroke()},p.__private__.lines=p.lines=function(e,t,n,r,a,i){var s,o,l,c,u,d,h,f,p,m,g,v;if("number"==typeof e&&(v=n,n=t,t=e,e=v),r=r||[1,1],i=i||!1,isNaN(t)||isNaN(n)||!Array.isArray(e)||!Array.isArray(r)||!At(a)||"boolean"!=typeof i)throw new Error("Invalid arguments passed to jsPDF.lines");for(Tt(t,n),s=r[0],o=r[1],c=e.length,m=t,g=n,l=0;l<c;l++)2===(u=e[l]).length?(m=u[0]*s+m,g=u[1]*o+g,Rt(m,g)):(d=u[0]*s+m,h=u[1]*o+g,f=u[2]*s+m,p=u[3]*o+g,m=u[4]*s+m,g=u[5]*o+g,Ft(d,h,f,p,m,g));return i&&_t(),Ct(a),this},p.path=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.c;switch(n.op){case"m":Tt(r[0],r[1]);break;case"l":Rt(r[0],r[1]);break;case"c":Ft.apply(this,r);break;case"h":_t()}}return this},p.__private__.rect=p.rect=function(e,t,n,r,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!At(a))throw new Error("Invalid arguments passed to jsPDF.rect");return w===y&&(r=-r),J([j(L(e)),j(P(t)),j(L(n)),j(L(r)),"re"].join(" ")),Ct(a),this},p.__private__.triangle=p.triangle=function(e,t,n,r,a,i,s){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(a)||isNaN(i)||!At(s))throw new Error("Invalid arguments passed to jsPDF.triangle");return this.lines([[n-e,r-t],[a-n,i-r],[e-a,t-i]],e,t,[1,1],s,!0),this},p.__private__.roundedRect=p.roundedRect=function(e,t,n,r,a,i,s){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(a)||isNaN(i)||!At(s))throw new Error("Invalid arguments passed to jsPDF.roundedRect");var o=4/3*(Math.SQRT2-1);return a=Math.min(a,.5*n),i=Math.min(i,.5*r),this.lines([[n-2*a,0],[a*o,0,a,i-i*o,a,i],[0,r-2*i],[0,i*o,-a*o,i,-a,i],[2*a-n,0],[-a*o,0,-a,-i*o,-a,-i],[0,2*i-r],[0,-i*o,a*o,-i,a,-i]],e+a,t,[1,1],s,!0),this},p.__private__.ellipse=p.ellipse=function(e,t,n,r,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!At(a))throw new Error("Invalid arguments passed to jsPDF.ellipse");var i=4/3*(Math.SQRT2-1)*n,s=4/3*(Math.SQRT2-1)*r;return Tt(e+n,t),Ft(e+n,t-s,e+i,t-r,e,t-r),Ft(e-i,t-r,e-n,t-s,e-n,t),Ft(e-n,t+s,e-i,t+r,e,t+r),Ft(e+i,t+r,e+n,t+s,e+n,t),Ct(a),this},p.__private__.circle=p.circle=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||!At(r))throw new Error("Invalid arguments passed to jsPDF.circle");return this.ellipse(e,t,n,n,r)},p.setFont=function(e,t,n){return n&&(t=A(t,n)),he=ct(e,t,{disableWarning:!1}),this};var Mt=p.__private__.getFont=p.getFont=function(){return ve[ct.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var e,t,n={};for(e in be)if(be.hasOwnProperty(e))for(t in n[e]=[],be[e])be[e].hasOwnProperty(t)&&n[e].push(t);return n},p.addFont=function(e,t,n,r,a){var i=["StandardEncoding","MacRomanEncoding","Identity-H","WinAnsiEncoding"];return arguments[3]&&-1!==i.indexOf(arguments[3])?a=arguments[3]:arguments[3]&&-1==i.indexOf(arguments[3])&&(n=A(n,r)),nt.call(this,e,t,n,a=a||"Identity-H")};var Ot,Dt=e.lineWidth||.200025,It=p.__private__.getLineWidth=p.getLineWidth=function(){return Dt},zt=p.__private__.setLineWidth=p.setLineWidth=function(e){return Dt=e,J(j(L(e))+" w"),this};p.__private__.setLineDash=Ja.API.setLineDash=Ja.API.setLineDashPattern=function(e,t){if(e=e||[],t=t||0,isNaN(t)||!Array.isArray(e))throw new Error("Invalid arguments passed to
2jsPDF.setLineDash");return e=e.map(function(e){return j(L(e))}).join(" "),t=j(L(t)),J("["+e+"] "+t+" d"),this};var Bt=p.__private__.getLineHeight=p.getLineHeight=function(){return ne*Ot};p.__private__.getLineHeight=p.getLineHeight=function(){return ne*Ot};var qt=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(e){return"number"==typeof(e=e||1.15)&&(Ot=e),this},Ut=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return Ot};qt(e.lineHeight);var Vt=p.__private__.getHorizontalCoordinate=function(e){return L(e)},Ht=p.__private__.getVerticalCoordinate=function(e){return w===x?e:_e[B].mediaBox.topRightY-_e[B].mediaBox.bottomLeftY-L(e)},Wt=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(e){return j(Vt(e))},Gt=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(e){return j(Ht(e))},$t=e.strokeColor||"0 G";p.__private__.getStrokeColor=p.getDrawColor=function(){return Ve($t)},p.__private__.setStrokeColor=p.setDrawColor=function(e,t,n,r){return $t=He({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"draw",precision:2}),J($t),this};var Yt=e.fillColor||"0 g";p.__private__.getFillColor=p.getFillColor=function(){return Ve(Yt)},p.__private__.setFillColor=p.setFillColor=function(e,t,n,r){return Yt=He({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"fill",precision:2}),J(Yt),this};var Kt=e.textColor||"0 g",Xt=p.__private__.getTextColor=p.getTextColor=function(){return Ve(Kt)};p.__private__.setTextColor=p.setTextColor=function(e,t,n,r){return Kt=He({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:"text",precision:3}),this};var Zt=e.charSpace,Jt=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(Zt||0)};p.__private__.setCharSpace=p.setCharSpace=function(e){if(isNaN(e))throw new Error("Invalid argument passed to jsPDF.setCharSpace");return Zt=e,this};var Qt=0;p.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},p.__private__.setLineCap=p.setLineCap=function(e){var t=p.CapJoinStyles[e];if(void 0===t)throw new Error("Line cap style of '"+e+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return Qt=t,J(t+" J"),this};var en=0;p.__private__.setLineJoin=p.setLineJoin=function(e){var t=p.CapJoinStyles[e];if(void 0===t)throw new Error("Line join style of '"+e+"' is not recognized. See or extend .CapJoinStyles property for valid styles");return en=t,J(t+" j"),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(e){if(e=e||0,isNaN(e))throw new Error("Invalid argument passed to jsPDF.setLineMiterLimit");return J(j(L(e))+" M"),this},p.GState=Ya,p.setGState=function(e){(e="string"==typeof e?ke[Ne[e]]:tn(null,e)).equals(Ae)||(J("/"+e.id+" gs"),Ae=e)};var tn=function(e,t){if(!e||!Ne[e]){var n=!1;for(var r in ke)if(ke.hasOwnProperty(r)&&ke[r].equals(t)){n=!0;break}if(n)t=ke[r];else{var a="GS"+(Object.keys(ke).length+1).toString(10);ke[a]=t,t.id=a}return e&&(Ne[e]=t.id),Se.publish("addGState",t),t}};p.addGState=function(e,t){return tn(e,t),this},p.saveGraphicsState=function(){return J("q"),ye.push({key:he,size:ne,color:Kt}),this},p.restoreGraphicsState=function(){J("Q");var e=ye.pop();return he=e.key,ne=e.size,Kt=e.color,Ae=null,this},p.setCurrentTransformationMatrix=function(e){return J(e.toString()+" cm"),this},p.comment=function(e){return J("#"+e),this};var nn=function(e,t){var n=e||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return n},set:function(e){isNaN(e)||(n=parseFloat(e))}});var r=t||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return r},set:function(e){isNaN(e)||(r=parseFloat(e))}});var a="pt";return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return a}
vendor: 46,017 bytes, line 2
2,set:function(e){a=e.toString()}}),this},rn=function(e,t,n,r){nn.call(this,e,t),this.type="rect";var a=n||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return a},set:function(e){isNaN(e)||(a=parseFloat(e))}});var i=r||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return i},set:function(e){isNaN(e)||(i=parseFloat(e))}}),this},an=function(){this.page=je,this.currentPage=B,this.pages=Y.slice(0),this.pagesContext=_e.slice(0),this.x=pe,this.y=me,this.matrix=ge,this.width=ln(B),this.height=un(B),this.outputDestination=X,this.id="",this.objectNumber=-1};an.prototype.restore=function(){je=this.page,B=this.currentPage,_e=this.pagesContext,Y=this.pages,pe=this.x,me=this.y,ge=this.matrix,cn(B,this.width),dn(B,this.height),X=this.outputDestination};var sn=function(e,t,n,r,a){Pe.push(new an),je=B=0,Y=[],pe=e,me=t,ge=a,at([n,r])};for(var on in p.beginFormObject=function(e,t,n,r,a){return sn(e,t,n,r,a),this},p.endFormObject=function(e){return function(e){if(Le[e])Pe.pop().restore();else{var t=new an,n="Xo"+(Object.keys(Ee).length+1).toString(10);t.id=n,Le[e]=n,Ee[n]=t,Se.publish("addFormObject",t),Pe.pop().restore()}}(e),this},p.doFormObject=function(e,t){var n=Ee[Le[e]];return J("q"),J(t.toString()+" cm"),J("/"+n.id+" Do"),J("Q"),this},p.getFormObject=function(e){var t=Ee[Le[e]];return{x:t.x,y:t.y,width:t.width,height:t.height,matrix:t.matrix}},p.save=function(e,t){return e=e||"generated.pdf",(t=t||{}).returnPromise=t.returnPromise||!1,!1===t.returnPromise?(ja(gt(mt()),e),"function"==typeof ja.unload&&ya.setTimeout&&setTimeout(ja.unload,911),this):new Promise(function(t,n){try{var r=ja(gt(mt()),e);"function"==typeof ja.unload&&ya.setTimeout&&setTimeout(ja.unload,911),t(r)}catch(a){n(a.message)}})},Ja.API)Ja.API.hasOwnProperty(on)&&("events"===on&&Ja.API.events.length?function(e,t){var n,r,a;for(a=t.length-1;-1!==a;a--)n=t[a][0],r=t[a][1],e.subscribe.apply(e,[n].concat("function"==typeof r?[r]:r))}(Se,Ja.API.events):p[on]=Ja.API[on]);function ln(e){return _e[e].mediaBox.topRightX-_e[e].mediaBox.bottomLeftX}function cn(e,t){_e[e].mediaBox.topRightX=t+_e[e].mediaBox.bottomLeftX}function un(e){return _e[e].mediaBox.topRightY-_e[e].mediaBox.bottomLeftY}function dn(e,t){_e[e].mediaBox.topRightY=t+_e[e].mediaBox.bottomLeftY}var hn=p.getPageWidth=function(e){return ln(e=e||B)/fe},fn=p.setPageWidth=function(e,t){cn(e,t*fe)},pn=p.getPageHeight=function(e){return un(e=e||B)/fe},mn=p.setPageHeight=function(e,t){dn(e,t*fe)};return p.internal={pdfEscape:rt,getStyle:jt,getFont:Mt,getFontSize:ae,getCharSpace:Jt,getTextColor:Xt,getLineHeight:Bt,getLineHeightFactor:Ut,getLineWidth:It,write:Q,getHorizontalCoordinate:Vt,getVerticalCoordinate:Ht,getCoordinateString:Wt,getVerticalCoordinateString:Gt,collections:{},newObject:De,newAdditionalObject:Be,newObjectDeferred:Ie,newObjectDeferredBegin:ze,getFilters:We,putStream:Ge,events:Se,scaleFactor:fe,pageSize:{getWidth:function(){return hn(B)},setWidth:function(e){fn(B,e)},getHeight:function(){return pn(B)},setHeight:function(e){mn(B,e)}},encryptionOptions:d,encryption:yt,getEncryptor:function(e){return null!==d?yt.encryptor(e,0):function(e){return e}},output:vt,getNumberOfPages:lt,get pages(){return Y},out:J,f2:C,f3:E,getPageInfo:xt,getPageInfoByObjId:wt,getCurrentPageInfo:kt,getPDFVersion:g,Point:nn,Rectangle:rn,Matrix:Te,hasHotfix:bt},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return hn(B)},set:function(e){fn(B,e)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return pn(B)},set:function(e){mn(B,e)},enumerable:!0,configurable:!0}),function(e){for(var t=0,n=te.length;t<n;t++){var r=nt.call(this,e[t][0],e[t][1],e[t][2],te[t][3],!0);!1===h&&(f[r]=!0);var a=e[t][0].split("-");tt({id:r,fontName:a[0],fontStyle:a[1]||""})}Se.publish("addFonts",{fonts:ve,dictionary:be})}.call(p,te),he="F1",it(i,n),Se.publish("initialized"),p}Wa.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},Wa.prototype.toHexString=function(e){return e.split("").map(function(e){return("0"+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join("")},Wa.prototype.hexToBytes=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(String.fromCharCode(parseInt(e.substr(n,2),16)));return t.join("")},Wa.prototype.processOwnerPassword=function(e,t){return Va(Ba(t).substr(0,5),e)},Wa.prototype.encryptor=function(e,t){var n=Ba(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(e){return Va(n,e)}},Ya.prototype.equals=function(e){var t,n="id,objectNumber,equals";if(!e||r(e)!==r(this))return!1;var a=0;for(t in this)if(!(n.indexOf(t)>=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t))return!1;if(this[t]!==e[t])return!1;a++}for(t in e)e.hasOwnProperty(t)&&n.indexOf(t)<0&&a--;return 0===a},Ja.API={events:[]},Ja.version="4.2.0";var Qa=Ja.API,ei=1,ti=function(e){return e.replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},ni=function(e){return e.replace(/\\\\/g,"\\").replace(/\\\(/g,"(").replace(/\\\)/g,")")},ri=function(e){return e.toString().replace(/#/g,"#23").replace(/[\s\n\r()<>[\]{}\/%]/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return"#"+(1===t.length?"0"+t:t)})},ai=function(e){return e.toFixed(2)},ii=function(e){return e.toFixed(5)};Qa.__acroform__={};var si=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},oi=function(e){return e*ei},li=function(e){var t=new Ai,n=Ii.internal.getHeight(e)||0,r=Ii.internal.getWidth(e)||0;return t.BBox=[0,0,Number(ai(r)),Number(ai(n))],t},ci=Qa.__acroform__.setBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBit");return e|1<<t},ui=Qa.__acroform__.clearBit=function(e,t){if(e=e||0,t=t||0,isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBit");return e&~(1<<t)},di=Qa.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBit");return e&1<<t?1:0},hi=Qa.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf");return di(e,t-1)},fi=Qa.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf");return ci(e,t-1)},pi=Qa.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw new Error("Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf");return ui(e,t-1)},mi=Qa.__acroform__.calculateCoordinates=function(e,t){var n=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,a=e[0],i=e[1],s=e[2],o=e[3],l={};return l.lowerLeft_X=n(a)||0,l.lowerLeft_Y=r(i+o)||0,l.upperRight_X=n(a+s)||0,l.upperRight_Y=r(i)||0,[Number(ai(l.lowerLeft_X)),Number(ai(l.lowerLeft_Y)),Number(ai(l.upperRight_X)),Number(ai(l.upperRight_Y))]},gi=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],n=e._V||e.DV,r=vi(e,n),a=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push("/Tx BMC"),t.push("q"),t.push("BT"),t.push(e.scope.__private__.encodeColorString(e.color)),t.push("/"+a+" "+ai(r.fontSize)+" Tf"),t.push("1 0 0 1 0 0 Tm"),t.push(r.text),t.push("ET"),t.push("Q"),t.push("EMC");var i=li(e);return i.scope=e.scope,i.stream=t.join("\n"),i}},vi=function(e,t){var n=0===e.fontSize?e.maxFontSize:e.fontSize,r={text:"",fontSize:""},a=(t=")"==(t="("==t.substr(0,1)?t.substr(1):t).substr(t.length-1)?t.substr(0,t.length-1):t).split(" ");a=e.multiline?a.map(function(e){return e.split("\n")}):a.map(function(e){return[e]});var i=n,s=Ii.internal.getHeight(e)||0;s=s<0?-s:s;var o=Ii.internal.getWidth(e)||0;o=o<0?-o:o;var l=function(t,n,r){if(t+1<a.length){var i=n+" "+a[t+1][0];return bi(i,e,r).width<=o-4}return!1};i++;e:for(;i>0;){t="",i--;var c,u,d=bi("3",e,i).height,h=e.multiline?s-i:(s-d)/2,f=h+=2,p=0,m=0,g=0;if(i<=0){t="(...) Tj\n",t+="% Width of Text: "+bi(t,e,i=12).width+", FieldWidth:"+o+"\n";break}for(var v="",b=0,y=0;y<a.length;y++)if(a.hasOwnProperty(y)){var x=!1;if(1!==a[y].length&&g!==a[y].length-1){if((d+2)*(b+2)+2>s)continue e;v+=a[y][g],x=!0,m=y,y--}else{v=" "==(v+=a[y][g]+" ").substr(v.length-1)?v.substr(0,v.length-1):v;var w=parseInt(y),k=l(w,v,i),N=y>=a.length-1;if(k&&!N){v+=" ",g=0;continue}if(k||N){if(N)m=w;else if(e.multiline&&(d+2)*(b+2)+2>s)continue e}else{if(!e.multiline)continue e;if((d+2)*(b+2)+2>s)continue e;m=w}}for(var A="",j=p;j<=m;j++){var _=a[j];if(e.multiline){if(j===m){A+=_[g]+" ",g=(g+1)%_.length;continue}if(j===p){A+=_[_.length-1]+" ";continue}}A+=_[0]+" "}switch(A=" "==A.substr(A.length-1)?A.substr(0,A.length-1):A,u=bi(A,e,i).width,e.textAlign){case"right":c=o-u-2;break;case"center":c=(o-u)/2;break;default:c=2}t+=ai(c)+" "+ai(f)+" Td\n",t+="("+ti(A)+") Tj\n",t+=-ai(c)+" 0 Td\n",f=-(i+2),u=0,p=x?m:m+1,b++,v=""}break}return r.text=t,r.fontSize=i,r},bi=function(e,t,n){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),a=t.scope.getStringUnitWidth(e,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:t.scope.getStringUnitWidth("3",{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:a}},yi={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},xi=function(e,t){var n={type:"reference",object:e};void 0===t.internal.getPageInfo(e.page).pageContext.annotations.find(function(e){return e.type===n.type&&e.object===n.object})&&t.internal.getPageInfo(e.page).pageContext.annotations.push(n)},wi=Qa.__acroform__.arrayToPdfArray=function(e,t,n){var a=function(e){return e};if(Array.isArray(e)){for(var i="[",s=0;s<e.length;s++)switch(0!==s&&(i+=" "),r(e[s])){case"boolean":case"number":case"object":i+=e[s].toString();break;case"string":"/"===e[s].substr(0,1)?i+="/"+ri(e[s].substr(1)):(void 0!==t&&n&&(a=n.internal.getEncryptor(t)),i+="("+ti(a(e[s].toString()))+")")}return i+"]"}throw new Error("Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray")},ki=function(e,t,n){var r=function(e){return e};return void 0!==t&&n&&(r=n.internal.getEncryptor(t)),(e=e||"").toString(),"("+ti(r(e))+")"},Ni=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(void 0===this._objId){if(void 0===this.scope)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};Ni.prototype.toString=function(){return this.objId+" 0 R"},Ni.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out("endobj")},Ni.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(e){return"content"!=e&&"appearanceStreamContent"!=e&&"scope"!=e&&"objId"!=e&&"_"!=e.substring(0,1)});for(var n in t)if(!1===Object.getOwnPropertyDescriptor(this,t[n]).configurable){var r=t[n],a=this[r];a&&(Array.isArray(a)?e.push({key:r,value:wi(a,this.objId,this.scope)}):a instanceof Ni?(a.scope=this.scope,e.push({key:r,value:a.objId+" 0 R"})):"function"!=typeof a&&e.push({key:r,value:a}))}return e};var Ai=function(){Ni.call(this),Object.defineProperty(this,"Type",{value:"/XObject",configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:"/Form",configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:"2 0 R",configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};si(Ai,Ni);var ji=function(){Ni.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+ti(t(e))+")"}},set:function(t){e=t}})};si(ji,Ni);var _i=function e(){Ni.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute F supplied.');t=e}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(t,3))},set:function(e){!0===Boolean(e)?this.F=fi(t,3):this.F=pi(t,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){if(isNaN(e))throw new Error('Invalid value "'+e+'" for attribute Ff supplied.');n=e}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(0!==r.length)return r},set:function(e){r=void 0!==e?e:[]}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(e){r[0]=e}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(e){r[1]=e}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(e){r[2]=e}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(e){r[3]=e}});var a="";Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return a},set:function(e){switch(e){case"/Btn":case"/Tx":case"/Ch":case"/Sig":a=e;break;default:throw new Error('Invalid value "'+e+'" for attribute FT supplied.')}}});var i=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!i||i.length<1){if(this instanceof Fi)return;i="FieldObject"+e.FieldNum++}var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),"("+ti(t(i))+")"},set:function(e){i=e.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return i},set:function(e){i=e}});var s="helvetica";Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return s},set:function(e){s=e}});var o="normal";Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return o},set:function(e){o=e}});var l=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return l},set:function(e){l=e}});var c=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return void 0===c?50/ei:c},set:function(e){c=e}});var u="black";Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(e){u=e}});var d="/F1 0 Tf 0 g";Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!d||this instanceof Fi||this instanceof Oi))return ki(d,this.objId,this.scope)},set:function(e){e=e.toString(),d=e}});var h=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(h)return this instanceof Pi==0?ki(h,this.objId,this.scope):h},set:function(e){e=e.toString(),h=this instanceof Pi==0?"("===e.substr(0,1)?ni(e.substr(1,e.length-2)):ni(e):e}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof Pi==1?ni(h.substr(1,h.length-1)):h},set:function(e){e=e.toString(),h=this instanceof Pi==1?"/"+ri(e):e}});var f=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(f)return f},set:function(e){this.V=e}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof Pi==0?ki(f,this.objId,this.scope):f},set:function(e){e=e.toString(),f=this instanceof Pi==0?"("===e.substr(0,1)?ni(e.substr(1,e.length-2)):ni(e):e}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof Pi==1?ni(f.substr(1,f.length-1)):f},set:function(e){e=e.toString(),f=this instanceof Pi==1?"/"+ri(e):e}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Annot":null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?"/Widget":null}});var p,m=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return m},set:function(e){e=Boolean(e),m=e}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(p)return p},set:function(e){p=e}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,1))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,1):this.Ff=pi(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,2))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,2):this.Ff=pi(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,3))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,3):this.Ff=pi(this.Ff,3)}});var g=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(null!==g)return g},set:function(e){if(-1===[0,1,2].indexOf(e))throw new Error('Invalid value "'+e+'" for attribute Q supplied.');g=e}}),Object.defineProperty(this,"textAlign",{get:function(){var e;switch(g){case 0:default:e="left";break;case 1:e="center";break;case 2:e="right"}return e},configurable:!0,enumerable:!0,set:function(e){switch(e){case"right":case 2:g=2;break;case"center":case 1:g=1;break;default:g=0}}})};si(_i,Ni);var Si=function(){_i.call(this),this.FT="/Ch",this.V="()",this.fontName="zapfdingbats";var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return wi(t,this.objId,this.scope)},set:function(e){var n,r;r=[],"string"==typeof(n=e)&&(r=function(e,t,n){n||(n=1);for(var r,a=[];r=t.exec(e);)a.push(r[n]);return a}(n,/\((.*?)\)/g)),t=r}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e=e||"").toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,n){for(n=n||!1,e=(e=e||"").toString();-1!==t.indexOf(e)&&(t.splice(t.indexOf(e),1),!1!==n););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,18))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,18):this.Ff=pi(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,19))},set:function(e){!0===this.combo&&(!0===Boolean(e)?this.Ff=fi(this.Ff,19):this.Ff=pi(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,20))},set:function(e){!0===Boolean(e)?(this.Ff=fi(this.Ff,20),t.sort()):this.Ff=pi(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,22))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,22):this.Ff=pi(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,23))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,23):this.Ff=pi(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,27))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,27):this.Ff=pi(this.Ff,27)}}),this.hasAppearanceStream=!1};si(Si,_i);var Ci=function(){Si.call(this),this.fontName="helvetica",this.combo=!1};si(Ci,Si);var Ei=function(){Ci.call(this),this.combo=!0};si(Ei,Ci);var Li=function(){Ei.call(this),this.edit=!0};si(Li,Ei);var Pi=function(){_i.call(this),this.FT="/Btn",Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,15))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,15):this.Ff=pi(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,16))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,16):this.Ff=pi(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,17))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,17):this.Ff=pi(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,26))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,26):this.Ff=pi(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),0!==Object.keys(t).length){var n,r=[];for(n in r.push("<<"),t)r.push("/"+n+" ("+ti(e(t[n]))+")");return r.push(">>"),r.join("\n")}},set:function(e){"object"===r(e)&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||""},set:function(e){"string"==typeof e&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){var n=null==t?"":t.toString();"/"===n.substr(0,1)&&(n=n.substr(1)),e="/"+ri(n)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e="/"+ri(t)}})};si(Pi,_i);var Ti=function(){Pi.call(this),this.pushButton=!0};si(Ti,Pi);var Ri=function(){Pi.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=void 0!==t?t:[]}})};si(Ri,Pi);var Fi=function(){var e,t;_i.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(e){t=e}});var n,a={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};this.scope&&(e=this.scope.internal.getEncryptor(this.objId));var t,n=[];for(t in n.push("<<"),a)n.push("/"+t+" ("+ti(e(a[t]))+")");return n.push(">>"),n.join("\n")},set:function(e){"object"===r(e)&&(a=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return a.CA||""},set:function(e){"string"==typeof e&&(a.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){var t=null==e?"":e.toString();"/"===t.substr(0,1)&&(t=t.substr(1)),n="/"+ri(t)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){var t=null==e?"":e.toString();"/"===t.substr(0,1)&&(t=t.substr(1)),n="/"+ri(t)}}),this.caption="l",this.appearanceState="Off",this._AppearanceType=Ii.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};si(Fi,_i),Ri.prototype.setAppearance=function(e){if(!("createAppearanceStream"in e)||!("getCA"in e))throw new Error("Couldn't assign Appearance to RadioButton. Appearance was Invalid!");for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},Ri.prototype.createOption=function(e){var t=new Fi;return t.Parent=this,t.optionName=e,this.Kids.push(t),zi.call(this.scope,t),t};var Mi=function(){Pi.call(this),this.fontName="zapfdingbats",this.caption="3",this.appearanceState="On",this.value="On",this.textAlign="center",this.appearanceStreamContent=Ii.CheckBox.createAppearanceStream()};si(Mi,Pi);var Oi=function(){_i.call(this),this.FT="/Tx",Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,13))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,13):this.Ff=pi(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,21))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,21):this.Ff=pi(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,23))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,23):this.Ff=pi(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,24))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,24):this.Ff=pi(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,25))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,25):this.Ff=pi(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,26))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,26):this.Ff=pi(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};si(Oi,_i);var Di=function(){Oi.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return Boolean(hi(this.Ff,14))},set:function(e){!0===Boolean(e)?this.Ff=fi(this.Ff,14):this.Ff=pi(this.Ff,14)}}),this.password=!0};si(Di,Oi);var Ii={CheckBox:{createAppearanceStream:function(){return{N:{On:Ii.CheckBox.YesNormal},D:{On:Ii.CheckBox.YesPushDown,Off:Ii.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=li(e);t.scope=e.scope;var n=[],r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,a=e.scope.__private__.encodeColorString(e.color),i=vi(e,e.caption);return n.push("0.749023 g"),n.push("0 0 "+ai(Ii.internal.getWidth(e))+" "+ai(Ii.internal.getHeight(e))+" re"),n.push("f"),n.push("BMC"),n.push("q"),n.push("0 0 1 rg"),n.push("/"+r+" "+ai(i.fontSize)+" Tf "+a),n.push("BT"),n.push(i.text),n.push("ET"),n.push("Q"),n.push("EMC"),t.stream=n.join("\n"),t},YesNormal:function(e){var t=li(e);t.scope=e.scope;var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color),a=[],i=Ii.internal.getHeight(e),s=Ii.internal.getWidth(e),o=vi(e,e.caption);return a.push("1 g"),a.push("0 0 "+ai(s)+" "+ai(i)+" re"),a.push("f"),a.push("q"),a.push("0 0 1 rg"),a.push("0 0 "+ai(s-1)+" "+ai(i-1)+" re"),a.push("W"),a.push("n"),a.push("0 g"),a.push("BT"),a.push("/"+n+" "+ai(o.fontSize)+" Tf "+r),a.push(o.text),a.push("ET"),a.push("Q"),t.stream=a.join("\n"),t},OffPushDown:function(e){var t=li(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+ai(Ii.internal.getWidth(e))+" "+ai(Ii.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:Ii.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=Ii.RadioButton.Circle.YesNormal,t.D[e]=Ii.RadioButton.Circle.YesPushDown,t},getCA:function(){return"l"},YesNormal:function(e){var t=li(e);t.scope=e.scope;var n=[],r=Ii.internal.getWidth(e)<=Ii.internal.getHeight(e)?Ii.internal.getWidth(e)/4:Ii.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var a=Ii.internal.Bezier_C,i=Number((r*a).toFixed(5));return n.push("q"),n.push("1 0 0 1 "+ii(Ii.internal.getWidth(e)/2)+" "+ii(Ii.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+i+" "+i+" "+r+" 0 "+r+" c"),n.push("-"+i+" "+r+" -"+r+" "+i+" -"+r+" 0 c"),n.push("-"+r+" -"+i+" -"+i+" -"+r+" 0 -"+r+" c"),n.push(i+" -"+r+" "+r+" -"+i+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=li(e);t.scope=e.scope;var n=[],r=Ii.internal.getWidth(e)<=Ii.internal.getHeight(e)?Ii.internal.getWidth(e)/4:Ii.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var a=Number((2*r).toFixed(5)),i=Number((a*Ii.internal.Bezier_C).toFixed(5)),s=Number((r*Ii.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+ii(Ii.internal.getWidth(e)/2)+" "+ii(Ii.internal.getHeight(e)/2)+" cm"),n.push(a+" 0 m"),n.push(a+" "+i+" "+i+" "+a+" 0 "+a+" c"),n.push("-"+i+" "+a+" -"+a+" "+i+" -"+a+" 0 c"),n.push("-"+a+" -"+i+" -"+i+" -"+a+" 0 -"+a+" c"),n.push(i+" -"+a+" "+a+" -"+i+" "+a+" 0 c"),n.push("f"),n.push("Q"),n.push("0 g"),n.push("q"),n.push("1 0 0 1 "+ii(Ii.internal.getWidth(e)/2)+" "+ii(Ii.internal.getHeight(e)/2)+" cm"),n.push(r+" 0 m"),n.push(r+" "+s+" "+s+" "+r+" 0 "+r+" c"),n.push("-"+s+" "+r+" -"+r+" "+s+" -"+r+" 0 c"),n.push("-"+r+" -"+s+" -"+s+" -"+r+" 0 -"+r+" c"),n.push(s+" -"+r+" "+r+" -"+s+" "+r+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t},OffPushDown:function(e){var t=li(e);t.scope=e.scope;var n=[],r=Ii.internal.getWidth(e)<=Ii.internal.getHeight(e)?Ii.internal.getWidth(e)/4:Ii.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var a=Number((2*r).toFixed(5)),i=Number((a*Ii.internal.Bezier_C).toFixed(5));return n.push("0.749023 g"),n.push("q"),n.push("1 0 0 1 "+ii(Ii.internal.getWidth(e)/2)+" "+ii(Ii.internal.getHeight(e)/2)+" cm"),n.push(a+" 0 m"),n.push(a+" "+i+" "+i+" "+a+" 0 "+a+" c"),n.push("-"+i+" "+a+" -"+a+" "+i+" -"+a+" 0 c"),n.push("-"+a+" -"+i+" -"+i+" -"+a+" 0 -"+a+" c"),n.push(i+" -"+a+" "+a+" -"+i+" "+a+" 0 c"),n.push("f"),n.push("Q"),t.stream=n.join("\n"),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:Ii.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=Ii.RadioButton.Cross.YesNormal,t.D[e]=Ii.RadioButton.Cross.YesPushDown,t},getCA:function(){return"8"},YesNormal:function(e){var t=li(e);t.scope=e.scope;var n=[],r=Ii.internal.calculateCross(e);return n.push("q"),n.push("1 1 "+ai(Ii.internal.getWidth(e)-2)+" "+ai(Ii.internal.getHeight(e)-2)+" re"),n.push("W"),n.push("n"),n.push(ai(r.x1.x)+" "+ai(r.x1.y)+" m"),n.push(ai(r.x2.x)+" "+ai(r.x2.y)+" l"),n.push(ai(r.x4.x)+" "+ai(r.x4.y)+" m"),n.push(ai(r.x3.x)+" "+ai(r.x3.y)+" l"),n.push("s"),n.push("Q"),t.stream=n.join("\n"),t},YesPushDown:function(e){var t=li(e);t.scope=e.scope;var n=Ii.internal.calculateCross(e),r=[];return r.push("0.749023 g"),r.push("0 0 "+ai(Ii.internal.getWidth(e))+" "+ai(Ii.internal.getHeight(e))+" re"),r.push("f"),r.push("q"),r.push("1 1 "+ai(Ii.internal.getWidth(e)-2)+" "+ai(Ii.internal.getHeight(e)-2)+" re"),r.push("W"),r.push("n"),r.push(ai(n.x1.x)+" "+ai(n.x1.y)+" m"),r.push(ai(n.x2.x)+" "+ai(n.x2.y)+" l"),r.push(ai(n.x4.x)+" "+ai(n.x4.y)+" m"),r.push(ai(n.x3.x)+" "+ai(n.x3.y)+" l"),r.push("s"),r.push("Q"),t.stream=r.join("\n"),t},OffPushDown:function(e){var t=li(e);t.scope=e.scope;var n=[];return n.push("0.749023 g"),n.push("0 0 "+ai(Ii.internal.getWidth(e))+" "+ai(Ii.internal.getHeight(e))+" re"),n.push("f"),t.stream=n.join("\n"),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return"/"+t+" "+e.fontSize+" Tf "+n}};Ii.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=Ii.internal.getWidth(e),n=Ii.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},Ii.internal.getWidth=function(e){var t=0;return"object"===r(e)&&(t=oi(e.Rect[2])),t},Ii.internal.getHeight=function(e){var t=0;return"object"===r(e)&&(t=oi(e.Rect[3])),t};var zi=Qa.addField=function(e){if(function(e,t){if(t.scope=e,void 0!==e.internal&&(void 0===e.internal.acroformPlugin||!1===e.internal.acroformPlugin.isInitialized)){if(_i.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(yi)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("Exception while creating AcroformDictionary");ei=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new ji,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe("postPutResources",function(){!function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0}(e)}),e.internal.events.subscribe("buildDocument",function(){!function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];r.objId=void 0,r.hasAnnotation&&xi(r,e)}}(e)}),e.internal.events.subscribe("putCatalog",function(){!function(e){if(void 0===e.internal.acroformPlugin.acroFormDictionaryRoot)throw new Error("putCatalogCallback: Root missing.");e.internal.write("/AcroForm "+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+" 0 R")}(e)}),e.internal.events.subscribe("postPutPages",function(t){!function(e,t){var n=!e;for(var a in e||(t.internal.newObjectDeferredBegin(t.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),t.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),e=e||t.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(e.hasOwnProperty(a)){var i=e[a],s=[],o=i.Rect;if(i.Rect&&(i.Rect=mi(i.Rect,t)),t.internal.newObjectDeferredBegin(i.objId,!0),i.DA=Ii.createDefaultAppearanceStream(i),"object"===r(i)&&"function"==typeof i.getKeyValueListForStream&&(s=i.getKeyValueListForStream()),i.Rect=o,i.hasAppearanceStream&&!i.appearanceStreamContent){var l=gi(i);s.push({key:"AP",value:"<</N "+l+">>"}),t.internal.acroformPlugin.xForms.push(l)}if(i.appearanceStreamContent){var c="";for(var u in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(u)){var d=i.appearanceStreamContent[u];if(c+="/"+u+" ",c+="<<",Object.keys(d).length>=1||Array.isArray(d)){for(var a in d)if(d.hasOwnProperty(a)){var h=d[a];"function"==typeof h&&(h=h.call(t,i)),c+="/"+a+" "+h+" ",t.internal.acroformPlugin.xForms.indexOf(h)>=0||t.internal.acroformPlugin.xForms.push(h)}}else"function"==typeof(h=d)&&(h=h.call(t,i)),c+="/"+a+" "+h,t.internal.acroformPlugin.xForms.indexOf(h)>=0||t.internal.acroformPlugin.xForms.push(h);c+=">>"}s.push({key:"AP",value:"<<\n"+c+">>"})}t.internal.putStream({additionalKeyValues:s,objectId:i.objId}),t.internal.out("endobj")}n&&function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var a=n,i=e[n];t.internal.newObjectDeferredBegin(i.objId,!0),"object"===r(i)&&"function"==typeof i.putStream&&i.putStream(),delete e[a]}}(t.internal.acroformPlugin.xForms,t)}(t,e)}),e.internal.acroformPlugin.isInitialized=!0}}(this,e),!(e instanceof _i))throw new Error("Invalid argument passed to jsPDF.addField.");var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};Qa.AcroFormChoiceField=Si,Qa.AcroFormListBox=Ci,Qa.AcroFormComboBox=Ei,Qa.AcroFormEditBox=Li,Qa.AcroFormButton=Pi,Qa.AcroFormPushButton=Ti,Qa.AcroFormRadioButton=Ri,Qa.AcroFormCheckBox=Mi,Qa.AcroFormTextField=Oi,Qa.AcroFormPasswordField=Di,Qa.AcroFormAppearance=Ii,Qa.AcroForm={ChoiceField:Si,ListBox:Ci,ComboBox:Ei,EditBox:Li,Button:Pi,PushButton:Ti,RadioButton:Ri,CheckBox:Mi,TextField:Oi,PasswordField:Di,Appearance:Ii},Ja.AcroForm={ChoiceField:Si,ListBox:Ci,ComboBox:Ei,EditBox:Li,Button:Pi,PushButton:Ti,RadioButton:Ri,CheckBox:Mi,TextField:Oi,PasswordField:Di,Appearance:Ii};Ja.AcroForm;function Bi(e){return e.reduce(function(e,t,n){return e[t]=n,e},{})}!function(e){var t="addImage_";e.__addimage__={};var n="UNKNOWN",a={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},i=e.__addimage__.getImageFileTypeByImageData=function(e,t){var r,i,s,o,l,c=n;if("RGBA"===(t=t||n)||void 0!==e.data&&e.data instanceof Uint8ClampedArray&&"height"in e&&"width"in e)return"RGBA";if(N(e))for(l in a)for(s=a[l],r=0;r<s.length;r+=1){for(o=!0,i=0;i<s[r].length;i+=1)if(void 0!==s[r][i]&&s[r][i]!==e[i]){o=!1;break}if(!0===o){c=l;break}}else for(l in a)for(s=a[l],r=0;r<s.length;r+=1){for(o=!0,i=0;i<s[r].length;i+=1)if(void 0!==s[r][i]&&s[r][i]!==e.charCodeAt(i)){o=!1;break}if(!0===o){c=l;break}}return c===n&&t!==n&&(c=t),c},s=function e(t){for(var n=this.internal.write,r=this.internal.putStream,a=(0,this.internal.getFilters)();-1!==a.indexOf("FlateEncode");)a.splice(a.indexOf("FlateEncode"),1);t.objectId=this.internal.newObject();var i=[];if(i.push({key:"Type",value:"/XObject"}),i.push({key:"Subtype",value:"/Image"}),i.push({key:"Width",value:t.width}),i.push({key:"Height",value:t.height}),t.colorSpace===b.INDEXED?i.push({key:"ColorSpace",value:"[/Indexed /DeviceRGB "+(t.palette.length/3-1)+" "+("sMask"in t&&void 0!==t.sMask?t.objectId+2:t.objectId+1)+" 0 R]"}):(i.push({key:"ColorSpace",value:"/"+t.colorSpace}),t.colorSpace===b.DEVICE_CMYK&&i.push({key:"Decode",value:"[1 0 1 0 1 0 1 0]"})),i.push({key:"BitsPerComponent",value:t.bitsPerComponent}),"decodeParameters"in t&&void 0!==t.decodeParameters&&i.push({key:"DecodeParms",value:"<<"+t.decodeParameters+">>"}),"transparency"in t&&Array.isArray(t.transparency)&&t.transparency.length>0){for(var s="",o=0,l=t.transparency.length;o<l;o++)s+=t.transparency[o]+" "+t.transparency[o]+" ";i.push({key:"Mask",value:"["+s+"]"})}void 0!==t.sMask&&i.push({key:"SMask",value:t.objectId+1+" 0 R"});var c=void 0!==t.filter?["/"+t.filter]:void 0;if(r({data:t.data,additionalKeyValues:i,alreadyAppliedFilters:c,objectId:t.objectId}),n("endobj"),"sMask"in t&&void 0!==t.sMask){var u,d=null!==(u=t.sMaskBitsPerComponent)&&void 0!==u?u:t.bitsPerComponent,h={width:t.width,height:t.height,colorSpace:"DeviceGray",bitsPerComponent:d,data:t.sMask};"filter"in t&&(h.decodeParameters="/Predictor ".concat(t.predictor," /Colors 1 /BitsPerComponent ").concat(d," /Columns ").concat(t.width),h.filter=t.filter),e.call(this,h)}if(t.colorSpace===b.INDEXED){var f=this.internal.newObject();r({data:j(new Uint8Array(t.palette)),objectId:f}),n("endobj")}},o=function(){var e=this.internal.collections[t+"images"];for(var n in e)s.call(this,e[n])},l=function(){var e,n=this.internal.collections[t+"images"],r=this.internal.write;for(var a in n)r("/I"+(e=n[a]).index,e.objectId,"0","R")},c=function(){this.internal.collections[t+"images"]||(this.internal.collections[t+"images"]={},this.internal.events.subscribe("putResources",o),this.internal.events.subscribe("putXobjectDict",l))},u=function(){var e=this.internal.collections[t+"images"];return c.call(this),e},d=function(){return Object.keys(this.internal.collections[t+"images"]).length},h=function(t){return"function"==typeof e["process"+t.toUpperCase()]},f=function(e){return"object"===r(e)&&1===e.nodeType},p=function(t,n){if("IMG"===t.nodeName&&t.hasAttribute("src")){var r=""+t.getAttribute("src");if(0===r.indexOf("data:image/"))return Sa(unescape(r).split("base64,").pop());var a=e.loadFile(r,!0);if(void 0!==a)return a}if("CANVAS"===t.nodeName){if(0===t.width||0===t.height)throw new Error("Given canvas must have data. Canvas width: "+t.width+", height: "+t.height);var i;switch(n){case"PNG":i="image/png";break;case"WEBP":i="image/webp";break;default:i="image/jpeg"}return Sa(t.toDataURL(i,1).split("base64,").pop())}},m=function(e){var n=this.internal.collections[t+"images"];if(n)for(var r in n)if(e===n[r].alias)return n[r]},g=function(e,t,n){return e||t||(e=-96,t=-96),e<0&&(e=-1*n.width*72/e/this.internal.scaleFactor),t<0&&(t=-1*n.height*72/t/this.internal.scaleFactor),0===e&&(e=t*n.width/n.height),0===t&&(t=e*n.height/n.width),[e,t]},v=function(e,t,n,r,a,i){var s=g.call(this,n,r,a),o=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,c=u.call(this);if(n=s[0],r=s[1],c[a.index]=a,i){i*=Math.PI/180;var d=Math.cos(i),h=Math.sin(i),f=function(e){return e.toFixed(4)},p=[f(d),f(h),f(-1*h),f(d),0,0,"cm"]}this.internal.write("q"),i?(this.internal.write([1,"0","0",1,o(e),l(t+r),"cm"].join(" ")),this.internal.write(p.join(" ")),this.internal.write([o(n),"0","0",o(r),"0","0","cm"].join(" "))):this.internal.write([o(n),"0","0",o(r),o(e),l(t+r),"cm"].join(" ")),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,"cm"].join(" ")),this.internal.write("/I"+a.index+" Do"),this.internal.write("Q")},b=e.color_spaces={DEVICE_RGB:"DeviceRGB",DEVICE_GRAY:"DeviceGray",DEVICE_CMYK:"DeviceCMYK",CAL_GREY:"CalGray",CAL_RGB:"CalRGB",LAB:"Lab",ICC_BASED:"ICCBased",INDEXED:"Indexed",PATTERN:"Pattern",SEPARATION:"Separation",DEVICE_N:"DeviceN"};e.decode={DCT_DECODE:"DCTDecode",FLATE_DECODE:"FlateDecode",LZW_DECODE:"LZWDecode",JPX_DECODE:"JPXDecode",JBIG2_DECODE:"JBIG2Decode",ASCII85_DECODE:"ASCII85Decode",ASCII_HEX_DECODE:"ASCIIHexDecode",RUN_LENGTH_DECODE:"RunLengthDecode",CCITT_FAX_DECODE:"CCITTFaxDecode"};var y=e.image_compression={NONE:"NONE",FAST:"FAST",MEDIUM:"MEDIUM",SLOW:"SLOW"},x=e.__addimage__.sHashCode=function(e){var t,n,r=0;if("string"==typeof e)for(n=e.length,t=0;t<n;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;else if(N(e))for(n=e.byteLength/2,t=0;t<n;t++)r=(r<<5)-r+e[t],r|=0;return r},w=e.__addimage__.validateStringAsBase64=function(e){(e=e||"").toString().trim();var t=!0;return 0===e.length&&(t=!1),e.length%4!=0&&(t=!1),!1===/^[A-Za-z0-9+/]+$/.test(e.substr(0,e.length-2))&&(t=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(e.substr(-2))&&(t=!1),t},k=e.__addimage__.extractImageFromDataUrl=function(e){if(null==e)return null;if(!(e=e.trim()).startsWith("data:"))return null;var t=e.indexOf(",");return t<0?null:e.substring(0,t).trim().endsWith("base64")?e.substring(t+1):null};e.__addimage__.isArrayBuffer=function(e){return e instanceof ArrayBuffer};var N=e.__addimage__.isArrayBufferView=function(e){return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array},A=e.__addimage__.binaryStringToUint8Array=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n},j=e.__addimage__.arrayBufferToBinaryString=function(e){for(var t="",n=N(e)?e:new Uint8Array(e),r=0;r<n.length;r+=8192)t+=String.fromCharCode.apply(null,n.subarray(r,r+8192));return t};e.addImage=function(){var e,t,a,i,s,o,l,u,d;if("number"==typeof arguments[1]?(t=n,a=arguments[1],i=arguments[2],s=arguments[3],o=arguments[4],l=arguments[5],u=arguments[6],d=arguments[7]):(t=arguments[1],a=arguments[2],i=arguments[3],s=arguments[4],o=arguments[5],l=arguments[6],u=arguments[7],d=arguments[8]),"object"===r(e=arguments[0])&&!f(e)&&"imageData"in e){var h=e;e=h.imageData,t=h.format||t||n,a=h.x||a||0,i=h.y||i||0,s=h.w||h.width||s,o=h.h||h.height||o,l=h.alias||l,u=h.compression||u,d=h.rotation||h.angle||d}var p=this.internal.getFilters();if(void 0===u&&-1!==p.indexOf("FlateEncode")&&(u="SLOW"),isNaN(a)||isNaN(i))throw new Error("Invalid coordinates passed to jsPDF.addImage");c.call(this);var m=_.call(this,e,t,l,u);return v.call(this,a,i,s,o,m,d),this};var _=function(t,r,a,s){var o,l,c;if("string"==typeof t&&i(t)===n){t=unescape(t);var u=S(t,!1);(""!==u||void 0!==(u=e.loadFile(t,!0)))&&(t=u)}if(f(t)&&(t=p(t,r)),r=i(t,r),!h(r))throw new Error("addImage does not support files of type '"+r+"', please ensure that a plugin for '"+r+"' support is added.");if((null==(c=a)||0===c.length)&&(a=function(e){return"string"==typeof e||N(e)?x(e):N(e.data)?x(e.data):null}(t)),(o=m.call(this,a))||(t instanceof Uint8Array||"RGBA"===r||(l=t,t=A(t)),o=this["process"+r.toUpperCase()](t,d.call(this),a,function(t){return t&&"string"==typeof t&&(t=t.toUpperCase()),t in e.image_compression?t:y.NONE}(s),l)),!o)throw new Error("An unknown error occurred whilst processing the image.");return o},S=e.__addimage__.convertBase64ToBinaryString=function(e,t){t="boolean"!=typeof t||t;var n,r="";if("string"==typeof e){var a;n=null!==(a=k(e))&&void 0!==a?a:e;try{r=Sa(n)}catch(i){if(t)throw w(n)?new Error("atob-Error in jsPDF.convertBase64ToBinaryString "+i.message):new Error("Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString ")}}return r};e.getImageProperties=function(t){var r,a,s="";if(f(t)&&(t=p(t)),"string"==typeof t&&i(t)===n&&(""===(s=S(t,!1))&&(s=e.loadFile(t)||""),t=s),a=i(t),!h(a))throw new Error("addImage does not support files of type '"+a+"', please ensure that a plugin for '"+a+"' support is added.");if(t instanceof Uint8Array||(t=A(t)),!(r=this["process"+a.toUpperCase()](t)))throw new Error("An unknown error occurred whilst processing the image");return r.fileType=a,r}}(Ja.API),function(e){var t=function(e){if(void 0!==e&&""!=e)return!0};Ja.API.events.push(["addPage",function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),e.events.push(["putPage",function(e){for(var n,r,a,i=this.internal.getCoordinateString,
vendor: 4,497 bytes, line 2
2s=this.internal.getVerticalCoordinateString,o=this.internal.getPageInfoByObjId(e.objId),l=e.pageContext.annotations,c=!1,u=0;u<l.length&&!c;u++)switch((n=l[u]).type){case"link":(t(n.options.url)||t(n.options.pageNumber))&&(c=!0);break;case"reference":case"text":case"freetext":c=!0}if(0!=c){this.internal.write("/Annots [");for(var d=0;d<l.length;d++){n=l[d];var h=this.internal.pdfEscape,f=this.internal.getEncryptor(e.objId);switch(n.type){case"reference":this.internal.write(" "+n.object.objId+" 0 R ");break;case"text":var p=this.internal.newAdditionalObject(),m=this.internal.newAdditionalObject(),g=this.internal.getEncryptor(p.objId),v=n.title||"Note";a="<</Type /Annot /Subtype /Text "+(r="/Rect ["+i(n.bounds.x)+" "+s(n.bounds.y+n.bounds.h)+" "+i(n.bounds.x+n.bounds.w)+" "+s(n.bounds.y)+"] ")+"/Contents ("+h(g(n.contents))+")",a+=" /Popup "+m.objId+" 0 R",a+=" /P "+o.objId+" 0 R",a+=" /T ("+h(g(v))+") >>",p.content=a;var b=p.objId+" 0 R";a="<</Type /Annot /Subtype /Popup "+(r="/Rect ["+i(n.bounds.x+30)+" "+s(n.bounds.y+n.bounds.h)+" "+i(n.bounds.x+n.bounds.w+30)+" "+s(n.bounds.y)+"] ")+" /Parent "+b,n.open&&(a+=" /Open true"),a+=" >>",m.content=a,this.internal.write(p.objId,"0 R",m.objId,"0 R");break;case"freetext":r="/Rect ["+i(n.bounds.x)+" "+s(n.bounds.y)+" "+i(n.bounds.x+n.bounds.w)+" "+s(n.bounds.y+n.bounds.h)+"] ";var y=n.color||"#000000";a="<</Type /Annot /Subtype /FreeText "+r+"/Contents ("+h(f(n.contents))+")",a+=" /DS(font: Helvetica,sans-serif 12.0pt; text-align:left; color:#"+y+")",a+=" /Border [0 0 0]",a+=" >>",this.internal.write(a);break;case"link":if(n.options.name){var x=this.annotations._nameMap[n.options.name];n.options.pageNumber=x.page,n.options.top=x.y}else n.options.top||(n.options.top=0);if(r="/Rect ["+n.finalBounds.x+" "+n.finalBounds.y+" "+n.finalBounds.w+" "+n.finalBounds.h+"] ",a="",n.options.url)a="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /A <</S /URI /URI ("+h(f(n.options.url))+") >>";else if(n.options.pageNumber)switch(a="<</Type /Annot /Subtype /Link "+r+"/Border [0 0 0] /Dest ["+this.internal.getPageInfo(n.options.pageNumber).objId+" 0 R",n.options.magFactor=n.options.magFactor||"XYZ",n.options.magFactor){case"Fit":a+=" /Fit]";break;case"FitH":a+=" /FitH "+n.options.top+"]";break;case"FitV":n.options.left=n.options.left||0,a+=" /FitV "+n.options.left+"]";break;default:var w=s(n.options.top);n.options.left=n.options.left||0,void 0===n.options.zoom&&(n.options.zoom=0),a+=" /XYZ "+n.options.left+" "+w+" "+n.options.zoom+"]"}""!=a&&(a+=" >>",this.internal.write(a))}}this.internal.write("]")}}]),e.createAnnotation=function(e){var t=this.internal.getCurrentPageInfo();switch(e.type){case"link":this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case"text":case"freetext":t.pageContext.annotations.push(e)}},e.link=function(e,t,n,r,a){var i=this.internal.getCurrentPageInfo(),s=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString;i.pageContext.annotations.push({finalBounds:{x:s(e),y:o(t),w:s(e+n),h:o(t+r)},options:a,type:"link"})},e.textWithLink=function(e,t,n,r){var a,i,s=this.getTextWidth(e),o=this.internal.getLineHeight()/this.internal.scaleFactor;if(void 0!==r.maxWidth){i=r.maxWidth;var l=this.splitTextToSize(e,i).length;a=Math.ceil(o*l)}else i=s,a=o;return this.text(e,t,n,r),n+=.2*o,"center"===r.align&&(t-=s/2),"right"===r.align&&(t-=s),this.link(t,n-o,i,a,r),s},e.getTextWidth=function(e){var t=this.internal.getFontSize();return this.getStringUnitWidth(e)*t/this.internal.scaleFactor}}(Ja.API),function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,652
vendor: 69,968 bytes, line 2
266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,64377],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},a=[1570,1571,1573,1575];e.__arabicParser__={};var i=e.__arabicParser__.isInArabicSubstitutionA=function(e){return void 0!==t[e.charCodeAt(0)]},s=e.__arabicParser__.isArabicLetter=function(e){return"string"==typeof e&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(e)},o=e.__arabicParser__.isArabicEndLetter=function(e){return s(e)&&i(e)&&t[e.charCodeAt(0)].length<=2},l=e.__arabicParser__.isArabicAlfLetter=function(e){return s(e)&&a.indexOf(e.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(e){return s(e)&&i(e)&&t[e.charCodeAt(0)].length>=1};var c=e.__arabicParser__.arabicLetterHasFinalForm=function(e){return s(e)&&i(e)&&t[e.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(e){return s(e)&&i(e)&&t[e.charCodeAt(0)].length>=3};var u=e.__arabicParser__.arabicLetterHasMedialForm=function(e){return s(e)&&i(e)&&4==t[e.charCodeAt(0)].length},d=e.__arabicParser__.resolveLigatures=function(e){var t=0,r=n,a="",i=0;for(t=0;t<e.length;t+=1)void 0!==r[e.charCodeAt(t)]?(i++,"number"==typeof(r=r[e.charCodeAt(t)])&&(a+=String.fromCharCode(r),r=n,i=0),t===e.length-1&&(r=n,a+=e.charAt(t-(i-1)),t-=i-1,i=0)):(r=n,a+=e.charAt(t-i),t-=i,i=0);return a};e.__arabicParser__.isArabicDiacritic=function(e){return void 0!==e&&void 0!==r[e.charCodeAt(0)]};var h=e.__arabicParser__.getCorrectForm=function(e,t,n){return s(e)?!1===i(e)?-1:!c(e)||!s(t)&&!s(n)||!s(n)&&o(t)||o(e)&&!s(t)||o(e)&&l(t)||o(e)&&o(t)?0:u(e)&&s(t)&&!o(t)&&s(n)&&c(n)?3:o(e)||!s(n)?1:2:-1},f=function(e){var n=0,r=0,a=0,i="",o="",l="",c=(e=e||"").split("\\s+"),u=[];for(n=0;n<c.length;n+=1){for(u.push(""),r=0;r<c[n].length;r+=1)i=c[n][r],o=c[n][r-1],l=c[n][r+1],s(i)?(a=h(i,o,l),u[n]+=-1!==a?String.fromCharCode(t[i.charCodeAt(0)][a]):i):u[n]+=i;u[n]=d(u[n])}return u.join(" ")},p=e.__arabicParser__.processArabic=e.processArabic=function(){var e,t="string"==typeof arguments[0]?arguments[0]:arguments[0].text,n=[];if(Array.isArray(t)){var r=0;for(n=[],r=0;r<t.length;r+=1)Array.isArray(t[r])?n.push([f(t[r][0]),t[r][1],t[r][2]]):n.push([f(t[r])]);e=n}else e=f(t);return"string"==typeof arguments[0]?e:(arguments[0].text=e,arguments[0])};e.events.push(["preProcessText",p])}(Ja.API),Ja.API.autoPrint=function(e){var t;return(e=e||{}).variant=e.variant||"non-conform","javascript"===e.variant?this.addJS("print({});"):(this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /Named"),this.internal.out("/Type /Action"),this.internal.out("/N /Print"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){this.internal.out("/OpenAction "+t+" 0 R")})),this},function(e){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}});var t=150;Object.defineProperty(this,"width",{get:function(){return t},set:function(e){t=isNaN(e)||!1===Number.isInteger(e)||e<0?150:e,this.getContext("2d").pageWrapXEnabled&&(this.getContext("2d").pageWrapX=t+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(e){n=isNaN(e)||!1===Number.isInteger(e)||e<0?300:e,this.getContext("2d").pageWrapYEnabled&&(this.getContext("2d").pageWrapY=n+1)}});var r=[];Object.defineProperty(this,"childNodes",{get:function(){return r},set:function(e){r=e}});var a={};Object.defineProperty(this,"style",{get:function(){return a},set:function(e){a=e}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,t){var n;if("2d"!==(e=e||"2d"))return null;for(n in t)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=t[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw new Error("toDataURL is not implemented.")},e.events.push(["initialized",function(){this.canvas=new t,this.canvas.pdf=this}])}(Ja.API),function(e){var t={left:0,top:0,bottom:0,right:0},n=!1,a=function(){void 0===this.internal.__cell__&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new s,this.internal.__cell__.pages=1},s=function(){var e=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var t=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var n=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return n},set:function(e){n=e}});var r=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return r},set:function(e){r=e}});var a=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return a},set:function(e){a=e}});var i=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return i},set:function(e){i=e}});var s=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return s},set:function(e){s=e}}),this};s.prototype.clone=function(){return new s(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},s.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(e){return a.call(this),this.internal.__cell__.headerFunction="function"==typeof e?e:void 0,this},e.getTextDimensions=function(e,t){a.call(this);var n=(t=t||{}).fontSize||this.getFontSize(),r=t.font||this.getFont(),i=t.scaleFactor||this.internal.scaleFactor,s=0,o=0,l=0,c=this;if(!Array.isArray(e)&&"string"!=typeof e){if("number"!=typeof e)throw new Error("getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.");e=String(e)}var u=t.maxWidth;u>0?"string"==typeof e?e=this.splitTextToSize(e,u):"[object Array]"===Object.prototype.toString.call(e)&&(e=e.reduce(function(e,t){return e.concat(c.splitTextToSize(t,u))},[])):e=Array.isArray(e)?e:[e];for(var d=0;d<e.length;d++)s<(l=this.getStringUnitWidth(e[d],{font:r})*n)&&(s=l);return 0!==s&&(o=e.length),{w:s/=i,h:Math.max((o*n*this.getLineHeightFactor()-n*(this.getLineHeightFactor()-1))/i,0)}},e.cellAddPage=function(){a.call(this),this.addPage();var e=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new s(e.left,e.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=e.cell=function(){var e;e=arguments[0]instanceof s?arguments[0]:new s(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]),a.call(this);var r=this.internal.__cell__.lastCell,i=this.internal.__cell__.padding,o=this.internal.__cell__.margins||t,l=this.internal.__cell__.tableHeaderRow,c=this.internal.__cell__.printHeaders;return void 0!==r.lineNumber&&(r.lineNumber===e.lineNumber?(e.x=(r.x||0)+(r.width||0),e.y=r.y||0):r.y+r.height+e.height+o.bottom>this.getPageHeight()?(this.cellAddPage(),e.y=o.top,c&&l&&(this.printHeaderRow(e.lineNumber,!0),e.y+=l[0].height)):e.y=r.y+r.height||e.y),void 0!==e.text[0]&&(this.rect(e.x,e.y,e.width,e.height,!0===n?"FD":void 0),"right"===e.align?this.text(e.text,e.x+e.width-i,e.y+i,{align:"right",baseline:"top"}):"center"===e.align?this.text(e.text,e.x+e.width/2,e.y+i,{align:"center",baseline:"top",maxWidth:e.width-i-i}):this.text(e.text,e.x+i,e.y+i,{align:"left",baseline:"top",maxWidth:e.width-i-i})),this.internal.__cell__.lastCell=e,this};e.table=function(e,n,c,u,d){if(a.call(this),!c)throw new Error("No data for PDF table.");var h,f,p,m,g=[],v=[],b=[],y={},x={},w=[],k=[],N=(d=d||{}).autoSize||!1,A=!1!==d.printHeaders,j=d.css&&void 0!==d.css["font-size"]?16*d.css["font-size"]:d.fontSize||12,_=d.margins||Object.assign({width:this.getPageWidth()},t),S="number"==typeof d.padding?d.padding:3,C=d.headerBackgroundColor||"#c8c8c8",E=d.headerTextColor||"#000";if(i.call(this),this.internal.__cell__.printHeaders=A,this.internal.__cell__.margins=_,this.internal.__cell__.table_font_size=j,this.internal.__cell__.padding=S,this.internal.__cell__.headerBackgroundColor=C,this.internal.__cell__.headerTextColor=E,this.setFontSize(j),null==u)v=g=Object.keys(c[0]),b=g.map(function(){return"left"});else if(Array.isArray(u)&&"object"===r(u[0]))for(g=u.map(function(e){return e.name}),v=u.map(function(e){return e.prompt||e.name||""}),b=u.map(function(e){return e.align||"left"}),h=0;h<u.length;h+=1)x[u[h].name]=.7499990551181103*u[h].width;else Array.isArray(u)&&"string"==typeof u[0]&&(v=g=u,b=g.map(function(){return"left"}));if(N||Array.isArray(u)&&"string"==typeof u[0])for(h=0;h<g.length;h+=1){for(y[m=g[h]]=c.map(function(e){return e[m]}),this.setFont(void 0,"bold"),w.push(this.getTextDimensions(v[h],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),f=y[m],this.setFont(void 0,"normal"),p=0;p<f.length;p+=1)w.push(this.getTextDimensions(f[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);x[m]=Math.max.apply(null,w)+S+S,w=[]}if(A){var L={};for(h=0;h<g.length;h+=1)L[g[h]]={},L[g[h]].text=v[h],L[g[h]].align=b[h];var P=l.call(this,L,x);k=g.map(function(t){return new s(e,n,x[t],P,L[t].text,void 0,L[t].align)}),this.setTableHeaderRow(k),this.printHeaderRow(1,!1)}var T=u.reduce(function(e,t){return e[t.name]=t.align,e},{});for(h=0;h<c.length;h+=1){"rowStart"in d&&d.rowStart instanceof Function&&d.rowStart({row:h,data:c[h]},this);var R=l.call(this,c[h],x);for(p=0;p<g.length;p+=1){var F=c[h][g[p]];"cellStart"in d&&d.cellStart instanceof Function&&d.cellStart({row:h,col:p,data:F},this),o.call(this,new s(e,n,x[g[p]],R,F,h+2,T[g[p]]))}}return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=n,this};var l=function(e,t){var n=this.internal.__cell__.padding,r=this.internal.__cell__.table_font_size,a=this.internal.scaleFactor;return Object.keys(e).map(function(r){var a=e[r];return this.splitTextToSize(a.hasOwnProperty("text")?a.text:a,t[r]-n-n)},this).map(function(e){return this.getLineHeightFactor()*e.length*r/a+n+n},this).reduce(function(e,t){return Math.max(e,t)},0)};e.setTableHeaderRow=function(e){a.call(this),this.internal.__cell__.tableHeaderRow=e},e.printHeaderRow=function(e,t){if(a.call(this),!this.internal.__cell__.tableHeaderRow)throw new Error("Property tableHeaderRow does not exist.");var r;if(n=!0,"function"==typeof this.internal.__cell__.headerFunction){var i=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new s(i[0],i[1],i[2],i[3],void 0,-1)}this.setFont(void 0,"bold");for(var l=[],c=0;c<this.internal.__cell__.tableHeaderRow.length;c+=1){r=this.internal.__cell__.tableHeaderRow[c].clone(),t&&(r.y=this.internal.__cell__.margins.top||0,l.push(r)),r.lineNumber=e;var u=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroundColor),o.call(this,r),this.setTextColor(u)}l.length>0&&this.setTableHeaderRow(l),this.setFont(void 0,"normal"),n=!1}}(Ja.API);var qi={italic:["italic","oblique","normal"],oblique:["oblique","italic","normal"],normal:["normal","oblique","italic"]},Ui=["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded"],Vi=Bi(Ui),Hi=[100,200,300,400,500,600,700,800,900],Wi=Bi(Hi);function Gi(e){var t=e.family.replace(/"|'/g,"").toLowerCase(),n=function(e){return qi[e=e||"normal"]?e:"normal"}(e.style),r=function(e){return e?"number"==typeof e?e>=100&&e<=900&&e%100==0?e:400:/^\d00$/.test(e)?parseInt(e):"bold"===e?700:400:400}(e.weight),a=function(e){return"number"==typeof Vi[e=e||"normal"]?e:"normal"}(e.stretch);return{family:t,style:n,weight:r,stretch:a,src:e.src||[],ref:e.ref||{name:t,style:[a,n,r].join(" ")}}}function $i(e,t,n,r){var a;for(a=n;a>=0&&a<t.length;a+=r)if(e[t[a]])return e[t[a]];for(a=n;a>=0&&a<t.length;a-=r)if(e[t[a]])return e[t[a]]}var Yi={"sans-serif":"helvetica",fixed:"courier",monospace:"courier",terminal:"courier",cursive:"times",fantasy:"times",serif:"times"},Ki={caption:"times",icon:"times",menu:"times","message-box":"times","small-caption":"times","status-bar":"times"};function Xi(e){return[e.stretch,e.style,e.weight,e.family].join(" ")}function Zi(e){return e.trimLeft()}function Ji(e,t){for(var n=0;n<e.length;){if(e.charAt(n)===t)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}function Qi(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return null===t?null:[t[0],e.substring(t[0].length)]}var es,ts,ns,rs,as,is=["times"];function ss(e,t,n,r,a){var i=4,s=cs;switch(a){case Ja.API.image_compression.FAST:i=1,s=ls;break;case Ja.API.image_compression.MEDIUM:i=6,s=us;break;case Ja.API.image_compression.SLOW:i=9,s=ds}e=function(e,t,n,r){for(var a,i=e.length/t,s=new Uint8Array(e.length+i),o=[os,ls,cs,us,ds],l=0;l<i;l+=1){var c=l*t,u=e.subarray(c,c+t);if(r)s.set(r(u,n,a),c+l);else{for(var d=o.length,h=[],f=0;f<d;f+=1)h[f]=o[f](u,n,a);var p=fs(h.concat());s.set(h[p],c+l)}a=u}return s}(e,t,Math.ceil(n*r/8),s);var o=q(e,{level:i});return Ja.API.__addimage__.arrayBufferToBinaryString(o)}function os(e){var t=Array.apply([],e);return t.unshift(0),t}function ls(e,t){var n=e.length,r=[];r[0]=1;for(var a=0;a<n;a+=1){var i=e[a-t]||0;r[a+1]=e[a]-i+256&255}return r}function cs(e,t,n){var r=e.length,a=[];a[0]=2;for(var i=0;i<r;i+=1){var s=n&&n[i]||0;a[i+1]=e[i]-s+256&255}return a}function us(e,t,n){var r=e.length,a=[];a[0]=3;for(var i=0;i<r;i+=1){var s=e[i-t]||0,o=n&&n[i]||0;a[i+1]=e[i]+256-(s+o>>>1)&255}return a}function ds(e,t,n){var r=e.length,a=[];a[0]=4;for(var i=0;i<r;i+=1){var s=hs(e[i-t]||0,n&&n[i]||0,n&&n[i-t]||0);a[i+1]=e[i]-s+256&255}return a}function hs(e,t,n){if(e===t&&t===n)return e;var r=Math.abs(t-n),a=Math.abs(e-n),i=Math.abs(e+t-n-n);return r<=a&&r<=i?e:a<=i?t:n}function fs(e){var t=e.map(function(e){return e.reduce(function(e,t){return e+Math.abs(t)},0)});return t.indexOf(Math.min.apply(null,t))}function ps(e,t,n){var r=t*n,a=Math.floor(r/8),i=16-(r-8*a+n),s=(1<<n)-1;return gs(e,a)>>i&s}function ms(e,t,n,r){var a=n*r,i=Math.floor(a/8),s=16-(a-8*i+r),o=(1<<r)-1,l=(t&o)<<s;!function(e,t,n){if(t+1<e.byteLength)e.setUint16(t,n,!1);else{var r=n>>8&255;e.setUint8(t,r)}}(e,i,gs(e,i)&~(o<<s)&65535|l)}function gs(e,t){return t+1<e.byteLength?e.getUint16(t,!1):e.getUint8(t)<<8}function vs(e){var t=0;if(71!==e[t++]||73!==e[t++]||70!==e[t++]||56!==e[t++]||56!=(e[t++]+1&253)||97!==e[t++])throw new Error("Invalid GIF 87a/89a header.");var n=e[t++]|e[t++]<<8,r=e[t++]|e[t++]<<8,a=e[t++],i=a>>7,s=1<<1+(7&a);e[t++],e[t++];var o=null,l=null;i&&(o=t,l=s,t+=3*s);var c=!0,u=[],d=0,h=null,f=0,p=null;for(this.width=n,this.height=r;c&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(11!==e[t]||78==e[t+1]&&69==e[t+2]&&84==e[t+3]&&83==e[t+4]&&67==e[t+5]&&65==e[t+6]&&80==e[t+7]&&69==e[t+8]&&50==e[t+9]&&46==e[t+10]&&48==e[t+11]&&3==e[t+12]&&1==e[t+13]&&0==e[t+16])t+=14,p=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((S=e[t++])>=0))throw Error("Invalid block size");if(0===S)break;t+=S}break;case 249:if(4!==e[t++]||0!==e[t+4])throw new Error("Invalid graphics extension block.");var m=e[t++];d=e[t++]|e[t++]<<8,h=e[t++],1&m||(h=null),f=m>>2&7,t++;break;case 254:for(;;){if(!((S=e[t++])>=0))throw Error("Invalid block size");if(0===S)break;t+=S}break;default:throw new Error("Unknown graphic control label: 0x"+e[t-1].toString(16))}break;case 44:var g=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,b=e[t++]|e[t++]<<8,y=e[t++]|e[t++]<<8,x=e[t++],w=x>>6&1,k=1<<1+(7&x),N=o,A=l,j=!1;x>>7&&(j=!0,N=t,A=k,t+=3*k);var _=t;for(t++;;){var S;if(!((S=e[t++])>=0))throw Error("Invalid block size");if(0===S)break;t+=S}u.push({x:g,y:v,width:b,height:y,has_local_palette:j,palette_offset:N,palette_size:A,data_offset:_,data_length:t-_,transparent_index:h,interlaced:!!w,delay:d,disposal:f});break;case 59:c=!1;break;default:throw new Error("Unknown gif block: 0x"+e[t-1].toString(16))}this.numFrames=function(){return u.length},this.loopCount=function(){return p},this.frameInfo=function(e){if(e<0||e>=u.length)throw new Error("Frame index out of range.");return u[e]},this.decodeAndBlitFrameBGRA=function(t,r){var a=this.frameInfo(t),i=a.width*a.height;if(i>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var s=new Uint8Array(i);bs(e,a.data_offset,s,i);var o=a.palette_offset,l=a.transparent_index;null===l&&(l=256);var c=a.width,u=n-c,d=c,h=4*(a.y*n+a.x),f=4*((a.y+a.height)*n+a.x),p=h,m=4*u;!0===a.interlaced&&(m+=4*n*7);for(var g=8,v=0,b=s.length;v<b;++v){var y=s[v];if(0===d&&(d=c,(p+=m)>=f&&(m=4*u+4*n*(g-1),p=h+(c+u)*(g<<1),g>>=1)),y===l)p+=4;else{var x=e[o+3*y],w=e[o+3*y+1],k=e[o+3*y+2];r[p++]=k,r[p++]=w,r[p++]=x,r[p++]=255}--d}},this.decodeAndBlitFrameRGBA=function(t,r){var a=this.frameInfo(t),i=a.width*a.height;if(i>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");var s=new Uint8Array(i);bs(e,a.data_offset,s,i);var o=a.palette_offset,l=a.transparent_index;null===l&&(l=256);var c=a.width,u=n-c,d=c,h=4*(a.y*n+a.x),f=4*((a.y+a.height)*n+a.x),p=h,m=4*u;!0===a.interlaced&&(m+=4*n*7);for(var g=8,v=0,b=s.length;v<b;++v){var y=s[v];if(0===d&&(d=c,(p+=m)>=f&&(m=4*u+4*n*(g-1),p=h+(c+u)*(g<<1),g>>=1)),y===l)p+=4;else{var x=e[o+3*y],w=e[o+3*y+1],k=e[o+3*y+2];r[p++]=x,r[p++]=w,r[p++]=k,r[p++]=255}--d}}}function bs(e,t,n,r){for(var a=e[t++],i=1<<a,s=i+1,o=s+1,l=a+1,c=(1<<l)-1,u=0,d=0,h=0,f=e[t++],p=new Int32Array(4096),m=null;;){for(;u<16&&0!==f;)d|=e[t++]<<u,u+=8,1===f?f=e[t++]:--f;if(u<l)break;var g=d&c;if(d>>=l,u-=l,g!==i){if(g===s)break;for(var v=g<o?g:m,b=0,y=v;y>i;)y=p[y]>>8,++b;var x=y;if(h+b+(v!==g?1:0)>r)return void wa.log("Warning, gif stream longer than expected.");n[h++]=x;var w=h+=b;for(v!==g&&(n[h++]=x),y=v;b--;)y=p[y],n[--w]=255&y,y>>=8;null!==m&&o<4096&&(p[o++]=m<<8|x,o>=c+1&&l<12&&(++l,c=c<<1|1)),m=g}else o=s+1,c=(1<<(l=a+1))-1,m=null}return h!==r&&wa.log("Warning, gif stream shorter than expected."),n}function ys(e){var t,n,r,a,i,s=Math.floor,o=new Array(64),l=new Array(64),c=new Array(64),u=new Array(64),d=new Array(65535),h=new Array(65535),f=new Array(64),p=new Array(64),m=[],g=0,v=7,b=new Array(64),y=new Array(64),x=new Array(64),w=new Array(256),k=new Array(2048),N=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],A=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],j=[0,1,2,3,4,5,6,7,8,9,10,11],_=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],S=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],C=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],E=[0,1,2,3,4,5,6,7,8,9,10,11],L=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],P=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function T(e,t){for(var n=0,r=0,a=new Array,i=1;i<=16;i++){for(var s=1;s<=e[i];s++)a[t[r]]=[],a[t[r]][0]=n,a[t[r]][1]=i,r++,n++;n*=2}return a}function R(e){for(var t=e[0],n=e[1]-1;n>=0;)t&1<<n&&(g|=1<<v),n--,--v<0&&(255==g?(F(255),F(0)):F(g),v=7,g=0)}function F(e){m.push(e)}function M(e){F(e>>8&255),F(255&e)}function O(e,t,n,r,a){for(var i,s=a[0],o=a[240],l=function(e,t){var n,r,a,i,s,o,l,c,u,d,h=0;for(u=0;u<8;++u){n=e[h],r=e[h+1],a=e[h+2],i=e[h+3],s=e[h+4],o=e[h+5],l=e[h+6];var p=n+(c=e[h+7]),m=n-c,g=r+l,v=r-l,b=a+o,y=a-o,x=i+s,w=i-s,k=p+x,N=p-x,A=g+b,j=g-b;e[h]=k+A,e[h+4]=k-A;var _=.707106781*(j+N);e[h+2]=N+_,e[h+6]=N-_;var S=.382683433*((k=w+y)-(j=v+m)),C=.5411961*k+S,E=1.306562965*j+S,L=.707106781*(A=y+v),P=m+L,T=m-L;e[h+5]=T+C,e[h+3]=T-C,e[h+1]=P+E,e[h+7]=P-E,h+=8}for(h=0,u=0;u<8;++u){n=e[h],r=e[h+8],a=e[h+16],i=e[h+24],s=e[h+32],o=e[h+40],l=e[h+48];var R=n+(c=e[h+56]),F=n-c,M=r+l,O=r-l,D=a+o,I=a-o,z=i+s,B=i-s,q=R+z,U=R-z,V=M+D,H=M-D;e[h]=q+V,e[h+32]=q-V;var W=.707106781*(H+U);e[h+16]=U+W,e[h+48]=U-W;var G=.382683433*((q=B+I)-(H=O+F)),$=.5411961*q+G,Y=1.306562965*H+G,K=.707106781*(V=I+O),X=F+K,Z=F-K;e[h+40]=Z+$,e[h+24]=Z-$,e[h+8]=X+Y,e[h+56]=X-Y,h++}for(u=0;u<64;++u)d=e[u]*t[u],f[u]=d>0?d+.5|0:d-.5|0;return f}(e,t),c=0;c<64;++c)p[N[c]]=l[c];var u=p[0]-n;n=p[0],0==u?R(r[0]):(R(r[h[i=32767+u]]),R(d[i]));for(var m=63;m>0&&0==p[m];)m--;if(0==m)return R(s),n;for(var g,v=1;v<=m;){for(var b=v;0==p[v]&&v<=m;)++v;var y=v-b;if(y>=16){g=y>>4;for(var x=1;x<=g;++x)R(o);y&=15}i=32767+p[v],R(a[(y<<4)+h[i]]),R(d[i]),v++}return 63!=m&&R(s),n}function D(e){e=Math.min(Math.max(e,1),100),i!=e&&(function(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=s((t[n]*e+50)/100);r=Math.min(Math.max(r,1),255),o[N[n]]=r}for(var a=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],i=0;i<64;i++){var d=s((a[i]*e+50)/100);d=Math.min(Math.max(d,1),255),l[N[i]]=d}for(var h=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],f=0,p=0;p<8;p++)for(var m=0;m<8;m++)c[f]=1/(o[N[f]]*h[p]*h[m]*8),u[f]=1/(l[N[f]]*h[p]*h[m]*8),f++}(e<50?Math.floor(5e3/e):Math.floor(200-2*e)),i=e)}this.encode=function(e,i){i&&D(i),m=new Array,g=0,v=7,M(65496),M(65504),M(16),F(74),F(70),F(73),F(70),F(0),F(1),F(1),F(0),M(1),M(1),F(0),F(0),function(){M(65499),M(132),F(0);for(var e=0;e<64;e++)F(o[e]);F(1);for(var t=0;t<64;t++)F(l[t])}(),function(e,t){M(65472),M(17),F(8),M(t),M(e),F(3),F(1),F(17),F(0),F(2),F(17),F(1),F(3),F(17),F(1)}(e.width,e.height),function(){M(65476),M(418),F(0);for(var e=0;e<16;e++)F(A[e+1]);for(var t=0;t<=11;t++)F(j[t]);F(16);for(var n=0;n<16;n++)F(_[n+1]);for(var r=0;r<=161;r++)F(S[r]);F(1);for(var a=0;a<16;a++)F(C[a+1]);for(var i=0;i<=11;i++)F(E[i]);F(17);for(var s=0;s<16;s++)F(L[s+1]);for(var o=0;o<=161;o++)F(P[o])}(),M(65498),M(12),F(3),F(1),F(0),F(2),F(17),F(3),F(17),F(0),F(63),F(0);var s=0,d=0,h=0;g=0,v=7,this.encode.displayName="_encode_";for(var f,p,w,N,T,I,z,B,q,U=e.data,V=e.width,H=e.height,W=4*V,G=0;G<H;){for(f=0;f<W;){for(T=W*G+f,z=-1,B=0,q=0;q<64;q++)I=T+(B=q>>3)*W+(z=4*(7&q)),G+B>=H&&(I-=W*(G+1+B-H)),f+z>=W&&(I-=f+z-W+4),p=U[I++],w=U[I++],N=U[I++],b[q]=(k[p]+k[w+256|0]+k[N+512|0]>>16)-128,y[q]=(k[p+768|0]+k[w+1024|0]+k[N+1280|0]>>16)-128,x[q]=(k[p+1280|0]+k[w+1536|0]+k[N+1792|0]>>16)-128;s=O(b,c,s,t,r),d=O(y,u,d,n,a),h=O(x,u,h,n,a),f+=32}G+=8}if(v>=0){var $=[];$[1]=v+1,$[0]=(1<<v+1)-1,R($)}return M(65497),new Uint8Array(m)},e=e||50,function(){for(var e=String.fromCharCode,t=0;t<256;t++)w[t]=e(t)}(),t=T(A,j),n=T(C,E),r=T(_,S),a=T(L,P),function(){for(var e=1,t=2,n=1;n<=15;n++){for(var r=e;r<t;r++)h[32767+r]=n,d[32767+r]=[],d[32767+r][1]=n,d[32767+r][0]=r;for(var a=-(t-1);a<=-e;a++)h[32767+a]=n,d[32767+a]=[],d[32767+a][1]=n,d[32767+a][0]=t-1+a;e<<=1,t<<=1}}(),function(){for(var e=0;e<256;e++)k[e]=19595*e,k[e+256|0]=38470*e,k[e+512|0]=7471*e+32768,k[e+768|0]=-11059*e,k[e+1024|0]=-21709*e,k[e+1280|0]=32768*e+8421375,k[e+1536|0]=-27439*e,k[e+1792|0]=-5329*e}(),D(e)}function xs(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,-1===["BM","BA","CI","CP","IC","PT"].indexOf(this.flag))throw new Error("Invalid BMP File");this.parseHeader(),this.parseBGR()}function ws(e){function t(e){if(!e)throw Error("assert :P")}function n(e,t,n){for(var r=0;4>r;r++)if(e[t+r]!=n.charCodeAt(r))return!0;return!1}function r(e,t,n,r,a){for(var i=0;i<a;i++)e[t+i]=n[r+i]}function a(e,t,n,r){for(var a=0;a<r;a++)e[t+a]=n}function i(e){return new Int32Array(e)}function s(e,t){for(var n=[],r=0;r<e;r++)n.push(new t);return n}function o(e,t){var n=[];return function e(n,r,a){for(var i=a[r],s=0;s<i&&(n.push(a.length>r+1?[]:new t),!(a.length<r+1));s++)e(n[s],r+1,a)}(n,0,e),n}var l=function(){var e=this;function l(e,t){for(var n=1<<t-1>>>0;e&n;)n>>>=1;return n?(e&n-1)+n:e}function c(e,n,r,a,i){t(!(a%r));do{e[n+(a-=r)]=i}while(0<a)}function u(e,n,r,a,s){if(t(2328>=s),512>=s)var o=i(512);else if(null==(o=i(s)))return 0;return function(e,n,r,a,s,o){var u,h,f=n,p=1<<r,m=i(16),g=i(16);for(t(0!=s),t(null!=a),t(null!=e),t(0<r),h=0;h<s;++h){if(15<a[h])return 0;++m[a[h]]}if(m[0]==s)return 0;for(g[1]=0,u=1;15>u;++u){if(m[u]>1<<u)return 0;g[u+1]=g[u]+m[u]}for(h=0;h<s;++h)u=a[h],0<a[h]&&(o[g[u]++]=h);if(1==g[15])return(a=new d).g=0,a.value=o[0],c(e,f,1,p,a),p;var v,b=-1,y=p-1,x=0,w=1,k=1,N=1<<r;for(h=0,u=1,s=2;u<=r;++u,s<<=1){if(w+=k<<=1,0>(k-=m[u]))return 0;for(;0<m[u];--m[u])(a=new d).g=u,a.value=o[h++],c(e,f+x,s,N,a),x=l(x,u)}for(u=r+1,s=2;15>=u;++u,s<<=1){if(w+=k<<=1,0>(k-=m[u]))return 0;for(;0<m[u];--m[u]){if(a=new d,(x&y)!=b){for(f+=N,v=1<<(b=u)-r;15>b&&!(0>=(v-=m[b]));)++b,v<<=1;p+=N=1<<(v=b-r),e[n+(b=x&y)].g=v+r,e[n+b].value=f-n-b}a.g=u-r,a.value=o[h++],c(e,f+(x>>r),s,N,a),x=l(x,u)}}return w!=2*g[15]-1?0:p}(e,n,r,a,s,o)}function d(){this.value=this.g=0}function h(){this.value=this.g=0}function f(){this.G=s(5,d),this.H=i(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=s(In,h)}function p(e,n,r,a){t(null!=e),t(null!=n),t(2147483648>a),e.Ca=254,e.I=0,e.b=-8,e.Ka=0,e.oa=n,e.pa=r,e.Jd=n,e.Yc=r+a,e.Zc=4<=a?r+a-4+1:r,_(e)}function m(e,t){for(var n=0;0<t--;)n|=C(e,128)<<t;return n}function g(e,t){var n=m(e,t);return S(e)?-n:n}function v(e,n,r,a){var i,s=0;for(t(null!=e),t(null!=n),t(4294967288>a),e.Sb=a,e.Ra=0,e.u=0,e.h=0,4<a&&(a=4),i=0;i<a;++i)s+=n[r+i]<<8*i;e.Ra=s,e.bb=a,e.oa=n,e.pa=r}function b(e){for(;8<=e.u&&e.bb<e.Sb;)e.Ra>>>=8,e.Ra+=e.oa[e.pa+e.bb]<<qn-8>>>0,++e.bb,e.u-=8;N(e)&&(e.h=1,e.u=0)}function y(e,n){if(t(0<=n),!e.h&&n<=Bn){var r=k(e)&zn[n];return e.u+=n,b(e),r}return e.h=1,e.u=0}function x(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function w(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function k(e){return e.Ra>>>(e.u&qn-1)>>>0}function N(e){return t(e.bb<=e.Sb),e.h||e.bb==e.Sb&&e.u>qn}function A(e,t){e.u=t,e.h=N(e)}function j(e){e.u>=Un&&(t(e.u>=Un),b(e))}function _(e){t(null!=e&&null!=e.oa),e.pa<e.Zc?(e.I=(e.oa[e.pa++]|e.I<<8)>>>0,e.b+=8):(t(null!=e&&null!=e.oa),e.pa<e.Yc?(e.b+=8,e.I=e.oa[e.pa++]|e.I<<8):e.Ka?e.b=0:(e.I<<=8,e.b+=8,e.Ka=1))}function S(e){return m(e,1)}function C(e,t){var n=e.Ca;0>e.b&&_(e);var r=e.b,a=n*t>>>8,i=(e.I>>>r>a)+0;for(i?(n-=a,e.I-=a+1<<r>>>0):n=a+1,r=n,a=0;256<=r;)a+=8,r>>=8;return r=7^a+Vn[r],e.b-=r,e.Ca=(n<<r)-1,i}function E(e,t,n){e[t+0]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function L(e,t){return e[t+0]|e[t+1]<<8}function P(e,t){return L(e,t)|e[t+2]<<16}function T(e,t){return L(e,t)|L(e,t+2)<<16}function R(e,n){var r=1<<n;return t(null!=e),t(0<n),e.X=i(r),null==e.X?0:(e.Mb=32-n,e.Xa=n,1)}function F(e,n){t(null!=e),t(null!=n),t(e.Xa==n.Xa),r(n.X,0,e.X,0,1<<n.Xa)}function M(){this.X=[],this.Xa=this.Mb=0}function O(e,n,r,a){t(null!=r),t(null!=a);var i=r[0],s=a[0];return 0==i&&(i=(e*s+n/2)/n),0==s&&(s=(n*i+e/2)/e),0>=i||0>=s?0:(r[0]=i,a[0]=s,1)}function D(e,t){return e+(1<<t)-1>>>t}function I(e,t){return((4278255360&e)+(4278255360&t)>>>0&4278255360)+((16711935&e)+(16711935&t)>>>0&16711935)>>>0}function z(t,n){e[n]=function(n,r,a,i,s,o,l){var c;for(c=0;c<s;++c){var u=e[t](o[l+c-1],a,i+c);o[l+c]=I(n[r+c],u)}}}function B(){this.ud=this.hd=this.jd=0}function q(e,t){return((4278124286&(e^t))>>>1)+(e&t)>>>0}function U(e){return 0<=e&&256>e?e:0>e?0:255<e?255:void 0}function V(e,t){return U(e+(e-t+.5>>1))}function H(e,t,n){return Math.abs(t-n)-Math.abs(e-n)}function W(e,t,n,r,a,i,s){for(r=i[s-1],n=0;n<a;++n)i[s+n]=r=I(e[t+n],r)}function G(e,t,n,r,a){var i;for(i=0;i<n;++i){var s=e[t+i],o=s>>8&255,l=16711935&(l=(l=16711935&s)+((o<<16)+o));r[a+i]=(4278255360&s)+l>>>0}}function $(e,t){t.jd=255&e,t.hd=e>>8&255,t.ud=e>>16&255}function Y(e,t,n,r,a,i){var s;for(s=0;s<r;++s){var o=t[n+s],l=o>>>8,c=o,u=255&(u=(u=o>>>16)+((e.jd<<24>>24)*(l<<24>>24)>>>5));c=255&(c=(c+=(e.hd<<24>>24)*(l<<24>>24)>>>5)+((e.ud<<24>>24)*(u<<24>>24)>>>5)),a[i+s]=(4278255360&o)+(u<<16)+c}}function K(t,n,r,a,i){e[n]=function(e,t,n,r,s,o,l,c,u){for(r=l;r<c;++r)for(l=0;l<u;++l)s[o++]=i(n[a(e[t++])])},e[t]=function(t,n,s,o,l,c,u){var d=8>>t.b,h=t.Ea,f=t.K[0],p=t.w;if(8>d)for(t=(1<<t.b)-1,p=(1<<d)-1;n<s;++n){var m,g=0;for(m=0;m<h;++m)m&t||(g=a(o[l++])),c[u++]=i(f[g&p]),g>>=d}else e["VP8LMapColor"+r](o,l,f,p,c,u,n,s,h)}}function X(e,t,n,r,a){for(n=t+n;t<n;){var i=e[t++];r[a++]=i>>16&255,r[a++]=i>>8&255,r[a++]=255&i}}function Z(e,t,n,r,a){for(n=t+n;t<n;){var i=e[t++];r[a++]=i>>16&255,r[a++]=i>>8&255,r[a++]=255&i,r[a++]=i>>24&255}}function J(e,t,n,r,a){for(n=t+n;t<n;){var i=(s=e[t++])>>16&240|s>>12&15,s=240&s|s>>28&15;r[a++]=i,r[a++]=s}}function Q(e,t,n,r,a){for(n=t+n;t<n;){var i=(s=e[t++])>>16&248|s>>13&7,s=s>>5&224|s>>3&31;r[a++]=i,r[a++]=s}}function ee(e,t,n,r,a){for(n=t+n;t<n;){var i=e[t++];r[a++]=255&i,r[a++]=i>>8&255,r[a++]=i>>16&255}}function te(e,t,n,a,i,s){if(0==s)for(n=t+n;t<n;)E(a,((s=e[t++])[0]>>24|s[1]>>8&65280|s[2]<<8&16711680|s[3]<<24)>>>0),i+=32;else r(a,i,e,t,n)}function ne(t,n){e[n][0]=e[t+"0"],e[n][1]=e[t+"1"],e[n][2]=e[t+"2"],e[n][3]=e[t+"3"],e[n][4]=e[t+"4"],e[n][5]=e[t+"5"],e[n][6]=e[t+"6"],e[n][7]=e[t+"7"],e[n][8]=e[t+"8"],e[n][9]=e[t+"9"],e[n][10]=e[t+"10"],e[n][11]=e[t+"11"],e[n][12]=e[t+"12"],e[n][13]=e[t+"13"],e[n][14]=e[t+"0"],e[n][15]=e[t+"0"]}function re(e){return e==Ur||e==Vr||e==Hr||e==Wr}function ae(){this.eb=[],this.size=this.A=this.fb=0}function ie(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function se(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new ae,this.f.kb=new ie,this.sd=null}function oe(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function le(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ce(e){return alert("todo:WebPSamplerProcessPlane"),e.T}function ue(e,t){var n=e.T,a=t.ba.f.RGBA,i=a.eb,s=a.fb+e.ka*a.A,o=ga[t.ba.S],l=e.y,c=e.O,u=e.f,d=e.N,h=e.ea,f=e.W,p=t.cc,m=t.dc,g=t.Mc,v=t.Nc,b=e.ka,y=e.ka+e.T,x=e.U,w=x+1>>1;for(0==b?o(l,c,null,null,u,d,h,f,u,d,h,f,i,s,null,null,x):(o(t.ec,t.fc,l,c,p,m,g,v,u,d,h,f,i,s-a.A,i,s,x),++n);b+2<y;b+=2)p=u,m=d,g=h,v=f,d+=e.Rc,f+=e.Rc,s+=2*a.A,o(l,(c+=2*e.fa)-e.fa,l,c,p,m,g,v,u,d,h,f,i,s-a.A,i,s,x);return c+=e.fa,e.j+y<e.o?(r(t.ec,t.fc,l,c,x),r(t.cc,t.dc,u,d,w),r(t.Mc,t.Nc,h,f,w),n--):1&y||o(l,c,null,null,u,d,h,f,u,d,h,f,i,s+a.A,null,null,x),n}function de(e,n,r){var a=e.F,i=[e.J];if(null!=a){var s=e.U,o=n.ba.S,l=o==zr||o==Hr;n=n.ba.f.RGBA;var c=[0],u=e.ka;c[0]=e.T,e.Kb&&(0==u?--c[0]:(--u,i[0]-=e.width),e.j+e.ka+e.T==e.o&&(c[0]=e.o-e.j-u));var d=n.eb;u=n.fb+u*n.A,e=Ar(a,i[0],e.width,s,c,d,u+(l?0:3),n.A),t(r==c),e&&re(o)&&kr(d,u,l,s,c,n.A)}return 0}function he(e){var t=e.ma,n=t.ba.S,r=11>n,a=n==Or||n==Ir||n==zr||n==Br||12==n||re(n);if(t.memory=null,t.Ib=null,t.Jb=null,t.Nd=null,!Mn(t.Oa,e,a?11:12))return 0;if(a&&re(n)&&bn(),e.da)alert("todo:use_scaling");else{if(r){if(t.Ib=ce,e.Kb){if(n=e.U+1>>1,t.memory=i(e.U+2*n),null==t.memory)return 0;t.ec=t.memory,t.fc=0,t.cc=t.ec,t.dc=t.fc+e.U,t.Mc=t.cc,t.Nc=t.dc+n,t.Ib=ue,bn()}}else alert("todo:EmitYUV");a&&(t.Jb=de,r&&gn())}if(r&&!La){for(e=0;256>e;++e)Pa[e]=89858*(e-128)+ja>>Aa,Fa[e]=-22014*(e-128)+ja,Ra[e]=-45773*(e-128),Ta[e]=113618*(e-128)+ja>>Aa;for(e=_a;e<Sa;++e)t=76283*(e-16)+ja>>Aa,Ma[e-_a]=We(t,255),Oa[e-_a]=We(t+8>>4,15);La=1}return 1}function fe(e){var n=e.ma,r=e.U,a=e.T;return t(!(1&e.ka)),0>=r||0>=a?0:(r=n.Ib(e,n),null!=n.Jb&&n.Jb(e,n,r),n.Dc+=r,1)}function pe(e){e.ma.memory=null}function me(e,t,n,r){return 47!=y(e,8)?0:(t[0]=y(e,14)+1,n[0]=y(e,14)+1,r[0]=y(e,1),0!=y(e,3)?0:!e.h)}function ge(e,t){if(4>e)return e+1;var n=e-2>>1;return(2+(1&e)<<n)+y(t,n)+1}function ve(e,t){return 120<t?t-120:1<=(n=((n=Zr[t-1])>>4)*e+(8-(15&n)))?n:1;var n}function be(e,t,n){var r=k(n),a=e[t+=255&r].g-8;return 0<a&&(A(n,n.u+8),r=k(n),t+=e[t].value,t+=r&(1<<a)-1),A(n,n.u+e[t].g),e[t].value}function ye(e,n,r){return r.g+=e.g,r.value+=e.value<<n>>>0,t(8>=r.g),e.g}function xe(e,n,r){var a=e.xc;return t((n=0==a?0:e.vc[e.md*(r>>a)+(n>>a)])<e.Wb),e.Ya[n]}function we(e,n,a,i){var s=e.ab,o=e.c*n,l=e.C;n=l+n;var c=a,u=i;for(i=e.Ta,a=e.Ua;0<s--;){var d=e.gc[s],h=l,f=n,p=c,m=u,g=(u=i,c=a,d.Ea);switch(t(h<f),t(f<=d.nc),d.hc){case 2:Gn(p,m,(f-h)*g,u,c);break;case 0:var v=h,b=f,y=u,x=c,w=(_=d).Ea;0==v&&(Hn(p,m,null,null,1,y,x),W(p,m+1,0,0,w-1,y,x+1),m+=w,x+=w,++v);for(var k=1<<_.b,N=k-1,A=D(w,_.b),j=_.K,_=_.w+(v>>_.b)*A;v<b;){var S=j,C=_,E=1;for(Wn(p,m,y,x-w,1,y,x);E<w;){var L=(E&~N)+k;L>w&&(L=w),(0,Zn[S[C++]>>8&15])(p,m+ +E,y,x+E-w,L-E,y,x+E),E=L}m+=w,x+=w,++v&N||(_+=A)}f!=d.nc&&r(u,c-g,u,c+(f-h-1)*g,g);break;case 1:for(g=p,b=m,w=(p=d.Ea)-(x=p&~(y=(m=1<<d.b)-1)),v=D(p,d.b),k=d.K,d=d.w+(h>>d.b)*v;h<f;){for(N=k,A=d,j=new B,_=b+x,S=b+p;b<_;)$(N[A++],j),Jn(j,g,b,m,u,c),b+=m,c+=m;b<S&&($(N[A++],j),Jn(j,g,b,w,u,c),b+=w,c+=w),++h&y||(d+=v)}break;case 3:if(p==u&&m==c&&0<d.b){for(b=u,p=g=c+(f-h)*g-(x=(f-h)*D(d.Ea,d.b)),m=u,y=c,v=[],x=(w=x)-1;0<=x;--x)v[x]=m[y+x];for(x=w-1;0<=x;--x)b[p+x]=v[x];$n(d,h,f,u,g,u,c)}else $n(d,h,f,p,m,u,c)}c=i,u=a}u!=a&&r(i,a,c,u,o)}function ke(e,n){var r=e.V,a=e.Ba+e.c*e.C,i=n-e.C;if(t(n<=e.l.o),t(16>=i),0<i){var s=e.l,o=e.Ta,l=e.Ua,c=s.width;if(we(e,i,r,a),i=l=[l],t((r=e.C)<(a=n)),t(s.v<s.va),a>s.o&&(a=s.o),r<s.j){var u=s.j-r;r=s.j,i[0]+=u*c}if(r>=a?r=0:(i[0]+=4*s.v,s.ka=r-s.j,s.U=s.va-s.v,s.T=a-r,r=1),r){if(l=l[0],11>(r=e.ca).S){var d=r.f.RGBA,h=(a=r.S,i=s.U,s=s.T,u=d.eb,d.A),f=s;for(d=d.fb+e.Ma*d.A;0<f--;){var p=o,m=l,g=i,v=u,b=d;switch(a){case Mr:Qn(p,m,g,v,b);break;case Or:er(p,m,g,v,b);break;case Ur:er(p,m,g,v,b),kr(v,b,0,g,1,0);break;case Dr:rr(p,m,g,v,b);break;case Ir:te(p,m,g,v,b,1);break;case Vr:te(p,m,g,v,b,1),kr(v,b,0,g,1,0);break;case zr:te(p,m,g,v,b,0);break;case Hr:te(p,m,g,v,b,0),kr(v,b,1,g,1,0);break;case Br:tr(p,m,g,v,b);break;case Wr:tr(p,m,g,v,b),Nr(v,b,g,1,0);break;case qr:nr(p,m,g,v,b);break;default:t(0)}l+=c,d+=h}e.Ma+=s}else alert("todo:EmitRescaledRowsYUVA");t(e.Ma<=r.height)}}e.C=n,t(e.C<=e.i)}function Ne(e){var t;if(0<e.ua)return 0;for(t=0;t<e.Wb;++t){var n=e.Ya[t].G,r=e.Ya[t].H;if(0<n[1][r[1]+0].g||0<n[2][r[2]+0].g||0<n[3][r[3]+0].g)return 0}return 1}function Ae(e,n,r,a,i,s){if(0!=e.Z){var o=e.qd,l=e.rd;for(t(null!=ma[e.Z]);n<r;++n)ma[e.Z](o,l,a,i,a,i,s),o=a,l=i,i+=s;e.qd=o,e.rd=l}}function je(e,n){var r=e.l.ma,a=0==r.Z||1==r.Z?e.l.j:e.C;if(a=e.C<a?a:e.C,t(n<=e.l.o),n>a){var i=e.l.width,s=r.ca,o=r.tb+i*a,l=e.V,c=e.Ba+e.c*a,u=e.gc;t(1==e.ab),t(3==u[0].hc),Kn(u[0],a,n,l,c,s,o),Ae(r,a,n,s,o,i)}e.C=e.Ma=n}function _e(e,n,r,a,i,s,o){var l=e.$/a,c=e.$%a,u=e.m,d=e.s,h=r+e.$,f=h;i=r+a*i;var p=r+a*s,m=280+d.ua,g=e.Pb?l:16777216,v=0<d.ua?d.Wa:null,b=d.wc,y=h<p?xe(d,c,l):null;t(e.C<s),t(p<=i);var x=!1;e:for(;;){for(;x||h<p;){var w=0;if(l>=g){var _=h-r;t((g=e).Pb),g.wd=g.m,g.xd=_,0<g.s.ua&&F(g.s.Wa,g.s.vb),g=l+Qr}if(c&b||(y=xe(d,c,l)),t(null!=y),y.Qb&&(n[h]=y.qb,x=!0),!x)if(j(u),y.jc){w=u,_=n;var S=h,C=y.pd[k(w)&In-1];t(y.jc),256>C.g?(A(w,w.u+C.g),_[S]=C.value,w=0):(A(w,w.u+C.g-256),t(256<=C.value),w=C.value),0==w&&(x=!0)}else w=be(y.G[0],y.H[0],u);if(u.h)break;if(x||256>w){if(!x)if(y.nd)n[h]=(y.qb|w<<8)>>>0;else{if(j(u),x=be(y.G[1],y.H[1],u),j(u),_=be(y.G[2],y.H[2],u),S=be(y.G[3],y.H[3],u),u.h)break;n[h]=(S<<24|x<<16|w<<8|_)>>>0}if(x=!1,++h,++c>=a&&(c=0,++l,null!=o&&l<=s&&!(l%16)&&o(e,l),null!=v))for(;f<h;)w=n[f++],v.X[(506832829*w&4294967295)>>>v.Mb]=w}else if(280>w){if(w=ge(w-256,u),_=be(y.G[4],y.H[4],u),j(u),_=ve(a,_=ge(_,u)),u.h)break;if(h-r<_||i-h<w)break e;for(S=0;S<w;++S)n[h+S]=n[h+S-_];for(h+=w,c+=w;c>=a;)c-=a,++l,null!=o&&l<=s&&!(l%16)&&o(e,l);if(t(h<=i),c&b&&(y=xe(d,c,l)),null!=v)for(;f<h;)w=n[f++],v.X[(506832829*w&4294967295)>>>v.Mb]=w}else{if(!(w<m))break e;for(x=w-280,t(null!=v);f<h;)w=n[f++],v.X[(506832829*w&4294967295)>>>v.Mb]=w;w=h,t(!(x>>>(_=v).Xa)),n[w]=_.X[x],x=!0}x||t(u.h==N(u))}if(e.Pb&&u.h&&h<i)t(e.m.h),e.a=5,e.m=e.wd,e.$=e.xd,0<e.s.ua&&F(e.s.vb,e.s.Wa);else{if(u.h)break e;null!=o&&o(e,l>s?s:l),e.a=0,e.$=h-r}return 1}return e.a=3,0}function Se(e){t(null!=e),e.vc=null,e.yc=null,e.Ya=null;var n=e.Wa;null!=n&&(n.X=null),e.vb=null,t(null!=e)}function Ce(){var t=new sn;return null==t?null:(t.a=0,t.xb=pa,ne("Predictor","VP8LPredictors"),ne("Predictor","VP8LPredictors_C"),ne("PredictorAdd","VP8LPredictorsAdd"),ne("PredictorAdd","VP8LPredictorsAdd_C"),Gn=G,Jn=Y,Qn=X,er=Z,tr=J,nr=Q,rr=ee,e.VP8LMapColor32b=Yn,e.VP8LMapColor8b=Xn,t)}function Ee(e,n,r,o,l){var c=1,h=[e],p=[n],m=o.m,g=o.s,v=null,b=0;e:for(;;){if(r)for(;c&&y(m,1);){var x=h,w=p,N=o,_=1,S=N.m,C=N.gc[N.ab],E=y(S,2);if(N.Oc&1<<E)c=0;else{switch(N.Oc|=1<<E,C.hc=E,C.Ea=x[0],C.nc=w[0],C.K=[null],++N.ab,t(4>=N.ab),E){case 0:case 1:C.b=y(S,3)+2,_=Ee(D(C.Ea,C.b),D(C.nc,C.b),0,N,C.K),C.K=C.K[0];break;case 3:var L,P=y(S,8)+1,T=16<P?0:4<P?1:2<P?2:3;if(x[0]=D(C.Ea,T),C.b=T,L=_=Ee(P,1,0,N,C.K)){var F,M=P,O=C,z=1<<(8>>O.b),B=i(z);if(null==B)L=0;else{var q=O.K[0],U=O.w;for(B[0]=O.K[0][0],F=1;F<1*M;++F)B[F]=I(q[U+F],B[F-1]);for(;F<4*z;++F)B[F]=0;O.K[0]=null,O.K[0]=B,L=1}}_=L;break;case 2:break;default:t(0)}c=_}}if(h=h[0],p=p[0],c&&y(m,1)&&!(c=1<=(b=y(m,4))&&11>=b)){o.a=3;break e}var V;if(V=c)t:{var H,W,G,$=o,Y=h,K=p,X=b,Z=r,J=$.m,Q=$.s,ee=[null],te=1,ne=0,re=Jr[X];n:for(;;){if(Z&&y(J,1)){var ae=y(J,3)+2,ie=D(Y,ae),se=D(K,ae),oe=ie*se;if(!Ee(ie,se,0,$,ee))break n;for(ee=ee[0],Q.xc=ae,H=0;H<oe;++H){var le=ee[H]>>8&65535;ee[H]=le,le>=te&&(te=le+1)}}if(J.h)break n;for(W=0;5>W;++W){var ce=Yr[W];!W&&0<X&&(ce+=1<<X),ne<ce&&(ne=ce)}var ue=s(te*re,d),de=te,he=s(de,f);if(null==he)var fe=null;else t(65536>=de),fe=he;var pe=i(ne);if(null==fe||null==pe||null==ue){$.a=1;break n}var me=ue;for(H=G=0;H<te;++H){var ge=fe[H],ve=ge.G,be=ge.H,xe=0,we=1,ke=0;for(W=0;5>W;++W){ce=Yr[W],ve[W]=me,be[W]=G,!W&&0<X&&(ce+=1<<X);r:{var Ne,Ae=ce,je=$,Ce=pe,Le=me,Pe=G,Te=0,Re=je.m,Fe=y(Re,1);if(a(Ce,0,0,Ae),Fe){var Me=y(Re,1)+1,Oe=y(Re,1),De=y(Re,0==Oe?1:8);Ce[De]=1,2==Me&&(Ce[De=y(Re,8)]=1);var Ie=1}else{var ze=i(19),Be=y(Re,4)+4;if(19<Be){je.a=3;var qe=0;break r}for(Ne=0;Ne<Be;++Ne)ze[Xr[Ne]]=y(Re,3);var Ue=void 0,Ve=void 0,He=je,We=ze,Ge=Ae,$e=Ce,Ye=0,Ke=He.m,Xe=8,Ze=s(128,d);a:for(;u(Ze,0,7,We,19);){if(y(Ke,1)){var Je=2+2*y(Ke,3);if((Ue=2+y(Ke,Je))>Ge)break a}else Ue=Ge;for(Ve=0;Ve<Ge&&Ue--;){j(Ke);var Qe=Ze[0+(127&k(Ke))];A(Ke,Ke.u+Qe.g);var et=Qe.value;if(16>et)$e[Ve++]=et,0!=et&&(Xe=et);else{var tt=16==et,nt=et-16,rt=$r[nt],at=y(Ke,Gr[nt])+rt;if(Ve+at>Ge)break a;for(var it=tt?Xe:0;0<at--;)$e[Ve++]=it}}Ye=1;break a}Ye||(He.a=3),Ie=Ye}(Ie=Ie&&!Re.h)&&(Te=u(Le,Pe,8,Ce,Ae)),Ie&&0!=Te?qe=Te:(je.a=3,qe=0)}if(0==qe)break n;if(we&&1==Kr[W]&&(we=0==me[G].g),xe+=me[G].g,G+=qe,3>=W){var st,ot=pe[0];for(st=1;st<ce;++st)pe[st]>ot&&(ot=pe[st]);ke+=ot}}if(ge.nd=we,ge.Qb=0,we&&(ge.qb=(ve[3][be[3]+0].value<<24|ve[1][be[1]+0].value<<16|ve[2][be[2]+0].value)>>>0,0==xe&&256>ve[0][be[0]+0].value&&(ge.Qb=1,ge.qb+=ve[0][be[0]+0].value<<8)),ge.jc=!ge.Qb&&6>ke,ge.jc){var lt,ct=ge;for(lt=0;lt<In;++lt){var ut=lt,dt=ct.pd[ut],ht=ct.G[0][ct.H[0]+ut];256<=ht.value?(dt.g=ht.g+256,dt.value=ht.value):(dt.g=0,dt.value=0,ut>>=ye(ht,8,dt),ut>>=ye(ct.G[1][ct.H[1]+ut],16,dt),ut>>=ye(ct.G[2][ct.H[2]+ut],0,dt),ye(ct.G[3][ct.H[3]+ut],24,dt))}}}Q.vc=ee,Q.Wb=te,Q.Ya=fe,Q.yc=ue,V=1;break t}V=0}if(!(c=V)){o.a=3;break e}if(0<b){if(g.ua=1<<b,!R(g.Wa,b)){o.a=1,c=0;break e}}else g.ua=0;var ft=o,pt=h,mt=p,gt=ft.s,vt=gt.xc;if(ft.c=pt,ft.i=mt,gt.md=D(pt,vt),gt.wc=0==vt?-1:(1<<vt)-1,r){o.xb=fa;break e}if(null==(v=i(h*p))){o.a=1,c=0;break e}c=(c=_e(o,v,0,h,p,p,null))&&!m.h;break e}return c?(null!=l?l[0]=v:(t(null==v),t(r)),o.$=0,r||Se(g)):Se(g),c}function Le(e,n){var r=e.c*e.i,a=r+n+16*n;return t(e.c<=n),e.V=i(a),null==e.V?(e.Ta=null,e.Ua=0,e.a=1,0):(e.Ta=e.V,e.Ua=e.Ba+r+n,1)}function Pe(e,n){var r=e.C,a=n-r,i=e.V,s=e.Ba+e.c*r;for(t(n<=e.l.o);0<a;){var o=16<a?16:a,l=e.l.ma,c=e.l.width,u=c*o,d=l.ca,h=l.tb+c*r,f=e.Ta,p=e.Ua;we(e,o,i,s),jr(f,p,d,h,u),Ae(l,r,r+o,d,h,c),a-=o,i+=o*e.c,r+=o}t(r==n),e.C=e.Ma=n}function Te(){this.ub=this.yd=this.td=this.Rb=0}function Re(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function Fe(){this.Fb=this.Bb=this.Cb=0,this.Zb=i(4),this.Lb=i(4)}function Me(){this.Yb=function(){var e=[];return function e(t,n,r){for(var a=r[n],i=0;i<a&&(t.push(r.length>n+1?[]:0),!(r.length<n+1));i++)e(t[i],n+1,r)}(e,0,[3,11]),e}()}function Oe(){this.jb=i(3),this.Wc=o([4,8],Me),this.Xc=o([4,17],Me)}function De(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new i(4),this.od=new i(4)}function Ie(){this.ld=this.La=this.dd=this.tc=0}function ze(){this.Na=this.la=0}function Be(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function qe(){this.ad=i(384),this.Za=0,this.Ob=i(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Ue(){this.uc=this.M=this.Nb=0,this.wa=Array(new Ie),this.Y=0,this.ya=Array(new qe),this.aa=0,this.l=new Ge}function Ve(){this.y=i(16),this.f=i(8),this.ea=i(8)}function He(){this.cb=this.a=0,this.sc="",this.m=new x,this.Od=new Te,this.Kc=new Re,this.ed=new De,this.Qa=new Fe,this.Ic=this.$c=this.Aa=0,this.D=new Ue,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=s(8,x),this.ia=0,this.pb=s(4,Be),this.Pa=new Oe,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new Ve),this.Hd=0,this.rb=Array(new ze),this.sb=0,this.wa=Array(new Ie),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new qe),this.L=this.aa=0,this.gd=o([4,2],Ie),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function We(e,t){return 0>e?0:e>t?t:e}function Ge(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma="void",this.put="VP8IoPutHook",this.ac="VP8IoSetupHook",this.bc="VP8IoTeardownHook",this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function $e(){var e=new He;return null!=e&&(e.a=0,e.sc="OK",e.cb=0,e.Xb=0,na||(na=Ze)),e}function Ye(e,t,n){return 0==e.a&&(e.a=t,e.sc=n,e.cb=0),0}function Ke(e,t,n){return 3<=n&&157==e[t+0]&&1==e[t+1]&&42==e[t+2]}function Xe(e,n){if(null==e)return 0;if(e.a=0,e.sc="OK",null==n)return Ye(e,2,"null VP8Io passed to VP8GetHeaders()");var r=n.data,i=n.w,s=n.ha;if(4>s)return Ye(e,7,"Truncated header.");var o=r[i+0]|r[i+1]<<8|r[i+2]<<16,l=e.Od;if(l.Rb=!(1&o),l.td=o>>1&7,l.yd=o>>4&1,l.ub=o>>5,3<l.td)return Ye(e,3,"Incorrect keyframe parameters.");if(!l.yd)return Ye(e,4,"Frame not displayable.");i+=3,s-=3;var c=e.Kc;if(l.Rb){if(7>s)return Ye(e,7,"cannot parse picture header");if(!Ke(r,i,s))return Ye(e,3,"Bad code word");c.c=16383&(r[i+4]<<8|r[i+3]),c.Td=r[i+4]>>6,c.i=16383&(r[i+6]<<8|r[i+5]),c.Ud=r[i+6]>>6,i+=7,s-=7,e.za=c.c+15>>4,e.Ub=c.i+15>>4,n.width=c.c,n.height=c.i,n.Da=0,n.j=0,n.v=0,n.va=n.width,n.o=n.height,n.da=0,n.ib=n.width,n.hb=n.height,n.U=n.width,n.T=n.height,a((o=e.Pa).jb,0,255,o.jb.length),t(null!=(o=e.Qa)),o.Cb=0,o.Bb=0,o.Fb=1,a(o.Zb,0,0,o.Zb.length),a(o.Lb,0,0,o.Lb)}if(l.ub>s)return Ye(e,7,"bad partition length");p(o=e.m,r,i,l.ub),i+=l.ub,s-=l.ub,l.Rb&&(c.Ld=S(o),c.Kd=S(o)),c=e.Qa;var u,d=e.Pa;if(t(null!=o),t(null!=c),c.Cb=S(o),c.Cb){if(c.Bb=S(o),S(o)){for(c.Fb=S(o),u=0;4>u;++u)c.Zb[u]=S(o)?g(o,7):0;for(u=0;4>u;++u)c.Lb[u]=S(o)?g(o,6):0}if(c.Bb)for(u=0;3>u;++u)d.jb[u]=S(o)?m(o,8):255}else c.Bb=0;if(o.Ka)return Ye(e,3,"cannot parse segment header");if((c=e.ed).zd=S(o),c.Tb=m(o,6),c.wb=m(o,3),c.Pc=S(o),c.Pc&&S(o)){for(d=0;4>d;++d)S(o)&&(c.vd[d]=g(o,6));for(d=0;4>d;++d)S(o)&&(c.od[d]=g(o,6))}if(e.L=0==c.Tb?0:c.zd?1:2,o.Ka)return Ye(e,3,"cannot parse filter header");var h=s;if(s=u=i,i=u+h,c=h,e.Xb=(1<<m(e.m,2))-1,h<3*(d=e.Xb))r=7;else{for(u+=3*d,c-=3*d,h=0;h<d;++h){var f=r[s+0]|r[s+1]<<8|r[s+2]<<16;f>c&&(f=c),p(e.Jc[+h],r,u,f),u+=f,c-=f,s+=3}p(e.Jc[+d],r,u,c),r=u<i?0:5}if(0!=r)return Ye(e,r,"cannot parse partitions");for(r=m(u=e.m,7),s=S(u)?g(u,4):0,i=S(u)?g(u,4):0,c=S(u)?g(u,4):0,d=S(u)?g(u,4):0,u=S(u)?g(u,4):0,h=e.Qa,f=0;4>f;++f){if(h.Cb){var v=h.Zb[f];h.Fb||(v+=r)}else{if(0<f){e.pb[f]=e.pb[0];continue}v=r}var b=e.pb[f];b.Sc[0]=ea[We(v+s,127)],b.Sc[1]=ta[We(v+0,127)],b.Eb[0]=2*ea[We(v+i,127)],b.Eb[1]=101581*ta[We(v+c,127)]>>16,8>b.Eb[1]&&(b.Eb[1]=8),b.Qc[0]=ea[We(v+d,117)],b.Qc[1]=ta[We(v+u,127)],b.lc=v+u}if(!l.Rb)return Ye(e,4,"Not a key frame.");for(S(o),l=e.Pa,r=0;4>r;++r){for(s=0;8>s;++s)for(i=0;3>i;++i)for(c=0;11>c;++c)d=C(o,la[r][s][i][c])?m(o,8):sa[r][s][i][c],l.Wc[r][s].Yb[i][c]=d;for(s=0;17>s;++s)l.Xc[r][s]=l.Wc[r][ca[s]]}return e.kc=S(o),e.kc&&(e.Bd=m(o,8)),e.cb=1}function Ze(e,t,n,r,a,i,s){var o=t[a].Yb[n];for(n=0;16>a;++a){if(!C(e,o[n+0]))return a;for(;!C(e,o[n+1]);)if(o=t[++a].Yb[0],n=0,16==a)return 16;var l=t[a+1].Yb;if(C(e,o[n+2])){var c=e,u=0;if(C(c,(h=o)[(d=n)+3]))if(C(c,h[d+6])){for(o=0,d=2*(u=C(c,h[d+8]))+(h=C(c,h[d+9+u])),u=0,h=ra[d];h[o];++o)u+=u+C(c,h[o]);u+=3+(8<<d)}else C(c,h[d+7])?(u=7+2*C(c,165),u+=C(c,145)):u=5+C(c,159);else u=C(c,h[d+4])?3+C(c,h[d+5]):2;o=l[2]}else u=1,o=l[1];l=s+aa[a],0>(c=e).b&&_(c);var d,h=c.b,f=(d=c.Ca>>1)-(c.I>>h)>>31;--c.b,c.Ca+=f,c.Ca|=1,c.I-=(d+1&f)<<h,i[l]=((u^f)-f)*r[(0<a)+0]}return 16}function Je(e){var t=e.rb[e.sb-1];t.la=0,t.Na=0,a(e.zc,0,0,e.zc.length),e.ja=0}function Qe(e,t,n,r,a){a=e[t+n+32*r]+(a>>3),e[t+n+32*r]=-256&a?0>a?0:255:a}function et(e,t,n,r,a,i){Qe(e,t,0,n,r+a),Qe(e,t,1,n,r+i),Qe(e,t,2,n,r-i),Qe(e,t,3,n,r-a)}function tt(e){return(20091*e>>16)+e}function nt(e,t,n,r){var a,s=0,o=i(16);for(a=0;4>a;++a){var l=e[t+0]+e[t+8],c=e[t+0]-e[t+8],u=(35468*e[t+4]>>16)-tt(e[t+12]),d=tt(e[t+4])+(35468*e[t+12]>>16);o[s+0]=l+d,o[s+1]=c+u,o[s+2]=c-u,o[s+3]=l-d,s+=4,t++}for(a=s=0;4>a;++a)l=(e=o[s+0]+4)+o[s+8],c=e-o[s+8],u=(35468*o[s+4]>>16)-tt(o[s+12]),Qe(n,r,0,0,l+(d=tt(o[s+4])+(35468*o[s+12]>>16))),Qe(n,r,1,0,c+u),Qe(n,r,2,0,c-u),Qe(n,r,3,0,l-d),s++,r+=32}function rt(e,t,n,r){var a=e[t+0]+4,i=35468*e[t+4]>>16,s=tt(e[t+4]),o=35468*e[t+1]>>16;et(n,r,0,a+s,e=tt(e[t+1]),o),et(n,r,1,a+i,e,o),et(n,r,2,a-i,e,o),et(n,r,3,a-s,e,o)}function at(e,t,n,r,a){nt(e,t,n,r),a&&nt(e,t+16,n,r+4)}function it(e,t,n,r){ir(e,t+0,n,r,1),ir(e,t+32,n,r+128,1)}function st(e,t,n,r){var a;for(e=e[t+0]+4,a=0;4>a;++a)for(t=0;4>t;++t)Qe(n,r,t,a,e)}function ot(e,t,n,r){e[t+0]&&lr(e,t+0,n,r),e[t+16]&&lr(e,t+16,n,r+4),e[t+32]&&lr(e,t+32,n,r+128),e[t+48]&&lr(e,t+48,n,r+128+4)}function lt(e,t,n,r){var a,s=i(16);for(a=0;4>a;++a){var o=e[t+0+a]+e[t+12+a],l=e[t+4+a]+e[t+8+a],c=e[t+4+a]-e[t+8+a],u=e[t+0+a]-e[t+12+a];s[0+a]=o+l,s[8+a]=o-l,s[4+a]=u+c,s[12+a]=u-c}for(a=0;4>a;++a)o=(e=s[0+4*a]+3)+s[3+4*a],l=s[1+4*a]+s[2+4*a],c=s[1+4*a]-s[2+4*a],u=e-s[3+4*a],n[r+0]=o+l>>3,n[r+16]=u+c>>3,n[r+32]=o-l>>3,n[r+48]=u-c>>3,r+=64}function ct(e,t,n){var r,a=t-32,i=Rr,s=255-e[a-1];for(r=0;r<n;++r){var o,l=i,c=s+e[t-1];for(o=0;o<n;++o)e[t+o]=l[c+e[a+o]];t+=32}}function ut(e,t){ct(e,t,4)}function dt(e,t){ct(e,t,8)}function ht(e,t){ct(e,t,16)}function ft(e,t){var n;for(n=0;16>n;++n)r(e,t+32*n,e,t-32,16)}function pt(e,t){var n;for(n=16;0<n;--n)a(e,t,e[t-1],16),t+=32}function mt(e,t,n){var r;for(r=0;16>r;++r)a(t,n+32*r,e,16)}function gt(e,t){var n,r=16;for(n=0;16>n;++n)r+=e[t-1+32*n]+e[t+n-32];mt(r>>5,e,t)}function vt(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t-1+32*n];mt(r>>4,e,t)}function bt(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t+n-32];mt(r>>4,e,t)}function yt(e,t){mt(128,e,t)}function xt(e,t,n){return e+2*t+n+2>>2}function wt(e,t){var n,a=t-32;for(a=new Uint8Array([xt(e[a-1],e[a+0],e[a+1]),xt(e[a+0],e[a+1],e[a+2]),xt(e[a+1],e[a+2],e[a+3]),xt(e[a+2],e[a+3],e[a+4])]),n=0;4>n;++n)r(e,t+32*n,a,0,a.length)}function kt(e,t){var n=e[t-1],r=e[t-1+32],a=e[t-1+64],i=e[t-1+96];E(e,t+0,16843009*xt(e[t-1-32],n,r)),E(e,t+32,16843009*xt(n,r,a)),E(e,t+64,16843009*xt(r,a,i)),E(e,t+96,16843009*xt(a,i,i))}function Nt(e,t){var n,r=4;for(n=0;4>n;++n)r+=e[t+n-32]+e[t-1+32*n];for(r>>=3,n=0;4>n;++n)a(e,t+32*n,r,4)}function At(e,t){var n=e[t-1+0],r=e[t-1+32],a=e[t-1+64],i=e[t-1-32],s=e[t+0-32],o=e[t+1-32],l=e[t+2-32],c=e[t+3-32];e[t+0+96]=xt(r,a,e[t-1+96]),e[t+1+96]=e[t+0+64]=xt(n,r,a),e[t+2+96]=e[t+1+64]=e[t+0+32]=xt(i,n,r),e[t+3+96]=e[t+2+64]=e[t+1+32]=e[t+0+0]=xt(s,i,n),e[t+3+64]=e[t+2+32]=e[t+1+0]=xt(o,s,i),e[t+3+32]=e[t+2+0]=xt(l,o,s),e[t+3+0]=xt(c,l,o)}function jt(e,t){var n=e[t+1-32],r=e[t+2-32],a=e[t+3-32],i=e[t+4-32],s=e[t+5-32],o=e[t+6-32],l=e[t+7-32];e[t+0+0]=xt(e[t+0-32],n,r),e[t+1+0]=e[t+0+32]=xt(n,r,a),e[t+2+0]=e[t+1+32]=e[t+0+64]=xt(r,a,i),e[t+3+0]=e[t+2+32]=e[t+1+64]=e[t+0+96]=xt(a,i,s),e[t+3+32]=e[t+2+64]=e[t+1+96]=xt(i,s,o),e[t+3+64]=e[t+2+96]=xt(s,o,l),e[t+3+96]=xt(o,l,l)}function _t(e,t){var n=e[t-1+0],r=e[t-1+32],a=e[t-1+64],i=e[t-1-32],s=e[t+0-32],o=e[t+1-32],l=e[t+2-32],c=e[t+3-32];e[t+0+0]=e[t+1+64]=i+s+1>>1,e[t+1+0]=e[t+2+64]=s+o+1>>1,e[t+2+0]=e[t+3+64]=o+l+1>>1,e[t+3+0]=l+c+1>>1,e[t+0+96]=xt(a,r,n),e[t+0+64]=xt(r,n,i),e[t+0+32]=e[t+1+96]=xt(n,i,s),e[t+1+32]=e[t+2+96]=xt(i,s,o),e[t+2+32]=e[t+3+96]=xt(s,o,l),e[t+3+32]=xt(o,l,c)}function St(e,t){var n=e[t+0-32],r=e[t+1-32],a=e[t+2-32],i=e[t+3-32],s=e[t+4-32],o=e[t+5-32],l=e[t+6-32],c=e[t+7-32];e[t+0+0]=n+r+1>>1,e[t+1+0]=e[t+0+64]=r+a+1>>1,e[t+2+0]=e[t+1+64]=a+i+1>>1,e[t+3+0]=e[t+2+64]=i+s+1>>1,e[t+0+32]=xt(n,r,a),e[t+1+32]=e[t+0+96]=xt(r,a,i),e[t+2+32]=e[t+1+96]=xt(a,i,s),e[t+3+32]=e[t+2+96]=xt(i,s,o),e[t+3+64]=xt(s,o,l),e[t+3+96]=xt(o,l,c)}function Ct(e,t){var n=e[t-1+0],r=e[t-1+32],a=e[t-1+64],i=e[t-1+96];e[t+0+0]=n+r+1>>1,e[t+2+0]=e[t+0+32]=r+a+1>>1,e[t+2+32]=e[t+0+64]=a+i+1>>1,e[t+1+0]=xt(n,r,a),e[t+3+0]=e[t+1+32]=xt(r,a,i),e[t+3+32]=e[t+1+64]=xt(a,i,i),e[t+3+64]=e[t+2+64]=e[t+0+96]=e[t+1+96]=e[t+2+96]=e[t+3+96]=i}function Et(e,t){var n=e[t-1+0],r=e[t-1+32],a=e[t-1+64],i=e[t-1+96],s=e[t-1-32],o=e[t+0-32],l=e[t+1-32],c=e[t+2-32];e[t+0+0]=e[t+2+32]=n+s+1>>1,e[t+0+32]=e[t+2+64]=r+n+1>>1,e[t+0+64]=e[t+2+96]=a+r+1>>1,e[t+0+96]=i+a+1>>1,e[t+3+0]=xt(o,l,c),e[t+2+0]=xt(s,o,l),e[t+1+0]=e[t+3+32]=xt(n,s,o),e[t+1+32]=e[t+3+64]=xt(r,n,s),e[t+1+64]=e[t+3+96]=xt(a,r,n),e[t+1+96]=xt(i,a,r)}function Lt(e,t){var n;for(n=0;8>n;++n)r(e,t+32*n,e,t-32,8)}function Pt(e,t){var n;for(n=0;8>n;++n)a(e,t,e[t-1],8),t+=32}function Tt(e,t,n){var r;for(r=0;8>r;++r)a(t,n+32*r,e,8)}function Rt(e,t){var n,r=8;for(n=0;8>n;++n)r+=e[t+n-32]+e[t-1+32*n];Tt(r>>4,e,t)}function Ft(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t+n-32];Tt(r>>3,e,t)}function Mt(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t-1+32*n];Tt(r>>3,e,t)}function Ot(e,t){Tt(128,e,t)}function Dt(e,t,n){var r=e[t-n],a=e[t+0],i=3*(a-r)+Pr[1020+e[t-2*n]-e[t+n]],s=Tr[112+(i+4>>3)];e[t-n]=Rr[255+r+Tr[112+(i+3>>3)]],e[t+0]=Rr[255+a-s]}function It(e,t,n,r){var a=e[t+0],i=e[t+n];return Fr[255+e[t-2*n]-e[t-n]]>r||Fr[255+i-a]>r}function zt(e,t,n,r){return 4*Fr[255+e[t-n]-e[t+0]]+Fr[255+e[t-2*n]-e[t+n]]<=r}function Bt(e,t,n,r,a){var i=e[t-3*n],s=e[t-2*n],o=e[t-n],l=e[t+0],c=e[t+n],u=e[t+2*n],d=e[t+3*n];return 4*Fr[255+o-l]+Fr[255+s-c]>r?0:Fr[255+e[t-4*n]-i]<=a&&Fr[255+i-s]<=a&&Fr[255+s-o]<=a&&Fr[255+d-u]<=a&&Fr[255+u-c]<=a&&Fr[255+c-l]<=a}function qt(e,t,n,r){var a=2*r+1;for(r=0;16>r;++r)zt(e,t+r,n,a)&&Dt(e,t+r,n)}function Ut(e,t,n,r){var a=2*r+1;for(r=0;16>r;++r)zt(e,t+r*n,1,a)&&Dt(e,t+r*n,1)}function Vt(e,t,n,r){var a;for(a=3;0<a;--a)qt(e,t+=4*n,n,r)}function Ht(e,t,n,r){var a;for(a=3;0<a;--a)Ut(e,t+=4,n,r)}function Wt(e,t,n,r,a,i,s,o){for(i=2*i+1;0<a--;){if(Bt(e,t,n,i,s))if(It(e,t,n,o))Dt(e,t,n);else{var l=e,c=t,u=n,d=l[c-2*u],h=l[c-u],f=l[c+0],p=l[c+u],m=l[c+2*u],g=27*(b=Pr[1020+3*(f-h)+Pr[1020+d-p]])+63>>7,v=18*b+63>>7,b=9*b+63>>7;l[c-3*u]=Rr[255+l[c-3*u]+b],l[c-2*u]=Rr[255+d+v],l[c-u]=Rr[255+h+g],l[c+0]=Rr[255+f-g],l[c+u]=Rr[255+p-v],l[c+2*u]=Rr[255+m-b]}t+=r}}function Gt(e,t,n,r,a,i,s,o){for(i=2*i+1;0<a--;){if(Bt(e,t,n,i,s))if(It(e,t,n,o))Dt(e,t,n);else{var l=e,c=t,u=n,d=l[c-u],h=l[c+0],f=l[c+u],p=Tr[112+(4+(m=3*(h-d))>>3)],m=Tr[112+(m+3>>3)],g=p+1>>1;l[c-2*u]=Rr[255+l[c-2*u]+g],l[c-u]=Rr[255+d+m],l[c+0]=Rr[255+h-p],l[c+u]=Rr[255+f-g]}t+=r}}function $t(e,t,n,r,a,i){Wt(e,t,n,1,16,r,a,i)}function Yt(e,t,n,r,a,i){Wt(e,t,1,n,16,r,a,i)}function Kt(e,t,n,r,a,i){var s;for(s=3;0<s;--s)Gt(e,t+=4*n,n,1,16,r,a,i)}function Xt(e,t,n,r,a,i){var s;for(s=3;0<s;--s)Gt(e,t+=4,1,n,16,r,a,i)}function Zt(e,t,n,r,a,i,s,o){Wt(e,t,a,1,8,i,s,o),Wt(n,r,a,1,8,i,s,o)}function Jt(e,t,n,r,a,i,s,o){Wt(e,t,1,a,8,i,s,o),Wt(n,r,1,a,8,i,s,o)}function Qt(e,t,n,r,a,i,s,o){Gt(e,t+4*a,a,1,8,i,s,o),Gt(n,r+4*a,a,1,8,i,s,o)}function en(e,t,n,r,a,i,s,o){Gt(e,t+4,1,a,8,i,s,o),Gt(n,r+4,1,a,8,i,s,o)}function tn(){this.ba=new se,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new le,this.memory=0,this.Ib="OutputFunc",this.Jb="OutputAlphaFunc",this.Nd="OutputRowFunc"}function nn(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function rn(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function an(){this.ua=0,this.Wa=new M,this.vb=new M,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new f,this.yc=new d}function sn(){this.xb=this.a=0,this.l=new Ge,this.ca=new se,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new w,this.Pb=0,this.wd=new w,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new an,this.ab=0,this.gc=s(4,rn),this.Oc=0}function on(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new Ge,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function ln(e,t,n,r,a,i,s){for(e=null==e?0:e[t+0],t=0;t<s;++t)a[i+t]=e+n[r+t]&255,e=a[i+t]}function cn(e,t,n,r,a,i,s){var o;if(null==e)ln(null,null,n,r,a,i,s);else for(o=0;o<s;++o)a[i+o]=e[t+o]+n[r+o]&255}function un(e,t,n,r,a,i,s){if(null==e)ln(null,null,n,r,a,i,s);else{var o,l=e[t+0],c=l,u=l;for(o=0;o<s;++o)c=u+(l=e[t+o])-c,u=n[r+o]+(-256&c?0>c?0:255:c)&255,c=l,a[i+o]=u}}function dn(e,n,a,s){var o=n.width,l=n.o;if(t(null!=e&&null!=n),0>a||0>=s||a+s>l)return null;if(!e.Cc){if(null==e.ga){var c;if(e.ga=new on,(c=null==e.ga)||(c=n.width*n.o,t(0==e.Gb.length),e.Gb=i(c),e.Uc=0,null==e.Gb?c=0:(e.mb=e.Gb,e.nb=e.Uc,e.rc=null,c=1),c=!c),!c){c=e.ga;var u=e.Fa,d=e.P,h=e.qc,f=e.mb,p=e.nb,m=d+1,g=h-1,b=c.l;if(t(null!=u&&null!=f&&null!=n),ma[0]=null,ma[1]=ln,ma[2]=cn,ma[3]=un,c.ca=f,c.tb=p,c.c=n.width,c.i=n.height,t(0<c.c&&0<c.i),1>=h)n=0;else if(c.$a=3&u[d+0],c.Z=u[d+0]>>2&3,c.Lc=u[d+0]>>4&3,d=u[d+0]>>6&3,0>c.$a||1<c.$a||4<=c.Z||1<c.Lc||d)n=0;else if(b.put=fe,b.ac=he,b.bc=pe,b.ma=c,b.width=n.width,b.height=n.height,b.Da=n.Da,b.v=n.v,b.va=n.va,b.j=n.j,b.o=n.o,c.$a)e:{t(1==c.$a),n=Ce();t:for(;;){if(null==n){n=0;break e}if(t(null!=c),c.mc=n,n.c=c.c,n.i=c.i,n.l=c.l,n.l.ma=c,n.l.width=c.c,n.l.height=c.i,n.a=0,v(n.m,u,m,g),!Ee(c.c,c.i,1,n,null))break t;if(1==n.ab&&3==n.gc[0].hc&&Ne(n.s)?(c.ic=1,u=n.c*n.i,n.Ta=null,n.Ua=0,n.V=i(u),n.Ba=0,null==n.V?(n.a=1,n=0):n=1):(c.ic=0,n=Le(n,c.c)),!n)break t;n=1;break e}c.mc=null,n=0}else n=g>=c.c*c.i;c=!n}if(c)return null;1!=e.ga.Lc?e.Ga=0:s=l-a}t(null!=e.ga),t(a+s<=l);e:{if(n=(u=e.ga).c,l=u.l.o,0==u.$a){if(m=e.rc,g=e.Vc,b=e.Fa,d=e.P+1+a*n,h=e.mb,f=e.nb+a*n,t(d<=e.P+e.qc),0!=u.Z)for(t(null!=ma[u.Z]),c=0;c<s;++c)ma[u.Z](m,g,b,d,h,f,n),m=h,g=f,f+=n,d+=n;else for(c=0;c<s;++c)r(h,f,b,d,n),m=h,g=f,f+=n,d+=n;e.rc=m,e.Vc=g}else{if(t(null!=u.mc),n=a+s,t(null!=(c=u.mc)),t(n<=c.i),c.C>=n)n=1;else if(u.ic||gn(),u.ic){u=c.V,m=c.Ba,g=c.c;var y=c.i,x=(b=1,d=c.$/g,h=c.$%g,f=c.m,p=c.s,c.$),w=g*y,k=g*n,A=p.wc,_=x<k?xe(p,h,d):null;t(x<=w),t(n<=y),t(Ne(p));t:for(;;){for(;!f.h&&x<k;){if(h&A||(_=xe(p,h,d)),t(null!=_),j(f),256>(y=be(_.G[0],_.H[0],f)))u[m+x]=y,++x,++h>=g&&(h=0,++d<=n&&!(d%16)&&je(c,d));else{if(!(280>y)){b=0;break t}y=ge(y-256,f);var S,C=be(_.G[4],_.H[4],f);if(j(f),!(x>=(C=ve(g,C=ge(C,f)))&&w-x>=y)){b=0;break t}for(S=0;S<y;++S)u[m+x+S]=u[m+x+S-C];for(x+=y,h+=y;h>=g;)h-=g,++d<=n&&!(d%16)&&je(c,d);x<k&&h&A&&(_=xe(p,h,d))}t(f.h==N(f))}je(c,d>n?n:d);break t}!b||f.h&&x<w?(b=0,c.a=f.h?5:3):c.$=x,n=b}else n=_e(c,c.V,c.Ba,c.c,c.i,n,Pe);if(!n){s=0;break e}}a+s>=l&&(e.Cc=1),s=1}if(!s)return null;if(e.Cc&&(null!=(s=e.ga)&&(s.mc=null),e.ga=null,0<e.Ga))return alert("todo:WebPDequantizeLevels"),null}return e.nb+a*o}function hn(e,t,n,r,a,i){for(;0<a--;){var s,o=e,l=t+(n?1:0),c=e,u=t+(n?0:3);for(s=0;s<r;++s){var d=c[u+4*s];255!=d&&(d*=32897,o[l+4*s+0]=o[l+4*s+0]*d>>23,o[l+4*s+1]=o[l+4*s+1]*d>>23,o[l+4*s+2]=o[l+4*s+2]*d>>23)}t+=i}}function fn(e,t,n,r,a){for(;0<r--;){var i;for(i=0;i<n;++i){var s=e[t+2*i+0],o=15&(c=e[t+2*i+1]),l=4369*o,c=(240&c|c>>4)*l>>16;e[t+2*i+0]=(240&s|s>>4)*l>>16&240|(15&s|s<<4)*l>>16>>4&15,e[t+2*i+1]=240&c|o}t+=a}}function pn(e,t,n,r,a,i,s,o){var l,c,u=255;for(c=0;c<a;++c){for(l=0;l<r;++l){var d=e[t+l];i[s+4*l]=d,u&=d}t+=n,s+=o}return 255!=u}function mn(e,t,n,r,a){var i;for(i=0;i<a;++i)n[r+i]=e[t+i]>>8}function gn(){kr=hn,Nr=fn,Ar=pn,jr=mn}function vn(n,r,a){e[n]=function(e,n,i,s,o,l,c,u,d,h,f,p,m,g,v,b,y){var x,w=y-1>>1,k=o[l+0]|c[u+0]<<16,N=d[h+0]|f[p+0]<<16;t(null!=e);var A=3*k+N+131074>>2;for(r(e[n+0],255&A,A>>16,m,g),null!=i&&(A=3*N+k+131074>>2,r(i[s+0],255&A,A>>16,v,b)),x=1;x<=w;++x){var j=o[l+x]|c[u+x]<<16,_=d[h+x]|f[p+x]<<16,S=k+j+N+_+524296,C=S+2*(j+N)>>3;A=C+k>>1,k=(S=S+2*(k+_)>>3)+j>>1,r(e[n+2*x-1],255&A,A>>16,m,g+(2*x-1)*a),r(e[n+2*x-0],255&k,k>>16,m,g+(2*x-0)*a),null!=i&&(A=S+N>>1,k=C+_>>1,r(i[s+2*x-1],255&A,A>>16,v,b+(2*x-1)*a),r(i[s+2*x+0],255&k,k>>16,v,b+(2*x+0)*a)),k=j,N=_}1&y||(A=3*k+N+131074>>2,r(e[n+y-1],255&A,A>>16,m,g+(y-1)*a),null!=i&&(A=3*N+k+131074>>2,r(i[s+y-1],255&A,A>>16,v,b+(y-1)*a)))}}function bn(){ga[Mr]=va,ga[Or]=ya,ga[Dr]=ba,ga[Ir]=xa,ga[zr]=wa,ga[Br]=ka,ga[qr]=Na,ga[Ur]=ya,ga[Vr]=xa,ga[Hr]=wa,ga[Wr]=ka}function yn(e){return e&~Ea?0>e?0:255:e>>Ca}function xn(e,t){return yn((19077*e>>8)+(26149*t>>8)-14234)}function wn(e,t,n){return yn((19077*e>>8)-(6419*t>>8)-(13320*n>>8)+8708)}function kn(e,t){return yn((19077*e>>8)+(33050*t>>8)-17685)}function Nn(e,t,n,r,a){r[a+0]=xn(e,n),r[a+1]=wn(e,t,n),r[a+2]=kn(e,t)}function An(e,t,n,r,a){r[a+0]=kn(e,t),r[a+1]=wn(e,t,n),r[a+2]=xn(e,n)}function jn(e,t,n,r,a){var i=wn(e,t,n);t=i<<3&224|kn(e,t)>>3,r[a+0]=248&xn(e,n)|i>>5,r[a+1]=t}function _n(e,t,n,r,a){var i=240&kn(e,t)|15;r[a+0]=240&xn(e,n)|wn(e,t,n)>>4,r[a+1]=i}function Sn(e,t,n,r,a){r[a+0]=255,Nn(e,t,n,r,a+1)}function Cn(e,t,n,r,a){An(e,t,n,r,a),r[a+3]=255}function En(e,t,n,r,a){Nn(e,t,n,r,a),r[a+3]=255}function Ln(t,n,r){e[t]=function(e,t,a,i,s,o,l,c,u){for(var d=c+(-2&u)*r;c!=d;)n(e[t+0],a[i+0],s[o+0],l,c),n(e[t+1],a[i+0],s[o+0],l,c+r),t+=2,++i,++o,c+=2*r;1&u&&n(e[t+0],a[i+0],s[o+0],l,c)}}function Pn(e,t,n){return 0==n?0==e?0==t?6:5:0==t?4:0:n}function Tn(e,t,n,r,a){switch(e>>>30){case 3:ir(t,n,r,a,0);break;case 2:sr(t,n,r,a);break;case 1:lr(t,n,r,a)}}function Rn(e,t){var n,i,s=t.M,o=t.Nb,l=e.oc,c=e.pc+40,u=e.oc,d=e.pc+584,h=e.oc,f=e.pc+600;for(n=0;16>n;++n)l[c+32*n-1]=129;for(n=0;8>n;++n)u[d+32*n-1]=129,h[f+32*n-1]=129;for(0<s?l[c-1-32]=u[d-1-32]=h[f-1-32]=129:(a(l,c-32-1,127,21),a(u,d-32-1,127,9),a(h,f-32-1,127,9)),i=0;i<e.za;++i){var p=t.ya[t.aa+i];if(0<i){for(n=-1;16>n;++n)r(l,c+32*n-4,l,c+32*n+12,4);for(n=-1;8>n;++n)r(u,d+32*n-4,u,d+32*n+4,4),r(h,f+32*n-4,h,f+32*n+4,4)}var m=e.Gd,g=e.Hd+i,v=p.ad,b=p.Hc;if(0<s&&(r(l,c-32,m[g].y,0,16),r(u,d-32,m[g].f,0,8),r(h,f-32,m[g].ea,0,8)),p.Za){var y=l,x=c-32+16;for(0<s&&(i>=e.za-1?a(y,x,m[g].y[15],4):r(y,x,m[g+1].y,0,4)),n=0;4>n;n++)y[x+128+n]=y[x+256+n]=y[x+384+n]=y[x+0+n];for(n=0;16>n;++n,b<<=2)y=l,x=c+Da[n],da[p.Ob[n]](y,x),Tn(b,v,16*+n,y,x)}else if(y=Pn(i,s,p.Ob[0]),ua[y](l,c),0!=b)for(n=0;16>n;++n,b<<=2)Tn(b,v,16*+n,l,c+Da[n]);for(n=p.Gc,y=Pn(i,s,p.Dd),ha[y](u,d),ha[y](h,f),b=v,y=u,x=d,255&(p=0|n)&&(170&p?or(b,256,y,x):cr(b,256,y,x)),p=h,b=f,255&(n>>=8)&&(170&n?or(v,320,p,b):cr(v,320,p,b)),s<e.Ub-1&&(r(m[g].y,0,l,c+480,16),r(m[g].f,0,u,d+224,8),r(m[g].ea,0,h,f+224,8)),n=8*o*e.B,m=e.sa,g=e.ta+16*i+16*o*e.R,v=e.qa,p=e.ra+8*i+n,b=e.Ha,y=e.Ia+8*i+n,n=0;16>n;++n)r(m,g+n*e.R,l,c+32*n,16);for(n=0;8>n;++n)r(v,p+n*e.B,u,d+32*n,8),r(b,y+n*e.B,h,f+32*n,8)}}function Fn(e,r,a,i,s,o,l,c,u){var d=[0],h=[0],f=0,p=null!=u?u.kd:0,m=null!=u?u:new nn;if(null==e||12>a)return 7;m.data=e,m.w=r,m.ha=a,r=[r],a=[a],m.gb=[m.gb];e:{var g=r,b=a,y=m.gb;if(t(null!=e),t(null!=b),t(null!=y),y[0]=0,12<=b[0]&&!n(e,g[0],"RIFF")){if(n(e,g[0]+8,"WEBP")){y=3;break e}var x=T(e,g[0]+4);if(12>x||4294967286<x){y=3;break e}if(p&&x>b[0]-8){y=7;break e}y[0]=x,g[0]+=12,b[0]-=12}y=0}if(0!=y)return y;for(x=0<m.gb[0],a=a[0];;){e:{var k=e;b=r,y=a;var N=d,A=h,j=g=[0];if((C=f=[f])[0]=0,8>y[0])y=7;else{if(!n(k,b[0],"VP8X")){if(10!=T(k,b[0]+4)){y=3;break e}if(18>y[0]){y=7;break e}var _=T(k,b[0]+8),S=1+P(k,b[0]+12);if(2147483648<=S*(k=1+P(k,b[0]+15))){y=3;break e}null!=j&&(j[0]=_),null!=N&&(N[0]=S),null!=A&&(A[0]=k),b[0]+=18,y[0]-=18,C[0]=1}y=0}}if(f=f[0],g=g[0],0!=y)return y;if(b=!!(2&g),!x&&f)return 3;if(null!=o&&(o[0]=!!(16&g)),null!=l&&(l[0]=b),null!=c&&(c[0]=0),l=d[0],g=h[0],f&&b&&null==u){y=0;break}if(4>a){y=7;break}if(x&&f||!x&&!f&&!n(e,r[0],"ALPH")){a=[a],m.na=[m.na],m.P=[m.P],m.Sa=[m.Sa];e:{_=e,y=r,x=a;var C=m.gb;N=m.na,A=m.P,j=m.Sa,S=22,t(null!=_),t(null!=x),k=y[0];var E=x[0];for(t(null!=N),t(null!=j),N[0]=null,A[0]=null,j[0]=0;;){if(y[0]=k,x[0]=E,8>E){y=7;break e}var L=T(_,k+4);if(4294967286<L){y=3;break e}var R=8+L+1&-2;if(S+=R,0<C&&S>C){y=3;break e}if(!n(_,k,"VP8 ")||!n(_,k,"VP8L")){y=0;break e}if(E[0]<R){y=7;break e}n(_,k,"ALPH")||(N[0]=_,A[0]=k+8,j[0]=L),k+=R,E-=R}}if(a=a[0],m.na=m.na[0],m.P=m.P[0],m.Sa=m.Sa[0],0!=y)break}a=[a],m.Ja=[m.Ja],m.xa=[m.xa];e:if(C=e,y=r,x=a,N=m.gb[0],A=m.Ja,j=m.xa,_=y[0],k=!n(C,_,"VP8 "),S=!n(C,_,"VP8L"),t(null!=C),t(null!=x),t(null!=A),t(null!=j),8>x[0])y=7;else{if(k||S){if(C=T(C,_+4),12<=N&&C>N-12){y=3;break e}if(p&&C>x[0]-8){y=7;break e}A[0]=C,y[0]+=8,x[0]-=8,j[0]=S}else j[0]=5<=x[0]&&47==C[_+0]&&!(C[_+4]>>5),A[0]=x[0];y=0}if(a=a[0],m.Ja=m.Ja[0],m.xa=m.xa[0],r=r[0],0!=y)break;if(4294967286<m.Ja)return 3;if(null==c||b||(c[0]=m.xa?2:1),l=[l],g=[g],m.xa){if(5>a){y=7;break}c=l,p=g,b=o,null==e||5>a?e=0:5<=a&&47==e[r+0]&&!(e[r+4]>>5)?(x=[0],C=[0],N=[0],v(A=new w,e,r,a),me(A,x,C,N)?(null!=c&&(c[0]=x[0]),null!=p&&(p[0]=C[0]),null!=b&&(b[0]=N[0]),e=1):e=0):e=0}else{if(10>a){y=7;break}c=g,null==e||10>a||!Ke(e,r+3,a-3)?e=0:(p=e[r+0]|e[r+1]<<8|e[r+2]<<16,b=16383&(e[r+7]<<8|e[r+6]),e=16383&(e[r+9]<<8|e[r+8]),1&p||3<(p>>1&7)||!(p>>4&1)||p>>5>=m.Ja||!b||!e?e=0:(l&&(l[0]=b),c&&(c[0]=e),e=1))}if(!e)return 3;if(l=l[0],g=g[0],f&&(d[0]!=l||h[0]!=g))return 3;null!=u&&(u[0]=m,u.offset=r-u.w,t(4294967286>r-u.w),t(u.offset==u.ha-a));break}return 0==y||7==y&&f&&null==u?(null!=o&&(o[0]|=null!=m.na&&0<m.na.length),null!=i&&(i[0]=l),null!=s&&(s[0]=g),0):y}function Mn(e,t,n){var r=t.width,a=t.height,i=0,s=0,o=r,l=a;if(t.Da=null!=e&&0<e.Da,t.Da&&(o=e.cd,l=e.bd,i=e.v,s=e.j,11>n||(i&=-2,s&=-2),0>i||0>s||0>=o||0>=l||i+o>r||s+l>a))return 0;if(t.v=i,t.j=s,t.va=i+o,t.o=s+l,t.U=o,t.T=l,t.da=null!=e&&0<e.da,t.da){if(!O(o,l,n=[e.ib],i=[e.hb]))return 0;t.ib=n[0],t.hb=i[0]}return t.ob=null!=e&&e.ob,t.Kb=null==e||!e.Sd,t.da&&(t.ob=t.ib<3*r/4&&t.hb<3*a/4,t.Kb=0),1}function On(e){if(null==e)return 2;if(11>e.S){var t=e.f.RGBA;t.fb+=(e.height-1)*t.A,t.A=-t.A}else t=e.f.kb,e=e.height,t.O+=(e-1)*t.fa,t.fa=-t.fa,t.N+=(e-1>>1)*t.Ab,t.Ab=-t.Ab,t.W+=(e-1>>1)*t.Db,t.Db=-t.Db,null!=t.F&&(t.J+=(e-1)*t.lb,t.lb=-t.lb);return 0}function Dn(e,t,n,r){if(null==r||0>=e||0>=t)return 2;if(null!=n){if(n.Da){var a=n.cd,s=n.bd,o=-2&n.v,l=-2&n.j;if(0>o||0>l||0>=a||0>=s||o+a>e||l+s>t)return 2;e=a,t=s}if(n.da){if(!O(e,t,a=[n.ib],s=[n.hb]))return 2;e=a[0],t=s[0]}}r.width=e,r.height=t;e:{var c=r.width,u=r.height;if(e=r.S,0>=c||0>=u||!(e>=Mr&&13>e))e=2;else{if(0>=r.Rd&&null==r.sd){o=s=a=t=0;var d=(l=c*Ba[e])*u;if(11>e||(s=(u+1)/2*(t=(c+1)/2),12==e&&(o=(a=c)*u)),null==(u=i(d+2*s+o))){e=1;break e}r.sd=u,11>e?((c=r.f.RGBA).eb=u,c.fb=0,c.A=l,c.size=d):((c=r.f.kb).y=u,c.O=0,c.fa=l,c.Fd=d,c.f=u,c.N=0+d,c.Ab=t,c.Cd=s,c.ea=u,c.W=0+d+s,c.Db=t,c.Ed=s,12==e&&(c.F=u,c.J=0+d+2*s),c.Tc=o,c.lb=a)}if(t=1,a=r.S,s=r.width,o=r.height,a>=Mr&&13>a)if(11>a)e=r.f.RGBA,t&=(l=Math.abs(e.A))*(o-1)+s<=e.size,t&=l>=s*Ba[a],t&=null!=e.eb;else{e=r.f.kb,l=(s+1)/2,d=(o+1)/2,c=Math.abs(e.fa),u=Math.abs(e.Ab);var h=Math.abs(e.Db),f=Math.abs(e.lb),p=f*(o-1)+s;t&=c*(o-1)+s<=e.Fd,t&=u*(d-1)+l<=e.Cd,t=(t&=h*(d-1)+l<=e.Ed)&c>=s&u>=l&h>=l,t&=null!=e.y,t&=null!=e.f,t&=null!=e.ea,12==a&&(t&=f>=s,t&=p<=e.Tc,t&=null!=e.F)}else t=0;e=t?0:2}}return 0!=e||null!=n&&n.fd&&(e=On(r)),e}var In=64,zn=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Bn=24,qn=32,Un=8,Vn=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];z("Predictor0","PredictorAdd0"),e.Predictor0=function(){return 4278190080},e.Predictor1=function(e){return e},e.Predictor2=function(e,t,n){return t[n+0]},e.Predictor3=function(e,t,n){return t[n+1]},e.Predictor4=function(e,t,n){return t[n-1]},e.Predictor5=function(e,t,n){return q(q(e,t[n+1]),t[n+0])},e.Predictor6=function(e,t,n){return q(e,t[n-1])},e.Predictor7=function(e,t,n){return q(e,t[n+0])},e.Predictor8=function(e,t,n){return q(t[n-1],t[n+0])},e.Predictor9=function(e,t,n){return q(t[n+0],t[n+1])},e.Predictor10=function(e,t,n){return q(q(e,t[n-1]),q(t[n+0],t[n+1]))},e.Predictor11=function(e,t,n){var r=t[n+0];return 0>=H(r>>24&255,e>>24&255,(t=t[n-1])>>24&255)+H(r>>16&255,e>>16&255,t>>16&255)+H(r>>8&255,e>>8&255,t>>8&255)+H(255&r,255&e,255&t)?r:e},e.Predictor12=function(e,t,n){var r=t[n+0];return(U((e>>24&255)+(r>>24&255)-((t=t[n-1])>>24&255))<<24|U((e>>16&255)+(r>>16&255)-(t>>16&255))<<16|U((e>>8&255)+(r>>8&255)-(t>>8&255))<<8|U((255&e)+(255&r)-(255&t)))>>>0},e.Predictor13=function(e,t,n){var r=t[n-1];return(V((e=q(e,t[n+0]))>>24&255,r>>24&255)<<24|V(e>>16&255,r>>16&255)<<16|V(e>>8&255,r>>8&255)<<8|V(255&e,255&r))>>>0};var Hn=e.PredictorAdd0;e.PredictorAdd1=W,z("Predictor2","PredictorAdd2"),z("Predictor3","PredictorAdd3"),z("Predictor4","PredictorAdd4"),z("Predictor5","PredictorAdd5"),z("Predictor6","PredictorAdd6"),z("Predictor7","PredictorAdd7"),z("Predictor8","PredictorAdd8"),z("Predictor9","PredictorAdd9"),z("Predictor10","PredictorAdd10"),z("Predictor11","PredictorAdd11"),z("Predictor12","PredictorAdd12"),z("Predictor13","PredictorAdd13");var Wn=e.PredictorAdd2;K("ColorIndexInverseTransform","MapARGB","32b",function(e){return e>>8&255},function(e){return e}),K("VP8LColorIndexInverseTransformAlpha","MapAlpha","8b",function(e){return e},function(e){return e>>8&255});var Gn,$n=e.ColorIndexInverseTransform,Yn=e.MapARGB,Kn=e.VP8LColorIndexInverseTransformAlpha,Xn=e.MapAlpha,Zn=e.VP8LPredictorsAdd=[];Zn.length=16,(e.VP8LPredictors=[]).length=16,(e.VP8LPredictorsAdd_C=[]).length=16,(e.VP8LPredictors_C=[]).length=16;var Jn,Qn,er,tr,nr,rr,ar,ir,sr,or,lr,cr,ur,dr,hr,fr,pr,mr,gr,vr,br,yr,xr,wr,kr,Nr,Ar,jr,_r=i(511),Sr=i(2041),Cr=i(225),Er=i(767),Lr=0,Pr=Sr,Tr=Cr,Rr=Er,Fr=_r,Mr=0,Or=1,Dr=2,Ir=3,zr=4,Br=5,qr=6,Ur=7,Vr=8,Hr=9,Wr=10,Gr=[2,3,7],$r=[3,3,11],Yr=[280,256,256,256,40],Kr=[0,1,1,1,0],Xr=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],Zr=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,
vendor: 4,135 bytes, line 2
264,114,126,97,111,80,113,127,96,112],Jr=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],Qr=8,ea=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],ta=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],na=null,ra=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],aa=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],ia=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],sa=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,255,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,25
25,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],o
vendor: 7,765 bytes, line 2
2a=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,255,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],la=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,255,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],ca=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],ua=[],da=[],ha=[],fa=1,pa=2,
vendor: 7,676 bytes, line 2
2ma=[],ga=[];vn("UpsampleRgbLinePair",Nn,3),vn("UpsampleBgrLinePair",An,3),vn("UpsampleRgbaLinePair",En,4),vn("UpsampleBgraLinePair",Cn,4),vn("UpsampleArgbLinePair",Sn,4),vn("UpsampleRgba4444LinePair",_n,2),vn("UpsampleRgb565LinePair",jn,2);var va=e.UpsampleRgbLinePair,ba=e.UpsampleBgrLinePair,ya=e.UpsampleRgbaLinePair,xa=e.UpsampleBgraLinePair,wa=e.UpsampleArgbLinePair,ka=e.UpsampleRgba4444LinePair,Na=e.UpsampleRgb565LinePair,Aa=16,ja=1<<Aa-1,_a=-227,Sa=482,Ca=6,Ea=(256<<Ca)-1,La=0,Pa=i(256),Ta=i(256),Ra=i(256),Fa=i(256),Ma=i(Sa-_a),Oa=i(Sa-_a);Ln("YuvToRgbRow",Nn,3),Ln("YuvToBgrRow",An,3),Ln("YuvToRgbaRow",En,4),Ln("YuvToBgraRow",Cn,4),Ln("YuvToArgbRow",Sn,4),Ln("YuvToRgba4444Row",_n,2),Ln("YuvToRgb565Row",jn,2);var Da=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Ia=[0,2,8],za=[8,7,6,4,4,2,2,2,1,1,1,1];this.WebPDecodeRGBA=function(e,n,o,l,c){var u=Or,d=new tn,h=new se;d.ba=h,h.S=u,h.width=[h.width],h.height=[h.height];var f=h.width,p=h.height,m=new oe;if(null==m||null==e)var g=2;else t(null!=m),g=Fn(e,n,o,m.width,m.height,m.Pd,m.Qd,m.format,null);if(0!=g?f=0:(null!=f&&(f[0]=m.width[0]),null!=p&&(p[0]=m.height[0]),f=1),f){h.width=h.width[0],h.height=h.height[0],null!=l&&(l[0]=h.width),null!=c&&(c[0]=h.height);e:{if(l=new Ge,(c=new nn).data=e,c.w=n,c.ha=o,c.kd=1,n=[0],t(null!=c),(0==(e=Fn(c.data,c.w,c.ha,null,null,null,n,null,c))||7==e)&&n[0]&&(e=4),0==(n=e)){if(t(null!=d),l.data=c.data,l.w=c.w+c.offset,l.ha=c.ha-c.offset,l.put=fe,l.ac=he,l.bc=pe,l.ma=d,c.xa){if(null==(e=Ce())){d=1;break e}if(function(e,n){var r=[0],a=[0],i=[0];t:for(;;){if(null==e)return 0;if(null==n)return e.a=2,0;if(e.l=n,e.a=0,v(e.m,n.data,n.w,n.ha),!me(e.m,r,a,i)){e.a=3;break t}if(e.xb=pa,n.width=r[0],n.height=a[0],!Ee(r[0],a[0],1,e,null))break t;return 1}return t(0!=e.a),0}(e,l)){if(l=0==(n=Dn(l.width,l.height,d.Oa,d.ba))){t:{l=e;n:for(;;){if(null==l){l=0;break t}if(t(null!=l.s.yc),t(null!=l.s.Ya),t(0<l.s.Wb),t(null!=(o=l.l)),t(null!=(c=o.ma)),0!=l.xb){if(l.ca=c.ba,l.tb=c.tb,t(null!=l.ca),!Mn(c.Oa,o,Ir)){l.a=2;break n}if(!Le(l,o.width))break n;if(o.da)break n;if((o.da||re(l.ca.S))&&gn(),11>l.ca.S||(alert("todo:WebPInitConvertARGBToYUV"),null!=l.ca.f.kb.F&&gn()),l.Pb&&0<l.s.ua&&null==l.s.vb.X&&!R(l.s.vb,l.s.Wa.Xa)){l.a=1;break n}l.xb=0}if(!_e(l,l.V,l.Ba,l.c,l.i,o.o,ke))break n;c.Dc=l.Ma,l=1;break t}t(0!=l.a),l=0}l=!l}l&&(n=e.a)}else n=e.a}else{if(null==(e=new $e)){d=1;break e}if(e.Fa=c.na,e.P=c.P,e.qc=c.Sa,Xe(e,l)){if(0==(n=Dn(l.width,l.height,d.Oa,d.ba))){if(e.Aa=0,o=d.Oa,t(null!=(c=e)),null!=o){if(0<(f=0>(f=o.Md)?0:100<f?255:255*f/100)){for(p=m=0;4>p;++p)12>(g=c.pb[p]).lc&&(g.ia=f*za[0>g.lc?0:g.lc]>>3),m|=g.ia;m&&(alert("todo:VP8InitRandom"),c.ia=1)}c.Ga=o.Id,100<c.Ga?c.Ga=100:0>c.Ga&&(c.Ga=0)}(function(e,n){if(null==e)return 0;if(null==n)return Ye(e,2,"NULL VP8Io parameter in VP8Decode().");if(!e.cb&&!Xe(e,n))return 0;if(t(e.cb),null==n.ac||n.ac(n)){n.ob&&(e.L=0);var o=Ia[e.L];if(2==e.L?(e.yb=0,e.zb=0):(e.yb=n.v-o>>4,e.zb=n.j-o>>4,0>e.yb&&(e.yb=0),0>e.zb&&(e.zb=0)),e.Va=n.o+15+o>>4,e.Hb=n.va+15+o>>4,e.Hb>e.za&&(e.Hb=e.za),e.Va>e.Ub&&(e.Va=e.Ub),0<e.L){var l=e.ed;for(o=0;4>o;++o){var c;if(e.Qa.Cb){var u=e.Qa.Lb[o];e.Qa.Fb||(u+=l.Tb)}else u=l.Tb;for(c=0;1>=c;++c){var d=e.gd[o][c],h=u;if(l.Pc&&(h+=l.vd[0],c&&(h+=l.od[0])),0<(h=0>h?0:63<h?63:h)){var f=h;0<l.wb&&(f=4<l.wb?f>>2:f>>1)>9-l.wb&&(f=9-l.wb),1>f&&(f=1),d.dd=f,d.tc=2*h+f,d.ld=40<=h?2:15<=h?1:0}else d.tc=0;d.La=c}}}o=0}else Ye(e,6,"Frame setup failed"),o=e.a;if(o=0==o){if(o){e.$c=0,0<e.Aa||(e.Ic=1);t:{o=e.Ic,l=4*(f=e.za);var p=32*f,m=f+1,g=0<e.L?f*(0<e.Aa?2:1):0,v=(2==e.Aa?2:1)*f;if((d=l+832+(c=3*(16*o+Ia[e.L])/2*p)+(u=null!=e.Fa&&0<e.Fa.length?e.Kc.c*e.Kc.i:0))!=d)o=0;else{if(d>e.Vb){if(e.Vb=0,e.Ec=i(d),e.Fc=0,null==e.Ec){o=Ye(e,1,"no memory during frame initialization.");break t}e.Vb=d}d=e.Ec,h=e.Fc,e.Ac=d,e.Bc=h,h+=l,e.Gd=s(p,Ve),e.Hd=0,e.rb=s(m+1,ze),e.sb=1,e.wa=g?s(g,Ie):null,e.Y=0,e.D.Nb=0,e.D.wa=e.wa,e.D.Y=e.Y,0<e.Aa&&(e.D.Y+=f),t(!0),e.oc=d,e.pc=h,h+=832,e.ya=s(v,qe),e.aa=0,e.D.ya=e.ya,e.D.aa=e.aa,2==e.Aa&&(e.D.aa+=f),e.R=16*f,e.B=8*f,f=(p=Ia[e.L])*e.R,p=p/2*e.B,e.sa=d,e.ta=h+f,e.qa=e.sa,e.ra=e.ta+16*o*e.R+p,e.Ha=e.qa,e.Ia=e.ra+8*o*e.B+p,e.$c=0,h+=c,e.mb=u?d:null,e.nb=u?h:null,t(h+u<=e.Fc+e.Vb),Je(e),a(e.Ac,e.Bc,0,l),o=1}}if(o){if(n.ka=0,n.y=e.sa,n.O=e.ta,n.f=e.qa,n.N=e.ra,n.ea=e.Ha,n.Vd=e.Ia,n.fa=e.R,n.Rc=e.B,n.F=null,n.J=0,!Lr){for(o=-255;255>=o;++o)_r[255+o]=0>o?-o:o;for(o=-1020;1020>=o;++o)Sr[1020+o]=-128>o?-128:127<o?127:o;for(o=-112;112>=o;++o)Cr[112+o]=-16>o?-16:15<o?15:o;for(o=-255;510>=o;++o)Er[255+o]=0>o?0:255<o?255:o;Lr=1}ar=lt,ir=at,or=it,lr=st,cr=ot,sr=rt,ur=$t,dr=Yt,hr=Zt,fr=Jt,pr=Kt,mr=Xt,gr=Qt,vr=en,br=qt,yr=Ut,xr=Vt,wr=Ht,da[0]=Nt,da[1]=ut,da[2]=wt,da[3]=kt,da[4]=At,da[5]=_t,da[6]=jt,da[7]=St,da[8]=Et,da[9]=Ct,ua[0]=gt,ua[1]=ht,ua[2]=ft,ua[3]=pt,ua[4]=vt,ua[5]=bt,ua[6]=yt,ha[0]=Rt,ha[1]=dt,ha[2]=Lt,ha[3]=Pt,ha[4]=Mt,ha[5]=Ft,ha[6]=Ot,o=1}else o=0}o&&(o=function(e,n){for(e.M=0;e.M<e.Va;++e.M){var s,o=e.Jc[e.M&e.Xb],l=e.m,c=e;for(s=0;s<c.za;++s){var u=l,d=c,h=d.Ac,f=d.Bc+4*s,p=d.zc,m=d.ya[d.aa+s];if(d.Qa.Bb?m.$b=C(u,d.Pa.jb[0])?2+C(u,d.Pa.jb[2]):C(u,d.Pa.jb[1]):m.$b=0,d.kc&&(m.Ad=C(u,d.Bd)),m.Za=!C(u,145)+0,m.Za){var g=m.Ob,v=0;for(d=0;4>d;++d){var b,y=p[0+d];for(b=0;4>b;++b){y=oa[h[f+b]][y];for(var x=ia[C(u,y[0])];0<x;)x=ia[2*x+C(u,y[x])];y=-x,h[f+b]=y}r(g,v,h,f,4),v+=4,p[0+d]=y}}else y=C(u,156)?C(u,128)?1:3:C(u,163)?2:0,m.Ob[0]=y,a(h,f,y,4),a(p,0,y,4);m.Dd=C(u,142)?C(u,114)?C(u,183)?1:3:2:0}if(c.m.Ka)return Ye(e,7,"Premature end-of-partition0 encountered.");for(;e.ja<e.za;++e.ja){if(c=o,u=(l=e).rb[l.sb-1],h=l.rb[l.sb+l.ja],s=l.ya[l.aa+l.ja],f=l.kc?s.Ad:0)u.la=h.la=0,s.Za||(u.Na=h.Na=0),s.Hc=0,s.Gc=0,s.ia=0;else{var w,k;if(u=h,h=c,f=l.Pa.Xc,p=l.ya[l.aa+l.ja],m=l.pb[p.$b],d=p.ad,g=0,v=l.rb[l.sb-1],y=b=0,a(d,g,0,384),p.Za)var N=0,A=f[3];else{x=i(16);var j=u.Na+v.Na;if(j=na(h,f[1],j,m.Eb,0,x,0),u.Na=v.Na=(0<j)+0,1<j)ar(x,0,d,g);else{var _=x[0]+3>>3;for(x=0;256>x;x+=16)d[g+x]=_}N=1,A=f[0]}var S=15&u.la,E=15&v.la;for(x=0;4>x;++x){var L=1&E;for(_=k=0;4>_;++_)S=S>>1|(L=(j=na(h,A,j=L+(1&S),m.Sc,N,d,g))>N)<<7,k=k<<2|(3<j?3:1<j?2:0!=d[g+0]),g+=16;S>>=4,E=E>>1|L<<7,b=(b<<8|k)>>>0}for(A=S,N=E>>4,w=0;4>w;w+=2){for(k=0,S=u.la>>4+w,E=v.la>>4+w,x=0;2>x;++x){for(L=1&E,_=0;2>_;++_)j=L+(1&S),S=S>>1|(L=0<(j=na(h,f[2],j,m.Qc,0,d,g)))<<3,k=k<<2|(3<j?3:1<j?2:0!=d[g+0]),g+=16;S>>=2,E=E>>1|L<<5}y|=k<<4*w,A|=S<<4<<w,N|=(240&E)<<w}u.la=A,v.la=N,p.Hc=b,p.Gc=y,p.ia=43690&y?0:m.ia,f=!(b|y)}if(0<l.L&&(l.wa[l.Y+l.ja]=l.gd[s.$b][s.Za],l.wa[l.Y+l.ja].La|=!f),c.Ka)return Ye(e,7,"Premature end-of-file encountered.")}if(Je(e),l=n,c=1,s=(o=e).D,u=0<o.L&&o.M>=o.zb&&o.M<=o.Va,0==o.Aa)t:{if(s.M=o.M,s.uc=u,Rn(o,s),c=1,s=(k=o.D).Nb,u=(y=Ia[o.L])*o.R,h=y/2*o.B,x=16*s*o.R,_=8*s*o.B,f=o.sa,p=o.ta-u+x,m=o.qa,d=o.ra-h+_,g=o.Ha,v=o.Ia-h+_,E=0==(S=k.M),b=S>=o.Va-1,2==o.Aa&&Rn(o,k),k.uc)for(L=(j=o).D.M,t(j.D.uc),k=j.yb;k<j.Hb;++k){N=k,A=L;var P=(T=(q=j).D).Nb;w=q.R;var T=T.wa[T.Y+N],R=q.sa,F=q.ta+16*P*w+16*N,M=T.dd,O=T.tc;if(0!=O)if(t(3<=O),1==q.L)0<N&&yr(R,F,w,O+4),T.La&&wr(R,F,w,O),0<A&&br(R,F,w,O+4),T.La&&xr(R,F,w,O);else{var D=q.B,I=q.qa,z=q.ra+8*P*D+8*N,B=q.Ha,q=q.Ia+8*P*D+8*N;P=T.ld,0<N&&(dr(R,F,w,O+4,M,P),fr(I,z,B,q,D,O+4,M,P)),T.La&&(mr(R,F,w,O,M,P),vr(I,z,B,q,D,O,M,P)),0<A&&(ur(R,F,w,O+4,M,P),hr(I,z,B,q,D,O+4,M,P)),T.La&&(pr(R,F,w,O,M,P),gr(I,z,B,q,D,O,M,P))}}if(o.ia&&alert("todo:DitherRow"),null!=l.put){if(k=16*S,S=16*(S+1),E?(l.y=o.sa,l.O=o.ta+x,l.f=o.qa,l.N=o.ra+_,l.ea=o.Ha,l.W=o.Ia+_):(k-=y,l.y=f,l.O=p,l.f=m,l.N=d,l.ea=g,l.W=v),b||(S-=y),S>l.o&&(S=l.o),l.F=null,l.J=null,null!=o.Fa&&0<o.Fa.length&&k<S&&(l.J=dn(o,l,k,S-k),l.F=o.mb,null==l.F&&0==l.F.length)){c=Ye(o,3,"Could not decode alpha data.");break t}
vendor: 4,320 bytes, line 2
2k<l.j&&(y=l.j-k,k=l.j,t(!(1&y)),l.O+=o.R*y,l.N+=o.B*(y>>1),l.W+=o.B*(y>>1),null!=l.F&&(l.J+=l.width*y)),k<S&&(l.O+=l.v,l.N+=l.v>>1,l.W+=l.v>>1,null!=l.F&&(l.J+=l.v),l.ka=k-l.j,l.U=l.va-l.v,l.T=S-k,c=l.put(l))}s+1!=o.Ic||b||(r(o.sa,o.ta-u,f,p+16*o.R,u),r(o.qa,o.ra-h,m,d+8*o.B,h),r(o.Ha,o.Ia-h,g,v+8*o.B,h))}if(!c)return Ye(e,6,"Output aborted.")}return 1}(e,n)),null!=n.bc&&n.bc(n),o&=1}return o?(e.cb=0,o):0})(e,l)||(n=e.a)}}else n=e.a}0==n&&null!=d.Oa&&d.Oa.fd&&(n=On(d.ba))}d=n}u=0!=d?null:11>u?h.f.RGBA.eb:h.f.kb.y}else u=null;return u};var Ba=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function c(e,t){for(var n="",r=0;r<4;r++)n+=String.fromCharCode(e[t++]);return n}function u(e,t){return e[t+0]|e[t+1]<<8}function d(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16)>>>0}function h(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}new l;var f=[0],p=[0],m=[],g=new l,v=e,b=function(e,t){var n={},r=0,a=!1,i=0,s=0;if(n.frames=[],!function(e,t){for(var n=0;n<4;n++)if(e[t+n]!="RIFF".charCodeAt(n))return!0;return!1}(e,t)){for(h(e,t+=4),t+=8;t<e.length;){var o=c(e,t),l=h(e,t+=4);t+=4;var f=l+(1&l);switch(o){case"VP8 ":case"VP8L":void 0===n.frames[r]&&(n.frames[r]={}),(g=n.frames[r]).src_off=a?s:t-8,g.src_size=i+l+8,r++,a&&(a=!1,i=0,s=0);break;case"VP8X":(g=n.header={}).feature_flags=e[t];var p=t+4;g.canvas_width=1+d(e,p),p+=3,g.canvas_height=1+d(e,p),p+=3;break;case"ALPH":a=!0,i=f+8,s=t-8;break;case"ANIM":(g=n.header).bgcolor=h(e,t),p=t+4,g.loop_count=u(e,p),p+=2;break;case"ANMF":var m,g;(g=n.frames[r]={}).offset_x=2*d(e,t),t+=3,g.offset_y=2*d(e,t),t+=3,g.width=1+d(e,t),t+=3,g.height=1+d(e,t),t+=3,g.duration=d(e,t),t+=3,m=e[t++],g.dispose=1&m,g.blend=m>>1&1}"ANMF"!=o&&(t+=f)}return n}}(v,0);b.response=v,b.rgbaoutput=!0,b.dataurl=!1;var y=b.header?b.header:null,x=b.frames?b.frames:null;if(y){y.loop_counter=y.loop_count,f=[y.canvas_height],p=[y.canvas_width];for(var w=0;w<x.length&&0!=x[w].blend;w++);}var k=x[0],N=g.WebPDecodeRGBA(v,k.src_off,k.src_size,p,f);k.rgba=N,k.imgwidth=p[0],k.imgheight=f[0];for(var A=0;A<p[0]*f[0]*4;A++)m[A]=N[A];return this.width=p,this.height=f,this.data=m,this}function ks(){var e,t=this.internal.__metadata__.metadata,n=unescape(encodeURIComponent(t));e=this.internal.__metadata__.rawXml?n:'<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="'+this.internal.__metadata__.namespaceUri+'"><jspdf:metadata>'+n.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")+"</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>",this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write("<< /Type /Metadata /Subtype /XML /Length "+e.length+" >>"),this.internal.write("stream"),this.internal.write(e),this.internal.write("endstream"),this.internal.write("endobj")}function Ns(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write("/Metadata "+this.internal.__metadata__.metadataObjectNumber+" 0 R")}!function(e){var t,n,a,i,s,o,l,c,u,d=function(e){return e=e||{},this.isStrokeTransparent=e.isStrokeTransparent||!1,this.strokeOpacity=e.strokeOpacity||1,this.strokeStyle=e.strokeStyle||"#000000",this.fillStyle=e.fillStyle||"#000000",this.isFillTransparent=e.isFillTransparent||!1,this.fillOpacity=e.fillOpacity||1,this.font=e.font||"10px sans-serif",this.textBaseline=e.textBaseline||"alphabetic",this.textAlign=e.textAlign||"left",this.lineWidth=e.lineWidth||1,this.lineJoin=e.lineJoin||"miter",this.lineCap=e.lineCap||"butt",this.path=e.path||[],this.transform=void 0!==e.transform?e.transform.clone():new c,this.globalCompositeOperation=e.globalCompositeOperation||"normal",this.globalAlpha=e.globalAlpha||1,this.clip_path=e.clip_path||[],this.currentPoint=e.currentPoint||new o,this.miterLimit=e.miterLimit||10,this.lastPoint=e.lastPoint||new o,this.lineDashOffset=e.lineDashOffset||0,this.lineDash=e.lineDash||[],this.margin=e.margin||[0,0,0,0],this.prevPageLastElemOffset=e.prevPageLastElemOffset||0,this.ignoreClearRect="boolean"!=typeof e.ignoreClearRect||e.ignoreClearRect,this};e.events.push(["initialized",function(){this.context2d=new h(this),t=this.internal.f2,n=this.internal.getCoordinateString,a=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,
vendor: 4,366 bytes, line 2
2s=this.internal.getVerticalCoordinate,o=this.internal.Point,l=this.internal.Rectangle,c=this.internal.Matrix,u=new d}]);var h=function(e){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var t=e;Object.defineProperty(this,"pdf",{get:function(){return t}});var n=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return n},set:function(e){n=Boolean(e)}});var r=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return r},set:function(e){r=Boolean(e)}});var a=0;Object.defineProperty(this,"posX",{get:function(){return a},set:function(e){isNaN(e)||(a=e)}});var i=0;Object.defineProperty(this,"posY",{get:function(){return i},set:function(e){isNaN(e)||(i=e)}}),Object.defineProperty(this,"margin",{get:function(){return u.margin},set:function(e){var t;"number"==typeof e?t=[e,e,e,e]:((t=new Array(4))[0]=e[0],t[1]=e.length>=2?e[1]:t[0],t[2]=e.length>=3?e[2]:t[0],t[3]=e.length>=4?e[3]:t[1]),u.margin=t}});var s=!1;Object.defineProperty(this,"autoPaging",{get:function(){return s},set:function(e){s=e}});var o=0;Object.defineProperty(this,"lastBreak",{get:function(){return o},set:function(e){o=e}});var l=[];Object.defineProperty(this,"pageBreaks",{get:function(){return l},set:function(e){l=e}}),Object.defineProperty(this,"ctx",{get:function(){return u},set:function(e){e instanceof d&&(u=e)}}),Object.defineProperty(this,"path",{get:function(){return u.path},set:function(e){u.path=e}});var c=[];Object.defineProperty(this,"ctxStack",{get:function(){return c},set:function(e){c=e}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(e){var t;t=f(e),this.ctx.fillStyle=t.style,this.ctx.isFillTransparent=0===t.a,this.ctx.fillOpacity=t.a,this.pdf.setFillColor(t.r,t.g,t.b,{a:t.a}),this.pdf.setTextColor(t.r,t.g,t.b,{a:t.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(e){var t=f(e);this.ctx.strokeStyle=t.style,this.ctx.isStrokeTransparent=0===t.a,this.ctx.strokeOpacity=t.a,0===t.a?this.pdf.setDrawColor(255,255,255):(t.a,this.pdf.setDrawColor(t.r,t.g,t.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(e){-1!==["butt","round","square"].indexOf(e)&&(this.ctx.lineCap=e,this.pdf.setLineCap(e))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(e){isNaN(e)||(this.ctx.lineWidth=e,this.pdf.setLineWidth(e))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(e){-1!==["bevel","round","miter"].indexOf(e)&&(this.ctx.lineJoin=e,this.pdf.setLineJoin(e))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(e){isNaN(e)||(this.ctx.miterLimit=e,this.pdf.setMiterLimit(e))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(e){this.ctx.textBaseline=e}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(e){-1!==["right","end","center","left","start"].indexOf(e)&&(this.ctx.textAlign=e)}});var h=null,p=null,m=null;Object.defineProperty(this,"fontFaces",{get:function(){return m},set:function(e){h=null,p=null,m=e}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(e){var t;if(this.ctx.font=e,null!==(t=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(e))){var n=t[1];t[2];var r=t[3],a=t[4];t[5];var i=t[6],s=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(a)[2];a="px"===s?Math.floor(parseFloat(a)*this.pdf.internal.scaleFactor):"em"===s?Math.floor(parseFloat(a)*this.pdf.getFontSize()):Math.floor(parseFloat(a)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(a);var o=function(e){var t,n,r=[],a=e.trim();if(""===a)return is;if(a in Ki)return[Ki[a]];for(;""!==a;){switch(n=null,t=(a=Zi(a)).charAt(0)){case'"':case"'":n=Ji(a.substring(1),t);break;default:n=Qi(a)}if(null===n)return is;if(r.push(n[0]),""!==(a=Zi(n[1]))&&","!==a.charAt(0))return is;a=a.replace(/^,/,"")}return r}(i);
vendor: 4,563 bytes, line 2
2if(this.fontFaces){var l=function(e,t){var n=e.getFontList(),r=JSON.stringify(n);if(null===h||p!==r){var a=function(e){var t=[];return Object.keys(e).forEach(function(n){e[n].forEach(function(e){var r=null;switch(e){case"bold":r={family:n,weight:"bold"};break;case"italic":r={family:n,style:"italic"};break;case"bolditalic":r={family:n,weight:"bold",style:"italic"};break;case"":case"normal":r={family:n}}null!==r&&(r.ref={name:n,style:e},t.push(r))})}),t}(n);h=function(e){for(var t={},n=0;n<e.length;++n){var r=Gi(e[n]),a=r.family,i=r.stretch,s=r.style,o=r.weight;t[a]=t[a]||{},t[a][i]=t[a][i]||{},t[a][i][s]=t[a][i][s]||{},t[a][i][s][o]=r}return t}(a.concat(t)),p=r}return h}(this.pdf,this.fontFaces),c=o.map(function(e){return{family:e,stretch:"normal",weight:r,style:n}}),u=function(e,t,n){for(var r=(n=n||{}).defaultFontFamily||"times",a=Object.assign({},Yi,n.genericFontFamilies||{}),i=null,s=null,o=0;o<t.length;++o)if(a[(i=Gi(t[o])).family]&&(i.family=a[i.family]),e.hasOwnProperty(i.family)){s=e[i.family];break}if(!(s=s||e[r]))throw new Error("Could not find a font-family for the rule '"+Xi(i)+"' and default family '"+r+"'.");if(s=function(e,t){if(t[e])return t[e];var n=Vi[e],r=n<=Vi.normal?-1:1,a=$i(t,Ui,n,r);if(!a)throw new Error("Could not find a matching font-stretch value for "+e);return a}(i.stretch,s),s=function(e,t){if(t[e])return t[e];for(var n=qi[e],r=0;r<n.length;++r)if(t[n[r]])return t[n[r]];throw new Error("Could not find a matching font-style for "+e)}(i.style,s),!(s=function(e,t){if(t[e])return t[e];if(400===e&&t[500])return t[500];if(500===e&&t[400])return t[400];var n=Wi[e],r=$i(t,Hi,n,e<400?-1:1);if(!r)throw new Error("Could not find a matching font-weight for value "+e);return r}(i.weight,s)))throw new Error("Failed to resolve a font for the rule '"+Xi(i)+"'.");return s}(l,c);this.pdf.setFont(u.ref.name,u.ref.style)}else{var d="";("bold"===r||parseInt(r,10)>=700||"bold"===n)&&(d="bold"),"italic"===n&&(d+="italic"),0===d.length&&(d="normal");for(var f="",m={arial:"Helvetica",Arial:"Helvetica",verdana:"Helvetica",Verdana:"Helvetica",helvetica:"Helvetica",Helvetica:"Helvetica","sans-serif":"Helvetica",fixed:"Courier",monospace:"Courier",terminal:"Courier",cursive:"Times",fantasy:"Times",serif:"Times"},g=0;g<o.length;g++){if(void 0!==this.pdf.internal.getFont(o[g],d,{noFallback:!0,disableWarning:!0})){f=o[g];break}if("bolditalic"===d&&void 0!==this.pdf.internal.getFont(o[g],"bold",{noFallback:!0,disableWarning:!0}))f=o[g],d="bold";else if(void 0!==this.pdf.internal.getFont(o[g],"normal",{noFallback:!0,disableWarning:!0})){f=o[g],d="normal";break}}if(""===f)for(var v=0;v<o.length;v++)if(m[o[v]]){f=m[o[v]];break}f=""===f?"Times":f,this.pdf.setFont(f,d)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(e){this.ctx.globalCompositeOperation=e}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(e){this.ctx.globalAlpha=e}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(e){this.ctx.lineDashOffset=e,I.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(e){this.ctx.lineDash=e,I.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(e){this.ctx.ignoreClearRect=Boolean(e)}})};h.prototype.setLineDash=function(e){this.lineDash=e},h.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},h.prototype.fill=function(){w.call(this,"fill",!1)},h.prototype.stroke=function(){w.call(this,"stroke",!1)},h.prototype.beginPath=function(){this.path=[{type:"begin"}]},h.prototype.moveTo=function(e,t){if(isNaN(e)||isNaN(t))throw wa.error("jsPDF.context2d.moveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.moveTo");var n=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:"mt",x:n.x,y:n.y}),this.ctx.lastPoint=new o(e,t)},h.prototype.closePath=function(){var e=new o(0,0),t=0;for(t=this.path.length-1;-1!==t;t--)if("begin"===this.path[t].type&&"object"===r(this.path[t+1])&&"number"==typeof this.path[t+1].x){e=new o(this.path[t+1].x,this.path[t+1].y);break}this.path.push({type:"close"}),this.ctx.lastPoint=new o(e.x,e.y)},h.prototype.lineTo=function(e,t){if(isNaN(e)||isNaN(t))throw wa.error("jsPDF.context2d.lineTo: Invalid arguments",arguments),new Error("Invalid arguments passed to
2jsPDF.context2d.lineTo");var n=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:"lt",x:n.x,y:n.y}),this.ctx.lastPoint=new o(n.x,n.y)},h.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),w.call(this,null,!0)},h.prototype.quadraticCurveTo=function(e,t,n,r){if(isNaN(n)||isNaN(r)||isNaN(e)||isNaN(t))throw wa.error("jsPDF.context2d.quadraticCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.quadraticCurveTo");var a=this.ctx.transform.applyToPoint(new o(n,r)),i=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:"qct",x1:i.x,y1:i.y,x:a.x,y:a.y}),this.ctx.lastPoint=new o(a.x,a.y)},h.prototype.bezierCurveTo=function(e,t,n,r,a,i){if(isNaN(a)||isNaN(i)||isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw wa.error("jsPDF.context2d.bezierCurveTo: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.bezierCurveTo");var s=this.ctx.transform.applyToPoint(new o(a,i)),l=this.ctx.transform.applyToPoint(new o(e,t)),c=this.ctx.transform.applyToPoint(new o(n,r));this.path.push({type:"bct",x1:l.x,y1:l.y,x2:c.x,y2:c.y,x:s.x,y:s.y}),this.ctx.lastPoint=new o(s.x,s.y)},h.prototype.arc=function(e,t,n,r,a,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(a))throw wa.error("jsPDF.context2d.arc: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.arc");if(i=Boolean(i),!this.ctx.transform.isIdentity){var s=this.ctx.transform.applyToPoint(new o(e,t));e=s.x,t=s.y;var l=this.ctx.transform.applyToPoint(new o(0,n)),c=this.ctx.transform.applyToPoint(new o(0,0));n=Math.sqrt(Math.pow(l.x-c.x,2)+Math.pow(l.y-c.y,2))}Math.abs(a-r)>=2*Math.PI&&(r=0,a=2*Math.PI),this.path.push({type:"arc",x:e,y:t,radius:n,startAngle:r,endAngle:a,counterclockwise:i})},h.prototype.arcTo=function(e,t,n,r,a){throw new Error("arcTo not implemented.")},h.prototype.rect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw wa.error("jsPDF.context2d.rect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rect");this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.lineTo(e,t),this.lineTo(e+n,t),this.lineTo(e,t)},h.prototype.fillRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw wa.error("jsPDF.context2d.fillRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.fillRect");if(!p.call(this)){var a={};"butt"!==this.lineCap&&(a.lineCap=this.lineCap,this.lineCap="butt"),"miter"!==this.lineJoin&&(a.lineJoin=this.lineJoin,this.lineJoin="miter"),this.beginPath(),this.rect(e,t,n,r),this.fill(),a.hasOwnProperty("lineCap")&&(this.lineCap=a.lineCap),a.hasOwnProperty("lineJoin")&&(this.lineJoin=a.lineJoin)}},h.prototype.strokeRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw wa.error("jsPDF.context2d.strokeRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeRect");m.call(this)||(this.beginPath(),this.rect(e,t,n,r),this.stroke())},h.prototype.clearRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw wa.error("jsPDF.context2d.clearRect: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.clearRect");this.ignoreClearRect||(this.fillStyle="#ffffff",this.fillRect(e,t,n,r))},h.prototype.save=function(e){e="boolean"!=typeof e||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out("q");if(this.pdf.setPage(t),e){this.ctx.fontSize=this.pdf.internal.getFontSize();var r=new d(this.ctx);this.ctxStack.push(this.ctx),this.ctx=r}},h.prototype.restore=function(e){e="boolean"!=typeof e||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out("Q");this.pdf.setPage(t),e&&0!==this.ctxStack.length&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},h.prototype.toDataURL=function(){throw new Error("toDataUrl not implemented.")};var f=function(e){var t,n,r,a;if(!0===e.isCanvasGradient&&(e=e.getColor()),!e)return{r:0,g:0,b:0,a:0,style:e};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(e))t=0,n=0,r=0,a=0;else{var i=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(e);if(null!==i)t=parseInt(i[1]),n=parseInt(i[2]),r=parseInt(i[3]),a=1;else if(null!==(i=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(e)))t=parseInt(i[1]),n=parseInt(i[2]),r=parseInt(i[3]),a=parseFloat(i[4]);else{if(a=1,"string"==typeof e&&"#"!==e.charAt(0)){var s=new _a(e);e=s.ok?s.toHex():"#000000"}4===e.length?(t=e.substring(1,2),t+=t,n=e.substring(2,3),n+=n,r=e.substring(3,4),r+=r):(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7)),t=parseInt(t,16),n=parseInt(n,16),r=parseInt(r,16)}}return{r:t,g:n,b:r,a:a,style:e}},p=function(){return this.ctx.isFillTransparent||0==this.globalAlpha},m=function(){return Boolean(this.ctx.isStrokeTransparent||0==this.globalAlpha)};h.prototype.fillText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||"string"!=typeof e)throw wa.error("jsPDF.context2d.fillText: Invalid arguments",arguments),new Error("Invalid arguments passed to
2jsPDF.context2d.fillText");if(r=isNaN(r)?void 0:r,!p.call(this)){var a=M(this.ctx.transform.rotation),i=this.ctx.transform.scaleX;E.call(this,{text:e,x:t,y:n,scale:i,angle:a,align:this.textAlign,maxWidth:r})}},h.prototype.strokeText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||"string"!=typeof e)throw wa.error("jsPDF.context2d.strokeText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.strokeText");if(!m.call(this)){r=isNaN(r)?void 0:r;var a=M(this.ctx.transform.rotation),i=this.ctx.transform.scaleX;E.call(this,{text:e,x:t,y:n,scale:i,renderingMode:"stroke",angle:a,align:this.textAlign,maxWidth:r})}},h.prototype.measureText=function(e){if("string"!=typeof e)throw wa.error("jsPDF.context2d.measureText: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.measureText");var t=this.pdf,n=this.pdf.internal.scaleFactor,r=t.internal.getFontSize(),a=t.getStringUnitWidth(e)*r/t.internal.scaleFactor;return new function(e){var t=(e=e||{}).width||0;return Object.defineProperty(this,"width",{get:function(){return t}}),this}({width:a*=Math.round(96*n/72*1e4)/1e4})},h.prototype.scale=function(e,t){if(isNaN(e)||isNaN(t))throw wa.error("jsPDF.context2d.scale: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.scale");var n=new c(e,0,0,t,0,0);this.ctx.transform=this.ctx.transform.multiply(n)},h.prototype.rotate=function(e){if(isNaN(e))throw wa.error("jsPDF.context2d.rotate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.rotate");var t=new c(Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0);this.ctx.transform=this.ctx.transform.multiply(t)},h.prototype.translate=function(e,t){if(isNaN(e)||isNaN(t))throw wa.error("jsPDF.context2d.translate: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.translate");var n=new c(1,0,0,1,e,t);this.ctx.transform=this.ctx.transform.multiply(n)},h.prototype.transform=function(e,t,n,r,a,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(a)||isNaN(i))throw wa.error("jsPDF.context2d.transform: Invalid arguments",arguments),new Error("Invalid arguments passed to jsPDF.context2d.transform");var s=new c(e,t,n,r,a,i);this.ctx.transform=this.ctx.transform.multiply(s)},h.prototype.setTransform=function(e,t,n,r,a,i){e=isNaN(e)?1:e,t=isNaN(t)?0:t,n=isNaN(n)?0:n,r=isNaN(r)?1:r,a=isNaN(a)?0:a,i=isNaN(i)?0:i,this.ctx.transform=new c(e,t,n,r,a,i)};var g=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};h.prototype.drawImage=function(e,t,n,r,a,i,s,o,u){var d=this.pdf.getImageProperties(e),h=1,f=1,p=1,m=1;void 0!==r&&void 0!==o&&(p=o/r,m=u/a,h=d.width/r*o/r,f=d.height/a*u/a),void 0===i&&(i=t,s=n,t=0,n=0),void 0!==r&&void 0===o&&(o=r,u=a),void 0===r&&void 0===o&&(o=d.width,u=d.height);var b=this.ctx.transform.decompose(),w=M(b.rotate.shx),N=new c,A=(N=(N=(N=N.multiply(b.translate)).multiply(b.skew)).multiply(b.scale)).applyToRectangle(new l(i-t*p,s-n*m,r*h,a*f));if(this.autoPaging){for(var j,_=v.call(this,A),S=[],C=0;C<_.length;C+=1)-1===S.indexOf(_[C])&&S.push(_[C]);x(S);for(var E=S[0],L=S[S.length-1],P=E;P<L+1;P++){this.pdf.setPage(P);var T=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],R=1===P?this.posY+this.margin[0]:this.margin[0],F=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],O=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],D=1===P?0:F+(P-2)*O;if(0!==this.ctx.clip_path.length){var I=this.path;j=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(j,this.posX+this.margin[3],-D+R+this.ctx.prevPageLastElemOffset),k.call(this,"fill",!0),this.path=I}var z=JSON.parse(JSON.stringify(A));z=y([z],this.posX+this.margin[3],-D+R+this.ctx.prevPageLastElemOffset)[0];var B=(P>E||P<L)&&g.call(this);B&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],T,O,null).clip().discardPath()),this.pdf.addImage(e,"JPEG",z.x,z.y,z.w,z.h,null,null,w),B&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(e,"JPEG",A.x,A.y,A.w,A.h,null,null,w)};var v=function(e,t,n){var r=[];t=t||this.pdf.internal.pageSize.width,n=n||this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var a=this.posY+this.ctx.prevPageLastElemOffset;switch(e.type){default:case"mt":case"lt":r.push(Math.floor((e.y+a)/n)+1);break;case"arc":r.push(Math.floor((e.y+a-e.radius)/n)+1),r.push(Math.floor((e.y+a+e.radius)/n)+1);break;case"qct":var i=O(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x,e.y);r.push(Math.floor((i.y+a)/n)+1),r.push(Math.floor((i.y+i.h+a)/n)+1);break;case"bct":var s=D(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x2,e.y2,e.x,e.y);r.push(Math.floor((s.y+a)/n)+1),r.push(Math.floor((s.y+s.h+a)/n)+1);break;
vendor: 9,340 bytes, line 2
2case"rect":r.push(Math.floor((e.y+a)/n)+1),r.push(Math.floor((e.y+e.h+a)/n)+1)}for(var o=0;o<r.length;o+=1)for(;this.pdf.internal.getNumberOfPages()<r[o];)b.call(this);return r},b=function(){var e=this.fillStyle,t=this.strokeStyle,n=this.font,r=this.lineCap,a=this.lineWidth,i=this.lineJoin;this.pdf.addPage(),this.fillStyle=e,this.strokeStyle=t,this.font=n,this.lineCap=r,this.lineWidth=a,this.lineJoin=i},y=function(e,t,n){for(var r=0;r<e.length;r++)switch(e[r].type){case"bct":e[r].x2+=t,e[r].y2+=n;case"qct":e[r].x1+=t,e[r].y1+=n;default:e[r].x+=t,e[r].y+=n}return e},x=function(e){return e.sort(function(e,t){return e-t})},w=function(e,t){var n=this.fillStyle,r=this.strokeStyle,a=this.lineCap,i=this.lineWidth,s=Math.abs(i*this.ctx.transform.scaleX),o=this.lineJoin;if(this.autoPaging){for(var l,c,u=JSON.parse(JSON.stringify(this.path)),d=JSON.parse(JSON.stringify(this.path)),h=[],f=0;f<d.length;f++)if(void 0!==d[f].x)for(var p=v.call(this,d[f]),m=0;m<p.length;m+=1)-1===h.indexOf(p[m])&&h.push(p[m]);for(var w=0;w<h.length;w++)for(;this.pdf.internal.getNumberOfPages()<h[w];)b.call(this);x(h);for(var N=h[0],A=h[h.length-1],j=N;j<A+1;j++){this.pdf.setPage(j),this.fillStyle=n,this.strokeStyle=r,this.lineCap=a,this.lineWidth=s,this.lineJoin=o;var _=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],S=1===j?this.posY+this.margin[0]:this.margin[0],C=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],E=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],L=1===j?0:C+(j-2)*E;if(0!==this.ctx.clip_path.length){var P=this.path;l=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(l,this.posX+this.margin[3],-L+S+this.ctx.prevPageLastElemOffset),k.call(this,e,!0),this.path=P}if(c=JSON.parse(JSON.stringify(u)),this.path=y(c,this.posX+this.margin[3],-L+S+this.ctx.prevPageLastElemOffset),!1===t||0===j){var T=(j>N||j<A)&&g.call(this);T&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],_,E,null).clip().discardPath()),k.call(this,e,t),T&&this.pdf.restoreGraphicsState()}this.lineWidth=i}this.path=u}else this.lineWidth=s,k.call(this,e,t),this.lineWidth=i},k=function(e,t){if(("stroke"!==e||t||!m.call(this))&&("stroke"===e||t||!p.call(this))){for(var n,r,a=[],i=this.path,s=0;s<i.length;s++){var o=i[s];switch(o.type){case"begin":a.push({begin:!0});break;case"close":a.push({close:!0});break;case"mt":a.push({start:o,deltas:[],abs:[]});break;case"lt":var l=a.length;if(i[s-1]&&!isNaN(i[s-1].x)&&(n=[o.x-i[s-1].x,o.y-i[s-1].y],l>0))for(;l>=0;l--)if(!0!==a[l-1].close&&!0!==a[l-1].begin){a[l-1].deltas.push(n),a[l-1].abs.push(o);break}break;case"bct":n=[o.x1-i[s-1].x,o.y1-i[s-1].y,o.x2-i[s-1].x,o.y2-i[s-1].y,o.x-i[s-1].x,o.y-i[s-1].y],a[a.length-1].deltas.push(n);break;case"qct":var c=i[s-1].x+2/3*(o.x1-i[s-1].x),u=i[s-1].y+2/3*(o.y1-i[s-1].y),d=o.x+2/3*(o.x1-o.x),h=o.y+2/3*(o.y1-o.y),f=o.x,g=o.y;n=[c-i[s-1].x,u-i[s-1].y,d-i[s-1].x,h-i[s-1].y,f-i[s-1].x,g-i[s-1].y],a[a.length-1].deltas.push(n);break;case"arc":a.push({deltas:[],abs:[],arc:!0}),Array.isArray(a[a.length-1].abs)&&a[a.length-1].abs.push(o)}}r=t?null:"stroke"===e?"stroke":"fill";for(var v=!1,b=0;b<a.length;b++)if(a[b].arc)for(var y=a[b].abs,x=0;x<y.length;x++){var w=y[x];"arc"===w.type?j.call(this,w.x,w.y,w.radius,w.startAngle,w.endAngle,w.counterclockwise,void 0,t,!v):L.call(this,w.x,w.y),v=!0}else if(!0===a[b].close)this.pdf.internal.out("h"),v=!1;else if(!0!==a[b].begin){var k=a[b].start.x,N=a[b].start.y;P.call(this,a[b].deltas,k,N),v=!0}r&&_.call(this,r),t&&S.call(this)}},N=function(e){var t=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,n=t*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case"bottom":return e-n;case"top":return e+t-n;case"hanging":return e+t-2*n;case"middle":return e+t/2-n;default:return e}},A=function(e){return e+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};h.prototype.createLinearGradient=function(){var e=function(){};return e.colorStops=[],e.addColorStop=function(e,t){this.colorStops.push([e,t])},e.getColor=function(){return 0===this.colorStops.length?"#000000":this.colorStops[0][1]},e.isCanvasGradient=!0,e},h.prototype.createPattern=function(){return this.createLinearGradient()},h.prototype.createRadialGradient=function(){return this.createLinearGradient()};var j=function(e,t,n,r,a,i,s,o,l){for(var c=R.call(this,n,r,a,i),u=0;u<c.length;u++){var d=c[u];0===u&&(l?C.call(this,d.x1+e,d.y1+t):L.call(this,d.x1+e,d.y1+t)),T.call(this,e,t,d.x2,d.y2,d.x3,d.y3,d.x4,d.y4)}o?S.call(this):_.call(this,s)},_=function(e){switch(e){case"stroke":this.pdf.internal.out("S");break;case"fill":this.pdf.internal.out("f")}},S=function(){this.pdf.clip(),this.pdf.discardPath()},C=function(e,t){this.pdf.internal.out(n(e)+" "+a(t)+" m")},E=function(e){var t;switch(e.align){case"right":case"end":t="right";break;case"center":t="center";break;default:t="left"}var n,r,a,i=this.pdf.getTextDimensions(e.text),s=N.call(this,e.y),u=A.call(this,s)-i.h,d=this.ctx.transform.applyToPoint(new o(e.x,s));if(this.autoPaging){var h=this.ctx.transform.decompose(),f=new c;f=(f=(f=f.multiply(h.translate)).multiply(h.skew)).multiply(h.scale);for(var p=this.ctx.transform.applyToRectangle(new l(e.x,s,i.w,i.h)),m=f.applyToRectangle(new l(e.x,u,i.w,i.h)),b=v.call(this,m),w=[],j=0;j<b.length;j+=1)-1===w.indexOf(b[j])&&w.push(b[j]);x(w);for(var _=w[0],S=w[w.length-1],C=_;C<S+1;C++){this.pdf.setPage(C);var E=1===C?this.posY+this.margin[0]:this.margin[0],L=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],P=this.pdf.internal.pageSize.height-this.margin[2],T=P-this.margin[0],R=this.pdf.internal.pageSize.width-this.margin[1],F=R-this.margin[3],M=1===C?0:L+(C-2)*T;if(0!==this.ctx.clip_path.length){var O=this.path;n=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=y(n,this.posX+this.margin[3],-1*M+E),k.call(this,"fill",!0),this.path=O}var D=y([JSON.parse(JSON.stringify(m))],this.posX+this.margin[3],-M+E+this.ctx.prevPageLastElemOffset)[0];e.scale>=.01&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*e.scale),a=this.lineWidth,this.lineWidth=a*e.scale);var I="text"!==this.autoPaging;if(I||D.y+D.h<=P){if(I||D.y>=E&&D.x<=R){var z=I?e.text:this.pdf.splitTextToSize(e.text,e.maxWidth||R-D.x)[0],B=y([JSON.parse(JSON.stringify(p))],this.posX+this.margin[3],-M+E+this.ctx.prevPageLastElemOffset)[0],q=I&&(C>_||C<S)&&g.call(this);q&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],F,T,null).clip().discardPath()),this.pdf.text(z,B.x,B.y,{angle:e.angle,align:t,renderingMode:e.renderingMode}),q&&this.pdf.restoreGraphicsState()}}else D.y<P&&(this.ctx.prevPageLastElemOffset+=P-D.y);e.scale>=.01&&(this.pdf.setFontSize(r),this.lineWidth=a)}}else e.scale>=.01&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*e.scale),a=this.lineWidth,this.lineWidth=a*e.scale),this.pdf.text(e.text,d.x+this.posX,d.y+this.posY,{angle:e.angle,align:t,renderingMode:e.renderingMode,maxWidth:e.maxWidth}),e.scale>=.01&&(this.pdf.setFontSize(r),this.lineWidth=a)},L=function(e,t,r,i){r=r||0,i=i||0,this.pdf.internal.out(n(e+r)+" "+a(t+i)+" l")},P=function(e,t,n){return this.pdf.lines(e,t,n,null,null)},T=function(e,n,r,a,o,l,c,u){this.pdf.internal.out([t(i(r+e)),t(s(a+n)),t(i(o+e)),t(s(l+n)),t(i(c+e)),t(s(u+n)),"c"].join(" "))},R=function(e,t,n,r){for(var a=2*Math.PI,i=Math.PI/2;t>n;)t-=a;var s=Math.abs(n-t);s<a&&r&&(s=a-s);for(var o=[],l=r?-1:1,c=t;s>1e-5;){var u=c+l*Math.min(s,i);o.push(F.call(this,e,c,u)),s-=Math.abs(u-c),c=u}return o},F=function(e,t,n){var r=(n-t)/2,a=e*Math.cos(r),i=e*Math.sin(r),s=a,o=-i,l=s*s+o*o,c=l+s*a+o*i,u=4/3*(Math.sqrt(2*l*c)-c)/(s*i-o*a),d=s-u*o,h=o+u*s,f=d,p=-h,m=r+t,g=Math.cos(m),v=Math.sin(m);return{x1:e*Math.cos(t),y1:e*Math.sin(t),x2:d*g-h*v,y2:d*v+h*g,x3:f*g-p*v,y3:f*v+p*g,x4:e*Math.cos(n),y4:e*Math.sin(n)}},M=function(e){return 180*e/Math.PI},O=function(e,t,n,r,a,i){var s=e+.5*(n-e),o=t+.5*(r-t),c=a+.5*(n-a),u=i+.5*(r-i),d=Math.min(e,a,s,c),h=Math.max(e,a,s,c),f=Math.min(t,i,o,u),p=Math.max(t,i,o,u);return new l(d,f,h-d,p-f)},D=function(e,t,n,r,a,i,s,o){var c,u,d,h,f,p,m,g,v,b,y,x,w,k,N=n-e,A=r-t,j=a-n,_=i-r,S=s-a,C=o-i;for(u=0;u<41;u++)v=(m=(d=e+(c=u/40)*N)+c*((f=n+c*j)-d))+c*(f+c*(a+c*S-f)-m),b=(g=(h=t+c*A)+c*((p=r+c*_)-h))+c*(p+c*(i+c*C-p)-g),0==u?(y=v,x=b,w=v,k=b):(y=Math.min(y,v),x=Math.min(x,b),w=Math.max(w,v),k=Math.max(k,b));return new l(Math.round(y),Math.round(x),Math.round(w-y),Math.round(k-x))},I=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var e,t,n=(e=this.ctx.lineDash,t=this.ctx.lineDashOffset,JSON.stringify({lineDash:e,lineDashOffset:t}));this.prevLineDash!==n&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=n)}}}(Ja.API),function(e){var t=function(e){var t,n,r,a,i,s,o,l,c,u;for(/[^\x00-\xFF]/.test(e),n=[],r=0,a=(e+=t="\0\0\0\0".slice(e.length%4||4)).length;a>r;r+=4)0!==(i=(e.charCodeAt(r)<<24)+(e.charCodeAt(r+1)<<16)+(e.charCodeAt(r+2)<<8)+e.charCodeAt(r+3))?(s=(i=((i=((i=((i=(i-(u=i%85))/85)-(c=i%85))/85)-(l=i%85))/85)-(o=i%85))/85)%85,n.push(s+33,o+33,l+33,c+33,u+33)):n.push(122);return function(e,t){for(var n=t;n>0;n--)e.pop()}(n,t.length),String.fromCharCode.apply(String,n)+"~>"},n=function(e){var t,n,r,a,i,s=String,o="length",l=255,c="charCo
2deAt",u="slice",d="replace";for(e[u](-2),e=e[u](0,-2)[d](/\s/g,"")[d]("z","!!!!!"),r=[],a=0,i=(e+=t="uuuuu"[u](e[o]%5||5))[o];i>a;a+=5)n=52200625*(e[c](a)-33)+614125*(e[c](a+1)-33)+7225*(e[c](a+2)-33)+85*(e[c](a+3)-33)+(e[c](a+4)-33),r.push(l&n>>24,l&n>>16,l&n>>8,l&n);return function(e,t){for(var n=t;n>0;n--)e.pop()}(r,t[o]),s.fromCharCode.apply(s,r)},r=function(e){return e.split("").map(function(e){return("0"+e.charCodeAt().toString(16)).slice(-2)}).join("")+">"},a=function(e){var t=new RegExp(/^([0-9A-Fa-f]{2})+$/);if(-1!==(e=e.replace(/\s/g,"")).indexOf(">")&&(e=e.substr(0,e.indexOf(">"))),e.length%2&&(e+="0"),!1===t.test(e))return"";for(var n="",r=0;r<e.length;r+=2)n+=String.fromCharCode("0x"+(e[r]+e[r+1]));return n},i=function(e){for(var t=new Uint8Array(e.length),n=e.length;n--;)t[n]=e.charCodeAt(n);return(t=q(t)).reduce(function(e,t){return e+String.fromCharCode(t)},"")};e.processDataByFilters=function(e,s){var o=0,l=e||"",c=[];for("string"==typeof(s=s||[])&&(s=[s]),o=0;o<s.length;o+=1)switch(s[o]){case"ASCII85Decode":case"/ASCII85Decode":l=n(l),c.push("/ASCII85Encode");break;case"ASCII85Encode":case"/ASCII85Encode":l=t(l),c.push("/ASCII85Decode");break;case"ASCIIHexDecode":case"/ASCIIHexDecode":l=a(l),c.push("/ASCIIHexEncode");break;case"ASCIIHexEncode":case"/ASCIIHexEncode":l=r(l),c.push("/ASCIIHexDecode");break;case"FlateEncode":case"/FlateEncode":l=i(l),c.push("/FlateDecode");break;default:throw new Error('The filter: "'+s[o]+'" is not implemented')}return{data:l,reverseChain:c.reverse().join(" ")}}}(Ja.API),function(e){e.loadFile=function(e,t,n){return function(e,t,n){t=!1!==t,n="function"==typeof n?n:function(){};var r=void 0;try{r=function(e,t,n){var r=new XMLHttpRequest,a=0,i=function(e){var t=e.length,n=[],r=String.fromCharCode;for(a=0;a<t;a+=1)n.push(r(255&e.charCodeAt(a)));return n.join("")};if(r.open("GET",e,!t),r.overrideMimeType("text/plain; charset=x-user-defined"),!1===t&&(r.onload=function(){200===r.status?n(i(this.responseText)):n(void 0)}),r.send(null),t&&200===r.status)return i(r.responseText)}(e,t,n)}catch(v){}return r}(e,t,n)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile}(Ja.API),function(e){function t(){return(ya.html2canvas?Promise.resolve(ya.html2canvas):n.e(239).then(n.t.bind(n,5239,23))).catch(function(e){return Promise.reject(new Error("Could not load html2canvas: "+e))}).then(function(e){return e.default?e.default:e})}function a(){return(ya.DOMPurify?Promise.resolve(ya.DOMPurify):n.e(977).then(n.bind(n,7977))).catch(function(e){return Promise.reject(new Error("Could not load dompurify: "+e))}).then(function(e){return e.default?e.default:e})}var i=function(e){var t=r(e);return"undefined"===t?"undefined":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?"function":e&&e.constructor===Array?"array":e&&1===e.nodeType?"element":"object"===t?"object":"unknown"},s=function(e,t){var n=document.createElement(e);for(var r in t.className&&(n.className=t.className),t.innerHTML&&t.dompurify&&(n.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)n.style[r]=t.style[r];return n},o=function e(t,n){for(var r=3===t.nodeType?document.createTextNode(t.nodeValue):t.cloneNode(!1),a=t.firstChild;a;a=a.nextSibling)!0!==n&&1===a.nodeType&&"SCRIPT"===a.nodeName||r.appendChild(e(a,n));return 1===t.nodeType&&("CANVAS"===t.nodeName?(r.width=t.width,r.height=t.height,r.getContext("2d").drawImage(t,0,0)):"TEXTAREA"!==t.nodeName&&"SELECT"!==t.nodeName||(r.value=t.value),r.addEventListener("load",function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft},!0)),r},l=function e(t){var n=Object.assign(e.convert(Promise.resolve()),JSON.parse(JSON.stringify(e.template))),r=e.convert(Promise.resolve(),n);return(r=r.setProgress(1,e,1,[e])).set(t)};(l.prototype=Object.create(Promise.prototype)).constructor=l,l.convert=function(e,t){return e.__proto__=t||l.prototype,e},l.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:"file.pdf",margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:"transparent"}},l.prototype.from=function(e,t){return this.then(function(){switch(t=t||function(e){switch(i(e)){case"string":return"string";
vendor: 15,277 bytes, line 2
2case"element":return"canvas"===e.nodeName.toLowerCase()?"canvas":"element";default:return"unknown"}}(e),t){case"string":return this.then(a).then(function(t){return this.set({src:s("div",{innerHTML:e,dompurify:t})})});case"element":return this.set({src:e});case"canvas":return this.set({canvas:e});case"img":return this.set({img:e});default:return this.error("Unknown source type.")}})},l.prototype.to=function(e){switch(e){case"container":return this.toContainer();case"canvas":return this.toCanvas();case"img":return this.toImg();case"pdf":return this.toPdf();default:return this.error("Invalid target.")}},l.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error("Cannot duplicate - no source HTML.")},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var e={position:"relative",display:"inline-block",width:("number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+"px",left:0,right:0,top:0,margin:"auto",backgroundColor:this.opt.backgroundColor},t=o(this.prop.src,this.opt.html2canvas.javascriptEnabled);"BODY"===t.tagName&&(e.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+"px"),this.prop.overlay=s("div",{className:"html2pdf__overlay",style:{position:"fixed",overflow:"hidden",zIndex:1e3,left:"-100000px",right:0,bottom:0,top:0}}),this.prop.container=s("div",{className:"html2pdf__container",style:e}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(s("div",{style:{clear:"both",border:"0 none transparent",margin:0,padding:0,height:0}})),this.prop.container.style.float="none",this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position="relative",this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+"px"})},l.prototype.toCanvas=function(){var e=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(e).then(t).then(function(e){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)}).then(function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},l.prototype.toContext2d=function(){var e=[function(){return document.body.contains(this.prop.container)||this.toContainer()}];return this.thenList(e).then(t).then(function(e){var t=this.opt.jsPDF,n=this.opt.fontFaces,r="number"!=typeof this.opt.width||isNaN(this.opt.width)||"number"!=typeof this.opt.windowWidth||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,a=Object.assign({async:!0,allowTaint:!0,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:"#ffffff",imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete a.onrendered,t.context2d.autoPaging=void 0===this.opt.autoPaging||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=n,n)for(var i=0;i<n.length;++i){var s=n[i],o=s.src.find(function(e){return"truetype"===e.format});o&&t.addFont(o.url,s.ref.name,s.ref.style)}return a.windowHeight=a.windowHeight||0,a.windowHeight=0==a.windowHeight?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):a.windowHeight,t.context2d.save(!0),e(this.prop.container,a)}).then(function(e){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},l.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var e=this.prop.canvas.toDataURL("image/"+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement("img"),this.prop.img.src=e})},l.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},l.prototype.output=function(e,t,n){return"img"===(n=n||"pdf").toLowerCase()||"image"===n.toLowerCase()?this.outputImg(e,t):this.outputPdf(e,t)},l.prototype.outputPdf=function(e,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(e,t)})},l.prototype.outputImg=function(e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(e){case void 0:case"img":return this.prop.img;case"datauristring":case"dataurlstring":return this.prop.img.src;case"datauri":case"dataurl":return document.location.href=this.prop.img.src;default:throw'Image output type "'+e+'" is not supported.'}})},l.prototype.save=function(e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(e?{filename:e}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},l.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},l.prototype.set=function(e){if("object"!==i(e))return this;var t=Object.keys(e||{}).map(function(t){if(t in l.template.prop)return function(){this.prop[t]=e[t]};switch(t){case"margin":return this.setMargin.bind(this,e.margin);case"jsPDF":return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case"pageSize":return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},l.prototype.get=function(e,t){return this.then(function(){var n=e in l.template.prop?this.prop[e]:this.opt[e];return t?t(n):n})},l.prototype.setMargin=function(e){return this.then(function(){switch(i(e)){case"number":e=[e,e,e,e];case"array":if(2===e.length&&(e=[e[0],e[1],e[0],e[1]]),4===e.length)break;default:return this.error("Invalid margin array.")}this.opt.margin=e}).then(this.setPageSize)},l.prototype.setPageSize=function(e){function t(e,t){return Math.floor(e*t/72*96)}return this.then(function(){(e=e||Ja.getPageSize(this.opt.jsPDF)).hasOwnProperty("inner")||(e.inner={width:e.width-this.opt.margin[1]-this.opt.margin[3],height:e.height-this.opt.margin[0]-this.opt.margin[2]},e.inner.px={width:t(e.inner.width,e.k),height:t(e.inner.height,e.k)},e.inner.ratio=e.inner.height/e.inner.width),this.prop.pageSize=e})},l.prototype.setProgress=function(e,t,n,r){return null!=e&&(this.progress.val=e),null!=t&&(this.progress.state=t),null!=n&&(this.progress.n=n),null!=r&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},l.prototype.updateProgress=function(e,t,n,r){return this.setProgress(e?this.progress.val+e:null,t||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},l.prototype.then=function(e,t){var n=this;return this.thenCore(e,t,function(e,t){return n.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return n.updateProgress(null,e),t}).then(e,t).then(function(e){return n.updateProgress(1),e})})},l.prototype.thenCore=function(e,t,n){n=n||Promise.prototype.then;var r=this;e&&(e=e.bind(r)),t&&(t=t.bind(r));var a=-1!==Promise.toString().indexOf("[native code]")&&"Promise"===Promise.name?r:l.convert(Object.assign({},r),Promise.prototype),i=n.call(a,e,t);return l.convert(i,r.__proto__)},l.prototype.thenExternal=function(e,t){return Promise.prototype.then.call(this,e,t)},l.prototype.thenList=function(e){var t=this;return e.forEach(function(e){t=t.thenCore(e)}),t},l.prototype.catch=function(e){e&&(e=e.bind(this));var t=Promise.prototype.catch.call(this,e);return l.convert(t,this)},l.prototype.catchExternal=function(e){return Promise.prototype.catch.call(this,e)},l.prototype.error=function(e){return this.then(function(){throw new Error(e)})},l.prototype.using=l.prototype.set,l.prototype.saveAs=l.prototype.save,l.prototype.export=l.prototype.output,l.prototype.run=l.prototype.then,Ja.getPageSize=function(e,t,n){if("object"===r(e)){var a=e;e=a.orientation,t=a.unit||t,n=a.format||n}t=t||"mm",n=n||"a4",e=(""+(e||"P")).toLowerCase();var i,s=(""+n).toLowerCase(),o={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(t){case"pt":i=1;break;case"mm":i=72/25.4;break;case"cm":i=72/2.54;break;case"in":i=72;break;case"px":i=.75;break;case"pc":case"em":i=12;break;case"ex":i=6;break;default:throw"Invalid unit: "+t}var l,c=0,u=0;if(o.hasOwnProperty(s))c=o[s][1]/i,u=o[s][0]/i;else try{c=n[1],u=n[0]}catch(_a){throw new Error("Invalid format: "+n)}if("p"===e||"portrait"===e)e="p",u>c&&(l=u,u=c,c=l);else{if("l"!==e&&"landscape"!==e)throw"Invalid orientation: "+e;e="l",c>u&&(l=u,u=c,c=l)}return{width:u,height:c,unit:t,k:i,orientation:e}},e.html=function(e,t){(t=t||{}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(Gi):null;var n=new l(t);return t.worker?n:n.from(e).doCallback()}}(Ja.API),Ja.API.addJS=function(e){var t,n,r=function(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if("("===r||")"===r){for(var a=0,i=n-1;i>=0&&"\\"===e[i];i--)a++;t+=a%2==0?"\\"+r:r}else t+=r}return t}(e);return this.internal.events.subscribe("postPutResources",function(){t=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/Names [(EmbeddedJS) "+(t+1)+" 0 R]"),this.internal.out(">>"),this.internal.out("endobj"),n=this.internal.newObject(),this.internal.out("<<"),this.internal.out("/S /JavaScript"),this.internal.out("/JS ("+r+")"),this.internal.out(">>"),this.internal.out("endobj")}),this.internal.events.subscribe("putCatalog",function(){void 0!==t&&void 0!==n&&this.internal.out("/Names <</JavaScript "+t+" 0 R>>")}),this},function(e){var t;e.events.push(["postPutResources",function(){var e=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var r=e.outline.render().split(/\r\n/),a=0;a<r.length;a++){var i=r[a],s=n.exec(i);if(null!=s){var o=s[1];e.internal.newObjectDeferredBegin(o,!1)}e.internal.write(i)}if(this.outline.createNamedDestinations){var l=this.internal.pages.length,c=[];for(a=0;a<l;a++){var u=e.internal.newObject();c.push(u);var d=e.internal.getPageInfo(a+1);e.internal.write("<< /D["+d.objId+" 0 R /XYZ null null null]>> endobj")}var h=e.internal.newObject();for(e.internal.write("<< /Names [ "),a=0;a<c.length;a++)e.internal.write("(page_"+(a+1)+")"+c[a]+" 0 R");e.internal.write(" ] >>","endobj"),t=e.internal.newObject(),e.internal.write("<< /Dests "+h+" 0 R"),e.internal.write(">>","endobj")}}]),e.events.push(["putCatalog",function(){var e=this;e.outline.root.children.length>0&&(e.internal.write("/Outlines",this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write("/Names "+t+" 0 R"))}]),e.events.push(["initialized",function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(e,t,n){var r={title:t,options:n,children:[]};return null==e&&(e=this.root),e.children.push(r),r},e.outline.render=function(){return this.ctx={},this.ctx.val="",this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(t){t.id=e.internal.newObjectDeferred();for(var n=0;n<t.children.length;n++)this.genIds_r(t.children[n])},e.outline.renderRoot=function(e){this.objStart(e),this.line("/Type /Outlines"),e.children.length>0&&(this.line("/First "+this.makeRef(e.children[0])),this.line("/Last "+this.makeRef(e.children[e.children.length-1]))),this.line("/Count "+this.count_r({count:0},e)),this.objEnd()},e.outline.renderItems=function(t){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r<t.children.length;r++){var a=t.children[r];this.objStart(a),this.line("/Title "+this.makeString(a.title)),this.line("/Parent "+this.makeRef(t)),r>0&&this.line("/Prev "+this.makeRef(t.children[r-1])),r<t.children.length-1&&this.line("/Next "+this.makeRef(t.children[r+1])),a.children.length>0&&(this.line("/First "+this.makeRef(a.children[0])),this.line("/Last "+this.makeRef(a.children[a.children.length-1])));var i=this.count=this.count_r({count:0},a);if(i>0&&this.line("/Count "+i),a.options&&a.options.pageNumber){var s=e.internal.getPageInfo(a.options.pageNumber);this.line("/Dest ["+s.objId+" 0 R /XYZ 0 "+n(0)+" 0]")}this.objEnd()}for(var o=0;o<t.children.length;o++)this.renderItems(t.children[o])},e.outline.line=function(e){this.ctx.val+=e+"\r\n"},e.outline.makeRef=function(e){return e.id+" 0 R"},e.outline.makeString=function(t){return"("+e.internal.pdfEscape(t)+")"},e.outline.objStart=function(e){this.ctx.val+="\r\n"+e.id+" 0 obj\r\n<<\r\n"},e.outline.objEnd=function(){this.ctx.val+=">> \r\nendobj\r\n"},e.outline.count_r=function(e,t){for(var n=0;n<t.children.length;n++)e.count++,this.count_r(e,t.children[n]);return e.count}}])}(Ja.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(e,n,r,a,i,s){var o,l=this.decode.DCT_DECODE,c=null;if("string"==typeof e||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=i||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,o=function(e){for(var n,r=256*e.charCodeAt(4)+e.charCodeAt(5),a=e.length,i={width:0,height:0,numcomponents:1},s=4;s<a;s+=2){if(s+=r,-1!==t.indexOf(e.charCodeAt(s+1))){n=256*e.charCodeAt(s+5)+e.charCodeAt(s+6),i={width:256*e.charCodeAt(s+7)+e.charCodeAt(s+8),height:n,numcomponents:e.charCodeAt(s+9)};break}r=256*e.charCodeAt(s+2)+e.charCodeAt(s+3)}return i}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),o.numcomponents){case 1:s=this.color_spaces.DEVICE_GRAY;break;case 4:s=this.color_spaces.DEVICE_CMYK;break;case 3:s=this.color_spaces.DEVICE_RGB}c={data:e,width:o.width,height:o.height,colorSpace:s,bitsPerComponent:8,filter:l,index:n,alias:r}}return c}}(Ja.API),Ja.API.processPNG=function(e,t,n,r){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var a,i=function(e,t){return new va(e,t).decode()}(e,{checkCrc:!0}),s=i.width,o=i.height,l=i.channels,c=i.palette,u=i.depth;
vendor: 4,341 bytes, line 2
2a=c&&1===l?function(e){for(var t=e.width,n=e.height,r=e.data,a=e.palette,i=e.depth,s=!1,o=[],l=[],c=void 0,u=!1,d=0,h=0;h<a.length;h++){var f=H(a[h],4),p=f[0],m=f[1],g=f[2],v=f[3];o.push(p,m,g),null!=v&&(0===v?(d++,l.length<1&&l.push(h)):v<255&&(u=!0))}if(u||d>1){s=!0,l=void 0;var b=t*n;c=new Uint8Array(b);for(var y=new DataView(r.buffer),x=0;x<b;x++){var w=H(a[ps(y,x,i)],4)[3];c[x]=w}}else 0===d&&(l=void 0);return{colorSpace:"Indexed",colorsPerPixel:1,sMaskBitsPerComponent:s?8:void 0,colorBytes:r,alphaBytes:c,needSMask:s,palette:o,mask:l}}(i):2===l||4===l?function(e){for(var t=e.data,n=e.width,r=e.height,a=e.channels,i=e.depth,s=2===a?"DeviceGray":"DeviceRGB",o=a-1,l=n*r,c=o,u=l*c,d=1*l,h=Math.ceil(u*i/8),f=Math.ceil(d*i/8),p=new Uint8Array(h),m=new Uint8Array(f),g=new DataView(t.buffer),v=new DataView(p.buffer),b=new DataView(m.buffer),y=!1,x=0;x<l;x++){for(var w=x*a,k=0;k<c;k++)ms(v,ps(g,w+k,i),x*c+k,i);var N=ps(g,w+c,i);N<(1<<i)-1&&(y=!0),ms(b,N,1*x,i)}return{colorSpace:s,colorsPerPixel:o,sMaskBitsPerComponent:y?i:void 0,colorBytes:p,alphaBytes:m,needSMask:y}}(i):function(e){var t=e.data,n=1===e.channels?"DeviceGray":"DeviceRGB";return{colorSpace:n,colorsPerPixel:"DeviceGray"===n?1:3,colorBytes:t instanceof Uint16Array?function(e){for(var t=e.length,n=new Uint8Array(2*t),r=new DataView(n.buffer,n.byteOffset,n.byteLength),a=0;a<t;a++)r.setUint16(2*a,e[a],!1);return n}(t):t,needSMask:!1}}(i);var d,h,f,p=a,m=p.colorSpace,g=p.colorsPerPixel,v=p.sMaskBitsPerComponent,b=p.colorBytes,y=p.alphaBytes,x=p.needSMask,w=p.palette,k=p.mask,N=null;return r!==Ja.API.image_compression.NONE?(N=function(e){var t;switch(e){case Ja.API.image_compression.FAST:t=11;break;case Ja.API.image_compression.MEDIUM:t=13;break;case Ja.API.image_compression.SLOW:t=14;break;default:t=12}return t}(r),d=this.decode.FLATE_DECODE,h="/Predictor ".concat(N," /Colors ").concat(g," /BitsPerComponent ").concat(u," /Columns ").concat(s),e=ss(b,Math.ceil(s*g*u/8),g,u,r),x&&(f=ss(y,Math.ceil(s*v/8),1,v,r))):(d=void 0,h=void 0,e=b,x&&(f=y)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(f&&this.__addimage__.isArrayBuffer(f)||this.__addimage__.isArrayBufferView(f))&&(f=this.__addimage__.arrayBufferToBinaryString(f)),{alias:n,data:e,index:t,filter:d,decodeParameters:h,transparency:k,palette:w,sMask:f,predictor:N,width:s,height:o,bitsPerComponent:u,sMaskBitsPerComponent:v,colorSpace:m}}},function(e){e.processGIF89A=function(t,n,r,a){var i=new vs(t),s=i.width,o=i.height,l=[];i.decodeAndBlitFrameRGBA(0,l);var c={data:l,width:s,height:o},u=new ys(100).encode(c,100);return e.processJPEG.call(this,u,n,r,a)},e.processGIF87A=e.processGIF89A}(Ja.API),xs.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,16===this.bitPP&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=0===this.colors?1<<this.bitPP:this.colors;this.palette=new Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:a,green:r,blue:n,quad:i}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},xs.prototype.parseBGR=function(){this.pos=this.offset;var e="bit"+this.bitPP,t=this.width*this.height*4;if(t>536870912)throw new Error("Image dimensions exceed 512MB, which is too large.");this.data=new Uint8Array(t);try{this[e]()}catch(n){wa.log("bit decode error:"+n)}},xs.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;
vendor: 4,889 bytes, line 2
2for(e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,a=0;a<t;a++)for(var i=this.datav.getUint8(this.pos++,!0),s=r*this.width*4+8*a*4,o=0;o<8&&8*a+o<this.width;o++){var l=this.palette[i>>7-o&1];this.data[s+4*o]=l.blue,this.data[s+4*o+1]=l.green,this.data[s+4*o+2]=l.red,this.data[s+4*o+3]=255}0!==n&&(this.pos+=4-n)}},xs.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,a=0;a<e;a++){var i=this.datav.getUint8(this.pos++,!0),s=r*this.width*4+2*a*4,o=i>>4,l=15&i,c=this.palette[o];if(this.data[s]=c.blue,this.data[s+1]=c.green,this.data[s+2]=c.red,this.data[s+3]=255,2*a+1>=this.width)break;c=this.palette[l],this.data[s+4]=c.blue,this.data[s+4+1]=c.green,this.data[s+4+2]=c.red,this.data[s+4+3]=255}0!==t&&(this.pos+=4-t)}},xs.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var a=this.datav.getUint8(this.pos++,!0),i=n*this.width*4+4*r;if(a<this.palette.length){var s=this.palette[a];this.data[i]=s.red,this.data[i+1]=s.green,this.data[i+2]=s.blue,this.data[i+3]=255}else this.data[i]=255,this.data[i+1]=255,this.data[i+2]=255,this.data[i+3]=255}0!==e&&(this.pos+=4-e)}},xs.prototype.bit15=function(){for(var e=this.width%3,t=parseInt("11111",2),n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,a=0;a<this.width;a++){var i=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(i&t)/t*255|0,o=(i>>5&t)/t*255|0,l=(i>>10&t)/t*255|0,c=i>>15?255:0,u=r*this.width*4+4*a;this.data[u]=l,this.data[u+1]=o,this.data[u+2]=s,this.data[u+3]=c}this.pos+=e}},xs.prototype.bit16=function(){for(var e=this.width%3,t=parseInt("11111",2),n=parseInt("111111",2),r=this.height-1;r>=0;r--){for(var a=this.bottom_up?r:this.height-1-r,i=0;i<this.width;i++){var s=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(s&t)/t*255|0,l=(s>>5&n)/n*255|0,c=(s>>11)/t*255|0,u=a*this.width*4+4*i;this.data[u]=c,this.data[u+1]=l,this.data[u+2]=o,this.data[u+3]=255}this.pos+=e}},xs.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=i,this.data[s+1]=a,this.data[s+2]=r,this.data[s+3]=255}this.pos+=this.width%4}},xs.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),s=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*n;this.data[o]=i,this.data[o+1]=a,this.data[o+2]=r,this.data[o+3]=s}},xs.prototype.getData=function(){return this.data},function(e){e.processBMP=function(t,n,r,a){var i=new xs(t,!1),s=i.width,o=i.height,l={data:i.getData(),width:s,height:o},c=new ys(100).encode(l,100);return e.processJPEG.call(this,c,n,r,a)}}(Ja.API),ws.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(t,n,r,a){var i=new ws(t),s=i.width,o=i.height,l={data:i.getData(),width:s,height:o},c=new ys(100).encode(l,100);return e.processJPEG.call(this,c,n,r,a)}}(Ja.API),Ja.API.processRGBA=function(e,t,n){for(var r=e.data,a=r.length,i=new Uint8Array(a/4*3),s=new Uint8Array(a/4),o=0,l=0,c=0;c<a;c+=4){var u=r[c],d=r[c+1],h=r[c+2],f=r[c+3];i[o++]=u,i[o++]=d,i[o++]=h,s[l++]=f}var p=this.__addimage__.arrayBufferToBinaryString(i);return{alpha:this.__addimage__.arrayBufferToBinaryString(s),data:p,index:t,alias:n,colorSpace:"DeviceRGB",bitsPerComponent:8,width:e.width,height:e.height}},Ja.API.setLanguage=function(e){return void 0===this.internal.languageSettings&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),void 0!=={af:"Afrikaans",sq:"Albanian",ar:"Arabic (Standard)","ar-DZ":"Arabic (Algeria)","ar-BH":"Arabic (Bahrain)","ar-EG":"Arabic (Egypt)","ar-IQ":"Arabic (Iraq)","ar-JO":"Arabic (Jordan)","ar-KW":"Arabic (Kuwait)","ar-LB":"Arabic (Lebanon)","ar-LY":"Arabic (Libya)","ar-MA":"Arabic (Morocco)","ar-OM":"Arabic (Oman)","ar-QA":"Arabic (Qatar)","ar-SA":"Arabic (Saudi Arabia)","ar-SY":"Arabic (Syria)","ar-TN":"Arabic (Tunisia)","ar-AE":"Arabic (U.A.E.)","ar-YE":"Arabic (Yemen)",an:"Aragonese",hy:"Armenian",as:"Assamese",ast:"Asturian",az:"Azerbaijani",eu:"Basque",be:"Belarusian",bn:"Bengali",bs:"Bosnian",br:"Breton",bg:"Bulgarian",my:"Burmese",ca:"Catalan",ch:"Chamorro",ce:"Chechen",zh:"Chinese","zh-HK":"Chinese (Hong Kong)","zh-CN":"Chinese (PRC)","zh-SG":"Chinese (Singapore)","zh-TW":"Chinese (Taiwan)",cv:"Chuvash",co:"Corsican",cr:"Cree",hr:"Croatian",cs:"Czech",da:"Danish",nl:"Dutch (Standard)","nl-BE":"Dutch (Belgian)",en:"English","en-AU":"English (Australia)","en-BZ":"English (Belize)","en-CA":"English (Canad
2a)","en-IE":"English (Ireland)","en-JM":"English (Jamaica)","en-NZ":"English (New Zealand)","en-PH":"English (Philippines)","en-ZA":"English (South Africa)","en-TT":"English (Trinidad & Tobago)","en-GB":"English (United Kingdom)","en-US":"English (United States)","en-ZW":"English (Zimbabwe)",eo:"Esperanto",et:"Estonian",fo:"Faeroese",fj:"Fijian",fi:"Finnish",fr:"French (Standard)","fr-BE":"French (Belgium)","fr-CA":"French (Canada)","fr-FR":"French (France)","fr-LU":"French (Luxembourg)","fr-MC":"French (Monaco)","fr-CH":"French (Switzerland)",fy:"Frisian",fur:"Friulian",gd:"Gaelic (Scots)","gd-IE":"Gaelic (Irish)",gl:"Galacian",ka:"Georgian",de:"German (Standard)","de-AT":"German (Austria)","de-DE":"German (Germany)","de-LI":"German (Liechtenstein)","de-LU":"German (Luxembourg)","de-CH":"German (Switzerland)",el:"Greek",gu:"Gujurati",ht:"Haitian",he:"Hebrew",hi:"Hindi",hu:"Hungarian",is:"Icelandic",id:"Indonesian",iu:"Inuktitut",ga:"Irish",it:"Italian (Standard)","it-CH":"Italian (Switzerland)",ja:"Japanese",kn:"Kannada",ks:"Kashmiri",kk:"Kazakh",km:"Khmer",ky:"Kirghiz",tlh:"Klingon",ko:"Korean","ko-KP":"Korean (North Korea)","ko-KR":"Korean (South Korea)",la:"Latin",lv:"Latvian",lt:"Lithuanian",lb:"Luxembourgish",mk:"North Macedonia",ms:"Malay",ml:"Malayalam",mt:"Maltese",mi:"Maori",mr:"Marathi",mo:"Moldavian",nv:"Navajo",ng:"Ndonga",ne:"Nepali",no:"Norwegian",nb:"Norwegian (Bokmal)",nn:"Norwegian (Nynorsk)",oc:"Occitan",or:"Oriya",om:"Oromo",fa:"Persian","fa-IR":"Persian/Iran",pl:"Polish",pt:"Portuguese","pt-BR":"Portuguese (Brazil)",pa:"Punjabi","pa-IN":"Punjabi (India)","pa-PK":"Punjabi (Pakistan)",qu:"Quechua",rm:"Rhaeto-Romanic",ro:"Romanian","ro-MO":"Romanian (Moldavia)",ru:"Russian","ru-MO":"Russian (Moldavia)",sz:"Sami (Lappish)",sg:"Sango",sa:"Sanskrit",sc:"Sardinian",sd:"Sindhi",si:"Singhalese",sr:"Serbian",sk:"Slovak",sl:"Slovenian",so:"Somani",sb:"Sorbian",es:"Spanish","es-AR":"Spanish (Argentina)","es-BO":"Spanish (Bolivia)","es-CL":"Spanish (Chile)","es-CO":"Spanish (Colombia)","es-CR":"Spanish (Costa Rica)","es-DO":"Spanish (Dominican Republic)","es-EC":"Spanish (Ecuador)","es-SV":"Spanish (El Salvador)","es-GT":"Spanish (Guatemala)","es-HN":"Spanish (Honduras)","es-MX":"Spanish (Mexico)","es-NI":"Spanish (Nicaragua)","es-PA":"Spanish (Panama)","es-PY":"Spanish (Paraguay)","es-PE":"Spanish (Peru)","es-PR":"Spanish (Puerto Rico)","es-ES":"Spanish (Spain)","es-UY":"Spanish (Uruguay)","es-VE":"Spanish (Venezuela)",sx:"Sutu",sw:"Swahili",sv:"Swedish","sv-FI":"Swedish (Finland)","sv-SV":"Swedish (Sweden)",ta:"Tamil",tt:"Tatar",te:"Teluga",th:"Thai",tig:"Tigre",ts:"Tsonga",tn:"Tswana",tr:"Turkish",tk:"Turkmen",uk:"Ukrainian",hsb:"Upper Sorbian",ur:"Urdu",ve:"Venda",vi:"Vietnamese",vo:"Volapuk",wa:"Walloon",cy:"Welsh",xh:"Xhosa",ji:"Yiddish",zu:"Zulu"}[e]&&(this.internal.languageSettings.languageCode=e,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){this.internal.write("/Lang ("+this.internal.languageSettings.languageCode+")")}),this.internal.languageSettings.isSubscribed=!0)),this},es=Ja.API,ts=es.getCharWidthsArray=function(e,t){var n,a,i=(t=t||{}).font||this.internal.getFont(),s=t.fontSize||this.internal.getFontSize(),o=t.charSpace||this.internal.getCharSpace(),l=t.widths?t.widths:i.metadata.Unicode.widths,c=l.fof?l.fof:1,u=t.kerning?t.kerning:i.metadata.Unicode.kerning,d=u.fof?u.fof:1,h=!1!==t.doKerning,f=0,p=e.length,m=0,g=l[0]||c,v=[];for(n=0;n<p;n++)a=e.charCodeAt(n),"function"==typeof i.metadata.widthOfString?v.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(a))+o*(1e3/s)||0)/1e3):(f=h&&"object"===r(u[a])&&!isNaN(parseInt(u[a][m],10))?u[a][m]/d:0,v.push((l[a]||g)/c+f)),m=a;return v},ns=es.getStringUnitWidth=function(e,t){var n=(t=t||{}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),a=t.charSpace||this.internal.getCharSpace();return es.processArabic&&(e=es.processArabic(e)),"function"==typeof r.metadata.widthOfString?r.metadata.widthOfString(e,n,a)/n:ts.apply(this,arguments).reduce(function(e,t){return e+t},0)},rs=function(e,t,n,r){for(var a=[],i=0,s=e.length,o=0;i!==s&&o+t[i]<n;)o+=t[i],i++;a.push(e.slice(0,i));var l=i;for(o=0;i!==s;)o+t[i]>
vendor: 2,999 bytes, line 2
2r&&(a.push(e.slice(l,i)),o=0,l=i),o+=t[i],i++;return l!==i&&a.push(e.slice(l,i)),a},as=function(e,t,n){n||(n={});var r,a,i,s,o,l,c,u=[],d=[u],h=n.textIndent||0,f=0,p=0,m=e.split(" "),g=ts.apply(this,[" ",n])[0];if(l=-1===n.lineIndent?m[0].length+2:n.lineIndent||0){var v=Array(l).join(" "),b=[];m.map(function(e){(e=e.split(/\s*\n/)).length>1?b=b.concat(e.map(function(e,t){return(t&&e.length?"\n":"")+e})):b.push(e[0])}),m=b,l=ns.apply(this,[v,n])}for(i=0,s=m.length;i<s;i++){var y=0;if(r=m[i],l&&"\n"==r[0]&&(r=r.substr(1),y=1),h+f+(p=(a=ts.apply(this,[r,n])).reduce(function(e,t){return e+t},0))>t||y){if(p>t){for(o=rs.apply(this,[r,a,t-(h+f),t]),u.push(o.shift()),u=[o.pop()];o.length;)d.push([o.shift()]);p=a.slice(r.length-(u[0]?u[0].length:0)).reduce(function(e,t){return e+t},0)}else u=[r];d.push(u),h=p+l,f=g}else u.push(r),h+=f+p,f=g}return c=l?function(e,t){return(t?v:"")+e.join(" ")}:function(e){return e.join(" ")},d.map(c)},es.splitTextToSize=function(e,t,n){var r,a=(n=n||{}).fontSize||this.internal.getFontSize(),i=function(e){if(e.widths&&e.kerning)return{widths:e.widths,kerning:e.kerning};var t=this.internal.getFont(e.fontName,e.fontStyle),n="Unicode";return t.metadata[n]?{widths:t.metadata[n].widths||{0:1},kerning:t.metadata[n].kerning||{}}:{font:t.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var s=1*this.internal.scaleFactor*t/a;i.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/a:0,i.lineIndent=n.lineIndent;var o,l,c=[];for(o=0,l=r.length;o<l;o++)c=c.concat(as.apply(this,[r[o],s,i]));return c},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t="0123456789abcdef",n="klmnopqrstuvwxyz",a={},i={},s=0;s<16;s++)a[n[s]]=t[s],i[t[s]]=n[s];var o=function(e){return"0x"+parseInt(e,10).toString(16)},l=e.__fontmetrics__.compress=function(e){var t,n,a,s,c=["{"];for(var u in e){if(t=e[u],isNaN(parseInt(u,10))?n="'"+u+"'":(u=parseInt(u,10),n=(n=o(u).slice(2)).slice(0,-1)+i[n.slice(-1)]),"number"==typeof t)t<0?(a=o(t).slice(3),s="-"):(a=o(t).slice(2),s=""),a=s+a.slice(0,-1)+i[a.slice(-1)];else{if("object"!==r(t))throw new Error("Don't know what to do with value type "+r(t)+".");a=l(t)}c.push(n+a)}return c.push("}"),c.join("")},c=e.__fontmetrics__.uncompress=function(e){if("string"!=typeof e)throw new Error("Invalid argument passed to uncompress.");for(var t,n,r,i,s={},o=1,l=s,c=[],u="",d="",h=e.length-1,f=1;f<h;f+=1)"'"==(i=e[f])?t?(r=t.join(""),t=void 0):t=[]:t?t.push(i):"{"==i?(c.push([l,r]),l={},r=void 0):"}"==i?((n=c.pop())[0][n[1]]=l,r=void 0,l=n[0]):"-"==i?o=-1:void 0===r?a.hasOwnProperty(i)?(u+=a[i],r=parseInt(u,16)*o,o=1,u=""):u+=i:a.hasOwnProperty(i)?(d+=a[i],l[r]=parseInt(d,16)*o,o=1,r=void 0,d=""):d+=i;return s},u={codePages:["WinAnsiEncoding"],WinAnsiEncoding:c("{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}")},d
vendor: 2,800 bytes, line 2
2={Unicode:{Courier:u,"Courier-Bold":u,"Courier-BoldOblique":u,"Courier-Oblique":u,Helvetica:u,"Helvetica-Bold":u,"Helvetica-BoldOblique":u,"Helvetica-Oblique":u,"Times-Roman":u,"Times-Bold":u,"Times-BoldItalic":u,"Times-Italic":u}},h={Unicode:{"Courier-Oblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-BoldItalic":c("{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}"),"Helvetica-Bold":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4y
vendor: 12,176 bytes, line 2
2dn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),Courier:c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-BoldOblique":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Bold":c("{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}"),Symbol:c("{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}"),Helvetica:c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}"),"Helvetica-BoldOblique":c("{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}"),ZapfDingbats:c("{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}"),"Courier-Bold":c("{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}"),"Times-Italic":c("{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}fv{17su5tu5qs}fw{17su5tu5qs}}}"),"Times-Roman":c("{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}"),"Helvetica-Oblique":c("{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}")}};e.events.push(["addFont",function(e){var t=e.font,
vendor: 5,445 bytes, line 2
2n=h.Unicode[t.postScriptName];n&&(t.metadata.Unicode={},t.metadata.Unicode.widths=n.widths,t.metadata.Unicode.kerning=n.kerning);var r=d.Unicode[t.postScriptName];r&&(t.metadata.Unicode.encoding=r,t.encoding=r.codePages[0])}])}(Ja.API),function(e){var t=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n};e.API.events.push(["addFont",function(n){var r=void 0,a=n.font,i=n.instance;if(!a.isStandardFont){if(void 0===i)throw new Error("Font does not exist in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");if("string"!=typeof(r=!1===i.existsFileInVFS(a.postScriptName)?i.loadFile(a.postScriptName):i.getFileFromVFS(a.postScriptName)))throw new Error("Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('"+a.postScriptName+"').");!function(n,r){r=/^\x00\x01\x00\x00/.test(r)?t(r):t(Sa(r)),n.metadata=e.API.TTFFont.open(r),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0]}(a,r)}}])}(Ja),Ja.API.addSvgAsImage=function(e,t,r,a,i,s,o,l){if(isNaN(t)||isNaN(r))throw wa.error("jsPDF.addSvgAsImage: Invalid coordinates",arguments),new Error("Invalid coordinates passed to jsPDF.addSvgAsImage");if(isNaN(a)||isNaN(i))throw wa.error("jsPDF.addSvgAsImage: Invalid measurements",arguments),new Error("Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage");var c=document.createElement("canvas");c.width=a,c.height=i;var u=c.getContext("2d");u.fillStyle="#fff",u.fillRect(0,0,c.width,c.height);var d={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},h=this;return(ya.canvg?Promise.resolve(ya.canvg):n.e(455).then(n.bind(n,8455))).catch(function(e){return Promise.reject(new Error("Could not load canvg: "+e))}).then(function(e){return e.default?e.default:e}).then(function(t){return t.fromString(u,e,d)},function(){return Promise.reject(new Error("Could not load canvg."))}).then(function(e){return e.render(d)}).then(function(){h.addImage(c.toDataURL("image/jpeg",1),t,r,a,i,o,l)})},Ja.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,"g"),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),"g"),n=this.pdfEscape16(this.internal.getNumberOfPages()+"",this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var a=0;a<this.internal.pages[r].length;a++)this.internal.pages[r][a]=this.internal.pages[r][a].replace(t,n);return this},Ja.API.viewerPreferences=function(e,t){var n;e=e||{},t=t||!1;var a,i,s,o={HideToolbar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:"UseNone",value:"UseNone",type:"name",explicitSet:!1,valueSet:["UseNone","UseOutlines","UseThumbs","UseOC"],pdfVersion:1.3},Direction:{defaultValue:"L2R",value:"L2R",type:"name",explicitSet:!1,valueSet:["L2R","R2L"],pdfVersion:1.3},ViewArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},ViewClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintArea:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintClip:{defaultValue:"CropBox",value:"CropBox",type:"name",explicitSet:!1,valueSet:["MediaBox","CropBox","TrimBox","BleedBox","ArtBox"],pdfVersion:1.4},PrintScaling:{defaultValue:"AppDefault",value:"AppDefault",type:"name",explicitSet:!1,valueSet:["AppDefault","None"],pdfVersion:1.6},Duplex:{defaultValue:"",value:"none",type:"name",explicitSet:!1,valueSet:["Simplex","DuplexFlipShortEdge","DuplexFlipLongEdge","none"],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:"boolean",explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:"",value:"",type:"array",explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:"integer",explicitSet:!1,valueSet:null,pdfVersion:1.7}},l=Object.keys(o),c=[],u=0,d=0,h=0;function f(e,t){var n,r=!1;for(n=0;n<e.length;n+=1)e[n]===t&&(r=!0);return r}if(void 0===this.internal.viewerpreferences&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,"reset"===e||!0===t){var p=l.length;for(h=0;h<p;h+=1)n[l[h]].value=n[l[h]].defaultValue,n[l[h]].explicitSet=!1}if("object"===r(e))for(i in e)if(s=e[i],f(l,i)&&void 0!==s){if("boolean"===n[i].type&&"boolean"==typeof s)n[i].value=s;else if("name"===n[i].type&&f(n[i].valueSet,s))n[i].value=s;else if("integer"===n[i].type&&Number.isInteger(s))n[i].value=s;else if("array"===n[i].type){for(u=0;
vendor: 39,646 bytes, line 2
2u<s.length;u+=1)if(a=!0,1===s[u].length&&"number"==typeof s[u][0])c.push(String(s[u]-1));else if(s[u].length>1){for(d=0;d<s[u].length;d+=1)"number"!=typeof s[u][d]&&(a=!1);!0===a&&c.push([s[u][0]-1,s[u][1]-1].join(" "))}n[i].value="["+c.join(" ")+"]"}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe("putCatalog",function(){var e,t=[];for(e in n)!0===n[e].explicitSet&&("name"===n[e].type?t.push("/"+e+" /"+n[e].value):t.push("/"+e+" "+n[e].value));0!==t.length&&this.internal.write("/ViewerPreferences\n<<\n"+t.join("\n")+"\n>>")}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},Ja.API.addMetadata=function(e,t){return void 0===this.internal.__metadata__&&(this.internal.__metadata__={metadata:e,namespaceUri:null!=t?t:"http://jspdf.default.namespaceuri/",rawXml:"boolean"==typeof t&&t},this.internal.events.subscribe("putCatalog",Ns),this.internal.events.subscribe("postPutResources",ks)),this},function(e){var t=e.API,n=t.pdfEscape16=function(e,t){for(var n,r=t.metadata.Unicode.widths,a=["","0","00","000","0000"],i=[""],s=0,o=e.length;s<o;++s){if(n=t.metadata.characterToGlyph(e.charCodeAt(s)),t.metadata.glyIdsUsed.push(n),t.metadata.toUnicode[n]=e.charCodeAt(s),-1==r.indexOf(n)&&(r.push(n),r.push([parseInt(t.metadata.widthOfGlyph(n),10)])),"0"==n)return i.join("");n=n.toString(16),i.push(a[4-n.length],n)}return i.join("")},r=function(e){var t,n,r,a,i,s,o;for(i="/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange",r=[],s=0,o=(n=Object.keys(e).sort(function(e,t){return e-t})).length;s<o;s++)t=n[s],r.length>=100&&(i+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar",r=[]),void 0!==e[t]&&null!==e[t]&&"function"==typeof e[t].toString&&(a=("0000"+e[t].toString(16)).slice(-4),t=("0000"+(+t).toString(16)).slice(-4),r.push("<"+t+"><"+a+">"));return r.length&&(i+="\n"+r.length+" beginbfchar\n"+r.join("\n")+"\nendbfchar\n"),i+"endcmap\nCMapName currentdict /CMap defineresource pop\nend\nend"};t.events.push(["putFont",function(t){!function(t){var n=t.font,a=t.out,i=t.newObject,s=t.putStream;if(n.metadata instanceof e.API.TTFFont&&"Identity-H"===n.encoding){for(var o=n.metadata.Unicode.widths,l=n.metadata.subset.encode(n.metadata.glyIdsUsed,1),c="",u=0;u<l.length;u++)c+=String.fromCharCode(l[u]);var d=i();s({data:c,addLength1:!0,objectId:d}),a("endobj");var h=i();s({data:r(n.metadata.toUnicode),addLength1:!0,objectId:h}),a("endobj");var f=i();a("<<"),a("/Type /FontDescriptor"),a("/FontName /"+Ga(n.fontName)),a("/FontFile2 "+d+" 0 R"),a("/FontBBox "+e.API.PDFObject.convert(n.metadata.bbox)),a("/Flags "+n.metadata.flags),a("/StemV "+n.metadata.stemV),a("/ItalicAngle "+n.metadata.italicAngle),a("/Ascent "+n.metadata.ascender),a("/Descent "+n.metadata.decender),a("/CapHeight "+n.metadata.capHeight),a(">>"),a("endobj");var p=i();a("<<"),a("/Type /Font"),a("/BaseFont /"+Ga(n.fontName)),a("/FontDescriptor "+f+" 0 R"),a("/W "+e.API.PDFObject.convert(o)),a("/CIDToGIDMap /Identity"),a("/DW 1000"),a("/Subtype /CIDFontType2"),a("/CIDSystemInfo"),a("<<"),a("/Supplement 0"),a("/Registry (Adobe)"),a("/Ordering ("+n.encoding+")"),a(">>"),a(">>"),a("endobj"),n.objectNumber=i(),a("<<"),a("/Type /Font"),a("/Subtype /Type0"),a("/ToUnicode "+h+" 0 R"),a("/BaseFont /"+Ga(n.fontName)),a("/Encoding /"+n.encoding),a("/DescendantFonts ["+p+" 0 R]"),a(">>"),a("endobj"),n.isAlreadyPutted=!0}}(t)}]),t.events.push(["putFont",function(t){!function(t){var n=t.font,a=t.out,i=t.newObject,s=t.putStream;if(n.metadata instanceof e.API.TTFFont&&"WinAnsiEncoding"===n.encoding){for(var o=n.metadata.rawData,l="",c=0;c<o.length;c++)l+=String.fromCharCode(o[c]);var u=i();s({data:l,addLength1:!0,objectId:u}),a("endobj");var d=i();s({data:r(n.metadata.toUnicode),addLength1:!0,objectId:d}),a("endobj");var h=i();a("<<"),a("/Descent "+n.metadata.decender),a("/CapHeight "+n.metadata.capHeight),a("/StemV "+n.metadata.stemV),a("/Type /FontDescriptor"),a("/FontFile2 "+u+" 0 R"),a("/Flags 96"),a("/FontBBox "+e.API.PDFObject.convert(n.metadata.bbox)),a("/FontName /"+Ga(n.fontName)),a("/ItalicAngle "+n.metadata.italicAngle),a("/Ascent "+n.metadata.ascender),a(">>"),a("endobj"),n.objectNumber=i();for(var f=0;f<n.metadata.hmtx.widths.length;f++)n.metadata.hmtx.widths[f]=parseInt(n.metadata.hmtx.widths[f]*(1e3/n.metadata.head.unitsPerEm));a("<</Subtype/TrueType/Type/Font/ToUnicode "+d+" 0 R/BaseFont/"+Ga(n.fontName)+"/FontDescriptor "+h+" 0 R/Encoding/"+n.encoding+" /FirstChar 29 /LastChar 255 /Widths "+e.API.PDFObject.convert(n.metadata.hmtx.widths)+">>"),a("endobj"),n.isAlreadyPutted=!0}}(t)}]);var a=function(e){var t,r=e.text||"",a=e.x,i=e.y,s=e.options||{},o=e.mutex||{},l=o.pdfEscape,c=o.activeFontKey,u=o.fonts,d=c,h="",f=0,p="",m=u[d].encoding;if("Identity-H"!==u[d].encoding)return{text:r,x:a,y:i,options:s,mutex:o};for(p=r,d=c,Array.isArray(r)&&(p=r[0]),f=0;f<p.length;f+=1)u[d].metadata.hasOwnProperty("cmap")&&(t=u[d].metadata.cmap.unicode.codeMap[p[f].charCodeAt(0)]),t||p[f].charCodeAt(0)<256&&u[d].metadata.hasOwnProperty("Unicode")?h+=p[f]:h+="";var g="";return parseInt(d.slice(1))<14||"WinAnsiEncoding"===m?g=l(h,d).split("").map(function(e){return e.charCodeAt(0).toString(16)}).join(""):"Identity-H"===m&&(g=n(h,u[d])),o.isHex=!0,{text:g,x:a,y:i,options:s,mutex:o}};t.events.push(["postProcessText",function(e){var t=e.text||"",n=[],r={text:t,x:e.x,y:e.y,options:e.options,mutex:e.mutex};if(Array.isArray(t)){var i=0;for(i=0;i<t.length;i+=1)Array.isArray(t[i])&&3===t[i].length?n.push([a(Object.assign({},r,{text:t[i][0]})).text,t[i][1],t[i][2]]):n.push(a(Object.assign({},r,{text:t[i]})).text);e.text=n}else e.text=a(Object.assign({},r,{text:t})).text}])}(Ja),function(e){var t=function(){return void 0===this.internal.vFS&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(e){return t.call(this),void 0!==this.internal.vFS[e]},e.addFileToVFS=function(e,n){return t.call(this),this.internal.vFS[e]=n,this},e.getFileFromVFS=function(e){return t.call(this),void 0!==this.internal.vFS[e]?this.internal.vFS[e]:null}}(Ja.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var n,r,a,i,s,o,l,c=t,u=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],h={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},f={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},p=["(",")","(","<",">","<","[","]","[","{","}","{","\xab","\xbb","\xab","\u2039","\u203a","\u2039","\u2045","\u2046","\u2045","\u207d","\u207e","\u207d","\u208d","\u208e","\u208d","\u2264","\u2265","\u2264","\u2329","\u232a","\u2329","\ufe59","\ufe5a","\ufe59","\ufe5b","\ufe5c","\ufe5b","\ufe5d","\ufe5e","\ufe5d","\ufe64","\ufe65","\ufe64"],m=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),g=!1,v=0;this.__bidiEngine__={};var b=function(e){var t=e.charCodeAt(),n=t>>8,r=f[n];return void 0!==r?c[256*r+(255&t)]:252===n||253===n?"AL":m.test(n)?"L":8===n?"R":"N"},y=function(e){for(var t,n=0;n<e.length;n++){if("L"===(t=b(e.charAt(n))))return!1;if("R"===t)return!0}return!1},x=function(e,t,s,o){var l,c,u,d,h=t[o];switch(h){case"L":case"R":case"LRE":case"RLE":case"LRO":case"RLO":case"PDF":g=!1;break;case"N":case"AN":break;case"EN":g&&(h="AN");break;case"AL":g=!0,h="R";break;case"WS":case"BN":h="N";break;case"CS":o<1||o+1>=t.length||"EN"!==(l=s[o-1])&&"AN"!==l||"EN"!==(c=t[o+1])&&"AN"!==c?h="N":g&&(c="AN"),h=c===l?c:"N";break;case"ES":h="EN"===(l=o>0?s[o-1]:"B")&&o+1<t.length&&"EN"===t[o+1]?"EN":"N";break;case"ET":if(o>0&&"EN"===s[o-1]){h="EN";break}if(g){h="N";break}for(u=o+1,d=t.length;u<d&&"ET"===t[u];)u++;h=u<d&&"EN"===t[u]?"EN":"N";break;case"NSM":if(a&&!i){for(d=t.length,u=o+1;u<d&&"NSM"===t[u];)u++;if(u<d){var f=e[o],p=f>=1425&&f<=2303||64286===f;if(l=t[u],p&&("R"===l||"AL"===l)){h="R";break}}}h=o<1||"B"===(l=t[o-1])?"N":s[o-1];break;case"B":g=!1,n=!0,h=v;break;case"S":r=!0,h="N"}return h},w=function(e,t,n){var r=e.split("");return n&&k(r,n,{hiLevel:v}),r.reverse(),t&&t.reverse(),r.join("")},k=function(e,t,a){var i,s,o,l,c,f=-1,p=e.length,m=0,y=[],w=v?d:u,k=[];for(g=!1,n=!1,r=!1,s=0;s<p;s++)k[s]=b(e[s]);for(o=0;o<p;o++){if(c=m,y[o]=x(e,k,y,o),i=240&(m=w[c][h[y[o]]]),m&=15,t[o]=l=w[m][5],i>0)if(16===i){for(s=f;s<o;s++)t[s]=1;f=-1}else f=-1;if(w[m][6])-1===f&&(f=o);else if(f>-1){for(s=f;s<o;s++)t[s]=l;f=-1}"B"===k[o]&&(t[o]=0),a.hiLevel|=l}r&&function(e,t,n){for(var r=0;r<n;r++)if("S"===e[r]){t[r]=v;for(var a=r-1;a>=0&&"WS"===e[a];a--)t[a]=v}}(k,t,p)},N=function(e,t,r,a,i){if(!(i.hiLevel<e)){if(1===e&&1===v&&!n)return t.reverse(),void(r&&r.reverse());for(var s,o,l,c,u=t.length,d=0;d<u;){if(a[d]>=e){for(l=d+1;l<u&&a[l]>=e;)l++;for(c=d,o=l-1;c<o;c++,o--)s=t[c],t[c]=t[o],t[o]=s,r&&(s=r[c],r[c]=r[o],r[o]=s);d=l}d++}}},A=function(e,t,n){var r=e.split(""),a={hiLevel:v};return n||(n=[]),k(r,n,a),function(e,t,n){if(0!==n.hiLevel&&l)for(var r,a=0;a<e.length;a++)1===t[a]&&(r=p.indexOf(e[a]))>=0&&(e[a]=p[r+1])}(r,n,a),N(2,r,t,n,a),N(1,r,t,n,a),r.join("")};return this.__bidiEngine__.doBidiReorder=function(e,t,n){if(function(e,t){if(t)for(var n=0;n<e.length;n++)t[n]=n;void 0===i&&(i=y(e)),void 0===o&&(o=y(e))}(e,t),a||!s||o)if(a&&s&&i^o)v=i?1:0,e=w(e,t,n);else if(!a&&s&&o)v=i?1:0,e=A(e,t,n),e=w(e,t);else if(!a||i||s||o){if(a&&!s&&i^o)e=w(e,t),i?(v=0,e=A(e,t,n)):(v=1,e=A(e,t,n),e=w(e,t));else if(a&&i&&!s&&o)v=1,e=A(e,t,n),e=w(e,t);else if(!a&&!s&&i^o){var r=l;i?(v=1,e=A(e,t,n),v=0,l=!1,e=A(e,t,n),l=r):(v=0,e=A(e,t,n),e=w(e,t),v=1,l=!1,e=A(e,t,n),l=r,e=w(e,t))}}else v=0,e=A(e,t,n);else v=i?1:0,e=A(e,t,n);return e},this.__bidiEngine__.setOptions=function(e){e&&(a=e.isInputVisual,s=e.isOutputVisual,i=e.isInputRtl,o=e.isOutputRtl,l=e.isSymmetricSwapping)},this.__bidiEngine__.setOptions(e),this.__bidiEngine__};var t=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","N","ET","ET","ET","ET","N","N","N","N","L","N","N","BN","N","N","ET","ET","EN","EN","N","L","N","N","N","EN","L","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","L","L","L","L","L","L","L","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","L","N","N","N","N","N","ET","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","NSM","R","NSM","NSM","R","NSM","NSM","R","NSM","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","N","N","N","N","N","R","R","R","R","R","N","N","N","N","N","N","N","N","N","N","N","AN","AN","AN","AN","AN","AN","N","N","AL","ET","ET","AL","CS","AL","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","N","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","N","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","R","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","R","R","N","N","N","N","R","N","N","N","N","N","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","WS","BN","BN","BN","L","R","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","B","LRE","RLE","PDF","LRO","RLO","CS","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","WS","BN","BN","BN","BN","BN","N","LRI","RLI","FSI","PDI","BN","BN","BN","BN","BN","BN","EN","L","N","N","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","L","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","ES","ES","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","N","N","N","N","N","R","NSM","R","R","R","R","R","R","R","R","R","R","ES","R","R","R","R","R","R","R","R","R","R","R","R","R","N","R","R","R","R","R","N","R","N","R","R","N","R","R","N","R","R","R","R","R","R","R","R","R","R","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","CS","N","CS","N","N","CS","N","N","N","N","N","N","N","N","N","ET","N","N","ES","ES","N","N","N","N","N","ET","ET","N","N","N","N","N","AL","AL","AL","AL","AL","N","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","N","N","BN","N","N","N","ET","ET","ET","N","N","N","N","N","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","N","N","N","N","N","N","N","N","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","N","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","L","L","L","N","N","L","L","L","N","N","N","ET","ET","N","N","N","ET","ET","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N","N"],n=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push(["postProcessText",function(e){var t=e.text;e.x,e.y;var r=e.options||{};e.mutex,r.lang;var a=[];if(r.isInputVisual="boolean"!=typeof r.isInputVisual||r.isInputVisual,n.setOptions(r),"[object Array]"===Object.prototype.toString.call(t)){var i=0;for(a=[],i=0;i<t.length;i+=1)"[object Array]"===Object.prototype.toString.call(t[i])?a.push([n.doBidiReorder(t[i][0]),t[i][1],t[i][2]]):a.push([n.doBidiReorder(t[i])]);e.text=a}else e.text=n.doBidiReorder(t);n.setOptions({isInputVisual:!0})}])}(Ja),Ja.API.TTFFont=function(){function e(e){var t;if(this.rawData=e,t=this.contents=new js(e),this.contents.pos=4,"ttcf"===t.readString(4))throw new Error("TTCF not supported.");t.pos=0,this.parse(),this.subset=new Hs(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new _s(this.contents),this.head=new Es(this),this.name=new Os(this),this.cmap=new Ps(this),this.toUnicode={},this.hhea=new Ts(this),this.maxp=new Ds(this),this.hmtx=new Is(this),this.post=new Fs(this),this.os2=new Rs(this),this.loca=new Vs(this),this.glyf=new Bs(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var e,t,n,r,a;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var t,n,r,a;for(a=[],t=0,n=(r=this.bbox).length;t<n;t++)e=r[t],a.push(Math.round(e*this.scaleFactor));return a}.call(this),this.stemV=0,this.post.exists?(n=255&(r=this.post.italic_angle),32768&(t=r>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+"."+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=1===(a=this.familyClass)||2===a||3===a||4===a||5===a||7===a,this.isScript=10===this.familyClass,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),0!==this.italicAngle&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw new Error("No unicode cmap for font")},e.prototype.characterToGlyph=function(e){var t;return(null!=(t=this.cmap.unicode)?t.codeMap[e]:void 0)||0},e.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},e.prototype.widthOfString=function(e,t,n){var r,a,i,s;for(i=0,a=0,s=(e=""+e).length;0<=s?a<s:a>s;a=0<=s?++a:--a)r=e.charCodeAt(a),i+=this.widthOfGlyph(this.characterToGlyph(r))+n*(1e3/t)||0;return i*(t/1e3)},e.prototype.lineHeight=function(e,t){var n;return null==t&&(t=!1),n=t?this.lineGap:0,(this.ascender+n-this.decender)/1e3*e},e}();var As,js=function(){function e(e){this.data=null!=e?e:[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(e){return this.data[this.pos++]=e},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},e.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},e.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},e.prototype.readString=function(e){var t,n;for(n=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join("")},e.prototype.writeString=function(e){var t,n,r;for(r=[],t=0,n=e.length;0<=n?t<n:t>n;t=0<=n?++t:--t)r.push(this.writeByte(e.charCodeAt(t)));return r},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(e){return this.writeInt16(e)},e.prototype.readLongLong=function(){var e,t,n,r,a,i,s,o;return e=this.readByte(),t=this.readByte(),n=this.readByte(),r=this.readByte(),a=this.readByte(),i=this.readByte(),s=this.readByte(),o=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^r)+16777216*(255^a)+65536*(255^i)+256*(255^s)+(255^o)+1):72057594037927940*e+281474976710656*t+1099511627776*n+4294967296*r+16777216*a+65536*i+256*s+o},e.prototype.writeLongLong=function(e){var t,n;return t=Math.floor(e/4294967296),n=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(e){return this.writeInt32(e)},e.prototype.read=function(e){var t,n;for(t=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)t.push(this.readByte());return t},e.prototype.write=function(e){var t,n,r,a;for(a=[],n=0,r=e.length;n<r;n++)t=e[n],a.push(this.writeByte(t));return a},e}(),_s=function(){var e;function t(e){var t,n,r;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},n=0,r=this.tableCount;0<=r?n<r:n>r;n=0<=r?++n:--n)t={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[t.tag]=t}return t.prototype.encode=function(t){var n,r,a,i,s,o,l,c,u,d,h,f,p;for(p in h=Object.keys(t).length,o=Math.log(2),u=16*Math.floor(Math.log(h)/o),i=Math.floor(u/o),c=16*h-u,(r=new js).writeInt(this.scalarType),r.writeShort(h),r.writeShort(u),r.writeShort(i),r.writeShort(c),a=16*h,l=r.pos+a,s=null,f=[],t)for(d=t[p],r.writeString(p),r.writeInt(e(d)),r.writeInt(l),r.writeInt(d.length),f=f.concat(d),"head"===p&&(s=l),l+=d.length;l%4;)f.push(0),l++;return r.write(f),n=2981146554-e(r.data),r.pos=s+8,r.writeUInt32(n),r.data},e=function(e){var t,n,r,a;for(e=zs.call(e);e.length%4;)e.push(0);for(r=new js(e),n=0,t=0,a=e.length;t<a;t=t+=4)n+=r.readUInt32();return 4294967295&n},t}(),Ss={}.hasOwnProperty,Cs=function(e,t){for(var n in t)Ss.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};As=function(){function e(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var Es=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,As),e.prototype.tag="head",e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},e.prototype.encode=function(e){var t;return(t=new js).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},e}(),Ls=function(){function e(e,t){var n,r,a,i,s,o,l,c,u,d,h,f,p,m,g,v,b;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),u=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=3===this.platformID&&1===this.encodingID&&4===this.format||0===this.platformID&&4===this.format,this.codeMap={},this.format){case 0:for(o=0;o<256;++o)this.codeMap[o]=e.readByte();break;case 4:for(h=e.readUInt16(),d=h/2,e.pos+=6,a=function(){var t,n;for(n=[],o=t=0;0<=d?t<d:t>d;o=0<=d?++t:--t)n.push(e.readUInt16());return n}(),e.pos+=2,p=function(){var t,n;for(n=[],o=t=0;0<=d?t<d:t>d;o=0<=d?++t:--t)n.push(e.readUInt16());return n}(),l=function(){var t,n;for(n=[],o=t=0;0<=d?t<d:t>d;o=0<=d?++t:--t)n.push(e.readUInt16());return n}(),c=function(){var t,n;for(n=[],o=t=0;0<=d?t<d:t>d;o=0<=d?++t:--t)n.push(e.readUInt16());return n}(),r=(this.length-e.pos+this.offset)/2,s=function(){var t,n;for(n=[],o=t=0;0<=r?t<r:t>r;o=0<=r?++t:--t)n.push(e.readUInt16());return n}(),o=g=0,b=a.length;g<b;o=++g)for(m=a[o],n=v=f=p[o];f<=m?v<=m:v>=m;n=f<=m?++v:--v)0===c[o]?i=n+l[o]:0!==(i=s[c[o]/2+(n-f)-(d-o)]||0)&&(i+=l[o]),this.codeMap[n]=65535&i}e.pos=u}return e.encode=function(e,t){var n,r,a,i,s,o,l,c,u,d,h,f,p,m,g,v,b,y,x,w,k,N,A,j,_,S,C,E,L,P,T,R,F,M,O,D,I,z,B,q,U,V,H,W,G,$;switch(E=new js,i=Object.keys(e).sort(function(e,t){return e-t}),t){case"macroman":for(p=0,m=function(){var e=[];for(f=0;f<256;++f)e.push(0);return e}(),v={0:0},a={},L=0,F=i.length;L<F;L++)null==v[H=e[r=i[L]]]&&(v[H]=++p),a[r]={old:e[r],new:v[e[r]]},m[r]=v[e[r]];return E.writeUInt16(1),E.writeUInt16(0),E.writeUInt32(12),E.writeUInt16(0),E.writeUInt16(262),E.writeUInt16(0),E.write(m),{charMap:a,subtable:E.data,maxGlyphID:p+1};case"unicode":for(S=[],u=[],b=0,v={},n={},g=l=null,P=0,M=i.length;P<M;P++)null==v[x=e[r=i[P]]]&&(v[x]=++b),n[r]={old:x,new:v[x]},s=v[x]-r,null!=g&&s===l||(g&&u.push(g),S.push(r),l=s),g=r;for(g&&u.push(g),u.push(65535),S.push(65535),j=2*(A=S.length),N=2*Math.pow(Math.log(A)/Math.LN2,2),d=Math.log(N/2)/Math.LN2,k=2*A-N,o=[],w=[],h=[],f=T=0,O=S.length;T<O;f=++T){if(_=S[f],c=u[f],65535===_){o.push(0),w.push(0);break}if(_-(C=n[_].new)>=32768)for(o.push(0),w.push(2*(h.length+A-f)),r=R=_;_<=c?R<=c:R>=c;r=_<=c?++R:--R)h.push(n[r].new);else o.push(C-_),w.push(0)}for(E.writeUInt16(3),E.writeUInt16(1),E.writeUInt32(12),E.writeUInt16(4),E.writeUInt16(16+8*A+2*h.length),E.writeUInt16(0),E.writeUInt16(j),E.writeUInt16(N),E.writeUInt16(d),E.writeUInt16(k),U=0,D=u.length;U<D;U++)r=u[U],E.writeUInt16(r);for(E.writeUInt16(0),V=0,I=S.length;V<I;V++)r=S[V],E.writeUInt16(r);for(W=0,z=o.length;W<z;W++)s=o[W],E.writeUInt16(s);for(G=0,B=w.length;G<B;G++)y=w[G],E.writeUInt16(y);for($=0,q=h.length;$<q;$++)p=h[$],E.writeUInt16(p);return{charMap:n,subtable:E.data,maxGlyphID:b+1}}},e}(),Ps=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,As),e.prototype.tag="cmap",e.prototype.parse=function(e){var t,n,r;for(e.pos=this.offset,this.version=e.readUInt16(),r=e.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=r?n<r:n>r;n=0<=r?++n:--n)t=new Ls(e,this.offset),this.tables.push(t),t.isUnicode&&null==this.unicode&&(this.unicode=t);return!0},e.encode=function(e,t){var n,r;return null==t&&(t="macroman"),n=Ls.encode(e,t),(r=new js).writeUInt16(0),r.writeUInt16(1),n.table=r.data.concat(n.subtable),n},e}(),Ts=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,As),e.prototype.tag="hhea",e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},e}(),Rs=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,As),e.prototype.tag="OS/2",e.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var t,n;for(n=[],t=0;t<10;++t)n.push(e.readByte());return n}(),this.charRange=function(){var t,n;for(n=[],t=0;t<4;++t)n.push(e.readInt());return n}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var t,n;for(n=[],t=0;t<2;t=++t)n.push(e.readInt());return n}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},e}(),Fs=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,As),e.prototype.tag="post",e.prototype.parse=function(e){var t,n,r;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var a;for(n=e.readUInt16(),this.glyphNameIndex=[],a=0;0<=n?a<n:a>n;a=0<=n?++a:--a)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],r=[];e.pos<this.offset+this.length;)t=e.readByte(),r.push(this.names.push(e.readString(t)));return r;case 151552:return n=e.readUInt16(),this.offsets=e.read(n);case 262144:return this.map=function(){var t,n,r;for(r=[],a=t=0,n=this.file.maxp.numGlyphs;0<=n?t<n:t>n;a=0<=n?++t:--t)r.push(e.readUInt32());return r}.call(this)}},e}(),Ms=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},Os=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,As),e.prototype.tag="name",e.prototype.parse=function(e){var t,n,r,a,i,s,o,l,c,u,d;for(e.pos=this.offset,e.readShort(),t=e.readShort(),s=e.readShort(),n=[],a=0;0<=t?a<t:a>t;a=0<=t?++a:--a)n.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+s+e.readShort()});for(o={},a=c=0,u=n.length;c<u;a=++c)r=n[a],e.pos=r.offset,l=e.readString(r.length),i=new Ms(l,r),null==o[d=r.nameID]&&(o[d]=[]),o[r.nameID].push(i);this.strings=o,this.copyright=o[0],this.fontFamily=o[1],this.fontSubfamily=o[2],this.uniqueSubfamily=o[3],this.fontName=o[4],this.version=o[5];try{this.postscriptName=o[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}catch(Sa){this.postscriptName=o[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,"")}return this.trademark=o[7],this.manufacturer=o[8],this.designer=o[9],this.description=o[10],this.vendorUrl=o[11],this.designerUrl=o[12],this.license=o[13],this.licenseUrl=o[14],this.preferredFamily=o[15],this.preferredSubfamily=o[17],this.compatibleFull=o[18],this.sampleText=o[19]},e}(),Ds=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,As),e.prototype.tag="maxp",e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},e}(),Is=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,As),e.prototype.tag="hmtx",e.prototype.parse=function(e){var t,n,r,a,i,s,o;for(e.pos=this.offset,this.metrics=[],t=0,s=this.file.hhea.numberOfMetrics;0<=s?t<s:t>s;t=0<=s?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var n,a;for(a=[],t=n=0;0<=r?n<r:n>r;t=0<=r?++n:--n)a.push(e.readInt16());return a}(),this.widths=function(){var e,t,n,r;for(r=[],e=0,t=(n=this.metrics).length;e<t;e++)a=n[e],r.push(a.advance);return r}.call(this),n=this.widths[this.widths.length-1],o=[],t=i=0;0<=r?i<r:i>r;t=0<=r?++i:--i)o.push(this.widths.push(n));return o},e.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},e}(),zs=[].slice,Bs=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,As),e.prototype.tag="glyf",e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(e){var t,n,r,a,i,s,o,l,c,u;return e in this.cache?this.cache[e]:(a=this.file.loca,t=this.file.contents,n=a.indexOf(e),0===(r=a.lengthOf(e))?this.cache[e]=null:(t.pos=this.offset+n,i=(s=new js(t.read(r))).readShort(),l=s.readShort(),u=s.readShort(),o=s.readShort(),c=s.readShort(),this.cache[e]=-1===i?new Us(s,l,u,o,c):new qs(s,i,l,u,o,c),this.cache[e]))},e.prototype.encode=function(e,t,n){var r,a,i,s,o;for(i=[],a=[],s=0,o=t.length;s<o;s++)r=e[t[s]],a.push(i.length),r&&(i=i.concat(r.encode(n)));return a.push(i.length),{table:i,offsets:a}},e}(),qs=function(){function e(e,t,n,r,a,i){this.raw=e,this.numberOfContours=t,this.xMin=n,this.yMin=r,this.xMax=a,this.yMax=i,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),Us=function(){function e(e,t,n,r,a){var i,s;for(this.raw=e,this.xMin=t,this.yMin=n,this.xMax=r,this.yMax=a,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],i=this.raw;s=i.readShort(),this.glyphOffsets.push(i.pos),this.glyphIDs.push(i.readUInt16()),32&s;)i.pos+=1&s?4:2,128&s?i.pos+=8:64&s?i.pos+=4:8&s&&(i.pos+=2)}return e.prototype.encode=function(){var e,t,n;for(t=new js(zs.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},e}(),Vs=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return Cs(e,As),e.prototype.tag="loca",e.prototype.parse=function(e){var t,n;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=0===t?function(){var t,r;for(r=[],n=0,t=this.length;n<t;n+=2)r.push(2*e.readUInt16());return r}.call(this):function(){var t,r;for(r=[],n=0,t=this.length;n<t;n+=4)r.push(e.readUInt32());return r}.call(this)},e.prototype.indexOf=function(e){return this.offsets[e]},e.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},e.prototype.encode=function(e,t){for(var n=new Uint32Array(this.offsets.length),r=0,a=0,i=0;i<n.length;++i)if(n[i]=r,a<t.length&&t[a]==i){++a,n[i]=r;var s=this.offsets[i],o=this.offsets[i+1]-s;o>0&&(r+=o)}for(var l=new Array(4*n.length),c=0;c<n.length;
2++c)l[4*c+3]=255&n[c],l[4*c+2]=(65280&n[c])>>8,l[4*c+1]=(16711680&n[c])>>16,l[4*c]=(4278190080&n[c])>>24;return l},e}(),Hs=function(){function e(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var e,t,n,r,a;for(t in r=this.font.cmap.tables[0].codeMap,e={},a=this.subset)n=a[t],e[t]=r[n];return e},e.prototype.glyphsFor=function(e){var t,n,r,a,i,s,o;for(r={},i=0,s=e.length;i<s;i++)r[a=e[i]]=this.font.glyf.glyphFor(a);for(a in t=[],r)(null!=(n=r[a])?n.compound:void 0)&&t.push.apply(t,n.glyphIDs);if(t.length>0)for(a in o=this.glyphsFor(t))n=o[a],r[a]=n;return r},e.prototype.encode=function(e,t){var n,r,a,i,s,o,l,c,u,d,h,f,p,m,g;for(r in n=Ps.encode(this.generateCmap(),"unicode"),i=this.glyphsFor(e),h={0:0},g=n.charMap)h[(o=g[r]).old]=o.new;for(f in d=n.maxGlyphID,i)f in h||(h[f]=d++);return c=function(e){var t,n;for(t in n={},e)n[e[t]]=t;return n}(h),u=Object.keys(c).sort(function(e,t){return e-t}),p=function(){var e,t,n;for(n=[],e=0,t=u.length;e<t;e++)s=u[e],n.push(c[s]);return n}(),a=this.font.glyf.encode(i,p,h),l=this.font.loca.encode(a.offsets,p),m={cmap:this.font.cmap.raw(),glyf:a.table,loca:l,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(m["OS/2"]=this.font.os2.raw()),this.font.directory.encode(m)},e}();Ja.API.PDFObject=function(){var e;function t(){}return e=function(e,t){return(Array(t+1).join("0")+e).slice(-t)},t.convert=function(n){var r,a,i,s;if(Array.isArray(n))return"["+function(){var e,a,i;for(i=[],e=0,a=n.length;e<a;e++)r=n[e],i.push(t.convert(r));return i}().join(" ")+"]";if("string"==typeof n)return"/"+n;if(null!=n?n.isString:void 0)return"("+n+")";if(n instanceof Date)return"(D:"+e(n.getUTCFullYear(),4)+e(n.getUTCMonth(),2)+e(n.getUTCDate(),2)+e(n.getUTCHours(),2)+e(n.getUTCMinutes(),2)+e(n.getUTCSeconds(),2)+"Z)";if("[object Object]"==={}.toString.call(n)){for(a in i=["<<"],n)s=n[a],i.push("/"+a+" "+t.convert(s));return i.push(">>"),i.join("\n")}return""+n},t}()},1669(e,t,n){n.d(t,{c:()=>h});const r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function a(e){return function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const i={date:a({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:a({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:a({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},s={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function o(e){return(t,n)=>{let r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){const t=e.defaultFormattingWidth||e.defaultWidth,a=null!==n&&void 0!==n&&n.width?String(n.width):t;r=e.formattingValues[a]||e.formattingValues[t]}else{const t=e.defaultWidth,a=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;r=e.values[a]||e.values[t]}return r[e.argumentCallback?e.argumentCallback(t):t]}}const l={ordinalNumber:(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:o({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:o({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:o({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:o({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
2ay","Saturday"]},defaultWidth:"wide"}),dayPeriod:o({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function c(e){return function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const r=n.width,a=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(a);if(!i)return null;const s=i[0],o=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(o)?function(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n;return}(o,e=>e.test(s)):function(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n;return}(o,e=>e.test(s));let c;c=e.valueCallback?e.valueCallback(l):l,c=n.valueCallback?n.valueCallback(c):c;return{value:c,rest:t.slice(s.length)}}}const u={ordinalNumber:(d={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.match(d.matchPattern);if(!n)return null;const r=n[0],a=e.match(d.parsePattern);if(!a)return null;let i=d.valueCallback?d.valueCallback(a[0]):a[0];return i=t.valueCallback?t.valueCallback(i):i,{value:i,rest:e.slice(r.length)}}),era:c({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:c({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:c({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:c({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:c({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})};var d;const h={code:"en-US",formatDistance:(e,t,n)=>{let a;const i=r[e];return a="string"===typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a},formatLong:i,formatRelative:(e,t,n,r)=>s[e],localize:l,match:u,options:{weekStartsOn:0,firstWeekContainsDate:1}}},1672(e,t,n){n.d(t,{A:()=>Y});var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},r.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n}Object.create;function i(e,t,n){if(n||2===arguments.length)for(var r,a=0,i=t.length;a<i;a++)!r&&a in t||(r||(r=Array.prototype.slice.call(t,0,a)),r[a]=t[a]);return e.concat(r||Array.prototype.slice.call(t))}Object.create;"function"===typeof SuppressedError&&SuppressedError;var s=n(5043),o="right-scroll-bar-position",l="width-before-scroll-bar";function c(e,t){return"function"===typeof e?e(t):e&&(e.current=t),e}var u="undefined"!==typeof window?s.useLayoutEffect:s.useEffect,d=new WeakMap;
vendor: 4,426 bytes, line 2
2function h(e,t){var n=function(e,t){var n=(0,s.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}(t||null,function(t){return e.forEach(function(e){return c(e,t)})});return u(function(){var t=d.get(n);if(t){var r=new Set(t),a=new Set(e),i=n.current;r.forEach(function(e){a.has(e)||c(e,null)}),a.forEach(function(e){r.has(e)||c(e,i)})}d.set(n,e)},[e]),n}function f(e){return e}function p(e,t){void 0===t&&(t=f);var n=[],r=!1,a={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var a=t(e,r);return n.push(a),function(){n=n.filter(function(e){return e!==a})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var a=n;n=[],a.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},s=function(){return Promise.resolve().then(i)};s(),n={push:function(e){t.push(e),s()},filter:function(e){return t=t.filter(e),n}}}};return a}var m=function(e){void 0===e&&(e={});var t=p(null);return t.options=r({async:!0,ssr:!1},e),t}(),g=function(){},v=s.forwardRef(function(e,t){var n=s.useRef(null),i=s.useState({onScrollCapture:g,onWheelCapture:g,onTouchMoveCapture:g}),o=i[0],l=i[1],c=e.forwardProps,u=e.children,d=e.className,f=e.removeScrollBar,p=e.enabled,v=e.shards,b=e.sideCar,y=e.noRelative,x=e.noIsolation,w=e.inert,k=e.allowPinchZoom,N=e.as,A=void 0===N?"div":N,j=e.gapMode,_=a(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=b,C=h([n,t]),E=r(r({},_),o);return s.createElement(s.Fragment,null,p&&s.createElement(S,{sideCar:m,removeScrollBar:f,shards:v,noRelative:y,noIsolation:x,inert:w,setCallbacks:l,allowPinchZoom:!!k,lockRef:n,gapMode:j}),c?s.cloneElement(s.Children.only(u),r(r({},E),{ref:C})):s.createElement(A,r({},E,{className:d,ref:C}),u))});v.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},v.classNames={fullWidth:l,zeroRight:o};var b,y=function(e){var t=e.sideCar,n=a(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var i=t.read();if(!i)throw new Error("Sidecar medium not found");return s.createElement(i,r({},n))};y.isSideCarExport=!0;function x(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=b||n.nc;return t&&e.setAttribute("nonce",t),e}var w=function(){var e=0,t=null;return{add:function(n){var r,a;0==e&&(t=x())&&(a=n,(r=t).styleSheet?r.styleSheet.cssText=a:r.appendChild(document.createTextNode(a)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},k=function(){var e=function(){var e=w();return function(t,n){s.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}}();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},N={left:0,top:0,right:0,gap:0},A=function(e){return parseInt(e||"",10)||0},j=function(e){if(void 0===e&&(e="margin"),"undefined"===typeof window)return N;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],a=t["padding"===e?"paddingRight":"marginRight"];return[A(n),A(r),A(a)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},_=k(),S="data-scroll-locked",C=function(e,t,n,r){var a=e.left,i=e.top,s=e.right,c=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(c,"px ").concat(r,";\n }\n body[").concat(S,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(a,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(s,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(c,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(c,"px ").concat(r,";
2")].filter(Boolean).join(""),"\n }\n \n .").concat(o," {\n right: ").concat(c,"px ").concat(r,";\n }\n \n .").concat(l," {\n margin-right: ").concat(c,"px ").concat(r,";\n }\n \n .").concat(o," .").concat(o," {\n right: 0 ").concat(r,";\n }\n \n .").concat(l," .").concat(l," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(S,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(c,"px;\n }\n")},E=function(){var e=parseInt(document.body.getAttribute(S)||"0",10);return isFinite(e)?e:0},L=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=void 0===r?"margin":r;s.useEffect(function(){return document.body.setAttribute(S,(E()+1).toString()),function(){var e=E()-1;e<=0?document.body.removeAttribute(S):document.body.setAttribute(S,e.toString())}},[]);var i=s.useMemo(function(){return j(a)},[a]);return s.createElement(_,{styles:C(i,!t,a,n?"":"!important")})},P=!1;if("undefined"!==typeof window)try{var T=Object.defineProperty({},"passive",{get:function(){return P=!0,!0}});window.addEventListener("test",T,T),window.removeEventListener("test",T,T)}catch(K){P=!1}var R=!!P&&{passive:!1},F=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},M=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!==typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),O(e,r)){var a=D(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},O=function(e,t){return"v"===e?function(e){return F(e,"overflowY")}(t):function(e){return F(e,"overflowX")}(t)},D=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},I=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},z=function(e){return[e.deltaX,e.deltaY]},B=function(e){return e&&"current"in e?e.current:e},q=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},U=0,V=[];function H(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const W=(G=function(e){var t=s.useRef([]),n=s.useRef([0,0]),r=s.useRef(),a=s.useState(U++)[0],o=s.useState(k)[0],l=s.useRef(e);s.useEffect(function(){l.current=e},[e]),s.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=i([e.lockRef.current],(e.shards||[]).map(B),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=s.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!l.current.allowPinchZoom;var a,i=I(e),s=n.current,o="deltaX"in e?e.deltaX:s[0]-i[0],c="deltaY"in e?e.deltaY:s[1]-i[1],u=e.target,d=Math.abs(o)>Math.abs(c)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var h=window.getSelection(),f=h&&h.anchorNode;if(f&&(f===u||f.contains(u)))return!1;var p=M(d,u);if(!p)return!0;if(p?a=d:(a="v"===d?"h":"v",p=M(d,u)),!p)return!1;if(!r.current&&"changedTouches"in e&&(o||c)&&(r.current=a),!a)return!0;var m=r.current||a;return function(e,t,n,r,a){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),s=i*r,o=n.target,l=t.contains(o),c=!1,u=s>0,d=0,h=0;do{if(!o)break;var f=D(e,o),p=f[0],m=f[1]-f[2]-i*p;(p||m)&&O(e,o)&&(d+=m,h+=p);var g=o.parentNode;o=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(u&&(a&&Math.abs(d)<1||!a&&s>d)||!u&&(a&&Math.abs(h)<1||!a&&-s>h))&&(c=!0),c}(m,t,e,"h"===m?o:c,!0)},[]),u=s.useCallback(function(e){var n=e;if(V.length&&V[V.length-1]===o){var r="deltaY"in n?z(n):I(n),a=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&function(e,t){return e[0]===t[0]&&e[1]===t[1]}(e.delta,r)})[0];if(a&&a.should)n.cancelable&&n.preventDefault();
2else if(!a){var i=(l.current.shards||[]).map(B).filter(Boolean).filter(function(e){return e.contains(n.target)});(i.length>0?c(n,i[0]):!l.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),d=s.useCallback(function(e,n,r,a){var i={name:e,delta:n,target:r,should:a,shadowParent:H(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),h=s.useCallback(function(e){n.current=I(e),r.current=void 0},[]),f=s.useCallback(function(t){d(t.type,z(t),t.target,c(t,e.lockRef.current))},[]),p=s.useCallback(function(t){d(t.type,I(t),t.target,c(t,e.lockRef.current))},[]);s.useEffect(function(){return V.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,R),document.addEventListener("touchmove",u,R),document.addEventListener("touchstart",h,R),function(){V=V.filter(function(e){return e!==o}),document.removeEventListener("wheel",u,R),document.removeEventListener("touchmove",u,R),document.removeEventListener("touchstart",h,R)}},[]);var m=e.removeScrollBar,g=e.inert;return s.createElement(s.Fragment,null,g?s.createElement(o,{styles:q(a)}):null,m?s.createElement(L,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},m.useMedium(G),y);var G,$=s.forwardRef(function(e,t){return s.createElement(v,r({},e,{ref:t,sideCar:W}))});$.classNames=v.classNames;const Y=$},1680(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("file-text",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]])},1827(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("cloud",[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]])},1844(e,t,n){n.d(t,{x:()=>a});var r=n(2440);function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];const i=r.w.bind(null,e||n.find(e=>"object"===typeof e));return n.map(i)}},1862(e,t,n){n.d(t,{A:()=>u,q:()=>c});var r=n(9379),a=n(3986),i=n(5043),s=n(579);const o=["children"],l=["scope","children"];function c(e,t){const n=i.createContext(t),r=e=>{const{children:t}=e,r=(0,a.A)(e,o),l=i.useMemo(()=>r,Object.values(r));return(0,s.jsx)(n.Provider,{value:l,children:t})};return r.displayName=e+"Provider",[r,function(r){const a=i.useContext(n);if(a)return a;if(void 0!==t)return t;throw new Error("`".concat(r,"` must be used within `").concat(e,"`"))}]}function u(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];const o=()=>{const t=n.map(e=>i.createContext(e));return function(n){const a=(null===n||void 0===n?void 0:n[e])||t;return i.useMemo(()=>({["__scope".concat(e)]:(0,r.A)((0,r.A)({},n),{},{[e]:a})}),[n,a])}};return o.scopeName=e,[function(t,r){const o=i.createContext(r),c=n.length;n=[...n,r];const u=t=>{var n;const{scope:r,children:u}=t,d=(0,a.A)(t,l),h=(null===r||void 0===r||null===(n=r[e])||void 0===n?void 0:n[c])||o,f=i.useMemo(()=>d,Object.values(d));return(0,s.jsx)(h.Provider,{value:f,children:u})};return u.displayName=t+"Provider",[u,function(n,a){var s;const l=(null===a||void 0===a||null===(s=a[e])||void 0===s?void 0:s[c])||o,u=i.useContext(l);if(u)return u;if(void 0!==r)return r;throw new Error("`".concat(n,"` must be used within `").concat(t,"`"))}]},d(o,...t)]}function d(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const a=t[0];if(1===t.length)return a;const s=()=>{const e=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const n=e.reduce((e,n)=>{let{useScope:a,scopeName:i}=n;const s=a(t)["__scope".concat(i)];return(0,r.A)((0,r.A)({},e),s)},{});return i.useMemo(()=>({["__scope".concat(a.scopeName)]:n}),[n])}};return s.scopeName=a.scopeName,s}},1884(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("user-plus",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]])},1990(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("package",[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]])},2024(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},2224(e,t,n){n.d(t,{tU:()=>ue,av:()=>fe,j7:()=>de,Xi:()=>he});var r=n(9379),a=n(3986),i=n(5043),s=n(858),o=n(1862),l=n(5094),c=n(2814),u=n(4490),d=n(7914),h=n(7490),f=n(3642),p=n(4204),m=n(579);const g=["__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopId","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus"],v=["__scopeRovingFocusGroup","focusable","active","tabStopId","children"];var b="rovingFocusGroup.onEntryFocus",y={bubbles:!1,cancelable:!0},x="RovingFocusGroup",[w,k,N]=(0,l.N)(x),[A,j]=(0,o.A)(x,[N]),[_,S]=A(x),C=i.forwardRef((e,t)=>
2(0,m.jsx)(w.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,m.jsx)(w.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,m.jsx)(E,(0,r.A)((0,r.A)({},e),{},{ref:t}))})}));C.displayName=x;var E=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:o,loop:l=!1,dir:u,currentTabStopId:v,defaultCurrentTabStopId:w,onCurrentTabStopIdChange:N,onEntryFocus:A,preventScrollOnEntryFocus:j=!1}=e,S=(0,a.A)(e,g),C=i.useRef(null),E=(0,c.s)(t,C),L=(0,p.jH)(u),[P,T]=(0,f.i)({prop:v,defaultProp:null!==w&&void 0!==w?w:null,onChange:N,caller:x}),[F,M]=i.useState(!1),O=(0,h.c)(A),D=k(n),I=i.useRef(!1),[z,B]=i.useState(0);return i.useEffect(()=>{const e=C.current;if(e)return e.addEventListener(b,O),()=>e.removeEventListener(b,O)},[O]),(0,m.jsx)(_,{scope:n,orientation:o,dir:L,loop:l,currentTabStopId:P,onItemFocus:i.useCallback(e=>T(e),[T]),onItemShiftTab:i.useCallback(()=>M(!0),[]),onFocusableItemAdd:i.useCallback(()=>B(e=>e+1),[]),onFocusableItemRemove:i.useCallback(()=>B(e=>e-1),[]),children:(0,m.jsx)(d.sG.div,(0,r.A)((0,r.A)({tabIndex:F||0===z?-1:0,"data-orientation":o},S),{},{ref:E,style:(0,r.A)({outline:"none"},e.style),onMouseDown:(0,s.mK)(e.onMouseDown,()=>{I.current=!0}),onFocus:(0,s.mK)(e.onFocus,e=>{const t=!I.current;if(e.target===e.currentTarget&&t&&!F){const t=new CustomEvent(b,y);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=D().filter(e=>e.focusable);R([e.find(e=>e.active),e.find(e=>e.id===P),...e].filter(Boolean).map(e=>e.ref.current),j)}}I.current=!1}),onBlur:(0,s.mK)(e.onBlur,()=>M(!1))}))})}),L="RovingFocusGroupItem",P=i.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:o=!0,active:l=!1,tabStopId:c,children:h}=e,f=(0,a.A)(e,v),p=(0,u.B)(),g=c||p,b=S(L,n),y=b.currentTabStopId===g,x=k(n),{onFocusableItemAdd:N,onFocusableItemRemove:A,currentTabStopId:j}=b;return i.useEffect(()=>{if(o)return N(),()=>A()},[o,N,A]),(0,m.jsx)(w.ItemSlot,{scope:n,id:g,focusable:o,active:l,children:(0,m.jsx)(d.sG.span,(0,r.A)((0,r.A)({tabIndex:y?0:-1,"data-orientation":b.orientation},f),{},{ref:t,onMouseDown:(0,s.mK)(e.onMouseDown,e=>{o?b.onItemFocus(g):e.preventDefault()}),onFocus:(0,s.mK)(e.onFocus,()=>b.onItemFocus(g)),onKeyDown:(0,s.mK)(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void b.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:T[r]}(e,b.orientation,b.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let a=x().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)a.reverse();else if("prev"===t||"next"===t){"prev"===t&&a.reverse();const i=a.indexOf(e.currentTarget);a=b.loop?(r=i+1,(n=a).map((e,t)=>n[(r+t)%n.length])):a.slice(i+1)}setTimeout(()=>R(a))}var n,r}),children:"function"===typeof h?h({isCurrentTabStop:y,hasTabStop:null!=j}):h}))})});P.displayName=L;var T={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function R(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var F=C,M=P,O=n(2894);const D=["__scopeTabs","value","onValueChange","defaultValue","orientation","dir","activationMode"],I=["__scopeTabs","loop"],z=["__scopeTabs","value","disabled"],B=["__scopeTabs","value","forceMount","children"];var q="Tabs",[U,V]=(0,o.A)(q,[j]),H=j(),[W,G]=U(q),$=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,onValueChange:s,defaultValue:o,orientation:l="horizontal",dir:c,activationMode:h="automatic"}=e,g=(0,a.A)(e,D),v=(0,p.jH)(c),[b,y]=(0,f.i)({prop:i,onChange:s,defaultProp:null!==o&&void 0!==o?o:"",caller:q});return(0,m.jsx)(W,{scope:n,baseId:(0,u.B)(),value:b,onValueChange:y,orientation:l,dir:v,activationMode:h,children:(0,m.jsx)(d.sG.div,(0,r.A)((0,r.A)({dir:v,"data-orientation":l},g),{},{ref:t}))})});$.displayName=q;var Y="TabsList",K=i.forwardRef((e,t)=>
2{const{__scopeTabs:n,loop:i=!0}=e,s=(0,a.A)(e,I),o=G(Y,n),l=H(n);return(0,m.jsx)(F,(0,r.A)((0,r.A)({asChild:!0},l),{},{orientation:o.orientation,dir:o.dir,loop:i,children:(0,m.jsx)(d.sG.div,(0,r.A)((0,r.A)({role:"tablist","aria-orientation":o.orientation},s),{},{ref:t}))}))});K.displayName=Y;var X="TabsTrigger",Z=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:i,disabled:o=!1}=e,l=(0,a.A)(e,z),c=G(X,n),u=H(n),h=ee(c.baseId,i),f=te(c.baseId,i),p=i===c.value;return(0,m.jsx)(M,(0,r.A)((0,r.A)({asChild:!0},u),{},{focusable:!o,active:p,children:(0,m.jsx)(d.sG.button,(0,r.A)((0,r.A)({type:"button",role:"tab","aria-selected":p,"aria-controls":f,"data-state":p?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:h},l),{},{ref:t,onMouseDown:(0,s.mK)(e.onMouseDown,e=>{o||0!==e.button||!1!==e.ctrlKey?e.preventDefault():c.onValueChange(i)}),onKeyDown:(0,s.mK)(e.onKeyDown,e=>{[" ","Enter"].includes(e.key)&&c.onValueChange(i)}),onFocus:(0,s.mK)(e.onFocus,()=>{const e="manual"!==c.activationMode;p||o||!e||c.onValueChange(i)})}))}))});Z.displayName=X;var J="TabsContent",Q=i.forwardRef((e,t)=>{const{__scopeTabs:n,value:s,forceMount:o,children:l}=e,c=(0,a.A)(e,B),u=G(J,n),h=ee(u.baseId,s),f=te(u.baseId,s),p=s===u.value,g=i.useRef(p);return i.useEffect(()=>{const e=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,m.jsx)(O.C,{present:o||p,children:n=>{let{present:a}=n;return(0,m.jsx)(d.sG.div,(0,r.A)((0,r.A)({"data-state":p?"active":"inactive","data-orientation":u.orientation,role:"tabpanel","aria-labelledby":h,hidden:!a,id:f,tabIndex:0},c),{},{ref:t,style:(0,r.A)((0,r.A)({},e.style),{},{animationDuration:g.current?"0s":void 0}),children:a&&l}))}})});function ee(e,t){return"".concat(e,"-trigger-").concat(t)}function te(e,t){return"".concat(e,"-content-").concat(t)}Q.displayName=J;var ne=$,re=K,ae=Z,ie=Q,se=n(9766);const oe=["className"],le=["className"],ce=["className"],ue=ne,de=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,oe);return(0,m.jsx)(re,(0,r.A)({ref:t,className:(0,se.cn)("inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground",n)},i))});de.displayName=re.displayName;const he=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,le);return(0,m.jsx)(ae,(0,r.A)({ref:t,className:(0,se.cn)("inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow",n)},i))});he.displayName=ae.displayName;const fe=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,ce);return(0,m.jsx)(ie,(0,r.A)({ref:t,className:(0,se.cn)("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",n)},i))});fe.displayName=ie.displayName},2264(e,t,n){n.d(t,{p:()=>c});var r=n(9379),a=n(3986),i=n(5043),s=n(9766),o=n(579);const l=["className","type"],c=i.forwardRef((e,t)=>{let{className:n,type:i}=e,c=(0,a.A)(e,l);return(0,o.jsx)("input",(0,r.A)({type:i,className:(0,s.cn)("flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:t},c))});c.displayName="Input"},2313(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},2316(e,t,n){n.d(t,{a:()=>a});var r=n(2440);function a(e,t){return(0,r.w)(t||e,e)}},2440(e,t,n){n.d(t,{w:()=>a});var r=n(4524);function a(e,t){return"function"===typeof e?e(t):e&&"object"===typeof e&&r._P in e?e[r._P](t):e instanceof Date?new e.constructor(t):new Date(t)}},2489(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("shield",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",ke
2y:"oel41y"}]])},2799(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function a(e,t,r){var a=null;if(void 0!==r&&(a=""+r),void 0!==t.key&&(a=""+t.key),"key"in t)for(var i in r={},t)"key"!==i&&(r[i]=t[i]);else r=t;return t=r.ref,{$$typeof:n,type:e,key:a,ref:void 0!==t?t:null,props:r}}t.Fragment=r,t.jsx=a,t.jsxs=a},2814(e,t,n){n.d(t,{s:()=>s,t:()=>i});var r=n(5043);function a(e,t){if("function"===typeof e)return e(t);null!==e&&void 0!==e&&(e.current=t)}function i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{let n=!1;const r=t.map(t=>{const r=a(t,e);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let e=0;e<r.length;e++){const n=r[e];"function"==typeof n?n():a(t[e],null)}}}}function s(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.useCallback(i(...t),t)}},2894(e,t,n){n.d(t,{C:()=>s});var r=n(5043),a=n(2814),i=n(503);var s=e=>{const{present:t,children:n}=e,s=function(e){const[t,n]=r.useState(),a=r.useRef(null),s=r.useRef(e),l=r.useRef("none"),c=e?"mounted":"unmounted",[u,d]=function(e,t){return r.useReducer((e,n)=>{const r=t[e][n];return null!==r&&void 0!==r?r:e},e)}(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return r.useEffect(()=>{const e=o(a.current);l.current="mounted"===u?e:"none"},[u]),(0,i.N)(()=>{const t=a.current,n=s.current;if(n!==e){const r=l.current,a=o(t);if(e)d("MOUNT");else if("none"===a||"none"===(null===t||void 0===t?void 0:t.display))d("UNMOUNT");else{d(n&&r!==a?"ANIMATION_OUT":"UNMOUNT")}s.current=e}},[e,d]),(0,i.N)(()=>{if(t){var e;let n;const r=null!==(e=t.ownerDocument.defaultView)&&void 0!==e?e:window,i=e=>{const i=o(a.current).includes(CSS.escape(e.animationName));if(e.target===t&&i&&(d("ANIMATION_END"),!s.current)){const e=t.style.animationFillMode;t.style.animationFillMode="forwards",n=r.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=e)})}},c=e=>{e.target===t&&(l.current=o(a.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{r.clearTimeout(n),t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}d("ANIMATION_END")},[t,d]),{isPresent:["mounted","unmountSuspended"].includes(u),ref:r.useCallback(e=>{a.current=e?getComputedStyle(e):null,n(e)},[])}}(t),l="function"===typeof n?n({present:s.isPresent}):r.Children.only(n),c=(0,a.s)(s.ref,function(e){var t,n;let r=null===(t=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===t?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null===(n=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===n?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(l));return"function"===typeof n||s.isPresent?r.cloneElement(l,{ref:c}):null};function o(e){return(null===e||void 0===e?void 0:e.animationName)||"none"}s.displayName="Presence"},3124(e,t,n){n.d(t,{X:()=>i});var r=n(5043),a=n(503);function i(e){const[t,n]=r.useState(void 0);return(0,a.N)(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let a,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,i=t.blockSize}else a=e.offsetWidth,i=e.offsetHeight;n({width:a,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}},3168(e,t,n){n.d(t,{Z:()=>a});var r=n(5043);function a(e){const t=r.useRef({value:e,previous:e});return r.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}},3321(e,t,n){n.d(t,{Z:()=>d});var r=n(9379),a=n(3986),i=n(5043),s=n(7950),o=n(7914),l=n(503),c=n(579);const u=["container"];var d=i.forwardRef((e,t)=>{var n;const{container:d}=e,h=(0,a.A)(e,u),[f,p]=i.useState(!1);(0,l.N)(()=>p(!0),[]);const m=d||f&&(null===globalThis||void 0===globalThis||null===(n=globalThis.document)||void 0===n?void 0:n.body);return m?s.createPortal((0,c.jsx)(o.sG.div,(0,r.A)((0,r.A)({},h),{},{ref:t})),m):null});d.displayName="Portal"}
2,3340(e,t,n){n.d(t,{A0:()=>v,BF:()=>b,Hj:()=>y,XI:()=>g,nA:()=>w,nd:()=>x});var r=n(9379),a=n(3986),i=n(5043),s=n(9766),o=n(579);const l=["className"],c=["className"],u=["className"],d=["className"],h=["className"],f=["className"],p=["className"],m=["className"],g=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,l);return(0,o.jsx)("div",{className:"relative w-full overflow-auto",children:(0,o.jsx)("table",(0,r.A)({ref:t,className:(0,s.cn)("w-full caption-bottom text-sm",n)},i))})});g.displayName="Table";const v=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,c);return(0,o.jsx)("thead",(0,r.A)({ref:t,className:(0,s.cn)("[&_tr]:border-b",n)},i))});v.displayName="TableHeader";const b=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,u);return(0,o.jsx)("tbody",(0,r.A)({ref:t,className:(0,s.cn)("[&_tr:last-child]:border-0",n)},i))});b.displayName="TableBody";i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,d);return(0,o.jsx)("tfoot",(0,r.A)({ref:t,className:(0,s.cn)("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",n)},i))}).displayName="TableFooter";const y=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,h);return(0,o.jsx)("tr",(0,r.A)({ref:t,className:(0,s.cn)("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",n)},i))});y.displayName="TableRow";const x=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,f);return(0,o.jsx)("th",(0,r.A)({ref:t,className:(0,s.cn)("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n)},i))});x.displayName="TableHead";const w=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,p);return(0,o.jsx)("td",(0,r.A)({ref:t,className:(0,s.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",n)},i))});w.displayName="TableCell";i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,m);return(0,o.jsx)("caption",(0,r.A)({ref:t,className:(0,s.cn)("mt-4 text-sm text-muted-foreground",n)},i))}).displayName="TableCaption"},3390(e,t,n){n.d(t,{$:()=>h});var r=n(9379),a=n(3986),i=n(5043),s=n(6851),o=n(917),l=n(9766),c=n(579);const u=["className","variant","size","asChild"],d=(0,o.F)("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground shadow hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90",outline:"border border-input shadow-sm hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),h=i.forwardRef((e,t)=>{let{className:n,variant:i,size:o,asChild:h=!1}=e,f=(0,a.A)(e,u);const p=h?s.DX:"button";return(0,c.jsx)(p,(0,r.A)({className:(0,l.cn)(d({variant:i,size:o,className:n})),ref:t},f))});h.displayName="Button"},3416(e,t,n){n.d(t,{T:()=>c});var r=n(9379),a=n(3986),i=n(5043),s=n(9766),o=n(579);const l=["className"],c=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,l);return(0,o.jsx)("textarea",(0,r.A)({className:(0,s.cn)("flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:t},i))});c.displayName="Textarea"},3642(e,t,n){var r;n.d(t,{i:()=>o});var a=n(5043),i=n(503),s=(r||(r=n.t(a,2)))[" useInsertionEffect ".trim().toString()]||i.N;function o(e){let{prop:t,defaultProp:n,onChange:r=()=>{},caller:i}=e;const[o,l,c]=function(e){let{defaultProp:t,onChange:n}=e;const[r,i]=a.useState(t),o=a.useRef(r),l=a.useRef(n);return s(()=>{l.current=n},[n]),a.useEffect(()=>{var e;o.current!==r&&(null===(e=l.current)||void 0===e||e.call(l,r),o.current=r)},[r,o]),[r,i,l]}({defaultProp:n,onChange:r}),u=void 0!==t,d=u?t:o;{const e=a.useRef(void 0!==t);a.useEffect(()=>{const t=e.current;if(t!==u){const e=t?"controlled":"uncontrolled",n=u?"controlled":"uncontrolled";console.warn("".concat(i," is changing from ").concat(e," to ").concat(n,". Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component."))}e.current=u},[u,i])}const h=a.useCallback(e=>{if(u){const r=function(e){return"function"===typeof e}(e)?e(t):e;var n;if(r!==t)null===(n=c.current)||void 0===n||n.call(c,r)}else l(e)},[u,t,l,c]);return[d,h]}Symbol("RADIX:SYNC_STATE")},3986(e,t,n){function r(e,t){if(null==e)return{};var n,r,a=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n.d(t,{A:()=>r})},4204(e,t,n){n.d(t,{jH:()=>i});var r=n(5043),a=(n(579),r.createContext(void 0));function i(e){const t=r.useContext(a);return e||t||"ltr"}},4288(e,t){var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,v={};function b(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||m}function y(){}function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||m}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=b.prototype;var w=x.prototype=new y;w.constructor=x,g(w,b.prototype),w.isPureReactComponent=!0;var k=Array.isArray;function N(){}var A={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function _(e,t,r){var a=r.ref;return{$$typeof:n,type:e,key:t,ref:void 0!==a?a:null,props:r}}function S(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var C=/\/+/g;function E(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(e){return t[e]})}(""+e.key):t.toString(36)}function L(e,t,a,i,s){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l,c,u=!1;if(null===e)u=!0;else switch(o){case"bigint":case"string":case"number":u=!0;break;case"object":switch(e.$$typeof){case n:case r:u=!0;break;case h:return L((u=e._init)(e._payload),t,a,i,s)}}if(u)return s=s(e),u=""===i?"."+E(e,0):i,k(s)?(a="",null!=u&&(a=u.replace(C,"$&/")+"/"),L(s,t,a,"",function(e){return e})):null!=s&&(S(s)&&(l=s,c=a+(null==s.key||e&&e.key===s.key?"":(""+s.key).replace(C,"$&/")+"/")+u,s=_(l.type,c,l.props)),t.push(s)),1;u=0;var d,f=""===i?".":i+":";if(k(e))for(var m=0;m<e.length;m++)u+=L(i=e[m],t,a,o=f+E(i,m),s);else if("function"===typeof(m=null===(d=e)||"object"!==typeof d?null:"function"===typeof(d=p&&d[p]||d["@@iterator"])?d:null))for(e=m.call(e),m=0;!(i=e.next()).done;)u+=L(i=i.value,t,a,o=f+E(i,m++),s);else if("object"===o){if("function"===typeof e.then)return L(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"===typeof e.status?e.then(N,N):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,a,i,s);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return u}function P(e,t,n){if(null==e)return e;var r=[],a=0;return L(e,r,"","",function(e){return t.call(n,e,a++)}),r}function T(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var R="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},F={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!S(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};t.Activity=f,t.Children=F,t.Component=b,t.Fragment=a,t.Profiler=s,t.PureComponent=x,t.StrictMode=i,t.Suspense=u,t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,t.__COMPILER_RUNTIME={__proto__:null,c:function(e){return A.H.useMemoCache(e)}}
2,t.cache=function(e){return function(){return e.apply(null,arguments)}},t.cacheSignal=function(){return null},t.cloneElement=function(e,t,n){if(null===e||void 0===e)throw Error("The argument must be a React element, but you passed "+e+".");var r=g({},e.props),a=e.key;if(null!=t)for(i in void 0!==t.key&&(a=""+t.key),t)!j.call(t,i)||"key"===i||"__self"===i||"__source"===i||"ref"===i&&void 0===t.ref||(r[i]=t[i]);var i=arguments.length-2;if(1===i)r.children=n;else if(1<i){for(var s=Array(i),o=0;o<i;o++)s[o]=arguments[o+2];r.children=s}return _(e.type,a,r)},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:o,_context:e},e},t.createElement=function(e,t,n){var r,a={},i=null;if(null!=t)for(r in void 0!==t.key&&(i=""+t.key),t)j.call(t,r)&&"key"!==r&&"__self"!==r&&"__source"!==r&&(a[r]=t[r]);var s=arguments.length-2;if(1===s)a.children=n;else if(1<s){for(var o=Array(s),l=0;l<s;l++)o[l]=arguments[l+2];a.children=o}if(e&&e.defaultProps)for(r in s=e.defaultProps)void 0===a[r]&&(a[r]=s[r]);return _(e,i,a)},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=S,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:T}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=A.T,n={};A.T=n;try{var r=e(),a=A.S;null!==a&&a(n,r),"object"===typeof r&&null!==r&&"function"===typeof r.then&&r.then(N,R)}catch(i){R(i)}finally{null!==t&&null!==n.types&&(t.types=n.types),A.T=t}},t.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},t.use=function(e){return A.H.use(e)},t.useActionState=function(e,t,n){return A.H.useActionState(e,t,n)},t.useCallback=function(e,t){return A.H.useCallback(e,t)},t.useContext=function(e){return A.H.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e,t){return A.H.useDeferredValue(e,t)},t.useEffect=function(e,t){return A.H.useEffect(e,t)},t.useEffectEvent=function(e){return A.H.useEffectEvent(e)},t.useId=function(){return A.H.useId()},t.useImperativeHandle=function(e,t,n){return A.H.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return A.H.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return A.H.useLayoutEffect(e,t)},t.useMemo=function(e,t){return A.H.useMemo(e,t)},t.useOptimistic=function(e,t){return A.H.useOptimistic(e,t)},t.useReducer=function(e,t,n){return A.H.useReducer(e,t,n)},t.useRef=function(e){return A.H.useRef(e)},t.useState=function(e){return A.H.useState(e)},t.useSyncExternalStore=function(e,t,n){return A.H.useSyncExternalStore(e,t,n)},t.useTransition=function(){return A.H.useTransition()},t.version="19.2.3"},4391(e,t,n){!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(7004)},4399(e,t,n){n.d(t,{m:()=>x});var r=n(2440);function a(e){return(0,r.w)(e,Date.now())}var i=n(1669),s=n(849),o=n(9219),l=n(1844),c=n(2316);function u(e,t){const n=+(0,c.a)(e)-+(0,c.a)(t);return n<0?-1:n>0?1:n}var d=n(4524);function h(e,t,n){const[r,a]=(0,l.x)(null===n||void 0===n?void 0:n.in,e,t);return 12*(r.getFullYear()-a.getFullYear())+(r.getMonth()-a.getMonth())}function f(e,t){const n=(0,c.a)(e,null===t||void 0===t?void 0:t.in);return n.setHours(23,59,59,999),n}function p(e,t){const n=(0,c.a)(e,null===t||void 0===t?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function m(e,t){const n=(0,c.a)(e,null===t||void 0===t?void 0:t.in);return+f(n,t)===+p(n,t)}function g(e,t,n){const[r,a,i]=(0,l.x)(null===n||void 0===n?void 0:n.in,e,e,t),s=u(a,i),o=Math.abs(h(a,i));if(o<1)return 0;1===a.getMonth()&&a.getDate()>27&&a.setDate(30),a.setMonth(a.getMonth()-s*o);let c=u(a,i)===-s;m(r)&&1===o&&1===u(r,i)&&(c=!1);const d=s*(o-+c);return 0===d?0:d}function v(e,t){return+(0,c.a)(e)-+(0,c.a)(t)}function b(e,t,n){const r=v(e,t)/1e3;return(a=null===n||void 0===n?void 0:n.roundingMethod,e=>{const t=(a?Math[a]:Math.trunc)(e);return 0===t?0:t})(r);var a}function y(e,t,n){var r,a;const c=(0,s.q)(),h=null!==(r=null!==(a=null===n||void 0===n?void 0:n.locale)&&void 0!==a?a:c.locale)&&void 0!==r?r:i.c,f=u(e,t);if(isNaN(f))throw new RangeError("Invalid time value");const p=Object.assign({},n,{addSuffix:null===n||void 0===n?void 0:n.addSuffix,comparison:f}),[m,v]=(0,l.x)(null===n||void 0===n?void 0:n.in,...f>0?[t,e]:[e,t]),y=b(v,m),x=((0,o.G)(v)-(0,o.G)(m))/1e3,w=Math.round((y-x)/60);let k;if(w<2)return null!==n&&void 0!==n&&n.includeSeconds?y<5?h.formatDistance("lessThanXSeconds",5,p):y<10?h.formatDistance("lessThanXSeconds",10,p):y<20?h.formatDistance("lessThanXSeconds",20,p):y<40?h.formatDistance("halfAMinute",0,p):y<60?h.formatDistance("lessThanXMinutes",1,p):h.formatDistance("xMinutes",1,p):0===w?h.formatDistance("lessThanXMinutes",1,p):h.formatDistance("xMinutes",w,p);if(w<45)return h.formatDistance("xMinutes",w,p);if(w<90)return h.formatDistance("aboutXHours",1,p);if(w<d.F6){const e=Math.round(w/60);return h.formatDistance("aboutXHours",e,p)}if(w<2520)return h.formatDistance("xDays",1,p);if(w<d.Nw){const e=Math.round(w/d.F6);return h.formatDistance("xDays",e,p)}if(w<2*d.Nw)return k=Math.round(w/d.Nw),h.formatDistance("aboutXMonths",k,p);if(k=g(v,m),k<12){const e=Math.round(w/d.Nw);return h.formatDistance("xMonths",e,p)}{const e=k%12,t=Math.trunc(k/12);return e<3?h.formatDistance("aboutXYears",t,p):e<9?h.formatDistance("overXYears",t,p):h.formatDistance("almostXYears",t+1,p)}}function x(e,t){return y(e,a(e),t)}},4459(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]])},4490(e,t,n){var r;n.d(t,{B:()=>l});var a=n(5043),i=n(503),s=(r||(r=n.t(a,2)))[" useId ".trim().toString()]||(()=>{}),o=0;function l(e){const[t,n]=a.useState(s());return(0,i.N)(()=>{e||n(e=>null!==e&&void 0!==e?e:String(o++))},[e]),e||(t?"radix-".concat(t):"")}},4524(e,t,n){n.d(t,{F6:()=>s,Nw:()=>i,_P:()=>o,my:()=>r,w4:()=>a});Math.pow(10,8);const r=6048e5,a=864e5,i=43200,s=1440,o=Symbol.for("constructDateFrom")},4537(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l
2-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]])},4651(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("eye-off",[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]])},4669(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("message-square",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]])},4705(e,t,n){function r(e){return r="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},r(e)}function a(e){var t=function(e,t){if("object"!=r(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var a=n.call(e,t||"default");if("object"!=r(a))return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==r(t)?t:t+""}function i(e,t,n){return(t=a(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{A:()=>i})},4919(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("trending-up",[["polyline",{points:"22 7 13.5 15.5 8.5 10.5 2 17",key:"126l90"}],["polyline",{points:"16 7 22 7 22 13",key:"kwv8wd"}]])},5043(e,t,n){e.exports=n(4288)},5087(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},5088(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]])},5094(e,t,n){function r(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function a(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function i(e,t){return e.get(a(e,t))}function s(e,t,n){return e.set(a(e,t),n),n}n.d(t,{N:()=>w});var o=n(9379),l=n(3986),c=n(5043),u=n(1862),d=n(2814),h=n(579);const f=["children"],p=["children"];function m(e){const t=g(e),n=c.forwardRef((e,n)=>{const{children:r}=e,a=(0,l.A)(e,f),i=c.Children.toArray(r),s=i.find(y);if(s){const e=s.props.children,r=i.map(t=>t===s?c.Children.count(e)>1?c.Children.only(null):c.isValidElement(e)?e.props.children:null:t);return(0,h.jsx)(t,(0,o.A)((0,o.A)({},a),{},{ref:n,children:c.isValidElement(e)?c.cloneElement(e,void 0,r):null}))}return(0,h.jsx)(t,(0,o.A)((0,o.A)({},a),{},{ref:n,children:r}))});return n.displayName="".concat(e,".Slot"),n}function g(e){const t=c.forwardRef((e,t)=>{const{children:n}=e,r=(0,l.A)(e,p);if(c.isValidElement(n)){const e=function(e){var t,n;let r=null===(t=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===t?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null===(n=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===n?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n=(0,o.A)({},t);for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=function(){const e=i(...arguments);return a(...arguments),e}:a&&(n[r]=a):"style"===r?n[r]=(0,o.A)((0,o.A)({},a),i):"className"===r&&(n[r]=[a,i].filter(Boolean).join(" "))}return(0,o.A)((0,o.A)({},e),n)}(r,n.props);return n.type!==c.Fragment&&(a.ref=t?(0,d.t)(t,e):e),c.cloneElement(n,a)}return c.Children.count(n)>1?c.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}var v=Symbol("radix.slottable");var b;function y(e){return c.isValidElement(e)&&"function"===typeof e.type&&"__radixId"in e.type&&e.type.__radixId===v}const x=["scope","children"];function w(e){const t=e+"CollectionProvider",[n,r]=(0,u.A)(t),[a,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:t,children:n}=e,r=c.useRef(null),i=c.useRef(new Map).current;return(0,h.jsx)(a,{scope:t,itemMap:i,collectionRef:r,children:n})};s.displayName=t;const f=e+"CollectionSlot",p=m(f),g=c.forwardRef((e,t)=>
2{const{scope:n,children:r}=e,a=i(f,n),s=(0,d.s)(t,a.collectionRef);return(0,h.jsx)(p,{ref:s,children:r})});g.displayName=f;const v=e+"CollectionItemSlot",b="data-radix-collection-item",y=m(v),w=c.forwardRef((e,t)=>{const{scope:n,children:r}=e,a=(0,l.A)(e,x),s=c.useRef(null),u=(0,d.s)(t,s),f=i(v,n);return c.useEffect(()=>(f.itemMap.set(s,(0,o.A)({ref:s},a)),()=>{f.itemMap.delete(s)})),(0,h.jsx)(y,(0,o.A)((0,o.A)({},{[b]:""}),{},{ref:u,children:r}))});return w.displayName=v,[{Provider:s,Slot:g,ItemSlot:w},function(t){const n=i(e+"CollectionConsumer",t),r=c.useCallback(()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll("[".concat(b,"]"))),r=Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current));return r},[n.collectionRef,n.itemMap]);return r},r]}var k=new WeakMap;b=new WeakMap,Map;function N(e,t){if("at"in Array.prototype)return Array.prototype.at.call(e,t);const n=function(e,t){const n=e.length,r=A(t),a=r>=0?r:n+r;return a<0||a>=n?-1:a}(e,t);return-1===n?void 0:e[n]}function A(e){return e!==e||0===e?0:Math.trunc(e)}},5244(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("ticket",[["path",{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z",key:"qn84l0"}],["path",{d:"M13 5v2",key:"dyzc3o"}],["path",{d:"M13 17v2",key:"1ont0d"}],["path",{d:"M13 11v2",key:"1wjjxi"}]])},5327(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("mail",[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]])},5505(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]])},5598(e,t,n){n.d(t,{Cf:()=>y,L3:()=>w,c7:()=>x,lG:()=>m,rr:()=>k,zM:()=>g});var r=n(9379),a=n(3986),i=n(5043),s=n(7427),o=n(614),l=n(9766),c=n(579);const u=["className"],d=["className","children"],h=["className"],f=["className"],p=["className"],m=s.bL,g=s.l9,v=s.ZL,b=(s.bm,i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,u);return(0,c.jsx)(s.hJ,(0,r.A)({ref:t,className:(0,l.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n)},i))}));b.displayName=s.hJ.displayName;const y=i.forwardRef((e,t)=>{let{className:n,children:i}=e,u=(0,a.A)(e,d);return(0,c.jsxs)(v,{children:[(0,c.jsx)(b,{}),(0,c.jsxs)(s.UC,(0,r.A)((0,r.A)({ref:t,className:(0,l.cn)("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",n)},u),{},{children:[i,(0,c.jsxs)(s.bm,{className:"absolute right-4 top-4 roun
2ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[(0,c.jsx)(o.A,{className:"h-4 w-4"}),(0,c.jsx)("span",{className:"sr-only",children:"Close"})]})]}))]})});y.displayName=s.UC.displayName;const x=e=>{let{className:t}=e,n=(0,a.A)(e,h);return(0,c.jsx)("div",(0,r.A)({className:(0,l.cn)("flex flex-col space-y-1.5 text-center sm:text-left",t)},n))};x.displayName="DialogHeader";const w=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,f);return(0,c.jsx)(s.hE,(0,r.A)({ref:t,className:(0,l.cn)("text-lg font-semibold leading-none tracking-tight",n)},i))});w.displayName=s.hE.displayName;const k=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,p);return(0,c.jsx)(s.VY,(0,r.A)({ref:t,className:(0,l.cn)("text-sm text-muted-foreground",n)},i))});k.displayName=s.VY.displayName},5692(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},5731(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]])},5746(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]])},5754(e,t,n){n.d(t,{Eq:()=>u});var r=function(e){return"undefined"===typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},a=new WeakMap,i=new WeakMap,s={},o=0,l=function(e){return e&&(e.host||l(e.parentNode))},c=function(e,t,n,r){var c=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=l(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);s[n]||(s[n]=new WeakMap);var u=s[n],d=[],h=new Set,f=new Set(c),p=function(e){e&&!h.has(e)&&(h.add(e),p(e.parentNode))};c.forEach(p);var m=function(e){e&&!f.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(h.has(e))m(e);else try{var t=e.getAttribute(r),s=null!==t&&"false"!==t,o=(a.get(e)||0)+1,l=(u.get(e)||0)+1;a.set(e,o),u.set(e,l),d.push(e),1===o&&s&&i.set(e,!0),1===l&&e.setAttribute(n,"true"),s||e.setAttribute(r,"true")}catch(c){console.error("aria-hidden: cannot operate on ",e,c)}})};return m(t),h.clear(),o++,function(){d.forEach(function(e){var t=a.get(e)-1,s=u.get(e)-1;a.set(e,t),u.set(e,s),t||(i.has(e)||e.removeAttribute(r),i.delete(e)),s||e.removeAttribute(n)}),--o||(a=new WeakMap,a=new WeakMap,i=new WeakMap,s={})}},u=function(e,t,n){void 0===n&&(n="data-aria-hidden");var a=Array.from(Array.isArray(e)?e:[e]),i=t||r(e);return i?(a.push.apply(a,Array.from(i.querySelectorAll("[aria-live], script"))),c(a,i,n,"aria-hidden")):function(){return null}}},5896(e,t){function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,a=e[r];if(!(0<i(a,t)))break e;e[r]=t,e[n]=a,n=r}}function r(e){return 0===e.length?null:e[0]}function a(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,a=e.length,s=a>>>1;r<s;){var o=2*(r+1)-1,l=e[o],c=o+1,u=e[c];if(0>i(l,n))c<a&&0>i(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[o]=n,r=o);else{if(!(c<a&&0>i(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"===typeof performance&&"function"===typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,v=!1,b="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,x="undefined"!==typeof setImmediate?setImmediate:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)a(u);else{if(!(t.startTime<=e))break;a(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function k(e){if(g=!1,w(e),!m)if(null!==r(c))m=!0,A||(A=!0,N());else{var t=r(u);null!==t&&T(k,t.startTime-e)}}var N,A=!1,j=-1,_=5,S=-1;function C(){return!!v||!(t.unstable_now()-S<_)}
2function E(){if(v=!1,A){var e=t.unstable_now();S=e;var n=!0;try{e:{m=!1,g&&(g=!1,y(j),j=-1),p=!0;var i=f;try{t:{for(w(e),h=r(c);null!==h&&!(h.expirationTime>e&&C());){var s=h.callback;if("function"===typeof s){h.callback=null,f=h.priorityLevel;var o=s(h.expirationTime<=e);if(e=t.unstable_now(),"function"===typeof o){h.callback=o,w(e),n=!0;break t}h===r(c)&&a(c),w(e)}else a(c);h=r(c)}if(null!==h)n=!0;else{var l=r(u);null!==l&&T(k,l.startTime-e),n=!1}}break e}finally{h=null,f=i,p=!1}n=void 0}}finally{n?N():A=!1}}}if("function"===typeof x)N=function(){x(E)};else if("undefined"!==typeof MessageChannel){var L=new MessageChannel,P=L.port2;L.port1.onmessage=E,N=function(){P.postMessage(null)}}else N=function(){b(E,0)};function T(e,n){j=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_requestPaint=function(){v=!0},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,a,i){var s=t.unstable_now();switch("object"===typeof i&&null!==i?i="number"===typeof(i=i.delay)&&0<i?s+i:s:i=s,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:d++,callback:a,priorityLevel:e,startTime:i,expirationTime:o=i+o,sortIndex:-1},i>s?(e.sortIndex=i,n(u,e),null===r(c)&&e===r(u)&&(g?(y(j),j=-1):g=!0,T(k,i-s))):(e.sortIndex=o,n(c,e),m||p||(m=!0,A||(A=!0,N()))),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},5949(e,t,n){n.d(t,{E:()=>u});var r=n(9379),a=n(3986),i=(n(5043),n(917)),s=n(9766),o=n(579);const l=["className","variant"],c=(0,i.F)("inline-flex items-center rounded-md border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground shadow hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground shadow hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function u(e){let{className:t,variant:n}=e,i=(0,a.A)(e,l);return(0,o.jsx)("div",(0,r.A)({className:(0,s.cn)(c({variant:n}),t)},i))}},6095(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("thumbs-up",[["path",{d:"M7 10v12",key:"1qc93n"}],["path",{d:"M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z",key:"emmmcr"}]])},6125(e,t,n){n.r(t),n.d(t,{default:()=>I});var r=n(9379),a=n(5043),i=n(9722),s=n(6328),o=n(1578),l=n(1140),c=n(5949),u=n(3390),d=n(2264),h=n(3416),f=n(556),p=n(6178),m=n(5598),g=n(1360),v=n(9855),b=n(1990),y=n(7104),x=n(7978),w=n(5746);const k=(0,n(7784).A)("link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]]);var N=n(5692),A=n(1680),j=n(5087),_=n(6833),S=n(6245),C=n(9233),E=n(5327),L=n(6747),P=n(9581),T=n(4399),R=n(579);const F="https://nextgen-staging.emergent.host",M={created:{label:"Quote Created",Icon:A.A,accent:"text-foreground"},sent:{label:"Sent to Client",Icon:w.A,accent:"text-blue-500"},viewed:{label:"Client Viewed Quote",Icon:j.A,accent:"text-amber-500"},accepted:{label:"Client Accepted",Icon:_.A,accent:"text-primary"},rejected:{label:"Client Rejected",Icon:S.A,accent:"text-red-500"},converted_to_invoice:{label:"Converted to Invoice",Icon:N.A,accent:"text-primary"},reminder_sent:{label:"Reminder Sent",Icon:C.A,accent:"text-amber-500"}},O=e=>{let{quote:t}=e;const n=(t.audit_log||[]).find(e=>"created"===e.event);return n&&n.actor?(0,R.jsxs)("p",{className:"text-xs text-muted-foreground
2/70 mt-1 italic",children:["Created by ",(0,R.jsx)("span",{className:"font-mono",children:n.actor})]}):null},D=e=>{var t,n,r;let{entry:a}=e;const i=M[a.event]||{label:a.event,Icon:E.A,accent:"text-muted-foreground"},{Icon:s,label:o,accent:l}=i;let c="";try{c=(0,T.m)(new Date(a.at),{addSuffix:!0})}catch(d){c=a.at}const u="reminder_sent"===a.event&&null!==(t=a.meta)&&void 0!==t&&t.milestone_days?"".concat(a.meta.milestone_days,"-day milestone"):"converted_to_invoice"===a.event&&null!==(n=a.meta)&&void 0!==n&&n.invoice_id?"Invoice ".concat(a.meta.invoice_id):"sent"===a.event&&null!==(r=a.meta)&&void 0!==r&&r.resend?"Resent":null;return(0,R.jsxs)("div",{className:"relative flex items-start gap-3 pl-1",children:[(0,R.jsx)("div",{className:"shrink-0 w-9 h-9 rounded-full bg-card border border-border/60 flex items-center justify-center z-10 ".concat(l),"aria-hidden":!0,children:(0,R.jsx)(s,{className:"w-4 h-4"})}),(0,R.jsxs)("div",{className:"flex-1 min-w-0 pt-1.5",children:[(0,R.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,R.jsx)("p",{className:"text-sm font-medium ".concat(l),children:o}),(0,R.jsx)("p",{className:"text-[11px] text-muted-foreground whitespace-nowrap",children:c})]}),(0,R.jsxs)("p",{className:"text-xs text-muted-foreground mt-0.5",children:[a.actor||"system",u?" \xb7 ".concat(u):""]})]})]})},I=e=>{var t,n;let{users:j,onRefresh:_,permissions:S}=e;const C=!S||S.canDeleteQuotes,E=!S||S.canConvertQuotesToInvoices,[T,M]=(0,a.useState)([]),[I,z]=(0,a.useState)(!0),[B,q]=(0,a.useState)(!1),[U,V]=(0,a.useState)(!1),[H,W]=(0,a.useState)({open:!1,quote:null,log:[],loading:!1}),[G,$]=(0,a.useState)({user_id:"",client_name:"",client_email:"",client_address:"",items:[{description:"",quantity:1,unit_price:0}],tax_rate:0,notes:"",valid_days:30});(0,a.useEffect)(()=>{Y()},[]);const Y=async()=>{try{const e=await i.A.get("".concat(F,"/api/admin/quotes"),{withCredentials:!0});M(e.data)}catch(e){console.error("Error fetching quotes:",e),s.oR.error("Failed to fetch quotes")}finally{z(!1)}},K=()=>{$({user_id:"",client_name:"",client_email:"",client_address:"",items:[{description:"",quantity:1,unit_price:0}],tax_rate:0,notes:"",valid_days:30})},[X,Z]=(0,a.useState)(!1),J=(e,t,n)=>{const a=[...G.items];a[e][t]="quantity"===t||"unit_price"===t?parseFloat(n)||0:n,$((0,r.A)((0,r.A)({},G),{},{items:a}))},Q=e=>{switch(e){case"accepted":return"bg-primary text-primary-foreground";case"sent":return"bg-blue-500/20 text-blue-500";case"rejected":return"bg-destructive/20 text-destructive";case"expired":return"bg-muted text-muted-foreground";default:return"bg-yellow-500/20 text-yellow-500"}},ee=(()=>{const e=G.items.reduce((e,t)=>e+t.quantity*t.unit_price,0),t=e*(G.tax_rate/100);return{subtotal:e,tax:t,total:e+t}})();return I?(0,R.jsx)("div",{className:"text-center py-12",children:"Loading quotes..."}):(0,R.jsxs)("div",{className:"space-y-4","data-testid":"admin-quotes-tab",children:[(0,R.jsx)("div",{className:"flex justify-end",children:(0,R.jsxs)(m.lG,{open:B,onOpenChange:e=>{q(e),e||K()},children:[(0,R.jsx)(m.zM,{asChild:!0,children:(0,R.jsxs)(u.$,{className:"font-bold uppercase",children:[(0,R.jsx)(g.A,{className:"w-4 h-4 mr-2"}),"Create Quote"]})}),(0,R.jsxs)(m.Cf,{className:"bg-card border-border max-w-2xl max-h-[90vh] overflow-y-auto",children:[(0,R.jsx)(m.c7,{children:(0,R.jsx)(m.L3,{className:"text-xl font-bold uppercase",children:"Create Quote"})}),(0,R.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),G.user_id)if(G.items.some(e=>!e.description||e.unit_price<=0))s.oR.error("Please fill in all item details");else{V(!0);try{await i.A.post("".concat(F,"/api/admin/quotes"),G,{withCredentials:!0}),s.oR.success("Quote created successfully"),q(!1),K(),Y()}catch(t){console.error("Error creating quote:",t),s.oR.error("Failed to create quote")}finally{V(!1)}}else s.oR.error("Please select a client")},className:"space-y-4",children:[(0,R.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,R.jsxs)("div",{className:"col-span-2",children:[(0,R.jsx)(f.J,{children:"Client *"}),(0,R.jsxs)(p.l6,{value:G.user_id,onValueChange:e=>{const t=null===j||void 0===j?void 0:j.find(t=>t.user_id===e);$((0,r.A)((0,r.A)({},G),{},{user_id:e,client_name:(null===t||void 0===t?void 0:t.name)||"",client_email:(null===t||void 0===t?void 0:t.email)||""}))},children:[(0,R.jsx)(p.bq,{className:"bg-input",children:(0,R.jsx)(p.yv,{placeholder:"Select client"})}),(0,R.jsx)(p.gC,{children:null===j||void 0===j?void 0:j.filter(e=>"client"===e.role).map(e=>(0,R.jsxs)(p.eb,{value:e.user_id,children:[e.name," (",e.email,")"]},e.user_id))})]})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)(f.J,{children:"Client Name"}),(0,R.jsx)(d.p,{value:G.client_name,onChange:e=>$((0,r.A)((0,r.A)({},G),{},{client_name:e.target.value})),className:"bg-input"})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)(f.J,{children:"Client Email"}),(0,R.jsx)(d.p,{value:G.client_email,onChange:e=>$((0,r.A)((0,r.A)({},G),{},{client_email:e.target.value})),className:"bg-input"})]}),(0,R.jsxs)("div",{className:"col-span-2",children:[(0,R.jsx)(f.J,{children:"Client Address"}),(0,R.jsx)(d.p,{value:G.client_address,onChange:e=>$((0,r.A)((0,r.A)({},G),{},{client_address:e.target.value})),placeholder:"Optional",className:"bg-input"})]})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)(f.J,{className:"mb-2 block",children:"Line Items"}),G.items.map((e,t)=>(0,R.jsxs)("div",{className:"flex gap-2 mb-2",children:[(0,R.jsx)(d.p,{placeholder:"Description",value:e.description,onChange:e=>J(t,"description",e.target.value),className:"flex-1 bg-input"}),(0,R.jsx)(d.p,{type:"number",placeholder:"Qty",value:e.quantity,onChange:e=>J(t,"quantity",e.target.value),className:"w-20 bg-input"}),(0,R.jsx)(d.p,{type:"number",step:"0.01",placeholder:"Price",value:e.unit_price,onChange:e=>J(t,"unit_price",e.target.value),className:"w-28 bg-input"}),G.items.length>1&&(0,R.jsx)(u.$,{type:"button",variant:"outline",size:"sm",onClick:()=>(e=>{$((0,r.A)((0,r.A)({},G),{}
2,{items:G.items.filter((t,n)=>n!==e)}))})(t),children:(0,R.jsx)(v.A,{className:"w-4 h-4"})})]},t)),(0,R.jsxs)(u.$,{type:"button",variant:"outline",size:"sm",onClick:()=>{$((0,r.A)((0,r.A)({},G),{},{items:[...G.items,{description:"",quantity:1,unit_price:0}]}))},children:[(0,R.jsx)(g.A,{className:"w-4 h-4 mr-1"}),"Add Item"]}),(0,R.jsxs)(u.$,{type:"button",variant:"outline",size:"sm",onClick:()=>Z(!0),"data-testid":"quote-add-preset-btn",className:"ml-2",children:[(0,R.jsx)(b.A,{className:"w-4 h-4 mr-1"}),"From Preset"]}),(0,R.jsx)(L.PresetPicker,{open:X,onClose:()=>Z(!1),onPick:e=>{const t={description:e.name+(e.sku?" [".concat(e.sku,"]"):""),quantity:e.default_quantity||1,unit_price:e.unit_price||0};$(e=>{const n=[...e.items],a=n.findIndex(e=>!e.description&&!e.unit_price);return a>=0?n[a]=t:n.push(t),(0,r.A)((0,r.A)({},e),{},{items:n})})}})]}),(0,R.jsxs)("div",{className:"grid grid-cols-3 gap-4",children:[(0,R.jsxs)("div",{children:[(0,R.jsx)(f.J,{children:"Tax Rate (%)"}),(0,R.jsx)(d.p,{type:"number",step:"0.1",value:G.tax_rate,onChange:e=>$((0,r.A)((0,r.A)({},G),{},{tax_rate:parseFloat(e.target.value)||0})),className:"bg-input"})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)(f.J,{children:"Valid For (days)"}),(0,R.jsx)(d.p,{type:"number",value:G.valid_days,onChange:e=>$((0,r.A)((0,r.A)({},G),{},{valid_days:parseInt(e.target.value)||30})),className:"bg-input"})]}),(0,R.jsx)("div",{className:"flex flex-col justify-end",children:(0,R.jsxs)("div",{className:"text-right",children:[(0,R.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Subtotal: $",ee.subtotal.toFixed(2)]}),(0,R.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Tax: $",ee.tax.toFixed(2)]}),(0,R.jsxs)("p",{className:"text-lg font-bold text-primary",children:["Total: $",ee.total.toFixed(2)]})]})})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)(f.J,{children:"Notes"}),(0,R.jsx)(h.T,{value:G.notes,onChange:e=>$((0,r.A)((0,r.A)({},G),{},{notes:e.target.value})),placeholder:"Optional notes...",className:"bg-input"})]}),(0,R.jsx)(u.$,{type:"submit",className:"w-full font-bold uppercase",disabled:U,children:U?"Creating...":"Create Quote"})]})]})]})}),T.map(e=>(0,R.jsx)(l.Zp,{className:"p-6 border-border",children:(0,R.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[(0,R.jsxs)("div",{children:[(0,R.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,R.jsx)("h3",{className:"font-bold font-mono",children:e.quote_id}),(0,R.jsx)(c.E,{className:Q(e.status),children:e.status.toUpperCase()})]}),(0,R.jsxs)("p",{className:"text-sm text-muted-foreground",children:[e.client_name," - ",e.client_email]}),(0,R.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:["Created: ",(0,P.GP)(new Date(e.created_at),"MMM dd, yyyy")," | Valid until: ",(0,P.GP)(new Date(e.valid_until),"MMM dd, yyyy")]}),(0,R.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e.items.length," item(s)"]}),(0,R.jsx)(O,{quote:e})]}),(0,R.jsxs)("div",{className:"flex flex-col items-end gap-2",children:[(0,R.jsxs)("p",{className:"text-2xl font-black text-primary",children:["$",e.total.toFixed(2)]}),(0,R.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,R.jsxs)(p.l6,{value:e.status,onValueChange:t=>(async(e,t)=>{try{await i.A.put("".concat(F,"/api/admin/quotes/").concat(e,"/status"),{status:t},{withCredentials:!0}),s.oR.success("Quote status updated"),Y()}catch(n){s.oR.error("Failed to update status")}})(e.quote_id,t),children:[(0,R.jsx)(p.bq,{className:"w-28 bg-input",children:(0,R.jsx)(p.yv,{})}),(0,R.jsxs)(p.gC,{children:[(0,R.jsx)(p.eb,{value:"draft",children:"Draft"}),(0,R.jsx)(p.eb,{value:"sent",children:"Sent"}),(0,R.jsx)(p.eb,{value:"accepted",children:"Accepted"}),(0,R.jsx)(p.eb,{value:"rejected",children:"Rejected"}),(0,R.jsx)(p.eb,{value:"expired",children:"Expired"})]})]}),(0,R.jsxs)(u.$,{variant:"outline",size:"sm",onClick:()=>(e=>{const t=new o.uE,n=t.internal.pageSize.getWidth();t.setFillColor(0,255,0),t.rect(0,0,n,40,"F"),t.setTextColor(0,0,0),t.setFontSize(24),t.setFont("helvetica","bold"),t.text("NEXT/GEN",20,25),t.setFontSize(10),t.text("NETWORK SOLUTIONS",20,32),t.setTextColor(0,0,0),t.setFontSize(20),t.text("QUOTE",n-20,25,{align:"right"}),t.setFontSize(10),t.text(e.quote_id,n-20,32,{align:"right"}),t.setFontSize(9),t.setTextColor(100,100,100),t.text("P.O. Box 419, Greenup, KY 41144",20,50),t.text("740-302-5607 | support@nextgennetworksolutions.
2com",20,56),t.setTextColor(0,0,0),t.setFontSize(11),t.setFont("helvetica","bold"),t.text("Quote For:",20,70),t.setFont("helvetica","normal"),t.text(e.client_name,20,77),t.text(e.client_email,20,84),e.client_address&&t.text(e.client_address,20,91),t.setFont("helvetica","bold"),t.text("Date:",n-60,70),t.text("Valid Until:",n-60,77),t.setFont("helvetica","normal"),t.text((0,P.GP)(new Date(e.created_at),"MMM dd, yyyy"),n-20,70,{align:"right"}),t.text((0,P.GP)(new Date(e.valid_until),"MMM dd, yyyy"),n-20,77,{align:"right"});let r=110;t.setFillColor(240,240,240),t.rect(20,r-6,n-40,10,"F"),t.setFont("helvetica","bold"),t.setFontSize(10),t.text("Description",25,r),t.text("Qty",120,r),t.text("Unit Price",140,r),t.text("Amount",n-25,r,{align:"right"}),r+=12,t.setFont("helvetica","normal"),e.items.forEach(e=>{t.text(e.description.substring(0,40),25,r),t.text(e.quantity.toString(),120,r),t.text("$".concat(e.unit_price.toFixed(2)),140,r),t.text("$".concat((e.quantity*e.unit_price).toFixed(2)),n-25,r,{align:"right"}),r+=8}),r+=10,t.setDrawColor(200,200,200),t.line(120,r-5,n-20,r-5),t.text("Subtotal:",140,r),t.text("$".concat(e.subtotal.toFixed(2)),n-25,r,{align:"right"}),e.tax_rate>0&&(r+=8,t.text("Tax (".concat(e.tax_rate,"%):"),140,r),t.text("$".concat(e.tax_amount.toFixed(2)),n-25,r,{align:"right"})),r+=10,t.setFont("helvetica","bold"),t.setFontSize(12),t.text("Total:",140,r),t.setTextColor(0,180,0),t.text("$".concat(e.total.toFixed(2)),n-25,r,{align:"right"}),e.notes&&(r+=20,t.setTextColor(0,0,0),t.setFontSize(10),t.setFont("helvetica","bold"),t.text("Notes:",20,r),t.setFont("helvetica","normal"),t.text(e.notes,20,r+7)),t.setTextColor(100,100,100),t.setFontSize(8),t.text("Thank you for your business!",n/2,280,{align:"center"}),t.save("Quote_".concat(e.quote_id,".pdf")),s.oR.success("PDF downloaded")})(e),children:[(0,R.jsx)(y.A,{className:"w-4 h-4 mr-1"}),"PDF"]}),(0,R.jsxs)(u.$,{variant:"outline",size:"sm",onClick:()=>(async e=>{W({open:!0,quote:e,log:[],loading:!0});try{const t=await i.A.get("".concat(F,"/api/admin/quotes/").concat(e.quote_id,"/audit"),{withCredentials:!0});W({open:!0,quote:e,log:t.data.audit_log||[],remindersSent:t.data.reminders_sent||[],lastReminderSentAt:t.data.last_reminder_sent_at,loading:!1})}catch(t){s.oR.error("Failed to load activity log"),W({open:!1,quote:null,log:[],loading:!1})}})(e),title:"View audit log","data-testid":"audit-quote-".concat(e.quote_id),children:[(0,R.jsx)(x.A,{className:"w-4 h-4 mr-1"}),"Activity"]}),e.client_email&&["draft","sent"].includes(e.status)&&(0,R.jsxs)(u.$,{variant:"outline",size:"sm",onClick:()=>(async e=>{if(e.client_email){if(window.confirm("Send this quote to ".concat(e.client_email,"?")))try{const t=await i.A.post("".concat(F,"/api/admin/quotes/").concat(e.quote_id,"/send"),{},{withCredentials:!0});s.oR.success(t.data.message),Y()}catch(r){var t,n;s.oR.error((null===(t=r.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.detail)||"Failed to send quote")}}else s.oR.error("Quote has no client email")})(e),title:"Send the public quote link to ".concat(e.client_email),"data-testid":"send-quote-".concat(e.quote_id),children:[(0,R.jsx)(w.A,{className:"w-4 h-4 mr-1"}),"sent"===e.status?"Resend":"Send to Client"]}),e.public_token&&(0,R.jsxs)(u.$,{variant:"outline",size:"sm",onClick:()=>{const t="".concat(window.location.origin,"/quote/").concat(e.public_token);navigator.clipboard.writeText(t).then(()=>s.oR.success("Public quote link copied"),()=>s.oR.error("Could not copy link"))},title:"Copy the client-facing link for this quote","data-testid":"copy-public-link-".concat(e.quote_id),children:[(0,R.jsx)(k,{className:"w-4 h-4 mr-1"}),"Copy Link"]}),"accepted"!==e.status&&E&&(0,R.jsxs)(u.$,{variant:"outline",size:"sm",onClick:()=>(async e=>{if(window.confirm("Convert this quote to an invoice?"))try{await i.A.post("".concat(F,"/api/admin/quotes/").concat(e,"/convert-to-invoice"),{},{withCredentials:!0}),s.oR.success("Quote converted to invoice"),Y(),_()}catch(r){var t,n;s.oR.error((null===(t=r.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.detail)||"Failed to convert quote")}})(e.quote_id),children:[(0,R.jsx)(N.A,{className:"w-4 h-4 mr-1"}),"Invoice"]}),C&&(0,R.jsx)(u.$,{variant:"outline",size:"sm",onClick:()=>(async e=>{if(window.confirm("Are you sure you want to delete this quote?"))try{await i.A.delete("".concat(F,"/api/admin/quotes/").concat(e),{withCredentials:!0}),s.oR.success("Quote deleted"),Y()}catch(t){s.oR.error("Failed to delete quote")}})(e.quote_id),children:(0,R.jsx)(v.A,{className:"w-4 h-4"})})]})]})]})},e.quote_id)),0===T.length&&(0,R.jsxs)(l.Zp,{className:"p-12 text-center border-border",children:[(0,R.jsx)(A.A,{className:"w-12 h-12 mx-auto text-muted-foreground mb-4"}),(0,R.jsx)("p",{className:"text-muted-foreground",children:"No quotes found. Create your first quote."})]}),(0,R.jsx)(m.lG,{open:H.open,onOpenChange:e=>!e&&W({open:!1,quote:null,log:[],loading:!1}),children:(0,R.jsxs)(m.Cf,{className:"bg-card border-border max-w-lg","data-testid":"audit-log-dialog",children:[(0,R.jsx)(m.c7,{children:(0,R.jsxs)(m.L3,{className:"text-xl font-bold uppercase flex items-center gap-2",children:[(0,R.jsx)(x.A,{className:"w-5 h-5 text-primary"}),"Activity \u2014 ",null===(t=H.quote)||void 0===t?void 0:t.quote_id]})}),H.loading?(0,R.jsx)("div",{className:"text-center py-8 text-muted-foreground text-sm",children:"Loading\u2026"}):0===H.log.length?(0,R.jsx)("div",{className:"text-center py-8 text-muted-foreground text-sm",children:"No activity yet. Once you send the quote, view tracking and client actions will appear here."}):(0,R.jsxs)("div",{className:"relative max-h-96 overflow-y-auto pr-1 pl-2 py-2",children:[(0,R.jsx)("div",{className:"absolute left-[18px] top-3 bottom-3 w-px bg-border","aria-hidden":!0}),(0,R.jsx)("div",{className:"space-y-3",children:H.log.slice().reverse().map((e,t)=>(0,R.jsx)(D,{entry:e},t))})]}),(null===(n=H.remindersSent)||void 0===n?void 0:n.length)>0&&(0,R.jsxs)("div",{className:"mt-3 pt-3 border-t border-border text-xs text-muted-foreground",children:["Reminders sent at milestones: ",H.remindersSent.join(", ")," day(s)"]})]})})]})}},6178(e,t,n){n.d(t,{l6:()=>Yr,gC:()=>Qr,eb:()=>ea,bq:()=>Xr,yv:()=>Kr});var r=n(9379),a=n(3986),i=n(5043),s=n(7950);function o(e,t){let[n,r]=t;return Math.min(r,Math.max(n,e))}var l=n(858),c=n(5094),u=n(2814),d=n(1862),h=n(4204),f=n(1184),p=n(6590),m=n(276),g=n(4490);const v=["top","right","bottom","left"],b=Math.min,y=Math.max,x=Math.round,w=Math.floor,k=e=>({x:e,y:e}
vendor: 5,305 bytes, line 2
2),N={left:"right",right:"left",bottom:"top",top:"bottom"},A={start:"end",end:"start"};function j(e,t,n){return y(e,b(t,n))}function _(e,t){return"function"===typeof e?e(t):e}function S(e){return e.split("-")[0]}function C(e){return e.split("-")[1]}function E(e){return"x"===e?"y":"x"}function L(e){return"y"===e?"height":"width"}const P=new Set(["top","bottom"]);function T(e){return P.has(S(e))?"y":"x"}function R(e){return E(T(e))}function F(e){return e.replace(/start|end/g,e=>A[e])}const M=["left","right"],O=["right","left"],D=["top","bottom"],I=["bottom","top"];function z(e,t,n,r){const a=C(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?O:M:t?M:O;case"left":case"right":return t?D:I;default:return[]}}(S(e),"start"===n,r);return a&&(i=i.map(e=>e+"-"+a),t&&(i=i.concat(i.map(F)))),i}function B(e){return e.replace(/left|right|bottom|top/g,e=>N[e])}function q(e){return"number"!==typeof e?function(e){return(0,r.A)({top:0,right:0,bottom:0,left:0},e)}(e):{top:e,right:e,bottom:e,left:e}}function U(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}const V=["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"],H=["strategy"],W=["mainAxis","crossAxis","limiter"],G=["apply"];function $(e,t,n){let{reference:r,floating:a}=e;const i=T(t),s=R(t),o=L(s),l=S(t),c="y"===i,u=r.x+r.width/2-a.width/2,d=r.y+r.height/2-a.height/2,h=r[o]/2-a[o]/2;let f;switch(l){case"top":f={x:u,y:r.y-a.height};break;case"bottom":f={x:u,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:d};break;case"left":f={x:r.x-a.width,y:d};break;default:f={x:r.x,y:r.y}}switch(C(t)){case"start":f[s]-=h*(n&&c?-1:1);break;case"end":f[s]+=h*(n&&c?-1:1)}return f}async function Y(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:i,rects:s,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:f=0}=_(t,e),p=q(f),m=o[h?"floating"===d?"reference":"floating":d],g=U(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:a,width:s.floating.width,height:s.floating.height}:s.reference,b=await(null==i.getOffsetParent?void 0:i.getOffsetParent(o.floating)),y=await(null==i.isElement?void 0:i.isElement(b))&&await(null==i.getScale?void 0:i.getScale(b))||{x:1,y:1},x=U(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:v,offsetParent:b,strategy:l}):v);return{top:(g.top-x.top+p.top)/y.y,bottom:(x.bottom-g.bottom+p.bottom)/y.y,left:(g.left-x.left+p.left)/y.x,right:(x.right-g.right+p.right)/y.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 X(e){return v.some(t=>e[t]>=0)}const Z=new Set(["left","top"]);function J(){return"undefined"!==typeof window}function Q(e){return ne(e)?(e.nodeName||"").toLowerCase():"#document"}function ee(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function te(e){var t;return null==(t=(ne(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function ne(e){return!!J()&&(e instanceof Node||e instanceof ee(e).Node)}function re(e){return!!J()&&(e instanceof Element||e instanceof ee(e).Element)}function ae(e){return!!J()&&(e instanceof HTMLElement||e instanceof ee(e).HTMLElement)}function ie(e){return!(!J()||"undefined"===typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ee(e).ShadowRoot)}const se=new Set(["inline","contents"]);function oe(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=ye(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!se.has(a)}const le=new Set(["table","td","th"]);function ce(e){return le.has(Q(e))}const ue=[":popover-open",":modal"];function de(e){return ue.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const he=["transform","translate","scale","rotate","perspective"],fe=["transform","translate","scale","rotate","perspective","filter"],pe=["paint","layout","strict","content"];function me(e){const t=ge(),n=re(e)?ye(e):e;return he.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||fe.some(e=>(n.willChange||"").includes(e))||pe.some(e=>(n.contain||"").includes(e))}function ge(){return!("undefined"===typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const ve=new Set(["html","body","#document"]);function be(e){return ve.has(Q(e))}function ye(e){return ee(e).getComputedStyle(e)}function xe(e){return re(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function we(e){if("html"===Q(e))return e;const t=e.assignedSlot||e.parentNode||ie(e)&&e.host||te(e);return ie(t)?t.host:t}function ke(e){const t=we(e);return be(t)?e.ownerDocument?e.ownerDocument.body:e.body:ae(t)&&oe(t)?t:ke(t)}function Ne(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=ke(e),i=a===(null==(r=e.ownerDocument)?void 0:r.body),s=ee(a);if(i){const e=Ae(s);
vendor: 4,112 bytes, line 2
2return t.concat(s,s.visualViewport||[],oe(a)?a:[],e&&n?Ne(e):[])}return t.concat(a,Ne(a,[],n))}function Ae(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function je(e){const t=ye(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=ae(e),i=a?e.offsetWidth:n,s=a?e.offsetHeight:r,o=x(n)!==i||x(r)!==s;return o&&(n=i,r=s),{width:n,height:r,$:o}}function _e(e){return re(e)?e:e.contextElement}function Se(e){const t=_e(e);if(!ae(t))return k(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:i}=je(t);let s=(i?x(n.width):n.width)/r,o=(i?x(n.height):n.height)/a;return s&&Number.isFinite(s)||(s=1),o&&Number.isFinite(o)||(o=1),{x:s,y:o}}const Ce=k(0);function Ee(e){const t=ee(e);return ge()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ce}function Le(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),i=_e(e);let s=k(1);t&&(r?re(r)&&(s=Se(r)):s=Se(e));const o=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ee(e))&&t}(i,n,r)?Ee(i):k(0);let l=(a.left+o.x)/s.x,c=(a.top+o.y)/s.y,u=a.width/s.x,d=a.height/s.y;if(i){const e=ee(i),t=r&&re(r)?ee(r):r;let n=e,a=Ae(n);for(;a&&r&&t!==n;){const e=Se(a),t=a.getBoundingClientRect(),r=ye(a),i=t.left+(a.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(a.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=ee(a),a=Ae(n)}}return U({width:u,height:d,x:l,y:c})}function Pe(e,t){const n=xe(e).scrollLeft;return t?t.left+n:Le(te(e)).left+n}function Te(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Pe(e,n),y:n.top+t.scrollTop}}const Re=new Set(["absolute","fixed"]);function Fe(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=ee(e),r=te(e),a=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,o=0,l=0;if(a){i=a.width,s=a.height;const e=ge();(!e||e&&"fixed"===t)&&(o=a.offsetLeft,l=a.offsetTop)}const c=Pe(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),a="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,s=Math.abs(r.clientWidth-t.clientWidth-a);s<=25&&(i-=s)}else c<=25&&(i+=c);return{width:i,height:s,x:o,y:l}}(e,n);else if("document"===t)r=function(e){const t=te(e),n=xe(e),r=e.ownerDocument.body,a=y(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=y(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Pe(e);const o=-n.scrollTop;return"rtl"===ye(r).direction&&(s+=y(t.clientWidth,r.clientWidth)-a),{width:a,height:i,x:s,y:o}}(te(e));else if(re(t))r=function(e,t){const n=Le(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,i=ae(e)?Se(e):k(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:a*i.x,y:r*i.y}}(t,n);else{const n=Ee(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return U(r)}function Me(e,t){const n=we(e);return!(n===t||!re(n)||be(n))&&("fixed"===ye(n).position||Me(n,t))}function Oe(e,t,n){const r=ae(t),a=te(t),i="fixed"===n,s=Le(e,!0,i,t);let o={scrollLeft:0,scrollTop:0};const l=k(0);function c(){l.x=Pe(a)}if(r||!r&&!i)if(("body"!==Q(t)||oe(a))&&(o=xe(t)),r){const e=Le(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else a&&c();i&&!r&&a&&c();const u=!a||r||i?k(0):Te(a,o);return{x:s.left+o.scrollLeft-l.x-u.x,y:s.top+o.scrollTop-l.y-u.y,width:s.width,height:s.height}}function De(e){return"static"===ye(e).position}function Ie(e,t){if(!ae(e)||"fixed"===ye(e).position)return null;if(t)return t(e);let n=e.offsetParent;return te(e)===n&&(n=n.ownerDocument.body),n}function ze(e,t){const n=ee(e);if(de(e))return n;if(!ae(e)){let t=we(e);for(;t&&!be(t);){if(re(t)&&!De(t))return t;t=we(t)}return n}let r=Ie(e,t);for(;r&&ce(r)&&De(r);)r=Ie(r,t);return r&&be(r)&&De(r)&&!me(r)?n:r||function(e){let t=we(e);for(;ae(t)&&!be(t);){if(me(t))return t;if(de(t))return null;t=we(t)}return null}(e)||n}const Be={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const i="fixed"===a,s=te(r),o=!!t&&de(t.floating);if(r===s||o&&i)return n;let l={scrollLeft:0,scrollTop:0},c=k(1);const u=k(0),d=ae(r);
vendor: 4,347 bytes, line 2
2if((d||!d&&!i)&&(("body"!==Q(r)||oe(s))&&(l=xe(r)),ae(r))){const e=Le(r);c=Se(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const h=!s||d||i?k(0):Te(s,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}},getDocumentElement:te,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const i=[..."clippingAncestors"===n?de(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ne(e,[],!1).filter(e=>re(e)&&"body"!==Q(e)),a=null;const i="fixed"===ye(e).position;let s=i?we(e):e;for(;re(s)&&!be(s);){const t=ye(s),n=me(s);n||"fixed"!==t.position||(a=null),(i?!n&&!a:!n&&"static"===t.position&&a&&Re.has(a.position)||oe(s)&&!n&&Me(e,s))?r=r.filter(e=>e!==s):a=t,s=we(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],o=i.reduce((e,n)=>{const r=Fe(t,n,a);return e.top=y(r.top,e.top),e.right=b(r.right,e.right),e.bottom=b(r.bottom,e.bottom),e.left=y(r.left,e.left),e},Fe(t,s,a));return{width:o.right-o.left,height:o.bottom-o.top,x:o.left,y:o.top}},getOffsetParent:ze,getElementRects:async function(e){const t=this.getOffsetParent||ze,n=this.getDimensions,r=await n(e.floating);return{reference:Oe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=je(e);return{width:t,height:n}},getScale:Se,isElement:re,isRTL:function(e){return"rtl"===ye(e).direction}};function qe(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ue(e,t,n,a){void 0===a&&(a={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:o="function"===typeof ResizeObserver,layoutShift:l="function"===typeof IntersectionObserver,animationFrame:c=!1}=a,u=_e(e),d=i||s?[...u?Ne(u):[],...Ne(t)]:[];d.forEach(e=>{i&&e.addEventListener("scroll",n,{passive:!0}),s&&e.addEventListener("resize",n)});const h=u&&l?function(e,t){let n,a=null;const i=te(e);function s(){var e;clearTimeout(n),null==(e=a)||e.disconnect(),a=null}return function o(l,c){void 0===l&&(l=!1),void 0===c&&(c=1),s();const u=e.getBoundingClientRect(),{left:d,top:h,width:f,height:p}=u;if(l||t(),!f||!p)return;const m={rootMargin:-w(h)+"px "+-w(i.clientWidth-(d+f))+"px "+-w(i.clientHeight-(h+p))+"px "+-w(d)+"px",threshold:y(0,b(1,c))||1};let g=!0;function v(t){const r=t[0].intersectionRatio;if(r!==c){if(!g)return o();r?o(!1,r):n=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==r||qe(u,e.getBoundingClientRect())||o(),g=!1}try{a=new IntersectionObserver(v,(0,r.A)((0,r.A)({},m),{},{root:i.ownerDocument}))}catch(x){a=new IntersectionObserver(v,m)}a.observe(e)}(!0),s}(u,n):null;let f,p=-1,m=null;o&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),u&&!c&&m.observe(u),m.observe(t));let g=c?Le(e):null;return c&&function t(){const r=Le(e);g&&!qe(g,r)&&n();g=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",n),s&&e.removeEventListener("resize",n)}),null==h||h(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(f)}}const Ve=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,a;const{x:i,y:s,placement:o,middlewareData:l}=t,c=await async function(e,t){const{placement:n,platform:r,elements:a}=e,i=await(null==r.isRTL?void 0:r.isRTL(a.floating)),s=S(n),o=C(n),l="y"===T(n),c=Z.has(s)?-1:1,u=i&&l?-1:1,d=_(t,e);let{mainAxis:h,crossAxis:f,alignmentAxis:p}="number"===typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&"number"===typeof p&&(f="end"===o?-1*p:p),l?{x:f*u,y:h*c}:{x:h*c,y:f*u}}(t,e);return o===(null==(n=l.offset)?void 0:n.placement)&&null!=(a=l.arrow)&&a.alignmentOffset?{}:{x:i+c.x,y:s+c.y,data:(0,r.A)((0,r.A)({},c),{},{placement:o})}}}},He=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,o=_(e,t),{mainAxis:l=!0,crossAxis:c=!1,limiter:u={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}}}=o,d=(0,a.A)(o,W),h={x:n,y:i},f=await Y(t,d),p=T(S(s)),m=E(p);let g=h[m],v=h[p];if(l){const e="y"===m?"bottom":"right";g=j(g+f["y"===m?"top":"left"],g,g-f[e])}if(c){const e="y"===p?"bottom":"right";
2v=j(v+f["y"===p?"top":"left"],v,v-f[e])}const b=u.fn((0,r.A)((0,r.A)({},t),{},{[m]:g,[p]:v}));return(0,r.A)((0,r.A)({},b),{},{data:{x:b.x-n,y:b.y-i,enabled:{[m]:l,[p]:c}}})}}},We=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:o,initialPlacement:l,platform:c,elements:u}=t,d=_(e,t),{mainAxis:h=!0,crossAxis:f=!0,fallbackPlacements:p,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0}=d,b=(0,a.A)(d,V);if(null!=(n=s.arrow)&&n.alignmentOffset)return{};const y=S(i),x=T(l),w=S(l)===l,k=await(null==c.isRTL?void 0:c.isRTL(u.floating)),N=p||(w||!v?[B(l)]:function(e){const t=B(e);return[F(e),t,F(t)]}(l)),A="none"!==g;!p&&A&&N.push(...z(l,v,g,k));const j=[l,...N],E=await Y(t,b),P=[];let M=(null==(r=s.flip)?void 0:r.overflows)||[];if(h&&P.push(E[y]),f){const e=function(e,t,n){void 0===n&&(n=!1);const r=C(e),a=R(e),i=L(a);let s="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=B(s)),[s,B(s)]}(i,o,k);P.push(E[e[0]],E[e[1]])}if(M=[...M,{placement:i,overflows:P}],!P.every(e=>e<=0)){var O,D;const e=((null==(O=s.flip)?void 0:O.index)||0)+1,t=j[e];if(t){if(!("alignment"===f&&x!==T(t))||M.every(e=>T(e.placement)!==x||e.overflows[0]>0))return{data:{index:e,overflows:M},reset:{placement:t}}}let n=null==(D=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:D.placement;if(!n)switch(m){case"bestFit":{var I;const e=null==(I=M.filter(e=>{if(A){const t=T(e.placement);return t===x||"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&&(n=e);break}case"initialPlacement":n=l}if(i!==n)return{reset:{placement:n}}}return{}}}},Ge=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:s,rects:o,platform:l,elements:c}=t,u=_(e,t),{apply:d=()=>{}}=u,h=(0,a.A)(u,G),f=await Y(t,h),p=S(s),m=C(s),g="y"===T(s),{width:v,height:x}=o.floating;let w,k;"top"===p||"bottom"===p?(w=p,k=m===(await(null==l.isRTL?void 0:l.isRTL(c.floating))?"start":"end")?"left":"right"):(k=p,w="end"===m?"top":"bottom");const N=x-f.top-f.bottom,A=v-f.left-f.right,j=b(x-f[w],N),E=b(v-f[k],A),L=!t.middlewareData.shift;let P=j,R=E;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(R=A),null!=(i=t.middlewareData.shift)&&i.enabled.y&&(P=N),L&&!m){const e=y(f.left,0),t=y(f.right,0),n=y(f.top,0),r=y(f.bottom,0);g?R=v-2*(0!==e||0!==t?e+t:y(f.left,f.right)):P=x-2*(0!==n||0!==r?n+r:y(f.top,f.bottom))}await d((0,r.A)((0,r.A)({},t),{},{availableWidth:R,availableHeight:P}));const F=await l.getDimensions(c.floating);return v!==F.width||x!==F.height?{reset:{rects:!0}}:{}}}},$e=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,i=_(e,t),{strategy:s="referenceHidden"}=i,o=(0,a.A)(i,H);switch(s){case"referenceHidden":{const e=K(await Y(t,(0,r.A)((0,r.A)({},o),{},{elementContext:"reference"})),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:X(e)}}}case"escaped":{const e=K(await Y(t,(0,r.A)((0,r.A)({},o),{},{altBoundary:!0})),n.floating);return{data:{escapedOffsets:e,escaped:X(e)}}}default:return{}}}}},Ye=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:a,placement:i,rects:s,platform:o,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=_(e,t)||{};if(null==u)return{};const h=q(d),f={x:n,y:a},p=R(i),m=L(p),g=await o.getDimensions(u),v="y"===p,y=v?"top":"left",x=v?"bottom":"right",w=v?"clientHeight":"clientWidth",k=s.reference[m]+s.reference[p]-f[p]-s.floating[m],N=f[p]-s.reference[p],A=await(null==o.getOffsetParent?void 0:o.getOffsetParent(u));let S=A?A[w]:0;S&&await(null==o.isElement?void 0:o.isElement(A))||(S=l.floating[w]||s.floating[m]);const E=k/2-N/2,P=S/2-g[m]/2-1,T=b(h[y],P),F=b(h[x],P),M=T,O=S-g[m]-F,D=S/2-g[m]/2+E,I=j(M,D,O),z=!c.arrow&&null!=C(i)&&D!==I&&s.reference[m]/2-(D<M?T:F)-g[m]/2<0,B=z?D<M?D-M:D-O:0;return{[p]:f[p]+B,data:(0,r.A)({[p]:I,centerOffset:D-I-B},z&&{alignmentOffset:B}),reset:z}}}),Ke=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:a,placement:i,rects:s,middlewareData:o}=t,{offset:l=0,mainAxis:c=!0,crossAxis:u=!0}=_(e,t),d={x:n,y:a},h=T(i),f=E(h);let p=d[f],m=d[h];const g=_(l,t),v="number"===typeof g?{mainAxis:g,crossAxis:0}:(0,r.A)({mainAxis:0,crossAxis:0},g);if(c){const e="y"===f?"height":"width",t=s.reference[f]-s.floating[e]+v.mainAxis,n=s.reference[f]+s.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var b,y;const e="y"===f?"width":"height",t=Z.has(S(i)),n=s.reference[h]-s.floating[e]+(t&&(null==(b=o.offset)?void 0:b[h])||0)+(t?0:v.crossAxis),r=s.reference[h]+s.reference[e]+(t?0:(null==(y=o.offset)?void 0:y[h])||0)-(t?v.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[h]:m}}}},Xe=(e,t,n)=>{const a=new Map,i=(0,r.A)({platform:Be},n),s=(0,r.A)((0,r.A)({},i.platform),{},{_c:a});return(async(e,t,n)=>{const{placement:a="bottom",strategy:i="absolute",middleware:s=[],platform:o}
2=n,l=s.filter(Boolean),c=await(null==o.isRTL?void 0:o.isRTL(t));let u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=$(u,a,c),f=a,p={},m=0;for(let g=0;g<l.length;g++){const{name:n,fn:s}=l[g],{x:v,y:b,data:y,reset:x}=await s({x:d,y:h,initialPlacement:a,placement:f,strategy:i,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});d=null!=v?v:d,h=null!=b?b:h,p=(0,r.A)((0,r.A)({},p),{},{[n]:(0,r.A)((0,r.A)({},p[n]),y)}),x&&m<=50&&(m++,"object"===typeof x&&(x.placement&&(f=x.placement),x.rects&&(u=!0===x.rects?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),({x:d,y:h}=$(u,f,c))),g=-1)}return{x:d,y:h,placement:f,strategy:i,middlewareData:p}})(e,t,(0,r.A)((0,r.A)({},i),{},{platform:s}))};var Ze="undefined"!==typeof document?i.useLayoutEffect:function(){};function Je(e,t){if(e===t)return!0;if(typeof e!==typeof t)return!1;if("function"===typeof e&&e.toString()===t.toString())return!0;let n,r,a;if(e&&t&&"object"===typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Je(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!==r--;){const n=a[r];if(("_owner"!==n||!e.$$typeof)&&!Je(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Qe(e){if("undefined"===typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function et(e,t){const n=Qe(e);return Math.round(t*n)/n}function tt(e){const t=i.useRef(e);return Ze(()=>{t.current=e}),t}const nt=(e,t)=>(0,r.A)((0,r.A)({},He(e)),{},{options:[e,t]}),rt=(e,t)=>(0,r.A)((0,r.A)({},Ke(e)),{},{options:[e,t]}),at=(e,t)=>(0,r.A)((0,r.A)({},We(e)),{},{options:[e,t]}),it=(e,t)=>(0,r.A)((0,r.A)({},Ge(e)),{},{options:[e,t]}),st=(e,t)=>(0,r.A)((0,r.A)({},$e(e)),{},{options:[e,t]}),ot=(e,t)=>(0,r.A)((0,r.A)({},(e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"===typeof e?e(t):e;return n&&(a=n,{}.hasOwnProperty.call(a,"current"))?null!=n.current?Ye({element:n.current,padding:r}).fn(t):{}:n?Ye({element:n,padding:r}).fn(t):{};var a}}))(e)),{},{options:[e,t]});var lt=n(7914),ct=n(579);const ut=["children","width","height"];var dt=i.forwardRef((e,t)=>{const{children:n,width:i=10,height:s=5}=e,o=(0,a.A)(e,ut);return(0,ct.jsx)(lt.sG.svg,(0,r.A)((0,r.A)({},o),{},{ref:t,width:i,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:(0,ct.jsx)("polygon",{points:"0,0 30,0 15,10"})}))});dt.displayName="Arrow";var ht=dt,ft=n(7490),pt=n(503),mt=n(3124);const gt=["__scopePopper","virtualRef"],vt=["__scopePopper","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","onPlaced"],bt=["__scopePopper"];var yt="Popper",[xt,wt]=(0,d.A)(yt),[kt,Nt]=xt(yt),At=e=>{const{__scopePopper:t,children:n}=e,[r,a]=i.useState(null);return(0,ct.jsx)(kt,{scope:t,anchor:r,onAnchorChange:a,children:n})};At.displayName=yt;var jt="PopperAnchor",_t=i.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:s}=e,o=(0,a.A)(e,gt),l=Nt(jt,n),c=i.useRef(null),d=(0,u.s)(t,c),h=i.useRef(null);return i.useEffect(()=>{const e=h.current;h.current=(null===s||void 0===s?void 0:s.current)||c.current,e!==h.current&&l.onAnchorChange(h.current)}),s?null:(0,ct.jsx)(lt.sG.div,(0,r.A)((0,r.A)({},o),{},{ref:d}))});_t.displayName=jt;var St="PopperContent",[Ct,Et]=xt(St),Lt=i.forwardRef((e,t)=>{var n,o,l,c,d,h,f,p;const{__scopePopper:m,side:g="bottom",sideOffset:v=0,align:b="center",alignOffset:y=0,arrowPadding:x=0,avoidCollisions:w=!0,collisionBoundary:k=[],collisionPadding:N=0,sticky:A="partial",hideWhenDetached:j=!1,updatePositionStrategy:_="optimized",onPlaced:S}=e,C=(0,a.A)(e,vt),E=Nt(St,m),[L,P]=i.useState(null),T=(0,u.s)(t,e=>P(e)),[R,F]=i.useState(null),M=(0,mt.X)(R),O=null!==(n=null===M||void 0===M?void 0:M.width)&&void 0!==n?n:0,D=null!==(o=null===M||void 0===M?void 0:M.height)&&void 0!==o?o:0,I=g+("center"!==b?"-"+b:""),z="number"===typeof N?N:(0,r.A)({top:0,right:0,bottom:0,left:0},N),B=Array.isArray(k)?k:[k],q=B.length>0,U={padding:z,boundary:B.filter(Ft),altBoundary:q},{refs:V,floatingStyles:H,placement:W,isPositioned:G,middlewareData:$}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:a=[],platform:o,elements:{reference:l,floating:c}={},transform:u=!0,whileElementsMounted:d,open:h}=e,[f,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=i.useState(a);Je(m,a)||g(a);const[v,b]=i.useState(null),[y,x]=i.useState(null),w=i.useCallback(e=>
2{e!==j.current&&(j.current=e,b(e))},[]),k=i.useCallback(e=>{e!==_.current&&(_.current=e,x(e))},[]),N=l||v,A=c||y,j=i.useRef(null),_=i.useRef(null),S=i.useRef(f),C=null!=d,E=tt(d),L=tt(o),P=tt(h),T=i.useCallback(()=>{if(!j.current||!_.current)return;const e={placement:t,strategy:n,middleware:m};L.current&&(e.platform=L.current),Xe(j.current,_.current,e).then(e=>{const t=(0,r.A)((0,r.A)({},e),{},{isPositioned:!1!==P.current});R.current&&!Je(S.current,t)&&(S.current=t,s.flushSync(()=>{p(t)}))})},[m,t,n,L,P]);Ze(()=>{!1===h&&S.current.isPositioned&&(S.current.isPositioned=!1,p(e=>(0,r.A)((0,r.A)({},e),{},{isPositioned:!1})))},[h]);const R=i.useRef(!1);Ze(()=>(R.current=!0,()=>{R.current=!1}),[]),Ze(()=>{if(N&&(j.current=N),A&&(_.current=A),N&&A){if(E.current)return E.current(N,A,T);T()}},[N,A,T,E,C]);const F=i.useMemo(()=>({reference:j,floating:_,setReference:w,setFloating:k}),[w,k]),M=i.useMemo(()=>({reference:N,floating:A}),[N,A]),O=i.useMemo(()=>{const e={position:n,left:0,top:0};if(!M.floating)return e;const t=et(M.floating,f.x),a=et(M.floating,f.y);return u?(0,r.A)((0,r.A)({},e),{},{transform:"translate("+t+"px, "+a+"px)"},Qe(M.floating)>=1.5&&{willChange:"transform"}):{position:n,left:t,top:a}},[n,u,M.floating,f.x,f.y]);return i.useMemo(()=>(0,r.A)((0,r.A)({},f),{},{update:T,refs:F,elements:M,floatingStyles:O}),[f,T,F,M,O])}({strategy:"fixed",placement:I,whileElementsMounted:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ue(...t,{animationFrame:"always"===_})},elements:{reference:E.anchor},middleware:[(Y={mainAxis:v+D,alignmentAxis:y},(0,r.A)((0,r.A)({},Ve(Y)),{},{options:[Y,K]})),w&&nt((0,r.A)({mainAxis:!0,crossAxis:!1,limiter:"partial"===A?rt():void 0},U)),w&&at((0,r.A)({},U)),it((0,r.A)((0,r.A)({},U),{},{apply:e=>{let{elements:t,rects:n,availableWidth:r,availableHeight:a}=e;const{width:i,height:s}=n.reference,o=t.floating.style;o.setProperty("--radix-popper-available-width","".concat(r,"px")),o.setProperty("--radix-popper-available-height","".concat(a,"px")),o.setProperty("--radix-popper-anchor-width","".concat(i,"px")),o.setProperty("--radix-popper-anchor-height","".concat(s,"px"))}})),R&&ot({element:R,padding:x}),Mt({arrowWidth:O,arrowHeight:D}),j&&st((0,r.A)({strategy:"referenceHidden"},U))]});var Y,K;const[X,Z]=Ot(W),J=(0,ft.c)(S);(0,pt.N)(()=>{G&&(null===J||void 0===J||J())},[G,J]);const Q=null===(l=$.arrow)||void 0===l?void 0:l.x,ee=null===(c=$.arrow)||void 0===c?void 0:c.y,te=0!==(null===(d=$.arrow)||void 0===d?void 0:d.centerOffset),[ne,re]=i.useState();return(0,pt.N)(()=>{L&&re(window.getComputedStyle(L).zIndex)},[L]),(0,ct.jsx)("div",{ref:V.setFloating,"data-radix-popper-content-wrapper":"",style:(0,r.A)((0,r.A)({},H),{},{transform:G?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ne,"--radix-popper-transform-origin":[null===(h=$.transformOrigin)||void 0===h?void 0:h.x,null===(f=$.transformOrigin)||void 0===f?void 0:f.y].join(" ")},(null===(p=$.hide)||void 0===p?void 0:p.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}),dir:e.dir,children:(0,ct.jsx)(Ct,{scope:m,placedSide:X,onArrowChange:F,arrowX:Q,arrowY:ee,shouldHideArrow:te,children:(0,ct.jsx)(lt.sG.div,(0,r.A)((0,r.A)({"data-side":X,"data-align":Z},C),{},{ref:T,style:(0,r.A)((0,r.A)({},C.style),{},{animation:G?void 0:"none"})}))})})});Lt.displayName=St;var Pt="PopperArrow",Tt={top:"bottom",right:"left",bottom:"top",left:"right"},Rt=i.forwardRef(function(e,t){const{__scopePopper:n}=e,i=(0,a.A)(e,bt),s=Et(Pt,n),o=Tt[s.placedSide];return(0,ct.jsx)("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[o]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:(0,ct.jsx)(ht,(0,r.A)((0,r.A)({},i),{},{ref:t,style:(0,r.A)((0,r.A)({},i.style),{},{display:"block"})}))})});function Ft(e){return null!==e}Rt.displayName=Pt;var Mt=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a,i,s;const{placement:o,rects:l,middlewareData:c}=t,u=0!==(null===(n=c.arrow)||void 0===n?void 0:n.centerOffset),d=u?0:e.arrowWidth,h=u?0:e.arrowHeight,[f,p]=Ot(o),m={start:"0%",center:"50%",end:"100%"}[p],g=(null!==(r=null===(a=c.arrow)||void 0===a?void 0:a.x)&&void 0!==r?r:0)+d/2,v=(null!==(i=null===(s=c.arrow)||void 0===s?void 0:s.y)&&void 0!==i?i:0)+h/2;let b="",y="";return"bottom"===f?(b=u?m:"".concat(g,"px"),y="".concat(-h,"px")):"top"===f?(b=u?m:"".concat(g,"px"),y="".concat(l.floating.height+h,"px")):"right"===f?(b="".concat(-h,"px"),y=u?m:"".concat(v,"px")):"left"===f&&(b="".concat(l.floating.width+h,"px"),y=u?m:"".concat(v,"px")),{data:{x:b,y:y}}}});function Ot(e){const[t,n="center"]=e.split("-");return[t,n]}var Dt=At,It=_t,zt=Lt,Bt=Rt,qt=n(3321);const Ut=["children"],Vt=["children"];
2function Ht(e){const t=Wt(e),n=i.forwardRef((e,n)=>{const{children:s}=e,o=(0,a.A)(e,Ut),l=i.Children.toArray(s),c=l.find($t);if(c){const e=c.props.children,a=l.map(t=>t===c?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return(0,ct.jsx)(t,(0,r.A)((0,r.A)({},o),{},{ref:n,children:i.isValidElement(e)?i.cloneElement(e,void 0,a):null}))}return(0,ct.jsx)(t,(0,r.A)((0,r.A)({},o),{},{ref:n,children:s}))});return n.displayName="".concat(e,".Slot"),n}function Wt(e){const t=i.forwardRef((e,t)=>{const{children:n}=e,s=(0,a.A)(e,Vt);if(i.isValidElement(n)){const e=function(e){var t,n;let r=null===(t=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===t?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null===(n=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===n?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n=(0,r.A)({},t);for(const a in t){const i=e[a],s=t[a];/^on[A-Z]/.test(a)?i&&s?n[a]=function(){const e=s(...arguments);return i(...arguments),e}:i&&(n[a]=i):"style"===a?n[a]=(0,r.A)((0,r.A)({},i),s):"className"===a&&(n[a]=[i,s].filter(Boolean).join(" "))}return(0,r.A)((0,r.A)({},e),n)}(s,n.props);return n.type!==i.Fragment&&(a.ref=t?(0,u.t)(t,e):e),i.cloneElement(n,a)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}var Gt=Symbol("radix.slottable");function $t(e){return i.isValidElement(e)&&"function"===typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Gt}var Yt=n(3642),Kt=n(3168),Xt=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"}),Zt=i.forwardRef((e,t)=>(0,ct.jsx)(lt.sG.span,(0,r.A)((0,r.A)({},e),{},{ref:t,style:(0,r.A)((0,r.A)({},Xt),e.style)})));Zt.displayName="VisuallyHidden";var Jt=n(5754),Qt=n(1672);const en=["__scopeSelect","disabled"],tn=["__scopeSelect","className","style","children","placeholder"],nn=["__scopeSelect","children"],rn=["__scopeSelect","position","onCloseAutoFocus","onEscapeKeyDown","onPointerDownOutside","side","sideOffset","align","alignOffset","arrowPadding","collisionBoundary","collisionPadding","sticky","hideWhenDetached","avoidCollisions"],an=["__scopeSelect","onPlaced"],sn=["__scopeSelect","align","collisionPadding"],on=["__scopeSelect","nonce"],ln=["__scopeSelect"],cn=["__scopeSelect"],un=["__scopeSelect","value","disabled","textValue"],dn=["__scopeSelect","className","style"],hn=["__scopeSelect"],fn=["__scopeSelect","onAutoScroll"],pn=["__scopeSelect"],mn=["__scopeSelect"],gn=["__scopeSelect","value"];var vn=[" ","Enter","ArrowUp","ArrowDown"],bn=[" ","Enter"],yn="Select",[xn,wn,kn]=(0,c.N)(yn),[Nn,An]=(0,d.A)(yn,[kn,wt]),jn=wt(),[_n,Sn]=Nn(yn),[Cn,En]=Nn(yn),Ln=e=>{const{__scopeSelect:t,children:n,open:a,defaultOpen:s,onOpenChange:o,value:l,defaultValue:c,onValueChange:u,dir:d,name:f,autoComplete:p,disabled:m,required:v,form:b}=e,y=jn(t),[x,w]=i.useState(null),[k,N]=i.useState(null),[A,j]=i.useState(!1),_=(0,h.jH)(d),[S,C]=(0,Yt.i)({prop:a,defaultProp:null!==s&&void 0!==s&&s,onChange:o,caller:yn}),[E,L]=(0,Yt.i)({prop:l,defaultProp:c,onChange:u,caller:yn}),P=i.useRef(null),T=!x||(b||!!x.closest("form")),[R,F]=i.useState(new Set),M=Array.from(R).map(e=>e.props.value).join(";");return(0,ct.jsx)(Dt,(0,r.A)((0,r.A)({},y),{},{children:(0,ct.jsxs)(_n,{required:v,scope:t,trigger:x,onTriggerChange:w,valueNode:k,onValueNodeChange:N,valueNodeHasChildren:A,onValueNodeHasChildrenChange:j,contentId:(0,g.B)(),value:E,onValueChange:L,open:S,onOpenChange:C,dir:_,triggerPointerDownPosRef:P,disabled:m,children:[(0,ct.jsx)(xn.Provider,{scope:t,children:(0,ct.jsx)(Cn,{scope:e.__scopeSelect,onNativeOptionAdd:i.useCallback(e=>{F(t=>new Set(t).add(e))},[]),onNativeOptionRemove:i.useCallback(e=>{F(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:n})}),T?(0,ct.jsxs)(br,{"aria-hidden":!0,required:v,tabIndex:-1,name:f,autoComplete:p,value:E,onChange:e=>L(e.target.value),disabled:m,form:b,children:[void 0===E?(0,ct.jsx)("option",{value:""}):null,Array.from(R)]},M):null]})}))};Ln.displayName=yn;var Pn="SelectTrigger",Tn=i.forwardRef((e,t)=>
2{const{__scopeSelect:n,disabled:s=!1}=e,o=(0,a.A)(e,en),c=jn(n),d=Sn(Pn,n),h=d.disabled||s,f=(0,u.s)(t,d.onTriggerChange),p=wn(n),m=i.useRef("touch"),[g,v,b]=xr(e=>{const t=p().filter(e=>!e.disabled),n=t.find(e=>e.value===d.value),r=wr(t,e,n);void 0!==r&&d.onValueChange(r.value)}),y=e=>{h||(d.onOpenChange(!0),b()),e&&(d.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,ct.jsx)(It,(0,r.A)((0,r.A)({asChild:!0},c),{},{children:(0,ct.jsx)(lt.sG.button,(0,r.A)((0,r.A)({type:"button",role:"combobox","aria-controls":d.contentId,"aria-expanded":d.open,"aria-required":d.required,"aria-autocomplete":"none",dir:d.dir,"data-state":d.open?"open":"closed",disabled:h,"data-disabled":h?"":void 0,"data-placeholder":yr(d.value)?"":void 0},o),{},{ref:f,onClick:(0,l.mK)(o.onClick,e=>{e.currentTarget.focus(),"mouse"!==m.current&&y(e)}),onPointerDown:(0,l.mK)(o.onPointerDown,e=>{m.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(y(e),e.preventDefault())}),onKeyDown:(0,l.mK)(o.onKeyDown,e=>{const t=""!==g.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||v(e.key),t&&" "===e.key||vn.includes(e.key)&&(y(),e.preventDefault())})}))}))});Tn.displayName=Pn;var Rn="SelectValue",Fn=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:i,style:s,children:o,placeholder:l=""}=e,c=(0,a.A)(e,tn),d=Sn(Rn,n),{onValueNodeHasChildrenChange:h}=d,f=void 0!==o,p=(0,u.s)(t,d.onValueNodeChange);return(0,pt.N)(()=>{h(f)},[h,f]),(0,ct.jsx)(lt.sG.span,(0,r.A)((0,r.A)({},c),{},{ref:p,style:{pointerEvents:"none"},children:yr(d.value)?(0,ct.jsx)(ct.Fragment,{children:l}):o}))});Fn.displayName=Rn;var Mn=i.forwardRef((e,t)=>{const{__scopeSelect:n,children:i}=e,s=(0,a.A)(e,nn);return(0,ct.jsx)(lt.sG.span,(0,r.A)((0,r.A)({"aria-hidden":!0},s),{},{ref:t,children:i||"\u25bc"}))});Mn.displayName="SelectIcon";var On=e=>(0,ct.jsx)(qt.Z,(0,r.A)({asChild:!0},e));On.displayName="SelectPortal";var Dn="SelectContent",In=i.forwardRef((e,t)=>{const n=Sn(Dn,e.__scopeSelect),[a,o]=i.useState();
2if((0,pt.N)(()=>{o(new DocumentFragment)},[]),!n.open){const t=a;return t?s.createPortal((0,ct.jsx)(Bn,{scope:e.__scopeSelect,children:(0,ct.jsx)(xn.Slot,{scope:e.__scopeSelect,children:(0,ct.jsx)("div",{children:e.children})})}),t):null}return(0,ct.jsx)(Vn,(0,r.A)((0,r.A)({},e),{},{ref:t}))});In.displayName=Dn;var zn=10,[Bn,qn]=Nn(Dn),Un=Ht("SelectContent.RemoveScroll"),Vn=i.forwardRef((e,t)=>{const{__scopeSelect:n,position:s="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:c,onPointerDownOutside:d,side:h,sideOffset:g,align:v,alignOffset:b,arrowPadding:y,collisionBoundary:x,collisionPadding:w,sticky:k,hideWhenDetached:N,avoidCollisions:A}=e,j=(0,a.A)(e,rn),_=Sn(Dn,n),[S,C]=i.useState(null),[E,L]=i.useState(null),P=(0,u.s)(t,e=>C(e)),[T,R]=i.useState(null),[F,M]=i.useState(null),O=wn(n),[D,I]=i.useState(!1),z=i.useRef(!1);i.useEffect(()=>{if(S)return(0,Jt.Eq)(S)},[S]),(0,p.Oh)();const B=i.useCallback(e=>{const[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),a=document.activeElement;for(const i of e){if(i===a)return;if(null===i||void 0===i||i.scrollIntoView({block:"nearest"}),i===t&&E&&(E.scrollTop=0),i===r&&E&&(E.scrollTop=E.scrollHeight),null===i||void 0===i||i.focus(),document.activeElement!==a)return}},[O,E]),q=i.useCallback(()=>B([T,S]),[B,T,S]);i.useEffect(()=>{D&&q()},[D,q]);const{onOpenChange:U,triggerPointerDownPosRef:V}=_;i.useEffect(()=>{if(S){let e={x:0,y:0};const t=t=>{var n,r,a,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=V.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(a=null===(i=V.current)||void 0===i?void 0:i.y)&&void 0!==a?a:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():S.contains(n.target)||U(!1),document.removeEventListener("pointermove",t),V.current=null};return null!==V.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[S,U,V]),i.useEffect(()=>{const e=()=>U(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[U]);const[H,W]=xr(e=>{const t=O().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=wr(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),G=i.useCallback((e,t,n)=>{const r=!z.current&&!n;(void 0!==_.value&&_.value===t||r)&&(R(e),r&&(z.current=!0))},[_.value]),$=i.useCallback(()=>null===S||void 0===S?void 0:S.focus(),[S]),Y=i.useCallback((e,t,n)=>{const r=!z.current&&!n;(void 0!==_.value&&_.value===t||r)&&M(e)},[_.value]),K="popper"===s?Wn:Hn,X=K===Wn?{side:h,sideOffset:g,align:v,alignOffset:b,arrowPadding:y,collisionBoundary:x,collisionPadding:w,sticky:k,hideWhenDetached:N,avoidCollisions:A}:{};return(0,ct.jsx)(Bn,{scope:n,content:S,viewport:E,onViewportChange:L,itemRefCallback:G,selectedItem:T,onItemLeave:$,itemTextRefCallback:Y,focusSelectedItem:q,selectedItemText:F,position:s,isPositioned:D,searchRef:H,children:(0,ct.jsx)(Qt.A,{as:Un,allowPinchZoom:!0,children:(0,ct.jsx)(m.n,{asChild:!0,trapped:_.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:(0,l.mK)(o,e=>{var t;null===(t=_.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}),children:(0,ct.jsx)(f.qW,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:(0,ct.jsx)(K,(0,r.A)((0,r.A)((0,r.A)({role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:e=>e.preventDefault()},j),X),{},{onPlaced:()=>I(!0),ref:P,style:(0,r.A)({display:"flex",flexDirection:"column",outline:"none"},j.style),onKeyDown:(0,l.mK)(j.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||W(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.ke
2y)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>B(t)),e.preventDefault()}})}))})})})})});Vn.displayName="SelectContentImpl";var Hn=i.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:s}=e,l=(0,a.A)(e,an),c=Sn(Dn,n),d=qn(Dn,n),[h,f]=i.useState(null),[p,m]=i.useState(null),g=(0,u.s)(t,e=>m(e)),v=wn(n),b=i.useRef(!1),y=i.useRef(!0),{viewport:x,selectedItem:w,selectedItemText:k,focusSelectedItem:N}=d,A=i.useCallback(()=>{if(c.trigger&&c.valueNode&&h&&p&&x&&w&&k){const e=c.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),n=c.valueNode.getBoundingClientRect(),r=k.getBoundingClientRect();if("rtl"!==c.dir){const a=r.left-t.left,i=n.left-a,s=e.left-i,l=e.width+s,c=Math.max(l,t.width),u=window.innerWidth-zn,d=o(i,[zn,Math.max(zn,u-c)]);h.style.minWidth=l+"px",h.style.left=d+"px"}else{const a=t.right-r.right,i=window.innerWidth-n.right-a,s=window.innerWidth-e.right-i,l=e.width+s,c=Math.max(l,t.width),u=window.innerWidth-zn,d=o(i,[zn,Math.max(zn,u-c)]);h.style.minWidth=l+"px",h.style.right=d+"px"}const a=v(),i=window.innerHeight-2*zn,l=x.scrollHeight,u=window.getComputedStyle(p),d=parseInt(u.borderTopWidth,10),f=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),g=d+f+l+parseInt(u.paddingBottom,10)+m,y=Math.min(5*w.offsetHeight,g),N=window.getComputedStyle(x),A=parseInt(N.paddingTop,10),j=parseInt(N.paddingBottom,10),_=e.top+e.height/2-zn,S=i-_,C=w.offsetHeight/2,E=d+f+(w.offsetTop+C),L=g-E;if(E<=_){const e=a.length>0&&w===a[a.length-1].ref.current;h.style.bottom="0px";const t=p.clientHeight-x.offsetTop-x.offsetHeight,n=E+Math.max(S,C+(e?j:0)+t+m);h.style.height=n+"px"}else{const e=a.length>0&&w===a[0].ref.current;h.style.top="0px";const t=Math.max(_,d+x.offsetTop+(e?A:0)+C)+L;h.style.height=t+"px",x.scrollTop=E-_+x.offsetTop}h.style.margin="".concat(zn,"px 0"),h.style.minHeight=y+"px",h.style.maxHeight=i+"px",null===s||void 0===s||s(),requestAnimationFrame(()=>b.current=!0)}},[v,c.trigger,c.valueNode,h,p,x,w,k,c.dir,s]);(0,pt.N)(()=>A(),[A]);const[j,_]=i.useState();(0,pt.N)(()=>{p&&_(window.getComputedStyle(p).zIndex)},[p]);const S=i.useCallback(e=>{e&&!0===y.current&&(A(),null===N||void 0===N||N(),y.current=!1)},[A,N]);return(0,ct.jsx)(Gn,{scope:n,contentWrapper:h,shouldExpandOnScrollRef:b,onScrollButtonChange:S,children:(0,ct.jsx)("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:j},children:(0,ct.jsx)(lt.sG.div,(0,r.A)((0,r.A)({},l),{},{ref:g,style:(0,r.A)({boxSizing:"border-box",maxHeight:"100%"},l.style)}))})})});Hn.displayName="SelectItemAlignedPosition";var Wn=i.forwardRef((e,t)=>{const{__scopeSelect:n,align:i="start",collisionPadding:s=zn}=e,o=(0,a.A)(e,sn),l=jn(n);return(0,ct.jsx)(zt,(0,r.A)((0,r.A)((0,r.A)({},l),o),{},{ref:t,align:i,collisionPadding:s,style:(0,r.A)((0,r.A)({boxSizing:"border-box"},o.style),{"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"})}))});Wn.displayName="SelectPopperPosition";var[Gn,$n]=Nn(Dn,{}),Yn="SelectViewport",Kn=i.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:s}=e,o=(0,a.A)(e,on),c=qn(Yn,n),d=$n(Yn,n),h=(0,u.s)(t,c.onViewportChange),f=i.useRef(0);return(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),(0,ct.jsx)(xn.Slot,{scope:n,children:(0,ct.jsx)(lt.sG.div,(0,r.A)((0,r.A)({"data-radix-select-viewport":"",role:"presentation"},o),{},{ref:h,style:(0,r.A)({position:"relative",flex:1,overflow:"hidden auto"},o.style),onScroll:(0,l.mK)(o.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=d;if(null!==r&&void 0!==r&&r.current&&n){const e=Math.abs(f.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*zn,a=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),s=Math.max(a,i);if(s<r){const a=s+e,i=Math.min(r,a),o=a-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=o>0?o:0,n.style.justifyContent="flex-end")}}}f.current=t.scrollTop})}))})]})});Kn.displayName=Yn;var Xn="SelectGroup",[Zn,Jn]=Nn(Xn),Qn=i.forwardRef((e,t)=>
2{const{__scopeSelect:n}=e,i=(0,a.A)(e,ln),s=(0,g.B)();return(0,ct.jsx)(Zn,{scope:n,id:s,children:(0,ct.jsx)(lt.sG.div,(0,r.A)((0,r.A)({role:"group","aria-labelledby":s},i),{},{ref:t}))})});Qn.displayName=Xn;var er="SelectLabel",tr=i.forwardRef((e,t)=>{const{__scopeSelect:n}=e,i=(0,a.A)(e,cn),s=Jn(er,n);return(0,ct.jsx)(lt.sG.div,(0,r.A)((0,r.A)({id:s.id},i),{},{ref:t}))});tr.displayName=er;var nr="SelectItem",[rr,ar]=Nn(nr),ir=i.forwardRef((e,t)=>{const{__scopeSelect:n,value:s,disabled:o=!1,textValue:c}=e,d=(0,a.A)(e,un),h=Sn(nr,n),f=qn(nr,n),p=h.value===s,[m,v]=i.useState(null!==c&&void 0!==c?c:""),[b,y]=i.useState(!1),x=(0,u.s)(t,e=>{var t;return null===(t=f.itemRefCallback)||void 0===t?void 0:t.call(f,e,s,o)}),w=(0,g.B)(),k=i.useRef("touch"),N=()=>{o||(h.onValueChange(s),h.onOpenChange(!1))};if(""===s)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return(0,ct.jsx)(rr,{scope:n,value:s,disabled:o,textId:w,isSelected:p,onItemTextChange:i.useCallback(e=>{v(t=>{var n;return t||(null!==(n=null===e||void 0===e?void 0:e.textContent)&&void 0!==n?n:"").trim()})},[]),children:(0,ct.jsx)(xn.ItemSlot,{scope:n,value:s,disabled:o,textValue:m,children:(0,ct.jsx)(lt.sG.div,(0,r.A)((0,r.A)({role:"option","aria-labelledby":w,"data-highlighted":b?"":void 0,"aria-selected":p&&b,"data-state":p?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},d),{},{ref:x,onFocus:(0,l.mK)(d.onFocus,()=>y(!0)),onBlur:(0,l.mK)(d.onBlur,()=>y(!1)),onClick:(0,l.mK)(d.onClick,()=>{"mouse"!==k.current&&N()}),onPointerUp:(0,l.mK)(d.onPointerUp,()=>{"mouse"===k.current&&N()}),onPointerDown:(0,l.mK)(d.onPointerDown,e=>{k.current=e.pointerType}),onPointerMove:(0,l.mK)(d.onPointerMove,e=>{var t;(k.current=e.pointerType,o)?null===(t=f.onItemLeave)||void 0===t||t.call(f):"mouse"===k.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:(0,l.mK)(d.onPointerLeave,e=>{var t;e.currentTarget===document.activeElement&&(null===(t=f.onItemLeave)||void 0===t||t.call(f))}),onKeyDown:(0,l.mK)(d.onKeyDown,e=>{var t;""!==(null===(t=f.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(bn.includes(e.key)&&N()," "===e.key&&e.preventDefault())})}))})})});ir.displayName=nr;var sr="SelectItemText",or=i.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:l}=e,c=(0,a.A)(e,dn),d=Sn(sr,n),h=qn(sr,n),f=ar(sr,n),p=En(sr,n),[m,g]=i.useState(null),v=(0,u.s)(t,e=>g(e),f.onItemTextChange,e=>{var t;return null===(t=h.itemTextRefCallback)||void 0===t?void 0:t.call(h,e,f.value,f.disabled)}),b=null===m||void 0===m?void 0:m.textContent,y=i.useMemo(()=>(0,ct.jsx)("option",{value:f.value,disabled:f.disabled,children:b},f.value),[f.disabled,f.value,b]),{onNativeOptionAdd:x,onNativeOptionRemove:w}=p;return(0,pt.N)(()=>(x(y),()=>w(y)),[x,w,y]),(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(lt.sG.span,(0,r.A)((0,r.A)({id:f.textId},c),{},{ref:v})),f.isSelected&&d.valueNode&&!d.valueNodeHasChildren?s.createPortal(c.children,d.valueNode):null]})});or.displayName=sr;var lr="SelectItemIndicator",cr=i.forwardRef((e,t)=>{const{__scopeSelect:n}=e,i=(0,a.A)(e,hn);return ar(lr,n).isSelected?(0,ct.jsx)(lt.sG.span,(0,r.A)((0,r.A)({"aria-hidden":!0},i),{},{ref:t})):null});cr.displayName=lr;var ur="SelectScrollUpButton",dr=i.forwardRef((e,t)=>{const n=qn(ur,e.__scopeSelect),a=$n(ur,e.__scopeSelect),[s,o]=i.useState(!1),l=(0,u.s)(t,a.onScrollButtonChange);return(0,pt.N)(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;o(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),s?(0,ct.jsx)(pr,(0,r.A)((0,r.A)({},e),{},{ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null});dr.displayName=ur;var hr="SelectScrollDownButton",fr=i.forwardRef((e,t)=>{const n=qn(hr,e.__scopeSelect),a=$n(hr,e.__scopeSelect),[s,o]=i.useState(!1),l=(0,u.s)(t,a.onScrollButtonChange);
2return(0,pt.N)(()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;o(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[n.viewport,n.isPositioned]),s?(0,ct.jsx)(pr,(0,r.A)((0,r.A)({},e),{},{ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null});fr.displayName=hr;var pr=i.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:s}=e,o=(0,a.A)(e,fn),c=qn("SelectScrollButton",n),u=i.useRef(null),d=wn(n),h=i.useCallback(()=>{null!==u.current&&(window.clearInterval(u.current),u.current=null)},[]);return i.useEffect(()=>()=>h(),[h]),(0,pt.N)(()=>{var e;const t=d().find(e=>e.ref.current===document.activeElement);null===t||void 0===t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})},[d]),(0,ct.jsx)(lt.sG.div,(0,r.A)((0,r.A)({"aria-hidden":!0},o),{},{ref:t,style:(0,r.A)({flexShrink:0},o.style),onPointerDown:(0,l.mK)(o.onPointerDown,()=>{null===u.current&&(u.current=window.setInterval(s,50))}),onPointerMove:(0,l.mK)(o.onPointerMove,()=>{var e;null===(e=c.onItemLeave)||void 0===e||e.call(c),null===u.current&&(u.current=window.setInterval(s,50))}),onPointerLeave:(0,l.mK)(o.onPointerLeave,()=>{h()})}))}),mr=i.forwardRef((e,t)=>{const{__scopeSelect:n}=e,i=(0,a.A)(e,pn);return(0,ct.jsx)(lt.sG.div,(0,r.A)((0,r.A)({"aria-hidden":!0},i),{},{ref:t}))});mr.displayName="SelectSeparator";var gr="SelectArrow",vr=i.forwardRef((e,t)=>{const{__scopeSelect:n}=e,i=(0,a.A)(e,mn),s=jn(n),o=Sn(gr,n),l=qn(gr,n);return o.open&&"popper"===l.position?(0,ct.jsx)(Bt,(0,r.A)((0,r.A)((0,r.A)({},s),i),{},{ref:t})):null});vr.displayName=gr;var br=i.forwardRef((e,t)=>{let{__scopeSelect:n,value:s}=e,o=(0,a.A)(e,gn);const l=i.useRef(null),c=(0,u.s)(t,l),d=(0,Kt.Z)(s);return i.useEffect(()=>{const e=l.current;if(!e)return;const t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(d!==s&&n){const t=new Event("change",{bubbles:!0});n.call(e,s),e.dispatchEvent(t)}},[d,s]),(0,ct.jsx)(lt.sG.select,(0,r.A)((0,r.A)({},o),{},{style:(0,r.A)((0,r.A)({},Xt),o.style),ref:c,defaultValue:s}))});function yr(e){return""===e||void 0===e}function xr(e){const t=(0,ft.c)(e),n=i.useRef(""),r=i.useRef(0),a=i.useCallback(e=>{const a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout(()=>e(""),1e3))}(a)},[t]),s=i.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return i.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,a,s]}function wr(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let i=(s=e,o=Math.max(a,0),s.map((e,t)=>s[(o+t)%s.length]));var s,o;1===r.length&&(i=i.filter(e=>e!==n));const l=i.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}br.displayName="SelectBubbleInput";var kr=Ln,Nr=Tn,Ar=Fn,jr=Mn,_r=On,Sr=In,Cr=Kn,Er=tr,Lr=ir,Pr=or,Tr=cr,Rr=dr,Fr=fr,Mr=mr,Or=n(7784);const Dr=(0,Or.A)("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Ir=(0,Or.A)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);var zr=n(6210),Br=n(9766);const qr=["className","children"],Ur=["className"],Vr=["className"],Hr=["className","children","position"],Wr=["className"],Gr=["className","children"],$r=["className"],Yr=kr,Kr=Ar,Xr=i.forwardRef((e,t)=>{let{className:n,children:i}=e,s=(0,a.A)(e,qr);return(0,ct.jsxs)(Nr,(0,r.A)((0,r.A)({ref:t,className:(0,Br.cn)("flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",n)},s),{},{children:[i,(0,ct.jsx)(jr,{asChild:!0,children:(0,ct.jsx)(Dr,{className:"h-4 w-4 opacity-50"})})]}))});Xr.displayName=Nr.displayName;const Zr=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,Ur);return(0,ct.jsx)(Rr,(0,r.A)((0,r.A)({ref:t,className:(0,Br.cn)("flex cursor-default items-center justify-center py-1",n)},i),{},{children:(0,ct.jsx)(Ir,{className:"h-4 w-4"})}))});Zr.displayName=Rr.displayName;const Jr=i.forwardRef((e,t)=>
2{let{className:n}=e,i=(0,a.A)(e,Vr);return(0,ct.jsx)(Fr,(0,r.A)((0,r.A)({ref:t,className:(0,Br.cn)("flex cursor-default items-center justify-center py-1",n)},i),{},{children:(0,ct.jsx)(Dr,{className:"h-4 w-4"})}))});Jr.displayName=Fr.displayName;const Qr=i.forwardRef((e,t)=>{let{className:n,children:i,position:s="popper"}=e,o=(0,a.A)(e,Hr);return(0,ct.jsx)(_r,{children:(0,ct.jsxs)(Sr,(0,r.A)((0,r.A)({ref:t,className:(0,Br.cn)("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]","popper"===s&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:s},o),{},{children:[(0,ct.jsx)(Zr,{}),(0,ct.jsx)(Cr,{className:(0,Br.cn)("p-1","popper"===s&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:i}),(0,ct.jsx)(Jr,{})]}))})});Qr.displayName=Sr.displayName;i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,Wr);return(0,ct.jsx)(Er,(0,r.A)({ref:t,className:(0,Br.cn)("px-2 py-1.5 text-sm font-semibold",n)},i))}).displayName=Er.displayName;const ea=i.forwardRef((e,t)=>{let{className:n,children:i}=e,s=(0,a.A)(e,Gr);return(0,ct.jsxs)(Lr,(0,r.A)((0,r.A)({ref:t,className:(0,Br.cn)("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",n)},s),{},{children:[(0,ct.jsx)("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,ct.jsx)(Tr,{children:(0,ct.jsx)(zr.A,{className:"h-4 w-4"})})}),(0,ct.jsx)(Pr,{children:i})]}))});ea.displayName=Lr.displayName;i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,$r);return(0,ct.jsx)(Mr,(0,r.A)({ref:t,className:(0,Br.cn)("-mx-1 my-1 h-px bg-muted",n)},i))}).displayName=Mr.displayName},6210(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},6245(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]])},6328(e,t,n){n.d(t,{l$:()=>S,oR:()=>y});var r=n(9379),a=n(3986),i=n(5043),s=n(7950);const o=["message"];const l=Array(12).fill(0),c=e=>{let{visible:t,className:n}=e;return i.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":t},i.createElement("div",{className:"sonner-spinner"},l.map((e,t)=>i.createElement("div",{className:"sonner-loading-bar",key:"spinner-bar-".concat(t)}))))},u=i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},i.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),d=i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},i.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),h=i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},i.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),f=i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},i.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),p=i.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},i.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),i.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"}));let m=1;const g=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>
2{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n}=e,i=(0,a.A)(e,o),s="number"===typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:m++,l=this.toasts.find(e=>e.id===s),c=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),l?this.toasts=this.toasts.map(t=>t.id===s?(this.publish((0,r.A)((0,r.A)((0,r.A)({},t),e),{},{id:s,title:n})),(0,r.A)((0,r.A)((0,r.A)({},t),e),{},{id:s,dismissible:c,title:n})):t):this.addToast((0,r.A)((0,r.A)({title:n},i),{},{dismissible:c,id:s})),s},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create((0,r.A)((0,r.A)({},t),{},{message:e})),this.error=(e,t)=>this.create((0,r.A)((0,r.A)({},t),{},{message:e,type:"error"})),this.success=(e,t)=>this.create((0,r.A)((0,r.A)({},t),{},{type:"success",message:e})),this.info=(e,t)=>this.create((0,r.A)((0,r.A)({},t),{},{type:"info",message:e})),this.warning=(e,t)=>this.create((0,r.A)((0,r.A)({},t),{},{type:"warning",message:e})),this.loading=(e,t)=>
2this.create((0,r.A)((0,r.A)({},t),{},{type:"loading",message:e})),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create((0,r.A)((0,r.A)({},t),{},{promise:e,type:"loading",message:t.loading,description:"function"!==typeof t.description?t.description:void 0})));const a=Promise.resolve(e instanceof Function?e():e);let s,o=void 0!==n;const l=a.then(async e=>{s=["resolve",e];if(i.isValidElement(e))o=!1,this.create({id:n,type:"default",message:e});else if(v(e)&&!e.ok){o=!1;const a="function"===typeof t.error?await t.error("HTTP error! status: ".concat(e.status)):t.error,s="function"===typeof t.description?await t.description("HTTP error! status: ".concat(e.status)):t.description,l="object"===typeof a&&!i.isValidElement(a)?a:{message:a};this.create((0,r.A)({id:n,type:"error",description:s},l))}else if(e instanceof Error){o=!1;const a="function"===typeof t.error?await t.error(e):t.error,s="function"===typeof t.description?await t.description(e):t.description,l="object"===typeof a&&!i.isValidElement(a)?a:{message:a};this.create((0,r.A)({id:n,type:"error",description:s},l))}else if(void 0!==t.success){o=!1;const a="function"===typeof t.success?await t.success(e):t.success,s="function"===typeof t.description?await t.description(e):t.description,l="object"===typeof a&&!i.isValidElement(a)?a:{message:a};this.create((0,r.A)({id:n,type:"success",description:s},l))}}).catch(async e=>{if(s=["reject",e],void 0!==t.error){o=!1;const a="function"===typeof t.error?await t.error(e):t.error,s="function"===typeof t.description?await t.description(e):t.description,l="object"===typeof a&&!i.isValidElement(a)?a:{message:a};this.create((0,r.A)({id:n,type:"error",description:s},l))}}).finally(()=>{o&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),c=()=>new Promise((e,t)=>l.then(()=>"reject"===s[0]?t(s[1]):e(s[1])).catch(t));return"string"!==typeof n&&"number"!==typeof n?{unwrap:c}:Object.assign(n,{unwrap:c})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||m++;return this.create((0,r.A)({jsx:e(n),id:n},t)),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},v=e=>e&&"object"===typeof e&&"ok"in e&&"boolean"===typeof e.ok&&"status"in e&&"number"===typeof e.status,b=(e,t)=>{const n=(null==t?void 0:t.id)||m++;return g.addToast((0,r.A)((0,r.A)({title:e},t),{},{id:n})),n},y=Object.assign(b,{success:g.success,info:g.info,warning:g.warning,error:g.error,custom:g.custom,message:g.message,promise:g.promise,dismiss:g.dismiss,loading:g.loading},{getHistory:()=>g.toasts,getToasts:()=>g.getActiveToasts()});function x(e){return void 0!==e.label}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}
vendor: 14,864 bytes, line 2
2("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
2const w=3,k=14;function N(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter(Boolean).join(" ")}const A=e=>{var t,n,a,s,o,l,m,g,v;const{invert:b,toast:y,unstyled:w,interacting:k,setHeights:A,visibleToasts:j,heights:_,index:S,toasts:C,expanded:E,removeToast:L,defaultRichColors:P,closeButton:T,style:R,cancelButtonStyle:F,actionButtonStyle:M,className:O="",descriptionClassName:D="",duration:I,position:z,gap:B,expandByDefault:q,classNames:U,icons:V,
vendor: 6,674 bytes, line 2
2closeButtonAriaLabel:H="Close toast"}=e,[W,G]=i.useState(null),[$,Y]=i.useState(null),[K,X]=i.useState(!1),[Z,J]=i.useState(!1),[Q,ee]=i.useState(!1),[te,ne]=i.useState(!1),[re,ae]=i.useState(!1),[ie,se]=i.useState(0),[oe,le]=i.useState(0),ce=i.useRef(y.duration||I||4e3),ue=i.useRef(null),de=i.useRef(null),he=0===S,fe=S+1<=j,pe=y.type,me=!1!==y.dismissible,ge=y.className||"",ve=y.descriptionClassName||"",be=i.useMemo(()=>_.findIndex(e=>e.toastId===y.id)||0,[_,y.id]),ye=i.useMemo(()=>{var e;return null!=(e=y.closeButton)?e:T},[y.closeButton,T]),xe=i.useMemo(()=>y.duration||I||4e3,[y.duration,I]),we=i.useRef(0),ke=i.useRef(0),Ne=i.useRef(0),Ae=i.useRef(null),[je,_e]=z.split("-"),Se=i.useMemo(()=>_.reduce((e,t,n)=>n>=be?e:e+t.height,0),[_,be]),Ce=(()=>{const[e,t]=i.useState(document.hidden);return i.useEffect(()=>{const e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),Ee=y.invert||b,Le="loading"===pe;ke.current=i.useMemo(()=>be*B+Se,[be,Se]),i.useEffect(()=>{ce.current=xe},[xe]),i.useEffect(()=>{X(!0)},[]),i.useEffect(()=>{const e=de.current;if(e){const t=e.getBoundingClientRect().height;return le(t),A(e=>[{toastId:y.id,height:t,position:y.position},...e]),()=>A(e=>e.filter(e=>e.toastId!==y.id))}},[A,y.id]),i.useLayoutEffect(()=>{if(!K)return;const e=de.current,t=e.style.height;e.style.height="auto";const n=e.getBoundingClientRect().height;e.style.height=t,le(n),A(e=>e.find(e=>e.toastId===y.id)?e.map(e=>e.toastId===y.id?(0,r.A)((0,r.A)({},e),{},{height:n}):e):[{toastId:y.id,height:n,position:y.position},...e])},[K,y.title,y.description,A,y.id,y.jsx,y.action,y.cancel]);const Pe=i.useCallback(()=>{J(!0),se(ke.current),A(e=>e.filter(e=>e.toastId!==y.id)),setTimeout(()=>{L(y)},200)},[y,L,A,ke]);i.useEffect(()=>{if(y.promise&&"loading"===pe||y.duration===1/0||"loading"===y.type)return;let e;return E||k||Ce?(()=>{if(Ne.current<we.current){const e=(new Date).getTime()-we.current;ce.current=ce.current-e}Ne.current=(new Date).getTime()})():ce.current!==1/0&&(we.current=(new Date).getTime(),e=setTimeout(()=>{null==y.onAutoClose||y.onAutoClose.call(y,y),Pe()},ce.current)),()=>clearTimeout(e)},[E,k,y,pe,Ce,Pe]),i.useEffect(()=>{y.delete&&(Pe(),null==y.onDismiss||y.onDismiss.call(y,y))},[Pe,y.delete]);const Te=y.icon||(null==V?void 0:V[pe])||(e=>{switch(e){case"success":return u;case"info":return h;case"warning":return d;case"error":return f;default:return null}})(pe);var Re,Fe;return i.createElement("li",{tabIndex:0,ref:de,className:N(O,ge,null==U?void 0:U.toast,null==y||null==(t=y.classNames)?void 0:t.toast,null==U?void 0:U.default,null==U?void 0:U[pe],null==y||null==(n=y.classNames)?void 0:n[pe]),"data-sonner-toast":"","data-rich-colors":null!=(Re=y.richColors)?Re:P,"data-styled":!Boolean(y.jsx||y.unstyled||w),"data-mounted":K,"data-promise":Boolean(y.promise),"data-swiped":re,"data-removed":Z,"data-visible":fe,"data-y-position":je,"data-x-position":_e,"data-index":S,"data-front":he,"data-swiping":Q,"data-dismissible":me,"data-type":pe,"data-invert":Ee,"data-swipe-out":te,"data-swipe-direction":$,"data-expanded":Boolean(E||q&&K),"data-testid":y.testId,style:(0,r.A)((0,r.A)({"--index":S,"--toasts-before":S,"--z-index":C.length-S,"--offset":"".concat(Z?ie:ke.current,"px"),"--initial-height":q?"auto":"".concat(oe,"px")},R),y.style),onDragEnd:()=>{ee(!1),G(null),Ae.current=null},onPointerDown:e=>{2!==e.button&&!Le&&me&&(ue.current=new Date,se(ke.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(ee(!0),Ae.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n;if(te||!me)return;Ae.current=null;const r=Number((null==(e=de.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),a=Number((null==(t=de.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),i=(new Date).getTime()-(null==(n=ue.current)?void 0:n.getTime()),s="x"===W?r:a,o=Math.abs(s)/i;if(Math.abs(s)>=45||o>.11)return se(ke.current),null==y.onDismiss||y.onDismiss.call(y,y),Y("x"===W?r>0?"right":"left":a>0?"down":"up"),Pe(),void ne(!0);var l,c;null==(l=de.current)||l.style.setProperty("--swipe-amount-x","0px"),null==(c=de.current)||c.style.setProperty("--swipe-amount-y","0px"),ae(!1),ee(!1),G(null)},onPointerMove:t=>{var n,r,a;if(!Ae.current||!me)return;if((null==(n=window.getSelection())?void 0:n.toString().length)>0)return;const i=t.clientY-Ae.current.y,s=t.clientX-Ae.current.x;var o;const l=null!=(o=e.swipeDirections)?o:function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(z);!W&&(Math.abs(s)>1||Math.abs(i)>1)&&G(Math.abs(s)>Math.abs(i)?"x":"y");let c={x:0,y:0};const u=e=>1/(1.5+Math.abs(e)/20);if("y"===W){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&i<0||l.includes("bottom")&&i>0)c.y=i;else{const e=i*u(i);c.y=Math.abs(e)<Math.abs(i)?e:i}}else if("x"===W&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&s<0||l.includes("right")&&s>0)c.x=s;else{const e=s*u(s);c.x=Math.abs(e)<Math.abs(s)?e:s}(Math.abs(c.x)>0||Math.abs(c.y)>0)&&ae(!0),null==(r=de.current)||r.style.setProperty("--swipe-amount-x","".concat(c.x,"px")),null==(a=de.current)||a.style.setProperty("--swipe-amount-y","".concat(c.y,"px"))}},ye&&!y.jsx&&"loading"!==pe?i.createElement("button",{"aria-label":H,"data-disabled":Le,"data-close-button":!0,onClick:Le||!me?()=>{}:()=>{Pe(),null==y.onDismiss||y.onDismiss.call(y,y)},className:N(null==U?void 0:U.closeButton,null==y||null==(a=y.classNames)?void 0:a.closeButton)},null!=(Fe=null==V?void 0:V.close)?Fe:p):null,(pe||y.icon||y.promise)&&null!==y.icon&&(null!==(null==V?void 0:V[pe])||y.icon)?i.createElement("div",{"data-icon":"",className:N(null==U?void 0:U.icon,null==y||null==(s=y.classNames)?void 0:s.icon)},y.promise||"loading"===y.type&&!y.icon?y.icon||function(){var e,t;return(null==V?void 0:V.loading)?i.createElement("div",{className:N(null==U?void 0:U.loader,null==y||null==(t=y.classNames)?void 0:t.loader,"sonner-loader"),"data-visible":"loading"===pe},V.loading):i.createElement(c,{className:N(null==U?void 0:U.loader,null==y||null==(e=y.classNames)?void 0:e.loader),visible:"loading"===pe})}():null,"loading"!==y.type?Te:null):null,i.createElement("div",{"data-content":"",className:N(null==U?void 0:U.content,null==y||null==(o=y.classNames)?void 0:o.content)},i.createElement("div",{"data-title":"",className:N(null==U?void 0:U.title,null==y||null==(l=y.classNames)?void 0:l.title)},y.jsx?y.jsx:"function"===typeof y.title?y.title():y.title),y.description?i.createElement("div",{"data-description":"",className:N(D,ve,null==U?void 0:U.description,null==y||null==(m
2=y.classNames)?void 0:m.description)},"function"===typeof y.description?y.description():y.description):null),i.isValidElement(y.cancel)?y.cancel:y.cancel&&x(y.cancel)?i.createElement("button",{"data-button":!0,"data-cancel":!0,style:y.cancelButtonStyle||F,onClick:e=>{x(y.cancel)&&me&&(null==y.cancel.onClick||y.cancel.onClick.call(y.cancel,e),Pe())},className:N(null==U?void 0:U.cancelButton,null==y||null==(g=y.classNames)?void 0:g.cancelButton)},y.cancel.label):null,i.isValidElement(y.action)?y.action:y.action&&x(y.action)?i.createElement("button",{"data-button":!0,"data-action":!0,style:y.actionButtonStyle||M,onClick:e=>{x(y.action)&&(null==y.action.onClick||y.action.onClick.call(y.action,e),e.defaultPrevented||Pe())},className:N(null==U?void 0:U.actionButton,null==y||null==(v=y.classNames)?void 0:v.actionButton)},y.action.label):null)};function j(){if("undefined"===typeof window)return"ltr";if("undefined"===typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function _(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,a=r?"--mobile-offset":"--offset",i=r?"16px":"24px";function s(e){["top","right","bottom","left"].forEach(t=>{n["".concat(a,"-").concat(t)]="number"===typeof e?"".concat(e,"px"):e})}"number"===typeof e||"string"===typeof e?s(e):"object"===typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n["".concat(a,"-").concat(t)]=i:n["".concat(a,"-").concat(t)]="number"===typeof e[t]?"".concat(e[t],"px"):e[t]}):s(i)}),n}const S=i.forwardRef(function(e,t){const{id:n,invert:a,position:o="bottom-right",hotkey:l=["altKey","KeyT"],expand:c,closeButton:u,className:d,offset:h,mobileOffset:f,theme:p="light",richColors:m,duration:v,style:b,visibleToasts:y=w,toastOptions:x,dir:N=j(),gap:S=k,icons:C,containerAriaLabel:E="Notifications"}=e,[L,P]=i.useState([]),T=i.useMemo(()=>n?L.filter(e=>e.toasterId===n):L.filter(e=>!e.toasterId),[L,n]),R=i.useMemo(()=>Array.from(new Set([o].concat(T.filter(e=>e.position).map(e=>e.position)))),[T,o]),[F,M]=i.useState([]),[O,D]=i.useState(!1),[I,z]=i.useState(!1),[B,q]=i.useState("system"!==p?p:"undefined"!==typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),U=i.useRef(null),V=l.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=i.useRef(null),W=i.useRef(!1),G=i.useCallback(e=>{P(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||g.dismiss(e.id),t.filter(t=>{let{id:n}=t;return n!==e.id})})},[]);return i.useEffect(()=>g.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{P(t=>t.map(t=>t.id===e.id?(0,r.A)((0,r.A)({},t),{},{delete:!0}):t))}):setTimeout(()=>{s.flushSync(()=>{P(t=>{const n=t.findIndex(t=>t.id===e.id);return-1!==n?[...t.slice(0,n),(0,r.A)((0,r.A)({},t[n]),e),...t.slice(n+1)]:[e,...t]})})})}),[L]),i.useEffect(()=>{if("system"!==p)return void q(p);if("system"===p&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?q("dark"):q("light")),"undefined"===typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",e=>{let{matches:t}=e;q(t?"dark":"light")})}catch(t){e.addListener(e=>{let{matches:t}=e;try{q(t?"dark":"light")}catch(n){console.error(n)}})}},[p]),i.useEffect(()=>{L.length<=1&&D(!1)},[L]),i.useEffect(()=>{const e=e=>{var t;const n=l.every(t=>e[t]||e.code===t);var r;n&&(D(!0),null==(r=U.current)||r.focus());"Escape"!==e.code||document.activeElement!==U.current&&!(null==(t=U.current)?void 0:t.contains(document.activeElement))||D(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[l]),i.useEffect(()=>{if(U.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,W.current=!1)}},[U.current]),i.createElement("section",{ref:t,"aria-label":"".concat(E," ").concat(V),tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},R.map((t,n)=>{var s;const[o,l]=t.split("-");
2return T.length?i.createElement("ol",{key:t,dir:"auto"===N?j():N,tabIndex:-1,ref:U,className:d,"data-sonner-toaster":!0,"data-sonner-theme":B,"data-y-position":o,"data-x-position":l,style:(0,r.A)((0,r.A)({"--front-toast-height":"".concat((null==(s=F[0])?void 0:s.height)||0,"px"),"--width":"".concat(356,"px"),"--gap":"".concat(S,"px")},b),_(h,f)),onBlur:e=>{W.current&&!e.currentTarget.contains(e.relatedTarget)&&(W.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||W.current||(W.current=!0,H.current=e.relatedTarget)},onMouseEnter:()=>D(!0),onMouseMove:()=>D(!0),onMouseLeave:()=>{I||D(!1)},onDragEnd:()=>D(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||z(!0)},onPointerUp:()=>z(!1)},T.filter(e=>!e.position&&0===n||e.position===t).map((n,r)=>{var s,o;return i.createElement(A,{key:n.id,icons:C,index:r,toast:n,defaultRichColors:m,duration:null!=(s=null==x?void 0:x.duration)?s:v,className:null==x?void 0:x.className,descriptionClassName:null==x?void 0:x.descriptionClassName,invert:a,visibleToasts:y,closeButton:null!=(o=null==x?void 0:x.closeButton)?o:u,interacting:I,position:t,style:null==x?void 0:x.style,unstyled:null==x?void 0:x.unstyled,classNames:null==x?void 0:x.classNames,cancelButtonStyle:null==x?void 0:x.cancelButtonStyle,actionButtonStyle:null==x?void 0:x.actionButtonStyle,closeButtonAriaLabel:null==x?void 0:x.closeButtonAriaLabel,removeToast:G,toasts:T.filter(e=>e.position==n.position),heights:F.filter(e=>e.position==n.position),setHeights:M,expandByDefault:c,gap:S,expanded:O,swipeDirections:e.swipeDirections})})):null}))})},6401(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("wrench",[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z",key:"cbrjhi"}]])},6533(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("square-pen",[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]])},6590(e,t,n){n.d(t,{Oh:()=>i});var r=n(5043),a=0;function i(){r.useEffect(()=>{var e,t;const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=n[0])&&void 0!==e?e:s()),document.body.insertAdjacentElement("beforeend",null!==(t=n[1])&&void 0!==t?t:s()),a++,()=>{1===a&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),a--}},[])}function s(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}},6672(e,t,n){var r=n(5043);function a(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var s={d:{f:i,r:function(){throw Error(a(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");var l=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){return"font"===e?"":"string"===typeof t?"use-credentials"===t?t:"":void 0}t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!t||1!==t.nodeType&&9!==t.nodeType&&11!==t.nodeType)throw Error(a(299));return function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:o,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}(e,t,null,n)},t.flushSync=function(e){var t=l.T,n=s.p;try{if(l.T=null,s.p=2,e)return e()}finally{l.T=t,s.p=n,s.d.f()}},t.preconnect=function(e,t){"string"===typeof e&&(t?t="string"===typeof(t=t.crossOrigin)?"use-credentials"===t?t:"":void 0:t=null,s.d.C(e,t))},t.prefetchDNS=function(e){"string"===typeof e&&s.d.D(e)},t.preinit=function(e,t){if("string"===typeof e&&t&&"string"===typeof t.as){var n=t.as,r=c(n,t.crossOrigin),a="string"===typeof t.integrity?t.integrity:void 0,i="string"===typeof t.fetchPriority?t.fetchPriority:void 0;"style"===n?s.d.S(e,"string"===typeof t.precedence?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:i}):"script"===n&&s.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:i,nonce:"string"===typeof t.nonce?t.nonce:void 0})}},t.preinitModule=function(e,t){if("string"===typeof e)if("object"===typeof t&&null!==t){if(null==t.as||"script"===t.as){var n=c(t.as,t.crossOrigin);s.d.M(e,{crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0})}}else null==t&&s.d.M(e)},t.preload=function(e,t){if("string"===typeof e&&"object"===typeof t&&null!==t&&"string"===typeof t.as){var n=t.as,r=c(n,t.crossOrigin);s.d.L(e,n,{crossOrigin:r,integrity:"string"===typeof t.integrity?t.integrity:void 0,nonce:"string"===typeof t.nonce?t.nonce:void 0,type:"string"===typeof t.type?t.type:void 0,fetchPriority:"string"===typeof t.fetchPriority?t.fetchPriority:void 0,referrerPolicy:"str
2ing"===typeof t.referrerPolicy?t.referrerPolicy:void 0,imageSrcSet:"string"===typeof t.imageSrcSet?t.imageSrcSet:void 0,imageSizes:"string"===typeof t.imageSizes?t.imageSizes:void 0,media:"string"===typeof t.media?t.media:void 0})}},t.preloadModule=function(e,t){if("string"===typeof e)if(t){var n=c(t.as,t.crossOrigin);s.d.m(e,{as:"string"===typeof t.as&&"script"!==t.as?t.as:void 0,crossOrigin:n,integrity:"string"===typeof t.integrity?t.integrity:void 0})}else s.d.m(e)},t.requestFormReset=function(e){s.d.r(e)},t.unstable_batchedUpdates=function(e,t){return e(t)},t.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},t.useFormStatus=function(){return l.H.useHostTransitionStatus()},t.version="19.2.3"},6747(e,t,n){n.r(t),n.d(t,{PresetPicker:()=>L,default:()=>P});var r=n(9379),a=n(5043),i=n(9722),s=n(6328),o=n(1140),l=n(3390),c=n(2264),u=n(556),d=n(5949),h=n(3416),f=n(6178),p=n(5598),m=n(6401),g=n(1990);const v=(0,n(7784).A)("wand-sparkles",[["path",{d:"m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72",key:"ul74o6"}],["path",{d:"m14 7 3 3",key:"1r5n42"}],["path",{d:"M5 6v4",key:"ilb8ba"}],["path",{d:"M19 14v4",key:"blhpug"}],["path",{d:"M10 2v2",key:"7u0qdc"}],["path",{d:"M7 8H3",key:"zfb6yr"}],["path",{d:"M21 16h-4",key:"1cnmox"}],["path",{d:"M11 3H9",key:"1obp7u"}]]);var b=n(2024),y=n(516),x=n(797),w=n(7104),k=n(1360),N=n(764),A=n(5505),j=n(9855),_=n(579);const S="https://nextgen-staging.emergent.host",C={labor:{color:"border-blue-500/40 text-blue-400",icon:m.A},hardware:{color:"border-amber-500/40 text-amber-400",icon:g.A},service:{color:"border-primary/50 text-primary",icon:v}},E=e=>{let{editing:t,onClose:n,onSave:i}=e;const[s,o]=(0,a.useState)({name:"",kind:"labor",sku:"",description:"",unit_price:"",source_price:"",source_url:"",default_quantity:1});if((0,a.useEffect)(()=>{var e,n,r;t&&o({name:t.name||"",kind:t.kind||"labor",sku:t.sku||"",description:t.description||"",unit_price:null!==(e=t.unit_price)&&void 0!==e?e:"",source_price:null!==(n=t.source_price)&&void 0!==n?n:"",source_url:t.source_url||"",default_quantity:null!==(r=t.default_quantity)&&void 0!==r?r:1})},[t]),!t)return null;const d=(()=>{if("hardware"===s.kind&&""!==s.source_price&&!s.unit_price){const e=parseFloat(s.source_price);if(!isNaN(e))return(1.15*e).toFixed(2)}return null})();return(0,_.jsx)(p.lG,{open:!!t,onOpenChange:e=>!e&&n(),children:(0,_.jsxs)(p.Cf,{className:"bg-card border-border max-w-lg","data-testid":"preset-form-dialog",children:[(0,_.jsx)(p.c7,{children:(0,_.jsx)(p.L3,{className:"text-lg font-bold uppercase",children:t.preset_id?"Edit Preset":"New Preset"})}),(0,_.jsxs)("div",{className:"space-y-3",children:[(0,_.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,_.jsxs)("div",{children:[(0,_.jsx)(u.J,{children:"Name"}),(0,_.jsx)(c.p,{value:s.name,onChange:e=>o((0,r.A)((0,r.A)({},s),{},{name:e.target.value})),className:"bg-input","data-testid":"preset-form-name"})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)(u.J,{children:"Kind"}),(0,_.jsxs)(f.l6,{value:s.kind,onValueChange:e=>o((0,r.A)((0,r.A)({},s),{},{kind:e})),children:[(0,_.jsx)(f.bq,{className:"bg-input","data-testid":"preset-form-kind",children:(0,_.jsx)(f.yv,{})}),(0,_.jsxs)(f.gC,{children:[(0,_.jsx)(f.eb,{value:"labor",children:"Labor (hourly)"}),(0,_.jsx)(f.eb,{value:"hardware",children:"Hardware"}),(0,_.jsx)(f.eb,{value:"service",children:"Service / Other"})]})]})]})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)(u.J,{children:"SKU (optional)"}),(0,_.jsx)(c.p,{value:s.sku,onChange:e=>o((0,r.A)((0,r.A)({},s),{},{sku:e.target.value})),className:"bg-input","data-testid":"preset-form-sku"})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)(u.J,{children:"Description"}),(0,_.jsx)(h.T,{rows:2,value:s.description,onChange:e=>o((0,r.A)((0,r.A)({},s),{},{description:e.target.value})),className:"bg-input","data-testid":"preset-form-desc"})]}),"hardware"===s.kind&&(0,_.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,_.jsxs)("div",{children:[(0,_.jsx)(u.J,{children:"Store price ($)"}),(0,_.jsx)(c.p,{type:"number",step:"0.01",value:s.source_price,onChange:e=>o((0,r.A)((0,r.A)({},s),{},{source_price:e.target.value,unit_price:""})),className:"bg-input","data-testid":"preset-form-source-price"}),(0,_.jsx)("p",{className:"text-[10px] text-muted-foreground mt-1",children:"+15% markup auto-applied"})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)(u.J,{children:"Source URL"}),(0,_.jsx)(c.p,{value:s.source_url,onChange:e=>o((0,r.A)((0,r.A)({},s),{},{source_url:e.target.value})),placeholder:"https://store.ui.com/...",className:"bg-input","data-testid":"preset-form-source-url"})]})]}),(0,_.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,_.jsxs)("div",{children:[(0,_.jsx)(u.J,{children:"labor"===s.kind?"Hourly rate ($)":"Unit price ($)"}),(0,_.jsx)(c.p,{type:"number",step:"0.01",value:""!==s.unit_price?s.unit_price:d||"",onChange:e=>o((0,r.A)((0,r.A)({},s),{},{unit_price:e.target.value})),placeholder:d?"Auto: ".concat(d):"",className:"bg-input","data-testid":"preset-form-unit-price"})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)(u.J,{children:"Default qty"}),(0,_.jsx)(c.p,{type:"number",step:"0.25",value:s.default_quantity,onChange:e=>o((0,r.A)((0,r.A)({},s),{},{default_quantity:e.target.value})),className:"bg-input","data-testid":"preset-form-default-qty"})]})]}),(0,_.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,_.jsx)(l.$,{variant:"ghost",onClick:n,children:"Cancel"}),(0,_.jsx)(l.$,{onClick:()=>i(s),className:"font-bold uppercase","data-testid":"preset-form-save",children:"Save"})]})]})]})})},L=e=>{let{open:t,onClose:n,onPick:s}=e;const[o,u]=(0,a.useState)([]),[h,m]=(0,a.useState)(!1),[g,v]=(0,a.useState)(""),[y,x]=(0,a.useState)("all"),[w,k]=(0,a.useState)({});(0,a.useEffect)(()=>
2{if(!t)return;m(!0),k({});const e={};"all"!==y&&(e.kind=y),g.trim()&&(e.search=g.trim()),i.A.get("".concat(S,"/api/admin/preset-items"),{withCredentials:!0,params:e}).then(e=>u(e.data)).finally(()=>m(!1))},[t,y,g]);const N=Object.keys(w).length;return(0,_.jsx)(p.lG,{open:t,onOpenChange:e=>!e&&n(),children:(0,_.jsxs)(p.Cf,{className:"bg-card border-border max-w-2xl max-h-[80vh] flex flex-col","data-testid":"preset-picker",children:[(0,_.jsx)(p.c7,{children:(0,_.jsx)(p.L3,{className:"text-lg font-bold uppercase",children:"Add from Preset Library"})}),(0,_.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,_.jsx)(c.p,{value:g,onChange:e=>v(e.target.value),placeholder:"Search\u2026",className:"bg-input flex-1","data-testid":"preset-picker-search"}),(0,_.jsxs)(f.l6,{value:y,onValueChange:x,children:[(0,_.jsx)(f.bq,{className:"bg-input w-[140px]","data-testid":"preset-picker-kind",children:(0,_.jsx)(f.yv,{})}),(0,_.jsxs)(f.gC,{children:[(0,_.jsx)(f.eb,{value:"all",children:"All"}),(0,_.jsx)(f.eb,{value:"labor",children:"Labor"}),(0,_.jsx)(f.eb,{value:"hardware",children:"Hardware"}),(0,_.jsx)(f.eb,{value:"service",children:"Service"})]})]})]}),(0,_.jsxs)("div",{className:"flex-1 overflow-y-auto space-y-1.5 pr-1",children:[h&&(0,_.jsx)(b.A,{className:"w-6 h-6 animate-spin mx-auto"}),!h&&0===o.length&&(0,_.jsx)("p",{className:"text-sm text-muted-foreground italic text-center py-6",children:"No matches."}),o.map(e=>{const t=C[e.kind]||C.service,n=!!w[e.preset_id];return(0,_.jsxs)("button",{type:"button",onClick:()=>(e=>{k(t=>{const n=(0,r.A)({},t);return n[e.preset_id]?delete n[e.preset_id]:n[e.preset_id]=e,n})})(e),className:"w-full text-left p-3 rounded-md border transition-colors flex items-center gap-3 ".concat(n?"border-primary bg-primary/5":"border-border hover:border-primary/50"),"data-testid":"preset-pick-".concat(e.preset_id),children:[(0,_.jsx)("span",{className:"w-4 h-4 rounded border-2 flex items-center justify-center shrink-0 ".concat(n?"border-primary bg-primary":"border-muted-foreground/40"),children:n&&(0,_.jsx)("span",{className:"w-2 h-2 bg-primary-foreground rounded-sm"})}),(0,_.jsx)(d.E,{variant:"outline",className:"text-[10px] uppercase shrink-0 ".concat(t.color),children:e.kind}),(0,_.jsx)("span",{className:"font-bold text-sm flex-1 truncate",children:e.name}),e.sku&&(0,_.jsx)("span",{className:"text-[10px] font-mono text-muted-foreground hidden sm:inline",children:e.sku}),(0,_.jsxs)("span",{className:"text-sm font-mono",children:["$",(e.unit_price||0).toFixed(2)]})]},e.preset_id)})]}),(0,_.jsxs)("div",{className:"flex items-center justify-between gap-2 pt-3 mt-2 border-t border-border",children:[(0,_.jsx)("p",{className:"text-xs text-muted-foreground","data-testid":"preset-picker-counter",children:0===N?"Pick one or more items.":"".concat(N," item").concat(1===N?"":"s"," selected")}),(0,_.jsxs)("div",{className:"flex items-center gap-2",children:[(0,_.jsx)(l.$,{variant:"ghost",size:"sm",onClick:n,children:"Cancel"}),(0,_.jsxs)(l.$,{size:"sm",disabled:0===N,onClick:()=>{const e=Object.values(w);0!==e.length&&(e.forEach(e=>s(e)),n())},className:"font-bold uppercase","data-testid":"preset-picker-add-btn",children:["Add ",N||""," ",1===N?"item":"items"]})]})]})]})})},P=()=>{const[e,t]=(0,a.useState)([]),[n,r]=(0,a.useState)(!0),[u,h]=(0,a.useState)("all"),[p,m]=(0,a.useState)(""),[v,L]=(0,a.useState)(null),[P,T]=(0,a.useState)(!1),R=async()=>{r(!0);try{const e={};"all"!==u&&(e.kind=u),p.trim()&&(e.search=p.trim());const n=await i.A.get("".concat(S,"/api/admin/preset-items"),{withCredentials:!0,params:e});t(n.data)}catch(e){s.oR.error("Failed to load presets")}finally{r(!1)}};(0,a.useEffect)(()=>{R()},[u]);return(0,_.jsxs)("div",{className:"space-y-4","data-testid":"admin-preset-items-tab",children:[(0,_.jsxs)(o.Zp,{className:"p-4 border-border",children:[(0,_.jsxs)("div",{className:"flex items-center justify-between flex-wrap gap-3",children:[(0,_.jsxs)("div",{children:[(0,_.jsxs)("h3",{className:"font-bold uppercase tracking-tight flex items-center gap-2",children:[(0,_.jsx)(g.A,{className:"w-4 h-4 text-primary"}),"Preset Items \u2014 Labor & Hardware"]}),(0,_.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Reusable line items for quotes and invoices. Hardware syncs from store.ui.com with a +15% markup."})]}),(0,_.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[(0,_.jsxs)(l.$,{size:"sm",variant:"outline",onClick:async()=>
2{if(window.confirm("Fetch the latest hardware list from store.ui.com? Existing rows will be updated with new prices (+15% markup).")){T(!0);try{const e=await i.A.post("".concat(S,"/api/admin/preset-items/refresh-ui-store"),{limit:200},{withCredentials:!0});s.oR.success("Synced ".concat(e.data.fetched," products \u2014 ").concat(e.data.created," new, ").concat(e.data.updated," updated")),R()}catch(n){var e,t;s.oR.error((null===(e=n.response)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.detail)||"Refresh failed \u2014 try CSV import or manual CRUD")}finally{T(!1)}}},disabled:P,"data-testid":"presets-refresh-ui-btn",children:[P?(0,_.jsx)(b.A,{className:"w-3.5 h-3.5 mr-1.5 animate-spin"}):(0,_.jsx)(y.A,{className:"w-3.5 h-3.5 mr-1.5"}),"Refresh from UI Store"]}),(0,_.jsx)("input",{type:"file",accept:".csv",id:"preset-csv-input",className:"hidden",onChange:async e=>{var t;const n=null===(t=e.target.files)||void 0===t?void 0:t[0];if(e.target.value="",!n)return;const r=new FormData;r.append("file",n);try{const e=await i.A.post("".concat(S,"/api/admin/preset-items/import-csv"),r,{withCredentials:!0,headers:{"Content-Type":"multipart/form-data"}});s.oR.success("Imported ".concat(e.data.created," new, updated ").concat(e.data.updated)),R()}catch(l){var a,o;s.oR.error((null===(a=l.response)||void 0===a||null===(o=a.data)||void 0===o?void 0:o.detail)||"Import failed")}},"data-testid":"presets-csv-input"}),(0,_.jsxs)(l.$,{size:"sm",variant:"outline",onClick:()=>document.getElementById("preset-csv-input").click(),"data-testid":"presets-import-btn",children:[(0,_.jsx)(x.A,{className:"w-3.5 h-3.5 mr-1.5"}),"Import CSV"]}),(0,_.jsxs)(l.$,{size:"sm",variant:"outline",onClick:async()=>{try{const e=await i.A.get("".concat(S,"/api/admin/preset-items/export/csv"),{withCredentials:!0,responseType:"blob"}),t=window.URL.createObjectURL(new Blob([e.data])),n=document.createElement("a");n.href=t,n.download="preset-items-".concat((new Date).toISOString().slice(0,10),".csv"),n.click(),window.URL.revokeObjectURL(t)}catch(e){s.oR.error("Export failed")}},"data-testid":"presets-export-btn",children:[(0,_.jsx)(w.A,{className:"w-3.5 h-3.5 mr-1.5"}),"Export"]}),(0,_.jsxs)(l.$,{size:"sm",onClick:()=>L({name:"",kind:"labor",sku:"",description:"",unit_price:"",source_price:"",source_url:"",default_quantity:1}),className:"font-bold","data-testid":"presets-new-btn",children:[(0,_.jsx)(k.A,{className:"w-3.5 h-3.5 mr-1.5"}),"New Preset"]})]})]}),(0,_.jsxs)("div",{className:"flex items-center gap-2 mt-4 flex-wrap",children:[(0,_.jsx)(c.p,{value:p,onChange:e=>m(e.target.value),onKeyDown:e=>"Enter"===e.key&&R(),placeholder:"Search name / SKU / description\u2026",className:"bg-input w-[280px]","data-testid":"presets-search"}),(0,_.jsx)(l.$,{size:"sm",variant:"outline",onClick:R,children:"Apply"}),(0,_.jsxs)(f.l6,{value:u,onValueChange:h,children:[(0,_.jsx)(f.bq,{className:"bg-input w-[180px]","data-testid":"presets-kind-filter",children:(0,_.jsx)(f.yv,{})}),(0,_.jsxs)(f.gC,{children:[(0,_.jsx)(f.eb,{value:"all",children:"All kinds"}),(0,_.jsx)(f.eb,{value:"labor",children:"Labor"}),(0,_.jsx)(f.eb,{value:"hardware",children:"Hardware"}),(0,_.jsx)(f.eb,{value:"service",children:"Service"})]})]}),(0,_.jsxs)("p",{className:"text-[11px] text-muted-foreground ml-auto",children:[e.length," preset",1===e.length?"":"s"]})]})]}),n&&(0,_.jsx)(o.Zp,{className:"p-12 text-center border-border",children:(0,_.jsx)(b.A,{className:"w-8 h-8 animate-spin mx-auto text-muted-foreground"})}),!n&&0===e.length&&(0,_.jsxs)(o.Zp,{className:"p-12 text-center border-border",children:[(0,_.jsx)(g.A,{className:"w-10 h-10 mx-auto text-muted-foreground/50 mb-3"}),(0,_.jsx)("p",{className:"text-muted-foreground",children:'No presets yet. Click "Refresh from UI Store" or "New Preset" to start.'})]}),(0,_.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3",children:!n&&e.map(e=>{const t=C[e.kind]||C.service,n=t.icon;return(0,_.jsxs)(o.Zp,{className:"p-4 border-border","data-testid":"preset-row-".concat(e.preset_id),children:[(0,_.jsxs)("div",{className:"flex items-start justify-between gap-2 mb-2",children:[(0,_.jsxs)("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[(0,_.jsx)(n,{className:"w-4 h-4 text-primary shrink-0"}),(0,_.jsx)("h4",{className:"font-bold text-sm truncate",children:e.name})]}),(0,_.jsx)(d.E,{variant:"outline",className:"text-[10px] uppercase ".concat(t.color),children:e.kind})]}),e.sku&&(0,_.jsxs)("p",{className:"text-[10px] font-mono text-muted-foreground mb-1",children:["SKU: ",e.sku]}),e.description&&(0,_.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-2 mb-2",children:e.description}),(0,_.jsxs)("div",{className:"flex items-baseline justify-between mt-3",children:[(0,_.jsxs)("p",{className:"text-lg font-black text-primary",children:["$",(e.unit_price||0).toFixed(2)]}),e.source_price&&(0,_.jsxs)("p",{className:"text-[10px] text-muted-foreground",children:["Store: $",e.source_price.toFixed(2)," ",(0,_.jsxs)("span",{className:"text-primary",children:["+",e.markup_pct||15,"%"]})]})]}),(0,_.jsxs)("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-border",children:[e.source_url?(0,_.jsxs)("a",{href:e.source_url,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-primary hover:underline flex items-center gap-1",children:[(0,_.jsx)(N.A,{className:"w-3 h-3"}),"Source"]}):(0,_.jsx)("span",{}),(0,_.jsxs)("div",{className:"flex items-center gap-1",children:[(0,_.jsx)(l.$,{size:"sm",variant:"outline",onClick:()=>L(e),"data-testid":"preset-edit-".concat(e.preset_id),children:(0,_.jsx)(A.A,{className:"w-3 h-3"})}),(0,_.jsx)(l.$,{size:"sm",variant:"ghost",onClick:()=>(async e=>{if(window.confirm('Remove "'.concat(e.name,'"?')))try{await i.A.delete("".concat(S,"/api/admin/preset-items/").concat(e.preset_id),{withCredentials:!0}),s.oR.success("Removed"),R()}catch(t){s.oR.error("Failed to delete")}})(e),className:"text-destructive hover:text-destructive","data-testid":"preset-delete-".concat(e.preset_id),children:(0,_.jsx)(j.A,{className:"w-3 h-3"})})]})]})]},e.preset_id)})}),(0,_.jsx)(E,{editing:v,onClose:()=>L(null),onSave:async e=>{const t={name:e.name,kind:e.kind,sku:e.sku||null,description:e.description,default_quantity:parseFloat(e.default_quantity)||1};""!==e.unit_price&&(t.unit_price=parseFloat(e.unit_price)),""!==e.source_price&&(t.source_price=parseFloat(e.source_price)),e.source_url&&(t.source_url=e.source_url);try{null!==v&&void 0!==v&&v.preset_id?(await i.A.put("".concat(S,"/api/admin/preset-items/").concat(v.preset_id),t,{withCredentials:!0}),s.oR.success("Preset updated")):(await i.A.post("".concat(S,"/api/admin/preset-items"),t,{withCredentials:!0}),s.oR.success("Preset created")),L(null),R()}catch(a){var n,r;s.oR.error((null===(n=a.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.detail)||"Failed to save")}}})]})}},6833(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},6851(e,t,n){var r;n.d(t,{DX:()=>m,TL:()=>p});var a=n(9379),i=n(3986),s=n(5043),o=n(2814),l=n(579);const c=["children"],u=["children"];var d=Symbol.for("react.lazy"),h=(r||(r=n.t(s,2)))[" use ".trim().toString()];function f(e){return null!=e&&"object"===typeof e&&"$$typeof"in e&&e.$$typeof===d&&"_payload"in e&&("object"===typeof(t=e._payload)&&null!==t&&"then"in t);var t}
2function p(e){const t=g(e),n=s.forwardRef((e,n)=>{let{children:r}=e,o=(0,i.A)(e,c);f(r)&&"function"===typeof h&&(r=h(r._payload));const u=s.Children.toArray(r),d=u.find(b);if(d){const e=d.props.children,r=u.map(t=>t===d?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:t);return(0,l.jsx)(t,(0,a.A)((0,a.A)({},o),{},{ref:n,children:s.isValidElement(e)?s.cloneElement(e,void 0,r):null}))}return(0,l.jsx)(t,(0,a.A)((0,a.A)({},o),{},{ref:n,children:r}))});return n.displayName="".concat(e,".Slot"),n}var m=p("Slot");function g(e){const t=s.forwardRef((e,t)=>{let{children:n}=e,r=(0,i.A)(e,u);if(f(n)&&"function"===typeof h&&(n=h(n._payload)),s.isValidElement(n)){const e=function(e){var t,n;let r=null===(t=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===t?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null===(n=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===n?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),i=function(e,t){const n=(0,a.A)({},t);for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=function(){const e=s(...arguments);return i(...arguments),e}:i&&(n[r]=i):"style"===r?n[r]=(0,a.A)((0,a.A)({},i),s):"className"===r&&(n[r]=[i,s].filter(Boolean).join(" "))}return(0,a.A)((0,a.A)({},e),n)}(r,n.props);return n.type!==s.Fragment&&(i.ref=t?(0,o.t)(t,e):e),s.cloneElement(n,i)}return s.Children.count(n)>1?s.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}var v=Symbol("radix.slottable");function b(e){return s.isValidElement(e)&&"function"===typeof e.type&&"__radixId"in e.type&&e.type.__radixId===v}},7004(e,t,n){var r=n(8853),a=n(5043),i=n(7950);function s(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function c(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function u(e){if(31===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function d(e){if(l(e)!==e)throw Error(s(188))}function h(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e;for(e=e.child;null!==e;){if(null!==(t=h(e)))return t;e=e.sibling}return null}var f=Object.assign,p=Symbol.for("react.element"),m=Symbol.for("react.transitional.element"),g=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),b=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),x=Symbol.for("react.consumer"),w=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),j=Symbol.for("react.memo"),_=Symbol.for("react.lazy");Symbol.for("react.scope");var S=Symbol.for("react.activity");Symbol.for("react.legacy_hidden"),Symbol.for("react.tracing_marker");var C=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var E=Symbol.iterator;function L(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=E&&e[E]||e["@@iterator"])?e:null}var P=Symbol.for("react.client.reference");function T(e){if(null==e)return null;if("function"===typeof e)return e.$$typeof===P?null:e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case v:return"Fragment";case y:return"Profiler";case b:return"StrictMode";case N:return"Suspense";case A:return"SuspenseList";case S:return"Activity"}if("object"===typeof e)switch(e.$$typeof){case g:return"Portal";case w:return e.displayName||"Context";case x:return(e._context.displayName||"Context")+".Consumer";case k:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case j:return null!==(t=e.displayName||null)?t:T(e.type)||"Memo";case _:t=e._payload,e=e._init;try{return T(e(t))}catch(bu){}}return null}var R=Array.isArray,F=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,M=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O={pending:!1,data:null,method:null,action:null},D=[],I=-1;function z(e){return{current:e}}function B(e){0>I||(e.current=D[I],D[I]=null,I--)}function q(e,t){I++,D[I]=e.current,e.current=t}var U,V,H=z(null),W=z(null),G=z(null),$=z(null);function Y(e,t){switch(q(G,t),q(W,e),q(H,null),t.nodeType){case 9:case 11:e=(e
vendor: 11,405 bytes, line 2
2=t.documentElement)&&(e=e.namespaceURI)?yd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=xd(t=yd(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(H),q(H,e)}function K(){B(H),B(W),B(G)}function X(e){null!==e.memoizedState&&q($,e);var t=H.current,n=xd(t,e.type);t!==n&&(q(W,e),q(H,n))}function Z(e){W.current===e&&(B(H),B(W)),$.current===e&&(B($),hh._currentValue=O)}function J(e){if(void 0===U)try{throw Error()}catch(bu){var t=bu.stack.trim().match(/\n( *(at )?)/);U=t&&t[1]||"",V=-1<bu.stack.indexOf("\n at")?" (<anonymous>)":-1<bu.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+U+e+V}var Q=!1;function ee(e,t){if(!e||Q)return"";Q=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(bu){var r=bu}Reflect.construct(e,[],n)}else{try{n.call()}catch(a){r=a}e.call(n.prototype)}}else{try{throw Error()}catch(i){r=i}(n=e())&&"function"===typeof n.catch&&n.catch(function(){})}}catch(s){if(s&&r&&"string"===typeof s.stack)return[s.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),s=i[0],o=i[1];if(s&&o){var l=s.split("\n"),c=o.split("\n");for(a=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;a<c.length&&!c[a].includes("DetermineComponentFrameRoot");)a++;if(r===l.length||a===c.length)for(r=l.length-1,a=c.length-1;1<=r&&0<=a&&l[r]!==c[a];)a--;for(;1<=r&&0<=a;r--,a--)if(l[r]!==c[a]){if(1!==r||1!==a)do{if(r--,0>--a||l[r]!==c[a]){var u="\n"+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}}while(1<=r&&0<=a);break}}}finally{Q=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?J(n):""}function te(e,t){switch(e.tag){case 26:case 27:case 5:return J(e.type);case 16:return J("Lazy");case 13:return e.child!==t&&null!==t?J("Suspense Fallback"):J("Suspense");case 19:return J("SuspenseList");case 0:case 15:return ee(e.type,!1);case 11:return ee(e.type.render,!1);case 1:return ee(e.type,!0);case 31:return J("Activity");default:return""}}function ne(e){try{var t="",n=null;do{t+=te(e,n),n=e,e=e.return}while(e);return t}catch(bu){return"\nError generating stack: "+bu.message+"\n"+bu.stack}}var re=Object.prototype.hasOwnProperty,ae=r.unstable_scheduleCallback,ie=r.unstable_cancelCallback,se=r.unstable_shouldYield,oe=r.unstable_requestPaint,le=r.unstable_now,ce=r.unstable_getCurrentPriorityLevel,ue=r.unstable_ImmediatePriority,de=r.unstable_UserBlockingPriority,he=r.unstable_NormalPriority,fe=r.unstable_LowPriority,pe=r.unstable_IdlePriority,me=r.log,ge=r.unstable_setDisableYieldValue,ve=null,be=null;function ye(e){if("function"===typeof me&&ge(e),be&&"function"===typeof be.setStrictMode)try{be.setStrictMode(ve,e)}catch(t){}}var xe=Math.clz32?Math.clz32:function(e){return e>>>=0,0===e?32:31-(we(e)/ke|0)|0},we=Math.log,ke=Math.LN2;var Ne=256,Ae=262144,je=4194304;function _e(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return 261888&e;case 262144:case 524288:case 1048576:case 2097152:return 3932160&e;case 4194304:case 8388608:case 16777216:case 33554432:return 62914560&e;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Se(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var a=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var o=134217727&r;return 0!==o?0!==(r=o&~i)?a=_e(r):0!==(s&=o)?a=_e(s):n||0!==(n=o&~e)&&(a=_e(n)):0!==(o=r&~i)?a=_e(o):0!==s?a=_e(s):n||0!==(n=r&~e)&&(a=_e(n)),0===a?0:0!==t&&t!==a&&0===(t&i)&&((i=a&-a)>=(n=t&-t)||32===i&&0!==(4194048&n))?t:a}function Ce(e,t){return 0===(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function Ee(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Le(){var e=je;return 0===(62914560&(je<<=1))&&(je=4194304),e}function Pe(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Te(e,t){e.pendingLanes|=t,268435456!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Re(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-xe(t);e.entangledLanes|=t,e.entanglements[r]=1073741824|e.entanglements[r]|261930&n}function Fe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-xe(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function Me(e,t){var n=t&-t;return 0!==((n=0!==(42&n)?1:Oe(n))&(e.suspendedLanes|t))?0:n}function Oe(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function De(e){return 2<(e&=-e)?8<e?0!==(134217727&e)?32:268435456:8:2}function Ie(){var e=M.p;return 0!==e?e:void 0===(e=window.event)?32:Ch(e.type)}function ze(e,t){var n=M.p;try{return M.p=e,t()}finally{M.p=n}}var Be=Math.random().toString(36).slice(2),qe="__reactFiber$"+Be,Ue="__reactProps$"+Be,Ve="__reactContainer$"+Be,He="__reactEvents$"+Be,We="__reactListeners$"+Be,Ge="__reactHandles$"+Be,$e="__reactResources$"+Be,Ye="__reactMarker$"+Be;function Ke(e){delete e[qe],delete e[Ue],delete e[He],delete e[We],delete e[Ge]}function Xe(e){var t=e[qe];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ve]||n[qe]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Id(e);null!==e;){if(n=e[qe])return n;e=Id(e)}return t}n=(e=n).parentNode}return null}function Ze(e){if(e=e[qe]||e[Ve]){var t=e.tag;if(5===t||6===t||13===t||31===t||26===t||27===t||3===t)return e}return null}function Je(e){var t=e.tag;if(5===t||26===t||27===t||6===t)return e.stateNode;throw Error(s(33))}function Qe(e){var t=e[$e];return t||(t=e[$e]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function et(e){e[Ye]=!0}var tt=new Set,nt={};function rt(e,t){at(e,t),at(e+"Capture",t)}function at(e,t){for(nt[e]=t,e=0;e<t.length;e++)tt.add(t[e])}var it=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),st={},ot={};function lt(e,t,n){if(a=t,re.call(ot,a)||!re.call(st,a)&&(it.test(a)?ot[a]=!0:(st[a]=!0,0)))if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":return void e.removeAttribute(t);case"boolean":var r=t.toLowerCase().slice(0,5);if("data-"!==r&&"aria-"!==r)return void e.removeAttribute(t)}e.setAttribute(t,""+n)}var a}function ct(e,t,n){if(null===n)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(t)}e.setAttribute(t,""+n)}}function ut(e,t,n,r){if(null===r)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":return void e.removeAttribute(n)}e.setAttributeNS(t,n,""+r)}}function dt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function ht(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function ft(e){if(!e._valueTracker){var t=ht(e)?"checked":"value";e._valueTracker=function(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&"undefined"!==typeof r&&"function"===typeof r.get&&"function"===typeof r.set){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(e){n=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e,t,""+e[t])}}function pt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ht(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function mt(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var gt=/[\n"\\]/g;function vt(e){return e.replace(gt,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function bt(e,t,n,r,a,i,s,o){e.name="",null!=s&&"function"!==typeof s&&"symbol"!==typeof s&&"boolean"!==typeof s?e.type=s:e.removeAttribute("type"),null!=t?"number"===s?(0===t&&""===e.value||e.value!=t)&&(e.value=""+dt(t)):e.value!==""+dt(t)&&(e.value=""+dt(t)):"submit"!==s&&"reset"!==s||e.removeAttribute("value"),null!=t?xt(e,s,dt(t)):null!=n?xt(e,s,dt(n)):null!=r&&e.removeAttribute("value"),null==a&&null!=i&&(e.defaultChecked=!!i),null!=a&&(e.checked=a&&"function"!==typeof a&&"symbol"!==typeof a),null!=o&&"function"!==typeof o&&"symbol"!==typeof o&&"boolean"!==typeof o?e.name=""+dt(o):e.removeAttribute("name")}function yt(e,t,n,r,a,i,s,o){if(null!=i&&"function"!==typeof i&&"symbol"!==typeof i&&"boolean"!==typeof i&&(e.type=i),null!=t||null!=n){if(!("submit"!==i&&"reset"!==i||void 0!==t&&null!==t))return void ft(e);n=null!=n?""+dt(n):"",t=null!=t?""+dt(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r="function"!==typeof(r=null!=r?r:a)&&"symbol"!==typeof r&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,null!=s&&"function"!==typeof s&&"symbol"!==typeof s&&"boolean"!==typeof s&&(e.name=s),ft(e)}function xt(e,t,n){"number"===t&&mt(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function wt(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+dt(n),t=null,a=0;a<e.length;a++){if(e[a].value===n)return e[a].selected=!0,void(r&&(e[a].defaultSelected=!0));null!==t||e[a].disabled||(t=e[a])}null!==t&&(t.selected=!0)}}function kt(e,t,n){null==t||((t=""+dt(t))!==e.value&&(e.value=t),null!=n)?e.defaultValue=null!=n?""+dt(n):"":e.defaultValue!==t&&(e.defaultValue=t)}function Nt(e,t,n,r){if(null==t){if(null!=r){if(null!=n)throw Error(s(92));if(R(r)){if(1<r.length)throw Error(s(93));r=r[0]}n=r}null==n&&(n=""),t=n}n=dt(t),e.defaultValue=n,(r=e.textContent)===n&&""!==r&&null!==r&&(e.value=r),ft(e)}function At(e,t){if(t){var n=e.firstChild;
2if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var jt=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function _t(e,t,n){var r=0===t.indexOf("--");null==n||"boolean"===typeof n||""===n?r?e.setProperty(t,""):"float"===t?e.cssFloat="":e[t]="":r?e.setProperty(t,n):"number"!==typeof n||0===n||jt.has(t)?"float"===t?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function St(e,t,n){if(null!=t&&"object"!==typeof t)throw Error(s(62));if(e=e.style,null!=n){for(var r in n)!n.hasOwnProperty(r)||null!=t&&t.hasOwnProperty(r)||(0===r.indexOf("--")?e.setProperty(r,""):"float"===r?e.cssFloat="":e[r]="");for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&_t(e,a,r)}else for(var i in t)t.hasOwnProperty(i)&&_t(e,i,t[i])}function Ct(e){if(-1===e.indexOf("-"))return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Et=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode
2-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Lt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Pt(e){return Lt.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Tt(){}var Rt=null;function Ft(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Mt=null,Ot=null;function Dt(e){var t=Ze(e);if(t&&(e=t.stateNode)){var n=e[Ue]||null;e:switch(e=t.stateNode,t.type){case"input":if(bt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+vt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Ue]||null;if(!a)throw Error(s(90));bt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)(r=n[t]).form===e.form&&pt(r)}break e;case"textarea":kt(e,n.value,n.defaultValue);break e;case"select":null!=(t=n.value)&&wt(e,!!n.multiple,t,!1)}}}var It=!1;function zt(e,t,n){if(It)return e(t,n);It=!0;try{return e(t)}finally{if(It=!1,(null!==Mt||null!==Ot)&&(eu(),Mt&&(t=Mt,e=Ot,Ot=Mt=null,Dt(t),e)))for(t=0;t<e.length;t++)Dt(e[t])}}function Bt(e,t){var n=e.stateNode;if(null===n)return null;var r=n[Ue]||null;if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(s(231,t,typeof n));return n}var qt=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),Ut=!1;if(qt)try{var Vt={};Object.defineProperty(Vt,"passive",{get:function(){Ut=!0}}),window.addEventListener("test",Vt,Vt),window.removeEventListener("test",Vt,Vt)}catch(Qh){Ut=!1}var Ht=null,Wt=null,Gt=null;function $t(){if(Gt)return Gt;var e,t,n=Wt,r=n.length,a="value"in Ht?Ht.value:Ht.textContent,i=a.length;for(e=0;e<r&&n[e]===a[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===a[i-t];t++);return Gt=a.slice(e,1<t?1-t:void 0)}function Yt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Kt(){return!0}function Xt(){return!1}function Zt(e){function t(t,n,r,a,i){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=a,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(a):a[s]);return this.isDefaultPrevented=(null!=a.defaultPrevented?a.defaultPrevented:!1===a.returnValue)?Kt:Xt,this.isPropagationStopped=Xt,this}return f(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Kt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Kt)},persist:function(){},isPersistent:Kt}),t}var Jt,Qt,en,tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nn=Zt(tn),rn=f({},tn,{view:0,detail:0}),an=Zt(rn),sn=f({},rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.from
vendor: 4,410 bytes, line 2
2Element===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==en&&(en&&"mousemove"===e.type?(Jt=e.screenX-en.screenX,Qt=e.screenY-en.screenY):Qt=Jt=0,en=e),Jt)},movementY:function(e){return"movementY"in e?e.movementY:Qt}}),on=Zt(sn),ln=Zt(f({},sn,{dataTransfer:0})),cn=Zt(f({},rn,{relatedTarget:0})),un=Zt(f({},tn,{animationName:0,elapsedTime:0,pseudoElement:0})),dn=Zt(f({},tn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),hn=Zt(f({},tn,{data:0})),fn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},pn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},mn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=mn[e])&&!!t[e]}function vn(){return gn}var bn=f({},rn,{key:function(e){if(e.key){var t=fn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Yt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?pn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vn,charCode:function(e){return"keypress"===e.type?Yt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Yt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),yn=Zt(bn),xn=Zt(f({},sn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),wn=Zt(f({},rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vn})),kn=Zt(f({},tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Nn=Zt(f({},sn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),An=Zt(f({},tn,{newState:0,oldState:0})),jn=[9,13,27,32],_n=qt&&"CompositionEvent"in window,Sn=null;qt&&"documentMode"in document&&(Sn=document.documentMode);var Cn=qt&&"TextEvent"in window&&!Sn,En=qt&&(!_n||Sn&&8<Sn&&11>=Sn),Ln=String.fromCharCode(32),Pn=!1;function Tn(e,t){switch(e){case"keyup":return-1!==jn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Fn=!1;var Mn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function On(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Mn[e.type]:"textarea"===t}function Dn(e,t,n,r){Mt?Ot?Ot.push(r):Ot=[r]:Mt=r,0<(t=id(t,"onChange")).length&&(n=new nn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var In=null,zn=null;function Bn(e){Zu(e,0)}function qn(e){if(pt(Je(e)))return e}function Un(e,t){if("change"===e)return t}var Vn=!1;if(qt){var Hn;if(qt){var Wn="oninput"in document;if(!Wn){var Gn=document.createElement("div");Gn.setAttribute("oninput","return;"),Wn="function"===typeof Gn.oninput}Hn=Wn}else Hn=!1;Vn=Hn&&(!document.documentMode||9<document.documentMode)}function $n(){In&&(In.detachEvent("onpropertychange",Yn),zn=In=null)}function Yn(e){if("value"===e.propertyName&&qn(zn)){var t=[];Dn(t,zn,e,Ft(e)),zt(Bn,t)}}function Kn(e,t,n){"focusin"===e?($n(),zn=n,(In=t).attachEvent("onpropertychange",Yn)):"focusout"===e&&$n()}function Xn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return qn(zn)}function Zn(e,t){if("click"===e)return qn(t)}function Jn(e,t){if("input"===e||"change"===e)return qn(t)}var Qn="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function er(e,t){if(Qn(e,t))return!0;
2if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var a=n[r];if(!re.call(t,a)||!Qn(e[a],t[a]))return!1}return!0}function tr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function nr(e,t){var n,r=tr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=tr(r)}}function rr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?rr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ar(e){for(var t=mt((e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window).document);t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=mt((e=t.contentWindow).document)}return t}function ir(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var sr=qt&&"documentMode"in document&&11>=document.documentMode,or=null,lr=null,cr=null,ur=!1;function dr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;ur||null==or||or!==mt(r)||("selectionStart"in(r=or)&&ir(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},cr&&er(cr,r)||(cr=r,0<(r=id(lr,"onSelect")).length&&(t=new nn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=or)))}function hr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var fr={animationend:hr("Animation","AnimationEnd"),animationiteration:hr("Animation","AnimationIteration"),animationstart:hr("Animation","AnimationStart"),transitionrun:hr("Transition","TransitionRun"),transitionstart:hr("Transition","TransitionStart"),transitioncancel:hr("Transition","TransitionCancel"),transitionend:hr("Transition","TransitionEnd")},pr={},mr={};function gr(e){if(pr[e])return pr[e];if(!fr[e])return e;var t,n=fr[e];for(t in n)if(n.hasOwnProperty(t)&&t in mr)return pr[e]=n[t];return e}qt&&(mr=document.createElement("div").style,"AnimationEvent"in window||(delete fr.animationend.animation,delete fr.animationiteration.animation,delete fr.animationstart.animation),"TransitionEvent"in window||delete fr.transitionend.transition);var vr=gr("animationend"),br=gr("animationiteration"),yr=gr("animationstart"),xr=gr("transitionrun"),wr=gr("transitionstart"),kr=gr("transitioncancel"),Nr=gr("transitionend"),Ar=new Map,jr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function _r(e,t){Ar.set(e,t),rt(t,[e])}jr.push("scrollEnd");var Sr="function"===typeof reportError?reportError:function(e){if("object"===typeof window&&"function"===typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"===typeof e&&null!==e&&"string"===typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"===typeof process&&"function"===typeof process.emit)return void process.emit("uncaughtException",e);console.error(e)},Cr=[],Er=0,Lr=0;function Pr(){for(var e=Er,t=Lr=Er=0;t<e;){var n=Cr[t];Cr[t++]=null;var r=Cr[t];Cr[t++]=null;var a=Cr[t];Cr[t++]=null;var i=Cr[t];if(Cr[t++]=null,null!==r&&null!==a){var s=r.pending;
vendor: 14,101 bytes, line 2
2null===s?a.next=a:(a.next=s.next,s.next=a),r.pending=a}0!==i&&Mr(n,a,i)}}function Tr(e,t,n,r){Cr[Er++]=e,Cr[Er++]=t,Cr[Er++]=n,Cr[Er++]=r,Lr|=r,e.lanes|=r,null!==(e=e.alternate)&&(e.lanes|=r)}function Rr(e,t,n,r){return Tr(e,t,n,r),Or(e)}function Fr(e,t){return Tr(e,null,null,t),Or(e)}function Mr(e,t,n){e.lanes|=n;var r=e.alternate;null!==r&&(r.lanes|=n);for(var a=!1,i=e.return;null!==i;)i.childLanes|=n,null!==(r=i.alternate)&&(r.childLanes|=n),22===i.tag&&(null===(e=i.stateNode)||1&e._visibility||(a=!0)),e=i,i=i.return;return 3===e.tag?(i=e.stateNode,a&&null!==t&&(a=31-xe(n),null===(r=(e=i.hiddenUpdates)[a])?e[a]=[t]:r.push(t),t.lane=536870912|n),i):null}function Or(e){if(50<Wc)throw Wc=0,Gc=null,Error(s(185));for(var t=e.return;null!==t;)t=(e=t).return;return 3===e.tag?e.stateNode:null}var Dr={};function Ir(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zr(e,t,n,r){return new Ir(e,t,n,r)}function Br(e){return!(!(e=e.prototype)||!e.isReactComponent)}function qr(e,t){var n=e.alternate;return null===n?((n=zr(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=65011712&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Ur(e,t){e.flags&=65011714;var n=e.alternate;return null===n?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Vr(e,t,n,r,a,i){var o=0;if(r=e,"function"===typeof e)Br(e)&&(o=1);else if("string"===typeof e)o=function(e,t,n){if(1===n||null!=t.itemProp)return!1;switch(e){case"meta":case"title":return!0;case"style":if("string"!==typeof t.precedence||"string"!==typeof t.href||""===t.href)break;return!0;case"link":if("string"!==typeof t.rel||"string"!==typeof t.href||""===t.href||t.onLoad||t.onError)break;return"stylesheet"!==t.rel||(e=t.disabled,"string"===typeof t.precedence&&null==e);case"script":if(t.async&&"function"!==typeof t.async&&"symbol"!==typeof t.async&&!t.onLoad&&!t.onError&&t.src&&"string"===typeof t.src)return!0}return!1}(e,n,H.current)?26:"html"===e||"head"===e||"body"===e?27:5;else e:switch(e){case S:return(e=zr(31,n,t,a)).elementType=S,e.lanes=i,e;case v:return Hr(n.children,a,i,t);case b:o=8,a|=24;break;case y:return(e=zr(12,n,t,2|a)).elementType=y,e.lanes=i,e;case N:return(e=zr(13,n,t,a)).elementType=N,e.lanes=i,e;case A:return(e=zr(19,n,t,a)).elementType=A,e.lanes=i,e;default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case w:o=10;break e;case x:o=9;break e;case k:o=11;break e;case j:o=14;break e;case _:o=16,r=null;break e}o=29,n=Error(s(130,null===e?"null":typeof e,"")),r=null}return(t=zr(o,n,t,a)).elementType=e,t.type=r,t.lanes=i,t}function Hr(e,t,n,r){return(e=zr(7,e,r,t)).lanes=n,e}function Wr(e,t,n){return(e=zr(6,e,null,t)).lanes=n,e}function Gr(e){var t=zr(18,null,null,0);return t.stateNode=e,t}function $r(e,t,n){return(t=zr(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Yr=new WeakMap;function Kr(e,t){if("object"===typeof e&&null!==e){var n=Yr.get(e);return void 0!==n?n:(t={value:e,source:t,stack:ne(t)},Yr.set(e,t),t)}return{value:e,source:t,stack:ne(t)}}var Xr=[],Zr=0,Jr=null,Qr=0,ea=[],ta=0,na=null,ra=1,aa="";function ia(e,t){Xr[Zr++]=Qr,Xr[Zr++]=Jr,Jr=e,Qr=t}function sa(e,t,n){ea[ta++]=ra,ea[ta++]=aa,ea[ta++]=na,na=e;var r=ra;e=aa;var a=32-xe(r)-1;r&=~(1<<a),n+=1;var i=32-xe(t)+a;if(30<i){var s=a-a%5;i=(r&(1<<s)-1).toString(32),r>>=s,a-=s,ra=1<<32-xe(t)+a|n<<a|r,aa=i+e}else ra=1<<i|n<<a|r,aa=e}function oa(e){null!==e.return&&(ia(e,1),sa(e,1,0))}function la(e){for(;e===Jr;)Jr=Xr[--Zr],Xr[Zr]=null,Qr=Xr[--Zr],Xr[Zr]=null;for(;e===na;)na=ea[--ta],ea[ta]=null,aa=ea[--ta],ea[ta]=null,ra=ea[--ta],ea[ta]=null}function ca(e,t){ea[ta++]=ra,ea[ta++]=aa,ea[ta++]=na,ra=t.id,aa=t.overflow,na=e}var ua=null,da=null,ha=!1,fa=null,pa=!1,ma=Error(s(519));function ga(e){throw ka(Kr(Error(s(418,1<arguments.length&&void 0!==arguments[1]&&arguments[1]?"text":"HTML","")),e)),ma}function va(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[qe]=e,t[Ue]=r,n){case"dialog":Ju("cancel",t),Ju("close",t);break;case"iframe":case"object":case"embed":Ju("load",t);break;case"video":case"audio":for(n=0;n<Ku.length;n++)Ju(Ku[n],t);break;case"source":Ju("error",t);break;case"img":case"image":case"link":Ju("error",t),Ju("load",t);break;case"details":Ju("toggle",t);break;case"input":Ju("invalid",t),yt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ju("invalid",t);break;case"textarea":Ju("invalid",t),Nt(t,r.value,r.defaultValue,r.children)}"string"!==typeof(n=r.children)&&"number"!==typeof n&&"bigint"!==typeof n||t.textContent===""+n||!0===r.suppressHydrationWarning||dd(t.textContent,n)?(null!=r.popover&&(Ju("beforetoggle",t),Ju("toggle",t)),null!=r.onScroll&&Ju("scroll",t),null!=r.onScrollEnd&&Ju("scrollend",t),null!=r.onClick&&(t.onclick=Tt),t=!0):t=!1,t||ga(e,!0)}function ba(e){for(ua=e.return;ua;)switch(ua.tag){case 5:case 31:case 13:return void(pa=!1);case 27:case 3:return void(pa=!0);default:ua=ua.return}}function ya(e){if(e!==ua)return!1;if(!ha)return ba(e),ha=!0,!1;var t,n=e.tag;if((t=3!==n&&27!==n)&&((t=5===n)&&(t=!("form"!==(t=e.type)&&"button"!==t)||wd(e.type,e.memoizedProps)),t=!t),t&&da&&ga(e),ba(e),13===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));da=Dd(e)}else if(31===n){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));da=Dd(e)}else 27===n?(n=da,Cd(e.type)?(e=Od,Od=null,da=e):da=n):da=ua?Md(e.stateNode.nextSibling):null;return!0}function xa(){da=ua=null,ha=!1}function wa(){var e=fa;return null!==e&&(null===Pc?Pc=e:Pc.push.apply(Pc,e),fa=null),e}function ka(e){null===fa?fa=[e]:fa.push(e)}var Na=z(null),Aa=null,ja=null;function _a(e,t,n){q(Na,t._currentValue),t._currentValue=n}function Sa(e){e._currentValue=Na.current,B(Na)}function Ca(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ea(e,t,n,r){var a=e.child;for(null!==a&&(a.return=e);null!==a;){var i=a.dependencies;if(null!==i){var o=a.child;i=i.firstContext;e:for(;null!==i;){var l=i;i=a;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,null!==(l=i.alternate)&&(l.lanes|=n),Ca(i.return,n,e),r||(o=null);break e}i=l.next}}else if(18===a.tag){if(null===(o=a.return))throw Error(s(341));o.lanes|=n,null!==(i=o.alternate)&&(i.lanes|=n),Ca(o,n,e),o=null}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===e){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}}function La(e,t,n,r){e=null;for(var a=t,i=!1;null!==a;){if(!i)if(0!==(524288&a.flags))i=!0;else if(0!==(262144&a.flags))break;if(10===a.tag){var o=a.alternate;if(null===o)throw Error(s(387));if(null!==(o=o.memoizedProps)){var l=a.type;Qn(a.pendingProps.value,o.value)||(null!==e?e.push(l):e=[l])}}else if(a===$.current){if(null===(o=a.alternate))throw Error(s(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(null!==e?e.push(hh):e=[hh])}a=a.return}null!==e&&Ea(t,e,n,r),t.flags|=262144}function Pa(e){for(e=e.firstContext;null!==e;){if(!Qn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ta(e){Aa=e,ja=null,null!==(e=e.dependencies)&&(e.firstContext=null)}function Ra(e){return Ma(Aa,e)}function Fa(e,t){return null===Aa&&Ta(e),Ma(e,t)}function Ma(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},null===ja){if(null===e)throw Error(s(308));ja=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ja=ja.next=t;return n}var Oa="undefined"!==typeof AbortController?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Da=r.unstable_scheduleCallback,Ia=r.unstable_NormalPriority,za={$$typeof:w,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ba(){return{controller:new Oa,data:new Map,refCount:0}}function qa(e){e.refCount--,0===e.refCount&&Da(Ia,function(){e.controller.abort()})}var Ua=null,Va=0,Ha=0,Wa=null;function Ga(){if(0===--Va&&null!==Ua){null!==Wa&&(Wa.status="fulfilled");var e=Ua;Ua=null,Ha=0,Wa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}var $a=F.S;F.S=function(e,t){Fc=le(),"object"===typeof t&&null!==t&&"function"===typeof t.then&&function(e,t){if(null===Ua){var n=Ua=[];Va=0,Ha=Hu(),Wa={status:"pending",value:void 0,then:function(e){n.push(e)}}}Va++,t.then(Ga,Ga)}(0,t),null!==$a&&$a(e,t)};var Ya=z(null);function Ka(){var e=Ya.current;return null!==e?e:mc.pooledCache}function Xa(e,t){q(Ya,null===t?Ya.current:t.pool)}function Za(){var e=Ka();return null===e?null:{parent:za._currentValue,pool:e}}var Ja=Error(s(460)),Qa=Error(s(474)),ei=Error(s(542)),ti={then:function(){}};function ni(e){return"fulfilled"===(e=e.status)||"rejected"===e}function ri(e,t,n){switch(void 0===(n=e[n])?e.push(t):n!==t&&(t.then(Tt,Tt),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw oi(e=t.reason),e;default:if("string"===typeof t.status)t.then(Tt,Tt);else{if(null!==(e=mc)&&100<e.shellSuspendCounter)throw Error(s(482));(e=t).status="pending",e.then(function(e){if("pending"===t.status){var n=t;n.status="fulfilled",n.value=e}},function(e){if("pending"===t.status){var n=t;n.status="rejected",n.reason=e}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw oi(e=t.reason),e}throw ii=t,Ja}}function ai(e){try{return(0,e._init)(e._payload)}catch(bu){if(null!==bu&&"object"===typeof bu&&"function"===typeof bu.then)throw ii=bu,Ja;throw bu}}var ii=null;function si(){if(null===ii)throw Error(s(459));var e=ii;return ii=null,e}function oi(e){if(e===Ja||e===ei)throw Error(s(483))}var li=null,ci=0;function ui(e){var t=ci;return ci+=1,null===li&&(li=[]),ri(li,e,t)}function di(e,t){t=t.props.ref,e.ref=void 0!==t?t:null}function hi(e,t){if(t.$$typeof===p)throw Error(s(525));throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function fi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;null!==e;)null!==e.key?t.set(e.key,e):t.set(e.index,e),e=e.sibling;return t}function a(e,t){return(e=qr(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=67108866,n):r:(t.flags|=67108866,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=67108866),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Wr(n,e.mode,r)).return=e,t):((t=a(t,n)).return=e,t)}function c(e,t,n,r){var i=n.type;return i===v?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"===typeof i&&null!==i&&i.$$typeof===_&&ai(i)===t.type)?(di(t=a(t,n.props),n),t.return=e,t):(di(t=Vr(n.type,n.key,n.props,null,e.mode,r),n),t.return=e,t)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=$r(n,e.mode,r)).return=e,t):((t=a(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Hr(n,e.mode,r,i)).return=e,t):((t=a(t,n)).return=e,t)}function h(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t||"bigint"===typeof t)return(t=Wr(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case m:return di(n=Vr(t.type,t.key,t.props,null,e.mode,n),t),n.return=e,n;case g:return(t=$r(t,e.mode,n)).return=e,t;case _:return h(e,t=ai(t),n)}if(R(t)||L(t))return(t=Hr(t,e.mode,n,null)).return=e,t;if("function"===typeof t.then)return h(e,ui(t),n);if(t.$$typeof===w)return h(e,Fa(e,t),n);hi(e,t)}return null}function f(e,t,n,r){var a=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n||"bigint"===typeof n)return null!==a?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case m:return n.key===a?c(e,t,n,r):null;case g:return n.key===a?u(e,t,n,r):null;case _:return f(e,t,n=ai(n),r)}if(R(n)||L(n))return null!==a?null:d(e,t,n,r,null);if("function"===typeof n.then)return f(e,t,ui(n),r);if(n.$$typeof===w)return f(e,t,Fa(e,n),r);hi(e,n)}return null}function p(e,t,n,r,a){if("string"===typeof r&&""!==r||"number"===typeof r||"bigint"===typeof r)return l(t,e=e.get(n)||null,""+r,a);if("object"===typeof r&&null!==r){switch(r.$$typeof){case m:return c(t,e=e.get(null===r.key?n:r.key)||null,r,a);case g:return u(t,e=e.get(null===r.key?n:r.key)||null,r,a);case _:return p(e,t,n,r=ai(r),a)}if(R(r)||L(r))return d(t,e=e.get(n)||null,r,a,null);if("function"===typeof r.then)return p(e,t,n,ui(r),a);if(r.$$typeof===w)return p(e,t,n,Fa(t,r),a);hi(t,r)}return null}function b(l,c,u,d){if("object"===typeof u&&null!==u&&u.type===v&&null===u.key&&(u=u.props.children),"object"===typeof u&&null!==u){switch(u.$$typeof){case m:e:{for(var y=u.ke
vendor: 9,355 bytes, line 2
2y;null!==c;){if(c.key===y){if((y=u.type)===v){if(7===c.tag){n(l,c.sibling),(d=a(c,u.props.children)).return=l,l=d;break e}}else if(c.elementType===y||"object"===typeof y&&null!==y&&y.$$typeof===_&&ai(y)===c.type){n(l,c.sibling),di(d=a(c,u.props),u),d.return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}u.type===v?((d=Hr(u.props.children,l.mode,d,u.key)).return=l,l=d):(di(d=Vr(u.type,u.key,u.props,null,l.mode,d),u),d.return=l,l=d)}return o(l);case g:e:{for(y=u.key;null!==c;){if(c.key===y){if(4===c.tag&&c.stateNode.containerInfo===u.containerInfo&&c.stateNode.implementation===u.implementation){n(l,c.sibling),(d=a(c,u.children||[])).return=l,l=d;break e}n(l,c);break}t(l,c),c=c.sibling}(d=$r(u,l.mode,d)).return=l,l=d}return o(l);case _:return b(l,c,u=ai(u),d)}if(R(u))return function(a,s,o,l){for(var c=null,u=null,d=s,m=s=0,g=null;null!==d&&m<o.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(a,d,o[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(a,d),s=i(v,s,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===o.length)return n(a,d),ha&&ia(a,m),c;if(null===d){for(;m<o.length;m++)null!==(d=h(a,o[m],l))&&(s=i(d,s,m),null===u?c=d:u.sibling=d,u=d);return ha&&ia(a,m),c}for(d=r(d);m<o.length;m++)null!==(g=p(d,a,m,o[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),s=i(g,s,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(a,e)}),ha&&ia(a,m),c}(l,c,u,d);if(L(u)){if("function"!==typeof(y=L(u)))throw Error(s(150));return function(a,o,l,c){if(null==l)throw Error(s(151));for(var u=null,d=null,m=o,g=o=0,v=null,b=l.next();null!==m&&!b.done;g++,b=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var y=f(a,m,b.value,c);if(null===y){null===m&&(m=v);break}e&&m&&null===y.alternate&&t(a,m),o=i(y,o,g),null===d?u=y:d.sibling=y,d=y,m=v}if(b.done)return n(a,m),ha&&ia(a,g),u;if(null===m){for(;!b.done;g++,b=l.next())null!==(b=h(a,b.value,c))&&(o=i(b,o,g),null===d?u=b:d.sibling=b,d=b);return ha&&ia(a,g),u}for(m=r(m);!b.done;g++,b=l.next())null!==(b=p(m,a,g,b.value,c))&&(e&&null!==b.alternate&&m.delete(null===b.key?g:b.key),o=i(b,o,g),null===d?u=b:d.sibling=b,d=b);return e&&m.forEach(function(e){return t(a,e)}),ha&&ia(a,g),u}(l,c,u=y.call(u),d)}if("function"===typeof u.then)return b(l,c,ui(u),d);if(u.$$typeof===w)return b(l,c,Fa(l,u),d);hi(l,u)}return"string"===typeof u&&""!==u||"number"===typeof u||"bigint"===typeof u?(u=""+u,null!==c&&6===c.tag?(n(l,c.sibling),(d=a(c,u)).return=l,l=d):(n(l,c),(d=Wr(u,l.mode,d)).return=l,l=d),o(l)):n(l,c)}return function(e,t,n,r){try{ci=0;var a=b(e,t,n,r);return li=null,a}catch(bu){if(bu===Ja||bu===ei)throw bu;var i=zr(29,bu,null,e.mode);return i.lanes=r,i.return=e,i}}}var pi=fi(!0),mi=fi(!1),gi=!1;function vi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function bi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function yi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function xi(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!==(2&pc)){var a=r.pending;return null===a?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Or(e),Mr(e,null,n),t}return Tr(e,r,t,n),Or(e)}function wi(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194048&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Fe(e,n)}}function ki(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var a=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};null===i?a=i=s:i=i.next=s,n=n.next}while(null!==n);null===i?a=i=t:i=i.next=t}else a=i=t;return n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ni=!1;function Ai(){if(Ni){if(null!==Wa)throw Wa}}function ji(e,t,n,r){Ni=!1;var a=e.updateQueue;gi=!1;var i=a.firstBaseUpdate,s=a.lastBaseUpdate,o=a.shared.pending;if(null!==o){a.shared.pending=null;var l=o,c=l.next;l.next=null,null===s?i=c:s.next=c,s=l;var u=e.alternate;null!==u&&((o=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===o?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l))}if(null!==i){var d=a.baseState;for(s=0,u=c=l=null,o=i;;){var h=-536870913&o.lane,p=h!==o.lane;if(p?(vc&h)===h:(r&h)===h){0!==h&&h===Ha&&(Ni=!0),null!==u&&(u=u.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,g=o;h=t;var v=n;switch(g.tag){case 1:if("function"===typeof(m=g.payload)){d=m.call(v,d,h);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null===(h="function"===typeof(m=g.payload)?m.call(v,d,h):m)||void 0===h)break e;d=f({},d,h);break e;case 2:gi=!0}}null!==(h=o.callback)&&(e.flags|=64,p&&(e.flags|=8192),null===(p=a.callbacks)?a.callbacks=[h]:p.push(h))}else p={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===u?(c=u=p,l=d):u=u.next=p,s|=h;if(null===(o=o.next)){if(null===(o=a.shared.pending))break;o=(p=o).next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}null===u&&(l=d),a.baseState=l,a.firstBaseUpdate=c,a.lastBaseUpdate=u,null===i&&(a.shared.lanes=0),jc|=s,e.lanes=s,e.memoizedState=d}}function _i(e,t){if("function"!==typeof e)throw Error(s(191,e));e.call(t)}function Si(e,t){var n=e.callbacks;if(null!==n)for(e.callbacks=null,e=0;e<n.length;e++)_i(n[e],t)}var Ci=z(null),Ei=z(0);function Li(e,t){q(Ei,e=Nc),q(Ci,t),Nc=e|t.baseLanes}function Pi(){q(Ei,Nc),q(Ci,Ci.current)}function Ti(){Nc=Ei.current,B(Ci),B(Ei)}var Ri=z(null),Fi=null;function Mi(e){var t=e.alternate;q(Bi,1&Bi.current),q(Ri,e),null===Fi&&(null===t||null!==Ci.current||null!==t.memoizedState)&&(Fi=e)}function Oi(e){q(Bi,Bi.current),q(Ri,e),null===Fi&&(Fi=e)}function Di(e){22===e.tag?(q(Bi,Bi.current),q(Ri,e),null===Fi&&(Fi=e)):Ii()}function Ii(){q(Bi,Bi.current),q(Ri,Ri.current)}function zi(e){B(Ri),Fi===e&&(Fi=null),B(Bi)}var Bi=z(0);function qi(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Rd(n)||Fd(n)))return t}else if(19!==t.tag||"forwards"!==t.memoizedProps.revealOrder&&"backwards"!==t.memoizedProps.revealOrder&&"unstable_legacy-backwards"!==t.memoizedProps.revealOrder&&"together"!==t.memoizedProps.revealOrder){if(null!==t.child){t.child.return=t,t=t.child;continue}}else if(0!==(128&t.flags))return t;if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ui=0,Vi=null,Hi=null,Wi=null,Gi=!1,$i=!1,Yi=!1,Ki=0,Xi=0,Zi=null,Ji=0;function Qi(){throw Error(s(321))}function es(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Qn(e[n],t[n]))return!1;return!0}function ts(e,t,n,r,a,i){return Ui=i,Vi=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,F.H=null===e||null===e.memoizedState?vo:bo,Yi=!1,i=n(r,a),Yi=!1,$i&&(i=rs(t,n,r,a)),ns(e),i}function ns(e){F.H=go;var t=null!==Hi&&null!==Hi.next;if(Ui=0,Wi=Hi=Vi=null,Gi=!1,Xi=0,Zi=null,t)throw Error(s(300));null===e||Fo||null!==(e=e.dependencies)&&Pa(e)&&(Fo=!0)}function rs(e,t,n,r){Vi=e;var a=0;do{if($i&&(Zi=null),Xi=0,$i=!1,25<=a)throw Error(s(301));if(a+=1,Wi=Hi=null,null!=e.updateQueue){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,null!=i.memoCache&&(i.memoCache.index=0)}F.H=yo,i=t(n,r)}while($i);return i}function as(){var e=F.H,t=e.useState()[0];return t="function"===typeof t.then?us(t):t,e=e.useState()[0],(null!==Hi?Hi.memoizedState:null)!==e&&(Vi.flags|=1024),t}function is(){var e=0!==Ki;return Ki=0,e}function ss(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function os(e){if(Gi){for(e=e.memoizedState;null!==e;){var t=e.queue;null!==t&&(t.pending=null),e=e.next}Gi=!1}Ui=0,Wi=Hi=Vi=null,$i=!1,Xi=Ki=0,Zi=null}function ls(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Wi?Vi.memoizedState=Wi=e:Wi=Wi.next=e,Wi}function cs(){if(null===Hi){var e=Vi.alternate;e=null!==e?e.memoizedState:null}else e=Hi.next;var t=null===Wi?Vi.memoizedState:Wi.next;if(null!==t)Wi=t,Hi=e;else{if(null===e){if(null===Vi.alternate)throw Error(s(467));throw Error(s(310))}e={memoizedState:(Hi=e).memoizedState,baseState:Hi.baseState,baseQueue:Hi.baseQueue,queue:Hi.queue,next:null},null===Wi?Vi.memoizedState=Wi=e:Wi=Wi.next=e}return Wi}function us(e){var t=Xi;return Xi+=1,null===Zi&&(Zi=[]),e=ri(Zi,e,t),t=Vi,null===(null===Wi?t.memoizedState:Wi.next)&&(t=t.alternate,F.H=null===t||null===t.memoizedState?vo:bo),e}function ds(e){if(null!==e&&"object"===typeof e){if("function"===typeof e.then)return us(e);if(e.$$typeof===w)return Ra(e)}throw Error(s(438,String(e)))}function hs(e){var t=null,n=Vi.updateQueue;if(null!==n&&(t=n.memoCache),null==t){var r=Vi.alternate;null!==r&&(null!==(r=r.updateQueue)&&(null!=(r=r.memoCache)&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(null==t&&(t={data:[],index:0}),null===n&&(n={lastEffect:null,events:null,stores:null,memoCache:null},Vi.updateQueue=n),n.memoCache=t,void 0===(n=t.data[t.index]))for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=C;return t.index++,n}function fs(e,t){return"function"===typeof t?t(e):t}function ps(e){return ms(cs(),Hi,e)}
vendor: 9,101 bytes, line 2
2function ms(e,t,n){var r=e.queue;if(null===r)throw Error(s(311));r.lastRenderedReducer=n;var a=e.baseQueue,i=r.pending;if(null!==i){if(null!==a){var o=a.next;a.next=i.next,i.next=o}t.baseQueue=a=i,r.pending=null}if(i=e.baseState,null===a)e.memoizedState=i;else{var l=o=null,c=null,u=t=a.next,d=!1;do{var h=-536870913&u.lane;if(h!==u.lane?(vc&h)===h:(Ui&h)===h){var f=u.revertLane;if(0===f)null!==c&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),h===Ha&&(d=!0);else{if((Ui&f)===f){u=u.next,f===Ha&&(d=!0);continue}h={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=h,o=i):c=c.next=h,Vi.lanes|=f,jc|=f}h=u.action,Yi&&n(i,h),i=u.hasEagerState?u.eagerState:n(i,h)}else f={lane:h,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},null===c?(l=c=f,o=i):c=c.next=f,Vi.lanes|=h,jc|=h;u=u.next}while(null!==u&&u!==t);if(null===c?o=i:c.next=l,!Qn(i,e.memoizedState)&&(Fo=!0,d&&null!==(n=Wa)))throw n;e.memoizedState=i,e.baseState=o,e.baseQueue=c,r.lastRenderedState=i}return null===a&&(r.lanes=0),[e.memoizedState,r.dispatch]}function gs(e){var t=cs(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(null!==a){n.pending=null;var o=a=a.next;do{i=e(i,o.action),o=o.next}while(o!==a);Qn(i,t.memoizedState)||(Fo=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function vs(e,t,n){var r=Vi,a=cs(),i=ha;if(i){if(void 0===n)throw Error(s(407));n=n()}else n=t();var o=!Qn((Hi||a).memoizedState,n);if(o&&(a.memoizedState=n,Fo=!0),a=a.queue,Us(xs.bind(null,r,a,e),[e]),a.getSnapshot!==t||o||null!==Wi&&1&Wi.memoizedState.tag){if(r.flags|=2048,Ds(9,{destroy:void 0},ys.bind(null,r,a,n,t),null),null===mc)throw Error(s(349));i||0!==(127&Ui)||bs(r,t,n)}return n}function bs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Vi.updateQueue)?(t={lastEffect:null,events:null,stores:null,memoCache:null},Vi.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ys(e,t,n,r){t.value=n,t.getSnapshot=r,ws(t)&&ks(e)}function xs(e,t,n){return n(function(){ws(t)&&ks(e)})}function ws(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Qn(e,n)}catch(r){return!0}}function ks(e){var t=Fr(e,2);null!==t&&Kc(t,e,2)}function Ns(e){var t=ls();if("function"===typeof e){var n=e;if(e=n(),Yi){ye(!0);try{n()}finally{ye(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:e},t}function As(e,t,n,r){return e.baseState=n,ms(e,Hi,"function"===typeof r?r:fs)}function js(e,t,n,r,a){if(fo(e))throw Error(s(485));if(null!==(e=t.action)){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(e){i.listeners.push(e)}};null!==F.T?n(!0):i.isTransition=!1,r(i),null===(n=t.pending)?(i.next=t.pending=i,_s(t,i)):(i.next=n.next,t.pending=n.next=i)}}function _s(e,t){var n=t.action,r=t.payload,a=e.state;if(t.isTransition){var i=F.T,s={};F.T=s;try{var o=n(a,r),l=F.S;null!==l&&l(s,o),Ss(e,t,o)}catch(c){Es(e,t,c)}finally{null!==i&&null!==s.types&&(i.types=s.types),F.T=i}}else try{Ss(e,t,i=n(a,r))}catch(u){Es(e,t,u)}}function Ss(e,t,n){null!==n&&"object"===typeof n&&"function"===typeof n.then?n.then(function(n){Cs(e,t,n)},function(n){return Es(e,t,n)}):Cs(e,t,n)}function Cs(e,t,n){t.status="fulfilled",t.value=n,Ls(t),e.state=n,null!==(t=e.pending)&&((n=t.next)===t?e.pending=null:(n=n.next,t.next=n,_s(e,n)))}function Es(e,t,n){var r=e.pending;if(e.pending=null,null!==r){r=r.next;do{t.status="rejected",t.reason=n,Ls(t),t=t.next}while(t!==r)}e.action=null}function Ls(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ps(e,t){return t}function Ts(e,t){if(ha){var n=mc.formState;if(null!==n){e:{var r=Vi;if(ha){if(da){t:{for(var a=da,i=pa;8!==a.nodeType;){if(!i){a=null;break t}if(null===(a=Md(a.nextSibling))){a=null;break t}}a="F!"===(i=a.data)||"F"===i?a:null}if(a){da=Md(a.nextSibling),r="F!"===a.data;break e}}ga(r)}r=!1}r&&(t=n[0])}}return(n=ls()).memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:t},n.queue=r,n=co.bind(null,Vi,r),r.dispatch=n,r=Ns(!1),i=ho.bind(null,Vi,!1,r.queue),a={state:t,dispatch:null,action:e,pending:null},(r=ls()).queue=a,n=js.bind(null,Vi,a,i,n),a.dispatch=n,r.memoizedState=e,[t,n,!1]}function Rs(e){return Fs(cs(),Hi,e)}function Fs(e,t,n){if(t=ms(e,t,Ps)[0],e=ps(fs)[0],"object"===typeof t&&null!==t&&"function"===typeof t.then)try{var r=us(t)}catch(bu){if(bu===Ja)throw ei;throw bu}else r=t;var a=(t=cs()).queue,i=a.dispatch;return n!==t.memoizedState&&(Vi.flags|=2048,Ds(9,{destroy:void 0},Ms.bind(null,a,n),null)),[r,i,e]}function Ms(e,t){e.action=t}function Os(e){var t=cs(),n=Hi;if(null!==n)return Fs(t,n,e);cs(),t=t.memoizedState;var r=(n=cs()).queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ds(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},null===(t=Vi.updateQueue)&&(t={lastEffect:null,events:null,stores:null,memoCache:null},Vi.updateQueue=t),null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Is(){return cs().memoizedState}function zs(e,t,n,r){var a=ls();Vi.flags|=e,a.memoizedState=Ds(1|t,{destroy:void 0},n,void 0===r?null:r)}function Bs(e,t,n,r){var a=cs();r=void 0===r?null:r;var i=a.memoizedState.inst;null!==Hi&&null!==r&&es(r,Hi.memoizedState.deps)?a.memoizedState=Ds(t,i,n,r):(Vi.flags|=e,a.memoizedState=Ds(1|t,i,n,r))}function qs(e,t){zs(8390656,8,e,t)}function Us(e,t){Bs(2048,8,e,t)}function Vs(e){var t=cs().memoizedState;return function(e){Vi.flags|=4;var t=Vi.updateQueue;if(null===t)t={lastEffect:null,events:null,stores:null,memoCache:null},Vi.updateQueue=t,t.events=[e];else{var n=t.events;null===n?t.events=[e]:n.push(e)}}({ref:t,nextImpl:e}),function(){if(0!==(2&pc))throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Hs(e,t){return Bs(4,2,e,t)}function Ws(e,t){return Bs(4,4,e,t)}function Gs(e,t){if("function"===typeof t){e=e();var n=t(e);return function(){"function"===typeof n?n():t(null)}}if(null!==t&&void 0!==t)return e=e(),t.current=e,function(){t.current=null}}function $s(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,Bs(4,4,Gs.bind(null,t,e),n)}function Ys(){}function Ks(e,t){var n=cs();t=void 0===t?null:t;var r=n.memoizedState;return null!==t&&es(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Xs(e,t){var n=cs();t=void 0===t?null:t;var r=n.memoizedState;if(null!==t&&es(t,r[1]))return r[0];if(r=e(),Yi){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r}function Zs(e,t,n){return void 0===n||0!==(1073741824&Ui)&&0===(261930&vc)?e.memoizedState=t:(e.memoizedState=n,e=Yc(),Vi.lanes|=e,jc|=e,n)}function Js(e,t,n,r){return Qn(n,t)?n:null!==Ci.current?(e=Zs(e,n,r),Qn(e,t)||(Fo=!0),e):0===(42&Ui)||0!==(1073741824&Ui)&&0===(261930&vc)?(Fo=!0,e.memoizedState=n):(e=Yc(),Vi.lanes|=e,jc|=e,t)}function Qs(e,t,n,r,a){var i=M.p;M.p=0!==i&&8>i?i:8;var s=F.T,o={};F.T=o,ho(e,!1,t,n);try{var l=a(),c=F.S;if(null!==c&&c(o,l),null!==l&&"object"===typeof l&&"function"===typeof l.then){var u=function(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status="rejected",r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}(l,r);uo(e,t,u,$c())}else uo(e,t,r,$c())}catch(d){uo(e,t,{then:function(){},status:"rejected",reason:d},$c())}finally{M.p=i,null!==s&&null!==o.types&&(s.types=o.types),F.T=s}}function eo(){}function to(e,t,n,r){if(5!==e.tag)throw Error(s(476));var a=no(e).queue;Qs(e,a,t,O,null===n?eo:function(){return ro(e),n(r)})}function no(e){var t=e.memoizedState;if(null!==t)return t;var n={};return(t={memoizedState:O,baseState:O,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:O},next:null}).next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fs,lastRenderedState:n},next:null},e.memoizedState=t,null!==(e=e.alternate)&&(e.memoizedState=t),t}function ro(e){var t=no(e);null===t.next&&(t=e.alternate.memoizedState),uo(e,t.next.queue,{},$c())}function ao(){return Ra(hh)}function io(){return cs().memoizedState}function so(){return cs().memoizedState}function oo(e){for(var t=e.return;null!==t;){switch(t.tag){case 24:case 3:var n=$c(),r=xi(t,e=yi(n),n);return null!==r&&(Kc(r,t,n),wi(r,t,n)),t={cache:Ba()},void(e.payload=t)}t=t.return}}function lo(e,t,n){var r=$c();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fo(e)?po(t,n):null!==(n=Rr(e,t,n,r))&&(Kc(n,e,r),mo(n,t,r))}function co(e,t,n){uo(e,t,n,$c())}function uo(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fo(e))po(t,a);else{var i=e.alternate;
vendor: 4,816 bytes, line 2
2if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var s=t.lastRenderedState,o=i(s,n);if(a.hasEagerState=!0,a.eagerState=o,Qn(o,s))return Tr(e,t,a,0),null===mc&&Pr(),!1}catch(l){}if(null!==(n=Rr(e,t,a,r)))return Kc(n,e,r),mo(n,t,r),!0}return!1}function ho(e,t,n,r){if(r={lane:2,revertLane:Hu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fo(e)){if(t)throw Error(s(479))}else null!==(t=Rr(e,n,r,2))&&Kc(t,e,2)}function fo(e){var t=e.alternate;return e===Vi||null!==t&&t===Vi}function po(e,t){$i=Gi=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function mo(e,t,n){if(0!==(4194048&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Fe(e,n)}}var go={readContext:Ra,use:ds,useCallback:Qi,useContext:Qi,useEffect:Qi,useImperativeHandle:Qi,useLayoutEffect:Qi,useInsertionEffect:Qi,useMemo:Qi,useReducer:Qi,useRef:Qi,useState:Qi,useDebugValue:Qi,useDeferredValue:Qi,useTransition:Qi,useSyncExternalStore:Qi,useId:Qi,useHostTransitionStatus:Qi,useFormState:Qi,useActionState:Qi,useOptimistic:Qi,useMemoCache:Qi,useCacheRefresh:Qi};go.useEffectEvent=Qi;var vo={readContext:Ra,use:ds,useCallback:function(e,t){return ls().memoizedState=[e,void 0===t?null:t],e},useContext:Ra,useEffect:qs,useImperativeHandle:function(e,t,n){n=null!==n&&void 0!==n?n.concat([e]):null,zs(4194308,4,Gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zs(4194308,4,e,t)},useInsertionEffect:function(e,t){zs(4,2,e,t)},useMemo:function(e,t){var n=ls();t=void 0===t?null:t;var r=e();if(Yi){ye(!0);try{e()}finally{ye(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ls();if(void 0!==n){var a=n(t);if(Yi){ye(!0);try{n(t)}finally{ye(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=lo.bind(null,Vi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ls().memoizedState=e},useState:function(e){var t=(e=Ns(e)).queue,n=co.bind(null,Vi,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ys,useDeferredValue:function(e,t){return Zs(ls(),e,t)},useTransition:function(){var e=Ns(!1);return e=Qs.bind(null,Vi,e.queue,!0,!1),ls().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Vi,a=ls();if(ha){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===mc)throw Error(s(349));0!==(127&vc)||bs(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,qs(xs.bind(null,r,i,e),[e]),r.flags|=2048,Ds(9,{destroy:void 0},ys.bind(null,r,i,n,t),null),n},useId:function(){var e=ls(),t=mc.identifierPrefix;if(ha){var n=aa;t="_"+t+"R_"+(n=(ra&~(1<<32-xe(ra)-1)).toString(32)+n),0<(n=Ki++)&&(t+="H"+n.toString(32)),t+="_"}else t="_"+t+"r_"+(n=Ji++).toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:ao,useFormState:Ts,useActionState:Ts,useOptimistic:function(e){var t=ls();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=ho.bind(null,Vi,!0,n),n.dispatch=t,[e,t]},useMemoCache:hs,useCacheRefresh:function(){return ls().memoizedState=oo.bind(null,Vi)},useEffectEvent:function(e){var t=ls(),n={impl:e};return t.memoizedState=n,function(){if(0!==(2&pc))throw Error(s(440));return n.impl.apply(void 0,arguments)}}},bo={readContext:Ra,use:ds,useCallback:Ks,useContext:Ra,useEffect:Us,useImperativeHandle:$s,useInsertionEffect:Hs,useLayoutEffect:Ws,useMemo:Xs,useReducer:ps,useRef:Is,useState:function(){return ps(fs)},useDebugValue:Ys,useDeferredValue:function(e,t){return Js(cs(),Hi.memoizedState,e,t)},useTransition:function(){var e=ps(fs)[0],t=cs().memoizedState;return["boolean"===typeof e?e:us(e),t]},useSyncExternalStore:vs,useId:io,useHostTransitionStatus:ao,useFormState:Rs,useActionState:Rs,useOptimistic:function(e,t){return As(cs(),0,e,t)},useMemoCache:hs,useCacheRefresh:so};bo.useEffectEvent=Vs;var yo={readContext:Ra,use:ds,useCallback:Ks,useContext:Ra,useEffect:Us,useImperativeHandle:$s,useInsertionEffect:Hs,useLayoutEffect:Ws,useMemo:Xs,useReducer:gs,useRef:Is,useState:function(){return gs(fs)},useDebugValue:Ys,useDeferredValue:function(e,t){var n=cs();return null===Hi?Zs(n,e,t):Js(n,Hi.memoizedState,e,t)},useTransition:function(){var e=gs(fs)[0],t=cs().memoizedState;return["boolean"===typeof e?e:us(e),t]},useSyncExternalStore:vs,useId:io,useHostTransitionStatus:ao,useFormState:Os,useActionState:Os,useOptimistic:function(e,t){var n=cs();return null!==Hi?As(n,0,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:hs,useCacheRefresh:so};function xo(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:f({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}yo.useEffectEvent=Vs;var wo={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=$c(),a=yi(r);
2a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=xi(e,a,r))&&(Kc(t,e,r),wi(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=$c(),a=yi(r);a.tag=1,a.payload=t,void 0!==n&&null!==n&&(a.callback=n),null!==(t=xi(e,a,r))&&(Kc(t,e,r),wi(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=$c(),r=yi(n);r.tag=2,void 0!==t&&null!==t&&(r.callback=t),null!==(t=xi(e,r,n))&&(Kc(t,e,n),wi(t,e,n))}};function ko(e,t,n,r,a,i,s){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,s):!t.prototype||!t.prototype.isPureReactComponent||(!er(n,r)||!er(a,i))}function No(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&wo.enqueueReplaceState(t,t.state,null)}function Ao(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var a in n===t&&(n=f({},n)),e)void 0===n[a]&&(n[a]=e[a]);return n}function jo(e){Sr(e)}function _o(e){console.error(e)}function So(e){Sr(e)}function Co(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Eo(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Lo(e,t,n){return(n=yi(n)).tag=3,n.payload={element:null},n.callback=function(){Co(e,t)},n}function Po(e){return(e=yi(e)).tag=3,e}function To(e,t,n,r){var a=n.type.getDerivedStateFromError;if("function"===typeof a){var i=r.value;e.payload=function(){return a(i)},e.callback=function(){Eo(t,n,r)}}var s=n.stateNode;null!==s&&"function"===typeof s.componentDidCatch&&(e.callback=function(){Eo(t,n,r),"function"!==typeof a&&(null===Dc?Dc=new Set([this]):Dc.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var Ro=Error(s(461)),Fo=!1;function Mo(e,t,n,r){t.child=null===e?mi(t,null,n,r):pi(t,e.child,n,r)}function Oo(e,t,n,r,a){n=n.render;var i=t.ref;if("ref"in r){var s={};for(var o in r)"ref"!==o&&(s[o]=r[o])}else s=r;return Ta(t),r=ts(e,t,n,s,i,a),o=is(),null===e||Fo?(ha&&o&&oa(t),t.flags|=1,Mo(e,t,r,a),t.child):(ss(e,t,a),il(e,t,a))}function Do(e,t,n,r,a){if(null===e){var i=n.type;return"function"!==typeof i||Br(i)||void 0!==i.defaultProps||null!==n.compare?((e=Vr(n.type,null,r,t,t.mode,a)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Io(e,t,i,r,a))}if(i=e.child,!sl(e,a)){var s=i.memoizedProps;if((n=null!==(n=n.compare)?n:er)(s,r)&&e.ref===t.ref)return il(e,t,a)}return t.flags|=1,(e=qr(i,r)).ref=t.ref,e.return=t,t.child=e}function Io(e,t,n,r,a){if(null!==e){var i=e.memoizedProps;if(er(i,r)&&e.ref===t.ref){if(Fo=!1,t.pendingProps=r=i,!sl(e,a))return t.lanes=e.lanes,il(e,t,a);0!==(131072&e.flags)&&(Fo=!0)}}return Wo(e,t,n,r,a)}function zo(e,t,n,r){var a=r.children,i=null!==e?e.memoizedState:null;if(null===e&&null===t.stateNode&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),"hidden"===r.mode){if(0!==(128&t.flags)){if(i=null!==i?i.baseLanes|n:n,null!==e){for(r=t.child=e.child,a=0;null!==r;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~i}else r=0,t.child=null;return qo(e,t,i,n,r)}if(0===(536870912&n))return r=t.lanes=536870912,qo(e,t,null!==i?i.baseLanes|n:n,n,r);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&Xa(0,null!==i?i.cachePool:null),null!==i?Li(t,i):Pi(),Di(t)}else null!==i?(Xa(0,i.cachePool),Li(t,i),Ii(),t.memoizedState=null):(null!==e&&Xa(0,null),Pi(),Ii());return Mo(e,t,a,n),t.child}function Bo(e,t){return null!==e&&22===e.tag||null!==t.stateNode||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function qo(e,t,n,r,a){var i=Ka();return i=null===i?null:{parent:za._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},null!==e&&Xa(0,null),Pi(),Di(t),null!==e&&La(e,t,r,!0),t.childLanes=a,null}function Uo(e,t){return(t=el({mode:t.mode,children:t.children},e.mode)).ref=e.ref,e.child=t,t.return=e,t}function Vo(e,t,n){return pi(t,e.child,null,n),(e=Uo(t,t.pendingProps)).flags|=2,zi(t),t.memoizedState=null,e}function Ho(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!==typeof n&&"object"!==typeof n)throw Error(s(284));null!==e&&e.ref===n||(t.flags|=4194816)}}function Wo(e,t,n,r,a){return Ta(t),n=ts(e,t,n,r,void 0,a),r=is(),null===e||Fo?(ha&&r&&oa(t),t.flags|=1,Mo(e,t,n,a),t.child):(ss(e,t,a),il(e,t,a))}function Go(e,t,n,r,a,i){return Ta(t),t.updateQueue=null,n=rs(t,r,n,a),ns(e),r=is(),null===e||Fo?(ha&&r&&oa(t),t.flags|=1,Mo(e,t,n,i),t.child):(ss(e,t,i),il(e,t,i))}function $o(e,t,n,r,a){if(Ta(t),null===t.stateNode){var i=Dr,s=n.contextType;"object"===typeof s&&null!==s&&(i=Ra(s)),i=new n(r,i),t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,i.updater=wo,t.stateNode=i,i._reactInternals=t,(i=t.stateNode).props=r,i.state=t.memoizedState,i.refs={},vi(t),s=n.contextType,i.context="object"===typeof s&&null!==s?Ra(s):Dr,i.state=t.memoizedState,"function"===typeof(s=n.getDerivedStateFromProps)&&(xo(t,n,s,r),i.state=t.memoizedState),"function"===typeof n.getDerivedStateFromProps||"function"===typeof i.getSnapshotBeforeUpdate||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||(s=i.state,"function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),s!==i.state&&wo.enqueueReplaceState(i,i.state,null),ji(t,r,i,a),Ai(),i.state=t.memoizedState),"function"===typeof i.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){i=t.stateNode;var o=t.memoizedProps,l=Ao(n,o);i.props=l;var c=i.context,u=n.contextType;s=Dr,"object"===typeof u&&null!==u&&(s=Ra(u));var d=n.getDerivedStateFromProps;u="function"===typeof d||"function"===typeof i.getSnapshotBeforeUpdate,o=t.pendingProps!==o,u||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(o||c!==s)&&No(t,i,r,s),gi=!1;var h=t.memoizedState;i.state=h,ji(t,r,i,a),Ai(),c=t.memoizedState,o||h!==c||gi?("function"===typeof d&&(xo(t,n,d,r),c=t.memoizedState),(l=gi||ko(t,n,l,r,h,c,s))?(u||"function"!==typeof i.UNSAFE_componentWillMount&&"function"!==typeof i.componentWillMount||("function"===typeof i.componentWillMount&&i.componentWillMount(),"function"===typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount()),"function"===typeof i.componentDidMount&&(t.flags|=4194308)):("function"===typeof i.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),i.props=r,i.state=c,i.context=s,r=l):("function"===typeof i.componentDidMount&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,bi(e,t),u=Ao(n,s=t.memoizedProps),i.props=u,d=t.pendingProps,h=i.context,c=n.contextType,l=Dr,"object"===typeof c&&null!==c&&(l=Ra(c)),(c="function"===typeof(o=n.getDerivedStateFromProps)||"function"===typeof i.getSnapshotBeforeUpdate)||"function"!==typeof i.UNSAFE_componentWillReceiveProps&&"function"!==typeof i.componentWillReceiveProps||(s!==d||h!==l)&&No(t,i,r,l),gi=!1,h=t.memoizedState,i.state=h,ji(t,r,i,a),Ai();var f=t.memoizedState;s!==d||h!==f||gi||null!==e&&null!==e.dependencies&&Pa(e.dependencies)?("function"===typeof o&&(xo(t,n,o,r),f=t.memoizedState),(u=gi||ko(t,n,u,r,h,f,l)||null!==e&&null!==e.dependencies&&Pa(e.dependencies))?(c||"function"!==typeof i.UNSAFE_componentWillUpdate&&"function"!==typeof i.componentWillUpdate||("function"===typeof i.componentWillUpdate&&i.componentWillUpdate(r,f,l),"function"===typeof i.UNSAFE_componentWillUpdate&&i.UNSAFE_componentWillUpdate(r,f,l)),"function"===typeof i.componentDidUpdate&&(t.flags|=4),"function"===typeof i.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof i.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),i.props=r,i.state=f,i.context=l,r=u):("function"!==typeof i.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!==typeof i.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,Ho(e,t),r=0!==(128&t.flags),i||r?(i=t.stateNode,n=r&&"function"!==typeof n.getDerivedStateFromError?null:i.render(),t.flags|=1,null!==e&&r?(t.child=pi(t,e.child,null,a),t.child=pi(t,null,n,a)):Mo(e,t,n,a),t.memoizedState=i.state,e=t.child):e=il(e,t,a),e}function Yo(e,t,n,r){return xa(),t.flags|=256,Mo(e,t,n,r),t.child}var Ko={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Xo(e){return{baseLanes:e,cachePool:Za()}}
vendor: 4,417 bytes, line 2
2function Zo(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=Cc),e}function Jo(e,t,n){var r,a=t.pendingProps,i=!1,o=0!==(128&t.flags);if((r=o)||(r=(null===e||null!==e.memoizedState)&&0!==(2&Bi.current)),r&&(i=!0,t.flags&=-129),r=0!==(32&t.flags),t.flags&=-33,null===e){if(ha){if(i?Mi(t):Ii(),(e=da)?null!==(e=null!==(e=Td(e,pa))&&"&"!==e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==na?{id:ra,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},(n=Gr(e)).return=t,t.child=n,ua=t,da=null):e=null,null===e)throw ga(t);return Fd(e)?t.lanes=32:t.lanes=536870912,null}var l=a.children;return a=a.fallback,i?(Ii(),l=el({mode:"hidden",children:l},i=t.mode),a=Hr(a,i,n,null),l.return=t,a.return=t,l.sibling=a,t.child=l,(a=t.child).memoizedState=Xo(n),a.childLanes=Zo(e,r,n),t.memoizedState=Ko,Bo(null,a)):(Mi(t),Qo(t,l))}var c=e.memoizedState;if(null!==c&&null!==(l=c.dehydrated)){if(o)256&t.flags?(Mi(t),t.flags&=-257,t=tl(e,t,n)):null!==t.memoizedState?(Ii(),t.child=e.child,t.flags|=128,t=null):(Ii(),l=a.fallback,i=t.mode,a=el({mode:"visible",children:a.children},i),(l=Hr(l,i,n,null)).flags|=2,a.return=t,l.return=t,a.sibling=l,t.child=a,pi(t,e.child,null,n),(a=t.child).memoizedState=Xo(n),a.childLanes=Zo(e,r,n),t.memoizedState=Ko,t=Bo(null,a));else if(Mi(t),Fd(l)){if(r=l.nextSibling&&l.nextSibling.dataset)var u=r.dgst;r=u,(a=Error(s(419))).stack="",a.digest=r,ka({value:a,source:null,stack:null}),t=tl(e,t,n)}else if(Fo||La(e,t,n,!1),r=0!==(n&e.childLanes),Fo||r){if(null!==(r=mc)&&(0!==(a=Me(r,n))&&a!==c.retryLane))throw c.retryLane=a,Fr(e,a),Kc(r,e,a),Ro;Rd(l)||ou(),t=tl(e,t,n)}else Rd(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,da=Md(l.nextSibling),ua=t,ha=!0,fa=null,pa=!1,null!==e&&ca(t,e),(t=Qo(t,a.children)).flags|=4096);return t}return i?(Ii(),l=a.fallback,i=t.mode,u=(c=e.child).sibling,(a=qr(c,{mode:"hidden",children:a.children})).subtreeFlags=65011712&c.subtreeFlags,null!==u?l=qr(u,l):(l=Hr(l,i,n,null)).flags|=2,l.return=t,a.return=t,a.sibling=l,t.child=a,Bo(null,a),a=t.child,null===(l=e.child.memoizedState)?l=Xo(n):(null!==(i=l.cachePool)?(c=za._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=Za(),l={baseLanes:l.baseLanes|n,cachePool:i}),a.memoizedState=l,a.childLanes=Zo(e,r,n),t.memoizedState=Ko,Bo(e.child,a)):(Mi(t),e=(n=e.child).sibling,(n=qr(n,{mode:"visible",children:a.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Qo(e,t){return(t=el({mode:"visible",children:t},e.mode)).return=e,e.child=t}function el(e,t){return(e=zr(22,e,null,t)).lanes=0,e}function tl(e,t,n){return pi(t,e.child,null,n),(e=Qo(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function nl(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ca(e.return,t,n)}function rl(e,t,n,r,a,i){var s=e.memoizedState;null===s?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,treeForkCount:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=a,s.treeForkCount=i)}function al(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;r=r.children;var s=Bi.current,o=0!==(2&s);if(o?(s=1&s|2,t.flags|=128):s&=1,q(Bi,s),Mo(e,t,r,n),r=ha?Qr:0,!o&&null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&nl(e,n,t);else if(19===e.tag)nl(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;null!==n;)null!==(e=n.alternate)&&null===qi(e)&&(a=n),n=n.sibling;null===(n=a)?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),rl(t,!1,a,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;null!==a;){if(null!==(e=a.alternate)&&null===qi(e)){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}rl(t,!0,n,null,i,r);break;case"together":rl(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function il(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),jc|=t.lanes,0===(n&t.childLanes)){if(null===e)return null;if(La(e,t,n,!1),0===(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=qr(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;
vendor: 4,500 bytes, line 2
2)e=e.sibling,(n=n.sibling=qr(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function sl(e,t){return 0!==(e.lanes&t)||!(null===(e=e.dependencies)||!Pa(e))}function ol(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)Fo=!0;else{if(!sl(e,n)&&0===(128&t.flags))return Fo=!1,function(e,t,n){switch(t.tag){case 3:Y(t,t.stateNode.containerInfo),_a(0,za,e.memoizedState.cache),xa();break;case 27:case 5:X(t);break;case 4:Y(t,t.stateNode.containerInfo);break;case 10:_a(0,t.type,t.memoizedProps.value);break;case 31:if(null!==t.memoizedState)return t.flags|=128,Oi(t),null;break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(Mi(t),t.flags|=128,null):0!==(n&t.child.childLanes)?Jo(e,t,n):(Mi(t),null!==(e=il(e,t,n))?e.sibling:null);Mi(t);break;case 19:var a=0!==(128&e.flags);if((r=0!==(n&t.childLanes))||(La(e,t,n,!1),r=0!==(n&t.childLanes)),a){if(r)return al(e,t,n);t.flags|=128}if(null!==(a=t.memoizedState)&&(a.rendering=null,a.tail=null,a.lastEffect=null),q(Bi,Bi.current),r)break;return null;case 22:return t.lanes=0,zo(e,t,n,t.pendingProps);case 24:_a(0,za,e.memoizedState.cache)}return il(e,t,n)}(e,t,n);Fo=0!==(131072&e.flags)}else Fo=!1,ha&&0!==(1048576&t.flags)&&sa(t,Qr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=ai(t.elementType),t.type=e,"function"!==typeof e){if(void 0!==e&&null!==e){var a=e.$$typeof;if(a===k){t.tag=11,t=Oo(null,t,e,r,n);break e}if(a===j){t.tag=14,t=Do(null,t,e,r,n);break e}}throw t=T(e)||e,Error(s(306,t,""))}Br(e)?(r=Ao(e,r),t.tag=1,t=$o(null,t,e,r,n)):(t.tag=0,t=Wo(null,t,e,r,n))}return t;case 0:return Wo(e,t,t.type,t.pendingProps,n);case 1:return $o(e,t,r=t.type,a=Ao(r,t.pendingProps),n);case 3:e:{if(Y(t,t.stateNode.containerInfo),null===e)throw Error(s(387));r=t.pendingProps;var i=t.memoizedState;a=i.element,bi(e,t),ji(t,r,null,n);var o=t.memoizedState;if(r=o.cache,_a(0,za,r),r!==i.cache&&Ea(t,[za],n,!0),Ai(),r=o.element,i.isDehydrated){if(i={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,256&t.flags){t=Yo(e,t,r,n);break e}if(r!==a){ka(a=Kr(Error(s(424)),t)),t=Yo(e,t,r,n);break e}if(9===(e=t.stateNode.containerInfo).nodeType)e=e.body;else e="HTML"===e.nodeName?e.ownerDocument.body:e;for(da=Md(e.firstChild),ua=t,ha=!0,fa=null,pa=!0,n=mi(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(xa(),r===a){t=il(e,t,n);break e}Mo(e,t,r,n)}t=t.child}return t;case 26:return Ho(e,t),null===e?(n=$d(t.type,null,t.pendingProps,null))?t.memoizedState=n:ha||(n=t.type,e=t.pendingProps,(r=bd(G.current).createElement(n))[qe]=t,r[Ue]=e,pd(r,n,e),et(r),t.stateNode=r):t.memoizedState=$d(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return X(t),null===e&&ha&&(r=t.stateNode=zd(t.type,t.pendingProps,G.current),ua=t,pa=!0,a=da,Cd(t.type)?(Od=a,da=Md(r.firstChild)):da=a),Mo(e,t,t.pendingProps.children,n),Ho(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&ha&&((a=r=da)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[Ye])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(i=e.getAttribute("rel"))&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(null==a.href||""===a.href?null:a.href)||e.getAttribute("crossorigin")!==(null==a.crossOrigin?null:a.crossOrigin)||e.getAttribute("title")!==(null==a.title?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((i=e.getAttribute("src"))!==(null==a.src?null:a.src)||e.getAttribute("type")!==(null==a.type?null:a.type)||e.getAttribute("crossorigin")!==(null==a.crossOrigin?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var i=null==a.name?null:""+a.name;if("hidden"===a.type&&e.getAttribute("name")===i)return e}if(null===(e=Md(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,pa))?(t.stateNode=r,ua=t,da=Md(r.firstChild),pa=!1,a=!0):a=!1),a||ga(t)),X(t),a=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,r=i.children,wd(a,i)?r=null:null!==o&&wd(a,o)&&(t.flags|=32),null!==t.memoizedState&&(a=ts(e,t,as,null,null,n),hh._currentValue=a),Ho(e,t),Mo(e,t,r,n),t.child;case 6:return null===e&&ha&&((e=n=da)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;
vendor: 5,278 bytes, line 2
2){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n)return null;if(null===(e=Md(e.nextSibling)))return null}return e}(n,t.pendingProps,pa))?(t.stateNode=n,ua=t,da=null,e=!0):e=!1),e||ga(t)),null;case 13:return Jo(e,t,n);case 4:return Y(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=pi(t,null,r,n):Mo(e,t,r,n),t.child;case 11:return Oo(e,t,t.type,t.pendingProps,n);case 7:return Mo(e,t,t.pendingProps,n),t.child;case 8:case 12:return Mo(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,_a(0,t.type,r.value),Mo(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Ta(t),r=r(a=Ra(a)),t.flags|=1,Mo(e,t,r,n),t.child;case 14:return Do(e,t,t.type,t.pendingProps,n);case 15:return Io(e,t,t.type,t.pendingProps,n);case 19:return al(e,t,n);case 31:return function(e,t,n){var r=t.pendingProps,a=0!==(128&t.flags);if(t.flags&=-129,null===e){if(ha){if("hidden"===r.mode)return e=Uo(t,r),t.lanes=536870912,Bo(null,e);if(Oi(t),(e=da)?null!==(e=null!==(e=Td(e,pa))&&"&"===e.data?e:null)&&(t.memoizedState={dehydrated:e,treeContext:null!==na?{id:ra,overflow:aa}:null,retryLane:536870912,hydrationErrors:null},(n=Gr(e)).return=t,t.child=n,ua=t,da=null):e=null,null===e)throw ga(t);return t.lanes=536870912,null}return Uo(t,r)}var i=e.memoizedState;if(null!==i){var o=i.dehydrated;if(Oi(t),a)if(256&t.flags)t.flags&=-257,t=Vo(e,t,n);else{if(null===t.memoizedState)throw Error(s(558));t.child=e.child,t.flags|=128,t=null}else if(Fo||La(e,t,n,!1),a=0!==(n&e.childLanes),Fo||a){if(null!==(r=mc)&&0!==(o=Me(r,n))&&o!==i.retryLane)throw i.retryLane=o,Fr(e,o),Kc(r,e,o),Ro;ou(),t=Vo(e,t,n)}else e=i.treeContext,da=Md(o.nextSibling),ua=t,ha=!0,fa=null,pa=!1,null!==e&&ca(t,e),(t=Uo(t,r)).flags|=4096;return t}return(e=qr(e.child,{mode:r.mode,children:r.children})).ref=t.ref,t.child=e,e.return=t,e}(e,t,n);case 22:return zo(e,t,n,t.pendingProps);case 24:return Ta(t),r=Ra(za),null===e?(null===(a=Ka())&&(a=mc,i=Ba(),a.pooledCache=i,i.refCount++,null!==i&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:r,cache:a},vi(t),_a(0,za,a)):(0!==(e.lanes&n)&&(bi(e,t),ji(t,null,null,n),Ai()),a=e.memoizedState,i=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=a),_a(0,za,r)):(r=i.cache,_a(0,za,r),r!==a.cache&&Ea(t,[za],n,!0))),Mo(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function ll(e){e.flags|=4}function cl(e,t,n,r,a){if((t=0!==(32&e.mode))&&(t=!1),t){if(e.flags|=16777216,(335544128&a)===a)if(e.stateNode.complete)e.flags|=8192;else{if(!au())throw ii=ti,Qa;e.flags|=8192}}else e.flags&=-16777217}function ul(e,t){if("stylesheet"!==t.type||0!==(4&t.state.loading))e.flags&=-16777217;else if(e.flags|=16777216,!sh(t)){if(!au())throw ii=ti,Qa;e.flags|=8192}}function dl(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?Le():536870912,e.lanes|=t,Ec|=t)}function hl(e,t){if(!ha)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function fl(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=65011712&a.subtreeFlags,r|=65011712&a.flags,a.return=e,a=a.sibling;else for(a=e.child;null!==a;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function pl(e,t,n){var r=t.pendingProps;switch(la(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:case 1:return fl(t),null;case 3:return n=t.stateNode,r=null,null!==e&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Sa(za),K(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||(ya(t)?ll(t):null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,wa())),fl(t),null;case 26:var a=t.type,i=t.memoizedState;return null===e?(ll(t),null!==i?(fl(t),ul(t,i)):(fl(t),cl(t,a,0,0,n))):i?i!==e.memoizedState?(ll(t),fl(t),ul(t,i)):(fl(t),t.flags&=-16777217):((e=e.memoizedProps)!==r&&ll(t),fl(t),cl(t,a,0,0,n)),null;case 27:if(Z(t),n=G.current,a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&ll(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return fl(t),null}e=H.current,ya(t)?va(t):(e=zd(a,r,n),t.stateNode=e,ll(t))}return fl(t),null;case 5:if(Z(t),a=t.type,null!==e&&null!=t.stateNode)e.memoizedProps!==r&&ll(t);else{if(!r){if(null===t.stateNode)throw Error(s(166));return fl(t),null}if(i=H.current,ya(t))va(t);else{var o=bd(G.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":(i=o.createElement("div")).innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i="string"===typeof r.is?o.createElement("select",{is:r.is}
vendor: 38,751 bytes, line 2
2):o.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i="string"===typeof r.is?o.createElement(a,{is:r.is}):o.createElement(a)}}i[qe]=t,i[Ue]=r;e:for(o=t.child;null!==o;){if(5===o.tag||6===o.tag)i.appendChild(o.stateNode);else if(4!==o.tag&&27!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;null===o.sibling;){if(null===o.return||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(pd(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ll(t)}}return fl(t),cl(t,t.type,null===e||e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&ll(t);else{if("string"!==typeof r&&null===t.stateNode)throw Error(s(166));if(e=G.current,ya(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(a=ua))switch(a.tag){case 27:case 5:r=a.memoizedProps}e[qe]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||dd(e.nodeValue,n)))||ga(t,!0)}else(e=bd(e).createTextNode(r))[qe]=t,t.stateNode=e}return fl(t),null;case 31:if(n=t.memoizedState,null===e||null!==e.memoizedState){if(r=ya(t),null!==n){if(null===e){if(!r)throw Error(s(318));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(s(557));e[qe]=t}else xa(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),e=!1}else n=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return 256&t.flags?(zi(t),t):(zi(t),null);if(0!==(128&t.flags))throw Error(s(558))}return fl(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(a=ya(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(s(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(s(317));a[qe]=t}else xa(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;fl(t),a=!1}else a=wa(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return 256&t.flags?(zi(t),t):(zi(t),null)}return zi(t),0!==(128&t.flags)?(t.lanes=n,t):(n=null!==r,e=null!==e&&null!==e.memoizedState,n&&(a=null,null!==(r=t.child).alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(a=r.alternate.memoizedState.cachePool.pool),i=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),dl(t,t.updateQueue),fl(t),null);case 4:return K(),null===e&&td(t.stateNode.containerInfo),fl(t),null;case 10:return Sa(t.type),fl(t),null;case 19:if(B(Bi),null===(r=t.memoizedState))return fl(t),null;if(a=0!==(128&t.flags),null===(i=r.rendering))if(a)hl(r,!1);else{if(0!==Ac||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(i=qi(e))){for(t.flags|=128,hl(r,!1),e=i.updateQueue,t.updateQueue=e,dl(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)Ur(n,e),n=n.sibling;return q(Bi,1&Bi.current|2),ha&&ia(t,r.treeForkCount),t.child}e=e.sibling}null!==r.tail&&le()>Mc&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}else{if(!a)if(null!==(e=qi(i))){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,dl(t,e),hl(r,!0),null===r.tail&&"hidden"===r.tailMode&&!i.alternate&&!ha)return fl(t),null}else 2*le()-r.renderingStartTime>Mc&&536870912!==n&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(null!==(e=r.last)?e.sibling=i:t.child=i,r.last=i)}return null!==r.tail?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=le(),e.sibling=null,n=Bi.current,q(Bi,a?1&n|2:1&n),ha&&ia(t,r.treeForkCount),e):(fl(t),null);case 22:case 23:return zi(t),Ti(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!==(536870912&n)&&0===(128&t.flags)&&(fl(t),6&t.subtreeFlags&&(t.flags|=8192)):fl(t),null!==(n=t.updateQueue)&&dl(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&B(Ya),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Sa(za),fl(t),null;case 25:case 30:return null}throw Error(s(156,t.tag))}function ml(e,t){switch(la(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Sa(za),K(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Z(t),null;case 31:if(null!==t.memoizedState){if(zi(t),null===t.alternate)throw Error(s(340));xa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 13:if(zi(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));xa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return B(Bi),null;case 4:return K(),null;case 10:return Sa(t.type),null;case 22:case 23:return zi(t),Ti(),null!==e&&B(Ya),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return Sa(za),null;default:return null}}function gl(e,t){switch(la(t),t.tag){case 3:Sa(za),K();break;case 26:case 27:case 5:Z(t);break;case 4:K();break;case 31:null!==t.memoizedState&&zi(t);break;case 13:zi(t);break;case 19:B(Bi);break;case 10:Sa(t.type);break;case 22:case 23:zi(t),Ti(),null!==e&&B(Ya);break;case 24:Sa(za)}}function vl(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,s=n.inst;r=i(),s.destroy=r}n=n.next}while(n!==a)}}catch(o){ju(t,t.return,o)}}function bl(e,t,n){try{var r=t.updateQueue,a=null!==r?r.lastEffect:null;if(null!==a){var i=a.next;r=i;do{if((r.tag&e)===e){var s=r.inst,o=s.destroy;if(void 0!==o){s.destroy=void 0,a=t;var l=n,c=o;try{c()}catch(u){ju(a,l,u)}}}r=r.next}while(r!==i)}}catch(u){ju(t,t.return,u)}}function yl(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{Si(t,n)}catch(r){ju(e,e.return,r)}}}function xl(e,t,n){n.props=Ao(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){ju(e,t,r)}}function wl(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"===typeof n?e.refCleanup=n(r):n.current=r}}catch(a){ju(e,t,a)}}function kl(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"===typeof r)try{r()}catch(a){ju(e,t,a)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"===typeof n)try{n(null)}catch(i){ju(e,t,i)}else n.current=null}function Nl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){ju(e,e.return,a)}}function Al(e,t,n){try{var r=e.stateNode;!function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,o=null,l=null,c=null,u=null,d=null;for(p in n){var h=n[p];if(n.hasOwnProperty(p)&&null!=h)switch(p){case"checked":case"value":break;case"defaultValue":c=h;default:r.hasOwnProperty(p)||hd(e,t,p,null,r,h)}}for(var f in r){var p=r[f];if(h=n[f],r.hasOwnProperty(f)&&(null!=p||null!=h))switch(f){case"type":i=p;break;case"name":a=p;break;case"checked":u=p;break;case"defaultChecked":d=p;break;case"value":o=p;break;case"defaultValue":l=p;break;case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(s(137,t));break;default:p!==h&&hd(e,t,f,p,r,h)}}return void bt(e,o,l,c,u,d,i,a);case"select":for(i in p=o=l=f=null,n)if(c=n[i],n.hasOwnProperty(i)&&null!=c)switch(i){case"value":break;case"multiple":p=c;default:r.hasOwnProperty(i)||hd(e,t,i,null,r,c)}for(a in r)if(i=r[a],c=n[a],r.hasOwnProperty(a)&&(null!=i||null!=c))switch(a){case"value":f=i;break;case"defaultValue":l=i;break;case"multiple":o=i;default:i!==c&&hd(e,t,a,i,r,c)}return t=l,n=o,r=p,void(null!=f?wt(e,!!n,f,!1):!!r!==!!n&&(null!=t?wt(e,!!n,t,!0):wt(e,!!n,n?[]:"",!1)));case"textarea":for(l in p=f=null,n)if(a=n[l],n.hasOwnProperty(l)&&null!=a&&!r.hasOwnProperty(l))switch(l){case"value":case"children":break;default:hd(e,t,l,null,r,a)}for(o in r)if(a=r[o],i=n[o],r.hasOwnProperty(o)&&(null!=a||null!=i))switch(o){case"value":f=a;break;case"defaultValue":p=a;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=a)throw Error(s(91));break;default:a!==i&&hd(e,t,o,a,r,i)}return void kt(e,f,p);case"option":for(var m in n)if(f=n[m],n.hasOwnProperty(m)&&null!=f&&!r.hasOwnProperty(m))if("selected"===m)e.selected=!1;else hd(e,t,m,null,r,f);for(c in r)if(f=r[c],p=n[c],r.hasOwnProperty(c)&&f!==p&&(null!=f||null!=p))if("selected"===c)e.selected=f&&"function"!==typeof f&&"symbol"!==typeof f;else hd(e,t,c,f,r,p);return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)f=n[g],n.hasOwnProperty(g)&&null!=f&&!r.hasOwnProperty(g)&&hd(e,t,g,null,r,f);for(u in r)if(f=r[u],p=n[u],r.hasOwnProperty(u)&&f!==p&&(null!=f||null!=p))switch(u){case"children":case"dangerouslySetInnerHTML":if(null!=f)throw Error(s(137,t));break;default:hd(e,t,u,f,r,p)}return;default:if(Ct(t)){for(var v in n)f=n[v],n.hasOwnProperty(v)&&void 0!==f&&!r.hasOwnProperty(v)&&fd(e,t,v,void 0,r,f);for(d in r)f=r[d],p=n[d],!r.hasOwnProperty(d)||f===p||void 0===f&&void 0===p||fd(e,t,d,f,r,p);return}}for(var b in n)f=n[b],n.hasOwnProperty(b)&&null!=f&&!r.hasOwnProperty(b)&&hd(e,t,b,null,r,f);for(h in r)f=r[h],p=n[h],!r.hasOwnProperty(h)||f===p||null==f&&null==p||hd(e,t,h,f,r,p)}(r,e.type,n,t),r[Ue]=t}catch(a){ju(e,e.return,a)}}function jl(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&Cd(e.type)||4===e.tag}function _l(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||jl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&Cd(e.type))continue e;if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function Sl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?(9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).insertBefore(e,t):((t=9===n.nodeType?n.body:"HTML"===n.nodeName?n.ownerDocument.body:n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Tt));else if(4!==r&&(27===r&&Cd(e.type)&&(n=e.stateNode,t=null),null!==(e=e.child)))for(Sl(e,t,n),e=e.sibling;null!==e;)Sl(e,t,n),e=e.sibling}function Cl(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&Cd(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(Cl(e,t,n),e=e.sibling;null!==e;)Cl(e,t,n),e=e.sibling}function El(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);pd(t,r,n),t[qe]=e,t[Ue]=n}catch(i){ju(e,e.return,i)}}var Ll=!1,Pl=!1,Tl=!1,Rl="function"===typeof WeakSet?WeakSet:Set,Fl=null;function Ml(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Kl(e,n),4&r&&vl(5,n);break;case 1:if(Kl(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(s){ju(n,n.return,s)}else{var a=Ao(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){ju(n,n.return,o)}}64&r&&yl(n),512&r&&wl(n,n.return);break;case 3:if(Kl(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{Si(e,t)}catch(s){ju(n,n.return,s)}}break;case 27:null===t&&4&r&&El(n);case 26:case 5:Kl(e,n),null===t&&4&r&&Nl(n),512&r&&wl(n,n.return);break;case 12:Kl(e,n);break;case 31:Kl(e,n),4&r&&ql(e,n);break;case 13:Kl(e,n),4&r&&Ul(e,n),64&r&&(null!==(e=n.memoizedState)&&(null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$~"===e.data)e._reactRetry=t;else if("$?"!==e.data||"loading"!==n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=Eu.bind(null,n))));break;case 22:if(!(r=null!==n.memoizedState||Ll)){t=null!==t&&null!==t.memoizedState||Pl,a=Ll;var i=Pl;Ll=r,(Pl=t)&&!i?Zl(e,n,0!==(8772&n.subtreeFlags)):Kl(e,n),Ll=a,Pl=i}break;case 30:break;default:Kl(e,n)}}function Ol(e){var t=e.alternate;null!==t&&(e.alternate=null,Ol(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&Ke(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Dl=null,Il=!1;function zl(e,t,n){for(n=n.child;null!==n;)Bl(e,t,n),n=n.sibling}function Bl(e,t,n){if(be&&"function"===typeof be.onCommitFiberUnmount)try{be.onCommitFiberUnmount(ve,n)}catch(i){}switch(n.tag){case 26:Pl||kl(n,t),zl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode).parentNode.removeChild(n);break;case 27:Pl||kl(n,t);var r=Dl,a=Il;Cd(n.type)&&(Dl=n.stateNode,Il=!1),zl(e,t,n),Bd(n.stateNode),Dl=r,Il=a;break;case 5:Pl||kl(n,t);case 6:if(r=Dl,a=Il,Dl=null,zl(e,t,n),Il=a,null!==(Dl=r))if(Il)try{(9===Dl.nodeType?Dl.body:"HTML"===Dl.nodeName?Dl.ownerDocument.body:Dl).removeChild(n.stateNode)}catch(s){ju(n,t,s)}else try{Dl.removeChild(n.stateNode)}catch(s){ju(n,t,s)}break;case 18:null!==Dl&&(Il?(Ed(9===(e=Dl).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e,n.stateNode),Gh(e)):Ed(Dl,n.stateNode));break;case 4:r=Dl,a=Il,Dl=n.stateNode.containerInfo,Il=!0,zl(e,t,n),Dl=r,Il=a;break;case 0:case 11:case 14:case 15:bl(2,n,t),Pl||bl(4,n,t),zl(e,t,n);break;case 1:Pl||(kl(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount&&xl(n,t,r)),zl(e,t,n);break;case 21:zl(e,t,n);break;case 22:Pl=(r=Pl)||null!==n.memoizedState,zl(e,t,n),Pl=r;break;default:zl(e,t,n)}}function ql(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&null!==(e=e.memoizedState))){e=e.dehydrated;try{Gh(e)}catch(n){ju(t,t.return,n)}}}function Ul(e,t){if(null===t.memoizedState&&(null!==(e=t.alternate)&&(null!==(e=e.memoizedState)&&null!==(e=e.dehydrated))))try{Gh(e)}catch(n){ju(t,t.return,n)}}function Vl(e,t){var n=function(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return null===t&&(t=e.stateNode=new Rl),t;case 22:return null===(t=(e=e.stateNode)._retryCache)&&(t=e._retryCache=new Rl),t;default:throw Error(s(435,e.tag))}}(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Lu.bind(null,e,t);t.then(r,r)}})}function Hl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var a=n[r],i=e,o=t,l=o;e:for(;null!==l;){switch(l.tag){case 27:if(Cd(l.type)){Dl=l.stateNode,Il=!1;break e}break;case 5:Dl=l.stateNode,Il=!1;break e;case 3:case 4:Dl=l.stateNode.containerInfo,Il=!0;break e}l=l.return}if(null===Dl)throw Error(s(160));Bl(i,o,a),Dl=null,Il=!1,null!==(i=a.alternate)&&(i.return=null),a.return=null}if(13886&t.subtreeFlags)for(t=t.child;null!==t;)Gl(t,e),t=t.sibling}var Wl=null;function Gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Hl(t,e),$l(e),4&r&&(bl(3,e,e.return),vl(3,e),bl(5,e,e.return));break;case 1:Hl(t,e),$l(e),512&r&&(Pl||null===n||kl(n,n.return)),64&r&&Ll&&(null!==(e=e.updateQueue)&&(null!==(r=e.callbacks)&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=null===n?r:n.concat(r))));break;case 26:var a=Wl;if(Hl(t,e),$l(e),512&r&&(Pl||null===n||kl(n,n.return)),4&r){var i=null!==n?n.memoizedState:null;if(r=e.memoizedState,null===n)if(null===r)if(null===e.stateNode){e:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(r){case"title":(!(i=a.getElementsByTagName("title")[0])||i[Ye]||i[qe]||"http://www.w3.org/2000/svg"===i.namespaceURI||i.hasAttribute("itemprop"))&&(i=a.createElement(r),a.head.insertBefore(i,a.querySelector("head > title"))),pd(i,r,n),i[qe]=e,et(i),r=i;break e;case"link":var o=ah("link","href",a).get(r+(n.href||""));if(o)for(var l=0;l<o.length;l++)if((i=o[l]).getAttribute("href")===(null==n.href||""===n.href?null:n.href)&&i.getAttribute("rel")===(null==n.rel?null:n.rel)&&i.getAttribute("title")===(null==n.title?null:n.title)&&i.getAttribute("crossorigin")===(null==n.crossOrigin?null:n.crossOrigin)){o.splice(l,1);break t}pd(i=a.createElement(r),r,n),a.head.appendChild(i);break;case"meta":if(o=ah("meta","content",a).get(r+(n.content||"")))for(l=0;l<o.length;l++)if((i=o[l]).getAttribute("content")===(null==n.content?null:""+n.content)&&i.getAttribute("name")===(null==n.name?null:n.name)&&i.getAttribute("property")===(null==n.property?null:n.property)&&i.getAttribute("http-equiv")===(null==n.httpEquiv?null:n.httpEquiv)&&i.getAttribute("charset")===(null==n.charSet?null:n.charSet)){o.splice(l,1);break t}pd(i=a.createElement(r),r,n),a.head.appendChild(i);break;default:throw Error(s(468,r))}i[qe]=e,et(i),r=i}e.stateNode=r}else ih(a,e.type,e.stateNode);else e.stateNode=Qd(a,r,e.memoizedProps);else i!==r?(null===i?null!==n.stateNode&&(n=n.stateNode).parentNode.removeChild(n):i.count--,null===r?ih(a,e.type,e.stateNode):Qd(a,r,e.memoizedProps)):null===r&&null!==e.stateNode&&Al(e,e.memoizedProps,n.memoizedProps)}break;case 27:Hl(t,e),$l(e),512&r&&(Pl||null===n||kl(n,n.return)),null!==n&&4&r&&Al(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Hl(t,e),$l(e),512&r&&(Pl||null===n||kl(n,n.return)),32&e.flags){a=e.stateNode;try{At(a,"")}catch(m){ju(e,e.return,m)}}4&r&&null!=e.stateNode&&Al(e,a=e.memoizedProps,null!==n?n.memoizedProps:a),1024&r&&(Tl=!0);break;case 6:if(Hl(t,e),$l(e),4&r){if(null===e.stateNode)throw Error(s(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(m){ju(e,e.return,m)}}break;case 3:if(rh=null,a=Wl,Wl=Vd(t.containerInfo),Hl(t,e),Wl=a,$l(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Gh(t.containerInfo)}catch(m){ju(e,e.return,m)}Tl&&(Tl=!1,Yl(e));break;case 4:r=Wl,Wl=Vd(e.stateNode.containerInfo),Hl(t,e),$l(e),Wl=r;break;case 12:default:Hl(t,e),$l(e);break;case 31:case 19:Hl(t,e),$l(e),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Vl(e,r)));break;case 13:Hl(t,e),$l(e),8192&e.child.flags&&null!==e.memoizedState!==(null!==n&&null!==n.memoizedState)&&(Rc=le()),4&r&&(null!==(r=e.updateQueue)&&(e.updateQueue=null,Vl(e,r)));break;case 22:a=null!==e.memoizedState;var c=null!==n&&null!==n.memoizedState,u=Ll,d=Pl;if(Ll=u||a,Pl=d||c,Hl(t,e),Pl=d,Ll=u,$l(e),8192&r)e:for(t=e.stateNode,t._visibility=a?-2&t._visibility:1|t._visibility,a&&(null===n||c||Ll||Pl||Xl(e)),n=null,t=e;;){if(5===t.tag||26===t.tag){if(null===n){c=n=t;try{if(i=c.stateNode,a)"function"===typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none";else{l=c.stateNode;var h=c.memoizedProps.style,f=void 0!==h&&null!==h&&h.hasOwnProperty("display")?h.display:null;l.style.display=null==f||"boolean"===typeof f?"":(""+f).trim()}}catch(m){ju(c,c.return,m)}}}else if(6===t.tag){if(null===n){c=t;try{c.stateNode.nodeValue=a?"":c.memoizedProps}catch(m){ju(c,c.return,m)}}}else if(18===t.tag){if(null===n){c=t;try{var p=c.stateNode;a?Ld(p,!0):Ld(c.stateNode,!1)}catch(m){ju(c,c.return,m)}}}else if((22!==t.tag&&23!==t.tag||null===t.memoizedState||t===e)&&null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;null===t.sibling;){if(null===t.return||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}4&r&&(null!==(r=e.updateQueue)&&(null!==(n=r.retryQueue)&&(r.retryQueue=null,Vl(e,n))));case 30:case 21:}}function $l(e){var t=e.flags;if(2&t){try{for(var n,r=e.return;null!==r;){if(jl(r)){n=r;break}r=r.return}if(null==n)throw Error(s(160));switch(n.tag){case 27:var a=n.stateNode;Cl(e,_l(e),a);break;case 5:var i=n.stateNode;32&n.flags&&(At(i,""),n.flags&=-33),Cl(e,_l(e),i);break;case 3:case 4:var o=n.stateNode.containerInfo;Sl(e,_l(e),o);break;default:throw Error(s(161))}}catch(l){ju(e,e.return,l)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function Yl(e){if(1024&e.subtreeFlags)for(e=e.child;null!==e;){var t=e;Yl(t),5===t.tag&&1024&t.flags&&t.stateNode.reset(),e=e.sibling}}function Kl(e,t){if(8772&t.subtreeFlags)for(t=t.child;null!==t;)Ml(e,t.alternate,t),t=t.sibling}function Xl(e){for(e=e.child;null!==e;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:bl(4,t,t.return),Xl(t);break;case 1:kl(t,t.return);var n=t.stateNode;"function"===typeof n.componentWillUnmount&&xl(t,t.return,n),Xl(t);break;case 27:Bd(t.stateNode);case 26:case 5:kl(t,t.return),Xl(t);break;case 22:null===t.memoizedState&&Xl(t);break;default:Xl(t)}e=e.sibling}}function Zl(e,t,n){for(n=n&&0!==(8772&t.subtreeFlags),t=t.child;null!==t;){var r=t.alternate,a=e,i=t,s=i.flags;switch(i.tag){case 0:case 11:case 15:Zl(a,i,n),vl(4,i);break;case 1:if(Zl(a,i,n),"function"===typeof(a=(r=i).stateNode).componentDidMount)try{a.componentDidMount()}catch(c){ju(r,r.return,c)}if(null!==(a=(r=i).updateQueue)){var o=r.stateNode;try{var l=a.shared.hiddenCallbacks;if(null!==l)for(a.shared.hiddenCallbacks=null,a=0;a<l.length;a++)_i(l[a],o)}catch(c){ju(r,r.return,c)}}n&&64&s&&yl(i),wl(i,i.return);break;case 27:El(i);case 26:case 5:Zl(a,i,n),n&&null===r&&4&s&&Nl(i),wl(i,i.return);break;case 12:Zl(a,i,n);break;case 31:Zl(a,i,n),n&&4&s&&ql(a,i);break;case 13:Zl(a,i,n),n&&4&s&&Ul(a,i);break;case 22:null===i.memoizedState&&Zl(a,i,n),wl(i,i.return);break;case 30:break;default:Zl(a,i,n)}t=t.sibling}}function Jl(e,t){var n=null;null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),e=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(e=t.memoizedState.cachePool.pool),e!==n&&(null!=e&&e.refCount++,null!=n&&qa(n))}function Ql(e,t){e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&qa(e))}function ec(e,t,n,r){if(10256&t.subtreeFlags)for(t=t.child;null!==t;)tc(e,t,n,r),t=t.sibling}function tc(e,t,n,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:ec(e,t,n,r),2048&a&&vl(9,t);break;case 1:case 31:case 13:default:ec(e,t,n,r);break;case 3:ec(e,t,n,r),2048&a&&(e=null,null!==t.alternate&&(e=t.alternate.memoizedState.cache),(t=t.memoizedState.cache)!==e&&(t.refCount++,null!=e&&qa(e)));break;case 12:if(2048&a){ec(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,s=i.id,o=i.onPostCommit;"function"===typeof o&&o(s,null===t.alternate?"mount":"update",e.passiveEffectDuration,-0)}catch(l){ju(t,t.return,l)}}else ec(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,s=t.alternate,null!==t.memoizedState?2&i._visibility?ec(e,t,n,r):rc(e,t):2&i._visibility?ec(e,t,n,r):(i._visibility|=2,nc(e,t,n,r,0!==(10256&t.subtreeFlags)||!1)),2048&a&&Jl(s,t);break;case 24:ec(e,t,n,r),2048&a&&Ql(t.alternate,t)}}function nc(e,t,n,r,a){for(a=a&&(0!==(10256&t.subtreeFlags)||!1),t=t.child;null!==t;){var i=e,s=t,o=n,l=r,c=s.flags;switch(s.tag){case 0:case 11:case 15:nc(i,s,o,l,a),vl(8,s);break;case 23:break;case 22:var u=s.stateNode;null!==s.memoizedState?2&u._visibility?nc(i,s,o,l,a):rc(i,s):(u._visibility|=2,nc(i,s,o,l,a)),a&&2048&c&&Jl(s.alternate,s);break;case 24:nc(i,s,o,l,a),a&&2048&c&&Ql(s.alternate,s);break;default:nc(i,s,o,l,a)}t=t.sibling}}function rc(e,t){if(10256&t.subtreeFlags)for(t=t.child;null!==t;){var n=e,r=t,a=r.flags;switch(r.tag){case 22:rc(n,r),2048&a&&Jl(r.alternate,r);break;case 24:rc(n,r),2048&a&&Ql(r.alternate,r);break;default:rc(n,r)}t=t.sibling}}var ac=8192;function ic(e,t,n){if(e.subtreeFlags&ac)for(e=e.child;null!==e;)sc(e,t,n),e=e.sibling}function sc(e,t,n){switch(e.tag){case 26:ic(e,t,n),e.flags&ac&&null!==e.memoizedState&&function(e,t,n,r){if("stylesheet"===n.type&&("string"!==typeof r.media||!1!==matchMedia(r.media).matches)&&0===(4&n.state.loading)){if(null===n.instance){var a=Yd(r.href),i=t.querySelector(Kd(a));if(i)return null!==(t=i._p)&&"object"===typeof t&&"function"===typeof t.then&&(e.count++,e=lh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,void et(i);i=t.ownerDocument||t,r=Xd(r),(a=qd.get(a))&&th(r,a),et(i=i.createElement("link"));var s=i;s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),pd(i,"link",r),n.instance=i}null===e.stylesheets&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&0===(3&n.state.loading)&&(e.count++,n=lh.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}(n,Wl,e.memoizedState,e.memoizedProps);break;case 5:default:ic(e,t,n);break;case 3:case 4:var r=Wl;Wl=Vd(e.stateNode.containerInfo),ic(e,t,n),Wl=r;break;case 22:null===e.memoizedState&&(null!==(r=e.alternate)&&null!==r.memoizedState?(r=ac,ac=16777216,ic(e,t,n),ac=r):ic(e,t,n))}}function oc(e){var t=e.alternate;if(null!==t&&null!==(e=t.child)){t.child=null;do{t=e.sibling,e.sibling=null,e=t}while(null!==e)}}function lc(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Fl=r,dc(r,e)}oc(e)}if(10256&e.subtreeFlags)for(e=e.child;null!==e;)cc(e),e=e.sibling}function cc(e){switch(e.tag){case 0:case 11:case 15:lc(e),2048&e.flags&&bl(9,e,e.return);break;case 3:case 12:default:lc(e);break;case 22:var t=e.stateNode;null!==e.memoizedState&&2&t._visibility&&(null===e.return||13!==e.return.tag)?(t._visibility&=-3,uc(e)):lc(e)}}function uc(e){var t=e.deletions;if(0!==(16&e.flags)){if(null!==t)for(var n=0;n<t.length;n++){var r=t[n];Fl=r,dc(r,e)}oc(e)}for(e=e.child;null!==e;){switch((t=e).tag){case 0:case 11:case 15:bl(8,t,t.return),uc(t);break;case 22:2&(n=t.stateNode)._visibility&&(n._visibility&=-3,uc(t));break;default:uc(t)}e=e.sibling}}function dc(e,t){for(;null!==Fl;){var n=Fl;switch(n.tag){case 0:case 11:case 15:bl(8,n,t);break;case 23:case 22:if(null!==n.memoizedState&&null!==n.memoizedState.cachePool){var r=n.memoizedState.cachePool.pool;null!=r&&r.refCount++}break;case 24:qa(n.memoizedState.cache)}if(null!==(r=n.child))r.return=n,Fl=r;else e:for(n=e;null!==Fl;){var a=(r=Fl).sibling,i=r.return;if(Ol(r),r===n){Fl=null;break e}if(null!==a){a.return=i,Fl=a;break e}Fl=i}}}var hc={getCacheForType:function(e){var t=Ra(za),n=t.data.get(e);return void 0===n&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ra(za).controller.signal}},fc="function"===typeof WeakMap?WeakMap:Map,pc=0,mc=null,gc=null,vc=0,bc=0,yc=null,xc=!1,wc=!1,kc=!1,Nc=0,Ac=0,jc=0,_c=0,Sc=0,Cc=0,Ec=0,Lc=null,Pc=null,Tc=!1,Rc=0,Fc=0,Mc=1/0,Oc=null,Dc=null,Ic=0,zc=null,Bc=null,qc=0,Uc=0,Vc=null,Hc=null,Wc=0,Gc=null;function $c(){return 0!==(2&pc)&&0!==vc?vc&-vc:null!==F.T?Hu():Ie()}function Yc(){if(0===Cc)if(0===(536870912&vc)||ha){var e=Ae;0===(3932160&(Ae<<=1))&&(Ae=262144),Cc=e}else Cc=536870912;return null!==(e=Ri.current)&&(e.flags|=32),Cc}function Kc(e,t,n){(e!==mc||2!==bc&&9!==bc)&&null===e.cancelPendingCommit||(nu(e,0),Qc(e,vc,Cc,!1)),Te(e,n),0!==(2&pc)&&e===mc||(e===mc&&(0===(2&pc)&&(_c|=n),4===Ac&&Qc(e,vc,Cc,!1)),Du(e))}function Xc(e,t,n){if(0!==(6&pc))throw Error(s(327));for(var r=!n&&0===(127&t)&&0===(t&e.expiredLanes)||Ce(e,t),a=r?function(e,t){var n=pc;pc|=2;var r=iu(),a=su();mc!==e||vc!==t?(Oc=null,Mc=le()+500,nu(e,t)):wc=Ce(e,t);e:for(;;)try{if(0!==bc&&null!==gc){t=gc;var i=yc;t:switch(bc){case 1:bc=0,yc=null,fu(e,t,i,1);break;case 2:case 9:if(ni(i)){bc=0,yc=null,hu(t);break}t=function(){2!==bc&&9!==bc||mc!==e||(bc=7),Du(e)},i.then(t,t);break e;case 3:bc=7;break e;case 4:bc=5;break e;case 7:ni(i)?(bc=0,yc=null,hu(t)):(bc=0,yc=null,fu(e,t,i,7));break;case 5:var o=null;switch(gc.tag){case 26:o=gc.memoizedState;case 5:case 27:var l=gc;if(o?sh(o):l.stateNode.complete){bc=0,yc=null;var c=l.sibling;if(null!==c)gc=c;else{var u=l.return;null!==u?(gc=u,pu(u)):gc=null}break t}}bc=0,yc=null,fu(e,t,i,5);break;case 6:bc=0,yc=null,fu(e,t,i,6);break;case 8:tu(),Ac=6;break e;default:throw Error(s(462))}}uu();break}catch(d){ru(e,d)}return ja=Aa=null,F.H=r,F.A=a,pc=n,null!==gc?0:(mc=null,vc=0,Pr(),Ac)}(e,t):lu(e,t,!0),i=r;;){if(0===a){wc&&!r&&Qc(e,t,0,!1);break}if(n=e.current.alternate,!i||Jc(n)){if(2===a){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=0!==(o=-536870913&e.pendingLanes)?o:536870912&o?536870912:0;if(0!==o){t=o;e:{var l=e;a=Lc;var c=l.current.memoizedState.isDehydrated;if(c&&(nu(l,o).flags|=256),2!==(o=lu(l,o,!1))){if(kc&&!c){l.errorRecoveryDisabledLanes|=i,_c|=i,a=4;break e}i=Pc,Pc=a,null!==i&&(null===Pc?Pc=i:Pc.push.apply(Pc,i))}a=o}if(i=!1,2!==a)continue}}if(1===a){nu(e,0),Qc(e,t,0,!0);break}e:{switch(r=e,i=a){case 0:case 1:throw Error(s(345));case 4:if((4194048&t)!==t)break;case 6:Qc(r,t,Cc,!xc);break e;case 2:Pc=null;break;case 3:case 5:break;default:throw Error(s(329))}if((62914560&t)===t&&10<(a=Rc+300-le())){if(Qc(r,t,Cc,!xc),0!==Se(r,0,!0))break e;qc=t,r.timeoutHandle=Nd(Zc.bind(null,r,n,Pc,Oc,Tc,t,Cc,_c,Ec,xc,i,"Throttled",-0,0),a)}else Zc(r,n,Pc,Oc,Tc,t,Cc,_c,Ec,xc,i,null,-0,0)}break}a=lu(e,t,!1),i=!1}Du(e)}function Zc(e,t,n,r,a,i,s,o,l,c,u,d,h,f){if(e.timeoutHandle=-1,8192&(d=t.subtreeFlags)||16785408===(16785408&d)){sc(t,i,d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Tt});var p=(62914560&i)===i?Rc-le():(4194048&i)===i?Fc-le():0;if(null!==(p=function(e,t){return e.stylesheets&&0===e.count&&uh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&0===oh&&(oh=62500*function(){if("function"===typeof performance.getEntriesByType){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var a=n[r],i=a.transferSize,s=a.initiatorType,o=a.duration;if(i&&o&&md(s)){for(s=0,o=a.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>o)break;var u=l.transferSize,d=l.initiatorType;u&&md(d)&&(s+=u*((l=l.responseEnd)<o?1:(o-c)/(l-c)))}if(--r,t+=8*(i+s)/(a.duration/1e3),10<++e)break}}if(0<e)return t/e/1e6}return navigator.connection&&"number"===typeof(e=navigator.connection.downlink)?e:5}());var a=setTimeout(function(){if(e.waitingForImages=!1,0===e.count&&(e.stylesheets&&uh(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>oh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}(d,p)))return qc=i,e.cancelPendingCommit=p(gu.bind(null,e,t,i,n,r,a,s,o,l,u,d,null,h,f)),void Qc(e,i,s,!c)}gu(e,t,i,n,r,a,s,o,l)}function Jc(e){for(var t=e;;){var n=t.tag;if((0===n||11===n||15===n)&&16384&t.flags&&(null!==(n=t.updateQueue)&&null!==(n=n.stores)))for(var r=0;r<n.length;r++){var a=n[r],i=a.getSnapshot;a=a.value;try{if(!Qn(i(),a))return!1}catch(s){return!1}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Qc(e,t,n,r){t&=~Sc,t&=~_c,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var i=31-xe(a),s=1<<i;r[i]=-1,a&=~s}0!==n&&Re(e,n,t)}function eu(){return 0!==(6&pc)||(Iu(0,!1),!1)}function tu(){if(null!==gc){if(0===bc)var e=gc.return;else ja=Aa=null,os(e=gc),li=null,ci=0,e=gc;for(;null!==e;)gl(e.alternate,e),e=e.return;gc=null}}function nu(e,t){var n=e.timeoutHandle;-1!==n&&(e.timeoutHandle=-1,Ad(n)),null!==(n=e.cancelPendingCommit)&&(e.cancelPendingCommit=null,n()),qc=0,tu(),mc=e,gc=n=qr(e.current,null),vc=t,bc=0,yc=null,xc=!1,wc=Ce(e,t),kc=!1,Ec=Cc=Sc=_c=jc=Ac=0,Pc=Lc=null,Tc=!1,0!==(8&t)&&(t|=32&t);var r=e.entangledLanes;if(0!==r)for(e=e.entanglements,r&=t;0<r;){var a=31-xe(r),i=1<<a;t|=e[a],r&=~i}return Nc=t,Pr(),n}function ru(e,t){Vi=null,F.H=go,t===Ja||t===ei?(t=si(),bc=3):t===Qa?(t=si(),bc=4):bc=t===Ro?8:null!==t&&"object"===typeof t&&"function"===typeof t.then?6:1,yc=t,null===gc&&(Ac=1,Co(e,Kr(t,e.current)))}function au(){var e=Ri.current;return null===e||((4194048&vc)===vc?null===Fi:((62914560&vc)===vc||0!==(536870912&vc))&&e===Fi)}function iu(){var e=F.H;return F.H=go,null===e?go:e}function su(){var e=F.A;return F.A=hc,e}function ou(){Ac=4,xc||(4194048&vc)!==vc&&null!==Ri.current||(wc=!0),0===(134217727&jc)&&0===(134217727&_c)||null===mc||Qc(mc,vc,Cc,!1)}function lu(e,t,n){var r=pc;pc|=2;var a=iu(),i=su();mc===e&&vc===t||(Oc=null,nu(e,t)),t=!1;var s=Ac;e:for(;;)try{if(0!==bc&&null!==gc){var o=gc,l=yc;switch(bc){case 8:tu(),s=6;break e;case 3:case 2:case 9:case 6:null===Ri.current&&(t=!0);var c=bc;if(bc=0,yc=null,fu(e,o,l,c),n&&wc){s=0;break e}break;default:c=bc,bc=0,yc=null,fu(e,o,l,c)}}cu(),s=Ac;break}catch(u){ru(e,u)}return t&&e.shellSuspendCounter++,ja=Aa=null,pc=r,F.H=a,F.A=i,null===gc&&(mc=null,vc=0,Pr()),s}function cu(){for(;null!==gc;)du(gc)}function uu(){for(;null!==gc&&!se();)du(gc)}function du(e){var t=ol(e.alternate,e,Nc);e.memoizedProps=e.pendingProps,null===t?pu(e):gc=t}function hu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Go(n,t,t.pendingProps,t.type,void 0,vc);break;case 11:t=Go(n,t,t.pendingProps,t.type.render,t.ref,vc);break;case 5:os(t);default:gl(n,t),t=ol(n,t=gc=Ur(t,Nc),Nc)}e.memoizedProps=e.pendingProps,null===t?pu(e):gc=t}function fu(e,t,n,r){ja=Aa=null,os(t),li=null,ci=0;var a=t.return;try{if(function(e,t,n,r,a){if(n.flags|=32768,null!==r&&"object"===typeof r&&"function"===typeof r.then){if(null!==(t=n.alternate)&&La(t,n,a,!0),null!==(n=Ri.current)){switch(n.tag){case 31:case 13:return null===Fi?ou():null===n.alternate&&0===Ac&&(Ac=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===ti?n.flags|=16384:(null===(t=n.updateQueue)?n.updateQueue=new Set([r]):t.add(r),_u(e,r,a)),!1;case 22:return n.flags|=65536,r===ti?n.flags|=16384:(null===(t=n.updateQueue)?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):null===(n=t.retryQueue)?t.retryQueue=new Set([r]):n.add(r),_u(e,r,a)),!1}throw Error(s(435,n.tag))}return _u(e,r,a),ou(),!1}if(ha)return null!==(t=Ri.current)?(0===(65536&t.flags)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ma&&ka(Kr(e=Error(s(422),{cause:r}),n))):(r!==ma&&ka(Kr(t=Error(s(423),{cause:r}),n)),(e=e.current.alternate).flags|=65536,a&=-a,e.lanes|=a,r=Kr(r,n),ki(e,a=Lo(e.stateNode,r,a)),4!==Ac&&(Ac=2)),!1;var i=Error(s(520),{cause:r});if(i=Kr(i,n),null===Lc?Lc=[i]:Lc.push(i),4!==Ac&&(Ac=2),null===t)return!0;r=Kr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,ki(n,e=Lo(n.stateNode,r,e)),!1;case 1:if(t=n.type,i=n.stateNode,0===(128&n.flags)&&("function"===typeof t.getDerivedStateFromError||null!==i&&"function"===typeof i.componentDidCatch&&(null===Dc||!Dc.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,To(a=Po(a),e,n,r),ki(n,a),!1}n=n.return}while(null!==n);return!1}(e,a,t,n,vc))return Ac=1,Co(e,Kr(n,e.current)),void(gc=null)}catch(i){if(null!==a)throw gc=a,i;return Ac=1,Co(e,Kr(n,e.current)),void(gc=null)}32768&t.flags?(ha||1===r?e=!0:wc||0!==(536870912&vc)?e=!1:(xc=e=!0,(2===r||9===r||3===r||6===r)&&(null!==(r=Ri.current)&&13===r.tag&&(r.flags|=16384))),mu(t,e)):pu(t)}function pu(e){var t=e;do{if(0!==(32768&t.flags))return void mu(t,xc);e=t.return;var n=pl(t.alternate,t,Nc);if(null!==n)return void(gc=n);if(null!==(t=t.sibling))return void(gc=t);gc=t=e}while(null!==t);0===Ac&&(Ac=5)}function mu(e,t){do{var n=ml(e.alternate,e);if(null!==n)return n.flags&=32767,void(gc=n);if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling))return void(gc=e);gc=e=n}while(null!==e);Ac=6,gc=null}function gu(e,t,n,r,a,i,o,l,c){e.cancelPendingCommit=null;do{ku()}while(0!==Ic);if(0!==(6&pc))throw Error(s(327));if(null!==t){if(t===e.current)throw Error(s(177));if(i=t.lanes|t.childLanes,function(e,t,n,r,a,i){var s=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,l=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0<n;){var u=31-xe(n),d=1<<u;o[u]=0,l[u]=-1;var h=c[u];if(null!==h)for(c[u]=null,u=0;u<h.length;u++){var f=h[u];null!==f&&(f.lane&=-536870913)}n&=~d}0!==r&&Re(e,r,0),0!==i&&0===a&&0!==e.tag&&(e.suspendedLanes|=i&~(s&~t))}(e,n,i|=Lr,o,l,c),e===mc&&(gc=mc=null,vc=0),Bc=t,zc=e,qc=n,Uc=i,Vc=a,Hc=r,0!==(10256&t.subtreeFlags)||0!==(10256&t.flags)?(e.callbackNode=null,e.callbackPriority=0,ae(he,function(){return Nu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=0!==(13878&t.flags),0!==(13878&t.subtreeFlags)||r){r=F.T,F.T=null,a=M.p,M.p=2,o=pc,pc|=4;try{!function(e,t){if(e=e.containerInfo,gd=wh,ir(e=ar(e))){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch(g){n=null;break e}var o=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==a&&3!==h.nodeType||(l=o+a),h!==i||0!==r&&3!==h.nodeType||(c=o+r),3===h.nodeType&&(o+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===a&&(l=o),f===i&&++d===r&&(c=o),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(vd={focusedElem:e,selectionRange:n},wh=!1,Fl=t;null!==Fl;)if(e=(t=Fl).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Fl=e;else for(;null!==Fl;){switch(i=(t=Fl).alternate,e=t.flags,t.tag){case 0:if(0!==(4&e)&&null!==(e=null!==(e=t.updateQueue)?e.events:null))for(n=0;n<e.length;n++)(a=e[n]).ref.impl=a.nextImpl;break;case 11:case 15:case 5:case 26:case 27:case 6:case 4:case 17:break;case 1:if(0!==(1024&e)&&null!==i){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var m=Ao(n.type,a);e=r.getSnapshotBeforeUpdate(m,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(v){ju(n,n.return,v)}}break;case 3:if(0!==(1024&e))if(9===(n=(e=t.stateNode.containerInfo).nodeType))Pd(e);else if(1===n)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pd(e);break;default:e.textContent=""}break;default:if(0!==(1024&e))throw Error(s(163))}if(null!==(e=t.sibling)){e.return=t.return,Fl=e;break}Fl=t.return}}(e,t)}finally{pc=o,M.p=a,F.T=r}}Ic=1,vu(),yu(),xu()}}function vu(){if(1===Ic){Ic=0;var e=zc,t=Bc,n=0!==(13878&t.flags);if(0!==(13878&t.subtreeFlags)||n){n=F.T,F.T=null;var r=M.p;M.p=2;var a=pc;pc|=4;try{Gl(t,e);var i=vd,s=ar(e.containerInfo),o=i.focusedElem,l=i.selectionRange;if(s!==o&&o&&o.ownerDocument&&rr(o.ownerDocument.documentElement,o)){if(null!==l&&ir(o)){var c=l.start,u=l.end;if(void 0===u&&(u=c),"selectionStart"in o)o.selectionStart=c,o.selectionEnd=Math.min(u,o.value.length);else{var d=o.ownerDocument||document,h=d&&d.defaultView||window;if(h.getSelection){var f=h.getSelection(),p=o.textContent.length,m=Math.min(l.start,p),g=void 0===l.end?m:Math.min(l.end,p);!f.extend&&m>g&&(s=g,g=m,m=s);var v=nr(o,m),b=nr(o,g);if(v&&b&&(1!==f.rangeCount||f.anchorNode!==v.node||f.anchorOffset!==v.offset||f.focu
2sNode!==b.node||f.focusOffset!==b.offset)){var y=d.createRange();y.setStart(v.node,v.offset),f.removeAllRanges(),m>g?(f.addRange(y),f.extend(b.node,b.offset)):(y.setEnd(b.node,b.offset),f.addRange(y))}}}}for(d=[],f=o;f=f.parentNode;)1===f.nodeType&&d.push({element:f,left:f.scrollLeft,top:f.scrollTop});for("function"===typeof o.focus&&o.focus(),o=0;o<d.length;o++){var x=d[o];x.element.scrollLeft=x.left,x.element.scrollTop=x.top}}wh=!!gd,vd=gd=null}finally{pc=a,M.p=r,F.T=n}}e.current=t,Ic=2}}function yu(){if(2===Ic){Ic=0;var e=zc,t=Bc,n=0!==(8772&t.flags);if(0!==(8772&t.subtreeFlags)||n){n=F.T,F.T=null;var r=M.p;M.p=2;var a=pc;pc|=4;try{Ml(e,t.alternate,t)}finally{pc=a,M.p=r,F.T=n}}Ic=3}}function xu(){if(4===Ic||3===Ic){Ic=0,oe();var e=zc,t=Bc,n=qc,r=Hc;0!==(10256&t.subtreeFlags)||0!==(10256&t.flags)?Ic=5:(Ic=0,Bc=zc=null,wu(e,e.pendingLanes));var a=e.pendingLanes;if(0===a&&(Dc=null),De(n),t=t.stateNode,be&&"function"===typeof be.onCommitFiberRoot)try{be.onCommitFiberRoot(ve,t,void 0,128===(128&t.current.flags))}catch(l){}if(null!==r){t=F.T,a=M.p,M.p=2,F.T=null;try{for(var i=e.onRecoverableError,s=0;s<r.length;s++){var o=r[s];i(o.value,{componentStack:o.stack})}}finally{F.T=t,M.p=a}}0!==(3&qc)&&ku(),Du(e),a=e.pendingLanes,0!==(261930&n)&&0!==(42&a)?e===Gc?Wc++:(Wc=0,Gc=e):Wc=0,Iu(0,!1)}}function wu(e,t){0===(e.pooledCacheLanes&=t)&&(null!=(t=e.pooledCache)&&(e.pooledCache=null,qa(t)))}function ku(){return vu(),yu(),xu(),Nu()}function Nu(){if(5!==Ic)return!1;var e=zc,t=Uc;Uc=0;var n=De(qc),r=F.T,a=M.p;try{M.p=32>n?32:n,F.T=null,n=Vc,Vc=null;var i=zc,o=qc;if(Ic=0,Bc=zc=null,qc=0,0!==(6&pc))throw Error(s(331));var l=pc;if(pc|=4,cc(i.current),tc(i,i.current,o,n),pc=l,Iu(0,!1),be&&"function"===typeof be.onPostCommitFiberRoot)try{be.onPostCommitFiberRoot(ve,i)}catch(c){}return!0}finally{M.p=a,F.T=r,wu(e,t)}}function Au(e,t,n){t=Kr(n,t),null!==(e=xi(e,t=Lo(e.stateNode,t,2),2))&&(Te(e,2),Du(e))}function ju(e,t,n){if(3===e.tag)Au(e,e,n);else for(;null!==t;){if(3===t.tag){Au(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Dc||!Dc.has(r))){e=Kr(n,e),null!==(r=xi(t,n=Po(2),2))&&(To(n,r,t,e),Te(r,2),Du(r));break}}t=t.return}}function _u(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fc;var a=new Set;r.set(t,a)}else void 0===(a=r.get(t))&&(a=new Set,r.set(t,a));a.has(n)||(kc=!0,a.add(n),e=Su.bind(null,e,t,n),t.then(e,e))}function Su(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,mc===e&&(vc&n)===n&&(4===Ac||3===Ac&&(62914560&vc)===vc&&300>le()-Rc?0===(2&pc)&&nu(e,0):Sc|=n,Ec===vc&&(Ec=0)),Du(e)}function Cu(e,t){0===t&&(t=Le()),null!==(e=Fr(e,t))&&(Te(e,t),Du(e))}function Eu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cu(e,n)}function Lu(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;null!==a&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(s(314))}null!==r&&r.delete(t),Cu(e,n)}var Pu=null,Tu=null,Ru=!1,Fu=!1,Mu=!1,Ou=0;function Du(e){e!==Tu&&null===e.next&&(null===Tu?Pu=Tu=e:Tu=Tu.next=e),Fu=!0,Ru||(Ru=!0,_d(function(){0!==(6&pc)?ae(ue,zu):Bu()}))}function Iu(e,t){if(!Mu&&Fu){Mu=!0;do{for(var n=!1,r=Pu;null!==r;){if(!t)if(0!==e){var a=r.pendingLanes;if(0===a)var i=0;else{var s=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-xe(42|e)+1)-1,i=201326741&(i&=a&~(s&~o))?201326741&i|1:i?2|i:0}0!==i&&(n=!0,Vu(r,i))}else i=vc,0===(3&(i=Se(r,r===mc?i:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||Ce(r,i)||(n=!0,Vu(r,i));r=r.next}}while(n);Mu=!1}}function zu(){Bu()}function Bu(){Fu=Ru=!1;var e=0;0!==Ou&&function(){var e=window.event;if(e&&"popstate"===e.type)return e!==kd&&(kd=e,!0);return kd=null,!1}()&&(e=Ou);for(var t=le(),n=null,r=Pu;null!==r;){var a=r.next,i=qu(r,t);0===i?(r.next=null,null===n?Pu=a:n.next=a,null===a&&(Tu=n)):(n=r,(0!==e||0!==(3&i))&&(Fu=!0)),r=a}0!==Ic&&5!==Ic||Iu(e,!1),0!==Ou&&(Ou=0)}function qu(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=-62914561&e.pendingLanes;0<i;){var s=31-xe(i),o=1<<s,l=a[s];-1===l?0!==(o&n)&&0===(o&r)||(a[s]=Ee(o,t)):l<=t&&(e.expiredLanes|=o),i&=~o}if(n=vc,n=Se(e,e===(t=mc)?n:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle),r=e.callbackNode,0===n||e===t&&(2===bc||9===bc)||null!==e.cancelPendingCommit)return null!==r&&null!==r&&ie(r),e.callbackNode=null,e.callbackPriority=0;if(0===(3&n)||Ce(e,n)){if((t=n&-n)===e.callbackPriority)return t;switch(null!==r&&ie(r),De(n)){case 2:case 8:n=de;break;case 32:default:n=he;break;case 268435456:n=pe}return r=Uu.bind(null,e),n=ae(n,r),e.callbackPriority=t,e.callbackNode=n,t}return null!==r&&null!==r&&ie(r),e.callbackPriority=2,e.callbackNode=null,2}function Uu(e,t){if(0!==Ic&&5!==Ic)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ku()&&e.callbackNode!==n)return null;var r=vc;return 0===(r=Se(e,e===mc?r:0,null!==e.cancelPendingCommit||-1!==e.timeoutHandle))?null:(Xc(e,r,t),qu(e,le()),null!=e.callbackNode&&e.callbackNode===n?Uu.bind(null,e):null)}function Vu(e,t){if(ku())return null;Xc(e,t,!0)}function Hu(){if(0===Ou){var e=Ha;0===e&&(e=Ne,0===(261888&(Ne<<=1))&&(Ne=256)),Ou=e}return Ou}function Wu(e){return null==e||"symbol"===typeof e||"boolean"===typeof e?null:"function"===typeof e?e:Pt(""+e)}function Gu(e,t){var n=t.ownerDocument.createElement("input");
vendor: 3,194 bytes, line 2
2return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}for(var $u=0;$u<jr.length;$u++){var Yu=jr[$u];_r(Yu.toLowerCase(),"on"+(Yu[0].toUpperCase()+Yu.slice(1)))}_r(vr,"onAnimationEnd"),_r(br,"onAnimationIteration"),_r(yr,"onAnimationStart"),_r("dblclick","onDoubleClick"),_r("focusin","onFocus"),_r("focusout","onBlur"),_r(xr,"onTransitionRun"),_r(wr,"onTransitionStart"),_r(kr,"onTransitionCancel"),_r(Nr,"onTransitionEnd"),at("onMouseEnter",["mouseout","mouseover"]),at("onMouseLeave",["mouseout","mouseover"]),at("onPointerEnter",["pointerout","pointerover"]),at("onPointerLeave",["pointerout","pointerover"]),rt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rt("onBeforeInput",["compositionend","keypress","textInput","paste"]),rt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rt("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ku="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Xu=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ku));function Zu(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=c;try{i(a)}catch(u){Sr(u)}a.currentTarget=null,i=l}else for(s=0;s<r.length;s++){if(l=(o=r[s]).instance,c=o.currentTarget,o=o.listener,l!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=c;try{i(a)}catch(u){Sr(u)}a.currentTarget=null,i=l}}}}function Ju(e,t){var n=t[He];void 0===n&&(n=t[He]=new Set);var r=e+"__bubble";n.has(r)||(nd(t,e,2,!1),n.add(r))}function Qu(e,t,n){var r=0;t&&(r|=4),nd(n,e,r,t)}var ed="_reactListening"+Math.random().toString(36).slice(2);function td(e){if(!e[ed]){e[ed]=!0,tt.forEach(function(t){"selectionchange"!==t&&(Xu.has(t)||Qu(t,!1,e),Qu(t,!0,e))});var t=9===e.nodeType?e:e.ownerDocument;null===t||t[ed]||(t[ed]=!0,Qu("selectionchange",!1,t))}}function nd(e,t,n,r){switch(Ch(t)){case 2:var a=kh;break;case 8:a=Nh;break;default:a=Ah}n=a.bind(null,t,n,e),a=void 0,!Ut||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(a=!0),r?void 0!==a?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):void 0!==a?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function rd(e,t,n,r,a){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var o=r.stateNode.containerInfo;if(o===a)break;if(4===s)for(s=r.return;null!==s;){var c=s.tag;if((3===c||4===c)&&s.stateNode.containerInfo===a)return;s=s.return}for(;null!==o;
vendor: 4,252 bytes, line 2
2){if(null===(s=Xe(o)))return;if(5===(c=s.tag)||6===c||26===c||27===c){r=i=s;continue e}o=o.parentNode}}r=r.return}zt(function(){var r=i,a=Ft(n),s=[];e:{var o=Ar.get(e);if(void 0!==o){var c=nn,u=e;switch(e){case"keypress":if(0===Yt(n))break e;case"keydown":case"keyup":c=yn;break;case"focusin":u="focus",c=cn;break;case"focusout":u="blur",c=cn;break;case"beforeblur":case"afterblur":c=cn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":c=on;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":c=ln;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":c=wn;break;case vr:case br:case yr:c=un;break;case Nr:c=kn;break;case"scroll":case"scrollend":c=an;break;case"wheel":c=Nn;break;case"copy":case"cut":case"paste":c=dn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":c=xn;break;case"toggle":case"beforetoggle":c=An}var d=0!==(4&t),h=!d&&("scroll"===e||"scrollend"===e),f=d?null!==o?o+"Capture":null:o;d=[];for(var p,m=r;null!==m;){var g=m;if(p=g.stateNode,5!==(g=g.tag)&&26!==g&&27!==g||null===p||null===f||null!=(g=Bt(m,f))&&d.push(ad(m,g,p)),h)break;m=m.return}0<d.length&&(o=new c(o,u,null,n,a),s.push({event:o,listeners:d}))}}if(0===(7&t)){if(c="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||n===Rt||!(u=n.relatedTarget||n.fromElement)||!Xe(u)&&!u[Ve])&&(c||o)&&(o=a.window===a?a:(o=a.ownerDocument)?o.defaultView||o.parentWindow:window,c?(c=r,null!==(u=(u=n.relatedTarget||n.toElement)?Xe(u):null)&&(h=l(u),d=u.tag,u!==h||5!==d&&27!==d&&6!==d)&&(u=null)):(c=null,u=r),c!==u)){if(d=on,g="onMouseLeave",f="onMouseEnter",m="mouse","pointerout"!==e&&"pointerover"!==e||(d=xn,g="onPointerLeave",f="onPointerEnter",m="pointer"),h=null==c?o:Je(c),p=null==u?o:Je(u),(o=new d(g,m+"leave",c,n,a)).target=h,o.relatedTarget=p,g=null,Xe(a)===r&&((d=new d(f,m+"enter",u,n,a)).target=p,d.relatedTarget=h,g=d),h=g,c&&u)e:{for(d=sd,m=u,p=0,g=f=c;g;g=d(g))p++;g=0;for(var v=m;v;v=d(v))g++;for(;0<p-g;)f=d(f),p--;for(;0<g-p;)m=d(m),g--;for(;p--;){if(f===m||null!==m&&f===m.alternate){d=f;break e}f=d(f),m=d(m)}d=null}else d=null;null!==c&&od(s,o,c,d,!1),null!==u&&null!==h&&od(s,h,u,d,!0)}if("select"===(c=(o=r?Je(r):window).nodeName&&o.nodeName.toLowerCase())||"input"===c&&"file"===o.type)var b=Un;else if(On(o))if(Vn)b=Jn;else{b=Xn;var y=Kn}else!(c=o.nodeName)||"input"!==c.toLowerCase()||"checkbox"!==o.type&&"radio"!==o.type?r&&Ct(r.elementType)&&(b=Un):b=Zn;switch(b&&(b=b(e,r))?Dn(s,b,n,a):(y&&y(e,o,r),"focusout"===e&&r&&"number"===o.type&&null!=r.memoizedProps.value&&xt(o,"number",o.value)),y=r?Je(r):window,e){case"focusin":(On(y)||"true"===y.contentEditable)&&(or=y,lr=r,cr=null);break;case"focusout":cr=lr=or=null;break;case"mousedown":ur=!0;break;case"contextmenu":case"mouseup":case"dragend":ur=!1,dr(s,n,a);break;case"selectionchange":if(sr)break;case"keydown":case"keyup":dr(s,n,a)}var x;if(_n)e:{switch(e){case"compositionstart":var w="onCompositionStart";break e;case"compositionend":w="onCompositionEnd";break e;case"compositionupdate":w="onCompositionUpdate";break e}w=void 0}else Fn?Tn(e,n)&&(w="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(w="onCompositionStart");w&&(En&&"ko"!==n.locale&&(Fn||"onCompositionStart"!==w?"onCompositionEnd"===w&&Fn&&(x=$t()):(Wt="value"in(Ht=a)?Ht.value:Ht.textContent,Fn=!0)),0<(y=id(r,w)).length&&(w=new hn(w,e,null,n,a),s.push({event:w,listeners:y}),x?w.data=x:null!==(x=Rn(n))&&(w.data=x))),(x=Cn?function(e,t){switch(e){case"compositionend":return Rn(t);case"keypress":return 32!==t.which?null:(Pn=!0,Ln);case"textInput":return(e=t.data)===Ln&&Pn?null:e;default:return null}}(e,n):function(e,t){if(Fn)return"compositionend"===e||!_n&&Tn(e,t)?(e=$t(),Gt=Wt=Ht=null,Fn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return En&&"ko"!==t.locale?null:t.data}}
2(e,n))&&(0<(w=id(r,"onBeforeInput")).length&&(y=new hn("onBeforeInput","beforeinput",null,n,a),s.push({event:y,listeners:w}),y.data=x)),function(e,t,n,r,a){if("submit"===t&&n&&n.stateNode===a){var i=Wu((a[Ue]||null).action),s=r.submitter;s&&null!==(t=(t=s[Ue]||null)?Wu(t.formAction):s.getAttribute("formAction"))&&(i=t,s=null);var o=new nn("action","action",null,r,a);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(0!==Ou){var e=s?Gu(a,s):new FormData(a);to(n,{pending:!0,data:e,method:a.method,action:i},null,e)}}else"function"===typeof i&&(o.preventDefault(),e=s?Gu(a,s):new FormData(a),to(n,{pending:!0,data:e,method:a.method,action:i},i,e))},currentTarget:a}]})}}(s,e,r,n,a)}Zu(s,t)})}function ad(e,t,n){return{instance:e,listener:t,currentTarget:n}}function id(e,t){for(var n=t+"Capture",r=[];null!==e;){var a=e,i=a.stateNode;if(5!==(a=a.tag)&&26!==a&&27!==a||null===i||(null!=(a=Bt(e,n))&&r.unshift(ad(e,a,i)),null!=(a=Bt(e,t))&&r.push(ad(e,a,i))),3===e.tag)return r;e=e.return}return[]}function sd(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag&&27!==e.tag);return e||null}function od(e,t,n,r,a){for(var i=t._reactName,s=[];null!==n&&n!==r;){var o=n,l=o.alternate,c=o.stateNode;if(o=o.tag,null!==l&&l===r)break;5!==o&&26!==o&&27!==o||null===c||(l=c,a?null!=(c=Bt(n,i))&&s.unshift(ad(n,c,l)):a||null!=(c=Bt(n,i))&&s.push(ad(n,c,l))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var ld=/\r\n?/g,cd=/\u0000|\uFFFD/g;function ud(e){return("string"===typeof e?e:""+e).replace(ld,"\n").replace(cd,"")}function dd(e,t){return t=ud(t),ud(e)===t}function hd(e,t,n,r,a,i){switch(n){case"children":"string"===typeof r?"body"===t||"textarea"===t&&""===r||At(e,r):("number"===typeof r||"bigint"===typeof r)&&"body"!==t&&At(e,""+r);break;case"className":ct(e,"class",r);break;case"tabIndex":ct(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":ct(e,n,r);break;case"style":St(e,r,i);break;case"data":if("object"!==t){ct(e,"data",r);break}case"src":case"href":if(""===r&&("a"!==t||"href"!==n)){e.removeAttribute(n);break}if(null==r||"function"===typeof r||"symbol"===typeof r||"boolean"===typeof r){e.removeAttribute(n);break}r=Pt(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if("function"===typeof r){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}if("function"===typeof i&&("formAction"===n?("input"!==t&&hd(e,t,"name",a.name,a,null),hd(e,t,"formEncType",a.formEncType,a,null),hd(e,t,"formMethod",a.formMethod,a,null),hd(e,t,"formTarget",a.formTarget,a,null)):(hd(e,t,"encType",a.encType,a,null),hd(e,t,"method",a.method,a,null),hd(e,t,"target",a.target,a,null))),null==r||"symbol"===typeof r||"boolean"===typeof r){e.removeAttribute(n);break}r=Pt(""+r),e.setAttribute(n,r);break;case"onClick":null!=r&&(e.onclick=Tt);break;case"onScroll":null!=r&&Ju("scroll",e);break;case"onScrollEnd":null!=r&&Ju("scrollend",e);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=a.children)throw Error(s(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&"function"!==typeof r&&"symbol"!==typeof r;break;case"muted":e.muted=r&&"function"!==typeof r&&"symbol"!==typeof r;break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":case"autoFocus":break;case"xlinkHref":if(null==r||"function"===typeof r||"boolean"===typeof r||"symbol"===typeof r){e.removeAttribute("xlink:href");break}n=Pt(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":null!=r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInl
2ine":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":!0===r?e.setAttribute(n,""):!1!==r&&null!=r&&"function"!==typeof r&&"symbol"!==typeof r?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":null!=r&&"function"!==typeof r&&"symbol"!==typeof r&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":null==r||"function"===typeof r||"symbol"===typeof r||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Ju("beforetoggle",e),Ju("toggle",e),lt(e,"popover",r);break;case"xlinkActuate":ut(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ut(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ut(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ut(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ut(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ut(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ut(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ut(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ut(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":lt(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||"o"!==n[0]&&"O"!==n[0]||"n"!==n[1]&&"N"!==n[1])&<(e,n=Et.get(n)||n,r)}}function fd(e,t,n,r,a,i){switch(n){case"style":St(e,r,i);break;case"dangerouslySetInnerHTML":if(null!=r){if("object"!==typeof r||!("__html"in r))throw Error(s(61));if(null!=(n=r.__html)){if(null!=a.children)throw Error(s(60));e.innerHTML=n}}break;case"children":"string"===typeof r?At(e,r):("number"===typeof r||"bigint"===typeof r)&&At(e,""+r);break;case"onScroll":null!=r&&Ju("scroll",e);break;case"onScrollEnd":null!=r&&Ju("scrollend",e);break;case"onClick":null!=r&&(e.onclick=Tt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":case"innerText":case"textContent":break;default:nt.hasOwnProperty(n)||("o"!==n[0]||"n"!==n[1]||(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),"function"===typeof(i=null!=(i=e[Ue]||null)?i[n]:null)&&e.removeEventListener(t,i,a),"function"!==typeof r)?n in e?e[n]=r:!0===r?e.setAttribute(n,""):lt(e,n,r):("function"!==typeof i&&null!==i&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a)))}}function pd(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ju("error",e),Ju("load",e);var r,a=!1,i=!1;for(r in n)if(n.hasOwnProperty(r)){var o=n[r];if(null!=o)switch(r){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:hd(e,t,r,o,n,null)}}return i&&hd(e,t,"srcSet",n.srcSet,n,null),void(a&&hd(e,t,"src",n.src,n,null));case"input":Ju("invalid",e);var l=r=o=i=null,c=null,u=null;for(a in n)if(n.hasOwnProperty(a)){var d=n[a];if(null!=d)switch(a){case"name":i=d;break;case"type":o=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":r=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(null!=d)throw Error(s(137,t));break;default:hd(e,t,a,d,n,null)}}return void yt(e,r,l,c,u,o,i,!1);case"select":for(i in Ju("invalid",e),a=o=r=null,n)if(n.hasOwnProperty(i)&&null!=(l=n[i]))switch(i){case"value":r=l;break;case"defaultValue":o=l;break;case"multiple":a=l;default:hd(e,t,i,l,n,null)}return t=r,n=o,e.multiple=!!a,void(null!=t?wt(e,!!a,t,!1):null!=n&&wt(e,!!a,n,!0));case"textarea":for(o in Ju("invalid",e),r=i=a=null,n)if(n.hasOwnProperty(o)&&null!=(l=n[o]))switch(o){case"value":a=l;break;case"defaultValue":i=l;break;case"children":r=l;break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(s(91));break;default:hd(e,t,o,l,n,null)}return void Nt(e,a,i,r);case"option":for(c in n)if(n.hasOwnProperty(c)&&null!=(a=n[c]))if("selected"===c)e.selected=a&&"function"!==typeof a&&"symbol"!==typeof a;else hd(e,t,c,a,n,null);return;
vendor: 4,279 bytes, line 2
2case"dialog":Ju("beforetoggle",e),Ju("toggle",e),Ju("cancel",e),Ju("close",e);break;case"iframe":case"object":Ju("load",e);break;case"video":case"audio":for(a=0;a<Ku.length;a++)Ju(Ku[a],e);break;case"image":Ju("error",e),Ju("load",e);break;case"details":Ju("toggle",e);break;case"embed":case"source":case"link":Ju("error",e),Ju("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&null!=(a=n[u]))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:hd(e,t,u,a,n,null)}return;default:if(Ct(t)){for(d in n)n.hasOwnProperty(d)&&(void 0!==(a=n[d])&&fd(e,t,d,a,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(null!=(a=n[l])&&hd(e,t,l,a,n,null))}function md(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}var gd=null,vd=null;function bd(e){return 9===e.nodeType?e:e.ownerDocument}function yd(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xd(e,t){if(0===e)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return 1===e&&"foreignObject"===t?0:e}function wd(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"bigint"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var kd=null;var Nd="function"===typeof setTimeout?setTimeout:void 0,Ad="function"===typeof clearTimeout?clearTimeout:void 0,jd="function"===typeof Promise?Promise:void 0,_d="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof jd?function(e){return jd.resolve(null).then(e).catch(Sd)}:Nd;function Sd(e){setTimeout(function(){throw e})}function Cd(e){return"head"===e}function Ed(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&8===a.nodeType)if("/$"===(n=a.data)||"/&"===n){if(0===r)return e.removeChild(a),void Gh(t);r--}else if("$"===n||"$?"===n||"$~"===n||"$!"===n||"&"===n)r++;else if("html"===n)Bd(e.ownerDocument.documentElement);else if("head"===n){Bd(n=e.ownerDocument.head);for(var i=n.firstChild;i;){var s=i.nextSibling,o=i.nodeName;i[Ye]||"SCRIPT"===o||"STYLE"===o||"LINK"===o&&"stylesheet"===i.rel.toLowerCase()||n.removeChild(i),i=s}}else"body"===n&&Bd(e.ownerDocument.body);n=a}while(n);Gh(t)}function Ld(e,t){var n=e;e=0;do{var r=n.nextSibling;if(1===n.nodeType?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",""===n.getAttribute("style")&&n.removeAttribute("style")):3===n.nodeType&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&8===r.nodeType)if("/$"===(n=r.data)){if(0===e)break;e--}else"$"!==n&&"$?"!==n&&"$~"!==n&&"$!"!==n||e++;n=r}while(n)}function Pd(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Pd(n),Ke(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function Td(e,t){for(;8!==e.nodeType;){if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!t)return null;if(null===(e=Md(e.nextSibling)))return null}return e}function Rd(e){return"$?"===e.data||"$~"===e.data}function Fd(e){return"$!"===e.data||"$?"===e.data&&"loading"!==e.ownerDocument.readyState}function Md(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"$~"===t||"&"===t||"F!"===t||"F"===t)break;if("/$"===t||"/&"===t)return null}}return e}var Od=null;function Dd(e){e=e.nextSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n||"/&"===n){if(0===t)return Md(e.nextSibling);t--}else"$"!==n&&"$!"!==n&&"$?"!==n&&"$~"!==n&&"&"!==n||t++}e=e.nextSibling}return null}function Id(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n||"$~"===n||"&"===n){if(0===t)return e;t--}else"/$"!==n&&"/&"!==n||t++}e=e.previousSibling}return null}function zd(e,t,n){switch(t=bd(n),e){case"html":if(!(e=t.documentElement))throw Error(s(452));return e;
2case"head":if(!(e=t.head))throw Error(s(453));return e;case"body":if(!(e=t.body))throw Error(s(454));return e;default:throw Error(s(451))}}function Bd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ke(e)}var qd=new Map,Ud=new Set;function Vd(e){return"function"===typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var Hd=M.d;M.d={f:function(){var e=Hd.f(),t=eu();return e||t},r:function(e){var t=Ze(e);null!==t&&5===t.tag&&"form"===t.type?ro(t):Hd.r(e)},D:function(e){Hd.D(e),Gd("dns-prefetch",e,null)},C:function(e,t){Hd.C(e,t),Gd("preconnect",e,t)},L:function(e,t,n){Hd.L(e,t,n);var r=Wd;if(r&&e&&t){var a='link[rel="preload"][as="'+vt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(a+='[imagesrcset="'+vt(n.imageSrcSet)+'"]',"string"===typeof n.imageSizes&&(a+='[imagesizes="'+vt(n.imageSizes)+'"]')):a+='[href="'+vt(e)+'"]';var i=a;switch(t){case"style":i=Yd(e);break;case"script":i=Zd(e)}qd.has(i)||(e=f({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),qd.set(i,e),null!==r.querySelector(a)||"style"===t&&r.querySelector(Kd(i))||"script"===t&&r.querySelector(Jd(i))||(pd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}},m:function(e,t){Hd.m(e,t);var n=Wd;if(n&&e){var r=t&&"string"===typeof t.as?t.as:"script",a='link[rel="modulepreload"][as="'+vt(r)+'"][href="'+vt(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Zd(e)}if(!qd.has(i)&&(e=f({rel:"modulepreload",href:e},t),qd.set(i,e),null===n.querySelector(a))){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Jd(i)))return}pd(r=n.createElement("link"),"link",e),et(r),n.head.appendChild(r)}}},X:function(e,t){Hd.X(e,t);var n=Wd;if(n&&e){var r=Qe(n).hoistableScripts,a=Zd(e),i=r.get(a);i||((i=n.querySelector(Jd(a)))||(e=f({src:e,async:!0},t),(t=qd.get(a))&&nh(e,t),et(i=n.createElement("script")),pd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}},S:function(e,t,n){Hd.S(e,t,n);var r=Wd;if(r&&e){var a=Qe(r).hoistableStyles,i=Yd(e);t=t||"default";var s=a.get(i);if(!s){var o={loading:0,preload:null};if(s=r.querySelector(Kd(i)))o.loading=5;else{e=f({rel:"stylesheet",href:e,"data-precedence":t},n),(n=qd.get(i))&&th(e,n);var l=s=r.createElement("link");et(l),pd(l,"link",e),l._p=new Promise(function(e,t){l.onload=e,l.onerror=t}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,eh(s,t,r)}s={type:"stylesheet",instance:s,count:1,state:o},a.set(i,s)}}},M:function(e,t){Hd.M(e,t);var n=Wd;if(n&&e){var r=Qe(n).hoistableScripts,a=Zd(e),i=r.get(a);i||((i=n.querySelector(Jd(a)))||(e=f({src:e,async:!0,type:"module"},t),(t=qd.get(a))&&nh(e,t),et(i=n.createElement("script")),pd(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}};var Wd="undefined"===typeof document?null:document;function Gd(e,t,n){var r=Wd;if(r&&"string"===typeof t&&t){var a=vt(t);a='link[rel="'+e+'"][href="'+a+'"]',"string"===typeof n&&(a+='[crossorigin="'+n+'"]'),Ud.has(a)||(Ud.add(a),e={rel:e,crossOrigin:n,href:t},null===r.querySelector(a)&&(pd(t=r.createElement("link"),"link",e),et(t),r.head.appendChild(t)))}}function $d(e,t,n,r){var a=(a=G.current)?Vd(a):null;if(!a)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return"string"===typeof n.precedence&&"string"===typeof n.href?(t=Yd(n.href),(r=(n=Qe(a).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"===typeof n.href&&"string"===typeof n.precedence){e=Yd(n.href);var i=Qe(a).hoistableStyles,o=i.get(e);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=a.querySelector(Kd(e)))&&!i._p&&(o.instance=i,o.state.loading=5),qd.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},qd.set(e,n),i||function(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),pd(t,"link",n),et(t),e.head.appendChild(t))}(a,e,n,o.state))),t&&null===r)throw Error(s(528,""));return o}if(t&&null!==r)throw Error(s(529,""));return null;
vendor: 5,036 bytes, line 2
2case"script":return t=n.async,"string"===typeof(n=n.src)&&t&&"function"!==typeof t&&"symbol"!==typeof t?(t=Zd(n),(r=(n=Qe(a).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Yd(e){return'href="'+vt(e)+'"'}function Kd(e){return'link[rel="stylesheet"]['+e+"]"}function Xd(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Zd(e){return'[src="'+vt(e)+'"]'}function Jd(e){return"script[async]"+e}function Qd(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+vt(n.href)+'"]');if(r)return t.instance=r,et(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return et(r=(e.ownerDocument||e).createElement("style")),pd(r,"style",a),eh(r,n.precedence,e),t.instance=r;case"stylesheet":a=Yd(n.href);var i=e.querySelector(Kd(a));if(i)return t.state.loading|=4,t.instance=i,et(i),i;r=Xd(n),(a=qd.get(a))&&th(r,a),et(i=(e.ownerDocument||e).createElement("link"));var o=i;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),pd(i,"link",r),t.state.loading|=4,eh(i,n.precedence,e),t.instance=i;case"script":return i=Zd(n.src),(a=e.querySelector(Jd(i)))?(t.instance=a,et(a),a):(r=n,(a=qd.get(i))&&nh(r=f({},n),a),et(a=(e=e.ownerDocument||e).createElement("script")),pd(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(s(443,t.type))}else"stylesheet"===t.type&&0===(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,eh(r,n.precedence,e));return t.instance}function eh(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,s=0;s<r.length;s++){var o=r[s];if(o.dataset.precedence===t)i=o;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=9===n.nodeType?n.head:n).insertBefore(e,t.firstChild)}function th(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.title&&(e.title=t.title)}function nh(e,t){null==e.crossOrigin&&(e.crossOrigin=t.crossOrigin),null==e.referrerPolicy&&(e.referrerPolicy=t.referrerPolicy),null==e.integrity&&(e.integrity=t.integrity)}var rh=null;function ah(e,t,n){if(null===rh){var r=new Map,a=rh=new Map;a.set(n,r)}else(r=(a=rh).get(n))||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[Ye]||i[qe]||"link"===e&&"stylesheet"===i.getAttribute("rel"))&&"http://www.w3.org/2000/svg"!==i.namespaceURI){var s=i.getAttribute(t)||"";s=e+s;var o=r.get(s);o?o.push(i):r.set(s,[i])}}return r}function ih(e,t,n){(e=e.ownerDocument||e).head.insertBefore(n,"title"===t?e.querySelector("head > title"):null)}function sh(e){return"stylesheet"!==e.type||0!==(3&e.state.loading)}var oh=0;function lh(){if(this.count--,0===this.count&&(0===this.imgCount||!this.waitingForImages))if(this.stylesheets)uh(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}var ch=null;function uh(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,ch=new Map,t.forEach(dh,e),ch=null,lh.call(e))}function dh(e,t){if(!(4&t.state.loading)){var n=ch.get(e);if(n)var r=n.get(null);else{n=new Map,ch.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var s=a[i];"LINK"!==s.nodeName&&"not all"===s.getAttribute("media")||(n.set(s.dataset.precedence,s),r=s)}r&&n.set(null,r)}s=(a=t.instance).getAttribute("data-precedence"),(i=n.get(s)||r)===r&&n.set(null,a),n.set(s,a),this.count++,r=lh.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),i?i.parentNode.insertBefore(a,i.nextSibling):(e=9===e.nodeType?e.head:e).insertBefore(a,e.firstChild),t.state.loading|=4}}var hh={$$typeof:w,Provider:null,Consumer:null,_currentValue:O,_currentValue2:O,_threadCount:0};function fh(e,t,n,r,a,i,s,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Pe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pe(0),this.hiddenUpdates=Pe(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function ph(e,t,n,r,a,i,s,o,l,c,u,d){return e=new fh(e,t,n,s,l,c,u,d,o),t=1,!0===i&&(t|=24),i=zr(3,null,null,t),e.current=i,i.stateNode=e,(t=Ba()).refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},vi(i),e}function mh(e){return e?e=Dr:Dr}function gh(e,t,n,r,a,i){a=mh(a),null===r.context?r.context=a:r.pen
vendor: 4,227 bytes, line 2
2dingContext=a,(r=yi(t)).payload={element:n},null!==(i=void 0===i?null:i)&&(r.callback=i),null!==(n=xi(e,r,t))&&(Kc(n,0,t),wi(n,e,t))}function vh(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function bh(e,t){vh(e,t),(e=e.alternate)&&vh(e,t)}function yh(e){if(13===e.tag||31===e.tag){var t=Fr(e,67108864);null!==t&&Kc(t,0,67108864),bh(e,67108864)}}function xh(e){if(13===e.tag||31===e.tag){var t=$c(),n=Fr(e,t=Oe(t));null!==n&&Kc(n,0,t),bh(e,t)}}var wh=!0;function kh(e,t,n,r){var a=F.T;F.T=null;var i=M.p;try{M.p=2,Ah(e,t,n,r)}finally{M.p=i,F.T=a}}function Nh(e,t,n,r){var a=F.T;F.T=null;var i=M.p;try{M.p=8,Ah(e,t,n,r)}finally{M.p=i,F.T=a}}function Ah(e,t,n,r){if(wh){var a=jh(r);if(null===a)rd(e,t,r,_h,n),Dh(e,r);else if(function(e,t,n,r,a){switch(t){case"focusin":return Lh=Ih(Lh,e,t,n,r,a),!0;case"dragenter":return Ph=Ih(Ph,e,t,n,r,a),!0;case"mouseover":return Th=Ih(Th,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return Rh.set(i,Ih(Rh.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,Fh.set(i,Ih(Fh.get(i)||null,e,t,n,r,a)),!0}return!1}(a,e,t,n,r))r.stopPropagation();else if(Dh(e,r),4&t&&-1<Oh.indexOf(e)){for(;null!==a;){var i=Ze(a);if(null!==i)switch(i.tag){case 3:if((i=i.stateNode).current.memoizedState.isDehydrated){var s=_e(i.pendingLanes);if(0!==s){var o=i;for(o.pendingLanes|=2,o.entangledLanes|=2;s;){var l=1<<31-xe(s);o.entanglements[1]|=l,s&=~l}Du(i),0===(6&pc)&&(Mc=le()+500,Iu(0,!1))}}break;case 31:case 13:null!==(o=Fr(i,2))&&Kc(o,0,2),eu(),bh(i,2)}if(null===(i=jh(r))&&rd(e,t,r,_h,n),i===a)break;a=i}null!==a&&r.stopPropagation()}else rd(e,t,r,null,n)}}function jh(e){return Sh(e=Ft(e))}var _h=null;function Sh(e){if(_h=null,null!==(e=Xe(e))){var t=l(e);if(null===t)e=null;else{var n=t.tag;if(13===n){if(null!==(e=c(t)))return e;e=null}else if(31===n){if(null!==(e=u(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return _h=e,null}function Ch(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ce()){case ue:return 2;case de:return 8;case he:case fe:return 32;case pe:return 268435456;default:return 32}default:return 32}}var Eh=!1,Lh=null,Ph=null,Th=null,Rh=new Map,Fh=new Map,Mh=[],Oh="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Dh(e,t){switch(e){case"focusin":case"focusout":Lh=null;break;case"dragenter":case"dragleave":Ph=null;break;case"mouseover":case"mouseout":Th=null;break;case"pointerover":case"pointerout":Rh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Fh.delete(t.pointerId)}}function Ih(e,t,n,r,a,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},null!==t&&(null!==(t=Ze(t))&&yh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==a&&-1===t.indexOf(a)&&t.pu
vendor: 6,241 bytes, line 2
2sh(a),e)}function zh(e){var t=Xe(e.target);if(null!==t){var n=l(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=c(n)))return e.blockedOn=t,void ze(e.priority,function(){xh(n)})}else if(31===t){if(null!==(t=u(n)))return e.blockedOn=t,void ze(e.priority,function(){xh(n)})}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Bh(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=jh(e.nativeEvent);if(null!==n)return null!==(t=Ze(n))&&yh(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);Rt=r,n.target.dispatchEvent(r),Rt=null,t.shift()}return!0}function qh(e,t,n){Bh(e)&&n.delete(t)}function Uh(){Eh=!1,null!==Lh&&Bh(Lh)&&(Lh=null),null!==Ph&&Bh(Ph)&&(Ph=null),null!==Th&&Bh(Th)&&(Th=null),Rh.forEach(qh),Fh.forEach(qh)}function Vh(e,t){e.blockedOn===t&&(e.blockedOn=null,Eh||(Eh=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Uh)))}var Hh=null;function Wh(e){Hh!==e&&(Hh=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Hh===e&&(Hh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],a=e[t+2];if("function"!==typeof r){if(null===Sh(r||n))continue;break}var i=Ze(n);null!==i&&(e.splice(t,3),t-=3,to(i,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function Gh(e){function t(t){return Vh(t,e)}null!==Lh&&Vh(Lh,e),null!==Ph&&Vh(Ph,e),null!==Th&&Vh(Th,e),Rh.forEach(t),Fh.forEach(t);for(var n=0;n<Mh.length;n++){var r=Mh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Mh.length&&null===(n=Mh[0]).blockedOn;)zh(n),null===n.blockedOn&&Mh.shift();if(null!=(n=(e.ownerDocument||e).$$reactFormReplay))for(r=0;r<n.length;r+=3){var a=n[r],i=n[r+1],s=a[Ue]||null;if("function"===typeof i)s||Wh(n);else if(s){var o=null;if(i&&i.hasAttribute("formAction")){if(a=i,s=i[Ue]||null)o=s.formAction;else if(null!==Sh(a))continue}else o=s.action;"function"===typeof o?n[r+1]=o:(n.splice(r,3),r-=3),Wh(n)}}}function $h(){function e(e){e.canIntercept&&"react-transition"===e.info&&e.intercept({handler:function(){return new Promise(function(e){return a=e})},focusReset:"manual",scroll:"manual"})}function t(){null!==a&&(a(),a=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&null!=e.url&&navigation.navigate(e.url,{state:e.getState(),info:"react-transition",history:"replace"})}}if("object"===typeof navigation){var r=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),null!==a&&(a(),a=null)}}}function Yh(e){this._internalRoot=e}function Kh(e){this._internalRoot=e}Kh.prototype.render=Yh.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(s(409));gh(t.current,$c(),e,t,null,null)},Kh.prototype.unmount=Yh.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;gh(e.current,2,null,e,null,null),eu(),t[Ve]=null}},Kh.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ie();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Mh.length&&0!==t&&t<Mh[n].priority;n++);Mh.splice(n,0,e),0===n&&zh(e)}};var Xh=a.version;if("19.2.3"!==Xh)throw Error(s(527,Xh,"19.2.3"));M.findDOMNode=function(e){var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return e=function(e){var t=e.alternate;if(!t){if(null===(t=l(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(null===a)break;var i=a.alternate;if(null===i){if(null!==(r=a.return)){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return d(a),e;if(i===r)return d(a),t;i=i.sibling}throw Error(s(188))}if(n.return!==r.return)n=a,r=i;else{for(var o=!1,c=a.child;c;){if(c===n){o=!0,n=a,r=i;break}if(c===r){o=!0,r=a,n=i;break}c=c.sibling}if(!o){for(c=i.child;c;){if(c===n){o=!0,n=i,r=a;break}if(c===r){o=!0,r=i,n=a;break}c=c.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}(t),e=null===(e=null!==e?h(e):null)?null:e.stateNode};var Zh={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.3"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{ve=Jh.inject(Zh),be=Jh}catch(ef){}}t.createRoot=function(e,t){if(!o(e))throw Error(s(299));var n=!1,r="",a=jo,i=_o,l=So;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onUncaughtError&&(a=t.onUncaughtError),void 0!==t.onCaughtError&&(i=t.onCaughtError),void 0!==t.onRecoverableError&&(l=t.onRecoverableError)),t=ph(e,1,!1,null,0,n,r,null,a,i,l,$h),e[Ve]=t.current,td(e),new Yh(t)},t.hydrateRoot=function(e,t,n){if(!o(e))throw Error(s(299));var r=!1,a="",i=jo,l=_o,c=So,u=null;return null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(r=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onUncaughtError&&(i=n.onUncaughtError),void 0!==n.onCaughtError&&(l=n.onCaughtError),void 0!==n.onRecoverableError&&(c=n.onRecoverableError),void 0!==n.formState&&(u=n.formState)),(t=ph(e,1,!0,t,0,r,a,u,i,l,c,$h)).context=mh(null),n=t.current,(a=yi(r=Oe(r=$c()))).callback=null,xi(n,a,r),n=r,t.current.lanes=n,Te(t,n),Du(t),e[Ve]=t.current,td(e),new Kh(t)},t.version="19.2.3"},7104(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]])},7118(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]])}
2,7365(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]])},7427(e,t,n){n.d(t,{bm:()=>xe,UC:()=>ve,VY:()=>ye,hJ:()=>ge,ZL:()=>me,bL:()=>fe,hE:()=>be,l9:()=>pe});var r=n(9379),a=n(3986),i=n(5043),s=n(858),o=n(2814),l=n(1862),c=n(4490),u=n(3642),d=n(1184),h=n(276),f=n(3321),p=n(2894),m=n(7914),g=n(6590),v=n(1672),b=n(5754),y=n(579);const x=["children"],w=["children"];function k(e){const t=N(e),n=i.forwardRef((e,n)=>{const{children:s}=e,o=(0,a.A)(e,x),l=i.Children.toArray(s),c=l.find(j);if(c){const e=c.props.children,a=l.map(t=>t===c?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return(0,y.jsx)(t,(0,r.A)((0,r.A)({},o),{},{ref:n,children:i.isValidElement(e)?i.cloneElement(e,void 0,a):null}))}return(0,y.jsx)(t,(0,r.A)((0,r.A)({},o),{},{ref:n,children:s}))});return n.displayName="".concat(e,".Slot"),n}function N(e){const t=i.forwardRef((e,t)=>{const{children:n}=e,s=(0,a.A)(e,w);if(i.isValidElement(n)){const e=function(e){var t,n;let r=null===(t=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===t?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null===(n=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===n?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n=(0,r.A)({},t);for(const a in t){const i=e[a],s=t[a];/^on[A-Z]/.test(a)?i&&s?n[a]=function(){const e=s(...arguments);return i(...arguments),e}:i&&(n[a]=i):"style"===a?n[a]=(0,r.A)((0,r.A)({},i),s):"className"===a&&(n[a]=[i,s].filter(Boolean).join(" "))}return(0,r.A)((0,r.A)({},e),n)}(s,n.props);return n.type!==i.Fragment&&(a.ref=t?(0,o.t)(t,e):e),i.cloneElement(n,a)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}var A=Symbol("radix.slottable");function j(e){return i.isValidElement(e)&&"function"===typeof e.type&&"__radixId"in e.type&&e.type.__radixId===A}const _=["__scopeDialog"],S=["forceMount"],C=["__scopeDialog"],E=["forceMount"],L=["__scopeDialog","trapFocus","onOpenAutoFocus","onCloseAutoFocus"],P=["__scopeDialog"],T=["__scopeDialog"],R=["__scopeDialog"];var F="Dialog",[M,O]=(0,l.A)(F),[D,I]=M(F),z=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:s,modal:o=!0}=e,l=i.useRef(null),d=i.useRef(null),[h,f]=(0,u.i)({prop:r,defaultProp:null!==a&&void 0!==a&&a,onChange:s,caller:F});return(0,y.jsx)(D,{scope:t,triggerRef:l,contentRef:d,contentId:(0,c.B)(),titleId:(0,c.B)(),descriptionId:(0,c.B)(),open:h,onOpenChange:f,onOpenToggle:i.useCallback(()=>f(e=>!e),[f]),modal:o,children:n})};z.displayName=F;var B="DialogTrigger",q=i.forwardRef((e,t)=>{const{__scopeDialog:n}=e,i=(0,a.A)(e,_),l=I(B,n),c=(0,o.s)(t,l.triggerRef);return(0,y.jsx)(m.sG.button,(0,r.A)((0,r.A)({type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":oe(l.open)},i),{},{ref:c,onClick:(0,s.mK)(e.onClick,l.onOpenToggle)}))});q.displayName=B;var U="DialogPortal",[V,H]=M(U,{forceMount:void 0}),W=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,s=I(U,t);return(0,y.jsx)(V,{scope:t,forceMount:n,children:i.Children.map(r,e=>(0,y.jsx)(p.C,{present:n||s.open,children:(0,y.jsx)(f.Z,{asChild:!0,container:a,children:e})}))})};W.displayName=U;var G="DialogOverlay",$=i.forwardRef((e,t)=>{const n=H(G,e.__scopeDialog),{forceMount:i=n.forceMount}=e,s=(0,a.A)(e,S),o=I(G,e.__scopeDialog);return o.modal?(0,y.jsx)(p.C,{present:i||o.open,children:(0,y.jsx)(K,(0,r.A)((0,r.A)({},s),{},{ref:t}))}):null});$.displayName=G;var Y=k("DialogOverlay.RemoveScroll"),K=i.forwardRef((e,t)=>
2{const{__scopeDialog:n}=e,i=(0,a.A)(e,C),s=I(G,n);return(0,y.jsx)(v.A,{as:Y,allowPinchZoom:!0,shards:[s.contentRef],children:(0,y.jsx)(m.sG.div,(0,r.A)((0,r.A)({"data-state":oe(s.open)},i),{},{ref:t,style:(0,r.A)({pointerEvents:"auto"},i.style)}))})}),X="DialogContent",Z=i.forwardRef((e,t)=>{const n=H(X,e.__scopeDialog),{forceMount:i=n.forceMount}=e,s=(0,a.A)(e,E),o=I(X,e.__scopeDialog);return(0,y.jsx)(p.C,{present:i||o.open,children:o.modal?(0,y.jsx)(J,(0,r.A)((0,r.A)({},s),{},{ref:t})):(0,y.jsx)(Q,(0,r.A)((0,r.A)({},s),{},{ref:t}))})});Z.displayName=X;var J=i.forwardRef((e,t)=>{const n=I(X,e.__scopeDialog),a=i.useRef(null),l=(0,o.s)(t,n.contentRef,a);return i.useEffect(()=>{const e=a.current;if(e)return(0,b.Eq)(e)},[]),(0,y.jsx)(ee,(0,r.A)((0,r.A)({},e),{},{ref:l,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:(0,s.mK)(e.onCloseAutoFocus,e=>{var t;e.preventDefault(),null===(t=n.triggerRef.current)||void 0===t||t.focus()}),onPointerDownOutside:(0,s.mK)(e.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:(0,s.mK)(e.onFocusOutside,e=>e.preventDefault())}))}),Q=i.forwardRef((e,t)=>{const n=I(X,e.__scopeDialog),a=i.useRef(!1),s=i.useRef(!1);return(0,y.jsx)(ee,(0,r.A)((0,r.A)({},e),{},{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var r,i;(null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),t.defaultPrevented)||(a.current||null===(i=n.triggerRef.current)||void 0===i||i.focus(),t.preventDefault());a.current=!1,s.current=!1},onInteractOutside:t=>{var r,i;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||(a.current=!0,"pointerdown"===t.detail.originalEvent.type&&(s.current=!0));const o=t.target;(null===(i=n.triggerRef.current)||void 0===i?void 0:i.contains(o))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&s.current&&t.preventDefault()}}))}),ee=i.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:s,onOpenAutoFocus:l,onCloseAutoFocus:c}=e,u=(0,a.A)(e,L),f=I(X,n),p=i.useRef(null),m=(0,o.s)(t,p);return(0,g.Oh)(),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(h.n,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:l,onUnmountAutoFocus:c,children:(0,y.jsx)(d.qW,(0,r.A)((0,r.A)({role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":oe(f.open)},u),{},{ref:m,onDismiss:()=>f.onOpenChange(!1)}))}),(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(de,{titleId:f.titleId}),(0,y.jsx)(he,{contentRef:p,descriptionId:f.descriptionId})]})]})}),te="DialogTitle",ne=i.forwardRef((e,t)=>{const{__scopeDialog:n}=e,i=(0,a.A)(e,P),s=I(te,n);return(0,y.jsx)(m.sG.h2,(0,r.A)((0,r.A)({id:s.titleId},i),{},{ref:t}))});ne.displayName=te;var re="DialogDescription",ae=i.forwardRef((e,t)=>{const{__scopeDialog:n}=e,i=(0,a.A)(e,T),s=I(re,n);return(0,y.jsx)(m.sG.p,(0,r.A)((0,r.A)({id:s.descriptionId},i),{},{ref:t}))});ae.displayName=re;var ie="DialogClose",se=i.forwardRef((e,t)=>{const{__scopeDialog:n}=e,i=(0,a.A)(e,R),o=I(ie,n);return(0,y.jsx)(m.sG.button,(0,r.A)((0,r.A)({type:"button"},i),{},{ref:t,onClick:(0,s.mK)(e.onClick,()=>o.onOpenChange(!1))}))});function oe(e){return e?"open":"closed"}se.displayName=ie;var le="DialogTitleWarning",[ce,ue]=(0,l.q)(le,{contentName:X,titleName:te,docsSlug:"dialog"}),de=e=>{let{titleId:t}=e;const n=ue(le),r="`".concat(n.contentName,"` requires a `").concat(n.titleName,"` for the component to be accessible for screen reader users.\n\nIf you want to hide the `").concat(n.titleName,"`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/").concat(n.docsSlug);return i.useEffect(()=>{if(t){document.getElementById(t)||console.error(r)}},[r,t]),null},he=e=>{let{contentRef:t,descriptionId:n}=e;const r=ue("DialogDescriptionWarning"),a="Warning: Missing `Description` or `aria-describedby={undefined}` for {".concat(r.contentName,"}.");return i.useEffect(()=>{var e;const r=null===(e=t.current)||void 0===e?void 0:e.getAttribute("aria-describedby");if(n&&r){document.getElementById(n)||console.warn(a)}},[a,t,n]),null},fe=z,pe=q,me=W,ge=$,ve=Z,be=ne,ye=ae,xe=se},7459(e,t,n){n.d(t,{d:()=>P});var r=n(9379),a=n(3986),i=n(5043),s=n(858),o=n(2814),l=n(1862),c=n(3642),u=n(3168),d=n(3124),h=n(7914),f=n(579);const p=["__scopeSwitch","name","checked","defaultChecked","required","disabled","value","onCheckedChange","form"],m=["__scopeSwitch"],g=["__scopeSwitch","control","checked","bubbles"];var v="Switch",[b,y]=(0,l.A)(v),[x,w]=b(v),k=i.forwardRef((e,t)=>
2{const{__scopeSwitch:n,name:l,checked:u,defaultChecked:d,required:m,disabled:g,value:b="on",onCheckedChange:y,form:w}=e,k=(0,a.A)(e,p),[N,A]=i.useState(null),S=(0,o.s)(t,e=>A(e)),C=i.useRef(!1),E=!N||(w||!!N.closest("form")),[L,P]=(0,c.i)({prop:u,defaultProp:null!==d&&void 0!==d&&d,onChange:y,caller:v});return(0,f.jsxs)(x,{scope:n,checked:L,disabled:g,children:[(0,f.jsx)(h.sG.button,(0,r.A)((0,r.A)({type:"button",role:"switch","aria-checked":L,"aria-required":m,"data-state":_(L),"data-disabled":g?"":void 0,disabled:g,value:b},k),{},{ref:S,onClick:(0,s.mK)(e.onClick,e=>{P(e=>!e),E&&(C.current=e.isPropagationStopped(),C.current||e.stopPropagation())})})),E&&(0,f.jsx)(j,{control:N,bubbles:!C.current,name:l,value:b,checked:L,required:m,disabled:g,form:w,style:{transform:"translateX(-100%)"}})]})});k.displayName=v;var N="SwitchThumb",A=i.forwardRef((e,t)=>{const{__scopeSwitch:n}=e,i=(0,a.A)(e,m),s=w(N,n);return(0,f.jsx)(h.sG.span,(0,r.A)((0,r.A)({"data-state":_(s.checked),"data-disabled":s.disabled?"":void 0},i),{},{ref:t}))});A.displayName=N;var j=i.forwardRef((e,t)=>{let{__scopeSwitch:n,control:s,checked:l,bubbles:c=!0}=e,h=(0,a.A)(e,g);const p=i.useRef(null),m=(0,o.s)(p,t),v=(0,u.Z)(l),b=(0,d.X)(s);return i.useEffect(()=>{const e=p.current;if(!e)return;const t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(v!==l&&n){const t=new Event("click",{bubbles:c});n.call(e,l),e.dispatchEvent(t)}},[v,l,c]),(0,f.jsx)("input",(0,r.A)((0,r.A)({type:"checkbox","aria-hidden":!0,defaultChecked:l},h),{},{tabIndex:-1,ref:m,style:(0,r.A)((0,r.A)((0,r.A)({},h.style),b),{},{position:"absolute",pointerEvents:"none",opacity:0,margin:0})}))});function _(e){return e?"checked":"unchecked"}j.displayName="SwitchBubbleInput";var S=k,C=A,E=n(9766);const L=["className"],P=i.forwardRef((e,t)=>{let{className:n}=e,i=(0,a.A)(e,L);return(0,f.jsx)(S,(0,r.A)((0,r.A)({className:(0,E.cn)("peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",n)},i),{},{ref:t,children:(0,f.jsx)(C,{className:(0,E.cn)("pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0")})}))});P.displayName=S.displayName},7490(e,t,n){n.d(t,{c:()=>a});var r=n(5043);function a(e){const t=r.useRef(e);return r.useEffect(()=>{t.current=e}),r.useMemo(()=>function(){for(var e,n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];return null===(e=t.current)||void 0===e?void 0:e.call(t,...r)},[])}},7694(e,t,n){n.r(t),n.d(t,{default:()=>j});var r=n(9379),a=n(5043),i=n(9722),s=n(6328),o=n(1140),l=n(5949),c=n(3390),u=n(2264),d=n(3416),h=n(6178),f=n(7459),p=n(556),m=n(5598),g=n(1360),v=n(1884);const b=(0,n(7784).A)("hand",[["path",{d:"M18 11V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2",key:"1fvzgz"}],["path",{d:"M14 10V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v2",key:"1kc0my"}],["path",{d:"M10 10.5V6a2 2 0 0 0-2-2a2 2 0 0 0-2 2v8",key:"10h0bg"}],["path",{d:"M18 8a2 2 0 1 1 4 0v6a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15",key:"1s1gnw"}]]);var y=n(4669),x=n(5746),w=n(7801),k=n(579);const N="https://nextgen-staging.emergent.host",A="__unassigned",j=e=>{var t,n;let{tickets:j,users:_,onRefresh:S,permissions:C,currentUserEmail:E}=e;const[L,P]=(0,a.useState)(null),[T,R]=(0,a.useState)(""),[F,M]=(0,a.useState)(!1),[O,D]=(0,a.useState)(!0),[I,z]=(0,a.useState)(!1),[B,q]=(0,a.useState)(!1),[U,V]=(0,a.useState)([]),[H,W]=(0,a.useState)({user_id:"",title:"",description:"",priority:"medium",category:"general"}),G=null===(t=null===C||void 0===C?void 0:C.isAdmin)||void 0===t||t,$=null!==(n=null===C||void 0===C?void 0:C.isTechnician)&&void 0!==n&&n,Y=(E||"").toLowerCase();(0,a.useEffect)(()=>{let e=!1;return(async()=>{try{const t=await i.A.get("".concat(N,"/api/admin/staff"),{withCredentials:!0});e||V(t.data||[])}catch(t){e||V([])}})(),()=>{e=!0}},[]);const[K,X]=(0,a.useState)($?"mine":"all");let Z=O?j.filter(e=>"closed"!==e.status&&"resolved"!==e.status):j;"mine"===K&&Y?Z=Z.filter(e=>(e.assigned_to||"").toLowerCase()===Y):"unassigned"===K&&(Z=Z.filter(e=>!e.assigned_to));const J=O?j.filter(e=>"closed"!==e.status&&"resolved"!==e.status):j,Q={all:J.length,mine:Y?J.filter(e=>(e.assigned_to||"").toLowerCase()===Y).length:0,unassigned:J.filter(e=>!e.assigned_to).length},ee=()=>{W({user_id:"",title:"",description:"",priority:"medium",category:"general"})},te=e=>{switch(e){case"critical":return"bg-destructive/20 text-destructive";case"high":return"bg-orange-500/20 text-orange-500";case"medium":return"bg-yellow-500/20 text-yellow-500";default:return"bg-muted text-muted-foreground"}},ne=e=>{switch(e){case"resolved":case"closed":return"bg-primary text-primary-foreground";case"in_progress":return"bg-blue-500/20 text-blue-500";default:return""}},re=e=>{const t=null===_||void 0===_?void 0:_.find(t=>t.user_id===e);return t?t.name:e};return(0,k.jsxs)("div",{className:"space-y-4","data-testid":"admin-tickets-tab",children:[(0,k.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4 p-4 bg-card border border-border rounded-lg",children:[(0,k.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,k.jsx)(f.d,{id:"hide-closed",checked:O,onCheckedChange:D}),(0,k.jsx)(p.J,{htmlFor:"hide-closed",className:"text-sm cursor-pointer",children:"Hide closed & resolved tickets"}),(0,k.jsxs)("span",{className:"text-sm text-muted-foreground",children:["(",Z.length," of ",j.length,")"]}),(0,k.jsx)("div",{className:"flex items-center gap-1 ml-1 sm:ml-3","data-testid":"assign-filter-chips",children:[{key:"all",label:"All",testid:"filter-all"},{key:"mine",label:"Mine",testid:"filter-mine"},{key:"unassigned",label:"Unassigned",testid:"filter-unassigned"}].map(e=>
2{const t=K===e.key,n="mine"===e.key&&!Y;return(0,k.jsxs)("button",{type:"button","data-testid":e.testid,disabled:n,onClick:()=>X(e.key),className:"inline-flex items-center gap-1.5 px-2.5 py-1 rounded-full text-xs font-bold uppercase tracking-widest transition-colors "+(t?"bg-primary text-primary-foreground":"border border-border bg-card text-muted-foreground hover:text-foreground hover:border-primary/40")+(n?" opacity-40 cursor-not-allowed":""),children:[e.label,(0,k.jsx)("span",{className:"rounded-sm px-1 text-[10px] tabular-nums "+(t?"bg-primary-foreground/20":"bg-muted/50"),children:Q[e.key]})]},e.key)})})]}),(0,k.jsxs)(m.lG,{open:I,onOpenChange:e=>{z(e),e||ee()},children:[(0,k.jsx)(m.zM,{asChild:!0,children:(0,k.jsxs)(c.$,{className:"font-bold uppercase",children:[(0,k.jsx)(g.A,{className:"w-4 h-4 mr-2"}),"Create Ticket"]})}),(0,k.jsxs)(m.Cf,{className:"bg-card border-border max-w-lg",children:[(0,k.jsx)(m.c7,{children:(0,k.jsx)(m.L3,{className:"text-xl font-bold uppercase",children:"Create Ticket for Client"})}),(0,k.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),H.user_id){q(!0);try{await i.A.post("".concat(N,"/api/admin/tickets"),H,{withCredentials:!0}),s.oR.success("Ticket created successfully"),z(!1),ee(),S()}catch(t){console.error("Error creating ticket:",t),s.oR.error("Failed to create ticket")}finally{q(!1)}}else s.oR.error("Please select a client")},className:"space-y-4",children:[(0,k.jsxs)("div",{children:[(0,k.jsx)(p.J,{children:"Client *"}),(0,k.jsxs)(h.l6,{value:H.user_id,onValueChange:e=>W((0,r.A)((0,r.A)({},H),{},{user_id:e})),children:[(0,k.jsx)(h.bq,{className:"bg-input",children:(0,k.jsx)(h.yv,{placeholder:"Select a client"})}),(0,k.jsx)(h.gC,{children:null===_||void 0===_?void 0:_.filter(e=>"client"===e.role).map(e=>(0,k.jsxs)(h.eb,{value:e.user_id,children:[e.name," (",e.email,")"]},e.user_id))})]})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)(p.J,{children:"Title *"}),(0,k.jsx)(u.p,{value:H.title,onChange:e=>W((0,r.A)((0,r.A)({},H),{},{title:e.target.value})),required:!0,placeholder:"Ticket title",className:"bg-input"})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)(p.J,{children:"Description *"}),(0,k.jsx)(d.T,{value:H.description,onChange:e=>W((0,r.A)((0,r.A)({},H),{},{description:e.target.value})),required:!0,rows:4,placeholder:"Describe the issue or request...",className:"bg-input"})]}),(0,k.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,k.jsxs)("div",{children:[(0,k.jsx)(p.J,{children:"Priority"}),(0,k.jsxs)(h.l6,{value:H.priority,onValueChange:e=>W((0,r.A)((0,r.A)({},H),{},{priority:e})),children:[(0,k.jsx)(h.bq,{className:"bg-input",children:(0,k.jsx)(h.yv,{})}),(0,k.jsxs)(h.gC,{children:[(0,k.jsx)(h.eb,{value:"low",children:"Low"}),(0,k.jsx)(h.eb,{value:"medium",children:"Medium"}),(0,k.jsx)(h.eb,{value:"high",children:"High"}),(0,k.jsx)(h.eb,{value:"urgent",children:"Urgent"})]})]})]}),(0,k.jsxs)("div",{children:[(0,k.jsx)(p.J,{children:"Category"}),(0,k.jsxs)(h.l6,{value:H.category,onValueChange:e=>W((0,r.A)((0,r.A)({},H),{},{category:e})),children:[(0,k.jsx)(h.bq,{className:"bg-input",children:(0,k.jsx)(h.yv,{})}),(0,k.jsxs)(h.gC,{children:[(0,k.jsx)(h.eb,{value:"general",children:"General"}),(0,k.jsx)(h.eb,{value:"technical",children:"Technical"}),(0,k.jsx)(h.eb,{value:"billing",children:"Billing"}),(0,k.jsx)(h.eb,{value:"network",children:"Network"}),(0,k.jsx)(h.eb,{value:"security",children:"Security"})]})]})]})]}),(0,k.jsx)(c.$,{type:"submit",className:"w-full font-bold uppercase",disabled:B,children:B?"Creating...":"Create Ticket"})]})]})]})]}),Z.map(e=>{var t;return(0,k.jsx)(o.Zp,{className:"p-6 border-border",children:(0,k.jsxs)("div",{className:"space-y-4",children:[(0,k.jsxs)("div",{children:[(0,k.jsxs)("div",{className:"flex flex-wrap items-center gap-3 mb-2",children:[(0,k.jsx)("h3",{className:"font-bold text-lg",children:e.title}),(0,k.jsx)(l.E,{className:te(e.priority),children:e.priority.toUpperCase()}),(0,k.jsx)(l.E,{className:ne(e.status),children:e.status.replace("_"," ").toUpperCase()}),(0,k.jsx)(w.A,{slaState:e.sla_state})]}),(0,k.jsx)("p",{className:"text-sm text-muted-foreground mb-2",children:e.description}),(0,k.jsxs)("div",{className:"flex flex-wrap items-center gap-4 text-xs text-muted-foreground",children:[(0,k.jsx)("span",{className:"font-mono",children:e.ticket_id}),(0,k.jsxs)("span",{children:["Category: ",e.category]}),(0,k.jsxs)("span",{children:["Client: ",re(e.user_id)]}),(null===(t=e.attachments)||void 0===t?void 0:t.length)>0&&(0,k.jsxs)("span",{children:[e.attachments.length," attachment(s)"]})]}),e.created_by_email&&(0,k.jsxs)("p",{className:"text-xs text-muted-foreground
2/70 mt-1 italic",children:["Created by ",(0,k.jsx)("span",{className:"font-mono",children:e.created_by_email}),e.created_by_role&&"admin"!==e.created_by_role&&(0,k.jsxs)("span",{className:"ml-1 text-[10px] uppercase tracking-widest",children:["(",e.created_by_role,")"]})]}),e.assigned_to&&(0,k.jsxs)("p",{className:"text-xs text-muted-foreground/70 italic",children:["Assigned to ",(0,k.jsx)("span",{className:"font-mono",children:e.assigned_to})]})]}),(0,k.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,k.jsxs)("div",{className:"flex items-center gap-2",children:[(0,k.jsx)("span",{className:"text-sm text-muted-foreground",children:"Status:"}),(0,k.jsxs)(h.l6,{value:e.status,onValueChange:t=>(async(e,t)=>{try{await i.A.put("".concat(N,"/api/tickets/").concat(e),t,{withCredentials:!0}),s.oR.success("Ticket updated successfully"),S()}catch(n){console.error("Error updating ticket:",n),s.oR.error("Failed to update ticket")}})(e.ticket_id,{status:t}),children:[(0,k.jsx)(h.bq,{className:"w-36 bg-input",children:(0,k.jsx)(h.yv,{})}),(0,k.jsxs)(h.gC,{children:[(0,k.jsx)(h.eb,{value:"open",children:"Open"}),(0,k.jsx)(h.eb,{value:"in_progress",children:"In Progress"}),(0,k.jsx)(h.eb,{value:"resolved",children:"Resolved"}),(0,k.jsx)(h.eb,{value:"closed",children:"Closed"})]})]})]}),G&&(0,k.jsxs)("div",{className:"flex items-center gap-2","data-testid":"admin-assign-".concat(e.ticket_id),children:[(0,k.jsx)(v.A,{className:"w-4 h-4 text-muted-foreground"}),(0,k.jsx)("span",{className:"text-sm text-muted-foreground",children:"Assign:"}),(0,k.jsxs)(h.l6,{value:e.assigned_to||A,onValueChange:t=>(async(e,t)=>{try{await i.A.put("".concat(N,"/api/admin/tickets/").concat(e,"/assign"),{assigned_to:t},{withCredentials:!0}),s.oR.success(t?"Assigned to ".concat(t):"Ticket unassigned"),S()}catch(a){var n,r;const e=(null===(n=a.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.detail)||"Failed to assign ticket";s.oR.error("string"===typeof e?e:"Failed to assign ticket")}})(e.ticket_id,t===A?null:t),children:[(0,k.jsx)(h.bq,{className:"w-56 bg-input","data-testid":"assign-trigger-".concat(e.ticket_id),children:(0,k.jsx)(h.yv,{placeholder:"Unassigned"})}),(0,k.jsxs)(h.gC,{children:[(0,k.jsx)(h.eb,{value:A,children:"\u2014 Unassigned \u2014"}),U.map(e=>(0,k.jsxs)(h.eb,{value:e.email,children:[e.name||e.email," ",(0,k.jsxs)("span",{className:"text-[10px] uppercase text-muted-foreground ml-1",children:["(",e.role,")"]})]},e.user_id))]})]})]}),!G&&$&&!e.assigned_to&&"closed"!==e.status&&(0,k.jsxs)(c.$,{variant:"outline",size:"sm",onClick:()=>(async e=>{try{var t;const n=await i.A.post("".concat(N,"/api/admin/tickets/").concat(e,"/claim"),{},{withCredentials:!0});s.oR.success((null===(t=n.data)||void 0===t?void 0:t.message)||"Ticket claimed"),S()}catch(a){var n,r;const e=(null===(n=a.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.detail)||"Failed to claim ticket";s.oR.error("string"===typeof e?e:"Failed to claim ticket")}})(e.ticket_id),"data-testid":"claim-btn-".concat(e.ticket_id),className:"border-primary/40",children:[(0,k.jsx)(b,{className:"w-4 h-4 mr-2"}),"Claim"]}),!G&&$&&e.assigned_to&&Y&&e.assigned_to.toLowerCase()===Y&&(0,k.jsx)(l.E,{variant:"outline",className:"border-primary/40 text-primary text-[10px] uppercase tracking-widest","data-testid":"mine-badge-".concat(e.ticket_id),children:"Assigned to you"}),(0,k.jsxs)(c.$,{variant:"outline",size:"sm",onClick:()=>P(L===e.ticket_id?null:e.ticket_id),children:[(0,k.jsx)(y.A,{className:"w-4 h-4 mr-2"}),L===e.ticket_id?"Cancel":"Reply"]})]}),L===e.ticket_id&&(0,k.jsxs)("div",{className:"space-y-3 p-4 bg-muted/20 rounded-lg border border-border",children:[(0,k.jsx)(d.T,{placeholder:"Type your response to the client...",value:T,onChange:e=>R(e.target.value),rows:3,className:"bg-input"}),(0,k.jsxs)(c.$,{onClick:()=>(async e=>{if(T.trim()){M(!0);try{await i.A.put("".concat(N,"/api/tickets/").concat(e),{admin_response:T,status:"in_progress"},{withCredentials:!0}),s.oR.success("Response sent successfully"),R(""),P(null),S()}catch(t){console.error("Error sending reply:",t),s.oR.error("Failed to send response")}finally{M(!1)}}else s.oR.error("Please enter a response")})(e.ticket_id),disabled:F,className:"font-bold",children:[(0,k.jsx)(x.A,{className:"w-4 h-4 mr-2"}),F?"Sending...":"Send Response"]})]}),e.admin_response&&(0,k.jsxs)("div",{className:"bg-muted/30 p-4 rounded-lg border-l-4 border-primary",children:[(0,k.jsx)("p",{className:"text-xs text-muted-foreground uppercase mb-1",children:"Admin Response"}),(0,k.jsx)("p",{className:"text-sm",children:e.admin_response})]})]})}
2,e.ticket_id)}),0===Z.length&&j.length>0&&(0,k.jsxs)(o.Zp,{className:"p-12 text-center border-border",children:[(0,k.jsx)("p",{className:"text-muted-foreground",children:"All tickets are closed or resolved."}),(0,k.jsx)(c.$,{variant:"link",onClick:()=>D(!1),className:"mt-2",children:"Show all tickets"})]}),0===j.length&&(0,k.jsx)(o.Zp,{className:"p-12 text-center border-border",children:(0,k.jsx)("p",{className:"text-muted-foreground",children:"No tickets found."})})]})}},7719(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]])},7737(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("key",[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]])},7784(e,t,n){n.d(t,{A:()=>h});var r=n(9379),a=n(3986),i=n(5043);const s=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()))(e);return t.charAt(0).toUpperCase()+t.slice(1)},o=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t).join(" ").trim()};var l={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const c=["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"],u=(0,i.forwardRef)((e,t)=>{let{color:n="currentColor",size:s=24,strokeWidth:u=2,absoluteStrokeWidth:d,className:h="",children:f,iconNode:p}=e,m=(0,a.A)(e,c);return(0,i.createElement)("svg",(0,r.A)((0,r.A)((0,r.A)({ref:t},l),{},{width:s,height:s,stroke:n,strokeWidth:d?24*Number(u)/Number(s):u,className:o("lucide",h)},!f&&!(e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0})(m)&&{"aria-hidden":"true"}),m),[...p.map(e=>{let[t,n]=e;return(0,i.createElement)(t,n)}),...Array.isArray(f)?f:[f]])}),d=["className"],h=(e,t)=>{const n=(0,i.forwardRef)((n,l)=>{let{className:c}=n,h=(0,a.A)(n,d);return(0,i.createElement)(u,(0,r.A)({ref:l,iconNode:t,className:o("lucide-".concat((f=s(e),f.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase())),"lucide-".concat(e),c)},h));var f});return n.displayName=s(e),n}},7801(e,t,n){n.d(t,{A:()=>h});n(5043);var r=n(5949),a=n(5088),i=n(7719),s=n(7784);const o=(0,s.A)("pause",[["rect",{x:"14",y:"4",width:"4",height:"16",rx:"1",key:"zuxfzm"}],["rect",{x:"6",y:"4",width:"4",height:"16",rx:"1",key:"1okwgv"}]]);var l=n(6833);const c=(0,s.A)("hourglass",[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]]);var u=n(579);const d=(e,t)=>{if("paused"===t)return"paused";if("closed"===t)return"\u2014";const n=Math.abs(e||0),r=Math.floor(n/3600),a=Math.floor(n%3600/60);return e<0?r>0?"over by ".concat(r,"h ").concat(a,"m"):"over by ".concat(a,"m"):r>0?"".concat(r,"h ").concat(a,"m left"):"".concat(a,"m left")},h=e=>{let{slaState:t,compact:n=!1}=e;if(!t)return null;if("closed"===t.status)return null;const s={on_track:{icon:a.A,label:"On track",cls:"border-primary/40 text-primary"},breaching_soon:{icon:i.A,label:"Breaching soon",cls:"border-amber-500/50 text-amber-400"},breached:{icon:i.A,label:"Breached",cls:"border-red-500/60 text-red-500 bg-red-500/10"},paused:{icon:o,label:"Paused (waiting on client)",cls:"border-blue-500/40 text-blue-400"},closed:{icon:l.A,label:"Closed",cls:"border-muted text-muted-foreground"}}[t.status]||{icon:c,label:"SLA",cls:"border-border text-muted-foreground"},h=s.icon,f=d(t.remaining_seconds,t.status);return(0,u.jsxs)(r.E,{variant:"outline",className:"text-[10px] uppercase tracking-wide gap-1 ".concat(s.cls),"data-testid":"sla-badge",children:[(0,u.jsx)(h,{className:"w-3 h-3"}),n?f:"".concat(s.label," \xb7 ").concat(f)]})}},7819(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]])},7914(e,t,n){n.d(t,{sG:()=>g,hO:()=>v});var r=n(9379),a=n(3986),i=n(5043),s=n(7950),o=n(2814),l=n(579);const c=["children"],u=["children"];
2function d(e){const t=h(e),n=i.forwardRef((e,n)=>{const{children:s}=e,o=(0,a.A)(e,c),u=i.Children.toArray(s),d=u.find(p);if(d){const e=d.props.children,a=u.map(t=>t===d?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return(0,l.jsx)(t,(0,r.A)((0,r.A)({},o),{},{ref:n,children:i.isValidElement(e)?i.cloneElement(e,void 0,a):null}))}return(0,l.jsx)(t,(0,r.A)((0,r.A)({},o),{},{ref:n,children:s}))});return n.displayName="".concat(e,".Slot"),n}function h(e){const t=i.forwardRef((e,t)=>{const{children:n}=e,s=(0,a.A)(e,u);if(i.isValidElement(n)){const e=function(e){var t,n;let r=null===(t=Object.getOwnPropertyDescriptor(e.props,"ref"))||void 0===t?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;if(a)return e.ref;if(r=null===(n=Object.getOwnPropertyDescriptor(e,"ref"))||void 0===n?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a)return e.props.ref;return e.props.ref||e.ref}(n),a=function(e,t){const n=(0,r.A)({},t);for(const a in t){const i=e[a],s=t[a];/^on[A-Z]/.test(a)?i&&s?n[a]=function(){const e=s(...arguments);return i(...arguments),e}:i&&(n[a]=i):"style"===a?n[a]=(0,r.A)((0,r.A)({},i),s):"className"===a&&(n[a]=[i,s].filter(Boolean).join(" "))}return(0,r.A)((0,r.A)({},e),n)}(s,n.props);return n.type!==i.Fragment&&(a.ref=t?(0,o.t)(t,e):e),i.cloneElement(n,a)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName="".concat(e,".SlotClone"),t}var f=Symbol("radix.slottable");function p(e){return i.isValidElement(e)&&"function"===typeof e.type&&"__radixId"in e.type&&e.type.__radixId===f}const m=["asChild"];var g=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,t)=>{const n=d("Primitive.".concat(t)),s=i.forwardRef((e,i)=>{const{asChild:s}=e,o=(0,a.A)(e,m),c=s?n:t;return"undefined"!==typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,l.jsx)(c,(0,r.A)((0,r.A)({},o),{},{ref:i}))});return s.displayName="Primitive.".concat(t),(0,r.A)((0,r.A)({},e),{},{[t]:s})},{});function v(e,t){e&&s.flushSync(()=>e.dispatchEvent(t))}},7950(e,t,n){!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(6672)},7978(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("history",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]])},8006(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("map-pin",[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]])}
2,8231(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("webhook",[["path",{d:"M18 16.98h-5.99c-1.1 0-1.95.94-2.48 1.9A4 4 0 0 1 2 17c.01-.7.2-1.4.57-2",key:"q3hayz"}],["path",{d:"m6 17 3.13-5.78c.53-.97.1-2.18-.5-3.1a4 4 0 1 1 6.89-4.06",key:"1go1hn"}],["path",{d:"m12 6 3.13 5.73C15.66 12.7 16.9 13 18 13a4 4 0 0 1 0 8",key:"qlwsc0"}]])},8387(e,t,n){function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=r(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function a(){for(var e,t,n=0,a="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=r(e))&&(a&&(a+=" "),a+=t);return a}n.d(t,{$:()=>a})},8646(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("calendar",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}]])},8853(e,t,n){e.exports=n(5896)},9219(e,t,n){n.d(t,{G:()=>a});var r=n(2316);function a(e){const t=(0,r.a)(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}},9233(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]])},9379(e,t,n){n.d(t,{A:()=>i});var r=n(4705);function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}},9581(e,t,n){n.d(t,{GP:()=>Y});var r=n(1669),a=n(849),i=n(9219),s=n(1844),o=n(4524),l=n(2316);function c(e,t){const n=(0,l.a)(e,null===t||void 0===t?void 0:t.in);return n.setHours(0,0,0,0),n}function u(e,t,n){const[r,a]=(0,s.x)(null===n||void 0===n?void 0:n.in,e,t),l=c(r),u=c(a),d=+l-(0,i.G)(l),h=+u-(0,i.G)(u);return Math.round((d-h)/o.w4)}function d(e,t){const n=(0,l.a)(e,null===t||void 0===t?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function h(e,t){const n=(0,l.a)(e,null===t||void 0===t?void 0:t.in);return u(n,d(n))+1}var f=n(9379);function p(e,t){var n,r,i,s,o,c;const u=(0,a.q)(),d=null!==(n=null!==(r=null!==(i=null!==(s=null===t||void 0===t?void 0:t.weekStartsOn)&&void 0!==s?s:null===t||void 0===t||null===(o=t.locale)||void 0===o||null===(o=o.options)||void 0===o?void 0:o.weekStartsOn)&&void 0!==i?i:u.weekStartsOn)&&void 0!==r?r:null===(c=u.locale)||void 0===c||null===(c=c.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0,h=(0,l.a)(e,null===t||void 0===t?void 0:t.in),f=h.getDay(),p=(f<d?7:0)+f-d;return h.setDate(h.getDate()-p),h.setHours(0,0,0,0),h}function m(e,t){return p(e,(0,f.A)((0,f.A)({},t),{},{weekStartsOn:1}))}var g=n(2440);function v(e,t){const n=(0,l.a)(e,null===t||void 0===t?void 0:t.in),r=n.getFullYear(),a=(0,g.w)(n,0);a.setFullYear(r+1,0,4),a.setHours(0,0,0,0);const i=m(a),s=(0,g.w)(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const o=m(s);return n.getTime()>=i.getTime()?r+1:n.getTime()>=o.getTime()?r:r-1}function b(e,t){const n=v(e,t),r=(0,g.w)((null===t||void 0===t?void 0:t.in)||e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),m(r)}function y(e,t){const n=(0,l.a)(e,null===t||void 0===t?void 0:t.in),r=+m(n)-+b(n);return Math.round(r/o.my)+1}function x(e,t){var n,r,i,s,o,c;const u=(0,l.a)(e,null===t||void 0===t?void 0:t.in),d=u.getFullYear(),h=(0,a.q)(),f=null!==(n=null!==(r=null!==(i=null!==(s=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null===t||void 0===t||null===(o=t.locale)||void 0===o||null===(o=o.options)||void 0===o?void 0:o.firstWeekContainsDate)&&void 0!==i?i:h.firstWeekContainsDate)&&void 0!==r?r:null===(c=h.locale)||void 0===c||null===(c=c.options)||void 0===c?void 0:c.firstWeekContainsDate)&&void 0!==n?n:1,m=(0,g.w)((null===t||void 0===t?void 0:t.in)||e,0);m.setFullYear(d+1,0,f),m.setHours(0,0,0,0);const v=p(m,t),b=(0,g.w)((null===t||void 0===t?void 0:t.in)||e,0);b.setFullYear(d,0,f),b.setHours(0,0,0,0);const y=p(b,t);return+u>=+v?d+1:+u>=+y?d:d-1}function w(e,t){var n,r,i,s,o,l;const c=(0,a.q)(),u=null!==(n=null!==(r=null!==(i=null!==(s=null===t||void 0===t?void 0:t.firstWeekContainsDate)&&void 0!==s?s:null===t||void 0===t||null===(o=t.locale)||void 0===o||null===(o=o.options)||void 0===o?void 0:o.firstWeekContainsDate)&&void 0!==i?i:c.firstWeekContainsDate)&&void 0!==r?r:null===(l=c.locale)||void 0===l||null===(l=l.options)||void 0===l?void 0:l.firstWeekContainsDate)&&void 0!==n?n:1,d=x(e,t),h=(0,g.w)((null===t||void 0===t?void 0:t.in)||e,0);h.setFullYear(d,0,u),h.setHours(0,0,0,0);return p(h,t)}function k(e,t){const n=(0,l.a)(e,null===t||void 0===t?void 0:t.in),r=+p(n,t)-+w(n,t);return Math.round(r/o.my)+1}function N(e,t){return(e<0?"-":"")+Math.abs(e).toString().padStart(t,"0")}const A={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return N("yy"===t?r%100:r,t.length)},M(e,t){const n=e.getMonth();return"M"===t?String(n+1):N(n+1,2)},d:(e,t)=>N(e.getDate(),t.length),a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];
vendor: 4,827 bytes, line 2
2default:return"am"===n?"a.m.":"p.m."}},h:(e,t)=>N(e.getHours()%12||12,t.length),H:(e,t)=>N(e.getHours(),t.length),m:(e,t)=>N(e.getMinutes(),t.length),s:(e,t)=>N(e.getSeconds(),t.length),S(e,t){const n=t.length,r=e.getMilliseconds();return N(Math.trunc(r*Math.pow(10,n-3)),t.length)}},j="midnight",_="noon",S="morning",C="afternoon",E="evening",L="night",P={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if("yo"===t){const t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:"year"})}return A.y(e,t)},Y:function(e,t,n,r){const a=x(e,r),i=a>0?a:1-a;if("YY"===t){return N(i%100,2)}return"Yo"===t?n.ordinalNumber(i,{unit:"year"}):N(i,t.length)},R:function(e,t){return N(v(e),t.length)},u:function(e,t){return N(e.getFullYear(),t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return N(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return N(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return A.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return N(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const a=k(e,r);return"wo"===t?n.ordinalNumber(a,{unit:"week"}):N(a,t.length)},I:function(e,t,n){const r=y(e);return"Io"===t?n.ordinalNumber(r,{unit:"week"}):N(r,t.length)},d:function(e,t,n){return"do"===t?n.ordinalNumber(e.getDate(),{unit:"date"}):A.d(e,t)},D:function(e,t,n){const r=h(e);return"Do"===t?n.ordinalNumber(r,{unit:"dayOfYear"}):N(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(i);case"ee":return N(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const a=e.getDay(),i=(a-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(i);case"cc":return N(i,t.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),a=0===r?7:r;switch(t){case"i":return String(a);case"ii":return N(a,t.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const r=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let a;switch(a=12===r?_:0===r?j:r/12>
2=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let a;switch(a=r>=17?E:r>=12?C:r>=4?S:L,t){case"B":case"BB":case"BBB":return n.dayPeriod(a,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(a,{width:"narrow",context:"formatting"});default:return n.dayPeriod(a,{width:"wide",context:"formatting"})}},h:function(e,t,n){if("ho"===t){let t=e.getHours()%12;return 0===t&&(t=12),n.ordinalNumber(t,{unit:"hour"})}return A.h(e,t)},H:function(e,t,n){return"Ho"===t?n.ordinalNumber(e.getHours(),{unit:"hour"}):A.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return"Ko"===t?n.ordinalNumber(r,{unit:"hour"}):N(r,t.length)},k:function(e,t,n){let r=e.getHours();return 0===r&&(r=24),"ko"===t?n.ordinalNumber(r,{unit:"hour"}):N(r,t.length)},m:function(e,t,n){return"mo"===t?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):A.m(e,t)},s:function(e,t,n){return"so"===t?n.ordinalNumber(e.getSeconds(),{unit:"second"}):A.s(e,t)},S:function(e,t){return A.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(0===r)return"Z";switch(t){case"X":return R(r);case"XXXX":case"XX":return F(r);default:return F(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return R(r);case"xxxx":case"xx":return F(r);default:return F(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+T(r,":");default:return"GMT"+F(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+T(r,":");default:return"GMT"+F(r,":")}},t:function(e,t,n){return N(Math.trunc(+e/1e3),t.length)},T:function(e,t,n){return N(+e,t.length)}};function T(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e>0?"-":"+",r=Math.abs(e),a=Math.trunc(r/60),i=r%60;return 0===i?n+String(a):n+String(a)+t+N(i,2)}function R(e,t){if(e%60===0){return(e>0?"-":"+")+N(Math.abs(e)/60,2)}return F(e,t)}function F(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const n=e>0?"-":"+",r=Math.abs(e);return n+N(Math.trunc(r/60),2)+t+N(r%60,2)}const M=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});default:return t.date({width:"full"})}},O=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});default:return t.time({width:"full"})}},D={p:O,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],a=n[2];if(!a)return M(e,t);let i;switch(r){case"P":i=t.dateTime({width:"short"});break;case"PP":i=t.dateTime({width:"medium"});break;case"PPP":i=t.dateTime({width:"long"});break;default:i=t.dateTime({width:"full"})}return i.replace("{{date}}",M(r,t)).replace("{{time}}",O(a,t))}},I=/^D+$/,z=/^Y+$/,B=["D","DD","YY","YYYY"];function q(e){return e instanceof Date||"object"===typeof e&&"[object Date]"===Object.prototype.toString.call(e)}function U(e){return!(!q(e)&&"number"!==typeof e||isNaN(+(0,l.a)(e)))}const V=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,H=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,W=/^'([^]*?)'?$/,G=/''/g,$=/[a-zA-Z]/;function Y(e,t,n){var i,s,o,c,u,d,h,f,p,m,g,v,b,y;const x=(0,a.q)(),w=null!==(i=null!==(s=null===n||void 0===n?void 0:n.locale)&&void 0!==s?s:x.locale)&&void 0!==i?i:r.c,k=null!==(o=null!==(c=null!==(u=null!==(d=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==d?d:null===n||void 0===n||null===(h=n.locale)||void 0===h||null===(h=h.options)||void 0===h?void 0:h.firstWeekContainsDate)&&void 0!==u?u:x.firstWeekContainsDate)&&void 0!==c?c:null===(f=x.locale)||void 0===f||null===(f=f.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==o?o:1,N=null!==(p=null!==(m=null!==(g=null!==(v=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==v?v:null===n||void 0===n||null===(b=n.locale)||void 0===b||null===(b=b.options)||void 0===b?void 0:b.weekStartsOn)&&void 0!==g?g:x.weekStartsOn)&&void 0!==m?m:null===(y=x.locale)||void 0===y||null===(y=y.options)||void 0===y?void 0:y.weekStartsOn)&&void 0!==p?p:0,A=(0,l.a)(e,null===n||void 0===n?void 0:n.in);if(!U(A))throw new RangeError("Invalid time value");let j=t.match(H).map(e=>{const t=e[0];if("p"===t||"P"===t){return(0,D[t])(e,w.formatLong)}return e}).join("").match(V).map(e=>{if("''"===e)return{isToken:!1,value:"'"};const t=e[0];if("'"===t)return{isToken:!1,value:K(e)};if(P[t])return{isToken:!0,value:e};
2if(t.match($))throw new RangeError("Format string contains an unescaped latin alphabet character `"+t+"`");return{isToken:!1,value:e}});w.localize.preprocessor&&(j=w.localize.preprocessor(A,j));const _={firstWeekContainsDate:k,weekStartsOn:N,locale:w};return j.map(r=>{if(!r.isToken)return r.value;const a=r.value;(null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!function(e){return z.test(e)}(a))&&(null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!function(e){return I.test(e)}(a))||function(e,t,n){const r=function(e,t,n){const r="Y"===e[0]?"years":"days of the month";return"Use `".concat(e.toLowerCase(),"` instead of `").concat(e,"` (in `").concat(t,"`) for formatting ").concat(r," to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md")}(e,t,n);if(console.warn(r),B.includes(e))throw new RangeError(r)}(a,t,String(e));return(0,P[a[0]])(A,a,w.localize,_)}).join("")}function K(e){const t=e.match(W);return t?t[1].replace(G,"'"):e}},9598(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("thumbs-down",[["path",{d:"M17 14V2",key:"8ymqnk"}],["path",{d:"M9 18.12 10 14H4.17a2 2 0 0 1-1.92-2.56l2.33-8A2 2 0 0 1 6.5 2H20a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-2.76a2 2 0 0 0-1.79 1.11L12 22a3.13 3.13 0 0 1-3-3.88Z",key:"m61m77"}]])},9722(e,t,n){n.d(t,{A:()=>St});var r={};function a(e,t){return function(){return e.apply(t,arguments)}}n.r(r),n.d(r,{hasBrowserEnv:()=>ue,hasStandardBrowserEnv:()=>he,hasStandardBrowserWebWorkerEnv:()=>fe,navigator:()=>de,origin:()=>pe});const{toString:i}=Object.prototype,{getPrototypeOf:s}=Object,{iterator:o,toStringTag:l}=Symbol,c=(u=Object.create(null),e=>{const t=i.call(e);return u[t]||(u[t]=t.slice(8,-1).toLowerCase())});var u;const d=e=>(e=e.toLowerCase(),t=>c(t)===e),h=e=>t=>typeof t===e,{isArray:f}=Array,p=h("undefined");function m(e){return null!==e&&!p(e)&&null!==e.constructor&&!p(e.constructor)&&b(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=d("ArrayBuffer");const v=h("string"),b=h("function"),y=h("number"),x=e=>null!==e&&"object"===typeof e,w=e=>{if("object"!==c(e))return!1;const t=s(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(l in e)&&!(o in e)},k=d("Date"),N=d("File"),A=d("Blob"),j=d("FileList"),_=d("URLSearchParams"),[S,C,E,L]=["ReadableStream","Request","Response","Headers"].map(d);function P(e,t){let n,r,{allOwnKeys:a=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(null!==e&&"undefined"!==typeof e)if("object"!==typeof e&&(e=[e]),f(e))for(n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else{if(m(e))return;const r=a?Object.getOwnPropertyNames(e):Object.keys(e),i=r.length;let s;for(n=0;n<i;n++)s=r[n],t.call(null,e[s],s,e)}}function T(e,t){if(m(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,a=n.length;for(;a-- >0;)if(r=n[a],t===r.toLowerCase())return r;return null}const R="undefined"!==typeof globalThis?globalThis:"undefined"!==typeof self?self:"undefined"!==typeof window?window:n.g,F=e=>!p(e)&&e!==R;const M=(O="undefined"!==typeof Uint8Array&&s(Uint8Array),e=>O&&e instanceof O);var O;const D=d("HTMLFormElement"),I=(e=>{let{hasOwnProperty:t}=e;return(e,n)=>t.call(e,n)})(Object.prototype),z=d("RegExp"),B=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};P(n,(n,a)=>{let i;!1!==(i=t(n,a,e))&&(r[a]=i||n)}),Object.defineProperties(e,r)};const q=d("AsyncFunction"),U=((e,t)=>{return e?setImmediate:t?(n="axios@".concat(Math.random()),r=[],R.addEventListener("message",e=>{let{source:t,data:a}=e;t===R&&a===n&&r.length&&r.shift()()},!1),e=>{r.push(e),R.postMessage(n,"*")}):e=>setTimeout(e);var n,r})("function"===typeof setImmediate,b(R.postMessage)),V="undefined"!==typeof queueMicrotask?queueMicrotask.bind(R):"undefined"!==typeof process&&process.nextTick||U,H={isArray:f,isArrayBuffer:g,isBuffer:m,isFormData:e=>{let t;return e&&("function"===typeof FormData&&e instanceof FormData||b(e.append)&&("formdata"===(t=c(e))||"object"===t&&b(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!==typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:v,isNumber:y,isBoolean:e=>!0===e||!1===e,isObject:x,isPlainObject:w,isEmptyObject:e=>{if(!x(e)||m(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},isReadableStream:S,isRequest:C,isResponse:E,isHeaders:L,isUndefined:p,isDate:k,isFile:N,isBlob:A,isRegExp:z,isFunction:b,isStream:e=>x(e)&&b(e.pipe),isURLSearchParams:_,isTypedArray:M,isFileList:j,forEach:P,merge:function e(){const{caseless:t,skipUndefined:n}=F(this)&&this||{},r={},a=(a,i)=>{const s=t&&T(r,i)||i;w(r[s])&&w(a)?r[s]=e(r[s],a):w(a)?r[s]=e({},a):f(a)?r[s]=a.slice():n&&p(a)||(r[s]=a)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&P(arguments[i],a);return r},extend:function(e,t,n){let{allOwnKeys:r}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return P(t,(t,r)=>{n&&b(t)?e[r]=a(t,n):e[r]=t},{allOwnKeys:r}),e},trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},toFlatObject:(e,t,n,r)=>{let a,i,o;const l={};if(t=t||{},null==e)return t;do{for(a=Object.getOwnPropertyNames(e),i=a.length;i-- >0;)o=a[i],r&&!r(o,e,t)||l[o]||(t[o]=e[o],l[o]=!0);e=!1!==n&&s(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:c,kindOfTest:d,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(f(e))return e;let t=e.length;if(!y(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n}
vendor: 4,386 bytes, line 2
2,forEachEntry:(e,t)=>{const n=(e&&e[o]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:D,hasOwnProperty:I,hasOwnProp:I,reduceDescriptors:B,freezeMethods:e=>{B(e,(t,n)=>{if(b(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];b(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return f(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:T,global:R,isContextDefined:F,isSpecCompliantForm:function(e){return!!(e&&b(e.append)&&"FormData"===e[l]&&e[o])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(x(e)){if(t.indexOf(e)>=0)return;if(m(e))return e;if(!("toJSON"in e)){t[r]=e;const a=f(e)?[]:{};return P(e,(e,t)=>{const i=n(e,r+1);!p(i)&&(a[t]=i)}),t[r]=void 0,a}}return e};return n(e,0)},isAsyncFn:q,isThenable:e=>e&&(x(e)||b(e))&&b(e.then)&&b(e.catch),setImmediate:U,asap:V,isIterable:e=>null!=e&&b(e[o])};function W(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a,this.status=a.status?a.status:null)}H.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:H.toJSONObject(this.config),code:this.code,status:this.status}}});const G=W.prototype,$={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{$[e]={value:e}}),Object.defineProperties(W,$),Object.defineProperty(G,"isAxiosError",{value:!0}),W.from=(e,t,n,r,a,i)=>{const s=Object.create(G);H.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const o=e&&e.message?e.message:"Error",l=null==t&&e?e.code:t;return W.call(s,o,l,n,r,a),e&&null==s.cause&&Object.defineProperty(s,"cause",{value:e,configurable:!0}),s.name=e&&e.name||"Error",i&&Object.assign(s,i),s};const Y=W;function K(e){return H.isPlainObject(e)||H.isArray(e)}function X(e){return H.endsWith(e,"[]")?e.slice(0,-2):e}function Z(e,t,n){return e?e.concat(t).map(function(e,t){return e=X(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const J=H.toFlatObject(H,{},null,function(e){return/^is[A-Z]/.test(e)});const Q=function(e,t,n){if(!H.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=H.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!H.isUndefined(t[e])})).metaTokens,a=n.visitor||c,i=n.dots,s=n.indexes,o=(n.Blob||"undefined"!==typeof Blob&&Blob)&&H.isSpecCompliantForm(t);if(!H.isFunction(a))throw new TypeError("visitor must be a function");function l(e){if(null===e)return"";if(H.isDate(e))return e.toISOString();if(H.isBoolean(e))return e.toString();if(!o&&H.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return H.isArrayBuffer(e)||H.isTypedArray(e)?o&&"function"===typeof Blob?new Blob([e]):Buffer.from(e):e}function c(e,n,a){let o=e;if(e&&!a&&"object"===typeof e)if(H.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(H.isArray(e)&&function(e){return H.isArray(e)&&!e.some(K)}(e)||(H.isFileList(e)||H.endsWith(n,"[]"))&&(o=H.toArray(e)))return n=X(n),o.forEach(function(e,r){!H.isUndefined(e)&&null!==e&&t.append(!0===s?Z([n],r,i):null===s?n:n+"[]",l(e))}),!1;return!!K(e)||(t.append(Z(a,n,i),l(e)),!1)}const u=[],d=Object.assign(J,{defaultVisitor:c,convertValue:l,isVisitable:K});if(!H.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!H.isUndefined(n)){if(-1!==u.indexOf(n))throw Error("Circular reference detected in "+r.join("."));u.push(n),H.forEach(n,function(n,i){!0===(!(H.isUndefined(n)||null===n)&&a.call(t,n,H.isString(i)?i.trim():i,r,d))&&e(n,r?r.concat(i):[i])}),u.pop()}}(e),t};
2function ee(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function te(e,t){this._pairs=[],e&&Q(e,this,t)}const ne=te.prototype;ne.append=function(e,t){this._pairs.push([e,t])},ne.toString=function(e){const t=e?function(t){return e.call(this,t,ee)}:ee;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};const re=te;function ae(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ie(e,t,n){if(!t)return e;const r=n&&n.encode||ae;H.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let i;if(i=a?a(t,n):H.isURLSearchParams(t)?t.toString():new re(t,n).toString(r),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}const se=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){H.forEach(this.handlers,function(t){null!==t&&e(t)})}},oe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};var le=n(9379);const ce={isBrowser:!0,classes:{URLSearchParams:"undefined"!==typeof URLSearchParams?URLSearchParams:re,FormData:"undefined"!==typeof FormData?FormData:null,Blob:"undefined"!==typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]},ue="undefined"!==typeof window&&"undefined"!==typeof document,de="object"===typeof navigator&&navigator||void 0,he=ue&&(!de||["ReactNative","NativeScript","NS"].indexOf(de.product)<0),fe="undefined"!==typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"===typeof self.importScripts,pe=ue&&window.location.href||"http://localhost",me=(0,le.A)((0,le.A)({},r),ce);const ge=function(e){function t(e,n,r,a){let i=e[a++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),o=a>=e.length;if(i=!i&&H.isArray(r)?r.length:i,o)return H.hasOwnProp(r,i)?r[i]=[r[i],n]:r[i]=n,!s;r[i]&&H.isObject(r[i])||(r[i]=[]);return t(e,n,r[i],a)&&H.isArray(r[i])&&(r[i]=function(e){const t={},n=Object.keys(e);let r;const a=n.length;let i;for(r=0;r<a;r++)i=n[r],t[i]=e[i];return t}(r[i])),!s}if(H.isFormData(e)&&H.isFunction(e.entries)){const n={};return H.forEachEntry(e,(e,r)=>{t(function(e){return H.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null};const ve={transitional:oe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,a=H.isObject(e);a&&H.isHTMLForm(e)&&(e=new FormData(e));if(H.isFormData(e))return r?JSON.stringify(ge(e)):e;if(H.isArrayBuffer(e)||H.isBuffer(e)||H.isStream(e)||H.isFile(e)||H.isBlob(e)||H.isReadableStream(e))return e;if(H.isArrayBufferView(e))return e.buffer;if(H.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(a){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Q(e,new me.classes.URLSearchParams,(0,le.A)({visitor:function(e,t,n,r){return me.isNode&&H.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)}},t))}(e,this.formSerializer).toString();if((i=H.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Q(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),function(e,t,n){if(H.isString(e))try{return(t||JSON.parse)(e),H.trim(e)}catch(r){if("SyntaxError"!==r.name)throw r}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ve.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(H.isResponse(e)||H.isReadableStream(e))return e;if(e&&H.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(a){if(n){if("SyntaxError"===a.name)throw Y.from(a,Y.ERR_BAD_RESPONSE,this,null,this.response);throw a}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:me.classes.FormData,Blob:me.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};H.forEach(["delete","get","head","post","put","patch"],e=>{ve.headers[e]={}});const be=ve,ye=H.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),xe=Symbol("internals");function we(e){return e&&String(e).trim().toLowerCase()}function ke(e){return!1===e||null==e?e:H.isArray(e)?e.map(ke):String(e)}function Ne(e,t,n,r,a){return H.isFunction(r)?r.call(this,t,n):(a&&(t=n),H.isString(t)?H.isString(r)?-1!==t.indexOf(r):H.isRegExp(r)?r.test(t):void 0:void 0)}class Ae{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function a(e,t,n){const a=we(t);if(!a)throw new Error("header name must be a non-empty string");const i=H.findKey(r,a);(!i||void 0===r[i]||!0===n||void 0===n&&!1!==r[i])&&(r[i||t]=ke(e))}const i=(e,t)=>
2H.forEach(e,(e,n)=>a(e,n,t));if(H.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(H.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let n,r,a;return e&&e.split("\n").forEach(function(e){a=e.indexOf(":"),n=e.substring(0,a).trim().toLowerCase(),r=e.substring(a+1).trim(),!n||t[n]&&ye[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(H.isObject(e)&&H.isIterable(e)){let n,r,a={};for(const t of e){if(!H.isArray(t))throw TypeError("Object iterator must return a key-value pair");a[r=t[0]]=(n=a[r])?H.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(a,t)}else null!=e&&a(t,e,n);return this}get(e,t){if(e=we(e)){const n=H.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}(e);if(H.isFunction(t))return t.call(this,e,n);if(H.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=we(e)){const n=H.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ne(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function a(e){if(e=we(e)){const a=H.findKey(n,e);!a||t&&!Ne(0,n[a],a,t)||(delete n[a],r=!0)}}return H.isArray(e)?e.forEach(a):a(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const a=t[n];e&&!Ne(0,this[a],a,e,!0)||(delete this[a],r=!0)}return r}normalize(e){const t=this,n={};return H.forEach(this,(r,a)=>{const i=H.findKey(n,a);if(i)return t[i]=ke(r),void delete t[a];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(a):String(a).trim();s!==a&&delete t[a],t[s]=ke(r),n[s]=!0}),this}concat(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.constructor.concat(this,...t)}toJSON(e){const t=Object.create(null);return H.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&H.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(e=>{let[t,n]=e;return t+": "+n}).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e){const t=new this(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];return r.forEach(e=>t.set(e)),t}static accessor(e){const t=(this[xe]=this[xe]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=we(e);t[r]||(!function(e,t){const n=H.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,a){return this[r].call(this,t,e,n,a)},configurable:!0})})}(n,e),t[r]=!0)}return H.isArray(e)?e.forEach(r):r(e),this}}Ae.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),H.reduceDescriptors(Ae.prototype,(e,t)=>{let{value:n}=e,r=t[0].toUpperCase()+t.slice(1);return{get:()=>n,set(e){this[r]=e}}}),H.freezeMethods(Ae);const je=Ae;function _e(e,t){const n=this||be,r=t||n,a=je.from(r.headers);let i=r.data;return H.forEach(e,function(e){i=e.call(n,i,a.normalize(),t?t.status:void 0)}),a.normalize(),i}function Se(e){return!(!e||!e.__CANCEL__)}function Ce(e,t,n){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,n),this.name="CanceledError"}H.inherits(Ce,Y,{__CANCEL__:!0});const Ee=Ce;function Le(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Y("Request failed with status code "+n.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}const Pe=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a,i=0,s=0;return t=void 0!==t?t:1e3,function(o){const l=Date.now(),c=r[s];a||(a=l),n[i]=o,r[i]=l;let u=s,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),l-a<t)return;const h=c&&l-c;return h?Math.round(1e3*d/h):void 0}};const Te=function(e,t){let n,r,a=0,i=1e3/t;const s=function(t){let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Date.now();a=i,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[function(){const e=Date.now(),t=e-a;for(var o=arguments.length,l=new Array(o),c=0;c<o;c++)l[c]=arguments[c];t>=i?s(l,e):(n=l,r||(r=setTimeout(()=>{r=null,s(n)},i-t)))},()=>n&&s(n)]},Re=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,r=0;const a=Pe(50,250);return Te(n=>{const i=n.loaded,s=n.lengthComputable?n.total:void 0,o=i-r,l=a(o);r=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:o,rate:l||void 0,estimated:l&&s&&i<=s?(s-i)/l:void 0,event:n,lengthComputable:null!=s,[t?"download":"upload"]:!0})},n)},Fe=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Me=e=>function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return H.asap(()=>e(...n))},Oe=me.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,me.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(me.origin),me.navigator&&/(msie|trident)/i.test(me.navigator.userAgent)):()=>!0,De=me.hasStandardBrowserEnv?{write(e,t,n,r,a,i,s){if("undefined"===typeof document)return;const o=["".concat(e,"=").concat(encodeURIComponent(t))];H.isNumber(n)&&o.push("expires=".concat(new Date(n).toUTCString())),H.isString(r)&&o.push("path=".concat(r)),H.isString(a)&&o.push("domain=".concat(a)),!0===i&&o.push("secure"),H.isString(s)&&o.push("SameSite=".concat(s)),document.cookie=o.join("; ")},read(e){if("undefined"===typeof document)return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read:()=>null,remove(){}};function Ie(e,t,n){let r=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const ze=e=>e instanceof je?(0,le.A)({},e):e;function Be(e,t){t=t||{};const n={};function r(e,t,n,r){return H.isPlainObject(e)&&H.isPlainObject(t)?H.merge.call({caseless:r},e,t):H.isPlainObject(t)?H.merge({},t):H.isArray(t)?t.slice():t}function a(e,t,n,a){return H.isUndefined(t)?H.isUndefined(e)?void 0:r(void 0,e,0,a):r(e,t,0,a)}function i(e,t){if(!H.isUndefined(t))return r(void 0,t)}function s(e,t){return H.isUndefined(t)?H.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function o(n,a,i){return i in t?r(n,a):i in e?r(void 0,n):void 0}const l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:o,headers:(e,t,n)=>a(ze(e),ze(t),0,!0)};return H.forEach(Object.keys((0,le.A)((0,le.A)({},e),t)),function(r){const i=l[r]||a,s=i(e[r],t[r],r);H.isUndefined(s)&&i!==o||(n[r]=s)}),n}const qe=e=>{const t=Be({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:a,xsrfCookieName:i,headers:s,auth:o}=t;
2if(t.headers=s=je.from(s),t.url=ie(Ie(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&s.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),H.isFormData(n))if(me.hasStandardBrowserEnv||me.hasStandardBrowserWebWorkerEnv)s.setContentType(void 0);else if(H.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(e=>{let[n,r]=e;t.includes(n.toLowerCase())&&s.set(n,r)})}if(me.hasStandardBrowserEnv&&(r&&H.isFunction(r)&&(r=r(t)),r||!1!==r&&Oe(t.url))){const e=a&&i&&De.read(i);e&&s.set(a,e)}return t},Ue="undefined"!==typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=qe(e);let a=r.data;const i=je.from(r.headers).normalize();let s,o,l,c,u,{responseType:d,onUploadProgress:h,onDownloadProgress:f}=r;function p(){c&&c(),u&&u(),r.cancelToken&&r.cancelToken.unsubscribe(s),r.signal&&r.signal.removeEventListener("abort",s)}let m=new XMLHttpRequest;function g(){if(!m)return;const r=je.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Le(function(e){t(e),p()},function(e){n(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(n(new Y("Request aborted",Y.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=t&&t.message?t.message:"Network Error",a=new Y(r,Y.ERR_NETWORK,e,m);a.event=t||null,n(a),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const a=r.transitional||oe;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Y(t,a.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,m)),m=null},void 0===a&&i.setContentType(null),"setRequestHeader"in m&&H.forEach(i.toJSON(),function(e,t){m.setRequestHeader(t,e)}),H.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),d&&"json"!==d&&(m.responseType=r.responseType),f&&([l,u]=Re(f,!0),m.addEventListener("progress",l)),h&&m.upload&&([o,c]=Re(h),m.upload.addEventListener("progress",o),m.upload.addEventListener("loadend",c)),(r.cancelToken||r.signal)&&(s=t=>{m&&(n(!t||t.type?new Ee(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(s),r.signal&&(r.signal.aborted?s():r.signal.addEventListener("abort",s)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);v&&-1===me.protocols.indexOf(v)?n(new Y("Unsupported protocol "+v+":",Y.ERR_BAD_REQUEST,e)):m.send(a||null)})},Ve=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const a=function(e){if(!n){n=!0,s();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Y?t:new Ee(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,a(new Y("timeout ".concat(t," of ms exceeded"),Y.ETIMEDOUT))},t);const s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(a):e.removeEventListener("abort",a)}),e=null)};e.forEach(e=>e.addEventListener("abort",a));const{signal:o}=r;return o.unsubscribe=()=>H.asap(s),o}};function He(e,t){this.v=e,this.k=t}function We(e){return function(){return new Ge(e.apply(this,arguments))}}function Ge(e){var t,n;function r(t,n){try{var i=e[t](n),s=i.value,o=s instanceof He;Promise.resolve(o?s.v:s).then(function(n){if(o){var l="return"===t?"return":"next";if(!s.k||n.done)return r(l,n);n=e[l](n).value}a(i.done?"return":"normal",n)},function(e){r("throw",e)})}catch(e){a("throw",e)}}function a(e,a){switch(e){case"return":t.resolve({value:a,done:!0});break;case"throw":t.reject(a);break;default:t.resolve({value:a,done:!1})}(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,a){return new Promise(function(i,s){var o={key:e,arg:a,resolve:i,reject:s,next:null};n?n=n.next=o:(t=n=o,r(e,a))})},"function"!=typeof e.return&&(this.return=void 0)}function $e(e){return new He(e,0)}function Ye(e){var t={},n=!1;function r(t,r){return n=!0,r=new Promise(function(n){n(e[t](r))}),{done:!1,value:new He(r,1)}}return t["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},t.next=function(e){return n?(n=!1,e):r("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(n)throw n=!1,e;return r("throw",e)}
2),"function"==typeof e.return&&(t.return=function(e){return n?(n=!1,e):r("return",e)}),t}function Ke(e){var t,n,r,a=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,r=Symbol.iterator);a--;){if(n&&null!=(t=e[n]))return t.call(e);if(r&&null!=(t=e[r]))return new Xe(t.call(e));n="@@asyncIterator",r="@@iterator"}throw new TypeError("Object is not async iterable")}function Xe(e){function t(e){if(Object(e)!==e)return Promise.reject(new TypeError(e+" is not an object."));var t=e.done;return Promise.resolve(e.value).then(function(e){return{value:e,done:t}})}return Xe=function(e){this.s=e,this.n=e.next},Xe.prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var n=this.s.return;return void 0===n?Promise.resolve({value:e,done:!0}):t(n.apply(this.s,arguments))},throw:function(e){var n=this.s.return;return void 0===n?Promise.reject(e):t(n.apply(this.s,arguments))}},new Xe(e)}Ge.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},Ge.prototype.next=function(e){return this._invoke("next",e)},Ge.prototype.throw=function(e){return this._invoke("throw",e)},Ge.prototype.return=function(e){return this._invoke("return",e)};const Ze=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,a=0;for(;a<n;)r=a+t,yield e.slice(a,r),a=r},Je=function(){var e=We(function*(e,t){var n,r=!1,a=!1;try{for(var i,s=Ke(Qe(e));r=!(i=yield $e(s.next())).done;r=!1){const e=i.value;yield*Ye(Ke(Ze(e,t)))}}catch(o){a=!0,n=o}finally{try{r&&null!=s.return&&(yield $e(s.return()))}finally{if(a)throw n}}});return function(t,n){return e.apply(this,arguments)}}(),Qe=function(){var e=We(function*(e){if(e[Symbol.asyncIterator])return void(yield*Ye(Ke(e)));const t=e.getReader();try{for(;;){const{done:e,value:n}=yield $e(t.read());if(e)break;yield n}}finally{yield $e(t.cancel())}});return function(t){return e.apply(this,arguments)}}(),et=(e,t,n,r)=>{const a=Je(e,t);let i,s=0,o=e=>{i||(i=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await a.next();if(t)return o(),void e.close();let i=r.byteLength;if(n){let e=s+=i;n(e)}e.enqueue(new Uint8Array(r))}catch(t){throw o(t),t}},cancel:e=>(o(e),a.return())},{highWaterMark:2})},{isFunction:tt}=H,nt=(e=>{let{Request:t,Response:n}=e;return{Request:t,Response:n}})(H.global),{ReadableStream:rt,TextEncoder:at}=H.global,it=function(e){try{for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return!!e(...n)}catch(a){return!1}},st=e=>{e=H.merge.call({skipUndefined:!0},nt,e);const{fetch:t,Request:n,Response:r}=e,a=t?tt(t):"function"===typeof fetch,i=tt(n),s=tt(r);if(!a)return!1;const o=a&&tt(rt),l=a&&("function"===typeof at?(c=new at,e=>c.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var c;const u=i&&o&&it(()=>{let e=!1;const t=new n(me.origin,{body:new rt,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),d=s&&o&&it(()=>H.isReadableStream(new r("").body)),h={stream:d&&(e=>e.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!h[e]&&(h[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Y("Response type '".concat(e,"' is not supported"),Y.ERR_NOT_SUPPORT,n)})});const f=async(e,t)=>{const r=H.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(H.isBlob(e))return e.size;if(H.isSpecCompliantForm(e)){const t=new n(me.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return H.isArrayBufferView(e)||H.isArrayBuffer(e)?e.byteLength:(H.isURLSearchParams(e)&&(e+=""),H.isString(e)?(await l(e)).byteLength:void 0)})(t):r};return async e=>{let{url:a,method:s,data:o,signal:l,cancelToken:c,timeout:p,onDownloadProgress:m,onUploadProgress:g,responseType:v,headers:b,withCredentials:y="same-origin",fetchOptions:x}=qe(e),w=t||fetch;v=v?(v+"").toLowerCase():"text";let k=Ve([l,c&&c.toAbortSignal()],p),N=null;const A=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let j;try{if(g&&u&&"get"!==s&&"head"!==s&&0!==(j=await f(b,o))){let e,t=new n(a,{method:"POST",body:o,duplex:"half"});if(H.isFormData(o)&&(e=t.headers.get("content-type"))&&b.setContentType(e),t.body){const[e,n]=Fe(j,Re(
2Me(g)));o=et(t.body,65536,e,n)}}H.isString(y)||(y=y?"include":"omit");const t=i&&"credentials"in n.prototype,l=(0,le.A)((0,le.A)({},x),{},{signal:k,method:s.toUpperCase(),headers:b.normalize().toJSON(),body:o,duplex:"half",credentials:t?y:void 0});N=i&&new n(a,l);let c=await(i?w(N,x):w(a,l));const p=d&&("stream"===v||"response"===v);if(d&&(m||p&&A)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=c[t]});const t=H.toFiniteNumber(c.headers.get("content-length")),[n,a]=m&&Fe(t,Re(Me(m),!0))||[];c=new r(et(c.body,65536,n,()=>{a&&a(),A&&A()}),e)}v=v||"text";let _=await h[H.findKey(h,v)||"text"](c,e);return!p&&A&&A(),await new Promise((t,n)=>{Le(t,n,{data:_,headers:je.from(c.headers),status:c.status,statusText:c.statusText,config:e,request:N})})}catch(_){if(A&&A(),_&&"TypeError"===_.name&&/Load failed|fetch/i.test(_.message))throw Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,N),{cause:_.cause||_});throw Y.from(_,_&&_.code,e,N)}}},ot=new Map,lt=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:a}=t,i=[r,a,n];let s,o,l=i.length,c=ot;for(;l--;)s=i[l],o=c.get(s),void 0===o&&c.set(s,o=l?new Map:st(t)),c=o;return o},ct=(lt(),{http:null,xhr:Ue,fetch:{get:lt}});H.forEach(ct,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const ut=e=>"- ".concat(e),dt=e=>H.isFunction(e)||null===e||!1===e;const ht={getAdapter:function(e,t){e=H.isArray(e)?e:[e];const{length:n}=e;let r,a;const i={};for(let s=0;s<n;s++){let n;if(r=e[s],a=r,!dt(r)&&(a=ct[(n=String(r)).toLowerCase()],void 0===a))throw new Y("Unknown adapter '".concat(n,"'"));
vendor: 4,172 bytes, line 2
2if(a&&(H.isFunction(a)||(a=a.get(t))))break;i[n||"#"+s]=a}if(!a){const e=Object.entries(i).map(e=>{let[t,n]=e;return"adapter ".concat(t," ")+(!1===n?"is not supported by the environment":"is not available in the build")});let t=n?e.length>1?"since :\n"+e.map(ut).join("\n"):" "+ut(e[0]):"as no adapter specified";throw new Y("There is no suitable adapter to dispatch the request "+t,"ERR_NOT_SUPPORT")}return a},adapters:ct};function ft(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ee(null,e)}function pt(e){ft(e),e.headers=je.from(e.headers),e.data=_e.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ht.getAdapter(e.adapter||be.adapter,e)(e).then(function(t){return ft(e),t.data=_e.call(e,e.transformResponse,t),t.headers=je.from(t.headers),t},function(t){return Se(t)||(ft(e),t&&t.response&&(t.response.data=_e.call(e,e.transformResponse,t.response),t.response.headers=je.from(t.response.headers))),Promise.reject(t)})}const mt="1.13.2",gt={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gt[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const vt={};gt.transitional=function(e,t,n){function r(e,t){return"[Axios v"+mt+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,a,i)=>{if(!1===e)throw new Y(r(a," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!vt[a]&&(vt[a]=!0,console.warn(r(a," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,a,i)}},gt.spelling=function(e){return(t,n)=>(console.warn("".concat(n," is likely a misspelling of ").concat(e)),!0)};const bt={assertOptions:function(e,t,n){if("object"!==typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const i=r[a],s=t[i];if(s){const t=e[i],n=void 0===t||s(t,i,e);if(!0!==n)throw new Y("option "+i+" must be "+n,Y.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:gt},yt=bt.validators;class xt{constructor(e){this.defaults=e||{},this.interceptors={request:new se,response:new se}}async request(e,t){try{return await this._request(e,t)}catch(n){if(n instanceof Error){let e={};Error.captureStackTrace?Error.captureStackTrace(e):e=new Error;const t=e.stack?e.stack.replace(/^.+\n/,""):"";try{n.stack?t&&!String(n.stack).endsWith(t.replace(/^.+\n.+\n/,""))&&(n.stack+="\n"+t):n.stack=t}catch(r){}}throw n}}_request(e,t){"string"===typeof e?(t=t||{}).url=e:t=e||{},t=Be(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:a}=t;void 0!==n&&bt.assertOptions(n,{silentJSONParsing:yt.transitional(yt.boolean),forcedJSONParsing:yt.transitional(yt.boolean),clarifyTimeoutError:yt.transitional(yt.boolean)},!1),null!=r&&(H.isFunction(r)?t.paramsSerializer={serialize:r}:bt.assertOptions(r,{encode:yt.function,serialize:yt.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),bt.assertOptions(t,{baseUrl:yt.spelling("baseURL"),withXsrfToken:yt.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=a&&H.merge(a.common,a[t.method]);a&&H.forEach(["delete","get","head","post","put","patch","common"],e=>{delete a[e]}),t.headers=je.concat(i,a);const s=[];let o=!0;this.interceptors.request.forEach(function(e){"function"===typeof e.runWhen&&!1===e.runWhen(t)||(o=o&&e.synchronous,s.unshift(e.fulfilled,e.rejected))});const l=[];let c;this.interceptors.response.forEach(function(e){l.push(e.fulfilled,e.rejected)});let u,d=0;if(!o){const e=[pt.bind(this),void 0];for(e.unshift(...s),e.push(...l),u=e.length,c=Promise.resolve(t);d<u;)c=c.then(e[d++],e[d++]);return c}u=s.length;let h=t;for(;d<u;){const e=s[d++],t=s[d++];try{h=e(h)}catch(f){t.call(this,f);break}}try{c=pt.call(this,h)}catch(f){return Promise.reject(f)}for(d=0,u=l.length;d<u;)c=c.then(l[d++],l[d++]);return c}getUri(e){return ie(Ie((e=Be(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}
vendor: 1,556 bytes, line 2
2H.forEach(["delete","get","head","options"],function(e){xt.prototype[e]=function(t,n){return this.request(Be(n||{},{method:e,url:t,data:(n||{}).data}))}}),H.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,a){return this.request(Be(a||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}xt.prototype[e]=t(),xt.prototype[e+"Form"]=t(!0)});const wt=xt;class kt{constructor(e){if("function"!==typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,a){n.reason||(n.reason=new Ee(e,r,a),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new kt(function(t){e=t}),cancel:e}}}const Nt=kt;const At={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
2alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(At).forEach(e=>{let[t,n]=e;At[n]=t});const jt=At;const _t=function e(t){const n=new wt(t),r=a(wt.prototype.request,n);return H.extend(r,wt.prototype,n,{allOwnKeys:!0}),H.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Be(t,n))},r}(be);_t.Axios=wt,_t.CanceledError=Ee,_t.CancelToken=Nt,_t.isCancel=Se,_t.VERSION=mt,_t.toFormData=Q,_t.AxiosError=Y,_t.Cancel=_t.CanceledError,_t.all=function(e){return Promise.all(e)},_t.spread=function(e){return function(t){return e.apply(null,t)}},_t.isAxiosError=function(e){return H.isObject(e)&&!0===e.isAxiosError},_t.mergeConfig=Be,_t.AxiosHeaders=je,_t.formToJSON=e=>ge(H.isHTMLForm(e)?new FormData(e):e),_t.getAdapter=ht.getAdapter,_t.HttpStatusCode=jt,_t.default=_t;const St=_t},9766(e,t,n){n.d(t,{cn:()=>xe});var r=n(8387),a=n(9379);const i=function(){return{nextPart:arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Map,validators:arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,classGroupId:arguments.length>2?arguments[2]:void 0}},s="-",o=[],l=e=>{const t=d(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return u(e);const n=e.split(s),r=""===n[0]&&n.length>1?1:0;return c(n,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){const t=r[e],a=n[e];return t?a?((e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n})(a,t):t:a||o}return n[e]||o}}},c=(e,t,n)=>{if(0===e.length-t)return n.classGroupId;const r=e[t],a=n.nextPart.get(r);if(a){const n=c(e,t+1,a);if(n)return n}const i=n.validators;if(null===i)return;const o=0===t?e.join(s):e.slice(t).join(s),l=i.length;for(let s=0;s<l;s++){const e=i[s];if(e.validator(o))return e.classGroupId}},u=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?"arbitrary.."+r:void 0})(),d=e=>{const{theme:t,classGroups:n}=e;return h(n,t)},h=(e,t)=>{const n=i();for(const r in e){const a=e[r];f(a,n,r,t)}return n},f=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const a=e[i];p(a,t,n,r)}},p=(e,t,n,r)=>{"string"!==typeof e?"function"!==typeof e?v(e,t,n,r):g(e,t,n,r):m(e,t,n)},m=(e,t,n)=>{(""===e?t:b(t,e)).classGroupId=n},g=(e,t,n,r)=>{y(e)?f(e(r),t,n,r):(null===t.validators&&(t.validators=[]),t.validators.push(((e,t)=>({classGroupId:e,validator:t}))(n,e)))},v=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let s=0;s<i;s++){const[e,i]=a[s];f(i,b(t,e),n,r)}},b=(e,t)=>{let n=e;const r=t.split(s),a=r.length;for(let s=0;s<a;s++){const e=r[s];let t=n.nextPart.get(e);t||(t=i(),n.nextPart.set(e,t)),n=t}return n},y=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,x=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(a,i)=>{n[a]=i,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];return void 0!==t?t:void 0!==(t=r[e])?(a(e,t),t):void 0},set(e,t){e in n?n[e]=t:a(e,t)}}},w=[],k=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),N=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=e=>{const t=[];let n,r=0,a=0,i=0;const s=e.length;for(let u=0;u<s;u++){const s=e[u];if(0===r&&0===a){if(":"===s){t.push(e.slice(i,u)),i=u+1;continue}if("/"===s){n=u;continue}}"["===s?r++:"]"===s?r--:"("===s?a++:")"===s&&a--}const o=0===t.length?e:e.slice(i);let l=o,c=!1;o.endsWith("!")?(l=o.slice(0,-1),c=!0):o.startsWith("!")&&(l=o.slice(1),c=!0);return k(t,c,l,n&&n>i?n-i:void 0)};if(t){const e=t+":",n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):k(w,!1,t,void 0,!0)}if(n){const e=r;r=t=>n({className:t,parseClassName:e})}return r},A=e=>{const t=new Map;
vendor: 4,814 bytes, line 2
2return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{const n=[];let r=[];for(let a=0;a<e.length;a++){const i=e[a],s="["===i[0],o=t.has(i);s||o?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(i)):r.push(i)}return r.length>0&&(r.sort(),n.push(...r)),n}},j=/\s+/,_=e=>{if("string"===typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=_(e[r]))&&(n&&(n+=" "),n+=t);return n},S=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let i,s,o,c;const u=e=>{const t=s(e);if(t)return t;const n=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,s=[],o=e.trim().split(j);let l="";for(let c=o.length-1;c>=0;c-=1){const e=o[c],{isExternal:t,modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:f}=n(e);if(t){l=e+(l.length>0?" "+l:l);continue}let p=!!f,m=r(p?h.substring(0,f):h);if(!m){if(!p){l=e+(l.length>0?" "+l:l);continue}if(m=r(h),!m){l=e+(l.length>0?" "+l:l);continue}p=!1}const g=0===u.length?"":1===u.length?u[0]:i(u).join(":"),v=d?g+"!":g,b=v+m;if(s.indexOf(b)>-1)continue;s.push(b);const y=a(m,p);for(let n=0;n<y.length;++n){const e=y[n];s.push(v+e)}l=e+(l.length>0?" "+l:l)}return l})(e,i);return o(e,n),n};return c=t=>{const r=n.reduce((e,t)=>t(e),e());return i=(e=>(0,a.A)({cache:x(e.cacheSize),parseClassName:N(e),sortModifiers:A(e)},l(e)))(r),s=i.cache.get,o=i.cache.set,c=u,u(t)},function(){return c(function(){let e,t,n=0,r="";for(;n<arguments.length;){var a;(e=(a=n++)<0||arguments.length<=a?void 0:arguments[a])&&(t=_(e))&&(r&&(r+=" "),r+=t)}return r}(...arguments))}},C=[],E=e=>{const t=t=>t[e]||C;return t.isThemeGetter=!0,t},L=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,P=/^\((?:(\w[\w-]*):)?(.+)\)$/i,T=/^\d+\/\d+$/,R=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,F=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,M=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,O=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,D=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,I=e=>T.test(e),z=e=>!!e&&!Number.isNaN(Number(e)),B=e=>!!e&&Number.isInteger(Number(e)),q=e=>e.endsWith("%")&&z(e.slice(0,-1)),U=e=>R.test(e),V=()=>!0,H=e=>F.test(e)&&!M.test(e),W=()=>!1,G=e=>O.test(e),$=e=>D.test(e),Y=e=>!X(e)&&!ne(e),K=e=>ce(e,fe,W),X=e=>L.test(e),Z=e=>ce(e,pe,H),J=e=>ce(e,me,z),Q=e=>ce(e,de,W),ee=e=>ce(e,he,$),te=e=>ce(e,ve,G),ne=e=>P.test(e),re=e=>ue(e,pe),ae=e=>ue(e,ge),ie=e=>ue(e,de),se=e=>ue(e,fe),oe=e=>ue(e,he),le=e=>ue(e,ve,!0),ce=(e,t,n)=>{const r=L.exec(e);return!!r&&(r[1]?t(r[1]):n(r[2]))},ue=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=P.exec(e);return!!r&&(r[1]?t(r[1]):n)},de=e=>"position"===e||"percentage"===e,he=e=>"image"===e||"url"===e,fe=e=>"length"===e||"size"===e||"bg-size"===e,pe=e=>"length"===e,me=e=>"number"===e,ge=e=>"family-name"===e,ve=e=>"shadow"===e,be=(Symbol.toStringTag,()=>{const e=E("color"),t=E("font"),n=E("text"),r=E("font-weight"),a=E("tracking"),i=E("leading"),s=E("breakpoint"),o=E("container"),l=E("spacing"),c=E("radius"),u=E("shadow"),d=E("inset-shadow"),h=E("text-shadow"),f=E("drop-shadow"),p=E("blur"),m=E("perspective"),g=E("aspect"),v=E("ease"),b=E("animate"),y=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ne,X],x=()=>[ne,X,l],w=()=>[I,"full","auto",...x()],k=()=>[B,"none","subgrid",ne,X],N=()=>["auto",{span:["full",B,ne,X]},B,ne,X],A=()=>[B,"auto",ne,X],j=()=>["auto","min","max","fr",ne,X],_=()=>["auto",...x()],S=()=>[I,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...x()],C=()=>[e,ne,X],L=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",ie,Q,{position:[ne,X]}],P=()=>["auto","cover","contain",se,K,{size:[ne,X]}],T=()=>[q,re,Z],R=()=>["","none","full",c,ne,X],F=()=>["",z,re,Z],M=()=>[z,q,ie,Q],O=()=>["","none",p,ne,X],D=()=>["none",z,ne,X],H=()=>["none",z,ne,X],W=()=>[z,ne,X],G=()=>[I,"full",...x()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[U],breakpoint:[U],color:[V],container:[U],"drop-shadow":[U],ease:["in","out","in-out"],font:[Y],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[U],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[U],shadow:[U],spacing:["px",z],text:[U],"text-shadow":[U],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",I,X,ne,g]}
vendor: 5,323 bytes, line 2
2],container:["container"],columns:[{columns:[z,X,ne,o]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:y()}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:w()}],"inset-x":[{"inset-x":w()}],"inset-y":[{"inset-y":w()}],start:[{start:w()}],end:[{end:w()}],top:[{top:w()}],right:[{right:w()}],bottom:[{bottom:w()}],left:[{left:w()}],visibility:["visible","invisible","collapse"],z:[{z:[B,"auto",ne,X]}],basis:[{basis:[I,"full","auto",o,...x()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[z,I,"auto","initial","none",X]}],grow:[{grow:["",z,ne,X]}],shrink:[{shrink:["",z,ne,X]}],order:[{order:[B,"first","last","none",ne,X]}],"grid-cols":[{"grid-cols":k()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":k()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":j()}],"auto-rows":[{"auto-rows":j()}],gap:[{gap:x()}],"gap-x":[{"gap-x":x()}],"gap-y":[{"gap-y":x()}],"justify-content":[{justify:["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{items:["start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"align-self":[{self:["auto","start","end","center","stretch","center-safe","end-safe",{baseline:["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],p:[{p:x()}],px:[{px:x()}],py:[{py:x()}],ps:[{ps:x()}],pe:[{pe:x()}],pt:[{pt:x()}],pr:[{pr:x()}],pb:[{pb:x()}],pl:[{pl:x()}],m:[{m:_()}],mx:[{mx:_()}],my:[{my:_()}],ms:[{ms:_()}],me:[{me:_()}],mt:[{mt:_()}],mr:[{mr:_()}],mb:[{mb:_()}],ml:[{ml:_()}],"space-x":[{"space-x":x()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":x()}],"space-y-reverse":["space-y-reverse"],size:[{size:S()}],w:[{w:[o,"screen",...S()]}],"min-w":[{"min-w":[o,"screen","none",...S()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[s]},...S()]}],h:[{h:["screen","lh",...S()]}],"min-h":[{"min-h":["screen","lh","none",...S()]}],"max-h":[{"max-h":["screen","lh",...S()]}],"font-size":[{text:["base",n,re,Z]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ne,J]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",q,X]}],"font-family":[{font:[ae,X,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ne,X]}],"line-clamp":[{"line-clamp":[z,"none",ne,J]}],leading:[{leading:[i,...x()]}],"list-image":[{"list-image":["none",ne,X]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,X]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:C()}],"text-color":[{text:C()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","
2wavy"]}],"text-decoration-thickness":[{decoration:[z,"from-font","auto",ne,Z]}],"text-decoration-color":[{decoration:C()}],"underline-offset":[{"underline-offset":[z,"auto",ne,X]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:x()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,X]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne,X]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:L()}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","space","round"]}]}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},B,ne,X],radial:["",ne,X],conic:[B,ne,X]},oe,ee]}],"bg-color":[{bg:C()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:C()}],"gradient-via":[{via:C()}],"gradient-to":[{to:C()}],rounded:[{rounded:R()}],"rounded-s":[{"rounded-s":R()}],"rounded-e":[{"rounded-e":R()}],"rounded-t":[{"rounded-t":R()}],"rounded-r":[{"rounded-r":R()}],"rounded-b":[{"rounded-b":R()}],"rounded-l":[{"rounded-l":R()}],"rounded-ss":[{"rounded-ss":R()}],"rounded-se":[{"rounded-se":R()}],"rounded-ee":[{"rounded-ee":R()}],"rounded-es":[{"rounded-es":R()}],"rounded-tl":[{"rounded-tl":R()}],"rounded-tr":[{"rounded-tr":R()}],"rounded-br":[{"rounded-br":R()}],"rounded-bl":[{"rounded-bl":R()}],"border-w":[{border:F()}],"border-w-x":[{"border-x":F()}],"border-w-y":[{"border-y":F()}],"border-w-s":[{"border-s":F()}],"border-w-e":[{"border-e":F()}],"border-w-t":[{"border-t":F()}],"border-w-r":[{"border-r":F()}],"border-w-b":[{"border-b":F()}],"border-w-l":[{"border-l":F()}],"divide-x":[{"divide-x":F()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":F()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{divide:["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{border:C()}],"border-color-x":[{"border-x":C()}],"border-color-y":[{"border-y":C()}],"border-color-s":[{"border-s":C()}],"border-color-e":[{"border-e":C()}],"border-color-t":[{"border-t":C()}],"border-color-r":[{"border-r":C()}],"border-color-b":[{"border-b":C()}],"border-color-l":[{"border-l":C()}],"divide-color":[{divide:C()}],"outline-style":[{outline:["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[z,ne,X]}],"outline-w":[{outline:["",z,re,Z]}],"outline-color":[{outline:C()}],shadow:[{shadow:["","none",u,le,te]}],"shadow-color":[{shadow:C()}],"inset-shadow":[{"inset-shadow":["none",d,le,te]}],"inset-shadow-color":[{"inset-shadow":C()}],"ring-w":[{ring:F()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:C()}],"ring-offset-w":[{"ring-offset":[z,Z]}],"ring-offset-color":[{"ring-offset":C()}],"inset-ring-w":[{"inset-ring":F()}],"inset-ring-color":[{"inset-ring":C()}],"text-shadow":[{"text-shadow":["none",h,le,te]}],"text-shadow-color":[{"text-shadow":C()}],opacity:[{opacity:[z,ne,X]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[z]}],"mask-image-linear-from-pos":[{"mask-linear-from":M()}],"mask-image-linear-to-pos":[{"mask-linear-to":M()}],"mask-image-linear-from-color":[{"mask-linear-from":C()}],"mask-image-linear-to-color":[{"mask-linear-to":C()}],"mask-image-t-from-pos":[{"mask-t-from":M()}],"mask-image-t-to-pos":[{"mask-t-to":M()}],"mask-image-t-from-color":[{"mask-t-from":C()}],"mask-image-t-to-color":[{"mask-t-to":C()}],"mask-image-r-from-pos":[{"mask-r-from":M()}],"mask-image-r-to-pos":[{"mask-r-to":M()}],"mask-image-r-from-color":[{"mask-r-from":C()}],"mask-image-r-to-color":[{"mask-r-to":C()}],"mask-image-b-from-pos":[{"mask-b-from":M()}
vendor: 4,202 bytes, line 2
2],"mask-image-b-to-pos":[{"mask-b-to":M()}],"mask-image-b-from-color":[{"mask-b-from":C()}],"mask-image-b-to-color":[{"mask-b-to":C()}],"mask-image-l-from-pos":[{"mask-l-from":M()}],"mask-image-l-to-pos":[{"mask-l-to":M()}],"mask-image-l-from-color":[{"mask-l-from":C()}],"mask-image-l-to-color":[{"mask-l-to":C()}],"mask-image-x-from-pos":[{"mask-x-from":M()}],"mask-image-x-to-pos":[{"mask-x-to":M()}],"mask-image-x-from-color":[{"mask-x-from":C()}],"mask-image-x-to-color":[{"mask-x-to":C()}],"mask-image-y-from-pos":[{"mask-y-from":M()}],"mask-image-y-to-pos":[{"mask-y-to":M()}],"mask-image-y-from-color":[{"mask-y-from":C()}],"mask-image-y-to-color":[{"mask-y-to":C()}],"mask-image-radial":[{"mask-radial":[ne,X]}],"mask-image-radial-from-pos":[{"mask-radial-from":M()}],"mask-image-radial-to-pos":[{"mask-radial-to":M()}],"mask-image-radial-from-color":[{"mask-radial-from":C()}],"mask-image-radial-to-color":[{"mask-radial-to":C()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[z]}],"mask-image-conic-from-pos":[{"mask-conic-from":M()}],"mask-image-conic-to-pos":[{"mask-conic-to":M()}],"mask-image-conic-from-color":[{"mask-conic-from":C()}],"mask-image-conic-to-color":[{"mask-conic-to":C()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:L()}],"mask-repeat":[{mask:["no-repeat",{repeat:["","x","y","space","round"]}]}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,X]}],filter:[{filter:["","none",ne,X]}],blur:[{blur:O()}],brightness:[{brightness:[z,ne,X]}],contrast:[{contrast:[z,ne,X]}],"drop-shadow":[{"drop-shadow":["","none",f,le,te]}],"drop-shadow-color":[{"drop-shadow":C()}],grayscale:[{grayscale:["",z,ne,X]}],"hue-rotate":[{"hue-rotate":[z,ne,X]}],invert:[{invert:["",z,ne,X]}],saturate:[{saturate:[z,ne,X]}],sepia:[{sepia:["",z,ne,X]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,X]}],"backdrop-blur":[{"backdrop-blur":O()}],"backdrop-brightness":[{"backdrop-brightness":[z,ne,X]}],"backdrop-contrast":[{"backdrop-contrast":[z,ne,X]}],"backdrop-grayscale":[{"backdrop-grayscale":["",z,ne,X]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[z,ne,X]}],"backdrop-invert":[{"backdrop-invert":["",z,ne,X]}],"backdrop-opacity":[{"backdrop-opacity":[z,ne,X]}],"backdrop-saturate":[{"backdrop-saturate":[z,ne,X]}],"backdrop-sepia":[{"backdrop-sepia":["",z,ne,X]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":x()}],"border-spacing-x":[{"border-spacing-x":x()}],"border-spacing-y":[{"border-spacing-y":x()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,X]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[z,"initial",ne,X]}],ease:[{ease:["linear","initial",v,ne,X]}],delay:[{delay:[z,ne,X]}],animate:[{animate:["none",b,ne,X]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,ne,X]}],"perspective-origin":[{"perspective-origin":y()}],rotate:[{rotate:D()}],"rotate-x":[{"rotate-x":D()}],"rotate-y":[{"rotate-y":D()}],"rotate-z":[{"rotate-z":D()}],scale:[{scale:H()}],"scale-x":[{"scale-x":H()}],"scale-y":[{"scale-y":H()}],"scale-z":[{"scale-z":H()}],"scale-3d":["scale-3d"],skew:[{skew:W()}],"skew-x":[{"skew-x":W()}],"skew-y":[{"skew-y":W()}],transform:[{transform:[ne,X,"","none","gpu","cpu"]}],"transform-origin":[{origin:y()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:G()}],"translate-x":[{"translate-x":G()}],"translate-y":[{"translate-y":G()}],"translate-z":[{"translate-z":G()}],"translate-none":["translate-none"],accent:[{accent:C()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:C()}
2],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ne,X]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":x()}],"scroll-mx":[{"scroll-mx":x()}],"scroll-my":[{"scroll-my":x()}],"scroll-ms":[{"scroll-ms":x()}],"scroll-me":[{"scroll-me":x()}],"scroll-mt":[{"scroll-mt":x()}],"scroll-mr":[{"scroll-mr":x()}],"scroll-mb":[{"scroll-mb":x()}],"scroll-ml":[{"scroll-ml":x()}],"scroll-p":[{"scroll-p":x()}],"scroll-px":[{"scroll-px":x()}],"scroll-py":[{"scroll-py":x()}],"scroll-ps":[{"scroll-ps":x()}],"scroll-pe":[{"scroll-pe":x()}],"scroll-pt":[{"scroll-pt":x()}],"scroll-pr":[{"scroll-pr":x()}],"scroll-pb":[{"scroll-pb":x()}],"scroll-pl":[{"scroll-pl":x()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ne,X]}],fill:[{fill:["none",...C()]}],"stroke-w":[{stroke:[z,re,Z,J]}],stroke:[{stroke:["none",...C()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}}),ye=S(be);function xe(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ye((0,r.$)(t))}},9855(e,t,n){n.d(t,{A:()=>r});const r=(0,n(7784).A)("trash-2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}
2],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]])}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.exports}n.m=e,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;n.t=function(r,a){if(1&a&&(r=this(r)),8&a)return r;if("object"===typeof r&&r){if(4&a&&r.__esModule)return r;if(16&a&&"function"===typeof r.then)return r}var i=Object.create(null);n.r(i);var s={};e=e||[null,t({}),t([]),t(t)];for(var o=2&a&&r;("object"==typeof o||"function"==typeof o)&&!~e.indexOf(o);o=t(o))Object.getOwnPropertyNames(o).forEach(e=>s[e]=()=>r[e]);return s.default=()=>r,n.d(i,s),i}})(),n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce((t,r)=>(n.f[r](e,t),t),[])),n.u=e=>"static/js/"+e+"."+{156:"51054282",231:"3fbd797f",239:"e39fb35b",380:"b030b223",455:"1e2a2f6a",494:"d116fb29",567:"9f2a6b50",699:"9e25c94c",737:"9723cd4f",788:"f71f2339",814:"b30d0035",977:"240addac"}[e]+".chunk.js",n.miniCssF=e=>{},n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="frontend:";n.l=(r,a,i,s)=>{if(e[r])e[r].push(a);else{var o,l;if(void 0!==i)for(var c=document.getElementsByTagName("script"),u=0;u<c.length;u++){var d=c[u];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+i){o=d;break}}o||(l=!0,(o=document.createElement("script")).charset="utf-8",n.nc&&o.setAttribute("nonce",n.nc),o.setAttribute("data-webpack",t+i),o.src=r),e[r]=[a];var h=(t,n)=>{o.onerror=o.onload=null,clearTimeout(f);var a=e[r];if(delete e[r],o.parentNode&&o.parentNode.removeChild(o),a&&a.forEach(e=>e(n)),t)return t(n)},f=setTimeout(h.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=h.bind(null,o.onerror),o.onload=h.bind(null,o.onload),l&&document.head.appendChild(o)}}})(),n.r=e=>{"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",(()=>{var e={792:0};n.f.j=(t,r)=>{var a=n.o(e,t)?e[t]:void 0;if(0!==a)if(a)r.push(a[2]);else{var i=new Promise((n,r)=>a=e[t]=[n,r]);r.push(a[2]=i);var s=n.p+n.u(t),o=new Error;n.l(s,r=>{if(n.o(e,t)&&(0!==(a=e[t])&&(e[t]=void 0),a)){var i=r&&("load"===r.type?"missing":r.type),s=r&&r.target&&r.target.src;o.message="Loading chunk "+t+" failed.\n("+i+": "+s+")",o.name="ChunkLoadError",o.type=i,o.request=s,a[1](o)}},"chunk-"+t,t)}};var t=(t,r)=>{var a,i,[s,o,l]=r,c=0;if(s.some(t=>0!==e[t])){for(a in o)n.o(o,a)&&(n.m[a]=o[a]);if(l)l(n)}for(t&&t(r);c<s.length;c++)i=s[c],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=self.webpackChunkfrontend=self.webpackChunkfrontend||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))})(),n.nc=void 0;var r=n(5043),a=n.t(r,2),i=n(4391),s=n(3986),o=n(9379);const l=["sri"],c=["page"],u=["page","matches"],d=["onClick","discover","prefetch","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition","unstable_defaultShouldRevalidate"],h=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],f=["discover","fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition","unstable_defaultShouldRevalidate"];var p="popstate";function m(){return k(function(e,t){let{pathname:n,search:r,hash:a}=e.location;return y("",{pathname:n,search:r,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||"default")},function(e,t){return"string"===typeof t?t:x(t)},null,arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})}function g(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}function v(e,t){if(!e){"undefined"!==typeof console&&console.warn(t);try{throw new Error(t)}catch(n){}}}function b(e,t){return{usr:e.state,key:e.key,idx:t}}function y(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3?arguments[3]:void 0;return(0,o.A)((0,o.A)({pathname:"string"===typeof e?e:e.pathname,search:"",hash:""},"string"===typeof t?w(t):t),{},{state:n,key:t&&t.key||r||Math.random().toString(36).substring(2,10)})}function x(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&"?"!==n&&(t+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(t+="#"===r.charAt(0)?r:"#"+r),t}function w(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}
2function k(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,l="POP",c=null,u=d();function d(){return(s.state||{idx:null}).idx}function h(){l="POP";let e=d(),t=null==e?null:e-u;u=e,c&&c({action:l,location:m.location,delta:t})}function f(e){return N(e)}null==u&&(u=0,s.replaceState((0,o.A)((0,o.A)({},s.state),{},{idx:u}),""));let m={get action(){return l},get location(){return e(a,s)},listen(e){if(c)throw new Error("A history only accepts one active listener");return a.addEventListener(p,h),c=e,()=>{a.removeEventListener(p,h),c=null}},createHref:e=>t(a,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){l="PUSH";let r=y(m.location,e,t);n&&n(r,e),u=d()+1;let o=b(r,u),h=m.createHref(r);try{s.pushState(o,"",h)}catch(f){if(f instanceof DOMException&&"DataCloneError"===f.name)throw f;a.location.assign(h)}i&&c&&c({action:l,location:m.location,delta:1})},replace:function(e,t){l="REPLACE";let r=y(m.location,e,t);n&&n(r,e),u=d();let a=b(r,u),o=m.createHref(r);s.replaceState(a,"",o),i&&c&&c({action:l,location:m.location,delta:0})},go:e=>s.go(e)};return m}function N(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n="http://localhost";"undefined"!==typeof window&&(n="null"!==window.location.origin?window.location.origin:window.location.href),g(n,"No window.location.(origin|href) available to create URL");let r="string"===typeof e?e:x(e);return r=r.replace(/ $/,"%20"),!t&&r.startsWith("//")&&(r=n+r),new URL(r,n)}new WeakMap;function A(e,t){return j(e,t,arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/",!1)}function j(e,t,n,r){let a=B(("string"===typeof t?w(t):t).pathname||"/",n);if(null==a)return null;let i=_(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let n=e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n]);return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(i);let s=null;for(let o=0;null==s&&o<i.length;++o){let e=z(a);s=O(i[o],e,r)}return s}function _(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],i=function(e,i){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,o=arguments.length>3?arguments[3]:void 0,l={relativePath:void 0===o?e.path||"":o,caseSensitive:!0===e.caseSensitive,childrenIndex:i,route:e};if(l.relativePath.startsWith("/")){if(!l.relativePath.startsWith(r)&&s)return;g(l.relativePath.startsWith(r),'Absolute route path "'.concat(l.relativePath,'" nested under path "').concat(r,'" is not valid. An absolute child route path must start with the combined path of all its parent routes.')),l.relativePath=l.relativePath.slice(r.length)}let c=Y([r,l.relativePath]),u=n.concat(l);e.children&&e.children.length>0&&(g(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'.concat(c,'".')),_(e.children,t,u,c,s)),(null!=e.path||e.index)&&t.push({path:c,score:M(c,e.index),routesMeta:u})};return e.forEach((e,t)=>{var n;if(""!==e.path&&null!==(n=e.path)&&void 0!==n&&n.includes("?"))for(let r of S(e.path))i(e,t,!0,r);else i(e,t)}),t}function S(e){let t=e.split("/");if(0===t.length)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(0===r.length)return a?[i,""]:[i];let s=S(r.join("/")),o=[];return o.push(...s.map(e=>""===e?i:[i,e].join("/"))),a&&o.push(...s),o.map(t=>e.startsWith("/")&&""===t?"/":t)}var C=/^:[\w-]+$/,E=3,L=2,P=1,T=10,R=-2,F=e=>"*"===e;function M(e,t){let n=e.split("/"),r=n.length;return n.some(F)&&(r+=R),t&&(r+=L),n.filter(e=>!F(e)).reduce((e,t)=>e+(C.test(t)?E:""===t?P:T),r)}function O(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],{routesMeta:r}=e,a={},i="/",s=[];for(let o=0;o<r.length;++o){let e=r[o],l=o===r.length-1,c="/"===i?t:t.slice(i.length)||"/",u=D({path:e.relativePath,caseSensitive:e.caseSensitive,end:l},c),d=e.route;if(!u&&l&&n&&!r[r.length-1].route.index&&(u=D({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},c)),!u)return null;
2Object.assign(a,u.params),s.push({params:a,pathname:Y([i,u.pathname]),pathnameBase:K(Y([i,u.pathnameBase])),route:d}),"/"!==u.pathnameBase&&(i=Y([i,u.pathnameBase]))}return s}function D(e,t){"string"===typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=I(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:r.reduce((e,t,n)=>{let{paramName:r,isOptional:a}=t;if("*"===r){let e=o[n]||"";s=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=o[n];return e[r]=a&&!l?void 0:(l||"").replace(/%2F/g,"/"),e},{}),pathname:i,pathnameBase:s,pattern:e}}function I(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];v("*"===e||!e.endsWith("*")||e.endsWith("/*"),'Route path "'.concat(e,'" will be treated as if it were "').concat(e.replace(/\*$/,"/*"),'" because the `*` character must always follow a `/` in the pattern. To get rid of this warning, please change the route path to "').concat(e.replace(/\*$/,"/*"),'".'));let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:null!=n}),n?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(r.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function z(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return v(!1,'The URL path "'.concat(e,'" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (').concat(t,").")),e}}function B(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}var q=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,U=e=>q.test(e);function V(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}function H(e,t,n,r){return"Cannot include a '".concat(e,"' character in a manually specified `to.").concat(t,"` field [").concat(JSON.stringify(r),"]. Please separate it out to the `to.").concat(n,'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.')}function W(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function G(e){let t=W(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function $(e,t,n){let r,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];"string"===typeof e?r=w(e):(r=(0,o.A)({},e),g(!r.pathname||!r.pathname.includes("?"),H("?","pathname","search",r)),g(!r.pathname||!r.pathname.includes("#"),H("#","pathname","hash",r)),g(!r.search||!r.search.includes("#"),H("#","search","hash",r)));let i,s=""===e||""===r.pathname,l=s?"/":r.pathname;if(null==l)i=n;else{let e=t.length-1;if(!a&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;r.pathname=t.join("/")}i=e>=0?t[e]:"/"}let c=function(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"/",{pathname:r,search:a="",hash:i=""}="string"===typeof e?w(e):e;if(r)if(U(r))t=r;else{if(r.includes("//")){let e=r;r=r.replace(/\/\/+/g,"/"),v(!1,"Pathnames cannot have embedded double slashes - normalizing ".concat(e," -> ").concat(r))}t=r.startsWith("/")?V(r.substring(1),"/"):V(r,n)}else t=n;return{pathname:t,search:X(a),hash:Z(i)}}(r,i),u=l&&"/"!==l&&l.endsWith("/"),d=(s||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!u&&!d||(c.pathname+="/"),c}var Y=e=>e.join("/").replace(/\/\/+/g,"/"),K=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),X=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Z=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";var J=class{constructor(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];this.status=e,this.statusText=t||"",this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Q(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}function ee(e){return e.map(e=>
2e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var te="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;function ne(e,t){let n=e;if("string"!==typeof n||!q.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,a=!1;if(te)try{let e=new URL(window.location.href),r=n.startsWith("//")?new URL(e.protocol+n):new URL(n),i=B(r.pathname,t);r.origin===e.origin&&null!=i?n=i+r.search+r.hash:a=!0}catch(i){v(!1,'<Link to="'.concat(n,'"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.'))}return{absoluteURL:r,isExternal:a,to:n}}Symbol("Uninstrumented");Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var re=["POST","PUT","PATCH","DELETE"],ae=(new Set(re),["GET",...re]);new Set(ae),Symbol("ResetLoaderData");var ie=r.createContext(null);ie.displayName="DataRouter";var se=r.createContext(null);se.displayName="DataRouterState";var oe=r.createContext(!1);function le(){return r.useContext(oe)}var ce=r.createContext({isTransitioning:!1});ce.displayName="ViewTransition";var ue=r.createContext(new Map);ue.displayName="Fetchers";var de=r.createContext(null);de.displayName="Await";var he=r.createContext(null);he.displayName="Navigation";var fe=r.createContext(null);fe.displayName="Location";var pe=r.createContext({outlet:null,matches:[],isDataRoute:!1});pe.displayName="Route";var me=r.createContext(null);me.displayName="RouteError";var ge="REACT_ROUTER_ERROR";function ve(){return null!=r.useContext(fe)}function be(){return g(ve(),"useLocation() may be used only in the context of a <Router> component."),r.useContext(fe).location}var ye="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function xe(e){r.useContext(he).static||r.useLayoutEffect(e)}function we(){let{isDataRoute:e}=r.useContext(pe);return e?function(){let{router:e}=Re("useNavigate"),t=Me("useNavigate"),n=r.useRef(!1);xe(()=>{n.current=!0});let a=r.useCallback(async function(r){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};v(n.current,ye),n.current&&("number"===typeof r?await e.navigate(r):await e.navigate(r,(0,o.A)({fromRouteId:t},a)))},[e,t]);return a}():function(){g(ve(),"useNavigate() may be used only in the context of a <Router> component.");let e=r.useContext(ie),{basename:t,navigator:n}=r.useContext(he),{matches:a}=r.useContext(pe),{pathname:i}=be(),s=JSON.stringify(G(a)),o=r.useRef(!1);xe(()=>{o.current=!0});let l=r.useCallback(function(r){let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(v(o.current,ye),!o.current)return;if("number"===typeof r)return void n.go(r);let l=$(r,JSON.parse(s),i,"path"===a.relative);null==e&&"/"!==t&&(l.pathname="/"===l.pathname?t:Y([t,l.pathname])),(a.replace?n.replace:n.push)(l,a.state,a)},[t,n,s,i,e]);return l}()}r.createContext(null);function ke(){let{matches:e}=r.useContext(pe),t=e[e.length-1];return t?t.params:{}}function Ne(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{matches:n}=r.useContext(pe),{pathname:a}=be(),i=JSON.stringify(G(n));return r.useMemo(()=>$(e,JSON.parse(i),a,"path"===t),[e,i,a,t])}function Ae(e,t,n,a,i){g(ve(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=r.useContext(he),{matches:l}=r.useContext(pe),c=l[l.length-1],u=c?c.params:{},d=c?c.pathname:"/",h=c?c.pathnameBase:"/",f=c&&c.route;{let e=f&&f.path||"";Ie(d,!f||e.endsWith("*")||e.endsWith("*?"),'You rendered descendant <Routes> (or called `useRoutes()`) at "'.concat(d,'" (under <Route path="').concat(e,'">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won\'t match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="').concat(e,'"> to <Route path="').concat("/"===e?"*":"".concat(e,"/*"),'">.'))}let p,m=be();if(t){var b;let e="string"===typeof t?w(t):t;g("/"===h||(null===(b=e.pathname)||void 0===b?void 0:b.startsWith(h)),'When overriding the location using `<Routes location>` or `useRoutes(routes, location)`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "'.concat(h,'" but pathname "').concat(e.pathname,'" was given in the `location` prop.')),p=e}else p=m;let y=p.pathname||"/",x=y;if("/"!==h){let e=h.replace(/^\//,"").split("/");x="/"+y.replace(/^\//,"").split("/").slice(e.length).join("/")}let k=A(e,{pathname:x});v(f||null!=k,'No routes matched location "'.concat(p.pathname).concat(p.search).concat(p.hash,'" ')),v(null==k||void 0!==k[k.length-1].route.element||void 0!==k[k.length-1].route.Component||void 0!==k[k.length-1].route.lazy,'Matched leaf route at location "'.concat(p.pathname).concat(p.search).concat(p.hash,'" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.'));let N=Pe(k&&k.map(e=>Object.assign({},e,{params:Object.assign({},u,e.params),pathname:Y([h,s.encodeLocation?s.encodeLocation(e.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?h:Y([h,s.encodeLocation?s.encodeLocation(e.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),l,n,a,i);return t&&N?r.createElement(fe.Provider,{value:{location:(0,o.A)({pathname:"/",search:"",hash:"",state:null,key:"default"},p),navigationType:"POP"}},N):N}function je(){let e=Oe(),t=Q(e)?"".concat(e.status," ").concat(e.statusText):e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",i={padding:"0.5rem",backgroundColor:a},s={padding:"2px 4px",backgroundColor:a},o=null;return console.error("Error handled by React Router default ErrorBoundary:",e),o=r.createElement(r.Fragment,null,r.createElement("p",null,"\ud83d\udcbf Hey developer \ud83d\udc4b"),r.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",r.createElement("code",{style:s},"ErrorBoundary")," or"," ",r.createElement("code",{style:s},"errorElement")," prop on your route.")),r.createElement(r.Fragment,null,r.createElement("h2",null,"Unexpected Application
2Error!"),r.createElement("h3",{style:{fontStyle:"italic"}},t),n?r.createElement("pre",{style:i},n):null,o)}var _e=r.createElement(je,null),Se=class extends r.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&"object"===typeof e&&e&&"digest"in e&&"string"===typeof e.digest){const t=function(e){if(e.startsWith("".concat(ge,":").concat("ROUTE_ERROR_RESPONSE",":{")))try{let t=JSON.parse(e.slice(40));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText)return new J(t.status,t.statusText,t.data)}catch(t){}}(e.digest);t&&(e=t)}let t=void 0!==e?r.createElement(pe.Provider,{value:this.props.routeContext},r.createElement(me.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?r.createElement(Ee,{error:e},t):t}};Se.contextType=oe;var Ce=new WeakMap;function Ee(e){let{children:t,error:n}=e,{basename:a}=r.useContext(he);if("object"===typeof n&&n&&"digest"in n&&"string"===typeof n.digest){let e=function(e){if(e.startsWith("".concat(ge,":").concat("REDIRECT",":{")))try{let t=JSON.parse(e.slice(28));if("object"===typeof t&&t&&"number"===typeof t.status&&"string"===typeof t.statusText&&"string"===typeof t.location&&"boolean"===typeof t.reloadDocument&&"boolean"===typeof t.replace)return t}catch(t){}}(n.digest);if(e){let t=Ce.get(n);if(t)throw t;let i=ne(e.location,a);if(te&&!Ce.get(n)){if(!i.isExternal&&!e.reloadDocument){const t=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Ce.set(n,t),t}window.location.href=i.absoluteURL||i.to}return r.createElement("meta",{httpEquiv:"refresh",content:"0;url=".concat(i.absoluteURL||i.to)})}}return t}function Le(e){let{routeContext:t,match:n,children:a}=e,i=r.useContext(ie);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),r.createElement(pe.Provider,{value:t},a)}function Pe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let i=e,s=null===n||void 0===n?void 0:n.errors;if(null!=s){let e=i.findIndex(e=>e.route.id&&void 0!==(null===s||void 0===s?void 0:s[e.route.id]));g(e>=0,"Could not find a matching route for errors on route IDs: ".concat(Object.keys(s).join(","))),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,l=-1;if(n)for(let r=0;r<i.length;r++){let e=i[r];if((e.route.HydrateFallback||e.route.hydrateFallbackElement)&&(l=r),e.route.id){let{loaderData:t,errors:r}=n,a=e.route.loader&&!t.hasOwnProperty(e.route.id)&&(!r||void 0===r[e.route.id]);if(e.route.lazy||a){o=!0,i=l>=0?i.slice(0,l+1):[i[0]];break}}}let c=n&&a?(e,t)=>{var r,i;a(e,{location:n.location,params:null!==(r=null===(i=n.matches)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.params)&&void 0!==r?r:{},unstable_pattern:ee(n.matches),errorInfo:t})}:void 0;return i.reduceRight((e,a,u)=>{let d,h=!1,f=null,p=null;n&&(d=s&&a.route.id?s[a.route.id]:void 0,f=a.route.errorElement||_e,o&&(l<0&&0===u?(Ie("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),h=!0,p=null):l===u&&(h=!0,p=a.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,u+1)),g=()=>{let t;return t=d?f:h?p:a.route.Component?r.createElement(a.route.Component,null):a.route.element?a.route.element:e,r.createElement(Le,{match:a,routeC
2ontext:{outlet:e,matches:m,isDataRoute:null!=n},children:t})};return n&&(a.route.ErrorBoundary||a.route.errorElement||0===u)?r.createElement(Se,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:c}):g()},null)}function Te(e){return"".concat(e," must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.")}function Re(e){let t=r.useContext(ie);return g(t,Te(e)),t}function Fe(e){let t=r.useContext(se);return g(t,Te(e)),t}function Me(e){let t=function(e){let t=r.useContext(pe);return g(t,Te(e)),t}(e),n=t.matches[t.matches.length-1];return g(n.route.id,"".concat(e,' can only be used on routes that contain a unique "id"')),n.route.id}function Oe(){var e;let t=r.useContext(me),n=Fe("useRouteError"),a=Me("useRouteError");return void 0!==t?t:null===(e=n.errors)||void 0===e?void 0:e[a]}var De={};function Ie(e,t,n){t||De[e]||(De[e]=!0,v(!1,n))}var ze={};function Be(e,t){e||ze[t]||(ze[t]=!0,console.warn(t))}a.useOptimistic;r.memo(function(e){let{routes:t,future:n,state:r,onError:a}=e;return Ae(t,void 0,r,a,n)});function qe(e){g(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function Ue(e){let{basename:t="/",children:n=null,location:a,navigationType:i="POP",navigator:s,static:o=!1,unstable_useTransitions:l}=e;g(!ve(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let c=t.replace(/^\/*/,"/"),u=r.useMemo(()=>({basename:c,navigator:s,static:o,unstable_useTransitions:l,future:{}}),[c,s,o,l]);"string"===typeof a&&(a=w(a));let{pathname:d="/",search:h="",hash:f="",state:p=null,key:m="default"}=a,b=r.useMemo(()=>{let e=B(d,c);return null==e?null:{location:{pathname:e,search:h,hash:f,state:p,key:m},navigationType:i}},[c,d,h,f,p,m,i]);return v(null!=b,'<Router basename="'.concat(c,'"> is not able to match the URL "').concat(d).concat(h).concat(f,"\" because it does not start with the basename, so the <Router> won't render anything.")),null==b?null:r.createElement(he.Provider,{value:u},r.createElement(fe.Provider,{children:n,value:b}))}function Ve(e){let{children:t,location:n}=e;return Ae(He(t),n)}r.Component;function He(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[];return r.Children.forEach(e,(e,a)=>{if(!r.isValidElement(e))return;let i=[...t,a];if(e.type===r.Fragment)return void n.push.apply(n,He(e.props.children,i));g(e.type===qe,"[".concat("string"===typeof e.type?e.type:e.type.name,"] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>")),g(!e.props.index||!e.props.children,"An index route cannot have child routes.");let s={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:!0===e.props.hasErrorBoundary||null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=He(e.props.children,i)),n.push(s)}),n}var We="get",Ge="application/x-www-form-urlencoded";function $e(e){return"undefined"!==typeof HTMLElement&&e instanceof HTMLElement}var Ye=null;var Ke=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Xe(e){return null==e||Ke.has(e)?e:(v(!1,'"'.concat(e,'" is not a valid `encType` for `<Form>`/`<fetcher.Form>` and will default to "').concat(Ge,'"')),null)}function Ze(e,t){let n,r,a,i,s;if($e(o=e)&&"form"===o.tagName.toLowerCase()){let s=e.getAttribute("action");r=s?B(s,t):null,n=e.getAttribute("method")||We,a=Xe(e.getAttribute("enctype"))||Ge,i=new FormData(e)}else if(function(e){return $e(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return $e(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let s=e.form;if(null==s)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let o=e.getAttribute("formaction")||s.getAttribute("action");if(r=o?B(o,t):null,n=e.getAttribute("formmethod")||s.getAttribute("method")||We,a=Xe(e.getAttribute("formenctype"))||Xe(s.getAttribute("enctype"))||Ge,i=new FormData(s,e),!function(){if(null===Ye)try{new FormData(document.createElement("form"),0),Ye=!1}catch(e){Ye=!0}return Ye}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?"".concat(t,"."):"";i.append("".concat(e,"x"),"0"),i.append("".concat(e,"y"),"0")}else t&&i.append(t,r)}}else{if($e(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=We,r=null,a=Ge,s=e}var o;return i&&"text/plain"===a&&(s=i,i=void 0),{action:r,method:n.toLowerCase(),encType:a,formData:i,body:s}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");"undefined"!==typeof window?window:"undefined"!==typeof globalThis&&globalThis;function Je(e,t){if(!1===e||null===e||"undefined"===typeof e)throw new Error(t)}Symbol("SingleFetchRedirect");function Qe(e,t,n){let r="string"===typeof e?new URL(e,"undefined"===typeof window?"server://singlefetch/":window.location.origin):e;return"/"===r.pathname?r.pathname="_root.".concat(n):t&&"/"===B(r.pathname,t)?r.pathname="".concat(t.replace(/\/$/,""),"/_root.").concat(n):r.pathname="".concat(r.pathname.replace(/\/$/,""),".").concat(n),r}async function et(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error("Error loading route module `".concat(e.module,"`, reloading page...")),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.
2isSpaMode,window.location.reload(),new Promise(()=>{})}}function tt(e){return null!=e&&"string"===typeof e.page}function nt(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"===typeof e.imageSrcSet&&"string"===typeof e.imageSizes:"string"===typeof e.rel&&"string"===typeof e.href)}function rt(e,t,n,r,a,i){let s=(e,t)=>!n[t]||e.route.id!==n[t].route.id,o=(e,t)=>{var r;return n[t].pathname!==e.pathname||(null===(r=n[t].route.path)||void 0===r?void 0:r.endsWith("*"))&&n[t].params["*"]!==e.params["*"]};return"assets"===i?t.filter((e,t)=>s(e,t)||o(e,t)):"data"===i?t.filter((t,i)=>{let l=r.routes[t.route.id];if(!l||!l.hasLoader)return!1;if(s(t,i)||o(t,i))return!0;if(t.route.shouldRevalidate){var c;let r=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:(null===(c=n[0])||void 0===c?void 0:c.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"===typeof r)return r}return!0}):[]}function at(e,t){let{includeHydrateFallback:n}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return r=e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let a=[r.module];return r.clientActionModule&&(a=a.concat(r.clientActionModule)),r.clientLoaderModule&&(a=a.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(a=a.concat(r.hydrateFallbackModule)),r.imports&&(a=a.concat(r.imports)),a}).flat(1),[...new Set(r)];var r}function it(e,t){let n=new Set,r=new Set(t);return e.reduce((e,a)=>{if(t&&!tt(a)&&"script"===a.as&&a.href&&r.has(a.href))return e;let i=JSON.stringify(function(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}(a));return n.has(i)||(n.add(i),e.push({key:i,link:a})),e},[])}function st(e,t){return"lazy"===e.mode&&!0===t}function ot(){let e=r.useContext(ie);return Je(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function lt(){let e=r.useContext(se);return Je(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var ct=r.createContext(void 0);function ut(){let e=r.useContext(ct);return Je(e,"You must render this element inside a <HydratedRouter> element"),e}function dt(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ht(e,t,n){if(n&&!gt)return[e[0]];if(t){let n=e.findIndex(e=>void 0!==t[e.route.id]);return e.slice(0,n+1)}return e}ct.displayName="FrameworkContext";function ft(e){let{page:t}=e,n=(0,s.A)(e,c),{router:a}=ot(),i=r.useMemo(()=>A(a.routes,t,a.basename),[a.routes,t,a.basename]);return i?r.createElement(mt,(0,o.A)({page:t,matches:i},n)):null}function pt(e){let{manifest:t,routeModules:n}=ut(),[a,i]=r.useState([]);return r.useEffect(()=>{let r=!1;return async function(e,t,n){return it((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await et(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(nt).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?(0,o.A)((0,o.A)({},e),{},{rel:"prefetch",as:"style"}):(0,o.A)((0,o.A)({},e),{},{rel:"prefetch"})))}(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),a}function mt(e){let{page:t,matches:n}=e,a=(0,s.A)(e,u),i=be(),{manifest:l,routeModules:c}=ut(),{basename:d}=ot(),{loaderData:h,matches:f}=lt(),p=r.useMemo(()=>rt(t,n,f,l,i,"data"),[t,n,f,l,i]),m=r.useMemo(()=>rt(t,n,f,l,i,"assets"),[t,n,f,l,i]),g=r.useMemo(()=>{if(t===i.pathname+i.search+i.hash)return[];let e=new Set,r=!1;if(n.forEach(t=>{var n;let a=l.routes[t.route.id];a&&a.hasLoader&&(!p.some(e=>e.route.id===t.route.id)&&t.route.id in h&&null!==(n=c[t.route.id])&&void 0!==n&&n.shouldRevalidate||a.hasClientLoader?r=!0:e.add(t.route.id))}),0===e.size)return[];let a=Qe(t,d,"data");return r&&e.size>0&&a.searchParams.set("_routes",n.filter(t=>e.has(t.route.id)).map(e=>e.route.id).join(",")),[a.pathname+a.search]},[d,h,i,l,p,n,t,c]),v=r.useMemo(()=>at(m,l),[m,l]),b=pt(m);return r.createElement(r.Fragment,null,g.map(e=>r.createElement("link",(0,o.A)({key:e,rel:"prefetch",as:"fetch",href:e},a))),v.map(e=>r.createElement("link",(0,o.A)({key:e,rel:"modulepreload",href:e},a))),b.map(e=>{let{key:t,link:n}=e;return r.createElement("link",(0,o.A)({key:t,nonce:a.nonce},n))}))}var gt=!1;function vt(e){let{manifest:t,serverHandoffString:n,isSpaMode:a,renderMeta:i,routeDiscovery:c,ssr:u}=ut(),{router:d,static:h,staticContext:f}=ot(),{matches:p}=lt(),m=le(),g=st(c,u);i&&(i.didRenderScripts=!0);let v=ht(p,null,a);r.useEffect(()=>{gt=!0},[]);let b=r.useMemo(()=>{var a;if(m)return null;let i=f?"window.__reactRouterContext = ".concat(n,";").concat("window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}
2).pipeThrough(new TextEncoderStream());"):" ",c=h?"".concat(null!==(a=t.hmr)&&void 0!==a&&a.runtime?"import ".concat(JSON.stringify(t.hmr.runtime),";"):"").concat(g?"":"import ".concat(JSON.stringify(t.url)),";\n").concat(v.map((e,n)=>{let r="route".concat(n),a=t.routes[e.route.id];Je(a,"Route ".concat(e.route.id," not found in manifest"));let{clientActionModule:i,clientLoaderModule:s,clientMiddlewareModule:o,hydrateFallbackModule:l,module:c}=a,u=[...i?[{module:i,varName:"".concat(r,"_clientAction")}]:[],...s?[{module:s,varName:"".concat(r,"_clientLoader")}]:[],...o?[{module:o,varName:"".concat(r,"_clientMiddleware")}]:[],...l?[{module:l,varName:"".concat(r,"_HydrateFallback")}]:[],{module:c,varName:"".concat(r,"_main")}];return 1===u.length?"import * as ".concat(r," from ").concat(JSON.stringify(c),";"):[u.map(e=>"import * as ".concat(e.varName,' from "').concat(e.module,'";')).join("\n"),"const ".concat(r," = {").concat(u.map(e=>"...".concat(e.varName)).join(","),"};")].join("\n")}).join("\n"),"\n ").concat(g?"window.__reactRouterManifest = ".concat(JSON.stringify(function(e,t){let{sri:n}=e,r=(0,s.A)(e,l),a=new Set(t.state.matches.map(e=>e.route.id)),i=t.state.location.pathname.split("/").filter(Boolean),c=["/"];for(i.pop();i.length>0;)c.push("/".concat(i.join("/"))),i.pop();c.forEach(e=>{let n=A(t.routes,e,t.basename);n&&n.forEach(e=>a.add(e.route.id))});let u=[...a].reduce((e,t)=>Object.assign(e,{[t]:r.routes[t]}),{});return(0,o.A)((0,o.A)({},r),{},{routes:u,sri:!!n||void 0})}(t,d),null,2),";"):"","\n window.__reactRouterRouteModules = {").concat(v.map((e,t)=>"".concat(JSON.stringify(e.route.id),":route").concat(t)).join(","),"};\n\nimport(").concat(JSON.stringify(t.entry.module),");"):" ";return r.createElement(r.Fragment,null,r.createElement("script",(0,o.A)((0,o.A)({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:i},type:void 0})),r.createElement("script",(0,o.A)((0,o.A)({},e),{},{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:c},type:"module",async:!0})))},[]),y=gt||m?[]:(x=t.entry.imports.concat(at(v,t,{includeHydrateFallback:!0})),[...new Set(x)]);var x;let w="object"===typeof t.sri?t.sri:{};return Be(!m,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),gt||m?null:r.createElement(r.Fragment,null,"object"===typeof t.sri?r.createElement("script",{"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:w})}}):null,g?null:r.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:w[t.url],suppressHydrationWarning:!0}),r.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:w[t.entry.module],suppressHydrationWarning:!0}),y.map(t=>r.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:w[t],suppressHydrationWarning:!0})),b)}function bt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return e=>{t.forEach(t=>{"function"===typeof t?t(e):null!=t&&(t.current=e)})}}r.Component;function yt(e){let{error:t,isOutsideRemixApp:n}=e;console.error(t);let a,i=r.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "\ud83d\udcbf Hey developer \ud83d\udc4b. You can provide a way better UX than this when your app throws errors. Check out https://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if(Q(t))return r.createElement(xt,{title:"Unhandled Thrown Response!"},r.createElement("h1",{style:{fontSize:"24px"}},t.status," ",t.statusText),i);if(t instanceof Error)a=t;else{let e=null==t?"Unknown Error":"object"===typeof t&&"toString"in t?t.toString():JSON.stringify(t);a=new Error(e)}return r.createElement(xt,{title:"Application Error!",isOutsideRemixApp:n},r.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),r.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},a.stack),i)}function xt(e){var t;let{title:n,renderScripts:a,isOutsideRemixApp:i,children:s}=e,{routeModules:o}=ut();return null!==(t=o.root)&&void 0!==t&&t.Layout&&!i?s:r.createElement("html",{lang:"en"},r.createElement("head",null,r.createElement("meta",{charSet:"utf-8"}),r.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),r.createElement("title",null,n)),r.createElement("body",null,r.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},s,a?r.createElement(vt,null):null)))}var wt="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement;try{wt&&(window.__reactRouterVersion="7.11.0")}catch(jf){}function kt(e){let{basename:t,children:n,unstable_useTransitions:a,window:i}=e,s=r.useRef();null==s.current&&(s.current=m({window:i,v5Compat:!0}));let o=s.current,[l,c]=r.useState({action:o.action,location:o.location}),u=r.useCallback(e=>{!1===a?c(e):r.startTransition(()=>c(e))},[a]);return r.useLayoutEffect(()=>o.listen(u),[o,u]),r.createElement(Ue,{basename:t,children:n,location:l.location,navigationType:l.action,navigator:o,unstable_useTransitions:a})}var Nt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,At=r.forwardRef(function(e,t){let{onClick:n,discover:a="render",prefetch:i="none",relative:l,reloadDocument:c,replace:u,state:h,target:f,to:p,preventScrollReset:m,viewTransition:v,unstable_defaultShouldRevalidate:b}=e,y=(0,s.A)(e,d),{basename:w,unstable_useTransitions:k}=r.useContext(he),N="string"===typeof p&&Nt.test(p),A=ne(p,w);p=A.to;let j=function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};g(ve(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=r.useContext(he),{hash:i,pathname:s,search:o}=Ne(e,{relative:t}),l=s;return"/"!==n&&(l="/"===s?n:Y([n,s])),a.createHref({pathname:l,search:o,hash:i})}(p,{relative:l}),[_,S,C]=function(e,t){let n=r.useContext(ct),[a,i]=r.useState(!1),[s,o]=r.useState(!1),{onFocus:l,onBlur:c,onMouseEnter:u,onMouseLeave:d,onTouchStart:h}=t,f=r.useRef(null);r.useEffect(()=>{if("render"===e&&o(!0),"viewport"===e){let e=new IntersectionObserver(e=>
2{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),r.useEffect(()=>{if(a){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[a]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?"intent"!==e?[s,f,{}]:[s,f,{onFocus:dt(l,p),onBlur:dt(c,m),onMouseEnter:dt(u,p),onMouseLeave:dt(d,m),onTouchStart:dt(h,p)}]:[!1,f,{}]}(i,y),E=function(e){let{target:t,replace:n,state:a,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:l,unstable_useTransitions:c}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},u=we(),d=be(),h=Ne(e,{relative:s});return r.useCallback(f=>{if(function(e,t){return 0===e.button&&(!t||"_self"===t)&&!function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)}(f,t)){f.preventDefault();let t=void 0!==n?n:x(d)===x(h),p=()=>u(e,{replace:t,state:a,preventScrollReset:i,relative:s,viewTransition:o,unstable_defaultShouldRevalidate:l});c?r.startTransition(()=>p()):p()}},[d,u,h,n,a,t,e,i,s,o,l,c])}(p,{replace:u,state:h,target:f,preventScrollReset:m,relative:l,viewTransition:v,unstable_defaultShouldRevalidate:b,unstable_useTransitions:k});let L=r.createElement("a",(0,o.A)((0,o.A)((0,o.A)({},y),C),{},{href:A.absoluteURL||j,onClick:A.isExternal||c?n:function(e){n&&n(e),e.defaultPrevented||E(e)},ref:bt(t,S),target:f,"data-discover":N||"render"!==a?void 0:"true"}));return _&&!N?r.createElement(r.Fragment,null,L,r.createElement(ft,{page:j})):L});At.displayName="Link",r.forwardRef(function(e,t){let{"aria-current":n="page",caseSensitive:a=!1,className:i="",end:l=!1,style:c,to:u,viewTransition:d,children:f}=e,p=(0,s.A)(e,h),m=Ne(u,{relative:p.relative}
2),v=be(),b=r.useContext(se),{navigator:y,basename:x}=r.useContext(he),w=null!=b&&function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.useContext(ce);g(null!=n,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=St("useViewTransitionState"),i=Ne(e,{relative:t});if(!n.isTransitioning)return!1;let s=B(n.currentLocation.pathname,a)||n.currentLocation.pathname,o=B(n.nextLocation.pathname,a)||n.nextLocation.pathname;return null!=D(i.pathname,o)||null!=D(i.pathname,s)}(m)&&!0===d,k=y.encodeLocation?y.encodeLocation(m).pathname:m.pathname,N=v.pathname,A=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;a||(N=N.toLowerCase(),A=A?A.toLowerCase():null,k=k.toLowerCase()),A&&x&&(A=B(A,x)||A);const j="/"!==k&&k.endsWith("/")?k.length-1:k.length;let _,S=N===k||!l&&N.startsWith(k)&&"/"===N.charAt(j),C=null!=A&&(A===k||!l&&A.startsWith(k)&&"/"===A.charAt(k.length)),E={isActive:S,isPending:C,isTransitioning:w},L=S?n:void 0;_="function"===typeof i?i(E):[i,S?"active":null,C?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let P="function"===typeof c?c(E):c;return r.createElement(At,(0,o.A)((0,o.A)({},p),{},{"aria-current":L,className:_,ref:t,style:P,to:u,viewTransition:d}),"function"===typeof f?f(E):f)}).displayName="NavLink";var jt=r.forwardRef((e,t)=>{let{discover:n="render",fetcherKey:a,navigate:i,reloadDocument:l,replace:c,state:u,method:d=We,action:h,onSubmit:p,relative:m,preventScrollReset:v,viewTransition:b,unstable_defaultShouldRevalidate:y}=e,w=(0,s.A)(e,f),{unstable_useTransitions:k}=r.useContext(he),N=Lt(),A=function(e){let{relative:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{basename:n}=r.useContext(he),a=r.useContext(pe);g(a,"useFormAction must be used inside a RouteContext");let[i]=a.matches.slice(-1),s=(0,o.A)({},Ne(e||".",{relative:t})),l=be();if(null==e){s.search=l.search;let e=new URLSearchParams(s.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let n=e.toString();s.search=n?"?".concat(n):""}}e&&"."!==e||!i.route.index||(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index");"/"!==n&&(s.pathname="/"===s.pathname?n:Y([n,s.pathname]));return x(s)}(h,{relative:m}),j="get"===d.toLowerCase()?"get":"post",_="string"===typeof h&&Nt.test(h);return r.createElement("form",(0,o.A)((0,o.A)({ref:t,method:j,action:A,onSubmit:l?p:e=>{if(p&&p(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,n=(null===t||void 0===t?void 0:t.getAttribute("formmethod"))||d,s=()=>N(t||e.currentTarget,{fetcherKey:a,method:n,navigate:i,replace:c,state:u,relative:m,preventScrollReset:v,viewTransition:b,unstable_defaultShouldRevalidate:y});k&&!1!==i?r.startTransition(()=>s()):s()}},w),{},{"data-discover":_||"render"!==n?void 0:"true"}))});function _t(e){return"".concat(e," must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.")}function St(e){let t=r.useContext(ie);return g(t,_t(e)),t}jt.displayName="Form";var Ct=0,Et=()=>"__".concat(String(++Ct),"__");function Lt(){let{router:e}=St("useSubmit"),{basename:t}=r.useContext(he),n=Me("useRouteId"),a=e.fetch,i=e.navigate;return r.useCallback(async function(e){let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{action:s,method:o,encType:l,formData:c,body:u}=Ze(e,t);if(!1===r.navigate){let e=r.fetcherKey||Et();await a(e,n,r.action||s,{unstable_defaultShouldRevalidate:r.unstable_defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:c,body:u,formMethod:r.method||o,formEncType:r.encType||l,flushSync:r.flushSync})}else await i(r.action||s,{unstable_defaultShouldRevalidate:r.unstable_defaultShouldRevalidate,preventScrollReset:r.preventScrollReset,formData:c,body:u,formMethod:r.method||o,formEncType:r.encType||l,replace:r.replace,state:r.state,fromRouteId:n,flushSync:r.flushSync,viewTransition:r.viewTransition})},[a,i,t,n])}const Pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Tt=(()=>
2new Set(Pt))(),Rt=(e,t,n)=>n>t?t:n<e?e:n,Ft={test:e=>"number"===typeof e,parse:parseFloat,transform:e=>e},Mt=(0,o.A)((0,o.A)({},Ft),{},{transform:e=>Rt(0,1,e)}),Ot=(0,o.A)((0,o.A)({},Ft),{},{default:1}),Dt=e=>Math.round(1e5*e)/1e5,It=/-?(?:[0-9]+(?:\.[0-9]+)?|\.[0-9]+)/g;const zt=/^(?:#[0-9a-f]{3,8}|(?:rgb|h[s\u017F]l)a?\((?:-?[\.0-9]+%?[\t-\r ,\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+){2}-?[\.0-9]+%?[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:[,\/][\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?(?:\b[0-9]+(?:\.[0-9]+)?|\.[0-9]+)?%?\))$/i,Bt=(e,t)=>n=>Boolean("string"===typeof n&&zt.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),qt=(e,t,n)=>r=>{if("string"!==typeof r)return r;const[a,i,s,o]=r.match(It);return{[e]:parseFloat(a),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==o?parseFloat(o):1}},Ut=(0,o.A)((0,o.A)({},Ft),{},{transform:e=>Math.round((e=>Rt(0,255,e))(e))}),Vt={test:Bt("rgb","red"),parse:qt("red","green","blue"),transform:e=>{let{red:t,green:n,blue:r,alpha:a=1}=e;return"rgba("+Ut.transform(t)+", "+Ut.transform(n)+", "+Ut.transform(r)+", "+Dt(Mt.transform(a))+")"}};const Ht={test:Bt("#"),parse:function(e){let t="",n="",r="",a="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),a=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),a=e.substring(4,5),t+=t,n+=n,r+=r,a+=a),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:a?parseInt(a,16)/255:1}},transform:Vt.transform},Wt=e=>({test:t=>"string"===typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>"".concat(t).concat(e)}),Gt=Wt("deg"),$t=Wt("%"),Yt=Wt("px"),Kt=Wt("vh"),Xt=Wt("vw"),Zt=(()=>(0,o.A)((0,o.A)({},$t),{},{parse:e=>$t.parse(e)/100,transform:e=>$t.transform(100*e)}))(),Jt={test:Bt("hsl","hue"),parse:qt("hue","saturation","lightness"),transform:e=>{let{hue:t,saturation:n,lightness:r,alpha:a=1}=e;return"hsla("+Math.round(t)+", "+$t.transform(Dt(n))+", "+$t.transform(Dt(r))+", "+Dt(Mt.transform(a))+")"}},Qt={test:e=>Vt.test(e)||Ht.test(e)||Jt.test(e),parse:e=>Vt.test(e)?Vt.parse(e):Jt.test(e)?Jt.parse(e):Ht.parse(e),transform:e=>"string"===typeof e?e:e.hasOwnProperty("red")?Vt.transform(e):Jt.transform(e),getAnimatableNone:e=>{const t=Qt.parse(e);return t.alpha=0,Qt.transform(t)}},en=/(?:#[0-9a-f]{3,8}|(?:rgb|h[s\u017F]l)a?\((?:-?[\.0-9]+%?[\t-\r ,\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+){2}-?[\.0-9]+%?[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:[,\/][\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?(?:\b[0-9]+(?:\.[0-9]+)?|\.[0-9]+)?%?\))/gi;const tn="number",nn="color",rn=/var[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\([\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*--(?:[\x2D0-9A-Z_a-z\u017F\u212A]+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*|[\x2D0-9A-Z_a-z\u017F\u212A]+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*,(?:[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:(?![\t-\r \(\)\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uD800-\uDFFF\uFEFF])[^]|[\uD800-\uDBFF][\uDC00-\uDFFF])|[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\((?:(?:(?![\(\)\uD800-\uDFFF])[^]|[\uD800-\uDBFF][\uDC00-\uDFFF])|\((?:(?![\(\)\uD800-\uDFFF])[^]|[\uD800-\uDBFF][\uDC00-\uDFFF])*\))*\))+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)\)|#[0-9a-f]{3,8}|(?:rgb|h[s\u017F]l)a?\((?:-?[\.0-9]+%?[\t-\r ,\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+){2}-?[\.0-9]+%?[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:[,\/][\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?(?:\b[0-9]+(?:\.[0-9]+)?|\.[0-9]+)?%?\)|-?(?:[0-9]+(?:\.[0-9]+)?|\.[0-9]+)/gi;function an(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},a=[];let i=0;const s=t.replace(rn,e=>(Qt.test(e)?(r.color.push(i),a.push(nn),n.push(Qt.parse(e))):e.startsWith("var(")?(r.var.push(i),a.push("var"),n.push(e)):(r.number.push(i),a.push(tn),n.push(parseFloat(e))),++i,"${}")).split("${}");return{values:n,split:s,indexes:r,types:a}}function sn(e){return an(e).values}function on(e){const{split:t,types:n}=an(e),r=t.length;return e=>{let a="";for(let i=0;i<r;i++)if(a+=t[i],void 0!==e[i]){const t=n[i];a+=t===tn?Dt(e[i]):t===nn?Qt.transform(e[i]):e[i]}return a}}const ln=e=>"number"===typeof e?0:Qt.test(e)?Qt.getAnimatableNone(e):e;const cn={test:function(e){var t,n;return isNaN(e)&&"string"===typeof e&&((null===(t=e.match(It))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(en))||void 0===n?void 0:n.length)||0)>0},parse:sn,createTransformer:on,getAnimatableNone:function(e){const t=sn(e);return on(e)(t.map(ln))}},un=new Set(["brightness","contrast","saturate","opacity"]);function dn(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(It)||[];if(!r)return e;const a=n.replace(r,"");let i=un.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+a+")"}const hn=/\b([\x2Da-z]*)\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\)/g,fn=(0,o.A)((0,o.A)({},cn),{},{getAnimatableNone:e=>{const t=e.match(hn);return t?t.map(dn).join(" "):e}}),pn=(0,o.A)((0,o.A)({},cn),{},{getAnimatableNone:e=>{const t=cn.parse(e);return cn.createTransformer(e)(t.map(e=>"number"===typeof e?0:"object"===typeof e?(0,o.A)((0,o.A)({},e),{},{alpha:1}):e))}}),mn=(0,o.A)((0,o.A)({},Ft),{},{transform:Math.round}),gn={rotate:Gt,rotateX:Gt,rotateY:Gt,rotateZ:Gt,scale:Ot,scaleX:Ot,scaleY:Ot,scaleZ:Ot,skew:Gt,skewX:Gt,skewY:Gt,distance:Yt,translateX:Yt,translateY:Yt,translateZ:Yt,x:Yt,y:Yt,z:Yt,perspective:Yt,transformPerspective:Yt,opacity:Mt,originX:Zt,originY:Zt,originZ:Yt},vn=(0,o.A)((0,o.A)({borderWidth:Yt,borderTopWidth:Yt,borderRightWidth:Yt,borderBottomWidth:Yt,borderLeftWidth:Yt,borderRadius:Yt,borderTopLeftRadius:Yt,borderTopRightRadius:Yt,borderBottomRightRadius:Yt,borderBottomLeftRadius:Yt,width:Yt,maxWidth:Yt,height:Yt,maxHeight:Yt,top:Yt,right:Yt,bottom:Yt,left:Yt,inset:Yt,insetBlock:Yt,insetBlockStart:Yt,insetBlockEnd:Yt,insetInline:Yt,insetInlineStart:Yt,insetInlineEnd:Yt,padding:Yt,paddingTop:Yt,paddingRight:Yt,paddingBottom:Yt,paddingLeft:Yt,paddingBlock:Yt,paddingBlockStart:Yt,paddingBlockEnd:Yt,paddingInline:Yt,paddingInlineStart:Yt,paddingInlineEnd:Yt,margin:Yt,marginTop:Yt,marginRight:Yt,marginBottom:Yt,marginLeft:Yt,marginBlock:Yt,marginBlockStart:Yt,marginBlockEnd:Yt,marginInline:Yt,marginInlineStart:Yt,marginInlineEnd:Yt,fontSize:Yt,backgroundPositionX:Yt,backgroundPositionY:Yt},gn),{},{zIndex:mn,fillOpacity:Mt,strokeOpacity:Mt,numOctaves:mn}),bn=(0,o.A)((0,o.A)({},vn),{},{color:Qt,backgroundColor:Qt,outlineColor:Qt,fill:Qt,stroke:Qt,borderColor:Qt,borderTopColor:Qt,borderRightColor:Qt,borderBottomColor:Qt,borderLeftColor:Qt,filter:fn,WebkitFilter:fn,mask:pn,WebkitMask:pn}),yn=e=>bn[e],xn=()=>({x:{min:0,max:0},y:{min:0,max:0}}),wn=e=>Boolean(e&&e.getVelocity),kn=new Set(["width","height","top","left","right","bottom",...Pt]),Nn=e=>t=>t.test(e),An=[Ft,Yt,$t,Gt,Xt,Kt,{test:e=>"auto"===e,parse:e=>e}],jn=e=>An.find(Nn(e));function _n(e,t){return t?"".concat(e,". For more information and steps for solving, visit https://motion.dev/troubleshooting/").concat(t):e}var Sn;let Cn=()=>{},En=()=>{};"undefined"!==typeof process&&"production"!==(null===(Sn={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:"443",FAST_REFRESH:!0,REACT_APP_BACKEND_URL:"https://nextgen-staging.emergent.host"})||void 0===Sn?void 0:Sn.NODE_ENV)&&(Cn=(e,t,n)=>{e||"undefined"===typeof console||console.warn(_n(t,n))},En=(e,t,n)=>{if(!e)throw new Error(_n(t,n))});const Ln=e=>/^-?(?:[0-9]+(?:\.[0-9]+)?|\.[0-9]+)$/.test(e),Pn=e=>t=>"string"===typeof t&&t.startsWith(e),Tn=Pn("--"),Rn=Pn("var(--"),Fn=e=>!!Rn(e)&&Mn.test(e.split("/*")[0].trim()),Mn=/var\(--(?:[\x2D0-9A-Z_a-z\u017F\u212A]+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*|[\x2D0-9A-Z_a-z\u017F\u212A]+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*,(?:[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:(?![\t-\r \(\)\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uD800-\uDFFF\uFEFF])[^]|[\uD800-\uDBFF][\uDC00-\uDFFF])|[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\((?:(?
2:(?![\(\)\uD800-\uDFFF])[^]|[\uD800-\uDBFF][\uDC00-\uDFFF])|\((?:(?![\(\)\uD800-\uDFFF])[^]|[\uD800-\uDBFF][\uDC00-\uDFFF])*\))*\))+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)\)$/i;function On(e){return"string"===typeof e&&e.split("/*")[0].includes("var(--")}const Dn=/^var\(--(?:([\x2D0-9A-Z_a-z]+)|([\x2D0-9A-Z_a-z]+), ?([ #%\(\),-\.0-9A-Za-z]+))\)/;function In(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;En(n<=4,'Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.'),"max-css-var-depth");const[r,a]=function(e){const t=Dn.exec(e);if(!t)return[,];const[,n,r,a]=t;return["--".concat(null!==n&&void 0!==n?n:r),a]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return Ln(e)?parseFloat(e):e}return Fn(a)?In(a,t,n+1):a}const zn=e=>180*e/Math.PI,Bn=e=>{const t=zn(Math.atan2(e[1],e[0]));return Un(t)},qn={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:Bn,rotateZ:Bn,skewX:e=>zn(Math.atan(e[1])),skewY:e=>zn(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},Un=e=>((e%=360)<0&&(e+=360),e),Vn=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Hn=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),Wn={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Vn,scaleY:Hn,scale:e=>(Vn(e)+Hn(e))/2,rotateX:e=>Un(zn(Math.atan2(e[6],e[5]))),rotateY:e=>Un(zn(Math.atan2(-e[2],e[0]))),rotateZ:Bn,rotate:Bn,skewX:e=>zn(Math.atan(e[4])),skewY:e=>zn(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Gn(e){return e.includes("scale")?1:0}function $n(e,t){if(!e||"none"===e)return Gn(t);const n=e.match(/^matrix3d\(([\t-\r ,-\.0-9e\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+)\)$/);let r,a;if(n)r=Wn,a=n;else{const t=e.match(/^matrix\(([\t-\r ,-\.0-9e\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+)\)$/);r=qn,a=t}if(!a)return Gn(t);const i=r[t],s=a[1].split(",").map(Yn);return"function"===typeof i?i(s):s[i]}function Yn(e){return parseFloat(e.trim())}const Kn=e=>e===Ft||e===Yt,Xn=new Set(["x","y","z"]),Zn=Pt.filter(e=>!Xn.has(e));const Jn={width:(e,t)=>{let{x:n}=e,{paddingLeft:r="0",paddingRight:a="0"}=t;return n.max-n.min-parseFloat(r)-parseFloat(a)},height:(e,t)=>{let{y:n}=e,{paddingTop:r="0",paddingBottom:a="0"}=t;return n.max-n.min-parseFloat(r)-parseFloat(a)},top:(e,t)=>{let{top:n}=t;return parseFloat(n)},left:(e,t)=>{let{left:n}=t;return parseFloat(n)},bottom:(e,t)=>{let{y:n}=e,{top:r}=t;return parseFloat(r)+(n.max-n.min)},right:(e,t)=>{let{x:n}=e,{left:r}=t;return parseFloat(r)+(n.max-n.min)},x:(e,t)=>{let{transform:n}=t;return $n(n,"x")},y:(e,t)=>{let{transform:n}=t;return $n(n,"y")}};Jn.translateX=Jn.x,Jn.translateY=Jn.y;const Qn=e=>e,er={},tr=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],nr={value:null,addProjectionMetrics:null};function rr(e,t){let n=!1,r=!0;const a={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=tr.reduce((e,n)=>(e[n]=function(e,t){let n=new Set,r=new Set,a=!1,i=!1;const s=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1},l=0;function c(t){s.has(t)&&(u.schedule(t),e()),l++,t(o)}const u={schedule:function(e){const t=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&a?n:r;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&s.add(e),t.has(e)||t.add(e),e},cancel:e=>{r.delete(e),s.delete(e)},process:e=>{o=e,a?i=!0:(a=!0,[n,r]=[r,n],n.forEach(c),t&&nr.value&&nr.value.frameloop[t].push(l),l=0,n.clear(),a=!1,i&&(i=!1,u.process(e)))}};return u}(i,t?n:void 0),e),{}),{setup:o,read:l,resolveKeyframes:c,preUpdate:u,update:d,preRender:h,render:f,postRender:p}=s,m=()=>{const i=er.useManualTiming?a.timestamp:performance.now();n=!1,er.useManualTiming||(a.delta=r?1e3/60:Math.max(Math.min(i-a.timestamp,40),1)),a.timestamp=i,a.isProcessing=!0,o.process(a),l.process(a),c.process(a),u.process(a),d.process(a),h.process(a),f.process(a),p.process(a),a.isProcessing=!1,n&&t&&(r=!1,e(m))},g=tr.reduce((t,i)=>{const o=s[i];return t[i]=function(t){let i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],s=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n||(n=!0,r=!0,a.isProcessing||e(m)),o.schedule(t,i,s)},t},{});return{schedule:g,cancel:e=>{for(let t=0;t<tr.length;t++)s[tr[t]].cancel(e)},state:a,steps:s}}const{schedule:ar,cancel:ir,state:sr,steps:or}=rr("undefined"!==typeof requestAnimationFrame?requestAnimationFrame:Qn,!0),lr=new Set;let cr=!1,ur=!1,dr=!1;function hr(){if(ur){const e=Array.from(lr).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;
2t.forEach(e=>{const t=function(e){const t=[];return Zn.forEach(n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();const t=n.get(e);t&&t.forEach(t=>{var n;let[r,a]=t;null===(n=e.getValue(r))||void 0===n||n.set(a)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}ur=!1,cr=!1,lr.forEach(e=>e.complete(dr)),lr.clear()}function fr(){lr.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(ur=!0)})}class pr{constructor(e,t,n,r,a){let i=arguments.length>5&&void 0!==arguments[5]&&arguments[5];this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(lr.add(this),cr||(cr=!0,ar.read(fr),ar.resolveKeyframes(hr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;if(null===e[0]){const a=null===r||void 0===r?void 0:r.get(),i=e[e.length-1];if(void 0!==a)e[0]=a;else if(n&&t){const r=n.readValue(t,i);void 0!==r&&null!==r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===a&&r.set(e[0])}!function(e){for(let n=1;n<e.length;n++){var t;null!==(t=e[n])&&void 0!==t||(e[n]=e[n-1])}}(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),lr.delete(this)}cancel(){"scheduled"===this.state&&(lr.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}const mr=e=>/^0(?:[\0-\x08\x0E-\x1F!-\x2D\/-\x9F\xA1-\u167F\u1681-\u1FFF\u200B-\u2027\u202A-\u202E\u2030-\u205E\u2060-\u2FFF\u3001-\uD7FF\uE000-\uFEFE\uFF00-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+$/.test(e);function gr(e){return"number"===typeof e?0===e:null===e||("none"===e||"0"===e||mr(e))}const vr=new Set([fn,pn]);function br(e,t){let n=yn(e);return vr.has(n)||(n=cn),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const yr=new Set(["auto","none","0"]);class xr extends pr{constructor(e,t,n,r,a){super(e,t,n,r,a,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let o=0;o<e.length;o++){let n=e[o];if("string"===typeof n&&(n=n.trim(),Fn(n))){const r=In(n,t.current);void 0!==r&&(e[o]=r),o===e.length-1&&(this.finalKeyframe=n)}}if(this.resolveNoneKeyframes(),!kn.has(n)||2!==e.length)return;const[r,a]=e,i=jn(r),s=jn(a);if(On(r)!==On(a)&&Jn[n])this.needsMeasurement=!0;else if(i!==s)if(Kn(i)&&Kn(s))for(let o=0;o<e.length;o++){const t=e[o];"string"===typeof t&&(e[o]=parseFloat(t))}else Jn[n]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let r=0;r<e.length;r++)(null===e[r]||gr(e[r]))&&n.push(r);n.length&&function(e,t,n){let r,a=0;for(;a<e.length&&!r;){const t=e[a];"string"===typeof t&&!yr.has(t)&&an(t).values.length&&(r=e[a]),a++}if(r&&n)for(const i of t)e[i]=br(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Jn[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const a=t.getValue(n);a&&a.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=Jn[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),null!==(e=this.removedTransforms)&&void 0!==e&&e.length&&this.removedTransforms.forEac
2h(e=>{let[n,r]=e;t.getValue(n).set(r)}),this.resolveNoneKeyframes()}}const wr=e=>1e3*e,kr=e=>e/1e3;function Nr(e,t){-1===e.indexOf(t)&&e.push(t)}function Ar(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class jr{constructor(){this.subscriptions=[]}add(e){return Nr(this.subscriptions,e),()=>Ar(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let a=0;a<r;a++){const r=this.subscriptions[a];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function _r(e){let t;return()=>(void 0===t&&(t=e()),t)}const Sr={};function Cr(e,t){const n=_r(e);return()=>{var e;return null!==(e=Sr[t])&&void 0!==e?e:n()}}const Er=Cr(()=>void 0!==window.ScrollTimeline,"scrollTimeline"),Lr=e=>null!==e;function Pr(e,t,n){let{repeat:r,repeatType:a="loop"}=t,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;const s=e.filter(Lr),o=i<0||r&&"loop"!==a&&r%2===1?0:s.length-1;return o&&void 0!==n?n:s[o]}class Tr{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}const Rr={layout:0,mainThread:0,waapi:0},Fr=e=>Array.isArray(e)&&"number"===typeof e[0],Mr=Cr(()=>{try{document.createElement("div").animate({opacity:0}
2,{easing:"linear(0, 1)"})}catch(jf){return!1}return!0},"linearEasing"),Or=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r="";const a=Math.max(Math.round(t/n),2);for(let i=0;i<a;i++)r+=Math.round(1e4*e(i/(a-1)))/1e4+", ";return"linear(".concat(r.substring(0,r.length-2),")")},Dr=e=>{let[t,n,r,a]=e;return"cubic-bezier(".concat(t,", ").concat(n,", ").concat(r,", ").concat(a,")")},Ir={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dr([0,.65,.55,1]),circOut:Dr([.55,0,1,.45]),backIn:Dr([.31,.01,.66,-.59]),backOut:Dr([.33,1.53,.69,.99])};function zr(e,t){return e?"function"===typeof e?Mr()?Or(e,t):"ease-out":Fr(e)?Dr(e):Array.isArray(e)?e.map(e=>zr(e,t)||Ir.easeOut):Ir[e]:void 0}function Br(e,t,n){let{delay:r=0,duration:a=300,repeat:i=0,repeatType:s="loop",ease:o="easeOut",times:l}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},c=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0;const u={[t]:n};l&&(u.offset=l);const d=zr(o,a);Array.isArray(d)&&(u.easing=d),nr.value&&Rr.waapi++;const h={delay:r,duration:a,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:"reverse"===s?"alternate":"normal"};c&&(h.pseudoElement=c);const f=e.animate(u,h);return nr.value&&f.finished.finally(()=>{Rr.waapi--}),f}function qr(e){return"function"===typeof e&&"applyToOptions"in e}const Ur=["type"];class Vr extends Tr{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:t,name:n,keyframes:r,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:o,onComplete:l}=e;this.isPseudoElement=Boolean(a),this.allowFlatten=i,this.options=e,En("string"!==typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const c=function(e){let{type:t}=e,n=(0,s.A)(e,Ur);return qr(t)&&Mr()?t.applyToOptions(n):(null!==(r=n.duration)&&void 0!==r||(n.duration=300),null!==(a=n.ease)&&void 0!==a||(n.ease="easeOut"),n);var r,a}(e);this.animation=Br(t,n,r,c,a),!1===c.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){const e=Pr(r,this.options,o,this.speed);this.updateMotionValue?this.updateMotionValue(e):function(e,t,n){(e=>e.startsWith("--"))(t)?e.style.setProperty(t,n):e.style[t]=n}(t,n,e),this.animation.cancel()}null===l||void 0===l||l(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){var e,t;null===(e=(t=this.animation).finish)||void 0===e||e.call(t)}cancel(){try{this.animation.cancel()}catch(jf){}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){var e;const t=null===(e=this.options)||void 0===e?void 0:e.element;var n,r;!this.isPseudoElement&&null!==t&&void 0!==t&&t.isConnected&&(null===(n=(r=this.animation).commitStyles)||void 0===n||n.call(r))}get duration(){var e,t;const n=(null===(e=this.animation.effect)||void 0===e||null===(t=e.getComputedTiming)||void 0===t?void 0:t.call(e).duration)||0;return kr(Number(n))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+kr(e)}get time(){return kr(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=wr(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){var e;return null!==(e=this.manualStartTime)&&void 0!==e?e:Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline(e){let{timeline:t,observe:n}=e;var r;this.allowFlatten&&(null===(r=this.animation.effect)||void 0===r||r.updateTiming({easing:"linear"}));return this.animation.onfinish=null,t&&Er()?(this.animation.timeline=t,Qn):n(this)}}const Hr=new Set(["opacity","clipPath","filter","transform"]),{schedule:Wr,cancel:Gr}=rr(queueMicrotask,!1);let $r;function Yr(){$r=void 0}const Kr={now:()=>(void 0===$r&&Kr.set(sr.isProcessing||er.useManualTiming?sr.timestamp:performance.now()),$r),set:e=>{$r=e,queueMicrotask(Yr)}};function Xr(e,t){return t?e*(1e3/t):0}const Zr={current:void 0};class Jr{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{const t=Kr.now();var n;if((this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev)&&(null===(n=this.events.change)||void 0===n||n.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Kr.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.current;this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new jr);const n=this.events[e].add(t);return"change"===e?()=>{n(),ar.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}
2setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){var e;null===(e=this.events.change)||void 0===e||e.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return Zr.current&&Zr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Kr.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Xr(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){var e,t;null===(e=this.dependents)||void 0===e||e.clear(),null===(t=this.events.destroy)||void 0===t||t.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Qr(e,t){return new Jr(e,t)}const ea=[...An,Qt,cn],ta=new WeakMap;function na(e){return null!==e&&"object"===typeof e&&"function"===typeof e.start}function ra(e){return"string"===typeof e||Array.isArray(e)}const aa=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],ia=["initial",...aa];function sa(e){return na(e.animate)||ia.some(t=>ra(e[t]))}function oa(e){return Boolean(sa(e)||e.variants)}const la={current:null},ca={current:!1},ua="undefined"!==typeof window;function da(e){const t=[{},{}];return null===e||void 0===e||e.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function ha(e,t,n,r){if("function"===typeof t){const[a,i]=da(r);t=t(void 0!==n?n:e.custom,a,i)}if("string"===typeof t&&(t=e.variants&&e.variants[t]),"function"===typeof t){const[a,i]=da(r);t=t(void 0!==n?n:e.custom,a,i)}return t}const fa=["willChange"],pa=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ma={};function ga(e){ma=e}class va{scrapeMotionValuesFromProps(e,t,n){return{}}constructor(e){let{parent:t,props:n,presenceContext:r,reducedMotionConfig:a,skipAnimations:i,blockInitialAnimation:l,visualState:c}=e,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=pr,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const e=Kr.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,ar.render(this.render,!1,!0))};const{latestValues:d,renderState:h}=c;this.latestValues=d,this.baseTarget=(0,o.A)({},d),this.initialValues=n.initial?(0,o.A)({},d):{},this.renderState=h,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=a,this.skipAnimationsConfig=i,this.options=u,this.blockInitialAnimation=Boolean(l),this.isControllingVariants=sa(n),this.isVariantNode=oa(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const f=this.scrapeMotionValuesFromProps(n,{},this),{willChange:p}=f,m=(0,s.A)(f,fa);for(const s in m){const e=m[s];void 0!==d[s]&&wn(e)&&e.set(d[s])}}mount(e){var t,n;if(this.hasBeenMounted)for(const a in this.initialValues){var r;null===(r=this.values.get(a))||void 0===r||r.jump(this.initialValues[a]),this.latestValues[a]=this.initialValues[a]}this.current=e,ta.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEac
2h((e,t)=>this.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(ca.current||function(){if(ca.current=!0,ua)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>la.current=e.matches;e.addEventListener("change",t),t()}else la.current=!1}(),this.shouldReduceMotion=la.current),this.shouldSkipAnimations=null!==(t=this.skipAnimationsConfig)&&void 0!==t&&t,null===(n=this.parent)||void 0===n||n.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){var e;this.projection&&this.projection.unmount(),ir(this.notifyUpdate),ir(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),null===(e=this.parent)||void 0===e||e.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}addChild(e){var t;this.children.add(e),null!==(t=this.enteringChildren)&&void 0!==t||(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,t){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),t.accelerate&&Hr.has(e)&&this.current instanceof HTMLElement){const{factory:n,keyframes:r,times:a,ease:i,duration:s}=t.accelerate,o=new Vr({element:this.current,name:e,keyframes:r,times:a,ease:i,duration:wr(s)}),l=n(o);return void this.valueSubscriptions.set(e,()=>{l(),o.cancel()})}const n=Tt.has(e);n&&this.onBindTransform&&this.onBindTransform();const r=t.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&ar.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let a;"undefined"!==typeof window&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),a&&a(),t.owner&&t.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in ma){const t=ma[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let n=0;n<pa.length;n++){const t=pa[n];this.propEventSubscriptions[t]&&(this.propEventSubscriptions[t](),delete this.propEventSubscriptions[t]);const r=e["on"+t];r&&(this.propEventSubscriptions[t]=this.on(t,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const a=t[r],i=n[r];if(wn(a))e.addValue(r,a);else if(wn(i))e.addValue(r,Qr(a,{owner:e}));else if(i!==a)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(a):t.hasAnimated||t.set(a)}else{const t=e.getStaticValue(r);e.addValue(r,Qr(void 0!==t?t:a,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Qr(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];var a;return void 0!==r&&null!==r&&("string"===typeof r&&(Ln(r)||mr(r))?r=parseFloat(r):(a=r,!ea.find(Nn(a))&&cn.test(t)&&(r=br(e,t))),this.setBaseTarget(e,wn(r)?r.get():r)),wn(r)?r.get():r}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){const{initial:t}=this.props;let n;if("string"===typeof t||"object"===typeof t){var r;const a=ha(this.props,t,null===(r=this.presenceContext)||void 0===r?void 0:r.custom);a&&(n=a[e])}if(t&&void 0!==n)return n;const a=this.getBaseTargetFromProps(this.props,e);return void 0===a||wn(a)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:a}on(e,t){return this.events[e]||(this.events[e]=new jr),this.events[e].add(t)}notify(e){if(this.events[e]){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];this.events[e].notify(...n)}}scheduleRenderMicrotask(){Wr.render(this.render)}}class ba extends va{constructor(){super(...arguments),this.KeyframeResolver=xr}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){const n=e.style;return n?n[t]:void 0}removeValueFromRenderState(e,t){let{vars:n,style:r}=t;delete n[e],delete r[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;wn(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent="".concat(e))}))}}function ya(e){return e.replace(/([A-Z])/g,e=>"-".concat(e.toLowerCase()))}const xa=(e,t)=>t&&"number"===typeof e?t.transform(e):e,wa={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ka=Pt.length;function Na(e,t,n){const{style:r,vars:a,transformOrigin:i}=e;let s=!1,o=!1;for(const l in t){const e=t[l];if(Tt.has(l))s=!0;else if(Tn(l))a[l]=e;else{const t=xa(e,vn[l]);l.startsWith("origin")?(o=!0,i[l]=t):r[l]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",a=!0;for(let i=0;i<ka;i++){const s=Pt[i],o=e[s];if(void 0===o)continue;let l=!0;if("number"===typeof o)l=o===(s.startsWith("scale")?1:0);else{const e=parseFloat(o);l=s.startsWith("scale")?1===e:0===e}if(!l||n){const e=xa(o,vn[s]);l||(a=!1,r+="".concat(wa[s]||s,"(").concat(e,") ")),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,a?"":r):a&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),o){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin="".concat(e," ").concat(t," ").concat(n)}}const Aa={offset:"stroke-dashoffset",array:"stroke-dasharray"},ja={offset:"strokeDashoffset",array:"strokeDasharray"};const _a=["attrX","attrY","attrScale","pathLength","pathSpacing","pathOffset"],Sa=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ca(e,t,n,r,a){let{attrX:i,attrY:o,attrScale:l,pathLength:c,pathSpacing:u=1,pathOffset:d=0}=t;if(Na(e,(0,s.A)(t,_a),r),n)return void(e.style.viewBox&&(e.attrs.viewB
2ox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:f}=e;var p,m;(h.transform&&(f.transform=h.transform,delete h.transform),f.transform||h.transformOrigin)&&(f.transformOrigin=null!==(p=h.transformOrigin)&&void 0!==p?p:"50% 50%",delete h.transformOrigin);f.transform&&(f.transformBox=null!==(m=null===a||void 0===a?void 0:a.transformBox)&&void 0!==m?m:"fill-box",delete h.transformBox);for(const s of Sa)void 0!==h[s]&&(f[s]=h[s],delete h[s]);void 0!==i&&(h.x=i),void 0!==o&&(h.y=o),void 0!==l&&(h.scale=l),void 0!==c&&function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];e.pathLength=1;const i=a?Aa:ja;e[i.offset]="".concat(-r),e[i.array]="".concat(t," ").concat(n)}(h,c,u,d,!1)}const Ea=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]),La=e=>"string"===typeof e&&"svg"===e.toLowerCase();function Pa(e,t,n,r){let{style:a,vars:i}=t;const s=e.style;let o;for(o in a)s[o]=a[o];for(o in null===r||void 0===r||r.applyProjectionStyles(s,n),i)s.setProperty(o,i[o])}function Ta(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Ra={correct:(e,t)=>{if(!t.target)return e;if("string"===typeof e){if(!Yt.test(e))return e;e=parseFloat(e)}const n=Ta(e,t.target.x),r=Ta(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},Fa=(e,t,n)=>e+(t-e)*n,Ma={correct:(e,t)=>{let{treeScale:n,projectionDelta:r}=t;const a=e,i=cn.parse(e);if(i.length>5)return a;const s=cn.createTransformer(e),o="number"!==typeof i[0]?1:0,l=r.x.scale*n.x,c=r.y.scale*n.y;i[0+o]/=l,i[1+o]/=c;const u=Fa(l,c,.5);return"number"===typeof i[2+o]&&(i[2+o]/=u),"number"===typeof i[3+o]&&(i[3+o]/=u),s(i)}},Oa={borderRadius:(0,o.A)((0,o.A)({},Ra),{},{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Ra,borderTopRightRadius:Ra,borderBottomLeftRadius:Ra,borderBottomRightRadius:Ra,boxShadow:Ma};function Da(e,t){let{layout:n,layoutId:r}=t;return Tt.has(e)||e.startsWith("origin")||(n||void 0!==r)&&(!!Oa[e]||"opacity"===e)}function Ia(e,t,n){const r=e.style,a=null===t||void 0===t?void 0:t.style,i={};if(!r)return i;for(const o in r){var s;(wn(r[o])||a&&wn(a[o])||Da(o,e)||void 0!==(null===n||void 0===n||null===(s=n.getValue(o))||void 0===s?void 0:s.liveStyle))&&(i[o]=r[o])}return i}function za(e,t,n){const r=Ia(e,t,n);for(const a in e)if(wn(e[a])||wn(t[a])){r[-1!==Pt.indexOf(a)?"attr"+a.charAt(0).toUpperCase()+a.substring(1):a]=e[a]}return r}class Ba extends ba{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=xn}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Tt.has(t)){const e=yn(t);return e&&e.default||0}return t=Ea.has(t)?t:ya(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return za(e,t,n)}
2build(e,t,n){Ca(e,t,this.isSVGTag,n.transformTemplate,n.style)}renderInstance(e,t,n,r){!function(e,t,n,r){Pa(e,t,void 0,r);for(const a in t.attrs)e.setAttribute(Ea.has(a)?a:ya(a),t.attrs[a])}(e,t,0,r)}mount(e){this.isSVGTag=La(e.tagName),super.mount(e)}}function qa(e){let{top:t,left:n,right:r,bottom:a}=e;return{x:{min:n,max:r},y:{min:t,max:a}}}function Ua(e){return void 0===e||1===e}function Va(e){let{scale:t,scaleX:n,scaleY:r}=e;return!Ua(t)||!Ua(n)||!Ua(r)}function Ha(e){return Va(e)||Wa(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Wa(e){return Ga(e.x)||Ga(e.y)}function Ga(e){return e&&"0%"!==e}function $a(e,t,n){return n+t*(e-n)}function Ya(e,t,n,r,a){return void 0!==a&&(e=$a(e,a,r)),$a(e,n,r)+t}function Ka(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,a=arguments.length>4?arguments[4]:void 0;e.min=Ya(e.min,t,n,r,a),e.max=Ya(e.max,t,n,r,a)}function Xa(e,t){let{x:n,y:r}=t;Ka(e.x,n.translate,n.scale,n.originPoint),Ka(e.y,r.translate,r.scale,r.originPoint)}const Za=.999999999999,Ja=1.0000000000001;function Qa(e,t){e.min=e.min+t,e.max=e.max+t}function ei(e,t,n,r){let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5;Ka(e,t,n,Fa(e.min,e.max,a),r)}function ti(e,t){ei(e.x,t.x,t.scaleX,t.scale,t.originX),ei(e.y,t.y,t.scaleY,t.scale,t.originY)}function ni(e,t){return qa(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}class ri extends ba{constructor(){super(...arguments),this.type="html",this.renderInstance=Pa}readValueFromInstance(e,t){var n,r;if(Tt.has(t))return null!==(n=this.projection)&&void 0!==n&&n.isProjecting?Gn(t):((e,t)=>{const{transform:n="none"}=getComputedStyle(e);return $n(n,t)})(e,t);{const n=(r=e,window.getComputedStyle(r)),a=(Tn(t)?n.getPropertyValue(t):n[t])||0;return"string"===typeof a?a.trim():a}}measureInstanceViewportBox(e,t){let{transformPagePoint:n}=t;return ni(e,n)}build(e,t,n){Na(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return Ia(e,t,n)}}const ai=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ii(e){return"string"===typeof e&&!e.includes("-")&&!!(ai.indexOf(e)>-1||/[A-Z]/.test(e))}const si=(e,t)=>{var n;return(null!==(n=t.isSVG)&&void 0!==n?n:ii(e))?new Ba(t):new ri(t,{allowProjection:e!==r.Fragment})};var oi=n(579);const li=(0,r.createContext)({}),ci=(0,r.createContext)({strict:!1}),ui=(0,r.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),di=(0,r.createContext)({});function hi(e){const{initial:t,animate:n}=function(e,t){if(sa(e)){const{initial:t,animate:n}=e;return{initial:!1===t||ra(t)?t:void 0,animate:ra(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,r.useContext)(di));return(0,r.useMemo)(()=>({initial:t,animate:n}),[fi(t),fi(n)])}function fi(e){return Array.isArray(e)?e.join(" "):e}const pi=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function mi(e,t,n){for(const r in t)wn(t[r])||Da(r,n)||(e[r]=t[r])}function gi(e,t){const n={};return mi(n,e.style||{},e),Object.assign(n,function(e,t){let{transformTemplate:n}=e;return(0,r.useMemo)(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Na(e,t,n),Object.assign({},e.vars,e.style)},[t])}(e,t)),n}function vi(e,t){const n={},r=gi(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}const bi=()=>(0,o.A)((0,o.A)({},{style:{},transform:{},transformOrigin:{},vars:{}}),{},{attrs:{}});function yi(e,t,n,a){const i=(0,r.useMemo)(()=>{const n=bi();return Ca(n,t,La(a),e.transformTemplate,e.style),(0,o.A)((0,o.A)({},n.attrs),{},{style:(0,o.A)({},n.style)})},[t]);if(e.style){const t={};mi(t,e.style,e),i.style=(0,o.A)((0,o.A)({},t),i.style)}return i}const xi=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function wi(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||xi.has(e)}let ki=e=>!wi(e);try{"function"===typeof(Ni=require("@emotion/is-prop-valid").default)&&(ki=e=>e.startsWith("on")?!wi(e):Ni(e))}catch(_f){}var Ni;function Ai(e,t,n,a,i){let{latestValues:s}=a,l=arguments.length>5&&void 0!==arguments[5]&&arguments[5],c=arguments.length>6?arguments[6]:void 0;
2const u=((null!==c&&void 0!==c?c:ii(e))?yi:vi)(t,s,i,e),d=function(e,t,n){const r={};for(const a in e)"values"===a&&"object"===typeof e.values||(ki(a)||!0===n&&wi(a)||!t&&!wi(a)||e.draggable&&a.startsWith("onDrag"))&&(r[a]=e[a]);return r}(t,"string"===typeof e,l),h=e!==r.Fragment?(0,o.A)((0,o.A)((0,o.A)({},d),u),{},{ref:n}):{},{children:f}=t,p=(0,r.useMemo)(()=>wn(f)?f.get():f,[f]);return(0,r.createElement)(e,(0,o.A)((0,o.A)({},h),{},{children:p}))}function ji(e){return wn(e)?e.get():e}const _i=(0,r.createContext)(null);const Si=["transitionEnd","transition"];function Ci(e,t,n,r){const a={},i=r(e,{});for(const s in i)a[s]=ji(i[s]);let{initial:o,animate:l}=e;const c=sa(e),u=oa(e);t&&u&&!c&&!1!==e.inherit&&(void 0===o&&(o=t.initial),void 0===l&&(l=t.animate));let d=!!n&&!1===n.initial;d=d||!1===o;const h=d?l:o;if(h&&"boolean"!==typeof h&&!na(h)){const t=Array.isArray(h)?h:[h];for(let n=0;n<t.length;n++){const r=ha(e,t[n]);if(r){const{transitionEnd:e,transition:t}=r,n=(0,s.A)(r,Si);for(const r in n){let e=n[r];if(Array.isArray(e)){e=e[d?e.length-1:0]}null!==e&&(a[r]=e)}for(const r in e)a[r]=e[r]}}}return a}const Ei=e=>(t,n)=>{const a=(0,r.useContext)(di),i=(0,r.useContext)(_i),s=()=>function(e,t,n,r){let{scrapeMotionValuesFromProps:a,createRenderState:i}=e;return{latestValues:Ci(t,n,r,a),renderState:i()}}(e,t,a,i);return n?s():function(e){const t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}(s)},Li=Ei({scrapeMotionValuesFromProps:Ia,createRenderState:pi}),Pi=Ei({scrapeMotionValuesFromProps:za,createRenderState:bi}),Ti="undefined"!==typeof window,Ri={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]};let Fi=!1;function Mi(){return function(){if(Fi)return;const e={};for(const t in Ri)e[t]={isEnabled:e=>Ri[t].some(t=>!!e[t])};ga(e),Fi=!0}(),ma}const Oi=Symbol.for("motionComponentSymbol");function Di(e,t,n){const a=(0,r.useRef)(n);(0,r.useInsertionEffect)(()=>{a.current=n});const i=(0,r.useRef)(null);return(0,r.useCallback)(n=>{var r;n&&(null===(r=e.onMount)||void 0===r||r.call(e,n));t&&(n?t.mount(n):t.unmount());const s=a.current;if("function"===typeof s)if(n){const e=s(n);"function"===typeof e&&(i.current=e)}else i.current?(i.current(),i.current=null):s(n);else s&&(s.current=n)},[t])}const Ii="data-"+ya("framerAppearId"),zi=(0,r.createContext)({});function Bi(e){return e&&"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const qi=Ti?r.useLayoutEffect:r.useEffect;function Ui(e,t,n,a,i,s){var o,l,c,u;const{visualElement:d}=(0,r.useContext)(di),h=(0,r.useContext)(ci),f=(0,r.useContext)(_i),p=(0,r.useContext)(ui),m=p.reducedMotion,g=p.skipAnimations,v=(0,r.useRef)(null),b=(0,r.useRef)(!1);a=a||h.renderer,!v.current&&a&&(v.current=a(e,{visualState:t,parent:d,props:n,presenceContext:f,blockInitialAnimation:!!f&&!1===f.initial,reducedMotionConfig:m,skipAnimations:g,isSVG:s}),b.current&&v.current&&(v.current.manuallyAnimateOnMount=!0));const y=v.current,x=(0,r.useContext)(zi);!y||y.projection||!i||"html"!==y.type&&"svg"!==y.type||function(e,t,n,r){const{layoutId:a,layout:i,drag:s,dragConstraints:o,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Vi(e.parent)),e.projection.setOptions({layoutId:a,layout:i,alwaysMeasureLayout:Boolean(s)||o&&Bi(o),visualElement:e,animationType:"string"===typeof i?i:"both",initialPromotionConfig:r,crossfade:u,layoutScroll:l,layoutRoot:c})}(v.current,n,i,x);const w=(0,r.useRef)(!1);(0,r.useInsertionEffect)(()=>{y&&w.current&&y.update(n,f)});const k=n[Ii],N=(0,r.useRef)(Boolean(k)&&!(null!==(o=(l=window).MotionHandoffIsComplete)&&void 0!==o&&o.call(l,k))&&(null===(c=(u=window).MotionHasOptimisedAnimation)||void 0===c?void 0:c.call(u,k)));return qi(()=>{b.current=!0,y&&(w.current=!0,window.MotionIsMounted=!0,y.updateFeatures(),y.scheduleRenderMicrotask(),N.current&&y.animationState&&y.animationState.animateChanges())}),(0,r.useEffect)(()=>{y&&(!N.current&&y.animationState&&y.animationState.animateChanges(),N.current&&(queueMicrotask(()=>{var e,t;null===(e=(t=window).MotionHandoffMarkAsComplete)||void 0===e||e.call(t,k)}),N.current=!1),y.enteringChildren=void 0)}),y}function Vi(e){if(e)return!1!==e.options.allowProjection?e.projection:Vi(e.parent)}function Hi(e){var t,n;
2let{forwardMotionProps:a=!1,type:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=arguments.length>2?arguments[2]:void 0,l=arguments.length>3?arguments[3]:void 0;s&&function(e){const t=Mi();for(const n in e)t[n]=(0,o.A)((0,o.A)({},t[n]),e[n]);ga(t)}(s);const c=i?"svg"===i:ii(e),u=c?Pi:Li;function d(t,n){let i;const s=(0,o.A)((0,o.A)((0,o.A)({},(0,r.useContext)(ui)),t),{},{layoutId:Wi(t)}),{isStatic:d}=s,h=hi(t),f=u(t,d);if(!d&&Ti){!function(){(0,r.useContext)(ci).strict;0}();const t=function(e){const t=Mi(),{drag:n,layout:r}=t;if(!n&&!r)return{};const a=(0,o.A)((0,o.A)({},n),r);return{MeasureLayout:null!==n&&void 0!==n&&n.isEnabled(e)||null!==r&&void 0!==r&&r.isEnabled(e)?a.MeasureLayout:void 0,ProjectionNode:a.ProjectionNode}}(s);i=t.MeasureLayout,h.visualElement=Ui(e,f,s,l,t.ProjectionNode,c)}return(0,oi.jsxs)(di.Provider,{value:h,children:[i&&h.visualElement?(0,oi.jsx)(i,(0,o.A)({visualElement:h.visualElement},s)):null,Ai(e,t,Di(f,h.visualElement,n),f,d,a,c)]})}d.displayName="motion.".concat("string"===typeof e?e:"create(".concat(null!==(t=null!==(n=e.displayName)&&void 0!==n?n:e.name)&&void 0!==t?t:"",")"));const h=(0,r.forwardRef)(d);return h[Oi]=e,h}function Wi(e){let{layoutId:t}=e;const n=(0,r.useContext)(li).id;return n&&void 0!==t?n+"-"+t:t}function Gi(e,t){if("undefined"===typeof Proxy)return Hi;const n=new Map,r=(n,r)=>Hi(n,r,e,t);return new Proxy((e,t)=>r(e,t),{get:(a,i)=>"create"===i?r:(n.has(i)||n.set(i,Hi(i,void 0,e,t)),n.get(i))})}class $i{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Yi(e,t,n){const r=e.getProps();return ha(r,t,void 0!==n?n:r.custom,e)}const Ki=["inherit"];function Xi(e,t){if(null!==e&&void 0!==e&&e.inherit&&t){const{inherit:n}=e,r=(0,s.A)(e,Ki);return(0,o.A)((0,o.A)({},t),r)}return e}function Zi(e,t){var n,r;const a=null!==(n=null!==(r=null===e||void 0===e?void 0:e[t])&&void 0!==r?r:null===e||void 0===e?void 0:e.default)&&void 0!==n?n:e;return a!==e?Xi(a,e):a}const Ji=e=>Array.isArray(e),Qi=["transitionEnd","transition"];
2function es(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Qr(n))}function ts(e){return Ji(e)?e[e.length-1]||0:e}function ns(e,t){const n=e.getValue("willChange");if(r=n,Boolean(wn(r)&&r.add))return n.add(t);if(!n&&er.WillChange){const n=new er.WillChange("auto");e.addValue("willChange",n),n.add(t)}var r}function rs(e){return e.props[Ii]}const as=(e,t)=>n=>t(e(n)),is=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(as)};function ss(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function os(e,t){return n=>n>0?t:e}const ls=(e,t,n)=>{const r=e*e,a=n*(t*t-r)+r;return a<0?0:Math.sqrt(a)},cs=[Ht,Vt,Jt];function us(e){const t=(n=e,cs.find(e=>e.test(n)));var n;if(Cn(Boolean(t),"'".concat(e,"' is not an animatable color. Use the equivalent color code instead."),"color-not-animatable"),!Boolean(t))return!1;let r=t.parse(e);return t===Jt&&(r=function(e){let{hue:t,saturation:n,lightness:r,alpha:a}=e;t/=360,n/=100,r/=100;let i=0,s=0,o=0;if(n){const e=r<.5?r*(1+n):r+n-r*n,a=2*r-e;i=ss(a,e,t+1/3),s=ss(a,e,t),o=ss(a,e,t-1/3)}else i=s=o=r;return{red:Math.round(255*i),green:Math.round(255*s),blue:Math.round(255*o),alpha:a}}(r)),r}const ds=(e,t)=>{const n=us(e),r=us(t);if(!n||!r)return os(e,t);const a=(0,o.A)({},n);return e=>(a.red=ls(n.red,r.red,e),a.green=ls(n.green,r.green,e),a.blue=ls(n.blue,r.blue,e),a.alpha=Fa(n.alpha,r.alpha,e),Vt.transform(a))},hs=new Set(["none","hidden"]);function fs(e,t){return n=>Fa(e,t,n)}function ps(e){return"number"===typeof e?fs:"string"===typeof e?Fn(e)?os:Qt.test(e)?ds:vs:Array.isArray(e)?ms:"object"===typeof e?Qt.test(e)?ds:gs:os}function ms(e,t){const n=[...e],r=n.length,a=e.map((e,n)=>ps(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=a[t](e);return n}}function gs(e,t){const n=(0,o.A)((0,o.A)({},e),t),r={};for(const a in n)void 0!==e[a]&&void 0!==t[a]&&(r[a]=ps(e[a])(e[a],t[a]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const vs=(e,t)=>{const n=cn.createTransformer(t),r=an(e),a=an(t);return r.indexes.var.length===a.indexes.var.length&&r.indexes.color.length===a.indexes.color.length&&r.indexes.number.length>=a.indexes.number.length?hs.has(e)&&!a.values.length||hs.has(t)&&!r.values.length?function(e,t){return hs.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):is(ms(function(e,t){const n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){var a;const s=t.types[i],o=e.indexes[s][r[s]],l=null!==(a=e.values[o])&&void 0!==a?a:0;n[i]=l,r[s]++}return n}(r,a),a.values),n):(Cn(!0,"Complex values '".concat(e,"' and '").concat(t,"' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition."),"complex-values-different"),os(e,t))};function bs(e,t,n){if("number"===typeof e&&"number"===typeof t&&"number"===typeof n)return Fa(e,t,n);return ps(e)(e,t)}const ys=e=>{const t=t=>{let{timestamp:n}=t;return e(n)};return{start:function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return ar.update(t,e)},stop:()=>ir(t),now:()=>sr.isProcessing?sr.timestamp:Kr.now()}},xs=2e4;function ws(e){let t=0;let n=e.next(t);for(;!n.done&&t<xs;)t+=50,n=e.next(t);return t>=xs?1/0:t}function ks(e,t,n){const r=Math.max(t-5,0);return Xr(n-e(r),t-r)}const Ns={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},As=.001;function js(e){let t,n,{duration:r=Ns.duration,bounce:a=Ns.bounce,velocity:i=Ns.velocity,mass:s=Ns.mass}=e;Cn(r<=wr(Ns.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let o=1-a;o=Rt(Ns.minDamping,Ns.maxDamping,o),r=Rt(Ns.minDuration,Ns.maxDuration,kr(r)),o<1?(t=e=>{const t=e*o,n=t*r,a=t-i,s=Ss(e,o),l=Math.exp(-n);return As-a/s*l},n=e=>{const n=e*o*r,a=n*i+i,s=Math.pow(o,2)*Math.pow(e,2)*r,l=Math.exp(-n),c=Ss(Math.pow(e,2),o);return(-t(e)+As>0?-1:1)*((a-s)*l)/c}):(t=e=>Math.exp(-e*r)*((e-i)*r+1)-.001,n=e=>Math.exp(-e*r)*(r*r*(i-e)));const l=function(e,t,n){let r=n;for(let a=1;a<_s;a++)r-=e(r)/t(r);return r}(t,n,5/r);if(r=wr(r),isNaN(l))return{stiffness:Ns.stiffness,damping:Ns.damping,duration:r};{const e=Math.pow(l,2)*s;return{stiffness:e,damping:2*o*Math.sqrt(s*e),duration:r}}}const _s=12;function Ss(e,t){return e*Math.sqrt(1-t*t)}const Cs=["duration","bounce"],Es=["stiffness","damping","mass"];function Ls(e,t){return t.some(t=>void 0!==e[t])}function Ps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ns.visualDuration,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ns.bounce;const n="object"!==typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:a}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],l={done:!1,value:i},{stiffness:c,damping:u,mass:d,duration:h,velocity:f,isResolvedFromDuration:p}=function(e){let t=(0,o.A)({velocity:Ns.velocity,stiffness:Ns.stiffness,damping:Ns.damping,mass:Ns.mass,isResolvedFromDuration:!1},e);if(!Ls(e,Es)&&Ls(e,Cs))if(t.velocity=0,e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),a=r*r,i=2*Rt(.05,1,1-(e.bounce||0))*Math.sqrt(a);t=(0,o.A)((0,o.A)({},t),{},{mass:Ns.mass,stiffness:a,damping:i})}else{const n=js((0,o.A)((0,o.A)({},e),{},{velocity:0}));t=(0,o.A)((0,o.A)((0,o.A)({},t),n),{},{mass:Ns.mass}),t.isResolvedFromDuration=!0}return t}((0,o.A)((0,o.A)({},n),{},{velocity:-kr(n.velocity||0)}
2)),m=f||0,g=u/(2*Math.sqrt(c*d)),v=s-i,b=kr(Math.sqrt(c/d)),y=Math.abs(v)<5;let x;if(r||(r=y?Ns.restSpeed.granular:Ns.restSpeed.default),a||(a=y?Ns.restDelta.granular:Ns.restDelta.default),g<1){const e=Ss(b,g);x=t=>{const n=Math.exp(-g*b*t);return s-n*((m+g*b*v)/e*Math.sin(e*t)+v*Math.cos(e*t))}}else if(1===g)x=e=>s-Math.exp(-b*e)*(v+(m+b*v)*e);else{const e=b*Math.sqrt(g*g-1);x=t=>{const n=Math.exp(-g*b*t),r=Math.min(e*t,300);return s-n*((m+g*b*v)*Math.sinh(r)+e*v*Math.cosh(r))/e}}const w={calculatedDuration:p&&h||null,next:e=>{const t=x(e);if(p)l.done=e>=h;else{let n=0===e?m:0;g<1&&(n=0===e?wr(m):ks(x,e,t));const i=Math.abs(n)<=r,o=Math.abs(s-t)<=a;l.done=i&&o}return l.value=l.done?s:t,l},toString:()=>{const e=Math.min(ws(w),xs),t=Or(t=>w.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return w}function Ts(e){let{keyframes:t,velocity:n=0,power:r=.8,timeConstant:a=325,bounceDamping:i=10,bounceStiffness:s=500,modifyTarget:o,min:l,max:c,restDelta:u=.5,restSpeed:d}=e;const h=t[0],f={done:!1,value:h},p=e=>void 0===l?c:void 0===c||Math.abs(l-e)<Math.abs(c-e)?l:c;let m=r*n;const g=h+m,v=void 0===o?g:o(g);v!==g&&(m=v-h);const b=e=>-m*Math.exp(-e/a),y=e=>v+b(e),x=e=>{const t=b(e),n=y(e);f.done=Math.abs(t)<=u,f.value=f.done?v:n};let w,k;const N=e=>{var t;(t=f.value,void 0!==l&&t<l||void 0!==c&&t>c)&&(w=e,k=Ps({keyframes:[f.value,p(f.value)],velocity:ks(y,e,f.value),damping:i,stiffness:s,restDelta:u,restSpeed:d}))};return N(0),{calculatedDuration:null,next:e=>{let t=!1;return k||void 0!==w||(t=!0,x(e),N(e)),void 0!==w&&e>=w?k.next(e-w):(!t&&x(e),f)}}}Ps.applyToOptions=e=>{const t=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100;const n=(arguments.length>2?arguments[2]:void 0)((0,o.A)((0,o.A)({},e),{},{keyframes:[0,t]})),r=Math.min(ws(n),xs);return{type:"keyframes",ease:e=>n.next(r*e).value/t,duration:kr(r)}}(e,100,Ps);return e.ease=t.ease,e.duration=wr(t.duration),e.type="keyframes",e};const Rs=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Fs(e,t,n,r){if(e===t&&n===r)return Qn;const a=t=>function(e,t,n,r,a){let i,s,o=0;do{s=t+(n-t)/2,i=Rs(s,r,a)-e,i>0?n=s:t=s}while(Math.abs(i)>1e-7&&++o<12);return s}(t,0,1,e,n);return e=>0===e||1===e?e:Rs(a(e),t,r)}const Ms=Fs(.42,0,1,1),Os=Fs(0,0,.58,1),Ds=Fs(.42,0,.58,1),Is=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,zs=e=>t=>1-e(1-t),Bs=Fs(.33,1.53,.69,.99),qs=zs(Bs),Us=Is(qs),Vs=e=>(e*=2)<1?.5*qs(e):.5*(2-Math.pow(2,-10*(e-1))),Hs=e=>1-Math.sin(Math.acos(e)),Ws=zs(Hs),Gs=Is(Hs),$s={linear:Qn,easeIn:Ms,easeInOut:Ds,easeOut:Os,circIn:Hs,circInOut:Gs,circOut:Ws,backIn:qs,backInOut:Us,backOut:Bs,anticipate:Vs},Ys=e=>{if(Fr(e)){En(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");const[t,n,r,a]=e;return Fs(t,n,r,a)}return"string"===typeof e?(En(void 0!==$s[e],"Invalid easing type '".concat(e,"'"),"invalid-easing-type"),$s[e]):e},Ks=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r};function Xs(e,t){let{clamp:n=!0,ease:r,mixer:a}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=e.length;if(En(i===t.length,"Both input and output ranges must be the same length","range-length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=function(e,t,n){const r=[],a=n||er.mix||bs,i=e.length-1;for(let s=0;s<i;s++){let n=a(e[s],e[s+1]);if(t){const e=Array.isArray(t)?t[s]||Qn:t;n=is(e,n)}r.push(n)}return r}(t,r,a),l=o.length,c=n=>{if(s&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const a=Ks(e[r],e[r+1],n);return o[r](a)};return n?t=>c(Rt(e[0],e[i-1],t)):c}function Zs(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const a=Ks(0,t,r);e.push(Fa(n,1,a))}}(t,e.length-1),t}function Js(e){let{duration:t=300,keyframes:n,times:r,ease:a="easeInOut"}=e;const i=(e=>Array.isArray(e)&&"number"!==typeof e[0])(a)?a.map(Ys):Ys(a),s={done:!1,value:n[0]},o=function(e,t){return e.map(e=>e*t)}(r&&r.length===n.length?r:Zs(n),t),l=Xs(o,n,{ease:Array.isArray(i)?i:(c=n,u=i,c.map(()=>u||Ds).splice(0,c.length-1))});var c,u;return{calculatedDuration:t,next:e=>(s.value=l(e),s.done=e>=t,s)}}const Qs={decay:Ts,inertia:Ts,tween:Js,keyframes:Js,spring:Ps};function eo(e){"string"===typeof e.type&&(e.type=Qs[e.type])}const to=e=>e/100;class no extends Tr{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{var e,t;const{motionValue:n}=this.options;n&&n.updatedAt!==Kr.now()&&this.tick(Kr.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),null===(e=(t=this.options).onStop)||void 0===e||e.call(t))},Rr.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){const{options:e}=this;eo(e);const{type:t=Js,repeat:n=0,repeatDelay:r=0,repeatType:a,velocity:i=0}=e;let{keyframes:s}=e;const l=t||Js;l!==Js&&"number"!==typeof s[0]&&(this.mixKeyframes=is(to,bs(s[0],s[1])),s=[0,100]);const c=l((0,o.A)((0,o.A)({},e),{},{keyframes:s}
2));"mirror"===a&&(this.mirroredGenerator=l((0,o.A)((0,o.A)({},e),{},{keyframes:[...s].reverse(),velocity:-i}))),null===c.calculatedDuration&&(c.calculatedDuration=ws(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+r,this.totalDuration=this.resolvedDuration*(n+1)-r,this.generator=c}updateTime(e){const t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{generator:n,totalDuration:r,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:o}=this;if(null===this.startTime)return n.next(0);const{delay:l=0,keyframes:c,repeat:u,repeatType:d,repeatDelay:h,type:f,onUpdate:p,finalKeyframe:m}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-r/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);const g=this.currentTime-l*(this.playbackSpeed>=0?1:-1),v=this.playbackSpeed>=0?g<0:g>r;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=r);let b=this.currentTime,y=n;if(u){const e=Math.min(this.currentTime,r)/s;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,u+1);Boolean(t%2)&&("reverse"===d?(n=1-n,h&&(n-=h/s)):"mirror"===d&&(y=i)),b=Rt(0,1,n)*s}const x=v?{done:!1,value:c[0]}:y.next(b);a&&(x.value=a(x.value));let{done:w}=x;v||null===o||(w=this.playbackSpeed>=0?this.currentTime>=r:this.currentTime<=0);const k=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return k&&f!==Ts&&(x.value=Pr(c,this.options,m,this.speed)),p&&p(x.value),k&&this.finish(),x}then(e,t){return this.finished.then(e,t)}get duration(){return kr(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+kr(e)}get time(){return kr(this.currentTime)}set time(e){var t;e=wr(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),null===(t=this.driver)||void 0===t||t.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(Kr.now());const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=kr(this.currentTime))}play(){var e,t;if(this.isStopped)return;const{driver:n=ys,startTime:r}=this.options;this.driver||(this.driver=n(e=>this.tick(e))),null===(e=(t=this.options).onPlay)||void 0===e||e.call(t);const a=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=a):null!==this.holdTime?this.startTime=a-this.holdTime:this.startTime||(this.startTime=null!==r&&void 0!==r?r:a),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Kr.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){var e,t;this.notifyFinished(),this.teardown(),this.state="finished",null===(e=(t=this.options).onComplete)||void 0===e||e.call(t)}cancel(){var e,t;this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),null===(e=(t=this.options).onCancel)||void 0===e||e.call(t)}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,Rr.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){var t;return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),null===(t=this.driver)||void 0===t||t.stop(),e.observe(this)}}const ro={anticipate:Vs,backInOut:Us,circInOut:Gs};function ao(e){"string"===typeof e.ease&&function(e){return e in ro}(e.ease)&&(e.ease=ro[e.ease])}const io=["motionValue","onUpdate","onComplete","element"];class so extends Vr{constructor(e){ao(e),eo(e),super(e),void 0!==e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const t=this.options,{motionValue:n,onUpdate:r,onComplete:a,element:i}=t,l=(0,s.A)(t,io);if(!n)return;if(void 0!==e)return void n.set(e);const c=new no((0,o.A)((0,o.A)({},l),{},{autoplay:!1})),u=Math.max(10,Kr.now()-this.startTime),d=Rt(0,10,u-10);n.setWithVelocity(c.sample(Math.max(0,u-d)).value,c.sample(u).value,d),c.stop()}}const oo=(e,t)=>"zIndex"!==t&&(!("number"!==typeof e&&!Array.isArray(e))||!("string"!==typeof e||!cn.test(e)&&"0"!==e||e.startsWith("url(")));function lo(e){e.duration=0,e.type="keyframes"}const co=new Set(["opacity","clipPath","filter","transform"]),uo=_r(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const ho=["autoplay","delay","type","repeat","repeatDelay","repeatType","keyframes","name","motionValue","element"];class fo extends Tr{constructor(e){var t;let{autoplay:n=!0,delay:r=0,type:a="keyframes",repeat:i=0,repeatDelay:l=0,repeatType:c="loop",keyframes:u,n
2ame:d,motionValue:h,element:f}=e,p=(0,s.A)(e,ho);super(),this.stop=()=>{var e,t;this._animation&&(this._animation.stop(),null===(t=this.stopTimeline)||void 0===t||t.call(this));null===(e=this.keyframeResolver)||void 0===e||e.cancel()},this.createdAt=Kr.now();const m=(0,o.A)({autoplay:n,delay:r,type:a,repeat:i,repeatDelay:l,repeatType:c,name:d,motionValue:h,element:f},p),g=(null===f||void 0===f?void 0:f.KeyframeResolver)||pr;this.keyframeResolver=new g(u,(e,t,n)=>this.onKeyframesResolved(e,t,m,!n),d,h,f),null===(t=this.keyframeResolver)||void 0===t||t.scheduleResolve()}onKeyframesResolved(e,t,n,r){var a;this.keyframeResolver=void 0;const{name:i,type:s,velocity:l,delay:c,isHandoff:u,onUpdate:d}=n;this.resolvedAt=Kr.now(),function(e,t,n,r){const a=e[0];if(null===a)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],s=oo(a,t),o=oo(i,t);return Cn(s===o,"You are trying to animate ".concat(t,' from "').concat(a,'" to "').concat(i,'". "').concat(s?i:a,'" is not an animatable value.'),"value-not-animatable"),!(!s||!o)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||qr(n))&&r)}(e,i,s,l)||(!er.instantAnimations&&c||null===d||void 0===d||d(Pr(e,n,t)),e[0]=e[e.length-1],lo(n),n.repeat=0);const h=r?this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt:void 0,f=(0,o.A)((0,o.A)({startTime:h,finalKeyframe:t},n),{},{keyframes:e}),p=!u&&function(e){var t;const{motionValue:n,name:r,repeatDelay:a,repeatType:i,damping:s,type:o}=e;if(!((null===n||void 0===n||null===(t=n.owner)||void 0===t?void 0:t.current)instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return uo()&&r&&co.has(r)&&("transform"!==r||!c)&&!l&&!a&&"mirror"!==i&&0!==s&&"inertia"!==o}(f),m=null===(a=f.motionValue)||void 0===a||null===(a=a.owner)||void 0===a?void 0:a.current,g=p?new so((0,o.A)((0,o.A)({},f),{},{element:m})):new no(f);g.finished.then(()=>{this.notifyFinished()}).catch(Qn),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){var e;this._animation||(null===(e=this.keyframeResolver)||void 0===e||e.resume(),dr=!0,fr(),hr(),dr=!1);return this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){var e;this._animation&&this.animation.cancel(),null===(e=this.keyframeResolver)||void 0===e||e.cancel()}}const po={type:"spring",stiffness:500,damping:25,restSpeed:10},mo={type:"keyframes",duration:.8},go={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},vo=(e,t)=>{let{keyframes:n}=t;return n.length>2?mo:Tt.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===n[1]?2*Math.sqrt(550):30,restSpeed:10}:po:go},bo=e=>null!==e;const yo=["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"];const xo=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0;return l=>{const c=Zi(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d-=wr(u);const h=(0,o.A)((0,o.A)({keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity()},c),{},{delay:-d,onUpdate:e=>{t.set(e),c.onUpdate&&c.onUpdate(e)},onComplete:()=>{l(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:i?void 0:a});(function(e){let{when:t,delay:n,delayChildren:r,staggerChildren:a,staggerDirection:i,repeat:o,repeatType:l,repeatDelay:c,from:u,elapsed:d}=e,h=(0,s.A)(e,yo);return!!Object.keys(h).length})(c)||Object.assign(h,vo(e,h)),h.duration&&(h.duration=wr(h.duration)),h.repeatDelay&&(h.repeatDelay=wr(h.repeatDelay)),void 0!==h.from&&(h.keyframes[0]=h.from);let f=!1;if((!1===h.type||0===h.duration&&!h.repeatDelay)&&(lo(h),0===h.delay&&(f=!0)),(er.instantAnimations||er.skipAnimations||null!==a&&void 0!==a&&a.shouldSkipAnimations)&&(f=!0,lo(h),h.delay=0),h.allowFlatten=!c.type&&!c.ease,f&&!i&&void 0!==t.get()){const e=function(e,t,n){let{repeat:r,repeatType:a="loop"}=t;const i=e.filter(bo),s=r&&"loop"!==a&&r%2===1?0:i.length-1;return s&&void 0!==n?n:i[s]}(h.keyframes,c);if(void 0!==e)return void ar.update(()=>{h.onUpdate(e),h.onComplete()})}return c.isSync?new no(h):new fo(h)}},wo=["transition","transitionEnd"];function ko(e,t){let{protectedKeys:n,needsAnimating:r}=e;const a=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,a}function No(e,t){var n;let{delay:r=0,transitionOverride:a,type:i}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},{transition:l,transitionEnd:c}
2=t,u=(0,s.A)(t,wo);const d=e.getDefaultTransition();l=l?Xi(l,d):d;const h=null===(n=l)||void 0===n?void 0:n.reduceMotion;a&&(l=a);const f=[],p=i&&e.animationState&&e.animationState.getState()[i];for(const s in u){var m;const t=e.getValue(s,null!==(m=e.latestValues[s])&&void 0!==m?m:null),n=u[s];if(void 0===n||p&&ko(p,s))continue;const a=(0,o.A)({delay:r},Zi(l||{},s)),i=t.get();if(void 0!==i&&!t.isAnimating&&!Array.isArray(n)&&n===i&&!a.velocity)continue;let c=!1;if(window.MotionHandoffAnimation){const t=rs(e);if(t){const e=window.MotionHandoffAnimation(t,s,ar);null!==e&&(a.startTime=e,c=!0)}}ns(e,s);const d=null!==h&&void 0!==h?h:e.shouldReduceMotion;t.start(xo(s,t,n,d&&kn.has(s)?{type:!1}:a,e,c));const g=t.animation;g&&f.push(g)}if(c){const t=()=>ar.update(()=>{c&&function(e,t){let n=Yi(e,t)||{},{transitionEnd:r={},transition:a={}}=n,i=(0,s.A)(n,Qi);i=(0,o.A)((0,o.A)({},i),r);for(const s in i)es(e,s,ts(i[s]))}(e,c)});f.length?Promise.all(f).then(t):t()}return f}function Ao(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;const i=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),s=e.size,o=(s-1)*r;return"function"===typeof n?n(i,s):1===a?i*r:o-i*r}function jo(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const a=Yi(e,t,"exit"===r.type?null===(n=e.presenceContext)||void 0===n?void 0:n.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=a||{};r.transitionOverride&&(i=r.transitionOverride);const s=a?()=>Promise.all(No(e,a,r)):()=>Promise.resolve(),l=e.variantChildren&&e.variantChildren.size?function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const{delayChildren:a=0,staggerChildren:s,staggerDirection:l}=i;return function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,s=arguments.length>6?arguments[6]:void 0;const l=[];for(const c of e.variantChildren)c.notify("AnimationStart",t),l.push(jo(c,t,(0,o.A)((0,o.A)({},s),{},{delay:n+("function"===typeof r?0:r)+Ao(e.variantChildren,c,r,a,i)})).then(()=>c.notify("AnimationComplete",t)));return Promise.all(l)}(e,t,n,a,s,l,r)}:()=>Promise.resolve(),{when:c}=i;if(c){const[e,t]="beforeChildren"===c?[s,l]:[l,s];return e().then(()=>t())}return Promise.all([s(),l(r.delay)])}const _o=ia.length;function So(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&So(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<_o;n++){const r=ia[n],a=e.props[r];(ra(a)||!1===a)&&(t[r]=a)}return t}function Co(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Eo=["transition","transitionEnd"],Lo=[...aa].reverse(),Po=aa.length;function To(e){return t=>Promise.all(t.map(t=>{let{animation:n,options:r}=t;return function(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.notify("AnimationStart",t),Array.isArray(t)){const a=t.map(t=>jo(e,t,r));n=Promise.all(a)}else if("string"===typeof t)n=jo(e,t,r);else{const a="function"===typeof t?Yi(e,t,r.custom):t;n=Promise.all(No(e,a,r))}return n.then(()=>{e.notify("AnimationComplete",t)})}(e,n,r)}))}function Ro(e){let t=To(e),n=Oo(),r=!0;const a=t=>(n,r)=>{var a;const i=Yi(e,r,"exit"===t?null===(a=e.presenceContext)||void 0===a?void 0:a.custom:void 0);if(i){const{transition:e,transitionEnd:t}=i,r=(0,s.A)(i,Eo);n=(0,o.A)((0,o.A)((0,o.A)({},n),r),t)}return n};function i(i){const{props:s}=e,l=So(e.parent)||{},c=[],u=new Set;let d={},h=1/0;for(let t=0;t<Po;t++){const f=Lo[t],p=n[f],m=void 0!==s[f]?s[f]:l[f],g=ra(m),v=f===i?p.isActive:null;!1===v&&(h=t);let b=m===l[f]&&m!==s[f]&&g;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),p.protectedKeys=(0,o.A)({},d),!p.isActive&&null===v||!m&&!p.prevProp||na(m)||"boolean"===typeof m)continue;if("exit"===f&&p.isActive&&!0!==v){p.prevResolvedValues&&(d=(0,o.A)((0,o.A)({},d),p.prevResolvedValues));continue}const y=Fo(p.prevProp,m);let x=y||f===i&&p.isActive&&!b&&g||t>h&&g,w=!1;const k=Array.isArray(m)?m:[m];let N=k.reduce(a(f),{});!1===v&&(N={});const{prevResolvedValues:A={}}=p,j=(0,o.A)((0,o.A)({},A),N),_=t=>{x=!0,u.has(t)&&(w=!0,u.delete(t)),p.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in j){const t=N[e],n=A[e];
2if(d.hasOwnProperty(e))continue;let r=!1;r=Ji(t)&&Ji(n)?!Co(t,n):t!==n,r?void 0!==t&&null!==t?_(e):u.add(e):void 0!==t&&u.has(e)?_(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=N,p.isActive&&(d=(0,o.A)((0,o.A)({},d),N)),r&&e.blockInitialAnimation&&(x=!1);const S=b&&y;x&&(!S||w)&&c.push(...k.map(t=>{const n={type:f};if("string"===typeof t&&r&&!S&&e.manuallyAnimateOnMount&&e.parent){const{parent:r}=e,a=Yi(r,t);if(r.enteringChildren&&a){const{delayChildren:t}=a.transition||{};n.delay=Ao(r.enteringChildren,e,t)}}return{animation:t,options:n}}))}if(u.size){const t={};if("boolean"!==typeof s.initial){const n=Yi(e,Array.isArray(s.initial)?s.initial[0]:s.initial);n&&n.transition&&(t.transition=n.transition)}u.forEach(n=>{const r=e.getBaseTarget(n),a=e.getValue(n);a&&(a.liveStyle=!0),t[n]=null!==r&&void 0!==r?r:null}),c.push({animation:t})}let f=Boolean(c.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(f=!1),r=!1,f?t(c):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var a;if(n[t].isActive===r)return Promise.resolve();null===(a=e.variantChildren)||void 0===a||a.forEach(e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)}),n[t].isActive=r;const s=i(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Oo()}}}function Fo(e,t){return"string"===typeof t?t!==e:!!Array.isArray(t)&&!Co(t,e)}function Mo(){return{isActive:arguments.length>0&&void 0!==arguments[0]&&arguments[0],protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Oo(){return{animate:Mo(!0),whileInView:Mo(),whileHover:Mo(),whileTap:Mo(),whileDrag:Mo(),whileFocus:Mo(),exit:Mo()}}let Do=0;const Io={animation:{Feature:class extends $i{constructor(e){super(e),e.animationState||(e.animationState=Ro(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();na(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends $i{constructor(){super(...arguments),this.id=Do++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then(()=>{t(this.id)})}mount(){const{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}}},zo={x:!1,y:!1};function Bo(){return zo.x||zo.y}function qo(e){return[e("x"),e("y")]}function Uo(e){return e.max-e.min}function Vo(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;e.origin=r,e.originPoint=Fa(t.min,t.max,e.origin),e.scale=Uo(n)/Uo(t),e.translate=Fa(n.min,n.max,e.origin)-e.originPoint,(e.scale>=.9999&&e.scale<=1.0001||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Ho(e,t,n,r){Vo(e.x,t.x,n.x,r?r.originX:void 0),Vo(e.y,t.y,n.y,r?r.originY:void 0)}function Wo(e,t,n){e.min=n.min+t.min,e.max=e.min+Uo(t)}function Go(e,t,n){e.min=t.min-n.min,e.max=e.min+Uo(t)}function $o(e,t,n){Go(e.x,t.x,n.x),Go(e.y,t.y,n.y)}const Yo=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Ko=new Set(["INPUT","SELECT","TEXTAREA"]);function Xo(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!0};return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Zo(e){return"object"===typeof e&&null!==e}function Jo(e){return Zo(e)&&"ownerSVGElement"in e}function Qo(e,t,n){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"===typeof e){var r;let a=document;t&&(a=t.current);const i=null!==(r=null===n||void 0===n?void 0:n[e])&&void 0!==r?r:a.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e).filter(e=>null!=e)}const el=new WeakMap;let tl;const nl=(e,t,n)=>(r,a)=>a&&a[0]?a[0][e+"Size"]:Jo(r)&&"getBBox"in r?r.getBBox()[t]:r[n],rl=nl("inl
2ine","width","offsetWidth"),al=nl("block","height","offsetHeight");function il(e){var t;let{target:n,borderBoxSize:r}=e;null===(t=el.get(n))||void 0===t||t.forEach(e=>{e(n,{get width(){return rl(n,r)},get height(){return al(n,r)}})})}function sl(e){e.forEach(il)}function ol(e,t){tl||"undefined"!==typeof ResizeObserver&&(tl=new ResizeObserver(sl));const n=Qo(e);return n.forEach(e=>{var n;let r=el.get(e);r||(r=new Set,el.set(e,r)),r.add(t),null===(n=tl)||void 0===n||n.observe(e)}),()=>{n.forEach(e=>{const n=el.get(e);var r;(null===n||void 0===n||n.delete(t),null!==n&&void 0!==n&&n.size)||(null===(r=tl)||void 0===r||r.unobserve(e))})}}const ll=new Set;let cl;function ul(e){return ll.add(e),cl||(cl=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};ll.forEach(t=>t(e))},window.addEventListener("resize",cl)),()=>{ll.delete(e),ll.size||"function"!==typeof cl||(window.removeEventListener("resize",cl),cl=void 0)}}function dl(e,t){return"function"===typeof e?ul(e):ol(e,t)}const hl=e=>"mouse"===e.pointerType?"number"!==typeof e.button||e.button<=0:!1!==e.isPrimary;function fl(e){return{point:{x:e.pageX,y:e.pageY}}}function pl(e,t,n,r){return Xo(e,t,(e=>t=>hl(t)&&e(t,fl(t)))(n),r)}const ml=e=>{let{current:t}=e;return t?t.ownerDocument.defaultView:null},gl=(e,t)=>Math.abs(e-t);const vl=new Set(["auto","scroll"]);class bl{constructor(e,t){let{transformPagePoint:n,contextWindow:r=window,dragSnapToOrigin:a=!1,distanceThreshold:i=3,element:s}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=e=>{this.handleScroll(e.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=wl(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=gl(e.x,t.x),r=gl(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=this.distanceThreshold;if(!t&&!n)return;const{point:r}=e,{timestamp:a}=sr;this.history.push((0,o.A)((0,o.A)({},r),{},{timestamp:a}));const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=yl(t,this.transformPagePoint),ar.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:a}=this.handlers;if(!this.dragSnapToOrigin&&this.startEvent||a&&a(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=wl("pointercancel"===e.type?this.lastMoveEventInfo:yl(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!hl(e))return;this.dragSnapToOrigin=a,this.handlers=t,this.transformPagePoint=n,this.distanceThreshold=i,this.contextWindow=r||window;const l=yl(fl(e),this.transformPagePoint),{point:c}=l,{timestamp:u}=sr;this.history=[(0,o.A)((0,o.A)({},c),{},{timestamp:u})];const{onSessionStart:d}=t;d&&d(e,wl(l,this.history)),this.removeListeners=is(pl(this.contextWindow,"pointermove",this.handlePointerMove),pl(this.contextWindow,"pointerup",this.handlePointerUp),pl(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(e){let t=e.parentElement;for(;t;){const e=getComputedStyle(t);(vl.has(e.overflowX)||vl.has(e.overflowY))&&this.scrollPositions.set(t,{x:t.scrollLeft,y:t.scrollTop}),t=t.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const t=this.scrollPositions.get(e);if(!t)return;const n=e===window,r=n?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},a=r.x-t.x,i=r.y-t.y;0===a&&0===i||(n?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a,this.lastMoveEventInfo.point.y+=i):this.history.length>0&&(this.history[0].x-=a,this.history[0].y-=i),this.scrollPositions.set(e,r),ar.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),ir(this.updatePoint)}}function yl(e,t){return t?{point:t(e.point)}:e}function xl(e,t){return{x:e.x-t.x,y:e.y-t.y}}function wl(e,t){let{point:n}=e;return{point:n,delta:xl(n,Nl(t)),offset:xl(n,kl(t)),velocity:Al(t,.1)}}function kl(e){return e[0]}function Nl(e){return e[e.length-1]}function Al(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const a=Nl(e);for(;n>=0&&(r=e[n],!(a.timestamp-r.timestamp>wr(t)));)n--;if(!r)return{x:0,y:0};r===e[0]&&e.length>2&&a.timestamp-r.timestamp>2*wr(t)&&(r=e[1]);const i=kr(a.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const s={x:(a.x-r.x)/i,y:(a.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function jl(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function _l(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Sl=.35;function Cl(e,t,n){return{min:El(e,t),max:El(e,n)}}function El(e,t){return"number"===typeof e?e:e[t]||0}const Ll=new WeakMap;class Pl{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e){let{snapToCursor:t=!1,distanceThreshold:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{presenceContext:r}=this.visualElement;if(r&&!1===r.isPresent)return;const{dragSnapToOrigin:a}=this.getProps();this.panSession=new bl(e,{onSessionStart:e=>{t&&this.snapToCursor(fl(e).point),this.stopAnimation()},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:a}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?zo[i]?null:(zo[i]=!0,()=>{zo[i]=!1}):zo.x||zo.y?null:(zo.x=zo.y=!0,()=>{zo.x=zo.y=!1}),!this.openDragLock))return;var i;this.latestPointerEvent=e,this.latestPanInfo=t,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),qo(e=>{let t=this.getAxisMotionValue(e).get()||0;if($t.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];if(r){t=Uo(r)*(parseFloat(t)/100)}}}this.originPoint[e]=t}),a&&ar.update(()=>a(e,t),!1,!0),ns(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>
2{this.latestPointerEvent=e,this.latestPanInfo=t;const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:a,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(s),void(null!==this.currentDirection&&a&&a(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&ar.update(()=>i(e,t),!1,!0)},onSessionEnd:(e,t)=>{this.latestPointerEvent=e,this.latestPanInfo=t,this.stop(e,t),this.latestPointerEvent=null,this.latestPanInfo=null},resumeAnimation:()=>{const{dragSnapToOrigin:e}=this.getProps();(e||this.constraints)&&this.startAnimation({x:0,y:0})}},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:a,distanceThreshold:n,contextWindow:ml(this.visualElement),element:this.visualElement.current})}stop(e,t){const n=e||this.latestPointerEvent,r=t||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!r||!n)return;const{velocity:i}=r;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&ar.postRender(()=>s(n,r))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!Rl(e,r,this.currentDirection))return;const a=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,t,n){let{min:r,max:a}=t;return void 0!==r&&e<r?e=n?Fa(r,e,n.min):Math.max(e,r):void 0!==a&&e>a&&(e=n?Fa(a,e,n.max):Math.min(e,a)),e}(i,this.constraints[e],this.elastic[e])),a.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,a=this.constraints;t&&Bi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,t){let{top:n,left:r,bottom:a,right:i}=t;return{x:jl(e.x,r,i),y:jl(e.y,n,a)}}(r.layoutBox,t),this.elastic=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Sl;return!1===e?e=0:!0===e&&(e=Sl),{x:Cl(e,"left","right"),y:Cl(e,"top","bottom")}}(n),a!==this.constraints&&!Bi(t)&&r&&this.constraints&&!this.hasMutatedConstraints&&qo(e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!Bi(e))return!1;const n=e.current;En(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const a=function(e,t,n){const r=ni(e,n),{scroll:a}=t;return a&&(Qa(r.x,a.offset.x),Qa(r.y,a.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:_l(e.x,t.x),y:_l(e.y,t.y)}}(r.layout.layoutBox,a);if(t){const e=t(function(e){let{x:t,y:n}=e;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=qa(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},c=qo(s=>{if(!Rl(s,t,this.currentDirection))return;let c=l&&l[s]||{};i&&(c={min:0,max:0});const u=r?200:1e6,d=r?40:1e7,h=(0,o.A)((0,o.A)({type:"inertia",velocity:n?e[s]:0,bounceStiffness:u,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10},a),c);return this.startAxisValueAnimation(s,h)});return Promise.all(c).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return ns(this.visualElement,e),n.start(xo(e,n,0,t,this.visualElement,!1))}stopAnimation(){qo(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const t="_drag".concat(e.toUpperCase()),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){qo(t=>{const{drag:n}=this.getProps();if(!Rl(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,a=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t],s=a.get()||0;a.set(e[t]-Fa(n,i,.5)+s)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Bi(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};qo(e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=Uo(e),a=Uo(t);return a>r?n=Ks(t.min,t.max-r,e.min):r>a&&(n=Ks(e.min,e.max-a,t.min)),Rt(0,1,n)}({min:n,max:n},this.constraints[e])}});const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.constraints=!1,this.resolveConstraints(),qo(t=>{if(!Rl(t,e,null))return;const n=this.getAxisMotionValue(t),{min:a,max:i}=this.constraints[t];n.set(Fa(a,i,r[t]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;Ll.set(this.visualElement,this);const e=this.visualElement.current,t=pl(e,"pointerdown",t=>{const{drag:n,dragListener:r=!0}=this.getProps(),a=t.target,i=a!==e&&function(e){return Ko.has(e.tagName)||!0===e.isContentEditable}(a);n&&r&&!i&&this.start(t)});let n;const r=()=>{const{dragConstraints:t}=this.getProps();Bi(t)&&t.current&&(this.constraints=this.resolveRefConstraints(),n||(n=function(e,t,n){const r=dl(e,Tl(n)),a=dl(t,Tl(n));return()=>{r(),a()}}(e,t.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,i=a.addEventListener("measure",r);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),ar.read(r);const s=Xo(window,"resize",()=>this.scalePositionWithinConstraints()),o=a.addEventListener("didUpdate",e=>{let{delta:t,hasLayoutChanged:n}=e;this.isDragging&&n&&(qo(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o(),n&&n()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:a=!1,dragElastic:i=Sl,dragMomentum:s=!0}=e;return(0,o.A)((0,o.A)({},e),{},{drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:a,dragElastic:i,dragMomentum:s})}}function Tl(e){let t=!0;return()=>{t?t=!1:e()}}function Rl(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}const Fl=e=>(t,n)=>{e&&ar.update(()=>e(t,n),!1,!0)};const Ml={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Ol=!1;class Dl extends r.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:a}=e;a&&(t.group&&t.group.add(a),n&&n.register&&r&&n.register(a),Ol&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions((0,o.A)((0,o.A)({},a.options),{},{layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()}))),Ml.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:a}=this.props,{projection:i}=n;return i?(i.isPresent=a,e.layoutDependency!==t&&i.setOptions((0,o.A)((0,o.A)({},i.options),{},{layoutDependency:t})),Ol=!0,r||e.layoutDependency!==t||void 0===t||e.isPresent!==a?i.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?i.promote():i.relegate()||ar.postRender(()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Wr.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;Ol=!0,r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Il(e){const[t,n]=function(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=(0,r.useContext)(_i);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:a,register:i}=t,s=(0,r.useId)();(0,r.useEffect)(()=>
2{if(e)return i(s)},[e]);const o=(0,r.useCallback)(()=>e&&a&&a(s),[s,a,e]);return!n&&a?[!1,o]:[!0]}(),a=(0,r.useContext)(li);return(0,oi.jsx)(Dl,(0,o.A)((0,o.A)({},e),{},{layoutGroup:a,switchLayoutGroup:(0,r.useContext)(zi),isPresent:t,safeToRemove:n}))}function zl(e,t){const n=Kr.now(),r=a=>{let{timestamp:i}=a;const s=i-n;s>=t&&(ir(r),e(s-t))};return ar.setup(r,!0),()=>ir(r)}const Bl=["TopLeft","TopRight","BottomLeft","BottomRight"],ql=Bl.length,Ul=e=>"string"===typeof e?parseFloat(e):e,Vl=e=>"number"===typeof e||Yt.test(e);function Hl(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const Wl=$l(0,.5,Ws),Gl=$l(.5,.95,Qn);function $l(e,t,n){return r=>r<e?0:r>t?1:n(Ks(e,t,r))}function Yl(e,t){e.min=t.min,e.max=t.max}function Kl(e,t){Yl(e.x,t.x),Yl(e.y,t.y)}function Xl(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Zl(e,t,n,r,a){return e=$a(e-=t,1/n,r),void 0!==a&&(e=$a(e,1/a,r)),e}function Jl(e,t,n,r,a){let[i,s,o]=n;!function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,a=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:e;$t.test(t)&&(t=parseFloat(t),t=Fa(s.min,s.max,t/100)-s.min);if("number"!==typeof t)return;let o=Fa(i.min,i.max,r);e===i&&(o-=t),e.min=Zl(e.min,t,n,o,a),e.max=Zl(e.max,t,n,o,a)}(e,t[i],t[s],t[o],t.scale,r,a)}const Ql=["x","scaleX","originX"],ec=["y","scaleY","originY"];function tc(e,t,n,r){Jl(e.x,t,Ql,n?n.x:void 0,r?r.x:void 0),Jl(e.y,t,ec,n?n.y:void 0,r?r.y:void 0)}function nc(e){return 0===e.translate&&1===e.scale}function rc(e){return nc(e.x)&&nc(e.y)}function ac(e,t){return e.min===t.min&&e.max===t.max}function ic(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function sc(e,t){return ic(e.x,t.x)&&ic(e.y,t.y)}function oc(e){return Uo(e.x)/Uo(e.y)}function lc(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class cc{constructor(){this.members=[]}add(e){Nr(this.members,e);for(let t=this.members.length-1;t>=0;t--){const n=this.members[t];if(n===e||n===this.lead||n===this.prevLead)continue;const r=n.instance;r&&!1===r.isConnected&&!1!==n.isPresent&&!n.snapshot&&Ar(this.members,n)}e.scheduleRender()}remove(e){if(Ar(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex(t=>e===t);if(0===t)return!1;let n;for(let r=t;r>=0;r--){const e=this.members[r],t=e.instance;if(!1!==e.isPresent&&(!t||!1!==t.isConnected)){n=e;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender();const r=n.options.layoutDependency,a=e.options.layoutDependency;if(!(void 0!==r&&void 0!==a&&r===a)){const r=n.instance;r&&!1===r.isConnected&&!n.snapshot||(e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0))}const{crossfade:i}=e.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const uc=(e,t)=>e.depth-t.depth;class dc{constructor(){this.children=[],this.isDirty=!1}add(e){Nr(this.children,e),this.isDirty=!0}remove(e){Ar(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(uc),this.isDirty=!1,this.children.forEach(e)}}const hc={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},fc=["","X","Y","Z"];let pc=0;function mc(e,t,n,r){const{latestValues:a}=t;a[e]&&(n[e]=a[e],t.setStaticValue(e,0),r&&(r[e]=0))}function gc(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rs(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ar,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&gc(r)}function vc(e){let{attachResizeListener:t,defaultParent:n,measureScroll:r,checkIsScrollRoot:a,resetTransform:i}=e;return class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===n||void 0===n?void 0:n();this.id=pc++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,nr.value&&(hc.nodes=hc.calculatedTargetDeltas=hc.calculatedProjections=0),this.nodes.forEac
2h(xc),this.nodes.forEach(Sc),this.nodes.forEach(Cc),this.nodes.forEach(wc),nr.addProjectionMetrics&&nr.addProjectionMetrics(hc)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=t?t.root||t:this,this.path=t?[...t.path,t]:[],this.parent=t,this.depth=t?t.depth+1:0;for(let n=0;n<this.path.length;n++)this.path[n].shouldResetTransform=!0;this.root===this&&(this.nodes=new dc)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new jr),this.eventHandlers.get(e).add(t)}notifyListeners(e){const t=this.eventHandlers.get(e);for(var n=arguments.length,r=new Array(n>1?n-1:0),a=1;a<n;a++)r[a-1]=arguments[a];t&&t.notify(...r)}hasListeners(e){return this.eventHandlers.has(e)}mount(e){if(this.instance)return;var n;this.isSVG=Jo(e)&&!(Jo(n=e)&&"svg"===n.tagName),this.instance=e;const{layoutId:r,layout:a,visualElement:i}=this.options;if(i&&!i.current&&i.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(a||r)&&(this.isLayoutDirty=!0),t){let n,r=0;const a=()=>this.root.updateBlockedByResize=!1;ar.read(()=>{r=window.innerWidth}),t(e,()=>{const e=window.innerWidth;e!==r&&(r=e,this.root.updateBlockedByResize=!0,n&&n(),n=zl(a,250),Ml.hasAnimatedSinceResize&&(Ml.hasAnimatedSinceResize=!1,this.nodes.forEach(_c)))})}r&&this.root.registerSharedNode(r,this),!1!==this.options.animate&&i&&(r||a)&&this.addEventListener("didUpdate",e=>{let{delta:t,hasLayoutChanged:n,hasRelativeLayoutChanged:r,layout:a}=e;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||i.getDefaultTransition()||Fc,{onLayoutAnimationStart:l,onLayoutAnimationComplete:c}=i.getProps(),u=!this.targetLayout||!sc(this.targetLayout,a),d=!n&&r;if(this.options.layoutRoot||this.resumeFrom||d||n&&(u||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const e=(0,o.A)((0,o.A)({},Zi(s,"layout")),{},{onPlay:l,onComplete:c});(i.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e),this.setAnimationOrigin(t,d)}else n||_c(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=a})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),ir(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Ec),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&gc(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let a=0;a<this.path.length;a++){const e=this.path[a];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Nc);if(this.animationId<=this.animationCommitId)return void this.nodes.forEach(Ac);this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEac
2h(jc),this.nodes.forEach(bc),this.nodes.forEach(yc)):this.nodes.forEach(Ac),this.clearAllSnapshots();const e=Kr.now();sr.delta=Rt(0,1e3/60,e-sr.timestamp),sr.timestamp=e,sr.isProcessing=!0,or.update.process(sr),or.preRender.process(sr),or.render.process(sr),sr.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Wr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(kc),this.sharedNodes.forEach(Lc)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ar.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ar.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Uo(this.snapshot.measuredBox.x)||Uo(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),(!this.options.alwaysMeasureLayout||!this.isLead())&&!this.isLayoutDirty)return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let n=0;n<this.path.length;n++){this.path[n].updateScroll()}const e=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"measure",t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&this.instance){const t=a(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!rc(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&this.instance&&(t||Ha(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),Dc((r=n).x),Dc(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};const n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(zc))){const{scroll:e}=this.root;e&&(Qa(n.x,e.offset.x),Qa(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Kl(n,e),null!==(t=this.scroll)&&void 0!==t&&t.wasRoot)return n;for(let r=0;r<this.path.length;r++){const t=this.path[r],{scroll:a,options:i}=t;t!==this.root&&a&&i.layoutScroll&&(a.wasRoot&&Kl(n,e),Qa(n.x,a.offset.x),Qa(n.y,a.offset.y))}return n}applyTransform(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n={x:{min:0,max:0},y:{min:0,max:0}};Kl(n,e);for(let r=0;r<this.path.length;r++){const e=this.path[r];!t&&e.options.layoutScroll&&e.scroll&&e!==e.root&&ti(n,{x:-e.scroll.offset.x,y:-e.scroll.offset.y}),Ha(e.latestValues)&&ti(n,e.latestValues)}return Ha(this.latestValues)&&ti(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};Kl(t,e);for(let n=0;n<this.path.length;n++){const e=this.path[n];if(!e.instance)continue;if(!Ha(e.latestValues))continue;Va(e.latestValues)&&e.updateSnapshot();const r=xn();Kl(r,e.measurePageBox()),tc(t,e.latestValues,e.snapshot?e.snapshot.layoutBox:void 0,r)}return Ha(this.latestValues)&&tc(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options=(0,o.A)((0,o.A)((0,o.A)({},this.options),e),{},{crossfade:void 0===e.crossfade||e.crossfade})}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==sr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isS
2haredProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(t||r&&this.isSharedProjectionDirty||this.isProjectionDirty||null!==(e=this.parent)&&void 0!==e&&e.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:a,layoutId:i}=this.options;if(!this.layout||!a&&!i)return;this.resolvedRelativeTargetAt=sr.timestamp;const s=this.getClosestProjectingParent();var o,l,c;(s&&this.linkedParentVersion!==s.layoutVersion&&!s.options.layoutRoot&&this.removeRelativeTarget(),this.targetDelta||this.relativeTarget||(s&&s.layout?this.createRelativeTarget(s,this.layout.layoutBox,s.layout.layoutBox):this.removeRelativeTarget()),this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),o=this.target,l=this.relativeTarget,c=this.relativeParent.target,Wo(o.x,l.x,c.x),Wo(o.y,l.y,c.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Kl(this.target,this.layout.layoutBox),Xa(this.target,this.targetDelta)):Kl(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,s&&Boolean(s.resumingFrom)===Boolean(this.resumingFrom)&&!s.options.layoutScroll&&s.target&&1!==this.animationProgress?this.createRelativeTarget(s,this.target,s.target):this.relativeParent=this.relativeTarget=void 0),nr.value&&hc.calculatedTargetDeltas++)}getClosestProjectingParent(){if(this.parent&&!Va(this.parent.latestValues)&&!Wa(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(e,t,n){this.relativeParent=e,this.linkedParentVersion=e.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},$o(this.relativeTargetOrigin,t,n),Kl(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||null!==(e=this.parent)&&void 0!==e&&e.isProjectionDirty)&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===sr.timestamp&&(r=!1),r)return;const{layout:a,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!a&&!i)return;Kl(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,o=this.treeScale.y;!function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const a=n.length;if(!a)return;let i,s;t.x=t.y=1;for(let o=0;o<a;o++){i=n[o],s=i.projectionDelta;const{visualElement:a}=i.options;a&&a.props.style&&"contents"===a.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&ti(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,Xa(e,s)),r&&Ha(i.latestValues)&&ti(e,i.latestValues))}t.x<Ja&&t.x>Za&&(t.x=1),t.y<Ja&&t.y>Za&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Xl(this.prevProjectionDelta.x,this.projectionDelta.x),Xl(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Ho(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===o&&lc(this.projectionDelta.x,this.prevProjectionDelta.x)&&lc(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),nr.value&&hc.calculatedProjections++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(){var e;let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=this.snapshot,r=n?n.latestValues:{},a=(0,o.A)({},this.latestValues),i={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},l=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),u=!c||c.members.length<=1,d=Boolean(l&&!u&&!0===this.options.crossfade&&!this.path.some(Rc));let h;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var o,c,f,p;Pc(i.x,e.x,n),Pc(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($o(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),o=this.relativeTarget,c=this.relativeTargetOrigin,f=s,p=n,Tc(o.x,c.x,f.x,p),Tc(o.y,c.y,f.y,p),h&&function(e,t){return ac(e.x,t.x)&&ac(e.y,t.y)}(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Kl(h,this.relativeTarget)),l&&(this.animationValues=a,function(e,t,n,r,a,i){var s,o;if(a)e.opacity=Fa(0,null!==(s=n.opacity)&&void 0!==s?s:1,Wl(r)),e.o
2pacityExit=Fa(null!==(o=t.opacity)&&void 0!==o?o:1,0,Gl(r));else if(i){var l,c;e.opacity=Fa(null!==(l=t.opacity)&&void 0!==l?l:1,null!==(c=n.opacity)&&void 0!==c?c:1,r)}for(let u=0;u<ql;u++){const a="border".concat(Bl[u],"Radius");let i=Hl(t,a),s=Hl(n,a);void 0===i&&void 0===s||(i||(i=0),s||(s=0),0===i||0===s||Vl(i)===Vl(s)?(e[a]=Math.max(Fa(Ul(i),Ul(s),r),0),($t.test(s)||$t.test(i))&&(e[a]+="%")):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=Fa(t.rotate||0,n.rotate||0,r))}(a,r,this.latestValues,n,d,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,n;this.notifyListeners("animationStart"),null===(t=this.currentAnimation)||void 0===t||t.stop(),null===(n=this.resumingFrom)||void 0===n||null===(n=n.currentAnimation)||void 0===n||n.stop(),this.pendingAnimation&&(ir(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ar.update(()=>{Ml.hasAnimatedSinceResize=!0,Rr.layout++,this.motionValue||(this.motionValue=Qr(0)),this.motionValue.jump(0,!1),this.currentAnimation=function(e,t,n){const r=wn(e)?e:Qr(e);return r.start(xo("",r,t,n)),r.animation}(this.motionValue,[0,1e3],(0,o.A)((0,o.A)({},e),{},{velocity:0,isSync:!0,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onStop:()=>{Rr.layout--},onComplete:()=>{Rr.layout--,e.onComplete&&e.onComplete(),this.completeAnimation()}})),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:a}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Ic(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Uo(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Uo(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}Kl(t,n),ti(t,a),Ho(this.projectionDeltaWithTransform,this.layoutCorrected,t,a)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new cc);this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote(){let{needsReset:e,transition:t,preserveFollowOpacity:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&mc("z",e,r,this.animationValues);for(let a=0;a<fc.length;a++)mc("rotate".concat(fc[a]),e,r,this.animationValues),mc("skew".concat(fc[a]),e,r,this.animationValues);e.render();for(const a in r)e.setStaticValue(a,r[a]),this.animationValues&&(this.animationValues[a]=r[a]);e.scheduleRender()}applyProjectionStyles(e,t){if(!this.instance||this.isSVG)return;if(!this.isVisible)return void(e.visibility="hidden");const n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,e.visibility="",e.opacity="",e.pointerEvents=ji(null===t||void 0===t?void 0:t.pointerEvents)||"",void(e.transform=n?n(this.latestValues,""):"none");const r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target)return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=ji(null===t||void 0===t?void 0:t.pointerEvents)||""),void(this.hasProjected&&!Ha(this.latestValues)&&(e.transform=n?n({},""):"none",this.hasProjected=!1));e.visibility="";const a=r.animationValues||r.latestValues;this.applyTransformsToTarget();let i=function(e,t,n){let r="";
2const a=e.x.translate/t.x,i=e.y.translate/t.y,s=(null===n||void 0===n?void 0:n.z)||0;if((a||i||s)&&(r="translate3d(".concat(a,"px, ").concat(i,"px, ").concat(s,"px) ")),1===t.x&&1===t.y||(r+="scale(".concat(1/t.x,", ").concat(1/t.y,") ")),n){const{transformPerspective:e,rotate:t,rotateX:a,rotateY:i,skewX:s,skewY:o}=n;e&&(r="perspective(".concat(e,"px) ").concat(r)),t&&(r+="rotate(".concat(t,"deg) ")),a&&(r+="rotateX(".concat(a,"deg) ")),i&&(r+="rotateY(".concat(i,"deg) ")),s&&(r+="skewX(".concat(s,"deg) ")),o&&(r+="skewY(".concat(o,"deg) "))}const o=e.x.scale*t.x,l=e.y.scale*t.y;return 1===o&&1===l||(r+="scale(".concat(o,", ").concat(l,")")),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,a);n&&(i=n(a,i)),e.transform=i;const{x:s,y:o}=this.projectionDelta;var l,c;(e.transformOrigin="".concat(100*s.origin,"% ").concat(100*o.origin,"% 0"),r.animationValues)?e.opacity=r===this?null!==(l=null!==(c=a.opacity)&&void 0!==c?c:this.latestValues.opacity)&&void 0!==l?l:1:this.preserveOpacity?this.latestValues.opacity:a.opacityExit:e.opacity=r===this?void 0!==a.opacity?a.opacity:"":void 0!==a.opacityExit?a.opacityExit:0;for(const u in Oa){if(void 0===a[u])continue;const{correct:t,applyTo:n,isCSSVariable:s}=Oa[u],o="none"===i?a[u]:t(a[u],r);if(n){const t=n.length;for(let r=0;r<t;r++)e[n[r]]=o}else s?this.options.visualElement.renderState.vars[u]=o:e[u]=o}this.options.layoutId&&(e.pointerEvents=r===this?ji(null===t||void 0===t?void 0:t.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()}),this.root.nodes.forEach(Nc),this.root.sharedNodes.clear()}}}function bc(e){e.updateLayout()}function yc(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:a}=e.options,i=n.source!==e.layout.source;"size"===a?qo(e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],a=Uo(r);r.min=t[e].min,r.max=r.min+a}):Ic(a,n.layoutBox,t)&&qo(r=>{const a=i?n.measuredBox[r]:n.layoutBox[r],s=Uo(t[r]);a.max=a.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)});const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Ho(s,t,n.layoutBox);const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i?Ho(o,e.applyTransform(r,!0),n.measuredBox):Ho(o,t,n.layoutBox);const l=!rc(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:a,layout:i}=r;if(a&&i){const s={x:{min:0,max:0},y:{min:0,max:0}};$o(s,n.layoutBox,a.layoutBox);const o={x:{min:0,max:0},y:{min:0,max:0}};$o(o,t,i.layoutBox),sc(s,o)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=o,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:o,layoutDelta:s,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function xc(e){nr.value&&hc.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function wc(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function kc(e){e.clearSnapshot()}function Nc(e){e.clearMeasurements()}function Ac(e){e.isLayoutDirty=!1}function jc(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function _c(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Sc(e){e.resolveTargetDelta()}function Cc(e){e.calcProjection()}function Ec(e){e.resetSkewAndRotation()}function Lc(e){e.removeLeadSnapshot()}
2function Pc(e,t,n){e.translate=Fa(t.translate,0,n),e.scale=Fa(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Tc(e,t,n,r){e.min=Fa(t.min,n.min,r),e.max=Fa(t.max,n.max,r)}function Rc(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Fc={duration:.45,ease:[.4,0,.1,1]},Mc=e=>"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Oc=Mc("applewebkit/")&&!Mc("chrome/")?Math.round:Qn;function Dc(e){e.min=Oc(e.min),e.max=Oc(e.max)}function Ic(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=oc(t),a=oc(n),i=.2,!(Math.abs(r-a)<=i));var r,a,i}function zc(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const Bc=vc({attachResizeListener:(e,t)=>Xo(e,"resize",t),measureScroll:()=>{var e,t;return{x:document.documentElement.scrollLeft||(null===(e=document.body)||void 0===e?void 0:e.scrollLeft)||0,y:document.documentElement.scrollTop||(null===(t=document.body)||void 0===t?void 0:t.scrollTop)||0}},checkIsScrollRoot:()=>!0}),qc={current:void 0},Uc=vc({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!qc.current){const e=new Bc({});e.mount(window),e.setOptions({layoutScroll:!0}),qc.current=e}return qc.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Vc={pan:{Feature:class extends $i{constructor(){super(...arguments),this.removePointerDownListener=Qn}onPointerDown(e){this.session=new bl(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:ml(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Fl(e),onStart:Fl(t),onMove:Fl(n),onEnd:(e,t)=>{delete this.session,r&&ar.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=pl(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends $i{constructor(e){super(e),this.removeGroupControls=Qn,this.removeListeners=Qn,this.controls=new Pl(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Qn}update(){const{dragControls:e}=this.node.getProps(),{dragControls:t}=this.node.prevProps||{};e!==t&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}},ProjectionNode:Uc,MeasureLayout:Il}};function Hc(e,t){const n=Qo(e),r=new AbortController;return[n,(0,o.A)((0,o.A)({passive:!0},t),{},{signal:r.signal}),()=>r.abort()]}function Wc(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const[r,a,i]=Hc(e,n);return r.forEach(e=>{let n,r=!1,i=!1;const s=t=>{n&&(n(t),n=void 0),e.removeEventListener("pointerleave",l)},o=e=>{r=!1,window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o),i&&(i=!1,s(e))},l=e=>{"touch"!==e.pointerType&&(r?i=!0:s(e))};e.addEventListener("pointerenter",r=>{if("touch"===r.pointerType||Bo())return;i=!1;const s=t(e,r);"function"===typeof s&&(n=s,e.addEventListener("pointerleave",l,a))},a),e.addEventListener("pointerdown",()=>{r=!0,window.addEventListener("pointerup",o,a),window.addEventListener("pointercancel",o,a)},a)}),i}function Gc(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const a=r["onHover"+n];a&&ar.postRender(()=>a(t,fl(t)))}const $c=(e,t)=>!!t&&(e===t||$c(e,t.parentElement)),Yc=new WeakSet;function Kc(e){return t=>{"Enter"===t.key&&e(t)}}function Xc(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Zc(e){return hl(e)&&!Bo()}const Jc=new WeakSet;function Qc(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const[r,a,i]=Hc(e,n),s=e=>{const r=e.currentTarget;if(!Zc(e))return;if(Jc.has(e))return;Yc.add(r),n.stopPropagation&&Jc.add(e);const i=t(r,e),s=(e,t)=>{window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",l),Yc.has(r)&&Yc.delete(r),Zc(e)&&"function"===typeof i&&i(e,{success:t})},o=e=>{s(e,r===window||r===document||n.useGlobalTarget||$c(r,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",o,a),window.addEventListener("pointercancel",l,a)};
2return r.forEach(e=>{var t;(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,a),Zo(t=e)&&"offsetHeight"in t&&(e.addEventListener("focus",e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Kc(()=>{if(Yc.has(n))return;Xc(n,"down");const e=Kc(()=>{Xc(n,"up")});n.addEventListener("keyup",e,t),n.addEventListener("blur",()=>Xc(n,"cancel"),t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)})(e,a)),function(e){return Yo.has(e.tagName)||!0===e.isContentEditable}(e)||e.hasAttribute("tabindex")||(e.tabIndex=0))}),i}function eu(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const a=r["onTap"+("End"===n?"":n)];a&&ar.postRender(()=>a(t,fl(t)))}const tu=["root"],nu=new WeakMap,ru=new WeakMap,au=e=>{const t=nu.get(e.target);t&&t(e)},iu=e=>{e.forEach(au)};function su(e,t,n){const r=function(e){let{root:t}=e,n=(0,s.A)(e,tu);const r=t||document;ru.has(r)||ru.set(r,{});const a=ru.get(r),i=JSON.stringify(n);return a[i]||(a[i]=new IntersectionObserver(iu,(0,o.A)({root:t},n))),a[i]}(t);return nu.set(e,n),r.observe(e),()=>{nu.delete(e),r.unobserve(e)}}const ou={some:0,all:1};const lu={inView:{Feature:class extends $i{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:a}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"===typeof r?r:ou[r]};return su(this.node.current,i,e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,a&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)})}mount(){this.startObserver()}update(){if("undefined"===typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node,n=["amount","margin","root"].some(function(e){let{viewport:t={}}=e,{viewport:n={}}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e=>t[e]!==n[e]}(e,t));n&&this.startObserver()}unmount(){}}},tap:{Feature:class extends $i{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:t,propagate:n}=this.node.props;this.unmount=Qc(e,(e,t)=>(eu(this.node,t,"Start"),(e,t)=>{let{success:n}=t;return eu(this.node,e,n?"End":"Cancel")}),{useGlobalTarget:t,stopPropagation:!1===(null===n||void 0===n?void 0:n.tap)})}unmount(){}}},focus:{Feature:class extends $i{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(jf){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=is(Xo(this.node.current,"focus",()=>this.onFocus()),Xo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends $i{mount(){const{current:e}=this.node;e&&(this.unmount=Wc(e,(e,t)=>(Gc(this.node,t,"Start"),e=>Gc(this.node,e,"End"))))}unmount(){}}}},cu={layout:{ProjectionNode:Uc,MeasureLayout:Il}},uu=Gi((0,o.A)((0,o.A)((0,o.A)((0,o.A)({},Io),lu),Vc),cu),si);var du=n(7784);const hu=(0,du.A)("network",[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]);var fu=n(2489),pu=n(1827);const mu=(0,du.A)("headset",[["path",{d:"M3 11h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-5Zm0 0a9 9 0 1 1 18 0m0 0v5a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3Z",key:"12oyoe"}],["path",{d:"M21 16v2a4 4 0 0 1-4 4h-5",key:"1x7m43"}]]);var gu=n(5692),vu=n(3390),bu=n(614);const yu=(0,du.A)("menu",[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]]),xu=()=>{const e=we(),[t,n]=(0,r.useState)(!1);return(0,oi.jsx)("header",{className:"sticky top-0 z-50 w-full border-b border-border backdrop-blur-xl bg-background/80","data-testid":"header",children:(0,oi.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12",children:[(0,oi.jsxs)("div",{className:"flex h-16 items-center justify-between",children:[(0,oi.jsxs)("div",{className:"font-black text-lg sm:text-xl uppercase tracking-tight cursor-pointer hover:text-primary transition-colors",onClick:()=>e("/"),"data-testid":"logo",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]}),(0,oi.jsxs)("nav",{className:"hidden md:flex items-center space-x-8","data-testid":"nav",children:[(0,oi.jsx)("a",{onClick:()=>e("/services"),className:"text-sm uppercase tracking-wider hover:text-primary transition-colors cursor-pointer","data-testid":"nav-services",children:"Services"}),(0,oi.jsx)("a",{onClick:()=>e("/pricing"),className:"text-sm uppercase tracking-wider hover:text-primary transition-colors cursor-pointer","data-testid":"nav-pricing",children:"Pricing"}),(0,oi.jsx)("a",{href:"#about",className:"text-sm uppercase tracking-wider hover:text-primary transition-colors",children:"About"}),(0,oi.jsx)("a",{href:"#contact",className:"text-sm uppercase tracking-wider hover:text-primary transition-colors",children:"Contact"})]}),(0,oi.jsx)("div",{className:"hidden md:block",children:(0,oi.jsx)(vu.$,{onClick:()=>
2e("/login"),className:"font-bold uppercase tracking-wider text-sm","data-testid":"header-login-btn",children:"Client Login"})}),(0,oi.jsxs)("div",{className:"flex md:hidden items-center gap-2",children:[(0,oi.jsx)(vu.$,{onClick:()=>e("/login"),size:"sm",className:"font-bold uppercase tracking-wider text-xs","data-testid":"header-login-btn-mobile",children:"Login"}),(0,oi.jsx)(vu.$,{variant:"ghost",size:"sm",onClick:()=>n(!t),"data-testid":"mobile-menu-toggle",children:t?(0,oi.jsx)(bu.A,{className:"w-5 h-5"}):(0,oi.jsx)(yu,{className:"w-5 h-5"})})]})]}),t&&(0,oi.jsx)("div",{className:"md:hidden border-t border-border py-4","data-testid":"mobile-nav",children:(0,oi.jsxs)("nav",{className:"flex flex-col space-y-4",children:[(0,oi.jsx)("a",{onClick:()=>{e("/services"),n(!1)},className:"text-sm uppercase tracking-wider hover:text-primary transition-colors py-2 cursor-pointer",children:"Services"}),(0,oi.jsx)("a",{onClick:()=>{e("/pricing"),n(!1)},className:"text-sm uppercase tracking-wider hover:text-primary transition-colors py-2 cursor-pointer",children:"Pricing"}),(0,oi.jsx)("a",{href:"#about",className:"text-sm uppercase tracking-wider hover:text-primary transition-colors py-2",onClick:()=>n(!1),children:"About"}),(0,oi.jsx)("a",{href:"#contact",className:"text-sm uppercase tracking-wider hover:text-primary transition-colors py-2",onClick:()=>n(!1),children:"Contact"})]})})]})})},wu=()=>(0,oi.jsx)("footer",{className:"border-t border-border bg-card py-8 sm:py-12","data-testid":"footer",children:(0,oi.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12",children:[(0,oi.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 gap-8",children:[(0,oi.jsxs)("div",{className:"text-center sm:text-left",children:[(0,oi.jsxs)("div",{className:"font-black text-xl uppercase tracking-tight mb-4",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground",children:"Elite managed IT services for modern businesses."})]}),(0,oi.jsxs)("div",{className:"text-center sm:text-left",children:[(0,oi.jsx)("h4",{className:"font-semibold uppercase text-sm mb-4 tracking-wider",children:"Quick Links"}),(0,oi.jsxs)("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,oi.jsx)("li",{children:(0,oi.jsx)("a",{href:"#services",className:"hover:text-primary transition-colors",children:"Services"})}),(0,oi.jsx)("li",{children:(0,oi.jsx)("a",{href:"#about",className:"hover:text-primary transition-colors",children:"About"})}),(0,oi.jsx)("li",{children:(0,oi.jsx)("a",{href:"#contact",className:"hover:text-primary transition-colors",children:"Contact"})}),(0,oi.jsx)("li",{children:(0,oi.jsx)("a",{href:"/admin",className:"hover:text-primary transition-colors","data-testid":"admin-login-link",children:"Admin Login"})})]})]}),(0,oi.jsxs)("div",{className:"text-center sm:text-left sm:col-span-2 md:col-span-1",children:[(0,oi.jsx)("h4",{className:"font-semibold uppercase text-sm mb-4 tracking-wider",children:"Contact"}),(0,oi.jsxs)("ul",{className:"space-y-2 text-sm text-muted-foreground",children:[(0,oi.jsx)("li",{className:"break-all",children:"[email protected]"}),(0,oi.jsx)("li",{children:"740-302-5607"}),(0,oi.jsx)("li",{children:"P.O. Box 419"}),(0,oi.jsx)("li",{children:"Greenup, KY 41144"}),(0,oi.jsx)("li",{className:"pt-2 text-primary font-medium",children:"24/7 Support Available"})]})]})]}),(0,oi.jsx)("div",{className:"border-t border-border mt-8 pt-8 text-center text-xs sm:text-sm text-muted-foreground",children:(0,oi.jsxs)("p",{children:["\xa9 ",(new Date).getFullYear()," NextGen Network Solutions. All rights reserved."]})})]})}),ku=()=>{const e=we(),t=[{icon:(0,oi.jsx)(hu,{className:"w-12 h-12"}),name:"Network Management",description:"24/7 monitoring and management of your network infrastructure",image:"https://images.unsplash.com/photo-1680992045563-2ab442f3feee?crop=entropy&cs=srgb&fm=jpg&q=85"},{icon:(0,oi.jsx)(fu.A,{className:"w-12 h-12"}),name:"Cybersecurity",description:"Advanced threat protection and security solutions",image:"https://images.unsplash.com/photo-1768839721176-2fa91fdce725?crop=entropy&cs=srgb&fm=jpg&q=85"},{icon:(0,oi.jsx)(pu.A,{className:"w-12 h-12"}
2),name:"Cloud Solutions",description:"Scalable cloud infrastructure and migration services",image:"https://images.unsplash.com/photo-1680992046617-e2e35451bcdb?crop=entropy&cs=srgb&fm=jpg&q=85"},{icon:(0,oi.jsx)(mu,{className:"w-12 h-12"}),name:"IT Support",description:"Expert technical support for your business operations",image:"https://images.unsplash.com/photo-1736858405164-4f61f5583aa0?crop=entropy&cs=srgb&fm=jpg&q=85"}];return(0,oi.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,oi.jsx)(xu,{}),(0,oi.jsxs)("section",{className:"relative min-h-screen flex items-center justify-center overflow-hidden",children:[(0,oi.jsx)("div",{className:"absolute inset-0 z-0",style:{backgroundImage:"url(https://images.unsplash.com/photo-1680992046626-418f7e910589?crop=entropy&cs=srgb&fm=jpg&q=85)",backgroundSize:"cover",backgroundPosition:"center"},children:(0,oi.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-black/90 via-black/80 to-background"})}),(0,oi.jsx)("div",{className:"absolute inset-0 scanlines z-10"}),(0,oi.jsx)("div",{className:"relative z-20 container mx-auto px-6 md:px-12 py-32 md:py-48",children:(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:30},animate:{opacity:1,y:0},transition:{duration:.8},className:"max-w-4xl",children:[(0,oi.jsx)("div",{className:"text-xs uppercase tracking-widest text-primary font-mono mb-6","data-testid":"hero-kicker",children:"ELITE MANAGED SERVICES"}),(0,oi.jsxs)("h1",{className:"text-5xl sm:text-6xl lg:text-7xl font-black uppercase tracking-tight mb-6","data-testid":"hero-title",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN",(0,oi.jsx)("br",{}),"NETWORK SOLUTIONS"]}),(0,oi.jsx)("p",{className:"text-lg sm:text-xl text-muted-foreground max-w-2xl mb-12 leading-relaxed","data-testid":"hero-description",children:"Secure, scalable, and always-on IT infrastructure for modern businesses. Your network. Our mission."}),(0,oi.jsxs)("div",{className:"flex flex-wrap gap-4",children:[(0,oi.jsxs)(vu.$,{size:"lg",className:"text-base font-bold uppercase tracking-wider hover:glow-green-sm",onClick:()=>e("/login"),"data-testid":"hero-client-portal-btn",children:["Client Portal",(0,oi.jsx)(gu.A,{className:"ml-2 w-5 h-5"})]}),(0,oi.jsx)(vu.$,{size:"lg",variant:"secondary",className:"text-base",onClick:()=>e("/services"),"data-testid":"hero-explore-services-btn",children:"Explore Services"})]})]})})]}),(0,oi.jsx)("section",{id:"services",className:"py-24 md:py-32 relative","data-testid":"services-section",children:(0,oi.jsxs)("div",{className:"container mx-auto px-6 md:px-12",children:[(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},className:"mb-16",children:[(0,oi.jsx)("h2",{className:"text-4xl sm:text-5xl font-black uppercase mb-4","data-testid":"services-title",children:"OUR SERVICES"}),(0,oi.jsx)("div",{className:"w-20 h-1 bg-primary"})]}),(0,oi.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-8",children:t.map((e,t)=>(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6,delay:.1*t},className:"group bg-card border border-border rounded-sm overflow-hidden hover:border-primary/50 transition-all duration-300","data-testid":"service-card-".concat(t),children:[(0,oi.jsxs)("div",{className:"relative h-48 overflow-hidden",children:[(0,oi.jsx)("img",{src:e.image,alt:e.name,className:"w-full h-full object-cover group-hover:scale-105 transition-transform duration-500"}),(0,oi.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-card via-card/50 to-transparent"})]}),(0,oi.jsxs)("div",{className:"p-6",children:[(0,oi.jsx)("div",{className:"text-primary mb-4",children:e.icon}),(0,oi.jsx)("h3",{className:"text-2xl font-bold mb-3",children:e.name}),(0,oi.jsx)("p",{className:"text-muted-foreground",children:e.description})]})]},t))})]})}),(0,oi.jsx)("section",{className:"py-24 md:py-32 bg-card border-y border-border","data-testid":"cta-section",children:(0,oi.jsx)("div",{className:"container mx-auto px-6 md:px-12 text-center",children:(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.6},children:[(0,oi.jsx)("h2",{className:"text-4xl sm:text-5xl font-black uppercase mb-6","data-testid":"cta-title",children:"READY TO SECURE YOUR NETWORK?"}),(0,oi.jsx)("p",{className:"text-xl text-muted-foreground mb-12 max-w-2xl mx-auto",children:"Access your account to manage services, view invoices, and get support."}),(0,oi.jsxs)(vu.$,{size:"lg",className:"text-base font-bold uppercase tracking-wider hover:glow-green",onClick:()=>e("/login"),"data-testid":"cta-get-started-btn",children:["Get Started",(0,oi.jsx)(gu.A,{className:"ml-2 w-5 h-5"})]})]})})}),(0,oi.jsx)(wu,{})]})};var Nu=n(1140);const Au=()=>{const e=we();return(0,oi.jsxs)("div",{className:"min-h-screen flex items-center justify-center bg-background relative overflow-hidden",children:[(0,oi.jsx)("div",{className:"absolute inset-0 scanlines"}),(0,oi.jsx)("div",{className:"absolute top-0 left-0 w-full h-1 bg-primary"}),(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20}
2,animate:{opacity:1,y:0},transition:{duration:.6},className:"relative z-10 w-full max-w-md mx-4",children:[(0,oi.jsxs)(Nu.Zp,{className:"p-8 bg-card border-border backdrop-blur-xl","data-testid":"login-card",children:[(0,oi.jsxs)("div",{className:"text-center mb-8",children:[(0,oi.jsxs)("h1",{className:"text-3xl font-black uppercase tracking-tight mb-2","data-testid":"login-title",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground uppercase tracking-widest font-mono",children:"CLIENT PORTAL"})]}),(0,oi.jsxs)("div",{className:"space-y-6",children:[(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("h2",{className:"text-xl font-semibold mb-2",children:"Welcome Back"}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground",children:"Sign in to access your dashboard, invoices, and support tickets."})]}),(0,oi.jsxs)(vu.$,{onClick:()=>{const e=window.location.origin+"/dashboard";window.location.href="https://auth.emergentagent.com/?redirect=".concat(encodeURIComponent(e))},className:"w-full bg-white text-black hover:bg-white/90 font-semibold",size:"lg","data-testid":"google-login-btn",children:[(0,oi.jsxs)("svg",{className:"w-5 h-5 mr-2",viewBox:"0 0 24 24",children:[(0,oi.jsx)("path",{fill:"#4285F4",d:"M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"}),(0,oi.jsx)("path",{fill:"#34A853",d:"M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"}),(0,oi.jsx)("path",{fill:"#FBBC05",d:"M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"}),(0,oi.jsx)("path",{fill:"#EA4335",d:"M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"})]}),"Continue with Google"]}),(0,oi.jsx)("div",{className:"text-center",children:(0,oi.jsx)(vu.$,{variant:"ghost",onClick:()=>e("/"),className:"text-sm text-muted-foreground hover:text-primary","data-testid":"back-to-home-btn",children:"\u2190 Back to Home"})})]})]}),(0,oi.jsx)("p",{className:"text-center text-xs text-muted-foreground mt-6",children:"Secure authentication powered by Google OAuth"})]})]})};var ju=n(9722),_u=n(6328);const Su="https://nextgen-staging.emergent.host",Cu=()=>{const e=we(),t=(0,r.useRef)(!1);return(0,r.useEffect)(()=>{if(t.current)return;t.current=!0;const n=t=>{const n="admin"===t.role?"/admin":"technician"===t.role?"/tech":"accountant"===t.role?"/admin":"/dashboard";window.history.replaceState(null,"",window.location.pathname),e(n,{state:{user:t},replace:!0}),_u.oR.success("Welcome".concat(null!==t&&void 0!==t&&t.name?", ".concat(t.name):"","!"))},r=async()=>{try{var e;const t=await ju.A.get("".concat(Su,"/api/auth/me"),{withCredentials:!0});if(null!==t&&void 0!==t&&null!==(e=t.data)&&void 0!==e&&e.role)return n(t.data),!0}catch(t){}return!1};(async()=>{const t=window.location.hash.match(/session_id=([^&]+)/);if(!t)return void(await r()||e("/login",{replace:!0}));const a=t[1];try{const e=await ju.A.post("".concat(Su,"/api/auth/session"),{session_id:a},{withCredentials:!0});n(e.data)}catch(o){var i,s;if(console.error("Auth: /api/auth/session failed:",o),await r())return;const t=null===(i=o.response)||void 0===i||null===(s=i.data)||void 0===s?void 0:s.detail,n="string"===typeof t?t:(Array.isArray(t)?t.map(e=>e.msg).join("; "):null)||o.message||"Authentication failed. Please try again.";_u.oR.error(n),window.history.replaceState(null,"","/login"),e("/login",{replace:!0})}})()},[e]),(0,oi.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary border-t-transparent rounded-full animate-spin mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-muted-foreground font-mono",children:"Authenticating..."})]})})},Eu=(0,du.A)("log-out",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);var Lu=n(1680),Pu=n(5244),Tu=n(4537),Ru=n(4919);const Fu=(0,du.A)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);var Mu=n(7737),Ou=n(7365);const Du=(0,du.A)("shopping-cart",[["circle",{cx:"8",cy:"21",r:"1",key:"jimo8o"}
2],["circle",{cx:"19",cy:"21",r:"1",key:"13723u"}],["path",{d:"M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12",key:"9zh506"}]]);var Iu=n(9233),zu=n(6210),Bu=n(4459);const qu=(0,du.A)("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);var Uu=n(1529);const Vu="https://nextgen-staging.emergent.host",Hu=e=>{if(!e)return"";const t=new Date(e).getTime(),n=Date.now()-t;if(Number.isNaN(n))return"";const r=Math.floor(n/6e4);if(r<1)return"just now";if(r<60)return"".concat(r,"m ago");const a=Math.floor(r/60);if(a<24)return"".concat(a,"h ago");const i=Math.floor(a/24);return"".concat(i,"d ago")},Wu=e=>{let{className:t="",testIdPrefix:n="notif"}=e;const a=we(),[i,s]=(0,r.useState)(!1),[l,c]=(0,r.useState)([]),[u,d]=(0,r.useState)(0),[h,f]=(0,r.useState)(!1),p=(0,r.useRef)(null),m=(0,r.useCallback)(async()=>{try{var e,t;const n=await ju.A.get("".concat(Vu,"/api/notifications?limit=20"),{withCredentials:!0});c((null===(e=n.data)||void 0===e?void 0:e.items)||[]),d((null===(t=n.data)||void 0===t?void 0:t.unread_count)||0)}catch(_f){}},[]);(0,r.useEffect)(()=>{m();let e=null;try{e=new EventSource("".concat(Vu,"/api/notifications/stream"),{withCredentials:!0}),e.addEventListener("notification",e=>{try{const t=JSON.parse(e.data);"notification.created"===(null===t||void 0===t?void 0:t.kind)&&null!==t&&void 0!==t&&t.notification&&(c(e=>[t.notification,...e].slice(0,20)),d(e=>e+1))}catch(t){}})}catch(n){}const t=setInterval(m,3e5);return()=>{clearInterval(t);try{e&&e.close()}catch(n){}}},[m]),(0,r.useEffect)(()=>{i&&m()},[i,m]),(0,r.useEffect)(()=>{if(!i)return;const e=e=>{p.current&&!p.current.contains(e.target)&&s(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[i]);const[g,v]=(0,r.useState)(null);return(0,oi.jsxs)("div",{className:"relative ".concat(t),ref:p,"data-testid":"".concat(n,"-bell-wrap"),children:[(0,oi.jsxs)("button",{type:"button",onClick:()=>s(e=>!e),className:"relative p-2 rounded hover:bg-muted/40 transition-colors","data-testid":"".concat(n,"-bell-btn"),"aria-label":"Notifications",children:[(0,oi.jsx)(Iu.A,{className:"w-5 h-5"}),u>0&&(0,oi.jsx)("span",{className:"absolute -top-0.5 -right-0.5 min-w-[18px] h-[18px] px-1 rounded-full bg-primary text-primary-foreground text-[10px] font-bold flex items-center justify-center","data-testid":"".concat(n,"-bell-badge"),children:u>99?"99+":u})]}),i&&(0,oi.jsxs)("div",{className:"absolute right-0 mt-2 w-[360px] max-w-[92vw] bg-card border border-border rounded-lg shadow-2xl z-50 overflow-hidden","data-testid":"".concat(n,"-dropdown"),children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border",children:[(0,oi.jsx)("p",{className:"text-xs uppercase tracking-widest font-bold",children:"Notifications"}),(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:async()=>{f(!0);try{await ju.A.post("".concat(Vu,"/api/notifications/mark-all-read"),{},{withCredentials:!0});const e=(new Date).toISOString();c(t=>t.map(t=>(0,o.A)((0,o.A)({},t),{},{read_at:t.read_at||e}))),d(0),_u.oR.success("All notifications marked read")}catch(e){_u.oR.error("Could not mark all read")}finally{f(!1)}},disabled:h||0===u,className:"text-[10px] uppercase tracking-widest","data-testid":"".concat(n,"-mark-all-read"),children:[(0,oi.jsx)(zu.A,{className:"w-3 h-3 mr-1"}),"Mark all read"]})]}),(0,oi.jsx)("div",{className:"max-h-[420px] overflow-y-auto",children:0===l.length?(0,oi.jsxs)("div",{className:"px-4 py-10 text-center text-xs text-muted-foreground",children:[(0,oi.jsx)(Iu.A,{className:"w-8 h-8 mx-auto mb-2 text-muted-foreground/40"}),"You're all caught up."]}):l.map(e=>(0,oi.jsxs)("button",{type:"button",onClick:()=>(async e=>{if(s(!1),!e.read_at)try{await ju.A.post("".concat(Vu,"/api/notifications/").concat(e.notification_id,"/read"),{},{withCredentials:!0}),c(t=>t.map(t=>t.notification_id===e.notification_id?(0,o.A)((0,o.A)({},t),{},{read_at:(new Date).toISOString()}):t)),d(e=>Math.max(0,e-1))}catch(t){}e.link&&a(e.link)})(e),"data-testid":"".concat(n,"-row-").concat(e.notification_id),className:"w-full text-left px-4 py-3 flex items-start gap-3 border-b border-border/40 hover:bg-muted/20 transition-colors "+(e.read_at?"":"bg-primary/5"),children:[(0,oi.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[!e.read_at&&(0,oi.jsx)("span",{className:"w-2 h-2 rounded-full bg-primary shrink-0"}),(0,oi.jsx)("p",{className:"text-sm leading-snug "+(e.read_at?"text-muted-foreground":"font-bold"),children:e.title})]}),e.body&&(0,oi.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.body}),(0,oi.jsx)("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground
2/60 mt-1",children:Hu(e.created_at)}),(e.event_type||"").startsWith("ticket")&&e.related_id&&(0,oi.jsxs)("button",{type:"button",onClick:t=>{t.stopPropagation(),(async e=>{if(null!==e&&void 0!==e&&e.related_id)try{var t;const n=await ju.A.get("".concat(Vu,"/api/tickets/").concat(e.related_id),{withCredentials:!0});null!==(t=n.data)&&void 0!==t&&t.user_id&&(v(n.data.user_id),s(!1))}catch(n){_u.oR.error("Failed to open client profile")}})(e)},className:"text-[10px] text-primary hover:underline mt-1 inline-flex items-center gap-1","data-testid":"bell-open-profile-".concat(e.notification_id),children:[(0,oi.jsx)(Bu.A,{className:"w-3 h-3"}),"Open client profile"]})]}),e.link&&(0,oi.jsx)(qu,{className:"w-4 h-4 text-muted-foreground shrink-0 mt-1"})]},e.notification_id))})]}),(0,oi.jsx)(Uu.A,{userId:g,open:!!g,onClose:()=>v(null)})]})},Gu="https://nextgen-staging.emergent.host",$u=()=>{var e,t,n;const a=we(),i=be(),[s,o]=(0,r.useState)((null===(e=i.state)||void 0===e?void 0:e.user)||null),[l,c]=(0,r.useState)(!(null===(t=i.state)||void 0===t||!t.user)||null),[u,d]=(0,r.useState)({invoices:0,tickets:0,pendingInvoices:0,openTickets:0}),[h,f]=(0,r.useState)(null);(0,r.useEffect)(()=>{var e;if(null!==(e=i.state)&&void 0!==e&&e.user)return;(async()=>{try{const e=(await ju.A.get("".concat(Gu,"/api/auth/me"),{withCredentials:!0})).data;if("admin"===e.role||"accountant"===e.role)return void a("/admin",{replace:!0,state:{user:e}});if("technician"===e.role)return void a("/tech",{replace:!0,state:{user:e}});o(e),c(!0)}catch(e){c(!1),a("/login")}})()},[a,i.state]),(0,r.useEffect)(()=>{s&&("admin"===s.role||"accountant"===s.role?a("/admin",{replace:!0,state:{user:s}}):"technician"===s.role&&a("/tech",{replace:!0,state:{user:s}}))},[s,a]),(0,r.useEffect)(()=>{s&&p()},[s]);const p=async()=>{try{const[e,t,n]=await Promise.all([ju.A.get("".concat(Gu,"/api/invoices"),{withCredentials:!0}),ju.A.get("".concat(Gu,"/api/tickets"),{withCredentials:!0}),ju.A.get("".concat(Gu,"/api/dashboard/metrics"),{withCredentials:!0}).catch(()=>({data:null}))]),r=e.data,a=t.data;d({invoices:r.length,tickets:a.length,pendingInvoices:r.filter(e=>"pending"===e.status).length,openTickets:a.filter(e=>"open"===e.status||"in_progress"===e.status).length}),f(n.data)}catch(e){console.error("Failed to fetch stats:",e)}};return null===l?(0,oi.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary border-t-transparent rounded-full animate-spin mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-muted-foreground font-mono",children:"Loading..."})]})}):s?(0,oi.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,oi.jsx)("header",{className:"sticky top-0 z-50 w-full border-b border-border backdrop-blur-xl bg-background/80",children:(0,oi.jsx)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12",children:(0,oi.jsxs)("div",{className:"flex h-14 sm:h-16 items-center justify-between",children:[(0,oi.jsxs)("div",{className:"font-black text-lg sm:text-xl uppercase tracking-tight",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]}),(0,oi.jsxs)("div",{className:"flex items-center gap-2 sm:gap-4",children:[(0,oi.jsx)("span",{className:"text-xs sm:text-sm text-muted-foreground hidden sm:inline truncate max-w-[150px] md:max-w-none",children:s.email}),(0,oi.jsx)(Wu,{testIdPrefix:"client"}),(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:async()=>{try{await ju.A.post("".concat(Gu,"/api/auth/logout"),{},{withCredentials:!0}),_u.oR.success("Logged out successfully"),a("/")}catch(e){_u.oR.error("Logout failed")}},className:"text-xs sm:text-sm",children:[(0,oi.jsx)(Eu,{className:"w-4 h-4 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Logout"})]})]})]})})}),(0,oi.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12 py-6 sm:py-12",children:[(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},className:"mb-8 sm:mb-12",children:[(0,oi.jsxs)("h1",{className:"text-2xl sm:text-4xl md:text-5xl font-black uppercase mb-2",children:["Welcome, ",null===(n=s.name)||void 0===n?void 0:n.split(" ")[0]]}),(0,oi.jsx)("p",{className:"text-sm sm:text-base text-muted-foreground",children:"Manage your services, invoices, and support tickets"})]}),(0,oi.jsxs)("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-3 sm:gap-6 mb-8 sm:mb-12",children:[(0,oi.jsxs)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-colors",children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between mb-2 sm:mb-4",children:[(0,oi.jsx)(Lu.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-primary"}),(0,oi.jsx)("span",{className:"text-2xl sm:text-3xl font-black",children:u.invoices})]}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground uppercase tracking-wider",children:"Total Invoices"})]}),(0,oi.jsxs)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-colors",children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between mb-2 sm:mb-4",children:[(0,oi.jsx)(Lu.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-yellow-500"}),(0,oi.jsx)("span",{className:"text-2xl sm:text-3xl font-black",children:u.pendingInvoices})]}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground uppercase tracking-wider",children:"Pending"})]}),(0,oi.jsxs)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-colors",children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between mb-2 sm:mb-4",children:[(0,oi.jsx)(Pu.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-primary"}),(0,oi.jsx)("span",{className:"text-2xl sm:text-3xl font-black",children:u.tickets})]}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground uppercase tracking-wider",children:"Total Tickets"})]}),(0,oi.jsxs)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-colors",children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between mb-2 sm:mb-4",children:[(0,oi.jsx)(Pu.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-yellow-500"}),(0,oi.jsx)("span",{className:"text-2xl sm:text-3xl font-black",children:u.openTickets})]}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground uppercase tracking-wider",children:"Open"})]})]}),h&&h.active_services>0&&(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20}
2,animate:{opacity:1,y:0},transition:{duration:.6,delay:.3},className:"mb-8 sm:mb-12",children:[(0,oi.jsx)("h2",{className:"text-xl sm:text-2xl font-bold uppercase mb-4 sm:mb-6",children:"Service Performance"}),(0,oi.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-3 sm:gap-6",children:[(0,oi.jsx)(Nu.Zp,{className:"p-4 sm:p-6 border-border",children:(0,oi.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,oi.jsx)(Tu.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-primary flex-shrink-0"}),(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("div",{className:"text-2xl sm:text-3xl font-black",children:[h.overall_uptime,"%"]}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground uppercase tracking-wider",children:"Overall Uptime"})]})]})}),(0,oi.jsx)(Nu.Zp,{className:"p-4 sm:p-6 border-border",children:(0,oi.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,oi.jsx)(Ru.A,{className:"w-6 h-6 sm:w-8 sm:h-8 text-primary flex-shrink-0"}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("div",{className:"text-2xl sm:text-3xl font-black",children:h.total_requests.toLocaleString()}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground uppercase tracking-wider",children:"Total Requests"})]})]})}),(0,oi.jsx)(Nu.Zp,{className:"p-4 sm:p-6 border-border",children:(0,oi.jsxs)("div",{className:"flex items-center gap-3 sm:gap-4",children:[(0,oi.jsx)(Fu,{className:"w-6 h-6 sm:w-8 sm:h-8 text-primary flex-shrink-0"}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("div",{className:"text-2xl sm:text-3xl font-black",children:h.active_services}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground uppercase tracking-wider",children:"Active Services"})]})]})})]})]}),(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.5},children:[(0,oi.jsx)("h2",{className:"text-xl sm:text-2xl font-bold uppercase mb-4 sm:mb-6",children:"Quick Actions"}),(0,oi.jsxs)("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-3 sm:gap-6",children:[(0,oi.jsxs)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-all cursor-pointer group",onClick:()=>a("/credentials"),children:[(0,oi.jsx)(Mu.A,{className:"w-8 h-8 sm:w-12 sm:h-12 text-primary mb-2 sm:mb-4 group-hover:scale-110 transition-transform"}),(0,oi.jsx)("h3",{className:"text-base sm:text-xl font-bold mb-1 sm:mb-2",children:"Credentials"}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground hidden sm:block",children:"Secure password storage"})]}),(0,oi.jsxs)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-all cursor-pointer group",onClick:()=>a("/subscriptions"),children:[(0,oi.jsx)(Ou.A,{className:"w-8 h-8 sm:w-12 sm:h-12 text-primary mb-2 sm:mb-4 group-hover:scale-110 transition-transform"}),(0,oi.jsx)("h3",{className:"text-base sm:text-xl font-bold mb-1 sm:mb-2",children:"Subscriptions"}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground hidden sm:block",children:"Manage subscriptions"})]}),(0,oi.jsxs)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-all cursor-pointer group",onClick:()=>a("/services"),children:[(0,oi.jsx)(Du,{className:"w-8 h-8 sm:w-12 sm:h-12 text-primary mb-2 sm:mb-4 group-hover:scale-110 transition-transform"}),(0,oi.jsx)("h3",{className:"text-base sm:text-xl font-bold mb-1 sm:mb-2",children:"Services"}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground hidden sm:block",children:"Subscribe to services"})]}),(0,oi.jsxs)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-all cursor-pointer group",onClick:()=>a("/invoices"),children:[(0,oi.jsx)(Lu.A,{className:"w-8 h-8 sm:w-12 sm:h-12 text-primary mb-2 sm:mb-4 group-hover:scale-110 transition-transform"}),(0,oi.jsx)("h3",{className:"text-base sm:text-xl font-bold mb-1 sm:mb-2",children:"Invoices"}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground hidden sm:block",children:"Manage payments"})]}),(0,oi.jsxs)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-all cursor-pointer group",onClick:()=>a("/tickets"),children:[(0,oi.jsx)(Pu.A,{className:"w-8 h-8 sm:w-12 sm:h-12 text-primary mb-2 sm:mb-4 group-hover:scale-110 transition-transform"}),(0,oi.jsx)("h3",{className:"text-base sm:text-xl font-bold mb-1 sm:mb-2",children:"Tickets"}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground hidden sm:block",children:"Support requests"})]}),"admin"===s.role&&(0,oi.jsxs)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-all cursor-pointer group col-span-2 sm:col-span-1",onClick:()=>a("/admin"),children:[(0,oi.jsx)(fu.A,{className:"w-8 h-8 sm:w-12 sm:h-12 text-primary mb-2 sm:mb-4 group-hover:scale-110 transition-transform"}),(0,oi.jsx)("h3",{className:"text-base sm:text-xl font-bold mb-1 sm:mb-2",children:"Admin Panel"}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground hidden sm:block",children:"System management"})]})]})]})]})]}):null};var Yu=n(5949);const Ku=(0,du.A)("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);var Xu=n(764),Zu=n(2024);
2const Ju=(0,du.A)("credit-card",[["rect",{width:"20",height:"14",x:"2",y:"5",rx:"2",key:"ynyp8z"}],["line",{x1:"2",x2:"22",y1:"10",y2:"10",key:"1b3vmo"}]]);var Qu=n(9581);const ed="https://nextgen-staging.emergent.host",td=()=>{const e=we(),t=be(),[n,a]=(0,r.useState)(null),[i,s]=(0,r.useState)([]),[o,l]=(0,r.useState)(!0),[c,u]=(0,r.useState)(null);(0,r.useEffect)(()=>{d()},[]),(0,r.useEffect)(()=>{const e=new URLSearchParams(t.search).get("session_id");e&&f(e)},[t]);const d=async()=>{try{const e=await ju.A.get("".concat(ed,"/api/auth/me"),{withCredentials:!0});a(e.data),h()}catch(t){e("/login")}},h=async()=>{try{const e=await ju.A.get("".concat(ed,"/api/invoices"),{withCredentials:!0});s(e.data)}catch(e){_u.oR.error("Failed to fetch invoices")}finally{l(!1)}},f=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(t>=5)_u.oR.error("Payment status check timed out");else try{if("paid"===(await ju.A.get("".concat(ed,"/api/payments/status/").concat(e),{withCredentials:!0})).data.payment_status)return _u.oR.success("Payment successful!"),window.history.replaceState({},"","/invoices"),void h();setTimeout(()=>f(e,t+1),2e3)}catch(n){console.error("Error checking payment status:",n),_u.oR.error("Error checking payment status")}},p=e=>{const t={paid:"bg-primary text-primary-foreground",pending:"bg-yellow-500/20 text-yellow-500 border-yellow-500/50",overdue:"bg-destructive/20 text-destructive border-destructive/50"};return(0,oi.jsx)(Yu.E,{className:t[e]||t.pending,"data-testid":"invoice-status-".concat(e),children:e.toUpperCase()})};return o||!n?(0,oi.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary border-t-transparent rounded-full animate-spin mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-muted-foreground font-mono",children:"Loading..."})]})}):(0,oi.jsxs)("div",{className:"min-h-screen bg-background","data-testid":"invoices-page",children:[(0,oi.jsx)("header",{className:"sticky top-0 z-50 w-full border-b border-border backdrop-blur-xl bg-background/80",children:(0,oi.jsx)("div",{className:"container mx-auto px-6 md:px-12",children:(0,oi.jsxs)("div",{className:"flex h-16 items-center justify-between",children:[(0,oi.jsx)("div",{className:"flex items-center gap-4",children:(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:()=>e("/dashboard"),"data-testid":"back-to-dashboard-btn",children:[(0,oi.jsx)(Ku,{className:"w-4 h-4 mr-2"}),"Dashboard"]})}),(0,oi.jsxs)("div",{className:"font-black text-xl uppercase tracking-tight",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]})]})})}),(0,oi.jsx)("div",{className:"container mx-auto px-6 md:px-12 py-12",children:(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[(0,oi.jsx)("h1",{className:"text-4xl sm:text-5xl font-black uppercase mb-2","data-testid":"invoices-title",children:"INVOICES"}),(0,oi.jsx)("p",{className:"text-muted-foreground mb-12",children:"View and manage your invoices"}),0===i.length?(0,oi.jsx)(Nu.Zp,{className:"p-12 text-center border-border",children:(0,oi.jsx)("p",{className:"text-muted-foreground",children:"No invoices found"})}):(0,oi.jsx)("div",{className:"space-y-4",children:i.map((e,t)=>(0,oi.jsx)(uu.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.1*t},children:(0,oi.jsx)(Nu.Zp,{className:"p-6 border-border hover:border-primary/50 transition-colors","data-testid":"invoice-card-".concat(t),children:(0,oi.jsxs)("div",{className:"flex flex-col lg:flex-row lg:items-center lg:justify-between gap-4",children:[(0,oi.jsxs)("div",{className:"flex-1",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,oi.jsx)("h3",{className:"font-bold font-mono text-lg",children:e.wave_invoice_number?"#".concat(e.wave_invoice_number):e.invoice_id}),p(e.status)]}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground mb-1",children:e.description}),(0,oi.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Due: ",(0,Qu.GP)(new Date(e.due_date),"MMM dd, yyyy")]})]}),(0,oi.jsxs)("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-3",children:[(0,oi.jsxs)("div",{className:"text-right",children:[(0,oi.jsxs)("p",{className:"text-3xl font-black",children:["$",e.amount.toFixed(2)]}),(0,oi.jsx)("p",{className:"text-xs text-muted-foreground uppercase",children:e.currency})]}),(0,oi.jsxs)("div",{className:"flex flex-wrap gap-2",children:[e.wave_view_url&&(0,oi.jsxs)(vu.$,{variant:"outline",onClick:()=>window.open(e.wave_view_url,"_blank","noopener,noreferrer"),className:"font-bold uppercase","data-testid":"view-invoice-btn-".concat(t),children:[(0,oi.jsx)(Xu.A,{className:"w-4 h-4 mr-2"}),"View Invoice"]}),e.wave_pdf_url&&(0,oi.jsx)(vu.$,{variant:"outline",size:"icon",onClick:()=>window.open(e.wave_pdf_url,"_blank","noopener,noreferrer"),title:"Download PDF","data-testid":"download-pdf-btn-".concat(t),children:(0,oi.jsx)(Lu.A,{className:"w-4 h-4"})}),"pending"===e.status&&(0,oi.jsx)(vu.$,{onClick:()=>(async e=>{u(e.invoice_id);try{const t=window.location.origin,n=await ju.A.post("".concat(ed,"/api/payments/checkout"),{invoice_id:e.invoice_id,origin_url:t},{withCredentials:!0});window.location.href=n.data.url}catch(t){console.error("Payment error:",t),_u.oR.error("Failed to initiate payment"),u(null)}})(e),disabled:c===e.invoice_id,className:"font-bold uppercase","data-testid":"pay-invoice-btn-".concat(t),children:c===e.invoice_id?(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(Zu.A,{className:"w-4 h-4 mr-2 animate-spin"}),"Processing"]}):(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(Ju,{className:"w-4 h-4 mr-2"}),"Pay Now"]})})]})]})]})})},e.invoice_id))})]})})]})};var nd=n(2264),rd=n(556),ad=n(3416),id=n(6178),sd=n(5598),od=n(1360),ld=n(6833),cd=n(6095),ud=n(9598);const dd="https://nextgen-staging.emergent.host",hd=e=>{let{ticketId:t,compact:n=!1}=e;const[a,i]=(0,r.useState)(null),[s,l]=(0,r.useState)(null),[c,u]=(0,r.useState)(""),[d,h]=(0,r.useState)(!1),[f,p]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=!1;return(async()=>{try{const n=await ju.A.get("".concat(dd,"/api/tickets/").concat(t,"/feedback"),{withCredentials:!0});!e&&n.data&&(i(n.data),u(n.data.comment||""))}catch(_f){}})(),()=>{e=!0}},[t]);const m=async function(e){let n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];h(!0);try{const r={rating:e};n&&(r.comment=c);const s=await ju.A.post("".concat(dd,"/api/tickets/").concat(t,"/feedback"),r,{withCredentials:!0});i((0,o.A)((0,o.A)({},a||{}),s.data)),_u.oR.success("Thanks for the feedback"),p(!1),l(null)}catch(jf){var r,s;_u.oR.error((null===(r=jf.response)||void 0===r||null===(s=r.data)||void 0===s?void 0:s.detail)||"Failed to save feedback")}finally{h(!1)}},g=e=>{l(e),p(!0),m(e,!1)},v=n?"p-3":"p-4",b="helpful"===((null===a||void 0===a?void 0:a.rating)||s),y="not_helpful"===((null===a||void 0===a?void 0:a.rating)||s);return(0,oi.jsxs)("div",{className:"bg-muted/30 rounded-sm border border-border ".concat(v),"data-testid":"ticket-feedback-".concat(t),children:[(0,oi.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-2",children:[(0,oi.jsx)("p",{className:"text-xs uppercase tracking-wider text-muted-foreground flex items-center gap-2",children:a?(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(ld.A,{className:"w-3.5 h-3.5 text-primary"}),"Feedback recorded \u2014 thanks!"]}):"Was this support helpful?"}),(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsxs)(vu.$,{type:"button",size:"sm",variant:b?"default":"outline",onClick:()=>g("helpful"),disabled:d,"data-testid":"feedback-helpful-".concat(t),children:[(0,oi.jsx)(cd.A,{className:"w-3.5 h-3.5 mr-1.5"}),"Helpful"]}),(0,oi.jsxs)(vu.$,{type:"button",size:"sm",variant:y?"destructive":"outline",onClick:()=>g("not_helpful"),disabled:d,"data-testid":"feedback-not-helpful-".concat(t),children:[(0,oi.jsx)(ud.A,{className:"w-3.5 h-3.5 mr-1.5"}),"Not Helpful"]})]})]}),(f||a&&a.comment)&&(0,oi.jsxs)("div",{className:"mt-3 space-y-2",children:[(0,oi.jsx)(ad.T,{value:c,onChange:e=>u(e.target.value),placeholder:"Optional: tell us why (1000 chars max)",rows:2,maxLength:1e3,className:"bg-input text-sm","data-testid":"feedback-comment-".concat(t)}),(0,oi.jsx)(vu.$,{type:"button",size:"sm",variant:"outline",onClick:()=>m((null===a||void 0===a?void 0:a.rating)||s,!0),disabled:d||!(null!==a&&void 0!==a&&a.rating||s),"data-testid":"feedback-comment-submit-".concat(t),children:null!==a&&void 0!==a&&a.comment?"Update Comment":"Send Comment"})]})]})};var fd=n(7801);const pd="https://nextgen-staging.emergent.host",md=()=>{const e=we(),[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)([]),[s,l]=(0,r.useState)(!0),[c,u]=(0,r.useState)(!1),[d,h]=(0,r.useState)(null),[f,p]=(0,r.useState)(!1),[m,g]=(0,r.useState)({title:"",description:"",priority:"medium",category:"general"});(0,r.useEffect)(()=>{v()},[]);const v=async()=>{try{const e=await ju.A.get("".concat(pd,"/api/auth/me"),{withCredentials:!0});n(e.data),b()}catch(t){e("/login")}},b=async()=>{try{const e=await ju.A.get("".concat(pd,"/api/tickets"),{withCredentials:!0});i(e.data)}catch(e){_u.oR.error("Failed to fetch tickets")}finally{l(!1)}},y=e=>{const t={low:"bg-blue-500/20 text-blue-500 border-blue-500/50",medium:"bg-yellow-500/20 text-yellow-500 border-yellow-500/50",high:"bg-orange-500/20 text-orange-500 border-orange-500/50",critical:"bg-destructive/20 text-destructive border-destructive/50"};return(0,oi.jsx)(Yu.E,{className:t[e]||t.medium,"data-testid":"priority-".concat(e),children:e.toUpperCase()})},x=e=>{const t={open:"bg-yellow-500/20 text-yellow-500 border-yellow-500/50",in_progress:"bg-blue-500/20 text-blue-500 border-blue-500/50",resolved:"bg-primary text-primary-foreground",closed:"bg-muted text-muted-foreground border-muted"};return(0,oi.jsx)(Yu.E,{className:t[e]||t.open,"data-testid":"status-".concat(e),children:e.replace("_"," ").toUpperCase()})};return s||!t?(0,oi.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary border-t-transparent roun
2ded-full animate-spin mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-muted-foreground font-mono",children:"Loading..."})]})}):(0,oi.jsxs)("div",{className:"min-h-screen bg-background","data-testid":"tickets-page",children:[(0,oi.jsx)("header",{className:"sticky top-0 z-50 w-full border-b border-border backdrop-blur-xl bg-background/80",children:(0,oi.jsx)("div",{className:"container mx-auto px-6 md:px-12",children:(0,oi.jsxs)("div",{className:"flex h-16 items-center justify-between",children:[(0,oi.jsx)("div",{className:"flex items-center gap-4",children:(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:()=>e("/dashboard"),"data-testid":"back-to-dashboard-btn",children:[(0,oi.jsx)(Ku,{className:"w-4 h-4 mr-2"}),"Dashboard"]})}),(0,oi.jsxs)("div",{className:"font-black text-xl uppercase tracking-tight",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]})]})})}),(0,oi.jsx)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12 py-6 sm:py-12",children:(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[(0,oi.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8 sm:mb-12",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("h1",{className:"text-2xl sm:text-4xl md:text-5xl font-black uppercase mb-2","data-testid":"tickets-title",children:"SUPPORT TICKETS"}),(0,oi.jsx)("p",{className:"text-sm sm:text-base text-muted-foreground",children:"Create and track your support requests"})]}),(0,oi.jsxs)(sd.lG,{open:c,onOpenChange:u,children:[(0,oi.jsx)(sd.zM,{asChild:!0,children:(0,oi.jsxs)(vu.$,{className:"font-bold uppercase w-full sm:w-auto","data-testid":"create-ticket-btn",children:[(0,oi.jsx)(od.A,{className:"w-4 h-4 mr-2"}),"New Ticket"]})}),(0,oi.jsxs)(sd.Cf,{className:"bg-card border-border mx-4 sm:mx-0 max-w-lg",children:[(0,oi.jsx)(sd.c7,{children:(0,oi.jsx)(sd.L3,{className:"text-xl sm:text-2xl font-bold uppercase",children:"Create Support Ticket"})}),(0,oi.jsxs)("form",{onSubmit:async e=>{e.preventDefault();try{await ju.A.post("".concat(pd,"/api/tickets"),m,{withCredentials:!0}),_u.oR.success("Ticket created successfully"),u(!1),g({title:"",description:"",priority:"medium",category:"general"}),b()}catch(r){var t,n;console.error("Error creating ticket:",r);const e=null===(t=r.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.detail,a=Array.isArray(e)?e.map(e=>{var t;return"".concat((null===(t=e.loc)||void 0===t?void 0:t[e.loc.length-1])||"field",": ").concat(e.msg)}).join("; "):"string"===typeof e?e:"Failed to create ticket";_u.oR.error(a)}},className:"space-y-4",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{htmlFor:"title",className:"uppercase text-xs tracking-widest",children:"Title"}),(0,oi.jsx)(nd.p,{id:"title",value:m.title,onChange:e=>g((0,o.A)((0,o.A)({},m),{},{title:e.target.value})),required:!0,className:"bg-input","data-testid":"ticket-title-input"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{htmlFor:"description",className:"uppercase text-xs tracking-widest",children:"Description"}),(0,oi.jsx)(ad.T,{id:"description",value:m.description,onChange:e=>g((0,o.A)((0,o.A)({},m),{},{description:e.target.value})),required:!0,rows:4,className:"bg-input","data-testid":"ticket-description-input"})]}),(0,oi.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{htmlFor:"priority",className:"uppercase text-xs tracking-widest",children:"Priority"}),(0,oi.jsxs)(id.l6,{value:m.priority,onValueChange:e=>g((0,o.A)((0,o.A)({},m),{},{priority:e})),children:[(0,oi.jsx)(id.bq,{className:"bg-input","data-testid":"ticket-priority-select",children:(0,oi.jsx)(id.yv,{})}),(0,oi.jsxs)(id.gC,{children:[(0,oi.jsx)(id.eb,{value:"low",children:"Low"}),(0,oi.jsx)(id.eb,{value:"medium",children:"Medium"}),(0,oi.jsx)(id.eb,{value:"high",children:"High"}),(0,oi.jsx)(id.eb,{value:"urgent",children:"Urgent"})]})]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{htmlFor:"category",className:"uppercase text-xs tracking-widest",children:"Category"}),(0,oi.jsxs)(id.l6,{value:m.category,onValueChange:e=>g((0,o.A)((0,o.A)({},m),{},{category:e})),children:[(0,oi.jsx)(id.bq,{className:"bg-input","data-testid":"ticket-category-select",children:(0,oi.jsx)(id.yv,{})}),(0,oi.jsxs)(id.gC,{children:[(0,oi.jsx)(id.eb,{value:"general",children:"General"}),(0,oi.jsx)(id.eb,{value:"technical",children:"Technical"}),(0,oi.jsx)(id.eb,{value:"billing",children:"Billing"}),(0,oi.jsx)(id.eb,{value:"network",children:"Network"}),(0,oi.jsx)(id.eb,{value:"security",children:"Security"})]})]})]})]}),(0,oi.jsx)(vu.$,{type:"submit",className:"w-full font-bold uppercase","data-testid":"submit-ticket-btn",children:"Create Ticket"})]})]})]})]}),0===a.length?(0,oi.jsxs)(Nu.Zp,{className:"p-12 text-center border-border",children:[(0,oi.jsx)(Pu.A,{className:"w-16 h-16 text-muted-foreground mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-muted-foreground",children:"No tickets found"}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground mt-2",children:"Create your first support ticket to get started"})]}):(0,oi.jsx)("div",{className:"space-y-4",children:a.map((e,t)=>(0,oi.jsx)(uu.div,{initial:{opacity:0,y:20}
2,animate:{opacity:1,y:0},transition:{duration:.6,delay:.1*t},children:(0,oi.jsx)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-colors","data-testid":"ticket-card-".concat(t),children:(0,oi.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,oi.jsx)("div",{className:"flex flex-col sm:flex-row sm:items-start sm:justify-between gap-3",children:(0,oi.jsxs)("div",{className:"flex-1",children:[(0,oi.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:[(0,oi.jsx)("h3",{className:"font-bold text-base sm:text-lg",children:e.title}),y(e.priority),x(e.status),(0,oi.jsx)(fd.A,{slaState:e.sla_state,compact:!0})]}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground mb-2",children:e.description}),(0,oi.jsxs)("div",{className:"flex flex-wrap items-center gap-2 sm:gap-4 text-xs text-muted-foreground",children:[(0,oi.jsx)("span",{className:"font-mono",children:e.ticket_id}),(0,oi.jsxs)("span",{className:"hidden sm:inline",children:["Category: ",e.category]}),(0,oi.jsxs)("span",{children:["Created: ",(0,Qu.GP)(new Date(e.created_at),"MMM dd, yyyy")]})]})]})}),e.admin_response&&(0,oi.jsxs)("div",{className:"mt-4 p-4 bg-muted/50 rounded-sm border border-border",children:[(0,oi.jsx)("p",{className:"text-xs text-muted-foreground uppercase tracking-wider mb-2",children:"Admin Response"}),(0,oi.jsx)("p",{className:"text-sm",children:e.admin_response})]}),e.attachments&&e.attachments.length>0&&(0,oi.jsxs)("div",{className:"mt-4",children:[(0,oi.jsx)("p",{className:"text-xs text-muted-foreground uppercase tracking-wider mb-2",children:"Attachments"}),(0,oi.jsx)("div",{className:"flex flex-wrap gap-2",children:e.attachments.map((e,t)=>(0,oi.jsxs)("a",{href:e.data,download:e.filename,className:"text-xs bg-muted px-3 py-2 rounded-sm border border-border hover:border-primary transition-colors",children:[e.filename," (",Math.round(e.size/1024),"KB)"]},t))})]}),(0,oi.jsxs)("div",{className:"mt-4 flex items-center gap-2",children:[(0,oi.jsx)("input",{type:"file",id:"file-upload-".concat(e.ticket_id),className:"hidden",onChange:t=>(async(e,t)=>{const n=t.target.files[0];if(n)if(n.size>5242880)_u.oR.error("File size exceeds 5MB limit");else{p(!0);try{const t=new FormData;t.append("file",n),await ju.A.post("".concat(pd,"/api/tickets/").concat(e,"/upload"),t,{withCredentials:!0,headers:{"Content-Type":"multipart/form-data"}}),_u.oR.success("File uploaded successfully"),b()}catch(i){var r,a;console.error("Error uploading file:",i),_u.oR.error((null===(r=i.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.detail)||"Failed to upload file")}finally{p(!1)}}})(e.ticket_id,t),disabled:f}),(0,oi.jsx)(vu.$,{variant:"outline",size:"sm",onClick:()=>document.getElementById("file-upload-".concat(e.ticket_id)).click(),disabled:f,children:f?"Uploading...":"Attach File"}),(0,oi.jsx)("span",{className:"text-xs text-muted-foreground",children:"Max 5MB (PDF, Images, Documents)"})]}),"closed"===e.status&&(0,oi.jsx)(hd,{ticketId:e.ticket_id,compact:!0})]})})},e.ticket_id))})]})})]})};var gd=n(1311);const vd=(0,du.A)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]),bd=(0,du.A)("database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]),yd=(0,du.A)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),xd=(0,du.A)("sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]),wd=(0,du.A)("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]),kd="https://nextgen-staging.emergent.host",Nd={Server:vd,Shield:fu.A,Cloud:pu.A,Database:bd,Network:hu,Lock:yd,Sparkles:xd,HeadphonesIcon:wd,Headphones:wd},Ad=e=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(Number(e)||0),jd=e=>{var t,n,a;let{service:i,open:s,onClose:l,mode:c="quote",onSuccess:u}=e;const[d,h]=(0,r.useState)(null),[f,p]=(0,r.useState)(1),[m,g]=(0,r.useState)([]),[v,b]=(0,r.useState)(!1),[y,x]=(0,r.useState)({client_name:"",client_email:"",client_phone:"",notes:""});(0,r.useEffect)(()=>{var e;i&&("tiered"===i.pricing_type&&null!==(e=i.tiers)&&void 0!==e&&e.length?h(i.tiers[0].tier_id):h(null),p(1),g([]),x({client_name:"",client_email:"",client_phone:"",notes:""}))},[null===i||void 0===i?void 0:i.service_id]);const w=(0,r.useMemo)(()=>{var e;if(!i)return null;const t=i.pricing_type||"flat";let n="",r=0;if("tiered"===t&&null!==(e=i.tiers)&&void 0!==e&&e.length){const e=i.tiers.find(e=>e.tier_id===d)||i.tiers[0];n="".concat(i.name," \u2014 ").concat(e.name),r=Number(e.price)||0}else if("per_device"===t){const e=Number(i.price)||0,t=Number(i.per_device_price)||0,a=Math.max(parseInt(f||0,10),0
2);n=e?"".concat(i.name," \u2014 base + ").concat(a," device(s) \xd7 ").concat(Ad(t)):"".concat(i.name," \u2014 ").concat(a," device(s) \xd7 ").concat(Ad(t)),r=e+t*a}else n=i.name,r=Number(i.price)||0;const a=(i.addons||[]).filter(e=>m.includes(e.addon_id)),s=a.filter(e=>"monthly"===(e.charge_type||"monthly")),o=a.filter(e=>"one_time"===e.charge_type),l=s.reduce((e,t)=>e+(Number(t.price)||0),0),c=o.reduce((e,t)=>e+(Number(t.price)||0),0);return{baseLabel:n,baseAmount:r,monthlyAddons:s,oneTimeAddons:o,monthlyAddonsTotal:l,oneTimeTotal:c,monthlyRecurring:r+l}},[i,d,f,m]);if(!i)return null;const k=Nd[i.icon]||vd,N=i.pricing_type||"flat";return(0,oi.jsx)(sd.lG,{open:s,onOpenChange:e=>!e&&(null===l||void 0===l?void 0:l()),children:(0,oi.jsxs)(sd.Cf,{className:"bg-card border-border max-w-3xl max-h-[90vh] overflow-y-auto","data-testid":"service-detail-dialog",children:[(0,oi.jsx)(sd.c7,{children:(0,oi.jsxs)("div",{className:"flex items-start gap-4",children:[(0,oi.jsx)("div",{className:"w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,oi.jsx)(k,{className:"w-6 h-6 text-primary"})}),(0,oi.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,oi.jsx)(sd.L3,{className:"text-2xl font-black uppercase tracking-tight",children:i.name}),(0,oi.jsx)(sd.rr,{className:"text-muted-foreground mt-1",children:i.description})]})]})}),(0,oi.jsxs)("div",{className:"space-y-6 py-4",children:[(null===(t=i.features)||void 0===t?void 0:t.length)>0&&(0,oi.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:i.features.map((e,t)=>(0,oi.jsxs)("div",{className:"flex items-start gap-2 text-sm",children:[(0,oi.jsx)(ld.A,{className:"w-4 h-4 text-primary mt-0.5 shrink-0"}),(0,oi.jsx)("span",{children:e})]},t))}),(0,oi.jsxs)("div",{className:"space-y-4 p-4 rounded-lg bg-muted/20 border border-border/40",children:[(0,oi.jsx)("p",{className:"text-xs uppercase tracking-widest text-muted-foreground",children:"Configure your plan"}),"tiered"===N&&(null===(n=i.tiers)||void 0===n?void 0:n.length)>0&&(0,oi.jsxs)("div",{className:"space-y-2","data-testid":"tier-picker",children:[(0,oi.jsx)(rd.J,{className:"text-sm",children:"Plan"}),(0,oi.jsx)("div",{className:"grid gap-2",children:i.tiers.map(e=>{var t;const n=d===e.tier_id;return(0,oi.jsx)("button",{type:"button",onClick:()=>h(e.tier_id),"data-testid":"tier-".concat(e.tier_id),className:"text-left p-3 rounded border transition-colors ".concat(n?"border-primary bg-primary/10":"border-border hover:border-primary/50"),children:(0,oi.jsxs)("div",{className:"flex items-center justify-between",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"font-bold",children:e.name}),(0,oi.jsxs)("p",{className:"text-xs text-muted-foreground",children:[e.min_devices,"\u2013",null!==(t=e.max_devices)&&void 0!==t?t:"\u221e"," devices"]})]}),(0,oi.jsxs)("p",{className:"font-mono font-bold text-primary",children:[Ad(e.price),(0,oi.jsx)("span",{className:"text-xs text-muted-foreground",children:"/mo"})]})]})},e.tier_id)})})]}),"per_device"===N&&(0,oi.jsxs)("div",{className:"space-y-2","data-testid":"device-count-picker",children:[(0,oi.jsxs)(rd.J,{htmlFor:"device-count",className:"text-sm",children:["Number of devices",(0,oi.jsxs)("span",{className:"ml-2 text-xs text-muted-foreground",children:["(base ",Ad(i.price)," + ",Ad(i.per_device_price)," per device)"]})]}),(0,oi.jsx)(nd.p,{id:"device-count",type:"number",min:1,value:f,onChange:e=>p(e.target.value),className:"w-32 bg-input","data-testid":"device-count-input"})]}),(null===(a=i.addons)||void 0===a?void 0:a.length)>0&&(0,oi.jsxs)("div",{className:"space-y-2","data-testid":"addons-picker",children:[(0,oi.jsx)(rd.J,{className:"text-sm",children:"Add-ons"}),(0,oi.jsx)("div",{className:"grid gap-2",children:i.addons.map(e=>(0,oi.jsxs)("label",{htmlFor:"addon-".concat(e.addon_id),className:"flex items-start gap-3 p-3 rounded border border-border hover:border-primary/50 cursor-pointer transition-colors",children:[(0,oi.jsx)(gd.S,{id:"addon-".concat(e.addon_id),checked:m.includes(e.addon_id),onCheckedChange:()=>(e=>{g(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])})(e.addon_id),"data-testid":"addon-checkbox-".concat(e.addon_id)}),(0,oi.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,oi.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,oi.jsxs)("p",{className:"text-sm font-mono text-primary whitespace-nowrap",children:[Ad(e.price),(0,oi.jsx)("span",{className:"text-[10px] text-muted-foreground ml-1",children:"one_time"===e.charge_type?"one-time":"/mo"})]})]}),e.description&&(0,oi.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.description})]})]},e.addon_id))})]})]}),w&&(0,oi.jsxs)("div",{className:"p-4 rounded-lg bg-card border border-primary/30","data-testid":"price-breakdown",children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between text-sm",children:[(0,oi.jsx)("span",{children:w.baseLabel}),(0,oi.jsxs)("span",{className:"font-mono",children:[Ad(w.baseAmount),"/mo"]})]}),w.monthlyAddons.map(e=>(0,oi.jsxs)("div",{className:"flex items-center justify-between text-sm text-muted-foreground",children:[(0,oi.jsxs)("span",{children:["+ ",e.name]}),(0,oi.jsxs)("span",{className:"font-mono",children:[Ad(e.price),"/mo"]})]},e.addon_id)),(0,oi.jsxs)("div",{className:"border-t border-border mt-2 pt-2 flex items-center justify-between",children:[(0,oi.jsx)("span",{className:"text-sm font-bold uppercase tracking-widest",children:"Monthly"}),(0,oi.jsx)("span",{className:"text-2xl font-black text-primary font-mono","data-testid":"price-monthly-total",children:Ad(w.monthlyRecurring)})]}),w.oneTimeTotal>0&&(0,oi.jsxs)(oi.Fragment,{children:[w.oneTimeAddons.map(e=>(0,oi.jsxs)("div",{className:"flex items-center justify-between text-xs text-muted-foreground mt-1",children:[(0,oi.jsxs)("span",{children:["+ ",e.name," ",(0,oi.jsx)(Yu.E,{variant:"outline",className:"text-[9px] ml-1",children:"one-time"})]}),(0,oi.jsx)("span",{className:"font-mono",children:Ad(e.price)})]},e.addon_id)),(0,oi.jsxs)("div",{className:"border-t border-border/40 mt-2 pt-2 flex items-center justify-between",children:[(0,oi.jsx)("span",{className:"text-xs font-bold uppercase tracking-widest text-muted-foreground",children:"One-time setup"}),(0,oi.jsx)("span",{className:"text-sm font-mono font-bold","data-testid":"price-
2onetime-total",children:Ad(w.oneTimeTotal)})]})]})]}),"quote"===c&&(0,oi.jsxs)("div",{className:"space-y-3 p-4 rounded-lg bg-muted/20 border border-border/40","data-testid":"quote-contact-form",children:[(0,oi.jsx)("p",{className:"text-xs uppercase tracking-widest text-muted-foreground",children:"Your contact info"}),(0,oi.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{htmlFor:"qc-name",className:"text-xs",children:"Name"}),(0,oi.jsx)(nd.p,{id:"qc-name",value:y.client_name,onChange:e=>x((0,o.A)((0,o.A)({},y),{},{client_name:e.target.value})),className:"bg-input","data-testid":"quote-client-name"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{htmlFor:"qc-email",className:"text-xs",children:"Email"}),(0,oi.jsx)(nd.p,{id:"qc-email",type:"email",value:y.client_email,onChange:e=>x((0,o.A)((0,o.A)({},y),{},{client_email:e.target.value})),className:"bg-input","data-testid":"quote-client-email"})]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{htmlFor:"qc-phone",className:"text-xs",children:"Phone (optional)"}),(0,oi.jsx)(nd.p,{id:"qc-phone",value:y.client_phone,onChange:e=>x((0,o.A)((0,o.A)({},y),{},{client_phone:e.target.value})),className:"bg-input","data-testid":"quote-client-phone"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{htmlFor:"qc-notes",className:"text-xs",children:"Notes (optional)"}),(0,oi.jsx)(ad.T,{id:"qc-notes",rows:2,value:y.notes,onChange:e=>x((0,o.A)((0,o.A)({},y),{},{notes:e.target.value})),className:"bg-input","data-testid":"quote-notes"})]})]}),(0,oi.jsx)(vu.$,{className:"w-full",disabled:v,onClick:async()=>{if("quote"!==c||y.client_name.trim()&&y.client_email.trim()){b(!0);try{if("quote"===c){const e=await ju.A.post("".concat(kd,"/api/services/").concat(i.service_id,"/request-quote"),(0,o.A)({tier_id:d,device_count:parseInt(f||1,10),addon_ids:m},y));_u.oR.success(e.data.message||"Quote request received!"),null===u||void 0===u||u(e.data),null===l||void 0===l||l()}else{const e=await ju.A.post("".concat(kd,"/api/subscriptions"),{service_id:i.service_id,tier_id:d,device_count:parseInt(f||1,10),addon_ids:m},{withCredentials:!0});_u.oR.success("Subscription activated"),null===u||void 0===u||u(e.data),null===l||void 0===l||l()}}catch(jf){var e,t;const r=null===(e=jf.response)||void 0===e||null===(t=e.data)||void 0===t?void 0:t.detail,a="string"===typeof r?r:jf.message||"Request failed";_u.oR.error(a)}finally{b(!1)}}else _u.oR.error("Please enter your name and email")},"data-testid":"service-detail-submit-btn",children:v?"Submitting...":"quote"===c?"REQUEST QUOTE":"SUBSCRIBE NOW"})]})]})})},_d="https://nextgen-staging.emergent.host",Sd=()=>{const e=we(),[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)(!1),[s,o]=(0,r.useState)([]),[l,c]=(0,r.useState)([]),[u,d]=(0,r.useState)(!0),[h,f]=(0,r.useState)(null),p=(0,r.useCallback)(async e=>{try{const t=ju.A.get("".concat(_d,"/api/services")),n=e?ju.A.get("".concat(_d,"/api/subscriptions"),{withCredentials:!0}).catch(()=>({data:[]})):Promise.resolve({data:[]}),[r,a]=await Promise.all([t,n]);o(r.data),c(a.data)}catch(jf){_u.oR.error("Failed to load services")}finally{d(!1)}},[]);(0,r.useEffect)(()=>{let e=!1;return(async()=>{try{const t=await ju.A.get("".concat(_d,"/api/auth/me"),{withCredentials:!0});e||(n(t.data),i(!0),p(!0))}catch(jf){e||(n(null),i(!0),p(!1))}})(),()=>{e=!0}},[p]);if(u||!a)return(0,oi.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary border-t-transparent rounded-full animate-spin mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-muted-foreground font-mono",children:"Loading..."})]})});const m=!!t,g=m&&"client"===t.role?"subscribe":"quote",v=m?(0,oi.jsx)("header",{className:"sticky top-0 z-40 w-full border-b border-border backdrop-blur-xl bg-background/80",children:(0,oi.jsx)("div",{className:"container mx-auto px-6 md:px-12",children:(0,oi.jsxs)("div",{className:"flex h-16 items-center justify-between",children:[(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:()=>e("/dashboard"),"data-testid":"back-to-dashboard-btn",children:[(0,oi.jsx)(Ku,{className:"w-4 h-4 mr-2"}),"Dashboard"]}),(0,oi.jsxs)("div",{className:"font-black text-xl uppercase tracking-tight",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]})]})})}):(0,oi.jsx)(xu,{});return(0,oi.jsxs)("div",{className:"min-h-screen bg-background",children:[v,(0,oi.jsx)("div",{className:"container mx-auto px-6 md:px-12 py-12",children:(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20}
2,animate:{opacity:1,y:0},transition:{duration:.6},children:[(0,oi.jsx)("h1",{className:"text-4xl sm:text-5xl font-black uppercase mb-2",children:m?"AVAILABLE SERVICES":"OUR SERVICES"}),(0,oi.jsx)("p",{className:"text-muted-foreground mb-12",children:m?"Click a service to configure pricing and subscribe.":"Click a service to see details, configure your plan, and request a quote."}),(0,oi.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:s.map((e,t)=>{var n,r;const a=(i=e.service_id,l.some(e=>e.service_id===i&&"active"===e.status));var i;const s=(e=>{var t;return"tiered"===(e.pricing_type||"flat")&&null!==(t=e.tiers)&&void 0!==t&&t.length?Math.min(...e.tiers.map(e=>Number(e.price)||0)):Number(e.price)||0})(e),o=e.pricing_type||"flat";return(0,oi.jsx)(uu.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.05*t},children:(0,oi.jsx)("div",{role:"button",tabIndex:0,onClick:()=>f(e),onKeyDown:t=>{"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),f(e))},className:"text-left w-full group cursor-pointer focus:outline-none focus-visible:ring-2 focus-visible:ring-primary rounded","data-testid":"service-card-".concat(e.service_id),children:(0,oi.jsxs)(Nu.Zp,{className:"p-6 border-border group-hover:border-primary/60 transition-colors h-full flex flex-col cursor-pointer",children:[(0,oi.jsxs)("div",{className:"relative h-48 -mx-6 -mt-6 mb-6 overflow-hidden",children:[(0,oi.jsx)("img",{src:e.image_url,alt:e.name,className:"w-full h-full object-cover transition-transform group-hover:scale-105"}),(0,oi.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-card via-card/50 to-transparent"})]}),(0,oi.jsxs)("div",{className:"flex-1",children:[(0,oi.jsx)("h3",{className:"text-2xl font-bold mb-2 group-hover:text-primary transition-colors",children:e.name}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground mb-4 line-clamp-2",children:e.description}),(0,oi.jsxs)("div",{className:"mb-4",children:[(0,oi.jsxs)("div",{className:"flex items-baseline gap-2",children:["flat"!==o&&(0,oi.jsx)("span",{className:"text-[10px] uppercase tracking-widest text-muted-foreground",children:"from"}),(0,oi.jsxs)("span",{className:"text-3xl font-black text-primary font-mono",children:["$",s.toFixed(2)]}),(0,oi.jsx)("span",{className:"text-xs text-muted-foreground",children:(c=e.billing_cycle,{monthly:"/mo",quarterly:"/qtr",yearly:"/yr","one-time":"one-time"}[c]||c)})]}),"tiered"===o&&(0,oi.jsxs)("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground mt-1",children:[(null===(n=e.tiers)||void 0===n?void 0:n.length)||0," plans available"]}),"per_device"===o&&(0,oi.jsxs)("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground mt-1",children:["+ $",(e.per_device_price||0).toFixed(2),"/device"]}),(null===(r=e.addons)||void 0===r?void 0:r.length)>0&&(0,oi.jsxs)("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground mt-1",children:[e.addons.length," add-on",1===e.addons.length?"":"s"," available"]})]}),(0,oi.jsxs)("div",{className:"space-y-1.5 mb-4",children:[e.features.slice(0,4).map((e,t)=>(0,oi.jsxs)("div",{className:"flex items-start gap-2",children:[(0,oi.jsx)(zu.A,{className:"w-3.5 h-3.5 text-primary mt-0.5 flex-shrink-0"}),(0,oi.jsx)("span",{className:"text-xs text-muted-foreground",children:e})]},t)),e.features.length>4&&(0,oi.jsxs)("p",{className:"text-[10px] text-muted-foreground italic",children:["+",e.features.length-4," more"]})]})]}),a?(0,oi.jsxs)(Yu.E,{className:"w-full justify-center py-2 bg-primary/10 text-primary border border-primary/30",children:[(0,oi.jsx)(zu.A,{className:"w-4 h-4 mr-2"}),"Subscribed"]}):(0,oi.jsxs)("div",{className:"w-full bg-primary text-primary-foreground font-bold uppercase py-2 px-4 rounded-md flex items-center justify-center group-hover:bg-primary/90 transition-colors",children:["subscribe"===g?"Configure & Subscribe":"View Details & Quote",(0,oi.jsx)(gu.A,{className:"w-4 h-4 ml-2"})]})]})})},e.service_id);var c})})]})}),!m&&(0,oi.jsx)(wu,{}),(0,oi.jsx)(jd,{service:h,open:!!h,onClose:()=>f(null),mode:g,onSuccess:()=>{m&&p(!0)}})]})};
2var Cd=n(7427),Ed=n(917),Ld=n(9766);const Pd=["className"],Td=["side","className","children"],Rd=["className"],Fd=["className"],Md=["className"],Od=Cd.bL,Dd=(Cd.l9,Cd.bm,Cd.ZL),Id=r.forwardRef((e,t)=>{let{className:n}=e,r=(0,s.A)(e,Pd);return(0,oi.jsx)(Cd.hJ,(0,o.A)((0,o.A)({className:(0,Ld.cn)("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",n)},r),{},{ref:t}))});Id.displayName=Cd.hJ.displayName;const zd=(0,Ed.F)("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 data-[state=open]:animate-in data-[state=closed]:animate-out",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Bd=r.forwardRef((e,t)=>{let{side:n="right",className:r,children:a}=e,i=(0,s.A)(e,Td);return(0,oi.jsxs)(Dd,{children:[(0,oi.jsx)(Id,{}),(0,oi.jsxs)(Cd.UC,(0,o.A)((0,o.A)({ref:t,className:(0,Ld.cn)(zd({side:n}),r)},i),{},{children:[(0,oi.jsxs)(Cd.bm,{className:"absolute right-4 top-4 roun
2ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[(0,oi.jsx)(bu.A,{className:"h-4 w-4"}),(0,oi.jsx)("span",{className:"sr-only",children:"Close"})]}),a]}))]})});Bd.displayName=Cd.UC.displayName;const qd=e=>{let{className:t}=e,n=(0,s.A)(e,Rd);return(0,oi.jsx)("div",(0,o.A)({className:(0,Ld.cn)("flex flex-col space-y-2 text-center sm:text-left",t)},n))};qd.displayName="SheetHeader";const Ud=r.forwardRef((e,t)=>{let{className:n}=e,r=(0,s.A)(e,Fd);return(0,oi.jsx)(Cd.hE,(0,o.A)({ref:t,className:(0,Ld.cn)("text-lg font-semibold text-foreground",n)},r))});Ud.displayName=Cd.hE.displayName;const Vd=r.forwardRef((e,t)=>{let{className:n}=e,r=(0,s.A)(e,Md);return(0,oi.jsx)(Cd.VY,(0,o.A)({ref:t,className:(0,Ld.cn)("text-sm text-muted-foreground",n)},r))});Vd.displayName=Cd.VY.displayName;const Hd=(0,du.A)("scale",[["path",{d:"m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"7g6ntu"}],["path",{d:"m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z",key:"ijws7r"}],["path",{d:"M7 21h10",key:"1b0cd5"}],["path",{d:"M12 3v18",key:"108xh3"}],["path",{d:"M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2",key:"3gwbw2"}]]),Wd={Server:vd,Shield:fu.A,Cloud:pu.A,Database:bd,Network:hu,Lock:yd,Sparkles:xd,HeadphonesIcon:wd,Headphones:wd},Gd=e=>new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(Number(e)||0),$d=()=>{const e=we(),[t,n]=(0,r.useState)([]),[a,i]=(0,r.useState)(!0),[s,o]=(0,r.useState)(null),[l,c]=(0,r.useState)([]),[u,d]=(0,r.useState)(!1);(0,r.useEffect)(()=>{(async()=>{try{const e=await ju.A.get("".concat("https://nextgen-staging.emergent.host","/api/services"));n(e.data||[])}catch(jf){}finally{i(!1)}})()},[]);const h=(0,r.useMemo)(()=>{const e=[],n=[],r=[];for(const a of t){const t=a.pricing_type||"flat";"tiered"===t&&Array.isArray(a.tiers)&&a.tiers.length>0?e.push(a):"per_device"===t?n.push(a):r.push(a)}return{tiered:e,perDevice:n,flat:r}},[t]),f=e=>o(e),p=e=>{c(t=>t.includes(e)?t.filter(t=>t!==e):t.length>=3?t:[...t,e])},m=(0,r.useMemo)(()=>l.map(e=>t.find(t=>t.service_id===e)).filter(Boolean),[l,t]),[g,v]=(0,r.useState)(null),b=e=>()=>v(e),y=e=>t=>{t.preventDefault(),null!==g&&g!==e?(c(t=>{const n=[...t],[r]=n.splice(g,1);return n.splice(e,0,r),n}),v(null)):v(null)},x=()=>v(null);return(0,oi.jsxs)("div",{className:"min-h-screen bg-background flex flex-col",children:[(0,oi.jsx)(xu,{}),(0,oi.jsxs)("main",{className:"flex-1 ".concat(l.length>0?"pb-24":""),children:[(0,oi.jsx)("section",{className:"container mx-auto px-4 sm:px-6 md:px-12 py-12 sm:py-20",children:(0,oi.jsxs)("div",{className:"max-w-3xl",children:[(0,oi.jsx)(Yu.E,{variant:"outline",className:"mb-4 text-[10px] uppercase tracking-widest","data-testid":"pricing-eyebrow",children:"Transparent Pricing"}),(0,oi.jsxs)("h1",{className:"text-4xl sm:text-5xl lg:text-6xl font-black uppercase tracking-tight mb-4",children:["Pricing built for your ",(0,oi.jsx)("span",{className:"text-primary",children:"scale"})]}),(0,oi.jsx)("p",{className:"text-base text-muted-foreground mb-6",children:"Pick the tier that matches your current size. No long contracts, no hidden fees. Every plan can be customised with add-ons; pricing scales with you."}),(0,oi.jsxs)("div",{className:"flex flex-wrap gap-3",children:[(0,oi.jsxs)(vu.$,{onClick:()=>e("/services"),className:"font-bold uppercase","data-testid":"see-all-services-btn",children:["Browse all services",(0,oi.jsx)(gu.A,{className:"w-4 h-4 ml-2"})]}),(0,oi.jsx)(vu.$,{variant:"outline",onClick:()=>e("/login"),className:"font-bold uppercase","data-testid":"pricing-login-btn",children:"Client login"})]})]})}),a&&(0,oi.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12 py-12 text-center",children:[(0,oi.jsx)("div",{className:"w-10 h-10 border-4 border-primary border-t-transparent rounded-full animate-spin mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground font-mono",children:"Loading plans..."})]}),!a&&0===t.length&&(0,oi.jsx)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12 py-12 text-center",children:(0,oi.jsx)(Nu.Zp,{className:"p-12 border-border max-w-2xl mx-auto",children:(0,oi.jsxs)("p",{className:"text-muted-foreground",children:["No services published yet. Check back soon \u2014 or call us at ",(0,oi.jsx)("span",{className:"text-primary font-bold",children:"740-302-5607"}),"."]})})}),h.tiered.length>0&&(0,oi.jsxs)("section",{className:"container mx-auto px-4 sm:px-6 md:px-12 pb-12 sm:pb-20","data-testid":"pricing-tiered-section",children:[(0,oi.jsx)("h2",{className:"text-2xl sm:text-3xl font-black uppercase mb-6 sm:mb-8",children:"Plan tiers"}),(0,oi.jsx)("div",{className:"space-y-10",children:h.tiered.map(e=>{var t;const n=Wd[e.icon]||vd,r=[...e.tiers||[]].sort((e,t)=>
2(e.min_devices||0)-(t.min_devices||0)),a=r.reduce((e,t)=>Math.min(e,Number(t.price)||0),1/0);return(0,oi.jsxs)("div",{className:"rounded-lg border border-border bg-card p-6","data-testid":"pricing-card-".concat(e.service_id),children:[(0,oi.jsxs)("div",{className:"flex flex-col md:flex-row md:items-start gap-4 mb-6",children:[(0,oi.jsx)("div",{className:"w-12 h-12 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,oi.jsx)(n,{className:"w-6 h-6 text-primary"})}),(0,oi.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,oi.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-1",children:[(0,oi.jsx)("h3",{className:"text-xl sm:text-2xl font-black uppercase tracking-tight",children:e.name}),(null===(t=e.addons)||void 0===t?void 0:t.length)>0&&(0,oi.jsxs)(Yu.E,{variant:"outline",className:"text-[10px] uppercase tracking-widest",children:["+ ",e.addons.length," add-on",1===e.addons.length?"":"s"]})]}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground",children:e.description})]}),(0,oi.jsxs)("div",{className:"md:text-right",children:[(0,oi.jsx)("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground",children:"Starting at"}),(0,oi.jsxs)("p",{className:"text-2xl font-black text-primary font-mono",children:[Gd(a),(0,oi.jsx)("span",{className:"text-xs text-muted-foreground",children:"/mo"})]}),(0,oi.jsxs)("label",{className:"inline-flex items-center gap-2 mt-3 text-xs text-muted-foreground cursor-pointer hover:text-foreground","data-testid":"compare-toggle-".concat(e.service_id),children:[(0,oi.jsx)(gd.S,{checked:l.includes(e.service_id),onCheckedChange:()=>p(e.service_id),disabled:!l.includes(e.service_id)&&l.length>=3}),(0,oi.jsx)("span",{children:"Compare"})]})]})]}),(0,oi.jsx)("div",{className:"grid gap-3 md:grid-cols-".concat(Math.min(r.length,4)),style:{gridTemplateColumns:"repeat(".concat(Math.min(r.length,4),", minmax(0, 1fr))")},children:r.map((t,n)=>{const i=(Number(t.price)||0)===a;return(0,oi.jsxs)("div",{"data-testid":"pricing-tier-".concat(e.service_id,"-").concat(t.tier_id),className:"rounded-md border p-5 flex flex-col "+(i?"border-primary/60 bg-primary/5":"border-border bg-muted/10"),children:[(0,oi.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,oi.jsx)("p",{className:"font-bold text-sm uppercase tracking-widest",children:t.name}),i&&(0,oi.jsx)(Yu.E,{className:"text-[10px] uppercase",children:"Best value"})]}),(0,oi.jsxs)("p",{className:"text-xs text-muted-foreground mb-4",children:[t.min_devices,t.max_devices?"\u2013".concat(t.max_devices):"+"," devices"]}),(0,oi.jsxs)("div",{className:"mb-4",children:[(0,oi.jsx)("span",{className:"text-3xl font-black text-foreground font-mono",children:Gd(t.price)}),(0,oi.jsx)("span",{className:"text-xs text-muted-foreground ml-1",children:"/ mo"})]}),(0,oi.jsx)("ul",{className:"space-y-1.5 text-xs text-muted-foreground mb-5 flex-1",children:(e.features||[]).slice(0,4).map((e,t)=>(0,oi.jsxs)("li",{className:"flex items-start gap-2",children:[(0,oi.jsx)(zu.A,{className:"w-3 h-3 text-primary mt-0.5 shrink-0"}),(0,oi.jsx)("span",{children:e})]},t))}),(0,oi.jsx)(vu.$,{variant:i?"default":"outline",size:"sm",onClick:()=>f(e),"data-testid":"pricing-cta-".concat(e.service_id,"-").concat(t.tier_id),className:"w-full font-bold uppercase",children:n===r.length-1?"Talk to sales":"Get started"})]},t.tier_id)})})]},e.service_id)})})]}),h.perDevice.length>0&&(0,oi.jsxs)("section",{className:"container mx-auto px-4 sm:px-6 md:px-12 pb-12 sm:pb-20","data-testid":"pricing-perdevice-section",children:[(0,oi.jsx)("h2",{className:"text-2xl sm:text-3xl font-black uppercase mb-6 sm:mb-8",children:"Pay per device"}),(0,oi.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:h.perDevice.map(e=>{const t=Wd[e.icon]||vd,n=Number(e.price)||0,r=Number(e.per_device_price)||0;return(0,oi.jsx)(Nu.Zp,{className:"p-5 border-border","data-testid":"pricing-perdevice-".concat(e.service_id),children:(0,oi.jsxs)("div",{className:"flex items-start gap-4",children:[(0,oi.jsx)("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,oi.jsx)(t,{className:"w-5 h-5 text-primary"})}),(0,oi.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,oi.jsx)("h3",{className:"font-bold text-lg uppercase tracking-tight mb-1",children:e.name}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:e.description}),(0,oi.jsxs)("div",{className:"flex items-baseline gap-3 mb-4",children:[(0,oi.jsx)("span",{className:"text-2xl font-black font-mono text-primary",children:Gd(r)}),(0,oi.jsx)("span",{className:"text-xs text-muted-foreground",children:"per device / month"}),n>0&&(0,oi.jsxs)("span",{className:"text-xs text-muted-foreground",children:["+ ",Gd(n)," base"]})]}),(0,oi.jsx)(vu.$,{size:"sm",onClick:()=>f(e),"data-testid":"pricing-cta-".concat(e.service_id),className:"font-bold uppercase",children:"Configure & quote"}),(0,oi.jsxs)("label",{className:"inline-flex items-center gap-2 ml-3 text-xs text-muted-foreground cursor-pointer hover:text-foreground","data-testid":"compare-toggle-".concat(e.service_id),children:[(0,oi.jsx)(gd.S,{checked:l.includes(e.service_id),onCheckedChange:()=>p(e.service_id),disabled:!l.includes(e.service_id)&&l.length>=3}),(0,oi.jsx)("span",{children:"Compare"})]})]})]})},e.service_id)})})]}),h.flat.length>0&&(0,oi.jsxs)("section",{className:"container mx-auto px-4 sm:px-6 md:px-12 pb-12 sm:pb-20","data-testid":"pricing-flat-section",children:[(0,oi.jsx)("h2",{className:"text-2xl sm:text-3xl font-black uppercase mb-6 sm:mb-8",children:"Flat-rate plans"}),(0,oi.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4",children:h.flat.map(e=>{const t=Wd[e.icon]||vd;return(0,oi.jsxs)(Nu.Zp,{className:"p-5 border-border flex flex-col","data-testid":"pricing-flat-".concat(e.service_id),children:[(0,oi.jsxs)("div",{className:"flex items-start gap-3 mb-3",children:[(0,oi.jsx)("div",{className:"w-10 h-10 rounded-lg bg-primary/10 flex items-center justify-center shrink-0",children:(0,oi.jsx)(t,{className:"w-5 h-5 text-primary"})}),(0,oi.jsx)("div",{className:"flex-1 min-w-0",children:(0,oi.jsx)("h3",{className:"font-bold text-lg uppercase tracking-tight",children:e.name})})]}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground mb-3 flex-1",children:e.description}),(0,oi.jsxs)("div",{className:"mb-4",children:[(0,oi.jsx)("span",{className:"text-3xl font-black font-mono text-primary",children:Gd(e.price)}),(0,oi.jsxs)("span",{className:"text-xs text-muted-foreground ml-1",children:["/ ",e.billing_cycle]})]}),(0,oi.jsx)(vu.$,{size:"sm",variant:"outline",onClick:()=>f(e),"data-testid":"pricing-cta-".concat(e.service_id),className:"w-full font-bold uppercase",children:"Get a quote"}),(0,oi.jsxs)("label",{className:"inline-flex items-center gap-2 mt-3 text-xs text-muted-foreground cursor-pointer hover:text-foreground","data-testid":"compare-toggle-".concat(e.service_id),children:[(0,oi.jsx)(gd.S,{checked:l.includes(e.service_id),onCheckedChange:()=>p(e.service_id),disabled:!l.includes(e.service_id)&&l.length>=3}),(0,oi.jsx)("span",{children:"Add to compare"})]})]},e.service_id)})})]}),!a&&t.length>0&&(0,oi.jsx)("section",{className:"container mx-auto px-4 sm:px-6 md:px-12 pb-16 sm:pb-24",children:(0,oi.jsxs)("div",{className:"rounded-lg border border-primary/30 bg-primary/5 p-6 sm:p-10 text-center",children:[(0,oi.jsx)("h2",{className:"text-2xl sm:text-3xl font-black uppercase mb-3",children:"Need a custom plan?"}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground mb-6 max-w-xl mx-auto",children:"We bundle multi-service discounts for clients with more than 50 devices, hybrid cloud setups, or compliance-heavy industries. Tell us about your environment and we'll send a tailored quote within one business day."}),(0,oi.jsxs)(vu.$,{onClick:()=>e("/services"),className:"font-bold uppercase","data-testid":"custom-plan-cta",children:["Talk to an engineer",(0,oi.jsx)(gu.A,{className:"w-4 h-4 ml-2"})]})]})})]}),(0,oi.jsx)(wu,{}),l.length>0&&(0,oi.jsx)("div",{className:"fixed bottom-0 left-0 right-0 z-40 bg-card/95 backdrop-blur border-t border-primary/40 shadow-2xl","data-testid":"compare-sticky-bar",children:(0,oi.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12 py-3 flex flex-wrap items-center justify-between gap-3",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,oi.jsx)(Hd,{className:"w-5 h-5 text-primary shrink-0"}),(0,oi.jsxs)("p",{className:"text-sm",children:[(0,oi.jsx)("span",{className:"font-bold",children:l.length})," of ",3," selected",(0,oi.jsxs)("span",{className:"text-xs text-muted-foreground ml-2 hidden sm:inline",children:["Pick up to ",3," services to compare side-by-side."]})]})]}),(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:()=>c([]),"data-testid":"compare-clear-btn",children:[(0,oi.jsx)(bu.A,{className:"w-4 h-4 mr-1"}),"Clear"]}),(0,oi.jsxs)(vu.$,{size:"sm",onClick:()=>d(!0),disabled:l.length<2,className:"font-bold uppercase","data-testid":"compare-open-btn",children:["Compare ",l.length," plan",1===l.length?"":"s",(0,oi.jsx)(gu.A,{className:"w-4 h-4 ml-1"})]})]})]})}),(0,oi.jsx)(Od,{open:u,onOpenChange:d,children:(0,oi.jsxs)(Bd,{side:"right",className:"w-full sm:max-w-3xl overflow-y-auto bg-card border-border","data-testid":"compare-drawer",children:[(0,oi.jsxs)(qd,{children:[(0,oi.jsx)(Ud,{className:"text-2xl font-black uppercase tracking-tight",children:"Plan Comparison"}),(0,oi.jsx)(Vd,{children:"Side-by-side feature and price comparison. Drag column headers to reorder."})]}),m.length>0&&(0,oi.jsx)("div",{className:"mt-6 overflow-x-auto",children:(0,oi.jsxs)("table",{className:"w-full text-sm",children:[(0,oi.jsx)("thead",{children:(0,oi.jsxs)("tr",{className:"border-b border-border",children:[(0,oi.jsx)("th",{className:"text-left p-3 text-[10px] uppercase tracking-widest text-muted-foreground w-32",children:"Plan"}),m.map((e,t)=>(0,oi.jsx)("th",{className:"text-left p-3 min-w-[180px] cursor-move select-none transition-opacity "+(g===t?"opacity-50":""),draggable:!0,onDragStart:b(t),onDragOver:e=>{e.preventDefault()},onDrop:y(t),onDragEnd:x,"data-testid":"compare-col-".concat(e.service_id),title:"Drag to reorder",children:(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsx)("span",{className:"text-muted-foreground text-xs select-none","aria-hidden":!0,
2children:"\u22ee\u22ee"}),(0,oi.jsx)("p",{className:"font-bold text-base",children:e.name})]})},e.service_id))]})}),(0,oi.jsxs)("tbody",{children:[(0,oi.jsxs)("tr",{className:"border-b border-border/40",children:[(0,oi.jsx)("td",{className:"p-3 text-[10px] uppercase tracking-widest text-muted-foreground",children:"Pricing"}),m.map(e=>{const t=(e=>{var t;if(!e)return{startingAt:0,label:"Flat"};const n=e.pricing_type||"flat";if("tiered"===n&&null!==(t=e.tiers)&&void 0!==t&&t.length)return{startingAt:Math.min(...e.tiers.map(e=>Number(e.price)||0)),label:"".concat(e.tiers.length," tier").concat(1===e.tiers.length?"":"s")};return"per_device"===n?{startingAt:(Number(e.price)||0)+(Number(e.per_device_price)||0),label:"Per device"}:{startingAt:Number(e.price)||0,label:"Flat"}})(e);return(0,oi.jsxs)("td",{className:"p-3",children:[(0,oi.jsx)(Yu.E,{variant:"outline",className:"text-[10px] mb-1",children:t.label}),(0,oi.jsxs)("p",{className:"font-mono font-black text-primary text-lg",children:[Gd(t.startingAt),(0,oi.jsx)("span",{className:"text-xs text-muted-foreground",children:"/mo"})]}),(0,oi.jsx)("p",{className:"text-[10px] text-muted-foreground uppercase tracking-widest",children:"starting at"})]},e.service_id)})]}),(0,oi.jsxs)("tr",{className:"border-b border-border/40",children:[(0,oi.jsx)("td",{className:"p-3 text-[10px] uppercase tracking-widest text-muted-foreground",children:"Description"}),m.map(e=>(0,oi.jsx)("td",{className:"p-3 text-xs text-muted-foreground",children:e.description},e.service_id))]}),(0,oi.jsxs)("tr",{className:"border-b border-border/40",children:[(0,oi.jsx)("td",{className:"p-3 text-[10px] uppercase tracking-widest text-muted-foreground align-top",children:"Features"}),m.map(e=>(0,oi.jsx)("td",{className:"p-3 align-top",children:(0,oi.jsx)("ul",{className:"space-y-1.5",children:(e.features||[]).map((e,t)=>(0,oi.jsxs)("li",{className:"flex items-start gap-2 text-xs",children:[(0,oi.jsx)(zu.A,{className:"w-3 h-3 text-primary mt-0.5 shrink-0"}),(0,oi.jsx)("span",{children:e})]},t))})},e.service_id))]}),(0,oi.jsxs)("tr",{className:"border-b border-border/40",children:[(0,oi.jsx)("td",{className:"p-3 text-[10px] uppercase tracking-widest text-muted-foreground align-top",children:"Add-ons"}),m.map(e=>(0,oi.jsx)("td",{className:"p-3 align-top",children:0===(e.addons||[]).length?(0,oi.jsx)("span",{className:"text-xs text-muted-foreground italic",children:"None"}):(0,oi.jsx)("ul",{className:"space-y-1",children:e.addons.map(e=>(0,oi.jsxs)("li",{className:"text-xs",children:[(0,oi.jsx)("span",{className:"font-bold",children:e.name}),(0,oi.jsxs)("span",{className:"text-muted-foreground ml-2",children:[Gd(e.price),"monthly"===e.charge_type?"/mo":" once"]})]},e.addon_id))})},e.service_id))]}),(0,oi.jsxs)("tr",{children:[(0,oi.jsx)("td",{className:"p-3"}),m.map(e=>(0,oi.jsx)("td",{className:"p-3",children:(0,oi.jsx)(vu.$,{size:"sm",className:"w-full font-bold uppercase",onClick:()=>{d(!1),f(e)},"data-testid":"compare-cta-".concat(e.service_id),children:"Get a quote"})},e.service_id))]})]})]})})]})}),(0,oi.jsx)(jd,{service:s,open:!!s,onClose:()=>o(null),mode:"quote"})]})},Yd="https://nextgen-staging.emergent.host",Kd=()=>{const e=we(),[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)([]),[s,o]=(0,r.useState)({}),[l,c]=(0,r.useState)(!0),[u,d]=(0,r.useState)(null);(0,r.useEffect)(()=>{h()},[]);const h=async()=>{try{const e=await ju.A.get("".concat(Yd,"/api/auth/me"),{withCredentials:!0});n(e.data),f()}catch(t){e("/login")}},f=async()=>{try{var e;const[t,n]=await Promise.all([ju.A.get("".concat(Yd,"/api/subscriptions"),{withCredentials:!0}),ju.A.get("".concat(Yd,"/api/dashboard/metrics"),{withCredentials:!0})]);i(t.data);const r={};null===(e=n.data.service_metrics)||void 0===e||e.forEach(e=>{r[e.subscription_id]=e}),o(r)}catch(t){_u.oR.error("Failed to fetch subscriptions")}finally{c(!1)}};if(l||!t)return(0,oi.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary border-t-transparent roun
2ded-full animate-spin mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-muted-foreground font-mono",children:"Loading..."})]})});const p=a.filter(e=>"active"===e.status),m=a.filter(e=>"cancelled"===e.status);return(0,oi.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,oi.jsx)("header",{className:"sticky top-0 z-50 w-full border-b border-border backdrop-blur-xl bg-background/80",children:(0,oi.jsx)("div",{className:"container mx-auto px-6 md:px-12",children:(0,oi.jsxs)("div",{className:"flex h-16 items-center justify-between",children:[(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:()=>e("/dashboard"),"data-testid":"back-to-dashboard-btn",children:[(0,oi.jsx)(Ku,{className:"w-4 h-4 mr-2"}),"Dashboard"]}),(0,oi.jsxs)("div",{className:"font-black text-xl uppercase tracking-tight",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]})]})})}),(0,oi.jsx)("div",{className:"container mx-auto px-6 md:px-12 py-12",children:(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[(0,oi.jsx)("h1",{className:"text-4xl sm:text-5xl font-black uppercase mb-2",children:"MY SUBSCRIPTIONS"}),(0,oi.jsx)("p",{className:"text-muted-foreground mb-12",children:"Manage your active and cancelled service subscriptions"}),(0,oi.jsxs)("div",{className:"mb-12",children:[(0,oi.jsxs)("h2",{className:"text-2xl font-bold uppercase mb-6",children:["Active Services (",p.length,")"]}),0===p.length?(0,oi.jsxs)(Nu.Zp,{className:"p-12 text-center border-border",children:[(0,oi.jsx)("p",{className:"text-muted-foreground",children:"No active subscriptions"}),(0,oi.jsx)(vu.$,{className:"mt-4",onClick:()=>e("/services"),children:"Browse Services"})]}):(0,oi.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:p.map((e,t)=>{const n=s[e.subscription_id];return(0,oi.jsx)(uu.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6,delay:.1*t},children:(0,oi.jsxs)(Nu.Zp,{className:"p-6 border-border hover:border-primary/50 transition-colors",children:[(0,oi.jsxs)("div",{className:"flex items-start justify-between mb-4",children:[(0,oi.jsxs)("div",{className:"flex-1",children:[(0,oi.jsx)("h3",{className:"text-xl font-bold mb-1",children:e.service_name}),(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,oi.jsx)(Yu.E,{className:"bg-primary text-primary-foreground",children:e.status.toUpperCase()}),(0,oi.jsx)("span",{className:"text-sm text-muted-foreground",children:(r=e.billing_cycle,{monthly:"Monthly",quarterly:"Quarterly",yearly:"Yearly","one-time":"One-Time"}[r]||r)})]})]}),(0,oi.jsxs)("div",{className:"text-right",children:[(0,oi.jsxs)("div",{className:"text-2xl font-black text-primary",children:["$",e.price.toFixed(2)]}),(0,oi.jsxs)("div",{className:"text-xs text-muted-foreground",children:["/",e.billing_cycle]})]})]}),n&&(0,oi.jsxs)("div",{className:"grid grid-cols-3 gap-4 mb-4 p-4 bg-muted/30 rounded-sm",children:[(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)(Tu.A,{className:"w-5 h-5 text-primary mx-auto mb-1"}),(0,oi.jsxs)("div",{className:"text-lg font-bold",children:[n.uptime_percentage,"%"]}),(0,oi.jsx)("div",{className:"text-xs text-muted-foreground",children:"Uptime"})]}),(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)(Ru.A,{className:"w-5 h-5 text-primary mx-auto mb-1"}),(0,oi.jsx)("div",{className:"text-lg font-bold",children:n.total_requests.toLocaleString()}),(0,oi.jsx)("div",{className:"text-xs text-muted-foreground",children:"Requests"})]}),(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)(Fu,{className:"w-5 h-5 text-primary mx-auto mb-1"}),(0,oi.jsxs)("div",{className:"text-lg font-bold",children:[n.avg_response_time_ms.toFixed(0),"ms"]}),(0,oi.jsx)("div",{className:"text-xs text-muted-foreground",children:"Avg Response"})]})]}),(0,oi.jsxs)("div",{className:"space-y-2 text-sm text-muted-foreground mb-4",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("span",{className:"font-semibold",children:"Started:"})," ",(0,Qu.GP)(new Date(e.start_date),"MMM dd, yyyy")]}),e.next_billing_date&&(0,oi.jsxs)("div",{children:[(0,oi.jsx)("span",{className:"font-semibold",children:"Next Billing:"})," ",(0,Qu.GP)(new Date(e.next_billing_date),"MMM dd, yyyy")]})]}),(0,oi.jsx)(vu.$,{variant:"destructive",size:"sm",onClick:()=>(async e=>{if(window.confirm("Are you sure you want to cancel this subscription?")){d(e);try{await ju.A.delete("".concat(Yd,"/api/subscriptions/").concat(e),{withCredentials:!0}),_u.oR.success("Subscription cancelled successfully"),f()}catch(t){console.error("Error cancelling subscription:",t),_u.oR.error("Failed to cancel subscription")}finally{d(null)}}})(e.subscription_id),disabled:u===e.subscription_id,className:"w-full",children:u===e.subscription_id?"Cancelling...":(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(bu.A,{className:"w-4 h-4 mr-2"}),"Cancel Subscription"]})})]})},e.subscription_id);var r})})]}),m.length>0&&(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("h2",{className:"text-2xl font-bold uppercase mb-6",children:["Cancelled Services (",m.length,")"]}),(0,oi.jsx)("div",{className:"space-y-4",children:m.map(e=>(0,oi.jsx)(Nu.Zp,{className:"p-6 border-border opacity-60",children:(0,oi.jsxs)("div",{className:"flex items-center justify-between",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("h3",{className:"text-lg font-bold mb-1",children:e.service_name}),(0,oi.jsx)(Yu.E,{variant:"outline",className:"bg-muted",children:"CANCELLED"}),(0,oi.jsxs)("p",{className:"text-sm text-muted-foreground mt-2",children:["Cancelled on: ",(0,Qu.GP)(new Date(e.cancelled_at),"MMM dd, yyyy")]})]}),(0,oi.jsx)("div",{className:"text-right",children:(0,oi.jsxs)("div",{className:"text-xl font-bold text-muted-foreground",children:["$",e.price.toFixed(2)]})})]})},e.subscription_id))})]})]})})]})};var Xd=n(6533),Zd=n(9855),Jd=n(4651),Qd=n(5087),eh=n(2313);const th="https://nextgen-staging.emergent.host",nh=()=>{const e=we(),[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)([]),[s,l]=(0,r.useState)(!0),[c,u]=(0,r.useState)(!1),[d,h]=(0,r.useState)(null),[f,p]=(0,r.useState)({}),[m,g]=(0,r.useState)({system_name:"",username:"",password:"",notes:"",url:""});(0,r.useEffect)(()=>{v()},[]);const v=async()=>{try{const e=await ju.A.get("".concat(th,"/api/auth/me"),{withCredentials:!0});n(e.data),b()}catch(t){e("/login")}},b=async()=>{try{const e=await ju.A.get("".concat(th,"/api/credentials"),{withCredentials:!0});i(e.data)}catch(e){_u.oR.error("Failed to fetch credentials")}finally{l(!1)}},y=()=>{g({system_name:"",username:"",password:"",notes:"",url:""}),h(null)};return s||!t?(0,oi.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary border-t-transparent roun
2ded-full animate-spin mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-muted-foreground font-mono",children:"Loading..."})]})}):(0,oi.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,oi.jsx)("header",{className:"sticky top-0 z-50 w-full border-b border-border backdrop-blur-xl bg-background/80",children:(0,oi.jsx)("div",{className:"container mx-auto px-6 md:px-12",children:(0,oi.jsxs)("div",{className:"flex h-16 items-center justify-between",children:[(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:()=>e("/dashboard"),"data-testid":"back-to-dashboard-btn",children:[(0,oi.jsx)(Ku,{className:"w-4 h-4 mr-2"}),"Dashboard"]}),(0,oi.jsxs)("div",{className:"font-black text-xl uppercase tracking-tight",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]})]})})}),(0,oi.jsx)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12 py-6 sm:py-12",children:(0,oi.jsxs)(uu.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[(0,oi.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-8 sm:mb-12",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("h1",{className:"text-2xl sm:text-4xl md:text-5xl font-black uppercase mb-2",children:"SYSTEM CREDENTIALS"}),(0,oi.jsxs)("p",{className:"text-sm sm:text-base text-muted-foreground",children:["Securely store system passwords (",a.length,"/20)"]})]}),(0,oi.jsxs)(sd.lG,{open:c,onOpenChange:e=>{u(e),e||y()},children:[(0,oi.jsx)(sd.zM,{asChild:!0,children:(0,oi.jsxs)(vu.$,{className:"font-bold uppercase w-full sm:w-auto",disabled:a.length>=20,"data-testid":"add-credential-btn",children:[(0,oi.jsx)(od.A,{className:"w-4 h-4 mr-2"}),"Add Credential"]})}),(0,oi.jsxs)(sd.Cf,{className:"bg-card border-border mx-4 sm:mx-0 max-w-lg sm:max-w-2xl",children:[(0,oi.jsx)(sd.c7,{children:(0,oi.jsx)(sd.L3,{className:"text-2xl font-bold uppercase",children:d?"Edit Credential":"Add Credential"})}),(0,oi.jsxs)("form",{onSubmit:async e=>{e.preventDefault();try{if(d){const e={};m.system_name!==d.system_name&&(e.system_name=m.system_name),m.username!==d.username&&(e.username=m.username),m.password&&(e.password=m.password),m.notes!==(d.notes||"")&&(e.notes=m.notes),m.url!==(d.url||"")&&(e.url=m.url),await ju.A.put("".concat(th,"/api/credentials/").concat(d.credential_id),e,{withCredentials:!0}),_u.oR.success("Credential updated successfully")}else await ju.A.post("".concat(th,"/api/credentials"),m,{withCredentials:!0}),_u.oR.success("Credential created successfully");u(!1),y(),b()}catch(r){var t,n;console.error("Error saving credential:",r),_u.oR.error((null===(t=r.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.detail)||"Failed to save credential")}},className:"space-y-4",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"System Name *"}),(0,oi.jsx)(nd.p,{value:m.system_name,onChange:e=>g((0,o.A)((0,o.A)({},m),{},{system_name:e.target.value})),required:!0,placeholder:"e.g., AWS Console, Office 365, Router Admin",className:"bg-input"})]}),(0,oi.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"Username *"}),(0,oi.jsx)(nd.p,{value:m.username,onChange:e=>g((0,o.A)((0,o.A)({},m),{},{username:e.target.value})),required:!0,placeholder:"[email protected]",className:"bg-input"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"Password *"}),(0,oi.jsx)(nd.p,{type:"password",value:m.password,onChange:e=>g((0,o.A)((0,o.A)({},m),{},{password:e.target.value})),required:!d,placeholder:d?"Leave blank to keep":"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022",className:"bg-input"})]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"URL (Optional)"}),(0,oi.jsx)(nd.p,{value:m.url,onChange:e=>g((0,o.A)((0,o.A)({},m),{},{url:e.target.value})),placeholder:"https://console.aws.amazon.com",className:"bg-input"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"Notes (Optional)"}),(0,oi.jsx)(ad.T,{value:m.notes,onChange:e=>g((0,o.A)((0,o.A)({},m),{},{notes:e.target.value})),rows:3,placeholder:"Additional information, access instructions, etc.",className:"bg-input"})]}),(0,oi.jsx)(vu.$,{type:"submit",className:"w-full font-bold uppercase",children:d?"Update Credential":"Save Credential"})]})]})]})]}),0===a.length?(0,oi.jsxs)(Nu.Zp,{className:"p-12 text-center border-border",children:[(0,oi.jsx)(Mu.A,{className:"w-16 h-16 text-muted-foreground mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-muted-foreground mb-2",children:"No credentials stored yet"}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground",children:"Add your system passwords and credentials to access them securely from anywhere"})]}):(0,oi.jsx)("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4 sm:gap-6",children:a.map((e,t)=>(0,oi.jsx)(uu.div,{initial:{opacity:0,y:20}
2,animate:{opacity:1,y:0},transition:{duration:.6,delay:.05*t},children:(0,oi.jsxs)(Nu.Zp,{className:"p-4 sm:p-6 border-border hover:border-primary/50 transition-colors",children:[(0,oi.jsxs)("div",{className:"flex items-start justify-between mb-3 sm:mb-4",children:[(0,oi.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,oi.jsx)("h3",{className:"text-lg sm:text-xl font-bold mb-1 truncate",children:e.system_name}),(0,oi.jsx)("p",{className:"text-xs sm:text-sm text-muted-foreground font-mono truncate",children:e.username})]}),(0,oi.jsxs)("div",{className:"flex gap-1 sm:gap-2 flex-shrink-0 ml-2",children:[(0,oi.jsx)(vu.$,{variant:"outline",size:"sm",onClick:()=>(e=>{h(e),g({system_name:e.system_name,username:e.username,password:"",notes:e.notes||"",url:e.url||""}),u(!0)})(e),className:"h-8 w-8 p-0",children:(0,oi.jsx)(Xd.A,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),(0,oi.jsx)(vu.$,{variant:"outline",size:"sm",onClick:()=>(async e=>{if(window.confirm("Are you sure you want to delete this credential?"))try{await ju.A.delete("".concat(th,"/api/credentials/").concat(e),{withCredentials:!0}),_u.oR.success("Credential deleted successfully"),b()}catch(t){_u.oR.error("Failed to delete credential")}})(e.credential_id),className:"h-8 w-8 p-0",children:(0,oi.jsx)(Zd.A,{className:"w-3 h-3 sm:w-4 sm:h-4"})})]})]}),(0,oi.jsxs)("div",{className:"space-y-3",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsx)("div",{className:"flex-1 bg-muted/30 px-2 sm:px-3 py-2 rounded-sm font-mono text-xs sm:text-sm truncate",children:f[e.credential_id]||"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022"}),(0,oi.jsx)(vu.$,{variant:"outline",size:"sm",onClick:()=>(async e=>{if(f[e])p(t=>(0,o.A)((0,o.A)({},t),{},{[e]:null}));else try{const t=await ju.A.get("".concat(th,"/api/credentials/").concat(e,"/reveal"),{withCredentials:!0});p(n=>(0,o.A)((0,o.A)({},n),{},{[e]:t.data.password}))}catch(t){_u.oR.error("Failed to reveal password")}})(e.credential_id),className:"h-8 w-8 p-0 flex-shrink-0",children:f[e.credential_id]?(0,oi.jsx)(Jd.A,{className:"w-3 h-3 sm:w-4 sm:h-4"}):(0,oi.jsx)(Qd.A,{className:"w-3 h-3 sm:w-4 sm:h-4"})}),f[e.credential_id]&&(0,oi.jsx)(vu.$,{variant:"outline",size:"sm",onClick:()=>((e,t)=>{navigator.clipboard.writeText(e),_u.oR.success("".concat(t," copied to clipboard"))})(f[e.credential_id],"Password"),className:"h-8 w-8 p-0 flex-shrink-0",children:(0,oi.jsx)(eh.A,{className:"w-3 h-3 sm:w-4 sm:h-4"})})]}),e.url&&(0,oi.jsx)("div",{className:"flex items-center gap-2",children:(0,oi.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-sm text-primary hover:underline flex items-center gap-1",children:[(0,oi.jsx)(Xu.A,{className:"w-3 h-3"}),e.url]})}),e.notes&&(0,oi.jsx)("div",{className:"text-sm text-muted-foreground bg-muted/30 p-3 rounded-sm",children:e.notes}),(0,oi.jsxs)("div",{className:"text-xs text-muted-foreground pt-2 border-t border-border",children:["Added: ",new Date(e.created_at).toLocaleDateString()]})]})]})},e.credential_id))}),a.length>=20&&(0,oi.jsx)("div",{className:"mt-6 p-4 bg-yellow-500/10 border border-yellow-500/50 rounded-sm",children:(0,oi.jsx)("p",{className:"text-sm text-yellow-500",children:"You've reached the maximum of 20 stored credentials. Delete unused credentials to add new ones."})})]})})]})};var rh=n(2224);const ah=(0,du.A)("chart-column",[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);var ih=n(7118);const sh=(0,du.A)("shopping-bag",[["path",{d:"M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4Z",key:"hou9p0"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M16 10a4 4 0 0 1-8 0",key:"1ltviw"}]]),oh=(0,du.A)("clipboard-list",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);var lh=n(8231);const ch=(0,du.A)("megaphone",[["path",{d:"m3 11 18-5v12L3 14v-3z",key:"n962bs"}],["path",{d:"M11.6 16.8a3 3 0 1 1-5.8-1.6",key:"1yl0tm"}]]);var uh=n(1990),dh=n(5746);const hh=(0,du.A)("square-check-big",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]),fh=(0,du.A)("list-todo",[["rect",{x:"3",y:"5",width:"6",height:"6",rx:"1",key:"1defrl"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]]),ph=e=>{let{label:t,sub:n,value:r,Icon:a,accent:i,testId:s}=e;return(0,oi.jsx)(Nu.Zp,{className:"p-4 sm:p-5 border-border","data-testid":s,children:(0,oi.jsxs)("div",{className:"flex items-start justify-between",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground",children:t}),(0,oi.jsx)("p",{className:"text-2xl sm:text-3xl font-black mt-2 ".concat(i),children:null===r||void 0===r?"\u2014":r}),(0,oi.jsx)("p",{className:"text-[10px] text-muted-foreground mt-1",children:n})]}),(0,oi.jsx)("div",{className:"w-9 h-9 rounded-lg bg-muted/30 flex items-center justify-center",children:(0,oi.jsx)(a,{className:"w-4 h-4 text-muted-foreground"})})]})})},mh=()=>{const[e,t]=(0,r.useState)(null),[n,a]=(0,r.useState)(!1);return(0,r.useEffect)(()=>{(async()=>{try{const e=await ju.A.get("".concat("https://nextgen-staging.emergent.host","/api/admin/staff/activity"),{withCredentials:!0});t(e.data)}catch(jf){a(!0)}})()},[]),n?null:(0,oi.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-3 sm:gap-4 mb-6 sm:mb-8","data-testid":"staff-activity-strip",children:[(0,oi.jsx)(ph,{label:"Quotes
2Sent",sub:"last 7 days",value:null===e||void 0===e?void 0:e.quotes_sent_7d,Icon:dh.A,accent:"text-blue-400",testId:"kpi-quotes-sent-7d"}),(0,oi.jsx)(ph,{label:"Quotes Accepted",sub:"last 7 days",value:null===e||void 0===e?void 0:e.quotes_accepted_7d,Icon:ld.A,accent:"text-primary",testId:"kpi-quotes-accepted-7d"}),(0,oi.jsx)(ph,{label:"Tickets Closed",sub:"last 7 days",value:null===e||void 0===e?void 0:e.tickets_closed_7d,Icon:hh,accent:"text-primary",testId:"kpi-tickets-closed-7d"}),(0,oi.jsx)(ph,{label:"Open Tickets",sub:"assigned to you",value:null===e||void 0===e?void 0:e.tickets_assigned_open,Icon:fh,accent:"text-amber-500",testId:"kpi-tickets-open"})]})};var gh=n(7459);const vh=(0,du.A)("user-check",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]),bh=(0,du.A)("bell-off",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]),yh="https://nextgen-staging.emergent.host",xh=[{id:"owner",title:"Tickets I own",description:"Updates on tickets where I am the client / requester.",icon:Bu.A,keys:[{key:"ticket_created_owner",label:"Email me when a new ticket is opened on my behalf"},{key:"ticket_updated_owner",label:"Email me when one of my tickets is updated"}]},{id:"assignee",title:"Tickets assigned to me",description:"Notifications about tickets where I am the technician.",icon:vh,keys:[{key:"ticket_created_assignee",label:"Email me when a ticket is freshly assigned to me"},{key:"ticket_updated_assignee",label:"Email me on activity for tickets assigned to me"}]},{id:"admin",title:"Unassigned tickets (admin triage)",description:"Notifications about tickets that have no technician yet.",icon:fu.A,keys:[{key:"ticket_created_admin",label:"Email me when a new unassigned ticket needs triage"},{key:"ticket_updated_admin",label:"Email me when an unassigned ticket has activity"}]}],wh=e=>{let{open:t,onClose:n}=e;const[a,i]=(0,r.useState)(null),[s,l]=(0,r.useState)(!1),[c,u]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(!t)return;let e=!1;return l(!0),ju.A.get("".concat(yh,"/api/auth/notification-prefs"),{withCredentials:!0}).then(t=>{var n;e||i((null===(n=t.data)||void 0===n?void 0:n.prefs)||{})}).catch(()=>{e||_u.oR.error("Could not load notification preferences")}).finally(()=>{e||l(!1)}),()=>{e=!0}},[t]);const d=a&&Object.values(a).every(e=>!1===e);return(0,oi.jsx)(sd.lG,{open:t,onOpenChange:e=>!e&&(null===n||void 0===n?void 0:n()),children:(0,oi.jsxs)(sd.Cf,{className:"bg-card border-border max-w-2xl max-h-[90vh] overflow-y-auto","data-testid":"notification-prefs-dialog",children:[(0,oi.jsxs)(sd.c7,{children:[(0,oi.jsxs)(sd.L3,{className:"text-2xl font-black uppercase tracking-tight flex items-center gap-2",children:[(0,oi.jsx)(Iu.A,{className:"w-5 h-5 text-primary"}),"Notification Preferences"]}),(0,oi.jsx)(sd.rr,{children:"Choose which ticket emails you receive. Defaults are on; switch off to silence a category."})]}),s||!a?(0,oi.jsx)("div",{className:"py-12 text-center text-muted-foreground text-sm",children:"Loading\u2026"}):(0,oi.jsxs)("div",{className:"space-y-5 py-2",children:[xh.map(e=>{const t=e.icon;return(0,oi.jsxs)("div",{className:"space-y-3 p-4 rounded-lg border border-border/60 bg-muted/10","data-testid":"prefs-section-".concat(e.id),children:[(0,oi.jsxs)("div",{className:"flex items-start gap-3",children:[(0,oi.jsx)("div",{className:"w-9 h-9 rounded-md bg-primary/10 flex items-center justify-center shrink-0",children:(0,oi.jsx)(t,{className:"w-4 h-4 text-primary"})}),(0,oi.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,oi.jsx)("p",{className:"font-bold uppercase text-xs tracking-widest text-foreground",children:e.title}),(0,oi.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5",children:e.description})]})]}),(0,oi.jsx)("div",{className:"space-y-2 pl-12",children:e.keys.map(e=>{var t;let{key:n,label:r}=e;return(0,oi.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,oi.jsx)("label",{htmlFor:"pref-".concat(n),className:"text-sm cursor-pointer flex-1",children:r}),(0,oi.jsx)(gh.d,{id:"pref-".concat(n),"data-testid":"pref-switch-".concat(n),checked:null===(t=a[n])||void 0===t||t,onCheckedChange:()=>(e=>{i(t=>{var n;return(0,o.A)((0,o.A)({},t||{}),{},{[e]:!(null===(n=null===t||void 0===t?void 0:t[e])||void 0===n||n)})})})(n)})]},n)})})]},e.id)}),(0,oi.jsxs)("div",{className:"flex items-center justify-between pt-3 border-t border-border/60",children:[(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:()=>
2{if(!a)return;const e={};Object.keys(a).forEach(t=>{e[t]=!1}),i(e)},disabled:c||d,"data-testid":"mute-all-btn",className:"text-muted-foreground",children:[(0,oi.jsx)(bh,{className:"w-4 h-4 mr-2"}),"Mute everything"]}),(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsx)(vu.$,{variant:"outline",onClick:n,disabled:c,children:"Cancel"}),(0,oi.jsx)(vu.$,{onClick:async()=>{if(a){u(!0);try{var e;const t=await ju.A.put("".concat(yh,"/api/auth/notification-prefs"),{prefs:a},{withCredentials:!0});i((null===(e=t.data)||void 0===e?void 0:e.prefs)||a),_u.oR.success("Notification preferences saved"),null===n||void 0===n||n()}catch(jf){var t,r;const n=null===(t=jf.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.detail;_u.oR.error("string"===typeof n?n:"Failed to save preferences")}finally{u(!1)}}},disabled:c,"data-testid":"save-prefs-btn",className:"font-bold uppercase",children:c?"Saving\u2026":"Save"})]})]})]})]})})},kh=["analytics","users","services","quotes","invoices","tickets","credentials","webhooks","marketing","presets"];function Nh(e){const t=(null===e||void 0===e?void 0:e.role)||"client",n="admin"===t,r="technician"===t,a="accountant"===t,i="client"===t,s=n||r||a,o={analytics:n||a,users:n||r||a,services:n,quotes:n||r,invoices:n||a,tickets:n||r,credentials:n,webhooks:n,marketing:n,presets:n||r},l=kh.filter(e=>o[e]);return{role:t,isStaff:s,isAdmin:n,isTechnician:r,isAccountant:a,isClient:i,tabs:o,visibleTabs:l,canManageQuotes:n||r,canDeleteQuotes:n,canConvertQuotesToInvoices:n,canManageTickets:n||r,canManageInvoices:n||a,canManageUsers:n,canManageCredentials:n,canViewAnalytics:n||a,canRunReminderSweep:n,canViewClientList:s,homeRoute:n?"/admin":r?"/tech":a?"/admin":"/dashboard"}}const Ah=(0,r.lazy)(()=>n.e(231).then(n.bind(n,5231))),jh=(0,r.lazy)(()=>n.e(814).then(n.bind(n,5814))),_h=(0,r.lazy)(()=>n.e(156).then(n.bind(n,2156))),Sh=(0,r.lazy)(()=>Promise.resolve().then(n.bind(n,7694))),Ch=(0,r.lazy)(()=>Promise.resolve().then(n.bind(n,6125))),Eh=(0,r.lazy)(()=>n.e(380).then(n.bind(n,1380))),Lh=(0,r.lazy)(()=>Promise.all([n.e(494),n.e(788)]).then(n.bind(n,5788))),Ph=(0,r.lazy)(()=>n.e(567).then(n.bind(n,5567))),Th=(0,r.lazy)(()=>n.e(737).then(n.bind(n,1737))),Rh=(0,r.lazy)(()=>Promise.resolve().then(n.bind(n,6747))),Fh=()=>(0,oi.jsx)("div",{className:"py-16 flex items-center justify-center","data-testid":"admin-tab-loading",children:(0,oi.jsx)(Zu.A,{className:"w-8 h-8 animate-spin text-muted-foreground"})}),Mh="https://nextgen-staging.emergent.host",Oh=e=>{let{user:t,users:n,invoices:a,tickets:i,navigate:s,fetchData:o}=e;const l=Nh(t),c=l.visibleTabs[0]||"analytics",[u,d]=(0,r.useState)(!1);return(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)("header",{className:"sticky top-0 z-50 w-full border-b border-border backdrop-blur-xl bg-background/80",children:(0,oi.jsx)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12",children:(0,oi.jsxs)("div",{className:"flex h-16 items-center justify-between",children:[(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:()=>s("/dashboard"),"data-testid":"back-to-dashboard-btn",children:[(0,oi.jsx)(Ku,{className:"w-4 h-4 mr-2"}),"Dashboard"]}),(0,oi.jsxs)("div",{className:"flex items-center gap-2",children:[(0,oi.jsxs)("div",{className:"font-black text-xl uppercase tracking-tight",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN ADMIN"]}),(0,oi.jsx)(vu.$,{variant:"ghost",size:"sm",onClick:()=>d(!0),"data-testid":"admin-prefs-btn",title:"Notification preferences",children:(0,oi.jsx)(Iu.A,{className:"w-4 h-4"})}),(0,oi.jsx)(Wu,{testIdPrefix:"admin"})]})]})})}),(0,oi.jsx)(wh,{open:u,onClose:()=>d(!1)}),(0,oi.jsxs)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12 py-6 sm:py-12",children:[(0,oi.jsx)("h1",{className:"text-2xl sm:text-4xl font-black uppercase mb-6 sm:mb-12",children:"ADMIN PANEL"}),(0,oi.jsx)(mh,{}),(0,oi.jsxs)(rh.tU,{defaultValue:c,className:"space-y-8",children:[(0,oi.jsxs)(rh.j7,{className:"bg-card border border-border flex-wrap h-auto p-1",children:[l.tabs.analytics&&(0,oi.jsxs)(rh.Xi,{value:"analytics","data-testid":"analytics-tab",className:"text-xs sm:text-sm",children:[(0,oi.jsx)(ah,{className:"w-4 h-4 mr-1 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Analytics"})]}),l.tabs.users&&(0,oi.jsxs)(rh.Xi,{value:"users","data-testid":"users-tab",className:"text-xs sm:text-sm",children:[(0,oi.jsx)(ih.A,{className:"w-4 h-4 mr-1 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Users"})]}),l.tabs.services&&(0,oi.jsxs)(rh.Xi,{value:"services","data-testid":"services-tab",className:"text-xs sm:text-sm",children:[(0,oi.jsx)(sh,{className:"w-4 h-4 mr-1 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Services"})]}),l.tabs.quotes&&(0,oi.jsxs)(rh.Xi,{value:"quotes","data-testid":"quotes-tab",className:"text-xs sm:text-sm",children:[(0,oi.jsx)(oh,{className:"w-4 h-4 mr-1 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Quotes"})]}
2),l.tabs.invoices&&(0,oi.jsxs)(rh.Xi,{value:"invoices","data-testid":"invoices-tab",className:"text-xs sm:text-sm",children:[(0,oi.jsx)(Lu.A,{className:"w-4 h-4 mr-1 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Invoices"})]}),l.tabs.tickets&&(0,oi.jsxs)(rh.Xi,{value:"tickets","data-testid":"tickets-tab",className:"text-xs sm:text-sm",children:[(0,oi.jsx)(Pu.A,{className:"w-4 h-4 mr-1 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Tickets"})]}),l.tabs.credentials&&(0,oi.jsxs)(rh.Xi,{value:"credentials","data-testid":"credentials-tab",className:"text-xs sm:text-sm",children:[(0,oi.jsx)(Mu.A,{className:"w-4 h-4 mr-1 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Credentials"})]}),l.tabs.webhooks&&(0,oi.jsxs)(rh.Xi,{value:"webhooks","data-testid":"webhooks-tab",className:"text-xs sm:text-sm",children:[(0,oi.jsx)(lh.A,{className:"w-4 h-4 mr-1 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Webhooks"})]}),l.tabs.marketing&&(0,oi.jsxs)(rh.Xi,{value:"marketing","data-testid":"marketing-tab",className:"text-xs sm:text-sm",children:[(0,oi.jsx)(ch,{className:"w-4 h-4 mr-1 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Marketing"})]}),l.tabs.presets&&(0,oi.jsxs)(rh.Xi,{value:"presets","data-testid":"presets-tab",className:"text-xs sm:text-sm",children:[(0,oi.jsx)(uh.A,{className:"w-4 h-4 mr-1 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Presets"})]})]}),l.tabs.analytics&&(0,oi.jsx)(rh.av,{value:"analytics",children:(0,oi.jsx)(r.Suspense,{fallback:(0,oi.jsx)(Fh,{}),children:(0,oi.jsx)(Lh,{})})}),l.tabs.users&&(0,oi.jsx)(rh.av,{value:"users",children:(0,oi.jsx)(r.Suspense,{fallback:(0,oi.jsx)(Fh,{}),children:(0,oi.jsx)(jh,{users:n,onRefresh:o})})}),l.tabs.services&&(0,oi.jsx)(rh.av,{value:"services",children:(0,oi.jsx)(r.Suspense,{fallback:(0,oi.jsx)(Fh,{}),children:(0,oi.jsx)(Ah,{})})}),l.tabs.quotes&&(0,oi.jsx)(rh.av,{value:"quotes",children:(0,oi.jsx)(r.Suspense,{fallback:(0,oi.jsx)(Fh,{}),children:(0,oi.jsx)(Ch,{users:n,onRefresh:o,permissions:l})})}),l.tabs.invoices&&(0,oi.jsx)(rh.av,{value:"invoices",children:(0,oi.jsx)(r.Suspense,{fallback:(0,oi.jsx)(Fh,{}),children:(0,oi.jsx)(_h,{invoices:a,users:n,onRefresh:o})})}),l.tabs.tickets&&(0,oi.jsx)(rh.av,{value:"tickets",children:(0,oi.jsx)(r.Suspense,{fallback:(0,oi.jsx)(Fh,{}),children:(0,oi.jsx)(Sh,{tickets:i,users:n,onRefresh:o,permissions:l,currentUserEmail:null===t||void 0===t?void 0:t.email})})}),l.tabs.credentials&&(0,oi.jsx)(rh.av,{value:"credentials",children:(0,oi.jsx)(r.Suspense,{fallback:(0,oi.jsx)(Fh,{}),children:(0,oi.jsx)(Eh,{users:n})})}),l.tabs.webhooks&&(0,oi.jsx)(rh.av,{value:"webhooks",children:(0,oi.jsx)(r.Suspense,{fallback:(0,oi.jsx)(Fh,{}),children:(0,oi.jsx)(Ph,{})})}),l.tabs.marketing&&(0,oi.jsx)(rh.av,{value:"marketing",children:(0,oi.jsx)(r.Suspense,{fallback:(0,oi.jsx)(Fh,{}),children:(0,oi.jsx)(Th,{})})}),l.tabs.presets&&(0,oi.jsx)(rh.av,{value:"presets",children:(0,oi.jsx)(r.Suspense,{fallback:(0,oi.jsx)(Fh,{}),children:(0,oi.jsx)(Rh,{})})})]})]})]})},Dh=()=>{const e=we(),[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)([]),[s,o]=(0,r.useState)([]),[l,c]=(0,r.useState)([]),[u,d]=(0,r.useState)(!0);(0,r.useEffect)(()=>{h()},[]);const h=async()=>{try{const t=await ju.A.get("".concat(Mh,"/api/auth/me"),{withCredentials:!0});if(!["admin","technician","accountant"].includes(t.data.role))return _u.oR.error("Staff access required"),void e("/dashboard");if("technician"===t.data.role)return void e("/tech",{replace:!0,state:{user:t.data}});n(t.data),f()}catch(t){e("/login")}},f=async()=>{try{const[e,t,n]=await Promise.all([ju.A.get("".concat(Mh,"/api/admin/users"),{withCredentials:!0}),ju.A.get("".concat(Mh,"/api/invoices"),{withCredentials:!0}),ju.A.get("".concat(Mh,"/api/tickets"),{withCredentials:!0})]);i(e.data),o(t.data),c(n.data)}catch(e){_u.oR.error("Failed to fetch data")}finally{d(!1)}};return u||!t?(0,oi.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-16 h-16 border-4 border-primary border-t-transparent roun
2ded-full animate-spin mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-muted-foreground font-mono",children:"Loading..."})]})}):(0,oi.jsx)("div",{className:"min-h-screen bg-background","data-testid":"admin-dashboard",children:(0,oi.jsx)(Oh,{user:t,users:a,invoices:s,tickets:l,navigate:e,fetchData:f})})};var Ih=n(6401),zh=n(7694),Bh=n(6125);const qh="https://nextgen-staging.emergent.host",Uh=()=>{var e,t;const n=we(),a=be(),[i,s]=(0,r.useState)((null===(e=a.state)||void 0===e?void 0:e.user)||null),[o,l]=(0,r.useState)([]),[c,u]=(0,r.useState)([]),[d,h]=(0,r.useState)(!1),[f,p]=(0,r.useState)(null!==(t=a.state)&&void 0!==t&&t.user?"ok":"pending");(0,r.useEffect)(()=>{i?"admin"===i.role?n("/admin",{replace:!0,state:{user:i}}):"technician"!==i.role?n("/dashboard",{replace:!0,state:{user:i}}):p("ok"):(async()=>{try{const e=(await ju.A.get("".concat(qh,"/api/auth/me"),{withCredentials:!0})).data;if("admin"===e.role)return void n("/admin",{replace:!0,state:{user:e}});if("technician"!==e.role)return void n("/dashboard",{replace:!0,state:{user:e}});s(e),p("ok")}catch(jf){n("/login",{replace:!0})}})()},[i,n]),(0,r.useEffect)(()=>{if("ok"!==f)return;(async()=>{try{const e=await ju.A.get("".concat(qh,"/api/admin/users"),{withCredentials:!0});l(e.data)}catch(jf){}})(),m()},[f]);const m=async()=>{try{const e=await ju.A.get("".concat(qh,"/api/tickets"),{withCredentials:!0});u(e.data||[])}catch(jf){}};return"ok"===f&&i?(0,oi.jsxs)("div",{className:"min-h-screen bg-background","data-testid":"tech-dashboard",children:[(0,oi.jsx)("header",{className:"sticky top-0 z-50 w-full border-b border-border backdrop-blur-xl bg-background/80",children:(0,oi.jsx)("div",{className:"container mx-auto px-4 sm:px-6 md:px-12",children:(0,oi.jsxs)("div",{className:"flex h-14 sm:h-16 items-center justify-between",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-3",children:[(0,oi.jsxs)("div",{className:"font-black text-lg sm:text-xl uppercase tracking-tight",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]}),(0,oi.jsxs)("span",{className:"hidden sm:inline-flex items-center gap-1.5 px-2 py-0.5 rounded-sm border border-blue-500/40 bg-blue-500/10 text-[10px] font-mono uppercase tracking-widest text-blue-400",children:[(0,oi.jsx)(Ih.A,{className:"w-3 h-3"}),"Tech"]})]}),(0,oi.jsxs)("div",{className:"flex items-center gap-3",children:[(0,oi.jsx)("span",{className:"text-xs sm:text-sm text-muted-foreground hidden sm:inline truncate max-w-[200px]",children:i.email}),(0,oi.jsx)(Wu,{testIdPrefix:"tech"}),(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:()=>h(!0),"data-testid":"tech-prefs-btn",title:"Notification preferences",children:[(0,oi.jsx)(Iu.A,{className:"w-4 h-4 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Notifications"})]}),(0,oi.jsxs)(vu.$,{variant:"ghost",size:"sm",onClick:async()=>{try{await ju.A.post("".concat(qh,"/api/auth/logout"),{},{withCredentials:!0}),_u.oR.success("Logged out"),n("/")}catch(jf){_u.oR.error("Logout failed")}},"data-testid":"tech-logout-btn",children:[(0,oi.jsx)(Eu,{className:"w-4 h-4 sm:mr-2"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Logout"})]})]})]})})}),(0,oi.jsx)(wh,{open:d,onClose:()=>h(!1)}),(0,oi.jsxs)("main",{className:"container mx-auto px-4 sm:px-6 md:px-12 py-6 sm:py-10",children:[(0,oi.jsxs)("div",{className:"mb-6 sm:mb-10",children:[(0,oi.jsx)("h1",{className:"text-2xl sm:text-4xl font-black uppercase mb-1",children:"Tech Workspace"}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground",children:"Manage tickets and quotes for clients."})]}),(0,oi.jsx)(mh,{}),(0,oi.jsx)(Nu.Zp,{className:"p-2 sm:p-4 border-border",children:(0,oi.jsxs)(rh.tU,{defaultValue:"tickets",className:"w-full",children:[(0,oi.jsxs)(rh.j7,{className:"grid w-full grid-cols-2 max-w-md mb-4 sm:mb-6",children:[(0,oi.jsxs)(rh.Xi,{value:"tickets","data-testid":"tech-tab-tickets",children:[(0,oi.jsx)(Pu.A,{className:"w-4 h-4 mr-2"}),"Tickets"]}),(0,oi.jsxs)(rh.Xi,{value:"quotes","data-testid":"tech-tab-quotes",children:[(0,oi.jsx)(Lu.A,{className:"w-4 h-4 mr-2"}),"Quotes"]})]}),(0,oi.jsx)(rh.av,{value:"tickets",children:(0,oi.jsx)(zh.default,{tickets:c,users:o,onRefresh:m,permissions:Nh(i),currentUserEmail:null===i||void 0===i?void 0:i.email})}),(0,oi.jsx)(rh.av,{value:"quotes",children:(0,oi.jsx)(Bh.default,{users:o,onRefresh:()=>{},permissions:Nh(i)})})]})})]})]}):(0,oi.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)("div",{className:"w-12 h-12 border-4 border-primary border-t-transparent roun
2ded-full animate-spin mx-auto mb-4"}),(0,oi.jsx)("p",{className:"text-muted-foreground font-mono text-sm",children:"Loading..."})]})})};var Vh=n(3340),Hh=n(6245);const Wh=(0,du.A)("shield-check",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);var Gh=n(5088),$h=n(4669);const Yh="https://nextgen-staging.emergent.host",Kh=e=>{const t=(e||"").toLowerCase();return"accepted"===t?"bg-primary text-primary-foreground":"rejected"===t?"bg-red-500/20 text-red-500 border border-red-500/40":"expired"===t?"bg-muted text-muted-foreground":"bg-yellow-500/20 text-yellow-500 border border-yellow-500/40"},Xh=()=>{const{token:e}=ke(),[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)(!0),[s,l]=(0,r.useState)(null),[c,u]=(0,r.useState)(null),[d,h]=(0,r.useState)(null),[f,p]=(0,r.useState)(!1),[m,g]=(0,r.useState)(!1),[v,b]=(0,r.useState)({name:"",email:"",message:""}),[y,x]=(0,r.useState)(null);(0,r.useEffect)(()=>{let t=!0;return(async()=>{try{const r=await ju.A.get("".concat(Yh,"/api/public/quotes/").concat(e));t&&n(r.data)}catch(a){var r;t&&l(404===(null===(r=a.response)||void 0===r?void 0:r.status)?"Quote link not found":"Failed to load quote")}finally{t&&i(!1)}})(),()=>{t=!1}},[e]);const w=t&&["accepted","rejected","expired"].includes((t.status||"").toLowerCase());return a?(0,oi.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)(Zu.A,{className:"w-10 h-10 animate-spin mx-auto mb-4 text-primary"}),(0,oi.jsx)("p",{className:"text-muted-foreground font-mono uppercase tracking-widest text-xs",children:"Loading quote\u2026"})]})}):s||!t?(0,oi.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center p-6",children:(0,oi.jsxs)(Nu.Zp,{className:"max-w-md p-8 text-center border-border","data-testid":"public-quote-error",children:[(0,oi.jsx)(Hh.A,{className:"w-12 h-12 mx-auto mb-4 text-red-500"}),(0,oi.jsx)("h1",{className:"text-2xl font-black mb-2",children:"Link not found"}),(0,oi.jsx)("p",{className:"text-muted-foreground",children:s||"The quote you are looking for no longer exists."})]})}):(0,oi.jsxs)("div",{className:"min-h-screen bg-background",children:[(0,oi.jsx)("header",{className:"border-b border-border bg-card/50 backdrop-blur",children:(0,oi.jsxs)("div",{className:"max-w-4xl mx-auto px-6 py-6 flex items-center justify-between",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("div",{className:"text-2xl font-black",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]}),(0,oi.jsx)("div",{className:"text-[10px] uppercase tracking-[0.3em] text-muted-foreground mt-1",children:"Network Solutions"})]}),(0,oi.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,oi.jsx)(Wh,{className:"w-4 h-4 text-primary"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Secure quote link"})]})]})}),(0,oi.jsxs)("main",{className:"max-w-4xl mx-auto px-6 py-10","data-testid":"public-quote-page",children:[(0,oi.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4 mb-8",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs uppercase tracking-widest text-muted-foreground mb-1",children:"Quote"}),(0,oi.jsx)("h1",{className:"text-3xl sm:text-4xl font-black font-mono",children:t.quote_id}),(0,oi.jsxs)("p",{className:"text-muted-foreground mt-2",children:["Prepared for ",(0,oi.jsx)("span",{className:"text-foreground font-medium",children:t.client_name})]})]}),(0,oi.jsxs)("div",{className:"text-right space-y-2",children:[(0,oi.jsx)(Yu.E,{className:"".concat(Kh(t.status)," text-sm"),"data-testid":"public-quote-status",children:(t.status||"draft").toUpperCase()}),t.valid_until&&(0,oi.jsxs)("p",{className:"text-xs text-muted-foreground flex items-center gap-1 justify-end",children:[(0,oi.jsx)(Gh.A,{className:"w-3 h-3"}),"Valid until ",(0,Qu.GP)(new Date(t.valid_until),"MMM dd, yyyy")]})]})]}),(0,oi.jsx)(Nu.Zp,{className:"border-border overflow-hidden mb-6",children:(0,oi.jsxs)(Vh.XI,{children:[(0,oi.jsx)(Vh.A0,{children:(0,oi.jsxs)(Vh.Hj,{className:"border-border hover:bg-transparent",children:[(0,oi.jsx)(Vh.nd,{
2className:"font-mono text-xs uppercase",children:"Description"}),(0,oi.jsx)(Vh.nd,{className:"font-mono text-xs uppercase text-right",children:"Qty"}),(0,oi.jsx)(Vh.nd,{className:"font-mono text-xs uppercase text-right",children:"Unit Price"}),(0,oi.jsx)(Vh.nd,{className:"font-mono text-xs uppercase text-right",children:"Total"})]})}),(0,oi.jsx)(Vh.BF,{children:t.items.map((e,t)=>{const n=parseFloat(e.quantity)||0,r=parseFloat(e.unit_price)||0;return(0,oi.jsxs)(Vh.Hj,{className:"border-border",children:[(0,oi.jsx)(Vh.nA,{className:"align-top",children:e.description}),(0,oi.jsx)(Vh.nA,{className:"text-right align-top",children:n}),(0,oi.jsxs)(Vh.nA,{className:"text-right align-top",children:["$",r.toFixed(2)]}),(0,oi.jsxs)(Vh.nA,{className:"text-right align-top font-bold",children:["$",(n*r).toFixed(2)]})]},t)})})]})}),(0,oi.jsx)(Nu.Zp,{className:"border-border p-6 mb-6",children:(0,oi.jsxs)("div",{className:"max-w-xs ml-auto space-y-2 text-sm",children:[(0,oi.jsxs)("div",{className:"flex justify-between",children:[(0,oi.jsx)("span",{className:"text-muted-foreground",children:"Subtotal"}),(0,oi.jsxs)("span",{children:["$",t.subtotal.toFixed(2)]})]}),t.tax_rate>0&&(0,oi.jsxs)("div",{className:"flex justify-between",children:[(0,oi.jsxs)("span",{className:"text-muted-foreground",children:["Tax (",t.tax_rate,"%)"]}),(0,oi.jsxs)("span",{children:["$",t.tax_amount.toFixed(2)]})]}),(0,oi.jsxs)("div",{className:"flex justify-between pt-3 border-t border-border",children:[(0,oi.jsx)("span",{className:"text-xs uppercase tracking-widest text-muted-foreground",children:"Total"}),(0,oi.jsxs)("span",{className:"text-2xl font-black text-primary","data-testid":"public-quote-total",children:["$",t.total.toFixed(2)]})]})]})}),t.notes&&(0,oi.jsxs)(Nu.Zp,{className:"border-border p-6 mb-6",children:[(0,oi.jsx)("p",{className:"text-xs uppercase tracking-widest text-muted-foreground mb-2",children:"Notes"}),(0,oi.jsx)("p",{className:"text-sm whitespace-pre-wrap",children:t.notes})]}),w?(0,oi.jsxs)(Nu.Zp,{className:"p-6 border-2 ".concat("accepted"===t.status?"border-primary/60 bg-primary/10":"border-border bg-muted/20"),"data-testid":"public-quote-terminal",children:["accepted"===t.status&&(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(ld.A,{className:"w-10 h-10 text-primary mb-3"}),(0,oi.jsx)("h2",{className:"text-2xl font-black mb-2",children:"Quote accepted"}),(0,oi.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Thanks! ",t.accepted_at&&"Accepted on ".concat((0,Qu.GP)(new Date(t.accepted_at),"MMM dd, yyyy \xb7 h:mm a"),".")," An invoice has been generated",null!==d&&void 0!==d&&d.invoice_id?" (".concat(d.invoice_id,")"):""," and will arrive at your email shortly."]})]}),"rejected"===t.status&&(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(Hh.A,{className:"w-10 h-10 text-red-500 mb-3"}),(0,oi.jsx)("h2",{className:"text-2xl font-black mb-2",children:"Quote rejected"}),(0,oi.jsxs)("p",{className:"text-sm text-muted-foreground",children:[t.rejected_at&&"Rejected on ".concat((0,Qu.GP)(new Date(t.rejected_at),"MMM dd, yyyy \xb7 h:mm a"),".")," If this was a mistake, reach out to us and we'll re-issue."]})]}),"expired"===t.status&&(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsx)(Gh.A,{className:"w-10 h-10 text-muted-foreground mb-3"}),(0,oi.jsx)("h2",{className:"text-2xl font-black mb-2",children:"Quote expired"}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground",children:"The validity window on this quote has passed. Contact us to request a fresh one."})]})]}):(0,oi.jsxs)(Nu.Zp,{className:"border-primary/40 bg-primary/5 p-6","data-testid":"public-quote-actions",children:[(0,oi.jsxs)("p",{className:"text-sm mb-4",children:["Ready to proceed? Accepting below will automatically generate an invoice for ",(0,oi.jsxs)("strong",{children:["$",t.total.toFixed(2)]})," and email you a secure link to pay."]}),(0,oi.jsxs)("div",{className:"flex flex-col sm:flex-row gap-3",children:[(0,oi.jsxs)(vu.$,{className:"flex-1 font-bold uppercase tracking-widest",onClick:async()=>{if(window.confirm("Accept this quote for $".concat(t.total.toFixed(2),"? An invoice will be generated and emailed."))){u("accept");try{const t=await ju.A.post("".concat(Yh,"/api/public/quotes/").concat(e,"/accept"));h(t.data),n(e=>(0,o.A)((0,o.A)({},e),{},{status:"accepted",accepted_at:(new Date).toISOString()})),_u.oR.success("Quote accepted. An invoice has been generated.")}catch(i){var r,a;_u.oR.error((null===(r=i.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.detail)||"Failed to accept quote")}finally{u(null)}}},disabled:null!==c,"data-testid":"public-quote-accept-btn",children:[(0,oi.jsx)(ld.A,{className:"w-4 h-4 mr-2"}),"accept"===c?"Accepting\u2026":"Accept Quote"]}),(0,oi.jsxs)(vu.$,{variant:"outline",className:"flex-1 font-bold uppercase tracking-widest",onClick:async()=>
2{if(window.confirm("Reject this quote? This action cannot be undone.")){u("reject");try{const t=await ju.A.post("".concat(Yh,"/api/public/quotes/").concat(e,"/reject"));h(t.data),n(e=>(0,o.A)((0,o.A)({},e),{},{status:"rejected",rejected_at:(new Date).toISOString()})),_u.oR.success("Quote rejected.")}catch(a){var t,r;_u.oR.error((null===(t=a.response)||void 0===t||null===(r=t.data)||void 0===r?void 0:r.detail)||"Failed to reject quote")}finally{u(null)}}},disabled:null!==c,"data-testid":"public-quote-reject-btn",children:[(0,oi.jsx)(Hh.A,{className:"w-4 h-4 mr-2"}),"reject"===c?"Rejecting\u2026":"Reject"]})]})]}),(0,oi.jsxs)("div",{className:"mt-6 flex flex-col sm:flex-row sm:items-center sm:justify-between gap-3 p-5 bg-card/40 border border-border rounded-lg","data-testid":"public-quote-subscribe-block",children:[(0,oi.jsxs)("div",{className:"flex items-start gap-3",children:[(0,oi.jsx)($h.A,{className:"w-5 h-5 mt-0.5 text-primary shrink-0"}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"font-bold text-sm",children:"Have a question about this quote?"}),(0,oi.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Open a support ticket and our team will follow up by email."})]})]}),(0,oi.jsx)(vu.$,{variant:"outline",onClick:()=>{b({name:"",email:(null!==t&&void 0!==t&&t.client_name,""),message:""}),x(null),p(!0)},className:"font-bold uppercase tracking-widest shrink-0","data-testid":"public-quote-subscribe-btn",children:"Subscribe to Ticket"})]}),(0,oi.jsx)(sd.lG,{open:f,onOpenChange:e=>{p(e),e||x(null)},children:(0,oi.jsxs)(sd.Cf,{className:"bg-card border-border max-w-lg","data-testid":"public-quote-subscribe-dialog",children:[(0,oi.jsx)(sd.c7,{children:(0,oi.jsx)(sd.L3,{className:"text-xl font-bold uppercase",children:"Open a Support Ticket"})}),y?(0,oi.jsxs)("div",{className:"space-y-3","data-testid":"public-quote-subscribe-success",children:[(0,oi.jsx)(ld.A,{className:"w-10 h-10 text-primary"}),(0,oi.jsx)("h3",{className:"text-2xl font-black",children:"Ticket opened"}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground",children:y.message}),(0,oi.jsxs)("p",{className:"text-xs font-mono text-muted-foreground",children:["Reference: ",(0,oi.jsx)("span",{className:"text-foreground",children:y.ticket_id})]}),y.public_url&&(0,oi.jsxs)("a",{href:y.public_url,className:"block text-xs text-primary underline break-all","data-testid":"public-ticket-link",children:["Track status: ",y.public_url]}),(0,oi.jsx)(vu.$,{variant:"outline",className:"w-full font-bold uppercase tracking-widest",onClick:()=>{p(!1),x(null)},children:"Close"})]}):(0,oi.jsxs)("form",{onSubmit:async t=>{if(t.preventDefault(),!v.email.trim()||!v.email.includes("@"))return _u.oR.error("Please enter a valid email");if(!v.message.trim())return _u.oR.error("Please add a question or message");g(!0);try{const t=await ju.A.post("".concat(Yh,"/api/public/quotes/").concat(e,"/subscribe-ticket"),v);x(t.data),_u.oR.success("Ticket created \u2014 we'll be in touch.")}catch(a){var n,r;_u.oR.error((null===(n=a.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.detail)||"Failed to open ticket")}finally{g(!1)}},className:"space-y-4",children:[(0,oi.jsx)("p",{className:"text-xs text-muted-foreground",children:"We'll create a ticket attached to this quote and email you back at the address below."}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"Your name (optional)"}),(0,oi.jsx)(nd.p,{value:v.name,onChange:e=>b((0,o.A)((0,o.A)({},v),{},{name:e.target.value})),placeholder:t.client_name,className:"bg-input","data-testid":"subscribe-name-input"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"Email"}),(0,oi.jsx)(nd.p,{type:"email",required:!0,value:v.email,onChange:e=>b((0,o.A)((0,o.A)({},v),{},{email:e.target.value})),placeholder:"[email protected]",className:"bg-input","data-testid":"subscribe-email-input"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"Your question"}),(0,oi.jsx)(ad.T,{required:!0,rows:5,maxLength:5e3,value:v.message,onChange:e=>b((0,o.A)((0,o.A)({},v),{},{message:e.target.value})),placeholder:"What would you like clarified before moving forward?",className:"bg-input","data-testid":"subscribe-message-input"})]}),(0,oi.jsx)(vu.$,{type:"submit",className:"w-full font-bold uppercase tracking-widest",disabled:m,"data-testid":"subscribe-submit-btn",children:m?"Sending\u2026":"Open Ticket"})]})]})}),(0,oi.jsxs)("footer",{className:"mt-12 text-center text-xs text-muted-foreground space-y-1",children:[(0,oi.jsxs)("p",{children:["Questions? Reply to this email or call ",(0,oi.jsx)("a",{href:"tel:7403025607",className:"text-primary",children:"740-302-5607"}),"."]}),(0,oi.jsxs)("p",{children:["\xa9 ",(new Date).getFullYear()," NextGen Network Solutions"]})]})]})]})},Zh=(0,du.A)("paperclip",[["path",{d:"M13.234 20.252 21 12.3",key:"1cbrk9"}],["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 0 2.828 2 2 0 0 0 2.828 0l8.414-8.586a4 4 0 0 0 0-5.656 4 4 0 0 0-5.656 0l-8.415 8.585a6 6 0 1 0 8.486 8.48
26",key:"1pkts6"}]]),Jh="https://nextgen-staging.emergent.host",Qh=e=>{const t=(e||"").toLowerCase();return"closed"===t?"bg-primary text-primary-foreground":"in_progress"===t?"bg-blue-500/20 text-blue-500 border border-blue-500/40":"waiting_on_client"===t?"bg-amber-500/20 text-amber-500 border border-amber-500/40":"bg-yellow-500/20 text-yellow-500 border border-yellow-500/40"},ef=e=>{const t=(e||"").toLowerCase();return"urgent"===t?"border-red-500/50 text-red-500":"high"===t?"border-orange-500/50 text-orange-500":"medium"===t?"border-yellow-500/50 text-yellow-500":"border-blue-500/50 text-blue-500"},tf=()=>{const{token:e}=ke(),[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)(!0),[s,o]=(0,r.useState)(null),[l,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(""),[h,f]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let t=!1;const r=async()=>{try{const r=await ju.A.get("".concat(Jh,"/api/public/tickets/").concat(e));t||(n(r.data),o(null))}catch(a){var r;if(!t)o(404===(null===(r=a.response)||void 0===r?void 0:r.status)?"Ticket link not found":"Failed to load ticket")}finally{t||i(!1)}};r();const a=setInterval(r,3e4);return()=>{t=!0,clearInterval(a)}},[e]);return a?(0,oi.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center",children:(0,oi.jsxs)("div",{className:"text-center",children:[(0,oi.jsx)(Zu.A,{className:"w-10 h-10 animate-spin mx-auto mb-4 text-primary"}),(0,oi.jsx)("p",{className:"text-muted-foreground font-mono uppercase tracking-widest text-xs",children:"Loading ticket\u2026"})]})}):s||!t?(0,oi.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center p-6",children:(0,oi.jsxs)(Nu.Zp,{className:"max-w-md p-8 text-center border-border","data-testid":"public-ticket-error",children:[(0,oi.jsx)(Hh.A,{className:"w-12 h-12 mx-auto mb-4 text-red-500"}),(0,oi.jsx)("h1",{className:"text-2xl font-black mb-2",children:"Link not found"}),(0,oi.jsx)("p",{className:"text-muted-foreground",children:s||"The ticket you are looking for no longer exists."})]})}):(0,oi.jsxs)("div",{className:"min-h-screen bg-background","data-testid":"public-ticket-page",children:[(0,oi.jsx)("header",{className:"border-b border-border bg-card/50 backdrop-blur",children:(0,oi.jsxs)("div",{className:"max-w-3xl mx-auto px-6 py-6 flex items-center justify-between",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("div",{className:"text-2xl font-black",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]}),(0,oi.jsx)("div",{className:"text-[10px] uppercase tracking-[0.3em] text-muted-foreground mt-1",children:"Network Solutions"})]}),(0,oi.jsxs)("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[(0,oi.jsx)(Wh,{className:"w-4 h-4 text-primary"}),(0,oi.jsx)("span",{className:"hidden sm:inline",children:"Secure status link"})]})]})}),(0,oi.jsxs)("main",{className:"max-w-3xl mx-auto px-6 py-10",children:[(0,oi.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-end sm:justify-between gap-4 mb-8",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("p",{className:"text-xs uppercase tracking-widest text-muted-foreground mb-1",children:"Support Ticket"}),(0,oi.jsx)("h1",{className:"text-2xl sm:text-3xl font-black","data-testid":"public-ticket-title",children:t.title}),(0,oi.jsx)("p",{className:"text-xs font-mono text-muted-foreground mt-2",children:t.ticket_id})]}),(0,oi.jsxs)("div",{className:"text-right space-y-2",children:[(0,oi.jsx)(Yu.E,{className:"".concat(Qh(t.status)," text-sm"),"data-testid":"public-ticket-status",children:(t.status||"open").replace("_"," ").toUpperCase()}),(0,oi.jsx)(Yu.E,{variant:"outline",className:"".concat(ef(t.priority)," text-xs ml-2"),children:(t.priority||"medium").toUpperCase()})]})]}),t.subscriber_email&&(0,oi.jsxs)(Nu.Zp,{className:"border-border p-4 mb-6",children:[(0,oi.jsx)("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground mb-1",children:"Reply Address"}),(0,oi.jsxs)("p",{className:"text-sm",children:[t.subscriber_name&&(0,oi.jsxs)("span",{className:"font-medium",children:[t.subscriber_name," "]}),(0,oi.jsxs)("span",{className:"text-muted-foreground",children:["<",t.subscriber_email,">"]})]})]}),(0,oi.jsxs)(Nu.Zp,{className:"border-border p-6 mb-6",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,oi.jsx)($h.A,{className:"w-4 h-4 text-muted-foreground"}),(0,oi.jsx)("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground",children:"Conversation"})]}),(0,oi.jsxs)("div",{className:"mb-4 pb-4 border-b border-border",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,oi.jsx)(Bu.A,{className:"w-3.5 h-3.5 text-muted-foreground"}),(0,oi.jsx)("span",{className:"text-xs font-medium",children:t.subscriber_name||"You"}),(0,oi.jsx)("span",{className:"text-[10px] text-muted-foreground",children:t.created_at&&(0,Qu.GP)(new Date(t.created_at),"MMM dd \xb7 h:mm a")})]}),(0,oi.jsx)("p",{className:"text-sm whitespace-pre-wrap","data-testid":"public-ticket-description",children:t.description})]}),(t.comments||[]).map((e,t)=>{const n="staff"===e.author_kind;return(0,oi.jsxs)("div",{className:"mb-3 p-3 rounded-md ".concat(n?"bg-primary/5 border border-primary/30":"bg-muted/30 border border-border"),"data-testid":"public-ticket-comment-".concat(t),children:[(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[n?(0,oi.jsx)(ld.A,{className:"w-3.5 h-3.5 text-primary"}):(0,oi.jsx)(Bu.A,{className:"w-3.5 h-3.5 text-muted-foreground"}),(0,oi.jsx)("span",{className:"text-xs font-medium ".concat(n?"text-primary":""),children:n?"".concat(e.author_name||"NextGen Team"):e.author_name||"You"}),(0,oi.jsx)("span",{className:"text-[10px] text-muted-foreground",children:e.created_at&&(0,Qu.GP)(new Date(e.created_at),"MMM dd \xb7 h:mm a")})]}),(0,oi.jsx)("p",{className:"text-sm whitespace-pre-wrap",children:e.message})]},t)}),(!t.comments||0===t.comments.length)&&t.admin_response&&(0,oi.jsxs)("div",{className:"mb-3 p-3 rounded-md bg-primary/5 border border-primary/30","data-testid":"public-ticket-reply",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,oi.jsx)(ld.A,{className:"w-3.5 h-3.5 text-primary"}),(0,oi.jsx)("span",{className:"text-xs font-medium text-primary",children:"NextGen Team"}),(0,oi.jsx)("span",{className:"text-[10px] text-muted-foreground",children:t.updated_at&&(0,Qu.GP)(new Date(t.updated_at),"MMM dd \xb7 h:mm a")})]}),(0,oi.jsx)("p",{className:"text-sm whitespace-pre-wrap",children:t.admin_response})]}),(!t.comments||0===t.comments.length)&&!t.admin_response&&(0,oi.jsxs)("div",{className:"text-center py-6 mb-3 text-xs text-muted-foreground","data-testid":"public-ticket-pending",children:[(0,oi.jsx)(Gh.A,{className:"w-6 h-6 mx-auto mb-2 opacity-60"}),"No reply yet \u2014 auto-refreshing every 30 seconds."]}),"closed"!==(t.status||"").toLowerCase()?(0,oi.jsxs)("form",{onSubmit:async t=>{if(t.preventDefault(),u.trim()){f(!0);try{const t=await ju.A.post("".concat(Jh,"/api/public/tickets/").concat(e,"/reply"),{message:u.trim(),name:l.trim()||void 0});n(t.data.ticket),d(""),_u.oR.success("Reply posted \u2014 our team has been notified")}catch(i){var r,a;const e=(null===(r=i.response)||void 0===r||null===(a=r.data)||void 0===a?void 0:a.detail)||"Failed to post reply";_u.oR.error(e)}finally{f(!1)}}},className:"mt-4 pt-4 border-t border-border space-y-3","data-testid":"public-ticket-reply-form",children:[(0,oi.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{className:"text-[10px] uppercase tracking-widest text-muted-foreground",children:"Your name (optional)"}
2),(0,oi.jsx)(nd.p,{value:l,onChange:e=>c(e.target.value),placeholder:t.subscriber_name||"Your name",className:"bg-input","data-testid":"public-ticket-reply-name"})]})}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{className:"text-[10px] uppercase tracking-widest text-muted-foreground",children:"Your reply"}),(0,oi.jsx)(ad.T,{required:!0,rows:4,maxLength:5e3,value:u,onChange:e=>d(e.target.value),placeholder:"Add a follow-up question or update\u2026",className:"bg-input","data-testid":"public-ticket-reply-message"})]}),(0,oi.jsxs)(vu.$,{type:"submit",disabled:h||!u.trim(),className:"font-bold uppercase tracking-widest","data-testid":"public-ticket-reply-submit",children:[h?(0,oi.jsx)(Zu.A,{className:"w-4 h-4 mr-2 animate-spin"}):(0,oi.jsx)(dh.A,{className:"w-4 h-4 mr-2"}),h?"Posting\u2026":"Post Reply"]})]}):(0,oi.jsxs)("p",{className:"text-xs text-muted-foreground italic mt-4 pt-4 border-t border-border",children:["This ticket is closed. Need more help? Email or call ",(0,oi.jsx)("a",{href:"tel:7403025607",className:"text-primary",children:"740-302-5607"}),"."]})]}),t.attachments&&t.attachments.length>0&&(0,oi.jsxs)(Nu.Zp,{className:"border-border p-4 mb-6",children:[(0,oi.jsxs)("p",{className:"text-[10px] uppercase tracking-widest text-muted-foreground mb-3 flex items-center gap-2",children:[(0,oi.jsx)(Zh,{className:"w-3 h-3"}),t.attachments.length," attachment(s)"]}),(0,oi.jsx)("ul",{className:"space-y-1",children:t.attachments.map((e,t)=>(0,oi.jsxs)("li",{className:"text-xs font-mono text-muted-foreground flex items-center gap-2",children:[(0,oi.jsx)("span",{className:"text-foreground",children:e.filename}),(0,oi.jsxs)("span",{children:["\xb7 ",Math.round((e.size||0)/1024)," KB"]})]},t))})]}),(0,oi.jsxs)("footer",{className:"mt-12 text-center text-xs text-muted-foreground space-y-1",children:[(0,oi.jsxs)("p",{children:["Need a faster reply? Email or call ",(0,oi.jsx)("a",{href:"tel:7403025607",className:"text-primary",children:"740-302-5607"}),"."]}),(0,oi.jsxs)("p",{children:["\xa9 ",(new Date).getFullYear()," NextGen Network Solutions"]})]})]})]})};var nf=n(7719),rf=n(7819);const af={operational:{icon:ld.A,color:"text-primary",bg:"bg-primary/10",border:"border-primary/40",label:"Operational"},degraded:{icon:nf.A,color:"text-amber-400",bg:"bg-amber-500/10",border:"border-amber-500/40",label:"Degraded"},outage:{icon:rf.A,color:"text-red-500",bg:"bg-red-500/10",border:"border-red-500/50",label:"Outage"},unknown:{icon:Tu.A,color:"text-muted-foreground",bg:"bg-muted/20",border:"border-border",label:"Unknown"}},sf=e=>{if(null==e)return"\u2014";const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60);return t>0?"".concat(t,"d ").concat(n,"h"):n>0?"".concat(n,"h ").concat(r,"m"):"".concat(r,"m")},of=()=>{const[e,t]=(0,r.useState)(null),[n,a]=(0,r.useState)(null),[i,s]=(0,r.useState)(!0),[o,l]=(0,r.useState)(null);if((0,r.useEffect)(()=>{let e=!1;const n=async()=>{try{const n=await ju.A.get("".concat("https://nextgen-staging.emergent.host","/api/public/status"));e||(t(n.data),a(null),l(new Date))}catch(n){e||a("Unable to reach the status service")}finally{e||s(!1)}};n();const r=setInterval(n,3e4);return()=>{e=!0,clearInterval(r)}},[]),i)return(0,oi.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center",children:(0,oi.jsx)(Zu.A,{className:"w-10 h-10 animate-spin text-primary"})});const c=(null===e||void 0===e?void 0:e.overall_status)||(n?"outage":"unknown"),u=af[c]||af.unknown,d=u.icon;return(0,oi.jsxs)("div",{className:"min-h-screen bg-background","data-testid":"system-status-page",children:[(0,oi.jsx)("header",{className:"border-b border-border bg-card/50 backdrop-blur",children:(0,oi.jsxs)("div",{className:"max-w-4xl mx-auto px-6 py-6 flex items-center justify-between",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("div",{className:"text-2xl font-black",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]}),(0,oi.jsx)("div",{className:"text-[10px] uppercase tracking-[0.3em] text-muted-foreground mt-1",children:"System Status"})]}),(0,oi.jsx)("a",{href:"/",className:"text-xs text-primary hover:underline",children:"Back to site"})]})}),(0,oi.jsxs)("main",{className:"max-w-4xl mx-auto px-6 py-10 space-y-6",children:[(0,oi.jsx)(Nu.Zp,{className:"p-6 ".concat(u.bg," ").concat(u.border," border-2"),"data-testid":"status-overall-card",children:(0,oi.jsxs)("div",{className:"flex items-center gap-4",children:[(0,oi.jsx)(d,{className:"w-10 h-10 ".concat(u.color)}),(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("h1",{className:"text-2xl sm:text-3xl font-black ".concat(u.color),children:["operational"===c&&"All systems operational","degraded"===c&&"Some systems are degraded","outage"===c&&"We are experiencing an outage","unknown"===c&&"Status unknown"]}),(0,oi.jsxs)("p",{className:"text-xs text-muted-foreground mt-1",children:[(null===e||void 0===e?void 0:e.checked_at)&&"Last checked ".concat((0,Qu.GP)(new Date(e.checked_at),"h:mm:ss a \xb7 MMM dd, yyyy")),null!=(null===e||void 0===e?void 0:e.uptime_seconds)&&" \xb7 API uptime ".concat(sf(e.uptime_seconds))]})]})]})}),(0,oi.jsxs)(Nu.Zp,{className:"p-6 border-border",children:[(0,oi.jsx)("h2",{className:"text-sm uppercase tracking-widest text-muted-foreground mb-4",children:"Components"}),(0,oi.jsxs)("div",{className:"space-y-3",children:[((null===e||void 0===e?void 0:e.components)||[]).map(e=>{const t=af[e.status]||af.unknown,n=t.icon;return(0,oi.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-md border border-border bg-muted/10","data-testid":"status-component-".concat(e.name),children:[(0,oi.jsxs)("div",{className:"flex items-center gap-3 min-w-0",children:[(0,oi.jsx)(n,{className:"w-5 h-5 shrink-0 ".concat(t.color)}),(0,oi.jsxs)("div",{className:"min-w-0",children:[(0,oi.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,oi.jsx)("p",{className:"text-[11px] text-muted-foreground truncate",children:e.message})]})]}),(0,oi.jsxs)("div",{className:"flex items-center gap-2 shrink-0",children:[null!=e.latency_ms&&(0,oi.jsxs)("span",{className:"text-[10px] font-mono text-muted-foreground",children:[e.latency_ms,"ms"]}),(0,oi.jsx)(Yu.E,{variant:"outline",className:"text-[10px] uppercase tracking-widest ".concat(t.color," ").concat(t.border),children:t.label})]})]},e.name)}),n&&(0,oi.jsx)("div",{className:"p-3 rounded-md border border-red-500/40 bg-red-500/5 text-sm text-red-500","data-testid":"status-fetch-error",children:n})]})]}),(0,oi.jsxs)(Nu.Zp,{className:"p-6 border-border",children:[(0,oi.jsxs)("h2",{className:"text-sm uppercase tracking-widest text-muted-foreground mb-4 flex items-center gap-2",children:[(0,oi.jsx)(Gh.A,{className:"w-4 h-4"}),"Recent Incidents"]}),null!==e&&void 0!==e&&e.incidents&&0!==e.incidents.length?(0,oi.jsx)("div",{className:"space-y-3",children:e.incidents.map((e,t)=>(0,oi.jsxs)("div",{className:"p-3 rounded-md border border-border","data-testid":"status-incident-".concat(t),children:[(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,oi.jsx)(Yu.E,{variant:"outline",className:"text-[10px] uppercase",children:e.severity||"minor"}),(0,oi.jsx)("span",{className:"text-xs font-medium",children:e.title})]}),e.description&&(0,oi.jsx)("p",{className:"text-xs text-muted-foreground",children:e.description}),(0,oi.jsx)("p",{className:"text-[10px] text-muted-foreground mt-1",children:e.created_at&&(0,Qu.GP)(new Date(e.created_at),"MMM dd, yyyy \xb7 h:mm a")})]},e.incident_id||t))}):(0,oi.jsx)("p",{className:"text-sm text-muted-foreground py-3 text-center",children:"No incidents reported. We'll post any issues here as they happen."})]}),(0,oi.jsxs)("footer",{className:"text-center text-xs text-muted-foreground pt-6 space-y-1",children:[(0,oi.jsxs)("p",{children:["Need help right now? Call ",(0,oi.jsx)("a",{href:"tel:7403025607",className:"text-primary",children:"740-302-5607"})]}),(0,oi.jsx)("p",{children:"This page auto-refreshes every 30 seconds."}),(0,oi.jsxs)("p",{children:["\xa9 ",(new Date).getFullYear()," ",(null===e||void 0===e?void 0:e.company)||"NextGen Network Solutions"]})]})]})]})};var lf=n(8646);const cf="https://nextgen-staging.emergent.host",uf=()=>{const[e,t]=(0,r.useState)(null),[n,a]=(0,r.useState)(!0),[i,s]=(0,r.useState)(null),[l,c]=(0,r.useState)({name:"",email:"",ph
2one:"",topic:""}),[u,d]=(0,r.useState)(!1),[h,f]=(0,r.useState)(null),p=async()=>{a(!0);try{const e=await ju.A.get("".concat(cf,"/api/public/bookings/availability?days=14"));t(e.data)}catch(_f){_u.oR.error("Failed to load availability")}finally{a(!1)}};(0,r.useEffect)(()=>{p()},[]);const m=(0,r.useMemo)(()=>{if(null===e||void 0===e||!e.slots)return{};const t={};for(const n of e.slots){const e=n.start_at.slice(0,10);t[e]=t[e]||[],t[e].push(n)}return t},[e]);return h?(0,oi.jsx)("div",{className:"min-h-screen bg-background flex items-center justify-center p-6",children:(0,oi.jsxs)(Nu.Zp,{className:"max-w-lg p-8 border-primary/40 bg-primary/5","data-testid":"booking-confirmed",children:[(0,oi.jsx)(ld.A,{className:"w-12 h-12 mx-auto mb-4 text-primary"}),(0,oi.jsx)("h1",{className:"text-2xl font-black text-center mb-3",children:"Booking confirmed"}),(0,oi.jsxs)("p",{className:"text-sm text-center text-muted-foreground mb-4",children:["We've sent a confirmation to ",(0,oi.jsx)("span",{className:"text-foreground font-mono",children:h.email}),"."]}),(0,oi.jsxs)("div",{className:"text-center space-y-2",children:[(0,oi.jsx)("p",{className:"text-xs uppercase tracking-widest text-muted-foreground",children:"Your slot"}),(0,oi.jsx)("p",{className:"text-base font-bold",children:(0,Qu.GP)(new Date(h.start_at),"EEEE, MMM dd, yyyy")}),(0,oi.jsxs)("p",{className:"text-sm",children:[(0,Qu.GP)(new Date(h.start_at),"h:mm a")," (",h.duration_minutes," min)"]}),(0,oi.jsxs)("p",{className:"text-[10px] font-mono text-muted-foreground pt-3",children:["Ref: ",h.booking_id]})]}),(0,oi.jsx)(vu.$,{className:"w-full mt-6",variant:"outline",onClick:()=>window.location.href="/",children:"Back to home"})]})}):(0,oi.jsxs)("div",{className:"min-h-screen bg-background","data-testid":"public-booking-page",children:[(0,oi.jsx)("header",{className:"border-b border-border bg-card/50 backdrop-blur",children:(0,oi.jsxs)("div",{className:"max-w-4xl mx-auto px-6 py-6 flex items-center justify-between",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsxs)("div",{className:"text-2xl font-black",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]}),(0,oi.jsx)("div",{className:"text-[10px] uppercase tracking-[0.3em] text-muted-foreground mt-1",children:"Book a Consultation"})]}),(0,oi.jsx)("a",{href:"/",className:"text-xs text-primary hover:underline",children:"Back to site"})]})}),(0,oi.jsxs)("main",{className:"max-w-4xl mx-auto px-6 py-10 space-y-6",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("h1",{className:"text-3xl sm:text-4xl font-black mb-2",children:"Schedule a free consultation"}),(0,oi.jsxs)("p",{className:"text-sm text-muted-foreground max-w-2xl",children:["Pick a time that works \u2014 we'll spend ",(null===e||void 0===e?void 0:e.slot_duration_minutes)||30," minutes understanding your environment and recommending next steps. No commitment."]})]}),(0,oi.jsxs)(Nu.Zp,{className:"p-6 border-border","data-testid":"booking-slot-picker",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,oi.jsx)(lf.A,{className:"w-4 h-4 text-primary"}),(0,oi.jsx)("h2",{className:"font-bold uppercase tracking-tight text-sm",children:"Available times"})]}),n&&(0,oi.jsx)(Zu.A,{className:"w-6 h-6 animate-spin mx-auto"}),!n&&(!(null!==e&&void 0!==e&&e.slots)||0===e.slots.length)&&(0,oi.jsxs)("p",{className:"text-sm text-muted-foreground py-4",children:["No slots available right now. Please call us at"," ",(0,oi.jsx)("a",{href:"tel:7403025607",className:"text-primary",children:"740-302-5607"}),"."]}),!n&&Object.keys(m).map(e=>(0,oi.jsxs)("div",{className:"mb-4",children:[(0,oi.jsx)("h3",{className:"text-xs uppercase tracking-widest text-muted-foreground mb-2",children:(0,Qu.GP)(new Date(e+"T00:00:00"),"EEEE \xb7 MMM dd")}),(0,oi.jsx)("div",{className:"grid grid-cols-3 sm:grid-cols-5 lg:grid-cols-6 gap-2",children:m[e].map(e=>{const t=(null===i||void 0===i?void 0:i.start_at)===e.start_at;return(0,oi.jsx)("button",{type:"button",onClick:()=>s(e),className:"px-3 py-2 text-xs uppercase tracking-wider rounded-md border transition-colors ".concat(t?"bg-primary text-primary-foreground border-primary font-bold":"border-border hover:border-primary/50"),"data-testid":"slot-".concat(e.start_at),children:(0,Qu.GP)(new Date(e.start_at),"h:mm a")},e.start_at)})})]},e))]}),i&&(0,oi.jsxs)(Nu.Zp,{className:"p-6 border-primary/30","data-testid":"booking-form",children:[(0,oi.jsxs)("div",{className:"flex items-center gap-2 mb-4",children:[(0,oi.jsx)(Gh.A,{className:"w-4 h-4 text-primary"}),(0,oi.jsxs)("h2",{className:"font-bold uppercase tracking-tight text-sm",children:["Confirm \u2014 ",(0,Qu.GP)(new Date(i.start_at),"EEE, MMM dd \xb7 h:mm a")]})]}),(0,oi.jsxs)("form",{onSubmit:async e=>{var t;if(null===e||void 0===e||null===(t=e.preventDefault)||void 0===t||t.call(e),!i)return _u.oR.error("Pick a time slot first");
2if(!l.name.trim())return _u.oR.error("Name is required");if(!l.email.includes("@"))return _u.oR.error("Valid email required");d(!0);try{const e=await ju.A.post("".concat(cf,"/api/public/bookings"),(0,o.A)((0,o.A)({},l),{},{start_at:i.start_at}));f(e.data),_u.oR.success("Booking confirmed")}catch(a){var n,r;_u.oR.error((null===(n=a.response)||void 0===n||null===(r=n.data)||void 0===r?void 0:r.detail)||"Failed to book"),p(),s(null)}finally{d(!1)}},className:"space-y-3",children:[(0,oi.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"Name"}),(0,oi.jsx)(nd.p,{value:l.name,onChange:e=>c((0,o.A)((0,o.A)({},l),{},{name:e.target.value})),required:!0,className:"bg-input","data-testid":"booking-name"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"Email"}),(0,oi.jsx)(nd.p,{type:"email",value:l.email,onChange:e=>c((0,o.A)((0,o.A)({},l),{},{email:e.target.value})),required:!0,className:"bg-input","data-testid":"booking-email"})]})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"Phone (optional)"}),(0,oi.jsx)(nd.p,{value:l.phone,onChange:e=>c((0,o.A)((0,o.A)({},l),{},{phone:e.target.value})),className:"bg-input","data-testid":"booking-phone"})]}),(0,oi.jsxs)("div",{children:[(0,oi.jsx)(rd.J,{children:"What would you like to discuss? (optional)"}),(0,oi.jsx)(ad.T,{rows:4,maxLength:2e3,value:l.topic,onChange:e=>c((0,o.A)((0,o.A)({},l),{},{topic:e.target.value})),placeholder:"e.g. We need to migrate 25 users to a new domain controller and want quotes.",className:"bg-input","data-testid":"booking-topic"})]}),(0,oi.jsx)(vu.$,{type:"submit",disabled:u,className:"w-full font-bold uppercase tracking-widest","data-testid":"booking-submit",children:u?"Booking\u2026":"Confirm Booking"})]})]})]})]})},df="https://nextgen-staging.emergent.host",hf=()=>{const{token:e}=ke(),[t,n]=(0,r.useState)(null),[a,i]=(0,r.useState)(!0),[s,o]=(0,r.useState)(null),[l,c]=(0,r.useState)(""),[u,d]=(0,r.useState)(!1),[h,f]=(0,r.useState)(!1);(0,r.useEffect)(()=>{ju.A.get("".concat(df,"/api/public/nps/").concat(e)).then(e=>{n(e.data),null!==e.data.score&&void 0!==e.data.score&&(o(e.data.score),c(e.data.comment||""))}).catch(()=>_u.oR.error("Survey link is invalid or expired")).finally(()=>i(!1))},[e]);return a?(0,oi.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background",children:(0,oi.jsx)(Zu.A,{className:"w-8 h-8 animate-spin text-muted-foreground"})}):h?(0,oi.jsx)("div",{className:"min-h-screen flex items-center justify-center bg-background p-6",children:(0,oi.jsxs)(Nu.Zp,{className:"max-w-md p-8 border-primary/40 bg-primary/5 text-center","data-testid":"nps-thank-you",children:[(0,oi.jsx)(ld.A,{className:"w-12 h-12 mx-auto mb-4 text-primary"}),(0,oi.jsx)("h1",{className:"text-2xl font-black mb-3",children:"Thank you!"}),(0,oi.jsx)("p",{className:"text-sm text-muted-foreground",children:"Your feedback helps us serve you better. We read every comment."}),(0,oi.jsx)(vu.$,{className:"w-full mt-6",variant:"outline",onClick:()=>window.location.href="/",children:"Back to home"})]})}):(0,oi.jsxs)("div",{className:"min-h-screen bg-background","data-testid":"nps-survey-page",children:[(0,oi.jsx)("header",{className:"border-b border-border bg-card/50 backdrop-blur",children:(0,oi.jsxs)("div",{className:"max-w-3xl mx-auto px-6 py-6 flex items-center justify-between",children:[(0,oi.jsxs)("div",{className:"text-2xl font-black",children:["NEXT",(0,oi.jsx)("span",{className:"text-primary",children:"/"}),"GEN"]}),(0,oi.jsx)("span",{className:"text-[10px] uppercase tracking-[0.3em] text-muted-foreground",children:"Customer Feedback"})]})}),(0,oi.jsxs)("main",{className:"max-w-3xl mx-auto px-6 py-12 space-y-8",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("h1",{className:"text-3xl sm:text-4xl font-black mb-3",children:"How did we do?"}),(0,oi.jsx)("p",{className:"text-base text-muted-foreground",children:"How likely are you to recommend NextGen Network Solutions to a friend or colleague?"}),(null===t||void 0===t?void 0:t.ticket_title)&&(0,oi.jsxs)("p",{className:"text-xs text-muted-foreground mt-2 italic",children:['Following up on: "',t.ticket_title,'"']})]}),(0,oi.jsxs)(Nu.Zp,{className:"p-6 border-border","data-testid":"nps-score-picker",children:[(0,oi.jsxs)("div",{className:"flex justify-between text-[10px] uppercase tracking-widest text-muted-foreground mb-3",children:[(0,oi.jsx)("span",{children:"Not likely"}),(0,oi.jsx)("span",{children:"Very likely"})]}),(0,oi.jsx)("div",{className:"grid grid-cols-11 gap-1.5",children:Array.from({length:11}
2,(e,t)=>(0,oi.jsx)("button",{type:"button",onClick:()=>o(t),"data-testid":"nps-score-".concat(t),className:"aspect-square rounded-md border text-base font-bold transition-all ".concat(s===t?"bg-primary text-primary-foreground border-primary scale-110":"border-border hover:border-primary/50"),children:t},t))})]}),null!==s&&(0,oi.jsxs)(Nu.Zp,{className:"p-6 border-border space-y-4","data-testid":"nps-comment-card",children:[(0,oi.jsxs)("div",{children:[(0,oi.jsx)("label",{className:"text-xs uppercase tracking-widest text-muted-foreground",children:s>=9?"What worked well?":s>=7?"What would make it a 10?":"How can we do better?"}),(0,oi.jsx)(ad.T,{rows:4,value:l,maxLength:2e3,onChange:e=>c(e.target.value),placeholder:"Optional, but extremely helpful.",className:"bg-input mt-2","data-testid":"nps-comment"})]}),(0,oi.jsx)(vu.$,{onClick:async()=>{if(null===s)return _u.oR.error("Pick a score 0-10");d(!0);try{await ju.A.post("".concat(df,"/api/public/nps/").concat(e),{score:s,comment:l.trim()||null}),f(!0)}catch(jf){var t,n;_u.oR.error((null===(t=jf.response)||void 0===t||null===(n=t.data)||void 0===n?void 0:n.detail)||"Failed to submit")}finally{d(!1)}},disabled:u,className:"w-full font-bold uppercase tracking-widest","data-testid":"nps-submit",children:u?"Submitting\u2026":"Submit Feedback"})]})]})]})},ff=(0,du.A)("smartphone",[["rect",{width:"14",height:"20",x:"5",y:"2",rx:"2",ry:"2",key:"1yt0o3"}],["path",{d:"M12 18h.01",key:"mhygvu"}]]);let pf=null;const mf=new Set;function gf(){mf.forEach(e=>{try{e(pf)}catch(_f){}})}"undefined"!==typeof window&&(window.addEventListener("beforeinstallprompt",e=>{e.preventDefault(),pf=e,gf()}),window.addEventListener("appinstalled",()=>{pf=null,gf()}));const vf="pwa_install_dismissed_at",bf=()=>{const[e,t]=(0,r.useState)(!1),[n,a]=(0,r.useState)(!0),[i,s]=(0,r.useState)(!1);(0,r.useEffect)(()=>{if(function(){var e,t;return"undefined"!==typeof window&&((null===(e=(t=window).matchMedia)||void 0===e?void 0:e.call(t,"(display-mode: standalone)").matches)||!0===window.navigator.standalone)}())return;const e=parseInt(localStorage.getItem(vf)||"0",10)+6048e5;if(Date.now()<e)return;const n=function(e){mf.add(e);try{e(pf)}catch(t){}return()=>mf.delete(e)}(e=>{t(!!e),e&&a(!1)}),r=window.navigator.userAgent,i=/iPad|iPhone|iPod/.test(r)&&!window.MSStream,o=/^((?!chrome|android).)*safari/i.test(r);return i&&o&&(s(!0),a(!1)),n},[]);return n||!e&&!i?null:(0,oi.jsxs)("div",{className:"fixed bottom-4 left-4 right-4 sm:left-auto sm:right-4 sm:bottom-4 sm:w-[380px] z-[100] rounded-lg border border-primary/40 bg-card/95 backdrop-blur shadow-2xl p-4 flex items-start gap-3","data-testid":"pwa-install-banner",children:[(0,oi.jsx)("div",{className:"w-9 h-9 rounded-md bg-primary/10 flex items-center justify-center shrink-0",children:(0,oi.jsx)(ff,{className:"w-4 h-4 text-primary"})}),(0,oi.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,oi.jsx)("p",{className:"text-sm font-bold uppercase tracking-tight",children:"Install NextGen"}),i?(0,oi.jsxs)("p",{className:"text-xs text-muted-foreground mt-1 leading-snug",children:["Tap the ",(0,oi.jsx)("strong",{children:"Share"}),' icon below, then "Add to Home Screen" to install. Works offline.']}):(0,oi.jsx)("p",{className:"text-xs text-muted-foreground mt-1 leading-snug",children:"Add the app to your home screen. Works offline and launches like a native app."}),e&&(0,oi.jsx)(vu.$,{size:"sm",className:"mt-3 font-bold uppercase tracking-widest",onClick:async()=>{const e=await async function(){if(!pf)return{outcome:"unavailable"};pf.prompt();const e=await pf.userChoice;return pf=null,gf(),e}();"accepted"!==e.outcome&&"unavailable"!==e.outcome||a(!0)},"data-testid":"pwa-install-btn",children:"Install app"})]}),(0,oi.jsx)("button",{type:"button",onClick:()=>{localStorage.setItem(vf,String(Date.now())),a(!0)},className:"text-muted-foreground hover:text-foreground shrink-0","aria-label":"Dismiss","data-testid":"pwa-dismiss-btn",children:(0,oi.jsx)(bu.A,{className:"w-4 h-4"})})]})};var yf=(e,t,n,r,a,i,s,o)=>{let l=document.documentElement,c=["light","dark"];
2function u(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n="class"===e,r=n&&i?a.map(e=>i[e]||e):a;n?(l.classList.remove(...r),l.classList.add(i&&i[t]?i[t]:t)):l.setAttribute(e,t)}),function(e){o&&c.includes(e)&&(l.style.colorScheme=e)}(t)}if(r)u(r);else try{let e=localStorage.getItem(t)||n;u(s&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e)}catch(d){}},xf=r.createContext(void 0),wf={setTheme:e=>{},themes:[]};r.memo(e=>{let{forcedTheme:t,storageKey:n,attribute:a,enableSystem:i,enableColorScheme:s,defaultTheme:l,value:c,themes:u,nonce:d,scriptProps:h}=e,f=JSON.stringify([a,n,l,t,u,c,i,s]).slice(1,-1);return r.createElement("script",(0,o.A)((0,o.A)({},h),{},{suppressHydrationWarning:!0,nonce:"undefined"==typeof window?d:"",dangerouslySetInnerHTML:{__html:"(".concat(yf.toString(),")(").concat(f,")")}}))});const kf=e=>{let t=Object.assign({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e));const{theme:n="system"}=(()=>{var e;return null!=(e=r.useContext(xf))?e:wf})();return(0,oi.jsx)(_u.l$,(0,o.A)({theme:n,className:"toaster group",toastOptions:{classNames:{toast:"group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg",description:"group-[.toast]:text-muted-foreground",actionButton:"group-[.toast]:bg-primary group-[.toast]:text-primary-foreground",cancelButton:"group-[.toast]:bg-muted group-[.toast]:text-muted-foreground"}}},t))};function Nf(){var e;return null!==(e=be().hash)&&void 0!==e&&e.includes("session_id=")?(0,oi.jsx)(Cu,{}):(0,oi.jsxs)(oi.Fragment,{children:[(0,oi.jsxs)(Ve,{children:[(0,oi.jsx)(qe,{path:"/",element:(0,oi.jsx)(ku,{})}),(0,oi.jsx)(qe,{path:"/login",element:(0,oi.jsx)(Au,{})}),(0,oi.jsx)(qe,{path:"/dashboard",element:(0,oi.jsx)($u,{})}),(0,oi.jsx)(qe,{path:"/invoices",element:(0,oi.jsx)(td,{})}),(0,oi.jsx)(qe,{path:"/tickets",element:(0,oi.jsx)(md,{})}),(0,oi.jsx)(qe,{path:"/services",element:(0,oi.jsx)(Sd,{})}),(0,oi.jsx)(qe,{path:"/pricing",element:(0,oi.jsx)($d,{})}),(0,oi.jsx)(qe,{path:"/subscriptions",element:(0,oi.jsx)(Kd,{})}),(0,oi.jsx)(qe,{path:"/credentials",element:(0,oi.jsx)(nh,{})}),(0,oi.jsx)(qe,{path:"/admin",element:(0,oi.jsx)(Dh,{})}),(0,oi.jsx)(qe,{path:"/tech",element:(0,oi.jsx)(Uh,{})}),(0,oi.jsx)(qe,{path:"/quote/:token",element:(0,oi.jsx)(Xh,{})}),(0,oi.jsx)(qe,{path:"/ticket/:token",element:(0,oi.jsx)(tf,{})}),(0,oi.jsx)(qe,{path:"/system-status",element:(0,oi.jsx)(of,{})}),(0,oi.jsx)(qe,{path:"/book",element:(0,oi.jsx)(uf,{})}),(0,oi.jsx)(qe,{path:"/nps/:token",element:(0,oi.jsx)(hf,{})})]}),(0,oi.jsx)(kf,{position:"top-right"})]})}const Af=function(){return(0,oi.jsx)("div",{className:"App",children:(0,oi.jsxs)(kt,{children:[(0,oi.jsx)(Nf,{}),(0,oi.jsx)(bf,{})]})})};i.createRoot(document.getElementById("root")).render((0,oi.jsx)(r.StrictMode,{children:(0,oi.jsx)(Af,{})})),"undefined"!==typeof window&&"serviceWorker"in navigator&&window.self===window.top&&window.addEventListener("load",()=>{navigator.serviceWorker.register("/sw.js",{scope:"/"}).then(e=>{e.waiting&&e.waiting.postMessage("SKIP_WAITING"),e.addEventListener("updatefound",()=>{const t=e.installing;t&&t.addEventListener("statechange",()=>{"installed"===t.state&&navigator.serviceWorker.controller&&t.postMessage("SKIP_WAITING")})})}).catch(()=>{})})})(); 3//# sourceMappingURL=main.5296c7e0.js.map
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.