9 lines
No EOL
589 KiB
JavaScript
9 lines
No EOL
589 KiB
JavaScript
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function T(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function E(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function D(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function O(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var k=/\/+/g;function A(e,t){return typeof e==`object`&&e&&e.key!=null?O(``+e.key):t.toString(36)}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+A(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(k,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(D(o)&&(o=E(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(k,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+A(s,l);c+=j(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+A(s,l++),c+=j(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function M(e,t,n){if(e==null)return e;var r=[],i=0;return j(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function N(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P={current:null},F={transition:null},ee={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:F,ReactCurrentOwner:C};function I(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:M,forEach:function(e,t,n){M(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return M(e,function(){t++}),t},toArray:function(e){return M(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ee,e.act=I,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=T,e.createFactory=function(e){var t=T.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=D,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:N}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=F.transition;F.transition={};try{e()}finally{F.transition=t}},e.unstable_act=I,e.useCallback=function(e,t){return P.current.useCallback(e,t)},e.useContext=function(e){return P.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return P.current.useDeferredValue(e)},e.useEffect=function(e,t){return P.current.useEffect(e,t)},e.useId=function(){return P.current.useId()},e.useImperativeHandle=function(e,t,n){return P.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return P.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return P.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return P.current.useMemo(e,t)},e.useReducer=function(e,t,n){return P.current.useReducer(e,t,n)},e.useRef=function(e){return P.current.useRef(e)},e.useState=function(e){return P.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return P.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return P.current.useTransition()},e.version=`18.3.1`})),u=o(((e,t)=>{t.exports=l()})),d=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m)if(n(c)!==null)m=!0,M(x);else{var t=n(l);t!==null&&N(b,t.startTime-e)}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!D());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&N(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,T=5,E=-1;function D(){return!(e.unstable_now()-E<T)}function O(){if(C!==null){var t=e.unstable_now();E=t;var n=!0;try{n=C(!0,t)}finally{n?k():(S=!1,C=null)}}else S=!1}var k;if(typeof v==`function`)k=function(){v(O)};else if(typeof MessageChannel<`u`){var A=new MessageChannel,j=A.port2;A.port1.onmessage=O,k=function(){j.postMessage(null)}}else k=function(){g(O,0)};function M(e){C=e,S||(S=!0,k())}function N(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,M(x))},e.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`):T=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.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}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.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}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,N(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,M(x))),r},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=o(((e,t)=>{t.exports=d()})),p=o((e=>{var t=u(),n=f();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;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.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,d=/^[: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]*$/,p={},m={};function h(e){return l.call(m,e)?!0:l.call(p,e)?!1:d.test(e)?m[e]=!0:(p[e]=!0,!1)}function g(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function _(e,t,n,r){if(t==null||g(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function v(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var y={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){y[e]=new v(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];y[t]=new v(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){y[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){y[e]=new v(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){y[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){y[e]=new v(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){y[e]=new v(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){y[e]=new v(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){y[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)});var b=/[\-:]([a-z])/g;function x(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(b,x);y[t]=new v(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)}),y.xlinkHref=new v(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){y[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)});function S(e,t,n,r){var i=y.hasOwnProperty(t)?y[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(_(t,n,i,r)&&(n=null),r||i===null?h(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type===3?!1:``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for(`react.element`),T=Symbol.for(`react.portal`),E=Symbol.for(`react.fragment`),D=Symbol.for(`react.strict_mode`),O=Symbol.for(`react.profiler`),k=Symbol.for(`react.provider`),A=Symbol.for(`react.context`),j=Symbol.for(`react.forward_ref`),M=Symbol.for(`react.suspense`),N=Symbol.for(`react.suspense_list`),P=Symbol.for(`react.memo`),F=Symbol.for(`react.lazy`),ee=Symbol.for(`react.offscreen`),I=Symbol.iterator;function te(e){return typeof e!=`object`||!e?null:(e=I&&e[I]||e[`@@iterator`],typeof e==`function`?e:null)}var ne=Object.assign,L;function re(e){if(L===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||``}return`
|
||
`+L+e}var ie=!1;function ae(e,t){if(!e||ie)return``;ie=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
|
||
`),a=r.stack.split(`
|
||
`),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
|
||
`+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{ie=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?re(e):``}function oe(e){switch(e.tag){case 5:return re(e.type);case 16:return re(`Lazy`);case 13:return re(`Suspense`);case 19:return re(`SuspenseList`);case 0:case 2:case 15:return e=ae(e.type,!1),e;case 11:return e=ae(e.type.render,!1),e;case 1:return e=ae(e.type,!0),e;default:return``}}function se(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case E:return`Fragment`;case T:return`Portal`;case O:return`Profiler`;case D:return`StrictMode`;case M:return`Suspense`;case N:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case A:return(e.displayName||`Context`)+`.Consumer`;case k:return(e._context.displayName||`Context`)+`.Provider`;case j:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case P:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case F:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}function ce(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return se(t);case 8:return t===D?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function le(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function ue(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function de(e){var t=ue(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function R(e){e._valueTracker||=de(e)}function fe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=ue(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function pe(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function me(e,t){var n=t.checked;return ne({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function he(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=le(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function ge(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function _e(e,t){ge(e,t);var n=le(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?ye(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&ye(e,t.type,le(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ve(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function ye(e,t,n){(t!==`number`||pe(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var be=Array.isArray;function xe(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+le(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Se(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return ne({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function z(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(be(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:le(n)}}function Ce(e,t){var n=le(t.value),r=le(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function we(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Te(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function Ee(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Te(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var De,Oe=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(De||=document.createElement(`div`),De.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=De.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ke(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ae={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},je=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Ae).forEach(function(e){je.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ae[t]=Ae[e]})});function Me(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Ae.hasOwnProperty(e)&&Ae[e]?(``+t).trim():t+`px`}function Ne(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Me(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Pe=ne({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Fe(e,t){if(t){if(Pe[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Ie(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;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 Le=null;function Re(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ze=null,Be=null,Ve=null;function He(e){if(e=ji(e)){if(typeof ze!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Ni(t),ze(e.stateNode,e.type,t))}}function Ue(e){Be?Ve?Ve.push(e):Ve=[e]:Be=e}function We(){if(Be){var e=Be,t=Ve;if(Ve=Be=null,He(e),t)for(e=0;e<t.length;e++)He(t[e])}}function B(e,t){return e(t)}function Ge(){}var Ke=!1;function qe(e,t,n){if(Ke)return e(t,n);Ke=!0;try{return B(e,t,n)}finally{Ke=!1,(Be!==null||Ve!==null)&&(Ge(),We())}}function Je(e,t){var n=e.stateNode;if(n===null)return null;var i=Ni(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var Ye=!1;if(c)try{var Xe={};Object.defineProperty(Xe,"passive",{get:function(){Ye=!0}}),window.addEventListener(`test`,Xe,Xe),window.removeEventListener(`test`,Xe,Xe)}catch{Ye=!1}function Ze(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var Qe=!1,$e=null,V=!1,et=null,tt={onError:function(e){Qe=!0,$e=e}};function nt(e,t,n,r,i,a,o,s,c){Qe=!1,$e=null,Ze.apply(tt,arguments)}function rt(e,t,n,i,a,o,s,c,l){if(nt.apply(this,arguments),Qe){if(Qe){var u=$e;Qe=!1,$e=null}else throw Error(r(198));V||(V=!0,et=u)}}function it(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function at(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function ot(e){if(it(e)!==e)throw Error(r(188))}function st(e){var t=e.alternate;if(!t){if(t=it(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return ot(a),e;if(o===i)return ot(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function ct(e){return e=st(e),e===null?null:lt(e)}function lt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=lt(e);if(t!==null)return t;e=e.sibling}return null}var ut=n.unstable_scheduleCallback,dt=n.unstable_cancelCallback,ft=n.unstable_shouldYield,pt=n.unstable_requestPaint,mt=n.unstable_now,ht=n.unstable_getCurrentPriorityLevel,gt=n.unstable_ImmediatePriority,H=n.unstable_UserBlockingPriority,_t=n.unstable_NormalPriority,vt=n.unstable_LowPriority,U=n.unstable_IdlePriority,yt=null,bt=null;function xt(e){if(bt&&typeof bt.onCommitFiberRoot==`function`)try{bt.onCommitFiberRoot(yt,e,void 0,(e.current.flags&128)==128)}catch{}}var St=Math.clz32?Math.clz32:Tt,Ct=Math.log,wt=Math.LN2;function Tt(e){return e>>>=0,e===0?32:31-(Ct(e)/wt|0)|0}var Et=64,Dt=4194304;function Ot(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function kt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=Ot(a))):r=Ot(s)}else o=n&~i,o===0?a!==0&&(r=Ot(a)):r=Ot(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-St(t),i=1<<n,r|=e[n],t&=~i;return r}function At(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function jt(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-St(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=At(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function W(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Mt(){var e=Et;return Et<<=1,!(Et&4194240)&&(Et=64),e}function Nt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-St(t),e[t]=n}function G(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-St(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function K(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-St(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var q=0;function J(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Y,Ft,It,Lt,Rt,zt=!1,Bt=[],Vt=null,Ht=null,Ut=null,Wt=new Map,Gt=new Map,Kt=[],qt=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit`.split(` `);function Jt(e,t){switch(e){case`focusin`:case`focusout`:Vt=null;break;case`dragenter`:case`dragleave`:Ht=null;break;case`mouseover`:case`mouseout`:Ut=null;break;case`pointerover`:case`pointerout`:Wt.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Gt.delete(t.pointerId)}}function Yt(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=ji(t),t!==null&&Ft(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Xt(e,t,n,r,i){switch(t){case`focusin`:return Vt=Yt(Vt,e,t,n,r,i),!0;case`dragenter`:return Ht=Yt(Ht,e,t,n,r,i),!0;case`mouseover`:return Ut=Yt(Ut,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Wt.set(a,Yt(Wt.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Gt.set(a,Yt(Gt.get(a)||null,e,t,n,r,i)),!0}return!1}function Zt(e){var t=Ai(e.target);if(t!==null){var n=it(t);if(n!==null){if(t=n.tag,t===13){if(t=at(n),t!==null){e.blockedOn=t,Rt(e.priority,function(){It(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qt(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=un(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Le=r,n.target.dispatchEvent(r),Le=null}else return t=ji(n),t!==null&&Ft(t),e.blockedOn=n,!1;t.shift()}return!0}function $t(e,t,n){Qt(e)&&n.delete(t)}function en(){zt=!1,Vt!==null&&Qt(Vt)&&(Vt=null),Ht!==null&&Qt(Ht)&&(Ht=null),Ut!==null&&Qt(Ut)&&(Ut=null),Wt.forEach($t),Gt.forEach($t)}function tn(e,t){e.blockedOn===t&&(e.blockedOn=null,zt||(zt=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,en)))}function nn(e){function t(t){return tn(t,e)}if(0<Bt.length){tn(Bt[0],e);for(var n=1;n<Bt.length;n++){var r=Bt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Vt!==null&&tn(Vt,e),Ht!==null&&tn(Ht,e),Ut!==null&&tn(Ut,e),Wt.forEach(t),Gt.forEach(t),n=0;n<Kt.length;n++)r=Kt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Kt.length&&(n=Kt[0],n.blockedOn===null);)Zt(n),n.blockedOn===null&&Kt.shift()}var rn=C.ReactCurrentBatchConfig,an=!0;function on(e,t,n,r){var i=q,a=rn.transition;rn.transition=null;try{q=1,cn(e,t,n,r)}finally{q=i,rn.transition=a}}function sn(e,t,n,r){var i=q,a=rn.transition;rn.transition=null;try{q=4,cn(e,t,n,r)}finally{q=i,rn.transition=a}}function cn(e,t,n,r){if(an){var i=un(e,t,n,r);if(i===null)ni(e,t,r,ln,n),Jt(e,r);else if(Xt(i,e,t,n,r))r.stopPropagation();else if(Jt(e,r),t&4&&-1<qt.indexOf(e)){for(;i!==null;){var a=ji(i);if(a!==null&&Y(a),a=un(e,t,n,r),a===null&&ni(e,t,r,ln,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else ni(e,t,r,null,n)}}var ln=null;function un(e,t,n,r){if(ln=null,e=Re(r),e=Ai(e),e!==null)if(t=it(e),t===null)e=null;else if(n=t.tag,n===13){if(e=at(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ln=e,null}function dn(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(ht()){case gt:return 1;case H:return 4;case _t:case vt:return 16;case U:return 536870912;default:return 16}default:return 16}}var fn=null,pn=null,mn=null;function X(){if(mn)return mn;var e,t=pn,n=t.length,r,i=`value`in fn?fn.value:fn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return mn=i.slice(e,1<r?1-r:void 0)}function hn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function gn(){return!0}function _n(){return!1}function vn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?gn:_n,this.isPropagationStopped=_n,this}return ne(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=gn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=gn)},persist:function(){},isPersistent:gn}),t}var yn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},bn=vn(yn),xn=ne({},yn,{view:0,detail:0}),Sn=vn(xn),Cn,wn,Tn,En=ne({},xn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ln,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Tn&&(Tn&&e.type===`mousemove`?(Cn=e.screenX-Tn.screenX,wn=e.screenY-Tn.screenY):wn=Cn=0,Tn=e),Cn)},movementY:function(e){return`movementY`in e?e.movementY:wn}}),Dn=vn(En),On=vn(ne({},En,{dataTransfer:0})),kn=vn(ne({},xn,{relatedTarget:0})),An=vn(ne({},yn,{animationName:0,elapsedTime:0,pseudoElement:0})),jn=vn(ne({},yn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Mn=vn(ne({},yn,{data:0})),Nn={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`},Fn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function In(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Fn[e])?!!t[e]:!1}function Ln(){return In}var Rn=vn(ne({},xn,{key:function(e){if(e.key){var t=Nn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=hn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Pn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ln,charCode:function(e){return e.type===`keypress`?hn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?hn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),zn=vn(ne({},En,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bn=vn(ne({},xn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ln})),Vn=vn(ne({},yn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Hn=vn(ne({},En,{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})),Un=[9,13,27,32],Wn=c&&`CompositionEvent`in window,Gn=null;c&&`documentMode`in document&&(Gn=document.documentMode);var Kn=c&&`TextEvent`in window&&!Gn,qn=c&&(!Wn||Gn&&8<Gn&&11>=Gn),Jn=` `,Yn=!1;function Xn(e,t){switch(e){case`keyup`:return Un.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Zn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Qn=!1;function $n(e,t){switch(e){case`compositionend`:return Zn(t);case`keypress`:return t.which===32?(Yn=!0,Jn):null;case`textInput`:return e=t.data,e===Jn&&Yn?null:e;default:return null}}function er(e,t){if(Qn)return e===`compositionend`||!Wn&&Xn(e,t)?(e=X(),mn=pn=fn=null,Qn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return qn&&t.locale!==`ko`?null:t.data;default:return null}}var tr={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 nr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!tr[e.type]:t===`textarea`}function rr(e,t,n,r){Ue(r),t=ii(t,`onChange`),0<t.length&&(n=new bn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ir=null,ar=null;function or(e){Xr(e,0)}function sr(e){if(fe(Mi(e)))return e}function cr(e,t){if(e===`change`)return t}var lr=!1;if(c){var ur;if(c){var dr=`oninput`in document;if(!dr){var fr=document.createElement(`div`);fr.setAttribute(`oninput`,`return;`),dr=typeof fr.oninput==`function`}ur=dr}else ur=!1;lr=ur&&(!document.documentMode||9<document.documentMode)}function pr(){ir&&(ir.detachEvent(`onpropertychange`,mr),ar=ir=null)}function mr(e){if(e.propertyName===`value`&&sr(ar)){var t=[];rr(t,ar,e,Re(e)),qe(or,t)}}function hr(e,t,n){e===`focusin`?(pr(),ir=t,ar=n,ir.attachEvent(`onpropertychange`,mr)):e===`focusout`&&pr()}function gr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return sr(ar)}function _r(e,t){if(e===`click`)return sr(t)}function vr(e,t){if(e===`input`||e===`change`)return sr(t)}function yr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Z=typeof Object.is==`function`?Object.is:yr;function br(e,t){if(Z(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!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 i=n[r];if(!l.call(t,i)||!Z(e[i],t[i]))return!1}return!0}function xr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sr(e,t){var n=xr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=xr(n)}}function Cr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Cr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wr(){for(var e=window,t=pe();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=pe(e.document)}return t}function Tr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}function Er(e){var t=wr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Cr(n.ownerDocument.documentElement,n)){if(r!==null&&Tr(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Sr(n,a);var o=Sr(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Dr=c&&`documentMode`in document&&11>=document.documentMode,Or=null,kr=null,Ar=null,jr=!1;function Mr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;jr||Or==null||Or!==pe(r)||(r=Or,`selectionStart`in r&&Tr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ar&&br(Ar,r)||(Ar=r,r=ii(kr,`onSelect`),0<r.length&&(t=new bn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Or)))}function Nr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Pr={animationend:Nr(`Animation`,`AnimationEnd`),animationiteration:Nr(`Animation`,`AnimationIteration`),animationstart:Nr(`Animation`,`AnimationStart`),transitionend:Nr(`Transition`,`TransitionEnd`)},Fr={},Ir={};c&&(Ir=document.createElement(`div`).style,`AnimationEvent`in window||(delete Pr.animationend.animation,delete Pr.animationiteration.animation,delete Pr.animationstart.animation),`TransitionEvent`in window||delete Pr.transitionend.transition);function Lr(e){if(Fr[e])return Fr[e];if(!Pr[e])return e;var t=Pr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ir)return Fr[e]=t[n];return e}var Rr=Lr(`animationend`),zr=Lr(`animationiteration`),Br=Lr(`animationstart`),Vr=Lr(`transitionend`),Hr=new Map,Ur=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function Wr(e,t){Hr.set(e,t),o(t,[e])}for(var Gr=0;Gr<Ur.length;Gr++){var Kr=Ur[Gr];Wr(Kr.toLowerCase(),`on`+(Kr[0].toUpperCase()+Kr.slice(1)))}Wr(Rr,`onAnimationEnd`),Wr(zr,`onAnimationIteration`),Wr(Br,`onAnimationStart`),Wr(`dblclick`,`onDoubleClick`),Wr(`focusin`,`onFocus`),Wr(`focusout`,`onBlur`),Wr(Vr,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var qr=`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(` `),Jr=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(qr));function Yr(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,rt(r,t,void 0,e),e.currentTarget=null}function Xr(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;Yr(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;Yr(i,s,l),a=c}}}if(V)throw e=et,V=!1,et=null,e}function Zr(e,t){var n=t[Di];n===void 0&&(n=t[Di]=new Set);var r=e+`__bubble`;n.has(r)||(ti(t,e,2,!1),n.add(r))}function Qr(e,t,n){var r=0;t&&(r|=4),ti(n,e,r,t)}var $r=`_reactListening`+Math.random().toString(36).slice(2);function ei(e){if(!e[$r]){e[$r]=!0,i.forEach(function(t){t!==`selectionchange`&&(Jr.has(t)||Qr(t,!1,e),Qr(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$r]||(t[$r]=!0,Qr(`selectionchange`,!1,t))}}function ti(e,t,n,r){switch(dn(t)){case 1:var i=on;break;case 4:i=sn;break;default:i=cn}n=i.bind(null,t,n,e),i=void 0,!Ye||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function ni(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ai(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}qe(function(){var r=a,i=Re(n),o=[];a:{var s=Hr.get(e);if(s!==void 0){var c=bn,l=e;switch(e){case`keypress`:if(hn(n)===0)break a;case`keydown`:case`keyup`:c=Rn;break;case`focusin`:l=`focus`,c=kn;break;case`focusout`:l=`blur`,c=kn;break;case`beforeblur`:case`afterblur`:c=kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Dn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=On;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Bn;break;case Rr:case zr:case Br:c=An;break;case Vr:c=Vn;break;case`scroll`:c=Sn;break;case`wheel`:c=Hn;break;case`copy`:case`cut`:case`paste`:c=jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=zn}var u=(t&4)!=0,d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=Je(p,f),h!=null&&u.push(ri(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Le&&(l=n.relatedTarget||n.fromElement)&&(Ai(l)||l[Ei]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ai(l):null,l!==null&&(d=it(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Dn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=zn,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Mi(c),m=l==null?s:Mi(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ai(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=ai(m))p++;for(m=0,h=f;h;h=ai(h))m++;for(;0<p-m;)u=ai(u),p--;for(;0<m-p;)f=ai(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=ai(u),f=ai(f)}u=null}else u=null;c!==null&&oi(o,s,c,u,!1),l!==null&&d!==null&&oi(o,d,l,u,!0)}}a:{if(s=r?Mi(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=cr;else if(nr(s))if(lr)g=vr;else{g=gr;var _=hr}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=_r);if(g&&=g(e,r)){rr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&ye(s,`number`,s.value)}switch(_=r?Mi(r):window,e){case`focusin`:(nr(_)||_.contentEditable===`true`)&&(Or=_,kr=r,Ar=null);break;case`focusout`:Ar=kr=Or=null;break;case`mousedown`:jr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:jr=!1,Mr(o,n,i);break;case`selectionchange`:if(Dr)break;case`keydown`:case`keyup`:Mr(o,n,i)}var v;if(Wn)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else Qn?Xn(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(qn&&n.locale!==`ko`&&(Qn||y!==`onCompositionStart`?y===`onCompositionEnd`&&Qn&&(v=X()):(fn=i,pn=`value`in fn?fn.value:fn.textContent,Qn=!0)),_=ii(r,y),0<_.length&&(y=new Mn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=Zn(n),v!==null&&(y.data=v)))),(v=Kn?$n(e,n):er(e,n))&&(r=ii(r,`onBeforeInput`),0<r.length&&(i=new Mn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}Xr(o,t)})}function ri(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ii(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Je(e,n),a!=null&&r.unshift(ri(e,a,i)),a=Je(e,t),a!=null&&r.push(ri(e,a,i))),e=e.return}return r}function ai(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function oi(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=Je(n,a),c!=null&&o.unshift(ri(n,c,s))):i||(c=Je(n,a),c!=null&&o.push(ri(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var si=/\r\n?/g,ci=/\u0000|\uFFFD/g;function li(e){return(typeof e==`string`?e:``+e).replace(si,`
|
||
`).replace(ci,``)}function ui(e,t,n){if(t=li(t),li(e)!==t&&n)throw Error(r(425))}function di(){}var fi=null,pi=null;function mi(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var hi=typeof setTimeout==`function`?setTimeout:void 0,gi=typeof clearTimeout==`function`?clearTimeout:void 0,_i=typeof Promise==`function`?Promise:void 0,vi=typeof queueMicrotask==`function`?queueMicrotask:_i===void 0?hi:function(e){return _i.resolve(null).then(e).catch(yi)};function yi(e){setTimeout(function(){throw e})}function bi(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),nn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);nn(t)}function xi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`)break;if(t===`/$`)return null}}return e}function Si(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Ci=Math.random().toString(36).slice(2),wi=`__reactFiber$`+Ci,Ti=`__reactProps$`+Ci,Ei=`__reactContainer$`+Ci,Di=`__reactEvents$`+Ci,Oi=`__reactListeners$`+Ci,ki=`__reactHandles$`+Ci;function Ai(e){var t=e[wi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ei]||n[wi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Si(e);e!==null;){if(n=e[wi])return n;e=Si(e)}return t}e=n,n=e.parentNode}return null}function ji(e){return e=e[wi]||e[Ei],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Mi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Ni(e){return e[Ti]||null}var Pi=[],Fi=-1;function Ii(e){return{current:e}}function Li(e){0>Fi||(e.current=Pi[Fi],Pi[Fi]=null,Fi--)}function Ri(e,t){Fi++,Pi[Fi]=e.current,e.current=t}var zi={},Bi=Ii(zi),Vi=Ii(!1),Hi=zi;function Ui(e,t){var n=e.type.contextTypes;if(!n)return zi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Wi(e){return e=e.childContextTypes,e!=null}function Gi(){Li(Vi),Li(Bi)}function Ki(e,t,n){if(Bi.current!==zi)throw Error(r(168));Ri(Bi,t),Ri(Vi,n)}function qi(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,ce(e)||`Unknown`,a));return ne({},n,i)}function Ji(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||zi,Hi=Bi.current,Ri(Bi,e),Ri(Vi,Vi.current),!0}function Yi(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=qi(e,t,Hi),i.__reactInternalMemoizedMergedChildContext=e,Li(Vi),Li(Bi),Ri(Bi,e)):Li(Vi),Ri(Vi,n)}var Xi=null,Zi=!1,Qi=!1;function $i(e){Xi===null?Xi=[e]:Xi.push(e)}function ea(e){Zi=!0,$i(e)}function ta(){if(!Qi&&Xi!==null){Qi=!0;var e=0,t=q;try{var n=Xi;for(q=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}Xi=null,Zi=!1}catch(t){throw Xi!==null&&(Xi=Xi.slice(e+1)),ut(gt,ta),t}finally{q=t,Qi=!1}}return null}var na=[],ra=0,ia=null,aa=0,oa=[],sa=0,ca=null,la=1,ua=``;function da(e,t){na[ra++]=aa,na[ra++]=ia,ia=e,aa=t}function fa(e,t,n){oa[sa++]=la,oa[sa++]=ua,oa[sa++]=ca,ca=e;var r=la;e=ua;var i=32-St(r)-1;r&=~(1<<i),n+=1;var a=32-St(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,la=1<<32-St(t)+i|n<<i|r,ua=a+e}else la=1<<a|n<<i|r,ua=e}function pa(e){e.return!==null&&(da(e,1),fa(e,1,0))}function ma(e){for(;e===ia;)ia=na[--ra],na[ra]=null,aa=na[--ra],na[ra]=null;for(;e===ca;)ca=oa[--sa],oa[sa]=null,ua=oa[--sa],oa[sa]=null,la=oa[--sa],oa[sa]=null}var ha=null,ga=null,_a=!1,va=null;function ya(e,t){var n=Kl(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function ba(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t===null?!1:(e.stateNode=t,ha=e,ga=xi(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t===null?!1:(e.stateNode=t,ha=e,ga=null,!0);case 13:return t=t.nodeType===8?t:null,t===null?!1:(n=ca===null?null:{id:la,overflow:ua},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Kl(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ha=e,ga=null,!0);default:return!1}}function xa(e){return(e.mode&1)!=0&&(e.flags&128)==0}function Sa(e){if(_a){var t=ga;if(t){var n=t;if(!ba(e,t)){if(xa(e))throw Error(r(418));t=xi(n.nextSibling);var i=ha;t&&ba(e,t)?ya(i,n):(e.flags=e.flags&-4097|2,_a=!1,ha=e)}}else{if(xa(e))throw Error(r(418));e.flags=e.flags&-4097|2,_a=!1,ha=e}}}function Ca(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ha=e}function wa(e){if(e!==ha)return!1;if(!_a)return Ca(e),_a=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!mi(e.type,e.memoizedProps)),t&&=ga){if(xa(e))throw Ta(),Error(r(418));for(;t;)ya(e,t),t=xi(t.nextSibling)}if(Ca(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){ga=xi(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}ga=null}}else ga=ha?xi(e.stateNode.nextSibling):null;return!0}function Ta(){for(var e=ga;e;)e=xi(e.nextSibling)}function Ea(){ga=ha=null,_a=!1}function Da(e){va===null?va=[e]:va.push(e)}var Oa=C.ReactCurrentBatchConfig;function ka(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Aa(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function ja(e){var t=e._init;return t(e._payload)}function Ma(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=Yl(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=$l(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===E?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===F&&ja(i)===t.type)?(r=a(t,n.props),r.ref=ka(e,t,n),r.return=e,r):(r=Xl(n.type,n.key,n.props,null,e.mode,r),r.ref=ka(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=eu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Zl(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=$l(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case w:return n=Xl(t.type,t.key,t.props,null,e.mode,n),n.ref=ka(e,null,t),n.return=e,n;case T:return t=eu(t,e.mode,n),t.return=e,t;case F:var r=t._init;return f(e,r(t._payload),n)}if(be(t)||te(t))return t=Zl(t,e.mode,n,null),t.return=e,t;Aa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case w:return n.key===i?l(e,t,n,r):null;case T:return n.key===i?u(e,t,n,r):null;case F:return i=n._init,p(e,t,i(n._payload),r)}if(be(n)||te(n))return i===null?d(e,t,n,r,null):null;Aa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case w:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case T:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case F:var a=r._init;return m(e,t,n,a(r._payload),i)}if(be(r)||te(r))return e=e.get(n)||null,d(t,e,r,i,null);Aa(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),_a&&da(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return _a&&da(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),_a&&da(r,h),l}function g(a,s,c,l){var u=te(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),_a&&da(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return _a&&da(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),_a&&da(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===E&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case w:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===E){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===F&&ja(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=ka(e,l,i),r.return=e,e=r;break a}n(e,l);break}else t(e,l);l=l.sibling}i.type===E?(r=Zl(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=Xl(i.type,i.key,i.props,null,e.mode,o),o.ref=ka(e,r,i),o.return=e,e=o)}return s(e);case T:a:{for(l=i.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}else{n(e,r);break}else t(e,r);r=r.sibling}r=eu(i,e.mode,o),r.return=e,e=r}return s(e);case F:return l=i._init,_(e,r,l(i._payload),o)}if(be(i))return h(e,r,i,o);if(te(i))return g(e,r,i,o);Aa(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=$l(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Na=Ma(!0),Pa=Ma(!1),Fa=Ii(null),Ia=null,La=null,Ra=null;function za(){Ra=La=Ia=null}function Ba(e){var t=Fa.current;Li(Fa),e._currentValue=t}function Va(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Ha(e,t){Ia=e,Ra=La=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ms=!0),e.firstContext=null)}function Ua(e){var t=e._currentValue;if(Ra!==e)if(e={context:e,memoizedValue:t,next:null},La===null){if(Ia===null)throw Error(r(308));La=e,Ia.dependencies={lanes:0,firstContext:e}}else La=La.next=e;return t}var Wa=null;function Ga(e){Wa===null?Wa=[e]:Wa.push(e)}function Ka(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Ga(t)):(n.next=i.next,i.next=n),t.interleaved=n,qa(e,r)}function qa(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Ja=!1;function Ya(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Za(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,$&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,qa(e,n)}return i=r.interleaved,i===null?(t.next=t,Ga(r)):(t.next=i.next,i.next=t),r.interleaved=t,qa(e,n)}function $a(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,K(e,n)}}function eo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function to(e,t,n,r){var i=e.updateQueue;Ja=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=ne({},d,f);break a;case 2:Ja=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);Jc|=o,e.lanes=o,e.memoizedState=d}}function no(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var ro={},io=Ii(ro),ao=Ii(ro),oo=Ii(ro);function so(e){if(e===ro)throw Error(r(174));return e}function co(e,t){switch(Ri(oo,t),Ri(ao,e),Ri(io,ro),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ee(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ee(t,e)}Li(io),Ri(io,t)}function lo(){Li(io),Li(ao),Li(oo)}function uo(e){so(oo.current);var t=so(io.current),n=Ee(t,e.type);t!==n&&(Ri(ao,e),Ri(io,n))}function fo(e){ao.current===e&&(Li(io),Li(ao))}var po=Ii(0);function mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ho=[];function go(){for(var e=0;e<ho.length;e++)ho[e]._workInProgressVersionPrimary=null;ho.length=0}var _o=C.ReactCurrentDispatcher,vo=C.ReactCurrentBatchConfig,yo=0,bo=null,xo=null,So=null,Co=!1,wo=!1,To=0,Eo=0;function Do(){throw Error(r(321))}function Oo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Z(e[n],t[n]))return!1;return!0}function ko(e,t,n,i,a,o){if(yo=o,bo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_o.current=e===null||e.memoizedState===null?fs:ps,e=n(i,a),wo){o=0;do{if(wo=!1,To=0,25<=o)throw Error(r(301));o+=1,So=xo=null,t.updateQueue=null,_o.current=ms,e=n(i,a)}while(wo)}if(_o.current=ds,t=xo!==null&&xo.next!==null,yo=0,So=xo=bo=null,Co=!1,t)throw Error(r(300));return e}function Ao(){var e=To!==0;return To=0,e}function jo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return So===null?bo.memoizedState=So=e:So=So.next=e,So}function Mo(){if(xo===null){var e=bo.alternate;e=e===null?null:e.memoizedState}else e=xo.next;var t=So===null?bo.memoizedState:So.next;if(t!==null)So=t,xo=e;else{if(e===null)throw Error(r(310));xo=e,e={memoizedState:xo.memoizedState,baseState:xo.baseState,baseQueue:xo.baseQueue,queue:xo.queue,next:null},So===null?bo.memoizedState=So=e:So=So.next=e}return So}function No(e,t){return typeof t==`function`?t(e):t}function Po(e){var t=Mo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=xo,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((yo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,bo.lanes|=d,Jc|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Z(i,t.memoizedState)||(Ms=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,bo.lanes|=o,Jc|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Fo(e){var t=Mo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Z(o,t.memoizedState)||(Ms=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Io(){}function Lo(e,t){var n=bo,i=Mo(),a=t(),o=!Z(i.memoizedState,a);if(o&&(i.memoizedState=a,Ms=!0),i=i.queue,Yo(Bo.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||So!==null&&So.memoizedState.tag&1){if(n.flags|=2048,Wo(9,zo.bind(null,n,i,a,t),void 0,null),Vc===null)throw Error(r(349));yo&30||Ro(n,t,a)}return a}function Ro(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=bo.updateQueue,t===null?(t={lastEffect:null,stores:null},bo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zo(e,t,n,r){t.value=n,t.getSnapshot=r,Vo(t)&&Ho(e)}function Bo(e,t,n){return n(function(){Vo(t)&&Ho(e)})}function Vo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Z(e,n)}catch{return!0}}function Ho(e){var t=qa(e,1);t!==null&&ml(t,e,1,-1)}function Uo(e){var t=jo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:No,lastRenderedState:e},t.queue=e,e=e.dispatch=ss.bind(null,bo,e),[t.memoizedState,e]}function Wo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=bo.updateQueue,t===null?(t={lastEffect:null,stores:null},bo.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function Go(){return Mo().memoizedState}function Ko(e,t,n,r){var i=jo();bo.flags|=e,i.memoizedState=Wo(1|t,n,void 0,r===void 0?null:r)}function qo(e,t,n,r){var i=Mo();r=r===void 0?null:r;var a=void 0;if(xo!==null){var o=xo.memoizedState;if(a=o.destroy,r!==null&&Oo(r,o.deps)){i.memoizedState=Wo(t,n,a,r);return}}bo.flags|=e,i.memoizedState=Wo(1|t,n,a,r)}function Jo(e,t){return Ko(8390656,8,e,t)}function Yo(e,t){return qo(2048,8,e,t)}function Xo(e,t){return qo(4,2,e,t)}function Zo(e,t){return qo(4,4,e,t)}function Qo(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function $o(e,t,n){return n=n==null?null:n.concat([e]),qo(4,4,Qo.bind(null,t,e),n)}function es(){}function ts(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ns(e,t){var n=Mo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Oo(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function rs(e,t,n){return yo&21?(Z(n,t)||(n=Mt(),bo.lanes|=n,Jc|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ms=!0),e.memoizedState=n)}function is(e,t){var n=q;q=n!==0&&4>n?n:4,e(!0);var r=vo.transition;vo.transition={};try{e(!1),t()}finally{q=n,vo.transition=r}}function as(){return Mo().memoizedState}function os(e,t,n){var r=pl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},cs(e))ls(t,n);else if(n=Ka(e,t,n,r),n!==null){var i=fl();ml(n,e,r,i),us(n,t,r)}}function ss(e,t,n){var r=pl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(cs(e))ls(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Z(s,o)){var c=t.interleaved;c===null?(i.next=i,Ga(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=Ka(e,t,i,r),n!==null&&(i=fl(),ml(n,e,r,i),us(n,t,r))}}function cs(e){var t=e.alternate;return e===bo||t!==null&&t===bo}function ls(e,t){wo=Co=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function us(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,K(e,n)}}var ds={readContext:Ua,useCallback:Do,useContext:Do,useEffect:Do,useImperativeHandle:Do,useInsertionEffect:Do,useLayoutEffect:Do,useMemo:Do,useReducer:Do,useRef:Do,useState:Do,useDebugValue:Do,useDeferredValue:Do,useTransition:Do,useMutableSource:Do,useSyncExternalStore:Do,useId:Do,unstable_isNewReconciler:!1},fs={readContext:Ua,useCallback:function(e,t){return jo().memoizedState=[e,t===void 0?null:t],e},useContext:Ua,useEffect:Jo,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),Ko(4194308,4,Qo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ko(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ko(4,2,e,t)},useMemo:function(e,t){var n=jo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=jo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=os.bind(null,bo,e),[r.memoizedState,e]},useRef:function(e){var t=jo();return e={current:e},t.memoizedState=e},useState:Uo,useDebugValue:es,useDeferredValue:function(e){return jo().memoizedState=e},useTransition:function(){var e=Uo(!1),t=e[0];return e=is.bind(null,e[1]),jo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=bo,a=jo();if(_a){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),Vc===null)throw Error(r(349));yo&30||Ro(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Jo(Bo.bind(null,i,o,e),[e]),i.flags|=2048,Wo(9,zo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=jo(),t=Vc.identifierPrefix;if(_a){var n=ua,r=la;n=(r&~(1<<32-St(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=To++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Eo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},ps={readContext:Ua,useCallback:ts,useContext:Ua,useEffect:Yo,useImperativeHandle:$o,useInsertionEffect:Xo,useLayoutEffect:Zo,useMemo:ns,useReducer:Po,useRef:Go,useState:function(){return Po(No)},useDebugValue:es,useDeferredValue:function(e){return rs(Mo(),xo.memoizedState,e)},useTransition:function(){return[Po(No)[0],Mo().memoizedState]},useMutableSource:Io,useSyncExternalStore:Lo,useId:as,unstable_isNewReconciler:!1},ms={readContext:Ua,useCallback:ts,useContext:Ua,useEffect:Yo,useImperativeHandle:$o,useInsertionEffect:Xo,useLayoutEffect:Zo,useMemo:ns,useReducer:Fo,useRef:Go,useState:function(){return Fo(No)},useDebugValue:es,useDeferredValue:function(e){var t=Mo();return xo===null?t.memoizedState=e:rs(t,xo.memoizedState,e)},useTransition:function(){return[Fo(No)[0],Mo().memoizedState]},useMutableSource:Io,useSyncExternalStore:Lo,useId:as,unstable_isNewReconciler:!1};function hs(e,t){if(e&&e.defaultProps){for(var n in t=ne({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function gs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ne({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _s={isMounted:function(e){return(e=e._reactInternals)?it(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fl(),i=pl(e),a=Za(r,i);a.payload=t,n!=null&&(a.callback=n),t=Qa(e,a,i),t!==null&&(ml(t,e,i,r),$a(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fl(),i=pl(e),a=Za(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=Qa(e,a,i),t!==null&&(ml(t,e,i,r),$a(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fl(),r=pl(e),i=Za(n,r);i.tag=2,t!=null&&(i.callback=t),t=Qa(e,i,r),t!==null&&(ml(t,e,r,n),$a(t,e,r))}};function vs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!br(n,r)||!br(i,a):!0}function ys(e,t,n){var r=!1,i=zi,a=t.contextType;return typeof a==`object`&&a?a=Ua(a):(i=Wi(t)?Hi:Bi.current,r=t.contextTypes,a=(r=r!=null)?Ui(e,i):zi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=_s,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function bs(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_s.enqueueReplaceState(t,t.state,null)}function xs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},Ya(e);var a=t.contextType;typeof a==`object`&&a?i.context=Ua(a):(a=Wi(t)?Hi:Bi.current,i.context=Ui(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(gs(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&_s.enqueueReplaceState(i,i.state,null),to(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Ss(e,t){try{var n=``,r=t;do n+=oe(r),r=r.return;while(r);var i=n}catch(e){i=`
|
||
Error generating stack: `+e.message+`
|
||
`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Cs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ws(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Ts=typeof WeakMap==`function`?WeakMap:Map;function Es(e,t,n){n=Za(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){nl||(nl=!0,rl=r),ws(e,t)},n}function Ds(e,t,n){n=Za(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ws(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){ws(e,t),typeof r!=`function`&&(il===null?il=new Set([this]):il.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Os(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ts;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=zl.bind(null,e,t,n),t.then(e,e))}function ks(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null?!0:t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function As(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Za(-1,1),t.tag=2,Qa(n,t,1))),n.lanes|=1),e)}var js=C.ReactCurrentOwner,Ms=!1;function Ns(e,t,n,r){t.child=e===null?Pa(t,null,n,r):Na(t,e.child,n,r)}function Ps(e,t,n,r,i){n=n.render;var a=t.ref;return Ha(t,i),r=ko(e,t,n,r,a,i),n=Ao(),e!==null&&!Ms?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ec(e,t,i)):(_a&&n&&pa(t),t.flags|=1,Ns(e,t,r,i),t.child)}function Fs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ql(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,Is(e,t,a,r,i)):(e=Xl(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?br:n,n(o,r)&&e.ref===t.ref)return ec(e,t,i)}return t.flags|=1,e=Yl(a,r),e.ref=t.ref,e.return=t,t.child=e}function Is(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(br(a,r)&&e.ref===t.ref)if(Ms=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Ms=!0);else return t.lanes=e.lanes,ec(e,t,i)}return zs(e,t,n,r,i)}function Ls(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`)if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ri(Gc,Wc),Wc|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ri(Gc,Wc),Wc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,Ri(Gc,Wc),Wc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),Ri(Gc,Wc),Wc|=r;return Ns(e,t,i,n),t.child}function Rs(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function zs(e,t,n,r,i){var a=Wi(n)?Hi:Bi.current;return a=Ui(t,a),Ha(t,i),n=ko(e,t,n,r,a,i),r=Ao(),e!==null&&!Ms?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ec(e,t,i)):(_a&&r&&pa(t),t.flags|=1,Ns(e,t,n,i),t.child)}function Bs(e,t,n,r,i){if(Wi(n)){var a=!0;Ji(t)}else a=!1;if(Ha(t,i),t.stateNode===null)$s(e,t),ys(t,n,r),xs(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=Ua(l):(l=Wi(n)?Hi:Bi.current,l=Ui(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&bs(t,o,r,l),Ja=!1;var f=t.memoizedState;o.state=f,to(t,r,o,i),c=t.memoizedState,s!==r||f!==c||Vi.current||Ja?(typeof u==`function`&&(gs(t,n,u,r),c=t.memoizedState),(s=Ja||vs(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Xa(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:hs(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=Ua(c):(c=Wi(n)?Hi:Bi.current,c=Ui(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&bs(t,o,r,c),Ja=!1,f=t.memoizedState,o.state=f,to(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||Vi.current||Ja?(typeof p==`function`&&(gs(t,n,p,r),m=t.memoizedState),(l=Ja||vs(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return Vs(e,t,n,r,a,i)}function Vs(e,t,n,r,i,a){Rs(e,t);var o=(t.flags&128)!=0;if(!r&&!o)return i&&Yi(t,n,!1),ec(e,t,a);r=t.stateNode,js.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Na(t,e.child,null,a),t.child=Na(t,null,s,a)):Ns(e,t,s,a),t.memoizedState=r.state,i&&Yi(t,n,!0),t.child}function Hs(e){var t=e.stateNode;t.pendingContext?Ki(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ki(e,t.context,!1),co(e,t.containerInfo)}function Us(e,t,n,r,i){return Ea(),Da(i),t.flags|=256,Ns(e,t,n,r),t.child}var Ws={dehydrated:null,treeContext:null,retryLane:0};function Gs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ks(e,t,n){var r=t.pendingProps,i=po.current,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(i&2)!=0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ri(po,i&1),e===null)return Sa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data===`$!`?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=Ql(o,r,0,null),e=Zl(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Gs(n),t.memoizedState=Ws,e):qs(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return Ys(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=Yl(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=Zl(a,o,n,null),a.flags|=2):a=Yl(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?Gs(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Ws,r}return a=e.child,e=a.sibling,r=Yl(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function qs(e,t){return t=Ql({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function Js(e,t,n,r){return r!==null&&Da(r),Na(t,e.child,null,n),e=qs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ys(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Cs(Error(r(422))),Js(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=Ql({mode:`visible`,children:i.children},a,0,null),o=Zl(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Na(t,e.child,null,s),t.child.memoizedState=Gs(s),t.memoizedState=Ws,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return Js(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Cs(o,i,void 0),Js(e,t,s,i)}if(c=(s&e.childLanes)!==0,Ms||c){if(i=Vc,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,qa(e,a),ml(i,e,a,-1))}return Ol(),i=Cs(Error(r(421))),Js(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=Vl.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,ga=xi(a.nextSibling),ha=t,_a=!0,va=null,e!==null&&(oa[sa++]=la,oa[sa++]=ua,oa[sa++]=ca,la=e.id,ua=e.overflow,ca=t),t=qs(t,i.children),t.flags|=4096,t)}function Xs(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Va(e.return,t,n)}function Zs(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Qs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Ns(e,t,r.children,n),r=po.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Xs(e,n,t);else if(e.tag===19)Xs(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ri(po,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Zs(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Zs(t,!0,n,null,a);break;case`together`:Zs(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function $s(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ec(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Jc|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Yl(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Yl(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function tc(e,t,n){switch(t.tag){case 3:Hs(t),Ea();break;case 5:uo(t);break;case 1:Wi(t.type)&&Ji(t);break;case 4:co(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ri(Fa,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Ri(po,po.current&1),e=ec(e,t,n),e===null?null:e.sibling):Ks(e,t,n):(Ri(po,po.current&1),t.flags|=128,null);Ri(po,po.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Qs(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ri(po,po.current),r)break;return null;case 22:case 23:return t.lanes=0,Ls(e,t,n)}return ec(e,t,n)}var nc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},rc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,so(io.current);var o=null;switch(n){case`input`:i=me(e,i),r=me(e,r),o=[];break;case`select`:i=ne({},i,{value:void 0}),r=ne({},r,{value:void 0}),o=[];break;case`textarea`:i=Se(e,i),r=Se(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=di)}Fe(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null)if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null));for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null))if(u===`style`)if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l;else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&Zr(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},ic=function(e,t,n,r){n!==r&&(t.flags|=4)};function ac(e,t){if(!_a)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function oc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function sc(e,t,n){var i=t.pendingProps;switch(ma(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return oc(t),null;case 1:return Wi(t.type)&&Gi(),oc(t),null;case 3:return i=t.stateNode,lo(),Li(Vi),Li(Bi),go(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(wa(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,va!==null&&(vl(va),va=null))),oc(t),null;case 5:fo(t);var o=so(oo.current);if(n=t.type,e!==null&&t.stateNode!=null)rc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return oc(t),null}if(e=so(io.current),wa(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[wi]=t,i[Ti]=s,e=(t.mode&1)!=0,n){case`dialog`:Zr(`cancel`,i),Zr(`close`,i);break;case`iframe`:case`object`:case`embed`:Zr(`load`,i);break;case`video`:case`audio`:for(o=0;o<qr.length;o++)Zr(qr[o],i);break;case`source`:Zr(`error`,i);break;case`img`:case`image`:case`link`:Zr(`error`,i),Zr(`load`,i);break;case`details`:Zr(`toggle`,i);break;case`input`:he(i,s),Zr(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},Zr(`invalid`,i);break;case`textarea`:z(i,s),Zr(`invalid`,i)}for(var c in Fe(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&ui(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&ui(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&Zr(`scroll`,i)}switch(n){case`input`:R(i),ve(i,s,!0);break;case`textarea`:R(i),we(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=di)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Te(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[wi]=t,e[Ti]=i,nc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Ie(n,i),n){case`dialog`:Zr(`cancel`,e),Zr(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:Zr(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<qr.length;o++)Zr(qr[o],e);o=i;break;case`source`:Zr(`error`,e),o=i;break;case`img`:case`image`:case`link`:Zr(`error`,e),Zr(`load`,e),o=i;break;case`details`:Zr(`toggle`,e),o=i;break;case`input`:he(e,i),o=me(e,i),Zr(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=ne({},i,{value:void 0}),Zr(`invalid`,e);break;case`textarea`:z(e,i),o=Se(e,i),Zr(`invalid`,e);break;default:o=i}for(s in Fe(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Ne(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Oe(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&ke(e,u):typeof u==`number`&&ke(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&Zr(`scroll`,e):u!=null&&S(e,s,u,c))}switch(n){case`input`:R(e),ve(e,i,!1);break;case`textarea`:R(e),we(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+le(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&xe(e,!!i.multiple,i.defaultValue,!0):xe(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=di)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return oc(t),null;case 6:if(e&&t.stateNode!=null)ic(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=so(oo.current),so(io.current),wa(t)){if(i=t.stateNode,n=t.memoizedProps,i[wi]=t,(s=i.nodeValue!==n)&&(e=ha,e!==null))switch(e.tag){case 3:ui(i.nodeValue,n,(e.mode&1)!=0);break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&ui(i.nodeValue,n,(e.mode&1)!=0)}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[wi]=t,t.stateNode=i}return oc(t),null;case 13:if(Li(po),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(_a&&ga!==null&&t.mode&1&&!(t.flags&128))Ta(),Ea(),t.flags|=98560,s=!1;else if(s=wa(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[wi]=t}else Ea(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;oc(t),s=!1}else va!==null&&(vl(va),va=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||po.current&1?Kc===0&&(Kc=3):Ol())),t.updateQueue!==null&&(t.flags|=4),oc(t),null);case 4:return lo(),e===null&&ei(t.stateNode.containerInfo),oc(t),null;case 10:return Ba(t.type._context),oc(t),null;case 17:return Wi(t.type)&&Gi(),oc(t),null;case 19:if(Li(po),s=t.memoizedState,s===null)return oc(t),null;if(i=(t.flags&128)!=0,c=s.rendering,c===null)if(i)ac(s,!1);else{if(Kc!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=mo(e),c!==null){for(t.flags|=128,ac(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ri(po,po.current&1|2),t.child}e=e.sibling}s.tail!==null&&mt()>el&&(t.flags|=128,i=!0,ac(s,!1),t.lanes=4194304)}else{if(!i)if(e=mo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),ac(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!_a)return oc(t),null}else 2*mt()-s.renderingStartTime>el&&n!==1073741824&&(t.flags|=128,i=!0,ac(s,!1),t.lanes=4194304);s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(oc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=mt(),t.sibling=null,n=po.current,Ri(po,i?n&1|2:n&1),t);case 22:case 23:return wl(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Wc&1073741824&&(oc(t),t.subtreeFlags&6&&(t.flags|=8192)):oc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function cc(e,t){switch(ma(t),t.tag){case 1:return Wi(t.type)&&Gi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return lo(),Li(Vi),Li(Bi),go(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return fo(t),null;case 13:if(Li(po),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Ea()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Li(po),null;case 4:return lo(),null;case 10:return Ba(t.type._context),null;case 22:case 23:return wl(),null;case 24:return null;default:return null}}var lc=!1,uc=!1,dc=typeof WeakSet==`function`?WeakSet:Set,Q=null;function fc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){Rl(e,t,n)}else n.current=null}function pc(e,t,n){try{n()}catch(n){Rl(e,t,n)}}var mc=!1;function hc(e,t){if(fi=an,e=wr(),Tr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(pi={focusedElem:e,selectionRange:n},an=!1,Q=t;Q!==null;)if(t=Q,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Q=e;else for(;Q!==null;){t=Q;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:hs(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){Rl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,Q=e;break}Q=t.return}return h=mc,mc=!1,h}function gc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&pc(t,n,a)}i=i.next}while(i!==r)}}function _c(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function vc(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function yc(e){var t=e.alternate;t!==null&&(e.alternate=null,yc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wi],delete t[Ti],delete t[Di],delete t[Oi],delete t[ki])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function bc(e){return e.tag===5||e.tag===3||e.tag===4}function xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||bc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Sc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=di));else if(r!==4&&(e=e.child,e!==null))for(Sc(e,t,n),e=e.sibling;e!==null;)Sc(e,t,n),e=e.sibling}function Cc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Cc(e,t,n),e=e.sibling;e!==null;)Cc(e,t,n),e=e.sibling}var wc=null,Tc=!1;function Ec(e,t,n){for(n=n.child;n!==null;)Dc(e,t,n),n=n.sibling}function Dc(e,t,n){if(bt&&typeof bt.onCommitFiberUnmount==`function`)try{bt.onCommitFiberUnmount(yt,n)}catch{}switch(n.tag){case 5:uc||fc(n,t);case 6:var r=wc,i=Tc;wc=null,Ec(e,t,n),wc=r,Tc=i,wc!==null&&(Tc?(e=wc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wc.removeChild(n.stateNode));break;case 18:wc!==null&&(Tc?(e=wc,n=n.stateNode,e.nodeType===8?bi(e.parentNode,n):e.nodeType===1&&bi(e,n),nn(e)):bi(wc,n.stateNode));break;case 4:r=wc,i=Tc,wc=n.stateNode.containerInfo,Tc=!0,Ec(e,t,n),wc=r,Tc=i;break;case 0:case 11:case 14:case 15:if(!uc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&pc(n,t,o),i=i.next}while(i!==r)}Ec(e,t,n);break;case 1:if(!uc&&(fc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Rl(n,t,e)}Ec(e,t,n);break;case 21:Ec(e,t,n);break;case 22:n.mode&1?(uc=(r=uc)||n.memoizedState!==null,Ec(e,t,n),uc=r):Ec(e,t,n);break;default:Ec(e,t,n)}}function Oc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new dc),t.forEach(function(t){var r=Hl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function kc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:wc=c.stateNode,Tc=!1;break a;case 3:wc=c.stateNode.containerInfo,Tc=!0;break a;case 4:wc=c.stateNode.containerInfo,Tc=!0;break a}c=c.return}if(wc===null)throw Error(r(160));Dc(o,s,a),wc=null,Tc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Rl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ac(t,e),t=t.sibling}function Ac(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(kc(t,e),jc(e),i&4){try{gc(3,e,e.return),_c(3,e)}catch(t){Rl(e,e.return,t)}try{gc(5,e,e.return)}catch(t){Rl(e,e.return,t)}}break;case 1:kc(t,e),jc(e),i&512&&n!==null&&fc(n,n.return);break;case 5:if(kc(t,e),jc(e),i&512&&n!==null&&fc(n,n.return),e.flags&32){var a=e.stateNode;try{ke(a,``)}catch(t){Rl(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&ge(a,o),Ie(c,s);var u=Ie(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Ne(a,f):d===`dangerouslySetInnerHTML`?Oe(a,f):d===`children`?ke(a,f):S(a,d,f,u)}switch(c){case`input`:_e(a,o);break;case`textarea`:Ce(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?xe(a,!!o.multiple,o.multiple?[]:``,!1):xe(a,!!o.multiple,o.defaultValue,!0)):xe(a,!!o.multiple,m,!1)}a[Ti]=o}catch(t){Rl(e,e.return,t)}}break;case 6:if(kc(t,e),jc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Rl(e,e.return,t)}}break;case 3:if(kc(t,e),jc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{nn(t.containerInfo)}catch(t){Rl(e,e.return,t)}break;case 4:kc(t,e),jc(e);break;case 13:kc(t,e),jc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||($c=mt())),i&4&&Oc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(uc=(u=uc)||d,kc(t,e),uc=u):kc(t,e),jc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(Q=e,d=e.child;d!==null;){for(f=Q=d;Q!==null;){switch(p=Q,m=p.child,p.tag){case 0:case 11:case 14:case 15:gc(4,p,p.return);break;case 1:fc(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){Rl(i,n,e)}}break;case 5:fc(p,p.return);break;case 22:if(p.memoizedState!==null){Fc(f);continue}}m===null?Fc(f):(m.return=p,Q=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=Me(`display`,s))}catch(t){Rl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Rl(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:kc(t,e),jc(e),i&4&&Oc(e);break;case 21:break;default:kc(t,e),jc(e)}}function jc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(bc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(ke(a,``),i.flags&=-33),Cc(e,xc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Sc(e,xc(e),o);break;default:throw Error(r(161))}}catch(t){Rl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mc(e,t,n){Q=e,Nc(e,t,n)}function Nc(e,t,n){for(var r=(e.mode&1)!=0;Q!==null;){var i=Q,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||lc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||uc;s=lc;var l=uc;if(lc=o,(uc=c)&&!l)for(Q=i;Q!==null;)o=Q,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Ic(i):(c.return=o,Q=c);for(;a!==null;)Q=a,Nc(a,t,n),a=a.sibling;Q=i,lc=s,uc=l}Pc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,Q=a):Pc(e,t,n)}}function Pc(e){for(;Q!==null;){var t=Q;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:uc||_c(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!uc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:hs(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&no(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}no(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&nn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}uc||t.flags&512&&vc(t)}catch(e){Rl(t,t.return,e)}}if(t===e){Q=null;break}if(n=t.sibling,n!==null){n.return=t.return,Q=n;break}Q=t.return}}function Fc(e){for(;Q!==null;){var t=Q;if(t===e){Q=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Q=n;break}Q=t.return}}function Ic(e){for(;Q!==null;){var t=Q;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{_c(4,t)}catch(e){Rl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Rl(t,i,e)}}var a=t.return;try{vc(t)}catch(e){Rl(t,a,e)}break;case 5:var o=t.return;try{vc(t)}catch(e){Rl(t,o,e)}}}catch(e){Rl(t,t.return,e)}if(t===e){Q=null;break}var s=t.sibling;if(s!==null){s.return=t.return,Q=s;break}Q=t.return}}var Lc=Math.ceil,Rc=C.ReactCurrentDispatcher,zc=C.ReactCurrentOwner,Bc=C.ReactCurrentBatchConfig,$=0,Vc=null,Hc=null,Uc=0,Wc=0,Gc=Ii(0),Kc=0,qc=null,Jc=0,Yc=0,Xc=0,Zc=null,Qc=null,$c=0,el=1/0,tl=null,nl=!1,rl=null,il=null,al=!1,ol=null,sl=0,cl=0,ll=null,ul=-1,dl=0;function fl(){return $&6?mt():ul===-1?ul=mt():ul}function pl(e){return e.mode&1?$&2&&Uc!==0?Uc&-Uc:Oa.transition===null?(e=q,e===0?(e=window.event,e=e===void 0?16:dn(e.type),e):e):(dl===0&&(dl=Mt()),dl):1}function ml(e,t,n,i){if(50<cl)throw cl=0,ll=null,Error(r(185));Pt(e,n,i),(!($&2)||e!==Vc)&&(e===Vc&&(!($&2)&&(Yc|=n),Kc===4&&bl(e,Uc)),hl(e,i),n===1&&$===0&&!(t.mode&1)&&(el=mt()+500,Zi&&ta()))}function hl(e,t){var n=e.callbackNode;jt(e,t);var r=kt(e,e===Vc?Uc:0);if(r===0)n!==null&&dt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&dt(n),t===1)e.tag===0?ea(xl.bind(null,e)):$i(xl.bind(null,e)),vi(function(){!($&6)&&ta()}),n=null;else{switch(J(r)){case 1:n=gt;break;case 4:n=H;break;case 16:n=_t;break;case 536870912:n=U;break;default:n=_t}n=Wl(n,gl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function gl(e,t){if(ul=-1,dl=0,$&6)throw Error(r(327));var n=e.callbackNode;if(Il()&&e.callbackNode!==n)return null;var i=kt(e,e===Vc?Uc:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=kl(e,i);else{t=i;var a=$;$|=2;var o=Dl();(Vc!==e||Uc!==t)&&(tl=null,el=mt()+500,Tl(e,t));do try{jl();break}catch(t){El(e,t)}while(1);za(),Rc.current=o,$=a,Hc===null?(Vc=null,Uc=0,t=Kc):t=0}if(t!==0){if(t===2&&(a=W(e),a!==0&&(i=a,t=_l(e,a))),t===1)throw n=qc,Tl(e,0),bl(e,i),hl(e,mt()),n;if(t===6)bl(e,i);else{if(a=e.current.alternate,!(i&30)&&!yl(a)&&(t=kl(e,i),t===2&&(o=W(e),o!==0&&(i=o,t=_l(e,o))),t===1))throw n=qc,Tl(e,0),bl(e,i),hl(e,mt()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Pl(e,Qc,tl);break;case 3:if(bl(e,i),(i&130023424)===i&&(t=$c+500-mt(),10<t)){if(kt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){fl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=hi(Pl.bind(null,e,Qc,tl),t);break}Pl(e,Qc,tl);break;case 4:if(bl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-St(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=mt()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Lc(i/1960))-i,10<i){e.timeoutHandle=hi(Pl.bind(null,e,Qc,tl),i);break}Pl(e,Qc,tl);break;case 5:Pl(e,Qc,tl);break;default:throw Error(r(329))}}}return hl(e,mt()),e.callbackNode===n?gl.bind(null,e):null}function _l(e,t){var n=Zc;return e.current.memoizedState.isDehydrated&&(Tl(e,t).flags|=256),e=kl(e,t),e!==2&&(t=Qc,Qc=n,t!==null&&vl(t)),e}function vl(e){Qc===null?Qc=e:Qc.push.apply(Qc,e)}function yl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Z(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function bl(e,t){for(t&=~Xc,t&=~Yc,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-St(t),r=1<<n;e[n]=-1,t&=~r}}function xl(e){if($&6)throw Error(r(327));Il();var t=kt(e,0);if(!(t&1))return hl(e,mt()),null;var n=kl(e,t);if(e.tag!==0&&n===2){var i=W(e);i!==0&&(t=i,n=_l(e,i))}if(n===1)throw n=qc,Tl(e,0),bl(e,t),hl(e,mt()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Pl(e,Qc,tl),hl(e,mt()),null}function Sl(e,t){var n=$;$|=1;try{return e(t)}finally{$=n,$===0&&(el=mt()+500,Zi&&ta())}}function Cl(e){ol!==null&&ol.tag===0&&!($&6)&&Il();var t=$;$|=1;var n=Bc.transition,r=q;try{if(Bc.transition=null,q=1,e)return e()}finally{q=r,Bc.transition=n,$=t,!($&6)&&ta()}}function wl(){Wc=Gc.current,Li(Gc)}function Tl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,gi(n)),Hc!==null)for(n=Hc.return;n!==null;){var r=n;switch(ma(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Gi();break;case 3:lo(),Li(Vi),Li(Bi),go();break;case 5:fo(r);break;case 4:lo();break;case 13:Li(po);break;case 19:Li(po);break;case 10:Ba(r.type._context);break;case 22:case 23:wl()}n=n.return}if(Vc=e,Hc=e=Yl(e.current,null),Uc=Wc=t,Kc=0,qc=null,Xc=Yc=Jc=0,Qc=Zc=null,Wa!==null){for(t=0;t<Wa.length;t++)if(n=Wa[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}Wa=null}return e}function El(e,t){do{var n=Hc;try{if(za(),_o.current=ds,Co){for(var i=bo.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Co=!1}if(yo=0,So=xo=bo=null,wo=!1,To=0,zc.current=null,n===null||n.return===null){Kc=1,qc=t,Hc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=Uc,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=ks(s);if(m!==null){m.flags&=-257,As(m,s,c,o,t),m.mode&1&&Os(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}else{if(!(t&1)){Os(o,u,t),Ol();break a}l=Error(r(426))}}else if(_a&&c.mode&1){var _=ks(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),As(_,s,c,o,t),Da(Ss(l,c));break a}}o=l=Ss(l,c),Kc!==4&&(Kc=2),Zc===null?Zc=[o]:Zc.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Es(o,l,t);eo(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(il===null||!il.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Ds(o,c,t);eo(o,x);break a}}o=o.return}while(o!==null)}Nl(n)}catch(e){t=e,Hc===n&&n!==null&&(Hc=n=n.return);continue}break}while(1)}function Dl(){var e=Rc.current;return Rc.current=ds,e===null?ds:e}function Ol(){(Kc===0||Kc===3||Kc===2)&&(Kc=4),Vc===null||!(Jc&268435455)&&!(Yc&268435455)||bl(Vc,Uc)}function kl(e,t){var n=$;$|=2;var i=Dl();(Vc!==e||Uc!==t)&&(tl=null,Tl(e,t));do try{Al();break}catch(t){El(e,t)}while(1);if(za(),$=n,Rc.current=i,Hc!==null)throw Error(r(261));return Vc=null,Uc=0,Kc}function Al(){for(;Hc!==null;)Ml(Hc)}function jl(){for(;Hc!==null&&!ft();)Ml(Hc)}function Ml(e){var t=Ul(e.alternate,e,Wc);e.memoizedProps=e.pendingProps,t===null?Nl(e):Hc=t,zc.current=null}function Nl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=cc(n,t),n!==null){n.flags&=32767,Hc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Kc=6,Hc=null;return}}else if(n=sc(n,t,Wc),n!==null){Hc=n;return}if(t=t.sibling,t!==null){Hc=t;return}Hc=t=e}while(t!==null);Kc===0&&(Kc=5)}function Pl(e,t,n){var r=q,i=Bc.transition;try{Bc.transition=null,q=1,Fl(e,t,n,r)}finally{Bc.transition=i,q=r}return null}function Fl(e,t,n,i){do Il();while(ol!==null);if($&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(G(e,o),e===Vc&&(Hc=Vc=null,Uc=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||al||(al=!0,Wl(_t,function(){return Il(),null})),o=(n.flags&15990)!=0,n.subtreeFlags&15990||o){o=Bc.transition,Bc.transition=null;var s=q;q=1;var c=$;$|=4,zc.current=null,hc(e,n),Ac(n,e),Er(pi),an=!!fi,pi=fi=null,e.current=n,Mc(n,e,a),pt(),$=c,q=s,Bc.transition=o}else e.current=n;if(al&&(al=!1,ol=e,sl=a),o=e.pendingLanes,o===0&&(il=null),xt(n.stateNode,i),hl(e,mt()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(nl)throw nl=!1,e=rl,rl=null,e;return sl&1&&e.tag!==0&&Il(),o=e.pendingLanes,o&1?e===ll?cl++:(cl=0,ll=e):cl=0,ta(),null}function Il(){if(ol!==null){var e=J(sl),t=Bc.transition,n=q;try{if(Bc.transition=null,q=16>e?16:e,ol===null)var i=!1;else{if(e=ol,ol=null,sl=0,$&6)throw Error(r(331));var a=$;for($|=4,Q=e.current;Q!==null;){var o=Q,s=o.child;if(Q.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(Q=u;Q!==null;){var d=Q;switch(d.tag){case 0:case 11:case 15:gc(8,d,o)}var f=d.child;if(f!==null)f.return=d,Q=f;else for(;Q!==null;){d=Q;var p=d.sibling,m=d.return;if(yc(d),d===u){Q=null;break}if(p!==null){p.return=m,Q=p;break}Q=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}Q=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,Q=s;else b:for(;Q!==null;){if(o=Q,o.flags&2048)switch(o.tag){case 0:case 11:case 15:gc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,Q=v;break b}Q=o.return}}var y=e.current;for(Q=y;Q!==null;){s=Q;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,Q=b;else b:for(s=y;Q!==null;){if(c=Q,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:_c(9,c)}}catch(e){Rl(c,c.return,e)}if(c===s){Q=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,Q=x;break b}Q=c.return}}if($=a,ta(),bt&&typeof bt.onPostCommitFiberRoot==`function`)try{bt.onPostCommitFiberRoot(yt,e)}catch{}i=!0}return i}finally{q=n,Bc.transition=t}}return!1}function Ll(e,t,n){t=Ss(n,t),t=Es(e,t,1),e=Qa(e,t,1),t=fl(),e!==null&&(Pt(e,1,t),hl(e,t))}function Rl(e,t,n){if(e.tag===3)Ll(e,e,n);else for(;t!==null;){if(t.tag===3){Ll(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(il===null||!il.has(r))){e=Ss(n,e),e=Ds(t,e,1),t=Qa(t,e,1),e=fl(),t!==null&&(Pt(t,1,e),hl(t,e));break}}t=t.return}}function zl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=fl(),e.pingedLanes|=e.suspendedLanes&n,Vc===e&&(Uc&n)===n&&(Kc===4||Kc===3&&(Uc&130023424)===Uc&&500>mt()-$c?Tl(e,0):Xc|=n),hl(e,t)}function Bl(e,t){t===0&&(e.mode&1?(t=Dt,Dt<<=1,!(Dt&130023424)&&(Dt=4194304)):t=1);var n=fl();e=qa(e,t),e!==null&&(Pt(e,t,n),hl(e,n))}function Vl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bl(e,n)}function Hl(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),Bl(e,n)}var Ul=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Vi.current)Ms=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Ms=!1,tc(e,t,n);Ms=!!(e.flags&131072)}else Ms=!1,_a&&t.flags&1048576&&fa(t,aa,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;$s(e,t),e=t.pendingProps;var a=Ui(t,Bi.current);Ha(t,n),a=ko(null,t,i,e,a,n);var o=Ao();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Wi(i)?(o=!0,Ji(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Ya(t),a.updater=_s,t.stateNode=a,a._reactInternals=t,xs(t,i,e,n),t=Vs(null,t,i,!0,o,n)):(t.tag=0,_a&&o&&pa(t),Ns(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch($s(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=Jl(i),e=hs(i,e),a){case 0:t=zs(null,t,i,e,n);break a;case 1:t=Bs(null,t,i,e,n);break a;case 11:t=Ps(null,t,i,e,n);break a;case 14:t=Fs(null,t,i,hs(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:hs(i,a),zs(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:hs(i,a),Bs(e,t,i,a,n);case 3:a:{if(Hs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,Xa(e,t),to(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated)if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Ss(Error(r(423)),t),t=Us(e,t,i,n,a);break a}else if(i!==a){a=Ss(Error(r(424)),t),t=Us(e,t,i,n,a);break a}else for(ga=xi(t.stateNode.containerInfo.firstChild),ha=t,_a=!0,va=null,n=Pa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ea(),i===a){t=ec(e,t,n);break a}Ns(e,t,i,n)}t=t.child}return t;case 5:return uo(t),e===null&&Sa(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,mi(i,a)?s=null:o!==null&&mi(i,o)&&(t.flags|=32),Rs(e,t),Ns(e,t,s,n),t.child;case 6:return e===null&&Sa(t),null;case 13:return Ks(e,t,n);case 4:return co(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Na(t,null,i,n):Ns(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:hs(i,a),Ps(e,t,i,a,n);case 7:return Ns(e,t,t.pendingProps,n),t.child;case 8:return Ns(e,t,t.pendingProps.children,n),t.child;case 12:return Ns(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,Ri(Fa,i._currentValue),i._currentValue=s,o!==null)if(Z(o.value,s)){if(o.children===a.children&&!Vi.current){t=ec(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=Za(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),Va(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),Va(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ns(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Ha(t,n),a=Ua(a),i=i(a),t.flags|=1,Ns(e,t,i,n),t.child;case 14:return i=t.type,a=hs(i,t.pendingProps),a=hs(i.type,a),Fs(e,t,i,a,n);case 15:return Is(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:hs(i,a),$s(e,t),t.tag=1,Wi(i)?(e=!0,Ji(t)):e=!1,Ha(t,n),ys(t,i,a),xs(t,i,a,n),Vs(null,t,i,!0,e,n);case 19:return Qs(e,t,n);case 22:return Ls(e,t,n)}throw Error(r(156,t.tag))};function Wl(e,t){return ut(e,t)}function Gl(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.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 Kl(e,t,n,r){return new Gl(e,t,n,r)}function ql(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jl(e){if(typeof e==`function`)return+!!ql(e);if(e!=null){if(e=e.$$typeof,e===j)return 11;if(e===P)return 14}return 2}function Yl(e,t){var n=e.alternate;return n===null?(n=Kl(e.tag,t,e.key,e.mode),n.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=e.flags&14680064,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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Xl(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)ql(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case E:return Zl(n.children,a,o,t);case D:s=8,a|=8;break;case O:return e=Kl(12,n,t,a|2),e.elementType=O,e.lanes=o,e;case M:return e=Kl(13,n,t,a),e.elementType=M,e.lanes=o,e;case N:return e=Kl(19,n,t,a),e.elementType=N,e.lanes=o,e;case ee:return Ql(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case k:s=10;break a;case A:s=9;break a;case j:s=11;break a;case P:s=14;break a;case F:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=Kl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function Zl(e,t,n,r){return e=Kl(7,e,r,t),e.lanes=n,e}function Ql(e,t,n,r){return e=Kl(22,e,r,t),e.elementType=ee,e.lanes=n,e.stateNode={isHidden:!1},e}function $l(e,t,n){return e=Kl(6,e,null,t),e.lanes=n,e}function eu(e,t,n){return t=Kl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Nt(0),this.expirationTimes=Nt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function nu(e,t,n,r,i,a,o,s,c){return e=new tu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Kl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ya(a),e}function ru(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:T,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function iu(e){if(!e)return zi;e=e._reactInternals;a:{if(it(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(Wi(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(Wi(n))return qi(e,n,t)}return t}function au(e,t,n,r,i,a,o,s,c){return e=nu(n,r,!0,e,i,a,o,s,c),e.context=iu(null),n=e.current,r=fl(),i=pl(n),a=Za(r,i),a.callback=t??null,Qa(n,a,i),e.current.lanes=i,Pt(e,i,r),hl(e,r),e}function ou(e,t,n,r){var i=t.current,a=fl(),o=pl(i);return n=iu(n),t.context===null?t.context=n:t.pendingContext=n,t=Za(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Qa(i,t,o),e!==null&&(ml(e,i,o,a),$a(e,i,o)),o}function su(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function cu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function lu(e,t){cu(e,t),(e=e.alternate)&&cu(e,t)}function uu(){return null}var du=typeof reportError==`function`?reportError:function(e){console.error(e)};function fu(e){this._internalRoot=e}pu.prototype.render=fu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));ou(e,t,null,null)},pu.prototype.unmount=fu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Cl(function(){ou(null,e,null,null)}),t[Ei]=null}};function pu(e){this._internalRoot=e}pu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Lt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Kt.length&&t!==0&&t<Kt[n].priority;n++);Kt.splice(n,0,e),n===0&&Zt(e)}};function mu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function hu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function gu(){}function _u(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=su(o);a.call(e)}}var o=au(t,r,e,0,null,!1,!1,``,gu);return e._reactRootContainer=o,e[Ei]=o.current,ei(e.nodeType===8?e.parentNode:e),Cl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=su(c);s.call(e)}}var c=nu(e,0,!1,null,null,!1,!1,``,gu);return e._reactRootContainer=c,e[Ei]=c.current,ei(e.nodeType===8?e.parentNode:e),Cl(function(){ou(t,c,n,r)}),c}function vu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=su(o);s.call(e)}}ou(t,o,e,i)}else o=_u(n,t,e,i,r);return su(o)}Y=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ot(t.pendingLanes);n!==0&&(K(t,n|1),hl(t,mt()),!($&6)&&(el=mt()+500,ta()))}break;case 13:Cl(function(){var t=qa(e,1);t!==null&&ml(t,e,1,fl())}),lu(e,1)}},Ft=function(e){if(e.tag===13){var t=qa(e,134217728);t!==null&&ml(t,e,134217728,fl()),lu(e,134217728)}},It=function(e){if(e.tag===13){var t=pl(e),n=qa(e,t);n!==null&&ml(n,e,t,fl()),lu(e,t)}},Lt=function(){return q},Rt=function(e,t){var n=q;try{return q=e,t()}finally{q=n}},ze=function(e,t,n){switch(t){case`input`:if(_e(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Ni(i);if(!a)throw Error(r(90));fe(i),_e(i,a)}}}break;case`textarea`:Ce(e,n);break;case`select`:t=n.value,t!=null&&xe(e,!!n.multiple,t,!1)}},B=Sl,Ge=Cl;var yu={usingClientEntryPoint:!1,Events:[ji,Mi,Ni,Ue,We,Sl]},bu={findFiberByHostInstance:Ai,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},xu={bundleType:bu.bundleType,version:bu.version,rendererPackageName:bu.rendererPackageName,rendererConfig:bu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:C.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=ct(e),e===null?null:e.stateNode},findFiberByHostInstance:bu.findFiberByHostInstance||uu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Su=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Su.isDisabled&&Su.supportsFiber)try{yt=Su.inject(xu),bt=Su}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=yu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!mu(t))throw Error(r(200));return ru(e,t,null,n)},e.createRoot=function(e,t){if(!mu(e))throw Error(r(299));var n=!1,i=``,a=du;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=nu(e,1,!1,null,null,n,!1,i,a),e[Ei]=t.current,ei(e.nodeType===8?e.parentNode:e),new fu(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=ct(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Cl(e)},e.hydrate=function(e,t,n){if(!hu(t))throw Error(r(200));return vu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!mu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=du;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=au(t,null,e,1,n??null,a,!1,o,s),e[Ei]=t.current,ei(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new pu(t)},e.render=function(e,t,n){if(!hu(t))throw Error(r(200));return vu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!hu(e))throw Error(r(40));return e._reactRootContainer?(Cl(function(){vu(null,null,e,!1,function(){e._reactRootContainer=null,e[Ei]=null})}),!0):!1},e.unstable_batchedUpdates=Sl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!hu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return vu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),m=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=p()})),h=o((e=>{var t=m();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot})),g=c(u()),_=c(h(),1),v=class extends Error{status;constructor(e,t){super(t),this.status=e}},y=`telesrv_admin_csrf`,b=`X-CSRF-Token`,x=``;function S(e){x=(e??``).trim()}function C(){if(typeof document>`u`)return``;for(let e of document.cookie.split(`;`)){let t=e.trim(),n=t.indexOf(`=`);if(!(n<=0||t.slice(0,n)!==y))try{return decodeURIComponent(t.slice(n+1))}catch{return t.slice(n+1)}}return``}function w(){return C()||x}function T(e){let t=(e??`GET`).toUpperCase();return t!==`GET`&&t!==`HEAD`&&t!==`OPTIONS`}function E(e){if(!e)return{};if(e instanceof Headers){let t={};return e.forEach((e,n)=>{t[n]=e}),t}return Array.isArray(e)?Object.fromEntries(e):{...e}}async function D(e,t={}){let n=typeof FormData<`u`&&t.body instanceof FormData?{}:{"Content-Type":`application/json`};if(Object.assign(n,E(t.headers)),T(t.method)){let e=w();e&&(n[b]=e)}let r=await fetch(e,{credentials:`same-origin`,...t,headers:n}),i=await r.text(),a=i?JSON.parse(i):null;if(!r.ok){let e=a?.error||a?.Error||a?.message||r.statusText;throw new v(r.status,e)}return a}function O(e){return e instanceof Error?e.message:String(e)}var k={session:()=>D(`/api/session`),login:async e=>{let t=await D(`/api/login`,{method:`POST`,body:JSON.stringify({secret:e})});return S(t.csrf_token),t},logout:()=>D(`/api/logout`,{method:`POST`,body:`{}`}),accounts:e=>D(`/api/accounts?${e.toString()}`),accountStats:()=>D(`/api/accounts/stats`),sharedDeviceGroups:e=>D(`/api/accounts/shared-devices?${e.toString()}`),account:e=>D(`/api/accounts/${e}`),channels:e=>D(`/api/channels?${e.toString()}`),channel:e=>D(`/api/channels/${e}`),bots:e=>D(`/api/bots?${e.toString()}`),broadcasts:e=>D(`/api/broadcasts?${e.toString()}`),bot:e=>D(`/api/bots/${e}`),collectibleUsernames:e=>D(`/api/collectible-usernames?${e.toString()}`),collectibleUsername:e=>D(`/api/collectible-usernames/${encodeURIComponent(e)}`),dashboard:()=>D(`/api/dashboard`),storageStats:()=>D(`/api/storage/stats`),storageAccounts:e=>D(`/api/storage/accounts?${e.toString()}`),verificationApplications:e=>D(`/api/verification/applications?${e.toString()}`),verificationApplication:e=>D(`/api/verification/applications/${encodeURIComponent(e)}`),verificationCounts:()=>D(`/api/verification/counts`),botVerifiers:e=>D(`/api/botverification/verifiers?${e.toString()}`),verificationIcons:e=>D(`/api/botverification/icons?${e.toString()}`),customVerifications:e=>D(`/api/botverification/marks?${e.toString()}`),customVerificationRequests:e=>D(`/api/botverification/requests?${e.toString()}`),customVerificationRequest:e=>D(`/api/botverification/requests/${encodeURIComponent(e)}`),botVerificationCounts:()=>D(`/api/botverification/counts`),emoji:e=>D(`/api/emoji?${e.toString()}`),emojiAnimation:e=>D(`/api/emoji/${encodeURIComponent(e)}/animation`),messages:e=>D(`/api/messages?${e.toString()}`),message:(e,t)=>D(`/api/messages/detail?${new URLSearchParams({owner_user_id:String(e),msg_id:String(t)}).toString()}`),groupMessages:e=>D(`/api/messages/groups?${e.toString()}`),groupMessage:(e,t)=>D(`/api/messages/groups/detail?${new URLSearchParams({channel_id:String(e),msg_id:String(t)}).toString()}`),moderationCases:e=>D(`/api/moderation/cases?${e.toString()}`),moderationCase:e=>D(`/api/moderation/cases/${e}`),moderationReport:e=>D(`/api/moderation/reports/${e}`),claimModerationCase:(e,t)=>D(`/api/moderation/cases/${e}/claim`,{method:`POST`,body:JSON.stringify({expected_version:t})}),decideModerationCase:(e,t)=>D(`/api/moderation/cases/${e}/decide`,{method:`POST`,body:JSON.stringify(t)}),reviewModerationAppeal:(e,t,n)=>D(`/api/moderation/cases/${e}/appeals/${t}/review`,{method:`POST`,body:JSON.stringify(n)}),stickerSets:e=>D(`/api/stickers?kind=${encodeURIComponent(e)}`),stickerSetDocuments:e=>D(`/api/stickers/${encodeURIComponent(e)}/documents`),stickerDocumentAnimationURL:e=>`/api/stickers/documents/${encodeURIComponent(e)}/animation`,gifCatalogDocumentPreviewURL:e=>`/api/gif-catalog/documents/${encodeURIComponent(e)}/preview`,createStickerSet:e=>D(`/api/actions/create-sticker-set`,{method:`POST`,body:e}),setAccountAvatar:e=>D(`/api/actions/set-account-avatar`,{method:`POST`,body:e}),setChannelAvatar:e=>D(`/api/actions/set-channel-avatar`,{method:`POST`,body:e}),addStickerToSet:e=>D(`/api/actions/add-sticker-to-set`,{method:`POST`,body:e}),gifCatalog:()=>D(`/api/gif-catalog`),createGifCatalogEntry:e=>D(`/api/actions/create-gif-catalog-entry`,{method:`POST`,body:e}),serverIdentity:()=>D(`/api/server/identity`),uploadServerIcon:e=>D(`/api/actions/upload-server-icon`,{method:`POST`,body:e}),serverIconURL:()=>`/api/server/icon?t=${Date.now()}`,serverEnv:()=>D(`/api/server/env`),serverStatus:()=>D(`/api/server/status`),dockerStatus:()=>D(`/api/server/docker-status`),checkServerUpdates:()=>D(`/api/server/check-updates`),action:(e,t)=>D(e,{method:`POST`,body:JSON.stringify(t)})},A=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),j=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),M={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`},N=(0,g.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,g.createElement)(`svg`,{ref:c,...M,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:j(`lucide`,i),...s},[...o.map(([e,t])=>(0,g.createElement)(e,t)),...Array.isArray(a)?a:[a]])),P=(e,t)=>{let n=(0,g.forwardRef)(({className:n,...r},i)=>(0,g.createElement)(N,{ref:i,iconNode:t,className:j(`lucide-${A(e)}`,n),...r}));return n.displayName=`${e}`,n},F=P(`BadgeCheck`,[[`path`,{d:`M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z`,key:`3c2336`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),ee=P(`CircleAlert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),I=P(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),te=P(`CircleX`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),ne=P(`Layers`,[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]]),L=P(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),re=P(`ShieldX`,[[`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:`m14.5 9.5-5 5`,key:`17q4r4`}],[`path`,{d:`m9.5 9.5 5 5`,key:`18nt4w`}]]),ie=P(`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`}]]),ae=P(`TriangleAlert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),oe=P(`UserRound`,[[`circle`,{cx:`12`,cy:`8`,r:`5`,key:`1hypcn`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`,key:`rfgkzh`}]]),se=P(`UsersRound`,[[`path`,{d:`M18 21a8 8 0 0 0-16 0`,key:`3ypg7q`}],[`circle`,{cx:`10`,cy:`8`,r:`5`,key:`o932ke`}],[`path`,{d:`M22 20c0-3.37-2-6.5-4-8a5 5 0 0 0-.45-8.3`,key:`10s06x`}]]),ce=P(`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.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),le=P(`ArrowLeftRight`,[[`path`,{d:`M8 3 4 7l4 4`,key:`9rb6wj`}],[`path`,{d:`M4 7h16`,key:`6tx8e3`}],[`path`,{d:`m16 21 4-4-4-4`,key:`siv7j2`}],[`path`,{d:`M20 17H4`,key:`h6l3hr`}]]),ue=P(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),de=P(`AtSign`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8`,key:`7n84p3`}]]),R=P(`Ban`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m4.9 4.9 14.2 14.2`,key:`1m5liu`}]]),fe=P(`Bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),pe=P(`Building2`,[[`path`,{d:`M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z`,key:`1b4qmf`}],[`path`,{d:`M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2`,key:`i71pzd`}],[`path`,{d:`M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2`,key:`10jefs`}],[`path`,{d:`M10 6h4`,key:`1itunk`}],[`path`,{d:`M10 10h4`,key:`tcdvrf`}],[`path`,{d:`M10 14h4`,key:`kelpxr`}],[`path`,{d:`M10 18h4`,key:`1ulq68`}]]),me=P(`Cable`,[[`path`,{d:`M17 21v-2a1 1 0 0 1-1-1v-1a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1`,key:`10bnsj`}],[`path`,{d:`M19 15V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V9`,key:`1eqmu1`}],[`path`,{d:`M21 21v-2h-4`,key:`14zm7j`}],[`path`,{d:`M3 5h4V3`,key:`z442eg`}],[`path`,{d:`M7 5a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1V3`,key:`ebdjd7`}]]),he=P(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ge=P(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),_e=P(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),ve=P(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),ye=P(`CircleOff`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.35 2.69A10 10 0 0 1 21.3 15.65`,key:`1pfsoa`}],[`path`,{d:`M19.08 19.08A10 10 0 1 1 4.92 4.92`,key:`1ablyi`}]]),be=P(`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`}]]),xe=P(`Cpu`,[[`rect`,{width:`16`,height:`16`,x:`4`,y:`4`,rx:`2`,key:`14l7u7`}],[`rect`,{width:`6`,height:`6`,x:`9`,y:`9`,rx:`1`,key:`5aljv4`}],[`path`,{d:`M15 2v2`,key:`13l42r`}],[`path`,{d:`M15 20v2`,key:`15mkzm`}],[`path`,{d:`M2 15h2`,key:`1gxd5l`}],[`path`,{d:`M2 9h2`,key:`1bbxkp`}],[`path`,{d:`M20 15h2`,key:`19e6y8`}],[`path`,{d:`M20 9h2`,key:`19tzq7`}],[`path`,{d:`M9 2v2`,key:`165o2o`}],[`path`,{d:`M9 20v2`,key:`i2bqo8`}]]),Se=P(`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`}]]),z=P(`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`}]]),Ce=P(`ExternalLink`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),we=P(`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`}]]),Te=P(`FileJson`,[[`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 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),Ee=P(`Film`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]),De=P(`Flag`,[[`path`,{d:`M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z`,key:`i9b6wo`}],[`line`,{x1:`4`,x2:`4`,y1:`22`,y2:`15`,key:`1cm3nv`}]]),Oe=P(`Flame`,[[`path`,{d:`M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z`,key:`96xj49`}]]),ke=P(`Handshake`,[[`path`,{d:`m11 17 2 2a1 1 0 1 0 3-3`,key:`efffak`}],[`path`,{d:`m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4`,key:`9pr0kb`}],[`path`,{d:`m21 3 1 11h-2`,key:`1tisrp`}],[`path`,{d:`M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3`,key:`1uvwmv`}],[`path`,{d:`M3 4h8`,key:`1ep09j`}]]),Ae=P(`HardDrive`,[[`line`,{x1:`22`,x2:`2`,y1:`12`,y2:`12`,key:`1y58io`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}],[`line`,{x1:`6`,x2:`6.01`,y1:`16`,y2:`16`,key:`sgf278`}],[`line`,{x1:`10`,x2:`10.01`,y1:`16`,y2:`16`,key:`1l4acy`}]]),je=P(`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`}]]),Me=P(`ImageOff`,[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]),Ne=P(`ImagePlus`,[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]),Pe=P(`LayoutDashboard`,[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]),Fe=P(`LifeBuoy`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m4.93 4.93 4.24 4.24`,key:`1ymg45`}],[`path`,{d:`m14.83 9.17 4.24-4.24`,key:`1cb5xl`}],[`path`,{d:`m14.83 14.83 4.24 4.24`,key:`q42g0n`}],[`path`,{d:`m9.17 14.83-4.24 4.24`,key:`bqpfvv`}],[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}]]),Ie=P(`LogOut`,[[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}],[`polyline`,{points:`16 17 21 12 16 7`,key:`1gabdz`}],[`line`,{x1:`21`,x2:`9`,y1:`12`,y2:`12`,key:`1uyos4`}]]),Le=P(`Mail`,[[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`,key:`18n3k1`}],[`path`,{d:`m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7`,key:`1ocrg3`}]]),Re=P(`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`}]]),ze=P(`MemoryStick`,[[`path`,{d:`M6 19v-3`,key:`1nvgqn`}],[`path`,{d:`M10 19v-3`,key:`iu8nkm`}],[`path`,{d:`M14 19v-3`,key:`kcehxu`}],[`path`,{d:`M18 19v-3`,key:`1vh91z`}],[`path`,{d:`M8 11V9`,key:`63erz4`}],[`path`,{d:`M16 11V9`,key:`fru6f3`}],[`path`,{d:`M12 11V9`,key:`ha00sb`}],[`path`,{d:`M2 15h20`,key:`16ne18`}],[`path`,{d:`M2 7a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v1.1a2 2 0 0 0 0 3.837V17a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-5.1a2 2 0 0 0 0-3.837Z`,key:`lhddv3`}]]),Be=P(`MessageSquareText`,[[`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`}],[`path`,{d:`M13 8H7`,key:`14i4kc`}],[`path`,{d:`M17 12H7`,key:`16if0g`}]]),Ve=P(`MonitorSmartphone`,[[`path`,{d:`M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8`,key:`10dyio`}],[`path`,{d:`M10 19v-3.96 3.15`,key:`1irgej`}],[`path`,{d:`M7 19h5`,key:`qswx4l`}],[`rect`,{width:`6`,height:`10`,x:`16`,y:`12`,rx:`2`,key:`1egngj`}]]),He=P(`Moon`,[[`path`,{d:`M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z`,key:`a7tn18`}]]),Ue=P(`Palette`,[[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`path`,{d:`M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z`,key:`12rzf8`}]]),We=P(`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`}]]),B=P(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),Ge=P(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Ke=P(`PowerOff`,[[`path`,{d:`M18.36 6.64A9 9 0 0 1 20.77 15`,key:`dxknvb`}],[`path`,{d:`M6.16 6.16a9 9 0 1 0 12.68 12.68`,key:`1x7qb5`}],[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),qe=P(`Power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),Je=P(`Radio`,[[`path`,{d:`M4.9 19.1C1 15.2 1 8.8 4.9 4.9`,key:`1vaf9d`}],[`path`,{d:`M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5`,key:`u1ii0m`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}],[`path`,{d:`M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5`,key:`1j5fej`}],[`path`,{d:`M19.1 4.9C23 8.8 23 15.1 19.1 19`,key:`10b0cb`}]]),Ye=P(`RefreshCw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),Xe=P(`ScrollText`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),Ze=P(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),Qe=P(`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`}]]),$e=P(`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`}]]),V=P(`Settings2`,[[`path`,{d:`M20 7h-9`,key:`3s1dr2`}],[`path`,{d:`M14 17H5`,key:`gfn3mx`}],[`circle`,{cx:`17`,cy:`17`,r:`3`,key:`18b49y`}],[`circle`,{cx:`7`,cy:`7`,r:`3`,key:`dfmy0x`}]]),et=P(`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`}]]),tt=P(`ShieldAlert`,[[`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:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M12 16h.01`,key:`1drbdi`}]]),nt=P(`ShieldCheck`,[[`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`}]]),rt=P(`ShieldOff`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71`,key:`1jlk70`}],[`path`,{d:`M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264`,key:`18rp1v`}]]),it=P(`Smartphone`,[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]),at=P(`Smile`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`,key:`yxxnd0`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`,key:`1p4y9e`}]]),ot=P(`Stamp`,[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M19.27 13.73A2.5 2.5 0 0 0 17.5 13h-11A2.5 2.5 0 0 0 4 15.5V17a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-1.5c0-.66-.26-1.3-.73-1.77Z`,key:`1sy9ra`}],[`path`,{d:`M14 13V8.5C14 7 15 7 15 5a3 3 0 0 0-3-3c-1.66 0-3 1-3 3s1 2 1 3.5V13`,key:`cnxgux`}]]),st=P(`Sticker`,[[`path`,{d:`M15.5 3H5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h14a2 2 0 0 0 2-2V8.5L15.5 3Z`,key:`1wis1t`}],[`path`,{d:`M14 3v4a2 2 0 0 0 2 2h4`,key:`36rjfy`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M10 16s.8 1 2 1c1.3 0 2-1 2-1`,key:`1vvgv3`}]]),ct=P(`Sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),lt=P(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}],[`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`}]]),ut=P(`Undo2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),dt=P(`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`}]]),ft=P(`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`}]]),pt=P(`Users`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`path`,{d:`M16 3.13a4 4 0 0 1 0 7.75`,key:`1da9ce`}]]),mt=P(`Vault`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}],[`path`,{d:`m7.9 7.9 2.7 2.7`,key:`hpeyl3`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}],[`path`,{d:`m13.4 10.6 2.7-2.7`,key:`264c1n`}],[`circle`,{cx:`7.5`,cy:`16.5`,r:`.5`,fill:`currentColor`,key:`nkw3mc`}],[`path`,{d:`m7.9 16.1 2.7-2.7`,key:`p81g5e`}],[`circle`,{cx:`16.5`,cy:`16.5`,r:`.5`,fill:`currentColor`,key:`fubopw`}],[`path`,{d:`m13.4 13.4 2.7 2.7`,key:`abhel3`}],[`circle`,{cx:`12`,cy:`12`,r:`2`,key:`1c9p78`}]]),ht=P(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function gt(e){let t=e.trim();return!t||t.startsWith(`+`)?t:/^\d+$/.test(t)?`+${t}`:t}function H(e){let t=e.trim();return t?t.startsWith(`@`)?t:`@${t}`:``}function _t(e){return`${e.FirstName||``} ${e.LastName||``}`.trim()||`-`}function vt(e){return e.Broadcast&&!e.Megagroup?`Channel`:e.Megagroup&&e.Forum?`Supergroup / Forum`:e.Megagroup?`Supergroup`:`Channel / Group`}function U(e){if(!e||e.startsWith(`0001-`))return``;let t=new Date(e);return Number.isNaN(t.getTime())?``:t.toLocaleString()}function yt(e){if(!e||e<=0)return``;let t=new Date(e*1e3);return Number.isNaN(t.getTime())?``:t.toLocaleString()}function bt(e){let t=(e??``).trim();if(!/^https?:\/\//i.test(t))return``;try{let e=new URL(t);return e.protocol!==`http:`&&e.protocol!==`https:`?``:e.href}catch{return``}}function xt(e){if(!e.trim())return 0;let t=Number.parseInt(e,10);return Number.isFinite(t)?t:0}function St(e){let t=(e??``).trim();if(!t)return`0`;let n=Number(t);return Number.isFinite(n)?n.toLocaleString():t}var Ct={XTR:0,TON:9,USD:2,EUR:2,RUB:2};function wt(e){let t=(e??``).trim().toUpperCase();return t in Ct?Ct[t]:2}function Tt(e,t){let n=(e??``).trim();if(!n)return`0`;if(!/^-?\d+$/.test(n))return n;let r=wt(t),i=n.startsWith(`-`),a=(i?n.slice(1):n).replace(/^0+(?=\d)/,``).padStart(r+1,`0`),o=a.slice(0,a.length-r)||`0`,s=r>0?a.slice(a.length-r):``;r>2&&(s=s.replace(/0+$/,``));let c=i?`-`:``;return s?`${c}${Et(o)}.${s}`:`${c}${Et(o)}`}function Et(e){return e.replace(/\B(?=(\d{3})+(?!\d))/g,` `)}function Dt(e,t){let n=(t??``).trim().toUpperCase(),r=Tt(e,n);return n?`${r} ${n}`:r}function Ot(e,t){let n=(e??``).trim().replace(/\s+/g,``).replace(`,`,`.`);if(!n)return`0`;if(!/^\d*(\.\d*)?$/.test(n)||n===`.`)return null;let r=wt(t),[i,a=``]=n.split(`.`);if(a.length>r)return null;let o=`${i||`0`}${a.padEnd(r,`0`)}`.replace(/^0+(?=\d)/,``);return o===``?`0`:o}function kt(e){let t=(e??``).trim();if(!t||!/^\d+$/.test(t))return`0 B`;let n=Number(t);if(!Number.isFinite(n))return`${t} B`;let r=[`B`,`KB`,`MB`,`GB`,`TB`,`PB`],i=n,a=0;for(;i>=1024&&a<r.length-1;)i/=1024,a++;let o=a===0?0:1;return`${i.toFixed(o)} ${r[a]}`}function At(e,t=`msg ids invalid`){let n=e.split(/[\s,]+/).map(e=>e.trim()).filter(Boolean).map(e=>Number.parseInt(e,10));if(n.length===0||n.some(e=>!Number.isFinite(e)||e<=0))throw Error(t);return n}var jt=o((e=>{var t=u(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),W=o(((e,t)=>{t.exports=jt()}))();function Mt({title:e,eyebrow:t,children:n,actions:r}){return(0,W.jsxs)(`div`,{className:`page-frame`,children:[(0,W.jsxs)(`div`,{className:`page-title-row`,children:[(0,W.jsxs)(`div`,{children:[t&&(0,W.jsx)(`div`,{className:`eyebrow`,children:t}),(0,W.jsx)(`h2`,{children:e})]}),r&&(0,W.jsx)(`div`,{className:`page-actions`,children:r})]}),n]})}function Nt({children:e}){return(0,W.jsx)(`div`,{className:`query-panel`,children:e})}function Pt({main:e,side:t}){return(0,W.jsxs)(`div`,{className:`split-layout`,children:[(0,W.jsx)(`div`,{className:`split-main`,children:e}),(0,W.jsx)(`aside`,{className:`split-side`,children:t})]})}function G({title:e,text:t,action:n}){return(0,W.jsxs)(`div`,{className:`section-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h2`,{children:e}),t&&(0,W.jsx)(`p`,{children:t})]}),n&&(0,W.jsx)(`div`,{className:`section-action`,children:n})]})}function K({children:e}){return(0,W.jsxs)(`div`,{className:`alert`,children:[(0,W.jsx)(ee,{size:16}),` `,(0,W.jsx)(`span`,{children:e})]})}function q({children:e,tone:t=`neutral`}){return(0,W.jsx)(`span`,{className:`badge ${t}`,children:e})}function J({label:e,value:t,tone:n=`neutral`,mono:r=!1}){return(0,W.jsxs)(`div`,{className:`metric ${n}`,children:[(0,W.jsx)(`span`,{children:e}),(0,W.jsx)(`strong`,{className:r?`mono`:``,children:t})]})}function Y({label:e,value:t,mono:n=!1}){return(0,W.jsxs)(`div`,{className:`summary-item`,children:[(0,W.jsx)(`span`,{children:e}),(0,W.jsx)(`strong`,{className:n?`mono`:``,children:t})]})}function Ft({rows:e}){return(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`ID`}),(0,W.jsx)(`th`,{children:`Command ID`}),(0,W.jsx)(`th`,{children:`Action`}),(0,W.jsx)(`th`,{children:`Actor`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Dry-run`}),(0,W.jsx)(`th`,{children:`Reason`}),(0,W.jsx)(`th`,{children:`Time`})]})}),(0,W.jsxs)(`tbody`,{children:[e.map(e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{children:e.ID}),(0,W.jsx)(`td`,{className:`mono`,children:e.CommandID}),(0,W.jsx)(`td`,{children:e.Action}),(0,W.jsx)(`td`,{children:e.Actor}),(0,W.jsx)(`td`,{children:e.Status}),(0,W.jsx)(`td`,{children:e.DryRun?`Yes`:`No`}),(0,W.jsx)(`td`,{className:`truncate`,children:e.Reason}),(0,W.jsx)(`td`,{children:U(e.CreatedAt)})]},e.ID)),e.length===0&&(0,W.jsx)(It,{colSpan:8})]})]})})}function It({colSpan:e}){return(0,W.jsx)(`tr`,{children:(0,W.jsx)(`td`,{colSpan:e,className:`empty-cell`,children:`No results`})})}function Lt({label:e}){return(0,W.jsx)(`section`,{className:`surface`,children:(0,W.jsx)(`div`,{className:`loading-line`,children:e})})}function Rt({value:e}){return(0,W.jsx)(`pre`,{className:`json-block`,children:e||`{}`})}function zt({username:e,collectibles:t}){let n=H(e??``),r=t??[];return r.length===0?(0,W.jsx)(W.Fragment,{children:n||`-`}):(0,W.jsxs)(W.Fragment,{children:[n,(0,W.jsx)(`ul`,{className:`username-branch`,children:r.map(e=>(0,W.jsxs)(`li`,{className:e.Active?``:`inactive`,children:[(0,W.jsx)(`span`,{children:H(e.Username)}),!e.Active&&(0,W.jsx)(`em`,{children:`inactive`})]},e.Username))})]})}var Bt=`verification.review`,Vt=`botverification.review`,Ht=`botverification.manage`,Ut=`server.manage`,Wt=(0,g.createContext)({permissions:[],hideThirdPartyVerification:!0});function Gt({permissions:e,hideThirdPartyVerification:t=!0,children:n}){let r=(0,g.useMemo)(()=>({permissions:e,hideThirdPartyVerification:t}),[e,t]);return(0,W.jsx)(Wt.Provider,{value:r,children:n})}function Kt(){let{permissions:e}=(0,g.useContext)(Wt);return(0,g.useMemo)(()=>({permissions:e,can:t=>e.includes(`*`)||e.includes(t)}),[e])}function qt(e){return Kt().can(e)}function Jt(){return(0,g.useContext)(Wt).hideThirdPartyVerification}function Yt({permission:e,children:t}){let{can:n}=Kt();return n(e)?(0,W.jsx)(W.Fragment,{children:t}):(0,W.jsx)(Xt,{permission:e})}function Xt({permission:e}){return(0,W.jsxs)(Mt,{title:`Not enough rights`,eyebrow:`Console / Access`,children:[(0,W.jsx)(K,{children:`This session was not granted the ${e} permission, so the section stays closed.`}),(0,W.jsx)(`section`,{className:`section-block`,children:(0,W.jsx)(`div`,{className:`entity-head`,children:(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`div`,{className:`entity-title`,children:[(0,W.jsx)(rt,{size:16}),` `,`Section unavailable`]}),(0,W.jsx)(`div`,{className:`entity-subtitle`,children:`Ask an operator to add the permission to TELESRV_ADMIN_UI_PERMISSIONS and sign in again.`})]})})})]})}function Zt({children:e}){return Jt()?(0,W.jsxs)(Mt,{title:`Feature hidden`,eyebrow:`Console / Third-party marks`,children:[(0,W.jsx)(K,{children:`Third-party bot verification is hidden on this server (TELESRV_HIDE_THIRD_PARTY_VERIFICATION=true).`}),(0,W.jsx)(`section`,{className:`section-block`,children:(0,W.jsx)(`div`,{className:`entity-head`,children:(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`div`,{className:`entity-title`,children:[(0,W.jsx)(rt,{size:16}),` `,`Not fully finished`]}),(0,W.jsx)(`div`,{className:`entity-subtitle`,children:`This feature may cause unstable server behavior and is hidden by default. Set TELESRV_HIDE_THIRD_PARTY_VERIFICATION=false to re-enable it.`})]})})})]}):(0,W.jsx)(W.Fragment,{children:e})}function Qt(){return{href:`${window.location.pathname}${window.location.search}`,path:window.location.pathname,search:new URLSearchParams(window.location.search)}}function $t(e){return e.startsWith(`/bot-verification`)?`Third-party verification`:e.startsWith(`/verification`)?`Official Verification`:e.startsWith(`/collectible-usernames`)?`Collectible Usernames`:e.startsWith(`/storage`)?`Storage`:e.startsWith(`/accounts/shared-devices`)?`Shared Devices`:e.startsWith(`/accounts`)?`Accounts`:e.startsWith(`/channels`)?`Supergroups and Channels`:e.startsWith(`/bots`)?`Bots`:e.startsWith(`/moderation`)?`Reports and Moderation`:e.startsWith(`/broadcasts`)?`Broadcasts`:e.startsWith(`/emoji`)?`Emoji`:e.startsWith(`/messages`)?`Message Audit`:e.startsWith(`/stickers`)?`Stickers`:e.startsWith(`/gif-catalog`)?`GIFs`:e.startsWith(`/server-settings`)?`Server Settings`:`Operations Console`}var en=`telesrv.admin.theme`,tn=(0,g.createContext)(null);function nn(e){document.documentElement.setAttribute(`data-theme`,e),document.documentElement.style.colorScheme=e}function rn({children:e}){let[t,n]=(0,g.useState)(()=>sn());(0,g.useEffect)(()=>{nn(t);try{localStorage.setItem(en,t)}catch{}},[t]),(0,g.useEffect)(()=>{if(!window.matchMedia)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=e=>{let t=null;try{t=localStorage.getItem(en)}catch{t=null}t!==`light`&&t!==`dark`&&n(e.matches?`dark`:`light`)};return e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let r=(0,g.useCallback)(e=>n(e),[]),i=(0,g.useCallback)(()=>n(e=>e===`dark`?`light`:`dark`),[]),a=(0,g.useMemo)(()=>({theme:t,setTheme:r,toggleTheme:i}),[t,r,i]);return(0,W.jsx)(tn.Provider,{value:a,children:e})}function an(){let e=(0,g.useContext)(tn);if(!e)throw Error(`useTheme must be used inside ThemeProvider`);return e}function on(){let{theme:e,toggleTheme:t}=an(),n=e===`light`?`Switch to dark theme`:`Switch to light theme`;return(0,W.jsx)(`button`,{className:`theme-toggle`,type:`button`,onClick:t,"aria-label":n,title:n,children:e===`dark`?(0,W.jsx)(ct,{size:16}):(0,W.jsx)(He,{size:16})})}function sn(){try{let e=localStorage.getItem(en);if(e===`light`||e===`dark`)return e}catch{}try{if(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches)return`dark`}catch{}return`light`}function cn({href:e,navigate:t,className:n,children:r}){return(0,W.jsx)(`a`,{className:n,href:e,onClick:n=>{n.preventDefault(),t(e)},children:r})}function ln(){return(0,W.jsxs)(`div`,{className:`boot-screen`,children:[(0,W.jsxs)(`div`,{className:`brand compact brand-elevated`,children:[(0,W.jsx)(`span`,{className:`brand-mark`,children:(0,W.jsx)(`img`,{src:`/logo.png`,alt:`OwpenGram`})}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`strong`,{children:`OwpenGram`}),(0,W.jsx)(`small`,{children:`Admin Console`})]})]}),(0,W.jsx)(`div`,{className:`loader-bar`})]})}function un({actor:e,build:t,route:n,navigate:r,onLogout:i,children:a}){let o=qt(Bt),s=qt(Vt),c=qt(Ut),[l,u]=(0,g.useState)(null);(0,g.useEffect)(()=>{c&&k.serverIdentity().then(e=>u({name:e.name,iconExt:e.icon_ext})).catch(()=>void 0)},[c]);let[d,f]=(0,g.useState)(!1),p=l?.name?.trim()||`OwpenGram`,m=l?.iconExt&&!d?k.serverIconURL():`/logo.png`;(0,g.useEffect)(()=>{document.title=`${p} Admin`},[p]),(0,g.useEffect)(()=>{let e=document.querySelector(`link[rel='icon']`);e||(e=document.createElement(`link`),e.rel=`icon`,document.head.appendChild(e)),e.href=l?.iconExt&&!d?k.serverIconURL():`/logo.png`},[l?.iconExt,d]);let h=Jt(),_=n.path.startsWith(`/messages`),[v,y]=(0,g.useState)(_);(0,g.useEffect)(()=>{_&&y(!0)},[_]);async function b(){await k.logout().catch(()=>void 0),i()}return(0,W.jsxs)(`div`,{className:`shell`,children:[(0,W.jsxs)(`aside`,{className:`sidebar`,children:[(0,W.jsxs)(cn,{className:`brand`,href:`/`,navigate:r,children:[(0,W.jsx)(`span`,{className:`brand-mark`,children:(0,W.jsx)(`img`,{src:m,alt:p,onError:()=>f(!0)})}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`strong`,{children:p}),(0,W.jsx)(`small`,{children:`Admin Console`})]})]}),(0,W.jsx)(`div`,{className:`sidebar-label`,children:`Navigation`}),(0,W.jsxs)(`nav`,{className:`nav-list`,"aria-label":`Primary navigation`,children:[(0,W.jsx)(dn,{icon:(0,W.jsx)(Pe,{size:16}),href:`/`,route:n,navigate:r,children:`Overview`}),(0,W.jsx)(dn,{icon:(0,W.jsx)(pt,{size:16}),href:`/accounts`,route:n,navigate:r,children:`Accounts`}),(0,W.jsx)(dn,{icon:(0,W.jsx)(nt,{size:16}),href:`/channels`,route:n,navigate:r,children:`Supergroups / Channels`}),(0,W.jsx)(dn,{icon:(0,W.jsx)(fe,{size:16}),href:`/bots`,route:n,navigate:r,children:`Bots`}),(0,W.jsx)(dn,{icon:(0,W.jsx)(tt,{size:16}),href:`/moderation`,route:n,navigate:r,children:`Reports / Moderation`}),(0,W.jsx)(dn,{icon:(0,W.jsx)(Re,{size:16}),href:`/broadcasts`,route:n,navigate:r,children:`Broadcasts`}),o&&(0,W.jsx)(dn,{icon:(0,W.jsx)(F,{size:16}),href:`/verification`,route:n,navigate:r,children:`Verification`}),s&&!h&&(0,W.jsx)(dn,{icon:(0,W.jsx)(ot,{size:16}),href:`/bot-verification`,route:n,navigate:r,children:`Third-party marks`}),(0,W.jsx)(dn,{icon:(0,W.jsx)(de,{size:16}),href:`/collectible-usernames`,route:n,navigate:r,children:`NFT Usernames`}),(0,W.jsx)(dn,{icon:(0,W.jsx)(Se,{size:16}),href:`/storage`,route:n,navigate:r,children:`Storage`}),(0,W.jsx)(dn,{icon:(0,W.jsx)(st,{size:16}),href:`/stickers`,route:n,navigate:r,children:`Stickers`}),(0,W.jsx)(dn,{icon:(0,W.jsx)(at,{size:16}),href:`/emoji`,route:n,navigate:r,children:`Emoji`}),(0,W.jsx)(dn,{icon:(0,W.jsx)(Ee,{size:16}),href:`/gif-catalog`,route:n,navigate:r,children:`GIFs`}),(0,W.jsxs)(`div`,{className:`nav-section ${_?`active`:``} ${v?`open`:``}`,children:[(0,W.jsxs)(`button`,{className:`nav-section-toggle`,type:`button`,"aria-expanded":v,onClick:()=>y(e=>!e),children:[(0,W.jsx)(Be,{size:16}),(0,W.jsx)(`span`,{children:`Messages`}),(0,W.jsx)(ge,{className:`nav-section-chevron`,size:15})]}),v&&(0,W.jsxs)(`div`,{className:`nav-children`,children:[(0,W.jsx)(dn,{href:`/messages/private`,route:n,navigate:r,activeWhen:e=>e===`/messages`||e===`/messages/detail`||e.startsWith(`/messages/private`),children:`Private`}),(0,W.jsx)(dn,{href:`/messages/groups`,route:n,navigate:r,activeWhen:e=>e.startsWith(`/messages/groups`),children:`Groups`})]})]}),c&&(0,W.jsx)(dn,{icon:(0,W.jsx)(et,{size:16}),href:`/server-settings`,route:n,navigate:r,children:`Server Settings`})]}),(0,W.jsxs)(`div`,{className:`sidebar-status`,children:[(0,W.jsx)(`span`,{className:`sidebar-label`,children:`Version: O7`}),t?.short_commit&&(0,W.jsx)(`span`,{className:`sidebar-label sidebar-build`,title:t.commit+(t.dirty?` (uncommitted changes)`:``),children:`Build: ${t.short_commit}${t.dirty?`+`:``}`})]})]}),(0,W.jsxs)(`div`,{className:`workspace`,children:[(0,W.jsxs)(`header`,{className:`topbar`,children:[(0,W.jsx)(`div`,{children:(0,W.jsx)(`h1`,{children:$t(n.path)})}),(0,W.jsxs)(`div`,{className:`topbar-actions`,children:[(0,W.jsx)(on,{}),(0,W.jsx)(`span`,{className:`actor-pill`,children:`Actor: ${e}`}),(0,W.jsxs)(`button`,{className:`btn ghost icon-text`,type:`button`,onClick:b,title:`Log out`,children:[(0,W.jsx)(Ie,{size:16}),` `,`Log out`]})]})]}),(0,W.jsx)(`main`,{className:`content`,children:a})]})]})}function dn({href:e,route:t,navigate:n,icon:r,children:i,activeWhen:a}){return(0,W.jsxs)(cn,{className:`nav-item ${(a?a(t.path):e===`/`?t.path===`/`:t.path.startsWith(e))?`active`:``}`,href:e,navigate:n,children:[r??(0,W.jsx)(`span`,{"aria-hidden":`true`,className:`nav-dot`}),(0,W.jsx)(`span`,{children:i})]})}function fn({onLogin:e}){let[t,n]=(0,g.useState)(``),[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)(!1);async function s(n){n.preventDefault(),o(!0),i(``);try{let n=await k.login(t);e({actor:n.actor,permissions:n.permissions??[]})}catch(e){i(O(e))}finally{o(!1)}}return(0,W.jsxs)(`main`,{className:`login-page`,children:[(0,W.jsxs)(`div`,{className:`bg-orbs`,"aria-hidden":`true`,children:[(0,W.jsx)(`div`,{className:`bg-orb bg-orb--1`}),(0,W.jsx)(`div`,{className:`bg-orb bg-orb--2`}),(0,W.jsx)(`div`,{className:`bg-orb bg-orb--3`})]}),(0,W.jsxs)(`section`,{className:`login-panel`,children:[(0,W.jsxs)(`div`,{className:`login-head`,children:[(0,W.jsxs)(`div`,{className:`brand brand-elevated`,children:[(0,W.jsx)(`span`,{className:`brand-mark`,children:(0,W.jsx)(`img`,{src:`/logo.png`,alt:`OwpenGram`})}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`strong`,{children:`OwpenGram`}),(0,W.jsx)(`small`,{children:`Admin Console`})]})]}),(0,W.jsxs)(`div`,{className:`login-head-actions`,children:[(0,W.jsx)(on,{}),(0,W.jsx)(`span`,{className:`login-chip`,children:`Local access`})]})]}),(0,W.jsxs)(`div`,{className:`login-copy`,children:[(0,W.jsx)(`h1`,{children:`Operations Admin`}),(0,W.jsx)(`p`,{children:`Enter credentials to open the console.`})]}),r&&(0,W.jsx)(K,{children:r}),(0,W.jsxs)(`form`,{className:`form-stack`,onSubmit:s,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`span`,{children:`Admin password or token`}),(0,W.jsx)(`input`,{autoFocus:!0,type:`password`,value:t,autoComplete:`current-password`,onChange:e=>n(e.target.value)})]}),(0,W.jsx)(`button`,{className:`btn primary full`,type:`submit`,disabled:a,children:a?`Logging in`:`Log in`})]})]})]})}var pn=m();function mn({kind:e,id:t,onClose:n,onDone:r}){let[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(``),[c,l]=(0,g.useState)(``),[u,d]=(0,g.useState)(!1),[f,p]=(0,g.useState)(``);(0,g.useEffect)(()=>{if(!i){s(``);return}let e=URL.createObjectURL(i);return s(e),()=>URL.revokeObjectURL(e)},[i]);async function m(){if(!i){p(`Choose an image file first.`);return}if(!c.trim()){p(`Please enter an operation reason`);return}d(!0),p(``);try{let a=e===`channel`?`channel_id`:`user_id`,o=new FormData;o.set(`metadata`,JSON.stringify({command_id:``,reason:c.trim(),confirm:!0,[a]:t})),o.set(`file`,i,i.name);let s=e===`channel`?await k.setChannelAvatar(o):await k.setAccountAvatar(o);if(s.error){p(s.error);return}r(),n()}catch(e){p(O(e))}finally{d(!1)}}return(0,pn.createPortal)((0,W.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,W.jsxs)(`section`,{className:`modal command-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":`Change avatar`,children:[(0,W.jsxs)(`div`,{className:`modal-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`eyebrow`,children:e===`channel`?`Channel`:`Account`}),(0,W.jsx)(`h2`,{children:`Change avatar`})]}),(0,W.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:n,disabled:u,"aria-label":`Close`,children:(0,W.jsx)(ht,{size:15})})]}),(0,W.jsxs)(`div`,{className:`command-body`,children:[(0,W.jsxs)(`label`,{className:`gift-file-picker ${i?`has-file`:``}`,children:[(0,W.jsx)(`input`,{type:`file`,accept:`image/png,image/jpeg,image/webp`,onChange:e=>a(e.target.files?.[0]??null)}),o?(0,W.jsx)(`img`,{className:`gift-file-icon`,src:o,alt:``,style:{objectFit:`cover`}}):(0,W.jsx)(Ne,{size:22}),(0,W.jsxs)(`span`,{className:`gift-file-copy`,children:[(0,W.jsx)(`span`,{className:`gift-field-label`,children:`New avatar`}),(0,W.jsx)(`strong`,{children:i?i.name:`Choose a JPEG, PNG, or WebP image`})]}),(0,W.jsx)(`span`,{className:`gift-file-action`,children:i?`Change file`:`Choose file`})]}),(0,W.jsxs)(`label`,{className:`gift-reason-field`,children:[(0,W.jsx)(`span`,{children:`Audit reason`}),(0,W.jsx)(`input`,{value:c,placeholder:`Briefly describe why this avatar is being changed`,onChange:e=>l(e.target.value)})]}),f&&(0,W.jsx)(K,{children:f})]}),(0,W.jsxs)(`div`,{className:`modal-actions`,children:[(0,W.jsx)(`button`,{className:`btn`,type:`button`,onClick:n,disabled:u,children:`Close`}),(0,W.jsxs)(`button`,{className:`btn primary`,type:`button`,onClick:m,disabled:u,children:[u?(0,W.jsx)(L,{className:`spin`,size:15}):(0,W.jsx)(dt,{size:15}),`Upload avatar`]})]})]})}),document.body)}function X({label:e,path:t,payload:n,icon:r,compact:i=!1,tone:a=`danger`,disabled:o=!1,onDone:s,onError:c,secretField:l}){let[u,d]=(0,g.useState)(!1),[f,p]=(0,g.useState)(``),[m,h]=(0,g.useState)(null),[_,v]=(0,g.useState)(``),[y,b]=(0,g.useState)(!1),[x,S]=(0,g.useState)(!1);function C(){p(``),h(null),v(``),S(!1)}async function w(e){if(!f.trim()){v(`Please enter an operation reason`);return}b(!0),v(``);try{let r={...n(),reason:f,confirm:e};h(await k.action(t,r)),e&&s?.()}catch(e){v(c?.(e)||O(e))}finally{b(!1)}}let T=m?.dry_run&&!m.error,E=`btn ${a===`danger`?`danger`:a===`warn`?`warn`:a===`primary`?`primary`:``} ${i?`compact-btn`:``}`,D=(0,g.useMemo)(()=>{try{return n()}catch(e){return{payload_error:O(e)}}},[u,n]),A=l&&m?.details&&typeof m.details[l]==`string`?m.details[l]:``,j=A&&m?.details?Object.fromEntries(Object.entries(m.details).filter(([e])=>e!==l)):m?.details;async function M(){await navigator.clipboard.writeText(A),S(!0)}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:E,type:`button`,disabled:o,onClick:()=>{C(),d(!0)},children:[r,e]}),u&&(0,pn.createPortal)((0,W.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,W.jsxs)(`section`,{className:`modal command-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":e,children:[(0,W.jsxs)(`div`,{className:`modal-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`eyebrow`,children:`Action Flow`}),(0,W.jsx)(`h2`,{children:e})]}),(0,W.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:()=>d(!1),"aria-label":`Close`,children:(0,W.jsx)(ht,{size:15})})]}),(0,W.jsxs)(`div`,{className:`command-body`,children:[(0,W.jsxs)(`div`,{className:`command-steps`,children:[(0,W.jsxs)(`div`,{className:`command-step ${f.trim()?`done`:`active`}`,children:[(0,W.jsx)(`span`,{children:`1`}),(0,W.jsx)(`strong`,{children:`Enter reason`})]}),(0,W.jsxs)(`div`,{className:`command-step ${m?.dry_run?`done`:f.trim()?`active`:``}`,children:[(0,W.jsx)(`span`,{children:`2`}),(0,W.jsx)(`strong`,{children:`Dry-run check`})]}),(0,W.jsxs)(`div`,{className:`command-step ${m&&!m.dry_run&&!m.error?`done`:T?`active`:``}`,children:[(0,W.jsx)(`span`,{children:`3`}),(0,W.jsx)(`strong`,{children:`Confirm execution`})]})]}),(0,W.jsxs)(`label`,{className:`form-field`,children:[(0,W.jsx)(`span`,{children:`Operation reason`}),(0,W.jsx)(`textarea`,{value:f,onChange:e=>p(e.target.value),rows:3,placeholder:`Describe why this operation is being performed`})]}),(0,W.jsxs)(`div`,{className:`command-preview`,children:[(0,W.jsxs)(`div`,{className:`preview-head`,children:[(0,W.jsx)(Te,{size:14}),` `,`Request preview`]}),(0,W.jsx)(Rt,{value:JSON.stringify(D,null,2)})]}),_&&(0,W.jsx)(K,{children:_}),m&&(0,W.jsxs)(`div`,{className:`result-box`,children:[(0,W.jsxs)(`div`,{className:`result-title`,children:[m.error?(0,W.jsx)(ee,{size:16}):(0,W.jsx)(I,{size:16}),(0,W.jsx)(`strong`,{children:m.message||m.error||`Action result`})]}),(0,W.jsxs)(`div`,{className:`result-line`,children:[(0,W.jsx)(`span`,{children:`Command ID`}),(0,W.jsx)(`strong`,{children:m.command_id})]}),(0,W.jsxs)(`div`,{className:`result-line`,children:[(0,W.jsx)(`span`,{children:`Status`}),(0,W.jsx)(`strong`,{children:m.status})]}),(0,W.jsxs)(`div`,{className:`result-line`,children:[(0,W.jsx)(`span`,{children:`Dry-run`}),(0,W.jsx)(`strong`,{children:m.dry_run?`Yes`:`No`})]}),(0,W.jsx)(`div`,{className:`result-message`,children:m.message||m.error}),A&&(0,W.jsxs)(`div`,{className:`secret-reveal`,children:[(0,W.jsx)(`div`,{className:`secret-reveal-label`,children:`One-time secret — copy it now, it won't be shown again`}),(0,W.jsxs)(`div`,{className:`secret-reveal-row`,children:[(0,W.jsx)(`code`,{className:`secret-reveal-value`,children:`•`.repeat(Math.min(A.length,40))}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>void M(),children:[x?(0,W.jsx)(he,{size:15}):(0,W.jsx)(be,{size:15}),x?`Copied`:`Copy`]})]})]}),j&&Object.keys(j).length>0&&(0,W.jsx)(Rt,{value:JSON.stringify(j,null,2)})]})]}),(0,W.jsxs)(`div`,{className:`modal-actions`,children:[(0,W.jsx)(`button`,{className:`btn`,type:`button`,onClick:()=>d(!1),children:`Close`}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>w(!1),disabled:y,children:[y?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(B,{size:15}),m?`Run dry-run again`:`Run dry-run first`]}),(0,W.jsxs)(`button`,{className:`btn danger icon-text`,type:`button`,onClick:()=>w(!0),disabled:y||!T,children:[(0,W.jsx)(I,{size:15}),`Confirm execution`]})]})]})}),document.body)]})}var hn=[[`#FF885E`,`#FF516A`],[`#FFCD6A`,`#FFA85C`],[`#82B1FF`,`#665FFF`],[`#A0DE7E`,`#54CB68`],[`#53EDD6`,`#28C9B7`],[`#72D5FD`,`#2A9EF1`],[`#E0A2F3`,`#D669ED`]];function gn(e){return hn[Math.abs(e)%hn.length]}function _n(e){let t=Array.from(e);return t.length>0?t[0]:``}function vn(e,t,n){let r=`${e} ${t}`.trim().split(/\s+/).filter(Boolean),i=r.length>0?r:n?[n]:[];if(i.length===0)return`T`;let a=_n(i[0]);return i.length>1&&(a+=_n(i[i.length-1])),a.toUpperCase()}function yn({id:e,kind:t=`user`,firstName:n=``,lastName:r=``,username:i=``,title:a=``,size:o=34,refreshKey:s}){let[c,l]=(0,g.useState)(!1);if((0,g.useEffect)(()=>{l(!1)},[e,t,s]),c){let[s,c]=gn(e);return(0,W.jsx)(`div`,{className:`avatar-fallback`,style:{width:o,height:o,background:`linear-gradient(135deg, ${s}, ${c})`,fontSize:Math.round(o*.42)},children:t===`channel`?vn(a,``,i):vn(n,r,i)})}return(0,W.jsx)(`img`,{className:`avatar-photo-img`,src:`${t===`channel`?`/api/channels/${e}/avatar`:`/api/accounts/${e}/avatar`}${s===void 0?``:`?v=${encodeURIComponent(String(s))}`}`,alt:``,loading:`lazy`,style:{width:o,height:o},onError:()=>l(!0)})}function bn({rows:e,userID:t,onDone:n}){let[r,i]=(0,g.useState)(()=>new Set);(0,g.useEffect)(()=>{i(new Set)},[t]);let a=(0,g.useMemo)(()=>e.filter(e=>!r.has(e.Hash)),[e,r]);function o(e){i(t=>e(t)),n()}return(0,W.jsxs)(`div`,{className:`authorization-block`,children:[(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table authorization-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`Device`}),(0,W.jsx)(`th`,{children:`Platform`}),(0,W.jsx)(`th`,{children:`IP`}),(0,W.jsx)(`th`,{children:`Last active`}),(0,W.jsx)(`th`,{className:`device-actions-head`,children:`Actions`})]})}),(0,W.jsxs)(`tbody`,{children:[a.map(n=>(0,W.jsxs)(`tr`,{children:[(0,W.jsxs)(`td`,{className:`device-text`,children:[n.DeviceModel,` `,n.SystemVersion]}),(0,W.jsxs)(`td`,{className:`device-text`,children:[n.Platform,` `,n.AppVersion]}),(0,W.jsx)(`td`,{children:n.IP}),(0,W.jsx)(`td`,{children:U(n.ActiveAt)}),(0,W.jsx)(`td`,{className:`device-actions-cell`,children:(0,W.jsxs)(`div`,{className:`device-actions`,children:[(0,W.jsx)(X,{label:`Revoke current`,icon:(0,W.jsx)(Ie,{size:13}),compact:!0,path:`/api/actions/revoke-sessions`,payload:()=>({user_id:t,hash:n.Hash}),onDone:()=>o(e=>new Set([...e,n.Hash]))}),(0,W.jsx)(X,{label:`Keep current`,icon:(0,W.jsx)(nt,{size:13}),compact:!0,path:`/api/actions/revoke-sessions`,payload:()=>({user_id:t,keep_hash:n.Hash}),onDone:()=>o(()=>new Set(e.filter(e=>e.Hash!==n.Hash).map(e=>e.Hash)))})]})})]},n.Hash)),a.length===0&&(0,W.jsx)(It,{colSpan:5})]})]})}),(0,W.jsx)(`div`,{className:`danger-zone`,children:(0,W.jsx)(X,{label:`Revoke all devices`,icon:(0,W.jsx)(me,{size:15}),path:`/api/actions/revoke-sessions`,payload:()=>({user_id:t,revoke_all:!0}),onDone:()=>o(()=>new Set(e.map(e=>e.Hash)))})})]})}function xn({scam:e,fake:t}){return!e&&!t?null:(0,W.jsxs)(W.Fragment,{children:[e&&(0,W.jsx)(q,{tone:`danger`,children:`SCAM`}),t&&(0,W.jsx)(q,{tone:`danger`,children:`FAKE`})]})}function Sn({idKey:e,id:t,path:n,scam:r,fake:i,onDone:a}){return(0,W.jsxs)(`div`,{className:`action-stack`,children:[(0,W.jsx)(X,{label:r?`Clear SCAM`:`Mark as SCAM`,icon:(0,W.jsx)(tt,{size:15}),tone:`danger`,path:n,payload:()=>({[e]:t,scam:!r,fake:r?i:!1}),onDone:a}),(0,W.jsx)(X,{label:i?`Clear FAKE`:`Mark as FAKE`,icon:(0,W.jsx)(re,{size:15}),tone:`danger`,path:n,payload:()=>({[e]:t,fake:!i,scam:i?r:!1}),onDone:a})]})}function Cn({id:e,support:t,onDone:n}){return(0,W.jsx)(X,{label:t?`Clear support`:`Mark as support`,icon:(0,W.jsx)(Fe,{size:15}),tone:`neutral`,path:`/api/actions/set-support`,payload:()=>({user_id:e,support:!t}),onDone:n})}function wn({idKey:e,id:t,path:n,current:r,onDone:i}){let[a,o]=(0,g.useState)(r.replace(/^@/,``));return(0,W.jsxs)(`div`,{className:`attr-block`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Username`}),(0,W.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`username`})]}),(0,W.jsx)(X,{label:`Set username`,icon:(0,W.jsx)(de,{size:15}),tone:`neutral`,path:n,payload:()=>({[e]:t,username:a.trim().replace(/^@/,``)}),onDone:i})]})}function Tn({id:e,path:t,currentFirstName:n,currentLastName:r,onDone:i}){let[a,o]=(0,g.useState)(n),[s,c]=(0,g.useState)(r);return(0,W.jsxs)(`div`,{className:`attr-block`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`First name`}),(0,W.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`First name`})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Last name`}),(0,W.jsx)(`input`,{value:s,onChange:e=>c(e.target.value),placeholder:`Last name`})]}),(0,W.jsx)(X,{label:`Set name`,icon:(0,W.jsx)(oe,{size:15}),tone:`neutral`,path:t,payload:()=>({user_id:e,first_name:a.trim(),last_name:s.trim()}),onDone:i})]})}function En({id:e,path:t,current:n,onDone:r}){let[i,a]=(0,g.useState)(n);return(0,W.jsxs)(`div`,{className:`attr-block`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Phone number`}),(0,W.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),placeholder:`15551234567`})]}),(0,W.jsx)(X,{label:`Set phone`,icon:(0,W.jsx)(We,{size:15}),tone:`warn`,path:t,payload:()=>({user_id:e,phone:i.trim()}),onDone:r})]})}function Dn({id:e,path:t,current:n,onDone:r}){let[i,a]=(0,g.useState)(n);return(0,W.jsxs)(`div`,{className:`attr-block`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Login email`}),(0,W.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),placeholder:`name@example.com (empty clears it)`,type:`email`})]}),(0,W.jsx)(X,{label:i.trim()?`Set login email`:`Clear login email`,icon:(0,W.jsx)(Le,{size:15}),tone:`warn`,path:t,payload:()=>({user_id:e,email:i.trim()}),onDone:r})]})}function On({idKey:e,id:t,path:n,onDone:r}){let[i,a]=(0,g.useState)(!1),[o,s]=(0,g.useState)(!0),[c,l]=(0,g.useState)(`0`),[u,d]=(0,g.useState)(``);return(0,W.jsxs)(`div`,{className:`attr-block`,children:[(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked)}),` `,`Profile color`]}),(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>s(e.target.checked)}),` `,`Enable color`]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Color index`}),(0,W.jsx)(`input`,{type:`number`,min:`0`,max:`20`,value:c,onChange:e=>l(e.target.value)})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Background emoji ID`}),(0,W.jsx)(`input`,{value:u,onChange:e=>d(e.target.value),placeholder:`0`})]}),(0,W.jsx)(X,{label:`Set color`,icon:(0,W.jsx)(Ue,{size:15}),tone:`neutral`,path:n,payload:()=>({[e]:t,for_profile:i,has_color:o,color:xt(c),background_emoji_id:u.trim()||`0`}),onDone:r})]})}function kn({idKey:e,id:t,path:n,onDone:r}){let[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(`0`);return(0,W.jsxs)(`div`,{className:`attr-block`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Emoji document ID`}),(0,W.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),placeholder:`0 = clear`})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Until (unix, 0 = permanent)`}),(0,W.jsx)(`input`,{type:`number`,min:`0`,value:o,onChange:e=>s(e.target.value)})]}),(0,W.jsx)(X,{label:`Set emoji status`,icon:(0,W.jsx)(at,{size:15}),tone:`neutral`,path:n,payload:()=>({[e]:t,document_id:i.trim()||`0`,until:xt(o)}),onDone:r})]})}function An({channel:e,onDone:t}){let[n,r]=(0,g.useState)(e.Gigagroup),[i,a]=(0,g.useState)(e.AntiSpam),[o,s]=(0,g.useState)(e.ParticipantsHidden),[c,l]=(0,g.useState)(e.NoForwards),[u,d]=(0,g.useState)(e.JoinToSend),[f,p]=(0,g.useState)(e.JoinRequest),[m,h]=(0,g.useState)(String(e.SlowmodeSeconds));(0,g.useEffect)(()=>{r(e.Gigagroup),a(e.AntiSpam),s(e.ParticipantsHidden),l(e.NoForwards),d(e.JoinToSend),p(e.JoinRequest),h(String(e.SlowmodeSeconds))},[e]);function _(){let t={channel_id:e.ID};return n!==e.Gigagroup&&(t.gigagroup=n),i!==e.AntiSpam&&(t.antispam=i),o!==e.ParticipantsHidden&&(t.participants_hidden=o),c!==e.NoForwards&&(t.noforwards=c),u!==e.JoinToSend&&(t.join_to_send=u),f!==e.JoinRequest&&(t.join_request=f),xt(m)!==e.SlowmodeSeconds&&(t.slowmode_seconds=xt(m)),t}return(0,W.jsxs)(`div`,{className:`attr-block`,children:[(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:n,onChange:e=>r(e.target.checked)}),` `,`Gigagroup`]}),(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked)}),` `,`Aggressive anti-spam`]}),(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:o,onChange:e=>s(e.target.checked)}),` `,`Hide members`]}),(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:c,onChange:e=>l(e.target.checked)}),` `,`Restrict forwarding`]}),(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:u,onChange:e=>d(e.target.checked)}),` `,`Join to send messages`]}),(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:f,onChange:e=>p(e.target.checked)}),` `,`Join by request`]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Slowmode (seconds)`}),(0,W.jsx)(`input`,{type:`number`,min:`0`,max:`86400`,value:m,onChange:e=>h(e.target.value)})]}),(0,W.jsx)(X,{label:`Apply settings`,icon:(0,W.jsx)(V,{size:15}),tone:`warn`,path:`/api/actions/set-channel-settings`,payload:_,onDone:t})]})}function jn({id:e,navigate:t}){let[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(!1),[c,l]=(0,g.useState)(`profile`),[u,d]=(0,g.useState)(`1`),[f,p]=(0,g.useState)(()=>Mn(new Date(Date.now()+7*864e5))),[m,h]=(0,g.useState)(``),[_,v]=(0,g.useState)(!1),[y,b]=(0,g.useState)(0);async function x(){s(!0),a(``);try{let t=await k.account(e);r(t),t.Restriction.Frozen&&(t.Restriction.Until&&p(Mn(new Date(t.Restriction.Until))),h(t.Restriction.AppealURL||``))}catch(e){a(O(e))}finally{s(!1)}}if((0,g.useEffect)(()=>{x(),l(`profile`)},[e]),i)return(0,W.jsx)(K,{children:i});if(!n)return(0,W.jsx)(Lt,{label:o?`Loading account detail`:`Waiting for data`});let S=n.Account,C=[{key:`profile`,label:`Profile & Status`,icon:(0,W.jsx)(oe,{size:15})},{key:`devices`,label:`Authorized Devices`,icon:(0,W.jsx)(Ve,{size:15})},{key:`actions`,label:`Actions & Management`,icon:(0,W.jsx)(V,{size:15})}];return(0,W.jsxs)(Mt,{title:`Account #${S.ID}`,eyebrow:`Account Profile`,actions:(0,W.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>t(`/accounts`),children:[(0,W.jsx)(ue,{size:15}),` `,`Back to list`]}),children:[(0,W.jsxs)(`section`,{className:`entity-head`,children:[(0,W.jsxs)(`div`,{className:`entity-head-main`,children:[(0,W.jsxs)(`div`,{className:`avatar-edit-slot`,children:[(0,W.jsx)(yn,{id:S.ID,firstName:S.FirstName,lastName:S.LastName,username:S.Username,size:64,refreshKey:y||void 0}),(0,W.jsx)(`button`,{className:`icon-btn avatar-edit-btn`,type:`button`,"aria-label":`Change avatar`,title:`Change avatar`,onClick:()=>v(!0),children:(0,W.jsx)(Ne,{size:13})})]}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`entity-title`,children:_t(S)}),(0,W.jsxs)(`div`,{className:`entity-subtitle`,children:[H(S.Username)||`No username`,` · `,gt(S.Phone)||`No phone`]}),S.Collectibles?.length>0&&(0,W.jsx)(`div`,{className:`entity-subtitle`,children:(0,W.jsx)(zt,{username:``,collectibles:S.Collectibles})})]})]}),(0,W.jsxs)(`div`,{className:`entity-badges`,children:[S.PremiumUntil>0?(0,W.jsx)(q,{tone:`good`,children:`Premium`}):(0,W.jsx)(q,{children:`Not premium`}),n.Verified?(0,W.jsx)(q,{tone:`good`,children:`Verified`}):(0,W.jsx)(q,{children:`Not verified`}),(0,W.jsx)(xn,{scam:n.Scam,fake:n.Fake}),S.Frozen?(0,W.jsx)(q,{tone:`danger`,children:`Account frozen`}):(0,W.jsx)(q,{children:`Account active`})]})]}),(0,W.jsx)(`div`,{className:`toolbar`,role:`group`,"aria-label":`Account sections`,children:C.map(e=>(0,W.jsxs)(`button`,{className:`btn icon-text ${c===e.key?`primary`:``}`,type:`button`,"aria-pressed":c===e.key,onClick:()=>l(e.key),children:[e.icon,` `,e.label]},e.key))}),c===`profile`&&(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`User ID`,value:String(S.ID),mono:!0}),(0,W.jsx)(Y,{label:`Last active`,value:yt(n.LastSeenAt)||`-`}),(0,W.jsx)(Y,{label:`Premium expires`,value:S.PremiumUntil>0?yt(S.PremiumUntil):`None`}),(0,W.jsx)(Y,{label:`Updated`,value:U(S.UpdatedAt)||`-`}),(0,W.jsx)(Y,{label:`Authorized devices`,value:String(n.Authorizations.length)}),(0,W.jsx)(Y,{label:`Account flags`,value:`support=${n.Support} bot=${n.Bot}`}),(0,W.jsx)(Y,{label:`Restriction`,value:n.HasRestriction?n.Restriction.Reason||`Restricted`:`None`}),(0,W.jsx)(Y,{label:`Frozen since`,value:n.Restriction.Since?U(n.Restriction.Since):`None`}),(0,W.jsx)(Y,{label:`Appeal deadline`,value:n.Restriction.Until?U(n.Restriction.Until):`None`}),(0,W.jsx)(Y,{label:`Appeal URL`,value:n.Restriction.AppealURL||`None`}),(0,W.jsx)(Y,{label:`Created`,value:U(S.CreatedAt)||`-`})]}),n.About&&(0,W.jsx)(`p`,{className:`about-text`,children:n.About})]}),c===`devices`&&(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Authorized Devices`,text:`${n.Authorizations.length} authorizations`}),(0,W.jsx)(bn,{rows:n.Authorizations,userID:S.ID,onDone:x})]}),c===`actions`&&(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`div`,{className:`action-groups`,children:[(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Freeze & Restriction`,text:`Blocks sign-in and marks the account for appeal review.`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsxs)(`div`,{className:`attr-block`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Appeal deadline`}),(0,W.jsx)(`input`,{"aria-label":`Freeze appeal deadline`,value:f,onChange:e=>p(e.target.value),type:`datetime-local`})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Appeal URL`}),(0,W.jsx)(`input`,{"aria-label":`Freeze appeal URL`,value:m,onChange:e=>h(e.target.value),type:`url`,placeholder:`https://...`})]}),(0,W.jsx)(X,{label:S.Frozen?`Update freeze`:`Freeze account`,icon:(0,W.jsx)(ee,{size:15}),tone:`danger`,path:`/api/actions/set-frozen`,payload:()=>({user_id:S.ID,frozen:!0,freeze_until:new Date(f).toISOString(),freeze_appeal_url:m.trim()}),onDone:x}),S.Frozen&&(0,W.jsx)(X,{label:`Unfreeze account`,icon:(0,W.jsx)(ee,{size:15}),path:`/api/actions/set-frozen`,payload:()=>({user_id:S.ID,frozen:!1}),onDone:x})]})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Premium`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsxs)(`div`,{className:`attr-block`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Premium duration (months)`}),(0,W.jsx)(`input`,{"aria-label":`Set premium duration in months`,value:u,onChange:e=>d(e.target.value),type:`number`,min:`1`,max:`120`})]}),(0,W.jsxs)(`div`,{className:`action-stack`,children:[(0,W.jsx)(X,{label:`Set premium`,icon:(0,W.jsx)(ie,{size:15}),tone:`warn`,path:`/api/actions/grant-premium`,payload:()=>({user_id:S.ID,months:xt(u)}),onDone:x}),(0,W.jsx)(X,{label:`Clear premium`,icon:(0,W.jsx)(ie,{size:15}),tone:`warn`,path:`/api/actions/grant-premium`,payload:()=>({user_id:S.ID,months:0}),onDone:x})]})]})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Verification & Moderation Flags`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsxs)(`div`,{className:`action-stack`,children:[(0,W.jsx)(X,{label:n.Verified?`Clear verified`:`Set verified`,icon:(0,W.jsx)(F,{size:15}),tone:`warn`,path:`/api/actions/set-verified`,payload:()=>({user_id:S.ID,verified:!n.Verified}),onDone:x}),(0,W.jsx)(Sn,{idKey:`user_id`,id:S.ID,path:`/api/actions/set-account-flags`,scam:n.Scam,fake:n.Fake,onDone:x}),(0,W.jsx)(Cn,{id:S.ID,support:n.Support,onDone:x})]})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Username`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(wn,{idKey:`user_id`,id:S.ID,path:`/api/actions/set-account-username`,current:S.Username,onDone:x})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Name`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(Tn,{id:S.ID,path:`/api/actions/set-account-profile`,currentFirstName:S.FirstName,currentLastName:S.LastName,onDone:x})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Phone Number`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(En,{id:S.ID,path:`/api/actions/set-account-phone`,current:S.Phone,onDone:x})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Login Email`,text:`The email used for sign-in / password-recovery, not a contact address.`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(Dn,{id:S.ID,path:`/api/actions/set-account-login-email`,current:S.LoginEmail,onDone:x})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Profile Color`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(On,{idKey:`user_id`,id:S.ID,path:`/api/actions/set-account-color`,onDone:x})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Emoji Status`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(kn,{idKey:`user_id`,id:S.ID,path:`/api/actions/set-account-emoji-status`,onDone:x})})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Recent Admin Actions`,text:`Last 30 audit rows`,action:(0,W.jsx)(Xe,{size:16})}),(0,W.jsx)(Ft,{rows:n.AuditLogs})]})]}),_&&(0,W.jsx)(mn,{kind:`user`,id:S.ID,onClose:()=>v(!1),onDone:()=>{b(e=>e+1),x()}})]})}function Mn(e){return new Date(e.getTime()-e.getTimezoneOffset()*6e4).toISOString().slice(0,16)}function Nn(e){return e.reduce((e,t)=>(e.devices+=t.DeviceCount,e),{devices:0})}function Pn(e){return e.reduce((e,t)=>(t.Megagroup&&(e.megagroups+=1),t.Broadcast&&(e.broadcasts+=1),t.Verified&&(e.verified+=1),e),{megagroups:0,broadcasts:0,verified:0})}var Fn={beforeID:0,beforeActiveUS:0};function In({navigate:e}){let[t,n]=(0,g.useState)(``),[r,i]=(0,g.useState)(50),[a,o]=(0,g.useState)(null),[s,c]=(0,g.useState)(null),[l,u]=(0,g.useState)([]),[d,f]=(0,g.useState)(Fn),[p,m]=(0,g.useState)(!1),[h,_]=(0,g.useState)(``);async function v(e,t){m(!0),_(``);let n=new URLSearchParams({limit:String(r)});e.trim()&&n.set(`q`,e.trim()),(t.beforeID||t.beforeActiveUS)&&(n.set(`before_id`,String(t.beforeID)),n.set(`before_active_us`,String(t.beforeActiveUS)));try{let e=await k.accounts(n);return o(e),e}catch(e){return _(O(e)),null}finally{m(!1)}}async function y(){u([]),f(Fn),await v(t,Fn)}async function b(){if(!a?.has_more)return;let e={beforeID:a.next_before_id,beforeActiveUS:a.next_before_active_us};await v(t,e)&&(u(e=>[...e,d]),f(e))}async function x(){if(l.length===0)return;let e=l[l.length-1];await v(t,e)&&(u(e=>e.slice(0,-1)),f(e))}async function S(){try{c(await k.accountStats())}catch{}}(0,g.useEffect)(()=>{y(),S()},[]);let C=Nn(a?.rows??[]),w=l.length>0&&!p,T=!!a?.has_more&&!p;return(0,W.jsxs)(Mt,{title:`Accounts`,eyebrow:a?.listing===!1?`Search results`:`Recently active accounts`,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>e(`/accounts/shared-devices`),children:[(0,W.jsx)(it,{size:15}),` `,`Shared devices`]}),(0,W.jsxs)(`button`,{className:`btn`,type:`button`,onClick:()=>{y(),S()},disabled:p,children:[(0,W.jsx)(Ye,{size:15}),` `,`Refresh`]})]}),children:[h&&(0,W.jsx)(K,{children:h}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Total users`,value:s?String(s.total):`…`}),(0,W.jsx)(J,{label:`Online now`,value:s?String(s.online):`…`,tone:`good`}),(0,W.jsx)(J,{label:`Online device records`,value:String(C.devices)})]}),(0,W.jsx)(Nt,{children:(0,W.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),y()},children:[(0,W.jsxs)(`label`,{className:`searchbox`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),placeholder:`User ID / phone / username / email / name`})]}),(0,W.jsxs)(`label`,{className:`gift-page-size`,children:[(0,W.jsx)(`span`,{children:`Limit`}),(0,W.jsxs)(`select`,{value:String(r),onChange:e=>i(Number(e.target.value)),children:[(0,W.jsx)(`option`,{value:`10`,children:`10`}),(0,W.jsx)(`option`,{value:`20`,children:`20`}),(0,W.jsx)(`option`,{value:`50`,children:`50`}),(0,W.jsx)(`option`,{value:`100`,children:`100`})]})]}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:p,children:[p?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(Ze,{size:15}),` `,`Search`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>void x(),disabled:!w,children:[(0,W.jsx)(_e,{size:15}),` `,`Previous page`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>void b(),disabled:!T,children:[(0,W.jsx)(ve,{size:15}),` `,`Next page`]})]})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{className:`avatar-col`}),(0,W.jsx)(`th`,{children:`User ID`}),(0,W.jsx)(`th`,{children:`Phone`}),(0,W.jsx)(`th`,{children:`Username`}),(0,W.jsx)(`th`,{children:`Name`}),(0,W.jsx)(`th`,{children:`Login email`}),(0,W.jsx)(`th`,{children:`Device`}),(0,W.jsx)(`th`,{children:`Last active`}),(0,W.jsx)(`th`,{children:`Premium`}),(0,W.jsx)(`th`,{children:`Verified`}),(0,W.jsx)(`th`,{children:`Frozen`}),(0,W.jsx)(`th`,{children:`Updated`}),(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[a?.rows.map(t=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`avatar-col`,children:(0,W.jsx)(`button`,{className:`avatar-link`,type:`button`,onClick:()=>e(`/accounts/${t.ID}`),"aria-label":`Open account ${t.ID}`,children:(0,W.jsx)(yn,{id:t.ID,firstName:t.FirstName,lastName:t.LastName,username:t.Username})})}),(0,W.jsx)(`td`,{className:`mono`,children:t.ID}),(0,W.jsx)(`td`,{children:gt(t.Phone)}),(0,W.jsx)(`td`,{children:(0,W.jsx)(zt,{username:t.Username,collectibles:t.Collectibles})}),(0,W.jsx)(`td`,{children:_t(t)}),(0,W.jsx)(`td`,{children:t.LoginEmail||(0,W.jsx)(`span`,{className:`muted-cell`,children:`None`})}),(0,W.jsx)(`td`,{children:t.DeviceCount}),(0,W.jsx)(`td`,{children:U(t.LastActiveAt)}),(0,W.jsx)(`td`,{children:t.PremiumUntil>0?(0,W.jsxs)(q,{tone:`good`,children:[`Premium`,` `,yt(t.PremiumUntil)]}):(0,W.jsx)(q,{children:`None`})}),(0,W.jsxs)(`td`,{children:[t.Verified?(0,W.jsx)(q,{tone:`good`,children:`Verified`}):(0,W.jsx)(q,{children:`Not verified`}),` `,(0,W.jsx)(xn,{scam:t.Scam,fake:t.Fake})]}),(0,W.jsx)(`td`,{children:t.Frozen?(0,W.jsx)(q,{tone:`danger`,children:`Frozen`}):(0,W.jsx)(q,{children:`Normal`})}),(0,W.jsx)(`td`,{children:U(t.UpdatedAt)}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/accounts/${t.ID}`),children:[`Details`,` `,(0,W.jsx)(ve,{size:14})]})})]},t.ID)),(!a||a.rows.length===0)&&(0,W.jsx)(It,{colSpan:12})]})]})})]})}function Ln({navigate:e}){let[t,n]=(0,g.useState)([]),[r,i]=(0,g.useState)(!1),[a,o]=(0,g.useState)(0),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(``);async function d(e=!1){c(!0),u(``);let t=new URLSearchParams({limit:`20`,offset:String(e?a:0)});try{let r=await k.sharedDeviceGroups(t),a=r.rows??[];n(t=>e?[...t,...a]:a),o(r.next_offset),i(!!r.has_more)}catch(e){u(O(e))}finally{c(!1)}}(0,g.useEffect)(()=>{d(!1)},[]);let f=t.reduce((e,t)=>e+t.AccountCount,0);return(0,W.jsxs)(Mt,{title:`Shared Devices`,eyebrow:`Multi-account signal — device/IP overlap across different accounts`,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>e(`/accounts`),children:[(0,W.jsx)(ue,{size:15}),` `,`Back to accounts`]}),(0,W.jsxs)(`button`,{className:`btn`,type:`button`,onClick:()=>d(!1),disabled:s,children:[(0,W.jsx)(Ye,{size:15,className:s?`spin`:``}),` `,`Refresh`]})]}),children:[l&&(0,W.jsx)(K,{children:l}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Device groups on page`,value:String(t.length)}),(0,W.jsx)(J,{label:`Accounts flagged on page`,value:String(f),tone:`warn`})]}),(0,W.jsxs)(`p`,{className:`about-text`,children:[`Each card below is a device fingerprint (device model + OS + platform + IP) that more than one account has authorized from. `,`device_model/system_version are self-reported by the client, and IP alone can collide innocently -- use this as a lead, not a verdict.`]}),(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[t.map(t=>(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:t.DeviceModel||`Unknown device`,text:`${t.Platform||`unknown platform`} ${t.SystemVersion} · ${t.IP} · last active ${U(t.LastActiveAt)}`,action:(0,W.jsxs)(q,{tone:`warn`,children:[(0,W.jsx)(it,{size:12}),` `,`${t.AccountCount} accounts`]})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{className:`avatar-col`}),(0,W.jsx)(`th`,{children:`User ID`}),(0,W.jsx)(`th`,{children:`Phone`}),(0,W.jsx)(`th`,{children:`Username`}),(0,W.jsx)(`th`,{children:`Name`}),(0,W.jsx)(`th`,{children:`Active from this device`}),(0,W.jsx)(`th`,{})]})}),(0,W.jsx)(`tbody`,{children:t.Accounts.map(t=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`avatar-col`,children:(0,W.jsx)(`button`,{className:`avatar-link`,type:`button`,onClick:()=>e(`/accounts/${t.UserID}`),"aria-label":`Open account ${t.UserID}`,children:(0,W.jsx)(yn,{id:t.UserID,firstName:t.FirstName,lastName:t.LastName,username:t.Username})})}),(0,W.jsx)(`td`,{className:`mono`,children:t.UserID}),(0,W.jsx)(`td`,{children:gt(t.Phone)}),(0,W.jsx)(`td`,{children:H(t.Username)||`-`}),(0,W.jsx)(`td`,{children:_t(t)||`-`}),(0,W.jsx)(`td`,{children:U(t.ActiveAt)}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/accounts/${t.UserID}`),children:[`Details`,` `,(0,W.jsx)(ve,{size:14})]})})]},t.UserID))})]})})]},`${t.DeviceModel}|${t.SystemVersion}|${t.Platform}|${t.IP}`)),t.length===0&&(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsx)(`table`,{className:`data-table`,children:(0,W.jsx)(`tbody`,{children:(0,W.jsx)(It,{colSpan:7})})})})]}),r&&(0,W.jsx)(`div`,{className:`toolbar`,children:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>d(!0),disabled:s,children:[s?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(ge,{size:15}),` `,`Load more`]})})]})}function Rn({label:e,value:t,onChange:n}){let[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)([]),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(``);async function d(){c(!0),u(``);let e=new URLSearchParams({limit:`20`});r.trim()&&e.set(`q`,r.trim());try{o((await k.accounts(e)).rows)}catch(e){u(O(e))}finally{c(!1)}}return(0,g.useEffect)(()=>{d()},[]),(0,W.jsxs)(`div`,{className:`entity-picker`,children:[(0,W.jsxs)(`div`,{className:`picker-head`,children:[(0,W.jsx)(`span`,{children:e}),t?(0,W.jsxs)(`button`,{className:`link-button`,type:`button`,onClick:()=>n(null),children:[(0,W.jsx)(ht,{size:13}),` `,`Clear`]}):null]}),t?(0,W.jsxs)(`div`,{className:`selected-entity`,children:[(0,W.jsx)(he,{size:15}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`strong`,{children:_t(t)}),(0,W.jsx)(`span`,{className:`mono`,children:t.ID})]}),(0,W.jsx)(`span`,{children:H(t.Username)||gt(t.Phone)||`-`})]}):null,(0,W.jsxs)(`div`,{className:`picker-search`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),d())},placeholder:`Search user_id / phone / username`}),(0,W.jsx)(`button`,{className:`btn compact-btn`,type:`button`,onClick:d,disabled:s,children:s?(0,W.jsx)(L,{size:14,className:`spin`}):`Search`})]}),l&&(0,W.jsx)(`div`,{className:`picker-error`,children:l}),(0,W.jsxs)(`div`,{className:`picker-results`,children:[a.map(e=>(0,W.jsxs)(`button`,{className:`picker-row ${t?.ID===e.ID?`selected`:``}`,type:`button`,onClick:()=>n(e),children:[(0,W.jsx)(`span`,{className:`mono`,children:e.ID}),(0,W.jsx)(`strong`,{children:_t(e)}),(0,W.jsx)(`span`,{children:H(e.Username)||gt(e.Phone)||`-`}),e.Verified?(0,W.jsx)(q,{tone:`good`,children:`Verified`}):(0,W.jsx)(q,{children:`Regular`})]},e.ID)),a.length===0&&!s?(0,W.jsx)(`div`,{className:`picker-empty`,children:`No results`}):null]})]})}function zn({label:e,selected:t,onChange:n}){let[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)([]),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(``);async function d(){c(!0),u(``);let e=new URLSearchParams({limit:`20`});r.trim()&&e.set(`q`,r.trim());try{o((await k.accounts(e)).rows)}catch(e){u(O(e))}finally{c(!1)}}(0,g.useEffect)(()=>{d()},[]);function f(e){t.some(t=>t.ID===e.ID)?n(t.filter(t=>t.ID!==e.ID)):n([...t,e])}function p(e){n(t.filter(t=>t.ID!==e))}return(0,W.jsxs)(`div`,{className:`entity-picker`,children:[(0,W.jsxs)(`div`,{className:`picker-head`,children:[(0,W.jsx)(`span`,{children:e}),t.length>0?(0,W.jsxs)(`button`,{className:`link-button`,type:`button`,onClick:()=>n([]),children:[(0,W.jsx)(ht,{size:13}),` `,`Clear all`]}):null]}),t.length>0?(0,W.jsx)(`div`,{className:`picker-chip-list`,children:t.map(e=>(0,W.jsxs)(`span`,{className:`picker-chip`,children:[_t(e),` `,(0,W.jsx)(`span`,{className:`mono`,children:e.ID}),(0,W.jsx)(`button`,{type:`button`,onClick:()=>p(e.ID),"aria-label":`Remove ${e.ID}`,children:(0,W.jsx)(ht,{size:12})})]},e.ID))}):null,(0,W.jsxs)(`div`,{className:`picker-search`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),d())},placeholder:`Search user_id / phone / username`}),(0,W.jsx)(`button`,{className:`btn compact-btn`,type:`button`,onClick:d,disabled:s,children:s?(0,W.jsx)(L,{size:14,className:`spin`}):`Search`})]}),l&&(0,W.jsx)(`div`,{className:`picker-error`,children:l}),(0,W.jsxs)(`div`,{className:`picker-results`,children:[a.map(e=>{let n=t.some(t=>t.ID===e.ID);return(0,W.jsxs)(`button`,{className:`picker-row ${n?`selected`:``}`,type:`button`,onClick:()=>f(e),children:[(0,W.jsx)(`span`,{className:`mono`,children:e.ID}),(0,W.jsx)(`strong`,{children:_t(e)}),(0,W.jsx)(`span`,{children:H(e.Username)||gt(e.Phone)||`-`}),n?(0,W.jsx)(he,{size:15}):null]},e.ID)}),a.length===0&&!s?(0,W.jsx)(`div`,{className:`picker-empty`,children:`No results`}):null]})]})}function Bn({label:e,value:t,onChange:n}){let[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)([]),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(``);async function d(){c(!0),u(``);let e=new URLSearchParams({limit:`20`});r.trim()&&e.set(`q`,r.trim().replace(/^@/,``));try{o((await k.bots(e)).rows??[])}catch(e){u(O(e))}finally{c(!1)}}return(0,g.useEffect)(()=>{d()},[]),(0,W.jsxs)(`div`,{className:`entity-picker`,children:[(0,W.jsxs)(`div`,{className:`picker-head`,children:[(0,W.jsx)(`span`,{children:e}),t?(0,W.jsxs)(`button`,{className:`link-button`,type:`button`,onClick:()=>n(null),children:[(0,W.jsx)(ht,{size:13}),` `,`Clear`]}):null]}),t?(0,W.jsxs)(`div`,{className:`selected-entity`,children:[(0,W.jsx)(he,{size:15}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`strong`,{children:t.FirstName||`-`}),(0,W.jsx)(`span`,{className:`mono`,children:t.ID})]}),(0,W.jsx)(`span`,{children:H(t.Username)||`-`})]}):null,(0,W.jsxs)(`div`,{className:`picker-search`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),d())},placeholder:`Bot username or id`}),(0,W.jsx)(`button`,{className:`btn compact-btn`,type:`button`,onClick:d,disabled:s,children:s?(0,W.jsx)(L,{size:14,className:`spin`}):`Search`})]}),l&&(0,W.jsx)(`div`,{className:`picker-error`,children:l}),(0,W.jsxs)(`div`,{className:`picker-results`,children:[a.map(e=>(0,W.jsxs)(`button`,{className:`picker-row ${t?.ID===e.ID?`selected`:``}`,type:`button`,onClick:()=>n(e),children:[(0,W.jsx)(`span`,{className:`mono`,children:e.ID}),(0,W.jsx)(`strong`,{children:e.FirstName||`-`}),(0,W.jsx)(`span`,{children:H(e.Username)||`-`}),e.System?(0,W.jsx)(q,{tone:`warn`,children:`System`}):(0,W.jsx)(q,{children:`Regular`})]},e.ID)),a.length===0&&!s?(0,W.jsx)(`div`,{className:`picker-empty`,children:`No results`}):null]})]})}function Vn({label:e,value:t,onChange:n}){let[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)([]),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(``);async function d(){c(!0),u(``);let e=new URLSearchParams({limit:`20`});r.trim()&&e.set(`q`,r.trim());try{o((await k.channels(e)).rows)}catch(e){u(O(e))}finally{c(!1)}}return(0,g.useEffect)(()=>{d()},[]),(0,W.jsxs)(`div`,{className:`entity-picker`,children:[(0,W.jsxs)(`div`,{className:`picker-head`,children:[(0,W.jsx)(`span`,{children:e}),t?(0,W.jsxs)(`button`,{className:`link-button`,type:`button`,onClick:()=>n(null),children:[(0,W.jsx)(ht,{size:13}),` `,`Clear`]}):null]}),t?(0,W.jsxs)(`div`,{className:`selected-entity`,children:[(0,W.jsx)(he,{size:15}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`strong`,{children:t.Title||`-`}),(0,W.jsx)(`span`,{className:`mono`,children:t.ID})]}),(0,W.jsx)(`span`,{children:H(t.Username)||vt(t)})]}):null,(0,W.jsxs)(`div`,{className:`picker-search`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),d())},placeholder:`Search channel_id / username / title`}),(0,W.jsx)(`button`,{className:`btn compact-btn`,type:`button`,onClick:d,disabled:s,children:s?(0,W.jsx)(L,{size:14,className:`spin`}):`Search`})]}),l&&(0,W.jsx)(`div`,{className:`picker-error`,children:l}),(0,W.jsxs)(`div`,{className:`picker-results`,children:[a.map(e=>(0,W.jsxs)(`button`,{className:`picker-row ${t?.ID===e.ID?`selected`:``}`,type:`button`,onClick:()=>n(e),children:[(0,W.jsx)(`span`,{className:`mono`,children:e.ID}),(0,W.jsx)(`strong`,{children:e.Title||`-`}),(0,W.jsx)(`span`,{children:H(e.Username)||vt(e)}),e.Verified?(0,W.jsx)(q,{tone:`good`,children:`Verified`}):(0,W.jsx)(q,{children:vt(e)})]},e.ID)),a.length===0&&!s?(0,W.jsx)(`div`,{className:`picker-empty`,children:`No results`}):null]})]})}function Hn({onClose:e,onMinted:t}){let[n,r]=(0,g.useState)(`vault`),[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(null),[c,l]=(0,g.useState)(``),[u,d]=(0,g.useState)(`XTR`),[f,p]=(0,g.useState)(``),[m,h]=(0,g.useState)(!1),[_,v]=(0,g.useState)(`TON`),[y,b]=(0,g.useState)(``),[x,S]=(0,g.useState)(!1),[C,w]=(0,g.useState)(``),[T,E]=(0,g.useState)(``),[D,O]=(0,g.useState)(``),k=Ot(f,u),A=m?Ot(y,_):`0`,j=k===null,M=m&&A===null,N=c.trim()!==``&&f.trim()!==``&&!j&&!M&&(n===`vault`||(n===`user`?i!==null:o!==null));function P(){let e={username:c.trim().replace(/^@/,``),currency:u,amount:k??`0`};if(n===`user`&&i&&(e.owner_user_id=String(i.ID)),n===`channel`&&o&&(e.owner_channel_id=String(o.ID)),m&&(e.crypto_currency=_,e.crypto_amount=A??`0`),C.trim()&&(e.url=C.trim()),T){let t=Date.parse(`${T}T${D||`00:00`}:00Z`);Number.isFinite(t)&&(e.purchase_date=Math.floor(t/1e3))}return e}return(0,pn.createPortal)((0,W.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,W.jsxs)(`section`,{className:`modal command-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":`Mint a collectible username`,children:[(0,W.jsxs)(`div`,{className:`modal-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`eyebrow`,children:`NFT usernames`}),(0,W.jsx)(`h2`,{children:`Mint a collectible username`})]}),(0,W.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:e,"aria-label":`Close`,children:(0,W.jsx)(ht,{size:15})})]}),(0,W.jsxs)(`div`,{className:`command-body`,children:[(0,W.jsxs)(`div`,{className:`mint-field-group`,children:[(0,W.jsx)(`div`,{className:`mint-field-group-label`,children:`1. Username`}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Username`}),(0,W.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),placeholder:`durov`})]})]}),(0,W.jsxs)(`div`,{className:`mint-field-group`,children:[(0,W.jsx)(`div`,{className:`mint-field-group-label`,children:`2. Owner`}),(0,W.jsxs)(`div`,{className:`toolbar`,role:`group`,"aria-label":`Owner type`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`btn ${n===`vault`?`primary`:``}`,onClick:()=>r(`vault`),children:[(0,W.jsx)(mt,{size:15}),` `,`Vault (no owner)`]}),(0,W.jsx)(`button`,{type:`button`,className:`btn ${n===`user`?`primary`:``}`,onClick:()=>r(`user`),children:`User owner`}),(0,W.jsx)(`button`,{type:`button`,className:`btn ${n===`channel`?`primary`:``}`,onClick:()=>r(`channel`),children:`Channel owner`})]}),n===`user`&&(0,W.jsx)(Rn,{label:`User owner`,value:i,onChange:a}),n===`channel`&&(0,W.jsx)(Vn,{label:`Channel owner`,value:o,onChange:s}),n===`vault`&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Mints the asset unassigned; issue it to someone later from the asset page.`})]}),(0,W.jsxs)(`div`,{className:`mint-field-group`,children:[(0,W.jsx)(`div`,{className:`mint-field-group-label`,children:`3. Price`}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`A record of what it was sold for -- minting doesn't charge anyone.`}),(0,W.jsxs)(`div`,{className:`bot-create-fields`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Currency`}),(0,W.jsxs)(`select`,{value:u,onChange:e=>d(e.target.value),children:[(0,W.jsx)(`option`,{value:`XTR`,children:`XTR`}),(0,W.jsx)(`option`,{value:`TON`,children:`TON`}),(0,W.jsx)(`option`,{value:`USD`,children:`USD`})]})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Amount (${u})`}),(0,W.jsx)(`input`,{value:f,onChange:e=>p(e.target.value),inputMode:`decimal`,placeholder:`1000`})]})]}),f.trim()!==``&&!j&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Clients will show: ${Dt(k??`0`,u)}.`}),j&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not a valid ${u} amount: digits only, at most ${String(wt(u))} decimal places.`}),(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:m,onChange:e=>h(e.target.checked)}),` Also record a TON price`]}),m&&(0,W.jsxs)(`div`,{className:`bot-create-fields`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Crypto currency`}),(0,W.jsx)(`select`,{value:_,onChange:e=>v(e.target.value),children:(0,W.jsx)(`option`,{value:`TON`,children:`TON`})})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Crypto amount (${_})`}),(0,W.jsx)(`input`,{value:y,onChange:e=>b(e.target.value),inputMode:`decimal`,placeholder:`12.5`})]})]}),M&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not a valid ${_} amount: digits only, at most ${String(wt(_))} decimal places.`})]}),(0,W.jsxs)(`div`,{className:`mint-field-group`,children:[(0,W.jsx)(`button`,{type:`button`,className:`link-button`,onClick:()=>S(e=>!e),children:x?`Hide marketplace record`:`+ Add marketplace record (optional)`}),x&&(0,W.jsxs)(`div`,{className:`bot-create-fields`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Marketplace URL`}),(0,W.jsx)(`input`,{value:C,onChange:e=>w(e.target.value),placeholder:`https://fragment.com/username/durov`})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Purchase date (UTC)`}),(0,W.jsx)(`input`,{value:T,onChange:e=>E(e.target.value),type:`date`})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Purchase time (UTC)`}),(0,W.jsx)(`input`,{value:D,onChange:e=>O(e.target.value),type:`time`,step:60,disabled:!T})]})]})]})]}),(0,W.jsxs)(`div`,{className:`modal-actions`,children:[(0,W.jsx)(`button`,{className:`btn`,type:`button`,onClick:e,children:`Close`}),(0,W.jsx)(X,{disabled:!N,label:`Mint username`,icon:(0,W.jsx)(Ge,{size:15}),tone:`neutral`,path:`/api/actions/mint-collectible-username`,payload:P,onDone:t})]})]})}),document.body)}function Un({navigate:e}){let[t,n]=(0,g.useState)(`all`),[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)(`50`),[s,c]=(0,g.useState)([]),[l,u]=(0,g.useState)(!1),[d,f]=(0,g.useState)(``),[p,m]=(0,g.useState)(!1),[h,_]=(0,g.useState)(``),[v,y]=(0,g.useState)(!1);async function b(e=!1){m(!0),_(``);let n=new URLSearchParams({limit:a});t!==`all`&&n.set(`status`,t),r.trim()&&n.set(`q`,r.trim().replace(/^@/,``)),e&&d&&n.set(`before_id`,d);try{let t=await k.collectibleUsernames(n),r=t.rows??[];c(t=>e?[...t,...r]:r),f(t.next_before_id??``),u(!!t.has_more)}catch(e){_(O(e))}finally{m(!1)}}(0,g.useEffect)(()=>{b(!1)},[]);let x=s.filter(e=>e.Status===`vault`).length,S=s.filter(e=>e.Status===`owned`).length,C=s.filter(e=>e.Status===`burned`).length;return(0,W.jsxs)(Mt,{title:`Collectible usernames`,eyebrow:`NFT usernames / Registry`,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`button`,onClick:()=>y(!0),children:[(0,W.jsx)(Ge,{size:15}),` `,`Mint username`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>b(!1),disabled:p,children:[(0,W.jsx)(Ye,{size:15,className:p?`spin`:``}),` `,`Refresh`]})]}),children:[h&&(0,W.jsx)(K,{children:h}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Loaded rows`,value:String(s.length)}),(0,W.jsx)(J,{label:`In vault`,value:String(x)}),(0,W.jsx)(J,{label:`Held by owners`,value:String(S),tone:`good`}),(0,W.jsx)(J,{label:`Burned`,value:String(C),tone:C?`danger`:`neutral`})]}),(0,W.jsx)(Nt,{children:(0,W.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),b(!1)},children:[(0,W.jsxs)(`label`,{className:`searchbox`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),placeholder:`Search by username`})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Status`}),(0,W.jsxs)(`select`,{value:t,onChange:e=>n(e.target.value),children:[(0,W.jsx)(`option`,{value:`all`,children:`All statuses`}),(0,W.jsx)(`option`,{value:`vault`,children:`Vault`}),(0,W.jsx)(`option`,{value:`owned`,children:`Owned`}),(0,W.jsx)(`option`,{value:`burned`,children:`Burned`})]})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Limit`}),(0,W.jsx)(`input`,{className:`small-input`,value:a,onChange:e=>o(e.target.value),type:`number`,min:`1`,max:`200`})]}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:p,children:[p?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(Ze,{size:15}),` `,`Search`]})]})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`Username`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Owner`}),(0,W.jsx)(`th`,{children:`Price`}),(0,W.jsx)(`th`,{children:`Purchase date (UTC)`}),(0,W.jsx)(`th`,{children:`Transfers`}),(0,W.jsx)(`th`,{children:`Updated`}),(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[s.map(t=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{children:(0,W.jsx)(`strong`,{children:H(t.Username)})}),(0,W.jsx)(`td`,{children:(0,W.jsx)(Wn,{status:t.Status})}),(0,W.jsx)(`td`,{children:Gn(t,`Vault`)}),(0,W.jsx)(`td`,{className:`mono`,children:Kn(t)}),(0,W.jsx)(`td`,{children:U(t.PurchaseDate)||`-`}),(0,W.jsx)(`td`,{className:`mono`,children:t.TransferCount}),(0,W.jsx)(`td`,{children:U(t.UpdatedAt)||`-`}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`button`,{className:`row-link`,type:`button`,onClick:()=>e(`/collectible-usernames/${t.ID}`),children:[(0,W.jsx)(de,{size:14}),` `,`Details`,` `,(0,W.jsx)(ve,{size:14})]})})]},t.ID)),s.length===0&&(0,W.jsx)(It,{colSpan:8})]})]})}),l&&(0,W.jsx)(`div`,{className:`toolbar`,children:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>b(!0),disabled:p,children:[p?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(ge,{size:15}),` `,`Load more`]})}),v&&(0,W.jsx)(Hn,{onClose:()=>y(!1),onMinted:()=>void b(!1)})]})}function Wn({status:e}){return e===`owned`?(0,W.jsx)(q,{tone:`good`,children:`Owned`}):e===`burned`?(0,W.jsxs)(q,{tone:`danger`,children:[(0,W.jsx)(Oe,{size:12}),` `,`Burned`]}):(0,W.jsxs)(q,{children:[(0,W.jsx)(mt,{size:12}),` `,`Vault`]})}function Gn(e,t){return!e.OwnerPeerType||e.OwnerPeerID===``||e.OwnerPeerID===`0`?t:`${H(e.OwnerUsername)||e.OwnerName||e.OwnerPeerID} · ${e.OwnerPeerType}:${e.OwnerPeerID}`}function Kn(e){let t=Dt(e.Amount,e.Currency);return e.CryptoCurrency&&e.CryptoAmount&&e.CryptoAmount!==`0`?`${t} (${Dt(e.CryptoAmount,e.CryptoCurrency)})`:t}function qn({id:e,navigate:t}){let[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(!1),[c,l]=(0,g.useState)(`profile`),[u,d]=(0,g.useState)(`user`),[f,p]=(0,g.useState)(null),[m,h]=(0,g.useState)(null);async function _(){s(!0),a(``);try{r(await k.collectibleUsername(e))}catch(e){a(O(e))}finally{s(!1)}}if((0,g.useEffect)(()=>{_(),l(`profile`)},[e]),i&&!n)return(0,W.jsx)(K,{children:i});if(!n)return(0,W.jsx)(Lt,{label:o?`Loading collectible username…`:`Waiting for data`});let v=n.asset,y=n.transfers??[],b=`Vault`,x=!!v.OwnerPeerType&&v.OwnerPeerID!==``&&v.OwnerPeerID!==`0`,S=v.Status===`burned`;function C(){x&&t(v.OwnerPeerType===`channel`?`/channels/${v.OwnerPeerID}`:`/accounts/${v.OwnerPeerID}`)}function w(){let e={username:v.Username};return u===`user`&&f&&(e.to_user_id=String(f.ID)),u===`channel`&&m&&(e.to_channel_id=String(m.ID)),e}let T=[{key:`profile`,label:`Profile & Status`,icon:(0,W.jsx)(oe,{size:15})},{key:`actions`,label:`Actions & Management`,icon:(0,W.jsx)(V,{size:15})}];return(0,W.jsxs)(Mt,{title:`Collectible ${H(v.Username)}`,eyebrow:`NFT usernames / Asset`,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>t(`/collectible-usernames`),children:[(0,W.jsx)(ue,{size:15}),` `,`Back to list`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:_,disabled:o,children:[(0,W.jsx)(Ye,{size:15,className:o?`spin`:``}),` `,`Refresh`]})]}),children:[i&&(0,W.jsx)(K,{children:i}),(0,W.jsxs)(`section`,{className:`entity-head`,children:[(0,W.jsx)(`div`,{className:`entity-head-main`,children:(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`entity-title`,children:H(v.Username)}),(0,W.jsx)(`div`,{className:`entity-subtitle`,children:`Asset #${v.ID}`})]})}),(0,W.jsxs)(`div`,{className:`entity-badges`,children:[(0,W.jsx)(Wn,{status:v.Status}),(0,W.jsx)(q,{tone:v.TransferCount>0?`warn`:`neutral`,children:`${v.TransferCount} transfers`}),v.Status===`owned`&&(0,W.jsx)(q,{tone:v.RegistryActive?`good`:`warn`,children:v.RegistryActive?`Active in profile`:`Hidden in profile`})]})]}),(0,W.jsx)(`div`,{className:`toolbar`,role:`group`,"aria-label":`Asset sections`,children:T.map(e=>(0,W.jsxs)(`button`,{className:`btn icon-text ${c===e.key?`primary`:``}`,type:`button`,"aria-pressed":c===e.key,onClick:()=>l(e.key),children:[e.icon,` `,e.label]},e.key))}),c===`profile`&&(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Owner`,value:Gn(v,b)}),(0,W.jsx)(Y,{label:`Price`,value:Kn(v),mono:!0}),(0,W.jsx)(Y,{label:`Purchase date (UTC)`,value:U(v.PurchaseDate)||`-`}),(0,W.jsx)(Y,{label:`Original owner`,value:Xn(v.OriginalOwnerPeerType,v.OriginalOwnerPeerID,b,v.OriginalOwnerUsername)}),(0,W.jsx)(Y,{label:`Transfers`,value:String(v.TransferCount),mono:!0}),(0,W.jsx)(Y,{label:`Created`,value:U(v.CreatedAt)||`-`}),(0,W.jsx)(Y,{label:`Updated`,value:U(v.UpdatedAt)||`-`})]}),(0,W.jsxs)(`div`,{className:`toolbar`,children:[x&&(0,W.jsx)(`button`,{className:`row-link`,type:`button`,onClick:C,children:v.OwnerPeerType===`channel`?`Open owner channel`:`Open owner account`}),v.URL&&(0,W.jsxs)(`a`,{className:`row-link`,href:v.URL,target:`_blank`,rel:`noreferrer noopener`,children:[(0,W.jsx)(Ce,{size:14}),` `,`Open marketplace page`]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Provenance history`,text:`Mint, transfer, revoke and burn events in chronological order.`,action:(0,W.jsx)(Xe,{size:16})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`ID`}),(0,W.jsx)(`th`,{children:`Event`}),(0,W.jsx)(`th`,{children:`From`}),(0,W.jsx)(`th`,{children:`To`}),(0,W.jsx)(`th`,{children:`Price`}),(0,W.jsx)(`th`,{children:`Actor`}),(0,W.jsx)(`th`,{children:`Reason`}),(0,W.jsx)(`th`,{children:`Time`})]})}),(0,W.jsxs)(`tbody`,{children:[y.map(e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`mono`,children:e.ID}),(0,W.jsx)(`td`,{children:(0,W.jsx)(Yn,{kind:e.Kind})}),(0,W.jsx)(`td`,{className:`mono`,children:Xn(e.FromPeerType,e.FromPeerID,b,e.FromUsername)}),(0,W.jsx)(`td`,{className:`mono`,children:Xn(e.ToPeerType,e.ToPeerID,b,e.ToUsername)}),(0,W.jsx)(`td`,{className:`mono`,children:e.Amount&&e.Amount!==`0`?Dt(e.Amount,e.Currency):`-`}),(0,W.jsx)(`td`,{children:e.Actor||`-`}),(0,W.jsx)(`td`,{className:`truncate`,children:e.Reason||`-`}),(0,W.jsx)(`td`,{children:U(e.CreatedAt)||`-`})]},e.ID)),y.length===0&&(0,W.jsx)(It,{colSpan:8})]})]})})]})]}),c===`actions`&&(0,W.jsx)(`div`,{className:`stacked-sections`,children:S?(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Asset Operations`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(`p`,{className:`bot-create-note`,children:`This username is burned — no further operations are possible.`})})]}):(0,W.jsxs)(`div`,{className:`action-groups`,children:[(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Transfer Ownership`,text:`Sent immediately; appended to the provenance history.`}),(0,W.jsxs)(`div`,{className:`card-body`,children:[(0,W.jsxs)(`div`,{className:`toolbar`,role:`group`,"aria-label":`Recipient type`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn ${u===`user`?`primary`:``}`,onClick:()=>d(`user`),children:`To user`}),(0,W.jsx)(`button`,{type:`button`,className:`btn ${u===`channel`?`primary`:``}`,onClick:()=>d(`channel`),children:`To channel`})]}),u===`user`?(0,W.jsx)(Rn,{label:`To user`,value:f,onChange:p}):(0,W.jsx)(Vn,{label:`To channel`,value:m,onChange:h}),(0,W.jsx)(X,{label:`Transfer`,icon:(0,W.jsx)(le,{size:15}),tone:`warn`,path:`/api/actions/transfer-collectible-username`,payload:w,onDone:_})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Revoke To Vault`,text:`Returns the username to the vault; it can be issued again later.`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(`div`,{className:`action-stack`,children:(0,W.jsx)(X,{label:`Revoke to vault`,icon:(0,W.jsx)(ut,{size:15}),tone:`warn`,path:`/api/actions/revoke-collectible-username`,payload:()=>({username:v.Username,burn:!1}),onDone:_})})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Danger Zone`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsxs)(`div`,{className:`danger-zone`,children:[(0,W.jsx)(X,{label:`Burn permanently`,icon:(0,W.jsx)(Oe,{size:15}),tone:`danger`,path:`/api/actions/revoke-collectible-username`,payload:()=>({username:v.Username,burn:!0}),onDone:_}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Irreversible: the username is destroyed and can never be issued again.`}),(0,W.jsx)(X,{label:`Delete record`,icon:(0,W.jsx)(lt,{size:15}),tone:`danger`,path:`/api/actions/delete-collectible-username`,payload:()=>({username:v.Username}),onDone:()=>t(`/collectible-usernames`)}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Erases the asset and its ownership history, and frees the username for a fresh issue. Use this for a username issued by mistake; a burn keeps the history instead.`})]})})]})]})})]})}var Jn={mint:`Mint`,transfer:`Transfer`,burn:`Burn`,revoke:`Revoke`};function Yn({kind:e}){return(0,W.jsx)(q,{tone:e===`burn`?`danger`:e===`revoke`?`warn`:e===`mint`?`good`:`neutral`,children:Jn[e]})}function Xn(e,t,n,r=``){if(!e||t===``||t===`0`)return n;let i=H(r);return i?`${i} · ${e}:${t}`:`${e}:${t}`}function Zn({id:e,navigate:t}){let[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(!1),[c,l]=(0,g.useState)(`profile`),[u,d]=(0,g.useState)(!1),[f,p]=(0,g.useState)(0);async function m(){s(!0),a(``);try{r(await k.channel(e))}catch(e){a(O(e))}finally{s(!1)}}if((0,g.useEffect)(()=>{m(),l(`profile`)},[e]),i)return(0,W.jsx)(K,{children:i});if(!n)return(0,W.jsx)(Lt,{label:o?`Loading channel detail`:`Waiting for data`});let h=n.Channel,_=[{key:`profile`,label:`Profile & Status`,icon:(0,W.jsx)(oe,{size:15})},{key:`actions`,label:`Actions & Management`,icon:(0,W.jsx)(V,{size:15})}];return(0,W.jsxs)(Mt,{title:`${vt(h)} #${h.ID}`,eyebrow:`Channel Profile`,actions:(0,W.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>t(`/channels`),children:[(0,W.jsx)(ue,{size:15}),` `,`Back to list`]}),children:[(0,W.jsxs)(`section`,{className:`entity-head`,children:[(0,W.jsxs)(`div`,{className:`entity-head-main`,children:[(0,W.jsxs)(`div`,{className:`avatar-edit-slot`,children:[(0,W.jsx)(yn,{id:h.ID,kind:`channel`,title:h.Title,size:64,refreshKey:f||void 0}),(0,W.jsx)(`button`,{className:`icon-btn avatar-edit-btn`,type:`button`,"aria-label":`Change avatar`,title:`Change avatar`,onClick:()=>d(!0),children:(0,W.jsx)(Ne,{size:13})})]}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`entity-title`,children:h.Title||`-`}),(0,W.jsxs)(`div`,{className:`entity-subtitle`,children:[H(h.Username)||`No username`,` · `,`Creator ${h.CreatorUserID}`]})]})]}),(0,W.jsxs)(`div`,{className:`entity-badges`,children:[(0,W.jsx)(q,{children:vt(h)}),h.Verified?(0,W.jsx)(q,{tone:`good`,children:`Verified`}):(0,W.jsx)(q,{children:`Not verified`}),(0,W.jsx)(xn,{scam:h.Scam,fake:h.Fake}),h.Deleted?(0,W.jsx)(q,{tone:`danger`,children:`Deleted`}):(0,W.jsx)(q,{children:`Valid`})]})]}),(0,W.jsx)(`div`,{className:`toolbar`,role:`group`,"aria-label":`Channel sections`,children:_.map(e=>(0,W.jsxs)(`button`,{className:`btn icon-text ${c===e.key?`primary`:``}`,type:`button`,"aria-pressed":c===e.key,onClick:()=>l(e.key),children:[e.icon,` `,e.label]},e.key))}),c===`profile`&&(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Channel ID`,value:String(h.ID),mono:!0}),(0,W.jsx)(Y,{label:`access_hash`,value:String(h.AccessHash),mono:!0}),(0,W.jsx)(Y,{label:`Members`,value:`${h.ParticipantsCount} / Admins ${h.AdminsCount}`}),(0,W.jsx)(Y,{label:`Moderation`,value:`Banned ${h.BannedCount} / Kicked ${h.KickedCount}`}),(0,W.jsx)(Y,{label:`Channel flags`,value:`broadcast=${h.Broadcast} megagroup=${h.Megagroup} forum=${h.Forum}`}),(0,W.jsx)(Y,{label:`top / pinned / PTS`,value:`${h.TopMessageID} / ${h.PinnedMessageID} / ${h.PTS}`}),(0,W.jsx)(Y,{label:`Created`,value:yt(h.Date)||`-`}),(0,W.jsx)(Y,{label:`Updated`,value:U(h.UpdatedAt)||`-`})]}),h.About&&(0,W.jsx)(`p`,{className:`about-text`,children:h.About}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Channel Raw Row`,text:`Database read-only snapshot`}),(0,W.jsx)(Rt,{value:n.ChannelJSON})]})]}),c===`actions`&&(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`div`,{className:`action-groups`,children:[(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Verification & Moderation Flags`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsxs)(`div`,{className:`action-stack`,children:[(0,W.jsx)(X,{label:h.Verified?`Clear verified`:`Set verified`,icon:(0,W.jsx)(F,{size:15}),tone:`warn`,path:`/api/actions/set-channel-verified`,payload:()=>({channel_id:h.ID,verified:!h.Verified}),onDone:m}),(0,W.jsx)(Sn,{idKey:`channel_id`,id:h.ID,path:`/api/actions/set-channel-flags`,scam:h.Scam,fake:h.Fake,onDone:m})]})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Settings`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(An,{channel:h,onDone:m})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Username`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(wn,{idKey:`channel_id`,id:h.ID,path:`/api/actions/set-channel-username`,current:h.Username,onDone:m})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Profile Color`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(On,{idKey:`channel_id`,id:h.ID,path:`/api/actions/set-channel-color`,onDone:m})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Emoji Status`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(kn,{idKey:`channel_id`,id:h.ID,path:`/api/actions/set-channel-emoji-status`,onDone:m})})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Recent Admin Actions`,text:`Last 30 audit rows`,action:(0,W.jsx)(Xe,{size:16})}),(0,W.jsx)(Ft,{rows:n.AuditLogs})]})]}),u&&(0,W.jsx)(mn,{kind:`channel`,id:h.ID,onClose:()=>d(!1),onDone:()=>{p(e=>e+1),m()}})]})}var Qn={beforeID:0,beforeUpdatedUS:0};function $n({navigate:e}){let[t,n]=(0,g.useState)(``),[r,i]=(0,g.useState)(50),[a,o]=(0,g.useState)(null),[s,c]=(0,g.useState)([]),[l,u]=(0,g.useState)(Qn),[d,f]=(0,g.useState)(!1),[p,m]=(0,g.useState)(``);async function h(e,t){f(!0),m(``);let n=new URLSearchParams({limit:String(r)});e.trim()&&n.set(`q`,e.trim()),(t.beforeID||t.beforeUpdatedUS)&&(n.set(`before_id`,String(t.beforeID)),n.set(`before_updated_us`,String(t.beforeUpdatedUS)));try{let e=await k.channels(n);return o(e),e}catch(e){return m(O(e)),null}finally{f(!1)}}async function _(){c([]),u(Qn),await h(t,Qn)}async function v(){if(!a?.has_more)return;let e={beforeID:a.next_before_id,beforeUpdatedUS:a.next_before_updated_us};await h(t,e)&&(c(e=>[...e,l]),u(e))}async function y(){if(s.length===0)return;let e=s[s.length-1];await h(t,e)&&(c(e=>e.slice(0,-1)),u(e))}(0,g.useEffect)(()=>{_()},[]);let b=Pn(a?.rows??[]),x=s.length>0&&!d,S=!!a?.has_more&&!d;return(0,W.jsxs)(Mt,{title:`Supergroups and Channels`,eyebrow:a?.listing===!1?`Search results`:`Recently updated`,actions:(0,W.jsxs)(`button`,{className:`btn`,type:`button`,onClick:()=>void _(),disabled:d,children:[(0,W.jsx)(Ye,{size:15}),` `,`Refresh`]}),children:[p&&(0,W.jsx)(K,{children:p}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Entities on page`,value:String(a?.rows.length??0)}),(0,W.jsx)(J,{label:`Supergroups`,value:String(b.megagroups)}),(0,W.jsx)(J,{label:`Channels`,value:String(b.broadcasts)}),(0,W.jsx)(J,{label:`Verified`,value:String(b.verified),tone:`good`})]}),(0,W.jsx)(Nt,{children:(0,W.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),_()},children:[(0,W.jsxs)(`label`,{className:`searchbox`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),placeholder:`Channel ID / username / title`})]}),(0,W.jsxs)(`label`,{className:`gift-page-size`,children:[(0,W.jsx)(`span`,{children:`Limit`}),(0,W.jsxs)(`select`,{value:String(r),onChange:e=>i(Number(e.target.value)),children:[(0,W.jsx)(`option`,{value:`10`,children:`10`}),(0,W.jsx)(`option`,{value:`20`,children:`20`}),(0,W.jsx)(`option`,{value:`50`,children:`50`}),(0,W.jsx)(`option`,{value:`100`,children:`100`})]})]}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:d,children:[d?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(Ze,{size:15}),` `,`Search`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>void y(),disabled:!x,children:[(0,W.jsx)(_e,{size:15}),` `,`Previous page`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>void v(),disabled:!S,children:[(0,W.jsx)(ve,{size:15}),` `,`Next page`]})]})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{className:`avatar-col`}),(0,W.jsx)(`th`,{children:`Channel ID`}),(0,W.jsx)(`th`,{children:`Kind`}),(0,W.jsx)(`th`,{children:`Username`}),(0,W.jsx)(`th`,{children:`Title`}),(0,W.jsx)(`th`,{children:`Members`}),(0,W.jsx)(`th`,{children:`Admins`}),(0,W.jsx)(`th`,{children:`PTS`}),(0,W.jsx)(`th`,{children:`Verified`}),(0,W.jsx)(`th`,{children:`Updated`}),(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[a?.rows.map(t=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`avatar-col`,children:(0,W.jsx)(`button`,{className:`avatar-link`,type:`button`,onClick:()=>e(`/channels/${t.ID}`),"aria-label":`Open channel ${t.ID}`,children:(0,W.jsx)(yn,{id:t.ID,kind:`channel`,title:t.Title})})}),(0,W.jsx)(`td`,{className:`mono`,children:t.ID}),(0,W.jsx)(`td`,{children:vt(t)}),(0,W.jsx)(`td`,{children:H(t.Username)}),(0,W.jsx)(`td`,{children:t.Title}),(0,W.jsx)(`td`,{children:t.ParticipantsCount}),(0,W.jsx)(`td`,{children:t.AdminsCount}),(0,W.jsx)(`td`,{children:t.PTS}),(0,W.jsxs)(`td`,{children:[t.Verified?(0,W.jsx)(q,{tone:`good`,children:`Verified`}):(0,W.jsx)(q,{children:`Not verified`}),` `,(0,W.jsx)(xn,{scam:t.Scam,fake:t.Fake})]}),(0,W.jsx)(`td`,{children:U(t.UpdatedAt)}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/channels/${t.ID}`),children:[`Details`,` `,(0,W.jsx)(ve,{size:14})]})})]},t.ID)),(!a||a.rows.length===0)&&(0,W.jsx)(It,{colSpan:11})]})]})})]})}function er({botID:e,onClose:t}){let[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(!1),[o,s]=(0,g.useState)(``),[c,l]=(0,g.useState)(!1);async function u(){if(!n.trim()){s(`Please enter an operation reason`);return}a(!0),s(``),l(!1);try{let t=await k.action(`/api/actions/export-bot-token`,{command_id:``,reason:n.trim(),confirm:!0,bot_user_id:e}),r=t.details?.token;if(t.error||typeof r!=`string`||!r){s(t.error||`No token returned.`);return}await navigator.clipboard.writeText(r),l(!0)}catch(e){s(O(e))}finally{a(!1)}}return(0,pn.createPortal)((0,W.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,W.jsxs)(`section`,{className:`modal command-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":`Copy bot token`,children:[(0,W.jsxs)(`div`,{className:`modal-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`eyebrow`,children:`Bot`}),(0,W.jsx)(`h2`,{children:`Copy bot token`})]}),(0,W.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:t,disabled:i,"aria-label":`Close`,children:(0,W.jsx)(ht,{size:15})})]}),(0,W.jsxs)(`div`,{className:`command-body`,children:[(0,W.jsx)(`p`,{children:`The token is written straight to your clipboard and is never shown on screen. Paste it wherever it's needed right after copying.`}),(0,W.jsxs)(`label`,{className:`form-field`,children:[(0,W.jsx)(`span`,{children:`Operation reason`}),(0,W.jsx)(`textarea`,{value:n,onChange:e=>r(e.target.value),rows:3,placeholder:`Describe why this token is being retrieved`})]}),o&&(0,W.jsx)(K,{children:o}),c&&(0,W.jsx)(`div`,{className:`secret-reveal`,children:(0,W.jsxs)(`div`,{className:`secret-reveal-label`,children:[(0,W.jsx)(he,{size:14}),` `,`Token copied to clipboard.`]})})]}),(0,W.jsxs)(`div`,{className:`modal-actions`,children:[(0,W.jsx)(`button`,{className:`btn`,type:`button`,onClick:t,disabled:i,children:`Close`}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`button`,onClick:()=>void u(),disabled:i,children:[(0,W.jsx)(be,{size:15}),` `,c?`Copy again`:`Copy token`]})]})]})}),document.body)}function tr({id:e,navigate:t}){let[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(!1),[c,l]=(0,g.useState)(`profile`),[u,d]=(0,g.useState)(!1),[f,p]=(0,g.useState)(0),[m,h]=(0,g.useState)(!1);async function _(){s(!0),a(``);try{r(await k.bot(e))}catch(e){a(O(e))}finally{s(!1)}}if((0,g.useEffect)(()=>{_(),l(`profile`)},[e]),i)return(0,W.jsx)(K,{children:i});if(!n)return(0,W.jsx)(Lt,{label:o?`Loading bot detail`:`Waiting for data`});let v=n.Bot,y=[{key:`profile`,label:`Profile & Status`,icon:(0,W.jsx)(oe,{size:15})},{key:`actions`,label:`Actions & Management`,icon:(0,W.jsx)(V,{size:15})}];return(0,W.jsxs)(Mt,{title:`Bot #${v.ID}`,eyebrow:`Bot Profile`,actions:(0,W.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>t(`/bots`),children:[(0,W.jsx)(ue,{size:15}),` `,`Back to list`]}),children:[(0,W.jsxs)(`section`,{className:`entity-head`,children:[(0,W.jsxs)(`div`,{className:`entity-head-main`,children:[(0,W.jsxs)(`div`,{className:`avatar-edit-slot`,children:[(0,W.jsx)(yn,{id:v.ID,firstName:v.FirstName,username:v.Username,size:64,refreshKey:f||void 0}),(0,W.jsx)(`button`,{className:`icon-btn avatar-edit-btn`,type:`button`,"aria-label":`Change avatar`,title:`Change avatar`,onClick:()=>d(!0),children:(0,W.jsx)(Ne,{size:13})})]}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`entity-title`,children:v.FirstName||`Unnamed bot`}),(0,W.jsx)(`div`,{className:`entity-subtitle`,children:H(v.Username)||`No username`})]})]}),(0,W.jsxs)(`div`,{className:`entity-badges`,children:[(0,W.jsx)(q,{tone:v.System?`warn`:`neutral`,children:v.System?`System`:`User`}),v.Verified?(0,W.jsx)(q,{tone:`good`,children:`Verified`}):(0,W.jsx)(q,{children:`Not verified`}),(0,W.jsx)(xn,{scam:v.Scam,fake:v.Fake})]})]}),(0,W.jsx)(`div`,{className:`toolbar`,role:`group`,"aria-label":`Bot sections`,children:y.map(e=>(0,W.jsxs)(`button`,{className:`btn icon-text ${c===e.key?`primary`:``}`,type:`button`,"aria-pressed":c===e.key,onClick:()=>l(e.key),children:[e.icon,` `,e.label]},e.key))}),c===`profile`&&(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Bot ID`,value:String(v.ID),mono:!0}),(0,W.jsx)(Y,{label:`Owner`,value:v.OwnerUserID>0?`${v.OwnerUserID} ${H(n.OwnerUsername)}`.trim():`None`}),(0,W.jsx)(Y,{label:`Type`,value:v.System?`System`:`User`}),(0,W.jsx)(Y,{label:`Updated`,value:U(v.UpdatedAt)||`-`}),(0,W.jsx)(Y,{label:`Created`,value:U(v.CreatedAt)||`-`})]}),n.About&&(0,W.jsx)(`p`,{className:`about-text`,children:n.About}),n.Description&&n.Description.trim()!==n.About.trim()&&(0,W.jsx)(`p`,{className:`about-text`,children:n.Description})]}),c===`actions`&&(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`div`,{className:`action-groups`,children:[(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Verification & Moderation Flags`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsxs)(`div`,{className:`action-stack`,children:[(0,W.jsx)(X,{label:v.Verified?`Clear verified`:`Set verified`,icon:(0,W.jsx)(F,{size:15}),tone:`neutral`,path:`/api/actions/set-verified`,payload:()=>({user_id:v.ID,verified:!v.Verified}),onDone:_}),(0,W.jsx)(Sn,{idKey:`user_id`,id:v.ID,path:`/api/actions/set-account-flags`,scam:v.Scam,fake:v.Fake,onDone:_})]})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Username`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(wn,{idKey:`user_id`,id:v.ID,path:`/api/actions/set-account-username`,current:v.Username,onDone:_})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Profile Color`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(On,{idKey:`user_id`,id:v.ID,path:`/api/actions/set-account-color`,onDone:_})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Emoji Status`}),(0,W.jsx)(`div`,{className:`card-body`,children:(0,W.jsx)(kn,{idKey:`user_id`,id:v.ID,path:`/api/actions/set-account-emoji-status`,onDone:_})})]}),!v.System&&(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Credentials`}),(0,W.jsxs)(`div`,{className:`card-body`,children:[(0,W.jsx)(`div`,{className:`action-stack`,children:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>h(!0),children:[(0,W.jsx)(be,{size:15}),` `,`Copy token`]})}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Copies straight to the clipboard through a dedicated confirmation step -- the token itself is never shown on this page.`})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Danger Zone`}),(0,W.jsx)(`div`,{className:`card-body`,children:v.System?(0,W.jsx)(`p`,{className:`bot-create-note`,children:`System bots are built in and cannot be deleted.`}):(0,W.jsxs)(`div`,{className:`danger-zone`,children:[(0,W.jsx)(X,{label:`Delete bot`,icon:(0,W.jsx)(lt,{size:15}),tone:`danger`,path:`/api/actions/delete-bot`,payload:()=>({bot_user_id:v.ID}),onDone:()=>t(`/bots`)}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Permanently deletes this user-created bot and invalidates its token. This cannot be undone.`})]})})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Recent Admin Actions`,text:`Last 30 audit rows`,action:(0,W.jsx)(Xe,{size:16})}),(0,W.jsx)(Ft,{rows:n.AuditLogs})]})]}),u&&(0,W.jsx)(mn,{kind:`user`,id:v.ID,onClose:()=>d(!1),onDone:()=>{p(e=>e+1),_()}}),m&&(0,W.jsx)(er,{botID:v.ID,onClose:()=>h(!1)})]})}function nr({onClose:e,onCreated:t}){let[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(``);return(0,pn.createPortal)((0,W.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,W.jsxs)(`section`,{className:`modal command-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":`Create bot`,children:[(0,W.jsxs)(`div`,{className:`modal-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`eyebrow`,children:`Bots`}),(0,W.jsx)(`h2`,{children:`Create bot`})]}),(0,W.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:e,"aria-label":`Close`,children:(0,W.jsx)(ht,{size:15})})]}),(0,W.jsxs)(`div`,{className:`command-body`,children:[(0,W.jsx)(`p`,{children:`Provision a bot account owned by the given user. The token is shown once after confirmation.`}),(0,W.jsxs)(`div`,{className:`bot-create-fields`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Owner user ID`}),(0,W.jsx)(`input`,{value:n,onChange:e=>r(e.target.value),type:`number`,min:`1`,placeholder:`123456789`})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Display name`}),(0,W.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),placeholder:`e.g. Service Bot`,maxLength:64})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Username`}),(0,W.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),placeholder:`my_service_bot`})]})]}),(0,W.jsx)(`span`,{className:`bot-create-note`,children:`Username must be 5-32 characters and end with 'bot'.`})]}),(0,W.jsxs)(`div`,{className:`modal-actions`,children:[(0,W.jsx)(`button`,{className:`btn`,type:`button`,onClick:e,children:`Close`}),(0,W.jsx)(X,{label:`Create bot`,icon:(0,W.jsx)(Ge,{size:15}),tone:`neutral`,path:`/api/actions/create-bot`,payload:()=>({owner_user_id:xt(n),name:i.trim(),username:o.trim().replace(/^@/,``)}),secretField:`token`,onDone:t})]})]})}),document.body)}var rr={beforeID:0};function ir({navigate:e}){let[t,n]=(0,g.useState)(``),[r,i]=(0,g.useState)(50),[a,o]=(0,g.useState)(null),[s,c]=(0,g.useState)([]),[l,u]=(0,g.useState)(rr),[d,f]=(0,g.useState)(!1),[p,m]=(0,g.useState)(``),[h,_]=(0,g.useState)(!1);async function v(e,t){f(!0),m(``);let n=new URLSearchParams({limit:String(r)});e.trim()&&n.set(`q`,e.trim()),t.beforeID&&n.set(`before_id`,String(t.beforeID));try{let e=await k.bots(n);return o(e),e}catch(e){return m(O(e)),null}finally{f(!1)}}async function y(){c([]),u(rr),await v(t,rr)}async function b(){if(!a?.has_more)return;let e={beforeID:a.next_before_id};await v(t,e)&&(c(e=>[...e,l]),u(e))}async function x(){if(s.length===0)return;let e=s[s.length-1];await v(t,e)&&(c(e=>e.slice(0,-1)),u(e))}(0,g.useEffect)(()=>{y()},[]);let S=a?.rows??[],C=S.filter(e=>e.Verified).length,w=S.filter(e=>e.System).length,T=s.length>0&&!d,E=!!a?.has_more&&!d;return(0,W.jsxs)(Mt,{title:`Bots`,eyebrow:a?.listing===!1?`Search results`:`Recently created bots`,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`button`,onClick:()=>_(!0),children:[(0,W.jsx)(Ge,{size:15}),` `,`Create bot`]}),(0,W.jsxs)(`button`,{className:`btn`,type:`button`,onClick:()=>void y(),disabled:d,children:[(0,W.jsx)(Ye,{size:15}),` `,`Refresh`]})]}),children:[p&&(0,W.jsx)(K,{children:p}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Bots on page`,value:String(S.length)}),(0,W.jsx)(J,{label:`Verified`,value:String(C),tone:`good`}),(0,W.jsx)(J,{label:`System`,value:String(w)})]}),(0,W.jsx)(Nt,{children:(0,W.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),y()},children:[(0,W.jsxs)(`label`,{className:`searchbox`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:t,onChange:e=>n(e.target.value),placeholder:`Bot ID / username`})]}),(0,W.jsxs)(`label`,{className:`gift-page-size`,children:[(0,W.jsx)(`span`,{children:`Limit`}),(0,W.jsxs)(`select`,{value:String(r),onChange:e=>i(Number(e.target.value)),children:[(0,W.jsx)(`option`,{value:`10`,children:`10`}),(0,W.jsx)(`option`,{value:`20`,children:`20`}),(0,W.jsx)(`option`,{value:`50`,children:`50`}),(0,W.jsx)(`option`,{value:`100`,children:`100`})]})]}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:d,children:[d?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(Ze,{size:15}),` `,`Search`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>void x(),disabled:!T,children:[(0,W.jsx)(_e,{size:15}),` `,`Previous page`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>void b(),disabled:!E,children:[(0,W.jsx)(ve,{size:15}),` `,`Next page`]})]})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{className:`avatar-col`}),(0,W.jsx)(`th`,{children:`Bot ID`}),(0,W.jsx)(`th`,{children:`Username`}),(0,W.jsx)(`th`,{children:`Name`}),(0,W.jsx)(`th`,{children:`Owner`}),(0,W.jsx)(`th`,{children:`Verified`}),(0,W.jsx)(`th`,{children:`Type`}),(0,W.jsx)(`th`,{children:`Created`}),(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[S.map(t=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`avatar-col`,children:(0,W.jsx)(`button`,{className:`avatar-link`,type:`button`,onClick:()=>e(`/bots/${t.ID}`),"aria-label":`Open bot ${t.ID}`,children:(0,W.jsx)(yn,{id:t.ID,firstName:t.FirstName,username:t.Username})})}),(0,W.jsx)(`td`,{className:`mono`,children:t.ID}),(0,W.jsx)(`td`,{children:H(t.Username)||`-`}),(0,W.jsx)(`td`,{children:t.FirstName||`-`}),(0,W.jsx)(`td`,{className:`mono`,children:t.OwnerUserID>0?t.OwnerUserID:`-`}),(0,W.jsxs)(`td`,{children:[t.Verified?(0,W.jsxs)(q,{tone:`good`,children:[(0,W.jsx)(F,{size:12}),` `,`Verified`]}):(0,W.jsx)(q,{children:`Not verified`}),` `,(0,W.jsx)(xn,{scam:t.Scam,fake:t.Fake})]}),(0,W.jsx)(`td`,{children:t.System?(0,W.jsx)(q,{tone:`warn`,children:`System`}):(0,W.jsx)(q,{children:`User`})}),(0,W.jsx)(`td`,{children:U(t.CreatedAt)}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/bots/${t.ID}`),children:[(0,W.jsx)(fe,{size:14}),` `,`Details`,` `,(0,W.jsx)(ve,{size:14})]})})]},t.ID)),S.length===0&&(0,W.jsx)(It,{colSpan:9})]})]})}),h&&(0,W.jsx)(nr,{onClose:()=>_(!1),onCreated:()=>void y()})]})}function ar({onClose:e,onCreated:t}){let[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(`all`),[o,s]=(0,g.useState)([]),c=(0,g.useMemo)(()=>!n.trim()||i===`selected`&&o.length===0,[n,i,o]);return(0,pn.createPortal)((0,W.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,W.jsxs)(`section`,{className:`modal command-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":`Send broadcast`,children:[(0,W.jsxs)(`div`,{className:`modal-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`eyebrow`,children:`Broadcasts`}),(0,W.jsx)(`h2`,{children:`Send broadcast`})]}),(0,W.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:e,"aria-label":`Close`,children:(0,W.jsx)(ht,{size:15})})]}),(0,W.jsxs)(`div`,{className:`command-body`,children:[(0,W.jsx)(`p`,{children:`Sends a message from the official system account (777000) to all users or to a chosen list. Delivery happens in the background and may take a few minutes for large audiences.`}),(0,W.jsxs)(`label`,{className:`form-field`,children:[(0,W.jsx)(`span`,{children:`Message`}),(0,W.jsx)(`textarea`,{value:n,onChange:e=>r(e.target.value),rows:5,maxLength:4096,placeholder:`What's new...`})]}),(0,W.jsx)(`div`,{className:`bot-create-fields`,children:(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Target`}),(0,W.jsxs)(`select`,{value:i,onChange:e=>a(e.target.value),children:[(0,W.jsx)(`option`,{value:`all`,children:`All users`}),(0,W.jsx)(`option`,{value:`selected`,children:`Selected users`})]})]})}),i===`selected`&&(0,W.jsx)(zn,{label:`Recipients`,selected:o,onChange:s})]}),(0,W.jsxs)(`div`,{className:`modal-actions`,children:[(0,W.jsx)(`button`,{className:`btn`,type:`button`,onClick:e,children:`Close`}),(0,W.jsx)(X,{label:`Send broadcast`,icon:(0,W.jsx)(Qe,{size:15}),tone:`neutral`,path:`/api/actions/create-broadcast`,disabled:c,payload:()=>({message:n.trim(),target_mode:i,user_ids:i===`selected`?o.map(e=>e.ID):void 0}),onDone:t})]})]})}),document.body)}var or={beforeID:0};function sr(){let[e,t]=(0,g.useState)(null),[n,r]=(0,g.useState)([]),[i,a]=(0,g.useState)(or),[o,s]=(0,g.useState)(!1),[c,l]=(0,g.useState)(``),[u,d]=(0,g.useState)(!1);async function f(e){s(!0),l(``);let n=new URLSearchParams({limit:`50`});e.beforeID&&n.set(`before_id`,String(e.beforeID));try{let e=await k.broadcasts(n);return t(e),e}catch(e){return l(O(e)),null}finally{s(!1)}}async function p(){r([]),a(or),await f(or)}async function m(){if(!e?.has_more)return;let t={beforeID:e.next_before_id};await f(t)&&(r(e=>[...e,i]),a(t))}async function h(){if(n.length===0)return;let e=n[n.length-1];await f(e)&&(r(e=>e.slice(0,-1)),a(e))}(0,g.useEffect)(()=>{p()},[]);let _=e?.rows??[],v=_.filter(e=>e.SentCount+e.FailedCount<e.TotalCount).length,y=n.length>0&&!o,b=!!e?.has_more&&!o;return(0,W.jsxs)(Mt,{title:`Broadcasts`,eyebrow:`Announcements sent from the official system account`,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`button`,onClick:()=>d(!0),children:[(0,W.jsx)(Qe,{size:15}),` `,`Send broadcast`]}),(0,W.jsxs)(`button`,{className:`btn`,type:`button`,onClick:()=>void p(),disabled:o,children:[(0,W.jsx)(Ye,{size:15}),` `,`Refresh`]})]}),children:[c&&(0,W.jsx)(K,{children:c}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Campaigns on page`,value:String(_.length)}),(0,W.jsx)(J,{label:`Still delivering`,value:String(v),tone:v>0?`warn`:`neutral`})]}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`ID`}),(0,W.jsx)(`th`,{children:`Message`}),(0,W.jsx)(`th`,{children:`Target`}),(0,W.jsx)(`th`,{children:`Sent`}),(0,W.jsx)(`th`,{children:`Failed`}),(0,W.jsx)(`th`,{children:`Total`}),(0,W.jsx)(`th`,{children:`Created by`}),(0,W.jsx)(`th`,{children:`Created`})]})}),(0,W.jsxs)(`tbody`,{children:[_.map(e=>{let t=e.SentCount+e.FailedCount,n=e.TotalCount>0&&t>=e.TotalCount;return(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`mono`,children:e.ID}),(0,W.jsx)(`td`,{className:`truncate`,children:e.Message}),(0,W.jsx)(`td`,{children:e.TargetMode===`all`?(0,W.jsx)(q,{tone:`warn`,children:`All users`}):(0,W.jsx)(q,{children:`Selected`})}),(0,W.jsx)(`td`,{children:e.SentCount}),(0,W.jsx)(`td`,{children:e.FailedCount>0?(0,W.jsx)(q,{tone:`danger`,children:e.FailedCount}):e.FailedCount}),(0,W.jsx)(`td`,{children:e.TotalCount}),(0,W.jsx)(`td`,{children:e.CreatedBy||`-`}),(0,W.jsxs)(`td`,{children:[U(e.CreatedAt),!n&&(0,W.jsx)(q,{tone:`warn`,children:`Sending`})]})]},e.ID)}),_.length===0&&(0,W.jsx)(It,{colSpan:8})]})]})}),(0,W.jsxs)(`div`,{className:`toolbar`,children:[(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>void h(),disabled:!y,children:[(0,W.jsx)(_e,{size:15}),` `,`Previous page`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>void m(),disabled:!b,children:[o?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(ve,{size:15}),` `,`Next page`]})]}),u&&(0,W.jsx)(ar,{onClose:()=>d(!1),onCreated:()=>void p()})]})}function cr({navigate:e}){let[t,n]=(0,g.useState)(null),[r,i]=(0,g.useState)(``);(0,g.useEffect)(()=>{let e=!1;async function t(){try{let t=await k.dashboard();e||n(t)}catch(t){e||i(t instanceof Error?t.message:`Failed to load dashboard`)}}t();let r=window.setInterval(()=>void t(),15e3);return()=>{e=!0,window.clearInterval(r)}},[]);let a=t?.counts,o=t?.storage,s=t?.host;return(0,W.jsxs)(`div`,{className:`dashboard-layout`,children:[r&&(0,W.jsx)(K,{children:r}),(0,W.jsxs)(lr,{title:`Needs attention`,children:[(0,W.jsx)(ur,{icon:(0,W.jsx)(De,{}),label:`Pending reports`,value:a?St(String(a.PendingReports)):`…`,tone:a&&a.PendingReports>0?`warn`:`good`,href:`/moderation`,navigate:e}),(0,W.jsx)(ur,{icon:(0,W.jsx)(F,{}),label:`Verification requests`,value:a?St(String(a.PendingVerifications)):`…`,tone:a&&a.PendingVerifications>0?`warn`:`good`,href:`/verification`,navigate:e})]}),(0,W.jsxs)(lr,{title:`People & chats`,children:[(0,W.jsx)(ur,{icon:(0,W.jsx)(pt,{}),label:`Users`,value:a?St(String(a.Users)):`…`,href:`/accounts`,navigate:e}),(0,W.jsx)(ur,{icon:(0,W.jsx)(ce,{}),label:`Online now`,value:a?St(String(a.OnlineUsers)):`…`,sub:`last 5 min`,href:`/accounts`,navigate:e}),(0,W.jsx)(ur,{icon:(0,W.jsx)(fe,{}),label:`Bots`,value:a?St(String(a.Bots)):`…`,href:`/bots`,navigate:e}),(0,W.jsx)(ur,{icon:(0,W.jsx)(Je,{}),label:`Channels`,value:a?St(String(a.BroadcastChannels)):`…`,href:`/channels`,navigate:e}),(0,W.jsx)(ur,{icon:(0,W.jsx)(se,{}),label:`Supergroups`,value:a?St(String(a.Supergroups)):`…`,href:`/channels`,navigate:e})]}),(0,W.jsxs)(lr,{title:`Content`,children:[(0,W.jsx)(ur,{icon:(0,W.jsx)(st,{}),label:`Sticker packs`,value:a?St(String(a.StickerSets)):`…`,href:`/stickers`,navigate:e}),(0,W.jsx)(ur,{icon:(0,W.jsx)(at,{}),label:`Emoji packs`,value:a?St(String(a.EmojiSets)):`…`,href:`/emoji`,navigate:e}),(0,W.jsx)(ur,{icon:(0,W.jsx)(Ee,{}),label:`GIFs`,value:a?St(String(a.Gifs)):`…`,sub:`saved by users`,href:`/gif-catalog`,navigate:e}),(0,W.jsx)(ur,{icon:(0,W.jsx)(Se,{}),label:`Media storage used`,value:o?kt(o.PhysicalBytes):`…`,sub:o?`${o.BackendKind} backend`:void 0,href:`/storage`,navigate:e})]}),(0,W.jsxs)(lr,{title:`Server health`,hint:s?.Ready?void 0:`waiting for first sample…`,children:[(0,W.jsx)(dr,{icon:(0,W.jsx)(xe,{}),label:`CPU load`,percent:s?.Ready?s.CPUPercent:void 0,valueText:s?.Ready?`${s.CPUPercent.toFixed(0)}%`:`…`}),(0,W.jsx)(dr,{icon:(0,W.jsx)(ze,{}),label:`RAM used`,percent:s?.Ready&&s.MemTotalBytes>0?s.MemUsedBytes/s.MemTotalBytes*100:void 0,valueText:s?.Ready?kt(String(s.MemUsedBytes)):`…`,sub:s?.Ready?`of ${kt(String(s.MemTotalBytes))}`:void 0}),(0,W.jsx)(dr,{icon:(0,W.jsx)(Ae,{}),label:`Disk free`,percent:s?.Ready&&s.DiskTotalBytes>0?(s.DiskTotalBytes-s.DiskFreeBytes)/s.DiskTotalBytes*100:void 0,valueText:s?.Ready?kt(String(s.DiskFreeBytes)):`…`,sub:s?.Ready?`of ${kt(String(s.DiskTotalBytes))}`:void 0,warnAbove:85})]})]})}function lr({title:e,hint:t,children:n}){return(0,W.jsxs)(`div`,{className:`dashboard-section`,children:[(0,W.jsxs)(`div`,{className:`dashboard-section-title`,children:[e,t&&(0,W.jsx)(`span`,{children:t})]}),(0,W.jsx)(`div`,{className:`dashboard-grid`,children:n})]})}function ur({icon:e,label:t,value:n,sub:r,tone:i=`neutral`,href:a,navigate:o}){let s=i===`neutral`?``:` ${i}`,c=(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`stat-tile-head`,children:[(0,W.jsx)(`span`,{className:`stat-tile-icon`,children:e}),i===`warn`&&(0,W.jsx)(ae,{size:15,className:`stat-tile-open`})]}),(0,W.jsx)(`div`,{className:`stat-tile-value`,children:n}),(0,W.jsx)(`div`,{className:`stat-tile-label`,children:t}),r&&(0,W.jsx)(`div`,{className:`stat-tile-sub`,children:r})]});return a&&o?(0,W.jsx)(`a`,{className:`stat-tile clickable${s}`,href:a,onClick:e=>{e.preventDefault(),o(a)},children:c}):(0,W.jsx)(`div`,{className:`stat-tile${s}`,children:c})}function dr({icon:e,label:t,percent:n,valueText:r,sub:i,warnAbove:a=90}){let o=n===void 0?0:Math.max(0,Math.min(100,n)),s=n===void 0?`neutral`:n>=a?`danger`:n>=a-15?`warn`:`neutral`;return(0,W.jsxs)(`div`,{className:`stat-tile${s===`neutral`?``:` ${s}`}`,children:[(0,W.jsx)(`div`,{className:`stat-tile-head`,children:(0,W.jsx)(`span`,{className:`stat-tile-icon`,children:e})}),(0,W.jsx)(`div`,{className:`stat-tile-value`,children:r}),(0,W.jsx)(`div`,{className:`stat-tile-label`,children:t}),i&&(0,W.jsx)(`div`,{className:`stat-tile-sub`,children:i}),(0,W.jsx)(`div`,{className:`stat-tile-bar`,children:(0,W.jsx)(`span`,{style:{width:`${o}%`}})})]})}function fr({channelID:e,msgID:t,navigate:n}){let[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``);async function s(){o(``);try{i(await k.groupMessage(e,t))}catch(e){o(O(e))}}if((0,g.useEffect)(()=>{s()},[e,t]),a)return(0,W.jsx)(K,{children:a});if(!r)return(0,W.jsx)(Lt,{label:`Loading`});let c=r.Message;return(0,W.jsx)(Mt,{title:`Group Message #${c.ID}`,eyebrow:`Message Detail`,actions:(0,W.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>n(`/messages/groups`),children:[(0,W.jsx)(ue,{size:15}),` `,`Back to group messages`]}),children:(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`section`,{className:`entity-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`entity-title`,children:`Channel / Group ${c.ChannelID}`}),(0,W.jsx)(`div`,{className:`entity-subtitle`,children:`Sender ${c.SenderUserID} · ${yt(c.Date)}`})]}),(0,W.jsxs)(`div`,{className:`entity-badges`,children:[c.Deleted?(0,W.jsx)(q,{tone:`danger`,children:`Deleted`}):(0,W.jsx)(q,{children:`Live`}),c.Pinned&&(0,W.jsx)(q,{tone:`warn`,children:`Pinned`}),c.Post&&(0,W.jsx)(q,{children:`Channel post`}),(0,W.jsxs)(q,{children:[`pts `,c.PTS]})]})]}),(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Message ID`,value:String(c.ID),mono:!0}),(0,W.jsx)(Y,{label:`Channel / Group`,value:String(c.ChannelID),mono:!0}),(0,W.jsx)(Y,{label:`From Peer`,value:`${c.FromPeerType}:${c.FromPeerID}`,mono:!0}),(0,W.jsx)(Y,{label:`Views`,value:String(c.ViewsCount)})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Channel Message Row`,text:`channel_messages read-only snapshot`}),(0,W.jsx)(Rt,{value:r.MessageJSON})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Channel Row`,text:`channels read-only snapshot`}),(0,W.jsx)(Rt,{value:r.ChannelJSON})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Channel Update Events`,text:`durable channel_update_events`}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`PTS`}),(0,W.jsx)(`th`,{children:`Count`}),(0,W.jsx)(`th`,{children:`Type`}),(0,W.jsx)(`th`,{children:`Message ID`}),(0,W.jsx)(`th`,{children:`Sender`}),(0,W.jsx)(`th`,{children:`Time`})]})}),(0,W.jsxs)(`tbody`,{children:[r.UpdateEvents.map(e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{children:e.PTS}),(0,W.jsx)(`td`,{children:e.PTSCount}),(0,W.jsx)(`td`,{children:e.Type}),(0,W.jsx)(`td`,{children:e.MessageID}),(0,W.jsx)(`td`,{children:e.SenderUserID}),(0,W.jsx)(`td`,{children:yt(e.Date)})]},`${e.PTS}-${e.Type}-${e.MessageID}`)),r.UpdateEvents.length===0&&(0,W.jsx)(It,{colSpan:6})]})]})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Event JSON`}),(0,W.jsxs)(`div`,{className:`raw-grid`,children:[r.UpdateEvents.map(e=>(0,W.jsx)(Rt,{value:e.JSON},`${e.PTS}-${e.Type}-json`)),r.UpdateEvents.length===0&&(0,W.jsx)(`div`,{className:`empty-panel`,children:`No results`})]})]})]})})}function pr({navigate:e}){let[t,n]=(0,g.useState)(null),[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(`100`),[l,u]=(0,g.useState)(null),[d,f]=(0,g.useState)(``);async function p(e=!1){if(f(``),!t){f(`Search and select a supergroup or channel first`);return}let n=new URLSearchParams({channel_id:String(t.ID),limit:s});if(e&&l?.rows.length){let e=l.rows[l.rows.length-1];n.set(`before_date`,String(e.Date)),n.set(`before_id`,String(e.ID)),i(String(e.Date)),o(String(e.ID))}else r&&n.set(`before_date`,r),a&&n.set(`before_id`,a);try{u(await k.groupMessages(n))}catch(e){f(O(e))}}function m(e){n(e),i(``),o(``),u(null)}let h=l?.rows??[];return(0,W.jsxs)(Mt,{title:`Group Messages`,eyebrow:`Supergroup / channel messages`,children:[d&&(0,W.jsx)(K,{children:d}),(0,W.jsxs)(Nt,{children:[(0,W.jsx)(`div`,{className:`message-selector-grid single`,children:(0,W.jsx)(Vn,{label:`Channel / Group`,value:t,onChange:m})}),(0,W.jsxs)(`form`,{className:`toolbar message-query`,onSubmit:e=>{e.preventDefault(),p(!1)},children:[(0,W.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),placeholder:`before_date cursor`}),(0,W.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`before_msg_id cursor`}),(0,W.jsx)(`input`,{className:`small-input`,value:s,onChange:e=>c(e.target.value),placeholder:`limit <= 100`}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,children:[(0,W.jsx)(Ze,{size:15}),` `,`Search messages`]}),h.length?(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>p(!0),children:[(0,W.jsx)(ve,{size:15}),` `,`Next page`]}):null]})]}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Messages on page`,value:String(h.length)}),(0,W.jsx)(J,{label:`With media`,value:String(h.filter(e=>e.Media&&e.Media!==`{}`).length)}),(0,W.jsx)(J,{label:`Channel posts`,value:String(h.filter(e=>e.Post).length)}),(0,W.jsx)(J,{label:`Channel / Group`,value:t?`${t.Title||vt(t)} (${t.ID})`:`-`})]}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`Message ID`}),(0,W.jsx)(`th`,{children:`Time`}),(0,W.jsx)(`th`,{children:`Sender`}),(0,W.jsx)(`th`,{children:`From Peer`}),(0,W.jsx)(`th`,{children:`PTS`}),(0,W.jsx)(`th`,{children:`Views`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Body`}),(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[h.map(t=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`mono`,children:t.ID}),(0,W.jsx)(`td`,{children:yt(t.Date)}),(0,W.jsx)(`td`,{className:`mono`,children:t.SenderUserID}),(0,W.jsxs)(`td`,{className:`mono`,children:[t.FromPeerType,`:`,t.FromPeerID]}),(0,W.jsx)(`td`,{children:t.PTS}),(0,W.jsx)(`td`,{children:t.ViewsCount}),(0,W.jsx)(`td`,{children:t.Deleted?(0,W.jsx)(q,{tone:`danger`,children:`Deleted`}):t.Pinned?(0,W.jsx)(q,{tone:`warn`,children:`Pinned`}):(0,W.jsx)(q,{children:`Live`})}),(0,W.jsx)(`td`,{className:`truncate`,children:t.Body}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/messages/groups/detail?channel_id=${t.ChannelID}&msg_id=${t.ID}`),children:[`Details`,` `,(0,W.jsx)(ve,{size:14})]})})]},`${t.ChannelID}-${t.ID}`)),h.length===0&&(0,W.jsx)(It,{colSpan:9})]})]})})]})}function mr({ownerUserID:e,msgID:t,navigate:n}){let[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``);async function s(){o(``);try{i(await k.message(e,t))}catch(e){o(O(e))}}if((0,g.useEffect)(()=>{s()},[e,t]),a)return(0,W.jsx)(K,{children:a});if(!r)return(0,W.jsx)(Lt,{label:`Loading`});let c=r.Message;return(0,W.jsx)(Mt,{title:`Message #${c.BoxID}`,eyebrow:`Message Detail`,actions:(0,W.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>n(`/messages/private`),children:[(0,W.jsx)(ue,{size:15}),` `,`Back to private messages`]}),children:(0,W.jsx)(Pt,{main:(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`section`,{className:`entity-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`entity-title`,children:`Owner ${c.OwnerUserID} · Peer ${c.PeerID}`}),(0,W.jsx)(`div`,{className:`entity-subtitle`,children:`Sender ${c.FromUserID} · ${yt(c.Date)}`})]}),(0,W.jsxs)(`div`,{className:`entity-badges`,children:[c.Deleted?(0,W.jsx)(q,{tone:`danger`,children:`Deleted`}):(0,W.jsx)(q,{children:`Live`}),(0,W.jsxs)(q,{children:[`pts `,c.PTS]}),(0,W.jsx)(q,{children:c.Outgoing?`Outgoing`:`Incoming`})]})]}),(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Message box ID`,value:String(c.BoxID),mono:!0}),(0,W.jsx)(Y,{label:`Private message ID`,value:String(c.PrivateMessageID),mono:!0}),(0,W.jsx)(Y,{label:`Message sender`,value:String(c.MessageSenderID),mono:!0}),(0,W.jsx)(Y,{label:`Time`,value:yt(c.Date)})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Message Box`,text:`message_boxes read-only snapshot`}),(0,W.jsx)(Rt,{value:r.MessageJSON})]}),(0,W.jsxs)(`div`,{className:`raw-grid`,children:[(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Dialog Row`,text:`dialogs read-only snapshot`}),(0,W.jsx)(Rt,{value:r.DialogJSON})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Private Message Row`,text:`private_messages read-only snapshot`}),(0,W.jsx)(Rt,{value:r.PrivateJSON})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Update Events`,text:`durable user_update_events`}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`PTS`}),(0,W.jsx)(`th`,{children:`Count`}),(0,W.jsx)(`th`,{children:`Type`}),(0,W.jsx)(`th`,{children:`Time`})]})}),(0,W.jsxs)(`tbody`,{children:[r.UpdateEvents.map(e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{children:e.PTS}),(0,W.jsx)(`td`,{children:e.PTSCount}),(0,W.jsx)(`td`,{children:e.Type}),(0,W.jsx)(`td`,{children:yt(e.Date)})]},`${e.PTS}-${e.Type}`)),r.UpdateEvents.length===0&&(0,W.jsx)(It,{colSpan:4})]})]})})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Dispatch Queue`,text:`online/offline dispatch_outbox`}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`ID`}),(0,W.jsx)(`th`,{children:`User ID`}),(0,W.jsx)(`th`,{children:`PTS`}),(0,W.jsx)(`th`,{children:`Type`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Attempts`}),(0,W.jsx)(`th`,{children:`Updated`})]})}),(0,W.jsxs)(`tbody`,{children:[r.Outbox.map(e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{children:e.ID}),(0,W.jsx)(`td`,{children:e.TargetUserID}),(0,W.jsx)(`td`,{children:e.PTS}),(0,W.jsx)(`td`,{children:e.EventType}),(0,W.jsx)(`td`,{children:e.Status}),(0,W.jsx)(`td`,{children:e.Attempts}),(0,W.jsx)(`td`,{children:U(e.UpdatedAt)})]},e.ID)),r.Outbox.length===0&&(0,W.jsx)(It,{colSpan:7})]})]})})]})]}),side:(0,W.jsxs)(`section`,{className:`action-dock`,children:[(0,W.jsx)(`div`,{className:`dock-title`,children:`Operations`}),(0,W.jsx)(X,{label:`Delete this message`,icon:(0,W.jsx)(lt,{size:15}),path:`/api/actions/delete-messages`,payload:()=>({owner_user_id:c.OwnerUserID,peer_id:c.PeerID,ids:[c.BoxID],revoke:!0}),onDone:s})]})})})}function hr({navigate:e}){let[t,n]=(0,g.useState)(null),[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(``),[l,u]=(0,g.useState)(`100`),[d,f]=(0,g.useState)(``),[p,m]=(0,g.useState)(!0),[h,_]=(0,g.useState)(!1),[v,y]=(0,g.useState)(``),[b,x]=(0,g.useState)(`1`),[S,C]=(0,g.useState)(null),[w,T]=(0,g.useState)(``);async function E(e=!1){if(T(``),!t||!r){T(`Search and select the owner user and peer user first`);return}let n=new URLSearchParams({owner_user_id:String(t.ID),peer_id:String(r.ID),limit:l});if(e&&S?.rows.length){let e=S.rows[S.rows.length-1];n.set(`before_date`,String(e.Date)),n.set(`before_id`,String(e.BoxID)),o(String(e.Date)),c(String(e.BoxID))}else a&&n.set(`before_date`,a),s&&n.set(`before_id`,s);try{C(await k.messages(n))}catch(e){T(O(e))}}function D(e){n(e),o(``),c(``),C(null)}function A(e){i(e),o(``),c(``),C(null)}return(0,W.jsxs)(Mt,{title:`Private Messages`,eyebrow:`Private message boxes`,children:[w&&(0,W.jsx)(K,{children:w}),(0,W.jsxs)(Nt,{children:[(0,W.jsxs)(`div`,{className:`message-selector-grid`,children:[(0,W.jsx)(Rn,{label:`Owner user`,value:t,onChange:D}),(0,W.jsx)(Rn,{label:`Peer user`,value:r,onChange:A})]}),(0,W.jsxs)(`form`,{className:`toolbar message-query`,onSubmit:e=>{e.preventDefault(),E(!1)},children:[(0,W.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`before_date cursor`}),(0,W.jsx)(`input`,{value:s,onChange:e=>c(e.target.value),placeholder:`before_msg_id cursor`}),(0,W.jsx)(`input`,{className:`small-input`,value:l,onChange:e=>u(e.target.value),placeholder:`limit <= 100`}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,children:[(0,W.jsx)(Ze,{size:15}),` `,`Search messages`]}),S?.rows.length?(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>E(!0),children:[(0,W.jsx)(ve,{size:15}),` `,`Next page`]}):null]})]}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Messages on page`,value:String(S?.rows.length??0)}),(0,W.jsx)(J,{label:`Deleted`,value:String((S?.rows??[]).filter(e=>e.Deleted).length),tone:`danger`}),(0,W.jsx)(J,{label:`Outgoing`,value:String((S?.rows??[]).filter(e=>e.Outgoing).length)}),(0,W.jsx)(J,{label:`Owner / Peer`,value:t&&r?`${_t(t)} / ${_t(r)}`:`-`})]}),(0,W.jsxs)(`div`,{className:`operation-row`,children:[(0,W.jsxs)(`div`,{className:`operation-box`,children:[(0,W.jsxs)(`div`,{className:`operation-title`,children:[(0,W.jsx)(lt,{size:15}),` `,`Delete selected messages`]}),(0,W.jsx)(`input`,{value:d,onChange:e=>f(e.target.value),placeholder:`Message IDs, comma separated`}),(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),` `,`Revoke for both sides`]}),(0,W.jsx)(X,{path:`/api/actions/delete-messages`,label:`Dry-run delete`,payload:()=>({owner_user_id:t?.ID??0,peer_id:r?.ID??0,ids:At(d,`Message IDs are invalid`),revoke:p})})]}),(0,W.jsxs)(`div`,{className:`operation-box`,children:[(0,W.jsxs)(`div`,{className:`operation-title`,children:[(0,W.jsx)(je,{size:15}),` `,`Clear private history`]}),(0,W.jsx)(`input`,{value:v,onChange:e=>y(e.target.value),placeholder:`max_id cutoff`}),(0,W.jsx)(`input`,{value:b,onChange:e=>x(e.target.value),placeholder:`max_batches`}),(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)}),` `,`Revoke for both sides`]}),(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>_(e.target.checked)}),` `,`Clear only this side`]}),(0,W.jsx)(X,{path:`/api/actions/delete-history`,label:`Dry-run clear history`,payload:()=>({owner_user_id:t?.ID??0,peer_id:r?.ID??0,max_id:xt(v),max_batches:xt(b),just_clear:h,revoke:p})})]})]}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`Message ID`}),(0,W.jsx)(`th`,{children:`Time`}),(0,W.jsx)(`th`,{children:`Sender`}),(0,W.jsx)(`th`,{children:`Direction`}),(0,W.jsx)(`th`,{children:`PTS`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Body`}),(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[S?.rows.map(t=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`mono`,children:t.BoxID}),(0,W.jsx)(`td`,{children:yt(t.Date)}),(0,W.jsx)(`td`,{className:`mono`,children:t.FromUserID}),(0,W.jsx)(`td`,{children:t.Outgoing?`Outgoing`:`Incoming`}),(0,W.jsx)(`td`,{children:t.PTS}),(0,W.jsx)(`td`,{children:t.Deleted?(0,W.jsx)(q,{tone:`danger`,children:`Deleted`}):(0,W.jsx)(q,{children:`Live`})}),(0,W.jsx)(`td`,{className:`truncate`,children:t.Body}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/messages/private/detail?owner_user_id=${t.OwnerUserID}&msg_id=${t.BoxID}`),children:[`Details`,` `,(0,W.jsx)(ve,{size:14})]})})]},`${t.OwnerUserID}-${t.BoxID}`)),(!S||S.rows.length===0)&&(0,W.jsx)(It,{colSpan:8})]})]})})]})}var gr=c(o(((e,t)=>{typeof document<`u`&&typeof navigator<`u`&&(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.lottie=r())})(e,(function(){var n=``,r=!1,i=-999999,a=function(e){r=!!e},o=function(){return r},s=function(e){n=e},c=function(){return n};function l(e){return document.createElement(e)}function u(e,t){var n,r=e.length,i;for(n=0;n<r;n+=1)for(var a in i=e[n].prototype,i)Object.prototype.hasOwnProperty.call(i,a)&&(t.prototype[a]=i[a])}function d(e){function t(){}return t.prototype=e,t}var f=function(){function e(e){this.audios=[],this.audioFactory=e,this._volume=1,this._isMuted=!1}return e.prototype={addAudio:function(e){this.audios.push(e)},pause:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].pause()},resume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].resume()},setRate:function(e){var t,n=this.audios.length;for(t=0;t<n;t+=1)this.audios[t].setRate(e)},createAudio:function(e){return this.audioFactory?this.audioFactory(e):window.Howl?new window.Howl({src:[e]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(e){this.audioFactory=e},setVolume:function(e){this._volume=e,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var e,t=this.audios.length;for(e=0;e<t;e+=1)this.audios[e].volume(this._volume*+!this._isMuted)}},function(){return new e}}(),p=function(){function e(e,t){var n=0,r=[],i;switch(e){case`int16`:case`uint8c`:i=1;break;default:i=1.1;break}for(n=0;n<t;n+=1)r.push(i);return r}function t(t,n){return t===`float32`?new Float32Array(n):t===`int16`?new Int16Array(n):t===`uint8c`?new Uint8ClampedArray(n):e(t,n)}return typeof Uint8ClampedArray==`function`&&typeof Float32Array==`function`?t:e}();function m(e){return Array.apply(null,{length:e})}function h(e){"@babel/helpers - typeof";return h=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},h(e)}var g=!0,_=null,v=null,y=``,b=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),x=Math.pow,S=Math.sqrt,C=Math.floor,w=Math.min,T={};(function(){var e=`abs.acos.acosh.asin.asinh.atan.atanh.atan2.ceil.cbrt.expm1.clz32.cos.cosh.exp.floor.fround.hypot.imul.log.log1p.log2.log10.max.min.pow.random.round.sign.sin.sinh.sqrt.tan.tanh.trunc.E.LN10.LN2.LOG10E.LOG2E.PI.SQRT1_2.SQRT2`.split(`.`),t,n=e.length;for(t=0;t<n;t+=1)T[e[t]]=Math[e[t]]})(),T.random=Math.random,T.abs=function(e){if(h(e)===`object`&&e.length){var t=m(e.length),n,r=e.length;for(n=0;n<r;n+=1)t[n]=Math.abs(e[n]);return t}return Math.abs(e)};var E=150,D=Math.PI/180,O=.5519;function k(e,t,n,r){this.type=e,this.currentTime=t,this.totalTime=n,this.direction=r<0?-1:1}function A(e,t){this.type=e,this.direction=t<0?-1:1}function j(e,t,n,r){this.type=e,this.currentLoop=n,this.totalLoops=t,this.direction=r<0?-1:1}function M(e,t,n){this.type=e,this.firstFrame=t,this.totalFrames=n}function N(e,t){this.type=e,this.target=t}function P(e,t){this.type=`renderFrameError`,this.nativeError=e,this.currentTime=t}function F(e){this.type=`configError`,this.nativeError=e}var ee=function(){var e=0;return function(){return e+=1,y+`__lottie_element_`+e}}();function I(e,t,n){var r,i,a,o=Math.floor(e*6),s=e*6-o,c=n*(1-t),l=n*(1-s*t),u=n*(1-(1-s)*t);switch(o%6){case 0:r=n,i=u,a=c;break;case 1:r=l,i=n,a=c;break;case 2:r=c,i=n,a=u;break;case 3:r=c,i=l,a=n;break;case 4:r=u,i=c,a=n;break;case 5:r=n,i=c,a=l;break;default:break}return[r,i,a]}function te(e,t,n){var r=Math.max(e,t,n),i=Math.min(e,t,n),a=r-i,o,s=r===0?0:a/r,c=r/255;switch(r){case i:o=0;break;case e:o=t-n+a*(t<n?6:0),o/=6*a;break;case t:o=n-e+a*2,o/=6*a;break;case n:o=e-t+a*4,o/=6*a;break;default:break}return[o,s,c]}function ne(e,t){var n=te(e[0]*255,e[1]*255,e[2]*255);return n[1]+=t,n[1]>1?n[1]=1:n[1]<=0&&(n[1]=0),I(n[0],n[1],n[2])}function L(e,t){var n=te(e[0]*255,e[1]*255,e[2]*255);return n[2]+=t,n[2]>1?n[2]=1:n[2]<0&&(n[2]=0),I(n[0],n[1],n[2])}function re(e,t){var n=te(e[0]*255,e[1]*255,e[2]*255);return n[0]+=t/360,n[0]>1?--n[0]:n[0]<0&&(n[0]+=1),I(n[0],n[1],n[2])}(function(){var e=[],t,n;for(t=0;t<256;t+=1)n=t.toString(16),e[t]=n.length===1?`0`+n:n;return function(t,n,r){return t<0&&(t=0),n<0&&(n=0),r<0&&(r=0),`#`+e[t]+e[n]+e[r]}})();var ie=function(e){g=!!e},ae=function(){return g},oe=function(e){_=e},se=function(){return _},ce=function(){return v},le=function(e){E=e},ue=function(){return E},de=function(e){y=e};function R(e){return document.createElementNS(`http://www.w3.org/2000/svg`,e)}function fe(e){"@babel/helpers - typeof";return fe=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},fe(e)}var pe=function(){var e=1,t=[],n,r,i={onmessage:function(){},postMessage:function(e){n({data:e})}},a={postMessage:function(e){i.onmessage({data:e})}};function s(e){if(window.Worker&&window.Blob&&o()){var t=new Blob([`var _workerSelf = self; self.onmessage = `,e.toString()],{type:`text/javascript`}),r=URL.createObjectURL(t);return new Worker(r)}return n=e,i}function c(){r||(r=s(function(e){function t(){function e(t,n){var o,s,c=t.length,l,u,d,f;for(s=0;s<c;s+=1)if(o=t[s],`ks`in o&&!o.completed){if(o.completed=!0,o.hasMask){var m=o.masksProperties;for(u=m.length,l=0;l<u;l+=1)if(m[l].pt.k.i)a(m[l].pt.k);else for(f=m[l].pt.k.length,d=0;d<f;d+=1)m[l].pt.k[d].s&&a(m[l].pt.k[d].s[0]),m[l].pt.k[d].e&&a(m[l].pt.k[d].e[0])}o.ty===0?(o.layers=r(o.refId,n),e(o.layers,n)):o.ty===4?i(o.shapes):o.ty===5&&p(o)}}function t(t,n){if(t){var i=0,a=t.length;for(i=0;i<a;i+=1)t[i].t===1&&(t[i].data.layers=r(t[i].data.refId,n),e(t[i].data.layers,n))}}function n(e,t){for(var n=0,r=t.length;n<r;){if(t[n].id===e)return t[n];n+=1}return null}function r(e,t){var r=n(e,t);return r?r.layers.__used?JSON.parse(JSON.stringify(r.layers)):(r.layers.__used=!0,r.layers):null}function i(e){var t,n=e.length,r,o;for(t=n-1;t>=0;--t)if(e[t].ty===`sh`)if(e[t].ks.k.i)a(e[t].ks.k);else for(o=e[t].ks.k.length,r=0;r<o;r+=1)e[t].ks.k[r].s&&a(e[t].ks.k[r].s[0]),e[t].ks.k[r].e&&a(e[t].ks.k[r].e[0]);else e[t].ty===`gr`&&i(e[t].it)}function a(e){var t,n=e.i.length;for(t=0;t<n;t+=1)e.i[t][0]+=e.v[t][0],e.i[t][1]+=e.v[t][1],e.o[t][0]+=e.v[t][0],e.o[t][1]+=e.v[t][1]}function o(e,t){var n=t?t.split(`.`):[100,100,100];return e[0]>n[0]?!0:n[0]>e[0]?!1:e[1]>n[1]?!0:n[1]>e[1]?!1:e[2]>n[2]?!0:n[2]>e[2]?!1:null}var s=function(){var e=[4,4,14];function t(e){var t=e.t.d;e.t.d={k:[{s:t,t:0}]}}function n(e){var n,r=e.length;for(n=0;n<r;n+=1)e[n].ty===5&&t(e[n])}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}(),c=function(){var e=[4,7,99];return function(t){if(t.chars&&!o(e,t.v)){var n,r=t.chars.length;for(n=0;n<r;n+=1){var a=t.chars[n];a.data&&a.data.shapes&&(i(a.data.shapes),a.data.ip=0,a.data.op=99999,a.data.st=0,a.data.sr=1,a.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[n].t||(a.data.shapes.push({ty:`no`}),a.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:`tr`})))}}}}(),l=function(){var e=[5,7,15];function t(e){var t=e.t.p;typeof t.a==`number`&&(t.a={a:0,k:t.a}),typeof t.p==`number`&&(t.p={a:0,k:t.p}),typeof t.r==`number`&&(t.r={a:0,k:t.r})}function n(e){var n,r=e.length;for(n=0;n<r;n+=1)e[n].ty===5&&t(e[n])}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}(),u=function(){var e=[4,1,9];function t(e){var n,r=e.length,i,a;for(n=0;n<r;n+=1)if(e[n].ty===`gr`)t(e[n].it);else if(e[n].ty===`fl`||e[n].ty===`st`)if(e[n].c.k&&e[n].c.k[0].i)for(a=e[n].c.k.length,i=0;i<a;i+=1)e[n].c.k[i].s&&(e[n].c.k[i].s[0]/=255,e[n].c.k[i].s[1]/=255,e[n].c.k[i].s[2]/=255,e[n].c.k[i].s[3]/=255),e[n].c.k[i].e&&(e[n].c.k[i].e[0]/=255,e[n].c.k[i].e[1]/=255,e[n].c.k[i].e[2]/=255,e[n].c.k[i].e[3]/=255);else e[n].c.k[0]/=255,e[n].c.k[1]/=255,e[n].c.k[2]/=255,e[n].c.k[3]/=255}function n(e){var n,r=e.length;for(n=0;n<r;n+=1)e[n].ty===4&&t(e[n].shapes)}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}(),d=function(){var e=[4,4,18];function t(e){var n,r=e.length,i,a;for(n=r-1;n>=0;--n)if(e[n].ty===`sh`)if(e[n].ks.k.i)e[n].ks.k.c=e[n].closed;else for(a=e[n].ks.k.length,i=0;i<a;i+=1)e[n].ks.k[i].s&&(e[n].ks.k[i].s[0].c=e[n].closed),e[n].ks.k[i].e&&(e[n].ks.k[i].e[0].c=e[n].closed);else e[n].ty===`gr`&&t(e[n].it)}function n(e){var n,r,i=e.length,a,o,s,c;for(r=0;r<i;r+=1){if(n=e[r],n.hasMask){var l=n.masksProperties;for(o=l.length,a=0;a<o;a+=1)if(l[a].pt.k.i)l[a].pt.k.c=l[a].cl;else for(c=l[a].pt.k.length,s=0;s<c;s+=1)l[a].pt.k[s].s&&(l[a].pt.k[s].s[0].c=l[a].cl),l[a].pt.k[s].e&&(l[a].pt.k[s].e[0].c=l[a].cl)}n.ty===4&&t(n.shapes)}}return function(t){if(o(e,t.v)&&(n(t.layers),t.assets)){var r,i=t.assets.length;for(r=0;r<i;r+=1)t.assets[r].layers&&n(t.assets[r].layers)}}}();function f(n){n.__complete||=(u(n),s(n),c(n),l(n),d(n),e(n.layers,n.assets),t(n.chars,n.assets),!0)}function p(e){e.t.a.length===0&&`m`in e.t.p}var m={};return m.completeData=f,m.checkColors=u,m.checkChars=c,m.checkPathProperties=l,m.checkShapes=d,m.completeLayers=e,m}if(a.dataManager||=t(),a.assetLoader||=function(){function e(e){var t=e.getResponseHeader(`content-type`);return t&&e.responseType===`json`&&t.indexOf(`json`)!==-1||e.response&&fe(e.response)===`object`?e.response:e.response&&typeof e.response==`string`?JSON.parse(e.response):e.responseText?JSON.parse(e.responseText):null}function t(t,n,r,i){var a,o=new XMLHttpRequest;try{o.responseType=`json`}catch{}o.onreadystatechange=function(){if(o.readyState===4)if(o.status===200)a=e(o),r(a);else try{a=e(o),r(a)}catch(e){i&&i(e)}};try{o.open([`G`,`E`,`T`].join(``),t,!0)}catch{o.open([`G`,`E`,`T`].join(``),n+`/`+t,!0)}o.send()}return{load:t}}(),e.data.type===`loadAnimation`)a.assetLoader.load(e.data.path,e.data.fullPath,function(t){a.dataManager.completeData(t),a.postMessage({id:e.data.id,payload:t,status:`success`})},function(){a.postMessage({id:e.data.id,status:`error`})});else if(e.data.type===`complete`){var n=e.data.animation;a.dataManager.completeData(n),a.postMessage({id:e.data.id,payload:n,status:`success`})}else e.data.type===`loadData`&&a.assetLoader.load(e.data.path,e.data.fullPath,function(t){a.postMessage({id:e.data.id,payload:t,status:`success`})},function(){a.postMessage({id:e.data.id,status:`error`})})}),r.onmessage=function(e){var n=e.data,r=n.id,i=t[r];t[r]=null,n.status===`success`?i.onComplete(n.payload):i.onError&&i.onError()})}function l(n,r){e+=1;var i=`processId_`+e;return t[i]={onComplete:n,onError:r},i}function u(e,t,n){c();var i=l(t,n);r.postMessage({type:`loadAnimation`,path:e,fullPath:window.location.origin+window.location.pathname,id:i})}function d(e,t,n){c();var i=l(t,n);r.postMessage({type:`loadData`,path:e,fullPath:window.location.origin+window.location.pathname,id:i})}function f(e,t,n){c();var i=l(t,n);r.postMessage({type:`complete`,animation:e,id:i})}return{loadAnimation:u,loadData:d,completeAnimation:f}}(),me=function(){var e=function(){var e=l(`canvas`);e.width=1,e.height=1;var t=e.getContext(`2d`);return t.fillStyle=`rgba(0,0,0,0)`,t.fillRect(0,0,1,1),e}();function t(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function r(e,t,n){var r=``;if(e.e)r=e.p;else if(t){var i=e.p;i.indexOf(`images/`)!==-1&&(i=i.split(`/`)[1]),r=t+i}else r=n,r+=e.u?e.u:``,r+=e.p;return r}function i(e){var t=0,n=setInterval(function(){(e.getBBox().width||t>500)&&(this._imageLoaded(),clearInterval(n)),t+=1}.bind(this),50)}function a(t){var n=r(t,this.assetsPath,this.path),i=R(`image`);b?this.testImageLoaded(i):i.addEventListener(`load`,this._imageLoaded,!1),i.addEventListener(`error`,function(){a.img=e,this._imageLoaded()}.bind(this),!1),i.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,n),this._elementHelper.append?this._elementHelper.append(i):this._elementHelper.appendChild(i);var a={img:i,assetData:t};return a}function o(t){var n=r(t,this.assetsPath,this.path),i=l(`img`);i.crossOrigin=`anonymous`,i.addEventListener(`load`,this._imageLoaded,!1),i.addEventListener(`error`,function(){a.img=e,this._imageLoaded()}.bind(this),!1),i.src=n;var a={img:i,assetData:t};return a}function s(e){var t={assetData:e},n=r(e,this.assetsPath,this.path);return pe.loadData(n,function(e){t.img=e,this._footageLoaded()}.bind(this),function(){t.img={},this._footageLoaded()}.bind(this)),t}function c(e,t){this.imagesLoadedCb=t;var n,r=e.length;for(n=0;n<r;n+=1)e[n].layers||(!e[n].t||e[n].t===`seq`?(this.totalImages+=1,this.images.push(this._createImageData(e[n]))):e[n].t===3&&(this.totalFootages+=1,this.images.push(this.createFootageData(e[n]))))}function u(e){this.path=e||``}function d(e){this.assetsPath=e||``}function f(e){for(var t=0,n=this.images.length;t<n;){if(this.images[t].assetData===e)return this.images[t].img;t+=1}return null}function p(){this.imagesLoadedCb=null,this.images.length=0}function m(){return this.totalImages===this.loadedAssets}function h(){return this.totalFootages===this.loadedFootagesCount}function g(e,t){e===`svg`?(this._elementHelper=t,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}function _(){this._imageLoaded=t.bind(this),this._footageLoaded=n.bind(this),this.testImageLoaded=i.bind(this),this.createFootageData=s.bind(this),this.assetsPath=``,this.path=``,this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return _.prototype={loadAssets:c,setAssetsPath:d,setPath:u,loadedImages:m,loadedFootages:h,destroy:p,getAsset:f,createImgData:o,createImageData:a,imageLoaded:t,footageLoaded:n,setCacheType:g},_}();function he(){}he.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var n=this._cbs[e],r=0;r<n.length;r+=1)n[r](t)},addEventListener:function(e,t){return this._cbs[e]||(this._cbs[e]=[]),this._cbs[e].push(t),function(){this.removeEventListener(e,t)}.bind(this)},removeEventListener:function(e,t){if(!t)this._cbs[e]=null;else if(this._cbs[e]){for(var n=0,r=this._cbs[e].length;n<r;)this._cbs[e][n]===t&&(this._cbs[e].splice(n,1),--n,--r),n+=1;this._cbs[e].length||(this._cbs[e]=null)}}};var ge=function(){function e(e){for(var t=e.split(`\r
|
||
`),n={},r,i=0,a=0;a<t.length;a+=1)r=t[a].split(`:`),r.length===2&&(n[r[0]]=r[1].trim(),i+=1);if(i===0)throw Error();return n}return function(t){for(var n=[],r=0;r<t.length;r+=1){var i=t[r],a={time:i.tm,duration:i.dr};try{a.payload=JSON.parse(t[r].cm)}catch{try{a.payload=e(t[r].cm)}catch{a.payload={name:t[r].cm}}}n.push(a)}return n}}(),_e=function(){function e(e){this.compositions.push(e)}return function(){function t(e){for(var t=0,n=this.compositions.length;t<n;){if(this.compositions[t].data&&this.compositions[t].data.nm===e)return this.compositions[t].prepareFrame&&this.compositions[t].data.xt&&this.compositions[t].prepareFrame(this.currentFrame),this.compositions[t].compInterface;t+=1}return null}return t.compositions=[],t.currentFrame=0,t.registerComposition=e,t}}(),ve={},ye=function(e,t){ve[e]=t};function be(e){return ve[e]}function xe(){if(ve.canvas)return`canvas`;for(var e in ve)if(ve[e])return e;return``}function Se(e){"@babel/helpers - typeof";return Se=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},Se(e)}var z=function(){this._cbs=[],this.name=``,this.path=``,this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=ee(),this.assetsPath=``,this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=ae(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=_e(),this.imagePreloader=new me,this.audioController=f(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new k(`drawnFrame`,0,0,0),this.expressionsPlugin=se()};u([he],z),z.prototype.setParams=function(e){(e.wrapper||e.container)&&(this.wrapper=e.wrapper||e.container);var t=`svg`;e.animType?t=e.animType:e.renderer&&(t=e.renderer);var n=be(t);this.renderer=new n(this,e.rendererSettings),this.imagePreloader.setCacheType(t,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=t,e.loop===``||e.loop===null||e.loop===void 0||e.loop===!0?this.loop=!0:e.loop===!1?this.loop=!1:this.loop=parseInt(e.loop,10),this.autoplay=`autoplay`in e?e.autoplay:!0,this.name=e.name?e.name:``,this.autoloadSegments=Object.prototype.hasOwnProperty.call(e,`autoloadSegments`)?e.autoloadSegments:!0,this.assetsPath=e.assetsPath,this.initialSegment=e.initialSegment,e.audioFactory&&this.audioController.setAudioFactory(e.audioFactory),e.animationData?this.setupAnimation(e.animationData):e.path&&(e.path.lastIndexOf(`\\`)===-1?this.path=e.path.substr(0,e.path.lastIndexOf(`/`)+1):this.path=e.path.substr(0,e.path.lastIndexOf(`\\`)+1),this.fileName=e.path.substr(e.path.lastIndexOf(`/`)+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(`.json`)),pe.loadAnimation(e.path,this.configAnimation,this.onSetupError))},z.prototype.onSetupError=function(){this.trigger(`data_failed`)},z.prototype.setupAnimation=function(e){pe.completeAnimation(e,this.configAnimation)},z.prototype.setData=function(e,t){t&&Se(t)!==`object`&&(t=JSON.parse(t));var n={wrapper:e,animationData:t},r=e.attributes;n.path=r.getNamedItem(`data-animation-path`)?r.getNamedItem(`data-animation-path`).value:r.getNamedItem(`data-bm-path`)?r.getNamedItem(`data-bm-path`).value:r.getNamedItem(`bm-path`)?r.getNamedItem(`bm-path`).value:``,n.animType=r.getNamedItem(`data-anim-type`)?r.getNamedItem(`data-anim-type`).value:r.getNamedItem(`data-bm-type`)?r.getNamedItem(`data-bm-type`).value:r.getNamedItem(`bm-type`)?r.getNamedItem(`bm-type`).value:r.getNamedItem(`data-bm-renderer`)?r.getNamedItem(`data-bm-renderer`).value:r.getNamedItem(`bm-renderer`)?r.getNamedItem(`bm-renderer`).value:xe()||`canvas`;var i=r.getNamedItem(`data-anim-loop`)?r.getNamedItem(`data-anim-loop`).value:r.getNamedItem(`data-bm-loop`)?r.getNamedItem(`data-bm-loop`).value:r.getNamedItem(`bm-loop`)?r.getNamedItem(`bm-loop`).value:``;i===`false`?n.loop=!1:i===`true`?n.loop=!0:i!==``&&(n.loop=parseInt(i,10)),n.autoplay=(r.getNamedItem(`data-anim-autoplay`)?r.getNamedItem(`data-anim-autoplay`).value:r.getNamedItem(`data-bm-autoplay`)?r.getNamedItem(`data-bm-autoplay`).value:r.getNamedItem(`bm-autoplay`)?r.getNamedItem(`bm-autoplay`).value:!0)!==`false`,n.name=r.getNamedItem(`data-name`)?r.getNamedItem(`data-name`).value:r.getNamedItem(`data-bm-name`)?r.getNamedItem(`data-bm-name`).value:r.getNamedItem(`bm-name`)?r.getNamedItem(`bm-name`).value:``,(r.getNamedItem(`data-anim-prerender`)?r.getNamedItem(`data-anim-prerender`).value:r.getNamedItem(`data-bm-prerender`)?r.getNamedItem(`data-bm-prerender`).value:r.getNamedItem(`bm-prerender`)?r.getNamedItem(`bm-prerender`).value:``)===`false`&&(n.prerender=!1),n.path?this.setParams(n):this.trigger(`destroy`)},z.prototype.includeLayers=function(e){e.op>this.animationData.op&&(this.animationData.op=e.op,this.totalFrames=Math.floor(e.op-this.animationData.ip));var t=this.animationData.layers,n,r=t.length,i=e.layers,a,o=i.length;for(a=0;a<o;a+=1)for(n=0;n<r;){if(t[n].id===i[a].id){t[n]=i[a];break}n+=1}if((e.chars||e.fonts)&&(this.renderer.globalData.fontManager.addChars(e.chars),this.renderer.globalData.fontManager.addFonts(e.fonts,this.renderer.globalData.defs)),e.assets)for(r=e.assets.length,n=0;n<r;n+=1)this.animationData.assets.push(e.assets[n]);this.animationData.__complete=!1,pe.completeAnimation(this.animationData,this.onSegmentComplete)},z.prototype.onSegmentComplete=function(e){this.animationData=e;var t=se();t&&t.initExpressions(this),this.loadNextSegment()},z.prototype.loadNextSegment=function(){var e=this.animationData.segments;if(!e||e.length===0||!this.autoloadSegments){this.trigger(`data_ready`),this.timeCompleted=this.totalFrames;return}var t=e.shift();this.timeCompleted=t.time*this.frameRate;var n=this.path+this.fileName+`_`+this.segmentPos+`.json`;this.segmentPos+=1,pe.loadData(n,this.includeLayers.bind(this),function(){this.trigger(`data_failed`)}.bind(this))},z.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},z.prototype.imagesLoaded=function(){this.trigger(`loaded_images`),this.checkLoaded()},z.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},z.prototype.configAnimation=function(e){if(this.renderer)try{this.animationData=e,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(e),e.assets||=[],this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(e.assets),this.markers=ge(e.markers||[]),this.trigger(`config_ready`),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(e){this.triggerConfigError(e)}},z.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},z.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||this.renderer.rendererType!==`canvas`)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var e=se();e&&e.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger(`DOMLoaded`)}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},z.prototype.resize=function(e,t){var n=typeof e==`number`?e:void 0,r=typeof t==`number`?t:void 0;this.renderer.updateContainerSize(n,r)},z.prototype.setSubframe=function(e){this.isSubframeEnabled=!!e},z.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger(`enterFrame`),this.renderFrame(),this.trigger(`drawnFrame`)},z.prototype.renderFrame=function(){if(!(this.isLoaded===!1||!this.renderer))try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(e){this.triggerRenderFrameError(e)}},z.prototype.play=function(e){e&&this.name!==e||this.isPaused===!0&&(this.isPaused=!1,this.trigger(`_play`),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger(`_active`)))},z.prototype.pause=function(e){e&&this.name!==e||this.isPaused===!1&&(this.isPaused=!0,this.trigger(`_pause`),this._idle=!0,this.trigger(`_idle`),this.audioController.pause())},z.prototype.togglePause=function(e){e&&this.name!==e||(this.isPaused===!0?this.play():this.pause())},z.prototype.stop=function(e){e&&this.name!==e||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},z.prototype.getMarkerData=function(e){for(var t,n=0;n<this.markers.length;n+=1)if(t=this.markers[n],t.payload&&t.payload.name===e)return t;return null},z.prototype.goToAndStop=function(e,t,n){if(!(n&&this.name!==n)){var r=Number(e);if(isNaN(r)){var i=this.getMarkerData(e);i&&this.goToAndStop(i.time,!0)}else t?this.setCurrentRawFrameValue(e):this.setCurrentRawFrameValue(e*this.frameModifier);this.pause()}},z.prototype.goToAndPlay=function(e,t,n){if(!(n&&this.name!==n)){var r=Number(e);if(isNaN(r)){var i=this.getMarkerData(e);i&&(i.duration?this.playSegments([i.time,i.time+i.duration],!0):this.goToAndStop(i.time,!0))}else this.goToAndStop(r,t,n);this.play()}},z.prototype.advanceTime=function(e){if(!(this.isPaused===!0||this.isLoaded===!1)){var t=this.currentRawFrame+e*this.frameModifier,n=!1;t>=this.totalFrames-1&&this.frameModifier>0?!this.loop||this.playCount===this.loop?this.checkSegments(t>this.totalFrames?t%this.totalFrames:0)||(n=!0,t=this.totalFrames-1):t>=this.totalFrames?(this.playCount+=1,this.checkSegments(t%this.totalFrames)||(this.setCurrentRawFrameValue(t%this.totalFrames),this._completedLoop=!0,this.trigger(`loopComplete`))):this.setCurrentRawFrameValue(t):t<0?this.checkSegments(t%this.totalFrames)||(this.loop&&!(this.playCount--<=0&&this.loop!==!0)?(this.setCurrentRawFrameValue(this.totalFrames+t%this.totalFrames),this._completedLoop?this.trigger(`loopComplete`):this._completedLoop=!0):(n=!0,t=0)):this.setCurrentRawFrameValue(t),n&&(this.setCurrentRawFrameValue(t),this.pause(),this.trigger(`complete`))}},z.prototype.adjustSegment=function(e,t){this.playCount=0,e[1]<e[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=e[0]-e[1],this.timeCompleted=this.totalFrames,this.firstFrame=e[1],this.setCurrentRawFrameValue(this.totalFrames-.001-t)):e[1]>e[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=e[1]-e[0],this.timeCompleted=this.totalFrames,this.firstFrame=e[0],this.setCurrentRawFrameValue(.001+t)),this.trigger(`segmentStart`)},z.prototype.setSegment=function(e,t){var n=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<e?n=e:this.currentRawFrame+this.firstFrame>t&&(n=t-e)),this.firstFrame=e,this.totalFrames=t-e,this.timeCompleted=this.totalFrames,n!==-1&&this.goToAndStop(n,!0)},z.prototype.playSegments=function(e,t){if(t&&(this.segments.length=0),Se(e[0])===`object`){var n,r=e.length;for(n=0;n<r;n+=1)this.segments.push(e[n])}else this.segments.push(e);this.segments.length&&t&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},z.prototype.resetSegments=function(e){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),e&&this.checkSegments(0)},z.prototype.checkSegments=function(e){return this.segments.length?(this.adjustSegment(this.segments.shift(),e),!0):!1},z.prototype.destroy=function(e){e&&this.name!==e||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger(`destroy`),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},z.prototype.setCurrentRawFrameValue=function(e){this.currentRawFrame=e,this.gotoFrame()},z.prototype.setSpeed=function(e){this.playSpeed=e,this.updaFrameModifier()},z.prototype.setDirection=function(e){this.playDirection=e<0?-1:1,this.updaFrameModifier()},z.prototype.setLoop=function(e){this.loop=e},z.prototype.setVolume=function(e,t){t&&this.name!==t||this.audioController.setVolume(e)},z.prototype.getVolume=function(){return this.audioController.getVolume()},z.prototype.mute=function(e){e&&this.name!==e||this.audioController.mute()},z.prototype.unmute=function(e){e&&this.name!==e||this.audioController.unmute()},z.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},z.prototype.getPath=function(){return this.path},z.prototype.getAssetsPath=function(e){var t=``;if(e.e)t=e.p;else if(this.assetsPath){var n=e.p;n.indexOf(`images/`)!==-1&&(n=n.split(`/`)[1]),t=this.assetsPath+n}else t=this.path,t+=e.u?e.u:``,t+=e.p;return t},z.prototype.getAssetData=function(e){for(var t=0,n=this.assets.length;t<n;){if(e===this.assets[t].id)return this.assets[t];t+=1}return null},z.prototype.hide=function(){this.renderer.hide()},z.prototype.show=function(){this.renderer.show()},z.prototype.getDuration=function(e){return e?this.totalFrames:this.totalFrames/this.frameRate},z.prototype.updateDocumentData=function(e,t,n){try{this.renderer.getElementByPath(e).updateDocumentData(t,n)}catch{}},z.prototype.trigger=function(e){if(this._cbs&&this._cbs[e])switch(e){case`enterFrame`:this.triggerEvent(e,new k(e,this.currentFrame,this.totalFrames,this.frameModifier));break;case`drawnFrame`:this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(e,this.drawnFrameEvent);break;case`loopComplete`:this.triggerEvent(e,new j(e,this.loop,this.playCount,this.frameMult));break;case`complete`:this.triggerEvent(e,new A(e,this.frameMult));break;case`segmentStart`:this.triggerEvent(e,new M(e,this.firstFrame,this.totalFrames));break;case`destroy`:this.triggerEvent(e,new N(e,this));break;default:this.triggerEvent(e)}e===`enterFrame`&&this.onEnterFrame&&this.onEnterFrame.call(this,new k(e,this.currentFrame,this.totalFrames,this.frameMult)),e===`loopComplete`&&this.onLoopComplete&&this.onLoopComplete.call(this,new j(e,this.loop,this.playCount,this.frameMult)),e===`complete`&&this.onComplete&&this.onComplete.call(this,new A(e,this.frameMult)),e===`segmentStart`&&this.onSegmentStart&&this.onSegmentStart.call(this,new M(e,this.firstFrame,this.totalFrames)),e===`destroy`&&this.onDestroy&&this.onDestroy.call(this,new N(e,this))},z.prototype.triggerRenderFrameError=function(e){var t=new P(e,this.currentFrame);this.triggerEvent(`error`,t),this.onError&&this.onError.call(this,t)},z.prototype.triggerConfigError=function(e){var t=new F(e,this.currentFrame);this.triggerEvent(`error`,t),this.onError&&this.onError.call(this,t)};var Ce=function(){var e={},t=[],n=0,r=0,i=0,a=!0,o=!1;function s(e){for(var n=0,i=e.target;n<r;)t[n].animation===i&&(t.splice(n,1),--n,--r,i.isPaused||f()),n+=1}function c(e,n){if(!e)return null;for(var i=0;i<r;){if(t[i].elem===e&&t[i].elem!==null)return t[i].animation;i+=1}var a=new z;return p(a,e),a.setData(e,n),a}function u(){var e,n=t.length,r=[];for(e=0;e<n;e+=1)r.push(t[e].animation);return r}function d(){i+=1,D()}function f(){--i}function p(e,n){e.addEventListener(`destroy`,s),e.addEventListener(`_active`,d),e.addEventListener(`_idle`,f),t.push({elem:n,animation:e}),r+=1}function m(e){var t=new z;return p(t,null),t.setParams(e),t}function h(e,n){var i;for(i=0;i<r;i+=1)t[i].animation.setSpeed(e,n)}function g(e,n){var i;for(i=0;i<r;i+=1)t[i].animation.setDirection(e,n)}function _(e){var n;for(n=0;n<r;n+=1)t[n].animation.play(e)}function v(e){var s=e-n,c;for(c=0;c<r;c+=1)t[c].animation.advanceTime(s);n=e,i&&!o?window.requestAnimationFrame(v):a=!0}function y(e){n=e,window.requestAnimationFrame(v)}function b(e){var n;for(n=0;n<r;n+=1)t[n].animation.pause(e)}function x(e,n,i){var a;for(a=0;a<r;a+=1)t[a].animation.goToAndStop(e,n,i)}function S(e){var n;for(n=0;n<r;n+=1)t[n].animation.stop(e)}function C(e){var n;for(n=0;n<r;n+=1)t[n].animation.togglePause(e)}function w(e){var n;for(n=r-1;n>=0;--n)t[n].animation.destroy(e)}function T(e,t,n){var r=[].concat([].slice.call(document.getElementsByClassName(`lottie`)),[].slice.call(document.getElementsByClassName(`bodymovin`))),i,a=r.length;for(i=0;i<a;i+=1)n&&r[i].setAttribute(`data-bm-type`,n),c(r[i],e);if(t&&a===0){n||=`svg`;var o=document.getElementsByTagName(`body`)[0];o.innerText=``;var s=l(`div`);s.style.width=`100%`,s.style.height=`100%`,s.setAttribute(`data-bm-type`,n),o.appendChild(s),c(s,e)}}function E(){var e;for(e=0;e<r;e+=1)t[e].animation.resize()}function D(){!o&&i&&(a&&=(window.requestAnimationFrame(y),!1))}function O(){o=!0}function k(){o=!1,D()}function A(e,n){var i;for(i=0;i<r;i+=1)t[i].animation.setVolume(e,n)}function j(e){var n;for(n=0;n<r;n+=1)t[n].animation.mute(e)}function M(e){var n;for(n=0;n<r;n+=1)t[n].animation.unmute(e)}return e.registerAnimation=c,e.loadAnimation=m,e.setSpeed=h,e.setDirection=g,e.play=_,e.pause=b,e.stop=S,e.togglePause=C,e.searchAnimations=T,e.resize=E,e.goToAndStop=x,e.destroy=w,e.freeze=O,e.unfreeze=k,e.setVolume=A,e.mute=j,e.unmute=M,e.getRegisteredAnimations=u,e}(),we=function(){var e={};e.getBezierEasing=n;var t={};function n(e,n,r,i,a){var o=a||(`bez_`+e+`_`+n+`_`+r+`_`+i).replace(/\./g,`p`);if(t[o])return t[o];var s=new _([e,n,r,i]);return t[o]=s,s}var r=4,i=.001,a=1e-7,o=10,s=11,c=1/(s-1),l=typeof Float32Array==`function`;function u(e,t){return 1-3*t+3*e}function d(e,t){return 3*t-6*e}function f(e){return 3*e}function p(e,t,n){return((u(t,n)*e+d(t,n))*e+f(t))*e}function m(e,t,n){return 3*u(t,n)*e*e+2*d(t,n)*e+f(t)}function h(e,t,n,r,i){var s,c,l=0;do c=t+(n-t)/2,s=p(c,r,i)-e,s>0?n=c:t=c;while(Math.abs(s)>a&&++l<o);return c}function g(e,t,n,i){for(var a=0;a<r;++a){var o=m(t,n,i);if(o===0)return t;var s=p(t,n,i)-e;t-=s/o}return t}function _(e){this._p=e,this._mSampleValues=l?new Float32Array(s):Array(s),this._precomputed=!1,this.get=this.get.bind(this)}return _.prototype={get:function(e){var t=this._p[0],n=this._p[1],r=this._p[2],i=this._p[3];return this._precomputed||this._precompute(),t===n&&r===i?e:e===0?0:e===1?1:p(this._getTForX(e),n,i)},_precompute:function(){var e=this._p[0],t=this._p[1],n=this._p[2],r=this._p[3];this._precomputed=!0,(e!==t||n!==r)&&this._calcSampleValues()},_calcSampleValues:function(){for(var e=this._p[0],t=this._p[2],n=0;n<s;++n)this._mSampleValues[n]=p(n*c,e,t)},_getTForX:function(e){for(var t=this._p[0],n=this._p[2],r=this._mSampleValues,a=0,o=1,l=s-1;o!==l&&r[o]<=e;++o)a+=c;--o;var u=(e-r[o])/(r[o+1]-r[o]),d=a+u*c,f=m(d,t,n);return f>=i?g(e,d,t,n):f===0?d:h(e,a,a+c,t,n)}},e}(),Te=function(){function e(e){return e.concat(m(e.length))}return{double:e}}(),Ee=function(){return function(e,t,n){var r=0,i=e,a=m(i),o={newElement:s,release:c};function s(){var e;return r?(--r,e=a[r]):e=t(),e}function c(e){r===i&&(a=Te.double(a),i*=2),n&&n(e),a[r]=e,r+=1}return o}}(),De=function(){function e(){return{addedLength:0,percents:p(`float32`,ue()),lengths:p(`float32`,ue())}}return Ee(8,e)}(),Oe=function(){function e(){return{lengths:[],totalLength:0}}function t(e){var t,n=e.lengths.length;for(t=0;t<n;t+=1)De.release(e.lengths[t]);e.lengths.length=0}return Ee(8,e,t)}();function ke(){var e=Math;function t(e,t,n,r,i,a){var o=e*r+t*i+n*a-i*r-a*e-n*t;return o>-.001&&o<.001}function n(n,r,i,a,o,s,c,l,u){if(i===0&&s===0&&u===0)return t(n,r,a,o,c,l);var d=e.sqrt(e.pow(a-n,2)+e.pow(o-r,2)+e.pow(s-i,2)),f=e.sqrt(e.pow(c-n,2)+e.pow(l-r,2)+e.pow(u-i,2)),p=e.sqrt(e.pow(c-a,2)+e.pow(l-o,2)+e.pow(u-s,2)),m=d>f?d>p?d-f-p:p-f-d:p>f?p-f-d:f-d-p;return m>-1e-4&&m<1e-4}var r=function(){return function(e,t,n,r){var i=ue(),a,o,s,c,l,u=0,d,f=[],p=[],m=De.newElement();for(s=n.length,a=0;a<i;a+=1){for(l=a/(i-1),d=0,o=0;o<s;o+=1)c=x(1-l,3)*e[o]+3*x(1-l,2)*l*n[o]+3*(1-l)*x(l,2)*r[o]+x(l,3)*t[o],f[o]=c,p[o]!==null&&(d+=x(f[o]-p[o],2)),p[o]=f[o];d&&(d=S(d),u+=d),m.percents[a]=l,m.lengths[a]=u}return m.addedLength=u,m}}();function i(e){var t=Oe.newElement(),n=e.c,i=e.v,a=e.o,o=e.i,s,c=e._length,l=t.lengths,u=0;for(s=0;s<c-1;s+=1)l[s]=r(i[s],i[s+1],a[s],o[s+1]),u+=l[s].addedLength;return n&&c&&(l[s]=r(i[s],i[0],a[s],o[0]),u+=l[s].addedLength),t.totalLength=u,t}function a(e){this.segmentLength=0,this.points=Array(e)}function o(e,t){this.partialLength=e,this.point=t}var s=function(){var e={};return function(n,r,i,s){var c=(n[0]+`_`+n[1]+`_`+r[0]+`_`+r[1]+`_`+i[0]+`_`+i[1]+`_`+s[0]+`_`+s[1]).replace(/\./g,`p`);if(!e[c]){var l=ue(),u,d,f,p,h,g=0,_,v,y=null;n.length===2&&(n[0]!==r[0]||n[1]!==r[1])&&t(n[0],n[1],r[0],r[1],n[0]+i[0],n[1]+i[1])&&t(n[0],n[1],r[0],r[1],r[0]+s[0],r[1]+s[1])&&(l=2);var b=new a(l);for(f=i.length,u=0;u<l;u+=1){for(v=m(f),h=u/(l-1),_=0,d=0;d<f;d+=1)p=x(1-h,3)*n[d]+3*x(1-h,2)*h*(n[d]+i[d])+3*(1-h)*x(h,2)*(r[d]+s[d])+x(h,3)*r[d],v[d]=p,y!==null&&(_+=x(v[d]-y[d],2));_=S(_),g+=_,b.points[u]=new o(_,v),y=v}b.segmentLength=g,e[c]=b}return e[c]}}();function c(e,t){var n=t.percents,r=t.lengths,i=n.length,a=C((i-1)*e),o=e*t.addedLength,s=0;if(a===i-1||a===0||o===r[a])return n[a];for(var c=r[a]>o?-1:1,l=!0;l;)if(r[a]<=o&&r[a+1]>o?(s=(o-r[a])/(r[a+1]-r[a]),l=!1):a+=c,a<0||a>=i-1){if(a===i-1)return n[a];l=!1}return n[a]+(n[a+1]-n[a])*s}function l(t,n,r,i,a,o){var s=c(a,o),l=1-s;return[e.round((l*l*l*t[0]+(s*l*l+l*s*l+l*l*s)*r[0]+(s*s*l+l*s*s+s*l*s)*i[0]+s*s*s*n[0])*1e3)/1e3,e.round((l*l*l*t[1]+(s*l*l+l*s*l+l*l*s)*r[1]+(s*s*l+l*s*s+s*l*s)*i[1]+s*s*s*n[1])*1e3)/1e3]}var u=p(`float32`,8);function d(t,n,r,i,a,o,s){a<0?a=0:a>1&&(a=1);var l=c(a,s);o=o>1?1:o;var d=c(o,s),f,p=t.length,m=1-l,h=1-d,g=m*m*m,_=l*m*m*3,v=l*l*m*3,y=l*l*l,b=m*m*h,x=l*m*h+m*l*h+m*m*d,S=l*l*h+m*l*d+l*m*d,C=l*l*d,w=m*h*h,T=l*h*h+m*d*h+m*h*d,E=l*d*h+m*d*d+l*h*d,D=l*d*d,O=h*h*h,k=d*h*h+h*d*h+h*h*d,A=d*d*h+h*d*d+d*h*d,j=d*d*d;for(f=0;f<p;f+=1)u[f*4]=e.round((g*t[f]+_*r[f]+v*i[f]+y*n[f])*1e3)/1e3,u[f*4+1]=e.round((b*t[f]+x*r[f]+S*i[f]+C*n[f])*1e3)/1e3,u[f*4+2]=e.round((w*t[f]+T*r[f]+E*i[f]+D*n[f])*1e3)/1e3,u[f*4+3]=e.round((O*t[f]+k*r[f]+A*i[f]+j*n[f])*1e3)/1e3;return u}return{getSegmentsLength:i,getNewSegment:d,getPointInSegment:l,buildBezierData:s,pointOnLine2D:t,pointOnLine3D:n}}var Ae=ke(),je=i,Me=Math.abs;function Ne(e,t){var n=this.offsetTime,r;this.propType===`multidimensional`&&(r=p(`float32`,this.pv.length));for(var i=t.lastIndex,a=i,o=this.keyframes.length-1,s=!0,c,l,u;s;){if(c=this.keyframes[a],l=this.keyframes[a+1],a===o-1&&e>=l.t-n){c.h&&(c=l),i=0;break}if(l.t-n>e){i=a;break}a<o-1?a+=1:(i=0,s=!1)}u=this.keyframesMetadata[a]||{};var d,f,m,h,g,_,v=l.t-n,y=c.t-n,b;if(c.to){u.bezierData||=Ae.buildBezierData(c.s,l.s||c.e,c.to,c.ti);var x=u.bezierData;if(e>=v||e<y){var S=e>=v?x.points.length-1:0;for(f=x.points[S].point.length,d=0;d<f;d+=1)r[d]=x.points[S].point[d]}else{u.__fnct?_=u.__fnct:(_=we.getBezierEasing(c.o.x,c.o.y,c.i.x,c.i.y,c.n).get,u.__fnct=_),m=_((e-y)/(v-y));var C=x.segmentLength*m,w,T=t.lastFrame<e&&t._lastKeyframeIndex===a?t._lastAddedLength:0;for(g=t.lastFrame<e&&t._lastKeyframeIndex===a?t._lastPoint:0,s=!0,h=x.points.length;s;){if(T+=x.points[g].partialLength,C===0||m===0||g===x.points.length-1){for(f=x.points[g].point.length,d=0;d<f;d+=1)r[d]=x.points[g].point[d];break}else if(C>=T&&C<T+x.points[g+1].partialLength){for(w=(C-T)/x.points[g+1].partialLength,f=x.points[g].point.length,d=0;d<f;d+=1)r[d]=x.points[g].point[d]+(x.points[g+1].point[d]-x.points[g].point[d])*w;break}g<h-1?g+=1:s=!1}t._lastPoint=g,t._lastAddedLength=T-x.points[g].partialLength,t._lastKeyframeIndex=a}}else{var E,D,O,k,A;if(o=c.s.length,b=l.s||c.e,this.sh&&c.h!==1)if(e>=v)r[0]=b[0],r[1]=b[1],r[2]=b[2];else if(e<=y)r[0]=c.s[0],r[1]=c.s[1],r[2]=c.s[2];else{var j=Ie(c.s),M=Ie(b),N=(e-y)/(v-y);Fe(r,Pe(j,M,N))}else for(a=0;a<o;a+=1)c.h!==1&&(e>=v?m=1:e<y?m=0:(c.o.x.constructor===Array?(u.__fnct||=[],u.__fnct[a]?_=u.__fnct[a]:(E=c.o.x[a]===void 0?c.o.x[0]:c.o.x[a],D=c.o.y[a]===void 0?c.o.y[0]:c.o.y[a],O=c.i.x[a]===void 0?c.i.x[0]:c.i.x[a],k=c.i.y[a]===void 0?c.i.y[0]:c.i.y[a],_=we.getBezierEasing(E,D,O,k).get,u.__fnct[a]=_)):u.__fnct?_=u.__fnct:(E=c.o.x,D=c.o.y,O=c.i.x,k=c.i.y,_=we.getBezierEasing(E,D,O,k).get,c.keyframeMetadata=_),m=_((e-y)/(v-y)))),b=l.s||c.e,A=c.h===1?c.s[a]:c.s[a]+(b[a]-c.s[a])*m,this.propType===`multidimensional`?r[a]=A:r=A}return t.lastIndex=i,r}function Pe(e,t,n){var r=[],i=e[0],a=e[1],o=e[2],s=e[3],c=t[0],l=t[1],u=t[2],d=t[3],f,p=i*c+a*l+o*u+s*d,m,h,g;return p<0&&(p=-p,c=-c,l=-l,u=-u,d=-d),1-p>1e-6?(f=Math.acos(p),m=Math.sin(f),h=Math.sin((1-n)*f)/m,g=Math.sin(n*f)/m):(h=1-n,g=n),r[0]=h*i+g*c,r[1]=h*a+g*l,r[2]=h*o+g*u,r[3]=h*s+g*d,r}function Fe(e,t){var n=t[0],r=t[1],i=t[2],a=t[3],o=Math.atan2(2*r*a-2*n*i,1-2*r*r-2*i*i),s=Math.asin(2*n*r+2*i*a),c=Math.atan2(2*n*a-2*r*i,1-2*n*n-2*i*i);e[0]=o/D,e[1]=s/D,e[2]=c/D}function Ie(e){var t=e[0]*D,n=e[1]*D,r=e[2]*D,i=Math.cos(t/2),a=Math.cos(n/2),o=Math.cos(r/2),s=Math.sin(t/2),c=Math.sin(n/2),l=Math.sin(r/2),u=i*a*o-s*c*l;return[s*c*o+i*a*l,s*a*o+i*c*l,i*c*o-s*a*l,u]}function Le(){var e=this.comp.renderedFrame-this.offsetTime,t=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(e===this._caching.lastFrame||this._caching.lastFrame!==je&&(this._caching.lastFrame>=n&&e>=n||this._caching.lastFrame<t&&e<t))){this._caching.lastFrame>=e&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var r=this.interpolateValue(e,this._caching);this.pv=r}return this._caching.lastFrame=e,this.pv}function Re(e){var t;if(this.propType===`unidimensional`)t=e*this.mult,Me(this.v-t)>1e-5&&(this.v=t,this._mdf=!0);else for(var n=0,r=this.v.length;n<r;)t=e[n]*this.mult,Me(this.v[n]-t)>1e-5&&(this.v[n]=t,this._mdf=!0),n+=1}function ze(){if(!(this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)){if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=this._isFirstFrame;var e,t=this.effectsSequence.length,n=this.kf?this.pv:this.data.k;for(e=0;e<t;e+=1)n=this.effectsSequence[e](n);this.setVValue(n),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function Be(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}function Ve(e,t,n,r){this.propType=`unidimensional`,this.mult=n||1,this.data=t,this.v=n?t.k*n:t.k,this.pv=t.k,this._mdf=!1,this.elem=e,this.container=r,this.comp=e.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=ze,this.setVValue=Re,this.addEffect=Be}function He(e,t,n,r){this.propType=`multidimensional`,this.mult=n||1,this.data=t,this._mdf=!1,this.elem=e,this.container=r,this.comp=e.comp,this.k=!1,this.kf=!1,this.frameId=-1;var i,a=t.k.length;for(this.v=p(`float32`,a),this.pv=p(`float32`,a),this.vel=p(`float32`,a),i=0;i<a;i+=1)this.v[i]=t.k[i]*this.mult,this.pv[i]=t.k[i];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=ze,this.setVValue=Re,this.addEffect=Be}function Ue(e,t,n,r){this.propType=`unidimensional`,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.frameId=-1,this._caching={lastFrame:je,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=t,this.mult=n||1,this.elem=e,this.container=r,this.comp=e.comp,this.v=je,this.pv=je,this._isFirstFrame=!0,this.getValue=ze,this.setVValue=Re,this.interpolateValue=Ne,this.effectsSequence=[Le.bind(this)],this.addEffect=Be}function We(e,t,n,r){this.propType=`multidimensional`;var i,a=t.k.length,o,s,c,l;for(i=0;i<a-1;i+=1)t.k[i].to&&t.k[i].s&&t.k[i+1]&&t.k[i+1].s&&(o=t.k[i].s,s=t.k[i+1].s,c=t.k[i].to,l=t.k[i].ti,(o.length===2&&!(o[0]===s[0]&&o[1]===s[1])&&Ae.pointOnLine2D(o[0],o[1],s[0],s[1],o[0]+c[0],o[1]+c[1])&&Ae.pointOnLine2D(o[0],o[1],s[0],s[1],s[0]+l[0],s[1]+l[1])||o.length===3&&!(o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2])&&Ae.pointOnLine3D(o[0],o[1],o[2],s[0],s[1],s[2],o[0]+c[0],o[1]+c[1],o[2]+c[2])&&Ae.pointOnLine3D(o[0],o[1],o[2],s[0],s[1],s[2],s[0]+l[0],s[1]+l[1],s[2]+l[2]))&&(t.k[i].to=null,t.k[i].ti=null),o[0]===s[0]&&o[1]===s[1]&&c[0]===0&&c[1]===0&&l[0]===0&&l[1]===0&&(o.length===2||o[2]===s[2]&&c[2]===0&&l[2]===0)&&(t.k[i].to=null,t.k[i].ti=null));this.effectsSequence=[Le.bind(this)],this.data=t,this.keyframes=t.k,this.keyframesMetadata=[],this.offsetTime=e.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=n||1,this.elem=e,this.container=r,this.comp=e.comp,this.getValue=ze,this.setVValue=Re,this.interpolateValue=Ne,this.frameId=-1;var u=t.k[0].s.length;for(this.v=p(`float32`,u),this.pv=p(`float32`,u),i=0;i<u;i+=1)this.v[i]=je,this.pv[i]=je;this._caching={lastFrame:je,lastIndex:0,value:p(`float32`,u)},this.addEffect=Be}var B=function(){function e(e,t,n,r,i){t.sid&&(t=e.globalData.slotManager.getProp(t));var a;if(!t.k.length)a=new Ve(e,t,r,i);else if(typeof t.k[0]==`number`)a=new He(e,t,r,i);else switch(n){case 0:a=new Ue(e,t,r,i);break;case 1:a=new We(e,t,r,i);break;default:break}return a.effectsSequence.length&&i.addDynamicProperty(a),a}return{getProp:e}}();function Ge(){}Ge.prototype={addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&(this.dynamicProperties.push(e),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){this._mdf=!1;var e,t=this.dynamicProperties.length;for(e=0;e<t;e+=1)this.dynamicProperties[e].getValue(),this.dynamicProperties[e]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(e){this.container=e,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var Ke=function(){function e(){return p(`float32`,2)}return Ee(8,e)}();function qe(){this.c=!1,this._length=0,this._maxLength=8,this.v=m(this._maxLength),this.o=m(this._maxLength),this.i=m(this._maxLength)}qe.prototype.setPathData=function(e,t){this.c=e,this.setLength(t);for(var n=0;n<t;)this.v[n]=Ke.newElement(),this.o[n]=Ke.newElement(),this.i[n]=Ke.newElement(),n+=1},qe.prototype.setLength=function(e){for(;this._maxLength<e;)this.doubleArrayLength();this._length=e},qe.prototype.doubleArrayLength=function(){this.v=this.v.concat(m(this._maxLength)),this.i=this.i.concat(m(this._maxLength)),this.o=this.o.concat(m(this._maxLength)),this._maxLength*=2},qe.prototype.setXYAt=function(e,t,n,r,i){var a;switch(this._length=Math.max(this._length,r+1),this._length>=this._maxLength&&this.doubleArrayLength(),n){case`v`:a=this.v;break;case`i`:a=this.i;break;case`o`:a=this.o;break;default:a=[];break}(!a[r]||a[r]&&!i)&&(a[r]=Ke.newElement()),a[r][0]=e,a[r][1]=t},qe.prototype.setTripleAt=function(e,t,n,r,i,a,o,s){this.setXYAt(e,t,`v`,o,s),this.setXYAt(n,r,`o`,o,s),this.setXYAt(i,a,`i`,o,s)},qe.prototype.reverse=function(){var e=new qe;e.setPathData(this.c,this._length);var t=this.v,n=this.o,r=this.i,i=0;this.c&&(e.setTripleAt(t[0][0],t[0][1],r[0][0],r[0][1],n[0][0],n[0][1],0,!1),i=1);var a=this._length-1,o=this._length,s;for(s=i;s<o;s+=1)e.setTripleAt(t[a][0],t[a][1],r[a][0],r[a][1],n[a][0],n[a][1],s,!1),--a;return e},qe.prototype.length=function(){return this._length};var Je=function(){function e(){return new qe}function t(e){var t=e._length,n;for(n=0;n<t;n+=1)Ke.release(e.v[n]),Ke.release(e.i[n]),Ke.release(e.o[n]),e.v[n]=null,e.i[n]=null,e.o[n]=null;e._length=0,e.c=!1}function n(e){var t=r.newElement(),n,i=e._length===void 0?e.v.length:e._length;for(t.setLength(i),t.c=e.c,n=0;n<i;n+=1)t.setTripleAt(e.v[n][0],e.v[n][1],e.o[n][0],e.o[n][1],e.i[n][0],e.i[n][1],n);return t}var r=Ee(4,e,t);return r.clone=n,r}();function Ye(){this._length=0,this._maxLength=4,this.shapes=m(this._maxLength)}Ye.prototype.addShape=function(e){this._length===this._maxLength&&(this.shapes=this.shapes.concat(m(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=e,this._length+=1},Ye.prototype.releaseShapes=function(){var e;for(e=0;e<this._length;e+=1)Je.release(this.shapes[e]);this._length=0};var Xe=function(){var e={newShapeCollection:i,release:a},t=0,n=4,r=m(n);function i(){var e;return t?(--t,e=r[t]):e=new Ye,e}function a(e){var i,a=e._length;for(i=0;i<a;i+=1)Je.release(e.shapes[i]);e._length=0,t===n&&(r=Te.double(r),n*=2),r[t]=e,t+=1}return e}(),Ze=function(){var e=-999999;function t(e,t,n){var r=n.lastIndex,i,a,o,s,c,l,u,d,f,p=this.keyframes;if(e<p[0].t-this.offsetTime)i=p[0].s[0],o=!0,r=0;else if(e>=p[p.length-1].t-this.offsetTime)i=p[p.length-1].s?p[p.length-1].s[0]:p[p.length-2].e[0],o=!0;else{for(var m=r,h=p.length-1,g=!0,_,v,y;g&&(_=p[m],v=p[m+1],!(v.t-this.offsetTime>e));)m<h-1?m+=1:g=!1;if(y=this.keyframesMetadata[m]||{},o=_.h===1,r=m,!o){if(e>=v.t-this.offsetTime)d=1;else if(e<_.t-this.offsetTime)d=0;else{var b;y.__fnct?b=y.__fnct:(b=we.getBezierEasing(_.o.x,_.o.y,_.i.x,_.i.y).get,y.__fnct=b),d=b((e-(_.t-this.offsetTime))/(v.t-this.offsetTime-(_.t-this.offsetTime)))}a=v.s?v.s[0]:_.e[0]}i=_.s[0]}for(l=t._length,u=i.i[0].length,n.lastIndex=r,s=0;s<l;s+=1)for(c=0;c<u;c+=1)f=o?i.i[s][c]:i.i[s][c]+(a.i[s][c]-i.i[s][c])*d,t.i[s][c]=f,f=o?i.o[s][c]:i.o[s][c]+(a.o[s][c]-i.o[s][c])*d,t.o[s][c]=f,f=o?i.v[s][c]:i.v[s][c]+(a.v[s][c]-i.v[s][c])*d,t.v[s][c]=f}function n(){var t=this.comp.renderedFrame-this.offsetTime,n=this.keyframes[0].t-this.offsetTime,r=this.keyframes[this.keyframes.length-1].t-this.offsetTime,i=this._caching.lastFrame;return i!==e&&(i<n&&t<n||i>r&&t>r)||(this._caching.lastIndex=i<t?this._caching.lastIndex:0,this.interpolateShape(t,this.pv,this._caching)),this._caching.lastFrame=t,this.pv}function r(){this.paths=this.localShapeCollection}function i(e,t){if(e._length!==t._length||e.c!==t.c)return!1;var n,r=e._length;for(n=0;n<r;n+=1)if(e.v[n][0]!==t.v[n][0]||e.v[n][1]!==t.v[n][1]||e.o[n][0]!==t.o[n][0]||e.o[n][1]!==t.o[n][1]||e.i[n][0]!==t.i[n][0]||e.i[n][1]!==t.i[n][1])return!1;return!0}function a(e){i(this.v,e)||(this.v=Je.clone(e),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function o(){if(this.elem.globalData.frameId!==this.frameId){if(!this.effectsSequence.length){this._mdf=!1;return}if(this.lock){this.setVValue(this.pv);return}this.lock=!0,this._mdf=!1;var e=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k,t,n=this.effectsSequence.length;for(t=0;t<n;t+=1)e=this.effectsSequence[t](e);this.setVValue(e),this.lock=!1,this.frameId=this.elem.globalData.frameId}}function s(e,t,n){this.propType=`shape`,this.comp=e.comp,this.container=e,this.elem=e,this.data=t,this.k=!1,this.kf=!1,this._mdf=!1;var i=n===3?t.pt.k:t.ks.k;this.v=Je.clone(i),this.pv=Je.clone(this.v),this.localShapeCollection=Xe.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=r,this.effectsSequence=[]}function c(e){this.effectsSequence.push(e),this.container.addDynamicProperty(this)}s.prototype.interpolateShape=t,s.prototype.getValue=o,s.prototype.setVValue=a,s.prototype.addEffect=c;function l(t,i,a){this.propType=`shape`,this.comp=t.comp,this.elem=t,this.container=t,this.offsetTime=t.data.st,this.keyframes=a===3?i.pt.k:i.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var o=this.keyframes[0].s[0].i.length;this.v=Je.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,o),this.pv=Je.clone(this.v),this.localShapeCollection=Xe.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=e,this.reset=r,this._caching={lastFrame:e,lastIndex:0},this.effectsSequence=[n.bind(this)]}l.prototype.getValue=o,l.prototype.interpolateShape=t,l.prototype.setVValue=a,l.prototype.addEffect=c;var d=function(){var e=O;function t(e,t){this.v=Je.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=Xe.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=t.d,this.elem=e,this.comp=e.comp,this.frameId=-1,this.initDynamicPropertyContainer(e),this.p=B.getProp(e,t.p,1,0,this),this.s=B.getProp(e,t.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return t.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var t=this.p.v[0],n=this.p.v[1],r=this.s.v[0]/2,i=this.s.v[1]/2,a=this.d!==3,o=this.v;o.v[0][0]=t,o.v[0][1]=n-i,o.v[1][0]=a?t+r:t-r,o.v[1][1]=n,o.v[2][0]=t,o.v[2][1]=n+i,o.v[3][0]=a?t-r:t+r,o.v[3][1]=n,o.i[0][0]=a?t-r*e:t+r*e,o.i[0][1]=n-i,o.i[1][0]=a?t+r:t-r,o.i[1][1]=n-i*e,o.i[2][0]=a?t+r*e:t-r*e,o.i[2][1]=n+i,o.i[3][0]=a?t-r:t+r,o.i[3][1]=n+i*e,o.o[0][0]=a?t+r*e:t-r*e,o.o[0][1]=n-i,o.o[1][0]=a?t+r:t-r,o.o[1][1]=n+i*e,o.o[2][0]=a?t-r*e:t+r*e,o.o[2][1]=n+i,o.o[3][0]=a?t-r:t+r,o.o[3][1]=n-i*e}},u([Ge],t),t}(),f=function(){function e(e,t){this.v=Je.newElement(),this.v.setPathData(!0,0),this.elem=e,this.comp=e.comp,this.data=t,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),t.sy===1?(this.ir=B.getProp(e,t.ir,0,0,this),this.is=B.getProp(e,t.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=B.getProp(e,t.pt,0,0,this),this.p=B.getProp(e,t.p,1,0,this),this.r=B.getProp(e,t.r,0,D,this),this.or=B.getProp(e,t.or,0,0,this),this.os=B.getProp(e,t.os,0,.01,this),this.localShapeCollection=Xe.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return e.prototype={reset:r,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var e=Math.floor(this.pt.v)*2,t=Math.PI*2/e,n=!0,r=this.or.v,i=this.ir.v,a=this.os.v,o=this.is.v,s=2*Math.PI*r/(e*2),c=2*Math.PI*i/(e*2),l,u,d,f,p=-Math.PI/2;p+=this.r.v;var m=this.data.d===3?-1:1;for(this.v._length=0,l=0;l<e;l+=1){u=n?r:i,d=n?a:o,f=n?s:c;var h=u*Math.cos(p),g=u*Math.sin(p),_=h===0&&g===0?0:g/Math.sqrt(h*h+g*g),v=h===0&&g===0?0:-h/Math.sqrt(h*h+g*g);h+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(h,g,h-_*f*d*m,g-v*f*d*m,h+_*f*d*m,g+v*f*d*m,l,!0),n=!n,p+=t*m}},convertPolygonToPath:function(){var e=Math.floor(this.pt.v),t=Math.PI*2/e,n=this.or.v,r=this.os.v,i=2*Math.PI*n/(e*4),a,o=-Math.PI*.5,s=this.data.d===3?-1:1;for(o+=this.r.v,this.v._length=0,a=0;a<e;a+=1){var c=n*Math.cos(o),l=n*Math.sin(o),u=c===0&&l===0?0:l/Math.sqrt(c*c+l*l),d=c===0&&l===0?0:-c/Math.sqrt(c*c+l*l);c+=+this.p.v[0],l+=+this.p.v[1],this.v.setTripleAt(c,l,c-u*i*r*s,l-d*i*r*s,c+u*i*r*s,l+d*i*r*s,a,!0),o+=t*s}this.paths.length=0,this.paths[0]=this.v}},u([Ge],e),e}(),p=function(){function e(e,t){this.v=Je.newElement(),this.v.c=!0,this.localShapeCollection=Xe.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=e,this.comp=e.comp,this.frameId=-1,this.d=t.d,this.initDynamicPropertyContainer(e),this.p=B.getProp(e,t.p,1,0,this),this.s=B.getProp(e,t.s,1,0,this),this.r=B.getProp(e,t.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return e.prototype={convertRectToPath:function(){var e=this.p.v[0],t=this.p.v[1],n=this.s.v[0]/2,r=this.s.v[1]/2,i=w(n,r,this.r.v),a=i*(1-O);this.v._length=0,this.d===2||this.d===1?(this.v.setTripleAt(e+n,t-r+i,e+n,t-r+i,e+n,t-r+a,0,!0),this.v.setTripleAt(e+n,t+r-i,e+n,t+r-a,e+n,t+r-i,1,!0),i===0?(this.v.setTripleAt(e-n,t+r,e-n+a,t+r,e-n,t+r,2),this.v.setTripleAt(e-n,t-r,e-n,t-r+a,e-n,t-r,3)):(this.v.setTripleAt(e+n-i,t+r,e+n-i,t+r,e+n-a,t+r,2,!0),this.v.setTripleAt(e-n+i,t+r,e-n+a,t+r,e-n+i,t+r,3,!0),this.v.setTripleAt(e-n,t+r-i,e-n,t+r-i,e-n,t+r-a,4,!0),this.v.setTripleAt(e-n,t-r+i,e-n,t-r+a,e-n,t-r+i,5,!0),this.v.setTripleAt(e-n+i,t-r,e-n+i,t-r,e-n+a,t-r,6,!0),this.v.setTripleAt(e+n-i,t-r,e+n-a,t-r,e+n-i,t-r,7,!0))):(this.v.setTripleAt(e+n,t-r+i,e+n,t-r+a,e+n,t-r+i,0,!0),i===0?(this.v.setTripleAt(e-n,t-r,e-n+a,t-r,e-n,t-r,1,!0),this.v.setTripleAt(e-n,t+r,e-n,t+r-a,e-n,t+r,2,!0),this.v.setTripleAt(e+n,t+r,e+n-a,t+r,e+n,t+r,3,!0)):(this.v.setTripleAt(e+n-i,t-r,e+n-i,t-r,e+n-a,t-r,1,!0),this.v.setTripleAt(e-n+i,t-r,e-n+a,t-r,e-n+i,t-r,2,!0),this.v.setTripleAt(e-n,t-r+i,e-n,t-r+i,e-n,t-r+a,3,!0),this.v.setTripleAt(e-n,t+r-i,e-n,t+r-a,e-n,t+r-i,4,!0),this.v.setTripleAt(e-n+i,t+r,e-n+i,t+r,e-n+a,t+r,5,!0),this.v.setTripleAt(e+n-i,t+r,e+n-a,t+r,e+n-i,t+r,6,!0),this.v.setTripleAt(e+n,t+r-i,e+n,t+r-i,e+n,t+r-a,7,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:r},u([Ge],e),e}();function m(e,t,n){var r;return n===3||n===4?r=(n===3?t.pt:t.ks).k.length?new l(e,t,n):new s(e,t,n):n===5?r=new p(e,t):n===6?r=new d(e,t):n===7&&(r=new f(e,t)),r.k&&e.addDynamicProperty(r),r}function h(){return s}function g(){return l}var _={};return _.getShapeProp=m,_.getConstructorFunction=h,_.getKeyframedConstructorFunction=g,_}(),Qe=function(){var e=Math.cos,t=Math.sin,n=Math.tan,r=Math.round;function i(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function a(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function o(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(1,0,0,0,0,r,-i,0,0,i,r,0,0,0,0,1)}function s(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(r,0,i,0,0,1,0,0,-i,0,r,0,0,0,0,1)}function c(n){if(n===0)return this;var r=e(n),i=t(n);return this._t(r,-i,0,0,i,r,0,0,0,0,1,0,0,0,0,1)}function l(e,t){return this._t(1,t,e,1,0,0)}function u(e,t){return this.shear(n(e),n(t))}function d(r,i){var a=e(i),o=t(i);return this._t(a,o,0,0,-o,a,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,n(r),1,0,0,0,0,1,0,0,0,0,1)._t(a,-o,0,0,o,a,0,0,0,0,1,0,0,0,0,1)}function f(e,t,n){return!n&&n!==0&&(n=1),e===1&&t===1&&n===1?this:this._t(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1)}function m(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){return this.props[0]=e,this.props[1]=t,this.props[2]=n,this.props[3]=r,this.props[4]=i,this.props[5]=a,this.props[6]=o,this.props[7]=s,this.props[8]=c,this.props[9]=l,this.props[10]=u,this.props[11]=d,this.props[12]=f,this.props[13]=p,this.props[14]=m,this.props[15]=h,this}function h(e,t,n){return n||=0,e!==0||t!==0||n!==0?this._t(1,0,0,0,0,1,0,0,0,0,1,0,e,t,n,1):this}function g(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){var g=this.props;if(e===1&&t===0&&n===0&&r===0&&i===0&&a===1&&o===0&&s===0&&c===0&&l===0&&u===1&&d===0)return g[12]=g[12]*e+g[15]*f,g[13]=g[13]*a+g[15]*p,g[14]=g[14]*u+g[15]*m,g[15]*=h,this._identityCalculated=!1,this;var _=g[0],v=g[1],y=g[2],b=g[3],x=g[4],S=g[5],C=g[6],w=g[7],T=g[8],E=g[9],D=g[10],O=g[11],k=g[12],A=g[13],j=g[14],M=g[15];return g[0]=_*e+v*i+y*c+b*f,g[1]=_*t+v*a+y*l+b*p,g[2]=_*n+v*o+y*u+b*m,g[3]=_*r+v*s+y*d+b*h,g[4]=x*e+S*i+C*c+w*f,g[5]=x*t+S*a+C*l+w*p,g[6]=x*n+S*o+C*u+w*m,g[7]=x*r+S*s+C*d+w*h,g[8]=T*e+E*i+D*c+O*f,g[9]=T*t+E*a+D*l+O*p,g[10]=T*n+E*o+D*u+O*m,g[11]=T*r+E*s+D*d+O*h,g[12]=k*e+A*i+j*c+M*f,g[13]=k*t+A*a+j*l+M*p,g[14]=k*n+A*o+j*u+M*m,g[15]=k*r+A*s+j*d+M*h,this._identityCalculated=!1,this}function _(e){var t=e.props;return this.transform(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])}function v(){return this._identityCalculated||=(this._identity=!(this.props[0]!==1||this.props[1]!==0||this.props[2]!==0||this.props[3]!==0||this.props[4]!==0||this.props[5]!==1||this.props[6]!==0||this.props[7]!==0||this.props[8]!==0||this.props[9]!==0||this.props[10]!==1||this.props[11]!==0||this.props[12]!==0||this.props[13]!==0||this.props[14]!==0||this.props[15]!==1),!0),this._identity}function y(e){for(var t=0;t<16;){if(e.props[t]!==this.props[t])return!1;t+=1}return!0}function b(e){var t;for(t=0;t<16;t+=1)e.props[t]=this.props[t];return e}function x(e){var t;for(t=0;t<16;t+=1)this.props[t]=e[t]}function S(e,t,n){return{x:e*this.props[0]+t*this.props[4]+n*this.props[8]+this.props[12],y:e*this.props[1]+t*this.props[5]+n*this.props[9]+this.props[13],z:e*this.props[2]+t*this.props[6]+n*this.props[10]+this.props[14]}}function C(e,t,n){return e*this.props[0]+t*this.props[4]+n*this.props[8]+this.props[12]}function w(e,t,n){return e*this.props[1]+t*this.props[5]+n*this.props[9]+this.props[13]}function T(e,t,n){return e*this.props[2]+t*this.props[6]+n*this.props[10]+this.props[14]}function E(){var e=this.props[0]*this.props[5]-this.props[1]*this.props[4],t=this.props[5]/e,n=-this.props[1]/e,r=-this.props[4]/e,i=this.props[0]/e,a=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/e,o=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/e,s=new Qe;return s.props[0]=t,s.props[1]=n,s.props[4]=r,s.props[5]=i,s.props[12]=a,s.props[13]=o,s}function D(e){return this.getInverseMatrix().applyToPointArray(e[0],e[1],e[2]||0)}function O(e){var t,n=e.length,r=[];for(t=0;t<n;t+=1)r[t]=D(e[t]);return r}function k(e,t,n){var r=p(`float32`,6);if(this.isIdentity())r[0]=e[0],r[1]=e[1],r[2]=t[0],r[3]=t[1],r[4]=n[0],r[5]=n[1];else{var i=this.props[0],a=this.props[1],o=this.props[4],s=this.props[5],c=this.props[12],l=this.props[13];r[0]=e[0]*i+e[1]*o+c,r[1]=e[0]*a+e[1]*s+l,r[2]=t[0]*i+t[1]*o+c,r[3]=t[0]*a+t[1]*s+l,r[4]=n[0]*i+n[1]*o+c,r[5]=n[0]*a+n[1]*s+l}return r}function A(e,t,n){return this.isIdentity()?[e,t,n]:[e*this.props[0]+t*this.props[4]+n*this.props[8]+this.props[12],e*this.props[1]+t*this.props[5]+n*this.props[9]+this.props[13],e*this.props[2]+t*this.props[6]+n*this.props[10]+this.props[14]]}function j(e,t){if(this.isIdentity())return e+`,`+t;var n=this.props;return Math.round((e*n[0]+t*n[4]+n[12])*100)/100+`,`+Math.round((e*n[1]+t*n[5]+n[13])*100)/100}function M(){for(var e=0,t=this.props,n=`matrix3d(`,i=1e4;e<16;)n+=r(t[e]*i)/i,n+=e===15?`)`:`,`,e+=1;return n}function N(e){var t=1e4;return e<1e-6&&e>0||e>-1e-6&&e<0?r(e*t)/t:e}function P(){var e=this.props,t=N(e[0]),n=N(e[1]),r=N(e[4]),i=N(e[5]),a=N(e[12]),o=N(e[13]);return`matrix(`+t+`,`+n+`,`+r+`,`+i+`,`+a+`,`+o+`)`}return function(){this.reset=i,this.rotate=a,this.rotateX=o,this.rotateY=s,this.rotateZ=c,this.skew=u,this.skewFromAxis=d,this.shear=l,this.scale=f,this.setTransform=m,this.translate=h,this.transform=g,this.multiply=_,this.applyToPoint=S,this.applyToX=C,this.applyToY=w,this.applyToZ=T,this.applyToPointArray=A,this.applyToTriplePoints=k,this.applyToPointStringified=j,this.toCSS=M,this.to2dCSS=P,this.clone=b,this.cloneFromProps=x,this.equals=y,this.inversePoints=O,this.inversePoint=D,this.getInverseMatrix=E,this._t=this.transform,this.isIdentity=v,this._identity=!0,this._identityCalculated=!1,this.props=p(`float32`,16),this.reset()}}();function $e(e){"@babel/helpers - typeof";return $e=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},$e(e)}var V={},et=`__[STANDALONE]__`,tt=`__[ANIMATIONDATA]__`,nt=``;function rt(e){s(e)}function it(){et===!0?Ce.searchAnimations(tt,et,nt):Ce.searchAnimations()}function at(e){ie(e)}function ot(e){de(e)}function st(e){return et===!0&&(e.animationData=JSON.parse(tt)),Ce.loadAnimation(e)}function ct(e){if(typeof e==`string`)switch(e){case`high`:le(200);break;default:case`medium`:le(50);break;case`low`:le(10);break}else!isNaN(e)&&e>1&&le(e)}function lt(){return typeof navigator<`u`}function ut(e,t){e===`expressions`&&oe(t)}function dt(e){switch(e){case`propertyFactory`:return B;case`shapePropertyFactory`:return Ze;case`matrix`:return Qe;default:return null}}V.play=Ce.play,V.pause=Ce.pause,V.setLocationHref=rt,V.togglePause=Ce.togglePause,V.setSpeed=Ce.setSpeed,V.setDirection=Ce.setDirection,V.stop=Ce.stop,V.searchAnimations=it,V.registerAnimation=Ce.registerAnimation,V.loadAnimation=st,V.setSubframeRendering=at,V.resize=Ce.resize,V.goToAndStop=Ce.goToAndStop,V.destroy=Ce.destroy,V.setQuality=ct,V.inBrowser=lt,V.installPlugin=ut,V.freeze=Ce.freeze,V.unfreeze=Ce.unfreeze,V.setVolume=Ce.setVolume,V.mute=Ce.mute,V.unmute=Ce.unmute,V.getRegisteredAnimations=Ce.getRegisteredAnimations,V.useWebWorker=a,V.setIDPrefix=ot,V.__getFactory=dt,V.version=`5.13.0`;function ft(){document.readyState===`complete`&&(clearInterval(H),it())}function pt(e){for(var t=mt.split(`&`),n=0;n<t.length;n+=1){var r=t[n].split(`=`);if(decodeURIComponent(r[0])==e)return decodeURIComponent(r[1])}return null}var mt=``;if(et){var ht=document.getElementsByTagName(`script`),gt=ht[ht.length-1]||{src:``};mt=gt.src?gt.src.replace(/^[^\?]+\??/,``):``,nt=pt(`renderer`)}var H=setInterval(ft,100);try{!((e===void 0?`undefined`:$e(e))===`object`&&t!==void 0)&&!(typeof define==`function`&&define.amd)&&(window.bodymovin=V)}catch{}var _t=function(){var e={},t={};e.registerModifier=n,e.getModifier=r;function n(e,n){t[e]||(t[e]=n)}function r(e,n,r){return new t[e](n,r)}return e}();function vt(){}vt.prototype.initModifierProperties=function(){},vt.prototype.addShapeToModifier=function(){},vt.prototype.addShape=function(e){if(!this.closed){e.sh.container.addDynamicProperty(e.sh);var t={shape:e.sh,data:e,localShapeCollection:Xe.newShapeCollection()};this.shapes.push(t),this.addShapeToModifier(t),this._isAnimated&&e.setAsAnimated()}},vt.prototype.init=function(e,t){this.shapes=[],this.elem=e,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t),this.frameId=i,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},vt.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},u([Ge],vt);function U(){}u([vt],U),U.prototype.initModifierProperties=function(e,t){this.s=B.getProp(e,t.s,0,.01,this),this.e=B.getProp(e,t.e,0,.01,this),this.o=B.getProp(e,t.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=t.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},U.prototype.addShapeToModifier=function(e){e.pathsData=[]},U.prototype.calculateShapeEdges=function(e,t,n,r,i){var a=[];t<=1?a.push({s:e,e:t}):e>=1?a.push({s:e-1,e:t-1}):(a.push({s:e,e:1}),a.push({s:0,e:t-1}));var o=[],s,c=a.length,l;for(s=0;s<c;s+=1)if(l=a[s],!(l.e*i<r||l.s*i>r+n)){var u=l.s*i<=r?0:(l.s*i-r)/n,d=l.e*i>=r+n?1:(l.e*i-r)/n;o.push([u,d])}return o.length||o.push([0,0]),o},U.prototype.releasePathsData=function(e){var t,n=e.length;for(t=0;t<n;t+=1)Oe.release(e[t]);return e.length=0,e},U.prototype.processShapes=function(e){var t,n;if(this._mdf||e){var r=this.o.v%360/360;if(r<0&&(r+=1),t=this.s.v>1?1+r:this.s.v<0?0+r:this.s.v+r,n=this.e.v>1?1+r:this.e.v<0?0+r:this.e.v+r,t>n){var i=t;t=n,n=i}t=Math.round(t*1e4)*1e-4,n=Math.round(n*1e4)*1e-4,this.sValue=t,this.eValue=n}else t=this.sValue,n=this.eValue;var a,o,s=this.shapes.length,c,l,u,d,f,p=0;if(n===t)for(o=0;o<s;o+=1)this.shapes[o].localShapeCollection.releaseShapes(),this.shapes[o].shape._mdf=!0,this.shapes[o].shape.paths=this.shapes[o].localShapeCollection,this._mdf&&(this.shapes[o].pathsData.length=0);else if(!(n===1&&t===0||n===0&&t===1)){var m=[],h,g;for(o=0;o<s;o+=1)if(h=this.shapes[o],!h.shape._mdf&&!this._mdf&&!e&&this.m!==2)h.shape.paths=h.localShapeCollection;else{if(a=h.shape.paths,l=a._length,f=0,!h.shape._mdf&&h.pathsData.length)f=h.totalShapeLength;else{for(u=this.releasePathsData(h.pathsData),c=0;c<l;c+=1)d=Ae.getSegmentsLength(a.shapes[c]),u.push(d),f+=d.totalLength;h.totalShapeLength=f,h.pathsData=u}p+=f,h.shape._mdf=!0}var _=t,v=n,y=0,b;for(o=s-1;o>=0;--o)if(h=this.shapes[o],h.shape._mdf){for(g=h.localShapeCollection,g.releaseShapes(),this.m===2&&s>1?(b=this.calculateShapeEdges(t,n,h.totalShapeLength,y,p),y+=h.totalShapeLength):b=[[_,v]],l=b.length,c=0;c<l;c+=1){_=b[c][0],v=b[c][1],m.length=0,v<=1?m.push({s:h.totalShapeLength*_,e:h.totalShapeLength*v}):_>=1?m.push({s:h.totalShapeLength*(_-1),e:h.totalShapeLength*(v-1)}):(m.push({s:h.totalShapeLength*_,e:h.totalShapeLength}),m.push({s:0,e:h.totalShapeLength*(v-1)}));var x=this.addShapes(h,m[0]);if(m[0].s!==m[0].e){if(m.length>1)if(h.shape.paths.shapes[h.shape.paths._length-1].c){var S=x.pop();this.addPaths(x,g),x=this.addShapes(h,m[1],S)}else this.addPaths(x,g),x=this.addShapes(h,m[1]);this.addPaths(x,g)}}h.shape.paths=g}}else if(this._mdf)for(o=0;o<s;o+=1)this.shapes[o].pathsData.length=0,this.shapes[o].shape._mdf=!0},U.prototype.addPaths=function(e,t){var n,r=e.length;for(n=0;n<r;n+=1)t.addShape(e[n])},U.prototype.addSegment=function(e,t,n,r,i,a,o){i.setXYAt(t[0],t[1],`o`,a),i.setXYAt(n[0],n[1],`i`,a+1),o&&i.setXYAt(e[0],e[1],`v`,a),i.setXYAt(r[0],r[1],`v`,a+1)},U.prototype.addSegmentFromArray=function(e,t,n,r){t.setXYAt(e[1],e[5],`o`,n),t.setXYAt(e[2],e[6],`i`,n+1),r&&t.setXYAt(e[0],e[4],`v`,n),t.setXYAt(e[3],e[7],`v`,n+1)},U.prototype.addShapes=function(e,t,n){var r=e.pathsData,i=e.shape.paths.shapes,a,o=e.shape.paths._length,s,c,l=0,u,d,f,p,m=[],h,g=!0;for(n?(d=n._length,h=n._length):(n=Je.newElement(),d=0,h=0),m.push(n),a=0;a<o;a+=1){for(f=r[a].lengths,n.c=i[a].c,c=i[a].c?f.length:f.length+1,s=1;s<c;s+=1)if(u=f[s-1],l+u.addedLength<t.s)l+=u.addedLength,n.c=!1;else if(l>t.e){n.c=!1;break}else t.s<=l&&t.e>=l+u.addedLength?(this.addSegment(i[a].v[s-1],i[a].o[s-1],i[a].i[s],i[a].v[s],n,d,g),g=!1):(p=Ae.getNewSegment(i[a].v[s-1],i[a].v[s],i[a].o[s-1],i[a].i[s],(t.s-l)/u.addedLength,(t.e-l)/u.addedLength,f[s-1]),this.addSegmentFromArray(p,n,d,g),g=!1,n.c=!1),l+=u.addedLength,d+=1;if(i[a].c&&f.length){if(u=f[s-1],l<=t.e){var _=f[s-1].addedLength;t.s<=l&&t.e>=l+_?(this.addSegment(i[a].v[s-1],i[a].o[s-1],i[a].i[0],i[a].v[0],n,d,g),g=!1):(p=Ae.getNewSegment(i[a].v[s-1],i[a].v[0],i[a].o[s-1],i[a].i[0],(t.s-l)/_,(t.e-l)/_,f[s-1]),this.addSegmentFromArray(p,n,d,g),g=!1,n.c=!1)}else n.c=!1;l+=u.addedLength,d+=1}if(n._length&&(n.setXYAt(n.v[h][0],n.v[h][1],`i`,h),n.setXYAt(n.v[n._length-1][0],n.v[n._length-1][1],`o`,n._length-1)),l>t.e)break;a<o-1&&(n=Je.newElement(),g=!0,m.push(n),d=0)}return m};function yt(){}u([vt],yt),yt.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=B.getProp(e,t.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},yt.prototype.processPath=function(e,t){var n=t/100,r=[0,0],i=e._length,a=0;for(a=0;a<i;a+=1)r[0]+=e.v[a][0],r[1]+=e.v[a][1];r[0]/=i,r[1]/=i;var o=Je.newElement();o.c=e.c;var s,c,l,u,d,f;for(a=0;a<i;a+=1)s=e.v[a][0]+(r[0]-e.v[a][0])*n,c=e.v[a][1]+(r[1]-e.v[a][1])*n,l=e.o[a][0]+(r[0]-e.o[a][0])*-n,u=e.o[a][1]+(r[1]-e.o[a][1])*-n,d=e.i[a][0]+(r[0]-e.i[a][0])*-n,f=e.i[a][1]+(r[1]-e.i[a][1])*-n,o.setTripleAt(s,c,l,u,d,f,a);return o},yt.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.amount.v;if(o!==0){var s,c;for(n=0;n<r;n+=1){if(s=this.shapes[n],c=s.localShapeCollection,!(!s.shape._mdf&&!this._mdf&&!e))for(c.releaseShapes(),s.shape._mdf=!0,t=s.shape.paths.shapes,a=s.shape.paths._length,i=0;i<a;i+=1)c.addShape(this.processPath(t[i],o));s.shape.paths=s.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};var bt=function(){var e=[0,0];function t(e){var t=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||t,this.a&&e.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&e.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&e.skewFromAxis(-this.sk.v,this.sa.v),this.r?e.rotate(-this.r.v):e.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?e.translate(this.px.v,this.py.v,-this.pz.v):e.translate(this.px.v,this.py.v,0):e.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}function n(t){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&=(this.precalculateMatrix(),!1),this.iterateDynamicProperties(),this._mdf||t){var n;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var r,i;if(n=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(r=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/n,0),i=this.p.getValueAtTime(this.p.keyframes[0].t/n,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(r=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/n,0),i=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/n,0)):(r=this.p.pv,i=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/n,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){r=[],i=[];var a=this.px,o=this.py;a._caching.lastFrame+a.offsetTime<=a.keyframes[0].t?(r[0]=a.getValueAtTime((a.keyframes[0].t+.01)/n,0),r[1]=o.getValueAtTime((o.keyframes[0].t+.01)/n,0),i[0]=a.getValueAtTime(a.keyframes[0].t/n,0),i[1]=o.getValueAtTime(o.keyframes[0].t/n,0)):a._caching.lastFrame+a.offsetTime>=a.keyframes[a.keyframes.length-1].t?(r[0]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/n,0),r[1]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/n,0),i[0]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/n,0),i[1]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/n,0)):(r=[a.pv,o.pv],i[0]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/n,a.offsetTime),i[1]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/n,o.offsetTime))}else i=e,r=i;this.v.rotate(-Math.atan2(r[1]-i[1],r[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}}function r(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length)this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1;else return;if(!this.s.effectsSequence.length)this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2;else return;if(this.sk)if(!this.sk.effectsSequence.length&&!this.sa.effectsSequence.length)this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3;else return;this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):!this.rz.effectsSequence.length&&!this.ry.effectsSequence.length&&!this.rx.effectsSequence.length&&!this.or.effectsSequence.length&&(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}function i(){}function a(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0}function o(e,t,n){if(this.elem=e,this.frameId=-1,this.propType=`transform`,this.data=t,this.v=new Qe,this.pre=new Qe,this.appliedTransformations=0,this.initDynamicPropertyContainer(n||e),t.p&&t.p.s?(this.px=B.getProp(e,t.p.x,0,0,this),this.py=B.getProp(e,t.p.y,0,0,this),t.p.z&&(this.pz=B.getProp(e,t.p.z,0,0,this))):this.p=B.getProp(e,t.p||{k:[0,0,0]},1,0,this),t.rx){if(this.rx=B.getProp(e,t.rx,0,D,this),this.ry=B.getProp(e,t.ry,0,D,this),this.rz=B.getProp(e,t.rz,0,D,this),t.or.k[0].ti){var r,i=t.or.k.length;for(r=0;r<i;r+=1)t.or.k[r].to=null,t.or.k[r].ti=null}this.or=B.getProp(e,t.or,1,D,this),this.or.sh=!0}else this.r=B.getProp(e,t.r||{k:0},0,D,this);t.sk&&(this.sk=B.getProp(e,t.sk,0,D,this),this.sa=B.getProp(e,t.sa,0,D,this)),this.a=B.getProp(e,t.a||{k:[0,0,0]},1,0,this),this.s=B.getProp(e,t.s||{k:[100,100,100]},1,.01,this),t.o?this.o=B.getProp(e,t.o,0,.01,e):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}o.prototype={applyToMatrix:t,getValue:n,precalculateMatrix:r,autoOrient:i},u([Ge],o),o.prototype.addDynamicProperty=a,o.prototype._addDynamicProperty=Ge.prototype.addDynamicProperty;function s(e,t,n){return new o(e,t,n)}return{getTransformProperty:s}}();function xt(){}u([vt],xt),xt.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.c=B.getProp(e,t.c,0,null,this),this.o=B.getProp(e,t.o,0,null,this),this.tr=bt.getTransformProperty(e,t.tr,this),this.so=B.getProp(e,t.tr.so,0,.01,this),this.eo=B.getProp(e,t.tr.eo,0,.01,this),this.data=t,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Qe,this.rMatrix=new Qe,this.sMatrix=new Qe,this.tMatrix=new Qe,this.matrix=new Qe},xt.prototype.applyTransforms=function(e,t,n,r,i,a){var o=a?-1:1,s=r.s.v[0]+(1-r.s.v[0])*(1-i),c=r.s.v[1]+(1-r.s.v[1])*(1-i);e.translate(r.p.v[0]*o*i,r.p.v[1]*o*i,r.p.v[2]),t.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),t.rotate(-r.r.v*o*i),t.translate(r.a.v[0],r.a.v[1],r.a.v[2]),n.translate(-r.a.v[0],-r.a.v[1],r.a.v[2]),n.scale(a?1/s:s,a?1/c:c),n.translate(r.a.v[0],r.a.v[1],r.a.v[2])},xt.prototype.init=function(e,t,n,r){for(this.elem=e,this.arr=t,this.pos=n,this.elemsData=r,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(e),this.initModifierProperties(e,t[n]);n>0;)--n,this._elements.unshift(t[n]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},xt.prototype.resetElements=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t]._processed=!1,e[t].ty===`gr`&&this.resetElements(e[t].it)},xt.prototype.cloneElements=function(e){var t=JSON.parse(JSON.stringify(e));return this.resetElements(t),t},xt.prototype.changeGroupRender=function(e,t){var n,r=e.length;for(n=0;n<r;n+=1)e[n]._render=t,e[n].ty===`gr`&&this.changeGroupRender(e[n].it,t)},xt.prototype.processShapes=function(e){var t,n,r,i,a,o=!1;if(this._mdf||e){var s=Math.ceil(this.c.v);if(this._groups.length<s){for(;this._groups.length<s;){var c={it:this.cloneElements(this._elements),ty:`gr`};c.it.push({a:{a:0,ix:1,k:[0,0]},nm:`Transform`,o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:`tr`}),this.arr.splice(0,0,c),this._groups.splice(0,0,c),this._currentCopies+=1}this.elem.reloadShapes(),o=!0}a=0;var l;for(r=0;r<=this._groups.length-1;r+=1){if(l=a<s,this._groups[r]._render=l,this.changeGroupRender(this._groups[r].it,l),!l){var u=this.elemsData[r].it,d=u[u.length-1];d.transform.op.v===0?d.transform.op._mdf=!1:(d.transform.op._mdf=!0,d.transform.op.v=0)}a+=1}this._currentCopies=s;var f=this.o.v,p=f%1,m=f>0?Math.floor(f):Math.ceil(f),h=this.pMatrix.props,g=this.rMatrix.props,_=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v=0;if(f>0){for(;v<m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),v+=1;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,p,!1),v+=p)}else if(f<0){for(;v>m;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),--v;p&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-p,!0),v-=p)}r=this.data.m===1?0:this._currentCopies-1,i=this.data.m===1?1:-1,a=this._currentCopies;for(var y,b;a;){if(t=this.elemsData[r].it,n=t[t.length-1].transform.mProps.v.props,b=n.length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=this._currentCopies===1?this.so.v:this.so.v+(this.eo.v-this.so.v)*(r/(this._currentCopies-1)),v!==0){for((r!==0&&i===1||r!==this._currentCopies-1&&i===-1)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(_[0],_[1],_[2],_[3],_[4],_[5],_[6],_[7],_[8],_[9],_[10],_[11],_[12],_[13],_[14],_[15]),this.matrix.transform(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[8],h[9],h[10],h[11],h[12],h[13],h[14],h[15]),y=0;y<b;y+=1)n[y]=this.matrix.props[y];this.matrix.reset()}else for(this.matrix.reset(),y=0;y<b;y+=1)n[y]=this.matrix.props[y];v+=1,--a,r+=i}}else for(a=this._currentCopies,r=0,i=1;a;)t=this.elemsData[r].it,n=t[t.length-1].transform.mProps.v.props,t[t.length-1].transform.mProps._mdf=!1,t[t.length-1].transform.op._mdf=!1,--a,r+=i;return o},xt.prototype.addShape=function(){};function St(){}u([vt],St),St.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.rd=B.getProp(e,t.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},St.prototype.processPath=function(e,t){var n=Je.newElement();n.c=e.c;var r,i=e._length,a,o,s,c,l,u,d=0,f,p,m,h,g,_;for(r=0;r<i;r+=1)a=e.v[r],s=e.o[r],o=e.i[r],a[0]===s[0]&&a[1]===s[1]&&a[0]===o[0]&&a[1]===o[1]?(r===0||r===i-1)&&!e.c?(n.setTripleAt(a[0],a[1],s[0],s[1],o[0],o[1],d),d+=1):(c=r===0?e.v[i-1]:e.v[r-1],l=Math.sqrt((a[0]-c[0])**2+(a[1]-c[1])**2),u=l?Math.min(l/2,t)/l:0,g=a[0]+(c[0]-a[0])*u,f=g,_=a[1]-(a[1]-c[1])*u,p=_,m=f-(f-a[0])*O,h=p-(p-a[1])*O,n.setTripleAt(f,p,m,h,g,_,d),d+=1,c=r===i-1?e.v[0]:e.v[r+1],l=Math.sqrt((a[0]-c[0])**2+(a[1]-c[1])**2),u=l?Math.min(l/2,t)/l:0,m=a[0]+(c[0]-a[0])*u,f=m,h=a[1]+(c[1]-a[1])*u,p=h,g=f-(f-a[0])*O,_=p-(p-a[1])*O,n.setTripleAt(f,p,m,h,g,_,d),d+=1):(n.setTripleAt(e.v[r][0],e.v[r][1],e.o[r][0],e.o[r][1],e.i[r][0],e.i[r][1],d),d+=1);return n},St.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.rd.v;if(o!==0){var s,c;for(n=0;n<r;n+=1){if(s=this.shapes[n],c=s.localShapeCollection,!(!s.shape._mdf&&!this._mdf&&!e))for(c.releaseShapes(),s.shape._mdf=!0,t=s.shape.paths.shapes,a=s.shape.paths._length,i=0;i<a;i+=1)c.addShape(this.processPath(t[i],o));s.shape.paths=s.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function Ct(e,t){return Math.abs(e-t)*1e5<=Math.min(Math.abs(e),Math.abs(t))}function wt(e){return Math.abs(e)<=1e-5}function Tt(e,t,n){return e*(1-n)+t*n}function Et(e,t,n){return[Tt(e[0],t[0],n),Tt(e[1],t[1],n)]}function Dt(e,t,n){if(e===0)return[];var r=t*t-4*e*n;if(r<0)return[];var i=-t/(2*e);if(r===0)return[i];var a=Math.sqrt(r)/(2*e);return[i-a,i+a]}function Ot(e,t,n,r){return[-e+3*t-3*n+r,3*e-6*t+3*n,-3*e+3*t,e]}function kt(e){return new At(e,e,e,e,!1)}function At(e,t,n,r,i){i&&Y(e,t)&&(t=Et(e,r,1/3)),i&&Y(n,r)&&(n=Et(e,r,2/3));var a=Ot(e[0],t[0],n[0],r[0]),o=Ot(e[1],t[1],n[1],r[1]);this.a=[a[0],o[0]],this.b=[a[1],o[1]],this.c=[a[2],o[2]],this.d=[a[3],o[3]],this.points=[e,t,n,r]}At.prototype.point=function(e){return[((this.a[0]*e+this.b[0])*e+this.c[0])*e+this.d[0],((this.a[1]*e+this.b[1])*e+this.c[1])*e+this.d[1]]},At.prototype.derivative=function(e){return[(3*e*this.a[0]+2*this.b[0])*e+this.c[0],(3*e*this.a[1]+2*this.b[1])*e+this.c[1]]},At.prototype.tangentAngle=function(e){var t=this.derivative(e);return Math.atan2(t[1],t[0])},At.prototype.normalAngle=function(e){var t=this.derivative(e);return Math.atan2(t[0],t[1])},At.prototype.inflectionPoints=function(){var e=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(wt(e))return[];var t=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/e,n=t*t-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/e;if(n<0)return[];var r=Math.sqrt(n);return wt(r)?r>0&&r<1?[t]:[]:[t-r,t+r].filter(function(e){return e>0&&e<1})},At.prototype.split=function(e){if(e<=0)return[kt(this.points[0]),this];if(e>=1)return[this,kt(this.points[this.points.length-1])];var t=Et(this.points[0],this.points[1],e),n=Et(this.points[1],this.points[2],e),r=Et(this.points[2],this.points[3],e),i=Et(t,n,e),a=Et(n,r,e),o=Et(i,a,e);return[new At(this.points[0],t,i,o,!0),new At(o,a,r,this.points[3],!0)]};function jt(e,t){var n=e.points[0][t],r=e.points[e.points.length-1][t];if(n>r){var i=r;r=n,n=i}for(var a=Dt(3*e.a[t],2*e.b[t],e.c[t]),o=0;o<a.length;o+=1)if(a[o]>0&&a[o]<1){var s=e.point(a[o])[t];s<n?n=s:s>r&&(r=s)}return{min:n,max:r}}At.prototype.bounds=function(){return{x:jt(this,0),y:jt(this,1)}},At.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}};function W(e,t,n){var r=e.boundingBox();return{cx:r.cx,cy:r.cy,width:r.width,height:r.height,bez:e,t:(t+n)/2,t1:t,t2:n}}function Mt(e){var t=e.bez.split(.5);return[W(t[0],e.t1,e.t),W(t[1],e.t,e.t2)]}function Nt(e,t){return Math.abs(e.cx-t.cx)*2<e.width+t.width&&Math.abs(e.cy-t.cy)*2<e.height+t.height}function Pt(e,t,n,r,i,a){if(Nt(e,t)){if(n>=a||e.width<=r&&e.height<=r&&t.width<=r&&t.height<=r){i.push([e.t,t.t]);return}var o=Mt(e),s=Mt(t);Pt(o[0],s[0],n+1,r,i,a),Pt(o[0],s[1],n+1,r,i,a),Pt(o[1],s[0],n+1,r,i,a),Pt(o[1],s[1],n+1,r,i,a)}}At.prototype.intersections=function(e,t,n){t===void 0&&(t=2),n===void 0&&(n=7);var r=[];return Pt(W(this,0,1),W(e,0,1),0,t,r,n),r},At.shapeSegment=function(e,t){var n=(t+1)%e.length();return new At(e.v[t],e.o[t],e.i[n],e.v[n],!0)},At.shapeSegmentInverted=function(e,t){var n=(t+1)%e.length();return new At(e.v[n],e.i[n],e.o[t],e.v[t],!0)};function G(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function K(e,t,n,r){var i=[e[0],e[1],1],a=[t[0],t[1],1],o=[n[0],n[1],1],s=[r[0],r[1],1],c=G(G(i,a),G(o,s));return wt(c[2])?null:[c[0]/c[2],c[1]/c[2]]}function q(e,t,n){return[e[0]+Math.cos(t)*n,e[1]-Math.sin(t)*n]}function J(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function Y(e,t){return Ct(e[0],t[0])&&Ct(e[1],t[1])}function Ft(){}u([vt],Ft),Ft.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=B.getProp(e,t.s,0,null,this),this.frequency=B.getProp(e,t.r,0,null,this),this.pointsType=B.getProp(e,t.pt,0,null,this),this._isAnimated=this.amplitude.effectsSequence.length!==0||this.frequency.effectsSequence.length!==0||this.pointsType.effectsSequence.length!==0};function It(e,t,n,r,i,a,o){var s=n-Math.PI/2,c=n+Math.PI/2,l=t[0]+Math.cos(n)*r*i,u=t[1]-Math.sin(n)*r*i;e.setTripleAt(l,u,l+Math.cos(s)*a,u-Math.sin(s)*a,l+Math.cos(c)*o,u-Math.sin(c)*o,e.length())}function Lt(e,t){var n=[t[0]-e[0],t[1]-e[1]],r=-Math.PI*.5;return[Math.cos(r)*n[0]-Math.sin(r)*n[1],Math.sin(r)*n[0]+Math.cos(r)*n[1]]}function Rt(e,t){var n=t===0?e.length()-1:t-1,r=(t+1)%e.length(),i=e.v[n],a=e.v[r],o=Lt(i,a);return Math.atan2(0,1)-Math.atan2(o[1],o[0])}function zt(e,t,n,r,i,a,o){var s=Rt(t,n),c=t.v[n%t._length],l=t.v[n===0?t._length-1:n-1],u=t.v[(n+1)%t._length],d=a===2?Math.sqrt((c[0]-l[0])**2+(c[1]-l[1])**2):0,f=a===2?Math.sqrt((c[0]-u[0])**2+(c[1]-u[1])**2):0;It(e,t.v[n%t._length],s,o,r,f/((i+1)*2),d/((i+1)*2),a)}function Bt(e,t,n,r,i,a){for(var o=0;o<r;o+=1){var s=(o+1)/(r+1),c=i===2?Math.sqrt((t.points[3][0]-t.points[0][0])**2+(t.points[3][1]-t.points[0][1])**2):0,l=t.normalAngle(s);It(e,t.point(s),l,a,n,c/((r+1)*2),c/((r+1)*2),i),a=-a}return a}Ft.prototype.processPath=function(e,t,n,r){var i=e._length,a=Je.newElement();if(a.c=e.c,e.c||--i,i===0)return a;var o=-1,s=At.shapeSegment(e,0);zt(a,e,0,t,n,r,o);for(var c=0;c<i;c+=1)o=Bt(a,s,t,n,r,-o),s=c===i-1&&!e.c?null:At.shapeSegment(e,(c+1)%i),zt(a,e,c+1,t,n,r,o);return a},Ft.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.amplitude.v,s=Math.max(0,Math.round(this.frequency.v)),c=this.pointsType.v;if(o!==0){var l,u;for(n=0;n<r;n+=1){if(l=this.shapes[n],u=l.localShapeCollection,!(!l.shape._mdf&&!this._mdf&&!e))for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,a=l.shape.paths._length,i=0;i<a;i+=1)u.addShape(this.processPath(t[i],o,s,c));l.shape.paths=l.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function Vt(e,t,n){var r=Math.atan2(t[0]-e[0],t[1]-e[1]);return[q(e,r,n),q(t,r,n)]}function Ht(e,t){var n,r,i,a,o,s,c=Vt(e.points[0],e.points[1],t);n=c[0],r=c[1],c=Vt(e.points[1],e.points[2],t),i=c[0],a=c[1],c=Vt(e.points[2],e.points[3],t),o=c[0],s=c[1];var l=K(n,r,i,a);l===null&&(l=r);var u=K(o,s,i,a);return u===null&&(u=o),new At(n,l,u,s)}function Ut(e,t,n,r,i){var a=t.points[3],o=n.points[0];if(r===3||Y(a,o))return a;if(r===2){var s=-t.tangentAngle(1),c=-n.tangentAngle(0)+Math.PI,l=K(a,q(a,s+Math.PI/2,100),o,q(o,s+Math.PI/2,100)),u=l?J(l,a):J(a,o)/2,d=q(a,s,2*u*O);return e.setXYAt(d[0],d[1],`o`,e.length()-1),d=q(o,c,2*u*O),e.setTripleAt(o[0],o[1],o[0],o[1],d[0],d[1],e.length()),o}var f=K(Y(a,t.points[2])?t.points[0]:t.points[2],a,o,Y(o,n.points[1])?n.points[3]:n.points[1]);return f&&J(f,a)<i?(e.setTripleAt(f[0],f[1],f[0],f[1],f[0],f[1],e.length()),f):a}function Wt(e,t){var n=e.intersections(t);return n.length&&Ct(n[0][0],1)&&n.shift(),n.length?n[0]:null}function Gt(e,t){var n=e.slice(),r=t.slice(),i=Wt(e[e.length-1],t[0]);return i&&(n[e.length-1]=e[e.length-1].split(i[0])[0],r[0]=t[0].split(i[1])[1]),e.length>1&&t.length>1&&(i=Wt(e[0],t[t.length-1]),i)?[[e[0].split(i[0])[0]],[t[t.length-1].split(i[1])[1]]]:[n,r]}function Kt(e){for(var t,n=1;n<e.length;n+=1)t=Gt(e[n-1],e[n]),e[n-1]=t[0],e[n]=t[1];return e.length>1&&(t=Gt(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function qt(e,t){var n=e.inflectionPoints(),r,i,a,o;if(n.length===0)return[Ht(e,t)];if(n.length===1||Ct(n[1],1))return a=e.split(n[0]),r=a[0],i=a[1],[Ht(r,t),Ht(i,t)];a=e.split(n[0]),r=a[0];var s=(n[1]-n[0])/(1-n[0]);return a=a[1].split(s),o=a[0],i=a[1],[Ht(r,t),Ht(o,t),Ht(i,t)]}function Jt(){}u([vt],Jt),Jt.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amount=B.getProp(e,t.a,0,null,this),this.miterLimit=B.getProp(e,t.ml,0,null,this),this.lineJoin=t.lj,this._isAnimated=this.amount.effectsSequence.length!==0},Jt.prototype.processPath=function(e,t,n,r){var i=Je.newElement();i.c=e.c;var a=e.length();e.c||--a;var o,s,c,l=[];for(o=0;o<a;o+=1)c=At.shapeSegment(e,o),l.push(qt(c,t));if(!e.c)for(o=a-1;o>=0;--o)c=At.shapeSegmentInverted(e,o),l.push(qt(c,t));l=Kt(l);var u=null,d=null;for(o=0;o<l.length;o+=1){var f=l[o];for(d&&(u=Ut(i,d,f[0],n,r)),d=f[f.length-1],s=0;s<f.length;s+=1)c=f[s],u&&Y(c.points[0],u)?i.setXYAt(c.points[1][0],c.points[1][1],`o`,i.length()-1):i.setTripleAt(c.points[0][0],c.points[0][1],c.points[1][0],c.points[1][1],c.points[0][0],c.points[0][1],i.length()),i.setTripleAt(c.points[3][0],c.points[3][1],c.points[3][0],c.points[3][1],c.points[2][0],c.points[2][1],i.length()),u=c.points[3]}return l.length&&Ut(i,d,l[0][0],n,r),i},Jt.prototype.processShapes=function(e){var t,n,r=this.shapes.length,i,a,o=this.amount.v,s=this.miterLimit.v,c=this.lineJoin;if(o!==0){var l,u;for(n=0;n<r;n+=1){if(l=this.shapes[n],u=l.localShapeCollection,!(!l.shape._mdf&&!this._mdf&&!e))for(u.releaseShapes(),l.shape._mdf=!0,t=l.shape.paths.shapes,a=l.shape.paths._length,i=0;i<a;i+=1)u.addShape(this.processPath(t[i],o,c,s));l.shape.paths=l.localShapeCollection}}this.dynamicProperties.length||(this._mdf=!1)};function Yt(e){for(var t=e.fStyle?e.fStyle.split(` `):[],n=`normal`,r=`normal`,i=t.length,a,o=0;o<i;o+=1)switch(a=t[o].toLowerCase(),a){case`italic`:r=`italic`;break;case`bold`:n=`700`;break;case`black`:n=`900`;break;case`medium`:n=`500`;break;case`regular`:case`normal`:n=`400`;break;case`light`:case`thin`:n=`200`;break;default:break}return{style:r,weight:e.fWeight||n}}var Xt=function(){var e={w:0,size:0,shapes:[],data:{shapes:[]}},t=[];t=t.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var n=127988,r=917631,i=917601,a=917626,o=65039,s=8205,c=127462,u=127487,d=[`d83cdffb`,`d83cdffc`,`d83cdffd`,`d83cdffe`,`d83cdfff`];function f(e){var t=e.split(`,`),n,r=t.length,i=[];for(n=0;n<r;n+=1)t[n]!==`sans-serif`&&t[n]!==`monospace`&&i.push(t[n]);return i.join(`,`)}function p(e,t){var n=l(`span`);n.setAttribute(`aria-hidden`,!0),n.style.fontFamily=t;var r=l(`span`);r.innerText=`giItT1WQy@!-/#`,n.style.position=`absolute`,n.style.left=`-10000px`,n.style.top=`-10000px`,n.style.fontSize=`300px`,n.style.fontVariant=`normal`,n.style.fontStyle=`normal`,n.style.fontWeight=`normal`,n.style.letterSpacing=`0`,n.appendChild(r),document.body.appendChild(n);var i=r.offsetWidth;return r.style.fontFamily=f(e)+`, `+t,{node:r,w:i,parent:n}}function m(){var e,t=this.fonts.length,n,r,i=t;for(e=0;e<t;e+=1)this.fonts[e].loaded?--i:this.fonts[e].fOrigin===`n`||this.fonts[e].origin===0?this.fonts[e].loaded=!0:(n=this.fonts[e].monoCase.node,r=this.fonts[e].monoCase.w,n.offsetWidth===r?(n=this.fonts[e].sansCase.node,r=this.fonts[e].sansCase.w,n.offsetWidth!==r&&(--i,this.fonts[e].loaded=!0)):(--i,this.fonts[e].loaded=!0),this.fonts[e].loaded&&(this.fonts[e].sansCase.parent.parentNode.removeChild(this.fonts[e].sansCase.parent),this.fonts[e].monoCase.parent.parentNode.removeChild(this.fonts[e].monoCase.parent)));i!==0&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)}function h(e,t){var n=document.body&&t?`svg`:`canvas`,r,i=Yt(e);if(n===`svg`){var a=R(`text`);a.style.fontSize=`100px`,a.setAttribute(`font-family`,e.fFamily),a.setAttribute(`font-style`,i.style),a.setAttribute(`font-weight`,i.weight),a.textContent=`1`,e.fClass?(a.style.fontFamily=`inherit`,a.setAttribute(`class`,e.fClass)):a.style.fontFamily=e.fFamily,t.appendChild(a),r=a}else{var o=new OffscreenCanvas(500,500).getContext(`2d`);o.font=i.style+` `+i.weight+` 100px `+e.fFamily,r=o}function s(e){return n===`svg`?(r.textContent=e,r.getComputedTextLength()):r.measureText(e).width}return{measureText:s}}function g(e,t){if(!e){this.isLoaded=!0;return}if(this.chars){this.isLoaded=!0,this.fonts=e.list;return}if(!document.body){this.isLoaded=!0,e.list.forEach(function(e){e.helper=h(e),e.cache={}}),this.fonts=e.list;return}var n=e.list,r,i=n.length,a=i;for(r=0;r<i;r+=1){var o=!0,s,c;if(n[r].loaded=!1,n[r].monoCase=p(n[r].fFamily,`monospace`),n[r].sansCase=p(n[r].fFamily,`sans-serif`),!n[r].fPath)n[r].loaded=!0,--a;else if(n[r].fOrigin===`p`||n[r].origin===3){if(s=document.querySelectorAll(`style[f-forigin="p"][f-family="`+n[r].fFamily+`"], style[f-origin="3"][f-family="`+n[r].fFamily+`"]`),s.length>0&&(o=!1),o){var u=l(`style`);u.setAttribute(`f-forigin`,n[r].fOrigin),u.setAttribute(`f-origin`,n[r].origin),u.setAttribute(`f-family`,n[r].fFamily),u.type=`text/css`,u.innerText=`@font-face {font-family: `+n[r].fFamily+`; font-style: normal; src: url('`+n[r].fPath+`');}`,t.appendChild(u)}}else if(n[r].fOrigin===`g`||n[r].origin===1){for(s=document.querySelectorAll(`link[f-forigin="g"], link[f-origin="1"]`),c=0;c<s.length;c+=1)s[c].href.indexOf(n[r].fPath)!==-1&&(o=!1);if(o){var d=l(`link`);d.setAttribute(`f-forigin`,n[r].fOrigin),d.setAttribute(`f-origin`,n[r].origin),d.type=`text/css`,d.rel=`stylesheet`,d.href=n[r].fPath,document.body.appendChild(d)}}else if(n[r].fOrigin===`t`||n[r].origin===2){for(s=document.querySelectorAll(`script[f-forigin="t"], script[f-origin="2"]`),c=0;c<s.length;c+=1)n[r].fPath===s[c].src&&(o=!1);if(o){var f=l(`link`);f.setAttribute(`f-forigin`,n[r].fOrigin),f.setAttribute(`f-origin`,n[r].origin),f.setAttribute(`rel`,`stylesheet`),f.setAttribute(`href`,n[r].fPath),t.appendChild(f)}}n[r].helper=h(n[r],t),n[r].cache={},this.fonts.push(n[r])}a===0?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}function _(e){if(e){this.chars||=[];var t,n=e.length,r,i=this.chars.length,a;for(t=0;t<n;t+=1){for(r=0,a=!1;r<i;)this.chars[r].style===e[t].style&&this.chars[r].fFamily===e[t].fFamily&&this.chars[r].ch===e[t].ch&&(a=!0),r+=1;a||(this.chars.push(e[t]),i+=1)}}}function v(t,n,r){for(var i=0,a=this.chars.length;i<a;){if(this.chars[i].ch===t&&this.chars[i].style===n&&this.chars[i].fFamily===r)return this.chars[i];i+=1}return(typeof t==`string`&&t.charCodeAt(0)!==13||!t)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn(`Missing character from exported characters list: `,t,n,r)),e}function y(e,t,n){var r=this.getFontByName(t),i=e;if(!r.cache[i]){var a=r.helper;if(e===` `){var o=a.measureText(`|`+e+`|`),s=a.measureText(`||`);r.cache[i]=(o-s)/100}else r.cache[i]=a.measureText(e)/100}return r.cache[i]*n}function b(e){for(var t=0,n=this.fonts.length;t<n;){if(this.fonts[t].fName===e)return this.fonts[t];t+=1}return this.fonts[0]}function x(e){var t=0,n=e.charCodeAt(0);if(n>=55296&&n<=56319){var r=e.charCodeAt(1);r>=56320&&r<=57343&&(t=(n-55296)*1024+r-56320+65536)}return t}function S(e,t){var n=e.toString(16)+t.toString(16);return d.indexOf(n)!==-1}function C(e){return e===s}function w(e){return e===o}function T(e){var t=x(e);return t>=c&&t<=u}function E(e){return T(e.substr(0,2))&&T(e.substr(2,2))}function D(e){return t.indexOf(e)!==-1}function O(e,t){var o=x(e.substr(t,2));if(o!==n)return!1;var s=0;for(t+=2;s<5;){if(o=x(e.substr(t,2)),o<i||o>a)return!1;s+=1,t+=2}return x(e.substr(t,2))===r}function k(){this.isLoaded=!0}var A=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};return A.isModifier=S,A.isZeroWidthJoiner=C,A.isFlagEmoji=E,A.isRegionalCode=T,A.isCombinedCharacter=D,A.isRegionalFlag=O,A.isVariationSelector=w,A.BLACK_FLAG_CODE_POINT=n,A.prototype={addChars:_,addFonts:g,getCharData:v,getFontByName:b,measureText:y,checkLoadedFonts:m,setIsLoaded:k},A}();function Zt(e){this.animationData=e}Zt.prototype.getProp=function(e){return this.animationData.slots&&this.animationData.slots[e.sid]?Object.assign(e,this.animationData.slots[e.sid].p):e};function Qt(e){return new Zt(e)}function $t(){}$t.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(e){this.renderableComponents.indexOf(e)===-1&&this.renderableComponents.push(e)},removeRenderableComponent:function(e){this.renderableComponents.indexOf(e)!==-1&&this.renderableComponents.splice(this.renderableComponents.indexOf(e),1)},prepareRenderableFrame:function(e){this.checkLayerLimits(e)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(e){this.data.ip-this.data.st<=e&&this.data.op-this.data.st>e?this.isInRange!==!0&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):this.isInRange!==!1&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e<t;e+=1)this.renderableComponents[e].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return this.data.ty===5?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var en=function(){var e={0:`source-over`,1:`multiply`,2:`screen`,3:`overlay`,4:`darken`,5:`lighten`,6:`color-dodge`,7:`color-burn`,8:`hard-light`,9:`soft-light`,10:`difference`,11:`exclusion`,12:`hue`,13:`saturation`,14:`color`,15:`luminosity`};return function(t){return e[t]||``}}();function tn(e,t,n){this.p=B.getProp(t,e.v,0,0,n)}function nn(e,t,n){this.p=B.getProp(t,e.v,0,0,n)}function rn(e,t,n){this.p=B.getProp(t,e.v,1,0,n)}function an(e,t,n){this.p=B.getProp(t,e.v,1,0,n)}function on(e,t,n){this.p=B.getProp(t,e.v,0,0,n)}function sn(e,t,n){this.p=B.getProp(t,e.v,0,0,n)}function cn(e,t,n){this.p=B.getProp(t,e.v,0,0,n)}function ln(){this.p={}}function un(e,t){var n=e.ef||[];this.effectElements=[];var r,i=n.length,a;for(r=0;r<i;r+=1)a=new dn(n[r],t),this.effectElements.push(a)}function dn(e,t){this.init(e,t)}u([Ge],dn),dn.prototype.getValue=dn.prototype.iterateDynamicProperties,dn.prototype.init=function(e,t){this.data=e,this.effectElements=[],this.initDynamicPropertyContainer(t);var n,r=this.data.ef.length,i,a=this.data.ef;for(n=0;n<r;n+=1){switch(i=null,a[n].ty){case 0:i=new tn(a[n],t,this);break;case 1:i=new nn(a[n],t,this);break;case 2:i=new rn(a[n],t,this);break;case 3:i=new an(a[n],t,this);break;case 4:case 7:i=new cn(a[n],t,this);break;case 10:i=new on(a[n],t,this);break;case 11:i=new sn(a[n],t,this);break;case 5:i=new un(a[n],t,this);break;default:i=new ln(a[n],t,this);break}i&&this.effectElements.push(i)}};function fn(){}fn.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var e=0,t=this.data.masksProperties.length;e<t;){if(this.data.masksProperties[e].mode!==`n`&&this.data.masksProperties[e].cl!==!1)return!0;e+=1}return!1},initExpressions:function(){var e=ce();if(e){var t=e(`layer`),n=e(`effects`),r=e(`shape`),i=e(`text`),a=e(`comp`);this.layerInterface=t(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var o=n.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(o),this.data.ty===0||this.data.xt?this.compInterface=a(this):this.data.ty===4?(this.layerInterface.shapeInterface=r(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):this.data.ty===5&&(this.layerInterface.textInterface=i(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var e=en(this.data.bm),t=this.baseElement||this.layerElement;t.style[`mix-blend-mode`]=e},initBaseData:function(e,t,n){this.globalData=t,this.comp=n,this.data=e,this.layerId=ee(),this.data.sr||(this.data.sr=1),this.effectsManager=new un(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}};function pn(){}pn.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(e,t){var n,r=this.dynamicProperties.length;for(n=0;n<r;n+=1)(t||this._isParent&&this.dynamicProperties[n].propType===`transform`)&&(this.dynamicProperties[n].getValue(),this.dynamicProperties[n]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(e){this.dynamicProperties.indexOf(e)===-1&&this.dynamicProperties.push(e)}};function mn(e,t,n){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.footageData=t.imageLoader.getAsset(this.assetData),this.initBaseData(e,t,n)}mn.prototype.prepareFrame=function(){},u([$t,fn,pn],mn),mn.prototype.getBaseElement=function(){return null},mn.prototype.renderFrame=function(){},mn.prototype.destroy=function(){},mn.prototype.initExpressions=function(){var e=ce();if(e){var t=e(`footage`);this.layerInterface=t(this)}},mn.prototype.getFootageData=function(){return this.footageData};function X(e,t,n){this.initFrame(),this.initRenderable(),this.assetData=t.getAssetData(e.refId),this.initBaseData(e,t,n),this._isPlaying=!1,this._canPlay=!1;var r=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(r),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=e.tm?B.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0},this.lv=B.getProp(this,e.au&&e.au.lv?e.au.lv:{k:[100]},1,.01,this)}X.prototype.prepareFrame=function(e){if(this.prepareRenderableFrame(e,!0),this.prepareProperties(e,!0),this.tm._placeholder)this._currentTime=e/this.data.sr;else{var t=this.tm.v;this._currentTime=t}this._volume=this.lv.v[0];var n=this._volume*this._volumeMultiplier;this._previousVolume!==n&&(this._previousVolume=n,this.audio.volume(n))},u([$t,fn,pn],X),X.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},X.prototype.show=function(){},X.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},X.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},X.prototype.resume=function(){this._canPlay=!0},X.prototype.setRate=function(e){this.audio.rate(e)},X.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},X.prototype.getBaseElement=function(){return null},X.prototype.destroy=function(){},X.prototype.sourceRectAtTime=function(){},X.prototype.initExpressions=function(){};function hn(){}hn.prototype.checkLayers=function(e){var t,n=this.layers.length,r;for(this.completeLayers=!0,t=n-1;t>=0;--t)this.elements[t]||(r=this.layers[t],r.ip-r.st<=e-this.layers[t].st&&r.op-r.st>e-this.layers[t].st&&this.buildItem(t)),this.completeLayers=this.elements[t]?this.completeLayers:!1;this.checkPendingElements()},hn.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e);default:return this.createNull(e)}},hn.prototype.createCamera=function(){throw Error(`You're using a 3d camera. Try the html renderer.`)},hn.prototype.createAudio=function(e){return new X(e,this.globalData,this)},hn.prototype.createFootage=function(e){return new mn(e,this.globalData,this)},hn.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.buildItem(e);this.checkPendingElements()},hn.prototype.includeLayers=function(e){this.completeLayers=!1;var t,n=e.length,r,i=this.layers.length;for(t=0;t<n;t+=1)for(r=0;r<i;){if(this.layers[r].id===e[t].id){this.layers[r]=e[t];break}r+=1}},hn.prototype.setProjectInterface=function(e){this.globalData.projectInterface=e},hn.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},hn.prototype.buildElementParenting=function(e,t,n){for(var r=this.elements,i=this.layers,a=0,o=i.length;a<o;)i[a].ind==t&&(!r[a]||r[a]===!0?(this.buildItem(a),this.addPendingElement(e)):(n.push(r[a]),r[a].setAsParent(),i[a].parent===void 0?e.setHierarchy(n):this.buildElementParenting(e,i[a].parent,n))),a+=1},hn.prototype.addPendingElement=function(e){this.pendingElements.push(e)},hn.prototype.searchExtraCompositions=function(e){var t,n=e.length;for(t=0;t<n;t+=1)if(e[t].xt){var r=this.createComp(e[t]);r.initExpressions(),this.globalData.projectInterface.registerComposition(r)}},hn.prototype.getElementById=function(e){var t,n=this.elements.length;for(t=0;t<n;t+=1)if(this.elements[t].data.ind===e)return this.elements[t];return null},hn.prototype.getElementByPath=function(e){var t=e.shift(),n;if(typeof t==`number`)n=this.elements[t];else{var r,i=this.elements.length;for(r=0;r<i;r+=1)if(this.elements[r].data.nm===t){n=this.elements[r];break}}return e.length===0?n:n.getElementByPath(e)},hn.prototype.setupGlobalData=function(e,t){this.globalData.fontManager=new Xt,this.globalData.slotManager=Qt(e),this.globalData.fontManager.addChars(e.chars),this.globalData.fontManager.addFonts(e.fonts,t),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=e.fr,this.globalData.nm=e.nm,this.globalData.compSize={w:e.w,h:e.h}};var gn={TRANSFORM_EFFECT:`transformEFfect`};function _n(){}_n.prototype={initTransform:function(){var e=new Qe;this.finalTransform={mProp:this.data.ks?bt.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,n=0,r=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;n<r;){if(this.hierarchy[n].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}n+=1}if(this.finalTransform._matMdf)for(e=this.finalTransform.mProp.v.props,t.cloneFromProps(e),n=0;n<r;n+=1)t.multiply(this.hierarchy[n].finalTransform.mProp.v)}(!this.localTransforms||this.finalTransform._matMdf)&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var e=0,t=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;e<t;)this.localTransforms[e]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[e]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),e+=1;if(this.finalTransform._localMatMdf){var n=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(n),e=1;e<t;e+=1){var r=this.localTransforms[e].matrix;n.multiply(r)}n.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var i=this.finalTransform.localOpacity;for(e=0;e<t;e+=1)i*=this.localTransforms[e].opacity*.01;this.finalTransform.localOpacity=i}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var e=this.renderableEffectsManager.getEffects(gn.TRANSFORM_EFFECT);if(e.length){this.localTransforms=[],this.finalTransform.localMat=new Qe;var t=0,n=e.length;for(t=0;t<n;t+=1)this.localTransforms.push(e[t])}}},globalToLocal:function(e){var t=[];t.push(this.finalTransform);for(var n=!0,r=this.comp;n;)r.finalTransform?(r.data.hasMask&&t.splice(0,0,r.finalTransform),r=r.comp):n=!1;var i,a=t.length,o;for(i=0;i<a;i+=1)o=t[i].mat.applyToPointArray(0,0,0),e=[e[0]-o[0],e[1]-o[1],0];return e},mHelper:new Qe};function vn(e,t,n){this.data=e,this.element=t,this.globalData=n,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var r=this.globalData.defs,i,a=this.masksProperties?this.masksProperties.length:0;this.viewData=m(a),this.solidPath=``;var o,s=this.masksProperties,l=0,u=[],d,f,p=ee(),h,g,_,v,y=`clipPath`,b=`clip-path`;for(i=0;i<a;i+=1)if((s[i].mode!==`a`&&s[i].mode!==`n`||s[i].inv||s[i].o.k!==100||s[i].o.x)&&(y=`mask`,b=`mask`),(s[i].mode===`s`||s[i].mode===`i`)&&l===0?(h=R(`rect`),h.setAttribute(`fill`,`#ffffff`),h.setAttribute(`width`,this.element.comp.data.w||0),h.setAttribute(`height`,this.element.comp.data.h||0),u.push(h)):h=null,o=R(`path`),s[i].mode===`n`)this.viewData[i]={op:B.getProp(this.element,s[i].o,0,.01,this.element),prop:Ze.getShapeProp(this.element,s[i],3),elem:o,lastPath:``},r.appendChild(o);else{l+=1,o.setAttribute(`fill`,s[i].mode===`s`?`#000000`:`#ffffff`),o.setAttribute(`clip-rule`,`nonzero`);var x;if(s[i].x.k===0?(_=null,v=null):(y=`mask`,b=`mask`,v=B.getProp(this.element,s[i].x,0,null,this.element),x=ee(),g=R(`filter`),g.setAttribute(`id`,x),_=R(`feMorphology`),_.setAttribute(`operator`,`erode`),_.setAttribute(`in`,`SourceGraphic`),_.setAttribute(`radius`,`0`),g.appendChild(_),r.appendChild(g),o.setAttribute(`stroke`,s[i].mode===`s`?`#000000`:`#ffffff`)),this.storedData[i]={elem:o,x:v,expan:_,lastPath:``,lastOperator:``,filterId:x,lastRadius:0},s[i].mode===`i`){f=u.length;var S=R(`g`);for(d=0;d<f;d+=1)S.appendChild(u[d]);var C=R(`mask`);C.setAttribute(`mask-type`,`alpha`),C.setAttribute(`id`,p+`_`+l),C.appendChild(o),r.appendChild(C),S.setAttribute(`mask`,`url(`+c()+`#`+p+`_`+l+`)`),u.length=0,u.push(S)}else u.push(o);s[i].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[i]={elem:o,lastPath:``,op:B.getProp(this.element,s[i].o,0,.01,this.element),prop:Ze.getShapeProp(this.element,s[i],3),invRect:h},this.viewData[i].prop.k||this.drawPath(s[i],this.viewData[i].prop.v,this.viewData[i])}for(this.maskElement=R(y),a=u.length,i=0;i<a;i+=1)this.maskElement.appendChild(u[i]);l>0&&(this.maskElement.setAttribute(`id`,p),this.element.maskedElement.setAttribute(b,`url(`+c()+`#`+p+`)`),r.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}vn.prototype.getMaskProperty=function(e){return this.viewData[e].prop},vn.prototype.renderFrame=function(e){var t=this.element.finalTransform.mat,n,r=this.masksProperties.length;for(n=0;n<r;n+=1)if((this.viewData[n].prop._mdf||e)&&this.drawPath(this.masksProperties[n],this.viewData[n].prop.v,this.viewData[n]),(this.viewData[n].op._mdf||e)&&this.viewData[n].elem.setAttribute(`fill-opacity`,this.viewData[n].op.v),this.masksProperties[n].mode!==`n`&&(this.viewData[n].invRect&&(this.element.finalTransform.mProp._mdf||e)&&this.viewData[n].invRect.setAttribute(`transform`,t.getInverseMatrix().to2dCSS()),this.storedData[n].x&&(this.storedData[n].x._mdf||e))){var i=this.storedData[n].expan;this.storedData[n].x.v<0?(this.storedData[n].lastOperator!==`erode`&&(this.storedData[n].lastOperator=`erode`,this.storedData[n].elem.setAttribute(`filter`,`url(`+c()+`#`+this.storedData[n].filterId+`)`)),i.setAttribute(`radius`,-this.storedData[n].x.v)):(this.storedData[n].lastOperator!==`dilate`&&(this.storedData[n].lastOperator=`dilate`,this.storedData[n].elem.setAttribute(`filter`,null)),this.storedData[n].elem.setAttribute(`stroke-width`,this.storedData[n].x.v*2))}},vn.prototype.getMaskelement=function(){return this.maskElement},vn.prototype.createLayerSolidPath=function(){var e=`M0,0 `;return e+=` h`+this.globalData.compSize.w,e+=` v`+this.globalData.compSize.h,e+=` h-`+this.globalData.compSize.w,e+=` v-`+this.globalData.compSize.h+` `,e},vn.prototype.drawPath=function(e,t,n){var r=` M`+t.v[0][0]+`,`+t.v[0][1],i,a=t._length;for(i=1;i<a;i+=1)r+=` C`+t.o[i-1][0]+`,`+t.o[i-1][1]+` `+t.i[i][0]+`,`+t.i[i][1]+` `+t.v[i][0]+`,`+t.v[i][1];if(t.c&&a>1&&(r+=` C`+t.o[i-1][0]+`,`+t.o[i-1][1]+` `+t.i[0][0]+`,`+t.i[0][1]+` `+t.v[0][0]+`,`+t.v[0][1]),n.lastPath!==r){var o=``;n.elem&&(t.c&&(o=e.inv?this.solidPath+r:r),n.elem.setAttribute(`d`,o)),n.lastPath=r}},vn.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var yn=function(){var e={};e.createFilter=t,e.createAlphaToLuminanceFilter=n;function t(e,t){var n=R(`filter`);return n.setAttribute(`id`,e),t!==!0&&(n.setAttribute(`filterUnits`,`objectBoundingBox`),n.setAttribute(`x`,`0%`),n.setAttribute(`y`,`0%`),n.setAttribute(`width`,`100%`),n.setAttribute(`height`,`100%`)),n}function n(){var e=R(`feColorMatrix`);return e.setAttribute(`type`,`matrix`),e.setAttribute(`color-interpolation-filters`,`sRGB`),e.setAttribute(`values`,`0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1`),e}return e}(),bn=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:typeof OffscreenCanvas<`u`};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),xn={},Sn=`filter_result_`;function Cn(e){var t,n=`SourceGraphic`,r=e.data.ef?e.data.ef.length:0,i=ee(),a=yn.createFilter(i,!0),o=0;this.filters=[];var s;for(t=0;t<r;t+=1){s=null;var l=e.data.ef[t].ty;if(xn[l]){var u=xn[l].effect;s=new u(a,e.effectsManager.effectElements[t],e,Sn+o,n),n=Sn+o,xn[l].countsAsEffect&&(o+=1)}s&&this.filters.push(s)}o&&(e.globalData.defs.appendChild(a),e.layerElement.setAttribute(`filter`,`url(`+c()+`#`+i+`)`)),this.filters.length&&e.addRenderableComponent(this)}Cn.prototype.renderFrame=function(e){var t,n=this.filters.length;for(t=0;t<n;t+=1)this.filters[t].renderFrame(e)},Cn.prototype.getEffects=function(e){var t,n=this.filters.length,r=[];for(t=0;t<n;t+=1)this.filters[t].type===e&&r.push(this.filters[t]);return r};function wn(){}wn.prototype={initRendererElement:function(){this.layerElement=R(`g`)},createContainerElements:function(){this.matteElement=R(`g`),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var e=null;if(this.data.td){this.matteMasks={};var t=R(`g`);t.setAttribute(`id`,this.layerId),t.appendChild(this.layerElement),e=t,this.globalData.defs.appendChild(t)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),e=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute(`id`,this.data.ln),this.data.cl&&this.layerElement.setAttribute(`class`,this.data.cl),this.data.ty===0&&!this.data.hd){var n=R(`clipPath`),r=R(`path`);r.setAttribute(`d`,`M0,0 L`+this.data.w+`,0 L`+this.data.w+`,`+this.data.h+` L0,`+this.data.h+`z`);var i=ee();if(n.setAttribute(`id`,i),n.appendChild(r),this.globalData.defs.appendChild(n),this.checkMasks()){var a=R(`g`);a.setAttribute(`clip-path`,`url(`+c()+`#`+i+`)`),a.appendChild(this.layerElement),this.transformedElement=a,e?e.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute(`clip-path`,`url(`+c()+`#`+i+`)`)}this.data.bm!==0&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute(`transform`,this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute(`opacity`,this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new vn(this.data,this,this.globalData),this.renderableEffectsManager=new Cn(this),this.searchEffectTransforms()},getMatte:function(e){if(this.matteMasks||={},!this.matteMasks[e]){var t=this.layerId+`_`+e,n,r,i,a;if(e===1||e===3){var o=R(`mask`);o.setAttribute(`id`,t),o.setAttribute(`mask-type`,e===3?`luminance`:`alpha`),i=R(`use`),i.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,`#`+this.layerId),o.appendChild(i),this.globalData.defs.appendChild(o),!bn.maskType&&e===1&&(o.setAttribute(`mask-type`,`luminance`),n=ee(),r=yn.createFilter(n),this.globalData.defs.appendChild(r),r.appendChild(yn.createAlphaToLuminanceFilter()),a=R(`g`),a.appendChild(i),o.appendChild(a),a.setAttribute(`filter`,`url(`+c()+`#`+n+`)`))}else if(e===2){var s=R(`mask`);s.setAttribute(`id`,t),s.setAttribute(`mask-type`,`alpha`);var l=R(`g`);s.appendChild(l),n=ee(),r=yn.createFilter(n);var u=R(`feComponentTransfer`);u.setAttribute(`in`,`SourceGraphic`),r.appendChild(u);var d=R(`feFuncA`);d.setAttribute(`type`,`table`),d.setAttribute(`tableValues`,`1.0 0.0`),u.appendChild(d),this.globalData.defs.appendChild(r);var f=R(`rect`);f.setAttribute(`width`,this.comp.data.w),f.setAttribute(`height`,this.comp.data.h),f.setAttribute(`x`,`0`),f.setAttribute(`y`,`0`),f.setAttribute(`fill`,`#ffffff`),f.setAttribute(`opacity`,`0`),l.setAttribute(`filter`,`url(`+c()+`#`+n+`)`),l.appendChild(f),i=R(`use`),i.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,`#`+this.layerId),l.appendChild(i),bn.maskType||(s.setAttribute(`mask-type`,`luminance`),r.appendChild(yn.createAlphaToLuminanceFilter()),a=R(`g`),l.appendChild(f),a.appendChild(this.layerElement),l.appendChild(a)),this.globalData.defs.appendChild(s)}this.matteMasks[e]=t}return this.matteMasks[e]},setMatte:function(e){this.matteElement&&this.matteElement.setAttribute(`mask`,`url(`+c()+`#`+e+`)`)}};function Tn(){}Tn.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(e){this.hierarchy=e},setAsParent:function(){this._isParent=!0},checkParenting:function(){this.data.parent!==void 0&&this.comp.buildElementParenting(this,this.data.parent,[])}};function En(){}(function(){u([$t,d({initElement:function(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initTransform(e,t,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){if(!this.hidden&&(!this.isInRange||this.isTransparent)){var e=this.baseElement||this.layerElement;e.style.display=`none`,this.hidden=!0}},show:function(){if(this.isInRange&&!this.isTransparent){if(!this.data.hd){var e=this.baseElement||this.layerElement;e.style.display=`block`}this.hidden=!1,this._isFirstFrame=!0}},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&=!1)},renderInnerContent:function(){},prepareFrame:function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],En)})();function Dn(e,t,n){this.assetData=t.getAssetData(e.refId),this.assetData&&this.assetData.sid&&(this.assetData=t.slotManager.getProp(this.assetData)),this.initElement(e,t,n),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}u([fn,_n,wn,Tn,pn,En],Dn),Dn.prototype.createContent=function(){var e=this.globalData.getAssetsPath(this.assetData);this.innerElem=R(`image`),this.innerElem.setAttribute(`width`,this.assetData.w+`px`),this.innerElem.setAttribute(`height`,this.assetData.h+`px`),this.innerElem.setAttribute(`preserveAspectRatio`,this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS(`http://www.w3.org/1999/xlink`,`href`,e),this.layerElement.appendChild(this.innerElem)},Dn.prototype.sourceRectAtTime=function(){return this.sourceRect};function On(e,t){this.elem=e,this.pos=t}function kn(){}kn.prototype={addShapeToModifiers:function(e){var t,n=this.shapeModifiers.length;for(t=0;t<n;t+=1)this.shapeModifiers[t].addShape(e)},isShapeInAnimatedModifiers:function(e){for(var t=0,n=this.shapeModifiers.length;t<n;)if(this.shapeModifiers[t].isAnimatedWithShape(e))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var e,t=this.shapes.length;for(e=0;e<t;e+=1)this.shapes[e].sh.reset();t=this.shapeModifiers.length;var n;for(e=t-1;e>=0&&(n=this.shapeModifiers[e].processShapes(this._isFirstFrame),!n);--e);}},searchProcessedElement:function(e){for(var t=this.processedElements,n=0,r=t.length;n<r;){if(t[n].elem===e)return t[n].pos;n+=1}return 0},addProcessedElement:function(e,t){for(var n=this.processedElements,r=n.length;r;)if(--r,n[r].elem===e){n[r].pos=t;return}n.push(new On(e,t))},prepareFrame:function(e){this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)}};var An={1:`butt`,2:`round`,3:`square`},jn={1:`miter`,2:`round`,3:`bevel`};function Mn(e,t,n){this.caches=[],this.styles=[],this.transformers=e,this.lStr=``,this.sh=n,this.lvl=t,this._isAnimated=!!n.k;for(var r=0,i=e.length;r<i;){if(e[r].mProps.dynamicProperties.length){this._isAnimated=!0;break}r+=1}}Mn.prototype.setAsAnimated=function(){this._isAnimated=!0};function Nn(e,t){this.data=e,this.type=e.ty,this.d=``,this.lvl=t,this._mdf=!1,this.closed=e.hd===!0,this.pElem=R(`path`),this.msElem=null}Nn.prototype.reset=function(){this.d=``,this._mdf=!1};function Pn(e,t,n,r){this.elem=e,this.frameId=-1,this.dataProps=m(t.length),this.renderer=n,this.k=!1,this.dashStr=``,this.dashArray=p(`float32`,t.length?t.length-1:0),this.dashoffset=p(`float32`,1),this.initDynamicPropertyContainer(r);var i,a=t.length||0,o;for(i=0;i<a;i+=1)o=B.getProp(e,t[i].v,0,0,this),this.k=o.k||this.k,this.dataProps[i]={n:t[i].n,p:o};this.k||this.getValue(!0),this._isAnimated=this.k}Pn.prototype.getValue=function(e){if(!(this.elem.globalData.frameId===this.frameId&&!e)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||e,this._mdf)){var t=0,n=this.dataProps.length;for(this.renderer===`svg`&&(this.dashStr=``),t=0;t<n;t+=1)this.dataProps[t].n===`o`?this.dashoffset[0]=this.dataProps[t].p.v:this.renderer===`svg`?this.dashStr+=` `+this.dataProps[t].p.v:this.dashArray[t]=this.dataProps[t].p.v}},u([Ge],Pn);function Fn(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=B.getProp(e,t.o,0,.01,this),this.w=B.getProp(e,t.w,0,null,this),this.d=new Pn(e,t.d||{},`svg`,this),this.c=B.getProp(e,t.c,1,255,this),this.style=n,this._isAnimated=!!this._isAnimated}u([Ge],Fn);function In(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.o=B.getProp(e,t.o,0,.01,this),this.c=B.getProp(e,t.c,1,255,this),this.style=n}u([Ge],In);function Ln(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.style=n}u([Ge],Ln);function Rn(e,t,n){this.data=t,this.c=p(`uint8c`,t.p*4);var r=t.k.k[0].s?t.k.k[0].s.length-t.p*4:t.k.k.length-t.p*4;this.o=p(`float32`,r),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=r,this.initDynamicPropertyContainer(n),this.prop=B.getProp(e,t.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}Rn.prototype.comparePoints=function(e,t){for(var n=0,r=this.o.length/2,i;n<r;){if(i=Math.abs(e[n*4]-e[t*4+n*2]),i>.01)return!1;n+=1}return!0},Rn.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e<t;){if(!this.comparePoints(this.data.k.k[e].s,this.data.p))return!1;e+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},Rn.prototype.getValue=function(e){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||e){var t,n=this.data.p*4,r,i;for(t=0;t<n;t+=1)r=t%4==0?100:255,i=Math.round(this.prop.v[t]*r),this.c[t]!==i&&(this.c[t]=i,this._cmdf=!e);if(this.o.length)for(n=this.prop.v.length,t=this.data.p*4;t<n;t+=1)r=t%2==0?100:1,i=t%2==0?Math.round(this.prop.v[t]*100):this.prop.v[t],this.o[t-this.data.p*4]!==i&&(this.o[t-this.data.p*4]=i,this._omdf=!e);this._mdf=!e}},u([Ge],Rn);function zn(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.initGradientData(e,t,n)}zn.prototype.initGradientData=function(e,t,n){this.o=B.getProp(e,t.o,0,.01,this),this.s=B.getProp(e,t.s,1,null,this),this.e=B.getProp(e,t.e,1,null,this),this.h=B.getProp(e,t.h||{k:0},0,.01,this),this.a=B.getProp(e,t.a||{k:0},0,D,this),this.g=new Rn(e,t.g,this),this.style=n,this.stops=[],this.setGradientData(n.pElem,t),this.setGradientOpacity(t,n),this._isAnimated=!!this._isAnimated},zn.prototype.setGradientData=function(e,t){var n=ee(),r=R(t.t===1?`linearGradient`:`radialGradient`);r.setAttribute(`id`,n),r.setAttribute(`spreadMethod`,`pad`),r.setAttribute(`gradientUnits`,`userSpaceOnUse`);var i=[],a,o,s=t.g.p*4;for(o=0;o<s;o+=4)a=R(`stop`),r.appendChild(a),i.push(a);e.setAttribute(t.ty===`gf`?`fill`:`stroke`,`url(`+c()+`#`+n+`)`),this.gf=r,this.cst=i},zn.prototype.setGradientOpacity=function(e,t){if(this.g._hasOpacity&&!this.g._collapsable){var n,r,i,a=R(`mask`),o=R(`path`);a.appendChild(o);var s=ee(),l=ee();a.setAttribute(`id`,l);var u=R(e.t===1?`linearGradient`:`radialGradient`);u.setAttribute(`id`,s),u.setAttribute(`spreadMethod`,`pad`),u.setAttribute(`gradientUnits`,`userSpaceOnUse`),i=e.g.k.k[0].s?e.g.k.k[0].s.length:e.g.k.k.length;var d=this.stops;for(r=e.g.p*4;r<i;r+=2)n=R(`stop`),n.setAttribute(`stop-color`,`rgb(255,255,255)`),u.appendChild(n),d.push(n);o.setAttribute(e.ty===`gf`?`fill`:`stroke`,`url(`+c()+`#`+s+`)`),e.ty===`gs`&&(o.setAttribute(`stroke-linecap`,An[e.lc||2]),o.setAttribute(`stroke-linejoin`,jn[e.lj||2]),e.lj===1&&o.setAttribute(`stroke-miterlimit`,e.ml)),this.of=u,this.ms=a,this.ost=d,this.maskId=l,t.msElem=o}},u([Ge],zn);function Bn(e,t,n){this.initDynamicPropertyContainer(e),this.getValue=this.iterateDynamicProperties,this.w=B.getProp(e,t.w,0,null,this),this.d=new Pn(e,t.d||{},`svg`,this),this.initGradientData(e,t,n),this._isAnimated=!!this._isAnimated}u([zn,Ge],Bn);function Vn(){this.it=[],this.prevViewData=[],this.gr=R(`g`)}function Hn(e,t,n){this.transform={mProps:e,op:t,container:n},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}var Un=function(e,t,n,r){if(t===0)return``;var i=e.o,a=e.i,o=e.v,s,c=` M`+r.applyToPointStringified(o[0][0],o[0][1]);for(s=1;s<t;s+=1)c+=` C`+r.applyToPointStringified(i[s-1][0],i[s-1][1])+` `+r.applyToPointStringified(a[s][0],a[s][1])+` `+r.applyToPointStringified(o[s][0],o[s][1]);return n&&t&&(c+=` C`+r.applyToPointStringified(i[s-1][0],i[s-1][1])+` `+r.applyToPointStringified(a[0][0],a[0][1])+` `+r.applyToPointStringified(o[0][0],o[0][1]),c+=`z`),c},Wn=function(){var e=new Qe,t=new Qe,n={createRenderFunction:r};function r(e){switch(e.ty){case`fl`:return s;case`gf`:return l;case`gs`:return c;case`st`:return u;case`sh`:case`el`:case`rc`:case`sr`:return o;case`tr`:return i;case`no`:return a;default:return null}}function i(e,t,n){(n||t.transform.op._mdf)&&t.transform.container.setAttribute(`opacity`,t.transform.op.v),(n||t.transform.mProps._mdf)&&t.transform.container.setAttribute(`transform`,t.transform.mProps.v.to2dCSS())}function a(){}function o(n,r,i){var a,o,s,c,l,u,d=r.styles.length,f=r.lvl,p,m,h,g;for(u=0;u<d;u+=1){if(c=r.sh._mdf||i,r.styles[u].lvl<f){for(m=t.reset(),h=f-r.styles[u].lvl,g=r.transformers.length-1;!c&&h>0;)c=r.transformers[g].mProps._mdf||c,--h,--g;if(c)for(h=f-r.styles[u].lvl,g=r.transformers.length-1;h>0;)m.multiply(r.transformers[g].mProps.v),--h,--g}else m=e;if(p=r.sh.paths,o=p._length,c){for(s=``,a=0;a<o;a+=1)l=p.shapes[a],l&&l._length&&(s+=Un(l,l._length,l.c,m));r.caches[u]=s}else s=r.caches[u];r.styles[u].d+=n.hd===!0?``:s,r.styles[u]._mdf=c||r.styles[u]._mdf}}function s(e,t,n){var r=t.style;(t.c._mdf||n)&&r.pElem.setAttribute(`fill`,`rgb(`+C(t.c.v[0])+`,`+C(t.c.v[1])+`,`+C(t.c.v[2])+`)`),(t.o._mdf||n)&&r.pElem.setAttribute(`fill-opacity`,t.o.v)}function c(e,t,n){l(e,t,n),u(e,t,n)}function l(e,t,n){var r=t.gf,i=t.g._hasOpacity,a=t.s.v,o=t.e.v;if(t.o._mdf||n){var s=e.ty===`gf`?`fill-opacity`:`stroke-opacity`;t.style.pElem.setAttribute(s,t.o.v)}if(t.s._mdf||n){var c=e.t===1?`x1`:`cx`,l=c===`x1`?`y1`:`cy`;r.setAttribute(c,a[0]),r.setAttribute(l,a[1]),i&&!t.g._collapsable&&(t.of.setAttribute(c,a[0]),t.of.setAttribute(l,a[1]))}var u,d,f,p;if(t.g._cmdf||n){u=t.cst;var m=t.g.c;for(f=u.length,d=0;d<f;d+=1)p=u[d],p.setAttribute(`offset`,m[d*4]+`%`),p.setAttribute(`stop-color`,`rgb(`+m[d*4+1]+`,`+m[d*4+2]+`,`+m[d*4+3]+`)`)}if(i&&(t.g._omdf||n)){var h=t.g.o;for(u=t.g._collapsable?t.cst:t.ost,f=u.length,d=0;d<f;d+=1)p=u[d],t.g._collapsable||p.setAttribute(`offset`,h[d*2]+`%`),p.setAttribute(`stop-opacity`,h[d*2+1])}if(e.t===1)(t.e._mdf||n)&&(r.setAttribute(`x2`,o[0]),r.setAttribute(`y2`,o[1]),i&&!t.g._collapsable&&(t.of.setAttribute(`x2`,o[0]),t.of.setAttribute(`y2`,o[1])));else{var g;if((t.s._mdf||t.e._mdf||n)&&(g=Math.sqrt((a[0]-o[0])**2+(a[1]-o[1])**2),r.setAttribute(`r`,g),i&&!t.g._collapsable&&t.of.setAttribute(`r`,g)),t.s._mdf||t.e._mdf||t.h._mdf||t.a._mdf||n){g||=Math.sqrt((a[0]-o[0])**2+(a[1]-o[1])**2);var _=Math.atan2(o[1]-a[1],o[0]-a[0]),v=t.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var y=g*v,b=Math.cos(_+t.a.v)*y+a[0],x=Math.sin(_+t.a.v)*y+a[1];r.setAttribute(`fx`,b),r.setAttribute(`fy`,x),i&&!t.g._collapsable&&(t.of.setAttribute(`fx`,b),t.of.setAttribute(`fy`,x))}}}function u(e,t,n){var r=t.style,i=t.d;i&&(i._mdf||n)&&i.dashStr&&(r.pElem.setAttribute(`stroke-dasharray`,i.dashStr),r.pElem.setAttribute(`stroke-dashoffset`,i.dashoffset[0])),t.c&&(t.c._mdf||n)&&r.pElem.setAttribute(`stroke`,`rgb(`+C(t.c.v[0])+`,`+C(t.c.v[1])+`,`+C(t.c.v[2])+`)`),(t.o._mdf||n)&&r.pElem.setAttribute(`stroke-opacity`,t.o.v),(t.w._mdf||n)&&(r.pElem.setAttribute(`stroke-width`,t.w.v),r.msElem&&r.msElem.setAttribute(`stroke-width`,t.w.v))}return n}();function Gn(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,n),this.prevViewData=[]}u([fn,_n,wn,kn,Tn,pn,En],Gn),Gn.prototype.initSecondaryElement=function(){},Gn.prototype.identityMatrix=new Qe,Gn.prototype.buildExpressionInterface=function(){},Gn.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},Gn.prototype.filterUniqueShapes=function(){var e,t=this.shapes.length,n,r,i=this.stylesList.length,a,o=[],s=!1;for(r=0;r<i;r+=1){for(a=this.stylesList[r],s=!1,o.length=0,e=0;e<t;e+=1)n=this.shapes[e],n.styles.indexOf(a)!==-1&&(o.push(n),s=n._isAnimated||s);o.length>1&&s&&this.setShapesAsAnimated(o)}},Gn.prototype.setShapesAsAnimated=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t].setAsAnimated()},Gn.prototype.createStyleElement=function(e,t){var n,r=new Nn(e,t),i=r.pElem;return e.ty===`st`?n=new Fn(this,e,r):e.ty===`fl`?n=new In(this,e,r):e.ty===`gf`||e.ty===`gs`?(n=new(e.ty===`gf`?zn:Bn)(this,e,r),this.globalData.defs.appendChild(n.gf),n.maskId&&(this.globalData.defs.appendChild(n.ms),this.globalData.defs.appendChild(n.of),i.setAttribute(`mask`,`url(`+c()+`#`+n.maskId+`)`))):e.ty===`no`&&(n=new Ln(this,e,r)),(e.ty===`st`||e.ty===`gs`)&&(i.setAttribute(`stroke-linecap`,An[e.lc||2]),i.setAttribute(`stroke-linejoin`,jn[e.lj||2]),i.setAttribute(`fill-opacity`,`0`),e.lj===1&&i.setAttribute(`stroke-miterlimit`,e.ml)),e.r===2&&i.setAttribute(`fill-rule`,`evenodd`),e.ln&&i.setAttribute(`id`,e.ln),e.cl&&i.setAttribute(`class`,e.cl),e.bm&&(i.style[`mix-blend-mode`]=en(e.bm)),this.stylesList.push(r),this.addToAnimatedContents(e,n),n},Gn.prototype.createGroupElement=function(e){var t=new Vn;return e.ln&&t.gr.setAttribute(`id`,e.ln),e.cl&&t.gr.setAttribute(`class`,e.cl),e.bm&&(t.gr.style[`mix-blend-mode`]=en(e.bm)),t},Gn.prototype.createTransformElement=function(e,t){var n=bt.getTransformProperty(this,e,this),r=new Hn(n,n.o,t);return this.addToAnimatedContents(e,r),r},Gn.prototype.createShapeElement=function(e,t,n){var r=4;e.ty===`rc`?r=5:e.ty===`el`?r=6:e.ty===`sr`&&(r=7);var i=new Mn(t,n,Ze.getShapeProp(this,e,r,this));return this.shapes.push(i),this.addShapeToModifiers(i),this.addToAnimatedContents(e,i),i},Gn.prototype.addToAnimatedContents=function(e,t){for(var n=0,r=this.animatedContents.length;n<r;){if(this.animatedContents[n].element===t)return;n+=1}this.animatedContents.push({fn:Wn.createRenderFunction(e),element:t,data:e})},Gn.prototype.setElementStyles=function(e){var t=e.styles,n,r=this.stylesList.length;for(n=0;n<r;n+=1)t.indexOf(this.stylesList[n])===-1&&!this.stylesList[n].closed&&t.push(this.stylesList[n])},Gn.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers()},Gn.prototype.searchShapes=function(e,t,n,r,i,a,o){var s=[].concat(a),c,l=e.length-1,u,d,f=[],p=[],m,h,g;for(c=l;c>=0;--c){if(g=this.searchProcessedElement(e[c]),g?t[c]=n[g-1]:e[c]._render=o,e[c].ty===`fl`||e[c].ty===`st`||e[c].ty===`gf`||e[c].ty===`gs`||e[c].ty===`no`)g?t[c].style.closed=e[c].hd:t[c]=this.createStyleElement(e[c],i),e[c]._render&&t[c].style.pElem.parentNode!==r&&r.appendChild(t[c].style.pElem),f.push(t[c].style);else if(e[c].ty===`gr`){if(!g)t[c]=this.createGroupElement(e[c]);else for(d=t[c].it.length,u=0;u<d;u+=1)t[c].prevViewData[u]=t[c].it[u];this.searchShapes(e[c].it,t[c].it,t[c].prevViewData,t[c].gr,i+1,s,o),e[c]._render&&t[c].gr.parentNode!==r&&r.appendChild(t[c].gr)}else e[c].ty===`tr`?(g||(t[c]=this.createTransformElement(e[c],r)),m=t[c].transform,s.push(m)):e[c].ty===`sh`||e[c].ty===`rc`||e[c].ty===`el`||e[c].ty===`sr`?(g||(t[c]=this.createShapeElement(e[c],s,i)),this.setElementStyles(t[c])):e[c].ty===`tm`||e[c].ty===`rd`||e[c].ty===`ms`||e[c].ty===`pb`||e[c].ty===`zz`||e[c].ty===`op`?(g?(h=t[c],h.closed=!1):(h=_t.getModifier(e[c].ty),h.init(this,e[c]),t[c]=h,this.shapeModifiers.push(h)),p.push(h)):e[c].ty===`rp`&&(g?(h=t[c],h.closed=!0):(h=_t.getModifier(e[c].ty),t[c]=h,h.init(this,e,c,t),this.shapeModifiers.push(h),o=!1),p.push(h));this.addProcessedElement(e[c],c+1)}for(l=f.length,c=0;c<l;c+=1)f[c].closed=!0;for(l=p.length,c=0;c<l;c+=1)p[c].closed=!0},Gn.prototype.renderInnerContent=function(){this.renderModifiers();var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].reset();for(this.renderShape(),e=0;e<t;e+=1)(this.stylesList[e]._mdf||this._isFirstFrame)&&(this.stylesList[e].msElem&&(this.stylesList[e].msElem.setAttribute(`d`,this.stylesList[e].d),this.stylesList[e].d=`M0 0`+this.stylesList[e].d),this.stylesList[e].pElem.setAttribute(`d`,this.stylesList[e].d||`M0 0`))},Gn.prototype.renderShape=function(){var e,t=this.animatedContents.length,n;for(e=0;e<t;e+=1)n=this.animatedContents[e],(this._isFirstFrame||n.element._isAnimated)&&n.data!==!0&&n.fn(n.data,n.element,this._isFirstFrame)},Gn.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null};function Kn(e,t,n,r,i,a){this.o=e,this.sw=t,this.sc=n,this.fc=r,this.m=i,this.p=a,this._mdf={o:!0,sw:!!t,sc:!!n,fc:!!r,m:!0,p:!0}}Kn.prototype.update=function(e,t,n,r,i,a){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var o=!1;return this.o!==e&&(this.o=e,this._mdf.o=!0,o=!0),this.sw!==t&&(this.sw=t,this._mdf.sw=!0,o=!0),this.sc!==n&&(this.sc=n,this._mdf.sc=!0,o=!0),this.fc!==r&&(this.fc=r,this._mdf.fc=!0,o=!0),this.m!==i&&(this.m=i,this._mdf.m=!0,o=!0),a.length&&(this.p[0]!==a[0]||this.p[1]!==a[1]||this.p[4]!==a[4]||this.p[5]!==a[5]||this.p[12]!==a[12]||this.p[13]!==a[13])&&(this.p=a,this._mdf.p=!0,o=!0),o};function qn(e,t){this._frameId=i,this.pv=``,this.v=``,this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:``,fStyle:``,fWeight:``,fc:``,j:``,justifyOffset:``,l:[],lh:0,lineWidths:[],ls:``,of:``,s:``,sc:``,sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}qn.prototype.defaultBoxWidth=[0,0],qn.prototype.copyData=function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},qn.prototype.setCurrentData=function(e){e.__complete||this.completeTextData(e),this.currentData=e,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},qn.prototype.searchProperty=function(){return this.searchKeyframes()},qn.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},qn.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},qn.prototype.getValue=function(e){if(!((this.elem.globalData.frameId===this.frameId||!this.effectsSequence.length)&&!e)){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,n=this.keysIndex;if(this.lock){this.setCurrentData(this.currentData);return}this.lock=!0,this._mdf=!1;var r,i=this.effectsSequence.length,a=e||this.data.d.k[this.keysIndex].s;for(r=0;r<i;r+=1)a=n===this.keysIndex?this.effectsSequence[r](this.currentData,a.t):this.effectsSequence[r](a,a.t);t!==a&&this.setCurrentData(a),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}},qn.prototype.getKeyframeValue=function(){for(var e=this.data.d.k,t=this.elem.comp.renderedFrame,n=0,r=e.length;n<=r-1&&!(n===r-1||e[n+1].t>t);)n+=1;return this.keysIndex!==n&&(this.keysIndex=n),this.data.d.k[this.keysIndex].s},qn.prototype.buildFinalText=function(e){for(var t=[],n=0,r=e.length,i,a,o=!1,s=!1,c=``;n<r;)o=s,s=!1,i=e.charCodeAt(n),c=e.charAt(n),Xt.isCombinedCharacter(i)?o=!0:i>=55296&&i<=56319?Xt.isRegionalFlag(e,n)?c=e.substr(n,14):(a=e.charCodeAt(n+1),a>=56320&&a<=57343&&(Xt.isModifier(i,a)?(c=e.substr(n,2),o=!0):c=Xt.isFlagEmoji(e.substr(n,4))?e.substr(n,4):e.substr(n,2))):i>56319?(a=e.charCodeAt(n+1),Xt.isVariationSelector(i)&&(o=!0)):Xt.isZeroWidthJoiner(i)&&(o=!0,s=!0),o?(t[t.length-1]+=c,o=!1):t.push(c),n+=c.length;return t},qn.prototype.completeTextData=function(e){e.__complete=!0;var t=this.elem.globalData.fontManager,n=this.data,r=[],i,a,o,s=0,c,l=n.m.g,u=0,d=0,f=0,p=[],m=0,h=0,g,_,v=t.getFontByName(e.f),y,b=0,x=Yt(v);e.fWeight=x.weight,e.fStyle=x.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),a=e.finalText.length,e.finalLineHeight=e.lh;var S=e.tr/1e3*e.finalSize,C;if(e.sz)for(var w=!0,T=e.sz[0],E=e.sz[1],D,O;w;){O=this.buildFinalText(e.t),D=0,m=0,a=O.length,S=e.tr/1e3*e.finalSize;var k=-1;for(i=0;i<a;i+=1)C=O[i].charCodeAt(0),o=!1,O[i]===` `?k=i:(C===13||C===3)&&(m=0,o=!0,D+=e.finalLineHeight||e.finalSize*1.2),t.chars?(y=t.getCharData(O[i],v.fStyle,v.fFamily),b=o?0:y.w*e.finalSize/100):b=t.measureText(O[i],e.f,e.finalSize),m+b>T&&O[i]!==` `?(k===-1?a+=1:i=k,D+=e.finalLineHeight||e.finalSize*1.2,O.splice(i,+(k===i),`\r`),k=-1,m=0):(m+=b,m+=S);D+=v.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&E<D?(--e.finalSize,e.finalLineHeight=e.finalSize*e.lh/e.s):(e.finalText=O,a=e.finalText.length,w=!1)}m=-S,b=0;var A=0,j;for(i=0;i<a;i+=1)if(o=!1,j=e.finalText[i],C=j.charCodeAt(0),C===13||C===3?(A=0,p.push(m),h=m>h?m:h,m=-2*S,c=``,o=!0,f+=1):c=j,t.chars?(y=t.getCharData(j,v.fStyle,t.getFontByName(e.f).fFamily),b=o?0:y.w*e.finalSize/100):b=t.measureText(c,e.f,e.finalSize),j===` `?A+=b+S:(m+=b+S+A,A=0),r.push({l:b,an:b,add:u,n:o,anIndexes:[],val:c,line:f,animatorJustifyOffset:0}),l==2){if(u+=b,c===``||c===` `||i===a-1){for((c===``||c===` `)&&(u-=b);d<=i;)r[d].an=u,r[d].ind=s,r[d].extra=b,d+=1;s+=1,u=0}}else if(l==3){if(u+=b,c===``||i===a-1){for(c===``&&(u-=b);d<=i;)r[d].an=u,r[d].ind=s,r[d].extra=b,d+=1;u=0,s+=1}}else r[s].ind=s,r[s].extra=0,s+=1;if(e.l=r,h=m>h?m:h,p.push(m),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=h,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=p;var M=n.a,N,P;_=M.length;var F,ee,I=[];for(g=0;g<_;g+=1){for(N=M[g],N.a.sc&&(e.strokeColorAnim=!0),N.a.sw&&(e.strokeWidthAnim=!0),(N.a.fc||N.a.fh||N.a.fs||N.a.fb)&&(e.fillColorAnim=!0),ee=0,F=N.s.b,i=0;i<a;i+=1)P=r[i],P.anIndexes[g]=ee,(F==1&&P.val!==``||F==2&&P.val!==``&&P.val!==` `||F==3&&(P.n||P.val==` `||i==a-1)||F==4&&(P.n||i==a-1))&&(N.s.rn===1&&I.push(ee),ee+=1);n.a[g].s.totalChars=ee;var te=-1,ne;if(N.s.rn===1)for(i=0;i<a;i+=1)P=r[i],te!=P.anIndexes[g]&&(te=P.anIndexes[g],ne=I.splice(Math.floor(Math.random()*I.length),1)[0]),P.anIndexes[g]=ne}e.yOffset=e.finalLineHeight||e.finalSize*1.2,e.ls=e.ls||0,e.ascent=v.ascent*e.finalSize/100},qn.prototype.updateDocumentData=function(e,t){t=t===void 0?this.keysIndex:t;var n=this.copyData({},this.data.d.k[t].s);n=this.copyData(n,e),this.data.d.k[t].s=n,this.recalculate(t),this.setCurrentData(n),this.elem.addDynamicProperty(this)},qn.prototype.recalculate=function(e){var t=this.data.d.k[e].s;t.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(t)},qn.prototype.canResizeFont=function(e){this.canResize=e,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},qn.prototype.setMinimumFontSize=function(e){this.minimumFontSize=Math.floor(e)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var Jn=function(){var e=Math.max,t=Math.min,n=Math.floor;function r(e,t){this._currentTextLength=-1,this.k=!1,this.data=t,this.elem=e,this.comp=e.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(e),this.s=B.getProp(e,t.s||{k:0},0,0,this),`e`in t?this.e=B.getProp(e,t.e,0,0,this):this.e={v:100},this.o=B.getProp(e,t.o||{k:0},0,0,this),this.xe=B.getProp(e,t.xe||{k:0},0,0,this),this.ne=B.getProp(e,t.ne||{k:0},0,0,this),this.sm=B.getProp(e,t.sm||{k:100},0,0,this),this.a=B.getProp(e,t.a,0,.01,this),this.dynamicProperties.length||this.getValue()}r.prototype={getMult:function(r){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var i=0,a=0,o=1,s=1;this.ne.v>0?i=this.ne.v/100:a=-this.ne.v/100,this.xe.v>0?o=1-this.xe.v/100:s=1+this.xe.v/100;var c=we.getBezierEasing(i,a,o,s).get,l=0,u=this.finalS,d=this.finalE,f=this.data.sh;if(f===2)l=d===u?+(r>=d):e(0,t(.5/(d-u)+(r-u)/(d-u),1)),l=c(l);else if(f===3)l=d===u?r>=d?0:1:1-e(0,t(.5/(d-u)+(r-u)/(d-u),1)),l=c(l);else if(f===4)d===u?l=0:(l=e(0,t(.5/(d-u)+(r-u)/(d-u),1)),l<.5?l*=2:l=1-2*(l-.5)),l=c(l);else if(f===5){if(d===u)l=0;else{var p=d-u;r=t(e(0,r+.5-u),d-u);var m=-p/2+r,h=p/2;l=Math.sqrt(1-m*m/(h*h))}l=c(l)}else f===6?(d===u?l=0:(r=t(e(0,r+.5-u),d-u),l=(1+Math.cos(Math.PI+Math.PI*2*r/(d-u)))/2),l=c(l)):(r>=n(u)&&(l=r-u<0?e(0,t(t(d,1)-(u-r),1)):e(0,t(d-r,1))),l=c(l));if(this.sm.v!==100){var g=this.sm.v*.01;g===0&&(g=1e-8);var _=.5-g*.5;l<_?l=0:(l=(l-_)/g,l>1&&(l=1))}return l*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&this.data.r===2&&(this.e.v=this._currentTextLength);var t=this.data.r===2?1:100/this.data.totalChars,n=this.o.v/t,r=this.s.v/t+n,i=this.e.v/t+n;if(r>i){var a=r;r=i,i=a}this.finalS=r,this.finalE=i}},u([Ge],r);function i(e,t,n){return new r(e,t,n)}return{getTextSelectorProp:i}}();function Yn(e,t,n){var r={propType:!1},i=B.getProp,a=t.a;this.a={r:a.r?i(e,a.r,0,D,n):r,rx:a.rx?i(e,a.rx,0,D,n):r,ry:a.ry?i(e,a.ry,0,D,n):r,sk:a.sk?i(e,a.sk,0,D,n):r,sa:a.sa?i(e,a.sa,0,D,n):r,s:a.s?i(e,a.s,1,.01,n):r,a:a.a?i(e,a.a,1,0,n):r,o:a.o?i(e,a.o,0,.01,n):r,p:a.p?i(e,a.p,1,0,n):r,sw:a.sw?i(e,a.sw,0,0,n):r,sc:a.sc?i(e,a.sc,1,0,n):r,fc:a.fc?i(e,a.fc,1,0,n):r,fh:a.fh?i(e,a.fh,0,0,n):r,fs:a.fs?i(e,a.fs,0,.01,n):r,fb:a.fb?i(e,a.fb,0,.01,n):r,t:a.t?i(e,a.t,0,0,n):r},this.s=Jn.getTextSelectorProp(e,t.s,n),this.s.t=t.s.t}function Xn(e,t,n){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=n,this._animatorsData=m(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(n)}Xn.prototype.searchProperties=function(){var e,t=this._textData.a.length,n,r=B.getProp;for(e=0;e<t;e+=1)n=this._textData.a[e],this._animatorsData[e]=new Yn(this._elem,n,this);this._textData.p&&`m`in this._textData.p?(this._pathData={a:r(this._elem,this._textData.p.a,0,0,this),f:r(this._elem,this._textData.p.f,0,0,this),l:r(this._elem,this._textData.p.l,0,0,this),r:r(this._elem,this._textData.p.r,0,0,this),p:r(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=r(this._elem,this._textData.m.a,1,0,this)},Xn.prototype.getMeasures=function(e,t){if(this.lettersChangedFlag=t,!(!this._mdf&&!this._isFirstFrame&&!t&&(!this._hasMaskedPath||!this._pathData.m._mdf))){this._isFirstFrame=!1;var n=this._moreOptions.alignment.v,r=this._animatorsData,i=this._textData,a=this.mHelper,o=this._renderType,s=this.renderedLetters.length,c,l,u,d,f=e.l,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D;if(this._hasMaskedPath){if(D=this._pathData.m,!this._pathData.n||this._pathData._mdf){var O=D.v;this._pathData.r.v&&(O=O.reverse()),p={tLength:0,segments:[]},d=O._length-1;var k;for(w=0,u=0;u<d;u+=1)k=Ae.buildBezierData(O.v[u],O.v[u+1],[O.o[u][0]-O.v[u][0],O.o[u][1]-O.v[u][1]],[O.i[u+1][0]-O.v[u+1][0],O.i[u+1][1]-O.v[u+1][1]]),p.tLength+=k.segmentLength,p.segments.push(k),w+=k.segmentLength;u=d,D.v.c&&(k=Ae.buildBezierData(O.v[u],O.v[0],[O.o[u][0]-O.v[u][0],O.o[u][1]-O.v[u][1]],[O.i[0][0]-O.v[0][0],O.i[0][1]-O.v[0][1]]),p.tLength+=k.segmentLength,p.segments.push(k),w+=k.segmentLength),this._pathData.pi=p}if(p=this._pathData.pi,m=this._pathData.f.v,y=0,v=1,g=0,_=!0,S=p.segments,m<0&&D.v.c)for(p.tLength<Math.abs(m)&&(m=-Math.abs(m)%p.tLength),y=S.length-1,x=S[y].points,v=x.length-1;m<0;)m+=x[v].partialLength,--v,v<0&&(--y,x=S[y].points,v=x.length-1);x=S[y].points,b=x[v-1],h=x[v],C=h.partialLength}d=f.length,c=0,l=0;var A=e.finalSize*1.2*.714,j=!0,M,N,P,F=r.length,ee,I,te=-1,ie,ae,oe,se=m,ce=y,le=v,ue=-1,de,R,fe,pe,me,he,ge,_e,ve=``,ye=this.defaultPropsArray,be;if(e.j===2||e.j===1){var xe=0,Se=0,z=e.j===2?-.5:-1,Ce=0,we=!0;for(u=0;u<d;u+=1)if(f[u].n){for(xe&&(xe+=Se);Ce<u;)f[Ce].animatorJustifyOffset=xe,Ce+=1;xe=0,we=!0}else{for(P=0;P<F;P+=1)M=r[P].a,M.t.propType&&(we&&e.j===2&&(Se+=M.t.v*z),N=r[P].s,I=N.getMult(f[u].anIndexes[P],i.a[P].s.totalChars),I.length?xe+=M.t.v*I[0]*z:xe+=M.t.v*I*z);we=!1}for(xe&&(xe+=Se);Ce<u;)f[Ce].animatorJustifyOffset=xe,Ce+=1}for(u=0;u<d;u+=1){if(a.reset(),de=1,f[u].n)c=0,l+=e.yOffset,l+=+!!j,m=se,j=!1,this._hasMaskedPath&&(y=ce,v=le,x=S[y].points,b=x[v-1],h=x[v],C=h.partialLength,g=0),ve=``,_e=``,he=``,be=``,ye=this.defaultPropsArray;else{if(this._hasMaskedPath){if(ue!==f[u].line){switch(e.j){case 1:m+=w-e.lineWidths[f[u].line];break;case 2:m+=(w-e.lineWidths[f[u].line])/2;break;default:break}ue=f[u].line}te!==f[u].ind&&(f[te]&&(m+=f[te].extra),m+=f[u].an/2,te=f[u].ind),m+=n[0]*f[u].an*.005;var Te=0;for(P=0;P<F;P+=1)M=r[P].a,M.p.propType&&(N=r[P].s,I=N.getMult(f[u].anIndexes[P],i.a[P].s.totalChars),I.length?Te+=M.p.v[0]*I[0]:Te+=M.p.v[0]*I),M.a.propType&&(N=r[P].s,I=N.getMult(f[u].anIndexes[P],i.a[P].s.totalChars),I.length?Te+=M.a.v[0]*I[0]:Te+=M.a.v[0]*I);for(_=!0,this._pathData.a.v&&(m=f[0].an*.5+(w-this._pathData.f.v-f[0].an*.5-f[f.length-1].an*.5)*te/(d-1),m+=this._pathData.f.v);_;)g+C>=m+Te||!x?(T=(m+Te-g)/h.partialLength,ae=b.point[0]+(h.point[0]-b.point[0])*T,oe=b.point[1]+(h.point[1]-b.point[1])*T,a.translate(-n[0]*f[u].an*.005,-(n[1]*A)*.01),_=!1):x&&(g+=h.partialLength,v+=1,v>=x.length&&(v=0,y+=1,S[y]?x=S[y].points:D.v.c?(v=0,y=0,x=S[y].points):(g-=h.partialLength,x=null)),x&&(b=h,h=x[v],C=h.partialLength));ie=f[u].an/2-f[u].add,a.translate(-ie,0,0)}else ie=f[u].an/2-f[u].add,a.translate(-ie,0,0),a.translate(-n[0]*f[u].an*.005,-n[1]*A*.01,0);for(P=0;P<F;P+=1)M=r[P].a,M.t.propType&&(N=r[P].s,I=N.getMult(f[u].anIndexes[P],i.a[P].s.totalChars),(c!==0||e.j!==0)&&(this._hasMaskedPath?I.length?m+=M.t.v*I[0]:m+=M.t.v*I:I.length?c+=M.t.v*I[0]:c+=M.t.v*I));for(e.strokeWidthAnim&&(fe=e.sw||0),e.strokeColorAnim&&(R=e.sc?[e.sc[0],e.sc[1],e.sc[2]]:[0,0,0]),e.fillColorAnim&&e.fc&&(pe=[e.fc[0],e.fc[1],e.fc[2]]),P=0;P<F;P+=1)M=r[P].a,M.a.propType&&(N=r[P].s,I=N.getMult(f[u].anIndexes[P],i.a[P].s.totalChars),I.length?a.translate(-M.a.v[0]*I[0],-M.a.v[1]*I[1],M.a.v[2]*I[2]):a.translate(-M.a.v[0]*I,-M.a.v[1]*I,M.a.v[2]*I));for(P=0;P<F;P+=1)M=r[P].a,M.s.propType&&(N=r[P].s,I=N.getMult(f[u].anIndexes[P],i.a[P].s.totalChars),I.length?a.scale(1+(M.s.v[0]-1)*I[0],1+(M.s.v[1]-1)*I[1],1):a.scale(1+(M.s.v[0]-1)*I,1+(M.s.v[1]-1)*I,1));for(P=0;P<F;P+=1){if(M=r[P].a,N=r[P].s,I=N.getMult(f[u].anIndexes[P],i.a[P].s.totalChars),M.sk.propType&&(I.length?a.skewFromAxis(-M.sk.v*I[0],M.sa.v*I[1]):a.skewFromAxis(-M.sk.v*I,M.sa.v*I)),M.r.propType&&(I.length?a.rotateZ(-M.r.v*I[2]):a.rotateZ(-M.r.v*I)),M.ry.propType&&(I.length?a.rotateY(M.ry.v*I[1]):a.rotateY(M.ry.v*I)),M.rx.propType&&(I.length?a.rotateX(M.rx.v*I[0]):a.rotateX(M.rx.v*I)),M.o.propType&&(I.length?de+=(M.o.v*I[0]-de)*I[0]:de+=(M.o.v*I-de)*I),e.strokeWidthAnim&&M.sw.propType&&(I.length?fe+=M.sw.v*I[0]:fe+=M.sw.v*I),e.strokeColorAnim&&M.sc.propType)for(me=0;me<3;me+=1)I.length?R[me]+=(M.sc.v[me]-R[me])*I[0]:R[me]+=(M.sc.v[me]-R[me])*I;if(e.fillColorAnim&&e.fc){if(M.fc.propType)for(me=0;me<3;me+=1)I.length?pe[me]+=(M.fc.v[me]-pe[me])*I[0]:pe[me]+=(M.fc.v[me]-pe[me])*I;M.fh.propType&&(pe=I.length?re(pe,M.fh.v*I[0]):re(pe,M.fh.v*I)),M.fs.propType&&(pe=I.length?ne(pe,M.fs.v*I[0]):ne(pe,M.fs.v*I)),M.fb.propType&&(pe=I.length?L(pe,M.fb.v*I[0]):L(pe,M.fb.v*I))}}for(P=0;P<F;P+=1)M=r[P].a,M.p.propType&&(N=r[P].s,I=N.getMult(f[u].anIndexes[P],i.a[P].s.totalChars),this._hasMaskedPath?I.length?a.translate(0,M.p.v[1]*I[0],-M.p.v[2]*I[1]):a.translate(0,M.p.v[1]*I,-M.p.v[2]*I):I.length?a.translate(M.p.v[0]*I[0],M.p.v[1]*I[1],-M.p.v[2]*I[2]):a.translate(M.p.v[0]*I,M.p.v[1]*I,-M.p.v[2]*I));if(e.strokeWidthAnim&&(he=fe<0?0:fe),e.strokeColorAnim&&(ge=`rgb(`+Math.round(R[0]*255)+`,`+Math.round(R[1]*255)+`,`+Math.round(R[2]*255)+`)`),e.fillColorAnim&&e.fc&&(_e=`rgb(`+Math.round(pe[0]*255)+`,`+Math.round(pe[1]*255)+`,`+Math.round(pe[2]*255)+`)`),this._hasMaskedPath){if(a.translate(0,-e.ls),a.translate(0,n[1]*A*.01+l,0),this._pathData.p.v){E=(h.point[1]-b.point[1])/(h.point[0]-b.point[0]);var Ee=Math.atan(E)*180/Math.PI;h.point[0]<b.point[0]&&(Ee+=180),a.rotate(-Ee*Math.PI/180)}a.translate(ae,oe,0),m-=n[0]*f[u].an*.005,f[u+1]&&te!==f[u+1].ind&&(m+=f[u].an/2,m+=e.tr*.001*e.finalSize)}else{switch(a.translate(c,l,0),e.ps&&a.translate(e.ps[0],e.ps[1]+e.ascent,0),e.j){case 1:a.translate(f[u].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[f[u].line]),0,0);break;case 2:a.translate(f[u].animatorJustifyOffset+e.justifyOffset+(e.boxWidth-e.lineWidths[f[u].line])/2,0,0);break;default:break}a.translate(0,-e.ls),a.translate(ie,0,0),a.translate(n[0]*f[u].an*.005,n[1]*A*.01,0),c+=f[u].l+e.tr*.001*e.finalSize}o===`html`?ve=a.toCSS():o===`svg`?ve=a.to2dCSS():ye=[a.props[0],a.props[1],a.props[2],a.props[3],a.props[4],a.props[5],a.props[6],a.props[7],a.props[8],a.props[9],a.props[10],a.props[11],a.props[12],a.props[13],a.props[14],a.props[15]],be=de}s<=u?(ee=new Kn(be,he,ge,_e,ve,ye),this.renderedLetters.push(ee),s+=1,this.lettersChangedFlag=!0):(ee=this.renderedLetters[u],this.lettersChangedFlag=ee.update(be,he,ge,_e,ve,ye)||this.lettersChangedFlag)}}},Xn.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},Xn.prototype.mHelper=new Qe,Xn.prototype.defaultPropsArray=[],u([Ge],Xn);function Zn(){}Zn.prototype.initElement=function(e,t,n){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(e,t,n),this.textProperty=new qn(this,e.t,this.dynamicProperties),this.textAnimator=new Xn(e.t,this.renderType,this),this.initTransform(e,t,n),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},Zn.prototype.prepareFrame=function(e){this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange)},Zn.prototype.createPathShape=function(e,t){var n,r=t.length,i,a=``;for(n=0;n<r;n+=1)t[n].ty===`sh`&&(i=t[n].ks.k,a+=Un(i,i.i.length,!0,e));return a},Zn.prototype.updateDocumentData=function(e,t){this.textProperty.updateDocumentData(e,t)},Zn.prototype.canResizeFont=function(e){this.textProperty.canResizeFont(e)},Zn.prototype.setMinimumFontSize=function(e){this.textProperty.setMinimumFontSize(e)},Zn.prototype.applyTextPropertiesToMatrix=function(e,t,n,r,i){switch(e.ps&&t.translate(e.ps[0],e.ps[1]+e.ascent,0),t.translate(0,-e.ls,0),e.j){case 1:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[n]),0,0);break;case 2:t.translate(e.justifyOffset+(e.boxWidth-e.lineWidths[n])/2,0,0);break;default:break}t.translate(r,i,0)},Zn.prototype.buildColor=function(e){return`rgb(`+Math.round(e[0]*255)+`,`+Math.round(e[1]*255)+`,`+Math.round(e[2]*255)+`)`},Zn.prototype.emptyProp=new Kn,Zn.prototype.destroy=function(){},Zn.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var Qn={shapes:[]};function $n(e,t,n){this.textSpans=[],this.renderType=`svg`,this.initElement(e,t,n)}u([fn,_n,wn,Tn,pn,En,Zn],$n),$n.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=R(`text`))},$n.prototype.buildTextContents=function(e){for(var t=0,n=e.length,r=[],i=``;t<n;)e[t]===`\r`||e[t]===``?(r.push(i),i=``):i+=e[t],t+=1;return r.push(i),r},$n.prototype.buildShapeData=function(e,t){if(e.shapes&&e.shapes.length){var n=e.shapes[0];if(n.it){var r=n.it[n.it.length-1];r.s&&(r.s.k[0]=t,r.s.k[1]=t)}}return e},$n.prototype.buildNewText=function(){this.addDynamicProperty(this);var e,t,n=this.textProperty.currentData;this.renderedLetters=m(n?n.l.length:0),n.fc?this.layerElement.setAttribute(`fill`,this.buildColor(n.fc)):this.layerElement.setAttribute(`fill`,`rgba(0,0,0,0)`),n.sc&&(this.layerElement.setAttribute(`stroke`,this.buildColor(n.sc)),this.layerElement.setAttribute(`stroke-width`,n.sw)),this.layerElement.setAttribute(`font-size`,n.finalSize);var r=this.globalData.fontManager.getFontByName(n.f);if(r.fClass)this.layerElement.setAttribute(`class`,r.fClass);else{this.layerElement.setAttribute(`font-family`,r.fFamily);var i=n.fWeight,a=n.fStyle;this.layerElement.setAttribute(`font-style`,a),this.layerElement.setAttribute(`font-weight`,i)}this.layerElement.setAttribute(`aria-label`,n.t);var o=n.l||[],s=!!this.globalData.fontManager.chars;t=o.length;var c,l=this.mHelper,u=``,d=this.data.singleShape,f=0,p=0,h=!0,g=n.tr*.001*n.finalSize;if(d&&!s&&!n.sz){var _=this.textContainer,v=`start`;switch(n.j){case 1:v=`end`;break;case 2:v=`middle`;break;default:v=`start`;break}_.setAttribute(`text-anchor`,v),_.setAttribute(`letter-spacing`,g);var y=this.buildTextContents(n.finalText);for(t=y.length,p=n.ps?n.ps[1]+n.ascent:0,e=0;e<t;e+=1)c=this.textSpans[e].span||R(`tspan`),c.textContent=y[e],c.setAttribute(`x`,0),c.setAttribute(`y`,p),c.style.display=`inherit`,_.appendChild(c),this.textSpans[e]||(this.textSpans[e]={span:null,glyph:null}),this.textSpans[e].span=c,p+=n.finalLineHeight;this.layerElement.appendChild(_)}else{var b=this.textSpans.length,x;for(e=0;e<t;e+=1){if(this.textSpans[e]||(this.textSpans[e]={span:null,childSpan:null,glyph:null}),!s||!d||e===0){if(c=b>e?this.textSpans[e].span:R(s?`g`:`text`),b<=e){if(c.setAttribute(`stroke-linecap`,`butt`),c.setAttribute(`stroke-linejoin`,`round`),c.setAttribute(`stroke-miterlimit`,`4`),this.textSpans[e].span=c,s){var S=R(`g`);c.appendChild(S),this.textSpans[e].childSpan=S}this.textSpans[e].span=c,this.layerElement.appendChild(c)}c.style.display=`inherit`}if(l.reset(),d&&(o[e].n&&(f=-g,p+=n.yOffset,p+=+!!h,h=!1),this.applyTextPropertiesToMatrix(n,l,o[e].line,f,p),f+=o[e].l||0,f+=g),s){x=this.globalData.fontManager.getCharData(n.finalText[e],r.fStyle,this.globalData.fontManager.getFontByName(n.f).fFamily);var C;if(x.t===1)C=new ir(x.data,this.globalData,this);else{var w=Qn;x.data&&x.data.shapes&&(w=this.buildShapeData(x.data,n.finalSize)),C=new Gn(w,this.globalData,this)}if(this.textSpans[e].glyph){var T=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(T.layerElement),T.destroy()}this.textSpans[e].glyph=C,C._debug=!0,C.prepareFrame(0),C.renderFrame(),this.textSpans[e].childSpan.appendChild(C.layerElement),x.t===1&&this.textSpans[e].childSpan.setAttribute(`transform`,`scale(`+n.finalSize/100+`,`+n.finalSize/100+`)`)}else d&&c.setAttribute(`transform`,`translate(`+l.props[12]+`,`+l.props[13]+`)`),c.textContent=o[e].val,c.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`)}d&&c&&c.setAttribute(`d`,u)}for(;e<this.textSpans.length;)this.textSpans[e].span.style.display=`none`,e+=1;this._sizeChanged=!0},$n.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var e=this.layerElement.getBBox();this.bbox={top:e.y,left:e.x,width:e.width,height:e.height}}return this.bbox},$n.prototype.getValue=function(){var e,t=this.textSpans.length,n;for(this.renderedFrame=this.comp.renderedFrame,e=0;e<t;e+=1)n=this.textSpans[e].glyph,n&&(n.prepareFrame(this.comp.renderedFrame-this.data.st),n._mdf&&(this._mdf=!0))},$n.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){this._sizeChanged=!0;var e,t,n=this.textAnimator.renderedLetters,r=this.textProperty.currentData.l;t=r.length;var i,a,o;for(e=0;e<t;e+=1)r[e].n||(i=n[e],a=this.textSpans[e].span,o=this.textSpans[e].glyph,o&&o.renderFrame(),i._mdf.m&&a.setAttribute(`transform`,i.m),i._mdf.o&&a.setAttribute(`opacity`,i.o),i._mdf.sw&&a.setAttribute(`stroke-width`,i.sw),i._mdf.sc&&a.setAttribute(`stroke`,i.sc),i._mdf.fc&&a.setAttribute(`fill`,i.fc))}};function er(e,t,n){this.initElement(e,t,n)}u([Dn],er),er.prototype.createContent=function(){var e=R(`rect`);e.setAttribute(`width`,this.data.sw),e.setAttribute(`height`,this.data.sh),e.setAttribute(`fill`,this.data.sc),this.layerElement.appendChild(e)};function tr(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initFrame(),this.initTransform(e,t,n),this.initHierarchy()}tr.prototype.prepareFrame=function(e){this.prepareProperties(e,!0)},tr.prototype.renderFrame=function(){},tr.prototype.getBaseElement=function(){return null},tr.prototype.destroy=function(){},tr.prototype.sourceRectAtTime=function(){},tr.prototype.hide=function(){},u([fn,_n,Tn,pn],tr);function nr(){}u([hn],nr),nr.prototype.createNull=function(e){return new tr(e,this.globalData,this)},nr.prototype.createShape=function(e){return new Gn(e,this.globalData,this)},nr.prototype.createText=function(e){return new $n(e,this.globalData,this)},nr.prototype.createImage=function(e){return new Dn(e,this.globalData,this)},nr.prototype.createSolid=function(e){return new er(e,this.globalData,this)},nr.prototype.configAnimation=function(e){this.svgElement.setAttribute(`xmlns`,`http://www.w3.org/2000/svg`),this.svgElement.setAttribute(`xmlns:xlink`,`http://www.w3.org/1999/xlink`),this.renderConfig.viewBoxSize?this.svgElement.setAttribute(`viewBox`,this.renderConfig.viewBoxSize):this.svgElement.setAttribute(`viewBox`,`0 0 `+e.w+` `+e.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute(`width`,e.w),this.svgElement.setAttribute(`height`,e.h),this.svgElement.style.width=`100%`,this.svgElement.style.height=`100%`,this.svgElement.style.transform=`translate3d(0,0,0)`,this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute(`width`,this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute(`height`,this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute(`class`,this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute(`id`,this.renderConfig.id),this.renderConfig.focusable!==void 0&&this.svgElement.setAttribute(`focusable`,this.renderConfig.focusable),this.svgElement.setAttribute(`preserveAspectRatio`,this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var t=this.globalData.defs;this.setupGlobalData(e,t),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=e;var n=R(`clipPath`),r=R(`rect`);r.setAttribute(`width`,e.w),r.setAttribute(`height`,e.h),r.setAttribute(`x`,0),r.setAttribute(`y`,0);var i=ee();n.setAttribute(`id`,i),n.appendChild(r),this.layerElement.setAttribute(`clip-path`,`url(`+c()+`#`+i+`)`),t.appendChild(n),this.layers=e.layers,this.elements=m(e.layers.length)},nr.prototype.destroy=function(){this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=``),this.layerElement=null,this.globalData.defs=null;var e,t=this.layers?this.layers.length:0;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},nr.prototype.updateContainerSize=function(){},nr.prototype.findIndexByInd=function(e){var t=0,n=this.layers.length;for(t=0;t<n;t+=1)if(this.layers[t].ind===e)return t;return-1},nr.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){t[e]=!0;var n=this.createItem(this.layers[e]);if(t[e]=n,se()&&(this.layers[e].ty===0&&this.globalData.projectInterface.registerComposition(n),n.initExpressions()),this.appendElementInPos(n,e),this.layers[e].tt){var r=`tp`in this.layers[e]?this.findIndexByInd(this.layers[e].tp):e-1;if(r===-1)return;if(!this.elements[r]||this.elements[r]===!0)this.buildItem(r),this.addPendingElement(n);else{var i=t[r].getMatte(this.layers[e].tt);n.setMatte(i)}}}},nr.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var e=this.pendingElements.pop();if(e.checkParenting(),e.data.tt)for(var t=0,n=this.elements.length;t<n;){if(this.elements[t]===e){var r=`tp`in e.data?this.findIndexByInd(e.data.tp):t-1,i=this.elements[r].getMatte(this.layers[t].tt);e.setMatte(i);break}t+=1}}},nr.prototype.renderFrame=function(e){if(!(this.renderedFrame===e||this.destroyed)){e===null?e=this.renderedFrame:this.renderedFrame=e,this.globalData.frameNum=e,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=e,this.globalData._mdf=!1;var t,n=this.layers.length;for(this.completeLayers||this.checkLayers(e),t=n-1;t>=0;--t)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t<n;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()}},nr.prototype.appendElementInPos=function(e,t){var n=e.getBaseElement();if(n){for(var r=0,i;r<t;)this.elements[r]&&this.elements[r]!==!0&&this.elements[r].getBaseElement()&&(i=this.elements[r].getBaseElement()),r+=1;i?this.layerElement.insertBefore(n,i):this.layerElement.appendChild(n)}},nr.prototype.hide=function(){this.layerElement.style.display=`none`},nr.prototype.show=function(){this.layerElement.style.display=`block`};function rr(){}u([fn,_n,Tn,pn,En],rr),rr.prototype.initElement=function(e,t,n){this.initFrame(),this.initBaseData(e,t,n),this.initTransform(e,t,n),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),(this.data.xt||!t.progressiveLoad)&&this.buildAllItems(),this.hide()},rr.prototype.prepareFrame=function(e){if(this._mdf=!1,this.prepareRenderableFrame(e),this.prepareProperties(e,this.isInRange),!(!this.isInRange&&!this.data.xt)){if(this.tm._placeholder)this.renderedFrame=e/this.data.sr;else{var t=this.tm.v;t===this.data.op&&(t=this.data.op-1),this.renderedFrame=t}var n,r=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),n=r-1;n>=0;--n)(this.completeLayers||this.elements[n])&&(this.elements[n].prepareFrame(this.renderedFrame-this.layers[n].st),this.elements[n]._mdf&&(this._mdf=!0))}},rr.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},rr.prototype.setElements=function(e){this.elements=e},rr.prototype.getElements=function(){return this.elements},rr.prototype.destroyElements=function(){var e,t=this.layers.length;for(e=0;e<t;e+=1)this.elements[e]&&this.elements[e].destroy()},rr.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()};function ir(e,t,n){this.layers=e.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?m(this.layers.length):[],this.initElement(e,t,n),this.tm=e.tm?B.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}u([nr,rr,wn],ir),ir.prototype.createComp=function(e){return new ir(e,this.globalData,this)};function ar(e,t){this.animationItem=e,this.layers=null,this.renderedFrame=-1,this.svgElement=R(`svg`);var n=``;if(t&&t.title){var r=R(`title`),i=ee();r.setAttribute(`id`,i),r.textContent=t.title,this.svgElement.appendChild(r),n+=i}if(t&&t.description){var a=R(`desc`),o=ee();a.setAttribute(`id`,o),a.textContent=t.description,this.svgElement.appendChild(a),n+=` `+o}n&&this.svgElement.setAttribute(`aria-labelledby`,n);var s=R(`defs`);this.svgElement.appendChild(s);var c=R(`g`);this.svgElement.appendChild(c),this.layerElement=c,this.renderConfig={preserveAspectRatio:t&&t.preserveAspectRatio||`xMidYMid meet`,imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||`xMidYMid slice`,contentVisibility:t&&t.contentVisibility||`visible`,progressiveLoad:t&&t.progressiveLoad||!1,hideOnTransparent:!(t&&t.hideOnTransparent===!1),viewBoxOnly:t&&t.viewBoxOnly||!1,viewBoxSize:t&&t.viewBoxSize||!1,className:t&&t.className||``,id:t&&t.id||``,focusable:t&&t.focusable,filterSize:{width:t&&t.filterSize&&t.filterSize.width||`100%`,height:t&&t.filterSize&&t.filterSize.height||`100%`,x:t&&t.filterSize&&t.filterSize.x||`0%`,y:t&&t.filterSize&&t.filterSize.y||`0%`},width:t&&t.width,height:t&&t.height,runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:s,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType=`svg`}u([nr],ar),ar.prototype.createComp=function(e){return new ir(e,this.globalData,this)};function or(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}or.prototype={addTransformSequence:function(e){var t,n=e.length,r=`_`;for(t=0;t<n;t+=1)r+=e[t].transform.key+`_`;var i=this.sequences[r];return i||(i={transforms:[].concat(e),finalTransform:new Qe,_mdf:!1},this.sequences[r]=i,this.sequenceList.push(i)),i},processSequence:function(e,t){for(var n=0,r=e.transforms.length,i=t;n<r&&!t;){if(e.transforms[n].transform.mProps._mdf){i=!0;break}n+=1}if(i)for(e.finalTransform.reset(),n=r-1;n>=0;--n)e.finalTransform.multiply(e.transforms[n].transform.mProps.v);e._mdf=i},processSequences:function(e){var t,n=this.sequenceList.length;for(t=0;t<n;t+=1)this.processSequence(this.sequenceList[t],e)},getNewKey:function(){return this.transform_key_count+=1,`_`+this.transform_key_count}};var sr=function(){var e=`__lottie_element_luma_buffer`,t=null,n=null,r=null;function i(){var t=R(`svg`),n=R(`filter`),r=R(`feColorMatrix`);return n.setAttribute(`id`,e),r.setAttribute(`type`,`matrix`),r.setAttribute(`color-interpolation-filters`,`sRGB`),r.setAttribute(`values`,`0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0`),n.appendChild(r),t.appendChild(n),t.setAttribute(`id`,e+`_svg`),bn.svgLumaHidden&&(t.style.display=`none`),t}function a(){t||(r=i(),document.body.appendChild(r),t=l(`canvas`),n=t.getContext(`2d`),n.filter=`url(#`+e+`)`,n.fillStyle=`rgba(0,0,0,0)`,n.fillRect(0,0,1,1))}function o(r){return t||a(),t.width=r.width,t.height=r.height,n.filter=`url(#`+e+`)`,t}return{load:a,get:o}};function cr(e,t){if(bn.offscreenCanvas)return new OffscreenCanvas(e,t);var n=l(`canvas`);return n.width=e,n.height=t,n}var lr=function(){return{loadLumaCanvas:sr.load,getLumaCanvas:sr.get,createCanvas:cr}}(),ur={};function dr(e){var t,n=e.data.ef?e.data.ef.length:0;this.filters=[];var r;for(t=0;t<n;t+=1){r=null;var i=e.data.ef[t].ty;if(ur[i]){var a=ur[i].effect;r=new a(e.effectsManager.effectElements[t],e)}r&&this.filters.push(r)}this.filters.length&&e.addRenderableComponent(this)}dr.prototype.renderFrame=function(e){var t,n=this.filters.length;for(t=0;t<n;t+=1)this.filters[t].renderFrame(e)},dr.prototype.getEffects=function(e){var t,n=this.filters.length,r=[];for(t=0;t<n;t+=1)this.filters[t].type===e&&r.push(this.filters[t]);return r};function fr(e,t){this.data=e,this.element=t,this.masksProperties=this.data.masksProperties||[],this.viewData=m(this.masksProperties.length);var n,r=this.masksProperties.length,i=!1;for(n=0;n<r;n+=1)this.masksProperties[n].mode!==`n`&&(i=!0),this.viewData[n]=Ze.getShapeProp(this.element,this.masksProperties[n],3);this.hasMasks=i,i&&this.element.addRenderableComponent(this)}fr.prototype.renderFrame=function(){if(this.hasMasks){var e=this.element.finalTransform.mat,t=this.element.canvasContext,n,r=this.masksProperties.length,i,a,o;for(t.beginPath(),n=0;n<r;n+=1)if(this.masksProperties[n].mode!==`n`){this.masksProperties[n].inv&&(t.moveTo(0,0),t.lineTo(this.element.globalData.compSize.w,0),t.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),t.lineTo(0,this.element.globalData.compSize.h),t.lineTo(0,0)),o=this.viewData[n].v,i=e.applyToPointArray(o.v[0][0],o.v[0][1],0),t.moveTo(i[0],i[1]);var s,c=o._length;for(s=1;s<c;s+=1)a=e.applyToTriplePoints(o.o[s-1],o.i[s],o.v[s]),t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);a=e.applyToTriplePoints(o.o[s-1],o.i[0],o.v[0]),t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5])}this.element.globalData.renderer.save(!0),t.clip()}},fr.prototype.getMaskProperty=vn.prototype.getMaskProperty,fr.prototype.destroy=function(){this.element=null};function pr(){}var mr={1:`source-in`,2:`source-out`,3:`source-in`,4:`source-out`};pr.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var e=this.globalData.canvasContext,t=lr.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var n=lr.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(n),this.data.tt>=3&&!document._isProxy&&lr.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new dr(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=en(this.data.bm);e.canvasContext.globalCompositeOperation=t}},createRenderableComponents:function(){this.maskManager=new fr(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(gn.TRANSFORM_EFFECT)},hideElement:function(){!this.hidden&&(!this.isInRange||this.isTransparent)&&(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext(`2d`);this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext(`2d`);if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById(`tp`in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var n=lr.getLumaCanvas(this.canvasContext.canvas);n.getContext(`2d`).drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(n,0,0)}this.canvasContext.globalCompositeOperation=mr[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation=`destination-over`,this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation=`source-over`}},renderFrame:function(e){if(!(this.hidden||this.data.hd)&&!(this.data.td===1&&!e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=this.data.ty===0;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&=!1}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Qe},pr.prototype.hide=pr.prototype.hideElement,pr.prototype.show=pr.prototype.showElement;function hr(e,t,n,r){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var i=4;t.ty===`rc`?i=5:t.ty===`el`?i=6:t.ty===`sr`&&(i=7),this.sh=Ze.getShapeProp(e,t,i,e);var a,o=n.length,s;for(a=0;a<o;a+=1)n[a].closed||(s={transforms:r.addTransformSequence(n[a].transforms),trNodes:[]},this.styledShapes.push(s),n[a].elements.push(s))}hr.prototype.setAsAnimated=Mn.prototype.setAsAnimated;function gr(e,t,n){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new or,this.initElement(e,t,n)}u([fn,_n,pr,kn,Tn,pn,$t],gr),gr.prototype.initElement=En.prototype.initElement,gr.prototype.transformHelper={opacity:1,_opMdf:!1},gr.prototype.dashResetter=[],gr.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},gr.prototype.createStyleElement=function(e,t){var n={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:e.hd===!0},r={};return e.ty===`fl`||e.ty===`st`?(r.c=B.getProp(this,e.c,1,255,this),r.c.k||(n.co=`rgb(`+C(r.c.v[0])+`,`+C(r.c.v[1])+`,`+C(r.c.v[2])+`)`)):(e.ty===`gf`||e.ty===`gs`)&&(r.s=B.getProp(this,e.s,1,null,this),r.e=B.getProp(this,e.e,1,null,this),r.h=B.getProp(this,e.h||{k:0},0,.01,this),r.a=B.getProp(this,e.a||{k:0},0,D,this),r.g=new Rn(this,e.g,this)),r.o=B.getProp(this,e.o,0,.01,this),e.ty===`st`||e.ty===`gs`?(n.lc=An[e.lc||2],n.lj=jn[e.lj||2],e.lj==1&&(n.ml=e.ml),r.w=B.getProp(this,e.w,0,null,this),r.w.k||(n.wi=r.w.v),e.d&&(r.d=new Pn(this,e.d,`canvas`,this),r.d.k||(n.da=r.d.dashArray,n.do=r.d.dashoffset[0]))):n.r=e.r===2?`evenodd`:`nonzero`,this.stylesList.push(n),r.style=n,r},gr.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},gr.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:B.getProp(this,e.o,0,.01,this),mProps:bt.getTransformProperty(this,e,this)}}},gr.prototype.createShapeElement=function(e){var t=new hr(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},gr.prototype.reloadShapes=function(){this._isFirstFrame=!0;var e,t=this.itemsData.length;for(e=0;e<t;e+=1)this.prevViewData[e]=this.itemsData[e];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),t=this.dynamicProperties.length,e=0;e<t;e+=1)this.dynamicProperties[e].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},gr.prototype.addTransformToStyleList=function(e){var t,n=this.stylesList.length;for(t=0;t<n;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.push(e)},gr.prototype.removeTransformFromStyleList=function(){var e,t=this.stylesList.length;for(e=0;e<t;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.pop()},gr.prototype.closeStyles=function(e){var t,n=e.length;for(t=0;t<n;t+=1)e[t].closed=!0},gr.prototype.searchShapes=function(e,t,n,r,i){var a,o=e.length-1,s,c,l=[],u=[],d,f,p,m=[].concat(i);for(a=o;a>=0;--a){if(d=this.searchProcessedElement(e[a]),d?t[a]=n[d-1]:e[a]._shouldRender=r,e[a].ty===`fl`||e[a].ty===`st`||e[a].ty===`gf`||e[a].ty===`gs`)d?t[a].style.closed=!1:t[a]=this.createStyleElement(e[a],m),l.push(t[a].style);else if(e[a].ty===`gr`){if(!d)t[a]=this.createGroupElement(e[a]);else for(c=t[a].it.length,s=0;s<c;s+=1)t[a].prevViewData[s]=t[a].it[s];this.searchShapes(e[a].it,t[a].it,t[a].prevViewData,r,m)}else e[a].ty===`tr`?(d||(p=this.createTransformElement(e[a]),t[a]=p),m.push(t[a]),this.addTransformToStyleList(t[a])):e[a].ty===`sh`||e[a].ty===`rc`||e[a].ty===`el`||e[a].ty===`sr`?d||(t[a]=this.createShapeElement(e[a])):e[a].ty===`tm`||e[a].ty===`rd`||e[a].ty===`pb`||e[a].ty===`zz`||e[a].ty===`op`?(d?(f=t[a],f.closed=!1):(f=_t.getModifier(e[a].ty),f.init(this,e[a]),t[a]=f,this.shapeModifiers.push(f)),u.push(f)):e[a].ty===`rp`&&(d?(f=t[a],f.closed=!0):(f=_t.getModifier(e[a].ty),t[a]=f,f.init(this,e,a,t),this.shapeModifiers.push(f),r=!1),u.push(f));this.addProcessedElement(e[a],a+1)}for(this.removeTransformFromStyleList(),this.closeStyles(l),o=u.length,a=0;a<o;a+=1)u[a].closed=!0},gr.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},gr.prototype.renderShapeTransform=function(e,t){(e._opMdf||t.op._mdf||this._isFirstFrame)&&(t.opacity=e.opacity,t.opacity*=t.op.v,t._opMdf=!0)},gr.prototype.drawLayer=function(){var e,t=this.stylesList.length,n,r,i,a,o,s,c=this.globalData.renderer,l=this.globalData.canvasContext,u,d;for(e=0;e<t;e+=1)if(d=this.stylesList[e],u=d.type,!((u===`st`||u===`gs`)&&d.wi===0||!d.data._shouldRender||d.coOp===0||this.globalData.currentGlobalAlpha===0)){for(c.save(),o=d.elements,u===`st`||u===`gs`?(c.ctxStrokeStyle(u===`st`?d.co:d.grd),c.ctxLineWidth(d.wi),c.ctxLineCap(d.lc),c.ctxLineJoin(d.lj),c.ctxMiterLimit(d.ml||0)):c.ctxFillStyle(u===`fl`?d.co:d.grd),c.ctxOpacity(d.coOp),u!==`st`&&u!==`gs`&&l.beginPath(),c.ctxTransform(d.preTransforms.finalTransform.props),r=o.length,n=0;n<r;n+=1){for((u===`st`||u===`gs`)&&(l.beginPath(),d.da&&(l.setLineDash(d.da),l.lineDashOffset=d.do)),s=o[n].trNodes,a=s.length,i=0;i<a;i+=1)s[i].t===`m`?l.moveTo(s[i].p[0],s[i].p[1]):s[i].t===`c`?l.bezierCurveTo(s[i].pts[0],s[i].pts[1],s[i].pts[2],s[i].pts[3],s[i].pts[4],s[i].pts[5]):l.closePath();(u===`st`||u===`gs`)&&(c.ctxStroke(),d.da&&l.setLineDash(this.dashResetter))}u!==`st`&&u!==`gs`&&this.globalData.renderer.ctxFill(d.r),c.restore()}},gr.prototype.renderShape=function(e,t,n,r){var i,a=t.length-1,o=e;for(i=a;i>=0;--i)t[i].ty===`tr`?(o=n[i].transform,this.renderShapeTransform(e,o)):t[i].ty===`sh`||t[i].ty===`el`||t[i].ty===`rc`||t[i].ty===`sr`?this.renderPath(t[i],n[i]):t[i].ty===`fl`?this.renderFill(t[i],n[i],o):t[i].ty===`st`?this.renderStroke(t[i],n[i],o):t[i].ty===`gf`||t[i].ty===`gs`?this.renderGradientFill(t[i],n[i],o):t[i].ty===`gr`?this.renderShape(o,t[i].it,n[i].it):t[i].ty;r&&this.drawLayer()},gr.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var n=e.trNodes,r=t.paths,i,a,o,s=r._length;n.length=0;var c=e.transforms.finalTransform;for(o=0;o<s;o+=1){var l=r.shapes[o];if(l&&l.v){for(a=l._length,i=1;i<a;i+=1)i===1&&n.push({t:`m`,p:c.applyToPointArray(l.v[0][0],l.v[0][1],0)}),n.push({t:`c`,pts:c.applyToTriplePoints(l.o[i-1],l.i[i],l.v[i])});a===1&&n.push({t:`m`,p:c.applyToPointArray(l.v[0][0],l.v[0][1],0)}),l.c&&a&&(n.push({t:`c`,pts:c.applyToTriplePoints(l.o[i-1],l.i[0],l.v[0])}),n.push({t:`z`}))}}e.trNodes=n}},gr.prototype.renderPath=function(e,t){if(e.hd!==!0&&e._shouldRender){var n,r=t.styledShapes.length;for(n=0;n<r;n+=1)this.renderStyledShape(t.styledShapes[n],t.sh)}},gr.prototype.renderFill=function(e,t,n){var r=t.style;(t.c._mdf||this._isFirstFrame)&&(r.co=`rgb(`+C(t.c.v[0])+`,`+C(t.c.v[1])+`,`+C(t.c.v[2])+`)`),(t.o._mdf||n._opMdf||this._isFirstFrame)&&(r.coOp=t.o.v*n.opacity)},gr.prototype.renderGradientFill=function(e,t,n){var r=t.style,i;if(!r.grd||t.g._mdf||t.s._mdf||t.e._mdf||e.t!==1&&(t.h._mdf||t.a._mdf)){var a=this.globalData.canvasContext,o=t.s.v,s=t.e.v;if(e.t===1)i=a.createLinearGradient(o[0],o[1],s[0],s[1]);else{var c=Math.sqrt((o[0]-s[0])**2+(o[1]-s[1])**2),l=Math.atan2(s[1]-o[1],s[0]-o[0]),u=t.h.v;u>=1?u=.99:u<=-1&&(u=-.99);var d=c*u,f=Math.cos(l+t.a.v)*d+o[0],p=Math.sin(l+t.a.v)*d+o[1];i=a.createRadialGradient(f,p,0,o[0],o[1],c)}var m,h=e.g.p,g=t.g.c,_=1;for(m=0;m<h;m+=1)t.g._hasOpacity&&t.g._collapsable&&(_=t.g.o[m*2+1]),i.addColorStop(g[m*4]/100,`rgba(`+g[m*4+1]+`,`+g[m*4+2]+`,`+g[m*4+3]+`,`+_+`)`);r.grd=i}r.coOp=t.o.v*n.opacity},gr.prototype.renderStroke=function(e,t,n){var r=t.style,i=t.d;i&&(i._mdf||this._isFirstFrame)&&(r.da=i.dashArray,r.do=i.dashoffset[0]),(t.c._mdf||this._isFirstFrame)&&(r.co=`rgb(`+C(t.c.v[0])+`,`+C(t.c.v[1])+`,`+C(t.c.v[2])+`)`),(t.o._mdf||n._opMdf||this._isFirstFrame)&&(r.coOp=t.o.v*n.opacity),(t.w._mdf||this._isFirstFrame)&&(r.wi=t.w.v)},gr.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0};function _r(e,t,n){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType=`canvas`,this.values={fill:`rgba(0,0,0,0)`,stroke:`rgba(0,0,0,0)`,sWidth:0,fValue:``},this.initElement(e,t,n)}u([fn,_n,pr,Tn,pn,$t,Zn],_r),_r.prototype.tHelper=l(`canvas`).getContext(`2d`),_r.prototype.buildNewText=function(){var e=this.textProperty.currentData;this.renderedLetters=m(e.l?e.l.length:0);var t=!1;e.fc?(t=!0,this.values.fill=this.buildColor(e.fc)):this.values.fill=`rgba(0,0,0,0)`,this.fill=t;var n=!1;e.sc&&(n=!0,this.values.stroke=this.buildColor(e.sc),this.values.sWidth=e.sw);var r=this.globalData.fontManager.getFontByName(e.f),i,a,o=e.l,s=this.mHelper;this.stroke=n,this.values.fValue=e.finalSize+`px `+this.globalData.fontManager.getFontByName(e.f).fFamily,a=e.finalText.length;var c,l,u,d,f,p,h,g,_,v,y=this.data.singleShape,b=e.tr*.001*e.finalSize,x=0,S=0,C=!0,w=0;for(i=0;i<a;i+=1){c=this.globalData.fontManager.getCharData(e.finalText[i],r.fStyle,this.globalData.fontManager.getFontByName(e.f).fFamily),l=c&&c.data||{},s.reset(),y&&o[i].n&&(x=-b,S+=e.yOffset,S+=+!!C,C=!1),f=l.shapes?l.shapes[0].it:[],h=f.length,s.scale(e.finalSize/100,e.finalSize/100),y&&this.applyTextPropertiesToMatrix(e,s,o[i].line,x,S),_=m(h-1);var T=0;for(p=0;p<h;p+=1)if(f[p].ty===`sh`){for(d=f[p].ks.k.i.length,g=f[p].ks.k,v=[],u=1;u<d;u+=1)u===1&&v.push(s.applyToX(g.v[0][0],g.v[0][1],0),s.applyToY(g.v[0][0],g.v[0][1],0)),v.push(s.applyToX(g.o[u-1][0],g.o[u-1][1],0),s.applyToY(g.o[u-1][0],g.o[u-1][1],0),s.applyToX(g.i[u][0],g.i[u][1],0),s.applyToY(g.i[u][0],g.i[u][1],0),s.applyToX(g.v[u][0],g.v[u][1],0),s.applyToY(g.v[u][0],g.v[u][1],0));v.push(s.applyToX(g.o[u-1][0],g.o[u-1][1],0),s.applyToY(g.o[u-1][0],g.o[u-1][1],0),s.applyToX(g.i[0][0],g.i[0][1],0),s.applyToY(g.i[0][0],g.i[0][1],0),s.applyToX(g.v[0][0],g.v[0][1],0),s.applyToY(g.v[0][0],g.v[0][1],0)),_[T]=v,T+=1}y&&(x+=o[i].l,x+=b),this.textSpans[w]?this.textSpans[w].elem=_:this.textSpans[w]={elem:_},w+=1}},_r.prototype.renderInnerContent=function(){this.validateText();var e=this.canvasContext;e.font=this.values.fValue,this.globalData.renderer.ctxLineCap(`butt`),this.globalData.renderer.ctxLineJoin(`miter`),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var t,n,r,i,a,o,s=this.textAnimator.renderedLetters,c=this.textProperty.currentData.l;n=c.length;var l,u=null,d=null,f=null,p,m,h=this.globalData.renderer;for(t=0;t<n;t+=1)if(!c[t].n){if(l=s[t],l&&(h.save(),h.ctxTransform(l.p),h.ctxOpacity(l.o)),this.fill){for(l&&l.fc?u!==l.fc&&(h.ctxFillStyle(l.fc),u=l.fc):u!==this.values.fill&&(u=this.values.fill,h.ctxFillStyle(this.values.fill)),p=this.textSpans[t].elem,i=p.length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(m=p[r],o=m.length,this.globalData.canvasContext.moveTo(m[0],m[1]),a=2;a<o;a+=6)this.globalData.canvasContext.bezierCurveTo(m[a],m[a+1],m[a+2],m[a+3],m[a+4],m[a+5]);this.globalData.canvasContext.closePath(),h.ctxFill()}if(this.stroke){for(l&&l.sw?f!==l.sw&&(f=l.sw,h.ctxLineWidth(l.sw)):f!==this.values.sWidth&&(f=this.values.sWidth,h.ctxLineWidth(this.values.sWidth)),l&&l.sc?d!==l.sc&&(d=l.sc,h.ctxStrokeStyle(l.sc)):d!==this.values.stroke&&(d=this.values.stroke,h.ctxStrokeStyle(this.values.stroke)),p=this.textSpans[t].elem,i=p.length,this.globalData.canvasContext.beginPath(),r=0;r<i;r+=1)for(m=p[r],o=m.length,this.globalData.canvasContext.moveTo(m[0],m[1]),a=2;a<o;a+=6)this.globalData.canvasContext.bezierCurveTo(m[a],m[a+1],m[a+2],m[a+3],m[a+4],m[a+5]);this.globalData.canvasContext.closePath(),h.ctxStroke()}l&&this.globalData.renderer.restore()}};function vr(e,t,n){this.assetData=t.getAssetData(e.refId),this.img=t.imageLoader.getAsset(this.assetData),this.initElement(e,t,n)}u([fn,_n,pr,Tn,pn,$t],vr),vr.prototype.initElement=Gn.prototype.initElement,vr.prototype.prepareFrame=Dn.prototype.prepareFrame,vr.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var e=l(`canvas`);e.width=this.assetData.w,e.height=this.assetData.h;var t=e.getContext(`2d`),n=this.img.width,r=this.img.height,i=n/r,a=this.assetData.w/this.assetData.h,o,s,c=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;i>a&&c===`xMidYMid slice`||i<a&&c!==`xMidYMid slice`?(s=r,o=s*a):(o=n,s=o/a),t.drawImage(this.img,(n-o)/2,(r-s)/2,o,s,0,0,this.assetData.w,this.assetData.h),this.img=e}},vr.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},vr.prototype.destroy=function(){this.img=null};function yr(e,t,n){this.initElement(e,t,n)}u([fn,_n,pr,Tn,pn,$t],yr),yr.prototype.initElement=Gn.prototype.initElement,yr.prototype.prepareFrame=Dn.prototype.prepareFrame,yr.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)};function Z(){}u([hn],Z),Z.prototype.createShape=function(e){return new gr(e,this.globalData,this)},Z.prototype.createText=function(e){return new _r(e,this.globalData,this)},Z.prototype.createImage=function(e){return new vr(e,this.globalData,this)},Z.prototype.createSolid=function(e){return new yr(e,this.globalData,this)},Z.prototype.createNull=ar.prototype.createNull,Z.prototype.ctxTransform=function(e){e[0]===1&&e[1]===0&&e[4]===0&&e[5]===1&&e[12]===0&&e[13]===0||this.canvasContext.transform(e[0],e[1],e[4],e[5],e[12],e[13])},Z.prototype.ctxOpacity=function(e){this.canvasContext.globalAlpha*=e<0?0:e},Z.prototype.ctxFillStyle=function(e){this.canvasContext.fillStyle=e},Z.prototype.ctxStrokeStyle=function(e){this.canvasContext.strokeStyle=e},Z.prototype.ctxLineWidth=function(e){this.canvasContext.lineWidth=e},Z.prototype.ctxLineCap=function(e){this.canvasContext.lineCap=e},Z.prototype.ctxLineJoin=function(e){this.canvasContext.lineJoin=e},Z.prototype.ctxMiterLimit=function(e){this.canvasContext.miterLimit=e},Z.prototype.ctxFill=function(e){this.canvasContext.fill(e)},Z.prototype.ctxFillRect=function(e,t,n,r){this.canvasContext.fillRect(e,t,n,r)},Z.prototype.ctxStroke=function(){this.canvasContext.stroke()},Z.prototype.reset=function(){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}this.contextData.reset()},Z.prototype.save=function(){this.canvasContext.save()},Z.prototype.restore=function(e){if(!this.renderConfig.clearCanvas){this.canvasContext.restore();return}e&&(this.globalData.blendMode=`source-over`),this.contextData.restore(e)},Z.prototype.configAnimation=function(e){if(this.animationItem.wrapper){this.animationItem.container=l(`canvas`);var t=this.animationItem.container.style;t.width=`100%`,t.height=`100%`;var n=`0px 0px 0px`;t.transformOrigin=n,t.mozTransformOrigin=n,t.webkitTransformOrigin=n,t[`-webkit-transform`]=n,t.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext(`2d`),this.renderConfig.className&&this.animationItem.container.setAttribute(`class`,this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute(`id`,this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=e,this.layers=e.layers,this.transformCanvas={w:e.w,h:e.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(e,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=m(e.layers.length),this.updateContainerSize()},Z.prototype.updateContainerSize=function(e,t){this.reset();var n,r;e?(n=e,r=t,this.canvasContext.canvas.width=n,this.canvasContext.canvas.height=r):(this.animationItem.wrapper&&this.animationItem.container?(n=this.animationItem.wrapper.offsetWidth,r=this.animationItem.wrapper.offsetHeight):(n=this.canvasContext.canvas.width,r=this.canvasContext.canvas.height),this.canvasContext.canvas.width=n*this.renderConfig.dpr,this.canvasContext.canvas.height=r*this.renderConfig.dpr);var i,a;if(this.renderConfig.preserveAspectRatio.indexOf(`meet`)!==-1||this.renderConfig.preserveAspectRatio.indexOf(`slice`)!==-1){var o=this.renderConfig.preserveAspectRatio.split(` `),s=o[1]||`meet`,c=o[0]||`xMidYMid`,l=c.substr(0,4),u=c.substr(4);i=n/r,a=this.transformCanvas.w/this.transformCanvas.h,a>i&&s===`meet`||a<i&&s===`slice`?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=r/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.h/this.renderConfig.dpr)),l===`xMid`&&(a<i&&s===`meet`||a>i&&s===`slice`)?this.transformCanvas.tx=(n-this.transformCanvas.w*(r/this.transformCanvas.h))/2*this.renderConfig.dpr:l===`xMax`&&(a<i&&s===`meet`||a>i&&s===`slice`)?this.transformCanvas.tx=(n-this.transformCanvas.w*(r/this.transformCanvas.h))*this.renderConfig.dpr:this.transformCanvas.tx=0,u===`YMid`&&(a>i&&s===`meet`||a<i&&s===`slice`)?this.transformCanvas.ty=(r-this.transformCanvas.h*(n/this.transformCanvas.w))/2*this.renderConfig.dpr:u===`YMax`&&(a>i&&s===`meet`||a<i&&s===`slice`)?this.transformCanvas.ty=(r-this.transformCanvas.h*(n/this.transformCanvas.w))*this.renderConfig.dpr:this.transformCanvas.ty=0}else this.renderConfig.preserveAspectRatio===`none`?(this.transformCanvas.sx=n/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=r/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},Z.prototype.destroy=function(){this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=``);var e;for(e=(this.layers?this.layers.length:0)-1;e>=0;--e)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},Z.prototype.renderFrame=function(e,t){if(!(this.renderedFrame===e&&this.renderConfig.clearCanvas===!0&&!t||this.destroyed||e===-1)){this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var n,r=this.layers.length;for(this.completeLayers||this.checkLayers(e),n=r-1;n>=0;--n)(this.completeLayers||this.elements[n])&&this.elements[n].prepareFrame(e-this.layers[n].st);if(this.globalData._mdf){for(this.renderConfig.clearCanvas===!0?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),n=r-1;n>=0;--n)(this.completeLayers||this.elements[n])&&this.elements[n].renderFrame();this.renderConfig.clearCanvas!==!0&&this.restore()}}},Z.prototype.buildItem=function(e){var t=this.elements;if(!(t[e]||this.layers[e].ty===99)){var n=this.createItem(this.layers[e],this,this.globalData);t[e]=n,n.initExpressions()}},Z.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},Z.prototype.hide=function(){this.animationItem.container.style.display=`none`},Z.prototype.show=function(){this.animationItem.container.style.display=`block`};function br(){this.opacity=-1,this.transform=p(`float32`,16),this.fillStyle=``,this.strokeStyle=``,this.lineWidth=``,this.lineCap=``,this.lineJoin=``,this.miterLimit=``,this.id=Math.random()}function xr(){this.stack=[],this.cArrPos=0,this.cTr=new Qe;var e,t=15;for(e=0;e<t;e+=1){var n=new br;this.stack[e]=n}this._length=t,this.nativeContext=null,this.transformMat=new Qe,this.currentOpacity=1,this.currentFillStyle=``,this.appliedFillStyle=``,this.currentStrokeStyle=``,this.appliedStrokeStyle=``,this.currentLineWidth=``,this.appliedLineWidth=``,this.currentLineCap=``,this.appliedLineCap=``,this.currentLineJoin=``,this.appliedLineJoin=``,this.appliedMiterLimit=``,this.currentMiterLimit=``}xr.prototype.duplicate=function(){var e=this._length*2,t=0;for(t=this._length;t<e;t+=1)this.stack[t]=new br;this._length=e},xr.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},xr.prototype.restore=function(e){--this.cArrPos;var t=this.stack[this.cArrPos],n=t.transform,r,i=this.cTr.props;for(r=0;r<16;r+=1)i[r]=n[r];if(e){this.nativeContext.restore();var a=this.stack[this.cArrPos+1];this.appliedFillStyle=a.fillStyle,this.appliedStrokeStyle=a.strokeStyle,this.appliedLineWidth=a.lineWidth,this.appliedLineCap=a.lineCap,this.appliedLineJoin=a.lineJoin,this.appliedMiterLimit=a.miterLimit}this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13]),(e||t.opacity!==-1&&this.currentOpacity!==t.opacity)&&(this.nativeContext.globalAlpha=t.opacity,this.currentOpacity=t.opacity),this.currentFillStyle=t.fillStyle,this.currentStrokeStyle=t.strokeStyle,this.currentLineWidth=t.lineWidth,this.currentLineCap=t.lineCap,this.currentLineJoin=t.lineJoin,this.currentMiterLimit=t.miterLimit},xr.prototype.save=function(e){e&&this.nativeContext.save();var t=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var n=this.stack[this.cArrPos],r;for(r=0;r<16;r+=1)n.transform[r]=t[r];this.cArrPos+=1;var i=this.stack[this.cArrPos];i.opacity=n.opacity,i.fillStyle=n.fillStyle,i.strokeStyle=n.strokeStyle,i.lineWidth=n.lineWidth,i.lineCap=n.lineCap,i.lineJoin=n.lineJoin,i.miterLimit=n.miterLimit},xr.prototype.setOpacity=function(e){this.stack[this.cArrPos].opacity=e},xr.prototype.setContext=function(e){this.nativeContext=e},xr.prototype.fillStyle=function(e){this.stack[this.cArrPos].fillStyle!==e&&(this.currentFillStyle=e,this.stack[this.cArrPos].fillStyle=e)},xr.prototype.strokeStyle=function(e){this.stack[this.cArrPos].strokeStyle!==e&&(this.currentStrokeStyle=e,this.stack[this.cArrPos].strokeStyle=e)},xr.prototype.lineWidth=function(e){this.stack[this.cArrPos].lineWidth!==e&&(this.currentLineWidth=e,this.stack[this.cArrPos].lineWidth=e)},xr.prototype.lineCap=function(e){this.stack[this.cArrPos].lineCap!==e&&(this.currentLineCap=e,this.stack[this.cArrPos].lineCap=e)},xr.prototype.lineJoin=function(e){this.stack[this.cArrPos].lineJoin!==e&&(this.currentLineJoin=e,this.stack[this.cArrPos].lineJoin=e)},xr.prototype.miterLimit=function(e){this.stack[this.cArrPos].miterLimit!==e&&(this.currentMiterLimit=e,this.stack[this.cArrPos].miterLimit=e)},xr.prototype.transform=function(e){this.transformMat.cloneFromProps(e);var t=this.cTr;this.transformMat.multiply(t),t.cloneFromProps(this.transformMat.props);var n=t.props;this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13])},xr.prototype.opacity=function(e){var t=this.stack[this.cArrPos].opacity;t*=e<0?0:e,this.stack[this.cArrPos].opacity!==t&&(this.currentOpacity!==e&&(this.nativeContext.globalAlpha=e,this.currentOpacity=e),this.stack[this.cArrPos].opacity=t)},xr.prototype.fill=function(e){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(e)},xr.prototype.fillRect=function(e,t,n,r){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(e,t,n,r)},xr.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()};function Sr(e,t,n){this.completeLayers=!1,this.layers=e.layers,this.pendingElements=[],this.elements=m(this.layers.length),this.initElement(e,t,n),this.tm=e.tm?B.getProp(this,e.tm,0,t.frameRate,this):{_placeholder:!0}}u([Z,rr,pr],Sr),Sr.prototype.renderInnerContent=function(){var e=this.canvasContext;e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip();var t;for(t=this.layers.length-1;t>=0;--t)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},Sr.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;--e)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},Sr.prototype.createComp=function(e){return new Sr(e,this.globalData,this)};function Cr(e,t){this.animationItem=e,this.renderConfig={clearCanvas:t&&t.clearCanvas!==void 0?t.clearCanvas:!0,context:t&&t.context||null,progressiveLoad:t&&t.progressiveLoad||!1,preserveAspectRatio:t&&t.preserveAspectRatio||`xMidYMid meet`,imagePreserveAspectRatio:t&&t.imagePreserveAspectRatio||`xMidYMid slice`,contentVisibility:t&&t.contentVisibility||`visible`,className:t&&t.className||``,id:t&&t.id||``,runExpressions:!t||t.runExpressions===void 0||t.runExpressions},this.renderConfig.dpr=t&&t.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=t&&t.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new xr,this.elements=[],this.pendingElements=[],this.transformMat=new Qe,this.completeLayers=!1,this.rendererType=`canvas`,this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}return u([Z],Cr),Cr.prototype.createComp=function(e){return new Sr(e,this.globalData,this)},ye(`canvas`,Cr),_t.registerModifier(`tm`,U),_t.registerModifier(`pb`,yt),_t.registerModifier(`rp`,xt),_t.registerModifier(`rd`,St),_t.registerModifier(`zz`,Ft),_t.registerModifier(`op`,Jt),V}))}))(),1);function _r({documentID:e,className:t=``,showError:n=!0}){let r=(0,g.useRef)(null),i=(0,g.useRef)(null),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(null);return(0,g.useEffect)(()=>{let t=!1,n=null;return o(``),c(null),fetch(k.stickerDocumentAnimationURL(e),{credentials:`same-origin`}).then(async e=>{if(!e.ok){let t=await e.json().catch(()=>null);throw Error(t?.error||e.statusText)}if((e.headers.get(`content-type`)??``).includes(`json`)){let n=await e.json();if(t||!r.current)return;i.current?.destroy(),i.current=gr.default.loadAnimation({container:r.current,renderer:`canvas`,loop:!0,autoplay:!0,animationData:n});return}let a=await e.blob();t||(n=URL.createObjectURL(a),c(n))}).catch(e=>{t||o(O(e))}),()=>{t=!0,i.current?.destroy(),i.current=null,n&&URL.revokeObjectURL(n)}},[e]),(0,W.jsxs)(`div`,{className:`sticker-doc-cell ${t}`.trim(),children:[s?(0,W.jsx)(`img`,{className:`sticker-doc-image`,src:s,alt:``}):(0,W.jsx)(`div`,{className:`sticker-doc-canvas`,ref:r}),a&&n&&(0,W.jsx)(`span`,{className:`sticker-doc-error`,children:a})]})}function vr({kind:e,onClose:t,onCreated:n}){let r=e===`emoji`?`emoji`:`sticker`,[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(``),[c,l]=(0,g.useState)(``),[u,d]=(0,g.useState)(null),[f,p]=(0,g.useState)(``),[m,h]=(0,g.useState)(!1),[_,v]=(0,g.useState)(``);async function y(){if(!i.trim()||!o.trim()||!c.trim()||!u){v(`Title, short name, emoji and a first ${r} file are required.`);return}if(!f.trim()){v(`Please enter an operation reason`);return}h(!0),v(``);try{let r=new FormData;r.set(`metadata`,JSON.stringify({command_id:``,reason:f.trim(),confirm:!0,title:i.trim(),short_name:o.trim().toLowerCase(),kind:e,emoji:c.trim()})),r.set(`file`,u,u.name),await k.createStickerSet(r),n(),t()}catch(e){v(O(e))}finally{h(!1)}}return(0,pn.createPortal)((0,W.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,W.jsxs)(`section`,{className:`modal command-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":`Create a new ${r} pack`,children:[(0,W.jsxs)(`div`,{className:`modal-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`eyebrow`,children:`New set`}),(0,W.jsx)(`h2`,{children:`Create a new ${r} pack`})]}),(0,W.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:t,disabled:m,"aria-label":`Close`,children:(0,W.jsx)(ht,{size:15})})]}),(0,W.jsxs)(`div`,{className:`command-body`,children:[(0,W.jsxs)(`div`,{className:`gift-fields-grid`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`span`,{children:`Title`}),(0,W.jsx)(`input`,{value:i,maxLength:64,onChange:e=>a(e.target.value)})]}),(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`span`,{children:`Short name`}),(0,W.jsx)(`input`,{value:o,maxLength:32,onChange:e=>s(e.target.value),placeholder:`lowercase_short_name`})]}),(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`span`,{children:`Emoji`}),(0,W.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),placeholder:`e.g. 😀`})]})]}),(0,W.jsxs)(`label`,{className:`gift-file-picker ${u?`has-file`:``}`,children:[(0,W.jsx)(`input`,{type:`file`,accept:`.tgs,.json,.webp,application/json,application/x-tgsticker,image/webp`,onChange:e=>d(e.target.files?.[0]??null)}),(0,W.jsxs)(`span`,{className:`gift-file-copy`,children:[(0,W.jsx)(`span`,{className:`gift-field-label`,children:`First ${r}`}),(0,W.jsx)(`strong`,{children:u?u.name:`Choose a TGS, Lottie JSON, or WebP file`})]}),(0,W.jsx)(`span`,{className:`gift-file-action`,children:u?`Change file`:`Choose file`})]}),(0,W.jsxs)(`label`,{className:`gift-reason-field`,children:[(0,W.jsx)(`span`,{children:`Audit reason`}),(0,W.jsx)(`input`,{value:f,placeholder:`Briefly describe why this gift is being imported`,onChange:e=>p(e.target.value)})]}),_&&(0,W.jsx)(K,{children:_})]}),(0,W.jsxs)(`div`,{className:`modal-actions`,children:[(0,W.jsx)(`button`,{className:`btn`,type:`button`,onClick:t,disabled:m,children:`Close`}),(0,W.jsxs)(`button`,{className:`btn primary`,type:`button`,onClick:y,disabled:m,children:[m?(0,W.jsx)(L,{className:`spin`,size:15}):(0,W.jsx)(dt,{size:15}),`Create ${r} pack`]})]})]})}),document.body)}var yr=24;function Z({set:e,onClose:t}){let n=e.Kind===`emoji`?`emoji`:`sticker`,[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(1),l=(0,g.useCallback)(()=>{let t=!1;return o(``),k.stickerSetDocuments(e.ID).then(e=>{t||i(e.document_ids??[])}).catch(e=>{t||o(O(e))}),()=>{t=!0}},[e.ID]);(0,g.useEffect)(()=>(i(null),c(1),l()),[l]);let u=r?.length??0,d=Math.max(1,Math.ceil(u/yr)),f=Math.min(s,d),p=(f-1)*yr,m=r?.slice(p,p+yr)??[],h=m.length===0?0:p+1,_=h===0?0:h+m.length-1;return(0,pn.createPortal)((0,W.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,W.jsxs)(`section`,{className:`modal command-modal sticker-preview-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":e.Title||`#${e.ID}`,children:[(0,W.jsxs)(`div`,{className:`modal-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`eyebrow`,children:`Set contents`}),(0,W.jsx)(`h2`,{children:e.Title||`#${e.ID}`})]}),(0,W.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:t,"aria-label":`Close`,children:(0,W.jsx)(ht,{size:15})})]}),(0,W.jsxs)(`div`,{className:`command-body`,children:[(0,W.jsx)(br,{setID:e.ID,noun:n,onAdded:l}),a&&(0,W.jsx)(K,{children:a}),!a&&r===null&&(0,W.jsxs)(`div`,{className:`loading-line`,children:[(0,W.jsx)(L,{className:`spin`,size:18}),` `,`Loading`]}),r!==null&&u===0&&!a&&(0,W.jsx)(`div`,{className:`empty-panel`,children:`This set has no documents.`}),m.length>0&&(0,W.jsx)(`div`,{className:`sticker-doc-grid`,children:m.map(t=>(0,W.jsxs)(`div`,{className:`sticker-doc-grid-cell`,children:[(0,W.jsx)(_r,{documentID:t}),(0,W.jsx)(X,{compact:!0,tone:`danger`,label:`Remove`,icon:(0,W.jsx)(lt,{size:12}),path:`/api/actions/remove-sticker-from-set`,payload:()=>({set_id:e.ID,document_id:t}),onDone:l})]},t))},f),u>yr&&(0,W.jsxs)(`div`,{className:`gift-pager`,children:[(0,W.jsx)(`span`,{className:`gift-pager-range`,children:`Showing ${h}-${_} of ${u}`}),(0,W.jsxs)(`div`,{className:`gift-pager-controls`,children:[(0,W.jsxs)(`button`,{className:`btn compact-btn`,type:`button`,onClick:()=>c(e=>Math.max(1,e-1)),disabled:f<=1,children:[(0,W.jsx)(_e,{size:14}),` `,`Previous`]}),(0,W.jsx)(`span`,{className:`gift-pager-page`,children:`Page ${f} of ${d}`}),(0,W.jsxs)(`button`,{className:`btn compact-btn`,type:`button`,onClick:()=>c(e=>Math.min(d,e+1)),disabled:f>=d,children:[`Next`,` `,(0,W.jsx)(ve,{size:14})]})]})]})]})]})}),document.body)}function br({setID:e,noun:t,onAdded:n}){let[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(``),[l,u]=(0,g.useState)(!1),[d,f]=(0,g.useState)(``);async function p(){if(!r){f(`Choose a ${t} file first`);return}if(!a.trim()){f(`An emoji is required.`);return}if(!s.trim()){f(`Please enter an operation reason`);return}u(!0),f(``);try{let t=new FormData;t.set(`metadata`,JSON.stringify({command_id:``,reason:s.trim(),confirm:!0,set_id:e,emoji:a.trim()})),t.set(`file`,r,r.name),await k.addStickerToSet(t),i(null),o(``),c(``),n()}catch(e){f(O(e))}finally{u(!1)}}return(0,W.jsxs)(`div`,{className:`sticker-add-form`,children:[(0,W.jsxs)(`label`,{className:`gift-file-picker compact ${r?`has-file`:``}`,children:[(0,W.jsx)(`input`,{type:`file`,accept:`.tgs,.json,.webp,application/json,application/x-tgsticker,image/webp`,onChange:e=>i(e.target.files?.[0]??null)}),(0,W.jsx)(`span`,{className:`gift-file-copy`,children:(0,W.jsx)(`strong`,{children:r?r.name:`Choose a TGS, Lottie JSON, or WebP file`})})]}),(0,W.jsx)(`input`,{className:`small-input`,value:a,onChange:e=>o(e.target.value),placeholder:`e.g. 😀`}),(0,W.jsx)(`input`,{className:`small-input`,value:s,onChange:e=>c(e.target.value),placeholder:`Describe why this operation is being performed`}),(0,W.jsxs)(`button`,{className:`btn primary compact-btn`,type:`button`,onClick:p,disabled:l,children:[l?(0,W.jsx)(L,{className:`spin`,size:14}):(0,W.jsx)(Ge,{size:14}),` `,`Add ${t}`]}),d&&(0,W.jsx)(`span`,{className:`sticker-add-form-error`,children:d})]})}function xr({kind:e}){let[t,n]=(0,g.useState)([]),[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)(!1),[s,c]=(0,g.useState)(``),[l,u]=(0,g.useState)(10),[d,f]=(0,g.useState)(1),[p,m]=(0,g.useState)({}),[h,_]=(0,g.useState)({}),[v,y]=(0,g.useState)(null),[b,x]=(0,g.useState)(!1),S=e===`emoji`?`Emoji`:`Stickers`,C=e===`emoji`?`Custom-emoji packs — system packs aren't shown here, they're not hand-edited`:`Sticker packs — system packs (dice, animated emoji, gifts) aren't shown here, they're not hand-edited`,w=e===`emoji`?`emoji`:`sticker`;async function T(){o(!0),c(``);try{n((await k.stickerSets(e)).rows??[])}catch(e){c(O(e))}finally{o(!1)}}(0,g.useEffect)(()=>{T()},[e]);let E=(0,g.useMemo)(()=>{let e=r.trim().toLowerCase();return e?t.filter(t=>String(t.ID).includes(e)||t.ShortName.toLowerCase().includes(e)||t.Title.toLowerCase().includes(e)):t},[t,r]);(0,g.useEffect)(()=>{f(1)},[r,l,e]);let D=l===`all`?1:Math.max(1,Math.ceil(E.length/l)),A=Math.min(d,D),j=(0,g.useMemo)(()=>{if(l===`all`)return E;let e=(A-1)*l;return E.slice(e,e+l)},[E,A,l]),M=j.length===0?0:l===`all`?1:(A-1)*l+1,N=M===0?0:M+j.length-1,P=(0,g.useMemo)(()=>({total:t.length,official:t.filter(e=>e.Official).length,archived:t.filter(e=>e.Archived).length}),[t]);return(0,W.jsxs)(Mt,{title:S,eyebrow:C,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:`btn`,type:`button`,onClick:()=>T(),disabled:a,children:[(0,W.jsx)(Ye,{size:15}),` `,`Refresh`]}),(0,W.jsxs)(`button`,{className:`btn primary`,type:`button`,onClick:()=>x(!0),children:[(0,W.jsx)(Ge,{size:15}),` `,`Create ${w} pack`]})]}),children:[s&&(0,W.jsx)(K,{children:s}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Total sets`,value:String(P.total)}),(0,W.jsx)(J,{label:`Official`,value:String(P.official),tone:`good`}),(0,W.jsx)(J,{label:`Archived`,value:String(P.archived),tone:P.archived>0?`warn`:`neutral`})]}),(0,W.jsx)(Nt,{children:(0,W.jsxs)(`div`,{className:`toolbar`,children:[(0,W.jsxs)(`label`,{className:`searchbox`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),placeholder:`Search set ID, short name or title`})]}),(0,W.jsxs)(`label`,{className:`gift-page-size`,children:[(0,W.jsx)(`span`,{children:`Per page`}),(0,W.jsxs)(`select`,{value:String(l),onChange:e=>u(e.target.value===`all`?`all`:Number(e.target.value)),children:[(0,W.jsx)(`option`,{value:`10`,children:`10`}),(0,W.jsx)(`option`,{value:`20`,children:`20`}),(0,W.jsx)(`option`,{value:`50`,children:`50`}),(0,W.jsx)(`option`,{value:`100`,children:`100`}),(0,W.jsx)(`option`,{value:`all`,children:`All`})]})]}),(0,W.jsx)(`span`,{className:`gift-list-summary`,children:`Showing ${E.length} of ${t.length}`})]})}),(0,W.jsx)(`div`,{className:`table-wrap gift-table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`Logo`}),(0,W.jsx)(`th`,{children:`ID`}),(0,W.jsx)(`th`,{children:`Short name`}),(0,W.jsx)(`th`,{children:`Title`}),(0,W.jsx)(`th`,{children:`Documents`}),(0,W.jsx)(`th`,{children:`Official`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Sort order`}),(0,W.jsx)(`th`,{children:`Actions`})]})}),(0,W.jsxs)(`tbody`,{children:[j.map(e=>(0,W.jsxs)(`tr`,{className:e.Archived?`gift-row-disabled`:``,children:[(0,W.jsx)(`td`,{children:e.CoverDocumentID?(0,W.jsx)(_r,{documentID:e.CoverDocumentID,className:`list-thumb`,showError:!1}):(0,W.jsx)(`div`,{className:`sticker-list-thumb-empty`,children:(0,W.jsx)(Me,{size:14})})}),(0,W.jsx)(`td`,{className:`mono`,children:e.ID}),(0,W.jsx)(`td`,{className:`mono`,children:e.ShortName||(0,W.jsx)(`span`,{className:`muted-cell`,children:`None`})}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`div`,{className:`sort-order-editor`,children:[(0,W.jsx)(`input`,{className:`small-input title-input`,value:h[e.ID]??e.Title,onChange:t=>_(n=>({...n,[e.ID]:t.target.value}))}),(0,W.jsx)(X,{compact:!0,tone:`neutral`,label:`Save`,path:`/api/actions/rename-sticker-set`,payload:()=>({set_id:e.ID,title:(h[e.ID]??e.Title).trim()}),onDone:()=>void T()})]})}),(0,W.jsx)(`td`,{children:e.Count}),(0,W.jsx)(`td`,{children:e.Official?(0,W.jsx)(q,{tone:`good`,children:`Yes`}):(0,W.jsx)(q,{children:`No`})}),(0,W.jsx)(`td`,{children:e.Archived?(0,W.jsx)(q,{tone:`danger`,children:`Archived`}):(0,W.jsx)(q,{tone:`good`,children:`Enabled`})}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`div`,{className:`sort-order-editor`,children:[(0,W.jsx)(`input`,{type:`number`,className:`small-input`,value:p[e.ID]??String(e.SortOrder),onChange:t=>m(n=>({...n,[e.ID]:t.target.value}))}),(0,W.jsx)(X,{compact:!0,tone:`neutral`,label:`Save`,path:`/api/actions/set-sticker-set-sort-order`,payload:()=>({set_id:e.ID,sort_order:Number(p[e.ID]??e.SortOrder)}),onDone:()=>void T()})]})}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`div`,{className:`gift-table-actions`,children:[(0,W.jsxs)(`button`,{className:`btn compact-btn`,type:`button`,onClick:()=>y(e),children:[(0,W.jsx)(we,{size:13}),` `,`View`]}),(0,W.jsx)(X,{compact:!0,tone:`neutral`,label:e.Archived?`Unarchive`:`Archive`,path:`/api/actions/set-sticker-set-archived`,payload:()=>({set_id:e.ID,archived:!e.Archived}),onDone:()=>void T()}),(0,W.jsx)(X,{compact:!0,tone:`danger`,label:`Delete`,path:`/api/actions/delete-sticker-set`,payload:()=>({set_id:e.ID}),onDone:()=>void T()})]})})]},e.ID)),j.length===0&&(0,W.jsx)(It,{colSpan:9})]})]})}),l!==`all`&&E.length>0&&(0,W.jsxs)(`div`,{className:`gift-pager`,children:[(0,W.jsx)(`span`,{className:`gift-pager-range`,children:`Showing ${M}-${N} of ${E.length}`}),(0,W.jsxs)(`div`,{className:`gift-pager-controls`,children:[(0,W.jsxs)(`button`,{className:`btn compact-btn`,type:`button`,onClick:()=>f(e=>Math.max(1,e-1)),disabled:A<=1,children:[(0,W.jsx)(_e,{size:14}),` `,`Previous`]}),(0,W.jsx)(`span`,{className:`gift-pager-page`,children:`Page ${A} of ${D}`}),(0,W.jsxs)(`button`,{className:`btn compact-btn`,type:`button`,onClick:()=>f(e=>Math.min(D,e+1)),disabled:A>=D,children:[`Next`,` `,(0,W.jsx)(ve,{size:14})]})]})]}),v&&(0,W.jsx)(Z,{set:v,onClose:()=>y(null)}),b&&(0,W.jsx)(vr,{kind:e,onClose:()=>x(!1),onCreated:()=>void T()})]})}var Sr=[`Love`,`Approval`,`Disapproval`,`Cheers`,`Laughter`,`Astonishment`,`Sadness`,`Anger`,`Neutral`,`Doubt`,`Silly`];function Cr({documentID:e}){let[t,n]=(0,g.useState)(!1);return t?(0,W.jsx)(`div`,{className:`sticker-list-thumb-empty`,children:(0,W.jsx)(Me,{size:14})}):(0,W.jsx)(`video`,{className:`gif-catalog-thumb`,src:k.gifCatalogDocumentPreviewURL(e),muted:!0,loop:!0,autoPlay:!0,playsInline:!0,onError:()=>n(!0)})}function wr(){let[e,t]=(0,g.useState)([]),[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(!1),[o,s]=(0,g.useState)(``),[c,l]=(0,g.useState)(10),[u,d]=(0,g.useState)(1),[f,p]=(0,g.useState)({}),[m,h]=(0,g.useState)({}),[_,v]=(0,g.useState)(!1);async function y(){a(!0),s(``);try{t((await k.gifCatalog()).rows??[])}catch(e){s(O(e))}finally{a(!1)}}(0,g.useEffect)(()=>{y()},[]);let b=(0,g.useMemo)(()=>{let t=n.trim().toLowerCase();return t?e.filter(e=>e.ID.includes(t)||e.Title.toLowerCase().includes(t)):e},[e,n]);(0,g.useEffect)(()=>{d(1)},[n,c]);let x=c===`all`?1:Math.max(1,Math.ceil(b.length/c)),S=Math.min(u,x),C=(0,g.useMemo)(()=>{if(c===`all`)return b;let e=(S-1)*c;return b.slice(e,e+c)},[b,S,c]),w=C.length===0?0:c===`all`?1:(S-1)*c+1,T=w===0?0:w+C.length-1,E=(0,g.useMemo)(()=>({total:e.length,enabled:e.filter(e=>e.Enabled).length,uncategorized:e.filter(e=>!e.Category).length}),[e]);return(0,W.jsxs)(Mt,{title:`GIFs`,eyebrow:`Curated GIFs served by @gif in the client's GIF picker (trending + search)`,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:`btn`,type:`button`,onClick:()=>y(),disabled:i,children:[(0,W.jsx)(Ye,{size:15}),` `,`Refresh`]}),(0,W.jsx)(X,{tone:`neutral`,label:`Auto-categorize`,path:`/api/actions/auto-categorize-gif-catalog`,payload:()=>({}),onDone:()=>void y()}),(0,W.jsx)(X,{tone:`danger`,label:`Delete uncategorized`,path:`/api/actions/delete-uncategorized-gifs`,payload:()=>({}),onDone:()=>void y()}),(0,W.jsxs)(`button`,{className:`btn primary`,type:`button`,onClick:()=>v(!0),children:[(0,W.jsx)(Ge,{size:15}),` `,`Add GIF`]})]}),children:[o&&(0,W.jsx)(K,{children:o}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Total GIFs`,value:String(E.total)}),(0,W.jsx)(J,{label:`Enabled`,value:String(E.enabled),tone:`good`}),(0,W.jsx)(J,{label:`Uncategorized`,value:String(E.uncategorized),tone:E.uncategorized>0?`warn`:void 0})]}),(0,W.jsx)(Nt,{children:(0,W.jsxs)(`div`,{className:`toolbar`,children:[(0,W.jsxs)(`label`,{className:`searchbox`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:n,onChange:e=>r(e.target.value),placeholder:`Search ID or title`})]}),(0,W.jsxs)(`label`,{className:`gift-page-size`,children:[(0,W.jsx)(`span`,{children:`Per page`}),(0,W.jsxs)(`select`,{value:String(c),onChange:e=>l(e.target.value===`all`?`all`:Number(e.target.value)),children:[(0,W.jsx)(`option`,{value:`10`,children:`10`}),(0,W.jsx)(`option`,{value:`20`,children:`20`}),(0,W.jsx)(`option`,{value:`50`,children:`50`}),(0,W.jsx)(`option`,{value:`100`,children:`100`}),(0,W.jsx)(`option`,{value:`all`,children:`All`})]})]}),(0,W.jsx)(`span`,{className:`gift-list-summary`,children:`Showing ${b.length} of ${e.length}`})]})}),(0,W.jsx)(`div`,{className:`table-wrap gift-table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`Preview`}),(0,W.jsx)(`th`,{children:`ID`}),(0,W.jsx)(`th`,{children:`Title`}),(0,W.jsx)(`th`,{children:`Document ID`}),(0,W.jsx)(`th`,{children:`Added by`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Category`}),(0,W.jsx)(`th`,{children:`Sort order`}),(0,W.jsx)(`th`,{children:`Actions`})]})}),(0,W.jsxs)(`tbody`,{children:[C.map(e=>(0,W.jsxs)(`tr`,{className:e.Enabled?``:`gift-row-disabled`,children:[(0,W.jsx)(`td`,{children:(0,W.jsx)(Cr,{documentID:e.DocumentID})}),(0,W.jsx)(`td`,{className:`mono`,children:e.ID}),(0,W.jsx)(`td`,{children:e.Title||(0,W.jsx)(`span`,{className:`muted-cell`,children:`Untitled`})}),(0,W.jsx)(`td`,{className:`mono`,children:e.DocumentID}),(0,W.jsx)(`td`,{children:e.CreatedBy||(0,W.jsx)(`span`,{className:`muted-cell`,children:`—`})}),(0,W.jsx)(`td`,{children:e.Enabled?(0,W.jsx)(q,{tone:`good`,children:`Enabled`}):(0,W.jsx)(q,{tone:`danger`,children:`Disabled`})}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`div`,{className:`sort-order-editor`,children:[(0,W.jsxs)(`select`,{className:`small-input`,value:m[e.ID]??e.Category,onChange:t=>h(n=>({...n,[e.ID]:t.target.value})),children:[(0,W.jsx)(`option`,{value:``,children:`Uncategorized`}),Sr.map(e=>(0,W.jsx)(`option`,{value:e,children:e},e))]}),(0,W.jsx)(X,{compact:!0,tone:`neutral`,label:`Save`,path:`/api/actions/set-gif-catalog-category`,payload:()=>({id:e.ID,category:m[e.ID]??e.Category}),onDone:()=>void y()})]})}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`div`,{className:`sort-order-editor`,children:[(0,W.jsx)(`input`,{type:`number`,className:`small-input`,value:f[e.ID]??String(e.SortOrder),onChange:t=>p(n=>({...n,[e.ID]:t.target.value}))}),(0,W.jsx)(X,{compact:!0,tone:`neutral`,label:`Save`,path:`/api/actions/set-gif-catalog-sort-order`,payload:()=>({id:e.ID,sort_order:Number(f[e.ID]??e.SortOrder)}),onDone:()=>void y()})]})}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`div`,{className:`gift-table-actions`,children:[(0,W.jsx)(X,{compact:!0,tone:`neutral`,label:e.Enabled?`Disable`:`Enable`,path:`/api/actions/set-gif-catalog-enabled`,payload:()=>({id:e.ID,enabled:!e.Enabled}),onDone:()=>void y()}),(0,W.jsx)(X,{compact:!0,tone:`danger`,label:`Delete`,path:`/api/actions/delete-gif-catalog-entry`,payload:()=>({id:e.ID}),onDone:()=>void y()})]})})]},e.ID)),C.length===0&&(0,W.jsx)(It,{colSpan:9})]})]})}),c!==`all`&&b.length>0&&(0,W.jsxs)(`div`,{className:`gift-pager`,children:[(0,W.jsx)(`span`,{className:`gift-pager-range`,children:`Showing ${w}-${T} of ${b.length}`}),(0,W.jsxs)(`div`,{className:`gift-pager-controls`,children:[(0,W.jsxs)(`button`,{className:`btn compact-btn`,type:`button`,onClick:()=>d(e=>Math.max(1,e-1)),disabled:S<=1,children:[(0,W.jsx)(_e,{size:14}),` `,`Previous`]}),(0,W.jsx)(`span`,{className:`gift-pager-page`,children:`Page ${S} of ${x}`}),(0,W.jsxs)(`button`,{className:`btn compact-btn`,type:`button`,onClick:()=>d(e=>Math.min(x,e+1)),disabled:S>=x,children:[`Next`,` `,(0,W.jsx)(ve,{size:14})]})]})]}),_&&(0,W.jsx)(Tr,{onClose:()=>v(!1),onCreated:()=>void y()})]})}function Tr({onClose:e,onCreated:t}){let[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(null),[c,l]=(0,g.useState)(``),[u,d]=(0,g.useState)(!1),[f,p]=(0,g.useState)(``);function m(e){a(e),s(t=>(t&&URL.revokeObjectURL(t),e?URL.createObjectURL(e):null))}async function h(){if(!n.trim()||!i){p(`Title and a GIF/MP4 file are required.`);return}if(!c.trim()){p(`Please enter an operation reason`);return}d(!0),p(``);try{let r=new FormData;r.set(`metadata`,JSON.stringify({command_id:``,reason:c.trim(),confirm:!0,title:n.trim()})),r.set(`file`,i,i.name),await k.createGifCatalogEntry(r),t(),e()}catch(e){p(O(e))}finally{d(!1)}}return(0,pn.createPortal)((0,W.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,W.jsxs)(`section`,{className:`modal command-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":`Add a GIF`,children:[(0,W.jsxs)(`div`,{className:`modal-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`eyebrow`,children:`New catalog entry`}),(0,W.jsx)(`h2`,{children:`Add a GIF`})]}),(0,W.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:e,disabled:u,"aria-label":`Close`,children:(0,W.jsx)(ht,{size:15})})]}),(0,W.jsxs)(`div`,{className:`command-body`,children:[(0,W.jsx)(`div`,{className:`gift-fields-grid`,children:(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`span`,{children:`Title`}),(0,W.jsx)(`input`,{value:n,maxLength:128,onChange:e=>r(e.target.value)})]})}),(0,W.jsxs)(`label`,{className:`gift-file-picker ${i?`has-file`:``}`,children:[(0,W.jsx)(`input`,{type:`file`,accept:`.gif,.mp4,image/gif,video/mp4`,onChange:e=>m(e.target.files?.[0]??null)}),(0,W.jsxs)(`span`,{className:`gift-file-copy`,children:[(0,W.jsx)(`span`,{className:`gift-field-label`,children:`File`}),(0,W.jsx)(`strong`,{children:i?i.name:`Choose a GIF or MP4 file`})]}),(0,W.jsx)(`span`,{className:`gift-file-action`,children:i?`Change file`:`Choose file`})]}),o&&(0,W.jsx)(`div`,{className:`gif-catalog-preview`,children:i?.type===`video/mp4`?(0,W.jsx)(`video`,{src:o,autoPlay:!0,loop:!0,muted:!0,playsInline:!0}):(0,W.jsx)(`img`,{src:o,alt:``})}),(0,W.jsxs)(`label`,{className:`gift-reason-field`,children:[(0,W.jsx)(`span`,{children:`Audit reason`}),(0,W.jsx)(`input`,{value:c,placeholder:`Briefly describe why this GIF is being added`,onChange:e=>l(e.target.value)})]}),f&&(0,W.jsx)(K,{children:f})]}),(0,W.jsxs)(`div`,{className:`modal-actions`,children:[(0,W.jsx)(`button`,{className:`btn`,type:`button`,onClick:e,disabled:u,children:`Close`}),(0,W.jsxs)(`button`,{className:`btn primary`,type:`button`,onClick:h,disabled:u,children:[u?(0,W.jsx)(L,{className:`spin`,size:15}):(0,W.jsx)(dt,{size:15}),`Add GIF`]})]})]})}),document.body)}function Er(){let[e,t]=(0,g.useState)(`settings`);return(0,W.jsxs)(Mt,{title:`Server Settings`,eyebrow:`Identity, .env, and live process/service control`,children:[(0,W.jsxs)(`div`,{className:`tab-bar`,role:`tablist`,"aria-label":`Server Settings sections`,children:[(0,W.jsx)(`button`,{className:`tab-btn ${e===`settings`?`active`:``}`,type:`button`,role:`tab`,"aria-selected":e===`settings`,onClick:()=>t(`settings`),children:`Settings`}),(0,W.jsx)(`button`,{className:`tab-btn ${e===`services`?`active`:``}`,type:`button`,role:`tab`,"aria-selected":e===`services`,onClick:()=>t(`services`),children:`Services`})]}),e===`settings`?(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsx)(Dr,{}),(0,W.jsx)(kr,{})]}):(0,W.jsx)(`div`,{className:`stacked-sections`,children:(0,W.jsx)(Br,{})})]})}function Dr(){let[e,t]=(0,g.useState)(null),[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(!1),[c,l]=(0,g.useState)(0),[u,d]=(0,g.useState)(!1),[f,p]=(0,g.useState)(``);async function m(){p(``);try{let e=await k.serverIdentity();t(e),r(e.name),a(e.description),d(!1)}catch(e){p(O(e))}}return(0,g.useEffect)(()=>{m()},[]),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Server identity`}),f&&(0,W.jsx)(K,{children:f}),e?(0,W.jsxs)(`div`,{className:`card-body identity-card`,children:[(0,W.jsxs)(`div`,{className:`identity-layout`,children:[(0,W.jsxs)(`div`,{className:`avatar-edit-slot`,children:[e.icon_ext&&!u?(0,W.jsx)(`img`,{className:`avatar-photo-img`,src:k.serverIconURL()+`&b=${c}`,alt:``,style:{width:88,height:88},onError:()=>d(!0)}):(0,W.jsx)(`div`,{className:`avatar-fallback server-icon-fallback`,style:{width:88,height:88},children:(0,W.jsx)(Me,{size:26})}),(0,W.jsx)(`button`,{className:`icon-btn avatar-edit-btn`,type:`button`,"aria-label":`Change server icon`,title:`Change server icon`,onClick:()=>s(!0),children:(0,W.jsx)(Ne,{size:14})})]}),(0,W.jsxs)(`div`,{className:`server-identity-fields`,children:[(0,W.jsxs)(`label`,{className:`form-field`,children:[(0,W.jsx)(`span`,{children:`Name`}),(0,W.jsx)(`input`,{value:n,maxLength:128,onChange:e=>r(e.target.value)})]}),(0,W.jsxs)(`label`,{className:`form-field`,children:[(0,W.jsx)(`span`,{children:`Description`}),(0,W.jsx)(`textarea`,{rows:4,value:i,maxLength:512,onChange:e=>a(e.target.value)})]})]})]}),(0,W.jsx)(`div`,{className:`gift-table-actions identity-save-row`,children:(0,W.jsx)(X,{tone:`neutral`,label:`Save identity`,path:`/api/actions/set-server-identity`,payload:()=>({name:n,description:i}),onDone:()=>void m()})})]}):(0,W.jsx)(Lt,{label:`Loading identity...`}),o&&(0,W.jsx)(Or,{hasIcon:!!e?.icon_ext,onClose:()=>s(!1),onDone:()=>{l(e=>e+1),d(!1),m()}})]})}function Or({hasIcon:e,onClose:t,onDone:n}){let[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(``),[l,u]=(0,g.useState)(!1),[d,f]=(0,g.useState)(``);(0,g.useEffect)(()=>{if(!r){o(``);return}let e=URL.createObjectURL(r);return o(e),()=>URL.revokeObjectURL(e)},[r]);async function p(){if(!r){f(`Choose an image file first.`);return}if(!s.trim()){f(`Please enter an operation reason`);return}u(!0),f(``);try{let e=new FormData;e.set(`metadata`,JSON.stringify({command_id:``,reason:s.trim(),confirm:!0})),e.set(`file`,r,r.name);let i=await k.uploadServerIcon(e);if(i.error){f(i.error);return}n(),t()}catch(e){f(O(e))}finally{u(!1)}}async function m(){if(!s.trim()){f(`Please enter an operation reason`);return}u(!0),f(``);try{let e=await k.action(`/api/actions/remove-server-icon`,{command_id:``,reason:s.trim(),confirm:!0});if(e.error){f(e.error);return}n(),t()}catch(e){f(O(e))}finally{u(!1)}}return(0,pn.createPortal)((0,W.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,W.jsxs)(`section`,{className:`modal command-modal`,role:`dialog`,"aria-modal":`true`,"aria-label":`Change server icon`,children:[(0,W.jsxs)(`div`,{className:`modal-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`eyebrow`,children:`Server identity`}),(0,W.jsx)(`h2`,{children:`Change server icon`})]}),(0,W.jsx)(`button`,{className:`icon-btn`,type:`button`,onClick:t,disabled:l,"aria-label":`Close`,children:(0,W.jsx)(ht,{size:15})})]}),(0,W.jsxs)(`div`,{className:`command-body`,children:[(0,W.jsxs)(`label`,{className:`gift-file-picker ${r?`has-file`:``}`,children:[(0,W.jsx)(`input`,{type:`file`,accept:`.png,.jpg,.jpeg,.webp,.gif,image/png,image/jpeg,image/webp,image/gif`,onChange:e=>i(e.target.files?.[0]??null)}),a?(0,W.jsx)(`img`,{className:`gift-file-icon`,src:a,alt:``,style:{objectFit:`cover`}}):(0,W.jsx)(Ne,{size:22}),(0,W.jsxs)(`span`,{className:`gift-file-copy`,children:[(0,W.jsx)(`span`,{className:`gift-field-label`,children:`New icon`}),(0,W.jsx)(`strong`,{children:r?r.name:`Choose a PNG, JPEG, WebP, or GIF image`})]}),(0,W.jsx)(`span`,{className:`gift-file-action`,children:r?`Change file`:`Choose file`})]}),(0,W.jsxs)(`label`,{className:`gift-reason-field`,children:[(0,W.jsx)(`span`,{children:`Audit reason`}),(0,W.jsx)(`input`,{value:s,placeholder:`Briefly describe why the server icon is changing`,onChange:e=>c(e.target.value)})]}),d&&(0,W.jsx)(K,{children:d})]}),(0,W.jsxs)(`div`,{className:`modal-actions`,children:[(0,W.jsx)(`button`,{className:`btn`,type:`button`,onClick:t,disabled:l,children:`Close`}),e&&(0,W.jsxs)(`button`,{className:`btn danger icon-text`,type:`button`,onClick:()=>void m(),disabled:l,children:[l?(0,W.jsx)(L,{className:`spin`,size:15}):(0,W.jsx)(lt,{size:15}),`Remove icon`]}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`button`,onClick:()=>void p(),disabled:l,children:[l?(0,W.jsx)(L,{className:`spin`,size:15}):(0,W.jsx)(dt,{size:15}),`Upload icon`]})]})]})}),document.body)}function kr(){let[e,t]=(0,g.useState)([]),[n,r]=(0,g.useState)({}),[i,a]=(0,g.useState)({}),[o,s]=(0,g.useState)(``);async function c(){s(``);try{let e=await k.serverEnv();t(e);let n={};for(let t of e)for(let e of t.fields)n[e.key]=e.value;r(n)}catch(e){s(O(e))}}return(0,g.useEffect)(()=>{c()},[]),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Environment (.env)`,text:`${(0,g.useMemo)(()=>e.reduce((e,t)=>e+t.fields.length,0),[e])} setting(s) across ${e.length} group(s). Changes take effect on the next Restart/Update.`}),o&&(0,W.jsx)(K,{children:o}),(0,W.jsx)(`div`,{className:`env-groups`,children:e.map(e=>{let t=!!i[e.title];return(0,W.jsxs)(`div`,{className:`env-group ${t?`open`:``}`,children:[(0,W.jsxs)(`button`,{className:`env-group-toggle`,type:`button`,"aria-expanded":t,onClick:()=>a(t=>({...t,[e.title]:!t[e.title]})),children:[(0,W.jsxs)(`span`,{className:`env-group-toggle-text`,children:[(0,W.jsx)(`span`,{className:`env-group-toggle-title`,children:e.title}),(0,W.jsx)(`span`,{className:`env-group-toggle-count`,children:`${e.fields.length} field${e.fields.length===1?``:`s`}`})]}),(0,W.jsx)(ge,{size:16,className:`env-group-chevron`})]}),t&&(0,W.jsxs)(`div`,{className:`env-group-body`,children:[e.description&&(0,W.jsx)(`p`,{className:`env-group-desc`,children:e.description}),e.fields.map(e=>(0,W.jsxs)(`label`,{className:`form-field env-field`,children:[(0,W.jsx)(`span`,{className:`mono`,children:e.key}),e.description&&(0,W.jsx)(`span`,{className:`env-field-desc`,children:e.description}),(0,W.jsx)(`input`,{type:e.sensitive?`password`:`text`,value:n[e.key]??``,placeholder:e.default_value,onChange:t=>r(n=>({...n,[e.key]:t.target.value}))})]},e.key))]})]},e.title)})}),(0,W.jsx)(`div`,{className:`gift-table-actions env-save-row`,children:(0,W.jsx)(X,{tone:`warn`,label:`Save .env changes`,path:`/api/actions/update-server-env`,payload:()=>({values:n}),onDone:()=>void c()})})]})}function Ar(e){return new Promise(t=>setTimeout(t,e))}function jr(){let[e,t]=(0,g.useState)(!1),[n,r]=(0,g.useState)(!1),i=(0,g.useRef)(!1);return{waiting:e,timedOut:n,watch:(0,g.useCallback)(async(e=15e4)=>{i.current=!1,r(!1),t(!0);let n=``;try{n=(await k.session()).boot_id??``}catch{}let a=Date.now()+e;for(;Date.now()<a;){if(i.current)return;await Ar(1500);try{let e=await k.session();if(e.boot_id&&e.boot_id!==n){window.location.reload();return}}catch{}}t(!1),r(!0)},[]),dismiss:(0,g.useCallback)(()=>{i.current=!0,t(!1),r(!1)},[])}}function Mr({label:e,timedOut:t,onDismiss:n}){return(0,pn.createPortal)((0,W.jsx)(`div`,{className:`modal-backdrop`,role:`presentation`,children:(0,W.jsx)(`section`,{className:`modal command-modal restart-overlay`,role:`dialog`,"aria-modal":`true`,"aria-label":e,children:t?(0,W.jsxs)(`div`,{className:`command-body restart-overlay-body`,children:[(0,W.jsx)(K,{children:`The admin panel did not come back within the expected time. It may still be building/restarting -- reload manually in a bit, or check the server logs.`}),(0,W.jsxs)(`div`,{className:`gift-table-actions restart-overlay-actions`,children:[(0,W.jsx)(`button`,{className:`btn`,type:`button`,onClick:n,children:`Dismiss`}),(0,W.jsx)(`button`,{className:`btn primary`,type:`button`,onClick:()=>window.location.reload(),children:`Reload now`})]})]}):(0,W.jsxs)(`div`,{className:`command-body restart-overlay-body`,children:[(0,W.jsx)(L,{className:`spin`,size:28}),(0,W.jsx)(`p`,{children:e})]})})}),document.body)}function Nr(e){switch(e){case`good`:return(0,W.jsx)(I,{size:15});case`warn`:return(0,W.jsx)(L,{className:`spin`,size:15});case`danger`:return(0,W.jsx)(te,{size:15});default:return(0,W.jsx)(ye,{size:15})}}function Pr({icon:e,name:t,tone:n,statusLabel:r,detail:i}){return(0,W.jsxs)(`div`,{className:`service-card tone-${n}`,children:[(0,W.jsx)(`div`,{className:`service-card-icon`,children:e}),(0,W.jsxs)(`div`,{className:`service-card-body`,children:[(0,W.jsx)(`div`,{className:`service-card-name`,children:t}),(0,W.jsx)(`div`,{className:`service-card-detail`,children:i??`\xA0`})]}),(0,W.jsxs)(`div`,{className:`service-card-status`,children:[Nr(n),(0,W.jsx)(`span`,{children:r})]})]})}var Fr={postgres:(0,W.jsx)(Se,{size:18}),redis:(0,W.jsx)(ne,{size:18}),minio:(0,W.jsx)(Ae,{size:18})};function Ir(e){let t=e.state.toLowerCase(),n=e.health.toLowerCase();return t!==`running`||n===`unhealthy`?`danger`:n===`starting`?`warn`:`good`}function Lr(e){return e.state.toLowerCase()===`running`?e.health?e.health:`running`:e.state||`stopped`}var Rr=4e3;function zr({onUpdateStarted:e}){let[t,n]=(0,g.useState)(null),[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)(!1),[s,c]=(0,g.useState)(``),l=(0,g.useCallback)(async()=>{o(!0),c(``),i(``);try{let e=await k.checkServerUpdates();n(e.commits_behind),i(e.commits_behind>0?`${e.commits_behind} new commit${e.commits_behind===1?``:`s`} pulled from GitHub.`:`Already up to date.`)}catch(e){c(O(e))}finally{o(!1)}},[]);(0,g.useEffect)(()=>{l()},[l]);async function u(){let n=t??0;if(window.confirm(`Pull ${n} commit(s), rebuild, and restart owpengram-server and the admin panel?`)){o(!0),c(``);try{let t=await k.action(`/api/actions/update-server`,{command_id:``,reason:`Update via Services tab`,confirm:!0});if(t.error){c(t.error),o(!1);return}e(`Pulled ${n} commit${n===1?``:`s`} -- rebuilding and restarting owpengram-server and the admin panel...`)}catch(e){c(O(e)),o(!1)}}}let d=(t??0)>0;return(0,W.jsxs)(`button`,{className:`btn compact-btn icon-text ${d?`danger`:``}`,type:`button`,disabled:a,title:s||r||void 0,onClick:()=>void(d?u():l()),children:[a?(0,W.jsx)(L,{className:`spin`,size:15}):d?(0,W.jsx)(z,{size:15}):(0,W.jsx)(Ye,{size:15}),d?`Update (${t})`:`Check updates`]})}function Br(){let[e,t]=(0,g.useState)(null),[n,r]=(0,g.useState)(``),[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(``),[c,l]=(0,g.useState)(``),u=jr(),d=(0,g.useRef)(!1);d.current=u.waiting;let f=(0,g.useCallback)(async()=>{if(!d.current){try{t(await k.serverStatus()),r(``)}catch(e){r(O(e))}try{a(await k.dockerStatus()),s(``)}catch(e){s(O(e))}}},[]);return(0,g.useEffect)(()=>{f();let e=window.setInterval(()=>void f(),Rr);return()=>window.clearInterval(e)},[f]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Services`,action:(0,W.jsxs)(`div`,{className:`services-header-actions`,children:[(0,W.jsx)(zr,{onUpdateStarted:e=>{l(e),u.watch()}}),(0,W.jsx)(X,{compact:!0,tone:`primary`,label:`Restart`,path:`/api/actions/restart-server`,payload:()=>({}),onDone:()=>{l(`Restarting owpengram-server and the admin panel...`),u.watch()}})]})}),n&&(0,W.jsx)(K,{children:n}),o&&(0,W.jsx)(K,{children:o}),e===null&&i===null&&!n&&!o?(0,W.jsx)(Lt,{label:`Loading service status...`}):(0,W.jsxs)(`div`,{className:`service-grid`,children:[e&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Pr,{icon:(0,W.jsx)($e,{size:18}),name:`Server`,tone:e.ServerAlive?`good`:`danger`,statusLabel:e.ServerAlive?`running`:`stopped`,detail:e.ServerAlive?`pid ${e.ServerPID}`:void 0}),(0,W.jsx)(Pr,{icon:(0,W.jsx)(nt,{size:18}),name:`admin panel`,tone:e.AdminAlive?`good`:`danger`,statusLabel:e.AdminAlive?`running`:`stopped`,detail:e.AdminAlive?`pid ${e.AdminPID}`:void 0})]}),i?.map(e=>(0,W.jsx)(Pr,{icon:Fr[e.name]??(0,W.jsx)(Se,{size:18}),name:e.name,tone:Ir(e),statusLabel:Lr(e),detail:e.state},e.name))]})]}),u.waiting&&(0,W.jsx)(Mr,{label:c,timedOut:!1,onDismiss:u.dismiss}),u.timedOut&&(0,W.jsx)(Mr,{label:c,timedOut:!0,onDismiss:u.dismiss})]})}var Vr=`open,in_review,action_pending,action_failed,appeal_review`,Hr=[{value:Vr,label:`Active queue`},{value:`open,in_review,action_pending,action_failed,resolved,dismissed,appeal_review`,label:`All statuses`},{value:`open`,label:`Open`},{value:`in_review`,label:`In review`},{value:`action_pending`,label:`Action pending`},{value:`action_failed`,label:`Action failed`},{value:`appeal_review`,label:`Appeal review`},{value:`resolved`,label:`Resolved`},{value:`dismissed`,label:`Dismissed`}];function Ur({navigate:e}){let[t,n]=(0,g.useState)(Vr),[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)([]),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(``);async function d(){c(!0),u(``);try{let e=new URLSearchParams({statuses:t,limit:`100`});r.trim()&&e.set(`assigned_to`,r.trim()),o((await k.moderationCases(e)).cases)}catch(e){u(O(e))}finally{c(!1)}}(0,g.useEffect)(()=>{d()},[]);let f=a.filter(e=>e.Status===`action_pending`||e.Status===`action_failed`).length,p=a.filter(e=>e.Severity===4).length;return(0,W.jsxs)(Mt,{title:`Reports and Moderation`,eyebrow:`Moderation / Cases`,actions:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:d,disabled:s,children:[(0,W.jsx)(Ye,{size:15,className:s?`spin`:``}),` `,`Refresh`]}),children:[l&&(0,W.jsx)(K,{children:l}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Current queue`,value:String(a.length)}),(0,W.jsx)(J,{label:`Critical cases`,value:String(p),tone:p?`danger`:`neutral`}),(0,W.jsx)(J,{label:`Pending / failed actions`,value:String(f),tone:f?`warn`:`good`})]}),(0,W.jsx)(Nt,{children:(0,W.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),d()},children:[(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Status`}),(0,W.jsx)(`select`,{"aria-label":`Case status filter`,value:t,onChange:e=>n(e.target.value),children:Hr.map(e=>(0,W.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Reviewer`}),(0,W.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),placeholder:`Leave blank for all`})]}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:s,children:[(0,W.jsx)(tt,{size:15}),` `,`Search`]})]})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`Case`}),(0,W.jsx)(`th`,{children:`Target`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Severity`}),(0,W.jsx)(`th`,{children:`Reports / Reporters`}),(0,W.jsx)(`th`,{children:`Reviewer`}),(0,W.jsx)(`th`,{children:`Latest report`}),(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[a.map(t=>(0,W.jsxs)(`tr`,{children:[(0,W.jsxs)(`td`,{className:`mono`,children:[`#`,t.ID]}),(0,W.jsx)(`td`,{className:`mono`,children:Yr(t.Target.Type,t.Target.ID)}),(0,W.jsx)(`td`,{children:(0,W.jsx)(Wr,{status:t.Status})}),(0,W.jsx)(`td`,{children:(0,W.jsx)(Kr,{value:t.Severity})}),(0,W.jsxs)(`td`,{children:[t.ReportCount,` / `,t.DistinctReporterCount]}),(0,W.jsx)(`td`,{children:t.AssignedTo||`-`}),(0,W.jsx)(`td`,{children:U(t.LastReportAt)}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`button`,{className:`row-link`,onClick:()=>e(`/moderation/${t.ID}`),children:[`Review`,` `,(0,W.jsx)(ve,{size:14})]})})]},t.ID)),a.length===0&&(0,W.jsx)(It,{colSpan:8})]})]})})]})}function Wr({status:e}){return(0,W.jsx)(q,{tone:e===`resolved`||e===`dismissed`?`good`:e===`action_failed`?`danger`:e===`action_pending`?`warn`:`neutral`,children:Jr(`status`,e)})}var Gr={low:`Low`,medium:`Medium`,high:`High`,critical:`Critical`};function Kr({value:e}){let t=[``,`low`,`medium`,`high`,`critical`][e];return(0,W.jsx)(q,{tone:e>=4?`danger`:e>=3?`warn`:`neutral`,children:t?Gr[t]:e})}var qr={status:{open:`Open`,in_review:`In review`,action_pending:`Action pending`,action_failed:`Action failed`,appeal_review:`Appeal review`,resolved:`Resolved`,dismissed:`Dismissed`},targetType:{channel:`Channel`,chat:`Group`,user:`Account`},source:{account_peer:`Account / peer`,antispam_false_positive:`Anti-spam false positive`,channel_spam:`Channel spam`,encrypted_spam:`Encrypted-chat spam`,ephemeral:`Ephemeral media`,messages:`Messages`,messages_spam:`Message spam`,profile_photo:`Profile photo`,reaction:`Reaction`,sponsored:`Sponsored message`,story:`Story`},reason:{child_abuse:`Child abuse`,copyright:`Copyright`,fake:`Fake`,geo_irrelevant:`Location-irrelevant`,illegal_drugs:`Illegal drugs`,other:`Other`,personal_details:`Personal details`,pornography:`Pornography`,spam:`Spam`,violence:`Violence`}};function Jr(e,t){return qr[e]?.[t]??t}function Yr(e,t){return`${Jr(`targetType`,e)} #${t}`}function Xr({id:e,navigate:t}){let[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)(null),[o,s]=(0,g.useState)(``),[c,l]=(0,g.useState)(`no_violation`),[u,d]=(0,g.useState)(``),[f,p]=(0,g.useState)(``),[m,h]=(0,g.useState)(!0),[_,v]=(0,g.useState)(!1),[y,b]=(0,g.useState)(``);function x(e){a(e),e&&(d(e.Items.filter(e=>e.Kind===`message`).map(e=>Number(e.ItemID)).filter(e=>Number.isSafeInteger(e)&&e>0).join(`, `)),p(String(e.ReporterUserID)))}async function S(){b(``);try{let t=await k.moderationCase(e);r(t);let n=t.ReportIDs[0];x(n?await k.moderationReport(n):null)}catch(e){b(O(e))}}(0,g.useEffect)(()=>{S()},[e]);let C=(0,g.useMemo)(()=>Zr(c,n?.Case.Target.Type,Qr(u),Number(f),m),[c,n?.Case.Target.Type,u,f,m]),w=(0,g.useMemo)(()=>n?$r(n):{actions:[],label:`None`,blocked:!1},[n]);async function T(){if(n){v(!0),b(``);try{await k.claimModerationCase(e,n.Case.Version),await S()}catch(e){b(O(e))}finally{v(!1)}}}async function E(){if(!n||!o.trim()){b(`A review reason is required.`);return}if(c===`delete_messages`&&C.length===0){b(n.Case.Target.Type===`user`?`Private-message deletion requires valid evidence message IDs and the reporter's owner_user_id.`:`Channel-message deletion requires at least one valid evidence message ID.`);return}if(window.confirm(`Submit the “${ei(c)}” decision? The action will run through the durable action queue.`)){v(!0),b(``);try{r((await k.decideModerationCase(e,{expected_version:n.Case.Version,reason:o.trim(),kind:c===`no_violation`?`no_violation`:`violation`,actions:C})).case),s(``)}catch(e){b(O(e))}finally{v(!1)}}}async function D(t,i){if(!n||!o.trim()){b(`An appeal review reason is required.`);return}if(window.confirm(i?`Grant this appeal?`:`Deny this appeal?`)){v(!0);try{r((await k.reviewModerationAppeal(e,t,{expected_version:n.Case.Version,reason:o.trim(),granted:i,actions:i?w.actions:[]})).case),s(``)}catch(e){b(O(e))}finally{v(!1)}}}if(y&&!n)return(0,W.jsx)(K,{children:y});if(!n)return(0,W.jsx)(Lt,{label:`Loading moderation case…`});let A=n.Case,j=A.Status===`open`||A.Status===`in_review`||A.Status===`appeal_review`,M=(A.Status===`in_review`||A.Status===`action_failed`)&&!!A.AssignedTo,N=M&&(A.Status!==`action_failed`||c!==`no_violation`),P=n.Appeals.find(e=>e.Status===`pending`);return(0,W.jsxs)(Mt,{title:`Review case #${A.ID}`,eyebrow:`Moderation / Case detail`,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:`btn icon-text`,onClick:()=>t(`/moderation`),children:[(0,W.jsx)(ue,{size:15}),` `,`Back to queue`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,onClick:S,children:[(0,W.jsx)(Ye,{size:15}),` `,`Refresh`]})]}),children:[y&&(0,W.jsx)(K,{children:y}),(0,W.jsx)(Pt,{main:(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`section`,{className:`entity-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`entity-title`,children:Yr(A.Target.Type,A.Target.ID)}),(0,W.jsx)(`div`,{className:`entity-subtitle`,children:`Version ${A.Version} · Updated ${U(A.UpdatedAt)}`})]}),(0,W.jsxs)(`div`,{className:`entity-badges`,children:[(0,W.jsx)(Wr,{status:A.Status}),(0,W.jsx)(Kr,{value:A.Severity})]})]}),(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Target`,value:Yr(A.Target.Type,A.Target.ID),mono:!0}),(0,W.jsx)(Y,{label:`Reports`,value:`${A.ReportCount} reports from ${A.DistinctReporterCount} reporters`}),(0,W.jsx)(Y,{label:`Reviewer`,value:A.AssignedTo||`-`}),(0,W.jsx)(Y,{label:`First / latest report`,value:`${U(A.FirstReportAt)} / ${U(A.LastReportAt)}`})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Report evidence`,text:`Shows up to the latest 100 reports; snapshots are frozen when reports are admitted.`}),(0,W.jsx)(`div`,{className:`toolbar`,children:n.ReportIDs.map(e=>(0,W.jsxs)(`button`,{className:`btn`,onClick:async()=>x(await k.moderationReport(e)),children:[`#`,e]},e))}),i&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Source / Reason`,value:`${Jr(`source`,i.Source)} / ${Jr(`reason`,i.Reason)}`}),(0,W.jsx)(Y,{label:`Reporter`,value:String(i.ReporterUserID),mono:!0}),(0,W.jsx)(Y,{label:`Option`,value:i.Option,mono:!0}),(0,W.jsx)(Y,{label:`Time`,value:U(i.CreatedAt)})]}),i.Comment&&(0,W.jsx)(`p`,{className:`about-text`,children:i.Comment}),(0,W.jsx)(Rt,{value:JSON.stringify(i,null,2)})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Decision and action audit`,text:`Actions run idempotently through a lease worker; failures retain their error and attempt count.`}),(0,W.jsx)(Rt,{value:JSON.stringify({decisions:n.Decisions,actions:n.Actions},null,2)})]}),n.Appeals.length>0&&(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Appeals`}),(0,W.jsx)(Rt,{value:JSON.stringify(n.Appeals,null,2)})]})]}),side:(0,W.jsxs)(`section`,{className:`action-dock`,children:[(0,W.jsx)(`div`,{className:`dock-title`,children:`Case actions`}),j&&(0,W.jsxs)(`button`,{className:`btn primary icon-text`,disabled:_,onClick:T,children:[(0,W.jsx)(nt,{size:15}),` `,A.AssignedTo?`Renew claim`:`Claim case`]}),(0,W.jsxs)(`label`,{className:`field`,children:[(0,W.jsx)(`span`,{children:`Review reason`}),(0,W.jsx)(`textarea`,{value:o,onChange:e=>s(e.target.value),rows:5})]}),(0,W.jsxs)(`label`,{className:`field`,children:[(0,W.jsx)(`span`,{children:`Decision template`}),(0,W.jsxs)(`select`,{value:c,onChange:e=>l(e.target.value),children:[(0,W.jsx)(`option`,{value:`no_violation`,children:`No violation (dismiss report)`}),(0,W.jsx)(`option`,{value:`scam`,children:`Mark as SCAM`}),(0,W.jsx)(`option`,{value:`fake`,children:`Mark as FAKE`}),(0,W.jsx)(`option`,{value:`freeze`,children:`Freeze account`}),(0,W.jsx)(`option`,{value:`scam_freeze`,children:`SCAM + freeze`}),(0,W.jsx)(`option`,{value:`fake_freeze`,children:`FAKE + freeze`}),(0,W.jsx)(`option`,{value:`delete_messages`,children:`Delete messages covered by evidence`}),(0,W.jsx)(`option`,{value:`delete_account`,children:`Delete account`})]})]}),c===`delete_messages`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`field`,children:[(0,W.jsx)(`span`,{children:`Evidence message IDs (comma-separated)`}),(0,W.jsx)(`input`,{value:u,onChange:e=>d(e.target.value),placeholder:`101, 102`})]}),A.Target.Type===`user`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`field`,children:[(0,W.jsx)(`span`,{children:`Private-chat owner_user_id`}),(0,W.jsx)(`input`,{value:f,onChange:e=>p(e.target.value),inputMode:`numeric`})]}),(0,W.jsxs)(`label`,{className:`field checkbox-field`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:m,onChange:e=>h(e.target.checked)}),(0,W.jsx)(`span`,{children:`Revoke for both sides`})]})]}),(0,W.jsx)(K,{children:`The server will verify again that every message ID exists in this case's immutable report evidence.`})]}),A.Status===`action_failed`&&c===`no_violation`&&(0,W.jsx)(K,{children:`The action was partially executed and cannot be changed directly to no violation. Select a new action to retry while retaining the previous failure audit.`}),M&&(0,W.jsxs)(`button`,{className:`btn danger icon-text`,disabled:_||!N,onClick:E,children:[(0,W.jsx)(I,{size:15}),` `,A.Status===`action_failed`?`Retry action`:`Submit decision`]}),P&&A.AssignedTo&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`dock-title`,children:`Appeal review #${P.ID}`}),(0,W.jsx)(Y,{label:`Automatic remedy after approval`,value:w.label}),w.blocked&&(0,W.jsx)(K,{children:`The case contains a completed irreversible deletion. It cannot be marked as approved and restored; deny it or escalate for manual handling.`}),(0,W.jsx)(`button`,{className:`btn`,disabled:_,onClick:()=>D(P.ID,!1),children:`Deny appeal`}),(0,W.jsx)(`button`,{className:`btn primary`,disabled:_||w.blocked,onClick:()=>D(P.ID,!0),children:`Grant appeal`})]})]})})]})}function Zr(e,t,n,r,i){switch(e){case`scam`:return[{kind:`mark_scam`,payload:{}}];case`fake`:return[{kind:`mark_fake`,payload:{}}];case`freeze`:return[{kind:`freeze_account`,payload:{}}];case`scam_freeze`:return[{kind:`mark_scam`,payload:{}},{kind:`freeze_account`,payload:{}}];case`fake_freeze`:return[{kind:`mark_fake`,payload:{}},{kind:`freeze_account`,payload:{}}];case`delete_messages`:return n.length===0?[]:t===`channel`?[{kind:`delete_channel_message`,payload:{ids:n}}]:t===`user`&&Number.isSafeInteger(r)&&r>0?[{kind:`delete_private_message`,payload:{owner_user_id:r,ids:n,revoke:i}}]:[];case`delete_account`:return[{kind:`delete_account`,payload:{}}];default:return[]}}function Qr(e){let t=e.split(/[,\s]+/).filter(Boolean).map(Number);return t.length===0||t.some(e=>!Number.isSafeInteger(e)||e<=0)?[]:[...new Set(t)]}function $r(e){let t=!1,n=!1,r=!1;for(let i of[...e.Actions].sort((e,t)=>e.ID-t.ID))if(i.Status===`succeeded`)switch(i.Kind){case`mark_scam`:case`mark_fake`:t=!0;break;case`clear_peer_flags`:t=!1;break;case`freeze_account`:n=!0;break;case`unfreeze_account`:n=!1;break;case`delete_private_message`:case`delete_channel_message`:case`delete_account`:r=!0;break}let i=[],a=[];return t&&(i.push({kind:`clear_peer_flags`,payload:{}}),a.push(`Clear SCAM / FAKE`)),n&&(i.push({kind:`unfreeze_account`,payload:{}}),a.push(`Unfreeze account`)),{actions:i,label:a.join(` + `)||`No recovery action needed`,blocked:r}}function ei(e){return{no_violation:`No violation (dismiss report)`,scam:`Mark as SCAM`,fake:`Mark as FAKE`,freeze:`Freeze account`,scam_freeze:`SCAM + freeze`,fake_freeze:`FAKE + freeze`,delete_messages:`Delete messages covered by evidence`,delete_account:`Delete account`}[e]}function ti({navigate:e}){let[t,n]=(0,g.useState)(null),[r,i]=(0,g.useState)([]),[a,o]=(0,g.useState)(!1),[s,c]=(0,g.useState)(0),[l,u]=(0,g.useState)(!1),[d,f]=(0,g.useState)(``);async function p(){try{n(await k.storageStats())}catch{}}async function m(e=!1){u(!0),f(``);let t=new URLSearchParams({limit:`50`,offset:String(e?s:0)});try{let n=await k.storageAccounts(t),r=n.rows??[];i(t=>e?[...t,...r]:r),c(n.next_offset),o(!!n.has_more)}catch(e){f(O(e))}finally{u(!1)}}function h(){p(),m(!1)}(0,g.useEffect)(()=>{h()},[]);let _=t?Math.max(0,Number(t.LogicalBytes)-Number(t.PhysicalBytes)):0;return(0,W.jsxs)(Mt,{title:`Storage`,eyebrow:`Media / Storage usage`,actions:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:h,disabled:l,children:[(0,W.jsx)(Ye,{size:15,className:l?`spin`:``}),` `,`Refresh`]}),children:[d&&(0,W.jsx)(K,{children:d}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Physical usage (on disk / S3)`,value:t?kt(t.PhysicalBytes):`-`}),(0,W.jsx)(J,{label:`Logical usage (sum per account)`,value:t?kt(t.LogicalBytes):`-`}),(0,W.jsx)(J,{label:`Saved by dedup`,value:kt(String(_)),tone:_>0?`good`:`neutral`}),(0,W.jsx)(J,{label:`Backend`,value:t?.BackendKind??`-`})]}),(0,W.jsxs)(`div`,{className:`metric-row`,children:[(0,W.jsx)(J,{label:`Documents`,value:t?St(t.DocumentCount):`-`}),(0,W.jsx)(J,{label:`Photos`,value:t?St(t.PhotoCount):`-`}),(0,W.jsx)(J,{label:`Accounts with media`,value:t?St(t.AccountCount):`-`}),(0,W.jsx)(J,{label:`Unattributed`,value:t?kt(t.UnattributedBytes):`-`,tone:t&&Number(t.UnattributedBytes)>0?`warn`:`neutral`})]}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`User ID`}),(0,W.jsx)(`th`,{children:`Account`}),(0,W.jsx)(`th`,{children:`Storage used`}),(0,W.jsx)(`th`,{children:`Files`})]})}),(0,W.jsxs)(`tbody`,{children:[r.map(e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`mono`,children:e.UserID}),(0,W.jsx)(`td`,{children:H(e.Username)||e.FirstName||`-`}),(0,W.jsx)(`td`,{className:`mono`,children:kt(e.Bytes)}),(0,W.jsx)(`td`,{className:`mono`,children:St(e.FileCount)})]},e.UserID)),r.length===0&&(0,W.jsx)(It,{colSpan:4})]})]})}),a&&(0,W.jsx)(`div`,{className:`toolbar`,children:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>m(!0),disabled:l,children:[l?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(ge,{size:15}),` `,`Load more`]})})]})}function ni({loader:e,cacheKey:t,className:n,playOnHover:r=!0,onError:i}){let a=(0,g.useRef)(null),o=(0,g.useRef)(null);(0,g.useEffect)(()=>{let t=!1;return e().then(e=>{t||!a.current||(o.current?.destroy(),o.current=gr.default.loadAnimation({container:a.current,renderer:`canvas`,loop:!0,autoplay:!1,animationData:structuredClone(e)}),o.current.goToAndStop(0,!0))}).catch(()=>i?.()),()=>{t=!0,o.current?.destroy(),o.current=null}},[t]);function s(){r&&o.current?.play()}function c(){r&&o.current?.goToAndStop(0,!0)}return(0,W.jsx)(`div`,{className:n,ref:a,onMouseEnter:s,onMouseLeave:c})}function ri(e){let t=e.toLowerCase();return t.includes(`tgsticker`)||t.includes(`lottie`)||t.includes(`json`)}function ii({row:e}){let[t,n]=(0,g.useState)(!ri(e.MimeType));return(0,g.useEffect)(()=>{n(!ri(e.MimeType))},[e.DocumentID,e.MimeType]),t?(0,W.jsx)(`div`,{className:`emoji-picker-glyph`,children:e.Alt||`🙂`}):(0,W.jsx)(ni,{className:`emoji-picker-anim`,cacheKey:e.DocumentID,loader:()=>k.emojiAnimation(e.DocumentID),onError:()=>n(!0)})}function ai({label:e,value:t,onChange:n}){let[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)([]),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(``),d=a.find(e=>e.DocumentID===t)??null;async function f(){c(!0),u(``);let e=new URLSearchParams({limit:`24`});r.trim()&&e.set(`q`,r.trim());try{o((await k.emoji(e)).rows??[])}catch(e){u(O(e))}finally{c(!1)}}return(0,g.useEffect)(()=>{f()},[]),(0,W.jsxs)(`div`,{className:`entity-picker`,children:[(0,W.jsxs)(`div`,{className:`picker-head`,children:[(0,W.jsx)(`span`,{children:e}),t?(0,W.jsxs)(`button`,{className:`link-button`,type:`button`,onClick:()=>n(``),children:[(0,W.jsx)(ht,{size:13}),` `,`Clear`]}):null]}),t?(0,W.jsxs)(`div`,{className:`selected-entity`,children:[(0,W.jsx)(he,{size:15}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`strong`,{children:d?.Alt||`—`}),(0,W.jsx)(`span`,{className:`mono`,children:t})]}),(0,W.jsx)(`span`,{children:d?.SetTitle||`-`})]}):null,(0,W.jsxs)(`div`,{className:`picker-search`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),f())},placeholder:`Search document ID or emoji`}),(0,W.jsx)(`button`,{className:`btn compact-btn`,type:`button`,onClick:f,disabled:s,children:s?(0,W.jsx)(L,{size:14,className:`spin`}):`Search`})]}),l&&(0,W.jsx)(`div`,{className:`picker-error`,children:l}),(0,W.jsxs)(`div`,{className:`picker-results emoji-picker-results`,children:[a.map(e=>(0,W.jsxs)(`button`,{className:`picker-row emoji-picker-row ${t===e.DocumentID?`selected`:``}`,type:`button`,onClick:()=>n(e.DocumentID),children:[(0,W.jsx)(ii,{row:e}),(0,W.jsx)(`span`,{className:`mono`,children:e.DocumentID}),(0,W.jsx)(`span`,{children:e.SetTitle||`—`})]},e.DocumentID)),a.length===0&&!s?(0,W.jsx)(`div`,{className:`picker-empty`,children:`No results`}):null]})]})}var oi=[`pending`,`approved`,`rejected`,`revoked`],si=[`user`,`channel`],ci={pending:`Pending`,approved:`Approved`,rejected:`Rejected`,revoked:`Mark revoked`},li={user:`Account`,channel:`Channel`};function ui({navigate:e}){let{can:t}=Kt(),n=t(Ht),r=t(Bt),[i,a]=(0,g.useState)(`requests`),[o,s]=(0,g.useState)([]),[c,l]=(0,g.useState)([]),[u,d]=(0,g.useState)(``),[f,p]=(0,g.useState)(!1);async function m(){d(``),p(!1);try{let[e,t]=await Promise.all([k.botVerifiers(new URLSearchParams({limit:`200`})),k.verificationIcons(new URLSearchParams({limit:`200`}))]);s(e.rows??[]),l(t.rows??[])}catch(e){if(e instanceof v&&e.status===403){s([]),l([]),p(!0);return}d(O(e))}}return(0,g.useEffect)(()=>{m()},[]),(0,W.jsxs)(Mt,{title:`Third-party verification`,eyebrow:`Third-party verification / Verifiers, icons, marks`,actions:r?(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>e(`/verification`),children:[(0,W.jsx)(Ce,{size:15}),` `,`Official verification`]}):void 0,children:[u&&(0,W.jsx)(K,{children:u}),f&&(0,W.jsx)(K,{children:`The server refused the verifier roster and the icon catalogue for this session (403), so both lists are empty here — applications can still be reviewed.`}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`A verifier company's icon — not the official checkmark`,text:`A third-party mark is a verifier bot's own icon, drawn right BEFORE the name of an account, a bot or a channel, plus one line of description in the profile. It says “this verifier vouches for this peer”, and nothing more.`}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`The icon is a custom emoji document. The client fetches it through messages.getCustomEmojiDocuments, so a document id that resolves to nothing renders as no badge at all — which is why marks are granted from the catalogue below rather than from a typed number.`}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`The official checkmark is a different mechanism, granted by the platform in the Verification section. The two are stored, shown and taken away separately, and neither one implies the other.`}),!n&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`This session can read the section and decide applications, but not change verifiers or the icon catalogue — that needs the botverification.manage permission.`})]}),(0,W.jsx)(`div`,{className:`toolbar`,role:`group`,"aria-label":`Third-party verification`,children:[{key:`requests`,label:`Applications`,icon:(0,W.jsx)(ot,{size:15})},{key:`verifiers`,label:`Verifiers`,icon:(0,W.jsx)(pe,{size:15})},{key:`icons`,label:`Icon catalogue`,icon:(0,W.jsx)(st,{size:15})},{key:`marks`,label:`Granted marks`,icon:(0,W.jsx)(F,{size:15})}].map(e=>(0,W.jsxs)(`button`,{className:`btn icon-text ${i===e.key?`primary`:``}`,type:`button`,"aria-pressed":i===e.key,onClick:()=>a(e.key),children:[e.icon,` `,e.label]},e.key))}),i===`requests`&&(0,W.jsx)(di,{navigate:e,verifiers:o}),i===`verifiers`&&(0,W.jsx)(fi,{verifiers:o,icons:c,canManage:n,onChanged:m,navigate:e}),i===`icons`&&(0,W.jsx)(pi,{icons:c,verifiers:o,canManage:n,onChanged:m}),i===`marks`&&(0,W.jsx)(mi,{verifiers:o,canManage:n,navigate:e})]})}function di({navigate:e,verifiers:t}){let[n,r]=(0,g.useState)(`pending`),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(`all`),[c,l]=(0,g.useState)(``),[u,d]=(0,g.useState)(`50`),[f,p]=(0,g.useState)([]),[m,h]=(0,g.useState)({}),[_,v]=(0,g.useState)(!1),[y,b]=(0,g.useState)(``),[x,S]=(0,g.useState)(!1),[C,w]=(0,g.useState)(``);async function T(e=!1){S(!0),w(``);let t=new URLSearchParams({limit:u});n!==`all`&&t.set(`status`,n),i&&t.set(`verifier_bot_id`,i),o!==`all`&&t.set(`peer_type`,o),c.trim()&&t.set(`q`,c.trim().replace(/^@/,``)),e&&y&&t.set(`before_id`,y);try{let n=await k.customVerificationRequests(t),r=n.rows??[];p(t=>e?[...t,...r]:r),b(n.next_before_id??``),v(!!n.has_more)}catch(e){w(O(e))}finally{S(!1)}}async function E(){try{h((await k.botVerificationCounts()).counts??{})}catch(e){w(O(e))}}(0,g.useEffect)(()=>{T(!1),E()},[]);function D(){T(!1),E()}return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Application queue`,text:`Applications filed with a verifier bot by the owner of the peer. The counters cover the whole queue, not the page below.`,action:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:D,disabled:x,children:[(0,W.jsx)(Ye,{size:15,className:x?`spin`:``}),` `,`Refresh`]})}),C&&(0,W.jsx)(K,{children:C}),(0,W.jsx)(`div`,{className:`metric-row`,children:oi.map(e=>(0,W.jsx)(J,{label:ci[e],value:m[e]??`0`,mono:!0,tone:vi(e,m[e]??`0`)},e))})]}),(0,W.jsx)(Nt,{children:(0,W.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),T(!1)},children:[(0,W.jsxs)(`label`,{className:`searchbox`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),placeholder:`Application id, peer id, username or title`})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Status`}),(0,W.jsxs)(`select`,{value:n,onChange:e=>r(e.target.value),children:[(0,W.jsx)(`option`,{value:`all`,children:`All statuses`}),oi.map(e=>(0,W.jsx)(`option`,{value:e,children:ci[e]},e))]})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Verifier`}),(0,W.jsx)(hi,{value:i,verifiers:t,onChange:a})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Peer type`}),(0,W.jsxs)(`select`,{value:o,onChange:e=>s(e.target.value),children:[(0,W.jsx)(`option`,{value:`all`,children:`All types`}),si.map(e=>(0,W.jsx)(`option`,{value:e,children:li[e]},e))]})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Limit`}),(0,W.jsx)(`input`,{className:`small-input`,value:u,onChange:e=>d(e.target.value),type:`number`,min:`1`,max:`200`})]}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:x,children:[x?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(Ze,{size:15}),` `,`Search`]})]})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`ID`}),(0,W.jsx)(`th`,{children:`Verifier`}),(0,W.jsx)(`th`,{children:`Peer`}),(0,W.jsx)(`th`,{children:`Applicant`}),(0,W.jsx)(`th`,{children:`Stated reason`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Filed`}),(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[f.map(t=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`mono`,children:(0,W.jsxs)(`button`,{className:`row-link`,type:`button`,onClick:()=>e(`/bot-verification/${t.ID}`),children:[`#`,t.ID]})}),(0,W.jsxs)(`td`,{children:[(0,W.jsx)(`strong`,{children:H(t.VerifierBotUsername)||t.VerifierBotID}),(0,W.jsx)(`div`,{className:`entity-subtitle mono`,children:t.VerifierBotID})]}),(0,W.jsxs)(`td`,{children:[(0,W.jsx)(`strong`,{children:yi(t)}),(0,W.jsxs)(`div`,{className:`entity-subtitle mono`,children:[li[t.PeerType],` · `,t.PeerID]})]}),(0,W.jsxs)(`td`,{children:[H(t.ApplicantUsername)||`-`,(0,W.jsx)(`div`,{className:`entity-subtitle mono`,children:t.ApplicantUserID})]}),(0,W.jsx)(`td`,{className:`truncate`,children:t.Reason||`-`}),(0,W.jsx)(`td`,{children:(0,W.jsx)(gi,{status:t.Status})}),(0,W.jsx)(`td`,{children:U(t.CreatedAt)||`-`}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`button`,{className:`row-link`,type:`button`,onClick:()=>e(`/bot-verification/${t.ID}`),children:[(0,W.jsx)(ot,{size:14}),` `,`Details`,` `,(0,W.jsx)(ve,{size:14})]})})]},t.ID)),f.length===0&&(0,W.jsx)(It,{colSpan:8})]})]})}),_&&(0,W.jsx)(`div`,{className:`toolbar`,children:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>T(!0),disabled:x,children:[x?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(ge,{size:15}),` `,`Load more`]})})]})}function fi({verifiers:e,icons:t,canManage:n,onChanged:r,navigate:i}){let[a,o]=(0,g.useState)(null),[s,c]=(0,g.useState)(null),[l,u]=(0,g.useState)(``),[d,f]=(0,g.useState)(``),[p,m]=(0,g.useState)(``),[h,_]=(0,g.useState)(!1),v=t.filter(e=>e.Active),y=v.map(e=>({value:e.DocumentID,label:`${e.Name} · ${e.DocumentID}`}));if(l&&!y.some(e=>e.value===l)){let e=t.find(e=>e.DocumentID===l);y.unshift({value:l,label:`${e?.Name??l} · ${l} (Retired)`})}function b(e){c(e),o(null),u(e.IconDocumentID),f(e.CompanyName),m(e.DefaultDescription),_(e.CanModifyCustomDescription)}function x(){c(null),o(null),u(``),f(``),m(``),_(!1)}function S(){return{bot_id:s?s.BotID:a?String(a.ID):`0`,icon_document_id:l||`0`,company_name:d.trim(),default_description:p.trim(),can_modify_custom_description:h,version:s?s.Version:`0`}}return(0,W.jsxs)(W.Fragment,{children:[n&&(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:s?`Update verifier`:`Grant verifier status`,text:`The bot gets an icon from the catalogue and a company name to vouch under. The same call updates an existing verifier, which is why it carries a version.`,action:s?(0,W.jsx)(`button`,{className:`btn icon-text`,type:`button`,onClick:x,children:`Cancel update`}):void 0}),s?(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Updating ${H(s.BotUsername)||s.BotID} — version ${s.Version} is sent as the optimistic lock, so a row somebody else changed meanwhile is refused instead of overwritten.`}):(0,W.jsx)(Bn,{label:`Bot`,value:a,onChange:o}),(0,W.jsxs)(`div`,{className:`bot-create-fields`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Icon from the catalogue`}),(0,W.jsxs)(`select`,{value:l,onChange:e=>u(e.target.value),children:[(0,W.jsx)(`option`,{value:``,children:`Pick an icon`}),y.map(e=>(0,W.jsx)(`option`,{value:e.value,children:e.label},e.value))]})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Company`}),(0,W.jsx)(`input`,{value:d,onChange:e=>f(e.target.value),placeholder:`Acme Verification Ltd`})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Default description`}),(0,W.jsx)(`input`,{value:p,onChange:e=>m(e.target.value),placeholder:`Verified by Acme`})]})]}),(0,W.jsxs)(`label`,{className:`checkline`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:h,onChange:e=>_(e.target.checked)}),`The verifier may replace the description per peer`]}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`This is botVerifierSettings.can_modify_custom_description: with it off, every mark this verifier grants carries the default description above, whatever the applicant asked for.`}),v.length===0&&(0,W.jsx)(K,{children:`The catalogue has no active icon, so there is nothing to grant. Add one in the icon catalogue first.`}),(0,W.jsxs)(`div`,{className:`bot-create-actions`,children:[(0,W.jsx)(`span`,{className:`bot-create-note`,children:`The bot can mark peers as soon as the row exists and is enabled.`}),(0,W.jsx)(X,{label:s?`Update verifier`:`Grant verifier status`,icon:(0,W.jsx)(Ge,{size:15}),tone:`neutral`,path:`/api/actions/grant-bot-verifier`,payload:S,onDone:()=>{x(),r()}})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Verifier bots`,text:`Bots allowed to hand out their own mark. Verifier status is granted per deployment, so every row here is a badge printer an operator switched on by hand.`,action:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:r,children:[(0,W.jsx)(Ye,{size:15}),` `,`Refresh`]})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`Bot`}),(0,W.jsx)(`th`,{children:`Company`}),(0,W.jsx)(`th`,{children:`Icon`}),(0,W.jsx)(`th`,{children:`Own description`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Marks`}),(0,W.jsx)(`th`,{children:`Granted by`}),(0,W.jsx)(`th`,{children:`Updated`}),n&&(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[e.map(e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsxs)(`td`,{children:[(0,W.jsx)(`button`,{className:`row-link`,type:`button`,onClick:()=>i(`/bots/${e.BotID}`),children:(0,W.jsx)(`strong`,{children:H(e.BotUsername)||e.BotName||e.BotID})}),(0,W.jsx)(`div`,{className:`entity-subtitle mono`,children:e.BotID})]}),(0,W.jsxs)(`td`,{children:[(0,W.jsx)(`strong`,{children:e.CompanyName||`-`}),(0,W.jsx)(`div`,{className:`entity-subtitle truncate`,children:e.DefaultDescription||`Not set`})]}),(0,W.jsxs)(`td`,{children:[e.IconName||`-`,(0,W.jsx)(`div`,{className:`entity-subtitle mono`,children:e.IconDocumentID})]}),(0,W.jsx)(`td`,{children:e.CanModifyCustomDescription?`Yes`:`No`}),(0,W.jsx)(`td`,{children:e.Enabled?(0,W.jsx)(q,{tone:`good`,children:`Enabled`}):(0,W.jsx)(q,{tone:`warn`,children:`disabled`})}),(0,W.jsx)(`td`,{className:`mono`,children:String(e.MarkCount??`0`)}),(0,W.jsxs)(`td`,{children:[e.GrantedBy||`-`,(0,W.jsx)(`div`,{className:`entity-subtitle truncate`,children:e.GrantReason||`-`})]}),(0,W.jsx)(`td`,{children:U(e.UpdatedAt)||`-`}),n&&(0,W.jsx)(`td`,{children:(0,W.jsxs)(`div`,{className:`row-actions`,children:[(0,W.jsx)(`button`,{className:`btn compact-btn`,type:`button`,onClick:()=>b(e),children:`Edit`}),(0,W.jsx)(X,{label:e.Enabled?`Disable`:`Enable`,icon:e.Enabled?(0,W.jsx)(Ke,{size:14}):(0,W.jsx)(qe,{size:14}),tone:e.Enabled?`warn`:`neutral`,compact:!0,path:`/api/actions/set-bot-verifier-enabled`,payload:()=>({bot_id:e.BotID,enabled:!e.Enabled}),onDone:r}),(0,W.jsx)(X,{label:`Revoke status`,icon:(0,W.jsx)(lt,{size:14}),tone:`danger`,compact:!0,path:`/api/actions/revoke-bot-verifier`,payload:()=>({bot_id:e.BotID}),onDone:r})]})})]},e.BotID)),e.length===0&&(0,W.jsx)(It,{colSpan:n?9:8})]})]})}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Disabling is the per-verifier kill switch: the marks already granted keep rendering, but the bot can no longer mark anything new and its settings stop being projected into botInfo.`}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Revoking verifier status removes the row and every mark this verifier granted — the icon disappears from all of its peers at once.`})]})]})}function pi({icons:e,verifiers:t,canManage:n,onChanged:r}){let[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(``),[c,l]=(0,g.useState)(``);function u(){let e={document_id:i.trim()||`0`,name:o.trim()};return c&&(e.owner_bot_id=c),e}return(0,W.jsxs)(W.Fragment,{children:[n&&(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Add or rename an icon`,text:`Search and pick any custom-emoji document already on this deployment (including bundled/system ones). Adding an id that already exists renames it instead of duplicating it.`}),(0,W.jsx)(ai,{label:`Document`,value:i,onChange:a}),(0,W.jsxs)(`div`,{className:`bot-create-fields`,children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Name`}),(0,W.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),placeholder:`Acme blue tick`})]}),(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Owner`}),(0,W.jsxs)(`select`,{value:c,onChange:e=>l(e.target.value),children:[(0,W.jsx)(`option`,{value:``,children:`Shared`}),t.map(e=>(0,W.jsx)(`option`,{value:e.BotID,children:`${e.CompanyName||e.BotID} · ${H(e.BotUsername)||e.BotID}`},e.BotID))]})]})]}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`A document id that resolves to nothing produces an invisible badge: the peer is marked in the database and the client draws nothing.`}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`A shared icon may be granted to any verifier; picking an owner reserves it for that one bot.`}),(0,W.jsxs)(`div`,{className:`bot-create-actions`,children:[(0,W.jsx)(`span`,{className:`bot-create-note`,children:`Adding an icon grants nothing by itself — it only makes the document available to grant.`}),(0,W.jsx)(X,{label:`Save icon`,icon:(0,W.jsx)(Ge,{size:15}),tone:`neutral`,path:`/api/actions/upsert-verification-icon`,payload:u,onDone:()=>{a(``),s(``),l(``),r()}})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Icon catalogue`,text:`The custom emoji documents a verifier may mark with. Nothing else can be used as an icon, so the catalogue is where a wrong badge is prevented rather than fixed.`,action:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:r,children:[(0,W.jsx)(Ye,{size:15}),` `,`Refresh`]})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`Document ID`}),(0,W.jsx)(`th`,{children:`Name`}),(0,W.jsx)(`th`,{children:`Owner`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Verifiers using it`}),(0,W.jsx)(`th`,{children:`Filed`}),n&&(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[e.map(e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`mono`,children:e.DocumentID}),(0,W.jsx)(`td`,{children:(0,W.jsx)(`strong`,{children:e.Name||`-`})}),(0,W.jsx)(`td`,{children:e.OwnerBotID&&e.OwnerBotID!==`0`?(0,W.jsxs)(W.Fragment,{children:[H(e.OwnerBotUsername)||e.OwnerBotID,(0,W.jsx)(`div`,{className:`entity-subtitle mono`,children:e.OwnerBotID})]}):(0,W.jsx)(q,{children:`Shared`})}),(0,W.jsx)(`td`,{children:e.Active?(0,W.jsx)(q,{tone:`good`,children:`Active`}):(0,W.jsx)(q,{tone:`warn`,children:`Retired`})}),(0,W.jsx)(`td`,{className:`mono`,children:String(e.UsedByVerifiers??`0`)}),(0,W.jsx)(`td`,{children:U(e.CreatedAt)||`-`}),n&&(0,W.jsx)(`td`,{children:(0,W.jsx)(`div`,{className:`row-actions`,children:(0,W.jsx)(X,{label:e.Active?`Retire`:`Activate`,icon:e.Active?(0,W.jsx)(Ke,{size:14}):(0,W.jsx)(qe,{size:14}),tone:e.Active?`warn`:`neutral`,compact:!0,path:`/api/actions/set-verification-icon-active`,payload:()=>({icon_id:e.ID,active:!e.Active}),onDone:r})})})]},e.ID)),e.length===0&&(0,W.jsx)(It,{colSpan:n?7:6})]})]})}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Retiring an icon stops it from being granted to anybody new. Marks already carrying it keep it: the icon is copied onto the mark when it is granted.`})]})]})}function mi({verifiers:e,canManage:t,navigate:n}){let[r,i]=(0,g.useState)(``),[a,o]=(0,g.useState)(`all`),[s,c]=(0,g.useState)(``),[l,u]=(0,g.useState)(`50`),[d,f]=(0,g.useState)([]),[p,m]=(0,g.useState)(!1),[h,_]=(0,g.useState)(``),[v,y]=(0,g.useState)(!1),[b,x]=(0,g.useState)(``);async function S(e=!1){y(!0),x(``);let t=new URLSearchParams({limit:l});r&&t.set(`verifier_bot_id`,r),a!==`all`&&t.set(`peer_type`,a),s.trim()&&t.set(`q`,s.trim().replace(/^@/,``)),e&&h&&t.set(`before_id`,h);try{let n=await k.customVerifications(t),r=n.rows??[];f(t=>e?[...t,...r]:r),_(n.next_before_id??``),m(!!n.has_more)}catch(e){x(O(e))}finally{y(!1)}}return(0,g.useEffect)(()=>{S(!1)},[]),(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Granted marks`,text:`Every peer currently carrying a third-party mark, whoever granted it — an operator decision, the verifier bot itself, or the peer's owner through bots.setCustomVerification.`,action:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>S(!1),disabled:v,children:[(0,W.jsx)(Ye,{size:15,className:v?`spin`:``}),` `,`Refresh`]})}),b&&(0,W.jsx)(K,{children:b})]}),(0,W.jsx)(Nt,{children:(0,W.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),S(!1)},children:[(0,W.jsxs)(`label`,{className:`searchbox`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:s,onChange:e=>c(e.target.value),placeholder:`Peer id, username or title`})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Verifier`}),(0,W.jsx)(hi,{value:r,verifiers:e,onChange:i})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Peer type`}),(0,W.jsxs)(`select`,{value:a,onChange:e=>o(e.target.value),children:[(0,W.jsx)(`option`,{value:`all`,children:`All types`}),si.map(e=>(0,W.jsx)(`option`,{value:e,children:li[e]},e))]})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Limit`}),(0,W.jsx)(`input`,{className:`small-input`,value:l,onChange:e=>u(e.target.value),type:`number`,min:`1`,max:`200`})]}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:v,children:[v?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(Ze,{size:15}),` `,`Search`]})]})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`ID`}),(0,W.jsx)(`th`,{children:`Verifier`}),(0,W.jsx)(`th`,{children:`Peer`}),(0,W.jsx)(`th`,{children:`Description`}),(0,W.jsx)(`th`,{children:`Icon`}),(0,W.jsx)(`th`,{children:`Filed`}),t&&(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[d.map(e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsxs)(`td`,{className:`mono`,children:[`#`,e.ID]}),(0,W.jsxs)(`td`,{children:[(0,W.jsx)(`strong`,{children:e.CompanyName||H(e.VerifierBotUsername)||e.VerifierBotID}),(0,W.jsx)(`div`,{className:`entity-subtitle mono`,children:H(e.VerifierBotUsername)||e.VerifierBotID})]}),(0,W.jsxs)(`td`,{children:[(0,W.jsx)(`button`,{className:`row-link`,type:`button`,onClick:()=>n(bi(e.PeerType,e.PeerID)),children:(0,W.jsx)(`strong`,{children:yi(e)})}),(0,W.jsxs)(`div`,{className:`entity-subtitle mono`,children:[li[e.PeerType],` · `,e.PeerID]})]}),(0,W.jsx)(`td`,{className:`truncate`,children:e.Description||`Not set`}),(0,W.jsx)(`td`,{className:`mono`,children:e.IconDocumentID}),(0,W.jsx)(`td`,{children:U(e.CreatedAt)||`-`}),t&&(0,W.jsx)(`td`,{children:(0,W.jsx)(`div`,{className:`row-actions`,children:(0,W.jsx)(X,{label:`Remove mark`,icon:(0,W.jsx)(R,{size:14}),tone:`danger`,compact:!0,path:`/api/actions/revoke-custom-verification`,payload:()=>({verifier_bot_id:e.VerifierBotID,peer_type:e.PeerType,peer_id:e.PeerID}),onDone:()=>S(!1)})})})]},e.ID)),d.length===0&&(0,W.jsx)(It,{colSpan:t?7:6})]})]})}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Removing a mark clears the icon and the description from the peer. The application it came from keeps its history.`}),p&&(0,W.jsx)(`div`,{className:`toolbar`,children:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>S(!0),disabled:v,children:[v?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(ge,{size:15}),` `,`Load more`]})})]})}function hi({value:e,verifiers:t,onChange:n}){return(0,W.jsxs)(`select`,{value:e,onChange:e=>n(e.target.value),children:[(0,W.jsx)(`option`,{value:``,children:`All verifiers`}),t.map(e=>(0,W.jsx)(`option`,{value:e.BotID,children:`${e.CompanyName||e.BotID} · ${H(e.BotUsername)||e.BotID}`+(e.Enabled?``:` (disabled)`)},e.BotID))]})}function gi({status:e}){return(0,W.jsx)(q,{tone:_i(e),children:ci[e]})}function _i(e){return e===`approved`?`good`:e===`pending`?`warn`:e===`rejected`?`danger`:`neutral`}function vi(e,t){return e===`pending`?t!==`0`&&t!==``?`warn`:`neutral`:e===`approved`?`good`:`neutral`}function yi(e){return H(e.PeerUsername)||e.PeerTitle||`#${e.PeerID}`}function bi(e,t){return e===`channel`?`/channels/${t}`:`/accounts/${t}`}function xi({id:e,navigate:t}){let[n,r]=(0,g.useState)(null),[i,a]=(0,g.useState)(``),[o,s]=(0,g.useState)(!1),[c,l]=(0,g.useState)(!1),[u,d]=(0,g.useState)(``);async function f(){l(!0),d(``);try{r(await k.customVerificationRequest(e))}catch(e){d(O(e))}finally{l(!1)}}function p(){s(!1),f()}(0,g.useEffect)(()=>{f()},[e]);function m(e){if(e instanceof v&&e.status===409)return s(!0),f(),`Another admin has already changed this application. The data has been reloaded — check the status before deciding again.`}if(u&&!n)return(0,W.jsx)(K,{children:u});if(!n)return(0,W.jsx)(Lt,{label:`Loading the application…`});let h=n.request,_=Ci(n.verifier),y=n.mark_active,b=h.Status===`pending`,x=h.Status===`approved`,S=i.trim(),C=h.RequestedDescription.trim(),w=!!_?.CanModifyCustomDescription&&C!==``,T=w?C:(_?.DefaultDescription??``).trim();function E(){let e={version:h.Version};return S&&(e.internal_note=S),e}function D(){a(``),s(!1),f()}return(0,W.jsxs)(Mt,{title:`Application #${h.ID}`,eyebrow:`Third-party verification / Review`,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>t(`/bot-verification`),children:[(0,W.jsx)(ue,{size:15}),` `,`Back to list`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:p,disabled:c,children:[(0,W.jsx)(Ye,{size:15,className:c?`spin`:``}),` `,`Refresh`]})]}),children:[u&&(0,W.jsx)(K,{children:u}),o&&(0,W.jsx)(K,{children:`Another admin has already changed this application. The data has been reloaded — check the status before deciding again.`}),(0,W.jsx)(Pt,{main:(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`section`,{className:`entity-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`entity-title`,children:yi(h)}),(0,W.jsxs)(`div`,{className:`entity-subtitle mono`,children:[`#`,h.ID,` · `,li[h.PeerType],`:`,h.PeerID,` · v`,h.Version]})]}),(0,W.jsxs)(`div`,{className:`entity-badges`,children:[(0,W.jsx)(gi,{status:h.Status}),y?(0,W.jsxs)(q,{tone:`good`,children:[(0,W.jsx)(F,{size:12}),` `,`Mark is live`]}):(0,W.jsx)(q,{tone:`neutral`,children:`No mark on the peer`})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`A verifier company's icon — not the official checkmark`,text:`A third-party mark is a verifier bot's own icon, drawn right BEFORE the name of an account, a bot or a channel, plus one line of description in the profile. It says “this verifier vouches for this peer”, and nothing more.`}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`The icon is a custom emoji document. The client fetches it through messages.getCustomEmojiDocuments, so a document id that resolves to nothing renders as no badge at all — which is why marks are granted from the catalogue below rather than from a typed number.`})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Verifier`,text:`The company whose icon the peer would carry, as its row stands right now.`,action:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>t(`/bots/${h.VerifierBotID}`),children:[(0,W.jsx)(pe,{size:15}),` `,`Open verifier bot`]})}),(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Company`,value:_?.CompanyName||`-`}),(0,W.jsx)(Y,{label:`Bot`,value:H(h.VerifierBotUsername)||`-`}),(0,W.jsx)(Y,{label:`Verifier bot ID`,value:h.VerifierBotID,mono:!0}),(0,W.jsx)(Y,{label:`Document ID`,value:_?.IconDocumentID||`-`,mono:!0}),(0,W.jsx)(Y,{label:`Name`,value:_?.IconName||`-`}),(0,W.jsx)(Y,{label:`Own description`,value:_?.CanModifyCustomDescription?`Yes`:`No`})]}),(0,W.jsx)(Si,{label:`Default description`,children:_?.DefaultDescription?(0,W.jsx)(`p`,{className:`about-text`,children:_.DefaultDescription}):(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not set`})}),!_&&(0,W.jsx)(K,{children:`The verifier row is gone: its status was revoked after this application was filed. There is no icon to grant, so the application can only be rejected.`}),_&&!_.Enabled&&(0,W.jsx)(K,{children:`This verifier is disabled. It cannot mark anything new until an operator enables it again.`})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Peer`,text:`The account, bot or channel the icon would be attached to.`,action:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>t(bi(h.PeerType,h.PeerID)),children:[(0,W.jsx)(Ce,{size:15}),` `,`Open peer`]})}),(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Type`,value:li[h.PeerType]}),(0,W.jsx)(Y,{label:`Username`,value:H(h.PeerUsername)||`-`}),(0,W.jsx)(Y,{label:`Title`,value:h.PeerTitle||`-`}),(0,W.jsx)(Y,{label:`Peer ID`,value:h.PeerID,mono:!0})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Applicant`,text:`Who filed the application with the verifier bot.`,action:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>t(`/accounts/${h.ApplicantUserID}`),children:[(0,W.jsx)(ft,{size:15}),` `,`Open account`]})}),(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Username`,value:H(h.ApplicantUsername)||`-`}),(0,W.jsx)(Y,{label:`User ID`,value:h.ApplicantUserID,mono:!0}),(0,W.jsx)(Y,{label:`Filed`,value:U(h.CreatedAt)||`-`}),(0,W.jsx)(Y,{label:`Updated`,value:U(h.UpdatedAt)||`-`})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Application`,text:`What the applicant wrote, rendered as plain text.`}),(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Correlation ID`,value:h.CorrelationID||`-`,mono:!0}),(0,W.jsx)(Y,{label:`Status`,value:ci[h.Status]})]}),(0,W.jsx)(Si,{label:`Stated reason`,children:h.Reason?(0,W.jsx)(`p`,{className:`about-text`,children:h.Reason}):(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not set`})}),(0,W.jsx)(Si,{label:`Requested description`,children:C?(0,W.jsx)(`p`,{className:`about-text`,children:C}):(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not set`})}),(0,W.jsx)(Si,{label:`Description the mark would carry`,children:T?(0,W.jsx)(`p`,{className:`about-text`,children:T}):(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not set`})}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Resolved the same way the backend resolves it: the applicant's wording only when this verifier may set its own description, otherwise the verifier's default.`}),C!==``&&!w&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`This verifier may not set a per-peer description, so the requested wording is ignored and the default is applied.`})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Decision`,text:`What was decided, by whom, and with which wording.`}),(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Decided by`,value:h.DecidedBy||`-`}),(0,W.jsx)(Y,{label:`Approved`,value:U(h.ApprovedAt)||`-`}),(0,W.jsx)(Y,{label:`Rejected`,value:U(h.RejectedAt)||`-`}),(0,W.jsx)(Y,{label:`Version (optimistic lock)`,value:h.Version,mono:!0})]}),(0,W.jsx)(Si,{label:`Decision reason`,children:h.DecisionReason?(0,W.jsx)(`p`,{className:`about-text`,children:h.DecisionReason}):(0,W.jsx)(`p`,{className:`bot-create-note`,children:`No decision yet`})}),(0,W.jsx)(Si,{label:`Internal note · admins only`,children:h.InternalNote?(0,W.jsx)(`p`,{className:`about-text`,children:h.InternalNote}):(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not set`})})]})]})]}),side:(0,W.jsxs)(`section`,{className:`action-dock`,children:[(0,W.jsxs)(`div`,{className:`dock-title`,children:[(0,W.jsx)(ot,{size:14}),` `,`Decision`]}),!b&&!x&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`This status has no available actions.`}),(b||x)&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Internal note`}),(0,W.jsx)(`textarea`,{value:i,onChange:e=>a(e.target.value),rows:3,placeholder:`Handover note for other admins`})]}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Optional. Stored with the decision and visible to admins only — never sent to the applicant.`})]}),b&&(0,W.jsxs)(W.Fragment,{children:[!_&&(0,W.jsx)(K,{children:`The verifier row is gone: its status was revoked after this application was filed. There is no icon to grant, so the application can only be rejected.`}),_&&!_.Enabled&&(0,W.jsx)(K,{children:`This verifier is disabled. It cannot mark anything new until an operator enables it again.`}),y&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`This peer already carries this verifier's mark; approving refreshes the description and records the decision.`}),(0,W.jsxs)(`div`,{className:`action-stack`,children:[(0,W.jsx)(X,{label:`Approve`,icon:(0,W.jsx)(I,{size:15}),tone:`neutral`,path:`/api/botverification/requests/${h.ID}/approve`,payload:E,onDone:D,onError:m}),(0,W.jsx)(X,{label:`Reject`,icon:(0,W.jsx)(te,{size:15}),tone:`warn`,path:`/api/botverification/requests/${h.ID}/reject`,payload:E,onDone:D,onError:m})]}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Puts the verifier's icon before the peer's name and its description in the profile, and messages the applicant.`}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`The reason is mandatory: it is the wording the applicant is told, so write what exactly was missing.`})]}),x&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`dock-title`,children:[(0,W.jsx)(rt,{size:14}),` `,`Danger zone`]}),(0,W.jsxs)(`div`,{className:`danger-zone`,children:[(0,W.jsx)(X,{label:`Revoke mark`,icon:(0,W.jsx)(R,{size:15}),tone:`danger`,path:`/api/botverification/requests/${h.ID}/revoke`,payload:E,onDone:D,onError:m}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Takes the icon and the description off the peer and closes the application as revoked. The official checkmark, if the peer has one, is untouched.`}),!y&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`The peer carries no mark right now — revoking only closes the application.`})]})]})]})})]})}function Si({label:e,children:t}){return(0,W.jsxs)(`div`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:e}),t]})}function Ci(e){return!e||!e.BotID||e.BotID===`0`?null:e}var wi=[`draft`,`submitted`,`in_review`,`approved`,`rejected`,`cancelled`],Ti=[`bot`,`channel`,`supergroup`,`user`],Ei={draft:`Draft`,submitted:`Submitted`,in_review:`In review`,approved:`Approved`,rejected:`Rejected`,cancelled:`Cancelled`},Di={bot:`Bot`,channel:`Channel`,supergroup:`Supergroup`,user:`User`};function Oi({navigate:e}){let[t,n]=(0,g.useState)(`all`),[r,i]=(0,g.useState)(`all`),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(``),[l,u]=(0,g.useState)(`50`),[d,f]=(0,g.useState)([]),[p,m]=(0,g.useState)({}),[h,_]=(0,g.useState)(!1),[v,y]=(0,g.useState)(``),[b,x]=(0,g.useState)(!1),[S,C]=(0,g.useState)(``);async function w(e=!1){x(!0),C(``);let n=new URLSearchParams({limit:l});t!==`all`&&n.set(`status`,t),r!==`all`&&n.set(`target_type`,r),a.trim()&&n.set(`reviewer`,a.trim()),s.trim()&&n.set(`q`,s.trim().replace(/^@/,``)),e&&v&&n.set(`before_id`,v);try{let t=await k.verificationApplications(n),r=t.rows??[];f(t=>e?[...t,...r]:r),y(t.next_before_id??``),_(!!t.has_more)}catch(e){C(O(e))}finally{x(!1)}}async function T(){try{m((await k.verificationCounts()).counts??{})}catch(e){C(O(e))}}(0,g.useEffect)(()=>{w(!1),T()},[]);function E(){w(!1),T()}return(0,W.jsxs)(Mt,{title:`Verification queue`,eyebrow:`Verification / Queue`,actions:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:E,disabled:b,children:[(0,W.jsx)(Ye,{size:15,className:b?`spin`:``}),` `,`Refresh`]}),children:[S&&(0,W.jsx)(K,{children:S}),(0,W.jsx)(`div`,{className:`metric-row`,children:wi.map(e=>(0,W.jsx)(J,{label:Ei[e],value:p[e]??`0`,mono:!0,tone:ji(e,p[e]??`0`)},e))}),(0,W.jsx)(Nt,{children:(0,W.jsxs)(`form`,{className:`toolbar`,onSubmit:e=>{e.preventDefault(),w(!1)},children:[(0,W.jsxs)(`label`,{className:`searchbox`,children:[(0,W.jsx)(Ze,{size:15}),(0,W.jsx)(`input`,{value:s,onChange:e=>c(e.target.value),placeholder:`Application id, peer id, username or title`})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Status`}),(0,W.jsxs)(`select`,{value:t,onChange:e=>n(e.target.value),children:[(0,W.jsx)(`option`,{value:`all`,children:`All statuses`}),wi.map(e=>(0,W.jsx)(`option`,{value:e,children:Ei[e]},e))]})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Target type`}),(0,W.jsxs)(`select`,{value:r,onChange:e=>i(e.target.value),children:[(0,W.jsx)(`option`,{value:`all`,children:`All types`}),Ti.map(e=>(0,W.jsx)(`option`,{value:e,children:Di[e]},e))]})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Reviewer`}),(0,W.jsx)(`input`,{value:a,onChange:e=>o(e.target.value),placeholder:`Any reviewer`})]}),(0,W.jsxs)(`label`,{className:`field-inline`,children:[(0,W.jsx)(`span`,{children:`Limit`}),(0,W.jsx)(`input`,{className:`small-input`,value:l,onChange:e=>u(e.target.value),type:`number`,min:`1`,max:`200`})]}),(0,W.jsxs)(`button`,{className:`btn primary icon-text`,type:`submit`,disabled:b,children:[b?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(Ze,{size:15}),` `,`Search`]})]})}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`ID`}),(0,W.jsx)(`th`,{children:`Target`}),(0,W.jsx)(`th`,{children:`Applicant`}),(0,W.jsx)(`th`,{children:`Category`}),(0,W.jsx)(`th`,{children:`Status`}),(0,W.jsx)(`th`,{children:`Submitted`}),(0,W.jsx)(`th`,{children:`Reviewer`}),(0,W.jsx)(`th`,{})]})}),(0,W.jsxs)(`tbody`,{children:[d.map(t=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{className:`mono`,children:(0,W.jsxs)(`button`,{className:`row-link`,type:`button`,onClick:()=>e(`/verification/${t.ID}`),children:[`#`,t.ID]})}),(0,W.jsxs)(`td`,{children:[(0,W.jsx)(`strong`,{children:Mi(t)}),(0,W.jsxs)(`div`,{className:`entity-subtitle mono`,children:[Di[t.TargetType],` · `,t.TargetID]}),t.TargetVerified&&(0,W.jsxs)(q,{tone:`good`,children:[(0,W.jsx)(F,{size:12}),` `,`Badge already on`]})]}),(0,W.jsxs)(`td`,{children:[H(t.ApplicantUsername)||t.ApplicantName||`-`,(0,W.jsx)(`div`,{className:`entity-subtitle mono`,children:t.ApplicantUserID})]}),(0,W.jsx)(`td`,{children:t.Category||`-`}),(0,W.jsx)(`td`,{children:(0,W.jsx)(ki,{status:t.Status})}),(0,W.jsx)(`td`,{children:U(t.SubmittedAt)||`-`}),(0,W.jsx)(`td`,{children:t.ReviewerAdminID||`-`}),(0,W.jsx)(`td`,{children:(0,W.jsxs)(`button`,{className:`row-link`,type:`button`,onClick:()=>e(`/verification/${t.ID}`),children:[(0,W.jsx)(nt,{size:14}),` `,`Details`,` `,(0,W.jsx)(ve,{size:14})]})})]},t.ID)),d.length===0&&(0,W.jsx)(It,{colSpan:8})]})]})}),h&&(0,W.jsx)(`div`,{className:`toolbar`,children:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>w(!0),disabled:b,children:[b?(0,W.jsx)(L,{size:15,className:`spin`}):(0,W.jsx)(ge,{size:15}),` `,`Load more`]})})]})}function ki({status:e}){return(0,W.jsx)(q,{tone:Ai(e),children:Ei[e]})}function Ai(e){return e===`approved`?`good`:e===`submitted`||e===`in_review`?`warn`:e===`rejected`?`danger`:`neutral`}function ji(e,t){return e===`submitted`||e===`in_review`?t!==`0`&&t!==``?`warn`:`neutral`:e===`approved`?`good`:`neutral`}function Mi(e){return H(e.TargetUsername)||e.TargetTitle||`#${e.TargetID}`}function Ni(e){return e.TargetType===`bot`?`/bots/${e.TargetID}`:e.TargetType===`user`?`/accounts/${e.TargetID}`:`/channels/${e.TargetID}`}var Pi={created:`Created`,updated:`Updated`,submitted:`Submitted`,claimed:`Claimed`,approved:`Approved`,rejected:`Rejected`,cancelled:`Cancelled`,revoked:`Badge revoked`,notified:`Applicant notified`};function Fi({id:e,navigate:t}){let{can:n}=Kt(),[r,i]=(0,g.useState)(null),[a,o]=(0,g.useState)(``),[s,c]=(0,g.useState)(!1),[l,u]=(0,g.useState)(!1),[d,f]=(0,g.useState)(``);async function p(){u(!0),f(``);try{i(await k.verificationApplication(e))}catch(e){f(O(e))}finally{u(!1)}}function m(){c(!1),p()}(0,g.useEffect)(()=>{p()},[e]);function h(e){if(e instanceof v&&e.status===409)return c(!0),p(),`Another admin has already changed this application. The data has been reloaded — check the status before deciding again.`}if(d&&!r)return(0,W.jsx)(K,{children:d});if(!r)return(0,W.jsx)(Lt,{label:`Loading the application…`});let _=r.application,y=r.events??[],b=r.applicant_controls_target,x=r.target_verified,S=_.Status===`submitted`,C=_.Status===`submitted`||_.Status===`in_review`,w=_.Status===`approved`&&n(`verification.revoke`),T=a.trim();function E(){let e={version:_.Version};return T&&(e.internal_note=T),e}function D(){o(``),c(!1),p()}return(0,W.jsxs)(Mt,{title:`Application #${_.ID}`,eyebrow:`Verification / Review`,actions:(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>t(`/verification`),children:[(0,W.jsx)(ue,{size:15}),` `,`Back to list`]}),(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:m,disabled:l,children:[(0,W.jsx)(Ye,{size:15,className:l?`spin`:``}),` `,`Refresh`]})]}),children:[d&&(0,W.jsx)(K,{children:d}),s&&(0,W.jsx)(K,{children:`Another admin has already changed this application. The data has been reloaded — check the status before deciding again.`}),(0,W.jsx)(Pt,{main:(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`section`,{className:`entity-head`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`div`,{className:`entity-title`,children:Mi(_)}),(0,W.jsxs)(`div`,{className:`entity-subtitle mono`,children:[`#`,_.ID,` · `,Di[_.TargetType],`:`,_.TargetID,` · v`,_.Version]})]}),(0,W.jsxs)(`div`,{className:`entity-badges`,children:[(0,W.jsx)(ki,{status:_.Status}),x&&(0,W.jsxs)(q,{tone:`good`,children:[(0,W.jsx)(F,{size:12}),` `,`Badge already on`]}),(0,W.jsx)(q,{tone:b?`good`:`danger`,children:b?`Control confirmed`:`No control over the target`})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Target`,text:`The peer the badge would be attached to, as it exists right now.`,action:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>t(Ni(_)),children:[(0,W.jsx)(Ce,{size:15}),` `,`Open target`]})}),(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Type`,value:Di[_.TargetType]}),(0,W.jsx)(Y,{label:`Username`,value:H(_.TargetUsername)||`-`}),(0,W.jsx)(Y,{label:`Title`,value:_.TargetTitle||`-`}),(0,W.jsx)(Y,{label:`Peer ID`,value:_.TargetID,mono:!0})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Applicant`,text:`Who filed the application and whether they still hold rights on the target.`,action:(0,W.jsxs)(`button`,{className:`btn icon-text`,type:`button`,onClick:()=>t(`/accounts/${_.ApplicantUserID}`),children:[(0,W.jsx)(ft,{size:15}),` `,`Open account`]})}),(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Username`,value:H(_.ApplicantUsername)||`-`}),(0,W.jsx)(Y,{label:`Name`,value:_.ApplicantName||`-`}),(0,W.jsx)(Y,{label:`User ID`,value:_.ApplicantUserID,mono:!0}),(0,W.jsx)(Y,{label:`Submitted`,value:U(_.SubmittedAt)||`-`})]}),b?(0,W.jsx)(`p`,{className:`bot-create-note`,children:`The applicant controls the target right now — checked against the live records, not against the submission snapshot.`}):(0,W.jsx)(K,{children:`The applicant no longer controls the target. Approving would hand the badge to someone who does not hold the peer — normally a reason to reject.`})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Application`,text:`Everything the applicant submitted, rendered as plain text.`}),(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Category`,value:_.Category||`-`}),(0,W.jsx)(Y,{label:`Correlation ID`,value:_.CorrelationID||`-`,mono:!0}),(0,W.jsx)(Y,{label:`Created`,value:U(_.CreatedAt)||`-`}),(0,W.jsx)(Y,{label:`Updated`,value:U(_.UpdatedAt)||`-`})]}),(0,W.jsx)(Ii,{label:`Description`,children:_.Description?(0,W.jsx)(`p`,{className:`about-text`,children:_.Description}):(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not provided`})}),(0,W.jsx)(Ii,{label:`Official website`,children:_.OfficialWebsite?(0,W.jsx)(`div`,{className:`about-text`,children:(0,W.jsx)(Li,{value:_.OfficialWebsite})}):(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not provided`})}),(0,W.jsx)(Ii,{label:`Social links`,children:(0,W.jsx)(Ri,{values:_.SocialLinks})}),(0,W.jsx)(Ii,{label:`Press coverage`,children:(0,W.jsx)(Ri,{values:_.PressLinks})}),(0,W.jsx)(Ii,{label:`Applicant comment`,children:_.AdditionalNote?(0,W.jsx)(`p`,{className:`about-text`,children:_.AdditionalNote}):(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not provided`})}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Only http:// and https:// links are clickable and open in a new tab; anything else is shown as text.`})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`Decision`,text:`What was decided, by whom, and with which wording.`}),(0,W.jsxs)(`div`,{className:`stacked-sections`,children:[(0,W.jsxs)(`div`,{className:`summary-grid`,children:[(0,W.jsx)(Y,{label:`Reviewer`,value:_.ReviewerAdminID||`-`}),(0,W.jsx)(Y,{label:`Decided`,value:U(_.ReviewedAt)||`-`}),(0,W.jsx)(Y,{label:`Status`,value:Ei[_.Status]}),(0,W.jsx)(Y,{label:`Version (optimistic lock)`,value:_.Version,mono:!0})]}),(0,W.jsx)(Ii,{label:`Decision reason`,children:_.DecisionReason?(0,W.jsx)(`p`,{className:`about-text`,children:_.DecisionReason}):(0,W.jsx)(`p`,{className:`bot-create-note`,children:`No decision yet`})}),(0,W.jsx)(Ii,{label:`Internal note · admins only`,children:_.InternalNote?(0,W.jsx)(`p`,{className:`about-text`,children:_.InternalNote}):(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not provided`})})]})]}),(0,W.jsxs)(`section`,{className:`section-block`,children:[(0,W.jsx)(G,{title:`History`,text:`Immutable trail of every status transition, with actor and reason.`}),(0,W.jsx)(`div`,{className:`table-wrap`,children:(0,W.jsxs)(`table`,{className:`data-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:`Event`}),(0,W.jsx)(`th`,{children:`From → to`}),(0,W.jsx)(`th`,{children:`Actor`}),(0,W.jsx)(`th`,{children:`Reason`}),(0,W.jsx)(`th`,{children:`Internal note`}),(0,W.jsx)(`th`,{children:`Time`})]})}),(0,W.jsxs)(`tbody`,{children:[y.map(e=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`td`,{children:(0,W.jsx)(zi,{kind:e.Kind})}),(0,W.jsxs)(`td`,{className:`mono`,children:[e.FromStatus||`-`,` → `,e.ToStatus||`-`]}),(0,W.jsx)(`td`,{children:e.Actor||`-`}),(0,W.jsx)(`td`,{className:`truncate`,children:e.Reason||`-`}),(0,W.jsx)(`td`,{className:`truncate`,children:e.Note||`-`}),(0,W.jsx)(`td`,{children:U(e.CreatedAt)||`-`})]},e.ID)),y.length===0&&(0,W.jsx)(It,{colSpan:6})]})]})})]})]}),side:(0,W.jsxs)(`section`,{className:`action-dock`,children:[(0,W.jsx)(`div`,{className:`dock-title`,children:`Review actions`}),!S&&!C&&!w&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`This status has no available actions.`}),S&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`action-stack`,children:(0,W.jsx)(X,{label:`Take into review`,icon:(0,W.jsx)(ke,{size:15}),tone:`neutral`,path:`/api/verification/applications/${_.ID}/claim`,payload:()=>({version:_.Version}),onDone:D,onError:h})}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Assigns the application to you and moves it to in review, so two reviewers never work on the same one.`})]}),(C||w)&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:`Internal note`}),(0,W.jsx)(`textarea`,{value:a,onChange:e=>o(e.target.value),rows:3,placeholder:`Handover note for other reviewers`})]}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Optional. Stored with the decision and visible to admins only — never sent to the applicant.`})]}),C&&(0,W.jsxs)(W.Fragment,{children:[!b&&(0,W.jsx)(K,{children:`The applicant no longer controls the target. Approving would hand the badge to someone who does not hold the peer — normally a reason to reject.`}),x&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`The target already carries the badge; approving only records the decision.`}),(0,W.jsxs)(`div`,{className:`action-stack`,children:[(0,W.jsx)(X,{label:`Approve`,icon:(0,W.jsx)(I,{size:15}),tone:`neutral`,path:`/api/verification/applications/${_.ID}/approve`,payload:E,onDone:D,onError:h}),(0,W.jsx)(X,{label:`Reject`,icon:(0,W.jsx)(te,{size:15}),tone:`warn`,path:`/api/verification/applications/${_.ID}/reject`,payload:E,onDone:D,onError:h})]}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Grants the official badge to the target and closes the application.`}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`The reason is mandatory: it is the wording the applicant is told, so write what exactly was missing.`})]}),w&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`dock-title`,children:[(0,W.jsx)(rt,{size:14}),` `,`Danger zone`]}),(0,W.jsxs)(`div`,{className:`danger-zone`,children:[(0,W.jsx)(X,{label:`Revoke verification`,icon:(0,W.jsx)(R,{size:15}),tone:`danger`,path:`/api/actions/revoke-verification`,payload:()=>{let e={target_type:_.TargetType,target_id:_.TargetID};return T&&(e.internal_note=T),e},onDone:D,onError:h}),(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Clears the badge from the target. The approved application stays in history.`}),!x&&(0,W.jsx)(`p`,{className:`bot-create-note`,children:`The target carries no badge right now — there is nothing to revoke.`})]})]})]})})]})}function Ii({label:e,children:t}){return(0,W.jsxs)(`div`,{className:`duration-field`,children:[(0,W.jsx)(`span`,{children:e}),t]})}function Li({value:e}){let t=bt(e);return t?(0,W.jsxs)(`a`,{className:`row-link`,href:t,target:`_blank`,rel:`noopener noreferrer`,children:[e,` `,(0,W.jsx)(Ce,{size:13})]}):(0,W.jsx)(`span`,{className:`mono`,children:e})}function Ri({values:e}){let t=(e??[]).filter(e=>e.trim()!==``);return t.length===0?(0,W.jsx)(`p`,{className:`bot-create-note`,children:`Not provided`}):(0,W.jsx)(`div`,{className:`about-text`,children:t.map((e,t)=>(0,W.jsx)(`div`,{children:(0,W.jsx)(Li,{value:e})},`${t}-${e}`))})}function zi({kind:e}){return(0,W.jsx)(q,{tone:e===`approved`?`good`:e===`rejected`||e===`revoked`||e===`cancelled`?`danger`:e===`submitted`||e===`claimed`?`warn`:`neutral`,children:Pi[e]})}function Bi({route:e,navigate:t}){let n=e.path.match(/^\/accounts\/(\d+)$/)?.[1],r=e.path.match(/^\/channels\/(\d+)$/)?.[1],i=e.path.match(/^\/bots\/(\d+)$/)?.[1],a=e.path.match(/^\/moderation\/(\d+)$/)?.[1],o=e.path.match(/^\/collectible-usernames\/(\d+)$/)?.[1],s=e.path.match(/^\/verification\/(\d+)$/)?.[1],c=e.path.match(/^\/bot-verification\/(\d+)$/)?.[1];return c?(0,W.jsx)(Zt,{children:(0,W.jsx)(Yt,{permission:Vt,children:(0,W.jsx)(xi,{id:c,navigate:t})})}):e.path===`/bot-verification`?(0,W.jsx)(Zt,{children:(0,W.jsx)(Yt,{permission:Vt,children:(0,W.jsx)(ui,{navigate:t})})}):s?(0,W.jsx)(Yt,{permission:Bt,children:(0,W.jsx)(Fi,{id:s,navigate:t})}):e.path===`/verification`?(0,W.jsx)(Yt,{permission:Bt,children:(0,W.jsx)(Oi,{navigate:t})}):o?(0,W.jsx)(qn,{id:o,navigate:t}):e.path===`/collectible-usernames`?(0,W.jsx)(Un,{navigate:t}):e.path===`/storage`?(0,W.jsx)(ti,{navigate:t}):n?(0,W.jsx)(jn,{id:Number(n),navigate:t}):r?(0,W.jsx)(Zn,{id:Number(r),navigate:t}):i?(0,W.jsx)(tr,{id:Number(i),navigate:t}):a?(0,W.jsx)(Xr,{id:Number(a),navigate:t}):e.path===`/accounts/shared-devices`?(0,W.jsx)(Ln,{navigate:t}):e.path===`/accounts`?(0,W.jsx)(In,{navigate:t}):e.path===`/channels`?(0,W.jsx)($n,{navigate:t}):e.path===`/bots`?(0,W.jsx)(ir,{navigate:t}):e.path===`/moderation`?(0,W.jsx)(Ur,{navigate:t}):e.path===`/broadcasts`?(0,W.jsx)(sr,{}):e.path===`/emoji`?(0,W.jsx)(xr,{kind:`emoji`}):e.path===`/stickers`?(0,W.jsx)(xr,{kind:`stickers`}):e.path===`/gif-catalog`?(0,W.jsx)(wr,{}):e.path===`/server-settings`?(0,W.jsx)(Yt,{permission:Ut,children:(0,W.jsx)(Er,{})}):e.path===`/messages/detail`||e.path===`/messages/private/detail`?(0,W.jsx)(mr,{ownerUserID:Number(e.search.get(`owner_user_id`)||`0`),msgID:Number(e.search.get(`msg_id`)||`0`),navigate:t}):e.path===`/messages/groups/detail`?(0,W.jsx)(fr,{channelID:Number(e.search.get(`channel_id`)||`0`),msgID:Number(e.search.get(`msg_id`)||`0`),navigate:t}):e.path===`/messages/groups`?(0,W.jsx)(pr,{navigate:t}):e.path===`/messages`||e.path===`/messages/private`?(0,W.jsx)(hr,{navigate:t}):(0,W.jsx)(cr,{navigate:t})}function Vi(){let[e,t]=(0,g.useState)(void 0),[n,r]=(0,g.useState)(()=>Qt());(0,g.useEffect)(()=>{let e=()=>r(Qt());return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),(0,g.useEffect)(()=>{k.session().then(e=>t(e)).catch(()=>t(null))},[]);let i=e=>{window.history.pushState(null,``,e),r(Qt())};return e===void 0?(0,W.jsx)(ln,{}):e===null?(0,W.jsx)(fn,{onLogin:t}):(0,W.jsx)(Gt,{permissions:e.permissions??[],hideThirdPartyVerification:e.hide_third_party_verification??!0,children:(0,W.jsx)(un,{actor:e.actor,build:e.build,route:n,navigate:i,onLogout:()=>t(null),children:(0,W.jsx)(Bi,{route:n,navigate:i})})})}_.createRoot(document.getElementById(`root`)).render((0,W.jsx)(g.StrictMode,{children:(0,W.jsx)(rn,{children:(0,W.jsx)(Vi,{})})})); |