1var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t,n)=>()=>{if(n)throw n[0];try{return e&&(t=e(e=0)),t}catch(e){throw n=[e],e}},s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),c=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},l=(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},u=(n,r,o)=>(o=n==null?{}:e(i(n)),l(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),d=e=>a.call(e,`module.exports`)?e[`module.exports`]:l(t({},`__esModule`,{value:!0}),e),f=(e=>typeof require<`u`?require:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof require<`u`?require:e)[t]}):e)(function(e){if(typeof require<`u`)return require.apply(this,arguments);throw Error('Calling `require` for "'+e+"\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.")});(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),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var p=s((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},I={ReactCurrentDispatcher:P,ReactCurrentBatchConfig:F,ReactCurrentOwner:C};function ee(){throw Error(`act(...) is not supported in production builds of React.`)}
vendor: 7,859 bytes, line 1
1e.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=I,e.act=ee,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=ee,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`})),m=s(((e,t)=>{t.exports=p()})),h=s((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}}}})),g=s(((e,t)=>{t.exports=h()})),_=s((e=>{var t=m(),n=g();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,u=/^[: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]*$/,d={},f={};function p(e){return l.call(f,e)?!0:l.call(d,e)?!1:u.test(e)?f[e]=!0:(d[e]=!0,!1)}function h(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||h(e,t,n,r))return!0;
vendor: 23,547 bytes, lines 1-5
1if(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?p(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``: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`),I=Symbol.for(`react.offscreen`),ee=Symbol.iterator;function L(e){return typeof e!=`object`||!e?null:(e=ee&&e[ee]||e[`@@iterator`],typeof e==`function`?e:null)}var R=Object.assign,z;function B(e){if(z===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||``}return` 2`+z+e}var V=!1;function te(e,t){if(!e||V)return``;V=!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(` 3`),a=r.stack.split(` 4`),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=` 5`+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{V=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?B(e):``}function ne(e){switch(e.tag){case 5:return B(e.type);case 16:return B(`Lazy`);case 13:return B(`Suspense`);case 19:return B(`SuspenseList`);case 0:case 2:case 15:return e=te(e.type,!1),e;case 11:return e=te(e.type.render,!1),e;case 1:return e=te(e.type,!0),e;default:return``}}function re(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?re(e.type)||`Memo`:t;case F:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}function ie(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 re(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 ae(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function oe(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function se(e){var t=oe(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 ce(e){e._valueTracker||=se(e)}function H(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=oe(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function le(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 ue(e,t){var n=t.checked;return R({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function de(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=ae(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 fe(e,t){t=t.checked,t!=null&&S(e,`checked`,t,!1)}function pe(e,t){fe(e,t);var n=ae(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`)?me(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&me(e,t.type,ae(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function U(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 me(e,t,n){(t!==`number`||le(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var he=Array.isArray;function ge(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=``+ae(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 _e(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return R({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function ve(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(he(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:ae(n)}}function ye(e,t){var n=ae(t.value),r=ae(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 be(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function xe(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 Se(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?xe(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Ce,we=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(Ce||=document.createElement(`div`),Ce.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Te(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ee={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},De=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Ee).forEach(function(e){De.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ee[t]=Ee[e]})});function Oe(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Ee.hasOwnProperty(e)&&Ee[e]?(``+t).trim():t+`px`}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Oe(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Ae=R({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 je(e,t){if(t){if(Ae[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 Me(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 Ne=null;function Pe(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Fe=null,Ie=null,Le=null;function Re(e){if(e=Ii(e)){if(typeof Fe!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Ri(t),Fe(e.stateNode,e.type,t))}}function ze(e){Ie?Le?Le.push(e):Le=[e]:Ie=e}function Be(){if(Ie){var e=Ie,t=Le;if(Le=Ie=null,Re(e),t)for(e=0;e<t.length;e++)Re(t[e])}}function Ve(e,t){return e(t)}function He(){}var Ue=!1;function We(e,t,n){if(Ue)return e(t,n);Ue=!0;try{return Ve(e,t,n)}finally{Ue=!1,(Ie!==null||Le!==null)&&(He(),Be())}}function Ge(e,t){var n=e.stateNode;if(n===null)return null;var i=Ri(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 Ke=!1;if(c)try{var qe={};Object.defineProperty(qe,"passive",{get:function(){Ke=!0}}),window.addEventListener(`test`,qe,qe),window.removeEventListener(`test`,qe,qe)}catch{Ke=!1}function Je(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 Ye=!1,Xe=null,Ze=!1,Qe=null,$e={onError:function(e){Ye=!0,Xe=e}};function et(e,t,n,r,i,a,o,s,c){Ye=!1,Xe=null,Je.apply($e,arguments)}function tt(e,t,n,i,a,o,s,c,l){if(et.apply(this,arguments),Ye){if(Ye){var u=Xe;Ye=!1,Xe=null}else throw Error(r(198));Ze||(Ze=!0,Qe=u)}}function nt(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 rt(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 it(e){if(nt(e)!==e)throw Error(r(188))}function at(e){var t=e.alternate;if(!t){if(t=nt(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 it(a),e;if(o===i)return it(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 ot(e){return e=at(e),e===null?null:st(e)}function st(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=st(e);if(t!==null)return t;e=e.sibling}return null}var ct=n.unstable_scheduleCallback,lt=n.unstable_cancelCallback,ut=n.unstable_shouldYield,dt=n.unstable_requestPaint,ft=n.unstable_now,pt=n.unstable_getCurrentPriorityLevel,mt=n.unstable_ImmediatePriority,ht=n.unstable_UserBlockingPriority,gt=n.unstable_NormalPriority,_t=n.unstable_LowPriority,vt=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 Mt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Nt(){var e=Et;return Et<<=1,!(Et&4194240)&&(Et=64),e}function Pt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ft(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 It(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 Lt(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 Rt=0;function zt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Bt,Vt,Ht,Ut,Wt,Gt=!1,Kt=[],qt=null,Jt=null,Yt=null,Xt=new Map,W=new Map,Zt=[],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 $t(e,t){switch(e){case`focusin`:case`focusout`:qt=null;break;case`dragenter`:case`dragleave`:Jt=null;break;case`mouseover`:case`mouseout`:Yt=null;break;case`pointerover`:case`pointerout`:Xt.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:W.delete(t.pointerId)}}function en(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=Ii(t),t!==null&&Vt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function tn(e,t,n,r,i){switch(t){case`focusin`:return qt=en(qt,e,t,n,r,i),!0;case`dragenter`:return Jt=en(Jt,e,t,n,r,i),!0;case`mouseover`:return Yt=en(Yt,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Xt.set(a,en(Xt.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,W.set(a,en(W.get(a)||null,e,t,n,r,i)),!0}return!1}function nn(e){var t=K(e.target);if(t!==null){var n=nt(t);if(n!==null){if(t=n.tag,t===13){if(t=rt(n),t!==null){e.blockedOn=t,Wt(e.priority,function(){Ht(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 rn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ne=r,n.target.dispatchEvent(r),Ne=null}else return t=Ii(n),t!==null&&Vt(t),e.blockedOn=n,!1;t.shift()}return!0}function an(e,t,n){rn(e)&&n.delete(t)}function on(){Gt=!1,qt!==null&&rn(qt)&&(qt=null),Jt!==null&&rn(Jt)&&(Jt=null),Yt!==null&&rn(Yt)&&(Yt=null),Xt.forEach(an),W.forEach(an)}function sn(e,t){e.blockedOn===t&&(e.blockedOn=null,Gt||(Gt=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,on)))}function cn(e){function t(t){return sn(t,e)}if(0<Kt.length){sn(Kt[0],e);for(var n=1;n<Kt.length;n++){var r=Kt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(qt!==null&&sn(qt,e),Jt!==null&&sn(Jt,e),Yt!==null&&sn(Yt,e),Xt.forEach(t),W.forEach(t),n=0;n<Zt.length;n++)r=Zt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Zt.length&&(n=Zt[0],n.blockedOn===null);)nn(n),n.blockedOn===null&&Zt.shift()}var ln=C.ReactCurrentBatchConfig,un=!0;function dn(e,t,n,r){var i=Rt,a=ln.transition;ln.transition=null;try{Rt=1,pn(e,t,n,r)}finally{Rt=i,ln.transition=a}}function fn(e,t,n,r){var i=Rt,a=ln.transition;ln.transition=null;try{Rt=4,pn(e,t,n,r)}finally{Rt=i,ln.transition=a}}function pn(e,t,n,r){if(un){var i=hn(e,t,n,r);if(i===null)li(e,t,r,mn,n),$t(e,r);else if(tn(i,e,t,n,r))r.stopPropagation();else if($t(e,r),t&4&&-1<Qt.indexOf(e)){for(;i!==null;){var a=Ii(i);if(a!==null&&Bt(a),a=hn(e,t,n,r),a===null&&li(e,t,r,mn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else li(e,t,r,null,n)}}var mn=null;function hn(e,t,n,r){if(mn=null,e=Pe(r),e=K(e),e!==null)if(t=nt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=rt(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 mn=e,null}function gn(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`
vendor: 5,031 bytes, line 5
5: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(pt()){case mt:return 1;case ht:return 4;case gt:case _t:return 16;case vt:return 536870912;default:return 16}default:return 16}}var _n=null,vn=null,yn=null;function bn(){if(yn)return yn;var e,t=vn,n=t.length,r,i=`value`in _n?_n.value:_n.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 yn=i.slice(e,1<r?1-r:void 0)}function xn(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 Sn(){return!0}function Cn(){return!1}function wn(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)?Sn:Cn,this.isPropagationStopped=Cn,this}return R(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=Sn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Sn)},persist:function(){},isPersistent:Sn}),t}var Tn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},En=wn(Tn),Dn=R({},Tn,{view:0,detail:0}),On=wn(Dn),kn,An,jn,Mn=R({},Dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Un,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!==jn&&(jn&&e.type===`mousemove`?(kn=e.screenX-jn.screenX,An=e.screenY-jn.screenY):An=kn=0,jn=e),kn)},movementY:function(e){return`movementY`in e?e.movementY:An}}),Nn=wn(Mn),Pn=wn(R({},Mn,{dataTransfer:0})),Fn=wn(R({},Dn,{relatedTarget:0})),In=wn(R({},Tn,{animationName:0,elapsedTime:0,pseudoElement:0})),Ln=wn(R({},Tn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Rn=wn(R({},Tn,{data:0})),zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Bn={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`},Vn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Hn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Vn[e])?!!t[e]:!1}function Un(){return Hn}var Wn=wn(R({},Dn,{key:function(e){if(e.key){var t=zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=xn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Bn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Un,charCode:function(e){return e.type===`keypress`?xn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?xn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Gn=wn(R({},Mn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Kn=wn(R({},Dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Un})),qn=wn(R({},Tn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Jn=wn(R({},Mn,{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}
vendor: 96,998 bytes, lines 5-8
5)),Yn=[9,13,27,32],Xn=c&&`CompositionEvent`in window,Zn=null;c&&`documentMode`in document&&(Zn=document.documentMode);var Qn=c&&`TextEvent`in window&&!Zn,$n=c&&(!Xn||Zn&&8<Zn&&11>=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var ir=!1;function ar(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function or(e,t){if(ir)return e===`compositionend`||!Xn&&nr(e,t)?(e=bn(),yn=vn=_n=null,ir=!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 $n&&t.locale!==`ko`?null:t.data;default:return null}}var sr={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 cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!sr[e.type]:t===`textarea`}function lr(e,t,n,r){ze(r),t=ui(t,`onChange`),0<t.length&&(n=new En(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var ur=null,dr=null;function fr(e){ri(e,0)}function pr(e){if(H(Li(e)))return e}function mr(e,t){if(e===`change`)return t}var hr=!1;if(c){var gr;if(c){var _r=`oninput`in document;if(!_r){var vr=document.createElement(`div`);vr.setAttribute(`oninput`,`return;`),_r=typeof vr.oninput==`function`}gr=_r}else gr=!1;hr=gr&&(!document.documentMode||9<document.documentMode)}function yr(){ur&&(ur.detachEvent(`onpropertychange`,br),dr=ur=null)}function br(e){if(e.propertyName===`value`&&pr(dr)){var t=[];lr(t,dr,e,Pe(e)),We(fr,t)}}function xr(e,t,n){e===`focusin`?(yr(),ur=t,dr=n,ur.attachEvent(`onpropertychange`,br)):e===`focusout`&&yr()}function Sr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return pr(dr)}function Cr(e,t){if(e===`click`)return pr(t)}function wr(e,t){if(e===`input`||e===`change`)return pr(t)}function Tr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Er=typeof Object.is==`function`?Object.is:Tr;function Dr(e,t){if(Er(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)||!Er(e[i],t[i]))return!1}return!0}function Or(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kr(e,t){var n=Or(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=Or(n)}}function Ar(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ar(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jr(){for(var e=window,t=le();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=le(e.document)}return t}function Mr(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 Nr(e){var t=jr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ar(n.ownerDocument.documentElement,n)){if(r!==null&&Mr(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=kr(n,a);var o=kr(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 Pr=c&&`documentMode`in document&&11>=document.documentMode,Fr=null,Ir=null,Lr=null,Rr=!1;function zr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Rr||Fr==null||Fr!==le(r)||(r=Fr,`selectionStart`in r&&Mr(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}),Lr&&Dr(Lr,r)||(Lr=r,r=ui(Ir,`onSelect`),0<r.length&&(t=new En(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Fr)))}function Br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Vr={animationend:Br(`Animation`,`AnimationEnd`),animationiteration:Br(`Animation`,`AnimationIteration`),animationstart:Br(`Animation`,`AnimationStart`),transitionend:Br(`Transition`,`TransitionEnd`)},Hr={},Ur={};c&&(Ur=document.createElement(`div`).style,`AnimationEvent`in window||(delete Vr.animationend.animation,delete Vr.animationiteration.animation,delete Vr.animationstart.animation),`TransitionEvent`in window||delete Vr.transitionend.transition);function Wr(e){if(Hr[e])return Hr[e];if(!Vr[e])return e;var t=Vr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ur)return Hr[e]=t[n];return e}var Gr=Wr(`animationend`),Kr=Wr(`animationiteration`),qr=Wr(`animationstart`),Jr=Wr(`transitionend`),Yr=new Map,Xr=`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 Zr(e,t){Yr.set(e,t),o(t,[e])}for(var Qr=0;Qr<Xr.length;Qr++){var $r=Xr[Qr];Zr($r.toLowerCase(),`on`+($r[0].toUpperCase()+$r.slice(1)))}Zr(Gr,`onAnimationEnd`),Zr(Kr,`onAnimationIteration`),Zr(qr,`onAnimationStart`),Zr(`dblclick`,`onDoubleClick`),Zr(`focusin`,`onFocus`),Zr(`focusout`,`onBlur`),Zr(Jr,`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 ei=`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(` `),ti=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(ei));function ni(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,tt(r,t,void 0,e),e.currentTarget=null}function ri(e,t){t=!!(t&4);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;ni(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;ni(i,s,l),a=c}}}if(Ze)throw e=Qe,Ze=!1,Qe=null,e}function ii(e,t){var n=t[Ni];n===void 0&&(n=t[Ni]=new Set);var r=e+`__bubble`;n.has(r)||(ci(t,e,2,!1),n.add(r))}function ai(e,t,n){var r=0;t&&(r|=4),ci(n,e,r,t)}var oi=`_reactListening`+Math.random().toString(36).slice(2);function si(e){if(!e[oi]){e[oi]=!0,i.forEach(function(t){t!==`selectionchange`&&(ti.has(t)||ai(t,!1,e),ai(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[oi]||(t[oi]=!0,ai(`selectionchange`,!1,t))}}function ci(e,t,n,r){switch(gn(t)){case 1:var i=dn;break;case 4:i=fn;break;default:i=pn}n=i.bind(null,t,n,e),i=void 0,!Ke||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 li(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=K(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}We(function(){var r=a,i=Pe(n),o=[];a:{var s=Yr.get(e);if(s!==void 0){var c=En,l=e;switch(e){case`keypress`:if(xn(n)===0)break a;case`keydown`:case`keyup`:c=Wn;break;case`focusin`:l=`focus`,c=Fn;break;case`focusout`:l=`blur`,c=Fn;break;case`beforeblur`:case`afterblur`:c=Fn;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=Nn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Pn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Kn;break;case Gr:case Kr:case qr:c=In;break;case Jr:c=qn;break;case`scroll`:c=On;break;case`wheel`:c=Jn;break;case`copy`:case`cut`:case`paste`:c=Ln;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=Gn}var u=!!(t&4),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=Ge(p,f),h!=null&&u.push(G(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!==Ne&&(l=n.relatedTarget||n.fromElement)&&(K(l)||l[Mi]))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?K(l):null,l!==null&&(d=nt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Nn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=Gn,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Li(c),m=l==null?s:Li(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,K(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=di(m))p++;for(m=0,h=f;h;h=di(h))m++;for(;0<p-m;)u=di(u),p--;for(;0<m-p;)f=di(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=di(u),f=di(f)}u=null}else u=null;c!==null&&fi(o,s,c,u,!1),l!==null&&d!==null&&fi(o,d,l,u,!0)}}a:{if(s=r?Li(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=mr;else if(cr(s))if(hr)g=wr;else{g=Sr;var _=xr}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Cr);if(g&&=g(e,r)){lr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&me(s,`number`,s.value)}switch(_=r?Li(r):window,e){case`focusin`:(cr(_)||_.contentEditable===`true`)&&(Fr=_,Ir=r,Lr=null);break;case`focusout`:Lr=Ir=Fr=null;break;case`mousedown`:Rr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Rr=!1,zr(o,n,i);break;case`selectionchange`:if(Pr)break;case`keydown`:case`keyup`:zr(o,n,i)}var v;if(Xn)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 ir?nr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&($n&&n.locale!==`ko`&&(ir||y!==`onCompositionStart`?y===`onCompositionEnd`&&ir&&(v=bn()):(_n=i,vn=`value`in _n?_n.value:_n.textContent,ir=!0)),_=ui(r,y),0<_.length&&(y=new Rn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=rr(n),v!==null&&(y.data=v)))),(v=Qn?ar(e,n):or(e,n))&&(r=ui(r,`onBeforeInput`),0<r.length&&(i=new Rn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}ri(o,t)})}function G(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ui(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=Ge(e,n),a!=null&&r.unshift(G(e,a,i)),a=Ge(e,t),a!=null&&r.push(G(e,a,i))),e=e.return}return r}function di(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function fi(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=Ge(n,a),c!=null&&o.unshift(G(n,c,s))):i||(c=Ge(n,a),c!=null&&o.push(G(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var pi=/\r\n?/g,mi=/\u0000|\uFFFD/g;function hi(e){return(typeof e==`string`?e:``+e).replace(pi,` 6`).replace(mi,``)}function gi(e,t,n){if(t=hi(t),hi(e)!==t&&n)throw Error(r(425))}function _i(){}var vi=null,yi=null;function bi(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 xi=typeof setTimeout==`function`?setTimeout:void 0,Si=typeof clearTimeout==`function`?clearTimeout:void 0,Ci=typeof Promise==`function`?Promise:void 0,wi=typeof queueMicrotask==`function`?queueMicrotask:Ci===void 0?xi:function(e){return Ci.resolve(null).then(e).catch(Ti)};function Ti(e){setTimeout(function(){throw e})}function Ei(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),cn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++;n=i}while(n);cn(t)}function Di(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 Oi(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 ki=Math.random().toString(36).slice(2),Ai=`__reactFiber$`+ki,ji=`__reactProps$`+ki,Mi=`__reactContainer$`+ki,Ni=`__reactEvents$`+ki,Pi=`__reactListeners$`+ki,Fi=`__reactHandles$`+ki;function K(e){var t=e[Ai];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Mi]||n[Ai]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Oi(e);e!==null;){if(n=e[Ai])return n;e=Oi(e)}return t}e=n,n=e.parentNode}return null}function Ii(e){return e=e[Ai]||e[Mi],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Li(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Ri(e){return e[ji]||null}var zi=[],Bi=-1;function Vi(e){return{current:e}}function Hi(e){0>Bi||(e.current=zi[Bi],zi[Bi]=null,Bi--)}function Ui(e,t){Bi++,zi[Bi]=e.current,e.current=t}var Wi={},Gi=Vi(Wi),Ki=Vi(!1),qi=Wi;function Ji(e,t){var n=e.type.contextTypes;if(!n)return Wi;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 Yi(e){return e=e.childContextTypes,e!=null}function Xi(){Hi(Ki),Hi(Gi)}function Zi(e,t,n){if(Gi.current!==Wi)throw Error(r(168));Ui(Gi,t),Ui(Ki,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,ie(e)||`Unknown`,a));return R({},n,i)}function $i(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wi,qi=Gi.current,Ui(Gi,e),Ui(Ki,Ki.current),!0}function ea(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=Qi(e,t,qi),i.__reactInternalMemoizedMergedChildContext=e,Hi(Ki),Hi(Gi),Ui(Gi,e)):Hi(Ki),Ui(Ki,n)}var ta=null,na=!1,ra=!1;function ia(e){ta===null?ta=[e]:ta.push(e)}function aa(e){na=!0,ia(e)}function oa(){if(!ra&&ta!==null){ra=!0;var e=0,t=Rt;try{var n=ta;for(Rt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ta=null,na=!1}catch(t){throw ta!==null&&(ta=ta.slice(e+1)),ct(mt,oa),t}finally{Rt=t,ra=!1}}return null}var sa=[],ca=0,la=null,ua=0,da=[],fa=0,pa=null,ma=1,ha=``;function ga(e,t){sa[ca++]=ua,sa[ca++]=la,la=e,ua=t}function _a(e,t,n){da[fa++]=ma,da[fa++]=ha,da[fa++]=pa,pa=e;var r=ma;e=ha;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,ma=1<<32-St(t)+i|n<<i|r,ha=a+e}else ma=1<<a|n<<i|r,ha=e}function va(e){e.return!==null&&(ga(e,1),_a(e,1,0))}function ya(e){for(;e===la;)la=sa[--ca],sa[ca]=null,ua=sa[--ca],sa[ca]=null;for(;e===pa;)pa=da[--fa],da[fa]=null,ha=da[--fa],da[fa]=null,ma=da[--fa],da[fa]=null}var ba=null,xa=null,Sa=!1,Ca=null;function wa(e,t){var n=Zl(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 Ta(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&&(e.stateNode=t,ba=e,xa=Di(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t!==null&&(e.stateNode=t,ba=e,xa=null,!0);case 13:return t=t.nodeType===8?t:null,t!==null&&(n=pa===null?null:{id:ma,overflow:ha},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=Zl(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,ba=e,xa=null,!0);default:return!1}}function Ea(e){return!!(e.mode&1)&&!(e.flags&128)}function Da(e){if(Sa){var t=xa;if(t){var n=t;if(!Ta(e,t)){if(Ea(e))throw Error(r(418));t=Di(n.nextSibling);var i=ba;t&&Ta(e,t)?wa(i,n):(e.flags=e.flags&-4097|2,Sa=!1,ba=e)}}else{if(Ea(e))throw Error(r(418));e.flags=e.flags&-4097|2,Sa=!1,ba=e}}}function Oa(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;ba=e}function ka(e){if(e!==ba)return!1;if(!Sa)return Oa(e),Sa=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!bi(e.type,e.memoizedProps)),t&&=xa){if(Ea(e))throw Aa(),Error(r(418));for(;t;)wa(e,t),t=Di(t.nextSibling)}if(Oa(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){xa=Di(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}xa=null}}else xa=ba?Di(e.stateNode.nextSibling):null;return!0}function Aa(){for(var e=xa;e;)e=Di(e.nextSibling)}function ja(){xa=ba=null,Sa=!1}function Ma(e){Ca===null?Ca=[e]:Ca.push(e)}var Na=C.ReactCurrentBatchConfig;function Pa(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 Fa(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Ia(e){var t=e._init;return t(e._payload)}function La(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=eu(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=iu(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&&Ia(i)===t.type)?(r=a(t,n.props),r.ref=Pa(e,t,n),r.return=e,r):(r=tu(n.type,n.key,n.props,null,e.mode,r),r.ref=Pa(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=au(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=nu(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=iu(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case w:return n=tu(t.type,t.key,t.props,null,e.mode,n),n.ref=Pa(e,null,t),n.return=e,n;case T:return t=au(t,e.mode,n),t.return=e,t;case F:var r=t._init;return f(e,r(t._payload),n)}if(he(t)||L(t))return t=nu(t,e.mode,n,null),t.return=e,t;Fa(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(he(n)||L(n))return i===null?d(e,t,n,r,null):null;Fa(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(he(r)||L(r))return e=e.get(n)||null,d(t,e,r,i,null);Fa(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),Sa&&ga(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 Sa&&ga(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)}),Sa&&ga(r,h),l}function g(a,s,c,l){var u=L(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),Sa&&ga(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 Sa&&ga(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)}),Sa&&ga(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&&Ia(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=Pa(e,l,i),r.return=e,e=r;break a}n(e,l);break}t(e,l),l=l.sibling}i.type===E?(r=nu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=tu(i.type,i.key,i.props,null,e.mode,o),o.ref=Pa(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}t(e,r),r=r.sibling}r=au(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(he(i))return h(e,r,i,o);if(L(i))return g(e,r,i,o);Fa(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=iu(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Ra=La(!0),za=La(!1),Ba=Vi(null),Va=null,Ha=null,Ua=null;function Wa(){Ua=Ha=Va=null}function Ga(e){var t=Ba.current;Hi(Ba),e._currentValue=t}function Ka(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 qa(e,t){Va=e,Ua=Ha=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ls=!0),e.firstContext=null)}function Ja(e){var t=e._currentValue;if(Ua!==e)if(e={context:e,memoizedValue:t,next:null},Ha===null){if(Va===null)throw Error(r(308));Ha=e,Va.dependencies={lanes:0,firstContext:e}}else Ha=Ha.next=e;return t}var Ya=null;function Xa(e){Ya===null?Ya=[e]:Ya.push(e)}function Za(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,Xa(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 $a=!1;function eo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function to(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 no(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ro(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Kc&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,Xa(r)):(t.next=i.next,i.next=t),r.interleaved=t,Qa(e,n)}function io(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,Lt(e,n)}}function ao(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 oo(e,t,n,r){var i=e.updateQueue;$a=!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=R({},d,f);break a;case 2:$a=!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);el|=o,e.lanes=o,e.memoizedState=d}}function so(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 co={},lo=Vi(co),uo=Vi(co),fo=Vi(co);function po(e){if(e===co)throw Error(r(174));return e}function mo(e,t){switch(Ui(fo,t),Ui(uo,e),Ui(lo,co),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Se(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Se(t,e)}Hi(lo),Ui(lo,t)}function ho(){Hi(lo),Hi(uo),Hi(fo)}function go(e){po(fo.current);var t=po(lo.current),n=Se(t,e.type);t!==n&&(Ui(uo,e),Ui(lo,n))}function _o(e){uo.current===e&&(Hi(lo),Hi(uo))}var vo=Vi(0);function yo(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 bo=[];function xo(){for(var e=0;e<bo.length;e++)bo[e]._workInProgressVersionPrimary=null;bo.length=0}var So=C.ReactCurrentDispatcher,Co=C.ReactCurrentBatchConfig,wo=0,To=null,Eo=null,Do=null,Oo=!1,ko=!1,Ao=0,jo=0;function Mo(){throw Error(r(321))}function No(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}function Po(e,t,n,i,a,o){if(wo=o,To=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,So.current=e===null||e.memoizedState===null?_s:vs,e=n(i,a),ko){o=0;do{if(ko=!1,Ao=0,25<=o)throw Error(r(301));o+=1,Do=Eo=null,t.updateQueue=null,So.current=ys,e=n(i,a)}while(ko)}if(So.current=gs,t=Eo!==null&&Eo.next!==null,wo=0,Do=Eo=To=null,Oo=!1,t)throw Error(r(300));return e}function Fo(){var e=Ao!==0;return Ao=0,e}function Io(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Do===null?To.memoizedState=Do=e:Do=Do.next=e,Do}function Lo(){if(Eo===null){var e=To.alternate;e=e===null?null:e.memoizedState}else e=Eo.next;var t=Do===null?To.memoizedState:Do.next;if(t!==null)Do=t,Eo=e;else{if(e===null)throw Error(r(310));Eo=e,e={memoizedState:Eo.memoizedState,baseState:Eo.baseState,baseQueue:Eo.baseQueue,queue:Eo.queue,next:null},Do===null?To.memoizedState=Do=e:Do=Do.next=e}return Do}function Ro(e,t){return typeof t==`function`?t(e):t}function zo(e){var t=Lo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=Eo,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((wo&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,To.lanes|=d,el|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Er(i,t.memoizedState)||(Ls=!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,To.lanes|=o,el|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Bo(e){var t=Lo(),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);Er(o,t.memoizedState)||(Ls=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function Vo(){}function Ho(e,t){var n=To,i=Lo(),a=t(),o=!Er(i.memoizedState,a);if(o&&(i.memoizedState=a,Ls=!0),i=i.queue,es(Go.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Do!==null&&Do.memoizedState.tag&1){if(n.flags|=2048,Yo(9,Wo.bind(null,n,i,a,t),void 0,null),qc===null)throw Error(r(349));wo&30||Uo(n,t,a)}return a}function Uo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=To.updateQueue,t===null?(t={lastEffect:null,stores:null},To.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Wo(e,t,n,r){t.value=n,t.getSnapshot=r,Ko(t)&&qo(e)}function Go(e,t,n){return n(function(){Ko(t)&&qo(e)})}function Ko(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Er(e,n)}catch{return!0}}function qo(e){var t=Qa(e,1);t!==null&&bl(t,e,1,-1)}function Jo(e){var t=Io();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ro,lastRenderedState:e},t.queue=e,e=e.dispatch=fs.bind(null,To,e),[t.memoizedState,e]}function Yo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=To.updateQueue,t===null?(t={lastEffect:null,stores:null},To.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 Xo(){return Lo().memoizedState}function Zo(e,t,n,r){var i=Io();To.flags|=e,i.memoizedState=Yo(1|t,n,void 0,r===void 0?null:r)}function Qo(e,t,n,r){var i=Lo();r=r===void 0?null:r;var a=void 0;if(Eo!==null){var o=Eo.memoizedState;if(a=o.destroy,r!==null&&No(r,o.deps)){i.memoizedState=Yo(t,n,a,r);return}}To.flags|=e,i.memoizedState=Yo(1|t,n,a,r)}function $o(e,t){return Zo(8390656,8,e,t)}function es(e,t){return Qo(2048,8,e,t)}function ts(e,t){return Qo(4,2,e,t)}function ns(e,t){return Qo(4,4,e,t)}function rs(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 is(e,t,n){return n=n==null?null:n.concat([e]),Qo(4,4,rs.bind(null,t,e),n)}function as(){}function os(e,t){var n=Lo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&No(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ss(e,t){var n=Lo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&No(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function cs(e,t,n){return wo&21?(Er(n,t)||(n=Nt(),To.lanes|=n,el|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ls=!0),e.memoizedState=n)}function ls(e,t){var n=Rt;Rt=n!==0&&4>n?n:4,e(!0);var r=Co.transition;Co.transition={};try{e(!1),t()}finally{Rt=n,Co.transition=r}}function us(){return Lo().memoizedState}function ds(e,t,n){var r=yl(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ps(e))ms(t,n);else if(n=Za(e,t,n,r),n!==null){var i=vl();bl(n,e,r,i),hs(n,t,r)}}function fs(e,t,n){var r=yl(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ps(e))ms(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,Er(s,o)){var c=t.interleaved;c===null?(i.next=i,Xa(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=Za(e,t,i,r),n!==null&&(i=vl(),bl(n,e,r,i),hs(n,t,r))}}function ps(e){var t=e.alternate;return e===To||t!==null&&t===To}function ms(e,t){ko=Oo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Lt(e,n)}}var gs={readContext:Ja,useCallback:Mo,useContext:Mo,useEffect:Mo,useImperativeHandle:Mo,useInsertionEffect:Mo,useLayoutEffect:Mo,useMemo:Mo,useReducer:Mo,useRef:Mo,useState:Mo,useDebugValue:Mo,useDeferredValue:Mo,useTransition:Mo,useMutableSource:Mo,useSyncExternalStore:Mo,useId:Mo,unstable_isNewReconciler:!1},_s={readContext:Ja,useCallback:function(e,t){return Io().memoizedState=[e,t===void 0?null:t],e},useContext:Ja,useEffect:$o,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),Zo(4194308,4,rs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zo(4194308,4,e,t)},useInsertionEffect:function(e,t){return Zo(4,2,e,t)},useMemo:function(e,t){var n=Io();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Io();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=ds.bind(null,To,e),[r.memoizedState,e]},useRef:function(e){var t=Io();return e={current:e},t.memoizedState=e},useState:Jo,useDebugValue:as,useDeferredValue:function(e){return Io().memoizedState=e},useTransition:function(){var e=Jo(!1),t=e[0];return e=ls.bind(null,e[1]),Io().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=To,a=Io();if(Sa){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),qc===null)throw Error(r(349));wo&30||Uo(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,$o(Go.bind(null,i,o,e),[e]),i.flags|=2048,Yo(9,Wo.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Io(),t=qc.identifierPrefix;if(Sa){var n=ha,r=ma;n=(r&~(1<<32-St(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Ao++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=jo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},vs={readContext:Ja,useCallback:os,useContext:Ja,useEffect:es,useImperativeHandle:is,useInsertionEffect:ts,useLayoutEffect:ns,useMemo:ss,useReducer:zo,useRef:Xo,useState:function(){return zo(Ro)},useDebugValue:as,useDeferredValue:function(e){return cs(Lo(),Eo.memoizedState,e)},useTransition:function(){return[zo(Ro)[0],Lo().memoizedState]},useMutableSource:Vo,useSyncExternalStore:Ho,useId:us,unstable_isNewReconciler:!1},ys={readContext:Ja,useCallback:os,useContext:Ja,useEffect:es,useImperativeHandle:is,useInsertionEffect:ts,useLayoutEffect:ns,useMemo:ss,useReducer:Bo,useRef:Xo,useState:function(){return Bo(Ro)},useDebugValue:as,useDeferredValue:function(e){var t=Lo();return Eo===null?t.memoizedState=e:cs(t,Eo.memoizedState,e)},useTransition:function(){return[Bo(Ro)[0],Lo().memoizedState]},useMutableSource:Vo,useSyncExternalStore:Ho,useId:us,unstable_isNewReconciler:!1};function bs(e,t){if(e&&e.defaultProps){for(var n in t=R({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function xs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:R({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ss={isMounted:function(e){return(e=e._reactInternals)?nt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vl(),i=yl(e),a=no(r,i);a.payload=t,n!=null&&(a.callback=n),t=ro(e,a,i),t!==null&&(bl(t,e,i,r),io(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vl(),i=yl(e),a=no(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=ro(e,a,i),t!==null&&(bl(t,e,i,r),io(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vl(),r=yl(e),i=no(n,r);i.tag=2,t!=null&&(i.callback=t),t=ro(e,i,r),t!==null&&(bl(t,e,r,n),io(t,e,r))}};function Cs(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?!Dr(n,r)||!Dr(i,a):!0}function ws(e,t,n){var r=!1,i=Wi,a=t.contextType;return typeof a==`object`&&a?a=Ja(a):(i=Yi(t)?qi:Gi.current,r=t.contextTypes,a=(r=r!=null)?Ji(e,i):Wi),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ss,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ts(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&&Ss.enqueueReplaceState(t,t.state,null)}function Es(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},eo(e);var a=t.contextType;typeof a==`object`&&a?i.context=Ja(a):(a=Yi(t)?qi:Gi.current,i.context=Ji(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(xs(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&&Ss.enqueueReplaceState(i,i.state,null),oo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Ds(e,t){try{var n=``,r=t;do n+=ne(r),r=r.return;while(r);var i=n}catch(e){i=` 7Error generating stack: `+e.message+` 8`+e.stack}return{value:e,source:t,stack:i,digest:null}}function Os(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ks(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var As=typeof WeakMap==`function`?WeakMap:Map;function js(e,t,n){n=no(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){cl||(cl=!0,ll=r),ks(e,t)},n}function Ms(e,t,n){n=no(-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(){ks(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){ks(e,t),typeof r!=`function`&&(ul===null?ul=new Set([this]):ul.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Ns(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new As;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=Gl.bind(null,e,t,n),t.then(e,e))}function Ps(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Fs(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=no(-1,1),t.tag=2,ro(n,t,1))),n.lanes|=1),e)}var Is=C.ReactCurrentOwner,Ls=!1;function Rs(e,t,n,r){t.child=e===null?za(t,null,n,r):Ra(t,e.child,n,r)}function zs(e,t,n,r,i){n=n.render;var a=t.ref;return qa(t,i),r=Po(e,t,n,r,a,i),n=Fo(),e!==null&&!Ls?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ac(e,t,i)):(Sa&&n&&va(t),t.flags|=1,Rs(e,t,r,i),t.child)}function Bs(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,Vs(e,t,a,r,i)):(e=tu(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?Dr:n,n(o,r)&&e.ref===t.ref)return ac(e,t,i)}return t.flags|=1,e=eu(a,r),e.ref=t.ref,e.return=t,t.child=e}function Vs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Dr(a,r)&&e.ref===t.ref)if(Ls=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Ls=!0);else return t.lanes=e.lanes,ac(e,t,i)}return Ws(e,t,n,r,i)}function Hs(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},Ui(Zc,Xc),Xc|=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,Ui(Zc,Xc),Xc|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,Ui(Zc,Xc),Xc|=r}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),Ui(Zc,Xc),Xc|=r;return Rs(e,t,i,n),t.child}function Us(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ws(e,t,n,r,i){var a=Yi(n)?qi:Gi.current;return a=Ji(t,a),qa(t,i),n=Po(e,t,n,r,a,i),r=Fo(),e!==null&&!Ls?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ac(e,t,i)):(Sa&&r&&va(t),t.flags|=1,Rs(e,t,n,i),t.child)}function Gs(e,t,n,r,i){if(Yi(n)){var a=!0;$i(t)}else a=!1;if(qa(t,i),t.stateNode===null)ic(e,t),ws(t,n,r),Es(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=Ja(l):(l=Yi(n)?qi:Gi.current,l=Ji(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)&&Ts(t,o,r,l),$a=!1;var f=t.memoizedState;o.state=f,oo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||Ki.current||$a?(typeof u==`function`&&(xs(t,n,u,r),c=t.memoizedState),(s=$a||Cs(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,to(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:bs(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=Ja(c):(c=Yi(n)?qi:Gi.current,c=Ji(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)&&Ts(t,o,r,c),$a=!1,f=t.memoizedState,o.state=f,oo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||Ki.current||$a?(typeof p==`function`&&(xs(t,n,p,r),m=t.memoizedState),(l=$a||Cs(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 Ks(e,t,n,r,a,i)}function Ks(e,t,n,r,i,a){Us(e,t);var o=!!(t.flags&128);if(!r&&!o)return i&&ea(t,n,!1),ac(e,t,a);r=t.stateNode,Is.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Ra(t,e.child,null,a),t.child=Ra(t,null,s,a)):Rs(e,t,s,a),t.memoizedState=r.state,i&&ea(t,n,!0),t.child}function qs(e){var t=e.stateNode;t.pendingContext?Zi(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Zi(e,t.context,!1),mo(e,t.containerInfo)}function Js(e,t,n,r,i){return ja(),Ma(i),t.flags|=256,Rs(e,t,n,r),t.child}var Ys={dehydrated:null,treeContext:null,retryLane:0};function Xs(e){return{baseLanes:e,cachePool:null,transitions:null}}function Zs(e,t,n){var r=t.pendingProps,i=vo.current,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(i&2)),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),Ui(vo,i&1),e===null)return Da(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.lanes=t.mode&1?e.data===`$!`?8:1073741824: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=ru(o,r,0,null),e=nu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Xs(n),t.memoizedState=Ys,e):Qs(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return ec(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=eu(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=nu(a,o,n,null),a.flags|=2):a=eu(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?Xs(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=Ys,r}return a=e.child,e=a.sibling,r=eu(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=ru({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function $s(e,t,n,r){return r!==null&&Ma(r),Ra(t,e.child,null,n),e=Qs(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ec(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Os(Error(r(422))),$s(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=ru({mode:`visible`,children:i.children},a,0,null),o=nu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Ra(t,e.child,null,s),t.child.memoizedState=Xs(s),t.memoizedState=Ys,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return $s(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=Os(o,i,void 0),$s(e,t,s,i)}if(c=(s&e.childLanes)!==0,Ls||c){if(i=qc,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),bl(i,e,a,-1))}return Pl(),i=Os(Error(r(421))),$s(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=ql.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,xa=Di(a.nextSibling),ba=t,Sa=!0,Ca=null,e!==null&&(da[fa++]=ma,da[fa++]=ha,da[fa++]=pa,ma=e.id,ha=e.overflow,pa=t),t=Qs(t,i.children),t.flags|=4096,t)}function tc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Ka(e.return,t,n)}function nc(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 rc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Rs(e,t,r.children,n),r=vo.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&&tc(e,n,t);else if(e.tag===19)tc(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(Ui(vo,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&&yo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),nc(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&&yo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}nc(t,!0,n,null,a);break;case`together`:nc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ic(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function ac(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),el|=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=eu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=eu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function oc(e,t,n){switch(t.tag){case 3:qs(t),ja();break;case 5:go(t);break;case 1:Yi(t.type)&&$i(t);break;case 4:mo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ui(Ba,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(Ui(vo,vo.current&1),e=ac(e,t,n),e===null?null:e.sibling):Zs(e,t,n):(Ui(vo,vo.current&1),t.flags|=128,null);Ui(vo,vo.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return rc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ui(vo,vo.current),r)break;return null;case 22:case 23:return t.lanes=0,Hs(e,t,n)}return ac(e,t,n)}var sc=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}},cc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,po(lo.current);var o=null;switch(n){case`input`:i=ue(e,i),r=ue(e,r),o=[];break;case`select`:i=R({},i,{value:void 0}),r=R({},r,{value:void 0}),o=[];break;case`textarea`:i=_e(e,i),r=_e(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=_i)}je(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`&&ii(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},lc=function(e,t,n,r){n!==r&&(t.flags|=4)};function uc(e,t){if(!Sa)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 dc(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 fc(e,t,n){var i=t.pendingProps;switch(ya(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dc(t),null;case 1:return Yi(t.type)&&Xi(),dc(t),null;case 3:return i=t.stateNode,ho(),Hi(Ki),Hi(Gi),xo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(ka(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ca!==null&&(wl(Ca),Ca=null))),dc(t),null;case 5:_o(t);var o=po(fo.current);if(n=t.type,e!==null&&t.stateNode!=null)cc(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 dc(t),null}if(e=po(lo.current),ka(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Ai]=t,i[ji]=s,e=!!(t.mode&1),n){case`dialog`:ii(`cancel`,i),ii(`close`,i);break;case`iframe`:case`object`:case`embed`:ii(`load`,i);break;case`video`:case`audio`:for(o=0;o<ei.length;o++)ii(ei[o],i);break;case`source`:ii(`error`,i);break;case`img`:case`image`:case`link`:ii(`error`,i),ii(`load`,i);break;case`details`:ii(`toggle`,i);break;case`input`:de(i,s),ii(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},ii(`invalid`,i);break;case`textarea`:ve(i,s),ii(`invalid`,i)}for(var c in je(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&gi(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&gi(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&ii(`scroll`,i)}switch(n){case`input`:ce(i),U(i,s,!0);break;case`textarea`:ce(i),be(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=_i)}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=xe(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[Ai]=t,e[ji]=i,sc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Me(n,i),n){case`dialog`:ii(`cancel`,e),ii(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:ii(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<ei.length;o++)ii(ei[o],e);o=i;break;case`source`:ii(`error`,e),o=i;break;case`img`:case`image`:case`link`:ii(`error`,e),ii(`load`,e),o=i;break;case`details`:ii(`toggle`,e),o=i;break;case`input`:de(e,i),o=ue(e,i),ii(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=R({},i,{value:void 0}),ii(`invalid`,e);break;case`textarea`:ve(e,i),o=_e(e,i),ii(`invalid`,e);break;default:o=i}for(s in je(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?ke(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&we(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Te(e,u):typeof u==`number`&&Te(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&ii(`scroll`,e):u!=null&&S(e,s,u,c))}switch(n){case`input`:ce(e),U(e,i,!1);break;case`textarea`:ce(e),be(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+ae(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&ge(e,!!i.multiple,i.defaultValue,!0):ge(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=_i)}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 dc(t),null;case 6:if(e&&t.stateNode!=null)lc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=po(fo.current),po(lo.current),ka(t)){if(i=t.stateNode,n=t.memoizedProps,i[Ai]=t,(s=i.nodeValue!==n)&&(e=ba,e!==null))switch(e.tag){case 3:gi(i.nodeValue,n,!!(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&gi(i.nodeValue,n,!!(e.mode&1))}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Ai]=t,t.stateNode=i}return dc(t),null;case 13:if(Hi(vo),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Sa&&xa!==null&&t.mode&1&&!(t.flags&128))Aa(),ja(),t.flags|=98560,s=!1;else if(s=ka(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[Ai]=t}else ja(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;dc(t),s=!1}else Ca!==null&&(wl(Ca),Ca=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||vo.current&1?Qc===0&&(Qc=3):Pl())),t.updateQueue!==null&&(t.flags|=4),dc(t),null);case 4:return ho(),e===null&&si(t.stateNode.containerInfo),dc(t),null;case 10:return Ga(t.type._context),dc(t),null;case 17:return Yi(t.type)&&Xi(),dc(t),null;case 19:if(Hi(vo),s=t.memoizedState,s===null)return dc(t),null;if(i=!!(t.flags&128),c=s.rendering,c===null)if(i)uc(s,!1);else{if(Qc!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=yo(e),c!==null){for(t.flags|=128,uc(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 Ui(vo,vo.current&1|2),t.child}e=e.sibling}s.tail!==null&&ft()>ol&&(t.flags|=128,i=!0,uc(s,!1),t.lanes=4194304)}else{if(!i)if(e=yo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),uc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Sa)return dc(t),null}else 2*ft()-s.renderingStartTime>ol&&n!==1073741824&&(t.flags|=128,i=!0,uc(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?(dc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=ft(),t.sibling=null,n=vo.current,Ui(vo,i?n&1|2:n&1),t);case 22:case 23:return Al(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Xc&1073741824&&(dc(t),t.subtreeFlags&6&&(t.flags|=8192)):dc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function pc(e,t){switch(ya(t),t.tag){case 1:return Yi(t.type)&&Xi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ho(),Hi(Ki),Hi(Gi),xo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return _o(t),null;case 13:if(Hi(vo),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Hi(vo),null;case 4:return ho(),null;case 10:return Ga(t.type._context),null;case 22:case 23:return Al(),null;case 24:return null;default:return null}}var mc=!1,hc=!1,gc=typeof WeakSet==`function`?WeakSet:Set,_c=null;function vc(e,t){var n=e.ref;if(n!==null)if(typeof n==`function`)try{n(null)}catch(n){Wl(e,t,n)}else n.current=null}function yc(e,t,n){try{n()}catch(n){Wl(e,t,n)}}var bc=!1;function xc(e,t){if(vi=un,e=jr(),Mr(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(yi={focusedElem:e,selectionRange:n},un=!1,_c=t;_c!==null;)if(t=_c,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,_c=e;else for(;_c!==null;){t=_c;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:bs(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){Wl(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,_c=e;break}_c=t.return}return h=bc,bc=!1,h}function Sc(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&&yc(t,n,a)}i=i.next}while(i!==r)}}function Cc(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 wc(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 Tc(e){var t=e.alternate;t!==null&&(e.alternate=null,Tc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ai],delete t[ji],delete t[Ni],delete t[Pi],delete t[Fi])),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 Ec(e){return e.tag===5||e.tag===3||e.tag===4}function Dc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Ec(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 Oc(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=_i));else if(r!==4&&(e=e.child,e!==null))for(Oc(e,t,n),e=e.sibling;e!==null;)Oc(e,t,n),e=e.sibling}function kc(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(kc(e,t,n),e=e.sibling;e!==null;)kc(e,t,n),e=e.sibling}var Ac=null,jc=!1;function Mc(e,t,n){for(n=n.child;n!==null;)Nc(e,t,n),n=n.sibling}function Nc(e,t,n){if(bt&&typeof bt.onCommitFiberUnmount==`function`)try{bt.onCommitFiberUnmount(yt,n)}catch{}switch(n.tag){case 5:hc||vc(n,t);case 6:var r=Ac,i=jc;Ac=null,Mc(e,t,n),Ac=r,jc=i,Ac!==null&&(jc?(e=Ac,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ac.removeChild(n.stateNode));break;case 18:Ac!==null&&(jc?(e=Ac,n=n.stateNode,e.nodeType===8?Ei(e.parentNode,n):e.nodeType===1&&Ei(e,n),cn(e)):Ei(Ac,n.stateNode));break;case 4:r=Ac,i=jc,Ac=n.stateNode.containerInfo,jc=!0,Mc(e,t,n),Ac=r,jc=i;break;case 0:case 11:case 14:case 15:if(!hc&&(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)&&yc(n,t,o),i=i.next}while(i!==r)}Mc(e,t,n);break;case 1:if(!hc&&(vc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Wl(n,t,e)}Mc(e,t,n);break;case 21:Mc(e,t,n);break;case 22:n.mode&1?(hc=(r=hc)||n.memoizedState!==null,Mc(e,t,n),hc=r):Mc(e,t,n);break;default:Mc(e,t,n)}}function q(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new gc),t.forEach(function(t){var r=Jl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function Pc(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:Ac=c.stateNode,jc=!1;break a;case 3:Ac=c.stateNode.containerInfo,jc=!0;break a;case 4:Ac=c.stateNode.containerInfo,jc=!0;break a}c=c.return}if(Ac===null)throw Error(r(160));Nc(o,s,a),Ac=null,jc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){Wl(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Fc(t,e),t=t.sibling}function Fc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Pc(t,e),Ic(e),i&4){try{Sc(3,e,e.return),Cc(3,e)}catch(t){Wl(e,e.return,t)}try{Sc(5,e,e.return)}catch(t){Wl(e,e.return,t)}}break;case 1:Pc(t,e),Ic(e),i&512&&n!==null&&vc(n,n.return);break;case 5:if(Pc(t,e),Ic(e),i&512&&n!==null&&vc(n,n.return),e.flags&32){var a=e.stateNode;try{Te(a,``)}catch(t){Wl(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&&fe(a,o),Me(c,s);var u=Me(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?ke(a,f):d===`dangerouslySetInnerHTML`?we(a,f):d===`children`?Te(a,f):S(a,d,f,u)}switch(c){case`input`:pe(a,o);break;case`textarea`:ye(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?ge(a,!!o.multiple,o.multiple?[]:``,!1):ge(a,!!o.multiple,o.defaultValue,!0)):ge(a,!!o.multiple,m,!1)}a[ji]=o}catch(t){Wl(e,e.return,t)}}break;case 6:if(Pc(t,e),Ic(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){Wl(e,e.return,t)}}break;case 3:if(Pc(t,e),Ic(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{cn(t.containerInfo)}catch(t){Wl(e,e.return,t)}break;case 4:Pc(t,e),Ic(e);break;case 13:Pc(t,e),Ic(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(al=ft())),i&4&&q(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(hc=(u=hc)||d,Pc(t,e),hc=u):Pc(t,e),Ic(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(_c=e,d=e.child;d!==null;){for(f=_c=d;_c!==null;){switch(p=_c,m=p.child,p.tag){case 0:case 11:case 14:case 15:Sc(4,p,p.return);break;case 1:vc(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){Wl(i,n,e)}}break;case 5:vc(p,p.return);break;case 22:if(p.memoizedState!==null){Bc(f);continue}}m===null?Bc(f):(m.return=p,_c=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=Oe(`display`,s))}catch(t){Wl(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){Wl(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:Pc(t,e),Ic(e),i&4&&q(e);break;case 21:break;default:Pc(t,e),Ic(e)}}function Ic(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Ec(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&&(Te(a,``),i.flags&=-33),kc(e,Dc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Oc(e,Dc(e),o);break;default:throw Error(r(161))}}catch(t){Wl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Lc(e,t,n){_c=e,Rc(e,t,n)}function Rc(e,t,n){for(var r=!!(e.mode&1);_c!==null;){var i=_c,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||mc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||hc;s=mc;var l=hc;if(mc=o,(hc=c)&&!l)for(_c=i;_c!==null;)o=_c,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?Vc(i):(c.return=o,_c=c);for(;a!==null;)_c=a,Rc(a,t,n),a=a.sibling;_c=i,mc=s,hc=l}zc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,_c=a):zc(e,t,n)}}function zc(e){for(;_c!==null;){var t=_c;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:hc||Cc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!hc)if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:bs(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;o!==null&&so(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}so(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&&cn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}hc||t.flags&512&&wc(t)}catch(e){Wl(t,t.return,e)}}if(t===e){_c=null;break}if(n=t.sibling,n!==null){n.return=t.return,_c=n;break}_c=t.return}}function Bc(e){for(;_c!==null;){var t=_c;if(t===e){_c=null;break}var n=t.sibling;if(n!==null){n.return=t.return,_c=n;break}_c=t.return}}function Vc(e){for(;_c!==null;){var t=_c;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Cc(4,t)}catch(e){Wl(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){Wl(t,i,e)}}var a=t.return;try{wc(t)}catch(e){Wl(t,a,e)}break;case 5:var o=t.return;try{wc(t)}catch(e){Wl(t,o,e)}}}catch(e){Wl(t,t.return,e)}if(t===e){_c=null;break}var s=t.sibling;if(s!==null){s.return=t.return,_c=s;break}_c=t.return}}var Hc=Math.ceil,Uc=C.ReactCurrentDispatcher,Wc=C.ReactCurrentOwner,Gc=C.ReactCurrentBatchConfig,Kc=0,qc=null,Jc=null,Yc=0,Xc=0,Zc=Vi(0),Qc=0,$c=null,el=0,tl=0,nl=0,rl=null,il=null,al=0,ol=1/0,sl=null,cl=!1,ll=null,ul=null,dl=!1,fl=null,pl=0,ml=0,hl=null,gl=-1,_l=0;function vl(){return Kc&6?ft():gl===-1?gl=ft():gl}function yl(e){return e.mode&1?Kc&2&&Yc!==0?Yc&-Yc:Na.transition===null?(e=Rt,e===0?(e=window.event,e=e===void 0?16:gn(e.type),e):e):(_l===0&&(_l=Nt()),_l):1}function bl(e,t,n,i){if(50<ml)throw ml=0,hl=null,Error(r(185));Ft(e,n,i),(!(Kc&2)||e!==qc)&&(e===qc&&(!(Kc&2)&&(tl|=n),Qc===4&&El(e,Yc)),xl(e,i),n===1&&Kc===0&&!(t.mode&1)&&(ol=ft()+500,na&&oa()))}function xl(e,t){var n=e.callbackNode;jt(e,t);var r=kt(e,e===qc?Yc:0);if(r===0)n!==null&<(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&<(n),t===1)e.tag===0?aa(Dl.bind(null,e)):ia(Dl.bind(null,e)),wi(function(){!(Kc&6)&&oa()}),n=null;else{switch(zt(r)){case 1:n=mt;break;case 4:n=ht;break;case 16:n=gt;break;case 536870912:n=vt;break;default:n=gt}n=J(n,Sl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Sl(e,t){if(gl=-1,_l=0,Kc&6)throw Error(r(327));var n=e.callbackNode;if(Hl()&&e.callbackNode!==n)return null;var i=kt(e,e===qc?Yc:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Fl(e,i);else{t=i;var a=Kc;Kc|=2;var o=Nl();(qc!==e||Yc!==t)&&(sl=null,ol=ft()+500,jl(e,t));do try{Ll();break}catch(t){Ml(e,t)}while(1);Wa(),Uc.current=o,Kc=a,Jc===null?(qc=null,Yc=0,t=Qc):t=0}if(t!==0){if(t===2&&(a=Mt(e),a!==0&&(i=a,t=Cl(e,a))),t===1)throw n=$c,jl(e,0),El(e,i),xl(e,ft()),n;if(t===6)El(e,i);else{if(a=e.current.alternate,!(i&30)&&!Tl(a)&&(t=Fl(e,i),t===2&&(o=Mt(e),o!==0&&(i=o,t=Cl(e,o))),t===1))throw n=$c,jl(e,0),El(e,i),xl(e,ft()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:Bl(e,il,sl);break;case 3:if(El(e,i),(i&130023424)===i&&(t=al+500-ft(),10<t)){if(kt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){vl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=xi(Bl.bind(null,e,il,sl),t);break}Bl(e,il,sl);break;case 4:if(El(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=ft()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Hc(i/1960))-i,10<i){e.timeoutHandle=xi(Bl.bind(null,e,il,sl),i);break}Bl(e,il,sl);break;case 5:Bl(e,il,sl);break;default:throw Error(r(329))}}}return xl(e,ft()),e.callbackNode===n?Sl.bind(null,e):null}function Cl(e,t){var n=rl;return e.current.memoizedState.isDehydrated&&(jl(e,t).flags|=256),e=Fl(e,t),e!==2&&(t=il,il=n,t!==null&&wl(t)),e}function wl(e){il===null?il=e:il.push.apply(il,e)}function Tl(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(!Er(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 El(e,t){for(t&=~nl,t&=~tl,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 Dl(e){if(Kc&6)throw Error(r(327));Hl();var t=kt(e,0);if(!(t&1))return xl(e,ft()),null;var n=Fl(e,t);if(e.tag!==0&&n===2){var i=Mt(e);i!==0&&(t=i,n=Cl(e,i))}if(n===1)throw n=$c,jl(e,0),El(e,t),xl(e,ft()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Bl(e,il,sl),xl(e,ft()),null}function Ol(e,t){var n=Kc;Kc|=1;try{return e(t)}finally{Kc=n,Kc===0&&(ol=ft()+500,na&&oa())}}function kl(e){fl!==null&&fl.tag===0&&!(Kc&6)&&Hl();var t=Kc;Kc|=1;var n=Gc.transition,r=Rt;try{if(Gc.transition=null,Rt=1,e)return e()}finally{Rt=r,Gc.transition=n,Kc=t,!(Kc&6)&&oa()}}function Al(){Xc=Zc.current,Hi(Zc)}function jl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Si(n)),Jc!==null)for(n=Jc.return;n!==null;){var r=n;switch(ya(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Xi();break;case 3:ho(),Hi(Ki),Hi(Gi),xo();break;case 5:_o(r);break;case 4:ho();break;case 13:Hi(vo);break;case 19:Hi(vo);break;case 10:Ga(r.type._context);break;case 22:case 23:Al()}n=n.return}if(qc=e,Jc=e=eu(e.current,null),Yc=Xc=t,Qc=0,$c=null,nl=tl=el=0,il=rl=null,Ya!==null){for(t=0;t<Ya.length;t++)if(n=Ya[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}Ya=null}return e}function Ml(e,t){do{var n=Jc;try{if(Wa(),So.current=gs,Oo){for(var i=To.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Oo=!1}if(wo=0,Do=Eo=To=null,ko=!1,Ao=0,Wc.current=null,n===null||n.return===null){Qc=1,$c=t,Jc=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=Yc,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=Ps(s);if(m!==null){m.flags&=-257,Fs(m,s,c,o,t),m.mode&1&&Ns(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}if(!(t&1)){Ns(o,u,t),Pl();break a}l=Error(r(426))}else if(Sa&&c.mode&1){var _=Ps(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Fs(_,s,c,o,t),Ma(Ds(l,c));break a}}o=l=Ds(l,c),Qc!==4&&(Qc=2),rl===null?rl=[o]:rl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=js(o,l,t);ao(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`&&(ul===null||!ul.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Ms(o,c,t);ao(o,x);break a}}o=o.return}while(o!==null)}zl(n)}catch(e){t=e,Jc===n&&n!==null&&(Jc=n=n.return);continue}break}while(1)}function Nl(){var e=Uc.current;return Uc.current=gs,e===null?gs:e}function Pl(){(Qc===0||Qc===3||Qc===2)&&(Qc=4),qc===null||!(el&268435455)&&!(tl&268435455)||El(qc,Yc)}function Fl(e,t){var n=Kc;Kc|=2;var i=Nl();(qc!==e||Yc!==t)&&(sl=null,jl(e,t));do try{Il();break}catch(t){Ml(e,t)}while(1);if(Wa(),Kc=n,Uc.current=i,Jc!==null)throw Error(r(261));return qc=null,Yc=0,Qc}function Il(){for(;Jc!==null;)Rl(Jc)}function Ll(){for(;Jc!==null&&!ut();)Rl(Jc)}function Rl(e){var t=Yl(e.alternate,e,Xc);e.memoizedProps=e.pendingProps,t===null?zl(e):Jc=t,Wc.current=null}function zl(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=pc(n,t),n!==null){n.flags&=32767,Jc=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Qc=6,Jc=null;return}}else if(n=fc(n,t,Xc),n!==null){Jc=n;return}if(t=t.sibling,t!==null){Jc=t;return}Jc=t=e}while(t!==null);Qc===0&&(Qc=5)}function Bl(e,t,n){var r=Rt,i=Gc.transition;try{Gc.transition=null,Rt=1,Vl(e,t,n,r)}finally{Gc.transition=i,Rt=r}return null}function Vl(e,t,n,i){do Hl();while(fl!==null);if(Kc&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(It(e,o),e===qc&&(Jc=qc=null,Yc=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||dl||(dl=!0,J(gt,function(){return Hl(),null})),o=!!(n.flags&15990),n.subtreeFlags&15990||o){o=Gc.transition,Gc.transition=null;var s=Rt;Rt=1;var c=Kc;Kc|=4,Wc.current=null,xc(e,n),Fc(n,e),Nr(yi),un=!!vi,yi=vi=null,e.current=n,Lc(n,e,a),dt(),Kc=c,Rt=s,Gc.transition=o}else e.current=n;if(dl&&(dl=!1,fl=e,pl=a),o=e.pendingLanes,o===0&&(ul=null),xt(n.stateNode,i),xl(e,ft()),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(cl)throw cl=!1,e=ll,ll=null,e;return pl&1&&e.tag!==0&&Hl(),o=e.pendingLanes,o&1?e===hl?ml++:(ml=0,hl=e):ml=0,oa(),null}function Hl(){if(fl!==null){var e=zt(pl),t=Gc.transition,n=Rt;try{if(Gc.transition=null,Rt=16>e?16:e,fl===null)var i=!1;else{if(e=fl,fl=null,pl=0,Kc&6)throw Error(r(331));var a=Kc;for(Kc|=4,_c=e.current;_c!==null;){var o=_c,s=o.child;if(_c.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(_c=u;_c!==null;){var d=_c;switch(d.tag){case 0:case 11:case 15:Sc(8,d,o)}var f=d.child;if(f!==null)f.return=d,_c=f;else for(;_c!==null;){d=_c;var p=d.sibling,m=d.return;if(Tc(d),d===u){_c=null;break}if(p!==null){p.return=m,_c=p;break}_c=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)}}_c=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,_c=s;else b:for(;_c!==null;){if(o=_c,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Sc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,_c=v;break b}_c=o.return}}var y=e.current;for(_c=y;_c!==null;){s=_c;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,_c=b;else b:for(s=y;_c!==null;){if(c=_c,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Cc(9,c)}}catch(e){Wl(c,c.return,e)}if(c===s){_c=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,_c=x;break b}_c=c.return}}if(Kc=a,oa(),bt&&typeof bt.onPostCommitFiberRoot==`function`)try{bt.onPostCommitFiberRoot(yt,e)}catch{}i=!0}return i}finally{Rt=n,Gc.transition=t}}return!1}function Ul(e,t,n){t=Ds(n,t),t=js(e,t,1),e=ro(e,t,1),t=vl(),e!==null&&(Ft(e,1,t),xl(e,t))}function Wl(e,t,n){if(e.tag===3)Ul(e,e,n);else for(;t!==null;){if(t.tag===3){Ul(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(ul===null||!ul.has(r))){e=Ds(n,e),e=Ms(t,e,1),t=ro(t,e,1),e=vl(),t!==null&&(Ft(t,1,e),xl(t,e));break}}t=t.return}}function Gl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=vl(),e.pingedLanes|=e.suspendedLanes&n,qc===e&&(Yc&n)===n&&(Qc===4||Qc===3&&(Yc&130023424)===Yc&&500>ft()-al?jl(e,0):nl|=n),xl(e,t)}function Kl(e,t){t===0&&(e.mode&1?(t=Dt,Dt<<=1,!(Dt&130023424)&&(Dt=4194304)):t=1);var n=vl();e=Qa(e,t),e!==null&&(Ft(e,t,n),xl(e,n))}function ql(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Kl(e,n)}function Jl(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),Kl(e,n)}var Yl=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ki.current)Ls=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Ls=!1,oc(e,t,n);Ls=!!(e.flags&131072)}else Ls=!1,Sa&&t.flags&1048576&&_a(t,ua,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;ic(e,t),e=t.pendingProps;var a=Ji(t,Gi.current);qa(t,n),a=Po(null,t,i,e,a,n);var o=Fo();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,Yi(i)?(o=!0,$i(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,eo(t),a.updater=Ss,t.stateNode=a,a._reactInternals=t,Es(t,i,e,n),t=Ks(null,t,i,!0,o,n)):(t.tag=0,Sa&&o&&va(t),Rs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(ic(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=$l(i),e=bs(i,e),a){case 0:t=Ws(null,t,i,e,n);break a;case 1:t=Gs(null,t,i,e,n);break a;case 11:t=zs(null,t,i,e,n);break a;case 14:t=Bs(null,t,i,bs(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:bs(i,a),Ws(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:bs(i,a),Gs(e,t,i,a,n);case 3:a:{if(qs(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,to(e,t),oo(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=Ds(Error(r(423)),t),t=Js(e,t,i,n,a);break a}else if(i!==a){a=Ds(Error(r(424)),t),t=Js(e,t,i,n,a);break a}else for(xa=Di(t.stateNode.containerInfo.firstChild),ba=t,Sa=!0,Ca=null,n=za(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ja(),i===a){t=ac(e,t,n);break a}Rs(e,t,i,n)}t=t.child}return t;case 5:return go(t),e===null&&Da(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,bi(i,a)?s=null:o!==null&&bi(i,o)&&(t.flags|=32),Us(e,t),Rs(e,t,s,n),t.child;case 6:return e===null&&Da(t),null;case 13:return Zs(e,t,n);case 4:return mo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Ra(t,null,i,n):Rs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:bs(i,a),zs(e,t,i,a,n);case 7:return Rs(e,t,t.pendingProps,n),t.child;case 8:return Rs(e,t,t.pendingProps.children,n),t.child;case 12:return Rs(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,Ui(Ba,i._currentValue),i._currentValue=s,o!==null)if(Er(o.value,s)){if(o.children===a.children&&!Ki.current){t=ac(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=no(-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),Ka(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),Ka(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}Rs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,qa(t,n),a=Ja(a),i=i(a),t.flags|=1,Rs(e,t,i,n),t.child;case 14:return i=t.type,a=bs(i,t.pendingProps),a=bs(i.type,a),Bs(e,t,i,a,n);case 15:return Vs(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:bs(i,a),ic(e,t),t.tag=1,Yi(i)?(e=!0,$i(t)):e=!1,qa(t,n),ws(t,i,a),Es(t,i,a,n),Ks(null,t,i,!0,e,n);case 19:return rc(e,t,n);case 22:return Hs(e,t,n)}throw Error(r(156,t.tag))};function J(e,t){return ct(e,t)}function Xl(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 Zl(e,t,n,r){return new Xl(e,t,n,r)}function Ql(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $l(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 eu(e,t){var n=e.alternate;return n===null?(n=Zl(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 tu(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 nu(n.children,a,o,t);case D:s=8,a|=8;break;case O:return e=Zl(12,n,t,a|2),e.elementType=O,e.lanes=o,e;case M:return e=Zl(13,n,t,a),e.elementType=M,e.lanes=o,e;case N:return e=Zl(19,n,t,a),e.elementType=N,e.lanes=o,e;case I:return ru(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=Zl(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function nu(e,t,n,r){return e=Zl(7,e,r,t),e.lanes=n,e}function ru(e,t,n,r){return e=Zl(22,e,r,t),e.elementType=I,e.lanes=n,e.stateNode={isHidden:!1},e}function iu(e,t,n){return e=Zl(6,e,null,t),e.lanes=n,e}function au(e,t,n){return t=Zl(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ou(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=Pt(0),this.expirationTimes=Pt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function su(e,t,n,r,i,a,o,s,c){return e=new ou(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=Zl(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},eo(a),e}function cu(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 lu(e){if(!e)return Wi;e=e._reactInternals;a:{if(nt(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(Yi(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(Yi(n))return Qi(e,n,t)}return t}function uu(e,t,n,r,i,a,o,s,c){return e=su(n,r,!0,e,i,a,o,s,c),e.context=lu(null),n=e.current,r=vl(),i=yl(n),a=no(r,i),a.callback=t??null,ro(n,a,i),e.current.lanes=i,Ft(e,i,r),xl(e,r),e}function du(e,t,n,r){var i=t.current,a=vl(),o=yl(i);return n=lu(n),t.context===null?t.context=n:t.pendingContext=n,t=no(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=ro(i,t,o),e!==null&&(bl(e,i,o,a),io(e,i,o)),o}function fu(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 pu(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function mu(e,t){pu(e,t),(e=e.alternate)&&pu(e,t)}function hu(){return null}var gu=typeof reportError==`function`?reportError:function(e){console.error(e)};function Y(e){this._internalRoot=e}_u.prototype.render=Y.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));du(e,t,null,null)},_u.prototype.unmount=Y.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;kl(function(){du(null,e,null,null)}),t[Mi]=null}};function _u(e){this._internalRoot=e}_u.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ut();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Zt.length&&t!==0&&t<Zt[n].priority;n++);Zt.splice(n,0,e),n===0&&nn(e)}};function vu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function yu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function bu(){}function xu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=fu(o);a.call(e)}}var o=uu(t,r,e,0,null,!1,!1,``,bu);return e._reactRootContainer=o,e[Mi]=o.current,si(e.nodeType===8?e.parentNode:e),kl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=fu(c);s.call(e)}}var c=su(e,0,!1,null,null,!1,!1,``,bu);return e._reactRootContainer=c,e[Mi]=c.current,si(e.nodeType===8?e.parentNode:e),kl(function(){du(t,c,n,r)}),c}function Su(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=fu(o);s.call(e)}}du(t,o,e,i)}else o=xu(n,t,e,i,r);return fu(o)}Bt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Ot(t.pendingLanes);n!==0&&(Lt(t,n|1),xl(t,ft()),!(Kc&6)&&(ol=ft()+500,oa()))}break;case 13:kl(function(){var t=Qa(e,1);t!==null&&bl(t,e,1,vl())}),mu(e,1)}},Vt=function(e){if(e.tag===13){var t=Qa(e,134217728);t!==null&&bl(t,e,134217728,vl()),mu(e,134217728)}},Ht=function(e){if(e.tag===13){var t=yl(e),n=Qa(e,t);n!==null&&bl(n,e,t,vl()),mu(e,t)}},Ut=function(){return Rt},Wt=function(e,t){var n=Rt;try{return Rt=e,t()}finally{Rt=n}},Fe=function(e,t,n){switch(t){case`input`:if(pe(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=Ri(i);if(!a)throw Error(r(90));H(i),pe(i,a)}}}break;case`textarea`:ye(e,n);break;case`select`:t=n.value,t!=null&&ge(e,!!n.multiple,t,!1)}},Ve=Ol,He=kl;var Cu={usingClientEntryPoint:!1,Events:[Ii,Li,Ri,ze,Be,Ol]},wu={findFiberByHostInstance:K,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Tu={bundleType:wu.bundleType,version:wu.version,rendererPackageName:wu.rendererPackageName,rendererConfig:wu.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=ot(e),e===null?null:e.stateNode},findFiberByHostInstance:wu.findFiberByHostInstance||hu,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};
8if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Eu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Eu.isDisabled&&Eu.supportsFiber)try{yt=Eu.inject(Tu),bt=Eu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Cu,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!vu(t))throw Error(r(200));return cu(e,t,null,n)},e.createRoot=function(e,t){if(!vu(e))throw Error(r(299));var n=!1,i=``,a=gu;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=su(e,1,!1,null,null,n,!1,i,a),e[Mi]=t.current,si(e.nodeType===8?e.parentNode:e),new Y(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=ot(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return kl(e)},e.hydrate=function(e,t,n){if(!yu(t))throw Error(r(200));return Su(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!vu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=gu;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=uu(t,null,e,1,n??null,a,!1,o,s),e[Mi]=t.current,si(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 _u(t)},e.render=function(e,t,n){if(!yu(t))throw Error(r(200));return Su(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!yu(e))throw Error(r(40));return e._reactRootContainer?(kl(function(){Su(null,null,e,!1,function(){e._reactRootContainer=null,e[Mi]=null})}),!0):!1},e.unstable_batchedUpdates=Ol,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!yu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Su(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),v=s(((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=_()})),y=u(s((e=>{var t=v();e.createRoot=t.createRoot,e.hydrateRoot=t.hydrateRoot}))(),1),b=u(m(),1),x=20,S=1e6,C={ADD_TOAST:`ADD_TOAST`,UPDATE_TOAST:`UPDATE_TOAST`,DISMISS_TOAST:`DISMISS_TOAST`,REMOVE_TOAST:`REMOVE_TOAST`},w=0;function T(){return w=(w+1)%Number.MAX_VALUE,w.toString()}var E=new Map,D=e=>{if(E.has(e))return;let t=setTimeout(()=>{E.delete(e),j({type:C.REMOVE_TOAST,toastId:e})},S);E.set(e,t)},O=(e,t)=>{switch(t.type){case C.ADD_TOAST:return{...e,toasts:[t.toast,...e.toasts].slice(0,x)};case C.UPDATE_TOAST:return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case C.DISMISS_TOAST:{let{toastId:n}=t;return n?D(n):e.toasts.forEach(e=>{D(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===n||n===void 0?{...e,open:!1}:e)}}case C.REMOVE_TOAST:return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},k=[],A={toasts:[]};function j(e){A=O(A,e),k.forEach(e=>{e(A)})}function M({...e}){let t=T(),n=e=>j({type:C.UPDATE_TOAST,toast:{...e,id:t}}),r=()=>j({type:C.DISMISS_TOAST,toastId:t});return j({type:C.ADD_TOAST,toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:n}}function N(){let[e,t]=(0,b.useState)(A);return(0,b.useEffect)(()=>(k.push(t),()=>{let e=k.indexOf(t);e>-1&&k.splice(e,1)}),[e]),{...e,toast:M,dismiss:e=>j({type:C.DISMISS_TOAST,toastId:e})}}var P=u(v(),1);typeof window<`u`&&window.document&&window.document.createElement;function F(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),n===!1||!r.defaultPrevented)return t?.(r)}}function I(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function ee(...e){return t=>{let n=!1,r=e.map(e=>{let r=I(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():I(e[t],null)}}}}function L(...e){return b.useCallback(ee(...e),e)}var R=s((e=>{var t=m(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INT
8ERNALS_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})),z=s(((e,t)=>{t.exports=R()}))();function B(e,t){let n=b.createContext(t),r=e=>{let{children:t,...r}=e,i=b.useMemo(()=>r,Object.values(r));return(0,z.jsx)(n.Provider,{value:i,children:t})};r.displayName=e+`Provider`;function i(r){let i=b.useContext(n);if(i)return i;if(t!==void 0)return t;throw Error(`\`${r}\` must be used within \`${e}\``)}return[r,i]}function V(e,t=[]){let n=[];function r(t,r){let i=b.createContext(r),a=n.length;n=[...n,r];let o=t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=b.useMemo(()=>o,Object.values(o));return(0,z.jsx)(s.Provider,{value:c,children:r})};o.displayName=t+`Provider`;function s(n,o){let s=o?.[e]?.[a]||i,c=b.useContext(s);if(c)return c;if(r!==void 0)return r;throw Error(`\`${n}\` must be used within \`${t}\``)}return[o,s]}let i=()=>{let t=n.map(e=>b.createContext(e));return function(n){let r=n?.[e]||t;return b.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return i.scopeName=e,[r,te(i,...t)]}function te(...e){let t=e[0];if(e.length===1)return t;let n=()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return b.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}function ne(e){let t=re(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(ae);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,z.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,z.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function re(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=se(n),i=oe(r,n.props);return n.type!==b.Fragment&&(i.ref=t?ee(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ie=Symbol(`radix.slottable`);function ae(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ie}function oe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function se(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ce(e){let t=e+`CollectionProvider`,[n,r]=V(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=e=>{let{scope:t,children:n}=e,r=b.useRef(null),a=b.useRef(new Map).current;return(0,z.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})};o.displayName=t;let s=e+`CollectionSlot`,c=ne(s),l=b.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=L(t,a(s,n).collectionRef);return(0,z.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=ne(u),p=b.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=b.useRef(null),s=L(t,o),c=a(u,n);return b.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,z.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return b.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return[{Provider:o,Slot:l,ItemSlot:p},m,r]}
vendor: 5,488 bytes, line 8
8function H(e){let t=le(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(de);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,z.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,z.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function le(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=pe(n),i=fe(r,n.props);return n.type!==b.Fragment&&(i.ref=t?ee(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ue=Symbol(`radix.slottable`);function de(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===ue}function fe(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function pe(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var U=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=H(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,z.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function me(e,t){e&&P.flushSync(()=>e.dispatchEvent(t))}function he(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current?.(...e),[])}function ge(e,t=globalThis?.document){let n=he(e);b.useEffect(()=>{let e=e=>{e.key===`Escape`&&n(e)};return t.addEventListener(`keydown`,e,{capture:!0}),()=>t.removeEventListener(`keydown`,e,{capture:!0})},[n,t])}var _e=`DismissableLayer`,ve=`dismissableLayer.update`,ye=`dismissableLayer.pointerDownOutside`,be=`dismissableLayer.focusOutside`,xe,Se=b.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ce=b.forwardRef((e,t)=>{let{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:o,onDismiss:s,...c}=e,l=b.useContext(Se),[u,d]=b.useState(null),f=u?.ownerDocument??globalThis?.document,[,p]=b.useState({}),m=L(t,e=>d(e)),h=Array.from(l.layers),[g]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),_=h.indexOf(g),v=u?h.indexOf(u):-1,y=l.layersWithOutsidePointerEventsDisabled.size>0,x=v>=_,S=Ee(e=>{let t=e.target,n=[...l.branches].some(e=>e.contains(t));!x||n||(i?.(e),o?.(e),e.defaultPrevented||s?.())},f),C=De(e=>{let t=e.target;[...l.branches].some(e=>e.contains(t))||(a?.(e),o?.(e),e.defaultPrevented||s?.())},f);return ge(e=>{v===l.layers.size-1&&(r?.(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))},f),b.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(xe=f.body.style.pointerEvents,f.body.style.pointerEvents=`none`),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),Oe(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(f.body.style.pointerEvents=xe)}},[u,f,n,l]),b.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),Oe())},[u,l]),b.useEffect(()=>{let e=()=>p({});return document.addEventListener(ve,e),()=>document.removeEventListener(ve,e)},[]),(0,z.jsx)(U.div,{...c,ref:m,style:{pointerEvents:y?x?`auto`:`none`:void 0,...e.style},onFocusCapture:F(e.onFocusCapture,C.onFocusCapture),onBlurCapture:F(e.onBlurCapture,C.onBlurCapture),onPointerDownCapture:F(e.onPointerDownCapture,S.onPointerDownCapture)})});Ce.displayName=_e;var we=`DismissableLayerBranch`,Te=b.forwardRef((e,t)=>{let n=b.useContext(Se),r=b.useRef(null),i=L(t,r);return b.useEffect(()=>{let e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}},[n.branches]),(0,z.jsx)(U.div,{...e,ref:i})});Te.displayName=we;function Ee(e,t=globalThis?.document){let n=he(e),r=b.useRef(!1),i=b.useRef(()=>{});return b.useEffect(()=>{let e=e=>{if(e.target&&!r.current){let r=function(){ke(ye,n,a,{discrete:!0})},a={originalEvent:e};e.pointerType===`touch`?(t.removeEventListener(`click`,i.current),i.current=r,t.addEventListener(`click`,i.current,{once:!0})):r()}else t.removeEventListener(`click`,i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener(`pointerdown`,e)},0);return()=>{window.clearTimeout(a),t.removeEventListener(`pointerdown`,e),t.removeEventListener(`click`,i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function De(e,t=globalThis?.document){let n=he(e),r=b.useRef(!1);return b.useEffect(()=>{let e=e=>{e.target&&!r.current&&ke(be,n,{originalEvent:e},{discrete:!1})};return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Oe(){let e=new CustomEvent(ve);document.dispatchEvent(e)}function ke(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?me(i,a):i.dispatchEvent(a)}var Ae=Ce,je=Te,Me=globalThis?.document?b.useLayoutEffect:()=>{},Ne=`Portal`,Pe=b.forwardRef((e,t)=>
8{let{container:n,...r}=e,[i,a]=b.useState(!1);Me(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?P.createPortal((0,z.jsx)(U.div,{...r,ref:t}),o):null});Pe.displayName=Ne;function Fe(e,t){return b.useReducer((e,n)=>t[e][n]??e,e)}var Ie=e=>{let{present:t,children:n}=e,r=Le(t),i=typeof n==`function`?n({present:r.isPresent}):b.Children.only(n),a=L(r.ref,ze(i));return typeof n==`function`||r.isPresent?b.cloneElement(i,{ref:a}):null};Ie.displayName=`Presence`;function Le(e){let[t,n]=b.useState(),r=b.useRef(null),i=b.useRef(e),a=b.useRef(`none`),[o,s]=Fe(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return b.useEffect(()=>{let e=Re(r.current);a.current=o===`mounted`?e:`none`},[o]),Me(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,o=Re(t);e?s(`MOUNT`):o===`none`||t?.display===`none`?s(`UNMOUNT`):s(n&&r!==o?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,s]),Me(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=a=>{let o=Re(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(s(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=Re(r.current))};return t.addEventListener(`animationstart`,c),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,c),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}s(`ANIMATION_END`)},[t,s]),{isPresent:[`mounted`,`unmountSuspended`].includes(o),ref:b.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}function Re(e){return e?.animationName||`none`}function ze(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Be=b.useInsertionEffect||Me;function Ve({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){let[i,a,o]=He({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:i;{let t=b.useRef(e!==void 0);b.useEffect(()=>{let e=t.current;e!==s&&console.warn(`${r} is changing from ${e?`controlled`:`uncontrolled`} to ${s?`controlled`:`uncontrolled`}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),t.current=s},[s,r])}return[c,b.useCallback(t=>{if(s){let n=Ue(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}function He({defaultProp:e,onChange:t}){let[n,r]=b.useState(e),i=b.useRef(n),a=b.useRef(t);return Be(()=>{a.current=t},[t]),b.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}function Ue(e){return typeof e==`function`}var We=Object.freeze({position:`absolute`,border:0,width:1,height:1,padding:0,margin:-1,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,wordWrap:`normal`}),Ge=`VisuallyHidden`,Ke=b.forwardRef((e,t)=>(0,z.jsx)(U.span,{...e,ref:t,style:{...We,...e.style}}));Ke.displayName=Ge;var qe=`ToastProvider`,[Je,Ye,Xe]=ce(`Toast`),[Ze,Qe]=V(`Toast`,[Xe]),[$e,et]=Ze(qe),tt=e=>{let{__scopeToast:t,label:n=`Notification`,duration:r=5e3,swipeDirection:i=`right`,swipeThreshold:a=50,children:o}=e,[s,c]=b.useState(null),[l,u]=b.useState(0),d=b.useRef(!1),f=b.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${qe}\`. Expected non-empty \`string\`.`),(0,z.jsx)(Je.Provider,{scope:t,children:(0,z.jsx)($e,{scope:t,label:n,duration:r,swipeDirection:i,swipeThreshold:a,toastCount:l,viewport:s,onViewportChange:c,onToastAdd:b.useCallback(()=>u(e=>e+1),[]),onToastRemove:b.useCallback(()=>u(e=>e-1),[]),isFocusedToastEscapeKeyDownRef:d,isClosePausedRef:f,children:o})})};tt.displayName=qe;var nt=`ToastViewport`,rt=[`F8`],it=`toast.viewportPause`,at=`toast.viewportResume`,ot=b.forwardRef((e,t)=>
vendor: 8,244 bytes, line 8
8{let{__scopeToast:n,hotkey:r=rt,label:i=`Notifications ({hotkey})`,...a}=e,o=et(nt,n),s=Ye(n),c=b.useRef(null),l=b.useRef(null),u=b.useRef(null),d=b.useRef(null),f=L(t,d,o.onViewportChange),p=r.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),m=o.toastCount>0;b.useEffect(()=>{let e=e=>{r.length!==0&&r.every(t=>e[t]||e.code===t)&&d.current?.focus()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[r]),b.useEffect(()=>{let e=c.current,t=d.current;if(m&&e&&t){let n=()=>{if(!o.isClosePausedRef.current){let e=new CustomEvent(it);t.dispatchEvent(e),o.isClosePausedRef.current=!0}},r=()=>{if(o.isClosePausedRef.current){let e=new CustomEvent(at);t.dispatchEvent(e),o.isClosePausedRef.current=!1}},i=t=>{e.contains(t.relatedTarget)||r()},a=()=>{e.contains(document.activeElement)||r()};return e.addEventListener(`focusin`,n),e.addEventListener(`focusout`,i),e.addEventListener(`pointermove`,n),e.addEventListener(`pointerleave`,a),window.addEventListener(`blur`,n),window.addEventListener(`focus`,r),()=>{e.removeEventListener(`focusin`,n),e.removeEventListener(`focusout`,i),e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerleave`,a),window.removeEventListener(`blur`,n),window.removeEventListener(`focus`,r)}}},[m,o.isClosePausedRef]);let h=b.useCallback(({tabbingDirection:e})=>{let t=s().map(t=>{let n=t.ref.current,r=[n,...Nt(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?t.reverse():t).flat()},[s]);return b.useEffect(()=>{let e=d.current;if(e){let t=t=>{let n=t.altKey||t.ctrlKey||t.metaKey;if(t.key===`Tab`&&!n){let n=document.activeElement,r=t.shiftKey;if(t.target===e&&r){l.current?.focus();return}let i=h({tabbingDirection:r?`backwards`:`forwards`}),a=i.findIndex(e=>e===n);Pt(i.slice(a+1))?t.preventDefault():r?l.current?.focus():u.current?.focus()}};return e.addEventListener(`keydown`,t),()=>e.removeEventListener(`keydown`,t)}},[s,h]),(0,z.jsxs)(je,{ref:c,role:`region`,"aria-label":i.replace(`{hotkey}`,p),tabIndex:-1,style:{pointerEvents:m?void 0:`none`},children:[m&&(0,z.jsx)(ct,{ref:l,onFocusFromOutsideViewport:()=>{Pt(h({tabbingDirection:`forwards`}))}}),(0,z.jsx)(Je.Slot,{scope:n,children:(0,z.jsx)(U.ol,{tabIndex:-1,...a,ref:f})}),m&&(0,z.jsx)(ct,{ref:u,onFocusFromOutsideViewport:()=>{Pt(h({tabbingDirection:`backwards`}))}})]})});ot.displayName=nt;var st=`ToastFocusProxy`,ct=b.forwardRef((e,t)=>{let{__scopeToast:n,onFocusFromOutsideViewport:r,...i}=e,a=et(st,n);return(0,z.jsx)(Ke,{tabIndex:0,...i,ref:t,style:{position:`fixed`},onFocus:e=>{let t=e.relatedTarget;a.viewport?.contains(t)||r()}})});ct.displayName=st;var lt=`Toast`,ut=`toast.swipeStart`,dt=`toast.swipeMove`,ft=`toast.swipeCancel`,pt=`toast.swipeEnd`,mt=b.forwardRef((e,t)=>{let{forceMount:n,open:r,defaultOpen:i,onOpenChange:a,...o}=e,[s,c]=Ve({prop:r,defaultProp:i??!0,onChange:a,caller:lt});return(0,z.jsx)(Ie,{present:n||s,children:(0,z.jsx)(_t,{open:s,...o,ref:t,onClose:()=>c(!1),onPause:he(e.onPause),onResume:he(e.onResume),onSwipeStart:F(e.onSwipeStart,e=>{e.currentTarget.setAttribute(`data-swipe`,`start`)}),onSwipeMove:F(e.onSwipeMove,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`move`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-move-y`,`${n}px`)}),onSwipeCancel:F(e.onSwipeCancel,e=>{e.currentTarget.setAttribute(`data-swipe`,`cancel`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-end-y`)}),onSwipeEnd:F(e.onSwipeEnd,e=>{let{x:t,y:n}=e.detail.delta;e.currentTarget.setAttribute(`data-swipe`,`end`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-x`),e.currentTarget.style.removeProperty(`--radix-toast-swipe-move-y`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-x`,`${t}px`),e.currentTarget.style.setProperty(`--radix-toast-swipe-end-y`,`${n}px`),c(!1)})})})});mt.displayName=lt;var[ht,gt]=Ze(lt,{onClose(){}}),_t=b.forwardRef((e,t)=>{let{__scopeToast:n,type:r=`foreground`,duration:i,open:a,onClose:o,onEscapeKeyDown:s,onPause:c,onResume:l,onSwipeStart:u,onSwipeMove:d,onSwipeCancel:f,onSwipeEnd:p,...m}=e,h=et(lt,n),[g,_]=b.useState(null),v=L(t,e=>_(e)),y=b.useRef(null),x=b.useRef(null),S=i||h.duration,C=b.useRef(0),w=b.useRef(S),T=b.useRef(0),{onToastAdd:E,onToastRemove:D}=h,O=he(()=>{g?.contains(document.activeElement)&&h.viewport?.focus(),o()}),k=b.useCallback(e=>{!e||e===1/0||(window.clearTimeout(T.current),C.current=new Date().getTime(),T.current=window.setTimeout(O,e))},[O]);b.useEffect(()=>{let e=h.viewport;if(e){let t=()=>{k(w.current),l?.()},n=()=>{let e=new Date().getTime()-C.current;w.current-=e,window.clearTimeout(T.current),c?.()};return e.addEventListener(it,n),e.addEventListener(at,t),()=>{e.removeEventListener(it,n),e.removeEventListener(at,t)}}},[h.viewport,S,c,l,k]),b.useEffect(()=>{a&&!h.isClosePausedRef.current&&k(S)},[a,S,h.isClosePausedRef,k]),b.useEffect(()=>(E(),()=>D()),[E,D]);let A=b.useMemo(()=>g?Ot(g):null,[g]);return h.viewport?(0,z.jsxs)(z.Fragment,{children:[A&&(0,z.jsx)(vt,{__scopeToast:n,role:`status`,"aria-live":r===`foreground`?`assertive`:`polite`,children:A}),(0,z.jsx)(ht,{scope:n,onClose:O,children:P.createPortal((0,z.jsx)(Je.ItemSlot,{scope:n,children:(0,z.jsx)(Ae,{asChild:!0,onEscapeKeyDown:F(s,()=>{h.isFocusedToastEscapeKeyDownRef.current||O(),h.isFocusedToastEscapeKeyDownRef.current=!1}),children:(0,z.jsx)(U.li,{tabIndex:0,"data-state":a?`open`:`closed`,"data-swipe-direction":h.swipeDirection,...m,ref:v,style:{userSelect:`none`,touchAction:`none`,...e.style},onKeyDown:F(e.onKeyDown,e=>{e.key===`Escape`&&(s?.(e.nativeEvent),e.nativeEvent.defaultPrevented||(h.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:F(e.onPointerDown,e=>{e.button===0&&(y.current={x:e.clientX,y:e.clientY})}),onPointerMove:F(e.onPointerMove,e=>{if(!y.current)return;let t=e.clientX-y.current.x,n=e.clientY-y.current.y,r=!!x.current,i=[`left`,`right`].includes(h.swipeDirection),a=[`left`,`up`].includes(h.swipeDirection)?Math.min:Math.max,o=i?a(0,t):0,s=i?0:a(0,n),c=e.pointerType===`touch`?10:2,l={x:o,y:s},f={originalEvent:e,delta:l};r?(x.current=l,kt(dt,d,f,{discrete:!1})):At(l,h.swipeDirection,c)?(x.current=l,kt(ut,u,f,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>c||Math.abs(n)>c)&&(y.current=null)}),onPointerUp:F(e.onPointerUp,e=>{let t=x.current,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),x.current=null,y.current=null,t){let n=e.currentTarget,r={originalEvent:e,delta:t};At(t,h.swipeDirection,h.swipeThreshold)?kt(pt,p,r,{discrete:!0}):kt(ft,f,r,{discrete:!0}),n.addEventListener(`click`,e=>e.preventDefault(),{once:!0})}})})})}),h.viewport)})]}):null}),vt=e=>{let{__scopeToast:t,children:n,...r}=e,i=et(lt,t),[a,o]=b.useState(!1),[s,c]=b.useState(!1);return jt(()=>o(!0)),b.useEffect(()=>{let e=window.setTimeout(()=>c(!0),1e3);return()=>window.clearTimeout(e)},[]),s?null:(0,z.jsx)(Pe,{asChild:!0,children:(0,z.jsx)(Ke,{...r,children:a&&(0,z.jsxs)(z.Fragment,{children:[i.label,` `,n]})})})},yt=`ToastTitle`,bt=b.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,z.jsx)(U.div,{...r,ref:t})});bt.displayName=yt;var xt=`ToastDescription`,St=b.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e;return(0,z.jsx)(U.div,{...r,ref:t})});St.displayName=xt;var Ct=`ToastAction`,wt=b.forwardRef((e,t)=>{let{altText:n,...r}=e;return n.trim()?(0,z.jsx)(Dt,{altText:n,asChild:!0,children:(0,z.jsx)(Et,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Ct}\`. Expected non-empty \`string\`.`),null)});wt.displayName=Ct;var Tt=`ToastClose`,Et=b.forwardRef((e,t)=>{let{__scopeToast:n,...r}=e,i=gt(Tt,n);return(0,z.jsx)(Dt,{asChild:!0,children:(0,z.jsx)(U.button,{type:`button`,...r,ref:t,onClick:F(e.onClick,i.onClose)})})});Et.displayName=Tt;var Dt=b.forwardRef((e,t)=>{let{__scopeToast:n,altText:r,...i}=e;return(0,z.jsx)(U.div,{"data-radix-toast-announce-exclude":``,"data-radix-toast-announce-alt":r||void 0,...i,ref:t})});function Ot(e){let t=[];
8return Array.from(e.childNodes).forEach(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),Mt(e)){let n=e.ariaHidden||e.hidden||e.style.display===`none`,r=e.dataset.radixToastAnnounceExclude===``;if(!n)if(r){let n=e.dataset.radixToastAnnounceAlt;n&&t.push(n)}else t.push(...Ot(e))}}),t}function kt(e,t,n,{discrete:r}){let i=n.originalEvent.currentTarget,a=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?me(i,a):i.dispatchEvent(a)}var At=(e,t,n=0)=>{let r=Math.abs(e.x),i=Math.abs(e.y),a=r>i;return t===`left`||t===`right`?a&&r>n:!a&&i>n};function jt(e=()=>{}){let t=he(e);Me(()=>{let e=0,n=0;return e=window.requestAnimationFrame(()=>n=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(n)}},[t])}function Mt(e){return e.nodeType===e.ELEMENT_NODE}function Nt(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pt(e){let t=document.activeElement;return e.some(e=>e===t||(e.focus(),document.activeElement!==t))}var Ft=tt,It=ot,Lt=mt,Rt=bt,zt=St,Bt=wt,Vt=Et;function Ht(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`)if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Ht(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n);return r}function Ut(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Ht(e))&&(r&&(r+=` `),r+=t);return r}var Wt=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Gt=Ut,Kt=(e,t)=>n=>{if(t?.variants==null)return Gt(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Wt(t)||Wt(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Gt(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},qt=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),Jt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Yt={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`},Xt=(0,b.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,b.createElement)(`svg`,{ref:c,...Yt,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Jt(`lucide`,i),...s},[...o.map(([e,t])=>(0,b.createElement)(e,t)),...Array.isArray(a)?a:[a]])),W=(e,t)=>{let n=(0,b.forwardRef)(({className:n,...r},i)=>(0,b.createElement)(Xt,{ref:i,iconNode:t,className:Jt(`lucide-${qt(e)}`,n),...r}));return n.displayName=`${e}`,n},Zt=W(`ArrowDown`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Qt=W(`ArrowLeft`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),$t=W(`ArrowRight`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),en=W(`Bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),tn=W(`BookOpen`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),nn=W(`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`}]]),rn=W(`CalendarCheck`,[[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`m9 16 2 2 4-4`,key:`19s6y9`}]]),an=W(`CalendarHeart`,[[`path`,{d:`M3 10h18V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7`,key:`136lmk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21.29 14.7a2.43 2.43 0 0 0-2.65-.52c-.3.12-.57.3-.8.53l-.34.34-.35-.34a2.43 2.43 0 0 0-2.65-.53c-.3.12-.56.3-.79.53-.95.94-1 2.53.2 3.74L17.5 22l3.6-3.55c1.2-1.21 1.14-2.8.19-3.74Z`,key:`1t7hil`}]]),on=W(`CalendarRange`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`4`,rx:`2`,key:`1hopcy`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`path`,{d:`M17 14h-6`,key:`bkmgh3`}],[`path`,{d:`M13 18H7`,key:`bb0bb7`}],[`path`,{d:`M7 14h.01`,key:`1qa3f1`}],[`path`,{d:`M17 18h.01`,key:`1bdyru`}
8]]),sn=W(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),cn=W(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),ln=W(`ChevronLeft`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),un=W(`ChevronRight`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),dn=W(`ChevronUp`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),fn=W(`Church`,[[`path`,{d:`M10 9h4`,key:`u4k05v`}],[`path`,{d:`M12 7v5`,key:`ma6bk`}],[`path`,{d:`M14 22v-4a2 2 0 0 0-4 0v4`,key:`1pdhuj`}],[`path`,{d:`M18 22V5.618a1 1 0 0 0-.553-.894l-4.553-2.277a2 2 0 0 0-1.788 0L6.553 4.724A1 1 0 0 0 6 5.618V22`,key:`1rkokr`}],[`path`,{d:`m18 7 3.447 1.724a1 1 0 0 1 .553.894V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9.618a1 1 0 0 1 .553-.894L6 7`,key:`1w6esw`}]]),pn=W(`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`}]]),mn=W(`CircleCheck`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),hn=W(`ClipboardCheck`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`m9 14 2 2 4-4`,key:`df797q`}]]),gn=W(`ClipboardList`,[[`rect`,{width:`8`,height:`4`,x:`8`,y:`2`,rx:`1`,ry:`1`,key:`tgr4d6`}],[`path`,{d:`M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2`,key:`116196`}],[`path`,{d:`M12 11h4`,key:`1jrz19`}],[`path`,{d:`M12 16h4`,key:`n85exb`}],[`path`,{d:`M8 11h.01`,key:`1dfujw`}],[`path`,{d:`M8 16h.01`,key:`18s6g9`}]]),_n=W(`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`}]]),vn=W(`Cross`,[[`path`,{d:`M4 9a2 2 0 0 0-2 2v2a2 2 0 0 0 2 2h4a1 1 0 0 1 1 1v4a2 2 0 0 0 2 2h2a2 2 0 0 0 2-2v-4a1 1 0 0 1 1-1h4a2 2 0 0 0 2-2v-2a2 2 0 0 0-2-2h-4a1 1 0 0 1-1-1V4a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4a1 1 0 0 1-1 1z`,key:`1xbrqy`}]]),yn=W(`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`}]]),bn=W(`DoorOpen`,[[`path`,{d:`M13 4h3a2 2 0 0 1 2 2v14`,key:`hrm0s9`}],[`path`,{d:`M2 20h3`,key:`1gaodv`}],[`path`,{d:`M13 20h9`,key:`s90cdi`}],[`path`,{d:`M10 12v.01`,key:`vx6srw`}],[`path`,{d:`M13 4.562v16.157a1 1 0 0 1-1.242.97L5 20V5.562a2 2 0 0 1 1.515-1.94l4-1A2 2 0 0 1 13 4.561Z`,key:`199qr4`}]]),xn=W(`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`}]]),Sn=W(`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`}]]),Cn=W(`EyeOff`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),wn=W(`FileCheck2`,[[`path`,{d:`M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4`,key:`1pf5j1`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`m3 15 2 2 4-4`,key:`1lhrkk`}]]),Tn=W(`FileDown`,[[`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:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`m9 15 3 3 3-3`,key:`1npd3o`}]]),En=W(`FileText`,[[`path`,{d:`M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z`,key:`1rqfz7`}],[`path`,{d:`M14 2v4a2 2 0 0 0 2 2h4`,key:`tnqrlb`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]),Dn=W(`FileUp`,[[`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:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),On=W(`Gavel`,[[`path`,{d:`m14.5 12.5-8 8a2.119 2.119 0 1 1-3-3l8-8`,key:`15492f`}],[`path`,{d:`m16 16 6-6`,key:`vzrcl6`}],[`path`,{d:`m8 8 6-6`,key:`18bi4p`}],[`path`,{d:`m9 7 8 8`,key:`5jnvq1`}],[`path`,{d:`m21 11-8-8`,key:`z4y7zo`}]]),kn=W(`GraduationCap`,[[`path`,{d:`M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z`,key:`j76jl0`}],[`path`,{d:`M22 10v6`,key:`1lu8f3`}],[`path`,{d:`M6 12.5V16a6 3 0 0 0 12 0v-3.5`,key:`1r8lef`}]]),An=W(`House`,[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`1d0kgt`}]]),jn=W(`Inbox`,[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`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`}
8]]),Mn=W(`KeyRound`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Nn=W(`Landmark`,[[`line`,{x1:`3`,x2:`21`,y1:`22`,y2:`22`,key:`j8o0r`}],[`line`,{x1:`6`,x2:`6`,y1:`18`,y2:`11`,key:`10tf0k`}],[`line`,{x1:`10`,x2:`10`,y1:`18`,y2:`11`,key:`54lgf6`}],[`line`,{x1:`14`,x2:`14`,y1:`18`,y2:`11`,key:`380y`}],[`line`,{x1:`18`,x2:`18`,y1:`18`,y2:`11`,key:`1kevvc`}],[`polygon`,{points:`12 2 20 7 4 7`,key:`jkujk7`}]]),Pn=W(`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`}]]),Fn=W(`LayoutGrid`,[[`rect`,{width:`7`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`1g98yp`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`3`,rx:`1`,key:`6d4xhi`}],[`rect`,{width:`7`,height:`7`,x:`14`,y:`14`,rx:`1`,key:`nxv5o0`}],[`rect`,{width:`7`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`1bb6yr`}]]),In=W(`Link2`,[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`,key:`8i5ue5`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`,key:`1b9ql8`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`,key:`1jonct`}]]),Ln=W(`LoaderCircle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),Rn=W(`Lock`,[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]),zn=W(`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`}]]),Bn=W(`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`}]]),Vn=W(`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`}]]),Hn=W(`MessagesSquare`,[[`path`,{d:`M14 9a2 2 0 0 1-2 2H6l-4 4V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2z`,key:`p1xzt8`}],[`path`,{d:`M18 9h2a2 2 0 0 1 2 2v11l-4-4h-6a2 2 0 0 1-2-2v-1`,key:`1cx29u`}]]),Un=W(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Wn=W(`Newspaper`,[[`path`,{d:`M4 22h16a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H8a2 2 0 0 0-2 2v16a2 2 0 0 1-2 2Zm0 0a2 2 0 0 1-2-2v-9c0-1.1.9-2 2-2h2`,key:`7pis2x`}],[`path`,{d:`M18 14h-8`,key:`sponae`}],[`path`,{d:`M15 18h-5`,key:`95g1m2`}],[`path`,{d:`M10 6h8v4h-8V6Z`,key:`smlsk5`}]]),Gn=W(`Play`,[[`polygon`,{points:`6 3 20 12 6 21 6 3`,key:`1oa8hb`}]]),Kn=W(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),qn=W(`PoundSterling`,[[`path`,{d:`M18 7c0-5.333-8-5.333-8 0`,key:`1prm2n`}],[`path`,{d:`M10 7v14`,key:`18tmcs`}],[`path`,{d:`M6 21h12`,key:`4dkmi1`}],[`path`,{d:`M6 13h10`,key:`ybwr4a`}]]),Jn=W(`Printer`,[[`path`,{d:`M6 18H4a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2h-2`,key:`143wyd`}],[`path`,{d:`M6 9V3a1 1 0 0 1 1-1h10a1 1 0 0 1 1 1v6`,key:`1itne7`}],[`rect`,{x:`6`,y:`14`,width:`12`,height:`8`,rx:`1`,key:`1ue0tg`}]]),Yn=W(`ReceiptText`,[[`path`,{d:`M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z`,key:`q3az6g`}],[`path`,{d:`M14 8H8`,key:`1l3xfs`}],[`path`,{d:`M16 12H8`,key:`1fr5h0`}],[`path`,{d:`M13 16H8`,key:`wsln4y`}]]),Xn=W(`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`}]]),Zn=W(`Search`,[[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}],[`path`,{d:`m21 21-4.3-4.3`,key:`1qie3q`}]]),Qn=W(`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`}]]),$n=W(`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`}]]),er=W(`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`}]]),tr=W(`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`}]]),nr=W(`Trash2`,[[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6`,key:`4alrt4`}
vendor: 16,331 bytes, line 8
8],[`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`}]]),rr=W(`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`}]]),ir=W(`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`}]]),ar=W(`UserCog`,[[`circle`,{cx:`18`,cy:`15`,r:`3`,key:`gjjjvw`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`path`,{d:`M10 15H6a4 4 0 0 0-4 4v2`,key:`1nfge6`}],[`path`,{d:`m21.7 16.4-.9-.3`,key:`12j9ji`}],[`path`,{d:`m15.2 13.9-.9-.3`,key:`1fdjdi`}],[`path`,{d:`m16.6 18.7.3-.9`,key:`heedtr`}],[`path`,{d:`m19.1 12.2.3-.9`,key:`1af3ki`}],[`path`,{d:`m19.6 18.7-.4-1`,key:`1x9vze`}],[`path`,{d:`m16.8 12.3-.4-1`,key:`vqeiwj`}],[`path`,{d:`m14.3 16.6 1-.4`,key:`1qlj63`}],[`path`,{d:`m20.7 13.8 1-.4`,key:`1v5t8k`}]]),or=W(`UserPlus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]),sr=W(`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`}]]),cr=W(`Wallet`,[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`,key:`18etb6`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`,key:`xoc0q4`}]]),lr=W(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),ur=W(`Zap`,[[`path`,{d:`M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z`,key:`1xq2db`}]]),dr=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},fr=(e,t)=>({classGroupId:e,validator:t}),pr=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),mr=`-`,hr=[],gr=`arbitrary..`,_r=e=>{let t=br(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return yr(e);let n=e.split(mr);return vr(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?dr(i,t):t:i||hr}return n[e]||hr}}},vr=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=vr(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(mr):e.slice(t).join(mr),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},yr=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?gr+r:void 0})(),br=e=>{let{theme:t,classGroups:n}=e;return xr(n,t)},xr=(e,t)=>{let n=pr();for(let r in e){let i=e[r];Sr(i,n,r,t)}return n},Sr=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];Cr(i,t,n,r)}},Cr=(e,t,n,r)=>{if(typeof e==`string`){wr(e,t,n);return}if(typeof e==`function`){Tr(e,t,n,r);return}Er(e,t,n,r)},wr=(e,t,n)=>{let r=e===``?t:Dr(t,e);r.classGroupId=n},Tr=(e,t,n,r)=>{if(Or(e)){Sr(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(fr(n,e))},Er=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];Sr(o,Dr(t,a),n,r)}},Dr=(e,t)=>{let n=e,r=t.split(mr),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=pr(),n.nextPart.set(t,i)),n=i}return n},Or=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,kr=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},Ar=`!`,jr=`:`,Mr=[],Nr=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Pr=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===jr){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(Ar)?(c=s.slice(0,-1),l=!0):s.startsWith(Ar)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return Nr(t,l,c,u)};if(t){let e=t+jr,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):Nr(Mr,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},Fr=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},Ir=e=>({cache:kr(e.cacheSize),parseClassName:Pr(e),sortModifiers:Fr(e),..._r(e)}),Lr=/\s+/,Rr=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a}=t,o=[],s=e.trim().split(Lr),c=``;for(let e=s.length-1;e>=0;--e){let t=s[e],{isExternal:l,modifiers:u,hasImportantModifier:d,baseClassName:f,maybePostfixModifierPosition:p}=n(t);if(l){c=t+(c.length>0?` `+c:c);continue}let m=!!p,h=r(m?f.substring(0,p):f);if(!h){if(!m){c=t+(c.length>0?` `+c:c);continue}if(h=r(f),!h){c=t+(c.length>0?` `+c:c);continue}m=!1}let g=u.length===0?``:u.length===1?u[0]:a(u).join(`:`),_=d?g+Ar:g,v=_+h;if(o.indexOf(v)>-1)continue;o.push(v);let y=i(h,m);for(let e=0;e<y.length;++e){let t=y[e];o.push(_+t)}c=t+(c.length>0?` `+c:c)}return c},zr=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=Br(n))&&(i&&(i+=` `),i+=r);return i},Br=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=Br(e[r]))&&(n&&(n+=` `),n+=t);return n},Vr=(e,...t)=>{let n,r,i,a,o=o=>(n=Ir(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=Rr(e,n);return i(e,a),a};return a=o,(...e)=>a(zr(...e))},Hr=[],Ur=e=>{let t=t=>t[e]||Hr;return t.isThemeGetter=!0,t},Wr=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Gr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Kr=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,qr=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Jr=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Yr=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Xr=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Zr=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qr=e=>Kr.test(e),$r=e=>!!e&&!Number.isNaN(Number(e)),ei=e=>!!e&&Number.isInteger(Number(e)),ti=e=>e.endsWith(`%`)&&$r(e.slice(0,-1)),ni=e=>qr.test(e),ri=()=>!0,ii=e=>Jr.test(e)&&!Yr.test(e),ai=()=>!1,oi=e=>Xr.test(e),si=e=>Zr.test(e),ci=e=>!G(e)&&!_i(e),li=e=>Ti(e,ki,ai),G=e=>Wr.test(e),ui=e=>Ti(e,Ai,ii),di=e=>Ti(e,ji,$r),fi=e=>Ti(e,Ni,ri),pi=e=>Ti(e,Mi,ai),mi=e=>Ti(e,Di,ai),hi=e=>Ti(e,Oi,si),gi=e=>Ti(e,Pi,oi),_i=e=>Gr.test(e),vi=e=>Ei(e,Ai),yi=e=>Ei(e,Mi),bi=e=>Ei(e,Di),xi=e=>Ei(e,ki),Si=e=>Ei(e,Oi),Ci=e=>Ei(e,Pi,!0),wi=e=>Ei(e,Ni,!0),Ti=(e,t,n)=>{let r=Wr.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Ei=(e,t,n=!1)=>{let r=Gr.exec(e);return r?r[1]?t(r[1]):n:!1},Di=e=>e===`position`||e===`percentage`,Oi=e=>e===`image`||e===`url`,ki=e=>e===`length`||e===`size`||e===`bg-size`,Ai=e=>e===`length`,ji=e=>e===`number`,Mi=e=>e===`family-name`,Ni=e=>e===`number`||e===`weight`,Pi=e=>e===`shadow`,Fi=Vr(()=>{let e=Ur(`color`),t=Ur(`font`),n=Ur(`text`),r=Ur(`font-weight`),i=Ur(`tracking`),a=Ur(`leading`),o=Ur(`breakpoint`),s=Ur(`container`),c=Ur(`spacing`),l=Ur(`radius`),u=Ur(`shadow`),d=Ur(`inset-shadow`),f=Ur(`text-shadow`),p=Ur(`drop-shadow`),m=Ur(`blur`),h=Ur(`perspective`),g=Ur(`aspect`),_=Ur(`ease`),v=Ur(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),_i,G],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[_i,G,c],T=()=>[Qr,`full`,`auto`,...w()],E=()=>[ei,`none`,`subgrid`,_i,G],D=()=>[`auto`,{span:[`full`,ei,_i,G]},ei,_i,G],O=()=>[ei,`auto`,_i,G],k=()=>[`auto`,`min`,`max`,`fr`,_i,G],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[Qr,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[Qr,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],F=()=>[Qr,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],I=()=>[e,_i,G],ee=()=>[...b(),bi,mi,{position:[_i,G]}],L=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],R=()=>[`auto`,`cover`,`contain`,xi,li,{size:[_i,G]}],z=()=>[ti,vi,ui],B=()=>[``,`none`,`full`,l,_i,G],V=()=>[``,$r,vi,ui],te=()=>[`solid`,`dashed`,`dotted`,`double`],ne=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],re=()=>[$r,ti,bi,mi],ie=()=>[``,`none`,m,_i,G],ae=()=>[`none`,$r,_i,G],oe=()=>[`none`,$r,_i,G],se=()=>[$r,_i,G],ce=()=>[Qr,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[ni],breakpoint:[ni],color:[ri],container:[ni],"drop-shadow":[ni],ease:[`in`,`out`,`in-out`],font:[ci],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[ni],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[ni],shadow:[ni],spacing:[`px`,$r],text:[ni],"text-shadow":[ni],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,Qr,G,_i,g]}],container:[`container`],columns:[{columns:[$r,G,_i,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"break-inside":[{"break-inside":[`auto`,`avoid`,`avoid-page`,`avoid-column`]}],"box-decoration":[{"box-decoration":[`slice`,`clone`]}],box:[{box:[`border`,`content`]}],display:[`block`,`inline-block`,`inline`,`flex`,`inline-flex`,`table`,`inline-table`,`table-caption`,`table-cell`,`table-column`,`table-column-group`,`table-footer-group`,`table-header-group`,`table-row-group`,`table-row`,`flow-root`,`grid`,`inline-grid`,`contents`,`list-item`,`hidden`],sr:[`sr-only`,`not-sr-only`],float:[{float:[`right`,`left`,`none`,`start`,`end`]}],clear:[{clear:[`left`,`right`,`both`,`none`,`start`,`end`]}],isolation:[`isolate`,`isolation-auto`],"object-fit":[{object:[`contain`,`cover`,`fill`,`none`,`scale-down`]}],"object-position":[{object:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[ei,`auto`,_i,G]}],basis:[{basis:[Qr,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[$r,Qr,`auto`,`initial`,`none`,G]}],grow:[{grow:[``,$r,_i,G]}],shrink:[{shrink:[``,$r,_i,G]}],order:[{order:[ei,`first`,`last`,`none`,_i,G]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...P()]}],"min-inline-size":[{"min-inline":[`auto`,...P()]}],"max-inline-size":[{"max-inline":[`none`,...P()]}],"block-size":[{block:[`auto`,...F()]}],"min-block-size":[{"min-block":[`auto`,...F()]}],"max-block-size":[{"max-block":[`none`,...F()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,vi,ui]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,wi,fi]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,ti,G]}],"font-family":[{font:[yi,pi,t]}],"font-features":[{"font-features":[G]}],"fvn-normal":[`normal-nums`],"fvn-ordinal":[`ordinal`],"fvn-slashed-zero":[`slashed-zero`],"fvn-figure":[`lining-nums`,`oldstyle-nums`],"fvn-spacing":[`proportional-nums`,`tabular-nums`],"fvn-fraction":[`diagonal-fractions`,`stacked-fractions`],tracking:[{tracking:[i,_i,G]}],"line-clamp":[{"line-clamp":[$r,`none`,_i,di]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,_i,G]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,_i,G]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...te(),`wavy`]}],"text-decoration-thickness":[{decoration:[$r,`from-font`,`auto`,_i,ui]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[$r,`auto`,_i,G]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,_i,G]}],whitespace:[{whitespace:[`normal`,`nowrap`,`pre`,`pre-line`,`pre-wrap`,`break-spaces`]}],break:[{break:[`normal`,`words`,`all`,`keep`]}],wrap:[{wrap:[`break-word`,`anywhere`,`normal`]}],hyphens:[{hyphens:[`none`,`manual`,`auto`]}],content:[{content:[`none`,_i,G]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:ee()}],"bg-repeat":[{bg:L()}],"bg-size":[{bg:R()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},ei,_i,G],radial:[``,_i,G],conic:[ei,_i,G]},Si,hi]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:z()}
8],"gradient-via-pos":[{via:z()}],"gradient-to-pos":[{to:z()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:B()}],"rounded-s":[{"rounded-s":B()}],"rounded-e":[{"rounded-e":B()}],"rounded-t":[{"rounded-t":B()}],"rounded-r":[{"rounded-r":B()}],"rounded-b":[{"rounded-b":B()}],"rounded-l":[{"rounded-l":B()}],"rounded-ss":[{"rounded-ss":B()}],"rounded-se":[{"rounded-se":B()}],"rounded-ee":[{"rounded-ee":B()}],"rounded-es":[{"rounded-es":B()}],"rounded-tl":[{"rounded-tl":B()}],"rounded-tr":[{"rounded-tr":B()}],"rounded-br":[{"rounded-br":B()}],"rounded-bl":[{"rounded-bl":B()}],"border-w":[{border:V()}],"border-w-x":[{"border-x":V()}],"border-w-y":[{"border-y":V()}],"border-w-s":[{"border-s":V()}],"border-w-e":[{"border-e":V()}],"border-w-bs":[{"border-bs":V()}],"border-w-be":[{"border-be":V()}],"border-w-t":[{"border-t":V()}],"border-w-r":[{"border-r":V()}],"border-w-b":[{"border-b":V()}],"border-w-l":[{"border-l":V()}],"divide-x":[{"divide-x":V()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":V()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...te(),`hidden`,`none`]}],"divide-style":[{divide:[...te(),`hidden`,`none`]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}
vendor: 6,203 bytes, line 8
8],"divide-color":[{divide:I()}],"outline-style":[{outline:[...te(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[$r,_i,G]}],"outline-w":[{outline:[``,$r,vi,ui]}],"outline-color":[{outline:I()}],shadow:[{shadow:[``,`none`,u,Ci,gi]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":[`none`,d,Ci,gi]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:V()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[$r,ui]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":V()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":[`none`,f,Ci,gi]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[$r,_i,G]}],"mix-blend":[{"mix-blend":[...ne(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":ne()}],"mask-clip":[{"mask-clip":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]},`mask-no-clip`],"mask-composite":[{mask:[`add`,`subtract`,`intersect`,`exclude`]}],"mask-image-linear-pos":[{"mask-linear":[$r]}],"mask-image-linear-from-pos":[{"mask-linear-from":re()}],"mask-image-linear-to-pos":[{"mask-linear-to":re()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":re()}],"mask-image-t-to-pos":[{"mask-t-to":re()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":re()}],"mask-image-r-to-pos":[{"mask-r-to":re()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":re()}],"mask-image-b-to-pos":[{"mask-b-to":re()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":re()}],"mask-image-l-to-pos":[{"mask-l-to":re()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":re()}],"mask-image-x-to-pos":[{"mask-x-to":re()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":re()}],"mask-image-y-to-pos":[{"mask-y-to":re()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[_i,G]}],"mask-image-radial-from-pos":[{"mask-radial-from":re()}],"mask-image-radial-to-pos":[{"mask-radial-to":re()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":[`circle`,`ellipse`]}],"mask-image-radial-size":[{"mask-radial":[{closest:[`side`,`corner`],farthest:[`side`,`corner`]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[$r]}],"mask-image-conic-from-pos":[{"mask-conic-from":re()}],"mask-image-conic-to-pos":[{"mask-conic-to":re()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:ee()}],"mask-repeat":[{mask:L()}],"mask-size":[{mask:R()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,_i,G]}],filter:[{filter:[``,`none`,_i,G]}],blur:[{blur:ie()}],brightness:[{brightness:[$r,_i,G]}],contrast:[{contrast:[$r,_i,G]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,Ci,gi]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:[``,$r,_i,G]}],"hue-rotate":[{"hue-rotate":[$r,_i,G]}],invert:[{invert:[``,$r,_i,G]}],saturate:[{saturate:[$r,_i,G]}],sepia:[{sepia:[``,$r,_i,G]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,_i,G]}],"backdrop-blur":[{"backdrop-blur":ie()}],"backdrop-brightness":[{"backdrop-brightness":[$r,_i,G]}],"backdrop-contrast":[{"backdrop-contrast":[$r,_i,G]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,$r,_i,G]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[$r,_i,G]}],"backdrop-invert":[{"backdrop-invert":[``,$r,_i,G]}],"backdrop-opacity":[{"backdrop-opacity":[$r,_i,G]}],"backdrop-saturate":[{"backdrop-saturate":[$r,_i,G]}],"backdrop-sepia":[{"backdrop-sepia":[``,$r,_i,G]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,_i,G]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[$r,`initial`,_i,G]}],ease:[{ease:[`linear`,`initial`,_,_i,G]}],delay:[{delay:[$r,_i,G]}],animate:[{animate:[`none`,v,_i,G]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,_i,G]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ae()}],"rotate-x":[{"rotate-x":ae()}],"rotate-y":[{"rotate-y":ae()}],"rotate-z":[{"rotate-z":ae()}],scale:[{scale:oe()}],"scale-x":[{"scale-x":oe()}],"scale-y":[{"scale-y":oe()}],"scale-z":[{"scale-z":oe()}],"scale-3d":[`scale-3d`],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[_i,G,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:ce()}],"translate-x":[{"translate-x":ce()}],"translate-y":[{"translate-y":ce()}],"translate-z":[{"translate-z":ce()}],"translate-none":[`translate-none`],accent:[{accent:I()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:[`normal`,`dark`,`light`,`light-dark`,`only-dark`,`only-light`]}],cursor:[{cursor:[`auto`,`default`,`pointer`,`wait`,`text`,`move`,`help`,`not-allowed`,`none`,`context-menu`,`progress`,`cell`,`crosshair`,`vertical-text`,`alias`,`copy`,`no-drop`,`grab`,`grabbing`,`all-scroll`,`col-resize`,`row-resize`,`n-resize`,`e-resize`,`s-resize`,`w-resize`,`ne-resize`,`nw-resize`,`se-resize`,`sw-resize`,`ew-resize`,`ns-resize`,`nesw-resize`,`nwse-resize`,`zoom
8-in`,`zoom-out`,_i,G]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"snap-align":[{snap:[`start`,`end`,`center`,`align-none`]}],"snap-stop":[{snap:[`normal`,`always`]}],"snap-type":[{snap:[`none`,`x`,`y`,`both`]}],"snap-strictness":[{snap:[`mandatory`,`proximity`]}
8],touch:[{touch:[`auto`,`none`,`manipulation`]}],"touch-x":[{"touch-pan":[`x`,`left`,`right`]}],"touch-y":[{"touch-pan":[`y`,`up`,`down`]}],"touch-pz":[`touch-pinch-zoom`],select:[{select:[`none`,`text`,`all`,`auto`]}],"will-change":[{"will-change":[`auto`,`scroll`,`contents`,`transform`,_i,G]}],fill:[{fill:[`none`,...I()]}],"stroke-w":[{stroke:[$r,vi,ui,di]}],stroke:[{stroke:[`none`,...I()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function K(...e){return Fi(Ut(e))}window.self,window.top;var Ii=Ft,Li=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(It,{ref:n,className:K(`fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]`,e),...t}));Li.displayName=It.displayName;var Ri=Kt(`group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full`,{variants:{variant:{default:`border bg-background text-foreground`,destructive:`destructive group border-destructive bg-destructive text-destructive-foreground`}},defaultVariants:{variant:`default`}}),zi=b.forwardRef(({className:e,variant:t,...n},r)=>(0,z.jsx)(Lt,{ref:r,className:K(Ri({variant:t}),e),...n}));zi.displayName=Lt.displayName;var Bi=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Bt,{ref:n,className:K(`inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive`,e),...t}));Bi.displayName=Bt.displayName;var Vi=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Vt,{ref:n,className:K(`absolute right-2 top-2 rounded-md p-1 text-foreground
8/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600`,e),"toast-close":``,...t,children:(0,z.jsx)(lr,{className:`h-4 w-4`})}));Vi.displayName=Vt.displayName;var Hi=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(Rt,{ref:n,className:K(`text-sm font-semibold`,e),...t}));Hi.displayName=Rt.displayName;var Ui=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(zt,{ref:n,className:K(`text-sm opacity-90`,e),...t}));Ui.displayName=zt.displayName;function Wi(){let{toasts:e}=N();return(0,z.jsxs)(Ii,{children:[e.map(function({id:e,title:t,description:n,action:r,...i}){return(0,z.jsxs)(zi,{...i,children:[(0,z.jsxs)(`div`,{className:`grid gap-1`,children:[t&&(0,z.jsx)(Hi,{children:t}),n&&(0,z.jsx)(Ui,{children:n})]}),r,(0,z.jsx)(Vi,{})]},e)}),(0,z.jsx)(Li,{})]})}var Gi=(e,t,n,r,i,a,o,s)=>{let c=document.documentElement,l=[`light`,`dark`];function u(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n=e===`class`,r=n&&a?i.map(e=>a[e]||e):i;n?(c.classList.remove(...r),c.classList.add(a&&a[t]?a[t]:t)):c.setAttribute(e,t)}),d(t)}function d(e){s&&l.includes(e)&&(c.style.colorScheme=e)}function f(){return window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`}if(r)u(r);else try{let e=localStorage.getItem(t)||n;u(o&&e===`system`?f():e)}catch{}},Ki=[`light`,`dark`],qi=`(prefers-color-scheme: dark)`,Ji=typeof window>`u`,Yi=b.createContext(void 0),Xi=e=>b.useContext(Yi)?b.createElement(b.Fragment,null,e.children):b.createElement(Qi,{...e}),Zi=[`light`,`dark`],Qi=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:i=`theme`,themes:a=Zi,defaultTheme:o=n?`system`:`light`,attribute:s=`data-theme`,value:c,children:l,nonce:u,scriptProps:d})=>{let[f,p]=b.useState(()=>ea(i,o)),[m,h]=b.useState(()=>f===`system`?na():f),g=c?Object.values(c):a,_=b.useCallback(e=>{let i=e;if(!i)return;e===`system`&&n&&(i=na());let a=c?c[i]:i,l=t?ta(u):null,d=document.documentElement,f=e=>{e===`class`?(d.classList.remove(...g),a&&d.classList.add(a)):e.startsWith(`data-`)&&(a?d.setAttribute(e,a):d.removeAttribute(e))};if(Array.isArray(s)?s.forEach(f):f(s),r){let e=Ki.includes(o)?o:null,t=Ki.includes(i)?i:e;d.style.colorScheme=t}l?.()},[u]),v=b.useCallback(e=>{let t=typeof e==`function`?e(f):e;p(t);try{localStorage.setItem(i,t)}catch{}},[f]),y=b.useCallback(t=>{let r=na(t);h(r),f===`system`&&n&&!e&&_(`system`)},[f,e]);b.useEffect(()=>{let e=window.matchMedia(qi);return e.addListener(y),y(e),()=>e.removeListener(y)},[y]),b.useEffect(()=>{let e=e=>{e.key===i&&(e.newValue?p(e.newValue):v(o))};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[v]),b.useEffect(()=>{_(e??f)},[e,f]);let x=b.useMemo(()=>({theme:f,setTheme:v,forcedTheme:e,resolvedTheme:f===`system`?m:f,themes:n?[...a,`system`]:a,systemTheme:n?m:void 0}),[f,v,e,m,n,a]);return b.createElement(Yi.Provider,{value:x},b.createElement($i,{forcedTheme:e,storageKey:i,attribute:s,enableSystem:n,enableColorScheme:r,defaultTheme:o,value:c,themes:a,nonce:u,scriptProps:d}),l)},$i=b.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:i,defaultTheme:a,value:o,themes:s,nonce:c,scriptProps:l})=>{let u=JSON.stringify([n,t,a,e,s,o,r,i]).slice(1,-1);return b.createElement(`script`,{...l,suppressHydrationWarning:!0,nonce:typeof window>`u`?c:``,dangerouslySetInnerHTML:{__html:`(${Gi.toString()})(${u})`}})}),ea=(e,t)=>{if(Ji)return;let n;try{n=localStorage.getItem(e)||void 0}catch{}return n||t},ta=e=>{let t=document.createElement(`style`);return e&&t.setAttribute(`nonce`,e),t.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},na=e=>
8(e||=window.matchMedia(qi),e.matches?`dark`:`light`),ra=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ia={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},aa=new class{#e=ia;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function oa(e){setTimeout(e,0)}var sa=typeof window>`u`||`Deno`in globalThis;function ca(){}function la(e,t){return typeof e==`function`?e(t):e}function ua(e){return typeof e==`number`&&e>=0&&e!==1/0}function da(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fa(e,t){return typeof e==`function`?e(t):e}function pa(e,t){return typeof e==`function`?e(t):e}function ma(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==ga(o,t.options))return!1}else if(!va(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function ha(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(_a(t.options.mutationKey)!==_a(a))return!1}else if(!va(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function ga(e,t){return(t?.queryKeyHashFn||_a)(e)}function _a(e){return JSON.stringify(e,(e,t)=>Ca(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function va(e,t){return e===t?!0:typeof e==typeof t&&e&&t&&typeof e==`object`&&typeof t==`object`?Object.keys(t).every(n=>va(e[n],t[n])):!1}var ya=Object.prototype.hasOwnProperty;function ba(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Sa(e)&&Sa(t);if(!r&&!(Ca(e)&&Ca(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:ya.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=ba(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function xa(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Sa(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ca(e){if(!wa(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!wa(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function wa(e){return Object.prototype.toString.call(e)===`[object Object]`}function Ta(e){return new Promise(t=>{aa.setTimeout(t,e)})}function Ea(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:ba(e,t)}function Da(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function Oa(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ka=Symbol();function Aa(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ka?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function ja(e,t){return typeof e==`function`?e(...t):!!e}function Ma(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Na=new class extends ra{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!sa&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();
8this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}};function Pa(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var Fa=oa;function Ia(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=Fa,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var La=Ia(),Ra=new class extends ra{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!sa&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function za(e){return Math.min(1e3*2**e,3e4)}function Ba(e){return(e??`online`)!==`online`||Ra.isOnline()}var Va=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Ha(e){let t=!1,n=0,r,i=Pa(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Va(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>Na.isFocused()&&(e.networkMode===`always`||Ra.isOnline())&&e.canRun(),u=()=>Ba(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(d).catch(r=>{if(a())return;let i=e.retry??(sa?0:3),o=e.retryDelay??za,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),Ta(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Ua=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ua(this.gcTime)&&(this.#e=aa.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(sa?1/0:3e5))}clearGcTimeout(){this.#e&&=(aa.clearTimeout(this.#e),void 0)}},Wa=class extends Ua{#e;#t;#n;#r;#i;#a;#o;constructor(e){super(),this.#o=!1,this.#a=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#r=e.client,this.#n=this.#r.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=qa(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#i?.promise}setOptions(e){if(this.options={...this.#a,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=qa(this.options);e.data!==void 0&&(this.setState(Ka(e.data,e.dataUpdatedAt)),this.#e=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#n.remove(this)}setData(e,t){let n=Ea(this.state.data,e,this.options);return this.#s({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#s({type:`setState`,state:e,setStateOptions:t})}cancel(e){let t=this.#i?.promise;return this.#i?.cancel(e),t?t.then(ca).catch(ca):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>pa(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ka||this.state.dataUpdateCount+this.state.errorUpdate
8Count===0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>fa(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!da(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#i?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#i?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#i&&(this.#o?this.#i.cancel({revert:!0}):this.#i.cancelRetry()),this.scheduleGc()),this.#n.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#s({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#i?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#i)return this.#i.continueRetry(),this.#i.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},i=()=>{let e=Aa(this.options,t),n=(()=>{let e={client:this.#r,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#o=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:i};return r(e),e})();this.options.behavior?.onFetch(a,this),this.#t=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#s({type:`fetch`,meta:a.fetchOptions?.meta}),this.#i=Ha({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Va&&e.revert&&this.setState({...this.#t,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#s({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#s({type:`pause`})},onContinue:()=>{this.#s({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#i.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#n.config.onSuccess?.(e,this),this.#n.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof Va){if(e.silent)return this.#i.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#s({type:`error`,error:e}),this.#n.config.onError?.(e,this),this.#n.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#s(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Ga(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ka(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),La.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#n.notify({query:this,type:`updated`,action:e})})}};function Ga(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ba(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ka(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function qa(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdate
8Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var Ja=class extends ra{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Pa(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Xa(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Za(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Za(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof pa(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!xa(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&Qa(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||pa(this.options.enabled,this.#t)!==pa(t.enabled,this.#t)||fa(this.options.staleTime,this.#t)!==fa(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||pa(this.options.enabled,this.#t)!==pa(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return eo(this,n)&&(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ca)),t}#g(){this.#b();let e=fa(this.options.staleTime,this.#t);if(sa||this.#r.isStale||!ua(e))return;let t=da(this.#r.dataUpdatedAt,e)+1;this.#d=aa.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(sa||pa(this.options.enabled,this.#t)===!1||!ua(this.#p)||this.#p===0)&&(this.#f=aa.setInterval(()=>{(this.options.refetchIntervalInBackground||Na.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d&&=(aa.clearTimeout(this.#d),void 0)}#x(){this.#f&&=(aa.clearInterval(this.#f),void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&Xa(e,t),o=i&&Qa(e,n,t,r);(a||o)&&(l={...l,...Ga(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=Ea(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h)if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=Ea(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdate
8Count:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:$a(e,t),refetch:this.refetch,promise:this.#o,isEnabled:pa(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=Pa();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a()}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!xa(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})()}))}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#C(e){La.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function Ya(e,t){return pa(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||t.retryOnMount!==!1)}function Xa(e,t){return Ya(e,t)||e.state.data!==void 0&&Za(e,t,t.refetchOnMount)}function Za(e,t,n){if(pa(t.enabled,e)!==!1&&fa(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&$a(e,t)}return!1}function Qa(e,t,n,r){return(e!==t||pa(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&$a(e,n)}function $a(e,t){return pa(t.enabled,e)!==!1&&e.isStaleByTime(fa(t.staleTime,e))}function eo(e,t){return!xa(e.getCurrentResult(),t)}function to(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Ma(e,()=>t.signal,()=>n=!0)},u=Aa(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject();if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?Oa:Da;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?ro:no,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:no(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function no(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ro(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var io=class extends Ua{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||ao(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=Ha({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});
8let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),La.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function ao(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var oo=class extends ra{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new io({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=so(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=so(e);if(typeof t==`string`){let n=this.#t.get(t);if(n)if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=so(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=so(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>
8t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){La.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ha(t,e))}findAll(e={}){return this.getAll().filter(t=>ha(e,t))}notify(e){La.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return La.batch(()=>Promise.all(e.map(e=>e.continue().catch(ca))))}};function so(e){return e.options.scope?.id}var co=class extends ra{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??ga(r,t),a=this.get(i);return a||(a=new Wa({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){La.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ma(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ma(e,t)):t}notify(e){La.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){La.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){La.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},lo=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new co,this.#t=e.mutationCache||new oo,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=Na.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ra.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(fa(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=la(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return La.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;La.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return La.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=La.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(ca).catch(ca)}invalidateQueries(e,t={}){return La.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=La.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(ca)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(ca)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(fa(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ca).catch(ca)}fetchInfiniteQuery(e){return e.behavior=to(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ca).catch(ca)}ensureInfiniteQueryData(e){return e.behavior=to(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return Ra.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(_a(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{va(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(_a(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{va(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=ga(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===ka&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},uo=b.createContext(void 0),fo=e=>{let t=b.useContext(uo);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},po=({client:e,children:t})=>(b.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,z.jsx)(uo.Provider,{value:e,children:t})),mo=b.createContext(!1),ho=()=>b.useContext(mo);mo.Provider;function go(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}
8var _o=b.createContext(go()),vo=()=>b.useContext(_o),yo=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?ja(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},bo=e=>{b.useEffect(()=>{e.clearReset()},[e])},xo=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||ja(n,[e.error,r])),So=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Co=(e,t)=>e.isLoading&&e.isFetching&&!t,wo=(e,t)=>e?.suspense&&t.isPending,To=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Eo(e,t,n){let r=ho(),i=vo(),a=fo(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o._optimisticResults=r?`isRestoring`:`optimistic`,So(o),yo(o,i,s),bo(i);let c=!a.getQueryCache().get(o.queryHash),[l]=b.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&e.subscribed!==!1;if(b.useSyncExternalStore(b.useCallback(e=>{let t=d?l.subscribe(La.batchCalls(e)):ca;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),b.useEffect(()=>{l.setOptions(o)},[o,l]),wo(o,u))throw To(o,l,i);if(xo({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,u),o.experimental_prefetchInRender&&!sa&&Co(u,r)&&(c?To(o,l,i):s?.promise)?.catch(ca).finally(()=>{l.updateResult()}),o.notifyOnChangeProps?u:l.trackResult(u)}function Do(e,t){return Eo(e,Ja,t)}var Oo=new lo({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});function ko(){return ko=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ko.apply(null,arguments)}var Ao;(function(e){e.Pop=`POP`,e.Push=`PUSH`,e.Replace=`REPLACE`})(Ao||={});var jo=`popstate`;function Mo(e){e===void 0&&(e={});function t(e,t){let{pathname:n,search:r,hash:i}=e.location;return Lo(``,{pathname:n,search:r,hash:i},t.state&&t.state.usr||null,t.state&&t.state.key||`default`)}function n(e,t){return typeof t==`string`?t:Ro(t)}return Bo(t,n,null,e)}function No(e,t){if(e===!1||e==null)throw Error(t)}function Po(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function Fo(){return Math.random().toString(36).substr(2,8)}function Io(e,t){return{usr:e.state,key:e.key,idx:t}}function Lo(e,t,n,r){return n===void 0&&(n=null),ko({pathname:typeof e==`string`?e:e.pathname,search:``,hash:``},typeof t==`string`?zo(t):t,{state:n,key:t&&t.key||r||Fo()})}function Ro(e){let{pathname:t=`/`,search:n=``,hash:r=``}=e;return n&&n!==`?`&&(t+=n.charAt(0)===`?`?n:`?`+n),r&&r!==`#`&&(t+=r.charAt(0)===`#`?r:`#`+r),t}function zo(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Bo(e,t,n,r){r===void 0&&(r={});let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=Ao.Pop,c=null,l=u();l??(l=0,o.replaceState(ko({},o.state,{idx:l}),``));function u(){return(o.state||{idx:null}).idx}function d(){s=Ao.Pop;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=Ao.Push;let r=Lo(h.location,e,t);n&&n(r,e),l=u()+1;let d=Io(r,l),f=h.createHref(r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=Ao.Replace;let r=Lo(h.location,e,t);n&&n(r,e),l=u();let i=Io(r,l),d=h.createHref(r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){let t=i.location.origin===`null`?i.location.href:i.location.origin,n=typeof e==`string`?e:Ro(e);return n=n.replace(/ $/,`%20`),No(t,`No window.location.(origin|href) available to create URL for href: `+n),new URL(n,t)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(jo,d),c=e,()=>{i.removeEventListener(jo,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}var Vo;(function(e){e.data=`data`,e.deferred=`deferred`,e.redirect=`redirect`,e.error=`error`})(Vo||={});
8function Ho(e,t,n){return n===void 0&&(n=`/`),Uo(e,t,n,!1)}function Uo(e,t,n,r){let i=os((typeof t==`string`?zo(t):t).pathname||`/`,n);if(i==null)return null;let a=Wo(e);Ko(a);let o=null,s=as(i);for(let e=0;o==null&&e<a.length;++e)o=ns(a[e],s,r);return o}function Wo(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r=``);let i=(e,i,a)=>{let o={relativePath:a===void 0?e.path||``:a,caseSensitive:e.caseSensitive===!0,childrenIndex:i,route:e};o.relativePath.startsWith(`/`)&&(No(o.relativePath.startsWith(r),`Absolute route path "`+o.relativePath+`" nested under path `+(`"`+r+`" is not valid. An absolute child route path `)+`must start with the combined path of all its parent routes.`),o.relativePath=o.relativePath.slice(r.length));let s=gs([r,o.relativePath]),c=n.concat(o);e.children&&e.children.length>0&&(No(e.index!==!0,`Index routes must not have child routes. Please remove `+(`all child routes from route path "`+s+`".`)),Wo(e.children,t,c,s)),!(e.path==null&&!e.index)&&t.push({path:s,score:es(s,e.index),routesMeta:c})};return e.forEach((e,t)=>{var n;if(e.path===``||!((n=e.path)!=null&&n.includes(`?`)))i(e,t);else for(let n of Go(e.path))i(e,t,n)}),t}function Go(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=Go(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function Ko(e){e.sort((e,t)=>e.score===t.score?ts(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var qo=/^:[\w-]+$/,Jo=3,Yo=2,Xo=1,Zo=10,Qo=-2,$o=e=>e===`*`;function es(e,t){let n=e.split(`/`),r=n.length;return n.some($o)&&(r+=Qo),t&&(r+=Yo),n.filter(e=>!$o(e)).reduce((e,t)=>e+(qo.test(t)?Jo:t===``?Xo:Zo),r)}function ts(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function ns(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u=rs({path:s.relativePath,caseSensitive:s.caseSensitive,end:c},l),d=s.route;if(!u&&c&&n&&!r[r.length-1].route.index&&(u=rs({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!u)return null;
8Object.assign(i,u.params),o.push({params:i,pathname:gs([a,u.pathname]),pathnameBase:_s(gs([a,u.pathnameBase])),route:d}),u.pathnameBase!==`/`&&(a=gs([a,u.pathnameBase]))}return o}function rs(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=is(e.path,e.caseSensitive,e.end),i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,t,n)=>{let{paramName:r,isOptional:i}=t;if(r===`*`){let e=s[n]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let c=s[n];return e[r]=i&&!c?void 0:(c||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function is(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Po(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "`+e+`" will be treated as if it were `+(`"`+e.replace(/\*$/,`/*`)+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+(`please change the route path to "`+e.replace(/\*$/,`/*`)+`".`));let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n)=>(r.push({paramName:t,isOptional:n!=null}),n?`/?([^\\/]+)?`:`/([^\\/]+)`));return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function as(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return Po(!1,`The URL path "`+e+`" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent `+(`encoding (`+t+`).`)),e}}function os(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}var ss=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,cs=e=>ss.test(e);function ls(e,t){t===void 0&&(t=`/`);let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?zo(e):e,a;if(n)if(cs(n))a=n;else{if(n.includes(`//`)){let e=n;n=hs(n),Po(!1,`Pathnames cannot have embedded double slashes - normalizing `+(e+` -> `+n))}a=n.startsWith(`/`)?us(n.substring(1),`/`):us(n,t)}else a=t;return{pathname:a,search:vs(r),hash:ys(i)}}function us(e,t){let n=t.replace(/\/+$/,``).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function ds(e,t,n,r){return`Cannot include a '`+e+`' character in a manually specified `+("`to."+t+"` field ["+JSON.stringify(r)+`]. Please separate it out to the `)+("`to."+n+"` field. Alternatively you may provide the full path as ")+`a string in <Link to="..."> and the router will parse it for you.`}function fs(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function ps(e,t){let n=fs(e);return t?n.map((e,t)=>t===n.length-1?e.pathname:e.pathnameBase):n.map(e=>e.pathnameBase)}function ms(e,t,n,r){r===void 0&&(r=!1);let i;typeof e==`string`?i=zo(e):(i=ko({},e),No(!i.pathname||!i.pathname.includes(`?`),ds(`?`,`pathname`,`search`,i)),No(!i.pathname||!i.pathname.includes(`#`),ds(`#`,`pathname`,`hash`,i)),No(!i.search||!i.search.includes(`#`),ds(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=ls(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var hs=e=>e.replace(/\/\/+/g,`/`),gs=e=>hs(e.join(`/`)),_s=e=>e.replace(/\/+$/,``).replace(/^\/*/,`/`),vs=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,ys=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e;function bs(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}var xs=[`post`,`put`,`patch`,`delete`];new Set(xs);var Ss=[`get`,...xs];new Set(Ss);function Cs(){return Cs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cs.apply(null,arguments)}var ws=b.createContext(null),Ts=b.createContext(null),Es=b.createContext(null),Ds=b.createContext(null),Os=b.createContext({outlet:null,matches:[],isDataRoute:!1}),ks=b.createContext(null);function As(e,t){let{relative:n}=t===void 0?{}:t;!js()&&No(!1);let{basename:r,navigator:i}=b.useContext(Es),{hash:a,pathname:o,search:s}=Bs(e,{relative:n}),c=o;return r!==`/`&&(c=o===`/`?r:gs([r,o])),i.createHref({pathname:c,search:s,hash:a})}function js(){return b.useContext(Ds)!=null}function Ms(){return!js()&&No(!1),b.useContext(Ds).location}function Ns(){return b.useContext(Ds).navigationType}function Ps(e){b.useContext(Es).static||b.useLayoutEffect(e)}function Fs(){let{isDataRoute:e}=b.useContext(Os);return e?tc():Is()}function Is(){!js()&&No(!1);let e=b.useContext(ws),{basename:t,future:n,navigator:r}=b.useContext(Es),{matches:i}=b.useContext(Os),{pathname:a}=Ms(),o=JSON.stringify(ps(i,n.v7_relativeSplatPath)),s=b.useRef(!1);return Ps(()=>{s.current=!0}
8),b.useCallback(function(n,i){if(i===void 0&&(i={}),!s.current)return;if(typeof n==`number`){r.go(n);return}let c=ms(n,JSON.parse(o),a,i.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:gs([t,c.pathname])),(i.replace?r.replace:r.push)(c,i.state,i)},[t,r,o,a,e])}var Ls=b.createContext(null);function Rs(e){let t=b.useContext(Os).outlet;return t&&b.createElement(Ls.Provider,{value:e},t)}function zs(){let{matches:e}=b.useContext(Os),t=e[e.length-1];return t?t.params:{}}function Bs(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=b.useContext(Es),{matches:i}=b.useContext(Os),{pathname:a}=Ms(),o=JSON.stringify(ps(i,r.v7_relativeSplatPath));return b.useMemo(()=>ms(e,JSON.parse(o),a,n===`path`),[e,o,a,n])}function Vs(e,t){return Hs(e,t)}function Hs(e,t,n,r){!js()&&No(!1);let{navigator:i}=b.useContext(Es),{matches:a}=b.useContext(Os),o=a[a.length-1],s=o?o.params:{};o&&o.pathname;let c=o?o.pathnameBase:`/`;o&&o.route;let l=Ms(),u;if(t){let e=typeof t==`string`?zo(t):t;!(c===`/`||e.pathname?.startsWith(c))&&No(!1),u=e}else u=l;let d=u.pathname||`/`,f=d;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);f=`/`+d.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let p=Ho(e,{pathname:f}),m=qs(p&&p.map(e=>Object.assign({},e,{params:Object.assign({},s,e.params),pathname:gs([c,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:gs([c,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),a,n,r);return t&&m?b.createElement(Ds.Provider,{value:{location:Cs({pathname:`/`,search:``,hash:``,state:null,key:`default`},u),navigationType:Ao.Pop}},m):m}function Us(){let e=ec(),t=bs(e)?e.status+` `+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return b.createElement(b.Fragment,null,b.createElement(`h2`,null,`Unexpected Application Error!`),b.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?b.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var Ws=b.createElement(Us,null),Gs=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error(`React Router caught the following error during render`,e,t)}render(){return this.state.error===void 0?this.props.children:b.createElement(Os.Provider,{value:this.props.routeContext},b.createElement(ks.Provider,{value:this.state.error,children:this.props.component}))}};function Ks(e){let{routeContext:t,match:n,children:r}=e,i=b.useContext(ws);return i&&i.static&&i.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=n.route.id),b.createElement(Os.Provider,{value:t},r)}function qs(e,t,n,r){if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let a=e,o=n?.errors;if(o!=null){let e=a.findIndex(e=>e.route.id&&o?.[e.route.id]!==void 0);!(e>=0)&&No(!1),a=a.slice(0,Math.min(a.length,e+1))}let s=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(c=e),t.route.id){let{loaderData:e,errors:r}=n,i=t.route.loader&&e[t.route.id]===void 0&&(!r||r[t.route.id]===void 0);if(t.route.lazy||i){s=!0,a=c>=0?a.slice(0,c+1):[a[0]];break}}}return a.reduceRight((e,r,i)=>{let l,u=!1,d=null,f=null;n&&(l=o&&r.route.id?o[r.route.id]:void 0,d=r.route.errorElement||Ws,s&&(c<0&&i===0?(rc(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),u=!0,f=null):c===i&&(u=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,i+1)),m=()=>{let t;return t=l?d:u?f:r.route.Component?b.createElement(r.route.Component,null):r.route.element?r.route.element:e,b.createElement(Ks,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:n!=null},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||i===0)?b.createElement(Gs,{location:n.location,revalidation:n.revalidation,component:d,error:l,children:m(),routeC
8ontext:{outlet:null,matches:p,isDataRoute:!0}}):m()},null)}var Js=function(e){return e.UseBlocker=`useBlocker`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e}(Js||{}),Ys=function(e){return e.UseBlocker=`useBlocker`,e.UseLoaderData=`useLoaderData`,e.UseActionData=`useActionData`,e.UseRouteError=`useRouteError`,e.UseNavigation=`useNavigation`,e.UseRouteLoaderData=`useRouteLoaderData`,e.UseMatches=`useMatches`,e.UseRevalidator=`useRevalidator`,e.UseNavigateStable=`useNavigate`,e.UseRouteId=`useRouteId`,e}(Ys||{});function Xs(e){let t=b.useContext(ws);return!t&&No(!1),t}function Zs(e){let t=b.useContext(Ts);return!t&&No(!1),t}function Qs(e){let t=b.useContext(Os);return!t&&No(!1),t}function $s(e){let t=Qs(e),n=t.matches[t.matches.length-1];return!n.route.id&&No(!1),n.route.id}function ec(){let e=b.useContext(ks),t=Zs(Ys.UseRouteError),n=$s(Ys.UseRouteError);return e===void 0?t.errors?.[n]:e}function tc(){let{router:e}=Xs(Js.UseNavigateStable),t=$s(Ys.UseNavigateStable),n=b.useRef(!1);return Ps(()=>{n.current=!0}),b.useCallback(function(r,i){i===void 0&&(i={}),n.current&&(typeof r==`number`?e.navigate(r):e.navigate(r,Cs({fromRouteId:t},i)))},[e,t])}var nc={};function rc(e,t,n){!t&&!nc[e]&&(nc[e]=!0)}var ic=(e,t,n)=>(``+t+("You can use the `"+e+"` future flag to opt-in early. ")+(`For more information, see `+n+`.`),void 0);function ac(e,t){e?.v7_startTransition===void 0&&ic(`v7_startTransition`,"React Router will begin wrapping state updates in `React.startTransition` in v7",`https://reactrouter.com/v6/upgrading/future#v7_starttransition`),e?.v7_relativeSplatPath===void 0&&(!t||t.v7_relativeSplatPath===void 0)&&ic(`v7_relativeSplatPath`,`Relative route resolution within Splat routes is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_relativesplatpath`),t&&(t.v7_fetcherPersist===void 0&&ic(`v7_fetcherPersist`,`The persistence behavior of fetchers is changing in v7`,`https://reactrouter.com/v6/upgrading/future#v7_fetcherpersist`),t.v7_normalizeFormMethod===void 0&&ic(`v7_normalizeFormMethod`,"Casing of `formMethod` fields is being normalized to uppercase in v7",`https://reactrouter.com/v6/upgrading/future#v7_normalizeformmethod`),t.v7_partialHydration===void 0&&ic(`v7_partialHydration`,"`RouterProvider` hydration behavior is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_partialhydration`),t.v7_skipActionErrorRevalidation===void 0&&ic(`v7_skipActionErrorRevalidation`,"The revalidation behavior after 4xx/5xx `action` responses is changing in v7",`https://reactrouter.com/v6/upgrading/future#v7_skipactionerrorrevalidation`))}function oc(e){let{to:t,replace:n,state:r,relative:i}=e;!js()&&No(!1);let{future:a,static:o}=b.useContext(Es),{matches:s}=b.useContext(Os),{pathname:c}=Ms(),l=Fs(),u=ms(t,ps(s,a.v7_relativeSplatPath),c,i===`path`),d=JSON.stringify(u);return b.useEffect(()=>l(JSON.parse(d),{replace:n,state:r,relative:i}),[l,d,i,n,r]),null}function sc(e){return Rs(e.context)}function cc(e){No(!1)}function lc(e){let{basename:t=`/`,children:n=null,location:r,navigationType:i=Ao.Pop,navigator:a,static:o=!1,future:s}=e;js()&&No(!1);let c=t.replace(/^\/*/,`/`),l=b.useMemo(()=>({basename:c,navigator:a,static:o,future:Cs({v7_relativeSplatPath:!1},s)}),[c,s,a,o]);typeof r==`string`&&(r=zo(r));let{pathname:u=`/`,search:d=``,hash:f=``,state:p=null,key:m=`default`}=r,h=b.useMemo(()=>{let e=os(u,c);return e==null?null:{location:{pathname:e,search:d,hash:f,state:p,key:m},navigationType:i}},[c,u,d,f,p,m,i]);return h==null?null:b.createElement(Es.Provider,{value:l},b.createElement(Ds.Provider,{children:n,value:h}))}function uc(e){let{children:t,location:n}=e;return Vs(fc(t),n)}var dc=function(e){return e[e.pending=0]=`pending`,e[e.success=1]=`success`,e[e.error=2]=`error`,e}(dc||{});new Promise(()=>{}),b.Component;function fc(e,t){t===void 0&&(t=[]);let n=[];return b.Children.forEach(e,(e,r)=>{if(!b.isValidElement(e))return;let i=[...t,r];if(e.type===b.Fragment){n.push.apply(n,fc(e.props.children,i));return}e.type!==cc&&No(!1),!(!e.props.index||!e.props.children)&&No(!1);let a={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.ErrorBoundary!=null||e.props.errorElement!=null,
8shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=fc(e.props.children,i)),n.push(a)}),n}function pc(){return pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pc.apply(null,arguments)}function mc(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function hc(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function gc(e,t){return e.button===0&&(!t||t===`_self`)&&!hc(e)}function _c(e){return e===void 0&&(e=``),new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function vc(e,t){let n=_c(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var yc=[`onClick`,`relative`,`reloadDocument`,`replace`,`state`,`target`,`to`,`preventScrollReset`,`viewTransition`],bc=[`aria-current`,`caseSensitive`,`className`,`end`,`style`,`to`,`viewTransition`,`children`],xc=`6`;try{window.__reactRouterVersion=xc}catch{}var Sc=b.createContext({isTransitioning:!1}),Cc=b.startTransition;function wc(e){let{basename:t,children:n,future:r,window:i}=e,a=b.useRef();a.current??=Mo({window:i,v5Compat:!0});let o=a.current,[s,c]=b.useState({action:o.action,location:o.location}),{v7_startTransition:l}=r||{},u=b.useCallback(e=>{l&&Cc?Cc(()=>c(e)):c(e)},[c,l]);return b.useLayoutEffect(()=>o.listen(u),[o,u]),b.useEffect(()=>ac(r),[r]),b.createElement(lc,{basename:t,children:n,location:s.location,navigationType:s.action,navigator:o,future:r})}var Tc=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Ec=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dc=b.forwardRef(function(e,t){let{onClick:n,relative:r,reloadDocument:i,replace:a,state:o,target:s,to:c,preventScrollReset:l,viewTransition:u}=e,d=mc(e,yc),{basename:f}=b.useContext(Es),p,m=!1;if(typeof c==`string`&&Ec.test(c)&&(p=c,Tc))try{let e=new URL(window.location.href),t=c.startsWith(`//`)?new URL(e.protocol+c):new URL(c),n=os(t.pathname,f);t.origin===e.origin&&n!=null?c=n+t.search+t.hash:m=!0}catch{}let h=As(c,{relative:r}),g=Mc(c,{replace:a,state:o,target:s,preventScrollReset:l,relative:r,viewTransition:u});function _(e){n&&n(e),e.defaultPrevented||g(e)}return b.createElement(`a`,pc({},d,{href:p||h,onClick:m||i?n:_,ref:t,target:s}))}),Oc=b.forwardRef(function(e,t){let{"aria-current":n=`page`,caseSensitive:r=!1,className:i=``,end:a=!1,style:o,to:s,viewTransition:c,children:l}=e,u=mc(e,bc),d=Bs(s,{relative:u.relative}),f=Ms(),p=b.useContext(Ts),{navigator:m,basename:h}=b.useContext(Es),g=p!=null&&q(d)&&c===!0,_=m.encodeLocation?m.encodeLocation(d).pathname:d.pathname,v=f.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;r||(v=v.toLowerCase(),y=y?y.toLowerCase():null,_=_.toLowerCase()),y&&h&&(y=os(y,h)||y);let x=_!==`/`&&_.endsWith(`/`)?_.length-1:_.length,S=v===_||!a&&v.startsWith(_)&&v.charAt(x)===`/`,C=y!=null&&(y===_||!a&&y.startsWith(_)&&y.charAt(_.length)===`/`),w={isActive:S,isPending:C,isTransitioning:g},T=S?n:void 0,E;E=typeof i==`function`?i(w):[i,S?`active`:null,C?`pending`:null,g?`transitioning`:null].filter(Boolean).join(` `);let D=typeof o==`function`?o(w):o;return b.createElement(Dc,pc({},u,{"aria-current":T,className:E,ref:t,style:D,to:s,viewTransition:c}),typeof l==`function`?l(w):l)}),kc;(function(e){e.UseScrollRestoration=`useScrollRestoration`,e.UseSubmit=`useSubmit`,e.UseSubmitFetcher=`useSubmitFetcher`,e.UseFetcher=`useFetcher`,e.useViewTransitionState=`useViewTransitionState`})(kc||={});var Ac;(function(e){e.UseFetcher=`useFetcher`,e.UseFetchers=`useFetchers`,e.UseScrollRestoration=`useScrollRestoration`})(Ac||={});function jc(e){let t=b.useContext(ws);return!t&&No(!1),t}function Mc(e,t){let{target:n,replace:r,state:i,preventScrollReset:a,relative:o,viewTransition:s}=t===void 0?{}:t,c=Fs(),l=Ms(),u=Bs(e,{relative:o});return b.useCallback(t=>{if(gc(t,n)){t.preventDefault();let n=r===void 0?Ro(l)===Ro(u):r;c(e,{replace:n,state:i,preventScrollReset:a,relative:o,viewTransition:s})}},[l,c,u,r,i,n,e,a,o,s])}function Nc(e){let t=b.useRef(_c(e)),n=b.useRef(!1),r=Ms(),i=b.useMemo(()=>vc(r.search,n.current?null:t.current),[r.search]),a=Fs();return[i,b.useCallback((e,t)=>{let r=_c(typeof e==`function`?e(i):e);n.current=!0,a(`?`+r,t)},[a,i])]}function q(e,t){t===void 0&&(t={});let n=b.useContext(Sc);n??No(!1);let{basename:r}=jc(kc.useViewTransitionState),i=Bs(e,{relative:t.relative});if(!n.isTransitioning)return!1;let a=os(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=os(n.nextLocation.pathname,r)||n.nextLocation.pathname;return rs(i.pathname,o)!=null||rs(i.pathname,a)!=null}function Pc(e,t){return function(){return e.apply(t,arguments)}}var{toString:Fc}=Object.prototype,{getPrototypeOf:Ic}=Object,{iterator:Lc,toStringTag:Rc}=Symbol,zc=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Bc=(e,t)=>{let n=e,r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),zc(n,t))return!0;n=Ic(n)}return!1},Vc=(e,t)=>e!=null&&Bc(e,t)?e[t]:void 0,Hc=(e=>t=>{let n=Fc.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Uc=e=>(e=e.toLowerCase(),t=>Hc(t)===e),Wc=e=>t=>typeof t===e,{isArray:Gc}=Array,Kc=Wc(`undefined`);function qc(e){return e!==null&&!Kc(e)&&e.constructor!==null&&!Kc(e.constructor)&&Zc(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}var Jc=Uc(`ArrayBuffer`);function Yc(e){let t;return t=typeof ArrayBuffer<`u`&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Jc(e.buffer),t}var Xc=Wc(`string`),Zc=Wc(`function`),Qc=Wc(`number`),$c=e=>typeof e==`object`&&!!e,el=e=>e===!0||e===!1,tl=e=>{if(!$c(e))return!1;let t=Ic(e);return(t===null||t===Object.prototype||Ic(t)===null)&&!Bc(e,Rc)&&!Bc(e,Lc)},nl=e=>{if(!$c(e)||qc(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},rl=Uc(`Date`),il=Uc(`File`),al=e=>!!(e&&e.uri!==void 0),ol=e=>e&&e.getParts!==void 0,sl=Uc(`Blob`),cl=Uc(`FileList`),ll=e=>$c(e)&&Zc(e.pipe);function ul(){return typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{}}var dl=ul(),fl=dl.FormData===void 0?void 0:dl.FormData,pl=e=>{if(!e)return!1;if(fl&&e instanceof fl)return!0;let t=Ic(e);if(!t||t===Object.prototype||!Zc(e.append))return!1;let n=Hc(e);return n===`formdata`||n===`object`&&Zc(e.toString)&&e.toString()===`[object FormData]`},ml=Uc(`URLSearchParams`),[hl,gl,_l,vl]=[`ReadableStream`,`Request`,`Response`,`Headers`].map(Uc),yl=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,``);function bl(e,t,{allOwnKeys:n=!1}={}){if(e==null)return;let r,i;if(typeof e!=`object`&&(e=[e]),Gc(e))for(r=0,i=e.length;r<i;r++)t.call(null,e[r],r,e);else{if(qc(e))return;let i=n?Object.getOwnPropertyNames(e):Object.keys(e),a=i.length,o;for(r=0;r<a;r++)o=i[r],t.call(null,e[o],o,e)}}function xl(e,t){if(qc(e))return null;t=t.toLowerCase();let n=Object.keys(e),r=n.length,i;for(;r-->0;)if(i=n[r],t===i.toLowerCase())return i;return null}var Sl=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:global,Cl=e=>!Kc(e)&&e!==Sl;function wl(...e){let{caseless:t,skipUndefined:n}=Cl(this)&&this||{},r={},i=(e,i)=>{if(i===`__proto__`||i===`constructor`||i===`prototype`)return;let a=t&&typeof i==`string`&&xl(r,i)||i,o=zc(r,a)?r[a]:void 0;tl(o)&&tl(e)?r[a]=wl(o,e):tl(e)?r[a]=wl({},e):Gc(e)?r[a]=e.slice():(!n||!Kc(e))&&(r[a]=e)};for(let t=0,n=e.length;t<n;t++){let n=e[t];if(!n||qc(n)||(bl(n,i),typeof n!=`object`||Gc(n)))continue;let r=Object.getOwnPropertySymbols(n);for(let e=0;e<r.length;e++){let t=r[e];Il.call(n,t)&&i(n[t],t)}}return r}var Tl=(e,t,n,{allOwnKeys:r}={})=>(bl(t,(t,r)=>{n&&Zc(t)?Object.defineProperty(e,r,{__proto__:null,value:Pc(t,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,r,{__proto__:null,value:t,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),El=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Dl=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,
8configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},Ol=(e,t,n,r)=>{let i,a,o,s={};if(t||={},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),a=i.length;a-->0;)o=i[a],(!r||r(o,e,t))&&!s[o]&&(t[o]=e[o],s[o]=!0);e=n!==!1&&Ic(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kl=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;let r=e.indexOf(t,n);return r!==-1&&r===n},Al=e=>{if(!e)return null;if(Gc(e))return e;let t=e.length;if(!Qc(t))return null;let n=Array(t);for(;t-->0;)n[t]=e[t];return n},jl=(e=>t=>e&&t instanceof e)(typeof Uint8Array<`u`&&Ic(Uint8Array)),Ml=(e,t)=>{let n=(e&&e[Lc]).call(e),r;for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},Nl=(e,t)=>{let n,r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},Pl=Uc(`HTMLFormElement`),Fl=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),{propertyIsEnumerable:Il}=Object.prototype,Ll=Uc(`RegExp`),Rl=(e,t)=>{let n=Object.getOwnPropertyDescriptors(e),r={};bl(n,(n,i)=>{let a;(a=t(n,i,e))!==!1&&(r[i]=a||n)}),Object.defineProperties(e,r)},zl=e=>{Rl(e,(t,n)=>{if(Zc(e)&&[`arguments`,`caller`,`callee`].includes(n))return!1;let r=e[n];if(Zc(r)){if(t.enumerable=!1,`writable`in t){t.writable=!1;return}t.set||=()=>{throw Error(`Can not rewrite read-only method '`+n+`'`)}}})},Bl=(e,t)=>{let n={},r=e=>{e.forEach(e=>{n[e]=!0})};return Gc(e)?r(e):r(String(e).split(t)),n},Vl=()=>{},Hl=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Ul(e){return!!(e&&Zc(e.append)&&e[Rc]===`FormData`&&e[Lc])}var Wl=e=>{let t=new WeakSet,n=e=>{if($c(e)){if(t.has(e))return;if(qc(e))return e;if(!(`toJSON`in e)){t.add(e);let r=Gc(e)?[]:{};return bl(e,(e,t)=>{let i=n(e);!Kc(i)&&(r[t]=i)}),t.delete(e),r}}return e};return n(e)},Gl=Uc(`AsyncFunction`),Kl=e=>e&&($c(e)||Zc(e))&&Zc(e.then)&&Zc(e.catch),ql=((e,t)=>e?setImmediate:t?((e,t)=>(Sl.addEventListener(`message`,({source:n,data:r})=>{n===Sl&&r===e&&t.length&&t.shift()()},!1),n=>{t.push(n),Sl.postMessage(e,`*`)}))(`axios@${Math.random()}`,[]):e=>setTimeout(e))(typeof setImmediate==`function`,Zc(Sl.postMessage)),Jl=typeof queueMicrotask<`u`?queueMicrotask.bind(Sl):typeof process<`u`&&process.nextTick||ql,Yl=e=>e!=null&&Zc(e[Lc]),J={isArray:Gc,isArrayBuffer:Jc,isBuffer:qc,isFormData:pl,isArrayBufferView:Yc,isString:Xc,isNumber:Qc,isBoolean:el,isObject:$c,isPlainObject:tl,isEmptyObject:nl,isReadableStream:hl,isRequest:gl,isResponse:_l,isHeaders:vl,isUndefined:Kc,isDate:rl,isFile:il,isReactNativeBlob:al,isReactNative:ol,isBlob:sl,isRegExp:Ll,isFunction:Zc,isStream:ll,isURLSearchParams:ml,isTypedArray:jl,isFileList:cl,forEach:bl,merge:wl,extend:Tl,trim:yl,stripBOM:El,inherits:Dl,toFlatObject:Ol,kindOf:Hc,kindOfTest:Uc,endsWith:kl,toArray:Al,forEachEntry:Ml,matchAll:Nl,isHTMLForm:Pl,hasOwnProperty:zc,hasOwnProp:zc,hasOwnInPrototypeChain:Bc,getSafeProp:Vc,reduceDescriptors:Rl,freezeMethods:zl,toObjectSet:Bl,toCamelCase:Fl,noop:Vl,toFiniteNumber:Hl,findKey:xl,global:Sl,isContextDefined:Cl,isSpecCompliantForm:Ul,toJSONObject:Wl,isAsyncFn:Gl,isThenable:Kl,setImmediate:ql,asap:Jl,isIterable:Yl,isSafeIterable:e=>e!=null&&Bc(e,Lc)&&Yl(e)},Xl=J.toObjectSet([`age`,`authorization`,`content-length`,`content-type`,`etag`,`expires`,`from`,`host`,`if-modified-since`,`if-unmodified-since`,`last-modified`,`location`,`max-forwards`,`proxy-authorization`,`referer`,`retry-after`,`user-agent`]),Zl=e=>{let t={},n,r,i;return e&&e.split(` 9`).forEach(function(e){i=e.indexOf(`:`),n=e.substring(0,i).trim().toLowerCase(),r=e.substring(i+1).trim(),!(!n||t[n]&&Xl[n])&&(n===`set-cookie`?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+`, `+r:r)}),t};function Ql(e){let t=0,n=e.length;for(;t<n;){let n=e.charCodeAt(t);if(n!==9&&n!==32)break;t+=1}for(;n>t;){let t=e.charCodeAt(n-1);if(t!==9&&t!==32)break;--n}return t===0&&n===e.length?e:e.slice(t,n)}var $l=RegExp(`[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+`,`g`),eu=RegExp(`[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+`,`g`);function tu(e,t){return J.isArray(e)?e.map(e=>tu(e,t)):Ql(String(e).replace(t,``))}var nu=e=>tu(e,$l),ru=e=>tu(e,eu);function iu(e){let t=Object.create(null);return J.forEach(e.toJSON(),(e,n)=>{t[n]=ru(e)}),t}var au=Symbol(`internals`);function ou(e){return e&&String(e).trim().toLowerCase()}function su(e){return e===!1||e==null?e:J.isArray(e)?e.map(su):nu(String(e))}function cu(e){let t=Object.create(null),n=/([^\s,;
9=]+)\s*(?:=\s*([^,;]+))?/g,r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}var lu=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function uu(e,t,n,r,i){if(J.isFunction(r))return r.call(this,t,n);if(i&&(t=n),J.isString(t)){if(J.isString(r))return t.indexOf(r)!==-1;if(J.isRegExp(r))return r.test(t)}}function du(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}function fu(e,t){let n=J.toCamelCase(` `+t);[`get`,`set`,`has`].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(e,n,i){return this[r].call(this,t,e,n,i)},configurable:!0})})}var pu=class{constructor(e){e&&this.set(e)}set(e,t,n){let r=this;function i(e,t,n){let i=ou(t);if(!i)return;let a=J.findKey(r,i);(!a||r[a]===void 0||n===!0||n===void 0&&r[a]!==!1)&&(r[a||t]=su(e))}let a=(e,t)=>J.forEach(e,(e,n)=>i(e,n,t));if(J.isPlainObject(e)||e instanceof this.constructor)a(e,t);else if(J.isString(e)&&(e=e.trim())&&!lu(e))a(Zl(e),t);else if(J.isObject(e)&&J.isSafeIterable(e)){let n=Object.create(null),r,i;for(let t of e){if(!J.isArray(t))throw TypeError(`Object iterator must return a key-value pair`);i=t[0],J.hasOwnProp(n,i)?(r=n[i],n[i]=J.isArray(r)?[...r,t[1]]:[r,t[1]]):n[i]=t[1]}a(n,t)}else e!=null&&i(t,e,n);return this}get(e,t){if(e=ou(e),e){let n=J.findKey(this,e);if(n){let e=this[n];if(!t)return e;if(t===!0)return cu(e);if(J.isFunction(t))return t.call(this,e,n);if(J.isRegExp(t))return t.exec(e);throw TypeError(`parser must be boolean|regexp|function`)}}}has(e,t){if(e=ou(e),e){let n=J.findKey(this,e);return!!(n&&this[n]!==void 0&&(!t||uu(this,this[n],n,t)))}return!1}delete(e,t){let n=this,r=!1;function i(e){if(e=ou(e),e){let i=J.findKey(n,e);i&&(!t||uu(n,n[i],i,t))&&(delete n[i],r=!0)}}return J.isArray(e)?e.forEach(i):i(e),r}clear(e){let t=Object.keys(this),n=t.length,r=!1;for(;n--;){let i=t[n];(!e||uu(this,this[i],i,e,!0))&&(delete this[i],r=!0)}return r}normalize(e){let t=this,n={};return J.forEach(this,(r,i)=>{let a=J.findKey(n,i);if(a){t[a]=su(r),delete t[i];return}let o=e?du(i):String(i).trim();o!==i&&delete t[i],t[o]=su(r),n[o]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return J.forEach(this,(n,r)=>{n!=null&&n!==!1&&(t[r]=e&&J.isArray(n)?n.join(`, `):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+`: `+t).join(` 10`)}getSetCookie(){return this.get(`set-cookie`)||[]}get[Symbol.toStringTag](){return`AxiosHeaders`}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){let t=(this[au]=this[au]={accessors:{}}).accessors,n=this.prototype;function r(e){let r=ou(e);t[r]||(fu(n,e),t[r]=!0)}return J.isArray(e)?e.forEach(r):r(e),this}};pu.accessor([`Content-Type`,`Content-Length`,`Accept`,`Accept-Encoding`,`User-Agent`,`Authorization`]),J.reduceDescriptors(pu.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),J.freezeMethods(pu);var mu=`[REDACTED ****]`;function hu(e){if(J.hasOwnProp(e,`toJSON`))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(J.hasOwnProp(t,`toJSON`))return!0;t=Object.getPrototypeOf(t)}return!1}function gu(e,t){let n=new Set(t.map(e=>String(e).toLowerCase())),r=[],i=e=>{if(typeof e!=`object`||!e||J.isBuffer(e))return e;if(r.indexOf(e)!==-1)return;e instanceof pu&&(e=e.toJSON()),r.push(e);let t;if(J.isArray(e))t=[],e.forEach((e,n)=>{let r=i(e);J.isUndefined(r)||(t[n]=r)});else{if(!J.isPlainObject(e)&&hu(e))return r.pop(),e;t=Object.create(null);for(let[r,a]of Object.entries(e)){let e=n.has(r.toLowerCase())?mu:i(a);J.isUndefined(e)||(t[r]=e)}}return r.pop(),t};return i(e)}var Y=class e extends Error{static from(t,n,r,i,a,o){let s=new e(t.message,n||t.code,r,i,a);return Object.defineProperty(s,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),s.name=t.name,t.status!=null&&s.status==null&&(s.status=t.status),o&&Object.assign(s,o),s}constructor(e,t,n,r,i){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name=`AxiosError`,this.isAxiosError=!0,t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i,this.status=i.status)}toJSON(){let e=this.config,t=e&&J.hasOwnProp(e,`redact`)?e.redact:void 0,n=J.isArray(t)&&t.length>0?gu(e,t):J.toJSONObject(e);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:n,code:this.code,status:this.status}}};Y.ERR_BAD_OPTION_VALUE=`ERR_BAD_OPTION_VALUE`,Y.ERR_BAD_OPTION=`ERR_BAD_OPTION`,Y.ECONNABORTED=`ECONNABORTED`,Y.ETIMEDOUT=`ETIMEDOUT`,Y.ECONNREFUSED=`ECONNREFUSED`,Y.ERR_NETWORK=`E
10RR_NETWORK`,Y.ERR_FR_TOO_MANY_REDIRECTS=`ERR_FR_TOO_MANY_REDIRECTS`,Y.ERR_DEPRECATED=`ERR_DEPRECATED`,Y.ERR_BAD_RESPONSE=`ERR_BAD_RESPONSE`,Y.ERR_BAD_REQUEST=`ERR_BAD_REQUEST`,Y.ERR_CANCELED=`ERR_CANCELED`,Y.ERR_NOT_SUPPORT=`ERR_NOT_SUPPORT`,Y.ERR_INVALID_URL=`ERR_INVALID_URL`,Y.ERR_FORM_DATA_DEPTH_EXCEEDED=`ERR_FORM_DATA_DEPTH_EXCEEDED`;function _u(e){return J.isPlainObject(e)||J.isArray(e)}function vu(e){return J.endsWith(e,`[]`)?e.slice(0,-2):e}function yu(e,t,n){return e?e.concat(t).map(function(e,t){return e=vu(e),!n&&t?`[`+e+`]`:e}).join(n?`.`:``):t}function bu(e){return J.isArray(e)&&!e.some(_u)}var xu=J.toFlatObject(J,{},null,function(e){return/^is[A-Z]/.test(e)});function Su(e,t,n){if(!J.isObject(e))throw TypeError(`target must be an object`);t||=new FormData,n=J.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!J.isUndefined(t[e])});let r=n.metaTokens,i=n.visitor||m,a=n.dots,o=n.indexes,s=n.Blob||typeof Blob<`u`&&Blob,c=n.maxDepth===void 0?100:n.maxDepth,l=s&&J.isSpecCompliantForm(t),u=[];if(!J.isFunction(i))throw TypeError(`visitor must be a function`);function d(e){if(e===null)return``;if(J.isDate(e))return e.toISOString();if(J.isBoolean(e))return e.toString();if(!l&&J.isBlob(e))throw new Y(`Blob is not supported. Use a Buffer instead.`);if(J.isArrayBuffer(e)||J.isTypedArray(e)){if(l&&typeof s==`function`)return new s([e]);if(typeof Buffer<`u`)return Buffer.from(e);throw new Y(`Blob is not supported. Use a Buffer instead.`,Y.ERR_NOT_SUPPORT)}return e}function f(e){if(e>c)throw new Y(`Object is too deeply nested (`+e+` levels). Max depth: `+c,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(e,t){if(c===1/0)return JSON.stringify(e);let n=[];return JSON.stringify(e,function(e,r){if(!J.isObject(r))return r;for(;n.length&&n[n.length-1]!==this;)n.pop();return n.push(r),f(t+n.length-1),r})}function m(e,n,i){let s=e;if(J.isReactNative(t)&&J.isReactNativeBlob(e))return t.append(yu(i,n,a),d(e)),!1;if(e&&!i&&typeof e==`object`){if(J.endsWith(n,`{}`))n=r?n:n.slice(0,-2),e=p(e,1);else if(J.isArray(e)&&bu(e)||(J.isFileList(e)||J.endsWith(n,`[]`))&&(s=J.toArray(e)))return n=vu(n),s.forEach(function(e,r){!(J.isUndefined(e)||e===null)&&t.append(o===!0?yu([n],r,a):o===null?n:n+`[]`,d(e))}),!1}return _u(e)?!0:(t.append(yu(i,n,a),d(e)),!1)}let h=Object.assign(xu,{defaultVisitor:m,convertValue:d,isVisitable:_u});function g(e,n,r=0){if(!J.isUndefined(e)){if(f(r),u.indexOf(e)!==-1)throw Error(`Circular reference detected in `+n.join(`.`));u.push(e),J.forEach(e,function(e,a){(!(J.isUndefined(e)||e===null)&&i.call(t,e,J.isString(a)?a.trim():a,n,h))===!0&&g(e,n?n.concat(a):[a],r+1)}),u.pop()}}if(!J.isObject(e))throw TypeError(`data must be an object`);return g(e),t}function Cu(e){let t={"!":`%21`,"'":`%27`,"(":`%28`,")":`%29`,"~":`%7E`,"%20":`+`};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return t[e]})}function wu(e,t){this._pairs=[],e&&Su(e,this,t)}var Tu=wu.prototype;Tu.append=function(e,t){this._pairs.push([e,t])},Tu.toString=function(e){let t=e?t=>e.call(this,t,Cu):Cu;return this._pairs.map(function(e){return t(e[0])+`=`+t(e[1])},``).join(`&`)};function Eu(e){return encodeURIComponent(e).replace(/%3A/gi,`:`).replace(/%24/g,`$`).replace(/%2C/gi,`,`).replace(/%20/g,`+`)}function Du(e,t,n){if(!t)return e;e||=``;let r=J.isFunction(n)?{serialize:n}:n,i=J.getSafeProp(r,`encode`)||Eu,a=J.getSafeProp(r,`serialize`),o;if(o=a?a(t,r):J.isURLSearchParams(t)?t.toString():new wu(t,r).toString(i),o){let t=e.indexOf(`#`);t!==-1&&(e=e.slice(0,t)),e+=(e.indexOf(`?`)===-1?`?`:`&`)+o}return e}var Ou=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&=[]}forEach(e){J.forEach(this.handlers,function(t){t!==null&&e(t)})}},ku={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},Au={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<`u`?URLSearchParams:wu,FormData:typeof FormData<`u`?FormData:null,Blob:typeof Blob<`u`?Blob:null},protocols:[`http`,`https`,`file`,`blob`,`url`,`data`]},ju=c({hasBrowserEnv:()=>Mu,hasStandardBrowserEnv:()=>Pu,hasStandardBrowserWebWorkerEnv:()=>Fu,navigator:()=>Nu,origin:()=>Iu}),Mu=typeof window<`u`&&typeof document<`u`,Nu=typeof navigator==`object`&&navigator||void 0,Pu=Mu&&(!Nu||[`ReactNative`,`NativeScript`,`NS`].indexOf(Nu.product)<0),Fu=typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope&&typeof self.importScripts==`function`,Iu=Mu&&window.location.href||`http://localhost`,Lu={...ju,...Au};function Ru(e,t){return Su(e,new Lu.classes.URLSearchParams,{visitor:function(e,t,n,r){return Lu.isNode&&J.isBuffer(e)?(this.append(t,e.toString(`base64`)),!1):r.defaultVisitor.apply(this,arguments)},...t})}var zu=100;function Bu(e){if(e>zu)throw new Y(`FormData field is too deeply nested (`+e+` levels). Max depth: `+zu,Y.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Vu(e){let t=[],n=/\w+|\[(\w*)]/g,r;for(;(r=n.exec(e))!==null;)Bu(t.length),t.push(r[0]===`[]`?``:r[1]||r[0]);return t}function Hu(e){let t={},n=Object.keys(e),r,i=n.length,a;for(r=0;r<i;r++)a=n[r],t[a]=e[a];return t}function Uu(e){function t(e,n,r,i){Bu(i);let a=e[i++];if(a===`__proto__`)return!0;let o=Number.isFinite(+a),s=i>=e.length;return a=!a&&J.isArray(r)?r.length:a,s?(J.hasOwnProp(r,a)?r[a]=J.isArray(r[a])?r[a].concat(n):[r[a],n]:r[a]=n,!o):((!J.hasOwnProp(r,a)||!J.isObject(r[a]))&&(r[a]=[]),t(e,n,r[a],i)&&J.isArray(r[a])&&(r[a]=Hu(r[a])),!o)}if(J.isFormData(e)&&J.isFunction(e.entries)){let n={};return J.forEachEntry(e,(e,r)=>{t(Vu(e),r,n,0)}),n}return null}var Wu=(e,t)=>
10e!=null&&J.hasOwnProp(e,t)?e[t]:void 0;function Gu(e,t,n){if(J.isString(e))try{return(t||JSON.parse)(e),J.trim(e)}catch(e){if(e.name!==`SyntaxError`)throw e}return(n||JSON.stringify)(e)}var Ku={transitional:ku,adapter:[`xhr`,`http`,`fetch`],transformRequest:[function(e,t){let n=t.getContentType()||``,r=n.indexOf(`application/json`)>-1,i=J.isObject(e);if(i&&J.isHTMLForm(e)&&(e=new FormData(e)),J.isFormData(e))return r?JSON.stringify(Uu(e)):e;if(J.isArrayBuffer(e)||J.isBuffer(e)||J.isStream(e)||J.isFile(e)||J.isBlob(e)||J.isReadableStream(e))return e;if(J.isArrayBufferView(e))return e.buffer;if(J.isURLSearchParams(e))return t.setContentType(`application/x-www-form-urlencoded;charset=utf-8`,!1),e.toString();let a;if(i){let t=Wu(this,`formSerializer`);if(n.indexOf(`application/x-www-form-urlencoded`)>-1)return Ru(e,t).toString();if((a=J.isFileList(e))||n.indexOf(`multipart/form-data`)>-1){let n=Wu(this,`env`),r=n&&n.FormData;return Su(a?{"files[]":e}:e,r&&new r,t)}}return i||r?(t.setContentType(`application/json`,!1),Gu(e)):e}],transformResponse:[function(e){let t=Wu(this,`transitional`)||Ku.transitional,n=t&&t.forcedJSONParsing,r=Wu(this,`responseType`),i=r===`json`;if(J.isResponse(e)||J.isReadableStream(e))return e;if(e&&J.isString(e)&&(n&&!r||i)){let n=!(t&&t.silentJSONParsing)&&i;try{return JSON.parse(e,Wu(this,`parseReviver`))}catch(e){if(n)throw e.name===`SyntaxError`?Y.from(e,Y.ERR_BAD_RESPONSE,this,null,Wu(this,`response`)):e}}return e}],timeout:0,xsrfCookieName:`XSRF-TOKEN`,xsrfHeaderName:`X-XSRF-TOKEN`,maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lu.classes.FormData,Blob:Lu.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:`application/json, text/plain, */*`,"Content-Type":void 0}}};J.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`],e=>{Ku.headers[e]={}});function qu(e,t){let n=this||Ku,r=t||n,i=pu.from(r.headers),a=r.data;return J.forEach(e,function(e){a=e.call(n,a,i.normalize(),t?t.status:void 0)}),i.normalize(),a}function Ju(e){return!!(e&&e.__CANCEL__)}var Yu=class extends Y{constructor(e,t,n){super(e??`canceled`,Y.ERR_CANCELED,t,n),this.name=`CanceledError`,this.__CANCEL__=!0}};function Xu(e,t,n){let r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Y(`Request failed with status code `+n.status,n.status>=400&&n.status<500?Y.ERR_BAD_REQUEST:Y.ERR_BAD_RESPONSE,n.config,n.request,n))}function Zu(e){let t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||``}function Qu(e,t){e||=10;let n=Array(e),r=Array(e),i=0,a=0,o;return t=t===void 0?1e3:t,function(s){let c=Date.now(),l=r[a];o||=c,n[i]=s,r[i]=c;let u=a,d=0;for(;u!==i;)d+=n[u++],u%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;let f=l&&c-l;return f?Math.round(d*1e3/f):void 0}}function $u(e,t){let n=0,r=1e3/t,i,a,o=(t,r=Date.now())=>{n=r,i=null,a&&=(clearTimeout(a),null),e(...t)};return[(...e)=>{let t=Date.now(),s=t-n;s>=r?o(e,t):(i=e,a||=setTimeout(()=>{a=null,o(i)},r-s))},()=>i&&o(i)]}var ed=(e,t,n=3)=>{let r=0,i=Qu(50,250);return $u(n=>{if(!n||typeof n.loaded!=`number`)return;let a=n.loaded,o=n.lengthComputable?n.total:void 0,s=o==null?a:Math.min(a,o),c=Math.max(0,s-r),l=i(c);r=Math.max(r,s),e({loaded:s,total:o,progress:o?s/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o?(o-s)/l:void 0,event:n,lengthComputable:o!=null,[t?`download`:`upload`]:!0})},n)},td=(e,t)=>{let n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},nd=e=>(...t)=>J.asap(()=>e(...t)),rd=Lu.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Lu.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Lu.origin),Lu.navigator&&/(msie|trident)/i.test(Lu.navigator.userAgent)):()=>!0,id=Lu.hasStandardBrowserEnv?{write(e,t,n,r,i,a,o){if(typeof document>`u`)return;let s=[`${e}=${encodeURIComponent(t)}`];J.isNumber(n)&&s.push(`expires=${new Date(n).toUTCString()}`),J.isString(r)&&s.push(`path=${r}`),J.isString(i)&&s.push(`domain=${i}`),a===!0&&s.push(`secure`),J.isString(o)&&s.push(`SameSite=${o}`),document.cookie=s.join(`; `)},read(e){if(typeof document>`u`)return null;let t=document.cookie.split(`;`);for(let n=0;n<t.length;n++){let r=t[n].replace(/^\s+/,``),i=r.indexOf(`=`);
10if(i!==-1&&r.slice(0,i)===e)try{return decodeURIComponent(r.slice(i+1))}catch{return r.slice(i+1)}}return null},remove(e){this.write(e,``,Date.now()-864e5,`/`)}}:{write(){},read(){return null},remove(){}};function ad(e){return typeof e==`string`&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function od(e,t){return t?e.replace(/\/?\/$/,``)+`/`+t.replace(/^\/+/,``):e}var sd=/^https?:(?!\/\/)/i,cd=/[\t\n\r]/g;function ld(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function ud(e){return ld(e).replace(cd,``)}function dd(e,t){if(typeof e==`string`&&sd.test(ud(e)))throw new Y(`Invalid URL: missing "//" after protocol`,Y.ERR_INVALID_URL,t)}function fd(e,t,n,r){dd(t,r);let i=!ad(t);return e&&(i||n===!1)?(dd(e,r),od(e,t)):t}var pd=e=>e instanceof pu?{...e}:e;function md(e,t){e||={},t||={};let n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(e,t,n,r){return J.isPlainObject(e)&&J.isPlainObject(t)?J.merge.call({caseless:r},e,t):J.isPlainObject(t)?J.merge({},t):J.isArray(t)?t.slice():t}function i(e,t,n,i){if(!J.isUndefined(t))return r(e,t,n,i);if(!J.isUndefined(e))return r(void 0,e,n,i)}function a(e,t){if(!J.isUndefined(t))return r(void 0,t)}function o(e,t){if(!J.isUndefined(t))return r(void 0,t);if(!J.isUndefined(e))return r(void 0,e)}function s(n){let r=J.hasOwnProp(t,`transitional`)?t.transitional:void 0;if(!J.isUndefined(r))if(J.isPlainObject(r)){if(J.hasOwnProp(r,n))return r[n]}else return;let i=J.hasOwnProp(e,`transitional`)?e.transitional:void 0;if(J.isPlainObject(i)&&J.hasOwnProp(i,n))return i[n]}function c(n,i,a){if(J.hasOwnProp(t,a))return r(n,i);if(J.hasOwnProp(e,a))return r(void 0,n)}let l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,allowedSocketPaths:o,responseEncoding:o,validateStatus:c,headers:(e,t,n)=>i(pd(e),pd(t),n,!0)};return J.forEach(Object.keys({...e,...t}),function(r){if(r===`__proto__`||r===`constructor`||r===`prototype`)return;let a=J.hasOwnProp(l,r)?l[r]:i,o=a(J.hasOwnProp(e,r)?e[r]:void 0,J.hasOwnProp(t,r)?t[r]:void 0,r);J.isUndefined(o)&&a!==c||(n[r]=o)}),J.hasOwnProp(t,`validateStatus`)&&J.isUndefined(t.validateStatus)&&s(`validateStatusUndefinedResolves`)===!1&&(J.hasOwnProp(e,`validateStatus`)?n.validateStatus=r(void 0,e.validateStatus):delete n.val
10idateStatus),n}var hd=[`content-type`,`content-length`];function gd(e,t,n){if(n!==`content-only`){e.set(t);return}Object.entries(t||{}).forEach(([t,n])=>{hd.includes(t.toLowerCase())&&e.set(t,n)})}var _d=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16)));function vd(e){let t=md({},e),n=e=>J.hasOwnProp(t,e)?t[e]:void 0,r=n(`data`),i=n(`withXSRFToken`),a=n(`xsrfHeaderName`),o=n(`xsrfCookieName`),s=n(`headers`),c=n(`auth`),l=n(`baseURL`),u=n(`allowAbsoluteUrls`),d=n(`url`);if(t.headers=s=pu.from(s),t.url=Du(fd(l,d,u,t),n(`params`),n(`paramsSerializer`)),c){let t=J.getSafeProp(c,`username`)||``,n=J.getSafeProp(c,`password`)||``;try{s.set(`Authorization`,`Basic `+btoa(t+`:`+(n?_d(n):``)))}catch(t){throw Y.from(t,Y.ERR_BAD_OPTION_VALUE,e)}}if(J.isFormData(r)&&(Lu.hasStandardBrowserEnv||Lu.hasStandardBrowserWebWorkerEnv||J.isReactNative(r)?s.setContentType(void 0):J.isFunction(r.getHeaders)&&gd(s,r.getHeaders(),n(`formDataHeaderPolicy`))),Lu.hasStandardBrowserEnv&&(J.isFunction(i)&&(i=i(t)),i===!0||i==null&&rd(t.url))){let e=a&&o&&id.read(o);e&&s.set(a,e)}return t}var yd=typeof XMLHttpRequest<`u`&&function(e){return new Promise(function(t,n){let r=vd(e),i=r.data,a=pu.from(r.headers).normalize(),{responseType:o,onUploadProgress:s,onDownloadProgress:c}=r,l,u,d,f,p;function m(){f&&f(),p&&p(),r.cancelToken&&r.cancelToken.unsubscribe(l),r.signal&&r.signal.removeEventListener(`abort`,l)}let h=new XMLHttpRequest;h.open(r.method.toUpperCase(),r.url,!0),h.timeout=r.timeout;function g(){if(!h)return;let r=pu.from(`getAllResponseHeaders`in h&&h.getAllResponseHeaders());Xu(function(e){t(e),m()},function(e){n(e),m()},{data:!o||o===`text`||o===`json`?h.responseText:h.response,status:h.status,statusText:h.statusText,headers:r,config:e,request:h}),h=null}`onloadend`in h?h.onloadend=g:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.startsWith(`file:`))||setTimeout(g)},h.onabort=function(){h&&=(n(new Y(`Request aborted`,Y.ECONNABORTED,e,h)),m(),null)},h.onerror=function(t){let r=new Y(t&&t.message?t.message:`Network Error`,Y.ERR_NETWORK,e,h);r.event=t||null,n(r),m(),h=null},h.ontimeout=function(){let t=r.timeout?`timeout of `+r.timeout+`ms exceeded`:`timeout exceeded`,i=r.transitional||ku;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Y(t,i.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,h)),m(),h=null},i===void 0&&a.setContentType(null),`setRequestHeader`in h&&J.forEach(iu(a),function(e,t){h.setRequestHeader(t,e)}),J.isUndefined(r.withCredentials)||(h.withCredentials=!!r.withCredentials),o&&o!==`json`&&(h.responseType=r.responseType),c&&([d,p]=ed(c,!0),h.addEventListener(`progress`,d)),s&&h.upload&&([u,f]=ed(s),h.upload.addEventListener(`progress`,u),h.upload.addEventListener(`loadend`,f)),(r.cancelToken||r.signal)&&(l=t=>{h&&=(n(!t||t.type?new Yu(null,e,h):t),h.abort(),m(),null)},r.cancelToken&&r.cancelToken.subscribe(l),r.signal&&(r.signal.aborted?l():r.signal.addEventListener(`abort`,l)));let _=Zu(r.url);if(_&&!Lu.protocols.includes(_)){n(new Y(`Unsupported protocol `+_+`:`,Y.ERR_BAD_REQUEST,e)),m();return}h.send(i||null)})},bd=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;let n=new AbortController,r=!1,i=function(e){if(!r){r=!0,o();let t=e instanceof Error?e:this.reason;n.abort(t instanceof Y?t:new Yu(t instanceof Error?t.message:t))}},a=t&&setTimeout(()=>{a=null,i(new Y(`timeout of ${t}ms exceeded`,Y.ETIMEDOUT))},t),o=()=>{e&&=(a&&clearTimeout(a),a=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(i):e.removeEventListener(`abort`,i)}),null)};e.forEach(e=>e.addEventListener(`abort`,i,{once:!0}));let{signal:s}=n;return s.unsubscribe=()=>J.asap(o),s},xd=function*(e,t){let n=e.byteLength;if(!t||n<t){yield e;return}let r=0,i;for(;r<n;)i=r+t,yield e.slice(r,i),r=i},Sd=async function*(e,t){for await(let n of Cd(e))yield*xd(n,t)},Cd=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},wd=(e,t,n,r)=>{let i=Sd(e,t),a=0,o,s=e=>{o||(o=!0,r&&r(e))};return new ReadableStream({async pull(e){try{let{done:t,value:r}=await i.next();if(t){s(),e.close();return}let o=r.byteLength;n&&n(a+=o),e.enqueue(new Uint8Array(r))}catch(e){throw s(e),e}},cancel(e){return s(e),i.return()}},{highWaterMark:2})},Td=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,Ed=(e,t,n)=>t+2<n&&Td(e.charCodeAt(t+1))&&Td(e.charCodeAt(t+2));function Dd(e){if(!e||typeof e!=`string`||!e.startsWith(`data:`))return 0;let t=e.indexOf(`,`);if(t<0)return 0;let n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let e=r.length,t=r.length;for(let n=0;n<t;n++)if(r.charCodeAt(n)===37&&n+2<t){let t=r.charCodeAt(n+1),i=r.charCodeAt(n+2);Td(t)&&Td(i)&&(e-=2,n+=2)}let n=0,i=t-1,a=e=>e>=2&&r.charCodeAt(e-2)===37&&r.charCodeAt(e-1)===51&&(r.charCodeAt(e)===68||r.charCodeAt(e)===100);i>=0&&(r.charCodeAt(i)===61?(n++,i--):a(i)&&(n++,i-=3)),n===1&&i>=0&&(r.charCodeAt(i)===61||a(i))&&n++;
10let o=Math.floor(e/4)*3-(n||0);return o>0?o:0}let i=0;for(let e=0,t=r.length;e<t;e++){let n=r.charCodeAt(e);if(n===37&&Ed(r,e,t))i+=1,e+=2;else if(n<128)i+=1;else if(n<2048)i+=2;else if(n>=55296&&n<=56319&&e+1<t){let t=r.charCodeAt(e+1);t>=56320&&t<=57343?(i+=4,e++):i+=3}else i+=3}return i}var Od=`1.18.1`,kd=65536,{isFunction:Ad}=J,jd=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(e,t)=>String.fromCharCode(parseInt(t,16))),Md=e=>{if(!J.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},Nd=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Pd=e=>{let t=e.indexOf(`://`),n=e;return t!==-1&&(n=n.slice(t+3)),n.includes(`@`)||n.includes(`:`)},Fd=e=>{let t=J.global!==void 0&&J.global!==null?J.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=J.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);let{fetch:i,Request:a,Response:o}=e,s=i?Ad(i):typeof fetch==`function`,c=Ad(a),l=Ad(o);if(!s)return!1;let u=s&&Ad(n),d=s&&(typeof r==`function`?(e=>t=>e.encode(t))(new r):async e=>new Uint8Array(await new a(e).arrayBuffer())),f=c&&u&&Nd(()=>{let e=!1,t=new a(Lu.origin,{body:new n,method:`POST`,get duplex(){return e=!0,`half`}}),r=t.headers.has(`Content-Type`);return t.body!=null&&t.body.cancel(),e&&!r}),p=l&&u&&Nd(()=>J.isReadableStream(new o(``).body)),m={stream:p&&(e=>e.body)};s&&[`text`,`arrayBuffer`,`blob`,`formData`,`stream`].forEach(e=>{!m[e]&&(m[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Y(`Response type '${e}' is not supported`,Y.ERR_NOT_SUPPORT,n)})});let h=async e=>{if(e==null)return 0;if(J.isBlob(e))return e.size;if(J.isSpecCompliantForm(e))return(await new a(Lu.origin,{method:`POST`,body:e}).arrayBuffer()).byteLength;if(J.isArrayBufferView(e)||J.isArrayBuffer(e))return e.byteLength;if(J.isURLSearchParams(e)&&(e+=``),J.isString(e))return(await d(e)).byteLength},g=async(e,t)=>J.toFiniteNumber(e.getContentLength())??h(t);return async e=>{let{url:t,method:n,data:s,signal:l,cancelToken:d,timeout:_,onDownloadProgress:v,onUploadProgress:y,responseType:b,headers:x,withCredentials:S=`same-origin`,fetchOptions:C,maxContentLength:w,maxBodyLength:T}=vd(e),E=J.isNumber(w)&&w>-1,D=J.isNumber(T)&&T>-1,O=t=>J.hasOwnProp(e,t)?e[t]:void 0,k=i||fetch;b=b?(b+``).toLowerCase():`text`;let A=bd([l,d&&d.toAbortSignal()],_),j=null,M=A&&A.unsubscribe&&(()=>{A.unsubscribe()}),N,P=null,F=()=>new Y(`Request body larger than maxBodyLength limit`,Y.ERR_BAD_REQUEST,e,j);try{let i,l=O(`auth`);if(l&&(i={username:J.getSafeProp(l,`username`)||``,password:J.getSafeProp(l,`password`)||``}),Pd(t)){let e=new URL(t,Lu.origin);!i&&(e.username||e.password)&&(i={username:Md(e.username),password:Md(e.password)}),(e.username||e.password)&&(e.username=``,e.password=``,t=e.href)}if(i&&(x.delete(`authorization`),x.set(`Authorization`,`Basic `+btoa(jd((i.username||``)+`:`+(i.password||``))))),E&&typeof t==`string`&&t.startsWith(`data:`)&&Dd(t)>w)throw new Y(`maxContentLength size of `+w+` exceeded`,Y.ERR_BAD_RESPONSE,e,j);if(D&&n!==`get`&&n!==`head`){let e=await h(s);if(typeof e==`number`&&isFinite(e)&&(N=e,e>T))throw F()}let d=D&&(J.isReadableStream(s)||J.isStream(s)),_=(e,t,n)=>wd(e,kd,e=>{if(D&&e>T)throw P=F();t&&t(e)},n);if(f&&n!==`get`&&n!==`head`&&(y||d)){if(N??=await g(x,s),N!==0||d){let e=new a(t,{method:`POST`,body:s,duplex:`half`}),n;if(J.isFormData(s)&&(n=e.headers.get(`content-type`))&&x.setContentType(n),e.body){let[t,n]=y&&td(N,ed(nd(y)))||[];s=_(e.body,t,n)}}}else if(d&&!c&&u&&n!==`get`&&n!==`head`)s=_(s);else if(d&&c&&!f&&n!==`get`&&n!==`head`)throw new Y(`Stream request bodies are not supported by the current fetch implementation`,Y.ERR_NOT_SUPPORT,e,j);J.isString(S)||(S=S?`include`:`omit`);let I=c&&`credentials`in a.prototype;if(J.isFormData(s)){let e=x.getContentType();e&&/^multipart\/form-data/i.test(e)&&!/boundary=/i.test(e)&&x.delete(`content-type`)}x.set(`User-Agent`,`axios/`+Od,!1);let ee={...C,signal:A,method:n.toUpperCase(),headers:iu(x.normalize()),body:s,duplex:`half`,credentials:I?S:void 0};j=c&&new a(t,ee);let L=await(c?k(j,C):k(t,ee)),R=pu.from(L.headers);if(E){let t=J.toFiniteNumber(R.getContentLength());if(t!=null&&t>w)throw new Y(`maxContentLength size of `+w+` exceeded`,Y.ERR_BAD_RESPONSE,e,j)}let z=p&&(b===`stream`||b===`response`);if(p&&L.body&&(v||E||z&&M)){let t={};
10[`status`,`statusText`,`headers`].forEach(e=>{t[e]=L[e]});let n=J.toFiniteNumber(R.getContentLength()),[r,i]=v&&td(n,ed(nd(v),!0))||[],a=0;L=new o(wd(L.body,kd,t=>{if(E&&(a=t,a>w))throw new Y(`maxContentLength size of `+w+` exceeded`,Y.ERR_BAD_RESPONSE,e,j);r&&r(t)},()=>{i&&i(),M&&M()}),t)}b||=`text`;let B=await m[J.findKey(m,b)||`text`](L,e);if(E&&!p&&!z){let t;if(B!=null&&(typeof B.byteLength==`number`?t=B.byteLength:typeof B.size==`number`?t=B.size:typeof B==`string`&&(t=typeof r==`function`?new r().encode(B).byteLength:B.length)),typeof t==`number`&&t>w)throw new Y(`maxContentLength size of `+w+` exceeded`,Y.ERR_BAD_RESPONSE,e,j)}return!z&&M&&M(),await new Promise((t,n)=>{Xu(t,n,{data:B,headers:pu.from(L.headers),status:L.status,statusText:L.statusText,config:e,request:j})})}catch(t){if(M&&M(),A&&A.aborted&&A.reason instanceof Y){let n=A.reason;throw n.config=e,j&&(n.request=j),t!==n&&Object.defineProperty(n,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),n}if(P)throw j&&!P.request&&(P.request=j),P;if(t instanceof Y)throw j&&!t.request&&(t.request=j),t;if(t&&t.name===`TypeError`&&/Load failed|fetch/i.test(t.message)){let n=new Y(`Network Error`,Y.ERR_NETWORK,e,j,t&&t.response);throw Object.defineProperty(n,"cause",{__proto__:null,value:t.cause||t,writable:!0,enumerable:!1,configurable:!0}),n}throw Y.from(t,t&&t.code,e,j,t&&t.response)}}},Id=new Map,Ld=e=>{let t=e&&e.env||{},{fetch:n,Request:r,Response:i}=t,a=[r,i,n],o=a.length,s,c,l=Id;for(;o--;)s=a[o],c=l.get(s),c===void 0&&l.set(s,c=o?new Map:Fd(t)),l=c;return c};Ld();var Rd={http:null,xhr:yd,fetch:{get:Ld}};J.forEach(Rd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});var zd=e=>`- ${e}`,Bd=e=>J.isFunction(e)||e===null||e===!1;function Vd(e,t){e=J.isArray(e)?e:[e];let{length:n}=e,r,i,a={};for(let o=0;o<n;o++){r=e[o];let n;if(i=r,!Bd(r)&&(i=Rd[(n=String(r)).toLowerCase()],i===void 0))throw new Y(`Unknown adapter '${n}'`);if(i&&(J.isFunction(i)||(i=i.get(t))))break;a[n||`#`+o]=i}if(!i){let e=Object.entries(a).map(([e,t])=>`adapter ${e} `+(t===!1?`is not supported by the environment`:`is not available in the build`));throw new Y(`There is no suitable adapter to dispatch the request `+(n?e.length>1?`since : 11`+e.map(zd).join(` 12`):` `+zd(e[0]):`as no adapter specified`),Y.ERR_NOT_SUPPORT)}return i}var Hd={getAdapter:Vd,adapters:Rd};function Ud(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Yu(null,e)}function Wd(e){return Ud(e),e.headers=pu.from(e.headers),e.data=qu.call(e,e.transformRequest),[`post`,`put`,`patch`].indexOf(e.method)!==-1&&e.headers.setContentType(`application/x-www-form-urlencoded`,!1),Hd.getAdapter(e.adapter||Ku.adapter,e)(e).then(function(t){Ud(e),e.response=t;try{t.data=qu.call(e,e.transformResponse,t)}finally{delete e.response}return t.headers=pu.from(t.headers),t},function(t){if(!Ju(t)&&(Ud(e),t&&t.response)){e.response=t.response;try{t.response.data=qu.call(e,e.transformResponse,t.response)}finally{delete e.response}t.response.headers=pu.from(t.response.headers)}return Promise.reject(t)})}var Gd={};[`object`,`boolean`,`number`,`function`,`string`,`symbol`].forEach((e,t)=>{Gd[e]=function(n){return typeof n===e||`a`+(t<1?`n `:` `)+e}});var Kd={};Gd.transitional=function(e,t,n){function r(e,t){return`[Axios v`+Od+`] Transitional option '`+e+`'`+t+(n?`. `+n:``)}return(n,i,a)=>{if(e===!1)throw new Y(r(i,` has been removed`+(t?` in `+t:``)),Y.ERR_DEPRECATED);return t&&!Kd[i]&&(Kd[i]=!0,console.warn(r(i,` has been deprecated since v`+t+` and will be removed in the near future`))),!e||e(n,i,a)}},Gd.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};function qd(e,t,n){if(typeof e!=`object`||!e)throw new Y(`options must be an object`,Y.ERR_BAD_OPTION_VALUE);let r=Object.keys(e),i=r.length;for(;i-->0;){let a=r[i],o=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(o){let t=e[a],n=t===void 0||o(t,a,e);if(n!==!0)throw new Y(`option `+a+` must be `+n,Y.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Y(`Unknown option `+a,Y.ERR_BAD_OPTION)}}var Jd={assertOptions:qd,validators:Gd},Yd=Jd.validators,Xd=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Ou,response:new Ou}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let n=(()=>
12{if(!t.stack)return``;let e=t.stack.indexOf(` 13`);return e===-1?``:t.stack.slice(e+1)})();try{if(!e.stack)e.stack=n;else if(n){let t=n.indexOf(` 14`),r=t===-1?-1:n.indexOf(` 15`,t+1),i=r===-1?``:n.slice(r+1);String(e.stack).endsWith(i)||(e.stack+=` 16`+n)}}catch{}}throw e}}_request(e,t){typeof e==`string`?(t||={},t.url=e):t=e||{},t=md(this.defaults,t);let{transitional:n,paramsSerializer:r,headers:i}=t;n!==void 0&&Jd.assertOptions(n,{silentJSONParsing:Yd.transitional(Yd.boolean),forcedJSONParsing:Yd.transitional(Yd.boolean),clarifyTimeoutError:Yd.transitional(Yd.boolean),legacyInterceptorReqResOrdering:Yd.transitional(Yd.boolean),advertiseZstdAcceptEncoding:Yd.transitional(Yd.boolean),validateStatusUndefinedResolves:Yd.transitional(Yd.boolean)},!1),r!=null&&(J.isFunction(r)?t.paramsSerializer={serialize:r}:Jd.assertOptions(r,{encode:Yd.function,serialize:Yd.function},!0)),t.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls===void 0?t.allowAbsoluteUrls=!0:t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls),Jd.assertOptions(t,{baseUrl:Yd.spelling(`baseURL`),withXsrfToken:Yd.spelling(`withXSRFToken`)},!0),t.method=(t.method||this.defaults.method||`get`).toLowerCase();let a=i&&J.merge(i.common,i[t.method]);i&&J.forEach([`delete`,`get`,`head`,`post`,`put`,`patch`,`query`,`common`],e=>{delete i[e]}),t.headers=pu.concat(a,i);let o=[],s=!0;this.interceptors.request.forEach(function(e){if(typeof e.runWhen==`function`&&e.runWhen(t)===!1)return;s&&=e.synchronous;let n=t.transitional||ku;n&&n.legacyInterceptorReqResOrdering?o.unshift(e.fulfilled,e.rejected):o.push(e.fulfilled,e.rejected)});let c=[];this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,u=0,d;if(!s){let e=[Wd.bind(this),void 0];for(e.unshift(...o),e.push(...c),d=e.length,l=Promise.resolve(t);u<d;)l=l.then(e[u++],e[u++]);return l}d=o.length;let f=t;for(;u<d;){let e=o[u++],t=o[u++];try{f=e(f)}catch(e){t.call(this,e);break}}try{l=Wd.call(this,f)}catch(e){return Promise.reject(e)}for(u=0,d=c.length;u<d;)l=l.then(c[u++],c[u++]);return l}getUri(e){return e=md(this.defaults,e),Du(fd(e.baseURL,e.url,e.allowAbsoluteUrls,e),e.params,e.paramsSerializer)}};J.forEach([`delete`,`get`,`head`,`options`],function(e){Xd.prototype[e]=function(t,n){return this.request(md(n||{},{method:e,url:t,data:n&&J.hasOwnProp(n,`data`)?n.data:void 0}))}}),J.forEach([`post`,`put`,`patch`,`query`],function(e){function t(t){return function(n,r,i){return this.request(md(i||{},{method:e,headers:t?{"Content-Type":`multipart/form-data`}:{},url:n,data:r}))}}Xd.prototype[e]=t(),e!==`query`&&(Xd.prototype[e+`Form`]=t(!0))});var Zd=class e{constructor(e){if(typeof e!=`function`)throw TypeError(`executor must be a function.`);let t;this.promise=new Promise(function(e){t=e});let n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-->0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t,r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,i){n.reason||(n.reason=new Yu(e,r,i),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let t;return{token:new e(function(e){t=e}),cancel:t}}};function Qd(e){return function(t){return e.apply(null,t)}}function $d(e){return J.isObject(e)&&e.isAxiosError===!0}var ef={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
16alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(ef).forEach(([e,t])=>{ef[t]=e});function tf(e){let t=new Xd(e),n=Pc(Xd.prototype.request,t);return J.extend(n,Xd.prototype,t,{allOwnKeys:!0}),J.extend(n,t,null,{allOwnKeys:!0}),n.create=function(t){return tf(md(e,t))},n}var nf=tf(Ku);nf.Axios=Xd,nf.CanceledError=Yu,nf.CancelToken=Zd,nf.isCancel=Ju,nf.VERSION=Od,nf.toFormData=Su,nf.AxiosError=Y,nf.Cancel=nf.CanceledError,nf.all=function(e){return Promise.all(e)},nf.spread=Qd,nf.isAxiosError=$d,nf.mergeConfig=md,nf.AxiosHeaders=pu,nf.formToJSON=e=>Uu(J.isHTMLForm(e)?new FormData(e):e),nf.getAdapter=Hd.getAdapter,nf.HttpStatusCode=ef,nf.default=nf;var rf=typeof window>`u`,af=!rf&&window.self!==window.top,of=!rf&&typeof document>`u`,sf=()=>Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15),cf=[];for(let e=0;e<256;++e)cf.push((e+256).toString(16).slice(1));function lf(e,t=0){return(cf[e[t+0]]+cf[e[t+1]]+cf[e[t+2]]+cf[e[t+3]]+`-`+cf[e[t+4]]+cf[e[t+5]]+`-`+cf[e[t+6]]+cf[e[t+7]]+`-`+cf[e[t+8]]+cf[e[t+9]]+`-`+cf[e[t+10]]+cf[e[t+11]]+cf[e[t+12]]+cf[e[t+13]]+cf[e[t+14]]+cf[e[t+15]]).toLowerCase()}var uf,df=new Uint8Array(16);function ff(){if(!uf){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);uf=crypto.getRandomValues.bind(crypto)}return uf(df)}var pf={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function mf(e,t,n){e||={};let r=e.random??e.rng?.()??ff();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return lf(r)}function hf(e,t,n){return pf.randomUUID&&!t&&!e?pf.randomUUID():mf(e,t,n)}var gf=typeof window<`u`?window:{base44SharedInstances:{}};function _f(e,t){return gf.base44SharedInstances||={},gf.base44SharedInstances[e]||(gf.base44SharedInstances[e]={instance:t()}),gf.base44SharedInstances[e].instance}var vf=`__user_heartbeat_event__`,yf=`__initialization_event__`,bf=`__session_duration_event__`,xf=`analytics-enable`,Sf=`base44_analytics_session_id`,Cf={enabled:!0,maxQueueSize:1e3,throttleTime:1e3,batchSize:30,heartBeatInterval:6e4},wf=_f(`analytics`,()=>({requestsQueue:[],isProcessing:!1,isHeartBeatProcessing:!1,wasInitializationTracked:!1,sessionContext:null,sessionStartTime:null,fallbackSessionId:null,config:{...Cf,...Lf()}})),Tf=({axiosClient:e,serverUrl:t,appId:n,userAuthModule:r,enabled:i})=>{let{maxQueueSize:a,throttleTime:o,batchSize:s}=wf.config;if(!i||!wf.config?.enabled||of)return{track:()=>{},cleanup:()=>{}};let c,l=`${t}/api/apps/${n}/analytics/track/batch`,u=async t=>{await e.request({method:`POST`,url:`/apps/${n}/analytics/track/batch`,data:{events:t}})},d=e=>{try{let t=JSON.stringify({events:e}),n=new Blob([t],{type:`application/json`});return typeof navigator>`u`||t.length>6e4||!navigator.sendBeacon(l,n)}catch{return!1}},f=async(e,t={})=>
16{if(e.length===0)return;let n=await If(r),i=e.map(Nf(n));try{(!t.isBeacon||!d(i))&&await u(i)}catch{}},p=()=>{Df(f,{throttleTime:o,batchSize:s})},m=e=>{if(wf.requestsQueue.length>=a)return;let t=Mf();wf.requestsQueue.push({...e,...t}),p()},h=()=>{Df(f,{throttleTime:o,batchSize:s}),c=Of(m),Af()},g=()=>{Ef(),c?.(),jf(m);let e=wf.requestsQueue.splice(0);f(e,{isBeacon:!0})},_=()=>{typeof window>`u`||(document.visibilityState===`hidden`?g():document.visibilityState===`visible`&&h())};return p(),c=Of(m),kf(m),typeof window<`u`&&window.addEventListener(`visibilitychange`,_),{track:m,cleanup:()=>{Ef(),c?.(),typeof window<`u`&&window.removeEventListener(`visibilitychange`,_)}}};function Ef(){wf.isProcessing=!1}async function Df(e,t){if(wf.isProcessing)return;wf.isProcessing=!0;let{throttleTime:n=1e3,batchSize:r=30}=t??{};for(;wf.isProcessing&&wf.requestsQueue.length>0;){let t=wf.requestsQueue.splice(0,r);t.length&&await e(t),await new Promise(e=>setTimeout(e,n))}wf.isProcessing=!1}function Of(e){if(typeof window>`u`||wf.isHeartBeatProcessing||(wf.config.heartBeatInterval??0)<10)return()=>{};wf.isHeartBeatProcessing=!0;let t=setInterval(()=>{e({eventName:vf})},wf.config.heartBeatInterval);return()=>{clearInterval(t),wf.isHeartBeatProcessing=!1}}function kf(e){typeof window>`u`||wf.wasInitializationTracked||(wf.wasInitializationTracked=!0,e({eventName:yf,properties:{referrer:document==null?void 0:document.referrer}}))}function Af(){typeof window>`u`||wf.sessionStartTime!==null||(wf.sessionStartTime=new Date().toISOString())}function jf(e){if(typeof window>`u`||wf.sessionStartTime===null)return;let t=new Date().getTime()-new Date(wf.sessionStartTime).getTime();wf.sessionStartTime=null,e({eventName:bf,properties:{sessionDuration:t}})}function Mf(){return{timestamp:new Date().toISOString(),pageUrl:typeof window<`u`?window.location?.pathname??null:null}}function Nf(e){return t=>({event_name:t.eventName,properties:t.properties,timestamp:t.timestamp,page_url:t.pageUrl,...e})}var Pf=null;function Ff(){wf.sessionContext=null,Pf=null}async function If(e){if(!wf.sessionContext){if(!e.hasToken())return{user_id:null,session_id:zf()};if(!Pf){let t=zf();Pf=e.me().then(e=>({user_id:e.id,session_id:t})).catch(()=>({user_id:null,session_id:t}))}let t=Pf,n=await t;return Pf===t&&(wf.sessionContext=n),n}return wf.sessionContext}function Lf(){if(typeof window>`u`||!window.location)return;let e=new URLSearchParams(window.location.search).get(xf);if(e==null||!e.length)return;let t=new URLSearchParams(window.location.search);t.delete(xf);let n=window.location.pathname+(t.toString()?`?`+t.toString():``);return window.history.replaceState({},``,n),{enabled:e===`true`}}function Rf(){return wf.fallbackSessionId??=sf()}function zf(){if(typeof window>`u`)return Rf();try{let e=localStorage.getItem(Sf);if(!e){let e=sf();return localStorage.setItem(Sf,e),e}return e}catch{return Rf()}}var Bf=class extends Error{constructor(e,t,n,r,i){super(e),this.name=`Base44Error`,this.status=t,this.code=n,this.data=r,this.originalError=i}toJSON(){return{name:this.name,message:this.message,status:this.status,code:this.code,data:this.data}}};function Vf({baseURL:e,headers:t={},token:n,interceptResponses:r=!0,onError:i}){let a=nf.create({baseURL:e,headers:{"Content-Type":`application/json`,Accept:`application/json`,...t}});return n&&(a.defaults.headers.common.Authorization=`Bearer ${n}`),a.interceptors.request.use(t=>{typeof window<`u`&&(window.location&&t.headers.set(`X-Origin-URL`,window.location.href),t.headers.get(`Authorization`)||t.headers.set(`X-Base44-Anonymous-Id`,zf()));let n=hf();if(t.requestId=n,af)try{window.parent.postMessage({type:`api-request-start`,requestId:n,data:{url:e+t.url,method:t.method,body:t.data instanceof FormData?`[FormData object]`:t.data}},`*`)}catch{}return t}),r&&a.interceptors.response.use(e=>{let t=e.config?.requestId;try{af&&t&&window.parent.postMessage({type:`api-request-end`,requestId:t,data:{statusCode:e.status,response:e.data}},`*`)}catch{}return e.data},e=>{var t;let n=new Bf(e.response?.data?.message||e.response?.data?.detail||e.message,e.response?.status,e.response?.data?.code??((t=e.response?.headers)?.get)?.call(t,`x-base44-connector-error`)??e.response?.headers?.[`x-base44-connector-error`],e.response?.data,e);return i?.(n),Promise.reject(n)}),a}function Hf(e){let{axios:t,appId:n,getSocket:r}=e;return new Proxy({},{get(e,i){if(!(typeof i!=`string`||i===`then`||i.startsWith(`_`)))return Wf(t,n,i,r)}})}function Uf(e){try{let t=JSON.parse(e);return{type:t.type,data:t.data,id:t.id||t.data?.id,timestamp:t.timestamp||new Date().toISOString()}}catch(e){return console.warn(`[Base44 SDK] Failed to parse realtime message:`,e),null}}function Wf(e,t,n,r){let i=`/apps/${t}/entities/${n}`;return{async list(t,n,r,a){let o={};return t&&(o.sort=t),n&&(o.limit=n),r&&(o.skip=r),a&&(o.fields=Array.isArray(a)?a.join(`,`):a),e.get(i,{params:o})},async filter(t,n,r,a,o){let s={q:JSON.stringify(t)};return n&&(s.sort=n),r&&(s.limit=r),a&&(s.skip=a),o&&(s.fields=Array.isArray(o)?o.join(`,`):o),e.get(i,{params:s})},async get(t){return e.get(`${i}/${t}`)},async create(t){return e.post(i,t)},async update(t,n){return e.put(`${i}/${t}`,n)},async delete(t){return e.delete(`${i}/${t}`)},async deleteMany(t){return e.delete(i,{data:t})},async bulkCreate(t){return e.post(`${i}/bulk`,t)},async updateMany(t,n){return e.patch(`${i}/update-many`,{query:t,data:n})},async bulkUpdate(t){return e.put(`${i}/bulk`,t)},async importEntities(t){let n=new FormData;return n.append(`file`,t,t.name),e.post(`${i}/import`,n,{headers:{"Content-Type":`multipart/form-data`}})},subscribe(e){let i=`entities:${t}:${n}`;return r().subscribeToRoom(i,{update_model:t=>{let r=Uf(t.data);if(r){r.type!==`delete`&&r.data?._oversize&&console.error(`[Base44 SDK] Realtime broadcast for ${n}#${r.id} was oversize and got slimmed for transport. Fields >10 KB are empty and the rest of the record may be a stub. Call \`entities.${n}.get("${r.id}")\` to fetch the full record.`);try{e(r)}catch(e){console.error(`[Base44 SDK] Subscription callback error:`,e)}}}})}}}function Gf(e,t){return{async call(n,r,i){if(!n?.trim())throw Error(`Integration slug is required and cannot be empty`);if(!r?.trim())throw Error(`Operation ID is required and cannot be empty`);let{pathParams:a,queryParams:o,...s}=i??{},c={...s,...a&&{path_params:a},...o&&{query_params:o}};return await e.post(`/apps/${t}/integrations/custom/${n}/${r}`,c)}}}function Kf(e,t){let n=Gf(e,t);return new Proxy({},{get(r,i){if(!(typeof i!=`string`||i===`then`||i.startsWith(`_`)))return i===`custom`?n:new Proxy({},{get(n,r){if(!(typeof r!=`string`||r===`then`||r.startsWith(`_`)))return async n=>{if(typeof n==`string`)throw Error(`Integration ${r} must receive an object with named parameters, received: ${n}`);let a,o;return n instanceof FormData||n&&Object.values(n).some(e=>
16e instanceof File)?(a=new FormData,Object.keys(n).forEach(e=>{n[e]instanceof File?a.append(e,n[e],n[e].name):typeof n[e]==`object`&&n[e]!==null?a.append(e,JSON.stringify(n[e])):a.append(e,n[e])}),o=`multipart/form-data`):(a=n,o=`application/json`),i===`Core`?e.post(`/apps/${t}/integration-endpoints/Core/${r}`,a||n,{headers:{"Content-Type":o}}):e.post(`/apps/${t}/integration-endpoints/installable/${i}/integration-endpoints/${r}`,a||n,{headers:{"Content-Type":o}})}}})}})}function qf(){return typeof window>`u`?!1:window!==window.parent}function Jf(e,t,n){let r=Math.round(window.screenX+(window.outerWidth-500)/2),i=Math.round(window.screenY+(window.outerHeight-600)/2),a=window.open(e,`base44_auth`,`width=500,height=600,left=${r},top=${i},resizable=yes,scrollbars=yes`);if(!a)return;let o=()=>{window.removeEventListener(`message`,s),clearInterval(c),a.closed||a.close()},s=e=>{if(e.origin!==n||e.source!==a||!e.data?.access_token)return;o();let r=new URL(t),{access_token:i,is_new_user:s}=e.data;r.searchParams.set(`access_token`,i),s!=null&&r.searchParams.set(`is_new_user`,String(s)),window.location.href=r.toString()},c=setInterval(()=>{a.closed&&o()},500);window.addEventListener(`message`,s)}function Yf(e,t,n,r){let i=null,a=()=>{i=null},o=!!r.token;return{hasToken(){return o},async me(){let t=i??e.get(`/apps/${n}/entities/User/me`).finally(()=>{i===t&&(i=null)});return i=t,t},async updateMe(t){return e.put(`/apps/${n}/entities/User/me`,t)},redirectToLogin(e){if(typeof window>`u`)throw Error(`Login method can only be used in a browser environment`);let t=e?new URL(e,window.location.origin).toString():window.location.href,n=`${r.appBaseUrl}/login?from_url=${encodeURIComponent(t)}`;window.location.href=n},loginWithProvider(e,t=`/`){let i=new URL(t,window.location.origin).toString(),a=`app_id=${n}&from_url=${encodeURIComponent(i)}`,o;o=e===`sso`?`/apps/${n}/auth/sso/login`:`/apps/auth${e===`google`?``:`/${e}`}/login`;let s=`${r.appBaseUrl}/api${o}?${a}`;if(qf())return Jf(`${s}&popup_origin=${encodeURIComponent(window.location.origin)}`,i,window.location.origin);window.location.href=s},logout(t){if(delete e.defaults.headers.common.Authorization,a(),Ff(),o=!1,typeof window<`u`){if(window.localStorage)try{window.localStorage.removeItem(`base44_access_token`),window.localStorage.removeItem(`token`)}catch(e){console.error(`Failed to remove token from localStorage:`,e)}let e=t||window.location.href,n=`${r.appBaseUrl}/api/apps/auth/logout?from_url=${encodeURIComponent(e)}`;window.location.href=n}},setToken(n,r=!0){if(n&&(a(),Ff(),o=!0,e.defaults.headers.common.Authorization=`Bearer ${n}`,t.defaults.headers.common.Authorization=`Bearer ${n}`,r&&typeof window<`u`&&window.localStorage))try{window.localStorage.setItem(`base44_access_token`,n),window.localStorage.setItem(`token`,n)}catch(e){console.error(`Failed to save token to localStorage:`,e)}},async loginViaEmailPassword(t,r,i){try{let{access_token:a,user:o}=await e.post(`/apps/${n}/auth/login`,{email:t,password:r,...i&&{turnstile_token:i}});return a&&this.setToken(a),{access_token:a,user:o}}catch(e){throw e.response?.status===401&&await this.logout(),e}},async isAuthenticated(){try{return await this.me(),!0}catch{return!1}},inviteUser(t,r){return e.post(`/apps/${n}/users/invite-user`,{user_email:t,role:r})},register(t){return e.post(`/apps/${n}/auth/register`,t)},verifyOtp({email:t,otpCode:r}){return e.post(`/apps/${n}/auth/verify-otp`,{email:t,otp_code:r})},resendOtp(t){return e.post(`/apps/${n}/auth/resend-otp`,{email:t})},resetPasswordRequest(t){return e.post(`/apps/${n}/auth/reset-password-request`,{email:t})},resetPassword({resetToken:t,newPassword:r}){return e.post(`/apps/${n}/auth/reset-password`,{reset_token:t,new_password:r})},changePassword({userId:t,currentPassword:r,newPassword:i}){return e.post(`/apps/${n}/auth/change-password`,{user_id:t,current_password:r,new_password:i})}}}function Xf(e,t){return{async getAccessToken(n){let r=`/apps/${t}/auth/sso/accesstoken/${n}`;return e.get(r)},async getIdToken(n){let r=`/apps/${t}/auth/sso/idtoken/${n}`;return e.get(r)}}}var Zf=new Set([`GET`,`POST`,`PUT`,`PATCH`,`DELETE`,`HEAD`]);
16function Qf(e,t){return{async getAccessToken(n){if(!n||typeof n!=`string`)throw Error(`Integration type is required and must be a string`);return(await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`)).access_token},async getConnection(n){if(!n||typeof n!=`string`)throw Error(`Integration type is required and must be a string`);let r=await e.get(`/apps/${t}/external-auth/tokens/${encodeURIComponent(n)}`);return{accessToken:r.access_token,connectionConfig:r.connection_config??null}},async getWorkspaceConnection(n){if(!n||typeof n!=`string`)throw Error(`Connector ID is required and must be a string`);let r=await e.get(`/apps/${t}/external-auth/tokens/connectors/${encodeURIComponent(n)}`);return{accessToken:r.access_token,connectionConfig:r.connection_config??null}},async getCurrentAppUserAccessToken(n){if(!n||typeof n!=`string`)throw Error(`Connector ID is required and must be a string`);return(await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`)).access_token},async getCurrentAppUserConnection(n){if(!n||typeof n!=`string`)throw Error(`Connector ID is required and must be a string`);let r=await e.get(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/token`);return{accessToken:r.access_token,connectionConfig:r.connection_config??null}},async callApi(n,r){return $f(n,`Integration type`),ep(e,`/apps/${t}/connectors/${encodeURIComponent(n)}/call`,r)}}}function $f(e,t){if(!e||typeof e!=`string`)throw Error(`${t} is required and must be a string`)}async function ep(e,t,n){if(!n||typeof n!=`object`)throw Error(`Request is required and must be an object`);$f(n.path,`Request path`);let r=n.method??`GET`;if(!Zf.has(r))throw Error(`Request method must be one of GET, POST, PUT, PATCH, DELETE, or HEAD`);let i=await e.post(t,{method:r,...n.host==null?{}:{host:n.host},path:n.path,query:n.query??{},headers:n.headers??{},body:n.body??null});return{success:i.success,phase:i.phase,status:i.status_code??null,data:i.data,dataBase64:i.data_base64??null,contentType:i.content_type??null,headers:i.headers??{},creditsCharged:i.credits_charged??0}}function tp(e,t){return{async connectAppUser(n){if(!n||typeof n!=`string`)throw Error(`Connector ID is required and must be a string`);return(await e.post(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}/initiate`)).redirect_url},async disconnectAppUser(n){if(!n||typeof n!=`string`)throw Error(`Connector ID is required and must be a string`);await e.delete(`/apps/${t}/app-user-auth/connectors/${encodeURIComponent(n)}`)}}}function np(e={}){let{storageKey:t=`base44_access_token`,paramName:n=`access_token`,saveToStorage:r=!0,removeFromUrl:i=!0}=e,a=null;if(typeof window<`u`&&window.location)try{let e=new URLSearchParams(window.location.search);if(a=e.get(n),a){if(r&&rp(a,{storageKey:t}),i){e.delete(n);let t=`${window.location.pathname}${e.toString()?`?${e.toString()}`:``}${window.location.hash}`;window.history.replaceState({},document.title,t)}return a}}catch(e){console.error(`Error retrieving token from URL:`,e)}if(typeof window<`u`&&window.localStorage)try{return a=window.localStorage.getItem(t),a}catch(e){console.error(`Error retrieving token from local storage:`,e)}return null}function rp(e,t){let{storageKey:n=`base44_access_token`}=t;if(typeof window>`u`||!window.localStorage||!e)return!1;try{return window.localStorage.setItem(n,e),window.localStorage.setItem(`token`,e),!0}catch(e){return console.error(`Error saving token to local storage:`,e),!1}}function ip({axios:e,serviceRoleAxios:t,appId:n,serverUrl:r,functionsVersion:i,platformHeaders:a}){let o=new Headers(a),s=e=>{let t=e.defaults.headers.common.Authorization;return typeof t==`string`&&t.startsWith(`Bearer `)?t:null};return async function(a,c={}){ap(a);let{fetch:l=fetch,...u}=c,d=new Headers(c.headers),f=(e,t)=>{t&&!d.has(e)&&d.set(e,t)};return f(`Authorization`,s(e)),f(`Base44-Service-Authorization`,s(t)),f(`Base44-App-Id`,n),f(`Base44-Api-Url`,r),f(`Base44-Functions-Version`,i),f(`Base44-State`,o.get(`Base44-State`)),f(`X-Data-Env`,o.get(`X-Data-Env`)),l(a,{...u,headers:d})}}function ap(e){if(typeof e!=`string`||e===``)throw Error(`fetchWithAuth() requires a path, such as '/api/orders'.`);let t=e.replace(/[\t\n\r]/g,``).replace(/^[\x00-\x20]+/,``);if(!t.startsWith(`/`)||t.startsWith(`//`)||t.startsWith(`/\\`))throw Error(`fetchWithAuth() only sends requests to your app's own origin, so your app's credentials never reach a third party. "${e}" is not a path on it â pass a relative path such as '/api/orders'. Use base44.functions.fetch() to call a Base44 backend function, or plain fetch() for another origin.`)}function op(e,t,n){let r=(e,t)=>e?`${String(e).replace(/\/$/,``)}${t}`:t,i=e=>{let t=new Headers;if(n?.getAuthHeaders){let e=n.getAuthHeaders();Object.entries(e).forEach(([e,n])=>{n!=null&&t.set(e,String(n))})}return e&&new Headers(e).forEach((e,n)=>{t.set(n,e)}),t};return{async invoke(n,r){if(typeof r==`string`)throw Error(`Function ${n} must receive an object with named parameters, received: ${r}`);let i,a;return r instanceof FormData||r&&Object.values(r).some(e=>
16e instanceof File)?(i=new FormData,Object.keys(r).forEach(e=>{r[e]instanceof File?i.append(e,r[e],r[e].name):typeof r[e]==`object`&&r[e]!==null?i.append(e,JSON.stringify(r[e])):i.append(e,r[e])}),a=`multipart/form-data`):(i=r,a=`application/json`),e.post(`/apps/${t}/functions/${n}`,i||r,{headers:{"Content-Type":a}})},async fetch(e,t={}){let a=`/functions${e.startsWith(`/`)?e:`/${e}`}`,o=i(t.headers),s={...t,headers:o};return await fetch(r(n?.baseURL,a),s)}}}function sp({axios:e,getSocket:t,appId:n,serverUrl:r,token:i}){let a=`/apps/${n}/agents`,o={},s=()=>e.get(`${a}/conversations`),c=t=>e.get(`${a}/conversations/${t}`);return{getConversations:s,getConversation:c,listConversations:t=>e.get(`${a}/conversations`,{params:t}),createConversation:t=>e.post(`${a}/conversations`,t),addMessage:async(t,n)=>e.post(`${a}/conversations/v2/${t.id}/messages`,n),subscribeToConversation:(e,n)=>{let r=`/agent-conversations/${e}`,i=t(),a=c(e).then(t=>(o[e]=t,t));return i.subscribeToRoom(r,{connect:()=>{},update_model:async({data:t})=>{let r=JSON.parse(t);if(r._message){await a;let t=r._message,i=o[e];if(i){let r=i.messages||[],a=r.findIndex(e=>e.id===t.id),s=a===-1?[...r,t]:r.map((e,n)=>n===a?t:e);o[e]={...i,messages:s},n?.(o[e])}}}})},getWhatsAppConnectURL:e=>{let t=`${r}/api/apps/${n}/agents/${encodeURIComponent(e)}/whatsapp`,a=i??np();return a?`${t}?token=${a}`:t},getTelegramConnectURL:e=>{let t=`${r}/api/apps/${n}/agents/${encodeURIComponent(e)}/telegram`,a=i??np();return a?`${t}?token=${a}`:t}}}function cp({serverUrl:e,token:t,appId:n}){return{connection:()=>({baseURL:`${e}/api/apps/${n}/ai/openai/v1`,token:t??np()??``})}}function lp(e,t){let n=`/app-logs/${t}`;return{async logUserInApp(t){await e.post(`${n}/log-user-in-app/${t}`)},async fetchLogs(t={}){return await e.get(n,{params:t})},async getStats(t={}){return await e.get(`${n}/stats`,{params:t})}}}function up(e,t){return{async getPublicSettings(){return e.get(`/apps/public/prod/public-settings/by-id/${t}`)}}}function dp(e,t){return{async inviteUser(n,r){if(r!==`user`&&r!==`admin`)throw Error(`Invalid role: "${r}". Role must be either "user" or "admin".`);return await e.post(`/apps/${t}/runtime/users/invite-user`,{user_email:n,role:r})}}}var fp=Object.create(null);fp.open=`0`,fp.close=`1`,fp.ping=`2`,fp.pong=`3`,fp.message=`4`,fp.upgrade=`5`,fp.noop=`6`;var pp=Object.create(null);Object.keys(fp).forEach(e=>{pp[fp[e]]=e});var mp={type:`error`,data:`parser error`},hp=typeof Blob==`function`||typeof Blob<`u`&&Object.prototype.toString.call(Blob)===`[object BlobConstructor]`,gp=typeof ArrayBuffer==`function`,_p=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,vp=({type:e,data:t},n,r)=>hp&&t instanceof Blob?n?r(t):yp(t,r):gp&&(t instanceof ArrayBuffer||_p(t))?n?r(t):yp(new Blob([t]),r):r(fp[e]+(t||``)),yp=(e,t)=>{let n=new FileReader;return n.onload=function(){let e=n.result.split(`,`)[1];t(`b`+(e||``))},n.readAsDataURL(e)};function bp(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var xp;function Sp(e,t){if(hp&&e.data instanceof Blob)return e.data.arrayBuffer().then(bp).then(t);if(gp&&(e.data instanceof ArrayBuffer||_p(e.data)))return t(bp(e.data));vp(e,!1,e=>{xp||=new TextEncoder,t(xp.encode(e))})}var Cp=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,wp=typeof Uint8Array>`u`?[]:new Uint8Array(256);for(let e=0;e<64;e++)wp[Cp.charCodeAt(e)]=e;var Tp=e=>{let t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);let l=new ArrayBuffer(t),u=new Uint8Array(l);for(r=0;r<n;r+=4)a=wp[e.charCodeAt(r)],o=wp[e.charCodeAt(r+1)],s=wp[e.charCodeAt(r+2)],c=wp[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},Ep=typeof ArrayBuffer==`function`,Dp=(e,t)=>{if(typeof e!=`string`)return{type:`message`,data:kp(e,t)};let n=e.charAt(0);return n===`b`?{type:`message`,data:Op(e.substring(1),t)}:pp[n]?e.length>1?{type:pp[n],data:e.substring(1)}:{type:pp[n]}:mp},Op=(e,t)=>Ep?kp(Tp(e),t):{base64:!0,data:e},kp=(e,t)=>{switch(t){case`blob`:return e instanceof Blob?e:new Blob([e]);default:return e instanceof ArrayBuffer?e:e.buffer}},Ap=`�`,jp=(e,t)=>{let n=e.length,r=Array(n),i=0;e.forEach((e,a)=>{vp(e,!1,e=>{r[a]=e,++i===n&&t(r.join(Ap))})})},Mp=(e,t)=>{let n=e.split(Ap),r=[];for(let e=0;e<n.length;e++){let i=Dp(n[e],t);if(r.push(i),i.type===`error`)break}return r};function Np(){return new TransformStream({transform(e,t){Sp(e,n=>{let r=n.length,i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);let e=new DataView(i.buffer);e.setUint8(0,126),e.setUint16(1,r)}else{i=new Uint8Array(9);let e=new DataView(i.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(r))}
16e.data&&typeof e.data!=`string`&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}var Pp;function Fp(e){return e.reduce((e,t)=>e+t.length,0)}function Ip(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),r=0;for(let i=0;i<t;i++)n[i]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function Lp(e,t){Pp||=new TextDecoder;let n=[],r=0,i=-1,a=!1;return new TransformStream({transform(o,s){for(n.push(o);;){if(r===0){if(Fp(n)<1)break;let e=Ip(n,1);a=(e[0]&128)==128,i=e[0]&127,r=i<126?3:i===126?1:2}else if(r===1){if(Fp(n)<2)break;let e=Ip(n,2);i=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),r=3}else if(r===2){if(Fp(n)<8)break;let e=Ip(n,8),t=new DataView(e.buffer,e.byteOffset,e.length),a=t.getUint32(0);if(a>2**21-1){s.enqueue(mp);break}i=a*2**32+t.getUint32(4),r=3}else{if(Fp(n)<i)break;let e=Ip(n,i);s.enqueue(Dp(a?e:Pp.decode(e),t)),r=0}if(i===0||i>e){s.enqueue(mp);break}}}})}function Rp(e){if(e)return zp(e)}function zp(e){for(var t in Rp.prototype)e[t]=Rp.prototype[t];return e}Rp.prototype.on=Rp.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},Rp.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Rp.prototype.off=Rp.prototype.removeListener=Rp.prototype.removeAllListeners=Rp.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},Rp.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,i=n.length;r<i;++r)n[r].apply(this,t)}return this},Rp.prototype.emitReserved=Rp.prototype.emit,Rp.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},Rp.prototype.hasListeners=function(e){return!!this.listeners(e).length};var Bp=typeof Promise==`function`&&typeof Promise.resolve==`function`?e=>Promise.resolve().then(e):(e,t)=>t(e,0),Vp=typeof self<`u`?self:typeof window<`u`?window:Function(`return this`)(),Hp=`arraybuffer`;function Up(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}var Wp=Vp.setTimeout,Gp=Vp.clearTimeout;function Kp(e,t){t.useNativeTimers?(e.setTimeoutFn=Wp.bind(Vp),e.clearTimeoutFn=Gp.bind(Vp)):(e.setTimeoutFn=Vp.setTimeout.bind(Vp),e.clearTimeoutFn=Vp.clearTimeout.bind(Vp))}var qp=1.33;function Jp(e){return typeof e==`string`?Yp(e):Math.ceil((e.byteLength||e.size)*qp)}function Yp(e){let t=0,n=0;for(let r=0,i=e.length;r<i;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function Xp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Zp(e){let t=``;for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+=`&`),t+=encodeURIComponent(n)+`=`+encodeURIComponent(e[n]));return t}function Qp(e){let t={},n=e.split(`&`);for(let e=0,r=n.length;e<r;e++){let r=n[e].split(`=`);t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var $p=class extends Error{constructor(e,t,n){super(e),this.description=t,this.context=n,this.type=`TransportError`}},em=class extends Rp{constructor(e){super(),this.writable=!1,Kp(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,t,n){return super.emitReserved(`error`,new $p(e,t,n)),this}open(){return this.readyState=`opening`,this.doOpen(),this}close(){return(this.readyState===`opening`||this.readyState===`open`)&&(this.doClose(),this.onClose()),this}send(e){this.readyState===`open`&&this.write(e)}onOpen(){this.readyState=`open`,this.writable=!0,super.emitReserved(`open`)}onData(e){let t=Dp(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved(`packet`,e)}onClose(e){this.readyState=`closed`,super.emitReserved(`close`,e)}pause(e){}createUri(e,t={}){return e+`://`+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){let e=this.opts.hostname;return e.indexOf(`:`)===-1?e:`[`+e+`]`}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?`:`+this.opts.port:``}_query(e){let t=Zp(e);return t.length?`?`+t:``}},tm=class extends em{constructor(){super(...arguments),this._polling=!1}get name(){return`polling`}doOpen(){this._poll()}pause(e){this.readyState=`pausing`;let t=()=>{this.readyState=`paused`,e()};if(this._polling||!this.writable){let e=0;this._polling&&(e++,this.once(`pollComplete`,function(){--e||t()})),this.writable||(e++,this.once(`drain`,function(){--e||t()}))}else t()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved(`poll`)}
16onData(e){Mp(e,this.socket.binaryType).forEach(e=>{if(this.readyState===`opening`&&e.type===`open`&&this.onOpen(),e.type===`close`)return this.onClose({description:`transport closed by the server`}),!1;this.onPacket(e)}),this.readyState!==`closed`&&(this._polling=!1,this.emitReserved(`pollComplete`),this.readyState===`open`&&this._poll())}doClose(){let e=()=>{this.write([{type:`close`}])};this.readyState===`open`?e():this.once(`open`,e)}write(e){this.writable=!1,jp(e,e=>{this.doWrite(e,()=>{this.writable=!0,this.emitReserved(`drain`)})})}uri(){let e=this.opts.secure?`https`:`http`,t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=Xp()),!this.supportsBinary&&!t.sid&&(t.b64=1),this.createUri(e,t)}},nm=!1;try{nm=typeof XMLHttpRequest<`u`&&`withCredentials`in new XMLHttpRequest}catch{}var rm=nm;function im(){}var am=class extends tm{constructor(e){if(super(e),typeof location<`u`){let t=location.protocol===`https:`,n=location.port;n||=t?`443`:`80`,this.xd=typeof location<`u`&&e.hostname!==location.hostname||n!==e.port}}doWrite(e,t){let n=this.request({method:`POST`,data:e});n.on(`success`,t),n.on(`error`,(e,t)=>{this.onError(`xhr post error`,e,t)})}doPoll(){let e=this.request();e.on(`data`,this.onData.bind(this)),e.on(`error`,(e,t)=>{this.onError(`xhr poll error`,e,t)}),this.pollXhr=e}},om=class e extends Rp{constructor(e,t,n){super(),this.createRequest=e,Kp(this,n),this._opts=n,this._method=n.method||`GET`,this._uri=t,this._data=n.data===void 0?null:n.data,this._create()}_create(){var t;let n=Up(this._opts,`agent`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`autoUnref`);n.xdomain=!!this._opts.xd;let r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let e in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(e)&&r.setRequestHeader(e,this._opts.extraHeaders[e])}}catch{}if(this._method===`POST`)try{r.setRequestHeader(`Content-type`,`text/plain;charset=UTF-8`)}catch{}try{r.setRequestHeader(`Accept`,`*/*`)}catch{}(t=this._opts.cookieJar)==null||t.addCookies(r),`withCredentials`in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var e;r.readyState===3&&((e=this._opts.cookieJar)==null||e.parseCookies(r.getResponseHeader(`set-cookie`))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status==`number`?r.status:0)},0))},r.send(this._data)}catch(e){this.setTimeoutFn(()=>{this._onError(e)},0);return}typeof document<`u`&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(e){this.emitReserved(`error`,e,this._xhr),this._cleanup(!0)}_cleanup(t){if(this._xhr!==void 0&&this._xhr!==null){if(this._xhr.onreadystatechange=im,t)try{this._xhr.abort()}catch{}typeof document<`u`&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let e=this._xhr.responseText;e!==null&&(this.emitReserved(`data`,e),this.emitReserved(`success`),this._cleanup())}abort(){this._cleanup()}};if(om.requestsCount=0,om.requests={},typeof document<`u`){if(typeof attachEvent==`function`)attachEvent(`onunload`,sm);else if(typeof addEventListener==`function`){let e=`onpagehide`in Vp?`pagehide`:`unload`;addEventListener(e,sm,!1)}}function sm(){for(let e in om.requests)om.requests.hasOwnProperty(e)&&om.requests[e].abort()}var cm=(function(){let e=um({xdomain:!1});return e&&e.responseType!==null})(),lm=class extends am{constructor(e){super(e);let t=e&&e.forceBase64;this.supportsBinary=cm&&!t}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new om(um,this.uri(),e)}};function um(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<`u`&&(!t||rm))return new XMLHttpRequest}catch{}if(!t)try{return new Vp[[`Active`,`Object`].join(`X`)](`Microsoft.XMLHTTP`)}catch{}}var dm=typeof navigator<`u`&&typeof navigator.product==`string`&&navigator.product.toLowerCase()===`reactnative`,fm=class extends em{get name(){return`websocket`}doOpen(){let e=this.uri(),t=this.opts.protocols,n=dm?{}:Up(this.opts,`agent`,`perMessageDeflate`,`pfx`,`key`,`passphrase`,`cert`,`ca`,`ciphers`,`rejectUnauthorized`,`localAddress`,`protocolVersion`,`origin`,`maxPayload`,`family`,`checkServerIdentity`);this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,t,n)}catch(e){return this.emitReserved(`error`,e)}
16this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:`websocket connection closed`,context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError(`websocket error`,e)}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;vp(n,this.supportsBinary,e=>{try{this.doWrite(n,e)}catch{}r&&Bp(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){this.ws!==void 0&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let e=this.opts.secure?`wss`:`ws`,t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=Xp()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}},pm=Vp.WebSocket||Vp.MozWebSocket,mm={websocket:class extends fm{createSocket(e,t,n){return dm?new pm(e,t,n):t?new pm(e,t):new pm(e)}doWrite(e,t){this.ws.send(t)}},webtransport:class extends em{get name(){return`webtransport`}doOpen(){try{this._transport=new WebTransport(this.createUri(`https`),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved(`error`,e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError(`webtransport error`,e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{let t=Lp(2**53-1,this.socket.binaryType),n=e.readable.pipeThrough(t).getReader(),r=Np();r.readable.pipeTo(e.writable),this._writer=r.writable.getWriter();let i=()=>{n.read().then(({done:e,value:t})=>{e||(this.onPacket(t),i())}).catch(e=>{})};i();let a={type:`open`};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let t=0;t<e.length;t++){let n=e[t],r=t===e.length-1;this._writer.write(n).then(()=>{r&&Bp(()=>{this.writable=!0,this.emitReserved(`drain`)},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)==null||e.close()}},polling:lm},hm=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,gm=[`source`,`protocol`,`authority`,`userInfo`,`user`,`password`,`host`,`port`,`relative`,`path`,`directory`,`file`,`query`,`anchor`];function _m(e){if(e.length>8e3)throw`URI too long`;let t=e,n=e.indexOf(`[`),r=e.indexOf(`]`);n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,`;`)+e.substring(r,e.length));let i=hm.exec(e||``),a={},o=14;for(;o--;)a[gm[o]]=i[o]||``;return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,`:`),a.authority=a.authority.replace(`[`,``).replace(`]`,``).replace(/;/g,`:`),a.ipv6uri=!0),a.pathNames=vm(a,a.path),a.queryKey=ym(a,a.query),a}function vm(e,t){let n=t.replace(/\/{2,9}/g,`/`).split(`/`);return(t.slice(0,1)==`/`||t.length===0)&&n.splice(0,1),t.slice(-1)==`/`&&n.splice(n.length-1,1),n}function ym(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(e,t,r){t&&(n[t]=r)}),n}var bm=typeof addEventListener==`function`&&typeof removeEventListener==`function`,xm=[];bm&&addEventListener(`offline`,()=>{xm.forEach(e=>e())},!1);var Sm=class e extends Rp{constructor(e,t){if(super(),this.binaryType=Hp,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e==`object`&&(t=e,e=null),e){let n=_m(e);t.hostname=n.host,t.secure=n.protocol===`https`||n.protocol===`wss`,t.port=n.port,n.query&&(t.query=n.query)}else t.host&&(t.hostname=_m(t.host).host);Kp(this,t),this.secure=t.secure==null?typeof location<`u`&&location.protocol===`https:`:t.secure,t.hostname&&!t.port&&(t.port=this.secure?`443`:`80`),this.hostname=t.hostname||(typeof location<`u`?location.hostname:`localhost`),this.port=t.port||(typeof location<`u`&&location.port?location.port:this.secure?`443`:`80`),this.transports=[],this._transportsByName={},t.transports.forEach(e=>{let t=e.prototype.name;this.transports.push(t),this._transportsByName[t]=e}),this.opts=Object.assign({path:`/engine.io`,agent:!1,withCredentials:!1,upgrade:!0,timestampParam:`t`,rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,``)+(this.opts.addTrailingSlash?`/`:``),typeof this.opts.query==`string`&&(this.opts.query=Qp(this.opts.query)),bm&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener(`beforeunload`,this._beforeunloadEventListener,!1)),this.hostname!==`localhost`&&(this._offlineEventListener=()=>{this._onClose(`transport close`,{description:`network connection lost`})},xm.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){let t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);let n=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved(`error`,`No transports available`)},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf(`websocket`)!==-1?`websocket`:this.transports[0];this.readyState=`opening`;let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on(`drain`,this._onDrain.bind(this)).on(`packet`,this._onPacket.bind(this)).on(`error`,this._onError.bind(this)).on(`close`,e=>this._onClose(`transport close`,e))}onOpen(){this.readyState=`open`,e.priorWebsocketSuccess=this.transport.name===`websocket`,this.emitReserved(`open`),this.flush()}_onPacket(e){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`)switch(this.emitReserved(`packet`,e),this.emitReserved(`heartbeat`),e.type){case`open`:this.onHandshake(JSON.parse(e.data));break;case`ping`:this._sendPacket(`pong`),this.emitReserved(`ping`),this.emitReserved(`pong`),this._resetPingTimeout();break;case`error`:let t=Error(`server error`);t.code=e.data,this._onError(t);break;case`message`:this.emitReserved(`data`,e.data),this.emitReserved(`message`,e.data)}}onHandshake(e){this.emitReserved(`handshake`,e),this.id=e.sid,this.transport.query.sid=e.sid,this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!==`closed`&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose(`ping timeout`)},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved(`drain`):this.flush()}flush(){if(this.readyState!==`closed`&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved(`flush`)}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name===`polling`&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let t=0;t<this.writeBuffer.length;t++){let n=this.writeBuffer[t].data;if(n&&(e+=Jp(n)),t>0&&e>this._maxPayload)return this.writeBuffer.slice(0,t);e+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Bp(()=>{this._onClose(`ping timeout`)},this.setTimeoutFn)),e}write(e,t,n){return this._sendPacket(`message`,e,t,n),this}send(e,t,n){return this._sendPacket(`message`,e,t,n),this}_sendPacket(e,t,n,r){if(typeof t==`function`&&(r=t,t=void 0),typeof n==`function`&&(r=n,n=null),this.readyState===`closing`||this.readyState===`closed`)return;n||={}
16,n.compress=!1!==n.compress;let i={type:e,data:t,options:n};this.emitReserved(`packetCreate`,i),this.writeBuffer.push(i),r&&this.once(`flush`,r),this.flush()}close(){let e=()=>{this._onClose(`forced close`),this.transport.close()},t=()=>{this.off(`upgrade`,t),this.off(`upgradeError`,t),e()},n=()=>{this.once(`upgrade`,t),this.once(`upgradeError`,t)};return(this.readyState===`opening`||this.readyState===`open`)&&(this.readyState=`closing`,this.writeBuffer.length?this.once(`drain`,()=>{this.upgrading?n():e()}):this.upgrading?n():e()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState===`opening`)return this.transports.shift(),this._open();this.emitReserved(`error`,t),this._onClose(`transport error`,t)}_onClose(e,t){if(this.readyState===`opening`||this.readyState===`open`||this.readyState===`closing`){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners(`close`),this.transport.close(),this.transport.removeAllListeners(),bm&&(this._beforeunloadEventListener&&removeEventListener(`beforeunload`,this._beforeunloadEventListener,!1),this._offlineEventListener)){let e=xm.indexOf(this._offlineEventListener);e!==-1&&xm.splice(e,1)}this.readyState=`closed`,this.id=null,this.emitReserved(`close`,e,t),this.writeBuffer=[],this._prevBufferLen=0}}};Sm.protocol=4;var Cm=class extends Sm{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState===`open`&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_probe(e){let t=this.createTransport(e),n=!1;Sm.priorWebsocketSuccess=!1;let r=()=>{n||(t.send([{type:`ping`,data:`probe`}]),t.once(`packet`,e=>{if(!n)if(e.type===`pong`&&e.data===`probe`){if(this.upgrading=!0,this.emitReserved(`upgrading`,t),!t)return;Sm.priorWebsocketSuccess=t.name===`websocket`,this.transport.pause(()=>{n||this.readyState!==`closed`&&(l(),this.setTransport(t),t.send([{type:`upgrade`}]),this.emitReserved(`upgrade`,t),t=null,this.upgrading=!1,this.flush())})}else{let e=Error(`probe error`);e.transport=t.name,this.emitReserved(`upgradeError`,e)}}))};function i(){n||(n=!0,l(),t.close(),t=null)}let a=e=>{let n=Error(`probe error: `+e);n.transport=t.name,i(),this.emitReserved(`upgradeError`,n)};function o(){a(`transport closed`)}function s(){a(`socket closed`)}function c(e){t&&e.name!==t.name&&i()}let l=()=>{t.removeListener(`open`,r),t.removeListener(`error`,a),t.removeListener(`close`,o),this.off(`close`,s),this.off(`upgrading`,c)};t.once(`open`,r),t.once(`error`,a),t.once(`close`,o),this.once(`close`,s),this.once(`upgrading`,c),this._upgrades.indexOf(`webtransport`)!==-1&&e!==`webtransport`?this.setTimeoutFn(()=>{n||t.open()},200):t.open()}onHandshake(e){this._upgrades=this._filterUpgrades(e.upgrades),super.onHandshake(e)}_filterUpgrades(e){let t=[];for(let n=0;n<e.length;n++)~this.transports.indexOf(e[n])&&t.push(e[n]);return t}},wm=class extends Cm{constructor(e,t={}){let n=typeof e==`object`,r=n?{...e}:{...t};(!r.transports||r.transports&&typeof r.transports[0]==`string`)&&(r.transports=(r.transports||[`polling`,`websocket`,`webtransport`]).map(e=>mm[e]).filter(e=>!!e)),super(n?r:e,r)}};wm.protocol;function Tm(e,t=``,n){let r=e;n||=typeof location<`u`&&location,e??=n.protocol+`//`+n.host,typeof e==`string`&&(e.charAt(0)===`/`&&(e=e.charAt(1)===`/`?n.protocol+e:n.host+e),/^(https?|wss?):\/\//.test(e)||(e=n===void 0?`https://`+e:n.protocol+`//`+e),r=_m(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port=`80`:/^(http|ws)s$/.test(r.protocol)&&(r.port=`443`)),r.path=r.path||`/`;let i=r.host.indexOf(`:`)===-1?r.host:`[`+r.host+`]`;return r.id=r.protocol+`://`+i+`:`+r.port+t,r.href=r.protocol+`://`+i+(n&&n.port===r.port?``:`:`+r.port),r}var Em=typeof ArrayBuffer==`function`,Dm=e=>typeof ArrayBuffer.isView==`function`?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Om=Object.prototype.toString,km=typeof Blob==`function`||typeof Blob<`u`&&Om.call(Blob)===`[object BlobConstructor]`,Am=typeof File==`function`||typeof File<`u`&&Om.call(File)===`[object FileConstructor]`;function jm(e){return Em&&(e instanceof ArrayBuffer||Dm(e))||km&&e instanceof Blob||Am&&e instanceof File}function Mm(e,t){if(!e||typeof e!=`object`)return!1;if(Array.isArray(e)){for(let t=0,n=e.length;t<n;t++)if(Mm(e[t]))return!0;return!1}if(jm(e))return!0;
16if(e.toJSON&&typeof e.toJSON==`function`&&arguments.length===1)return Mm(e.toJSON(),!0);for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&Mm(e[t]))return!0;return!1}function Nm(e){let t=[],n=e.data,r=e;return r.data=Pm(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Pm(e,t){if(!e)return e;if(jm(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){let n=Array(e.length);for(let r=0;r<e.length;r++)n[r]=Pm(e[r],t);return n}if(typeof e==`object`&&!(e instanceof Date)){let n={};for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=Pm(e[r],t));return n}return e}function Fm(e,t){return e.data=Im(e.data,t),delete e.attachments,e}function Im(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num==`number`&&e.num>=0&&e.num<t.length)return t[e.num];throw Error(`illegal attachments`)}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Im(e[n],t);else if(typeof e==`object`)for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Im(e[n],t));return e}var Lm=c({Decoder:()=>Vm,Encoder:()=>Bm,PacketType:()=>zm,isPacketValid:()=>Jm,protocol:()=>5}),Rm=[`connect`,`connect_error`,`disconnect`,`disconnecting`,`newListener`,`removeListener`],zm;(function(e){e[e.CONNECT=0]=`CONNECT`,e[e.DISCONNECT=1]=`DISCONNECT`,e[e.EVENT=2]=`EVENT`,e[e.ACK=3]=`ACK`,e[e.CONNECT_ERROR=4]=`CONNECT_ERROR`,e[e.BINARY_EVENT=5]=`BINARY_EVENT`,e[e.BINARY_ACK=6]=`BINARY_ACK`})(zm||={});var Bm=class{constructor(e){this.replacer=e}encode(e){return(e.type===zm.EVENT||e.type===zm.ACK)&&Mm(e)?this.encodeAsBinary({type:e.type===zm.EVENT?zm.BINARY_EVENT:zm.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let t=``+e.type;return(e.type===zm.BINARY_EVENT||e.type===zm.BINARY_ACK)&&(t+=e.attachments+`-`),e.nsp&&e.nsp!==`/`&&(t+=e.nsp+`,`),e.id!=null&&(t+=e.id),e.data!=null&&(t+=JSON.stringify(e.data,this.replacer)),t}encodeAsBinary(e){let t=Nm(e),n=this.encodeAsString(t.packet),r=t.buffers;return r.unshift(n),r}},Vm=class e extends Rp{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e==`function`?{reviver:e}:e)}add(e){let t;if(typeof e==`string`){if(this.reconstructor)throw Error(`got plaintext data when reconstructing a packet`);t=this.decodeString(e);let n=t.type===zm.BINARY_EVENT;n||t.type===zm.BINARY_ACK?(t.type=n?zm.EVENT:zm.ACK,this.reconstructor=new Hm(t),t.attachments===0&&super.emitReserved(`decoded`,t)):super.emitReserved(`decoded`,t)}else if(jm(e)||e.base64)if(this.reconstructor)t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,super.emitReserved(`decoded`,t));else throw Error(`got binary data when not reconstructing a packet`);else throw Error(`Unknown type: `+e)}decodeString(t){let n=0,r={type:Number(t.charAt(0))};if(zm[r.type]===void 0)throw Error(`unknown packet type `+r.type);if(r.type===zm.BINARY_EVENT||r.type===zm.BINARY_ACK){let e=n+1;for(;t.charAt(++n)!==`-`&&n!=t.length;);let i=t.substring(e,n);if(i!=Number(i)||t.charAt(n)!==`-`)throw Error(`Illegal attachments`);let a=Number(i);if(!Wm(a)||a<0)throw Error(`Illegal attachments`);if(a>this.opts.maxAttachments)throw Error(`too many attachments`);r.attachments=a}if(t.charAt(n+1)===`/`){let e=n+1;for(;++n&&t.charAt(n)!==`,`&&n!==t.length;);r.nsp=t.substring(e,n)}else r.nsp=`/`;let i=t.charAt(n+1);if(i!==``&&Number(i)==i){let e=n+1;for(;++n;){let e=t.charAt(n);if(e==null||Number(e)!=e){--n;break}if(n===t.length)break}r.id=Number(t.substring(e,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(r.type,i))r.data=i;else throw Error(`invalid payload`)}return r}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,t){switch(e){case zm.CONNECT:return Km(t);case zm.DISCONNECT:return t===void 0;case zm.CONNECT_ERROR:return typeof t==`string`||Km(t);case zm.EVENT:case zm.BINARY_EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&Rm.indexOf(t[0])===-1);case zm.ACK:case zm.BINARY_ACK:return Array.isArray(t)}}destroy(){this.reconstructor&&=(this.reconstructor.finishedReconstruction(),null)}},Hm=class{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){let e=Fm(this.reconPack,this.buffers);return this.finishedReconstruction(),e}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}};function Um(e){return typeof e==`string`}var Wm=Number.isInteger||function(e){return typeof e==`number`&&isFinite(e)&&Math.floor(e)===e};function Gm(e){return e===void 0||Wm(e)}function Km(e){return Object.prototype.toString.call(e)===`[object Object]`}function qm(e,t){switch(e){case zm.CONNECT:return t===void 0||Km(t);case zm.DISCONNECT:return t===void 0;case zm.EVENT:return Array.isArray(t)&&(typeof t[0]==`number`||typeof t[0]==`string`&&Rm.indexOf(t[0])===-1);case zm.ACK:return Array.isArray(t);case zm.CONNECT_ERROR:return typeof t==`string`||Km(t);default:return!1}}function Jm(e){return Um(e.nsp)&&Gm(e.id)&&qm(e.type,e.data)}function Ym(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Xm=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Zm=class extends Rp{constructor(e,t,n){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=t,n&&n.auth&&(this.auth=n.auth),this._opts=Object.assign({},n),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let e=this.io;this.subs=[Ym(e,`open`,this.onopen.bind(this)),Ym(e,`packet`,this.onpacket.b
16ind(this)),Ym(e,`error`,this.onerror.bind(this)),Ym(e,`close`,this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState===`open`&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift(`message`),this.emit.apply(this,e),this}emit(e,...t){if(Xm.hasOwnProperty(e))throw Error(`"`+e.toString()+`" is a reserved event name`);if(t.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(t),this;let n={type:zm.EVENT,data:t};if(n.options={},n.options.compress=this.flags.compress!==!1,typeof t[t.length-1]==`function`){let e=this.ids++,r=t.pop();this._registerAckCallback(e,r),n.id=e}let r=this.io.engine?.transport?.writable,i=this.connected&&!this.io.engine?._hasPingExpired();return this.flags.volatile&&!r||(i?(this.notifyOutgoingListeners(n),this.packet(n)):this.sendBuffer.push(n)),this.flags={},this}_registerAckCallback(e,t){let n=this.flags.timeout??this._opts.ackTimeout;if(n===void 0){this.acks[e]=t;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let t=0;t<this.sendBuffer.length;t++)this.sendBuffer[t].id===e&&this.sendBuffer.splice(t,1);t.call(this,Error(`operation has timed out`))},n),i=(...e)=>{this.io.clearTimeoutFn(r),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise((n,r)=>{let i=(e,t)=>e?r(e):n(t);i.withError=!0,t.push(i),this.emit(e,...t)})}_addToQueue(e){let t;typeof e[e.length-1]==`function`&&(t=e.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((e,...r)=>(this._queue[0],e===null?(this._queue.shift(),t&&t(null,...r)):n.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;let t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth==`function`?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:zm.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved(`connect_error`,e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved(`disconnect`,e,t),this._clearAcks()}
16_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(t=>String(t.id)===e)){let t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,Error(`socket has been disconnected`))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case zm.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved(`connect_error`,Error(`It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)`));break;case zm.EVENT:case zm.BINARY_EVENT:this.onevent(e);break;case zm.ACK:case zm.BINARY_ACK:this.onack(e);break;case zm.DISCONNECT:this.ondisconnect();break;case zm.CONNECT_ERROR:this.destroy();let t=Error(e.data.message);t.data=e.data.data,this.emitReserved(`connect_error`,t)}}onevent(e){let t=e.data||[];e.id!=null&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){let t=this._anyListeners.slice();for(let n of t)n.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]==`string`&&(this._lastOffset=e[e.length-1])}ack(e){let t=this,n=!1;return function(...r){n||(n=!0,t.packet({type:zm.ACK,id:e,data:r}))}}onack(e){let t=this.acks[e.id];typeof t==`function`&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved(`connect`)}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose(`io server disconnect`)}destroy(){this.subs&&=(this.subs.forEach(e=>e()),void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:zm.DISCONNECT}),this.destroy(),this.connected&&this.onclose(`io client disconnect`),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){let t=this._anyListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){let t=this._anyOutgoingListeners;for(let n=0;n<t.length;n++)if(e===t[n])return t.splice(n,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let t=this._anyOutgoingListeners.slice();for(let n of t)n.apply(this,e.data)}}};function Qm(e){e||={},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Qm.prototype.duration=function(){var e=this.ms*this.factor**+this.attempts++;if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0},Qm.prototype.reset=function(){this.attempts=0},Qm.prototype.setMin=function(e){this.ms=e},Qm.prototype.setMax=function(e){this.max=e},Qm.prototype.setJitter=function(e){this.jitter=e};var $m=class extends Rp{constructor(e,t){super(),this.nsps={},this.subs=[],e&&typeof e==`object`&&(t=e,e=void 0),t||={},t.path=t.path||`/socket.io`,this.opts=t,Kp(this,t),this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor??.5),this.backoff=new Qm({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(t.timeout==null?2e4:t.timeout),this._readyState=`closed`,this.uri=e;let n=t.parser||Lm;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=t.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(t=this.backoff)==null||t.setMin(e),this)}randomizationFactor(e){var t;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(t=this.backoff)==null||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(t=this.backoff)==null||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf(`open`))return this;this.engine=new wm(this.uri,this.opts);let t=this.engine,n=this;this._readyState=`opening`,this.skipReconnect=!1;let r=Ym(t,`open`,function(){n.onopen(),e&&e()}),i=t=>{this.cleanup(),this._readyState=`closed`,this.emitReserved(`error`,t),e?e(t):this.maybeReconnectOnOpen()},a=Ym(t,`error`,i);if(!1!==this._timeout){let e=this._timeout,n=this.setTimeoutFn(()=>{r(),i(Error(`timeout`)),t.close()},e);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}return this.subs.push(r),this.subs.push(a),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState=`open`,this.emitReserved(`open`);let e=this.engine;this.subs.push(Ym(e,`ping`,this.onping.bind(this)),Ym(e,`data`,this.ondata.bind(this)),Ym(e,`error`,this.onerror.bind(this)),Ym(e,`close`,this.onclose.bind(this)),Ym(this.decoder,`decoded`,this.ondecoded.bind(this)))}onping(){this.emitReserved(`ping`)}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose(`parse error`,e)}}ondecoded(e){Bp(()=>{this.emitReserved(`packet`,e)},this.setTimeoutFn)}onerror(e){this.emitReserved(`error`,e)}socket(e,t){let n=this.nsps[e];return n?this._autoConnect&&!n.active&&n.connect():(n=new Zm(this,e,t),this.nsps[e]=n),n}_destroy(e){let t=Object.keys(this.nsps);for(let e of t)if(this.nsps[e].active)return;this._close()}_packet(e){let t=this.encoder.encode(e);for(let n=0;n<t.length;
16n++)this.engine.write(t[n],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose(`forced close`)}disconnect(){return this._close()}onclose(e,t){var n;this.cleanup(),(n=this.engine)==null||n.close(),this.backoff.reset(),this._readyState=`closed`,this.emitReserved(`close`,e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved(`reconnect_failed`),this._reconnecting=!1;else{let t=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved(`reconnect_attempt`,e.backoff.attempts),!e.skipReconnect&&e.open(t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved(`reconnect_error`,t)):e.onreconnect()}))},t);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved(`reconnect`,e)}},eh={};function th(e,t){typeof e==`object`&&(t=e,e=void 0),t||={};let n=Tm(e,t.path||`/socket.io`),r=n.source,i=n.id,a=n.path,o=eh[i]&&a in eh[i].nsps,s=t.forceNew||t[`force new connection`]||!1===t.multiplex||o,c;return s?c=new $m(r,t):(eh[i]||(eh[i]=new $m(r,t)),c=eh[i]),n.query&&!t.query&&(t.query=n.queryKey),c.socket(n.path,t)}Object.assign(th,{Manager:$m,Socket:Zm,io:th,connect:th});var nh=250;function rh(e,t){let n=e.token??np(),r={app_id:e.appId,token:n};n||(r.anonymous_id=zf());let i=th(e.serverUrl,{path:e.mountPath,transports:e.transports,query:r});return i.on(`connect`,async()=>(console.log(`connect`,i.id),t.connect?.call(t))),i.on(`update_model`,async e=>t.update_model?.call(t,e)),i.on(`error`,async e=>t.error?.call(t,e)),i.on(`connect_error`,async e=>(console.error(`connect_error`,e),t.error?.call(t,e))),i}function ih({config:e}){let t={...e},n={},r={},i={connect:async()=>{let e=[];Object.keys(n).forEach(t=>{let n=f(t);n.length!==0&&(l(t),n.forEach(({connect:t})=>{e.push((async()=>t?.())())}))}),await Promise.all(e)},update_model:async e=>{let t=f(e.room).map(t=>t.update_model?.call(t,e));await Promise.all(t)},error:async e=>{console.error(`error`,e);let t=Object.values(n).flat().map(t=>t.error?.call(t,e));await Promise.all(t)}},a=rh(e,i);function o(){s()}function s(){m(),a&&a.disconnect()}function c(e){o(),t={...t,...e},a=rh(t,i)}function l(e){a.emit(`join`,e)}function u(e){a.emit(`leave`,e)}async function d(e,t){let n=JSON.stringify(t);return i.update_model?.call(i,{room:e,data:n})}function f(e){return n[e]??[]}function p(e){let t=r[e];t&&(clearTimeout(t),delete r[e])}function m(){Object.keys(r).forEach(e=>{clearTimeout(r[e]),delete r[e],(n[e]?.length??0)===0&&delete n[e]})}function h(e){p(e),r[e]=setTimeout(()=>{delete r[e],!((n[e]?.length??0)>0)&&(u(e),delete n[e])},nh)}return{socket:a,subscribeToRoom:(e,t)=>{n[e]?p(e):(l(e),n[e]=[]),n[e].push(t);let r=!1;return()=>{r||(r=!0,n[e]=n[e]?.filter(e=>e!==t)??[],n[e].length===0&&h(e))}},updateConfig:c,updateModel:d,disconnect:s}}(!globalThis.EventTarget||!globalThis.Event)&&console.error(` 17 PartySocket requires a global 'EventTarget' class to be available! 18 You can polyfill this global by adding this to your code before any partysocket imports: 19 20 \`\`\` 21 import 'partysocket/event-target-polyfill'; 22 \`\`\` 23 Please file an issue at https://github.com/partykit/partykit if you're still having trouble. 24`);var ah=class extends Event{message;error;constructor(e,t){super(`error`,t),this.message=e.message,this.error=e}},oh=class extends Event{code;reason;wasClean=!0;constructor(e=1e3,t=``,n){super(`close`,n),this.code=e,this.reason=t}},sh={Event,ErrorEvent:ah,CloseEvent:oh};function ch(e,t){if(!e)throw Error(t)}function lh(e){return new e.constructor(e.type,e)}function uh(e){return`data`in e?new MessageEvent(e.type,e):`code`in e||`reason`in e?new oh(e.code||1999,e.reason||`unknown reason`,e):`error`in e?new ah(e.error,e):new Event(e.type,e)}
24var dh=typeof process<`u`&&process.versions?.node!==void 0&&typeof document>`u`?uh:lh,fh={maxReconnectionDelay:1e4,minReconnectionDelay:1e3+Math.random()*4e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:1/0,maxEnqueuedMessages:1/0,startClosed:!1,debug:!1},ph=!1,mh=class e extends EventTarget{_ws;_retryCount=-1;_uptimeTimeout;_connectTimeout;_shouldReconnect=!0;_connectLock=!1;_binaryType=`blob`;_closeCalled=!1;_messageQueue=[];_url;_protocols;_options;constructor(e,t,n={}){super(),this._url=e,this._protocols=t,this._options=n,this._options.startClosed&&(this._shouldReconnect=!1),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return e.CONNECTING}get OPEN(){return e.OPEN}get CLOSING(){return e.CLOSING}get CLOSED(){return e.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(e){this._binaryType=e,this._ws&&(this._ws.binaryType=e)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((e,t)=>(typeof t==`string`?e+=t.length:t instanceof Blob?e+=t.size:e+=t.byteLength,e),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:``}get protocol(){return this._ws?this._ws.protocol:``}get readyState(){return this._ws?this._ws.readyState:this._options.startClosed?e.CLOSED:e.CONNECTING}get url(){return this._ws?this._ws.url:``}get shouldReconnect(){return this._shouldReconnect}onclose=null;onerror=null;onmessage=null;onopen=null;close(e=1e3,t){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug(`close enqueued: no ws instance`);return}if(this._ws.readyState===this.CLOSED){this._debug(`close: already closed`);return}this._ws.close(e,t)}reconnect(e,t){this._shouldReconnect=!0,this._closeCalled=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED||this._disconnect(e,t),this._connect()}send(e){if(this._ws&&this._ws.readyState===this.OPEN)this._debug(`send`,e),this._ws.send(e);else{let{maxEnqueuedMessages:t=fh.maxEnqueuedMessages}=this._options;this._messageQueue.length<t&&(this._debug(`enqueue`,e),this._messageQueue.push(e))}}_debug(...e){this._options.debug&&console.log.apply(console,[`RWS>`,...e])}_getNextDelay(){let{reconnectionDelayGrowFactor:e=fh.reconnectionDelayGrowFactor,minReconnectionDelay:t=fh.minReconnectionDelay,maxReconnectionDelay:n=fh.maxReconnectionDelay}=this._options,r=0;return this._retryCount>0&&(r=t*e**(this._retryCount-1),r>n&&(r=n)),this._debug(`next delay`,r),r}_wait(){return new Promise(e=>{setTimeout(e,this._getNextDelay())})}_getNextProtocols(e){if(!e)return Promise.resolve(null);if(typeof e==`string`||Array.isArray(e))return Promise.resolve(e);if(typeof e==`function`){let t=e();if(!t)return Promise.resolve(null);if(typeof t==`string`||Array.isArray(t))return Promise.resolve(t);if(t.then)return t}throw Error(`Invalid protocols`)}_getNextUrl(e){if(typeof e==`string`)return Promise.resolve(e);if(typeof e==`function`){let t=e();if(typeof t==`string`)return Promise.resolve(t);if(t.then)return t}throw Error(`Invalid URL`)}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;
24let{maxRetries:e=fh.maxRetries,connectionTimeout:t=fh.connectionTimeout}=this._options;if(this._retryCount>=e){this._debug(`max retries reached`,this._retryCount,`>=`,e);return}this._retryCount++,this._debug(`connect`,this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([e,n])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>`u`&&!ph&&(console.error(`â¼ï¸ No WebSocket implementation available. You should define options.WebSocket. 25 26For example, if you're using node.js, run \`npm install ws\`, and then in your code: 27 28import PartySocket from 'partysocket'; 29import WS from 'ws'; 30 31const partysocket = new PartySocket({ 32 host: "127.0.0.1:1999", 33 room: "test-room", 34 WebSocket: WS 35}); 36 37`),ph=!0);let r=this._options.WebSocket||WebSocket;this._debug(`connect`,{url:e,protocols:n}),this._ws=n?new r(e,n):new r(e),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),t)}).catch(e=>{this._connectLock=!1,this._handleError(new sh.ErrorEvent(Error(e.message),this))})}_handleTimeout(){this._debug(`timeout event`),this._handleError(new sh.ErrorEvent(Error(`TIMEOUT`),this))}_disconnect(e=1e3,t){if(this._clearTimeouts(),this._ws){this._removeListeners();try{this._ws.close(e,t),this._handleClose(new sh.CloseEvent(e,t,this))}catch{}}}_acceptOpen(){this._debug(`accept open`),this._retryCount=0}_handleOpen=e=>{this._debug(`open event`);let{minUptime:t=fh.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),t),ch(this._ws,`WebSocket is not defined`),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(e=>this._ws?.send(e)),this._messageQueue=[],this.onopen&&this.onopen(e),this.dispatchEvent(dh(e))};_handleMessage=e=>{this._debug(`message event`),this.onmessage&&this.onmessage(e),this.dispatchEvent(dh(e))};_handleError=e=>{this._debug(`error event`,e.message),this._disconnect(void 0,e.message===`TIMEOUT`?`timeout`:void 0),this.onerror&&this.onerror(e),this._debug(`exec error listeners`),this.dispatchEvent(dh(e)),this._connect()};_handleClose=e=>{this._debug(`close event`),this._clearTimeouts(),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(e),this.dispatchEvent(dh(e))};_removeListeners(){this._ws&&(this._debug(`removeListeners`),this._ws.removeEventListener(`open`,this._handleOpen),this._ws.removeEventListener(`close`,this._handleClose),this._ws.removeEventListener(`message`,this._handleMessage),this._ws.removeEventListener(`error`,this._handleError))}_addListeners(){this._ws&&(this._debug(`addListeners`),this._ws.addEventListener(`open`,this._handleOpen),this._ws.addEventListener(`close`,this._handleClose),this._ws.addEventListener(`message`,this._handleMessage),this._ws.addEventListener(`error`,this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}},hh=1e3,gh=3e3,_h=new Set([405,409,422,503]),vh=new Set([400,403,404]);function yh(e){let t=e&&typeof e==`object`?e.status:void 0;return typeof t==`number`?t:void 0}function bh(e){return e instanceof Error?e:Error(String(e))}var xh=class{constructor(e,t,n,r,i){this.onClose=i,this.listeners=new Set,this.heartbeat=null,this.closed=!1,this.id=r?.id??crypto.randomUUID();let a=n.transport===`proxy`,o=new mh(async()=>{var r;if(this.closed)throw Error(`Actor connection is closed`);if(!a)try{let{websocket_url:r,token:i}=await n.mintConnectionToken(e,t,this.id);return`${r}${r.includes(`?`)?`&`:`?`}token=${encodeURIComponent(i)}`}catch(e){let t=yh(e);if(!(n.transport!==`direct`&&t!==void 0&&_h.has(t))){t!==void 0&&vh.has(t)&&this.close();try{(r=n.onMintError)==null||r.call(n,bh(e))}catch{}throw e}a=!0}return Ch(n.host,e,t,this.id,n.appId,n.getAuthToken(),n.functionsVersion)});this.ws=o;let s=Date.now(),c=()=>{s=Date.now()};o.addEventListener(`open`,c),o.addEventListener(`message`,e=>{c();let t;try{t=JSON.parse(e.data)}catch{return}if((t&&typeof t==`object`?t.type:void 0)!==`__pong`)for(let e of this.listeners)e(t)}),this.heartbeat=setInterval(()=>{if(Date.now()-s>gh){c(),o.readyState===o.OPEN&&o.reconnect();return}try{o.send(JSON.stringify({type:`__ping`}))}catch{}},hh)}subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}send(e){this.closed||this.ws.send(JSON.stringify(e))}close(){this.closed||(this.closed=!0,this.heartbeat&&=(clearInterval(this.heartbeat),null),this.listeners.clear(),this.ws.close(),this.onClose())}};function Sh(e,t,n,r){let i=null;return{connect(a){if(i)return i;let o=new xh(e,t,n,a,()=>{r.delete(o),i===o&&(i=null)});return i=o,r.add(o),o}}}function Ch(e,t,n,r,i,a,o){let s=e.replace(/^(http|https|ws|wss):\/\//,``);s.endsWith(`/`)&&(s=s.slice(0,-1));let c=s.startsWith(`localhost:`)||s.startsWith(`127.0.0.1:`)||s.startsWith(`192.168.`)||s.startsWith(`10.`)||s.startsWith(`172.`)&&s.split(`.`)[1]>=`16`&&s.split(`.`)[1]<=`31`||s.startsWith(`[::ffff:7f00:1]:`),l=new URLSearchParams([[`_pk`,r],[`app_id`,i],[`handler`,t]]);
37return a&&l.append(`token`,a),o&&l.append(`fv`,o),`${c?`ws`:`wss`}://${s}/parties/${t}/${n}?${l}`}function wh(e,t){return e&&!e.startsWith(`/`)?e:t??e}function Th(e){let t=new Set;return{module:new Proxy({},{get(n,r){if(typeof r==`string`&&r!==`then`)return n=>Sh(r,n,e,t)}}),closeAll:()=>{for(let e of[...t])e.close()}}}function Eh(e){let{serverUrl:t=`https://base44.app`,appId:n,analytics:r,token:i,serviceToken:a,requiresAuth:o=!1,appBaseUrl:s,options:c,functionsVersion:l,headers:u}=e,d=typeof s==`string`?s:``,f={serverUrl:t,mountPath:`/ws-user-apps/socket.io/`,transports:[`websocket`],appId:n,token:i},p=null,m=()=>(p||=ih({config:f}),p),h={...u,"X-App-Id":String(n)},g=l?{...h,"Base44-Functions-Version":l}:h,_=Vf({baseURL:`${t}/api`,headers:h,token:i,onError:c?.onError}),v=Vf({baseURL:`${t}/api`,headers:g,token:i,interceptResponses:!1,onError:c?.onError}),y={...h,...i?{"on-behalf-of":`Bearer ${i}`}:{}},b=Vf({baseURL:`${t}/api`,headers:y,token:a,onError:c?.onError}),x=Vf({baseURL:`${t}/api`,headers:g,token:a,interceptResponses:!1}),S=Vf({baseURL:`${t}/api`,headers:h}),C=Yf(_,v,n,{appBaseUrl:d,serverUrl:t,token:i});if(typeof window<`u`){let e=i||np();e&&C.setToken(e)}let w=Th({appId:n,host:wh(t,typeof window<`u`?window.location?.origin:void 0),functionsVersion:l,getAuthToken:()=>i||np(),mintConnectionToken:async(e,t,r)=>{let a=i||np();return await S.post(`/apps/${n}/actors/${encodeURIComponent(e)}/connection-token`,{room:t,connection_id:r},{headers:{...a?{Authorization:`Bearer ${a}`}:{},...l?{"Base44-Functions-Version":l}:{}}})},transport:c?.actorsTransport,onMintError:c?.onError}),T={entities:Hf({axios:_,appId:n,getSocket:m}),integrations:Kf(_,n),connectors:tp(_,n),auth:C,functions:op(v,n,{getAuthHeaders:()=>{let e={},t=i||np();return t&&(e.Authorization=`Bearer ${t}`),e},baseURL:v.defaults?.baseURL}),agents:sp({axios:_,getSocket:m,appId:n,serverUrl:t,token:i}),aiGateway:cp({serverUrl:t,token:i,appId:n}),appLogs:lp(_,n),app:up(_,n),users:dp(_,n),analytics:Tf({axiosClient:_,serverUrl:t,appId:n,userAuthModule:C,enabled:r?.enabled??!0}),actors:w.module,cleanup:()=>{T.analytics.cleanup(),w.closeAll(),p&&p.disconnect()}},E={entities:Hf({axios:b,appId:n,getSocket:m}),integrations:Kf(b,n),sso:Xf(b,n),connectors:Qf(b,n),functions:op(x,n,{getAuthHeaders:()=>{let e={};return a&&(e.Authorization=`Bearer ${a}`),e},baseURL:x.defaults?.baseURL}),agents:sp({axios:b,getSocket:m,appId:n,serverUrl:t,token:i}),aiGateway:cp({serverUrl:t,token:a,appId:n}),appLogs:lp(b,n),cleanup:()=>{p&&p.disconnect()}};return o&&typeof window<`u`&&setTimeout(async()=>{try{await T.auth.isAuthenticated()||T.auth.redirectToLogin(window.location.href)}catch(e){console.error(`Authentication check failed:`,e),T.auth.redirectToLogin(window.location.href)}},0),{...T,fetchWithAuth:ip({axios:_,serviceRoleAxios:b,appId:String(n),serverUrl:t,functionsVersion:l,platformHeaders:u}),setToken(e){T.auth.setToken(e),p&&p.updateConfig({token:e}),f.token=e},getConfig(){return{serverUrl:t,appId:n,requiresAuth:o}},get asServiceRole(){if(!a)throw Error(`Service token is required to use asServiceRole. Please provide a serviceToken when creating the client.`);return E}}}var Dh={...(!(typeof window>`u`)&&new URLSearchParams(window.location.search).get(`clear_access_token`)===`true`&&(window.localStorage.removeItem(`base44_access_token`),window.localStorage.removeItem(`token`)),{appId:`6aa435a6b8c11be2da44898e`,token:np(),functionsVersion:`prod`,appBaseUrl:void 0})},{appId:Oh,token:kh,functionsVersion:Ah,appBaseUrl:jh}=Dh,X=Eh({appId:Oh,token:kh,functionsVersion:Ah,serverUrl:``,appBaseUrl:jh});function Mh({}){let e=Ms().pathname.substring(1),{data:t,isFetched:n}=Do({queryKey:[`user`],queryFn:async()=>{try{return{user:await X.auth.me(),isAuthenticated:!0}}catch{return{user:null,isAuthenticated:!1}}}});return(0,z.jsx)(`div`,{className:`min-h-screen flex items-center justify-center p-6 bg-slate-50`,children:(0,z.jsx)(`div`,{className:`max-w-md w-full`,children:(0,z.jsxs)(`div`,{className:`text-center space-y-6`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`h1`,{className:`text-7xl font-light text-slate-300`,children:`404`}),(0,z.jsx)(`div`,{className:`h-0.5 w-16 bg-slate-200 mx-auto`})]}),(0,z.jsxs)(`div`,{className:`space-y-3`,children:[(0,z.jsx)(`h2`,{className:`text-2xl font-medium text-slate-800`,children:`Page Not Found`}),(0,z.jsxs)(`p`,{className:`text-slate-600 leading-relaxed`,children:[`The page `,(0,z.jsxs)(`span`,{className:`font-medium text-slate-700`,children:[`"`,e,`"`]}),` could not be found in this application.`]})]}),n&&t.isAuthenticated&&t.user?.role===`admin`&&(0,z.jsx)(`div`,{className:`mt-8 p-4 bg-slate-100 rounded-lg border border-slate-200`,children:(0,z.jsxs)(`div`,{className:`flex items-start space-x-3`,children:[(0,z.jsx)(`div`,{className:`flex-shrink-0 w-5 h-5 rounded-full bg-orange-100 flex items-center justify-center mt-0.5`,children:(0,z.jsx)(`div`,{className:`w-2 h-2 rounded-full bg-orange-400`})}),(0,z.jsxs)(`div`,{className:`text-left space-y-1`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium text-slate-700`,children:`Admin Note`}),(0,z.jsx)(`p`,{className:`text-sm text-slate-600 leading-relaxed`,children:`This could mean that the AI hasn't implemented this page yet. Ask it to implement it in the chat.`})]})]})}),(0,z.jsx)(`div`,{className:`pt-6`,children:(0,z.jsxs)(`button`,{onClick:()=>window.location.href=`/`,className:`inline-flex items-center px-4 py-2 text-sm font-medium text-slate-700 bg-white border border-slate-200 rounded-lg hover:bg-slate-50 hover:border-slate-300 transition-colors duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-slate-500`,children:[(0,z.jsx)(`svg`,{className:`w-4 h-4 mr-2`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,z.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:2,d:`M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6`})}),`Go Home`]})})]})})})}var Nh=(0,b.createContext)(),Ph=({children:e})=>{let[t,n]=(0,b.useState)(null),[r,i]=(0,b.useState)(!1),[a,o]=(0,b.useState)(!0),[s,c]=(0,b.useState)(!0),[l,u]=(0,b.useState)(null),[d,f]=(0,b.useState)(!1),[p,m]=(0,b.useState)(null);(0,b.useEffect)(()=>{h()},[]);let h=async()=>{try{c(!0),u(null);try{let e=await X.app.getPublicSettings();m(e),Dh.token?await g():(o(!1),i(!1),f(!0)),c(!1)}catch(e){if(console.error(`App state check failed:`,e),e.status===403&&e.data?.extra_data?.reason){let t=e.data.extra_data.reason;u(t===`auth_required`?{type:`auth_required`,message:`Authentication required`}:t===`user_not_registered`?{type:`user_not_registered`,message:`User not registered for this app`}:{type:t,message:e.message})}else u({type:`unknown`,message:e.message||`Failed to load app`});c(!1),o(!1)}}catch(e){console.error(`Unexpected error:`,e),u({type:`unknown`,message:e.message||`An unexpected error occurred`}),c(!1),o(!1)}},g=async()=>{try{o(!0);let e=await X.auth.me();n(e),i(!0),o(!1),f(!0)}catch(e){console.error(`User auth check failed:`,e),o(!1),i(!1),f(!0),(e.status===401||e.status===403)&&u({type:`auth_required`,message:`Authentication required`})}};return(0,z.jsx)(Nh.Provider,{value:{user:t,isAuthenticated:r,isLoadingAuth:a,isLoadingPublicSettings:s,authError:l,appPublicSettings:p,authChecked:d,logout:(e=!0)=>{n(null),i(!1),e?X.auth.logout(window.location.href):X.auth.logout()},navigateToLogin:()=>{X.auth.redirectToLogin(window.location.href)},checkUserAuth:g,checkAppState:h},children:e})},Fh=()=>{let e=(0,b.useContext)(Nh);if(!e)throw Error(`useAuth must be used within an AuthProvider`);return e},Ih=()=>(0,z.jsx)(`div`,{className:`flex flex-col items-center justify-center min-h-screen bg-gradient-to-b from-white to-slate-50`,children:(0,z.jsx)(`div`,{className:`max-w-md w-full p-8 bg-white rounded-lg shadow-lg border border-slate-100`,children:(0,z.jsxs)(`div`,{className:`text-center`,children:[(0,z.jsx)(`div`,{className:`inline-flex items-center justify-center w-16 h-16 mb-6 rounded-full bg-orange-100`,children:(0,z.jsx)(`svg`,{className:`w-8 h-8 text-orange-600`,fill:`none`,stroke:`currentColor`,viewBox:`0 0 24 24`,children:(0,z.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`2`,d:`M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z`})})}),(0,z.jsx)(`h1`,{className:`text-3xl font-bold text-slate-900 mb-4`,children:`Access Restricted`}),(0,z.jsx)(`p`,{className:`text-slate-600 mb-8`,children:`You are not registered to use this application. Please contact the app administrator to request access.`}),(0,z.jsxs)(`div`,{className:`p-4 bg-slate-50 rounded-md text-sm text-slate-600`,children:[(0,z.jsx)(`p`,{children:`If you believe this is an error, you can:`}),(0,z.jsxs)(`ul`,{className:`list-disc list-inside mt-2 space-y-1`,children:[(0,z.jsx)(`li`,{children:`Verify you are logged in with the correct account`}),(0,z.jsx)(`li`,{children:`Contact the app administrator for access`}),(0,z.jsx)(`li`,{children:`Try logging out and back in again`})]})]})]})})}),Lh=e=>{let t=e.slice(1);try{return decodeURIComponent(t)}catch{return t}};function Rh(){let{pathname:e,hash:t}=Ms(),n=Ns();return(0,b.useEffect)(()=>
37{if(n!==`POP`){if(t){let e=Lh(t),n=window.setTimeout(()=>{document.getElementById(e)?.scrollIntoView({behavior:`smooth`})},50);return()=>window.clearTimeout(n)}window.scrollTo({top:0,left:0,behavior:`instant`})}},[e,t,n]),null}function zh(){let e=new URLSearchParams(window.location.search).get(`returnTo`);if(!e)return`/`;try{let t=new URL(e,window.location.origin);if(t.origin!==window.location.origin)return`/`;for(let e of[`access_token`,`clear_access_token`,`app_id`,`app_base_url`,`functions_version`,`from_url`])t.searchParams.delete(e);let n=t.pathname+t.search;return!n.startsWith(`/`)||n.startsWith(`//`)||n.includes(`\\`)?`/`:n}catch{return`/`}}var Bh=Symbol.for(`react.lazy`),Vh=b.use;function Hh(e){return typeof e==`object`&&!!e&&`then`in e}function Uh(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===Bh&&`_payload`in e&&Hh(e._payload)}function Wh(e){let t=Kh(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e;Uh(r)&&typeof Vh==`function`&&(r=Vh(r._payload));let a=b.Children.toArray(r),o=a.find(Jh);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,z.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,z.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}var Gh=Wh(`Slot`);function Kh(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(Uh(n)&&typeof Vh==`function`&&(n=Vh(n._payload)),b.isValidElement(n)){let e=Xh(n),i=Yh(r,n.props);return n.type!==b.Fragment&&(i.ref=t?ee(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var qh=Symbol(`radix.slottable`);function Jh(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===qh}function Yh(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function Xh(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Zh=Kt(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0`,{variants:{variant:{default:`bg-primary text-primary-foreground shadow hover:bg-primary/90`,destructive:`bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90`,outline:`border border-input bg-transparent shadow-sm hover:bg-accent hover:text-accent-foreground`,secondary:`bg-secondary text-secondary-foreground shadow-sm hover:bg-secondary/80`,ghost:`hover:bg-accent hover:text-accent-foreground`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-9 px-4 py-2`,sm:`h-8 rounded-md px-3 text-xs`,lg:`h-10 rounded-md px-8`,icon:`h-9 w-9`}},defaultVariants:{variant:`default`,size:`default`}}),Qh=b.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...i},a)=>(0,z.jsx)(r?Gh:`button`,{className:K(Zh({variant:t,size:n,className:e})),ref:a,...i}));Qh.displayName=`Button`;var $h=b.forwardRef(({className:e,type:t,...n},r)=>(0,z.jsx)(`input`,{type:t,className:K(`flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:r,...n}));$h.displayName=`Input`;var eg=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Wh(`Primitive.${t}`),r=b.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,z.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),tg=`Label`,ng=b.forwardRef((e,t)=>
37(0,z.jsx)(eg.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));ng.displayName=tg;var rg=ng,ig=Kt(`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70`),Z=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(rg,{ref:n,className:K(ig(),e),...t}));Z.displayName=rg.displayName;function ag({className:e=`w-5 h-5`}){return(0,z.jsxs)(`svg`,{className:e,viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,z.jsx)(`path`,{d:`M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92a5.06 5.06 0 01-2.2 3.32v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.1z`,fill:`#4285F4`}),(0,z.jsx)(`path`,{d:`M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z`,fill:`#34A853`}),(0,z.jsx)(`path`,{d:`M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z`,fill:`#FBBC05`}),(0,z.jsx)(`path`,{d:`M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z`,fill:`#EA4335`})]})}function og({returnTo:e}){let[t,n]=(0,b.useState)(``),[r,i]=(0,b.useState)(``),[a,o]=(0,b.useState)(``),[s,c]=(0,b.useState)(!1);return(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(Qh,{variant:`outline`,className:`w-full h-12 text-sm font-medium mb-6 border-white/25 text-white hover:bg-white/10`,onClick:()=>X.auth.loginWithProvider(`google`,e),children:[(0,z.jsx)(ag,{className:`w-5 h-5 mr-2`}),`Continue with Google`]}),(0,z.jsxs)(`div`,{className:`relative mb-6`,children:[(0,z.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,z.jsx)(`div`,{className:`w-full border-t border-white/20`})}),(0,z.jsx)(`div`,{className:`relative flex justify-center text-xs uppercase`,children:(0,z.jsx)(`span`,{className:`bg-brand-panel px-3 text-brand-cream/70`,children:`or`})})]}),a&&(0,z.jsx)(`div`,{className:`mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm`,children:a}),(0,z.jsxs)(`form`,{onSubmit:async n=>{n.preventDefault(),o(``),c(!0);try{await X.auth.loginViaEmailPassword(t,r),window.location.href=e}catch(e){o(e.message||`Invalid email or password`)}finally{c(!1)}},className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(Z,{htmlFor:`email`,children:`Email`}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Bn,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-brand-cream/60`,"aria-hidden":`true`}),(0,z.jsx)($h,{id:`email`,type:`email`,autoComplete:`email`,placeholder:`[email protected]`,value:t,onChange:e=>n(e.target.value),className:`pl-10 h-12`,required:!0})]})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,z.jsx)(Z,{htmlFor:`password`,children:`Password`}),(0,z.jsx)(Dc,{to:`/forgot-password`,className:`text-xs text-brand-gold hover:underline`,children:`Forgot password?`})]}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Rn,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-brand-cream/60`,"aria-hidden":`true`}),(0,z.jsx)($h,{id:`password`,type:`password`,autoComplete:`current-password`,placeholder:`â¢â¢â¢â¢â¢â¢â¢â¢`,value:r,onChange:e=>i(e.target.value),className:`pl-10 h-12`,required:!0})]})]}),(0,z.jsx)(Qh,{type:`submit`,className:`w-full h-12 font-medium bg-brand-gold text-brand-primary-deep hover:bg-brand-gold/90`,disabled:s,children:s?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Logging in...`]}):`Log in`})]}),(0,z.jsxs)(`p`,{className:`text-sm text-brand-cream/70 mt-6 text-center`,children:[`Don't have an account?`,` `,(0,z.jsx)(Dc,{to:`/register`+(e===`/`?``:`?returnTo=`+encodeURIComponent(e)),className:`text-brand-gold font-medium hover:underline`,children:`Create one`})]})]})}function sg(){let[e,t]=(0,b.useState)(``),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(!1),u=async t=>{t.preventDefault(),s(``),l(!0);try{await X.auth.loginViaEmailPassword(e,n);try{await X.functions.invoke(`verifyHubAccess`,{code:i}
37)}catch{}window.location.href=`/hub`}catch(e){s(e.message||`Invalid email or password`),l(!1)}},d=`h-12 bg-white/10 border-white/25 text-brand-cream placeholder:text-brand-cream/50 focus-visible:ring-brand-gold`;return(0,z.jsxs)(`div`,{children:[o&&(0,z.jsx)(`div`,{className:`mb-4 p-3 rounded-lg bg-white/15 text-brand-cream text-sm`,children:o}),(0,z.jsxs)(`form`,{onSubmit:u,className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(Z,{htmlFor:`staff-email`,className:`text-brand-cream`,children:`Work email`}),(0,z.jsx)($h,{id:`staff-email`,type:`email`,autoComplete:`email`,placeholder:`[email protected]`,value:e,onChange:e=>t(e.target.value),className:d,required:!0})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(Z,{htmlFor:`staff-password`,className:`text-brand-cream`,children:`Password`}),(0,z.jsx)($h,{id:`staff-password`,type:`password`,autoComplete:`current-password`,placeholder:`â¢â¢â¢â¢â¢â¢â¢â¢`,value:n,onChange:e=>r(e.target.value),className:d,required:!0})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsxs)(Z,{htmlFor:`staff-code`,className:`text-brand-cream`,children:[(0,z.jsx)(Mn,{className:`w-3.5 h-3.5 inline mr-1 -mt-0.5`}),`Diocesan access code`]}),(0,z.jsx)($h,{id:`staff-code`,type:`password`,placeholder:`Issued by the Diocesan Office`,value:i,onChange:e=>a(e.target.value),className:d,required:!0}),(0,z.jsx)(`p`,{className:`text-[11px] text-brand-cream/70`,children:`One-time check on this account â protects confidential Hub records.`})]}),(0,z.jsx)(Qh,{type:`submit`,className:`w-full h-12 font-medium bg-brand-gold text-[#514582] hover:bg-[#f1d186]`,disabled:c,children:c?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Signing in...`]}):`Sign in to the Diocesan Hub`})]}),(0,z.jsx)(`p`,{className:`text-xs text-brand-cream/70 mt-5 text-center`,children:`Staff accounts are set up by the Diocesan Office. If you can't sign in here, use the public sign-in above.`})]})}var cg={"media.base44.com":`/images/public/`,"static.wixstatic.com":`/media/`},lg={OPTIMIZED:`optimized`,ORIGINAL:`original`,FALLBACK:`fallback`},ug=[1,2,3],dg=6e3;function fg(e){let t={},n={};for(let[r,i]of Object.entries(e))r.startsWith(`data-`)?t[r]=i:n[r]=i;return{wrapperProps:t,imageProps:n}}function pg(e,t,n){let r=new Set((e||``).split(/\s+/)),i=new Set(n.split(/\s+/));return t.split(/\s+/).filter(e=>![`inline-block`,`relative`].includes(e)||!i.has(e)||r.has(e)).join(` `)}function mg(e){try{let t=new URL(e);if(t.protocol!==`https:`||t.username||t.password||t.port&&t.port!==`443`)return null;let n=cg[t.hostname];if(!n)return null;let r=t.pathname.match(/^(.*)\/v1\/(?:fill|fit)\/[^/]+\/[^/]+$/i),i=r?r[1]:t.pathname,a=i.split(`/`).pop();return!i.startsWith(n)||!a||!/\.[a-z0-9]+$/i.test(a)||/\.svg$/i.test(a)?null:{baseUrl:`${t.origin}${i}`,filename:a}}catch{return null}}var hg=e=>Math.min(Math.max(Math.round(e),1),dg),gg=e=>Math.min(1,Math.max(0,e));function _g({baseUrl:e,filename:t},{width:n,height:r,crop:i,focalPoint:a,quality:o}){let s=[`w_${hg(n)}`,`h_${hg(r||n)}`];i&&s.push(a?`fp_${gg(a.x).toFixed(2)}_${gg(a.y).toFixed(2)}`:`al_c`),s.push(`q_${o}`,`usm_0.66_1.00_0.01`,`enc_webp`,`quality_auto`);let c=/\.gif$/i.test(t)?t:t.replace(/\.[a-z0-9]+$/i,``)+`.webp`;return`${e}/v1/${i?`fill`:`fit`}/${s.join(`,`)}/${c}`}function vg(e,t){return ug.map(n=>`${_g(e,{...t,width:t.width*n,height:t.height?t.height*n:void 0})} ${n}x`).join(`, `)}function yg(e,t){return t?.baseUrl||e}function bg(e){return e===lg.OPTIMIZED?lg.ORIGINAL:lg.FALLBACK}function xg(e){let[t,n]=b.useState(null);return b.useLayoutEffect(()=>{let t=e.current;if(!t)return;let r=t.getBoundingClientRect();n({width:r.width,height:r.height});let i=new ResizeObserver(([e])=>{let{width:t,height:r}=e.contentRect;n({width:t,height:r})});return i.observe(t),()=>i.disconnect()},[e]),t}function Sg({parsed:e,fittingType:t,focalPoint:n,quality:r,className:i,onLoad:a,onSourceChange:o},s){let c=b.useRef(null),l=b.useRef(null),u=xg(c),[d,f]=b.useState(!1);b.useImperativeHandle(s,()=>l.current),b.useEffect(()=>f(!1),[e.baseUrl]),b.useEffect(()=>
37{let e=c.current,t=t=>o(t.detail.src,pg(i,e.className,K(`inline-block relative`,i)));return e.addEventListener(`base44:image-replace`,t),()=>e.removeEventListener(`base44:image-replace`,t)},[i,o]);let p=t!==`fit`;return{wrapperRef:c,imgRef:l,loaded:d,options:u&&{width:u.width||1024,height:u.height||void 0,crop:p,focalPoint:p?n:void 0,quality:r},handleLoad:e=>{f(!0),a?.(e)}}}var Cg=b.forwardRef(({src:e,parsed:t,fittingType:n,focalPoint:r,quality:i,className:a,style:o,aspectRatio:s,onLoad:c,onSourceChange:l,...u},d)=>{let{wrapperRef:f,imgRef:p,loaded:m,options:h,handleLoad:g}=Sg({parsed:t,fittingType:n,focalPoint:r,quality:i,className:a,onLoad:c,onSourceChange:l},d),{wrapperProps:_,imageProps:v}=fg(u);return(0,z.jsx)(`span`,{ref:f,className:K(`inline-block relative`,a),style:{aspectRatio:s,...o},..._,"data-base44-image":``,"data-base44-image-src":e,children:(0,z.jsxs)(`span`,{"data-source-location":void 0,className:`block relative w-full h-full overflow-hidden`,children:[h&&!m&&(0,z.jsx)(`img`,{"data-source-location":void 0,src:_g(t,{...h,width:20,height:h.height?Math.max(1,Math.round(20*h.height/h.width)):void 0,quality:20}),alt:``,"aria-hidden":`true`,className:`w-full h-full inset-0 absolute`,style:{objectFit:n===`fit`?`contain`:`cover`,filter:`blur(10px)`,transform:`scale(1.1)`}}),h&&(0,z.jsx)(`img`,{"data-source-location":void 0,ref:p,src:_g(t,h),srcSet:vg(t,h),loading:`lazy`,className:K(`w-full h-full inset-0 absolute`,n===`fit`?`object-contain`:`object-cover`),onLoad:g,...v})]})})});Cg.displayName=`ResponsiveImage`;var wg=`https://static.wixstatic.com/media/12d367_4f26ccd17f8f4e3a8958306ea08c2332~mv2.png`,Tg=b.forwardRef(({src:e,fittingType:t=`fill`,originWidth:n,originHeight:r,focalPointX:i,focalPointY:a,quality:o=90,onError:s,...c},l)=>{let[u,d]=b.useState(null),f=u?.source===e?u:null,p=f?f.value:e,m=(t,n)=>d({source:e,value:t,className:n,sourceClassName:c.className});b.useEffect(()=>d(null),[e]);let h=p&&p!==wg?mg(p):null,g=h?lg.OPTIMIZED:lg.ORIGINAL,[_,v]=b.useState({src:p,mode:g}),y=_.src===p?_.mode:g;b.useEffect(()=>{v({src:p,mode:g})},[p,g]);let x=e=>{if(y===lg.FALLBACK)return;let t=bg(y);v({src:p,mode:t}),t===lg.FALLBACK&&s?.(e)},S={...c,className:f&&f.sourceClassName===c.className?f.className:c.className,onError:x};if(!p)return(0,z.jsx)(`img`,{ref:l,src:wg,...S,"data-empty-image":!0});let C=y===lg.OPTIMIZED?h:null;if(!C){let e=y===lg.FALLBACK,t=e?wg:yg(p,h);return(0,z.jsx)(`img`,{ref:l,src:t,...S,"data-error-image":e||void 0})}let w=typeof i==`number`&&typeof a==`number`?{x:i,y:a}:void 0,T=n&&r?`${n} / ${r}`:void 0;return(0,z.jsx)(Cg,{ref:l,src:p,parsed:C,onSourceChange:m,fittingType:t,focalPoint:w,quality:o,aspectRatio:T,...S})});Tg.displayName=`Image`;var Eg=`https://base44.app/api/apps/6aa435a6b8c11be2da44898e/files/mp/public/6aa435a6b8c11be2da44898e/d3adc8585_diocese-crest.jpg`;function Dg({size:e=44}){return(0,z.jsx)(`div`,{className:`relative flex items-center justify-center rounded-full overflow-hidden shadow-sm bg-white ring-1 ring-brand-gold/50 shrink-0`,style:{width:e,height:e},children:(0,z.jsx)(Tg,{src:Eg,alt:`Diocese of Edinburgh crest`,fittingType:`fit`,className:`w-full h-full`})})}function Og({title:e,subtitle:t,footer:n,children:r}){return(0,z.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-brand-primary px-4 pt-16 sm:pt-24`,children:(0,z.jsxs)(`div`,{className:`w-full max-w-md`,children:[(0,z.jsxs)(`div`,{className:`text-center mb-8`,children:[(0,z.jsx)(`div`,{className:`sm:hidden flex justify-center mb-3`,children:(0,z.jsx)(Dg,{size:44})}),(0,z.jsxs)(`div`,{className:`relative inline-block`,children:[(0,z.jsx)(`div`,{className:`hidden sm:block absolute right-full mr-2.5 top-1/2 -translate-y-1/2`,children:(0,z.jsx)(Dg,{size:40})}),(0,z.jsx)(`p`,{className:`font-serif text-4xl text-white leading-tight`,children:`Diocese Connect`}),(0,z.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-brand-gold`,children:`Diocese of Edinburgh`})]})]}),(0,z.jsxs)(`div`,{className:`text-center mb-10`,children:[(0,z.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight text-white`,children:e}),t&&(0,z.jsx)(`p`,{className:`text-brand-gold mt-2`,children:t})]}
37),(0,z.jsx)(`div`,{className:`bg-brand-panel rounded-2xl shadow-sm border border-white/15 p-8 text-brand-cream [&_input]:border-white/25 [&_input]:placeholder:text-white/40`,children:r}),n&&(0,z.jsx)(`p`,{className:`text-center text-sm text-brand-cream/80 mt-6 [&_a]:text-white [&_a]:font-medium [&_a]:hover:underline`,children:n})]})})}function kg(){let e=zh(),[t,n]=(0,b.useState)(!1);return(0,z.jsx)(Og,{title:t?`Diocesan staff sign-in`:`Sign in`,subtitle:t?`Contacts, buildings, finance & committees`:void 0,children:t?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(sg,{}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>n(!1),className:`w-full mt-4 text-xs text-brand-cream/70 hover:text-brand-gold`,children:`Back to public sign-in`})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(og,{returnTo:e}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>n(!0),className:`w-full mt-6 text-xs text-brand-cream/50 hover:text-brand-gold`,children:`Diocesan staff sign-in`})]})})}var Ag=Object.defineProperty,jg=Object.defineProperties,Mg=Object.getOwnPropertyDescriptors,Ng=Object.getOwnPropertySymbols,Pg=Object.prototype.hasOwnProperty,Fg=Object.prototype.propertyIsEnumerable,Ig=(e,t,n)=>t in e?Ag(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Lg=(e,t)=>{for(var n in t||={})Pg.call(t,n)&&Ig(e,n,t[n]);if(Ng)for(var n of Ng(t))Fg.call(t,n)&&Ig(e,n,t[n]);return e},Rg=(e,t)=>jg(e,Mg(t)),zg=(e,t)=>{var n={};for(var r in e)Pg.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&Ng)for(var r of Ng(e))t.indexOf(r)<0&&Fg.call(e,r)&&(n[r]=e[r]);return n};function Bg(e){return[setTimeout(e,0),setTimeout(e,10),setTimeout(e,50)]}function Vg(e){let t=b.useRef();return b.useEffect(()=>{t.current=e}),t.current}var Hg=18,Ug=40,Wg=`${Ug}px`,Gg=[`[data-lastpass-icon-root]`,`com-1password-button`,`[data-dashlanecreated]`,`[style$="2147483647 !important;"]`].join(`,`);function Kg({containerRef:e,inputRef:t,pushPasswordManagerStrategy:n,isFocused:r}){let[i,a]=b.useState(!1),[o,s]=b.useState(!1),[c,l]=b.useState(!1),u=b.useMemo(()=>n!==`none`&&(n===`increase-width`||n===`experimental-no-flickering`)&&i&&o,[i,o,n]),d=b.useCallback(()=>{let r=e.current,i=t.current;if(!r||!i||c||n===`none`)return;let o=r,s=o.getBoundingClientRect().left+o.offsetWidth,u=o.getBoundingClientRect().top+o.offsetHeight/2,d=s-Hg,f=u;document.querySelectorAll(Gg).length===0&&document.elementFromPoint(d,f)===r||(a(!0),l(!0))},[e,t,c,n]);return b.useEffect(()=>{let t=e.current;if(!t||n===`none`)return;function r(){let e=window.innerWidth-t.getBoundingClientRect().right;s(e>=Ug)}r();let i=setInterval(r,1e3);return()=>{clearInterval(i)}},[e,n]),b.useEffect(()=>{let e=r||document.activeElement===t.current;if(n===`none`||!e)return;let i=setTimeout(d,0),a=setTimeout(d,2e3),o=setTimeout(d,5e3),s=setTimeout(()=>{l(!0)},6e3);return()=>{clearTimeout(i),clearTimeout(a),clearTimeout(o),clearTimeout(s)}},[t,r,n,d]),{hasPWMBadge:i,willPushPWMBadge:u,PWM_BADGE_SPACE_WIDTH:Wg}}var qg=b.createContext({}),Jg=b.forwardRef((e,t)=>{var n=e,{value:r,onChange:i,maxLength:a,textAlign:o=`left`,pattern:s,placeholder:c,inputMode:l=`numeric`,onComplete:u,pushPasswordManagerStrategy:d=`increase-width`,pasteTransformer:f,containerClassName:p,noScriptCSSFallback:m=Xg,render:h,children:g}=n,_=zg(n,[`value`,`onChange`,`maxLength`,`textAlign`,`pattern`,`placeholder`,`inputMode`,`onComplete`,`pushPasswordManagerStrategy`,`pasteTransformer`,`containerClassName`,`noScriptCSSFallback`,`render`,`children`]),v;let[y,x]=b.useState(typeof _.defaultValue==`string`?_.defaultValue:``),S=r??y,C=Vg(S),w=b.useCallback(e=>{i?.(e),x(e)},[i]),T=b.useMemo(()=>s?typeof s==`string`?new RegExp(s):s:null,[s]),E=b.useRef(null),D=b.useRef(null),O=b.useRef({value:S,onChange:w,isIOS:typeof window<`u`&&((v=window==null?void 0:window.CSS)?.supports)?.call(v,`-webkit-touch-callout`,`none`)}),k=b.useRef({prev:[E.current?.selectionStart,E.current?.selectionEnd,E.current?.selectionDirection]});b.useImperativeHandle(t,()=>E.current,[]),b.useEffect(()=>{let e=E.current,t=D.current;if(!e||!t)return;O.current.value!==e.value&&O.current.onChange(e.value),k.current.prev=[e.selectionStart,e.selectionEnd,e.selectionDirection];function n(){if(document.activeElement!==e){F(null),ee(null);return}let t=e.selectionStart,n=e.selectionEnd,r=e.selectionDirection,i=e.maxLength,a=e.value,o=k.current.prev,s=-1,c=-1,l;if(a.length!==0&&t!==null&&n!==null){let e=t===n,r=t===a.length&&a.length<i;if(e&&!r){let e=t;if(e===0)s=0,c=1,l=`forward`;else if(e===i)s=e-1,c=e,l=`backward`;else if(i>1&&a.length>1){let t=0;
37if(o[0]!==null&&o[1]!==null){l=e<o[1]?`backward`:`forward`;let n=o[0]===o[1]&&o[0]<i;l===`backward`&&!n&&(t=-1)}s=t+e,c=t+e+1}}s!==-1&&c!==-1&&s!==c&&E.current.setSelectionRange(s,c,l)}let u=s===-1?t:s,d=c===-1?n:c,f=l??r;F(u),ee(d),k.current.prev=[u,d,f]}if(document.addEventListener(`selectionchange`,n,{capture:!0}),n(),document.activeElement===e&&N(!0),!document.getElementById(`input-otp-style`)){let e=document.createElement(`style`);if(e.id=`input-otp-style`,document.head.appendChild(e),e.sheet){let t=`background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;`;Yg(e.sheet,`[data-input-otp]::selection { background: transparent !important; color: transparent !important; }`),Yg(e.sheet,`[data-input-otp]:autofill { ${t} }`),Yg(e.sheet,`[data-input-otp]:-webkit-autofill { ${t} }`),Yg(e.sheet,`@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }`),Yg(e.sheet,`[data-input-otp] + * { pointer-events: all !important; }`)}}let r=()=>{t&&t.style.setProperty(`--root-height`,`${e.clientHeight}px`)};r();let i=new ResizeObserver(r);return i.observe(e),()=>{document.removeEventListener(`selectionchange`,n,{capture:!0}),i.disconnect()}},[]);let[A,j]=b.useState(!1),[M,N]=b.useState(!1),[P,F]=b.useState(null),[I,ee]=b.useState(null);b.useEffect(()=>{Bg(()=>{var e;(e=E.current)==null||e.dispatchEvent(new Event(`input`));let t=E.current?.selectionStart,n=E.current?.selectionEnd,r=E.current?.selectionDirection;t!==null&&n!==null&&(F(t),ee(n),k.current.prev=[t,n,r])})},[S,M]),b.useEffect(()=>{C!==void 0&&S!==C&&C.length<a&&S.length===a&&u?.(S)},[a,u,C,S]);let L=Kg({containerRef:D,inputRef:E,pushPasswordManagerStrategy:d,isFocused:M}),R=b.useCallback(e=>{let t=e.currentTarget.value.slice(0,a);if(t.length>0&&T&&!T.test(t)){e.preventDefault();return}typeof C==`string`&&t.length<C.length&&document.dispatchEvent(new Event(`selectionchange`)),w(t)},[a,w,C,T]),z=b.useCallback(()=>{var e;if(E.current){let t=Math.min(E.current.value.length,a-1),n=E.current.value.length;(e=E.current)==null||e.setSelectionRange(t,n),F(t),ee(n)}N(!0)},[a]),B=b.useCallback(e=>{let t=E.current;if(!f&&(!O.current.isIOS||!e.clipboardData||!t))return;let n=e.clipboardData.getData(`text/plain`),r=f?f(n):n;e.preventDefault();let i=E.current?.selectionStart,o=E.current?.selectionEnd,s=(i===o?S.slice(0,i)+r+S.slice(i):S.slice(0,i)+r+S.slice(o)).slice(0,a);if(s.length>0&&T&&!T.test(s))return;t.value=s,w(s);let c=Math.min(s.length,a-1),l=s.length;t.setSelectionRange(c,l),F(c),ee(l)},[a,w,T,S]),V=b.useMemo(()=>({position:`relative`,cursor:_.disabled?`default`:`text`,userSelect:`none`,WebkitUserSelect:`none`,pointerEvents:`none`}),[_.disabled]),te=b.useMemo(()=>({position:`absolute`,inset:0,width:L.willPushPWMBadge?`calc(100% + ${L.PWM_BADGE_SPACE_WIDTH})`:`100%`,clipPath:L.willPushPWMBadge?`inset(0 ${L.PWM_BADGE_SPACE_WIDTH} 0 0)`:void 0,height:`100%`,display:`flex`,textAlign:o,opacity:`1`,color:`transparent`,pointerEvents:`all`,background:`transparent`,caretColor:`transparent`,border:`0 solid transparent`,outline:`0 solid transparent`,boxShadow:`none`,lineHeight:`1`,letterSpacing:`-.5em`,fontSize:`var(--root-height)`,fontFamily:`monospace`,fontVariantNumeric:`tabular-nums`}),[L.PWM_BADGE_SPACE_WIDTH,L.willPushPWMBadge,o]),ne=b.useMemo(()=>b.createElement(`input`,Rg(Lg({autoComplete:_.autoComplete||`one-time-code`},_),{"data-input-otp":!0,"data-input-otp-placeholder-shown":S.length===0||void 0,"data-input-otp-mss":P,"data-input-otp-mse":I,inputMode:l,pattern:T?.source,"aria-placeholder":c,style:te,maxLength:a,value:S,ref:E,onPaste:e=>{var t;B(e),(t=_.onPaste)==null||t.call(_,e)},onChange:R,onMouseOver:e=>{var t;j(!0),(t=_.onMouseOver)==null||t.call(_,e)},onMouseLeave:e=>{var t;j(!1),(t=_.onMouseLeave)==null||t.call(_,e)},onFocus:e=>{var t;z(),(t=_.onFocus)==null||t.call(_,e)},onBlur:e=>{var t;N(!1),(t=_.onBlur)==null||t.call(_,e)}})),[R,z,B,l,te,a,I,P,_,T?.source,S]),re=b.useMemo(()=>({slots:Array.from({length:a}).map((e,t)=>{let n=M&&P!==null&&I!==null&&(P===I&&t===P||t>=P&&t<I),r=S[t]===void 0?null:S[t];return{char:r,placeholderChar:S[0]===void 0?c?.[t]??null:null,isActive:n,hasFakeCaret:n&&r===null}}),isFocused:M,isHovering:!_.disabled&&A}),[M,A,a,I,P,_.disabled,S]),ie=b.useMemo(()=>h?h(re):b.createElement(qg.Provider,{value:re},g),[g,re,h]);return b.createElement(b.Fragment,null,m!==null&&b.createElement(`noscript`,null,b.createElement(`style`,null,m)),b.createElement(`div`,{ref:D,"data-input-otp-container":!0,style:V,className:p},ie,b.createElement(`div`,{style:{position:`absolute`,inset:0,pointerEvents:`none`}},ne)))});Jg.displayName=`Input`;function Yg(e,t){try{e.insertRule(t)}catch{console.error(`input-otp could not insert CSS rule:`,t)}}var Xg=` 38[data-input-otp] { 39 --nojs-bg: white !important; 40 --nojs-fg: black !important; 41 42 background-color: var(--nojs-bg) !important; 43 color: var(--nojs-fg) !important; 44 caret-color: var(--nojs-fg) !important; 45 letter-spacing: .25em !important; 46 text-align: center !important; 47 border: 1px solid var(--nojs-fg) !important; 48 border-radius: 4px !important; 49 width: 100% !important; 50} 51@media (prefers-color-scheme: dark) { 52 [data-input-otp] { 53 --nojs-bg: black !important; 54 --nojs-fg: white !important; 55 } 56}`,Zg=b.forwardRef(({className:e,containerClassName:t,...n},r)=>(0,z.jsx)(Jg,{ref:r,containerClassName:K(`flex items-center gap-2 has-[:disabled]:opacity-50`,t),className:K(`disabled:cursor-not-allowed`,e),...n}));Zg.displayName=`InputOTP`;var Qg=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(`div`,{ref:n,className:K(`flex items-center`,e),...t}));Qg.displayName=`InputOTPGroup`;var $g=b.forwardRef(({index:e,className:t,...n},r)=>{let{char:i,hasFakeCaret:a,isActive:o}=b.useContext(qg).slots[e];return(0,z.jsxs)(`div`,{ref:r,className:K(`relative flex h-9 w-9 items-center justify-center border-y border-r border-input text-sm shadow-sm transition-all first:rounded-l-md first:border-l last:rounded-r-md`,o&&`z-10 ring-1 ring-ring`,t),...n,children:[i,a&&(0,z.jsx)(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:(0,z.jsx)(`div`,{className:`h-4 w-px animate-caret-blink bg-foreground duration-1000`})})]})});$g.displayName=`InputOTPSlot`;var e_=b.forwardRef(({...e},t)=>(0,z.jsx)(`div`,{ref:t,role:`separator`,...e,children:(0,z.jsx)(Un,{})}));e_.displayName=`InputOTPSeparator`;function t_(){let[e,t]=(0,b.useState)(``),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(!1),[u,d]=(0,b.useState)(!1),[f,p]=(0,b.useState)(``);return u?(0,z.jsxs)(Og,{icon:Bn,title:`Verify your email`,subtitle:`We sent a code to ${e}`,children:[o&&(0,z.jsx)(`div`,{className:`mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm`,children:o}),(0,z.jsx)(`div`,{className:`flex justify-center mb-6`,children:(0,z.jsx)(Zg,{maxLength:6,value:f,onChange:p,autoFocus:!0,autoComplete:`one-time-code`,children:(0,z.jsxs)(Qg,{children:[(0,z.jsx)($g,{index:0}),(0,z.jsx)($g,{index:1}),(0,z.jsx)($g,{index:2}),(0,z.jsx)($g,{index:3}),(0,z.jsx)($g,{index:4}),(0,z.jsx)($g,{index:5})]})})}),(0,z.jsx)(Qh,{className:`w-full h-12 font-medium bg-brand-gold text-brand-primary-deep hover:bg-brand-gold/90`,onClick:async()=>{s(``),l(!0);try{await X.auth.verifyOtp({email:e,otpCode:f}),M({title:`Email verified`,description:`Your account is ready â please sign in.`});let t=zh();window.location.href=t===`/`?`/login`:`/login?returnTo=`+encodeURIComponent(t)}catch(e){s(e.message||`Invalid verification code`)}finally{l(!1)}},disabled:c||f.length<6,children:c?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Verifying...`]}):`Verify`}),(0,z.jsxs)(`p`,{className:`text-center text-sm text-brand-cream/70 mt-4`,children:[`Didn't receive the code?`,` `,(0,z.jsx)(`button`,{onClick:async()=>{s(``);try{await X.auth.resendOtp(e),M({title:`Code sent`,description:`Check your email for the new code.`})}catch(e){s(e.message||`Failed to resend code`)}
56},className:`text-brand-gold font-medium hover:underline`,children:`Resend`})]})]}):(0,z.jsxs)(Og,{icon:or,title:`Create your account`,subtitle:`Sign up to get started`,footer:(0,z.jsxs)(z.Fragment,{children:[`Already have an account?`,` `,(0,z.jsx)(Dc,{to:`/login`+(zh()===`/`?``:`?returnTo=`+encodeURIComponent(zh())),className:`text-primary font-medium hover:underline`,children:`Log in`})]}),children:[(0,z.jsxs)(Qh,{variant:`outline`,className:`w-full h-12 text-sm font-medium mb-6 border-white/25 text-white hover:bg-white/10`,onClick:()=>{X.auth.loginWithProvider(`google`,zh())},children:[(0,z.jsx)(ag,{className:`w-5 h-5 mr-2`}),`Continue with Google`]}),(0,z.jsxs)(`div`,{className:`relative mb-6`,children:[(0,z.jsx)(`div`,{className:`absolute inset-0 flex items-center`,children:(0,z.jsx)(`div`,{className:`w-full border-t border-white/20`})}),(0,z.jsx)(`div`,{className:`relative flex justify-center text-xs uppercase`,children:(0,z.jsx)(`span`,{className:`bg-brand-panel px-3 text-brand-cream/70`,children:`or`})})]}),o&&(0,z.jsx)(`div`,{className:`mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm`,children:o}),(0,z.jsxs)(`form`,{onSubmit:async t=>{if(t.preventDefault(),s(``),n!==i){s(`Passwords do not match`);return}l(!0);try{await X.auth.register({email:e,password:n}),d(!0)}catch(e){s(e.message||`Registration failed`)}finally{l(!1)}},className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(Z,{htmlFor:`email`,children:`Email`}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Bn,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-brand-cream/60`,"aria-hidden":`true`}),(0,z.jsx)($h,{id:`email`,type:`email`,autoComplete:`email`,autoFocus:!0,placeholder:`[email protected]`,value:e,onChange:e=>t(e.target.value),className:`pl-10 h-12`,required:!0})]})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(Z,{htmlFor:`password`,children:`Password`}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Rn,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-brand-cream/60`,"aria-hidden":`true`}),(0,z.jsx)($h,{id:`password`,type:`password`,autoComplete:`new-password`,placeholder:`â¢â¢â¢â¢â¢â¢â¢â¢`,value:n,onChange:e=>r(e.target.value),className:`pl-10 h-12`,required:!0})]})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(Z,{htmlFor:`confirm`,children:`Confirm Password`}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Rn,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-brand-cream/60`,"aria-hidden":`true`}),(0,z.jsx)($h,{id:`confirm`,type:`password`,autoComplete:`new-password`,placeholder:`â¢â¢â¢â¢â¢â¢â¢â¢`,value:i,onChange:e=>a(e.target.value),className:`pl-10 h-12`,required:!0})]})]}),(0,z.jsx)(Qh,{type:`submit`,className:`w-full h-12 font-medium bg-brand-gold text-brand-primary-deep hover:bg-brand-gold/90`,disabled:c,children:c?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Creating account...`]}):`Create account`})]})]})}function n_(){let[e,t]=(0,b.useState)(``),[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(!1);return(0,z.jsx)(Og,{icon:Bn,title:`Reset password`,subtitle:`We'll send you a link to reset it`,footer:(0,z.jsxs)(Dc,{to:`/login`,className:`text-primary font-medium hover:underline`,children:[(0,z.jsx)(Qt,{className:`w-3 h-3 inline mr-1`}),`Back to log in`]}),children:i?(0,z.jsx)(`p`,{className:`text-sm text-brand-cream text-center`,children:`If an account exists with that email, you'll receive a password reset link shortly.`}):(0,z.jsxs)(`form`,{onSubmit:async t=>{t.preventDefault(),r(!0);try{await X.auth.resetPasswordRequest(e)}catch{}finally{r(!1),a(!0)}},className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(Z,{htmlFor:`email`,children:`Email address`}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Bn,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-brand-cream/60`,"aria-hidden":`true`}),(0,z.jsx)($h,{id:`email`,type:`email`,autoComplete:`email`,autoFocus:!0,placeholder:`[email protected]`,value:e,onCh
56ange:e=>t(e.target.value),className:`pl-10 h-12`,required:!0})]})]}),(0,z.jsx)(Qh,{type:`submit`,className:`w-full h-12 font-medium bg-brand-gold text-brand-primary-deep hover:bg-brand-gold/90`,disabled:n,children:n?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Sending...`]}):`Send reset link`})]})})}function r_(){let[e]=Nc(),t=e.get(`token`),[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(!1);return t?(0,z.jsxs)(Og,{icon:Rn,title:`New password`,subtitle:`Enter your new password below`,children:[o&&(0,z.jsx)(`div`,{className:`mb-4 p-3 rounded-lg bg-destructive/10 text-destructive text-sm`,children:o}),(0,z.jsxs)(`form`,{onSubmit:async e=>{if(e.preventDefault(),s(``),n!==i){s(`Passwords do not match`);return}l(!0);try{await X.auth.resetPassword({resetToken:t,newPassword:n}),window.location.href=`/login`}catch(e){s(e.message||`Failed to reset password`)}finally{l(!1)}},className:`space-y-4`,children:[(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(Z,{htmlFor:`password`,children:`New Password`}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Rn,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-brand-cream/60`,"aria-hidden":`true`}),(0,z.jsx)($h,{id:`password`,type:`password`,autoComplete:`new-password`,autoFocus:!0,placeholder:`â¢â¢â¢â¢â¢â¢â¢â¢`,value:n,onChange:e=>r(e.target.value),className:`pl-10 h-12`,required:!0})]})]}),(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(Z,{htmlFor:`confirm`,children:`Confirm Password`}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Rn,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-brand-cream/60`,"aria-hidden":`true`}),(0,z.jsx)($h,{id:`confirm`,type:`password`,autoComplete:`new-password`,placeholder:`â¢â¢â¢â¢â¢â¢â¢â¢`,value:i,onChange:e=>a(e.target.value),className:`pl-10 h-12`,required:!0})]})]}),(0,z.jsx)(Qh,{type:`submit`,className:`w-full h-12 font-medium bg-brand-gold text-brand-primary-deep hover:bg-brand-gold/90`,disabled:c,children:c?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Resetting...`]}):`Reset password`})]})]}):(0,z.jsx)(Og,{icon:rr,title:`Invalid reset link`,subtitle:`This password reset link is missing or invalid`,footer:(0,z.jsx)(Dc,{to:`/forgot-password`,className:`text-primary font-medium hover:underline`,children:`Request a new link`}),children:(0,z.jsx)(`p`,{className:`text-sm text-brand-cream text-center`,children:`The link you used appears to be incomplete. Please request a new password reset email.`})})}var i_=()=>(0,z.jsx)(`div`,{className:`fixed inset-0 flex items-center justify-center`,children:(0,z.jsx)(`div`,{className:`w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin`})});function a_({fallback:e=(0,z.jsx)(i_,{}),unauthenticatedElement:t}){let{isAuthenticated:n,isLoadingAuth:r,authChecked:i,authError:a,checkUserAuth:o}=Fh();return(0,b.useEffect)(()=>{!i&&!r&&o()},[i,r,o]),r||!i?e:a?a.type===`user_not_registered`?(0,z.jsx)(Ih,{}):t:n?(0,z.jsx)(sc,{}):t}var o_=(0,b.createContext)({});function s_(e){let t=(0,b.useRef)(null);return t.current===null&&(t.current=e()),t.current}var c_=(0,b.createContext)(null),l_=(0,b.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:`never`}),u_=class extends b.Component{getSnapshotBeforeUpdate(e){let t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){let e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}};function d_({children:e,isPresent:t}){let n=(0,b.useId)(),r=(0,b.useRef)(null),i=(0,b.useRef)({width:0,height:0,top:0,left:0}),{nonce:a}=(0,b.useContext)(l_);return(0,b.useInsertionEffect)(()=>{let{width:e,height:o,top:s,left:c}=i.current;if(t||!r.current||!e||!o)return;r.current.dataset.motionPopId=n;let l=document.createElement(`style`);return a&&(l.nonce=a),document.head.appendChild(l),l.sheet&&l.sheet.insertRule(` 57 [data-motion-pop-id="${n}"] { 58 position: absolute !important; 59 width: ${e}px !important; 60 height: ${o}px !important; 61 top: ${s}px !important; 62 left: ${c}px !important; 63 } 64 `),()=>{document.head.removeChild(l)}},[t]),(0,z.jsx)(u_,{isPresent:t,childRef:r,sizeRef:i,children:b.cloneElement(e,{ref:r})})}var f_=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:a,mode:o})=>{let s=s_(p_),c=(0,b.useId)(),l=(0,b.useCallback)(e=>{s.set(e,!0);for(let e of s.values())if(!e)return;r&&r()},[s,r]),u=(0,b.useMemo)(()=>({id:c,initial:t,isPresent:n,custom:i,onExitComplete:l,register:e=>(s.set(e,!1),()=>s.delete(e))}),a?[Math.random(),l]:[n,l]);return(0,b.useMemo)(()=>
64{s.forEach((e,t)=>s.set(t,!1))},[n]),b.useEffect(()=>{!n&&!s.size&&r&&r()},[n]),o===`popLayout`&&(e=(0,z.jsx)(d_,{isPresent:n,children:e})),(0,z.jsx)(c_.Provider,{value:u,children:e})};function p_(){return new Map}function m_(e=!0){let t=(0,b.useContext)(c_);if(t===null)return[!0,null];let{isPresent:n,onExitComplete:r,register:i}=t,a=(0,b.useId)();(0,b.useEffect)(()=>{e&&i(a)},[e]);let o=(0,b.useCallback)(()=>e&&r&&r(a),[a,r,e]);return!n&&r?[!1,o]:[!0]}var h_=e=>e.key||``;function g_(e){let t=[];return b.Children.forEach(e,e=>{(0,b.isValidElement)(e)&&t.push(e)}),t}var __=typeof window<`u`,v_=__?b.useLayoutEffect:b.useEffect,y_=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:a=`sync`,propagate:o=!1})=>{let[s,c]=m_(o),l=(0,b.useMemo)(()=>g_(e),[e]),u=o&&!s?[]:l.map(h_),d=(0,b.useRef)(!0),f=(0,b.useRef)(l),p=s_(()=>new Map),[m,h]=(0,b.useState)(l),[g,_]=(0,b.useState)(l);v_(()=>{d.current=!1,f.current=l;for(let e=0;e<g.length;e++){let t=h_(g[e]);u.includes(t)?p.delete(t):p.get(t)!==!0&&p.set(t,!1)}},[g,u.length,u.join(`-`)]);let v=[];if(l!==m){let e=[...l];for(let t=0;t<g.length;t++){let n=g[t],r=h_(n);u.includes(r)||(e.splice(t,0,n),v.push(n))}a===`wait`&&v.length&&(e=v),_(g_(e)),h(l);return}let{forceRender:y}=(0,b.useContext)(o_);return(0,z.jsx)(z.Fragment,{children:g.map(e=>{let m=h_(e),h=o&&!s?!1:l===g||u.includes(m);return(0,z.jsx)(f_,{isPresent:h,initial:!d.current||n?void 0:!1,custom:h?void 0:t,presenceAffectsLayout:i,mode:a,onExitComplete:h?void 0:()=>{if(p.has(m))p.set(m,!0);else return;let e=!0;p.forEach(t=>{t||(e=!1)}),e&&(y?.(),_(f.current),o&&c?.(),r&&r())},children:e},m)})})},b_=e=>e,x_=b_,S_=b_;function C_(e){let t;return()=>(t===void 0&&(t=e()),t)}var w_=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},T_=e=>e*1e3,E_=e=>e/1e3,D_={skipAnimations:!1,useManualTiming:!1};function O_(e){let t=new Set,n=new Set,r=!1,i=!1,a=new WeakSet,o={delta:0,timestamp:0,isProcessing:!1};function s(t){a.has(t)&&(c.schedule(t),e()),t(o)}let c={schedule:(e,i=!1,o=!1)=>{let s=o&&r?t:n;return i&&a.add(e),s.has(e)||s.add(e),e},cancel:e=>{n.delete(e),a.delete(e)},process:e=>{if(o=e,r){i=!0;return}r=!0,[t,n]=[n,t],t.forEach(s),t.clear(),r=!1,i&&(i=!1,c.process(e))}};return c}var k_=[`read`,`resolveKeyframes`,`update`,`preRender`,`render`,`postRender`],A_=40;function j_(e,t){let n=!1,r=!0,i={delta:0,timestamp:0,isProcessing:!1},a=()=>n=!0,o=k_.reduce((e,t)=>(e[t]=O_(a),e),{}),{read:s,resolveKeyframes:c,update:l,preRender:u,render:d,postRender:f}=o,p=()=>{let a=D_.useManualTiming?i.timestamp:performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(a-i.timestamp,A_),1),i.timestamp=a,i.isProcessing=!0,s.process(i),c.process(i),l.process(i),u.process(i),d.process(i),f.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(p))},m=()=>{n=!0,r=!0,i.isProcessing||e(p)};return{schedule:k_.reduce((e,t)=>{let r=o[t];return e[t]=(e,t=!1,i=!1)=>(n||m(),r.schedule(e,t,i)),e},{}),cancel:e=>{for(let t=0;t<k_.length;t++)o[k_[t]].cancel(e)},state:i,steps:o}}var{schedule:M_,cancel:N_,state:P_,steps:F_}=j_(typeof requestAnimationFrame<`u`?requestAnimationFrame:b_,!0),I_=(0,b.createContext)({strict:!1}),L_={animation:[`animate`,`variants`,`whileHover`,`whileTap`,`exit`,`whileInView`,`whileFocus`,`whileDrag`],exit:[`exit`],drag:[`drag`,`dragControls`],focus:[`whileFocus`],hover:[`whileHover`,`onHoverStart`,`onHoverEnd`],tap:[`whileTap`,`onTap`,`onTapStart`,`onTapCancel`],pan:[`onPan`,`onPanStart`,`onPanSessionStart`,`onPanEnd`],inView:[`whileInView`,`onViewportEnter`,`onViewportLeave`],layout:[`layout`,`layoutId`]},R_={};for(let e in L_)R_[e]={isEnabled:t=>L_[e].some(e=>!!t[e])};function z_(e){for(let t in e)R_[t]={...R_[t],...e[t]}}var B_=new Set(`animate.exit.variants.initial.style.values.variants.transition.transformTemplate.custom.inherit.onBeforeLayoutMeasure.onAnimationStart.onAnimationComplete.onUpdate.onDragStart.onDrag.onDragEnd.onMeasureDragConstraints.onDirectionLock.onDragTransitionEnd._dragX._dragY.onHoverStart.onHoverEnd.onViewportEnter.onViewportLeave.globalTapTarget.ignoreStrict.viewport`.split(`.`));function V_(e){return e.startsWith(`while`)||e.startsWith(`drag`)&&e!==`draggable`||e.startsWith(`layout`)||e.startsWith(`onTap`)||e.startsWith(`onPan`)||e.startsWith(`onLayout`)||B_.has(e)}var H_=c({default:()=>U_}),U_,W_=o((()=>{throw U_={},Error(`Could not resolve "@emotion/is-prop-valid" imported by "framer-motion". Is it installed?`)})),G_=e=>!V_(e);function K_(e){e&&(G_=t=>t.startsWith(`on`)?!V_(t):e(t))}try{K_((W_(),d(H_)).default)}catch{}function q_(e,t,n){let r={};for(let i in e)(i!==`values`||typeof e.values!=`object`)&&(G_(i)||n===!0&&V_(i)||!t&&!V_(i)||e.draggable&&i.startsWith(`onDrag`))&&(r[i]=e[i]);return r}function J_(e){if(typeof Proxy>`u`)return e;let t=new Map;return new Proxy((...t)=>e(...t),{get:(n,r)=>r===`create`?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}var Y_=(0,b.createContext)({});function X_(e){return typeof e==`string`||Array.isArray(e)}function Z_(e){return typeof e==`object`&&!!e&&typeof e.start==`function`}var Q_=[`animate`,`whileInView`,`whileFocus`,`whileHover`,`whileTap`,`whileDrag`,`exit`],$_=[`initial`,...Q_];function ev(e){return Z_(e.animate)||$_.some(t=>X_(e[t]))}function tv(e){return!!(ev(e)||e.variants)}function nv(e,t){if(ev(e)){let{initial:t,animate:n}=e;return{initial:t===!1||X_(t)?t:void 0,animate:X_(n)?n:void 0}}return e.inherit===!1?{}:t}function rv(e){let{initial:t,animate:n}=nv(e,(0,b.useContext)(Y_));return(0,b.useMemo)(()=>({initial:t,animate:n}),[iv(t),iv(n)])}function iv(e){return Array.isArray(e)?e.join(` `):e}var av=Symbol.for(`motionComponentSymbol`);function ov(e){return e&&typeof e==`object`&&Object.prototype.hasOwnProperty.call(e,`current`)}function sv(e,t,n){return(0,b.useCallback)(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n==`function`?n(r):ov(n)&&(n.current=r))},[t])}var cv=e=>e.replace(/([a-z])([A-Z])/gu,`$1-$2`).toLowerCase(),lv=`data-`+cv(`framerAppearId`),{schedule:uv,cancel:dv}=j_(queueMicrotask,!1),fv=(0,b.createContext)({});function pv(e,t,n,r,i){let{visualElement:a}=(0,b.useContext)(Y_),o=(0,b.useContext)(I_),s=(0,b.useContext)(c_),c=(0,b.useContext)(l_).reducedMotion,l=(0,b.useRef)(null);r||=o.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:a,props:n,presenceContext:s,blockInitialAnimation:s?s.initial===!1:!1,reducedMotionConfig:c}
64));let u=l.current,d=(0,b.useContext)(fv);u&&!u.projection&&i&&(u.type===`html`||u.type===`svg`)&&mv(l.current,n,i,d);let f=(0,b.useRef)(!1);(0,b.useInsertionEffect)(()=>{u&&f.current&&u.update(n,s)});let p=n[lv],m=(0,b.useRef)(!!p&&!window.MotionHandoffIsComplete?.call(window,p)&&window.MotionHasOptimisedAnimation?.call(window,p));return v_(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),uv.render(u.render),m.current&&u.animationState&&u.animationState.animateChanges())}),(0,b.useEffect)(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&=(queueMicrotask(()=>{var e;(e=window.MotionHandoffMarkAsComplete)==null||e.call(window,p)}),!1))}),u}function mv(e,t,n,r){let{layoutId:i,layout:a,drag:o,dragConstraints:s,layoutScroll:c,layoutRoot:l}=t;e.projection=new n(e.latestValues,t[`data-framer-portal-id`]?void 0:hv(e.parent)),e.projection.setOptions({layoutId:i,layout:a,alwaysMeasureLayout:!!o||s&&ov(s),visualElement:e,animationType:typeof a==`string`?a:`both`,initialPromotionConfig:r,layoutScroll:c,layoutRoot:l})}function hv(e){if(e)return e.options.allowProjection===!1?hv(e.parent):e.projection}function gv({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){e&&z_(e);function a(a,o){let s,c={...(0,b.useContext)(l_),...a,layoutId:_v(a)},{isStatic:l}=c,u=rv(a),d=r(a,l);
64if(!l&&__){vv(c,e);let n=yv(c);s=n.MeasureLayout,u.visualElement=pv(i,d,c,t,n.ProjectionNode)}return(0,z.jsxs)(Y_.Provider,{value:u,children:[s&&u.visualElement?(0,z.jsx)(s,{visualElement:u.visualElement,...c}):null,n(i,a,sv(d,u.visualElement,o),d,l,u.visualElement)]})}a.displayName=`motion.${typeof i==`string`?i:`create(${i.displayName??i.name??``})`}`;let o=(0,b.forwardRef)(a);return o[av]=i,o}function _v({layoutId:e}){let t=(0,b.useContext)(o_).id;return t&&e!==void 0?t+`-`+e:e}function vv(e,t){(0,b.useContext)(I_).strict}function yv(e){let{drag:t,layout:n}=R_;if(!t&&!n)return{};let r={...t,...n};return{MeasureLayout:t?.isEnabled(e)||n?.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}var bv=[`animate`,`circle`,`defs`,`desc`,`ellipse`,`g`,`image`,`line`,`filter`,`marker`,`mask`,`metadata`,`path`,`pattern`,`polygon`,`polyline`,`rect`,`stop`,`switch`,`symbol`,`svg`,`text`,`tspan`,`use`,`view`];function xv(e){return typeof e!=`string`||e.includes(`-`)?!1:!!(bv.indexOf(e)>-1||/[A-Z]/u.test(e))}function Sv(e){let t=[{},{}];return e?.values.forEach((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()}),t}function Cv(e,t,n,r){if(typeof t==`function`){let[i,a]=Sv(r);t=t(n===void 0?e.custom:n,i,a)}if(typeof t==`string`&&(t=e.variants&&e.variants[t]),typeof t==`function`){let[i,a]=Sv(r);t=t(n===void 0?e.custom:n,i,a)}return t}var wv=e=>Array.isArray(e),Tv=e=>!!(e&&typeof e==`object`&&e.mix&&e.toValue),Ev=e=>wv(e)?e[e.length-1]||0:e,Dv=e=>!!(e&&e.getVelocity);function Ov(e){let t=Dv(e)?e.get():e;return Tv(t)?t.toValue():t}function kv({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,a){let o={latestValues:jv(r,i,a,e),renderState:t()};return n&&(o.onMount=e=>n({props:r,current:e,...o}),o.onUpdate=e=>n(e)),o}var Av=e=>(t,n)=>{let r=(0,b.useContext)(Y_),i=(0,b.useContext)(c_),a=()=>kv(e,t,r,i);return n?a():s_(a)};function jv(e,t,n,r){let i={},a=r(e,{});for(let e in a)i[e]=Ov(a[e]);let{initial:o,animate:s}=e,c=ev(e),l=tv(e);t&&l&&!c&&e.inherit!==!1&&(o===void 0&&(o=t.initial),s===void 0&&(s=t.animate));let u=n?n.initial===!1:!1;u||=o===!1;let d=u?s:o;if(d&&typeof d!=`boolean`&&!Z_(d)){let t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){let r=Cv(e,t[n]);if(r){let{transitionEnd:e,transition:t,...n}=r;for(let e in n){let t=n[e];if(Array.isArray(t)){let e=u?t.length-1:0;t=t[e]}t!==null&&(i[e]=t)}for(let t in e)i[t]=e[t]}}}return i}var Mv=[`transformPerspective`,`x`,`y`,`z`,`translateX`,`translateY`,`translateZ`,`scale`,`scaleX`,`scaleY`,`rotate`,`rotateX`,`rotateY`,`rotateZ`,`skew`,`skewX`,`skewY`],Nv=new Set(Mv),Pv=e=>t=>typeof t==`string`&&t.startsWith(e),Fv=Pv(`--`),Iv=Pv(`var(--`),Lv=e=>Iv(e)?Rv.test(e.split(`/*`)[0].trim()):!1,Rv=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,zv=(e,t)=>t&&typeof e==`number`?t.transform(e):e,Bv=(e,t,n)=>n>t?t:n<e?e:n,Vv={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Hv={...Vv,transform:e=>Bv(0,1,e)},Uv={...Vv,default:1},Wv=e=>({test:t=>typeof t==`string`&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Gv=Wv(`deg`),Kv=Wv(`%`),qv=Wv(`px`),Jv=Wv(`vh`),Yv=Wv(`vw`),Xv={...Kv,parse:e=>Kv.parse(e)/100,transform:e=>Kv.transform(e*100)},Zv={borderWidth:qv,borderTopWidth:qv,borderRightWidth:qv,borderBottomWidth:qv,borderLeftWidth:qv,borderRadius:qv,radius:qv,borderTopLeftRadius:qv,borderTopRightRadius:qv,borderBottomRightRadius:qv,borderBottomLeftRadius:qv,width:qv,maxWidth:qv,height:qv,maxHeight:qv,top:qv,right:qv,bottom:qv,left:qv,padding:qv,paddingTop:qv,paddingRight:qv,paddingBottom:qv,paddingLeft:qv,margin:qv,marginTop:qv,marginRight:qv,marginBottom:qv,marginLeft:qv,backgroundPositionX:qv,backgroundPositionY:qv},Qv={rotate:Gv,rotateX:Gv,rotateY:Gv,rotateZ:Gv,scale:Uv,scaleX:Uv,scaleY:Uv,scaleZ:Uv,skew:Gv,skewX:Gv,skewY:Gv,distance:qv,translateX:qv,translateY:qv,translateZ:qv,x:qv,y:qv,z:qv,perspective:qv,transformPerspective:qv,opacity:Hv,originX:Xv,originY:Xv,originZ:qv},$v={...Vv,transform:Math.round},ey={...Zv,...Qv,zIndex:$v,size:qv,fillOpacity:Hv,strokeOpacity:Hv,numOctaves:$v},ty={x:`translateX`,y:`translateY`,z:`translateZ`,transformPerspective:`perspective`},ny=Mv.length;function ry(e,t,n){let r=``,i=!0;for(let a=0;a<ny;a++){let o=Mv[a],s=e[o];if(s===void 0)continue;let c=!0;
64if(c=typeof s==`number`?s===+!!o.startsWith(`scale`):parseFloat(s)===0,!c||n){let e=zv(s,ey[o]);if(!c){i=!1;let t=ty[o]||o;r+=`${t}(${e}) `}n&&(t[o]=e)}}return r=r.trim(),n?r=n(t,i?``:r):i&&(r=`none`),r}function iy(e,t,n){let{style:r,vars:i,transformOrigin:a}=e,o=!1,s=!1;for(let e in t){let n=t[e];if(Nv.has(e)){o=!0;continue}if(Fv(e)){i[e]=n;continue}{let t=zv(n,ey[e]);e.startsWith(`origin`)?(s=!0,a[e]=t):r[e]=t}}if(t.transform||(o||n?r.transform=ry(t,e.transform,n):r.transform&&=`none`),s){let{originX:e=`50%`,originY:t=`50%`,originZ:n=0}=a;r.transformOrigin=`${e} ${t} ${n}`}}var ay={offset:`stroke-dashoffset`,array:`stroke-dasharray`},oy={offset:`strokeDashoffset`,array:`strokeDasharray`};function sy(e,t,n=1,r=0,i=!0){e.pathLength=1;let a=i?ay:oy;e[a.offset]=qv.transform(-r);let o=qv.transform(t),s=qv.transform(n);e[a.array]=`${o} ${s}`}function cy(e,t,n){return typeof e==`string`?e:qv.transform(t+n*e)}function ly(e,t,n){return`${cy(t,e.x,e.width)} ${cy(n,e.y,e.height)}`}function uy(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:o,pathSpacing:s=1,pathOffset:c=0,...l},u,d){if(iy(e,l,d),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:p,dimensions:m}=e;f.transform&&(m&&(p.transform=f.transform),delete f.transform),m&&(i!==void 0||a!==void 0||p.transform)&&(p.transformOrigin=ly(m,i===void 0?.5:i,a===void 0?.5:a)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),r!==void 0&&(f.scale=r),o!==void 0&&sy(f,o,s,c,!1)}var dy=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),fy=()=>({...dy(),attrs:{}}),py=e=>typeof e==`string`&&e.toLowerCase()===`svg`;function my(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(let t in n)e.style.setProperty(t,n[t])}var hy=new Set([`baseFrequency`,`diffuseConstant`,`kernelMatrix`,`kernelUnitLength`,`keySplines`,`keyTimes`,`limitingConeAngle`,`markerHeight`,`markerWidth`,`numOctaves`,`targetX`,`targetY`,`surfaceScale`,`specularConstant`,`specularExponent`,`stdDeviation`,`tableValues`,`viewBox`,`gradientTransform`,`pathLength`,`startOffset`,`textLength`,`lengthAdjust`]);function gy(e,t,n,r){my(e,t,void 0,r);for(let n in t.attrs)e.setAttribute(hy.has(n)?n:cv(n),t.attrs[n])}var _y={};function vy(e){Object.assign(_y,e)}function yy(e,{layout:t,layoutId:n}){return Nv.has(e)||e.startsWith(`origin`)||(t||n!==void 0)&&(!!_y[e]||e===`opacity`)}function by(e,t,n){let{style:r}=e,i={};for(let a in r)(Dv(r[a])||t.style&&Dv(t.style[a])||yy(a,e)||n?.getValue(a)?.liveStyle!==void 0)&&(i[a]=r[a]);return i}function xy(e,t,n){let r=by(e,t,n);for(let n in e)if(Dv(e[n])||Dv(t[n])){let t=Mv.indexOf(n)===-1?n:`attr`+n.charAt(0).toUpperCase()+n.substring(1);r[t]=e[n]}return r}function Sy(e,t){try{t.dimensions=typeof e.getBBox==`function`?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}var Cy=[`x`,`y`,`width`,`height`,`cx`,`cy`,`r`],wy={useVisualState:Av({scrapeMotionValuesFromProps:xy,createRenderState:fy,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let a=!!e.drag;if(!a){for(let e in i)if(Nv.has(e)){a=!0;break}}if(!a)return;let o=!t;if(t)for(let n=0;n<Cy.length;n++){let r=Cy[n];e[r]!==t[r]&&(o=!0)}o&&M_.read(()=>{Sy(n,r),M_.render(()=>{uy(r,i,py(n.tagName),e.transformTemplate),gy(n,r)})})}})},Ty={useVisualState:Av({scrapeMotionValuesFromProps:by,createRenderState:dy})};function Ey(e,t,n){for(let r in t)!Dv(t[r])&&!yy(r,n)&&(e[r]=t[r])}function Dy({transformTemplate:e},t){return(0,b.useMemo)(()=>{let n=dy();return iy(n,t,e),Object.assign({},n.vars,n.style)},[t])}function Oy(e,t){let n=e.style||{},r={};return Ey(r,n,e),Object.assign(r,Dy(e,t)),r}function ky(e,t){let n={},r=Oy(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout=`none`,r.touchAction=e.drag===!0?`none`:`pan-${e.drag===`x`?`y`:`x`}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function Ay(e,t,n,r){let i=(0,b.useMemo)(()=>{let n=fy();return uy(n,t,py(r),e.transformTemplate),{...n.attrs,style:{...n.style}}},[t]);if(e.style){let t={};Ey(t,e.style,e),i.style={...t,...i.style}}return i}function jy(e=!1){return(t,n,r,{latestValues:i},a)=>{let o=(xv(t)?Ay:ky)(n,i,a,t),s=q_(n,typeof t==`string`,e),c=t===b.Fragment?{}:{...s,...o,ref:r},{children:l}=n,u=(0,b.useMemo)(()=>Dv(l)?l.get():l,[l]);return(0,b.createElement)(t,{...c,children:u})}}function My(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return gv({...xv(n)?wy:Ty,preloadedFeatures:e,useRender:jy(r),createVisualElement:t,Component:n})}}function Ny(e,t){if(!Array.isArray(t))return!1;let n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Py(e,t,n){let r=e.getProps();return Cv(r,t,n===void 0?r.custom:n,e)}var Fy=C_(()=>window.ScrollTimeline!==void 0),Iy=class{constructor(e){this.stop=()=>this.runAll(`stop`),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map(e=>`finished`in e?e.finished:e))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){let n=this.animations.map(n=>{if(Fy()&&n.attachTimeline)return n.attachTimeline(e);if(typeof t==`function`)return t(n)});return()=>
64{n.forEach((e,t)=>{e&&e(),this.animations[t].stop()})}}get time(){return this.getAll(`time`)}set time(e){this.setAll(`time`,e)}get speed(){return this.getAll(`speed`)}set speed(e){this.setAll(`speed`,e)}get startTime(){return this.getAll(`startTime`)}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach(t=>t[e]())}flatten(){this.runAll(`flatten`)}play(){this.runAll(`play`)}pause(){this.runAll(`pause`)}cancel(){this.runAll(`cancel`)}complete(){this.runAll(`complete`)}},Ly=class extends Iy{then(e,t){return Promise.all(this.animations).then(e).catch(t)}};function Ry(e,t){return e?e[t]||e.default||e:void 0}var zy=2e4;function By(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}function Vy(e){return typeof e==`function`}function Hy(e,t){e.timeline=t,e.onfinish=null}var Uy=e=>Array.isArray(e)&&typeof e[0]==`number`,Wy={linearEasing:void 0};function Gy(e,t){let n=C_(e);return()=>Wy[t]??n()}var Ky=Gy(()=>{try{document.createElement(`div`).animate({opacity:0}
64,{easing:`linear(0, 1)`})}catch{return!1}return!0},`linearEasing`),qy=(e,t,n=10)=>{let r=``,i=Math.max(Math.round(t/n),2);for(let t=0;t<i;t++)r+=e(w_(0,i-1,t))+`, `;return`linear(${r.substring(0,r.length-2)})`};function Jy(e){return!!(typeof e==`function`&&Ky()||!e||typeof e==`string`&&(e in Xy||Ky())||Uy(e)||Array.isArray(e)&&e.every(Jy))}var Yy=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Xy={linear:`linear`,ease:`ease`,easeIn:`ease-in`,easeOut:`ease-out`,easeInOut:`ease-in-out`,circIn:Yy([0,.65,.55,1]),circOut:Yy([.55,0,1,.45]),backIn:Yy([.31,.01,.66,-.59]),backOut:Yy([.33,1.53,.69,.99])};function Zy(e,t){if(e)return typeof e==`function`&&Ky()?qy(e,t):Uy(e)?Yy(e):Array.isArray(e)?e.map(e=>Zy(e,t)||Xy.easeOut):Xy[e]}var Qy={x:!1,y:!1};function $y(){return Qy.x||Qy.y}function eb(e,t,n){if(e instanceof Element)return[e];if(typeof e==`string`){let r=document;t&&(r=t.current);let i=n?.[e]??r.querySelectorAll(e);return i?Array.from(i):[]}return Array.from(e)}function tb(e,t){let n=eb(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function nb(e){return t=>{t.pointerType===`touch`||$y()||e(t)}}function rb(e,t,n={}){let[r,i,a]=tb(e,n),o=nb(e=>{let{target:n}=e,r=t(e);if(typeof r!=`function`||!n)return;let a=nb(e=>{r(e),n.removeEventListener(`pointerleave`,a)});n.addEventListener(`pointerleave`,a,i)});return r.forEach(e=>{e.addEventListener(`pointerenter`,o,i)}),a}var ib=(e,t)=>t?e===t||ib(e,t.parentElement):!1,ab=e=>e.pointerType===`mouse`?typeof e.button!=`number`||e.button<=0:e.isPrimary!==!1,ob=new Set([`BUTTON`,`INPUT`,`SELECT`,`TEXTAREA`,`A`]);function sb(e){return ob.has(e.tagName)||e.tabIndex!==-1}var cb=new WeakSet;function lb(e){return t=>{t.key===`Enter`&&e(t)}}function ub(e,t){e.dispatchEvent(new PointerEvent(`pointer`+t,{isPrimary:!0,bubbles:!0}))}var db=(e,t)=>{let n=e.currentTarget;if(!n)return;let r=lb(()=>{if(cb.has(n))return;ub(n,`down`);let e=lb(()=>{ub(n,`up`)});n.addEventListener(`keyup`,e,t),n.addEventListener(`blur`,()=>ub(n,`cancel`),t)});n.addEventListener(`keydown`,r,t),n.addEventListener(`blur`,()=>n.removeEventListener(`keydown`,r),t)};function fb(e){return ab(e)&&!$y()}function pb(e,t,n={}){let[r,i,a]=tb(e,n),o=e=>{let r=e.currentTarget;if(!fb(e)||cb.has(r))return;cb.add(r);let a=t(e),o=(e,t)=>{window.removeEventListener(`pointerup`,s),window.removeEventListener(`pointercancel`,c),!(!fb(e)||!cb.has(r))&&(cb.delete(r),typeof a==`function`&&a(e,{success:t}))},s=e=>{o(e,n.useGlobalTarget||ib(r,e.target))},c=e=>{o(e,!1)};window.addEventListener(`pointerup`,s,i),window.addEventListener(`pointercancel`,c,i)};return r.forEach(e=>{!sb(e)&&e.getAttribute(`tabindex`)===null&&(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener(`pointerdown`,o,i),e.addEventListener(`focus`,e=>db(e,i),i)}),a}function mb(e){return e===`x`||e===`y`?Qy[e]?null:(Qy[e]=!0,()=>{Qy[e]=!1}):Qy.x||Qy.y?null:(Qy.x=Qy.y=!0,()=>{Qy.x=Qy.y=!1})}var hb=new Set([`width`,`height`,`top`,`left`,`right`,`bottom`,...Mv]),gb;function _b(){gb=void 0}var vb={now:()=>(gb===void 0&&vb.set(P_.isProcessing||D_.useManualTiming?P_.timestamp:performance.now()),gb),set:e=>{gb=e,queueMicrotask(_b)}};function yb(e,t){e.indexOf(t)===-1&&e.push(t)}function bb(e,t){let n=e.indexOf(t);n>-1&&e.splice(n,1)}var xb=class{constructor(){this.subscriptions=[]}add(e){return yb(this.subscriptions,e),()=>bb(this.subscriptions,e)}notify(e,t,n){let r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){let r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};function Sb(e,t){return t?1e3/t*e:0}var Cb=30,wb=e=>!isNaN(parseFloat(e)),Tb={current:void 0},Eb=class{constructor(e,t={}){this.version=`11.18.2`,this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{let n=vb.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=vb.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=wb(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on(`change`,e)}on(e,t){this.events[e]||(this.events[e]=new xb);let n=this.events[e].add(t);return e===`change`?()=>{n(),M_.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}
64setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Tb.current&&Tb.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=vb.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Cb)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,Cb);return Sb(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function Db(e,t){return new Eb(e,t)}function Ob(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Db(n))}function kb(e,t){let{transitionEnd:n={},transition:r={},...i}=Py(e,t)||{};i={...i,...n};for(let t in i)Ob(e,t,Ev(i[t]))}function Ab(e){return!!(Dv(e)&&e.add)}function jb(e,t){let n=e.getValue(`willChange`);if(Ab(n))return n.add(t)}function Mb(e){return e.props[lv]}var Nb={current:!1},Pb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,Fb=1e-7,Ib=12;function Lb(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=Pb(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>Fb&&++s<Ib);return o}function Rb(e,t,n,r){if(e===t&&n===r)return b_;let i=t=>Lb(t,0,1,e,n);return e=>e===0||e===1?e:Pb(i(e),t,r)}var zb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Bb=e=>t=>1-e(1-t),Vb=Rb(.33,1.53,.69,.99),Hb=Bb(Vb),Ub=zb(Hb),Wb=e=>(e*=2)<1?.5*Hb(e):.5*(2-2**(-10*(e-1))),Gb=e=>1-Math.sin(Math.acos(e)),Kb=Bb(Gb),qb=zb(Gb),Jb=e=>/^0[^.\s]+$/u.test(e);function Yb(e){return typeof e==`number`?e===0:e===null||e===`none`||e===`0`||Jb(e)}var Xb=e=>Math.round(e*1e5)/1e5,Zb=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Qb(e){return e==null}var $b=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ex=(e,t)=>n=>!!(typeof n==`string`&&$b.test(n)&&n.startsWith(e)||t&&!Qb(n)&&Object.prototype.hasOwnProperty.call(n,t)),tx=(e,t,n)=>r=>{if(typeof r!=`string`)return r;let[i,a,o,s]=r.match(Zb);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},nx=e=>Bv(0,255,e),rx={...Vv,transform:e=>Math.round(nx(e))},ix={test:ex(`rgb`,`red`),parse:tx(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+rx.transform(e)+`, `+rx.transform(t)+`, `+rx.transform(n)+`, `+Xb(Hv.transform(r))+`)`};function ax(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var ox={test:ex(`#`),parse:ax,transform:ix.transform},sx={test:ex(`hsl`,`hue`),parse:tx(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Kv.transform(Xb(t))+`, `+Kv.transform(Xb(n))+`, `+Xb(Hv.transform(r))+`)`},cx={test:e=>ix.test(e)||ox.test(e)||sx.test(e),parse:e=>ix.test(e)?ix.parse(e):sx.test(e)?sx.parse(e):ox.parse(e),transform:e=>typeof e==`string`?e:e.hasOwnProperty(`red`)?ix.transform(e):sx.transform(e)},lx=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function ux(e){return isNaN(e)&&typeof e==`string`&&(e.match(Zb)?.length||0)+(e.match(lx)?.length||0)>0}var dx=`number`,fx=`color`,px=`var`,mx=`var(`,hx="${}",gx=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function _x(e){let t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[],a=0;return{values:n,split:t.replace(gx,e=>(cx.test(e)?(r.color.push(a),i.push(fx),n.push(cx.parse(e))):e.startsWith(mx)?(r.var.push(a),i.push(px),n.push(e)):(r.number.push(a),i.push(dx),n.push(parseFloat(e))),++a,hx)).split(hx),indexes:r,types:i}}function vx(e){return _x(e).values}function yx(e){let{split:t,types:n}=_x(e),r=t.length;return e=>{let i=``;for(let a=0;a<r;a++)if(i+=t[a],e[a]!==void 0){let t=n[a];i+=t===dx?Xb(e[a]):t===fx?cx.transform(e[a]):e[a]}return i}}var bx=e=>typeof e==`number`?0:e;function xx(e){let t=vx(e);return yx(e)(t.map(bx))}var Sx={test:ux,parse:vx,createTransformer:yx,getAnimatableNone:xx},Cx=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function wx(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Zb)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Cx.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Tx=/\b([a-z-]*)\(.*?\)/gu,Ex={...Sx,getAnimatableNone:e=>{let t=e.match(Tx);return t?t.map(wx).join(` `):e}},Dx={...ey,color:cx,backgroundColor:cx,outlineColor:cx,fill:cx,stroke:cx,borderColor:cx,borderTopColor:cx,borderRightColor:cx,borderBottomColor:cx,borderLeftColor:cx,filter:Ex,WebkitFilter:Ex},Ox=e=>Dx[e];function kx(e,t){let n=Ox(e);return n!==Ex&&(n=Sx),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Ax=new Set([`auto`,`none`,`0`]);function jx(e,t,n){let r=0,i;for(;r<e.length&&!i;){let t=e[r];typeof t==`string`&&!Ax.has(t)&&_x(t).values.length&&(i=e[r]),r++}if(i&&n)for(let r of t)e[r]=kx(n,i)}var Mx=e=>e===Vv||e===qv,Nx=(e,t)=>parseFloat(e.split(`, `)[t]),Px=(e,t)=>(n,{transform:r})=>{if(r===`none`||!r)return 0;let i=r.match(/^matrix3d\((.+)\)$/u);if(i)return Nx(i[1],t);{let t=r.match(/^matrix\((.+)\)$/u);return t?Nx(t[1],e):0}},Fx=new Set([`x`,`y`,`z`]),Ix=Mv.filter(e=>!Fx.has(e));function Lx(e){let t=[];
64return Ix.forEach(n=>{let r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(+!!n.startsWith(`scale`)))}),t}var Rx={width:({x:e},{paddingLeft:t=`0`,paddingRight:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t=`0`,paddingBottom:n=`0`})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Px(4,13),y:Px(5,14)};Rx.translateX=Rx.x,Rx.translateY=Rx.y;var zx=new Set,Bx=!1,Vx=!1;function Hx(){if(Vx){let e=Array.from(zx).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),n=new Map;t.forEach(e=>{let t=Lx(e);t.length&&(n.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=n.get(e);t&&t.forEach(([t,n])=>{var r;(r=e.getValue(t))==null||r.set(n)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{e.suspendedScrollY!==void 0&&window.scrollTo(0,e.suspendedScrollY)})}Vx=!1,Bx=!1,zx.forEach(e=>e.complete()),zx.clear()}function Ux(){zx.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Vx=!0)})}function Wx(){Ux(),Hx()}var Gx=class{constructor(e,t,n,r,i,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=i,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(zx.add(this),Bx||(Bx=!0,M_.read(Ux),M_.resolveKeyframes(Hx))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let i=0;i<e.length;i++)if(e[i]===null)if(i===0){let i=r?.get(),a=e[e.length-1];if(i!==void 0)e[0]=i;else if(n&&t){let r=n.readValue(t,a);r!=null&&(e[0]=r)}e[0]===void 0&&(e[0]=a),r&&i===void 0&&r.set(e[0])}else e[i]=e[i-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),zx.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,zx.delete(this))}resume(){this.isComplete||this.scheduleResolve()}},Kx=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),qx=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Jx(e){let t=qx.exec(e);if(!t)return[,];let[,n,r,i]=t;return[`--${n??r}`,i]}var Yx=4;function Xx(e,t,n=1){S_(n<=Yx,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);let[r,i]=Jx(e);if(!r)return;let a=window.getComputedStyle(t).getPropertyValue(r);if(a){let e=a.trim();return Kx(e)?parseFloat(e):e}return Lv(i)?Xx(i,t,n+1):i}var Zx=e=>t=>t.test(e),Qx=[Vv,qv,Kv,Gv,Yv,Jv,{test:e=>e===`auto`,parse:e=>e}],$x=e=>Qx.find(Zx(e)),eS=class extends Gx{constructor(e,t,n,r,i){super(e,t,n,r,i,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if(typeof r==`string`&&(r=r.trim(),Lv(r))){let i=Xx(r,t.current);i!==void 0&&(e[n]=i),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!hb.has(n)||e.length!==2)return;let[r,i]=e,a=$x(r),o=$x(i);if(a!==o)if(Mx(a)&&Mx(o))for(let t=0;t<e.length;t++){let n=e[t];typeof n==`string`&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){let{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)Yb(e[t])&&n.push(t);n.length&&jx(e,n,t)}measureInitialState(){let{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;n===`height`&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Rx[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;let r=t[t.length-1];r!==void 0&&e.getValue(n,r).jump(r,!1)}measureEndState(){let{element:e,name:t,unresolvedKeyframes:n}=this;if(!e||!e.current)return;let r=e.getValue(t);r&&r.jump(this.measuredOrigin,!1);let i=n.length-1,a=n[i];n[i]=Rx[t](e.measureViewportBox(),window.getComputedStyle(e.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),this.removedTransforms?.length&&this.removedTransforms.forEac
64h(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}},tS=(e,t)=>t!==`zIndex`&&!!(typeof e==`number`||Array.isArray(e)||typeof e==`string`&&(Sx.test(e)||e===`0`)&&!e.startsWith(`url(`));function nS(e){let t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function rS(e,t,n,r){let i=e[0];if(i===null)return!1;if(t===`display`||t===`visibility`)return!0;let a=e[e.length-1],o=tS(i,t),s=tS(a,t);return x_(o===s,`You are trying to animate ${t} from "${i}" to "${a}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${a} via the \`style\` property.`),!o||!s?!1:nS(e)||(n===`spring`||Vy(n))&&r}var iS=e=>e!==null;function aS(e,{repeat:t,repeatType:n=`loop`},r){let i=e.filter(iS),a=t&&n!==`loop`&&t%2==1?0:i.length-1;return!a||r===void 0?i[a]:r}var oS=40,sS=class{constructor({autoplay:e=!0,delay:t=0,type:n=`keyframes`,repeat:r=0,repeatDelay:i=0,repeatType:a=`loop`,...o}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=vb.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:i,repeatType:a,...o},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>oS?this.resolvedAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&Wx(),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=vb.now(),this.hasAttemptedResolve=!0;let{name:n,type:r,velocity:i,delay:a,onComplete:o,onUpdate:s,isGenerator:c}=this.options;if(!c&&!rS(e,n,r,i))if(Nb.current||!a){s&&s(aS(e,this.options,t)),o&&o(),this.resolveFinishedPromise();return}else this.options.duration=0;let l=this.initPlayback(e,t);l!==!1&&(this._resolved={keyframes:e,finalKeyframe:t,...l},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type=`keyframes`,this.options.ease=`linear`}updateFinishedPromise(){this.currentFinishedPromise=new Promise(e=>{this.resolveFinishedPromise=e})}},cS=(e,t,n)=>e+(t-e)*n;function lS(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function uS({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=lS(s,r,e+1/3),a=lS(s,r,e),o=lS(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}function dS(e,t){return n=>n>0?t:e}var fS=(e,t,n)=>{let r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},pS=[ox,ix,sx],mS=e=>pS.find(t=>t.test(e));function hS(e){let t=mS(e);if(x_(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===sx&&(n=uS(n)),n}var gS=(e,t)=>{let n=hS(e),r=hS(t);if(!n||!r)return dS(e,t);let i={...n};return e=>(i.red=fS(n.red,r.red,e),i.green=fS(n.green,r.green,e),i.blue=fS(n.blue,r.blue,e),i.alpha=cS(n.alpha,r.alpha,e),ix.transform(i))},_S=(e,t)=>n=>t(e(n)),vS=(...e)=>e.reduce(_S),yS=new Set([`none`,`hidden`]);function bS(e,t){return yS.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function xS(e,t){return n=>cS(e,t,n)}function SS(e){return typeof e==`number`?xS:typeof e==`string`?Lv(e)?dS:cx.test(e)?gS:ES:Array.isArray(e)?CS:typeof e==`object`?cx.test(e)?gS:wS:dS}function CS(e,t){let n=[...e],r=n.length,i=e.map((e,n)=>SS(e)(e,t[n]));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}}function wS(e,t){let n={...e,...t},r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=SS(e[i])(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}}function TS(e,t){let n=[],r={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){let a=t.types[i],o=e.indexes[a][r[a]],s=e.values[o]??0;n[i]=s,r[a]++}return n}var ES=(e,t)=>{let n=Sx.createTransformer(t),r=_x(e),i=_x(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?yS.has(e)&&!i.values.length||yS.has(t)&&!r.values.length?bS(e,t):vS(CS(TS(r,i),i.values),n):(x_(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),dS(e,t))};function DS(e,t,n){return typeof e==`number`&&typeof t==`number`&&typeof n==`
64number`?cS(e,t,n):SS(e)(e,t)}var OS=5;function kS(e,t,n){let r=Math.max(t-OS,0);return Sb(n-e(r),t-r)}var AS={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},jS=.001;function MS({duration:e=AS.duration,bounce:t=AS.bounce,velocity:n=AS.velocity,mass:r=AS.mass}){let i,a;x_(e<=T_(AS.maxDuration),`Spring duration must be 10 seconds or less`);let o=1-t;o=Bv(AS.minDamping,AS.maxDamping,o),e=Bv(AS.minDuration,AS.maxDuration,E_(e)),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=FS(t,o),c=Math.exp(-i);return jS-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=FS(t**2,o);return(-i(t)+jS>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=PS(i,a,s);if(e=T_(e),isNaN(c))return{stiffness:AS.stiffness,damping:AS.damping,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var NS=12;function PS(e,t,n){let r=n;for(let n=1;n<NS;n++)r-=e(r)/t(r);return r}function FS(e,t){return e*Math.sqrt(1-t*t)}var IS=[`duration`,`bounce`],LS=[`stiffness`,`damping`,`mass`];function RS(e,t){return t.some(t=>e[t]!==void 0)}function zS(e){let t={velocity:AS.velocity,stiffness:AS.stiffness,damping:AS.damping,mass:AS.mass,isResolvedFromDuration:!1,...e};if(!RS(e,LS)&&RS(e,IS))if(e.visualDuration){let n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,a=2*Bv(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:AS.mass,stiffness:i,damping:a}}else{let n=MS(e);t={...t,...n,mass:AS.mass},t.isResolvedFromDuration=!0}return t}function BS(e=AS.visualDuration,t=AS.bounce){let n=typeof e==`object`?e:{visualDuration:e,keyframes:[0,1],bounce:t},{restSpeed:r,restDelta:i}=n,a=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],s={done:!1,value:a},{stiffness:c,damping:l,mass:u,duration:d,velocity:f,isResolvedFromDuration:p}=zS({...n,velocity:-E_(n.velocity||0)}),m=f||0,h=l/(2*Math.sqrt(c*u)),g=o-a,_=E_(Math.sqrt(c/u)),v=Math.abs(g)<5;r||=v?AS.restSpeed.granular:AS.restSpeed.default,i||=v?AS.restDelta.granular:AS.restDelta.default;let y;if(h<1){let e=FS(_,h);y=t=>{let n=Math.exp(-h*_*t);return o-n*((m+h*_*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(h===1)y=e=>o-Math.exp(-_*e)*(g+(m+_*g)*e);else{let e=_*Math.sqrt(h*h-1);y=t=>{let n=Math.exp(-h*_*t),r=Math.min(e*t,300);return o-n*((m+h*_*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}let b={calculatedDuration:p&&d||null,next:e=>{let t=y(e);if(p)s.done=e>=d;else{let n=0;h<1&&(n=e===0?T_(m):kS(y,e,t));let a=Math.abs(n)<=r,c=Math.abs(o-t)<=i;s.done=a&&c}return s.value=s.done?o:t,s},toString:()=>{let e=Math.min(By(b),zy),t=qy(t=>b.next(e*t).value,e,30);return e+`ms `+t}};return b}function VS({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:o,min:s,max:c,restDelta:l=.5,restSpeed:u}){let d=e[0],f={done:!1,value:d},p=e=>s!==void 0&&e<s||c!==void 0&&e>c,m=e=>s===void 0?c:c===void 0||Math.abs(s-e)<Math.abs(c-e)?s:c,h=n*t,g=d+h,_=o===void 0?g:o(g);_!==g&&(h=_-d);let v=e=>-h*Math.exp(-e/r),y=e=>_+v(e),b=e=>{let t=v(e),n=y(e);f.done=Math.abs(t)<=l,f.value=f.done?_:n},x,S,C=e=>{p(f.value)&&(x=e,S=BS({keyframes:[f.value,m(f.value)],velocity:kS(y,e,f.value),damping:i,stiffness:a,restDelta:l,restSpeed:u}))};return C(0),{calculatedDuration:null,next:e=>{let t=!1;return!S&&x===void 0&&(t=!0,b(e),C(e)),x!==void 0&&e>=x?S.next(e-x):(!t&&b(e),f)}}}var HS=Rb(.42,0,1,1),US=Rb(0,0,.58,1),WS=Rb(.42,0,.58,1),GS=e=>Array.isArray(e)&&typeof e[0]!=`number`,KS={linear:b_,easeIn:HS,easeInOut:WS,easeOut:US,circIn:Gb,circInOut:qb,circOut:Kb,backIn:Hb,backInOut:Ub,backOut:Vb,anticipate:Wb},qS=e=>{if(Uy(e)){S_(e.length===4,`Cubic bezier arrays must contain four numerical values.`);let[t,n,r,i]=e;return Rb(t,n,r,i)}return typeof e==`string`?(S_(KS[e]!==void 0,`Invalid easing type '${e}'`),KS[e]):e};function JS(e,t,n){let r=[],i=n||DS,a=e.length-1;for(let n=0;n<a;n++){let a=i(e[n],e[n+1]);t&&(a=vS(Array.isArray(t)?t[n]||b_:t,a)),r.push(a)}return r}function YS(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;if(S_(a===t.length,`Both input and output ranges must be the same length`),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let o=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=JS(t,r,i),c=s.length,l=n=>{if(o&&n<e[0])return t[0];let r=0;if(c>1)for(;r<e.length-2&&!(n<e[r+1]);r++);let i=w_(e[r],e[r+1],n);return s[r](i)};return n?t=>l(Bv(e[0],e[a-1],t)):l}function XS(e,t){let n=e[e.length-1];for(let r=1;r<=t;r++){let i=w_(0,t,r);e.push(cS(n,1,i))}}function ZS(e){let t=[0];return XS(t,e.length-1),t}function QS(e,t){return e.map(e=>e*t)}function $S(e,t){return e.map(()=>t||WS).splice(0,e.length-1)}function eC({duration:e=300,keyframes:t,times:n,ease:r=`easeInOut`}){let i=GS(r)?r.map(qS):qS(r),a={done:!1,value:t[0]},o=YS(QS(n&&n.length===t.length?n:ZS(t),e),t,{ease:Array.isArray(i)?i:$S(t,i)});return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}var tC=e=>{let t=({timestamp:t})=>e(t);return{start:()=>M_.update(t,!0),stop:()=>N_(t),now:()=>P_.isProcessing?P_.timestamp:vb.now()}},nC={decay:VS,inertia:VS,tween:eC,keyframes:eC,spring:BS},rC=e=>e/100,iC=class extends sS{constructor(e){super(e),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState=`running`,this.startTime=null,this.state=`idle`,this.stop=()=>
64{if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.teardown();let{onStop:e}=this.options;e&&e()};let{name:t,motionValue:n,element:r,keyframes:i}=this.options,a=r?.KeyframeResolver||Gx,o=(e,t)=>this.onKeyframesResolved(e,t);this.resolver=new a(i,o,t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){let{type:t=`keyframes`,repeat:n=0,repeatDelay:r=0,repeatType:i,velocity:a=0}=this.options,o=Vy(t)?t:nC[t]||eC,s,c;o!==eC&&typeof e[0]!=`number`&&(s=vS(rC,DS(e[0],e[1])),e=[0,100]);let l=o({...this.options,keyframes:e});i===`mirror`&&(c=o({...this.options,keyframes:[...e].reverse(),velocity:-a})),l.calculatedDuration===null&&(l.calculatedDuration=By(l));let{calculatedDuration:u}=l,d=u+r,f=d*(n+1)-r;return{generator:l,mirroredGenerator:c,mapPercentToKeyframes:s,calculatedDuration:u,resolvedDuration:d,totalDuration:f}}onPostResolved(){let{autoplay:e=!0}=this.options;this.play(),this.pendingPlayState===`paused`||!e?this.pause():this.state=this.pendingPlayState}tick(e,t=!1){let{resolved:n}=this;if(!n){let{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}let{finalKeyframe:r,generator:i,mirroredGenerator:a,mapPercentToKeyframes:o,keyframes:s,calculatedDuration:c,totalDuration:l,resolvedDuration:u}=n;if(this.startTime===null)return i.next(0);let{delay:d,repeat:f,repeatType:p,repeatDelay:m,onUpdate:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-l/this.speed,this.startTime)),this.currentTime=t?e:this.holdTime===null?Math.round(e-this.startTime)*this.speed:this.holdTime;let g=this.currentTime-d*(this.speed>=0?1:-1),_=this.speed>=0?g<0:g>l;this.currentTime=Math.max(g,0),this.state===`finished`&&this.holdTime===null&&(this.currentTime=l);let v=this.currentTime,y=i;if(f){let e=Math.min(this.currentTime,l)/u,t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),n===1&&t--,t=Math.min(t,f+1),t%2&&(p===`reverse`?(n=1-n,m&&(n-=m/u)):p===`mirror`&&(y=a)),v=Bv(0,1,n)*u}let b=_?{done:!1,value:s[0]}:y.next(v);o&&(b.value=o(b.value));let{done:x}=b;!_&&c!==null&&(x=this.speed>=0?this.currentTime>=l:this.currentTime<=0);let S=this.holdTime===null&&(this.state===`finished`||this.state===`running`&&x);return S&&r!==void 0&&(b.value=aS(s,this.options,r)),h&&h(b.value),S&&this.finish(),b}get duration(){let{resolved:e}=this;return e?E_(e.calculatedDuration):0}get time(){return E_(this.currentTime)}set time(e){e=T_(e),this.currentTime=e,this.holdTime!==null||this.speed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=E_(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState=`running`;return}if(this.isStopped)return;let{driver:e=tC,onPlay:t,startTime:n}=this.options;this.driver||=e(e=>this.tick(e)),t&&t();let r=this.driver.now();this.holdTime===null?this.startTime?this.state===`finished`&&(this.startTime=r):this.startTime=n??this.calcStartTime():this.startTime=r-this.holdTime,this.state===`finished`&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state=`running`,this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState=`paused`;return}this.state=`paused`,this.holdTime=this.currentTime??0}complete(){this.state!==`running`&&this.play(),this.pendingPlayState=this.state=`finished`,this.holdTime=null}finish(){this.teardown(),this.state=`finished`;let{onComplete:e}=this.options;e&&e()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state=`idle`,this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&=(this.driver.stop(),void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}},aC=new Set([`opacity`,`clipPath`,`filter`,`transform`]);function oC(e,t,n,{delay:r=0,duration:i=300,repeat:a=0,repeatType:
64o=`loop`,ease:s=`easeInOut`,times:c}={}){let l={[t]:n};c&&(l.offset=c);let u=Zy(s,i);return Array.isArray(u)&&(l.easing=u),e.animate(l,{delay:r,duration:i,easing:Array.isArray(u)?`linear`:u,fill:`both`,iterations:a+1,direction:o===`reverse`?`alternate`:`normal`})}var sC=C_(()=>Object.hasOwnProperty.call(Element.prototype,`animate`)),cC=10,lC=2e4;function uC(e){return Vy(e.type)||e.type===`spring`||!Jy(e.ease)}function dC(e,t){let n=new iC({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0}),r={done:!1,value:e[0]},i=[],a=0;for(;!r.done&&a<lC;)r=n.sample(a),i.push(r.value),a+=cC;return{times:void 0,keyframes:i,duration:a-cC,ease:`linear`}}var fC={anticipate:Wb,backInOut:Ub,circInOut:qb};function pC(e){return e in fC}var mC=class extends sS{constructor(e){super(e);let{name:t,motionValue:n,element:r,keyframes:i}=this.options;this.resolver=new eS(i,(e,t)=>this.onKeyframesResolved(e,t),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:i,type:a,motionValue:o,name:s,startTime:c}=this.options;if(!o.owner||!o.owner.current)return!1;if(typeof i==`string`&&Ky()&&pC(i)&&(i=fC[i]),uC(this.options)){let{onComplete:t,onUpdate:o,motionValue:s,element:c,...l}=this.options,u=dC(e,l);e=u.keyframes,e.length===1&&(e[1]=e[0]),n=u.duration,r=u.times,i=u.ease,a=`keyframes`}let l=oC(o.owner.current,s,e,{...this.options,duration:n,times:r,ease:i});return l.startTime=c??this.calcStartTime(),this.pendingTimeline?(Hy(l,this.pendingTimeline),this.pendingTimeline=void 0):l.onfinish=()=>{let{onComplete:n}=this.options;o.set(aS(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:l,duration:n,times:r,type:a,ease:i,keyframes:e}}get duration(){let{resolved:e}=this;if(!e)return 0;let{duration:t}=e;return E_(t)}get time(){let{resolved:e}=this;if(!e)return 0;let{animation:t}=e;return E_(t.currentTime||0)}set time(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.currentTime=T_(e)}get speed(){let{resolved:e}=this;if(!e)return 1;let{animation:t}=e;return t.playbackRate}set speed(e){let{resolved:t}=this;if(!t)return;let{animation:n}=t;n.playbackRate=e}get state(){let{resolved:e}=this;if(!e)return`idle`;let{animation:t}=e;return t.playState}get startTime(){let{resolved:e}=this;if(!e)return null;let{animation:t}=e;return t.startTime}attachTimeline(e){if(!this._resolved)this.pendingTimeline=e;else{let{resolved:t}=this;if(!t)return b_;let{animation:n}=t;Hy(n,e)}return b_}play(){if(this.isStopped)return;let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.playState===`finished`&&this.updateFinishedPromise(),t.play()}pause(){let{resolved:e}=this;if(!e)return;let{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state===`idle`)return;this.resolveFinishedPromise(),this.updateFinishedPromise();let{resolved:e}=this;if(!e)return;let{animation:t,keyframes:n,duration:r,type:i,ease:a,times:o}=e;if(t.playState===`idle`||t.playState===`finished`)return;if(this.time){let{motionValue:e,onUpdate:t,onComplete:s,element:c,...l}=this.options,u=new iC({...l,keyframes:n,duration:r,type:i,ease:a,times:o,isGenerator:!0}),d=T_(this.time);e.setWithVelocity(u.sample(d-cC).value,u.sample(d).value,cC)}let{onStop:s}=this.options;s&&s(),this.cancel()}complete(){let{resolved:e}=this;e&&e.animation.finish()}cancel(){let{resolved:e}=this;e&&e.animation.cancel()}static supports(e){let{motionValue:t,name:n,repeatDelay:r,repeatType:i,damping:a,type:o}=e;if(!t||!t.owner||!(t.owner.current instanceof HTMLElement))return!1;let{onUpdate:s,transformTemplate:c}=t.owner.getProps();return sC()&&n&&aC.has(n)&&!s&&!c&&!r&&i!==`mirror`&&a!==0&&o!==`inertia`}},hC={type:`spring`,stiffness:500,damping:25,restSpeed:10},gC=e=>({type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),_C={type:`keyframes`,duration:.8},vC={type:`keyframes`,ease:[.25,.1,.35,1],duration:.3},yC=(e,{keyframes:t})=>t.length>2?_C:Nv.has(e)?e.startsWith(`scale`)?gC(t[1]):hC:vC;function bC({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:o,repeatDelay:s,from:c,elapsed:l,...u}){return!!Object.keys(u).length}var xC=(e,t,n,r={},i,a)=>o=>{let s=Ry(r,e)||{},c=s.delay||r.delay||0,{elapsed:l=0}=r;l-=T_(c);let u={keyframes:Array.isArray(n)?n:[null,n],ease:`easeOut`,velocity:t.getVelocity(),...s,delay:-l,onUpdate:e=>
64{t.set(e),s.onUpdate&&s.onUpdate(e)},onComplete:()=>{o(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:i};bC(s)||(u={...u,...yC(e,u)}),u.duration&&(u.duration=T_(u.duration)),u.repeatDelay&&(u.repeatDelay=T_(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let d=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(d=!0)),(Nb.current||D_.skipAnimations)&&(d=!0,u.duration=0,u.delay=0),d&&!a&&t.get()!==void 0){let e=aS(u.keyframes,s);if(e!==void 0)return M_.update(()=>{u.onUpdate(e),u.onComplete()}),new Ly([])}return!a&&mC.supports(u)?new mC(u):new iC(u)};function SC({protectedKeys:e,needsAnimating:t},n){let r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function CC(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:o,...s}=t;r&&(a=r);let c=[],l=i&&e.animationState&&e.animationState.getState()[i];for(let t in s){let r=e.getValue(t,e.latestValues[t]??null),i=s[t];if(i===void 0||l&&SC(l,t))continue;let o={delay:n,...Ry(a||{},t)},u=!1;if(window.MotionHandoffAnimation){let n=Mb(e);if(n){let e=window.MotionHandoffAnimation(n,t,M_);e!==null&&(o.startTime=e,u=!0)}}jb(e,t),r.start(xC(t,r,i,e.shouldReduceMotion&&hb.has(t)?{type:!1}:o,e,u));let d=r.animation;d&&c.push(d)}return o&&Promise.all(c).then(()=>{M_.update(()=>{o&&kb(e,o)})}),c}function wC(e,t,n={}){let r=Py(e,t,n.type===`exit`?e.presenceContext?.custom:void 0),{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);let a=r?()=>Promise.all(CC(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(r=0)=>{let{delayChildren:a=0,staggerChildren:o,staggerDirection:s}=i;return TC(e,t,a+r,o,s,n)}:()=>Promise.resolve(),{when:s}=i;if(s){let[e,t]=s===`beforeChildren`?[a,o]:[o,a];return e().then(()=>t())}return Promise.all([a(),o(n.delay)])}function TC(e,t,n=0,r=0,i=1,a){let o=[],s=(e.variantChildren.size-1)*r,c=i===1?(e=0)=>e*r:(e=0)=>s-e*r;return Array.from(e.variantChildren).sort(EC).forEach((e,r)=>{e.notify(`AnimationStart`,t),o.push(wC(e,t,{...a,delay:n+c(r)}).then(()=>e.notify(`AnimationComplete`,t)))}),Promise.all(o)}function EC(e,t){return e.sortNodePosition(t)}function DC(e,t,n={}){e.notify(`AnimationStart`,t);let r;if(Array.isArray(t)){let i=t.map(t=>wC(e,t,n));r=Promise.all(i)}else if(typeof t==`string`)r=wC(e,t,n);else{let i=typeof t==`function`?Py(e,t,n.custom):t;r=Promise.all(CC(e,i,n))}return r.then(()=>{e.notify(`AnimationComplete`,t)})}var OC=$_.length;function kC(e){if(!e)return;if(!e.isControllingVariants){let t=e.parent&&kC(e.parent)||{};return e.props.initial!==void 0&&(t.initial=e.props.initial),t}let t={};for(let n=0;n<OC;n++){let r=$_[n],i=e.props[r];(X_(i)||i===!1)&&(t[r]=i)}return t}var AC=[...Q_].reverse(),jC=Q_.length;function MC(e){return t=>Promise.all(t.map(({animation:t,options:n})=>DC(e,t,n)))}function NC(e){let t=MC(e),n=IC(),r=!0,i=t=>(n,r)=>{let i=Py(e,r,t===`exit`?e.presenceContext?.custom:void 0);if(i){let{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function a(n){t=n(e)}function o(a){let{props:o}=e,s=kC(e.parent)||{},c=[],l=new Set,u={},d=1/0;for(let t=0;t<jC;t++){let f=AC[t],p=n[f],m=o[f]===void 0?s[f]:o[f],h=X_(m),g=f===a?p.isActive:null;g===!1&&(d=t);let _=m===s[f]&&m!==o[f]&&h;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),p.protectedKeys={...u},!p.isActive&&g===null||!m&&!p.prevProp||Z_(m)||typeof m==`boolean`)continue;let v=PC(p.prevProp,m),y=v||f===a&&p.isActive&&!_&&h||t>d&&h,b=!1,x=Array.isArray(m)?m:[m],S=x.reduce(i(f),{});g===!1&&(S={});let{prevResolvedValues:C={}}=p,w={...C,...S},T=t=>{y=!0,l.has(t)&&(b=!0,l.delete(t)),p.needsAnimating[t]=!0;let n=e.getValue(t);n&&(n.liveStyle=!1)};for(let e in w){let t=S[e],n=C[e];if(u.hasOwnProperty(e))continue;let r=!1;r=wv(t)&&wv(n)?!Ny(t,n):t!==n,r?t==null?l.add(e):T(e):t!==void 0&&l.has(e)?T(e):p.protectedKeys[e]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(y=!1),y&&(!(_&&v)||b)&&c.push(...x.map(e=>({animation:e,options:{type:f}})))}if(l.size){let t={};l.forEach(n=>{let r=e.getBaseTarget(n),i=e.getValue(n);i&&(i.liveStyle=!0),t[n]=r??null}),c.push({animation:t})}let f=!!c.length;return r&&(o.initial===!1||o.initial===o.animate)&&!e.manuallyAnimateOnMount&&(f=!1),r=!1,f?t(c):Promise.resolve()}function s(t,r){var i;if(n[t].isActive===r)return Promise.resolve();
64(i=e.variantChildren)==null||i.forEach(e=>e.animationState?.setActive(t,r)),n[t].isActive=r;let a=o(t);for(let e in n)n[e].protectedKeys={};return a}return{animateChanges:o,setActive:s,setAnimateFunction:a,getState:()=>n,reset:()=>{n=IC(),r=!0}}}function PC(e,t){return typeof t==`string`?t!==e:Array.isArray(t)?!Ny(t,e):!1}function FC(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function IC(){return{animate:FC(!0),whileInView:FC(),whileHover:FC(),whileTap:FC(),whileDrag:FC(),whileFocus:FC(),exit:FC()}}var LC=class{constructor(e){this.isMounted=!1,this.node=e}update(){}},RC=class extends LC{constructor(e){super(e),e.animationState||=NC(e)}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();Z_(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),(e=this.unmountControls)==null||e.call(this)}},zC=0,BC={animation:{Feature:RC},exit:{Feature:class extends LC{constructor(){super(...arguments),this.id=zC++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;let r=this.node.animationState.setActive(`exit`,!e);t&&!e&&r.then(()=>t(this.id))}mount(){let{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}};function VC(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function HC(e){return{point:{x:e.pageX,y:e.pageY}}}var UC=e=>t=>ab(t)&&e(t,HC(t));function WC(e,t,n,r){return VC(e,t,UC(n),r)}var GC=(e,t)=>Math.abs(e-t);function KC(e,t){let n=GC(e.x,t.x),r=GC(e.y,t.y);return Math.sqrt(n**2+r**2)}var qC=class{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let e=XC(this.lastMoveEventInfo,this.history),t=this.startEvent!==null,n=KC(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;let{point:r}=e,{timestamp:i}=P_;this.history.push({...r,timestamp:i});let{onStart:a,onMove:o}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),o&&o(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=JC(t,this.transformPagePoint),M_.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();let{onEnd:n,onSessionEnd:r,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let a=XC(e.type===`pointercancel`?this.lastMoveEventInfo:JC(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,a),r&&r(e,a)},!ab(e))return;this.dragSnapToOrigin=i,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;let a=JC(HC(e),this.transformPagePoint),{point:o}=a,{timestamp:s}=P_;this.history=[{...o,timestamp:s}];let{onSessionStart:c}=t;c&&c(e,XC(a,this.history)),this.removeListeners=vS(WC(this.contextWindow,`pointermove`,this.handlePointerMove),WC(this.contextWindow,`pointerup`,this.handlePointerUp),WC(this.contextWindow,`pointercancel`,this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),N_(this.updatePoint)}};function JC(e,t){return t?{point:t(e.point)}:e}function YC(e,t){return{x:e.x-t.x,y:e.y-t.y}}function XC({point:e},t){return{point:e,delta:YC(e,QC(t)),offset:YC(e,ZC(t)),velocity:$C(t,.1)}}function ZC(e){return e[0]}function QC(e){return e[e.length-1]}function $C(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null,i=QC(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>T_(t)));)n--;if(!r)return{x:0,y:0};let a=E_(i.timestamp-r.timestamp);if(a===0)return{x:0,y:0};let o={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}var ew=.9999,tw=1.0001,nw=-.01,rw=.01;function iw(e){return e.max-e.min}function aw(e,t,n){return Math.abs(e-t)<=n}function ow(e,t,n,r=.5){e.origin=r,e.originPoint=cS(t.min,t.max,e.origin),e.scale=iw(n)/iw(t),e.translate=cS(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ew&&e.scale<=tw||isNaN(e.scale))&&(e.scale=1),(e.translate>=nw&&e.translate<=rw||isNaN(e.translate))&&(e.translate=0)}function sw(e,t,n,r){ow(e.x,t.x,n.x,r?r.originX:void 0),ow(e.y,t.y,n.y,r?r.originY:void 0)}function cw(e,t,n){e.min=n.min+t.min,e.max=e.min+iw(t)}
64function lw(e,t,n){cw(e.x,t.x,n.x),cw(e.y,t.y,n.y)}function uw(e,t,n){e.min=t.min-n.min,e.max=e.min+iw(t)}function dw(e,t,n){uw(e.x,t.x,n.x),uw(e.y,t.y,n.y)}function fw(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?cS(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?cS(n,e,r.max):Math.min(e,n)),e}function pw(e,t,n){return{min:t===void 0?void 0:e.min+t,max:n===void 0?void 0:e.max+n-(e.max-e.min)}}function mw(e,{top:t,left:n,bottom:r,right:i}){return{x:pw(e.x,n,i),y:pw(e.y,t,r)}}function hw(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function gw(e,t){return{x:hw(e.x,t.x),y:hw(e.y,t.y)}}function _w(e,t){let n=.5,r=iw(e),i=iw(t);return i>r?n=w_(t.min,t.max-r,e.min):r>i&&(n=w_(e.min,e.max-i,t.min)),Bv(0,1,n)}function vw(e,t){let n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}var yw=.35;function bw(e=yw){return e===!1?e=0:e===!0&&(e=yw),{x:xw(e,`left`,`right`),y:xw(e,`top`,`bottom`)}}function xw(e,t,n){return{min:Sw(e,t),max:Sw(e,n)}}function Sw(e,t){return typeof e==`number`?e:e[t]||0}var Cw=()=>({translate:0,scale:1,origin:0,originPoint:0}),ww=()=>({x:Cw(),y:Cw()}),Tw=()=>({min:0,max:0}),Ew=()=>({x:Tw(),y:Tw()});function Dw(e){return[e(`x`),e(`y`)]}function Ow({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function kw({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function Aw(e,t){if(!t)return e;let n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function jw(e){return e===void 0||e===1}function Mw({scale:e,scaleX:t,scaleY:n}){return!jw(e)||!jw(t)||!jw(n)}function Nw(e){return Mw(e)||Pw(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Pw(e){return Fw(e.x)||Fw(e.y)}function Fw(e){return e&&e!==`0%`}function Iw(e,t,n){return n+t*(e-n)}function Lw(e,t,n,r,i){return i!==void 0&&(e=Iw(e,i,r)),Iw(e,n,r)+t}function Rw(e,t=0,n=1,r,i){e.min=Lw(e.min,t,n,r,i),e.max=Lw(e.max,t,n,r,i)}function zw(e,{x:t,y:n}){Rw(e.x,t.translate,t.scale,t.originPoint),Rw(e.y,n.translate,n.scale,n.originPoint)}var Bw=.999999999999,Vw=1.0000000000001;function Hw(e,t,n,r=!1){let i=n.length;if(!i)return;t.x=t.y=1;let a,o;for(let s=0;s<i;s++){a=n[s],o=a.projectionDelta;let{visualElement:i}=a.options;i&&i.props.style&&i.props.style.display===`contents`||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Gw(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),o&&(t.x*=o.x.scale,t.y*=o.y.scale,zw(e,o)),r&&Nw(a.latestValues)&&Gw(e,a.latestValues))}t.x<Vw&&t.x>Bw&&(t.x=1),t.y<Vw&&t.y>Bw&&(t.y=1)}function Uw(e,t){e.min+=t,e.max+=t}function Ww(e,t,n,r,i=.5){Rw(e,t,n,cS(e.min,e.max,i),r)}function Gw(e,t){Ww(e.x,t.x,t.scaleX,t.scale,t.originX),Ww(e.y,t.y,t.scaleY,t.scale,t.originY)}function Kw(e,t){return Ow(Aw(e.getBoundingClientRect(),t))}function qw(e,t,n){let r=Kw(e,n),{scroll:i}=t;return i&&(Uw(r.x,i.offset.x),Uw(r.y,i.offset.y)),r}var Jw=({current:e})=>e?e.ownerDocument.defaultView:null,Yw=new WeakMap,Xw=class{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ew(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let r=e=>{let{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(HC(e).point)},i=(e,t)=>{let{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock=mb(n),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Dw(e=>{let t=this.getAxisMotionValue(e).get()||0;if(Kv.test(t)){let{projection:n}=this.visualElement;if(n&&n.layout){let r=n.layout.layoutBox[e];r&&(t=iw(r)*(parseFloat(t)/100))}}this.originPoint[e]=t}),i&&M_.postRender(()=>i(e,t)),jb(this.visualElement,`transform`);let{animationState:a}=this.visualElement;a&&a.setActive(`whileDrag`,!0)},a=(e,t)=>{let{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openDragLock)return;let{offset:o}=t;if(r&&this.currentDirection===null){this.currentDirection=Qw(o),this.currentDirection!==null&&i&&i(this.currentDirection);return}this.updateAxis(`x`,t.point,o),this.updateAxis(`y`,t.point,o),this.visualElement.render(),a&&a(e,t)},o=(e,t)=>this.stop(e,t),s=()=>Dw(e=>this.getAnimationState(e)===`paused`&&this.getAxisMotionValue(e).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new qC(e,{onSessionStart:r,onStart:i,onMove:a,onSessionEnd:o,resumeAnimation:s},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Jw(this.visualElement)})}stop(e,t){let n=this.isDragging;if(this.cancel(),!n)return;let{velocity:r}=t;this.startAnimation(r);let{onDragEnd:i}=this.getProps();i&&M_.postRender(()=>i(e,t))}cancel(){this.isDragging=!1;let{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;let{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive(`whileDrag`,!1)}updateAxis(e,t,n){let{drag:r}=this.getProps();if(!n||!Zw(e,r,this.currentDirection))return;let i=this.getAxisMotionValue(e),a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=fw(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){let{dragConstraints:e,dragElastic:t}=this.getProps(),n=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,r=this.constraints;e&&ov(e)?this.constraints||=this.resolveRefConstraints():this.constraints=e&&n?mw(n.layoutBox,e):!1,this.elastic=bw(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Dw(e=>{this.constraints!==!1&&this.getAxisMotionValue(e)&&(this.constraints[e]=vw(n.layoutBox[e],this.constraints[e]))})}resolveRefConstraints(){let{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!ov(e))return!1;let n=e.current;S_(n!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");let{projection:r}=this.visualElement;if(!r||!r.layout)return!1;let i=qw(n,r.root,this.visualElement.getTransformPagePoint()),a=gw(r.layout.layoutBox,i);if(t){let e=t(kw(a));this.hasMutatedConstraints=!!e,e&&(a=Ow(e))}return a}startAnimation(e){let{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:o}=this.getProps(),s=this.constraints||{},c=Dw(o=>
64{if(!Zw(o,t,this.currentDirection))return;let c=s&&s[o]||{};a&&(c={min:0,max:0});let l=r?200:1e6,u=r?40:1e7,d={type:`inertia`,velocity:n?e[o]:0,bounceStiffness:l,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...i,...c};return this.startAxisValueAnimation(o,d)});return Promise.all(c).then(o)}startAxisValueAnimation(e,t){let n=this.getAxisMotionValue(e);return jb(this.visualElement,e),n.start(xC(e,n,0,t,this.visualElement,!1))}stopAnimation(){Dw(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){Dw(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){let t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Dw(t=>{let{drag:n}=this.getProps();if(!Zw(t,n,this.currentDirection))return;let{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){let{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-cS(n,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!ov(t)||!n||!this.constraints)return;this.stopAnimation();let r={x:0,y:0};Dw(e=>{let t=this.getAxisMotionValue(e);if(t&&this.constraints!==!1){let n=t.get();r[e]=_w({min:n,max:n},this.constraints[e])}});let{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},``):`none`,n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Dw(t=>{if(!Zw(t,e,null))return;let n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(cS(i,a,r[t]))})}addListeners(){if(!this.visualElement.current)return;Yw.set(this.visualElement,this);let e=this.visualElement.current,t=WC(e,`pointerdown`,e=>{let{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)}),n=()=>{let{dragConstraints:e}=this.getProps();ov(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener(`measure`,n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),M_.read(n);let a=VC(window,`resize`,()=>this.scalePositionWithinConstraints()),o=r.addEventListener(`didUpdate`,(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Dw(t=>{let n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))}),this.visualElement.render())}));return()=>{a(),t(),i(),o&&o()}}getProps(){let e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=yw,dragMomentum:o=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:o}}};function Zw(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function Qw(e,t=10){let n=null;return Math.abs(e.y)>t?n=`y`:Math.abs(e.x)>t&&(n=`x`),n}var $w=class extends LC{constructor(e){super(e),this.removeGroupControls=b_,this.removeListeners=b_,this.controls=new Xw(e)}mount(){let{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||b_}unmount(){this.removeGroupControls(),this.removeListeners()}},eT=e=>(t,n)=>{e&&M_.postRender(()=>e(t,n))},tT=class extends LC{constructor(){super(...arguments),this.removePointerDownListener=b_}onPointerDown(e){this.session=new qC(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Jw(this.node)})}createPanHandlers(){let{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:eT(e),onStart:eT(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&M_.postRender(()=>r(e,t))}}}mount(){this.removePointerDownListener=WC(this.node.current,`pointerdown`,e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}},nT={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rT(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var iT={correct:(e,t)=>
64{if(!t.target)return e;if(typeof e==`string`)if(qv.test(e))e=parseFloat(e);else return e;return`${rT(e,t.target.x)}% ${rT(e,t.target.y)}%`}},aT={correct:(e,{treeScale:t,projectionDelta:n})=>{let r=e,i=Sx.parse(e);if(i.length>5)return r;let a=Sx.createTransformer(e),o=typeof i[0]==`number`?0:1,s=n.x.scale*t.x,c=n.y.scale*t.y;i[0+o]/=s,i[1+o]/=c;let l=cS(s,c,.5);return typeof i[2+o]==`number`&&(i[2+o]/=l),typeof i[3+o]==`number`&&(i[3+o]/=l),a(i)}},oT=class extends b.Component{componentDidMount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;vy(cT),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener(`animationComplete`,()=>{this.safeToRemove()}),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),nT.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){let{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,a=n.projection;return a?(a.isPresent=i,r||e.layoutDependency!==t||t===void 0?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||M_.postRender(()=>{let e=a.getStack();(!e||!e.members.length)&&this.safeToRemove()})),null):null}componentDidUpdate(){let{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),uv.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){let{safeToRemove:e}=this.props;e&&e()}render(){return null}};function sT(e){let[t,n]=m_(),r=(0,b.useContext)(o_);return(0,z.jsx)(oT,{...e,layoutGroup:r,switchLayoutGroup:(0,b.useContext)(fv),isPresent:t,safeToRemove:n})}var cT={borderRadius:{...iT,applyTo:[`borderTopLeftRadius`,`borderTopRightRadius`,`borderBottomLeftRadius`,`borderBottomRightRadius`]},borderTopLeftRadius:iT,borderTopRightRadius:iT,borderBottomLeftRadius:iT,borderBottomRightRadius:iT,boxShadow:aT};function lT(e,t,n){let r=Dv(e)?e:Db(e);return r.start(xC(``,r,t,n)),r.animation}function uT(e){return e instanceof SVGElement&&e.tagName!==`svg`}var dT=(e,t)=>e.depth-t.depth,fT=class{constructor(){this.children=[],this.isDirty=!1}add(e){yb(this.children,e),this.isDirty=!0}remove(e){bb(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(dT),this.isDirty=!1,this.children.forEach(e)}};function pT(e,t){let n=vb.now(),r=({timestamp:i})=>{let a=i-n;a>=t&&(N_(r),e(a-t))};return M_.read(r,!0),()=>N_(r)}var mT=[`TopLeft`,`TopRight`,`BottomLeft`,`BottomRight`],hT=mT.length,gT=e=>typeof e==`string`?parseFloat(e):e,_T=e=>typeof e==`number`||qv.test(e);function vT(e,t,n,r,i,a){i?(e.opacity=cS(0,n.opacity===void 0?1:n.opacity,bT(r)),e.opacityExit=cS(t.opacity===void 0?1:t.opacity,0,xT(r))):a&&(e.opacity=cS(t.opacity===void 0?1:t.opacity,n.opacity===void 0?1:n.opacity,r));for(let i=0;i<hT;i++){let a=`border${mT[i]}Radius`,o=yT(t,a),s=yT(n,a);(o!==void 0||s!==void 0)&&(o||=0,s||=0,o===0||s===0||_T(o)===_T(s)?(e[a]=Math.max(cS(gT(o),gT(s),r),0),(Kv.test(s)||Kv.test(o))&&(e[a]+=`%`)):e[a]=s)}(t.rotate||n.rotate)&&(e.rotate=cS(t.rotate||0,n.rotate||0,r))}function yT(e,t){return e[t]===void 0?e.borderRadius:e[t]}var bT=ST(0,.5,Kb),xT=ST(.5,.95,b_);function ST(e,t,n){return r=>r<e?0:r>t?1:n(w_(e,t,r))}function CT(e,t){e.min=t.min,e.max=t.max}function wT(e,t){CT(e.x,t.x),CT(e.y,t.y)}function TT(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ET(e,t,n,r,i){return e-=t,e=Iw(e,1/n,r),i!==void 0&&(e=Iw(e,1/i,r)),e}function DT(e,t=0,n=1,r=.5,i,a=e,o=e){if(Kv.test(t)&&(t=parseFloat(t),t=cS(o.min,o.max,t/100)-o.min),typeof t!=`number`)return;let s=cS(a.min,a.max,r);e===a&&(s-=t),e.min=ET(e.min,t,n,s,i),e.max=ET(e.max,t,n,s,i)}function OT(e,t,[n,r,i],a,o){DT(e,t[n],t[r],t[i],t.scale,a,o)}var kT=[`x`,`scaleX`,`originX`],AT=[`y`,`scaleY`,`originY`];function jT(e,t,n,r){OT(e.x,t,kT,n?n.x:void 0,r?r.x:void 0),OT(e.y,t,AT,n?n.y:void 0,r?r.y:void 0)}function MT(e){return e.translate===0&&e.scale===1}function NT(e){return MT(e.x)&&MT(e.y)}function PT(e,t){return e.min===t.min&&e.max===t.max}function FT(e,t){return PT(e.x,t.x)&&PT(e.y,t.y)}function IT(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function LT(e,t){return IT(e.x,t.x)&&IT(e.y,t.y)}function RT(e){return iw(e.x)/iw(e.y)}function zT(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var BT=class{constructor(){this.members=[]}add(e){yb(this.members,e),e.scheduleRender()}remove(e){if(bb(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){let e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){let t=this.members.findIndex(t=>e===t);if(t===0)return!1;let n;for(let e=t;e>=0;e--){let t=this.members[e];if(t.isPresent!==!1){n=t;break}}return n?(this.promote(n),!0):!1}promote(e,t){let n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);let{crossfade:r}=e.options;r===!1&&n.hide()}}
64exitAnimationComplete(){this.members.forEach(e=>{let{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}};function VT(e,t,n){let r=``,i=e.x.translate/t.x,a=e.y.translate/t.y,o=n?.z||0;if((i||a||o)&&(r=`translate3d(${i}px, ${a}px, ${o}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){let{transformPerspective:e,rotate:t,rotateX:i,rotateY:a,skewX:o,skewY:s}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),i&&(r+=`rotateX(${i}deg) `),a&&(r+=`rotateY(${a}deg) `),o&&(r+=`skewX(${o}deg) `),s&&(r+=`skewY(${s}deg) `)}let s=e.x.scale*t.x,c=e.y.scale*t.y;return(s!==1||c!==1)&&(r+=`scale(${s}, ${c})`),r||`none`}var HT={type:`projectionFrame`,totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},UT=typeof window<`u`&&window.MotionDebug!==void 0,WT=[``,`X`,`Y`,`Z`],GT={visibility:`hidden`},KT=1e3,qT=0;function JT(e,t,n,r){let{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function YT(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let n=Mb(t);if(window.MotionHasOptimisedAnimation(n,`transform`)){let{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,`transform`,M_,!(t||r))}let{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&YT(r)}function XT({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=t?.()){this.id=qT++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,UT&&(HT.totalNodes=HT.resolvedTargetDeltas=HT.recalculatedProjection=0),this.nodes.forEach($T),this.nodes.forEach(oE),this.nodes.forEach(sE),this.nodes.forEach(eE),UT&&window.MotionDebug.record(HT)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new fT)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new xb),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){let n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=uT(t),this.instance=t;let{layoutId:r,layout:i,visualElement:a}=this.options;if(a&&!a.current&&a.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||r)&&(this.isLayoutDirty=!0),e){let n,r=()=>this.root.updateBlockedByResize=!1;e(t,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=pT(r,250),nT.hasAnimatedSinceResize&&(nT.hasAnimatedSinceResize=!1,this.nodes.forEach(aE))})}r&&this.root.registerSharedNode(r,this),this.options.animate!==!1&&a&&(r||i)&&this.addEventListener(`didUpdate`,({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let i=this.options.transition||a.getDefaultTransition()||mE,{onLayoutAnimationStart:o,onLayoutAnimationComplete:s}=a.getProps(),c=!this.targetLayout||!LT(this.targetLayout,r)||n,l=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||l||t&&(c||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,l);let t={...Ry(i,`layout`),onPlay:o,onComplete:s};(a.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||aE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,N_(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEac
64h(cE),this.animationId++)}getTransformTemplate(){let{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&YT(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){let t=this.path[e];t.shouldResetTransform=!0,t.updateScroll(`snapshot`),t.options.layoutRoot&&t.willUpdate(!1)}let{layoutId:t,layout:n}=this.options;if(t===void 0&&!n)return;let r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,``):void 0,this.updateSnapshot(),e&&this.notifyListeners(`willUpdate`)}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(nE);return}this.isUpdating||this.nodes.forEach(rE),this.isUpdating=!1,this.nodes.forEach(iE),this.nodes.forEach(ZT),this.nodes.forEach(QT),this.clearAllSnapshots();let e=vb.now();P_.delta=Bv(0,1e3/60,e-P_.timestamp),P_.timestamp=e,P_.isProcessing=!0,F_.update.process(P_),F_.preRender.process(P_),F_.render.process(P_),P_.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,uv.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tE),this.sharedNodes.forEach(lE)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M_.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M_.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();let e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ew(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners(`measure`,this.layout.layoutBox);let{visualElement:t}=this.options;t&&t.notify(`LayoutMeasure`,this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e=`measure`){let t=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){let t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!i)return;let e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!NT(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,``):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||Nw(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){let t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),vE(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:e}=this.options;if(!e)return Ew();let t=e.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(bE))){let{scroll:e}=this.root;e&&(Uw(t.x,e.offset.x),Uw(t.y,e.offset.y))}return t}removeElementScroll(e){let t=Ew();if(wT(t,e),this.scroll?.wasRoot)return t;for(let n=0;n<this.path.length;n++){let r=this.path[n],{scroll:i,options:a}=r;r!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&wT(t,e),Uw(t.x,i.offset.x),Uw(t.y,i.offset.y))}return t}applyTransform(e,t=!1){let n=Ew();wT(n,e);for(let e=0;e<this.path.length;e++){let r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Gw(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Nw(r.latestValues)&&Gw(n,r.latestValues)}return Nw(this.latestValues)&&Gw(n,this.latestValues),n}removeTransform(e){let t=Ew();wT(t,e);for(let e=0;e<this.path.length;e++){let n=this.path[e];if(!n.instance||!Nw(n.latestValues))continue;Mw(n.latestValues)&&n.updateSnapshot();let r=Ew();wT(r,n.measurePageBox()),jT(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Nw(this.latestValues)&&jT(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:e.crossfade===void 0||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==P_.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){let t=this.getLead();this.isProjectionDirty||=t.isProjectionDirty,this.isTransformDirty||=t.isTransformDirty,this.isSharedProjectionDirty||=t.isSharedProjectionDirty;let n=!!this.resumingFrom||this!==t;if(!(e||n&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:r,layoutId:i}=this.options;
64if(!(!this.layout||!(r||i))){if(this.resolvedRelativeTargetAt=P_.timestamp,!this.targetDelta&&!this.relativeTarget){let e=this.getClosestProjectingParent();e&&e.layout&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ew(),this.relativeTargetOrigin=Ew(),dw(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),wT(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ew(),this.targetWithTransforms=Ew()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lw(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):wT(this.target,this.layout.layoutBox),zw(this.target,this.targetDelta)):wT(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;let e=this.getClosestProjectingParent();e&&!!e.resumingFrom==!!this.resumingFrom&&!e.options.layoutScroll&&e.target&&this.animationProgress!==1?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ew(),this.relativeTargetOrigin=Ew(),dw(this.relativeTargetOrigin,this.target,e.target),wT(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}UT&&HT.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Mw(this.parent.latestValues)||Pw(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){let e=this.getLead(),t=!!this.resumingFrom||this!==e,n=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(n=!1),t&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(n=!1),this.resolvedRelativeTargetAt===P_.timestamp&&(n=!1),n)return;let{layout:r,layoutId:i}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(r||i))return;wT(this.layoutCorrected,this.layout.layoutBox);let a=this.treeScale.x,o=this.treeScale.y;Hw(this.layoutCorrected,this.treeScale,this.path,t),e.layout&&!e.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(e.target=e.layout.layoutBox,e.targetWithTransforms=Ew());let{target:s}=e;if(!s){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(TT(this.prevProjectionDelta.x,this.projectionDelta.x),TT(this.prevProjectionDelta.y,this.projectionDelta.y)),sw(this.projectionDelta,this.layoutCorrected,s,this.latestValues),(this.treeScale.x!==a||this.treeScale.y!==o||!zT(this.projectionDelta.x,this.prevProjectionDelta.x)||!zT(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners(`projectionUpdate`,s)),UT&&HT.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if((t=this.options.visualElement)==null||t.scheduleRender(),e){let e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ww(),this.projectionDelta=ww(),this.projectionDeltaWithTransform=ww()}setAnimationOrigin(e,t=!1){let n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a=ww();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;let o=Ew(),s=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),c=this.getStack(),l=!c||c.members.length<=1,u=!!(s&&!l&&this.options.crossfade===!0&&!this.path.some(pE));this.animationProgress=0;let d;this.mixTargetDelta=t=>{let n=t/1e3;uE(a.x,e.x,n),uE(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(dw(o,this.layout.layoutBox,this.relativeParent.layout.layoutBox),fE(this.relativeTarget,this.relativeTargetOrigin,o,n),d&&FT(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||=Ew(),wT(d,this.relativeTarget)),s&&(this.animationValues=i,vT(i,r,this.latestValues,n,u,l)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners(`animationStart`),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&=(N_(this.pendingAnimation),void 0),this.pendingAnimation=M_.update(()=>{nT.hasAnimatedSinceResize=!0,this.currentAnimation=lT(0,KT,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners(`animationComplete`)}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(KT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let e=this.getLead(),{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(!(!t||!n||!r)){if(this!==e&&this.layout&&r&&yE(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Ew();let t=iw(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;let r=iw(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}wT(t,n),Gw(t,i),sw(this.projectionDeltaWithTransform,this.layoutCorrected,t,i
64)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new BT),this.sharedNodes.get(e).add(t);let n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){let e=this.getStack();return!e||e.lead===this}getLead(){let{layoutId:e}=this.options;return e&&this.getStack()?.lead||this}getPrevLead(){let{layoutId:e}=this.options;return e?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){let r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){let e=this.getStack();return e?e.relegate(this):!1}resetSkewAndRotation(){let{visualElement:e}=this.options;if(!e)return;let t=!1,{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;let r={};n.z&&JT(`z`,e,r,this.animationValues);for(let t=0;t<WT.length;t++)JT(`rotate${WT[t]}`,e,r,this.animationValues),JT(`skew${WT[t]}`,e,r,this.animationValues);e.render();for(let t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){if(!this.instance||this.isSVG)return;if(!this.isVisible)return GT;let t={visibility:``},n=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,t.opacity=``,t.pointerEvents=Ov(e?.pointerEvents)||``,t.transform=n?n(this.latestValues,``):`none`,t;let r=this.getLead();if(!this.projectionDelta||!this.layout||!r.target){let t={};return this.options.layoutId&&(t.opacity=this.latestValues.opacity===void 0?1:this.latestValues.opacity,t.pointerEvents=Ov(e?.pointerEvents)||``),this.hasProjected&&!Nw(this.latestValues)&&(t.transform=n?n({},``):`none`,this.hasProjected=!1),t}let i=r.animationValues||r.latestValues;this.applyTransformsToTarget(),t.transform=VT(this.projectionDeltaWithTransform,this.treeScale,i),n&&(t.transform=n(i,t.transform));let{x:a,y:o}=this.projectionDelta;t.transformOrigin=`${a.origin*100}% ${o.origin*100}% 0`,t.opacity=r.animationValues?r===this?i.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:i.opacityExit:r===this?i.opacity===void 0?``:i.opacity:i.opacityExit===void 0?0:i.opacityExit;for(let e in _y){if(i[e]===void 0)continue;let{correct:n,applyTo:a}=_y[e],o=t.transform===`none`?i[e]:n(i[e],r);if(a){let e=a.length;for(let n=0;n<e;n++)t[a[n]]=o}else t[e]=o}return this.options.layoutId&&(t.pointerEvents=r===this?Ov(e?.pointerEvents)||``:`none`),t}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(e=>e.currentAnimation?.stop()),this.root.nodes.forEach(nE),this.root.sharedNodes.clear()}}}function ZT(e){e.updateLayout()}function QT(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners(`didUpdate`)){let{layoutBox:n,measuredBox:r}=e.layout,{animationType:i}=e.options,a=t.source!==e.layout.source;i===`size`?Dw(e=>{let r=a?t.measuredBox[e]:t.layoutBox[e],i=iw(r);r.min=n[e].min,r.max=r.min+i}):yE(i,t.layoutBox,n)&&Dw(r=>{let i=a?t.measuredBox[r]:t.layoutBox[r],o=iw(n[r]);i.max=i.min+o,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+o)});let o=ww();sw(o,n,t.layoutBox);let s=ww();a?sw(s,e.applyTransform(r,!0),t.measuredBox):sw(s,n,t.layoutBox);let c=!NT(o),l=!1;if(!e.resumeFrom){let r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){let{snapshot:i,layout:a}=r;if(i&&a){let o=Ew();dw(o,t.layoutBox,i.layoutBox);let s=Ew();dw(s,n,a.layoutBox),LT(o,s)||(l=!0),r.options.layoutRoot&&(e.relativeTarget=s,e.relativeTargetOrigin=o,e.relativeParent=r)}}}e.notifyListeners(`didUpdate`,{layout:n,snapshot:t,delta:s,layoutDelta:o,hasLayoutChanged:c,hasRelativeTargetChanged:l})}else if(e.isLead()){let{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function $T(e){UT&&HT.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty),e.isTransformDirty||=e.parent.isTransformDirty)}function eE(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tE(e){e.clearSnapshot()}function nE(e){e.clearMeasurements()}function rE(e){e.isLayoutDirty=!1}function iE(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify(`BeforeLayoutMeasure`),e.resetTransform()}function aE(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function oE(e){e.resolveTargetDelta()}function sE(e){e.calcProjection()}
64function cE(e){e.resetSkewAndRotation()}function lE(e){e.removeLeadSnapshot()}function uE(e,t,n){e.translate=cS(t.translate,0,n),e.scale=cS(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function dE(e,t,n,r){e.min=cS(t.min,n.min,r),e.max=cS(t.max,n.max,r)}function fE(e,t,n,r){dE(e.x,t.x,n.x,r),dE(e.y,t.y,n.y,r)}function pE(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var mE={duration:.45,ease:[.4,0,.1,1]},hE=e=>typeof navigator<`u`&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),gE=hE(`applewebkit/`)&&!hE(`chrome/`)?Math.round:b_;function _E(e){e.min=gE(e.min),e.max=gE(e.max)}function vE(e){_E(e.x),_E(e.y)}function yE(e,t,n){return e===`position`||e===`preserve-aspect`&&!aw(RT(t),RT(n),.2)}function bE(e){return e!==e.root&&e.scroll?.wasRoot}var xE=XT({attachResizeListener:(e,t)=>VC(e,`resize`,t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),SE={current:void 0},CE=XT({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!SE.current){let e=new xE({});e.mount(window),e.setOptions({layoutScroll:!0}),SE.current=e}return SE.current},resetTransform:(e,t)=>{e.style.transform=t===void 0?`none`:t},checkIsScrollRoot:e=>window.getComputedStyle(e).position===`fixed`}),wE={pan:{Feature:tT},drag:{Feature:$w,ProjectionNode:CE,MeasureLayout:sT}};function TE(e,t,n){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive(`whileHover`,n===`Start`);let i=r[`onHover`+n];i&&M_.postRender(()=>i(t,HC(t)))}var EE=class extends LC{mount(){let{current:e}=this.node;e&&(this.unmount=rb(e,e=>(TE(this.node,e,`Start`),e=>TE(this.node,e,`End`))))}unmount(){}},DE=class extends LC{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(`:focus-visible`)}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive(`whileFocus`,!1),this.isActive=!1)}mount(){this.unmount=vS(VC(this.node.current,`focus`,()=>this.onFocus()),VC(this.node.current,`blur`,()=>this.onBlur()))}unmount(){}};function OE(e,t,n){let{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive(`whileTap`,n===`Start`);let i=r[`onTap`+(n===`End`?``:n)];i&&M_.postRender(()=>i(t,HC(t)))}var kE=class extends LC{mount(){let{current:e}=this.node;e&&(this.unmount=pb(e,e=>(OE(this.node,e,`Start`),(e,{success:t})=>OE(this.node,e,t?`End`:`Cancel`)),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}},AE=new WeakMap,jE=new WeakMap,ME=e=>{let t=AE.get(e.target);t&&t(e)},NE=e=>{e.forEach(ME)};function PE({root:e,...t}){let n=e||document;jE.has(n)||jE.set(n,{});let r=jE.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(NE,{root:e,...t})),r[i]}function FE(e,t,n){let r=PE(t);return AE.set(e,n),r.observe(e),()=>{AE.delete(e),r.unobserve(e)}}var IE={some:0,all:1},LE=class extends LC{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();let{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r=`some`,once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:typeof r==`number`?r:IE[r]};return FE(this.node.current,a,e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,i&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive(`whileInView`,t);let{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)})}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>`u`)return;let{props:e,prevProps:t}=this.node;[`amount`,`margin`,`root`].some(RE(e,t))&&this.startObserver()}unmount(){}};function RE({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}var zE={inView:{Feature:LE},tap:{Feature:kE},focus:{Feature:DE},hover:{Feature:EE}},BE={layout:{ProjectionNode:CE,MeasureLayout:sT}},VE={current:null},HE={current:!1};function UE(){if(HE.current=!0,__)if(window.matchMedia){let e=window.matchMedia(`(prefers-reduced-motion)`),t=()=>VE.current=e.matches;e.addListener(t),t()}else VE.current=!1}var WE=[...Qx,cx,Sx],GE=e=>WE.find(Zx(e)),KE=new WeakMap;
64function qE(e,t,n){for(let r in t){let i=t[r],a=n[r];if(Dv(i))e.addValue(r,i);else if(Dv(a))e.addValue(r,Db(i,{owner:e}));else if(a!==i)if(e.hasValue(r)){let t=e.getValue(r);t.liveStyle===!0?t.jump(i):t.hasAnimated||t.set(i)}else{let t=e.getStaticValue(r);e.addValue(r,Db(t===void 0?i:t,{owner:e}))}}for(let r in n)t[r]===void 0&&e.removeValue(r);return t}var JE=[`AnimationStart`,`AnimationComplete`,`Update`,`BeforeLayoutMeasure`,`LayoutMeasure`,`LayoutAnimationStart`,`LayoutAnimationComplete`],YE=class{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:i,visualState:a},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Gx,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify(`Update`,this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=vb.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,M_.render(this.render,!1,!0))};let{latestValues:s,renderState:c,onUpdate:l}=a;this.onUpdate=l,this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.blockInitialAnimation=!!i,this.isControllingVariants=ev(t),this.isVariantNode=tv(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);let{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(let e in d){let t=d[e];s[e]!==void 0&&Dv(t)&&t.set(s[e],!1)}}mount(e){this.current=e,KE.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((e,t)=>this.bindToMotionValue(t,e)),HE.current||UE(),this.shouldReduceMotion=this.reducedMotionConfig===`never`?!1:this.reducedMotionConfig===`always`||VE.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){KE.delete(this.current),this.projection&&this.projection.unmount(),N_(this.notifyUpdate),N_(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(let e in this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();let n=Nv.has(e),r=t.on(`change`,t=>{this.latestValues[e]=t,this.props.onUpdate&&M_.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),i=t.on(`renderRequest`,this.scheduleRender),a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,()=>{r(),i(),a&&a(),t.owner&&t.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e=`animation`;for(e in R_){let t=R_[e];if(!t)continue;let{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ew()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<JE.length;t++){let n=JE[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let r=e[`on`+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=qE(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}
64addVariantChild(e){let t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){let n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return n===void 0&&t!==void 0&&(n=Db(t===null?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){let n=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return n!=null&&(typeof n==`string`&&(Kx(n)||Jb(n))?n=parseFloat(n):!GE(n)&&Sx.test(t)&&(n=kx(e,t)),this.setBaseTarget(e,Dv(n)?n.get():n)),Dv(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let{initial:t}=this.props,n;if(typeof t==`string`||typeof t==`object`){let r=Cv(this.props,t,this.presenceContext?.custom);r&&(n=r[e])}if(t&&n!==void 0)return n;let r=this.getBaseTargetFromProps(this.props,e);return r!==void 0&&!Dv(r)?r:this.initialValues[e]!==void 0&&n===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new xb),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}},XE=class extends YE{constructor(){super(...arguments),this.KeyframeResolver=eS}sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;Dv(e)&&(this.childSubscription=e.on(`change`,e=>{this.current&&(this.current.textContent=`${e}`)}))}};function ZE(e){return window.getComputedStyle(e)}var QE=class extends XE{constructor(){super(...arguments),this.type=`html`,this.renderInstance=my}readValueFromInstance(e,t){if(Nv.has(t)){let e=Ox(t);return e&&e.default||0}{let n=ZE(e),r=(Fv(t)?n.getPropertyValue(t):n[t])||0;return typeof r==`string`?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return Kw(e,t)}build(e,t,n){iy(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return by(e,t,n)}},$E=class extends XE{constructor(){super(...arguments),this.type=`svg`,this.isSVGTag=!1,this.measureInstanceViewportBox=Ew}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Nv.has(t)){let e=Ox(t);return e&&e.default||0}return t=hy.has(t)?t:cv(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return xy(e,t,n)}
64build(e,t,n){uy(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){gy(e,t,n,r)}mount(e){this.isSVGTag=py(e.tagName),super.mount(e)}},eD=(e,t)=>xv(e)?new $E(t):new QE(t,{allowProjection:e!==b.Fragment}),tD=J_(My({...BC,...zE,...wE,...BE},eD));function nD(e){let t=b.useRef({value:e,previous:e});return b.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function rD(e){let[t,n]=b.useState(void 0);return Me(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}var iD=`Checkbox`,[aD,oD]=V(iD),[sD,cD]=aD(iD);function lD(e){let{__scopeCheckbox:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:l,value:u=`on`,internal_do_not_use_render:d}=e,[f,p]=Ve({prop:n,defaultProp:i??!1,onChange:c,caller:iD}),[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useRef(!1),y=!m||!!o||!!m.closest(`form`),x={checked:f,disabled:a,setChecked:p,control:m,setControl:h,name:s,form:o,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:!vD(i)&&i,isFormControl:y,bubbleInput:g,setBubbleInput:_};return(0,z.jsx)(sD,{scope:t,...x,children:_D(d)?d(x):r})}var uD=`CheckboxTrigger`,dD=b.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},i)=>{let{control:a,value:o,disabled:s,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:f,isFormControl:p,bubbleInput:m}=cD(uD,e),h=L(i,u),g=b.useRef(c);return b.useEffect(()=>{let e=a?.form;if(e){let t=()=>d(g.current);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[a,d]),(0,z.jsx)(U.button,{type:`button`,role:`checkbox`,"aria-checked":vD(c)?`mixed`:c,"aria-required":l,"data-state":yD(c),"data-disabled":s?``:void 0,disabled:s,value:o,...r,ref:h,onKeyDown:F(t,e=>{e.key===`Enter`&&e.preventDefault()}),onClick:F(n,e=>{d(e=>vD(e)?!0:!e),m&&p&&(f.current=e.isPropagationStopped(),f.current||e.stopPropagation())})})});dD.displayName=uD;var fD=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,z.jsx)(lD,{__scopeCheckbox:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(dD,{...d,ref:t,__scopeCheckbox:n}),e&&(0,z.jsx)(gD,{__scopeCheckbox:n})]})})});fD.displayName=iD;var pD=`CheckboxIndicator`,mD=b.forwardRef((e,t)=>{let{__scopeCheckbox:n,forceMount:r,...i}=e,a=cD(pD,n);return(0,z.jsx)(Ie,{present:r||vD(a.checked)||a.checked===!0,children:(0,z.jsx)(U.span,{"data-state":yD(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t,style:{pointerEvents:`none`,...e.style}})})});mD.displayName=pD;var hD=`CheckboxBubbleInput`,gD=b.forwardRef(({__scopeCheckbox:e,...t},n)=>{let{control:r,hasConsumerStoppedPropagationRef:i,checked:a,defaultChecked:o,required:s,disabled:c,name:l,value:u,form:d,bubbleInput:f,setBubbleInput:p}=cD(hD,e),m=L(n,p),h=nD(a),g=rD(r);b.useEffect(()=>{let e=f;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=!i.current;if(h!==a&&n){let t=new Event(`click`,{bubbles:r});e.indeterminate=vD(a),n.call(e,!vD(a)&&a),e.dispatchEvent(t)}},[f,h,a,i]);let _=b.useRef(!vD(a)&&a);return(0,z.jsx)(U.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:o??_.current,required:s,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:m,style:{...t.style,...g,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})});gD.displayName=hD;function _D(e){return typeof e==`function`}function vD(e){return e===`indeterminate`}function yD(e){return vD(e)?`indeterminate`:e?`checked`:`unchecked`}var bD=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(fD,{ref:n,className:K(`peer h-4 w-4 shrink-0 rounded-sm border border-primary shadow focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground`,e),...t,children:(0,z.jsx)(mD,{className:K(`flex items-center justify-center text-current`),children:(0,z.jsx)(sn,{className:`h-4 w-4`})})}));bD.displayName=fD.displayName;var xD=[`Rector / Priest in Charge`,`Vestry Secretary`,`Vestry member`,`Church administrator`,`Architect / Surveyor`,`Other`],SD=[`Church`,`Rectory / clergy housing`,`Church hall`,`Other church building`],CD=[`City of Edinburgh`,`East Lothian`,`Midlothian`,`West Lothian`,`Falkirk`,`Scottish Borders`,`Not sure`],wD=[`Repairs and maintenance`,`Internal alterations / reordering`,`External alterations`,`Extensions or new buildings`,`Installation of fixtures (kitchen, toilet, heating, etc.)`,`Removal or disposal of items`,`Monuments and memorials`,`Landscaping or churchyard works`,`Other`],TD=[`Plans, drawings and photographs of the scheme`,`Congregation response to the consultation`,`Vestry response to the consultations`,`Comments / responses from other bodies consulted`,`Additional information sheets`,`Other supporting document`],ED=[{id:1,title:`Your details`,intro:`You're in the right place. This short form walks y
64ou through everything step by step â most people finish in about ten minutes, and your answers save automatically if you need to stop and come back.`,fields:[{key:`applicant_name`,label:`Contact name`,type:`text`,required:!0,placeholder:`e.g. Rev. Sarah Mitchell`},{key:`applicant_role`,label:`Position`,type:`select`,required:!0,options:xD},{key:`email`,label:`Email address`,type:`text`,required:!0,placeholder:`[email protected]`},{key:`phone`,label:`Telephone number`,type:`text`,required:!1,placeholder:`Optional`}]},{id:2,title:`The church`,intro:`Tell us which church or property the proposed works relate to.`,fields:[{key:`church_name`,label:`Applicant church`,type:`text`,required:!0,placeholder:`e.g. St Mary's, Haddington`},{key:`charge`,label:`Charge / congregation`,type:`text`,required:!1,placeholder:`e.g. St Mary's Cathedral, Palmerston Place`},{key:`local_authority_area`,label:`Local authority area`,type:`select`,required:!0,options:CD},{key:`property_type`,label:`Property type`,type:`select`,required:!0,options:SD}]},{id:3,title:`Designations`,intro:`These details help the Diocesan Buildings Committee confirm which approvals are needed â answer as best you can; the committee can verify the rest.`,fields:[{key:`listed_status`,label:`Is the church building listed?`,type:`select`,required:!0,hint:`If it is listed, choose its category.`,options:[`Not listed`,`Category A`,`Category B`,`Category C`,`Not sure`]},{key:`conservation_area`,label:`Is it in a conservation area?`,type:`select`,required:!0,options:[`Yes`,`No`,`Not sure`]},{key:`designation_area`,label:`Is it in a National Park or National Scenic Area?`,type:`select`,required:!0,options:[`Yes â National Park`,`Yes â National Scenic Area`,`No`,`Not sure`]}]},{id:4,title:`Scheme details`,intro:`Now tell us about the scheme itself â what is proposed, what it costs, and how it supports the life of the congregation.`,fields:[{key:`project_title`,label:`Name of scheme / proposal`,type:`text`,required:!0,placeholder:`e.g. Reordering of the nave â new community space`},{key:`works_category`,label:`Category of works`,type:`select`,required:!0,options:wD},{key:`works_description`,label:`Summary of the scheme / proposal`,type:`textarea`,required:!0,hint:`What the works are, why they are needed, and roughly when you plan to carry them out. Plans, drawings and photographs are uploaded in a later step.`,placeholder:`e.g. We plan to remove the rear pews to create a welcoming community area at the west endâ¦`},{key:`estimated_cost`,label:`Anticipated cost`,type:`text`,required:!1,placeholder:`e.g. £25,000`},{key:`funding_sources`,label:`How will the proposal be funded?`,type:`textarea`,required:!1,hint:`e.g. reserves, grant applications, fundraising, legacies.`},{key:`mission_link`,label:`How does the proposal link to the congregationâs mission priorities?`,type:`textarea`,required:!1}]},{id:5,title:`Consultations`,intro:`Canon 35 applications are normally consulted on before approval. Tell us who the proposals have been sent to, and when â leave blank anything that does not apply yet, and the committee will follow up.`,fields:[{key:`congregation_consultation_date`,label:`A. Date proposals were sent to the congregation`,type:`date`,required:!0},{key:`hes_consultation_date`,label:`B. Date sent to Historic Environment Scotland`,type:`date`,required:!1,hint:`Only needed if the building is listed.`},{key:`planning_authority_consultation_date`,label:`C. Date sent to the local planning authority`,type:`date`,required:!1},{key:`planning_consent_date`,label:`Date of planning consent`,type:`date`,required:!1,hint:`If planning permission has already been granted.`},{key:`other_bodies_consulted`,label:`D. Other bodies consulted â list names`,type:`text`,required:!1,placeholder:`e.g. neighbours, community council, grant funders`},{key:`consultation_responses`,label:`Comments / responses were received from`,type:`textarea`,required:!1,hint:`e.g. congregation, Vestry, Historic Environment Scotland. Attach the details in the next step.`}]},{id:6,title:`Documents`,intro:`Only the documents listed below are needed â this keeps the workload to a minimum for you and the committee. Choose the document, upload the file, and repeat for each one.`,custom:`documents`},{id:7,title:`Review, consent & submit`,intro:`Nearly there. Check your answers below, then sign and submit â the Diocesan Buildings Committee will be notified straight away.`,custom:`review`,fields:[{key:`signature_name`,label:`Signature of Rector / Priest in Charge`,type:`text`,required:!0,hint:`Type your full name to sign the application electronically. The date is recorded automatically when you submit.`,placeholder:`e.g. Rev. Sarah Mitchell`}]}],DD={in_progress:{label:`Pre-application`,dot:`bg-slate-400`,bar:`bg-slate-400`},submitted:{label:`Pending`,dot:`bg-amber-500`,bar:`bg-amber-500`},completed:{label:`Approved`,dot:`bg-emerald-500`,bar:`bg-emerald-500`},flagged:{label:`Needs attention`,dot:`bg-red-500`,bar:`bg-red-500`}},OD={pending:{label:`Pending decision`},approved:{label:`Approved`},deferred_dbc:{label:`Deferred for online appointment with DBC at next meeting`},site_visit:{label:`Site visit required`}};function kD({currentStep:e,steps:t}){let n=t||ED;return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`ol`,{className:`hidden sm:flex items-center w-full`,children:n.map((t,n)=>{let r=t.id<e,i=t.id===e;return(0,z.jsxs)(b.Fragment,{children:[n>0&&(0,z.jsx)(`li`,{"aria-hidden":`true`,className:K(`h-px flex-1 mx-2`,r?`bg-primary`:`bg-border`)}),(0,z.jsxs)(`li`,{className:`flex flex-col items-center gap-2`,children:[(0,z.jsx)(`span`,{className:K(`w-8 h-8 rounded-full flex items-center justify-center text-sm font-medium border-2 transition-colors`,r&&`bg-primary border-primary text-primary-foreground`,i&&`border-primary text-primary bg-primary/10`,!r&&!i&&`border-border text-muted-foreground bg-card`),children:r?(0,z.jsx)(sn,{className:`w-4 h-4`}):t.id}),(0,z.jsx)(`span`,{className:K(`text-xs whitespace-nowrap`,i?`text-primary font-medium`:`text-muted-foreground`),children:t.title})]})]},t.id)})}),(0,z.jsxs)(`div`,{className:`sm:hidden flex items-center justify-between text-sm`,children:[(0,z.jsxs)(`span`,{className:`font-medium text-primary`,children:[`Step `,e,` of `,n.length]}),(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:n.find(t=>
64t.id===e)?.title})]}),(0,z.jsx)(`div`,{className:`sm:hidden mt-2 h-1 rounded-full bg-muted overflow-hidden`,children:(0,z.jsx)(`div`,{className:`h-full bg-primary transition-all duration-300`,style:{width:`${e/n.length*100}%`}})})]})}var AD=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(`textarea`,{className:K(`flex min-h-[60px] w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-sm placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 md:text-sm`,e),ref:n,...t}));AD.displayName=`Textarea`;function jD(e,[t,n]){return Math.min(n,Math.max(t,e))}var MD=b.createContext(void 0);function ND(e){let t=b.useContext(MD);return e||t||`ltr`}var PD=0;function FD(){b.useEffect(()=>{let e=document.querySelectorAll(`[data-radix-focus-guard]`);return document.body.insertAdjacentElement(`afterbegin`,e[0]??ID()),document.body.insertAdjacentElement(`beforeend`,e[1]??ID()),PD++,()=>{PD===1&&document.querySelectorAll(`[data-radix-focus-guard]`).forEach(e=>e.remove()),PD--}},[])}function ID(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}var LD=`focusScope.autoFocusOnMount`,RD=`focusScope.autoFocusOnUnmount`,zD={bubbles:!1,cancelable:!0},BD=`FocusScope`,VD=b.forwardRef((e,t)=>{let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=b.useState(null),l=he(i),u=he(a),d=b.useRef(null),f=L(t,e=>c(e)),p=b.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;b.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:JD(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||JD(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&JD(s)};document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),b.useEffect(()=>{if(s){YD.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(LD,zD);s.addEventListener(LD,l),s.dispatchEvent(t),t.defaultPrevented||(HD(QD(WD(s)),{select:!0}),document.activeElement===e&&JD(s))}return()=>{s.removeEventListener(LD,l),setTimeout(()=>{let t=new CustomEvent(RD,zD);s.addEventListener(RD,u),s.dispatchEvent(t),t.defaultPrevented||JD(e??document.body,{select:!0}),s.removeEventListener(RD,u),YD.remove(p)},0)}}},[s,l,u,p]);let m=b.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=UD(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&JD(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&JD(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,z.jsx)(U.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})});VD.displayName=BD;function HD(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(JD(r,{select:t}),document.activeElement!==n)return}function UD(e){let t=WD(e);return[GD(t,e),GD(t.reverse(),e)]}function WD(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function GD(e,t){for(let n of e)if(!KD(n,{upTo:t}))return n}function KD(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function qD(e){return e instanceof HTMLInputElement&&`select`in e}function JD(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&qD(e)&&t&&e.select()}}var YD=XD();function XD(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=ZD(e,t),e.unshift(t)},remove(t){e=ZD(e,t),e[0]?.resume()}}}function ZD(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function QD(e){return e.filter(e=>e.tagName!==`A`)}var $D=b.useId||(()=>void 0),eO=0;function tO(e){let[t,n]=b.useState($D());return Me(()=>{e||n(e=>e??String(eO++))},[e]),e||(t?`radix-${t}`:``)}var nO=[`top`,`right`,`bottom`,`left`],rO=Math.min,iO=Math.max,aO=Math.round,oO=Math.floor,sO=e=>({x:e,y:e}),cO={left:`right`,right:`left`,bottom:`top`,top:`bottom`},lO={start:`end`,end:`start`};function uO(e,t,n){return iO(e,rO(t,n))}function dO(e,t){return typeof e==`function`?e(t):e}function fO(e){return e.split(`-`)[0]}function pO(e){return e.split(`-`)[1]}function mO(e){return e===`x`?`y`:`x`}function hO(e){return e===`y`?`height`:`width`}var gO=new Set([`top`,`bottom`]);function _O(e){return gO.has(fO(e))?`y`:`x`}function vO(e){return mO(_O(e))}function yO(e,t,n){n===void 0&&(n=!1);
vendor: 26,094 bytes, line 64
64let r=pO(e),i=vO(e),a=hO(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=OO(o)),[o,OO(o)]}function bO(e){let t=OO(e);return[xO(e),t,xO(t)]}function xO(e){return e.replace(/start|end/g,e=>lO[e])}var SO=[`left`,`right`],CO=[`right`,`left`],wO=[`top`,`bottom`],TO=[`bottom`,`top`];function EO(e,t,n){switch(e){case`top`:case`bottom`:return n?t?CO:SO:t?SO:CO;case`left`:case`right`:return t?wO:TO;default:return[]}}function DO(e,t,n,r){let i=pO(e),a=EO(fO(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(xO)))),a}function OO(e){return e.replace(/left|right|bottom|top/g,e=>cO[e])}function kO(e){return{top:0,right:0,bottom:0,left:0,...e}}function AO(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:kO(e)}function jO(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function MO(e,t,n){let{reference:r,floating:i}=e,a=_O(t),o=vO(t),s=hO(o),c=fO(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(pO(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1)}return p}async function NO(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=dO(t,e),p=AO(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=jO(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=jO(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var PO=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=MO(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:{...o,detectOverflow:o.detectOverflow??NO},elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=MO(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}},FO=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=dO(e,t)||{};if(l==null)return{};let d=AO(u),f={x:n,y:r},p=vO(i),m=hO(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=rO(d[_],T),D=rO(d[v],T),O=E,k=C-h[m]-D,A=C/2-h[m]/2+w,j=uO(O,A,k),M=!c.arrow&&pO(i)!=null&&A!==j&&a.reference[m]/2-(A<O?E:D)-h[m]/2<0,N=M?A<O?A-O:A-k:0;return{[p]:f[p]+N,data:{[p]:j,centerOffset:A-j-N,...M&&{alignmentOffset:N}},reset:M}}}),IO=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=dO(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=fO(r),_=_O(o),v=fO(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[OO(o)]:bO(o)),x=p!==`none`;!d&&x&&b.push(...DO(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=yO(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===_O(t)||T.every(e=>_O(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=_O(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function LO(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function RO(e){return nO.some(t=>e[t]>=0)}var zO=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=dO(e,t);switch(i){case`referenceHidden`:{let e=LO(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:RO(e)}}}case`escaped`:{let e=LO(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:RO(e)}}}default:return{}}}}},BO=new Set([`left`,`top`]);async function VO(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=fO(n),s=pO(n),c=_O(n)===`y`,l=BO.has(o)?-1:1,u=a&&c?-1:1,d=dO(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var HO=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await VO(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},UO=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=dO(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=_O(fO(i)),p=mO(f),m=u[p],h=u[f];if(o){let e=p===`y`?`top`:`left`,t=p===`y`?`bottom`:`right`,n=m+d[e],r=m-d[t];m=uO(n,m,r)}if(s){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=h+d[e],r=h-d[t];h=uO(n,h,r)}let g=c.fn({...t,[p]:m,[f]:h});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:o,[f]:s}}}}}},WO=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=dO(e,t),u={x:n,y:r},d=_O(i),f=mO(d),p=u[f],m=u[d],h=dO(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=BO.has(fO(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},GO=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=dO(e,t),u=await o.detectOverflow(t,l),d=fO(i),f=pO(i),p=_O(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=rO(h-u[g],v),x=rO(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=iO(u.left,0),t=iO(u.right,0),n=iO(u.top,0),r=iO(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:iO(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:iO(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function KO(){return typeof window<`u`}function qO(e){return XO(e)?(e.nodeName||``).toLowerCase():`#document`}function JO(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function YO(e){return((XO(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function XO(e){return KO()?e instanceof Node||e instanceof JO(e).Node:!1}function ZO(e){return KO()?e instanceof Element||e instanceof JO(e).Element:!1}function QO(e){return KO()?e instanceof HTMLElement||e instanceof JO(e).HTMLElement:!1}function $O(e){return!KO()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof JO(e).ShadowRoot}var ek=new Set([`inline`,`contents`]);function tk(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=mk(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ek.has(i)}var nk=new Set([`table`,`td`,`th`]);function rk(e){return nk.has(qO(e))}var ik=[`:popover-open`,`:modal`];function ak(e){return ik.some(t=>{try{return e.matches(t)}catch{return!1}})}var ok=[`transform`,`translate`,`scale`,`rotate`,`perspective`],sk=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],ck=[`paint`,`layout`,`strict`,`content`];function lk(e){let t=dk(),n=ZO(e)?mk(e):e;return ok.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||sk.some(e=>(n.willChange||``).includes(e))||ck.some(e=>(n.contain||``).includes(e))}function uk(e){let t=gk(e);for(;QO(t)&&!pk(t);){if(lk(t))return t;if(ak(t))return null;t=gk(t)}return null}function dk(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var fk=new Set([`html`,`body`,`#document`]);function pk(e){return fk.has(qO(e))}function mk(e){return JO(e).getComputedStyle(e)}function hk(e){return ZO(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function gk(e){if(qO(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||$O(e)&&e.host||YO(e);return $O(t)?t.host:t}function _k(e){let t=gk(e);return pk(t)?e.ownerDocument?e.ownerDocument.body:e.body:QO(t)&&tk(t)?t:_k(t)}function vk(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=_k(e),i=r===e.ownerDocument?.body,a=JO(r);if(i){let e=yk(a);return t.concat(a,a.visualViewport||[],tk(r)?r:[],e&&n?vk(e):[])}return t.concat(r,vk(r,[],n))}function yk(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function bk(e){let t=mk(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=QO(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=aO(n)!==a||aO(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function xk(e){return ZO(e)?e:e.contextElement}function Sk(e){let t=xk(e);if(!QO(t))return sO(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=bk(t),o=(a?aO(n.width):n.width)/r,s=(a?aO(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ck=sO(0);function wk(e){let t=JO(e);return!dk()||!t.visualViewport?Ck:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Tk(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==JO(e)?!1:t}function Ek(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=xk(e),o=sO(1);t&&(r?ZO(r)&&(o=Sk(r)):o=Sk(e));let s=Tk(a,n,r)?wk(a):sO(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=JO(a),t=r&&ZO(r)?JO(r):r,n=e,i=yk(n);for(;i&&r&&t!==n;){let e=Sk(i),t=i.getBoundingClientRect(),r=mk(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=JO(i),i=yk(n)}}return jO({width:u,height:d,x:c,y:l})}function Dk(e,t){let n=hk(e).scrollLeft;return t?t.left+n:Ek(YO(e)).left+n}function Ok(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Dk(e,n),y:n.top+t.scrollTop}}function kk(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=YO(r),s=t?ak(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=sO(1),u=sO(0),d=QO(r);if((d||!d&&!a)&&((qO(r)!==`body`||tk(o))&&(c=hk(r)),QO(r))){let e=Ek(r);l=Sk(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?Ok(o,c):sO(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Ak(e){return Array.from(e.getClientRects())}function jk(e){let t=YO(e),n=hk(e),r=e.ownerDocument.body,i=iO(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=iO(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Dk(e),s=-n.scrollTop;return mk(r).direction===`rtl`&&(o+=iO(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var Mk=25;function Nk(e,t){let n=JO(e),r=YO(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=dk();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Dk(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=Mk&&(a-=o)}else l<=Mk&&(a+=l);return{width:a,height:o,x:s,y:c}}var Pk=new Set([`absolute`,`fixed`]);function Fk(e,t){let n=Ek(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=QO(e)?Sk(e):sO(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ik(e,t,n){let r;if(t===`viewport`)r=Nk(e,n);else if(t===`document`)r=jk(YO(e));else if(ZO(t))r=Fk(t,n);else{let n=wk(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return jO(r)}function Lk(e,t){let n=gk(e);return n===t||!ZO(n)||pk(n)?!1:mk(n).position===`fixed`||Lk(n,t)}function Rk(e,t){let n=t.get(e);if(n)return n;let r=vk(e,[],!1).filter(e=>ZO(e)&&qO(e)!==`body`),i=null,a=mk(e).position===`fixed`,o=a?gk(e):e;for(;ZO(o)&&!pk(o);){let t=mk(o),n=lk(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&Pk.has(i.position)||tk(o)&&!n&&Lk(e,o))?r=r.filter(e=>e!==o):i=t,o=gk(o)}return t.set(e,r),r}function zk(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?ak(t)?[]:Rk(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=Ik(t,n,i);return e.top=iO(r.top,e.top),e.right=rO(r.right,e.right),e.bottom=rO(r.bottom,e.bottom),e.left=iO(r.left,e.left),e},Ik(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Bk(e){let{width:t,height:n}=bk(e);return{width:t,height:n}}function Vk(e,t,n){let r=QO(t),i=YO(t),a=n===`fixed`,o=Ek(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=sO(0);function l(){c.x=Dk(i)}if(r||!r&&!a)if((qO(t)!==`body`||tk(i))&&(s=hk(t)),r){let e=Ek(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l();a&&!r&&i&&l();let u=i&&!r&&!a?Ok(i,s):sO(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function Hk(e){return mk(e).position===`static`}function Uk(e,t){if(!QO(e)||mk(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return YO(e)===n&&(n=n.ownerDocument.body),n}function Wk(e,t){let n=JO(e);if(ak(e))return n;if(!QO(e)){let t=gk(e);for(;t&&!pk(t);){if(ZO(t)&&!Hk(t))return t;t=gk(t)}return n}let r=Uk(e,t);for(;r&&rk(r)&&Hk(r);)r=Uk(r,t);return r&&pk(r)&&Hk(r)&&!lk(r)?n:r||uk(e)||n}var Gk=async function(e){let t=this.getOffsetParent||Wk,n=this.getDimensions,r=await n(e.floating);return{reference:Vk(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Kk(e){return mk(e).direction===`rtl`}var qk={convertOffsetParentRelativeRectToViewportRelativeRect:kk,getDocumentElement:YO,getClippingRect:zk,getOffsetParent:Wk,getElementRects:Gk,getClientRects:Ak,getDimensions:Bk,getScale:Sk,isElement:ZO,isRTL:Kk};function Jk(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Yk(e,t){let n=null,r,i=YO(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=oO(d),h=oO(i.clientWidth-(u+f)),g=oO(i.clientHeight-(d+p)),_=oO(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:iO(0,rO(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!Jk(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function Xk(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=xk(e),u=i||a?[...l?vk(l):[],...vk(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?Yk(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?Ek(e):null;c&&g();function g(){let t=Ek(e);h&&!Jk(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Zk=HO,Qk=UO,$k=IO,eA=GO,tA=zO,nA=FO,rA=WO,iA=(e,t,n)=>{let r=new Map,i={platform:qk,...n},a={...i.platform,_c:r};return PO(e,t,{...i,platform:a})},aA=typeof document<`u`?b.useLayoutEffect:function(){};function oA(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!oA(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!oA(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function sA(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cA(e,t){let n=sA(e);return Math.round(t*n)/n}function lA(e){let t=b.useRef(e);return aA(()=>{t.current=e}),t}function uA(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=b.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=b.useState(r);oA(f,r)||p(r);let[m,h]=b.useState(null),[g,_]=b.useState(null),v=b.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),y=b.useCallback(e=>{e!==w.current&&(w.current=e,_(e))},[]),x=a||m,S=o||g,C=b.useRef(null),w=b.useRef(null),T=b.useRef(u),E=c!=null,D=lA(c),O=lA(i),k=lA(l),A=b.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),iA(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!oA(T.current,t)&&(T.current=t,P.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);aA(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=b.useRef(!1);aA(()=>(j.current=!0,()=>{j.current=!1}),[]),aA(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=b.useMemo(()=>({reference:C,floating:w,setReference:v,setFloating:y}),[v,y]),N=b.useMemo(()=>({reference:x,floating:S}),[x,S]),F=b.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=cA(N.floating,u.x),r=cA(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...sA(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return b.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:F}),[u,A,M,N,F])}var dA=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:nA({element:r.current,padding:i}).fn(n):r?nA({element:r,padding:i}).fn(n):{}}}},fA=(e,t)=>({...Zk(e),options:[e,t]}),pA=(e,t)=>({...Qk(e),options:[e,t]}),mA=(e,t)=>({...rA(e),options:[e,t]}),hA=(e,t)=>({...$k(e),options:[e,t]}),gA=(e,t)=>({...eA(e),options:[e,t]}),_A=(e,t)=>({...tA(e),options:[e,t]}),vA=(e,t)=>({...dA(e),options:[e,t]}),yA=`Arrow`,bA=b.forwardRef((e,t)=>{let{children:n,width:r=10,height:i=5,...a}=e;return(0,z.jsx)(U.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,z.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})});bA.displayName=yA;var xA=bA,SA=`Popper`,[CA,wA]=V(SA),[TA,EA]=CA(SA),DA=e=>{let{__scopePopper:t,children:n}=e,[r,i]=b.useState(null);return(0,z.jsx)(TA,{scope:t,anchor:r,onAnchorChange:i,children:n})};DA.displayName=SA;var OA=`PopperAnchor`,kA=b.forwardRef((e,t)=>{let{__scopePopper:n,virtualRef:r,...i}=e,a=EA(OA,n),o=b.useRef(null),s=L(t,o),c=b.useRef(null);return b.useEffect(()=>{let e=c.current;c.current=r?.current||o.current,e!==c.current&&a.onAnchorChange(c.current)}),r?null:(0,z.jsx)(U.div,{...i,ref:s})});kA.displayName=OA;var AA=`PopperContent`,[jA,MA]=CA(AA),NA=b.forwardRef((e,t)=>{let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=EA(AA,n),[_,v]=b.useState(null),y=L(t,e=>v(e)),[x,S]=b.useState(null),C=rD(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(LA),altBoundary:k},{refs:j,floatingStyles:M,placement:N,isPositioned:P,middlewareData:F}=uA({strategy:`fixed`,placement:E,whileElementsMounted:(...e)=>Xk(...e,{animationFrame:p===`always`}),elements:{reference:g.anchor},middleware:[fA({mainAxis:i+T,alignmentAxis:o}),c&&pA({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?mA():void 0,...A}),c&&hA({...A}),gA({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)}}),x&&vA({element:x,padding:s}),RA({arrowWidth:w,arrowHeight:T}),f&&_A({strategy:`referenceHidden`,...A})]}),[I,ee]=zA(N),R=he(m);Me(()=>{P&&R?.()},[P,R]);let B=F.arrow?.x,V=F.arrow?.y,te=F.arrow?.centerOffset!==0,[ne,re]=b.useState();return Me(()=>{_&&re(window.getComputedStyle(_).zIndex)},[_]),(0,z.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:P?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ne,"--radix-popper-transform-origin":[F.transformOrigin?.x,F.transformOrigin?.y].join(` `),...F.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,z.jsx)(jA,{scope:n,placedSide:I,onArrowChange:S,arrowX:B,arrowY:V,shouldHideArrow:te,children:(0,z.jsx)(U.div,{"data-side":I,"data-align":ee,...h,ref:y,style:{...h.style,animation:P?void 0:`none`}})})})});NA.displayName=AA;var PA=`PopperArrow`,FA={top:`bottom`,right:`left`,bottom:`top`,left:`right`},IA=b.forwardRef(function(e,t){let{__scopePopper:n,...r}=e,i=MA(PA,n),a=FA[i.placedSide];return(0,z.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,z.jsx)(xA,{...r,ref:t,style:{...r.style,display:`block`}})})});IA.displayName=PA;function LA(e){return e!==null}var RA=e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=zA(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}});function zA(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var BA=DA,VA=kA,HA=NA,UA=IA;function WA(e){let t=GA(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(qA);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,z.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,z.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function GA(e){let t=b.forwardRef((e,t)=>
64{let{children:n,...r}=e;if(b.isValidElement(n)){let e=YA(n),i=JA(r,n.props);return n.type!==b.Fragment&&(i.ref=t?ee(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var KA=Symbol(`radix.slottable`);function qA(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===KA}function JA(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function YA(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var XA=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},ZA=new WeakMap,QA=new WeakMap,$A={},ej=0,tj=function(e){return e&&(e.host||tj(e.parentNode))},nj=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=tj(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},rj=function(e,t,n,r){var i=nj(t,Array.isArray(e)?e:[e]);$A[n]||($A[n]=new WeakMap);var a=$A[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(ZA.get(e)||0)+1,l=(a.get(e)||0)+1;ZA.set(e,c),a.set(e,l),o.push(e),c===1&&i&&QA.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),ej++,function(){o.forEach(function(e){var t=ZA.get(e)-1,i=a.get(e)-1;ZA.set(e,t),a.set(e,i),t||(QA.has(e)||e.removeAttribute(r),QA.delete(e)),i||e.removeAttribute(n)}),ej--,ej||(ZA=new WeakMap,ZA=new WeakMap,QA=new WeakMap,$A={})}},ij=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||XA(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),rj(r,i,n,`aria-hidden`)):function(){return null}},aj=function(){return aj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},aj.apply(this,arguments)};function oj(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function sj(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var cj=`right-scroll-bar-position`,lj=`width-before-scroll-bar`,uj=`with-scroll-bars-hidden`,dj=`--removed-body-scroll-bar-size`;function fj(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function pj(e,t){var n=(0,b.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var mj=typeof window<`u`?b.useLayoutEffect:b.useEffect,hj=new WeakMap;function gj(e,t){var n=pj(t||null,function(t){return e.forEach(function(e){return fj(e,t)})});return mj(function(){var t=hj.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||fj(e,null)}),i.forEach(function(e){r.has(e)||fj(e,a)})}hj.set(n,e)},[e]),n}function _j(e){return e}function vj(e,t){t===void 0&&(t=_j);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;
vendor: 7,485 bytes, lines 64-104
64n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function yj(e){e===void 0&&(e={});var t=vj(null);return t.options=aj({async:!0,ssr:!1},e),t}var bj=function(e){var t=e.sideCar,n=oj(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return b.createElement(r,aj({},n))};bj.isSideCarExport=!0;function xj(e,t){return e.useMedium(t),bj}var Sj=yj(),Cj=function(){},wj=b.forwardRef(function(e,t){var n=b.useRef(null),r=b.useState({onScrollCapture:Cj,onWheelCapture:Cj,onTouchMoveCapture:Cj}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,x=oj(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=gj([n,t]),w=aj(aj({},x),i);return b.createElement(b.Fragment,null,u&&b.createElement(S,{sideCar:Sj,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?b.cloneElement(b.Children.only(s),aj(aj({},w),{ref:C})):b.createElement(v,aj({},w,{className:c,ref:C}),s))});wj.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wj.classNames={fullWidth:lj,zeroRight:cj};var Tj,Ej=function(){if(Tj)return Tj;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Dj(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Ej();return t&&e.setAttribute(`nonce`,t),e}function Oj(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function kj(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var Aj=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Dj())&&(Oj(t,n),kj(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},jj=function(){var e=Aj();return function(t,n){b.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Mj=function(){var e=jj();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},Nj={left:0,top:0,right:0,gap:0},Pj=function(e){return parseInt(e||``,10)||0},Fj=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[Pj(n),Pj(r),Pj(i)]},Ij=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return Nj;var t=Fj(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Lj=Mj(),Rj=`data-scroll-locked`,zj=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),` 65 .${uj} { 66 overflow: hidden ${r}; 67 padding-right: ${s}px ${r}; 68 } 69 body[${Rj}] { 70 overflow: hidden ${r}; 71 overscroll-behavior: contain; 72 ${[t&&`position: relative ${r};`,n===`margin`&&` 73 padding-left: ${i}px; 74 padding-top: ${a}px; 75 padding-right: ${o}px; 76 margin-left:0; 77 margin-top:0; 78 margin-right: ${s}px ${r}; 79 `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)} 80 } 81 82 .${cj} { 83 right: ${s}px ${r}; 84 } 85 86 .${lj} { 87 margin-right: ${s}px ${r}; 88 } 89 90 .${cj} .${cj} { 91 right: 0 ${r}; 92 } 93 94 .${lj} .${lj} { 95 margin-right: 0 ${r}; 96 } 97 98 body[${Rj}] { 99 ${dj}: ${s}px; 100 } 101`},Bj=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Vj=function(){b.useEffect(function(){return document.body.setAttribute(Rj,(Bj()+1).toString()),function(){var e=Bj()-1;e<=0?document.body.removeAttribute(Rj):document.body.setAttribute(Rj,e.toString())}},[])},Hj=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Vj();var a=b.useMemo(function(){return Ij(i)},[i]);return b.createElement(Lj,{styles:zj(a,!t,i,n?``:`!important`)})},Uj=!1;if(typeof window<`u`)try{var Wj=Object.defineProperty({},"passive",{get:function(){return Uj=!0,!0}});window.addEventListener(`test`,Wj,Wj),window.removeEventListener(`test`,Wj,Wj)}catch{Uj=!1}var Gj=Uj?{passive:!1}:!1,Kj=function(e){return e.tagName===`TEXTAREA`},qj=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Kj(e)&&n[t]===`visible`)},Jj=function(e){return qj(e,`overflowY`)},Yj=function(e){return qj(e,`overflowX`)},Xj=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),$j(e,r)){var i=eM(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Zj=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Qj=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},$j=function(e,t){return e===`v`?Jj(t):Yj(t)},eM=function(e,t){return e===`v`?Zj(t):Qj(t)},tM=function(e,t){return e===`h`&&t===`rtl`?-1:1},nM=function(e,t,n,r,i){var a=tM(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=eM(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&$j(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},rM=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},iM=function(e){return[e.deltaX,e.deltaY]},aM=function(e){return e&&`current`in e?e.current:e},oM=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sM=function(e){return` 102 .block-interactivity-${e} {pointer-events: none;} 103 .allow-interactivity-${e} {pointer-events: all;} 104`},cM=0,lM=[];function uM(e){var t=b.useRef([]),n=b.useRef([0,0]),r=b.useRef(),i=b.useState(cM++)[0],a=b.useState(Mj)[0],o=b.useRef(e);b.useEffect(function(){o.current=e},[e]),b.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=sj([e.lockRef.current],(e.shards||[]).map(aM),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=b.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=rM(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Xj(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Xj(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return nM(h,t,e,h===`h`?s:c,!0)},[]),c=b.useCallback(function(e){var n=e;if(!(!lM.length||lM[lM.length-1]!==a)){var r=`deltaY`in n?iM(n):rM(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&oM(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}
104if(!i){var c=(o.current.shards||[]).map(aM).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=b.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:dM(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=b.useCallback(function(e){n.current=rM(e),r.current=void 0},[]),d=b.useCallback(function(t){l(t.type,iM(t),t.target,s(t,e.lockRef.current))},[]),f=b.useCallback(function(t){l(t.type,rM(t),t.target,s(t,e.lockRef.current))},[]);b.useEffect(function(){return lM.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Gj),document.addEventListener(`touchmove`,c,Gj),document.addEventListener(`touchstart`,u,Gj),function(){lM=lM.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Gj),document.removeEventListener(`touchmove`,c,Gj),document.removeEventListener(`touchstart`,u,Gj)}},[]);var p=e.removeScrollBar,m=e.inert;return b.createElement(b.Fragment,null,m?b.createElement(a,{styles:sM(i)}):null,p?b.createElement(Hj,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function dM(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var fM=xj(Sj,uM),pM=b.forwardRef(function(e,t){return b.createElement(wj,aj({},e,{ref:t,sideCar:fM}))});pM.classNames=wj.classNames;var mM=[` `,`Enter`,`ArrowUp`,`ArrowDown`],hM=[` `,`Enter`],gM=`Select`,[_M,vM,yM]=ce(gM),[bM,xM]=V(gM,[yM,wA]),SM=wA(),[CM,wM]=bM(gM),[TM,EM]=bM(gM),DM=e=>{let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m}=e,h=SM(t),[g,_]=b.useState(null),[v,y]=b.useState(null),[x,S]=b.useState(!1),C=ND(l),[w,T]=Ve({prop:r,defaultProp:i??!1,onChange:a,caller:gM}),[E,D]=Ve({prop:o,defaultProp:s,onChange:c,caller:gM}),O=b.useRef(null),k=!g||m||!!g.closest(`form`),[A,j]=b.useState(new Set),M=Array.from(A).map(e=>e.props.value).join(`;`);return(0,z.jsx)(BA,{...h,children:(0,z.jsxs)(CM,{required:p,scope:t,trigger:g,onTriggerChange:_,valueNode:v,onValueNodeChange:y,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:tO(),value:E,onValueChange:D,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,children:[(0,z.jsx)(_M.Provider,{scope:t,children:(0,z.jsx)(TM,{scope:e.__scopeSelect,onNativeOptionAdd:b.useCallback(e=>{j(t=>new Set(t).add(e))},[]),onNativeOptionRemove:b.useCallback(e=>{j(t=>{let n=new Set(t);return n.delete(e),n})},[]),children:n})}),k?(0,z.jsxs)(SN,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:E,onChange:e=>D(e.target.value),disabled:f,form:m,children:[E===void 0?(0,z.jsx)(`option`,{value:``}):null,Array.from(A)]},M):null]})})};DM.displayName=gM;var OM=`SelectTrigger`,kM=b.forwardRef((e,t)=>{let{__scopeSelect:n,disabled:r=!1,...i}=e,a=SM(n),o=wM(OM,n),s=o.disabled||r,c=L(t,o.onTriggerChange),l=vM(n),u=b.useRef(`touch`),[d,f,p]=wN(e=>{let t=l().filter(e=>!e.disabled),n=TN(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return(0,z.jsx)(VA,{asChild:!0,...a,children:(0,z.jsx)(U.button,{type:`button`,role:`combobox`,"aria-controls":o.contentId,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":CN(o.value)?``:void 0,...i,ref:c,onClick:F(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:F(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:F(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&mM.includes(e.ke
vendor: 13,332 bytes, line 104
104y)&&(m(),e.preventDefault())})})})});kM.displayName=OM;var AM=`SelectValue`,jM=b.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=wM(AM,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=L(t,c.onValueNodeChange);return Me(()=>{l(u)},[l,u]),(0,z.jsx)(U.span,{...s,ref:d,style:{pointerEvents:`none`},children:CN(c.value)?(0,z.jsx)(z.Fragment,{children:o}):a})});jM.displayName=AM;var MM=`SelectIcon`,NM=b.forwardRef((e,t)=>{let{__scopeSelect:n,children:r,...i}=e;return(0,z.jsx)(U.span,{"aria-hidden":!0,...i,ref:t,children:r||`â¼`})});NM.displayName=MM;var PM=`SelectPortal`,FM=e=>(0,z.jsx)(Pe,{asChild:!0,...e});FM.displayName=PM;var IM=`SelectContent`,LM=b.forwardRef((e,t)=>{let n=wM(IM,e.__scopeSelect),[r,i]=b.useState();if(Me(()=>{i(new DocumentFragment)},[]),!n.open){let t=r;return t?P.createPortal((0,z.jsx)(zM,{scope:e.__scopeSelect,children:(0,z.jsx)(_M.Slot,{scope:e.__scopeSelect,children:(0,z.jsx)(`div`,{children:e.children})})}),t):null}return(0,z.jsx)(UM,{...e,ref:t})});LM.displayName=IM;var RM=10,[zM,BM]=bM(IM),VM=`SelectContentImpl`,HM=WA(`SelectContent.RemoveScroll`),UM=b.forwardRef((e,t)=>{let{__scopeSelect:n,position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=wM(IM,n),[y,x]=b.useState(null),[S,C]=b.useState(null),w=L(t,e=>x(e)),[T,E]=b.useState(null),[D,O]=b.useState(null),k=vM(n),[A,j]=b.useState(!1),M=b.useRef(!1);b.useEffect(()=>{if(y)return ij(y)},[y]),FD();let N=b.useCallback(e=>{let[t,...n]=k().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&S&&(S.scrollTop=0),n===r&&S&&(S.scrollTop=S.scrollHeight),n?.focus(),document.activeElement!==i))return},[k,S]),P=b.useCallback(()=>N([T,y]),[N,T,y]);b.useEffect(()=>{A&&P()},[A,P]);let{onOpenChange:I,triggerPointerDownPosRef:ee}=v;b.useEffect(()=>{if(y){let e={x:0,y:0},t=t=>{e={x:Math.abs(Math.round(t.pageX)-(ee.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(ee.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():y.contains(n.target)||I(!1),document.removeEventListener(`pointermove`,t),ee.current=null};return ee.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,I,ee]),b.useEffect(()=>{let e=()=>I(!1);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[I]);let[R,B]=wN(e=>{let t=k().filter(e=>!e.disabled),n=TN(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current.focus())}),V=b.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&(E(e),r&&(M.current=!0))},[v.value]),te=b.useCallback(()=>y?.focus(),[y]),ne=b.useCallback((e,t,n)=>{let r=!M.current&&!n;(v.value!==void 0&&v.value===t||r)&&O(e)},[v.value]),re=r===`popper`?qM:GM,ie=re===qM?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,z.jsx)(zM,{scope:n,content:y,viewport:S,onViewportChange:C,itemRefCallback:V,selectedItem:T,onItemLeave:te,itemTextRefCallback:ne,focusSelectedItem:P,selectedItemText:D,position:r,isPositioned:A,searchRef:R,children:(0,z.jsx)(pM,{as:HM,allowPinchZoom:!0,children:(0,z.jsx)(VD,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:F(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,z.jsx)(Ce,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,z.jsx)(re,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...ie,onPlaced:()=>j(!0),ref:w,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:F(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&B(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=k().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>N(t)),e.preventDefault()}})})})})})})});UM.displayName=VM;var WM=`SelectItemAlignedPosition`,GM=b.forwardRef((e,t)=>{let{__scopeSelect:n,onPlaced:r,...i}=e,a=wM(IM,n),o=BM(IM,n),[s,c]=b.useState(null),[l,u]=b.useState(null),d=L(t,e=>u(e)),f=vM(n),p=b.useRef(!1),m=b.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=b.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-RM,d=jD(a,[RM,Math.max(RM,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-RM,d=jD(a,[RM,Math.max(RM,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-RM*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-RM,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${RM}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);Me(()=>y(),[y]);let[x,S]=b.useState();Me(()=>{l&&S(window.getComputedStyle(l).zIndex)},[l]);let C=b.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]);return(0,z.jsx)(JM,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:C,children:(0,z.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:x},children:(0,z.jsx)(U.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})});GM.displayName=WM;var KM=`SelectPopperPosition`,qM=b.forwardRef((e,t)=>{let{__scopeSelect:n,align:r=`start`,collisionPadding:i=RM,...a}=e,o=SM(n);return(0,z.jsx)(HA,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.style,"--radix-select-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-select-content-available-width":`var(--radix-popper-available-width)`,"--radix-select-content-available-height":`var(--radix-popper-available-height)`,"--radix-select-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-select-trigger-height":`var(--radix-popper-anchor-height)`}})});qM.displayName=KM;var[JM,YM]=bM(IM,{}),XM=`SelectViewport`,ZM=b.forwardRef((e,t)=>{let{__scopeSelect:n,nonce:r,...i}=e,a=BM(XM,n),o=YM(XM,n),s=L(t,a.onViewportChange),c=b.useRef(0);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`style`,{dangerouslySetInnerHTML:{__html:`[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}`},nonce:r}),(0,z.jsx)(_M.Slot,{scope:n,children:(0,z.jsx)(U.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:F(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-RM*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})});ZM.displayName=XM;var QM=`SelectGroup`,[$M,eN]=bM(QM),tN=b.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=tO();return(0,z.jsx)($M,{scope:n,id:i,children:(0,z.jsx)(U.div,{role:`group`,"aria-labelledby":i,...r,ref:t})})});tN.displayName=QM;var nN=`SelectLabel`,rN=b.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=eN(nN,n);return(0,z.jsx)(U.div,{id:i.id,...r,ref:t})});rN.displayName=nN;var iN=`SelectItem`,[aN,oN]=bM(iN),sN=b.forwardRef((e,t)=>{let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=wM(iN,n),c=BM(iN,n),l=s.value===r,[u,d]=b.useState(a??``),[f,p]=b.useState(!1),m=L(t,e=>c.itemRefCallback?.(e,r,i)),h=tO(),g=b.useRef(`touch`),_=()=>{i||(s.onValueChange(r),s.onOpenChange(!1))};if(r===``)throw Error(`A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.`);return(0,z.jsx)(aN,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:b.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,z.jsx)(_M.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,z.jsx)(U.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:F(o.onFocus,()=>p(!0)),onBlur:F(o.onBlur,()=>p(!1)),onClick:F(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:F(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:F(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:F(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:F(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:F(o.onKeyDown,e=>{(c.searchRef?.current===``||e.key!==` `)&&(hM.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})});sN.displayName=iN;var cN=`SelectItemText`,lN=b.forwardRef((e,t)=>{let{__scopeSelect:n,className:r,style:i,...a}=e,o=wM(cN,n),s=BM(cN,n),c=oN(cN,n),l=EM(cN,n),[u,d]=b.useState(null),f=L(t,e=>d(e),c.onItemTextChange,e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=u?.textContent,m=b.useMemo(()=>(0,z.jsx)(`option`,{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:g}=l;return Me(()=>(h(m),()=>g(m)),[h,g,m]),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(U.span,{id:c.textId,...a,ref:f}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren?P.createPortal(a.children,o.valueNode):null]})});lN.displayName=cN;var uN=`SelectItemIndicator`,dN=b.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e;return oN(uN,n).isSelected?(0,z.jsx)(U.span,{"aria-hidden":!0,...r,ref:t}):null});dN.displayName=uN;var fN=`SelectScrollUpButton`,pN=b.forwardRef((e,t)=>{let n=BM(fN,e.__scopeSelect),r=YM(fN,e.__scopeSelect),[i,a]=b.useState(!1),o=L(t,r.onScrollButtonChange);return Me(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,z.jsx)(gN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null});pN.displayName=fN;var mN=`SelectScrollDownButton`,hN=b.forwardRef((e,t)=>{let n=BM(mN,e.__scopeSelect),r=YM(mN,e.__scopeSelect),[i,a]=b.useState(!1),o=L(t,r.onScrollButtonChange);return Me(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)},t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,z.jsx)(gN,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null});hN.displayName=mN;var gN=b.forwardRef((e,t)=>{let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=BM(`SelectScrollButton`,n),o=b.useRef(null),s=vM(n),c=b.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return b.useEffect(()=>()=>c(),[c]),Me(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,z.jsx)(U.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:F(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:F(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:F(i.onPointerLeave,()=>{c()})})}),_N=`SelectSeparator`,vN=b.forwardRef((e,t)=>
104{let{__scopeSelect:n,...r}=e;return(0,z.jsx)(U.div,{"aria-hidden":!0,...r,ref:t})});vN.displayName=_N;var yN=`SelectArrow`,bN=b.forwardRef((e,t)=>{let{__scopeSelect:n,...r}=e,i=SM(n),a=wM(yN,n),o=BM(yN,n);return a.open&&o.position===`popper`?(0,z.jsx)(UA,{...i,...r,ref:t}):null});bN.displayName=yN;var xN=`SelectBubbleInput`,SN=b.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{let i=b.useRef(null),a=L(r,i),o=nD(t);return b.useEffect(()=>{let e=i.current;if(!e)return;let n=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(n,`value`).set;if(o!==t&&r){let n=new Event(`change`,{bubbles:!0});r.call(e,t),e.dispatchEvent(n)}},[o,t]),(0,z.jsx)(U.select,{...n,style:{...We,...n.style},ref:a,defaultValue:t})});SN.displayName=xN;function CN(e){return e===``||e===void 0}function wN(e){let t=he(e),n=b.useRef(``),r=b.useRef(0),i=b.useCallback(e=>{let i=n.current+e;t(i),(function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))})(i)},[t]),a=b.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return b.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}function TN(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=EN(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function EN(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var DN=DM,ON=kM,kN=jM,AN=NM,jN=FM,MN=LM,NN=ZM,PN=rN,FN=sN,IN=lN,LN=dN,RN=pN,zN=hN,BN=vN,VN=DN,HN=kN,UN=b.forwardRef(({className:e,children:t,...n},r)=>(0,z.jsxs)(ON,{ref:r,className:K(`flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1`,e),...n,children:[t,(0,z.jsx)(AN,{asChild:!0,children:(0,z.jsx)(cn,{className:`h-4 w-4 opacity-50`})})]}));UN.displayName=ON.displayName;var WN=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(RN,{ref:n,className:K(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,z.jsx)(dn,{className:`h-4 w-4`})}));WN.displayName=RN.displayName;var GN=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(zN,{ref:n,className:K(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,z.jsx)(cn,{className:`h-4 w-4`})}));GN.displayName=zN.displayName;var KN=b.forwardRef(({className:e,children:t,position:n=`popper`,...r},i)=>(0,z.jsx)(jN,{children:(0,z.jsxs)(MN,{ref:i,className:K(`relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,n===`popper`&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,...r,children:[(0,z.jsx)(WN,{}),(0,z.jsx)(NN,{className:K(`p-1`,n===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]`),children:t}),(0,z.jsx)(GN,{})]})}));KN.displayName=MN.displayName;var qN=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(PN,{ref:n,className:K(`px-2 py-1.5 text-sm font-semibold`,e),...t}));qN.displayName=PN.displayName;var JN=b.forwardRef(({className:e,children:t,...n},r)=>(0,z.jsxs)(FN,{ref:r,className:K(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[(0,z.jsx)(`span`,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:(0,z.jsx)(LN,{children:(0,z.jsx)(sn,{className:`h-4 w-4`})})}),(0,z.jsx)(IN,{children:t})]}));JN.displayName=FN.displayName;var YN=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(BN,{ref:n,className:K(`-mx-1 my-1 h-px bg-muted`,e),...t}));YN.displayName=BN.displayName;function XN({field:e,value:t,error:n,onChange:r}){let i=`question-${e.key}`;return(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(Z,{htmlFor:i,className:`text-sm font-medium`,children:[e.label,e.required&&(0,z.jsx)(`span`,{className:`text-destructive ml-0.5`,children:`*`})]}),e.hint&&(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:e.hint}),e.type===`select`?(0,z.jsxs)(VN,{value:t||``,onValueChange:e=>r(e),children:[(0,z.jsx)(UN,{id:i,className:K(`mt-2`,n&&`border-destructive focus:ring-destructive`),children:(0,z.jsx)(HN,{placeholder:e.placeholder||`Please choose an option`})}),(0,z.jsx)(KN,{children:e.options.map(e=>(0,z.jsx)(JN,{value:e,children:e},e))})]}):e.type===`checkbox`?(0,z.jsxs)(`div`,{className:`mt-2 flex items-start gap-2.5`,children:[(0,z.jsx)(bD,{id:i,checked:!!t,onCheckedChange:e=>r(!!e),className:K(`mt-0.5`,n&&`border-destructive`)}),(0,z.jsx)(`label`,{htmlFor:i,className:`text-sm text-muted-foreground leading-snug`,children:e.description})]}):e.type===`textarea`?(0,z.jsx)(AD,{id:i,value:t||``,onChange:e=>r(e.target.value),placeholder:e.placeholder,rows:5,className:K(`mt-2 resize-none`,n&&`border-destructive focus:ring-destructive`)}):(0,z.jsx)($h,{id:i,type:e.type===`date`?`date`:e.type===`email`?`email`:`text`,value:t||``,onChange:e=>r(e.target.value),placeholder:e.placeholder,className:K(`mt-2`,n&&`border-destructive focus:ring-destructive`)}),n&&(0,z.jsx)(`p`,{className:`text-xs text-destructive mt-1.5`,children:n})]})}function ZN({applicationId:e,applicantName:t,documents:n,onUploaded:r,onDeleted:i,error:a,documentTypes:o}){let s=o||TD,[c,l]=(0,b.useState)(``),[u,d]=(0,b.useState)(``),[f,p]=(0,b.useState)(``),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(null),v=(0,b.useRef)(null),y=async e=>{p(``),_(e.id);try{await X.entities.ApplicationDocument.delete(e.id),i(e.id)}catch{p(`We couldn't remove that document â please try again.`)}finally{_(null)}};return(0,z.jsxs)(`div`,{className:`mt-8`,children:[n.length>0&&(0,z.jsx)(`div`,{className:`mb-6 space-y-2`,children:n.map(e=>(0,z.jsxs)(`div`,{className:`flex items-center gap-3 rounded-xl border border-border/70 bg-secondary/40 px-4 py-3`,children:[(0,z.jsx)(mn,{className:`w-4 h-4 text-emerald-600 shrink-0`}),(0,z.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium truncate`,children:e.document_type}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:e.file_name})]}),(0,z.jsx)(`button`,{type:`button`,onClick:()=>y(e),disabled:g===e.id,title:`Remove this document`,"aria-label":`Remove ${e.document_type}`,className:`w-7 h-7 flex items-center justify-center rounded-full text-muted-foreground hover:bg-destructive/10 hover:text-destructive transition-colors disabled:opacity-60`,children:g===e.id?(0,z.jsx)(Ln,{className:`w-4 h-4 animate-spin`}):(0,z.jsx)(lr,{className:`w-4 h-4`})})]},e.id))}),(0,z.jsx)(Z,{className:`text-sm font-medium`,children:`Which document are you uploading?`}),(0,z.jsxs)(VN,{value:c,onValueChange:e=>{l(e),d(``)},children:[(0,z.jsx)(UN,{className:`mt-2`,children:(0,z.jsx)(HN,{placeholder:`Select the document type`})}),(0,z.jsx)(KN,{children:s.map(e=>(0,z.jsx)(JN,{value:e,children:e},e))})]}),u&&(0,z.jsx)(`p`,{className:`text-xs text-destructive mt-1.5`,children:u}),(0,z.jsxs)(`button`,{type:`button`,onClick:()=>v.current&&v.current.click(),disabled:m,className:`mt-4 w-full rounded-xl border-2 border-dashed border-border hover:border-primary/60 hover:bg-primary/5 transition-colors py-8 flex flex-col items-center gap-2 text-muted-foreground disabled:opacity-60`,children:[m?(0,z.jsx)(Ln,{className:`w-6 h-6 animate-spin`}):(0,z.jsx)(ir,{className:`w-6 h-6`}),(0,z.jsx)(`span`,{className:`text-sm`,children:m?`Uploadingâ¦`:`Click to choose a file to upload`}),(0,z.jsx)(`span`,{className:`text-xs`,children:`PDF, images or documents â up to 20MB`})]}),(0,z.jsx)(`input`,{ref:v,type:`file`,className:`hidden`,onChange:async n=>{let i=n.target.files&&n.target.files[0];if(n.target.value=``,i){if(!c){d(`Please select which document you are uploading first`);return}if(i.size>20971520){p(`Files must be 20MB or smaller`);return}d(``),p(``),h(!0);try{let{file_url:n}=await X.integrations.Core.UploadPublicFile({file:i});r({id:(await X.entities.ApplicationDocument.create({application_id:e,document_type:c,file_url:n,file_name:i.name,uploaded_by:t||``})).id,document_type:c,file_url:n,file_name:i.name}),l(``)}catch{p(`Upload failed â please try again.`)}finally{h(!1)}}}}),f&&(0,z.jsx)(`p`,{className:`text-xs text-destructive mt-1.5`,children:f}),a&&(0,z.jsx)(`p`,{className:`text-xs text-destructive mt-1.5`,children:a})]})}function QN({form:e,documents:t}){let n=ED.filter(e=>e.fields&&!e.custom),r=ED.find(e=>e.custom===`documents`);return(0,z.jsxs)(`div`,{className:`mt-8 space-y-8`,children:[n.map(t=>(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`h3`,{className:`font-display text-base mb-3`,children:[t.id,`. `,t.title]}),(0,z.jsx)(`dl`,{className:`space-y-2`,children:t.fields.map(t=>(0,z.jsxs)(`div`,{className:`grid sm:grid-cols-[220px_1fr] gap-1 sm:gap-4 text-sm`,children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:t.label}),(0,z.jsx)(`dd`,{className:`font-medium whitespace-pre-wrap break-words`,children:e[t.key]||`â`})]},t.key))})]},t.id)),(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`h3`,{className:`font-display text-base mb-3`,children:[r.id,`. `,r.title]}),t.length===0?(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No documents uploaded.`}):(0,z.jsx)(`ul`,{className:`space-y-2`,children:t.map(e=>(0,z.jsxs)(`li`,{className:`flex items-center gap-2 text-sm`,children:[(0,z.jsx)(En,{className:`w-4 h-4 text-muted-foreground shrink-0`}),(0,z.jsx)(`span`,{className:`font-medium`,children:e.document_type}),(0,z.jsxs)(`span`,{className:`text-muted-foreground truncate`,children:[`â `,e.file_name]})]},e.id))})]})]})}function $N({reference:e,email:t,applicationType:n}){let r=n===`funding`,i=(e||``).slice(0,8).toUpperCase();return(0,z.jsx)(`div`,{className:`min-h-screen bg-background flex items-center justify-center px-6 py-16`,children:(0,z.jsxs)(`div`,{className:`max-w-lg w-full text-center`,children:[(0,z.jsx)(`div`,{className:`w-16 h-16 rounded-full bg-emerald-100 dark:bg-emerald-950 flex items-center justify-center mx-auto`,children:(0,z.jsx)(mn,{className:`w-8 h-8 text-emerald-600`})}),(0,z.jsxs)(`div`,{className:`flex items-center justify-center gap-2 mt-6 text-primary`,children:[(0,z.jsx)(fn,{className:`w-4 h-4`}),(0,z.jsx)(`span`,{className:`text-xs uppercase tracking-widest font-medium`,children:`Diocese of Edinburgh`})]}),(0,z.jsx)(`h1`,{className:`font-display text-3xl mt-2`,children:`Application submitted`}),(0,z.jsxs)(`p`,{className:`text-muted-foreground mt-3 text-sm sm:text-base`,children:[`Thank y
104ou`,t?`, ${t}`:``,`. Your `,r?`funding application`:`Canon 35 application`,` has been received and the Diocesan Buildings Committee has been notified.`]}),i&&(0,z.jsxs)(`div`,{className:`mt-6 inline-flex flex-col items-center gap-1 bg-card border border-border/70 rounded-xl px-6 py-4`,children:[(0,z.jsx)(`span`,{className:`text-xs uppercase tracking-widest text-muted-foreground`,children:`Your reference`}),(0,z.jsx)(`span`,{className:`font-mono text-lg font-semibold`,children:i})]}),(0,z.jsxs)(`ul`,{className:`mt-10 text-left space-y-3 text-sm text-muted-foreground bg-card border border-border/70 rounded-2xl p-6`,children:[(0,z.jsx)(`li`,{children:`The Diocesan Buildings Committee will review your submission and be in touch.`}),(0,z.jsx)(`li`,{children:`If anything further is needed, the committee will tell you exactly what â no more, no less.`}),(0,z.jsx)(`li`,{children:`Please keep your reference handy for any correspondence about this application.`})]})]})})}var eP={applicant_name:``,applicant_role:``,email:``,phone:``,church_name:``,charge:``,local_authority_area:``,property_type:``,listed_status:``,conservation_area:``,designation_area:``,project_title:``,works_category:``,estimated_cost:``,works_description:``,funding_sources:``,mission_link:``,congregation_consultation_date:``,hes_consultation_date:``,planning_authority_consultation_date:``,planning_consent_date:``,other_bodies_consulted:``,consultation_responses:``,signature_name:``},tP=`canon35_application`;function nP(){let[e,t]=(0,b.useState)(1),[n,r]=(0,b.useState)(eP),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)([]),[c,l]=(0,b.useState)({}),[u,d]=(0,b.useState)(``),[f,p]=(0,b.useState)(!1),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(!1),v=async e=>{r({...eP,...Object.fromEntries(Object.keys(eP).map(t=>[t,e[t]||``]))}),t(Math.min(e.current_step||1,ED.length)),a(e.id);let n=await X.entities.ApplicationDocument.filter({application_id:e.id});s(n.map(e=>({id:e.id,document_type:e.document_type,file_url:e.file_url,file_name:e.file_name}))),y(e.id,Math.min(e.current_step||1,ED.length),{...eP,...Object.fromEntries(Object.keys(eP).map(t=>[t,e[t]||``]))},n.map(e=>({id:e.id,document_type:e.document_type,file_url:e.file_url,file_name:e.file_name})))};(0,b.useEffect)(()=>{let e=null;try{e=JSON.parse(localStorage.getItem(tP)||`null`)}catch{localStorage.removeItem(tP)}(async()=>{try{let t=await X.auth.me(),n=(await X.entities.Application.filter({created_by_id:t.id,status:`in_progress`},`-updated_date`,1))[0];if(n&&(!e||e.applicationId!==n.id)){await v(n);return}}catch{}e&&e.applicationId&&(r({...eP,...e.form||{}}),t(Math.min(e.step||1,ED.length)),a(e.applicationId),s(e.documents||[]))})()},[]);let y=(e,t,n,r)=>{e&&localStorage.setItem(tP,JSON.stringify({applicationId:e,step:t,form:n,documents:r}))},x=(t,a)=>{let s={...n,[t]:a};r(s),y(i,e,s,o),l(e=>({...e,[t]:null}))},S=async(e,t,r)=>{try{await X.functions.invoke(`notifyApplicationUpdate`,{church_name:n.church_name,applicant_name:n.applicant_name,step_label:t,detail:r,reference:e})}catch{}},C=e=>(e.fields||[]).map(e=>`${e.label}: ${n[e.key]||`â`}`).join(` 105`),w=async()=>{d(``);let r=ED.find(t=>t.id===e),s={};if((r.fields||[]).forEach(e=>{e.required&&!String(n[e.key]||``).trim()&&(s[e.key]=`This answer is required to continue`)}),r.custom===`documents`&&o.length===0&&(s.documents=`Please upload at least one document to continue`),l(s),Object.keys(s).length>0){d(`Please complete the highlighted questions to continue.`);return}p(!0);try{if(e===1){let e=await X.entities.Application.create({...n,current_step:2,status:`in_progress`});a(e.id),y(e.id,2,n,o),await S(e.id,`Step 1 of ${ED.length} â Your details completed`,C(r)),t(2)}else await X.entities.Application.update(i,{...n,current_step:e+1}),y(i,e+1,n,o),r.fields&&await S(i,`Step ${e} of ${ED.length} â ${r.title} completed`,C(r)),t(e+1)}catch{d(`We couldn't save your progress. Please check your connection and try again.`)}finally{p(!1)}},T=()=>{d(``),l({});let r=Math.max(1,e-1);t(r),y(i,r,n,o)},E=t=>{let r=[...o,t];s(r),y(i,e,n,r),l(e=>({...e,documents:null})),S(i,`Document uploaded â ${t.document_type}`,`File: ${t.file_name}`)},D=t=>{let r=o.filter(e=>e.id!==t);s(r),y(i,e,n,r)},O=async()=>
105{if(!String(n.signature_name||``).trim()){l({signature_name:`Please type your name to sign the application`}),d(`Please complete the highlighted questions to continue.`);return}if(g){p(!0),d(``);try{await X.entities.Application.update(i,{status:`submitted`,submitted_at:new Date().toISOString(),current_step:ED.length,signature_name:n.signature_name}),await S(i,`Application submitted`,`Project: ${n.project_title}\n\n${n.works_description}`),localStorage.removeItem(tP),h(!0)}catch{d(`We couldn't submit your application. Please try again.`)}finally{p(!1)}}};if(m)return(0,z.jsx)($N,{reference:i,email:n.email});let k=ED.find(t=>t.id===e);return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,z.jsx)(`header`,{className:`pt-safe border-b border-border/60 bg-card/80 backdrop-blur-sm sticky top-0 z-10`,children:(0,z.jsxs)(`div`,{className:`max-w-3xl mx-auto px-6 py-4 flex items-center gap-3`,children:[(0,z.jsx)(`div`,{className:`w-9 h-9 rounded-full bg-primary text-primary-foreground flex items-center justify-center shrink-0`,children:(0,z.jsx)(fn,{className:`w-4 h-4`})}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-display text-lg leading-tight`,children:`Diocese of Edinburgh`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:`Canon 35 consent â church & rectory applications`})]})]})}),(0,z.jsxs)(`main`,{className:`max-w-3xl mx-auto px-6 py-10 pb-24`,children:[(0,z.jsx)(kD,{currentStep:e}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-4 text-center`,children:`Your progress saves automatically â you can return to this page on this device to pick up where you left off.`}),(0,z.jsx)(y_,{mode:`wait`,children:(0,z.jsx)(tD.div,{initial:{opacity:0,x:24},animate:{opacity:1,x:0},exit:{opacity:0,x:-24},transition:{duration:.25},children:(0,z.jsxs)(`div`,{className:`mt-8 bg-card border border-border/70 rounded-2xl shadow-sm p-6 sm:p-10`,children:[(0,z.jsx)(`h1`,{className:`font-display text-2xl sm:text-3xl`,children:k.title}),(0,z.jsx)(`p`,{className:`text-muted-foreground text-sm sm:text-base mt-2`,children:k.intro}),k.custom===`review`&&(0,z.jsx)(QN,{form:n,documents:o}),k.fields&&(0,z.jsx)(`div`,{className:`mt-8 space-y-6`,children:k.fields.map(e=>(0,z.jsx)(XN,{field:e,value:n[e.key],error:c[e.key],onChange:t=>x(e.key,t)},e.key))}),k.custom===`documents`&&(0,z.jsx)(ZN,{applicationId:i,applicantName:n.applicant_name,documents:o,onUploaded:E,onDeleted:D,error:c.documents}),k.custom===`review`&&(0,z.jsxs)(`div`,{className:`mt-8 flex items-start gap-3 rounded-xl border border-border p-4 bg-secondary/30`,children:[(0,z.jsx)(bD,{id:`confirm-accurate`,checked:g,onCheckedChange:e=>_(e===!0)}),(0,z.jsx)(`label`,{htmlFor:`confirm-accurate`,className:`text-sm text-muted-foreground leading-snug`,children:`I confirm the information provided is accurate and complete to the best of my knowledge.`})]}),u&&(0,z.jsxs)(`div`,{className:`mt-6 flex items-center gap-2 text-sm text-destructive`,children:[(0,z.jsx)(pn,{className:`w-4 h-4 shrink-0`}),u]})]})},e)}),(0,z.jsxs)(`div`,{className:`mt-8 flex items-center justify-between`,children:[e>1?(0,z.jsxs)(Qh,{variant:`ghost`,onClick:T,disabled:f,children:[(0,z.jsx)(Qt,{className:`w-4 h-4 mr-2`}),` Back`]}):(0,z.jsx)(`span`,{}),e<ED.length?(0,z.jsxs)(Qh,{onClick:w,disabled:f,className:`font-semibold`,children:[f&&(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Continue`,(0,z.jsx)($t,{className:`w-4 h-4 ml-2`})]}):(0,z.jsxs)(Qh,{onClick:O,disabled:f||!g,className:`font-semibold`,children:[f&&(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Submit application`]})]})]})]})}function rP({items:e}){return e?(0,z.jsxs)(`div`,{className:`mt-6 rounded-xl border border-border/70 bg-secondary/40 p-4`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium`,children:`Recommended first steps`}),(0,z.jsx)(`ul`,{className:`mt-2 space-y-1.5`,children:e.map(e=>(0,z.jsxs)(`li`,{className:`text-sm text-muted-foreground flex gap-2`,children:[(0,z.jsx)(mn,{className:`w-4 h-4 text-primary shrink-0 mt-0.5`}),(0,z.jsx)(`span`,{children:e})]},e))})]}):null}var iP=[`Edinburgh`,`Aberdeen & Orkney`,`Argyll & The Isles`,`Brechin`,`Glasgow & Galloway`,`Moray, Ross & Caithness`,`St Andrews, Dunkeld & Dunblane`],aP=[`Church`,`Hall`,`Other`],oP=[`Grade A`,`Grade B`,`Grade C`,`Not listed / NA`],sP=[`A`,`B`,`C`,`D`,`E`,`F`,`G`,`Not applicable`],cP=[`Yes`,`No`],lP=[`Not yet started`,`Started`,`Completed`],uP=[`LPW scheme has been considered and does not apply in this case`,`LPW scheme does apply and VAT c
105osts shown are net of LPW grants`],dP=[`02 â Application form: Canon 35 (as a separate attachment)`,`02b â Net Zero confirmation of support`,`03 â Photos`,`04 â Quote from contractor (upload one file per contractor)`,`05 â Quinquennial report, including photos`,`06a â Accounts â most recent year`,`06b â Accounts â previous year`,`Other supporting document`];function fP(e,t){try{return(typeof e==`string`?JSON.parse(e):e)??t}catch{return t}}var pP=[{id:1,title:`Charge & request`,intro:`This is the Provincial Building Grants Fund and Building Loans Fund application for works to church buildings (other than rectories and housing). Take it one step at a time â your answers save automatically.`,guidance:[`Agree your plans with the Vestry and confirm their support.`,`Let the Diocese know you are considering taking a project forward â ideally with as much information as you can: the what, why, likely costs and when.`,`Get in touch with the Diocese and the Provincial Net Zero team about potential funding options.`,`Explore those options, then work through the steps below.`,`Tip: the St Andrews Fund can cover Quinquennial Inspection costs, urgent works and professional fees â always worth getting as much funding in as possible.`],custom:`request`,customPosition:`between`,fieldsBefore:[{key:`charge`,label:`Charge(s)`,type:`text`,required:!0,placeholder:`e.g. St Mary's, Haddington`},{key:`linked_with`,label:`Linked with`,type:`text`,required:!1,placeholder:`If part of a linked charge, name the others`},{key:`diocese`,label:`Diocese`,type:`select`,required:!0,options:iP}],fields:[{key:`status_of_works`,label:`Status of works`,type:`select`,required:!0,options:lP},{key:`rector_name`,label:`Rector / Priest in Charge â print name`,type:`text`,required:!0,placeholder:`e.g. Rev. Sarah Mitchell`},{key:`secretary_treasurer_name`,label:`Secretary / Treasurer â print name`,type:`text`,required:!0,placeholder:`e.g. John Robertson`}]},{id:2,title:`Principal contact`,intro:`Who should we contact with any questions about this application?`,fields:[{key:`contact_name`,label:`Name`,type:`text`,required:!0},{key:`contact_position`,label:`Position`,type:`text`,required:!1,placeholder:`e.g. Vestry Treasurer`},{key:`contact_email`,label:`Email address`,type:`email`,required:!0},{key:`contact_phone`,label:`Contact telephone number`,type:`text`,required:!1}]},{id:3,title:`The building`,intro:`Tell us about the building the works relate to. If the application covers more than one building, include details for all of them in the address field.`,fields:[{key:`building_address`,label:`Address of building`,type:`textarea`,required:!0,placeholder:`Full address, including postcode`},{key:`building_type`,label:`Type of building`,type:`select`,required:!0,options:aP},{key:`building_type_other`,label:`If "Other", please specify`,type:`text`,required:!1},{key:`listing`,label:`Listing`,type:`select`,required:!0,options:oP},{key:`conservation_area`,label:`Is it in a conservation area?`,type:`select`,required:!0,options:cP},{key:`year_built`,label:`Year built (if known)`,type:`text`,required:!1},{key:`architect`,label:`Architect (if known)`,type:`text`,required:!1}]},{id:4,title:`Building use`,intro:`How is the building used? This helps the committee understand the impact of the proposed works.`,fields:[{key:`services_frequency`,label:`How often is the building used for church services?`,type:`text`,required:!0,placeholder:`e.g. Two services each Sunday`},{key:`other_activities`,label:`Is the building used for church activities other than services?`,type:`select`,required:!0,options:cP},{key:`other_activities_details`,label:`If yes, please give more information, including frequency`,type:`textarea`,required:!1},{key:`other_groups`,label:`Please provide details of other groups using the building`,type:`textarea`,required:!1}]},{id:5,title:`Net Zero & EPC`,intro:`If any part of the works relates to heating, insulation or energy efficiency, a member of the Provincial Net Zero Team must be consulted as part of the Diocesan approval process.`,fields:[{key:`net_zero_works`,label:`Do any of the proposed works relate to energy efficie
105ncy or other ânet-zeroâ type works?`,type:`select`,required:!0,options:cP,hint:`If yes, please consult a member of the Provincial Net Zero Team and attach relevant energy audits in the documents step.`},{key:`epc_exists`,label:`Are there Energy Performance Certificates for the building(s)?`,type:`select`,required:!0,options:cP},{key:`epc_rating`,label:`EPC rating`,type:`select`,required:!1,options:sP,hint:`Please attach the EPC in the documents step.`},{key:`improve_epc`,label:`Are the works designed to improve the EPC rating?`,type:`select`,required:!1,options:cP},{key:`epc_consistent`,label:`If yes, are the works consistent with those recommended on the EPC?`,type:`select`,required:!1,options:cP},{key:`epc_difference`,label:`If not, please explain the differences`,type:`textarea`,required:!1}]},{id:6,title:`Quinquennial inspection`,intro:`Quinquennial Inspection reports help confirm the building is being properly maintained. Please attach the latest report in the documents step.`,fields:[{key:`quinquennial_date`,label:`Date of last Quinquennial Inspection`,type:`date`,required:!0},{key:`quinquennial_overdue_explanation`,label:`If the inspection is overdue, please explain`,type:`textarea`,required:!1},{key:`all_buildings_covered`,label:`Are all church-owned buildings covered by the Quinquennial Inspection?`,type:`select`,required:!0,options:cP},{key:`excluded_properties`,label:`If no, please give details of excluded properties and reasons`,type:`textarea`,required:!1}]},{id:7,title:`The works`,intro:`Describe the works and how they will be supervised. Photos, sketches and drawings can be uploaded in the documents step.`,fields:[{key:`works_summary`,label:`Summary of the works`,type:`textarea`,required:!0,hint:`If the works form part of a larger phased scheme, describe the whole scheme.`},{key:`supervision_details`,label:`Supervision of the works`,type:`textarea`,required:!0,hint:`Professionals responsible (architect/surveyor) and how CDM Regulations responsibilities will be addressed.`}]},{id:8,title:`Missional impact`,intro:`How do the proposed works support the chargeâs mission?`,fields:[{key:`five_year_plan`,label:`Has the charge prepared a recent five-year plan detailing its mission strategy and viability (Canon 13(1))?`,type:`select`,required:!0,options:cP},{key:`diocese_approved_plan`,label:`Has the Diocese approved the plan and confirmed willingness to support it?`,type:`select`,required:!0,options:cP},{key:`continued_use_integral`,label:`Is the continued use of the building an integral part of the chargeâs plan?`,type:`select`,required:!0,options:cP},{key:`mission_contribution`,label:`How do the proposed works contribute to the chargeâs mission?`,type:`textarea`,required:!0}]},{id:9,title:`Costs`,intro:`Provide up to three estimates. Totals are calculated automatically. Please attach detailed costings and estimates in the documents step.`,custom:`costs`,fields:[{key:`which_estimate`,label:`Which estimate do you propose to accept?`,type:`select`,required:!0,options:[`Estimate 1`,`Estimate 2`,`Estimate 3`]},{key:`lpw_status`,label:`Listed Places of Worship (LPW) Grant Scheme`,type:`select`,required:!0,options:uP,hint:`The LPW scheme can pay VAT on eligible works. See www.lpwscheme.org.uk.`}]},{id:10,title:`Proposed funding`,intro:`Set out all the funding for the works â your own resources, diocesan support, other grants (awarded and anticipated), and the General Synod funding you are requesting. Totals are calculated automatically.`,custom:`funding_sources`},{id:11,title:`Fundraising`,intro:`Tell us about the congregationâs fundraising and stewardship, and what happens if the Provincial grant or loan is not awarded.`,fields:[{key:`fundraising_stewardship`,label:`Fundraising and stewardship`,type:`textarea`,required:!0,hint:`Include the congregationâs general approach and any fundraising specifically for these works. Mention any grant applications rejected.`},{key:`impact_if_rejected`,label:`If the requested grant and/or loan is not awarded, what will be the impact on the proposed works?`,type:`textarea`,required:!0}]},{id:12,title:`Congregation`,intro:`A picture of the congregationâs financial resources. Most of this can be taken from your annual accounts.`,custom:`congregational`,fields:[{key:`priest_name`,label:`Priest (Rev â¦)`,type:`text`,required:!1},{key:`priest_full_part`,label:`Full-time / Part-time`,type:`select`,required:!1,options:[`Full time`,`Part-Time`]},{key:`priest_stipendiary`,label:`Stipendiary / Non-stipendiary`,type:`select`,required:!1,options:[`Stipendiary`,`Non-stipendiary`]},{key:`other_liabilities`,label:`Any other significant liabilities or commitments (e.g. existing loans)`,type:`textarea`,required:!1}]},{id:13,title:`Documents`,intro:`Upload each supporting document, choosing its index reference (02â06) so your bundle is indexed the same way the Diocese files it. The PBG application form itself is generated from your answers here, and the Diocese drafts the Letter of Support (01) from the information you provide â you do not need to upload either.`,custom:`documents`},{id:14,title:`Review & submit`,intro:`Nearly there. Check your answers below, then sign and submit. The Diocesan Buildings Committee will be notified, and your application will be forwarded to the General Synod Office once the Diocese has authorised it.`,custom:`review`,fields:[{key:`signature_name`,label:`Signature of Rector / Priest in Charge`,type:`text`,required:!0,hint:`Type your full name to sign the application electronically. The date is recorded automatically when you submit.`}]}];function mP({label:e,nz:t,other:n,onNz:r,onOther:i}){let a=Number(t||0)+Number(n||0);return(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-secondary/20`,children:[(0,z.jsx)(Z,{className:`text-sm font-medium`,children:e}),(0,z.jsxs)(`div`,{className:`mt-3 grid grid-cols-1 sm:grid-cols-3 gap-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Net Zero £`}),(0,z.jsx)($h,{type:`number`,min:`0`,value:t,onChange:e=>r(e.target.value),placeholder:`0`,className:`mt-1`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Other £`}),(0,z.jsx)($h,{type:`number`,min:`0`,value:n,onChange:e=>i(e.target.value),placeholder:`0`,className:`mt-1`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Total £`}
105),(0,z.jsx)($h,{value:a.toLocaleString(`en-GB`),readOnly:!0,className:`mt-1 bg-muted/40 font-medium`})]})]})]})}function hP({form:e,setField:t}){return(0,z.jsxs)(`div`,{className:`space-y-4`,children:[(0,z.jsx)(mP,{label:`Grant requested from the Building Grants Fund (up to)`,nz:e.grant_nz,other:e.grant_other,onNz:e=>t(`grant_nz`,e),onOther:e=>t(`grant_other`,e)}),(0,z.jsx)(mP,{label:`Loan requested from the Building Loans Fund (up to)`,nz:e.loan_nz,other:e.loan_other,onNz:e=>t(`loan_nz`,e),onOther:e=>t(`loan_other`,e)})]})}var gP=Array.from({length:3},()=>({contractor:``,project_nz:``,project_other:``,fees_nz:``,fees_other:``,vat:``}));function _P({value:e,onChange:t}){let n=fP(e,null)||gP,r=(e,r,i)=>{let a=n.map((t,n)=>n===e?{...t,[r]:i}:t);t(JSON.stringify(a))};return(0,z.jsx)(`div`,{className:`space-y-4`,children:n.map((e,t)=>{let n=Number(e.project_nz||0)+Number(e.project_other||0)+Number(e.fees_nz||0)+Number(e.fees_other||0)+Number(e.vat||0);return(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-secondary/20`,children:[(0,z.jsxs)(`p`,{className:`text-sm font-medium mb-3`,children:[`Estimate `,t+1]}),(0,z.jsx)($h,{value:e.contractor,onChange:e=>r(t,`contractor`,e.target.value),placeholder:`Name of contractor`,className:`mb-3`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-3`,children:[(0,z.jsx)(vP,{label:`Project costs â Net Zero £`,value:e.project_nz,onChange:e=>r(t,`project_nz`,e)}),(0,z.jsx)(vP,{label:`Project costs â Other £`,value:e.project_other,onChange:e=>r(t,`project_other`,e)}),(0,z.jsx)(vP,{label:`Professional fees â Net Zero £`,value:e.fees_nz,onChange:e=>r(t,`fees_nz`,e)}),(0,z.jsx)(vP,{label:`Professional fees â Other £`,value:e.fees_other,onChange:e=>r(t,`fees_other`,e)}),(0,z.jsx)(vP,{label:`VAT £`,value:e.vat,onChange:e=>r(t,`vat`,e)}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Total £`}),(0,z.jsx)($h,{value:n.toLocaleString(`en-GB`),readOnly:!0,className:`mt-1 bg-muted/40 font-medium`})]})]})]},t)})})}function vP({label:e,value:t,onChange:n}){return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,z.jsx)($h,{type:`number`,min:`0`,value:t,onChange:e=>n(e.target.value),placeholder:`0`,className:`mt-1`})]})}function yP({title:e,value:t,onChange:n,rows:r}){let i=fP(t,null)||Array.from({length:r},()=>({source:``,nz:``,other:``})),a=(e,t,r)=>{let a=i.map((n,i)=>i===e?{...n,[t]:r}:n);n(JSON.stringify(a))};return(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-secondary/20`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium mb-3`,children:e}),i.map((e,t)=>{let n=Number(e.nz||0)+Number(e.other||0);return(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-4 gap-3 mb-3 last:mb-0`,children:[(0,z.jsx)($h,{value:e.source,onChange:e=>a(t,`source`,e.target.value),placeholder:`Source`}),(0,z.jsx)(bP,{label:`Net Zero £`,value:e.nz,onChange:e=>a(t,`nz`,e)}),(0,z.jsx)(bP,{label:`Other £`,value:e.other,onChange:e=>a(t,`other`,e)}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Total £`}),(0,z.jsx)($h,{value:n.toLocaleString(`en-GB`),readOnly:!0,className:`mt-1 bg-muted/40 font-medium`})]})]},t)})]})}function bP({label:e,value:t,onChange:n}){return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,z.jsx)($h,{type:`number`,min:`0`,value:t,onChange:e=>n(e.target.value),placeholder:`0`,className:`mt-1`})]})}function xP({form:e,setField:t}){return(0,z.jsxs)(`div`,{className:`space-y-4`,children:[(0,z.jsx)(yP,{title:`a) Own resources (reserves and fundraising)`,value:e.funding_own,onChange:e=>t(`funding_own`,e),rows:4}),(0,z.jsx)(yP,{title:`b) Diocesan grants and loans`,value:e.funding_diocesan,onChange:e=>t(`funding_diocesan`,e),rows:2}),(0,z.jsx)(yP,{title:`c) Other grants and loans awarded`,value:e.funding_awarded,onChange:e=>t(`funding_awarded`,e),rows:4}),(0,z.jsx)(yP,{title:`d) Other grants and loans anticipated`,value:e.funding_anticipated,onChange:e=>t(`funding_anticipated`,e),rows:4}),(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-primary/5`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium mb-3`,children:`e) General Synod funding requested`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3`,children:[(0,z.jsx)(bP,{label:`Building Grants Fund £`,value:e.gs_grant,onChange:e=>t(`gs_grant`,e)}),(0,z.jsx)(bP,{label:`Building Loans Fund £`,value:e.gs_loan,onChange:e=>t(`gs_loan`,e)})]})]})]})}function SP(e,t,n){let r=fP(e,null);return Array.isArray(r)&&r.length===t?r:Array.from({length:t},()=>n.reduce((e,t)=>
105({...e,[t]:``}),{}))}function CP({label:e,value:t,onChange:n,type:r=`text`}){return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,z.jsx)($h,{type:r,min:`0`,value:t,onChange:e=>n(e.target.value),placeholder:r===`number`?`0`:``,className:`mt-1`})]})}function wP({form:e,setField:t}){let n=SP(e.attendance_income,3,[`year`,`attendance`,`giving`,`investment`,`endowment`,`other`]),r=SP(e.investments,3,[`name`,`book`,`market`]),i=SP(e.bank_accounts,3,[`name`,`val1`,`val2`]),a=SP(e.restricted_funds,5,[`name`,`detail`]),o=(e,n,r,i,a)=>{let o=n.map((e,t)=>t===r?{...e,[i]:a}:e);t(e,JSON.stringify(o))};return(0,z.jsxs)(`div`,{className:`space-y-5`,children:[(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-secondary/20`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium mb-3`,children:`a) Attendance and income â last three financial years (most recent first)`}),n.map((e,t)=>{let r=Number(e.giving||0)+Number(e.investment||0)+Number(e.endowment||0)+Number(e.other||0);return(0,z.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-7 gap-2 mb-3 last:mb-0`,children:[(0,z.jsx)(CP,{label:`Year`,value:e.year,onChange:e=>o(`attendance_income`,n,t,`year`,e)}),(0,z.jsx)(CP,{label:`Avg Sunday attendance`,value:e.attendance,onChange:e=>o(`attendance_income`,n,t,`attendance`,e)}),(0,z.jsx)(CP,{label:`Giving £`,value:e.giving,onChange:e=>o(`attendance_income`,n,t,`giving`,e),type:`number`}),(0,z.jsx)(CP,{label:`Investment £`,value:e.investment,onChange:e=>o(`attendance_income`,n,t,`investment`,e),type:`number`}),(0,z.jsx)(CP,{label:`Endowment £`,value:e.endowment,onChange:e=>o(`attendance_income`,n,t,`endowment`,e),type:`number`}),(0,z.jsx)(CP,{label:`Other £`,value:e.other,onChange:e=>o(`attendance_income`,n,t,`other`,e),type:`number`}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Total £`}),(0,z.jsx)($h,{value:r.toLocaleString(`en-GB`),readOnly:!0,className:`mt-1 bg-muted/40 font-medium`})]})]},t)})]}),(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-secondary/20`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium mb-3`,children:`b) Investments held (totals only, excluding bank balances)`}),r.map((e,t)=>(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-2 mb-3 last:mb-0`,children:[(0,z.jsx)(CP,{label:`Name of investment`,value:e.name,onChange:e=>o(`investments`,r,t,`name`,e)}),(0,z.jsx)(CP,{label:`Book value £`,value:e.book,onChange:e=>o(`investments`,r,t,`book`,e),type:`number`}),(0,z.jsx)(CP,{label:`Market value £`,value:e.market,onChange:e=>o(`investments`,r,t,`market`,e),type:`number`})]},t))]}),(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-secondary/20`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium mb-3`,children:`c) Bank balances and deposits held`}),i.map((e,t)=>(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-2 mb-3 last:mb-0`,children:[(0,z.jsx)(CP,{label:`Bank name / account`,value:e.name,onChange:e=>o(`bank_accounts`,i,t,`name`,e)}),(0,z.jsx)(CP,{label:`Balance £`,value:e.val1,onChange:e=>o(`bank_accounts`,i,t,`val1`,e),type:`number`}),(0,z.jsx)(CP,{label:`Balance £`,value:e.val2,onChange:e=>o(`bank_accounts`,i,t,`val2`,e),type:`number`})]},t))]}),(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-secondary/20`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium mb-3`,children:`d) Designated or restricted funds included above`}),a.map((e,t)=>(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-2 mb-3 last:mb-0`,children:[(0,z.jsx)(CP,{label:`Name of fund`,value:e.name,onChange:e=>o(`restricted_funds`,a,t,`name`,e)}),(0,z.jsx)(CP,{label:`Details`,value:e.detail,onChange:e=>o(`restricted_funds`,a,t,`detail`,e)})]},t))]})]})}function TP({form:e,documents:t,steps:n}){let r=(n||pP).filter(e=>e.fieldsBefore||e.fields).flatMap(e=>[...e.fieldsBefore||[],...e.fields||[]]);return(0,z.jsxs)(`div`,{className:`space-y-6`,children:[(0,z.jsx)(`div`,{className:`rounded-xl border border-border/70 divide-y divide-border/60`,children:r.map(t=>(0,z.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:gap-4 px-4 py-3 text-sm`,children:[(0,z.jsx)(`span`,{className:`sm:w-1/2 text-muted-foreground`,children:t.label}),(0,z.jsx)(`span`,{className:`sm:flex-1 font-medium whitespace-pre-wrap`,children:e[t.key]||`â`})]},t.key))}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Cost estimates, the proposed funding breakdown and congregational resources tables are included as entered.`}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`Supporting documents`}),t.length===0?(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No documents uploaded.`}):(0,z.jsx)(`ul`,{className:`space-y-1`,children:t.map(e=>(0,z.jsxs)(`li`,{className:`text-sm flex items-center gap-2`,children:[(0,z.jsx)(mn,{className:`w-4 h-4 text-emerald-600 shrink-0`}),(0,z.jsx)(`span`,{children:e.document_type}),(0,z.jsxs)(`span`,{className:`text-muted-foreground`,children:[`â `,e.file_name]})]},e.id))})]})]})}var EP={charge:``,linked_with:``,diocese:``,grant_nz:``,grant_other:``,loan_nz:``,loan_other:``,status_of_works:``,rector_name:``,secretary_treasurer_name:``,contact_name:``,contact_position:``,contact_email:``,contact_phone:``,building_address:``,building_type:``,building_type_other:``,listing:``,conservation_area:``,year_built:``,architect:``,services_frequency:``,other_activities:``,other_activities_details:``,other_groups:``,net_zero_works:``,epc_exists:``,epc_rating:``,improve_epc:``,epc_consistent:``,epc_difference:``,quinquennial_date:``,quinquennial_overdue_explanation:``,all_buildings_covered:``,excluded_properties:``,works_summary:``,supervision_details:``,five_year_plan:``,diocese_approved_plan:``,continued_use_integral:``,mission_contribution:``,estimates:``,which_estimate:``,lpw_
105status:``,funding_own:``,funding_diocesan:``,funding_awarded:``,funding_anticipated:``,gs_grant:``,gs_loan:``,fundraising_stewardship:``,impact_if_rejected:``,attendance_income:``,priest_name:``,priest_full_part:``,priest_stipendiary:``,investments:``,bank_accounts:``,restricted_funds:``,other_liabilities:``,signature_name:``},DP=`bgc1_application`;function OP(){let[e,t]=(0,b.useState)(1),[n,r]=(0,b.useState)(EP),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)([]),[c,l]=(0,b.useState)({}),[u,d]=(0,b.useState)(``),[f,p]=(0,b.useState)(!1),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(!1),v=async e=>{let n={...EP,...Object.fromEntries(Object.keys(EP).map(t=>[t,e[t]||``]))};r(n),t(Math.min(e.current_step||1,pP.length)),a(e.id);let i=(await X.entities.ApplicationDocument.filter({application_id:e.id})).map(e=>({id:e.id,document_type:e.document_type,file_url:e.file_url,file_name:e.file_name}));s(i),y(e.id,Math.min(e.current_step||1,pP.length),n,i)};(0,b.useEffect)(()=>{let e=null;try{e=JSON.parse(localStorage.getItem(DP)||`null`)}catch{localStorage.removeItem(DP)}(async()=>{try{let t=await X.auth.me(),n=(await X.entities.FundingApplication.filter({created_by_id:t.id,status:`in_progress`},`-updated_date`,1))[0];if(n&&(!e||e.applicationId!==n.id)){await v(n);return}}catch{}e&&e.applicationId&&(r({...EP,...e.form||{}}),t(Math.min(e.step||1,pP.length)),a(e.applicationId),s(e.documents||[]))})()},[]);let y=(e,t,n,r)=>{e&&localStorage.setItem(DP,JSON.stringify({applicationId:e,step:t,form:n,documents:r}))},x=(t,a)=>{let s={...n,[t]:a};r(s),y(i,e,s,o),l(e=>({...e,[t]:null}))},S=async(e,t,r)=>{try{await X.functions.invoke(`notifyApplicationUpdate`,{church_name:n.charge,applicant_name:n.contact_name,step_label:t,detail:r,reference:e})}catch{}},C=e=>[...e.fieldsBefore||[],...e.fields||[]].map(e=>`${e.label}: ${n[e.key]||`â`}`).join(` 106`),w=e=>{let t={};return[...e.fieldsBefore||[],...e.fields||[]].forEach(e=>{e.required&&!String(n[e.key]||``).trim()&&(t[e.key]=`This answer is required to continue`)}),e.custom===`documents`&&o.length===0&&(t.documents=`Please upload at least one document to continue`),t},T=async()=>{d(``);let r=pP.find(t=>t.id===e),s=w(r);if(l(s),Object.keys(s).length>0){d(`Please complete the highlighted questions to continue.`);return}p(!0);try{if(e===1){let e=await X.entities.FundingApplication.create({...n,current_step:2,status:`in_progress`});a(e.id),y(e.id,2,n,o),await S(e.id,`Step 1 of ${pP.length} â Charge & funding request completed`,C(r)),t(2)}else await X.entities.FundingApplication.update(i,{...n,current_step:e+1}),y(i,e+1,n,o),(r.fields||r.fieldsBefore)&&await S(i,`Step ${e} of ${pP.length} â ${r.title} completed`,C(r)),t(e+1)}catch{d(`We couldn't save your progress. Please check your connection and try again.`)}finally{p(!1)}},E=()=>{d(``),l({});let r=Math.max(1,e-1);t(r),y(i,r,n,o)},D=t=>{let r=[...o,t];s(r),y(i,e,n,r),l(e=>({...e,documents:null})),S(i,`Document uploaded â ${t.document_type}`,`File: ${t.file_name}`)},O=t=>{let r=o.filter(e=>e.id!==t);s(r),y(i,e,n,r)},k=async()=>{if(!String(n.signature_name||``).trim()){l({signature_name:`Please type your name to sign the application`}),d(`Please complete the highlighted questions to continue.`);return}if(g){p(!0),d(``);try{await X.entities.FundingApplication.update(i,{status:`submitted`,submitted_at:new Date().toISOString(),current_step:pP.length,signature_name:n.signature_name}),await S(i,`Funding application submitted`,`Charge: ${n.charge}\n\n${n.works_summary}`),localStorage.removeItem(DP),h(!0)}catch{d(`We couldn't submit your application. Please try again.`)}finally{p(!1)}}};if(m)return(0,z.jsx)($N,{reference:i,email:n.contact_email,applicationType:`funding`});let A=pP.find(t=>t.id===e),j=()=>A.custom===`request`?(0,z.jsx)(hP,{form:n,setField:x}):A.custom===`costs`?(0,z.jsx)(_P,{value:n.estimates,onChange:e=>x(`estimates`,e)}):A.custom===`funding_sources`?(0,z.jsx)(xP,{form:n,setField:x}):A.custom===`congregational`?(0,z.jsx)(wP,{form:n,setField:x}):A.custom===`documents`?(0,z.jsx)(ZN,{applicationId:i,applicantName:n.contact_name,documents:o,onUploaded:D,onDeleted:O,error:c.documents,documentTypes:dP}):A.custom===`review`?(0,z.jsx)(TP,{form:n,documents:o}):null,M=e=>e&&e.length>0?(0,z.jsx)(`div`,{className:`space-y-6`,children:e.map(e=>(0,z.jsx)(XN,{field:e,value:n[e.key],error:c[e.key],onChange:t=>
106x(e.key,t)},e.key))}):null;return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,z.jsx)(`header`,{className:`pt-safe border-b border-border/60 bg-card/80 backdrop-blur-sm sticky top-0 z-10`,children:(0,z.jsxs)(`div`,{className:`max-w-3xl mx-auto px-6 py-4 flex items-center gap-3`,children:[(0,z.jsx)(`div`,{className:`w-9 h-9 rounded-full bg-primary text-primary-foreground flex items-center justify-center shrink-0`,children:(0,z.jsx)(fn,{className:`w-4 h-4`})}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-display text-lg leading-tight`,children:`Diocese of Edinburgh`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:`Building Grants & Loans Fund â church buildings application`})]})]})}),(0,z.jsxs)(`main`,{className:`max-w-3xl mx-auto px-6 py-10 pb-24`,children:[(0,z.jsx)(kD,{currentStep:e,steps:pP}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-4 text-center`,children:`Your progress saves automatically â you can return to this page on this device to pick up where you left off.`}),(0,z.jsx)(y_,{mode:`wait`,children:(0,z.jsx)(tD.div,{initial:{opacity:0,x:24},animate:{opacity:1,x:0},exit:{opacity:0,x:-24},transition:{duration:.25},children:(0,z.jsxs)(`div`,{className:`mt-8 bg-card border border-border/70 rounded-2xl shadow-sm p-6 sm:p-10`,children:[(0,z.jsx)(`h1`,{className:`font-display text-2xl sm:text-3xl`,children:A.title}),(0,z.jsx)(`p`,{className:`text-muted-foreground text-sm sm:text-base mt-2`,children:A.intro}),A.guidance&&(0,z.jsx)(rP,{items:A.guidance}),(0,z.jsxs)(`div`,{className:`mt-8 space-y-6`,children:[M(A.fieldsBefore),A.custom&&j(),M(A.fields)]}),A.custom===`review`&&(0,z.jsxs)(`div`,{className:`mt-8 flex items-start gap-3 rounded-xl border border-border p-4 bg-secondary/30`,children:[(0,z.jsx)(bD,{id:`confirm-accurate`,checked:g,onCheckedChange:e=>_(e===!0)}),(0,z.jsx)(`label`,{htmlFor:`confirm-accurate`,className:`text-sm text-muted-foreground leading-snug`,children:`I confirm the information provided is accurate and complete to the best of my knowledge.`})]}),u&&(0,z.jsxs)(`div`,{className:`mt-6 flex items-center gap-2 text-sm text-destructive`,children:[(0,z.jsx)(pn,{className:`w-4 h-4 shrink-0`}),u]})]})},e)}),(0,z.jsxs)(`div`,{className:`mt-8 flex items-center justify-between`,children:[e>1?(0,z.jsxs)(Qh,{variant:`ghost`,onClick:E,disabled:f,children:[(0,z.jsx)(Qt,{className:`w-4 h-4 mr-2`}),` Back`]}):(0,z.jsx)(`span`,{}),e<pP.length?(0,z.jsxs)(Qh,{onClick:T,disabled:f,className:`font-semibold`,children:[f&&(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Continue`,(0,z.jsx)($t,{className:`w-4 h-4 ml-2`})]}):(0,z.jsxs)(Qh,{onClick:k,disabled:f||!g,className:`font-semibold`,children:[f&&(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Submit application`]})]})]})]})}var kP=[`A`,`B`,`C`,`D`,`E`,`F`,`G`],AP=[`02 â Planning permission (if applicable)`,`02b â Listed building consent (if applicable)`,`02c â Net Zero confirmation of support (for net-zero works)`,`03 â Photos`,`04 â Quote from contractor (upload one file per contractor)`,`05 â Quinquennial report, including photos`,`06 â Energy Performance Certificate (required)`,`07a â Accounts â most recent year`,`07b â Accounts â previous year`,`Other supporting document`],jP=[{id:1,title:`Charge & request`,intro:`This is the application to the Building Grants Fund, Rectory Green Fund and Building Loans Fund for works to rectories and other church housing. Take it one step at a time â your answers save automatically. (Please read the BGR/2 Guidance Notes before completing.) Unlike works to churches, works to rectories do not require a Canon 35 application â however, the works may need planning permission and/or listed building consent from your local planning authority. Please note that a building warrant may also be required even when planning consent is not â your architect will advise you of the necessary requirements. If any of these apply, please attach copies in the documents step.`,guidance:[`Agree your plans with the Vestry and confirm their support.`,`Let the Diocese know you are considering taking a project forward â ideally with as much information as you can: the what, why, likely costs and when.`,`Get in touch with the Diocese and the Provincial Net Zero team about potential funding options.`,`Explore those options, then work through the steps below.`,`Tip: the St Andrews Fund can cover Quinquennial Inspection costs, urgent works and professional fees â always worth getting as much funding in as possible.`],custom:`request`,customPosition:`between`,fieldsBefore:[{key:`charge`,label:`Charge(s)`,type:`text`,required:!0,placeholder:`e.g. St Mary's, Haddington`},{key:`linked_with`,label:`Linked with`,type:`text`,required:!1,placeholder:`If part of a linked charge, name the others`},{key:`diocese`,label:`Diocese`,type:`select`,required:!0,options:iP}],fields:[{key:`status_of_works`,label:`Status of works`,type:`select`,required:!0,options:lP},{key:`rector_name`,label:`Rector / Priest in Charge â print name`,type:`text`,required:!0,placeholder:`e.g. Rev. Sarah Mitchell`},{key:`secretary_treasurer_name`,label:`Secretary / Treasurer â print name`,type:`text`,required:!0,placeholder:`e.g. John Robertson`}]},{id:2,title:`Principal contact`,intro:`Who should we contact with any questions about this application?`,fields:[{key:`contact_name`,label:`Name`,type:`text`,required:!0},{key:`contact_position`,label:`Position`,type:`text`,required:!1,placeholder:`e.g. Vestry Treasurer`},{key:`contact_email`,label:`Email address`,type:`email`,required:!0},{key:`contact_phone`,label:`Contact telephone number`,type:`text`,required:!1}]},{id:3,title:`The rectory`,intro:`Tell us about the property the works relate to.`,fields:[{key:`building_address`,label:`Address of rectory`,type:`textarea`,required:!0,placeholder:`Full address, including postcode`},{key:`listing`,label:`Listing`,type:`select`,required:!0,options:oP},{key:`conservation_area`,label:`Is it in a conservation area?`,type:`select`,required:!0,options:cP},{key:`year_built`,label:`Year built (if known)`,type:`text`,required:!1},{key:`architect`,label:`Architect (if known)`,type:`text`,required:!1},{key:`year_purchased`,label:`Year purchased`,type:`text`,required:!1}]},{id:4,title:`Occupation`,intro:`Is the rectory currently occupied? This helps the committee understand how the property is being used.`,fields:[{key:`occupied`,label:`Is the rectory currently occupied?`,type:`select`,required:!0,options:cP},{key:`occupant_details`,label:`If yes â details of occupant`,type:`textarea`,required:!1,hint:`If the occupant is not a stipendiary priest, please give details of the nature of the occupancy agreement.`},{key:`planned_use`,label:`If no â planned use of the property`,type:`textarea`,required:!1}]},{id:5,title:`Minimum guidelines`,intro:`Rectories should comply with the Minimum Standards for Clergy Housing.`,fields:[{key:`min_guidelines_compliance`,label:`Does the rectory fully comply with the current minimum guidelines?`,type:`select`,required:!0,options:cP},{key:`non_compliance_details`,label:`If no â details of non-compliance`,type:`textarea`,required:!1,hint:`Any plans to address the non-compliance and the reasons for retaining the property.`}]},{id:6,title:`EPC & Net Zero`,intro:`An Energy Performance Certificate must be provided â applications are only considered with an EPC attached. The Minimum Standards state the property should have an EPC rating of at least C.`,fields:[{key:`epc_rating`,label:`EPC rating`,type:`select`,required:!0,options:kP,hint:`Please attach the EPC in the documents step.`},{key:`epc_retention_explanation`,label:`If the rating is D or worse â why is the property being retained?`,type:`textarea`,required:!1}
106,{key:`improve_epc`,label:`Are the works designed to improve the EPC rating?`,type:`select`,required:!0,options:cP},{key:`epc_consistent`,label:`If yes â are the works consistent with those recommended on the EPC?`,type:`select`,required:!1,options:cP},{key:`epc_difference`,label:`If not â please explain the differences`,type:`textarea`,required:!1},{key:`net_zero_works`,label:`Do any of the proposed works relate to energy efficiency or other ânet-zeroâ type works?`,type:`select`,required:!0,options:cP,hint:`If yes, please consult a member of the Provincial Net Zero Team and attach relevant energy audits in the documents step.`}]},{id:7,title:`Quinquennial inspection`,intro:`Quinquennial Inspection reports help confirm the property is being properly maintained. Please attach the latest report in the documents step.`,fields:[{key:`quinquennial_date`,label:`Date of last Quinquennial Inspection`,type:`date`,required:!0},{key:`quinquennial_overdue_explanation`,label:`If the inspection is overdue, please explain`,type:`textarea`,required:!1},{key:`all_buildings_covered`,label:`Are all church-owned buildings covered by the Quinquennial Inspection?`,type:`select`,required:!0,options:cP},{key:`excluded_properties`,label:`If no â details of excluded properties and reasons`,type:`textarea`,required:!1}]},{id:8,title:`The works`,intro:`Describe the works and how they will be supervised. Photos, sketches and drawings can be uploaded in the documents step.`,fields:[{key:`works_summary`,label:`Summary of the works`,type:`textarea`,required:!0,hint:`If the works form part of a larger phased scheme, describe the whole scheme.`},{key:`supervision_details`,label:`Who will be responsible for overseeing / supervising the works?`,type:`textarea`,required:!0,hint:`Professionals responsible (architect/surveyor) and how CDM Regulations responsibilities will be addressed.`}]},{id:9,title:`Costs`,intro:`Provide up to three estimates. Totals are calculated automatically. Please attach detailed costings and estimates in the documents step.`,custom:`costs`,fields:[{key:`which_estimate`,label:`Which estimate do you propose to accept?`,type:`select`,required:!0,options:[`Estimate 1`,`Estimate 2`,`Estimate 3`]},{key:`fewer_estimates_explanation`,label:`If fewer than three estimates were obtained, please explain`,type:`textarea`,required:!1}]},{id:10,title:`Proposed funding`,intro:`Set out all the funding for the works â your own resources, diocesan support, other grants (awarded and anticipated), and the General Synod funding you are requesting. Totals are calculated automatically.`,custom:`funding_sources`},{id:11,title:`Fundraising`,intro:`Tell us about the congregationâs fundraising and stewardship, and what happens if the Provincial grant or loan is not awarded.`,fields:[{key:`fundraising_stewardship`,label:`Fundraising and stewardship`,type:`textarea`,required:!0,hint:`Include the congregationâs general approach and any fundraising specifically for these works. Mention any grant applications rejected.`},{key:`impact_if_rejected`,label:`If the requested grant and/or loan is not awarded, what will be the impact on the proposed works?`,type:`textarea`,required:!0}]},{id:12,title:`Congregation`,intro:`A picture of the congregationâs financial resources. Most of this can be taken from your annual accounts.`,custom:`congregational`,fields:[{key:`priest_name`,label:`Priest (Rev â¦)`,type:`text`,required:!1},{key:`priest_full_part`,label:`Full-time / Part-time`,type:`select`,required:!1,options:[`Full time`,`Part-Time`]},{key:`priest_stipendiary`,label:`Stipendiary / Non-stipendiary`,type:`select`,required:!1,options:[`Stipendiary`,`Non-stipendiary`]},{key:`other_liabilities`,label:`Any other significant liabilities or commitments (e.g. existing loans)`,type:`textarea`,required:!1}]},{id:13,title:`Documents`,intro:`Upload each supporting document, choosing its index reference (02â07) so your bundle is indexed the same way the Diocese files it. The BGR application form itself is generated from your answers here, and the Diocese drafts the Letter of Support (01) from the information you provide â you do not need to upload either.`,custom:`documents`},{id:14,title:`Review & submit`,intro:`Nearly there. Check your answers below, then sign and submit. The Diocesan Buildings Committee will be notified, and your application will be forwarded to the General Synod Office once the Diocese has authorised it.`,custom:`review`,fields:[{key:`signature_name`,label:`Signature of Rector / Priest in Charge`,type:`text`,required:!0,hint:`Type your full name to sign the application electronically. The date is recorded automatically when you submit.`}]}];function MP({label:e,value:t,onChange:n}){return(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-secondary/20`,children:[(0,z.jsx)(Z,{className:`text-sm font-medium`,children:e}),(0,z.jsxs)(`div`,{className:`mt-3`,children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Amount £`}),(0,z.jsx)($h,{type:`number`,min:`0`,value:t,onChange:e=>n(e.target.value),placeholder:`0`,className:`mt-1`})]})]})}function NP({form:e,setField:t}){return(0,z.jsxs)(`div`,{className:`space-y-4`,children:[(0,z.jsx)(MP,{label:`Grant requested from the Building Grants Fund (up to)`,value:e.grant_bgf,onChange:e=>t(`grant_bgf`,e)}),(0,z.jsx)(MP,{label:`Grant requested from the Rectory Green Fund (up to)`,value:e.grant_rgf,onChange:e=>t(`grant_rgf`,e)}),(0,z.jsx)(MP,{label:`Loan requested from the Building Loans Fund (up to)`,value:e.loan_blf,onChange:e=>t(`loan_blf`,e)})]})}var PP=Array.from({length:3},()=>({contractor:``,project:``,fees:``,vat:``}));
106function FP({value:e,onChange:t}){let n=fP(e,null)||PP,r=(e,r,i)=>{let a=n.map((t,n)=>n===e?{...t,[r]:i}:t);t(JSON.stringify(a))};return(0,z.jsx)(`div`,{className:`space-y-4`,children:n.map((e,t)=>{let n=Number(e.project||0)+Number(e.fees||0)+Number(e.vat||0);return(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-secondary/20`,children:[(0,z.jsxs)(`p`,{className:`text-sm font-medium mb-3`,children:[`Estimate `,t+1]}),(0,z.jsx)($h,{value:e.contractor,onChange:e=>r(t,`contractor`,e.target.value),placeholder:`Name of contractor`,className:`mb-3`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3`,children:[(0,z.jsx)(IP,{label:`Project costs (excluding fees) £`,value:e.project,onChange:e=>r(t,`project`,e)}),(0,z.jsx)(IP,{label:`Professional fees £`,value:e.fees,onChange:e=>r(t,`fees`,e)}),(0,z.jsx)(IP,{label:`VAT £`,value:e.vat,onChange:e=>r(t,`vat`,e)}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Total £`}),(0,z.jsx)($h,{value:n.toLocaleString(`en-GB`),readOnly:!0,className:`mt-1 bg-muted/40 font-medium`})]})]})]},t)})})}function IP({label:e,value:t,onChange:n}){return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,z.jsx)($h,{type:`number`,min:`0`,value:t,onChange:e=>n(e.target.value),placeholder:`0`,className:`mt-1`})]})}function LP({title:e,value:t,onChange:n,rows:r}){let i=fP(t,null)||Array.from({length:r},()=>({source:``,amount:``})),a=(e,t,r)=>{let a=i.map((n,i)=>i===e?{...n,[t]:r}:n);n(JSON.stringify(a))};return(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-secondary/20`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium mb-3`,children:e}),i.map((e,t)=>(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3 mb-3 last:mb-0`,children:[(0,z.jsx)($h,{value:e.source,onChange:e=>a(t,`source`,e.target.value),placeholder:`Source / detail`}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`Amount £`}),(0,z.jsx)($h,{type:`number`,min:`0`,value:e.amount,onChange:e=>a(t,`amount`,e.target.value),placeholder:`0`,className:`mt-1`})]})]},t))]})}function RP({label:e,value:t,onChange:n}){return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e}),(0,z.jsx)($h,{type:`number`,min:`0`,value:t,onChange:e=>n(e.target.value),placeholder:`0`,className:`mt-1`})]})}function zP({form:e,setField:t}){return(0,z.jsxs)(`div`,{className:`space-y-4`,children:[(0,z.jsx)(LP,{title:`a) Own resources (reserves and fundraising)`,value:e.funding_own,onChange:e=>t(`funding_own`,e),rows:4}),(0,z.jsx)(LP,{title:`b) Diocesan grants and loans`,value:e.funding_diocesan,onChange:e=>t(`funding_diocesan`,e),rows:2}),(0,z.jsx)(LP,{title:`c) Other grants and loans awarded`,value:e.funding_awarded,onChange:e=>t(`funding_awarded`,e),rows:4}),(0,z.jsx)(LP,{title:`d) Other grants and loans anticipated`,value:e.funding_anticipated,onChange:e=>t(`funding_anticipated`,e),rows:4}),(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 p-4 bg-primary/5`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium mb-3`,children:`e) General Synod funding requested`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-3 gap-3`,children:[(0,z.jsx)(RP,{label:`Building Grants Fund £`,value:e.gs_bgf,onChange:e=>t(`gs_bgf`,e)}),(0,z.jsx)(RP,{label:`Rectory Green Fund £`,value:e.gs_rgf,onChange:e=>t(`gs_rgf`,e)}),(0,z.jsx)(RP,{label:`Building Loans Fund £`,value:e.gs_blf,onChange:e=>t(`gs_blf`,e)})]})]})]})}var BP={charge:``,linked_with:``,diocese:``,grant_bgf:``,grant_rgf:``,loan_blf:``,status_of_works:``,rector_name:``,secretary_treasurer_name:``,contact_name:``,contact_position:``,contact_email:``,contact_phone:``,building_address:``,listing:``,conservation_area:``,year_built:``,architect:``,year_purchased:``,occupied:``,occupant_details:``,planned_use:``,min_guidelines_compliance:``,non_compliance_details:``,epc_rating:``,epc_retention_explanation:``,improve_epc:``,epc_consistent:``,epc_difference:``,net_zero_works:``,quinquennial_date:``,quinquennial_overdue_explanation:``,all_buildings_covered:``,excluded_properties:``,works_summary:``,supervision_details:``,estimates:``,which_estimate:``,fewer_estimates_explanation:``,funding_own:``,funding_diocesan:``,funding_awarded:``,funding_anticipated:``,gs_bgf:``,gs_rgf:``,gs_blf:``,fundraising_stewardship:``,
106impact_if_rejected:``,attendance_income:``,priest_name:``,priest_full_part:``,priest_stipendiary:``,investments:``,bank_accounts:``,restricted_funds:``,other_liabilities:``,signature_name:``},VP=`bgr1_application`;function HP(){let[e,t]=(0,b.useState)(1),[n,r]=(0,b.useState)(BP),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)([]),[c,l]=(0,b.useState)({}),[u,d]=(0,b.useState)(``),[f,p]=(0,b.useState)(!1),[m,h]=(0,b.useState)(!1),[g,_]=(0,b.useState)(!1),v=async e=>{let n={...BP,...Object.fromEntries(Object.keys(BP).map(t=>[t,e[t]||``]))};r(n),t(Math.min(e.current_step||1,jP.length)),a(e.id);let i=(await X.entities.ApplicationDocument.filter({application_id:e.id})).map(e=>({id:e.id,document_type:e.document_type,file_url:e.file_url,file_name:e.file_name}));s(i),y(e.id,Math.min(e.current_step||1,jP.length),n,i)};(0,b.useEffect)(()=>{let e=null;try{e=JSON.parse(localStorage.getItem(VP)||`null`)}catch{localStorage.removeItem(VP)}(async()=>{try{let t=await X.auth.me(),n=(await X.entities.RectoryFundingApplication.filter({created_by_id:t.id,status:`in_progress`},`-updated_date`,1))[0];if(n&&(!e||e.applicationId!==n.id)){await v(n);return}}catch{}e&&e.applicationId&&(r({...BP,...e.form||{}}),t(Math.min(e.step||1,jP.length)),a(e.applicationId),s(e.documents||[]))})()},[]);let y=(e,t,n,r)=>{e&&localStorage.setItem(VP,JSON.stringify({applicationId:e,step:t,form:n,documents:r}))},x=(t,a)=>{let s={...n,[t]:a};r(s),y(i,e,s,o),l(e=>({...e,[t]:null}))},S=async(e,t,r)=>{try{await X.functions.invoke(`notifyApplicationUpdate`,{church_name:n.charge,applicant_name:n.contact_name,step_label:t,detail:r,reference:e})}catch{}},C=e=>[...e.fieldsBefore||[],...e.fields||[]].map(e=>`${e.label}: ${n[e.key]||`â`}`).join(` 107`),w=e=>{let t={};return[...e.fieldsBefore||[],...e.fields||[]].forEach(e=>{e.required&&!String(n[e.key]||``).trim()&&(t[e.key]=`This answer is required to continue`)}),e.custom===`documents`&&o.length===0&&(t.documents=`Please upload at least one document to continue`),t},T=async()=>{d(``);let r=jP.find(t=>t.id===e),s=w(r);if(l(s),Object.keys(s).length>0){d(`Please complete the highlighted questions to continue.`);return}p(!0);try{if(e===1){let e=await X.entities.RectoryFundingApplication.create({...n,current_step:2,status:`in_progress`});a(e.id),y(e.id,2,n,o),await S(e.id,`Step 1 of ${jP.length} â Charge & funding request completed`,C(r)),t(2)}else await X.entities.RectoryFundingApplication.update(i,{...n,current_step:e+1}),y(i,e+1,n,o),(r.fields||r.fieldsBefore)&&await S(i,`Step ${e} of ${jP.length} â ${r.title} completed`,C(r)),t(e+1)}catch{d(`We couldn't save your progress. Please check your connection and try again.`)}finally{p(!1)}},E=()=>{d(``),l({});let r=Math.max(1,e-1);t(r),y(i,r,n,o)},D=t=>{let r=[...o,t];s(r),y(i,e,n,r),l(e=>({...e,documents:null})),S(i,`Document uploaded â ${t.document_type}`,`File: ${t.file_name}`)},O=t=>{let r=o.filter(e=>e.id!==t);s(r),y(i,e,n,r)},k=async()=>{if(!String(n.signature_name||``).trim()){l({signature_name:`Please type your name to sign the application`}),d(`Please complete the highlighted questions to continue.`);return}if(g){p(!0),d(``);try{await X.entities.RectoryFundingApplication.update(i,{status:`submitted`,submitted_at:new Date().toISOString(),current_step:jP.length,signature_name:n.signature_name}),await S(i,`Rectory funding application submitted`,`Charge: ${n.charge}\n\n${n.works_summary}`),localStorage.removeItem(VP),h(!0)}catch{d(`We couldn't submit your application. Please try again.`)}finally{p(!1)}}};if(m)return(0,z.jsx)($N,{reference:i,email:n.contact_email,applicationType:`funding`});let A=jP.find(t=>t.id===e),j=()=>A.custom===`request`?(0,z.jsx)(NP,{form:n,setField:x}):A.custom===`costs`?(0,z.jsx)(FP,{value:n.estimates,onChange:e=>x(`estimates`,e)}):A.custom===`funding_sources`?(0,z.jsx)(zP,{form:n,setField:x}):A.custom===`congregational`?(0,z.jsx)(wP,{form:n,setField:x}):A.custom===`documents`?(0,z.jsx)(ZN,{applicationId:i,applicantName:n.contact_name,documents:o,onUploaded:D,onDeleted:O,error:c.documents,documentTypes:AP}):A.custom===`review`?(0,z.jsx)(TP,{form:n,documents:o,steps:jP}):null,M=e=>e&&e.length>0?(0,z.jsx)(`div`,{className:`space-y-6`,children:e.map(e=>(0,z.jsx)(XN,{field:e,value:n[e.key],error:c[e.key],onChange:t=>
107x(e.key,t)},e.key))}):null;return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,z.jsx)(`header`,{className:`pt-safe border-b border-border/60 bg-card/80 backdrop-blur-sm sticky top-0 z-10`,children:(0,z.jsxs)(`div`,{className:`max-w-3xl mx-auto px-6 py-4 flex items-center gap-3`,children:[(0,z.jsx)(`div`,{className:`w-9 h-9 rounded-full bg-primary text-primary-foreground flex items-center justify-center shrink-0`,children:(0,z.jsx)(An,{className:`w-4 h-4`})}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-display text-lg leading-tight`,children:`Diocese of Edinburgh`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:`Building Grants, Rectory Green & Building Loans Funds â rectory application`})]})]})}),(0,z.jsxs)(`main`,{className:`max-w-3xl mx-auto px-6 py-10 pb-24`,children:[(0,z.jsx)(kD,{currentStep:e,steps:jP}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-4 text-center`,children:`Your progress saves automatically â you can return to this page on this device to pick up where you left off.`}),(0,z.jsx)(y_,{mode:`wait`,children:(0,z.jsx)(tD.div,{initial:{opacity:0,x:24},animate:{opacity:1,x:0},exit:{opacity:0,x:-24},transition:{duration:.25},children:(0,z.jsxs)(`div`,{className:`mt-8 bg-card border border-border/70 rounded-2xl shadow-sm p-6 sm:p-10`,children:[(0,z.jsx)(`h1`,{className:`font-display text-2xl sm:text-3xl`,children:A.title}),(0,z.jsx)(`p`,{className:`text-muted-foreground text-sm sm:text-base mt-2`,children:A.intro}),(0,z.jsx)(rP,{items:A.guidance}),(0,z.jsxs)(`div`,{className:`mt-8 space-y-6`,children:[M(A.fieldsBefore),A.custom&&j(),M(A.fields)]}),A.custom===`review`&&(0,z.jsxs)(`div`,{className:`mt-8 flex items-start gap-3 rounded-xl border border-border p-4 bg-secondary/30`,children:[(0,z.jsx)(bD,{id:`confirm-accurate`,checked:g,onCheckedChange:e=>_(e===!0)}),(0,z.jsx)(`label`,{htmlFor:`confirm-accurate`,className:`text-sm text-muted-foreground leading-snug`,children:`I confirm the information provided is accurate and complete to the best of my knowledge.`})]}),u&&(0,z.jsxs)(`div`,{className:`mt-6 flex items-center gap-2 text-sm text-destructive`,children:[(0,z.jsx)(pn,{className:`w-4 h-4 shrink-0`}),u]})]})},e)}),(0,z.jsxs)(`div`,{className:`mt-8 flex items-center justify-between`,children:[e>1?(0,z.jsxs)(Qh,{variant:`ghost`,onClick:E,disabled:f,children:[(0,z.jsx)(Qt,{className:`w-4 h-4 mr-2`}),` Back`]}):(0,z.jsx)(`span`,{}),e<jP.length?(0,z.jsxs)(Qh,{onClick:T,disabled:f,className:`font-semibold`,children:[f&&(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Continue`,(0,z.jsx)($t,{className:`w-4 h-4 ml-2`})]}):(0,z.jsxs)(Qh,{onClick:k,disabled:f||!g,className:`font-semibold`,children:[f&&(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Submit application`]})]})]})]})}function UP(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(!0);(0,b.useEffect)(()=>{X.auth.me().then(t).catch(()=>t(null)).finally(()=>r(!1))},[]);let i=e?.access_level||`viewer`,a=i===`senior`?`author`:i===`junior`?`editor`:i,o=a===`author`||e?.role===`admin`,s=a===`editor`,c=a===`viewer`,l=t=>e?o||c?!0:s?Array.isArray(e.allowed_departments)&&e.allowed_departments.includes(t):!1:!1,u=t=>e?o?!0:s?Array.isArray(e.allowed_departments)&&e.allowed_departments.includes(t):!1:!1;return{user:e,loading:n,role:a,isAuthor:o,isEditor:s,isViewer:c,isSenior:o,canAccess:l,canEdit:u,canUpload:u}}var WP=`rovingFocusGroup.onEntryFocus`,GP={bubbles:!1,cancelable:!0},KP=`RovingFocusGroup`,[qP,JP,YP]=ce(KP),[XP,ZP]=V(KP,[YP]),[QP,$P]=XP(KP),eF=b.forwardRef((e,t)=>(0,z.jsx)(qP.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,z.jsx)(qP.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,z.jsx)(tF,{...e,ref:t})})}));eF.displayName=KP;var tF=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=b.useRef(null),p=L(t,f),m=ND(a),[h,g]=Ve({prop:o,defaultProp:s??null,onChange:c,caller:KP}),[_,v]=b.useState(!1),y=he(l),x=JP(n),S=b.useRef(!1),[C,w]=b.useState(0);return b.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(WP,y),()=>e.removeEventListener(WP,y)},[y]),(0,z.jsx)(QP,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:b.useCallback(e=>g(e),[g]),onItemShiftTab:b.useCallback(()=>v(!0),[]),onFocusableItemAdd:b.useCallback(()=>w(e=>e+1),[]),onFocusableItemRemove:b.useCallback(()=>w(e=>e-1),[]),children:(0,z.jsx)(U.div,{tabIndex:_||C===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:F(e.onMouseDown,()=>{S.current=!0}
107),onFocus:F(e.onFocus,e=>{let t=!S.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(WP,GP);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=x().filter(e=>e.focusable);sF([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}S.current=!1}),onBlur:F(e.onBlur,()=>v(!1))})})}),nF=`RovingFocusGroupItem`,rF=b.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=tO(),l=a||c,u=$P(nF,n),d=u.currentTabStopId===l,f=JP(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u;return b.useEffect(()=>{if(r)return p(),()=>m()},[r,p,m]),(0,z.jsx)(qP.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,z.jsx)(U.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:F(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:F(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:F(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=oF(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?cF(n,r+1):n.slice(r+1)}setTimeout(()=>sF(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})});rF.displayName=nF;var iF={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function aF(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function oF(e,t,n){let r=aF(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return iF[r]}function sF(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function cF(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var lF=eF,uF=rF,dF=`Tabs`,[fF,pF]=V(dF,[ZP]),mF=ZP(),[hF,gF]=fF(dF),_F=b.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:i,defaultValue:a,orientation:o=`horizontal`,dir:s,activationMode:c=`automatic`,...l}=e,u=ND(s),[d,f]=Ve({prop:r,onChange:i,defaultProp:a??``,caller:dF});return(0,z.jsx)(hF,{scope:n,baseId:tO(),value:d,onValueChange:f,orientation:o,dir:u,activationMode:c,children:(0,z.jsx)(U.div,{dir:u,"data-orientation":o,...l,ref:t})})});_F.displayName=dF;var vF=`TabsList`,yF=b.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=gF(vF,n),o=mF(n);return(0,z.jsx)(lF,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,z.jsx)(U.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});yF.displayName=vF;var bF=`TabsTrigger`,xF=b.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:i=!1,...a}=e,o=gF(bF,n),s=mF(n),c=wF(o.baseId,r),l=TF(o.baseId,r),u=r===o.value;return(0,z.jsx)(uF,{asChild:!0,...s,focusable:!i,active:u,children:(0,z.jsx)(U.button,{type:`button`,role:`tab`,"aria-selected":u,"aria-controls":l,"data-state":u?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:c,...a,ref:t,onMouseDown:F(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?o.onValueChange(r):e.preventDefault()}),onKeyDown:F(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&o.onValueChange(r)}),onFocus:F(e.onFocus,()=>{let e=o.activationMode!==`manual`;!u&&!i&&e&&o.onValueChange(r)})})})});xF.displayName=bF;var SF=`TabsContent`,CF=b.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=gF(SF,n),c=wF(s.baseId,r),l=TF(s.baseId,r),u=r===s.value,d=b.useRef(u);return b.useEffect(()=>{let e=requestAnimationFrame(()=>d.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,z.jsx)(Ie,{present:i||u,children:({present:n})=>(0,z.jsx)(U.div,{"data-state":u?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":c,hidden:!n,id:l,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:d.current?`0s`:void 0},children:n&&a})})});CF.displayName=SF;function wF(e,t){return`${e}-trigger-${t}`}function TF(e,t){return`${e}-content-${t}`}var EF=_F,DF=yF,OF=xF,kF=CF,AF=EF,jF=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(DF,{ref:n,className:K(`inline-flex h-9 items-center justify-center rounded-lg bg-muted p-1 text-muted-foreground`,e),...t}));jF.displayName=DF.displayName;var MF=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(OF,{ref:n,className:K(`inline-flex items-center justify-center whitespace-nowrap rounded-md px-3 py-1 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow`,e),...t}));MF.displayName=OF.displayName;var NF=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(kF,{ref:n,className:K(`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));
107NF.displayName=kF.displayName;var PF=({href:e,name:t,desc:n})=>(0,z.jsxs)(`li`,{children:[(0,z.jsxs)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1.5 font-medium text-primary underline-offset-2 hover:underline`,children:[t,(0,z.jsx)(Sn,{className:`w-3.5 h-3.5 shrink-0`})]}),(0,z.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[` â `,n]})]}),FF=({title:e,resources:t})=>(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h4`,{className:`font-heading text-base mb-3`,children:e}),(0,z.jsx)(`ul`,{className:`space-y-2.5`,children:t.map(e=>(0,z.jsx)(PF,{...e},e.name))})]}),IF={vestry:{title:`Vestry Officers & Treasurers â governance & finance`,intro:`Vestry officers need to understand Scottish charity law, financial tracking, and trustee responsibilities.`,groups:[{heading:`For Treasurers specifically`,resources:[{name:`SCVO â Understanding Your Charity's Finance`,href:`https://elementstraining.teachable.com/p/finance`,desc:`introductory e-learning covering basic bookkeeping, records, and the legal layout needs for accounts.`},{name:`SCVO Trustee Network & Webinars`,href:`https://www.youtube.com/watch?v=tOZNmXz0kJ4`,desc:`recorded deep-dives such as Understanding Charity Accounts, with easy-to-digest breakdowns of accounting jargon.`},{name:`SEC Vestry Resources Portal`,href:`https://www.scotland.anglican.org/resource/vestry-governance-and-trustee-guidance/`,desc:`toolkits detailing the expectations of a Vestry Treasurer, including preparing OSCR Annual Returns and managing clergy stipends.`}]},{heading:`For other Vestry officers (Secretaries & Chairs)`,resources:[{name:`SCVO SCOPE eLearning Platform`,href:`https://scvo.scot/events-training/elearning/scope`,desc:`flexible modules ideal for busy volunteers â start with the Governance Module to learn how to lead boards effectively.`},{name:`SCVO Live Training Calendar`,href:`https://scvo.scot/events-training`,desc:`frequent online short courses, such as running effective board meetings â practical skills for keeping vestry meetings short and legal.`}]},{heading:`For fundraising & development`,resources:[{name:`SCVO Introduction to Fundraising`,href:`https://scvo.scot/events-training/calendar/a1vP100000RX2wLIAT/introduction-to-fundraising-pilot-course`,desc:`targeted courses covering grant searching, application writing, and donor relationship management.`},{name:`Funding Scotland Directory`,href:`https://scvo.scot/training-employability/scvo-training/`,desc:`learn to navigate SCVO's Funding Scotland service to track down regional trust funds, community grants, and capital project funding.`},{name:`SEC Stewardship Resources`,href:`https://www.scotland.anglican.org/our-organisation/resources/`,desc:`template documents for Gift Aid management, legacy giving campaigns, and localised stewardship drives.`}]}]},clergy:{title:`New Clergy & Priests in Charge â strategic leadership`,intro:`A new Priest in Charge transitions quickly from spiritual provider to chief executive of a local charity. Safeguarding is the first priority of the role â before anything else, complete your safeguarding training. From there, plan for financial growth, community alignment, and legal compliance.`,groups:[{heading:`Safeguarding â start here (mandatory)`,resources:[{name:`SEC Safeguarding Training Portal`,href:`https://www.scotland.anglican.org/who-we-are/safeguarding/`,desc:`mandatory safeguarding training for all clergy â module sign-ups, policy documents, and the Churchâs national safeguarding standards.`},{name:`General Synod Safeguarding Committee`,href:`https://www.scotland.anglican.org/who-we-are/safeguarding/`,desc:`guidance on responding to concerns, PVG requirements for staff and volunteers, and safe recruitment of workers.`}]},{heading:`For 3-year business planning & leadership`,resources:[{name:`Charity Excellence Framework & Cranfield Trust`,href:`https://www.charityexcellence.co.uk/free-charity-and-trustee-training-courses/`,desc:`free business planning frameworks, AI-driven self-assessments, and pro bono management mentoring.`},{name:`NCVO â Leading on Purpose`,href:`https://www.ncvo.org.uk/about-us/our-services/leading-on-purpose/`,desc:`short training streams that teach leaders how to craft multi-year strategic visions while remaining highly resilient.`},{name:`Scottish Episcopal Institute (SEI)`,href:`https://sei.scot/`,desc:`denominational training â works directly with dioceses to arrange continuing ministerial development (CMD) peer groups covering the administrative realities of running a charge.`}]}]}};function LF({embedded:e=!1}){let[t,n]=(0,b.useState)(null),r=[{key:`clergy`,label:`New Clergy & Priests in Charge`,Icon:vn},{key:`vestry`,label:`Vestry Officers & Treasurers`,Icon:Nn}
107],i=t?IF[t]:null,a=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`mt-8 grid gap-4 sm:grid-cols-2`,children:r.map(({key:e,label:r,Icon:i})=>{let a=t===e;return(0,z.jsxs)(`button`,{onClick:()=>n(a?null:e),className:`w-full flex items-center gap-4 rounded-2xl border p-5 text-left shadow-sm transition-all ${a?`border-primary bg-secondary`:`border-border/70 bg-card hover:border-primary/60 hover:shadow-md hover:-translate-y-0.5`}`,children:[(0,z.jsx)(`div`,{className:`w-10 h-10 rounded-lg bg-brand-gold/20 text-brand-panel flex items-center justify-center shrink-0`,children:(0,z.jsx)(i,{className:`w-5 h-5`})}),(0,z.jsx)(`span`,{className:`font-heading text-lg`,children:r}),(0,z.jsx)(cn,{className:`w-5 h-5 ml-auto text-muted-foreground transition-transform ${a?`rotate-180`:``}`})]},e)})}),i&&(0,z.jsxs)(`div`,{className:`mt-6 rounded-2xl border border-primary/30 bg-card p-6 sm:p-8 shadow-sm`,children:[(0,z.jsx)(`h3`,{className:`font-display text-xl sm:text-2xl`,children:i.title}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-2 max-w-2xl`,children:i.intro}),(0,z.jsx)(`div`,{className:`mt-6 grid gap-8 lg:grid-cols-2`,children:i.groups.map(e=>(0,z.jsx)(FF,{title:e.heading,resources:e.resources},e.heading))}),t===`clergy`&&(0,z.jsx)(`div`,{className:`mt-8 rounded-xl border border-dashed border-border bg-muted/40 p-5`,children:(0,z.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,z.jsxs)(`div`,{className:`flex -space-x-2 shrink-0`,children:[(0,z.jsx)(`div`,{className:`w-10 h-10 rounded-lg bg-primary/10 text-primary flex items-center justify-center ring-2 ring-card`,children:(0,z.jsx)(Dn,{className:`w-5 h-5`})}),(0,z.jsx)(`div`,{className:`w-10 h-10 rounded-lg bg-primary/10 text-primary flex items-center justify-center ring-2 ring-card`,children:(0,z.jsx)(rn,{className:`w-5 h-5`})})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h4`,{className:`font-heading text-lg`,children:`Mission Plan Upload & Deanâs Visitation`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Coming soon â this section is under development.`})]})]})})]})]});return e?(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground max-w-2xl`,children:`Effective training pipelines to help Priests in Charge and Vestry officer teams flourish over a three-year business planning horizon â choose your role below.`}),a]}):(0,z.jsxs)(`section`,{className:`mt-16`,children:[(0,z.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center shrink-0`,children:(0,z.jsx)(kn,{className:`w-5 h-5`})}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`font-display text-3xl sm:text-4xl`,children:`Training & Development resources`}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-3 max-w-2xl`,children:`To help both your new Priests in Charge and your Vestry officer teams flourish over a three-year business planning horizon, here are the most effective training pipelines â
107choose your role below.`})]})]}),a]})}var RF=[{key:`new_appointment`,label:`New appointments`,icon:or,title:`New appointment & payroll intake`,desc:`A new priest or member of staff is joining your charge â tell us who and we will have payroll set up before their first day.`},{key:`office_bearer`,label:`Office bearer changes`,icon:sr,title:`Office bearer change`,desc:`Announce a new Vestry Secretary, Treasurer, PVG Co-ordinator or RCIL Associate â the form only asks about the role that is changing.`},{key:`exit_interview`,label:`Exit interviews`,icon:bn,title:`Exit interview & leaver checklist`,desc:`Someone is leaving your charge â complete the exit checklist so payroll, property and email access are all wrapped up.`}];function zF(){return(0,z.jsxs)(AF,{defaultValue:`new_appointment`,className:`mt-8`,children:[(0,z.jsx)(jF,{className:`grid w-full grid-cols-2 sm:grid-cols-4 h-auto p-1`,children:RF.map(({key:e,label:t,icon:n},r)=>(0,z.jsxs)(b.Fragment,{children:[(0,z.jsxs)(MF,{value:e,className:`flex items-center gap-2 py-2.5`,children:[(0,z.jsx)(n,{className:`w-4 h-4`}),t]}),r===0&&(0,z.jsxs)(MF,{value:`training`,className:`flex items-center gap-2 py-2.5`,children:[(0,z.jsx)(kn,{className:`w-4 h-4`}),`Training & Development`]})]},e))}),RF.map(({key:e,title:t,desc:n,icon:r})=>(0,z.jsx)(NF,{value:e,className:`mt-6`,children:(0,z.jsxs)(`div`,{className:`rounded-2xl border border-border/70 bg-card p-6 sm:p-8 shadow-sm`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center shrink-0`,children:(0,z.jsx)(r,{className:`w-5 h-5`})}),(0,z.jsx)(`h3`,{className:`font-display text-xl sm:text-2xl`,children:t})]}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-4 max-w-2xl`,children:n}),(0,z.jsxs)(Dc,{to:`/onboarding/${e}`,className:`mt-6 inline-flex items-center gap-2 h-9 px-4 rounded-md bg-primary text-sm font-medium text-primary-foreground shadow hover:bg-primary/90 transition-colors`,children:[`Start form `,(0,z.jsx)($t,{className:`w-4 h-4`})]})]})},e)),(0,z.jsx)(NF,{value:`training`,className:`mt-6`,children:(0,z.jsx)(`div`,{className:`rounded-2xl border border-border/70 bg-card p-6 sm:p-8 shadow-sm`,children:(0,z.jsx)(LF,{embedded:!0})})})]})}var BF=`FefsO42Bqy0`,VF=`https://i.ytimg.com/vi/${BF}/maxresdefault.jpg`;function HF(){let[e,t]=(0,b.useState)(!1);return(0,z.jsx)(`div`,{className:`aspect-video bg-black`,children:e?(0,z.jsx)(`iframe`,{className:`w-full h-full`,src:`https://www.youtube.com/embed/${BF}?autoplay=1`,title:`A conversation with Bishop Dagmar Winter, Bishop of Edinburgh`,frameBorder:`0`,allow:`accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share`,allowFullScreen:!0}):(0,z.jsxs)(`button`,{type:`button`,onClick:()=>t(!0),"aria-label":`Play the video conversation with Bishop Dagmar Winter`,className:`relative block w-full h-full group`,children:[(0,z.jsx)(Tg,{src:VF,alt:`The Rt Rev Dr Dagmar Winter, Bishop of Edinburgh`,fittingType:`fill`,className:`w-full h-full`}),(0,z.jsx)(`span`,{className:`absolute inset-0 bg-black/10 transition-colors group-hover:bg-black/25`}),(0,z.jsx)(`span`,{className:`absolute bottom-4 left-4 w-16 h-16 rounded-full bg-primary text-primary-foreground flex items-center justify-center shadow-lg transition-transform group-hover:scale-105`,children:(0,z.jsx)(Gn,{className:`w-7 h-7 ml-1`})})]})})}var UF=[{to:`/annual-returns`,icon:Yn,title:`Annual Returns Portal`,desc:`Upload your Annual Accounts and Financial Summary and confirm OSCR, Gift Aid, Safeguarding and Statistical returns.`},{to:`/loan-disclosure`,icon:Nn,title:`Statutory Debt & Loan Disclosure`,desc:`Log any external or internal loans â compulsory under OSCR guidance, and needed for your accounts balance sheet.`},{to:`/congregational-return`,icon:sr,title:`Annual Congregational Return`,desc:`Share membership, attendance, giving and donor figures â helping us spot growth and target mission support.`}];function WF(){return(0,z.jsx)(`div`,{className:`mt-6 grid gap-5 sm:grid-cols-2 lg:grid-cols-3`,children:UF.map(({to:e,icon:t,title:n,desc:r})=>(0,z.jsx)(Dc,{to:e,className:`block h-full`,children:(0,z.jsxs)(`div`,{className:`h-full rounded-2xl border border-border/70 bg-card p-6 shadow-sm transition-all hover:border-primary/60 hover:shadow-md hover:-translate-y-0.5`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center`,children:(0,z.jsx)(t,{className:`w-5 h-5`})}),(0,z.jsx)(`h3`,{className:`font-display text-xl mt-4`,children:n}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-2`,children:r}),(0,z.jsxs)(`div`,{className:`mt-5 flex items-center gap-2 text-sm font-medium`,children:[(0,z.jsx)(`span`,{className:`text-primary`,children:`Open portal`}),(0,z.jsx)($t,{className:`w-4 h-4 text-primary`})]})]})},e))})}var GF=[{to:`/apply`,title:`Canon 35 Planning Consent`,desc:`Apply for Diocesan consent to carry out works to a church, hall or other building under Canon 35.`,icon:fn,available:!0},{to:`/apply-funding`,title:`Funding for Church & Church Buildings`,desc:`Apply to the Provincial Building Grants Fund and Building Loans Fund for works to church buildings (other than rectories and housing).`,icon:qn,available:!0},{to:`/apply-rectory`,title:`Funding for Rectory & Housing`,desc:`Apply to the Building Grants Fund, Rectory Green Fund and Building Loans Fund for works to rectories and other church housing.`,icon:An,available:!0}];function KF(){let{isAuthor:e}=UP();return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,z.jsx)(`header`,{className:`border-b border-border/60 bg-card/80 backdrop-blur-sm sticky top-0 z-10`,children:(0,z.jsxs)(`div`,{className:`max-w-5xl mx-auto px-6 py-4 flex items-center gap-3`,children:[(0,z.jsx)(Dg,{size:36}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-display text-lg leading-tight`,children:`Diocese Connect`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:`Diocese of Edinburgh`})]}),(0,z.jsxs)(`div`,{className:`ml-auto flex items-center gap-4`,children:[e&&(0,z.jsxs)(Dc,{to:`/hub`,className:`inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors`,children:[(0,z.jsx)(Nn,{className:`w-4 h-4`}),`Diocesan Hub`]}),(0,z.jsxs)(Dc,{to:`/dashboard`,className:`inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors`,children:[(0,z.jsx)(Pn,{className:`w-4 h-4`}),`Admin dashboard`]})]})]})}),(0,z.jsxs)(`main`,{className:`max-w-5xl mx-auto px-6 py-14`,children:[(0,z.jsx)(`h1`,{className:`font-display text-3xl sm:text-4xl`,children:`Welcome to the Diocese of Edinburgh`}),(0,z.jsxs)(`div`,{className:`mt-8 overflow-hidden rounded-2xl border border-border/70 bg-card shadow-sm max-w-3xl`,children:[(0,z.jsx)(HF,{}),(0,z.jsxs)(`div`,{className:`px-5 py-3 border-t border-border/60`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium`,children:`The Rt Rev Dr Dagmar Winter, Bishop of Edinburgh`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`A conversation with the Bishop as she prepares to take up her new role in the Diocese â courtesy of the Talking Faith podcast`})]})]}),(0,z.jsxs)(`div`,{className:`mt-16 flex items-center gap-4`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center shrink-0`,children:(0,z.jsx)(sr,{className:`w-5 h-5`})}),(0,z.jsx)(`h2`,{className:`font-display text-3xl sm:text-4xl`,children:`Onboarding: Staff and Office Bearers`})]}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-3 max-w-2xl`,children:`We're delighted to have you on board. To make the onboarding process as straightforward as possible, follow the steps below â and if anything is unclear, the Diocesan Office is always happy to help.`}),(0,z.jsx)(zF,{}),(0,z.jsxs)(`div`,{className:`mt-16 flex items-center gap-4`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center shrink-0`,children:(0,z.jsx)(Nn,{className:`w-5 h-5`})}),(0,z.jsx)(`div`,{children:(0,z.jsx)(`h2`,{className:`font-display text-3xl sm:text-4xl`,children:`Governance: Maintaining Financial Health and Statutory Compliance`})})]}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-3 max-w-2xl`,children:`Treasurers and Priests â upload your Annual Accounts and Financial Summary, and confirm your OSCR, Gift Aid, Safeguarding and Statistical returns. The Diocese of Edinburgh deadline is 14th January.`}),(0,z.jsx)(WF,{}),(0,z.jsxs)(`div`,{className:`mt-16 flex items-center gap-4`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center shrink-0`,children:(0,z.jsx)(fn,{className:`w-5 h-5`})}),(0,z.jsx)(`h2`,{className:`font-display text-3xl sm:text-4xl`,children:`Care of your Church: Building Consent and Funding`})]}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-3 max-w-2xl`,children:`What building consents and funding would you like to apply for? Choose the application that matches your project. You can start one now and come back to it later â your progress saves automatically.`}),(0,z.jsx)(`div`,{className:`mt-10 grid gap-5 sm:grid-cols-2 lg:grid-cols-3`,children:GF.map(e=>{let t=e.icon,n=(0,z.jsxs)(`div`,{className:`h-full flex flex-col rounded-2xl border border-border/70 bg-card p-6 shadow-sm transition-all ${e.available?`hover:border-primary/60 hover:shadow-md hover:-translate-y-0.5`:`opacity-70`}`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center`,children:(0,z.jsx)(t,{className:`w-5 h-5`})}),(0,z.jsx)(`h2`,{className:`font-display text-xl mt-4`,children:e.title}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-2 flex-1`,children:e.desc}),(0,z.jsx)(`div`,{className:`mt-5 flex items-center gap-2 text-sm font-medium`,children:e.available?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`span`,{className:`text-primary`,children:`Start application`}),(0,z.jsx)($t,{className:`w-4 h-4 text-primary`})]}):(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:`Coming soon`})})]});return e.available?(0,z.jsx)(Dc,{to:e.to,className:`block h-full`,children:n},e.title):(0,z.jsx)(`div`,{className:`h-full cursor-not-allowed`,"aria-disabled":`true`,children:n},e.title)})}),(0,z.jsxs)(`div`,{className:`mt-16 flex items-center gap-4`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center shrink-0`,children:(0,z.jsx)(Vn,{className:`w-5 h-5`})}),(0,z.jsx)(`h2`,{className:`font-display text-3xl sm:text-4xl`,children:`Share your news, stories & events`})]}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-3 max-w-2xl`,children:`The Communicant, Adventures in Faith and DMMC News are always looking for stories from your congregation â news, celebrations, mission stories and upcoming events. Share it here and it goes straight to the Diocesan Communications Officer.`}),(0,z.jsx)(Dc,{to:`/share-story`,className:`mt-6 block max-w-xl`,children:(0,z.jsx)(`div`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm transition-all hover:border-primary/60 hover:shadow-md hover:-translate-y-0.5`,children:(0,z.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center shrink-0`,children:(0,z.jsx)(Wn,{className:`w-5 h-5`})}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`h3`,{className:`font-display text-xl`,children:`Story & Event Submission`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`No account needed â send your story in a few minutes, and read the latest issues of our publications too.`})]}),(0,z.jsx)($t,{className:`w-4 h-4 text-primary ml-auto shrink-0`})]})})})]})]})}function qF({children:e}){let{isAuthor:t}=UP();return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,z.jsx)(`header`,{className:`border-b border-border/60 bg-card/80 backdrop-blur-sm sticky top-0 z-10`,children:(0,z.jsxs)(`div`,{className:`max-w-5xl mx-auto px-6 py-4 flex items-center gap-3`,children:[(0,z.jsx)(Dg,{size:36}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-display text-lg leading-tight`,children:`Diocese Connect`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:`Diocese of Edinburgh`})]}),(0,z.jsxs)(`div`,{className:`ml-auto flex items-center gap-4`,children:[t&&(0,z.jsxs)(Dc,{to:`/hub`,className:`inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors`,children:[(0,z.jsx)(Nn,{className:`w-4 h-4`}),`Diocesan Hub`]}),(0,z.jsxs)(Dc,{to:`/dashboard`,className:`inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors`,children:[(0,z.jsx)(Pn,{className:`w-4 h-4`}),`Admin dashboard`]})]})]})}),(0,z.jsx)(`main`,{className:`max-w-2xl mx-auto px-6 py-14`,children:e})]})}var JF=[{key:`submitter_name`,label:`Your name`,type:`text`,required:!0,placeholder:`e.g. Alex Morgan`},{key:`submitter_email`,label:`Your email address`,type:`email`,required:!0,placeholder:`[email protected]`}],YF=[`Congregation email (e.g. [email protected])`,`Personal email (Gmail, Yahoo, BT Internet, etc.)`],XF=`St Mary's Cathedral (Edinburgh).St Mungo's, Balerno.St Columba's, Bathgate.St Catharine's, Bo'ness.St Mary and All Souls, Coldstream.St Mary's, Dalkeith.St Mary's, Dalmahoy.St Anne's, Dunbar.Christ Church, Duns.Christ Church, Morningside (Edinburgh).Good Shepherd, Murrayfield (Edinburgh).Holy Cross, Davidson's Mains (Edinburgh).Mustard Seed (Edinburgh).Old St Paul's (Edinburgh).St Barnabas, Moredun (Edinburgh).St Columba's-by-the-Castle (Edinburgh).St Cuthbert's, Colinton (Edinburgh).St David of Scotland, Pilton (Edinburgh).St Fillan's, Fairmilehead (Edinburgh).St James the Less, Leith (Edinburgh).St John the Evangelist, Princes Street (Edinburgh).St Margaret of Scotland (Edinburgh).St Mark's, Portobello (Edinburgh).St Martin's, Dalry (Edinburgh).St Michael and All Saints (Edinburgh).St Ninian's, Comely Bank (Edinburgh).St Paul's & St George's (Edinburgh).St Peter's, Lutton Place (Edinburgh).St Philip's and St James' (Edinburgh).St Salvador's, Stenhouse (Edinburgh).St Vincent's, Stockbri
107dge (Edinburgh).University Anglican Chaplaincy (Edinburgh).St Ebba's, Eyemouth.Christ Church, Falkirk.St Peter's, Galashiels.St Mary's, Grangemouth.St Adrian's, Gullane.Holy Trinity, Haddington.St Cuthbert's, Hawick.St Andrew's, Innerleithen.St John's, Jedburgh.St Andrew's, Kelso.St Leonard's, Lasswade.St Peter's, Linlithgow.Livingston United Parish Church.Holy Trinity, Melrose.St Peter's, Musselburgh.St Baldred's, North Berwick.St Peter's, Peebles.St James the Less, Penicuik.St Matthew's, Roslyn.St John's, Selkirk.Priory Church of St Mary of Mount Carmel, South Queensferry.St Mungo's, West Linton`.split(`.`),ZF=`This helps us make sure church business only goes to an approved address â personal inboxes are reviewed by the Diocesan Office for GDPR.`,QF={key:`charge`,label:`Charge / congregation name`,type:`select`,required:!0,options:XF,hint:`Choose from the list of all 54 charges so we can match your submission exactly.`},$F={"New appointment":`new_appointment`,"Change of details":`update_details`,"Resignation / stepping down":`resignation`},eI=(e,t,n=[])=>({title:`New ${e} details`,intro:t,showIf:t=>t.bearer_role===e,fields:[{key:`bearer_name`,label:`Full name`,type:`text`,required:!0,placeholder:`e.g. Chris Paterson`},{key:`effective_date`,label:`Effective date of appointment`,type:`date`,required:!0},{key:`bearer_email`,label:`Contact email address`,type:`email`,required:!0,placeholder:`[email protected]`},{key:`email_type`,label:`Is this a personal or official congregation email?`,type:`select`,required:!0,options:YF,hint:ZF},{key:`bearer_phone`,label:`Contact phone number`,type:`text`,required:!1,placeholder:`Optional`},{key:`bearer_postal_address`,label:`Full postal address`,type:`textarea`,required:!1,hint:`For official diocesan mailings.`},...n]}),tI=e=>{let t={...e},n=!1;return Object.keys(t).forEach(e=>{let r=t[e];typeof r==`string`&&(r.startsWith(`Personal email`)?(t[e]=`personal`,n=!0):r.startsWith(`Congregation email`)&&(t[e]=`congregation`))}),t.change_type&&=$F[t.change_type]||t.change_type,t.bearer_role===`Responsible Body / RCIL Associate`&&(t.bearer_role=`RCIL Associate`),`payroll_service`in t&&(t.payroll_service=t.payroll_service===`Yes`),t.gdpr_review=n,t},nI=e=>async(t,n)=>{let r,i;if(n){let{file_url:e}=await X.integrations.Core.UploadPublicFile({file:n});r=e,i=n.name}let a={form_type:e,...tI(t),notice_file_url:r,notice_file_name:i};await X.entities.PayrollIntake.create(a);try{await X.functions.invoke(`notifyPayrollIntake`,a)}catch{}},rI={new_appointment:{key:`new_appointment`,title:`New appointment & payroll intake`,desc:`A new priest or member of staff is joining your charge â tell us who and we will have payroll set up before their first day.`,intro:`Congratulations on the new appointment â we're delighted to welcome them to the Diocese. Tell us who is joining and we'll make sure payroll is ready before day one. Most people finish in about five minutes, and the Diocesan Office is always on hand if anything is unclear.`,submitLabel:`Send appointment details`,submit:nI(`new_appointment`),sections:[{title:`Your details`,intro:`First, a little about you.`,fields:JF},{title:`The appointment`,intro:`Tell us about the person joining the charge.`,fields:[QF,{key:`employee_name`,label:`Full name of the new appointee`,type:`text`,required:!0,placeholder:`e.g. Rev. Jamie Taylor`},{key:`employee_role`,label:`Their role`,type:`select`,required:!0,options:[`Rector / Priest in Charge`,`Assistant Priest / Curate`,`Lay worker`,`Musician / Organist`,`Other member of staff`]},{key:`employment_type`,label:`Is this a clergy or lay appointment?`,type:`select`,required:!0,options:[`Clergy`,`Lay`]},{key:`dob`,label:`Date of birth`,type:`date`,required:!1,hint:`Needed for payroll and pension records.`},{key:`weekly_hours`,label:`Weekly hours (if part-time)`,type:`text`,required:!1,placeholder:`e.g. 20 hours per week`},{key:`start_date`,label:`Start date`,type:`date`,required:!0},{key:`payroll_service`,label:`Does your charge use the in-house Diocesan Payroll Service?`,type:`select`,required:!0,options:[`Yes`,`No`],hint:`If Yes, we will c
107ollect payroll and tax details so everything is set up before their first payday. If No, you can skip straight to the compliance questions.`},{key:`employee_email`,label:`Their email address`,type:`email`,required:!1,placeholder:`Optional`},{key:`employee_email_type`,label:`Is their emailâ¦`,type:`select`,required:!0,options:YF,hint:ZF},{key:`emergency_contact`,label:`Emergency contact`,type:`text`,required:!1,placeholder:`e.g. Jo Taylor â 07700 900123`,hint:`Name and phone number of someone we can contact in an emergency (optional).`}]},{title:`Payroll details (Diocesan Payroll Service)`,intro:`Don't worry if you're not sure about any of this â the Diocesan Finance Office will confirm the details with you.`,showIf:e=>e.payroll_service===`Yes`,fields:[{key:`tax_code`,label:`Tax code (if known)`,type:`text`,required:!1,placeholder:`e.g. 1257L`},{key:`ni_number`,label:`National Insurance number (if known)`,type:`text`,required:!1,placeholder:`e.g. QQ123456A`},{key:`stipend_salary`,label:`Stipend / salary details`,type:`text`,required:!1,placeholder:`e.g. £24,000 per annum, paid monthly`},{key:`bank_name`,label:`Bank name (for payroll set-up)`,type:`text`,required:!1,placeholder:`Optional`},{key:`sort_code`,label:`Sort code`,type:`text`,required:!1,placeholder:`e.g. 12-34-56`},{key:`account_number`,label:`Account number`,type:`text`,required:!1,placeholder:`Optional`},{key:`notes`,label:`Anything else we should know?`,type:`textarea`,required:!1,hint:`Anything helpful for the Diocesan Office â no detail is too small.`}],upload:{label:`P45 / HMRC Tax Coding Notice (optional)`,hint:`If you have a copy of the appointee's P45 or HMRC tax coding notice, attach it here â it helps us set up payroll right first time.`}},{title:`Compliance & PVG verification`,intro:`Two quick questions so the right checks are in place from day one.`,fields:[{key:`pension_enrollment`,label:`Pension auto-enrolment`,type:`checkbox`,required:!1,description:`This appointment should be enrolled in the pension scheme â the Diocesan Office will c
107onfirm the details.`},{key:`pvg_required`,label:`PVG membership required`,type:`checkbox`,required:!1,description:`This role involves regulated work with children or protected adults, so PVG scheme membership is required â the Diocesan Safeguarding Officer will be alerted automatically.`}]}],success:{title:`Thank you â that's everything we need`,body:`The appointment details are with the Diocesan Office, and payroll will be set up ahead of the start date. If we need anything further we'll be in touch â otherwise, welcome aboard!`}},tax_code:{key:`tax_code`,title:`Tax code update`,desc:`HMRC has issued a new tax code for someone on the Diocesan payroll â send it over with the notice and we will do the rest.`,intro:`When HMRC issues a new tax code for someone on the Diocesan payroll, let us know here. This form is for charges on the Diocesan payroll â if you're not sure whether that includes your charge, just send it anyway and we'll help.`,submitLabel:`Send tax code update`,submit:nI(`tax_code_update`),sections:[{title:`Your details`,fields:JF},{title:`The change`,fields:[QF,{key:`employee_name`,label:`Employee name`,type:`text`,required:!0,placeholder:`e.g. Rev. Jamie Taylor`},{key:`tax_code`,label:`New tax code`,type:`text`,required:!0,placeholder:`e.g. 1263L`},{key:`effective_date`,label:`Date the new code applies from`,type:`date`,required:!1},{key:`notes`,label:`Anything else we should know?`,type:`textarea`,required:!1}],upload:{label:`HMRC Tax Coding Notice`,hint:`Please attach the notice from HMRC â it helps us update the payroll records accurately.`}}],success:{title:`Thank you â the update is with us`,body:`Your tax code update has been sent to the Diocesan Finance Office and will be applied at the next payroll run. We'll be in touch if anything needs confirming.`}},office_bearer:{key:`office_bearer`,title:`Office bearer change`,desc:`Announce a new Vestry Secretary, Treasurer, PVG Co-ordinator or RCIL Associate â the form only asks about the role that is changing.`,intro:`Keep us up to date with your Vestry. Tell us who is taking on a role and we'll update the Diocesan directory. You'll only be asked for the details relevant to the role in question, and it takes just a few minutes â the Diocesan Office is always on hand if anything is unclear.`,submitLabel:`Send change to the Diocesan Office`,submit:async e=>{let t=tI(e);await X.entities.OfficeBearerChange.create(t);try{await X.functions.invoke(`notifyOfficeBearerChange`,t)}catch{}},sections:[{title:`Submitter & charge details`,intro:`First, a little about you â this helps us validate the submission, especially when it is sent from a personal email address.`,fields:[{key:`submitter_name`,label:`Name of submitter`,type:`text`,required:!0,placeholder:`e.g. Alex Morgan`},{key:`submitter_role`,label:`Your role in the charge`,type:`select`,required:!0,options:[`Rector / Priest-in-Charge`,`Outgoing Secretary`,`Outgoing Treasurer`,`Vestry Member`]},{key:`submitter_email`,label:`Submitter email address`,type:`email`,required:!0,placeholder:`[email protected]`},{key:`submitter_phone`,label:`Submitter contact phone number`,type:`text`,required:!1,placeholder:`Optional`},{key:`charge`,label:`Select your charge / congregation`,type:`select`,required:!0,options:XF,hint:`Choose from the list of all 54 charges so we can match your submission exactly.`},{key:`charge_code`,label:`Diocesan charge code (optional)`,type:`text`,required:!1,placeholder:`If you know it â it helps us validate faster`}]},{title:`Type of change`,fields:[{key:`change_type`,label:`Is this a new appointment or a step-down?`,type:`select`,required:!0,options:[`New appointment`,`Change of details`,`Resignation / stepping down`]},{key:`bearer_role`,label:`Which role is changing?`,type:`select`,required:!0,options:[`Vestry Secretary`,`Vestry Treasurer`,`PVG Co-ordinator`,`Responsible Body / RCIL Associate`],hint:`You will only be asked for the details relevant to this role.`}]},eI(`Vestry Secretary`,`Tell us about the new Vestry Secretary.`),eI(`Vestry Treasurer`,`Tell us about the new Vestry Treasurer.`,[{key:`payroll_service`,label:`Does this charge use the in-house Diocesan Payroll Service?`,type:`select`,required:!0,options:[`Yes`,`No`],hint:`If Yes, the Diocesan Finance Officer will automatically be alerted to send the new Treasurer the payroll authorisation protocols.`}]),eI(`PVG Co-ordinator`,`Tell us about the new PVG Co-ordinator.`,[{key:`pvg_membership_number`,label:`Existing PVG scheme membership number (if known)`,type:`text`,required:!1,placeholder:`Optional`}]),eI(`Responsible Body / RCIL Associate`,`Tell us about the new RCIL Associate.`),{title:`Declaration`,intro:`Finally, two quick confirmations so we can process the change.`,fields:[{key:`vestry_approval`,label:`Confirmation of Vestry approval`,type:`checkbox`,required:!0,description:`I confirm that this appointment has been formally approved by the Vestry of this charge and recorded in the minutes.`}
107,{key:`gdpr_consent`,label:`GDPR / data privacy acknowledgement`,type:`checkbox`,required:!0,description:`I confirm that the newly appointed individual has given consent for their contact details to be shared with the Diocesan Office for official administration purposes.`},{key:`notes`,label:`Anything else we should know?`,type:`textarea`,required:!1}]}],success:{title:`Thank you â the directory is up to date`,body:`Your office bearer change has been sent to the Diocesan Office, who will update the master contact directory. Where relevant, the Finance Officer or Safeguarding Officer has been automatically alerted â thank you for helping us keep in touch.`}},exit_interview:{key:`exit_interview`,title:`Exit interview & leaver checklist`,desc:`Someone is leaving your charge â complete the exit checklist so payroll, property and email access are all wrapped up.`,intro:`We're sorry to see them go, and grateful for all they've given. This short form helps us close things off neatly â payroll, keys, email access and a chance to share how the charge can support their successor. Most people finish in about five minutes.`,submitLabel:`Send leaver details`,submit:async e=>{await X.entities.ExitInterview.create(tI(e))},sections:[{title:`Your details`,intro:`First, a little about you.`,fields:[{key:`submitter_name`,label:`Your name`,type:`text`,required:!0,placeholder:`e.g. Alex Morgan`},{key:`submitter_role`,label:`Your role in the charge`,type:`select`,required:!0,options:[`Rector / Priest-in-Charge`,`Vestry Secretary`,`Vestry Treasurer`,`Vestry Member`,`The person leaving (completing it myself)`]},{key:`submitter_email`,label:`Your email address`,type:`email`,required:!0,placeholder:`[email protected]`}]},{title:`The person leaving`,intro:`Tell us who is leaving and when.`,fields:[QF,{key:`leaver_name`,label:`Full name of the person leaving`,type:`text`,required:!0,placeholder:`e.g. Rev. Jamie Taylor`},{key:`leaver_role`,label:`Their role`,type:`select`,required:!0,options:[`Rector / Priest in Charge`,`Assistant Priest / Curate`,`Lay worker`,`Musician / Organist`,`Vestry officer / volunteer`,`Other member of staff`]},{key:`employment_type`,label:`Clergy or lay?`,type:`select`,required:!0,options:[`Clergy`,`Lay`]},{key:`leave_date`,label:`Last day / leaving date`,type:`date`,required:!0},{key:`leaver_email`,label:`Their email address`,type:`email`,required:!1,placeholder:`Optional`},{key:`email_type`,label:`Is this a personal or official congregation email?`,type:`select`,required:!1,options:YF,hint:ZF}]},{title:`Handover, property & access`,intro:`So nothing falls through the cracks.`,fields:[{key:`handover_completed`,label:`Handover completed`,type:`checkbox`,required:!1,description:`Duties and knowledge have been handed over to a named successor.`},{key:`handover_notes`,label:`Handover notes`,type:`textarea`,required:!1,placeholder:`Who is taking over their duties, and anything still to pass on.`},{key:`property_returned`,label:`Keys & property returned`,type:`checkbox`,required:!1,description:`Church keys, equipment, files and any other diocesan property have been returned.`},{key:`property_details`,label:`Property details`,type:`text`,required:!1,placeholder:`e.g. Two church keys returned to Vestry Secretary`},{key:`email_access`,label:`What should happen to their email account?`,type:`select`,required:!1,options:[`Keep active for successor use`,`Forward to another address`,`Close on leaving date`,`Not applicable`]},{key:`final_pay_notes`,label:`Final pay / holiday questions`,type:`textarea`,required:!1,hint:`Anything the Diocesan Finance Office should know about final salary, holiday owed or pension.`}]},{title:`Reflections`,intro:`Optional â but every insight helps us support charges better.`,fields:[{key:`reason_for_leaving`,label:`Reason for leaving`,type:`select`,required:!1,options:[`New post elsewhere`,`Retirement`,`Relocation`,`End of fixed term or contract`,`Health or personal reasons`,`Other`]},{key:`reason_details`,label:`A little more detail (optional)`,type:`textarea`,required:!1},{key:`exit_feedback`,label:`How was their time with the charge?`,type:`textarea`,required:!1,placeholder:`What went well, and what could we do differently for their successor?`},{key:`keep_in_touch`,label:`Keep in touch`,type:`checkbox`,required:!1,description:`They are happy for the Diocesan Office to keep in touch with news and invitations.`},{key:`notes`,label:`Anything else we should know?`,type:`textarea`,required:!1}]}],success:{title:`Thank you â the leaver checklist is complete`,body:`The details are with the Diocesan Office. Payroll will be closed off, and any property or email actions will be followed up. Thank y
107ou for helping the transition go smoothly â and our very best wishes to them for the future.`}}},iI={new_appointment:or,tax_code:Yn,office_bearer:sr,exit_interview:bn};function aI(){return(0,z.jsxs)(qF,{children:[(0,z.jsx)(`h1`,{className:`font-display text-3xl sm:text-4xl`,children:`Welcome to the Diocese of Edinburgh`}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-3 max-w-2xl`,children:`We're delighted to have you on board. To make the onboarding process as straightforward as possible, follow the steps below â choose the card that matches what you need to do, and we'll take care of the rest. If anything is unclear, the Diocesan Office is always happy to help.`}),(0,z.jsx)(`div`,{className:`mt-10 grid gap-5 sm:grid-cols-2 lg:grid-cols-3`,children:Object.values(rI).filter(e=>e.key!==`tax_code`).map(e=>{let t=iI[e.key];return(0,z.jsxs)(Dc,{to:`/onboarding/${e.key}`,className:`h-full rounded-2xl border border-border/70 bg-card p-6 shadow-sm transition-all hover:border-primary/60 hover:shadow-md hover:-translate-y-0.5`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-primary/10 text-primary flex items-center justify-center`,children:(0,z.jsx)(t,{className:`w-5 h-5`})}),(0,z.jsx)(`h2`,{className:`font-display text-lg mt-4`,children:e.title}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-2`,children:e.desc}),(0,z.jsxs)(`span`,{className:`mt-4 inline-flex items-center gap-2 text-sm font-medium text-primary`,children:[`Get started `,(0,z.jsx)($t,{className:`w-4 h-4`})]})]},e.key)})}),(0,z.jsx)(LF,{})]})}function oI({config:e}){let[t,n]=(0,b.useState)({}),[r,i]=(0,b.useState)(null),[a,o]=(0,b.useState)({}),[s,c]=(0,b.useState)(!1),[l,u]=(0,b.useState)(!1),[d,f]=(0,b.useState)(!1),p=e.sections.filter(e=>!e.showIf||e.showIf(t)),m=p.flatMap(e=>e.fields),h=(e,t)=>{n(n=>({...n,[e]:t})),o(t=>({...t,[e]:void 0}))};return d?(0,z.jsxs)(`div`,{className:`text-center py-10`,children:[(0,z.jsx)(`span`,{className:`inline-flex items-center justify-center w-14 h-14 rounded-full bg-emerald-100 text-emerald-600`,children:(0,z.jsx)(mn,{className:`w-7 h-7`})}),(0,z.jsx)(`h1`,{className:`font-display text-2xl sm:text-3xl mt-5`,children:e.success.title}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-3 max-w-md mx-auto text-sm sm:text-base`,children:e.success.body}),(0,z.jsxs)(`div`,{className:`mt-6 flex flex-wrap justify-center gap-3`,children:[(0,z.jsx)(Qh,{asChild:!0,variant:`outline`,children:(0,z.jsx)(Dc,{to:`/onboarding`,children:`Back to onboarding`})}),(0,z.jsx)(Qh,{asChild:!0,children:(0,z.jsx)(Dc,{to:`/`,children:`Back to home`})})]})]}):(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(Dc,{to:`/onboarding`,className:`inline-flex items-center gap-1.5 text-sm text-muted-foreground hover:text-foreground transition-colors`,children:[(0,z.jsx)(Qt,{className:`w-4 h-4`}),` Back to onboarding`]}),(0,z.jsx)(`h1`,{className:`font-display text-3xl sm:text-4xl mt-5`,children:e.title}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-3`,children:e.intro}),(0,z.jsxs)(`form`,{onSubmit:async n=>{n.preventDefault();let i={};if(m.forEach(e=>{e.required&&!String(t[e.key]||``).trim()&&(i[e.key]=`Please complete this field`)}),o(i),Object.keys(i).length>0)return;let a={};m.forEach(e=>{a[e.key]=t[e.key]}),c(!0),u(!1);try{await e.submit(a,r),f(!0),window.scrollTo({top:0})}catch{u(!0)}finally{c(!1)}},className:`mt-8 space-y-6`,children:[p.map(e=>(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-5 sm:p-6 shadow-sm`,children:[(0,z.jsx)(`h2`,{className:`font-display text-lg`,children:e.title}),e.intro&&(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.intro}),(0,z.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[e.fields.map(e=>(0,z.jsx)(XN,{field:e,value:t[e.key],error:a[e.key],onChange:t=>h(e.key,t)},e.key)),e.upload&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{children:e.upload.label}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:e.upload.hint}),(0,z.jsx)(`input`,{type:`file`,accept:`.pdf,.jpg,.jpeg,.png`,onChange:e=>i(e.target.files&&e.target.files[0]),className:`mt-2 block w-full text-sm border border-input rounded-lg p-2 file:mr-3 file:rounded-md file:border-0 file:bg-secondary file:px-3 file:py-1.5 file:text-sm file:font-medium`})]})]})]},e.title)),l&&(0,z.jsx)(`p`,{className:`text-sm text-destructive`,children:`Something went wrong sending your details â please try again in a moment, or contact the Diocesan Office.`}
107),(0,z.jsxs)(Qh,{type:`submit`,size:`lg`,disabled:s,className:`w-full sm:w-auto`,children:[s&&(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),e.submitLabel]})]})]})}function sI(){let{formKey:e}=zs(),t=rI[e];return t?(0,z.jsx)(qF,{children:(0,z.jsx)(oI,{config:t})}):(0,z.jsx)(oc,{to:`/onboarding`,replace:!0})}var cI;function Q(){return cI.apply(null,arguments)}function lI(e){cI=e}function uI(e){return e instanceof Array||Object.prototype.toString.call(e)===`[object Array]`}function dI(e){return e!=null&&Object.prototype.toString.call(e)===`[object Object]`}function fI(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function pI(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;for(var t in e)if(fI(e,t))return!1;return!0}function mI(e){return e===void 0}function hI(e){return typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`}function gI(e){return e instanceof Date||Object.prototype.toString.call(e)===`[object Date]`}function _I(e,t){var n=[],r,i=e.length;for(r=0;r<i;++r)n.push(t(e[r],r));return n}function vI(e,t){for(var n in t)fI(t,n)&&(e[n]=t[n]);return fI(t,`toString`)&&(e.toString=t.toString),fI(t,`valueOf`)&&(e.valueOf=t.valueOf),e}function yI(e,t,n,r){return $z(e,t,n,r,!0).utc()}function bI(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function xI(e){return e._pf??=bI(),e._pf}var SI=Array.prototype.some?Array.prototype.some:function(e){var t=Object(this),n=t.length>>>0,r;for(r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function CI(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=xI(e),n=SI.call(t.parsedDateParts,function(e){return e!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function wI(e){var t=yI(NaN);return e==null?xI(t).userInvalidated=!0:vI(xI(t),e),t}var TI=Q.momentProperties=[],EI=!1;function DI(e,t){var n,r,i,a=TI.length;if(mI(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),mI(t._i)||(e._i=t._i),mI(t._f)||(e._f=t._f),mI(t._l)||(e._l=t._l),mI(t._strict)||(e._strict=t._strict),mI(t._tzm)||(e._tzm=t._tzm),mI(t._isUTC)||(e._isUTC=t._isUTC),mI(t._offset)||(e._offset=t._offset),mI(t._pf)||(e._pf=xI(t)),mI(t._locale)||(e._locale=t._locale),a>0)for(n=0;n<a;n++)r=TI[n],i=t[r],mI(i)||(e[r]=i);return e}function OI(e){DI(this,e),this._d=new Date(e._d==null?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),EI===!1&&(EI=!0,Q.updateOffset(this),EI=!1)}function kI(e){return e instanceof OI||e!=null&&e._isAMomentObject!=null}function AI(e){Q.suppressDeprecationWarnings===!1&&typeof console<`u`&&console.warn&&console.warn(`Deprecation warning: `+e)}function jI(e,t){var n=!0;return vI(function(){if(Q.deprecationHandler!=null&&Q.deprecationHandler(null,e),n){var r=[],i,a,o,s=arguments.length;for(a=0;a<s;a++){if(i=``,typeof arguments[a]==`object`){for(o in i+=` 108[`+a+`] `,arguments[0])fI(arguments[0],o)&&(i+=o+`: `+arguments[0][o]+`, `);i=i.slice(0,-2)}else i=arguments[a];r.push(i)}AI(e+` 109Arguments: `+Array.prototype.slice.call(r).join(``)+` 110`+Error().stack),n=!1}return t.apply(this,arguments)},t)}var MI={};function NI(e,t){Q.deprecationHandler!=null&&Q.deprecationHandler(e,t),MI[e]||(AI(t),MI[e]=!0)}Q.suppressDeprecationWarnings=!1,Q.deprecationHandler=null;function PI(e){return typeof Function<`u`&&e instanceof Function||Object.prototype.toString.call(e)===`[object Function]`}function FI(e){var t,n;for(n in e)fI(e,n)&&(t=e[n],PI(t)?this[n]=t:this[`_`+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+`|\\d{1,2}`)}function II(e,t){var n=vI({},e),r;for(r in t)fI(t,r)&&(dI(e[r])&&dI(t[r])?(n[r]={},vI(n[r],e[r]),vI(n[r],t[r])):t[r]==null?delete n[r]:n[r]=t[r]);for(r in e)fI(e,r)&&!fI(t,r)&&dI(e[r])&&(n[r]=vI({},n[r]));return n}function LI(e){e!=null&&this.set(e)}var RI=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)fI(e,t)&&n.push(t);return n},zI={sameDay:`[Today at] LT`,nextDay:`[Tomorrow at] LT`,nextWeek:`dddd [at] LT`,lastDay:`[Yesterday at] LT`,lastWeek:`[Last] dddd [at] LT`,sameElse:`L`};
vendor: 4,398 bytes, line 110
110function BI(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return PI(r)?r.call(t,n):r}function VI(e,t,n){var r=``+Math.abs(e),i=t-r.length;return(e>=0?n?`+`:``:`-`)+(10**Math.max(0,i)).toString().substr(1)+r}var HI=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,UI=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,WI={},GI={};function KI(e,t,n,r){var i=r;typeof r==`string`&&(i=function(){return this[r]()}),e&&(GI[e]=i),t&&(GI[t[0]]=function(){return VI(i.apply(this,arguments),t[1],t[2])}),n&&(GI[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function qI(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,``):e.replace(/\\/g,``)}function JI(e){var t=e.match(HI),n,r;for(n=0,r=t.length;n<r;n++)GI[t[n]]?t[n]=GI[t[n]]:t[n]=qI(t[n]);return function(n){var i=``,a;for(a=0;a<r;a++)i+=PI(t[a])?t[a].call(n,e):t[a];return i}}function YI(e,t){return e.isValid()?(t=XI(t,e.localeData()),WI[t]=WI[t]||JI(t),WI[t](e)):e.localeData().invalidDate()}function XI(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(UI.lastIndex=0;n>=0&&UI.test(e);)e=e.replace(UI,r),UI.lastIndex=0,--n;return e}var ZI={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`};function QI(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(HI).map(function(e){return e===`MMMM`||e===`MM`||e===`DD`||e===`dddd`?e.slice(1):e}).join(``),this._longDateFormat[e])}var $I=`Invalid date`;function eL(){return this._invalidDate}var tL=`%d`,nL=/\d{1,2}/;function rL(e){return this._ordinal.replace(`%d`,e)}var iL={future:`in %s`,past:`%s ago`,s:`a few seconds`,ss:`%d seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,w:`a week`,ww:`%d weeks`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function aL(e,t,n,r){var i=this._relativeTime[n];return PI(i)?i(e,t,n,r):i.replace(/%d/i,e)}function oL(e,t){var n=this._relativeTime[e>0?`future`:`past`];return PI(n)?n(t):n.replace(/%s/i,t)}var sL={D:`date`,dates:`date`,date:`date`,d:`day`,days:`day`,day:`day`,e:`weekday`,weekdays:`weekday`,weekday:`weekday`,E:`isoWeekday`,isoweekdays:`isoWeekday`,isoweekday:`isoWeekday`,DDD:`dayOfYear`,dayofyears:`dayOfYear`,dayofyear:`dayOfYear`,h:`hour`,hours:`hour`,hour:`hour`,ms:`millisecond`,milliseconds:`millisecond`,millisecond:`millisecond`,m:`minute`,minutes:`minute`,minute:`minute`,M:`month`,months:`month`,month:`month`,Q:`quarter`,quarters:`quarter`,quarter:`quarter`,s:`second`,seconds:`second`,second:`second`,gg:`weekYear`,weekyears:`weekYear`,weekyear:`weekYear`,GG:`isoWeekYear`,isoweekyears:`isoWeekYear`,isoweekyear:`isoWeekYear`,w:`week`,weeks:`week`,week:`week`,W:`isoWeek`,isoweeks:`isoWeek`,isoweek:`isoWeek`,y:`year`,years:`year`,year:`year`};function cL(e){return typeof e==`string`?sL[e]||sL[e.toLowerCase()]:void 0}function lL(e){var t={},n,r;for(r in e)fI(e,r)&&(n=cL(r),n&&(t[n]=e[r]));return t}var uL={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function dL(e){var t=[],n;for(n in e)fI(e,n)&&t.push({unit:n,priority:uL[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}var fL=/\d/,pL=/\d\d/,mL=/\d{3}/,hL=/\d{4}/,gL=/[+-]?\d{6}/,_L=/\d\d?/,vL=/\d\d\d\d?/,yL=/\d\d\d\d\d\d?/,bL=/\d{1,3}/,xL=/\d{1,4}/,SL=/[+-]?\d{1,6}/,CL=/\d+/,wL=/[+-]?\d+/,TL=/Z|[+-]\d\d:?\d\d/gi,EL=/Z|[+-]\d\d(?::?\d\d)?/gi,DL=/[+-]?\d+(\.\d{1,3})?/,OL=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,kL=/^[1-9]\d?/,AL=/^([1-9]\d|\d)/,jL={};function ML(e,t,n){jL[e]=PI(t)?t:function(e,r){return e&&n?n:t}}function NL(e,t){return fI(jL,e)?jL[e](t._strict,t._locale):new RegExp(PL(e))}function PL(e){return FL(e.replace(`\\`,``).replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i}))}function FL(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function IL(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function LL(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=IL(t)),n}var RL={};function zL(e,t){var n,r=t,i;
110for(typeof e==`string`&&(e=[e]),hI(t)&&(r=function(e,n){n[t]=LL(e)}),i=e.length,n=0;n<i;n++)RL[e[n]]=r}function BL(e,t){zL(e,function(e,n,r,i){r._w=r._w||{},t(e,r._w,r,i)})}function VL(e,t,n){t!=null&&fI(RL,e)&&RL[e](t,n._a,n,e)}function HL(e){return e%4==0&&e%100!=0||e%400==0}var UL=0,WL=1,GL=2,KL=3,qL=4,JL=5,YL=6,XL=7,ZL=8;KI(`Y`,0,0,function(){var e=this.year();return e<=9999?VI(e,4):`+`+e}),KI(0,[`YY`,2],0,function(){return this.year()%100}),KI(0,[`YYYY`,4],0,`year`),KI(0,[`YYYYY`,5],0,`year`),KI(0,[`YYYYYY`,6,!0],0,`year`),ML(`Y`,wL),ML(`YY`,_L,pL),ML(`YYYY`,xL,hL),ML(`YYYYY`,SL,gL),ML(`YYYYYY`,SL,gL),zL([`YYYYY`,`YYYYYY`],UL),zL(`YYYY`,function(e,t){t[UL]=e.length===2?Q.parseTwoDigitYear(e):LL(e)}),zL(`YY`,function(e,t){t[UL]=Q.parseTwoDigitYear(e)}),zL(`Y`,function(e,t){t[UL]=parseInt(e,10)});function QL(e){return HL(e)?366:365}Q.parseTwoDigitYear=function(e){return LL(e)+(LL(e)>68?1900:2e3)};var $L=tR(`FullYear`,!0);function eR(){return HL(this.year())}function tR(e,t){return function(n){return n==null?nR(this,e):(rR(this,e,n),Q.updateOffset(this,t),this)}}function nR(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case`Milliseconds`:return r?n.getUTCMilliseconds():n.getMilliseconds();case`Seconds`:return r?n.getUTCSeconds():n.getSeconds();case`Minutes`:return r?n.getUTCMinutes():n.getMinutes();case`Hours`:return r?n.getUTCHours():n.getHours();case`Date`:return r?n.getUTCDate():n.getDate();case`Day`:return r?n.getUTCDay():n.getDay();case`Month`:return r?n.getUTCMonth():n.getMonth();case`FullYear`:return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function rR(e,t,n){var r,i,a,o,s;if(!(!e.isValid()||isNaN(n))){switch(r=e._d,i=e._isUTC,t){case`Milliseconds`:i?r.setUTCMilliseconds(n):r.setMilliseconds(n);return;case`Seconds`:i?r.setUTCSeconds(n):r.setSeconds(n);return;case`Minutes`:i?r.setUTCMinutes(n):r.setMinutes(n);return;case`Hours`:i?r.setUTCHours(n):r.setHours(n);return;case`Date`:i?r.setUTCDate(n):r.setDate(n);return;case`FullYear`:break;default:return}a=n,o=e.month(),s=e.date(),s=s===29&&o===1&&!HL(a)?28:s,i?r.setUTCFullYear(a,o,s):r.setFullYear(a,o,s)}}function iR(e){return e=cL(e),PI(this[e])?this[e]():this}function aR(e,t){if(typeof e==`object`){e=lL(e);var n=dL(e),r,i=n.length;for(r=0;r<i;r++)this[n[r].unit](e[n[r].unit])}else if(e=cL(e),PI(this[e]))return this[e](t);return this}function oR(e,t){return(e%t+t)%t}var sR=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function cR(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=oR(t,12);return e+=(t-n)/12,n===1?HL(e)?29:28:31-n%7%2}KI(`M`,[`MM`,2],`Mo`,function(){return this.month()+1}),KI(`MMM`,0,0,function(e){return this.localeData().monthsShort(this,e)}),KI(`MMMM`,0,0,function(e){return this.localeData().months(this,e)}),ML(`M`,_L,kL),ML(`MM`,_L,pL),ML(`MMM`,function(e,t){return t.monthsShortRegex(e)}),ML(`MMMM`,function(e,t){return t.monthsRegex(e)}),zL([`M`,`MM`],function(e,t){t[WL]=LL(e)-1}),zL([`MMM`,`MMMM`],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);i==null?xI(n).invalidMonth=e:t[WL]=i});var lR=`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),uR=`Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec`.split(`_`),dR=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,fR=OL,pR=OL;function mR(e,t){return e?uI(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||dR).test(t)?`format`:`standalone`][e.month()]:uI(this._months)?this._months:this._months.standalone}function hR(e,t){return e?uI(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[dR.test(t)?`format`:`standalone`][e.month()]:uI(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function gR(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=yI([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,``).toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,``).toLocaleLowerCase();return n?t===`MMM`?(i=sR.call(this._shortMonthsParse,o),i===-1?null:i):(i=sR.call(this._longMonthsParse,o),i===-1?null:i):t===`MMM`?(i=sR.call(this._shortMonthsParse,o),i===-1?(i=sR.call(this._longMonthsParse,o),i===-1?null:i):i):(i=sR.call(this._longMonthsParse,o),i===-1?(i=sR.call(this._shortMonthsParse,o),i===-1?null:i):i)}function _R(e,t,n){var r,i,a;if(this._monthsParseExact)return gR.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if(i=yI([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=RegExp(`^`+this.months(i,``).replace(`.`,``)+`$`,`i`),this._shortMonthsParse[r]=RegExp(`^`+this.monthsShort(i,``).replace(`.`,``)+`$`,`i`)),!n&&!this._monthsParse[r]&&(a=`^`+this.months(i,``)+`|^`+this.monthsShort(i,``),this._monthsParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`MMMM`&&this._longMonthsParse[r].test(e)||n&&t===`MMM`&&this._shortMonthsParse[r].test(e)||!n&&this._monthsParse[r].test(e))return r}function vR(e,t){if(!e.isValid())return e;if(typeof t==`string`){if(/^\d+$/.test(t))t=LL(t);else if(t=e.localeData().monthsParse(t),!hI(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,cR(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function yR(e){return e==null?nR(this,`Month`):(vR(this,e),Q.updateOffset(this,!0),this)}function bR(){return cR(this.year(),this.month())}function xR(e){return this._monthsParseExact?(fI(this,`_monthsRegex`)||CR.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(fI(this,`_monthsShortRegex`)||(this._monthsShortRegex=fR),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function SR(e){return this._monthsParseExact?(fI(this,`_monthsRegex`)||CR.call(this),e?this._monthsStrictRegex:this._monthsRegex):(fI(this,`_monthsRegex`)||(this._monthsRegex=pR),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function CR(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i,a,o,s;for(i=0;i<12;i++)a=yI([2e3,i]),o=FL(this.monthsShort(a,``)),s=FL(this.months(a,``)),t.push(o),n.push(s),r.push(s),r.push(o);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._monthsShortStrictRegex=RegExp(`^(`+t.
110join(`|`)+`)`,`i`)}function wR(e,t,n,r,i,a,o){var s;return e<100&&e>=0?(s=new Date(e+400,t,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(e)):s=new Date(e,t,n,r,i,a,o),s}function TR(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function ER(e,t,n){var r=7+t-n;return-((7+TR(e,0,r).getUTCDay()-t)%7)+r-1}function DR(e,t,n,r,i){var a=(7+n-r)%7,o=ER(e,r,i),s=1+7*(t-1)+a+o,c,l;return s<=0?(c=e-1,l=QL(c)+s):s>QL(e)?(c=e+1,l=s-QL(e)):(c=e,l=s),{year:c,dayOfYear:l}}function OR(e,t,n){var r=ER(e.year(),t,n),i=Math.floor((e.dayOfYear()-r-1)/7)+1,a,o;return i<1?(o=e.year()-1,a=i+kR(o,t,n)):i>kR(e.year(),t,n)?(a=i-kR(e.year(),t,n),o=e.year()+1):(o=e.year(),a=i),{week:a,year:o}}function kR(e,t,n){var r=ER(e,t,n),i=ER(e+1,t,n);return(QL(e)-r+i)/7}KI(`w`,[`ww`,2],`wo`,`week`),KI(`W`,[`WW`,2],`Wo`,`isoWeek`),ML(`w`,_L,kL),ML(`ww`,_L,pL),ML(`W`,_L,kL),ML(`WW`,_L,pL),BL([`w`,`ww`,`W`,`WW`],function(e,t,n,r){t[r.substr(0,1)]=LL(e)});function AR(e){return OR(e,this._week.dow,this._week.doy).week}var jR={dow:0,doy:6};function MR(){return this._week.dow}function NR(){return this._week.doy}function PR(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,`d`)}function FR(e){var t=OR(this,1,4).week;return e==null?t:this.add((e-t)*7,`d`)}KI(`d`,0,`do`,`day`),KI(`dd`,0,0,function(e){return this.localeData().weekdaysMin(this,e)}),KI(`ddd`,0,0,function(e){return this.localeData().weekdaysShort(this,e)}),KI(`dddd`,0,0,function(e){return this.localeData().weekdays(this,e)}),KI(`e`,0,0,`weekday`),KI(`E`,0,0,`isoWeekday`),ML(`d`,_L),ML(`e`,_L),ML(`E`,_L),ML(`dd`,function(e,t){return t.weekdaysMinRegex(e)}),ML(`ddd`,function(e,t){return t.weekdaysShortRegex(e)}),ML(`dddd`,function(e,t){return t.weekdaysRegex(e)}),BL([`dd`,`ddd`,`dddd`],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);i==null?xI(n).invalidWeekday=e:t.d=i}),BL([`d`,`e`,`E`],function(e,t,n,r){t[r]=LL(e)});function IR(e,t){return typeof e==`string`?isNaN(e)?(e=t.weekdaysParse(e),typeof e==`number`?e:null):parseInt(e,10):e}function LR(e,t){return typeof e==`string`?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function RR(e,t){return e.slice(t,7).concat(e.slice(0,t))}var zR=`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),BR=`Sun_Mon_Tue_Wed_Thu_Fri_Sat`.split(`_`),VR=`Su_Mo_Tu_We_Th_Fr_Sa`.split(`_`),HR=OL,UR=OL,WR=OL;function GR(e,t){var n=uI(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?`format`:`standalone`];return e===!0?RR(n,this._week.dow):e?n[e.day()]:n}function KR(e){return e===!0?RR(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function qR(e){return e===!0?RR(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function JR(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=yI([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,``).toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,``).toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,``).toLocaleLowerCase();return n?t===`dddd`?(i=sR.call(this._weekdaysParse,o),i===-1?null:i):t===`ddd`?(i=sR.call(this._shortWeekdaysParse,o),i===-1?null:i):(i=sR.call(this._minWeekdaysParse,o),i===-1?null:i):t===`dddd`?(i=sR.call(this._weekdaysParse,o),i!==-1||(i=sR.call(this._shortWeekdaysParse,o),i!==-1)?i:(i=sR.call(this._minWeekdaysParse,o),i===-1?null:i)):t===`ddd`?(i=sR.call(this._shortWeekdaysParse,o),i!==-1||(i=sR.call(this._weekdaysParse,o),i!==-1)?i:(i=sR.call(this._minWeekdaysParse,o),i===-1?null:i)):(i=sR.call(this._minWeekdaysParse,o),i!==-1||(i=sR.call(this._weekdaysParse,o),i!==-1)?i:(i=sR.call(this._shortWeekdaysParse,o),i===-1?null:i))}function YR(e,t,n){var r,i,a;if(this._weekdaysParseExact)return JR.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if(i=yI([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=RegExp(`^`+this.weekdays(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._shortWeekdaysParse[r]=RegExp(`^`+this.weekdaysShort(i,``).replace(`.`,`\\.?`)+`$`,`i`),this._minWeekdaysParse[r]=RegExp(`^`+this.weekdaysMin(i,``).replace(`.`,`\\.?`)+`$`,`i`)),this._weekdaysParse[r]||(a=`^`+this.weekdays(i,``)+`|^`+this.weekdaysShort(i,``)+`|^`+this.weekdaysMin(i,``),this._weekdaysParse[r]=new RegExp(a.replace(`.`,``),`i`)),n&&t===`dddd`&&this._fullWeekdaysParse[r].test(e)||n&&t===`ddd`&&this._shortWeekdaysParse[r].test(e)||n&&t===`dd`&&this._minWeekdaysParse[r].test(e)||!n&&this._weekdaysParse[r].test(e))return r}function XR(e){if(!this.isValid())return e==null?NaN:this;var t=nR(this,`Day`);return e==null?t:(e=IR(e,this.localeData()),this.add(e-t,`d`))}function ZR(e){if(!this.isValid())return e==null?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,`d`)}function QR(e){if(!this.isValid())return e==null?NaN:this;if(e!=null){var t=LR(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function $R(e){return this._weekdaysParseExact?(fI(this,`_weekdaysRegex`)||nz.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(fI(this,`_weekdaysRegex`)||(this._weekdaysRegex=HR),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function ez(e){return this._weekdaysParseExact?(fI(this,`_weekdaysRegex`)||nz.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(fI(this,`_weekdaysShortRegex`)||(this._weekdaysShortRegex=UR),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function tz(e){return this._weekdaysParseExact?(fI(this,`_weekdaysRegex`)||nz.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(fI(this,`_weekdaysMinRegex`)||(this._weekdaysMinRegex=WR),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function nz(){function e(e,t){return t.length-e.length}var t=[],n=[],r=[],i=[],a,o,s,c,l;
vendor: 5,480 bytes, line 110
110for(a=0;a<7;a++)o=yI([2e3,1]).day(a),s=FL(this.weekdaysMin(o,``)),c=FL(this.weekdaysShort(o,``)),l=FL(this.weekdays(o,``)),t.push(s),n.push(c),r.push(l),i.push(s),i.push(c),i.push(l);t.sort(e),n.sort(e),r.sort(e),i.sort(e),this._weekdaysRegex=RegExp(`^(`+i.join(`|`)+`)`,`i`),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._weekdaysShortStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._weekdaysMinStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function rz(){return this.hours()%12||12}function iz(){return this.hours()||24}KI(`H`,[`HH`,2],0,`hour`),KI(`h`,[`hh`,2],0,rz),KI(`k`,[`kk`,2],0,iz),KI(`hmm`,0,0,function(){return``+rz.apply(this)+VI(this.minutes(),2)}),KI(`hmmss`,0,0,function(){return``+rz.apply(this)+VI(this.minutes(),2)+VI(this.seconds(),2)}),KI(`Hmm`,0,0,function(){return``+this.hours()+VI(this.minutes(),2)}),KI(`Hmmss`,0,0,function(){return``+this.hours()+VI(this.minutes(),2)+VI(this.seconds(),2)});function az(e,t){KI(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}az(`a`,!0),az(`A`,!1);function oz(e,t){return t._meridiemParse}ML(`a`,oz),ML(`A`,oz),ML(`H`,_L,AL),ML(`h`,_L,kL),ML(`k`,_L,kL),ML(`HH`,_L,pL),ML(`hh`,_L,pL),ML(`kk`,_L,pL),ML(`hmm`,vL),ML(`hmmss`,yL),ML(`Hmm`,vL),ML(`Hmmss`,yL),zL([`H`,`HH`],KL),zL([`k`,`kk`],function(e,t,n){var r=LL(e);t[KL]=r===24?0:r}),zL([`a`,`A`],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),zL([`h`,`hh`],function(e,t,n){t[KL]=LL(e),xI(n).bigHour=!0}),zL(`hmm`,function(e,t,n){var r=e.length-2;t[KL]=LL(e.substr(0,r)),t[qL]=LL(e.substr(r)),xI(n).bigHour=!0}),zL(`hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[KL]=LL(e.substr(0,r)),t[qL]=LL(e.substr(r,2)),t[JL]=LL(e.substr(i)),xI(n).bigHour=!0}),zL(`Hmm`,function(e,t,n){var r=e.length-2;t[KL]=LL(e.substr(0,r)),t[qL]=LL(e.substr(r))}),zL(`Hmmss`,function(e,t,n){var r=e.length-4,i=e.length-2;t[KL]=LL(e.substr(0,r)),t[qL]=LL(e.substr(r,2)),t[JL]=LL(e.substr(i))});function sz(e){return(e+``).toLowerCase().charAt(0)===`p`}var cz=/[ap]\.?m?\.?/i,lz=tR(`Hours`,!0);function uz(e,t,n){return e>11?n?`pm`:`PM`:n?`am`:`AM`}var dz={calendar:zI,longDateFormat:ZI,invalidDate:$I,ordinal:tL,dayOfMonthOrdinalParse:nL,relativeTime:iL,months:lR,monthsShort:uR,week:jR,weekdays:zR,weekdaysMin:VR,weekdaysShort:BR,meridiemParse:cz},fz={},pz={},mz;function hz(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function gz(e){return e&&e.toLowerCase().replace(`_`,`-`)}function _z(e){for(var t=0,n,r,i,a;t<e.length;){for(a=gz(e[t]).split(`-`),n=a.length,r=gz(e[t+1]),r=r?r.split(`-`):null;n>0;){if(i=yz(a.slice(0,n).join(`-`)),i)return i;if(r&&r.length>=n&&hz(a,r)>=n-1)break;n--}t++}return mz}function vz(e){return!!(e&&e.match(`^[^/\\\\]*$`))}function yz(e){var t=null,n;if(fz[e]===void 0&&typeof module<`u`&&module&&module.exports&&vz(e))try{t=mz._abbr,n=f,n(`./locale/`+e),bz(t)}catch{fz[e]=null}return fz[e]}function bz(e,t){var n;return e&&(n=mI(t)?Cz(e):xz(e,t),n?mz=n:typeof console<`u`&&console.warn&&console.warn(`Locale `+e+` not found. Did you forget to load it?`)),mz._abbr}function xz(e,t){if(t!==null){var n,r=dz;if(t.abbr=e,fz[e]!=null)NI(`defineLocaleOverride`,`use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.`),r=fz[e]._config;else if(t.parentLocale!=null)if(fz[t.parentLocale]!=null)r=fz[t.parentLocale]._config;else if(n=yz(t.parentLocale),n!=null)r=n._config;else return pz[t.parentLocale]||(pz[t.parentLocale]=[]),pz[t.parentLocale].push({name:e,config:t}),null;return fz[e]=new LI(II(r,t)),pz[e]&&pz[e].forEach(function(e){xz(e.name,e.config)}),bz(e),fz[e]}return delete fz[e],null}function Sz(e,t){if(t!=null){var n,r,i=dz;fz[e]!=null&&fz[e].parentLocale!=null?fz[e].set(II(fz[e]._config,t)):(r=yz(e),r!=null&&(i=r._config),t=II(i,t),r??(t.abbr=e),n=new LI(t),n.parentLocale=fz[e],fz[e]=n),bz(e)}else fz[e]!=null&&(fz[e].parentLocale==null?fz[e]!=null&&delete fz[e]:(fz[e]=fz[e].parentLocale,e===bz()&&bz(e)));return fz[e]}function Cz(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return mz;if(!uI(e)){if(t=yz(e),t)return t;e=[e]}return _z(e)}function wz(){return RI(fz)}function Tz(e){var t,n=e._a;return n&&xI(e).overflow===-2&&(t=n[WL]<0||n[WL]>11?WL:n[GL]<1||n[GL]>cR(n[UL],n[WL])?GL:n[KL]<0||n[KL]>24||n[KL]===24&&(n[qL]!==0||n[JL]!==0||n[YL]!==0)?KL:n[qL]<0||n[qL]>59?qL:n[JL]<0||n[JL]>59?JL:n[YL]<0||n[YL]>999?YL:-1,xI(e)._overflowDayOfYear&&(t<UL||t>GL)&&(t=GL),xI(e)._overflowWeeks&&t===-1&&(t=XL),xI(e)._overflowWeekday&&t===-1&&(t=ZL),xI(e).overflow=t),e}var Ez=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Dz=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Oz=/Z|[+-]\d\d(?::?\d\d)?/,kz=[[`YYYYYY-MM-DD`,/[+-]\d{6}-\d\d-\d\d/],[`YYYY-MM-DD`,/\d{4}-\d\d-\d\d/],[`GGGG-[W]WW-E`,/\d{4}-W\d\d-\d/],[`GGGG-[W]WW`,/\d{4}-W\d\d/,!1],[`YYYY-DDD`,/\d{4}-\d{3}/],[`YYYY-MM`,/\d{4}-\d\d/,!1],[`YYYYYYMMDD`,/[+-]\d{10}/],[`YYYYMMDD`,/\d{8}/],[`GGGG[W]WWE`,/\d{4}W\d{3}/],[`GGGG[W]WW`,/\d{4}W\d{2}/,!1],[`YYYYDDD`,/\d{7}/],[`YYYYMM`,/\d{6}/,!1],[`YYYY`,/\d{4}
vendor: 31,406 bytes, line 110
110/,!1]],Az=[[`HH:mm:ss.SSSS`,/\d\d:\d\d:\d\d\.\d+/],[`HH:mm:ss,SSSS`,/\d\d:\d\d:\d\d,\d+/],[`HH:mm:ss`,/\d\d:\d\d:\d\d/],[`HH:mm`,/\d\d:\d\d/],[`HHmmss.SSSS`,/\d\d\d\d\d\d\.\d+/],[`HHmmss,SSSS`,/\d\d\d\d\d\d,\d+/],[`HHmmss`,/\d\d\d\d\d\d/],[`HHmm`,/\d\d\d\d/],[`HH`,/\d\d/]],jz=/^\/?Date\((-?\d+)/i,Mz=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Nz={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Pz(e){var t,n,r=e._i,i=Ez.exec(r)||Dz.exec(r),a,o,s,c,l=kz.length,u=Az.length;if(i){for(xI(e).iso=!0,t=0,n=l;t<n;t++)if(kz[t][1].exec(i[1])){o=kz[t][0],a=kz[t][2]!==!1;break}if(o==null){e._isValid=!1;return}if(i[3]){for(t=0,n=u;t<n;t++)if(Az[t][1].exec(i[3])){s=(i[2]||` `)+Az[t][0];break}if(s==null){e._isValid=!1;return}}if(!a&&s!=null){e._isValid=!1;return}if(i[4])if(Oz.exec(i[4]))c=`Z`;else{e._isValid=!1;return}e._f=o+(s||``)+(c||``),Kz(e)}else e._isValid=!1}function Fz(e,t,n,r,i,a){var o=[Iz(e),uR.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}function Iz(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Lz(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).replace(/^\s\s*/,``).replace(/\s\s*$/,``)}function Rz(e,t,n){return e&&BR.indexOf(e)!==new Date(t[0],t[1],t[2]).getDay()?(xI(n).weekdayMismatch=!0,n._isValid=!1,!1):!0}function zz(e,t,n){if(e)return Nz[e];if(t)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}function Bz(e){var t=Mz.exec(Lz(e._i)),n;if(t){if(n=Fz(t[4],t[3],t[2],t[5],t[6],t[7]),!Rz(t[1],n,e))return;e._a=n,e._tzm=zz(t[8],t[9],t[10]),e._d=TR.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),xI(e).rfc2822=!0}else e._isValid=!1}function Vz(e){var t=jz.exec(e._i);if(t!==null){e._d=new Date(+t[1]);return}if(Pz(e),e._isValid===!1)delete e._isValid;else return;if(Bz(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:Q.createFromInputFallback(e)}Q.createFromInputFallback=jI(`value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.`,function(e){e._d=new Date(e._i+(e._useUTC?` UTC`:``))});function Hz(e,t,n){return e??t??n}function Uz(e){var t=new Date(Q.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function Wz(e){var t,n,r=[],i,a,o;if(!e._d){for(i=Uz(e),e._w&&e._a[GL]==null&&e._a[WL]==null&&Gz(e),e._dayOfYear!=null&&(o=Hz(e._a[UL],i[UL]),(e._dayOfYear>QL(o)||e._dayOfYear===0)&&(xI(e)._overflowDayOfYear=!0),n=TR(o,0,e._dayOfYear),e._a[WL]=n.getUTCMonth(),e._a[GL]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=i[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?+(t===2):e._a[t];e._a[KL]===24&&e._a[qL]===0&&e._a[JL]===0&&e._a[YL]===0&&(e._nextDay=!0,e._a[KL]=0),e._d=(e._useUTC?TR:wR).apply(null,r),a=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[KL]=24),e._w&&e._w.d!==void 0&&e._w.d!==a&&(xI(e).weekdayMismatch=!0)}}function Gz(e){var t=e._w,n,r,i,a,o,s,c,l;t.GG!=null||t.W!=null||t.E!=null?(a=1,o=4,n=Hz(t.GG,e._a[UL],OR(eB(),1,4).year),r=Hz(t.W,1),i=Hz(t.E,1),(i<1||i>7)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,l=OR(eB(),a,o),n=Hz(t.gg,e._a[UL],l.year),r=Hz(t.w,l.week),t.d==null?t.e==null?i=a:(i=t.e+a,(t.e<0||t.e>6)&&(c=!0)):(i=t.d,(i<0||i>6)&&(c=!0))),r<1||r>kR(n,a,o)?xI(e)._overflowWeeks=!0:c==null?(s=DR(n,r,i,a,o),e._a[UL]=s.year,e._dayOfYear=s.dayOfYear):xI(e)._overflowWeekday=!0}Q.ISO_8601=function(){},Q.RFC_2822=function(){};function Kz(e){if(e._f===Q.ISO_8601){Pz(e);return}if(e._f===Q.RFC_2822){Bz(e);return}e._a=[],xI(e).empty=!0;var t=``+e._i,n,r,i,a,o,s=t.length,c=0,l,u;for(i=XI(e._f,e._locale).match(HI)||[],u=i.length,n=0;n<u;n++)a=i[n],r=(t.match(NL(a,e))||[])[0],r&&(o=t.substr(0,t.indexOf(r)),o.length>0&&xI(e).unusedInput.push(o),t=t.slice(t.indexOf(r)+r.length),c+=r.length),GI[a]?(r?xI(e).empty=!1:xI(e).unusedTokens.push(a),VL(a,r,e)):e._strict&&!r&&xI(e).unusedTokens.push(a);xI(e).charsLeftOver=s-c,t.length>0&&xI(e).unusedInput.push(t),e._a[KL]<=12&&xI(e).bigHour===!0&&e._a[KL]>0&&(xI(e).bigHour=void 0),xI(e).parsedDateParts=e._a.slice(0),xI(e).meridiem=e._meridiem,e._a[KL]=qz(e._locale,e._a[KL],e._meridiem),l=xI(e).era,l!==null&&(e._a[UL]=e._locale.erasConvertYear(l,e._a[UL])),Wz(e),Tz(e)}function qz(e,t,n){var r;return n==null?t:e.meridiemHour==null?e.isPM==null?t:(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0),t):e.meridiemHour(t,n)}function Jz(e){var t,n,r,i,a,o,s=!1,c=e._f.length;if(c===0){xI(e).invalidFormat=!0,e._d=new Date(NaN);return}for(i=0;i<c;i++)a=0,o=!1,t=DI({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[i],Kz(t),CI(t)&&(o=!0),a+=xI(t).charsLeftOver,a+=xI(t).unusedTokens.length*10,xI(t).score=a,s?a<r&&(r=a,n=t):(r==null||a<r||o)&&(r=a,n=t,o&&(s=!0));vI(e,n||t)}function Yz(e){if(!e._d){var t=lL(e._i),n=t.day===void 0?t.date:t.day;e._a=_I([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),Wz(e)}}function Xz(e){var t=new OI(Tz(Zz(e)));return t._nextDay&&=(t.add(1,`d`),void 0),t}function Zz(e){var t=e._i,n=e._f;return e._locale=e._locale||Cz(e._l),t===null||n===void 0&&t===``?wI({nullInput:!0}):(typeof t==`string`&&(e._i=t=e._locale.preparse(t)),kI(t)?new OI(Tz(t)):(gI(t)?e._d=t:uI(n)?Jz(e):n?Kz(e):Qz(e),CI(e)||(e._d=null),e))}function Qz(e){var t=e._i;mI(t)?e._d=new Date(Q.now()):gI(t)?e._d=new Date(t.valueOf()):typeof t==`string`?Vz(e):uI(t)?(e._a=_I(t.slice(0),function(e){return parseInt(e,10)}),Wz(e)):dI(t)?Yz(e):hI(t)?e._d=new Date(t):Q.createFromInputFallback(e)}function $z(e,t,n,r,i){var a={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(dI(e)&&pI(e)||uI(e)&&e.length===0)&&(e=void 0),a._isAMomentObject=!0,a._useUTC=a._isUTC=i,a._l=n,a._i=e,a._f=t,a._strict=r,Xz(a)}function eB(e,t,n,r){return $z(e,t,n,r,!1)}var tB=jI(`moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=eB.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:wI()}),nB=jI(`moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=eB.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:wI()});function rB(e,t){var n,r;if(t.length===1&&uI(t[0])&&(t=t[0]),!t.length)return eB();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function iB(){return rB(`isBefore`,[].slice.call(arguments,0))}function aB(){return rB(`isAfter`,[].slice.call(arguments,0))}var oB=function(){return Date.now?Date.now():+new Date},sB=[`year`,`quarter`,`month`,`week`,`day`,`hour`,`minute`,`second`,`millisecond`];function cB(e){var t,n=!1,r,i=sB.length;for(t in e)if(fI(e,t)&&!(sR.call(sB,t)!==-1&&(e[t]==null||!isNaN(e[t]))))return!1;for(r=0;r<i;++r)if(e[sB[r]]){if(n)return!1;parseFloat(e[sB[r]])!==LL(e[sB[r]])&&(n=!0)}return!0}function lB(){return this._isValid}function uB(){return NB(NaN)}function dB(e){var t=lL(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||t.isoWeek||0,o=t.day||0,s=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._isValid=cB(t),this._milliseconds=+u+l*1e3+c*6e4+s*1e3*60*60,this._days=+o+a*7,this._months=+i+r*3+n*12,this._data={},this._locale=Cz(),this._bubble()}function fB(e){return e instanceof dB}function pB(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function mB(e,t,n){var r=Math.min(e.length,t.length),i=Math.abs(e.length-t.length),a=0,o;for(o=0;o<r;o++)(n&&e[o]!==t[o]||!n&&LL(e[o])!==LL(t[o]))&&a++;return a+i}function hB(e,t){KI(e,0,0,function(){var e=this.utcOffset(),n=`+`;return e<0&&(e=-e,n=`-`),n+VI(~~(e/60),2)+t+VI(~~e%60,2)})}hB(`Z`,`:`),hB(`ZZ`,``),ML(`Z`,EL),ML(`ZZ`,EL),zL([`Z`,`ZZ`],function(e,t,n){n._useUTC=!0,n._tzm=_B(EL,e)});var gB=/([\+\-]|\d\d)/gi;function _B(e,t){var n=(t||``).match(e),r,i,a;return n===null?null:(r=n[n.length-1]||[],i=(r+``).match(gB)||[`-`,0,0],a=+(i[1]*60)+LL(i[2]),a===0?0:i[0]===`+`?a:-a)}function vB(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(kI(e)||gI(e)?e.valueOf():eB(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),Q.updateOffset(n,!1),n):eB(e).local()}function yB(e){return-Math.round(e._d.getTimezoneOffset())}Q.updateOffset=function(){};function bB(e,t,n){var r=this._offset||0,i;if(!this.isValid())return e==null?NaN:this;if(e!=null){if(typeof e==`string`){if(e=_B(EL,e),e===null)return this}else Math.abs(e)<16&&!n&&(e*=60);return!this._isUTC&&t&&(i=yB(this)),this._offset=e,this._isUTC=!0,i!=null&&this.add(i,`m`),r!==e&&(!t||this._changeInProgress?RB(this,NB(e-r,`m`),1,!1):this._changeInProgress||=(this._changeInProgress=!0,Q.updateOffset(this,!0),null)),this}return this._isUTC?r:yB(this)}function xB(e,t){return e==null?-this.utcOffset():(typeof e!=`string`&&(e=-e),this.utcOffset(e,t),this)}function SB(e){return this.utcOffset(0,e)}function CB(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(yB(this),`m`)),this}function wB(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==`string`){var e=_B(TL,this._i);e==null?this.utcOffset(0,!0):this.utcOffset(e)}return this}function TB(e){return this.isValid()?(e=e?eB(e).utcOffset():0,(this.utcOffset()-e)%60==0):!1}function EB(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function DB(){if(!mI(this._isDSTShifted))return this._isDSTShifted;var e={},t;return DI(e,this),e=Zz(e),e._a?(t=e._isUTC?yI(e._a):eB(e._a),this._isDSTShifted=this.isValid()&&mB(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function OB(){return this.isValid()?!this._isUTC:!1}function kB(){return this.isValid()?this._isUTC:!1}function AB(){return this.isValid()?this._isUTC&&this._offset===0:!1}var jB=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,MB=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function NB(e,t){var n=e,r=null,i,a,o;return fB(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:hI(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=jB.exec(e))?(i=r[1]===`-`?-1:1,n={y:0,d:LL(r[GL])*i,h:LL(r[KL])*i,m:LL(r[qL])*i,s:LL(r[JL])*i,ms:LL(pB(r[YL]*1e3))*i}):(r=MB.exec(e))?(i=r[1]===`-`?-1:1,n={y:PB(r[2],i),M:PB(r[3],i),w:PB(r[4],i),d:PB(r[5],i),h:PB(r[6],i),m:PB(r[7],i),s:PB(r[8],i)}):n==null?n={}:typeof n==`object`&&(`from`in n||`to`in n)&&(o=IB(eB(n.from),eB(n.to)),n={},n.ms=o.milliseconds,n.M=o.months),a=new dB(n),fB(e)&&fI(e,`_locale`)&&(a._locale=e._locale),fB(e)&&fI(e,`_isValid`)&&(a._isValid=e._isValid),a}NB.fn=dB.prototype,NB.invalid=uB;function PB(e,t){var n=e&&parseFloat(e.replace(`,`,`.`));return(isNaN(n)?0:n)*t}function FB(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,`M`).isAfter(t)&&--n.months,n.milliseconds=t-+e.clone().add(n.months,`M`),n}function IB(e,t){var n;return e.isValid()&&t.isValid()?(t=vB(t,e),e.isBefore(t)?n=FB(e,t):(n=FB(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function LB(e,t){return function(n,r){var i,a;return r!==null&&!isNaN(+r)&&(NI(t,`moment().`+t+`(period, number) is deprecated. Please use moment().`+t+`(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.`),a=n,n=r,r=a),i=NB(n,r),RB(this,i,e),this}}function RB(e,t,n,r){var i=t._milliseconds,a=pB(t._days),o=pB(t._months);e.isValid()&&(r??=!0,o&&vR(e,nR(e,`Month`)+o*n),a&&rR(e,`Date`,nR(e,`Date`)+a*n),i&&e._d.setTime(e._d.valueOf()+i*n),r&&Q.updateOffset(e,a||o))}var zB=LB(1,`add`),BB=LB(-1,`subtract`);function VB(e){return typeof e==`string`||e instanceof String}function HB(e){return kI(e)||gI(e)||VB(e)||hI(e)||WB(e)||UB(e)||e==null}function UB(e){var t=dI(e)&&!pI(e),n=!1,r=[`years`,`year`,`y`,`months`,`month`,`M`,`days`,`day`,`d`,`dates`,`date`,`D`,`hours`,`hour`,`h`,`minutes`,`minute`,`m`,`seconds`,`second`,`s`,`milliseconds`,`millisecond`,`ms`],i,a,o=r.length;for(i=0;i<o;i+=1)a=r[i],n||=fI(e,a);return t&&n}function WB(e){var t=uI(e),n=!1;return t&&(n=e.filter(function(t){return!hI(t)&&VB(e)}).length===0),t&&n}function GB(e){var t=dI(e)&&!pI(e),n=!1,r=[`sameDay`,`nextDay`,`lastDay`,`nextWeek`,`lastWeek`,`sameElse`],i,a;for(i=0;i<r.length;i+=1)a=r[i],n||=fI(e,a);return t&&n}function KB(e,t){var n=e.diff(t,`days`,!0);return n<-6?`sameElse`:n<-1?`lastWeek`:n<0?`lastDay`:n<1?`sameDay`:n<2?`nextDay`:n<7?`nextWeek`:`sameElse`}function qB(e,t){arguments.length===1&&(arguments[0]?HB(arguments[0])?(e=arguments[0],t=void 0):GB(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var n=e||eB(),r=vB(n,this).startOf(`day`),i=Q.calendarFormat(this,r)||`sameElse`,a=t&&(PI(t[i])?t[i].call(this,n):t[i]);return this.format(a||this.localeData().calendar(i,this,eB(n)))}function JB(){return new OI(this)}function YB(e,t){var n=kI(e)?e:eB(e);return this.isValid()&&n.isValid()?(t=cL(t)||`millisecond`,t===`millisecond`?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function XB(e,t){var n=kI(e)?e:eB(e);return this.isValid()&&n.isValid()?(t=cL(t)||`millisecond`,t===`millisecond`?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function ZB(e,t,n,r){var i=kI(e)?e:eB(e),a=kI(t)?t:eB(t);return this.isValid()&&i.isValid()&&a.isValid()?(r||=`()`,(r[0]===`(`?this.isAfter(i,n):!this.isBefore(i,n))&&(r[1]===`)`?this.isBefore(a,n):!this.isAfter(a,n))):!1}function QB(e,t){var n=kI(e)?e:eB(e),r;return this.isValid()&&n.isValid()?(t=cL(t)||`millisecond`,t===`millisecond`?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function $B(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function eV(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function tV(e,t,n){var r,i,a;if(!this.isValid()||(r=vB(e,this),!r.isValid()))return NaN;switch(i=(r.utcOffset()-this.utcOffset())*6e4,t=cL(t),t){case`year`:a=nV(this,r)/12;break;case`month`:a=nV(this,r);break;case`quarter`:a=nV(this,r)/3;break;case`second`:a=(this-r)/1e3;break;case`minute`:a=(this-r)/6e4;break;case`hour`:a=(this-r)/36e5;break;case`day`:a=(this-r-i)/864e5;break;case`week`:a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:IL(a)}function nV(e,t){if(e.date()<t.date())return-nV(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,`months`),i,a;return t-r<0?(i=e.clone().add(n-1,`months`),a=(t-r)/(r-i)):(i=e.clone().add(n+1,`months`),a=(t-r)/(i-r)),-(n+a)||0}Q.defaultFormat=`YYYY-MM-DDTHH:mm:ssZ`,Q.defaultFormatUtc=`YYYY-MM-DDTHH:mm:ss[Z]`;function rV(){return this.clone().locale(`en`).format(`ddd MMM DD YYYY HH:mm:ss [GMT]ZZ`)}function iV(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?YI(n,t?`YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYYYY-MM-DD[T]HH:mm:ss.SSSZ`):PI(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace(`Z`,YI(n,`Z`)):YI(n,t?`YYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYY-MM-DD[T]HH:mm:ss.SSSZ`)}function aV(){if(!this.isValid())return`moment.invalid(/* `+this._i+` */)`;var e=`moment`,t=``,n,r,i,a;return this.isLocal()||(e=this.utcOffset()===0?`moment.utc`:`moment.parseZone`,t=`Z`),n=`[`+e+`("]`,r=0<=this.year()&&this.year()<=9999?`YYYY`:`YYYYYY`,i=`-MM-DD[T]HH:mm:ss.SSS`,a=t+`[")]`,this.format(n+r+i+a)}function oV(e){e||=this.isUtc()?Q.defaultFormatUtc:Q.defaultFormat;var t=YI(this,e);return this.localeData().postformat(t)}function sV(e,t){return this.isValid()&&(kI(e)&&e.isValid()||eB(e).isValid())?NB({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function cV(e){return this.from(eB(),e)}function lV(e,t){return this.isValid()&&(kI(e)&&e.isValid()||eB(e).isValid())?NB({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function uV(e){return this.to(eB(),e)}function dV(e){var t;return e===void 0?this._locale._abbr:(t=Cz(e),t!=null&&(this._locale=t),this)}var fV=jI(`moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.`,function(e){return e===void 0?this.localeData():this.locale(e)});function pV(){return this._locale}var mV=1e3,hV=60*mV,gV=60*hV,_V=3506328*gV;function vV(e,t){return(e%t+t)%t}function yV(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-_V:new Date(e,t,n).valueOf()}function bV(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-_V:Date.UTC(e,t,n)}function xV(e){var t,n;if(e=cL(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?bV:yV,e){case`year`:t=n(this.year(),0,1);break;case`quarter`:t=n(this.year(),this.month()-this.month()%3,1);break;case`month`:t=n(this.year(),this.month(),1);break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday());break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case`day`:case`date`:t=n(this.year(),this.month(),this.date());break;case`hour`:t=this._d.valueOf(),t-=vV(t+(this._isUTC?0:this.utcOffset()*hV),gV);break;case`minute`:t=this._d.valueOf(),t-=vV(t,hV);break;case`second`:t=this._d.valueOf(),t-=vV(t,mV)}return this._d.setTime(t),Q.updateOffset(this,!0),this}function SV(e){var t,n;if(e=cL(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(n=this._isUTC?bV:yV,e){case`year`:t=n(this.year()+1,0,1)-1;break;case`quarter`:t=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case`month`:t=n(this.year(),this.month()+1,1)-1;break;case`week`:t=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case`isoWeek`:t=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case`day`:case`date`:t=n(this.year(),this.month(),this.date()+1)-1;break;case`hour`:t=this._d.valueOf(),t+=gV-vV(t+(this._isUTC?0:this.utcOffset()*hV),gV)-1;break;case`minute`:t=this._d.valueOf(),t+=hV-vV(t,hV)-1;break;case`second`:t=this._d.valueOf(),t+=mV-vV(t,mV)-1}return this._d.setTime(t),Q.updateOffset(this,!0),this}function CV(){return this._d.valueOf()-(this._offset||0)*6e4}function wV(){return Math.floor(this.valueOf()/1e3)}function TV(){return new Date(this.valueOf())}function EV(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function DV(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function OV(){return this.isValid()?this.toISOString():null}function kV(){return CI(this)}function AV(){return vI({},xI(this))}function jV(){return xI(this).overflow}function MV(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}KI(`N`,0,0,`eraAbbr`),KI(`NN`,0,0,`eraAbbr`),KI(`NNN`,0,0,`eraAbbr`),KI(`NNNN`,0,0,`eraName`),KI(`NNNNN`,0,0,`eraNarrow`),KI(`y`,[`y`,1],`yo`,`eraYear`),KI(`y`,[`yy`,2],0,`eraYear`),KI(`y`,[`yyy`,3],0,`eraYear`),KI(`y`,[`yyyy`,4],0,`eraYear`),ML(`N`,UV),ML(`NN`,UV),ML(`NNN`,UV),ML(`NNNN`,WV),ML(`NNNNN`,GV),zL([`N`,`NN`,`NNN`,`NNNN`,`NNNNN`],function(e,t,n,r){var i=n._locale.erasParse(e,r,n._strict);i?xI(n).era=i:xI(n).invalidEra=e}),ML(`y`,CL),ML(`yy`,CL),ML(`yyy`,CL),ML(`yyyy`,CL),ML(`yo`,KV),zL([`y`,`yy`,`yyy`,`yyyy`],UL),zL([`yo`],function(e,t,n,r){var i;n._locale._eraYearOrdinalRegex&&(i=e.match(n._locale._eraYearOrdinalRegex)),t[UL]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,i):parseInt(e,10)});function NV(e,t){var n,r,i,a=this._eras||Cz(`en`)._eras;for(n=0,r=a.length;n<r;++n)switch(typeof a[n].since==`string`&&(i=Q(a[n].since).startOf(`day`),a[n].since=i.valueOf()),typeof a[n].until){case`undefined`:a[n].until=1/0;break;case`string`:i=Q(a[n].until).startOf(`day`).valueOf(),a[n].until=i.valueOf()}return a}function PV(e,t,n){var r,i,a=this.eras(),o,s,c;for(e=e.toUpperCase(),r=0,i=a.length;r<i;++r)if(o=a[r].name.toUpperCase(),s=a[r].abbr.toUpperCase(),c=a[r].narrow.toUpperCase(),n)switch(t){case`N`:case`NN`:case`NNN`:if(s===e)return a[r];break;case`NNNN`:if(o===e)return a[r];break;case`NNNNN`:if(c===e)return a[r]}else if([o,s,c].indexOf(e)>=0)return a[r]}function FV(e,t){var n=e.since<=e.until?1:-1;return t===void 0?Q(e.since).year():Q(e.since).year()+(t-e.offset)*n}function IV(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return``}function LV(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return``}function RV(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return``}function zV(){var e,t,n,r,i=this.localeData().eras();for(e=0,t=i.length;e<t;++e)if(n=i[e].since<=i[e].until?1:-1,r=this.clone().startOf(`day`).valueOf(),i[e].since<=r&&r<=i[e].until||i[e].until<=r&&r<=i[e].since)return(this.year()-Q(i[e].since).year())*n+i[e].offset;return this.year()}function BV(e){return fI(this,`_erasNameRegex`)||qV.call(this),e?this._erasNameRegex:this._erasRegex}function VV(e){return fI(this,`_erasAbbrRegex`)||qV.call(this),e?this._erasAbbrRegex:this._erasRegex}function HV(e){return fI(this,`_erasNarrowRegex`)||qV.call(this),e?this._erasNarrowRegex:this._erasRegex}function UV(e,t){return t.erasAbbrRegex(e)}function WV(e,t){return t.erasNameRegex(e)}function GV(e,t){return t.erasNarrowRegex(e)}function KV(e,t){return t._eraYearOrdinalRegex||CL}function qV(){var e=[],t=[],n=[],r=[],i,a,o,s,c,l=this.eras();for(i=0,a=l.length;i<a;++i)o=FL(l[i].name),s=FL(l[i].abbr),c=FL(l[i].narrow),t.push(o),e.push(s),n.push(c),r.push(o),r.push(s),r.push(c);this._erasRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._erasNameRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`),this._erasAbbrRegex=RegExp(`^(`+e.join(`|`)+`)`,`i`),this._erasNarrowRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`)}KI(0,[`gg`,2],0,function(){return this.weekYear()%100}),KI(0,[`GG`,2],0,function(){return this.isoWeekYear()%100});function JV(e,t){KI(0,[e,e.length],0,t)}JV(`gggg`,`weekYear`),JV(`ggggg`,`weekYear`),JV(`GGGG`,`isoWeekYear`),JV(`GGGGG`,`isoWeekYear`),ML(`G`,wL),ML(`g`,wL),ML(`GG`,_L,pL),ML(`gg`,_L,pL),ML(`GGGG`,xL,hL),ML(`gggg`,xL,hL),ML(`GGGGG`,SL,gL),ML(`ggggg`,SL,gL),BL([`gggg`,`ggggg`,`GGGG`,`GGGGG`],function(e,t,n,r){t[r.substr(0,2)]=LL(e)}),BL([`gg`,`GG`],function(e,t,n,r){t[r]=Q.parseTwoDigitYear(e)});function YV(e){return tH.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function XV(e){return tH.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function ZV(){return kR(this.year(),1,4)}function QV(){return kR(this.isoWeekYear(),1,4)}function $V(){var e=this.localeData()._week;return kR(this.year(),e.dow,e.doy)}function eH(){var e=this.localeData()._week;return kR(this.weekYear(),e.dow,e.doy)}function tH(e,t,n,r,i){var a;return e==null?OR(this,r,i).year:(a=kR(e,r,i),t>a&&(t=a),nH.call(this,e,t,n,r,i))}function nH(e,t,n,r,i){var a=DR(e,t,n,r,i),o=TR(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}KI(`Q`,0,`Qo`,`quarter`),ML(`Q`,fL),zL(`Q`,function(e,t){t[WL]=(LL(e)-1)*3});function rH(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}KI(`D`,[`DD`,2],`Do`,`date`),ML(`D`,_L,kL),ML(`DD`,_L,pL),ML(`Do`,function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),zL([`D`,`DD`],GL),zL(`Do`,function(e,t){t[GL]=LL(e.match(_L)[0])});var iH=tR(`Date`,!0);KI(`DDD`,[`DDDD`,3],`DDDo`,`dayOfYear`),ML(`DDD`,bL),ML(`DDDD`,mL),zL([`DDD`,`DDDD`],function(e,t,n){n._dayOfYear=LL(e)});function aH(e){var t=Math.round((this.clone().startOf(`day`)-this.clone().startOf(`year`))/864e5)+1;return e==null?t:this.add(e-t,`d`)}KI(`m`,[`mm`,2],0,`minute`),ML(`m`,_L,AL),ML(`mm`,_L,pL),zL([`m`,`mm`],qL);var oH=tR(`Minutes`,!1);KI(`s`,[`ss`,2],0,`second`),ML(`s`,_L,AL),ML(`ss`,_L,pL),zL([`s`,`ss`],JL);var sH=tR(`Seconds`,!1);KI(`S`,0,0,function(){return~~(this.millisecond()/100)}),KI(0,[`SS`,2],0,function(){return~~(this.millisecond()/10)}),KI(0,[`SSS`,3],0,`millisecond`),KI(0,[`SSSS`,4],0,function(){return this.millisecond()*10}),KI(0,[`SSSSS`,5],0,function(){return this.millisecond()*100}),KI(0,[`SSSSSS`,6],0,function(){return this.millisecond()*1e3}),KI(0,[`SSSSSSS`,7],0,function(){return this.millisecond()*1e4}),KI(0,[`SSSSSSSS`,8],0,function(){return this.millisecond()*1e5}),KI(0,[`SSSSSSSSS`,9],0,function(){return this.millisecond()*1e6}),ML(`S`,bL,fL),ML(`SS`,bL,pL),ML(`SSS`,bL,mL);var cH,lH;for(cH=`SSSS`;cH.length<=9;cH+=`S`)ML(cH,CL);function uH(e,t){t[YL]=LL((`0.`+e)*1e3)}for(cH=`S`;cH.length<=9;cH+=`S`)zL(cH,uH);lH=tR(`Milliseconds`,!1),KI(`z`,0,0,`zoneAbbr`),KI(`zz`,0,0,`zoneName`);function dH(){return this._isUTC?`UTC`:``}function fH(){return this._isUTC?`Coordinated Universal Time`:``}var $=OI.prototype;$.add=zB,$.calendar=qB,$.clone=JB,$.diff=tV,$.endOf=SV,$.format=oV,$.from=sV,$.fromNow=cV,$.to=lV,$.toNow=uV,$.get=iR,$.invalidAt=jV,$.isAfter=YB,$.isBefore=XB,$.isBetween=ZB,$.isSame=QB,$.isSameOrAfter=$B,$.isSameOrBefore=eV,$.isValid=kV,$.lang=fV,$.locale=dV,$.localeData=pV,$.max=nB,$.min=tB,$.parsingFlags=AV,$.set=aR,$.startOf=xV,$.subtract=BB,$.toArray=EV,$.toObject=DV,$.toDate=TV,$.toISOString=iV,$.inspect=aV,typeof Symbol<`u`&&Symbol.for!=null&&($[Symbol.for(`nodejs.util.inspect.custom`)]=function(){return`Moment<`+this.format()+`>`}),$.toJSON=OV,$.toString=rV,$.unix=wV,$.valueOf=CV,$.creationData=MV,$.eraName=IV,$.eraNarrow=LV,$.eraAbbr=RV,$.eraYear=zV,$.year=$L,$.isLeapYear=eR,$.weekYear=YV,$.isoWeekYear=XV,$.quarter=$.quarters=rH,$.month=yR,$.daysInMonth=bR,$.week=$.weeks=PR,$.isoWeek=$.isoWeeks=FR,$.weeksInYear=$V,$.weeksInWeekYear=eH,$.isoWeeksInYear=ZV,$.isoWeeksInISOWeekYear=QV,$.date=iH,$.day=$.days=XR,$.weekday=ZR,$.isoWeekday=QR,$.dayOfYear=aH,$.hour=$.hours=lz,$.minute=$.minutes=oH,$.second=$.seconds=sH,$.millisecond=$.milliseconds=lH,$.utcOffset=bB,$.utc=SB,$.local=CB,$.parseZone=wB,$.hasAlignedHourOffset=TB,$.isDST=EB,$.isLocal=OB,$.isUtcOffset=kB,$.isUtc=AB,$.isUTC=AB,$.zoneAbbr=dH,$.zoneName=fH,$.dates=jI(`dates accessor is deprecated. Use date instead.`,iH),$.months=jI(`months accessor is deprecated. Use month instead`,yR),$.years=jI(`years accessor is deprecated. Use year instead`,$L),$.zone=jI(`moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/`,xB),$.isDSTShifted=jI(`isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information`,DB);function pH(e){return eB(e*1e3)}function mH(){return eB.apply(null,arguments).parseZone()}function hH(e){return e}var gH=LI.prototype;gH.calendar=BI,gH.longDateFormat=QI,gH.invalidDate=eL,gH.ordinal=rL,gH.preparse=hH,gH.postformat=hH,gH.relativeTime=aL,gH.pastFuture=oL,gH.set=FI,gH.eras=NV,gH.erasParse=PV,gH.erasConvertYear=FV,gH.erasAbbrRegex=VV,gH.erasNameRegex=BV,gH.erasNarrowRegex=HV,gH.months=mR,gH.monthsShort=hR,gH.monthsParse=_R,gH.monthsRegex=SR,gH.monthsShortRegex=xR,gH.week=AR,gH.firstDayOfYear=NR,gH.firstDayOfWeek=MR,gH.weekdays=GR,gH.weekdaysMin=qR,gH.weekdaysShort=KR,gH.weekdaysParse=YR,gH.weekdaysRegex=$R,gH.weekdaysShortRegex=ez,gH.weekdaysMinRegex=tz,gH.isPM=sz,gH.meridiem=uz;function _H(e,t,n,r){var i=Cz(),a=yI().set(r,t);return i[n](a,e)}function vH(e,t,n){if(hI(e)&&(t=e,e=void 0),e||=``,t!=null)return _H(e,t,n,`month`);var r,i=[];for(r=0;r<12;r++)i[r]=_H(e,r,n,`month`);return i}function yH(e,t,n,r){typeof e==`boolean`?(hI(t)&&(n=t,t=void 0),t||=``):(t=e,n=t,e=!1,hI(t)&&(n=t,t=void 0),t||=``);var i=Cz(),a=e?i._week.dow:0,o,s=[];if(n!=null)return _H(t,(n+a)%7,r,`day`);for(o=0;o<7;o++)s[o]=_H(t,(o+a)%7,r,`day`);return s}function bH(e,t){return vH(e,t,`months`)}function xH(e,t){return vH(e,t,`monthsShort`)}function SH(e,t,n){return yH(e,t,n,`weekdays`)}function CH(e,t,n){return yH(e,t,n,`weekdaysShort`)}function wH(e,t,n){return yH(e,t,n,`weekdaysMin`)}bz(`en`,{eras:[{since:`0001-01-01`,until:1/0,offset:1,name:`Anno Domini`,narrow:`AD`,abbr:`AD`},{since:`0000-12-31`,until:-1/0,offset:1,name:`Before Christ`,narrow:`BC`,abbr:`BC`}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(LL(e%100/10)===1?`th`:t===1?`st`:t===2?`nd`:t===3?`rd`:`th`)}}),Q.lang=jI(`moment.lang is deprecated. Use moment.locale instead.`,bz),Q.langData=jI(`moment.langData is deprecated. Use moment.localeData instead.`,Cz);var TH=Math.abs;function EH(){var e=this._data;return this._milliseconds=TH(this._milliseconds),this._days=TH(this._days),this._months=TH(this._months),e.milliseconds=TH(e.milliseconds),e.seconds=TH(e.seconds),e.minutes=TH(e.minutes),e.hours=TH(e.hours),e.months=TH(e.months),e.years=TH(e.years),this}function DH(e,t,n,r){var i=NB(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function OH(e,t){return DH(this,e,t,1)}function kH(e,t){return DH(this,e,t,-1)}function AH(e){return e<0?Math.floor(e):Math.ceil(e)}function jH(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,i,a,o,s,c;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=AH(NH(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,i=IL(e/1e3),r.seconds=i%60,a=IL(i/60),r.minutes=a%60,o=IL(a/60),r.hours=o%24,t+=IL(o/24),c=IL(MH(t)),n+=c,t-=AH(NH(c)),s=IL(n/12),n%=12,r.days=t,r.months=n,r.years=s,this}function MH(e){return e*4800/146097}function NH(e){return e*146097/4800}function PH(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=cL(e),e===`month`||e===`quarter`||e===`year`)switch(t=this._days+r/864e5,n=this._months+MH(t),e){case`month`:return n;case`quarter`:return n/3;case`year`:return n/12}else switch(t=this._days+Math.round(NH(this._months)),e){case`week`:return t/7+r/6048e5;case`day`:return t+r/864e5;case`hour`:return t*24+r/36e5;case`minute`:return t*1440+r/6e4;case`second`:return t*86400+r/1e3;case`millisecond`:return Math.floor(t*864e5)+r;default:throw Error(`Unknown unit `+e)}}function FH(e){return function(){return this.as(e)}}var IH=FH(`ms`),LH=FH(`s`),RH=FH(`m`),zH=FH(`h`),BH=FH(`d`),VH=FH(`w`),HH=FH(`M`),UH=FH(`Q`),WH=FH(`y`),GH=IH;function KH(){return NB(this)}function qH(e){return e=cL(e),this.isValid()?this[e+`s`]():NaN}function JH(e){return function(){return this.isValid()?this._data[e]:NaN}}var YH=JH(`milliseconds`),XH=JH(`seconds`),ZH=JH(`minutes`),QH=JH(`hours`),$H=JH(`days`),eU=JH(`months`),tU=JH(`years`);function nU(){return IL(this.days()/7)}var rU=Math.round,iU={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function aU(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}function oU(e,t,n,r){var i=NB(e).abs(),a=rU(i.as(`s`)),o=rU(i.as(`m`)),s=rU(i.as(`h`)),c=rU(i.as(`d`)),l=rU(i.as(`M`)),u=rU(i.as(`w`)),d=rU(i.as(`y`)),f=a<=n.ss&&[`s`,a]||a<n.s&&[`ss`,a
110]||o<=1&&[`m`]||o<n.m&&[`mm`,o]||s<=1&&[`h`]||s<n.h&&[`hh`,s]||c<=1&&[`d`]||c<n.d&&[`dd`,c];return n.w!=null&&(f=f||u<=1&&[`w`]||u<n.w&&[`ww`,u]),f=f||l<=1&&[`M`]||l<n.M&&[`MM`,l]||d<=1&&[`y`]||[`yy`,d],f[2]=t,f[3]=+e>0,f[4]=r,aU.apply(null,f)}function sU(e){return e===void 0?rU:typeof e==`function`&&(rU=e,!0)}function cU(e,t){return iU[e]===void 0?!1:t===void 0?iU[e]:(iU[e]=t,e===`s`&&(iU.ss=t-1),!0)}function lU(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=iU,i,a;return typeof e==`object`&&(t=e,e=!1),typeof e==`boolean`&&(n=e),typeof t==`object`&&(r=Object.assign({},iU,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),i=this.localeData(),a=oU(this,!n,r,i),n&&(a=i.pastFuture(+this,a)),i.postformat(a)}var uU=Math.abs;function dU(e){return(e>0)-(e<0)||+e}function fU(){if(!this.isValid())return this.localeData().invalidDate();var e=uU(this._milliseconds)/1e3,t=uU(this._days),n=uU(this._months),r,i,a,o,s=this.asSeconds(),c,l,u,d;return s?(r=IL(e/60),i=IL(r/60),e%=60,r%=60,a=IL(n/12),n%=12,o=e?e.toFixed(3).replace(/\.?0+$/,``):``,c=s<0?`-`:``,l=dU(this._months)===dU(s)?``:`-`,u=dU(this._days)===dU(s)?``:`-`,d=dU(this._milliseconds)===dU(s)?``:`-`,c+`P`+(a?l+a+`Y`:``)+(n?l+n+`M`:``)+(t?u+t+`D`:``)+(i||r||e?`T`:``)+(i?d+i+`H`:``)+(r?d+r+`M`:``)+(e?d+o+`S`:``)):`P0D`}var pU=dB.prototype;pU.isValid=lB,pU.abs=EH,pU.add=OH,pU.subtract=kH,pU.as=PH,pU.asMilliseconds=IH,pU.asSeconds=LH,pU.asMinutes=RH,pU.asHours=zH,pU.asDays=BH,pU.asWeeks=VH,pU.asMonths=HH,pU.asQuarters=UH,pU.asYears=WH,pU.valueOf=GH,pU._bubble=jH,pU.clone=KH,pU.get=qH,pU.milliseconds=YH,pU.seconds=XH,pU.minutes=ZH,pU.hours=QH,pU.days=$H,pU.weeks=nU,pU.months=eU,pU.years=tU,pU.humanize=lU,pU.toISOString=fU,pU.toString=fU,pU.toJSON=fU,pU.locale=dV,pU.localeData=pV,pU.toIsoString=jI(`toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)`,fU),pU.lang=fV,KI(`X`,0,0,`unix`),KI(`x`,0,0,`valueOf`),ML(`x`,wL),ML(`X`,DL),zL(`X`,function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),zL(`x`,function(e,t,n){n._d=new Date(LL(e))}),Q.version=`2.30.1`,lI(eB),Q.fn=$,Q.min=iB,Q.max=aB,Q.now=oB,Q.utc=yI,Q.unix=pH,Q.months=bH,Q.isDate=gI,Q.locale=bz,Q.invalid=wI,Q.duration=NB,Q.isMoment=kI,Q.weekdays=SH,Q.parseZone=mH,Q.localeData=Cz,Q.isDuration=fB,Q.monthsShort=xH,Q.weekdaysMin=wH,Q.defineLocale=xz,Q.updateLocale=Sz,Q.locales=wz,Q.weekdaysShort=CH,Q.normalizeUnits=cL,Q.relativeTimeRounding=sU,Q.relativeTimeThreshold=cU,Q.calendarFormat=KB,Q.prototype=$,Q.HTML5_FMT={DATETIME_LOCAL:`YYYY-MM-DDTHH:mm`,DATETIME_LOCAL_SECONDS:`YYYY-MM-DDTHH:mm:ss`,DATETIME_LOCAL_MS:`YYYY-MM-DDTHH:mm:ss.SSS`,DATE:`YYYY-MM-DD`,TIME:`HH:mm`,TIME_SECONDS:`HH:mm:ss`,TIME_MS:`HH:mm:ss.SSS`,WEEK:`GGGG-[W]WW`,MONTH:`YYYY-MM`};function mU({app:e,feedback:t,onOutcomeChange:n,onAddFeedback:r}){let[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(!1),c=e.committee_outcome||`pending`;return(0,z.jsxs)(`div`,{className:`rounded-xl border border-border bg-secondary/30 p-4 space-y-5`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h4`,{className:`text-xs uppercase tracking-wide text-muted-foreground mb-2`,children:`Committee decision`}),(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,z.jsxs)(VN,{value:c,onValueChange:t=>n(e,t),children:[(0,z.jsx)(UN,{className:`h-8 w-full sm:w-[280px] text-xs`,children:(0,z.jsx)(HN,{})}),(0,z.jsx)(KN,{children:Object.entries(OD).map(([e,t])=>(0,z.jsx)(JN,{value:e,children:t.label},e))})]}),e.committee_decision_date&&(0,z.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`Decided `,Q(e.committee_decision_date).format(`DD MMM YYYY`)]})]}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-2`,children:`Choosing âApprovedâ turns the application green and emails the Certificate of Consent to the applicant.`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h4`,{className:`text-xs uppercase tracking-wide text-muted-foreground mb-2`,children:`Committee feedback`}),(0,z.jsxs)(`p`,{className:`text-xs text-muted-foreground mb-2`,children:[`Type `,(0,z.jsx)(`code`,{className:`bg-card border border-border/70 rounded px-1`,children:`@`}),` in your message to email it to the applicant â e.g. â@Could you provide a breakdown of the anticipated costs?â`]}),(0,z.jsx)(AD,{value:i,onChange:e=>a(e.target.value),rows:3,placeholder:`Record a note for the committee, or include @ to request information from the applicantâ¦`}),(0,z.jsxs)(Qh,{size:`sm`,className:`mt-2`,disabled:o||!i.trim(),onClick:async()=>{let t=i.trim();if(t){s(!0);try{await r(e,t),a(``)}finally{s(!1)}}},children:[(0,z.jsx)(Qn,{className:`w-3.5 h-3.5`}),o?`Sendingâ¦`:i.includes(`@`)?`Send to applicant`:`Add note`]})]}),t.length>0&&(0,z.jsx)(`ul`,{className:`space-y-2`,children:t.map(e=>(0,z.jsxs)(`li`,{className:`text-sm rounded-lg border border-border/70 bg-card p-3`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between gap-2 text-xs text-muted-foreground mb-1`,children:[(0,z.jsx)(`span`,{className:`font-medium text-foreground
110/80`,children:e.author_name||`Committee`}),(0,z.jsx)(`span`,{children:Q(e.created_date).format(`DD MMM YYYY, HH:mm`)})]}),(0,z.jsx)(`p`,{className:`whitespace-pre-wrap break-words`,children:e.message}),e.sent_to_applicant&&(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 text-xs text-primary mt-1.5`,children:[(0,z.jsx)(Bn,{className:`w-3 h-3`}),` Emailed to the applicant`]})]},e.id))})]})}var hU={in_progress:`Pre-application`,submitted:`Pending`,completed:`Approved`,flagged:`Needs attention`};function gU({app:e,documents:t,feedback:n,onStatusChange:r,onOutcomeChange:i,onAddFeedback:a}){let[o,s]=(0,b.useState)(!1),c=e.status||`in_progress`,l=DD[c],u=t.filter(t=>t.application_id===e.id),d=Math.round((e.current_step||1)/ED.length*100);return(0,z.jsxs)(`div`,{className:`bg-card border border-border/70 rounded-2xl p-5 sm:p-6 shadow-sm`,children:[(0,z.jsxs)(`div`,{className:`flex items-start gap-4`,children:[(0,z.jsx)(`span`,{className:K(`mt-2 w-3 h-3 rounded-full shrink-0`,l.dot),title:hU[c]}),(0,z.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`h3`,{className:`font-display text-lg leading-tight truncate`,children:e.church_name||`Unnamed application`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground truncate`,children:e.project_title||`No project title yet`})]}),(0,z.jsxs)(VN,{value:c,onValueChange:t=>r(e,t),children:[(0,z.jsx)(UN,{className:`h-8 w-[160px] text-xs`,children:(0,z.jsx)(HN,{})}),(0,z.jsxs)(KN,{children:[(0,z.jsx)(JN,{value:`in_progress`,children:`Pre-application`}),(0,z.jsx)(JN,{value:`submitted`,children:`Pending`}),(0,z.jsx)(JN,{value:`completed`,children:`Approved`}),(0,z.jsx)(JN,{value:`flagged`,children:`Needs attention`})]})]})]}),(0,z.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,z.jsx)(`span`,{className:`font-medium text-foreground/80`,children:e.applicant_name||`Unknown applicant`}),e.email&&(0,z.jsx)(`span`,{children:e.email}),(0,z.jsxs)(`span`,{children:[`Step `,e.current_step||1,` of `,ED.length]}),e.committee_outcome&&e.committee_outcome!==`pending`&&(0,z.jsx)(`span`,{className:`inline-flex items-center rounded-full bg-secondary border border-border/70 px-2 py-0.5 text-[11px] font-medium`,children:OD[e.committee_outcome].label}),(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,z.jsx)(En,{className:`w-3.5 h-3.5`}),u.length,` document`,u.length===1?``:`s`]}),e.submitted_at&&(0,z.jsxs)(`span`,{children:[`Submitted `,Q(e.submitted_at).format(`DD MMM YYYY`)]}),(0,z.jsxs)(`span`,{children:[`Updated `,Q(e.updated_date).fromNow()]})]}),(0,z.jsx)(`div`,{className:`mt-3 h-1.5 w-full max-w-xs rounded-full bg-muted overflow-hidden`,children:(0,z.jsx)(`div`,{className:K(`h-full rounded-full transition-all`,l.bar),style:{width:`${d}%`}})})]})]}),(0,z.jsxs)(`button`,{onClick:()=>s(!o),className:`mt-4 inline-flex items-center gap-1 text-xs font-medium text-primary hover:underline`,children:[o?`Hide details`:`View details`,(0,z.jsx)(cn,{className:K(`w-3.5 h-3.5 transition-transform`,o&&`rotate-180`)})]}),o&&(0,z.jsxs)(`div`,{className:`mt-4 border-t border-border/70 pt-4 space-y-6`,children:[ED.filter(e=>e.fields).map(t=>(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h4`,{className:`text-xs uppercase tracking-wide text-muted-foreground mb-2`,children:t.title}),(0,z.jsx)(`dl`,{className:`space-y-1.5`,children:t.fields.map(t=>(0,z.jsxs)(`div`,{className:`grid sm:grid-cols-[240px_1fr] gap-x-4 text-sm`,children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:t.label}),(0,z.jsx)(`dd`,{className:`font-medium whitespace-pre-wrap break-words`,children:e[t.key]||`â`})]},t.key))})]},t.id)),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h4`,{className:`text-xs uppercase tracking-wide text-muted-foreground mb-2`,children:`Documents`}),u.length===0?(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No documents uploaded yet.`}):(0,z.jsx)(`ul`,{className:`space-y-1.5`,children:u.map(e=>(0,z.jsx)(`li`,{children:(0,z.jsxs)(`a`,{href:e.file_url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-2 text-sm text-primary hover:underline`,children:[(0,z.jsx)(En,{className:`w-3.5 h-3.5 shrink-0`}),(0,z.jsx)(`span`,{className:`font-medium`,children:e.document_type}),(0,z.jsxs)(`span`,{className:`text-muted-foreground`,children:[`â `,e.file_name]})]})},e.id))})]}),(0,z.jsx)(mU,{app:e,feedback:n,onOutcomeChange:i,onAddFeedback:a})]})]})}var _U=[{key:`received`,label:`Application completed`,short:`Application completed`},{key:`support`,label:`Diocesan Letter of Support attached`,short:`Letter of Support attached`},{key:`provincial`,label:`Submitted to Provincial team`,short:`Submitted to Provincial`},{key:`outcome`,label:`Outcome from Provincial funding team`,short:`Outcome received`}];function vU(e){return e.provincial_outcome&&e.provincial_outcome!==`pending`?4:e.submitted_to_provincial_at?3:e.letter_of_support_date?2:+(e.status===`submitted`||e.status===`completed`)}var yU={pending:{label:`Pending decision`,dot:`bg-slate-400`},approved:{label:`Approved`,dot:`bg-emerald-500`},partially_approved:{label:`Partially approved`,dot:`bg-amber-500`},declined:{label:`Declined`,dot:`bg-red-500`},deferred:{label:`Deferred`,dot:`bg-violet-500`}};function bU({stage:e}){return(0,z.jsx)(`ol`,{className:`flex items-start w-full`,children:_U.map((t,n)=>{let r=n+1,i=e>r,a=e===r;return(0,z.jsxs)(b.Fragment,{children:[n>0&&(0,z.jsx)(`li`,{"aria-hidden":`true`,className:K(`h-px flex-1 mx-2 mt-3.5`,i||a?`bg-primary`:`bg-border`)}),(0,z.jsxs)(`li`,{className:`flex flex-col items-center gap-1.5 shrink-0`,children:[(0,z.jsx)(`span`,{className:K(`w-7 h-7 rounded-full flex items-center justify-center text-xs font-medium border-2 transition-colors`,i&&`bg-emerald-600 border-emerald-600 text-white`,a&&`border-amber-500 text-amber-600 bg-amber-50 dark:bg-amber-950`,!i&&!a&&`border-border text-muted-foreground bg-card`),children:i?(0,z.jsx)(sn,{className:`w-3.5 h-3.5`}):r}),(0,z.jsx)(`span`,{className:K(`text-[11px] leading-tight text-center max-w-[100px]`,a?`text-amber-600 font-medium`:`text-muted-foreground`),children:t.short})]})]},t.key)})})}
vendor: 4,366 bytes, line 110
110function xU(e){let t=SU(e),n=b.forwardRef((e,n)=>{let{children:r,...i}=e,a=b.Children.toArray(r),o=a.find(wU);if(o){let e=o.props.children,r=a.map(t=>t===o?b.Children.count(e)>1?b.Children.only(null):b.isValidElement(e)?e.props.children:null:t);return(0,z.jsx)(t,{...i,ref:n,children:b.isValidElement(e)?b.cloneElement(e,void 0,r):null})}return(0,z.jsx)(t,{...i,ref:n,children:r})});return n.displayName=`${e}.Slot`,n}function SU(e){let t=b.forwardRef((e,t)=>{let{children:n,...r}=e;if(b.isValidElement(n)){let e=EU(n),i=TU(r,n.props);return n.type!==b.Fragment&&(i.ref=t?ee(t,e):e),b.cloneElement(n,i)}return b.Children.count(n)>1?b.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var CU=Symbol(`radix.slottable`);function wU(e){return b.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===CU}function TU(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function EU(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var DU=`Dialog`,[OU,kU]=V(DU),[AU,jU]=OU(DU),MU=e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=b.useRef(null),c=b.useRef(null),[l,u]=Ve({prop:r,defaultProp:i??!1,onChange:a,caller:DU});return(0,z.jsx)(AU,{scope:t,triggerRef:s,contentRef:c,contentId:tO(),titleId:tO(),descriptionId:tO(),open:l,onOpenChange:u,onOpenToggle:b.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})};MU.displayName=DU;var NU=`DialogTrigger`,PU=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=jU(NU,n),a=L(t,i.triggerRef);return(0,z.jsx)(U.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.contentId,"data-state":eW(i.open),...r,ref:a,onClick:F(e.onClick,i.onOpenToggle)})});PU.displayName=NU;var FU=`DialogPortal`,[IU,LU]=OU(FU,{forceMount:void 0}),RU=e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=jU(FU,t);return(0,z.jsx)(IU,{scope:t,forceMount:n,children:b.Children.map(r,e=>(0,z.jsx)(Ie,{present:n||a.open,children:(0,z.jsx)(Pe,{asChild:!0,container:i,children:e})}))})};RU.displayName=FU;var zU=`DialogOverlay`,BU=b.forwardRef((e,t)=>{let n=LU(zU,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=jU(zU,e.__scopeDialog);return a.modal?(0,z.jsx)(Ie,{present:r||a.open,children:(0,z.jsx)(HU,{...i,ref:t})}):null});BU.displayName=zU;var VU=xU(`DialogOverlay.RemoveScroll`),HU=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=jU(zU,n);return(0,z.jsx)(pM,{as:VU,allowPinchZoom:!0,shards:[i.contentRef],children:(0,z.jsx)(U.div,{"data-state":eW(i.open),...r,ref:t,style:{pointerEvents:`auto`,...r.style}})})}),UU=`DialogContent`,WU=b.forwardRef((e,t)=>{let n=LU(UU,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=jU(UU,e.__scopeDialog);return(0,z.jsx)(Ie,{present:r||a.open,children:a.modal?(0,z.jsx)(GU,{...i,ref:t}):(0,z.jsx)(KU,{...i,ref:t})})});WU.displayName=UU;var GU=b.forwardRef((e,t)=>{let n=jU(UU,e.__scopeDialog),r=b.useRef(null),i=L(t,n.contentRef,r);return b.useEffect(()=>{let e=r.current;if(e)return ij(e)},[]),(0,z.jsx)(qU,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:F(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:F(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:F(e.onFocusOutside,e=>e.preventDefault())})}),KU=b.forwardRef((e,t)=>{let n=jU(UU,e.__scopeDialog),r=b.useRef(!1),i=b.useRef(!1);return(0,z.jsx)(qU,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})}),qU=b.forwardRef((e,t)=>
110{let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=jU(UU,n),c=b.useRef(null),l=L(t,c);return FD(),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(VD,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,z.jsx)(Ce,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":eW(s.open),...o,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(iW,{titleId:s.titleId}),(0,z.jsx)(oW,{contentRef:c,descriptionId:s.descriptionId})]})]})}),JU=`DialogTitle`,YU=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=jU(JU,n);return(0,z.jsx)(U.h2,{id:i.titleId,...r,ref:t})});YU.displayName=JU;var XU=`DialogDescription`,ZU=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=jU(XU,n);return(0,z.jsx)(U.p,{id:i.descriptionId,...r,ref:t})});ZU.displayName=XU;var QU=`DialogClose`,$U=b.forwardRef((e,t)=>{let{__scopeDialog:n,...r}=e,i=jU(QU,n);return(0,z.jsx)(U.button,{type:`button`,...r,ref:t,onClick:F(e.onClick,()=>i.onOpenChange(!1))})});$U.displayName=QU;function eW(e){return e?`open`:`closed`}var tW=`DialogTitleWarning`,[nW,rW]=B(tW,{contentName:UU,titleName:JU,docsSlug:`dialog`}),iW=({titleId:e})=>{let t=rW(tW),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. 111 112If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. 113 114For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return b.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},aW=`DialogDescriptionWarning`,oW=({contentRef:e,descriptionId:t})=>{let n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${rW(aW).contentName}}.`;return b.useEffect(()=>{let r=e.current?.getAttribute(`aria-describedby`);t&&r&&(document.getElementById(t)||console.warn(n))},[n,e,t]),null},sW=MU,cW=PU,lW=RU,uW=BU,dW=WU,fW=YU,pW=ZU,mW=$U,hW=sW,gW=cW,_W=lW,vW=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(uW,{ref:n,className:K(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t}));vW.displayName=uW.displayName;var yW=b.forwardRef(({className:e,children:t,...n},r)=>(0,z.jsxs)(_W,{children:[(0,z.jsx)(vW,{}),(0,z.jsxs)(dW,{ref:r,className:K(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg`,e),...n,children:[t,(0,z.jsxs)(mW,{className:`absolute right-4 top-4 roun
114ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground`,children:[(0,z.jsx)(lr,{className:`h-4 w-4`}),(0,z.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]}));yW.displayName=dW.displayName;var bW=({className:e,...t})=>(0,z.jsx)(`div`,{className:K(`flex flex-col space-y-1.5 text-center sm:text-left`,e),...t});bW.displayName=`DialogHeader`;var xW=({className:e,...t})=>(0,z.jsx)(`div`,{className:K(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});xW.displayName=`DialogFooter`;var SW=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(fW,{ref:n,className:K(`text-lg font-semibold leading-none tracking-tight`,e),...t}));SW.displayName=fW.displayName;var CW=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(pW,{ref:n,className:K(`text-sm text-muted-foreground`,e),...t}));CW.displayName=pW.displayName;function wW(e){"@babel/helpers - typeof";return wW=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},wW(e)}var TW=Uint8Array,EW=Uint16Array,DW=Int32Array,OW=new TW([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),kW=new TW([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),AW=new TW([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),jW=function(e,t){for(var n=new EW(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];for(var i=new DW(n[30]),r=1;r<30;++r)for(var a=n[r];a<n[r+1];++a)i[a]=a-n[r]<<5|r;return{b:n,r:i}},MW=jW(OW,2),NW=MW.b,PW=MW.r;NW[28]=258,PW[258]=28;var FW=jW(kW,0);FW.b;for(var IW=FW.r,LW=new EW(32768),RW=0;RW<32768;++RW){var zW=(RW&43690)>>1|(RW&21845)<<1;zW=(zW&52428)>>2|(zW&13107)<<2,zW=(zW&61680)>>4|(zW&3855)<<4,LW[RW]=((zW&65280)>>8|(zW&255)<<8)>>1}for(var BW=(function(e,t,n){for(var r=e.length,i=0,a=new EW(t);i<r;++i)e[i]&&++a[e[i]-1];var o=new EW(t);for(i=1;i<t;++i)o[i]=o[i-1]+a[i-1]<<1;var s;if(n){s=new EW(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var l=i<<4|e[i],u=t-e[i],d=o[e[i]-1]++<<u,f=d|(1<<u)-1;d<=f;++d)s[LW[d]>>c]=l}else for(s=new EW(r),i=0;i<r;++i)e[i]&&(s[i]=LW[o[e[i]-1]++]>>15-e[i]);return s}),VW=new TW(288),RW=0;RW<144;++RW)VW[RW]=8;for(var RW=144;RW<256;++RW)VW[RW]=9;for(var RW=256;RW<280;++RW)VW[RW]=7;for(var RW=280;RW<288;++RW)VW[RW]=8;for(var HW=new TW(32),RW=0;RW<32;++RW)HW[RW]=5;var UW=BW(VW,9,0),WW=BW(HW,5,0),GW=function(e){return(e+7)/8|0},KW=function(e,t,n){return(t==null||t<0)&&(t=0),(n==null||n>e.length)&&(n=e.length),new TW(e.subarray(t,n))},qW=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8},JW=function(e,t,n){n<<=t&7;var r=t/8|0;e[r]|=n,e[r+1]|=n>>8,e[r+2]|=n>>16},YW=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,a=n.slice();if(!i)return{t:nG,l:0};if(i==1){var o=new TW(n[0].s+1);return o[n[0].s]=1,{t:o,l:1}}n.sort(function(e,t){return e.f-t.f}),n.push({s:-1,f:25001});var s=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};u!=i-1;)s=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:s.f+c.f,l:s,r:c};for(var f=a[0].s,r=1;r<i;++r)a[r].s>f&&(f=a[r].s);var p=new EW(f+1),m=XW(n[u-1],p,0);if(m>t){var r=0,h=0,g=m-t,_=1<<g;for(a.sort(function(e,t){return p[t.s]-p[e.s]||e.f-t.f});r<i;++r){var v=a[r].s;if(p[v]>t)h+=_-(1<<m-p[v]),p[v]=t;else break}for(h>>=g;h>0;){var y=a[r].s;p[y]<t?h-=1<<t-p[y]++-1:++r}for(;r>=0&&h;--r){var b=a[r].s;p[b]==t&&(--p[b],++h)}m=t}return{t:new TW(p),l:m}},XW=function(e,t,n){return e.s==-1?Math.max(XW(e.l,t,n+1),XW(e.r,t,n+1)):t[e.s]=n},ZW=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new EW(++t),r=0,i=e[0],a=1,o=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)o(32754);a>2&&(o(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(o(i),--a;a>6;a-=6)o(8304);a>2&&(o(a-3<<5|8208),a=0)}for(;a--;)o(i);a=1,i=e[s]}return{c:n.subarray(0,r),n:t}},QW=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},$W=function(e,t,n){var r=n.length,i=GW(t+2);e[i]=r&255,e[i+1]=r>>8,e[i+2]=e[i]^255,e[i+3]=e[i+1]^255;for(var a=0;a<r;++a)e[i+a+4]=n[a];return(i+4+r)*8},eG=function(e,t,n,r,i,a,o,s,c,l,u){qW(t,u++,n),++i[256];for(var d=YW(i,15),f=d.t,p=d.l,m=YW(a,15),h=m.t,g=m.l,_=ZW(f),v=_.c,y=_.n,b=ZW(h),x=b.c,S=b.n,C=new EW(19),w=0;w<v.length;++w)++C[v[w]&31];for(var w=0;w<x.length;++w)++C[x[w]&31];for(var T=YW(C,7),E=T.t,D=T.l,O=19;O>4&&!E[AW[O-1]];--O);
114var k=l+5<<3,A=QW(i,VW)+QW(a,HW)+o,j=QW(i,f)+QW(a,h)+o+14+3*O+QW(C,E)+2*C[16]+3*C[17]+7*C[18];if(c>=0&&k<=A&&k<=j)return $W(t,u,e.subarray(c,c+l));var M,N,P,F;if(qW(t,u,1+(j<A)),u+=2,j<A){M=BW(f,p,0),N=f,P=BW(h,g,0),F=h;var I=BW(E,D,0);qW(t,u,y-257),qW(t,u+5,S-1),qW(t,u+10,O-4),u+=14;for(var w=0;w<O;++w)qW(t,u+3*w,E[AW[w]]);u+=3*O;for(var ee=[v,x],L=0;L<2;++L)for(var R=ee[L],w=0;w<R.length;++w){var z=R[w]&31;qW(t,u,I[z]),u+=E[z],z>15&&(qW(t,u,R[w]>>5&127),u+=R[w]>>12)}}else M=UW,N=VW,P=WW,F=HW;for(var w=0;w<s;++w){var B=r[w];if(B>255){var z=B>>18&31;JW(t,u,M[z+257]),u+=N[z+257],z>7&&(qW(t,u,B>>23&31),u+=OW[z]);var V=B&31;JW(t,u,P[V]),u+=F[V],V>3&&(JW(t,u,B>>5&8191),u+=kW[V])}else JW(t,u,M[B]),u+=N[B]}return JW(t,u,M[256]),u+N[256]},tG=new DW([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),nG=new TW(0),rG=function(e,t,n,r,i,a){var o=a.z||e.length,s=new TW(r+o+5*(1+Math.ceil(o/7e3))+i),c=s.subarray(r,s.length-i),l=a.l,u=(a.r||0)&7;if(t){u&&(c[0]=a.r>>3);for(var d=tG[t-1],f=d>>13,p=d&8191,m=(1<<n)-1,h=a.p||new EW(32768),g=a.h||new EW(m+1),_=Math.ceil(n/3),v=2*_,y=function(t){return(e[t]^e[t+1]<<_^e[t+2]<<v)&m},b=new DW(25e3),x=new EW(288),S=new EW(32),C=0,w=0,T=a.i||0,E=0,D=a.w||0,O=0;T+2<o;++T){var k=y(T),A=T&32767,j=g[k];if(h[A]=j,g[k]=A,D<=T){var M=o-T;if((C>7e3||E>24576)&&(M>423||!l)){u=eG(e,c,0,b,x,S,w,E,O,T-O,u),E=C=w=0,O=T;for(var N=0;N<286;++N)x[N]=0;for(var N=0;N<30;++N)S[N]=0}var P=2,F=0,I=p,ee=A-j&32767;if(M>2&&k==y(T-ee))for(var L=Math.min(f,M)-1,R=Math.min(32767,T),z=Math.min(258,M);ee<=R&&--I&&A!=j;){if(e[T+P]==e[T+P-ee]){for(var B=0;B<z&&e[T+B]==e[T+B-ee];++B);if(B>P){if(P=B,F=ee,B>L)break;for(var V=Math.min(ee,B-2),te=0,N=0;N<V;++N){var ne=T-ee+N&32767,re=ne-h[ne]&32767;re>te&&(te=re,j=ne)}}}A=j,j=h[A],ee+=A-j&32767}if(F){b[E++]=268435456|PW[P]<<18|IW[F];var ie=PW[P]&31,ae=IW[F]&31;w+=OW[ie]+kW[ae],++x[257+ie],++S[ae],D=T+P,++C}else b[E++]=e[T],++x[e[T]]}}for(T=Math.max(T,D);T<o;++T)b[E++]=e[T],++x[e[T]];u=eG(e,c,l,b,x,S,w,E,O,T-O,u),l||(a.r=u&7|c[u/8|0]<<3,u-=7,a.h=g,a.p=h,a.i=T,a.w=D)}else{for(var T=a.w||0;T<o+l;T+=65535){var oe=T+65535;oe>=o&&(c[u/8|0]=l,oe=o),u=$W(c,u+1,e.subarray(T,oe))}a.i=o}return KW(s,0,r+GW(u)+i)},iG=function(){var e=1,t=0;return{p:function(n){for(var r=e,i=t,a=n.length|0,o=0;o!=a;){for(var s=Math.min(o+2655,a);o<s;++o)i+=r+=n[o];r=(r&65535)+15*(r>>16),i=(i&65535)+15*(i>>16)}e=r,t=i},d:function(){return e%=65521,t%=65521,(e&255)<<24|(e&65280)<<8|(t&255)<<8|t>>8}}},aG=function(e,t,n,r,i){if(!i&&(i={l:1},t.dictionary)){var a=t.dictionary.subarray(-32768),o=new TW(a.length+e.length);o.set(a),o.set(e,a.length),e=o,i.w=a.length}return rG(e,t.level==null?6:t.level,t.mem==null?i.l?Math.ceil(Math.max(8,Math.min(13,Math.log(e.length)))*1.5):20:12+t.mem,n,r,i)},oG=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},sG=function(e,t){var n=t.level,r=n==0?0:n<6?1:n==9?3:2;if(e[0]=120,e[1]=r<<6|(t.dictionary&&32),e[1]|=31-(e[0]<<8|e[1])%31,t.dictionary){var i=iG();i.p(t.dictionary),oG(e,2,i.d())}};function cG(e,t){t||={};var n=iG();n.p(e);var r=aG(e,t,t.dictionary?6:2,4);return sG(r,t),oG(r,r.length-4,n.d()),r}var lG=typeof TextDecoder<`u`&&new TextDecoder;try{lG.decode(nG,{stream:!0})}catch{}function uG(e){if(Array.isArray(e))return e}function dG(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function fG(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function pG(e,t){if(e){if(typeof e==`string`)return fG(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fG(e,t):void 0}}function mG(){throw TypeError(`Invalid attempt to destructure non-iterable instance. 115In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hG(e,t){return uG(e)||dG(e,t)||pG(e,t)||mG()}function gG(e,t=`utf8`){return new TextDecoder(t).decode(e)}var _G=new TextEncoder;function vG(e){return _G.encode(e)}var yG=8192,bG=(()=>{let e=new Uint8Array(4),t=new Uint32Array(e.buffer);return!((t[0]=1)&e[0])})(),xG={int8:globalThis.Int8Array,uint8:globalThis.Uint8Array,int16:globalThis.Int16Array,uint16:globalThis.Uint16Array,int32:globalThis.Int32Array,uint32:globalThis.Uint32Array,uint64:globalThis.BigUint64Array,int64:globalThis.BigInt64Array,float32:globalThis.Float32Array,float64:globalThis.Float64Array},SG=class e{buffer;byteLength;byteOffset;length;offset;lastWrittenByte;littleEndian;_data;_mark;_marks;constructor(t=yG,n={}){let r=!1;typeof t==`number`?t=new ArrayBuffer(t):(r=!0,this.lastWrittenByte=t.byteLength);let i=n.offset?n.offset>>>0:0,a=t.byteLength-i,o=i;(ArrayBuffer.isView(t)||t instanceof e)&&(t.byteLength!==t.buffer.byteLength&&(o=t.byteOffset+i),t=t.buffer),this.lastWrittenByte=r?a:0,this.buffer=t,this.length=a,this.byteLength=a,this.byteOffset=o,this.offset=0,this.littleEndian=!0,this._data=new DataView(this.buffer,o,a),this._mark=0,this._marks=[]}available(e=1){return this.offset+e<=this.length}isLittleEndian(){return this.littleEndian}setLittleEndian(){return this.littleEndian=!0,this}isBigEndian(){return!this.littleEndian}setBigEndian(){return this.littleEndian=!1,this}skip(e=1){return this.offset+=e,this}back(e=1){return this.offset-=e,this}seek(e){return this.offset=e,this}mark(){return this._mark=this.offset,this}reset(){return this.offset=this._mark,this}pushMark(){return this._marks.push(this.offset),this}popMark(){let e=this._marks.pop();if(e===void 0)throw Error(`Mark stack empty`);return this.seek(e),this}rewind(){return this.offset=0,this}ensureAvailable(e=1){if(!this.available(e)){let t=(this.offset+e)*2,n=new Uint8Array(t);n.set(new Uint8Array(this.buffer)),this.buffer=n.buffer,this.length=t,this.byteLength=t,this._data=new DataView(this.buffer)}return this}readBoolean(){return this.readUint8()!==0}readInt8(){return this._data.getInt8(this.offset++)}readUint8(){return this._data.getUint8(this.offset++)}readByte(){return this.readUint8()}readBytes(e=1){return this.readArray(e,`uint8`)}readArray(e,t){let n=xG[t].BYTES_PER_ELEMENT*e,r=this.byteOffset+this.offset,i=this.buffer.slice(r,r+n);if(this.littleEndian===bG&&t!==`uint8`&&t!==`int8`){let e=new Uint8Array(this.buffer.slice(r,r+n));e.reverse();let i=new xG[t](e.buffer);return this.offset+=n,i.reverse(),i}let a=new xG[t](i);return this.offset+=n,a}readInt16(){let e=this._data.getInt16(this.offset,this.littleEndian);return this.offset+=2,e}readUint16(){let e=this._data.getUint16(this.offset,this.littleEndian);return this.offset+=2,e}readInt32(){let e=this._data.getInt32(this.offset,this.littleEndian);return this.offset+=4,e}readUint32(){let e=this._data.getUint32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat32(){let e=this._data.getFloat32(this.offset,this.littleEndian);return this.offset+=4,e}readFloat64(){let e=this._data.getFloat64(this.offset,this.littleEndian);return this.offset+=8,e}readBigInt64(){let e=this._data.getBigInt64(this.offset,this.littleEndian);return this.offset+=8,e}readBigUint64(){let e=this._data.getBigUint64(this.offset,this.littleEndian);return this.offset+=8,e}readChar(){return String.fromCharCode(this.readInt8())}readChars(e=1){let t=``;for(let n=0;n<e;n++)t+=this.readChar();return t}readUtf8(e=1){return gG(this.readBytes(e))}decodeText(e=1,t=`utf8`){return gG(this.readBytes(e),t)}writeBoolean(e){return this.writeUint8(e?255:0),this}writeInt8(e){return this.ensureAvailable(1),this._data.setInt8(this.offset++,e),this._updateLastWrittenByte(),this}writeUint8(e){return this.ensureAvailable(1),this._data.setUint8(this.offset++,e),this._updateLastWrittenByte(),this}writeByte(e){return this.writeUint8(e)}writeBytes(e){this.ensureAvailable(e.length);for(let t=0;t<e.length;t++)this._data.setUint8(this.offset++,e[t]);return this._updateLastWrittenByte(),this}writeInt16(e){return this.ensureAvailable(2),this._data.setInt16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeUint16(e){return this.ensureAvailable(2),this._data.setUint16(this.offset,e,this.littleEndian),this.offset+=2,this._updateLastWrittenByte(),this}writeInt32(e){return this.ensureAvailable(4),this._data.setInt32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeUint32(e){return this.ensureAvailable(4),this._data.setUint32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat32(e){return this.ensureAvailable(4),this._data.setFloat32(this.offset,e,this.littleEndian),this.offset+=4,this._updateLastWrittenByte(),this}writeFloat64(e){return this.ensureAvailable(8),this._data.setFloat64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigInt64(e){return this.ensureAvailable(8),this._data.setBigInt64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeBigUint64(e){return this.ensureAvailable(8),this._data.setBigUint64(this.offset,e,this.littleEndian),this.offset+=8,this._updateLastWrittenByte(),this}writeChar(e){return this.writeUint8(e.charCodeAt(0))}writeChars(e){for(let t=0;t<e.length;t++)this.writeUint8(e.charCodeAt(t));return this}writeUtf8(e){return this.writeBytes(vG(e))}toArray(){return new Uint8Array(this.buffer,this.byteOffset,this.lastWrittenByte)}getWrittenByteLength(){return this.lastWrittenByte-this.byteOffset}_updateLastWrittenByte(){this.offset>this.lastWrittenByte&&(this.lastWrittenByte=this.offset)}},CG=4,wG=0,TG=1,EG=2;function DG(e){let t=e.length;for(;--t>=0;)e[t]=0}var OG=29,kG=256,AG=286,jG=30,MG=19,NG=573,PG=15,FG=16,IG=7,LG=256,RG=16,zG=17,BG=18,VG=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),HG=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),UG=ne
vendor: 10,397 bytes, line 115
115w Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),WG=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),GG=512,KG=Array(576);DG(KG);var qG=Array(60);DG(qG);var JG=Array(GG);DG(JG);var YG=Array(256);DG(YG);var XG=Array(OG);DG(XG);var ZG=Array(jG);DG(ZG);function QG(e,t,n,r,i){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=r,this.max_length=i,this.has_stree=e&&e.length}var $G,eK,tK;function nK(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}var rK=e=>e<256?JG[e]:JG[256+(e>>>7)],iK=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},aK=(e,t,n)=>{e.bi_valid>FG-n?(e.bi_buf|=t<<e.bi_valid&65535,iK(e,e.bi_buf),e.bi_buf=t>>FG-e.bi_valid,e.bi_valid+=n-FG):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)},oK=(e,t,n)=>{aK(e,n[t*2],n[t*2+1])},sK=(e,t)=>{let n=0;do n|=e&1,e>>>=1,n<<=1;while(--t>0);return n>>>1},cK=e=>{e.bi_valid===16?(iK(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},lK=(e,t)=>{let n=t.dyn_tree,r=t.max_code,i=t.stat_desc.static_tree,a=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,c=t.stat_desc.max_length,l,u,d,f,p,m,h=0;for(f=0;f<=PG;f++)e.bl_count[f]=0;for(n[e.heap[e.heap_max]*2+1]=0,l=e.heap_max+1;l<NG;l++)u=e.heap[l],f=n[n[u*2+1]*2+1]+1,f>c&&(f=c,h++),n[u*2+1]=f,!(u>r)&&(e.bl_count[f]++,p=0,u>=s&&(p=o[u-s]),m=n[u*2],e.opt_len+=m*(f+p),a&&(e.static_len+=m*(i[u*2+1]+p)));if(h!==0){do{for(f=c-1;e.bl_count[f]===0;)f--;e.bl_count[f]--,e.bl_count[f+1]+=2,e.bl_count[c]--,h-=2}while(h>0);for(f=c;f!==0;f--)for(u=e.bl_count[f];u!==0;)d=e.heap[--l],!(d>r)&&(n[d*2+1]!==f&&(e.opt_len+=(f-n[d*2+1])*n[d*2],n[d*2+1]=f),u--)}},uK=(e,t,n)=>{let r=Array(16),i=0,a,o;for(a=1;a<=PG;a++)i=i+n[a-1]<<1,r[a]=i;for(o=0;o<=t;o++){let t=e[o*2+1];t!==0&&(e[o*2]=sK(r[t]++,t))}},dK=()=>{let e,t,n,r,i,a=Array(16);for(n=0,r=0;r<28;r++)for(XG[r]=n,e=0;e<1<<VG[r];e++)YG[n++]=r;for(YG[n-1]=r,i=0,r=0;r<16;r++)for(ZG[r]=i,e=0;e<1<<HG[r];e++)JG[i++]=r;for(i>>=7;r<jG;r++)for(ZG[r]=i<<7,e=0;e<1<<HG[r]-7;e++)JG[256+i++]=r;for(t=0;t<=PG;t++)a[t]=0;for(e=0;e<=143;)KG[e*2+1]=8,e++,a[8]++;for(;e<=255;)KG[e*2+1]=9,e++,a[9]++;for(;e<=279;)KG[e*2+1]=7,e++,a[7]++;for(;e<=287;)KG[e*2+1]=8,e++,a[8]++;for(uK(KG,287,a),e=0;e<jG;e++)qG[e*2+1]=5,qG[e*2]=sK(e,5);$G=new QG(KG,VG,257,AG,PG),eK=new QG(qG,HG,0,jG,PG),tK=new QG([],UG,0,MG,IG)},fK=e=>{let t;for(t=0;t<AG;t++)e.dyn_ltree[t*2]=0;for(t=0;t<jG;t++)e.dyn_dtree[t*2]=0;for(t=0;t<MG;t++)e.bl_tree[t*2]=0;e.dyn_ltree[LG*2]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},pK=e=>{e.bi_valid>8?iK(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},mK=(e,t,n,r)=>{let i=t*2,a=n*2;return e[i]<e[a]||e[i]===e[a]&&r[t]<=r[n]},hK=(e,t,n)=>{let r=e.heap[n],i=n<<1;for(;i<=e.heap_len&&(i<e.heap_len&&mK(t,e.heap[i+1],e.heap[i],e.depth)&&i++,!mK(t,r,e.heap[i],e.depth));)e.heap[n]=e.heap[i],n=i,i<<=1;e.heap[n]=r},gK=(e,t,n)=>{let r,i,a=0,o,s;if(e.sym_next!==0)do r=e.pending_buf[e.sym_buf+a++]&255,r+=(e.pending_buf[e.sym_buf+a++]&255)<<8,i=e.pending_buf[e.sym_buf+a++],r===0?oK(e,i,t):(o=YG[i],oK(e,o+kG+1,t),s=VG[o],s!==0&&(i-=XG[o],aK(e,i,s)),r--,o=rK(r),oK(e,o,n),s=HG[o],s!==0&&(r-=ZG[o],aK(e,r,s)));while(a<e.sym_next);oK(e,LG,t)},_K=(e,t)=>{let n=t.dyn_tree,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.elems,o,s,c=-1,l;for(e.heap_len=0,e.heap_max=NG,o=0;o<a;o++)n[o*2]===0?n[o*2+1]=0:(e.heap[++e.heap_len]=c=o,e.depth[o]=0);for(;e.heap_len<2;)l=e.heap[++e.heap_len]=c<2?++c:0,n[l*2]=1,e.depth[l]=0,e.opt_len--,i&&(e.static_len-=r[l*2+1]);for(t.max_code=c,o=e.heap_len>>1;o>=1;o--)hK(e,n,o);l=a;do o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],hK(e,n,1),s=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=s,n[l*2]=n[o*2]+n[s*2],e.depth[l]=(e.depth[o]>=e.depth[s]?e.depth[o]:e.depth[s])+1,n[o*2+1]=n[s*2+1]=l,e.heap[1]=l++,hK(e,n,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],lK(e,t),uK(n,c,e.bl_count)},vK=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),t[(n+1)*2+1]=65535,r=0;r<=n;r++)a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)&&(s<l?e.bl_tree[a*2]+=s:a===0?s<=10?e.bl_tree[34]++:e.bl_tree[36]++:(a!==i&&e.bl_tree[a*2]++,e.bl_tree[32]++),s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4))},yK=(e,t,n)=>{let r,i=-1,a,o=t[1],s=0,c=7,l=4;for(o===0&&(c=138,l=3),r=0;r<=n;r++)if(a=o,o=t[(r+1)*2+1],!(++s<c&&a===o)){if(s<l)do oK(e,a,e.bl_tree);while(--s!==0);else a===0?s<=10?(oK(e,zG,e.bl_tree),aK(e,s-3,3)):(oK(e,BG,e.bl_tree),aK(e,s-11,7)):(a!==i&&(oK(e,a,e.bl_tree),s--),oK(e,RG,e.bl_tree),aK(e,s-3,2));s=0,i=a,o===0?(c=138,l=3):a===o?(c=6,l=3):(c=7,l=4)}},bK=e=>{let t;for(vK(e,e.dyn_ltree,e.l_desc.max_code),vK(e,e.dyn_dtree,e.d_desc.max_code),_K(e,e.bl_desc),t=18;t>=3&&e.bl_tree[WG[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},xK=(e,t,n,r)=>{let i;for(aK(e,t-257,5),aK(e,n-1,5),aK(e,r-4,4),i=0;i<r;i++)aK(e,e.bl_tree[WG[i]*2+1],3);yK(e,e.dyn_ltree,t-1),yK(e,e.dyn_dtree,n-1)},SK=e=>{let t=4093624447,n;for(n=0;n<=31;n++,t>>>=1)if(t&1&&e.dyn_ltree[n*2]!==0)return wG;if(e.dyn_ltree[18]!==0||e.dyn_ltree[20]!==0||e.dyn_ltree[26]!==0)return TG;for(n=32;n<kG;n++)if(e.dyn_ltree[n*2]!==0)return TG;return wG},CK=!1,wK=e=>{CK||=(dK(),!0),e.l_desc=new nK(e.dyn_ltree,$G),e.d_desc=new nK(e.dyn_dtree,eK),e.bl_desc=new nK(e.bl_tree,tK),e.bi_buf=0,e.bi_valid=0,fK(e)},TK=(e,t,n,r)=>{aK(e,0+ +!!r,3),pK(e),iK(e,n),iK(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},EK={_tr_init:wK,_tr_stored_block:TK,_tr_flush_block:(e,t,n,r)=>{let i,a,o=0;e.level>0?(e.strm.data_type===EG&&(e.strm.data_type=SK(e)),_K(e,e.l_desc),_K(e,e.d_desc),o=bK(e),i=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3,a<=i&&(i=a)):i=a=n+5,n+4<=i&&t!==-1?TK(e,t,n,r):e.strategy===CG||a===i?(aK(e,2+ +!!r,3),gK(e,KG,qG)):(aK(e,4+ +!!r,3),xK(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),gK(e,e.dyn_ltree,e.dyn_dtree)),fK(e),r&&pK(e)},_tr_tally:(e,t,n)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,t===0?e.dyn_ltree[n*2]++:(e.matches++,t--,e.dyn_ltree[(YG[n]+kG+1)*2]++,e.dyn_dtree[rK(t)*2]++),e.sym_next===e.sym_end),_tr_align:e=>{aK(e,2,3),oK(e,LG,KG),cK(e)}},DK=(e,t,n,r)=>{let i=e&65535|0,a=e>>>16&65535|0,o=0;for(;n!==0;){o=n>2e3?2e3:n,n-=o;do i=i+t[r++]|0,a=a+i|0;while(--o);i%=65521,a%=65521}return i|a<<16|0},OK=new Uint32Array((()=>{let e,t=[];for(var n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=e&1?3988292384^e>>>1:e>>>1;t[n]=e}return t})()),kK=(e,t,n,r)=>{let i=OK,a=r+n;e^=-1;for(let n=r;n<a;n++)e=e>>>8^i[(e^t[n])&255];return e^-1},AK={2:`need dictionary`,1:`stream end`,0:``,"-1":`file error`,"-2":`stream error`,"-3":`data error`,"-4":`insufficient memory`,"-5":`buffer error`,"-6":`incompatible version`},jK={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:MK,_tr_stored_block:NK,_tr_flush_block:PK,_tr_tally:FK,_tr_align:IK}=EK,{Z_NO_FLUSH:LK,Z_PARTIAL_FLUSH:RK,Z_FULL_FLUSH:zK,Z_FINISH:BK,Z_BLOCK:VK,Z_OK:HK,Z_STREAM_END:UK,Z_STREAM_ERROR:WK,Z_DATA_ERROR:GK,Z_BUF_ERROR:KK,Z_DEFAULT_COMPRESSION:qK,Z_FILTERED:JK,Z_HUFFMAN_ONLY:YK,Z_RLE:XK,Z_FIXED:ZK,Z_DEFAULT_STRATEGY:QK,Z_UNKNOWN:$K,Z_DEFLATED:eq}=jK,tq=9,nq=15,rq=8,iq=573,aq=3,oq=258,sq=262,cq=32,lq=42,uq=57,dq=69,fq=73,pq=91,mq=103,hq=113,gq=666,_q=1,vq=2,yq=3,bq=4,xq=3,Sq=(e,t)=>(e.msg=AK[t],t),Cq=e=>e*2-(e>4?9:0),wq=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Tq=e=>{let t,n,r,i=e.w_size;t=e.hash_size,r=t;do n=e.head[--r],e.head[r]=n>=i?n-i:0;while(--t);t=i,r=t;do n=e.prev[--r],e.prev[r]=n>=i?n-i:0;while(--t)},Eq=(e,t,n)=>(t<<e.hash_shift^n)&e.hash_mask,Dq=e=>{let t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),n!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,t.pending===0&&(t.pending_out=0))},Oq=(e,t)=>{PK(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Dq(e.strm)},kq=(e,t)=>{e.pending_buf[e.pending++]=t},Aq=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},jq=(e,t,n,r)=>{let i=e.avail_in;return i>r&&(i=r),i===0?0:(e.avail_in-=i,t.set(e.input.subarray(e.next_in,e.next_in+i),n),e.state.wrap===1?e.adler=DK(e.adler,t,i,n):e.state.wrap===2&&(e.adler=kK(e.adler,t,i,n)),e.next_in+=i,e.total_in+=i,i)},Mq=(e,t)=>{let n=e.max_chain_length,r=e.strstart,i,a,o=e.prev_length,s=e.nice_match,c=e.strstart>e.w_size-sq?e.strstart-(e.w_size-sq):0,l=e.window,u=e.w_mask,d=e.prev,f=e.strstart+oq,p=l[r+o-1],m=l[r+o];e.prev_length>=e.good_match&&(n>>=2),s>e.lookahead&&(s=e.lookahead);do{if(i=t,l[i+o]!==m||l[i+o-1]!==p||l[i]!==l[r]||l[++i]!==l[r+1])continue;r+=2,i++;do;while(l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&l[++r]===l[++i]&&r<f);if(a=oq-(f-r),r=f-oq,a>o){if(e.match_start=t,o=a,a>=s)break;p=l[r+o-1],m=l[r+o]}}while((t=d[t&u])>c&&--n!==0);return o<=e.lookahead?o:e.lookahead},Nq=e=>{let t=e.w_size,n,r,i;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-sq)&&(e.window.set(e.window.subarray(t,t+t-r),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Tq(e),r+=t),e.strm.avail_in===0)break;if(n=jq(e.strm,e.window,e.strstart+e.lookahead,r),e.lookahead+=n,e.lookahead+e.insert>=aq)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=Eq(e,e.ins_h,e.window[i+1]);e.insert&&(e.ins_h=Eq(e,e.ins_h,e.window[i+aq-1]),e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<aq)););}while(e.lookahead<sq&&e.strm.avail_in!==0)},Pq=(e,t)=>{let n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,r,i,a,o=0,s=e.strm.avail_in;do{if(r=65535,a=e.bi_valid+42>>3,e.strm.avail_out<a||(a=e.strm.avail_out-a,i=e.strstart-e.block_start,r>i+e.strm.avail_in&&(r=i+e.strm.avail_in),r>a&&(r=a),r<n&&(r===0&&t!==BK||t===LK||r!==i+e.strm.avail_in)))break;o=+(t===BK&&r===i+e.strm.avail_in),NK(e,0,0,o),e.pending_buf[e.pending-4]=r,e.pending_buf[e.pending-3]=r>>
1158,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,Dq(e.strm),i&&(i>r&&(i=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+i),e.strm.next_out),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i,e.block_start+=i,r-=i),r&&(jq(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(o===0);return s-=e.strm.avail_in,s&&(s>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=s&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-s,e.strm.next_in),e.strstart),e.strstart+=s,e.insert+=s>e.w_size-e.insert?e.w_size-e.insert:s),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?bq:t!==LK&&t!==BK&&e.strm.avail_in===0&&e.strstart===e.block_start?vq:(a=e.window_size-e.strstart,e.strm.avail_in>a&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(jq(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water<e.strstart&&(e.high_water=e.strstart),a=e.bi_valid+42>>3,a=e.pending_buf_size-a>65535?65535:e.pending_buf_size-a,n=a>e.w_size?e.w_size:a,i=e.strstart-e.block_start,(i>=n||(i||t===BK)&&t!==LK&&e.strm.avail_in===0&&i<=a)&&(r=i>a?a:i,o=+(t===BK&&e.strm.avail_in===0&&r===i),NK(e,e.block_start,r,o),e.block_start+=r,Dq(e.strm)),o?yq:_q)},Fq=(e,t)=>{let n,r;for(;;){if(e.lookahead<sq){if(Nq(e),e.lookahead<sq&&t===LK)return _q;if(e.lookahead===0)break}if(n=0,e.lookahead>=aq&&(e.ins_h=Eq(e,e.ins_h,e.window[e.strstart+aq-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),n!==0&&e.strstart-n<=e.w_size-sq&&(e.match_length=Mq(e,n)),e.match_length>=aq)if(r=FK(e,e.strstart-e.match_start,e.match_length-aq),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=aq){e.match_length--;do e.strstart++,e.ins_h=Eq(e,e.ins_h,e.window[e.strstart+aq-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Eq(e,e.ins_h,e.window[e.strstart+1]);else r=FK(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(r&&(Oq(e,!1),e.strm.avail_out===0))return _q}return e.insert=e.strstart<2?e.strstart:2,t===BK?(Oq(e,!0),e.strm.avail_out===0?yq:bq):e.sym_next&&(Oq(e,!1),e.strm.avail_out===0)?_q:vq},Iq=(e,t)=>{let n,r,i;for(;;){if(e.lookahead<sq){if(Nq(e),e.lookahead<sq&&t===LK)return _q;if(e.lookahead===0)break}if(n=0,e.lookahead>=aq&&(e.ins_h=Eq(e,e.ins_h,e.window[e.strstart+aq-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,n!==0&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-sq&&(e.match_length=Mq(e,n),e.match_length<=5&&(e.strategy===JK||e.match_length===aq&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=aq&&e.match_length<=e.prev_length){i=e.strstart+e.lookahead-aq,r=FK(e,e.strstart-1-e.prev_match,e.prev_length-aq),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=i&&(e.ins_h=Eq(e,e.ins_h,e.window[e.strstart+aq-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=2,e.strstart++,r&&(Oq(e,!1),e.strm.avail_out===0))return _q}else if(e.match_available){if(r=FK(e,0,e.window[e.strstart-1]),r&&Oq(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return _q}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&=(r=FK(e,0,e.window[e.strstart-1]),0),e.insert=e.strstart<2?e.strstart:2,t===BK?(Oq(e,!0),e.strm.avail_out===0?yq:bq):e.sym_next&&(Oq(e,!1),e.strm.avail_out===0)?_q:vq},Lq=(e,t)=>{let n,r,i,a,o=e.window;for(;;){if(e.lookahead<=oq){if(Nq(e),e.lookahead<=oq&&t===LK)return _q;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=aq&&e.strstart>0&&(i=e.strstart-1,r=o[i],r===o[++i]&&r===o[++i]&&r===o[++i])){a=e.strstart+oq;do;while(r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&r===o[++i]&&i<a);e.match_length=oq-(a-i),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=aq?(n=FK(e,1,e.match_length-aq),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=FK(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Oq(e,!1),e.strm.avail_out===0))return _q}return e.insert=0,t===BK?(Oq(e,!0),e.strm.avail_out===0?yq:bq):e.sym_next&&(Oq(e,!1),e.strm.avail_out===0)?_q:vq},Rq=(e,t)=>{let n;for(;;){if(e.lookahead===0&&(Nq(e),e.lookahead===0)){if(t===LK)return _q;break}if(e.match_length=0,n=FK(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Oq(e,!1),e.strm.avail_out===0))return _q}return e.insert=0,t===BK?(Oq(e,!0),e.strm.avail_out===0?yq:bq):e.sym_next&&(Oq(e,!1),e.strm.avail_out===0)?_q:vq};function zq(e,t,n,r,i){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=r,this.func=i}var Bq=[new zq(0,0,0,0,Pq),new zq(4,4,8,4,Fq),new zq(4,5,16,8,Fq),new zq(4,6,32,32,Fq),new zq(4,4,16,16,Iq),new zq(8,16,32,32,Iq),new zq(8,16,128,128,Iq),new zq(8,32,128,256,Iq),new zq(32,128,258,1024,Iq),new zq(32,258,258,4096,Iq)],Vq=e=>{e.window_size=2*e.w_size,wq(e.head),e.max_lazy_match=Bq[e.level].max_lazy,e.good_match=Bq[e.level].good_length,e.nice_match=Bq[e.level].nice_length,e.max_chain_length=Bq[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0};function Hq(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=eq,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(iq*2),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),wq(this.dyn_ltree),wq(this.dyn_dtree),wq(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),wq(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),wq(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Uq=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.status!==lq&&t.status!==uq&&t.status!==dq&&t.status!==fq&&t.status!==pq&&t.status!==mq&&t.status!==
115hq&&t.status!==gq)},Wq=e=>{if(Uq(e))return Sq(e,WK);e.total_in=e.total_out=0,e.data_type=$K;let t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?uq:t.wrap?lq:hq,e.adler=t.wrap===2?0:1,t.last_flush=-2,MK(t),HK},Gq=e=>{let t=Wq(e);return t===HK&&Vq(e.state),t},Kq=(e,t)=>Uq(e)||e.state.wrap!==2?WK:(e.state.gzhead=t,HK),qq=(e,t,n,r,i,a)=>{if(!e)return WK;let o=1;if(t===qK&&(t=6),r<0?(o=0,r=-r):r>15&&(o=2,r-=16),i<1||i>tq||n!==eq||r<8||r>15||t<0||t>9||a<0||a>ZK||r===8&&o!==1)return Sq(e,WK);r===8&&(r=9);let s=new Hq;return e.state=s,s.strm=e,s.status=lq,s.wrap=o,s.gzhead=null,s.w_bits=r,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=i+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+aq-1)/aq),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<i+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=a,s.method=n,Gq(e)},Jq={deflateInit:(e,t)=>qq(e,t,eq,nq,rq,QK),deflateInit2:qq,deflateReset:Gq,deflateResetKeep:Wq,deflateSetHeader:Kq,deflate:(e,t)=>{if(Uq(e)||t>VK||t<0)return e?Sq(e,WK):WK;let n=e.state;if(!e.output||e.avail_in!==0&&!e.input||n.status===gq&&t!==BK)return Sq(e,e.avail_out===0?KK:WK);let r=n.last_flush;if(n.last_flush=t,n.pending!==0){if(Dq(e),e.avail_out===0)return n.last_flush=-1,HK}else if(e.avail_in===0&&Cq(t)<=Cq(r)&&t!==BK)return Sq(e,KK);if(n.status===gq&&e.avail_in!==0)return Sq(e,KK);if(n.status===lq&&n.wrap===0&&(n.status=hq),n.status===lq){let t=eq+(n.w_bits-8<<4)<<8,r=-1;if(r=n.strategy>=YK||n.level<2?0:n.level<6?1:n.level===6?2:3,t|=r<<6,n.strstart!==0&&(t|=cq),t+=31-t%31,Aq(n,t),n.strstart!==0&&(Aq(n,e.adler>>>16),Aq(n,e.adler&65535)),e.adler=1,n.status=hq,Dq(e),n.pending!==0)return n.last_flush=-1,HK}if(n.status===uq){if(e.adler=0,kq(n,31),kq(n,139),kq(n,8),n.gzhead)kq(n,+!!n.gzhead.text+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),kq(n,n.gzhead.time&255),kq(n,n.gzhead.time>>8&255),kq(n,n.gzhead.time>>16&255),kq(n,n.gzhead.time>>24&255),kq(n,n.level===9?2:n.strategy>=YK||n.level<2?4:0),kq(n,n.gzhead.os&255),n.gzhead.extra&&n.gzhead.extra.length&&(kq(n,n.gzhead.extra.length&255),kq(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=kK(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=dq;else if(kq(n,0),kq(n,0),kq(n,0),kq(n,0),kq(n,0),kq(n,n.level===9?2:n.strategy>=YK||n.level<2?4:0),kq(n,xq),n.status=hq,Dq(e),n.pending!==0)return n.last_flush=-1,HK}if(n.status===dq){if(n.gzhead.extra){let t=n.pending,r=(n.gzhead.extra.length&65535)-n.gzindex;for(;n.pending+r>n.pending_buf_size;){let i=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+i),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>t&&(e.adler=kK(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex+=i,Dq(e),n.pending!==0)return n.last_flush=-1,HK;t=0,r-=i}let i=new Uint8Array(n.gzhead.extra);n.pending_buf.set(i.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>t&&(e.adler=kK(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=fq}if(n.status===fq){if(n.gzhead.name){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=kK(e.adler,n.pending_buf,n.pending-t,t)),Dq(e),n.pending!==0)return n.last_flush=-1,HK;t=0}r=n.gzindex<n.gzhead.name.length?n.gzhead.name.charCodeAt(n.gzindex++)&255:0,kq(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=kK(e.adler,n.pending_buf,n.pending-t,t)),n.gzindex=0}n.status=pq}if(n.status===pq){if(n.gzhead.comment){let t=n.pending,r;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>t&&(e.adler=kK(e.adler,n.pending_buf,n.pending-t,t)),Dq(e),n.pending!==0)return n.last_flush=-1,HK;t=0}r=n.gzindex<n.gzhead.comment.length?n.gzhead.comment.charCodeAt(n.gzindex++)&255:0,kq(n,r)}while(r!==0);n.gzhead.hcrc&&n.pending>t&&(e.adler=kK(e.adler,n.pending_buf,n.pending-t,t))}n.status=mq}if(n.status===mq){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Dq(e),n.pending!==0))return n.last_flush=-1,HK;kq(n,e.adler&255),kq(n,e.adler>>8&255),e.adler=0}if(n.status=hq,Dq(e),n.pending!==0)return n.last_flush=-1,HK}if(e.avail_in!==0||n.lookahead!==0||t!==LK&&n.status!==gq){let r=n.level===0?Pq(n,t):n.strategy===YK?Rq(n,t):n.strategy===XK?Lq(n,t):Bq[n.level].func(n,t);if((r===yq||r===bq)&&(n.status=gq),r===_q||r===yq)return e.avail_out===0&&(n.last_flush=-1),HK;
115if(r===vq&&(t===RK?IK(n):t!==VK&&(NK(n,0,0,!1),t===zK&&(wq(n.head),n.lookahead===0&&(n.strstart=0,n.block_start=0,n.insert=0))),Dq(e),e.avail_out===0))return n.last_flush=-1,HK}return t===BK?n.wrap<=0?UK:(n.wrap===2?(kq(n,e.adler&255),kq(n,e.adler>>8&255),kq(n,e.adler>>16&255),kq(n,e.adler>>24&255),kq(n,e.total_in&255),kq(n,e.total_in>>8&255),kq(n,e.total_in>>16&255),kq(n,e.total_in>>24&255)):(Aq(n,e.adler>>>16),Aq(n,e.adler&65535)),Dq(e),n.wrap>0&&(n.wrap=-n.wrap),n.pending===0?UK:HK):HK},deflateEnd:e=>{if(Uq(e))return WK;let t=e.state.status;return e.state=null,t===hq?Sq(e,GK):HK},deflateSetDictionary:(e,t)=>{let n=t.length;if(Uq(e))return WK;let r=e.state,i=r.wrap;if(i===2||i===1&&r.status!==lq||r.lookahead)return WK;if(i===1&&(e.adler=DK(e.adler,t,n,0)),r.wrap=0,n>=r.w_size){i===0&&(wq(r.head),r.strstart=0,r.block_start=0,r.insert=0);let e=new Uint8Array(r.w_size);e.set(t.subarray(n-r.w_size,n),0),t=e,n=r.w_size}let a=e.avail_in,o=e.next_in,s=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,Nq(r);r.lookahead>=aq;){let e=r.strstart,t=r.lookahead-2;do r.ins_h=Eq(r,r.ins_h,r.window[e+aq-1]),r.prev[e&r.w_mask]=r.head[r.ins_h],r.head[r.ins_h]=e,e++;while(--t);r.strstart=e,r.lookahead=2,Nq(r)}return r.strstart+=r.lookahead,r.block_start=r.strstart,r.insert=r.lookahead,r.lookahead=0,r.match_length=r.prev_length=2,r.match_available=0,e.next_in=o,e.input=s,e.avail_in=a,r.wrap=i,HK},deflateInfo:`pako deflate (from Nodeca project)`},Yq=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),Xq={assign:function(e){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let n=t.shift();if(n){if(typeof n!=`object`)throw TypeError(n+`must be non-object`);for(let t in n)Yq(n,t)&&(e[t]=n[t])}}return e},flattenChunks:e=>{let t=0;for(let n=0,r=e.length;n<r;n++)t+=e[n].length;let n=new Uint8Array(t);for(let t=0,r=0,i=e.length;t<i;t++){let i=e[t];n.set(i,r),r+=i.length}return n}},Zq=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Zq=!1}var Qq=new Uint8Array(256);for(let e=0;e<256;e++)Qq[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;Qq[254]=Qq[254]=1;var $q=e=>{if(typeof TextEncoder==`function`&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,n,r,i,a,o=e.length,s=0;for(i=0;i<o;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new Uint8Array(s),a=0,i=0;a<s;i++)n=e.charCodeAt(i),(n&64512)==55296&&i+1<o&&(r=e.charCodeAt(i+1),(r&64512)==56320&&(n=65536+(n-55296<<10)+(r-56320),i++)),n<128?t[a++]=n:n<2048?(t[a++]=192|n>>>6,t[a++]=128|n&63):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|n&63):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|n&63);return t},eJ=(e,t)=>{if(t<65534&&e.subarray&&Zq)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let n=``;for(let r=0;r<t;r++)n+=String.fromCharCode(e[r]);return n},tJ={string2buf:$q,buf2string:(e,t)=>{let n=t||e.length;if(typeof TextDecoder==`function`&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let r,i,a=Array(n*2);for(i=0,r=0;r<n;){let t=e[r++];if(t<128){a[i++]=t;continue}let o=Qq[t];if(o>4){a[i++]=65533,r+=o-1;continue}for(t&=o===2?31:o===3?15:7;o>1&&r<n;)t=t<<6|e[r++]&63,o--;if(o>1){a[i++]=65533;continue}t<65536?a[i++]=t:(t-=65536,a[i++]=55296|t>>10&1023,a[i++]=56320|t&1023)}return eJ(a,i)},utf8border:(e,t)=>{t||=e.length,t>e.length&&(t=e.length);let n=t-1;for(;n>=0&&(e[n]&192)==128;)n--;return n<0||n===0?t:n+Qq[e[n]]>t?n:t}};function nJ(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg=``,this.state=null,this.data_type=2,this.adler=0}var rJ=nJ,iJ=Object.prototype.toString,{Z_NO_FLUSH:aJ,Z_SYNC_FLUSH:oJ,Z_FULL_FLUSH:sJ,Z_FINISH:cJ,Z_OK:lJ,Z_STREAM_END:uJ,Z_DEFAULT_COMPRESSION:dJ,Z_DEFAULT_STRATEGY:fJ,Z_DEFLATED:pJ}=jK;function mJ(e){this.options=Xq.assign({level:dJ,method:pJ,chunkSize:16384,windowBits:15,memLevel:8,strategy:fJ},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new rJ,this.strm.avail_out=0;let n=Jq.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==lJ)throw Error(AK[n]);if(t.header&&Jq.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e=typeof t.dictionary==`string`?tJ.string2buf(t.dictionary):iJ.call(t.dictionary)===`[object ArrayBuffer]`?new Uint8Array(t.dictionary):t.dictionary,n=Jq.deflateSetDictionary(this.strm,e),n!==lJ)throw Error(AK[n]);this._dict_set=!0}}mJ.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i,a;if(this.ended)return!1;for(a=t===~~t?t:t===!0?cJ:aJ,n.input=typeof e==`string`?tJ.string2buf(e):iJ.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length;;){if(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),(a===oJ||a===sJ)&&n.avail_out<=6){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(i=Jq.deflate(n,a),i===uJ)return n.next_out>0&&this.onData(n.output.subarray(0,n.next_out)),i=Jq.deflateEnd(this.strm),this.onEnd(i),this.ended=!0,i===lJ;if(n.avail_out===0){this.onData(n.output);continue}if(a>0&&n.next_out>0){this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;continue}if(n.avail_in===0)break}return!0},mJ.prototype.onData=function(e){this.chunks.push(e)},mJ.prototype.onEnd=function(e){e===lJ&&(this.result=Xq.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function hJ(e,t){let n=new mJ(t);if(n.push(e,!0),n.err)throw n.msg||AK[n.err];return n.result}function gJ(e,t){return t||={},t.raw=!0,hJ(e,t)}function _J(e,t){return t||={},t.gzip=!0,hJ(e,t)}var vJ={Deflate:mJ,deflate:hJ,deflateRaw:gJ,gzip:_J,constants:jK},yJ=16209,bJ=16191,xJ=function(e,t){let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E=e.state;n=e.next_in,w=e.input,r=n+(e.avail_in-5),i=e.next_out,T=e.output,a=i-(t-e.avail_out),o=i+(e.avail_out-257),s=E.dmax,c=E.wsize,l=E.whave,u=E.wnext,d=E.window,f=E.hold,p=E.bits,m=E.lencode,h=E.distcode,g=(1<<E.lenbits)-1,_=(1<<E.distbits)-1;
vendor: 12,585 bytes, line 115
115top:do{p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=m[f&g];dolen:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y===0)T[i++]=v&65535;else if(y&16){b=v&65535,y&=15,y&&(p<y&&(f+=w[n++]<<p,p+=8),b+=f&(1<<y)-1,f>>>=y,p-=y),p<15&&(f+=w[n++]<<p,p+=8,f+=w[n++]<<p,p+=8),v=h[f&_];dodist:for(;;){if(y=v>>>24,f>>>=y,p-=y,y=v>>>16&255,y&16){if(x=v&65535,y&=15,p<y&&(f+=w[n++]<<p,p+=8,p<y&&(f+=w[n++]<<p,p+=8)),x+=f&(1<<y)-1,x>s){e.msg=`invalid distance too far back`,E.mode=yJ;break top}if(f>>>=y,p-=y,y=i-a,x>y){if(y=x-y,y>l&&E.sane){e.msg=`invalid distance too far back`,E.mode=yJ;break top}if(S=0,C=d,u===0){if(S+=c-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}else if(u<y){if(S+=c+u-y,y-=u,y<b){b-=y;do T[i++]=d[S++];while(--y);if(S=0,u<b){y=u,b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}}}else if(S+=u-y,y<b){b-=y;do T[i++]=d[S++];while(--y);S=i-x,C=T}for(;b>2;)T[i++]=C[S++],T[i++]=C[S++],T[i++]=C[S++],b-=3;b&&(T[i++]=C[S++],b>1&&(T[i++]=C[S++]))}else{S=i-x;do T[i++]=T[S++],T[i++]=T[S++],T[i++]=T[S++],b-=3;while(b>2);b&&(T[i++]=T[S++],b>1&&(T[i++]=T[S++]))}}else if(y&64){e.msg=`invalid distance code`,E.mode=yJ;break top}else{v=h[(v&65535)+(f&(1<<y)-1)];continue dodist}break}}else if(!(y&64)){v=m[(v&65535)+(f&(1<<y)-1)];continue dolen}else if(y&32){E.mode=bJ;break top}else{e.msg=`invalid literal/length code`,E.mode=yJ;break top}break}}while(n<r&&i<o);b=p>>3,n-=b,p-=b<<3,f&=(1<<p)-1,e.next_in=n,e.next_out=i,e.avail_in=n<r?5+(r-n):5-(n-r),e.avail_out=i<o?257+(o-i):257-(i-o),E.hold=f,E.bits=p},SJ=15,CJ=852,wJ=592,TJ=0,EJ=1,DJ=2,OJ=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),kJ=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),AJ=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),jJ=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),MJ=(e,t,n,r,i,a,o,s)=>{let c=s.bits,l=0,u=0,d=0,f=0,p=0,m=0,h=0,g=0,_=0,v=0,y,b,x,S,C,w=null,T,E=new Uint16Array(16),D=new Uint16Array(16),O=null,k,A,j;for(l=0;l<=SJ;l++)E[l]=0;for(u=0;u<r;u++)E[t[n+u]]++;for(p=c,f=SJ;f>=1&&E[f]===0;f--);if(p>f&&(p=f),f===0)return i[a++]=20971520,i[a++]=20971520,s.bits=1,0;for(d=1;d<f&&E[d]===0;d++);for(p<d&&(p=d),g=1,l=1;l<=SJ;l++)if(g<<=1,g-=E[l],g<0)return-1;if(g>0&&(e===TJ||f!==1))return-1;for(D[1]=0,l=1;l<SJ;l++)D[l+1]=D[l]+E[l];for(u=0;u<r;u++)t[n+u]!==0&&(o[D[t[n+u]]++]=u);if(e===TJ?(w=O=o,T=20):e===EJ?(w=OJ,O=kJ,T=257):(w=AJ,O=jJ,T=0),v=0,u=0,l=d,C=a,m=p,h=0,x=-1,_=1<<p,S=_-1,e===EJ&&_>CJ||e===DJ&&_>wJ)return 1;for(;;){k=l-h,o[u]+1<T?(A=0,j=o[u]):o[u]>=T?(A=O[o[u]-T],j=w[o[u]-T]):(A=96,j=0),y=1<<l-h,b=1<<m,d=b;do b-=y,i[C+(v>>h)+b]=k<<24|A<<16|j|0;while(b!==0);for(y=1<<l-1;v&y;)y>>=1;if(y===0?v=0:(v&=y-1,v+=y),u++,--E[l]===0){if(l===f)break;l=t[n+o[u]]}if(l>p&&(v&S)!==x){for(h===0&&(h=p),C+=d,m=l-h,g=1<<m;m+h<f&&(g-=E[m+h],!(g<=0));)m++,g<<=1;if(_+=1<<m,e===EJ&&_>CJ||e===DJ&&_>wJ)return 1;x=v&S,i[x]=p<<24|m<<16|C-a|0}}return v!==0&&(i[C+v]=l-h<<24|4194304),s.bits=p,0},NJ=0,PJ=1,FJ=2,{Z_FINISH:IJ,Z_BLOCK:LJ,Z_TREES:RJ,Z_OK:zJ,Z_STREAM_END:BJ,Z_NEED_DICT:VJ,Z_STREAM_ERROR:HJ,Z_DATA_ERROR:UJ,Z_MEM_ERROR:WJ,Z_BUF_ERROR:GJ,Z_DEFLATED:KJ}=jK,qJ=16180,JJ=16181,YJ=16182,XJ=16183,ZJ=16184,QJ=16185,$J=16186,eY=16187,tY=16188,nY=16189,rY=16190,iY=16191,aY=16192,oY=16193,sY=16194,cY=16195,lY=16196,uY=16197,dY=16198,fY=16199,pY=16200,mY=16201,hY=16202,gY=16203,_Y=16204,vY=16205,yY=16206,bY=16207,xY=16208,SY=16209,CY=16210,wY=16211,TY=852,EY=592,DY=15,OY=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function kY(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var AY=e=>{if(!e)return 1;let t=e.state;return+(!t||t.strm!==e||t.mode<qJ||t.mode>wY)},jY=e=>{if(AY(e))return HJ;let t=e.state;return e.total_in=e.total_out=t.total=0,e.msg=``,t.wrap&&(e.adler=t.wrap&1),t.mode=qJ,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(TY),t.distcode=t.distdyn=new Int32Array(EY),t.sane=1,t.back=-1,zJ},MY=e=>{if(AY(e))return HJ;let t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,jY(e)},NY=(e,t)=>{let n;if(AY(e))return HJ;let r=e.state;return t<0?(n=0,t=-t):(n=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?HJ:(r.window!==null&&r.wbits!==t&&(r.window=null),r.wrap=n,r.wbits=t,MY(e))},PY=(e,t)=>{if(!e)return HJ;let n=new kY;e.state=n,n.strm=e,n.window=null,n.mode=qJ;let r=NY(e,t);return r!==zJ&&(e.state=null),r},FY=e=>PY(e,DY),IY=!0,LY,RY,zY=e=>{if(IY){LY=new Int32Array(512),RY=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(MJ(PJ,e.lens,0,288,LY,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;MJ(FJ,e.lens,0,32,RY,0,e.work,{bits:5}),IY=!1}e.lencode=LY,e.lenbits=9,e.distcode=RY,e.distbits=5},BY=(e,t,n,r)=>{let i,a=e.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),r>=a.wsize?(a.window.set(t.subarray(n-a.wsize,n),0),a.wnext=0,a.whave=a.wsize):(i=a.wsize-a.wnext,i>r&&(i=r),a.window.set(t.subarray(n-r,n-r+i),a.wnext),r-=i,r?(a.window.set(t.subarray(n-r,n),0),a.wnext=r,a.whave=a.wsize):(a.wnext+=i,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=i))),0},VY={inflateReset:MY,inflateReset2:NY,inflateResetKeep:jY,inflateInit:FY,inflateInit2:PY,inflate:(e,t)=>{let n,r,i,a,o,s,c,l,u,d,f,p,m,h,g=0,_,v,y,b,x,S,C,w,T=new Uint8Array(4),E,D,O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(AY(e)||!e.output||!e.input&&e.avail_in!==0)return HJ;n=e.state,n.mode===iY&&(n.mode=aY),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,d=s,f=c,w=zJ;inf_leave:for(;;)switch(n.mode){case qJ:if(n.wrap===0){n.mode=aY;break}for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&2&&l===35615){n.wbits===0&&(n.wbits=15),n.check=0,T[0]=l&255,T[1]=l>>>8&255,n.check=kK(n.check,T,2,0),l=0,u=0,n.mode=JJ;break}if(n.head&&(n.head.done=!1),!(n.wrap&1)||(((l&255)<<8)+(l>>8))%31){e.msg=`incorrect header check`,n.mode=SY;break}if((l&15)!==KJ){e.msg=`unknown compression method`,n.mode=SY;break}if(l>>>=4,u-=4,C=(l&15)+8,n.wbits===0&&(n.wbits=C),C>15||C>n.wbits){e.msg=`invalid window size`,n.mode=SY;break}n.dmax=1<<n.wbits,n.flags=0,e.adler=n.check=1,n.mode=l&512?nY:iY,l=0,u=0;break;case JJ:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.flags=l,(n.flags&255)!==KJ){e.msg=`unknown compression method`,n.mode=SY;break}if(n.flags&57344){e.msg=`unknown header flags set`,n.mode=SY;break}n.head&&(n.head.text=l>>8&1),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=kK(n.check,T,2,0)),l=0,u=0,n.mode=YJ;case YJ:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.time=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,T[2]=l>>>16&255,T[3]=l>>>24&255,n.check=kK(n.check,T,4,0)),l=0,u=0,n.mode=XJ;case XJ:for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.head&&(n.head.xflags=l&255,n.head.os=l>>8),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=kK(n.check,T,2,0)),l=0,u=0,n.mode=ZJ;case ZJ:if(n.flags&1024){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length=l,n.head&&(n.head.extra_len=l),n.flags&512&&n.wrap&4&&(T[0]=l&255,T[1]=l>>>8&255,n.check=kK(n.check,T,2,0)),l=0,u=0}else n.head&&(n.head.extra=null);n.mode=QJ;case QJ:if(n.flags&1024&&(p=n.length,p>s&&(p=s),p&&(n.head&&(C=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Uint8Array(n.head.extra_len)),n.head.extra.set(r.subarray(a,a+p),C)),n.flags&512&&n.wrap&4&&(n.check=kK(n.check,r,p,a)),s-=p,a+=p,n.length-=p),n.length))break inf_leave;n.length=0,n.mode=$J;case $J:if(n.flags&2048){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.name+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=kK(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.name=null);n.length=0,n.mode=eY;case eY:if(n.flags&4096){if(s===0)break inf_leave;p=0;do C=r[a+p++],n.head&&C&&n.length<65536&&(n.head.comment+=String.fromCharCode(C));while(C&&p<s);if(n.flags&512&&n.wrap&4&&(n.check=kK(n.check,r,p,a)),s-=p,a+=p,C)break inf_leave}else n.head&&(n.head.comment=null);n.mode=tY;case tY:if(n.flags&512){for(;u<16;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.check&65535)){e.msg=`header crc mismatch`,n.mode=SY;break}l=0,u=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=iY;break;case nY:for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}e.adler=n.check=OY(l),l=0,u=0,n.mode=rY;case rY:if(n.havedict===0)return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,VJ;e.adler=n.check=1,n.mode=iY;case iY:if(t===LJ||t===RJ)break inf_leave;case aY:if(n.last){l>>>=u&7,u-=u&7,n.mode=yY;break}for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}switch(n.last=l&1,l>>>=1,--u,l&3){case 0:n.mode=oY;break;case 1:if(zY(n),n.mode=fY,t===RJ){l>>>=2,u-=2;break inf_leave}break;case 2:n.mode=lY;break;case 3:e.msg=`invalid block type`,n.mode=SY}l>>>=2,u-=2;break;case oY:for(l>>>=u&7,u-=u&7;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if((l&65535)!=(l>>>16^65535)){e.msg=`invalid stored block lengths`,n.mode=SY;break}if(n.length=l&65535,l=0,u=0,n.mode=sY,t===RJ)break inf_leave;case sY:n.mode=cY;case cY:if(p=n.length,p){if(p>s&&(p=s),p>c&&(p=c),p===0)break inf_leave;i.set(r.subarray(a,a+p),o),s-=p,a+=p,c-=p,o+=p,n.length-=p;break}n.mode=iY;break;case lY:for(;u<14;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.nlen=(l&31)+257,l>>>=5,u-=5,n.ndist=(l&31)+1,l>>>=5,u-=5,n.ncode=(l&15)+4,l>>>=4,u-=4,n.nlen>286||n.ndist>30){e.msg=`too many length or distance symbols`,n.mode=SY;break}n.have=0,n.mode=uY;case uY:for(;n.have<n.ncode;){for(;u<3;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.lens[O[n.have++]]=l&7,l>>>=3,u-=3}for(;n.have<19;)n.lens[O[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,E={bits:n.lenbits},w=MJ(NJ,n.lens,0,19,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid code lengths set`,n.mode=SY;break}n.have=0,n.mode=dY;case dY:for(;n.have<n.nlen+n.ndist;){for(;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(y<16)l>>>=_,u-=_,n.lens[n.have++]=y;else{if(y===16){for(D=_+2;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(l>>>=_,u-=_,n.have===0){e.msg=`invalid bit length repeat`,n.mode=SY;break}C=n.lens[n.have-1],p=3+(l&3),l>>>=2,u-=2}else if(y===17){for(D=_+3;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=3+(l&7),l>>>=3,u-=3}else{for(D=_+7;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=_,u-=_,C=0,p=11+(l&127),l>>>=7,u-=7}if(n.have+p>n.nlen+n.ndist){e.msg=`invalid bit length repeat`,n.mode=SY;break}for(;p--;)n.lens[n.have++]=C}}if(n.mode===SY)break;if(n.lens[256]===0){e.msg=`invalid code -- missing end-of-block`,n.mode=SY;break}if(n.lenbits=9,E={bits:n.lenbits},w=MJ(PJ,n.lens,0,n.nlen,n.lencode,0,n.work,E),n.lenbits=E.bits,w){e.msg=`invalid literal/lengths set`,n.mode=SY;break}if(n.distbits=6,n.distcode=n.distdyn,E={bits:n.distbits},w=MJ(FJ,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,E),n.distbits=E.bits,w){e.msg=`invalid distances set`,n.mode=SY;break}if(n.mode=fY,t===RJ)break inf_leave;case fY:n.mode=pY;case pY:if(s>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,xJ(e,f),o=e.next_out,i=e.output,c=e.avail_out,a=e.next_in,r=e.input,s=e.avail_in,l=n.hold,u=n.bits,n.mode===iY&&(n.back=-1);break}for(n.back=0;g=n.lencode[l&(1<<n.lenbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(v&&!(v&240)){for(b=_,x=v,S=y;g=n.lencode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,n.length=y,v===0){n.mode=vY;break}if(v&32){n.back=-1,n.mode=iY;break}if(v&64){e.msg=`invalid literal/length code`,n.mode=SY;break}n.extra=v&15,n.mode=mY;
115case mY:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=hY;case hY:for(;g=n.distcode[l&(1<<n.distbits)-1],_=g>>>24,v=g>>>16&255,y=g&65535,!(_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(!(v&240)){for(b=_,x=v,S=y;g=n.distcode[S+((l&(1<<b+x)-1)>>b)],_=g>>>24,v=g>>>16&255,y=g&65535,!(b+_<=u);){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}l>>>=b,u-=b,n.back+=b}if(l>>>=_,u-=_,n.back+=_,v&64){e.msg=`invalid distance code`,n.mode=SY;break}n.offset=y,n.extra=v&15,n.mode=gY;case gY:if(n.extra){for(D=n.extra;u<D;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,u-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg=`invalid distance too far back`,n.mode=SY;break}n.mode=_Y;case _Y:if(c===0)break inf_leave;if(p=f-c,n.offset>p){if(p=n.offset-p,p>n.whave&&n.sane){e.msg=`invalid distance too far back`,n.mode=SY;break}p>n.wnext?(p-=n.wnext,m=n.wsize-p):m=n.wnext-p,p>n.length&&(p=n.length),h=n.window}else h=i,m=o-n.offset,p=n.length;p>c&&(p=c),c-=p,n.length-=p;do i[o++]=h[m++];while(--p);n.length===0&&(n.mode=pY);break;case vY:if(c===0)break inf_leave;i[o++]=n.length,c--,n.mode=pY;break;case yY:if(n.wrap){for(;u<32;){if(s===0)break inf_leave;s--,l|=r[a++]<<u,u+=8}if(f-=c,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?kK(n.check,i,f,o-f):DK(n.check,i,f,o-f)),f=c,n.wrap&4&&(n.flags?l:OY(l))!==n.check){e.msg=`incorrect data check`,n.mode=SY;break}l=0,u=0}n.mode=bY;case bY:if(n.wrap&&n.flags){for(;u<32;){if(s===0)break inf_leave;s--,l+=r[a++]<<u,u+=8}if(n.wrap&4&&l!==(n.total&4294967295)){e.msg=`incorrect length check`,n.mode=SY;break}l=0,u=0}n.mode=xY;case xY:w=BJ;break inf_leave;case SY:w=UJ;break inf_leave;case CY:return WJ;case wY:default:return HJ}return e.next_out=o,e.avail_out=c,e.next_in=a,e.avail_in=s,n.hold=l,n.bits=u,(n.wsize||f!==e.avail_out&&n.mode<SY&&(n.mode<yY||t!==IJ))&&BY(e,e.output,e.next_out,f-e.avail_out),d-=e.avail_in,f-=e.avail_out,e.total_in+=d,e.total_out+=f,n.total+=f,n.wrap&4&&f&&(e.adler=n.check=n.flags?kK(n.check,i,f,e.next_out-f):DK(n.check,i,f,e.next_out-f)),e.data_type=n.bits+(n.last?64:0)+(n.mode===iY?128:0)+(n.mode===fY||n.mode===sY?256:0),(d===0&&f===0||t===IJ)&&w===zJ&&(w=GJ),w},inflateEnd:e=>{if(AY(e))return HJ;let t=e.state;return t.window&&=null,e.state=null,zJ},inflateGetHeader:(e,t)=>{if(AY(e))return HJ;let n=e.state;return n.wrap&2?(n.head=t,t.done=!1,zJ):HJ},inflateSetDictionary:(e,t)=>{let n=t.length,r,i,a;return AY(e)||(r=e.state,r.wrap!==0&&r.mode!==rY)?HJ:r.mode===rY&&(i=1,i=DK(i,t,n,0),i!==r.check)?UJ:(a=BY(e,t,n,n),a?(r.mode=CY,WJ):(r.havedict=1,zJ))},inflateInfo:`pako inflate (from Nodeca project)`};function HY(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name=``,this.comment=``,this.hcrc=0,this.done=!1}var UY=HY,WY=Object.prototype.toString,{Z_NO_FLUSH:GY,Z_FINISH:KY,Z_OK:qY,Z_STREAM_END:JY,Z_NEED_DICT:YY,Z_STREAM_ERROR:XY,Z_DATA_ERROR:ZY,Z_MEM_ERROR:QY}=jK;function $Y(e){this.options=Xq.assign({chunkSize:65536,windowBits:15,to:``},e||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg=``,this.ended=!1,this.chunks=[],this.strm=new rJ,this.strm.avail_out=0;let n=VY.inflateInit2(this.strm,t.windowBits);if(n!==qY||(this.header=new UY,VY.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary==`string`?t.dictionary=tJ.string2buf(t.dictionary):WY.call(t.dictionary)===`[object ArrayBuffer]`&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=VY.inflateSetDictionary(this.strm,t.dictionary),n!==qY))))throw Error(AK[n])}$Y.prototype.push=function(e,t){let n=this.strm,r=this.options.chunkSize,i=this.options.dictionary,a,o,s;if(this.ended)return!1;for(o=t===~~t?t:t===!0?KY:GY,n.input=WY.call(e)===`[object ArrayBuffer]`?new Uint8Array(e):e,n.next_in=0,n.avail_in=n.input.length;;){for(n.avail_out===0&&(n.output=new Uint8Array(r),n.next_out=0,n.avail_out=r),a=VY.inflate(n,o),a===YY&&i&&(a=VY.inflateSetDictionary(n,i),a===qY?a=VY.inflate(n,o):a===ZY&&(a=YY));n.avail_in>0&&a===JY&&n.state.wrap>0&&e[n.next_in]!==0;)VY.inflateReset(n),a=VY.inflate(n,o);switch(a){case XY:case ZY:case YY:case QY:return this.onEnd(a),this.ended=!0,!1}if(s=n.avail_out,n.next_out&&(n.avail_out===0||a===JY))if(this.options.to===`string`){let e=tJ.utf8border(n.output,n.next_out),t=n.next_out-e,i=tJ.buf2string(n.output,e);n.next_out=t,n.avail_out=r-t,t&&n.output.set(n.output.subarray(e,e+t),0),this.onData(i)}else this.onData(n.output.length===n.next_out?n.output:n.output.subarray(0,n.next_out));if(a!==qY||s!==0){if(a===JY)return a=VY.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(n.avail_in===0)break}}return!0},$Y.prototype.onData=function(e){this.chunks.push(e)},$Y.prototype.onEnd=function(e){e===qY&&(this.result=this.options.to===`string`?this.chunks.join(``):Xq.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function eX(e,t){let n=new $Y(t);if(n.push(e),n.err)throw n.msg||AK[n.err];return n.result}function tX(e,t){return t||={},t.raw=!0,eX(e,t)}var nX={Inflate:$Y,inflate:eX,inflateRaw:tX,ungzip:eX,constants:jK},{Deflate:rX,deflate:iX,deflateRaw:aX,gzip:oX}=vJ,{Inflate:sX,inflate:cX,inflateRaw:lX,ungzip:uX}=nX,dX=sX,fX=cX,pX=[];for(let e=0;e<256;e++){let t=e;for(let e=0;e<8;e++)t&1?t=3988292384^t>>>1:t>>>=1;pX[e]=t}var mX=4294967295;function hX(e,t,n){let r=e;for(let e=0;e<n;e++)r=pX[(r^t[e])&255]^r>>>8;return r}
115function gX(e,t){return(hX(mX,e,t)^mX)>>>0}function _X(e,t,n){let r=e.readUint32(),i=gX(new Uint8Array(e.buffer,e.byteOffset+e.offset-t-4,t),t);if(i!==r)throw Error(`CRC mismatch for chunk ${n}. Expected ${r}, found ${i}`)}function vX(e,t,n){for(let r=0;r<n;r++)t[r]=e[r]}function yX(e,t,n,r){let i=0;for(;i<r;i++)t[i]=e[i];for(;i<n;i++)t[i]=e[i]+t[i-r]&255}function bX(e,t,n,r){let i=0;if(n.length===0)for(;i<r;i++)t[i]=e[i];else for(;i<r;i++)t[i]=e[i]+n[i]&255}function xX(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+(t[a-i]>>1)&255}else{for(;a<i;a++)t[a]=e[a]+(n[a]>>1)&255;for(;a<r;a++)t[a]=e[a]+(t[a-i]+n[a]>>1)&255}}function SX(e,t,n,r,i){let a=0;if(n.length===0){for(;a<i;a++)t[a]=e[a];for(;a<r;a++)t[a]=e[a]+t[a-i]&255}else{for(;a<i;a++)t[a]=e[a]+n[a]&255;for(;a<r;a++)t[a]=e[a]+CX(t[a-i],n[a],n[a-i])&255}}function CX(e,t,n){let r=e+t-n,i=Math.abs(r-e),a=Math.abs(r-t),o=Math.abs(r-n);return i<=a&&i<=o?e:a<=o?t:n}function wX(e,t,n,r,i,a){switch(e){case 0:vX(t,n,i);break;case 1:yX(t,n,i,a);break;case 2:bX(t,n,r,i);break;case 3:xX(t,n,r,i,a);break;case 4:SX(t,n,r,i,a);break;default:throw Error(`Unsupported filter: ${e}`)}}var TX=new Uint16Array([255]),EX=new Uint8Array(TX.buffer)[0]===255;function DX(e){let{data:t,width:n,height:r,channels:i,depth:a}=e,o=[{x:0,y:0,xStep:8,yStep:8},{x:4,y:0,xStep:8,yStep:8},{x:0,y:4,xStep:4,yStep:8},{x:2,y:0,xStep:4,yStep:4},{x:0,y:2,xStep:2,yStep:4},{x:1,y:0,xStep:2,yStep:2},{x:0,y:1,xStep:1,yStep:2}],s=Math.ceil(a/8)*i,c=new Uint8Array(r*n*s),l=0;for(let e=0;e<7;e++){let i=o[e],a=Math.ceil((n-i.x)/i.xStep),u=Math.ceil((r-i.y)/i.yStep);if(a<=0||u<=0)continue;let d=a*s,f=new Uint8Array(d);for(let e=0;e<u;e++){let o=t[l++],u=t.subarray(l,l+d);l+=d;let p=new Uint8Array(d);wX(o,u,p,f,d,s),f.set(p);for(let t=0;t<a;t++){let a=i.x+t*i.xStep,o=i.y+e*i.yStep;if(!(a>=n||o>=r))for(let e=0;e<s;e++)c[(o*n+a)*s+e]=p[t*s+e]}}}if(a===16){let e=new Uint16Array(c.buffer);if(EX)for(let t=0;t<e.length;t++)e[t]=OX(e[t]);return e}return c}function OX(e){return(e&255)<<8|e>>8&255}var kX=new Uint16Array([255]),AX=new Uint8Array(kX.buffer)[0]===255,jX=new Uint8Array;function MX(e){let{data:t,width:n,height:r,channels:i,depth:a}=e,o=Math.ceil(a/8)*i,s=Math.ceil(a/8*i*n),c=new Uint8Array(r*s),l=jX,u=0,d,f;for(let e=0;e<r;e++){switch(d=t.subarray(u+1,u+1+s),f=c.subarray(e*s,(e+1)*s),t[u]){case 0:vX(d,f,s);break;case 1:yX(d,f,s,o);break;case 2:bX(d,f,l,s);break;case 3:xX(d,f,l,s,o);break;case 4:SX(d,f,l,s,o);break;default:throw Error(`Unsupported filter: ${t[u]}`)}l=f,u+=s+1}if(a===16){let e=new Uint16Array(c.buffer);if(AX)for(let t=0;t<e.length;t++)e[t]=NX(e[t]);return e}return c}function NX(e){return(e&255)<<8|e>>8&255}var PX=Uint8Array.of(137,80,78,71,13,10,26,10);function FX(e){if(!IX(e.readBytes(PX.length)))throw Error(`wrong PNG signature`)}function IX(e){if(e.length<PX.length)return!1;for(let t=0;t<PX.length;t++)if(e[t]!==PX[t])return!1;return!0}var LX=`tEXt`,RX=0,zX=new TextDecoder(`latin1`);function BX(e){if(HX(e),e.length===0||e.length>79)throw Error(`keyword length must be between 1 and 79`)}var VX=/^[\u0000-\u00FF]*$/;function HX(e){if(!VX.test(e))throw Error(`invalid latin1 text`)}function UX(e,t,n){let r=WX(t);e[r]=GX(t,n-r.length-1)}function WX(e){for(e.mark();e.readByte()!==RX;);let t=e.offset;e.reset();let n=zX.decode(e.readBytes(t-e.offset-1));return e.skip(1),BX(n),n}function GX(e,t){return zX.decode(e.readBytes(t))}var KX={UNKNOWN:-1,GREYSCALE:0,TRUECOLOUR:2,INDEXED_COLOUR:3,GREYSCALE_ALPHA:4,TRUECOLOUR_ALPHA:6},qX={UNKNOWN:-1,DEFLATE:0},JX={UNKNOWN:-1,ADAPTIVE:0},YX={UNKNOWN:-1,NO_INTERLACE:0,ADAM7:1},XX={NONE:0,BACKGROUND:1,PREVIOUS:2},ZX={SOURCE:0,OVER:1},QX=class extends SG{_checkCrc;_inflator;_png;_apng;_end;_hasPalette;_palette;_hasTransparency;_transparency;_compressionMethod;_filterMethod;_interlaceMethod;_colorType;_isAnimated;_numberOfFrames;_numberOfPlays;_frames;_writingDataChunks;constructor(e,t={}){super(e);let{checkCrc:n=!1}=t;this._checkCrc=n,this._inflator=new dX,this._png={width:-1,height:-1,channels:-1,data:new Uint8Array,depth:1,text:{}},this._apng={width:-1,height:-1,channels:-1,depth:1,numberOfFrames:1,numberOfPlays:0,text:{},frames:[]},this._end=!1,this._hasPalette=!1,this._palette=[],this._hasTransparency=!1,this._transparency=new Uint16Array,this._compressionMethod=qX.UNKNOWN,this._filterMethod=JX.UNKNOWN,this._interlaceMethod=YX.UNKNOWN,this._colorType=KX.UNKNOWN,this._isAnimated=!1,this._numberOfFrames=1,this._numberOfPlays=0,this._frames=[],this._writingDataChunks=!1,this.setBigEndian()}decode(){for(FX(this);!this._end;){let e=this.readUint32(),t=this.readChars(4);this.decodeChunk(e,t)}return this.decodeImage(),this._png}decodeApng(){for(FX(this);!this._end;){let e=this.readUint32(),t=this.readChars(4);this.decodeApngChunk(e,t)}return this.decodeApngImage(),this._apng}decodeChunk(e,t){let n=this.offset;switch(t){case`IHDR`:this.decodeIHDR();break;case`PLTE`:this.decodePLTE(e);break;case`IDAT`:this.decodeIDAT(e);break;case`IEND`:this._end=!0;break;case`tRNS`:this.decodetRNS(e);break;case`iCCP`:this.decodeiCCP(e);break;case LX:UX(this._png.text,this,e);break;case`pHYs`:this.decodepHYs();break;default:this.skip(e)}if(this.offset-n!==e)throw Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?_X(this,e+4,t):this.skip(4)}decodeApngChunk(e,t){let n=this.offset;switch(t!==`fdAT`&&t!==`IDAT`&&this._writingDataChunks&&this.pushDataToFrame(),t){case`acTL`:this.decodeACTL();break;case`fcTL`:this.decodeFCTL();break;case`fdAT`:this.decodeFDAT(e);break;default:this.decodeChunk(e,t),this.offset=n+e}if(this.offset-n!==e)throw Error(`Length mismatch while decoding chunk ${t}`);this._checkCrc?_X(this,e+4,t):this.skip(4)}decodeIHDR(){let e=this._png;e.width=this.readUint32(),e.height=this.readUint32(),e.depth=$X(this.readUint8());let t=this.readUint8();this._colorType=t;let n;switch(t){case KX.GREYSCALE:n=1;break;case KX.TRUECOLOUR:n=3;break;case KX.INDEXED_COLOUR:n=1;break;case KX.GREYSCALE_ALPHA:n=2;break;case KX.TRUECOLOUR_ALPHA:n=4;break;case KX.UNKNOWN:default:throw Error(`Unknown color type: ${t}`)}if(this._png.channels=n,this._compressionMethod=this.readUint8(),this._compressionMethod!==qX.DEFLATE)throw Error(`Unsupported compression method: ${this._compressionMethod}`);this._filterMethod=this.readUint8(),this._interlaceMethod=this.readUint8()}decodeACTL(){this._numberOfFrames=this.readUint32(),this._numberOfPlays=this.readUint32(),this._isAnimated=!0}decodeFCTL(){let e={sequenceNumber:this.readUint32(),width:this.readUint32(),height:this.readUint32(),xOffset:this.readUint32(),yOffset:this.readUint32(),delayNumber:this.readUint16(),delayDenominator:this.readUint16(),disposeOp:this.readUint8(),blendOp:this.readUint8(),data:new Uint8Array};this._frames.push(e)}
115decodePLTE(e){if(e%3!=0)throw RangeError(`PLTE field length must be a multiple of 3. Got ${e}`);let t=e/3;this._hasPalette=!0;let n=[];this._palette=n;for(let e=0;e<t;e++)n.push([this.readUint8(),this.readUint8(),this.readUint8()])}decodeIDAT(e){this._writingDataChunks=!0;let t=e,n=this.offset+this.byteOffset;if(this._inflator.push(new Uint8Array(this.buffer,n,t)),this._inflator.err)throw Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodeFDAT(e){this._writingDataChunks=!0;let t=e,n=this.offset+this.byteOffset;if(n+=4,t-=4,this._inflator.push(new Uint8Array(this.buffer,n,t)),this._inflator.err)throw Error(`Error while decompressing the data: ${this._inflator.err}`);this.skip(e)}decodetRNS(e){switch(this._colorType){case KX.GREYSCALE:case KX.TRUECOLOUR:if(e%2!=0)throw RangeError(`tRNS chunk length must be a multiple of 2. Got ${e}`);if(e/2>this._png.width*this._png.height)throw Error(`tRNS chunk contains more alpha values than there are pixels (${e/2} vs ${this._png.width*this._png.height})`);this._hasTransparency=!0,this._transparency=new Uint16Array(e/2);for(let t=0;t<e/2;t++)this._transparency[t]=this.readUint16();break;case KX.INDEXED_COLOUR:{if(e>
115this._palette.length)throw Error(`tRNS chunk contains more alpha values than there are palette colors (${e} vs ${this._palette.length})`);let t=0;for(;t<e;t++){let e=this.readByte();this._palette[t].push(e)}for(;t<this._palette.length;t++)this._palette[t].push(255);break}case KX.UNKNOWN:case KX.GREYSCALE_ALPHA:case KX.TRUECOLOUR_ALPHA:default:throw Error(`tRNS chunk is not supported for color type ${this._colorType}`)}}decodeiCCP(e){let t=WX(this),n=this.readUint8();if(n!==qX.DEFLATE)throw Error(`Unsupported iCCP compression method: ${n}`);let r=this.readBytes(e-t.length-2);this._png.iccEmbeddedProfile={name:t,profile:fX(r)}}decodepHYs(){let e=this.readUint32(),t=this.readUint32(),n=this.readByte();this._png.resolution={x:e,y:t,unit:n}}decodeApngImage(){this._apng.width=this._png.width,this._apng.height=this._png.height,this._apng.channels=this._png.channels,this._apng.depth=this._png.depth,this._apng.numberOfFrames=this._numberOfFrames,this._apng.numberOfPlays=this._numberOfPlays,this._apng.text=this._png.text,this._apng.resolution=this._png.resolution;for(let e=0;e<this._numberOfFrames;e++){let t={sequenceNumber:this._frames[e].sequenceNumber,delayNumber:this._frames[e].delayNumber,delayDenominator:this._frames[e].delayDenominator,data:this._apng.depth===8?new Uint8Array(this._apng.width*this._apng.height*this._apng.channels):new Uint16Array(this._apng.width*this._apng.height*this._apng.channels)},n=this._frames.at(e);if(n){if(n.data=MX({data:n.data,width:n.width,height:n.height,channels:this._apng.channels,depth:this._apng.depth}),this._hasPalette&&(this._apng.palette=this._palette),this._hasTransparency&&(this._apng.transparency=this._transparency),e===0||n.xOffset===0&&n.yOffset===0&&n.width===this._png.width&&n.height===this._png.height)t.data=n.data;else{let r=this._apng.frames.at(e-1);this.disposeFrame(n,r,t),this.addFrameDataToCanvas(t,n)}this._apng.frames.push(t)}}return this._apng}disposeFrame(e,t,n){switch(e.disposeOp){case XX.NONE:break;case XX.BACKGROUND:for(let t=0;t<this._png.height;t++)for(let r=0;r<this._png.width;r++){let i=(t*e.width+r)*this._png.channels;for(let e=0;e<this._png.channels;e++)n.data[i+e]=0}break;case XX.PREVIOUS:n.data.set(t.data);break;default:throw Error(`Unknown disposeOp`)}}addFrameDataToCanvas(e,t){let n=1<<this._png.depth,r=(e,n)=>({index:((e+t.yOffset)*this._png.width+t.xOffset+n)*this._png.channels,frameIndex:(e*t.width+n)*this._png.channels});switch(t.blendOp){case ZX.SOURCE:for(let n=0;n<t.height;n++)for(let i=0;i<t.width;i++){let{index:a,frameIndex:o}=r(n,i);for(let n=0;n<this._png.channels;n++)e.data[a+n]=t.data[o+n]}break;case ZX.OVER:for(let i=0;i<t.height;i++)for(let a=0;a<t.width;a++){let{index:o,frameIndex:s}=r(i,a);for(let r=0;r<this._png.channels;r++){let i=t.data[s+this._png.channels-1]/n,a=r%(this._png.channels-1)==0?1:t.data[s+r],c=Math.floor(i*a+(1-i)*e.data[o+r]);e.data[o+r]+=c}}break;default:throw Error(`Unknown blendOp`)}}decodeImage(){if(this._inflator.err)throw Error(`Error while decompressing the data: ${this._inflator.err}`);let e=this._isAnimated?(this._frames?.at(0)).data:this._inflator.result;if(this._filterMethod!==JX.ADAPTIVE)throw Error(`Filter method ${this._filterMethod} not supported`);if(this._interlaceMethod===YX.NO_INTERLACE)this._png.data=MX({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else if(this._interlaceMethod===YX.ADAM7)this._png.data=DX({data:e,width:this._png.width,height:this._png.height,channels:this._png.channels,depth:this._png.depth});else throw Error(`Interlace method ${this._interlaceMethod} not supported`);this._hasPalette&&(this._png.palette=this._palette),this._hasTransparency&&(this._png.transparency=this._transparency)}pushDataToFrame(){let e=this._inflator.result,t=this._frames.at(-1);t?t.data=e:this._frames.push({sequenceNumber:0,width:this._png.width,height:this._png.height,xOffset:0,yOffset:0,delayNumber:0,delayDenominator:0,disposeOp:XX.NONE,blendOp:ZX.SOURCE,data:e}),this._inflator=new dX,this._writingDataChunks=!1}};function $X(e){if(e!==1&&e!==2&&e!==4&&e!==8&&e!==16)throw Error(`invalid bit depth: ${e}`);return e}var eZ;(function(e){e[e.UNKNOWN=0]=`UNKNOWN`,e[e.METRE=1]=`METRE`})(eZ||={});function tZ(e,t){return new QX(e,t).decode()}var nZ=`modulepreload`,rZ=function(e){return`/`+e},iZ={},aZ=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=rZ(t,n),t=s(t),t in iZ)return;iZ[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:nZ,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n
115)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},oZ=function(){return typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:this}();function sZ(){oZ.console&&typeof oZ.console.log==`function`&&oZ.console.log.apply(oZ.console,arguments)}var cZ={log:sZ,warn:function(e){oZ.console&&(typeof oZ.console.warn==`function`?oZ.console.warn.apply(oZ.console,arguments):sZ.call(null,arguments))},error:function(e){oZ.console&&(typeof oZ.console.error==`function`?oZ.console.error.apply(oZ.console,arguments):sZ(e))}};function lZ(e,t,n){var r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){fZ(r.response,t,n)},r.onerror=function(){cZ.error(`could not download file`)},r.send()}function uZ(e){var t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function dZ(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{var t=document.createEvent(`MouseEvents`);
115t.initMouseEvent(`click`,!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var fZ=oZ.saveAs||((typeof window>`u`?`undefined`:wW(window))!==`object`||window!==oZ?function(){}:typeof HTMLAnchorElement<`u`&&`download`in HTMLAnchorElement.prototype?function(e,t,n){var r=oZ.URL||oZ.webkitURL,i=document.createElement(`a`);t=t||e.name||`download`,i.download=t,i.rel=`noopener`,typeof e==`string`?(i.href=e,i.origin===location.origin?dZ(i):uZ(i.href)?lZ(e,t,n):dZ(i,i.target=`_blank`)):(i.href=r.createObjectURL(e),setTimeout(function(){r.revokeObjectURL(i.href)},4e4),setTimeout(function(){dZ(i)},0))}:`msSaveOrOpenBlob`in navigator?function(e,t,n){if(t=t||e.name||`download`,typeof e==`string`)if(uZ(e))lZ(e,t,n);else{var r=document.createElement(`a`);r.href=e,r.target=`_blank`,setTimeout(function(){dZ(r)})}else navigator.msSaveOrOpenBlob(function(e,t){return t===void 0?t={autoBom:!1}:wW(t)!==`object`&&(cZ.warn(`Deprecated: Expected third argument to be a object`),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}(e,n),t)}:function(e,t,n,r){if((r||=open(``,`_blank`))&&(r.document.title=r.document.body.innerText=`downloading...`),typeof e==`string`)return lZ(e,t,n);var i=e.type===`application/octet-stream`,a=/constructor/i.test(oZ.HTMLElement)||oZ.safari,o=/CriOS\/[\d]+/.test(navigator.userAgent);if((o||i&&a)&&(typeof FileReader>`u`?`undefined`:wW(FileReader))===`object`){var s=new FileReader;s.onloadend=function(){var e=s.result;e=o?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),r?r.location.href=e:location=e,r=null},s.readAsDataURL(e)}else{var c=oZ.URL||oZ.webkitURL,l=c.createObjectURL(e);r?r.location=l:location.href=l,r=null,setTimeout(function(){c.revokeObjectURL(l)},4e4)}});function pZ(e){var t;e||=``,this.ok=!1,e.charAt(0)==`#`&&(e=e.substr(1,6)),e={aliceblue:`f0f8ff`,antiquewhite:`faebd7`,aqua:`00ffff`,aquamarine:`7fffd4`,azure:`f0ffff`,beige:`f5f5dc`,bisque:`ffe4c4`,black:`000000`,blanchedalmond:`ffebcd`,blue:`0000ff`,blueviolet:`8a2be2`,brown:`a52a2a`,burlywood:`deb887`,cadetblue:`5f9ea0`,chartreuse:`7fff00`,chocolate:`d2691e`,coral:`ff7f50`,cornflowerblue:`6495ed`,cornsilk:`fff8dc`,crimson:`dc143c`,cyan:`00ffff`,darkblue:`00008b`,darkcyan:`008b8b`,darkgoldenrod:`b8860b`,darkgray:`a9a9a9`,darkgreen:`006400`,darkkhaki:`bdb76b`,darkmagenta:`8b008b`,darkolivegreen:`556b2f`,darkorange:`ff8c00`,darkorchid:`9932cc`,darkred:`8b0000`,darksalmon:`e9967a`,darkseagreen:`8fbc8f`,darkslateblue:`483d8b`,darkslategray:`2f4f4f`,darkturquoise:`00ced1`,darkviolet:`9400d3`,deeppink:`ff1493`,deepskyblue:`00bfff`,dimgray:`696969`,dodgerblue:`1e90ff`,feldspar:`d19275`,firebrick:`b22222`,floralwhite:`fffaf0`,forestgreen:`228b22`,fuchsia:`ff00ff`,gainsboro:`dcdcdc`,ghostwhite:`f8f8ff`,gold:`ffd700`,goldenrod:`daa520`,gray:`808080`,green:`008000`,greenyellow:`adff2f`,honeydew:`f0fff0`,hotpink:`ff69b4`,indianred:`cd5c5c`,indigo:`4b0082`,ivory:`fffff0`,khaki:`f0e68c`,lavender:`e6e6fa`,lavenderblush:`fff0f5`,lawngreen:`7cfc00`,lemonchiffon:`fffacd`,lightblue:`add8e6`,lightcoral:`f08080`,lightcyan:`e0ffff`,lightgoldenrodyellow:`fafad2`,lightgrey:`d3d3d3`,lightgreen:`90ee90`,lightpink:`ffb6c1`,lightsalmon:`ffa07a`,lightseagreen:`20b2aa`,lightskyblue:`87cefa`,lightslateblue:`8470ff`,lightslategray:`778899`,lightsteelblue:`b0c4de`,lightyellow:`ffffe0`,lime:`00ff00`,limegreen:`32cd32`,linen:`faf0e6`,magenta:`ff00ff`,maroon:`800000`,mediumaquamarine:`66cdaa`,mediumblue:`0000cd`,mediumorchid:`ba55d3`,mediumpurple:`9370d8`,mediumseagreen:`3cb371`,mediumslateblue:`7b68ee`,mediumspringgreen:`00fa9a`,mediumturquoise:`48d1cc`,mediumvioletred:`c71585`,midnightblue:`191970`,mintcream:`f5fffa`,mistyrose:`ffe4e1`,moccasin:`ffe4b5`,navajowhite:`ffdead`,navy:`000080`,oldlace:`fdf5e6`,olive:`808000`,olivedrab:`6b8e23`,orange:`ffa500`,orangered:`ff4500`,orchid:`da70d6`,palegoldenrod:`eee8aa`,palegreen:`98fb98`,paleturquoise:`afeeee`,palevioletred:`d87093`,papayawhip:`ffefd5`,peachpuff:`ffdab9`,peru:`cd853f`,pink:`ffc0cb`,plum:`dda0dd`,powderblue:`b0e0e6`,purple:`800080`,red:`ff0000`,rosybrown:`bc8f8f`,royalblue:`4169e1`,saddlebrown:`8b4513`,salmon:`fa8072`,sandybrown:`f4a460`,seagreen:`2e8b57`,seashell:`fff5ee`,sienna:`a0522d`,silver:`c0c0c0`,skyblue:`87ceeb`,slateblue:`6a5acd`,slategray:`708090`,snow:`fffafa`,springgreen:`00ff7f`,steelblue:`4682b4`,tan:`d2b48c`,teal:`008080`,thistle:`d8bfd8`,tomato:`ff6347`,turquoise:`40e0d0`,violet:`ee82ee`,violetred:`d02090`,wheat:`f5deb3`,white:`ffffff`,whitesmoke:`f5f5f5`,yellow:`ffff00`,yellowgreen:`9acd32`}[e=(e=e.replace(/ /g,``)).toLowerCase()]||e;for(var n=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:[`rgb(123, 234, 45)`,`rgb(255,234,245)`],process:function(e){return[parseInt(e[1]),parseInt(e[2]),parseInt(e[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:[`#00ff00`,`336699`],process:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:[`#fb0`,`f0f`],process:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}}],r=0;r<n.length;r++){var i=n[r].re,a=n[r].process,o=i.exec(e);o&&(t=a(o),this.r=t[0],this.g=t[1],this.b=t[2],this.ok=!0)}this.r=this.r<0||isNaN(this.r)?0:this.r>255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return`rgb(`+this.r+`, `+this.g+`, `+this.b+`)`},this.toHex=function(){var e=this.r.toString(16),t=this.g.toString(16),n=this.b.toString(16);return e.length==1&&(e=`0`+e),t.length==1&&(t=`0`+t),n.length==1&&(n=`0`+n),`#`+e+t+n}}var mZ=oZ.atob.bind(oZ),hZ=oZ.btoa.bind(oZ);function gZ(e,t){var n=e[0],r=e[1],i=e[2],a=e[3];n=vZ(n,r,i,a,t[0],7,-680876936),a=vZ(a,n,r,i,t[1],12,-389564586),i=vZ(i,a,n,r,t[2],17,606105819),r=vZ(r,i,a,n,t[3],22,-1044525330),n=vZ(n,r,i,a,t[4],7,-176418897),a=vZ(a,n,r,i,t[5],12,1200080426),i=vZ(i,a,n,r,t[6],17,-1473231341),r
vendor: 3,865 bytes, line 115
115=vZ(r,i,a,n,t[7],22,-45705983),n=vZ(n,r,i,a,t[8],7,1770035416),a=vZ(a,n,r,i,t[9],12,-1958414417),i=vZ(i,a,n,r,t[10],17,-42063),r=vZ(r,i,a,n,t[11],22,-1990404162),n=vZ(n,r,i,a,t[12],7,1804603682),a=vZ(a,n,r,i,t[13],12,-40341101),i=vZ(i,a,n,r,t[14],17,-1502002290),n=yZ(n,r=vZ(r,i,a,n,t[15],22,1236535329),i,a,t[1],5,-165796510),a=yZ(a,n,r,i,t[6],9,-1069501632),i=yZ(i,a,n,r,t[11],14,643717713),r=yZ(r,i,a,n,t[0],20,-373897302),n=yZ(n,r,i,a,t[5],5,-701558691),a=yZ(a,n,r,i,t[10],9,38016083),i=yZ(i,a,n,r,t[15],14,-660478335),r=yZ(r,i,a,n,t[4],20,-405537848),n=yZ(n,r,i,a,t[9],5,568446438),a=yZ(a,n,r,i,t[14],9,-1019803690),i=yZ(i,a,n,r,t[3],14,-187363961),r=yZ(r,i,a,n,t[8],20,1163531501),n=yZ(n,r,i,a,t[13],5,-1444681467),a=yZ(a,n,r,i,t[2],9,-51403784),i=yZ(i,a,n,r,t[7],14,1735328473),n=bZ(n,r=yZ(r,i,a,n,t[12],20,-1926607734),i,a,t[5],4,-378558),a=bZ(a,n,r,i,t[8],11,-2022574463),i=bZ(i,a,n,r,t[11],16,1839030562),r=bZ(r,i,a,n,t[14],23,-35309556),n=bZ(n,r,i,a,t[1],4,-1530992060),a=bZ(a,n,r,i,t[4],11,1272893353),i=bZ(i,a,n,r,t[7],16,-155497632),r=bZ(r,i,a,n,t[10],23,-1094730640),n=bZ(n,r,i,a,t[13],4,681279174),a=bZ(a,n,r,i,t[0],11,-358537222),i=bZ(i,a,n,r,t[3],16,-722521979),r=bZ(r,i,a,n,t[6],23,76029189),n=bZ(n,r,i,a,t[9],4,-640364487),a=bZ(a,n,r,i,t[12],11,-421815835),i=bZ(i,a,n,r,t[15],16,530742520),n=xZ(n,r=bZ(r,i,a,n,t[2],23,-995338651),i,a,t[0],6,-198630844),a=xZ(a,n,r,i,t[7],10,1126891415),i=xZ(i,a,n,r,t[14],15,-1416354905),r=xZ(r,i,a,n,t[5],21,-57434055),n=xZ(n,r,i,a,t[12],6,1700485571),a=xZ(a,n,r,i,t[3],10,-1894986606),i=xZ(i,a,n,r,t[10],15,-1051523),r=xZ(r,i,a,n,t[1],21,-2054922799),n=xZ(n,r,i,a,t[8],6,1873313359),a=xZ(a,n,r,i,t[15],10,-30611744),i=xZ(i,a,n,r,t[6],15,-1560198380),r=xZ(r,i,a,n,t[13],21,1309151649),n=xZ(n,r,i,a,t[4],6,-145523070),a=xZ(a,n,r,i,t[11],10,-1120210379),i=xZ(i,a,n,r,t[2],15,718787259),r=xZ(r,i,a,n,t[9],21,-343485551),e[0]=kZ(n,e[0]),e[1]=kZ(r,e[1]),e[2]=kZ(i,e[2]),e[3]=kZ(a,e[3])}function _Z(e,t,n,r,i,a){return t=kZ(kZ(t,e),kZ(r,a)),kZ(t<<i|t>>>32-i,n)}function vZ(e,t,n,r,i,a,o){return _Z(t&n|~t&r,e,t,i,a,o)}function yZ(e,t,n,r,i,a,o){return _Z(t&r|n&~r,e,t,i,a,o)}function bZ(e,t,n,r,i,a,o){return _Z(t^n^r,e,t,i,a,o)}function xZ(e,t,n,r,i,a,o){return _Z(n^(t|~r),e,t,i,a,o)}function SZ(e){var t,n=e.length,r=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=e.length;t+=64)gZ(r,CZ(e.substring(t-64,t)));e=e.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t<e.length;t++)i[t>>2]|=e.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(gZ(r,i),t=0;t<16;t++)i[t]=0;return i[14]=8*n,gZ(r,i),r}function CZ(e){var t,n=[];for(t=0;t<64;t+=4)n[t>>2]=e.charCodeAt(t)+(e.charCodeAt(t+1)<<8)+(e.charCodeAt(t+2)<<16)+(e.charCodeAt(t+3)<<24);return n}var wZ=`0123456789abcdef`.split(``);function TZ(e){for(var t=``,n=0;n<4;n++)t+=wZ[e>>8*n+4&15]+wZ[e>>8*n&15];return t}function EZ(e){return String.fromCharCode(255&e,(65280&e)>>8,(16711680&e)>>16,(4278190080&e)>>24)}function DZ(e){return SZ(e).map(EZ).join(``)}var OZ=function(e){for(var t=0;t<e.length;t++)e[t]=TZ(e[t]);return e.join(``)}(SZ(`hello`))!=`5d41402abc4b2a76b9719d911017c592`;function kZ(e,t){if(OZ){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}return e+t&4294967295}function AZ(e,t){var n,r,i,a;if(e!==n){for(var o=(i=e,a=1+(256/e.length|0),Array(a+1).join(i)),s=[],c=0;c<256;c++)s[c]=c;var l=0;for(c=0;c<256;c++){var u=s[c];l=(l+u+o.charCodeAt(c))%256,s[c]=s[l],s[l]=u}n=e,r=s}else s=r;var d=t.length,f=0,p=0,m=``;for(c=0;c<d;c++)p=(p+(u=s[f=(f+1)%256]))%256,s[f]=s[p],s[p]=u,o=s[(s[f]+s[p])%256],m+=String.fromCharCode(t.charCodeAt(c)^o);return m}var jZ={print:4,modify:8,copy:16,"annot-forms":32};function MZ(e,t,n,r){this.v=1,this.r=2;var i=192;e.forEach(function(e){if(jZ.perm!==void 0)throw Error(`Invalid permission: `+e);i+=jZ[e]}),this.padding=`(¿N^NuÂAd\0NVÿú�\b..\0¶Ãh>Â/\f©þdSiz`;
115var a=(t+this.padding).substr(0,32),o=(n+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,o),this.P=-(1+(255^i)),this.encryptionKey=DZ(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(r)).substr(0,5),this.U=AZ(this.encryptionKey,this.padding)}function NZ(e){if(/[^\u0000-\u00ff]/.test(e))throw Error(`Invalid PDF Name Object: `+e+`, Only accept ASCII characters.`);for(var t=``,n=e.length,r=0;r<n;r++){var i=e.charCodeAt(r);t+=i<33||i===35||i===37||i===40||i===41||i===47||i===60||i===62||i===91||i===93||i===123||i===125||i>126?`#`+(`0`+i.toString(16)).slice(-2):e[r]}return t}function PZ(e){if(wW(e)!==`object`)throw Error(`Invalid Context passed to initialize PubSub (jsPDF-module)`);var t={};this.subscribe=function(e,n,r){if(r||=!1,typeof e!=`string`||typeof n!=`function`||typeof r!=`boolean`)throw Error(`Invalid arguments passed to PubSub.subscribe (jsPDF-module)`);t.hasOwnProperty(e)||(t[e]={});var i=Math.random().toString(35);return t[e][i]=[n,!!r],i},this.unsubscribe=function(e){for(var n in t)if(t[n][e])return delete t[n][e],Object.keys(t[n]).length===0&&delete t[n],!0;return!1},this.publish=function(n){if(t.hasOwnProperty(n)){var r=Array.prototype.slice.call(arguments,1),i=[];for(var a in t[n]){var o=t[n][a];try{o[0].apply(e,r)}catch(e){oZ.console&&cZ.error(`jsPDF PubSub Error`,e.message,e)}o[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function FZ(e){if(!(this instanceof FZ))return new FZ(e);var t=`opacity,stroke-opacity`.split(`,`);for(var n in e)e.hasOwnProperty(n)&&t.indexOf(n)>=0&&(this[n]=e[n]);this.id=``,this.objectNumber=-1}function IZ(e,t){this.gState=e,this.matrix=t,this.id=``,this.objectNumber=-1}function LZ(e,t,n,r,i){if(!(this instanceof LZ))return new LZ(e,t,n,r,i);this.type=e===`axial`?2:3,this.coords=t,this.colors=n,IZ.call(this,r,i)}function RZ(e,t,n,r,i){if(!(this instanceof RZ))return new RZ(e,t,n,r,i);this.boundingBox=e,this.xStep=t,this.yStep=n,this.stream=``,this.cloneIndex=0,IZ.call(this,r,i)}function zZ(e){var t,n=typeof arguments[0]==`string`?arguments[0]:`p`,r=arguments[1],i=arguments[2],a=arguments[3],o=[],s=1,c=16,l=`S`,u=null;wW(e||={})===`object`&&(n=e.orientation,r=e.unit||r,i=e.format||i,a=e.compress||e.compressPdf||a,(u=e.encryption||null)!==null&&(u.userPassword=u.userPassword||``,u.ownerPassword=u.ownerPassword||``,u.userPermissions=u.userPermissions||[]),s=typeof e.userUnit==`number`?Math.abs(e.userUnit):1,e.precision!==void 0&&(t=e.precision),e.floatPrecision!==void 0&&(c=e.floatPrecision),l=e.defaultPathOperation||`S`),o=e.filters||(!0===a?[`FlateEncode`]:o),r||=`mm`,n=(``+(n||`P`)).toLowerCase();var d=e.putOnlyUsedFonts||!1,f={},p={internal:{},__private__:{}};p.__private__.PubSub=PZ;var m=`1.3`,h=p.__private__.getPdfVersion=function(){return m};p.__private__.setPdfVersion=function(e){m=e};var g={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};p.__private__.getPageFormats=function(){return g};var _=p.__private__.getPageFormat=function(e){return g[e]};i||=`a4`;var v=`compat`,y=`advanced`,b=v;function x(){this.saveGraphicsState(),H(new Ve(Se,0,0,-Se,0,wn()*Se).toString()+` cm`),this.setFontSize(this.getFontSize()/Se),l=`n`,b=y}function S(){this.restoreGraphicsState(),l=`S`,b=v}var C=p.__private__.combineFontStyleAndFontWeight=function(e,t){if(e==`bold`&&t==`normal`||e==`bold`&&t==400||e==`normal`&&t==`italic`||e==`bold`&&t==`italic`)throw Error(`Invalid Combination of fontweight and fontstyle`);return t&&(e=t==400||t===`normal`?e===`italic`?`italic`:`normal`:t!=700&&t!==`bold`||e!==`normal`?(t==700?`bold`:t)+``+e:`bold`),e};p.advancedAPI=function(e){var t=b===v;return t&&x.call(this),typeof e!=`function`||(e(this),t&&S.call(this)),this},p.compatAPI=function(e){var t=b===y;return t&&S.call(this),typeof e!=`function`||(e(this),t&&x.call(this)),this},p.isAdvancedAPI=function(){return b===y};var w,T=function(e){if(b!==y)throw Error(e+` is only available in 'advanced' API mode. You need to call advancedAPI() first.`)},E=p.roundToPrecision=p.__private__.roundToPrecision=function(e,n){var r=t||n;
115if(isNaN(e)||isNaN(r))throw Error(`Invalid argument passed to jsPDF.roundToPrecision`);return e.toFixed(r).replace(/0+$/,``)};w=p.hpf=p.__private__.hpf=typeof c==`number`?function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.hpf`);return E(e,c)}:c===`smart`?function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.hpf`);return E(e,e>-1&&e<1?16:5)}:function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.hpf`);return E(e,16)};var D=p.f2=p.__private__.f2=function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.f2`);return E(e,2)},O=p.__private__.f3=function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.f3`);return E(e,3)},k=p.scale=p.__private__.scale=function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.scale`);return b===v?e*Se:b===y?e:void 0},A=function(e){return k(function(e){return b===v?wn()-e:b===y?e:void 0}(e))};p.__private__.setPrecision=p.setPrecision=function(e){typeof parseInt(e,10)==`number`&&(t=parseInt(e,10))};var j,M=`00000000000000000000000000000000`,N=p.__private__.getFileId=function(){return M},P=p.__private__.setFileId=function(e){return M=e!==void 0&&/^[a-fA-F0-9]{32}$/.test(e)?e.toUpperCase():M.split(``).map(function(){return`ABCDEF0123456789`.charAt(Math.floor(16*Math.random()))}).join(``),u!==null&&(At=new MZ(u.userPermissions,u.userPassword,u.ownerPassword,M)),M};p.setFileId=function(e){return P(e),this},p.getFileId=function(){return N()};var F=p.__private__.convertDateToPDFDate=function(e){var t=e.getTimezoneOffset(),n=t<0?`+`:`-`,r=Math.floor(Math.abs(t/60)),i=Math.abs(t%60),a=[n,z(r),`'`,z(i),`'`].join(``);return[`D:`,e.getFullYear(),z(e.getMonth()+1),z(e.getDate()),z(e.getHours()),z(e.getMinutes()),z(e.getSeconds()),a].join(``)},I=p.__private__.convertPDFDateToDate=function(e){var t=parseInt(e.substr(2,4),10),n=parseInt(e.substr(6,2),10)-1,r=parseInt(e.substr(8,2),10),i=parseInt(e.substr(10,2),10),a=parseInt(e.substr(12,2),10),o=parseInt(e.substr(14,2),10);return new Date(t,n,r,i,a,o,0)},ee=p.__private__.setCreationDate=function(e){var t;if(e===void 0&&(e=new Date),e instanceof Date)t=F(e);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(e))throw Error(`Invalid argument passed to jsPDF.setCreationDate`);t=e}return j=t},L=p.__private__.getCreationDate=function(e){var t=j;return e===`jsDate`&&(t=I(j)),t};p.setCreationDate=function(e){return ee(e),this},p.getCreationDate=function(e){return L(e)};var R,z=p.__private__.padd2=function(e){return(`0`+parseInt(e)).slice(-2)},B=p.__private__.padd2Hex=function(e){return(`00`+(e=e.toString())).substr(e.length)},V=0,te=[],ne=[],re=0,ie=[],ae=[],oe=!1,se=ne;p.__private__.setCustomOutputDestination=function(e){oe=!0,se=e};var ce=function(e){oe||(se=e)};p.__private__.resetCustomOutputDestination=function(){oe=!1,se=ne};var H=p.__private__.out=function(e){return e=e.toString(),re+=e.length+1,se.push(e),se},le=p.__private__.write=function(e){return H(arguments.length===1?e.toString():Array.prototype.join.call(arguments,` `))},ue=p.__private__.getArrayBuffer=function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n);t--;)r[t]=e.charCodeAt(t);return n},de=[[`Helvetica`,`helvetica`,`normal`,`WinAnsiEncoding`],[`Helvetica-Bold`,`helvetica`,`bold`,`WinAnsiEncoding`],[`Helvetica-Oblique`,`helvetica`,`italic`,`WinAnsiEncoding`],[`Helvetica-BoldOblique`,`helvetica`,`bolditalic`,`WinAnsiEncoding`],[`Courier`,`courier`,`normal`,`WinAnsiEncoding`],[`Courier-Bold`,`courier`,`bold`,`WinAnsiEncoding`],[`Courier-Oblique`,`courier`,`italic`,`WinAnsiEncoding`],[`Courier-BoldOblique`,`courier`,`bolditalic`,`WinAnsiEncoding`],[`Times-Roman`,`times`,`normal`,`WinAnsiEncoding`],[`Times-Bold`,`times`,`bold`,`WinAnsiEncoding`],[`Times-Italic`,`times`,`italic`,`WinAnsiEncoding`],[`Times-BoldItalic`,`times`,`bolditalic`,`WinAnsiEncoding`],[`ZapfDingbats`,`zapfdingbats`,`normal`,null],[`Symbol`,`symbol`,`normal`,null]];p.__private__.getStandardFonts=function(){return de};var fe=e.fontSize||16;p.__private__.setFontSize=p.setFontSize=function(e){return fe=b===y?e/Se:e,this};var pe,U=p.__private__.getFontSize=p.getFontSize=function(){return b===v?fe:fe*Se},me=e.R2L||!1;p.__private__.setR2L=p.setR2L=function(e){return me=e,this},p.__private__.getR2L=p.getR2L=function(){return me};var he,ge=p.__private__.setZoomMode=function(e){if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(e))pe=e;else if(isNaN(e)){if([void 0,null,`fullwidth`,`fullheight`,`fullpage`,`original`].indexOf(e)===-1)throw Error(`zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "`+e+`" is not recognized.`);pe=e}else pe=parseInt(e,10)};p.__private__.getZoomMode=function(){return pe};var _e,ve=p.__private__.setPageMode=function(e){if([void 0,null,`UseNone`,`UseOutlines`,`UseThumbs`,`FullScreen`].indexOf(e)==-1)throw Error(`Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "`+e+`" is not recognized.`);he=e};p.__private__.getPageMode=function(){return he};var ye=p.__private__.setLayoutMode=function(e){if([void 0,null,`continuous`,`single`,`twoleft`,`tworight`,`two`].indexOf(e)==-1)throw Error(`Layout mode must be one of continuous, single, twoleft, tworight. "`+e+`" is not recognized.`);_e=e};p.__private__.getLayoutMode=function(){return _e},p.__private__.setDisplayMode=p.setDisplayMode=function(e,t,n){return ge(e),ye(t),ve(n),this};var be={title:``,subject:``,author:``,keywords:``,creator:``};p.__private__.getDocumentProperty=function(e){if(Object.keys(be).indexOf(e)===-1)throw Error(`Invalid argument passed to
115jsPDF.getDocumentProperty`);return be[e]},p.__private__.getDocumentProperties=function(){return be},p.__private__.setDocumentProperties=p.setProperties=p.setDocumentProperties=function(e){for(var t in be)be.hasOwnProperty(t)&&e[t]&&(be[t]=e[t]);return this},p.__private__.setDocumentProperty=function(e,t){if(Object.keys(be).indexOf(e)===-1)throw Error(`Invalid arguments passed to jsPDF.setDocumentProperty`);return be[e]=t};var xe,Se,Ce,we,Te,Ee={},De={},Oe=[],ke={},Ae={},je={},Me={},Ne=null,Pe=0,Fe=[],Ie=new PZ(p),Le=e.hotfixes||[],Re={},ze={},Be=[],Ve=function e(t,n,r,i,a,o){if(!(this instanceof e))return new e(t,n,r,i,a,o);isNaN(t)&&(t=1),isNaN(n)&&(n=0),isNaN(r)&&(r=0),isNaN(i)&&(i=1),isNaN(a)&&(a=0),isNaN(o)&&(o=0),this._matrix=[t,n,r,i,a,o]};Object.defineProperty(Ve.prototype,"sx",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Ve.prototype,"shy",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Ve.prototype,"shx",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Ve.prototype,"sy",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Ve.prototype,"tx",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Ve.prototype,"ty",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Ve.prototype,"a",{get:function(){return this._matrix[0]},set:function(e){this._matrix[0]=e}}),Object.defineProperty(Ve.prototype,"b",{get:function(){return this._matrix[1]},set:function(e){this._matrix[1]=e}}),Object.defineProperty(Ve.prototype,"c",{get:function(){return this._matrix[2]},set:function(e){this._matrix[2]=e}}),Object.defineProperty(Ve.prototype,"d",{get:function(){return this._matrix[3]},set:function(e){this._matrix[3]=e}}),Object.defineProperty(Ve.prototype,"e",{get:function(){return this._matrix[4]},set:function(e){this._matrix[4]=e}}),Object.defineProperty(Ve.prototype,"f",{get:function(){return this._matrix[5]},set:function(e){this._matrix[5]=e}}),Object.defineProperty(Ve.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Ve.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Ve.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Ve.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Ve.prototype.join=function(e){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(w).join(e)},Ve.prototype.multiply=function(e){return new Ve(e.sx*this.sx+e.shy*this.shx,e.sx*this.shy+e.shy*this.sy,e.shx*this.sx+e.sy*this.shx,e.shx*this.shy+e.sy*this.sy,e.tx*this.sx+e.ty*this.shx+this.tx,e.tx*this.shy+e.ty*this.sy+this.ty)},Ve.prototype.decompose=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty,o=Math.sqrt(e*e+t*t),s=(e/=o)*n+(t/=o)*r;n-=e*s,r-=t*s;var c=Math.sqrt(n*n+r*r);return s/=c,e*(r/=c)<t*(n/=c)&&(e=-e,t=-t,s=-s,o=-o),{scale:new Ve(o,0,0,c,0,0),translate:new Ve(1,0,0,1,i,a),rotate:new Ve(e,t,-t,e,0,0),skew:new Ve(1,0,s,1,0,0)}},Ve.prototype.toString=function(e){return this.join(` `)},Ve.prototype.inversed=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty,o=1/(e*r-t*n),s=r*o,c=-t*o,l=-n*o,u=e*o;return new Ve(s,c,l,u,-s*i-l*a,-c*i-u*a)},Ve.prototype.applyToPoint=function(e){return new pn(e.x*this.sx+e.y*this.shx+this.tx,e.x*this.shy+e.y*this.sy+this.ty)},Ve.prototype.applyToRectangle=function(e){var t=this.applyToPoint(e),n=this.applyToPoint(new pn(e.x+e.w,e.y+e.h));return new mn(t.x,t.y,n.x-t.x,n.y-t.y)},Ve.prototype.clone=function(){var e=this.sx,t=this.shy,n=this.shx,r=this.sy,i=this.tx,a=this.ty;return new Ve(e,t,n,r,i,a)},p.Matrix=Ve;var He=p.matrixMult=function(e,t){return t.multiply(e)},Ue=new Ve(1,0,0,1,0,0);p.unitMatrix=p.identityMatrix=Ue;var We=function(e,t){if(!Ae[e]){var n=(t instanceof LZ?`Sh`:`P`)+(Object.keys(ke).length+1).toString(10);
115t.id=n,Ae[e]=n,ke[n]=t,Ie.publish(`addPattern`,t)}};p.ShadingPattern=LZ,p.TilingPattern=RZ,p.addShadingPattern=function(e,t){return T(`addShadingPattern()`),We(e,t),this},p.beginTilingPattern=function(e){T(`beginTilingPattern()`),gn(e.boundingBox[0],e.boundingBox[1],e.boundingBox[2]-e.boundingBox[0],e.boundingBox[3]-e.boundingBox[1],e.matrix)},p.endTilingPattern=function(e,t){T(`endTilingPattern()`),t.stream=ae[R].join(` 116`),We(e,t),Ie.publish(`endTilingPattern`,t),Be.pop().restore()};var Ge,Ke=p.__private__.newObject=function(){var e=qe();return Je(e,!0),e},qe=p.__private__.newObjectDeferred=function(){return V++,te[V]=function(){return re},V},Je=function(e,t){return t=typeof t==`boolean`&&t,te[e]=re,t&&H(e+` 0 obj`),e},Ye=p.__private__.newAdditionalObject=function(){var e={objId:qe(),content:``};return ie.push(e),e},Xe=qe(),Ze=qe(),Qe=p.__private__.decodeColorString=function(e){var t=e.split(` `);if(t.length!==2||t[1]!==`g`&&t[1]!==`G`)t.length!==5||t[4]!==`k`&&t[4]!==`K`||(t=[(1-t[0])*(1-t[3]),(1-t[1])*(1-t[3]),(1-t[2])*(1-t[3]),`r`]);else{var n=parseFloat(t[0]);t=[n,n,n,`r`]}for(var r=`#`,i=0;i<3;i++)r+=(`0`+Math.floor(255*parseFloat(t[i])).toString(16)).slice(-2);return r},$e=p.__private__.encodeColorString=function(e){var t;typeof e==`string`&&(e={ch1:e});var n=e.ch1,r=e.ch2,i=e.ch3,a=e.ch4,o=e.pdfColorType===`draw`?[`G`,`RG`,`K`]:[`g`,`rg`,`k`];if(typeof n==`string`&&n.charAt(0)!==`#`){var s=new pZ(n);if(s.ok)n=s.toHex();else if(!/^\d*\.?\d*$/.test(n))throw Error(`Invalid color "`+n+`" passed to jsPDF.encodeColorString.`)}if(typeof n==`string`&&/^#[0-9A-Fa-f]{3}$/.test(n)&&(n=`#`+n[1]+n[1]+n[2]+n[2]+n[3]+n[3]),typeof n==`string`&&/^#[0-9A-Fa-f]{6}$/.test(n)){var c=parseInt(n.substr(1),16);n=c>>16&255,r=c>>8&255,i=255&c}if(r===void 0||a===void 0&&n===r&&r===i)t=typeof n==`string`?n+` `+o[0]:e.precision===2?D(n/255)+` `+o[0]:O(n/255)+` `+o[0];else if(a===void 0||wW(a)===`object`){if(a&&!isNaN(a.a)&&a.a===0)return[`1.`,`1.`,`1.`,o[1]].join(` `);t=typeof n==`string`?[n,r,i,o[1]].join(` `):e.precision===2?[D(n/255),D(r/255),D(i/255),o[1]].join(` `):[O(n/255),O(r/255),O(i/255),o[1]].join(` `)}else t=typeof n==`string`?[n,r,i,a,o[2]].join(` `):e.precision===2?[D(n),D(r),D(i),D(a),o[2]].join(` `):[O(n),O(r),O(i),O(a),o[2]].join(` `);return t},et=p.__private__.getFilters=function(){return o},tt=p.__private__.putStream=function(e){var t=(e||={}).data||``,n=e.filters||et(),r=e.alreadyAppliedFilters||[],i=e.addLength1||!1,a=t.length,o=e.objectId,s=function(e){return e};if(u!==null&&o===void 0)throw Error(`ObjectId must be passed to putStream for file encryption`);u!==null&&(s=At.encryptor(o,0));var c={};!0===n&&(n=[`FlateEncode`]);var l=e.additionalKeyValues||[],d=(c=zZ.API.processDataByFilters===void 0?{data:t,reverseChain:[]}:zZ.API.processDataByFilters(t,n)).reverseChain+(Array.isArray(r)?r.join(` `):r.toString());if(c.data.length!==0&&(l.push({key:`Length`,value:c.data.length}),!0===i&&l.push({key:`Length1`,value:a})),d.length!=0)if(d.split(`/`).length-1==1)l.push({key:`Filter`,value:d});else{l.push({key:`Filter`,value:`[`+d+`]`});for(var f=0;f<l.length;f+=1)if(l[f].key===`DecodeParms`){for(var p=[],m=0;m<c.reverseChain.split(`/`).length-1;m+=1)p.push(`null`);p.push(l[f].value),l[f].value=`[`+p.join(` `)+`]`}}H(`<<`);for(var h=0;h<l.length;h++)H(`/`+l[h].key+` `+l[h].value);H(`>>`),c.data.length!==0&&(H(`stream`),H(s(c.data)),H(`endstream`))},nt=p.__private__.putPage=function(e){var t=e.number,n=e.data,r=e.objId,i=e.contentsObjId;Je(r,!0),H(`<</Type /Page`),H(`/Parent `+e.rootDictionaryObjId+` 0 R`),H(`/Resources `+e.resourceDictionaryObjId+` 0 R`),H(`/MediaBox [`+parseFloat(w(e.mediaBox.bottomLeftX))+` `+parseFloat(w(e.mediaBox.bottomLeftY))+` `+w(e.mediaBox.topRightX)+` `+w(e.mediaBox.topRightY)+`]`),e.cropBox!==null&&H(`/CropBox [`+w(e.cropBox.bottomLeftX)+` `+w(e.cropBox.bottomLeftY)+` `+w(e.cropBox.topRightX)+` `+w(e.cropBox.topRightY)+`]`),e.bleedBox!==null&&H(`/BleedBox [`+w(e.bleedBox.bottomLeftX)+` `+w(e.bleedBox.bottomLeftY)+` `+w(e.bleedBox.topRightX)+` `+w(e.bleedBox.topRightY)+`]`),e.trimBox!==null&&H(`/TrimBox [`+w(e.trimBox.bottomLeftX)+` `+w(e.trimBox.bottomLeftY)+` `+w(e.trimBox.topRightX)+` `+w(e.trimBox.topRightY)+`]`),e.artBox!==null&&H(`/ArtBox [`+w(e.artBox.bottomLeftX)+` `+w(e.artBox.bottomLeftY)+` `+w(e.artBox.topRightX)+` `+w(e.artBox.topRightY)+`]`),typeof e.userUnit==`number`&&e.userUnit!==1&&H(`/UserUnit `+e.userUnit),Ie.publish(`putPage`,{objId:r,pageContext:Fe[t],pageNumber:t,page:n}),H(`/Contents `+i+` 0 R`),H(`>>`),H(`endobj`);var a=n.join(` 117`);return b===y&&(a+=` 118Q`),Je(i,!0),tt({data:a,filters:et(),objectId:i}),H(`endobj`),r},rt=p.__private__.putPages=function(){var e,t,n=[];for(e=1;e<=Pe;e++)Fe[e].objId=qe(),Fe[e].contentsObjId=qe();for(e=1;e<=Pe;e++)n.push(nt({number:e,data:ae[e],objId:Fe[e].objId,contentsObjId:Fe[e].contentsObjId,mediaBox:Fe[e].mediaBox,cropBox:Fe[e].cropBox,bleedBox:Fe[e].bleedBox,trimBox:Fe[e].trimBox,artBox:Fe[e].artBox,userUnit:Fe[e].userUnit,rootDictionaryObjId:Xe,resourceDictionaryObjId:Ze}));Je(Xe,!0),H(`<</Type /Pages`);var r=`/Kids [`;for(t=0;t<Pe;t++)r+=n[t]+` 0 R `;H(r+`]`),H(`/Count `+Pe),H(`>>`),H(`endobj`),Ie.publish(`postPutPages`)},it=function(e){Ie.publish(`putFont`,{font:e,out:H,newObject:Ke,putStream:tt}),!0!==e.isAlreadyPutted&&(e.objectNumber=Ke(),H(`<<`),H(`/Type /Font`),H(`/BaseFont /`+NZ(e.postScriptName)),H(`/Subtype /Type1`),typeof e.encoding==`string`&&H(`/Encoding /`+e.encoding),H(`/FirstChar 32`),H(`/LastChar 255`),H(`>>`),H(`endobj`))},at=function(e){e.objectNumber=Ke();var t=[];t.push({key:`Type`,value:`/XObject`}),t.push({key:`Subtype`,value:`/Form`}),t.push({key:`BBox`,value:`[`+[w(e.x),w(e.y),w(e.x+e.width),w(e.y+e.height)].join(` `)+`]`}),t.push({key:`Matrix`,value:`[`+e.matrix.toString()+`]`}),tt({data:e.pages[1].join(` 119`),additionalKeyValues:t,objectId:e.objectNumber}),H(`endobj`)},ot=function(e,t){t||=21;var n=Ke(),r=function(e,t){var n,r=[],i=1/(t-1);for(n=0;n<1;n+=i)r.push(n);if(r.push(1),e[0].offset!=0){var a={offset:0,color:e[0].color};e.unshift(a)}if(e[e.length-1].offset!=1){var o={offset:1,color:e[e.length-1].color};e.push(o)}for(var s=``,c=0,l=0;l<r.length;l++){for(n=r[l];n>e[c+1].offset;)c++;var u=e[c].offset,d=(n-u)/(e[c+1].offset-u),f=e[c].color,p=e[c+1].color;s+=B(Math.round((1-d)*f[0]+d*p[0]).toString(16))+B(Math.round((1-d)*f[1]+d*p[1]).toString(16))+B(Math.round((1-d)*f[2]+d*p[2]).toString(16))}return s.trim()}(e.colors,t),i=[];i.push({key:`FunctionType`,value:`0`}),i.push({key:`Domain`,value:`[0.0 1.0]`}),i.push({key:`Size`,value:`[`+t+`]`}),i.push({key:`BitsPerSample`,value:`8`}),i.push({key:`Range`,value:`[0.0 1.0 0.0 1.0 0.0 1.0]`}),i.push({key:`Decode`,value:`[0.0 1.0 0.0 1.0 0.0 1.0]`}),tt({data:r,additionalKeyValues:i,alreadyAppliedFilters:[`/ASCIIHexDecode`],objectId:n}),H(`endobj`),e.objectNumber=Ke(),H(`<< /ShadingType `+e.type),H(`/ColorSpace /DeviceRGB`);var a=`/Coords [`+w(parseFloat(e.coords[0]))+` `+w(parseFloat(e.coords[1]))+` `;e.type===2?a+=w(parseFloat(e.coords[2]))+` `+w(parseFloat(e.coords[3])):a+=w(parseFloat(e.coords[2]))+` `+w(parseFloat(e.coords[3]))+` `+w(parseFloat(e.coords[4]))+` `+w(parseFloat(e.coords[5])),H(a+=`]`),e.matrix&&H(`/Matrix [`+e.matrix.toString()+`]`),H(`/Function `+n+` 0 R`),H(`/Extend [true true]`),H(`>>`),H(`endobj`)},st=function(e,t){var n=qe(),r=Ke();t.push({resourcesOid:n,objectOid:r}),e.objectNumber=r;var i=[];i.push({key:`Type`,value:`/Pattern`}),i.push({key:`PatternType`,value:`1`}),i.push({key:`PaintType`,value:`1`}),i.push({key:`TilingType`,value:`1`}),i.push({key:`BBox`,value:`[`+e.boundingBox.map(w).join(` `)+`]`}),i.push({key:`XStep`,value:w(e.xStep)}),i.push({key:`YStep`,value:w(e.yStep)}),i.push({key:`Resources`,value:n+` 0 R`}),e.matrix&&i.push({key:`Matrix`,value:`[`+e.matrix.toString()+`]`}),tt({data:e.stream,additionalKeyValues:i,objectId:e.objectNumber}),H(`endobj`)},ct=function(e){for(var t in e.objectNumber=Ke(),H(`<<`),e)switch(t){case`opacity`:H(`/ca `+D(e[t]));break;case`stroke-opacity`:H(`/CA `+D(e[t]))}H(`>>`),H(`endobj`)},lt=function(e){Je(e.resourcesOid,!0),H(`<<`),H(`/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]`),function(){for(var e in H(`/Font <<`),Ee)Ee.hasOwnProperty(e)&&(!1===d||!0===d&&f.hasOwnProperty(e))&&H(`/`+e+` `+Ee[e].objectNumber+` 0 R`);H(`>>`)}(),function(){if(Object.keys(ke).length>
1190){for(var e in H(`/Shading <<`),ke)ke.hasOwnProperty(e)&&ke[e]instanceof LZ&&ke[e].objectNumber>=0&&H(`/`+e+` `+ke[e].objectNumber+` 0 R`);Ie.publish(`putShadingPatternDict`),H(`>>`)}}(),function(e){if(Object.keys(ke).length>0){for(var t in H(`/Pattern <<`),ke)ke.hasOwnProperty(t)&&ke[t]instanceof p.TilingPattern&&ke[t].objectNumber>=0&&ke[t].objectNumber<e&&H(`/`+t+` `+ke[t].objectNumber+` 0 R`);Ie.publish(`putTilingPatternDict`),H(`>>`)}}(e.objectOid),function(){if(Object.keys(je).length>0){for(var e in H(`/ExtGState <<`),je)je.hasOwnProperty(e)&&je[e].objectNumber>=0&&H(`/`+e+` `+je[e].objectNumber+` 0 R`);Ie.publish(`putGStateDict`),H(`>>`)}}(),function(){for(var e in H(`/XObject <<`),Re)Re.hasOwnProperty(e)&&Re[e].objectNumber>=0&&H(`/`+e+` `+Re[e].objectNumber+` 0 R`);Ie.publish(`putXobjectDict`),H(`>>`)}(),H(`>>`),H(`endobj`)},ut=function(e){De[e.fontName]=De[e.fontName]||{},De[e.fontName][e.fontStyle]=e.id},dt=function(e,t,n,r,i){var a={id:`F`+(Object.keys(Ee).length+1).toString(10),postScriptName:e,fontName:t,fontStyle:n,encoding:r,isStandardFont:i||!1,metadata:{}};return Ie.publish(`addFont`,{font:a,instance:this}),Ee[a.id]=a,ut(a),a.id},ft=p.__private__.pdfEscape=p.pdfEscape=function(e,t){return function(e,t){var n,r,i,a,o,s,c,l,u;if(i=(t||={}).sourceEncoding||`Unicode`,o=t.outputEncoding,(t.autoencode||o)&&Ee[xe].metadata&&Ee[xe].metadata[i]&&Ee[xe].metadata[i].encoding&&(a=Ee[xe].metadata[i].encoding,!o&&Ee[xe].encoding&&(o=Ee[xe].encoding),!o&&a.codePages&&(o=a.codePages[0]),typeof o==`string`&&(o=a[o]),o)){for(c=!1,s=[],n=0,r=e.length;n<r;n++)(l=o[e.charCodeAt(n)])?s.push(String.fromCharCode(l)):s.push(e[n]),s[n].charCodeAt(0)>>8&&(c=!0);e=s.join(``)}for(n=e.length;c===void 0&&n!==0;)e.charCodeAt(n-1)>>8&&(c=!0),n--;if(!c)return e;for(s=t.noBOM?[]:[254,255],n=0,r=e.length;n<r;n++){if((u=(l=e.charCodeAt(n))>>8)>>8)throw Error(`Character at position `+n+` of string '`+e+`' exceeds 16bits. Cannot be encoded into UCS-2 BE`);s.push(u),s.push(l-(u<<8))}return String.fromCharCode.apply(void 0,s)}(e,t).replace(/\\/g,`\\\\`).replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)},pt=p.__private__.beginPage=function(e){ae[++Pe]=[],Fe[Pe]={objId:0,contentsObjId:0,userUnit:Number(s),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(e[0]),topRightY:Number(e[1])}},gt(Pe),ce(ae[R])},mt=function(e,t){var r,a,o;switch(n=t||n,typeof e==`string`&&(r=_(e.toLowerCase()),Array.isArray(r)&&(a=r[0],o=r[1])),Array.isArray(e)&&(a=e[0]*Se,o=e[1]*Se),isNaN(a)&&(a=i[0],o=i[1]),(a>14400||o>14400)&&(cZ.warn(`A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400`),a=Math.min(14400,a),o=Math.min(14400,o)),i=[a,o],n.substr(0,1)){case`l`:o>a&&(i=[o,a]);break;case`p`:a>o&&(i=[o,a])}pt(i),Xt(Jt),H(rn),un!==0&&H(un+` J`),dn!==0&&H(dn+` j`),Ie.publish(`addPage`,{pageNumber:Pe})},ht=function(e){e>0&&e<=Pe&&(ae.splice(e,1),Fe.splice(e,1),Pe--,R>Pe&&(R=Pe),this.setPage(R))},gt=function(e){e>0&&e<=Pe&&(R=e)},_t=p.__private__.getNumberOfPages=p.getNumberOfPages=function(){return ae.length-1},vt=function(e,t,n){var r,i=void 0;return n||={},e=e===void 0?Ee[xe].fontName:e,t=t===void 0?Ee[xe].fontStyle:t,r=e.toLowerCase(),De[r]!==void 0&&De[r][t]!==void 0?i=De[r][t]:De[e]!==void 0&&De[e][t]!==void 0?i=De[e][t]:!1===n.disableWarning&&cZ.warn(`Unable to look up font label for font '`+e+`', '`+t+`'. Refer to getFontList() for available fonts.`),i||n.noFallback||((i=De.times[t])??(i=De.times.normal)),i},yt=p.__private__.putInfo=function(){var e=Ke(),t=function(e){return e};for(var n in u!==null&&(t=At.encryptor(e,0)),H(`<<`),H(`/Producer (`+ft(t(`jsPDF `+zZ.version))+`)`),be)be.hasOwnProperty(n)&&be[n]&&H(`/`+n.substr(0,1).toUpperCase()+n.substr(1)+` (`+ft(t(be[n]))+`)`);H(`/CreationDate (`+ft(t(j))+`)`),H(`>>`),H(`endobj`)},bt=p.__private__.putCatalog=function(e){var t=(e||={}).rootDictionaryObjId||Xe;switch(Ke(),H(`<<`),H(`/Type /Catalog`),H(`/Pages `+t+` 0 R`),pe||=`fullwidth`,pe){case`fullwidth`:H(`/OpenAction [3 0 R /FitH null]`);break;case`fullheight`:H(`/OpenAction [3 0 R /FitV null]`);break;case`fullpage`:H(`/OpenAction [3 0 R /Fit]`);break;case`original`:H(`/OpenAction [3 0 R /XYZ null null 1]`);break;default:var n=``+pe;
119n.substr(n.length-1)===`%`&&(pe=parseInt(pe)/100),typeof pe==`number`&&H(`/OpenAction [3 0 R /XYZ null null `+D(pe)+`]`)}switch(_e||=`continuous`,_e){case`continuous`:H(`/PageLayout /OneColumn`);break;case`single`:H(`/PageLayout /SinglePage`);break;case`two`:case`twoleft`:H(`/PageLayout /TwoColumnLeft`);break;case`tworight`:H(`/PageLayout /TwoColumnRight`)}he&&H(`/PageMode /`+he),Ie.publish(`putCatalog`),H(`>>`),H(`endobj`)},xt=p.__private__.putTrailer=function(){H(`trailer`),H(`<<`),H(`/Size `+(V+1)),H(`/Root `+V+` 0 R`),H(`/Info `+(V-1)+` 0 R`),u!==null&&H(`/Encrypt `+At.oid+` 0 R`),H(`/ID [ <`+M+`> <`+M+`> ]`),H(`>>`)},St=p.__private__.putHeader=function(){H(`%PDF-`+m),H(`%ºÃˆ `)},Ct=p.__private__.putXRef=function(){var e=`0000000000`;H(`xref`),H(`0 `+(V+1)),H(`0000000000 65535 f `);for(var t=1;t<=V;t++)typeof te[t]==`function`?H((e+te[t]()).slice(-10)+` 00000 n `):te[t]===void 0?H(`0000000000 00000 n `):H((e+te[t]).slice(-10)+` 00000 n `)},wt=p.__private__.buildDocument=function(){var e;V=0,re=0,ne=[],te=[],ie=[],Xe=qe(),Ze=qe(),ce(ne),Ie.publish(`buildDocument`),St(),rt(),function(){Ie.publish(`putAdditionalObjects`);for(var e=0;e<ie.length;e++){var t=ie[e];Je(t.objId,!0),H(t.content),H(`endobj`)}Ie.publish(`postPutAdditionalObjects`)}(),e=[],function(){for(var e in Ee)Ee.hasOwnProperty(e)&&(!1===d||!0===d&&f.hasOwnProperty(e))&&it(Ee[e])}(),function(){for(var e in je)je.hasOwnProperty(e)&&ct(je[e])}(),function(){for(var e in Re)Re.hasOwnProperty(e)&&at(Re[e])}(),function(e){for(var t in ke)ke.hasOwnProperty(t)&&(ke[t]instanceof LZ?ot(ke[t]):ke[t]instanceof RZ&&st(ke[t],e))}(e),Ie.publish(`putResources`),e.forEach(lt),lt({resourcesOid:Ze,objectOid:2**53-1}),Ie.publish(`postPutResources`),u!==null&&(At.oid=Ke(),H(`<<`),H(`/Filter /Standard`),H(`/V `+At.v),H(`/R `+At.r),H(`/U <`+At.toHexString(At.U)+`>`),H(`/O <`+At.toHexString(At.O)+`>`),H(`/P `+At.P),H(`>>`),H(`endobj`)),yt(),bt();var t=re;return Ct(),xt(),H(`startxref`),H(``+t),H(`%%EOF`),ce(ae[R]),ne.join(` 120`)},Tt=p.__private__.getBlob=function(e){return new Blob([ue(e)],{type:`application/pdf`})},Et=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},Dt=function(e){var t,n=e.document,r=n.documentElement,i=n.head,a=n.body;return i||(i=n.createElement(`head`),r.appendChild(i)),a||(a=n.createElement(`body`),r.appendChild(a)),Et(i),Et(a),(t=n.createElement(`style`)).appendChild(n.createTextNode(`html, body { padding: 0; margin: 0; } iframe { width: 100%; height: 100%; border: 0;}`)),i.appendChild(t),{document:n,body:a}},Ot=p.output=p.__private__.output=(Ge=function(e,t){switch(typeof(t||={})==`string`?t={filename:t}:t.filename=t.filename||`generated.pdf`,e){case void 0:return wt();case`save`:p.save(t.filename);break;case`arraybuffer`:return ue(wt());case`blob`:return Tt(wt());case`bloburi`:case`bloburl`:if(oZ.URL!==void 0&&typeof oZ.URL.createObjectURL==`function`)return oZ.URL&&oZ.URL.createObjectURL(Tt(wt()))||void 0;cZ.warn(`bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.`);break;case`datauristring`:case`dataurlstring`:var n=``,r=wt();try{n=hZ(r)}catch{n=hZ(unescape(encodeURIComponent(r)))}return`data:application/pdf;filename=`+encodeURIComponent(t.filename)+`;base64,`+n;case`pdfobjectnewwindow`:if(Object.prototype.toString.call(oZ)===`[object Window]`){var i=`https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js`,a=!t.pdfObjectUrl;a||(i=t.pdfObjectUrl);var o=oZ.open();if(o!==null){var s=Dt(o),c=s.document.createElement(`script`),l=this;c.src=i,a&&(c.integrity=`sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==`,c.crossOrigin=`anonymous`),c.onload=function(){o.PDFObject.embed(l.output(`dataurlstring`),t)},s.body.appendChild(c)}return o}throw Error(`The option pdfobjectnewwindow just works in a browser-environment.`);case`pdfjsnewwindow`:if(Object.prototype.toString.call(oZ)===`[object Window]`){var u=t.pdfJsUrl||`examples/PDF.js/web/viewer.html`,d=oZ.open();if(d!==null){var f=Dt(d),m=f.document.createElement(`iframe`),h=u.indexOf(`?`)===-1?`?`:`&`;l=this,m.id=`pdfViewer`,m.width=`500px`,m.height=`400px`,m.src=u+h+`file=&downloadName=`+encodeURIComponent(t.filename),m.onload=function(){d.document.title=t.filename,m.contentWindow.PDFViewerApplication.open(l.output(`bloburl`))},f.body.appendChild(m)}return d}throw Error(`The option pdfjsnewwindow just works in a browser-environment.`);case`dataurlnewwindow`:if(Object.prototype.toString.call(oZ)!==`[object Window]`)throw Error(`The option dataurlnewwindow just works in a browser-environment.`);var g=oZ.open();if(g!==null){var _=Dt(g),v=_.document.createElement(`iframe`);v.src=this.output(`datauristring`,t),_.body.appendChild(v),g.document.title=t.filename}if(g||typeof safari>`u`)return g;break;case`datauri`:case`dataurl`:return oZ.document.location.href=this.output(`datauristring`,t);default:return null}},Ge.foo=function(){try{return Ge.apply(this,arguments)}catch(n){var e=n.stack||``;~e.indexOf(` at `)&&(e=e.split(` at `)[1]);var t=`Error in function `+e.split(` 121`)[0].split(`<`)[0]+`: `+n.message;if(!oZ.console)throw Error(t);oZ.console.error(t,n),oZ.alert&&alert(t)}},Ge.foo.bar=Ge,Ge.foo),kt=function(e){return!0===Array.isArray(Le)&&Le.indexOf(e)>-1};switch(r){case`pt`:Se=1;break;case`mm`:Se=72/25.4;break;case`cm`:Se=72/2.54;break;case`in`:Se=72;break;case`px`:Se=kt(`px_scaling`)==1?.75:96/72;break;case`pc`:case`em`:Se=12;break;case`ex`:Se=6;break;default:if(typeof r!=`number`)throw Error(`Invalid unit: `+r);Se=r}var At=null;ee(),P();var jt=p.__private__.getPageInfo=p.getPageInfo=function(e){if(isNaN(e)||e%1!=0)throw Error(`Invalid argument passed to
121jsPDF.getPageInfo`);return{objId:Fe[e].objId,pageNumber:e,pageContext:Fe[e]}},Mt=p.__private__.getPageInfoByObjId=function(e){if(isNaN(e)||e%1!=0)throw Error(`Invalid argument passed to jsPDF.getPageInfoByObjId`);for(var t in Fe)if(Fe[t].objId===e)break;return jt(t)},Nt=p.__private__.getCurrentPageInfo=p.getCurrentPageInfo=function(){return{objId:Fe[R].objId,pageNumber:R,pageContext:Fe[R]}};p.addPage=function(){return mt.apply(this,arguments),this},p.setPage=function(){return gt.apply(this,arguments),ce.call(this,ae[R]),this},p.insertPage=function(e){return this.addPage(),this.movePage(R,e),this},p.movePage=function(e,t){var n,r;if(e>t){n=ae[e],r=Fe[e];for(var i=e;i>t;i--)ae[i]=ae[i-1],Fe[i]=Fe[i-1];ae[t]=n,Fe[t]=r,this.setPage(t)}else if(e<t){n=ae[e],r=Fe[e];for(var a=e;a<t;a++)ae[a]=ae[a+1],Fe[a]=Fe[a+1];ae[t]=n,Fe[t]=r,this.setPage(t)}return this},p.deletePage=function(){return ht.apply(this,arguments),this},p.__private__.text=p.text=function(e,t,n,r,i){var a,o,s,c,l,u,d,p,m,h=(r||={}).scope||this;if(typeof e==`number`&&typeof t==`number`&&(typeof n==`string`||Array.isArray(n))){var g=n;n=t,t=e,e=g}if(arguments[3]instanceof Ve==0?(s=arguments[4],c=arguments[5],wW(d=arguments[3])===`object`&&d!==null||(typeof s==`string`&&(c=s,s=null),typeof d==`string`&&(c=d,d=null),typeof d==`number`&&(s=d,d=null),r={flags:d,angle:s,align:c})):(T(`The transform parameter of text() with a Matrix value`),m=i),isNaN(t)||isNaN(n)||e==null)throw Error(`Invalid arguments passed to jsPDF.text`);if(e.length===0)return h;var _,v=``,x=typeof r.lineHeightFactor==`number`?r.lineHeightFactor:qt,S=h.internal.scaleFactor;function C(e){return e=e.split(` `).join(Array(r.TabLen||9).join(` `)),ft(e,d)}function E(e){for(var t,n=e.concat(),r=[],i=n.length;i--;)typeof(t=n.shift())==`string`?r.push(t):Array.isArray(e)&&(t.length===1||t[1]===void 0&&t[2]===void 0)?r.push(t[0]):r.push([t[0],t[1],t[2]]);return r}function D(e,t){var n;if(typeof e==`string`)n=t(e)[0];else if(Array.isArray(e)){for(var r,i,a=e.concat(),o=[],s=a.length;s--;)typeof(r=a.shift())==`string`?o.push(t(r)[0]):Array.isArray(r)&&typeof r[0]==`string`&&(i=t(r[0],r[1],r[2]),o.push([i[0],i[1],i[2]]));n=o}return n}var O=!1,A=!0;if(typeof e==`string`)O=!0;else if(Array.isArray(e)){var j=e.concat();o=[];for(var M,N=j.length;N--;)(typeof(M=j.shift())!=`string`||Array.isArray(M)&&typeof M[0]!=`string`)&&(A=!1);O=A}if(!1===O)throw Error(`Type of text must be string or Array. "`+e+`" is not recognized.`);typeof e==`string`&&(e=e.match(/[\r?\n]/)?e.split(/\r\n|\r|\n/g):[e]);var P=fe/h.internal.scaleFactor,F=P*(x-1);switch(r.baseline){case`bottom`:n-=F;break;case`top`:n+=P-F;break;case`hanging`:n+=P-2*F;break;case`middle`:n+=P/2-F}if((u=r.maxWidth||0)>0&&(typeof e==`string`?e=h.splitTextToSize(e,u):Object.prototype.toString.call(e)===`[object Array]`&&(e=e.reduce(function(e,t){return e.concat(h.splitTextToSize(t,u))},[]))),a={text:e,x:t,y:n,options:r,mutex:{pdfEscape:ft,activeFontKey:xe,fonts:Ee,activeFontSize:fe}},Ie.publish(`preProcessText`,a),e=a.text,s=(r=a.options).angle,m instanceof Ve==0&&s&&typeof s==`number`){s*=Math.PI/180,r.rotationDirection===0&&(s=-s),b===y&&(s=-s);var I=Math.cos(s),ee=Math.sin(s);m=new Ve(I,ee,-ee,I,0,0)}else s&&s instanceof Ve&&(m=s);b!==y||m||(m=Ue),(l=r.charSpace||cn)!==void 0&&(v+=w(k(l))+` Tc 122`,this.setCharSpace(this.getCharSpace()||0)),(p=r.horizontalScale)!==void 0&&(v+=w(100*p)+` Tz 123`),r.lang;var L=-1,R=r.renderingMode===void 0?r.stroke:r.renderingMode,z=h.internal.getCurrentPageInfo().pageContext;switch(R){case 0:case!1:case`fill`:L=0;break;case 1:case!0:case`stroke`:L=1;break;case 2:case`fillThenStroke`:L=2;break;case 3:case`invisible`:L=3;break;case 4:case`fillAndAddForClipping`:L=4;break;case 5:case`strokeAndAddPathForClipping`:L=5;break;case 6:case`fillThenStrokeAndAddToPathForClipping`:L=6;break;case 7:case`addToPathForClipping`:L=7}var B=z.usedRenderingMode===void 0?-1:z.usedRenderingMode;L===-1?B!==-1&&(v+=`0 Tr 124`):v+=L+` Tr 125`,L!==-1&&(z.usedRenderingMode=L),c=r.align||`left`;var V,te=fe*x,ne=h.internal.pageSize.getWidth(),re=Ee[xe];l=r.charSpace||cn,u=r.maxWidth||0,d=Object.assign({autoencode:!0,noBOM:!0},r.flags);var ie=[],ae=function(e){return h.getStringUnitWidth(e,{font:re,charSpace:l,fontSize:fe,doKerning:!1})*fe/S};if(Object.prototype.toString.call(e)===`[object Array]`){var oe;o=E(e),c!==`left`&&(V=o.map(ae));var se,ce=0;if(c===`right`){t-=V[0],e=[],N=o.length;for(var le=0;le<N;le++)le===0?(se=$t(t),oe=en(n)):(se=k(ce-V[le]),oe=-te),e.push([o[le],se,oe]),ce=V[le]}else if(c===`center`){t-=V[0]/2,e=[],N=o.length;for(var ue=0;ue<N;ue++)ue===0?(se=$t(t),oe=en(n)):(se=k((ce-V[ue])/2),oe=-te),e.push([o[ue],se,oe]),ce=V[ue]}else if(c===`left`){e=[],N=o.length;for(var de=0;de<N;de++)e.push(o[de])}else if(c===`justify`&&re.encoding===`Identity-H`){e=[],N=o.length,u=u===0?ne:u;for(var pe=0,U=0;U<N;U++)if(oe=U===0?en(n):-te,se=U===0?$t(t):pe,U<N-1){var he=k((u-V[U])/(o[U].split(` `).length-1)),ge=o[U].split(` `);e.push([ge[0]+` `,se,oe]),pe=0;for(var _e=1;_e<ge.length;_e++){var ve=(ae(ge[_e-1]+` `+ge[_e])-ae(ge[_e]))*S+he;_e==ge.length-1?e.push([ge[_e],ve,0]):e.push([ge[_e]+` `,ve,0]),pe-=ve}}else e.push([o[U],se,oe]);e.push([``,pe,0])}else{if(c!==`justify`)throw Error(`Unrecognized alignment option, use "left", "center", "right" or "justify".`);for(e=[],N=o.length,u=u===0?ne:u,U=0;U<N;U++){oe=U===0?en(n):-te,se=U===0?$t(t):0;var ye=o[U].split(` `).length-1,be=ye>0?(u-V[U])/ye:0;U<N-1?ie.push(w(k(be))):ie.push(0),e.push([o[U],se,oe])}}}!0===(typeof r.R2L==`boolean`?r.R2L:me)&&(e=D(e,function(e,t,n){return[e.split(``).reverse().join(``),t,n]})),a={text:e,x:t,y:n,options:r,mutex:{pdfEscape:ft,activeFontKey:xe,fonts:Ee,activeFontSize:fe}},Ie.publish(`postProcessText`,a),e=a.text,_=a.mutex.isHex||!1;var Se=Ee[xe].encoding;Se!==`WinAnsiEncoding`&&Se!==`StandardEncoding`||(e=D(e,function(e,t,n){return[C(e),t,n]})),o=E(e),e=[];for(var Ce,we,Te,De=+!!Array.isArray(o[0]),Oe=``,ke=function(e,t,n){var i=``;return n instanceof Ve?(n=typeof r.angle==`number`?He(n,new Ve(1,0,0,1,e,t)):He(new Ve(1,0,0,1,e,t),n),b===y&&(n=He(new Ve(1,0,0,-1,0,0),n)),i=n.join(` `)+` Tm 126`):i=w(e)+` `+w(t)+` Td 127`,i},Ae=0;Ae<o.length;Ae++){switch(Oe=``,De){case 1:Te=(_?`<`:`(`)+o[Ae][0]+(_?`>`:`)`),Ce=parseFloat(o[Ae][1]),we=parseFloat(o[Ae][2]);break;case 0:Te=(_?`<`:`(`)+o[Ae]+(_?`>`:`)`),Ce=$t(t),we=en(n)}ie!==void 0&&ie[Ae]!==void 0&&(Oe=ie[Ae]+` Tw 128`),Ae===0?e.push(Oe+ke(Ce,we,m)+Te):De===0?e.push(Oe+Te):De===1&&e.push(Oe+ke(Ce,we,m)+Te)}e=De===0?e.join(` Tj 129T* `):e.join(` Tj 130`),e+=` Tj 131`;var je=`BT 132/`;return je+=xe+` `+fe+` Tf 133`,je+=w(fe*x)+` TL 134`,je+=on+` 135`,je+=v,je+=e,H(je+=`ET`),f[xe]=!0,h};var Pt=p.__private__.clip=p.clip=function(e){return H(e===`evenodd`?`W*`:`W`),this};p.clipEvenOdd=function(){return Pt(`evenodd`)},p.__private__.discardPath=p.discardPath=function(){return H(`n`),this};var Ft=p.__private__.isValidStyle=function(e){var t=!1;return[void 0,null,`S`,`D`,`F`,`DF`,`FD`,`f`,`f*`,`B`,`B*`,`n`].indexOf(e)!==-1&&(t=!0),t};p.__private__.setDefaultPathOperation=p.setDefaultPathOperation=function(e){return Ft(e)&&(l=e),this};var It=p.__private__.getStyle=p.getStyle=function(e){var t=l;switch(e){case`D`:case`S`:t=`S`;break;case`F`:t=`f`;break;case`FD`:case`DF`:t=`B`;break;case`f`:case`f*`:case`B`:case`B*`:t=e}return t},Lt=p.close=function(){return H(`h`),this};p.stroke=function(){return H(`S`),this},p.fill=function(e){return Rt(`f`,e),this},p.fillEvenOdd=function(e){return Rt(`f*`,e),this},p.fillStroke=function(e){return Rt(`B`,e),this},p.fillStrokeEvenOdd=function(e){return Rt(`B*`,e),this};var Rt=function(e,t){wW(t)===`object`?Vt(t,e):H(e)},zt=function(e){e===null||b===y&&e===void 0||(e=It(e),H(e))};function Bt(e,t,n,r,i){var a=new RZ(t||this.boundingBox,n||this.xStep,r||this.yStep,this.gState,i||this.matrix
135);return a.stream=this.stream,We(e+`$$`+this.cloneIndex+++`$$`,a),a}var Vt=function(e,t){var n=Ae[e.key],r=ke[n];if(r instanceof LZ)H(`q`),H(Ht(t)),r.gState&&p.setGState(r.gState),H(e.matrix.toString()+` cm`),H(`/`+n+` sh`),H(`Q`);else if(r instanceof RZ){var i=new Ve(1,0,0,-1,0,wn());e.matrix&&(i=i.multiply(e.matrix||Ue),n=Bt.call(r,e.key,e.boundingBox,e.xStep,e.yStep,i).id),H(`q`),H(`/Pattern cs`),H(`/`+n+` scn`),r.gState&&p.setGState(r.gState),H(t),H(`Q`)}},Ht=function(e){switch(e){case`f`:case`F`:case`n`:return`W n`;case`f*`:return`W* n`;case`B`:case`S`:return`W S`;case`B*`:return`W* S`}},Ut=p.moveTo=function(e,t){return H(w(k(e))+` `+w(A(t))+` m`),this},Wt=p.lineTo=function(e,t){return H(w(k(e))+` `+w(A(t))+` l`),this},Gt=p.curveTo=function(e,t,n,r,i,a){return H([w(k(e)),w(A(t)),w(k(n)),w(A(r)),w(k(i)),w(A(a)),`c`].join(` `)),this};p.__private__.line=p.line=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Ft(i))throw Error(`Invalid arguments passed to jsPDF.line`);return b===v?this.lines([[n-e,r-t]],e,t,[1,1],i||`S`):this.lines([[n-e,r-t]],e,t,[1,1]).stroke()},p.__private__.lines=p.lines=function(e,t,n,r,i,a){var o,s,c,l,u,d,f,p,m,h,g,_;if(typeof e==`number`&&(_=n,n=t,t=e,e=_),r||=[1,1],a||=!1,isNaN(t)||isNaN(n)||!Array.isArray(e)||!Array.isArray(r)||!Ft(i)||typeof a!=`boolean`)throw Error(`Invalid arguments passed to jsPDF.lines`);for(Ut(t,n),o=r[0],s=r[1],l=e.length,h=t,g=n,c=0;c<l;c++)(u=e[c]).length===2?(h=u[0]*o+h,g=u[1]*s+g,Wt(h,g)):(d=u[0]*o+h,f=u[1]*s+g,p=u[2]*o+h,m=u[3]*s+g,h=u[4]*o+h,g=u[5]*s+g,Gt(d,f,p,m,h,g));return a&&Lt(),zt(i),this},p.path=function(e){for(var t=0;t<e.length;t++){var n=e[t],r=n.c;switch(n.op){case`m`:Ut(r[0],r[1]);break;case`l`:Wt(r[0],r[1]);break;case`c`:Gt.apply(this,r);break;case`h`:Lt()}}return this},p.__private__.rect=p.rect=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Ft(i))throw Error(`Invalid arguments passed to jsPDF.rect`);return b===v&&(r=-r),H([w(k(e)),w(A(t)),w(k(n)),w(k(r)),`re`].join(` `)),zt(i),this},p.__private__.triangle=p.triangle=function(e,t,n,r,i,a,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a)||!Ft(o))throw Error(`Invalid arguments passed to jsPDF.triangle`);return this.lines([[n-e,r-t],[i-n,a-r],[e-i,t-a]],e,t,[1,1],o,!0),this},p.__private__.roundedRect=p.roundedRect=function(e,t,n,r,i,a,o){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a)||!Ft(o))throw Error(`Invalid arguments passed to jsPDF.roundedRect`);var s=4/3*(Math.SQRT2-1);return i=Math.min(i,.5*n),a=Math.min(a,.5*r),this.lines([[n-2*i,0],[i*s,0,i,a-a*s,i,a],[0,r-2*a],[0,a*s,-i*s,a,-i,a],[2*i-n,0],[-i*s,0,-i,-a*s,-i,-a],[0,2*a-r],[0,-a*s,i*s,-a,i,-a]],e+i,t,[1,1],o,!0),this},p.__private__.ellipse=p.ellipse=function(e,t,n,r,i){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||!Ft(i))throw Error(`Invalid arguments passed to jsPDF.ellipse`);var a=4/3*(Math.SQRT2-1)*n,o=4/3*(Math.SQRT2-1)*r;return Ut(e+n,t),Gt(e+n,t-o,e+a,t-r,e,t-r),Gt(e-a,t-r,e-n,t-o,e-n,t),Gt(e-n,t+o,e-a,t+r,e,t+r),Gt(e+a,t+r,e+n,t+o,e+n,t),zt(i),this},p.__private__.circle=p.circle=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||!Ft(r))throw Error(`Invalid arguments passed to jsPDF.circle`);return this.ellipse(e,t,n,n,r)},p.setFont=function(e,t,n){return n&&(t=C(t,n)),xe=vt(e,t,{disableWarning:!1}),this};var Kt=p.__private__.getFont=p.getFont=function(){return Ee[vt.apply(p,arguments)]};p.__private__.getFontList=p.getFontList=function(){var e,t,n={};for(e in De)if(De.hasOwnProperty(e))for(t in n[e]=[],De[e])De[e].hasOwnProperty(t)&&n[e].push(t);return n},p.addFont=function(e,t,n,r,i){var a=[`StandardEncoding`,`MacRomanEncoding`,`Identity-H`,`WinAnsiEncoding`];return arguments[3]&&a.indexOf(arguments[3])!==-1?i=arguments[3]:arguments[3]&&a.indexOf(arguments[3])==-1&&(n=C(n,r)),dt.call(this,e,t,n,i||=`Identity-H`)};var qt,Jt=e.lineWidth||.200025,Yt=p.__private__.getLineWidth=p.getLineWidth=function(){return Jt},Xt=p.__private__.setLineWidth=p.setLineWidth=function(e){return Jt=e,H(w(k(e))+` w`),this};p.__private__.setLineDash=zZ.API.setLineDash=zZ.API.setLineDashPattern=function(e,t){if(e||=[],t||=0,isNaN(t)||!Array.isArray(e))throw Error(`Invalid arguments passed to
135jsPDF.setLineDash`);return e=e.map(function(e){return w(k(e))}).join(` `),t=w(k(t)),H(`[`+e+`] `+t+` d`),this};var W=p.__private__.getLineHeight=p.getLineHeight=function(){return fe*qt};p.__private__.getLineHeight=p.getLineHeight=function(){return fe*qt};var Zt=p.__private__.setLineHeightFactor=p.setLineHeightFactor=function(e){return typeof(e||=1.15)==`number`&&(qt=e),this},Qt=p.__private__.getLineHeightFactor=p.getLineHeightFactor=function(){return qt};Zt(e.lineHeight);var $t=p.__private__.getHorizontalCoordinate=function(e){return k(e)},en=p.__private__.getVerticalCoordinate=function(e){return b===y?e:Fe[R].mediaBox.topRightY-Fe[R].mediaBox.bottomLeftY-k(e)},tn=p.__private__.getHorizontalCoordinateString=p.getHorizontalCoordinateString=function(e){return w($t(e))},nn=p.__private__.getVerticalCoordinateString=p.getVerticalCoordinateString=function(e){return w(en(e))},rn=e.strokeColor||`0 G`;p.__private__.getStrokeColor=p.getDrawColor=function(){return Qe(rn)},p.__private__.setStrokeColor=p.setDrawColor=function(e,t,n,r){return rn=$e({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:`draw`,precision:2}),H(rn),this};var an=e.fillColor||`0 g`;p.__private__.getFillColor=p.getFillColor=function(){return Qe(an)},p.__private__.setFillColor=p.setFillColor=function(e,t,n,r){return an=$e({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:`fill`,precision:2}),H(an),this};var on=e.textColor||`0 g`,sn=p.__private__.getTextColor=p.getTextColor=function(){return Qe(on)};p.__private__.setTextColor=p.setTextColor=function(e,t,n,r){return on=$e({ch1:e,ch2:t,ch3:n,ch4:r,pdfColorType:`text`,precision:3}),this};var cn=e.charSpace,ln=p.__private__.getCharSpace=p.getCharSpace=function(){return parseFloat(cn||0)};p.__private__.setCharSpace=p.setCharSpace=function(e){if(isNaN(e))throw Error(`Invalid argument passed to jsPDF.setCharSpace`);return cn=e,this};var un=0;p.CapJoinStyles={0:0,butt:0,but:0,miter:0,1:1,round:1,rounded:1,circle:1,2:2,projecting:2,project:2,square:2,bevel:2},p.__private__.setLineCap=p.setLineCap=function(e){var t=p.CapJoinStyles[e];if(t===void 0)throw Error(`Line cap style of '`+e+`' is not recognized. See or extend .CapJoinStyles property for valid styles`);return un=t,H(t+` J`),this};var dn=0;p.__private__.setLineJoin=p.setLineJoin=function(e){var t=p.CapJoinStyles[e];if(t===void 0)throw Error(`Line join style of '`+e+`' is not recognized. See or extend .CapJoinStyles property for valid styles`);return dn=t,H(t+` j`),this},p.__private__.setLineMiterLimit=p.__private__.setMiterLimit=p.setLineMiterLimit=p.setMiterLimit=function(e){if(e||=0,isNaN(e))throw Error(`Invalid argument passed to jsPDF.setLineMiterLimit`);return H(w(k(e))+` M`),this},p.GState=FZ,p.setGState=function(e){(e=typeof e==`string`?je[Me[e]]:fn(null,e)).equals(Ne)||(H(`/`+e.id+` gs`),Ne=e)};var fn=function(e,t){if(!e||!Me[e]){var n=!1;for(var r in je)if(je.hasOwnProperty(r)&&je[r].equals(t)){n=!0;break}if(n)t=je[r];else{var i=`GS`+(Object.keys(je).length+1).toString(10);je[i]=t,t.id=i}return e&&(Me[e]=t.id),Ie.publish(`addGState`,t),t}};p.addGState=function(e,t){return fn(e,t),this},p.saveGraphicsState=function(){return H(`q`),Oe.push({key:xe,size:fe,color:on}),this},p.restoreGraphicsState=function(){H(`Q`);var e=Oe.pop();return xe=e.key,fe=e.size,on=e.color,Ne=null,this},p.setCurrentTransformationMatrix=function(e){return H(e.toString()+` cm`),this},p.comment=function(e){return H(`#`+e),this};var pn=function(e,t){var n=e||0;Object.defineProperty(this,"x",{enumerable:!0,get:function(){return n},set:function(e){isNaN(e)||(n=parseFloat(e))}});var r=t||0;Object.defineProperty(this,"y",{enumerable:!0,get:function(){return r},set:function(e){isNaN(e)||(r=parseFloat(e))}});var i=`pt`;return Object.defineProperty(this,"type",{enumerable:!0,get:function(){return i},set:function(e){i=e.toString()}}),this},mn=function(e,t,n,r){pn.call(this,e,t),this.type=`rect`;var i=n||0;Object.defineProperty(this,"w",{enumerable:!0,get:function(){return i},set:function(e){isNaN(e)||(i=parseFloat(e))}});var a=r||0;return Object.defineProperty(this,"h",{enumerable:!0,get:function(){return a}
135,set:function(e){isNaN(e)||(a=parseFloat(e))}}),this},hn=function(){this.page=Pe,this.currentPage=R,this.pages=ae.slice(0),this.pagesContext=Fe.slice(0),this.x=Ce,this.y=we,this.matrix=Te,this.width=vn(R),this.height=bn(R),this.outputDestination=se,this.id=``,this.objectNumber=-1};hn.prototype.restore=function(){Pe=this.page,R=this.currentPage,Fe=this.pagesContext,ae=this.pages,Ce=this.x,we=this.y,Te=this.matrix,yn(R,this.width),xn(R,this.height),se=this.outputDestination};var gn=function(e,t,n,r,i){Be.push(new hn),Pe=R=0,ae=[],Ce=e,we=t,Te=i,pt([n,r])};for(var _n in p.beginFormObject=function(e,t,n,r,i){return gn(e,t,n,r,i),this},p.endFormObject=function(e){return function(e){if(ze[e])Be.pop().restore();else{var t=new hn,n=`Xo`+(Object.keys(Re).length+1).toString(10);t.id=n,ze[e]=n,Re[n]=t,Ie.publish(`addFormObject`,t),Be.pop().restore()}}(e),this},p.doFormObject=function(e,t){var n=Re[ze[e]];return H(`q`),H(t.toString()+` cm`),H(`/`+n.id+` Do`),H(`Q`),this},p.getFormObject=function(e){var t=Re[ze[e]];return{x:t.x,y:t.y,width:t.width,height:t.height,matrix:t.matrix}},p.save=function(e,t){return e||=`generated.pdf`,(t||={}).returnPromise=t.returnPromise||!1,!1===t.returnPromise?(fZ(Tt(wt()),e),typeof fZ.unload==`function`&&oZ.setTimeout&&setTimeout(fZ.unload,911),this):new Promise(function(t,n){try{var r=fZ(Tt(wt()),e);typeof fZ.unload==`function`&&oZ.setTimeout&&setTimeout(fZ.unload,911),t(r)}catch(e){n(e.message)}})},zZ.API)zZ.API.hasOwnProperty(_n)&&(_n===`events`&&zZ.API.events.length?function(e,t){var n,r,i;for(i=t.length-1;i!==-1;i--)n=t[i][0],r=t[i][1],e.subscribe.apply(e,[n].concat(typeof r==`function`?[r]:r))}(Ie,zZ.API.events):p[_n]=zZ.API[_n]);function vn(e){return Fe[e].mediaBox.topRightX-Fe[e].mediaBox.bottomLeftX}function yn(e,t){Fe[e].mediaBox.topRightX=t+Fe[e].mediaBox.bottomLeftX}function bn(e){return Fe[e].mediaBox.topRightY-Fe[e].mediaBox.bottomLeftY}function xn(e,t){Fe[e].mediaBox.topRightY=t+Fe[e].mediaBox.bottomLeftY}var Sn=p.getPageWidth=function(e){return vn(e||=R)/Se},Cn=p.setPageWidth=function(e,t){yn(e,t*Se)},wn=p.getPageHeight=function(e){return bn(e||=R)/Se},Tn=p.setPageHeight=function(e,t){xn(e,t*Se)};return p.internal={pdfEscape:ft,getStyle:It,getFont:Kt,getFontSize:U,getCharSpace:ln,getTextColor:sn,getLineHeight:W,getLineHeightFactor:Qt,getLineWidth:Yt,write:le,getHorizontalCoordinate:$t,getVerticalCoordinate:en,getCoordinateString:tn,getVerticalCoordinateString:nn,collections:{},newObject:Ke,newAdditionalObject:Ye,newObjectDeferred:qe,newObjectDeferredBegin:Je,getFilters:et,putStream:tt,events:Ie,scaleFactor:Se,pageSize:{getWidth:function(){return Sn(R)},setWidth:function(e){Cn(R,e)},getHeight:function(){return wn(R)},setHeight:function(e){Tn(R,e)}},encryptionOptions:u,encryption:At,getEncryptor:function(e){return u===null?function(e){return e}:At.encryptor(e,0)},output:Ot,getNumberOfPages:_t,get pages(){return ae},out:H,f2:D,f3:O,getPageInfo:jt,getPageInfoByObjId:Mt,getCurrentPageInfo:Nt,getPDFVersion:h,Point:pn,Rectangle:mn,Matrix:Ve,hasHotfix:kt},Object.defineProperty(p.internal.pageSize,"width",{get:function(){return Sn(R)},set:function(e){Cn(R,e)},enumerable:!0,configurable:!0}),Object.defineProperty(p.internal.pageSize,"height",{get:function(){return wn(R)},set:function(e){Tn(R,e)},enumerable:!0,configurable:!0}),function(e){for(var t=0,n=de.length;t<n;t++){var r=dt.call(this,e[t][0],e[t][1],e[t][2],de[t][3],!0);!1===d&&(f[r]=!0);var i=e[t][0].split(`-`);ut({id:r,fontName:i[0],fontStyle:i[1]||``})}Ie.publish(`addFonts`,{fonts:Ee,dictionary:De})}.call(p,de),xe=`F1`,mt(i,n),Ie.publish(`initialized`),p}MZ.prototype.lsbFirstWord=function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)},MZ.prototype.toHexString=function(e){return e.split(``).map(function(e){return(`0`+(255&e.charCodeAt(0)).toString(16)).slice(-2)}).join(``)},MZ.prototype.hexToBytes=function(e){for(var t=[],n=0;n<e.length;n+=2)t.push(String.fromCharCode(parseInt(e.substr(n,2),16)));return t.join(``)},MZ.prototype.processOwnerPassword=function(e,t){return AZ(DZ(t).substr(0,5),e)},MZ.prototype.encryptor=function(e,t){var n=DZ(this.encryptionKey+String.fromCharCode(255&e,e>>8&255,e>>16&255,255&t,t>>8&255)).substr(0,10);return function(e){return AZ(n,e)}},FZ.prototype.equals=function(e){var t,n=`id,objectNumber,equals`;if(!e||wW(e)!==wW(this))return!1;var r=0;for(t in this)if(!(n.indexOf(t)>
135=0)){if(this.hasOwnProperty(t)&&!e.hasOwnProperty(t)||this[t]!==e[t])return!1;r++}for(t in e)e.hasOwnProperty(t)&&n.indexOf(t)<0&&r--;return r===0},zZ.API={events:[]},zZ.version=`4.2.1`;var BZ=zZ.API,VZ=1,HZ=function(e){return e.replace(/\\/g,`\\\\`).replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)},UZ=function(e){return e.replace(/\\\\/g,`\\`).replace(/\\\(/g,`(`).replace(/\\\)/g,`)`)},WZ=function(e){return e.toString().replace(/#/g,`#23`).replace(/[\s\n\r()<>[\]{}\/%]/g,function(e){var t=e.charCodeAt(0).toString(16).toUpperCase();return`#`+(t.length===1?`0`+t:t)})},GZ=function(e){return e.toFixed(2)},KZ=function(e){return e.toFixed(5)};BZ.__acroform__={};var qZ=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e},JZ=function(e){return e*VZ},YZ=function(e){var t=new fQ,n=EQ.internal.getHeight(e)||0,r=EQ.internal.getWidth(e)||0;return t.BBox=[0,0,Number(GZ(r)),Number(GZ(n))],t},XZ=BZ.__acroform__.setBit=function(e,t){if(e||=0,t||=0,isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.setBit`);return e|1<<t},ZZ=BZ.__acroform__.clearBit=function(e,t){if(e||=0,t||=0,isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.clearBit`);return e&~(1<<t)},QZ=BZ.__acroform__.getBit=function(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.getBit`);return e&1<<t?1:0},$Z=BZ.__acroform__.getBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.getBitForPdf`);return QZ(e,t-1)},eQ=BZ.__acroform__.setBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.setBitForPdf`);return XZ(e,t-1)},tQ=BZ.__acroform__.clearBitForPdf=function(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid arguments passed to jsPDF.API.__acroform__.clearBitForPdf`);return ZZ(e,t-1)},nQ=BZ.__acroform__.calculateCoordinates=function(e,t){var n=t.internal.getHorizontalCoordinate,r=t.internal.getVerticalCoordinate,i=e[0],a=e[1],o=e[2],s=e[3],c={};return c.lowerLeft_X=n(i)||0,c.lowerLeft_Y=r(a+s)||0,c.upperRight_X=n(i+o)||0,c.upperRight_Y=r(a)||0,[Number(GZ(c.lowerLeft_X)),Number(GZ(c.lowerLeft_Y)),Number(GZ(c.upperRight_X)),Number(GZ(c.upperRight_Y))]},rQ=function(e){if(e.appearanceStreamContent)return e.appearanceStreamContent;if(e.V||e.DV){var t=[],n=iQ(e,e._V||e.DV),r=e.scope.internal.getFont(e.fontName,e.fontStyle).id;t.push(`/Tx BMC`),t.push(`q`),t.push(`BT`),t.push(e.scope.__private__.encodeColorString(e.color)),t.push(`/`+r+` `+GZ(n.fontSize)+` Tf`),t.push(`1 0 0 1 0 0 Tm`),t.push(n.text),t.push(`ET`),t.push(`Q`),t.push(`EMC`);var i=YZ(e);return i.scope=e.scope,i.stream=t.join(` 136`),i}},iQ=function(e,t){var n=e.fontSize===0?e.maxFontSize:e.fontSize,r={text:``,fontSize:``},i=(t=(t=t.substr(0,1)==`(`?t.substr(1):t).substr(t.length-1)==`)`?t.substr(0,t.length-1):t).split(` `);i=e.multiline?i.map(function(e){return e.split(` 137`)}):i.map(function(e){return[e]});var a=n,o=EQ.internal.getHeight(e)||0;o=o<0?-o:o;var s=EQ.internal.getWidth(e)||0;s=s<0?-s:s;var c=function(t,n,r){return t+1<i.length&&aQ(n+` `+i[t+1][0],e,r).width<=s-4};a++;t:for(;a>0;){t=``,a--;var l,u,d=aQ(`3`,e,a).height,f=e.multiline?o-a:(o-d)/2,p=f+=2,m=0,h=0,g=0;if(a<=0){t=`(...) Tj 138`,t+=`% Width of Text: `+aQ(t,e,a=12).width+`, FieldWidth:`+s+` 139`;break}for(var _=``,v=0,y=0;y<i.length;y++)if(i.hasOwnProperty(y)){var b=!1;if(i[y].length!==1&&g!==i[y].length-1){if((d+2)*(v+2)+2>o)continue t;_+=i[y][g],b=!0,h=y,y--}else{_=(_+=i[y][g]+` `).substr(_.length-1)==` `?_.substr(0,_.length-1):_;var x=parseInt(y),S=c(x,_,a),C=y>=i.length-1;if(S&&!C){_+=` `,g=0;continue}if(S||C){if(C)h=x;else if(e.multiline&&(d+2)*(v+2)+2>o)continue t}else{if(!e.multiline||(d+2)*(v+2)+2>o)continue t;h=x}}for(var w=``,T=m;T<=h;T++){var E=i[T];if(e.multiline){if(T===h){w+=E[g]+` `,g=(g+1)%E.length;continue}if(T===m){w+=E[E.length-1]+` `;continue}}w+=E[0]+` `}switch(w=w.substr(w.length-1)==` `?w.substr(0,w.length-1):w,u=aQ(w,e,a).width,e.textAlign){case`right`:l=s-u-2;break;case`center`:l=(s-u)/2;break;default:l=2}t+=GZ(l)+` `+GZ(p)+` Td 140`,t+=`(`+HZ(w)+`) Tj 141`,t+=-GZ(l)+` 0 Td
142`,p=-(a+2),u=0,m=b?h:h+1,v++,_=``}break}return r.text=t,r.fontSize=a,r},aQ=function(e,t,n){var r=t.scope.internal.getFont(t.fontName,t.fontStyle),i=t.scope.getStringUnitWidth(e,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n);return{height:t.scope.getStringUnitWidth(`3`,{font:r,fontSize:parseFloat(n),charSpace:0})*parseFloat(n)*1.5,width:i}},oQ={fields:[],xForms:[],acroFormDictionaryRoot:null,printedOut:!1,internal:null,isInitialized:!1},sQ=function(e,t){var n={type:`reference`,object:e};t.internal.getPageInfo(e.page).pageContext.annotations.find(function(e){return e.type===n.type&&e.object===n.object})===void 0&&t.internal.getPageInfo(e.page).pageContext.annotations.push(n)},cQ=function(e,t){if(t.scope=e,e.internal!==void 0&&(e.internal.acroformPlugin===void 0||!1===e.internal.acroformPlugin.isInitialized)){if(mQ.FieldNum=0,e.internal.acroformPlugin=JSON.parse(JSON.stringify(oQ)),e.internal.acroformPlugin.acroFormDictionaryRoot)throw Error(`Exception while creating AcroformDictionary`);VZ=e.internal.scaleFactor,e.internal.acroformPlugin.acroFormDictionaryRoot=new pQ,e.internal.acroformPlugin.acroFormDictionaryRoot.scope=e,e.internal.acroformPlugin.acroFormDictionaryRoot._eventID=e.internal.events.subscribe(`postPutResources`,function(){(function(e){e.internal.events.unsubscribe(e.internal.acroformPlugin.acroFormDictionaryRoot._eventID),delete e.internal.acroformPlugin.acroFormDictionaryRoot._eventID,e.internal.acroformPlugin.printedOut=!0})(e)}),e.internal.events.subscribe(`buildDocument`,function(){(function(e){e.internal.acroformPlugin.acroFormDictionaryRoot.objId=void 0;var t=e.internal.acroformPlugin.acroFormDictionaryRoot.Fields;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];r.objId=void 0,r.hasAnnotation&&sQ(r,e)}})(e)}),e.internal.events.subscribe(`putCatalog`,function(){(function(e){if(e.internal.acroformPlugin.acroFormDictionaryRoot===void 0)throw Error(`putCatalogCallback: Root missing.`);e.internal.write(`/AcroForm `+e.internal.acroformPlugin.acroFormDictionaryRoot.objId+` 0 R`)})(e)}),e.internal.events.subscribe(`postPutPages`,function(t){(function(e,t){var n=!e;for(var r in e||(t.internal.newObjectDeferredBegin(t.internal.acroformPlugin.acroFormDictionaryRoot.objId,!0),t.internal.acroformPlugin.acroFormDictionaryRoot.putStream()),e||=t.internal.acroformPlugin.acroFormDictionaryRoot.Kids)if(e.hasOwnProperty(r)){var i=e[r],a=[],o=i.Rect;if(i.Rect&&=nQ(i.Rect,t),t.internal.newObjectDeferredBegin(i.objId,!0),i.DA=EQ.createDefaultAppearanceStream(i),wW(i)===`object`&&typeof i.getKeyValueListForStream==`function`&&(a=i.getKeyValueListForStream()),i.Rect=o,i.hasAppearanceStream&&!i.appearanceStreamContent){var s=rQ(i);a.push({key:`AP`,value:`<</N `+s+`>>`}),t.internal.acroformPlugin.xForms.push(s)}if(i.appearanceStreamContent){var c=``;for(var l in i.appearanceStreamContent)if(i.appearanceStreamContent.hasOwnProperty(l)){var u=i.appearanceStreamContent[l];if(c+=`/`+l+` `,c+=`<<`,Object.keys(u).length>=1||Array.isArray(u)){for(var r in u)if(u.hasOwnProperty(r)){var d=u[r];typeof d==`function`&&(d=d.call(t,i)),c+=`/`+r+` `+d+` `,t.internal.acroformPlugin.xForms.indexOf(d)>=0||t.internal.acroformPlugin.xForms.push(d)}}else typeof(d=u)==`function`&&(d=d.call(t,i)),c+=`/`+r+` `+d,t.internal.acroformPlugin.xForms.indexOf(d)>=0||t.internal.acroformPlugin.xForms.push(d);c+=`>>`}a.push({key:`AP`,value:`<< 143`+c+`>>`})}t.internal.putStream({additionalKeyValues:a,objectId:i.objId}),t.internal.out(`endobj`)}n&&function(e,t){for(var n in e)if(e.hasOwnProperty(n)){var r=n,i=e[n];t.internal.newObjectDeferredBegin(i.objId,!0),wW(i)===`object`&&typeof i.putStream==`function`&&i.putStream(),delete e[r]}}(t.internal.acroformPlugin.xForms,t)})(t,e)}),e.internal.acroformPlugin.isInitialized=!0}},lQ=BZ.__acroform__.arrayToPdfArray=function(e,t,n){var r=function(e){return e};if(Array.isArray(e)){for(var i=`[`,a=0;a<e.length;a++)switch(a!==0&&(i+=` `),wW(e[a])){case`boolean`:case`number`:case`object`:i+=e[a].toString();break;case`string`:e[a].substr(0,1)===`/`?i+=`/`+WZ(e[a].substr(1)):(t!==void 0&&n&&(r=n.internal.getEncryptor(t)),i+=`(`+HZ(r(e[a].toString()))+`)`)}return i+`]`}
143throw Error(`Invalid argument passed to jsPDF.__acroform__.arrayToPdfArray`)},uQ=function(e,t,n){var r=function(e){return e};return t!==void 0&&n&&(r=n.internal.getEncryptor(t)),(e||=``).toString(),`(`+HZ(r(e))+`)`},dQ=function(){this._objId=void 0,this._scope=void 0,Object.defineProperty(this,"objId",{get:function(){if(this._objId===void 0){if(this.scope===void 0)return;this._objId=this.scope.internal.newObjectDeferred()}return this._objId},set:function(e){this._objId=e}}),Object.defineProperty(this,"scope",{value:this._scope,writable:!0})};dQ.prototype.toString=function(){return this.objId+` 0 R`},dQ.prototype.putStream=function(){var e=this.getKeyValueListForStream();this.scope.internal.putStream({data:this.stream,additionalKeyValues:e,objectId:this.objId}),this.scope.internal.out(`endobj`)},dQ.prototype.getKeyValueListForStream=function(){var e=[],t=Object.getOwnPropertyNames(this).filter(function(e){return e!=`content`&&e!=`appearanceStreamContent`&&e!=`scope`&&e!=`objId`&&e.substring(0,1)!=`_`});for(var n in t)if(!1===Object.getOwnPropertyDescriptor(this,t[n]).configurable){var r=t[n],i=this[r];i&&(Array.isArray(i)?e.push({key:r,value:lQ(i,this.objId,this.scope)}):i instanceof dQ?(i.scope=this.scope,e.push({key:r,value:i.objId+` 0 R`})):typeof i!=`function`&&e.push({key:r,value:i}))}return e};var fQ=function(){dQ.call(this),Object.defineProperty(this,"Type",{value:`/XObject`,configurable:!1,writable:!0}),Object.defineProperty(this,"Subtype",{value:`/Form`,configurable:!1,writable:!0}),Object.defineProperty(this,"FormType",{value:1,configurable:!1,writable:!0});var e,t=[];Object.defineProperty(this,"BBox",{configurable:!1,get:function(){return t},set:function(e){t=e}}),Object.defineProperty(this,"Resources",{value:`2 0 R`,configurable:!1,writable:!0}),Object.defineProperty(this,"stream",{enumerable:!1,configurable:!0,set:function(t){e=t.trim()},get:function(){return e||null}})};qZ(fQ,dQ);var pQ=function(){dQ.call(this);var e,t=[];Object.defineProperty(this,"Kids",{enumerable:!1,configurable:!0,get:function(){return t.length>0?t:void 0}}),Object.defineProperty(this,"Fields",{enumerable:!1,configurable:!1,get:function(){return t}}),Object.defineProperty(this,"DA",{enumerable:!1,configurable:!1,get:function(){if(e){var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),`(`+HZ(t(e))+`)`}},set:function(t){e=t}})};qZ(pQ,dQ);var mQ=function e(){dQ.call(this);var t=4;Object.defineProperty(this,"F",{enumerable:!1,configurable:!1,get:function(){return t},set:function(e){if(isNaN(e))throw Error(`Invalid value "`+e+`" for attribute F supplied.`);t=e}}),Object.defineProperty(this,"showWhenPrinted",{enumerable:!0,configurable:!0,get:function(){return!!$Z(t,3)},set:function(e){this.F=!!e==1?eQ(t,3):tQ(t,3)}});var n=0;Object.defineProperty(this,"Ff",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){if(isNaN(e))throw Error(`Invalid value "`+e+`" for attribute Ff supplied.`);n=e}});var r=[];Object.defineProperty(this,"Rect",{enumerable:!1,configurable:!1,get:function(){if(r.length!==0)return r},set:function(e){r=e===void 0?[]:e}}),Object.defineProperty(this,"x",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[0])?0:r[0]},set:function(e){r[0]=e}}),Object.defineProperty(this,"y",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[1])?0:r[1]},set:function(e){r[1]=e}}),Object.defineProperty(this,"width",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[2])?0:r[2]},set:function(e){r[2]=e}}),Object.defineProperty(this,"height",{enumerable:!0,configurable:!0,get:function(){return!r||isNaN(r[3])?0:r[3]},set:function(e){r[3]=e}});var i=``;Object.defineProperty(this,"FT",{enumerable:!0,configurable:!1,get:function(){return i},set:function(e){switch(e){case`/Btn`:case`/Tx`:case`/Ch`:case`/Sig`:i=e;break;default:throw Error(`Invalid value "`+e+`" for attribute FT supplied.`)}}});var a=null;Object.defineProperty(this,"T",{enumerable:!0,configurable:!1,get:function(){if(!a||a.length<1){if(this instanceof SQ)return;a=`FieldObject`+e.FieldNum++}var t=function(e){return e};return this.scope&&(t=this.scope.internal.getEncryptor(this.objId)),`(`+HZ(t(a))+`)`},set:function(e){a=e.toString()}}),Object.defineProperty(this,"fieldName",{configurable:!0,enumerable:!0,get:function(){return a}
143,set:function(e){a=e}});var o=`helvetica`;Object.defineProperty(this,"fontName",{enumerable:!0,configurable:!0,get:function(){return o},set:function(e){o=e}});var s=`normal`;Object.defineProperty(this,"fontStyle",{enumerable:!0,configurable:!0,get:function(){return s},set:function(e){s=e}});var c=0;Object.defineProperty(this,"fontSize",{enumerable:!0,configurable:!0,get:function(){return c},set:function(e){c=e}});var l=void 0;Object.defineProperty(this,"maxFontSize",{enumerable:!0,configurable:!0,get:function(){return l===void 0?50/VZ:l},set:function(e){l=e}});var u=`black`;Object.defineProperty(this,"color",{enumerable:!0,configurable:!0,get:function(){return u},set:function(e){u=e}});var d=`/F1 0 Tf 0 g`;Object.defineProperty(this,"DA",{enumerable:!0,configurable:!1,get:function(){if(!(!d||this instanceof SQ||this instanceof wQ))return uQ(d,this.objId,this.scope)},set:function(e){e=e.toString(),d=e}});var f=null;Object.defineProperty(this,"DV",{enumerable:!1,configurable:!1,get:function(){if(f)return this instanceof yQ==0?uQ(f,this.objId,this.scope):f},set:function(e){e=e.toString(),f=this instanceof yQ==0?e.substr(0,1)===`(`?UZ(e.substr(1,e.length-2)):UZ(e):e}}),Object.defineProperty(this,"defaultValue",{enumerable:!0,configurable:!0,get:function(){return this instanceof yQ==1?UZ(f.substr(1,f.length-1)):f},set:function(e){e=e.toString(),f=this instanceof yQ==1?`/`+WZ(e):e}});var p=null;Object.defineProperty(this,"_V",{enumerable:!1,configurable:!1,get:function(){if(p)return p},set:function(e){this.V=e}}),Object.defineProperty(this,"V",{enumerable:!1,configurable:!1,get:function(){if(p)return this instanceof yQ==0?uQ(p,this.objId,this.scope):p},set:function(e){e=e.toString(),p=this instanceof yQ==0?e.substr(0,1)===`(`?UZ(e.substr(1,e.length-2)):UZ(e):e}}),Object.defineProperty(this,"value",{enumerable:!0,configurable:!0,get:function(){return this instanceof yQ==1?UZ(p.substr(1,p.length-1)):p},set:function(e){e=e.toString(),p=this instanceof yQ==1?`/`+WZ(e):e}}),Object.defineProperty(this,"hasAnnotation",{enumerable:!0,configurable:!0,get:function(){return this.Rect}}),Object.defineProperty(this,"Type",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?`/Annot`:null}}),Object.defineProperty(this,"Subtype",{enumerable:!0,configurable:!1,get:function(){return this.hasAnnotation?`/Widget`:null}});var m,h=!1;Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return h},set:function(e){e=!!e,h=e}}),Object.defineProperty(this,"page",{enumerable:!0,configurable:!0,get:function(){if(m)return m},set:function(e){m=e}}),Object.defineProperty(this,"readOnly",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,1)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,1):tQ(this.Ff,1)}}),Object.defineProperty(this,"required",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,2)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,2):tQ(this.Ff,2)}}),Object.defineProperty(this,"noExport",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,3)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,3):tQ(this.Ff,3)}});var g=null;Object.defineProperty(this,"Q",{enumerable:!0,configurable:!1,get:function(){if(g!==null)return g},set:function(e){if([0,1,2].indexOf(e)===-1)throw Error(`Invalid value "`+e+`" for attribute Q supplied.`);g=e}}),Object.defineProperty(this,"textAlign",{get:function(){var e;switch(g){case 0:default:e=`left`;break;case 1:e=`center`;break;case 2:e=`right`}return e},configurable:!0,enumerable:!0,set:function(e){switch(e){case`right`:case 2:g=2;break;case`center`:case 1:g=1;break;default:g=0}}})};qZ(mQ,dQ);var hQ=function(){mQ.call(this),this.FT=`/Ch`,this.V=`()`,this.fontName=`zapfdingbats`;var e=0;Object.defineProperty(this,"TI",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"topIndex",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){e=t}});var t=[];Object.defineProperty(this,"Opt",{enumerable:!0,configurable:!1,get:function(){return lQ(t,this.objId,this.scope)},set:function(e){var n,r=[];typeof(n=e)==`string`&&(r=function(e,t,n){n||=1;for(var r,i=[];r=t.exec(e);)i.push(r[n]);return i}(n,/\((.*?)\)/g)),t=r}}),this.getOptions=function(){return t},this.setOptions=function(e){t=e,this.sort&&t.sort()},this.addOption=function(e){e=(e||=``).toString(),t.push(e),this.sort&&t.sort()},this.removeOption=function(e,n){for(n||=!1,e=(e||=``).toString();t.indexOf(e)!==-1&&(t.splice(t.indexOf(e),1),!1!==n););},Object.defineProperty(this,"combo",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,18)}
143,set:function(e){this.Ff=!!e==1?eQ(this.Ff,18):tQ(this.Ff,18)}}),Object.defineProperty(this,"edit",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,19)},set:function(e){!0===this.combo&&(this.Ff=!!e==1?eQ(this.Ff,19):tQ(this.Ff,19))}}),Object.defineProperty(this,"sort",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,20)},set:function(e){!!e==1?(this.Ff=eQ(this.Ff,20),t.sort()):this.Ff=tQ(this.Ff,20)}}),Object.defineProperty(this,"multiSelect",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,22)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,22):tQ(this.Ff,22)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,23)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,23):tQ(this.Ff,23)}}),Object.defineProperty(this,"commitOnSelChange",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,27)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,27):tQ(this.Ff,27)}}),this.hasAppearanceStream=!1};qZ(hQ,mQ);var gQ=function(){hQ.call(this),this.fontName=`helvetica`,this.combo=!1};qZ(gQ,hQ);var _Q=function(){gQ.call(this),this.combo=!0};qZ(_Q,gQ);var vQ=function(){_Q.call(this),this.edit=!0};qZ(vQ,_Q);var yQ=function(){mQ.call(this),this.FT=`/Btn`,Object.defineProperty(this,"noToggleToOff",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,15)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,15):tQ(this.Ff,15)}}),Object.defineProperty(this,"radio",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,16)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,16):tQ(this.Ff,16)}}),Object.defineProperty(this,"pushButton",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,17)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,17):tQ(this.Ff,17)}}),Object.defineProperty(this,"radioIsUnison",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,26)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,26):tQ(this.Ff,26)}});var e,t={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};if(this.scope&&(e=this.scope.internal.getEncryptor(this.objId)),Object.keys(t).length!==0){var n,r=[];for(n in r.push(`<<`),t)r.push(`/`+n+` (`+HZ(e(t[n]))+`)`);return r.push(`>>`),r.join(` 144`)}},set:function(e){wW(e)===`object`&&(t=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return t.CA||``},set:function(e){typeof e==`string`&&(t.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){var n=t==null?``:t.toString();n.substr(0,1)===`/`&&(n=n.substr(1)),e=`/`+WZ(n)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return e.substr(1,e.length-1)},set:function(t){e=`/`+WZ(t)}})};qZ(yQ,mQ);var bQ=function(){yQ.call(this),this.pushButton=!0};qZ(bQ,yQ);var xQ=function(){yQ.call(this),this.radio=!0,this.pushButton=!1;var e=[];Object.defineProperty(this,"Kids",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t===void 0?[]:t}})};qZ(xQ,yQ);var SQ=function(){var e,t;mQ.call(this),Object.defineProperty(this,"Parent",{enumerable:!1,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"optionName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(e){t=e}});var n,r={};Object.defineProperty(this,"MK",{enumerable:!1,configurable:!1,get:function(){var e=function(e){return e};this.scope&&(e=this.scope.internal.getEncryptor(this.objId));var t,n=[];for(t in n.push(`<<`),r)n.push(`/`+t+` (`+HZ(e(r[t]))+`)`);return n.push(`>>`),n.join(` 145`)},set:function(e){wW(e)===`object`&&(r=e)}}),Object.defineProperty(this,"caption",{enumerable:!0,configurable:!0,get:function(){return r.CA||``},set:function(e){typeof e==`string`&&(r.CA=e)}}),Object.defineProperty(this,"AS",{enumerable:!1,configurable:!1,get:function(){return n},set:function(e){var t=e==null?``:e.toString();t.substr(0,1)===`/`&&(t=t.substr(1)),n=`/`+WZ(t)}}),Object.defineProperty(this,"appearanceState",{enumerable:!0,configurable:!0,get:function(){return n.substr(1,n.length-1)},set:function(e){var t=e==null?``:e.toString();t.substr(0,1)===`/`&&(t=t.substr(1)),n=`/`+WZ(t)}}),this.caption=`l`,this.appearanceState=`Off`,this._AppearanceType=EQ.RadioButton.Circle,this.appearanceStreamContent=this._AppearanceType.createAppearanceStream(this.optionName)};qZ(SQ,mQ),xQ.prototype.setAppearance=function(e){if(!(`createAppearanceStream`in e)||!(`getCA`in e))throw Error(`Couldn't assign Appearance to RadioButton. Appearance was Invalid!`);for(var t in this.Kids)if(this.Kids.hasOwnProperty(t)){var n=this.Kids[t];n.appearanceStreamContent=e.createAppearanceStream(n.optionName),n.caption=e.getCA()}},xQ.prototype.createOption=function(e){var t=new SQ;return t.Parent=this,t.optionName=e,this.Kids.push(t),DQ.call(this.scope,t),t};var CQ=function(){yQ.call(this),this.fontName=`zapfdingbats`,this.caption=`3`,this.appearanceState=`On`,this.value=`On`,this.textAlign=`center`,this.appearanceStreamContent=EQ.CheckBox.createAppearanceStream()};qZ(CQ,yQ);var wQ=function(){mQ.call(this),this.FT=`/Tx`,Object.defineProperty(this,"multiline",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,13)}
vendor: 4,845 bytes, lines 145-150
145,set:function(e){this.Ff=!!e==1?eQ(this.Ff,13):tQ(this.Ff,13)}}),Object.defineProperty(this,"fileSelect",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,21)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,21):tQ(this.Ff,21)}}),Object.defineProperty(this,"doNotSpellCheck",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,23)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,23):tQ(this.Ff,23)}}),Object.defineProperty(this,"doNotScroll",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,24)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,24):tQ(this.Ff,24)}}),Object.defineProperty(this,"comb",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,25)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,25):tQ(this.Ff,25)}}),Object.defineProperty(this,"richText",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,26)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,26):tQ(this.Ff,26)}});var e=null;Object.defineProperty(this,"MaxLen",{enumerable:!0,configurable:!1,get:function(){return e},set:function(t){e=t}}),Object.defineProperty(this,"maxLength",{enumerable:!0,configurable:!0,get:function(){return e},set:function(t){Number.isInteger(t)&&(e=t)}}),Object.defineProperty(this,"hasAppearanceStream",{enumerable:!0,configurable:!0,get:function(){return this.V||this.DV}})};qZ(wQ,mQ);var TQ=function(){wQ.call(this),Object.defineProperty(this,"password",{enumerable:!0,configurable:!0,get:function(){return!!$Z(this.Ff,14)},set:function(e){this.Ff=!!e==1?eQ(this.Ff,14):tQ(this.Ff,14)}}),this.password=!0};qZ(TQ,wQ);var EQ={CheckBox:{createAppearanceStream:function(){return{N:{On:EQ.CheckBox.YesNormal},D:{On:EQ.CheckBox.YesPushDown,Off:EQ.CheckBox.OffPushDown}}},YesPushDown:function(e){var t=YZ(e);t.scope=e.scope;var n=[],r=e.scope.internal.getFont(e.fontName,e.fontStyle).id,i=e.scope.__private__.encodeColorString(e.color),a=iQ(e,e.caption);return n.push(`0.749023 g`),n.push(`0 0 `+GZ(EQ.internal.getWidth(e))+` `+GZ(EQ.internal.getHeight(e))+` re`),n.push(`f`),n.push(`BMC`),n.push(`q`),n.push(`0 0 1 rg`),n.push(`/`+r+` `+GZ(a.fontSize)+` Tf `+i),n.push(`BT`),n.push(a.text),n.push(`ET`),n.push(`Q`),n.push(`EMC`),t.stream=n.join(` 146`),t},YesNormal:function(e){var t=YZ(e);t.scope=e.scope;var n=e.scope.internal.getFont(e.fontName,e.fontStyle).id,r=e.scope.__private__.encodeColorString(e.color),i=[],a=EQ.internal.getHeight(e),o=EQ.internal.getWidth(e),s=iQ(e,e.caption);return i.push(`1 g`),i.push(`0 0 `+GZ(o)+` `+GZ(a)+` re`),i.push(`f`),i.push(`q`),i.push(`0 0 1 rg`),i.push(`0 0 `+GZ(o-1)+` `+GZ(a-1)+` re`),i.push(`W`),i.push(`n`),i.push(`0 g`),i.push(`BT`),i.push(`/`+n+` `+GZ(s.fontSize)+` Tf `+r),i.push(s.text),i.push(`ET`),i.push(`Q`),t.stream=i.join(` 147`),t},OffPushDown:function(e){var t=YZ(e);t.scope=e.scope;var n=[];return n.push(`0.749023 g`),n.push(`0 0 `+GZ(EQ.internal.getWidth(e))+` `+GZ(EQ.internal.getHeight(e))+` re`),n.push(`f`),t.stream=n.join(` 148`),t}},RadioButton:{Circle:{createAppearanceStream:function(e){var t={D:{Off:EQ.RadioButton.Circle.OffPushDown},N:{}};return t.N[e]=EQ.RadioButton.Circle.YesNormal,t.D[e]=EQ.RadioButton.Circle.YesPushDown,t},getCA:function(){return`l`},YesNormal:function(e){var t=YZ(e);t.scope=e.scope;var n=[],r=EQ.internal.getWidth(e)<=EQ.internal.getHeight(e)?EQ.internal.getWidth(e)/4:EQ.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=EQ.internal.Bezier_C,a=Number((r*i).toFixed(5));return n.push(`q`),n.push(`1 0 0 1 `+KZ(EQ.internal.getWidth(e)/2)+` `+KZ(EQ.internal.getHeight(e)/2)+` cm`),n.push(r+` 0 m`),n.push(r+` `+a+` `+a+` `+r+` 0 `+r+` c`),n.push(`-`+a+` `+r+` -`+r+` `+a+` -`+r+` 0 c`),n.push(`-`+r+` -`+a+` -`+a+` -`+r+` 0 -`+r+` c`),n.push(a+` -`+r+` `+r+` -`+a+` `+r+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(` 149`),t},YesPushDown:function(e){var t=YZ(e);t.scope=e.scope;var n=[],r=EQ.internal.getWidth(e)<=EQ.internal.getHeight(e)?EQ.internal.getWidth(e)/4:EQ.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*EQ.internal.Bezier_C).toFixed(5)),o=Number((r*EQ.internal.Bezier_C).toFixed(5));return n.push(`0.749023 g`),n.push(`q`),n.push(`1 0 0 1 `+KZ(EQ.internal.getWidth(e)/2)+` `+KZ(EQ.internal.getHeight(e)/2)+` cm`),n.push(i+` 0 m`),n.push(i+` `+a+` `+a+` `+i+` 0 `+i+` c`),n.push(`-`+a+` `+i+` -`+i+` `+a+` -`+i+` 0 c`),n.push(`-`+i+` -`+a+` -`+a+` -`+i+` 0 -`+i+` c`),n.push(a+` -`+i+` `+i+` -`+a+` `+i+` 0 c`),n.push(`f`),n.push(`Q`),n.push(`0 g`),n.push(`q`),n.push(`1 0 0 1 `+KZ(EQ.internal.getWidth(e)/2)+` `+KZ(EQ.internal.getHeight(e)/2)+` cm`),n.push(r+` 0 m`),n.push(r+` `+o+` `+o+` `+r+` 0 `+r+` c`),n.push(`-`+o+` `+r+` -`+r+` `+o+` -`+r+` 0 c`),n.push(`-`+r+` -`+o+` -`+o+` -`+r+` 0 -`+r+` c`),n.push(o+` -`+r+` `+r+` -`+o+` `+r+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(` 150`),t},OffPushDown:function(e){var t=YZ(e);t.scope=e.scope;
150var n=[],r=EQ.internal.getWidth(e)<=EQ.internal.getHeight(e)?EQ.internal.getWidth(e)/4:EQ.internal.getHeight(e)/4;r=Number((.9*r).toFixed(5));var i=Number((2*r).toFixed(5)),a=Number((i*EQ.internal.Bezier_C).toFixed(5));return n.push(`0.749023 g`),n.push(`q`),n.push(`1 0 0 1 `+KZ(EQ.internal.getWidth(e)/2)+` `+KZ(EQ.internal.getHeight(e)/2)+` cm`),n.push(i+` 0 m`),n.push(i+` `+a+` `+a+` `+i+` 0 `+i+` c`),n.push(`-`+a+` `+i+` -`+i+` `+a+` -`+i+` 0 c`),n.push(`-`+i+` -`+a+` -`+a+` -`+i+` 0 -`+i+` c`),n.push(a+` -`+i+` `+i+` -`+a+` `+i+` 0 c`),n.push(`f`),n.push(`Q`),t.stream=n.join(` 151`),t}},Cross:{createAppearanceStream:function(e){var t={D:{Off:EQ.RadioButton.Cross.OffPushDown},N:{}};return t.N[e]=EQ.RadioButton.Cross.YesNormal,t.D[e]=EQ.RadioButton.Cross.YesPushDown,t},getCA:function(){return`8`},YesNormal:function(e){var t=YZ(e);t.scope=e.scope;var n=[],r=EQ.internal.calculateCross(e);return n.push(`q`),n.push(`1 1 `+GZ(EQ.internal.getWidth(e)-2)+` `+GZ(EQ.internal.getHeight(e)-2)+` re`),n.push(`W`),n.push(`n`),n.push(GZ(r.x1.x)+` `+GZ(r.x1.y)+` m`),n.push(GZ(r.x2.x)+` `+GZ(r.x2.y)+` l`),n.push(GZ(r.x4.x)+` `+GZ(r.x4.y)+` m`),n.push(GZ(r.x3.x)+` `+GZ(r.x3.y)+` l`),n.push(`s`),n.push(`Q`),t.stream=n.join(` 152`),t},YesPushDown:function(e){var t=YZ(e);t.scope=e.scope;var n=EQ.internal.calculateCross(e),r=[];return r.push(`0.749023 g`),r.push(`0 0 `+GZ(EQ.internal.getWidth(e))+` `+GZ(EQ.internal.getHeight(e))+` re`),r.push(`f`),r.push(`q`),r.push(`1 1 `+GZ(EQ.internal.getWidth(e)-2)+` `+GZ(EQ.internal.getHeight(e)-2)+` re`),r.push(`W`),r.push(`n`),r.push(GZ(n.x1.x)+` `+GZ(n.x1.y)+` m`),r.push(GZ(n.x2.x)+` `+GZ(n.x2.y)+` l`),r.push(GZ(n.x4.x)+` `+GZ(n.x4.y)+` m`),r.push(GZ(n.x3.x)+` `+GZ(n.x3.y)+` l`),r.push(`s`),r.push(`Q`),t.stream=r.join(` 153`),t},OffPushDown:function(e){var t=YZ(e);t.scope=e.scope;var n=[];return n.push(`0.749023 g`),n.push(`0 0 `+GZ(EQ.internal.getWidth(e))+` `+GZ(EQ.internal.getHeight(e))+` re`),n.push(`f`),t.stream=n.join(` 154`),t}}},createDefaultAppearanceStream:function(e){var t=e.scope.internal.getFont(e.fontName,e.fontStyle).id,n=e.scope.__private__.encodeColorString(e.color);return`/`+t+` `+e.fontSize+` Tf `+n}};EQ.internal={Bezier_C:.551915024494,calculateCross:function(e){var t=EQ.internal.getWidth(e),n=EQ.internal.getHeight(e),r=Math.min(t,n);return{x1:{x:(t-r)/2,y:(n-r)/2+r},x2:{x:(t-r)/2+r,y:(n-r)/2},x3:{x:(t-r)/2,y:(n-r)/2},x4:{x:(t-r)/2+r,y:(n-r)/2+r}}}},EQ.internal.getWidth=function(e){var t=0;return wW(e)===`object`&&(t=JZ(e.Rect[2])),t},EQ.internal.getHeight=function(e){var t=0;return wW(e)===`object`&&(t=JZ(e.Rect[3])),t};var DQ=BZ.addField=function(e){if(cQ(this,e),!(e instanceof mQ))throw Error(`Invalid argument passed to jsPDF.addField.`);var t;return(t=e).scope.internal.acroformPlugin.printedOut&&(t.scope.internal.acroformPlugin.printedOut=!1,t.scope.internal.acroformPlugin.acroFormDictionaryRoot=null),t.scope.internal.acroformPlugin.acroFormDictionaryRoot.Fields.push(t),e.page=e.scope.internal.getCurrentPageInfo().pageNumber,this};BZ.AcroFormChoiceField=hQ,BZ.AcroFormListBox=gQ,BZ.AcroFormComboBox=_Q,BZ.AcroFormEditBox=vQ,BZ.AcroFormButton=yQ,BZ.AcroFormPushButton=bQ,BZ.AcroFormRadioButton=xQ,BZ.AcroFormCheckBox=CQ,BZ.AcroFormTextField=wQ,BZ.AcroFormPasswordField=TQ,BZ.AcroFormAppearance=EQ,BZ.AcroForm={ChoiceField:hQ,ListBox:gQ,ComboBox:_Q,EditBox:vQ,Button:yQ,PushButton:bQ,RadioButton:xQ,CheckBox:CQ,TextField:wQ,PasswordField:TQ,Appearance:EQ},zZ.AcroForm={ChoiceField:hQ,ListBox:gQ,ComboBox:_Q,EditBox:vQ,Button:yQ,PushButton:bQ,RadioButton:xQ,CheckBox:CQ,TextField:wQ,PasswordField:TQ,Appearance:EQ},zZ.AcroForm;function OQ(e){return e.reduce(function(e,t,n){return e[t]=n,e},{})}(function(e){e.__addimage__={};var t=`UNKNOWN`,n={PNG:[[137,80,78,71]],TIFF:[[77,77,0,42],[73,73,42,0]],JPEG:[[255,216,255,224,void 0,void 0,74,70,73,70,0],[255,216,255,225,void 0,void 0,69,120,105,102,0,0],[255,216,255,219],[255,216,255,238]],JPEG2000:[[0,0,0,12,106,80,32,32]],GIF87a:[[71,73,70,56,55,97]],GIF89a:[[71,73,70,56,57,97]],WEBP:[[82,73,70,70,void 0,void 0,void 0,void 0,87,69,66,80]],BMP:[[66,77],[66,65],[67,73],[67,80],[73,67],[80,84]]},r=e.__addimage__.getImageFileTypeByImageData=function(e,r){var i,a,o,s,c,l=t;if((r||=t)===`RGBA`||e.data!==void 0&&e.data instanceof Uint8ClampedArray&&`height`in e&&`width`in e)return`RGBA`;if(x(e))for(c in n)for(o=n[c],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e[a]){s=!1;break}if(!0===s){l=c;break}}else for(c in n)for(o=n[c],i=0;i<o.length;i+=1){for(s=!0,a=0;a<o[i].length;a+=1)if(o[i][a]!==void 0&&o[i][a]!==e.charCodeAt(a)){s=!1;break}if(!0===s){l=c;break}}return l===t&&r!==t&&(l=r),l},i=function e(t){for(var n=this.internal.write,r=this.internal.putStream,i=(0,this.internal.getFilters)();i.indexOf(`FlateEncode`)!==-1;)i.splice(i.indexOf(`FlateEncode`),1);t.objectId=this.internal.newObject();var a=[];if(a.push({key:`Type`,value:`/XObject`}),a.push({key:`Subtype`,value:`/Image`}),a.push({key:`Width`,value:t.width}),a.push({key:`Height`,value:t.height}
154),t.colorSpace===g.INDEXED?a.push({key:`ColorSpace`,value:`[/Indexed /DeviceRGB `+(t.palette.length/3-1)+` `+(`sMask`in t&&t.sMask!==void 0?t.objectId+2:t.objectId+1)+` 0 R]`}):(a.push({key:`ColorSpace`,value:`/`+t.colorSpace}),t.colorSpace===g.DEVICE_CMYK&&a.push({key:`Decode`,value:`[1 0 1 0 1 0 1 0]`})),a.push({key:`BitsPerComponent`,value:t.bitsPerComponent}),`decodeParameters`in t&&t.decodeParameters!==void 0&&a.push({key:`DecodeParms`,value:`<<`+t.decodeParameters+`>>`}),`transparency`in t&&Array.isArray(t.transparency)&&t.transparency.length>0){for(var o=``,s=0,c=t.transparency.length;s<c;s++)o+=t.transparency[s]+` `+t.transparency[s]+` `;a.push({key:`Mask`,value:`[`+o+`]`})}t.sMask!==void 0&&a.push({key:`SMask`,value:t.objectId+1+` 0 R`});var l=t.filter===void 0?void 0:[`/`+t.filter];if(r({data:t.data,additionalKeyValues:a,alreadyAppliedFilters:l,objectId:t.objectId}),n(`endobj`),`sMask`in t&&t.sMask!==void 0){var u=t.sMaskBitsPerComponent??t.bitsPerComponent,d={width:t.width,height:t.height,colorSpace:`DeviceGray`,bitsPerComponent:u,data:t.sMask};`filter`in t&&(d.decodeParameters=`/Predictor ${t.predictor} /Colors 1 /BitsPerComponent ${u} /Columns ${t.width}`,d.filter=t.filter),e.call(this,d)}if(t.colorSpace===g.INDEXED){var f=this.internal.newObject();r({data:C(new Uint8Array(t.palette)),objectId:f}),n(`endobj`)}},a=function(){var e=this.internal.collections.addImage_images;for(var t in e)i.call(this,e[t])},o=function(){var e,t=this.internal.collections.addImage_images,n=this.internal.write;for(var r in t)n(`/I`+(e=t[r]).index,e.objectId,`0`,`R`)},s=function(){this.internal.collections.addImage_images||(this.internal.collections.addImage_images={},this.internal.events.subscribe(`putResources`,a),this.internal.events.subscribe(`putXobjectDict`,o))},c=function(){var e=this.internal.collections.addImage_images;return s.call(this),e},l=function(){return Object.keys(this.internal.collections.addImage_images).length},u=function(t){return typeof e[`process`+t.toUpperCase()]==`function`},d=function(e){return wW(e)===`object`&&e.nodeType===1},f=function(t,n){if(t.nodeName===`IMG`&&t.hasAttribute(`src`)){var r=``+t.getAttribute(`src`);if(r.indexOf(`data:image/`)===0)return mZ(unescape(r).split(`base64,`).pop());var i=e.loadFile(r,!0);if(i!==void 0)return i}if(t.nodeName===`CANVAS`){if(t.width===0||t.height===0)throw Error(`Given canvas must have data. Canvas width: `+t.width+`, height: `+t.height);var a;switch(n){case`PNG`:a=`image/png`;break;case`WEBP`:a=`image/webp`;break;default:a=`image/jpeg`}return mZ(t.toDataURL(a,1).split(`base64,`).pop())}},p=function(e){var t=this.internal.collections.addImage_images;if(t){for(var n in t)if(e===t[n].alias)return t[n]}},m=function(e,t,n){return e||t||(e=-96,t=-96),e<0&&(e=-1*n.width*72/e/this.internal.scaleFactor),t<0&&(t=-1*n.height*72/t/this.internal.scaleFactor),e===0&&(e=t*n.width/n.height),t===0&&(t=e*n.height/n.width),[e,t]},h=function(e,t,n,r,i,a){var o=m.call(this,n,r,i),s=this.internal.getCoordinateString,l=this.internal.getVerticalCoordinateString,u=c.call(this);if(n=o[0],r=o[1],u[i.index]=i,a){a*=Math.PI/180;var d=Math.cos(a),f=Math.sin(a),p=function(e){return e.toFixed(4)},h=[p(d),p(f),p(-1*f),p(d),0,0,`cm`]}this.internal.write(`q`),a?(this.internal.write([1,`0`,`0`,1,s(e),l(t+r),`cm`].join(` `)),this.internal.write(h.join(` `)),this.internal.write([s(n),`0`,`0`,s(r),`0`,`0`,`cm`].join(` `))):this.internal.write([s(n),`0`,`0`,s(r),s(e),l(t+r),`cm`].join(` `)),this.isAdvancedAPI()&&this.internal.write([1,0,0,-1,0,0,`cm`].join(` `)),this.internal.write(`/I`+i.index+` Do`),this.internal.write(`Q`)},g=e.color_spaces={DEVICE_RGB:`DeviceRGB`,DEVICE_GRAY:`DeviceGray`,DEVICE_CMYK:`DeviceCMYK`,CAL_GREY:`CalGray`,CAL_RGB:`CalRGB`,LAB:`Lab`,ICC_BASED:`ICCBased`,INDEXED:`Indexed`,PATTERN:`Pattern`,SEPARATION:`Separation`,DEVICE_N:`DeviceN`};e.decode={DCT_DECODE:`DCTDecode`,FLATE_DECODE:`FlateDecode`,LZW_DECODE:`LZWDecode`,JPX_DECODE:`JPXDecode`,JBIG2_DECODE:`JBIG2Decode`,ASCII85_DECODE:`ASCII85Decode`,ASCII_HEX_DECODE:`ASCIIHexDecode`,RUN_LENGTH_DECODE:`RunLengthDecode`,CCITT_FAX_DECODE:`CCITTFaxDecode`};var _=e.image_compression={NONE:`NONE`,FAST:`FAST`,MEDIUM:`MEDIUM`,SLOW:`SLOW`},v=e.__addimage__.sHashCode=function(e){var t,n,r=0;if(typeof e==`string`)for(n=e.length,t=0;t<n;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;else if(x(e))for(n=e.byteLength/2,t=0;t<n;t++)r=(r<<5)-r+e[t],r|=0;return r}
154,y=e.__addimage__.validateStringAsBase64=function(e){(e||=``).toString().trim();var t=!0;return e.length===0&&(t=!1),e.length%4!=0&&(t=!1),!1===/^[A-Za-z0-9+/]+$/.test(e.substr(0,e.length-2))&&(t=!1),!1===/^[A-Za-z0-9/][A-Za-z0-9+/]|[A-Za-z0-9+/]=|==$/.test(e.substr(-2))&&(t=!1),t},b=e.__addimage__.extractImageFromDataUrl=function(e){if(e==null||!(e=e.trim()).startsWith(`data:`))return null;var t=e.indexOf(`,`);return t<0?null:e.substring(0,t).trim().endsWith(`base64`)?e.substring(t+1):null};e.__addimage__.isArrayBuffer=function(e){return e instanceof ArrayBuffer};var x=e.__addimage__.isArrayBufferView=function(e){return e instanceof Int8Array||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array},S=e.__addimage__.binaryStringToUint8Array=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n},C=e.__addimage__.arrayBufferToBinaryString=function(e){for(var t=``,n=x(e)?e:new Uint8Array(e),r=0;r<n.length;r+=8192)t+=String.fromCharCode.apply(null,n.subarray(r,r+8192));return t};e.addImage=function(){var e,n,r,i,a,o,c,l,u;if(typeof arguments[1]==`number`?(n=t,r=arguments[1],i=arguments[2],a=arguments[3],o=arguments[4],c=arguments[5],l=arguments[6],u=arguments[7]):(n=arguments[1],r=arguments[2],i=arguments[3],a=arguments[4],o=arguments[5],c=arguments[6],l=arguments[7],u=arguments[8]),wW(e=arguments[0])===`object`&&!d(e)&&`imageData`in e){var f=e;e=f.imageData,n=f.format||n||t,r=f.x||r||0,i=f.y||i||0,a=f.w||f.width||a,o=f.h||f.height||o,c=f.alias||c,l=f.compression||l,u=f.rotation||f.angle||u}var p=this.internal.getFilters();if(l===void 0&&p.indexOf(`FlateEncode`)!==-1&&(l=`SLOW`),isNaN(r)||isNaN(i))throw Error(`Invalid coordinates passed to jsPDF.addImage`);s.call(this);var m=w.call(this,e,n,c,l);return h.call(this,r,i,a,o,m,u),this};var w=function(n,i,a,o){var s,c,m;if(typeof n==`string`&&r(n)===t){n=unescape(n);var h=T(n,!1);(h!==``||(h=e.loadFile(n,!0))!==void 0)&&(n=h)}if(d(n)&&(n=f(n,i)),i=r(n,i),!u(i))throw Error(`addImage does not support files of type '`+i+`', please ensure that a plugin for '`+i+`' support is added.`);if(((m=a)==null||m.length===0)&&(a=function(e){return typeof e==`string`||x(e)?v(e):x(e.data)?v(e.data):null}(n)),(s=p.call(this,a))||(n instanceof Uint8Array||i===`RGBA`||(c=n,n=S(n)),s=this[`process`+i.toUpperCase()](n,l.call(this),a,function(t){return t&&typeof t==`string`&&(t=t.toUpperCase()),t in e.image_compression?t:_.NONE}(o),c)),!s)throw Error(`An unknown error occurred whilst processing the image.`);return s},T=e.__addimage__.convertBase64ToBinaryString=function(e,t){t=typeof t!=`boolean`||t;var n,r=``;if(typeof e==`string`){n=b(e)??e;try{r=mZ(n)}catch(e){if(t)throw y(n)?Error(`atob-Error in jsPDF.convertBase64ToBinaryString `+e.message):Error(`Supplied Data is not a valid base64-String jsPDF.convertBase64ToBinaryString `)}}return r};e.getImageProperties=function(n){var i,a,o=``;if(d(n)&&(n=f(n)),typeof n==`string`&&r(n)===t&&((o=T(n,!1))===``&&(o=e.loadFile(n)||``),n=o),a=r(n),!u(a))throw Error(`addImage does not support files of type '`+a+`', please ensure that a plugin for '`+a+`' support is added.`);if(n instanceof Uint8Array||(n=S(n)),!(i=this[`process`+a.toUpperCase()](n)))throw Error(`An unknown error occurred whilst processing the image`);return i.fileType=a,i}})(zZ.API),function(e){var t=function(e){if(e!==void 0&&e!=``)return!0};zZ.API.events.push([`addPage`,function(e){this.internal.getPageInfo(e.pageNumber).pageContext.annotations=[]}]),e.events.push([`putPage`,function(e){for(var n,r,i,a=this.internal.getCoordinateString,o=this.internal.getVerticalCoordinateString,
vendor: 2,872 bytes, line 154
154s=this.internal.getPageInfoByObjId(e.objId),c=e.pageContext.annotations,l=!1,u=0;u<c.length&&!l;u++)switch((n=c[u]).type){case`link`:(t(n.options.url)||t(n.options.pageNumber))&&(l=!0);break;case`reference`:case`text`:case`freetext`:l=!0}if(l!=0){this.internal.write(`/Annots [`);for(var d=0;d<c.length;d++){n=c[d];var f=this.internal.pdfEscape,p=this.internal.getEncryptor(e.objId);switch(n.type){case`reference`:this.internal.write(` `+n.object.objId+` 0 R `);break;case`text`:var m=this.internal.newAdditionalObject(),h=this.internal.newAdditionalObject(),g=this.internal.getEncryptor(m.objId),_=n.title||`Note`;i=`<</Type /Annot /Subtype /Text `+(r=`/Rect [`+a(n.bounds.x)+` `+o(n.bounds.y+n.bounds.h)+` `+a(n.bounds.x+n.bounds.w)+` `+o(n.bounds.y)+`] `)+`/Contents (`+f(g(n.contents))+`)`,i+=` /Popup `+h.objId+` 0 R`,i+=` /P `+s.objId+` 0 R`,i+=` /T (`+f(g(_))+`) >>`,m.content=i;var v=m.objId+` 0 R`;i=`<</Type /Annot /Subtype /Popup `+(r=`/Rect [`+a(n.bounds.x+30)+` `+o(n.bounds.y+n.bounds.h)+` `+a(n.bounds.x+n.bounds.w+30)+` `+o(n.bounds.y)+`] `)+` /Parent `+v,n.open&&(i+=` /Open true`),i+=` >>`,h.content=i,this.internal.write(m.objId,`0 R`,h.objId,`0 R`);break;case`freetext`:r=`/Rect [`+a(n.bounds.x)+` `+o(n.bounds.y)+` `+a(n.bounds.x+n.bounds.w)+` `+o(n.bounds.y+n.bounds.h)+`] `;var y=`font: Helvetica,sans-serif 12.0pt; text-align:left; color:#`+(n.color||`#000000`);i=`<</Type /Annot /Subtype /FreeText `+r+`/Contents (`+f(p(n.contents))+`)`,i+=` /DS(`+f(p(y))+`)`,i+=` /Border [0 0 0]`,i+=` >>`,this.internal.write(i);break;case`link`:if(n.options.name){var b=this.annotations._nameMap[n.options.name];n.options.pageNumber=b.page,n.options.top=b.y}else n.options.top||(n.options.top=0);if(r=`/Rect [`+n.finalBounds.x+` `+n.finalBounds.y+` `+n.finalBounds.w+` `+n.finalBounds.h+`] `,i=``,n.options.url)i=`<</Type /Annot /Subtype /Link `+r+`/Border [0 0 0] /A <</S /URI /URI (`+f(p(n.options.url))+`) >>`;else if(n.options.pageNumber)switch(i=`<</Type /Annot /Subtype /Link `+r+`/Border [0 0 0] /Dest [`+this.internal.getPageInfo(n.options.pageNumber).objId+` 0 R`,n.options.magFactor=n.options.magFactor||`XYZ`,n.options.magFactor){case`Fit`:i+=` /Fit]`;break;case`FitH`:i+=` /FitH `+n.options.top+`]`;break;case`FitV`:n.options.left=n.options.left||0,i+=` /FitV `+n.options.left+`]`;break;default:var x=o(n.options.top);n.options.left=n.options.left||0,n.options.zoom===void 0&&(n.options.zoom=0),i+=` /XYZ `+n.options.left+` `+x+` `+n.options.zoom+`]`}i!=``&&(i+=` >>`,this.internal.write(i))}}this.internal.write(`]`)}}]),e.createAnnotation=function(e){var t=this.internal.getCurrentPageInfo();switch(e.type){case`link`:this.link(e.bounds.x,e.bounds.y,e.bounds.w,e.bounds.h,e);break;case`text`:case`freetext`:t.pageContext.annotations.push(e)}},e.link=function(e,t,n,r,i){var a=this.internal.getCurrentPageInfo(),o=this.internal.getCoordinateString,
154s=this.internal.getVerticalCoordinateString;a.pageContext.annotations.push({finalBounds:{x:o(e),y:s(t),w:o(e+n),h:s(t+r)},options:i,type:`link`})},e.textWithLink=function(e,t,n,r){var i,a,o=this.getTextWidth(e),s=this.internal.getLineHeight()/this.internal.scaleFactor;if(r.maxWidth!==void 0){a=r.maxWidth;var c=this.splitTextToSize(e,a).length;i=Math.ceil(s*c)}else a=o,i=s;return this.text(e,t,n,r),n+=.2*s,r.align===`center`&&(t-=o/2),r.align===`right`&&(t-=o),this.link(t,n-s,a,i,r),o},e.getTextWidth=function(e){var t=this.internal.getFontSize();return this.getStringUnitWidth(e)*t/this.internal.scaleFactor}}(zZ.API),function(e){var t={1569:[65152],1570:[65153,65154],1571:[65155,65156],1572:[65157,65158],1573:[65159,65160],1574:[65161,65162,65163,65164],1575:[65165,65166],1576:[65167,65168,65169,65170],1577:[65171,65172],1578:[65173,65174,65175,65176],1579:[65177,65178,65179,65180],1580:[65181,65182,65183,65184],1581:[65185,65186,65187,65188],1582:[65189,65190,65191,65192],1583:[65193,65194],1584:[65195,65196],1585:[65197,65198],1586:[65199,65200],1587:[65201,65202,65203,65204],1588:[65205,65206,65207,65208],1589:[65209,65210,65211,65212],1590:[65213,65214,65215,65216],1591:[65217,65218,65219,65220],1592:[65221,65222,65223,65224],1593:[65225,65226,65227,65228],1594:[65229,65230,65231,65232],1601:[65233,65234,65235,65236],1602:[65237,65238,65239,65240],1603:[65241,65242,65243,65244],1604:[65245,65246,65247,65248],1605:[65249,65250,65251,65252],1606:[65253,65254,65255,65256],1607:[65257,65258,65259,65260],1608:[65261,65262],1609:[65263,65264,64488,64489],1610:[65265,65266,65267,65268],1649:[64336,64337],1655:[64477],1657:[64358,64359,64360,64361],1658:[64350,64351,64352,64353],1659:[64338,64339,64340,64341],1662:[64342,64343,64344,64345],1663:[64354,64355,64356,64357],1664:[64346,64347,64348,64349],1667:[64374,64375,64376,6437
1547],1668:[64370,64371,64372,64373],1670:[64378,64379,64380,64381],1671:[64382,64383,64384,64385],1672:[64392,64393],1676:[64388,64389],1677:[64386,64387],1678:[64390,64391],1681:[64396,64397],1688:[64394,64395],1700:[64362,64363,64364,64365],1702:[64366,64367,64368,64369],1705:[64398,64399,64400,64401],1709:[64467,64468,64469,64470],1711:[64402,64403,64404,64405],1713:[64410,64411,64412,64413],1715:[64406,64407,64408,64409],1722:[64414,64415],1723:[64416,64417,64418,64419],1726:[64426,64427,64428,64429],1728:[64420,64421],1729:[64422,64423,64424,64425],1733:[64480,64481],1734:[64473,64474],1735:[64471,64472],1736:[64475,64476],1737:[64482,64483],1739:[64478,64479],1740:[64508,64509,64510,64511],1744:[64484,64485,64486,64487],1746:[64430,64431],1747:[64432,64433]},n={65247:{65154:65269,65156:65271,65160:65273,65166:65275},65248:{65154:65270,65156:65272,65160:65274,65166:65276},65165:{65247:{65248:{65258:65010}}},1617:{1612:64606,1613:64607,1614:64608,1615:64609,1616:64610}},r={1612:64606,1613:64607,1614:64608,1615:64609,1616:64610},i=[1570,1571,1573,1575];e.__arabicParser__={};var a=e.__arabicParser__.isInArabicSubstitutionA=function(e){return t[e.charCodeAt(0)]!==void 0},o=e.__arabicParser__.isArabicLetter=function(e){return typeof e==`string`&&/^[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF]+$/.test(e)},s=e.__arabicParser__.isArabicEndLetter=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length<=2},c=e.__arabicParser__.isArabicAlfLetter=function(e){return o(e)&&i.indexOf(e.charCodeAt(0))>=0};e.__arabicParser__.arabicLetterHasIsolatedForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=1};var l=e.__arabicParser__.arabicLetterHasFinalForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=2};e.__arabicParser__.arabicLetterHasInitialForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length>=3};var u=e.__arabicParser__.arabicLetterHasMedialForm=function(e){return o(e)&&a(e)&&t[e.charCodeAt(0)].length==4},d=e.__arabicParser__.resolveLigatures=function(e){var t=0,r=n,i=``,a=0;for(t=0;t<e.length;t+=1)r[e.charCodeAt(t)]===void 0?(r=n,i+=e.charAt(t-a),t-=a,a=0):(a++,typeof(r=r[e.charCodeAt(t)])==`number`&&(i+=String.fromCharCode(r),r=n,a=0),t===e.length-1&&(r=n,i+=e.charAt(t-(a-1)),t-=a-1,a=0));return i};e.__arabicParser__.isArabicDiacritic=function(e){return e!==void 0&&r[e.charCodeAt(0)]!==void 0};var f=e.__arabicParser__.getCorrectForm=function(e,t,n){return o(e)?!1===a(e)?-1:!l(e)||!o(t)&&!o(n)||!o(n)&&s(t)||s(e)&&!o(t)||s(e)&&c(t)||s(e)&&s(t)?0:u(e)&&o(t)&&!s(t)&&o(n)&&l(n)?3:s(e)||!o(n)?1:2:-1},p=function(e){var n=0,r=0,i=0,a=``,s=``,c=``,l=(e||=``).split(`\\s+`),u=[];for(n=0;n<l.length;n+=1){for(u.push(``),r=0;r<l[n].length;r+=1)a=l[n][r],s=l[n][r-1],c=l[n][r+1],o(a)?(i=f(a,s,c),u[n]+=i===-1?a:String.fromCharCode(t[a.charCodeAt(0)][i])):u[n]+=a;u[n]=d(u[n])}return u.join(` `)},m=e.__arabicParser__.processArabic=e.processArabic=function(){var e,t=typeof arguments[0]==`string`?arguments[0]:arguments[0].text,n=[];if(Array.isArray(t)){var r=0;for(n=[],r=0;r<t.length;r+=1)Array.isArray(t[r])?n.push([p(t[r][0]),t[r][1],t[r][2]]):n.push([p(t[r])]);e=n}else e=p(t);return typeof arguments[0]==`string`?e:(arguments[0].text=e,arguments[0])};e.events.push([`preProcessText`,m])}(zZ.API),zZ.API.autoPrint=function(e){var t;return(e||={}).variant=e.variant||`non-conform`,e.variant===`javascript`?this.addJS(`print({});`):(this.internal.events.subscribe(`postPutResources`,function(){t=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /Named`),this.internal.out(`/Type /Action`),this.internal.out(`/N /Print`),this.internal.out(`>>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){this.internal.out(`/OpenAction `+t+` 0 R`)})),this},function(e){var t=function(){var e=void 0;Object.defineProperty(this,"pdf",{get:function(){return e},set:function(t){e=t}});var t=150;Object.defineProperty(this,"width",{get:function(){return t},set:function(e){t=isNaN(e)||!1===Number.isInteger(e)||e<0?150:e,this.getContext(`2d`).pageWrapXEnabled&&(this.getContext(`2d`).pageWrapX=t+1)}});var n=300;Object.defineProperty(this,"height",{get:function(){return n},set:function(e){n=isNaN(e)||!1===Number.isInteger(e)||e<0?300:e,this.getContext(`2d`).pageWrapYEnabled&&(this.getContext(`2d`).pageWrapY=n+1)}});var r=[];Object.defineProperty(this,"childNodes",{get:function(){return r},set:function(e){r=e}});var i={};Object.defineProperty(this,"style",{get:function(){return i},set:function(e){i=e}}),Object.defineProperty(this,"parentNode",{})};t.prototype.getContext=function(e,t){var n;if((e||=`2d`)!==`2d`)return null;for(n in t)this.pdf.context2d.hasOwnProperty(n)&&(this.pdf.context2d[n]=t[n]);return this.pdf.context2d._canvas=this,this.pdf.context2d},t.prototype.toDataURL=function(){throw Error(`toDataURL is not implemented.`)},e.events.push([`initialized`,function(){this.canvas=new t,this.canvas.pdf=this}])}(zZ.API),function(e){var t={left:0,top:0,bottom:0,right:0},n=!1,r=function(){this.internal.__cell__===void 0&&(this.internal.__cell__={},this.internal.__cell__.padding=3,this.internal.__cell__.headerFunction=void 0,this.internal.__cell__.margins=Object.assign({},t),this.internal.__cell__.margins.width=this.getPageWidth(),i.call(this))},i=function(){this.internal.__cell__.lastCell=new a,this.internal.__cell__.pages=1},a=function(){var e=arguments[0];Object.defineProperty(this,"x",{enumerable:!0,get:function(){return e},set:function(t){e=t}});var t=arguments[1];Object.defineProperty(this,"y",{enumerable:!0,get:function(){return t},set:function(e){t=e}});var n=arguments[2];Object.defineProperty(this,"width",{enumerable:!0,get:function(){return n},set:function(e){n=e}});var r=arguments[3];Object.defineProperty(this,"height",{enumerable:!0,get:function(){return r},set:function(e){r=e}});var i=arguments[4];Object.defineProperty(this,"text",{enumerable:!0,get:function(){return i},set:function(e){i=e}});var a=arguments[5];Object.defineProperty(this,"lineNumber",{enumerable:!0,get:function(){return a}
154,set:function(e){a=e}});var o=arguments[6];return Object.defineProperty(this,"align",{enumerable:!0,get:function(){return o},set:function(e){o=e}}),this};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align)},a.prototype.toArray=function(){return[this.x,this.y,this.width,this.height,this.text,this.lineNumber,this.align]},e.setHeaderFunction=function(e){return r.call(this),this.internal.__cell__.headerFunction=typeof e==`function`?e:void 0,this},e.getTextDimensions=function(e,t){r.call(this);var n=(t||={}).fontSize||this.getFontSize(),i=t.font||this.getFont(),a=t.scaleFactor||this.internal.scaleFactor,o=0,s=0,c=0,l=this;if(!Array.isArray(e)&&typeof e!=`string`){if(typeof e!=`number`)throw Error(`getTextDimensions expects text-parameter to be of type String or type Number or an Array of Strings.`);e=String(e)}var u=t.maxWidth;u>0?typeof e==`string`?e=this.splitTextToSize(e,u):Object.prototype.toString.call(e)===`[object Array]`&&(e=e.reduce(function(e,t){return e.concat(l.splitTextToSize(t,u))},[])):e=Array.isArray(e)?e:[e];for(var d=0;d<e.length;d++)o<(c=this.getStringUnitWidth(e[d],{font:i})*n)&&(o=c);return o!==0&&(s=e.length),{w:o/=a,h:Math.max((s*n*this.getLineHeightFactor()-n*(this.getLineHeightFactor()-1))/a,0)}},e.cellAddPage=function(){r.call(this),this.addPage();var e=this.internal.__cell__.margins||t;return this.internal.__cell__.lastCell=new a(e.left,e.top,void 0,void 0),this.internal.__cell__.pages+=1,this};var o=e.cell=function(){var e=arguments[0]instanceof a?arguments[0]:new a(arguments[0],arguments[1],arguments[2],arguments[3],arguments[4],arguments[5],arguments[6]);r.call(this);var i=this.internal.__cell__.lastCell,o=this.internal.__cell__.padding,s=this.internal.__cell__.margins||t,c=this.internal.__cell__.tableHeaderRow,l=this.internal.__cell__.printHeaders;return i.lineNumber!==void 0&&(i.lineNumber===e.lineNumber?(e.x=(i.x||0)+(i.width||0),e.y=i.y||0):i.y+i.height+e.height+s.bottom>this.getPageHeight()?(this.cellAddPage(),e.y=s.top,l&&c&&(this.printHeaderRow(e.lineNumber,!0),e.y+=c[0].height)):e.y=i.y+i.height||e.y),e.text[0]!==void 0&&(this.rect(e.x,e.y,e.width,e.height,!0===n?`FD`:void 0),e.align===`right`?this.text(e.text,e.x+e.width-o,e.y+o,{align:`right`,baseline:`top`}):e.align===`center`?this.text(e.text,e.x+e.width/2,e.y+o,{align:`center`,baseline:`top`,maxWidth:e.width-o-o}):this.text(e.text,e.x+o,e.y+o,{align:`left`,baseline:`top`,maxWidth:e.width-o-o})),this.internal.__cell__.lastCell=e,this};e.table=function(e,n,c,l,u){if(r.call(this),!c)throw Error(`No data for PDF table.`);var d,f,p,m,h=[],g=[],_=[],v={},y={},b=[],x=[],S=(u||={}).autoSize||!1,C=!1!==u.printHeaders,w=u.css&&u.css[`font-size`]!==void 0?16*u.css[`font-size`]:u.fontSize||12,T=u.margins||Object.assign({width:this.getPageWidth()},t),E=typeof u.padding==`number`?u.padding:3,D=u.headerBackgroundColor||`#c8c8c8`,O=u.headerTextColor||`#000`;if(i.call(this),this.internal.__cell__.printHeaders=C,this.internal.__cell__.margins=T,this.internal.__cell__.table_font_size=w,this.internal.__cell__.padding=E,this.internal.__cell__.headerBackgroundColor=D,this.internal.__cell__.headerTextColor=O,this.setFontSize(w),l==null)g=h=Object.keys(c[0]),_=h.map(function(){return`left`});else if(Array.isArray(l)&&wW(l[0])===`object`)for(h=l.map(function(e){return e.name}),g=l.map(function(e){return e.prompt||e.name||``}),_=l.map(function(e){return e.align||`left`}),d=0;d<l.length;d+=1)y[l[d].name]=.7499990551181103*l[d].width;else Array.isArray(l)&&typeof l[0]==`string`&&(g=h=l,_=h.map(function(){return`left`}));if(S||Array.isArray(l)&&typeof l[0]==`string`)for(d=0;d<h.length;d+=1){for(v[m=h[d]]=c.map(function(e){return e[m]}),this.setFont(void 0,`bold`),b.push(this.getTextDimensions(g[d],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w),f=v[m],this.setFont(void 0,`normal`),p=0;p<f.length;p+=1)b.push(this.getTextDimensions(f[p],{fontSize:this.internal.__cell__.table_font_size,scaleFactor:this.internal.scaleFactor}).w);y[m]=Math.max.apply(null,b)+E+E,b=[]}if(C){var k={};for(d=0;d<h.length;d+=1)k[h[d]]={},k[h[d]].text=g[d],k[h[d]].align=_[d];var A=s.call(this,k,y);x=h.map(function(t){return new a(e,n,y[t],A,k[t].text,void 0,k[t].align)}),this.setTableHeaderRow(x),this.printHeaderRow(1,!1)}var j=l.reduce(function(e,t){return e[t.name]=t.align,e},{});for(d=0;d<c.length;d+=1){`rowStart`in u&&u.rowStart instanceof Function&&u.rowStart({row:d,data:c[d]},this);var M=s.call(this,c[d],y);for(p=0;p<h.length;p+=1){var N=c[d][h[p]];`cellStart`in u&&u.cellStart instanceof Function&&u.cellStart({row:d,col:p,data:N},this),o.call(this,new a(e,n,y[h[p]],M,N,d+2,j[h[p]]))}}return this.internal.__cell__.table_x=e,this.internal.__cell__.table_y=n,this};var s=function(e,t){var n=this.internal.__cell__.padding,r=this.internal.__cell__.table_font_size,i=this.internal.scaleFactor;return Object.keys(e).map(function(r){var i=e[r];return this.splitTextToSize(i.hasOwnProperty(`text`)?i.text:i,t[r]-n-n)},this).map(function(e){return this.getLineHeightFactor()*e.length*r/i+n+n},this).reduce(function(e,t){return Math.max(e,t)},0)};e.setTableHeaderRow=function(e){r.call(this),this.internal.__cell__.tableHeaderRow=e},e.printHeaderRow=function(e,t){if(r.call(this),!this.internal.__cell__.tableHeaderRow)throw Error(`Property tableHeaderRow does not exist.`);var i;if(n=!0,typeof this.internal.__cell__.headerFunction==`function`){var s=this.internal.__cell__.headerFunction(this,this.internal.__cell__.pages);this.internal.__cell__.lastCell=new a(s[0],s[1],s[2],s[3],void 0,-1)}this.setFont(void 0,`bold`);for(var c=[],l=0;l<this.internal.__cell__.tableHeaderRow.length;l+=1){i=this.internal.__cell__.tableHeaderRow[l].clone(),t&&(i.y=this.internal.__cell__.margins.top||0,c.push(i)),i.lineNumber=e;var u=this.getTextColor();this.setTextColor(this.internal.__cell__.headerTextColor),this.setFillColor(this.internal.__cell__.headerBackgroun
154dColor),o.call(this,i),this.setTextColor(u)}c.length>0&&this.setTableHeaderRow(c),this.setFont(void 0,`normal`),n=!1}}(zZ.API);var kQ={italic:[`italic`,`oblique`,`normal`],oblique:[`oblique`,`italic`,`normal`],normal:[`normal`,`oblique`,`italic`]},AQ=[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`],jQ=OQ(AQ),MQ=[100,200,300,400,500,600,700,800,900],NQ=OQ(MQ);function PQ(e){var t=e.family.replace(/"|'/g,``).toLowerCase(),n=function(e){return kQ[e||=`normal`]?e:`normal`}(e.style),r=function(e){return e?typeof e==`number`?e>=100&&e<=900&&e%100==0?e:400:/^\d00$/.test(e)?parseInt(e):e===`bold`?700:400:400}(e.weight),i=function(e){return typeof jQ[e||=`normal`]==`number`?e:`normal`}(e.stretch);return{family:t,style:n,weight:r,stretch:i,src:e.src||[],ref:e.ref||{name:t,style:[i,n,r].join(` `)}}}function FQ(e,t,n,r){var i;for(i=n;i>=0&&i<t.length;i+=r)if(e[t[i]])return e[t[i]];for(i=n;i>=0&&i<t.length;i-=r)if(e[t[i]])return e[t[i]]}var IQ={"sans-serif":`helvetica`,fixed:`courier`,monospace:`courier`,terminal:`courier`,cursive:`times`,fantasy:`times`,serif:`times`},LQ={caption:`times`,icon:`times`,menu:`times`,"message-box":`times`,"small-caption":`times`,"status-bar":`times`};function RQ(e){return[e.stretch,e.style,e.weight,e.family].join(` `)}function zQ(e){return e.trimLeft()}function BQ(e,t){for(var n=0;n<e.length;){if(e.charAt(n)===t)return[e.substring(0,n),e.substring(n+1)];n+=1}return null}function VQ(e){var t=e.match(/^(-[a-z_]|[a-z_])[a-z0-9_-]*/i);return t===null?null:[t[0],e.substring(t[0].length)]}var HQ,UQ,WQ,GQ,KQ,qQ=[`times`];function JQ(e,t,n,r,i){var a=4,o=ZQ;switch(i){case zZ.API.image_compression.FAST:a=1,o=XQ;break;case zZ.API.image_compression.MEDIUM:a=6,o=QQ;break;case zZ.API.image_compression.SLOW:a=9,o=$Q}e=function(e,t,n,r){for(var i,a=e.length/t,o=new Uint8Array(e.length+a),s=[YQ,XQ,ZQ,QQ,$Q],c=0;c<a;c+=1){var l=c*t,u=e.subarray(l,l+t);if(r)o.set(r(u,n,i),l+c);else{for(var d=s.length,f=[],p=0;p<d;p+=1)f[p]=s[p](u,n,i);var m=t$(f.concat());o.set(f[m],l+c)}i=u}return o}(e,t,Math.ceil(n*r/8),o);var s=cG(e,{level:a});return zZ.API.__addimage__.arrayBufferToBinaryString(s)}function YQ(e){var t=Array.apply([],e);return t.unshift(0),t}function XQ(e,t){var n=e.length,r=[];r[0]=1;for(var i=0;i<n;i+=1){var a=e[i-t]||0;r[i+1]=e[i]-a+256&255}return r}function ZQ(e,t,n){var r=e.length,i=[];i[0]=2;for(var a=0;a<r;a+=1){var o=n&&n[a]||0;i[a+1]=e[a]-o+256&255}return i}function QQ(e,t,n){var r=e.length,i=[];i[0]=3;for(var a=0;a<r;a+=1){var o=e[a-t]||0,s=n&&n[a]||0;i[a+1]=e[a]+256-(o+s>>>1)&255}return i}function $Q(e,t,n){var r=e.length,i=[];i[0]=4;for(var a=0;a<r;
154a+=1){var o=e$(e[a-t]||0,n&&n[a]||0,n&&n[a-t]||0);i[a+1]=e[a]-o+256&255}return i}function e$(e,t,n){if(e===t&&t===n)return e;var r=Math.abs(t-n),i=Math.abs(e-n),a=Math.abs(e+t-n-n);return r<=i&&r<=a?e:i<=a?t:n}function t$(e){var t=e.map(function(e){return e.reduce(function(e,t){return e+Math.abs(t)},0)});return t.indexOf(Math.min.apply(null,t))}function n$(e,t,n){var r=t*n,i=Math.floor(r/8),a=16-(r-8*i+n),o=(1<<n)-1;return i$(e,i)>>a&o}function r$(e,t,n,r){var i=n*r,a=Math.floor(i/8),o=16-(i-8*a+r),s=(1<<r)-1,c=(t&s)<<o;(function(e,t,n){if(t+1<e.byteLength)e.setUint16(t,n,!1);else{var r=n>>8&255;e.setUint8(t,r)}})(e,a,i$(e,a)&~(s<<o)&65535|c)}function i$(e,t){return t+1<e.byteLength?e.getUint16(t,!1):e.getUint8(t)<<8}function a$(e){var t=0;if(e[t++]!==71||e[t++]!==73||e[t++]!==70||e[t++]!==56||(e[t++]+1&253)!=56||e[t++]!==97)throw Error(`Invalid GIF 87a/89a header.`);var n=e[t++]|e[t++]<<8,r=e[t++]|e[t++]<<8,i=e[t++],a=i>>7,o=1<<1+(7&i);e[t++],e[t++];var s=null,c=null;a&&(s=t,c=o,t+=3*o);var l=!0,u=[],d=0,f=null,p=0,m=null;for(this.width=n,this.height=r;l&&t<e.length;)switch(e[t++]){case 33:switch(e[t++]){case 255:if(e[t]!==11||e[t+1]==78&&e[t+2]==69&&e[t+3]==84&&e[t+4]==83&&e[t+5]==67&&e[t+6]==65&&e[t+7]==80&&e[t+8]==69&&e[t+9]==50&&e[t+10]==46&&e[t+11]==48&&e[t+12]==3&&e[t+13]==1&&e[t+16]==0)t+=14,m=e[t++]|e[t++]<<8,t++;else for(t+=12;;){if(!((D=e[t++])>=0))throw Error(`Invalid block size`);if(D===0)break;t+=D}break;case 249:if(e[t++]!==4||e[t+4]!==0)throw Error(`Invalid graphics extension block.`);var h=e[t++];d=e[t++]|e[t++]<<8,f=e[t++],1&h||(f=null),p=h>>2&7,t++;break;case 254:for(;;){if(!((D=e[t++])>=0))throw Error(`Invalid block size`);if(D===0)break;t+=D}break;default:throw Error(`Unknown graphic control label: 0x`+e[t-1].toString(16))}break;case 44:var g=e[t++]|e[t++]<<8,_=e[t++]|e[t++]<<8,v=e[t++]|e[t++]<<8,y=e[t++]|e[t++]<<8,b=e[t++],x=b>>6&1,S=1<<1+(7&b),C=s,w=c,T=!1;b>>7&&(T=!0,C=t,w=S,t+=3*S);var E=t;for(t++;;){var D;if(!((D=e[t++])>=0))throw Error(`Invalid block size`);if(D===0)break;t+=D}u.push({x:g,y:_,width:v,height:y,has_local_palette:T,palette_offset:C,palette_size:w,data_offset:E,data_length:t-E,transparent_index:f,interlaced:!!x,delay:d,disposal:p});break;case 59:l=!1;break;default:throw Error(`Unknown gif block: 0x`+e[t-1].toString(16))}this.numFrames=function(){return u.length},this.loopCount=function(){return m},this.frameInfo=function(e){if(e<0||e>=u.length)throw Error(`Frame index out of range.`);return u[e]},this.decodeAndBlitFrameBGRA=function(t,r){var i=this.frameInfo(t),a=i.width*i.height;if(a>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var o=new Uint8Array(a);o$(e,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;c===null&&(c=256);var l=i.width,u=n-l,d=l,f=4*(i.y*n+i.x),p=4*((i.y+i.height)*n+i.x),m=f,h=4*u;!0===i.interlaced&&(h+=4*n*7);for(var g=8,_=0,v=o.length;_<v;++_){var y=o[_];if(d===0&&(d=l,(m+=h)>=p&&(h=4*u+4*n*(g-1),m=f+(l+u)*(g<<1),g>>=1)),y===c)m+=4;else{var b=e[s+3*y],x=e[s+3*y+1],S=e[s+3*y+2];r[m++]=S,r[m++]=x,r[m++]=b,r[m++]=255}--d}},this.decodeAndBlitFrameRGBA=function(t,r){var i=this.frameInfo(t),a=i.width*i.height;if(a>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);var o=new Uint8Array(a);o$(e,i.data_offset,o,a);var s=i.palette_offset,c=i.transparent_index;c===null&&(c=256);var l=i.width,u=n-l,d=l,f=4*(i.y*n+i.x),p=4*((i.y+i.height)*n+i.x),m=f,h=4*u;!0===i.interlaced&&(h+=4*n*7);for(var g=8,_=0,v=o.length;_<v;++_){var y=o[_];if(d===0&&(d=l,(m+=h)>=p&&(h=4*u+4*n*(g-1),m=f+(l+u)*(g<<1),g>>=1)),y===c)m+=4;else{var b=e[s+3*y],x=e[s+3*y+1],S=e[s+3*y+2];r[m++]=b,r[m++]=x,r[m++]=S,r[m++]=255}--d}}}function o$(e,t,n,r){for(var i=e[t++],a=1<<i,o=a+1,s=o+1,c=i+1,l=(1<<c)-1,u=0,d=0,f=0,p=e[t++],m=new Int32Array(4096),h=null;;){for(;u<16&&p!==0;)d|=e[t++]<<u,u+=8,p===1?p=e[t++]:--p;if(u<c)break;var g=d&l;if(d>>=c,u-=c,g!==a){if(g===o)break;for(var _=g<s?g:h,v=0,y=_;y>a;)y=m[y]>>8,++v;var b=y;if(f+v+(_===g?0:1)>r)return void cZ.log(`Warning, gif stream longer than expected.`);n[f++]=b;var x=f+=v;for(_!==g&&(n[f++]=b),y=_;v--;)y=m[y],n[--x]=255&y,y>>=8;h!==null&&s<4096&&(m[s++]=h<<8|b,s>=l+1&&c<12&&(++c,l=l<<1|1)),h=g}else s=o+1,l=(1<<(c=i+1))-1,h=null}return f!==r&&cZ.log(`Warning, gif stream shorter than expected.`),n}function s$(e){var t,n,r,i,a,o=Math.floor,s=Array(64),c=Array(64),l=Array(64),u=Array(64),d=Array(65535),f=Array(65535),p=Array(64),m=Array(64),h=[],g=0,_=7,v=Array(64),y=Array(64),b=Array(64),x=Array(256),S=Array(2048),C=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],w=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],T=[0,1,2,3,4,5,6,7,8,9,10,11],E=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],D=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],O=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],k=[0,1,2,3,4,5,6,7,8,9,10,11],A=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],j=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function M(e,t){for(var n=0,r=0,i=[],a=1;a<=16;a++){for(var o=1;o<=e[a];o++)i[t[r]]=[],i[t[r]][0]=n,i[t[r]][1]=a,r++,n++;n*=2}return i}function N(e){for(var t=e[0],n=e[1]-1;n>=0;)t&1<<n&&(g|=1<<_),n--,--_<0&&(g==255?(P(255),P(0)):P(g),_=7,g=0)}function P(e){h.push(e)}function F(e){P(e>>8&255),P(255&e)}function I(e,t,n,r,i){for(var a,o=i[0],s=i[240],c=function(e,t){var n,r,i,a,o,s,c,l,u,d,f=0;for(u=0;
vendor: 5,209 bytes, line 154
154u<8;++u){n=e[f],r=e[f+1],i=e[f+2],a=e[f+3],o=e[f+4],s=e[f+5],c=e[f+6];var m=n+(l=e[f+7]),h=n-l,g=r+c,_=r-c,v=i+s,y=i-s,b=a+o,x=a-o,S=m+b,C=m-b,w=g+v,T=g-v;e[f]=S+w,e[f+4]=S-w;var E=.707106781*(T+C);e[f+2]=C+E,e[f+6]=C-E;var D=.382683433*((S=x+y)-(T=_+h)),O=.5411961*S+D,k=1.306562965*T+D,A=.707106781*(w=y+_),j=h+A,M=h-A;e[f+5]=M+O,e[f+3]=M-O,e[f+1]=j+k,e[f+7]=j-k,f+=8}for(f=0,u=0;u<8;++u){n=e[f],r=e[f+8],i=e[f+16],a=e[f+24],o=e[f+32],s=e[f+40],c=e[f+48];var N=n+(l=e[f+56]),P=n-l,F=r+c,I=r-c,ee=i+s,L=i-s,R=a+o,z=a-o,B=N+R,V=N-R,te=F+ee,ne=F-ee;e[f]=B+te,e[f+32]=B-te;var re=.707106781*(ne+V);e[f+16]=V+re,e[f+48]=V-re;var ie=.382683433*((B=z+L)-(ne=I+P)),ae=.5411961*B+ie,oe=1.306562965*ne+ie,se=.707106781*(te=L+I),ce=P+se,H=P-se;e[f+40]=H+ae,e[f+24]=H-ae,e[f+8]=ce+oe,e[f+56]=ce-oe,f++}for(u=0;u<64;++u)d=e[u]*t[u],p[u]=d>0?d+.5|0:d-.5|0;return p}(e,t),l=0;l<64;++l)m[C[l]]=c[l];var u=m[0]-n;n=m[0],u==0?N(r[0]):(N(r[f[a=32767+u]]),N(d[a]));for(var h=63;h>0&&m[h]==0;)h--;if(h==0)return N(o),n;for(var g,_=1;_<=h;){for(var v=_;m[_]==0&&_<=h;)++_;var y=_-v;if(y>=16){g=y>>4;for(var b=1;b<=g;++b)N(s);y&=15}a=32767+m[_],N(i[(y<<4)+f[a]]),N(d[a]),_++}return h!=63&&N(o),n}function ee(e){e=Math.min(Math.max(e,1),100),a!=e&&(function(e){for(var t=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],n=0;n<64;n++){var r=o((t[n]*e+50)/100);r=Math.min(Math.max(r,1),255),s[C[n]]=r}for(var i=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a=0;a<64;a++){var d=o((i[a]*e+50)/100);d=Math.min(Math.max(d,1),255),c[C[a]]=d}for(var f=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],p=0,m=0;m<8;m++)for(var h=0;h<8;h++)l[p]=1/(s[C[p]]*f[m]*f[h]*8),u[p]=1/(c[C[p]]*f[m]*f[h]*8),p++}(Math.floor(e<50?5e3/e:200-2*e)),a=e)}this.encode=function(e,a){a&&ee(a),h=[],g=0,_=7,F(65496),F(65504),F(16),P(74),P(70),P(73),P(70),P(0),P(1),P(1),P(0),F(1),F(1),P(0),P(0),function(){F(65499),F(132),P(0);for(var e=0;e<64;e++)P(s[e]);P(1);for(var t=0;t<64;t++)P(c[t])}(),function(e,t){F(65472),F(17),P(8),F(t),F(e),P(3),P(1),P(17),P(0),P(2),P(17),P(1),P(3),P(17),P(1)}(e.width,e.height),function(){F(65476),F(418),P(0);for(var e=0;e<16;e++)P(w[e+1]);for(var t=0;t<=11;t++)P(T[t]);P(16);for(var n=0;n<16;n++)P(E[n+1]);for(var r=0;r<=161;r++)P(D[r]);P(1);for(var i=0;i<16;i++)P(O[i+1]);for(var a=0;a<=11;a++)P(k[a]);P(17);for(var o=0;o<16;o++)P(A[o+1]);for(var s=0;s<=161;s++)P(j[s])}(),F(65498),F(12),P(3),P(1),P(0),P(2),P(17),P(3),P(17),P(0),P(63),P(0);var o=0,d=0,f=0;g=0,_=7,this.encode.displayName=`_encode_`;for(var p,m,x,C,M,L,R,z,B,V=e.data,te=e.width,ne=e.height,re=4*te,ie=0;ie<ne;){for(p=0;p<re;){for(M=re*ie+p,R=-1,z=0,B=0;B<64;B++)L=M+(z=B>>3)*re+(R=4*(7&B)),ie+z>=ne&&(L-=re*(ie+1+z-ne)),p+R>=re&&(L-=p+R-re+4),m=V[L++],x=V[L++],C=V[L++],v[B]=(S[m]+S[x+256|0]+S[C+512|0]>>16)-128,y[B]=(S[m+768|0]+S[x+1024|0]+S[C+1280|0]>>16)-128,b[B]=(S[m+1280|0]+S[x+1536|0]+S[C+1792|0]>>16)-128;o=I(v,l,o,t,r),d=I(y,u,d,n,i),f=I(b,u,f,n,i),p+=32}ie+=8}if(_>=0){var ae=[];ae[1]=_+1,ae[0]=(1<<_+1)-1,N(ae)}return F(65497),new Uint8Array(h)},e||=50,function(){for(var e=String.fromCharCode,t=0;t<256;t++)x[t]=e(t)}(),t=M(w,T),n=M(O,k),r=M(E,D),i=M(A,j),function(){for(var e=1,t=2,n=1;n<=15;n++){for(var r=e;r<t;r++)f[32767+r]=n,d[32767+r]=[],d[32767+r][1]=n,d[32767+r][0]=r;for(var i=-(t-1);i<=-e;i++)f[32767+i]=n,d[32767+i]=[],d[32767+i][1]=n,d[32767+i][0]=t-1+i;e<<=1,t<<=1}}(),function(){for(var e=0;e<256;e++)S[e]=19595*e,S[e+256|0]=38470*e,S[e+512|0]=7471*e+32768,S[e+768|0]=-11059*e,S[e+1024|0]=-21709*e,S[e+1280|0]=32768*e+8421375,S[e+1536|0]=-27439*e,S[e+1792|0]=-5329*e}(),ee(e)}function c$(e,t){if(this.pos=0,this.buffer=e,this.datav=new DataView(e.buffer),this.is_with_alpha=!!t,this.bottom_up=!0,this.flag=String.fromCharCode(this.buffer[0])+String.fromCharCode(this.buffer[1]),this.pos+=2,[`BM`,`BA`,`CI`,`CP`,`IC`,`PT`].indexOf(this.flag)===-1)throw Error(`Invalid BMP File`);this.parseHeader(),this.parseBGR()}function l$(e){function t(e){if(!e)throw Error(`assert :P`)}function n(e,t,n){for(var r=0;4>r;r++)if(e[t+r]!=n.charCodeAt(r))return!0;return!1}function r(e,t,n,r,i){for(var a=0;a<i;a++)e[t+a]=n[r+a]}function i(e,t,n,r){for(var i=0;i<r;i++)e[t+i]=n}function a(e){return new Int32Array(e)}function o(e,t){for(var n=[],r=0;r<e;r++)n.push(new t);return n}function s(e,t){var n=[];return function e(n,r,i){for(var a=i[r],o=0;o<a&&(n.push(i.length>r+1?[]:new t),!(i.length<r+1));o++)e(n[o],r+1,i)}(n,0,e),n}var c=function(){var e=this;function c(e,t){for(var n=1<<t-1>>>0;e&n;)n>>>=1;return n?(e&n-1)+n:e}function l(e,n,r,i,a){t(!(i%r));do e[n+(i-=r)]=a;while(0<i)}function u(e,n,r,i,o){if(t(2328>=o),512>=o)var s=a(512);else if((s=a(o))==null)return 0;return function(e,n,r,i,o,s){var u,f,p=n,m=1<<r,h=a(16),g=a(16);for(t(o!=0),t(i!=null),t(e!=null),t(0<r),f=0;f<o;++f){if(15<i[f])return 0;++h[i[f]]}if(h[0]==o)return 0;for(g[1]=0,u=1;15>u;++u){if(h[u]>1<<u)return 0;g[u+1]=g[u]+h[u]}for(f=0;f<o;
vendor: 5,786 bytes, line 154
154++f)u=i[f],0<i[f]&&(s[g[u]++]=f);if(g[15]==1)return(i=new d).g=0,i.value=s[0],l(e,p,1,m,i),m;var _,v=-1,y=m-1,b=0,x=1,S=1,C=1<<r;for(f=0,u=1,o=2;u<=r;++u,o<<=1){if(x+=S<<=1,0>(S-=h[u]))return 0;for(;0<h[u];--h[u])(i=new d).g=u,i.value=s[f++],l(e,p+b,o,C,i),b=c(b,u)}for(u=r+1,o=2;15>=u;++u,o<<=1){if(x+=S<<=1,0>(S-=h[u]))return 0;for(;0<h[u];--h[u]){if(i=new d,(b&y)!=v){for(p+=C,_=1<<(v=u)-r;15>v&&!(0>=(_-=h[v]));)++v,_<<=1;m+=C=1<<(_=v-r),e[n+(v=b&y)].g=_+r,e[n+v].value=p-n-v}i.g=u-r,i.value=s[f++],l(e,p+(b>>r),o,C,i),b=c(b,u)}}return x==2*g[15]-1?m:0}(e,n,r,i,o,s)}function d(){this.value=this.g=0}function f(){this.value=this.g=0}function p(){this.G=o(5,d),this.H=a(5),this.jc=this.Qb=this.qb=this.nd=0,this.pd=o(qn,f)}function m(e,n,r,i){t(e!=null),t(n!=null),t(2147483648>i),e.Ca=254,e.I=0,e.b=-8,e.Ka=0,e.oa=n,e.pa=r,e.Jd=n,e.Yc=r+i,e.Zc=4<=i?r+i-4+1:r,E(e)}function h(e,t){for(var n=0;0<t--;)n|=O(e,128)<<t;return n}function g(e,t){var n=h(e,t);return D(e)?-n:n}function _(e,n,r,i){var a,o=0;for(t(e!=null),t(n!=null),t(4294967288>i),e.Sb=i,e.Ra=0,e.u=0,e.h=0,4<i&&(i=4),a=0;a<i;++a)o+=n[r+a]<<8*a;e.Ra=o,e.bb=i,e.oa=n,e.pa=r}function v(e){for(;8<=e.u&&e.bb<e.Sb;)e.Ra>>>=8,e.Ra+=e.oa[e.pa+e.bb]<<Xn-8>>>0,++e.bb,e.u-=8;C(e)&&(e.h=1,e.u=0)}function y(e,n){if(t(0<=n),!e.h&&n<=Yn){var r=S(e)&Jn[n];return e.u+=n,v(e),r}return e.h=1,e.u=0}function b(){this.b=this.Ca=this.I=0,this.oa=[],this.pa=0,this.Jd=[],this.Yc=0,this.Zc=[],this.Ka=0}function x(){this.Ra=0,this.oa=[],this.h=this.u=this.bb=this.Sb=this.pa=0}function S(e){return e.Ra>>>(e.u&Xn-1)>>>0}function C(e){return t(e.bb<=e.Sb),e.h||e.bb==e.Sb&&e.u>Xn}function w(e,t){e.u=t,e.h=C(e)}function T(e){e.u>=Zn&&(t(e.u>=Zn),v(e))}function E(e){t(e!=null&&e.oa!=null),e.pa<e.Zc?(e.I=(e.oa[e.pa++]|e.I<<8)>>>0,e.b+=8):(t(e!=null&&e.oa!=null),e.pa<e.Yc?(e.b+=8,e.I=e.oa[e.pa++]|e.I<<8):e.Ka?e.b=0:(e.I<<=8,e.b+=8,e.Ka=1))}function D(e){return h(e,1)}function O(e,t){var n=e.Ca;0>e.b&&E(e);var r=e.b,i=n*t>>>8,a=(e.I>>>r>i)+0;for(a?(n-=i,e.I-=i+1<<r>>>0):n=i+1,r=n,i=0;256<=r;)i+=8,r>>=8;return r=7^i+Qn[r],e.b-=r,e.Ca=(n<<r)-1,a}function k(e,t,n){e[t+0]=n>>24&255,e[t+1]=n>>16&255,e[t+2]=n>>8&255,e[t+3]=255&n}function A(e,t){return e[t+0]|e[t+1]<<8}function j(e,t){return A(e,t)|e[t+2]<<16}function M(e,t){return A(e,t)|A(e,t+2)<<16}function N(e,n){var r=1<<n;return t(e!=null),t(0<n),e.X=a(r),e.X==null?0:(e.Mb=32-n,e.Xa=n,1)}function P(e,n){t(e!=null),t(n!=null),t(e.Xa==n.Xa),r(n.X,0,e.X,0,1<<n.Xa)}function F(){this.X=[],this.Xa=this.Mb=0}function I(e,n,r,i){t(r!=null),t(i!=null);var a=r[0],o=i[0];return a==0&&(a=(e*o+n/2)/n),o==0&&(o=(n*a+e/2)/e),0>=a||0>=o?0:(r[0]=a,i[0]=o,1)}function ee(e,t){return e+(1<<t)-1>>>t}function L(e,t){return((4278255360&e)+(4278255360&t)>>>0&4278255360)+((16711935&e)+(16711935&t)>>>0&16711935)>>>0}function R(t,n){e[n]=function(n,r,i,a,o,s,c){var l;for(l=0;l<o;++l){var u=e[t](s[c+l-1],i,a+l);s[c+l]=L(n[r+l],u)}}}function z(){this.ud=this.hd=this.jd=0}function B(e,t){return((4278124286&(e^t))>>>1)+(e&t)>>>0}function V(e){return 0<=e&&256>e?e:0>e?0:255<e?255:void 0}function te(e,t){return V(e+(e-t+.5>>1))}function ne(e,t,n){return Math.abs(t-n)-Math.abs(e-n)}function re(e,t,n,r,i,a,o){for(r=a[o-1],n=0;n<i;++n)a[o+n]=r=L(e[t+n],r)}function ie(e,t,n,r,i){var a;for(a=0;a<n;++a){var o=e[t+a],s=o>>8&255,c=16711935&(c=(c=16711935&o)+((s<<16)+s));r[i+a]=(4278255360&o)+c>>>0}}function ae(e,t){t.jd=255&e,t.hd=e>>8&255,t.ud=e>>16&255}function oe(e,t,n,r,i,a){var o;for(o=0;o<r;++o){var s=t[n+o],c=s>>>8,l=s,u=255&(u=(u=s>>>16)+((e.jd<<24>>24)*(c<<24>>24)>>>5));l=255&(l=(l+=(e.hd<<24>>24)*(c<<24>>24)>>>5)+((e.ud<<24>>24)*(u<<24>>24)>>>5)),i[a+o]=(4278255360&s)+(u<<16)+l}}function se(t,n,r,i,a){e[n]=function(e,t,n,r,o,s,c,l,u){for(r=c;r<l;++r)for(c=0;c<u;++c)o[s++]=a(n[i(e[t++])])},e[t]=function(t,n,o,s,c,l,u){var d=8>>t.b,f=t.Ea,p=t.K[0],m=t.w;if(8>d)for(t=(1<<t.b)-1,m=(1<<d)-1;n<o;++n){var h,g=0;for(h=0;h<f;++h)h&t||(g=i(s[c++])),l[u++]=a(p[g&m]),g>>=d}else e[`VP8LMapColor`+r](s,c,p,m,l,u,n,o,f)}}function ce(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=a>>16&255,r[i++]=a>>8&255,r[i++]=255&a}}function H(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=a>>16&255,r[i++]=a>>8&255,r[i++]=255&a,r[i++]=a>>24&255}}function le(e,t,n,r,i){for(n=t+n;t<n;){var a=(o=e[t++])>>16&240|o>>12&15,o=240&o|o>>28&15;r[i++]=a,r[i++]=o}}function ue(e,t,n,r,i){for(n=t+n;t<n;){var a=(o=e[t++])>>16&248|o>>13&7,o=o>>5&224|o>>3&31;r[i++]=a,r[i++]=o}}function de(e,t,n,r,i){for(n=t+n;t<n;){var a=e[t++];r[i++]=255&a,r[i++]=a>>8&255,r[i++]=a>>16&255}}function fe(e,t,n,i,a,o){if(o==0)for(n=t+n;t<n;)k(i,((o=e[t++])[0]>>24|o[1]>>8&65280|o[2]<<8&16711680|o[3]<<24)>>>0),a+=32;else r(i,a,e,t,n)}function pe(t,n){e[n][0]=e[t+`0`],e[n][1]=e[t+`1`],e[n][2]=e[t+`2`],e[n][3]=e[t+`3`],e[n][4]=e[t+`4`],e[n][5]=e[t+`5`],e[n][6]=e[t+`6`],e[n][7]=e[t+`7`],e[n][8]=e[t+`8`],e[n][9]=e[t+`9`],e[n][10]=e[t+`10`],e[n][11]=e[t+`11`],e[n][12]=e[t+`12`],e[n][13]=e[t+`13`],e[n][14]=e[t+`0`],e[n][15]=e[t+`0`]}function U(e){return e==Zr||e==Qr||e==$r||e==ei}function me(){this.eb=[],this.size=this.A=this.fb=0}function he(){this.y=[],this.f=[],this.ea=[],this.F=[],this.Tc=this.Ed=this.Cd=this.Fd=this.lb=this.Db=this.Ab=this.fa=this.J=this.W=this.N=this.O=0}function ge(){this.Rd=this.height=this.width=this.S=0,this.f={},this.f.RGBA=new me,this.f.kb=new he,this.sd=null}function _e(){this.width=[0],this.height=[0],this.Pd=[0],this.Qd=[0],this.format=[0]}function ve(){this.Id=this.fd=this.Md=this.hb=this.ib=this.da=this.bd=this.cd=this.j=this.v=this.Da=this.Sd=this.ob=0}function ye(e){return alert(`todo:WebPSamplerProcessPlane`),e.T}function be(e,t){var n=e.T,i=t.ba.f.RGBA,a=i.eb,o=i.fb+e.ka*i.A,s=wi[t.ba.S],c=e.y,l=e.O,u=e.f,d=e.N,f=e.ea,p=e.W,m=t.cc,h=t.dc,g=t.Mc,_=t.Nc,v=e.ka,y=e.ka+e.T,b=e.U,x=b+1>>1;
vendor: 4,248 bytes, line 154
154for(v==0?s(c,l,null,null,u,d,f,p,u,d,f,p,a,o,null,null,b):(s(t.ec,t.fc,c,l,m,h,g,_,u,d,f,p,a,o-i.A,a,o,b),++n);v+2<y;v+=2)m=u,h=d,g=f,_=p,d+=e.Rc,p+=e.Rc,o+=2*i.A,s(c,(l+=2*e.fa)-e.fa,c,l,m,h,g,_,u,d,f,p,a,o-i.A,a,o,b);return l+=e.fa,e.j+y<e.o?(r(t.ec,t.fc,c,l,b),r(t.cc,t.dc,u,d,x),r(t.Mc,t.Nc,f,p,x),n--):1&y||s(c,l,null,null,u,d,f,p,u,d,f,p,a,o+i.A,null,null,b),n}function xe(e,n,r){var i=e.F,a=[e.J];if(i!=null){var o=e.U,s=n.ba.S,c=s==Jr||s==$r;n=n.ba.f.RGBA;var l=[0],u=e.ka;l[0]=e.T,e.Kb&&(u==0?--l[0]:(--u,a[0]-=e.width),e.j+e.ka+e.T==e.o&&(l[0]=e.o-e.j-u));var d=n.eb;u=n.fb+u*n.A,e=Nr(i,a[0],e.width,o,l,d,u+(c?0:3),n.A),t(r==l),e&&U(s)&&jr(d,u,c,o,l,n.A)}return 0}function Se(e){var t=e.ma,n=t.ba.S,r=11>n,i=n==Gr||n==qr||n==Jr||n==Yr||n==12||U(n);if(t.memory=null,t.Ib=null,t.Jb=null,t.Nd=null,!Wn(t.Oa,e,i?11:12))return 0;if(i&&U(n)&&Dn(),e.da)alert(`todo:use_scaling`);else{if(r){if(t.Ib=ye,e.Kb){if(n=e.U+1>>1,t.memory=a(e.U+2*n),t.memory==null)return 0;t.ec=t.memory,t.fc=0,t.cc=t.ec,t.dc=t.fc+e.U,t.Mc=t.cc,t.Nc=t.dc+n,t.Ib=be,Dn()}}else alert(`todo:EmitYUV`);i&&(t.Jb=xe,r&&Tn())}if(r&&!Li){for(e=0;256>e;++e)Ri[e]=89858*(e-128)+Ni>>Mi,Vi[e]=-22014*(e-128)+Ni,Bi[e]=-45773*(e-128),zi[e]=113618*(e-128)+Ni>>Mi;for(e=Pi;e<Fi;++e)t=76283*(e-16)+Ni>>Mi,Hi[e-Pi]=tt(t,255),Ui[e-Pi]=tt(t+8>>4,15);Li=1}return 1}function Ce(e){var n=e.ma,r=e.U,i=e.T;return t(!(1&e.ka)),0>=r||0>=i?0:(r=n.Ib(e,n),n.Jb!=null&&n.Jb(e,n,r),n.Dc+=r,1)}function we(e){e.ma.memory=null}function Te(e,t,n,r){return y(e,8)==47?(t[0]=y(e,14)+1,n[0]=y(e,14)+1,r[0]=y(e,1),y(e,3)==0?!e.h:0):0}function Ee(e,t){if(4>e)return e+1;var n=e-2>>1;return(2+(1&e)<<n)+y(t,n)+1}function De(e,t){return 120<t?t-120:1<=(n=((n=oi[t-1])>>4)*e+(8-(15&n)))?n:1;var n}function Oe(e,t,n){var r=S(n),i=e[t+=255&r].g-8;return 0<i&&(w(n,n.u+8),r=S(n),t+=e[t].value,t+=r&(1<<i)-1),w(n,n.u+e[t].g),e[t].value}function ke(e,n,r){return r.g+=e.g,r.value+=e.value<<n>>>0,t(8>=r.g),e.g}function Ae(e,n,r){var i=e.xc;return t((n=i==0?0:e.vc[e.md*(r>>i)+(n>>i)])<e.Wb),e.Ya[n]}function je(e,n,i,a){var o=e.ab,s=e.c*n,c=e.C;n=c+n;var l=i,u=a;for(a=e.Ta,i=e.Ua;0<o--;){var d=e.gc[o],f=c,p=n,m=l,h=u,g=(u=a,l=i,d.Ea);switch(t(f<p),t(p<=d.nc),d.hc){case 2:tr(m,h,(p-f)*g,u,l);break;case 0:var _=f,v=p,y=u,b=l,x=(E=d).Ea;_==0&&($n(m,h,null,null,1,y,b),re(m,h+1,0,0,x-1,y,b+1),h+=x,b+=x,++_);for(var S=1<<E.b,C=S-1,w=ee(x,E.b),T=E.K,E=E.w+(_>>E.b)*w;_<v;){var D=T,O=E,k=1;for(er(m,h,y,b-x,1,y,b);k<x;){var A=(k&~C)+S;A>x&&(A=x),(0,or[D[O++]>>8&15])(m,h+ +k,y,b+k-x,A-k,y,b+k),k=A}h+=x,b+=x,++_&C||(E+=w)}p!=d.nc&&r(u,l-g,u,l+(p-f-1)*g,g);break;case 1:for(g=m,v=h,x=(m=d.Ea)-(b=m&~(y=(h=1<<d.b)-1)),_=ee(m,d.b),S=d.K,d=d.w+(f>>d.b)*_;f<p;){for(C=S,w=d,T=new z,E=v+b,D=v+m;v<E;)ae(C[w++],T),sr(T,g,v,h,u,l),v+=h,l+=h;v<D&&(ae(C[w++],T),sr(T,g,v,x,u,l),v+=x,l+=x),++f&y||(d+=_)}break;case 3:if(m==u&&h==l&&0<d.b){for(v=u,m=g=l+(p-f)*g-(b=(p-f)*ee(d.Ea,d.b)),h=u,y=l,_=[],b=(x=b)-1;0<=b;--b)_[b]=h[y+b];for(b=x-1;0<=b;--b)v[m+b]=_[b];nr(d,f,p,u,g,u,l)}else nr(d,f,p,m,h,u,l)}l=a,u=i}u!=i&&r(a,i,l,u,s)}function Me(e,n){var r=e.V,i=e.Ba+e.c*e.C,a=n-e.C;if(t(n<=e.l.o),t(16>=a),0<a){var o=e.l,s=e.Ta,c=e.Ua,l=o.width;if(je(e,a,r,i),a=c=[c],t((r=e.C)<(i=n)),t(o.v<o.va),i>o.o&&(i=o.o),r<o.j){var u=o.j-r;r=o.j,a[0]+=u*l}if(r>=i?r=0:(a[0]+=4*o.v,o.ka=r-o.j,o.U=o.va-o.v,o.T=i-r,r=1),r){if(c=c[0],11>(r=e.ca).S){var d=r.f.RGBA,f=(i=r.S,a=o.U,o=o.T,u=d.eb,d.A),p=o;for(d=d.fb+e.Ma*d.A;0<p--;){var m=s,h=c,g=a,_=u,v=d;switch(i){case Wr:cr(m,h,g,_,v);break;case Gr:lr(m,h,g,_,v);break;case Zr:lr(m,h,g,_,v),jr(_,v,0,g,1,0);break;case Kr:fr(m,h,g,_,v);break;case qr:fe(m,h,g,_,v,1);break;case Qr:fe(m,h,g,_,v,1),jr(_,v,0,g,1,0);break;case Jr:fe(m,h,g,_,v,0);break;case $r:fe(m,h,g,_,v,0),jr(_,v,1,g,1,0);break;case Yr:ur(m,h,g,_,v);break;case ei:ur(m,h,g,_,v),Mr(_,v,g,1,0);break;case Xr:dr(m,h,g,_,v);break;default:t(0)}c+=l,d+=f}e.Ma+=o}else alert(`todo:EmitRescaledRowsYUVA`);t(e.Ma<=r.height)}}e.C=n,t(e.C<=e.i)}function Ne(e){var t;if(0<e.ua)return 0;for(t=0;t<e.Wb;++t){var n=e.Ya[t].G,r=e.Ya[t].H;if(0<n[1][r[1]+0].g||0<n[2][r[2]+0].g||0<n[3][r[3]+0].g)return 0}return 1}function Pe(e,n,r,i,a,o){if(e.Z!=0){var s=e.qd,c=e.rd;for(t(Ci[e.Z]!=null);n<r;++n)Ci[e.Z](s,c,i,a,i,a,o),s=i,c=a,a+=o;e.qd=s,e.rd=c}}
154function Fe(e,n){var r=e.l.ma,i=r.Z==0||r.Z==1?e.l.j:e.C;if(i=e.C<i?i:e.C,t(n<=e.l.o),n>i){var a=e.l.width,o=r.ca,s=r.tb+a*i,c=e.V,l=e.Ba+e.c*i,u=e.gc;t(e.ab==1),t(u[0].hc==3),ir(u[0],i,n,c,l,o,s),Pe(r,i,n,o,s,a)}e.C=e.Ma=n}function Ie(e,n,r,i,a,o,s){var c=e.$/i,l=e.$%i,u=e.m,d=e.s,f=r+e.$,p=f;a=r+i*a;var m=r+i*o,h=280+d.ua,g=e.Pb?c:16777216,_=0<d.ua?d.Wa:null,v=d.wc,y=f<m?Ae(d,l,c):null;t(e.C<o),t(m<=a);var b=!1;t:for(;;){for(;b||f<m;){var x=0;if(c>=g){var E=f-r;t((g=e).Pb),g.wd=g.m,g.xd=E,0<g.s.ua&&P(g.s.Wa,g.s.vb),g=c+ci}if(l&v||(y=Ae(d,l,c)),t(y!=null),y.Qb&&(n[f]=y.qb,b=!0),!b)if(T(u),y.jc){x=u,E=n;var D=f,O=y.pd[S(x)&qn-1];t(y.jc),256>O.g?(w(x,x.u+O.g),E[D]=O.value,x=0):(w(x,x.u+O.g-256),t(256<=O.value),x=O.value),x==0&&(b=!0)}else x=Oe(y.G[0],y.H[0],u);if(u.h)break;if(b||256>x){if(!b)if(y.nd)n[f]=(y.qb|x<<8)>>>0;else{if(T(u),b=Oe(y.G[1],y.H[1],u),T(u),E=Oe(y.G[2],y.H[2],u),D=Oe(y.G[3],y.H[3],u),u.h)break;n[f]=(D<<24|b<<16|x<<8|E)>>>0}if(b=!1,++f,++l>=i&&(l=0,++c,s!=null&&c<=o&&!(c%16)&&s(e,c),_!=null))for(;p<f;)x=n[p++],_.X[(506832829*x&4294967295)>>>_.Mb]=x}else if(280>x){if(x=Ee(x-256,u),E=Oe(y.G[4],y.H[4],u),T(u),E=De(i,E=Ee(E,u)),u.h)break;if(f-r<E||a-f<x)break t;for(D=0;D<x;++D)n[f+D]=n[f+D-E];for(f+=x,l+=x;l>=i;)l-=i,++c,s!=null&&c<=o&&!(c%16)&&s(e,c);if(t(f<=a),l&v&&(y=Ae(d,l,c)),_!=null)for(;p<f;)x=n[p++],_.X[(506832829*x&4294967295)>>>_.Mb]=x}else{if(!(x<h))break t;for(b=x-280,t(_!=null);p<f;)x=n[p++],_.X[(506832829*x&4294967295)>>>_.Mb]=x;x=f,t(!(b>>>(E=_).Xa)),n[x]=E.X[b],b=!0}b||t(u.h==C(u))}if(e.Pb&&u.h&&f<a)t(e.m.h),e.a=5,e.m=e.wd,e.$=e.xd,0<e.s.ua&&P(e.s.vb,e.s.Wa);else{if(u.h)break t;s?.(e,c>o?o:c),e.a=0,e.$=f-r}return 1}return e.a=3,0}function Le(e){t(e!=null),e.vc=null,e.yc=null,e.Ya=null;var n=e.Wa;n!=null&&(n.X=null),e.vb=null,t(e!=null)}function Re(){var t=new hn;return t==null?null:(t.a=0,t.xb=Si,pe(`Predictor`,`VP8LPredictors`),pe(`Predictor`,`VP8LPredictors_C`),pe(`PredictorAdd`,`VP8LPredictorsAdd`),pe(`PredictorAdd`,`VP8LPredictorsAdd_C`),tr=ie,sr=oe,cr=ce,lr=H,ur=le,dr=ue,fr=de,e.VP8LMapColor32b=rr,e.VP8LMapColor8b=ar,t)}function ze(e,n,r,s,c){var l=1,f=[e],m=[n],h=s.m,g=s.s,_=null,v=0;t:for(;;){if(r)for(;l&&y(h,1);){var b=f,x=m,C=s,E=1,D=C.m,O=C.gc[C.ab],k=y(D,2);if(C.Oc&1<<k)l=0;else{switch(C.Oc|=1<<k,O.hc=k,O.Ea=b[0],O.nc=x[0],O.K=[null],++C.ab,t(4>=C.ab),k){case 0:case 1:O.b=y(D,3)+2,E=ze(ee(O.Ea,O.b),ee(O.nc,O.b),0,C,O.K),O.K=O.K[0];break;case 3:var A,j=y(D,8)+1,M=16<j?0:4<j?1:2<j?2:3;if(b[0]=ee(O.Ea,M),O.b=M,A=E=ze(j,1,0,C,O.K)){var P,F=j,I=O,R=1<<(8>>I.b),z=a(R);if(z==null)A=0;else{var B=I.K[0],V=I.w;for(z[0]=I.K[0][0],P=1;P<1*F;++P)z[P]=L(B[V+P],z[P-1]);for(;P<4*R;++P)z[P]=0;I.K[0]=null,I.K[0]=z,A=1}}E=A;break;case 2:break;default:t(0)}l=E}}if(f=f[0],m=m[0],l&&y(h,1)&&!(l=1<=(v=y(h,4))&&11>=v)){s.a=3;break t}var te;if(te=l)e:{var ne,re,ie,ae=s,oe=f,se=m,ce=v,H=r,le=ae.m,ue=ae.s,de=[null],fe=1,pe=0,U=si[ce];r:for(;;){if(H&&y(le,1)){var me=y(le,3)+2,he=ee(oe,me),ge=ee(se,me),_e=he*ge;if(!ze(he,ge,0,ae,de))break r;for(de=de[0],ue.xc=me,ne=0;ne<_e;++ne){var ve=de[ne]>>8&65535;de[ne]=ve,ve>=fe&&(fe=ve+1)}}if(le.h)break r;for(re=0;5>re;++re){var ye=ri[re];!re&&0<ce&&(ye+=1<<ce),pe<ye&&(pe=ye)}var be=o(fe*U,d),xe=fe,Se=o(xe,p);if(Se==null)var Ce=null;else t(65536>=xe),Ce=Se;var we=a(pe);if(Ce==null||we==null||be==null){ae.a=1;break r}var Te=be;for(ne=ie=0;ne<fe;++ne){var Ee=Ce[ne],De=Ee.G,Oe=Ee.H,Ae=0,je=1,Me=0;for(re=0;5>re;++re){ye=ri[re],De[re]=Te,Oe[re]=ie,!re&&0<ce&&(ye+=1<<ce);n:{var Ne,Pe=ye,Fe=ae,Re=we,Be=Te,Ve=ie,He=0,Ue=Fe.m,We=y(Ue,1);if(i(Re,0,0,Pe),We){var Ge=y(Ue,1)+1,Ke=y(Ue,y(Ue,1)==0?1:8);Re[Ke]=1,Ge==2&&(Re[Ke=y(Ue,8)]=1);var qe=1}else{var Je=a(19),Ye=y(Ue,4)+4;if(19<Ye){Fe.a=3;var Xe=0;break n}for(Ne=0;Ne<Ye;++Ne)Je[ai[Ne]]=y(Ue,3);var Ze=void 0,Qe=void 0,$e=Fe,et=Je,tt=Pe,nt=Re,rt=0,it=$e.m,at=8,ot=o(128,d);i:for(;u(ot,0,7,et,19);){if(y(it,1)){if((Ze=2+y(it,2+2*y(it,3)))>tt)break i}else Ze=tt;for(Qe=0;Qe<tt&&Ze--;){T(it);var st=ot[0+(127&S(it))];w(it,it.u+st.g);var ct=st.value;if(16>ct)nt[Qe++]=ct,ct!=0&&(at=ct);else{var lt=ct==16,ut=ct-16,dt=ni[ut],ft=y(it,ti[ut])+dt;if(Qe+ft>tt)break i;for(var pt=lt?at:0;0<ft--;)nt[Qe++]=pt}}rt=1;break i}rt||($e.a=3),qe=rt}(qe&&=!Ue.h)&&(He=u(Be,Ve,8,Re,Pe)),qe&&He!=0?Xe=He:(Fe.a=3,Xe=0)}if(Xe==0)break r;if(je&&ii[re]==1&&(je=Te[ie].g==0),Ae+=Te[ie].g,ie+=Xe,3>=re){var mt,ht=we[0];for(mt=1;mt<ye;++mt)we[mt]>ht&&(ht=we[mt]);Me+=ht}}if(Ee.nd=je,Ee.Qb=0,je&&(Ee.qb=(De[3][Oe[3]+0].value<<24|De[1][Oe[1]+0].value<<16|De[2][Oe[2]+0].value)>>>0,Ae==0&&256>De[0][Oe[0]+0].value&&(Ee.Qb=1,Ee.qb+=De[0][Oe[0]+0].value<<8)),Ee.jc=!Ee.Qb&&6>Me,Ee.jc){var gt,_t=Ee;for(gt=0;gt<qn;++gt){var vt=gt,yt=_t.pd[vt],bt=_t.G[0][_t.H[0]+vt];256<=bt.value?(yt.g=bt.g+256,yt.value=bt.value):(yt.g=0,yt.value=0,vt>>=ke(bt,8,yt),vt>>=ke(_t.G[1][_t.H[1]+vt],16,yt),vt>>=ke(_t.G[2][_t.H[2]+vt],0,yt),ke(_t.G[3][_t.H[3]+vt],24,yt))}}}ue.vc=de,ue.Wb=fe,ue.Ya=Ce,ue.yc=be,te=1;break e}te=0}if(!(l=te)){s.a=3;break t}if(0<v){if(g.ua=1<<v,!N(g.Wa,v)){s.a=1,l=0;break t}}else g.ua=0;var xt=s,St=f,Ct=m,wt=xt.s,Tt=wt.xc;if(xt.c=St,xt.i=Ct,wt.md=ee(St,Tt),wt.wc=Tt==0?-1:(1<<Tt)-1,r){s.xb=xi;break t}if((_=a(f*m))==null){s.a=1,l=0;break t}l=(l=Ie(s,_,0,f,m,m,null))&&!h.h;break t}return l?(c==null?(t(_==null),t(r)):c[0]=_,s.$=0,r||Le(g)):Le(g),l}
vendor: 10,235 bytes, line 154
154function Be(e,n){var r=e.c*e.i,i=r+n+16*n;return t(e.c<=n),e.V=a(i),e.V==null?(e.Ta=null,e.Ua=0,e.a=1,0):(e.Ta=e.V,e.Ua=e.Ba+r+n,1)}function Ve(e,n){var r=e.C,i=n-r,a=e.V,o=e.Ba+e.c*r;for(t(n<=e.l.o);0<i;){var s=16<i?16:i,c=e.l.ma,l=e.l.width,u=l*s,d=c.ca,f=c.tb+l*r,p=e.Ta,m=e.Ua;je(e,s,a,o),Pr(p,m,d,f,u),Pe(c,r,r+s,d,f,l),i-=s,a+=s*e.c,r+=s}t(r==n),e.C=e.Ma=n}function He(){this.ub=this.yd=this.td=this.Rb=0}function Ue(){this.Kd=this.Ld=this.Ud=this.Td=this.i=this.c=0}function We(){this.Fb=this.Bb=this.Cb=0,this.Zb=a(4),this.Lb=a(4)}function Ge(){this.Yb=function(){var e=[];return function e(t,n,r){for(var i=r[n],a=0;a<i&&(t.push(r.length>n+1?[]:0),!(r.length<n+1));a++)e(t[a],n+1,r)}(e,0,[3,11]),e}()}function Ke(){this.jb=a(3),this.Wc=s([4,8],Ge),this.Xc=s([4,17],Ge)}function qe(){this.Pc=this.wb=this.Tb=this.zd=0,this.vd=new a(4),this.od=new a(4)}function Je(){this.ld=this.La=this.dd=this.tc=0}function Ye(){this.Na=this.la=0}function Xe(){this.Sc=[0,0],this.Eb=[0,0],this.Qc=[0,0],this.ia=this.lc=0}function Ze(){this.ad=a(384),this.Za=0,this.Ob=a(16),this.$b=this.Ad=this.ia=this.Gc=this.Hc=this.Dd=0}function Qe(){this.uc=this.M=this.Nb=0,this.wa=Array(new Je),this.Y=0,this.ya=Array(new Ze),this.aa=0,this.l=new nt}function $e(){this.y=a(16),this.f=a(8),this.ea=a(8)}function et(){this.cb=this.a=0,this.sc=``,this.m=new b,this.Od=new He,this.Kc=new Ue,this.ed=new qe,this.Qa=new We,this.Ic=this.$c=this.Aa=0,this.D=new Qe,this.Xb=this.Va=this.Hb=this.zb=this.yb=this.Ub=this.za=0,this.Jc=o(8,b),this.ia=0,this.pb=o(4,Xe),this.Pa=new Ke,this.Bd=this.kc=0,this.Ac=[],this.Bc=0,this.zc=[0,0,0,0],this.Gd=Array(new $e),this.Hd=0,this.rb=Array(new Ye),this.sb=0,this.wa=Array(new Je),this.Y=0,this.oc=[],this.pc=0,this.sa=[],this.ta=0,this.qa=[],this.ra=0,this.Ha=[],this.B=this.R=this.Ia=0,this.Ec=[],this.M=this.ja=this.Vb=this.Fc=0,this.ya=Array(new Ze),this.L=this.aa=0,this.gd=s([4,2],Je),this.ga=null,this.Fa=[],this.Cc=this.qc=this.P=0,this.Gb=[],this.Uc=0,this.mb=[],this.nb=0,this.rc=[],this.Ga=this.Vc=0}function tt(e,t){return 0>e?0:e>t?t:e}function nt(){this.T=this.U=this.ka=this.height=this.width=0,this.y=[],this.f=[],this.ea=[],this.Rc=this.fa=this.W=this.N=this.O=0,this.ma=`void`,this.put=`VP8IoPutHook`,this.ac=`VP8IoSetupHook`,this.bc=`VP8IoTeardownHook`,this.ha=this.Kb=0,this.data=[],this.hb=this.ib=this.da=this.o=this.j=this.va=this.v=this.Da=this.ob=this.w=0,this.F=[],this.J=0}function rt(){var e=new et;return e!=null&&(e.a=0,e.sc=`OK`,e.cb=0,e.Xb=0,ui||=st),e}function it(e,t,n){return e.a==0&&(e.a=t,e.sc=n,e.cb=0),0}function at(e,t,n){return 3<=n&&e[t+0]==157&&e[t+1]==1&&e[t+2]==42}function ot(e,n){if(e==null)return 0;if(e.a=0,e.sc=`OK`,n==null)return it(e,2,`null VP8Io passed to VP8GetHeaders()`);var r=n.data,a=n.w,o=n.ha;if(4>o)return it(e,7,`Truncated header.`);var s=r[a+0]|r[a+1]<<8|r[a+2]<<16,c=e.Od;if(c.Rb=!(1&s),c.td=s>>1&7,c.yd=s>>4&1,c.ub=s>>5,3<c.td)return it(e,3,`Incorrect keyframe parameters.`);if(!c.yd)return it(e,4,`Frame not displayable.`);a+=3,o-=3;var l=e.Kc;if(c.Rb){if(7>o)return it(e,7,`cannot parse picture header`);if(!at(r,a,o))return it(e,3,`Bad code word`);l.c=16383&(r[a+4]<<8|r[a+3]),l.Td=r[a+4]>>6,l.i=16383&(r[a+6]<<8|r[a+5]),l.Ud=r[a+6]>>6,a+=7,o-=7,e.za=l.c+15>>4,e.Ub=l.i+15>>4,n.width=l.c,n.height=l.i,n.Da=0,n.j=0,n.v=0,n.va=n.width,n.o=n.height,n.da=0,n.ib=n.width,n.hb=n.height,n.U=n.width,n.T=n.height,i((s=e.Pa).jb,0,255,s.jb.length),t((s=e.Qa)!=null),s.Cb=0,s.Bb=0,s.Fb=1,i(s.Zb,0,0,s.Zb.length),i(s.Lb,0,0,s.Lb)}if(c.ub>o)return it(e,7,`bad partition length`);m(s=e.m,r,a,c.ub),a+=c.ub,o-=c.ub,c.Rb&&(l.Ld=D(s),l.Kd=D(s)),l=e.Qa;var u,d=e.Pa;if(t(s!=null),t(l!=null),l.Cb=D(s),l.Cb){if(l.Bb=D(s),D(s)){for(l.Fb=D(s),u=0;4>u;++u)l.Zb[u]=D(s)?g(s,7):0;for(u=0;4>u;++u)l.Lb[u]=D(s)?g(s,6):0}if(l.Bb)for(u=0;3>u;++u)d.jb[u]=D(s)?h(s,8):255}else l.Bb=0;if(s.Ka)return it(e,3,`cannot parse segment header`);if((l=e.ed).zd=D(s),l.Tb=h(s,6),l.wb=h(s,3),l.Pc=D(s),l.Pc&&D(s)){for(d=0;4>d;++d)D(s)&&(l.vd[d]=g(s,6));for(d=0;4>d;++d)D(s)&&(l.od[d]=g(s,6))}if(e.L=l.Tb==0?0:l.zd?1:2,s.Ka)return it(e,3,`cannot parse filter header`);var f=o;if(o=u=a,a=u+f,l=f,e.Xb=(1<<h(e.m,2))-1,f<3*(d=e.Xb))r=7;else{for(u+=3*d,l-=3*d,f=0;f<d;++f){var p=r[o+0]|r[o+1]<<8|r[o+2]<<16;p>l&&(p=l),m(e.Jc[+f],r,u,p),u+=p,l-=p,o+=3}m(e.Jc[+d],r,u,l),r=u<a?0:5}if(r!=0)return it(e,r,`cannot parse partitions`);for(r=h(u=e.m,7),o=D(u)?g(u,4):0,a=D(u)?g(u,4):0,l=D(u)?g(u,4):0,d=D(u)?g(u,4):0,u=D(u)?g(u,4):0,f=e.Qa,p=0;4>p;++p){if(f.Cb){var _=f.Zb[p];f.Fb||(_+=r)}else{if(0<p){e.pb[p]=e.pb[0];continue}_=r}var v=e.pb[p];v.Sc[0]=li[tt(_+o,127)],v.Sc[1]=G[tt(_+0,127)],v.Eb[0]=2*li[tt(_+a,127)],v.Eb[1]=101581*G[tt(_+l,127)]>>16,8>v.Eb[1]&&(v.Eb[1]=8),v.Qc[0]=li[tt(_+d,117)],v.Qc[1]=G[tt(_+u,127)],v.lc=_+u}if(!c.Rb)return it(e,4,`Not a key frame.`);for(D(s),c=e.Pa,r=0;4>r;++r){for(o=0;8>o;++o)for(a=0;3>a;++a)for(l=0;11>l;++l)d=O(s,gi[r][o][a][l])?h(s,8):mi[r][o][a][l],c.Wc[r][o].Yb[a][l]=d;for(o=0;17>o;++o)c.Xc[r][o]=c.Wc[r][_i[o]]}return e.kc=D(s),e.kc&&(e.Bd=h(s,8)),e.cb=1}function st(e,t,n,r,i,a,o){var s=t[i].Yb[n];for(n=0;16>i;++i){if(!O(e,s[n+0]))return i;for(;!O(e,s[n+1]);)if(s=t[++i].Yb[0],n=0,i==16)return 16;var c=t[i+1].Yb;if(O(e,s[n+2])){var l=e,u=0;if(O(l,(f=s)[(d=n)+3]))if(O(l,f[d+6])){for(s=0,d=2*(u=O(l,f[d+8]))+(f=O(l,f[d+9+u])),u=0,f=di[d];f[s];++s)u+=u+O(l,f[s]);u+=3+(8<<d)}else O(l,f[d+7])?(u=7+2*O(l,165),u+=O(l,145)):u=5+O(l,159);else u=O(l,f[d+4])?3+O(l,f[d+5]):2;s=c[2]}else u=1,s=c[1];c=o+fi[i],0>(l=e).b&&E(l);var d,f=l.b,p=(d=l.Ca>>1)-(l.I>>f)>>31;--l.b,l.Ca+=p,l.Ca|=1,l.I-=(d+1&p)<<f,a[c]=((u^p)-p)*r[(0<i)+0]}return 16}function ct(e){var t=e.rb[e.sb-1];t.la=0,t.Na=0,i(e.zc,0,0,e.zc.length),e.ja=0}function lt(e,t,n,r,i){i=e[t+n+32*r]+(i>>3),e[t+n+32*r]=-256&i?0>i?0:255:i}function ut(e,t,n,r,i,a){lt(e,t,0,n,r+i),lt(e,t,1,n,r+a),lt(e,t,2,n,r-a),lt(e,t,3,n,r-i)}function dt(e){return(20091*e>>16)+e}function ft(e,t,n,r){var i,o=0,s=a(16);for(i=0;4>i;++i){var c=e[t+0]+e[t+8],l=e[t+0]-e[t+8],u=(35468*e[t+4]>>16)-dt(e[t+12]),d=dt(e[t+4])+(35468*e[t+12]>>16);s[o+0]=c+d,s[o+1]=l+u,s[o+2]=l-u,s[o+3]=c-d,o+=4,t++}for(i=o=0;4>i;++i)c=(e=s[o+0]+4)+s[o+8],l=e-s[o+8],u=(35468*s[o+4]>>16)-dt(s[o+12]),lt(n,r,0,0,c+(d=dt(s[o+4])+(35468*s[o+12]>>16))),lt(n,r,1,0,l+u),lt(n,r,2,0,l-u),lt(n,r,3,0,c-d),o++,r+=32}function pt(e,t,n,r){var i=e[t+0]+4,a=35468*e[t+4]>>16,o=dt(e[t+4]),s=35468*e[t+1]>>16;ut(n,r,0,i+o,e=dt(e[t+1]),s),ut(n,r,1,i+a,e,s),ut(n,r,2,i-a,e,s),ut(n,r,3,i-o,e,s)}function mt(e,t,n,r,i){ft(e,t,n,r),i&&ft(e,t+16,n,r+4)}function ht(e,t,n,r){mr(e,t+0,n,r,1),mr(e,t+32,n,r+128,1)}function gt(e,t,n,r){var i;for(e=e[t+0]+4,i=0;4>i;++i)for(t=0;4>t;++t)lt(n,r,t,i,e)}function _t(e,t,n,r){e[t+0]&&_r(e,t+0,n,r),e[t+16]&&_r(e,t+16,n,r+4),e[t+32]&&_r(e,t+32,n,r+128),e[t+48]&&_r(e,t+48,n,r+128+4)}function vt(e,t,n,r){var i,o=a(16);for(i=0;4>i;++i){var s=e[t+0+i]+e[t+12+i],c=e[t+4+i]+e[t+8+i],l=e[t+4+i]-e[t+8+i],u=e[t+0+i]-e[t+12+i];o[0+i]=s+c,o[8+i]=s-c,o[4+i]=u+l,o[12+i]=u-l}for(i=0;4>i;++i)s=(e=o[0+4*i]+3)+o[3+4*i],c=o[1+4*i]+o[2+4*i],l=o[1+4*i]-o[2+4*i],u=e-o[3+4*i],n[r+0]=s+c>>3,n[r+16]=u+l>>3,n[r+32]=s-c>>3,n[r+48]=u-l>>3,r+=64}function yt(e,t,n){var r,i=t-32,a=Hr,o=255-e[i-1];for(r=0;r<n;++r){var s,c=a,l=o+e[t-1];for(s=0;s<n;++s)e[t+s]=c[l+e[i+s]];t+=32}}function bt(e,t){yt(e,t,4)}function xt(e,t){yt(e,t,8)}function St(e,t){yt(e,t,16)}function Ct(e,t){var n;for(n=0;16>n;++n)r(e,t+32*n,e,t-32,16)}function wt(e,t){var n;for(n=16;0<n;--n)i(e,t,e[t-1],16),t+=32}function Tt(e,t,n){var r;for(r=0;16>r;++r)i(t,n+32*r,e,16)}function Et(e,t){var n,r=16;for(n=0;16>n;++n)r+=e[t-1+32*n]+e[t+n-32];Tt(r>>5,e,t)}function Dt(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t-1+32*n];Tt(r>>4,e,t)}function Ot(e,t){var n,r=8;for(n=0;16>n;++n)r+=e[t+n-32];Tt(r>>4,e,t)}function kt(e,t){Tt(128,e,t)}function At(e,t,n){return e+2*t+n+2>>2}function jt(e,t){var n,i=t-32;for(i=new Uint8Array([At(e[i-1],e[i+0],e[i+1]),At(e[i+0],e[i+1],e[i+2]),At(e[i+1],e[i+2],e[i+3]),At(e[i+2],e[i+3],e[i+4])]),n=0;4>n;++n)r(e,t+32*n,i,0,i.length)}function Mt(e,t){var n=e[t-1],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96];k(e,t+0,16843009*At(e[t-1-32],n,r)),k(e,t+32,16843009*At(n,r,i)),k(e,t+64,16843009*At(r,i,a)),k(e,t+96,16843009*At(i,a,a))}function Nt(e,t){var n,r=4;for(n=0;4>n;++n)r+=e[t+n-32]+e[t-1+32*n];for(r>>=3,n=0;4>n;++n)i(e,t+32*n,r,4)}function Pt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1-32],o=e[t+0-32],s=e[t+1-32],c=e[t+2-32],l=e[t+3-32];e[t+0+96]=At(r,i,e[t-1+96]),e[t+1+96]=e[t+0+64]=At(n,r,i),e[t+2+96]=e[t+1+64]=e[t+0+32]=At(a,n,r),e[t+3+96]=e[t+2+64]=e[t+1+32]=e[t+0+0]=At(o,a,n),e[t+3+64]=e[t+2+32]=e[t+1+0]=At(s,o,a),e[t+3+32]=e[t+2+0]=At(c,s,o),e[t+3+0]=At(l,c,s)}function Ft(e,t){var n=e[t+1-32],r=e[t+2-32],i=e[t+3-32],a=e[t+4-32],o=e[t+5-32],s=e[t+6-32],c=e[t+7-32];e[t+0+0]=At(e[t+0-32],n,r),e[t+1+0]=e[t+0+32]=At(n,r,i),e[t+2+0]=e[t+1+32]=e[t+0+64]=At(r,i,a),e[t+3+0]=e[t+2+32]=e[t+1+64]=e[t+0+96]=At(i,a,o),e[t+3+32]=e[t+2+64]=e[t+1+96]=At(a,o,s),e[t+3+64]=e[t+2+96]=At(o,s,c),e[t+3+96]=At(s,c,c)}function It(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1-32],o=e[t+0-32],s=e[t+1-32],c=e[t+2-32],l=e[t+3-32];e[t+0+0]=e[t+1+64]=a+o+1>>1,e[t+1+0]=e[t+2+64]=o+s+1>>1,e[t+2+0]=e[t+3+64]=s+c+1>>1,e[t+3+0]=c+l+1>>1,e[t+0+96]=At(i,r,n),e[t+0+64]=At(r,n,a),e[t+0+32]=e[t+1+96]=At(n,a,o),e[t+1+32]=e[t+2+96]=At(a,o,s),e[t+2+32]=e[t+3+96]=At(o,s,c),e[t+3+32]=At(s,c,l)}function Lt(e,t){var n=e[t+0-32],r=e[t+1-32],i=e[t+2-32],a=e[t+3-32],o=e[t+4-32],s=e[t+5-32],c=e[t+6-32],l=e[t+7-32];e[t+0+0]=n+r+1>>1,e[t+1+0]=e[t+0+64]=r+i+1>>1,e[t+2+0]=e[t+1+64]=i+a+1>>1,e[t+3+0]=e[t+2+64]=a+o+1>>1,e[t+0+32]=At(n,r,i),e[t+1+32]=e[t+0+96]=At(r,i,a),e[t+2+32]=e[t+1+96]=At(i,a,o),e[t+3+32]=e[t+2+96]=At(a,o,s),e[t+3+64]=At(o,s,c),e[t+3+96]=At(s,c,l)}function Rt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96];e[t+0+0]=n+r+1>>1,e[t+2+0]=e[t+0+32]=r+i+1>>1,e[t+2+32]=e[t+0+64]=i+a+1>>1,e[t+1+0]=At(n,r,i),e[t+3+0]=e[t+1+32]=At(r,i,a),e[t+3+32]=e[t+1+64]=At(i,a,a),e[t+3+64]=e[t+2+64]=e[t+0+96]=e[t+1+96]=e[t+2+96]=e[t+3+96]=a}function zt(e,t){var n=e[t-1+0],r=e[t-1+32],i=e[t-1+64],a=e[t-1+96],o=e[t-1-32],s=e[t+0-32],c=e[t+1-32],l=e[t+2-32];e[t+0+0]=e[t+2+32]=n+o+1>>1,e[t+0+32]=e[t+2+64]=r+n+1>>1,e[t+0+64]=e[t+2+96]=i+r+1>>1,e[t+0+96]=a+i+1>>
1541,e[t+3+0]=At(s,c,l),e[t+2+0]=At(o,s,c),e[t+1+0]=e[t+3+32]=At(n,o,s),e[t+1+32]=e[t+3+64]=At(r,n,o),e[t+1+64]=e[t+3+96]=At(i,r,n),e[t+1+96]=At(a,i,r)}function Bt(e,t){var n;for(n=0;8>n;++n)r(e,t+32*n,e,t-32,8)}function Vt(e,t){var n;for(n=0;8>n;++n)i(e,t,e[t-1],8),t+=32}function Ht(e,t,n){var r;for(r=0;8>r;++r)i(t,n+32*r,e,8)}function Ut(e,t){var n,r=8;for(n=0;8>n;++n)r+=e[t+n-32]+e[t-1+32*n];Ht(r>>4,e,t)}function Wt(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t+n-32];Ht(r>>3,e,t)}function Gt(e,t){var n,r=4;for(n=0;8>n;++n)r+=e[t-1+32*n];Ht(r>>3,e,t)}function Kt(e,t){Ht(128,e,t)}function qt(e,t,n){var r=e[t-n],i=e[t+0],a=3*(i-r)+Br[1020+e[t-2*n]-e[t+n]],o=Vr[112+(a+4>>3)];e[t-n]=Hr[255+r+Vr[112+(a+3>>3)]],e[t+0]=Hr[255+i-o]}function Jt(e,t,n,r){var i=e[t+0],a=e[t+n];return Ur[255+e[t-2*n]-e[t-n]]>r||Ur[255+a-i]>r}function Yt(e,t,n,r){return 4*Ur[255+e[t-n]-e[t+0]]+Ur[255+e[t-2*n]-e[t+n]]<=r}function Xt(e,t,n,r,i){var a=e[t-3*n],o=e[t-2*n],s=e[t-n],c=e[t+0],l=e[t+n],u=e[t+2*n],d=e[t+3*n];return 4*Ur[255+s-c]+Ur[255+o-l]>r?0:Ur[255+e[t-4*n]-a]<=i&&Ur[255+a-o]<=i&&Ur[255+o-s]<=i&&Ur[255+d-u]<=i&&Ur[255+u-l]<=i&&Ur[255+l-c]<=i}function W(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)Yt(e,t+r,n,i)&&qt(e,t+r,n)}function Zt(e,t,n,r){var i=2*r+1;for(r=0;16>r;++r)Yt(e,t+r*n,1,i)&&qt(e,t+r*n,1)}function Qt(e,t,n,r){var i;for(i=3;0<i;--i)W(e,t+=4*n,n,r)}function $t(e,t,n,r){var i;for(i=3;0<i;--i)Zt(e,t+=4,n,r)}function en(e,t,n,r,i,a,o,s){for(a=2*a+1;0<i--;){if(Xt(e,t,n,a,o))if(Jt(e,t,n,s))qt(e,t,n);else{var c=e,l=t,u=n,d=c[l-2*u],f=c[l-u],p=c[l+0],m=c[l+u],h=c[l+2*u],g=27*(v=Br[1020+3*(p-f)+Br[1020+d-m]])+63>>7,_=18*v+63>>7,v=9*v+63>>7;c[l-3*u]=Hr[255+c[l-3*u]+v],c[l-2*u]=Hr[255+d+_],c[l-u]=Hr[255+f+g],c[l+0]=Hr[255+p-g],c[l+u]=Hr[255+m-_],c[l+2*u]=Hr[255+h-v]}t+=r}}function tn(e,t,n,r,i,a,o,s){for(a=2*a+1;0<i--;){if(Xt(e,t,n,a,o))if(Jt(e,t,n,s))qt(e,t,n);else{var c=e,l=t,u=n,d=c[l-u],f=c[l+0],p=c[l+u],m=Vr[112+(4+(h=3*(f-d))>>3)],h=Vr[112+(h+3>>3)],g=m+1>>1;c[l-2*u]=Hr[255+c[l-2*u]+g],c[l-u]=Hr[255+d+h],c[l+0]=Hr[255+f-m],c[l+u]=Hr[255+p-g]}t+=r}}function nn(e,t,n,r,i,a){en(e,t,n,1,16,r,i,a)}function rn(e,t,n,r,i,a){en(e,t,1,n,16,r,i,a)}function an(e,t,n,r,i,a){var o;for(o=3;0<o;--o)tn(e,t+=4*n,n,1,16,r,i,a)}function on(e,t,n,r,i,a){var o;for(o=3;0<o;--o)tn(e,t+=4,1,n,16,r,i,a)}function sn(e,t,n,r,i,a,o,s){en(e,t,i,1,8,a,o,s),en(n,r,i,1,8,a,o,s)}function cn(e,t,n,r,i,a,o,s){en(e,t,1,i,8,a,o,s),en(n,r,1,i,8,a,o,s)}function ln(e,t,n,r,i,a,o,s){tn(e,t+4*i,i,1,8,a,o,s),tn(n,r+4*i,i,1,8,a,o,s)}function un(e,t,n,r,i,a,o,s){tn(e,t+4,1,i,8,a,o,s),tn(n,r+4,1,i,8,a,o,s)}function dn(){this.ba=new ge,this.ec=[],this.cc=[],this.Mc=[],this.Dc=this.Nc=this.dc=this.fc=0,this.Oa=new ve,this.memory=0,this.Ib=`OutputFunc`,this.Jb=`OutputAlphaFunc`,this.Nd=`OutputRowFunc`}function fn(){this.data=[],this.offset=this.kd=this.ha=this.w=0,this.na=[],this.xa=this.gb=this.Ja=this.Sa=this.P=0}function pn(){this.nc=this.Ea=this.b=this.hc=0,this.K=[],this.w=0}function mn(){this.ua=0,this.Wa=new F,this.vb=new F,this.md=this.xc=this.wc=0,this.vc=[],this.Wb=0,this.Ya=new p,this.yc=new d}function hn(){this.xb=this.a=0,this.l=new nt,this.ca=new ge,this.V=[],this.Ba=0,this.Ta=[],this.Ua=0,this.m=new x,this.Pb=0,this.wd=new x,this.Ma=this.$=this.C=this.i=this.c=this.xd=0,this.s=new mn,this.ab=0,this.gc=o(4,pn),this.Oc=0}function gn(){this.Lc=this.Z=this.$a=this.i=this.c=0,this.l=new nt,this.ic=0,this.ca=[],this.tb=0,this.qd=null,this.rd=0}function _n(e,t,n,r,i,a,o){for(e=e==null?0:e[t+0],t=0;t<o;++t)i[a+t]=e+n[r+t]&255,e=i[a+t]}function vn(e,t,n,r,i,a,o){var s;if(e==null)_n(null,null,n,r,i,a,o);else for(s=0;s<o;++s)i[a+s]=e[t+s]+n[r+s]&255}function yn(e,t,n,r,i,a,o){if(e==null)_n(null,null,n,r,i,a,o);else{var s,c=e[t+0],l=c,u=c;for(s=0;s<o;++s)l=u+(c=e[t+s])-l,u=n[r+s]+(-256&l?0>l?0:255:l)&255,l=c,i[a+s]=u}}function bn(e,n,i,o){var s=n.width,c=n.o;if(t(e!=null&&n!=null),0>i||0>=o||i+o>c)return null;if(!e.Cc){if(e.ga==null){var l;if(e.ga=new gn,(l=e.ga==null)||(l=n.width*n.o,t(e.Gb.length==0),e.Gb=a(l),e.Uc=0,e.Gb==null?l=0:(e.mb=e.Gb,e.nb=e.Uc,e.rc=null,l=1),l=!l),!l){l=e.ga;var u=e.Fa,d=e.P,f=e.qc,p=e.mb,m=e.nb,h=d+1,g=f-1,v=l.l;if(t(u!=null&&p!=null&&n!=null),Ci[0]=null,Ci[1]=_n,Ci[2]=vn,Ci[3]=yn,l.ca=p,l.tb=m,l.c=n.width,l.i=n.height,t(0<l.c&&0<l.i),1>=f)n=0;else if(l.$a=3&u[d+0],l.Z=u[d+0]>>2&3,l.Lc=u[d+0]>>4&3,d=u[d+0]>>6&3,0>l.$a||1<l.$a||4<=l.Z||1<l.Lc||d)n=0;else if(v.put=Ce,v.ac=Se,v.bc=we,v.ma=l,v.width=n.width,v.height=n.height,v.Da=n.Da,v.v=n.v,v.va=n.va,v.j=n.j,v.o=n.o,l.$a)t:{t(l.$a==1),n=Re();e:for(;;){if(n==null){n=0;break t}if(t(l!=null),l.mc=n,n.c=l.c,n.i=l.i,n.l=l.l,n.l.ma=l,n.l.width=l.c,n.l.height=l.i,n.a=0,_(n.m,u,h,g),!ze(l.c,l.i,1,n,null)||(n.ab==1&&n.gc[0].hc==3&&Ne(n.s)?(l.ic=1,u=n.c*n.i,n.Ta=null,n.Ua=0,n.V=a(u),n.Ba=0,n.V==null?(n.a=1,n=0):n=1):(l.ic=0,n=Be(n,l.c)),!n))break e;n=1;break t}l.mc=null,n=0}else n=g>=l.c*l.i;l=!n}if(l)return null;e.ga.Lc==1?o=c-i:e.Ga=0}t(e.ga!=null),t(i+o<=c);t:{if(n=(u=e.ga).c,c=u.l.o,u.$a==0){if(h=e.rc,g=e.Vc,v=e.Fa,d=e.P+1+i*n,f=e.mb,p=e.nb+i*n,t(d<=e.P+e.qc),u.Z!=0)for(t(Ci[u.Z]!=null),l=0;l<o;++l)Ci[u.Z](h,g,v,d,f,p,n),h=f,g=p,p+=n,d+=n;else for(l=0;l<o;++l)r(f,p,v,d,n),h=f,g=p,p+=n,d+=n;e.rc=h,e.Vc=g}else{if(t(u.mc!=null),n=i+o,t((l=u.mc)!=null),t(n<=l.i),l.C>=n)n=1;else if(u.ic||Tn(),u.ic){u=l.V,h=l.Ba,g=l.c;
vendor: 4,917 bytes, line 154
154var y=l.i,b=(v=1,d=l.$/g,f=l.$%g,p=l.m,m=l.s,l.$),x=g*y,S=g*n,w=m.wc,E=b<S?Ae(m,f,d):null;t(b<=x),t(n<=y),t(Ne(m));e:for(;;){for(;!p.h&&b<S;){if(f&w||(E=Ae(m,f,d)),t(E!=null),T(p),256>(y=Oe(E.G[0],E.H[0],p)))u[h+b]=y,++b,++f>=g&&(f=0,++d<=n&&!(d%16)&&Fe(l,d));else{if(!(280>y)){v=0;break e}y=Ee(y-256,p);var D,O=Oe(E.G[4],E.H[4],p);if(T(p),!(b>=(O=De(g,O=Ee(O,p)))&&x-b>=y)){v=0;break e}for(D=0;D<y;++D)u[h+b+D]=u[h+b+D-O];for(b+=y,f+=y;f>=g;)f-=g,++d<=n&&!(d%16)&&Fe(l,d);b<S&&f&w&&(E=Ae(m,f,d))}t(p.h==C(p))}Fe(l,d>n?n:d);break e}!v||p.h&&b<x?(v=0,l.a=p.h?5:3):l.$=b,n=v}else n=Ie(l,l.V,l.Ba,l.c,l.i,n,Ve);if(!n){o=0;break t}}i+o>=c&&(e.Cc=1),o=1}if(!o)return null;if(e.Cc&&((o=e.ga)!=null&&(o.mc=null),e.ga=null,0<e.Ga))return alert(`todo:WebPDequantizeLevels`),null}return e.nb+i*s}function xn(e,t,n,r,i,a){for(;0<i--;){var o,s=e,c=t+ +!!n,l=e,u=t+(n?0:3);for(o=0;o<r;++o){var d=l[u+4*o];d!=255&&(d*=32897,s[c+4*o+0]=s[c+4*o+0]*d>>23,s[c+4*o+1]=s[c+4*o+1]*d>>23,s[c+4*o+2]=s[c+4*o+2]*d>>23)}t+=a}}function Sn(e,t,n,r,i){for(;0<r--;){var a;for(a=0;a<n;++a){var o=e[t+2*a+0],s=15&(l=e[t+2*a+1]),c=4369*s,l=(240&l|l>>4)*c>>16;e[t+2*a+0]=(240&o|o>>4)*c>>16&240|(15&o|o<<4)*c>>16>>4&15,e[t+2*a+1]=240&l|s}t+=i}}function Cn(e,t,n,r,i,a,o,s){var c,l,u=255;for(l=0;l<i;++l){for(c=0;c<r;++c){var d=e[t+c];a[o+4*c]=d,u&=d}t+=n,o+=s}return u!=255}function wn(e,t,n,r,i){var a;for(a=0;a<i;++a)n[r+a]=e[t+a]>>8}function Tn(){jr=xn,Mr=Sn,Nr=Cn,Pr=wn}function En(n,r,i){e[n]=function(e,n,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y){var b,x=y-1>>1,S=s[c+0]|l[u+0]<<16,C=d[f+0]|p[m+0]<<16;t(e!=null);var w=3*S+C+131074>>2;for(r(e[n+0],255&w,w>>16,h,g),a!=null&&(w=3*C+S+131074>>2,r(a[o+0],255&w,w>>16,_,v)),b=1;b<=x;++b){var T=s[c+b]|l[u+b]<<16,E=d[f+b]|p[m+b]<<16,D=S+T+C+E+524296,O=D+2*(T+C)>>3;w=O+S>>1,S=(D=D+2*(S+E)>>3)+T>>1,r(e[n+2*b-1],255&w,w>>16,h,g+(2*b-1)*i),r(e[n+2*b-0],255&S,S>>16,h,g+(2*b-0)*i),a!=null&&(w=D+C>>1,S=O+E>>1,r(a[o+2*b-1],255&w,w>>16,_,v+(2*b-1)*i),r(a[o+2*b+0],255&S,S>>16,_,v+(2*b+0)*i)),S=T,C=E}1&y||(w=3*S+C+131074>>2,r(e[n+y-1],255&w,w>>16,h,g+(y-1)*i),a!=null&&(w=3*C+S+131074>>2,r(a[o+y-1],255&w,w>>16,_,v+(y-1)*i)))}}function Dn(){wi[Wr]=Ti,wi[Gr]=Di,wi[Kr]=Ei,wi[qr]=Oi,wi[Jr]=ki,wi[Yr]=Ai,wi[Xr]=ji,wi[Zr]=Di,wi[Qr]=Oi,wi[$r]=ki,wi[ei]=Ai}function On(e){return e&~Ii?0>e?0:255:e>>K}function kn(e,t){return On((19077*e>>8)+(26149*t>>8)-14234)}function An(e,t,n){return On((19077*e>>8)-(6419*t>>8)-(13320*n>>8)+8708)}function jn(e,t){return On((19077*e>>8)+(33050*t>>8)-17685)}function Mn(e,t,n,r,i){r[i+0]=kn(e,n),r[i+1]=An(e,t,n),r[i+2]=jn(e,t)}function Nn(e,t,n,r,i){r[i+0]=jn(e,t),r[i+1]=An(e,t,n),r[i+2]=kn(e,n)}function Pn(e,t,n,r,i){var a=An(e,t,n);t=a<<3&224|jn(e,t)>>3,r[i+0]=248&kn(e,n)|a>>5,r[i+1]=t}function Fn(e,t,n,r,i){var a=240&jn(e,t)|15;r[i+0]=240&kn(e,n)|An(e,t,n)>>4,r[i+1]=a}function In(e,t,n,r,i){r[i+0]=255,Mn(e,t,n,r,i+1)}function Ln(e,t,n,r,i){Nn(e,t,n,r,i),r[i+3]=255}function Rn(e,t,n,r,i){Mn(e,t,n,r,i),r[i+3]=255}function zn(t,n,r){e[t]=function(e,t,i,a,o,s,c,l,u){for(var d=l+(-2&u)*r;l!=d;)n(e[t+0],i[a+0],o[s+0],c,l),n(e[t+1],i[a+0],o[s+0],c,l+r),t+=2,++a,++s,l+=2*r;1&u&&n(e[t+0],i[a+0],o[s+0],c,l)}}function Bn(e,t,n){return n==0?e==0?t==0?6:5:t==0?4:0:n}function Vn(e,t,n,r,i){switch(e>>>30){case 3:mr(t,n,r,i,0);break;case 2:hr(t,n,r,i);break;case 1:_r(t,n,r,i)}}function Hn(e,t){var n,a,o=t.M,s=t.Nb,c=e.oc,l=e.pc+40,u=e.oc,d=e.pc+584,f=e.oc,p=e.pc+600;for(n=0;16>n;++n)c[l+32*n-1]=129;for(n=0;8>n;++n)u[d+32*n-1]=129,f[p+32*n-1]=129;for(0<o?c[l-1-32]=u[d-1-32]=f[p-1-32]=129:(i(c,l-32-1,127,21),i(u,d-32-1,127,9),i(f,p-32-1,127,9)),a=0;a<e.za;++a){var m=t.ya[t.aa+a];if(0<a){for(n=-1;16>n;++n)r(c,l+32*n-4,c,l+32*n+12,4);for(n=-1;8>n;++n)r(u,d+32*n-4,u,d+32*n+4,4),r(f,p+32*n-4,f,p+32*n+4,4)}var h=e.Gd,g=e.Hd+a,_=m.ad,v=m.Hc;if(0<o&&(r(c,l-32,h[g].y,0,16),r(u,d-32,h[g].f,0,8),r(f,p-32,h[g].ea,0,8)),m.Za){var y=c,b=l-32+16;for(0<o&&(a>=e.za-1?i(y,b,h[g].y[15],4):r(y,b,h[g+1].y,0,4)),n=0;4>n;n++)y[b+128+n]=y[b+256+n]=y[b+384+n]=y[b+0+n];for(n=0;16>n;++n,v<<=2)y=c,b=l+Wi[n],yi[m.Ob[n]](y,b),Vn(v,_,16*n,y,b)}else if(y=Bn(a,o,m.Ob[0]),vi[y](c,l),v!=0)for(n=0;16>n;++n,v<<=2)Vn(v,_,16*n,c,l+Wi[n]);for(n=m.Gc,y=Bn(a,o,m.Dd),bi[y](u,d),bi[y](f,p),v=_,y=u,b=d,255&(m=0|n)&&(170&m?gr(v,256,y,b):vr(v,256,y,b)),m=f,v=p,255&(n>>=8)&&(170&n?gr(_,320,m,v):vr(_,320,m,v)),o<e.Ub-1&&(r(h[g].y,0,c,l+480,16),r(h[g].f,0,u,d+224,8),r(h[g].ea,0,f,p+224,8)),n=8*s*e.B,h=e.sa,g=e.ta+16*a+16*s*e.R,_=e.qa,m=e.ra+8*a+n,v=e.Ha,y=e.Ia+8*a+n,n=0;16>n;++n)r(h,g+n*e.R,c,l+32*n,16);for(n=0;8>n;++n)r(_,m+n*e.B,u,d+32*n,8),r(v,y+n*e.B,f,p+32*n,8)}}function Un(e,r,i,a,o,s,c,l,u){var d=[0],f=[0],p=0,m=u==null?0:u.kd,h=u??new fn;if(e==null||12>i)return 7;h.data=e,h.w=r,h.ha=i,r=[r],i=[i],h.gb=[h.gb];t:{var g=r,v=i,y=h.gb;if(t(e!=null),t(v!=null),t(y!=null),y[0]=0,12<=v[0]&&!n(e,g[0],`RIFF`)){if(n(e,g[0]+8,`WEBP`)){y=3;break t}var b=M(e,g[0]+4);if(12>b||4294967286<b){y=3;break t}if(m&&b>
154v[0]-8){y=7;break t}y[0]=b,g[0]+=12,v[0]-=12}y=0}if(y!=0)return y;for(b=0<h.gb[0],i=i[0];;){t:{var S=e;v=r,y=i;var C=d,w=f,T=g=[0];if((O=p=[p])[0]=0,8>y[0])y=7;else{if(!n(S,v[0],`VP8X`)){if(M(S,v[0]+4)!=10){y=3;break t}if(18>y[0]){y=7;break t}var E=M(S,v[0]+8),D=1+j(S,v[0]+12);if(2147483648<=D*(S=1+j(S,v[0]+15))){y=3;break t}T!=null&&(T[0]=E),C!=null&&(C[0]=D),w!=null&&(w[0]=S),v[0]+=18,y[0]-=18,O[0]=1}y=0}}if(p=p[0],g=g[0],y!=0)return y;if(v=!!(2&g),!b&&p)return 3;if(s!=null&&(s[0]=!!(16&g)),c!=null&&(c[0]=v),l!=null&&(l[0]=0),c=d[0],g=f[0],p&&v&&u==null){y=0;break}if(4>i){y=7;break}if(b&&p||!b&&!p&&!n(e,r[0],`ALPH`)){i=[i],h.na=[h.na],h.P=[h.P],h.Sa=[h.Sa];t:{E=e,y=r,b=i;var O=h.gb;C=h.na,w=h.P,T=h.Sa,D=22,t(E!=null),t(b!=null),S=y[0];var k=b[0];for(t(C!=null),t(T!=null),C[0]=null,w[0]=null,T[0]=0;;){if(y[0]=S,b[0]=k,8>k){y=7;break t}var A=M(E,S+4);if(4294967286<A){y=3;break t}var N=8+A+1&-2;if(D+=N,0<O&&D>O){y=3;break t}if(!n(E,S,`VP8 `)||!n(E,S,`VP8L`)){y=0;break t}if(k[0]<N){y=7;break t}n(E,S,`ALPH`)||(C[0]=E,w[0]=S+8,T[0]=A),S+=N,k-=N}}if(i=i[0],h.na=h.na[0],h.P=h.P[0],h.Sa=h.Sa[0],y!=0)break}i=[i],h.Ja=[h.Ja],h.xa=[h.xa];t:if(O=e,y=r,b=i,C=h.gb[0],w=h.Ja,T=h.xa,E=y[0],S=!n(O,E,`VP8 `),D=!n(O,E,`VP8L`),t(O!=null),t(b!=null),t(w!=null),t(T!=null),8>b[0])y=7;else{if(S||D){if(O=M(O,E+4),12<=C&&O>C-12){y=3;break t}if(m&&O>b[0]-8){y=7;break t}w[0]=O,y[0]+=8,b[0]-=8,T[0]=D}else T[0]=5<=b[0]&&O[E+0]==47&&!(O[E+4]>>5),w[0]=b[0];y=0}if(i=i[0],h.Ja=h.Ja[0],h.xa=h.xa[0],r=r[0],y!=0)break;if(4294967286<h.Ja)return 3;if(l==null||v||(l[0]=h.xa?2:1),c=[c],g=[g],h.xa){if(5>i){y=7;break}l=c,m=g,v=s,e==null||5>i?e=0:5<=i&&e[r+0]==47&&!(e[r+4]>>5)?(b=[0],O=[0],C=[0],_(w=new x,e,r,i),Te(w,b,O,C)?(l!=null&&(l[0]=b[0]),m!=null&&(m[0]=O[0]),v!=null&&(v[0]=C[0]),e=1):e=0):e=0}else{if(10>i){y=7;break}l=g,e==null||10>i||!at(e,r+3,i-3)?e=0:(m=e[r+0]|e[r+1]<<8|e[r+2]<<16,v=16383&(e[r+7]<<8|e[r+6]),e=16383&(e[r+9]<<8|e[r+8]),1&m||3<(m>>1&7)||!(m>>4&1)||m>>5>=h.Ja||!v||!e?e=0:(c&&(c[0]=v),l&&(l[0]=e),e=1))}if(!e||(c=c[0],g=g[0],p&&(d[0]!=c||f[0]!=g)))return 3;u!=null&&(u[0]=h,u.offset=r-u.w,t(4294967286>r-u.w),t(u.offset==u.ha-i));break}return y==0||y==7&&p&&u==null?(s!=null&&(s[0]|=h.na!=null&&0<h.na.length),a!=null&&(a[0]=c),o!=null&&(o[0]=g),0):y}function Wn(e,t,n){var r=t.width,i=t.height,a=0,o=0,s=r,c=i;if(t.Da=e!=null&&0<e.Da,t.Da&&(s=e.cd,c=e.bd,a=e.v,o=e.j,11>n||(a&=-2,o&=-2),0>a||0>o||0>=s||0>=c||a+s>r||o+c>i))return 0;if(t.v=a,t.j=o,t.va=a+s,t.o=o+c,t.U=s,t.T=c,t.da=e!=null&&0<e.da,t.da){if(!I(s,c,n=[e.ib],a=[e.hb]))return 0;t.ib=n[0],t.hb=a[0]}return t.ob=e!=null&&e.ob,t.Kb=e==null||!e.Sd,t.da&&(t.ob=t.ib<3*r/4&&t.hb<3*i/4,t.Kb=0),1}function Gn(e){if(e==null)return 2;if(11>e.S){var t=e.f.RGBA;t.fb+=(e.height-1)*t.A,t.A=-t.A}else t=e.f.kb,e=e.height,t.O+=(e-1)*t.fa,t.fa=-t.fa,t.N+=(e-1>>1)*t.Ab,t.Ab=-t.Ab,t.W+=(e-1>>1)*t.Db,t.Db=-t.Db,t.F!=null&&(t.J+=(e-1)*t.lb,t.lb=-t.lb);return 0}function Kn(e,t,n,r){if(r==null||0>=e||0>=t)return 2;if(n!=null){if(n.Da){var i=n.cd,o=n.bd,s=-2&n.v,c=-2&n.j;if(0>s||0>c||0>=i||0>=o||s+i>e||c+o>t)return 2;e=i,t=o}if(n.da){if(!I(e,t,i=[n.ib],o=[n.hb]))return 2;e=i[0],t=o[0]}}r.width=e,r.height=t;t:{var l=r.width,u=r.height;if(e=r.S,0>=l||0>=u||!(e>=Wr&&13>e))e=2;else{if(0>=r.Rd&&r.sd==null){s=o=i=t=0;var d=(c=l*Ji[e])*u;if(11>e||(o=(u+1)/2*(t=(l+1)/2),e==12&&(s=(i=l)*u)),(u=a(d+2*o+s))==null){e=1;break t}r.sd=u,11>e?((l=r.f.RGBA).eb=u,l.fb=0,l.A=c,l.size=d):((l=r.f.kb).y=u,l.O=0,l.fa=c,l.Fd=d,l.f=u,l.N=0+d,l.Ab=t,l.Cd=o,l.ea=u,l.W=0+d+o,l.Db=t,l.Ed=o,e==12&&(l.F=u,l.J=0+d+2*o),l.Tc=s,l.lb=i)}if(t=1,i=r.S,o=r.width,s=r.height,i>=Wr&&13>i)if(11>i)e=r.f.RGBA,t&=(c=Math.abs(e.A))*(s-1)+o<=e.size,t&=c>=o*Ji[i],t&=e.eb!=null;else{e=r.f.kb,c=(o+1)/2,d=(s+1)/2,l=Math.abs(e.fa),u=Math.abs(e.Ab);var f=Math.abs(e.Db),p=Math.abs(e.lb),m=p*(s-1)+o;t&=l*(s-1)+o<=e.Fd,t&=u*(d-1)+c<=e.Cd,t=(t&=f*(d-1)+c<=e.Ed)&l>=o&u>=c&f>=c,t&=e.y!=null,t&=e.f!=null,t&=e.ea!=null,i==12&&(t&=p>=o,t&=m<=e.Tc,t&=e.F!=null)}else t=0;e=t?0:2}}return e!=0||n!=null&&n.fd&&(e=Gn(r)),e}var qn=64,Jn=[0,1,3,7,15,31,63,127,255,511,1023,2047,4095,8191,16383,32767,65535,131071,262143,524287,1048575,2097151,4194303,8388607,16777215],Yn=24,Xn=32,Zn=8,Qn=[0,0,1,1,2,2,2,2,3,3,3,3,3,3,3,3,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,
vendor: 4,727 bytes, line 154
1546,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7];R(`Predictor0`,`PredictorAdd0`),e.Predictor0=function(){return 4278190080},e.Predictor1=function(e){return e},e.Predictor2=function(e,t,n){return t[n+0]},e.Predictor3=function(e,t,n){return t[n+1]},e.Predictor4=function(e,t,n){return t[n-1]},e.Predictor5=function(e,t,n){return B(B(e,t[n+1]),t[n+0])},e.Predictor6=function(e,t,n){return B(e,t[n-1])},e.Predictor7=function(e,t,n){return B(e,t[n+0])},e.Predictor8=function(e,t,n){return B(t[n-1],t[n+0])},e.Predictor9=function(e,t,n){return B(t[n+0],t[n+1])},e.Predictor10=function(e,t,n){return B(B(e,t[n-1]),B(t[n+0],t[n+1]))},e.Predictor11=function(e,t,n){var r=t[n+0];return 0>=ne(r>>24&255,e>>24&255,(t=t[n-1])>>24&255)+ne(r>>16&255,e>>16&255,t>>16&255)+ne(r>>8&255,e>>8&255,t>>8&255)+ne(255&r,255&e,255&t)?r:e},e.Predictor12=function(e,t,n){var r=t[n+0];return(V((e>>24&255)+(r>>24&255)-((t=t[n-1])>>24&255))<<24|V((e>>16&255)+(r>>16&255)-(t>>16&255))<<16|V((e>>8&255)+(r>>8&255)-(t>>8&255))<<8|V((255&e)+(255&r)-(255&t)))>>>0},e.Predictor13=function(e,t,n){var r=t[n-1];return(te((e=B(e,t[n+0]))>>24&255,r>>24&255)<<24|te(e>>16&255,r>>16&255)<<16|te(e>>8&255,r>>8&255)<<8|te(255&e,255&r))>>>0};var $n=e.PredictorAdd0;e.PredictorAdd1=re,R(`Predictor2`,`PredictorAdd2`),R(`Predictor3`,`PredictorAdd3`),R(`Predictor4`,`PredictorAdd4`),R(`Predictor5`,`PredictorAdd5`),R(`Predictor6`,`PredictorAdd6`),R(`Predictor7`,`PredictorAdd7`),R(`Predictor8`,`PredictorAdd8`),R(`Predictor9`,`PredictorAdd9`),R(`Predictor10`,`PredictorAdd10`),R(`Predictor11`,`PredictorAdd11`),R(`Predictor12`,`PredictorAdd12`),R(`Predictor13`,`PredictorAdd13`);var er=e.PredictorAdd2;se(`ColorIndexInverseTransform`,`MapARGB`,`32b`,function(e){return e>>8&255},function(e){return e}),se(`VP8LColorIndexInverseTransformAlpha`,`MapAlpha`,`8b`,function(e){return e},function(e){return e>>8&255});var tr,nr=e.ColorIndexInverseTransform,rr=e.MapARGB,ir=e.VP8LColorIndexInverseTransformAlpha,ar=e.MapAlpha,or=e.VP8LPredictorsAdd=[];or.length=16,(e.VP8LPredictors=[]).length=16,(e.VP8LPredictorsAdd_C=[]).length=16,(e.VP8LPredictors_C=[]).length=16;var sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr,yr,br,xr,Sr,Cr,wr,Tr,Er,Dr,Or,kr,Ar,jr,Mr,Nr,Pr,Fr=a(511),Ir=a(2041),Lr=a(225),Rr=a(767),zr=0,Br=Ir,Vr=Lr,Hr=Rr,Ur=Fr,Wr=0,Gr=1,Kr=2,qr=3,Jr=4,Yr=5,Xr=6,Zr=7,Qr=8,$r=9,ei=10,ti=[2,3,7],ni=[3,3,11],ri=[280,256,256,256,40],ii=[0,1,1,1,0],ai=[17,18,0,1,2,3,4,5,16,6,7,8,9,10,11,12,13,14,15],oi=[24,7,23,25,40,6,39,41,22,26,38,42,56,5,55,57,21,27,54,58,37,43,72,4,71,73,20,28,53,59,70,74,36,44,88,69,75,52,60,3,87,89,19,29,86,90,35,45,68,76,85,91,51,61,104,2,103,105,18,30,102,106,34,46,84,92,67,77,101,107,50,62,120,1,119,121,83,93,17,31,100,108,66,78,118,122,33,47,117,123,49,63,99,109,82,94,0,116,124,65,79,16,32,98,110,48,115,125,81,95,64,114,126,97,111,80,113,127,96,112],si=[2954,2956,2958,2962,2970,2986,3018,3082,3212,3468,3980,5004],ci=8,li=[4,5,6,7,8,9,10,10,11,12,13,14,15,16,17,17,18,19,20,20,21,21,22,22,23,23,24,25,25,26,27,28,29,30,31,32,33,34,35,36,37,37,38,39,40,41,42,43,44,45,46,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,76,77,78,79,80,81,82,83,84,85,86,87,88,89,91,93,95,96,98,100,101,102,104,106,108,110,112,114,116,118,122,124,126,128,130,132,134,136,138,140,143,145,148,151,154,157],G=[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,102,104,106,108,110,112,114,116,119,122,125,128,131,134,137,140,143,146,149,152,155,158,161,164,167,170,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,234,239,245,249,254,259,264,269,274,279,284],ui=null,di=[[173,148,140,0],[176,155,140,135,0],[180,157,141,134,130,0],[254,254,243,230,196,177,153,140,133,130,129,0]],fi=[0,1,4,8,5,2,3,6,9,12,13,10,7,11,14,15],pi=[-0,1,-1,2,-2,3,4,6,-3,5,-4,-5,-6,7,-7,8,-8,-9],mi=[[[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]],[[253,136,254,255,228,219,128,128,128,128,128],[189,129,242,255,227,213,255,219,128,128,128],[106,126,227,252,214,209,255,255,128,128,128]],[[1,98,248,255,236,226,255,255,128,128,128],[181,133,238,254,221,234,255,154,128,128,128],[78,134,202,247,198,180,255,219,128,128,128]],[[1,185,249,25
1545,243,255,128,128,128,128,128],[184,150,247,255,236,224,128,128,128,128,128],[77,110,216,255,236,230,128,128,128,128,128]],[[1,101,251,255,241,255,128,128,128,128,128],[170,139,241,252,236,209,255,255,128,128,128],[37,116,196,243,228,255,255,255,128,128,128]],[[1,204,254,255,245,255,128,128,128,128,128],[207,160,250,255,238,128,128,128,128,128,128],[102,103,231,255,211,171,128,128,128,128,128]],[[1,152,252,255,240,255,128,128,128,128,128],[177,135,243,255,234,225,128,128,128,128,128],[80,129,211,255,194,224,128,128,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[246,1,255,128,128,128,128,128,128,128,128],[255,128,128,128,128,128,128,128,128,128,128]]],[[[198,35,237,223,193,187,162,160,145,155,62],[131,45,198,221,172,176,220,157,252,221,1],[68,47,146,208,149,167,221,162,255,223,128]],[[1,149,241,255,221,224,255,255,128,128,128],[184,141,234,253,222,220,255,199,128,128,128],[81,99,181,242,176,190,249,202,255,255,128]],[[1,129,232,253,214,197,242,196,255,255,128],[99,121,210,250,201,198,255,202,128,128,128],[23,91,163,242,170,187,247,210,255,255,128]],[[1,200,246,255,234,255,128,128,128,128,128],[109,178,241,255,231,245,255,255,128,128,128],[44,130,201,253,205,192,255,255,128,128,128]],[[1,132,239,251,219,209,255,165,128,128,128],[94,136,225,251,218,190,255,255,128,128,128],[22,100,174,245,186,161,255,199,128,128,128]],[[1,182,249,255,232,235,128,128,128,128,128],[124,143,241,255,227,234,128,128,128,128,128],[35,77,181,251,193,211,255,205,128,128,128]],[[1,157,247,255,236,231,255,255,128,128,128],[121,141,235,255,225,227,255,255,128,128,128],[45,99,188,251,195,217,255,224,128,128,128]],[[1,1,251,255,213,255,128,128,128,128,128],[203,1,248,255,255,128,128,128,128,128,128],[137,1,177,255,224,255,128,128,128,128,128]]],[[[253,9,248,251,207,208,255,192,128,128,128],[175,13,224,243,193,185,249,198,255,255,128],[73,17,171,221,161,179,236,167,255,234,128]],[[1,95,247,253,212,183,255,255,128,128,128],[239,90,244,250,211,209,255,255,128,128,128],[155,77,195,248,188,195,255,255,128,128,128]],[[1,24,239,251,218,219,255,205,128,128,128],[201,51,219,255,196,186,128,128,128,128,128],[69,46,190,239,201,218,255,228,128,128,128]],[[1,191,251,255,255,128,128,128,128,128,128],[223,165,249,255,213,255,128,128,128,128,128],[141,124,248,255,255,128,128,128,128,128,128]],[[1,16,248,255,255,128,128,128,128,128,128],[190,36,230,255,236,255,128,128,128,128,128],[149,1,255,128,128,128,128,128,128,128,128]],[[1,226,255,128,128,128,128,128,128,128,128],[247,192,255,128,128,128,128,128,128,128,128],[240,128,255,128,128,128,128,128,128,128,128]],[[1,134,252,255,255,128,128,128,128,128,128],[213,62,250,255,255,128,128,128,128,128,128],[55,93,255,128,128,128,128,128,128,128,128]],[[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128],[128,128,128,128,128,128,128,128,128,128,128]]],[[[202,24,213,235,186,191,220,160,240,175,255],[126,38,182,232,169,184,228,174,255,187,128],[61,46,138,219,151,178,240,170,255,216,128]],[[1,112,230,250,199,191,247,159,255,255,128],[166,109,228,252,211,215,255,174,128,128,128],[39,77,162,232,172,180,245,178,255,255,128]],[[1,52,220,246,198,199,249,220,255,255,128],[124,74,191,243,183,193,250,221,255,255,128],[24,71,130,219,154,170,243,182,255,255,128]],[[1,182,225,249,219,240,255,224,128,128,128],[149,150,226,252,216,205,255,171,128,128,128],[28,108,170,242,183,194,254,223,255,255,128]],[[1,81,230,252,204,203,255,192,128,128,128],[123,102,209,247,188,196,255,233,128,128,128],[20,95,153,243,164,173,255,203,128,128,128]],[[1,222,248,255,216,213,128,128,128,128,128],[168,175,246,252,235,205,255,255,128,128,128],[47,116,215,255,211,212,255,255,128,128,128]],[[1,121,236,253,212,214,255,255,128,128,128],[141,84,213,252,201,202,255,219,128,128,128],[42,80,160,240,162,185,255,205,128,128,128]],[[1,1,255,128,128,128,128,128,128,128,128],[244,1,255,128,128,128,128,128,128,128,128],[238,1,255,128,128,128,128,128,128,128,128]]]],hi=[[[231,120,48,89,115,113,120,152,112],[152,179,64,126,170,118,46,70,95],[175,69,143,80,85,82,72,155,103],[56,58,10,171,218,189,17,13,152],[114,26,17,163,44,195,21,10,173],[121,24,80,195,26,62,44,64,85],[144,71,10,38,171,213,144,34,26],[170,46,55,19,136,160,33,206,71],[63,20,8,114,114,208,12,9,226],[81,40,11,96,182,84,29,16,36]],[[134,183,89,137,98,101,106,165,148],[72,187,100,130,157,111,32,75,80],[66,102,167,99,74,62,40,234,128],[41,53,9,178,241,141,26,8,107],[74,43,26,146,73,166,49,23,157],[65,38,105,160,51,52,31,115,128],[104,79,12,27,217,255,87,17,7],[87,68,71,44,114,51,15,186,23],[47,41,14,110,182,183,21,17,194],[66,45,25,102,197,189,23,18,22]],[[88,88,147,150,42,46,45,196,205],[43,97,183,117,85,38,35,179,61],[39,53,200,87,26,21,43,232,171],[56,34,51,104,114,102,29,93,77],[39,28,85,171,58,165,90,98,64],[34,22,116,206,23,34,43,166,73],[107,54,32,26,51,1,81,43,31],[68,25,106,22,64,171,36,225,114],[34,19,21,102,132,188,16,76,124],[62,18,78,95,85,57,50,48,51]],[[193,101,35,159,215,111,89,46,111],[60,148,31,172,219,228,21,18,111],[112,113,77,85,179,255,38,120,114],[40,42,1,196,245,209,10,25,109],[88,43,29,140,166,213,37,43,154],[61,63,30,155,67,45,68,1,209],[100,80,8,43,154,1,51,26,71],[142,78,78,16,255,128,34,197,171],[41,40,5,102,211,183,4,1,221],[51,50,17,168,209,192,23,25,82]],[[138,31,36,171,27,166,38,44,229],[67,87,58,169,82,115,26,59,179],[63,59,90,180,59,166,93,73,154],[40,40,21,116,143,209,34,39,175],[47,15,16,183,34,223,49,45,183],[46,17,33,183,6,98,15,32,183],[57,46,22,24,128,1,54,17,37],[65,32,73,115,28,128,23,128,205],[40,3,9,115,51,192,18,6,223],[87,37,9,115,59,77,64,21,47]],[[104,55,44,218,9,54,53,130,226],[64,90,70,205,40,41,23,26,57],[54,57,112,184,5,41,38,166,213],[30,34,26,133,152,116,10,32,134],[39,19,53,221,26,114,32,73,255],[31,9,65,234,2,15,1,118,73],[75,32,12,51,192,255,160,43,51],[88,31,35,67,102,85,55,186,85],[56,21,23,111,59,205,45,37,192],[55,38,70,124,73,102,1,34,98]],[[125,98,42,88,104,85,117,175,82],[95,84,53,89,128,100,113,101,45],[75,79,123,47,51,128,81,171,1],[57,17,5,71,102,57,53,41,49],[38,33,13,121,57,73,26,1,85],[41,10,67,138,77,110,90,47,114],[115,21,2,10,102,255,166,23,6],[101,29,16,10,85,128,101,196,26],[57,18,10,102,102,213,34,20,43],[117,20,15,36,163,128,68,1,26]],[[102,61,71,37,34,53,31,243,192],[69,60,71,38,73,119,28,222,37],[68,45,128,34,1,47,11,245,171],[62,17,19,70,146,85,55,62,70],[37,43,37,154,100,163,85,160,1],[63,9,92,136,28,64,32,201,85],[75,15,9,9,64,255,184,119,16],[86,6,28,5,64,25
1545,25,248,1],[56,8,17,132,137,255,55,116,128],[58,15,20,82,135,57,26,121,40]],[[164,50,31,137,154,133,25,35,218],[51,103,44,131,131,123,31,6,158],[86,40,64,135,148,224,45,183,128],[22,26,17,131,240,154,14,1,209],[45,16,21,91,64,222,7,1,197],[56,21,39,155,60,138,23,102,213],[83,12,13,54,192,255,68,47,28],[85,26,85,85,128,128,32,146,171],[18,11,7,63,144,171,4,4,246],[35,27,10,146,174,171,12,26,128]],[[190,80,35,99,180,80,126,54,45],[85,126,47,87,176,51,41,20,32],[101,75,128,139,118,146,116,128,85],[56,41,15,176,236,85,37,9,62],[71,30,17,119,118,255,17,18,138],[101,38,60,138,55,70,43,26,142],[146,36,19,30,171,255,97,27,20],[138,45,61,62,219,1,81,188,64],[32,41,20,117,151,142,20,21,163],[112,19,12,61,195,128,48,4,24]]],gi=[[[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[176,246,255,255,255,255,255,255,255,255,255],[223,241,252,255,255,255,255,255,255,255,255],[249,253,253,255,255,255,255,255,255,255,255]],[[255,244,252,255,255,255,255,255,255,255,255],[234,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255]],[[255,246,254,255,255,255,255,255,255,255,255],[239,253,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[251,255,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[251,254,254,255,255,255,255,255,255,255,255],[254,255,254,255,255,255,255,255,255,255,255]],[[255,254,253,255,254,255,255,255,255,255,255],[250,255,254,255,254,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[217,255,255,255,255,255,255,255,255,255,255],[225,252,241,253,255,255,254,255,255,255,255],[234,250,241,250,253,255,253,254,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[223,254,254,255,255,255,255,255,255,255,255],[238,253,254,254,255,255,255,255,255,255,255]],[[255,248,254,255,255,255,255,255,255,255,255],[249,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,255,255,255,255,255,255,255,255,255],[247,254,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[252,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[253,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[186,251,250,255,255,255,255,255,255,255,255],[234,251,244,254,255,255,255,255,255,255,255],[251,251,243,253,254,255,254,255,255,255,255]],[[255,253,254,255,255,255,255,255,255,255,255],[236,253,254,255,255,255,255,255,255,255,255],[251,253,253,254,254,255,255,255,255,255,255]],[[255,254,254,255,255,255,255,255,255,255,255],[254,254,254,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,254,255,255,255,255,255,255,255,255,255],[254,254,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]],[[[248,255,255,255,255,255,255,255,255,255,255],[250,254,252,254,255,255,255,255,255,255,255],[248,254,249,253,255,255,255,255,255,255,255]],[[255,253,253,255,255,255,255,255,255,255,255],[246,253,253,255,255,255,255,255,255,255,255],[252,254,251,254,254,255,255,255,255,255,255]],[[255,254,252,25
1545,255,255,255,255,255,255,255],[248,254,253,255,255,255,255,255,255,255,255],[253,255,254,254,255,255,255,255,255,255,255]],[[255,251,254,255,255,255,255,255,255,255,255],[245,251,254,255,255,255,255,255,255,255,255],[253,253,254,255,255,255,255,255,255,255,255]],[[255,251,253,255,255,255,255,255,255,255,255],[252,253,254,255,255,255,255,255,255,255,255],[255,254,255,255,255,255,255,255,255,255,255]],[[255,252,255,255,255,255,255,255,255,255,255],[249,255,254,255,255,255,255,255,255,255,255],[255,255,254,255,255,255,255,255,255,255,255]],[[255,255,253,255,255,255,255,255,255,255,255],[250,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]],[[255,255,255,255,255,255,255,255,255,255,255],[254,255,255,255,255,255,255,255,255,255,255],[255,255,255,255,255,255,255,255,255,255,255]]]],_i=[0,1,2,3,6,4,5,6,6,6,6,6,6,6,6,7,0],vi=[],yi=[],bi=[],xi=1,Si=2,Ci=[],wi=[];En(`UpsampleRgbLinePair`,Mn,3),En(`UpsampleBgrLinePair`,Nn,3),En(`UpsampleRgbaLinePair`,Rn,4),En(`UpsampleBgraLinePair`,Ln,4),En(`UpsampleArgbLinePair`,In,4),En(`UpsampleRgba4444LinePair`,Fn,2),En(`UpsampleRgb565LinePair`,Pn,2);var Ti=e.UpsampleRgbLinePair,Ei=e.UpsampleBgrLinePair,Di=e.UpsampleRgbaLinePair,Oi=e.UpsampleBgraLinePair,ki=e.UpsampleArgbLinePair,Ai=e.UpsampleRgba4444LinePair,ji=e.UpsampleRgb565LinePair,Mi=16,Ni=1<<Mi-1,Pi=-227,Fi=482,K=6,Ii=(256<<K)-1,Li=0,Ri=a(256),zi=a(256),Bi=a(256),Vi=a(256),Hi=a(Fi-Pi),Ui=a(Fi-Pi);zn(`YuvToRgbRow`,Mn,3),zn(`YuvToBgrRow`,Nn,3),zn(`YuvToRgbaRow`,Rn,4),zn(`YuvToBgraRow`,Ln,4),zn(`YuvToArgbRow`,In,4),zn(`YuvToRgba4444Row`,Fn,2),zn(`YuvToRgb565Row`,Pn,2);var Wi=[0,4,8,12,128,132,136,140,256,260,264,268,384,388,392,396],Gi=[0,2,8],Ki=[8,7,6,4,4,2,2,2,1,1,1,1],qi=1;this.WebPDecodeRGBA=function(e,n,s,c,l){var u=Gr,d=new dn,f=new ge;d.ba=f,f.S=u,f.width=[f.width],f.height=[f.height];var p=f.width,m=f.height,h=new _e;if(h==null||e==null)var g=2;else t(h!=null),g=Un(e,n,s,h.width,h.height,h.Pd,h.Qd,h.format,null);if(g==0?(p!=null&&(p[0]=h.width[0]),m!=null&&(m[0]=h.height[0]),p=1):p=0,p){f.width=f.width[0],f.height=f.height[0],c!=null&&(c[0]=f.width),l!=null&&(l[0]=f.height);t:{if(c=new nt,(l=new fn).data=e,l.w=n,l.ha=s,l.kd=1,n=[0],t(l!=null),((e=Un(l.data,l.w,l.ha,null,null,null,n,null,l))==0||e==7)&&n[0]&&(e=4),(n=e)==0){if(t(d!=null),c.data=l.data,c.w=l.w+l.offset,c.ha=l.ha-l.offset,c.put=Ce,c.ac=Se,c.bc=we,c.ma=d,l.xa){if((e=Re())==null){d=1;break t}if(function(e,n){var r=[0],i=[0],a=[0];e:for(;;){if(e==null)return 0;if(n==null)return e.a=2,0;if(e.l=n,e.a=0,_(e.m,n.data,n.w,n.ha),!Te(e.m,r,i,a)){e.a=3;break e}if(e.xb=Si,n.width=r[0],n.height=i[0],!ze(r[0],i[0],1,e,null))break e;return 1}return t(e.a!=0),0}(e,c)){if(c=(n=Kn(c.width,c.height,d.Oa,d.ba))==0){e:{c=e;r:for(;;){if(c==null){c=0;break e}if(t(c.s.yc!=null),t(c.s.Ya!=null),t(0<c.s.Wb),t((s=c.l)!=null),t((l=s.ma)!=null),c.xb!=0){if(c.ca=l.ba,c.tb=l.tb,t(c.ca!=null),!Wn(l.Oa,s,qr)){c.a=2;break r}if(!Be(c,s.width)||s.da)break r;if((s.da||U(c.ca.S))&&Tn(),11>c.ca.S||(alert(`todo:WebPInitConvertARGBToYUV`),c.ca.f.kb.F!=null&&Tn()),c.Pb&&0<c.s.ua&&c.s.vb.X==null&&!N(c.s.vb,c.s.Wa.Xa)){c.a=1;break r}c.xb=0}if(!Ie(c,c.V,c.Ba,c.c,c.i,s.o,Me))break r;l.Dc=c.Ma,c=1;break e}t(c.a!=0),c=0}c=!c}c&&(n=e.a)}else n=e.a}else{if((e=new rt)==null){d=1;break t}if(e.Fa=l.na,e.P=l.P,e.qc=l.Sa,ot(e,c)){if((n=Kn(c.width,c.height,d.Oa,d.ba))==0){if(e.Aa=0,s=d.Oa,t((l=e)!=null),s!=null){if(0<(p=0>(p=s.Md)?0:100<p?255:255*p/100)){for(m=h=0;4>m;++m)12>(g=l.pb[m]).lc&&(g.ia=p*Ki[0>g.lc?0:g.lc]>>3),h|=g.ia;h&&(alert(`todo:VP8InitRandom`),l.ia=1)}l.Ga=s.Id,100<l.Ga?l.Ga=100:0>l.Ga&&(l.Ga=0)}(function(e,n){if(e==null)return 0;if(n==null)return it(e,2,`NULL VP8Io parameter in VP8Decode().`);if(!e.cb&&!ot(e,n))return 0;if(t(e.cb),n.ac==null||n.ac(n)){n.ob&&(e.L=0);var s=Gi[e.L];if(e.L==2?(e.yb=0,e.zb=0):(e.yb=n.v-s>>4,e.zb=n.j-s>>4,0>e.yb&&(e.yb=0),0>e.zb&&(e.zb=0)),e.Va=n.o+15+s>>4,e.Hb=n.va+15+s>>4,e.Hb>e.za&&(e.Hb=e.za),e.Va>e.Ub&&(e.Va=e.Ub),0<e.L){var c=e.ed;for(s=0;4>s;++s){var l;if(e.Qa.Cb){var u=e.Qa.Lb[s];e.Qa.Fb||(u+=c.Tb)}else u=c.Tb;for(l=0;1>=l;++l){var d=e.gd[s][l],f=u;if(c.Pc&&(f+=c.vd[0],l&&(f+=c.od[0])),0<(f=0>f?0:63<f?63:f)){var p=f;0<c.wb&&(p=4<c.wb?p>>2:p>>1)>9-c.wb&&(p=9-c.wb),1>p&&(p=1),d.dd=p,d.tc=2*f+p,d.ld=40<=f?2:+(15<=f)}else d.tc=0;d.La=l}}}s=0}else it(e,6,`Frame setup failed`),s=e.a;if(s=s==0){if(s){e.$c=0,0<e.Aa||(e.Ic=qi);e:{s=e.Ic,c=4*(p=e.za);var m=32*p,h=p+1,g=0<e.L?p*(0<e.Aa?2:1):0,_=(e.Aa==2?2:1)*p;if((d=c+832+(l=3*(16*s+Gi[e.L])/2*m)+(u=e.Fa!=null&&0<e.Fa.length?e.Kc.c*e.Kc.i:0))!=d)s=0;else{if(d>e.Vb){if(e.Vb=0,e.Ec=a(d),e.Fc=0,e.Ec==null){s=it(e,1,`no memory during frame initialization.`);break e}e.Vb=d}
vendor: 7,295 bytes, line 154
154d=e.Ec,f=e.Fc,e.Ac=d,e.Bc=f,f+=c,e.Gd=o(m,$e),e.Hd=0,e.rb=o(h+1,Ye),e.sb=1,e.wa=g?o(g,Je):null,e.Y=0,e.D.Nb=0,e.D.wa=e.wa,e.D.Y=e.Y,0<e.Aa&&(e.D.Y+=p),t(!0),e.oc=d,e.pc=f,f+=832,e.ya=o(_,Ze),e.aa=0,e.D.ya=e.ya,e.D.aa=e.aa,e.Aa==2&&(e.D.aa+=p),e.R=16*p,e.B=8*p,p=(m=Gi[e.L])*e.R,m=m/2*e.B,e.sa=d,e.ta=f+p,e.qa=e.sa,e.ra=e.ta+16*s*e.R+m,e.Ha=e.qa,e.Ia=e.ra+8*s*e.B+m,e.$c=0,f+=l,e.mb=u?d:null,e.nb=u?f:null,t(f+u<=e.Fc+e.Vb),ct(e),i(e.Ac,e.Bc,0,c),s=1}}if(s){if(n.ka=0,n.y=e.sa,n.O=e.ta,n.f=e.qa,n.N=e.ra,n.ea=e.Ha,n.Vd=e.Ia,n.fa=e.R,n.Rc=e.B,n.F=null,n.J=0,!zr){for(s=-255;255>=s;++s)Fr[255+s]=0>s?-s:s;for(s=-1020;1020>=s;++s)Ir[1020+s]=-128>s?-128:127<s?127:s;for(s=-112;112>=s;++s)Lr[112+s]=-16>s?-16:15<s?15:s;for(s=-255;510>=s;++s)Rr[255+s]=0>s?0:255<s?255:s;zr=1}pr=vt,mr=mt,gr=ht,_r=gt,vr=_t,hr=pt,yr=nn,br=rn,xr=sn,Sr=cn,Cr=an,wr=on,Tr=ln,Er=un,Dr=W,Or=Zt,kr=Qt,Ar=$t,yi[0]=Nt,yi[1]=bt,yi[2]=jt,yi[3]=Mt,yi[4]=Pt,yi[5]=It,yi[6]=Ft,yi[7]=Lt,yi[8]=zt,yi[9]=Rt,vi[0]=Et,vi[1]=St,vi[2]=Ct,vi[3]=wt,vi[4]=Dt,vi[5]=Ot,vi[6]=kt,bi[0]=Ut,bi[1]=xt,bi[2]=Bt,bi[3]=Vt,bi[4]=Gt,bi[5]=Wt,bi[6]=Kt,s=1}else s=0}s&&=function(e,n){for(e.M=0;e.M<e.Va;++e.M){var o,s=e.Jc[e.M&e.Xb],c=e.m,l=e;for(o=0;o<l.za;++o){var u=c,d=l,f=d.Ac,p=d.Bc+4*o,m=d.zc,h=d.ya[d.aa+o];if(d.Qa.Bb?h.$b=O(u,d.Pa.jb[0])?2+O(u,d.Pa.jb[2]):O(u,d.Pa.jb[1]):h.$b=0,d.kc&&(h.Ad=O(u,d.Bd)),h.Za=!O(u,145)+0,h.Za){var g=h.Ob,_=0;for(d=0;4>d;++d){var v,y=m[0+d];for(v=0;4>v;++v){y=hi[f[p+v]][y];for(var b=pi[O(u,y[0])];0<b;)b=pi[2*b+O(u,y[b])];y=-b,f[p+v]=y}r(g,_,f,p,4),_+=4,m[0+d]=y}}else y=O(u,156)?O(u,128)?1:3:O(u,163)?2:0,h.Ob[0]=y,i(f,p,y,4),i(m,0,y,4);h.Dd=O(u,142)?O(u,114)?O(u,183)?1:3:2:0}if(l.m.Ka)return it(e,7,`Premature end-of-partition0 encountered.`);for(;e.ja<e.za;++e.ja){if(l=s,u=(c=e).rb[c.sb-1],f=c.rb[c.sb+c.ja],o=c.ya[c.aa+c.ja],p=c.kc?o.Ad:0)u.la=f.la=0,o.Za||(u.Na=f.Na=0),o.Hc=0,o.Gc=0,o.ia=0;else{var x,S;if(u=f,f=l,p=c.Pa.Xc,m=c.ya[c.aa+c.ja],h=c.pb[m.$b],d=m.ad,g=0,_=c.rb[c.sb-1],y=v=0,i(d,g,0,384),m.Za)var C=0,w=p[3];else{b=a(16);var T=u.Na+_.Na;if(T=ui(f,p[1],T,h.Eb,0,b,0),u.Na=_.Na=(0<T)+0,1<T)pr(b,0,d,g);else{var E=b[0]+3>>3;for(b=0;256>b;b+=16)d[g+b]=E}C=1,w=p[0]}var D=15&u.la,k=15&_.la;for(b=0;4>b;++b){var A=1&k;for(E=S=0;4>E;++E)D=D>>1|(A=(T=ui(f,w,T=A+(1&D),h.Sc,C,d,g))>C)<<7,S=S<<2|(3<T?3:1<T?2:d[g+0]!=0),g+=16;D>>=4,k=k>>1|A<<7,v=(v<<8|S)>>>0}for(w=D,C=k>>4,x=0;4>x;x+=2){for(S=0,D=u.la>>4+x,k=_.la>>4+x,b=0;2>b;++b){for(A=1&k,E=0;2>E;++E)T=A+(1&D),D=D>>1|(A=0<(T=ui(f,p[2],T,h.Qc,0,d,g)))<<3,S=S<<2|(3<T?3:1<T?2:d[g+0]!=0),g+=16;D>>=2,k=k>>1|A<<5}y|=S<<4*x,w|=D<<4<<x,C|=(240&k)<<x}u.la=w,_.la=C,m.Hc=v,m.Gc=y,m.ia=43690&y?0:h.ia,p=!(v|y)}if(0<c.L&&(c.wa[c.Y+c.ja]=c.gd[o.$b][o.Za],c.wa[c.Y+c.ja].La|=!p),l.Ka)return it(e,7,`Premature end-of-file encountered.`)}if(ct(e),c=n,l=1,o=(s=e).D,u=0<s.L&&s.M>=s.zb&&s.M<=s.Va,s.Aa==0)e:{if(o.M=s.M,o.uc=u,Hn(s,o),l=1,o=(S=s.D).Nb,u=(y=Gi[s.L])*s.R,f=y/2*s.B,b=16*o*s.R,E=8*o*s.B,p=s.sa,m=s.ta-u+b,h=s.qa,d=s.ra-f+E,g=s.Ha,_=s.Ia-f+E,k=(D=S.M)==0,v=D>=s.Va-1,s.Aa==2&&Hn(s,S),S.uc)for(A=(T=s).D.M,t(T.D.uc),S=T.yb;S<T.Hb;++S){C=S,w=A;var j=(M=(B=T).D).Nb;x=B.R;var M=M.wa[M.Y+C],N=B.sa,P=B.ta+16*j*x+16*C,F=M.dd,I=M.tc;if(I!=0)if(t(3<=I),B.L==1)0<C&&Or(N,P,x,I+4),M.La&&Ar(N,P,x,I),0<w&&Dr(N,P,x,I+4),M.La&&kr(N,P,x,I);else{var ee=B.B,L=B.qa,R=B.ra+8*j*ee+8*C,z=B.Ha,B=B.Ia+8*j*ee+8*C;j=M.ld,0<C&&(br(N,P,x,I+4,F,j),Sr(L,R,z,B,ee,I+4,F,j)),M.La&&(wr(N,P,x,I,F,j),Er(L,R,z,B,ee,I,F,j)),0<w&&(yr(N,P,x,I+4,F,j),xr(L,R,z,B,ee,I+4,F,j)),M.La&&(Cr(N,P,x,I,F,j),Tr(L,R,z,B,ee,I,F,j))}}if(s.ia&&alert(`todo:DitherRow`),c.put!=null){if(S=16*D,D=16*(D+1),k?(c.y=s.sa,c.O=s.ta+b,c.f=s.qa,c.N=s.ra+E,c.ea=s.Ha,c.W=s.Ia+E):(S-=y,c.y=p,c.O=m,c.f=h,c.N=d,c.ea=g,c.W=_),v||(D-=y),D>c.o&&(D=c.o),c.F=null,c.J=null,s.Fa!=null&&0<s.Fa.length&&S<D&&(c.J=bn(s,c,S,D-S),c.F=s.mb,c.F==null&&c.F.length==0)){l=it(s,3,`Could not decode alpha data.`);break e}S<c.j&&(y=c.j-S,S=c.j,t(!(1&y)),c.O+=s.R*y,c.N+=s.B*(y>>1),c.W+=s.B*(y>>1),c.F!=null&&(c.J+=c.width*y)),S<D&&(c.O+=c.v,c.N+=c.v>>1,c.W+=c.v>>1,c.F!=null&&(c.J+=c.v),c.ka=S-c.j,c.U=c.va-c.v,c.T=D-S,l=c.put(c))}o+1!=s.Ic||v||(r(s.sa,s.ta-u,p,m+16*s.R,u),r(s.qa,s.ra-f,h,d+8*s.B,f),r(s.Ha,s.Ia-f,g,_+8*s.B,f))}if(!l)return it(e,6,`Output aborted.`)}return 1}(e,n),n.bc!=null&&n.bc(n),s&=1}return s?(e.cb=0,s):0})(e,c)||(n=e.a)}}else n=e.a}n==0&&d.Oa!=null&&d.Oa.fd&&(n=Gn(d.ba))}d=n}u=d==0?11>u?f.f.RGBA.eb:f.f.kb.y:null}else u=null;return u};var Ji=[3,4,3,4,4,2,2,4,4,4,2,1,1]};function l(e,t){for(var n=``,r=0;r<4;r++)n+=String.fromCharCode(e[t++]);return n}function u(e,t){return e[t+0]|e[t+1]<<8}function d(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16)>>>0}function f(e,t){return(e[t+0]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}new c;var p=[0],m=[0],h=[],g=new c,_=e,v=function(e,t){var n={},r=0,i=!1,a=0,o=0;if(n.frames=[],!function(e,t){for(var n=0;n<4;n++)if(e[t+n]!=`RIFF`.charCodeAt(n))return!0;return!1}(e,t)){for(f(e,t+=4),t+=8;t<e.length;){var s=l(e,t),c=f(e,t+=4);t+=4;var p=c+(1&c);switch(s){case`VP8 `:case`VP8L`:n.frames[r]===void 0&&(n.frames[r]={}),(g=n.frames[r]).src_off=i?o:t-8,g.src_size=a+c+8,r++,i&&(i=!1,a=0,o=0);break;case`VP8X`:(g=n.header={}).feature_flags=e[t];var m=t+4;g.canvas_width=1+d(e,m),m+=3,g.canvas_height=1+d(e,m),m+=3;break;case`ALPH`:i=!0,a=p+8,o=t-8;break;case`ANIM`:(g=n.header).bgcolor=f(e,t),m=t+4,g.loop_count=u(e,m),m+=2;break;case`ANMF`:var h,g;(g=n.frames[r]={}).offset_x=2*d(e,t),t+=3,g.offset_y=2*d(e,t),t+=3,g.width=1+d(e,t),t+=3,g.height=1+d(e,t),t+=3,g.duration=d(e,t),t+=3,h=e[t++],g.dispose=1&h,g.blend=h>>1&1}s!=`ANMF`&&(t+=p)}return n}}(_,0);v.response=_,v.rgbaoutput=!0,v.dataurl=!1;var y=v.header?v.header:null,b=v.frames?v.frames:null;if(y){y.loop_counter=y.loop_count,p=[y.canvas_height],m=[y.canvas_width];for(var x=0;x<b.length&&b[x].blend!=0;x++);}var S=b[0],C=g.WebPDecodeRGBA(_,S.src_off,S.src_size,m,p);S.rgba=C,S.imgwidth=m[0],S.imgheight=p[0];for(var w=0;w<m[0]*p[0]*4;w++)h[w]=C[w];return this.width=m,this.height=p,this.data=h,this}function u$(){var e,t=this.internal.__metadata__.metadata,n=unescape(encodeURIComponent(t));e=this.internal.__metadata__.rawXml?n:`<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><rdf:Description rdf:about="" xmlns:jspdf="`+this.internal.__metadata__.namespaceUri+`"><jspdf:metadata>`+n.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`).replace(/'/g,`'`)+`</jspdf:metadata></rdf:Description></rdf:RDF></x:xmpmeta>`,this.internal.__metadata__.metadataObjectNumber=this.internal.newObject(),this.internal.write(`<< /Type /Metadata /Subtype /XML /Length `+e.length+` >>`),this.internal.write(`stream`),this.internal.write(e),this.internal.write(`endstream`),this.internal.write(`endobj`)}function d$(){this.internal.__metadata__.metadataObjectNumber&&this.internal.write(`/Metadata `+this.internal.__metadata__.metadataObjectNumber+` 0 R`)}(function(e){var t,n,r,i,a,o,s,c,l,u=function(e){return e||={},this.isStrokeTransparent=e.isStrokeTransparent||!1,this.strokeOpacity=e.strokeOpacity||1,this.strokeStyle=e.strokeStyle||`#000000`,this.fillStyle=e.fillStyle||`#000000`,this.isFillTransparent=e.isFillTransparent||!1,this.fillOpacity=e.fillOpacity||1,this.font=e.font||`10px sans-serif`,this.textBaseline=e.textBaseline||`alph
154abetic`,this.textAlign=e.textAlign||`left`,this.lineWidth=e.lineWidth||1,this.lineJoin=e.lineJoin||`miter`,this.lineCap=e.lineCap||`butt`,this.path=e.path||[],this.transform=e.transform===void 0?new c:e.transform.clone(),this.globalCompositeOperation=e.globalCompositeOperation||`normal`,this.globalAlpha=e.globalAlpha||1,this.clip_path=e.clip_path||[],this.currentPoint=e.currentPoint||new o,this.miterLimit=e.miterLimit||10,this.lastPoint=e.lastPoint||new o,this.lineDashOffset=e.lineDashOffset||0,this.lineDash=e.lineDash||[],this.margin=e.margin||[0,0,0,0],this.prevPageLastElemOffset=e.prevPageLastElemOffset||0,this.ignoreClearRect=typeof e.ignoreClearRect!=`boolean`||e.ignoreClearRect,this};e.events.push([`initialized`,function(){this.context2d=new d(this),t=this.internal.f2,n=this.internal.getCoordinateString,r=this.internal.getVerticalCoordinateString,i=this.internal.getHorizontalCoordinate,a=this.internal.getVerticalCoordinate,o=this.internal.Point,s=this.internal.Rectangle,c=this.internal.Matrix,l=new u}]);var d=function(e){Object.defineProperty(this,"canvas",{get:function(){return{parentNode:!1,style:!1}}});var t=e;Object.defineProperty(this,"pdf",{get:function(){return t}});var n=!1;Object.defineProperty(this,"pageWrapXEnabled",{get:function(){return n},set:function(e){n=!!e}});var r=!1;Object.defineProperty(this,"pageWrapYEnabled",{get:function(){return r},set:function(e){r=!!e}});var i=0;Object.defineProperty(this,"posX",{get:function(){return i},set:function(e){isNaN(e)||(i=e)}});var a=0;Object.defineProperty(this,"posY",{get:function(){return a}
154,set:function(e){isNaN(e)||(a=e)}}),Object.defineProperty(this,"margin",{get:function(){return l.margin},set:function(e){var t;typeof e==`number`?t=[e,e,e,e]:((t=[,,,,])[0]=e[0],t[1]=e.length>=2?e[1]:t[0],t[2]=e.length>=3?e[2]:t[0],t[3]=e.length>=4?e[3]:t[1]),l.margin=t}});var o=!1;Object.defineProperty(this,"autoPaging",{get:function(){return o},set:function(e){o=e}});var s=0;Object.defineProperty(this,"lastBreak",{get:function(){return s},set:function(e){s=e}});var c=[];Object.defineProperty(this,"pageBreaks",{get:function(){return c},set:function(e){c=e}}),Object.defineProperty(this,"ctx",{get:function(){return l},set:function(e){e instanceof u&&(l=e)}}),Object.defineProperty(this,"path",{get:function(){return l.path},set:function(e){l.path=e}});var d=[];Object.defineProperty(this,"ctxStack",{get:function(){return d},set:function(e){d=e}}),Object.defineProperty(this,"fillStyle",{get:function(){return this.ctx.fillStyle},set:function(e){var t=f(e);this.ctx.fillStyle=t.style,this.ctx.isFillTransparent=t.a===0,this.ctx.fillOpacity=t.a,this.pdf.setFillColor(t.r,t.g,t.b,{a:t.a}),this.pdf.setTextColor(t.r,t.g,t.b,{a:t.a})}}),Object.defineProperty(this,"strokeStyle",{get:function(){return this.ctx.strokeStyle},set:function(e){var t=f(e);this.ctx.strokeStyle=t.style,this.ctx.isStrokeTransparent=t.a===0,this.ctx.strokeOpacity=t.a,t.a===0?this.pdf.setDrawColor(255,255,255):(t.a,this.pdf.setDrawColor(t.r,t.g,t.b))}}),Object.defineProperty(this,"lineCap",{get:function(){return this.ctx.lineCap},set:function(e){[`butt`,`round`,`square`].indexOf(e)!==-1&&(this.ctx.lineCap=e,this.pdf.setLineCap(e))}}),Object.defineProperty(this,"lineWidth",{get:function(){return this.ctx.lineWidth},set:function(e){isNaN(e)||(this.ctx.lineWidth=e,this.pdf.setLineWidth(e))}}),Object.defineProperty(this,"lineJoin",{get:function(){return this.ctx.lineJoin},set:function(e){[`bevel`,`round`,`miter`].indexOf(e)!==-1&&(this.ctx.lineJoin=e,this.pdf.setLineJoin(e))}}),Object.defineProperty(this,"miterLimit",{get:function(){return this.ctx.miterLimit},set:function(e){isNaN(e)||(this.ctx.miterLimit=e,this.pdf.setMiterLimit(e))}}),Object.defineProperty(this,"textBaseline",{get:function(){return this.ctx.textBaseline},set:function(e){this.ctx.textBaseline=e}}),Object.defineProperty(this,"textAlign",{get:function(){return this.ctx.textAlign},set:function(e){[`right`,`end`,`center`,`left`,`start`].indexOf(e)!==-1&&(this.ctx.textAlign=e)}});var p=null,m=null,h=null;Object.defineProperty(this,"fontFaces",{get:function(){return h},set:function(e){p=null,m=null,h=e}}),Object.defineProperty(this,"font",{get:function(){return this.ctx.font},set:function(e){var t;if(this.ctx.font=e,(t=/^\s*(?=(?:(?:[-a-z]+\s*){0,2}(italic|oblique))?)(?=(?:(?:[-a-z]+\s*){0,2}(small-caps))?)(?=(?:(?:[-a-z]+\s*){0,2}(bold(?:er)?|lighter|[1-9]00))?)(?:(?:normal|\1|\2|\3)\s*){0,3}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\d]+(?:\%|in|[cem]m|ex|p[ctx]))(?:\s*\/\s*(normal|[.\d]+(?:\%|in|[cem]m|ex|p[ctx])))?\s*([-_,\"\'\sa-z0-9]+?)\s*$/i.exec(e))!==null){var n=t[1];t[2];var r=t[3],i=t[4];t[5];var a=t[6],o=/^([.\d]+)((?:%|in|[cem]m|ex|p[ctx]))$/i.exec(i)[2];i=Math.floor(o===`px`?parseFloat(i)*this.pdf.internal.scaleFactor:o===`em`?parseFloat(i)*this.pdf.getFontSize():parseFloat(i)*this.pdf.internal.scaleFactor),this.pdf.setFontSize(i);var s=function(e){var t,n,r=[],i=e.trim();if(i===``)return qQ;if(i in LQ)return[LQ[i]];for(;i!==``;){switch(n=null,t=(i=zQ(i)).charAt(0)){case`"`:case`'`:n=BQ(i.substring(1),t);break;default:n=VQ(i)}if(n===null||(r.push(n[0]),(i=zQ(n[1]))!==``&&i.charAt(0)!==`,`))return qQ;i=i.replace(/^,/,``)}return r}(a);if(this.fontFaces){var c=function(e,t,n){for(var r=(n||={}).defaultFontFamily||`times`,i=Object.assign({},IQ,n.genericFontFamilies||{}),a=null,o=null,s=0;s<t.length;++s)if(i[(a=PQ(t[s])).family]&&(a.family=i[a.family]),e.hasOwnProperty(a.family)){o=e[a.family];break}if(!(o||=e[r]))throw Error(`Could not find a font-family for the rule '`+RQ(a)+`' and default family '`+r+`'.`);if(o=function(e,t){if(t[e])return t[e];var n=jQ[e],r=FQ(t,AQ,n,n<=jQ.normal?-1:1);if(!r)throw Error(`Could not find a matching font-stretch value for `+e);return r}(a.stretch,o),o=function(e,t){if(t[e])return t[e];for(var n=kQ[e],r=0;r<n.length;++r)if(t[n[r]])return t[n[r]];throw Error(`Could not find a matching font-style for `+e)}(a.style,o),!(o=function(e,t){if(t[e])return t[e];
154if(e===400&&t[500])return t[500];if(e===500&&t[400])return t[400];var n=NQ[e],r=FQ(t,MQ,n,e<400?-1:1);if(!r)throw Error(`Could not find a matching font-weight for value `+e);return r}(a.weight,o)))throw Error(`Failed to resolve a font for the rule '`+RQ(a)+`'.`);return o}(function(e,t){var n=e.getFontList(),r=JSON.stringify(n);return(p===null||m!==r)&&(p=function(e){for(var t={},n=0;n<e.length;++n){var r=PQ(e[n]),i=r.family,a=r.stretch,o=r.style,s=r.weight;t[i]=t[i]||{},t[i][a]=t[i][a]||{},t[i][a][o]=t[i][a][o]||{},t[i][a][o][s]=r}return t}(function(e){var t=[];return Object.keys(e).forEach(function(n){e[n].forEach(function(e){var r=null;switch(e){case`bold`:r={family:n,weight:`bold`};break;case`italic`:r={family:n,style:`italic`};break;case`bolditalic`:r={family:n,weight:`bold`,style:`italic`};break;case``:case`normal`:r={family:n}}r!==null&&(r.ref={name:n,style:e},t.push(r))})}),t}(n).concat(t)),m=r),p}(this.pdf,this.fontFaces),s.map(function(e){return{family:e,stretch:`normal`,weight:r,style:n}}));this.pdf.setFont(c.ref.name,c.ref.style)}
154else{var l=``;(r===`bold`||parseInt(r,10)>=700||n===`bold`)&&(l=`bold`),n===`italic`&&(l+=`italic`),l.length===0&&(l=`normal`);for(var u=``,d={arial:`Helvetica`,Arial:`Helvetica`,verdana:`Helvetica`,Verdana:`Helvetica`,helvetica:`Helvetica`,Helvetica:`Helvetica`,"sans-serif":`Helvetica`,fixed:`Courier`,monospace:`Courier`,terminal:`Courier`,cursive:`Times`,fantasy:`Times`,serif:`Times`},f=0;f<s.length;f++){if(this.pdf.internal.getFont(s[f],l,{noFallback:!0,disableWarning:!0})!==void 0){u=s[f];break}if(l===`bolditalic`&&this.pdf.internal.getFont(s[f],`bold`,{noFallback:!0,disableWarning:!0})!==void 0)u=s[f],l=`bold`;else if(this.pdf.internal.getFont(s[f],`normal`,{noFallback:!0,disableWarning:!0})!==void 0){u=s[f],l=`normal`;break}}if(u===``){for(var h=0;h<s.length;h++)if(d[s[h]]){u=d[s[h]];break}}u=u===``?`Times`:u,this.pdf.setFont(u,l)}}}}),Object.defineProperty(this,"globalCompositeOperation",{get:function(){return this.ctx.globalCompositeOperation},set:function(e){this.ctx.globalCompositeOperation=e}}),Object.defineProperty(this,"globalAlpha",{get:function(){return this.ctx.globalAlpha},set:function(e){this.ctx.globalAlpha=e}}),Object.defineProperty(this,"lineDashOffset",{get:function(){return this.ctx.lineDashOffset},set:function(e){this.ctx.lineDashOffset=e,ee.call(this)}}),Object.defineProperty(this,"lineDash",{get:function(){return this.ctx.lineDash},set:function(e){this.ctx.lineDash=e,ee.call(this)}}),Object.defineProperty(this,"ignoreClearRect",{get:function(){return this.ctx.ignoreClearRect},set:function(e){this.ctx.ignoreClearRect=!!e}})};d.prototype.setLineDash=function(e){this.lineDash=e},d.prototype.getLineDash=function(){return this.lineDash.length%2?this.lineDash.concat(this.lineDash):this.lineDash.slice()},d.prototype.fill=function(){b.call(this,`fill`,!1)},d.prototype.stroke=function(){b.call(this,`stroke`,!1)},d.prototype.beginPath=function(){this.path=[{type:`begin`}]},d.prototype.moveTo=function(e,t){if(isNaN(e)||isNaN(t))throw cZ.error(`jsPDF.context2d.moveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.moveTo`);var n=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:`mt`,x:n.x,y:n.y}),this.ctx.lastPoint=new o(e,t)},d.prototype.closePath=function(){var e=new o(0,0),t=0;for(t=this.path.length-1;t!==-1;t--)if(this.path[t].type===`begin`&&wW(this.path[t+1])===`object`&&typeof this.path[t+1].x==`number`){e=new o(this.path[t+1].x,this.path[t+1].y);break}this.path.push({type:`close`}),this.ctx.lastPoint=new o(e.x,e.y)},d.prototype.lineTo=function(e,t){if(isNaN(e)||isNaN(t))throw cZ.error(`jsPDF.context2d.lineTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.lineTo`);var n=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:`lt`,x:n.x,y:n.y}),this.ctx.lastPoint=new o(n.x,n.y)},d.prototype.clip=function(){this.ctx.clip_path=JSON.parse(JSON.stringify(this.path)),b.call(this,null,!0)},d.prototype.quadraticCurveTo=function(e,t,n,r){if(isNaN(n)||isNaN(r)||isNaN(e)||isNaN(t))throw cZ.error(`jsPDF.context2d.quadraticCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.quadraticCurveTo`);var i=this.ctx.transform.applyToPoint(new o(n,r)),a=this.ctx.transform.applyToPoint(new o(e,t));this.path.push({type:`qct`,x1:a.x,y1:a.y,x:i.x,y:i.y}),this.ctx.lastPoint=new o(i.x,i.y)},d.prototype.bezierCurveTo=function(e,t,n,r,i,a){if(isNaN(i)||isNaN(a)||isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw cZ.error(`jsPDF.context2d.bezierCurveTo: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.bezierCurveTo`);var s=this.ctx.transform.applyToPoint(new o(i,a)),c=this.ctx.transform.applyToPoint(new o(e,t)),l=this.ctx.transform.applyToPoint(new o(n,r));this.path.push({type:`bct`,x1:c.x,y1:c.y,x2:l.x,y2:l.y,x:s.x,y:s.y}),this.ctx.lastPoint=new o(s.x,s.y)},d.prototype.arc=function(e,t,n,r,i,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i))throw cZ.error(`jsPDF.context2d.arc: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.arc`);if(a=!!a,!this.ctx.transform.isIdentity){var s=this.ctx.transform.applyToPoint(new o(e,t));e=s.x,t=s.y;var c=this.ctx.transform.applyToPoint(new o(0,n)),l=this.ctx.transform.applyToPoint(new o(0,0));n=Math.sqrt((c.x-l.x)**2+(c.y-l.y)**2)}Math.abs(i-r)>=2*Math.PI&&(r=0,i=2*Math.PI),this.path.push({type:`arc`,x:e,y:t,radius:n,startAngle:r,endAngle:i,counterclockwise:a})},d.prototype.arcTo=function(e,t,n,r,i){throw Error(`arcTo not implemented.`)},d.prototype.rect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw cZ.error(`jsPDF.context2d.rect: Invalid arguments`,arguments),Error(`Invalid arguments passed to
154jsPDF.context2d.rect`);this.moveTo(e,t),this.lineTo(e+n,t),this.lineTo(e+n,t+r),this.lineTo(e,t+r),this.lineTo(e,t),this.lineTo(e+n,t),this.lineTo(e,t)},d.prototype.fillRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw cZ.error(`jsPDF.context2d.fillRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillRect`);if(!p.call(this)){var i={};this.lineCap!==`butt`&&(i.lineCap=this.lineCap,this.lineCap=`butt`),this.lineJoin!==`miter`&&(i.lineJoin=this.lineJoin,this.lineJoin=`miter`),this.beginPath(),this.rect(e,t,n,r),this.fill(),i.hasOwnProperty(`lineCap`)&&(this.lineCap=i.lineCap),i.hasOwnProperty(`lineJoin`)&&(this.lineJoin=i.lineJoin)}},d.prototype.strokeRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw cZ.error(`jsPDF.context2d.strokeRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeRect`);m.call(this)||(this.beginPath(),this.rect(e,t,n,r),this.stroke())},d.prototype.clearRect=function(e,t,n,r){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r))throw cZ.error(`jsPDF.context2d.clearRect: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.clearRect`);this.ignoreClearRect||(this.fillStyle=`#ffffff`,this.fillRect(e,t,n,r))},d.prototype.save=function(e){e=typeof e!=`boolean`||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out(`q`);if(this.pdf.setPage(t),e){this.ctx.fontSize=this.pdf.internal.getFontSize();var r=new u(this.ctx);this.ctxStack.push(this.ctx),this.ctx=r}},d.prototype.restore=function(e){e=typeof e!=`boolean`||e;for(var t=this.pdf.internal.getCurrentPageInfo().pageNumber,n=0;n<this.pdf.internal.getNumberOfPages();n++)this.pdf.setPage(n+1),this.pdf.internal.out(`Q`);this.pdf.setPage(t),e&&this.ctxStack.length!==0&&(this.ctx=this.ctxStack.pop(),this.fillStyle=this.ctx.fillStyle,this.strokeStyle=this.ctx.strokeStyle,this.font=this.ctx.font,this.lineCap=this.ctx.lineCap,this.lineWidth=this.ctx.lineWidth,this.lineJoin=this.ctx.lineJoin,this.lineDash=this.ctx.lineDash,this.lineDashOffset=this.ctx.lineDashOffset)},d.prototype.toDataURL=function(){throw Error(`toDataUrl not implemented.`)};var f=function(e){var t,n,r,i;if(!0===e.isCanvasGradient&&(e=e.getColor()),!e)return{r:0,g:0,b:0,a:0,style:e};if(/transparent|rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*0+\s*\)/.test(e))t=0,n=0,r=0,i=0;else{var a=/rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/.exec(e);if(a!==null)t=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=1;else if((a=/rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d.]+)\s*\)/.exec(e))!==null)t=parseInt(a[1]),n=parseInt(a[2]),r=parseInt(a[3]),i=parseFloat(a[4]);else{if(i=1,typeof e==`string`&&e.charAt(0)!==`#`){var o=new pZ(e);e=o.ok?o.toHex():`#000000`}e.length===4?(t=e.substring(1,2),t+=t,n=e.substring(2,3),n+=n,r=e.substring(3,4),r+=r):(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7)),t=parseInt(t,16),n=parseInt(n,16),r=parseInt(r,16)}}return{r:t,g:n,b:r,a:i,style:e}},p=function(){return this.ctx.isFillTransparent||this.globalAlpha==0},m=function(){return!!(this.ctx.isStrokeTransparent||this.globalAlpha==0)};d.prototype.fillText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||typeof e!=`string`)throw cZ.error(`jsPDF.context2d.fillText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.fillText`);if(r=isNaN(r)?void 0:r,!p.call(this)){var i=P(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;O.call(this,{text:e,x:t,y:n,scale:a,angle:i,align:this.textAlign,maxWidth:r})}},d.prototype.strokeText=function(e,t,n,r){if(isNaN(t)||isNaN(n)||typeof e!=`string`)throw cZ.error(`jsPDF.context2d.strokeText: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.strokeText`);if(!m.call(this)){r=isNaN(r)?void 0:r;var i=P(this.ctx.transform.rotation),a=this.ctx.transform.scaleX;O.call(this,{text:e,x:t,y:n,scale:a,renderingMode:`stroke`,angle:i,align:this.textAlign,maxWidth:r})}},d.prototype.measureText=function(e){if(typeof e!=`string`)throw cZ.error(`jsPDF.context2d.measureText: Invalid arguments`,arguments),Error(`Invalid arguments passed to
154jsPDF.context2d.measureText`);var t=this.pdf,n=this.pdf.internal.scaleFactor,r=t.internal.getFontSize(),i=t.getStringUnitWidth(e)*r/t.internal.scaleFactor;return new function(e){var t=(e||={}).width||0;return Object.defineProperty(this,"width",{get:function(){return t}}),this}({width:i*=Math.round(96*n/72*1e4)/1e4})},d.prototype.scale=function(e,t){if(isNaN(e)||isNaN(t))throw cZ.error(`jsPDF.context2d.scale: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.scale`);var n=new c(e,0,0,t,0,0);this.ctx.transform=this.ctx.transform.multiply(n)},d.prototype.rotate=function(e){if(isNaN(e))throw cZ.error(`jsPDF.context2d.rotate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.rotate`);var t=new c(Math.cos(e),Math.sin(e),-Math.sin(e),Math.cos(e),0,0);this.ctx.transform=this.ctx.transform.multiply(t)},d.prototype.translate=function(e,t){if(isNaN(e)||isNaN(t))throw cZ.error(`jsPDF.context2d.translate: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.translate`);var n=new c(1,0,0,1,e,t);this.ctx.transform=this.ctx.transform.multiply(n)},d.prototype.transform=function(e,t,n,r,i,a){if(isNaN(e)||isNaN(t)||isNaN(n)||isNaN(r)||isNaN(i)||isNaN(a))throw cZ.error(`jsPDF.context2d.transform: Invalid arguments`,arguments),Error(`Invalid arguments passed to jsPDF.context2d.transform`);var o=new c(e,t,n,r,i,a);this.ctx.transform=this.ctx.transform.multiply(o)},d.prototype.setTransform=function(e,t,n,r,i,a){e=isNaN(e)?1:e,t=isNaN(t)?0:t,n=isNaN(n)?0:n,r=isNaN(r)?1:r,i=isNaN(i)?0:i,a=isNaN(a)?0:a,this.ctx.transform=new c(e,t,n,r,i,a)};var h=function(){return this.margin[0]>0||this.margin[1]>0||this.margin[2]>0||this.margin[3]>0};d.prototype.drawImage=function(e,t,n,r,i,a,o,l,u){var d=this.pdf.getImageProperties(e),f=1,p=1,m=1,_=1;r!==void 0&&l!==void 0&&(m=l/r,_=u/i,f=d.width/r*l/r,p=d.height/i*u/i),a===void 0&&(a=t,o=n,t=0,n=0),r!==void 0&&l===void 0&&(l=r,u=i),r===void 0&&l===void 0&&(l=d.width,u=d.height);var b=this.ctx.transform.decompose(),S=P(b.rotate.shx),C=new c,w=(C=(C=(C=C.multiply(b.translate)).multiply(b.skew)).multiply(b.scale)).applyToRectangle(new s(a-t*m,o-n*_,r*f,i*p));if(this.autoPaging){for(var T,E=g.call(this,w),D=[],O=0;O<E.length;O+=1)D.indexOf(E[O])===-1&&D.push(E[O]);y(D);for(var k=D[0],A=D[D.length-1],j=k;j<A+1;j++){this.pdf.setPage(j);var M=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],N=j===1?this.posY+this.margin[0]:this.margin[0],F=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],I=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],ee=j===1?0:F+(j-2)*I;if(this.ctx.clip_path.length!==0){var L=this.path;T=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(T,this.posX+this.margin[3],-ee+N+this.ctx.prevPageLastElemOffset),x.call(this,`fill`,!0),this.path=L}var R=JSON.parse(JSON.stringify(w));R=v([R],this.posX+this.margin[3],-ee+N+this.ctx.prevPageLastElemOffset)[0];var z=(j>k||j<A)&&h.call(this);z&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],M,I,null).clip().discardPath()),this.pdf.addImage(e,`JPEG`,R.x,R.y,R.w,R.h,null,null,S),z&&this.pdf.restoreGraphicsState()}}else this.pdf.addImage(e,`JPEG`,w.x,w.y,w.w,w.h,null,null,S)};var g=function(e,t,n){var r=[];t||=this.pdf.internal.pageSize.width,n||=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2];var i=this.posY+this.ctx.prevPageLastElemOffset;switch(e.type){default:case`mt`:case`lt`:r.push(Math.floor((e.y+i)/n)+1);break;case`arc`:r.push(Math.floor((e.y+i-e.radius)/n)+1),r.push(Math.floor((e.y+i+e.radius)/n)+1);break;case`qct`:var a=F(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x,e.y);r.push(Math.floor((a.y+i)/n)+1),r.push(Math.floor((a.y+a.h+i)/n)+1);break;case`bct`:var o=I(this.ctx.lastPoint.x,this.ctx.lastPoint.y,e.x1,e.y1,e.x2,e.y2,e.x,e.y);r.push(Math.floor((o.y+i)/n)+1),r.push(Math.floor((o.y+o.h+i)/n)+1);break;case`rect`:r.push(Math.floor((e.y+i)/n)+1),r.push(Math.floor((e.y+e.h+i)/n)+1)}for(var s=0;s<r.length;s+=1)for(;this.pdf.internal.getNumberOfPages()<r[s];)_.call(this);return r},_=function(){var e=this.fillStyle,t=this.strokeStyle,n=this.font,r=this.lineCap,i=this.lineWidth,a=this.lineJoin;this.pdf.addPage(),this.fillStyle=e,this.strokeStyle=t,this.font=n,this.lineCap=r,this.lineWidth=i,this.lineJoin=a},v=function(e,t,n){for(var r=0;r<e.length;r++)switch(e[r].type){case`bct`:e[r].x2+=t,e[r].y2+=n;case`qct`:e[r].x1+=t,e[r].y1+=n;default:e[r].x+=t,e[r].y+=n}return e},y=function(e){return e.sort(function(e,t){return e-t})},b=function(e,t){var n=this.fillStyle,r=this.strokeStyle,i=this.lineCap,a=this.lineWidth,o=Math.abs(a*this.ctx.transform.scaleX),s=this.lineJoin;if(this.autoPaging){for(var c,l,u=JSON.parse(JSON.stringify(this.path)),d=JSON.parse(JSON.stringify(this.path)),f=[],p=0;p<d.length;p++)if(d[p].x!==void 0)for(var m=g.call(this,d[p]),b=0;b<m.length;b+=1)f.indexOf(m[b])===-1&&f.push(m[b]);for(var S=0;S<f.length;S++)for(;this.pdf.internal.getNumberOfPages()<f[S];)_.call(this);y(f);for(var C=f[0],w=f[f.length-1],T=C;T<w+1;T++){this.pdf.setPage(T),this.fillStyle=n,this.strokeStyle=r,this.lineCap=i,this.lineWidth=o,this.lineJoin=s;var E=this.pdf.internal.pageSize.width-this.margin[3]-this.margin[1],D=T===1?this.posY+this.margin[0]:this.margin[0],O=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],k=this.pdf.internal.pageSize.height-this.margin[0]-this.margin[2],A=T===1?0:O+(T-2)*k;if(this.ctx.clip_path.length!==0){var j=this.path;c=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(c,this.posX+this.margin[3],-A+D+this.ctx.prevPageLastElemOffset),x.call(this,e,!0),this.path=j}if(l=JSON.parse(JSON.stringify(u)),this.path=v(l,this.posX+this.margin[3],-A+D+this.ctx.prevPageLastElemOffset),!1===t||T===0){var M=(T>C||T<w)&&h.call(this);M&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],E,k,null).clip().discardPath()),x.call(this,e,t),M&&this.pdf.restoreGraphicsState()}this.lineWidth=a}this.path=u}else this.lineWidth=o,x.call(this,e,t),this.lineWidth=a},x=function(e,t){if((e!==`stroke`||t||!m.call(this))&&(e===`stroke`||t||!p.call(this))){for(var n,r,i=[],a=this.path,o=0;o<a.length;o++){var s=a[o];switch(s.type){case`begin`:i.push({begin:!0}
vendor: 5,885 bytes, line 154
154);break;case`close`:i.push({close:!0});break;case`mt`:i.push({start:s,deltas:[],abs:[]});break;case`lt`:var c=i.length;if(a[o-1]&&!isNaN(a[o-1].x)&&(n=[s.x-a[o-1].x,s.y-a[o-1].y],c>0)){for(;c>=0;c--)if(!0!==i[c-1].close&&!0!==i[c-1].begin){i[c-1].deltas.push(n),i[c-1].abs.push(s);break}}break;case`bct`:n=[s.x1-a[o-1].x,s.y1-a[o-1].y,s.x2-a[o-1].x,s.y2-a[o-1].y,s.x-a[o-1].x,s.y-a[o-1].y],i[i.length-1].deltas.push(n);break;case`qct`:var l=a[o-1].x+2/3*(s.x1-a[o-1].x),u=a[o-1].y+2/3*(s.y1-a[o-1].y),d=s.x+2/3*(s.x1-s.x),f=s.y+2/3*(s.y1-s.y),h=s.x,g=s.y;n=[l-a[o-1].x,u-a[o-1].y,d-a[o-1].x,f-a[o-1].y,h-a[o-1].x,g-a[o-1].y],i[i.length-1].deltas.push(n);break;case`arc`:i.push({deltas:[],abs:[],arc:!0}),Array.isArray(i[i.length-1].abs)&&i[i.length-1].abs.push(s)}}r=t?null:e===`stroke`?`stroke`:`fill`;for(var _=!1,v=0;v<i.length;v++)if(i[v].arc)for(var y=i[v].abs,b=0;b<y.length;b++){var x=y[b];x.type===`arc`?w.call(this,x.x,x.y,x.radius,x.startAngle,x.endAngle,x.counterclockwise,void 0,t,!_):k.call(this,x.x,x.y),_=!0}else if(!0===i[v].close)this.pdf.internal.out(`h`),_=!1;else if(!0!==i[v].begin){var S=i[v].start.x,C=i[v].start.y;A.call(this,i[v].deltas,S,C),_=!0}r&&T.call(this,r),t&&E.call(this)}},S=function(e){var t=this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor,n=t*(this.pdf.internal.getLineHeightFactor()-1);switch(this.ctx.textBaseline){case`bottom`:return e-n;case`top`:return e+t-n;case`hanging`:return e+t-2*n;case`middle`:return e+t/2-n;default:return e}},C=function(e){return e+this.pdf.internal.getFontSize()/this.pdf.internal.scaleFactor*(this.pdf.internal.getLineHeightFactor()-1)};d.prototype.createLinearGradient=function(){var e=function(){};return e.colorStops=[],e.addColorStop=function(e,t){this.colorStops.push([e,t])},e.getColor=function(){return this.colorStops.length===0?`#000000`:this.colorStops[0][1]},e.isCanvasGradient=!0,e},d.prototype.createPattern=function(){return this.createLinearGradient()},d.prototype.createRadialGradient=function(){return this.createLinearGradient()};var w=function(e,t,n,r,i,a,o,s,c){for(var l=M.call(this,n,r,i,a),u=0;u<l.length;u++){var d=l[u];u===0&&(c?D.call(this,d.x1+e,d.y1+t):k.call(this,d.x1+e,d.y1+t)),j.call(this,e,t,d.x2,d.y2,d.x3,d.y3,d.x4,d.y4)}s?E.call(this):T.call(this,o)},T=function(e){switch(e){case`stroke`:this.pdf.internal.out(`S`);break;case`fill`:this.pdf.internal.out(`f`)}},E=function(){this.pdf.clip(),this.pdf.discardPath()},D=function(e,t){this.pdf.internal.out(n(e)+` `+r(t)+` m`)},O=function(e){var t;switch(e.align){case`right`:case`end`:t=`right`;break;case`center`:t=`center`;break;default:t=`left`}var n,r,i,a=this.pdf.getTextDimensions(e.text),l=S.call(this,e.y),u=C.call(this,l)-a.h,d=this.ctx.transform.applyToPoint(new o(e.x,l));if(this.autoPaging){var f=this.ctx.transform.decompose(),p=new c;p=(p=(p=p.multiply(f.translate)).multiply(f.skew)).multiply(f.scale);for(var m=this.ctx.transform.applyToRectangle(new s(e.x,l,a.w,a.h)),_=p.applyToRectangle(new s(e.x,u,a.w,a.h)),b=g.call(this,_),w=[],T=0;T<b.length;T+=1)w.indexOf(b[T])===-1&&w.push(b[T]);y(w);for(var E=w[0],D=w[w.length-1],O=E;O<D+1;O++){this.pdf.setPage(O);var k=O===1?this.posY+this.margin[0]:this.margin[0],A=this.pdf.internal.pageSize.height-this.posY-this.margin[0]-this.margin[2],j=this.pdf.internal.pageSize.height-this.margin[2],M=j-this.margin[0],N=this.pdf.internal.pageSize.width-this.margin[1],P=N-this.margin[3],F=O===1?0:A+(O-2)*M;if(this.ctx.clip_path.length!==0){var I=this.path;n=JSON.parse(JSON.stringify(this.ctx.clip_path)),this.path=v(n,this.posX+this.margin[3],-1*F+k),x.call(this,`fill`,!0),this.path=I}var ee=v([JSON.parse(JSON.stringify(_))],this.posX+this.margin[3],-F+k+this.ctx.prevPageLastElemOffset)[0];e.scale>=.01&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*e.scale),i=this.lineWidth,this.lineWidth=i*e.scale);var L=this.autoPaging!==`text`;if(L||ee.y+ee.h<=j){if(L||ee.y>=k&&ee.x<=N){var R=L?e.text:this.pdf.splitTextToSize(e.text,e.maxWidth||N-ee.x)[0],z=v([JSON.parse(JSON.stringify(m))],this.posX+this.margin[3],-F+k+this.ctx.prevPageLastElemOffset)[0],B=L&&(O>E||O<D)&&h.call(this);B&&(this.pdf.saveGraphicsState(),this.pdf.rect(this.margin[3],this.margin[0],P,M,null).clip().discardPath()),this.pdf.text(R,z.x,z.y,{angle:e.angle,align:t,renderingMode:e.renderingMode}),B&&this.pdf.restoreGraphicsState()}}else ee.y<j&&(this.ctx.prevPageLastElemOffset+=j-ee.y);e.scale>=.01&&(this.pdf.setFontSize(r),this.lineWidth=i)}}else e.scale>=.01&&(r=this.pdf.internal.getFontSize(),this.pdf.setFontSize(r*e.scale),i=this.lineWidth,this.lineWidth=i*e.scale),this.pdf.text(e.text,d.x+this.posX,d.y+this.posY,{angle:e.angle,align:t,renderingMode:e.renderingMode,maxWidth:e.maxWidth}),e.scale>=.01&&(this.pdf.setFontSize(r),this.lineWidth=i)},k=function(e,t,i,a){i||=0,a||=0,this.pdf.internal.out(n(e+i)+` `+r(t+a)+` l`)},A=function(e,t,n){return this.pdf.lines(e,t,n,null,null)},j=function(e,n,r,o,s,c,l,u){this.pdf.internal.out([t(i(r+e)),t(a(o+n)),t(i(s+e)),t(a(c+n)),t(i(l+e)),t(a(u+n)),`c`].join(` `))},M=function(e,t,n,r){for(var i=2*Math.PI,a=Math.PI/2;t>n;)t-=i;var o=Math.abs(n-t);o<i&&r&&(o=i-o);for(var s=[],c=r?-1:1,l=t;o>1e-5;){var u=l+c*Math.min(o,a);s.push(N.call(this,e,l,u)),o-=Math.abs(u-l),l=u}return s},N=function(e,t,n){var r=(n-t)/2,i=e*Math.cos(r),a=e*Math.sin(r),o=i,s=-a,c=o*o+s*s,l=c+o*i+s*a,u=4/3*(Math.sqrt(2*c*l)-l)/(o*a-s*i),d=o-u*s,f=s+u*o,p=d,m=-f,h=r+t,g=Math.cos(h),_=Math.sin(h);return{x1:e*Math.cos(t),y1:e*Math.sin(t),x2:d*g-f*_,y2:d*_+f*g,x3:p*g-m*_,y3:p*_+m*g,x4:e*Math.cos(n),y4:e*Math.sin(n)}},P=function(e){return 180*e/Math.PI},F=function(e,t,n,r,i,a){var o=e+.5*(n-e),c=t+.5*(r-t),l=i+.5*(n-i),u=a+.5*(r-a),d=Math.min(e,i,o,l),f=Math.max(e,i,o,l),p=Math.min(t,a,c,u),m=Math.max(t,a,c,u);return new s(d,p,f-d,m-p)},I=function(e,t,n,r,i,a,o,c){var l,u,d,f,p,m,h,g,_,v,y,b,x,S,C=n-e,w=r-t,T=i-n,E=a-r,D=o-i,O=c-a;for(u=0;
154u<41;u++)_=(h=(d=e+(l=u/40)*C)+l*((p=n+l*T)-d))+l*(p+l*(i+l*D-p)-h),v=(g=(f=t+l*w)+l*((m=r+l*E)-f))+l*(m+l*(a+l*O-m)-g),u==0?(y=_,b=v,x=_,S=v):(y=Math.min(y,_),b=Math.min(b,v),x=Math.max(x,_),S=Math.max(S,v));return new s(Math.round(y),Math.round(b),Math.round(x-y),Math.round(S-b))},ee=function(){if(this.prevLineDash||this.ctx.lineDash.length||this.ctx.lineDashOffset){var e,t,n=(e=this.ctx.lineDash,t=this.ctx.lineDashOffset,JSON.stringify({lineDash:e,lineDashOffset:t}));this.prevLineDash!==n&&(this.pdf.setLineDash(this.ctx.lineDash,this.ctx.lineDashOffset),this.prevLineDash=n)}}})(zZ.API),function(e){var t=function(e){var t,n,r,i,a,o,s,c,l,u;for(/[^\x00-\xFF]/.test(e),n=[],r=0,i=(e+=t=`\0\0\0\0`.slice(e.length%4||4)).length;i>r;r+=4)(a=(e.charCodeAt(r)<<24)+(e.charCodeAt(r+1)<<16)+(e.charCodeAt(r+2)<<8)+e.charCodeAt(r+3))===0?n.push(122):(o=(a=((a=((a=((a=(a-(u=a%85))/85)-(l=a%85))/85)-(c=a%85))/85)-(s=a%85))/85)%85,n.push(o+33,s+33,c+33,l+33,u+33));return function(e,t){for(var n=t;n>0;n--)e.pop()}(n,t.length),String.fromCharCode.apply(String,n)+`~>`},n=function(e){var t,n,r,i,a,o=String,s=`length`,c=255,l=`charCodeAt`,u=`slice`,d=`replace`;for(e[u](-2),e=e[u](0,-2)[d](/\s/g,``)[d](`z`,`!!!!!`),r=[],i=0,a=(e+=t=`uuuuu`[u](e[s]%5||5))[s];a>i;i+=5)n=52200625*(e[l](i)-33)+614125*(e[l](i+1)-33)+7225*(e[l](i+2)-33)+85*(e[l](i+3)-33)+(e[l](i+4)-33),r.push(c&n>>24,c&n>>16,c&n>>8,c&n);return function(e,t){for(var n=t;n>0;n--)e.pop()}(r,t[s]),o.fromCharCode.apply(o,r)},r=function(e){return e.split(``).map(function(e){return(`0`+e.charCodeAt().toString(16)).slice(-2)}).join(``)+`>`},i=function(e){var t=new RegExp(/^([0-9A-Fa-f]{2})+$/);if((e=e.replace(/\s/g,``)).indexOf(`>`)!==-1&&(e=e.substr(0,e.indexOf(`>`))),e.length%2&&(e+=`0`),!1===t.test(e))return``;for(var n=``,r=0;r<e.length;r+=2)n+=String.fromCharCode(`0x`+(e[r]+e[r+1]));return n},a=function(e){for(var t=new Uint8Array(e.length),n=e.length;n--;)t[n]=e.charCodeAt(n);return(t=cG(t)).reduce(function(e,t){return e+String.fromCharCode(t)},``)};e.processDataByFilters=function(e,o){var s=0,c=e||``,l=[];for(typeof(o||=[])==`string`&&(o=[o]),s=0;s<o.length;s+=1)switch(o[s]){case`ASCII85Decode`:case`/ASCII85Decode`:c=n(c),l.push(`/ASCII85Encode`);break;case`ASCII85Encode`:case`/ASCII85Encode`:c=t(c),l.push(`/ASCII85Decode`);break;case`ASCIIHexDecode`:case`/ASCIIHexDecode`:c=i(c),l.push(`/ASCIIHexEncode`);break;case`ASCIIHexEncode`:case`/ASCIIHexEncode`:c=r(c),l.push(`/ASCIIHexDecode`);break;case`FlateEncode`:case`/FlateEncode`:c=a(c),l.push(`/FlateDecode`);break;default:throw Error(`The filter: "`+o[s]+`" is not implemented`)}return{data:c,reverseChain:l.reverse().join(` `)}}}(zZ.API),function(e){e.loadFile=function(e,t,n){return function(e,t,n){t=!1!==t,n=typeof n==`function`?n:function(){};var r=void 0;try{r=function(e,t,n){var r=new XMLHttpRequest,i=0,a=function(e){var t=e.length,n=[],r=String.fromCharCode;for(i=0;i<t;i+=1)n.push(r(255&e.charCodeAt(i)));return n.join(``)};if(r.open(`GET`,e,!t),r.overrideMimeType(`text/plain; charset=x-user-defined`),!1===t&&(r.onload=function(){r.status===200?n(a(this.responseText)):n(void 0)}),r.send(null),t&&r.status===200)return a(r.responseText)}(e,t,n)}catch{}return r}(e,t,n)},e.allowFsRead=void 0,e.loadImageFile=e.loadFile}(zZ.API),function(e){function t(){return(oZ.html2canvas?Promise.resolve(oZ.html2canvas):aZ(()=>Promise.resolve().then(()=>u(U2())),void 0)).catch(function(e){return Promise.reject(Error(`Could not load html2canvas: `+e))}).then(function(e){return e.default?e.default:e})}function n(){return(oZ.DOMPurify?Promise.resolve(oZ.DOMPurify):aZ(()=>import(`./purify.es-DYqNnIWS.js`),[])).catch(function(e){return Promise.reject(Error(`Could not load dompurify: `+e))}).then(function(e){return e.default?e.default:e})}var r=function(e){var t=wW(e);return t===`undefined`?`undefined`:t===`string`||e instanceof String?`string`:t===`number`||e instanceof Number?`number`:t===`function`||e instanceof Function?`function`:e&&e.constructor===Array?`array`:e&&e.nodeType===1?`element`:t===`object`?`object`:`unknown`},i=function(e,t){var n=document.createElement(e);for(var r in t.className&&(n.className=t.className),t.innerHTML&&t.dompurify&&(n.innerHTML=t.dompurify.sanitize(t.innerHTML)),t.style)n.style[r]=t.style[r];return n}
154,a=function e(t,n){for(var r=t.nodeType===3?document.createTextNode(t.nodeValue):t.cloneNode(!1),i=t.firstChild;i;i=i.nextSibling)!0!==n&&i.nodeType===1&&i.nodeName===`SCRIPT`||r.appendChild(e(i,n));return t.nodeType===1&&(t.nodeName===`CANVAS`?(r.width=t.width,r.height=t.height,r.getContext(`2d`).drawImage(t,0,0)):t.nodeName!==`TEXTAREA`&&t.nodeName!==`SELECT`||(r.value=t.value),r.addEventListener(`load`,function(){r.scrollTop=t.scrollTop,r.scrollLeft=t.scrollLeft},!0)),r},o=function e(t){var n=Object.assign(e.convert(Promise.resolve()),JSON.parse(JSON.stringify(e.template))),r=e.convert(Promise.resolve(),n);return(r=r.setProgress(1,e,1,[e])).set(t)};(o.prototype=Object.create(Promise.prototype)).constructor=o,o.convert=function(e,t){return e.__proto__=t||o.prototype,e},o.template={prop:{src:null,container:null,overlay:null,canvas:null,img:null,pdf:null,pageSize:null,callback:function(){}},progress:{val:0,state:null,n:0,stack:[]},opt:{filename:`file.pdf`,margin:[0,0,0,0],enableLinks:!0,x:0,y:0,html2canvas:{},jsPDF:{},backgroundColor:`transparent`}},o.prototype.from=function(e,t){return this.then(function(){switch(t||=function(e){switch(r(e)){case`string`:return`string`;case`element`:return e.nodeName.toLowerCase()===`canvas`?`canvas`:`element`;default:return`unknown`}}(e),t){case`string`:return this.then(n).then(function(t){return this.set({src:i(`div`,{innerHTML:e,dompurify:t})})});case`element`:return this.set({src:e});case`canvas`:return this.set({canvas:e});case`img`:return this.set({img:e});default:return this.error(`Unknown source type.`)}})},o.prototype.to=function(e){switch(e){case`container`:return this.toContainer();case`canvas`:return this.toCanvas();case`img`:return this.toImg();case`pdf`:return this.toPdf();default:return this.error(`Invalid target.`)}},o.prototype.toContainer=function(){return this.thenList([function(){return this.prop.src||this.error(`Cannot duplicate - no source HTML.`)},function(){return this.prop.pageSize||this.setPageSize()}]).then(function(){var e={position:`relative`,display:`inline-block`,width:(typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?Math.max(this.prop.src.clientWidth,this.prop.src.scrollWidth,this.prop.src.offsetWidth):this.opt.windowWidth)+`px`,left:0,right:0,top:0,margin:`auto`,backgroundColor:this.opt.backgroundColor},t=a(this.prop.src,this.opt.html2canvas.javascriptEnabled);t.tagName===`BODY`&&(e.height=Math.max(document.body.scrollHeight,document.body.offsetHeight,document.documentElement.clientHeight,document.documentElement.scrollHeight,document.documentElement.offsetHeight)+`px`),this.prop.overlay=i(`div`,{className:`html2pdf__overlay`,style:{position:`fixed`,overflow:`hidden`,zIndex:1e3,left:`-100000px`,right:0,bottom:0,top:0}}),this.prop.container=i(`div`,{className:`html2pdf__container`,style:e}),this.prop.container.appendChild(t),this.prop.container.firstChild.appendChild(i(`div`,{style:{clear:`both`,border:`0 none transparent`,margin:0,padding:0,height:0}})),this.prop.container.style.float=`none`,this.prop.overlay.appendChild(this.prop.container),document.body.appendChild(this.prop.overlay),this.prop.container.firstChild.style.position=`relative`,this.prop.container.height=Math.max(this.prop.container.firstChild.clientHeight,this.prop.container.firstChild.scrollHeight,this.prop.container.firstChild.offsetHeight)+`px`})},o.prototype.toCanvas=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(t).then(function(e){var t=Object.assign({},this.opt.html2canvas);return delete t.onrendered,e(this.prop.container,t)}).then(function(e){(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},o.prototype.toContext2d=function(){return this.thenList([function(){return document.body.contains(this.prop.container)||this.toContainer()}]).then(t).then(function(e){var t=this.opt.jsPDF,n=this.opt.fontFaces,r=typeof this.opt.width!=`number`||isNaN(this.opt.width)||typeof this.opt.windowWidth!=`number`||isNaN(this.opt.windowWidth)?1:this.opt.width/this.opt.windowWidth,i=Object.assign({async:!0,allowTaint:!0,scale:r,scrollX:this.opt.scrollX||0,scrollY:this.opt.scrollY||0,backgroundColor:`#ffffff`,imageTimeout:15e3,logging:!0,proxy:null,removeContainer:!0,foreignObjectRendering:!1,useCORS:!1},this.opt.html2canvas);if(delete i.onrendered,t.context2d.autoPaging=this.opt.autoPaging===void 0||this.opt.autoPaging,t.context2d.posX=this.opt.x,t.context2d.posY=this.opt.y,t.context2d.margin=this.opt.margin,t.context2d.fontFaces=n,n)for(var a=0;a<n.length;++a){var o=n[a],s=o.src.find(function(e){return e.format===`truetype`});s&&t.addFont(s.url,o.ref.name,o.ref.style)}
154return i.windowHeight=i.windowHeight||0,i.windowHeight=i.windowHeight==0?Math.max(this.prop.container.clientHeight,this.prop.container.scrollHeight,this.prop.container.offsetHeight):i.windowHeight,t.context2d.save(!0),e(this.prop.container,i)}).then(function(e){this.opt.jsPDF.context2d.restore(!0),(this.opt.html2canvas.onrendered||function(){})(e),this.prop.canvas=e,document.body.removeChild(this.prop.overlay)})},o.prototype.toImg=function(){return this.thenList([function(){return this.prop.canvas||this.toCanvas()}]).then(function(){var e=this.prop.canvas.toDataURL(`image/`+this.opt.image.type,this.opt.image.quality);this.prop.img=document.createElement(`img`),this.prop.img.src=e})},o.prototype.toPdf=function(){return this.thenList([function(){return this.toContext2d()}]).then(function(){this.prop.pdf=this.prop.pdf||this.opt.jsPDF})},o.prototype.output=function(e,t,n){return(n||=`pdf`).toLowerCase()===`img`||n.toLowerCase()===`image`?this.outputImg(e,t):this.outputPdf(e,t)},o.prototype.outputPdf=function(e,t){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){return this.prop.pdf.output(e,t)})},o.prototype.outputImg=function(e){return this.thenList([function(){return this.prop.img||this.toImg()}]).then(function(){switch(e){case void 0:case`img`:return this.prop.img;case`datauristring`:case`dataurlstring`:return this.prop.img.src;case`datauri`:case`dataurl`:return document.location.href=this.prop.img.src;default:throw`Image output type "`+e+`" is not supported.`}})},o.prototype.save=function(e){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).set(e?{filename:e}:null).then(function(){this.prop.pdf.save(this.opt.filename)})},o.prototype.doCallback=function(){return this.thenList([function(){return this.prop.pdf||this.toPdf()}]).then(function(){this.prop.callback(this.prop.pdf)})},o.prototype.set=function(e){if(r(e)!==`object`)return this;var t=Object.keys(e||{}).map(function(t){if(t in o.template.prop)return function(){this.prop[t]=e[t]};switch(t){case`margin`:return this.setMargin.bind(this,e.margin);case`jsPDF`:return function(){return this.opt.jsPDF=e.jsPDF,this.setPageSize()};case`pageSize`:return this.setPageSize.bind(this,e.pageSize);default:return function(){this.opt[t]=e[t]}}},this);return this.then(function(){return this.thenList(t)})},o.prototype.get=function(e,t){return this.then(function(){var n=e in o.template.prop?this.prop[e]:this.opt[e];return t?t(n):n})},o.prototype.setMargin=function(e){return this.then(function(){switch(r(e)){case`number`:e=[e,e,e,e];case`array`:if(e.length===2&&(e=[e[0],e[1],e[0],e[1]]),e.length===4)break;default:return this.error(`Invalid margin array.`)}this.opt.margin=e}).then(this.setPageSize)},o.prototype.setPageSize=function(e){function t(e,t){return Math.floor(e*t/72*96)}return this.then(function(){(e||=zZ.getPageSize(this.opt.jsPDF)).hasOwnProperty(`inner`)||(e.inner={width:e.width-this.opt.margin[1]-this.opt.margin[3],height:e.height-this.opt.margin[0]-this.opt.margin[2]},e.inner.px={width:t(e.inner.width,e.k),height:t(e.inner.height,e.k)},e.inner.ratio=e.inner.height/e.inner.width),this.prop.pageSize=e})},o.prototype.setProgress=function(e,t,n,r){return e!=null&&(this.progress.val=e),t!=null&&(this.progress.state=t),n!=null&&(this.progress.n=n),r!=null&&(this.progress.stack=r),this.progress.ratio=this.progress.val/this.progress.state,this},o.prototype.updateProgress=function(e,t,n,r){return this.setProgress(e?this.progress.val+e:null,t||null,n?this.progress.n+n:null,r?this.progress.stack.concat(r):null)},o.prototype.then=function(e,t){var n=this;return this.thenCore(e,t,function(e,t){return n.updateProgress(null,null,1,[e]),Promise.prototype.then.call(this,function(t){return n.updateProgress(null,e),t}).then(e,t).then(function(e){return n.updateProgress(1),e})})},o.prototype.thenCore=function(e,t,n){n||=Promise.prototype.then;var r=this;e&&=e.bind(r),t&&=t.bind(r);var i=Promise.toString().indexOf(`[native code]`)!==-1&&Promise.name===`Promise`?r:o.convert(Object.assign({},r),Promise.prototype),a=n.call(i,e,t);return o.convert(a,r.__proto__)},o.prototype.thenExternal=function(e,t){return Promise.prototype.then.call(this,e,t)},o.prototype.thenList=function(e){var t=this;return e.forEach(function(e){t=t.thenCore(e)}),t},o.prototype.catch=function(e){e&&=e.bind(this);var t=Promise.prototype.catch.call(this,e);return o.convert(t,this)},o.prototype.catchExternal=function(e){return Promise.prototype.catch.call(this,e)},o.prototype.error=function(e){return this.then(function(){throw Error(e)})},o.prototype.using=o.prototype.set,o.prototype.saveAs=o.prototype.save,o.prototype.exp
vendor: 6,926 bytes, lines 154-160
154ort=o.prototype.output,o.prototype.run=o.prototype.then,zZ.getPageSize=function(e,t,n){if(wW(e)===`object`){var r=e;e=r.orientation,t=r.unit||t,n=r.format||n}t||=`mm`,n||=`a4`,e=(``+(e||`P`)).toLowerCase();var i,a=(``+n).toLowerCase(),o={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};switch(t){case`pt`:i=1;break;case`mm`:i=72/25.4;break;case`cm`:i=72/2.54;break;case`in`:i=72;break;case`px`:i=.75;break;case`pc`:case`em`:i=12;break;case`ex`:i=6;break;default:throw`Invalid unit: `+t}var s,c=0,l=0;if(o.hasOwnProperty(a))c=o[a][1]/i,l=o[a][0]/i;else try{c=n[1],l=n[0]}catch{throw Error(`Invalid format: `+n)}if(e===`p`||e===`portrait`)e=`p`,l>c&&(s=l,l=c,c=s);else{if(e!==`l`&&e!==`landscape`)throw`Invalid orientation: `+e;e=`l`,c>l&&(s=l,l=c,c=s)}return{width:l,height:c,unit:t,k:i,orientation:e}},e.html=function(e,t){(t||={}).callback=t.callback||function(){},t.html2canvas=t.html2canvas||{},t.html2canvas.canvas=t.html2canvas.canvas||this.canvas,t.jsPDF=t.jsPDF||this,t.fontFaces=t.fontFaces?t.fontFaces.map(PQ):null;var n=new o(t);return t.worker?n:n.from(e).doCallback()}}(zZ.API),zZ.API.addJS=function(e){var t,n,r=function(e){for(var t=``,n=0;n<e.length;n++){var r=e[n];if(r===`(`||r===`)`){for(var i=0,a=n-1;a>=0&&e[a]===`\\`;a--)i++;t+=i%2==0?`\\`+r:r}else t+=r}return t}(e);return this.internal.events.subscribe(`postPutResources`,function(){t=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/Names [(EmbeddedJS) `+(t+1)+` 0 R]`),this.internal.out(`>>`),this.internal.out(`endobj`),n=this.internal.newObject(),this.internal.out(`<<`),this.internal.out(`/S /JavaScript`),this.internal.out(`/JS (`+r+`)`),this.internal.out(`>>`),this.internal.out(`endobj`)}),this.internal.events.subscribe(`putCatalog`,function(){t!==void 0&&n!==void 0&&this.internal.out(`/Names <</JavaScript `+t+` 0 R>>`)}),this},function(e){var t;e.events.push([`postPutResources`,function(){var e=this,n=/^(\d+) 0 obj$/;if(this.outline.root.children.length>0)for(var r=e.outline.render().split(/\r\n/),i=0;i<r.length;i++){var a=r[i],o=n.exec(a);if(o!=null){var s=o[1];e.internal.newObjectDeferredBegin(s,!1)}e.internal.write(a)}if(this.outline.createNamedDestinations){var c=this.internal.pages.length,l=[];for(i=0;i<c;i++){var u=e.internal.newObject();l.push(u);var d=e.internal.getPageInfo(i+1);e.internal.write(`<< /D[`+d.objId+` 0 R /XYZ null null null]>> endobj`)}var f=e.internal.newObject();for(e.internal.write(`<< /Names [ `),i=0;i<l.length;i++)e.internal.write(`(page_`+(i+1)+`)`+l[i]+` 0 R`);e.internal.write(` ] >>`,`endobj`),t=e.internal.newObject(),e.internal.write(`<< /Dests `+f+` 0 R`),e.internal.write(`>>`,`endobj`)}}]),e.events.push([`putCatalog`,function(){var e=this;e.outline.root.children.length>0&&(e.internal.write(`/Outlines`,this.outline.makeRef(this.outline.root)),this.outline.createNamedDestinations&&e.internal.write(`/Names `+t+` 0 R`))}]),e.events.push([`initialized`,function(){var e=this;e.outline={createNamedDestinations:!1,root:{children:[]}},e.outline.add=function(e,t,n){var r={title:t,options:n,children:[]};return e??=this.root,e.children.push(r),r},e.outline.render=function(){return this.ctx={},this.ctx.val=``,this.ctx.pdf=e,this.genIds_r(this.root),this.renderRoot(this.root),this.renderItems(this.root),this.ctx.val},e.outline.genIds_r=function(t){t.id=e.internal.newObjectDeferred();for(var n=0;n<t.children.length;n++)this.genIds_r(t.children[n])},e.outline.renderRoot=function(e){this.objStart(e),this.line(`/Type /Outlines`),e.children.length>0&&(this.line(`/First `+this.makeRef(e.children[0])),this.line(`/Last `+this.makeRef(e.children[e.children.length-1]))),this.line(`/Count `+this.count_r({count:0},e)),this.objEnd()},e.outline.renderItems=function(t){for(var n=this.ctx.pdf.internal.getVerticalCoordinateString,r=0;r<t.children.length;r++){var i=t.children[r];this.objStart(i),this.line(`/Title `+this.makeString(i.title)),this.line(`/Parent `+this.makeRef(t)),r>0&&this.line(`/Prev `+this.makeRef(t.children[r-1])),r<t.children.length-1&&this.line(`/Next `+this.makeRef(t.children[r+1])),i.children.length>0&&(this.line(`/First `+this.makeRef(i.children[0])),this.line(`/Last `+this.makeRef(i.children[i.children.length-1])));var a=this.count=this.count_r({count:0},i);if(a>0&&this.line(`/Count `+a),i.options&&i.options.pageNumber){var o=e.internal.getPageInfo(i.options.pageNumber);this.line(`/Dest [`+o.objId+` 0 R /XYZ 0 `+n(0)+` 0]`)}this.objEnd()}for(var s=0;s<t.children.length;s++)this.renderItems(t.children[s])},e.outline.line=function(e){this.ctx.val+=e+`\r 155`},e.outline.makeRef=function(e){return e.id+` 0 R`},e.outline.makeString=function(t){return`(`+e.internal.pdfEscape(t)+`)`},e.outline.objStart=function(e){this.ctx.val+=`\r 156`+e.id+` 0 obj\r 157<<\r 158`},e.outline.objEnd=function(){this.ctx.val+=`>> \r 159endobj\r 160`},e.outline.count_r=function(e,t){for(var n=0;n<t.children.length;n++)e.count++,this.count_r(e,t.children[n]);return e.count}}])}(zZ.API),function(e){var t=[192,193,194,195,196,197,198,199];e.processJPEG=function(e,n,r,i,a,o){var s,c=this.decode.DCT_DECODE,l=null;if(typeof e==`string`||this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e)){switch(e=a||e,e=this.__addimage__.isArrayBuffer(e)?new Uint8Array(e):e,s=function(e){for(var n,r=256*e.charCodeAt(4)+e.charCodeAt(5),i=e.length,a={width:0,height:0,numcomponents:1},o=4;o<i;o+=2){if(o+=r,t.indexOf(e.charCodeAt(o+1))!==-1){n=256*e.charCodeAt(o+5)+e.charCodeAt(o+6),a={width:256*e.charCodeAt(o+7)+e.charCodeAt(o+8),height:n,numcomponents:e.charCodeAt(o+9)};break}r=256*e.charCodeAt(o+2)+e.charCodeAt(o+3)}return a}(e=this.__addimage__.isArrayBufferView(e)?this.__addimage__.arrayBufferToBinaryString(e):e),s.numcomponents){case 1:o=this.color_spaces.DEVICE_GRAY;break;case 4:o=this.color_spaces.DEVICE_CMYK;break;case 3:o=this.color_spaces.DEVICE_RGB}l={data:e,width:s.width,height:s.height,colorSpace:o,bitsPerComponent:8,filter:c,index:n,alias:r}}return l}}(zZ.API),zZ.API.processPNG=function(e,t,n,r){if(this.__addimage__.isArrayBuffer(e)&&(e=new Uint8Array(e)),this.__addimage__.isArrayBufferView(e)){var i,a=tZ(e,{checkCrc:!0}),o=a.width,s=a.height,c=a.channels,l=a.palette,u=a.depth;
160i=l&&c===1?function(e){for(var t=e.width,n=e.height,r=e.data,i=e.palette,a=e.depth,o=!1,s=[],c=[],l=void 0,u=!1,d=0,f=0;f<i.length;f++){var p=hG(i[f],4),m=p[0],h=p[1],g=p[2],_=p[3];s.push(m,h,g),_!=null&&(_===0?(d++,c.length<1&&c.push(f)):_<255&&(u=!0))}if(u||d>1){o=!0,c=void 0;var v=t*n;l=new Uint8Array(v);for(var y=new DataView(r.buffer),b=0;b<v;b++){var x=hG(i[n$(y,b,a)],4)[3];l[b]=x}}else d===0&&(c=void 0);return{colorSpace:`Indexed`,colorsPerPixel:1,sMaskBitsPerComponent:o?8:void 0,colorBytes:r,alphaBytes:l,needSMask:o,palette:s,mask:c}}(a):c===2||c===4?function(e){for(var t=e.data,n=e.width,r=e.height,i=e.channels,a=e.depth,o=i===2?`DeviceGray`:`DeviceRGB`,s=i-1,c=n*r,l=s,u=c*l,d=1*c,f=Math.ceil(u*a/8),p=Math.ceil(d*a/8),m=new Uint8Array(f),h=new Uint8Array(p),g=new DataView(t.buffer),_=new DataView(m.buffer),v=new DataView(h.buffer),y=!1,b=0;b<c;b++){for(var x=b*i,S=0;S<l;S++)r$(_,n$(g,x+S,a),b*l+S,a);var C=n$(g,x+l,a);C<(1<<a)-1&&(y=!0),r$(v,C,1*b,a)}return{colorSpace:o,colorsPerPixel:s,sMaskBitsPerComponent:y?a:void 0,colorBytes:m,alphaBytes:h,needSMask:y}}(a):function(e){var t=e.data,n=e.channels===1?`DeviceGray`:`DeviceRGB`;return{colorSpace:n,colorsPerPixel:n===`DeviceGray`?1:3,colorBytes:t instanceof Uint16Array?function(e){for(var t=e.length,n=new Uint8Array(2*t),r=new DataView(n.buffer,n.byteOffset,n.byteLength),i=0;i<t;i++)r.setUint16(2*i,e[i],!1);return n}(t):t,needSMask:!1}}(a);var d,f,p,m=i,h=m.colorSpace,g=m.colorsPerPixel,_=m.sMaskBitsPerComponent,v=m.colorBytes,y=m.alphaBytes,b=m.needSMask,x=m.palette,S=m.mask,C=null;return r!==zZ.API.image_compression.NONE&&typeof cG==`function`?(C=function(e){var t;switch(e){case zZ.API.image_compression.FAST:t=11;break;case zZ.API.image_compression.MEDIUM:t=13;break;case zZ.API.image_compression.SLOW:t=14;break;default:t=12}return t}(r),d=this.decode.FLATE_DECODE,f=`/Predictor ${C} /Colors ${g} /BitsPerComponent ${u} /Columns ${o}`,e=JQ(v,Math.ceil(o*g*u/8),g,u,r),b&&(p=JQ(y,Math.ceil(o*_/8),1,_,r))):(d=void 0,f=void 0,e=v,b&&(p=y)),(this.__addimage__.isArrayBuffer(e)||this.__addimage__.isArrayBufferView(e))&&(e=this.__addimage__.arrayBufferToBinaryString(e)),(p&&this.__addimage__.isArrayBuffer(p)||this.__addimage__.isArrayBufferView(p))&&(p=this.__addimage__.arrayBufferToBinaryString(p)),{alias:n,data:e,index:t,filter:d,decodeParameters:f,transparency:S,palette:x,sMask:p,predictor:C,width:o,height:s,bitsPerComponent:u,sMaskBitsPerComponent:_,colorSpace:h}}},function(e){e.processGIF89A=function(t,n,r,i){var a=new a$(t),o=a.width,s=a.height,c=[];a.decodeAndBlitFrameRGBA(0,c);var l={data:c,width:o,height:s},u=new s$(100).encode(l,100);return e.processJPEG.call(this,u,n,r,i)},e.processGIF87A=e.processGIF89A}(zZ.API),c$.prototype.parseHeader=function(){if(this.fileSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.reserved=this.datav.getUint32(this.pos,!0),this.pos+=4,this.offset=this.datav.getUint32(this.pos,!0),this.pos+=4,this.headerSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.width=this.datav.getUint32(this.pos,!0),this.pos+=4,this.height=this.datav.getInt32(this.pos,!0),this.pos+=4,this.planes=this.datav.getUint16(this.pos,!0),this.pos+=2,this.bitPP=this.datav.getUint16(this.pos,!0),this.pos+=2,this.compress=this.datav.getUint32(this.pos,!0),this.pos+=4,this.rawSize=this.datav.getUint32(this.pos,!0),this.pos+=4,this.hr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.vr=this.datav.getUint32(this.pos,!0),this.pos+=4,this.colors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.importantColors=this.datav.getUint32(this.pos,!0),this.pos+=4,this.bitPP===16&&this.is_with_alpha&&(this.bitPP=15),this.bitPP<15){var e=this.colors===0?1<<this.bitPP:this.colors;this.palette=Array(e);for(var t=0;t<e;t++){var n=this.datav.getUint8(this.pos++,!0),r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0);this.palette[t]={red:i,green:r,blue:n,quad:a}}}this.height<0&&(this.height*=-1,this.bottom_up=!1)},c$.prototype.parseBGR=function(){this.pos=this.offset;var e=`bit`+this.bitPP,t=this.width*this.height*4;if(t>536870912)throw Error(`Image dimensions exceed 512MB, which is too large.`);this.data=new Uint8Array(t);try{this[e]()}catch(e){cZ.log(`bit decode error:`+e)}},c$.prototype.bit1=function(){var e,t=Math.ceil(this.width/8),n=t%4;
vendor: 4,828 bytes, line 160
160for(e=this.height-1;e>=0;e--){for(var r=this.bottom_up?e:this.height-1-e,i=0;i<t;i++)for(var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+8*i*4,s=0;s<8&&8*i+s<this.width;s++){var c=this.palette[a>>7-s&1];this.data[o+4*s]=c.blue,this.data[o+4*s+1]=c.green,this.data[o+4*s+2]=c.red,this.data[o+4*s+3]=255}n!==0&&(this.pos+=4-n)}},c$.prototype.bit4=function(){for(var e=Math.ceil(this.width/2),t=e%4,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<e;i++){var a=this.datav.getUint8(this.pos++,!0),o=r*this.width*4+2*i*4,s=a>>4,c=15&a,l=this.palette[s];if(this.data[o]=l.blue,this.data[o+1]=l.green,this.data[o+2]=l.red,this.data[o+3]=255,2*i+1>=this.width)break;l=this.palette[c],this.data[o+4]=l.blue,this.data[o+4+1]=l.green,this.data[o+4+2]=l.red,this.data[o+4+3]=255}t!==0&&(this.pos+=4-t)}},c$.prototype.bit8=function(){for(var e=this.width%4,t=this.height-1;t>=0;t--){for(var n=this.bottom_up?t:this.height-1-t,r=0;r<this.width;r++){var i=this.datav.getUint8(this.pos++,!0),a=n*this.width*4+4*r;if(i<this.palette.length){var o=this.palette[i];this.data[a]=o.red,this.data[a+1]=o.green,this.data[a+2]=o.blue,this.data[a+3]=255}else this.data[a]=255,this.data[a+1]=255,this.data[a+2]=255,this.data[a+3]=255}e!==0&&(this.pos+=4-e)}},c$.prototype.bit15=function(){for(var e=this.width%3,t=31,n=this.height-1;n>=0;n--){for(var r=this.bottom_up?n:this.height-1-n,i=0;i<this.width;i++){var a=this.datav.getUint16(this.pos,!0);this.pos+=2;var o=(a&t)/t*255|0,s=(a>>5&t)/t*255|0,c=(a>>10&t)/t*255|0,l=a>>15?255:0,u=r*this.width*4+4*i;this.data[u]=c,this.data[u+1]=s,this.data[u+2]=o,this.data[u+3]=l}this.pos+=e}},c$.prototype.bit16=function(){for(var e=this.width%3,t=31,n=63,r=this.height-1;r>=0;r--){for(var i=this.bottom_up?r:this.height-1-r,a=0;a<this.width;a++){var o=this.datav.getUint16(this.pos,!0);this.pos+=2;var s=(o&t)/t*255|0,c=(o>>5&n)/n*255|0,l=(o>>11)/t*255|0,u=i*this.width*4+4*a;this.data[u]=l,this.data[u+1]=c,this.data[u+2]=s,this.data[u+3]=255}this.pos+=e}},c$.prototype.bit24=function(){for(var e=this.height-1;e>=0;e--){for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=t*this.width*4+4*n;this.data[o]=a,this.data[o+1]=i,this.data[o+2]=r,this.data[o+3]=255}this.pos+=this.width%4}},c$.prototype.bit32=function(){for(var e=this.height-1;e>=0;e--)for(var t=this.bottom_up?e:this.height-1-e,n=0;n<this.width;n++){var r=this.datav.getUint8(this.pos++,!0),i=this.datav.getUint8(this.pos++,!0),a=this.datav.getUint8(this.pos++,!0),o=this.datav.getUint8(this.pos++,!0),s=t*this.width*4+4*n;this.data[s]=a,this.data[s+1]=i,this.data[s+2]=r,this.data[s+3]=o}},c$.prototype.getData=function(){return this.data},function(e){e.processBMP=function(t,n,r,i){var a=new c$(t,!1),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},l=new s$(100).encode(c,100);return e.processJPEG.call(this,l,n,r,i)}}(zZ.API),l$.prototype.getData=function(){return this.data},function(e){e.processWEBP=function(t,n,r,i){var a=new l$(t),o=a.width,s=a.height,c={data:a.getData(),width:o,height:s},l=new s$(100).encode(c,100);return e.processJPEG.call(this,l,n,r,i)}}(zZ.API),zZ.API.processRGBA=function(e,t,n){for(var r=e.data,i=r.length,a=new Uint8Array(i/4*3),o=new Uint8Array(i/4),s=0,c=0,l=0;l<i;l+=4){var u=r[l],d=r[l+1],f=r[l+2],p=r[l+3];a[s++]=u,a[s++]=d,a[s++]=f,o[c++]=p}var m=this.__addimage__.arrayBufferToBinaryString(a);return{alpha:this.__addimage__.arrayBufferToBinaryString(o),data:m,index:t,alias:n,colorSpace:`DeviceRGB`,bitsPerComponent:8,width:e.width,height:e.height}},zZ.API.setLanguage=function(e){return this.internal.languageSettings===void 0&&(this.internal.languageSettings={},this.internal.languageSettings.isSubscribed=!1),{af:`Afrikaans`,sq:`Albanian`,ar:`Arabic (Standard)`,"ar-DZ":`Arabic (Algeria)`,"ar-BH":`Arabic (Bahrain)`,"ar-EG":`Arabic (Egypt)`,"ar-IQ":`Arabic (Iraq)`,"ar-JO":`Arabic (Jordan)`,"ar-KW":`Arabic (Kuwait)`,"ar-LB":`Arabic (Lebanon)`,"ar-LY":`Arabic (Libya)`,"ar-MA":`Arabic (Morocco)`,"ar-OM":`Arabic (Oman)`,"ar-QA":`Arabic (Qatar)`,"ar-SA":`Arabic (Saudi Arabia)`,"ar-SY":`Arabic (Syria)`,"ar-TN":`Arabic (Tunisia)`,"ar-AE":`Arabic (U.A.E.)`,"ar-YE":`Arabic (Yemen)`,an:`Aragonese`,hy:`Armenian`,as:`Assamese`,ast:`Asturian`,az:`Azerbaijani`,eu:`Basque`,be:`Belarusian`,bn:`Bengali`,bs:`Bosnian`,br:`Breton`,bg:`Bulgarian`,my:`Burmese`,ca:`Catalan`,ch:`Chamorro`,ce:`Chechen`,zh:`Chinese`,"zh-HK":`Chinese (Hong Kong)`,"zh-CN":`Chinese (PRC)`,"zh-SG":`Chinese (Singapore)`,"zh-TW":`Chinese (Taiwan)`,cv:`Chuvash`,co:`Corsican`,cr:`Cree`,hr:`Croatian`,cs:`Czech`,da:`Danish`,nl:`Dutch (Standard)`,"nl-BE":`Dutch (Belgian)`,en:`English`,"en-AU":`English (Australia)`,"en-BZ":`English (Belize)`,"en-CA":`English (Canad
160a)`,"en-IE":`English (Ireland)`,"en-JM":`English (Jamaica)`,"en-NZ":`English (New Zealand)`,"en-PH":`English (Philippines)`,"en-ZA":`English (South Africa)`,"en-TT":`English (Trinidad & Tobago)`,"en-GB":`English (United Kingdom)`,"en-US":`English (United States)`,"en-ZW":`English (Zimbabwe)`,eo:`Esperanto`,et:`Estonian`,fo:`Faeroese`,fj:`Fijian`,fi:`Finnish`,fr:`French (Standard)`,"fr-BE":`French (Belgium)`,"fr-CA":`French (Canada)`,"fr-FR":`French (France)`,"fr-LU":`French (Luxembourg)`,"fr-MC":`French (Monaco)`,"fr-CH":`French (Switzerland)`,fy:`Frisian`,fur:`Friulian`,gd:`Gaelic (Scots)`,"gd-IE":`Gaelic (Irish)`,gl:`Galacian`,ka:`Georgian`,de:`German (Standard)`,"de-AT":`German (Austria)`,"de-DE":`German (Germany)`,"de-LI":`German (Liechtenstein)`,"de-LU":`German (Luxembourg)`,"de-CH":`German (Switzerland)`,el:`Greek`,gu:`Gujurati`,ht:`Haitian`,he:`Hebrew`,hi:`Hindi`,hu:`Hungarian`,is:`Icelandic`,id:`Indonesian`,iu:`Inuktitut`,ga:`Irish`,it:`Italian (Standard)`,"it-CH":`Italian (Switzerland)`,ja:`Japanese`,kn:`Kannada`,ks:`Kashmiri`,kk:`Kazakh`,km:`Khmer`,ky:`Kirghiz`,tlh:`Klingon`,ko:`Korean`,"ko-KP":`Korean (North Korea)`,"ko-KR":`Korean (South Korea)`,la:`Latin`,lv:`Latvian`,lt:`Lithuanian`,lb:`Luxembourgish`,mk:`North Macedonia`,ms:`Malay`,ml:`Malayalam`,mt:`Maltese`,mi:`Maori`,mr:`Marathi`,mo:`Moldavian`,nv:`Navajo`,ng:`Ndonga`,ne:`Nepali`,no:`Norwegian`,nb:`Norwegian (Bokmal)`,nn:`Norwegian (Nynorsk)`,oc:`Occitan`,or:`Oriya`,om:`Oromo`,fa:`Persian`,"fa-IR":`Persian/Iran`,pl:`Polish`,pt:`Portuguese`,"pt-BR":`Portuguese (Brazil)`,pa:`Punjabi`,"pa-IN":`Punjabi (India)`,"pa-PK":`Punjabi (Pakistan)`,qu:`Quechua`,rm:`Rhaeto-Romanic`,ro:`Romanian`,"ro-MO":`Romanian (Moldavia)`,ru:`Russian`,"ru-MO":`Russian (Moldavia)`,sz:`Sami (Lappish)`,sg:`Sango`,sa:`Sanskrit`,sc:`Sardinian`,sd:`Sindhi`,si:`Singhalese`,sr:`Serbian`,sk:`Slovak`,sl:`Slovenian`,so:`Somani`,sb:`Sorbian`,es:`Spanish`,"es-AR":`Spanish (Argentina)`,"es-BO":`Spanish (Bolivia)`,"es-CL":`Spanish (Chile)`,"es-CO":`Spanish (Colombia)`,"es-CR":`Spanish (Costa Rica)`,"es-DO":`Spanish (Dominican Republic)`,"es-EC":`Spanish (Ecuador)`,"es-SV":`Spanish (El Salvador)`,"es-GT":`Spanish (Guatemala)`,"es-HN":`Spanish (Honduras)`,"es-MX":`Spanish (Mexico)`,"es-NI":`Spanish (Nicaragua)`,"es-PA":`Spanish (Panama)`,"es-PY":`Spanish (Paraguay)`,"es-PE":`Spanish (Peru)`,"es-PR":`Spanish (Puerto Rico)`,"es-ES":`Spanish (Spain)`,"es-UY":`Spanish (Uruguay)`,"es-VE":`Spanish (Venezuela)`,sx:`Sutu`,sw:`Swahili`,sv:`Swedish`,"sv-FI":`Swedish (Finland)`,"sv-SV":`Swedish (Sweden)`,ta:`Tamil`,tt:`Tatar`,te:`Teluga`,th:`Thai`,tig:`Tigre`,ts:`Tsonga`,tn:`Tswana`,tr:`Turkish`,tk:`Turkmen`,uk:`Ukrainian`,hsb:`Upper Sorbian`,ur:`Urdu`,ve:`Venda`,vi:`Vietnamese`,vo:`Volapuk`,wa:`Walloon`,cy:`Welsh`,xh:`Xhosa`,ji:`Yiddish`,zu:`Zulu`}[e]!==void 0&&(this.internal.languageSettings.languageCode=e,!1===this.internal.languageSettings.isSubscribed&&(this.internal.events.subscribe(`putCatalog`,function(){this.internal.write(`/Lang (`+this.internal.languageSettings.languageCode+`)`)}),this.internal.languageSettings.isSubscribed=!0)),this},HQ=zZ.API,UQ=HQ.getCharWidthsArray=function(e,t){var n,r,i=(t||={}).font||this.internal.getFont(),a=t.fontSize||this.internal.getFontSize(),o=t.charSpace||this.internal.getCharSpace(),s=t.widths?t.widths:i.metadata.Unicode.widths,c=s.fof?s.fof:1,l=t.kerning?t.kerning:i.metadata.Unicode.kerning,u=l.fof?l.fof:1,d=!1!==t.doKerning,f=0,p=e.length,m=0,h=s[0]||c,g=[];for(n=0;n<p;n++)r=e.charCodeAt(n),typeof i.metadata.widthOfString==`function`?g.push((i.metadata.widthOfGlyph(i.metadata.characterToGlyph(r))+1e3/a*o||0)/1e3):(f=d&&wW(l[r])===`object`&&!isNaN(parseInt(l[r][m],10))?l[r][m]/u:0,g.push((s[r]||h)/c+f)),m=r;return g},WQ=HQ.getStringUnitWidth=function(e,t){var n=(t||={}).fontSize||this.internal.getFontSize(),r=t.font||this.internal.getFont(),i=t.charSpace||this.internal.getCharSpace();return HQ.processArabic&&(e=HQ.processArabic(e)),typeof r.metadata.widthOfString==`function`?r.metadata.widthOfString(e,n,i)/n:UQ.apply(this,arguments).reduce(function(e,t){return e+t},0)},GQ=function(e,t,n,r){for(var i=[],a=0,o=e.length,s=0;
160a!==o&&s+t[a]<n;)s+=t[a],a++;i.push(e.slice(0,a));var c=a;for(s=0;a!==o;)s+t[a]>r&&(i.push(e.slice(c,a)),s=0,c=a),s+=t[a],a++;return c!==a&&i.push(e.slice(c,a)),i},KQ=function(e,t,n){n||={};var r,i,a,o,s,c,l,u=[],d=[u],f=n.textIndent||0,p=0,m=0,h=e.split(` `),g=UQ.apply(this,[` `,n])[0];if(c=n.lineIndent===-1?h[0].length+2:n.lineIndent||0){var _=Array(c).join(` `),v=[];h.map(function(e){(e=e.split(/\s*\n/)).length>1?v=v.concat(e.map(function(e,t){return(t&&e.length?` 161`:``)+e})):v.push(e[0])}),h=v,c=WQ.apply(this,[_,n])}for(a=0,o=h.length;a<o;a++){var y=0;if(r=h[a],c&&r[0]==` 162`&&(r=r.substr(1),y=1),f+p+(m=(i=UQ.apply(this,[r,n])).reduce(function(e,t){return e+t},0))>t||y){if(m>t){for(s=GQ.apply(this,[r,i,t-(f+p),t]),u.push(s.shift()),u=[s.pop()];s.length;)d.push([s.shift()]);m=i.slice(r.length-(u[0]?u[0].length:0)).reduce(function(e,t){return e+t},0)}else u=[r];d.push(u),f=m+c,p=g}else u.push(r),f+=p+m,p=g}return l=c?function(e,t){return(t?_:``)+e.join(` `)}:function(e){return e.join(` `)},d.map(l)},HQ.splitTextToSize=function(e,t,n){var r,i=(n||={}).fontSize||this.internal.getFontSize(),a=function(e){if(e.widths&&e.kerning)return{widths:e.widths,kerning:e.kerning};var t=this.internal.getFont(e.fontName,e.fontStyle),n=`Unicode`;return t.metadata[n]?{widths:t.metadata[n].widths||{0:1},kerning:t.metadata[n].kerning||{}}:{font:t.metadata,fontSize:this.internal.getFontSize(),charSpace:this.internal.getCharSpace()}}.call(this,n);r=Array.isArray(e)?e:String(e).split(/\r?\n/);var o=1*this.internal.scaleFactor*t/i;a.textIndent=n.textIndent?1*n.textIndent*this.internal.scaleFactor/i:0,a.lineIndent=n.lineIndent;var s,c,l=[];for(s=0,c=r.length;s<c;s++)l=l.concat(KQ.apply(this,[r[s],o,a]));return l},function(e){e.__fontmetrics__=e.__fontmetrics__||{};for(var t=`0123456789abcdef`,n=`klmnopqrstuvwxyz`,r={},i={},a=0;a<16;a++)r[n[a]]=t[a],i[t[a]]=n[a];var o=function(e){return`0x`+parseInt(e,10).toString(16)},s=e.__fontmetrics__.compress=function(e){var t,n,r,a,c=[`{`];for(var l in e){if(t=e[l],isNaN(parseInt(l,10))?n=`'`+l+`'`:(l=parseInt(l,10),n=(n=o(l).slice(2)).slice(0,-1)+i[n.slice(-1)]),typeof t==`number`)t<0?(r=o(t).slice(3),a=`-`):(r=o(t).slice(2),a=``),r=a+r.slice(0,-1)+i[r.slice(-1)];else{if(wW(t)!==`object`)throw Error(`Don't know what to do with value type `+wW(t)+`.`);r=s(t)}c.push(n+r)}return c.push(`}`),c.join(``)},c=e.__fontmetrics__.uncompress=function(e){if(typeof e!=`string`)throw Error(`Invalid argument passed to uncompress.`);for(var t,n,i,a,o={},s=1,c=o,l=[],u=``,d=``,f=e.length-1,p=1;p<f;p+=1)(a=e[p])==`'`?t?(i=t.join(``),t=void 0):t=[]:t?t.push(a):a==`{`?(l.push([c,i]),c={},i=void 0):a==`}`?((n=l.pop())[0][n[1]]=c,i=void 0,c=n[0]):a==`-`?s=-1:i===void 0?r.hasOwnProperty(a)?(u+=r[a],i=parseInt(u,16)*s,s=1,u=``):u+=a:r.hasOwnProperty(a)?(d+=r[a],c[i]=parseInt(d,16)*s,s=1,i=void 0,d=``):d+=a;return o},l={codePages:[`WinAnsiEncoding`],WinAnsiEncoding:c(`{19m8n201n9q201o9r201s9l201t9m201u8m201w9n201x9o201y8o202k8q202l8r202m9p202q8p20aw8k203k8t203t8v203u9v2cq8s212m9t15m8w15n9w2dw9s16k8u16l9u17s9z17x8y17y9y}`)},u={Unicode:{Courier:l,"Courier-Bold":l,"Courier-BoldOblique":l,"Courier-Oblique":l,Helvetica:l,"Helvetica-Bold":l,"Helvetica-BoldOblique":l,"Helvetica-Oblique":l,"Times-Roman":l,"Times-Bold":l,"Times-BoldItalic":l,"Times-Italic":l}},d={Unicode:{"Courier-Oblique":c(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-BoldItalic":c(`{'widths'{k3o2q4ycx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2r202m2n2n3m2o3m2p5n202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5n4l4m4m4m4n4m4o4s4p4m4q4m4r4s4s4y4t2r4u3m4v4m4w3x4x5t4y4s4z4s5k3x5l4s5m4m5n3r5o3x5p4s5q4m5r5t5s4m5t3x5u3x5v2l5w1w5x2l5y3t5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q2l6r3m6s3r6t1w6u1w6v3m6w1w6x4y6y3r6z3m7k3m7l3m7m2r7n2r7o1w7p3r7q2w7r4m7s3m7t2w7u2r7v2n7w1q7x2n7y3t202l3mcl4mal2ram3man3mao3map3mar3mas2lat4uau1uav3maw3way4uaz2lbk2sbl3t'fof'6obo2lbp3tbq3mbr1tbs2lbu1ybv3mbz3mck4m202k3mcm4mcn4mco4mcp4mcq5ycr4mcs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4ser2wes2wet2
162weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz2w203k6o212m6o2dw2l2cq2l3t3m3u2l17s3x19m3m}'kerning'{cl{4qu5kt5qt5rs17ss5ts}201s{201ss}201t{cks4lscmscnscoscpscls2wu2yu201ts}201x{2wu2yu}2k{201ts}2w{4qx5kx5ou5qx5rs17su5tu}2x{17su5tu5ou}2y{4qx5kx5ou5qx5rs17ss5ts}'fof'-6ofn{17sw5tw5ou5qw5rs}7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qs}3v{17su5tu5os5qs}7p{17su5tu}ck{4qu5kt5qt5rs17ss5ts}4l{4qu5kt5qt5rs17ss5ts}cm{4qu5kt5qt5rs17ss5ts}cn{4qu5kt5qt5rs17ss5ts}co{4qu5kt5qt5rs17ss5ts}cp{4qu5kt5qt5rs17ss5ts}6l{4qu5ou5qw5rt17su5tu}5q{ckuclucmucnucoucpu4lu}5r{ckuclucmucnucoucpu4lu}7q{cksclscmscnscoscps4ls}6p{4qu5ou5qw5rt17sw5tw}ek{4qu5ou5qw5rt17su5tu}el{4qu5ou5qw5rt17su5tu}em{4qu5ou5qw5rt17su5tu}en{4qu5ou5qw5rt17su5tu}eo{4qu5ou5qw5rt17su5tu}ep{4qu5ou5qw5rt17su5tu}es{17ss5ts5qs4qu}et{4qu5ou5qw5rt17sw5tw}eu{4qu5ou5qw5rt17ss5ts}ev{17ss5ts5qs4qu}6z{17sw5tw5ou5qw5rs}fm{17sw5tw5ou5qw5rs}7n{201ts}fo{17sw5tw5ou5qw5rs}fp{17sw5tw5ou5qw5rs}fq{17sw5tw5ou5qw5rs}7r{cksclscmscnscoscps4ls}fs{17sw5tw5ou5qw5rs}ft{17su5tu}fu{17su5tu}fv{17su5tu}fw{17su5tu}fz{cksclscmscnscoscps4ls}}}`),"Helvetica-Bold":c(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4y
162dn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),Courier:c(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-BoldOblique":c(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Bold":c(`{'widths'{k3q2q5ncx2r201n3m201o6o201s2l201t2l201u2l201w3m201x3m201y3m2k1t2l2l202m2n2n3m2o3m2p6o202q6o2r1w2s2l2t2l2u3m2v3t2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w3t3x3t3y3t3z3m4k5x4l4s4m4m4n4s4o4s4p4m4q3x4r4y4s4y4t2r4u3m4v4y4w4m4x5y4y4s4z4y5k3x5l4y5m4s5n3r5o4m5p4s5q4s5r6o5s4s5t4s5u4m5v2l5w1w5x2l5y3u5z3m6k2l6l3m6m3r6n2w6o3r6p2w6q2l6r3m6s3r6t1w6u2l6v3r6w1w6x5n6y3r6z3m7k3r7l3r7m2w7n2r7o2l7p3r7q3m7r4s7s3m7t3m7u2w7v2r7w1q7x2r7y3o202l3mcl4sal2lam3man3mao3map3mar3mas2lat4uau1yav3maw3tay4uaz2lbk2sbl3t'fof'6obo2lbp3rbr1tbs2lbu2lbv3mbz3mck4s202k3mcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw2r2m3rcy2rcz2rdl4sdm4ydn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3rek3mel3mem3men3meo3mep3meq4ser2wes2wet2weu2wev2wew1wex1wey1wez1wfl3rfm3mfn3mfo3mfp3mfq3mfr3tfs3mft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3m3u2l17s4s19m3m}'kerning'{cl{4qt5ks5ot5qy5rw17sv5tv}201t{cks4lscmscnscoscpscls4wv}2k{201ts}2w{4qu5ku7mu5os5qx5ru17su5tu}2x{17su5tu5ou5qs}2y{4qv5kv7mu5ot5qz5ru17su5tu}'fof'-6o7t{cksclscmscnscoscps4ls}3u{17su5tu5os5qu}3v{17su5tu5os5qu}fu{17su5tu5ou5qu}7p{17su5tu5ou5qu}ck{4qt5ks5ot5qy5rw17sv5tv}4l{4qt5ks5ot5qy5rw17sv5tv}cm{4qt5ks5ot5qy5rw17sv5tv}cn{4qt5ks5ot5qy5rw17sv5tv}co{4qt5ks5ot5qy5rw17sv5tv}cp{4qt5ks5ot5qy5rw17sv5tv}6l{17st5tt5ou5qu}17s{ckuclucmucnucoucpu4lu4wu}5o{ckuclucmucnucoucpu4lu4wu}5q{ckzclzcmzcnzcozcpz4lz4wu}5r{ckxclxcmxcnxcoxcpx4lx4wu}5t{ckuclucmucnucoucpu4lu4wu}7q{ckuclucmucnucoucpu4lu}6p{17sw5tw5ou5qu}ek{17st5tt5qu}el{17st5tt5ou5qu}em{17st5tt5qu}en{17st5tt5qu}eo{17st5tt5qu}ep{17st5tt5ou5qu}es{17ss5ts5qu}et{17sw5tw5ou5qu}eu{17sw5tw5ou5qu}ev{17ss5ts5qu}6z{17sw5tw5ou5qu5rs}fm{17sw5tw5ou5qu5rs}fn{17sw5tw5ou5qu5rs}fo{17sw5tw5ou5qu5rs}fp{17sw5tw5ou5qu5rs}fq{17sw5tw5ou5qu5rs}7r{cktcltcmtcntcotcpt4lt5os}fs{17sw5tw5ou5qu5rs}ft{17su5tu5ou5qu}7m{5os}fv{17su5tu5ou5qu}fw{17su5tu5ou5qu}fz{cksclscmscnscoscps4ls}}}`),Symbol:c(`{'widths'{k3uaw4r19m3m2k1t2l2l202m2y2n3m2p5n202q6o3k3m2s2l2t2l2v3r2w1t3m3m2y1t2z1wbk2sbl3r'fof'6o3n3m3o3m3p3m3q3m3r3m3s3m3t3m3u1w3v1w3w3r3x3r3y3r3z2wbp3t3l3m5v2l5x2l5z3m2q4yfr3r7v3k7w1o7x3k}'kerning'{'fof'-6o}}`),Helvetica:c(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4y
162dn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`),"Helvetica-BoldOblique":c(`{'widths'{k3s2q4scx1w201n3r201o6o201s1w201t1w201u1w201w3m201x3m201y3m2k1w2l2l202m2n2n3r2o3r2p5t202q6o2r1s2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v2l3w3u3x3u3y3u3z3x4k6l4l4s4m4s4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3r4v4s4w3x4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v2l5w1w5x2l5y3u5z3r6k2l6l3r6m3x6n3r6o3x6p3r6q2l6r3x6s3x6t1w6u1w6v3r6w1w6x5t6y3x6z3x7k3x7l3x7m2r7n3r7o2l7p3x7q3r7r4y7s3r7t3r7u3m7v2r7w1w7x2r7y3u202l3rcl4sal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3xbq3rbr1wbs2lbu2obv3rbz3xck4s202k3rcm4scn4sco4scp4scq6ocr4scs4mct4mcu4mcv4mcw1w2m2zcy1wcz1wdl4sdm4y
162dn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3res3ret3reu3rev3rew1wex1wey1wez1wfl3xfm3xfn3xfo3xfp3xfq3xfr3ufs3xft3xfu3xfv3xfw3xfz3r203k6o212m6o2dw2l2cq2l3t3r3u2l17s4m19m3r}'kerning'{cl{4qs5ku5ot5qs17sv5tv}201t{2ww4wy2yw}201w{2ks}201x{2ww4wy2yw}2k{201ts201xs}2w{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}2x{5ow5qs}2y{7qs4qu5kw5os5qw5rs17su5tu7tsfzs}'fof'-6o7p{17su5tu5ot}ck{4qs5ku5ot5qs17sv5tv}4l{4qs5ku5ot5qs17sv5tv}cm{4qs5ku5ot5qs17sv5tv}cn{4qs5ku5ot5qs17sv5tv}co{4qs5ku5ot5qs17sv5tv}cp{4qs5ku5ot5qs17sv5tv}6l{17st5tt5os}17s{2kwclvcmvcnvcovcpv4lv4wwckv}5o{2kucltcmtcntcotcpt4lt4wtckt}5q{2ksclscmscnscoscps4ls4wvcks}5r{2ks4ws}5t{2kwclvcmvcnvcovcpv4lv4wwckv}eo{17st5tt5os}fu{17su5tu5ot}6p{17ss5ts}ek{17st5tt5os}el{17st5tt5os}em{17st5tt5os}en{17st5tt5os}6o{201ts}ep{17st5tt5os}es{17ss5ts}et{17ss5ts}eu{17ss5ts}ev{17ss5ts}6z{17su5tu5os5qt}fm{17su5tu5os5qt}fn{17su5tu5os5qt}fo{17su5tu5os5qt}fp{17su5tu5os5qt}fq{17su5tu5os5qt}fs{17su5tu5os5qt}ft{17su5tu5ot}7m{5os}fv{17su5tu5ot}fw{17su5tu5ot}}}`),ZapfDingbats:c(`{'widths'{k4u2k1w'fof'6o}'kerning'{'fof'-6o}}`),"Courier-Bold":c(`{'widths'{k3w'fof'6o}'kerning'{'fof'-6o}}`),"Times-Italic":c(`{'widths'{k3n2q4ycx2l201n3m201o5t201s2l201t2l201u2l201w3r201x3r201y3r2k1t2l2l202m2n2n3m2o3m2p5n202q5t2r1p2s2l2t2l2u3m2v4n2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v2l3w4n3x4n3y4n3z3m4k5w4l3x4m3x4n4m4o4s4p3x4q3x4r4s4s4s4t2l4u2w4v4m4w3r4x5n4y4m4z4s5k3x5l4s5m3x5n3m5o3r5p4s5q3x5r5n5s3x5t3r5u3r5v2r5w1w5x2r5y2u5z3m6k2l6l3m6m3m6n2w6o3m6p2w6q1w6r3m6s3m6t1w6u1w6v2w6w1w6x4s6y3m6z3m7k3m7l3m7m2r7n2r7o1w7p3m7q2w7r4m7s2w7t2w7u2r7v2s7w1v7x2s7y3q202l3mcl3xal2ram3man3mao3map3mar3mas2lat4wau1vav3maw4nay4waz2lbk2sbl4n'fof'6obo2lbp3mbq3obr1tbs2lbu1zbv3mbz3mck3x202k3mcm3xcn3xco3xcp3xcq5tcr4mcs3xct3xcu3xcv3xcw2l2m2ucy2lcz2ldl4mdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek3mel3mem3men3meo3mep3meq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr4nfs3mft3mfu3mfv3mfw3mfz2w203k6o212m6m2dw2l2cq2l3t3m3u2l17s3r19m3m}'kerning'{cl{5kt4qw}201s{201sw}201t{201tw2wy2yy6q-t}201x{2wy2yy}2k{201tw}2w{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}2x{17ss5ts5os}2y{7qs4qy7rs5ky7mw5os5qx5ru17su5tu}'fof'-6o6t{17ss5ts5qs}7t{5os}3v{5qs}7p{17su5tu5qs}ck{5kt4qw}4l{5kt4qw}cm{5kt4qw}cn{5kt4qw}co{5kt4qw}cp{5kt4qw}6l{4qs5ks5ou5qw5ru17su5tu}17s{2ks}5q{ckvclvcmvcnvcovcpv4lv}5r{ckuclucmucnucoucpu4lu}5t{2ks}6p{4qs5ks5ou5qw5ru17su5tu}ek{4qs5ks5ou5qw5ru17su5tu}el{4qs5ks5ou5qw5ru17su5tu}em{4qs5ks5ou5qw5ru17su5tu}en{4qs5ks5ou5qw5ru17su5tu}eo{4qs5ks5ou5qw5ru17su5tu}ep{4qs5ks5ou5qw5ru17su5tu}es{5ks5qs4qs}et{4qs5ks5ou5qw5ru17su5tu}eu{4qs5ks5qw5ru17su5tu}ev{5ks5qs4qs}ex{17ss5ts5qs}6z{4qv5ks5ou5qw5ru17su5tu}fm{4qv5ks5ou5qw5ru17su5tu}fn{4qv5ks5ou5qw5ru17su5tu}fo{4qv5ks5ou5qw5ru17su5tu}fp{4qv5ks5ou5qw5ru17su5tu}fq{4qv5ks5ou5qw5ru17su5tu}7r{5os}fs{4qv5ks5ou5qw5ru17su5tu}ft{17su5tu5qs}fu{17su5tu5qs}
162fv{17su5tu5qs}fw{17su5tu5qs}}}`),"Times-Roman":c(`{'widths'{k3n2q4ycx2l201n3m201o6o201s2l201t2l201u2l201w2w201x2w201y2w2k1t2l2l202m2n2n3m2o3m2p5n202q6o2r1m2s2l2t2l2u3m2v3s2w1t2x2l2y1t2z1w3k3m3l3m3m3m3n3m3o3m3p3m3q3m3r3m3s3m203t2l203u2l3v1w3w3s3x3s3y3s3z2w4k5w4l4s4m4m4n4m4o4s4p3x4q3r4r4s4s4s4t2l4u2r4v4s4w3x4x5t4y4s4z4s5k3r5l4s5m4m5n3r5o3x5p4s5q4s5r5y5s4s5t4s5u3x5v2l5w1w5x2l5y2z5z3m6k2l6l2w6m3m6n2w6o3m6p2w6q2l6r3m6s3m6t1w6u1w6v3m6w1w6x4y6y3m6z3m7k3m7l3m7m2l7n2r7o1w7p3m7q3m7r4s7s3m7t3m7u2w7v3k7w1o7x3k7y3q202l3mcl4sal2lam3man3mao3map3mar3mas2lat4wau1vav3maw3say4waz2lbk2sbl3s'fof'6obo2lbp3mbq2xbr1tbs2lbu1zbv3mbz2wck4s202k3mcm4scn4sco4scp4scq5tcr4mcs3xct3xcu3xcv3xcw2l2m2tcy2lcz2ldl4sdm4sdn4sdo4sdp4sdq4sds4sdt4sdu4sdv4sdw4sdz3mek2wel2wem2wen2weo2wep2weq4mer2wes2wet2weu2wev2wew1wex1wey1wez1wfl3mfm3mfn3mfo3mfp3mfq3mfr3sfs3mft3mfu3mfv3mfw3mfz3m203k6o212m6m2dw2l2cq2l3t3m3u1w17s4s19m3m}'kerning'{cl{4qs5ku17sw5ou5qy5rw201ss5tw201ws}201s{201ss}201t{ckw4lwcmwcnwcowcpwclw4wu201ts}2k{201ts}2w{4qs5kw5os5qx5ru17sx5tx}2x{17sw5tw5ou5qu}2y{4qs5kw5os5qx5ru17sx5tx}'fof'-6o7t{ckuclucmucnucoucpu4lu5os5rs}3u{17su5tu5qs}3v{17su5tu5qs}7p{17sw5tw5qs}ck{4qs5ku17sw5ou5qy5rw201ss5tw201ws}4l{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cm{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cn{4qs5ku17sw5ou5qy5rw201ss5tw201ws}co{4qs5ku17sw5ou5qy5rw201ss5tw201ws}cp{4qs5ku17sw5ou5qy5rw201ss5tw201ws}6l{17su5tu5os5qw5rs}17s{2ktclvcmvcnvcovcpv4lv4wuckv}5o{ckwclwcmwcnwcowcpw4lw4wu}5q{ckyclycmycnycoycpy4ly4wu5ms}5r{cktcltcmtcntcotcpt4lt4ws}5t{2ktclvcmvcnvcovcpv4lv4wuckv}7q{cksclscmscnscoscps4ls}6p{17su5tu5qw5rs}ek{5qs5rs}el{17su5tu5os5qw5rs}em{17su5tu5os5qs5rs}en{17su5qs5rs}eo{5qs5rs}ep{17su5tu5os5qw5rs}es{5qs}et{17su5tu5qw5rs}eu{17su5tu5qs5rs}ev{5qs}6z{17sv5tv5os5qx5rs}fm{5os5qt5rs}fn{17sv5tv5os5qx5rs}fo{17sv5tv5os5qx5rs}fp{5os5qt5rs}fq{5os5qt5rs}7r{ckuclucmucnucoucpu4lu5os}fs{17sv5tv5os5qx5rs}ft{17ss5ts5qs}fu{17sw5tw5qs}fv{17sw5tw5qs}fw{17ss5ts5qs}fz{ckuclucmucnucoucpu4lu5os5rs}}}`),"Helvetica-Oblique":c(`{'widths'{k3p2q4mcx1w201n3r201o6o201s1q201t1q201u1q201w2l201x2l201y2l2k1w2l1w202m2n2n3r2o3r2p5t202q6o2r1n2s2l2t2l2u2r2v3u2w1w2x2l2y1w2z1w3k3r3l3r3m3r3n3r3o3r3p3r3q3r3r3r3s3r203t2l203u2l3v1w3w3u3x3u3y3u3z3r4k6p4l4m4m4m4n4s4o4s4p4m4q3x4r4y4s4s4t1w4u3m4v4m4w3r4x5n4y4s4z4y5k4m5l4y5m4s5n4m5o3x5p4s5q4m5r5y5s4m5t4m5u3x5v1w5w1w5x1w5y2z5z3r6k2l6l3r6m3r6n3m6o3r6p3r6q1w6r3r6s3r6t1q6u1q6v3m6w1q6x5n6y3r6z3r7k3r7l3r7m2l7n3m7o1w7p3r7q3m7r4s7s3m7t3m7u3m7v2l7w1u7x2l7y3u202l3rcl4mal2lam3ran3rao3rap3rar3ras2lat4tau2pav3raw3uay4taz2lbk2sbl3u'fof'6obo2lbp3rbr1wbs2lbu2obv3rbz3xck4m202k3rcm4mcn4mco4mcp4mcq6ocr4scs4mct4mcu4mcv4mcw1w2m2ncy1wcz1wdl4sdm4y
162dn4ydo4ydp4ydq4yds4ydt4sdu4sdv4sdw4sdz3xek3rel3rem3ren3reo3rep3req5ter3mes3ret3reu3rev3rew1wex1wey1wez1wfl3rfm3rfn3rfo3rfp3rfq3rfr3ufs3xft3rfu3rfv3rfw3rfz3m203k6o212m6o2dw2l2cq2l3t3r3u1w17s4m19m3r}'kerning'{5q{4wv}cl{4qs5kw5ow5qs17sv5tv}201t{2wu4w1k2yu}201x{2wu4wy2yu}17s{2ktclucmucnu4otcpu4lu4wycoucku}2w{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}2x{17sy5ty5oy5qs}2y{7qs4qz5k1m17sy5ow5qx5rsfsu5ty7tufzu}'fof'-6o7p{17sv5tv5ow}ck{4qs5kw5ow5qs17sv5tv}4l{4qs5kw5ow5qs17sv5tv}cm{4qs5kw5ow5qs17sv5tv}cn{4qs5kw5ow5qs17sv5tv}co{4qs5kw5ow5qs17sv5tv}cp{4qs5kw5ow5qs17sv5tv}6l{17sy5ty5ow}do{17st5tt}4z{17st5tt}7s{fst}dm{17st5tt}dn{17st5tt}5o{ckwclwcmwcnwcowcpw4lw4wv}dp{17st5tt}dq{17st5tt}7t{5ow}ds{17st5tt}5t{2ktclucmucnu4otcpu4lu4wycoucku}fu{17sv5tv5ow}6p{17sy5ty5ow5qs}ek{17sy5ty5ow}el{17sy5ty5ow}em{17sy5ty5ow}en{5ty}eo{17sy5ty5ow}ep{17sy5ty5ow}es{17sy5ty5qs}et{17sy5ty5ow5qs}eu{17sy5ty5ow5qs}ev{17sy5ty5ow5qs}6z{17sy5ty5ow5qs}fm{17sy5ty5ow5qs}fn{17sy5ty5ow5qs}fo{17sy5ty5ow5qs}fp{17sy5ty5qs}fq{17sy5ty5ow5qs}7r{5ow}fs{17sy5ty5ow5qs}ft{17sv5tv5ow}7m{5ow}fv{17sv5tv5ow}fw{17sv5tv5ow}}}`)}};e.events.push([`addFont`,function(e){var t=e.font,n=d.Unicode[t.postScriptName];n&&(t.metadata.Unicode={},t.metadata.Unicode.widths=n.widths,t.metadata.Unicode.kerning=n.kerning);var r=u.Unicode[t.postScriptName];r&&(t.metadata.Unicode.encoding=r,t.encoding=r.codePages[0])}])}(zZ.API),function(e){var t=function(e){for(var t=e.length,n=new Uint8Array(t),r=0;r<t;r++)n[r]=e.charCodeAt(r);return n};e.API.events.push([`addFont`,function(n){var r=void 0,i=n.font,a=n.instance;if(!i.isStandardFont){if(a===void 0)throw Error(`Font does not exist in vFS, import fonts or remove declaration doc.addFont('`+i.postScriptName+`').`);if(typeof(r=!1===a.existsFileInVFS(i.postScriptName)?a.loadFile(i.postScriptName):a.getFileFromVFS(i.postScriptName))!=`string`)throw Error(`Font is not stored as string-data in vFS, import fonts or remove declaration doc.addFont('`+i.postScriptName+`').`);(function(n,r){r=/^\x00\x01\x00\x00/.test(r)?t(r):t(mZ(r)),n.metadata=e.API.TTFFont.open(r),n.metadata.Unicode=n.metadata.Unicode||{encoding:{},kerning:{},widths:[]},n.metadata.glyIdsUsed=[0]})(i,r)}}])}(zZ),zZ.API.addSvgAsImage=function(e,t,n,r,i,a,o,s){if(isNaN(t)||isNaN(n))throw cZ.error(`jsPDF.addSvgAsImage: Invalid coordinates`,arguments),Error(`Invalid coordinates passed to jsPDF.addSvgAsImage`);if(isNaN(r)||isNaN(i))throw cZ.error(`jsPDF.addSvgAsImage: Invalid measurements`,arguments),Error(`Invalid measurements (width and/or height) passed to jsPDF.addSvgAsImage`);var c=document.createElement(`canvas`);c.width=r,c.height=i;var l=c.getContext(`2d`);l.fillStyle=`#fff`,l.fillRect(0,0,c.width,c.height);var u={ignoreMouse:!0,ignoreAnimation:!0,ignoreDimensions:!0},d=this;return(oZ.canvg?Promise.resolve(oZ.canvg):aZ(()=>import(`./index.es-BYPXqrpV.js`),[])).catch(function(e){return Promise.reject(Error(`Could not load canvg: `+e))}).then(function(e){return e.default?e.default:e}).then(function(t){return t.fromString(l,e,u)},function(){return Promise.reject(Error(`Could not load canvg.`))}).then(function(e){return e.render(u)}).then(function(){d.addImage(c.toDataURL(`image/jpeg`,1),t,n,r,i,o,s)})},zZ.API.putTotalPages=function(e){var t,n=0;parseInt(this.internal.getFont().id.substr(1),10)<15?(t=new RegExp(e,`g`),n=this.internal.getNumberOfPages()):(t=new RegExp(this.pdfEscape16(e,this.internal.getFont()),`g`),n=this.pdfEscape16(this.internal.getNumberOfPages()+``,this.internal.getFont()));for(var r=1;r<=this.internal.getNumberOfPages();r++)for(var i=0;i<this.internal.pages[r].length;i++)this.internal.pages[r][i]=this.internal.pages[r][i].replace(t,n);return this},zZ.API.viewerPreferences=function(e,t){var n;e||={},t||=!1;var r,i,a,o={HideToolbar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideMenubar:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},HideWindowUI:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},FitWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},CenterWindow:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.3},DisplayDocTitle:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.4},NonFullScreenPageMode:{defaultValue:`UseNone`,value:`UseNone`,type:`name`,explicitSet:!1,valueSet:[`UseNone`,`UseOutlines`,`UseThumbs`,`UseOC`],pdfVersion:1.3},Direction:{defaultValue:`L2R`,value:`L2R`,type:`name`,explicitSet:!1,valueSet:[`L2R`,`R2L`],pdfVersion:1.3},ViewArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},ViewClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintArea:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintClip:{defaultValue:`CropBox`,value:`CropBox`,type:`name`,explicitSet:!1,valueSet:[`MediaBox`,`CropBox`,`TrimBox`,`BleedBox`,`ArtBox`],pdfVersion:1.4},PrintScaling:{defaultValue:`AppDefault`,value:`AppDefault`,type:`name`,explicitSet:!1,valueSet:[`AppDefault`,`None`],pdfVersion:1.6},Duplex:{defaultValue:``,value:`none`,type:`name`,explicitSet:!1,valueSet:[`Simplex`,`DuplexFlipShortEdge`,`DuplexFlipLongEdge`,`none`],pdfVersion:1.7},PickTrayByPDFSize:{defaultValue:!1,value:!1,type:`boolean`,explicitSet:!1,valueSet:[!0,!1],pdfVersion:1.7},PrintPageRange:{defaultValue:``,value:``,type:`array`,explicitSet:!1,valueSet:null,pdfVersion:1.7},NumCopies:{defaultValue:1,value:1,type:`integer`,explicitSet:!1,valueSet:null,pdfVersion:1.7}},s=Object.keys(o),c=[],l=0,u=0,d=0;function f(e,t){var n,r=!1;for(n=0;n<e.length;n+=1)e[n]===t&&(r=!0);return r}if(this.internal.viewerpreferences===void 0&&(this.internal.viewerpreferences={},this.internal.viewerpreferences.configuration=JSON.parse(JSON.stringify(o)),this.internal.viewerpreferences.isSubscribed=!1),n=this.internal.viewerpreferences.configuration,e===`reset`||!0===t){var p=s.length;for(d=0;d<p;d+=1)n[s[d]].value=n[s[d]].defaultValue,n[s[d]].explicitSet=!1}if(wW(e)===`object`){for(i in e)if(a=e[i],f(s,i)&&a!==void 0){if(n[i].type===`boolean`&&typeof a==`boolean`)n[i].value=a;else if(n[i].type===`name`&&f(n[i].valueSet,a))n[i].value=a;else if(n[i].type===`integer`&&Number.isInteger(a))n[i].value=a;else if(n[i].type===`array`){for(l=0;l<a.length;l+=1)if(r=!0,a[l].length===1&&typeof a[l][0]==`number`)c.push(String(a[l]-1));else if(a[l].length>1){for(u=0;
162u<a[l].length;u+=1)typeof a[l][u]!=`number`&&(r=!1);!0===r&&c.push([a[l][0]-1,a[l][1]-1].join(` `))}n[i].value=`[`+c.join(` `)+`]`}else n[i].value=n[i].defaultValue;n[i].explicitSet=!0}}return!1===this.internal.viewerpreferences.isSubscribed&&(this.internal.events.subscribe(`putCatalog`,function(){var e,t=[];for(e in n)!0===n[e].explicitSet&&(n[e].type===`name`?t.push(`/`+e+` /`+n[e].value):t.push(`/`+e+` `+n[e].value));t.length!==0&&this.internal.write(`/ViewerPreferences 163<< 164`+t.join(` 165`)+` 166>>`)}),this.internal.viewerpreferences.isSubscribed=!0),this.internal.viewerpreferences.configuration=n,this},zZ.API.addMetadata=function(e,t){return this.internal.__metadata__===void 0&&(this.internal.__metadata__={metadata:e,namespaceUri:t??`http://jspdf.default.namespaceuri/`,rawXml:typeof t==`boolean`&&t},this.internal.events.subscribe(`putCatalog`,d$),this.internal.events.subscribe(`postPutResources`,u$)),this},function(e){var t=e.API,n=t.pdfEscape16=function(e,t){for(var n,r=t.metadata.Unicode.widths,i=[``,`0`,`00`,`000`,`0000`],a=[``],o=0,s=e.length;o<s;++o){if(n=t.metadata.characterToGlyph(e.charCodeAt(o)),t.metadata.glyIdsUsed.push(n),t.metadata.toUnicode[n]=e.charCodeAt(o),r.indexOf(n)==-1&&(r.push(n),r.push([parseInt(t.metadata.widthOfGlyph(n),10)])),n==`0`)return a.join(``);n=n.toString(16),a.push(i[4-n.length],n)}return a.join(``)},r=function(e){var t,n,r,i,a,o,s;for(a=`/CIDInit /ProcSet findresource begin 16712 dict begin 168begincmap 169/CIDSystemInfo << 170 /Registry (Adobe) 171 /Ordering (UCS) 172 /Supplement 0 173>> def 174/CMapName /Adobe-Identity-UCS def 175/CMapType 2 def 1761 begincodespacerange 177<0000><ffff> 178endcodespacerange`,r=[],o=0,s=(n=Object.keys(e).sort(function(e,t){return e-t})).length;o<s;o++)t=n[o],r.length>=100&&(a+=` 179`+r.length+` beginbfchar 180`+r.join(` 181`)+` 182endbfchar`,r=[]),e[t]!==void 0&&e[t]!==null&&typeof e[t].toString==`function`&&(i=(`0000`+e[t].toString(16)).slice(-4),t=(`0000`+(+t).toString(16)).slice(-4),r.push(`<`+t+`><`+i+`>`));return r.length&&(a+=` 183`+r.length+` beginbfchar 184`+r.join(` 185`)+` 186endbfchar 187`),a+`endcmap 188CMapName currentdict /CMap defineresource pop 189end 190end`};t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&n.encoding===`Identity-H`){for(var s=n.metadata.Unicode.widths,c=n.metadata.subset.encode(n.metadata.glyIdsUsed,1),l=``,u=0;u<c.length;u++)l+=String.fromCharCode(c[u]);var d=a();o({data:l,addLength1:!0,objectId:d}),i(`endobj`);var f=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:f}),i(`endobj`);var p=a();i(`<<`),i(`/Type /FontDescriptor`),i(`/FontName /`+NZ(n.fontName)),i(`/FontFile2 `+d+` 0 R`),i(`/FontBBox `+e.API.PDFObject.convert(n.metadata.bbox)),i(`/Flags `+n.metadata.flags),i(`/StemV `+n.metadata.stemV),i(`/ItalicAngle `+n.metadata.italicAngle),i(`/Ascent `+n.metadata.ascender),i(`/Descent `+n.metadata.decender),i(`/CapHeight `+n.metadata.capHeight),i(`>>`),i(`endobj`);var m=a();i(`<<`),i(`/Type /Font`),i(`/BaseFont /`+NZ(n.fontName)),i(`/FontDescriptor `+p+` 0 R`),i(`/W `+e.API.PDFObject.convert(s)),i(`/CIDToGIDMap /Identity`),i(`/DW 1000`),i(`/Subtype /CIDFontType2`),i(`/CIDSystemInfo`),i(`<<`),i(`/Supplement 0`),i(`/Registry (Adobe)`),i(`/Ordering (`+n.encoding+`)`),i(`>>`),i(`>>`),i(`endobj`),n.objectNumber=a(),i(`<<`),i(`/Type /Font`),i(`/Subtype /Type0`),i(`/ToUnicode `+f+` 0 R`),i(`/BaseFont /`+NZ(n.fontName)),i(`/Encoding /`+n.encoding),i(`/DescendantFonts [`+m+` 0 R]`),i(`>>`),i(`endobj`),n.isAlreadyPutted=!0}})(t)}]),t.events.push([`putFont`,function(t){(function(t){var n=t.font,i=t.out,a=t.newObject,o=t.putStream;if(n.metadata instanceof e.API.TTFFont&&n.encoding===`WinAnsiEncoding`){for(var s=n.metadata.rawData,c=``,l=0;l<s.length;l++)c+=String.fromCharCode(s[l]);var u=a();o({data:c,addLength1:!0,objectId:u}),i(`endobj`);var d=a();o({data:r(n.metadata.toUnicode),addLength1:!0,objectId:d}),i(`endobj`);var f=a();i(`<<`),i(`/Descent `+n.metadata.decender),i(`/CapHeight `+n.metadata.capHeight),i(`/StemV `+n.metadata.stemV),i(`/Type /FontDescriptor`),i(`/FontFile2 `+u+` 0 R`),i(`/Flags 96`),i(`/FontBBox `+e.API.PDFObject.convert(n.metadata.bbox)),i(`/F
190ontName /`+NZ(n.fontName)),i(`/ItalicAngle `+n.metadata.italicAngle),i(`/Ascent `+n.metadata.ascender),i(`>>`),i(`endobj`),n.objectNumber=a();for(var p=0;p<n.metadata.hmtx.widths.length;p++)n.metadata.hmtx.widths[p]=parseInt(n.metadata.hmtx.widths[p]*(1e3/n.metadata.head.unitsPerEm));i(`<</Subtype/TrueType/Type/Font/ToUnicode `+d+` 0 R/BaseFont/`+NZ(n.fontName)+`/FontDescriptor `+f+` 0 R/Encoding/`+n.encoding+` /FirstChar 29 /LastChar 255 /Widths `+e.API.PDFObject.convert(n.metadata.hmtx.widths)+`>>`),i(`endobj`),n.isAlreadyPutted=!0}})(t)}]);var i=function(e){var t,r=e.text||``,i=e.x,a=e.y,o=e.options||{},s=e.mutex||{},c=s.pdfEscape,l=s.activeFontKey,u=s.fonts,d=l,f=``,p=0,m=``,h=u[d].encoding;if(u[d].encoding!==`Identity-H`)return{text:r,x:i,y:a,options:o,mutex:s};for(m=r,d=l,Array.isArray(r)&&(m=r[0]),p=0;p<m.length;p+=1)u[d].metadata.hasOwnProperty(`cmap`)&&(t=u[d].metadata.cmap.unicode.codeMap[m[p].charCodeAt(0)]),t||m[p].charCodeAt(0)<256&&u[d].metadata.hasOwnProperty(`Unicode`)?f+=m[p]:f+=``;var g=``;return parseInt(d.slice(1))<14||h===`WinAnsiEncoding`?g=c(f,d).split(``).map(function(e){return e.charCodeAt(0).toString(16)}).join(``):h===`Identity-H`&&(g=n(f,u[d])),s.isHex=!0,{text:g,x:i,y:a,options:o,mutex:s}};t.events.push([`postProcessText`,function(e){var t=e.text||``,n=[],r={text:t,x:e.x,y:e.y,options:e.options,mutex:e.mutex};if(Array.isArray(t)){var a=0;for(a=0;a<t.length;a+=1)Array.isArray(t[a])&&t[a].length===3?n.push([i(Object.assign({},r,{text:t[a][0]})).text,t[a][1],t[a][2]]):n.push(i(Object.assign({},r,{text:t[a]})).text);e.text=n}else e.text=i(Object.assign({},r,{text:t})).text}])}(zZ),function(e){var t=function(){return this.internal.vFS===void 0&&(this.internal.vFS={}),!0};e.existsFileInVFS=function(e){return t.call(this),this.internal.vFS[e]!==void 0},e.addFileToVFS=function(e,n){return t.call(this),this.internal.vFS[e]=n,this},e.getFileFromVFS=function(e){return t.call(this),this.internal.vFS[e]===void 0?null:this.internal.vFS[e]}}(zZ.API),function(e){e.__bidiEngine__=e.prototype.__bidiEngine__=function(e){var n,r,i,a,o,s,c,l=t,u=[[0,3,0,1,0,0,0],[0,3,0,1,2,2,0],[0,3,0,17,2,0,1],[0,3,5,5,4,1,0],[0,3,21,21,4,0,1],[0,3,5,5,4,2,0]],d=[[2,0,1,1,0,1,0],[2,0,1,1,0,2,0],[2,0,2,1,3,2,0],[2,0,2,33,3,1,1]],f={L:0,R:1,EN:2,AN:3,N:4,B:5,S:6},p={0:0,5:1,6:2,7:3,32:4,251:5,254:6,255:7},m=`(.).(.<.>.<.[.].[.{.}.{.«.».«.â¹.âº.â¹.â
.â.â
.â½.â¾.â½.â.â.â.â¤.â¥.â¤.â©.âª.â©.ï¹.ï¹.ï¹.ï¹.ï¹.ï¹.ï¹.ï¹.ï¹.﹤.ï¹¥.﹤`.split(`.`),h=new RegExp(/^([1-4|9]|1[0-9]|2[0-9]|3[0168]|4[04589]|5[012]|7[78]|159|16[0-9]|17[0-2]|21[569]|22[03489]|250)$/),g=!1,_=0;this.__bidiEngine__={};var v=function(e){var t=e.charCodeAt(),n=t>>8,r=p[n];return r===void 0?n===252||n===253?`AL`:h.test(n)?`L`:n===8?`R`:`N`:l[256*r+(255&t)]},y=function(e){for(var t,n=0;n<e.length;n++){if((t=v(e.charAt(n)))===`L`)return!1;if(t===`R`)return!0}return!1},b=function(e,t,o,s){var c,l,u,d,f=t[s];switch(f){case`L`:case`R`:case`LRE`:case`RLE`:case`LRO`:case`RLO`:case`PDF`:g=!1;break;case`N`:case`AN`:break;case`EN`:g&&(f=`AN`);break;case`AL`:g=!0,f=`R`;break;case`WS`:case`BN`:f=`N`;break;case`CS`:s<1||s+1>=t.length||(c=o[s-1])!==`EN`&&c!==`AN`||(l=t[s+1])!==`EN`&&l!==`AN`?f=`N`:g&&(l=`AN`),f=l===c?l:`N`;break;case`ES`:f=(c=s>0?o[s-1]:`B`)===`EN`&&s+1<t.length&&t[s+1]===`EN`?`EN`:`N`;break;case`ET`:if(s>0&&o[s-1]===`EN`){f=`EN`;break}if(g){f=`N`;break}for(u=s+1,d=t.length;u<d&&t[u]===`ET`;)u++;f=u<d&&t[u]===`EN`?`EN`:`N`;break;case`NSM`:if(i&&!a){for(d=t.length,u=s+1;u<d&&t[u]===`NSM`;)u++;if(u<d){var p=e[s],m=p>=1425&&p<=2303||p===64286;if(c=t[u],m&&(c===`R`||c===`AL`)){f=`R`;break}}}f=s<1||(c=t[s-1])===`B`?`N`:o[s-1];break;case`B`:g=!1,n=!0,f=_;break;case`S`:r=!0,f=`N`}return f},x=function(e,t,n){var r=e.split(``);return n&&S(r,n,{hiLevel:_}),r.reverse(),t&&t.reverse(),r.join(``)},S=function(e,t,i){var a,o,s,c,l,p=-1,m=e.length,h=0,y=[],x=_?d:u,S=[];for(g=!1,n=!1,r=!1,o=0;o<m;o++)S[o]=v(e[o]);for(s=0;s<m;s++){if(l=h,y[s]=b(e,S,y,s),a=240&(h=x[l][f[y[s]]]),h&=15,t[s]=c=x[h][5],a>0)if(a===16){for(o=p;o<s;o++)t[o]=1;p=-1}else p=-1;if(x[h][6])p===-1&&(p=s);else if(p>-1){for(o=p;o<s;o++)t[o]=c;p=-1}S[s]===`B`&&(t[s]=0),i.hiLevel|=c}r&&function(e,t,n){for(var r=0;r<n;r++)if(e[r]===`S`){t[r]=_;for(var i=r-1;i>=0&&e[i]===`WS`;i--)t[i]=_}}(S,t,m)},C=function(e,t,r,i,a){if(!(a.hiLevel<e)){if(e===1&&_===1&&!n)return t.reverse(),void(r&&r.reverse());for(var o,s,c,l,u=t.length,d=0;d<u;){if(i[d]>=e){for(c=d+1;c<u&&i[c]>=e;)c++;for(l=d,s=c-1;l<s;l++,s--)o=t[l],t[l]=t[s],t[s]=o,r&&(o=r[l],r[l]=r[s],r[s]=o);d=c}d++}}},w=function(e,t,n){var r=e.split(``),i={hiLevel:_};return n||=[],S(r,n,i),function(e,t,n){if(n.hiLevel!==0&&c)for(var r,i=0;i<e.length;i++)t[i]===1&&(r=m.indexOf(e[i]))>=0&&(e[i]=m[r+1])}(r,n,i),C(2,r,t,n,i),C(1,r,t,n,i),r.join(``)};return this.__bidiEngine__.doBidiReorder=function(e,t,n){if(function(e,t){if(t)for(var n=0;n<e.length;n++)t[n]=n;a===void 0&&(a=y(e)),s===void 0&&(s=y(e))}
190(e,t),i||!o||s)if(i&&o&&a^s)_=+!!a,e=x(e,t,n);else if(!i&&o&&s)_=+!!a,e=w(e,t,n),e=x(e,t);else if(!i||a||o||s){if(i&&!o&&a^s)e=x(e,t),a?(_=0,e=w(e,t,n)):(_=1,e=w(e,t,n),e=x(e,t));else if(i&&a&&!o&&s)_=1,e=w(e,t,n),e=x(e,t);else if(!i&&!o&&a^s){var r=c;a?(_=1,e=w(e,t,n),_=0,c=!1,e=w(e,t,n),c=r):(_=0,e=w(e,t,n),e=x(e,t),_=1,c=!1,e=w(e,t,n),c=r,e=x(e,t))}}else _=0,e=w(e,t,n);else _=+!!a,e=w(e,t,n);return e},this.__bidiEngine__.setOptions=function(e){e&&(i=e.isInputVisual,o=e.isOutputVisual,a=e.isInputRtl,s=e.isOutputRtl,c=e.isSymmetricSwapping)},this.__bidiEngine__.setOptions(e),this.__bidiEngine__};var t=`BN.BN.BN.BN.BN.BN.BN.BN.BN.S.B.S.WS.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.B.B.B.S.WS.N.N.ET.ET.ET.N.N.N.N.N.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.BN.BN.BN.BN.BN.BN.B.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.BN.CS.N.ET.ET.ET.ET.N.N.N.N.L.N.N.BN.N.N.ET.ET.EN.EN.N.L.N.N.N.EN.L.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.L.L.L.L.L.L.L.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.L.N.N.N.N.N.ET.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.R.NSM.R.NSM.NSM.R.NSM.NSM.R.NSM.N.N.N.N.N.N.N.N.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.N.N.N.N.N.R.R.R.R.R.N.N.N.N.N.N.N.N.N.N.N.AN.AN.AN.AN.AN.AN.N.N.AL.ET.ET.AL.CS.AL.N.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AL.AL.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AN.AN.AN.AN.AN.AN.AN.AN.AN.AN.ET.AN.AN.AL.AL.AL.NSM.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AN.N.NSM.NSM.NSM.NSM.NSM.NSM.AL.AL.NSM.NSM.N.NSM.NSM.NSM.NSM.AL.AL.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.N.AL.AL.NSM.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.AL.N.N.N.N.N.N.N.N.N.N.N.N.N.N.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.R.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.R.R.N.N.N.N.R.N.N.N.N.N.WS.WS.WS.WS.WS.WS.WS.WS.WS.WS.WS.BN.BN.BN.L.R.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.WS.B.LRE.RLE.PDF.LRO.RLO.CS.ET.ET.ET.ET.ET.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.CS.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.WS.BN.BN.BN.BN.BN.N.LRI.RLI.FSI.PDI.BN.BN.BN.BN.BN.BN.EN.L.N.N.EN.EN.EN.EN.EN.EN.ES.ES.N.N.N.L.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.ES.ES.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.ET.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.L.L.L.L.L.L.L.N.N.N.N.N.N.N.N.N.N.N.N.L.L.L.L.L.N.N.N.N.N.R.NSM.R.R.R.R.R.R.R.R.R.R.ES.R.R.R.R.R.R.R.R.R.R.R.R.R.N.R.R.R.R.R.N.R.N.R.R.N.R.R.N.R.R.R.R.R.R.R.R.R.R.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.NSM.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.CS.N.CS.N.N.CS.N.N.N.N.N.N.N.N.N.ET.N.N.ES.ES.N.N.N.N.N.ET.ET.N.N.N.N.N.AL.AL.AL.AL.AL.N.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.AL.N.N.BN.N.N.N.ET.ET.ET.N.N.N.N.N.ES.CS.ES.CS.CS.EN.EN.EN.EN.EN.EN.EN.EN.EN.EN.CS.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.N.N.N.N.N.N.N.N.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.L.N.N.N.L.L.L.L.L.L.N.N.L.L.L.L.L.L.N.N.L.L.L.L.L.L.N.N.L.L.L.N.N.N.ET.ET.N.N.N.ET.ET.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N.N`.split(`.`),n=new e.__bidiEngine__({isInputVisual:!0});e.API.events.push([`postProcessText`,function(e){var t=e.text;e.x,e.y;var r=e.options||{};e.mutex,r.lang;var i=[];if(r.isInputVisual=typeof r.isInputVisual!=`boolean`||r.isInputVisual,n.setOptions(r),Object.prototype.toString.call(t)===`[object Array]`){var a=0;for(i=[],a=0;a<t.length;a+=1)Object.prototype.toString.call(t[a])===`[object Array]`?i.push([n.doBidiReorder(t[a][0]),t[a][1],t[a][2]]
190):i.push([n.doBidiReorder(t[a])]);e.text=i}else e.text=n.doBidiReorder(t);n.setOptions({isInputVisual:!0})}])}(zZ),zZ.API.TTFFont=function(){function e(e){var t;if(this.rawData=e,t=this.contents=new p$(e),this.contents.pos=4,t.readString(4)===`ttcf`)throw Error(`TTCF not supported.`);t.pos=0,this.parse(),this.subset=new M$(this),this.registerTTF()}return e.open=function(t){return new e(t)},e.prototype.parse=function(){return this.directory=new m$(this.contents),this.head=new _$(this),this.name=new w$(this),this.cmap=new y$(this),this.toUnicode={},this.hhea=new b$(this),this.maxp=new T$(this),this.hmtx=new E$(this),this.post=new S$(this),this.os2=new x$(this),this.loca=new j$(this),this.glyf=new O$(this),this.ascender=this.os2.exists&&this.os2.ascender||this.hhea.ascender,this.decender=this.os2.exists&&this.os2.decender||this.hhea.decender,this.lineGap=this.os2.exists&&this.os2.lineGap||this.hhea.lineGap,this.bbox=[this.head.xMin,this.head.yMin,this.head.xMax,this.head.yMax]},e.prototype.registerTTF=function(){var e,t,n,r,i;if(this.scaleFactor=1e3/this.head.unitsPerEm,this.bbox=function(){var t,n,r,i;for(i=[],t=0,n=(r=this.bbox).length;t<n;t++)e=r[t],i.push(Math.round(e*this.scaleFactor));return i}.call(this),this.stemV=0,this.post.exists?(n=255&(r=this.post.italic_angle),32768&(t=r>>16)&&(t=-(1+(65535^t))),this.italicAngle=+(t+`.`+n)):this.italicAngle=0,this.ascender=Math.round(this.ascender*this.scaleFactor),this.decender=Math.round(this.decender*this.scaleFactor),this.lineGap=Math.round(this.lineGap*this.scaleFactor),this.capHeight=this.os2.exists&&this.os2.capHeight||this.ascender,this.xHeight=this.os2.exists&&this.os2.xHeight||0,this.familyClass=(this.os2.exists&&this.os2.familyClass||0)>>8,this.isSerif=(i=this.familyClass)===1||i===2||i===3||i===4||i===5||i===7,this.isScript=this.familyClass===10,this.flags=0,this.post.isFixedPitch&&(this.flags|=1),this.isSerif&&(this.flags|=2),this.isScript&&(this.flags|=8),this.italicAngle!==0&&(this.flags|=64),this.flags|=32,!this.cmap.unicode)throw Error(`No unicode cmap for font`)},e.prototype.characterToGlyph=function(e){return this.cmap.unicode?.codeMap[e]||0},e.prototype.widthOfGlyph=function(e){var t;return t=1e3/this.head.unitsPerEm,this.hmtx.forGlyph(e).advance*t},e.prototype.widthOfString=function(e,t,n){var r,i,a,o;for(a=0,i=0,o=(e=``+e).length;0<=o?i<o:i>o;i=0<=o?++i:--i)r=e.charCodeAt(i),a+=this.widthOfGlyph(this.characterToGlyph(r))+1e3/t*n||0;return t/1e3*a},e.prototype.lineHeight=function(e,t){var n;return t??=!1,n=t?this.lineGap:0,(this.ascender+n-this.decender)/1e3*e},e}();var f$,p$=function(){function e(e){this.data=e??[],this.pos=0,this.length=this.data.length}return e.prototype.readByte=function(){return this.data[this.pos++]},e.prototype.writeByte=function(e){return this.data[this.pos++]=e},e.prototype.readUInt32=function(){return 16777216*this.readByte()+(this.readByte()<<16)+(this.readByte()<<8)+this.readByte()},e.prototype.writeUInt32=function(e){return this.writeByte(e>>>24&255),this.writeByte(e>>16&255),this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt32=function(){var e;return(e=this.readUInt32())>=2147483648?e-4294967296:e},e.prototype.writeInt32=function(e){return e<0&&(e+=4294967296),this.writeUInt32(e)},e.prototype.readUInt16=function(){return this.readByte()<<8|this.readByte()},e.prototype.writeUInt16=function(e){return this.writeByte(e>>8&255),this.writeByte(255&e)},e.prototype.readInt16=function(){var e;return(e=this.readUInt16())>=32768?e-65536:e},e.prototype.writeInt16=function(e){return e<0&&(e+=65536),this.writeUInt16(e)},e.prototype.readString=function(e){var t,n;for(n=[],t=0;0<=e?t<e:t>e;t=0<=e?++t:--t)n[t]=String.fromCharCode(this.readByte());return n.join(``)},e.prototype.writeString=function(e){var t,n,r;for(r=[],t=0,n=e.length;0<=n?t<n:t>n;t=0<=n?++t:--t)r.push(this.writeByte(e.charCodeAt(t)));return r},e.prototype.readShort=function(){return this.readInt16()},e.prototype.writeShort=function(e){return this.writeInt16(e)},e.prototype.readLongLong=function(){var e,t,n,r,i,a,o,s;return e=this.readByte(),t=this.readByte(),n=this.readByte(),r=this.readByte(),i=this.readByte(),a=this.readByte(),o=this.readByte(),s=this.readByte(),128&e?-1*(72057594037927940*(255^e)+281474976710656*(255^t)+1099511627776*(255^n)+4294967296*(255^r)+16777216*(255^i)+65536*(255^a)+256*(255^o)+(255^s)+1):72057594037927940*e+281474976710656*t+1099511627776*n+4294967296*r+16777216*i+65536*a+256*o+s},e.prototype.writeLongLong=function(e){var t,n;return t=Math.floor(e/4294967296),n=4294967295&e,this.writeByte(t>>24&255),this.writeByte(t>>16&255),this.writeByte(t>>8&255),this.writeByte(255&t),this.writeByte(n>>24&255),this.writeByte(n>>16&255),this.writeByte(n>>8&255),this.writeByte(255&n)},e.prototype.readInt=function(){return this.readInt32()},e.prototype.writeInt=function(e){return this.writeInt32(e)},e.prototype.read=function(e){var t,n;for(t=[],n=0;0<=e?n<e:n>e;n=0<=e?++n:--n)t.push(this.readByte());return t},e.prototype.write=function(e){var t,n,r,i;for(i=[],n=0,r=e.length;n<r;n++)t=e[n],i.push(this.writeByte(t));return i},e}(),m$=function(){var e;function t(e){var t,n,r;for(this.scalarType=e.readInt(),this.tableCount=e.readShort(),this.searchRange=e.readShort(),this.entrySelector=e.readShort(),this.rangeShift=e.readShort(),this.tables={},n=0,r=this.tableCount;0<=r?n<r:n>r;n=0<=r?++n:--n)t={tag:e.readString(4),checksum:e.readInt(),offset:e.readInt(),length:e.readInt()},this.tables[t.tag]=t}return t.prototype.encode=function(t){var n,r,i,a,o,s,c,l,u,d,f,p,m;
vendor: 15,779 bytes, line 190
190for(m in f=Object.keys(t).length,s=Math.log(2),u=16*Math.floor(Math.log(f)/s),a=Math.floor(u/s),l=16*f-u,(r=new p$).writeInt(this.scalarType),r.writeShort(f),r.writeShort(u),r.writeShort(a),r.writeShort(l),i=16*f,c=r.pos+i,o=null,p=[],t)for(d=t[m],r.writeString(m),r.writeInt(e(d)),r.writeInt(c),r.writeInt(d.length),p=p.concat(d),m===`head`&&(o=c),c+=d.length;c%4;)p.push(0),c++;return r.write(p),n=2981146554-e(r.data),r.pos=o+8,r.writeUInt32(n),r.data},e=function(e){var t,n,r,i;for(e=D$.call(e);e.length%4;)e.push(0);for(r=new p$(e),n=0,t=0,i=e.length;t<i;t=t+=4)n+=r.readUInt32();return 4294967295&n},t}(),h$={}.hasOwnProperty,g$=function(e,t){for(var n in t)h$.call(t,n)&&(e[n]=t[n]);function r(){this.constructor=e}return r.prototype=t.prototype,e.prototype=new r,e.__super__=t.prototype,e};f$=function(){function e(e){var t;this.file=e,t=this.file.directory.tables[this.tag],this.exists=!!t,t&&(this.offset=t.offset,this.length=t.length,this.parse(this.file.contents))}return e.prototype.parse=function(){},e.prototype.encode=function(){},e.prototype.raw=function(){return this.exists?(this.file.contents.pos=this.offset,this.file.contents.read(this.length)):null},e}();var _$=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return g$(e,f$),e.prototype.tag=`head`,e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.revision=e.readInt(),this.checkSumAdjustment=e.readInt(),this.magicNumber=e.readInt(),this.flags=e.readShort(),this.unitsPerEm=e.readShort(),this.created=e.readLongLong(),this.modified=e.readLongLong(),this.xMin=e.readShort(),this.yMin=e.readShort(),this.xMax=e.readShort(),this.yMax=e.readShort(),this.macStyle=e.readShort(),this.lowestRecPPEM=e.readShort(),this.fontDirectionHint=e.readShort(),this.indexToLocFormat=e.readShort(),this.glyphDataFormat=e.readShort()},e.prototype.encode=function(e){var t;return(t=new p$).writeInt(this.version),t.writeInt(this.revision),t.writeInt(this.checkSumAdjustment),t.writeInt(this.magicNumber),t.writeShort(this.flags),t.writeShort(this.unitsPerEm),t.writeLongLong(this.created),t.writeLongLong(this.modified),t.writeShort(this.xMin),t.writeShort(this.yMin),t.writeShort(this.xMax),t.writeShort(this.yMax),t.writeShort(this.macStyle),t.writeShort(this.lowestRecPPEM),t.writeShort(this.fontDirectionHint),t.writeShort(e),t.writeShort(this.glyphDataFormat),t.data},e}(),v$=function(){function e(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v;switch(this.platformID=e.readUInt16(),this.encodingID=e.readShort(),this.offset=t+e.readInt(),u=e.pos,e.pos=this.offset,this.format=e.readUInt16(),this.length=e.readUInt16(),this.language=e.readUInt16(),this.isUnicode=this.platformID===3&&this.encodingID===1&&this.format===4||this.platformID===0&&this.format===4,this.codeMap={},this.format){case 0:for(s=0;s<256;++s)this.codeMap[s]=e.readByte();break;case 4:for(f=e.readUInt16(),d=f/2,e.pos+=6,i=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),e.pos+=2,m=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),c=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),l=function(){var t,n;for(n=[],s=t=0;0<=d?t<d:t>d;s=0<=d?++t:--t)n.push(e.readUInt16());return n}(),r=(this.length-e.pos+this.offset)/2,o=function(){var t,n;for(n=[],s=t=0;0<=r?t<r:t>r;s=0<=r?++t:--t)n.push(e.readUInt16());return n}(),s=g=0,v=i.length;g<v;s=++g)for(h=i[s],n=_=p=m[s];p<=h?_<=h:_>=h;n=p<=h?++_:--_)l[s]===0?a=n+c[s]:(a=o[l[s]/2+(n-p)-(d-s)]||0)!==0&&(a+=c[s]),this.codeMap[n]=65535&a}e.pos=u}return e.encode=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,k,A,j,M,N,P,F,I,ee,L,R,z,B,V,te,ne,re,ie,ae;switch(k=new p$,a=Object.keys(e).sort(function(e,t){return e-t}),t){case`macroman`:for(m=0,h=function(){var e=[];for(p=0;p<256;++p)e.push(0);return e}(),_={0:0},i={},A=0,P=a.length;A<P;A++)_[ne=e[r=a[A]]]??(_[ne]=++m),i[r]={old:e[r],new:_[e[r]]},h[r]=_[e[r]];return k.writeUInt16(1),k.writeUInt16(0),k.writeUInt32(12),k.writeUInt16(0),k.writeUInt16(262),k.writeUInt16(0),k.write(h),{charMap:i,subtable:k.data,maxGlyphID:m+1};case`unicode`:for(D=[],u=[],v=0,_={},n={},g=c=null,j=0,F=a.length;j<F;j++)_[b=e[r=a[j]]]??(_[b]=++v),n[r]={old:b,new:_[b]},o=_[b]-r,g!=null&&o===c||(g&&u.push(g),D.push(r),c=o),g=r;for(g&&u.push(g),u.push(65535),D.push(65535),T=2*(w=D.length),C=2*(Math.log(w)/Math.LN2)**2,d=Math.log(C/2)/Math.LN2,S=2*w-C,s=[],x=[],f=[],p=M=0,I=D.length;M<I;p=++M){if(E=D[p],l=u[p],E===65535){s.push(0),x.push(0);break}if(E-(O=n[E].new)>=32768)for(s.push(0),x.push(2*(f.length+w-p)),r=N=E;E<=l?N<=l:N>=l;r=E<=l?++N:--N)f.push(n[r].new);else s.push(O-E),x.push(0)}for(k.writeUInt16(3),k.writeUInt16(1),k.writeUInt32(12),k.writeUInt16(4),k.writeUInt16(16+8*w+2*f.length),k.writeUInt16(0),k.writeUInt16(T),k.writeUInt16(C),k.writeUInt16(d),k.writeUInt16(S),V=0,ee=u.length;V<ee;V++)r=u[V],k.writeUInt16(r);for(k.writeUInt16(0),te=0,L=D.length;te<L;te++)r=D[te],k.writeUInt16(r);for(re=0,R=s.length;re<R;re++)o=s[re],k.writeUInt16(o);for(ie=0,z=x.length;ie<z;ie++)y=x[ie],k.writeUInt16(y);for(ae=0,B=f.length;ae<B;ae++)m=f[ae],k.writeUInt16(m);return{charMap:n,subtable:k.data,maxGlyphID:v+1}}},e}(),y$=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return g$(e,f$),e.prototype.tag=`cmap`,e.prototype.parse=function(e){var t,n,r;for(e.pos=this.offset,this.version=e.readUInt16(),r=e.readUInt16(),this.tables=[],this.unicode=null,n=0;0<=r?n<r:n>r;n=0<=r?++n:--n)t=new v$(e,this.offset),this.tables.push(t),t.isUnicode&&this.unicode==null&&(this.unicode=t);return!0},e.encode=function(e,t){var n,r;return t??=`macroman`,n=v$.encode(e,t),(r=new p$).writeUInt16(0),r.writeUInt16(1),n.table=r.data.concat(n.subtable),n},e}(),b$=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return g$(e,f$),e.prototype.tag=`hhea`,e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.ascender=e.readShort(),this.decender=e.readShort(),this.lineGap=e.readShort(),this.advanceWidthMax=e.readShort(),this.minLeftSideBearing=e.readShort(),this.minRightSideBearing=e.readShort(),this.xMaxExtent=e.readShort(),this.caretSlopeRise=e.readShort(),this.caretSlopeRun=e.readShort(),this.caretOffset=e.readShort(),e.pos+=8,this.metricDataFormat=e.readShort(),this.numberOfMetrics=e.readUInt16()},e}(),x$=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return g$(e,f$),e.prototype.tag=`OS/2`,e.prototype.parse=function(e){if(e.pos=this.offset,this.version=e.readUInt16(),this.averageCharWidth=e.readShort(),this.weightClass=e.readUInt16(),this.widthClass=e.readUInt16(),this.type=e.readShort(),this.ySubscriptXSize=e.readShort(),this.ySubscriptYSize=e.readShort(),this.ySubscriptXOffset=e.readShort(),this.ySubscriptYOffset=e.readShort(),this.ySuperscriptXSize=e.readShort(),this.ySuperscriptYSize=e.readShort(),this.ySuperscriptXOffset=e.readShort(),this.ySuperscriptYOffset=e.readShort(),this.yStrikeoutSize=e.readShort(),this.yStrikeoutPosition=e.readShort(),this.familyClass=e.readShort(),this.panose=function(){var t,n;for(n=[],t=0;t<10;++t)n.push(e.readByte());return n}(),this.charRange=function(){var t,n;for(n=[],t=0;t<4;++t)n.push(e.readInt());return n}(),this.vendorID=e.readString(4),this.selection=e.readShort(),this.firstCharIndex=e.readShort(),this.lastCharIndex=e.readShort(),this.version>0&&(this.ascent=e.readShort(),this.descent=e.readShort(),this.lineGap=e.readShort(),this.winAscent=e.readShort(),this.winDescent=e.readShort(),this.codePageRange=function(){var t,n;for(n=[],t=0;t<2;t=++t)n.push(e.readInt());return n}(),this.version>1))return this.xHeight=e.readShort(),this.capHeight=e.readShort(),this.defaultChar=e.readShort(),this.breakChar=e.readShort(),this.maxContext=e.readShort()},e}(),S$=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return g$(e,f$),e.prototype.tag=`post`,e.prototype.parse=function(e){var t,n,r;switch(e.pos=this.offset,this.format=e.readInt(),this.italicAngle=e.readInt(),this.underlinePosition=e.readShort(),this.underlineThickness=e.readShort(),this.isFixedPitch=e.readInt(),this.minMemType42=e.readInt(),this.maxMemType42=e.readInt(),this.minMemType1=e.readInt(),this.maxMemType1=e.readInt(),this.format){case 65536:case 196608:break;case 131072:var i;for(n=e.readUInt16(),this.glyphNameIndex=[],i=0;0<=n?i<n:i>n;i=0<=n?++i:--i)this.glyphNameIndex.push(e.readUInt16());for(this.names=[],r=[];e.pos<this.offset+this.length;)t=e.readByte(),r.push(this.names.push(e.readString(t)));return r;case 151552:return n=e.readUInt16(),this.offsets=e.read(n);case 262144:return this.map=function(){var t,n,r;for(r=[],i=t=0,n=this.file.maxp.numGlyphs;0<=n?t<n:t>n;i=0<=n?++t:--t)r.push(e.readUInt32());return r}.call(this)}},e}(),C$=function(e,t){this.raw=e,this.length=e.length,this.platformID=t.platformID,this.encodingID=t.encodingID,this.languageID=t.languageID},w$=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return g$(e,f$),e.prototype.tag=`name`,e.prototype.parse=function(e){var t,n,r,i,a,o,s,c,l,u,d;for(e.pos=this.offset,e.readShort(),t=e.readShort(),o=e.readShort(),n=[],i=0;0<=t?i<t:i>t;i=0<=t?++i:--i)n.push({platformID:e.readShort(),encodingID:e.readShort(),languageID:e.readShort(),nameID:e.readShort(),length:e.readShort(),offset:this.offset+o+e.readShort()});for(s={},i=l=0,u=n.length;l<u;i=++l)r=n[i],e.pos=r.offset,c=e.readString(r.length),a=new C$(c,r),s[d=r.nameID]??(s[d]=[]),s[r.nameID].push(a);this.strings=s,this.copyright=s[0],this.fontFamily=s[1],this.fontSubfamily=s[2],this.uniqueSubfamily=s[3],this.fontName=s[4],this.version=s[5];try{this.postscriptName=s[6][0].raw.replace(/[\x00-\x19\x80-\xff]/g,``)}catch{this.postscriptName=s[4][0].raw.replace(/[\x00-\x19\x80-\xff]/g,``)}return this.trademark=s[7],this.manufacturer=s[8],this.designer=s[9],this.description=s[10],this.vendorUrl=s[11],this.designerUrl=s[12],this.license=s[13],this.licenseUrl=s[14],this.preferredFamily=s[15],this.preferredSubfamily=s[17],this.compatibleFull=s[18],this.sampleText=s[19]},e}(),T$=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return g$(e,f$),e.prototype.tag=`maxp`,e.prototype.parse=function(e){return e.pos=this.offset,this.version=e.readInt(),this.numGlyphs=e.readUInt16(),this.maxPoints=e.readUInt16(),this.maxContours=e.readUInt16(),this.maxCompositePoints=e.readUInt16(),this.maxComponentContours=e.readUInt16(),this.maxZones=e.readUInt16(),this.maxTwilightPoints=e.readUInt16(),this.maxStorage=e.readUInt16(),this.maxFunctionDefs=e.readUInt16(),this.maxInstructionDefs=e.readUInt16(),this.maxStackElements=e.readUInt16(),this.maxSizeOfInstructions=e.readUInt16(),this.maxComponentElements=e.readUInt16(),this.maxComponentDepth=e.readUInt16()},e}(),E$=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return g$(e,f$),e.prototype.tag=`hmtx`,e.prototype.parse=function(e){var t,n,r,i,a,o,s;for(e.pos=this.offset,this.metrics=[],t=0,o=this.file.hhea.numberOfMetrics;0<=o?t<o:t>o;t=0<=o?++t:--t)this.metrics.push({advance:e.readUInt16(),lsb:e.readInt16()});for(r=this.file.maxp.numGlyphs-this.file.hhea.numberOfMetrics,this.leftSideBearings=function(){var n,i;for(i=[],t=n=0;0<=r?n<r:n>r;t=0<=r?++n:--n)i.push(e.readInt16());return i}(),this.widths=function(){var e,t,n,r;for(r=[],e=0,t=(n=this.metrics).length;e<t;e++)i=n[e],r.push(i.advance);return r}.call(this),n=this.widths[this.widths.length-1],s=[],t=a=0;0<=r?a<r:a>r;t=0<=r?++a:--a)s.push(this.widths.push(n));return s},e.prototype.forGlyph=function(e){return e in this.metrics?this.metrics[e]:{advance:this.metrics[this.metrics.length-1].advance,lsb:this.leftSideBearings[e-this.metrics.length]}},e}(),D$=[].slice,O$=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return g$(e,f$),e.prototype.tag=`glyf`,e.prototype.parse=function(){return this.cache={}},e.prototype.glyphFor=function(e){var t,n,r,i,a,o,s,c,l,u;return e in this.cache?this.cache[e]:(i=this.file.loca,t=this.file.contents,n=i.indexOf(e),(r=i.lengthOf(e))===0?this.cache[e]=null:(t.pos=this.offset+n,a=(o=new p$(t.read(r))).readShort(),c=o.readShort(),u=o.readShort(),s=o.readShort(),l=o.readShort(),this.cache[e]=a===-1?new A$(o,c,u,s,l):new k$(o,a,c,u,s,l),this.cache[e]))},e.prototype.encode=function(e,t,n){var r,i,a,o,s;for(a=[],i=[],o=0,s=t.length;o<s;o++)r=e[t[o]],i.push(a.length),r&&(a=a.concat(r.encode(n)));return i.push(a.length),{table:a,offsets:i}},e}(),k$=function(){function e(e,t,n,r,i,a){this.raw=e,this.numberOfContours=t,this.xMin=n,this.yMin=r,this.xMax=i,this.yMax=a,this.compound=!1}return e.prototype.encode=function(){return this.raw.data},e}(),A$=function(){function e(e,t,n,r,i){var a,o;for(this.raw=e,this.xMin=t,this.yMin=n,this.xMax=r,this.yMax=i,this.compound=!0,this.glyphIDs=[],this.glyphOffsets=[],a=this.raw;o=a.readShort(),this.glyphOffsets.push(a.pos),this.glyphIDs.push(a.readUInt16()),32&o;)a.pos+=1&o?4:2,128&o?a.pos+=8:64&o?a.pos+=4:8&o&&(a.pos+=2)}return e.prototype.encode=function(){var e,t,n;for(t=new p$(D$.call(this.raw.data)),e=0,n=this.glyphIDs.length;e<n;++e)t.pos=this.glyphOffsets[e];return t.data},e}(),j$=function(){function e(){return e.__super__.constructor.apply(this,arguments)}return g$(e,f$),e.prototype.tag=`loca`,e.prototype.parse=function(e){var t,n;return e.pos=this.offset,t=this.file.head.indexToLocFormat,this.offsets=t===0?function(){var t,r;for(r=[],n=0,t=this.length;n<t;n+=2)r.push(2*e.readUInt16());return r}.call(this):function(){var t,r;for(r=[],n=0,t=this.length;n<t;n+=4)r.push(e.readUInt32());return r}.call(this)},e.prototype.indexOf=function(e){return this.offsets[e]},e.prototype.lengthOf=function(e){return this.offsets[e+1]-this.offsets[e]},e.prototype.encode=function(e,t){for(var n=new Uint32Array(this.offsets.length),r=0,i=0,a=0;a<n.length;++a)if(n[a]=r,i<t.length&&t[i]==a){++i,n[a]=r;var o=this.offsets[a],s=this.offsets[a+1]-o;s>0&&(r+=s)}for(var c=Array(4*n.length),l=0;l<n.length;++l)c[4*l+3]=255&n[l],c[4*l+2]=(65280&n[l])>>8,c[4*l+1]=(16711680&n[l])>>16,c[4*l]=(4278190080&n[l])>>24;return c},e}(),M$=function(){function e(e){this.font=e,this.subset={},this.unicodes={},this.next=33}return e.prototype.generateCmap=function(){var e,t,n,r,i;for(t in r=this.font.cmap.tables[0].codeMap,e={},i=this.subset)n=i[t],e[t]=r[n];return e},e.prototype.glyphsFor=function(e){var t,n,r,i,a,o,s;for(r={},a=0,o=e.length;a<o;a++)r[i=e[a]]=this.font.glyf.glyphFor(i);for(i in t=[],r)(n=r[i])!=null&&n.compound&&t.push.apply(t,n.glyphIDs);if(t.length>0)for(i in s=this.glyphsFor(t))n=s[i],r[i]=n;return r},e.prototype.encode=function(e,t){var n,r,i,a,o,s,c,l,u,d,f,p,m,h,g;for(r in n=y$.encode(this.generateCmap(),`unicode`),a=this.glyphsFor(e),f={0:0},g=n.charMap)f[(s=g[r]).old]=s.new;for(p in d=n.maxGlyphID,a)p in f||(f[p]=d++);return l=function(e){var t,n;for(t in n={},e)n[e[t]]=t;return n}(f),u=Object.keys(l).sort(function(e,t){return e-t}),m=function(){var e,t,n;for(n=[],e=0,t=u.length;e<t;e++)o=u[e],n.push(l[o]);return n}(),i=this.font.glyf.encode(a,m,f),c=this.font.loca.encode(i.offsets,m),h={cmap:this.font.cmap.raw(),glyf:i.table,loca:c,hmtx:this.font.hmtx.raw(),hhea:this.font.hhea.raw(),maxp:this.font.maxp.raw(),post:this.font.post.raw(),name:this.font.name.raw(),head:this.font.head.encode(t)},this.font.os2.exists&&(h[`OS/2`]=this.font.os2.raw()),this.font.directory.encode(h)},e}();zZ.API.PDFObject=function(){var e;function t(){}return e=function(e,t){return(Array(t+1).join(`0`)+e).slice(-t)},t.convert=function(n){var r,i,a,o;if(Array.isArray(n))return`[`+function(){var e,i,a;for(a=[],e=0,i=n.length;e<i;e++)r=n[e],a.push(t.convert(r));return a}().join(` `)+`]`;if(typeof n==`string`)return`/`+n;
190if(n?.isString)return`(`+n+`)`;if(n instanceof Date)return`(D:`+e(n.getUTCFullYear(),4)+e(n.getUTCMonth(),2)+e(n.getUTCDate(),2)+e(n.getUTCHours(),2)+e(n.getUTCMinutes(),2)+e(n.getUTCSeconds(),2)+`Z)`;if({}.toString.call(n)===`[object Object]`){for(i in a=[`<<`],n)o=n[i],a.push(`/`+i+` `+t.convert(o));return a.push(`>>`),a.join(` 191`)}return``+n},t}();function N$(e,t,n){let r=new zZ({unit:`pt`,format:`a4`}),i=r.internal.pageSize.getWidth(),a=i-96,o=0;r.setFillColor(91,58,143),r.rect(0,0,i,90,`F`),r.setTextColor(255,255,255),r.setFont(`helvetica`,`bold`),r.setFontSize(20),r.text(`Diocese of Edinburgh`,48,45),r.setFont(`helvetica`,`italic`),r.setFontSize(11),r.text(`Scottish Episcopal Church`,48,65),o=130,r.setTextColor(91,58,143),r.setFont(`helvetica`,`bold`),r.setFontSize(18),r.text(`Provincial Building Fund Grants`,48,o),o+=20,r.setDrawColor(200,200,200),r.line(48,o,i-48,o),o+=26,r.setTextColor(20,20,20),r.setFontSize(13),r.text(`DIOCESAN BUILDINGS COMMITTEE:`,48,o),o+=16,r.text(`SUPPORTING DOCUMENT`,48,o);let s=(e,t,n=2)=>{o+=26,r.setFont(`helvetica`,`bold`),r.setFontSize(9.5),r.setTextColor(90,90,90),r.text(e.toUpperCase(),48,o),r.setDrawColor(90,90,90),r.line(48,o+3,i-48,o+3),r.setFont(`helvetica`,`normal`),r.setFontSize(10.5),r.setTextColor(20,20,20);let s=t&&String(t).trim()?String(t):`â`,c=r.splitTextToSize(s,a-16),l=Math.max(n,c.length)*13+14;o+=10,r.setDrawColor(210,210,210),r.rect(48,o,a,l),r.text(c,56,o+16),o+=l};s(`Name of Charge & Description of Works`,n,1),s(`Date Considered by Committee`,t.los_date_considered,1),s(`Reasons for Supporting the Application`,t.los_reasons,4),s(`Comment on Missional Aspect`,t.los_missional_comment,3),s(`Comment on Charge's Financial Position`,[`Surplus/Deficit: £${t.los_surplus_deficit||`â`}`,`Total Income: £${t.los_total_income||`â`}`,`Total Expenditure: £${t.los_total_expenditure||`â`}`,`Reserves: £${t.los_reserves||`â`}`,`Congregational Giving: £${t.los_congregational_giving||`â`}
191`,``,`QQ â Urgent: £${t.los_qq_urgent||`â`}`,`QQ â Necessary: £${t.los_qq_necessary||`â`}`,`QQ â Desirable: £${t.los_qq_desirable||`â`}`].join(` 192`),8),o+=36,o>r.internal.pageSize.getHeight()-80&&(r.addPage(),o=60),r.setFont(`helvetica`,`italic`),r.setFontSize(11),r.setTextColor(20,20,20),r.text(t.los_convenor_name||``,48,o),o+=4,r.setDrawColor(20,20,20),r.line(48,o+6,268,o+6),r.setFont(`helvetica`,`normal`),r.setFontSize(9),r.text(`SIGNATURE (Diocesan Buildings Committee Convenor)`,48,o+20),t.los_convenor_date&&r.text(`DATE ${t.los_convenor_date}`,i-48-140,o+20);let c=r.output(`blob`),l=`Letter-of-Support-${(e.charge||`charge`).replace(/[^a-z0-9]+/gi,`-`)}.pdf`;return new File([c],l,{type:`application/pdf`})}var P$=(e,t)=>e[t]||``;function F$({open:e,onOpenChange:t,app:n,onGenerate:r}){let[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(()=>({los_date_considered:P$(n,`los_date_considered`),los_reasons:P$(n,`los_reasons`),los_missional_comment:P$(n,`los_missional_comment`),los_surplus_deficit:P$(n,`los_surplus_deficit`),los_total_income:P$(n,`los_total_income`),los_total_expenditure:P$(n,`los_total_expenditure`),los_reserves:P$(n,`los_reserves`),los_congregational_giving:P$(n,`los_congregational_giving`),los_qq_urgent:P$(n,`los_qq_urgent`),los_qq_necessary:P$(n,`los_qq_necessary`),los_qq_desirable:P$(n,`los_qq_desirable`),los_convenor_name:P$(n,`los_convenor_name`),los_convenor_date:P$(n,`los_convenor_date`)})),[c,l]=(0,b.useState)(`${n.charge||``}${n.works_summary?` - `+n.works_summary:``}`),u=e=>t=>s(n=>({...n,[e]:t.target.value}));return(0,z.jsx)(hW,{open:e,onOpenChange:t,children:(0,z.jsxs)(yW,{className:`max-w-2xl max-h-[85vh] overflow-y-auto`,children:[(0,z.jsx)(bW,{children:(0,z.jsxs)(SW,{className:`flex items-center gap-2`,children:[(0,z.jsx)(En,{className:`w-5 h-5 text-primary`}),`Diocesan Buildings Committee: Supporting Document`]})}),(0,z.jsxs)(`div`,{className:`space-y-4`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-sm font-medium`,children:`Name of Charge & Description of Works`}),(0,z.jsx)(AD,{rows:2,className:`mt-2 resize-none`,value:c,onChange:e=>l(e.target.value)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-sm font-medium`,children:`Date Considered by Committee`}),(0,z.jsx)($h,{className:`mt-2`,placeholder:`e.g. 10 August 2026`,value:o.los_date_considered,onChange:u(`los_date_considered`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-sm font-medium`,children:`Reasons for Supporting the Application`}),(0,z.jsx)(AD,{rows:4,className:`mt-2 resize-none`,value:o.los_reasons,onChange:u(`los_reasons`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-sm font-medium`,children:`Comment on Missional Aspect`}),(0,z.jsx)(AD,{rows:3,className:`mt-2 resize-none`,value:o.los_missional_comment,onChange:u(`los_missional_comment`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-sm font-medium`,children:`Comment on Charge's Financial Position`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3 mt-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-xs text-muted-foreground`,children:`Surplus / Deficit (£)`}),(0,z.jsx)($h,{className:`mt-1`,value:o.los_surplus_deficit,onChange:u(`los_surplus_deficit`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-xs text-muted-foreground`,children:`Total Income (£)`}),(0,z.jsx)($h,{className:`mt-1`,value:o.los_total_income,onChange:u(`los_total_income`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-xs text-muted-foreground`,children:`Total Expenditure (£)`}),(0,z.jsx)($h,{className:`mt-1`,value:o.los_total_expenditure,onChange:u(`los_total_expenditure`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-xs text-muted-foreground`,children:`Reserves (£)`}),(0,z.jsx)($h,{className:`mt-1`,value:o.los_reserves,onChange:u(`los_reserves`)})]}),(0,z.jsxs)(`div`,{className:`col-span-2`,children:[(0,z.jsx)(Z,{className:`text-xs text-muted-foreground`,children:`Congregational Giving (£)`}),(0,z.jsx)($h,{className:`mt-1`,value:o.los_congregational_giving,onChange:u(`los_congregational_giving`)})]})]}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-3 mb-1`,children:`QQ (Quinquennial)`}),(0,z.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-xs text-muted-foreground`,children:`Urgent (£)`}),(0,z.jsx)($h,{className:`mt-1`,value:o.los_qq_urgent,onChange:u(`los_qq_urgent`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-xs text-muted-foreground`,children:`Necessary (£)`}),(0,z.jsx)($h,{className:`mt-1`,value:o.los_qq_necessary,onChange:u(`los_qq_necessary`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-xs text-muted-foreground`,children:`Desirable (£)`}),(0,z.jsx)($h,{className:`mt-1`,value:o.los_qq_desirable,onChange:u(`los_qq_desirable`)})]})]})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-sm font-medium`,children:`Signature (Committee Convenor)`}),(0,z.jsx)($h,{className:`mt-2`,placeholder:`Full name`,value:o.los_convenor_name,onChange:u(`los_convenor_name`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-sm font-medium`,children:`Date`}),(0,z.jsx)($h,{className:`mt-2`,placeholder:`e.g. 9 Sep 2026`,value:o.los_convenor_date,onChange:u(`los_convenor_date`)})]})]})]}),(0,z.jsxs)(xW,{children:[(0,z.jsx)(Qh,{variant:`outline`,onClick:()=>t(!1),disabled:i,children:`Cancel`}),(0,z.jsxs)(Qh,{onClick:async()=>{a(!0);try{let e=N$(n,o,c);await r(n,o,e),t(!1)}finally{a(!1)}},disabled:i,children:[i&&(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Generate & attach letter`]})]})]})})}var I$=[`approved`,`partially_approved`,`declined`,`deferred`];function L$({app:e,onUploadLetter:t,onGenerateLetter:n,onUpdate:r}){let[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(e.provincial_outcome&&e.provincial_outcome!==`pending`?e.provincial_outcome:``),[u,d]=(0,b.useState)(e.provincial_outcome_notes||``),f=(0,b.useRef)(null),p=vU(e),m=async n=>{let r=n.target.files&&n.target.files[0];if(n.target.value=``,r){a(!0);try{await t(e,r)}finally{a(!1)}}};return p===0?(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The charge is still completing this application.`}):p===1?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,z.jsx)(`input`,{ref:f,type:`file`,className:`hidden`,onChange:m,accept:`.pdf,.doc,.docx`}),(0,z.jsxs)(Qh,{size:`sm`,onClick:()=>s(!0),disabled:i,children:[i?(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}):(0,z.jsx)(En,{className:`w-4 h-4 mr-2`}),`Complete Letter of Support`]}),(0,z.jsxs)(Qh,{size:`sm`,variant:`ghost`,onClick:()=>f.current&&f.current.click(),disabled:i,children:[(0,z.jsx)(ir,{className:`w-4 h-4 mr-2`}),`or upload a completed file`]})]}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-2`,children:`Fill in the committee's supporting document within the app â once attached, the application moves to the next stage.`}),(0,z.jsx)(F$,{open:o,onOpenChange:s,app:e,onGenerate:n})]}):p===2?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,z.jsx)(`input`,{ref:f,type:`file`,className:`hidden`,onChange:m,accept:`.pdf,.doc,.docx`}),(0,z.jsxs)(Qh,{size:`sm`,variant:`outline`,onClick:()=>s(!0),disabled:i,children:[i?(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}):(0,z.jsx)(En,{className:`w-4 h-4 mr-2`}),`Edit Letter of Support`]}),(0,z.jsxs)(Qh,{size:`sm`,variant:`ghost`,onClick:()=>f.current&&f.current.click(),disabled:i,children:[(0,z.jsx)(ir,{className:`w-4 h-4 mr-2`}),`or replace with a file`]}),(0,z.jsxs)(Qh,{size:`sm`,onClick:async()=>{a(!0);try{await r(e,{submitted_to_provincial_at:new Date().toISOString()})}finally{a(!1)}},disabled:i,children:[i?(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}):(0,z.jsx)(Qn,{className:`w-4 h-4 mr-2`}),`Mark as submitted to Provincial team`]})]}),(0,z.jsx)(F$,{open:o,onOpenChange:s,app:e,onGenerate:n})]}):p===3?(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-secondary/30 p-4 space-y-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-sm font-medium`,children:[(0,z.jsx)(On,{className:`w-4 h-4 text-primary`}),`Record the outcome from the Provincial funding team`]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-sm font-medium`,children:`Outcome`}),(0,z.jsxs)(VN,{value:c,onValueChange:l,children:[(0,z.jsx)(UN,{className:`mt-2`,children:(0,z.jsx)(HN,{placeholder:`Choose the outcome`})}),(0,z.jsx)(KN,{children:I$.map(e=>(0,z.jsx)(JN,{value:e,children:yU[e].label},e))})]})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{className:`text-sm font-medium`,children:`Notes (optional)`}),(0,z.jsx)(AD,{value:u,onChange:e=>d(e.target.value),rows:3,className:`mt-2 resize-none`,placeholder:`e.g. grant of £8,000 awarded, conditions attachedâ¦`})]}),(0,z.jsxs)(Qh,{size:`sm`,onClick:async()=>
192{if(c){a(!0);try{await r(e,{provincial_outcome:c,provincial_outcome_date:new Date().toISOString(),provincial_outcome_notes:u})}finally{a(!1)}}},disabled:i||!c,children:[i&&(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Save outcome`]})]}):(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-secondary/30 p-4`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`inline-block w-2.5 h-2.5 rounded-full ${yU[e.provincial_outcome]?.dot||`bg-slate-400`}`}),(0,z.jsxs)(`p`,{className:`text-sm font-medium`,children:[yU[e.provincial_outcome]?.label||e.provincial_outcome,e.provincial_outcome_date&&(0,z.jsxs)(`span`,{className:`text-muted-foreground font-normal`,children:[` â `,Q(e.provincial_outcome_date).format(`D MMM YYYY`)]})]})]}),e.provincial_outcome_notes&&(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-2 whitespace-pre-wrap`,children:e.provincial_outcome_notes})]})}var R$=e=>`£${Number(e||0).toLocaleString(`en-GB`)}`;function z$(e,t){if(t===`church`){let t=Number(e.grant_nz||0)+Number(e.grant_other||0),n=Number(e.loan_nz||0)+Number(e.loan_other||0);return`Grant up to ${R$(t)} · Loan up to ${R$(n)}`}return`BGF grant up to ${R$(e.grant_bgf)} · Rectory Green up to ${R$(e.grant_rgf)} · Loan up to ${R$(e.loan_blf)}`}function B$({app:e,documents:t,onUploadLetter:n,onGenerateLetter:r,onUpdate:i}){let a=vU(e),o=e._type===`rectory`,s=String(e.id||``).slice(-6).toUpperCase(),c=t.filter(t=>t.application_id===e.id),l=c.filter(e=>(e.document_type||``).startsWith(`01`)),u=c.filter(e=>!(e.document_type||``).startsWith(`01`));return(0,z.jsxs)(`div`,{className:`bg-card border border-border/70 rounded-2xl shadow-sm p-5 sm:p-6`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,z.jsx)(`span`,{className:K(`text-[11px] font-medium uppercase tracking-wide rounded-full px-2.5 py-0.5`,o?`bg-amber-100 text-amber-800 dark:bg-amber-950 dark:text-amber-300`:`bg-primary/10 text-primary`),children:o?`Rectory & housing`:`Church buildings`}),(0,z.jsx)(`h3`,{className:`font-display text-lg leading-tight truncate`,children:e.charge||`Untitled charge`})]}),(0,z.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:[e.diocese,` · Ref `,s,e.submitted_at?` · Submitted ${Q(e.submitted_at).format(`D MMM YYYY`)}`:` · In progress`]})]}),a===4&&(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-2 rounded-full border border-border/70 bg-secondary px-3 py-1 text-xs font-medium`,children:[(0,z.jsx)(`span`,{className:K(`inline-block w-2 h-2 rounded-full`,yU[e.provincial_outcome]?.dot)}),yU[e.provincial_outcome]?.label]})]}),(0,z.jsx)(`div`,{className:`mt-6`,children:(0,z.jsx)(bU,{stage:a})}),(0,z.jsxs)(`div`,{className:`mt-6 grid gap-4 sm:grid-cols-2 text-sm`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:`Principal contact`}),(0,z.jsx)(`p`,{className:`font-medium mt-0.5`,children:e.contact_name||`â`}),(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:e.contact_email||``})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:`Funding requested`}),(0,z.jsx)(`p`,{className:`font-medium mt-0.5`,children:z$(e,e._type)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:`Status of works`}),(0,z.jsx)(`p`,{className:`font-medium mt-0.5`,children:e.status_of_works||`â`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-xs uppercase tracking-wide text-muted-foreground`,children:`Summary of works`}),(0,z.jsx)(`p`,{className:`mt-0.5 text-muted-foreground line-clamp-2`,children:e.works_summary||`â`})]})]}),(0,z.jsxs)(`div`,{className:`mt-5 border-t border-border/60 pt-4`,children:[(0,z.jsxs)(`p`,{className:`text-xs uppercase tracking-wide text-muted-foreground mb-2`,children:[`Documents (`,c.length,`)`]}),l.length>0&&(0,z.jsxs)(`div`,{className:`flex items-center gap-2 rounded-lg bg-emerald-50 dark:bg-emerald-950 border border-emerald-200 dark:border-emerald-900 px-3 py-2 mb-2`,children:[(0,z.jsx)(mn,{className:`w-4 h-4 text-emerald-600 shrink-0`}),(0,z.jsx)(`p`,{className:`text-sm font-medium`,children:`Diocesan Letter of Support`}),(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground truncate`,children:l[l.length-1].file_name}),e.letter_of_support_date&&(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0 hidden sm:inline`,children:Q(e.letter_of_support_date).format(`D MMM YYYY`)}),(0,z.jsxs)(`a`,{href:l[l.length-1].file_url,target:`_blank`,rel:`noopener noreferrer`,className:`ml-auto inline-flex items-center gap-1.5 rounded-md border border-border/70 px-2.5 py-1 text-xs font-medium hover:bg-secondary shrink-0`,title:`Download the Letter of Support`,children:[(0,z.jsx)(xn,{className:`w-3.5 h-3.5`}),`Download`]})]}),u.length>0?(0,z.jsx)(`ul`,{className:`space-y-1`,children:u.map(e=>(0,z.jsxs)(`li`,{className:`flex items-center gap-2 text-sm min-w-0`,children:[(0,z.jsx)(En,{className:`w-4 h-4 text-muted-foreground shrink-0`}),(0,z.jsxs)(`span`,{className:`truncate`,children:[e.document_type,` â `,(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:e.file_name})]})]},e.id))}):(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No supporting documents uploaded.`})]}),(0,z.jsx)(`div`,{className:`mt-5 border-t border-border/60 pt-4`,children:(0,z.jsx)(L$,{app:e,onUploadLetter:n,onGenerateLetter:r,onUpdate:i})})]})}var V$=[{key:`all`,label:`All funding applications`,dot:`bg-slate-400`},{key:`0`,label:`In progress`,dot:`bg-slate-300`},{key:`1`,label:`Awaiting Letter of Support`,dot:`bg-amber-500`},{key:`2`,label:`Ready for Provincial`,dot:`bg-sky-500`},{key:`3`,label:`At Provincial team`,dot:`bg-violet-500`},{key:`4`,label:`Outcome received`,dot:`bg-emerald-500`}],H$=e=>String(e.id||``).slice(-6).toUpperCase();function U$({churchApps:e,rectoryApps:t,documents:n,loading:r,onChanged:i,search:a=``}){let[o,s]=(0,b.useState)(`all`),[c,l]=(0,b.useState)(!1),u=(0,b.useMemo)(()=>[...e.map(e=>({...e,_type:`church`})),...t.map(e=>({...e,_type:`rectory`}))].sort((e,t)=>
192new Date(t.updated_date||0)-new Date(e.updated_date||0)),[e,t]),d=(0,b.useMemo)(()=>{let e={all:u.length,0:0,1:0,2:0,3:0,4:0};return u.forEach(t=>{e[vU(t)]+=1}),e},[u]),f=(o===`all`?u:u.filter(e=>String(vU(e))===o)).filter(e=>{let t=a.trim().toLowerCase();return!t||[e.charge,e.linked_with,e.rector_name,e.secretary_treasurer_name,e.contact_name,e.contact_position,e.contact_email,e.works_summary,e.building_address].map(e=>e||``).join(` `).toLowerCase().includes(t)||H$(e).toLowerCase().includes(t)}),p=e=>e._type===`church`?X.entities.FundingApplication:X.entities.RectoryFundingApplication,m=async(e,t)=>{l(!0);try{await p(e).update(e.id,t),i()}finally{l(!1)}},h=async(e,t)=>{l(!0);try{let{file_url:n}=await X.integrations.Core.UploadPublicFile({file:t});await X.entities.ApplicationDocument.create({application_id:e.id,document_type:`01 â Diocesan Letter of Support`,file_url:n,file_name:t.name,uploaded_by:`Diocesan office`}),await p(e).update(e.id,{letter_of_support_date:new Date().toISOString()}),i()}finally{l(!1)}},g=async(e,t,n)=>{l(!0);try{let{file_url:r}=await X.integrations.Core.UploadPublicFile({file:n});await X.entities.ApplicationDocument.create({application_id:e.id,document_type:`01 â Diocesan Letter of Support`,file_url:r,file_name:n.name,uploaded_by:`Diocesan office`}),await p(e).update(e.id,{...t,letter_of_support_date:new Date().toISOString()}),i()}finally{l(!1)}};return(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`h2`,{className:`font-display text-base mb-3`,children:[`Funding â `,d.all,` application`,d.all===1?``:`s`,` (church buildings & rectories)`]}),(0,z.jsx)(`div`,{className:`grid grid-cols-2 md:grid-cols-3 lg:grid-cols-6 gap-3`,children:V$.map(e=>{let t=o===e.key;return(0,z.jsxs)(`button`,{onClick:()=>s(e.key),className:K(`rounded-xl border p-4 text-left transition-colors`,t?`border-primary bg-secondary`:`border-border bg-card hover:bg-secondary/60`),children:[(0,z.jsx)(`span`,{className:K(`inline-block w-2.5 h-2.5 rounded-full`,e.dot)}),(0,z.jsx)(`div`,{className:`font-display text-2xl leading-none mt-1`,children:d[e.key]}),(0,z.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:e.label})]},e.key)})}),r?(0,z.jsx)(`div`,{className:`flex justify-center py-24`,children:(0,z.jsx)(Ln,{className:`w-6 h-6 animate-spin text-muted-foreground`})}):f.length===0?(0,z.jsxs)(`div`,{className:`text-center py-24 border border-dashed border-border rounded-2xl mt-6`,children:[(0,z.jsx)(jn,{className:`w-8 h-8 text-muted-foreground mx-auto`}),(0,z.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground max-w-md mx-auto`,children:u.length===0?`No funding applications yet. Applications submitted through the Church buildings or Rectory funding forms will appear here.`:a.trim()?`No applications match your search.`:`No applications at this stage.`})]}):(0,z.jsx)(`div`,{className:`mt-6 space-y-4`,children:f.map(e=>(0,z.jsx)(B$,{app:e,documents:n,onUploadLetter:h,onGenerateLetter:g,onUpdate:m},e.id))}),c&&(0,z.jsxs)(`div`,{className:`fixed bottom-6 right-6 flex items-center gap-2 rounded-full bg-card border border-border/70 shadow px-4 py-2 text-sm text-muted-foreground`,children:[(0,z.jsx)(Ln,{className:`w-4 h-4 animate-spin`}),` Savingâ¦`]})]})}var W$=[{key:`all`,label:`All submissions`},{key:`payroll`,label:`Payroll forms`},{key:`bearer`,label:`Office bearer changes`},{key:`exit`,label:`Exit interviews`},{key:`gdpr`,label:`Personal email review`}],G$={new_appointment:`New appointment`,tax_code_update:`Tax code update`},K$={new_appointment:`New appointment`,update_details:`Change of details`,resignation:`Resignation`};function q$({search:e=``}){let[t,n]=(0,b.useState)([]),[r,i]=(0,b.useState)([]),[a,o]=(0,b.useState)([]),[s,c]=(0,b.useState)(!0),[l,u]=(0,b.useState)(`all`);(0,b.useEffect)(()=>{let e=async()=>{let[e,t,r]=await Promise.all([X.entities.PayrollIntake.list(`-created_date`,200),X.entities.OfficeBearerChange.list(`-created_date`,200),X.entities.ExitInterview.list(`-created_date`,200)]);n(e),i(t),o(r)};e().finally(()=>c(!1));let t=X.entities.PayrollIntake.subscribe(e),r=X.entities.OfficeBearerChange.subscribe(e),a=X.entities.ExitInterview.subscribe(e);return()=>{t(),r(),a()}},[]);let d=[...t.map(e=>({...e,_type:`payroll`})),...r.map(e=>({...e,_type:`bearer`})),...a.map(e=>({...e,_type:`exit`}))].sort((e,t)=>
192new Date(t.created_date||0)-new Date(e.created_date||0)),f=e.trim().toLowerCase(),p=e=>!f||[e.charge,e.submitter_name,e.employee_name,e.employee_role,e.bearer_name,e.bearer_role,e.leaver_name,e.leaver_role,e.reason_for_leaving,e.notes].map(e=>e||``).join(` `).toLowerCase().includes(f),m=d.filter(e=>e.gdpr_review).length,h=(l===`all`?d:l===`gdpr`?d.filter(e=>e.gdpr_review):d.filter(e=>e._type===l)).filter(p),g=(e,t)=>(e._type===`payroll`?X.entities.PayrollIntake:e._type===`bearer`?X.entities.OfficeBearerChange:X.entities.ExitInterview).update(e.id,{status:t});return(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`h2`,{className:`font-display text-base mb-3`,children:[`Staff lifecycle â `,d.length,` submission`,d.length===1?``:`s`,` · `,m,` awaiting GDPR review`]}),(0,z.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:W$.map(e=>{let t=l===e.key,n=e.key===`all`?d.length:e.key===`gdpr`?m:d.filter(t=>t._type===e.key).length;return(0,z.jsxs)(`button`,{onClick:()=>u(e.key),className:K(`rounded-lg px-3.5 py-2 text-sm font-medium border transition-colors`,t?`border-primary bg-secondary text-foreground`:`border-border bg-card text-muted-foreground hover:bg-secondary/60`),children:[e.label,` (`,n,`)`]},e.key)})}),s?(0,z.jsx)(`div`,{className:`flex justify-center py-24`,children:(0,z.jsx)(Ln,{className:`w-6 h-6 animate-spin text-muted-foreground`})}):h.length===0?(0,z.jsxs)(`div`,{className:`text-center py-24 border border-dashed border-border rounded-2xl mt-6`,children:[(0,z.jsx)(jn,{className:`w-8 h-8 text-muted-foreground mx-auto`}),(0,z.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground max-w-md mx-auto`,children:d.length===0?`No staff lifecycle submissions yet. New appointments, tax code updates, office bearer changes and exit interviews will appear here.`:`No submissions match this view.`})]}):(0,z.jsx)(`div`,{className:`mt-6 space-y-4`,children:h.map(e=>(0,z.jsxs)(`div`,{className:`bg-card border border-border/70 rounded-2xl p-5 sm:p-6 shadow-sm`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,z.jsx)(`span`,{className:`inline-flex items-center rounded-full bg-primary/10 text-primary px-2.5 py-0.5 text-[11px] font-medium uppercase tracking-wide`,children:e._type===`payroll`?G$[e.form_type]||`Payroll`:e._type===`bearer`?`Office bearer`:`Exit interview`}),(0,z.jsx)(`h3`,{className:`font-display text-lg leading-tight truncate`,children:e.charge})]}),(0,z.jsxs)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:[e._type===`payroll`?e.employee_name:e._type===`exit`?`${e.leaver_name} â ${e.leaver_role||``}`:`${e.bearer_name} â ${e.bearer_role||``}`,e._type===`payroll`&&e.employee_role?` (${e.employee_role})`:``,e._type===`bearer`&&e.change_type&&K$[e.change_type]?` · ${K$[e.change_type]}`:``,` · `,`submitted `,Q(e.created_date).format(`D MMM YYYY`)]})]}),(0,z.jsxs)(VN,{value:e.status||`pending`,onValueChange:t=>g(e,t),children:[(0,z.jsx)(UN,{className:`h-8 w-[140px] text-xs`,children:(0,z.jsx)(HN,{})}),(0,z.jsxs)(KN,{children:[(0,z.jsx)(JN,{value:`pending`,children:`Pending`}),(0,z.jsx)(JN,{value:`reviewed`,children:`Reviewed`}),(0,z.jsx)(JN,{value:`processed`,children:`Processed`})]})]})]}),(0,z.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-x-4 gap-y-1.5 text-xs text-muted-foreground`,children:[(0,z.jsxs)(`span`,{className:`font-medium text-foreground/80`,children:[`From `,e.submitter_name]}),e._type===`payroll`&&e.tax_code&&(0,z.jsxs)(`span`,{children:[`Tax code `,e.tax_code]}),e._type===`payroll`&&e.start_date&&(0,z.jsxs)(`span`,{children:[`Starts `,Q(e.start_date).format(`D MMM YYYY`)]}),e._type===`payroll`&&e.employee_email&&(0,z.jsx)(`span`,{children:e.employee_email}),e._type===`exit`&&e.leave_date&&(0,z.jsxs)(`span`,{children:[`Leaving `,Q(e.leave_date).format(`D MMM YYYY`)]}),e._type===`exit`&&e.reason_for_leaving&&(0,z.jsxs)(`span`,{children:[`Reason: `,e.reason_for_leaving]}),e._type===`exit`&&e.leaver_email&&(0,z.jsx)(`span`,{children:e.leaver_email}),e._type===`bearer`&&e.bearer_email&&(0,z.jsx)(`span`,{children:e.bearer_email}),e.emergency_contact&&(0,z.jsxs)(`span`,{children:[`Emergency contact: `,e.emergency_contact]}),e._type===`bearer`&&e.pvg_membership_number&&(0,z.jsxs)(`span`,{children:[`PVG scheme no. `,e.pvg_membership_number]}),e._type===`bearer`&&e.payroll_service&&(0,z.jsx)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-amber-100 text-amber-800 border border-amber-200 px-2 py-0.5 font-medium`,children:`Diocesan payroll service â Finance Officer alerted`}),e._type===`bearer`&&e.bearer_postal_address&&(0,z.jsxs)(`span`,{children:[`Mailings: `,e.bearer_postal_address]}
192),e.gdpr_review&&(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-amber-100 text-amber-800 border border-amber-200 px-2 py-0.5 font-medium`,children:[(0,z.jsx)(rr,{className:`w-3 h-3`}),` Personal email â review communication permissions`]}),e.notice_file_url&&(0,z.jsxs)(`a`,{href:e.notice_file_url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-primary hover:underline font-medium`,children:[(0,z.jsx)(xn,{className:`w-3.5 h-3.5`}),` HMRC tax notice`]})]}),(e.notes||e.exit_feedback)&&(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-2 whitespace-pre-wrap`,children:e.notes||e.exit_feedback})]},e._type+e.id))})]})}function J$({value:e,onChange:t,placeholder:n}){return(0,z.jsxs)(`div`,{className:`relative w-full sm:w-72`,children:[(0,z.jsx)(Zn,{className:`absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground pointer-events-none`}),(0,z.jsx)(`input`,{type:`text`,value:e,onChange:e=>t(e.target.value),placeholder:n,className:`w-full h-9 rounded-lg border border-input bg-card pl-9 pr-8 text-sm shadow-sm placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring`}),e&&(0,z.jsx)(`button`,{type:`button`,onClick:()=>t(``),"aria-label":`Clear search`,className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,children:(0,z.jsx)(lr,{className:`w-4 h-4`})})]})}var Y$=70,X$=100;function Z$({onRefresh:e,children:t}){let n=(0,b.useRef)(0),r=(0,b.useRef)(!1),[i,a]=(0,b.useState)(0),[o,s]=(0,b.useState)(!1),c=(0,b.useCallback)(e=>{o||window.scrollY>0||(n.current=e.touches[0].clientY,r.current=!0)},[o]),l=(0,b.useCallback)(e=>{if(!r.current||o)return;let t=e.touches[0].clientY-n.current;if(t>0&&window.scrollY<=0){let e=Math.min(t*.5,X$);a(e)}},[o]),u=(0,b.useCallback)(async()=>{if(r.current)if(r.current=!1,i>=Y$){s(!0),a(Y$);try{await e()}finally{s(!1),a(0)}}else a(0)},[i,o,e]),d=Math.min(i/Y$,1);return(0,z.jsxs)(`div`,{onTouchStart:c,onTouchMove:l,onTouchEnd:u,className:`relative`,children:[(0,z.jsx)(`div`,{className:`absolute top-0 inset-x-0 flex items-center justify-center overflow-hidden pointer-events-none`,style:{height:i,transition:r.current?`none`:`height 0.2s ease`},children:(0,z.jsx)(`div`,{className:`flex items-center justify-center`,style:{transform:`translateY(${i-40}px)`,opacity:d},children:o?(0,z.jsx)(Ln,{className:`w-6 h-6 text-brand-primary animate-spin`}):(0,z.jsx)(Xn,{className:`w-6 h-6 text-brand-primary`,style:{transform:`rotate(${d*360}deg)`}})})}),(0,z.jsx)(`div`,{style:{transform:`translateY(${i}px)`,transition:r.current?`none`:`transform 0.2s ease`},children:t})]})}var Q$=[{key:`all`,label:`All applications`},{key:`flagged`,label:`Needs attention`},{key:`submitted`,label:`Pending`},{key:`completed`,label:`Approved`},{key:`in_progress`,label:`Pre-application`}],$$=e=>String(e.id||``).slice(-6).toUpperCase();function e1(){let[e,t]=(0,b.useState)([]),[n,r]=(0,b.useState)([]),[i,a]=(0,b.useState)([]),[o,s]=(0,b.useState)(!0),[c,l]=(0,b.useState)(`all`),[u,d]=(0,b.useState)(``),[f,p]=(0,b.useState)(`canon35`),[m,h]=(0,b.useState)([]),[g,_]=(0,b.useState)([]),[v,y]=(0,b.useState)(!1),[x,S]=(0,b.useState)(``),{toast:C}=N(),w=`${window.location.origin}/apply`,T=async()=>{let[e,n,i,o,s]=await Promise.all([X.entities.Application.list(`-updated_date`,200),X.entities.ApplicationDocument.list(),X.entities.CommitteeFeedback.list(`-created_date`,500),X.entities.FundingApplication.list(`-updated_date`,200),X.entities.RectoryFundingApplication.list(`-updated_date`,200)]);t(e),r(n),a(i),h(o),_(s)};(0,b.useEffect)(()=>{X.auth.me().then(e=>S(e?.full_name||`Committee`)).catch(()=>{}),T().finally(()=>s(!1));let e=X.entities.Application.subscribe(()=>{T()}),t=X.entities.ApplicationDocument.subscribe(()=>{T()}),n=X.entities.CommitteeFeedback.subscribe(()=>{T()}),r=X.entities.FundingApplication.subscribe(()=>{T()}),i=X.entities.RectoryFundingApplication.subscribe(()=>{T()});return()=>{e(),t(),n(),r(),i()}},[]);let E=(0,b.useMemo)(()=>({all:e.length,submitted:e.filter(e=>e.status===`submitted`).length,in_progress:e.filter(e=>(e.status||`in_progress`)===`in_progress`).length,completed:e.filter(e=>e.status===`completed`).length,flagged:e.filter(e=>e.status===`flagged`).length}),[e]),D=(c===`all`?e:e.filter(e=>(e.status||`in_progress`)===c)).filter(e=>{let t=u.trim().toLowerCase();if(!t)return!0;let n=[e.applicant_name,e.applicant_role,e.email,e.church_name,e.charge,e.project_title,e.works_description,e.local_authority_area].map(e=>e||``).join(` `).toLowerCase(),r=$$(e).toLowerCase();return n.includes(t)||r.includes(t)}),O=async(e,t,n={})=>
192{if(!t.email)return C({title:`No applicant email on file`,description:`Cannot email ${t.church_name||`this application`} â no address was provided.`,variant:`destructive`}),!1;try{return await X.functions.invoke(`sendApplicantNotification`,{type:e,to:t.email,church_name:t.church_name,applicant_name:t.applicant_name,applicant_role:t.applicant_role,project_title:t.project_title,reference:$$(t),...n}),!0}catch{return C({title:`Could not send email`,description:`Please try again in a moment.`,variant:`destructive`}),!1}},k=(e,n)=>t(t=>t.map(t=>t.id===e?{...t,...n}:t)),A=async(e,t)=>{k(e.id,{status:t});try{await X.entities.Application.update(e.id,{status:t})}catch{k(e.id,{status:e.status}),C({title:`Could not update the status`,description:`Please try again in a moment.`,variant:`destructive`});return}t===`completed`&&await O(`approval`,e)&&C({title:`Certificate of Consent sent`,description:`Emailed to ${e.email}.`})},j=async(e,t)=>{let n={committee_outcome:t,committee_decision_date:new Date().toISOString()};t===`approved`&&(n.status=`completed`),k(e.id,n);try{await X.entities.Application.update(e.id,n)}catch{k(e.id,{committee_outcome:e.committee_outcome,committee_decision_date:e.committee_decision_date,status:e.status}),C({title:`Could not record the decision`,description:`Please try again in a moment.`,variant:`destructive`});return}t===`approved`&&await O(`approval`,e)&&C({title:`Certificate of Consent sent`,description:`${e.church_name} â emailed to ${e.email}.`})},M=async(e,t)=>{let n=t.includes(`@`);await X.entities.CommitteeFeedback.create({application_id:e.id,author_name:x,message:t,sent_to_applicant:n}),n&&await O(`feedback`,e,{message:t})&&C({title:`Request emailed to the applicant`,description:e.email})};return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,z.jsx)(`header`,{className:`border-b border-border/60 bg-card/80 backdrop-blur-sm sticky top-0 z-10`,children:(0,z.jsxs)(`div`,{className:`max-w-5xl mx-auto px-6 py-4 flex flex-wrap items-center justify-between gap-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`div`,{className:`w-9 h-9 rounded-full bg-primary text-primary-foreground flex items-center justify-center shrink-0`,children:(0,z.jsx)(fn,{className:`w-4 h-4`})}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`font-display text-lg leading-tight`,children:`Canon 35 and Funding Applications`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`At-a-glance status for Diocesan Administrators`})]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,z.jsx)(`code`,{className:`hidden md:block text-xs bg-secondary border border-border/70 rounded-lg px-3 py-2 truncate max-w-[280px]`,children:w}),(0,z.jsxs)(Qh,{size:`sm`,variant:`outline`,onClick:async()=>{try{await navigator.clipboard.writeText(w),y(!0),setTimeout(()=>y(!1),2e3)}catch{y(!1)}},children:[v?(0,z.jsx)(sn,{className:`w-4 h-4 mr-2 text-emerald-600`}):(0,z.jsx)(_n,{className:`w-4 h-4 mr-2`}),v?`Copied`:`Copy client link`]})]})]})}),(0,z.jsx)(`main`,{className:`max-w-5xl mx-auto px-6 py-8`,children:(0,z.jsxs)(Z$,{onRefresh:T,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 mb-8`,children:[(0,z.jsxs)(`div`,{className:`flex gap-2`,children:[(0,z.jsx)(`button`,{onClick:()=>p(`canon35`),className:K(`rounded-lg px-4 py-2 text-sm font-medium border transition-colors`,f===`canon35`?`border-primary bg-secondary text-foreground`:`border-border bg-card text-muted-foreground hover:bg-secondary/60`),children:`Canon 35 consents`}),(0,z.jsx)(`button`,{onClick:()=>p(`funding`),className:K(`rounded-lg px-4 py-2 text-sm font-medium border transition-colors`,f===`funding`?`border-primary bg-secondary text-foreground`:`border-border bg-card text-muted-foreground hover:bg-secondary/60`),children:`Funding applications`}),(0,z.jsx)(`button`,{onClick:()=>p(`onboarding`),className:K(`rounded-lg px-4 py-2 text-sm font-medium border transition-colors`,f===`onboarding`?`border-primary bg-secondary text-foreground`:`border-border bg-card text-muted-foreground hover:bg-secondary/60`),children:`Staff onboarding`})]}),(0,z.jsx)(J$,{value:u,onChange:d,placeholder:`Search applicationsâ¦`})]}),f===`onboarding`?(0,z.jsx)(q$,{search:u}):f===`funding`?(0,z.jsx)(U$,{churchApps:m,rectoryApps:g,documents:n,loading:o,onChanged:T,search:u}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`h2`,{className:`font-display text-base mb-3`,children:[`Overview â `,E.all,` application`,E.all===1?``:`s`,` across the diocese`]}),(0,z.jsx)(`div`,{className:`grid grid-cols-2 lg:grid-cols-5 ga
192p-3`,children:Q$.map(e=>{let t=c===e.key;return(0,z.jsxs)(`button`,{onClick:()=>l(e.key),className:K(`rounded-xl border p-4 text-left transition-colors`,t?`border-primary bg-secondary`:`border-border bg-card hover:bg-secondary/60`),children:[e.key!==`all`&&(0,z.jsx)(`span`,{className:K(`inline-block w-2.5 h-2.5 rounded-full`,DD[e.key].dot)}),(0,z.jsx)(`div`,{className:`font-display text-2xl leading-none mt-1`,children:E[e.key]}),(0,z.jsx)(`div`,{className:`text-xs text-muted-foreground mt-1`,children:e.label})]},e.key)})})]}),o?(0,z.jsx)(`div`,{className:`flex justify-center py-24`,children:(0,z.jsx)(Ln,{className:`w-6 h-6 animate-spin text-muted-foreground`})}):D.length===0?(0,z.jsxs)(`div`,{className:`text-center py-24 border border-dashed border-border rounded-2xl mt-6`,children:[(0,z.jsx)(jn,{className:`w-8 h-8 text-muted-foreground mx-auto`}),(0,z.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground max-w-md mx-auto`,children:e.length===0?`No applications yet. Share your client link with a charge or congregation to get started.`:u.trim()?`No applications match your search.`:`No applications in this view.`})]}):(0,z.jsx)(`div`,{className:`mt-6 space-y-4`,children:D.map(e=>(0,z.jsx)(gU,{app:e,documents:n,feedback:i.filter(t=>t.application_id===e.id),onStatusChange:A,onOutcomeChange:j,onAddFeedback:M},e.id))})]})]})})]})}function t1({icon:e,to:t,title:n,children:r}){return(0,z.jsxs)(Dc,{to:t,className:`group relative rounded-2xl border border-brand-border bg-brand-surface p-6 hover:shadow-xl hover:-translate-y-0.5 transition-all duration-300 overflow-hidden`,children:[(0,z.jsx)(`div`,{className:`absolute -right-6 -top-6 w-24 h-24 rounded-full bg-brand-bg-soft group-hover:bg-[#f0e3c4] transition-colors`}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(`div`,{className:`w-12 h-12 rounded-xl bg-gradient-to-br from-brand-primary to-brand-primary-deep flex items-center justify-center mb-4`,children:(0,z.jsx)(e,{className:`w-6 h-6 text-brand-gold`})}),(0,z.jsx)(`h3`,{className:`font-serif text-xl text-brand-text`,children:n}),(0,z.jsx)(`p`,{className:`text-sm text-brand-body mt-1.5 leading-relaxed`,children:r}),(0,z.jsxs)(`div`,{className:`flex items-center gap-1 text-brand-accent text-sm font-medium mt-4 group-hover:gap-2 transition-all`,children:[`Open `,(0,z.jsx)($t,{className:`w-4 h-4`})]})]})]})}var n1={green:`bg-emerald-500`,amber:`bg-amber-500`,red:`bg-rose-500`,na:`bg-slate-300`,submitted:`bg-emerald-500`,in_progress:`bg-amber-500`,overdue:`bg-rose-500`,empty:`bg-slate-200`},r1={green:`Green`,amber:`Amber`,red:`Red`,na:`N/A`,submitted:`Submitted`,in_progress:`In progress`,overdue:`Overdue`,empty:`No data`},i1=[{key:`quinquennial_status`,label:`Quinquennial`},{key:`qq_pro_forma_status`,label:`QQ Pro Forma`},{key:`canon_35_status`,label:`Canon 35`},{key:`internal_funding_status`,label:`Approval to Commence`},{key:`external_funding_status`,label:`C35 Completion Cert.`},{key:`planning_internal_status`,label:`Plan (Int.)`},{key:`planning_external_status`,label:`Plan (Ext.)`}];function a1({status:e}){return(0,z.jsx)(`span`,{className:`inline-block w-3 h-3 rounded-full ${n1[e]||n1.empty}`,title:r1[e]||`No data`})}function o1(){let[e,t]=(0,b.useState)([]),[n,r]=(0,b.useState)([]),[i,a]=(0,b.useState)([]),[o,s]=(0,b.useState)(!0),[c,l]=(0,b.useState)([]),[u,d]=(0,b.useState)(!1),[f,p]=(0,b.useState)(``);(0,b.useEffect)(()=>{Promise.all([X.entities.Congregation.list(`name`,100),X.entities.BuildingRecord.list(`-created_date`,200),X.entities.FinanceRecord.list(`-created_date`,200)]).then(([e,n,i])=>{t(e),r(n),a(i),s(!1);let o=e.find(e=>e.name.startsWith(`Diocese of Edinburgh`));o&&l([o.id])})},[]);let m=(0,b.useMemo)(()=>Object.fromEntries(n.map(e=>[e.congregation_id,e])),[n]),h=(0,b.useMemo)(()=>Object.fromEntries(i.map(e=>[e.congregation_id,e])),[i]),g=(0,b.useMemo)(()=>c.length===0?e:e.filter(e=>c.includes(e.id)),[e,c]),_=(0,b.useMemo)(()=>{let e={finance:{green:0,amber:0,red:0,na:0,empty:0},buildings:{green:0,amber:0,red:0,na:0,empty:0}};return g.forEach(t=>{let n=h[t.id]?.annual_accounts_status||`empty`;
192e.finance[n]=(e.finance[n]||0)+1;let r=m[t.id];i1.forEach(t=>{let n=r?.[t.key]||`empty`;e.buildings[n]=(e.buildings[n]||0)+1})}),e},[g,m,h]),v=(0,b.useMemo)(()=>f.trim()?e.filter(e=>e.name.toLowerCase().includes(f.toLowerCase())):e,[e,f]),y=e=>l(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),x=()=>l(e.map(e=>e.id)),S=()=>l([]);if(o)return(0,z.jsx)(`div`,{className:`text-slate-400 text-sm py-8 text-center`,children:`Loading congregation healthâ¦`});let C=({data:e,label:t,icon:n})=>(0,z.jsxs)(`div`,{className:`rounded-xl border border-[#e7ddc9] bg-white p-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[(0,z.jsx)(n,{className:`w-4 h-4 text-[#7a3a82]`}),(0,z.jsx)(`span`,{className:`text-xs font-medium text-slate-600`,children:t})]}),(0,z.jsx)(`div`,{className:`flex gap-3 flex-wrap`,children:[`green`,`amber`,`red`,`na`,`empty`].map(t=>(0,z.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,z.jsx)(`span`,{className:`w-2.5 h-2.5 rounded-full ${n1[t]}`}),(0,z.jsx)(`span`,{className:`text-xs text-slate-500`,children:e[t]||0})]},t))})]}),w=c.length===0?`All congregations`:`${c.length} selected`;return(0,z.jsxs)(`div`,{className:`mb-10`,children:[(0,z.jsxs)(`div`,{className:`flex flex-col sm:flex-row sm:items-end justify-between gap-3 mb-4`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h2`,{className:`font-serif text-xl text-[#514582]`,children:`Congregation Health Overview`}),(0,z.jsx)(`p`,{className:`text-slate-500 text-xs mt-0.5`,children:`Traffic-light status â select congregations or view all, click a name to drill in`})]}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsxs)(`button`,{onClick:()=>d(e=>!e),className:`flex items-center gap-2 rounded-lg border border-[#e7ddc9] bg-white px-3 py-2 text-sm text-[#514582] hover:border-[#c9a24a] transition-colors w-full sm:w-64`,children:[(0,z.jsx)(`span`,{className:`flex-1 text-left truncate`,children:w}),(0,z.jsx)(cn,{className:`w-4 h-4 text-slate-400`})]}),u&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`fixed inset-0 z-20`,onClick:()=>d(!1)}),(0,z.jsxs)(`div`,{className:`absolute right-0 mt-1 w-72 sm:w-80 rounded-lg border border-[#e7ddc9] bg-white shadow-lg z-30`,children:[(0,z.jsx)(`div`,{className:`p-2 border-b border-[#efe6d4]`,children:(0,z.jsx)(`input`,{autoFocus:!0,value:f,onChange:e=>p(e.target.value),placeholder:`Search congregationsâ¦`,className:`w-full rounded-md border border-slate-200 px-2 py-1.5 text-sm focus:outline-none focus:border-[#c9a24a]`})}),(0,z.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-1.5 border-b border-[#efe6d4]`,children:[(0,z.jsx)(`button`,{onClick:x,className:`text-xs text-[#7a3a82] hover:underline`,children:`Select all`}),(0,z.jsx)(`button`,{onClick:S,className:`text-xs text-slate-400 hover:underline`,children:`Clear`})]}),(0,z.jsxs)(`div`,{className:`max-h-60 overflow-y-auto`,children:[v.map(e=>(0,z.jsxs)(`button`,{onClick:()=>y(e.id),className:`flex items-center gap-2 w-full px-3 py-1.5 text-left text-sm hover:bg-[#faf6ec] text-[#514582]`,children:[(0,z.jsx)(`span`,{className:`w-4 h-4 rounded border flex items-center justify-center shrink-0 ${c.includes(e.id)?`bg-[#514582] border-[#514582]`:`border-slate-300`}`,children:c.includes(e.id)&&(0,z.jsx)(sn,{className:`w-3 h-3 text-white`})}),(0,z.jsx)(`span`,{className:`truncate`,children:e.name})]},e.id)),v.length===0&&(0,z.jsx)(`div`,{className:`px-3 py-4 text-xs text-slate-400 text-center`,children:`No matches`})]})]})]})]})]}),(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 gap-3 mb-5`,children:[(0,z.jsx)(C,{data:_.finance,label:`Annual Accounts (Finance)`,icon:qn}),(0,z.jsx)(C,{data:_.buildings,label:`Building Records (all 7 areas)`,icon:nn})]}),(0,z.jsx)(`div`,{className:`rounded-xl border border-[#e7ddc9] overflow-hidden`,children:(0,z.jsx)(`div`,{className:`overflow-x-auto`,children:(0,z.jsxs)(`table`,{className:`w-full text-xs`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{className:`bg-[#f3ecdd] text-[#514582]`,children:[(0,z.jsx)(`th`,{className:`text-left font-medium px-3 py-2 sticky left-0 bg-[#f3ecd
192d] z-10`,children:`Congregation`}),(0,z.jsx)(`th`,{className:`text-center font-medium px-2 py-2`,children:(0,z.jsx)(qn,{className:`w-3.5 h-3.5 inline`})}),i1.map(e=>(0,z.jsx)(`th`,{className:`text-center font-medium px-2 py-2 whitespace-nowrap`,title:e.label,children:e.label},e.key))]})}),(0,z.jsxs)(`tbody`,{children:[g.map(e=>{let t=h[e.id],n=m[e.id];return(0,z.jsxs)(`tr`,{className:`border-t border-[#efe6d4] hover:bg-[#faf6ec]`,children:[(0,z.jsx)(`td`,{className:`px-3 py-1.5 sticky left-0 bg-white z-10 whitespace-nowrap`,children:(0,z.jsxs)(Dc,{to:`/charge/${e.id}/data`,className:`text-[#514582] hover:text-[#7a3a82] hover:underline flex items-center gap-1`,children:[(0,z.jsx)(`span`,{className:`truncate max-w-[180px] block`,children:e.name}),(0,z.jsx)(un,{className:`w-3 h-3 text-slate-300 shrink-0`})]})}),(0,z.jsx)(`td`,{className:`text-center px-2 py-1.5`,children:(0,z.jsx)(a1,{status:t?.annual_accounts_status||`empty`})}),i1.map(e=>(0,z.jsx)(`td`,{className:`text-center px-2 py-1.5`,children:(0,z.jsx)(a1,{status:n?.[e.key]||`empty`})},e.key))]},e.id)}),g.length===0&&(0,z.jsx)(`tr`,{children:(0,z.jsx)(`td`,{colSpan:9,className:`text-center text-slate-400 py-6`,children:`No congregations selected`})})]})]})})})]})}function s1(){let{user:e,isAuthor:t}=UP(),[n,r]=(0,b.useState)(null),i=(0,b.useCallback)(async()=>{let e=await X.entities.Congregation.list();r(e.length)},[]);return(0,b.useEffect)(()=>{i()},[i]),(0,z.jsx)(Z$,{onRefresh:i,children:(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`div`,{className:`relative overflow-hidden rounded-3xl bg-gradient-to-br from-brand-primary-deep via-brand-primary to-[#514582] text-brand-cream p-8 sm:p-12 mb-10`,children:[(0,z.jsx)(`div`,{className:`absolute inset-0 opacity-[0.07]`,style:{backgroundImage:`radial-gradient(circle at 80% 20%, #d9b86a 0, transparent 40%)`}}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Dg,{size:56,light:!0}),(0,z.jsx)(`h1`,{className:`font-serif text-3xl sm:text-5xl mt-5 leading-tight`,children:`The Diocesan Hub`}),(0,z.jsx)(`p`,{className:`mt-3 max-w-2xl text-brand-cream text-sm sm:text-base`,children:`A shared CRM, data room and resource centre for the Diocese of Edinburgh `}),e&&(0,z.jsxs)(`p`,{className:`mt-4 text-sm font-medium text-[#f1d186] drop-shadow-[0_1px_2px_rgba(81,69,130,0.55)]`,children:[`Welcome â you have `,t?`full access`:`role-based access`]})]})]}),(0,z.jsx)(o1,{}),(0,z.jsxs)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5`,children:[(0,z.jsx)(t1,{icon:sr,to:`/contacts`,title:`Contact Database`,children:`Job titles, contacts, office bearers, training records & terms across all our congregations`}),(0,z.jsx)(t1,{icon:gn,to:`/committees`,title:`Committee Minutes & To-Do`,children:`Buildings, Finance & Management, Mission & Ministry, Personnel, Standing`}),(0,z.jsx)(t1,{icon:nn,to:`/buildings`,title:`Buildings`,children:`Quinquennial, Canon 35, funding & planning health tracker`}),(0,z.jsx)(t1,{icon:qn,to:`/finance`,title:`Finance`,children:`Annual accounts, finance schedule, quarterly figures & 5-year projections`}),(0,z.jsx)(t1,{icon:hn,to:`/payroll`,title:`Payroll Register`,children:`Diocesan Payroll Service staff register â stipends, tax codes & payslip emails`}),(0,z.jsx)(t1,{icon:Vn,to:`/marketing`,title:`Communications & Marketing`,children:`Website, Social Media & P.R. trackers`}),(0,z.jsx)(t1,{icon:Wn,to:`/communications`,title:`Story Submissions Desk`,children:`Congregation stories & events for The Communicant, Adventures in Faith & DMMC News â review & export`}),(0,z.jsx)(t1,{icon:kn,to:`/training`,title:`Training & Development`,children:`Obligatory training, M&M and Finance development plans`}),(0,z.jsx)(t1,{icon:hn,to:`/governance`,title:`Governance & Compliance`,children:`Annual accounts, OSCR, Gift Aid, safeguarding & statistical returns â the 54-charge checklist`}),(0,z.jsx)(t1,{icon:an,to:`/events`,title:`Events & Fundraising`,children:`Events and fundraising trackers across all our congregations`}),(0,z.jsx)(t1,{icon:En,to:`/forms`,title:`Forms`,children:`Complete and upload key compliance forms`}),(0,z.jsx)(t1,{icon:Hn,to:`/shared-experience`,title:`Shared Experience, Ideas & Updates`,children:`Share experiences, post ideas and diocesan updates â comment enabled for all`})]})]})})}function c1(){let{isAuthor:e}=UP(),[t,n]=(0,b.useState)(0),[r,i]=(0,b.useState)([]),[a,o]=(0,b.useState)(!1),s=()=>{X.entities.AppNotification.filter({for_admin:!0,read:!1},`-created_date`,20).then(e=>{n(e.length),i(e)})};return(0,b.useEffect)(()=>{e&&s()},[e]),e?(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsxs)(`button`,{onClick:()=>o(!a),className:`relative p-2 rounded-lg text-[#f5e6c8] hover:bg-white/10 transition-colors`,children:[(0,z.jsx)(en,{className:`w-5 h-5`}),t>0&&(0,z.jsx)(`span`,{className:`absolute -top-0.5 -right-0.5 w-4 h-4 rounded-full bg-[#d9b86a] text-[#514582] text-[10px] font-bold flex items-center justify-center`,children:t>9?`9+`:t})]}),a&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`div`,{className:`fixed inset-0 z-40`,onClick:()=>o(!1)}),(0,z.jsxs)(`div`,{className:`absolute right-0 top-full mt-2 w-80 max-h-96 overflow-y-auto rounded-xl border border-[#e7ddc9] bg-white shadow-xl z-50`,children:[(0,z.jsxs)(`div`,{className:`flex items-center justify-between px-4 py-3 border-b border-slate-100`,children:[(0,z.jsx)(`span`,{className:`font-serif text-sm text-[#514582]`,children:`Notifications`}),t>0&&(0,z.jsx)(`button`,{onClick:async()=>{await X.entities.AppNotification.bulkUpdate(r.map(e=>({id:e.id,read:!0}))),n(0),i([])},className:`text-xs text-[#7a3a82] hover:underline`,children:`Mark all read`})]}
192),(0,z.jsxs)(`div`,{className:`divide-y divide-slate-50`,children:[r.map(e=>(0,z.jsxs)(`div`,{className:`px-4 py-3 hover:bg-[#faf7f2]`,children:[(0,z.jsx)(`div`,{className:`text-sm text-[#514582]`,children:e.message}),(0,z.jsx)(`div`,{className:`text-xs text-slate-400 mt-0.5`,children:new Date(e.created_date).toLocaleString()})]},e.id)),r.length===0&&(0,z.jsx)(`div`,{className:`px-4 py-8 text-center text-slate-400 text-sm`,children:`No new notifications`})]})]})]})]}):null}var l1=[{to:`/hub`,label:`Home`,icon:An},{to:`/payroll`,label:`Payroll`,icon:Nn},{to:`/governance`,label:`Governance`,icon:hn},{to:`/communications`,label:`Comms`,icon:Hn}];function u1(){return(0,z.jsx)(`nav`,{className:`md:hidden fixed bottom-0 inset-x-0 z-40 border-t border-brand-border bg-brand-surface backdrop-blur-md`,style:{paddingBottom:`env(safe-area-inset-bottom)`},children:(0,z.jsx)(`div`,{className:`flex items-stretch justify-around h-14`,children:l1.map(({to:e,label:t,icon:n})=>(0,z.jsxs)(Oc,{to:e,end:e===`/hub`,className:({isActive:e})=>`flex flex-col items-center justify-center gap-0.5 flex-1 text-[11px] font-medium transition-colors select-none ${e?`text-brand-gold`:`text-brand-text-muted`}`,children:[(0,z.jsx)(n,{className:`w-5 h-5`}),t]},e))})})}var d1=Symbol(`radix.slottable`);function f1(e){let t=({children:e})=>(0,z.jsx)(z.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=d1,t}var p1=`AlertDialog`,[m1,h1]=V(p1,[kU]),g1=kU(),_1=e=>{let{__scopeAlertDialog:t,...n}=e,r=g1(t);return(0,z.jsx)(sW,{...r,...n,modal:!0})};_1.displayName=p1;var v1=`AlertDialogTrigger`,y1=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=g1(n);return(0,z.jsx)(cW,{...i,...r,ref:t})});y1.displayName=v1;var b1=`AlertDialogPortal`,x1=e=>{let{__scopeAlertDialog:t,...n}=e,r=g1(t);return(0,z.jsx)(lW,{...r,...n})};x1.displayName=b1;var S1=`AlertDialogOverlay`,C1=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=g1(n);return(0,z.jsx)(uW,{...i,...r,ref:t})});C1.displayName=S1;var w1=`AlertDialogContent`,[T1,E1]=m1(w1),D1=f1(`AlertDialogContent`),O1=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,children:r,...i}=e,a=g1(n),o=b.useRef(null),s=L(t,o),c=b.useRef(null);return(0,z.jsx)(nW,{contentName:w1,titleName:k1,docsSlug:`alert-dialog`,children:(0,z.jsx)(T1,{scope:n,cancelRef:c,children:(0,z.jsxs)(dW,{role:`alertdialog`,...a,...i,ref:s,onOpenAutoFocus:F(i.onOpenAutoFocus,e=>{e.preventDefault(),c.current?.focus({preventScroll:!0})}),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault(),children:[(0,z.jsx)(D1,{children:r}),(0,z.jsx)(L1,{contentRef:o})]})})})});O1.displayName=w1;var k1=`AlertDialogTitle`,A1=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=g1(n);return(0,z.jsx)(fW,{...i,...r,ref:t})});A1.displayName=k1;var j1=`AlertDialogDescription`,M1=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=g1(n);return(0,z.jsx)(pW,{...i,...r,ref:t})});M1.displayName=j1;var N1=`AlertDialogAction`,P1=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,i=g1(n);return(0,z.jsx)(mW,{...i,...r,ref:t})});P1.displayName=N1;var F1=`AlertDialogCancel`,I1=b.forwardRef((e,t)=>{let{__scopeAlertDialog:n,...r}=e,{cancelRef:i}=E1(F1,n),a=g1(n),o=L(t,i);return(0,z.jsx)(mW,{...a,...r,ref:o})});I1.displayName=F1;var L1=({contentRef:e})=>{let t=`\`${w1}\` requires a description for the component to be accessible for screen reader users. 193 194You can add a description to the \`${w1}\` by passing a \`${j1}\` component as a child, which also benefits sighted users by adding visible context to the dialog. 195 196Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${w1}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component. 197 198For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return b.useEffect(()=>{document.getElementById(e.current?.getAttribute(`aria-describedby`))||console.warn(t)},[t,e]),null},R1=_1,z1=x1,B1=C1,V1=O1,H1=P1,U1=I1,W1=A1,G1=M1,K1=R1,q1=z1,J1=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(B1,{className:K(`fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),...t,ref:n}));J1.displayName=B1.displayName;var Y1=b.forwardRef(({className:e,...t},n)=>(0,z.jsxs)(q1,{children:[(0,z.jsx)(J1,{}),(0,z.jsx)(V1,{ref:n,className:K(`fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rou
198nded-lg`,e),...t})]}));Y1.displayName=V1.displayName;var X1=({className:e,...t})=>(0,z.jsx)(`div`,{className:K(`flex flex-col space-y-2 text-center sm:text-left`,e),...t});X1.displayName=`AlertDialogHeader`;var Z1=({className:e,...t})=>(0,z.jsx)(`div`,{className:K(`flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2`,e),...t});Z1.displayName=`AlertDialogFooter`;var Q1=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(W1,{ref:n,className:K(`text-lg font-semibold`,e),...t}));Q1.displayName=W1.displayName;var $1=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(G1,{ref:n,className:K(`text-sm text-muted-foreground`,e),...t}));$1.displayName=G1.displayName;var e0=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(H1,{ref:n,className:K(Zh(),e),...t}));e0.displayName=H1.displayName;var t0=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(U1,{ref:n,className:K(Zh({variant:`outline`}),`mt-2 sm:mt-0`,e),...t}));t0.displayName=U1.displayName;function n0({user:e,role:t}){let[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(``);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(hW,{open:n,onOpenChange:r,children:[(0,z.jsx)(gW,{asChild:!0,children:(0,z.jsx)(`button`,{type:`button`,className:`flex items-center justify-center w-9 h-9 rounded-md text-brand-cream hover:text-brand-cream hover:bg-white/10 transition-colors`,title:`Settings`,children:(0,z.jsx)($n,{className:`w-4 h-4`})})}),(0,z.jsxs)(yW,{children:[(0,z.jsxs)(bW,{children:[(0,z.jsx)(SW,{className:`font-serif`,children:`Account & Settings`}),(0,z.jsx)(CW,{children:`Manage your account and app preferences.`})]}),(0,z.jsxs)(`div`,{className:`space-y-4 py-2`,children:[(0,z.jsxs)(`div`,{className:`rounded-lg border border-brand-border bg-brand-bg-soft p-4`,children:[(0,z.jsx)(`div`,{className:`text-sm font-medium text-brand-text`,children:e?.full_name||`User`}),(0,z.jsx)(`div`,{className:`text-xs text-brand-text-muted mt-0.5`,children:e?.email}),(0,z.jsx)(`div`,{className:`text-[11px] uppercase tracking-wider text-brand-gold mt-1`,children:t===`author`?`Author`:t===`editor`?`Editor`:`Viewer`})]}),(0,z.jsxs)(Qh,{variant:`outline`,className:`w-full justify-start`,onClick:()=>X.auth.logout(),children:[(0,z.jsx)(zn,{className:`w-4 h-4 mr-2`}),` Sign out`]}),(0,z.jsxs)(`div`,{className:`pt-3 border-t border-brand-border`,children:[(0,z.jsxs)(`div`,{className:`flex items-start gap-2 mb-2`,children:[(0,z.jsx)(er,{className:`w-4 h-4 text-destructive mt-0.5 shrink-0`}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`div`,{className:`text-sm font-medium text-destructive`,children:`Delete account`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:`Permanently remove your account and request data deletion. This action cannot be undone.`})]})]}),(0,z.jsxs)(Qh,{variant:`destructive`,className:`w-full`,onClick:()=>a(!0),children:[(0,z.jsx)(nr,{className:`w-4 h-4 mr-2`}),` Delete my account`]})]})]})]})]}),(0,z.jsx)(K1,{open:i,onOpenChange:e=>{a(e),e||l(``)},children:(0,z.jsxs)(Y1,{children:[(0,z.jsxs)(X1,{children:[(0,z.jsx)(Q1,{className:`font-serif`,children:`Delete account permanently?`}),(0,z.jsxs)($1,{children:[`This will submit a request to permanently delete your account and associated data. To confirm, type `,(0,z.jsx)(`strong`,{children:`DELETE`}),` below.`]})]}),(0,z.jsx)(`input`,{value:c,onChange:e=>l(e.target.value),placeholder:`DELETE`,className:`flex h-9 w-full rounded-md border border-input bg-transparent px-3 py-1 text-sm shadow-sm focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring uppercase`}),(0,z.jsxs)(Z1,{children:[(0,z.jsx)(t0,{disabled:o,children:`Cancel`}),(0,z.jsx)(e0,{disabled:o||c.trim().toUpperCase()!==`DELETE`,onClick:async()=>{s(!0);try{await X.functions.invoke(`requestAccountDeletion`,{}),M({title:`Deletion requested`,description:`Your account deletion request has been submitted. You will be signed out.`}),a(!1),r(!1),l(``),setTimeout(()=>X.auth.logout(),800)}catch(e){M({title:`Request failed`,description:e.message||`Could not submit deletion request. Please contact the app administrator.`,variant:`destructive`})}finally{s(!1)}},className:`bg-destructive text-destructive-foreground hover:bg-destructive/90`,children:o?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),` Deletingâ¦`]}):`Delete account`})]})]})})]})}var r0=`Edinburgh Diocesan Synod`,i0=[`St Mary's, Dalmahoy`,`St Anne's, Dunbar`,`Christ Church, Duns`,`Holy Trinity, Haddington`,`St Cuthbert's, Hawick`,`St Andrew's, Kelso`,`St Peter's, Linlithgow`,`Holy Trinity, Melrose`,`St Peter's, Musselburgh`,`St Baldred's, North Berwick`,`St Peter's, Peebles`,`St Matthew's, Roslyn`,`St John's, Selkirk`,`Priory Church of St Mary of Mount Carmel, South Queensferry`,`St Mungo's, West Linton`,`Old St Paul's (Edinburgh)`,`St James the Less, Leith (Edinburgh)`,`St Mark's, Portobello (Edinburgh)`,`St Ninian's, Comely Bank (Edinburgh)`,`St Paul's & St George's (Edinburgh)`,`St Vincent's, Stockbri
198dge (Edinburgh)`,`St Michael and All Saints (Edinburgh)`,`St Margaret of Scotland (Edinburgh)`],a0=[`Alistair`,`Bethany`,`Callum`,`Davina`,`Ewan`,`Fiona`,`Graeme`,`Hannah`,`Iain`,`Janet`,`Keir`,`Lyndsey`,`Moray`,`Nora`,`Owen`,`Phyllis`,`Quentin`,`Rhona`,`Struan`,`Una`],o0=[`Anderson`,`Buchanan`,`Cameron`,`Drummond`,`Elliot`,`Ferguson`,`Grant`,`Henderson`,`Innes`,`Johnstone`,`Kerr`,`Lamont`,`Macdonald`,`Nicol`,`Oliver`,`Paterson`,`Rennie`,`Sinclair`,`Thomson`,`Ure`,`Webster`],s0=[`S1257L`,`S1257L`,`S1257L`,`SBR`,`SNT`],c0=[`2026-01-24`,`2024-09-16`,`2017-12-01`,`2019-06-02`,`2022-03-06`,`2015-09-13`,`2020-11-01`,`2023-05-21`],l0=(()=>{let e=[],t=new Set;for(let n=0;n<41;n++){let r=n<25,i=n%a0.length,a=(n*5+3)%o0.length,o=`${a0[i]} ${o0[a]}`;for(;t.has(o);)a=(a+1)%o0.length,o=`${a0[i]} ${o0[a]}`;t.add(o);let s=n%7==3,c=r?s?Math.round(36381*(n%4+3)/5/100)*100:36381:[9600,12e3,18426,21840,24e3][n%5],l=n>=38;e.push({id:`demo-${n}`,employee_name:o,title:r?`Revd`:[`Mrs`,`Mr`,`Ms`][n%3],charge:l?r0:i0[n%i0.length],employment_type:r?`Clergy`:`Lay`,ni_number:`QQ${String(1e5+n*3571).slice(-6)}A`,annual_salary:c,monthly_amount:Math.round(c/12*100)/100,weekly_hours:s?[7,10,12,15][n%4]:null,tax_code:s0[n%s0.length],start_date:c0[n%c0.length],leave_date:null,payslip_email:`${o.toLowerCase().replace(/[^a-z]+/g,`.`)}@example.org`,notes:``})}return e})();function u0(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var d0=b.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:`bottom`,shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),f0=()=>{let e=b.useContext(d0);if(!e)throw Error(`useDrawerContext must be used within a Drawer.Root`);return e};u0(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not( 199[data-state=closed] 200){opacity:0}
200[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function p0(){let e=navigator.userAgent;return typeof window<`u`&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function m0(){return y0(/^Mac/)}function h0(){return y0(/^iPhone/)}function g0(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function _0(){return y0(/^iPad/)||m0()&&navigator.maxTouchPoints>1}function v0(){return h0()||_0()}function y0(e){return typeof window<`u`&&window.navigator!=null?e.test(window.navigator.platform):void 0}var b0=24,x0=typeof window<`u`?b.useLayoutEffect:b.useEffect;function S0(...e){return(...t)=>{for(let n of e)typeof n==`function`&&n(...t)}}var C0=typeof document<`u`&&window.visualViewport;function w0(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function T0(e){for(w0(e)&&(e=e.parentElement);e&&!w0(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}var E0=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]),D0=0,O0;function k0(e={}){let{isDisabled:t}=e;x0(()=>{if(!t)return D0++,D0===1&&v0()&&(O0=A0()),()=>{D0--,D0===0&&O0?.()}},[t])}function A0(){let e,t=0,n=n=>{e=T0(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)},r=n=>{if(!e||e===document.documentElement||e===document.body){n.preventDefault();return}let r=n.changedTouches[0].pageY,i=e.scrollTop,a=e.scrollHeight-e.clientHeight;a!==0&&((i<=0&&r>t||i>=a&&r<t)&&n.preventDefault(),t=r)},i=e=>{let t=e.target;P0(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform=`translateY(-2000px)`,t.focus(),requestAnimationFrame(()=>{t.style.transform=``}))},a=e=>{let t=e.target;P0(t)&&(t.style.transform=`translateY(-2000px)`,requestAnimationFrame(()=>{t.style.transform=``,C0&&(C0.height<window.innerHeight?requestAnimationFrame(()=>{N0(t)}):C0.addEventListener(`resize`,()=>N0(t),{once:!0}))}))},o=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,l=S0(j0(document.documentElement,`paddingRight`,`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let u=S0(M0(document,`touchstart`,n,{passive:!1,capture:!0}),M0(document,`touchmove`,r,{passive:!1,capture:!0}),M0(document,`touchend`,i,{passive:!1,capture:!0}),M0(document,`focus`,a,!0),M0(window,`scroll`,o));return()=>{l(),u(),window.scrollTo(s,c)}}function j0(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function M0(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function N0(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=T0(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+b0&&(t.scrollTop+=r-n)}e=t.parentElement}}function P0(e){return e instanceof HTMLInputElement&&!E0.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function F0(e,t){typeof e==`function`?e(t):e!=null&&(e.current=t)}function I0(...e){return t=>
200e.forEach(e=>F0(e,t))}function L0(...e){return b.useCallback(I0(...e),e)}var R0=new WeakMap;function z0(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([t,n])=>{if(t.startsWith(`--`)){e.style.setProperty(t,n);return}r[t]=e.style[t],e.style[t]=n}),!n&&R0.set(e,r)}function B0(e,t){if(!e||!(e instanceof HTMLElement))return;let n=R0.get(e);n&&(e.style[t]=n[t])}var V0=e=>{switch(e){case`top`:case`bottom`:return!0;case`left`:case`right`:return!1;default:return e}};function H0(e,t){if(!e)return null;let n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform,i=r.match(/^matrix3d\((.+)\)$/);return i?parseFloat(i[1].split(`, `)[V0(t)?13:12]):(i=r.match(/^matrix\((.+)\)$/),i?parseFloat(i[1].split(`, `)[V0(t)?5:4]):null)}function U0(e){return 8*(Math.log(e+1)-2)}function W0(e,t){if(!e)return()=>{};let n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}var G0={DURATION:.5,EASE:[.32,.72,0,1]},K0=.4,q0=.25,J0=100,Y0=8,X0=16,Z0=26,Q0=`vaul-dragging`;function $0(e){let t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...e)=>t.current==null?void 0:t.current.call(t,...e),[])}function e2({defaultProp:e,onChange:t}){let n=b.useState(e),[r]=n,i=b.useRef(r),a=$0(t);return b.useEffect(()=>{i.current!==r&&(a(r),i.current=r)},[r,i,a]),n}function t2({prop:e,defaultProp:t,onChange:n=()=>{}}){let[r,i]=e2({defaultProp:t,onChange:n}),a=e!==void 0,o=a?e:r,s=$0(n);return[o,b.useCallback(t=>{if(a){let n=typeof t==`function`?t(e):t;n!==e&&s(n)}else i(t)},[a,e,i,s])]}function n2({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:i,fadeFromIndex:a,onSnapPointChange:o,direction:s=`bottom`,container:c,snapToSequentialPoint:l}){let[u,d]=t2({prop:e,defaultProp:n?.[0],onChange:t}),[f,p]=b.useState(typeof window<`u`?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);b.useEffect(()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]);let m=b.useMemo(()=>u===n?.[n.length-1]||null,[n,u]),h=b.useMemo(()=>n?.findIndex(e=>e===u)??null,[n,u]),g=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===u||!n,_=b.useMemo(()=>{let e=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<`u`?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};return n?.map(t=>{let n=typeof t==`string`,r=0;if(n&&(r=parseInt(t,10)),V0(s)){let i=n?r:f?t*e.height:0;return f?s===`bottom`?e.height-i:-e.height+i:i}let i=n?r:f?t*e.width:0;return f?s===`right`?e.width-i:-e.width+i:i})??[]},[n,f,c]),v=b.useMemo(()=>h===null?null:_?.[h],[_,h]),y=b.useCallback(e=>{let t=_?.findIndex(t=>t===e)??null;o(t),z0(r.current,{transition:`transform ${G0.DURATION}s cubic-bezier(${G0.EASE.join(`,`)})`,transform:V0(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),_&&t!==_.length-1&&a!==void 0&&t!==a&&t<a?z0(i.current,{transition:`opacity ${G0.DURATION}s cubic-bezier(${G0.EASE.join(`,`)})`,opacity:`0`}):z0(i.current,{transition:`opacity ${G0.DURATION}s cubic-bezier(${G0.EASE.join(`,`)})`,opacity:`1`}),d(n?.[Math.max(t,0)])},[r.current,n,_,a,i,d]);b.useEffect(()=>{if(u||e){let t=n?.findIndex(t=>t===e||t===u)??-1;_&&t!==-1&&typeof _[t]==`number`&&y(_[t])}},[u,e,n,_,y]);function x({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:o}){if(a===void 0)return;let c=s===`bottom`||s===`right`?(v??0)-e:(v??0)+e,u=h===a-1,d=h===0,f=e>0;if(u&&z0(i.current,{transition:`opacity ${G0.DURATION}s cubic-bezier(${G0.EASE.join(`,`)})`}),!l&&r>2&&!f){o?t():y(_[0]);return}if(!l&&r>2&&f&&_&&n){y(_[n.length-1]);return}let p=_?.reduce((e,t)=>typeof e!=`number`||typeof t!=`number`?e:Math.abs(t-c)<Math.abs(e-c)?t:e),g=V0(s)?window.innerHeight:window.innerWidth;if(r>K0&&Math.abs(e)<g*.4){let e=f?1:-1;if(e>0&&m&&n){y(_[n.length-1]);return}if(d&&e<0&&o&&t(),h===null)return;y(_[h+e]);return}y(p)}function S({draggedDistance:e}){if(v===null)return;let t=s===`bottom`||s===`right`?v-e:v+e;(s===`bottom`||s===`right`)&&t<_[_.length-1]||(s===`top`||s===`left`)&&t>_[_.length-1]||z0(r.current,{transform:V0(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})}function C(e,t){if(!n||typeof h!=`number`||!_||a===void 0)return null;let r=h===a-1;if(h>=a&&t)return 0;if(r&&!t)return 1;if(!g&&!r)return null;let i=r?h+1:h-1,o=r?_[i]-_[i-1]:_[i+1]-_[i],s=e/Math.abs(o);return r?1-s:s}return{isLastSnapPoint:m,activeSnapPoint:u,shouldFade:g,getPercentageDragged:C,setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:x,onDrag:S,snapPointsOffset:_}}
200function r2(){let{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:i}=f0(),a=b.useRef(null),o=(0,b.useMemo)(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-Z0)/window.innerWidth}b.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);let t=document.querySelector(`[data-vaul-drawer-wrapper]`)||document.querySelector(`[vaul-drawer-wrapper]`);if(!t)return;r&&!i&&W0(document.body,{background:`black`}),W0(t,{transformOrigin:V0(e)?`top`:`left`,transitionProperty:`transform, border-radius`,transitionDuration:`${G0.DURATION}s`,transitionTimingFunction:`cubic-bezier(${G0.EASE.join(`,`)})`});let n=W0(t,{borderRadius:`${Y0}px`,overflow:`hidden`,...V0(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),a.current=window.setTimeout(()=>{o?document.body.style.background=o:document.body.style.removeProperty(`background`)},G0.DURATION*1e3)}}},[t,n,o])}var i2=null;function a2({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:i,noBodyStyles:a}){let[o,s]=b.useState(()=>typeof window<`u`?window.location.href:``),c=b.useRef(0),l=b.useCallback(()=>{if(g0()&&i2===null&&e&&!a){i2={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:`unset`};let{scrollX:e,innerHeight:t}=window;document.body.style.setProperty(`position`,`fixed`,`important`),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-e}px`,right:`0px`,height:`auto`}),window.setTimeout(()=>window.requestAnimationFrame(()=>{let e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=`${-(c.current+e)}px`)}),300)}},[e]),u=b.useCallback(()=>{if(g0()&&i2!==null&&!a){let e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,i2),window.requestAnimationFrame(()=>{if(i&&o!==window.location.href){s(window.location.href);return}window.scrollTo(t,e)}),i2=null}},[o]);return b.useEffect(()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener(`scroll`,e),()=>{window.removeEventListener(`scroll`,e)}},[]),b.useEffect(()=>{if(t)return()=>{typeof document>`u`||document.querySelector(`[data-vaul-drawer]`)||u()}},[t,u]),b.useEffect(()=>{n||!r||(e?(!window.matchMedia(`(display-mode: standalone)`).matches&&l(),t||window.setTimeout(()=>{u()},500)):u())},[e,r,o,t,n,l,u]),{restorePositionSetting:u}}function o2({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:i,snapPoints:a,shouldScaleBackground:o=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=q0,scrollLockTimeout:l=J0,dismissible:u=!0,handleOnly:d=!1,fadeFromIndex:f=a&&a.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:g=!0,onClose:_,nested:v,noBodyStyles:y=!1,direction:x=`bottom`,defaultOpen:S=!1,disablePreventScroll:C=!0,snapToSequentialPoint:w=!1,preventScrollRestoration:T=!1,repositionInputs:E=!0,onAnimationEnd:D,container:O,autoFocus:k=!1}){let[A=!1,j]=t2({defaultProp:S,prop:e,onChange:e=>{t?.(e),!e&&!v&&_e(),setTimeout(()=>{D?.(e)},G0.DURATION*1e3),e&&!g&&typeof window<`u`&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`}),e||(document.body.style.pointerEvents=`auto`)}}),[M,N]=b.useState(!1),[P,F]=b.useState(!1),[I,ee]=b.useState(!1),L=b.useRef(null),R=b.useRef(null),z=b.useRef(null),B=b.useRef(null),V=b.useRef(null),te=b.useRef(!1),ne=b.useRef(null),re=b.useRef(0),ie=b.useRef(!1),ae=b.useRef(!S),oe=b.useRef(0),se=b.useRef(null),ce=b.useRef(se.current?.getBoundingClientRect().height||0),H=b.useRef(se.current?.getBoundingClientRect().width||0),le=b.useRef(0),{activeSnapPoint:ue,activeSnapPointIndex:de,setActiveSnapPoint:fe,onRelease:pe,snapPointsOffset:U,onDrag:me,shouldFade:he,getPercentageDragged:ge}=n2({snapPoints:a,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:se,fadeFromIndex:f,overlayRef:L,onSnapPointChange:b.useCallback(e=>{a&&e===U.length-1&&(R.current=new Date)},[]),direction:x,container:O,snapToSequentialPoint:w});k0({isDisabled:!A||P||!g||I||!M||!E||!C});let{restorePositionSetting:_e}=a2({isOpen:A,modal:g,nested:v??!1,hasBeenOpened:M,preventScrollRestoration:T,noBodyStyles:y});function ve(){return(window.innerWidth-Z0)/window.innerWidth}function ye(e){!u&&!a||se.current&&!se.current.contains(e.target)||(ce.current=se.current?.getBoundingClientRect().height||0,H.current=se.current?.getBoundingClientRect().width||0,F(!0),z.current=ne
200w Date,v0()&&window.addEventListener(`touchend`,()=>te.current=!1,{once:!0}),e.target.setPointerCapture(e.pointerId),re.current=V0(x)?e.pageY:e.pageX)}function be(e,t){let n=e,r=window.getSelection()?.toString(),i=se.current?H0(se.current,x):null,a=new Date;if(n.tagName===`SELECT`||n.hasAttribute(`data-vaul-no-drag`)||n.closest(`[data-vaul-no-drag]`))return!1;if(x===`right`||x===`left`)return!0;if(R.current&&a.getTime()-R.current.getTime()<500)return!1;if(i!==null&&(x===`bottom`?i>0:i<0))return!0;if(r&&r.length>0)return!1;if(V.current&&a.getTime()-V.current.getTime()<l&&i===0||t)return V.current=a,!1;for(;n;){if(n.scrollHeight>n.clientHeight){if(n.scrollTop!==0)return V.current=new Date,!1;if(n.getAttribute(`role`)===`dialog`)return!0}n=n.parentNode}return!0}function xe(e){if(se.current&&P){let t=x===`bottom`||x===`right`?1:-1,n=(re.current-(V0(x)?e.pageY:e.pageX))*t,i=n>0,s=a&&!u&&!i;if(s&&de===0)return;let c=Math.abs(n),l=document.querySelector(`[data-vaul-drawer-wrapper]`),d=c/(x===`bottom`||x===`top`?ce.current:H.current),p=ge(c,i);if(p!==null&&(d=p),s&&d>=1||!te.current&&!be(e.target,i))return;if(se.current.classList.add(Q0),te.current=!0,z0(se.current,{transition:`none`}),z0(L.current,{transition:`none`}),a&&me({draggedDistance:n}),i&&!a){let e=U0(n),r=Math.min(e*-1,0)*t;z0(se.current,{transform:V0(x)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`});return}let m=1-d;if((he||f&&de===f-1)&&(r?.(e,d),z0(L.current,{opacity:`${m}`,transition:`none`},!0)),l&&L.current&&o){let e=Math.min(ve()+d*(1-ve()),1),t=8-d*8,n=Math.max(0,14-d*14);z0(l,{borderRadius:`${t}px`,transform:V0(x)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:`none`},!0)}if(!a){let e=c*t;z0(se.current,{transform:V0(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}}b.useEffect(()=>{window.requestAnimationFrame(()=>{ae.current=!0})},[]),b.useEffect(()=>{var e;function t(){if(!se.current||!E)return;let e=document.activeElement;if(P0(e)||ie.current){let e=window.visualViewport?.height||0,t=window.innerHeight,n=t-e,r=se.current.getBoundingClientRect().height||0,i=r>t*.8;le.current||=r;let o=se.current.getBoundingClientRect().top;if(Math.abs(oe.current-n)>60&&(ie.current=!ie.current),a&&a.length>0&&U&&de){let e=U[de]||0;n+=e}if(oe.current=n,r>e||ie.current){let t=se.current.getBoundingClientRect().height,r=t;t>e&&(r=e-(i?o:Z0)),h?se.current.style.height=`${t-Math.max(n,0)}px`:se.current.style.height=`${Math.max(r,e-o)}px`}else p0()||(se.current.style.height=`${le.current}px`);a&&a.length>0&&!ie.current?se.current.style.bottom=`0px`:se.current.style.bottom=`${Math.max(n,0)}px`}}return(e=window.visualViewport)==null||e.addEventListener(`resize`,t),()=>window.visualViewport?.removeEventListener(`resize`,t)},[de,a,U]);function Se(e){we(),_?.(),e||j(!1),setTimeout(()=>{a&&fe(a[0])},G0.DURATION*1e3)}function Ce(){if(!se.current)return;let e=document.querySelector(`[data-vaul-drawer-wrapper]`),t=H0(se.current,x);z0(se.current,{transform:`translate3d(0, 0, 0)`,transition:`transform ${G0.DURATION}s cubic-bezier(${G0.EASE.join(`,`)})`}),z0(L.current,{transition:`opacity ${G0.DURATION}s cubic-bezier(${G0.EASE.join(`,`)})`,opacity:`1`}),o&&t&&t>0&&A&&z0(e,{borderRadius:`${Y0}px`,overflow:`hidden`,...V0(x)?{transform:`scale(${ve()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:`top`}:{transform:`scale(${ve()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:`left`},transitionProperty:`transform, border-radius`,transitionDuration:`${G0.DURATION}s`,transitionTimingFunction:`cubic-bezier(${G0.EASE.join(`,`)})`},!0)}function we(){!P||!se.current||(se.current.classList.remove(Q0),te.current=!1,F(!1),B.current=new Date)}function Te(e){if(!P||!se.current)return;se.current.classList.remove(Q0),te.current=!1,F(!1),B.current=new Date;let t=H0(se.current,x);
200if(!e||!be(e.target,!1)||!t||Number.isNaN(t)||z.current===null)return;let n=B.current.getTime()-z.current.getTime(),r=re.current-(V0(x)?e.pageY:e.pageX),o=Math.abs(r)/n;if(o>.05&&(ee(!0),setTimeout(()=>{ee(!1)},200)),a){pe({draggedDistance:r*(x===`bottom`||x===`right`?1:-1),closeDrawer:Se,velocity:o,dismissible:u}),i?.(e,!0);return}if(x===`bottom`||x===`right`?r>0:r<0){Ce(),i?.(e,!0);return}if(o>K0){Se(),i?.(e,!1);return}let s=Math.min(se.current.getBoundingClientRect().height??0,window.innerHeight),l=Math.min(se.current.getBoundingClientRect().width??0,window.innerWidth);if(Math.abs(t)>=(x===`left`||x===`right`?l:s)*c){Se(),i?.(e,!1);return}i?.(e,!0),Ce()}b.useEffect(()=>(A&&(z0(document.documentElement,{scrollBehavior:`auto`}),R.current=new Date),()=>{B0(document.documentElement,`scrollBehavior`)}),[A]);function Ee(e){let t=e?(window.innerWidth-X0)/window.innerWidth:1,n=e?-16:0;ne.current&&window.clearTimeout(ne.current),z0(se.current,{transition:`transform ${G0.DURATION}s cubic-bezier(${G0.EASE.join(`,`)})`,transform:V0(x)?`scale(${t}) translate3d(0, ${n}px, 0)`:`scale(${t}) translate3d(${n}px, 0, 0)`}),!e&&se.current&&(ne.current=setTimeout(()=>{let e=H0(se.current,x);z0(se.current,{transition:`none`,transform:V0(x)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})},500))}function De(e,t){if(t<0)return;let n=(window.innerWidth-X0)/window.innerWidth,r=n+t*(1-n),i=-16+t*X0;z0(se.current,{transform:V0(x)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`,transition:`none`})}function Oe(e,t){let n=V0(x)?window.innerHeight:window.innerWidth,r=t?(n-X0)/n:1,i=t?-16:0;t&&z0(se.current,{transition:`transform ${G0.DURATION}s cubic-bezier(${G0.EASE.join(`,`)})`,transform:V0(x)?`scale(${r}) translate3d(0, ${i}px, 0)`:`scale(${r}) translate3d(${i}px, 0, 0)`})}return b.useEffect(()=>{g||window.requestAnimationFrame(()=>{document.body.style.pointerEvents=`auto`})},[g]),b.createElement(sW,{defaultOpen:S,onOpenChange:e=>{!u&&!e||(e?N(!0):Se(!0),j(e))},open:A},b.createElement(d0.Provider,{value:{activeSnapPoint:ue,snapPoints:a,setActiveSnapPoint:fe,drawerRef:se,overlayRef:L,onOpenChange:t,onPress:ye,onRelease:Te,onDrag:xe,dismissible:u,shouldAnimate:ae,handleOnly:d,isOpen:A,isDragging:P,shouldFade:he,closeDrawer:Se,onNestedDrag:De,onNestedOpenChange:Ee,onNestedRelease:Oe,keyboardIsOpen:ie,modal:g,snapPointsOffset:U,activeSnapPointIndex:de,direction:x,shouldScaleBackground:o,setBackgroundColorOnScale:s,noBodyStyles:y,container:O,autoFocus:k}},n))}var s2=b.forwardRef(function({...e},t){let{overlayRef:n,snapPoints:r,onRelease:i,shouldFade:a,isOpen:o,modal:s,shouldAnimate:c}=f0(),l=L0(t,n),u=r&&r.length>0;if(!s)return null;let d=b.useCallback(e=>i(e),[i]);return b.createElement(uW,{onMouseUp:d,ref:l,"data-vaul-overlay":``,"data-vaul-snap-points":o&&u?`true`:`false`,"data-vaul-snap-points-overlay":o&&a?`true`:`false`,"data-vaul-animate":c?.current?`true`:`false`,...e})});s2.displayName=`Drawer.Overlay`;var c2=b.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},i){let{drawerRef:a,onPress:o,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:u,activeSnapPointIndex:d,modal:f,isOpen:p,direction:m,snapPoints:h,container:g,handleOnly:_,shouldAnimate:v,autoFocus:y}=f0(),[x,S]=b.useState(!1),C=L0(i,a),w=b.useRef(null),T=b.useRef(null),E=b.useRef(!1),D=h&&h.length>0;r2();let O=(e,t,n=0)=>
200{if(E.current)return!0;let r=Math.abs(e.y),i=Math.abs(e.x),a=i>r,o=[`bottom`,`right`].includes(t)?1:-1;if(t===`left`||t===`right`){if(!(e.x*o<0)&&i>=0&&i<=n)return a}else if(!(e.y*o<0)&&r>=0&&r<=n)return!a;return E.current=!0,!0};b.useEffect(()=>{D&&window.requestAnimationFrame(()=>{S(!0)})},[]);function k(e){w.current=null,E.current=!1,s(e)}return b.createElement(dW,{"data-vaul-drawer-direction":m,"data-vaul-drawer":``,"data-vaul-delayed-snap-points":x?`true`:`false`,"data-vaul-snap-points":p&&D?`true`:`false`,"data-vaul-custom-container":g?`true`:`false`,"data-vaul-animate":v?.current?`true`:`false`,...r,ref:C,style:u&&u.length>0?{"--snap-point-height":`${u[d??0]}px`,...t}:t,onPointerDown:e=>{_||(r.onPointerDown==null||r.onPointerDown.call(r,e),w.current={x:e.pageX,y:e.pageY},o(e))},onOpenAutoFocus:e=>{n?.(e),y||e.preventDefault()},onPointerDownOutside:t=>{if(e?.(t),!f||t.defaultPrevented){t.preventDefault();return}l.current&&=!1},onFocusOutside:e=>{if(!f){e.preventDefault();return}},onPointerMove:e=>{if(T.current=e,_||(r.onPointerMove==null||r.onPointerMove.call(r,e),!w.current))return;let t=e.pageY-w.current.y,n=e.pageX-w.current.x,i=e.pointerType===`touch`?10:2;O({x:n,y:t},m,i)?c(e):(Math.abs(n)>i||Math.abs(t)>i)&&(w.current=null)},onPointerUp:e=>{r.onPointerUp==null||r.onPointerUp.call(r,e),w.current=null,E.current=!1,s(e)},onPointerOut:e=>{r.onPointerOut==null||r.onPointerOut.call(r,e),k(T.current)},onContextMenu:e=>{r.onContextMenu==null||r.onContextMenu.call(r,e),T.current&&k(T.current)}})});c2.displayName=`Drawer.Content`;var l2=250,u2=120,d2=b.forwardRef(function({preventCycle:e=!1,children:t,...n},r){let{closeDrawer:i,isDragging:a,snapPoints:o,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:u,isOpen:d,onPress:f,onDrag:p}=f0(),m=b.useRef(null),h=b.useRef(!1);function g(){if(h.current){y();return}window.setTimeout(()=>{_()},u2)}function _(){if(a||e||h.current){y();return}if(y(),!o||o.length===0){l||i();return}if(s===o[o.length-1]&&l){i();return}let t=o.findIndex(e=>e===s);if(t===-1)return;let n=o[t+1];c(n)}function v(){m.current=window.setTimeout(()=>{h.current=!0},l2)}function y(){m.current&&window.clearTimeout(m.current),h.current=!1}return b.createElement(`div`,{onClick:g,onPointerCancel:y,onPointerDown:e=>{u&&f(e),v()},onPointerMove:e=>{u&&p(e)},ref:r,"data-vaul-drawer-visible":d?`true`:`false`,"data-vaul-handle":``,"aria-hidden":`true`,...n},b.createElement(`span`,{"data-vaul-handle-hitarea":``,"aria-hidden":`true`},t))});d2.displayName=`Drawer.Handle`;function f2({onDrag:e,onOpenChange:t,open:n,...r}){let{onNestedDrag:i,onNestedOpenChange:a,onNestedRelease:o}=f0();if(!i)throw Error(`Drawer.NestedRoot must be placed in another drawer`);return b.createElement(o2,{nested:!0,open:n,onClose:()=>{a(!1)},onDrag:(t,n)=>{i(t,n),e?.(t,n)},onOpenChange:e=>{e&&a(e),t?.(e)},onRelease:o,...r})}function p2(e){let t=f0(),{container:n=t.container,...r}=e;return b.createElement(lW,{container:n,...r})}var m2={Root:o2,NestedRoot:f2,Content:c2,Overlay:s2,Trigger:cW,Portal:p2,Handle:d2,Close:mW,Title:fW,Description:pW},h2=({shouldScaleBackground:e=!0,...t})=>(0,z.jsx)(m2.Root,{shouldScaleBackground:e,...t});h2.displayName=`Drawer`;var g2=m2.Trigger,_2=m2.Portal;m2.Close;var v2=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(m2.Overlay,{ref:n,className:K(`fixed inset-0 z-50 bg-black/80`,e),...t}));v2.displayName=m2.Overlay.displayName;var y2=b.forwardRef(({className:e,children:t,...n},r)=>(0,z.jsxs)(_2,{children:[(0,z.jsx)(v2,{}),(0,z.jsxs)(m2.Content,{ref:r,className:K(`fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background`,e),...n,children:[(0,z.jsx)(`div`,{className:`mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted`}),t]})]}));y2.displayName=`DrawerContent`;var b2=({className:e,...t})=>(0,z.jsx)(`div`,{className:K(`grid gap-1.5 p-4 text-center sm:text-left`,e),...t});b2.displayName=`DrawerHeader`;var x2=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(m2.Title,{ref:n,className:K(`text-lg font-semibold leading-none tracking-tight`,e),...t}));x2.displayName=m2.Title.displayName;var S2=b.forwardRef(({className:e,...t},n)=>(0,z.jsx)(m2.Description,{ref:n,className:K(`text-sm text-muted-foreground`,e),...t}));S2.displayName=m2.Description.displayName;function C2({id:e,value:t,onChange:n,options:r,placeholder:i=`Selectâ¦`,className:a,title:o=`Choose an option`}){let[s,c]=(0,b.useState)(!1),l=r.map(e=>typeof e==`object`?e:{value:e,label:String(e)}),u=l.find(e=>e.value===t);
200return(0,z.jsxs)(h2,{open:s,onOpenChange:c,shouldScaleBackground:!1,children:[(0,z.jsx)(g2,{asChild:!0,children:(0,z.jsxs)(`button`,{type:`button`,id:e,className:K(`mt-1.5 w-full min-h-[38px] rounded-lg border border-input bg-card px-3 py-2 text-sm text-left flex items-center justify-between gap-2`,!u&&`text-muted-foreground`,a),children:[(0,z.jsx)(`span`,{className:`truncate`,children:u?u.label:i}),(0,z.jsx)(cn,{className:`w-4 h-4 shrink-0 opacity-60`})]})}),(0,z.jsxs)(y2,{children:[(0,z.jsx)(b2,{className:`sr-only`,children:(0,z.jsx)(x2,{children:o})}),(0,z.jsx)(`div`,{className:`max-h-[60vh] overflow-y-auto overscroll-contain px-3 pb-6 space-y-1`,children:l.map(e=>(0,z.jsxs)(`button`,{type:`button`,onClick:()=>{n(e.value),c(!1)},className:K(`w-full flex items-center justify-between gap-3 rounded-lg px-4 py-3 text-sm text-left transition-colors`,e.value===t?`bg-primary/10 text-primary font-medium`:`hover:bg-accent`),children:[(0,z.jsx)(`span`,{children:e.label}),e.value===t&&(0,z.jsx)(sn,{className:`w-4 h-4 shrink-0`})]},String(e.value)))})]})]})}var w2=e=>e==null?`â`:`£`+Number(e).toLocaleString(`en-GB`,{maximumFractionDigits:2}),T2=e=>e?new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`}):`â`,E2=`Edinburgh Diocesan Synod`;function D2(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(`all`),[c,l]=(0,b.useState)(()=>sessionStorage.getItem(`payroll_live_ok`)===`1`),[u,d]=(0,b.useState)(``),[f,p]=(0,b.useState)(``),[m,h]=(0,b.useState)(!1),g=async()=>{let[e,n]=await Promise.all([X.entities.PayrollEmployee.list(),X.entities.PayrollIntake.filter({status:`pending`})]);t(e),r(n.length)};(0,b.useEffect)(()=>{g()},[]);let _=(0,b.useMemo)(()=>l0,[]),v=c?e:_,y=(0,b.useMemo)(()=>[...new Set((v||[]).map(e=>e.charge))].sort(),[v]),x=(0,b.useMemo)(()=>{let e=i.trim().toLowerCase();return(v||[]).filter(t=>o!==`all`&&t.charge!==o?!1:!e||[t.employee_name,t.charge,t.tax_code,t.ni_number,t.payslip_email,t.notes].some(t=>(t||``).toLowerCase().includes(e))).sort((e,t)=>e.charge.localeCompare(t.charge)||e.employee_name.localeCompare(t.employee_name))},[v,i,o]),S=(0,b.useMemo)(()=>{let t=e||[];return{active:t.length,clergy:t.filter(e=>e.employment_type===`Clergy`).length,lay:t.filter(e=>e.employment_type===`Lay`).length,charges:[...new Set(t.map(e=>e.charge))].filter(e=>e!==E2).length}},[e]),C=[{icon:sr,label:`Active payroll staff`,value:S.active},{icon:ar,label:`Clergy`,value:S.clergy},{icon:sr,label:`Lay staff`,value:S.lay},{icon:Nn,label:`Charges on Diocesan Payroll`,value:S.charges}];return(0,z.jsx)(`div`,{children:(0,z.jsxs)(Z$,{onRefresh:g,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-brand-gold/20 text-brand-panel flex items-center justify-center shrink-0`,children:(0,z.jsx)(hn,{className:`w-5 h-5`})}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`font-display text-2xl sm:text-3xl`,children:`Payroll Register`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Staff on the in-house Diocesan Payroll Service â securely held, admin access only.`})]})]}),c?(0,z.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center gap-3 rounded-xl border border-primary/30 bg-primary/5 px-4 py-3 text-sm`,children:[(0,z.jsx)(tr,{className:`w-4 h-4 text-primary`}),(0,z.jsx)(`span`,{className:`font-medium`,children:`Live payroll data unlocked â real staff records are showing.`}),(0,z.jsx)(`button`,{onClick:()=>{sessionStorage.removeItem(`payroll_live_ok`),l(!1)},className:`font-medium text-primary underline-offset-2 hover:underline ml-auto`,children:`Return to demo mode`})]}):(0,z.jsx)(`div`,{className:`mt-6 rounded-xl border border-brand-gold/60 bg-brand-gold/10 p-4 sm:p-5`,children:(0,z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,z.jsx)(Cn,{className:`w-5 h-5 text-brand-panel mt-0.5 shrink-0`}),(0,z.jsxs)(`div`,{className:`text-sm w-full`,children:[(0,z.jsx)(`p`,{className:`font-medium`,children:`Demo mode â the records below are anonymised examples, safe to share on screen.`}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-1`,children:`Headline figures reflect the live register. To view real staff records, enter the secure payroll code.`}),(0,z.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),h(!0),p(``);try{let e=await X.functions.invoke(`verifyPayrollAccess`,{code:u});e.data?.verified?(sessionStorage.setItem(`payroll_live_ok`,`1`),l(!0),d(``)):e.data?.configured===!1?p(`The secure payroll code hasn't been set up yet â please add it in the app's secrets settings.`):p(`That code doesn't match. Please check with the Diocesan Office and try again.`)}catch{p(`That code doesn't match. Please check with the Diocesan Office and try again.`)}finally{h(!1)}},className:`mt-3 flex flex-wrap gap-2 items-center`,children:[(0,z.jsx)($h,{type:`password`,value:u,onChange:e=>d(e.target.value),placeholder:`Secure payroll code`,className:`w-full sm:w-56`}
200),(0,z.jsxs)(Qh,{type:`submit`,disabled:m||!u.trim(),children:[m?(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}):(0,z.jsx)(Mn,{className:`w-4 h-4 mr-2`}),`Unlock live data`]}),f&&(0,z.jsx)(`p`,{className:`text-sm text-destructive basis-full`,children:f})]})]})]})}),n>0&&(0,z.jsxs)(`div`,{className:`mt-6 flex flex-wrap items-center gap-3 rounded-xl border border-brand-gold/60 bg-brand-gold/10 px-4 py-3 text-sm`,children:[(0,z.jsxs)(`span`,{className:`font-medium`,children:[n,` payroll `,n===1?`submission is`:`submissions are`,` awaiting review`]}),(0,z.jsx)(Dc,{to:`/dashboard`,className:`font-medium text-primary underline-offset-2 hover:underline`,children:`Review in the Admin Dashboard â`})]}),(0,z.jsx)(`div`,{className:`mt-6 grid gap-4 grid-cols-2 lg:grid-cols-4`,children:C.map(({icon:t,label:n,value:r})=>(0,z.jsxs)(`div`,{className:`rounded-2xl border border-border/70 bg-card p-4 shadow-sm`,children:[(0,z.jsx)(t,{className:`w-4 h-4 text-muted-foreground`}),(0,z.jsx)(`p`,{className:`text-2xl font-heading mt-2`,children:e===null?`â¦`:r}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:n})]},n))}),(0,z.jsxs)(`div`,{className:`mt-6 flex flex-wrap gap-3 items-center`,children:[(0,z.jsxs)(`div`,{className:`relative flex-1 min-w-[220px]`,children:[(0,z.jsx)(Zn,{className:`w-4 h-4 text-muted-foreground absolute left-3 top-1/2 -translate-y-1/2`}),(0,z.jsx)($h,{value:i,onChange:e=>a(e.target.value),placeholder:`Search by name, charge, tax code, NI number or emailâ¦`,className:`pl-9`})]}),(0,z.jsx)(C2,{value:o,onChange:e=>s(e),options:[{value:`all`,label:`All charges`},...y.map(e=>({value:e,label:e}))],className:`mt-0 w-auto sm:w-56`,title:`Filter by charge`})]}),c&&e===null?(0,z.jsx)(`div`,{className:`py-16 flex justify-center`,children:(0,z.jsx)(`div`,{className:`w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin`})}):(0,z.jsx)(`div`,{className:`mt-4 rounded-2xl border border-border/70 bg-card shadow-sm overflow-x-auto`,children:(0,z.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{className:`border-b border-border/70 text-left text-xs uppercase tracking-wide text-muted-foreground`,children:[(0,z.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Employee`}),(0,z.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Charge`}),(0,z.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Type`}),(0,z.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Salary`}),(0,z.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Tax code`}),(0,z.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Start date`}),(0,z.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Payslip email`})]})}),(0,z.jsxs)(`tbody`,{children:[x.map(e=>(0,z.jsxs)(`tr`,{className:`border-b border-border/50 last:border-0`,children:[(0,z.jsx)(`td`,{className:`px-4 py-3 font-medium whitespace-nowrap`,children:e.employee_name}),(0,z.jsx)(`td`,{className:`px-4 py-3`,children:e.charge}),(0,z.jsx)(`td`,{className:`px-4 py-3`,children:(0,z.jsx)(`span`,{className:`inline-block rounded-full px-2 py-0.5 text-xs font-medium ${e.employment_type===`Clergy`?`bg-primary/10 text-primary`:`bg-muted text-muted-foreground`}`,children:e.employment_type})}),(0,z.jsxs)(`td`,{className:`px-4 py-3 whitespace-nowrap`,children:[(0,z.jsx)(`span`,{className:`font-medium`,children:w2(e.annual_salary)}),(0,z.jsxs)(`span`,{className:`block text-xs text-muted-foreground`,children:[w2(e.monthly_amount),` monthly`,e.weekly_hours?` · ${e.weekly_hours} hrs/wk`:``]})]}),(0,z.jsxs)(`td`,{className:`px-4 py-3 whitespace-nowrap`,children:[e.tax_code||`â`,e.ni_number&&(0,z.jsxs)(`span`,{className:`block text-xs text-muted-foreground`,children:[`NI `,e.ni_number]})]}),(0,z.jsx)(`td`,{className:`px-4 py-3 whitespace-nowrap`,children:T2(e.start_date)}),(0,z.jsxs)(`td`,{className:`px-4 py-3`,children:[(0,z.jsx)(`span`,{className:`break-all`,children:e.payslip_email||`â`}),e.notes&&(0,z.jsx)(`span`,{className:`block text-xs text-muted-foreground`,children:e.notes})]})]},e.id)),x.length===0&&(0,z.jsx)(`tr`,{children:(0,z.jsx)(`td`,{colSpan:7,className:`px-4 py-10 text-center text-muted-foreground`,children:`No staff match your search.`})})]})]})})]})})}var O2=[2025,2026,2027],k2=({ok:e})=>e?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-emerald-200 bg-emerald-100 text-emerald-800 px-2 py-0.5 text-xs font-medium`,children:[(0,z.jsx)(mn,{className:`w-3 h-3`}),`Done`]}):(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-rose-200 bg-rose-100 text-rose-800 px-2 py-0.5 text-xs font-medium`,children:[(0,z.jsx)(rr,{className:`w-3 h-3`}),`Outstanding`]}),A2=e=>[{label:`Accounts`,ok:!!e?.accounts_submitted},{label:`Financial summary`,ok:!!e?.financial_summary_file_url},{label:`OSCR return`,ok:!!e?.oscr_return_filed},{label:`Gift Aid`,ok:e?.gift_aid_status===`claimed`||e?.gift_aid_status===`not_applicable`},{label:`Safeguarding audit`,ok:!!e?.safeguarding_audit_completed},{label:`Statistical return`,ok:!!e?.statistical_return_received}],j2=e=>e?A2(e).every(e=>e.ok)?{label:`Complete`,cls:`border-emerald-200 bg-emerald-100 text-emerald-800`}:e.accounts_submitted?{label:`On track`,cls:`border-amber-200 bg-amber-100 text-amber-800`}:{label:`Outstanding`,cls:`border-rose-200 bg-rose-100 text-rose-800`}:{label:`No submission yet`,cls:`border-slate-200 bg-slate-100 text-slate-600`};function M2(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)([]),[i,a]=(0,b.useState)(new Date().getFullYear()),o=async()=>{let[e,n]=await Promise.all([X.entities.ChargesMaster.list(),X.entities.AnnualGovernanceTracker.list()]);t(e),r(n)};(0,b.useEffect)(()=>{o()},[]);let s=(0,b.useMemo)(()=>{let e={};return n.filter(e=>
200e.reporting_year===i).forEach(t=>{let n=e[t.charge];(!n||new Date(t.updated_date)>new Date(n.updated_date))&&(e[t.charge]=t)}),e},[n,i]),c=(0,b.useMemo)(()=>(e||[]).slice().sort((e,t)=>e.charge_name.localeCompare(t.charge_name)),[e]),l=(0,b.useMemo)(()=>({submitted:c.filter(e=>s[e.charge_name]?.accounts_submitted).length,complete:c.filter(e=>A2(s[e.charge_name]).every(e=>e.ok)).length,total:c.length}),[c,s]),u=[{label:`Accounts submitted (${i})`,value:`${l.submitted} / ${l.total}`},{label:`Fully compliant`,value:l.complete},{label:`Still outstanding`,value:l.total-l.submitted}];return(0,z.jsx)(`div`,{children:(0,z.jsxs)(Z$,{onRefresh:o,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,z.jsx)(`div`,{className:`w-11 h-11 rounded-xl bg-brand-gold/20 text-brand-panel flex items-center justify-center shrink-0`,children:(0,z.jsx)(hn,{className:`w-5 h-5`})}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`h1`,{className:`font-display text-2xl sm:text-3xl`,children:`Governance & Compliance`}),(0,z.jsxs)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:[`Maintaining Financial Health and Statutory Compliance â the 54-charge governance checklist for the Annual Accounts deadline of 14th January `,i+1,`.`]})]}),(0,z.jsx)(C2,{value:String(i),onChange:e=>a(Number(e)),options:O2.map(e=>({value:String(e),label:`Reporting year ${e}`})),className:`ml-auto mt-0 w-auto sm:w-56`,title:`Reporting year`})]}),(0,z.jsx)(`div`,{className:`mt-6 grid gap-4 grid-cols-1 sm:grid-cols-3`,children:u.map(({label:t,value:n})=>(0,z.jsxs)(`div`,{className:`rounded-2xl border border-border/70 bg-card p-4 shadow-sm`,children:[(0,z.jsx)(`p`,{className:`text-2xl font-heading mt-1`,children:e===null?`â¦`:n}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:t})]},t))}),(0,z.jsxs)(`p`,{className:`text-sm text-muted-foreground mt-6`,children:[`Treasurers and Priests submit via the public`,` `,(0,z.jsx)(`a`,{href:`/annual-returns`,className:`font-medium text-primary underline-offset-2 hover:underline`,children:`Annual Returns Portal`}),`â no account needed.`]}),e===null?(0,z.jsx)(`div`,{className:`py-16 flex justify-center`,children:(0,z.jsx)(`div`,{className:`w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin`})}):(0,z.jsx)(`div`,{className:`mt-4 rounded-2xl border border-border/70 bg-card shadow-sm overflow-x-auto`,children:(0,z.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,z.jsx)(`thead`,{children:(0,z.jsxs)(`tr`,{className:`border-b border-border/70 text-left text-xs uppercase tracking-wide text-muted-foreground`,children:[(0,z.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Charge`}),[`Accounts`,`Summary`,`OSCR`,`Gift Aid`,`Safeguarding`,`Statistical`].map(e=>(0,z.jsx)(`th`,{className:`px-4 py-3 font-medium whitespace-nowrap`,children:e},e)),(0,z.jsx)(`th`,{className:`px-4 py-3 font-medium`,children:`Status`})]})}),(0,z.jsx)(`tbody`,{children:c.map(e=>{let t=s[e.charge_name],n=A2(t),r=j2(t);return(0,z.jsxs)(`tr`,{className:`border-b border-border/50 last:border-0`,children:[(0,z.jsx)(`td`,{className:`px-4 py-3 font-medium whitespace-nowrap`,children:e.charge_name}),n.map(e=>(0,z.jsx)(`td`,{className:`px-4 py-3`,children:(0,z.jsx)(k2,{ok:e.ok})},e.label)),(0,z.jsx)(`td`,{className:`px-4 py-3`,children:(0,z.jsx)(`span`,{className:`inline-block rounded-full border px-2 py-0.5 text-xs font-medium whitespace-nowrap ${r.cls}`,children:r.label})})]},e.id)})})]})})]})})}var N2=[`The Communicant`,`Adventures in Faith`,`DMMC News`],P2=e=>e?new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`}):``;function F2(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)({publication:`The Communicant`,title:``,edition_date:``,description:``,external_url:``}),[u,d]=(0,b.useState)(null),f=(0,b.useCallback)(async()=>{let e=await X.entities.RecentPublication.list(`-edition_date`,100);t(e)},[]);(0,b.useEffect)(()=>{f()},[f]);let p=(e,t)=>l(n=>({...n,[e]:t})),m=async e=>{if(e.preventDefault(),s(``),!c.title){s(`Please give the issue a title, e.g. "The Communicant â 1st September".`);return}if(!u&&!c.external_url){s(`Please attach the issue PDF or paste a link to it on the diocesan website.`);return}a(!0);try{let e,t;u&&(e=(await X.integrations.Core.UploadPublicFile({file:u})).file_url,t=u.name),await X.entities.RecentPublication.create({publication:c.publication,title:c.title,edition_date:c.edition_date||void 0,description:c.description||void 0,external_url:c.external_url||void 0,file_url:e,file_name:t}),l({publication:`The Communicant`,title:``,edition_date:``,description:``,external_url:``}),d(null),r(!1),await f()}catch{s(`Something went wrong posting the issue â please try again.`)}finally{a(!1)}},h=async e=>{await X.entities.RecentPublication.delete(e),t(t=>t.filter(t=>t.id!==e))};return(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`h2`,{className:`font-display text-2xl`,children:`Recent publications`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1 max-w-2xl`,children:`Post the latest issues of The Communicant, Adventures in Faith and DMMC News here â every charge can read them from the story & event submission page, and see their own stories in print.`})]}),(0,z.jsxs)(Qh,{className:`ml-auto`,onClick:()=>r(e=>!e),children:[(0,z.jsx)(Kn,{className:`w-4 h-4 mr-2`}),n?`Cancel`:`Post an issue`]})]}),n&&(0,z.jsxs)(`form`,{onSubmit:m,className:`mt-5 rounded-xl border border-border/60 bg-background p-5 space-y-4`,children:[(0,z.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`pm-pub`,children:`Publication`}),(0,z.jsx)(`select`,{id:`pm-pub`,value:c.publication,onChange:e=>p(`publication`,e.target.value),className:`mt-1.5 w-full rounded-lg border border-input bg-card px-3 py-2 text-sm`,children:N2.map(e=>(0,z.jsx)(`option`,{children:e},e))})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`pm-title`,children:`Issue title *`}),(0,z.jsx)($h,{id:`pm-title`,value:c.title,onChange:e=>p(`title`,e.target.value),className:`mt-1.5`,placeholder:`e.g. "The Communicant â 1st September 2026"`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`pm-date`,children:`Edition date`}),(0,z.jsx)($h,{id:`pm-date`,type:`date`,value:c.edition_date,onChange:e=>p(`edition_date`,e.target.value),className:`mt-1.5`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`pm-link`,children:`Link to the issue (if on the website)`}),(0,z.jsx)($h,{id:`pm-link`,value:c.external_url,onChange:e=>p(`external_url`,e.target.value),className:`mt-1.5`,placeholder:`https://edinburgh.anglican.org/â¦`})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`pm-desc`,children:`What's inside (optional)`}),(0,z.jsx)(AD,{id:`pm-desc`,rows:2,value:c.description,onChange:e=>p(`description`,e.target.value),className:`mt-1.5`,placeholder:`A line or tw
200o so readers know what to expect.`})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`pm-file`,children:`Issue PDF (if uploading)`}),(0,z.jsx)(`input`,{id:`pm-file`,type:`file`,accept:`application/pdf`,onChange:e=>d(e.target.files&&e.target.files[0]),className:`mt-1.5 w-full text-sm text-muted-foreground file:mr-4 file:rounded-md file:border-0 file:bg-primary/10 file:px-4 file:py-2 file:text-sm file:font-medium file:text-primary hover:file:bg-primary/20`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:`Attach the PDF or paste the web link â one or the other.`})]})]}),o&&(0,z.jsx)(`p`,{className:`text-sm text-destructive`,children:o}),(0,z.jsxs)(Qh,{type:`submit`,disabled:i,children:[i&&(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Post issue for every charge to read`]})]}),e===null?(0,z.jsxs)(`div`,{className:`mt-6 flex items-center text-muted-foreground text-sm`,children:[(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}),`Loading issuesâ¦`]}):e.length===0?(0,z.jsxs)(`div`,{className:`mt-6 rounded-xl border border-dashed border-border bg-background p-8 text-center`,children:[(0,z.jsx)(tn,{className:`w-8 h-8 text-muted-foreground mx-auto`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-2`,children:`No issues posted yet â post the latest edition and it appears on the public page straight away.`})]}):(0,z.jsx)(`div`,{className:`mt-5 space-y-2`,children:e.map(e=>(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 rounded-xl border border-border/60 bg-background px-4 py-3`,children:[(0,z.jsx)(`span`,{className:`text-xs font-medium px-2 py-0.5 rounded-full bg-primary/10 text-primary`,children:e.publication}),(0,z.jsx)(`span`,{className:`text-sm font-medium`,children:e.title}),e.edition_date&&(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:P2(e.edition_date)}),e.file_url&&(0,z.jsx)(`a`,{href:e.file_url,target:`_blank`,rel:`noreferrer`,className:`text-xs text-primary underline underline-offset-2`,children:`PDF`}),e.external_url&&(0,z.jsx)(`a`,{href:e.external_url,target:`_blank`,rel:`noreferrer`,className:`text-xs text-primary underline underline-offset-2`,children:`Link`}),(0,z.jsx)(`button`,{onClick:()=>h(e.id),className:`ml-auto text-muted-foreground hover:text-destructive transition-colors`,title:`Remove issue`,children:(0,z.jsx)(nr,{className:`w-4 h-4`})})]},e.id))})]})}var I2=[{name:`The Communicant`,freq:`Fortnightly`},{name:`Adventures in Faith`,freq:`Monthly`},{name:`DMMC News`,freq:`Monthly`}],L2={pending:`bg-amber-100 text-amber-800`,reviewed:`bg-blue-100 text-blue-800`,published:`bg-green-100 text-green-800`};function R2(){let[e,t]=(0,b.useState)(null),[n,r]=(0,b.useState)(`all`),[i,a]=(0,b.useState)(`all`),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(!1),u=(0,b.useCallback)(async()=>{let e=await X.entities.StorySubmission.list(`-created_date`,200);t(e)},[]);(0,b.useEffect)(()=>{u()},[u]);let d=(e||[]).filter(e=>(n===`all`||e.publication===n)&&(i===`all`||e.status===i)&&(!o||`${e.title} ${e.charge} ${e.submitter_name} ${e.body}`.toLowerCase().includes(o.toLowerCase()))),f=t=>(e||[]).filter(e=>e.publication===t&&e.status!==`published`).length,p=async(e,n)=>{await X.entities.StorySubmission.update(e,{status:n}),t(t=>t.map(t=>t.id===e?{...t,status:n}:t))};return(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start gap-4`,children:[(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`h1`,{className:`font-display text-3xl`,children:`Story Submissions Desk`}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-1 max-w-2xl`,children:`Everything congregations send in for The Communicant, Adventures in Faith and DMMC News â in one place, ready to export for Canva. Weekly automated reminders go out to every Priest-in-Charge and Vestry each Monday morning asking them to share their news.`})]}),(0,z.jsxs)(`div`,{className:`ml-auto flex gap-2`,children:[(0,z.jsxs)(Qh,{variant:`outline`,onClick:async()=>{await navigator.clipboard.writeText(window.location.origin+`/share-story`),l(!0),setTimeout(()=>l(!1),2e3)},children:[(0,z.jsx)(In,{className:`w-4 h-4 mr-2`}),c?`Link copied`:`Copy submission link`]}),(0,z.jsxs)(Qh,{onClick:()=>{let e=[`Date`,`Charge`,`Submitter`,`Email`,`Publication`,`Type`,`Title`,`Body`,`Event date`,`Event location`,`Photo URL`,`Status`],t=d.map(e=>[e.created_date,e.charge,e.submitter_name,e.submitter_email,e.publication,e.submission_type,e.title,(e.body||``).replace(/\r?\n/g,` `),e.event_date||``,e.event_location||``,e.photo_file_url||``,e.status]),n=e=>`"`+String(e??``).replace(/"/g,`""`)+`"`,r=[e.join(`,`),...t.map(e=>e.map(n).join(`,`))].join(` 201`),i=new Blob([``+r],{type:`text/csv;charset=utf-8`}),a=URL.createObjectURL(i),o=document.createElement(`a`);o.href=a,o.download=`story-submissions.csv`,o.click(),URL.revokeObjectURL(a)},disabled:!d.length,children:[(0,z.jsx)(xn,{className:`w-4 h-4 mr-2`}),`Export CSV`]})]})]}),(0,z.jsx)(`div`,{className:`mt-6 grid gap-4 sm:grid-cols-3`,children:I2.map(e=>(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card p-4 shadow-sm`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`div`,{className:`w-9 h-9 rounded-lg bg-primary/10 text-primary flex items-center justify-center shrink-0`,children:(0,z.jsx)(Wn,{className:`w-4 h-4`})}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-medium text-sm`,children:e.name}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.freq})]}),(0,z.jsx)(`span`,{className:`ml-auto text-2xl font-display`,children:f(e.name)}
201)]}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-2`,children:`items awaiting publication`})]},e.name))}),(0,z.jsxs)(`div`,{className:`mt-6 flex flex-wrap gap-3 items-center`,children:[(0,z.jsxs)(`select`,{value:n,onChange:e=>r(e.target.value),className:`rounded-lg border border-input bg-card px-3 py-2 text-sm`,children:[(0,z.jsx)(`option`,{value:`all`,children:`All publications`}),I2.map(e=>(0,z.jsx)(`option`,{children:e.name},e.name)),(0,z.jsx)(`option`,{value:`Any publication`,children:`Any publication`})]}),(0,z.jsxs)(`select`,{value:i,onChange:e=>a(e.target.value),className:`rounded-lg border border-input bg-card px-3 py-2 text-sm`,children:[(0,z.jsx)(`option`,{value:`all`,children:`All statuses`}),(0,z.jsx)(`option`,{value:`pending`,children:`Pending`}),(0,z.jsx)(`option`,{value:`reviewed`,children:`Reviewed`}),(0,z.jsx)(`option`,{value:`published`,children:`Published`})]}),(0,z.jsx)($h,{value:o,onChange:e=>s(e.target.value),placeholder:`Search title, charge, submitterâ¦`,className:`max-w-xs`}),(0,z.jsxs)(`span`,{className:`text-sm text-muted-foreground ml-auto`,children:[d.length,` submission`,d.length===1?``:`s`]})]}),e===null?(0,z.jsxs)(`div`,{className:`mt-10 flex items-center justify-center text-muted-foreground`,children:[(0,z.jsx)(Ln,{className:`w-5 h-5 mr-2 animate-spin`}),`Loading submissionsâ¦`]}):d.length===0?(0,z.jsxs)(`div`,{className:`mt-10 rounded-2xl border border-dashed border-border bg-card p-12 text-center`,children:[(0,z.jsx)(jn,{className:`w-10 h-10 text-muted-foreground mx-auto`}),(0,z.jsx)(`p`,{className:`font-medium mt-3`,children:`No submissions yet`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Once congregations start responding to the weekly reminders, their stories and events will appear here.`})]}):(0,z.jsx)(`div`,{className:`mt-4 space-y-3`,children:d.map(e=>(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card p-5 shadow-sm`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`text-xs font-medium px-2 py-0.5 rounded-full bg-primary/10 text-primary`,children:e.publication}),(0,z.jsx)(`span`,{className:`text-xs px-2 py-0.5 rounded-full bg-secondary text-secondary-foreground`,children:e.submission_type}),(0,z.jsx)(`span`,{className:`text-xs px-2 py-0.5 rounded-full font-medium ${L2[e.status]||L2.pending}`,children:e.status}),(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground ml-auto`,children:e.created_date?new Date(e.created_date).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`}):``})]}),(0,z.jsx)(`h3`,{className:`font-display text-lg mt-2`,children:e.title}),(0,z.jsxs)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:[e.charge,` · `,e.submitter_name,e.submitter_email?` (${e.submitter_email})`:``]}),(0,z.jsx)(`p`,{className:`text-sm mt-2 whitespace-pre-wrap`,children:e.body}),(e.event_date||e.event_location)&&(0,z.jsxs)(`p`,{className:`text-sm text-muted-foreground mt-2`,children:[e.event_date?`Event: ${new Date(e.event_date).toLocaleDateString(`en-GB`,{day:`numeric`,month:`long`,year:`numeric`})}`:`Event`,e.event_location?` â ${e.event_location}`:``]}),(0,z.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-2`,children:[e.photo_file_url&&(0,z.jsx)(`a`,{href:e.photo_file_url,target:`_blank`,rel:`noreferrer`,children:(0,z.jsx)(Qh,{variant:`outline`,size:`sm`,children:`View photo`})}),e.status===`pending`&&(0,z.jsx)(Qh,{size:`sm`,variant:`secondary`,onClick:()=>p(e.id,`reviewed`),children:`Mark reviewed`}),e.status!==`published`&&(0,z.jsx)(Qh,{size:`sm`,onClick:()=>p(e.id,`published`),children:`Mark published`}),e.status===`published`&&(0,z.jsx)(Qh,{size:`sm`,variant:`outline`,onClick:()=>p(e.id,`reviewed`),children:`Back to reviewed`})]})]},e.id))}),(0,z.jsx)(`div`,{className:`mt-10`,children:(0,z.jsx)(F2,{})})]})}var z2=[{path:`/hub`,Component:s1},{path:`/payroll`,Component:D2},{path:`/governance`,Component:M2},{path:`/communications`,Component:R2}];function B2(){let e=Ms(),{user:t,role:n,isAuthor:r}=UP(),i=e.pathname===`/hub`,a=(0,b.useRef)({}),o=(0,b.useRef)(e.pathname);(0,b.useEffect)(()=>
201{if(o.current===e.pathname)return;a.current[o.current]=window.scrollY;let t=a.current[e.pathname]||0;o.current=e.pathname;let n=window.setTimeout(()=>window.scrollTo(0,t),0);return()=>window.clearTimeout(n)},[e.pathname]);let s=z2.some(t=>t.path===e.pathname);return(0,z.jsxs)(`div`,{className:`min-h-screen bg-brand-bg`,children:[(0,z.jsx)(`header`,{className:`sticky top-0 z-30 border-b border-brand-border bg-gradient-to-r from-brand-primary-deep via-brand-primary to-brand-primary-deep text-brand-cream`,style:{paddingTop:`env(safe-area-inset-top)`},children:(0,z.jsxs)(`div`,{className:`max-w-7xl mx-auto px-4 sm:px-6 h-16 flex items-center justify-between`,children:[(0,z.jsxs)(Dc,{to:`/hub`,className:`flex items-center gap-3 group`,children:[(0,z.jsx)(Dg,{size:38,light:!0}),(0,z.jsxs)(`div`,{className:`leading-tight`,children:[(0,z.jsx)(`div`,{className:`font-serif text-base sm:text-lg tracking-wide whitespace-nowrap`,children:`Diocese of Edinburgh`}),(0,z.jsx)(`div`,{className:`text-[11px] uppercase tracking-[0.2em] text-brand-gold`,children:`Diocesan Hub`})]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2 sm:gap-3`,children:[t&&(0,z.jsxs)(`div`,{className:`hidden sm:block text-right leading-tight`,children:[(0,z.jsx)(`div`,{className:`text-sm`,children:t.full_name}),(0,z.jsx)(`div`,{className:`text-[11px] text-brand-gold uppercase tracking-wider`,children:n===`author`?`Author`:n===`editor`?`Editor`:`Viewer`})]}),(0,z.jsxs)(Dc,{to:`/`,title:`Canon 35 & Funding Applications portal`,className:`hidden sm:flex items-center gap-1.5 h-9 px-2 rounded-md text-brand-cream/90 hover:text-brand-cream hover:bg-white/10 transition-colors text-xs`,children:[(0,z.jsx)(fn,{className:`w-4 h-4`}),`Applications`]}),r&&(0,z.jsx)(Dc,{to:`/admin`,title:`Admin Dashboard`,className:`flex items-center justify-center w-9 h-9 rounded-md text-brand-gold hover:text-brand-gold hover:bg-white/10 transition-colors`,children:(0,z.jsx)(tr,{className:`w-4 h-4`})}),(0,z.jsx)(c1,{}),(0,z.jsx)(n0,{user:t,role:n})]})]})}),!i&&(0,z.jsx)(`div`,{className:`max-w-7xl mx-auto px-4 sm:px-6 pt-5`,children:(0,z.jsxs)(Qh,{variant:`ghost`,size:`sm`,className:`text-brand-text-muted hover:bg-brand-bg-soft -ml-2`,onClick:()=>window.history.back(),children:[(0,z.jsx)(ln,{className:`w-4 h-4 mr-1`}),` Back`]})}),(0,z.jsxs)(`main`,{className:`max-w-7xl mx-auto px-4 sm:px-6 py-6 pb-24 md:pb-6`,children:[z2.map(({path:t,Component:n})=>(0,z.jsx)(`div`,{className:t===e.pathname?`block`:`hidden`,"aria-hidden":t!==e.pathname,children:(0,z.jsx)(n,{})},t)),!s&&(0,z.jsx)(sc,{})]}),(0,z.jsx)(`footer`,{className:`border-t border-brand-border mt-12 py-6 pb-24 md:pb-6 text-center text-xs text-brand-body-muted`,children:`Diocese of Edinburgh â supporting our congregations across Edinburgh, the Lothians & the Scottish Borders`}),(0,z.jsx)(u1,{})]})}function V2({user:e,onVerified:t}){let[n,r]=(0,b.useState)(``),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(!1);return(0,z.jsx)(`div`,{className:`min-h-screen flex items-center justify-center bg-brand-bg px-4`,children:(0,z.jsxs)(`div`,{className:`w-full max-w-md rounded-2xl border border-brand-border bg-brand-surface p-8 shadow-lg`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3 mb-6`,children:[(0,z.jsx)(Dg,{size:44}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h1`,{className:`font-serif text-xl text-brand-text`,children:`Diocesan staff verification`}),(0,z.jsx)(`p`,{className:`text-xs text-brand-body-muted mt-0.5`,children:e?.email})]})]}),o?(0,z.jsxs)(`div`,{className:`space-y-4`,children:[(0,z.jsx)(`p`,{className:`text-sm text-brand-body`,children:`The diocesan access code hasn't been set up yet. Once the app owner sets it, all staff will need it here â for now you can continue to the Hub.`}),(0,z.jsxs)(Qh,{onClick:t,className:`w-full bg-brand-primary text-brand-cream hover:bg-brand-primary-deep`,children:[`Continue to the Diocesan Hub `,(0,z.jsx)($t,{className:`w-4 h-4 ml-1`})]})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`flex items-start gap-2 mb-5`,children:[(0,z.jsx)(tr,{className:`w-4 h-4 text-brand-accent mt-0.5 shrink-0`}),(0,z.jsx)(`p`,{className:`text-sm text-brand-body`,children:`Your account has staff permissions, but the Hub â which holds confidential contact and finance records â needs one more check. Enter the diocesan access code issued by the Diocesan Office. You'll only need to do this once on this account.`})]}),(0,z.jsxs)(`form`,{onSubmit:async e=>{e.preventDefault(),a(``),l(!0);try{let e=await X.functions.invoke(`verifyHubAccess`,{code:n});e.data?.verified?t():e.data?.configured===!1?s(!0):a(`That code doesn't match. Please check with the Diocesan Office and try again.`)}catch{a(`That code doesn't match. Please check with the Diocesan Office and try again.`)}finally{l(!1)}},className:`space-y-4`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`hub-code`,children:`Diocesan access code`}),(0,z.jsx)($h,{id:`hub-code`,value:n,onChange:e=>r(e.target.value),placeholder:`Enter the staff access code`,className:`mt-1.5`,autoFocus:!0})]}),i&&(0,z.jsx)(`p`,{className:`text-sm text-destructive`,children:i}
201),(0,z.jsxs)(Qh,{type:`submit`,disabled:c||!n.trim(),className:`w-full bg-brand-primary text-brand-cream hover:bg-brand-primary-deep`,children:[c?(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}):(0,z.jsx)(Mn,{className:`w-4 h-4 mr-2`}),`Unlock the Diocesan Hub`]})]})]})]})})}function H2(){let[e,t]=(0,b.useState)(`checking`),[n,r]=(0,b.useState)(null);return(0,b.useEffect)(()=>{X.auth.me().then(e=>{r(e),e?.role===`admin`?e?.hub_verified||e?.data?.hub_verified?t(`allowed`):t(`gate`):t(`denied`)}).catch(()=>t(`denied`))},[]),e===`checking`?(0,z.jsx)(`div`,{className:`fixed inset-0 flex items-center justify-center`,children:(0,z.jsx)(`div`,{className:`w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin`})}):e===`denied`?(0,z.jsx)(oc,{to:`/`,replace:!0}):e===`gate`?(0,z.jsx)(V2,{user:n,onVerified:()=>t(`allowed`)}):(0,z.jsx)(sc,{})}var U2=s(((e,t)=>{(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.html2canvas=r())})(e,(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},n.apply(this,arguments)};function r(e,t,n,r){function i(e){return e instanceof n?e:new n(function(t){t(e)})}return new(n||=Promise)(function(n,a){function o(e){try{c(r.next(e))}catch(e){a(e)}}function s(e){try{c(r.throw(e))}catch(e){a(e)}}function c(e){e.done?n(e.value):i(e.value).then(o,s)}c((r=r.apply(e,t||[])).next())})}function i(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,o;return o={next:s(0),throw:s(1),return:s(2)},typeof Symbol==`function`&&(o[Symbol.iterator]=function(){return this}),o;function s(e){return function(t){return c([e,t])}}function c(o){if(r)throw TypeError(`Generator is already executing.`);for(;n;)try{if(r=1,i&&(a=o[0]&2?i.return:o[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,o[1])).done)return a;switch(i=0,a&&(o=[o[0]&2,a.value]),o[0]){case 0:case 1:a=o;break;case 4:return n.label++,{value:o[1],done:!1};case 5:n.label++,i=o[1],o=[0];continue;case 7:o=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>
2010&&a[a.length-1])&&(o[0]===6||o[0]===2)){n=0;continue}if(o[0]===3&&(!a||o[1]>a[0]&&o[1]<a[3])){n.label=o[1];break}if(o[0]===6&&n.label<a[1]){n.label=a[1],a=o;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(o);break}a[2]&&n.ops.pop(),n.trys.pop();continue}o=t.call(e,n)}catch(e){o=[6,e],i=0}finally{r=a=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}}function a(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||t)}for(var o=function(){function e(e,t,n,r){this.left=e,this.top=t,this.width=n,this.height=r}return e.prototype.add=function(t,n,r,i){return new e(this.left+t,this.top+n,this.width+r,this.height+i)},e.fromClientRect=function(t,n){return new e(n.left+t.windowBounds.left,n.top+t.windowBounds.top,n.width,n.height)},e.fromDOMRectList=function(t,n){var r=Array.from(n).find(function(e){return e.width!==0});return r?new e(r.left+t.windowBounds.left,r.top+t.windowBounds.top,r.width,r.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),s=function(e,t){return o.fromClientRect(e,t.getBoundingClientRect())},c=function(e){var t=e.body,n=e.documentElement;if(!t||!n)throw Error(`Unable to get document size`);return new o(0,0,Math.max(Math.max(t.scrollWidth,n.scrollWidth),Math.max(t.offsetWidth,n.offsetWidth),Math.max(t.clientWidth,n.clientWidth)),Math.max(Math.max(t.scrollHeight,n.scrollHeight),Math.max(t.offsetHeight,n.offsetHeight),Math.max(t.clientHeight,n.clientHeight)))},l=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),n--)}else t.push(i)}return t},u=function(){var e=[...arguments];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var t=e.length;if(!t)return``;for(var n=[],r=-1,i=``;++r<t;){var a=e[r];a<=65535?n.push(a):(a-=65536,n.push((a>>10)+55296,a%1024+56320)),(r+1===t||n.length>16384)&&(i+=String.fromCharCode.apply(String,n),n.length=0)}return i},d=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,f=typeof Uint8Array>`u`?[]:new Uint8Array(256),p=0;p<d.length;p++)f[d.charCodeAt(p)]=p;for(var m=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,h=typeof Uint8Array>`u`?[]:new Uint8Array(256),g=0;g<m.length;g++)h[m.charCodeAt(g)]=g;for(var _=function(e){var t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);var l=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`&&Uint8Array.prototype.slice!==void 0?new ArrayBuffer(t):Array(t),u=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<n;r+=4)a=h[e.charCodeAt(r)],o=h[e.charCodeAt(r+1)],s=h[e.charCodeAt(r+2)],c=h[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},v=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},y=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},b=5,x=11,S=2,C=x-b,w=65536>>b,T=(1<<b)-1,E=w+(1024>>b)+32,D=65536>>x,O=(1<<C)-1,k=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},A=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},j=function(e,t){var n=_(e),r=Array.isArray(n)?y(n):new Uint32Array(n),i=Array.isArray(n)?v(n):new Uint16Array(n),a=24,o=k(i,a/2,r[4]/2),s=r[5]===2?k(i,(a+r[4])/2):A(r,Math.ceil((a+r[4])/4));return new M(r[0],r[1],r[2],r[3],o,s)},M=function(){function e(e,t,n,r,i,a){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>b],t=(t<<S)+(e&T),this.data[t];if(e<=65535)return t=this.index[w+(e-55296>>b)],t=(t<<S)+(e&T),this.data[t];if(e<this.highStart)return t=E-D+(e>>x),t=this.index[t],t+=e>>b&O,t=this.index[t],t=(t<<S)+(e&T),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),N=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
201+/`,P=typeof Uint8Array>`u`?[]:new Uint8Array(256),F=0;F<N.length;F++)P[N.charCodeAt(F)]=F;var I=`
vendor: 52,888 bytes, line 201
201KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA==
201`,ee=50,L=1,R=2,z=3,B=4,V=5,te=7,ne=8,re=9,ie=10,ae=11,oe=12,se=13,ce=14,H=15,le=16,ue=17,de=18,fe=19,pe=20,U=21,me=22,he=23,ge=24,_e=25,ve=26,ye=27,be=28,xe=29,Se=30,Ce=31,we=32,Te=33,Ee=34,De=35,Oe=36,ke=37,Ae=38,je=39,Me=40,Ne=41,Pe=42,Fe=43,Ie=[9001,65288],Le=`!`,Re=`Ã`,ze=`÷`,Be=j(I),Ve=[Se,Oe],He=[L,R,z,V],Ue=[ie,ne],We=[ye,ve],Ge=He.concat(Ue),Ke=[Ae,je,Me,Ee,De],qe=[H,se],Je=function(e,t){t===void 0&&(t=`strict`);var n=[],r=[],i=[];return e.forEach(function(e,a){var o=Be.get(e);if(o>ee?(i.push(!0),o-=ee):i.push(!1),[`normal`,`auto`,`loose`].indexOf(t)!==-1&&[8208,8211,12316,12448].indexOf(e)!==-1)return r.push(a),n.push(le);if(o===B||o===ae){if(a===0)return r.push(a),n.push(Se);var s=n[a-1];return Ge.indexOf(s)===-1?(r.push(r[a-1]),n.push(s)):(r.push(a),n.push(Se))}if(r.push(a),o===Ce)return n.push(t===`strict`?U:ke);if(o===Pe||o===xe)return n.push(Se);if(o===Fe)return e>=131072&&e<=196605||e>=196608&&e<=262141?n.push(ke):n.push(Se);n.push(o)}),[r,n,i]},Ye=function(e,t,n,r){var i=r[n];if(Array.isArray(e)?e.indexOf(i)!==-1:e===i)for(var a=n;a<=r.length;){a++;var o=r[a];if(o===t)return!0;if(o!==ie)break}if(i===ie)for(var a=n;a>0;){a--;var s=r[a];if(Array.isArray(e)?e.indexOf(s)!==-1:e===s)for(var c=n;c<=r.length;){c++;var o=r[c];if(o===t)return!0;if(o!==ie)break}if(s!==ie)break}return!1},Xe=function(e,t){for(var n=e;n>=0;){var r=t[n];if(r===ie)n--;else return r}return 0},Ze=function(e,t,n,r,i){if(n[r]===0)return Re;var a=r-1;if(Array.isArray(i)&&i[a]===!0)return Re;var o=a-1,s=a+1,c=t[a],l=o>=0?t[o]:0,u=t[s];if(c===R&&u===z)return Re;if(He.indexOf(c)!==-1)return Le;if(He.indexOf(u)!==-1||Ue.indexOf(u)!==-1)return Re;if(Xe(a,t)===ne)return ze;if(Be.get(e[a])===ae||(c===we||c===Te)&&Be.get(e[s])===ae||c===te||u===te||c===re||[ie,se,H].indexOf(c)===-1&&u===re||[ue,de,fe,ge,be].indexOf(u)!==-1||Xe(a,t)===me||Ye(he,me,a,t)||Ye([ue,de],U,a,t)||Ye(oe,oe,a,t))return Re;if(c===ie)return ze;if(c===he||u===he)return Re;if(u===le||c===le)return ze;if([se,H,U].indexOf(u)!==-1||c===ce||l===Oe&&qe.indexOf(c)!==-1||c===be&&u===Oe||u===pe||Ve.indexOf(u)!==-1&&c===_e||Ve.indexOf(c)!==-1&&u===_e||c===ye&&[ke,we,Te].indexOf(u)!==-1||[ke,we,Te].indexOf(c)!==-1&&u===ve||Ve.indexOf(c)!==-1&&We.indexOf(u)!==-1||We.indexOf(c)!==-1&&Ve.indexOf(u)!==-1||[ye,ve].indexOf(c)!==-1&&(u===_e||[me,H].indexOf(u)!==-1&&t[s+1]===_e)||[me,H].indexOf(c)!==-1&&u===_e||c===_e&&[_e,be,ge].indexOf(u)!==-1)return Re;if([_e,be,ge,ue,de].indexOf(u)!==-1)for(var d=a;d>=0;){var f=t[d];if(f===_e)return Re;if([be,ge].indexOf(f)!==-1)d--;else break}if([ye,ve].indexOf(u)!==-1)for(var d=[ue,de].indexOf(c)===-1?a:o;d>=0;){var f=t[d];if(f===_e)return Re;if([be,ge].indexOf(f)!==-1)d--;else break}if(Ae===c&&[Ae,je,Ee,De].indexOf(u)!==-1||[je,Ee].indexOf(c)!==-1&&[je,Me].indexOf(u)!==-1||[Me,De].indexOf(c)!==-1&&u===Me||Ke.indexOf(c)!==-1&&[pe,ve].indexOf(u)!==-1||Ke.indexOf(u)!==-1&&c===ye||Ve.indexOf(c)!==-1&&Ve.indexOf(u)!==-1||c===ge&&Ve.indexOf(u)!==-1||Ve.concat(_e).indexOf(c)!==-1&&u===me&&Ie.indexOf(e[s])===-1||Ve.concat(_e).indexOf(u)!==-1&&c===de)return Re;if(c===Ne&&u===Ne){for(var p=n[a],m=1;p>0&&(p--,t[p]===Ne);)m++;
vendor: 27,782 bytes, line 201
201if(m%2!=0)return Re}return c===we&&u===Te?Re:ze},Qe=function(e,t){t||={lineBreak:`normal`,wordBreak:`normal`};var n=Je(e,t.lineBreak),r=n[0],i=n[1],a=n[2];(t.wordBreak===`break-all`||t.wordBreak===`break-word`)&&(i=i.map(function(e){return[_e,Se,Pe].indexOf(e)===-1?e:ke}));var o=t.wordBreak===`keep-all`?a.map(function(t,n){return t&&e[n]>=19968&&e[n]<=40959}):void 0;return[r,i,o]},$e=function(){function e(e,t,n,r){this.codePoints=e,this.required=t===Le,this.start=n,this.end=r}return e.prototype.slice=function(){return u.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),et=function(e,t){var n=l(e),r=Qe(n,t),i=r[0],a=r[1],o=r[2],s=n.length,c=0,u=0;return{next:function(){if(u>=s)return{done:!0,value:null};for(var e=Re;u<s&&(e=Ze(n,a,i,++u,o))===Re;);if(e!==Re||u===s){var t=new $e(n,e,c,u);return c=u,{value:t,done:!1}}return{done:!0,value:null}}}},tt=1,nt=2,rt=4,it=8,at=10,ot=47,st=92,ct=9,lt=32,ut=34,dt=61,ft=35,pt=36,mt=37,ht=39,gt=40,_t=41,vt=95,yt=45,bt=33,xt=60,St=62,Ct=64,wt=91,Tt=93,Et=61,Dt=123,Ot=63,kt=125,At=124,jt=126,Mt=128,Nt=65533,Pt=42,Ft=43,It=44,Lt=58,Rt=59,zt=46,Bt=0,Vt=8,Ht=11,Ut=14,Wt=31,Gt=127,Kt=-1,qt=48,Jt=97,Yt=101,Xt=102,W=117,Zt=122,Qt=65,$t=69,en=70,tn=85,nn=90,rn=function(e){return e>=qt&&e<=57},an=function(e){return e>=55296&&e<=57343},on=function(e){return rn(e)||e>=Qt&&e<=en||e>=Jt&&e<=Xt},sn=function(e){return e>=Jt&&e<=Zt},cn=function(e){return e>=Qt&&e<=nn},ln=function(e){return sn(e)||cn(e)},un=function(e){return e>=Mt},dn=function(e){return e===at||e===ct||e===lt},fn=function(e){return ln(e)||un(e)||e===vt},pn=function(e){return fn(e)||rn(e)||e===yt},mn=function(e){return e>=Bt&&e<=Vt||e===Ht||e>=Ut&&e<=Wt||e===Gt},hn=function(e,t){return e===st&&t!==at},gn=function(e,t,n){return e===yt?fn(t)||hn(t,n):fn(e)?!0:!!(e===st&&hn(e,t))},_n=function(e,t,n){return e===Ft||e===yt?rn(t)?!0:t===zt&&rn(n):rn(e===zt?t:e)},vn=function(e){var t=0,n=1;(e[t]===Ft||e[t]===yt)&&(e[t]===yt&&(n=-1),t++);for(var r=[];rn(e[t]);)r.push(e[t++]);var i=r.length?parseInt(u.apply(void 0,r),10):0;e[t]===zt&&t++;for(var a=[];rn(e[t]);)a.push(e[t++]);var o=a.length,s=o?parseInt(u.apply(void 0,a),10):0;(e[t]===$t||e[t]===Yt)&&t++;var c=1;(e[t]===Ft||e[t]===yt)&&(e[t]===yt&&(c=-1),t++);for(var l=[];rn(e[t]);)l.push(e[t++]);var d=l.length?parseInt(u.apply(void 0,l),10):0;return n*(i+s*10**-o)*10**(c*d)},yn={type:2},bn={type:3},xn={type:4},Sn={type:13},Cn={type:8},wn={type:21},Tn={type:9},En={type:10},Dn={type:11},On={type:12},kn={type:14},An={type:23},jn={type:1},Mn={type:25},Nn={type:24},Pn={type:26},Fn={type:27},In={type:28},Ln={type:29},Rn={type:31},zn={type:32},Bn=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(l(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==zn;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case ut:return this.consumeStringToken(ut);case ft:var t=this.peekCodePoint(0),n=this.peekCodePoint(1),r=this.peekCodePoint(2);if(pn(t)||hn(n,r)){var i=gn(t,n,r)?nt:tt,a=this.consumeName();return{type:5,value:a,flags:i}}break;case pt:if(this.peekCodePoint(0)===dt)return this.consumeCodePoint(),Sn;break;case ht:return this.consumeStringToken(ht);case gt:return yn;case _t:return bn;case Pt:if(this.peekCodePoint(0)===dt)return this.consumeCodePoint(),kn;break;case Ft:if(_n(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case It:return xn;case yt:var o=e,s=this.peekCodePoint(0),c=this.peekCodePoint(1);if(_n(o,s,c))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(gn(o,s,c))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(s===yt&&c===St)return this.consumeCodePoint(),this.consumeCodePoint(),Nn;break;case zt:if(_n(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case ot:if(this.peekCodePoint(0)===Pt)for(this.consumeCodePoint();;){var l=this.consumeCodePoint();if(l===Pt&&(l=this.consumeCodePoint(),l===ot)||l===Kt)return this.consumeToken()}break;case Lt:return Pn;case Rt:return Fn;case xt:if(this.peekCodePoint(0)===bt&&this.peekCodePoint(1)===yt&&this.peekCodePoint(2)===yt)return this.consumeCodePoint(),this.consumeCodePoint(),Mn;break;case Ct:if(gn(this.peekCodePoint(0),this.peekCodePoint(1),this.peekCodePoint(2))){var a=this.consumeName();return{type:7,value:a}}break;case wt:return In;case st:if(hn(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case Tt:return Ln;case Et:if(this.peekCodePoint(0)===dt)return this.consumeCodePoint(),Cn;break;case Dt:return Dn;case kt:return On;case W:case tn:var d=this.peekCodePoint(0),f=this.peekCodePoint(1);return d===Ft&&(on(f)||f===Ot)&&(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case At:if(this.peekCodePoint(0)===dt)return this.consumeCodePoint(),Tn;if(this.peekCodePoint(0)===At)return this.consumeCodePoint(),wn;break;case jt:if(this.peekCodePoint(0)===dt)return this.consumeCodePoint(),En;break;case Kt:return zn}return dn(e)?(this.consumeWhiteSpace(),Rn):rn(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):fn(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:u(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return e===void 0?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();on(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var n=!1;t===Ot&&e.length<6;)e.push(t),t=this.consumeCodePoint(),n=!0;if(n){var r=parseInt(u.apply(void 0,e.map(function(e){return e===Ot?qt:e})),16),i=parseInt(u.apply(void 0,e.map(function(e){return e===Ot?en:e})),16);return{type:30,start:r,end:i}}var a=parseInt(u.apply(void 0,e),16);if(this.peekCodePoint(0)===yt&&on(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var o=[];on(t)&&o.length<6;)o.push(t),t=this.consumeCodePoint();var i=parseInt(u.apply(void 0,o),16);return{type:30,start:a,end:i}}return{type:30,start:a,end:a}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return e.toLowerCase()===`url`&&this.peekCodePoint(0)===gt?(this.consumeCodePoint(),this.consumeUrlToken()):this.peekCodePoint(0)===gt?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===Kt)return{type:22,value:``};var t=this.peekCodePoint(0);if(t===ht||t===ut){var n=this.consumeStringToken(this.consumeCodePoint());return n.type===0&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===Kt||this.peekCodePoint(0)===_t)?(this.consumeCodePoint(),{type:22,value:n.value}):(this.consumeBadUrlRemnants(),An)}for(;;){var r=this.consumeCodePoint();if(r===Kt||r===_t)return{type:22,value:u.apply(void 0,e)};if(dn(r))return this.consumeWhiteSpace(),this.peekCodePoint(0)===Kt||this.peekCodePoint(0)===_t?(this.consumeCodePoint(),{type:22,value:u.apply(void 0,e)}):(this.consumeBadUrlRemnants(),An);if(r===ut||r===ht||r===gt||mn(r))return this.consumeBadUrlRemnants(),An;if(r===st)if(hn(r,this.peekCodePoint(0)))e.push(this.consumeEscapedCodePoint());else return this.consumeBadUrlRemnants(),An;else e.push(r)}},e.prototype.consumeWhiteSpace=function(){for(;dn(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(e===_t||e===Kt)return;hn(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t=5e4,n=``;e>0;){var r=Math.min(t,e);n+=u.apply(void 0,this._value.splice(0,r)),e-=r}return this._value.shift(),n},e.prototype.consumeStringToken=function(e){var t=``,n=0;do{var r=this._value[n];if(r===Kt||r===void 0||r===e)return t+=this.consumeStringSlice(n),{type:0,value:t};if(r===at)return this._value.splice(0,n),jn;if(r===st){var i=this._value[n+1];i!==Kt&&i!==void 0&&(i===at?(t+=this.consumeStringSlice(n),n=-1,this._value.shift()):hn(r,i)&&(t+=this.consumeStringSlice(n),t+=u(this.consumeEscapedCodePoint()),n=-1))}n++}while(!0)},e.prototype.consumeNumber=function(){var e=[],t=rt,n=this.peekCodePoint(0);for((n===Ft||n===yt)&&e.push(this.consumeCodePoint());rn(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0);var r=this.peekCodePoint(1);if(n===zt&&rn(r))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=it;rn(this.peekCodePoint(0));)e.push(this.consumeCodePoint());n=this.peekCodePoint(0),r=this.peekCodePoint(1);var i=this.peekCodePoint(2);if((n===$t||n===Yt)&&((r===Ft||r===yt)&&rn(i)||rn(r)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=it;rn(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[vn(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],n=e[1],r=this.peekCodePoint(0);return gn(r,this.peekCodePoint(1),this.peekCodePoint(2))?{type:15,number:t,flags:n,unit:this.consumeName()}:r===mt?(this.consumeCodePoint(),{type:16,number:t,flags:n}):{type:17,number:t,flags:n}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(on(e)){for(var t=u(e);on(this.peekCodePoint(0))&&t.length<6;)t+=u(this.consumeCodePoint());dn(this.peekCodePoint(0))&&this.consumeCodePoint();var n=parseInt(t,16);return n===0||an(n)||n>1114111?Nt:n}return e===Kt?Nt:e},e.prototype.consumeName=function(){for(var e=``;;){var t=this.consumeCodePoint();if(pn(t))e+=u(t);else if(hn(t,this.peekCodePoint(0)))e+=u(this.consumeEscapedCodePoint());else return this.reconsumeCodePoint(t),e}},e}(),Vn=function(){function e(e){this._tokens=e}return e.create=function(t){var n=new Bn;return n.write(t),new e(n.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();e.type===31;)e=this.consumeToken();if(e.type===32)throw SyntaxError(`Error parsing CSS component value, unexpected EOF`);this.reconsumeToken(e);var t=this.consumeComponentValue();do e=this.consumeToken();while(e.type===31);if(e.type===32)return t;throw SyntaxError(`Error parsing CSS component value, multiple values found when expecting only one`)},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(t.type===32)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},n=this.consumeToken();;){if(n.type===32||Xn(n,e))return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue()),n=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var n=this.consumeToken();if(n.type===32||n.type===3)return t;this.reconsumeToken(n),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return e===void 0?zn:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),Hn=function(e){return e.type===15},Un=function(e){return e.type===17},Wn=function(e){return e.type===20},Gn=function(e){return e.type===0},Kn=function(e,t){return Wn(e)&&e.value===t},qn=function(e){return e.type!==31},Jn=function(e){return e.type!==31&&e.type!==4},Yn=function(e){var t=[],n=[];return e.forEach(function(e){if(e.type===4){if(n.length===0)throw Error(`Error parsing function args, zero tokens for arg`);t.push(n),n=[];return}e.type!==31&&n.push(e)}),n.length&&t.push(n),t},Xn=function(e,t){return t===11&&e.type===12||t===28&&e.type===29||t===2&&e.type===3},Zn=function(e){return e.type===17||e.type===15},Qn=function(e){return e.type===16||Zn(e)},$n=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},er={type:17,number:0,flags:rt},tr={type:16,number:50,flags:rt},nr={type:16,number:100,flags:rt},rr=function(e,t,n){var r=e[0],i=e[1];return[ir(r,t),ir(i===void 0?r:i,n)]},ir=function(e,t){if(e.type===16)return e.number/100*t;if(Hn(e))switch(e.unit){case`rem`:case`em`:return 16*e.number;default:return e.number}return e.number},ar=`deg`,or=`grad`,sr=`rad`,cr=`turn`,lr={name:`angle`,parse:function(e,t){if(t.type===15)switch(t.unit){case ar:return Math.PI*t.number/180;case or:return Math.PI/200*t.number;case sr:return t.number;case cr:return Math.PI*2*t.number}throw Error(`Unsupported angle type`)}},ur=function(e){return!(e.type!==15||e.unit!==ar&&e.unit!==or&&e.unit!==sr&&e.unit!==cr)},dr=function(e){switch(e.filter(Wn).map(function(e){return e.value}).join(` `)){case`to bottom right`:case`to right bottom`:case`left top`:case`top left`:return[er,er];case`to top`:case`bottom`:return fr(0);case`to bottom left`:case`to left bottom`:case`right top`:case`top right`:return[er,nr];case`to right`:case`left`:return fr(90);case`to top left`:case`to left top`:case`right bottom`:case`bottom right`:return[nr,nr];case`to bottom`:case`top`:return fr(180);case`to top right`:case`to right top`:case`left bottom`:case`bottom left`:return[nr,er];case`to left`:case`right`:return fr(270)}return 0},fr=function(e){return Math.PI*e/180},pr={name:`color`,parse:function(e,t){if(t.type===18){var n=xr[t.name];if(n===void 0)throw Error(`Attempting to parse an unsupported color function "`+t.name+`"`);return n(e,t.values)}if(t.type===5){if(t.value.length===3){var r=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3);return gr(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),1)}if(t.value.length===4){var r=t.value.substring(0,1),i=t.value.substring(1,2),a=t.value.substring(2,3),o=t.value.substring(3,4);return gr(parseInt(r+r,16),parseInt(i+i,16),parseInt(a+a,16),parseInt(o+o,16)/255)}if(t.value.length===6){var r=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6);return gr(parseInt(r,16),parseInt(i,16),parseInt(a,16),1)}if(t.value.length===8){var r=t.value.substring(0,2),i=t.value.substring(2,4),a=t.value.substring(4,6),o=t.value.substring(6,8);return gr(parseInt(r,16),parseInt(i,16),parseInt(a,16),parseInt(o,16)/255)}}if(t.type===20){var s=Cr[t.value.toUpperCase()];if(s!==void 0)return s}return Cr.TRANSPARENT}},mr=function(e){return!(255&e)},hr=function(e){var t=255&e,n=255&e>>8,r=255&e>>16,i=255&e>>24;return t<255?`rgba(`+i+`,`+r+`,`+n+`,`+t/255+`)`:`rgb(`+i+`,`+r+`,`+n+`)`},gr=function(e,t,n,r){return(e<<24|t<<16|n<<8|Math.round(r*255)<<0)>>>0},_r=function(e,t){if(e.type===17)return e.number;if(e.type===16){var n=t===3?1:255;return t===3?e.number/100*n:Math.round(e.number/100*n)}return 0},vr=function(e,t){var n=t.filter(Jn);if(n.length===3){var r=n.map(_r),i=r[0],a=r[1],o=r[2];return gr(i,a,o,1)}if(n.length===4){var s=n.map(_r),i=s[0],a=s[1],o=s[2],c=s[3];return gr(i,a,o,c)}return 0};function yr(e,t,n){return n<0&&(n+=1),n>=1&&--n,n<1/6?(t-e)*n*6+e:n<1/2?t:n<2/3?(t-e)*6*(2/3-n)+e:e}var br=function(e,t){var n=t.filter(Jn),r=n[0],i=n[1],a=n[2],o=n[3],s=(r.type===17?fr(r.number):lr.parse(e,r))/(Math.PI*2),c=Qn(i)?i.number/100:0,l=Qn(a)?a.number/100:0,u=o!==void 0&&Qn(o)?ir(o,1):1;if(c===0)return gr(l*255,l*255,l*255,1);var d=l<=.5?l*(c+1):l+c-l*c,f=l*2-d,p=yr(f,d,s+1/3),m=yr(f,d,s),h=yr(f,d,s-1/3);return gr(p*255,m*255,h*255,u)},xr={hsl:br,hsla:br,rgb:vr,rgba:vr},Sr=function(e,t){return pr.parse(e,Vn.create(t).parseComponentValue())},Cr={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},wr={name:`background-clip`,initialValue:`border-box`,prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(Wn(e))switch(e.value){case`padding-box`:return 1;case`content-box`:return 2}return 0})}},Tr={name:`background-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},Er=function(e,t){var n=pr.parse(e,t[0]),r=t[1];return r&&Qn(r)?{color:n,stop:r}:{color:n,stop:null}},Dr=function(e,t){var n=e[0],r=e[e.length-1];n.stop===null&&(n.stop=er),r.stop===null&&(r.stop=nr);for(var i=[],a=0,o=0;o<e.length;o++){var s=e[o].stop;if(s!==null){var c=ir(s,t);c>a?i.push(c):i.push(a),a=c}else i.push(null)}for(var l=null,o=0;o<i.length;o++){var u=i[o];if(u===null)l===null&&(l=o);else if(l!==null){for(var d=o-l,f=(u-i[l-1])/(d+1),p=1;p<=d;p++)i[l+p-1]=f*p;l=null}}return e.map(function(e,n){return{color:e.color,stop:Math.max(Math.min(1,i[n]/t),0)}})},Or=function(e,t,n){var r=t/2,i=n/2,a=ir(e[0],t)-r,o=i-ir(e[1],n);return(Math.atan2(o,a)+Math.PI*2)%(Math.PI*2)},kr=function(e,t,n){var r=typeof e==`number`?e:Or(e,t,n),i=Math.abs(t*Math.sin(r))+Math.abs(n*Math.cos(r)),a=t/2,o=n/2,s=i/2,c=Math.sin(r-Math.PI/2)*s,l=Math.cos(r-Math.PI/2)*s;return[i,a-l,a+l,o-c,o+c]},Ar=function(e,t){return Math.sqrt(e*e+t*t)},jr=function(e,t,n,r,i){return[[0,0],[0,t],[e,0],[e,t]].reduce(function(e,t){var a=t[0],o=t[1],s=Ar(n-a,r-o);return(i?s<e.optimumDistance:s>e.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e},{optimumDistance:i?1/0:-1/0,optimumCorner:null}).optimumCorner},Mr=function(e,t,n,r,i){var a=0,o=0;switch(e.size){case 0:e.shape===0?a=o=Math.min(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(a=Math.min(Math.abs(t),Math.abs(t-r)),o=Math.min(Math.abs(n),Math.abs(n-i)));break;case 2:if(e.shape===0)a=o=Math.min(Ar(t,n),Ar(t,n-i),Ar(t-r,n),Ar(t-r,n-i));else if(e.shape===1){var s=Math.min(Math.abs(n),Math.abs(n-i))/Math.min(Math.abs(t),Math.abs(t-r)),c=jr(r,i,t,n,!0),l=c[0],u=c[1];a=Ar(l-t,(u-n)/s),o=s*a}break;case 1:e.shape===0?a=o=Math.max(Math.abs(t),Math.abs(t-r),Math.abs(n),Math.abs(n-i)):e.shape===1&&(a=Math.max(Math.abs(t),Math.abs(t-r)),o=Math.max(Math.abs(n),Math.abs(n-i)));break;case 3:if(e.shape===0)a=o=Math.max(Ar(t,n),Ar(t,n-i),Ar(t-r,n),Ar(t-r,n-i));else if(e.shape===1){var s=Math.max(Math.abs(n),Math.abs(n-i))/Math.max(Math.abs(t),Math.abs(t-r)),d=jr(r,i,t,n,!1),l=d[0],u=d[1];a=Ar(l-t,(u-n)/s),o=s*a}}return Array.isArray(e.size)&&(a=ir(e.size[0],r),o=e.size.length===2?ir(e.size[1],i):a),[a,o]},Nr=function(e,t){var n=fr(180),r=[];return Yn(t).forEach(function(t,i){if(i===0){var a=t[0];if(a.type===20&&a.value===`to`){n=dr(t);return}if(ur(a)){n=lr.parse(e,a);return}}var o=Er(e,t);r.push(o)}),{angle:n,stops:r,type:1}},Pr=function(e,t){var n=fr(180),r=[];return Yn(t).forEach(function(t,i){if(i===0){var a=t[0];if(a.type===20&&[`top`,`left`,`right`,`bottom`].indexOf(a.value)!==-1){n=dr(t);return}if(ur(a)){n=(lr.parse(e,a)+fr(270))%fr(360);return}}var o=Er(e,t);r.push(o)}),{angle:n,stops:r,type:1}},Fr=function(e,t){var n=fr(180),r=[],i=1;return Yn(t).forEach(function(t,n){var a=t[0];if(n===0){if(Wn(a)&&a.value===`linear`){i=1;return}if(Wn(a)&&a.value===`radial`){i=2;return}}if(a.type===18){if(a.name===`from`){var o=pr.parse(e,a.values[0]);r.push({stop:er,color:o})}else if(a.name===`to`){var o=pr.parse(e,a.values[0]);r.push({stop:nr,color:o})}else if(a.name===`color-stop`){var s=a.values.filter(Jn);if(s.length===2){var o=pr.parse(e,s[1]),c=s[0];Un(c)&&r.push({stop:{type:16,number:c.number*100,flags:c.flags},color:o})}}}}),i===1?{angle:(n+fr(180))%fr(360),stops:r,type:i}:{size:3,shape:0,stops:r,position:[],type:i}},Ir=`closest-side`,Lr=`farthest-side`,Rr=`closest-corner`,zr=`farthest-corner`,Br=`circle`,Vr=`ellipse`,Hr=`cover`,Ur=`contain`,Wr=function(e,t){var n=0,r=3,i=[],a=[];return Yn(t).forEach(function(t,o){var s=!0;if(o===0){var c=!1;s=t.reduce(function(e,t){if(c)if(Wn(t))switch(t.value){case`center`:return a.push(tr),e;case`top`:case`left`:return a.push(er),e;case`right`:case`bottom`:return a.push(nr),e}else(Qn(t)||Zn(t))&&a.push(t);else if(Wn(t))switch(t.value){case Br:return n=0,!1;case Vr:return n=1,!1;case`at`:return c=!0,!1;case Ir:return r=0,!1;case Hr:case Lr:return r=1,!1;case Ur:case Rr:return r=2,!1;case zr:return r=3,!1}else if(Zn(t)||Qn(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},s)}if(s){var l=Er(e,t);i.push(l)}}),{size:r,shape:n,stops:i,position:a,type:2}},Gr=function(e,t){var n=0,r=3,i=[],a=[];return Yn(t).forEach(function(t,o){var s=!0;if(o===0?s=t.reduce(function(e,t){if(Wn(t))switch(t.value){case`center`:return a.push(tr),!1;case`top`:case`left`:return a.push(er),!1;case`right`:case`bottom`:return a.push(nr),!1}else if(Qn(t)||Zn(t))return a.push(t),!1;return e},s):o===1&&(s=t.reduce(function(e,t){if(Wn(t))switch(t.value){case Br:return n=0,!1;case Vr:return n=1,!1;case Ur:case Ir:return r=0,!1;case Lr:return r=1,!1;case Rr:return r=2,!1;case Hr:case zr:return r=3,!1}else if(Zn(t)||Qn(t))return Array.isArray(r)||(r=[]),r.push(t),!1;return e},s)),s){var c=Er(e,t);i.push(c)}}),{size:r,shape:n,stops:i,position:a,type:2}},Kr=function(e){return e.type===1},qr=function(e){return e.type===2},Jr={name:`image`,parse:function(e,t){if(t.type===22){var n={url:t.value,type:0};return e.cache.addImage(t.value),n}if(t.type===18){var r=Xr[t.name];if(r===void 0)throw Error(`Attempting to parse an unsupported image function "`+t.name+`"`);return r(e,t.values)}throw Error(`Unsupported image type `+t.type)}};function Yr(e){return(e.type!==20||e.value!==`none`)&&(e.type!==18||!!Xr[e.name])}var Xr={"linear-gradient":Nr,"-moz-linear-gradient":Pr,"-ms-linear-gradient":Pr,"-o-linear-gradient":Pr,"-webkit-linear-gradient":Pr,"radial-gradient":Wr,"-moz-radial-gradient":Gr,"-ms-radial-gradient":Gr,"-o-radial-gradient":Gr,"-webkit-radial-gradient":Gr,"-webkit-gradient":Fr},Zr={name:`background-image`,initialValue:`none`,type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var n=t[0];return n.type===20&&n.value===`none`?[]:t.filter(function(e){return Jn(e)&&Yr(e)}).map(function(t){return Jr.parse(e,t)})}},Qr={name:`background-origin`,initialValue:`border-box`,prefix:!1,type:1,parse:function(e,t){return t.map(function(e){if(Wn(e))switch(e.value){case`padding-box`:return 1;case`content-box`:return 2}return 0})}},$r={name:`background-position`,initialValue:`0% 0%`,type:1,prefix:!1,parse:function(e,t){return Yn(t).map(function(e){return e.filter(Qn)}).map($n)}},ei={name:`background-repeat`,initialValue:`repeat`,prefix:!1,type:1,parse:function(e,t){return Yn(t).map(function(e){return e.filter(Wn).map(function(e){return e.value}).join(` `)}).map(ti)}},ti=function(e){switch(e){case`no-repeat`:return 1;case`repeat-x`:case`repeat no-repeat`:return 2;case`repeat-y`:case`no-repeat repeat`:return 3;default:return 0}},ni;(function(e){e.AUTO=`auto`,e.CONTAIN=`contain`,e.COVER=`cover`})(ni||={});var ri={name:`background-size`,initialValue:`0`,prefix:!1,type:1,parse:function(e,t){return Yn(t).map(function(e){return e.filter(ii)})}},ii=function(e){return Wn(e)||Qn(e)},ai=function(e){return{name:`border-`+e+`-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`}},oi=ai(`top`),si=ai(`right`),ci=ai(`bottom`),li=ai(`left`),G=function(e){return{name:`border-radius-`+e,initialValue:`0 0`,prefix:!1,type:1,parse:function(e,t){return $n(t.filter(Qn))}}},ui=G(`top-left`),di=G(`top-right`),fi=G(`bottom-right`),pi=G(`bottom-left`),mi=function(e){return{name:`border-`+e+`-style`,initialValue:`solid`,prefix:!1,type:2,parse:function(e,t){switch(t){case`none`:return 0;case`dashed`:return 2;case`dotted`:return 3;case`double`:return 4}return 1}}},hi=mi(`top`),gi=mi(`right`),_i=mi(`bottom`),vi=mi(`left`),yi=function(e){return{name:`border-`+e+`-width`,initialValue:`0`,type:0,prefix:!1,parse:function(e,t){return Hn(t)?t.number:0}}},bi=yi(`top`),xi=yi(`right`),Si=yi(`bottom`),Ci=yi(`left`),wi={name:`color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},Ti={name:`direction`,initialValue:`ltr`,prefix:!1,type:2,parse:function(e,t){switch(t){case`rtl`:return 1;default:return 0}}},Ei={name:`display`,initialValue:`inline-block`,prefix:!1,type:1,parse:function(e,t){return t.filter(Wn).reduce(function(e,t){return e|Di(t.value)},0)}},Di=function(e){switch(e){case`block`:case`-webkit-box`:return 2;case`inline`:return 4;case`run-in`:return 8;case`flow`:return 16;case`flow-root`:return 32;case`table`:return 64;case`flex`:case`-webkit-flex`:return 128;case`grid`:case`-ms-grid`:return 256;case`ruby`:return 512;case`subgrid`:return 1024;case`list-item`:return 2048;case`table-row-group`:return 4096;case`table-header-group`:return 8192;case`table-footer-group`:return 16384;case`table-row`:return 32768;case`table-cell`:return 65536;case`table-column-group`:return 131072;case`table-column`:return 262144;case`table-caption`:return 524288;case`ruby-base`:return 1048576;case`ruby-text`:return 2097152;case`ruby-base-container`:return 4194304;case`ruby-text-container`:return 8388608;case`contents`:return 16777216;case`inline-block`:return 33554432;case`inline-list-item`:return 67108864;
201case`inline-table`:return 134217728;case`inline-flex`:return 268435456;case`inline-grid`:return 536870912}return 0},Oi={name:`float`,initialValue:`none`,prefix:!1,type:2,parse:function(e,t){switch(t){case`left`:return 1;case`right`:return 2;case`inline-start`:return 3;case`inline-end`:return 4}return 0}},ki={name:`letter-spacing`,initialValue:`0`,prefix:!1,type:0,parse:function(e,t){return t.type===20&&t.value===`normal`?0:t.type===17||t.type===15?t.number:0}},Ai;(function(e){e.NORMAL=`normal`,e.STRICT=`strict`})(Ai||={});var ji={name:`line-break`,initialValue:`normal`,prefix:!1,type:2,parse:function(e,t){switch(t){case`strict`:return Ai.STRICT;default:return Ai.NORMAL}}},Mi={name:`line-height`,initialValue:`normal`,prefix:!1,type:4},Ni=function(e,t){return Wn(e)&&e.value===`normal`?1.2*t:e.type===17?t*e.number:Qn(e)?ir(e,t):t},Pi={name:`list-style-image`,initialValue:`none`,type:0,prefix:!1,parse:function(e,t){return t.type===20&&t.value===`none`?null:Jr.parse(e,t)}},Fi={name:`list-style-position`,initialValue:`outside`,prefix:!1,type:2,parse:function(e,t){switch(t){case`inside`:return 0;default:return 1}}},K={name:`list-style-type`,initialValue:`none`,prefix:!1,type:2,parse:function(e,t){switch(t){case`disc`:return 0;case`circle`:return 1;case`square`:return 2;case`decimal`:return 3;case`cjk-decimal`:return 4;case`decimal-leading-zero`:return 5;case`lower-roman`:return 6;case`upper-roman`:return 7;case`lower-greek`:return 8;case`lower-alpha`:return 9;case`upper-alpha`:return 10;case`arabic-indic`:return 11;case`armenian`:return 12;case`bengali`:return 13;case`cambodian`:return 14;case`cjk-earthly-branch`:return 15;case`cjk-heavenly-stem`:return 16;case`cjk-ideographic`:return 17;case`devanagari`:return 18;case`ethiopic-numeric`:return 19;case`georgian`:return 20;case`gujarati`:return 21;case`gurmukhi`:return 22;case`hebrew`:return 22;case`hiragana`:return 23;case`hiragana-iroha`:return 24;case`japanese-formal`:return 25;case`japanese-informal`:return 26;case`kannada`:return 27;case`katakana`:return 28;case`katakana-iroha`:return 29;case`khmer`:return 30;case`korean-hangul-formal`:return 31;case`korean-hanja-formal`:return 32;case`korean-hanja-informal`:return 33;case`lao`:return 34;case`lower-armenian`:return 35;case`malayalam`:return 36;case`mongolian`:return 37;case`myanmar`:return 38;case`oriya`:return 39;case`persian`:return 40;case`simp-chinese-formal`:return 41;case`simp-chinese-informal`:return 42;case`tamil`:return 43;case`telugu`:return 44;case`thai`:return 45;case`tibetan`:return 46;case`trad-chinese-formal`:return 47;case`trad-chinese-informal`:return 48;case`upper-armenian`:return 49;case`disclosure-open`:return 50;case`disclosure-closed`:return 51;default:return-1}}},Ii=function(e){return{name:`margin-`+e,initialValue:`0`,prefix:!1,type:4}},Li=Ii(`top`),Ri=Ii(`right`),zi=Ii(`bottom`),Bi=Ii(`left`),Vi={name:`overflow`,initialValue:`visible`,prefix:!1,type:1,parse:function(e,t){return t.filter(Wn).map(function(e){switch(e.value){case`hidden`:return 1;case`scroll`:return 2;case`clip`:return 3;case`auto`:return 4;default:return 0}})}},Hi={name:`overflow-wrap`,initialValue:`normal`,prefix:!1,type:2,parse:function(e,t){switch(t){case`break-word`:return`break-word`;default:return`normal`}}},Ui=function(e){return{name:`padding-`+e,initialValue:`0`,prefix:!1,type:3,format:`length-percentage`}},Wi=Ui(`top`),Gi=Ui(`right`),Ki=Ui(`bottom`),qi=Ui(`left`),Ji={name:`text-align`,initialValue:`left`,prefix:!1,type:2,parse:function(e,t){switch(t){case`right`:return 2;case`center`:case`justify`:return 1;default:return 0}}},Yi={name:`position`,initialValue:`static`,prefix:!1,type:2,parse:function(e,t){switch(t){case`relative`:return 1;case`absolute`:return 2;case`fixed`:return 3;case`sticky`:return 4}return 0}},Xi={name:`text-shadow`,initialValue:`none`,type:1,prefix:!1,parse:function(e,t){return t.length===1&&Kn(t[0],`none`)?[]:Yn(t).map(function(t){for(var n={color:Cr.TRANSPARENT,offsetX:er,offsetY:er,blur:er},r=0,i=0;i<t.length;i++){var a=t[i];Zn(a)?(r===0?n.offsetX=a:r===1?n.offsetY=a:n.blur=a,r++):n.color=pr.parse(e,a)}return n})}},Zi={name:`text-transform`,initialValue:`none`,prefix:!1,type:2,parse:function(e,t){switch(t){case`uppercase`:return 2;case`lowercase`:return 1;case`capitalize`:return 3}return 0}},Qi={name:`transform`,initialValue:`none`,prefix:!0,type:0,parse:function(e,t){if(t.type===20&&t.value===`none`)return null;
201if(t.type===18){var n=$i[t.name];if(n===void 0)throw Error(`Attempting to parse an unsupported transform function "`+t.name+`"`);return n(t.values)}return null}},$i={matrix:function(e){var t=e.filter(function(e){return e.type===17}).map(function(e){return e.number});return t.length===6?t:null},matrix3d:function(e){var t=e.filter(function(e){return e.type===17}).map(function(e){return e.number}),n=t[0],r=t[1];t[2],t[3];var i=t[4],a=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var o=t[12],s=t[13];return t[14],t[15],t.length===16?[n,r,i,a,o,s]:null}},ea={type:16,number:50,flags:rt},ta=[ea,ea],na={name:`transform-origin`,initialValue:`50% 50%`,prefix:!0,type:1,parse:function(e,t){var n=t.filter(Qn);return n.length===2?[n[0],n[1]]:ta}},ra={name:`visible`,initialValue:`none`,prefix:!1,type:2,parse:function(e,t){switch(t){case`hidden`:return 1;case`collapse`:return 2;default:return 0}}},ia;(function(e){e.NORMAL=`normal`,e.BREAK_ALL=`break-all`,e.KEEP_ALL=`keep-all`})(ia||={});for(var aa={name:`word-break`,initialValue:`normal`,prefix:!1,type:2,parse:function(e,t){switch(t){case`break-all`:return ia.BREAK_ALL;case`keep-all`:return ia.KEEP_ALL;default:return ia.NORMAL}}},oa={name:`z-index`,initialValue:`auto`,prefix:!1,type:0,parse:function(e,t){if(t.type===20)return{auto:!0,order:0};if(Un(t))return{auto:!1,order:t.number};throw Error(`Invalid z-index number parsed`)}},sa={name:`time`,parse:function(e,t){if(t.type===15)switch(t.unit.toLowerCase()){case`s`:return 1e3*t.number;case`ms`:return t.number}throw Error(`Unsupported time type`)}},ca={name:`opacity`,initialValue:`1`,type:0,prefix:!1,parse:function(e,t){return Un(t)?t.number:1}},la={name:`text-decoration-color`,initialValue:`transparent`,prefix:!1,type:3,format:`color`},ua={name:`text-decoration-line`,initialValue:`none`,prefix:!1,type:1,parse:function(e,t){return t.filter(Wn).map(function(e){switch(e.value){case`underline`:return 1;case`overline`:return 2;case`line-through`:return 3;case`none`:return 4}return 0}).filter(function(e){return e!==0})}},da={name:`font-family`,initialValue:``,prefix:!1,type:1,parse:function(e,t){var n=[],r=[];return t.forEach(function(e){switch(e.type){case 20:case 0:n.push(e.value);break;case 17:n.push(e.number.toString());break;case 4:r.push(n.join(` `)),n.length=0}}),n.length&&r.push(n.join(` `)),r.map(function(e){return e.indexOf(` `)===-1?e:`'`+e+`'`})}},fa={name:`font-size`,initialValue:`0`,prefix:!1,type:3,format:`length`},pa={name:`font-weight`,initialValue:`normal`,type:0,prefix:!1,parse:function(e,t){if(Un(t))return t.number;if(Wn(t))switch(t.value){case`bold`:return 700;default:return 400}return 400}},ma={name:`font-variant`,initialValue:`none`,type:1,prefix:!1,parse:function(e,t){return t.filter(Wn).map(function(e){return e.value})}},ha={name:`font-style`,initialValue:`normal`,prefix:!1,type:2,parse:function(e,t){switch(t){case`oblique`:return`oblique`;case`italic`:return`italic`;default:return`normal`}}},ga=function(e,t){return(e&t)!==0},_a={name:`content`,initialValue:`none`,type:1,prefix:!1,parse:function(e,t){if(t.length===0)return[];var n=t[0];return n.type===20&&n.value===`none`?[]:t}},va={name:`counter-increment`,initialValue:`none`,prefix:!0,type:1,parse:function(e,t){if(t.length===0)return null;var n=t[0];if(n.type===20&&n.value===`none`)return null;for(var r=[],i=t.filter(qn),a=0;a<i.length;a++){var o=i[a],s=i[a+1];if(o.type===20){var c=s&&Un(s)?s.number:1;r.push({counter:o.value,increment:c})}}return r}},ya={name:`counter-reset`,initialValue:`none`,prefix:!0,type:1,parse:function(e,t){if(t.length===0)return[];for(var n=[],r=t.filter(qn),i=0;i<r.length;i++){var a=r[i],o=r[i+1];if(Wn(a)&&a.value!==`none`){var s=o&&Un(o)?o.number:0;n.push({counter:a.value,reset:s})}}return n}},ba={name:`duration`,initialValue:`0s`,prefix:!1,type:1,parse:function(e,t){return t.filter(Hn).map(function(t){return sa.parse(e,t)})}},xa={name:`quotes`,initialValue:`none`,prefix:!0,type:1,parse:function(e,t){if(t.length===0)return null;var n=t[0];if(n.type===20&&n.value===`none`)return null;var r=[],i=t.filter(Gn);if(i.length%2!=0)return null;for(var a=0;a<i.length;a+=2){var o=i[a].value,s=i[a+1].value;r.push({open:o,close:s})}return r}},Sa=function(e,t,n){if(!e)return``;var r=e[Math.min(t,e.length-1)];return r?n?r.open:r.close:``},Ca={name:`box-shadow`,initialValue:`none`,type:1,prefix:!1,parse:function(e,t){return t.length===1&&Kn(t[0],`none`)?[]:Yn(t).map(function(t){for(var n={color:255,offsetX:er,offsetY:er,blur:er,spread:er,inset:!1},r=0,i=0;i<t.length;i++){var a=t[i];Kn(a,`inset`)?n.inset=!0:Zn(a)?(r===0?n.offsetX=a:r===1?n.offsetY=a:r===2?n.blur=a:n.spread=a,r++):n.color=pr.parse(e,a)}return n})}},wa={name:`paint-order`,initialValue:`normal`,prefix:!1,type:1,parse:function(e,t){var n=[0,1,2],r=[];
201return t.filter(Wn).forEach(function(e){switch(e.value){case`stroke`:r.push(1);break;case`fill`:r.push(0);break;case`markers`:r.push(2)}}),n.forEach(function(e){r.indexOf(e)===-1&&r.push(e)}),r}},Ta={name:`-webkit-text-stroke-color`,initialValue:`currentcolor`,prefix:!1,type:3,format:`color`},Ea={name:`-webkit-text-stroke-width`,initialValue:`0`,type:0,prefix:!1,parse:function(e,t){return Hn(t)?t.number:0}},Da=function(){function e(e,t){this.animationDuration=Aa(e,ba,t.animationDuration),this.backgroundClip=Aa(e,wr,t.backgroundClip),this.backgroundColor=Aa(e,Tr,t.backgroundColor),this.backgroundImage=Aa(e,Zr,t.backgroundImage),this.backgroundOrigin=Aa(e,Qr,t.backgroundOrigin),this.backgroundPosition=Aa(e,$r,t.backgroundPosition),this.backgroundRepeat=Aa(e,ei,t.backgroundRepeat),this.backgroundSize=Aa(e,ri,t.backgroundSize),this.borderTopColor=Aa(e,oi,t.borderTopColor),this.borderRightColor=Aa(e,si,t.borderRightColor),this.borderBottomColor=Aa(e,ci,t.borderBottomColor),this.borderLeftColor=Aa(e,li,t.borderLeftColor),this.borderTopLeftRadius=Aa(e,ui,t.borderTopLeftRadius),this.borderTopRightRadius=Aa(e,di,t.borderTopRightRadius),this.borderBottomRightRadius=Aa(e,fi,t.borderBottomRightRadius),this.borderBottomLeftRadius=Aa(e,pi,t.borderBottomLeftRadius),this.borderTopStyle=Aa(e,hi,t.borderTopStyle),this.borderRightStyle=Aa(e,gi,t.borderRightStyle),this.borderBottomStyle=Aa(e,_i,t.borderBottomStyle),this.borderLeftStyle=Aa(e,vi,t.borderLeftStyle),this.borderTopWidth=Aa(e,bi,t.borderTopWidth),this.borderRightWidth=Aa(e,xi,t.borderRightWidth),this.borderBottomWidth=Aa(e,Si,t.borderBottomWidth),this.borderLeftWidth=Aa(e,Ci,t.borderLeftWidth),this.boxShadow=Aa(e,Ca,t.boxShadow),this.color=Aa(e,wi,t.color),this.direction=Aa(e,Ti,t.direction),this.display=Aa(e,Ei,t.display),this.float=Aa(e,Oi,t.cssFloat),this.fontFamily=Aa(e,da,t.fontFamily),this.fontSize=Aa(e,fa,t.fontSize),this.fontStyle=Aa(e,ha,t.fontStyle),this.fontVariant=Aa(e,ma,t.fontVariant),this.fontWeight=Aa(e,pa,t.fontWeight),this.letterSpacing=Aa(e,ki,t.letterSpacing),this.lineBreak=Aa(e,ji,t.lineBreak),this.lineHeight=Aa(e,Mi,t.lineHeight),this.listStyleImage=Aa(e,Pi,t.listStyleImage),this.listStylePosition=Aa(e,Fi,t.listStylePosition),this.listStyleType=Aa(e,K,t.listStyleType),this.marginTop=Aa(e,Li,t.marginTop),this.marginRight=Aa(e,Ri,t.marginRight),this.marginBottom=Aa(e,zi,t.marginBottom),this.marginLeft=Aa(e,Bi,t.marginLeft),this.opacity=Aa(e,ca,t.opacity);var n=Aa(e,Vi,t.overflow);this.overflowX=n[0],this.overflowY=n[+(n.length>1)],this.overflowWrap=Aa(e,Hi,t.overflowWrap),this.paddingTop=Aa(e,Wi,t.paddingTop),this.paddingRight=Aa(e,Gi,t.paddingRight),this.paddingBottom=Aa(e,Ki,t.paddingBottom),this.paddingLeft=Aa(e,qi,t.paddingLeft),this.paintOrder=Aa(e,wa,t.paintOrder),this.position=Aa(e,Yi,t.position),this.textAlign=Aa(e,Ji,t.textAlign),this.textDecorationColor=Aa(e,la,t.textDecorationColor??t.color),this.textDecorationLine=Aa(e,ua,t.textDecorationLine??t.textDecoration),this.textShadow=Aa(e,Xi,t.textShadow),this.textTransform=Aa(e,Zi,t.textTransform),this.transform=Aa(e,Qi,t.transform),this.transformOrigin=Aa(e,na,t.transformOrigin),this.visibility=Aa(e,ra,t.visibility),this.webkitTextStrokeColor=Aa(e,Ta,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=Aa(e,Ea,t.webkitTextStrokeWidth),this.wordBreak=Aa(e,aa,t.wordBreak),this.zIndex=Aa(e,oa,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&this.visibility===0},e.prototype.isTransparent=function(){return mr(this.backgroundColor)},e.prototype.isTransformed=function(){return this.transform!==null},e.prototype.isPositioned=function(){return this.position!==0},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return this.float!==0},e.prototype.isInlineLevel=function(){return ga(this.display,4)||ga(this.display,33554432)||ga(this.display,268435456)||ga(this.display,536870912)||ga(this.display,67108864)||ga(this.display,134217728)},e}(),Oa=function(){function e(e,t){this.content=Aa(e,_a,t.content),this.quotes=Aa(e,xa,t.quotes)}return e}(),ka=function(){function e(e,t){this.counterIncrement=Aa(e,va,t.counterIncrement),this.counterReset=Aa(e,ya,t.counterReset)}return e}(),Aa=function(e,t,n){var r=new Bn,i=n==null?t.initialValue:n.toString();r.write(i);var a=new Vn(r.read());switch(t.type){case 2:var o=a.parseComponentValue();return t.parse(e,Wn(o)?o.value:t.initialValue);case 0:return t.parse(e,a.parseComponentValue());case 1:return t.parse(e,a.parseComponentValues());case 4:return a.parseComponentValue();case 3:switch(t.format){case`angle`:return lr.parse(e,a.parseComponentValue());case`color`:return pr.parse(e,a.parseComponentValue());case`image`:return Jr.parse(e,a.parseComponentValue());case`length`:var s=a.parseComponentValue();return Zn(s)?s:er;case`length-percentage`:var c=a.parseComponentValue();return Qn(c)?c:er;case`time`:return sa.parse(e,a.parseComponentValue())}}},ja=`data-html2canvas-debug`,Ma=function(e){switch(e.getAttribute(ja)){case`all`:return 1;case`clone`:return 2;case`parse`:return 3;case`render`:return 4;default:return 0}},Na=function(e,t){var n=Ma(e);return n===1||t===n},Pa=function(){function e(e,t){if(this.context=e,this.textNodes=[],this.elements=[],this.flags=0,Na(t,3))debugger;this.styles=new Da(e,window.getComputedStyle(t,null)),Ss(t)&&(this.styles.animationDuration.some(function(e){return e>0})&&(t.style.animationDuration=`0s`),this.styles.transform!==null&&(t.style.transform=`none`)),this.bounds=s(this.context,t),Na(t,4)&&(this.flags|=16)}return e}(),Fa=`
vendor: 26,156 bytes, line 201
201AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA=
201`,Ia=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
vendor: 6,614 bytes, line 201
201+/`,La=typeof Uint8Array>`u`?[]:new Uint8Array(256),Ra=0;Ra<Ia.length;Ra++)La[Ia.charCodeAt(Ra)]=Ra;for(var za=function(e){var t=e.length*.75,n=e.length,r,i=0,a,o,s,c;e[e.length-1]===`=`&&(t--,e[e.length-2]===`=`&&t--);var l=typeof ArrayBuffer<`u`&&typeof Uint8Array<`u`&&Uint8Array.prototype.slice!==void 0?new ArrayBuffer(t):Array(t),u=Array.isArray(l)?l:new Uint8Array(l);for(r=0;r<n;r+=4)a=La[e.charCodeAt(r)],o=La[e.charCodeAt(r+1)],s=La[e.charCodeAt(r+2)],c=La[e.charCodeAt(r+3)],u[i++]=a<<2|o>>4,u[i++]=(o&15)<<4|s>>2,u[i++]=(s&3)<<6|c&63;return l},Ba=function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n.push(e[r+1]<<8|e[r]);return n},Va=function(e){for(var t=e.length,n=[],r=0;r<t;r+=4)n.push(e[r+3]<<24|e[r+2]<<16|e[r+1]<<8|e[r]);return n},Ha=5,Ua=11,Wa=2,Ga=Ua-Ha,Ka=65536>>Ha,qa=(1<<Ha)-1,Ja=Ka+(1024>>Ha)+32,Ya=65536>>Ua,Xa=(1<<Ga)-1,Za=function(e,t,n){return e.slice?e.slice(t,n):new Uint16Array(Array.prototype.slice.call(e,t,n))},Qa=function(e,t,n){return e.slice?e.slice(t,n):new Uint32Array(Array.prototype.slice.call(e,t,n))},$a=function(e,t){var n=za(e),r=Array.isArray(n)?Va(n):new Uint32Array(n),i=Array.isArray(n)?Ba(n):new Uint16Array(n),a=24,o=Za(i,a/2,r[4]/2),s=r[5]===2?Za(i,(a+r[4])/2):Qa(r,Math.ceil((a+r[4])/4));return new eo(r[0],r[1],r[2],r[3],o,s)},eo=function(){function e(e,t,n,r,i,a){this.initialValue=e,this.errorValue=t,this.highStart=n,this.highValueIndex=r,this.index=i,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=this.index[e>>Ha],t=(t<<Wa)+(e&qa),this.data[t];if(e<=65535)return t=this.index[Ka+(e-55296>>Ha)],t=(t<<Wa)+(e&qa),this.data[t];if(e<this.highStart)return t=Ja-Ya+(e>>Ua),t=this.index[t],t+=e>>Ha&Xa,t=this.index[t],t=(t<<Wa)+(e&qa),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),to=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,no=typeof Uint8Array>`u`?[]:new Uint8Array(256),ro=0;ro<to.length;ro++)no[to.charCodeAt(ro)]=ro;var io=1,ao=2,oo=3,so=4,co=5,lo=7,uo=8,fo=9,po=10,mo=11,ho=12,go=13,_o=14,vo=15,yo=function(e){for(var t=[],n=0,r=e.length;n<r;){var i=e.charCodeAt(n++);if(i>=55296&&i<=56319&&n<r){var a=e.charCodeAt(n++);(a&64512)==56320?t.push(((i&1023)<<10)+(a&1023)+65536):(t.push(i),n--)}else t.push(i)}return t},bo=function(){var e=[...arguments];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var t=e.length;if(!t)return``;for(var n=[],r=-1,i=``;++r<t;){var a=e[r];a<=65535?n.push(a):(a-=65536,n.push((a>>10)+55296,a%1024+56320)),(r+1===t||n.length>16384)&&(i+=String.fromCharCode.apply(String,n),n.length=0)}return i},xo=$a(Fa),So=`Ã`,Co=`÷`,wo=function(e){return xo.get(e)},To=function(e,t,n){var r=n-2,i=t[r],a=t[n-1],o=t[n];if(a===ao&&o===oo)return So;if(a===ao||a===oo||a===so||o===ao||o===oo||o===so)return Co;if(a===uo&&[uo,fo,mo,ho].indexOf(o)!==-1||(a===mo||a===fo)&&(o===fo||o===po)||(a===ho||a===po)&&o===po||o===go||o===co||o===lo||a===io)return So;if(a===go&&o===_o){for(;i===co;)i=t[--r];if(i===_o)return So}if(a===vo&&o===vo){for(var s=0;i===vo;)s++,i=t[--r];if(s%2==0)return So}return Co},Eo=function(e){var t=yo(e),n=t.length,r=0,i=0,a=t.map(wo);return{next:function(){if(r>=n)return{done:!0,value:null};for(var e=So;r<n&&(e=To(t,a,++r))===So;);if(e!==So||r===n){var o=bo.apply(null,t.slice(i,r));return i=r,{value:o,done:!1}}return{done:!0,value:null}}}},Do=function(e){for(var t=Eo(e),n=[],r;!(r=t.next()).done;)r.value&&n.push(r.value.slice());return n},Oo=function(e){var t=123;if(e.createRange){var n=e.createRange();if(n.getBoundingClientRect){var r=e.createElement(`boundtest`);r.style.height=t+`px`,r.style.display=`block`,e.body.appendChild(r),n.selectNode(r);var i=n.getBoundingClientRect(),a=Math.round(i.height);if(e.body.removeChild(r),a===t)return!0}}return!1},ko=function(e){var t=e.createElement(`boundtest`);t.style.width=`50px`,t.style.display=`block`,t.style.fontSize=`12px`,t.style.letterSpacing=`0px`,t.style.wordSpacing=`0px`,e.body.appendChild(t);var n=e.createRange();t.innerHTML=typeof``.repeat==`function`?`👨`.repeat(10):``;var r=t.firstChild,i=l(r.data).map(function(e){return u(e)}),a=0,o={},s=i.every(function(e,t){n.setStart(r,a),n.setEnd(r,a+e.length);var i=n.getBoundingClientRect();a+=e.length;var s=i.x>o.x||i.y>o.y;return o=i,t===0||s});return e.body.removeChild(t),s},Ao=function(){return new Image().crossOrigin!==void 0},jo=function(){return typeof new XMLHttpRequest().responseType==`string`},Mo=function(e){var t=new Image,n=e.createElement(`canvas`),r=n.getContext(`2d`);if(!r)return!1;t.src=`data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>`;try{r.drawImage(t,0,0),n.toDataURL()}catch{return!1}return!0},No=function(e){return e[0]===0&&e[1]===255&&e[2]===0&&e[3]===255},Po=function(e){var t=e.createElement(`canvas`),n=100;t.width=n,t.height=n;var r=t.getContext(`2d`);if(!r)return Promise.reject(!1);r.fillStyle=`rgb(0, 255, 0)`,r.fillRect(0,0,n,n);var i=new Image,a=t.toDataURL();i.src=a;var o=Fo(n,n,0,0,i);return r.fillStyle=`red`,r.fillRect(0,0,n,n),Io(o).then(function(t){r.drawImage(t,0,0);var i=r.getImageData(0,0,n,n).data;r.fillStyle=`red`,r.fillRect(0,0,n,n);var o=e.createElement(`div`);return o.style.backgroundImage=`url(`+a+`)`,o.style.height=n+`px`,No(i)?Io(Fo(n,n,0,0,o)):Promise.reject(!1)}).then(function(e){return r.drawImage(e,0,0),No(r.getImageData(0,0,n,n).data)}).catch(function(){return!1})},Fo=function(e,t,n,r,i){var a=`http://www.w3.org/2000/svg`,o=document.createElementNS(a,`svg`),s=document.createElementNS(a,`foreignObject`);return o.setAttributeNS(null,`width`,e.toString()),o.setAttributeNS(null,`height`,t.toString()),s.setAttributeNS(null,`width`,`100%`),s.setAttributeNS(null,`height`,`100%`),s.setAttributeNS(null,`x`,n.toString()),s.setAttributeNS(null,`y`,r.toString()),s.setAttributeNS(null,`externalResourcesRequired`,`true`),o.appendChild(s),s.appendChild(i),o},Io=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){return t(r)},r.onerror=n,r.src=`data:image/svg+xml;charset=utf-8,`+encodeURIComponent(new XMLSerializer().serializeToString(e))})},Lo={get SUPPORT_RANGE_BOUNDS(){var e=Oo(document);return Object.defineProperty(Lo,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=Lo.SUPPORT_RANGE_BOUNDS&&ko(document);return Object.defineProperty(Lo,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=Mo(document);return Object.defineProperty(Lo,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e=typeof Array.from==`function`&&typeof window.fetch==`function`?Po(document):Prom
201ise.resolve(!1);return Object.defineProperty(Lo,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=Ao();return Object.defineProperty(Lo,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e=jo();return Object.defineProperty(Lo,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e=`withCredentials`in new XMLHttpRequest;return Object.defineProperty(Lo,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!!(typeof Intl<`u`&&Intl.Segmenter);return Object.defineProperty(Lo,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},Ro=function(){function e(e,t){this.text=e,this.bounds=t}return e}(),zo=function(e,t,n,r){var i=Wo(t,n),a=[],s=0;return i.forEach(function(t){if(n.textDecorationLine.length||t.trim().length>0)if(Lo.SUPPORT_RANGE_BOUNDS){var i=Vo(r,s,t.length).getClientRects();if(i.length>1){var c=Ho(t),l=0;c.forEach(function(t){a.push(new Ro(t,o.fromDOMRectList(e,Vo(r,l+s,t.length).getClientRects()))),l+=t.length})}else a.push(new Ro(t,o.fromDOMRectList(e,i)))}else{var u=r.splitText(t.length);a.push(new Ro(t,Bo(e,r))),r=u}else Lo.SUPPORT_RANGE_BOUNDS||(r=r.splitText(t.length));s+=t.length}),a},Bo=function(e,t){var n=t.ownerDocument;if(n){var r=n.createElement(`html2canvaswrapper`);r.appendChild(t.cloneNode(!0));var i=t.parentNode;if(i){i.replaceChild(r,t);var a=s(e,r);return r.firstChild&&i.replaceChild(r.firstChild,r),a}}return o.EMPTY},Vo=function(e,t,n){var r=e.ownerDocument;if(!r)throw Error(`Node has no owner document`);var i=r.createRange();return i.setStart(e,t),i.setEnd(e,t+n),i},Ho=function(e){if(Lo.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:`grapheme`});return Array.from(t.segment(e)).map(function(e){return e.segment})}return Do(e)},Uo=function(e,t){if(Lo.SUPPORT_NATIVE_TEXT_SEGMENTATION){var n=new Intl.Segmenter(void 0,{granularity:`word`});return Array.from(n.segment(e)).map(function(e){return e.segment})}return Ko(e,t)},Wo=function(e,t){return t.letterSpacing===0?Uo(e,t):Ho(e)},Go=[32,160,4961,65792,65793,4153,4241],Ko=function(e,t){for(var n=et(e,{lineBreak:t.lineBreak,wordBreak:t.overflowWrap===`break-word`?`break-word`:t.wordBreak}),r=[],i,a=function(){if(i.value){var e=l(i.value.slice()),t=``;e.forEach(function(e){Go.indexOf(e)===-1?t+=u(e):(t.length&&r.push(t),r.push(u(e)),t=``)}),t.length&&r.push(t)}};!(i=n.next()).done;)a();return r},qo=function(){function e(e,t,n){this.text=Jo(t.data,n.textTransform),this.textBounds=zo(e,this.text,n,t)}return e}(),Jo=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(Yo,Xo);case 2:return e.toUpperCase();default:return e}},Yo=/(^|\s|:|-|\(|\))([a-z])/g,Xo=function(e,t,n){return e.length>0?t+n.toUpperCase():e},Zo=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.src=n.currentSrc||n.src,r.intrinsicWidth=n.naturalWidth,r.intrinsicHeight=n.naturalHeight,r.context.cache.addImage(r.src),r}return n}(Pa),Qo=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.canvas=n,r.intrinsicWidth=n.width,r.intrinsicHeight=n.height,r}return n}(Pa),$o=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this,i=new XMLSerializer,a=s(t,n);return n.setAttribute(`width`,a.width+`px`),n.setAttribute(`height`,a.height+`px`),r.svg=`data:image/svg+xml,`+encodeURIComponent(i.serializeToString(n)),r.intrinsicWidth=n.width.baseVal.value,r.intrinsicHeight=n.height.baseVal.value,r.context.cache.addImage(r.svg),r}return n}(Pa),es=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return n}(Pa),ts=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.start=n.start,r.reversed=typeof n.reversed==`boolean`&&n.reversed===!0,r}return n}(Pa),ns=[{type:15,flags:0,unit:`px`,number:3}],rs=[{type:16,flags:0,number:50}],is=function(e){return e.width>e.height?new o(e.left+(e.width-e.height)/2,e.top,e.height,e.height):e.width<e.height?new o(e.left,e.top+(e.height-e.width)/2,e.width,e.width):e},as=function(e){var t=e.type===cs?Array(e.value.length+1).join(`â¢`):e.value;return t.length===0?e.placeholder||``:t},os=`checkbox`,ss=`radio`,cs=`password`,ls=707406591,us=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;switch(r.type=n.type.toLowerCase(),r.checked=n.checked,r.value=as(n),(r.type===os||r.type===ss)&&(r.styles.backgroundColor=3739148031,r.styles.borderTopColor=r.styles.borderRightColor=r.styles.borderBottomColor=r.styles.borderLeftColor=2779096575,r.styles.borderTopWidth=r.styles.borderRightWidth=r.styles.borderBottomWidth=r.styles.borderLeftWidth=1,r.styles.borderTopStyle=r.styles.borderRightStyle=r.styles.borderBottomStyle=r.styles.borderLeftStyle=1,r.styles.backgroundClip=[0],r.styles.backgroundOrigin=[0],r.bounds=is(r.boun
201ds)),r.type){case os:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=ns;break;case ss:r.styles.borderTopRightRadius=r.styles.borderTopLeftRadius=r.styles.borderBottomRightRadius=r.styles.borderBottomLeftRadius=rs}return r}return n}(Pa),ds=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this,i=n.options[n.selectedIndex||0];return r.value=i&&i.text||``,r}return n}(Pa),fs=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.value=n.value,r}return n}(Pa),ps=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;r.src=n.src,r.width=parseInt(n.width,10)||0,r.height=parseInt(n.height,10)||0,r.backgroundColor=r.styles.backgroundColor;try{if(n.contentWindow&&n.contentWindow.document&&n.contentWindow.document.documentElement){r.tree=_s(t,n.contentWindow.document.documentElement);var i=n.contentWindow.document.documentElement?Sr(t,getComputedStyle(n.contentWindow.document.documentElement).backgroundColor):Cr.TRANSPARENT,a=n.contentWindow.document.body?Sr(t,getComputedStyle(n.contentWindow.document.body).backgroundColor):Cr.TRANSPARENT;r.backgroundColor=mr(i)?mr(a)?r.styles.backgroundColor:a:i}}catch{}return r}return n}(Pa),ms=[`OL`,`UL`,`MENU`],hs=function(e,t,n,r){for(var i=t.firstChild,a=void 0;i;i=a)if(a=i.nextSibling,bs(i)&&i.data.trim().length>0)n.textNodes.push(new qo(e,i,n.styles));else if(xs(i))if(Rs(i)&&i.assignedNodes)i.assignedNodes().forEach(function(t){return hs(e,t,n,r)});else{var o=gs(e,i);o.styles.isVisible()&&(vs(i,o,r)?o.flags|=4:ys(o.styles)&&(o.flags|=2),ms.indexOf(i.tagName)!==-1&&(o.flags|=8),n.elements.push(o),i.slot,i.shadowRoot?hs(e,i.shadowRoot,o,r):!Is(i)&&!Os(i)&&!Ls(i)&&hs(e,i,o,r))}},gs=function(e,t){return Ms(t)?new Zo(e,t):As(t)?new Qo(e,t):Os(t)?new $o(e,t):ws(t)?new es(e,t):Ts(t)?new ts(e,t):Es(t)?new us(e,t):Ls(t)?new ds(e,t):Is(t)?new fs(e,t):Ns(t)?new ps(e,t):new Pa(e,t)},_s=function(e,t){var n=gs(e,t);return n.flags|=4,hs(e,t,n,n),n},vs=function(e,t,n){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||ks(e)&&n.styles.isTransparent()},ys=function(e){return e.isPositioned()||e.isFloating()},bs=function(e){return e.nodeType===Node.TEXT_NODE},xs=function(e){return e.nodeType===Node.ELEMENT_NODE},Ss=function(e){return xs(e)&&e.style!==void 0&&!Cs(e)},Cs=function(e){return typeof e.className==`object`},ws=function(e){return e.tagName===`LI`},Ts=function(e){return e.tagName===`OL`},Es=function(e){return e.tagName===`INPUT`},Ds=function(e){return e.tagName===`HTML`},Os=function(e){return e.tagName===`svg`},ks=function(e){return e.tagName===`BODY`},As=function(e){return e.tagName===`CANVAS`},js=function(e){return e.tagName===`VIDEO`},Ms=function(e){return e.tagName===`IMG`},Ns=function(e){return e.tagName===`IFRAME`},Ps=function(e){return e.tagName===`STYLE`},Fs=function(e){return e.tagName===`SCRIPT`},Is=function(e){return e.tagName===`TEXTAREA`},Ls=function(e){return e.tagName===`SELECT`},Rs=function(e){return e.tagName===`SLOT`},zs=function(e){return e.tagName.indexOf(`-`)>0},Bs=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){return this.counters[e]||[]},e.prototype.pop=function(e){var t=this;e.forEach(function(e){return t.counters[e].pop()})},e.prototype.parse=function(e){var t=this,n=e.counterIncrement,r=e.counterReset,i=!0;n!==null&&n.forEach(function(e){var n=t.counters[e.counter];n&&e.increment!==0&&(i=!1,n.length||n.push(1),n[Math.max(0,n.length-1)]+=e.increment)});var a=[];return i&&r.forEach(function(e){var n=t.counters[e.counter];a.push(e.counter),n||=t.counters[e.counter]=[],n.push(e.reset)}),a},e}(),Vs={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:[`M`,`CM`,`D`,`CD`,`C`,`XC`,`L`,`XL`,`X`,`IX`,`V`,`IV`,`I`]},Hs={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,9
vendor: 15,141 bytes, lines 201-205
2010,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:`Õ.Õ.Õ.Õ.Õ.Õ.Õ.Õ.Õ.Õ.Õ.Õ.Õ.Õ.Õ.Õ .Õ.Õ.Õ.Õ.Õ.Ô¿.Ô¾.Ô½.Ô¼.Ô».Ôº.Ô¹.Ô¸.Ô·.Ô¶.Ôµ.Ô´.Ô³.Ô².Ô±`.split(`.`)},Us={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:`×׳.×׳.×׳.×׳.×׳.×׳.×׳.×׳.×׳.×׳.ת.ש.ר.×§.צ.פ.×¢.ס.× .×.×.×.××.××.××.××.××.×.×.×.×.×.×.×.×.×.×`.split(`.`)},Ws={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:`áµ.á°.á¯.á´.á®.á.á¬.á«.áª.á©.á¨.á§.á¦.á¥.á¤.á³.á¢.á¡.á .á.á.á.á².á.á.á.á.á.á.á±.á.á.á.á.á.á.á`.split(`.`)},Gs=function(e,t,n,r,i,a){return e<t||e>n?ic(e,i,a.length>0):r.integers.reduce(function(t,n,i){for(;e>=n;)e-=n,t+=r.values[i];return t},``)+a},Ks=function(e,t,n,r){var i=``;do n||e--,i=r(e)+i,e/=t;while(e*t>=t);return i},qs=function(e,t,n,r,i){var a=n-t+1;return(e<0?`-`:``)+(Ks(Math.abs(e),a,r,function(e){return u(Math.floor(e%a)+t)})+i)},Js=function(e,t,n){n===void 0&&(n=`. `);var r=t.length;return Ks(Math.abs(e),r,!1,function(e){return t[Math.floor(e%r)]})+n},Ys=1,Xs=2,Zs=4,Qs=8,$s=function(e,t,n,r,i,a){if(e<-9999||e>9999)return ic(e,4,i.length>0);var o=Math.abs(e),s=i;if(o===0)return t[0]+s;for(var c=0;o>0&&c<=4;c++){var l=o%10;l===0&&ga(a,Ys)&&s!==``?s=t[l]+s:l>1||l===1&&c===0||l===1&&c===1&&ga(a,Xs)||l===1&&c===1&&ga(a,Zs)&&e>100||l===1&&c>1&&ga(a,Qs)?s=t[l]+(c>0?n[c-1]:``)+s:l===1&&c>0&&(s=n[c-1]+s),o=Math.floor(o/10)}return(e<0?r:``)+s},ec=`åç¾åè¬`,tc=`æ¾ä½°ä»è¬`,nc=`ãã¤ãã¹`,rc=`ë§ì´ëì¤`,ic=function(e,t,n){var r=n?`. `:``,i=n?`ã`:``,a=n?`, `:``,o=n?` `:``;switch(t){case 0:return`â¢`+o;case 1:return`â¦`+o;case 2:return`â¾`+o;case 5:var s=qs(e,48,57,!0,r);return s.length<4?`0`+s:s;case 4:return Js(e,`ãä¸äºä¸åäºå ä¸å «ä¹`,i);case 6:return Gs(e,1,3999,Vs,3,r).toLowerCase();case 7:return Gs(e,1,3999,Vs,3,r);case 8:return qs(e,945,969,!1,r);case 9:return qs(e,97,122,!1,r);case 10:return qs(e,65,90,!1,r);case 11:return qs(e,1632,1641,!0,r);case 12:case 49:return Gs(e,1,9999,Hs,3,r);case 35:return Gs(e,1,9999,Hs,3,r).toLowerCase();case 13:return qs(e,2534,2543,!0,r);case 14:case 30:return qs(e,6112,6121,!0,r);case 15:return Js(e,`åä¸å¯ å¯è¾°å·³åæªç³é æäº¥`,i);case 16:return Js(e,`ç²ä¹ä¸ä¸æå·±åºè¾å£¬ç¸`,i);case 17:case 48:return $s(e,`é¶ä¸äºä¸åäºå ä¸å «ä¹`,ec,`è² `,i,Xs|Zs|Qs);case 47:return $s(e,`é¶å£¹è²³åèä¼é¸ææç`,tc,`è² `,i,Ys|Xs|Zs|Qs);case 42:return $s(e,`é¶ä¸äºä¸åäºå ä¸å «ä¹`,ec,`è´`,i,Xs|Zs|Qs);case 41:return $s(e,`é¶å£¹è´°åèä¼éææç`,tc,`è´`,i,Ys|Xs|Zs|Qs);case 26:return $s(e,`ãä¸äºä¸åäºå ä¸å «ä¹`,`åç¾åä¸`,nc,i,0);case 25:return $s(e,`é¶å£±å¼ååä¼å ä¸å «ä¹`,`æ¾ç¾åä¸`,nc,i,Ys|Xs|Zs);case 31:return $s(e,`ìì¼ì´ì¼ì¬ì¤ì¡ì¹ í구`,`ìë°±ì²ë§`,rc,a,Ys|Xs|Zs);case 33:return $s(e,`é¶ä¸äºä¸åäºå ä¸å «ä¹`,`åç¾åè¬`,rc,a,0);case 32:return $s(e,`é¶å£¹è²³ååäºå ä¸å «ä¹`,`æ¾ç¾å`,rc,a,Ys|Xs|Zs);case 18:return qs(e,2406,2415,!0,r);case 20:return Gs(e,1,19999,Ws,3,r);case 21:return qs(e,2790,2799,!0,r);case 22:return qs(e,2662,2671,!0,r);case 22:return Gs(e,1,10999,Us,3,r);case 23:return Js(e,`ããããããããããããããããã¡ã¤ã¦ã¨ãªã«ã¬ãã®ã¯ã²ãµã¸ã»ã¾ã¿ãããããããããããããããã`);case 24:return Js(e,`ããã¯ã«ã»ã¸ã¨ã¡ãã¬ããããããããã¤ããªããããã®ãããã¾ããµããã¦ãããããã¿ããã²ããã`);case 27:return qs(e,3302,3311,!0,r);case 28:return Js(e,`ã¢ã¤ã¦ã¨ãªã«ãã¯ã±ã³ãµã·ã¹ã»ã½ã¿ããããããããããããããããã ã¡ã¢ã¤ã¦ã¨ã©ãªã«ã¬ãã¯ã°ã±ã²ã³`,i);case 29:return Js(e,`ã¤ããããããããªãã«ã²ã¯ã«ã¨ã¿ã¬ã½ãããã©ã ã¦ã°ããªã¯ã¤ãã±ãã³ã¨ãã¢ãµãã¦ã¡ãã·ã±ãã¢ã»ã¹`,i);case 34:return qs(e,3792,3801,!0,r);case 37:return qs(e,6160,6169,!0,r);case 38:return qs(e,4160,4169,!0,r);case 39:return qs(e,2918,2927,!0,r);case 40:return qs(e,1776,1785,!0,r);case 43:return qs(e,3046,3055,!0,r);case 44:return qs(e,3174,3183,!0,r);case 45:return qs(e,3664,3673,!0,r);case 46:return qs(e,3872,3881,!0,r);default:return qs(e,48,57,!0,r)}},ac=`data-html2canvas-ignore`,oc=function(){function e(e,t,n){if(this.context=e,this.options=n,this.scrolledElements=[],this.referenceElement=t,this.counters=new Bs,this.quoteDepth=0,!t.ownerDocument)throw Error(`Cloned element does not have an owner document`);this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var n=this,a=cc(e,t);if(!a.contentWindow)return Promise.reject(`Unable to find iframe window`);var o=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,c=a.contentWindow,l=c.document,u=dc(a).then(function(){return r(n,void 0,void 0,function(){var e,n;return i(this,function(r){switch(r.label){case 0:return this.scrolledElements.forEach(gc),c&&(c.scrollTo(t.left,t.top),/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&(c.scrollY!==t.top||c.scrollX!==t.left)&&(this.context.logger.warn(`Unable to restore scroll position for cloned document`),this.context.windowBounds=this.context.windowBounds.add(c.scrollX-t.left,c.scrollY-t.top,0,0))),e=this.options.onclone,n=this.clonedReferenceElement,n===void 0?[2,Promise.reject(`Error finding the `+this.referenceElement.nodeName+` in the cloned document`)]:l.fonts&&l.fonts.ready?[4,l.fonts.ready]:[3,2];case 1:r.sent(),r.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,uc(l)]:[3,4];case 3:r.sent(),r.label=4;case 4:return typeof e==`function`?[2,Promise.resolve().then(function(){return e(l,n)}).then(function(){return a})]:[2,a]}})})});return l.open(),l.write(mc(document.doctype)+`<html></html>`),hc(this.referenceElement.ownerDocument,o,s),l.replaceChild(l.adoptNode(this.documentElement),l.documentElement),l.close(),u},e.prototype.createElementClone=function(e){if(Na(e,2))debugger;if(As(e))return this.createCanvasClone(e);if(js(e))return this.createVideoClone(e);if(Ps(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Ms(t)&&(Ms(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=``),t.loading===`lazy`&&(t.loading=`eager`)),zs(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement(`html2canvascustomelement`);return pc(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var n=[].slice.call(t.cssRules,0).reduce(function(e,t){return t&&typeof t.cssText==`string`?e+t.cssText:e},``),r=e.cloneNode(!1);return r.textContent=n,r}}catch(e){if(this.context.logger.error(`Unable to access cssRules property`,e),e.name!==`SecurityError`)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){if(this.options.inlineImages&&e.ownerDocument){var t=e.ownerDocument.createElement(`img`);try{return t.src=e.toDataURL(),t}catch{this.context.logger.info(`Unable to inline canvas contents, canvas is tainted`,e)}}var n=e.cloneNode(!1);try{n.width=e.width,n.height=e.height;var r=e.getContext(`2d`),i=n.getContext(`2d`);if(i)if(!this.options.allowTaint&&r)i.putImageData(r.getImageData(0,0,e.width,e.height),0,0);else{var a=e.getContext(`webgl2`)??e.getContext(`webgl`);a&&a.getContextAttributes()?.preserveDrawingBuffer===!1&&this.context.logger.warn(`Unable to clone WebGL context as it has preserveDrawingBuffer=false`,e),i.drawImage(e,0,0)}return n}catch{this.context.logger.info(`Unable to clone canvas as it is tainted`,e)}return n},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement(`canvas`);t.width=e.offsetWidth,t.height=e.offsetHeight;var n=t.getContext(`2d`);try{return n&&(n.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||n.getImageData(0,0,t.width,t.height)),t}catch{this.context.logger.info(`Unable to clone video as it is tainted`,e)}var r=e.ownerDocument.createElement(`canvas`);return r.width=e.offsetWidth,r.height=e.offsetHeight,r},e.prototype.appendChildNode=function(e,t,n){(!xs(t)||!Fs(t)&&!t.hasAttribute(ac)&&(typeof this.options.ignoreElements!=`function`||!this.options.ignoreElements(t)))&&(!this.options.copyStyles||!xs(t)||!Ps(t))&&e.appendChild(this.cloneNode(t,n))},e.prototype.cloneChildNodes=function(e,t,n){for(var r=this,i=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;i;i=i.nextSibling)if(xs(i)&&Rs(i)&&typeof i.assignedNodes==`function`){var a=i.assignedNodes();a.length&&a.forEach(function(e){return r.appendChildNode(t,e,n)})}else this.appendChildNode(t,i,n)},e.prototype.cloneNode=function(e,t){if(bs(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var n=e.ownerDocument.defaultView;if(n&&xs(e)&&(Ss(e)||Cs(e))){var r=this.createElementClone(e);r.style.transitionProperty=`none`;var i=n.getComputedStyle(e),a=n.getComputedStyle(e,`:before`),o=n.getComputedStyle(e,`:after`);this.referenceElement===e&&Ss(r)&&(this.clonedReferenceElement=r),ks(r)&&Sc(r);var s=this.counters.parse(new ka(this.context,i)),c=this.resolvePseudoContent(e,r,a,sc.BEFORE);zs(e)&&(t=!0),js(e)||this.cloneChildNodes(e,r,t),c&&r.insertBefore(c,r.firstChild);var l=this.resolvePseudoContent(e,r,o,sc.AFTER);return l&&r.appendChild(l),this.counters.pop(s),(i&&(this.options.copyStyles||Cs(e))&&!Ns(e)||t)&&pc(i,r),(e.scrollTop!==0||e.scrollLeft!==0)&&this.scrolledElements.push([r,e.scrollLeft,e.scrollTop]),(Is(e)||Ls(e))&&(Is(r)||Ls(r))&&(r.value=e.value),r}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,n,r){var i=this;if(n){var a=n.content,o=t.ownerDocument;if(!(!o||!a||a===`none`||a===`-moz-alt-content`||n.display===`none`)){this.counters.parse(new ka(this.context,n));var s=new Oa(this.context,n),c=o.createElement(`html2canvaspseudoelement`);pc(n,c),s.content.forEach(function(t){if(t.type===0)c.appendChild(o.createTextNode(t.value));else if(t.type===22){var n=o.createElement(`img`);n.src=t.value,n.style.opacity=`1`,c.appendChild(n)}else if(t.type===18){if(t.name===`attr`){var r=t.values.filter(Wn);r.length&&c.appendChild(o.createTextNode(e.getAttribute(r[0].value)||``))}else if(t.name===`counter`){var a=t.values.filter(Jn),l=a[0],u=a[1];if(l&&Wn(l)){var d=i.counters.getCounterValue(l.value),f=u&&Wn(u)?K.parse(i.context,u.value):3;c.appendChild(o.createTextNode(ic(d,f,!1)))}}else if(t.name===`counters`){var p=t.values.filter(Jn),l=p[0],m=p[1],u=p[2];if(l&&Wn(l)){var h=i.counters.getCounterValues(l.value),g=u&&Wn(u)?K.parse(i.context,u.value):3,_=m&&m.type===0?m.value:``,v=h.map(function(e){return ic(e,g,!1)}).join(_);c.appendChild(o.createTextNode(v))}}}else if(t.type===20)switch(t.value){case`open-quote`:c.appendChild(o.createTextNode(Sa(s.quotes,i.quoteDepth++,!0)));break;case`close-quote`:c.appendChild(o.createTextNode(Sa(s.quotes,--i.quoteDepth,!1)));break;default:c.appendChild(o.createTextNode(t.value))}}),c.className=yc+` `+bc;var l=r===sc.BEFORE?` `+yc:` `+bc;return Cs(t)?t.className.baseValue+=l:t.className+=l,c}}},e.destroy=function(e){return e.parentNode?(e.parentNode.removeChild(e),!0):!1},e}(),sc;(function(e){e[e.BEFORE=0]=`BEFORE`,e[e.AFTER=1]=`AFTER`})(sc||={});var cc=function(e,t){var n=e.createElement(`iframe`);return n.className=`html2canvas-container`,n.style.visibility=`hidden`,n.style.position=`fixed`,n.style.left=`-10000px`,n.style.top=`0px`,n.style.border=`0`,n.width=t.width.toString(),n.height=t.height.toString(),n.scrolling=`no`,n.setAttribute(ac,`true`),e.body.appendChild(n),n},lc=function(e){return new Promise(function(t){if(e.complete){t();return}if(!e.src){t();return}e.onload=t,e.onerror=t})},uc=function(e){return Promise.all([].slice.call(e.images,0).map(lc))},dc=function(e){return new Promise(function(t,n){var r=e.contentWindow;if(!r)return n(`No window assigned for iframe`);var i=r.document;r.onload=e.onload=function(){r.onload=e.onload=null;var n=setInterval(function(){i.body.childNodes.length>0&&i.readyState===`complete`&&(clearInterval(n),t(e))},50)}})},fc=[`all`,`d`,`content`],pc=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e.item(n);fc.indexOf(r)===-1&&t.style.setProperty(r,e.getPropertyValue(r))}return t},mc=function(e){var t=``;return e&&(t+=`<!DOCTYPE `,e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+=`"`+e.publicId+`"`),e.systemId&&(t+=`"`+e.systemId+`"`),t+=`>`),t},hc=function(e,t,n){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||n!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,n)},gc=function(e){var t=e[0],n=e[1],r=e[2];t.scrollLeft=n,t.scrollTop=r},_c=`:before`,vc=`:after`,yc=`___html2canvas___pseudoelement_before`,bc=`___html2canvas___pseudoelement_after`,xc=`{ 202 content: "" !important; 203 display: none !important; 204}`,Sc=function(e){Cc(e,`.`+yc+_c+xc+` 205 .`+bc+vc+xc)},Cc=function(e,t){var n=e.ownerDocument;if(n){var r=n.createElement(`style`);r.textContent=t,e.appendChild(r)}},wc=function(){function e(){}return e.getOrigin=function(t){var n=e._link;return n?(n.href=t,n.href=n.href,n.protocol+n.hostname+n.port):`about:blank`},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement(`a`),e._origin=e.getOrigin(t.location.href)},e._origin=`about:blank`,e}(),Tc=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)||(Mc(e)||kc(e))&&(this._cache[e]=this.loadImage(e)).catch(function(){}),t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return r(this,void 0,void 0,function(){var t,n,r,a,o=this;return i(this,function(i){switch(i.label){case 0:return t=wc.isSameOrigin(e),n=!Ac(e)&&this._options.useCORS===!0&&Lo.SUPPORT_CORS_IMAGES&&!t,r=!Ac(e)&&!t&&!Mc(e)&&typeof this._options.proxy==`string`&&Lo.SUPPORT_CORS_XHR&&!n,!t&&this._options.allowTaint===!1&&!Ac(e)&&!Mc(e)&&!r&&!n?[2]:(a=e,r?[4,this.proxy(a)]:[3,2]);case 1:a=i.sent(),i.label=2;case 2:return this.context.logger.debug(`Added image `+e.substring(0,256)),[4,new Promise(function(e,t){var r=new Image;r.onload=function(){return e(r)},r.onerror=t,(jc(a)||n)&&(r.crossOrigin=`anonymous`),r.src=a,r.complete===!0&&setTimeout(function(){return e(r)},500),o._options.imageTimeout>0&&setTimeout(function(){return t(`Timed out (`+o._options.imageTimeout+`ms) loading image`)},o._options.imageTimeout)})];case 3:return[2,i.sent()]}})})},e.prototype.has=function(e){return this._cache[e]!==void 0},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,n=this._options.proxy;if(!n)throw Error(`No proxy defined`);var r=e.substring(0,256);return new Promise(function(i,a){var o=Lo.SUPPORT_RESPONSE_TYPE?`blob`:`text`,s=new XMLHttpRequest;s.onload=function(){if(s.status===200)if(o===`text`)i(s.response);else{var e=new FileReader;e.addEventListener(`load`,function(){return i(e.result)},!1),e.addEventListener(`error`,function(e){return a(e)}
205,!1),e.readAsDataURL(s.response)}else a(`Failed to proxy resource `+r+` with status code `+s.status)},s.onerror=a;var c=n.indexOf(`?`)>-1?`&`:`?`;if(s.open(`GET`,``+n+c+`url=`+encodeURIComponent(e)+`&responseType=`+o),o!==`text`&&s instanceof XMLHttpRequest&&(s.responseType=o),t._options.imageTimeout){var l=t._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return a(`Timed out (`+l+`ms) proxying `+r)}}s.send()})},e}(),Ec=/^data:image\/svg\+xml/i,Dc=/^data:image\/.*;base64,/i,Oc=/^data:image\/.*/i,kc=function(e){return Lo.SUPPORT_SVG_DRAWING||!Nc(e)},Ac=function(e){return Oc.test(e)},jc=function(e){return Dc.test(e)},Mc=function(e){return e.substr(0,4)===`blob`},Nc=function(e){return e.substr(-3).toLowerCase()===`svg`||Ec.test(e)},q=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,n){return new e(this.x+t,this.y+n)},e}(),Pc=function(e,t,n){return new q(e.x+(t.x-e.x)*n,e.y+(t.y-e.y)*n)},Fc=function(){function e(e,t,n,r){this.type=1,this.start=e,this.startControl=t,this.endControl=n,this.end=r}return e.prototype.subdivide=function(t,n){var r=Pc(this.start,this.startControl,t),i=Pc(this.startControl,this.endControl,t),a=Pc(this.endControl,this.end,t),o=Pc(r,i,t),s=Pc(i,a,t),c=Pc(o,s,t);return n?new e(this.start,r,o,c):new e(c,s,a,this.end)},e.prototype.add=function(t,n){return new e(this.start.add(t,n),this.startControl.add(t,n),this.endControl.add(t,n),this.end.add(t,n))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),Ic=function(e){return e.type===1},Lc=function(){function e(e){var t=e.styles,n=e.bounds,r=rr(t.borderTopLeftRadius,n.width,n.height),i=r[0],a=r[1],o=rr(t.borderTopRightRadius,n.width,n.height),s=o[0],c=o[1],l=rr(t.borderBottomRightRadius,n.width,n.height),u=l[0],d=l[1],f=rr(t.borderBottomLeftRadius,n.width,n.height),p=f[0],m=f[1],h=[];h.push((i+s)/n.width),h.push((p+u)/n.width),h.push((a+m)/n.height),h.push((c+d)/n.height);var g=Math.max.apply(Math,h);g>1&&(i/=g,a/=g,s/=g,c/=g,u/=g,d/=g,p/=g,m/=g);var _=n.width-s,v=n.height-d,y=n.width-u,b=n.height-m,x=t.borderTopWidth,S=t.borderRightWidth,C=t.borderBottomWidth,w=t.borderLeftWidth,T=ir(t.paddingTop,e.bounds.width),E=ir(t.paddingRight,e.bounds.width),D=ir(t.paddingBottom,e.bounds.width),O=ir(t.paddingLeft,e.boun
vendor: 9,906 bytes, line 205
205ds.width);this.topLeftBorderDoubleOuterBox=i>0||a>0?zc(n.left+w/3,n.top+x/3,i-w/3,a-x/3,Rc.TOP_LEFT):new q(n.left+w/3,n.top+x/3),this.topRightBorderDoubleOuterBox=i>0||a>0?zc(n.left+_,n.top+x/3,s-S/3,c-x/3,Rc.TOP_RIGHT):new q(n.left+n.width-S/3,n.top+x/3),this.bottomRightBorderDoubleOuterBox=u>0||d>0?zc(n.left+y,n.top+v,u-S/3,d-C/3,Rc.BOTTOM_RIGHT):new q(n.left+n.width-S/3,n.top+n.height-C/3),this.bottomLeftBorderDoubleOuterBox=p>0||m>0?zc(n.left+w/3,n.top+b,p-w/3,m-C/3,Rc.BOTTOM_LEFT):new q(n.left+w/3,n.top+n.height-C/3),this.topLeftBorderDoubleInnerBox=i>0||a>0?zc(n.left+w*2/3,n.top+x*2/3,i-w*2/3,a-x*2/3,Rc.TOP_LEFT):new q(n.left+w*2/3,n.top+x*2/3),this.topRightBorderDoubleInnerBox=i>0||a>0?zc(n.left+_,n.top+x*2/3,s-S*2/3,c-x*2/3,Rc.TOP_RIGHT):new q(n.left+n.width-S*2/3,n.top+x*2/3),this.bottomRightBorderDoubleInnerBox=u>0||d>0?zc(n.left+y,n.top+v,u-S*2/3,d-C*2/3,Rc.BOTTOM_RIGHT):new q(n.left+n.width-S*2/3,n.top+n.height-C*2/3),this.bottomLeftBorderDoubleInnerBox=p>0||m>0?zc(n.left+w*2/3,n.top+b,p-w*2/3,m-C*2/3,Rc.BOTTOM_LEFT):new q(n.left+w*2/3,n.top+n.height-C*2/3),this.topLeftBorderStroke=i>0||a>0?zc(n.left+w/2,n.top+x/2,i-w/2,a-x/2,Rc.TOP_LEFT):new q(n.left+w/2,n.top+x/2),this.topRightBorderStroke=i>0||a>0?zc(n.left+_,n.top+x/2,s-S/2,c-x/2,Rc.TOP_RIGHT):new q(n.left+n.width-S/2,n.top+x/2),this.bottomRightBorderStroke=u>0||d>0?zc(n.left+y,n.top+v,u-S/2,d-C/2,Rc.BOTTOM_RIGHT):new q(n.left+n.width-S/2,n.top+n.height-C/2),this.bottomLeftBorderStroke=p>0||m>0?zc(n.left+w/2,n.top+b,p-w/2,m-C/2,Rc.BOTTOM_LEFT):new q(n.left+w/2,n.top+n.height-C/2),this.topLeftBorderBox=i>0||a>0?zc(n.left,n.top,i,a,Rc.TOP_LEFT):new q(n.left,n.top),this.topRightBorderBox=s>0||c>0?zc(n.left+_,n.top,s,c,Rc.TOP_RIGHT):new q(n.left+n.width,n.top),this.bottomRightBorderBox=u>0||d>0?zc(n.left+y,n.top+v,u,d,Rc.BOTTOM_RIGHT):new q(n.left+n.width,n.top+n.height),this.bottomLeftBorderBox=p>0||m>0?zc(n.left,n.top+b,p,m,Rc.BOTTOM_LEFT):new q(n.left,n.top+n.height),this.topLeftPaddingBox=i>0||a>0?zc(n.left+w,n.top+x,Math.max(0,i-w),Math.max(0,a-x),Rc.TOP_LEFT):new q(n.left+w,n.top+x),this.topRightPaddingBox=s>0||c>0?zc(n.left+Math.min(_,n.width-S),n.top+x,_>n.width+S?0:Math.max(0,s-S),Math.max(0,c-x),Rc.TOP_RIGHT):new q(n.left+n.width-S,n.top+x),this.bottomRightPaddingBox=u>0||d>0?zc(n.left+Math.min(y,n.width-w),n.top+Math.min(v,n.height-C),Math.max(0,u-S),Math.max(0,d-C),Rc.BOTTOM_RIGHT):new q(n.left+n.width-S,n.top+n.height-C),this.bottomLeftPaddingBox=p>0||m>0?zc(n.left+w,n.top+Math.min(b,n.height-C),Math.max(0,p-w),Math.max(0,m-C),Rc.BOTTOM_LEFT):new q(n.left+w,n.top+n.height-C),this.topLeftContentBox=i>0||a>0?zc(n.left+w+O,n.top+x+T,Math.max(0,i-(w+O)),Math.max(0,a-(x+T)),Rc.TOP_LEFT):new q(n.left+w+O,n.top+x+T),this.topRightContentBox=s>0||c>0?zc(n.left+Math.min(_,n.width+w+O),n.top+x+T,_>n.width+w+O?0:s-w+O,c-(x+T),Rc.TOP_RIGHT):new q(n.left+n.width-(S+E),n.top+x+T),this.bottomRightContentBox=u>0||d>0?zc(n.left+Math.min(y,n.width-(w+O)),n.top+Math.min(v,n.height+x+T),Math.max(0,u-(S+E)),d-(C+D),Rc.BOTTOM_RIGHT):new q(n.left+n.width-(S+E),n.top+n.height-(C+D)),this.bottomLeftContentBox=p>0||m>0?zc(n.left+w+O,n.top+b,Math.max(0,p-(w+O)),m-(C+D),Rc.BOTTOM_LEFT):new q(n.left+w+O,n.top+n.height-(C+D))}return e}(),Rc;(function(e){e[e.TOP_LEFT=0]=`TOP_LEFT`,e[e.TOP_RIGHT=1]=`TOP_RIGHT`,e[e.BOTTOM_RIGHT=2]=`BOTTOM_RIGHT`,e[e.BOTTOM_LEFT=3]=`BOTTOM_LEFT`})(Rc||={});var zc=function(e,t,n,r,i){var a=4*((Math.sqrt(2)-1)/3),o=n*a,s=r*a,c=e+n,l=t+r;switch(i){case Rc.TOP_LEFT:return new Fc(new q(e,l),new q(e,l-s),new q(c-o,t),new q(c,t));case Rc.TOP_RIGHT:return new Fc(new q(e,t),new q(e+o,t),new q(c,l-s),new q(c,l));case Rc.BOTTOM_RIGHT:return new Fc(new q(c,t),new q(c,t+s),new q(e+o,l),new q(e,l));case Rc.BOTTOM_LEFT:default:return new Fc(new q(c,l),new q(c-o,l),new q(e,t+s),new q(e,t))}},Bc=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},Vc=function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]},Hc=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Uc=function(){function e(e,t,n){this.offsetX=e,this.offsetY=t,this.matrix=n,this.type=0,this.target=6}return e}(),Wc=function(){function e(e,t){this.path=e,this.target=t,this.type=1}return e}(),Gc=function(){function e(e){this.opacity=e,this.type=2,this.target=6}return e}(),Kc=function(e){return e.type===0},qc=function(e){return e.type===1},Jc=function(e){return e.type===2},Yc=function(e,t){return e.length===t.length&&e.some(function(e,n){return e===t[n]})},Xc=function(e,t,n,r,i){return e.map(function(e,a){switch(a){case 0:return e.add(t,n);case 1:return e.add(t+r,n);case 2:return e.add(t+r,n+i);case 3:return e.add(t,n+i)}return e})},Zc=function(){function e(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]}return e}(),Qc=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Lc(this.container),this.container.styles.opacity<1&&this.effects.push(new Gc(this.container.styles.opacity)),this.container.styles.transform!==null){var n=this.container.bounds.left+this.container.styles.transformOrigin[0].number,r=this.container.bounds.top+this.container.styles.transformOrigin[1].number,i=this.container.styles.transform;this.effects.push(new Uc(n,r,i))}if(this.container.styles.overflowX!==0){var a=Bc(this.curves),o=Hc(this.curves);Yc(a,o)?this.effects.push(new Wc(a,6)):(this.effects.push(new Wc(a,2)),this.effects.push(new Wc(o,4)))}}return e.prototype.getEffects=function(e){for(var t=[2,3].indexOf(this.container.styles.position)===-1,n=this.parent,r=this.effects.slice(0);n;){var i=n.effects.filter(function(e){return!qc(e)});if(t||n.container.styles.position!==0||!n.parent){if(r.unshift.apply(r,i),t=[2,3].indexOf(n.container.styles.position)===-1,n.container.styles.overflowX!==0){var a=Bc(n.curves),o=Hc(n.curves);Yc(a,o)||r.unshift(new Wc(o,6))}}else r.unshift.apply(r,i);n=n.parent}return r.filter(function(t){return ga(t.target,e)})},e}(),$c=function(e,t,n,r){e.container.elements.forEach(function(i){var a=ga(i.flags,4),o=ga(i.flags,2),s=new Qc(i,e);ga(i.styles.display,2048)&&r.push(s);var c=ga(i.flags,8)?[]:r;if(a||o){var l=a||i.styles.isPositioned()?n:t,u=new Zc(s);if(i.styles.isPositioned()||i.styles.opacity<1||i.styles.isTransformed()){var d=i.styles.zIndex.order;if(d<0){var f=0;l.negativeZIndex.some(function(e,t){return d>e.element.container.styles.zIndex.order?(f=t,!1):f>0}),l.negativeZIndex.splice(f,0,u)}else if(d>0){var p=0;l.positiveZIndex.some(function(e,t){return d>=e.element.container.styles.zIndex.order?(p=t+1,!1):p>0}),l.positiveZIndex.splice(p,0,u)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(u)}else i.styles.isFloating()?l.nonPositionedFloats.push(u):l.nonPositionedInlineLevel.push(u);$c(s,u,a?u:n,c)}else i.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),$c(s,t,n,c);ga(i.flags,8)&&el(i,c)})},el=function(e,t){for(var n=e instanceof ts?e.start:1,r=e instanceof ts&&e.reversed,i=0;i<t.length;i++){var a=t[i];a.container instanceof es&&typeof a.container.value==`number`&&a.container.value!==0&&(n=a.container.value),a.listValue=ic(n,a.container.styles.listStyleType,!0),n+=r?-1:1}},tl=function(e){var t=new Qc(e,null),n=new Zc(t),r=[];return $c(t,n,n,r),el(t.container,r),n},nl=function(e,t){switch(t){case 0:return sl(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return sl(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return sl(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return sl(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},rl=function(e,t){switch(t){case 0:return sl(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return sl(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return sl(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return sl(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}},il=function(e,t){switch(t){case 0:return sl(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return sl(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return sl(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return sl(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}},al=function(e,t){switch(t){case 0:return ol(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return ol(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return ol(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return ol(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}},ol=function(e,t){var n=[];return Ic(e)?n.push(e.subdivide(.5,!1)):n.push(e),Ic(t)?n.push(t.subdivide(.5,!0)):n.push(t),n},sl=function(e,t,n,r){var i=[];return Ic(e)?i.push(e.subdivide(.5,!1)):i.push(e),Ic(n)?i.push(n.subdivide(.5,!0)):i.push(n),Ic(r)?i.push(r.subdivide(.5,!0).reverse()):i.push(r),Ic(t)?i.push(t.subdivide(.5,!1).reverse()):i.push(t),i},cl=function(e){var t=e.bounds,n=e.styles;return t.add(n.borderLeftWidth,n.borderTopWidth,-(n.borderRightWidth+n.borderLeftWidth),-(n.borderTopWidth+n.borderBottomWidth))},ll=function(e){var t=e.styles,n=e.bounds,r=ir(t.paddingLeft,n.width),i=ir
205(t.paddingRight,n.width),a=ir(t.paddingTop,n.width),o=ir(t.paddingBottom,n.width);return n.add(r+t.borderLeftWidth,a+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+r+i),-(t.borderTopWidth+t.borderBottomWidth+a+o))},ul=function(e,t){return e===0?t.bounds:e===2?ll(t):cl(t)},dl=function(e,t){return e===0?t.bounds:e===2?ll(t):cl(t)},fl=function(e,t,n){var r=ul(gl(e.styles.backgroundOrigin,t),e),i=dl(gl(e.styles.backgroundClip,t),e),a=hl(gl(e.styles.backgroundSize,t),n,r),o=a[0],s=a[1],c=rr(gl(e.styles.backgroundPosition,t),r.width-o,r.height-s);return[_l(gl(e.styles.backgroundRepeat,t),c,a,r,i),Math.round(r.left+c[0]),Math.round(r.top+c[1]),o,s]},pl=function(e){return Wn(e)&&e.value===ni.AUTO},ml=function(e){return typeof e==`number`},hl=function(e,t,n){var r=t[0],i=t[1],a=t[2],o=e[0],s=e[1];if(!o)return[0,0];if(Qn(o)&&s&&Qn(s))return[ir(o,n.width),ir(s,n.height)];var c=ml(a);if(Wn(o)&&(o.value===ni.CONTAIN||o.value===ni.COVER))return ml(a)?n.width/n.height<a==(o.value===ni.COVER)?[n.height*a,n.height]:[n.width,n.width/a]:[n.width,n.height];var l=ml(r),u=ml(i),d=l||u;if(pl(o)&&(!s||pl(s)))return l&&u?[r,i]:!c&&!d?[n.width,n.height]:d&&c?[l?r:i*a,u?i:r/a]:[l?r:n.width,u?i:n.height];if(c){var f=0,p=0;return Qn(o)?f=ir(o,n.width):Qn(s)&&(p=ir(s,n.height)),pl(o)?f=p*a:(!s||pl(s))&&(p=f/a),[f,p]}var m=null,h=null;if(Qn(o)?m=ir(o,n.width):s&&Qn(s)&&(h=ir(s,n.height)),m!==null&&(!s||pl(s))&&(h=l&&u?m/r*i:n.height),h!==null&&pl(o)&&(m=l&&u?h/i*r:n.width),m!==null&&h!==null)return[m,h];throw Error(`Unable to calculate background-size for element`)},gl=function(e,t){var n=e[t];return n===void 0?e[0]:n},_l=function(e,t,n,r,i){var a=t[0],o=t[1],s=n[0],c=n[1];switch(e){case 2:return[new q(Math.round(r.left),Math.round(r.top+o)),new q(Math.round(r.left+r.width),Math.round(r.top+o)),new q(Math.round(r.left+r.width),Math.round(c+r.top+o)),new q(Math.round(r.left),Math.round(c+r.top+o))];case 3:return[new q(Math.round(r.left+a),Math.round(r.top)),new q(Math.round(r.left+a+s),Math.round(r.top)),new q(Math.round(r.left+a+s),Math.round(r.height+r.top)),new q(Math.round(r.left+a),Math.round(r.height+r.top))];case 1:return[new q(Math.round(r.left+a),Math.round(r.top+o)),new q(Math.round(r.left+a+s),Math.round(r.top+o)),new q(Math.round(r.left+a+s),Math.round(r.top+o+c)),new q(Math.round(r.left+a),Math.round(r.top+o+c))];default:return[new q(Math.round(i.left),Math.round(i.top)),new q(Math.round(i.left+i.width),Math.round(i.top)),new q(Math.round(i.left+i.width),Math.round(i.height+i.top)),new q(Math.round(i.left),Math.round(i.height+i.top))]}},vl=`data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7`,yl=`Hidden Text`,bl=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var n=this._document.createElement(`div`),r=this._document.createElement(`img`),i=this._document.createElement(`span`),a=this._document.body;n.style.visibility=`hidden`,n.style.fontFamily=e,n.style.fontSize=t,n.style.margin=`0`,n.style.padding=`0`,n.style.whiteSpace=`nowrap`,a.appendChild(n),r.src=vl,r.width=1,r.height=1,r.style.margin=`0`,r.style.padding=`0`,r.style.verticalAlign=`baseline`,i.style.fontFamily=e,i.style.fontSize=t,i.style.margin=`0`,i.style.padding=`0`,i.appendChild(this._document.createTextNode(yl)),n.appendChild(i),n.appendChild(r);var o=r.offsetTop-i.offsetTop+2;n.removeChild(i),n.appendChild(this._document.createTextNode(yl)),n.style.lineHeight=`normal`,r.style.verticalAlign=`super`;var s=r.offsetTop-n.offsetTop+2;return a.removeChild(n),{baseline:o,middle:s}},e.prototype.getMetrics=function(e,t){var n=e+` `+t;return this._data[n]===void 0&&(this._data[n]=this.parseMetrics(e,t)),this._data[n]},e}(),xl=function(){function e(e,t){this.context=e,this.options=t}return e}(),Sl=1e4,Cl=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r._activeEffects=[],r.canvas=n.canvas?n.canvas:document.createElement(`canvas`),r.ctx=r.canvas.getContext(`2d`),n.canvas||(r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+`px`,r.canvas.style.height=n.height+`px`),r.fontMetrics=new bl(document),r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.ctx.textBaseline=`bottom`,r._activeEffects=[],r.context.logger.debug(`Canvas renderer initialized (`+n.width+`x`+n.height+`) with scale `+n.scale),r}return n.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach(function(e){return t.applyEffect(e)})},n.prototype.applyEffect=function(e){this.ctx.save(),Jc(e)&&(this.ctx.globalAlpha=e.opacity),Kc(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),qc(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},n.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore(
vendor: 15,084 bytes, line 205
205)},n.prototype.renderStack=function(e){return r(this,void 0,void 0,function(){var t;return i(this,function(n){switch(n.label){case 0:return t=e.element.container.styles,t.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:n.sent(),n.label=2;case 2:return[2]}})})},n.prototype.renderNode=function(e){return r(this,void 0,void 0,function(){return i(this,function(t){switch(t.label){case 0:if(ga(e.container.flags,16))debugger;return e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}})})},n.prototype.renderTextWithLetterSpacing=function(e,t,n){var r=this;t===0?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+n):Ho(e.text).reduce(function(t,i){return r.ctx.fillText(i,t,e.bounds.top+n),t+r.ctx.measureText(i).width},e.bounds.left)},n.prototype.createFontStyle=function(e){var t=e.fontVariant.filter(function(e){return e===`normal`||e===`small-caps`}).join(``),n=Ol(e.fontFamily).join(`, `),r=Hn(e.fontSize)?``+e.fontSize.number+e.fontSize.unit:e.fontSize.number+`px`;return[[e.fontStyle,t,e.fontWeight,r,n].join(` `),n,r]},n.prototype.renderTextNode=function(e,t){return r(this,void 0,void 0,function(){var n,r,a,o,s,c,l,u,d=this;return i(this,function(i){return n=this.createFontStyle(t),r=n[0],a=n[1],o=n[2],this.ctx.font=r,this.ctx.direction=t.direction===1?`rtl`:`ltr`,this.ctx.textAlign=`left`,this.ctx.textBaseline=`alphabetic`,s=this.fontMetrics.getMetrics(a,o),c=s.baseline,l=s.middle,u=t.paintOrder,e.textBounds.forEach(function(e){u.forEach(function(n){switch(n){case 0:d.ctx.fillStyle=hr(t.color),d.renderTextWithLetterSpacing(e,t.letterSpacing,c);var r=t.textShadow;r.length&&e.text.trim().length&&(r.slice(0).reverse().forEach(function(n){d.ctx.shadowColor=hr(n.color),d.ctx.shadowOffsetX=n.offsetX.number*d.options.scale,d.ctx.shadowOffsetY=n.offsetY.number*d.options.scale,d.ctx.shadowBlur=n.blur.number,d.renderTextWithLetterSpacing(e,t.letterSpacing,c)}),d.ctx.shadowColor=``,d.ctx.shadowOffsetX=0,d.ctx.shadowOffsetY=0,d.ctx.shadowBlur=0),t.textDecorationLine.length&&(d.ctx.fillStyle=hr(t.textDecorationColor||t.color),t.textDecorationLine.forEach(function(t){switch(t){case 1:d.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+c),e.bounds.width,1);break;case 2:d.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:d.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+l),e.bounds.width,1)}}));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(d.ctx.strokeStyle=hr(t.webkitTextStrokeColor),d.ctx.lineWidth=t.webkitTextStrokeWidth,d.ctx.lineJoin=window.chrome?`miter`:`round`,d.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+c)),d.ctx.strokeStyle=``,d.ctx.lineWidth=0,d.ctx.lineJoin=`miter`}})}),[2]})})},n.prototype.renderReplacedElement=function(e,t,n){if(n&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var r=ll(e),i=Hc(t);this.path(i),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(n,0,0,e.intrinsicWidth,e.intrinsicHeight,r.left,r.top,r.width,r.height),this.ctx.restore()}},n.prototype.renderNodeContent=function(e){return r(this,void 0,void 0,function(){var t,r,a,s,c,l,u,u,d,f,p,m,h,g,_,v,y,b,x,u,S,h,v;return i(this,function(i){switch(i.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,r=e.curves,a=t.styles,s=0,c=t.textNodes,i.label=1;case 1:return s<c.length?(l=c[s],[4,this.renderTextNode(l,a)]):[3,4];case 2:i.sent(),i.label=3;case 3:return s++,[3,1];case 4:if(!(t instanceof Zo))return[3,8];i.label=5;case 5:return i.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return u=i.sent(),this.renderReplacedElement(t,r,u),[3,8];case 7:return i.sent(),this.context.logger.error(`Error loading image `+t.src),[3,8];case 8:if(t instanceof Qo&&this.renderReplacedElement(t,r,t.canvas),!(t instanceof $o))return[3,12];i.label=9;case 9:return i.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return u=i.sent(),this.renderReplacedElement(t,r,u),[3,12];case 11:return i.sent(),this.context.logger.error(`Error loading svg `+t.svg.substring(0,255)),[3,12];case 12:return t instanceof ps&&t.tree?(d=new n(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}),[4,d.render(t.tree)]):[3,14];case 13:f=i.sent(),t.width&&t.height&&this.ctx.drawImage(f,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),i.label=14;case 14:if(t instanceof us&&(p=Math.min(t.bounds.width,t.bounds.height),t.type===os?t.checked&&(this.ctx.save(),this.path([new q(t.bounds.left+p*.39363,t.bounds.top+p*.79),new q(t.bounds.left+p*.16,t.bounds.top+p*.5549),new q(t.bounds.left+p*.27347,t.bounds.top+p*.44071),new q(t.bounds.left+p*.39694,t.bounds.top+p*.5649),new q(t.bounds.left+p*.72983,t.bounds.top+p*.23),new q(t.bounds.left+p*.84,t.bounds.top+p*.34085),new q(t.bounds.left+p*.39363,t.bounds.top+p*.79)]),this.ctx.fillStyle=hr(ls),this.ctx.fill(),this.ctx.restore()):t.type===ss&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+p/2,t.bounds.top+p/2,p/4,0,Math.PI*2,!0),this.ctx.fillStyle=hr(ls),this.ctx.fill(),this.ctx.restore())),wl(t)&&t.value.length){switch(m=this.createFontStyle(a),h=m[0],g=m[1],_=this.fontMetrics.getMetrics(h,g).baseline,this.ctx.font=h,this.ctx.fillStyle=hr(a.color),this.ctx.textBaseline=`alphabetic`,this.ctx.textAlign=El(t.styles.textAlign),v=ll(t),y=0,t.styles.textAlign){case 1:y+=v.width/2;break;case 2:y+=v.width}b=v.add(y,0,0,-v.height/2+1),this.ctx.save(),this.path([new q(v.left,v.top),new q(v.left+v.width,v.top),new q(v.left+v.width,v.top+v.height),new q(v.left,v.top+v.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new Ro(t.value,b),a.letterSpacing,_),this.ctx.restore(),this.ctx.textBaseline=`alphabetic`,this.ctx.textAlign=`left`}if(!ga(t.styles.display,2048))return[3,20];if(t.styles.listStyleImage===null)return[3,19];if(x=t.styles.listStyleImage,x.type!==0)return[3,18];u=void 0,S=x.url,i.label=15;case 15:return i.trys.push([15,17,,18]),[4,this.context.cache.match(S)];case 16:return u=i.sent(),this.ctx.drawImage(u,t.bounds.left-(u.width+10),t.bounds.top),[3,18];case 17:return i.sent(),this.context.logger.error(`Error loading list-style-image `+S),[3,18];case 18:return[3,20];case 19:e.listValue&&t.styles.listStyleType!==-1&&(h=this.createFontStyle(a)[0],this.ctx.font=h,this.ctx.fillStyle=hr(a.color),this.ctx.textBaseline=`middle`,this.ctx.textAlign=`right`,v=new o(t.bounds.left,t.bounds.top+ir(t.styles.paddingTop,t.bounds.width),t.bounds.width,Ni(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new Ro(e.listValue,v),a.letterSpacing,Ni(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline=`bottom`,this.ctx.textAlign=`left`),i.label=20;case 20:return[2]}})})},n.prototype.renderStackContent=function(e){return r(this,void 0,void 0,function(){var t,n,r,a,o,r,s,c,r,l,u,r,d,f,r,p,m,r,h,g,r;return i(this,function(i){switch(i.label){case 0:if(ga(e.element.container.flags,16))debugger;return[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:i.sent(),t=0,n=e.negativeZIndex,i.label=2;case 2:return t<n.length?(r=n[t],[4,this.renderStack(r)]):[3,5];case 3:i.sent(),i.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:i.sent(),a=0,o=e.nonInlineLevel,i.label=7;case 7:return a<o.length?(r=o[a],[4,this.renderNode(r)]):[3,10];case 8:i.sent(),i.label=9;case 9:return a++,[3,7];case 10:s=0,c=e.nonPositionedFloats,i.label=11;case 11:return s<c.length?(r=c[s],[4,this.renderStack(r)]):[3,14];case 12:i.sent(),i.label=13;case 13:return s++,[3,11];case 14:l=0,u=e.nonPositionedInlineLevel,i.label=15;case 15:return l<u.length?(r=u[l],[4,this.renderStack(r)]):[3,18];case 16:i.sent(),i.label=17;case 17:return l++,[3,15];case 18:d=0,f=e.inlineLevel,i.label=19;case 19:return d<f.length?(r=f[d],[4,this.renderNode(r)]):[3,22];case 20:i.sent(),i.label=21;case 21:return d++,[3,19];case 22:p=0,m=e.zeroOrAutoZIndexOrTransformedOrOpacity,i.label=23;case 23:return p<m.length?(r=m[p],[4,this.renderStack(r)]):[3,26];case 24:i.sent(),i.label=25;case 25:return p++,[3,23];case 26:h=0,g=e.positiveZIndex,i.label=27;case 27:return h<g.length?(r=g[h],[4,this.renderStack(r)]):[3,30];case 28:i.sent(),i.label=29;case 29:return h++,[3,27];case 30:return[2]}})})},n.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},n.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},n.prototype.formatPath=function(e){var t=this;e.forEach(function(e,n){var r=Ic(e)?e.start:e;n===0?t.ctx.moveTo(r.x,r.y):t.ctx.lineTo(r.x,r.y),Ic(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)})},n.prototype.renderRepeat=function(e,t,n,r){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(n,r),this.ctx.fill(),this.ctx.translate(-n,-r)},n.prototype.resizeImage=function(e,t,n){if(e.width===t&&e.height===n)return e;var r=(this.canvas.ownerDocument??document).createElement(`canvas`);return r.width=Math.max(1,t),r.height=Math.max(1,n),r.getContext(`2d`).drawImage(e,0,0,e.width,e.height,0,0,t,n),r},n.prototype.renderBackgroundImage=function(e){return r(this,void 0,void 0,function(){var t,n,r,a,o,s;return i(this,function(c){switch(c.label){case 0:t=e.styles.backgroundImage.length-1,n=function(n){var a,o,s,c,l,u,d,f,p,m,c,l,u,d,f,h,g,_,v,y,b,x,S,C,p,w,c,T,E,d,f,D,l,u,O,k,A,j,M,N,P,F;return i(this,function(i){switch(i.label){case 0:if(n.type!==0)return[3,5];a=void 0,o=n.url,i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.context.cache.match(o)];case 2:return a=i.sent(),[3,4];case 3:return i.sent(),r.context.logger.error(`Error loading background-image `+o),[3,4];case 4:return a&&(s=fl(e,t,[a.width,a.height,a.width/a.height]),c=s[0],l=s[1],u=s[2],d=s[3],f=s[4],p=r.ctx.createPattern(r.resizeImage(a,d,f),`repeat`),r.renderRepeat(c,p,l,u)),[3,6];case 5:Kr(n)?(m=fl(e,t,[null,null,null]),c=m[0],l=m[1],u=m[2],d=m[3],f=m[4],h=kr(n.angle,d,f),g=h[0],_=h[1],v=h[2],y=h[3],b=h[4],x=document.createElement(`canvas`),x.width=d,x.height=f,S=x.getContext(`2d`),C=S.createLinearGradient(_,y,v,b),Dr(n.stops,g).forEach(function(e){return C.addColorStop(e.stop,hr(e.color))}),S.fillStyle=C,S.fillRect(0,0,d,f),d>0&&f>0&&(p=r.ctx.createPattern(x,`repeat`),r.renderRepeat(c,p,l,u))):qr(n)&&(w=fl(e,t,[null,null,null]),c=w[0],T=w[1],E=w[2],d=w[3],f=w[4],D=n.position.length===0?[tr]:n.position,l=ir(D[0],d),u=ir(D[D.length-1],f),O=Mr(n,l,u,d,f),k=O[0],A=O[1],k>0&&A>0&&(j=r.ctx.createRadialGradient(T+l,E+u,0,T+l,E+u,k),Dr(n.stops,k*2).forEach(function(e){return j.addColorStop(e.stop,hr(e.color))}),r.path(c),r.ctx.fillStyle=j,k===A?r.ctx.fill():(M=e.bounds.left+.5*e.bounds.width,N=e.bounds.top+.5*e.bounds.height,P=A/k,F=1/P,r.ctx.save(),r.ctx.translate(M,N),r.ctx.transform(1,0,0,P,0,0),r.ctx.translate(-M,-N),r.ctx.fillRect(T,F*(E-N)+N,d,f*F),r.ctx.restore()))),i.label=6;case 6:return t--,[2]}})},r=this,a=0,o=e.styles.backgroundImage.slice(0).reverse(),c.label=1;case 1:return a<o.length?(s=o[a],[5,n(s)]):[3,4];case 2:c.sent(),c.label=3;case 3:return a++,[3,1];case 4:return[2]}})})},n.prototype.renderSolidBorder=function(e,t,n){return r(this,void 0,void 0,function(){return i(this,function(r){return this.path(nl(n,t)),this.ctx.fillStyle=hr(e),this.ctx.fill(),[2]})})},n.prototype.renderDoubleBorder=function(e,t,n,a){return r(this,void 0,void 0,function(){var r,o;return i(this,function(i){switch(i.label){case 0:return t<3?[4,this.renderSolidBorder(e,n,a)]:[3,2];case 1:return i.sent(),[2];case 2:return r=rl(a,n),this.path(r),this.ctx.fillStyle=hr(e),this.ctx.fill(),o=il(a,n),this.path(o),this.ctx.fill(),[2]}})})},n.prototype.renderNodeBackgroundAndBorders=function(e){return r(this,void 0,void 0,function(){var t,n,r,a,o,s,c,l,u=this;return i(this,function(i){switch(i.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,n=!mr(t.backgroundColor)||t.backgroundImage.length,r=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],a=Tl(gl(t.backgroundClip,0),e.curves),n||t.boxShadow.length?(this.ctx.save(),this.path(a),this.ctx.clip(),mr(t.backgroundColor)||(this.ctx.fillStyle=hr(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:i.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach(function(t){u.ctx.save();var n=Bc(e.curves),r=t.inset?0:Sl,i=Xc(n,-r+(t.inset?1:-1)*t.spread.number,(t.inset?1:-1)*t.spread.number,t.spread.number*(t.inset?-2:2),t.spread.number*(t.inset?-2:2));t.inset?(u.path(n),u.ctx.clip(),u.mask(i)):(u.mask(n),u.ctx.clip(),u.path(i)),u.ctx.shadowOffsetX=t.offsetX.number+r,u.ctx.shadowOffsetY=t.offsetY.number,u.ctx.shadowColor=hr(t.color),u.ctx.shadowBlur=t.blur.number,u.ctx.fillStyle=t.inset?hr(t.color):`rgba(0,0,0,1)`,u.ctx.fill(),u.ctx.restore()}),i.label=2;case 2:o=0,s=0,c=r,i.label=3;case 3:return s<c.length?(l=c[s],l.style!==0&&!mr(l.color)&&l.width>0?l.style===2?[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,2)]:[3,5]:[3,11]):[3,13];case 4:return i.sent(),[3,11];case 5:return l.style===3?[4,this.renderDashedDottedBorder(l.color,l.width,o,e.curves,3)]:[3,7];case 6:return i.sent(),[3,11];case 7:return l.style===4?[4,this.renderDoubleBorder(l.color,l.width,o,e.curves)]:[3,9];case 8:return i.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,o,e.curves)];case 10:i.sent(),i.label=11;case 11:o++,i.label=12;case 12:return s++,[3,3];case 13:return[2]}})})},n.prototype.renderDashedDottedBorder=function(e,t,n,a,o){return r(this,void 0,void 0,function(){var r,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,b,x;return i(this,function(i){return this.ctx.save(),r=al(a,n),s=nl(a,n),o===2&&(this.path(s),this.ctx.clip()),Ic(s[0])?(c=s[0].start.x,l=s[0].start.y):(c=s[0].x,l=s[0].y),Ic(s[1])?(u=s[1].end.x,d=s[1].end.y):(u=s[1].x,d=s[1].y),f=Math.abs(n===0||n===2?c-u:l-d),this.ctx.beginPath(),o===3?this.formatPath(r):this.formatPath(s.slice(0,2)),p=t<3?t*3:t*2,m=t<3?t*2:t,o===3&&(p=t,m=t),h=!0,f<=p*2?h=!1:f<=p*2+m?(g=f/(2*p+m),p*=g,m*=g):(_=Math.floor((f+m)/(p+m)),v=(f-_*p)/(_-1),y=(f-(_+1)*p)/_,m=y<=0||Math.abs(m-v)<Math.abs(m-y)?v:y),h&&(o===3?this.ctx.setLineDash([0,p+m]):this.ctx.setLineDash([p,m])),o===3?(this.ctx.lineCap=`round`,this.ctx.lineWidth=t):this.ctx.lineWidth=t*2+1.1,this.ctx.strokeStyle=hr(e),this.ctx.stroke(),this.ctx.setLineDash([]),o===2&&(Ic(s[0])&&(b=s[3],x=s[0],this.ctx.beginPath(),this.formatPath([new q(b.end.x,b.end.y),new q(x.start.x,x.start.y)]),this.ctx.stroke()),Ic(s[1])&&(b=s[1],x=s[2],this.ctx.beginPath(),this.formatPath([new q(b.end.x,b.end.y),new q(x.start.x,x.start.y)]),this.ctx.stroke())),this.ctx.restore(
205),[2]})})},n.prototype.render=function(e){return r(this,void 0,void 0,function(){var t;return i(this,function(n){switch(n.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=hr(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),t=tl(e),[4,this.renderStack(t)];case 1:return n.sent(),this.applyEffects([]),[2,this.canvas]}})})},n}(xl),wl=function(e){return e instanceof fs||e instanceof ds||e instanceof us&&e.type!==ss&&e.type!==os},Tl=function(e,t){switch(e){case 0:return Bc(t);case 2:return Vc(t);default:return Hc(t)}},El=function(e){switch(e){case 1:return`center`;case 2:return`right`;default:return`left`}},Dl=[`-apple-system`,`system-ui`],Ol=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter(function(e){return Dl.indexOf(e)===-1}):e},kl=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.canvas=n.canvas?n.canvas:document.createElement(`canvas`),r.ctx=r.canvas.getContext(`2d`),r.options=n,r.canvas.width=Math.floor(n.width*n.scale),r.canvas.height=Math.floor(n.height*n.scale),r.canvas.style.width=n.width+`px`,r.canvas.style.height=n.height+`px`,r.ctx.scale(r.options.scale,r.options.scale),r.ctx.translate(-n.x,-n.y),r.context.logger.debug(`EXPERIMENTAL ForeignObject renderer initialized (`+n.width+`x`+n.height+` at `+n.x+`,`+n.y+`) with scale `+n.scale),r}return n.prototype.render=function(e){return r(this,void 0,void 0,function(){var t,n;return i(this,function(r){switch(r.label){case 0:return t=Fo(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,Al(t)];case 1:return n=r.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=hr(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(n,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}})})},n}(xl),Al=function(e){return new Promise(function(t,n){var r=new Image;r.onload=function(){t(r)},r.onerror=n,r.src=`data:image/svg+xml;charset=utf-8,`+encodeURIComponent(new XMLSerializer().serializeToString(e))})},jl=function(){function e(e){var t=e.id,n=e.enabled;this.id=t,this.enabled=n,this.start=Date.now()}return e.prototype.debug=function(){var e=[...arguments];this.enabled&&(typeof window<`u`&&window.console&&typeof console.debug==`function`?console.debug.apply(console,a([this.id,this.getTime()+`ms`],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){var e=[...arguments];this.enabled&&typeof window<`u`&&window.console&&typeof console.info==`function`&&console.info.apply(console,a([this.id,this.getTime()+`ms`],e))},e.prototype.warn=function(){var e=[...arguments];this.enabled&&(typeof window<`u`&&window.console&&typeof console.warn==`function`?console.warn.apply(console,a([this.id,this.getTime()+`ms`],e)):this.info.apply(this,e))},e.prototype.error=function(){var e=[...arguments];this.enabled&&(typeof window<`u`&&window.console&&typeof console.error==`function`?console.error.apply(console,a([this.id,this.getTime()+`ms`],e)):this.info.apply(this,e))},e.instances={},e}(),Ml=function(){function e(t,n){this.windowBounds=n,this.instanceName=`#`+e.instanceCount++,this.logger=new jl({id:this.instanceName,enabled:t.logging}),this.cache=t.cache??new Tc(this,t)}return e.instanceCount=1,e}(),Nl=function(e,t){return t===void 0&&(t={}),Pl(e,t)};typeof window<`u`&&wc.setContext(window);var Pl=function(e,t){return r(void 0,void 0,void 0,function(){var r,a,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C,w,T,E,D,O,D;return i(this,function(i){switch(i.label){case 0:if(!e||typeof e!=`object`)return[2,Promise.reject(`Invalid element provided as first argument`)];if(r=e.ownerDocument,!r)throw Error(`Element is not attached to a Document`);if(a=r.defaultView,!a)throw Error(`Document is not attached to a Window`);return l={allowTaint:t.allowTaint??!1,imageTimeout:t.imageTimeout??15e3,proxy:t.proxy,useCORS:t.useCORS??!1},u=n({logging:t.logging??!0,cache:t.cache},l),d={windowWidth:t.windowWidth??a.innerWidth,windowHeight:t.windowHeight??a.innerHeight,scrollX:t.scrollX??a.pageXOffset,scrollY:t.scrollY??a.pageYOffset},f=new o(d.scrollX,d.scrollY,d.windowWidth,d.windowHeight),p=new Ml(u,f),m=t.foreignObjectRendering??!1,h={allowTaint:t.allowTaint??!1,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:m,copyStyles:m},p.logger.debug(`Starting document clone with size `+f.width+`x`+f.height+` scrolled to `+-f.left+`,`+-f.top),g=new oc(p,e,h),_=g.clonedReferenceElement,_?[4,g.toIFrame(r,f)]:[2,Promise.reject(`Unable to find element in cloned iframe`)];case 1:return v=i.sent(),y=ks(_)||Ds(_)?c(_.ownerDocument):s(p,_),b=y.width,x=y.height,S=y.left,C=y.top,w=Fl(p,_,t.backgroundColor),T={canvas:t.canvas,backgroundColor:w,scale:t.scale??a.devicePixelRatio??1,x:(t.x??0)+S,y:(t.y??0)+C,width:t.width??Math.ceil(b),height:t.height??Math.ceil(x)},m?(p.logger.debug(`Document cloned, using foreign object rendering`),D=new kl(p,T),[4,D.render(_)]):[3,3];case 2:return E=i.sent(),[3,5];case 3:return p.logger.debug(`Document cloned, element located at `+S+`,`+C+` with size `+b+`x`+x+` using computed rendering`),p.logger.debug(`Starting DOM parsing`),O=_s(p,_),w===O.styles.backgroundColor&&(O.styles.backgroundColor=Cr.TRANSPARENT),p.logger.debug(`Starting renderer for element at `+T.x+`,`+T.y+` with size `+T.width+`x`+T.height),D=new Cl(p,T),[4,D.render(O)];case 4:E=i.sent(),i.label=5;case 5:return(t.removeContainer??!0)&&(oc.destroy(v)||p.logger.error(`Cannot detach cloned iframe as it is not in the DOM anymore`)),p.logger.debug(`Finis
205hed rendering`),[2,E]}})})},Fl=function(e,t,n){var r=t.ownerDocument,i=r.documentElement?Sr(e,getComputedStyle(r.documentElement).backgroundColor):Cr.TRANSPARENT,a=r.body?Sr(e,getComputedStyle(r.body).backgroundColor):Cr.TRANSPARENT,o=typeof n==`string`?Sr(e,n):n===null?Cr.TRANSPARENT:4294967295;return t===r.documentElement?mr(i)?mr(a)?o:a:i:o};return Nl}))})),W2=u(U2(),1);async function G2(e,t,n=12){let r=getComputedStyle(e).backgroundColor,i=r&&r!==`rgba(0, 0, 0, 0)`?r:`#faf7f2`,a=await(0,W2.default)(e,{scale:2,backgroundColor:i,useCORS:!0,logging:!1}),o=new zZ(`p`,`mm`,`a4`),s=210-n*2,c=297-n*2,l=Math.max(1,Math.round(c*a.width/s)),u=0,d=!0;for(;u<a.height;){let e=Math.min(l,a.height-u),t=u+e>=a.height&&e<l*.15&&!d,r=t?u-(l-e):u,c=t?l:e,f=document.createElement(`canvas`);f.width=a.width,f.height=c;let p=f.getContext(`2d`);p.fillStyle=i,p.fillRect(0,0,f.width,f.height),p.drawImage(a,0,r,a.width,c,0,0,a.width,c),d||o.addPage(),o.addImage(f.toDataURL(`image/jpeg`,.92),`JPEG`,n,n,s,c*s/a.width),d=!1,u+=e}o.save(t)}var K2=({icon:e,label:t,children:n,className:r})=>(0,z.jsxs)(`div`,{className:K(`h-full rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,r),children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3 mb-5`,children:[(0,z.jsx)(`div`,{className:`w-10 h-10 rounded-lg bg-primary/10 text-primary flex items-center justify-center shrink-0`,children:(0,z.jsx)(e,{className:`w-5 h-5`})}),(0,z.jsx)(`h3`,{className:`font-display text-lg leading-tight`,children:t})]}),(0,z.jsx)(`div`,{className:`space-y-2`,children:n})]}),q2=({n:e,title:t,desc:n})=>(0,z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,z.jsx)(`div`,{className:`w-7 h-7 rounded-full bg-primary text-primary-foreground text-xs font-semibold flex items-center justify-center shrink-0`,children:e}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium leading-snug`,children:t}),n&&(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-0.5`,children:n})]})]}),J2=()=>(0,z.jsx)(`div`,{className:`py-0.5 pl-[6px]`,children:(0,z.jsx)(Zt,{className:`w-4 h-4 text-muted-foreground`})}),Y2=({icon:e,title:t,desc:n})=>(0,z.jsxs)(`div`,{className:`flex items-start gap-3 rounded-xl border border-border/60 bg-background p-4`,children:[(0,z.jsx)(e,{className:`w-4 h-4 text-primary shrink-0 mt-0.5`}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`text-sm font-medium leading-snug`,children:t}),n&&(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-0.5`,children:n})]})]}),X2=[`Submitted in the portal`,`Saved to the secure database`,`Automated alerts & Charges Master update`,`Diocesan Office review`,`Outcome emailed`];function Z2(){let e=(0,b.useRef)(null),[t,n]=(0,b.useState)(!1);return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background system-diagram`,children:[(0,z.jsx)(`style`,{children:` 206 @page { margin: 16mm 14mm; } 207 @media print { 208 .system-diagram { -webkit-print-color-adjust: exact; print-color-adjust: exact; } 209 .system-diagram .print-hide { display: none !important; } 210 .system-diagram header { border: none !important; } 211 .system-diagram main { max-width: none !important; padding: 0 !important; font-size: 10.5pt; } 212 .system-diagram .layout-grid { grid-template-columns: 1fr !important; gap: 14pt !important; } 213 .system-diagram .break-avoid { break-inside: avoid; margin-bottom: 14pt; } 214 .system-diagram h1, .system-diagram h2 { break-after: avoid; } 215 .system-diagram .mt-12, .system-diagram .mt-14, .system-diagram .mt-16 { margin-top: 20pt !important; } 216 } 217 `}),(0,z.jsx)(`header`,{className:`border-b border-border/60 bg-card/80 backdrop-blur-sm`,children:(0,z.jsxs)(`div`,{className:`max-w-6xl mx-auto px-6 py-4 flex items-center gap-3`,children:[(0,z.jsx)(Dg,{size:36}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-display text-lg leading-tight`,children:`Diocese Connect`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:`Diocese of Edinburgh`})]}),(0,z.jsxs)(`div`,{className:`ml-auto flex gap-2 print-hide`,children:[(0,z.jsxs)(`button`,{onClick:()=>window.print(),className:`inline-flex items-center gap-2 rounded-md border border-input bg-transparent px-4 py-2 text-sm font-medium shadow-sm hover:bg-accent transition-colors`,children:[(0,z.jsx)(Jn,{className:`w-4 h-4`}),`Print`]}),(0,z.jsxs)(`button`,{onClick:async()=>
217{if(!(!e.current||t)){n(!0);try{await G2(e.current,`Diocese Connect â System Overview.pdf`)}catch{window.print()}finally{n(!1)}}},disabled:t,className:`inline-flex items-center gap-2 rounded-md bg-primary text-primary-foreground px-4 py-2 text-sm font-medium shadow-sm hover:bg-primary/90 transition-colors disabled:opacity-60`,children:[t?(0,z.jsx)(Ln,{className:`w-4 h-4 animate-spin`}):(0,z.jsx)(xn,{className:`w-4 h-4`}),`Download PDF`]})]})]})}),(0,z.jsxs)(`main`,{ref:e,className:`max-w-6xl mx-auto px-6 py-12`,children:[(0,z.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-primary font-medium`,children:`System overview`}),(0,z.jsx)(`h1`,{className:`font-display text-3xl sm:text-4xl mt-2`,children:`How the portal works`}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-3 max-w-2xl`,children:`A guide to the front-end journeys each user follows, and the back-end processes that run automatically behind every submission.`}),(0,z.jsx)(`div`,{className:`mt-5 rounded-xl border border-primary/30 bg-primary/5 px-5 py-3 max-w-2xl`,children:(0,z.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[(0,z.jsx)(`strong`,{className:`text-foreground`,children:`Demo data notice:`}),` for demonstration purposes the portal is populated with fictional sample data â all names, stories and figures are illustrative only. The payroll register contains anonymised data, and every contact email address ends in the reserved âexample.orgâ domain so no real address can ever be contacted.`]})}),(0,z.jsx)(`h2`,{className:`font-display text-2xl mt-12`,children:`Front end â what each user sees`}),(0,z.jsxs)(`div`,{className:`mt-6 grid gap-5 lg:grid-cols-2 layout-grid`,children:[(0,z.jsxs)(K2,{icon:or,label:`Staff & office bearers â the full life cycle`,className:`break-avoid`,children:[(0,z.jsx)(q2,{n:1,title:`Register & verify email`,desc:`Anyone with an email address can create a secure account, then log in.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:2,title:`Choose a life-cycle form`,desc:`New Appointment, Tax Code Update, Office Bearer Change, or Exit Interview â from the home page.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:3,title:`Forms adapt to the role`,desc:`Only relevant questions appear; the payroll section shows only for charges on the Diocesan Payroll Service.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:4,title:`Upload documents`,desc:`P45s and HMRC tax coding notices are stored in secure, private storage.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:5,title:`Submit`,desc:`The record is saved and the Diocesan Office is notified automatically.`})]}),(0,z.jsxs)(K2,{icon:wn,label:`Canon 35 & funding applicants`,className:`break-avoid`,children:[(0,z.jsx)(q2,{n:1,title:`Choose an application`,desc:`Canon 35 planning consent, Church & Buildings funding, or Rectory & Housing funding.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:2,title:`Step-by-step wizard`,desc:`Diocesan guidance appears at every stage, and progress saves automatically.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:3,title:`Upload supporting documents`,desc:`Photographs, architect reports and quinquennial inspections attach to the application.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:4,title:`Submit to the Buildings Committee`,desc:`The application moves to committee review with a full document trail.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:5,title:`Kept informed by email`,desc:`Applicants are notified of every stage, including the approval certificate.`})]}),(0,z.jsxs)(K2,{icon:Yn,label:`Treasurers & Priests â annual governance`,className:`break-avoid`,children:[(0,z.jsx)(q2,{n:1,title:`No account needed`,desc:`Three open portals from the home page: Annual Returns, Statutory Debt & Loan Disclosure, and the Annual Congregational Return.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:2,title:`Annual Returns Portal`,desc:`Upload Annual Accounts and Financial Summary PDFs, and confirm OSCR, Gift Aid, Safeguarding and Statistical returns.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:3,title:`Loan disclosure â compulsory`,desc:`Every external or internal loan is logged with lender, balance and maturity date, as UK charity law and OSCR guidance require.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:4,title:`Congregational Return`,desc:`Membership roll, attendance frequency, giving and donor figures feed the diocesan picture of growth and stewardship.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:5,title:`Nothing slips`,desc:`Automated deadline reminders and the Hub's Governance Checklist track all 54 charges against the Diocese of Edinburgh deadline.`})]}),(0,z.jsxs)(K2,{icon:Vn,label:`Congregations â stories, events & communications`,className:`break-avoid`,children:[(0,z.jsx)(q2,{n:1,title:`No account needed`,desc:`Anyone in a congregation can share news, stories and upcoming events from the home page â for The Communicant, Adventures in Faith, DMMC News, or any publication.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:2,title:`Straight to the Communications Officer`,desc:`Submissions land in the Story Submissions Desk for review, with photos and event details attached.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:3,title:`Weekly call for content`,desc:`Every Monday, an automated reminder invites each charge's Rector or Priest-in-Charge (falling back to the Vestry Secretary or Treasurer) to share their news.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:4,title:`Training & support from the Communications Officer`,desc:`They offer training to members of vestry and anyone in the church community on how to communicate well and efficie
217ntly with their congregation â helping everyone collaborate and grow together.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:5,title:`Recent publications`,desc:`Every new issue of The Communicant, Adventures in Faith and DMMC News is posted on the portal, so each charge can read the latest editions and see their own stories and events in print.`})]}),(0,z.jsxs)(K2,{icon:Nn,label:`Diocesan Office (administrators)`,className:`break-avoid`,children:[(0,z.jsx)(q2,{n:1,title:`One admin dashboard`,desc:`All applications, funding bids and onboarding submissions in a single view.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:2,title:`Search & filter`,desc:`By status â Pre-application, Pending, Approved, Needs attention.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:3,title:`Record outcomes`,desc:`Committee decisions and feedback are logged against each application.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:4,title:`Notify applicants`,desc:`Status updates and decisions are emailed directly from the dashboard.`}),(0,z.jsx)(J2,{}),(0,z.jsx)(q2,{n:5,title:`Charges Master stays current`,desc:`Office bearer changes update the 54-charge master record automatically.`})]})]}),(0,z.jsx)(`h2`,{className:`font-display text-2xl mt-14`,children:`Back end â what happens behind the scenes`}),(0,z.jsxs)(`div`,{className:`mt-6 grid gap-5 lg:grid-cols-2 layout-grid`,children:[(0,z.jsx)(K2,{icon:yn,label:`Secure data stores`,className:`break-avoid`,children:(0,z.jsxs)(`div`,{className:`space-y-3`,children:[(0,z.jsx)(Y2,{icon:Nn,title:`Charges Master â 54 charges`,desc:`Current Vestry Secretaries, Treasurers, RCIL Associates, PVG Co-ordinators and the in-house payroll flag for each charge.`}),(0,z.jsx)(Y2,{icon:or,title:`Life-cycle records`,desc:`Every new appointment, tax code update, office bearer change and exit interview, with uploaded documents.`}),(0,z.jsx)(Y2,{icon:cr,title:`Payroll register â admin-only`,desc:`The 41 active Diocesan Payroll Service staff (24 charges, plus central Synod staff) sit in their own secure store.`}),(0,z.jsx)(Y2,{icon:wn,title:`Applications & funding bids`,desc:`Canon 35 applications, Church/Buildings and Rectory funding applications, with committee feedback.`}),(0,z.jsx)(Y2,{icon:Yn,title:`Annual governance & growth records`,desc:`Per charge and reporting year: accounts and declarations (Annual Governance Tracker), every logged loan (Loans Tracker), and membership, attendance and giving figures (Congregational Metrics).`}),(0,z.jsx)(Y2,{icon:Vn,title:`Story submissions & recent publications`,desc:`Every congregation story and event submission, plus each posted issue of The Communicant, Adventures in Faith and DMMC News â readable by all charges.`}),(0,z.jsx)(Y2,{icon:yn,title:`Private document storage`,desc:`Uploaded files are held securely and linked to their application or intake record.`})]})}),(0,z.jsx)(K2,{icon:ur,label:`Automated processes`,className:`break-avoid`,children:(0,z.jsxs)(`div`,{className:`space-y-3`,children:[(0,z.jsx)(Y2,{icon:ur,title:`Charges Master auto-update`,desc:`An office bearer change instantly updates the master record for that charge; resignations clear the role.`}),(0,z.jsx)(Y2,{icon:ur,title:`Finance & Safeguarding alerts`,desc:`A new Treasurer on the payroll service emails the Finance Officer; a new PVG Co-ordinator emails Safeguarding.`}),(0,z.jsx)(Y2,{icon:ur,title:`PVG appointment alert`,desc:`New appointments flagged as requiring PVG membership automatically alert the Diocesan Safeguarding Officer.`}),(0,z.jsx)(Y2,{icon:ur,title:`Applicant notifications`,desc:`Application decisions and status changes trigger templated emails to the applicant.`}),(0,z.jsx)(Y2,{icon:ur,title:`Inspection follow-ups`,desc:`Scheduled reminders chase outstanding quinquennial inspection actions.`}),(0,z.jsx)(Y2,{icon:ur,title:`Annual accounts reminders`,desc:`Scheduled emails in October, November and December remind Vestry Treasurers and Priests ahead of the Diocese of Edinburgh deadline.`}),(0,z.jsx)(Y2,{icon:rr,title:`High-value liability alert`,desc:`A loan record with an outstanding balance over £50,000 automatically emails the Diocesan Finance Officer for the diocesan risk register.`})]})})]}),(0,z.jsx)(`div`,{className:`mt-5 layout-grid`,children:(0,z.jsx)(K2,{icon:cr,label:`Payroll data â secure by design`,className:`break-avoid`,children:(0,z.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2 layout-grid`,children:[(0,z.jsx)(Y2,{icon:Rn,title:`Admin-only access`,desc:`The payroll register is readable only by signed-in Diocesan Office administrators â row-level security blocks every other role, and it is never exposed to submitters or other charges.`}),(0,z.jsx)(Y2,{icon:yn,title:`What is held`,desc:`Name, charge link, clergy/lay role, salary, monthly amount, weekly hours, tax code, NI number, start date and payslip email â every field structured and searchable in the Hub's Payroll Register. All payroll data is fully anonymised.`}),(0,z.jsx)(Y2,{icon:tr,title:`What is deliberately excluded`,desc:`Bank sort codes and account numbers are never imported, and home addresses stay off the portal â the import
217covers active payroll staff only.`}),(0,z.jsx)(Y2,{icon:Xn,title:`How it stays current`,desc:`New appointments and tax code updates arrive as reviewed queues, exit interviews flag payroll close-off, and the Charges Master payroll flag drives which charges see payroll questions at all.`})]})})}),(0,z.jsxs)(`div`,{className:`mt-10 rounded-2xl border border-primary/30 bg-card p-6 shadow-sm break-avoid`,children:[(0,z.jsx)(`h3`,{className:`font-display text-lg`,children:`Every submission follows the same secure path`}),(0,z.jsx)(`div`,{className:`mt-5 flex flex-wrap items-center gap-x-2 gap-y-3`,children:X2.map((e,t)=>(0,z.jsxs)(b.Fragment,{children:[(0,z.jsx)(`span`,{className:`rounded-full border border-primary/30 bg-primary/5 text-primary text-sm font-medium px-4 py-1.5`,children:e}),t<X2.length-1&&(0,z.jsx)($t,{className:`w-4 h-4 text-muted-foreground shrink-0`})]},t))})]}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-8`,children:`Charges using the in-house Diocesan Payroll Service are flagged individually in the Charges Master, so payroll questions only ever appear for those charges.`})]})]})}var Q2=[`Rector / Priest-in-Charge`,`Vestry Treasurer`,`Vestry Secretary`,`Vestry Member`],$2=[2025,2026,2027],e4=[{value:`not_started`,label:`Not yet claimed`},{value:`in_progress`,label:`Claim in progress`},{value:`claimed`,label:`Claimed`},{value:`not_applicable`,label:`Not applicable to this charge`}],t4=[{value:``,label:`Choose from the list of all 54 chargesâ¦`},...XF.map(e=>({value:e,label:e}))],n4=e=>!!e&&(e.type===`application/pdf`||e.name.toLowerCase().endsWith(`.pdf`)),r4=({id:e,label:t,hint:n,file:r,onFile:i,required:a})=>(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(Z,{htmlFor:e,children:[t,a?` *`:``]}),(0,z.jsxs)(`div`,{className:`mt-1.5 flex items-center gap-3`,children:[(0,z.jsxs)(`label`,{htmlFor:e,className:`inline-flex items-center gap-2 rounded-lg border border-input bg-card px-4 py-2 text-sm font-medium shadow-sm hover:bg-accent transition-colors cursor-pointer`,children:[(0,z.jsx)(ir,{className:`w-4 h-4`}),`Choose PDFâ¦`]}),(0,z.jsx)(`input`,{id:e,type:`file`,accept:`application/pdf,.pdf`,className:`hidden`,onChange:e=>i(e.target.files?.[0]||null)}),r?(0,z.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-sm text-muted-foreground min-w-0`,children:[(0,z.jsx)(En,{className:`w-4 h-4 text-primary shrink-0`}),(0,z.jsx)(`span`,{className:`truncate`,children:r.name})]}):(0,z.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`No file selected`})]}),n&&(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1.5`,children:n})]});function i4(){let[e,t]=(0,b.useState)({submitter_name:``,submitter_role:`Vestry Treasurer`,submitter_email:``,charge:``,reporting_year:String(new Date().getFullYear()),oscr_return_filed:!1,gift_aid_status:`not_started`,safeguarding_audit_completed:!1,statistical_return_received:!1,notes:``}),[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(null),[o,s]=(0,b.useState)(!1),[c,l]=(0,b.useState)(``),[u,d]=(0,b.useState)(!1),f=(e,n)=>t(t=>({...t,[e]:n}));return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,z.jsx)(`header`,{className:`pt-safe border-b border-border/60 bg-card/80 backdrop-blur-sm sticky top-0 z-10`,children:(0,z.jsxs)(`div`,{className:`max-w-3xl mx-auto px-6 py-4 flex items-center gap-3`,children:[(0,z.jsx)(Dg,{size:36}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-display text-lg leading-tight`,children:`Diocese Connect`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:`Diocese of Edinburgh`})]}),(0,z.jsxs)(Dc,{to:`/`,className:`ml-auto inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors`,children:[(0,z.jsx)(Qt,{className:`w-4 h-4`}),`Home`]})]})}),(0,z.jsx)(`main`,{className:`max-w-3xl mx-auto px-6 py-12`,children:u?(0,z.jsxs)(`div`,{className:`rounded-2xl border border-primary/30 bg-card p-8 text-center shadow-sm`,children:[(0,z.jsx)(`div`,{className:`w-14 h-14 rounded-full bg-primary/10 text-primary flex items-center justify-center mx-auto`,children:(0,z.jsx)(mn,{className:`w-7 h-7`})}),(0,z.jsx)(`h1`,{className:`font-display text-2xl mt-4`,children:`Thank you â your Annual Return is with the Diocesan Office`}),(0,z.jsxs)(`p`,{className:`text-muted-foreground mt-3 max-w-lg mx-auto`,children:[`We have received your accounts and compliance declarations for `,e.charge,e.reporting_year?` (${e.reporting_year})`:``,`. Your charge will now show as submitted on the governance dashboard, and
217you will not receive further deadline reminders for this year.`]}),(0,z.jsx)(Dc,{to:`/`,children:(0,z.jsx)(Qh,{className:`mt-6`,children:`Back to the home page`})})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-primary font-medium`,children:`Governance: Maintaining Financial Health and Statutory Compliance`}),(0,z.jsx)(`h1`,{className:`font-display text-3xl sm:text-4xl mt-2`,children:`Annual Returns Portal`}),(0,z.jsxs)(`p`,{className:`text-muted-foreground mt-3 max-w-2xl`,children:[`For Treasurers and Priests â upload your Annual Accounts and Financial Summary, and confirm your OSCR, Gift Aid, Safeguarding and Statistical returns. The Diocese of Edinburgh deadline is `,(0,z.jsx)(`strong`,{children:`14th January`}),`. There is no need to create an account â your files go straight to the secure Diocesan Office records.`]}),(0,z.jsxs)(`form`,{onSubmit:async t=>{if(t.preventDefault(),l(``),!e.submitter_name||!e.submitter_email||!e.charge||!n){l(`Please complete your name, email and charge, and attach your Annual Accounts.`);return}s(!0);try{let t=await X.integrations.Core.UploadPrivateFile({file:n}),r=``,a=``;i&&(r=(await X.integrations.Core.UploadPrivateFile({file:i})).file_uri,a=i.name),await X.entities.AnnualGovernanceTracker.create({...e,reporting_year:Number(e.reporting_year),accounts_file_url:t.file_uri,accounts_file_name:n.name,financial_summary_file_url:r,financial_summary_file_name:a}),d(!0)}catch{l(`Something went wrong sending your submission â please try again.`)}finally{s(!1)}},className:`mt-8 space-y-8`,children:[(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,children:[(0,z.jsx)(`h2`,{className:`font-display text-xl`,children:`Your details`}),(0,z.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ar-name`,children:`Your name *`}),(0,z.jsx)($h,{id:`ar-name`,value:e.submitter_name,onChange:e=>f(`submitter_name`,e.target.value),className:`mt-1.5`,placeholder:`e.g. Alex Morgan`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ar-role`,children:`Your role`}),(0,z.jsx)(C2,{id:`ar-role`,value:e.submitter_role,onChange:e=>f(`submitter_role`,e),options:Q2,title:`Your role`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ar-email`,children:`Your email address *`}),(0,z.jsx)($h,{id:`ar-email`,type:`email`,value:e.submitter_email,onChange:e=>f(`submitter_email`,e.target.value),className:`mt-1.5`,placeholder:`[email protected]`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ar-year`,children:`Reporting year`}),(0,z.jsx)(C2,{id:`ar-year`,value:e.reporting_year,onChange:e=>f(`reporting_year`,e),options:$2.map(e=>({value:String(e),label:String(e)})),title:`Reporting year`})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`ar-charge`,children:`Select your charge / congregation *`}),(0,z.jsx)(C2,{id:`ar-charge`,value:e.charge,onChange:e=>f(`charge`,e),options:t4,title:`Select your charge / congregation`})]})]})]}),(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,children:[(0,z.jsx)(`h2`,{className:`font-display text-xl`,children:`Accounts & Financial Summary`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`PDF files only, please â they are stored securely in the Diocesan Office's private records.`}),(0,z.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[(0,z.jsx)(r4,{id:`ar-accounts`,label:`Annual Accounts`,required:!0,file:n,onFile:e=>{if(e&&!n4(e)){l(`Annual Accounts must be a PDF file.`);return}l(``),r(e)},hint:`Your Vestry-approved accounts for the reporting year.`}),(0,z.jsx)(r4,{id:`ar-summary`,label:`Financial Summary`,file:i,onFile:e=>{if(e&&!n4(e)){l(`The Financial Summary must be a PDF file.`);return}l(``),a(e)},hint:`The accompanying financial summary (optional but welcomed).`})]})]}),(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,children:[(0,z.jsx)(`h2`,{className:`font-display text-xl`,children:`Statutory declarations`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Tick what is complete â you can leave anything still in progress unticked.`}),(0,z.jsxs)(`div`,{className:`mt-4 space-y-4`,children:[(0,z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,z.jsx)(bD,{id:`ar-oscr`,checked:e.oscr_return_filed,onCheckedChange:e=>f(`oscr_return_filed`,e===!0),className:`mt-1`}),(0,z.jsx)(Z,{htmlFor:`ar-oscr`,className:`font-normal leading-snug`,children:`OSCR Annual Return â I confirm the OSCR return for the reporting year has been filed.`})]}),(0,z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,z.jsx)(bD,{id:`ar-safeguarding`,checked:e.safeguarding_audit_completed,onCheckedChange:e=>
217f(`safeguarding_audit_completed`,e===!0),className:`mt-1`}),(0,z.jsx)(Z,{htmlFor:`ar-safeguarding`,className:`font-normal leading-snug`,children:`Annual Safeguarding Audit â I confirm the charge's annual safeguarding audit has been completed.`})]}),(0,z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,z.jsx)(bD,{id:`ar-statistical`,checked:e.statistical_return_received,onCheckedChange:e=>f(`statistical_return_received`,e===!0),className:`mt-1`}),(0,z.jsx)(Z,{htmlFor:`ar-statistical`,className:`font-normal leading-snug`,children:`Statistical Return â I confirm the charge's statistical return has been submitted.`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ar-giftaid`,children:`Gift Aid claim status`}),(0,z.jsx)(C2,{id:`ar-giftaid`,value:e.gift_aid_status,onChange:e=>f(`gift_aid_status`,e),options:e4,className:`sm:w-80`,title:`Gift Aid claim status`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ar-notes`,children:`Anything else the Diocesan Office should know?`}),(0,z.jsx)(AD,{id:`ar-notes`,value:e.notes,onChange:e=>f(`notes`,e.target.value),className:`mt-1.5`,placeholder:`Optional â e.g. local audit delays.`})]})]})]}),c&&(0,z.jsx)(`p`,{className:`text-sm text-destructive`,children:c}
217),(0,z.jsxs)(Qh,{type:`submit`,disabled:o,className:`w-full sm:w-auto`,children:[o?(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}):(0,z.jsx)(hn,{className:`w-4 h-4 mr-2`}),`Submit Annual Return`]})]})]})})]})}var a4=[`Rector / Priest-in-Charge`,`Vestry Treasurer`,`Vestry Secretary`,`Vestry Member`],o4=[`External Bank`,`Diocesan Central Fund`,`Local Internal Restricted Fund`];function s4(){let[e,t]=(0,b.useState)({submitter_name:``,submitter_role:`Vestry Treasurer`,submitter_email:``,charge:``,charge_code:``,lender_name:``,lender_type:``,original_principal:``,outstanding_balance:``,interest_rate:``,term_months:``,maturity_date:``,purpose:``,notes:``}),[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(!1),c=(e,n)=>t(t=>({...t,[e]:n})),l=e=>{let t=Number(e);return e!==``&&Number.isFinite(t)?t:null};return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,z.jsx)(`header`,{className:`pt-safe border-b border-border/60 bg-card/80 backdrop-blur-sm sticky top-0 z-10`,children:(0,z.jsxs)(`div`,{className:`max-w-3xl mx-auto px-6 py-4 flex items-center gap-3`,children:[(0,z.jsx)(Dg,{size:36}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-display text-lg leading-tight`,children:`Diocese Connect`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:`Diocese of Edinburgh`})]}),(0,z.jsxs)(Dc,{to:`/`,className:`ml-auto inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors`,children:[(0,z.jsx)(Qt,{className:`w-4 h-4`}),`Home`]})]})}),(0,z.jsx)(`main`,{className:`max-w-3xl mx-auto px-6 py-12`,children:o?(0,z.jsxs)(`div`,{className:`rounded-2xl border border-primary/30 bg-card p-8 text-center shadow-sm`,children:[(0,z.jsx)(`div`,{className:`w-14 h-14 rounded-full bg-primary/10 text-primary flex items-center justify-center mx-auto`,children:(0,z.jsx)(mn,{className:`w-7 h-7`})}),(0,z.jsx)(`h1`,{className:`font-display text-2xl mt-4`,children:`Thank you â your loan disclosure is with the Diocesan Office`}),(0,z.jsxs)(`p`,{className:`text-muted-foreground mt-3 max-w-lg mx-auto`,children:[`The liability for `,e.charge,` has been added to the diocesan loan register. This gives the Diocesan Finance Office a pre-compiled record of liabilities for your annual accounts balance sheet â and helps us support your charge with repayment planning.`]}),(0,z.jsx)(Dc,{to:`/`,children:(0,z.jsx)(Qh,{className:`mt-6`,children:`Back to the home page`})})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-primary font-medium`,children:`Governance: Maintaining Financial Health and Statutory Debt Compliance`}),(0,z.jsx)(`h1`,{className:`font-display text-3xl sm:text-4xl mt-2`,children:`Statutory Debt & Loan Disclosure`}),(0,z.jsxs)(`p`,{className:`text-muted-foreground mt-3 max-w-2xl`,children:[`Under UK charity law and OSCR guidance, `,(0,z.jsx)(`strong`,{children:`all loans are compulsory to record`}),` â they are legal liabilities that must be disclosed transparently in your annual accounts, whatever the source:`]}),(0,z.jsxs)(`div`,{className:`mt-4 grid gap-3 sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card p-4 shadow-sm`,children:[(0,z.jsx)(`p`,{className:`font-medium text-sm`,children:`External loans`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Commercial bank loans, building fabric mortgages, or third-party grants that convert to loans.`})]}),(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/70 bg-card p-4 shadow-sm`,children:[(0,z.jsx)(`p`,{className:`font-medium text-sm`,children:`Internal loans`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`Loans from the Diocesan central fund, or borrowing internally from your own restricted reserve funds.`})]})]}),(0,z.jsxs)(`form`,{onSubmit:async t=>{t.preventDefault(),a(``);let n=l(e.original_principal),i=l(e.outstanding_balance),o=l(e.interest_rate),c=l(e.term_months);if(!e.submitter_name||!e.submitter_email||!e.charge){a(`Please complete your name, email address and charge.`);return}if(!e.lender_name||!e.lender_type){a(`Please give the lender name and select the lender type.`);return}if(i===null||i<=0){a(`The outstanding balance must be a positive amount in £.`);return}if(n!==null&&n<=0){a(`The original principal must be a positive amount in £.`);return}if(o!==null&&o<=0){a(`The interest rate must be a positive percentage.`);return}if(c!==null&&c<=0){a(`The term length must be a positive number of months.`);return}if(!e.maturity_date){a(`Please give the maturity / repayment date.`);return}r(!0);try{let t={submitter_name:e.submitter_name,submitter_role:e.submitter_role,submitter_email:e.submitter_email,charge:e.charge,charge_code:e.charge_code,lender_name:e.lender_name,lender_type:e.lender_type,original_principal:n,outstanding_balance:i,interest_rate:o,term_months:c,maturity_date:e.maturity_date,purpose:e.purpose,notes:e.notes};await X.entities.LoansTracker.create(t);try{await X.functions.invoke(`notifyLoanDisclosure`,t)}catch{}s(!0)}catch{a(`Something went wrong sending your disclosure â please try again.`)}finally{r(!1)}},className:`mt-8 space-y-8`,children:[(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,children:[(0,z.jsx)(`h2`,{className:`font-display text-xl`,children:`Your details`}),(0,z.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ld-name`,children:`Your name *`}),(0,z.jsx)($h,{id:`ld-name`,value:e.submitter_name,onChange:e=>c(`submitter_name`,e.target.value),className:`mt-1.5`,placeholder:`e.g. Alex Morgan`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ld-role`,children:`Your role`}),(0,z.jsx)(`select`,{id:`ld-role`,value:e.submitter_role,onChange:e=>c(`submitter_role`,e.target.value),className:`mt-1.5 w-full rounded-lg border border-input bg-card px-3 py-2 text-sm`,children:a4.map(e=>(0,z.jsx)(`option`,{children:e},e))})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ld-email`,children:`Your email address *`}),(0,z.jsx)($h,{id:`ld-email`,type:`email`,value:e.submitter_email,onChange:e=>c(`submitter_email`,e.target.value),className:`mt-1.5`,placeholder:`[email protected]`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ld-code`,children:`Diocesan charge code (optional)`}),(0,z.jsx)($h,{id:`ld-code`,value:e.charge_code,onChange:e=>c(`charge_code`,e.target.value),className:`mt-1.5`,placeholder:`If you know it â it helps us match faster`})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`ld-charge`,children:`Select your charge / congregation *`}),(0,z.jsxs)(`select`,{id:`ld-charge`,value:e.charge,onChange:e=>c(`charge`,e.target.value),className:`mt-1.5 w-full rounded-lg border border-input bg-card px-3 py-2 text-sm`,children:[(0,z.jsx)(`option`,{value:``,children:`Choose from the list of all 54 chargesâ¦`}),XF.map(e=>(0,z.jsx)(`option`,{children:e},e))]})]})]})]}),(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,children:[(0,z.jsx)(`h2`,{className:`font-display text-xl`,children:`The loan`}),(0,z.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ld-lender`,children:`Lender name *`}),(0,z.jsx)($h,{id:`ld-lender`,value:e.lender_name,onChange:e=>c(`lender_name`,e.target.value),className:`mt-1.5`,placeholder:`e.g. Bank of Scotland`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ld-type`,children:`Lender t
217ype *`}),(0,z.jsxs)(`select`,{id:`ld-type`,value:e.lender_type,onChange:e=>c(`lender_type`,e.target.value),className:`mt-1.5 w-full rounded-lg border border-input bg-card px-3 py-2 text-sm`,children:[(0,z.jsx)(`option`,{value:``,children:`Select the source of the loanâ¦`}),o4.map(e=>(0,z.jsx)(`option`,{children:e},e))]})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ld-principal`,children:`Original principal amount (£)`}),(0,z.jsx)($h,{id:`ld-principal`,type:`number`,min:`0`,step:`0.01`,value:e.original_principal,onChange:e=>c(`original_principal`,e.target.value),className:`mt-1.5`,placeholder:`e.g. 45000`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ld-balance`,children:`Current outstanding balance (£) *`}),(0,z.jsx)($h,{id:`ld-balance`,type:`number`,min:`0`,step:`0.01`,value:e.outstanding_balance,onChange:e=>c(`outstanding_balance`,e.target.value),className:`mt-1.5`,placeholder:`e.g. 32000`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ld-rate`,children:`Interest rate (%)`}),(0,z.jsx)($h,{id:`ld-rate`,type:`number`,min:`0`,step:`0.01`,value:e.interest_rate,onChange:e=>c(`interest_rate`,e.target.value),className:`mt-1.5`,placeholder:`e.g. 4.5`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ld-term`,children:`Term length (months)`}),(0,z.jsx)($h,{id:`ld-term`,type:`number`,min:`0`,step:`1`,value:e.term_months,onChange:e=>c(`term_months`,e.target.value),className:`mt-1.5`,placeholder:`e.g. 120`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ld-maturity`,children:`Maturity / repayment date *`}),(0,z.jsx)($h,{id:`ld-maturity`,type:`date`,value:e.maturity_date,onChange:e=>c(`maturity_date`,e.target.value),className:`mt-1.5`})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`ld-purpose`,children:`Purpose of the loan`}),(0,z.jsx)(AD,{id:`ld-purpose`,value:e.purpose,onChange:e=>c(`purpose`,e.target.value),className:`mt-1.5`,placeholder:`e.g. Roof repairs to the church building`})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`ld-notes`,children:`Anything else the Diocesan Office should know?`}),(0,z.jsx)(AD,{id:`ld-notes`,value:e.notes,onChange:e=>c(`notes`,e.target.value),className:`mt-1.5`,placeholder:`Optional`})]})]})]}),i&&(0,z.jsx)(`p`,{className:`text-sm text-destructive`,children:i}
217),(0,z.jsxs)(Qh,{type:`submit`,disabled:n,className:`w-full sm:w-auto`,children:[n?(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}):(0,z.jsx)(Nn,{className:`w-4 h-4 mr-2`}),`Submit Loan Disclosure`]})]})]})})]})}var c4=[`Rector / Priest-in-Charge`,`Vestry Treasurer`,`Vestry Secretary`,`Vestry Member`],l4=[2025,2026,2027],u4=[`Weekly`,`Fortnightly`,`Monthly`,`Festal Only`],d4=[`Weekly Standing Order`,`Monthly Standing Order`,`Quarterly`,`Annual Envelopes`],f4=[{value:``,label:`Choose from the list of all 54 chargesâ¦`},...XF.map(e=>({value:e,label:e}))],p4=[{value:``,label:`Select frequencyâ¦`},...u4.map(e=>({value:e,label:e}))],m4=[{value:``,label:`Select frequencyâ¦`},...d4.map(e=>({value:e,label:e}))];function h4(){let[e,t]=(0,b.useState)({submitter_name:``,submitter_role:`Vestry Treasurer`,submitter_email:``,charge:``,charge_code:``,reporting_year:String(new Date().getFullYear()),congregation_name:``,membership_size:``,attendance_frequency:``,total_giving:``,donor_count:``,donor_sums:``,donation_frequency:``,notes:``}),[n,r]=(0,b.useState)(!1),[i,a]=(0,b.useState)(``),[o,s]=(0,b.useState)(!1),c=(e,n)=>t(t=>({...t,[e]:n})),l=e=>{let t=Number(e);return e!==``&&Number.isFinite(t)?t:null};return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,z.jsx)(`header`,{className:`pt-safe border-b border-border/60 bg-card/80 backdrop-blur-sm sticky top-0 z-10`,children:(0,z.jsxs)(`div`,{className:`max-w-3xl mx-auto px-6 py-4 flex items-center gap-3`,children:[(0,z.jsx)(Dg,{size:36}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-display text-lg leading-tight`,children:`Diocese Connect`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:`Diocese of Edinburgh`})]}),(0,z.jsxs)(Dc,{to:`/`,className:`ml-auto inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors`,children:[(0,z.jsx)(Qt,{className:`w-4 h-4`}),`Home`]})]})}),(0,z.jsx)(`main`,{className:`max-w-3xl mx-auto px-6 py-12`,children:o?(0,z.jsxs)(`div`,{className:`rounded-2xl border border-primary/30 bg-card p-8 text-center shadow-sm`,children:[(0,z.jsx)(`div`,{className:`w-14 h-14 rounded-full bg-primary/10 text-primary flex items-center justify-center mx-auto`,children:(0,z.jsx)(mn,{className:`w-7 h-7`})}),(0,z.jsx)(`h1`,{className:`font-display text-2xl mt-4`,children:`Thank you â your Congregational Return is with the Diocesan Office`}),(0,z.jsxs)(`p`,{className:`text-muted-foreground mt-3 max-w-lg mx-auto`,children:[`The figures for `,e.charge,` (`,e.reporting_year,`) have been added to the diocesan register. They help us see where congregations are growing in stewardship â and where diocesan mission support can make the greatest difference.`]}),(0,z.jsx)(Dc,{to:`/`,children:(0,z.jsx)(Qh,{className:`mt-6`,children:`Back to the home page`})})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-primary font-medium`,children:`Governance: Maintaining Financial Health and Congregational Growth`}),(0,z.jsx)(`h1`,{className:`font-display text-3xl sm:text-4xl mt-2`,children:`Annual Congregational Return`}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-3 max-w-2xl`,children:`Share your congregation's membership, attendance, giving and donor figures for the reporting year. There is no need to create an account â your return goes straight to the secure Diocesan Office records.`}),(0,z.jsxs)(`form`,{onSubmit:async t=>{t.preventDefault(),a(``);let n=l(e.membership_size),i=l(e.total_giving),o=l(e.donor_count),c=l(e.donor_sums),u=[[`Membership size`,n],[`Total congregational giving`,i],[`Number of regular donors`,o],[`Sums from regular donors`,c]].find(([,e])=>e!==null&&e<0);if(u){a(`${u[0]} cannot be a negative amount.`);return}if(!e.submitter_name||!e.submitter_email||!e.charge){a(`Please complete your name, email address and charge.`);return}r(!0);try{await X.entities.CongregationalMetrics.create({submitter_name:e.submitter_name,submitter_role:e.submitter_role,submitter_email:e.submitter_email,charge:e.charge,charge_code:e.charge_code,reporting_year:Number(e.reporting_year),congregation_name:e.congregation_name,membership_size:n,attendance_frequency:e.attendance_frequency,total_giving:i,donor_count:o,donor_sums:c,donation_frequency:e.donation_frequency,notes:e.notes}),s(!0)}catch{a(`Something went wrong sending your return â please try again.`)}finally{r(!1)}},className:`mt-8 space-y-8`,children:[(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,children:[(0,z.jsx)(`h2`,{className:`font-display text-xl`,children:`Your details`}),(0,z.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-name`,children:`Your name *`}),(0,z.jsx)($h,{id:`cr-name`,value:e.submitter_name,onChange:e=>c(`submitter_name`,e.target.value),className:`mt-1.5`,placeholder:`e.g. Alex Morgan`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-role`,children:`Your role`}),(0,z.jsx)(C2,{id:`cr-role`,value:e.submitter_role,onChange:e=>c(`submitter_role`,e),options:c4,title:`Your role`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-email`,children:`Your email address *`}),(0,z.jsx)($h,{id:`cr-email`,type:`email`,value:e.submitter_email,onChange:e=>c(`submitter_email`,e.target.value),className:`mt-1.5`,placeholder:`[email protected]`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-year`,children:`Reporting year *`}),(0,z.jsx)(C2,{id:`cr-year`,value:e.reporting_year,onChange:e=>c(`reporting_year`,e),options:l4.map(e=>({value:String(e),label:String(e)})),title:`Reporting year`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-code`,children:`Diocesan charge code (optional)`}),(0,z.jsx)($h,{id:`cr-code`,value:e.charge_code,onChange:e=>c(`charge_code`,e.target.value),className:`mt-1.5`,placeholder:`If you know it â it helps us match faster`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-congregation`,children:`Congregation name`}),(0,z.jsx)($h,{id:`cr-congregation`,value:e.congregation_name,onChange:e=>c(`congregation_name`,e.target.value),className:`mt-1.5`,placeholder:`As it appears on the roll`})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`cr-charge`,children:`Select your charge / congregation *`}),(0,z.jsx)(C2,{id:`cr-charge`,value:e.charge,onChange:e=>c(`charge`,e),options:f4,title:`Select your charge / congregation`})]})]})]}),(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,children:[(0,z.jsx)(`h2`,{className:`font-display text-xl`,children:`Membership & attendance`}),(0,z.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-membership`,children:`Membership size (total roll count)`}),(0,z.jsx)($h,{id:`cr-membership`,type:`number`,min:`0`,step:`1`,value:e.membership_size,onChange:e=>c(`membership_size`,e.target.value),className:`mt-1.5`,placeholder:`e.g. 120`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-attendance`,children:`Average attendance frequency`}),(0,z.jsx)(C2,{id:`cr-attendance`,value:e.attendance_frequency,onChange:e=>c(`attendance_frequency`,e),options:p4,title:`Average attendance frequency`})]})]})]}),(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,children:[(0,z.jsx)(`h2`,{className:`font-display text-xl`,children:`Giving & donors`}),(0,z.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-giving`,children:`Total congregational giving (annual £)`}),(0,z.jsx)($h,{id:`cr-giving`,type:`number`,min:`0`,step:`0.01`,value:e.total_giving,onChange:e=>c(`total_giving`,e.target.value),className:`mt-1.5`,placeholder:`e.g. 38000`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-donors`,children:`Number of regular donors`}),(0,z.jsx)($h,{id:`cr-donors`,type:`number`,min:`0`,step:`1`,value:e.donor_count,onChange:e=>c(`donor_count`,e.target.value),className:`mt-1.5`,placeholder:`e.g. 45`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-sums`,children:`Sums from regular donors (annual £)`}),(0,z.jsx)($h,{id:`cr-sums`,type:`number`,min:`0`,step:`0.01`,value:e.donor_sums,onChange:e=>c(`donor_sums`,e.target.value),className:`mt-1.5`,placeholder:`e.g. 26000`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`cr-frequency`,children:`Regular donation frequency`}),(0,z.jsx)(C2,{id:`cr-frequency`,value:e.donation_frequency,onChange:e=>c(`donation_frequency`,e),options:m4,title:`Regular donation frequency`})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`cr-notes`,children:`Anything else the Diocesan Office should know?`}),(0,z.jsx)(AD,{id:`cr-notes`,value:e.notes,onChange:e=>c(`notes`,e.target.value),className:`mt-1.5`,placeholder:`Optional`})]})]})]}),i&&(0,z.jsx)(`p`,{className:`text-sm text-destructive`,children:i}
217),(0,z.jsxs)(Qh,{type:`submit`,disabled:n,className:`w-full sm:w-auto`,children:[n?(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}):(0,z.jsx)(sr,{className:`w-4 h-4 mr-2`}),`Submit Congregational Return`]})]})]})})]})}var g4=[`Rector / Priest-in-Charge`,`Vestry Secretary`,`Vestry Member`,`Congregation member`],_4=[{name:`The Communicant`,desc:`fortnightly diocesan news`},{name:`Adventures in Faith`,desc:`monthly`},{name:`DMMC News`,desc:`monthly`},{name:`Any publication`,desc:`let the Communications Officer choose`}],v4=[{value:``,label:`Choose from the list of all 54 chargesâ¦`},...XF.map(e=>({value:e,label:e}))],y4=[{value:``,label:`Choose a publicationâ¦`},..._4.map(e=>({value:e.name,label:`${e.name} â ${e.desc}`}))],b4=[{value:`Story`,label:`Story / news`},{value:`Event`,label:`Upcoming event`}];function x4(){let[e,t]=(0,b.useState)({submitter_name:``,submitter_role:`Rector / Priest-in-Charge`,submitter_email:``,charge:``,publication:``,submission_type:`Story`,title:``,body:``,event_date:``,event_location:``,notes:``}),[n,r]=(0,b.useState)(null),[i,a]=(0,b.useState)(!1),[o,s]=(0,b.useState)(``),[c,l]=(0,b.useState)(!1),u=(e,n)=>t(t=>({...t,[e]:n}));return c?(0,z.jsxs)(`div`,{className:`rounded-2xl border border-primary/30 bg-card p-8 text-center shadow-sm`,children:[(0,z.jsx)(`div`,{className:`w-14 h-14 rounded-full bg-primary/10 text-primary flex items-center justify-center mx-auto`,children:(0,z.jsx)(mn,{className:`w-7 h-7`})}),(0,z.jsx)(`h2`,{className:`font-display text-2xl mt-4`,children:`Thank you â your story is with the Communications Officer`}),(0,z.jsxs)(`p`,{className:`text-muted-foreground mt-3 max-w-lg mx-auto`,children:[`Your submission for `,e.charge,` is in the Communications Officer's hands. They review every item for`,` `,e.publication===`Any publication`?`the next suitable issue`:e.publication,`, and may be in touch if they need anything further. Do keep them coming â stories from our congregations are how the whole Diocese stays connected.`]}),(0,z.jsxs)(`p`,{className:`text-sm text-muted-foreground mt-3`,children:[`Keep an eye on the `,(0,z.jsx)(`strong`,{children:`Recent publications`}),` tab to see your story in print.`]}),(0,z.jsx)(Qh,{className:`mt-6`,variant:`outline`,onClick:()=>{l(!1)},children:`Submit another story`})]}):(0,z.jsxs)(`form`,{onSubmit:async t=>{if(t.preventDefault(),s(``),!e.submitter_name||!e.submitter_email||!e.charge){s(`Please complete your name, email address and charge.`);return}if(!e.publication){s(`Please choose which publication your item is for.`);return}if(!e.title||!e.body){s(`Please give your story a title and tell us about it.`);return}a(!0);try{let t,r;n&&(t=(await X.integrations.Core.UploadPublicFile({file:n})).file_url,r=n.name),await X.entities.StorySubmission.create({...e,event_date:e.event_date||void 0,event_location:e.event_location||void 0,notes:e.notes||void 0,photo_file_url:t,photo_file_name:r}),l(!0)}catch{s(`Something went wrong sending your story â please try again.`)}finally{a(!1)}},className:`space-y-8`,children:[(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,children:[(0,z.jsx)(`h3`,{className:`font-display text-xl`,children:`Your details`}),(0,z.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ss-name`,children:`Your name *`}),(0,z.jsx)($h,{id:`ss-name`,value:e.submitter_name,onChange:e=>u(`submitter_name`,e.target.value),className:`mt-1.5`,placeholder:`e.g. Alex Morgan`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ss-role`,children:`Your role`}),(0,z.jsx)(C2,{id:`ss-role`,value:e.submitter_role,onChange:e=>u(`submitter_role`,e),options:g4,title:`Your role`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ss-email`,children:`Your email address *`}),(0,z.jsx)($h,{id:`ss-email`,type:`email`,value:e.submitter_email,onChange:e=>u(`submitter_email`,e.target.value),className:`mt-1.5`,placeholder:`[email protected]`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ss-charge`,children:`Select your charge / congregation *`}),(0,z.jsx)(C2,{id:`ss-charge`,value:e.charge,onChange:e=>u(`charge`,e),options:v4,title:`Select your charge / congregation`})]})]})]}),(0,z.jsxs)(`section`,{className:`rounded-2xl border border-border/70 bg-card p-6 shadow-sm`,children:[(0,z.jsx)(`h3`,{className:`font-display text-xl`,children:`The story or event`}),(0,z.jsxs)(`div`,{className:`mt-4 grid gap-4 sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ss-publication`,children:`Which publication is it for? *`}),(0,z.jsx)(C2,{id:`ss-publication`,value:e.publication,onChange:e=>u(`publication`,e),options:y4,title:`Which publication is it for?`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ss-type`,children:`Is it a story or an event?`}
217),(0,z.jsx)(C2,{id:`ss-type`,value:e.submission_type,onChange:e=>u(`submission_type`,e),options:b4,title:`Is it a story or an event?`})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`ss-title`,children:`Title *`}),(0,z.jsx)($h,{id:`ss-title`,value:e.title,onChange:e=>u(`title`,e.target.value),className:`mt-1.5`,placeholder:`e.g. New community café opens its doors in Dalkeith`})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`ss-body`,children:`Tell us about it *`}),(0,z.jsx)(AD,{id:`ss-body`,rows:6,value:e.body,onChange:e=>u(`body`,e.target.value),className:`mt-1.5`,placeholder:`A few paragraphs is plenty â who, what, when and why it matters.`})]}),e.submission_type===`Event`&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ss-date`,children:`Event date`}),(0,z.jsx)($h,{id:`ss-date`,type:`date`,value:e.event_date,onChange:e=>u(`event_date`,e.target.value),className:`mt-1.5`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(Z,{htmlFor:`ss-location`,children:`Event location`}),(0,z.jsx)($h,{id:`ss-location`,value:e.event_location,onChange:e=>u(`event_location`,e.target.value),className:`mt-1.5`,placeholder:`e.g. St Mary's Church Hall, Dalkeith`})]})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`ss-photo`,children:`Photo (optional)`}),(0,z.jsx)(`input`,{id:`ss-photo`,type:`file`,accept:`image/*`,onChange:e=>r(e.target.files&&e.target.files[0]),className:`mt-1.5 w-full text-sm text-muted-foreground file:mr-4 file:rounded-md file:border-0 file:bg-primary/10 file:px-4 file:py-2 file:text-sm file:font-medium file:text-primary hover:file:bg-primary/20`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:`A good photo makes a story â landscape photos work best.`})]}),(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(Z,{htmlFor:`ss-notes`,children:`Anything else the Communications Officer should know?`}),(0,z.jsx)(AD,{id:`ss-notes`,rows:3,value:e.notes,onChange:e=>u(`notes`,e.target.value),className:`mt-1.5`,placeholder:`Optional`})]})]})]}),o&&(0,z.jsx)(`p`,{className:`text-sm text-destructive`,children:o}
217),(0,z.jsxs)(Qh,{type:`submit`,disabled:i,className:`w-full sm:w-auto`,children:[i?(0,z.jsx)(Ln,{className:`w-4 h-4 mr-2 animate-spin`}):(0,z.jsx)(Wn,{className:`w-4 h-4 mr-2`}),`Send to the Communications Officer`]})]})}var S4=[{name:`The Communicant`,desc:`fortnightly diocesan news`},{name:`Adventures in Faith`,desc:`monthly`},{name:`DMMC News`,desc:`monthly`}],C4=e=>e?new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`long`,year:`numeric`}):``;function w4(){let[e,t]=(0,b.useState)(null);(0,b.useEffect)(()=>{X.entities.RecentPublication.list(`-edition_date`,30).then(t).catch(()=>t([]))},[]);let n=S4.map(t=>({...t,issues:(e||[]).filter(e=>e.publication===t.name)}));return(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-muted-foreground`,children:`Read the latest issues of our diocesan publications right here â and see if your stories and events have made it into print. New editions are posted as they are published.`}),e===null?(0,z.jsxs)(`div`,{className:`mt-10 flex items-center justify-center text-muted-foreground`,children:[(0,z.jsx)(Ln,{className:`w-5 h-5 mr-2 animate-spin`}),`Loading recent publicationsâ¦`]}):e.length===0?(0,z.jsxs)(`div`,{className:`mt-8 rounded-2xl border border-dashed border-border bg-card p-12 text-center`,children:[(0,z.jsx)(tn,{className:`w-10 h-10 text-muted-foreground mx-auto`}),(0,z.jsx)(`p`,{className:`font-medium mt-3`,children:`No recent issues posted yet`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1 max-w-md mx-auto`,children:`As soon as a new edition of The Communicant, Adventures in Faith or DMMC News is published, it will appear here for every charge to read.`}),(0,z.jsxs)(`p`,{className:`text-sm mt-4`,children:[`In the meantime, issues can also be found on the`,` `,(0,z.jsx)(`a`,{href:`https://edinburgh.anglican.org/`,target:`_blank`,rel:`noreferrer`,className:`text-primary underline underline-offset-2`,children:`diocesan website`}),`.`]})]}):(0,z.jsxs)(`div`,{className:`mt-6 space-y-8`,children:[n.map(e=>(0,z.jsxs)(`section`,{children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`h3`,{className:`font-display text-xl`,children:e.name}),(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:e.desc})]}),e.issues.length===0?(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-2`,children:`No recent issues posted yet.`}):(0,z.jsx)(`div`,{className:`mt-3 grid gap-4 sm:grid-cols-2`,children:e.issues.map(e=>{let t=e.external_url||e.file_url;return(0,z.jsxs)(`div`,{className:`rounded-2xl border border-border/70 bg-card p-5 shadow-sm flex flex-col`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,z.jsx)(`span`,{className:`px-2 py-0.5 rounded-full bg-primary/10 text-primary font-medium`,children:e.publication}),e.edition_date&&(0,z.jsx)(`span`,{children:C4(e.edition_date)})]}),(0,z.jsx)(`h4`,{className:`font-display text-lg mt-2`,children:e.title}),e.description&&(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1 flex-1`,children:e.description}),t&&(0,z.jsx)(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`mt-4`,children:(0,z.jsxs)(Qh,{size:`sm`,variant:`outline`,children:[e.external_url?(0,z.jsx)(Sn,{className:`w-4 h-4 mr-2`}):(0,z.jsx)(Tn,{className:`w-4 h-4 mr-2`}),`Read this issue`]})})]},e.id)})})]},e.name)),(0,z.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Every issue is also available on the`,` `,(0,z.jsx)(`a`,{href:`https://edinburgh.anglican.org/`,target:`_blank`,rel:`noreferrer`,className:`text-primary underline underline-offset-2`,children:`diocesan website`}),`.`]})]})]})}function T4(){return(0,z.jsxs)(`div`,{className:`min-h-screen bg-background`,children:[(0,z.jsx)(`header`,{className:`pt-safe border-b border-border/60 bg-card/80 backdrop-blur-sm sticky top-0 z-10`,children:(0,z.jsxs)(`div`,{className:`max-w-3xl mx-auto px-6 py-4 flex items-center gap-3`,children:[(0,z.jsx)(Dg,{size:36}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-display text-lg leading-tight`,children:`Diocese Connect`}),(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:`Diocese of Edinburgh`})]}),(0,z.jsxs)(Dc,{to:`/`,className:`ml-auto inline-flex items-center gap-2 text-sm text-muted-foreground hover:text-foreground transition-colors`,children:[(0,z.jsx)(Qt,{className:`w-4 h-4`}),`Home`]})]})}),(0,z.jsxs)(`main`,{className:`max-w-3xl mx-auto px-6 py-12`,children:[(0,z.jsx)(`p`,{className:`text-[11px] uppercase tracking-[0.18em] text-primary font-medium`,children:`Communications`}),(0,z.jsx)(`h1`,{className:`font-display text-3xl sm:text-4xl mt-2`,children:`Share your news, stories & events`}),(0,z.jsx)(`p`,{className:`text-muted-foreground mt-3 max-w-2xl`,children:`The Communicant, Adventures in Faith and DMMC News are always looking for stories from around the Diocese â news, celebrations, events, mission stories and photos. Share it here in a few minutes and it goes straight to the Diocesan Communications Officer. No account needed.`}),(0,z.jsxs)(AF,{defaultValue:`submission`,className:`mt-8`,children:[(0,z.jsxs)(jF,{children:[(0,z.jsxs)(MF,{value:`submission`,children:[(0,z.jsx)(Wn,{className:`w-4 h-4 mr-2`}),`Story & event submission`]}),(0,z.jsxs)(MF,{value:`publications`,children:[(0,z.jsx)(tn,{className:`w-4 h-4 mr-2`}),`Recent publications`]})]}),(0,z.jsx)(NF,{value:`submission`,className:`mt-6`,children:(0,z.jsx)(x4,{})}),(0,z.jsx)(NF,{value:`publications`,className:`mt-6`,children:(0,z.jsx)(w4,{})})]})]})]})}var E4=`https://media.base44.com/images/public/6aa435a6b8c11be2da44898e/669a7a0d9_generated_image.png`,D4=[{title:`Data everywhere, trust nowhere`,desc:`Records scattered across spreadsheets, filing cabinets, inboxes and peopleâs memories. Nobody can fully trust the numbers, and every report starts with a reconciliation exercise.`},{title:`Clergy treated like pinballs`,desc:`Rectors and vestry officers bounce from person to person trying to find out what theyâre meant to do, how to do it, and who has the form this year.`},{title:`Returns arrive late â or not at all`,desc:`Annual accounts, loan disclosures and staffing changes are chased by phone and post, with no visibility of who is outstanding until the deadline has passed.`},{title:`No view from the top`,desc:`The Bishop, Dean and senior team piece together the health of congregations from so many different systems, word of mouth and flurries of various emails. There is no single, live snapshot of the diocese.`}
217,{title:`Publications built on chasing`,desc:`The Communications Officer spends days each month hunting for stories, instead of editing them â because there has never been an easy way for congregations to send them in.`}],O4=[{icon:sr,title:`Staff & office bearer life cycle`,desc:`New appointments, payroll intake, tax code updates, office bearer changes and exit interviews â with automated safeguarding and finance alerts.`},{icon:Nn,title:`Canon 35 & funding applications`,desc:`Step-by-step wizards with diocesan guidance, document uploads and committee review for planning consent and church/rectory funding.`},{icon:yn,title:`Governance & statutory returns`,desc:`Annual accounts, OSCR, Gift Aid, safeguarding and statistical returns â plus compulsory loan disclosure and congregational metrics.`},{icon:tr,title:`Secure payroll register`,desc:`The Diocesan Payroll Service register behind admin-only access codes, with bank details deliberately excluded.`},{icon:Vn,title:`Communications`,desc:`Congregations submit stories and events; the Communications Officer reviews, exports, publishes and posts every new issue back to the portal, so every charge can read the latest editions and see their own stories in print.`},{icon:Fn,title:`The Diocesan Hub`,desc:`One admin dashboard: contacts, committees, buildings, finance, training, governance checklist and congregation health across all 54 charges.`}],k4=[{icon:sr,title:`Clergy & vestries`,points:[`Every task in one place â no more person-to-person hunting`,`Forms adapt to the role, with guid
217ance at every step`,`Progress saves automatically; nothing is lost`,`Deadlines and requests arrive by email, not by rumour`,`Latest issues of the publications are posted to read â and to spot your own stories in print`]},{icon:ur,title:`Diocesan Office`,points:[`One dashboard for every submission, application and return`,`Search and filter by status, charge or workflow stage`,`The 54-charge master record updates itself`,`Automated alerts reach the right officer first time`,`Hours of chasing and re-keying reclaimed every week`]},{icon:Nn,title:`Bishop, Dean & senior team`,points:[`A live snapshot of the holistic health of the diocese`,`54-charge governance checklist at a glance`,`Risk alerts â e.g. any liability over £50,000 â flagged automatically`,`Attendance and giving trends to target mission support`,`Confidence that statutory duties are tracked, not hoped for`]}],A4=[`Annual accounts reminders â October, November and December, to Treasurers and Priests`,`High-value liability alerts â any loan over £50,000 emails the Finance Officer for the risk register`,`Safeguarding alerts â PVG-required appointments notify the Safeguarding Officer instantly`,`Charges Master auto-update â office bearer changes keep the directory current without re-keying`,`Weekly story call â every Monday, congregations are invited to share news for the publications`,`Inspection follow-ups â quinquennial actions are chased until closed`],j4=[{weeks:`Weeks 1â2`,title:`Discovery & data migration`,desc:`Charge directory, contacts, payroll and governance records imported from your existing CSV data; diocesan branding applied throughout.`},{weeks:`Weeks 3â4`,title:`Configuration & pilot`,desc:`Forms matched to your canons, funds and deadlines; a pilot with five or six charges proves every submission path end-to-e
217nd.`},{weeks:`Weeks 5â6`,title:`Training & communications`,desc:`Hands-on sessions for clergy, treasurers, vestry secretaries and the Diocesan Office; the publications desk and weekly story call go live.`},{weeks:`Weeks 7â8`,title:`Full rollout`,desc:`All 54 charges live; automated reminders and alerts switched on; the first governance cycle runs entirely through the portal.`}],M4=({n:e,title:t,children:n})=>(0,z.jsxs)(`section`,{className:`mt-8 rounded-2xl border border-border/70 bg-card p-8 shadow-sm break-avoid`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`span`,{className:`w-8 h-8 rounded-full bg-primary text-primary-foreground text-sm font-semibold flex items-center justify-center shrink-0`,children:e}),(0,z.jsx)(`h2`,{className:`font-display text-2xl`,children:t})]}),(0,z.jsx)(`div`,{className:`mt-5`,children:n})]});function N4(){let e=(0,b.useRef)(null),[t,n]=(0,b.useState)(!1);return(0,z.jsxs)(`div`,{className:`min-h-screen bg-brand-primary pitch-deck`,children:[(0,z.jsx)(`style`,{children:` 218 @page { margin: 20mm 16mm; } 219 @media print { 220 .pitch-deck { -webkit-print-color-adjust: exact; print-color-adjust: exact; } 221 .pitch-deck .print-hide { display: none !important; } 222 .pitch-deck main { max-width: none !important; padding: 0 !important; } 223 .pitch-deck .break-avoid { break-inside: avoid; } 224 .pitch-deck h1, .pitch-deck h2 { break-after: avoid; } 225 } 226 `}),(0,z.jsx)(`header`,{className:`bg-brand-primary print-hide`,children:(0,z.jsxs)(`div`,{className:`max-w-4xl mx-auto px-6 py-4 flex items-center gap-3`,children:[(0,z.jsx)(Dg,{size:36}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`font-display text-lg leading-tight text-brand-cream`,children:`Diocese Connect`}),(0,z.jsx)(`p`,{className:`text-xs text-brand-cream/70 truncate`,children:`Diocese of Edinburgh`})]}),(0,z.jsxs)(`div`,{className:`ml-auto flex gap-2`,children:[(0,z.jsxs)(`button`,{onClick:()=>window.print(),className:`inline-flex items-center gap-2 rounded-md border border-brand-cream/40 bg-transparent text-brand-cream px-4 py-2 text-sm font-medium hover:bg-white/10 transition-colors`,children:[(0,z.jsx)(Jn,{className:`w-4 h-4`}),`Print / save as PDF`]}),(0,z.jsxs)(`button`,{onClick:async()=>{if(!(!e.current||t)){n(!0);try{await G2(e.current,`Diocese Connect â A Proposal for the Diocese.pdf`)}catch{window.print()}finally{n(!1)}}},disabled:t,className:`inline-flex items-center gap-2 rounded-md bg-brand-gold text-brand-primary-deep px-4 py-2 text-sm font-medium hover:bg-brand-gold/90 transition-colors disabled:opacity-60`,children:[t?(0,z.jsx)(Ln,{className:`w-4 h-4 animate-spin`}):(0,z.jsx)(xn,{className:`w-4 h-4`}),`Download PDF`]})]})]})}),(0,z.jsxs)(`main`,{ref:e,className:`max-w-4xl mx-auto px-6 py-12`,children:[(0,z.jsx)(`div`,{className:`-mx-6 -mt-12 bg-brand-primary px-6 pt-12 pb-16`,children:(0,z.jsxs)(`div`,{className:`overflow-hidden rounded-3xl border border-brand-cream/25 shadow-lg`,children:[(0,z.jsxs)(`div`,{className:`relative overflow-hidden bg-gradient-to-br from-brand-primary-deep via-brand-primary to-[#514582] text-brand-cream p-8 sm:p-14`,children:[(0,z.jsx)(`div`,{className:`absolute inset-0 opacity-[0.07]`,style:{backgroundImage:`radial-gradient(circle at 80% 20%, #d9b86a 0, transparent 40%)`}}),(0,z.jsxs)(`div`,{className:`relative`,children:[(0,z.jsx)(Dg,{size:56,light:!0}),(0,z.jsx)(`p`,{className:`mt-6 text-sm font-medium tracking-[0.18em] uppercase text-[#f1d186]`,children:`A proposal for the Diocese`}),(0,z.jsx)(`h1`,{className:`font-display text-4xl sm:text-5xl mt-3 leading-tight`,children:`Diocese Connect`}),(0,z.jsx)(`p`,{className:`font-display text-xl sm:text-2xl mt-3 text-brand-cream/90`,children:`One secure portal for the whole life of the diocese`}),(0,z.jsx)(`p`,{className:`mt-5 max-w-2xl text-sm sm:text-base text-brand-cream/80`,children:`Moving from paper, spreadsheets and guesswork to a single source of data â for clergy, vestries, the Diocesan Office, and the Bishop's senior team. Already built, already working.`})]})]}),(0,z.jsx)(`div`,{className:`bg-brand-primary`,children:(0,z.jsx)(Tg,{src:E4,alt:`A Scottish Episcopal church at dusk`,fittingType:`fit`,className:`w-full h-72 sm:h-96`})})]})}),(0,z.jsx)(M4,{n:1,title:`The cost of working like it's 1985`,children:(0,z.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:D4.map(e=>(0,z.jsx)(`div`,{className:`rounded-xl border border-border/60 bg-background p-5`,children:(0,z.jsxs)(`div`,{className:`flex items-start gap-3`,children:[(0,z.jsx)(rr,{className:`w-5 h-5 text-destructive shrink-0 mt-0.5`}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`font-medium`,children:e.title}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.desc})]})]})}
226,e.title))})}),(0,z.jsx)(M4,{n:2,title:`One portal replaces them all`,children:(0,z.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2 lg:grid-cols-3`,children:O4.map(e=>{let t=e.icon;return(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/60 bg-background p-5`,children:[(0,z.jsx)(`div`,{className:`w-10 h-10 rounded-lg bg-primary/10 text-primary flex items-center justify-center`,children:(0,z.jsx)(t,{className:`w-5 h-5`})}),(0,z.jsx)(`p`,{className:`font-medium mt-3`,children:e.title}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.desc})]},e.title)})})}),(0,z.jsx)(M4,{n:3,title:`What changes for each person`,children:(0,z.jsx)(`div`,{className:`grid gap-4 lg:grid-cols-3`,children:k4.map(e=>{let t=e.icon;return(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/60 bg-background p-5`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,z.jsx)(`div`,{className:`w-10 h-10 rounded-lg bg-primary/10 text-primary flex items-center justify-center shrink-0`,children:(0,z.jsx)(t,{className:`w-5 h-5`})}),(0,z.jsx)(`p`,{className:`font-display text-lg`,children:e.title})]}),(0,z.jsx)(`ul`,{className:`mt-4 space-y-2.5`,children:e.points.map(e=>(0,z.jsxs)(`li`,{className:`flex items-start gap-2 text-sm text-muted-foreground`,children:[(0,z.jsx)(mn,{className:`w-4 h-4 text-primary shrink-0 mt-0.5`}),e]},e))})]},e.title)})})}),(0,z.jsx)(M4,{n:4,title:`Automation that never forgets`,children:(0,z.jsx)(`ul`,{className:`space-y-3`,children:A4.map(e=>(0,z.jsxs)(`li`,{className:`flex items-start gap-3 rounded-xl border border-border/60 bg-background p-4`,children:[(0,z.jsx)(ur,{className:`w-4 h-4 text-primary shrink-0 mt-0.5`}),(0,z.jsx)(`span`,{className:`text-sm`,children:e})]},e))})}),(0,z.jsxs)(M4,{n:5,title:`What it costs`,children:[(0,z.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/60 bg-background p-5`,children:[(0,z.jsx)(`p`,{className:`text-xs uppercase tracking-[0.14em] text-muted-foreground font-medium`,children:`The alternative â bespoke agency build`}),(0,z.jsx)(`p`,{className:`font-display text-2xl mt-2`,children:`£35,000â£70,000`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`to build a comparable bespoke charity portal with a UK software agency â plus £8,000â£15,000 a year for hosting and support, and months of specification meetings.`})]}),(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/60 bg-background p-5`,children:[(0,z.jsx)(`p`,{className:`text-xs uppercase tracking-[0.14em] text-muted-foreground font-medium`,children:`The alternative â off-the-shelf church software`}),(0,z.jsx)(`p`,{className:`font-display text-2xl mt-2`,children:`£550+ per church, per year`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:`yet still with no Canon 35 workflow, no diocesan governance tracker, no payroll register and no diocese-wide snapshot.`})]})]}),(0,z.jsxs)(`div`,{className:`mt-4 rounded-xl border border-primary/30 bg-primary/5 p-5`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-end gap-x-10 gap-y-4`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-xs uppercase tracking-[0.14em] text-primary font-medium`,children:`Recommended â one-off implementation`}),(0,z.jsx)(`p`,{className:`font-display text-3xl mt-1`,children:`£12,500`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`setup, configuration, CSV data migration and training`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-xs uppercase tracking-[0.14em] text-primary font-medium`,children:`Annual licence & support`}),(0,z.jsx)(`p`,{className:`font-display text-3xl mt-1`,children:`£2,400`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`£200/month â hosting, security, updates and email automation`})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`p`,{className:`text-xs uppercase tracking-[0.14em] text-primary font-medium`,children:`Total year one`}),(0,z.jsx)(`p`,{className:`font-display text-3xl mt-1`,children:`£14,900`}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`then £2,400 a year`})]})]}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-4`,children:`Set against the staff hours currently lost to chasing, re-keying and reconciling scattered data â and the print, postage and error costs of a paper system â the portal pays for itself within the first year.`})]})]}),(0,z.jsx)(M4,{n:6,title:`Rollout in eight weeks`,children:(0,z.jsx)(`div`,{className:`space-y-3`,children:j4.map((e,t)=>
226(0,z.jsxs)(`div`,{className:`flex items-start gap-4 rounded-xl border border-border/60 bg-background p-5`,children:[(0,z.jsx)(`div`,{className:`w-10 h-10 rounded-full bg-primary/10 text-primary flex items-center justify-center shrink-0`,children:(0,z.jsx)(on,{className:`w-5 h-5`})}),(0,z.jsxs)(`div`,{children:[(0,z.jsxs)(`p`,{className:`font-medium`,children:[e.weeks,` â `,e.title]}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.desc})]}),t<j4.length-1&&(0,z.jsx)($t,{className:`w-4 h-4 text-muted-foreground ml-auto shrink-0 mt-3`})]},e.weeks))})}),(0,z.jsxs)(M4,{n:7,title:`Next steps`,children:[(0,z.jsx)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[{title:`Send us your data`,desc:`Your existing charge, contact, payroll and governance CSV files are all we need to populate the portal during migration.`},{title:`Nominate a pilot group`,desc:`Five or six charges of different sizes test every path â applications, returns, loan disclosures and story submissions.`},{title:`Brief your teams`,desc:`One short session each for clergy, treasurers, vestry secretaries and the Communications Officer.`},{title:`Switch on the automation`,desc:`Reminders, alerts and the weekly story call go live with the rollout â and the paperwork era ends.`}].map(e=>(0,z.jsxs)(`div`,{className:`rounded-xl border border-border/60 bg-background p-5`,children:[(0,z.jsx)(`p`,{className:`font-medium`,children:e.title}),(0,z.jsx)(`p`,{className:`text-sm text-muted-foreground mt-1`,children:e.desc})]},e.title))}),(0,z.jsxs)(`div`,{className:`mt-5 rounded-xl border border-primary/30 bg-primary/5 p-5 flex items-center gap-4`,children:[(0,z.jsx)(qn,{className:`w-6 h-6 text-primary shrink-0`}),(0,z.jsxs)(`p`,{className:`text-sm`,children:[(0,z.jsx)(`strong`,{children:`£14,900 year one, £2,400 a year after.`}),` Eight weeks from data to a diocese that finally knows itself. Shall we begin?`]})]})]}),(0,z.jsxs)(`p`,{className:`text-xs text-brand-cream/70 mt-8 text-center`,children:[`Diocese Connect · built for the Scottish Episcopal Diocese of Edinburgh · all data held in secure, access-controlled cloud storage compliant with UK GDPR`,(0,z.jsx)(`br`,{}),`For demonstration purposes, the portal is populated with fictional sample data â all names, stories and figures are illustrative only.`]})]})]})}var P4=()=>{let{isLoadingAuth:e,isLoadingPublicSettings:t,authError:n,navigateToLogin:r}=Fh();if(t||e)return(0,z.jsx)(`div`,{className:`fixed inset-0 flex items-center justify-center`,children:(0,z.jsx)(`div`,{className:`w-8 h-8 border-4 border-slate-200 border-t-slate-800 rounded-full animate-spin`})});if(n){if(n.type===`user_not_registered`)return(0,z.jsx)(Ih,{});if(n.type===`auth_required`)return r(),null}return(0,z.jsxs)(uc,{children:[(0,z.jsx)(cc,{path:`/apply`,element:(0,z.jsx)(nP,{})}),(0,z.jsx)(cc,{path:`/apply-funding`,element:(0,z.jsx)(OP,{})}),(0,z.jsx)(cc,{path:`/apply-rectory`,element:(0,z.jsx)(HP,{})}),(0,z.jsx)(cc,{path:`/annual-returns`,element:(0,z.jsx)(i4,{})}),(0,z.jsx)(cc,{path:`/loan-disclosure`,element:(0,z.jsx)(s4,{})}),(0,z.jsx)(cc,{path:`/congregational-return`,element:(0,z.jsx)(h4,{})}),(0,z.jsx)(cc,{path:`/share-story`,element:(0,z.jsx)(T4,{})}),(0,z.jsx)(cc,{path:`/case-for-diocese-connect`,element:(0,z.jsx)(N4,{})}),(0,z.jsx)(cc,{path:`/system-overview`,element:(0,z.jsx)(Z2,{})}),(0,z.jsx)(cc,{path:`/login`,element:(0,z.jsx)(kg,{})}),(0,z.jsx)(cc,{path:`/register`,element:(0,z.jsx)(t_,{})}),(0,z.jsx)(cc,{path:`/forgot-password`,element:(0,z.jsx)(n_,{})}),(0,z.jsx)(cc,{path:`/reset-password`,element:(0,z.jsx)(r_,{})}),(0,z.jsxs)(cc,{element:(0,z.jsx)(a_,{unauthenticatedElement:(0,z.jsx)(oc,{to:`/register`,replace:!0})}),children:[(0,z.jsx)(cc,{path:`/`,element:(0,z.jsx)(KF,{})}),(0,z.jsx)(cc,{path:`/dashboard`,element:(0,z.jsx)(e1,{})}),(0,z.jsx)(cc,{path:`/onboarding`,element:(0,z.jsx)(aI,{})}),(0,z.jsx)(cc,{path:`/onboarding/:formKey`,element:(0,z.jsx)(sI,{})}),(0,z.jsx)(cc,{element:(0,z.jsx)(H2,{}),children:(0,z.jsxs)(cc,{element:(0,z.jsx)(B2,{}),children:[(0,z.jsx)(cc,{path:`/hub`,element:(0,z.jsx)(s1,{})}),(0,z.jsx)(cc,{path:`/payroll`,element:(0,z.jsx)(D2,{})}),(0,z.jsx)(cc,{path:`/governance`,element:(0,z.jsx)(M2,{})}),(0,z.jsx)(cc,{path:`/communications`,element:(0,z.jsx)(R2,{})})]})})]}),(0,z.jsx)(cc,{path:`*`,element:(0,z.jsx)(Mh,{})})]})};
226function F4(){return(0,z.jsx)(Xi,{attribute:`class`,defaultTheme:`system`,enableSystem:!0,disableTransitionOnChange:!0,children:(0,z.jsx)(Ph,{children:(0,z.jsxs)(po,{client:Oo,children:[(0,z.jsxs)(wc,{children:[(0,z.jsx)(Rh,{}),(0,z.jsx)(P4,{})]}),(0,z.jsx)(Wi,{})]})})})}y.createRoot(document.getElementById(`root`)).render((0,z.jsx)(F4,{}));export{s as n,u as r,wW as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.